xref: /freebsd/contrib/unbound/configure (revision be771a7b7f4580a30d99e41a5bb1b93a385a119d)
1#! /bin/sh
2# Guess values for system-dependent variables and create Makefiles.
3# Generated by GNU Autoconf 2.71 for unbound 1.23.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.23.0'
626PACKAGE_STRING='unbound 1.23.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
715SOURCE_DATE_EPOCH
716GCC_DOCKER_LINTFLAGS
717NETBSD_LINTFLAGS
718PYUNBOUND_UNINSTALL
719PYUNBOUND_INSTALL
720PYUNBOUND_TARGET
721PYUNBOUND_OBJ
722WITH_PYUNBOUND
723PYTHONMOD_UNINSTALL
724PYTHONMOD_INSTALL
725PYTHONMOD_HEADER
726PYTHONMOD_OBJ
727WITH_PYTHONMODULE
728swig
729SWIG_LIB
730SWIG
731PC_PY_DEPENDENCY
732PYTHON_LIBS
733PY_MAJOR_VERSION
734PYTHON_SITE_PKG
735PYTHON_LDFLAGS
736PYTHON_CPPFLAGS
737PYTHON
738PYTHON_VERSION
739DYNLIBMOD_EXTRALIBS
740DYNLIBMOD_HEADER
741DYNLIBMOD_OBJ
742WITH_DYNLIBMODULE
743PTHREAD_CFLAGS_ONLY
744PTHREAD_CFLAGS
745PTHREAD_LIBS
746PTHREAD_CXX
747PTHREAD_CC
748ax_pthread_config
749ASYNCLOOK_ALLOCCHECK_EXTRA_OBJ
750SLDNS_ALLOCCHECK_EXTRA_OBJ
751USE_SYSTEMD_FALSE
752USE_SYSTEMD_TRUE
753SYSTEMD_DAEMON_LIBS
754SYSTEMD_DAEMON_CFLAGS
755SYSTEMD_LIBS
756SYSTEMD_CFLAGS
757RUNTIME_PATH
758LIBOBJS
759CPP
760PKG_CONFIG_LIBDIR
761PKG_CONFIG_PATH
762PKG_CONFIG
763LT_SYS_LIBRARY_PATH
764OTOOL64
765OTOOL
766LIPO
767NMEDIT
768DSYMUTIL
769MANIFEST_TOOL
770AWK
771RANLIB
772ac_ct_AR
773DLLTOOL
774OBJDUMP
775LN_S
776NM
777ac_ct_DUMPBIN
778DUMPBIN
779LD
780FGREP
781EGREP
782SED
783LIBTOOL
784AR
785host_os
786host_vendor
787host_cpu
788host
789build_os
790build_vendor
791build_cpu
792build
793libtool
794STRIP
795doxygen
796YFLAGS
797YACC
798LEXLIB
799LEX_OUTPUT_ROOT
800LEX
801debug_enabled
802DEPFLAG
803GREP
804UNBOUND_USERNAME
805UNBOUND_ROOTCERT_FILE
806UNBOUND_ROOTKEY_FILE
807UNBOUND_PIDFILE
808UNBOUND_SHARE_DIR
809UNBOUND_CHROOT_DIR
810UNBOUND_RUN_DIR
811ub_conf_dir
812ub_conf_file
813UNBOUND_LOCALSTATE_DIR
814UNBOUND_SYSCONF_DIR
815UNBOUND_SBIN_DIR
816OBJEXT
817EXEEXT
818ac_ct_CC
819CPPFLAGS
820LDFLAGS
821CFLAGS
822CC
823LIBUNBOUND_AGE
824LIBUNBOUND_REVISION
825LIBUNBOUND_CURRENT
826UNBOUND_VERSION_MICRO
827UNBOUND_VERSION_MINOR
828UNBOUND_VERSION_MAJOR
829target_alias
830host_alias
831build_alias
832LIBS
833ECHO_T
834ECHO_N
835ECHO_C
836DEFS
837mandir
838localedir
839libdir
840psdir
841pdfdir
842dvidir
843htmldir
844infodir
845docdir
846oldincludedir
847includedir
848runstatedir
849localstatedir
850sharedstatedir
851sysconfdir
852datadir
853datarootdir
854libexecdir
855sbindir
856bindir
857program_transform_name
858prefix
859exec_prefix
860PACKAGE_URL
861PACKAGE_BUGREPORT
862PACKAGE_STRING
863PACKAGE_VERSION
864PACKAGE_TARNAME
865PACKAGE_NAME
866PATH_SEPARATOR
867SHELL'
868ac_subst_files=''
869ac_user_opts='
870enable_option_checking
871with_conf_file
872with_run_dir
873with_chroot_dir
874with_share_dir
875with_pidfile
876with_rootkey_file
877with_rootcert_file
878with_username
879enable_checking
880enable_debug
881enable_flto
882enable_pie
883enable_relro_now
884enable_shared
885enable_static
886with_pic
887enable_fast_install
888with_aix_soname
889with_gnu_ld
890with_sysroot
891enable_libtool_lock
892enable_rpath
893enable_largefile
894enable_systemd
895enable_alloc_checks
896enable_alloc_lite
897enable_alloc_nonregional
898with_pthreads
899with_solaris_threads
900with_syslog_facility
901with_dynlibmodule
902with_pyunbound
903with_pythonmodule
904enable_swig_version_check
905with_nss
906with_nettle
907with_ssl
908with_libbsd
909enable_sha1
910enable_sha2
911enable_subnet
912enable_gost
913enable_ecdsa
914enable_dsa
915with_deprecate_rsa_1024
916enable_ed25519
917enable_ed448
918enable_event_api
919enable_tfo_client
920enable_tfo_server
921with_libevent
922with_libexpat
923with_libhiredis
924with_libnghttp2
925with_libngtcp2
926enable_static_exe
927enable_fully_static
928enable_lock_checks
929enable_allsymbols
930enable_dnstap
931with_dnstap_socket_path
932with_protobuf_c
933enable_dnscrypt
934with_libsodium
935enable_cachedb
936enable_ipsecmod
937enable_ipset
938with_libmnl
939enable_explicit_port_randomisation
940enable_linux_ip_local_port_range
941with_libunbound_only
942'
943      ac_precious_vars='build_alias
944host_alias
945target_alias
946CC
947CFLAGS
948LDFLAGS
949LIBS
950CPPFLAGS
951YACC
952YFLAGS
953LT_SYS_LIBRARY_PATH
954PKG_CONFIG
955PKG_CONFIG_PATH
956PKG_CONFIG_LIBDIR
957CPP
958SYSTEMD_CFLAGS
959SYSTEMD_LIBS
960SYSTEMD_DAEMON_CFLAGS
961SYSTEMD_DAEMON_LIBS
962PYTHON_VERSION
963SOURCE_DATE_EPOCH
964PROTOBUFC_CFLAGS
965PROTOBUFC_LIBS'
966
967
968# Initialize some variables set by options.
969ac_init_help=
970ac_init_version=false
971ac_unrecognized_opts=
972ac_unrecognized_sep=
973# The variables have the same names as the options, with
974# dashes changed to underlines.
975cache_file=/dev/null
976exec_prefix=NONE
977no_create=
978no_recursion=
979prefix=NONE
980program_prefix=NONE
981program_suffix=NONE
982program_transform_name=s,x,x,
983silent=
984site=
985srcdir=
986verbose=
987x_includes=NONE
988x_libraries=NONE
989
990# Installation directory options.
991# These are left unexpanded so users can "make install exec_prefix=/foo"
992# and all the variables that are supposed to be based on exec_prefix
993# by default will actually change.
994# Use braces instead of parens because sh, perl, etc. also accept them.
995# (The list follows the same order as the GNU Coding Standards.)
996bindir='${exec_prefix}/bin'
997sbindir='${exec_prefix}/sbin'
998libexecdir='${exec_prefix}/libexec'
999datarootdir='${prefix}/share'
1000datadir='${datarootdir}'
1001sysconfdir='${prefix}/etc'
1002sharedstatedir='${prefix}/com'
1003localstatedir='${prefix}/var'
1004runstatedir='${localstatedir}/run'
1005includedir='${prefix}/include'
1006oldincludedir='/usr/include'
1007docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1008infodir='${datarootdir}/info'
1009htmldir='${docdir}'
1010dvidir='${docdir}'
1011pdfdir='${docdir}'
1012psdir='${docdir}'
1013libdir='${exec_prefix}/lib'
1014localedir='${datarootdir}/locale'
1015mandir='${datarootdir}/man'
1016
1017ac_prev=
1018ac_dashdash=
1019for ac_option
1020do
1021  # If the previous option needs an argument, assign it.
1022  if test -n "$ac_prev"; then
1023    eval $ac_prev=\$ac_option
1024    ac_prev=
1025    continue
1026  fi
1027
1028  case $ac_option in
1029  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1030  *=)   ac_optarg= ;;
1031  *)    ac_optarg=yes ;;
1032  esac
1033
1034  case $ac_dashdash$ac_option in
1035  --)
1036    ac_dashdash=yes ;;
1037
1038  -bindir | --bindir | --bindi | --bind | --bin | --bi)
1039    ac_prev=bindir ;;
1040  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1041    bindir=$ac_optarg ;;
1042
1043  -build | --build | --buil | --bui | --bu)
1044    ac_prev=build_alias ;;
1045  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1046    build_alias=$ac_optarg ;;
1047
1048  -cache-file | --cache-file | --cache-fil | --cache-fi \
1049  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1050    ac_prev=cache_file ;;
1051  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1052  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1053    cache_file=$ac_optarg ;;
1054
1055  --config-cache | -C)
1056    cache_file=config.cache ;;
1057
1058  -datadir | --datadir | --datadi | --datad)
1059    ac_prev=datadir ;;
1060  -datadir=* | --datadir=* | --datadi=* | --datad=*)
1061    datadir=$ac_optarg ;;
1062
1063  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1064  | --dataroo | --dataro | --datar)
1065    ac_prev=datarootdir ;;
1066  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1067  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1068    datarootdir=$ac_optarg ;;
1069
1070  -disable-* | --disable-*)
1071    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1072    # Reject names that are not valid shell variable names.
1073    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1074      as_fn_error $? "invalid feature name: \`$ac_useropt'"
1075    ac_useropt_orig=$ac_useropt
1076    ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
1077    case $ac_user_opts in
1078      *"
1079"enable_$ac_useropt"
1080"*) ;;
1081      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1082	 ac_unrecognized_sep=', ';;
1083    esac
1084    eval enable_$ac_useropt=no ;;
1085
1086  -docdir | --docdir | --docdi | --doc | --do)
1087    ac_prev=docdir ;;
1088  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1089    docdir=$ac_optarg ;;
1090
1091  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1092    ac_prev=dvidir ;;
1093  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1094    dvidir=$ac_optarg ;;
1095
1096  -enable-* | --enable-*)
1097    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1098    # Reject names that are not valid shell variable names.
1099    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1100      as_fn_error $? "invalid feature name: \`$ac_useropt'"
1101    ac_useropt_orig=$ac_useropt
1102    ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
1103    case $ac_user_opts in
1104      *"
1105"enable_$ac_useropt"
1106"*) ;;
1107      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1108	 ac_unrecognized_sep=', ';;
1109    esac
1110    eval enable_$ac_useropt=\$ac_optarg ;;
1111
1112  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1113  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1114  | --exec | --exe | --ex)
1115    ac_prev=exec_prefix ;;
1116  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1117  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1118  | --exec=* | --exe=* | --ex=*)
1119    exec_prefix=$ac_optarg ;;
1120
1121  -gas | --gas | --ga | --g)
1122    # Obsolete; use --with-gas.
1123    with_gas=yes ;;
1124
1125  -help | --help | --hel | --he | -h)
1126    ac_init_help=long ;;
1127  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1128    ac_init_help=recursive ;;
1129  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1130    ac_init_help=short ;;
1131
1132  -host | --host | --hos | --ho)
1133    ac_prev=host_alias ;;
1134  -host=* | --host=* | --hos=* | --ho=*)
1135    host_alias=$ac_optarg ;;
1136
1137  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1138    ac_prev=htmldir ;;
1139  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1140  | --ht=*)
1141    htmldir=$ac_optarg ;;
1142
1143  -includedir | --includedir | --includedi | --included | --include \
1144  | --includ | --inclu | --incl | --inc)
1145    ac_prev=includedir ;;
1146  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1147  | --includ=* | --inclu=* | --incl=* | --inc=*)
1148    includedir=$ac_optarg ;;
1149
1150  -infodir | --infodir | --infodi | --infod | --info | --inf)
1151    ac_prev=infodir ;;
1152  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1153    infodir=$ac_optarg ;;
1154
1155  -libdir | --libdir | --libdi | --libd)
1156    ac_prev=libdir ;;
1157  -libdir=* | --libdir=* | --libdi=* | --libd=*)
1158    libdir=$ac_optarg ;;
1159
1160  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1161  | --libexe | --libex | --libe)
1162    ac_prev=libexecdir ;;
1163  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1164  | --libexe=* | --libex=* | --libe=*)
1165    libexecdir=$ac_optarg ;;
1166
1167  -localedir | --localedir | --localedi | --localed | --locale)
1168    ac_prev=localedir ;;
1169  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1170    localedir=$ac_optarg ;;
1171
1172  -localstatedir | --localstatedir | --localstatedi | --localstated \
1173  | --localstate | --localstat | --localsta | --localst | --locals)
1174    ac_prev=localstatedir ;;
1175  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1176  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1177    localstatedir=$ac_optarg ;;
1178
1179  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1180    ac_prev=mandir ;;
1181  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1182    mandir=$ac_optarg ;;
1183
1184  -nfp | --nfp | --nf)
1185    # Obsolete; use --without-fp.
1186    with_fp=no ;;
1187
1188  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1189  | --no-cr | --no-c | -n)
1190    no_create=yes ;;
1191
1192  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1193  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1194    no_recursion=yes ;;
1195
1196  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1197  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1198  | --oldin | --oldi | --old | --ol | --o)
1199    ac_prev=oldincludedir ;;
1200  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1201  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1202  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1203    oldincludedir=$ac_optarg ;;
1204
1205  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1206    ac_prev=prefix ;;
1207  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1208    prefix=$ac_optarg ;;
1209
1210  -program-prefix | --program-prefix | --program-prefi | --program-pref \
1211  | --program-pre | --program-pr | --program-p)
1212    ac_prev=program_prefix ;;
1213  -program-prefix=* | --program-prefix=* | --program-prefi=* \
1214  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1215    program_prefix=$ac_optarg ;;
1216
1217  -program-suffix | --program-suffix | --program-suffi | --program-suff \
1218  | --program-suf | --program-su | --program-s)
1219    ac_prev=program_suffix ;;
1220  -program-suffix=* | --program-suffix=* | --program-suffi=* \
1221  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1222    program_suffix=$ac_optarg ;;
1223
1224  -program-transform-name | --program-transform-name \
1225  | --program-transform-nam | --program-transform-na \
1226  | --program-transform-n | --program-transform- \
1227  | --program-transform | --program-transfor \
1228  | --program-transfo | --program-transf \
1229  | --program-trans | --program-tran \
1230  | --progr-tra | --program-tr | --program-t)
1231    ac_prev=program_transform_name ;;
1232  -program-transform-name=* | --program-transform-name=* \
1233  | --program-transform-nam=* | --program-transform-na=* \
1234  | --program-transform-n=* | --program-transform-=* \
1235  | --program-transform=* | --program-transfor=* \
1236  | --program-transfo=* | --program-transf=* \
1237  | --program-trans=* | --program-tran=* \
1238  | --progr-tra=* | --program-tr=* | --program-t=*)
1239    program_transform_name=$ac_optarg ;;
1240
1241  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1242    ac_prev=pdfdir ;;
1243  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1244    pdfdir=$ac_optarg ;;
1245
1246  -psdir | --psdir | --psdi | --psd | --ps)
1247    ac_prev=psdir ;;
1248  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1249    psdir=$ac_optarg ;;
1250
1251  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1252  | -silent | --silent | --silen | --sile | --sil)
1253    silent=yes ;;
1254
1255  -runstatedir | --runstatedir | --runstatedi | --runstated \
1256  | --runstate | --runstat | --runsta | --runst | --runs \
1257  | --run | --ru | --r)
1258    ac_prev=runstatedir ;;
1259  -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
1260  | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
1261  | --run=* | --ru=* | --r=*)
1262    runstatedir=$ac_optarg ;;
1263
1264  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1265    ac_prev=sbindir ;;
1266  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1267  | --sbi=* | --sb=*)
1268    sbindir=$ac_optarg ;;
1269
1270  -sharedstatedir | --sharedstatedir | --sharedstatedi \
1271  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1272  | --sharedst | --shareds | --shared | --share | --shar \
1273  | --sha | --sh)
1274    ac_prev=sharedstatedir ;;
1275  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1276  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1277  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1278  | --sha=* | --sh=*)
1279    sharedstatedir=$ac_optarg ;;
1280
1281  -site | --site | --sit)
1282    ac_prev=site ;;
1283  -site=* | --site=* | --sit=*)
1284    site=$ac_optarg ;;
1285
1286  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1287    ac_prev=srcdir ;;
1288  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1289    srcdir=$ac_optarg ;;
1290
1291  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1292  | --syscon | --sysco | --sysc | --sys | --sy)
1293    ac_prev=sysconfdir ;;
1294  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1295  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1296    sysconfdir=$ac_optarg ;;
1297
1298  -target | --target | --targe | --targ | --tar | --ta | --t)
1299    ac_prev=target_alias ;;
1300  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1301    target_alias=$ac_optarg ;;
1302
1303  -v | -verbose | --verbose | --verbos | --verbo | --verb)
1304    verbose=yes ;;
1305
1306  -version | --version | --versio | --versi | --vers | -V)
1307    ac_init_version=: ;;
1308
1309  -with-* | --with-*)
1310    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1311    # Reject names that are not valid shell variable names.
1312    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1313      as_fn_error $? "invalid package name: \`$ac_useropt'"
1314    ac_useropt_orig=$ac_useropt
1315    ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
1316    case $ac_user_opts in
1317      *"
1318"with_$ac_useropt"
1319"*) ;;
1320      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1321	 ac_unrecognized_sep=', ';;
1322    esac
1323    eval with_$ac_useropt=\$ac_optarg ;;
1324
1325  -without-* | --without-*)
1326    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1327    # Reject names that are not valid shell variable names.
1328    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1329      as_fn_error $? "invalid package name: \`$ac_useropt'"
1330    ac_useropt_orig=$ac_useropt
1331    ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
1332    case $ac_user_opts in
1333      *"
1334"with_$ac_useropt"
1335"*) ;;
1336      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1337	 ac_unrecognized_sep=', ';;
1338    esac
1339    eval with_$ac_useropt=no ;;
1340
1341  --x)
1342    # Obsolete; use --with-x.
1343    with_x=yes ;;
1344
1345  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1346  | --x-incl | --x-inc | --x-in | --x-i)
1347    ac_prev=x_includes ;;
1348  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1349  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1350    x_includes=$ac_optarg ;;
1351
1352  -x-libraries | --x-libraries | --x-librarie | --x-librari \
1353  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1354    ac_prev=x_libraries ;;
1355  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1356  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1357    x_libraries=$ac_optarg ;;
1358
1359  -*) as_fn_error $? "unrecognized option: \`$ac_option'
1360Try \`$0 --help' for more information"
1361    ;;
1362
1363  *=*)
1364    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1365    # Reject names that are not valid shell variable names.
1366    case $ac_envvar in #(
1367      '' | [0-9]* | *[!_$as_cr_alnum]* )
1368      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1369    esac
1370    eval $ac_envvar=\$ac_optarg
1371    export $ac_envvar ;;
1372
1373  *)
1374    # FIXME: should be removed in autoconf 3.0.
1375    printf "%s\n" "$as_me: WARNING: you should use --build, --host, --target" >&2
1376    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1377      printf "%s\n" "$as_me: WARNING: invalid host type: $ac_option" >&2
1378    : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1379    ;;
1380
1381  esac
1382done
1383
1384if test -n "$ac_prev"; then
1385  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1386  as_fn_error $? "missing argument to $ac_option"
1387fi
1388
1389if test -n "$ac_unrecognized_opts"; then
1390  case $enable_option_checking in
1391    no) ;;
1392    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1393    *)     printf "%s\n" "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1394  esac
1395fi
1396
1397# Check all directory arguments for consistency.
1398for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
1399		datadir sysconfdir sharedstatedir localstatedir includedir \
1400		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1401		libdir localedir mandir runstatedir
1402do
1403  eval ac_val=\$$ac_var
1404  # Remove trailing slashes.
1405  case $ac_val in
1406    */ )
1407      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1408      eval $ac_var=\$ac_val;;
1409  esac
1410  # Be sure to have absolute directory names.
1411  case $ac_val in
1412    [\\/$]* | ?:[\\/]* )  continue;;
1413    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1414  esac
1415  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1416done
1417
1418# There might be people who depend on the old broken behavior: `$host'
1419# used to hold the argument of --host etc.
1420# FIXME: To remove some day.
1421build=$build_alias
1422host=$host_alias
1423target=$target_alias
1424
1425# FIXME: To remove some day.
1426if test "x$host_alias" != x; then
1427  if test "x$build_alias" = x; then
1428    cross_compiling=maybe
1429  elif test "x$build_alias" != "x$host_alias"; then
1430    cross_compiling=yes
1431  fi
1432fi
1433
1434ac_tool_prefix=
1435test -n "$host_alias" && ac_tool_prefix=$host_alias-
1436
1437test "$silent" = yes && exec 6>/dev/null
1438
1439
1440ac_pwd=`pwd` && test -n "$ac_pwd" &&
1441ac_ls_di=`ls -di .` &&
1442ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1443  as_fn_error $? "working directory cannot be determined"
1444test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1445  as_fn_error $? "pwd does not report name of working directory"
1446
1447
1448# Find the source files, if location was not specified.
1449if test -z "$srcdir"; then
1450  ac_srcdir_defaulted=yes
1451  # Try the directory containing this script, then the parent directory.
1452  ac_confdir=`$as_dirname -- "$as_myself" ||
1453$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1454	 X"$as_myself" : 'X\(//\)[^/]' \| \
1455	 X"$as_myself" : 'X\(//\)$' \| \
1456	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1457printf "%s\n" X"$as_myself" |
1458    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1459	    s//\1/
1460	    q
1461	  }
1462	  /^X\(\/\/\)[^/].*/{
1463	    s//\1/
1464	    q
1465	  }
1466	  /^X\(\/\/\)$/{
1467	    s//\1/
1468	    q
1469	  }
1470	  /^X\(\/\).*/{
1471	    s//\1/
1472	    q
1473	  }
1474	  s/.*/./; q'`
1475  srcdir=$ac_confdir
1476  if test ! -r "$srcdir/$ac_unique_file"; then
1477    srcdir=..
1478  fi
1479else
1480  ac_srcdir_defaulted=no
1481fi
1482if test ! -r "$srcdir/$ac_unique_file"; then
1483  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1484  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1485fi
1486ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1487ac_abs_confdir=`(
1488	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1489	pwd)`
1490# When building in place, set srcdir=.
1491if test "$ac_abs_confdir" = "$ac_pwd"; then
1492  srcdir=.
1493fi
1494# Remove unnecessary trailing slashes from srcdir.
1495# Double slashes in file names in object file debugging info
1496# mess up M-x gdb in Emacs.
1497case $srcdir in
1498*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1499esac
1500for ac_var in $ac_precious_vars; do
1501  eval ac_env_${ac_var}_set=\${${ac_var}+set}
1502  eval ac_env_${ac_var}_value=\$${ac_var}
1503  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1504  eval ac_cv_env_${ac_var}_value=\$${ac_var}
1505done
1506
1507#
1508# Report the --help message.
1509#
1510if test "$ac_init_help" = "long"; then
1511  # Omit some internal or obsolete options to make the list less imposing.
1512  # This message is too long to be a string in the A/UX 3.1 sh.
1513  cat <<_ACEOF
1514\`configure' configures unbound 1.23.0 to adapt to many kinds of systems.
1515
1516Usage: $0 [OPTION]... [VAR=VALUE]...
1517
1518To assign environment variables (e.g., CC, CFLAGS...), specify them as
1519VAR=VALUE.  See below for descriptions of some of the useful variables.
1520
1521Defaults for the options are specified in brackets.
1522
1523Configuration:
1524  -h, --help              display this help and exit
1525      --help=short        display options specific to this package
1526      --help=recursive    display the short help of all the included packages
1527  -V, --version           display version information and exit
1528  -q, --quiet, --silent   do not print \`checking ...' messages
1529      --cache-file=FILE   cache test results in FILE [disabled]
1530  -C, --config-cache      alias for \`--cache-file=config.cache'
1531  -n, --no-create         do not create output files
1532      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1533
1534Installation directories:
1535  --prefix=PREFIX         install architecture-independent files in PREFIX
1536                          [$ac_default_prefix]
1537  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1538                          [PREFIX]
1539
1540By default, \`make install' will install all the files in
1541\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1542an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1543for instance \`--prefix=\$HOME'.
1544
1545For better control, use the options below.
1546
1547Fine tuning of the installation directories:
1548  --bindir=DIR            user executables [EPREFIX/bin]
1549  --sbindir=DIR           system admin executables [EPREFIX/sbin]
1550  --libexecdir=DIR        program executables [EPREFIX/libexec]
1551  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1552  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1553  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1554  --runstatedir=DIR       modifiable per-process data [LOCALSTATEDIR/run]
1555  --libdir=DIR            object code libraries [EPREFIX/lib]
1556  --includedir=DIR        C header files [PREFIX/include]
1557  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1558  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1559  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1560  --infodir=DIR           info documentation [DATAROOTDIR/info]
1561  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1562  --mandir=DIR            man documentation [DATAROOTDIR/man]
1563  --docdir=DIR            documentation root [DATAROOTDIR/doc/unbound]
1564  --htmldir=DIR           html documentation [DOCDIR]
1565  --dvidir=DIR            dvi documentation [DOCDIR]
1566  --pdfdir=DIR            pdf documentation [DOCDIR]
1567  --psdir=DIR             ps documentation [DOCDIR]
1568_ACEOF
1569
1570  cat <<\_ACEOF
1571
1572System types:
1573  --build=BUILD     configure for building on BUILD [guessed]
1574  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1575_ACEOF
1576fi
1577
1578if test -n "$ac_init_help"; then
1579  case $ac_init_help in
1580     short | recursive ) echo "Configuration of unbound 1.23.0:";;
1581   esac
1582  cat <<\_ACEOF
1583
1584Optional Features:
1585  --disable-option-checking  ignore unrecognized --enable/--with options
1586  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1587  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1588  --enable-checking       Enable warnings, asserts, makefile-dependencies
1589  --enable-debug          same as enable-checking
1590  --disable-flto          Disable link-time optimization (gcc specific option)
1591  --enable-pie            Enable Position-Independent Executable (eg. to fully
1592                          benefit from ASLR, small performance penalty)
1593  --enable-relro-now      Enable full relocation binding at load-time (RELRO
1594                          NOW, to protect GOT and .dtor areas)
1595  --enable-shared[=PKGS]  build shared libraries [default=yes]
1596  --enable-static[=PKGS]  build static libraries [default=yes]
1597  --enable-fast-install[=PKGS]
1598                          optimize for fast installation [default=yes]
1599  --disable-libtool-lock  avoid locking (might break parallel builds)
1600  --disable-rpath         disable hardcoded rpath (default=enabled)
1601  --disable-largefile     omit support for large files
1602  --enable-systemd        compile with systemd support (requires libsystemd,
1603                          pkg-config)
1604  --enable-alloc-checks   enable to memory allocation statistics, for debug
1605                          purposes
1606  --enable-alloc-lite     enable for lightweight alloc assertions, for debug
1607                          purposes
1608  --enable-alloc-nonregional
1609                          enable nonregional allocs, slow but exposes regional
1610                          allocations to other memory purifiers, for debug
1611                          purposes
1612  --disable-swig-version-check
1613                          Disable swig version check to build python modules
1614                          with older swig even though that is unreliable
1615  --disable-sha1          Disable SHA1 RRSIG support, does not disable nsec3
1616                          support
1617  --disable-sha2          Disable SHA256 and SHA512 RRSIG support
1618  --enable-subnet         Enable client subnet
1619  --disable-gost          Disable GOST support
1620  --disable-ecdsa         Disable ECDSA support
1621  --disable-dsa           Disable DSA support
1622  --disable-ed25519       Disable ED25519 support
1623  --disable-ed448         Disable ED448 support
1624  --enable-event-api      Enable (experimental) pluggable event base
1625                          libunbound API installed to unbound-event.h
1626  --enable-tfo-client     Enable TCP Fast Open for client mode
1627  --enable-tfo-server     Enable TCP Fast Open for server mode
1628  --enable-static-exe     enable to compile executables statically against
1629                          (event) uninstalled libs, for debug purposes
1630  --enable-fully-static   enable to compile fully static
1631  --enable-lock-checks    enable to check lock and unlock calls, for debug
1632                          purposes
1633  --enable-allsymbols     export all symbols from libunbound and link binaries
1634                          to it, smaller install size but libunbound export
1635                          table is polluted by internal symbols
1636  --enable-dnstap         Enable dnstap support (requires protobuf-c)
1637  --enable-dnscrypt       Enable dnscrypt support (requires libsodium)
1638  --enable-cachedb        enable cachedb module that can use external cache
1639                          storage
1640  --enable-ipsecmod       Enable ipsecmod module that facilitates
1641                          opportunistic IPsec
1642  --enable-ipset          enable ipset module
1643  --disable-explicit-port-randomisation
1644                          disable explicit source port randomisation and rely
1645                          on the kernel to provide random source ports
1646  --enable-linux-ip-local-port-range
1647                          Define this to enable use of
1648                          /proc/sys/net/ipv4/ip_local_port_range as a default
1649                          outgoing port range. This is only for the libunbound
1650                          on Linux and does not affect unbound resolving
1651                          daemon itself. This may severely limit the number of
1652                          available outgoing ports and thus decrease
1653                          randomness. Define this only when the target system
1654                          restricts (e.g. some of SELinux enabled
1655                          distributions) the use of non-ephemeral ports.
1656
1657Optional Packages:
1658  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1659  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1660  --with-conf-file=path   Pathname to the Unbound configuration file
1661  --with-run-dir=path     set default directory to chdir to (by default dir
1662                          part of cfg file)
1663  --with-chroot-dir=path  set default directory to chroot to (by default same
1664                          as run-dir)
1665  --with-share-dir=path   set default directory with shared data (by default
1666                          same as share/unbound)
1667  --with-pidfile=filename set default pathname to unbound pidfile (default
1668                          run-dir/unbound.pid)
1669  --with-rootkey-file=filename
1670                          set default pathname to root key file (default
1671                          run-dir/root.key). This file is read and written.
1672  --with-rootcert-file=filename
1673                          set default pathname to root update certificate file
1674                          (default run-dir/icannbundle.pem). This file need
1675                          not exist if you are content with the builtin.
1676  --with-username=user    set default user that unbound changes to (default
1677                          user is unbound)
1678  --with-pic[=PKGS]       try to use only PIC/non-PIC objects [default=use
1679                          both]
1680  --with-aix-soname=aix|svr4|both
1681                          shared library versioning (aka "SONAME") variant to
1682                          provide on AIX, [default=aix].
1683  --with-gnu-ld           assume the C compiler uses GNU ld [default=no]
1684  --with-sysroot[=DIR]    Search for dependent libraries within DIR (or the
1685                          compiler's sysroot if not specified).
1686  --with-pthreads         use pthreads library, or --without-pthreads to
1687                          disable threading support.
1688  --with-solaris-threads  use solaris native thread library.
1689  --with-syslog-facility=LOCAL0 - LOCAL7
1690                          set SYSLOG_FACILITY, default DAEMON
1691  --with-dynlibmodule     build dynamic library module, or
1692                          --without-dynlibmodule to disable it. (default=no)
1693  --with-pyunbound        build PyUnbound, or --without-pyunbound to skip it.
1694                          (default=no)
1695  --with-pythonmodule     build Python module, or --without-pythonmodule to
1696                          disable script engine. (default=no)
1697  --with-nss=path         use libnss instead of openssl, installed at path.
1698  --with-nettle=path      use libnettle as crypto library, installed at path.
1699  --with-ssl=pathname     enable SSL (will check /usr/local/ssl /usr/lib/ssl
1700                          /usr/ssl /usr/pkg /usr/local /opt/local /usr/sfw
1701                          /usr or specify like /usr/include/openssl11)
1702  --with-libbsd           Use portable libbsd functions
1703  --with-deprecate-rsa-1024
1704                          Deprecate RSA 1024 bit length, makes that an
1705                          unsupported key, for use when OpenSSL FIPS refuses
1706                          1024 bit verification
1707  --with-libevent=pathname
1708                          use libevent (will check /usr/local /opt/local
1709                          /usr/lib /usr/pkg /usr/sfw /usr or you can specify
1710                          an explicit path). Slower, but allows use of large
1711                          outgoing port ranges.
1712  --with-libexpat=path    specify explicit path for libexpat.
1713  --with-libhiredis=path  specify explicit path for libhiredis.
1714  --with-libnghttp2=path  specify explicit path for libnghttp2.
1715  --with-libngtcp2=path   specify explicit path for libngtcp2, for QUIC.
1716  --with-dnstap-socket-path=pathname
1717                          set default dnstap socket path
1718  --with-protobuf-c=path  Path where protobuf-c is installed, for dnstap
1719  --with-libsodium=path   Path where libsodium is installed, for dnscrypt
1720  --with-libmnl=path      specify explicit path for libmnl.
1721  --with-libunbound-only  do not build daemon and tool programs
1722
1723Some influential environment variables:
1724  CC          C compiler command
1725  CFLAGS      C compiler flags
1726  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
1727              nonstandard directory <lib dir>
1728  LIBS        libraries to pass to the linker, e.g. -l<library>
1729  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1730              you have headers in a nonstandard directory <include dir>
1731  YACC        The `Yet Another Compiler Compiler' implementation to use.
1732              Defaults to the first program found out of: `bison -y', `byacc',
1733              `yacc'.
1734  YFLAGS      The list of arguments that will be passed by default to $YACC.
1735              This script will default YFLAGS to the empty string to avoid a
1736              default value of `-d' given by some make applications.
1737  LT_SYS_LIBRARY_PATH
1738              User-defined run-time library search path.
1739  PKG_CONFIG  path to pkg-config utility
1740  PKG_CONFIG_PATH
1741              directories to add to pkg-config's search path
1742  PKG_CONFIG_LIBDIR
1743              path overriding pkg-config's built-in search path
1744  CPP         C preprocessor
1745  SYSTEMD_CFLAGS
1746              C compiler flags for SYSTEMD, overriding pkg-config
1747  SYSTEMD_LIBS
1748              linker flags for SYSTEMD, overriding pkg-config
1749  SYSTEMD_DAEMON_CFLAGS
1750              C compiler flags for SYSTEMD_DAEMON, overriding pkg-config
1751  SYSTEMD_DAEMON_LIBS
1752              linker flags for SYSTEMD_DAEMON, overriding pkg-config
1753  PYTHON_VERSION
1754              The installed Python version to use, for example '2.3'. This
1755              string will be appended to the Python interpreter canonical
1756              name.
1757  SOURCE_DATE_EPOCH
1758              If it is set, it uses the value of that variable instead of the
1759              current time as the build timestamp. The format is a unix
1760              timestamp. This enables reproducible build output.
1761  PROTOBUFC_CFLAGS
1762              C compiler flags for PROTOBUFC, overriding pkg-config
1763  PROTOBUFC_LIBS
1764              linker flags for PROTOBUFC, overriding pkg-config
1765
1766Use these variables to override the choices made by `configure' or to help
1767it to find libraries and programs with nonstandard names/locations.
1768
1769Report bugs to <unbound-bugs@nlnetlabs.nl or https://github.com/NLnetLabs/unbound/issues>.
1770_ACEOF
1771ac_status=$?
1772fi
1773
1774if test "$ac_init_help" = "recursive"; then
1775  # If there are subdirs, report their specific --help.
1776  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1777    test -d "$ac_dir" ||
1778      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1779      continue
1780    ac_builddir=.
1781
1782case "$ac_dir" in
1783.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1784*)
1785  ac_dir_suffix=/`printf "%s\n" "$ac_dir" | sed 's|^\.[\\/]||'`
1786  # A ".." for each directory in $ac_dir_suffix.
1787  ac_top_builddir_sub=`printf "%s\n" "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1788  case $ac_top_builddir_sub in
1789  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1790  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1791  esac ;;
1792esac
1793ac_abs_top_builddir=$ac_pwd
1794ac_abs_builddir=$ac_pwd$ac_dir_suffix
1795# for backward compatibility:
1796ac_top_builddir=$ac_top_build_prefix
1797
1798case $srcdir in
1799  .)  # We are building in place.
1800    ac_srcdir=.
1801    ac_top_srcdir=$ac_top_builddir_sub
1802    ac_abs_top_srcdir=$ac_pwd ;;
1803  [\\/]* | ?:[\\/]* )  # Absolute name.
1804    ac_srcdir=$srcdir$ac_dir_suffix;
1805    ac_top_srcdir=$srcdir
1806    ac_abs_top_srcdir=$srcdir ;;
1807  *) # Relative name.
1808    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1809    ac_top_srcdir=$ac_top_build_prefix$srcdir
1810    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1811esac
1812ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1813
1814    cd "$ac_dir" || { ac_status=$?; continue; }
1815    # Check for configure.gnu first; this name is used for a wrapper for
1816    # Metaconfig's "Configure" on case-insensitive file systems.
1817    if test -f "$ac_srcdir/configure.gnu"; then
1818      echo &&
1819      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1820    elif test -f "$ac_srcdir/configure"; then
1821      echo &&
1822      $SHELL "$ac_srcdir/configure" --help=recursive
1823    else
1824      printf "%s\n" "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1825    fi || ac_status=$?
1826    cd "$ac_pwd" || { ac_status=$?; break; }
1827  done
1828fi
1829
1830test -n "$ac_init_help" && exit $ac_status
1831if $ac_init_version; then
1832  cat <<\_ACEOF
1833unbound configure 1.23.0
1834generated by GNU Autoconf 2.71
1835
1836Copyright (C) 2021 Free Software Foundation, Inc.
1837This configure script is free software; the Free Software Foundation
1838gives unlimited permission to copy, distribute and modify it.
1839_ACEOF
1840  exit
1841fi
1842
1843## ------------------------ ##
1844## Autoconf initialization. ##
1845## ------------------------ ##
1846
1847# ac_fn_c_try_compile LINENO
1848# --------------------------
1849# Try to compile conftest.$ac_ext, and return whether this succeeded.
1850ac_fn_c_try_compile ()
1851{
1852  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1853  rm -f conftest.$ac_objext conftest.beam
1854  if { { ac_try="$ac_compile"
1855case "(($ac_try" in
1856  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1857  *) ac_try_echo=$ac_try;;
1858esac
1859eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1860printf "%s\n" "$ac_try_echo"; } >&5
1861  (eval "$ac_compile") 2>conftest.err
1862  ac_status=$?
1863  if test -s conftest.err; then
1864    grep -v '^ *+' conftest.err >conftest.er1
1865    cat conftest.er1 >&5
1866    mv -f conftest.er1 conftest.err
1867  fi
1868  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1869  test $ac_status = 0; } && {
1870	 test -z "$ac_c_werror_flag" ||
1871	 test ! -s conftest.err
1872       } && test -s conftest.$ac_objext
1873then :
1874  ac_retval=0
1875else $as_nop
1876  printf "%s\n" "$as_me: failed program was:" >&5
1877sed 's/^/| /' conftest.$ac_ext >&5
1878
1879	ac_retval=1
1880fi
1881  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1882  as_fn_set_status $ac_retval
1883
1884} # ac_fn_c_try_compile
1885
1886# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1887# -------------------------------------------------------
1888# Tests whether HEADER exists and can be compiled using the include files in
1889# INCLUDES, setting the cache variable VAR accordingly.
1890ac_fn_c_check_header_compile ()
1891{
1892  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1893  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1894printf %s "checking for $2... " >&6; }
1895if eval test \${$3+y}
1896then :
1897  printf %s "(cached) " >&6
1898else $as_nop
1899  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1900/* end confdefs.h.  */
1901$4
1902#include <$2>
1903_ACEOF
1904if ac_fn_c_try_compile "$LINENO"
1905then :
1906  eval "$3=yes"
1907else $as_nop
1908  eval "$3=no"
1909fi
1910rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
1911fi
1912eval ac_res=\$$3
1913	       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1914printf "%s\n" "$ac_res" >&6; }
1915  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1916
1917} # ac_fn_c_check_header_compile
1918
1919# ac_fn_c_try_link LINENO
1920# -----------------------
1921# Try to link conftest.$ac_ext, and return whether this succeeded.
1922ac_fn_c_try_link ()
1923{
1924  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1925  rm -f conftest.$ac_objext conftest.beam conftest$ac_exeext
1926  if { { ac_try="$ac_link"
1927case "(($ac_try" in
1928  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1929  *) ac_try_echo=$ac_try;;
1930esac
1931eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1932printf "%s\n" "$ac_try_echo"; } >&5
1933  (eval "$ac_link") 2>conftest.err
1934  ac_status=$?
1935  if test -s conftest.err; then
1936    grep -v '^ *+' conftest.err >conftest.er1
1937    cat conftest.er1 >&5
1938    mv -f conftest.er1 conftest.err
1939  fi
1940  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1941  test $ac_status = 0; } && {
1942	 test -z "$ac_c_werror_flag" ||
1943	 test ! -s conftest.err
1944       } && test -s conftest$ac_exeext && {
1945	 test "$cross_compiling" = yes ||
1946	 test -x conftest$ac_exeext
1947       }
1948then :
1949  ac_retval=0
1950else $as_nop
1951  printf "%s\n" "$as_me: failed program was:" >&5
1952sed 's/^/| /' conftest.$ac_ext >&5
1953
1954	ac_retval=1
1955fi
1956  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1957  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1958  # interfere with the next link command; also delete a directory that is
1959  # left behind by Apple's compiler.  We do this before executing the actions.
1960  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1961  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1962  as_fn_set_status $ac_retval
1963
1964} # ac_fn_c_try_link
1965
1966# ac_fn_c_check_func LINENO FUNC VAR
1967# ----------------------------------
1968# Tests whether FUNC exists, setting the cache variable VAR accordingly
1969ac_fn_c_check_func ()
1970{
1971  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1972  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1973printf %s "checking for $2... " >&6; }
1974if eval test \${$3+y}
1975then :
1976  printf %s "(cached) " >&6
1977else $as_nop
1978  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1979/* end confdefs.h.  */
1980/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
1981   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
1982#define $2 innocuous_$2
1983
1984/* System header to define __stub macros and hopefully few prototypes,
1985   which can conflict with char $2 (); below.  */
1986
1987#include <limits.h>
1988#undef $2
1989
1990/* Override any GCC internal prototype to avoid an error.
1991   Use char because int might match the return type of a GCC
1992   builtin and then its argument prototype would still apply.  */
1993#ifdef __cplusplus
1994extern "C"
1995#endif
1996char $2 ();
1997/* The GNU C library defines this for functions which it implements
1998    to always fail with ENOSYS.  Some functions are actually named
1999    something starting with __ and the normal name is an alias.  */
2000#if defined __stub_$2 || defined __stub___$2
2001choke me
2002#endif
2003
2004int
2005main (void)
2006{
2007return $2 ();
2008  ;
2009  return 0;
2010}
2011_ACEOF
2012if ac_fn_c_try_link "$LINENO"
2013then :
2014  eval "$3=yes"
2015else $as_nop
2016  eval "$3=no"
2017fi
2018rm -f core conftest.err conftest.$ac_objext conftest.beam \
2019    conftest$ac_exeext conftest.$ac_ext
2020fi
2021eval ac_res=\$$3
2022	       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2023printf "%s\n" "$ac_res" >&6; }
2024  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2025
2026} # ac_fn_c_check_func
2027
2028# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2029# -------------------------------------------
2030# Tests whether TYPE exists after having included INCLUDES, setting cache
2031# variable VAR accordingly.
2032ac_fn_c_check_type ()
2033{
2034  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2035  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2036printf %s "checking for $2... " >&6; }
2037if eval test \${$3+y}
2038then :
2039  printf %s "(cached) " >&6
2040else $as_nop
2041  eval "$3=no"
2042  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2043/* end confdefs.h.  */
2044$4
2045int
2046main (void)
2047{
2048if (sizeof ($2))
2049	 return 0;
2050  ;
2051  return 0;
2052}
2053_ACEOF
2054if ac_fn_c_try_compile "$LINENO"
2055then :
2056  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2057/* end confdefs.h.  */
2058$4
2059int
2060main (void)
2061{
2062if (sizeof (($2)))
2063	    return 0;
2064  ;
2065  return 0;
2066}
2067_ACEOF
2068if ac_fn_c_try_compile "$LINENO"
2069then :
2070
2071else $as_nop
2072  eval "$3=yes"
2073fi
2074rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
2075fi
2076rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
2077fi
2078eval ac_res=\$$3
2079	       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2080printf "%s\n" "$ac_res" >&6; }
2081  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2082
2083} # ac_fn_c_check_type
2084
2085# ac_fn_c_try_cpp LINENO
2086# ----------------------
2087# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2088ac_fn_c_try_cpp ()
2089{
2090  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2091  if { { ac_try="$ac_cpp conftest.$ac_ext"
2092case "(($ac_try" in
2093  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2094  *) ac_try_echo=$ac_try;;
2095esac
2096eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2097printf "%s\n" "$ac_try_echo"; } >&5
2098  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2099  ac_status=$?
2100  if test -s conftest.err; then
2101    grep -v '^ *+' conftest.err >conftest.er1
2102    cat conftest.er1 >&5
2103    mv -f conftest.er1 conftest.err
2104  fi
2105  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2106  test $ac_status = 0; } > conftest.i && {
2107	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2108	 test ! -s conftest.err
2109       }
2110then :
2111  ac_retval=0
2112else $as_nop
2113  printf "%s\n" "$as_me: failed program was:" >&5
2114sed 's/^/| /' conftest.$ac_ext >&5
2115
2116    ac_retval=1
2117fi
2118  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2119  as_fn_set_status $ac_retval
2120
2121} # ac_fn_c_try_cpp
2122
2123# ac_fn_c_try_run LINENO
2124# ----------------------
2125# Try to run conftest.$ac_ext, and return whether this succeeded. Assumes that
2126# executables *can* be run.
2127ac_fn_c_try_run ()
2128{
2129  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2130  if { { ac_try="$ac_link"
2131case "(($ac_try" in
2132  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2133  *) ac_try_echo=$ac_try;;
2134esac
2135eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2136printf "%s\n" "$ac_try_echo"; } >&5
2137  (eval "$ac_link") 2>&5
2138  ac_status=$?
2139  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2140  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2141  { { case "(($ac_try" in
2142  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2143  *) ac_try_echo=$ac_try;;
2144esac
2145eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2146printf "%s\n" "$ac_try_echo"; } >&5
2147  (eval "$ac_try") 2>&5
2148  ac_status=$?
2149  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2150  test $ac_status = 0; }; }
2151then :
2152  ac_retval=0
2153else $as_nop
2154  printf "%s\n" "$as_me: program exited with status $ac_status" >&5
2155       printf "%s\n" "$as_me: failed program was:" >&5
2156sed 's/^/| /' conftest.$ac_ext >&5
2157
2158       ac_retval=$ac_status
2159fi
2160  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2161  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2162  as_fn_set_status $ac_retval
2163
2164} # ac_fn_c_try_run
2165
2166# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2167# --------------------------------------------
2168# Tries to find the compile-time value of EXPR in a program that includes
2169# INCLUDES, setting VAR accordingly. Returns whether the value could be
2170# computed
2171ac_fn_c_compute_int ()
2172{
2173  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2174  if test "$cross_compiling" = yes; then
2175    # Depending upon the size, compute the lo and hi bounds.
2176cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2177/* end confdefs.h.  */
2178$4
2179int
2180main (void)
2181{
2182static int test_array [1 - 2 * !(($2) >= 0)];
2183test_array [0] = 0;
2184return test_array [0];
2185
2186  ;
2187  return 0;
2188}
2189_ACEOF
2190if ac_fn_c_try_compile "$LINENO"
2191then :
2192  ac_lo=0 ac_mid=0
2193  while :; do
2194    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2195/* end confdefs.h.  */
2196$4
2197int
2198main (void)
2199{
2200static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2201test_array [0] = 0;
2202return test_array [0];
2203
2204  ;
2205  return 0;
2206}
2207_ACEOF
2208if ac_fn_c_try_compile "$LINENO"
2209then :
2210  ac_hi=$ac_mid; break
2211else $as_nop
2212  as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2213			if test $ac_lo -le $ac_mid; then
2214			  ac_lo= ac_hi=
2215			  break
2216			fi
2217			as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2218fi
2219rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
2220  done
2221else $as_nop
2222  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2223/* end confdefs.h.  */
2224$4
2225int
2226main (void)
2227{
2228static int test_array [1 - 2 * !(($2) < 0)];
2229test_array [0] = 0;
2230return test_array [0];
2231
2232  ;
2233  return 0;
2234}
2235_ACEOF
2236if ac_fn_c_try_compile "$LINENO"
2237then :
2238  ac_hi=-1 ac_mid=-1
2239  while :; do
2240    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2241/* end confdefs.h.  */
2242$4
2243int
2244main (void)
2245{
2246static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2247test_array [0] = 0;
2248return test_array [0];
2249
2250  ;
2251  return 0;
2252}
2253_ACEOF
2254if ac_fn_c_try_compile "$LINENO"
2255then :
2256  ac_lo=$ac_mid; break
2257else $as_nop
2258  as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2259			if test $ac_mid -le $ac_hi; then
2260			  ac_lo= ac_hi=
2261			  break
2262			fi
2263			as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2264fi
2265rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
2266  done
2267else $as_nop
2268  ac_lo= ac_hi=
2269fi
2270rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
2271fi
2272rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
2273# Binary search between lo and hi bounds.
2274while test "x$ac_lo" != "x$ac_hi"; do
2275  as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2276  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2277/* end confdefs.h.  */
2278$4
2279int
2280main (void)
2281{
2282static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2283test_array [0] = 0;
2284return test_array [0];
2285
2286  ;
2287  return 0;
2288}
2289_ACEOF
2290if ac_fn_c_try_compile "$LINENO"
2291then :
2292  ac_hi=$ac_mid
2293else $as_nop
2294  as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2295fi
2296rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
2297done
2298case $ac_lo in #((
2299?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2300'') ac_retval=1 ;;
2301esac
2302  else
2303    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2304/* end confdefs.h.  */
2305$4
2306static long int longval (void) { return $2; }
2307static unsigned long int ulongval (void) { return $2; }
2308#include <stdio.h>
2309#include <stdlib.h>
2310int
2311main (void)
2312{
2313
2314  FILE *f = fopen ("conftest.val", "w");
2315  if (! f)
2316    return 1;
2317  if (($2) < 0)
2318    {
2319      long int i = longval ();
2320      if (i != ($2))
2321	return 1;
2322      fprintf (f, "%ld", i);
2323    }
2324  else
2325    {
2326      unsigned long int i = ulongval ();
2327      if (i != ($2))
2328	return 1;
2329      fprintf (f, "%lu", i);
2330    }
2331  /* Do not output a trailing newline, as this causes \r\n confusion
2332     on some platforms.  */
2333  return ferror (f) || fclose (f) != 0;
2334
2335  ;
2336  return 0;
2337}
2338_ACEOF
2339if ac_fn_c_try_run "$LINENO"
2340then :
2341  echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2342else $as_nop
2343  ac_retval=1
2344fi
2345rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2346  conftest.$ac_objext conftest.beam conftest.$ac_ext
2347rm -f conftest.val
2348
2349  fi
2350  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2351  as_fn_set_status $ac_retval
2352
2353} # ac_fn_c_compute_int
2354
2355# ac_fn_check_decl LINENO SYMBOL VAR INCLUDES EXTRA-OPTIONS FLAG-VAR
2356# ------------------------------------------------------------------
2357# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2358# accordingly. Pass EXTRA-OPTIONS to the compiler, using FLAG-VAR.
2359ac_fn_check_decl ()
2360{
2361  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2362  as_decl_name=`echo $2|sed 's/ *(.*//'`
2363  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2364printf %s "checking whether $as_decl_name is declared... " >&6; }
2365if eval test \${$3+y}
2366then :
2367  printf %s "(cached) " >&6
2368else $as_nop
2369  as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2370  eval ac_save_FLAGS=\$$6
2371  as_fn_append $6 " $5"
2372  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2373/* end confdefs.h.  */
2374$4
2375int
2376main (void)
2377{
2378#ifndef $as_decl_name
2379#ifdef __cplusplus
2380  (void) $as_decl_use;
2381#else
2382  (void) $as_decl_name;
2383#endif
2384#endif
2385
2386  ;
2387  return 0;
2388}
2389_ACEOF
2390if ac_fn_c_try_compile "$LINENO"
2391then :
2392  eval "$3=yes"
2393else $as_nop
2394  eval "$3=no"
2395fi
2396rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
2397  eval $6=\$ac_save_FLAGS
2398
2399fi
2400eval ac_res=\$$3
2401	       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2402printf "%s\n" "$ac_res" >&6; }
2403  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2404
2405} # ac_fn_check_decl
2406
2407# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2408# ----------------------------------------------------
2409# Tries to find if the field MEMBER exists in type AGGR, after including
2410# INCLUDES, setting cache variable VAR accordingly.
2411ac_fn_c_check_member ()
2412{
2413  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2414  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2415printf %s "checking for $2.$3... " >&6; }
2416if eval test \${$4+y}
2417then :
2418  printf %s "(cached) " >&6
2419else $as_nop
2420  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2421/* end confdefs.h.  */
2422$5
2423int
2424main (void)
2425{
2426static $2 ac_aggr;
2427if (ac_aggr.$3)
2428return 0;
2429  ;
2430  return 0;
2431}
2432_ACEOF
2433if ac_fn_c_try_compile "$LINENO"
2434then :
2435  eval "$4=yes"
2436else $as_nop
2437  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2438/* end confdefs.h.  */
2439$5
2440int
2441main (void)
2442{
2443static $2 ac_aggr;
2444if (sizeof ac_aggr.$3)
2445return 0;
2446  ;
2447  return 0;
2448}
2449_ACEOF
2450if ac_fn_c_try_compile "$LINENO"
2451then :
2452  eval "$4=yes"
2453else $as_nop
2454  eval "$4=no"
2455fi
2456rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
2457fi
2458rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
2459fi
2460eval ac_res=\$$4
2461	       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2462printf "%s\n" "$ac_res" >&6; }
2463  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2464
2465} # ac_fn_c_check_member
2466ac_configure_args_raw=
2467for ac_arg
2468do
2469  case $ac_arg in
2470  *\'*)
2471    ac_arg=`printf "%s\n" "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2472  esac
2473  as_fn_append ac_configure_args_raw " '$ac_arg'"
2474done
2475
2476case $ac_configure_args_raw in
2477  *$as_nl*)
2478    ac_safe_unquote= ;;
2479  *)
2480    ac_unsafe_z='|&;<>()$`\\"*?[ ''	' # This string ends in space, tab.
2481    ac_unsafe_a="$ac_unsafe_z#~"
2482    ac_safe_unquote="s/ '\\([^$ac_unsafe_a][^$ac_unsafe_z]*\\)'/ \\1/g"
2483    ac_configure_args_raw=`      printf "%s\n" "$ac_configure_args_raw" | sed "$ac_safe_unquote"`;;
2484esac
2485
2486cat >config.log <<_ACEOF
2487This file contains any messages produced by compilers while
2488running configure, to aid debugging if configure makes a mistake.
2489
2490It was created by unbound $as_me 1.23.0, which was
2491generated by GNU Autoconf 2.71.  Invocation command line was
2492
2493  $ $0$ac_configure_args_raw
2494
2495_ACEOF
2496exec 5>>config.log
2497{
2498cat <<_ASUNAME
2499## --------- ##
2500## Platform. ##
2501## --------- ##
2502
2503hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2504uname -m = `(uname -m) 2>/dev/null || echo unknown`
2505uname -r = `(uname -r) 2>/dev/null || echo unknown`
2506uname -s = `(uname -s) 2>/dev/null || echo unknown`
2507uname -v = `(uname -v) 2>/dev/null || echo unknown`
2508
2509/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2510/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2511
2512/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2513/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2514/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2515/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2516/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2517/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2518/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2519
2520_ASUNAME
2521
2522as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2523for as_dir in $PATH
2524do
2525  IFS=$as_save_IFS
2526  case $as_dir in #(((
2527    '') as_dir=./ ;;
2528    */) ;;
2529    *) as_dir=$as_dir/ ;;
2530  esac
2531    printf "%s\n" "PATH: $as_dir"
2532  done
2533IFS=$as_save_IFS
2534
2535} >&5
2536
2537cat >&5 <<_ACEOF
2538
2539
2540## ----------- ##
2541## Core tests. ##
2542## ----------- ##
2543
2544_ACEOF
2545
2546
2547# Keep a trace of the command line.
2548# Strip out --no-create and --no-recursion so they do not pile up.
2549# Strip out --silent because we don't want to record it for future runs.
2550# Also quote any args containing shell meta-characters.
2551# Make two passes to allow for proper duplicate-argument suppression.
2552ac_configure_args=
2553ac_configure_args0=
2554ac_configure_args1=
2555ac_must_keep_next=false
2556for ac_pass in 1 2
2557do
2558  for ac_arg
2559  do
2560    case $ac_arg in
2561    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2562    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2563    | -silent | --silent | --silen | --sile | --sil)
2564      continue ;;
2565    *\'*)
2566      ac_arg=`printf "%s\n" "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2567    esac
2568    case $ac_pass in
2569    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2570    2)
2571      as_fn_append ac_configure_args1 " '$ac_arg'"
2572      if test $ac_must_keep_next = true; then
2573	ac_must_keep_next=false # Got value, back to normal.
2574      else
2575	case $ac_arg in
2576	  *=* | --config-cache | -C | -disable-* | --disable-* \
2577	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2578	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2579	  | -with-* | --with-* | -without-* | --without-* | --x)
2580	    case "$ac_configure_args0 " in
2581	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2582	    esac
2583	    ;;
2584	  -* ) ac_must_keep_next=true ;;
2585	esac
2586      fi
2587      as_fn_append ac_configure_args " '$ac_arg'"
2588      ;;
2589    esac
2590  done
2591done
2592{ ac_configure_args0=; unset ac_configure_args0;}
2593{ ac_configure_args1=; unset ac_configure_args1;}
2594
2595# When interrupted or exit'd, cleanup temporary files, and complete
2596# config.log.  We remove comments because anyway the quotes in there
2597# would cause problems or look ugly.
2598# WARNING: Use '\'' to represent an apostrophe within the trap.
2599# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2600trap 'exit_status=$?
2601  # Sanitize IFS.
2602  IFS=" ""	$as_nl"
2603  # Save into config.log some information that might help in debugging.
2604  {
2605    echo
2606
2607    printf "%s\n" "## ---------------- ##
2608## Cache variables. ##
2609## ---------------- ##"
2610    echo
2611    # The following way of writing the cache mishandles newlines in values,
2612(
2613  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2614    eval ac_val=\$$ac_var
2615    case $ac_val in #(
2616    *${as_nl}*)
2617      case $ac_var in #(
2618      *_cv_*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2619printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2620      esac
2621      case $ac_var in #(
2622      _ | IFS | as_nl) ;; #(
2623      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2624      *) { eval $ac_var=; unset $ac_var;} ;;
2625      esac ;;
2626    esac
2627  done
2628  (set) 2>&1 |
2629    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2630    *${as_nl}ac_space=\ *)
2631      sed -n \
2632	"s/'\''/'\''\\\\'\'''\''/g;
2633	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2634      ;; #(
2635    *)
2636      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2637      ;;
2638    esac |
2639    sort
2640)
2641    echo
2642
2643    printf "%s\n" "## ----------------- ##
2644## Output variables. ##
2645## ----------------- ##"
2646    echo
2647    for ac_var in $ac_subst_vars
2648    do
2649      eval ac_val=\$$ac_var
2650      case $ac_val in
2651      *\'\''*) ac_val=`printf "%s\n" "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2652      esac
2653      printf "%s\n" "$ac_var='\''$ac_val'\''"
2654    done | sort
2655    echo
2656
2657    if test -n "$ac_subst_files"; then
2658      printf "%s\n" "## ------------------- ##
2659## File substitutions. ##
2660## ------------------- ##"
2661      echo
2662      for ac_var in $ac_subst_files
2663      do
2664	eval ac_val=\$$ac_var
2665	case $ac_val in
2666	*\'\''*) ac_val=`printf "%s\n" "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2667	esac
2668	printf "%s\n" "$ac_var='\''$ac_val'\''"
2669      done | sort
2670      echo
2671    fi
2672
2673    if test -s confdefs.h; then
2674      printf "%s\n" "## ----------- ##
2675## confdefs.h. ##
2676## ----------- ##"
2677      echo
2678      cat confdefs.h
2679      echo
2680    fi
2681    test "$ac_signal" != 0 &&
2682      printf "%s\n" "$as_me: caught signal $ac_signal"
2683    printf "%s\n" "$as_me: exit $exit_status"
2684  } >&5
2685  rm -f core *.core core.conftest.* &&
2686    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2687    exit $exit_status
2688' 0
2689for ac_signal in 1 2 13 15; do
2690  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2691done
2692ac_signal=0
2693
2694# confdefs.h avoids OS command line length limits that DEFS can exceed.
2695rm -f -r conftest* confdefs.h
2696
2697printf "%s\n" "/* confdefs.h */" > confdefs.h
2698
2699# Predefined preprocessor variables.
2700
2701printf "%s\n" "#define PACKAGE_NAME \"$PACKAGE_NAME\"" >>confdefs.h
2702
2703printf "%s\n" "#define PACKAGE_TARNAME \"$PACKAGE_TARNAME\"" >>confdefs.h
2704
2705printf "%s\n" "#define PACKAGE_VERSION \"$PACKAGE_VERSION\"" >>confdefs.h
2706
2707printf "%s\n" "#define PACKAGE_STRING \"$PACKAGE_STRING\"" >>confdefs.h
2708
2709printf "%s\n" "#define PACKAGE_BUGREPORT \"$PACKAGE_BUGREPORT\"" >>confdefs.h
2710
2711printf "%s\n" "#define PACKAGE_URL \"$PACKAGE_URL\"" >>confdefs.h
2712
2713
2714# Let the site file select an alternate cache file if it wants to.
2715# Prefer an explicitly selected file to automatically selected ones.
2716if test -n "$CONFIG_SITE"; then
2717  ac_site_files="$CONFIG_SITE"
2718elif test "x$prefix" != xNONE; then
2719  ac_site_files="$prefix/share/config.site $prefix/etc/config.site"
2720else
2721  ac_site_files="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
2722fi
2723
2724for ac_site_file in $ac_site_files
2725do
2726  case $ac_site_file in #(
2727  */*) :
2728     ;; #(
2729  *) :
2730    ac_site_file=./$ac_site_file ;;
2731esac
2732  if test -f "$ac_site_file" && test -r "$ac_site_file"; then
2733    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2734printf "%s\n" "$as_me: loading site script $ac_site_file" >&6;}
2735    sed 's/^/| /' "$ac_site_file" >&5
2736    . "$ac_site_file" \
2737      || { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2738printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
2739as_fn_error $? "failed to load site script $ac_site_file
2740See \`config.log' for more details" "$LINENO" 5; }
2741  fi
2742done
2743
2744if test -r "$cache_file"; then
2745  # Some versions of bash will fail to source /dev/null (special files
2746  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
2747  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2748    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2749printf "%s\n" "$as_me: loading cache $cache_file" >&6;}
2750    case $cache_file in
2751      [\\/]* | ?:[\\/]* ) . "$cache_file";;
2752      *)                      . "./$cache_file";;
2753    esac
2754  fi
2755else
2756  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2757printf "%s\n" "$as_me: creating cache $cache_file" >&6;}
2758  >$cache_file
2759fi
2760
2761as_fn_append ac_header_c_list " stdio.h stdio_h HAVE_STDIO_H"
2762# Test code for whether the C compiler supports C89 (global declarations)
2763ac_c_conftest_c89_globals='
2764/* Does the compiler advertise C89 conformance?
2765   Do not test the value of __STDC__, because some compilers set it to 0
2766   while being otherwise adequately conformant. */
2767#if !defined __STDC__
2768# error "Compiler does not advertise C89 conformance"
2769#endif
2770
2771#include <stddef.h>
2772#include <stdarg.h>
2773struct stat;
2774/* Most of the following tests are stolen from RCS 5.7 src/conf.sh.  */
2775struct buf { int x; };
2776struct buf * (*rcsopen) (struct buf *, struct stat *, int);
2777static char *e (p, i)
2778     char **p;
2779     int i;
2780{
2781  return p[i];
2782}
2783static char *f (char * (*g) (char **, int), char **p, ...)
2784{
2785  char *s;
2786  va_list v;
2787  va_start (v,p);
2788  s = g (p, va_arg (v,int));
2789  va_end (v);
2790  return s;
2791}
2792
2793/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
2794   function prototypes and stuff, but not \xHH hex character constants.
2795   These do not provoke an error unfortunately, instead are silently treated
2796   as an "x".  The following induces an error, until -std is added to get
2797   proper ANSI mode.  Curiously \x00 != x always comes out true, for an
2798   array size at least.  It is necessary to write \x00 == 0 to get something
2799   that is true only with -std.  */
2800int osf4_cc_array ['\''\x00'\'' == 0 ? 1 : -1];
2801
2802/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
2803   inside strings and character constants.  */
2804#define FOO(x) '\''x'\''
2805int xlc6_cc_array[FOO(a) == '\''x'\'' ? 1 : -1];
2806
2807int test (int i, double x);
2808struct s1 {int (*f) (int a);};
2809struct s2 {int (*f) (double a);};
2810int pairnames (int, char **, int *(*)(struct buf *, struct stat *, int),
2811               int, int);'
2812
2813# Test code for whether the C compiler supports C89 (body of main).
2814ac_c_conftest_c89_main='
2815ok |= (argc == 0 || f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]);
2816'
2817
2818# Test code for whether the C compiler supports C99 (global declarations)
2819ac_c_conftest_c99_globals='
2820// Does the compiler advertise C99 conformance?
2821#if !defined __STDC_VERSION__ || __STDC_VERSION__ < 199901L
2822# error "Compiler does not advertise C99 conformance"
2823#endif
2824
2825#include <stdbool.h>
2826extern int puts (const char *);
2827extern int printf (const char *, ...);
2828extern int dprintf (int, const char *, ...);
2829extern void *malloc (size_t);
2830
2831// Check varargs macros.  These examples are taken from C99 6.10.3.5.
2832// dprintf is used instead of fprintf to avoid needing to declare
2833// FILE and stderr.
2834#define debug(...) dprintf (2, __VA_ARGS__)
2835#define showlist(...) puts (#__VA_ARGS__)
2836#define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__))
2837static void
2838test_varargs_macros (void)
2839{
2840  int x = 1234;
2841  int y = 5678;
2842  debug ("Flag");
2843  debug ("X = %d\n", x);
2844  showlist (The first, second, and third items.);
2845  report (x>y, "x is %d but y is %d", x, y);
2846}
2847
2848// Check long long types.
2849#define BIG64 18446744073709551615ull
2850#define BIG32 4294967295ul
2851#define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0)
2852#if !BIG_OK
2853  #error "your preprocessor is broken"
2854#endif
2855#if BIG_OK
2856#else
2857  #error "your preprocessor is broken"
2858#endif
2859static long long int bignum = -9223372036854775807LL;
2860static unsigned long long int ubignum = BIG64;
2861
2862struct incomplete_array
2863{
2864  int datasize;
2865  double data[];
2866};
2867
2868struct named_init {
2869  int number;
2870  const wchar_t *name;
2871  double average;
2872};
2873
2874typedef const char *ccp;
2875
2876static inline int
2877test_restrict (ccp restrict text)
2878{
2879  // See if C++-style comments work.
2880  // Iterate through items via the restricted pointer.
2881  // Also check for declarations in for loops.
2882  for (unsigned int i = 0; *(text+i) != '\''\0'\''; ++i)
2883    continue;
2884  return 0;
2885}
2886
2887// Check varargs and va_copy.
2888static bool
2889test_varargs (const char *format, ...)
2890{
2891  va_list args;
2892  va_start (args, format);
2893  va_list args_copy;
2894  va_copy (args_copy, args);
2895
2896  const char *str = "";
2897  int number = 0;
2898  float fnumber = 0;
2899
2900  while (*format)
2901    {
2902      switch (*format++)
2903	{
2904	case '\''s'\'': // string
2905	  str = va_arg (args_copy, const char *);
2906	  break;
2907	case '\''d'\'': // int
2908	  number = va_arg (args_copy, int);
2909	  break;
2910	case '\''f'\'': // float
2911	  fnumber = va_arg (args_copy, double);
2912	  break;
2913	default:
2914	  break;
2915	}
2916    }
2917  va_end (args_copy);
2918  va_end (args);
2919
2920  return *str && number && fnumber;
2921}
2922'
2923
2924# Test code for whether the C compiler supports C99 (body of main).
2925ac_c_conftest_c99_main='
2926  // Check bool.
2927  _Bool success = false;
2928  success |= (argc != 0);
2929
2930  // Check restrict.
2931  if (test_restrict ("String literal") == 0)
2932    success = true;
2933  char *restrict newvar = "Another string";
2934
2935  // Check varargs.
2936  success &= test_varargs ("s, d'\'' f .", "string", 65, 34.234);
2937  test_varargs_macros ();
2938
2939  // Check flexible array members.
2940  struct incomplete_array *ia =
2941    malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10));
2942  ia->datasize = 10;
2943  for (int i = 0; i < ia->datasize; ++i)
2944    ia->data[i] = i * 1.234;
2945
2946  // Check named initializers.
2947  struct named_init ni = {
2948    .number = 34,
2949    .name = L"Test wide string",
2950    .average = 543.34343,
2951  };
2952
2953  ni.number = 58;
2954
2955  int dynamic_array[ni.number];
2956  dynamic_array[0] = argv[0][0];
2957  dynamic_array[ni.number - 1] = 543;
2958
2959  // work around unused variable warnings
2960  ok |= (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == '\''x'\''
2961	 || dynamic_array[ni.number - 1] != 543);
2962'
2963
2964# Test code for whether the C compiler supports C11 (global declarations)
2965ac_c_conftest_c11_globals='
2966// Does the compiler advertise C11 conformance?
2967#if !defined __STDC_VERSION__ || __STDC_VERSION__ < 201112L
2968# error "Compiler does not advertise C11 conformance"
2969#endif
2970
2971// Check _Alignas.
2972char _Alignas (double) aligned_as_double;
2973char _Alignas (0) no_special_alignment;
2974extern char aligned_as_int;
2975char _Alignas (0) _Alignas (int) aligned_as_int;
2976
2977// Check _Alignof.
2978enum
2979{
2980  int_alignment = _Alignof (int),
2981  int_array_alignment = _Alignof (int[100]),
2982  char_alignment = _Alignof (char)
2983};
2984_Static_assert (0 < -_Alignof (int), "_Alignof is signed");
2985
2986// Check _Noreturn.
2987int _Noreturn does_not_return (void) { for (;;) continue; }
2988
2989// Check _Static_assert.
2990struct test_static_assert
2991{
2992  int x;
2993  _Static_assert (sizeof (int) <= sizeof (long int),
2994                  "_Static_assert does not work in struct");
2995  long int y;
2996};
2997
2998// Check UTF-8 literals.
2999#define u8 syntax error!
3000char const utf8_literal[] = u8"happens to be ASCII" "another string";
3001
3002// Check duplicate typedefs.
3003typedef long *long_ptr;
3004typedef long int *long_ptr;
3005typedef long_ptr long_ptr;
3006
3007// Anonymous structures and unions -- taken from C11 6.7.2.1 Example 1.
3008struct anonymous
3009{
3010  union {
3011    struct { int i; int j; };
3012    struct { int k; long int l; } w;
3013  };
3014  int m;
3015} v1;
3016'
3017
3018# Test code for whether the C compiler supports C11 (body of main).
3019ac_c_conftest_c11_main='
3020  _Static_assert ((offsetof (struct anonymous, i)
3021		   == offsetof (struct anonymous, w.k)),
3022		  "Anonymous union alignment botch");
3023  v1.i = 2;
3024  v1.w.k = 5;
3025  ok |= v1.i != 5;
3026'
3027
3028# Test code for whether the C compiler supports C11 (complete).
3029ac_c_conftest_c11_program="${ac_c_conftest_c89_globals}
3030${ac_c_conftest_c99_globals}
3031${ac_c_conftest_c11_globals}
3032
3033int
3034main (int argc, char **argv)
3035{
3036  int ok = 0;
3037  ${ac_c_conftest_c89_main}
3038  ${ac_c_conftest_c99_main}
3039  ${ac_c_conftest_c11_main}
3040  return ok;
3041}
3042"
3043
3044# Test code for whether the C compiler supports C99 (complete).
3045ac_c_conftest_c99_program="${ac_c_conftest_c89_globals}
3046${ac_c_conftest_c99_globals}
3047
3048int
3049main (int argc, char **argv)
3050{
3051  int ok = 0;
3052  ${ac_c_conftest_c89_main}
3053  ${ac_c_conftest_c99_main}
3054  return ok;
3055}
3056"
3057
3058# Test code for whether the C compiler supports C89 (complete).
3059ac_c_conftest_c89_program="${ac_c_conftest_c89_globals}
3060
3061int
3062main (int argc, char **argv)
3063{
3064  int ok = 0;
3065  ${ac_c_conftest_c89_main}
3066  return ok;
3067}
3068"
3069
3070as_fn_append ac_header_c_list " stdlib.h stdlib_h HAVE_STDLIB_H"
3071as_fn_append ac_header_c_list " string.h string_h HAVE_STRING_H"
3072as_fn_append ac_header_c_list " inttypes.h inttypes_h HAVE_INTTYPES_H"
3073as_fn_append ac_header_c_list " stdint.h stdint_h HAVE_STDINT_H"
3074as_fn_append ac_header_c_list " strings.h strings_h HAVE_STRINGS_H"
3075as_fn_append ac_header_c_list " sys/stat.h sys_stat_h HAVE_SYS_STAT_H"
3076as_fn_append ac_header_c_list " sys/types.h sys_types_h HAVE_SYS_TYPES_H"
3077as_fn_append ac_header_c_list " unistd.h unistd_h HAVE_UNISTD_H"
3078as_fn_append ac_header_c_list " wchar.h wchar_h HAVE_WCHAR_H"
3079as_fn_append ac_header_c_list " minix/config.h minix_config_h HAVE_MINIX_CONFIG_H"
3080as_fn_append ac_header_c_list " vfork.h vfork_h HAVE_VFORK_H"
3081as_fn_append ac_func_c_list " fork HAVE_FORK"
3082as_fn_append ac_func_c_list " vfork HAVE_VFORK"
3083
3084# Auxiliary files required by this configure script.
3085ac_aux_files="ltmain.sh config.guess config.sub"
3086
3087# Locations in which to look for auxiliary files.
3088ac_aux_dir_candidates="${srcdir}${PATH_SEPARATOR}${srcdir}/..${PATH_SEPARATOR}${srcdir}/../.."
3089
3090# Search for a directory containing all of the required auxiliary files,
3091# $ac_aux_files, from the $PATH-style list $ac_aux_dir_candidates.
3092# If we don't find one directory that contains all the files we need,
3093# we report the set of missing files from the *first* directory in
3094# $ac_aux_dir_candidates and give up.
3095ac_missing_aux_files=""
3096ac_first_candidate=:
3097printf "%s\n" "$as_me:${as_lineno-$LINENO}: looking for aux files: $ac_aux_files" >&5
3098as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3099as_found=false
3100for as_dir in $ac_aux_dir_candidates
3101do
3102  IFS=$as_save_IFS
3103  case $as_dir in #(((
3104    '') as_dir=./ ;;
3105    */) ;;
3106    *) as_dir=$as_dir/ ;;
3107  esac
3108  as_found=:
3109
3110  printf "%s\n" "$as_me:${as_lineno-$LINENO}:  trying $as_dir" >&5
3111  ac_aux_dir_found=yes
3112  ac_install_sh=
3113  for ac_aux in $ac_aux_files
3114  do
3115    # As a special case, if "install-sh" is required, that requirement
3116    # can be satisfied by any of "install-sh", "install.sh", or "shtool",
3117    # and $ac_install_sh is set appropriately for whichever one is found.
3118    if test x"$ac_aux" = x"install-sh"
3119    then
3120      if test -f "${as_dir}install-sh"; then
3121        printf "%s\n" "$as_me:${as_lineno-$LINENO}:   ${as_dir}install-sh found" >&5
3122        ac_install_sh="${as_dir}install-sh -c"
3123      elif test -f "${as_dir}install.sh"; then
3124        printf "%s\n" "$as_me:${as_lineno-$LINENO}:   ${as_dir}install.sh found" >&5
3125        ac_install_sh="${as_dir}install.sh -c"
3126      elif test -f "${as_dir}shtool"; then
3127        printf "%s\n" "$as_me:${as_lineno-$LINENO}:   ${as_dir}shtool found" >&5
3128        ac_install_sh="${as_dir}shtool install -c"
3129      else
3130        ac_aux_dir_found=no
3131        if $ac_first_candidate; then
3132          ac_missing_aux_files="${ac_missing_aux_files} install-sh"
3133        else
3134          break
3135        fi
3136      fi
3137    else
3138      if test -f "${as_dir}${ac_aux}"; then
3139        printf "%s\n" "$as_me:${as_lineno-$LINENO}:   ${as_dir}${ac_aux} found" >&5
3140      else
3141        ac_aux_dir_found=no
3142        if $ac_first_candidate; then
3143          ac_missing_aux_files="${ac_missing_aux_files} ${ac_aux}"
3144        else
3145          break
3146        fi
3147      fi
3148    fi
3149  done
3150  if test "$ac_aux_dir_found" = yes; then
3151    ac_aux_dir="$as_dir"
3152    break
3153  fi
3154  ac_first_candidate=false
3155
3156  as_found=false
3157done
3158IFS=$as_save_IFS
3159if $as_found
3160then :
3161
3162else $as_nop
3163  as_fn_error $? "cannot find required auxiliary files:$ac_missing_aux_files" "$LINENO" 5
3164fi
3165
3166
3167# These three variables are undocumented and unsupported,
3168# and are intended to be withdrawn in a future Autoconf release.
3169# They can cause serious problems if a builder's source tree is in a directory
3170# whose full name contains unusual characters.
3171if test -f "${ac_aux_dir}config.guess"; then
3172  ac_config_guess="$SHELL ${ac_aux_dir}config.guess"
3173fi
3174if test -f "${ac_aux_dir}config.sub"; then
3175  ac_config_sub="$SHELL ${ac_aux_dir}config.sub"
3176fi
3177if test -f "$ac_aux_dir/configure"; then
3178  ac_configure="$SHELL ${ac_aux_dir}configure"
3179fi
3180
3181# Check that the precious variables saved in the cache have kept the same
3182# value.
3183ac_cache_corrupted=false
3184for ac_var in $ac_precious_vars; do
3185  eval ac_old_set=\$ac_cv_env_${ac_var}_set
3186  eval ac_new_set=\$ac_env_${ac_var}_set
3187  eval ac_old_val=\$ac_cv_env_${ac_var}_value
3188  eval ac_new_val=\$ac_env_${ac_var}_value
3189  case $ac_old_set,$ac_new_set in
3190    set,)
3191      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
3192printf "%s\n" "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
3193      ac_cache_corrupted=: ;;
3194    ,set)
3195      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
3196printf "%s\n" "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
3197      ac_cache_corrupted=: ;;
3198    ,);;
3199    *)
3200      if test "x$ac_old_val" != "x$ac_new_val"; then
3201	# differences in whitespace do not lead to failure.
3202	ac_old_val_w=`echo x $ac_old_val`
3203	ac_new_val_w=`echo x $ac_new_val`
3204	if test "$ac_old_val_w" != "$ac_new_val_w"; then
3205	  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
3206printf "%s\n" "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
3207	  ac_cache_corrupted=:
3208	else
3209	  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
3210printf "%s\n" "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
3211	  eval $ac_var=\$ac_old_val
3212	fi
3213	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
3214printf "%s\n" "$as_me:   former value:  \`$ac_old_val'" >&2;}
3215	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
3216printf "%s\n" "$as_me:   current value: \`$ac_new_val'" >&2;}
3217      fi;;
3218  esac
3219  # Pass precious variables to config.status.
3220  if test "$ac_new_set" = set; then
3221    case $ac_new_val in
3222    *\'*) ac_arg=$ac_var=`printf "%s\n" "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
3223    *) ac_arg=$ac_var=$ac_new_val ;;
3224    esac
3225    case " $ac_configure_args " in
3226      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
3227      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
3228    esac
3229  fi
3230done
3231if $ac_cache_corrupted; then
3232  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3233printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
3234  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
3235printf "%s\n" "$as_me: error: changes in the environment can compromise the build" >&2;}
3236  as_fn_error $? "run \`${MAKE-make} distclean' and/or \`rm $cache_file'
3237	    and start over" "$LINENO" 5
3238fi
3239## -------------------- ##
3240## Main body of script. ##
3241## -------------------- ##
3242
3243ac_ext=c
3244ac_cpp='$CPP $CPPFLAGS'
3245ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3246ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3247ac_compiler_gnu=$ac_cv_c_compiler_gnu
3248
3249
3250UNBOUND_VERSION_MAJOR=1
3251
3252UNBOUND_VERSION_MINOR=23
3253
3254UNBOUND_VERSION_MICRO=0
3255
3256
3257LIBUNBOUND_CURRENT=9
3258LIBUNBOUND_REVISION=31
3259LIBUNBOUND_AGE=1
3260# 1.0.0 had 0:12:0
3261# 1.0.1 had 0:13:0
3262# 1.0.2 had 0:14:0
3263# 1.1.0 had 0:15:0
3264# 1.1.1 had 0:16:0
3265# 1.2.0 had 0:17:0
3266# 1.2.1 had 0:18:0
3267# 1.3.0 had 1:0:0   # ub_cancel and -export-symbols.
3268# 1.3.1 had 1:1:0
3269# 1.3.2 had 1:2:0
3270# 1.3.3 had 1:3:0
3271# 1.3.4 had 1:4:0
3272# 1.4.0-snapshots had 1:5:0
3273# 1.4.0 had 1:5:0 (not 2:0:0)   # ub_result.why_bogus
3274# 1.4.1 had 2:1:0
3275# 1.4.2 had 2:2:0
3276# 1.4.3 had 2:3:0
3277# 1.4.4 had 2:4:0
3278# 1.4.5 had 2:5:0
3279# 1.4.6 had 2:6:0
3280# 1.4.7 had 2:7:0
3281# 1.4.8 had 2:8:0
3282# 1.4.9 had 2:9:0
3283# 1.4.10 had 2:10:0
3284# 1.4.11 had 2:11:0
3285# 1.4.12 had 2:12:0
3286# 1.4.13 had 2:13:0
3287# and 1.4.13p1 and 1.4.13.p2
3288# 1.4.14 had 2:14:0
3289# 1.4.15 had 3:0:1 # adds ub_version()
3290# 1.4.16 had 3:1:1
3291# 1.4.17 had 3:2:1
3292# 1.4.18 had 3:3:1
3293# 1.4.19 had 3:4:1
3294# 1.4.20 had 4:0:2 # adds libunbound.ttl # but shipped 3:5:1
3295# 1.4.21 had 4:1:2
3296# 1.4.22 had 4:1:2
3297# 1.5.0 had 5:3:3 # adds ub_ctx_add_ta_autr
3298# 1.5.1 had 5:3:3
3299# 1.5.2 had 5:5:3
3300# 1.5.3 had 5:6:3
3301# 1.5.4 had 5:7:3
3302# 1.5.5 had 5:8:3
3303# 1.5.6 had 5:9:3
3304# 1.5.7 had 5:10:3
3305# 1.5.8 had 6:0:4 # adds ub_ctx_set_stub
3306# 1.5.9 had 6:1:4
3307# 1.5.10 had 6:2:4
3308# 1.6.0 had 6:3:4
3309# 1.6.1 had 7:0:5 # ub_callback_t typedef renamed to ub_callback_type
3310# 1.6.2 had 7:1:5
3311# 1.6.3 had 7:2:5
3312# 1.6.4 had 7:3:5
3313# 1.6.5 had 7:4:5
3314# 1.6.6 had 7:5:5
3315# 1.6.7 had 7:6:5
3316# 1.6.8 had 7:7:5
3317# 1.7.0 had 7:8:5
3318# 1.7.1 had 7:9:5
3319# 1.7.2 had 7:10:5
3320# 1.7.3 had 7:11:5
3321# 1.8.0 had 8:0:0 # changes the event callback function signature
3322# 1.8.1 had 8:1:0
3323# 1.8.2 had 8:2:0
3324# 1.8.3 had 8:3:0
3325# 1.9.0 had 9:0:1 # add ub_ctx_set_tls
3326# 1.9.1 had 9:1:1
3327# 1.9.2 had 9:2:1
3328# 1.9.3 had 9:3:1
3329# 1.9.4 had 9:4:1
3330# 1.9.5 had 9:5:1
3331# 1.9.6 had 9:6:1
3332# 1.10.0 had 9:7:1
3333# 1.10.1 had 9:8:1
3334# 1.11.0 had 9:9:1
3335# 1.12.0 had 9:10:1
3336# 1.13.0 had 9:11:1
3337# 1.13.1 had 9:12:1
3338# 1.13.2 had 9:13:1
3339# 1.14.0 had 9:14:1
3340# 1.15.0 had 9:15:1
3341# 1.16.0 had 9:16:1
3342# 1.16.1 had 9:17:1
3343# 1.16.2 had 9:18:1
3344# 1.16.3 had 9:19:1
3345# 1.17.0 had 9:20:1
3346# 1.17.1 had 9:21:1
3347# 1.18.0 had 9:22:1
3348# 1.19.0 had 9:23:1
3349# 1.19.1 had 9:24:1
3350# 1.19.2 had 9:25:1
3351# 1.19.3 had 9:26:1
3352# 1.20.0 had 9:27:1
3353# 1.21.0 had 9:28:1
3354# 1.21.1 had 9:29:1
3355# 1.22.0 had 9:30:1
3356# 1.23.0 had 9:31:1
3357
3358#   Current  -- the number of the binary API that we're implementing
3359#   Revision -- which iteration of the implementation of the binary
3360#               API are we supplying?
3361#   Age      -- How many previous binary API versions do we also
3362#               support?
3363#
3364# If we release a new version that does not change the binary API,
3365# increment Revision.
3366#
3367# If we release a new version that changes the binary API, but does
3368# not break programs compiled against the old binary API, increment
3369# Current and Age.  Set Revision to 0, since this is the first
3370# implementation of the new API.
3371#
3372# Otherwise, we're changing the binary API and breaking backward
3373# compatibility with old binaries.  Increment Current.  Set Age to 0,
3374# since we're backward compatible with no previous APIs.  Set Revision
3375# to 0 too.
3376
3377
3378
3379
3380
3381cmdln="`echo $@ | sed -e 's/\\\\/\\\\\\\\/g' | sed -e 's/"/\\\\"/'g`"
3382
3383printf "%s\n" "#define CONFCMDLINE \"$cmdln\"" >>confdefs.h
3384
3385
3386CFLAGS="$CFLAGS"
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396ac_ext=c
3397ac_cpp='$CPP $CPPFLAGS'
3398ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3399ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3400ac_compiler_gnu=$ac_cv_c_compiler_gnu
3401if test -n "$ac_tool_prefix"; then
3402  # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3403set dummy ${ac_tool_prefix}gcc; ac_word=$2
3404{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3405printf %s "checking for $ac_word... " >&6; }
3406if test ${ac_cv_prog_CC+y}
3407then :
3408  printf %s "(cached) " >&6
3409else $as_nop
3410  if test -n "$CC"; then
3411  ac_cv_prog_CC="$CC" # Let the user override the test.
3412else
3413as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3414for as_dir in $PATH
3415do
3416  IFS=$as_save_IFS
3417  case $as_dir in #(((
3418    '') as_dir=./ ;;
3419    */) ;;
3420    *) as_dir=$as_dir/ ;;
3421  esac
3422    for ac_exec_ext in '' $ac_executable_extensions; do
3423  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
3424    ac_cv_prog_CC="${ac_tool_prefix}gcc"
3425    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
3426    break 2
3427  fi
3428done
3429  done
3430IFS=$as_save_IFS
3431
3432fi
3433fi
3434CC=$ac_cv_prog_CC
3435if test -n "$CC"; then
3436  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3437printf "%s\n" "$CC" >&6; }
3438else
3439  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
3440printf "%s\n" "no" >&6; }
3441fi
3442
3443
3444fi
3445if test -z "$ac_cv_prog_CC"; then
3446  ac_ct_CC=$CC
3447  # Extract the first word of "gcc", so it can be a program name with args.
3448set dummy gcc; ac_word=$2
3449{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3450printf %s "checking for $ac_word... " >&6; }
3451if test ${ac_cv_prog_ac_ct_CC+y}
3452then :
3453  printf %s "(cached) " >&6
3454else $as_nop
3455  if test -n "$ac_ct_CC"; then
3456  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3457else
3458as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3459for as_dir in $PATH
3460do
3461  IFS=$as_save_IFS
3462  case $as_dir in #(((
3463    '') as_dir=./ ;;
3464    */) ;;
3465    *) as_dir=$as_dir/ ;;
3466  esac
3467    for ac_exec_ext in '' $ac_executable_extensions; do
3468  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
3469    ac_cv_prog_ac_ct_CC="gcc"
3470    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
3471    break 2
3472  fi
3473done
3474  done
3475IFS=$as_save_IFS
3476
3477fi
3478fi
3479ac_ct_CC=$ac_cv_prog_ac_ct_CC
3480if test -n "$ac_ct_CC"; then
3481  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3482printf "%s\n" "$ac_ct_CC" >&6; }
3483else
3484  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
3485printf "%s\n" "no" >&6; }
3486fi
3487
3488  if test "x$ac_ct_CC" = x; then
3489    CC=""
3490  else
3491    case $cross_compiling:$ac_tool_warned in
3492yes:)
3493{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3494printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3495ac_tool_warned=yes ;;
3496esac
3497    CC=$ac_ct_CC
3498  fi
3499else
3500  CC="$ac_cv_prog_CC"
3501fi
3502
3503if test -z "$CC"; then
3504          if test -n "$ac_tool_prefix"; then
3505    # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
3506set dummy ${ac_tool_prefix}cc; ac_word=$2
3507{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3508printf %s "checking for $ac_word... " >&6; }
3509if test ${ac_cv_prog_CC+y}
3510then :
3511  printf %s "(cached) " >&6
3512else $as_nop
3513  if test -n "$CC"; then
3514  ac_cv_prog_CC="$CC" # Let the user override the test.
3515else
3516as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3517for as_dir in $PATH
3518do
3519  IFS=$as_save_IFS
3520  case $as_dir in #(((
3521    '') as_dir=./ ;;
3522    */) ;;
3523    *) as_dir=$as_dir/ ;;
3524  esac
3525    for ac_exec_ext in '' $ac_executable_extensions; do
3526  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
3527    ac_cv_prog_CC="${ac_tool_prefix}cc"
3528    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
3529    break 2
3530  fi
3531done
3532  done
3533IFS=$as_save_IFS
3534
3535fi
3536fi
3537CC=$ac_cv_prog_CC
3538if test -n "$CC"; then
3539  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3540printf "%s\n" "$CC" >&6; }
3541else
3542  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
3543printf "%s\n" "no" >&6; }
3544fi
3545
3546
3547  fi
3548fi
3549if test -z "$CC"; then
3550  # Extract the first word of "cc", so it can be a program name with args.
3551set dummy cc; ac_word=$2
3552{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3553printf %s "checking for $ac_word... " >&6; }
3554if test ${ac_cv_prog_CC+y}
3555then :
3556  printf %s "(cached) " >&6
3557else $as_nop
3558  if test -n "$CC"; then
3559  ac_cv_prog_CC="$CC" # Let the user override the test.
3560else
3561  ac_prog_rejected=no
3562as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3563for as_dir in $PATH
3564do
3565  IFS=$as_save_IFS
3566  case $as_dir in #(((
3567    '') as_dir=./ ;;
3568    */) ;;
3569    *) as_dir=$as_dir/ ;;
3570  esac
3571    for ac_exec_ext in '' $ac_executable_extensions; do
3572  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
3573    if test "$as_dir$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3574       ac_prog_rejected=yes
3575       continue
3576     fi
3577    ac_cv_prog_CC="cc"
3578    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
3579    break 2
3580  fi
3581done
3582  done
3583IFS=$as_save_IFS
3584
3585if test $ac_prog_rejected = yes; then
3586  # We found a bogon in the path, so make sure we never use it.
3587  set dummy $ac_cv_prog_CC
3588  shift
3589  if test $# != 0; then
3590    # We chose a different compiler from the bogus one.
3591    # However, it has the same basename, so the bogon will be chosen
3592    # first if we set CC to just the basename; use the full file name.
3593    shift
3594    ac_cv_prog_CC="$as_dir$ac_word${1+' '}$@"
3595  fi
3596fi
3597fi
3598fi
3599CC=$ac_cv_prog_CC
3600if test -n "$CC"; then
3601  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3602printf "%s\n" "$CC" >&6; }
3603else
3604  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
3605printf "%s\n" "no" >&6; }
3606fi
3607
3608
3609fi
3610if test -z "$CC"; then
3611  if test -n "$ac_tool_prefix"; then
3612  for ac_prog in cl.exe
3613  do
3614    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3615set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3616{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3617printf %s "checking for $ac_word... " >&6; }
3618if test ${ac_cv_prog_CC+y}
3619then :
3620  printf %s "(cached) " >&6
3621else $as_nop
3622  if test -n "$CC"; then
3623  ac_cv_prog_CC="$CC" # Let the user override the test.
3624else
3625as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3626for as_dir in $PATH
3627do
3628  IFS=$as_save_IFS
3629  case $as_dir in #(((
3630    '') as_dir=./ ;;
3631    */) ;;
3632    *) as_dir=$as_dir/ ;;
3633  esac
3634    for ac_exec_ext in '' $ac_executable_extensions; do
3635  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
3636    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
3637    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
3638    break 2
3639  fi
3640done
3641  done
3642IFS=$as_save_IFS
3643
3644fi
3645fi
3646CC=$ac_cv_prog_CC
3647if test -n "$CC"; then
3648  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3649printf "%s\n" "$CC" >&6; }
3650else
3651  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
3652printf "%s\n" "no" >&6; }
3653fi
3654
3655
3656    test -n "$CC" && break
3657  done
3658fi
3659if test -z "$CC"; then
3660  ac_ct_CC=$CC
3661  for ac_prog in cl.exe
3662do
3663  # Extract the first word of "$ac_prog", so it can be a program name with args.
3664set dummy $ac_prog; ac_word=$2
3665{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3666printf %s "checking for $ac_word... " >&6; }
3667if test ${ac_cv_prog_ac_ct_CC+y}
3668then :
3669  printf %s "(cached) " >&6
3670else $as_nop
3671  if test -n "$ac_ct_CC"; then
3672  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3673else
3674as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3675for as_dir in $PATH
3676do
3677  IFS=$as_save_IFS
3678  case $as_dir in #(((
3679    '') as_dir=./ ;;
3680    */) ;;
3681    *) as_dir=$as_dir/ ;;
3682  esac
3683    for ac_exec_ext in '' $ac_executable_extensions; do
3684  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
3685    ac_cv_prog_ac_ct_CC="$ac_prog"
3686    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
3687    break 2
3688  fi
3689done
3690  done
3691IFS=$as_save_IFS
3692
3693fi
3694fi
3695ac_ct_CC=$ac_cv_prog_ac_ct_CC
3696if test -n "$ac_ct_CC"; then
3697  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3698printf "%s\n" "$ac_ct_CC" >&6; }
3699else
3700  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
3701printf "%s\n" "no" >&6; }
3702fi
3703
3704
3705  test -n "$ac_ct_CC" && break
3706done
3707
3708  if test "x$ac_ct_CC" = x; then
3709    CC=""
3710  else
3711    case $cross_compiling:$ac_tool_warned in
3712yes:)
3713{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3714printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3715ac_tool_warned=yes ;;
3716esac
3717    CC=$ac_ct_CC
3718  fi
3719fi
3720
3721fi
3722if test -z "$CC"; then
3723  if test -n "$ac_tool_prefix"; then
3724  # Extract the first word of "${ac_tool_prefix}clang", so it can be a program name with args.
3725set dummy ${ac_tool_prefix}clang; ac_word=$2
3726{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3727printf %s "checking for $ac_word... " >&6; }
3728if test ${ac_cv_prog_CC+y}
3729then :
3730  printf %s "(cached) " >&6
3731else $as_nop
3732  if test -n "$CC"; then
3733  ac_cv_prog_CC="$CC" # Let the user override the test.
3734else
3735as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3736for as_dir in $PATH
3737do
3738  IFS=$as_save_IFS
3739  case $as_dir in #(((
3740    '') as_dir=./ ;;
3741    */) ;;
3742    *) as_dir=$as_dir/ ;;
3743  esac
3744    for ac_exec_ext in '' $ac_executable_extensions; do
3745  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
3746    ac_cv_prog_CC="${ac_tool_prefix}clang"
3747    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
3748    break 2
3749  fi
3750done
3751  done
3752IFS=$as_save_IFS
3753
3754fi
3755fi
3756CC=$ac_cv_prog_CC
3757if test -n "$CC"; then
3758  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3759printf "%s\n" "$CC" >&6; }
3760else
3761  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
3762printf "%s\n" "no" >&6; }
3763fi
3764
3765
3766fi
3767if test -z "$ac_cv_prog_CC"; then
3768  ac_ct_CC=$CC
3769  # Extract the first word of "clang", so it can be a program name with args.
3770set dummy clang; ac_word=$2
3771{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3772printf %s "checking for $ac_word... " >&6; }
3773if test ${ac_cv_prog_ac_ct_CC+y}
3774then :
3775  printf %s "(cached) " >&6
3776else $as_nop
3777  if test -n "$ac_ct_CC"; then
3778  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3779else
3780as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3781for as_dir in $PATH
3782do
3783  IFS=$as_save_IFS
3784  case $as_dir in #(((
3785    '') as_dir=./ ;;
3786    */) ;;
3787    *) as_dir=$as_dir/ ;;
3788  esac
3789    for ac_exec_ext in '' $ac_executable_extensions; do
3790  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
3791    ac_cv_prog_ac_ct_CC="clang"
3792    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
3793    break 2
3794  fi
3795done
3796  done
3797IFS=$as_save_IFS
3798
3799fi
3800fi
3801ac_ct_CC=$ac_cv_prog_ac_ct_CC
3802if test -n "$ac_ct_CC"; then
3803  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3804printf "%s\n" "$ac_ct_CC" >&6; }
3805else
3806  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
3807printf "%s\n" "no" >&6; }
3808fi
3809
3810  if test "x$ac_ct_CC" = x; then
3811    CC=""
3812  else
3813    case $cross_compiling:$ac_tool_warned in
3814yes:)
3815{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3816printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3817ac_tool_warned=yes ;;
3818esac
3819    CC=$ac_ct_CC
3820  fi
3821else
3822  CC="$ac_cv_prog_CC"
3823fi
3824
3825fi
3826
3827
3828test -z "$CC" && { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3829printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
3830as_fn_error $? "no acceptable C compiler found in \$PATH
3831See \`config.log' for more details" "$LINENO" 5; }
3832
3833# Provide some information about the compiler.
3834printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3835set X $ac_compile
3836ac_compiler=$2
3837for ac_option in --version -v -V -qversion -version; do
3838  { { ac_try="$ac_compiler $ac_option >&5"
3839case "(($ac_try" in
3840  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3841  *) ac_try_echo=$ac_try;;
3842esac
3843eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3844printf "%s\n" "$ac_try_echo"; } >&5
3845  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
3846  ac_status=$?
3847  if test -s conftest.err; then
3848    sed '10a\
3849... rest of stderr output deleted ...
3850         10q' conftest.err >conftest.er1
3851    cat conftest.er1 >&5
3852  fi
3853  rm -f conftest.er1 conftest.err
3854  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3855  test $ac_status = 0; }
3856done
3857
3858cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3859/* end confdefs.h.  */
3860
3861int
3862main (void)
3863{
3864
3865  ;
3866  return 0;
3867}
3868_ACEOF
3869ac_clean_files_save=$ac_clean_files
3870ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
3871# Try to create an executable without -o first, disregard a.out.
3872# It will help us diagnose broken compilers, and finding out an intuition
3873# of exeext.
3874{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3875printf %s "checking whether the C compiler works... " >&6; }
3876ac_link_default=`printf "%s\n" "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3877
3878# The possible output files:
3879ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3880
3881ac_rmfiles=
3882for ac_file in $ac_files
3883do
3884  case $ac_file in
3885    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3886    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3887  esac
3888done
3889rm -f $ac_rmfiles
3890
3891if { { ac_try="$ac_link_default"
3892case "(($ac_try" in
3893  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3894  *) ac_try_echo=$ac_try;;
3895esac
3896eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3897printf "%s\n" "$ac_try_echo"; } >&5
3898  (eval "$ac_link_default") 2>&5
3899  ac_status=$?
3900  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3901  test $ac_status = 0; }
3902then :
3903  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3904# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3905# in a Makefile.  We should not override ac_cv_exeext if it was cached,
3906# so that the user can short-circuit this test for compilers unknown to
3907# Autoconf.
3908for ac_file in $ac_files ''
3909do
3910  test -f "$ac_file" || continue
3911  case $ac_file in
3912    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
3913	;;
3914    [ab].out )
3915	# We found the default executable, but exeext='' is most
3916	# certainly right.
3917	break;;
3918    *.* )
3919	if test ${ac_cv_exeext+y} && test "$ac_cv_exeext" != no;
3920	then :; else
3921	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3922	fi
3923	# We set ac_cv_exeext here because the later test for it is not
3924	# safe: cross compilers may not add the suffix if given an `-o'
3925	# argument, so we may need to know it at that point already.
3926	# Even if this section looks crufty: it has the advantage of
3927	# actually working.
3928	break;;
3929    * )
3930	break;;
3931  esac
3932done
3933test "$ac_cv_exeext" = no && ac_cv_exeext=
3934
3935else $as_nop
3936  ac_file=''
3937fi
3938if test -z "$ac_file"
3939then :
3940  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
3941printf "%s\n" "no" >&6; }
3942printf "%s\n" "$as_me: failed program was:" >&5
3943sed 's/^/| /' conftest.$ac_ext >&5
3944
3945{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3946printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
3947as_fn_error 77 "C compiler cannot create executables
3948See \`config.log' for more details" "$LINENO" 5; }
3949else $as_nop
3950  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3951printf "%s\n" "yes" >&6; }
3952fi
3953{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3954printf %s "checking for C compiler default output file name... " >&6; }
3955{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3956printf "%s\n" "$ac_file" >&6; }
3957ac_exeext=$ac_cv_exeext
3958
3959rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
3960ac_clean_files=$ac_clean_files_save
3961{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3962printf %s "checking for suffix of executables... " >&6; }
3963if { { ac_try="$ac_link"
3964case "(($ac_try" in
3965  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3966  *) ac_try_echo=$ac_try;;
3967esac
3968eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3969printf "%s\n" "$ac_try_echo"; } >&5
3970  (eval "$ac_link") 2>&5
3971  ac_status=$?
3972  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3973  test $ac_status = 0; }
3974then :
3975  # If both `conftest.exe' and `conftest' are `present' (well, observable)
3976# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
3977# work properly (i.e., refer to `conftest.exe'), while it won't with
3978# `rm'.
3979for ac_file in conftest.exe conftest conftest.*; do
3980  test -f "$ac_file" || continue
3981  case $ac_file in
3982    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3983    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3984	  break;;
3985    * ) break;;
3986  esac
3987done
3988else $as_nop
3989  { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3990printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
3991as_fn_error $? "cannot compute suffix of executables: cannot compile and link
3992See \`config.log' for more details" "$LINENO" 5; }
3993fi
3994rm -f conftest conftest$ac_cv_exeext
3995{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3996printf "%s\n" "$ac_cv_exeext" >&6; }
3997
3998rm -f conftest.$ac_ext
3999EXEEXT=$ac_cv_exeext
4000ac_exeext=$EXEEXT
4001cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4002/* end confdefs.h.  */
4003#include <stdio.h>
4004int
4005main (void)
4006{
4007FILE *f = fopen ("conftest.out", "w");
4008 return ferror (f) || fclose (f) != 0;
4009
4010  ;
4011  return 0;
4012}
4013_ACEOF
4014ac_clean_files="$ac_clean_files conftest.out"
4015# Check that the compiler produces executables we can run.  If not, either
4016# the compiler is broken, or we cross compile.
4017{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4018printf %s "checking whether we are cross compiling... " >&6; }
4019if test "$cross_compiling" != yes; then
4020  { { ac_try="$ac_link"
4021case "(($ac_try" in
4022  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4023  *) ac_try_echo=$ac_try;;
4024esac
4025eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4026printf "%s\n" "$ac_try_echo"; } >&5
4027  (eval "$ac_link") 2>&5
4028  ac_status=$?
4029  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4030  test $ac_status = 0; }
4031  if { ac_try='./conftest$ac_cv_exeext'
4032  { { case "(($ac_try" in
4033  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4034  *) ac_try_echo=$ac_try;;
4035esac
4036eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4037printf "%s\n" "$ac_try_echo"; } >&5
4038  (eval "$ac_try") 2>&5
4039  ac_status=$?
4040  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4041  test $ac_status = 0; }; }; then
4042    cross_compiling=no
4043  else
4044    if test "$cross_compiling" = maybe; then
4045	cross_compiling=yes
4046    else
4047	{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4048printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
4049as_fn_error 77 "cannot run C compiled programs.
4050If you meant to cross compile, use \`--host'.
4051See \`config.log' for more details" "$LINENO" 5; }
4052    fi
4053  fi
4054fi
4055{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4056printf "%s\n" "$cross_compiling" >&6; }
4057
4058rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4059ac_clean_files=$ac_clean_files_save
4060{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4061printf %s "checking for suffix of object files... " >&6; }
4062if test ${ac_cv_objext+y}
4063then :
4064  printf %s "(cached) " >&6
4065else $as_nop
4066  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4067/* end confdefs.h.  */
4068
4069int
4070main (void)
4071{
4072
4073  ;
4074  return 0;
4075}
4076_ACEOF
4077rm -f conftest.o conftest.obj
4078if { { ac_try="$ac_compile"
4079case "(($ac_try" in
4080  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4081  *) ac_try_echo=$ac_try;;
4082esac
4083eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4084printf "%s\n" "$ac_try_echo"; } >&5
4085  (eval "$ac_compile") 2>&5
4086  ac_status=$?
4087  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4088  test $ac_status = 0; }
4089then :
4090  for ac_file in conftest.o conftest.obj conftest.*; do
4091  test -f "$ac_file" || continue;
4092  case $ac_file in
4093    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
4094    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4095       break;;
4096  esac
4097done
4098else $as_nop
4099  printf "%s\n" "$as_me: failed program was:" >&5
4100sed 's/^/| /' conftest.$ac_ext >&5
4101
4102{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4103printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
4104as_fn_error $? "cannot compute suffix of object files: cannot compile
4105See \`config.log' for more details" "$LINENO" 5; }
4106fi
4107rm -f conftest.$ac_cv_objext conftest.$ac_ext
4108fi
4109{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4110printf "%s\n" "$ac_cv_objext" >&6; }
4111OBJEXT=$ac_cv_objext
4112ac_objext=$OBJEXT
4113{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports GNU C" >&5
4114printf %s "checking whether the compiler supports GNU C... " >&6; }
4115if test ${ac_cv_c_compiler_gnu+y}
4116then :
4117  printf %s "(cached) " >&6
4118else $as_nop
4119  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4120/* end confdefs.h.  */
4121
4122int
4123main (void)
4124{
4125#ifndef __GNUC__
4126       choke me
4127#endif
4128
4129  ;
4130  return 0;
4131}
4132_ACEOF
4133if ac_fn_c_try_compile "$LINENO"
4134then :
4135  ac_compiler_gnu=yes
4136else $as_nop
4137  ac_compiler_gnu=no
4138fi
4139rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
4140ac_cv_c_compiler_gnu=$ac_compiler_gnu
4141
4142fi
4143{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4144printf "%s\n" "$ac_cv_c_compiler_gnu" >&6; }
4145ac_compiler_gnu=$ac_cv_c_compiler_gnu
4146
4147if test $ac_compiler_gnu = yes; then
4148  GCC=yes
4149else
4150  GCC=
4151fi
4152ac_test_CFLAGS=${CFLAGS+y}
4153ac_save_CFLAGS=$CFLAGS
4154{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4155printf %s "checking whether $CC accepts -g... " >&6; }
4156if test ${ac_cv_prog_cc_g+y}
4157then :
4158  printf %s "(cached) " >&6
4159else $as_nop
4160  ac_save_c_werror_flag=$ac_c_werror_flag
4161   ac_c_werror_flag=yes
4162   ac_cv_prog_cc_g=no
4163   CFLAGS="-g"
4164   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4165/* end confdefs.h.  */
4166
4167int
4168main (void)
4169{
4170
4171  ;
4172  return 0;
4173}
4174_ACEOF
4175if ac_fn_c_try_compile "$LINENO"
4176then :
4177  ac_cv_prog_cc_g=yes
4178else $as_nop
4179  CFLAGS=""
4180      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4181/* end confdefs.h.  */
4182
4183int
4184main (void)
4185{
4186
4187  ;
4188  return 0;
4189}
4190_ACEOF
4191if ac_fn_c_try_compile "$LINENO"
4192then :
4193
4194else $as_nop
4195  ac_c_werror_flag=$ac_save_c_werror_flag
4196	 CFLAGS="-g"
4197	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4198/* end confdefs.h.  */
4199
4200int
4201main (void)
4202{
4203
4204  ;
4205  return 0;
4206}
4207_ACEOF
4208if ac_fn_c_try_compile "$LINENO"
4209then :
4210  ac_cv_prog_cc_g=yes
4211fi
4212rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
4213fi
4214rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
4215fi
4216rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
4217   ac_c_werror_flag=$ac_save_c_werror_flag
4218fi
4219{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4220printf "%s\n" "$ac_cv_prog_cc_g" >&6; }
4221if test $ac_test_CFLAGS; then
4222  CFLAGS=$ac_save_CFLAGS
4223elif test $ac_cv_prog_cc_g = yes; then
4224  if test "$GCC" = yes; then
4225    CFLAGS="-g -O2"
4226  else
4227    CFLAGS="-g"
4228  fi
4229else
4230  if test "$GCC" = yes; then
4231    CFLAGS="-O2"
4232  else
4233    CFLAGS=
4234  fi
4235fi
4236ac_prog_cc_stdc=no
4237if test x$ac_prog_cc_stdc = xno
4238then :
4239  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C11 features" >&5
4240printf %s "checking for $CC option to enable C11 features... " >&6; }
4241if test ${ac_cv_prog_cc_c11+y}
4242then :
4243  printf %s "(cached) " >&6
4244else $as_nop
4245  ac_cv_prog_cc_c11=no
4246ac_save_CC=$CC
4247cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4248/* end confdefs.h.  */
4249$ac_c_conftest_c11_program
4250_ACEOF
4251for ac_arg in '' -std=gnu11
4252do
4253  CC="$ac_save_CC $ac_arg"
4254  if ac_fn_c_try_compile "$LINENO"
4255then :
4256  ac_cv_prog_cc_c11=$ac_arg
4257fi
4258rm -f core conftest.err conftest.$ac_objext conftest.beam
4259  test "x$ac_cv_prog_cc_c11" != "xno" && break
4260done
4261rm -f conftest.$ac_ext
4262CC=$ac_save_CC
4263fi
4264
4265if test "x$ac_cv_prog_cc_c11" = xno
4266then :
4267  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4268printf "%s\n" "unsupported" >&6; }
4269else $as_nop
4270  if test "x$ac_cv_prog_cc_c11" = x
4271then :
4272  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4273printf "%s\n" "none needed" >&6; }
4274else $as_nop
4275  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c11" >&5
4276printf "%s\n" "$ac_cv_prog_cc_c11" >&6; }
4277     CC="$CC $ac_cv_prog_cc_c11"
4278fi
4279  ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c11
4280  ac_prog_cc_stdc=c11
4281fi
4282fi
4283if test x$ac_prog_cc_stdc = xno
4284then :
4285  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C99 features" >&5
4286printf %s "checking for $CC option to enable C99 features... " >&6; }
4287if test ${ac_cv_prog_cc_c99+y}
4288then :
4289  printf %s "(cached) " >&6
4290else $as_nop
4291  ac_cv_prog_cc_c99=no
4292ac_save_CC=$CC
4293cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4294/* end confdefs.h.  */
4295$ac_c_conftest_c99_program
4296_ACEOF
4297for ac_arg in '' -std=gnu99 -std=c99 -c99 -qlanglvl=extc1x -qlanglvl=extc99 -AC99 -D_STDC_C99=
4298do
4299  CC="$ac_save_CC $ac_arg"
4300  if ac_fn_c_try_compile "$LINENO"
4301then :
4302  ac_cv_prog_cc_c99=$ac_arg
4303fi
4304rm -f core conftest.err conftest.$ac_objext conftest.beam
4305  test "x$ac_cv_prog_cc_c99" != "xno" && break
4306done
4307rm -f conftest.$ac_ext
4308CC=$ac_save_CC
4309fi
4310
4311if test "x$ac_cv_prog_cc_c99" = xno
4312then :
4313  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4314printf "%s\n" "unsupported" >&6; }
4315else $as_nop
4316  if test "x$ac_cv_prog_cc_c99" = x
4317then :
4318  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4319printf "%s\n" "none needed" >&6; }
4320else $as_nop
4321  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5
4322printf "%s\n" "$ac_cv_prog_cc_c99" >&6; }
4323     CC="$CC $ac_cv_prog_cc_c99"
4324fi
4325  ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99
4326  ac_prog_cc_stdc=c99
4327fi
4328fi
4329if test x$ac_prog_cc_stdc = xno
4330then :
4331  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C89 features" >&5
4332printf %s "checking for $CC option to enable C89 features... " >&6; }
4333if test ${ac_cv_prog_cc_c89+y}
4334then :
4335  printf %s "(cached) " >&6
4336else $as_nop
4337  ac_cv_prog_cc_c89=no
4338ac_save_CC=$CC
4339cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4340/* end confdefs.h.  */
4341$ac_c_conftest_c89_program
4342_ACEOF
4343for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
4344do
4345  CC="$ac_save_CC $ac_arg"
4346  if ac_fn_c_try_compile "$LINENO"
4347then :
4348  ac_cv_prog_cc_c89=$ac_arg
4349fi
4350rm -f core conftest.err conftest.$ac_objext conftest.beam
4351  test "x$ac_cv_prog_cc_c89" != "xno" && break
4352done
4353rm -f conftest.$ac_ext
4354CC=$ac_save_CC
4355fi
4356
4357if test "x$ac_cv_prog_cc_c89" = xno
4358then :
4359  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4360printf "%s\n" "unsupported" >&6; }
4361else $as_nop
4362  if test "x$ac_cv_prog_cc_c89" = x
4363then :
4364  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4365printf "%s\n" "none needed" >&6; }
4366else $as_nop
4367  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4368printf "%s\n" "$ac_cv_prog_cc_c89" >&6; }
4369     CC="$CC $ac_cv_prog_cc_c89"
4370fi
4371  ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89
4372  ac_prog_cc_stdc=c89
4373fi
4374fi
4375
4376ac_ext=c
4377ac_cpp='$CPP $CPPFLAGS'
4378ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4379ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4380ac_compiler_gnu=$ac_cv_c_compiler_gnu
4381
4382
4383ac_header= ac_cache=
4384for ac_item in $ac_header_c_list
4385do
4386  if test $ac_cache; then
4387    ac_fn_c_check_header_compile "$LINENO" $ac_header ac_cv_header_$ac_cache "$ac_includes_default"
4388    if eval test \"x\$ac_cv_header_$ac_cache\" = xyes; then
4389      printf "%s\n" "#define $ac_item 1" >> confdefs.h
4390    fi
4391    ac_header= ac_cache=
4392  elif test $ac_header; then
4393    ac_cache=$ac_item
4394  else
4395    ac_header=$ac_item
4396  fi
4397done
4398
4399
4400
4401
4402
4403
4404
4405
4406if test $ac_cv_header_stdlib_h = yes && test $ac_cv_header_string_h = yes
4407then :
4408
4409printf "%s\n" "#define STDC_HEADERS 1" >>confdefs.h
4410
4411fi
4412
4413
4414
4415
4416
4417
4418  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
4419printf %s "checking whether it is safe to define __EXTENSIONS__... " >&6; }
4420if test ${ac_cv_safe_to_define___extensions__+y}
4421then :
4422  printf %s "(cached) " >&6
4423else $as_nop
4424  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4425/* end confdefs.h.  */
4426
4427#         define __EXTENSIONS__ 1
4428          $ac_includes_default
4429int
4430main (void)
4431{
4432
4433  ;
4434  return 0;
4435}
4436_ACEOF
4437if ac_fn_c_try_compile "$LINENO"
4438then :
4439  ac_cv_safe_to_define___extensions__=yes
4440else $as_nop
4441  ac_cv_safe_to_define___extensions__=no
4442fi
4443rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
4444fi
4445{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
4446printf "%s\n" "$ac_cv_safe_to_define___extensions__" >&6; }
4447
4448  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether _XOPEN_SOURCE should be defined" >&5
4449printf %s "checking whether _XOPEN_SOURCE should be defined... " >&6; }
4450if test ${ac_cv_should_define__xopen_source+y}
4451then :
4452  printf %s "(cached) " >&6
4453else $as_nop
4454  ac_cv_should_define__xopen_source=no
4455    if test $ac_cv_header_wchar_h = yes
4456then :
4457  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4458/* end confdefs.h.  */
4459
4460          #include <wchar.h>
4461          mbstate_t x;
4462int
4463main (void)
4464{
4465
4466  ;
4467  return 0;
4468}
4469_ACEOF
4470if ac_fn_c_try_compile "$LINENO"
4471then :
4472
4473else $as_nop
4474  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4475/* end confdefs.h.  */
4476
4477            #define _XOPEN_SOURCE 500
4478            #include <wchar.h>
4479            mbstate_t x;
4480int
4481main (void)
4482{
4483
4484  ;
4485  return 0;
4486}
4487_ACEOF
4488if ac_fn_c_try_compile "$LINENO"
4489then :
4490  ac_cv_should_define__xopen_source=yes
4491fi
4492rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
4493fi
4494rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
4495fi
4496fi
4497{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_should_define__xopen_source" >&5
4498printf "%s\n" "$ac_cv_should_define__xopen_source" >&6; }
4499
4500  printf "%s\n" "#define _ALL_SOURCE 1" >>confdefs.h
4501
4502  printf "%s\n" "#define _DARWIN_C_SOURCE 1" >>confdefs.h
4503
4504  printf "%s\n" "#define _GNU_SOURCE 1" >>confdefs.h
4505
4506  printf "%s\n" "#define _HPUX_ALT_XOPEN_SOCKET_API 1" >>confdefs.h
4507
4508  printf "%s\n" "#define _NETBSD_SOURCE 1" >>confdefs.h
4509
4510  printf "%s\n" "#define _OPENBSD_SOURCE 1" >>confdefs.h
4511
4512  printf "%s\n" "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
4513
4514  printf "%s\n" "#define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1" >>confdefs.h
4515
4516  printf "%s\n" "#define __STDC_WANT_IEC_60559_BFP_EXT__ 1" >>confdefs.h
4517
4518  printf "%s\n" "#define __STDC_WANT_IEC_60559_DFP_EXT__ 1" >>confdefs.h
4519
4520  printf "%s\n" "#define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1" >>confdefs.h
4521
4522  printf "%s\n" "#define __STDC_WANT_IEC_60559_TYPES_EXT__ 1" >>confdefs.h
4523
4524  printf "%s\n" "#define __STDC_WANT_LIB_EXT2__ 1" >>confdefs.h
4525
4526  printf "%s\n" "#define __STDC_WANT_MATH_SPEC_FUNCS__ 1" >>confdefs.h
4527
4528  printf "%s\n" "#define _TANDEM_SOURCE 1" >>confdefs.h
4529
4530  if test $ac_cv_header_minix_config_h = yes
4531then :
4532  MINIX=yes
4533    printf "%s\n" "#define _MINIX 1" >>confdefs.h
4534
4535    printf "%s\n" "#define _POSIX_SOURCE 1" >>confdefs.h
4536
4537    printf "%s\n" "#define _POSIX_1_SOURCE 2" >>confdefs.h
4538
4539else $as_nop
4540  MINIX=
4541fi
4542  if test $ac_cv_safe_to_define___extensions__ = yes
4543then :
4544  printf "%s\n" "#define __EXTENSIONS__ 1" >>confdefs.h
4545
4546fi
4547  if test $ac_cv_should_define__xopen_source = yes
4548then :
4549  printf "%s\n" "#define _XOPEN_SOURCE 500" >>confdefs.h
4550
4551fi
4552
4553if test "$ac_cv_header_minix_config_h" = "yes"; then
4554
4555printf "%s\n" "#define _NETBSD_SOURCE 1" >>confdefs.h
4556
4557fi
4558
4559case "$prefix" in
4560        NONE)
4561		prefix="/usr/local"
4562        ;;
4563esac
4564case "$exec_prefix" in
4565        NONE)
4566		exec_prefix="$prefix"
4567        ;;
4568esac
4569
4570# are we on MinGW?
4571if uname -s 2>&1 | grep MINGW >/dev/null; then on_mingw="yes"
4572else
4573	if echo $host | grep mingw >/dev/null; then on_mingw="yes"
4574	else on_mingw="no"; fi
4575fi
4576
4577#
4578# Determine configuration file
4579# the eval is to evaluate shell expansion twice
4580UNBOUND_SBIN_DIR=`eval echo "${sbindir}"`
4581
4582UNBOUND_SYSCONF_DIR=`eval echo "${sysconfdir}"`
4583
4584UNBOUND_LOCALSTATE_DIR=`eval echo "${localstatedir}"`
4585
4586if test $on_mingw = "no"; then
4587  ub_conf_file=`eval echo "${sysconfdir}/unbound/unbound.conf"`
4588else
4589  ub_conf_file="C:\\Program Files\\Unbound\\service.conf"
4590fi
4591
4592# Check whether --with-conf_file was given.
4593if test ${with_conf_file+y}
4594then :
4595  withval=$with_conf_file; ub_conf_file="$withval"
4596fi
4597
4598
4599hdr_config="`echo $ub_conf_file | sed -e 's/\\\\/\\\\\\\\/g'`"
4600
4601
4602printf "%s\n" "#define CONFIGFILE \"$hdr_config\"" >>confdefs.h
4603
4604ub_conf_dir=`$as_dirname -- "$ub_conf_file" ||
4605$as_expr X"$ub_conf_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
4606	 X"$ub_conf_file" : 'X\(//\)[^/]' \| \
4607	 X"$ub_conf_file" : 'X\(//\)$' \| \
4608	 X"$ub_conf_file" : 'X\(/\)' \| . 2>/dev/null ||
4609printf "%s\n" X"$ub_conf_file" |
4610    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
4611	    s//\1/
4612	    q
4613	  }
4614	  /^X\(\/\/\)[^/].*/{
4615	    s//\1/
4616	    q
4617	  }
4618	  /^X\(\/\/\)$/{
4619	    s//\1/
4620	    q
4621	  }
4622	  /^X\(\/\).*/{
4623	    s//\1/
4624	    q
4625	  }
4626	  s/.*/./; q'`
4627
4628
4629# Determine run, chroot directory and pidfile locations
4630
4631# Check whether --with-run-dir was given.
4632if test ${with_run_dir+y}
4633then :
4634  withval=$with_run_dir; UNBOUND_RUN_DIR="$withval"
4635else $as_nop
4636  if test $on_mingw = no; then
4637    UNBOUND_RUN_DIR=`dirname "$ub_conf_file"`
4638else
4639    UNBOUND_RUN_DIR=""
4640fi
4641
4642fi
4643
4644
4645hdr_run="`echo $UNBOUND_RUN_DIR | sed -e 's/\\\\/\\\\\\\\/g'`"
4646
4647
4648printf "%s\n" "#define RUN_DIR \"$hdr_run\"" >>confdefs.h
4649
4650
4651
4652# Check whether --with-chroot-dir was given.
4653if test ${with_chroot_dir+y}
4654then :
4655  withval=$with_chroot_dir; UNBOUND_CHROOT_DIR="$withval"
4656else $as_nop
4657  if test $on_mingw = no; then
4658    UNBOUND_CHROOT_DIR="$UNBOUND_RUN_DIR"
4659else
4660    UNBOUND_CHROOT_DIR=""
4661fi
4662
4663fi
4664
4665
4666hdr_chroot="`echo $UNBOUND_CHROOT_DIR | sed -e 's/\\\\/\\\\\\\\/g'`"
4667
4668
4669printf "%s\n" "#define CHROOT_DIR \"$hdr_chroot\"" >>confdefs.h
4670
4671
4672
4673# Check whether --with-share-dir was given.
4674if test ${with_share_dir+y}
4675then :
4676  withval=$with_share_dir; UNBOUND_SHARE_DIR="$withval"
4677else $as_nop
4678  UNBOUND_SHARE_DIR="$UNBOUND_RUN_DIR"
4679fi
4680
4681
4682
4683printf "%s\n" "#define SHARE_DIR \"$UNBOUND_SHARE_DIR\"" >>confdefs.h
4684
4685
4686
4687# Check whether --with-pidfile was given.
4688if test ${with_pidfile+y}
4689then :
4690  withval=$with_pidfile; UNBOUND_PIDFILE="$withval"
4691else $as_nop
4692  if test $on_mingw = no; then
4693    UNBOUND_PIDFILE="$UNBOUND_RUN_DIR/unbound.pid"
4694else
4695    UNBOUND_PIDFILE=""
4696fi
4697
4698fi
4699
4700
4701hdr_pid="`echo $UNBOUND_PIDFILE | sed -e 's/\\\\/\\\\\\\\/g'`"
4702
4703
4704printf "%s\n" "#define PIDFILE \"$hdr_pid\"" >>confdefs.h
4705
4706
4707
4708# Check whether --with-rootkey-file was given.
4709if test ${with_rootkey_file+y}
4710then :
4711  withval=$with_rootkey_file; UNBOUND_ROOTKEY_FILE="$withval"
4712else $as_nop
4713  if test $on_mingw = no; then
4714    UNBOUND_ROOTKEY_FILE="$UNBOUND_RUN_DIR/root.key"
4715else
4716    UNBOUND_ROOTKEY_FILE="C:\\Program Files\\Unbound\\root.key"
4717fi
4718
4719fi
4720
4721
4722hdr_rkey="`echo $UNBOUND_ROOTKEY_FILE | sed -e 's/\\\\/\\\\\\\\/g'`"
4723
4724
4725printf "%s\n" "#define ROOT_ANCHOR_FILE \"$hdr_rkey\"" >>confdefs.h
4726
4727
4728
4729# Check whether --with-rootcert-file was given.
4730if test ${with_rootcert_file+y}
4731then :
4732  withval=$with_rootcert_file; UNBOUND_ROOTCERT_FILE="$withval"
4733else $as_nop
4734  if test $on_mingw = no; then
4735    UNBOUND_ROOTCERT_FILE="$UNBOUND_RUN_DIR/icannbundle.pem"
4736else
4737    UNBOUND_ROOTCERT_FILE="C:\\Program Files\\Unbound\\icannbundle.pem"
4738fi
4739
4740fi
4741
4742
4743hdr_rpem="`echo $UNBOUND_ROOTCERT_FILE | sed -e 's/\\\\/\\\\\\\\/g'`"
4744
4745
4746printf "%s\n" "#define ROOT_CERT_FILE \"$hdr_rpem\"" >>confdefs.h
4747
4748
4749
4750# Check whether --with-username was given.
4751if test ${with_username+y}
4752then :
4753  withval=$with_username; UNBOUND_USERNAME="$withval"
4754else $as_nop
4755  UNBOUND_USERNAME="unbound"
4756fi
4757
4758
4759
4760printf "%s\n" "#define UB_USERNAME \"$UNBOUND_USERNAME\"" >>confdefs.h
4761
4762
4763
4764printf "%s\n" "#define WINVER 0x0502" >>confdefs.h
4765
4766wnvs=`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/' `
4767
4768
4769printf "%s\n" "#define RSRC_PACKAGE_VERSION $wnvs" >>confdefs.h
4770
4771
4772# Check for 'grep -e' program, here, since ACX_CHECK_FLTO needs that.
4773{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4774printf %s "checking for grep that handles long lines and -e... " >&6; }
4775if test ${ac_cv_path_GREP+y}
4776then :
4777  printf %s "(cached) " >&6
4778else $as_nop
4779  if test -z "$GREP"; then
4780  ac_path_GREP_found=false
4781  # Loop through the user's path and test for each of PROGNAME-LIST
4782  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4783for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4784do
4785  IFS=$as_save_IFS
4786  case $as_dir in #(((
4787    '') as_dir=./ ;;
4788    */) ;;
4789    *) as_dir=$as_dir/ ;;
4790  esac
4791    for ac_prog in grep ggrep
4792   do
4793    for ac_exec_ext in '' $ac_executable_extensions; do
4794      ac_path_GREP="$as_dir$ac_prog$ac_exec_ext"
4795      as_fn_executable_p "$ac_path_GREP" || continue
4796# Check for GNU ac_path_GREP and select it if it is found.
4797  # Check for GNU $ac_path_GREP
4798case `"$ac_path_GREP" --version 2>&1` in
4799*GNU*)
4800  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4801*)
4802  ac_count=0
4803  printf %s 0123456789 >"conftest.in"
4804  while :
4805  do
4806    cat "conftest.in" "conftest.in" >"conftest.tmp"
4807    mv "conftest.tmp" "conftest.in"
4808    cp "conftest.in" "conftest.nl"
4809    printf "%s\n" 'GREP' >> "conftest.nl"
4810    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4811    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4812    as_fn_arith $ac_count + 1 && ac_count=$as_val
4813    if test $ac_count -gt ${ac_path_GREP_max-0}; then
4814      # Best one so far, save it but keep looking for a better one
4815      ac_cv_path_GREP="$ac_path_GREP"
4816      ac_path_GREP_max=$ac_count
4817    fi
4818    # 10*(2^10) chars as input seems more than enough
4819    test $ac_count -gt 10 && break
4820  done
4821  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4822esac
4823
4824      $ac_path_GREP_found && break 3
4825    done
4826  done
4827  done
4828IFS=$as_save_IFS
4829  if test -z "$ac_cv_path_GREP"; then
4830    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4831  fi
4832else
4833  ac_cv_path_GREP=$GREP
4834fi
4835
4836fi
4837{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4838printf "%s\n" "$ac_cv_path_GREP" >&6; }
4839 GREP="$ac_cv_path_GREP"
4840
4841
4842
4843# Checks for typedefs, structures, and compiler characteristics.
4844{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
4845printf %s "checking for an ANSI C-conforming const... " >&6; }
4846if test ${ac_cv_c_const+y}
4847then :
4848  printf %s "(cached) " >&6
4849else $as_nop
4850  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4851/* end confdefs.h.  */
4852
4853int
4854main (void)
4855{
4856
4857#ifndef __cplusplus
4858  /* Ultrix mips cc rejects this sort of thing.  */
4859  typedef int charset[2];
4860  const charset cs = { 0, 0 };
4861  /* SunOS 4.1.1 cc rejects this.  */
4862  char const *const *pcpcc;
4863  char **ppc;
4864  /* NEC SVR4.0.2 mips cc rejects this.  */
4865  struct point {int x, y;};
4866  static struct point const zero = {0,0};
4867  /* IBM XL C 1.02.0.0 rejects this.
4868     It does not let you subtract one const X* pointer from another in
4869     an arm of an if-expression whose if-part is not a constant
4870     expression */
4871  const char *g = "string";
4872  pcpcc = &g + (g ? g-g : 0);
4873  /* HPUX 7.0 cc rejects these. */
4874  ++pcpcc;
4875  ppc = (char**) pcpcc;
4876  pcpcc = (char const *const *) ppc;
4877  { /* SCO 3.2v4 cc rejects this sort of thing.  */
4878    char tx;
4879    char *t = &tx;
4880    char const *s = 0 ? (char *) 0 : (char const *) 0;
4881
4882    *t++ = 0;
4883    if (s) return 0;
4884  }
4885  { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
4886    int x[] = {25, 17};
4887    const int *foo = &x[0];
4888    ++foo;
4889  }
4890  { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
4891    typedef const int *iptr;
4892    iptr p = 0;
4893    ++p;
4894  }
4895  { /* IBM XL C 1.02.0.0 rejects this sort of thing, saying
4896       "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
4897    struct s { int j; const int *ap[3]; } bx;
4898    struct s *b = &bx; b->j = 5;
4899  }
4900  { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
4901    const int foo = 10;
4902    if (!foo) return 0;
4903  }
4904  return !cs[0] && !zero.x;
4905#endif
4906
4907  ;
4908  return 0;
4909}
4910_ACEOF
4911if ac_fn_c_try_compile "$LINENO"
4912then :
4913  ac_cv_c_const=yes
4914else $as_nop
4915  ac_cv_c_const=no
4916fi
4917rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
4918fi
4919{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
4920printf "%s\n" "$ac_cv_c_const" >&6; }
4921if test $ac_cv_c_const = no; then
4922
4923printf "%s\n" "#define const /**/" >>confdefs.h
4924
4925fi
4926
4927ac_ext=c
4928ac_cpp='$CPP $CPPFLAGS'
4929ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4930ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4931ac_compiler_gnu=$ac_cv_c_compiler_gnu
4932
4933# allow user to override the -g -O2 flags.
4934default_cflags=no
4935if test "x$CFLAGS" = "x" ; then
4936
4937
4938{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -g" >&5
4939printf %s "checking whether $CC supports -g... " >&6; }
4940cache=`echo g | sed 'y%.=/+-%___p_%'`
4941if eval test \${cv_prog_cc_flag_$cache+y}
4942then :
4943  printf %s "(cached) " >&6
4944else $as_nop
4945
4946echo 'void f(void){}' >conftest.c
4947if test -z "`$CC $CPPFLAGS $CFLAGS -g -c conftest.c 2>&1`"; then
4948eval "cv_prog_cc_flag_$cache=yes"
4949else
4950eval "cv_prog_cc_flag_$cache=no"
4951fi
4952rm -f conftest conftest.o conftest.c
4953
4954fi
4955
4956if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
4957{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4958printf "%s\n" "yes" >&6; }
4959:
4960CFLAGS="$CFLAGS -g"
4961else
4962{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4963printf "%s\n" "no" >&6; }
4964:
4965
4966fi
4967
4968
4969
4970{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -O2" >&5
4971printf %s "checking whether $CC supports -O2... " >&6; }
4972cache=`echo O2 | sed 'y%.=/+-%___p_%'`
4973if eval test \${cv_prog_cc_flag_$cache+y}
4974then :
4975  printf %s "(cached) " >&6
4976else $as_nop
4977
4978echo 'void f(void){}' >conftest.c
4979if test -z "`$CC $CPPFLAGS $CFLAGS -O2 -c conftest.c 2>&1`"; then
4980eval "cv_prog_cc_flag_$cache=yes"
4981else
4982eval "cv_prog_cc_flag_$cache=no"
4983fi
4984rm -f conftest conftest.o conftest.c
4985
4986fi
4987
4988if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
4989{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4990printf "%s\n" "yes" >&6; }
4991:
4992CFLAGS="$CFLAGS -O2"
4993else
4994{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4995printf "%s\n" "no" >&6; }
4996:
4997
4998fi
4999
5000default_cflags=yes
5001fi
5002ac_ext=c
5003ac_cpp='$CPP $CPPFLAGS'
5004ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5005ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5006ac_compiler_gnu=$ac_cv_c_compiler_gnu
5007if test -n "$ac_tool_prefix"; then
5008  # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
5009set dummy ${ac_tool_prefix}gcc; ac_word=$2
5010{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5011printf %s "checking for $ac_word... " >&6; }
5012if test ${ac_cv_prog_CC+y}
5013then :
5014  printf %s "(cached) " >&6
5015else $as_nop
5016  if test -n "$CC"; then
5017  ac_cv_prog_CC="$CC" # Let the user override the test.
5018else
5019as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5020for as_dir in $PATH
5021do
5022  IFS=$as_save_IFS
5023  case $as_dir in #(((
5024    '') as_dir=./ ;;
5025    */) ;;
5026    *) as_dir=$as_dir/ ;;
5027  esac
5028    for ac_exec_ext in '' $ac_executable_extensions; do
5029  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
5030    ac_cv_prog_CC="${ac_tool_prefix}gcc"
5031    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
5032    break 2
5033  fi
5034done
5035  done
5036IFS=$as_save_IFS
5037
5038fi
5039fi
5040CC=$ac_cv_prog_CC
5041if test -n "$CC"; then
5042  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5043printf "%s\n" "$CC" >&6; }
5044else
5045  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5046printf "%s\n" "no" >&6; }
5047fi
5048
5049
5050fi
5051if test -z "$ac_cv_prog_CC"; then
5052  ac_ct_CC=$CC
5053  # Extract the first word of "gcc", so it can be a program name with args.
5054set dummy gcc; ac_word=$2
5055{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5056printf %s "checking for $ac_word... " >&6; }
5057if test ${ac_cv_prog_ac_ct_CC+y}
5058then :
5059  printf %s "(cached) " >&6
5060else $as_nop
5061  if test -n "$ac_ct_CC"; then
5062  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
5063else
5064as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5065for as_dir in $PATH
5066do
5067  IFS=$as_save_IFS
5068  case $as_dir in #(((
5069    '') as_dir=./ ;;
5070    */) ;;
5071    *) as_dir=$as_dir/ ;;
5072  esac
5073    for ac_exec_ext in '' $ac_executable_extensions; do
5074  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
5075    ac_cv_prog_ac_ct_CC="gcc"
5076    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
5077    break 2
5078  fi
5079done
5080  done
5081IFS=$as_save_IFS
5082
5083fi
5084fi
5085ac_ct_CC=$ac_cv_prog_ac_ct_CC
5086if test -n "$ac_ct_CC"; then
5087  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
5088printf "%s\n" "$ac_ct_CC" >&6; }
5089else
5090  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5091printf "%s\n" "no" >&6; }
5092fi
5093
5094  if test "x$ac_ct_CC" = x; then
5095    CC=""
5096  else
5097    case $cross_compiling:$ac_tool_warned in
5098yes:)
5099{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5100printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5101ac_tool_warned=yes ;;
5102esac
5103    CC=$ac_ct_CC
5104  fi
5105else
5106  CC="$ac_cv_prog_CC"
5107fi
5108
5109if test -z "$CC"; then
5110          if test -n "$ac_tool_prefix"; then
5111    # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
5112set dummy ${ac_tool_prefix}cc; ac_word=$2
5113{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5114printf %s "checking for $ac_word... " >&6; }
5115if test ${ac_cv_prog_CC+y}
5116then :
5117  printf %s "(cached) " >&6
5118else $as_nop
5119  if test -n "$CC"; then
5120  ac_cv_prog_CC="$CC" # Let the user override the test.
5121else
5122as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5123for as_dir in $PATH
5124do
5125  IFS=$as_save_IFS
5126  case $as_dir in #(((
5127    '') as_dir=./ ;;
5128    */) ;;
5129    *) as_dir=$as_dir/ ;;
5130  esac
5131    for ac_exec_ext in '' $ac_executable_extensions; do
5132  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
5133    ac_cv_prog_CC="${ac_tool_prefix}cc"
5134    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
5135    break 2
5136  fi
5137done
5138  done
5139IFS=$as_save_IFS
5140
5141fi
5142fi
5143CC=$ac_cv_prog_CC
5144if test -n "$CC"; then
5145  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5146printf "%s\n" "$CC" >&6; }
5147else
5148  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5149printf "%s\n" "no" >&6; }
5150fi
5151
5152
5153  fi
5154fi
5155if test -z "$CC"; then
5156  # Extract the first word of "cc", so it can be a program name with args.
5157set dummy cc; ac_word=$2
5158{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5159printf %s "checking for $ac_word... " >&6; }
5160if test ${ac_cv_prog_CC+y}
5161then :
5162  printf %s "(cached) " >&6
5163else $as_nop
5164  if test -n "$CC"; then
5165  ac_cv_prog_CC="$CC" # Let the user override the test.
5166else
5167  ac_prog_rejected=no
5168as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5169for as_dir in $PATH
5170do
5171  IFS=$as_save_IFS
5172  case $as_dir in #(((
5173    '') as_dir=./ ;;
5174    */) ;;
5175    *) as_dir=$as_dir/ ;;
5176  esac
5177    for ac_exec_ext in '' $ac_executable_extensions; do
5178  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
5179    if test "$as_dir$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
5180       ac_prog_rejected=yes
5181       continue
5182     fi
5183    ac_cv_prog_CC="cc"
5184    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
5185    break 2
5186  fi
5187done
5188  done
5189IFS=$as_save_IFS
5190
5191if test $ac_prog_rejected = yes; then
5192  # We found a bogon in the path, so make sure we never use it.
5193  set dummy $ac_cv_prog_CC
5194  shift
5195  if test $# != 0; then
5196    # We chose a different compiler from the bogus one.
5197    # However, it has the same basename, so the bogon will be chosen
5198    # first if we set CC to just the basename; use the full file name.
5199    shift
5200    ac_cv_prog_CC="$as_dir$ac_word${1+' '}$@"
5201  fi
5202fi
5203fi
5204fi
5205CC=$ac_cv_prog_CC
5206if test -n "$CC"; then
5207  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5208printf "%s\n" "$CC" >&6; }
5209else
5210  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5211printf "%s\n" "no" >&6; }
5212fi
5213
5214
5215fi
5216if test -z "$CC"; then
5217  if test -n "$ac_tool_prefix"; then
5218  for ac_prog in cl.exe
5219  do
5220    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5221set dummy $ac_tool_prefix$ac_prog; ac_word=$2
5222{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5223printf %s "checking for $ac_word... " >&6; }
5224if test ${ac_cv_prog_CC+y}
5225then :
5226  printf %s "(cached) " >&6
5227else $as_nop
5228  if test -n "$CC"; then
5229  ac_cv_prog_CC="$CC" # Let the user override the test.
5230else
5231as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5232for as_dir in $PATH
5233do
5234  IFS=$as_save_IFS
5235  case $as_dir in #(((
5236    '') as_dir=./ ;;
5237    */) ;;
5238    *) as_dir=$as_dir/ ;;
5239  esac
5240    for ac_exec_ext in '' $ac_executable_extensions; do
5241  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
5242    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
5243    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
5244    break 2
5245  fi
5246done
5247  done
5248IFS=$as_save_IFS
5249
5250fi
5251fi
5252CC=$ac_cv_prog_CC
5253if test -n "$CC"; then
5254  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5255printf "%s\n" "$CC" >&6; }
5256else
5257  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5258printf "%s\n" "no" >&6; }
5259fi
5260
5261
5262    test -n "$CC" && break
5263  done
5264fi
5265if test -z "$CC"; then
5266  ac_ct_CC=$CC
5267  for ac_prog in cl.exe
5268do
5269  # Extract the first word of "$ac_prog", so it can be a program name with args.
5270set dummy $ac_prog; ac_word=$2
5271{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5272printf %s "checking for $ac_word... " >&6; }
5273if test ${ac_cv_prog_ac_ct_CC+y}
5274then :
5275  printf %s "(cached) " >&6
5276else $as_nop
5277  if test -n "$ac_ct_CC"; then
5278  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
5279else
5280as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5281for as_dir in $PATH
5282do
5283  IFS=$as_save_IFS
5284  case $as_dir in #(((
5285    '') as_dir=./ ;;
5286    */) ;;
5287    *) as_dir=$as_dir/ ;;
5288  esac
5289    for ac_exec_ext in '' $ac_executable_extensions; do
5290  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
5291    ac_cv_prog_ac_ct_CC="$ac_prog"
5292    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
5293    break 2
5294  fi
5295done
5296  done
5297IFS=$as_save_IFS
5298
5299fi
5300fi
5301ac_ct_CC=$ac_cv_prog_ac_ct_CC
5302if test -n "$ac_ct_CC"; then
5303  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
5304printf "%s\n" "$ac_ct_CC" >&6; }
5305else
5306  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5307printf "%s\n" "no" >&6; }
5308fi
5309
5310
5311  test -n "$ac_ct_CC" && break
5312done
5313
5314  if test "x$ac_ct_CC" = x; then
5315    CC=""
5316  else
5317    case $cross_compiling:$ac_tool_warned in
5318yes:)
5319{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5320printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5321ac_tool_warned=yes ;;
5322esac
5323    CC=$ac_ct_CC
5324  fi
5325fi
5326
5327fi
5328if test -z "$CC"; then
5329  if test -n "$ac_tool_prefix"; then
5330  # Extract the first word of "${ac_tool_prefix}clang", so it can be a program name with args.
5331set dummy ${ac_tool_prefix}clang; ac_word=$2
5332{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5333printf %s "checking for $ac_word... " >&6; }
5334if test ${ac_cv_prog_CC+y}
5335then :
5336  printf %s "(cached) " >&6
5337else $as_nop
5338  if test -n "$CC"; then
5339  ac_cv_prog_CC="$CC" # Let the user override the test.
5340else
5341as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5342for as_dir in $PATH
5343do
5344  IFS=$as_save_IFS
5345  case $as_dir in #(((
5346    '') as_dir=./ ;;
5347    */) ;;
5348    *) as_dir=$as_dir/ ;;
5349  esac
5350    for ac_exec_ext in '' $ac_executable_extensions; do
5351  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
5352    ac_cv_prog_CC="${ac_tool_prefix}clang"
5353    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
5354    break 2
5355  fi
5356done
5357  done
5358IFS=$as_save_IFS
5359
5360fi
5361fi
5362CC=$ac_cv_prog_CC
5363if test -n "$CC"; then
5364  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5365printf "%s\n" "$CC" >&6; }
5366else
5367  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5368printf "%s\n" "no" >&6; }
5369fi
5370
5371
5372fi
5373if test -z "$ac_cv_prog_CC"; then
5374  ac_ct_CC=$CC
5375  # Extract the first word of "clang", so it can be a program name with args.
5376set dummy clang; ac_word=$2
5377{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5378printf %s "checking for $ac_word... " >&6; }
5379if test ${ac_cv_prog_ac_ct_CC+y}
5380then :
5381  printf %s "(cached) " >&6
5382else $as_nop
5383  if test -n "$ac_ct_CC"; then
5384  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
5385else
5386as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5387for as_dir in $PATH
5388do
5389  IFS=$as_save_IFS
5390  case $as_dir in #(((
5391    '') as_dir=./ ;;
5392    */) ;;
5393    *) as_dir=$as_dir/ ;;
5394  esac
5395    for ac_exec_ext in '' $ac_executable_extensions; do
5396  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
5397    ac_cv_prog_ac_ct_CC="clang"
5398    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
5399    break 2
5400  fi
5401done
5402  done
5403IFS=$as_save_IFS
5404
5405fi
5406fi
5407ac_ct_CC=$ac_cv_prog_ac_ct_CC
5408if test -n "$ac_ct_CC"; then
5409  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
5410printf "%s\n" "$ac_ct_CC" >&6; }
5411else
5412  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5413printf "%s\n" "no" >&6; }
5414fi
5415
5416  if test "x$ac_ct_CC" = x; then
5417    CC=""
5418  else
5419    case $cross_compiling:$ac_tool_warned in
5420yes:)
5421{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5422printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5423ac_tool_warned=yes ;;
5424esac
5425    CC=$ac_ct_CC
5426  fi
5427else
5428  CC="$ac_cv_prog_CC"
5429fi
5430
5431fi
5432
5433
5434test -z "$CC" && { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5435printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
5436as_fn_error $? "no acceptable C compiler found in \$PATH
5437See \`config.log' for more details" "$LINENO" 5; }
5438
5439# Provide some information about the compiler.
5440printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
5441set X $ac_compile
5442ac_compiler=$2
5443for ac_option in --version -v -V -qversion -version; do
5444  { { ac_try="$ac_compiler $ac_option >&5"
5445case "(($ac_try" in
5446  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5447  *) ac_try_echo=$ac_try;;
5448esac
5449eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5450printf "%s\n" "$ac_try_echo"; } >&5
5451  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
5452  ac_status=$?
5453  if test -s conftest.err; then
5454    sed '10a\
5455... rest of stderr output deleted ...
5456         10q' conftest.err >conftest.er1
5457    cat conftest.er1 >&5
5458  fi
5459  rm -f conftest.er1 conftest.err
5460  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5461  test $ac_status = 0; }
5462done
5463
5464{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports GNU C" >&5
5465printf %s "checking whether the compiler supports GNU C... " >&6; }
5466if test ${ac_cv_c_compiler_gnu+y}
5467then :
5468  printf %s "(cached) " >&6
5469else $as_nop
5470  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5471/* end confdefs.h.  */
5472
5473int
5474main (void)
5475{
5476#ifndef __GNUC__
5477       choke me
5478#endif
5479
5480  ;
5481  return 0;
5482}
5483_ACEOF
5484if ac_fn_c_try_compile "$LINENO"
5485then :
5486  ac_compiler_gnu=yes
5487else $as_nop
5488  ac_compiler_gnu=no
5489fi
5490rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
5491ac_cv_c_compiler_gnu=$ac_compiler_gnu
5492
5493fi
5494{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
5495printf "%s\n" "$ac_cv_c_compiler_gnu" >&6; }
5496ac_compiler_gnu=$ac_cv_c_compiler_gnu
5497
5498if test $ac_compiler_gnu = yes; then
5499  GCC=yes
5500else
5501  GCC=
5502fi
5503ac_test_CFLAGS=${CFLAGS+y}
5504ac_save_CFLAGS=$CFLAGS
5505{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
5506printf %s "checking whether $CC accepts -g... " >&6; }
5507if test ${ac_cv_prog_cc_g+y}
5508then :
5509  printf %s "(cached) " >&6
5510else $as_nop
5511  ac_save_c_werror_flag=$ac_c_werror_flag
5512   ac_c_werror_flag=yes
5513   ac_cv_prog_cc_g=no
5514   CFLAGS="-g"
5515   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5516/* end confdefs.h.  */
5517
5518int
5519main (void)
5520{
5521
5522  ;
5523  return 0;
5524}
5525_ACEOF
5526if ac_fn_c_try_compile "$LINENO"
5527then :
5528  ac_cv_prog_cc_g=yes
5529else $as_nop
5530  CFLAGS=""
5531      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5532/* end confdefs.h.  */
5533
5534int
5535main (void)
5536{
5537
5538  ;
5539  return 0;
5540}
5541_ACEOF
5542if ac_fn_c_try_compile "$LINENO"
5543then :
5544
5545else $as_nop
5546  ac_c_werror_flag=$ac_save_c_werror_flag
5547	 CFLAGS="-g"
5548	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5549/* end confdefs.h.  */
5550
5551int
5552main (void)
5553{
5554
5555  ;
5556  return 0;
5557}
5558_ACEOF
5559if ac_fn_c_try_compile "$LINENO"
5560then :
5561  ac_cv_prog_cc_g=yes
5562fi
5563rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
5564fi
5565rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
5566fi
5567rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
5568   ac_c_werror_flag=$ac_save_c_werror_flag
5569fi
5570{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
5571printf "%s\n" "$ac_cv_prog_cc_g" >&6; }
5572if test $ac_test_CFLAGS; then
5573  CFLAGS=$ac_save_CFLAGS
5574elif test $ac_cv_prog_cc_g = yes; then
5575  if test "$GCC" = yes; then
5576    CFLAGS="-g -O2"
5577  else
5578    CFLAGS="-g"
5579  fi
5580else
5581  if test "$GCC" = yes; then
5582    CFLAGS="-O2"
5583  else
5584    CFLAGS=
5585  fi
5586fi
5587ac_prog_cc_stdc=no
5588if test x$ac_prog_cc_stdc = xno
5589then :
5590  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C11 features" >&5
5591printf %s "checking for $CC option to enable C11 features... " >&6; }
5592if test ${ac_cv_prog_cc_c11+y}
5593then :
5594  printf %s "(cached) " >&6
5595else $as_nop
5596  ac_cv_prog_cc_c11=no
5597ac_save_CC=$CC
5598cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5599/* end confdefs.h.  */
5600$ac_c_conftest_c11_program
5601_ACEOF
5602for ac_arg in '' -std=gnu11
5603do
5604  CC="$ac_save_CC $ac_arg"
5605  if ac_fn_c_try_compile "$LINENO"
5606then :
5607  ac_cv_prog_cc_c11=$ac_arg
5608fi
5609rm -f core conftest.err conftest.$ac_objext conftest.beam
5610  test "x$ac_cv_prog_cc_c11" != "xno" && break
5611done
5612rm -f conftest.$ac_ext
5613CC=$ac_save_CC
5614fi
5615
5616if test "x$ac_cv_prog_cc_c11" = xno
5617then :
5618  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
5619printf "%s\n" "unsupported" >&6; }
5620else $as_nop
5621  if test "x$ac_cv_prog_cc_c11" = x
5622then :
5623  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
5624printf "%s\n" "none needed" >&6; }
5625else $as_nop
5626  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c11" >&5
5627printf "%s\n" "$ac_cv_prog_cc_c11" >&6; }
5628     CC="$CC $ac_cv_prog_cc_c11"
5629fi
5630  ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c11
5631  ac_prog_cc_stdc=c11
5632fi
5633fi
5634if test x$ac_prog_cc_stdc = xno
5635then :
5636  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C99 features" >&5
5637printf %s "checking for $CC option to enable C99 features... " >&6; }
5638if test ${ac_cv_prog_cc_c99+y}
5639then :
5640  printf %s "(cached) " >&6
5641else $as_nop
5642  ac_cv_prog_cc_c99=no
5643ac_save_CC=$CC
5644cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5645/* end confdefs.h.  */
5646$ac_c_conftest_c99_program
5647_ACEOF
5648for ac_arg in '' -std=gnu99 -std=c99 -c99 -qlanglvl=extc1x -qlanglvl=extc99 -AC99 -D_STDC_C99=
5649do
5650  CC="$ac_save_CC $ac_arg"
5651  if ac_fn_c_try_compile "$LINENO"
5652then :
5653  ac_cv_prog_cc_c99=$ac_arg
5654fi
5655rm -f core conftest.err conftest.$ac_objext conftest.beam
5656  test "x$ac_cv_prog_cc_c99" != "xno" && break
5657done
5658rm -f conftest.$ac_ext
5659CC=$ac_save_CC
5660fi
5661
5662if test "x$ac_cv_prog_cc_c99" = xno
5663then :
5664  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
5665printf "%s\n" "unsupported" >&6; }
5666else $as_nop
5667  if test "x$ac_cv_prog_cc_c99" = x
5668then :
5669  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
5670printf "%s\n" "none needed" >&6; }
5671else $as_nop
5672  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5
5673printf "%s\n" "$ac_cv_prog_cc_c99" >&6; }
5674     CC="$CC $ac_cv_prog_cc_c99"
5675fi
5676  ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99
5677  ac_prog_cc_stdc=c99
5678fi
5679fi
5680if test x$ac_prog_cc_stdc = xno
5681then :
5682  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C89 features" >&5
5683printf %s "checking for $CC option to enable C89 features... " >&6; }
5684if test ${ac_cv_prog_cc_c89+y}
5685then :
5686  printf %s "(cached) " >&6
5687else $as_nop
5688  ac_cv_prog_cc_c89=no
5689ac_save_CC=$CC
5690cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5691/* end confdefs.h.  */
5692$ac_c_conftest_c89_program
5693_ACEOF
5694for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
5695do
5696  CC="$ac_save_CC $ac_arg"
5697  if ac_fn_c_try_compile "$LINENO"
5698then :
5699  ac_cv_prog_cc_c89=$ac_arg
5700fi
5701rm -f core conftest.err conftest.$ac_objext conftest.beam
5702  test "x$ac_cv_prog_cc_c89" != "xno" && break
5703done
5704rm -f conftest.$ac_ext
5705CC=$ac_save_CC
5706fi
5707
5708if test "x$ac_cv_prog_cc_c89" = xno
5709then :
5710  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
5711printf "%s\n" "unsupported" >&6; }
5712else $as_nop
5713  if test "x$ac_cv_prog_cc_c89" = x
5714then :
5715  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
5716printf "%s\n" "none needed" >&6; }
5717else $as_nop
5718  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
5719printf "%s\n" "$ac_cv_prog_cc_c89" >&6; }
5720     CC="$CC $ac_cv_prog_cc_c89"
5721fi
5722  ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89
5723  ac_prog_cc_stdc=c89
5724fi
5725fi
5726
5727ac_ext=c
5728ac_cpp='$CPP $CPPFLAGS'
5729ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5730ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5731ac_compiler_gnu=$ac_cv_c_compiler_gnu
5732
5733
5734{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking $CC dependency flag" >&5
5735printf %s "checking $CC dependency flag... " >&6; }
5736echo 'void f(void){}' >conftest.c
5737if test "`$CC -MM conftest.c 2>&1`" = "conftest.o: conftest.c"; then
5738	DEPFLAG="-MM"
5739else
5740  if test "`$CC -xM1 conftest.c 2>&1`" = "conftest.o: conftest.c"; then
5741	DEPFLAG="-xM1"
5742  else
5743	DEPFLAG="-MM"  # dunno do something
5744  fi
5745fi
5746{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $DEPFLAG" >&5
5747printf "%s\n" "$DEPFLAG" >&6; }
5748rm -f conftest.c
5749
5750
5751
5752
5753
5754{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Werror" >&5
5755printf %s "checking whether $CC supports -Werror... " >&6; }
5756cache=`echo Werror | sed 'y%.=/+-%___p_%'`
5757if eval test \${cv_prog_cc_flag_$cache+y}
5758then :
5759  printf %s "(cached) " >&6
5760else $as_nop
5761
5762echo 'void f(void){}' >conftest.c
5763if test -z "`$CC $CPPFLAGS $CFLAGS -Werror -c conftest.c 2>&1`"; then
5764eval "cv_prog_cc_flag_$cache=yes"
5765else
5766eval "cv_prog_cc_flag_$cache=no"
5767fi
5768rm -f conftest conftest.o conftest.c
5769
5770fi
5771
5772if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
5773{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5774printf "%s\n" "yes" >&6; }
5775:
5776ERRFLAG="-Werror"
5777else
5778{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5779printf "%s\n" "no" >&6; }
5780:
5781ERRFLAG="-errwarn"
5782fi
5783
5784
5785
5786{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wall" >&5
5787printf %s "checking whether $CC supports -Wall... " >&6; }
5788cache=`echo Wall | sed 'y%.=/+-%___p_%'`
5789if eval test \${cv_prog_cc_flag_$cache+y}
5790then :
5791  printf %s "(cached) " >&6
5792else $as_nop
5793
5794echo 'void f(void){}' >conftest.c
5795if test -z "`$CC $CPPFLAGS $CFLAGS -Wall -c conftest.c 2>&1`"; then
5796eval "cv_prog_cc_flag_$cache=yes"
5797else
5798eval "cv_prog_cc_flag_$cache=no"
5799fi
5800rm -f conftest conftest.o conftest.c
5801
5802fi
5803
5804if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
5805{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5806printf "%s\n" "yes" >&6; }
5807:
5808ERRFLAG="$ERRFLAG -Wall"
5809else
5810{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5811printf "%s\n" "no" >&6; }
5812:
5813ERRFLAG="$ERRFLAG -errfmt"
5814fi
5815
5816
5817
5818
5819
5820{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -std=c99" >&5
5821printf %s "checking whether $CC supports -std=c99... " >&6; }
5822cache=`echo std=c99 | sed 'y%.=/+-%___p_%'`
5823if eval test \${cv_prog_cc_flag_$cache+y}
5824then :
5825  printf %s "(cached) " >&6
5826else $as_nop
5827
5828echo 'void f(void){}' >conftest.c
5829if test -z "`$CC $CPPFLAGS $CFLAGS -std=c99 -c conftest.c 2>&1`"; then
5830eval "cv_prog_cc_flag_$cache=yes"
5831else
5832eval "cv_prog_cc_flag_$cache=no"
5833fi
5834rm -f conftest conftest.o conftest.c
5835
5836fi
5837
5838if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
5839{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5840printf "%s\n" "yes" >&6; }
5841:
5842C99FLAG="-std=c99"
5843else
5844{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5845printf "%s\n" "no" >&6; }
5846:
5847
5848fi
5849
5850
5851
5852{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -xc99" >&5
5853printf %s "checking whether $CC supports -xc99... " >&6; }
5854cache=`echo xc99 | sed 'y%.=/+-%___p_%'`
5855if eval test \${cv_prog_cc_flag_$cache+y}
5856then :
5857  printf %s "(cached) " >&6
5858else $as_nop
5859
5860echo 'void f(void){}' >conftest.c
5861if test -z "`$CC $CPPFLAGS $CFLAGS -xc99 -c conftest.c 2>&1`"; then
5862eval "cv_prog_cc_flag_$cache=yes"
5863else
5864eval "cv_prog_cc_flag_$cache=no"
5865fi
5866rm -f conftest conftest.o conftest.c
5867
5868fi
5869
5870if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
5871{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5872printf "%s\n" "yes" >&6; }
5873:
5874C99FLAG="-xc99"
5875else
5876{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5877printf "%s\n" "no" >&6; }
5878:
5879
5880fi
5881
5882
5883ac_fn_c_check_header_compile "$LINENO" "getopt.h" "ac_cv_header_getopt_h" "$ac_includes_default
5884"
5885if test "x$ac_cv_header_getopt_h" = xyes
5886then :
5887  printf "%s\n" "#define HAVE_GETOPT_H 1" >>confdefs.h
5888
5889fi
5890ac_fn_c_check_header_compile "$LINENO" "time.h" "ac_cv_header_time_h" "$ac_includes_default
5891"
5892if test "x$ac_cv_header_time_h" = xyes
5893then :
5894  printf "%s\n" "#define HAVE_TIME_H 1" >>confdefs.h
5895
5896fi
5897
5898
5899
5900
5901
5902{ 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
5903printf %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; }
5904cache=`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`
5905if eval test \${cv_prog_cc_flag_needed_$cache+y}
5906then :
5907  printf %s "(cached) " >&6
5908else $as_nop
5909
5910echo '
5911#include "confdefs.h"
5912#include <stdlib.h>
5913#include <ctype.h>
5914#include <sys/time.h>
5915#ifdef HAVE_TIME_H
5916#include <time.h>
5917#endif
5918#include <unistd.h>
5919#include <netdb.h>
5920#ifdef HAVE_GETOPT_H
5921#include <getopt.h>
5922#endif
5923
5924int test(void) {
5925	int a;
5926	char **opts = NULL;
5927	struct timeval tv;
5928	char *t;
5929	time_t time = 0;
5930	char *buf = NULL;
5931	const char* str = NULL;
5932	struct msghdr msg;
5933	msg.msg_control = 0;
5934	t = ctime_r(&time, buf);
5935	tv.tv_usec = 10;
5936	srandom(32);
5937	a = getopt(2, opts, "a");
5938	a = isascii(32);
5939	str = gai_strerror(0);
5940	if(str && t && tv.tv_usec && msg.msg_control)
5941		a = 0;
5942	return a;
5943}
5944' > conftest.c
5945echo 'void f(void){}' >>conftest.c
5946if test -z "`$CC $CPPFLAGS $CFLAGS $ERRFLAG -c conftest.c 2>&1`"; then
5947eval "cv_prog_cc_flag_needed_$cache=no"
5948else
5949
5950if 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
5951eval "cv_prog_cc_flag_needed_$cache=yes"
5952else
5953eval "cv_prog_cc_flag_needed_$cache=fail"
5954#echo 'Test with flag fails too!'
5955#cat conftest.c
5956#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"
5957#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`
5958#exit 1
5959fi
5960
5961fi
5962rm -f conftest conftest.c conftest.o
5963
5964fi
5965
5966if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = yes"; then
5967{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5968printf "%s\n" "yes" >&6; }
5969:
5970CFLAGS="$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"
5971else
5972if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = no"; then
5973{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5974printf "%s\n" "no" >&6; }
5975#echo 'Test with flag is no!'
5976#cat conftest.c
5977#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"
5978#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`
5979#exit 1
5980:
5981
5982else
5983{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: failed" >&5
5984printf "%s\n" "failed" >&6; }
5985:
5986
5987fi
5988fi
5989
5990
5991
5992
5993
5994{ 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
5995printf %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; }
5996cache=`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`
5997if eval test \${cv_prog_cc_flag_needed_$cache+y}
5998then :
5999  printf %s "(cached) " >&6
6000else $as_nop
6001
6002echo '
6003#include "confdefs.h"
6004#include <stdlib.h>
6005#include <ctype.h>
6006#include <sys/time.h>
6007#ifdef HAVE_TIME_H
6008#include <time.h>
6009#endif
6010#include <unistd.h>
6011#include <netdb.h>
6012#ifdef HAVE_GETOPT_H
6013#include <getopt.h>
6014#endif
6015
6016int test(void) {
6017	int a;
6018	char **opts = NULL;
6019	struct timeval tv;
6020	char *t;
6021	time_t time = 0;
6022	char *buf = NULL;
6023	const char* str = NULL;
6024	struct msghdr msg;
6025	msg.msg_control = 0;
6026	t = ctime_r(&time, buf);
6027	tv.tv_usec = 10;
6028	srandom(32);
6029	a = getopt(2, opts, "a");
6030	a = isascii(32);
6031	str = gai_strerror(0);
6032	if(str && t && tv.tv_usec && msg.msg_control)
6033		a = 0;
6034	return a;
6035}
6036' > conftest.c
6037echo 'void f(void){}' >>conftest.c
6038if test -z "`$CC $CPPFLAGS $CFLAGS $ERRFLAG -c conftest.c 2>&1`"; then
6039eval "cv_prog_cc_flag_needed_$cache=no"
6040else
6041
6042if 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
6043eval "cv_prog_cc_flag_needed_$cache=yes"
6044else
6045eval "cv_prog_cc_flag_needed_$cache=fail"
6046#echo 'Test with flag fails too!'
6047#cat conftest.c
6048#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"
6049#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`
6050#exit 1
6051fi
6052
6053fi
6054rm -f conftest conftest.c conftest.o
6055
6056fi
6057
6058if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = yes"; then
6059{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6060printf "%s\n" "yes" >&6; }
6061:
6062CFLAGS="$CFLAGS $C99FLAG -D__EXTENSIONS__ -D_BSD_SOURCE -D_DEFAULT_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -D_ALL_SOURCE"
6063else
6064if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = no"; then
6065{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6066printf "%s\n" "no" >&6; }
6067#echo 'Test with flag is no!'
6068#cat conftest.c
6069#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"
6070#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`
6071#exit 1
6072:
6073
6074else
6075{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: failed" >&5
6076printf "%s\n" "failed" >&6; }
6077:
6078
6079fi
6080fi
6081
6082
6083
6084
6085
6086{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we need $C99FLAG as a flag for $CC" >&5
6087printf %s "checking whether we need $C99FLAG as a flag for $CC... " >&6; }
6088cache=`printf "%s\n" "$C99FLAG" | $as_tr_sh`
6089if eval test \${cv_prog_cc_flag_needed_$cache+y}
6090then :
6091  printf %s "(cached) " >&6
6092else $as_nop
6093
6094echo '
6095#include <stdbool.h>
6096#include <ctype.h>
6097int test(void) {
6098        int a = 0;
6099        return a;
6100}
6101' > conftest.c
6102echo 'void f(void){}' >>conftest.c
6103if test -z "`$CC $CPPFLAGS $CFLAGS $ERRFLAG -c conftest.c 2>&1`"; then
6104eval "cv_prog_cc_flag_needed_$cache=no"
6105else
6106
6107if test -z "`$CC $CPPFLAGS $CFLAGS $C99FLAG $ERRFLAG -c conftest.c 2>&1`"; then
6108eval "cv_prog_cc_flag_needed_$cache=yes"
6109else
6110eval "cv_prog_cc_flag_needed_$cache=fail"
6111#echo 'Test with flag fails too!'
6112#cat conftest.c
6113#echo "$CC $CPPFLAGS $CFLAGS $C99FLAG $ERRFLAG -c conftest.c 2>&1"
6114#echo `$CC $CPPFLAGS $CFLAGS $C99FLAG $ERRFLAG -c conftest.c 2>&1`
6115#exit 1
6116fi
6117
6118fi
6119rm -f conftest conftest.c conftest.o
6120
6121fi
6122
6123if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = yes"; then
6124{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6125printf "%s\n" "yes" >&6; }
6126:
6127CFLAGS="$CFLAGS $C99FLAG"
6128else
6129if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = no"; then
6130{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6131printf "%s\n" "no" >&6; }
6132#echo 'Test with flag is no!'
6133#cat conftest.c
6134#echo "$CC $CPPFLAGS $CFLAGS $C99FLAG $ERRFLAG -c conftest.c 2>&1"
6135#echo `$CC $CPPFLAGS $CFLAGS $C99FLAG $ERRFLAG -c conftest.c 2>&1`
6136#exit 1
6137:
6138
6139else
6140{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: failed" >&5
6141printf "%s\n" "failed" >&6; }
6142:
6143
6144fi
6145fi
6146
6147
6148
6149
6150
6151{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we need -D_BSD_SOURCE -D_DEFAULT_SOURCE as a flag for $CC" >&5
6152printf %s "checking whether we need -D_BSD_SOURCE -D_DEFAULT_SOURCE as a flag for $CC... " >&6; }
6153cache=_D_BSD_SOURCE__D_DEFAULT_SOURCE
6154if eval test \${cv_prog_cc_flag_needed_$cache+y}
6155then :
6156  printf %s "(cached) " >&6
6157else $as_nop
6158
6159echo '
6160#include <ctype.h>
6161
6162int test(void) {
6163        int a;
6164        a = isascii(32);
6165        return a;
6166}
6167' > conftest.c
6168echo 'void f(void){}' >>conftest.c
6169if test -z "`$CC $CPPFLAGS $CFLAGS $ERRFLAG -c conftest.c 2>&1`"; then
6170eval "cv_prog_cc_flag_needed_$cache=no"
6171else
6172
6173if test -z "`$CC $CPPFLAGS $CFLAGS -D_BSD_SOURCE -D_DEFAULT_SOURCE $ERRFLAG -c conftest.c 2>&1`"; then
6174eval "cv_prog_cc_flag_needed_$cache=yes"
6175else
6176eval "cv_prog_cc_flag_needed_$cache=fail"
6177#echo 'Test with flag fails too!'
6178#cat conftest.c
6179#echo "$CC $CPPFLAGS $CFLAGS -D_BSD_SOURCE -D_DEFAULT_SOURCE $ERRFLAG -c conftest.c 2>&1"
6180#echo `$CC $CPPFLAGS $CFLAGS -D_BSD_SOURCE -D_DEFAULT_SOURCE $ERRFLAG -c conftest.c 2>&1`
6181#exit 1
6182fi
6183
6184fi
6185rm -f conftest conftest.c conftest.o
6186
6187fi
6188
6189if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = yes"; then
6190{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6191printf "%s\n" "yes" >&6; }
6192:
6193CFLAGS="$CFLAGS -D_BSD_SOURCE -D_DEFAULT_SOURCE"
6194else
6195if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = no"; then
6196{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6197printf "%s\n" "no" >&6; }
6198#echo 'Test with flag is no!'
6199#cat conftest.c
6200#echo "$CC $CPPFLAGS $CFLAGS -D_BSD_SOURCE -D_DEFAULT_SOURCE $ERRFLAG -c conftest.c 2>&1"
6201#echo `$CC $CPPFLAGS $CFLAGS -D_BSD_SOURCE -D_DEFAULT_SOURCE $ERRFLAG -c conftest.c 2>&1`
6202#exit 1
6203:
6204
6205else
6206{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: failed" >&5
6207printf "%s\n" "failed" >&6; }
6208:
6209
6210fi
6211fi
6212
6213
6214
6215
6216
6217{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we need -D_GNU_SOURCE as a flag for $CC" >&5
6218printf %s "checking whether we need -D_GNU_SOURCE as a flag for $CC... " >&6; }
6219cache=_D_GNU_SOURCE
6220if eval test \${cv_prog_cc_flag_needed_$cache+y}
6221then :
6222  printf %s "(cached) " >&6
6223else $as_nop
6224
6225echo '
6226#include <netinet/in.h>
6227
6228int test(void) {
6229        struct in6_pktinfo inf;
6230	int a = (int)sizeof(inf);
6231        return a;
6232}
6233' > conftest.c
6234echo 'void f(void){}' >>conftest.c
6235if test -z "`$CC $CPPFLAGS $CFLAGS $ERRFLAG -c conftest.c 2>&1`"; then
6236eval "cv_prog_cc_flag_needed_$cache=no"
6237else
6238
6239if test -z "`$CC $CPPFLAGS $CFLAGS -D_GNU_SOURCE $ERRFLAG -c conftest.c 2>&1`"; then
6240eval "cv_prog_cc_flag_needed_$cache=yes"
6241else
6242eval "cv_prog_cc_flag_needed_$cache=fail"
6243#echo 'Test with flag fails too!'
6244#cat conftest.c
6245#echo "$CC $CPPFLAGS $CFLAGS -D_GNU_SOURCE $ERRFLAG -c conftest.c 2>&1"
6246#echo `$CC $CPPFLAGS $CFLAGS -D_GNU_SOURCE $ERRFLAG -c conftest.c 2>&1`
6247#exit 1
6248fi
6249
6250fi
6251rm -f conftest conftest.c conftest.o
6252
6253fi
6254
6255if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = yes"; then
6256{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6257printf "%s\n" "yes" >&6; }
6258:
6259CFLAGS="$CFLAGS -D_GNU_SOURCE"
6260else
6261if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = no"; then
6262{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6263printf "%s\n" "no" >&6; }
6264#echo 'Test with flag is no!'
6265#cat conftest.c
6266#echo "$CC $CPPFLAGS $CFLAGS -D_GNU_SOURCE $ERRFLAG -c conftest.c 2>&1"
6267#echo `$CC $CPPFLAGS $CFLAGS -D_GNU_SOURCE $ERRFLAG -c conftest.c 2>&1`
6268#exit 1
6269:
6270
6271else
6272{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: failed" >&5
6273printf "%s\n" "failed" >&6; }
6274:
6275
6276fi
6277fi
6278
6279
6280# check again for GNU_SOURCE for setresgid. May fail if setresgid
6281# is not available at all. -D_FRSRESGID is to make this check unique.
6282# otherwise we would get the previous cached result.
6283
6284
6285
6286{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we need -D_GNU_SOURCE -D_FRSRESGID as a flag for $CC" >&5
6287printf %s "checking whether we need -D_GNU_SOURCE -D_FRSRESGID as a flag for $CC... " >&6; }
6288cache=_D_GNU_SOURCE__D_FRSRESGID
6289if eval test \${cv_prog_cc_flag_needed_$cache+y}
6290then :
6291  printf %s "(cached) " >&6
6292else $as_nop
6293
6294echo '
6295#include <unistd.h>
6296
6297int test(void) {
6298	int a = setresgid(0,0,0);
6299	a = setresuid(0,0,0);
6300        return a;
6301}
6302' > conftest.c
6303echo 'void f(void){}' >>conftest.c
6304if test -z "`$CC $CPPFLAGS $CFLAGS $ERRFLAG -c conftest.c 2>&1`"; then
6305eval "cv_prog_cc_flag_needed_$cache=no"
6306else
6307
6308if test -z "`$CC $CPPFLAGS $CFLAGS -D_GNU_SOURCE -D_FRSRESGID $ERRFLAG -c conftest.c 2>&1`"; then
6309eval "cv_prog_cc_flag_needed_$cache=yes"
6310else
6311eval "cv_prog_cc_flag_needed_$cache=fail"
6312#echo 'Test with flag fails too!'
6313#cat conftest.c
6314#echo "$CC $CPPFLAGS $CFLAGS -D_GNU_SOURCE -D_FRSRESGID $ERRFLAG -c conftest.c 2>&1"
6315#echo `$CC $CPPFLAGS $CFLAGS -D_GNU_SOURCE -D_FRSRESGID $ERRFLAG -c conftest.c 2>&1`
6316#exit 1
6317fi
6318
6319fi
6320rm -f conftest conftest.c conftest.o
6321
6322fi
6323
6324if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = yes"; then
6325{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6326printf "%s\n" "yes" >&6; }
6327:
6328CFLAGS="$CFLAGS -D_GNU_SOURCE"
6329else
6330if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = no"; then
6331{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6332printf "%s\n" "no" >&6; }
6333#echo 'Test with flag is no!'
6334#cat conftest.c
6335#echo "$CC $CPPFLAGS $CFLAGS -D_GNU_SOURCE -D_FRSRESGID $ERRFLAG -c conftest.c 2>&1"
6336#echo `$CC $CPPFLAGS $CFLAGS -D_GNU_SOURCE -D_FRSRESGID $ERRFLAG -c conftest.c 2>&1`
6337#exit 1
6338:
6339
6340else
6341{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: failed" >&5
6342printf "%s\n" "failed" >&6; }
6343:
6344
6345fi
6346fi
6347
6348
6349
6350
6351
6352{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we need -D_POSIX_C_SOURCE=200112 as a flag for $CC" >&5
6353printf %s "checking whether we need -D_POSIX_C_SOURCE=200112 as a flag for $CC... " >&6; }
6354cache=_D_POSIX_C_SOURCE_200112
6355if eval test \${cv_prog_cc_flag_needed_$cache+y}
6356then :
6357  printf %s "(cached) " >&6
6358else $as_nop
6359
6360echo '
6361#include "confdefs.h"
6362#ifdef HAVE_TIME_H
6363#include <time.h>
6364#endif
6365#include <netdb.h>
6366
6367int test(void) {
6368        int a = 0;
6369        char *t;
6370        time_t time = 0;
6371        char *buf = NULL;
6372	const char* str = NULL;
6373        t = ctime_r(&time, buf);
6374	str = gai_strerror(0);
6375	if(t && str)
6376		a = 0;
6377        return a;
6378}
6379' > conftest.c
6380echo 'void f(void){}' >>conftest.c
6381if test -z "`$CC $CPPFLAGS $CFLAGS $ERRFLAG -c conftest.c 2>&1`"; then
6382eval "cv_prog_cc_flag_needed_$cache=no"
6383else
6384
6385if test -z "`$CC $CPPFLAGS $CFLAGS -D_POSIX_C_SOURCE=200112 $ERRFLAG -c conftest.c 2>&1`"; then
6386eval "cv_prog_cc_flag_needed_$cache=yes"
6387else
6388eval "cv_prog_cc_flag_needed_$cache=fail"
6389#echo 'Test with flag fails too!'
6390#cat conftest.c
6391#echo "$CC $CPPFLAGS $CFLAGS -D_POSIX_C_SOURCE=200112 $ERRFLAG -c conftest.c 2>&1"
6392#echo `$CC $CPPFLAGS $CFLAGS -D_POSIX_C_SOURCE=200112 $ERRFLAG -c conftest.c 2>&1`
6393#exit 1
6394fi
6395
6396fi
6397rm -f conftest conftest.c conftest.o
6398
6399fi
6400
6401if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = yes"; then
6402{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6403printf "%s\n" "yes" >&6; }
6404:
6405CFLAGS="$CFLAGS -D_POSIX_C_SOURCE=200112"
6406else
6407if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = no"; then
6408{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6409printf "%s\n" "no" >&6; }
6410#echo 'Test with flag is no!'
6411#cat conftest.c
6412#echo "$CC $CPPFLAGS $CFLAGS -D_POSIX_C_SOURCE=200112 $ERRFLAG -c conftest.c 2>&1"
6413#echo `$CC $CPPFLAGS $CFLAGS -D_POSIX_C_SOURCE=200112 $ERRFLAG -c conftest.c 2>&1`
6414#exit 1
6415:
6416
6417else
6418{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: failed" >&5
6419printf "%s\n" "failed" >&6; }
6420:
6421
6422fi
6423fi
6424
6425
6426
6427
6428
6429{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we need -D__EXTENSIONS__ as a flag for $CC" >&5
6430printf %s "checking whether we need -D__EXTENSIONS__ as a flag for $CC... " >&6; }
6431cache=_D__EXTENSIONS__
6432if eval test \${cv_prog_cc_flag_needed_$cache+y}
6433then :
6434  printf %s "(cached) " >&6
6435else $as_nop
6436
6437echo '
6438#include "confdefs.h"
6439#include <stdlib.h>
6440#include <ctype.h>
6441#include <sys/time.h>
6442#ifdef HAVE_TIME_H
6443#include <time.h>
6444#endif
6445#include <unistd.h>
6446#ifdef HAVE_GETOPT_H
6447#include <getopt.h>
6448#endif
6449
6450int test(void) {
6451        int a;
6452        char **opts = NULL;
6453        struct timeval tv;
6454        tv.tv_usec = 10;
6455        srandom(32);
6456        a = getopt(2, opts, "a");
6457        a = isascii(32);
6458	if(tv.tv_usec)
6459		a = 0;
6460        return a;
6461}
6462' > conftest.c
6463echo 'void f(void){}' >>conftest.c
6464if test -z "`$CC $CPPFLAGS $CFLAGS $ERRFLAG -c conftest.c 2>&1`"; then
6465eval "cv_prog_cc_flag_needed_$cache=no"
6466else
6467
6468if test -z "`$CC $CPPFLAGS $CFLAGS -D__EXTENSIONS__ $ERRFLAG -c conftest.c 2>&1`"; then
6469eval "cv_prog_cc_flag_needed_$cache=yes"
6470else
6471eval "cv_prog_cc_flag_needed_$cache=fail"
6472#echo 'Test with flag fails too!'
6473#cat conftest.c
6474#echo "$CC $CPPFLAGS $CFLAGS -D__EXTENSIONS__ $ERRFLAG -c conftest.c 2>&1"
6475#echo `$CC $CPPFLAGS $CFLAGS -D__EXTENSIONS__ $ERRFLAG -c conftest.c 2>&1`
6476#exit 1
6477fi
6478
6479fi
6480rm -f conftest conftest.c conftest.o
6481
6482fi
6483
6484if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = yes"; then
6485{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6486printf "%s\n" "yes" >&6; }
6487:
6488CFLAGS="$CFLAGS -D__EXTENSIONS__"
6489else
6490if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = no"; then
6491{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6492printf "%s\n" "no" >&6; }
6493#echo 'Test with flag is no!'
6494#cat conftest.c
6495#echo "$CC $CPPFLAGS $CFLAGS -D__EXTENSIONS__ $ERRFLAG -c conftest.c 2>&1"
6496#echo `$CC $CPPFLAGS $CFLAGS -D__EXTENSIONS__ $ERRFLAG -c conftest.c 2>&1`
6497#exit 1
6498:
6499
6500else
6501{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: failed" >&5
6502printf "%s\n" "failed" >&6; }
6503:
6504
6505fi
6506fi
6507
6508
6509
6510
6511# debug mode flags warnings
6512# Check whether --enable-checking was given.
6513if test ${enable_checking+y}
6514then :
6515  enableval=$enable_checking;
6516fi
6517
6518# Check whether --enable-debug was given.
6519if test ${enable_debug+y}
6520then :
6521  enableval=$enable_debug;
6522fi
6523
6524if test "$enable_debug" = "yes"; then debug_enabled="$enable_debug";
6525else debug_enabled="$enable_checking"; fi
6526
6527case "$debug_enabled" in
6528        yes)
6529
6530
6531{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -W" >&5
6532printf %s "checking whether $CC supports -W... " >&6; }
6533cache=`echo W | sed 'y%.=/+-%___p_%'`
6534if eval test \${cv_prog_cc_flag_$cache+y}
6535then :
6536  printf %s "(cached) " >&6
6537else $as_nop
6538
6539echo 'void f(void){}' >conftest.c
6540if test -z "`$CC $CPPFLAGS $CFLAGS -W -c conftest.c 2>&1`"; then
6541eval "cv_prog_cc_flag_$cache=yes"
6542else
6543eval "cv_prog_cc_flag_$cache=no"
6544fi
6545rm -f conftest conftest.o conftest.c
6546
6547fi
6548
6549if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
6550{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6551printf "%s\n" "yes" >&6; }
6552:
6553CFLAGS="$CFLAGS -W"
6554else
6555{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6556printf "%s\n" "no" >&6; }
6557:
6558
6559fi
6560
6561
6562
6563{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wall" >&5
6564printf %s "checking whether $CC supports -Wall... " >&6; }
6565cache=`echo Wall | sed 'y%.=/+-%___p_%'`
6566if eval test \${cv_prog_cc_flag_$cache+y}
6567then :
6568  printf %s "(cached) " >&6
6569else $as_nop
6570
6571echo 'void f(void){}' >conftest.c
6572if test -z "`$CC $CPPFLAGS $CFLAGS -Wall -c conftest.c 2>&1`"; then
6573eval "cv_prog_cc_flag_$cache=yes"
6574else
6575eval "cv_prog_cc_flag_$cache=no"
6576fi
6577rm -f conftest conftest.o conftest.c
6578
6579fi
6580
6581if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
6582{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6583printf "%s\n" "yes" >&6; }
6584:
6585CFLAGS="$CFLAGS -Wall"
6586else
6587{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6588printf "%s\n" "no" >&6; }
6589:
6590
6591fi
6592
6593
6594
6595{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wextra" >&5
6596printf %s "checking whether $CC supports -Wextra... " >&6; }
6597cache=`echo Wextra | sed 'y%.=/+-%___p_%'`
6598if eval test \${cv_prog_cc_flag_$cache+y}
6599then :
6600  printf %s "(cached) " >&6
6601else $as_nop
6602
6603echo 'void f(void){}' >conftest.c
6604if test -z "`$CC $CPPFLAGS $CFLAGS -Wextra -c conftest.c 2>&1`"; then
6605eval "cv_prog_cc_flag_$cache=yes"
6606else
6607eval "cv_prog_cc_flag_$cache=no"
6608fi
6609rm -f conftest conftest.o conftest.c
6610
6611fi
6612
6613if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
6614{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6615printf "%s\n" "yes" >&6; }
6616:
6617CFLAGS="$CFLAGS -Wextra"
6618else
6619{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6620printf "%s\n" "no" >&6; }
6621:
6622
6623fi
6624
6625
6626
6627{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wdeclaration-after-statement" >&5
6628printf %s "checking whether $CC supports -Wdeclaration-after-statement... " >&6; }
6629cache=`echo Wdeclaration-after-statement | sed 'y%.=/+-%___p_%'`
6630if eval test \${cv_prog_cc_flag_$cache+y}
6631then :
6632  printf %s "(cached) " >&6
6633else $as_nop
6634
6635echo 'void f(void){}' >conftest.c
6636if test -z "`$CC $CPPFLAGS $CFLAGS -Wdeclaration-after-statement -c conftest.c 2>&1`"; then
6637eval "cv_prog_cc_flag_$cache=yes"
6638else
6639eval "cv_prog_cc_flag_$cache=no"
6640fi
6641rm -f conftest conftest.o conftest.c
6642
6643fi
6644
6645if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
6646{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6647printf "%s\n" "yes" >&6; }
6648:
6649CFLAGS="$CFLAGS -Wdeclaration-after-statement"
6650else
6651{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6652printf "%s\n" "no" >&6; }
6653:
6654
6655fi
6656
6657
6658printf "%s\n" "#define UNBOUND_DEBUG /**/" >>confdefs.h
6659
6660		;;
6661	no|*)
6662		# nothing to do.
6663		;;
6664esac
6665if test "$default_cflags" = "yes"; then
6666	# only when CFLAGS was "" at the start, if the users wants to
6667	# override we shouldn't add default cflags, because they wouldn't
6668	# be able to turn off these options and set the CFLAGS wanted.
6669
6670    # Check whether --enable-flto was given.
6671if test ${enable_flto+y}
6672then :
6673  enableval=$enable_flto;
6674fi
6675
6676    if test "x$enable_flto" != "xno"
6677then :
6678
6679        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -flto" >&5
6680printf %s "checking if $CC supports -flto... " >&6; }
6681        BAKCFLAGS="$CFLAGS"
6682        CFLAGS="$CFLAGS -flto"
6683        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6684/* end confdefs.h.  */
6685
6686int
6687main (void)
6688{
6689
6690  ;
6691  return 0;
6692}
6693_ACEOF
6694if ac_fn_c_try_link "$LINENO"
6695then :
6696
6697            if $CC $CFLAGS -o conftest conftest.c 2>&1 | $GREP -e "warning: no debug symbols in executable" -e "warning: object" >/dev/null; then
6698                CFLAGS="$BAKCFLAGS"
6699                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6700printf "%s\n" "no" >&6; }
6701            else
6702                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6703printf "%s\n" "yes" >&6; }
6704            fi
6705            rm -f conftest conftest.c conftest.o
6706
6707else $as_nop
6708  CFLAGS="$BAKCFLAGS" ; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6709printf "%s\n" "no" >&6; }
6710fi
6711rm -f core conftest.err conftest.$ac_objext conftest.beam \
6712    conftest$ac_exeext conftest.$ac_ext
6713
6714fi
6715
6716
6717    # Check whether --enable-pie was given.
6718if test ${enable_pie+y}
6719then :
6720  enableval=$enable_pie;
6721fi
6722
6723    if test "x$enable_pie" = "xyes"
6724then :
6725
6726	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports PIE" >&5
6727printf %s "checking if $CC supports PIE... " >&6; }
6728	BAKLDFLAGS="$LDFLAGS"
6729	BAKCFLAGS="$CFLAGS"
6730	LDFLAGS="$LDFLAGS -pie"
6731	CFLAGS="$CFLAGS -fPIE"
6732	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6733/* end confdefs.h.  */
6734
6735int
6736main (void)
6737{
6738
6739  ;
6740  return 0;
6741}
6742_ACEOF
6743if ac_fn_c_try_link "$LINENO"
6744then :
6745
6746	    if $CC $CFLAGS $LDFLAGS -o conftest conftest.c 2>&1 | grep "warning: no debug symbols in executable" >/dev/null; then
6747		LDFLAGS="$BAKLDFLAGS"
6748		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6749printf "%s\n" "no" >&6; }
6750	    else
6751		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6752printf "%s\n" "yes" >&6; }
6753	    fi
6754	    rm -f conftest conftest.c conftest.o
6755
6756else $as_nop
6757  LDFLAGS="$BAKLDFLAGS" ; CFLAGS="$BAKCFLAGS" ; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6758printf "%s\n" "no" >&6; }
6759fi
6760rm -f core conftest.err conftest.$ac_objext conftest.beam \
6761    conftest$ac_exeext conftest.$ac_ext
6762
6763fi
6764
6765
6766    # Check whether --enable-relro_now was given.
6767if test ${enable_relro_now+y}
6768then :
6769  enableval=$enable_relro_now;
6770fi
6771
6772    if test "x$enable_relro_now" = "xyes"
6773then :
6774
6775	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wl,-z,relro,-z,now" >&5
6776printf %s "checking if $CC supports -Wl,-z,relro,-z,now... " >&6; }
6777	BAKLDFLAGS="$LDFLAGS"
6778	LDFLAGS="$LDFLAGS -Wl,-z,relro,-z,now"
6779	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6780/* end confdefs.h.  */
6781
6782int
6783main (void)
6784{
6785
6786  ;
6787  return 0;
6788}
6789_ACEOF
6790if ac_fn_c_try_link "$LINENO"
6791then :
6792
6793	    if $CC $CFLAGS $LDFLAGS -o conftest conftest.c 2>&1 | grep "warning: no debug symbols in executable" >/dev/null; then
6794		LDFLAGS="$BAKLDFLAGS"
6795		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6796printf "%s\n" "no" >&6; }
6797	    else
6798		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6799printf "%s\n" "yes" >&6; }
6800	    fi
6801	    rm -f conftest conftest.c conftest.o
6802
6803else $as_nop
6804  LDFLAGS="$BAKLDFLAGS" ; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6805printf "%s\n" "no" >&6; }
6806fi
6807rm -f core conftest.err conftest.$ac_objext conftest.beam \
6808    conftest$ac_exeext conftest.$ac_ext
6809
6810fi
6811
6812fi
6813
6814{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
6815printf %s "checking for inline... " >&6; }
6816if test ${ac_cv_c_inline+y}
6817then :
6818  printf %s "(cached) " >&6
6819else $as_nop
6820  ac_cv_c_inline=no
6821for ac_kw in inline __inline__ __inline; do
6822  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6823/* end confdefs.h.  */
6824#ifndef __cplusplus
6825typedef int foo_t;
6826static $ac_kw foo_t static_foo (void) {return 0; }
6827$ac_kw foo_t foo (void) {return 0; }
6828#endif
6829
6830_ACEOF
6831if ac_fn_c_try_compile "$LINENO"
6832then :
6833  ac_cv_c_inline=$ac_kw
6834fi
6835rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
6836  test "$ac_cv_c_inline" != no && break
6837done
6838
6839fi
6840{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
6841printf "%s\n" "$ac_cv_c_inline" >&6; }
6842
6843case $ac_cv_c_inline in
6844  inline | yes) ;;
6845  *)
6846    case $ac_cv_c_inline in
6847      no) ac_val=;;
6848      *) ac_val=$ac_cv_c_inline;;
6849    esac
6850    cat >>confdefs.h <<_ACEOF
6851#ifndef __cplusplus
6852#define inline $ac_val
6853#endif
6854_ACEOF
6855    ;;
6856esac
6857
6858
6859{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler (${CC-cc}) accepts the \"format\" attribute" >&5
6860printf %s "checking whether the C compiler (${CC-cc}) accepts the \"format\" attribute... " >&6; }
6861if test ${ac_cv_c_format_attribute+y}
6862then :
6863  printf %s "(cached) " >&6
6864else $as_nop
6865  ac_cv_c_format_attribute=no
6866cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6867/* end confdefs.h.  */
6868#include <stdio.h>
6869void f (char *format, ...) __attribute__ ((format (printf, 1, 2)));
6870void (*pf) (char *format, ...) __attribute__ ((format (printf, 1, 2)));
6871
6872int
6873main (void)
6874{
6875
6876   f ("%s", "str");
6877
6878  ;
6879  return 0;
6880}
6881_ACEOF
6882if ac_fn_c_try_compile "$LINENO"
6883then :
6884  ac_cv_c_format_attribute="yes"
6885else $as_nop
6886  ac_cv_c_format_attribute="no"
6887fi
6888rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
6889
6890fi
6891
6892
6893{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_format_attribute" >&5
6894printf "%s\n" "$ac_cv_c_format_attribute" >&6; }
6895if test $ac_cv_c_format_attribute = yes; then
6896
6897printf "%s\n" "#define HAVE_ATTR_FORMAT 1" >>confdefs.h
6898
6899fi
6900
6901
6902{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler (${CC-cc}) accepts the \"unused\" attribute" >&5
6903printf %s "checking whether the C compiler (${CC-cc}) accepts the \"unused\" attribute... " >&6; }
6904if test ${ac_cv_c_unused_attribute+y}
6905then :
6906  printf %s "(cached) " >&6
6907else $as_nop
6908  ac_cv_c_unused_attribute=no
6909cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6910/* end confdefs.h.  */
6911#include <stdio.h>
6912void f (char *u __attribute__((unused)));
6913
6914int
6915main (void)
6916{
6917
6918   f ("x");
6919
6920  ;
6921  return 0;
6922}
6923_ACEOF
6924if ac_fn_c_try_compile "$LINENO"
6925then :
6926  ac_cv_c_unused_attribute="yes"
6927else $as_nop
6928  ac_cv_c_unused_attribute="no"
6929fi
6930rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
6931
6932fi
6933
6934
6935
6936
6937{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_unused_attribute" >&5
6938printf "%s\n" "$ac_cv_c_unused_attribute" >&6; }
6939if test $ac_cv_c_unused_attribute = yes; then
6940
6941printf "%s\n" "#define HAVE_ATTR_UNUSED 1" >>confdefs.h
6942
6943fi
6944
6945
6946
6947
6948{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler (${CC-cc}) accepts the \"weak\" attribute" >&5
6949printf %s "checking whether the C compiler (${CC-cc}) accepts the \"weak\" attribute... " >&6; }
6950if test ${ac_cv_c_weak_attribute+y}
6951then :
6952  printf %s "(cached) " >&6
6953else $as_nop
6954  ac_cv_c_weak_attribute=no
6955cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6956/* end confdefs.h.  */
6957 #include <stdio.h>
6958__attribute__((weak)) void f(int x) { printf("%d", x); }
6959
6960int
6961main (void)
6962{
6963
6964   f(1);
6965
6966  ;
6967  return 0;
6968}
6969_ACEOF
6970if ac_fn_c_try_compile "$LINENO"
6971then :
6972  ac_cv_c_weak_attribute="yes"
6973else $as_nop
6974  ac_cv_c_weak_attribute="no"
6975fi
6976rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
6977
6978fi
6979
6980
6981{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_weak_attribute" >&5
6982printf "%s\n" "$ac_cv_c_weak_attribute" >&6; }
6983if test $ac_cv_c_weak_attribute = yes; then
6984
6985printf "%s\n" "#define HAVE_ATTR_WEAK 1" >>confdefs.h
6986
6987
6988printf "%s\n" "#define ATTR_WEAK __attribute__((weak))" >>confdefs.h
6989
6990else
6991
6992printf "%s\n" "#define ATTR_WEAK /**/" >>confdefs.h
6993
6994fi
6995
6996
6997
6998
6999{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler (${CC-cc}) accepts the \"noreturn\" attribute" >&5
7000printf %s "checking whether the C compiler (${CC-cc}) accepts the \"noreturn\" attribute... " >&6; }
7001if test ${ac_cv_c_noreturn_attribute+y}
7002then :
7003  printf %s "(cached) " >&6
7004else $as_nop
7005  ac_cv_c_noreturn_attribute=no
7006cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7007/* end confdefs.h.  */
7008 #include <stdio.h>
7009__attribute__((noreturn)) void f(int x) { printf("%d", x); }
7010
7011int
7012main (void)
7013{
7014
7015   f(1);
7016
7017  ;
7018  return 0;
7019}
7020_ACEOF
7021if ac_fn_c_try_compile "$LINENO"
7022then :
7023  ac_cv_c_noreturn_attribute="yes"
7024else $as_nop
7025  ac_cv_c_noreturn_attribute="no"
7026fi
7027rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
7028
7029fi
7030
7031
7032{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_noreturn_attribute" >&5
7033printf "%s\n" "$ac_cv_c_noreturn_attribute" >&6; }
7034if test $ac_cv_c_noreturn_attribute = yes; then
7035
7036printf "%s\n" "#define HAVE_ATTR_NORETURN 1" >>confdefs.h
7037
7038
7039printf "%s\n" "#define ATTR_NORETURN __attribute__((__noreturn__))" >>confdefs.h
7040
7041else
7042
7043printf "%s\n" "#define ATTR_NORETURN /**/" >>confdefs.h
7044
7045fi
7046
7047
7048
7049
7050{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler (${CC-cc}) accepts the \"fallthrough\" attribute" >&5
7051printf %s "checking whether the C compiler (${CC-cc}) accepts the \"fallthrough\" attribute... " >&6; }
7052BAKCFLAGS="$CFLAGS"
7053CFLAGS="$CFLAGS -Werror"
7054if test ${ac_cv_c_fallthrough_attribute+y}
7055then :
7056  printf %s "(cached) " >&6
7057else $as_nop
7058  ac_cv_c_fallthrough_attribute=no
7059cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7060/* end confdefs.h.  */
7061 #include <stdio.h>
7062void f(int x) {
7063	int y = 0;
7064	switch(x) {
7065	case 1:
7066		y = 1;
7067		__attribute__((fallthrough));
7068		/* fallthrough */
7069	case 2:
7070		y++;
7071		break;
7072	case 3:
7073		y = 3;
7074		break;
7075	}
7076	printf("%d", y);
7077}
7078
7079int
7080main (void)
7081{
7082
7083   f(1);
7084
7085  ;
7086  return 0;
7087}
7088_ACEOF
7089if ac_fn_c_try_compile "$LINENO"
7090then :
7091  ac_cv_c_fallthrough_attribute="yes"
7092else $as_nop
7093  ac_cv_c_fallthrough_attribute="no"
7094fi
7095rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
7096
7097fi
7098
7099CFLAGS="$BAKCFLAGS"
7100
7101{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_fallthrough_attribute" >&5
7102printf "%s\n" "$ac_cv_c_fallthrough_attribute" >&6; }
7103if test $ac_cv_c_fallthrough_attribute = yes; then
7104
7105printf "%s\n" "#define HAVE_ATTR_FALLTHROUGH 1" >>confdefs.h
7106
7107
7108printf "%s\n" "#define ATTR_FALLTHROUGH __attribute__((fallthrough));" >>confdefs.h
7109
7110else
7111
7112printf "%s\n" "#define ATTR_FALLTHROUGH /**/" >>confdefs.h
7113
7114fi
7115
7116
7117if test "$srcdir" != "."; then
7118	CPPFLAGS="$CPPFLAGS -I$srcdir"
7119fi
7120
7121
7122
7123
7124
7125for ac_prog in flex lex
7126do
7127  # Extract the first word of "$ac_prog", so it can be a program name with args.
7128set dummy $ac_prog; ac_word=$2
7129{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7130printf %s "checking for $ac_word... " >&6; }
7131if test ${ac_cv_prog_LEX+y}
7132then :
7133  printf %s "(cached) " >&6
7134else $as_nop
7135  if test -n "$LEX"; then
7136  ac_cv_prog_LEX="$LEX" # Let the user override the test.
7137else
7138as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7139for as_dir in $PATH
7140do
7141  IFS=$as_save_IFS
7142  case $as_dir in #(((
7143    '') as_dir=./ ;;
7144    */) ;;
7145    *) as_dir=$as_dir/ ;;
7146  esac
7147    for ac_exec_ext in '' $ac_executable_extensions; do
7148  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
7149    ac_cv_prog_LEX="$ac_prog"
7150    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
7151    break 2
7152  fi
7153done
7154  done
7155IFS=$as_save_IFS
7156
7157fi
7158fi
7159LEX=$ac_cv_prog_LEX
7160if test -n "$LEX"; then
7161  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LEX" >&5
7162printf "%s\n" "$LEX" >&6; }
7163else
7164  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7165printf "%s\n" "no" >&6; }
7166fi
7167
7168
7169  test -n "$LEX" && break
7170done
7171test -n "$LEX" || LEX=":"
7172
7173  if test "x$LEX" != "x:"; then
7174    cat >conftest.l <<_ACEOF
7175%{
7176#ifdef __cplusplus
7177extern "C"
7178#endif
7179int yywrap(void);
7180%}
7181%%
7182a { ECHO; }
7183b { REJECT; }
7184c { yymore (); }
7185d { yyless (1); }
7186e { /* IRIX 6.5 flex 2.5.4 underquotes its yyless argument.  */
7187#ifdef __cplusplus
7188    yyless ((yyinput () != 0));
7189#else
7190    yyless ((input () != 0));
7191#endif
7192  }
7193f { unput (yytext[0]); }
7194. { BEGIN INITIAL; }
7195%%
7196#ifdef YYTEXT_POINTER
7197extern char *yytext;
7198#endif
7199int
7200yywrap (void)
7201{
7202  return 1;
7203}
7204int
7205main (void)
7206{
7207  return ! yylex ();
7208}
7209_ACEOF
7210{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for lex output file root" >&5
7211printf %s "checking for lex output file root... " >&6; }
7212if test ${ac_cv_prog_lex_root+y}
7213then :
7214  printf %s "(cached) " >&6
7215else $as_nop
7216
7217ac_cv_prog_lex_root=unknown
7218{ { ac_try="$LEX conftest.l"
7219case "(($ac_try" in
7220  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7221  *) ac_try_echo=$ac_try;;
7222esac
7223eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
7224printf "%s\n" "$ac_try_echo"; } >&5
7225  (eval "$LEX conftest.l") 2>&5
7226  ac_status=$?
7227  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7228  test $ac_status = 0; } &&
7229if test -f lex.yy.c; then
7230  ac_cv_prog_lex_root=lex.yy
7231elif test -f lexyy.c; then
7232  ac_cv_prog_lex_root=lexyy
7233fi
7234fi
7235{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_lex_root" >&5
7236printf "%s\n" "$ac_cv_prog_lex_root" >&6; }
7237if test "$ac_cv_prog_lex_root" = unknown
7238then :
7239  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cannot find output from $LEX; giving up on $LEX" >&5
7240printf "%s\n" "$as_me: WARNING: cannot find output from $LEX; giving up on $LEX" >&2;}
7241   LEX=: LEXLIB=
7242fi
7243LEX_OUTPUT_ROOT=$ac_cv_prog_lex_root
7244
7245if test ${LEXLIB+y}
7246then :
7247
7248else $as_nop
7249
7250  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for lex library" >&5
7251printf %s "checking for lex library... " >&6; }
7252if test ${ac_cv_lib_lex+y}
7253then :
7254  printf %s "(cached) " >&6
7255else $as_nop
7256
7257    ac_save_LIBS="$LIBS"
7258    ac_found=false
7259    for ac_cv_lib_lex in 'none needed' -lfl -ll 'not found'; do
7260      case $ac_cv_lib_lex in #(
7261  'none needed') :
7262     ;; #(
7263  'not found') :
7264    break ;; #(
7265  *) :
7266    LIBS="$ac_cv_lib_lex $ac_save_LIBS" ;; #(
7267  *) :
7268     ;;
7269esac
7270
7271      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7272/* end confdefs.h.  */
7273`cat $LEX_OUTPUT_ROOT.c`
7274_ACEOF
7275if ac_fn_c_try_link "$LINENO"
7276then :
7277  ac_found=:
7278fi
7279rm -f core conftest.err conftest.$ac_objext conftest.beam \
7280    conftest$ac_exeext conftest.$ac_ext
7281      if $ac_found; then
7282        break
7283      fi
7284    done
7285    LIBS="$ac_save_LIBS"
7286
7287fi
7288{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_lex" >&5
7289printf "%s\n" "$ac_cv_lib_lex" >&6; }
7290  if test "$ac_cv_lib_lex" = 'not found'
7291then :
7292  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: required lex library not found; giving up on $LEX" >&5
7293printf "%s\n" "$as_me: WARNING: required lex library not found; giving up on $LEX" >&2;}
7294	 LEX=: LEXLIB=
7295elif test "$ac_cv_lib_lex" = 'none needed'
7296then :
7297  LEXLIB=''
7298else $as_nop
7299  LEXLIB=$ac_cv_lib_lex
7300fi
7301
7302fi
7303
7304
7305if test "$LEX" != :
7306then :
7307
7308{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether yytext is a pointer" >&5
7309printf %s "checking whether yytext is a pointer... " >&6; }
7310if test ${ac_cv_prog_lex_yytext_pointer+y}
7311then :
7312  printf %s "(cached) " >&6
7313else $as_nop
7314  # POSIX says lex can declare yytext either as a pointer or an array; the
7315# default is implementation-dependent.  Figure out which it is, since
7316# not all implementations provide the %pointer and %array declarations.
7317ac_cv_prog_lex_yytext_pointer=no
7318cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7319/* end confdefs.h.  */
7320
7321  #define YYTEXT_POINTER 1
7322`cat $LEX_OUTPUT_ROOT.c`
7323_ACEOF
7324if ac_fn_c_try_compile "$LINENO"
7325then :
7326  ac_cv_prog_lex_yytext_pointer=yes
7327fi
7328rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
7329
7330fi
7331{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_lex_yytext_pointer" >&5
7332printf "%s\n" "$ac_cv_prog_lex_yytext_pointer" >&6; }
7333if test $ac_cv_prog_lex_yytext_pointer = yes; then
7334
7335printf "%s\n" "#define YYTEXT_POINTER 1" >>confdefs.h
7336
7337fi
7338
7339fi
7340rm -f conftest.l $LEX_OUTPUT_ROOT.c
7341
7342fi
7343if test "$LEX" != "" -a "$LEX" != ":"; then
7344
7345	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for yylex_destroy" >&5
7346printf %s "checking for yylex_destroy... " >&6; }
7347	if echo %% | $LEX -t 2>&1 | grep yylex_destroy >/dev/null 2>&1; then
7348
7349printf "%s\n" "#define LEX_HAS_YYLEX_DESTROY 1" >>confdefs.h
7350
7351		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7352printf "%s\n" "yes" >&6; }
7353	else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7354printf "%s\n" "no" >&6; };
7355		LEX=":"
7356	fi
7357
7358fi
7359if test "$LEX" != "" -a "$LEX" != ":"; then
7360
7361	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for lex %option" >&5
7362printf %s "checking for lex %option... " >&6; }
7363	if cat <<EOF | $LEX -t 2>&1 | grep yy_delete_buffer >/dev/null 2>&1; then
7364%option nounput
7365%%
7366EOF
7367		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7368printf "%s\n" "yes" >&6; }
7369	else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7370printf "%s\n" "no" >&6; };
7371		LEX=":"
7372	fi
7373
7374fi
7375if test "$LEX" = "" -o "$LEX" = ":"; then
7376	if test ! -f util/configlexer.c; then
7377		as_fn_error $? "no lex and no util/configlexer.c: need flex and bison to compile from source repository." "$LINENO" 5
7378	fi
7379fi
7380for ac_prog in 'bison -y' byacc
7381do
7382  # Extract the first word of "$ac_prog", so it can be a program name with args.
7383set dummy $ac_prog; ac_word=$2
7384{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7385printf %s "checking for $ac_word... " >&6; }
7386if test ${ac_cv_prog_YACC+y}
7387then :
7388  printf %s "(cached) " >&6
7389else $as_nop
7390  if test -n "$YACC"; then
7391  ac_cv_prog_YACC="$YACC" # Let the user override the test.
7392else
7393as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7394for as_dir in $PATH
7395do
7396  IFS=$as_save_IFS
7397  case $as_dir in #(((
7398    '') as_dir=./ ;;
7399    */) ;;
7400    *) as_dir=$as_dir/ ;;
7401  esac
7402    for ac_exec_ext in '' $ac_executable_extensions; do
7403  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
7404    ac_cv_prog_YACC="$ac_prog"
7405    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
7406    break 2
7407  fi
7408done
7409  done
7410IFS=$as_save_IFS
7411
7412fi
7413fi
7414YACC=$ac_cv_prog_YACC
7415if test -n "$YACC"; then
7416  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $YACC" >&5
7417printf "%s\n" "$YACC" >&6; }
7418else
7419  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7420printf "%s\n" "no" >&6; }
7421fi
7422
7423
7424  test -n "$YACC" && break
7425done
7426test -n "$YACC" || YACC="yacc"
7427
7428if test "$YACC" = "" -o "$YACC" = ":"; then
7429	if test ! -f util/configparser.c; then
7430		as_fn_error $? "no yacc and no util/configparser.c: need flex and bison to compile from source repository." "$LINENO" 5
7431	fi
7432fi
7433# Extract the first word of "doxygen", so it can be a program name with args.
7434set dummy doxygen; ac_word=$2
7435{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7436printf %s "checking for $ac_word... " >&6; }
7437if test ${ac_cv_prog_doxygen+y}
7438then :
7439  printf %s "(cached) " >&6
7440else $as_nop
7441  if test -n "$doxygen"; then
7442  ac_cv_prog_doxygen="$doxygen" # Let the user override the test.
7443else
7444as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7445for as_dir in $PATH
7446do
7447  IFS=$as_save_IFS
7448  case $as_dir in #(((
7449    '') as_dir=./ ;;
7450    */) ;;
7451    *) as_dir=$as_dir/ ;;
7452  esac
7453    for ac_exec_ext in '' $ac_executable_extensions; do
7454  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
7455    ac_cv_prog_doxygen="doxygen"
7456    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
7457    break 2
7458  fi
7459done
7460  done
7461IFS=$as_save_IFS
7462
7463fi
7464fi
7465doxygen=$ac_cv_prog_doxygen
7466if test -n "$doxygen"; then
7467  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $doxygen" >&5
7468printf "%s\n" "$doxygen" >&6; }
7469else
7470  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7471printf "%s\n" "no" >&6; }
7472fi
7473
7474
7475if test -n "$ac_tool_prefix"; then
7476  # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
7477set dummy ${ac_tool_prefix}strip; ac_word=$2
7478{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7479printf %s "checking for $ac_word... " >&6; }
7480if test ${ac_cv_prog_STRIP+y}
7481then :
7482  printf %s "(cached) " >&6
7483else $as_nop
7484  if test -n "$STRIP"; then
7485  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
7486else
7487as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7488for as_dir in $PATH
7489do
7490  IFS=$as_save_IFS
7491  case $as_dir in #(((
7492    '') as_dir=./ ;;
7493    */) ;;
7494    *) as_dir=$as_dir/ ;;
7495  esac
7496    for ac_exec_ext in '' $ac_executable_extensions; do
7497  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
7498    ac_cv_prog_STRIP="${ac_tool_prefix}strip"
7499    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
7500    break 2
7501  fi
7502done
7503  done
7504IFS=$as_save_IFS
7505
7506fi
7507fi
7508STRIP=$ac_cv_prog_STRIP
7509if test -n "$STRIP"; then
7510  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
7511printf "%s\n" "$STRIP" >&6; }
7512else
7513  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7514printf "%s\n" "no" >&6; }
7515fi
7516
7517
7518fi
7519if test -z "$ac_cv_prog_STRIP"; then
7520  ac_ct_STRIP=$STRIP
7521  # Extract the first word of "strip", so it can be a program name with args.
7522set dummy strip; ac_word=$2
7523{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7524printf %s "checking for $ac_word... " >&6; }
7525if test ${ac_cv_prog_ac_ct_STRIP+y}
7526then :
7527  printf %s "(cached) " >&6
7528else $as_nop
7529  if test -n "$ac_ct_STRIP"; then
7530  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
7531else
7532as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7533for as_dir in $PATH
7534do
7535  IFS=$as_save_IFS
7536  case $as_dir in #(((
7537    '') as_dir=./ ;;
7538    */) ;;
7539    *) as_dir=$as_dir/ ;;
7540  esac
7541    for ac_exec_ext in '' $ac_executable_extensions; do
7542  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
7543    ac_cv_prog_ac_ct_STRIP="strip"
7544    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
7545    break 2
7546  fi
7547done
7548  done
7549IFS=$as_save_IFS
7550
7551fi
7552fi
7553ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
7554if test -n "$ac_ct_STRIP"; then
7555  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
7556printf "%s\n" "$ac_ct_STRIP" >&6; }
7557else
7558  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7559printf "%s\n" "no" >&6; }
7560fi
7561
7562  if test "x$ac_ct_STRIP" = x; then
7563    STRIP=""
7564  else
7565    case $cross_compiling:$ac_tool_warned in
7566yes:)
7567{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7568printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7569ac_tool_warned=yes ;;
7570esac
7571    STRIP=$ac_ct_STRIP
7572  fi
7573else
7574  STRIP="$ac_cv_prog_STRIP"
7575fi
7576
7577
7578
7579
7580  # Make sure we can run config.sub.
7581$SHELL "${ac_aux_dir}config.sub" sun4 >/dev/null 2>&1 ||
7582  as_fn_error $? "cannot run $SHELL ${ac_aux_dir}config.sub" "$LINENO" 5
7583
7584{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
7585printf %s "checking build system type... " >&6; }
7586if test ${ac_cv_build+y}
7587then :
7588  printf %s "(cached) " >&6
7589else $as_nop
7590  ac_build_alias=$build_alias
7591test "x$ac_build_alias" = x &&
7592  ac_build_alias=`$SHELL "${ac_aux_dir}config.guess"`
7593test "x$ac_build_alias" = x &&
7594  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
7595ac_cv_build=`$SHELL "${ac_aux_dir}config.sub" $ac_build_alias` ||
7596  as_fn_error $? "$SHELL ${ac_aux_dir}config.sub $ac_build_alias failed" "$LINENO" 5
7597
7598fi
7599{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
7600printf "%s\n" "$ac_cv_build" >&6; }
7601case $ac_cv_build in
7602*-*-*) ;;
7603*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
7604esac
7605build=$ac_cv_build
7606ac_save_IFS=$IFS; IFS='-'
7607set x $ac_cv_build
7608shift
7609build_cpu=$1
7610build_vendor=$2
7611shift; shift
7612# Remember, the first character of IFS is used to create $*,
7613# except with old shells:
7614build_os=$*
7615IFS=$ac_save_IFS
7616case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
7617
7618
7619{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
7620printf %s "checking host system type... " >&6; }
7621if test ${ac_cv_host+y}
7622then :
7623  printf %s "(cached) " >&6
7624else $as_nop
7625  if test "x$host_alias" = x; then
7626  ac_cv_host=$ac_cv_build
7627else
7628  ac_cv_host=`$SHELL "${ac_aux_dir}config.sub" $host_alias` ||
7629    as_fn_error $? "$SHELL ${ac_aux_dir}config.sub $host_alias failed" "$LINENO" 5
7630fi
7631
7632fi
7633{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
7634printf "%s\n" "$ac_cv_host" >&6; }
7635case $ac_cv_host in
7636*-*-*) ;;
7637*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
7638esac
7639host=$ac_cv_host
7640ac_save_IFS=$IFS; IFS='-'
7641set x $ac_cv_host
7642shift
7643host_cpu=$1
7644host_vendor=$2
7645shift; shift
7646# Remember, the first character of IFS is used to create $*,
7647# except with old shells:
7648host_os=$*
7649IFS=$ac_save_IFS
7650case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
7651
7652
7653
7654# skip these tests, we do not need them.
7655
7656
7657
7658
7659
7660
7661
7662
7663# always use ./libtool unless override from commandline (libtool=mylibtool)
7664if test -z "$libtool"; then
7665	libtool="./libtool"
7666fi
7667
7668# avoid libtool max commandline length test on systems that fork slowly.
7669
7670if echo "$host_os" | grep "sunos4" >/dev/null; then
7671	lt_cv_sys_max_cmd_len=32750;
7672fi
7673if test -n "$ac_tool_prefix"; then
7674  # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
7675set dummy ${ac_tool_prefix}ar; ac_word=$2
7676{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7677printf %s "checking for $ac_word... " >&6; }
7678if test ${ac_cv_path_AR+y}
7679then :
7680  printf %s "(cached) " >&6
7681else $as_nop
7682  case $AR in
7683  [\\/]* | ?:[\\/]*)
7684  ac_cv_path_AR="$AR" # Let the user override the test with a path.
7685  ;;
7686  *)
7687  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7688for as_dir in $PATH
7689do
7690  IFS=$as_save_IFS
7691  case $as_dir in #(((
7692    '') as_dir=./ ;;
7693    */) ;;
7694    *) as_dir=$as_dir/ ;;
7695  esac
7696    for ac_exec_ext in '' $ac_executable_extensions; do
7697  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
7698    ac_cv_path_AR="$as_dir$ac_word$ac_exec_ext"
7699    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
7700    break 2
7701  fi
7702done
7703  done
7704IFS=$as_save_IFS
7705
7706  ;;
7707esac
7708fi
7709AR=$ac_cv_path_AR
7710if test -n "$AR"; then
7711  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
7712printf "%s\n" "$AR" >&6; }
7713else
7714  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7715printf "%s\n" "no" >&6; }
7716fi
7717
7718
7719fi
7720if test -z "$ac_cv_path_AR"; then
7721  ac_pt_AR=$AR
7722  # Extract the first word of "ar", so it can be a program name with args.
7723set dummy ar; ac_word=$2
7724{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7725printf %s "checking for $ac_word... " >&6; }
7726if test ${ac_cv_path_ac_pt_AR+y}
7727then :
7728  printf %s "(cached) " >&6
7729else $as_nop
7730  case $ac_pt_AR in
7731  [\\/]* | ?:[\\/]*)
7732  ac_cv_path_ac_pt_AR="$ac_pt_AR" # Let the user override the test with a path.
7733  ;;
7734  *)
7735  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7736for as_dir in $PATH
7737do
7738  IFS=$as_save_IFS
7739  case $as_dir in #(((
7740    '') as_dir=./ ;;
7741    */) ;;
7742    *) as_dir=$as_dir/ ;;
7743  esac
7744    for ac_exec_ext in '' $ac_executable_extensions; do
7745  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
7746    ac_cv_path_ac_pt_AR="$as_dir$ac_word$ac_exec_ext"
7747    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
7748    break 2
7749  fi
7750done
7751  done
7752IFS=$as_save_IFS
7753
7754  ;;
7755esac
7756fi
7757ac_pt_AR=$ac_cv_path_ac_pt_AR
7758if test -n "$ac_pt_AR"; then
7759  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_pt_AR" >&5
7760printf "%s\n" "$ac_pt_AR" >&6; }
7761else
7762  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7763printf "%s\n" "no" >&6; }
7764fi
7765
7766  if test "x$ac_pt_AR" = x; then
7767    AR="false"
7768  else
7769    case $cross_compiling:$ac_tool_warned in
7770yes:)
7771{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7772printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7773ac_tool_warned=yes ;;
7774esac
7775    AR=$ac_pt_AR
7776  fi
7777else
7778  AR="$ac_cv_path_AR"
7779fi
7780
7781if test $AR = false; then
7782	as_fn_error $? "Cannot find 'ar', please extend PATH to include it" "$LINENO" 5
7783fi
7784
7785
7786case `pwd` in
7787  *\ * | *\	*)
7788    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5
7789printf "%s\n" "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;;
7790esac
7791
7792
7793
7794macro_version='2.4.6'
7795macro_revision='2.4.6'
7796
7797
7798
7799
7800
7801
7802
7803
7804
7805
7806
7807
7808
7809
7810ltmain=$ac_aux_dir/ltmain.sh
7811
7812# Backslashify metacharacters that are still active within
7813# double-quoted strings.
7814sed_quote_subst='s/\(["`$\\]\)/\\\1/g'
7815
7816# Same as above, but do not quote variable references.
7817double_quote_subst='s/\(["`\\]\)/\\\1/g'
7818
7819# Sed substitution to delay expansion of an escaped shell variable in a
7820# double_quote_subst'ed string.
7821delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
7822
7823# Sed substitution to delay expansion of an escaped single quote.
7824delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
7825
7826# Sed substitution to avoid accidental globbing in evaled expressions
7827no_glob_subst='s/\*/\\\*/g'
7828
7829ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
7830ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
7831ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
7832
7833{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5
7834printf %s "checking how to print strings... " >&6; }
7835# Test print first, because it will be a builtin if present.
7836if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \
7837   test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
7838  ECHO='print -r --'
7839elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
7840  ECHO='printf %s\n'
7841else
7842  # Use this function as a fallback that always works.
7843  func_fallback_echo ()
7844  {
7845    eval 'cat <<_LTECHO_EOF
7846$1
7847_LTECHO_EOF'
7848  }
7849  ECHO='func_fallback_echo'
7850fi
7851
7852# func_echo_all arg...
7853# Invoke $ECHO with all args, space-separated.
7854func_echo_all ()
7855{
7856    $ECHO ""
7857}
7858
7859case $ECHO in
7860  printf*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: printf" >&5
7861printf "%s\n" "printf" >&6; } ;;
7862  print*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: print -r" >&5
7863printf "%s\n" "print -r" >&6; } ;;
7864  *) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: cat" >&5
7865printf "%s\n" "cat" >&6; } ;;
7866esac
7867
7868
7869
7870
7871
7872
7873
7874
7875
7876
7877
7878
7879
7880
7881{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
7882printf %s "checking for a sed that does not truncate output... " >&6; }
7883if test ${ac_cv_path_SED+y}
7884then :
7885  printf %s "(cached) " >&6
7886else $as_nop
7887            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
7888     for ac_i in 1 2 3 4 5 6 7; do
7889       ac_script="$ac_script$as_nl$ac_script"
7890     done
7891     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
7892     { ac_script=; unset ac_script;}
7893     if test -z "$SED"; then
7894  ac_path_SED_found=false
7895  # Loop through the user's path and test for each of PROGNAME-LIST
7896  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7897for as_dir in $PATH
7898do
7899  IFS=$as_save_IFS
7900  case $as_dir in #(((
7901    '') as_dir=./ ;;
7902    */) ;;
7903    *) as_dir=$as_dir/ ;;
7904  esac
7905    for ac_prog in sed gsed
7906   do
7907    for ac_exec_ext in '' $ac_executable_extensions; do
7908      ac_path_SED="$as_dir$ac_prog$ac_exec_ext"
7909      as_fn_executable_p "$ac_path_SED" || continue
7910# Check for GNU ac_path_SED and select it if it is found.
7911  # Check for GNU $ac_path_SED
7912case `"$ac_path_SED" --version 2>&1` in
7913*GNU*)
7914  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
7915*)
7916  ac_count=0
7917  printf %s 0123456789 >"conftest.in"
7918  while :
7919  do
7920    cat "conftest.in" "conftest.in" >"conftest.tmp"
7921    mv "conftest.tmp" "conftest.in"
7922    cp "conftest.in" "conftest.nl"
7923    printf "%s\n" '' >> "conftest.nl"
7924    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
7925    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
7926    as_fn_arith $ac_count + 1 && ac_count=$as_val
7927    if test $ac_count -gt ${ac_path_SED_max-0}; then
7928      # Best one so far, save it but keep looking for a better one
7929      ac_cv_path_SED="$ac_path_SED"
7930      ac_path_SED_max=$ac_count
7931    fi
7932    # 10*(2^10) chars as input seems more than enough
7933    test $ac_count -gt 10 && break
7934  done
7935  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
7936esac
7937
7938      $ac_path_SED_found && break 3
7939    done
7940  done
7941  done
7942IFS=$as_save_IFS
7943  if test -z "$ac_cv_path_SED"; then
7944    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
7945  fi
7946else
7947  ac_cv_path_SED=$SED
7948fi
7949
7950fi
7951{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
7952printf "%s\n" "$ac_cv_path_SED" >&6; }
7953 SED="$ac_cv_path_SED"
7954  rm -f conftest.sed
7955
7956test -z "$SED" && SED=sed
7957Xsed="$SED -e 1s/^X//"
7958
7959
7960
7961
7962
7963
7964
7965
7966
7967
7968
7969{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
7970printf %s "checking for egrep... " >&6; }
7971if test ${ac_cv_path_EGREP+y}
7972then :
7973  printf %s "(cached) " >&6
7974else $as_nop
7975  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
7976   then ac_cv_path_EGREP="$GREP -E"
7977   else
7978     if test -z "$EGREP"; then
7979  ac_path_EGREP_found=false
7980  # Loop through the user's path and test for each of PROGNAME-LIST
7981  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7982for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
7983do
7984  IFS=$as_save_IFS
7985  case $as_dir in #(((
7986    '') as_dir=./ ;;
7987    */) ;;
7988    *) as_dir=$as_dir/ ;;
7989  esac
7990    for ac_prog in egrep
7991   do
7992    for ac_exec_ext in '' $ac_executable_extensions; do
7993      ac_path_EGREP="$as_dir$ac_prog$ac_exec_ext"
7994      as_fn_executable_p "$ac_path_EGREP" || continue
7995# Check for GNU ac_path_EGREP and select it if it is found.
7996  # Check for GNU $ac_path_EGREP
7997case `"$ac_path_EGREP" --version 2>&1` in
7998*GNU*)
7999  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
8000*)
8001  ac_count=0
8002  printf %s 0123456789 >"conftest.in"
8003  while :
8004  do
8005    cat "conftest.in" "conftest.in" >"conftest.tmp"
8006    mv "conftest.tmp" "conftest.in"
8007    cp "conftest.in" "conftest.nl"
8008    printf "%s\n" 'EGREP' >> "conftest.nl"
8009    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
8010    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
8011    as_fn_arith $ac_count + 1 && ac_count=$as_val
8012    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
8013      # Best one so far, save it but keep looking for a better one
8014      ac_cv_path_EGREP="$ac_path_EGREP"
8015      ac_path_EGREP_max=$ac_count
8016    fi
8017    # 10*(2^10) chars as input seems more than enough
8018    test $ac_count -gt 10 && break
8019  done
8020  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
8021esac
8022
8023      $ac_path_EGREP_found && break 3
8024    done
8025  done
8026  done
8027IFS=$as_save_IFS
8028  if test -z "$ac_cv_path_EGREP"; then
8029    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
8030  fi
8031else
8032  ac_cv_path_EGREP=$EGREP
8033fi
8034
8035   fi
8036fi
8037{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
8038printf "%s\n" "$ac_cv_path_EGREP" >&6; }
8039 EGREP="$ac_cv_path_EGREP"
8040
8041
8042{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
8043printf %s "checking for fgrep... " >&6; }
8044if test ${ac_cv_path_FGREP+y}
8045then :
8046  printf %s "(cached) " >&6
8047else $as_nop
8048  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
8049   then ac_cv_path_FGREP="$GREP -F"
8050   else
8051     if test -z "$FGREP"; then
8052  ac_path_FGREP_found=false
8053  # Loop through the user's path and test for each of PROGNAME-LIST
8054  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8055for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
8056do
8057  IFS=$as_save_IFS
8058  case $as_dir in #(((
8059    '') as_dir=./ ;;
8060    */) ;;
8061    *) as_dir=$as_dir/ ;;
8062  esac
8063    for ac_prog in fgrep
8064   do
8065    for ac_exec_ext in '' $ac_executable_extensions; do
8066      ac_path_FGREP="$as_dir$ac_prog$ac_exec_ext"
8067      as_fn_executable_p "$ac_path_FGREP" || continue
8068# Check for GNU ac_path_FGREP and select it if it is found.
8069  # Check for GNU $ac_path_FGREP
8070case `"$ac_path_FGREP" --version 2>&1` in
8071*GNU*)
8072  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
8073*)
8074  ac_count=0
8075  printf %s 0123456789 >"conftest.in"
8076  while :
8077  do
8078    cat "conftest.in" "conftest.in" >"conftest.tmp"
8079    mv "conftest.tmp" "conftest.in"
8080    cp "conftest.in" "conftest.nl"
8081    printf "%s\n" 'FGREP' >> "conftest.nl"
8082    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
8083    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
8084    as_fn_arith $ac_count + 1 && ac_count=$as_val
8085    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
8086      # Best one so far, save it but keep looking for a better one
8087      ac_cv_path_FGREP="$ac_path_FGREP"
8088      ac_path_FGREP_max=$ac_count
8089    fi
8090    # 10*(2^10) chars as input seems more than enough
8091    test $ac_count -gt 10 && break
8092  done
8093  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
8094esac
8095
8096      $ac_path_FGREP_found && break 3
8097    done
8098  done
8099  done
8100IFS=$as_save_IFS
8101  if test -z "$ac_cv_path_FGREP"; then
8102    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
8103  fi
8104else
8105  ac_cv_path_FGREP=$FGREP
8106fi
8107
8108   fi
8109fi
8110{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
8111printf "%s\n" "$ac_cv_path_FGREP" >&6; }
8112 FGREP="$ac_cv_path_FGREP"
8113
8114
8115test -z "$GREP" && GREP=grep
8116
8117
8118
8119
8120
8121
8122
8123
8124
8125
8126
8127
8128
8129
8130
8131
8132
8133
8134
8135# Check whether --with-gnu-ld was given.
8136if test ${with_gnu_ld+y}
8137then :
8138  withval=$with_gnu_ld; test no = "$withval" || with_gnu_ld=yes
8139else $as_nop
8140  with_gnu_ld=no
8141fi
8142
8143ac_prog=ld
8144if test yes = "$GCC"; then
8145  # Check if gcc -print-prog-name=ld gives a path.
8146  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5
8147printf %s "checking for ld used by $CC... " >&6; }
8148  case $host in
8149  *-*-mingw*)
8150    # gcc leaves a trailing carriage return, which upsets mingw
8151    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
8152  *)
8153    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
8154  esac
8155  case $ac_prog in
8156    # Accept absolute paths.
8157    [\\/]* | ?:[\\/]*)
8158      re_direlt='/[^/][^/]*/\.\./'
8159      # Canonicalize the pathname of ld
8160      ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
8161      while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
8162	ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
8163      done
8164      test -z "$LD" && LD=$ac_prog
8165      ;;
8166  "")
8167    # If it fails, then pretend we aren't using GCC.
8168    ac_prog=ld
8169    ;;
8170  *)
8171    # If it is relative, then search for the first ld in PATH.
8172    with_gnu_ld=unknown
8173    ;;
8174  esac
8175elif test yes = "$with_gnu_ld"; then
8176  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
8177printf %s "checking for GNU ld... " >&6; }
8178else
8179  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
8180printf %s "checking for non-GNU ld... " >&6; }
8181fi
8182if test ${lt_cv_path_LD+y}
8183then :
8184  printf %s "(cached) " >&6
8185else $as_nop
8186  if test -z "$LD"; then
8187  lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
8188  for ac_dir in $PATH; do
8189    IFS=$lt_save_ifs
8190    test -z "$ac_dir" && ac_dir=.
8191    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
8192      lt_cv_path_LD=$ac_dir/$ac_prog
8193      # Check to see if the program is GNU ld.  I'd rather use --version,
8194      # but apparently some variants of GNU ld only accept -v.
8195      # Break only if it was the GNU/non-GNU ld that we prefer.
8196      case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
8197      *GNU* | *'with BFD'*)
8198	test no != "$with_gnu_ld" && break
8199	;;
8200      *)
8201	test yes != "$with_gnu_ld" && break
8202	;;
8203      esac
8204    fi
8205  done
8206  IFS=$lt_save_ifs
8207else
8208  lt_cv_path_LD=$LD # Let the user override the test with a path.
8209fi
8210fi
8211
8212LD=$lt_cv_path_LD
8213if test -n "$LD"; then
8214  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
8215printf "%s\n" "$LD" >&6; }
8216else
8217  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
8218printf "%s\n" "no" >&6; }
8219fi
8220test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
8221{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
8222printf %s "checking if the linker ($LD) is GNU ld... " >&6; }
8223if test ${lt_cv_prog_gnu_ld+y}
8224then :
8225  printf %s "(cached) " >&6
8226else $as_nop
8227  # I'd rather use --version here, but apparently some GNU lds only accept -v.
8228case `$LD -v 2>&1 </dev/null` in
8229*GNU* | *'with BFD'*)
8230  lt_cv_prog_gnu_ld=yes
8231  ;;
8232*)
8233  lt_cv_prog_gnu_ld=no
8234  ;;
8235esac
8236fi
8237{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_gnu_ld" >&5
8238printf "%s\n" "$lt_cv_prog_gnu_ld" >&6; }
8239with_gnu_ld=$lt_cv_prog_gnu_ld
8240
8241
8242
8243
8244
8245
8246
8247
8248
8249{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)" >&5
8250printf %s "checking for BSD- or MS-compatible name lister (nm)... " >&6; }
8251if test ${lt_cv_path_NM+y}
8252then :
8253  printf %s "(cached) " >&6
8254else $as_nop
8255  if test -n "$NM"; then
8256  # Let the user override the test.
8257  lt_cv_path_NM=$NM
8258else
8259  lt_nm_to_check=${ac_tool_prefix}nm
8260  if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
8261    lt_nm_to_check="$lt_nm_to_check nm"
8262  fi
8263  for lt_tmp_nm in $lt_nm_to_check; do
8264    lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
8265    for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
8266      IFS=$lt_save_ifs
8267      test -z "$ac_dir" && ac_dir=.
8268      tmp_nm=$ac_dir/$lt_tmp_nm
8269      if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then
8270	# Check to see if the nm accepts a BSD-compat flag.
8271	# Adding the 'sed 1q' prevents false positives on HP-UX, which says:
8272	#   nm: unknown option "B" ignored
8273	# Tru64's nm complains that /dev/null is an invalid object file
8274	# MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty
8275	case $build_os in
8276	mingw*) lt_bad_file=conftest.nm/nofile ;;
8277	*) lt_bad_file=/dev/null ;;
8278	esac
8279	case `"$tmp_nm" -B $lt_bad_file 2>&1 | sed '1q'` in
8280	*$lt_bad_file* | *'Invalid file or object type'*)
8281	  lt_cv_path_NM="$tmp_nm -B"
8282	  break 2
8283	  ;;
8284	*)
8285	  case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
8286	  */dev/null*)
8287	    lt_cv_path_NM="$tmp_nm -p"
8288	    break 2
8289	    ;;
8290	  *)
8291	    lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
8292	    continue # so that we can try to find one that supports BSD flags
8293	    ;;
8294	  esac
8295	  ;;
8296	esac
8297      fi
8298    done
8299    IFS=$lt_save_ifs
8300  done
8301  : ${lt_cv_path_NM=no}
8302fi
8303fi
8304{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5
8305printf "%s\n" "$lt_cv_path_NM" >&6; }
8306if test no != "$lt_cv_path_NM"; then
8307  NM=$lt_cv_path_NM
8308else
8309  # Didn't find any BSD compatible name lister, look for dumpbin.
8310  if test -n "$DUMPBIN"; then :
8311    # Let the user override the test.
8312  else
8313    if test -n "$ac_tool_prefix"; then
8314  for ac_prog in dumpbin "link -dump"
8315  do
8316    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
8317set dummy $ac_tool_prefix$ac_prog; ac_word=$2
8318{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8319printf %s "checking for $ac_word... " >&6; }
8320if test ${ac_cv_prog_DUMPBIN+y}
8321then :
8322  printf %s "(cached) " >&6
8323else $as_nop
8324  if test -n "$DUMPBIN"; then
8325  ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
8326else
8327as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8328for as_dir in $PATH
8329do
8330  IFS=$as_save_IFS
8331  case $as_dir in #(((
8332    '') as_dir=./ ;;
8333    */) ;;
8334    *) as_dir=$as_dir/ ;;
8335  esac
8336    for ac_exec_ext in '' $ac_executable_extensions; do
8337  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
8338    ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog"
8339    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
8340    break 2
8341  fi
8342done
8343  done
8344IFS=$as_save_IFS
8345
8346fi
8347fi
8348DUMPBIN=$ac_cv_prog_DUMPBIN
8349if test -n "$DUMPBIN"; then
8350  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
8351printf "%s\n" "$DUMPBIN" >&6; }
8352else
8353  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
8354printf "%s\n" "no" >&6; }
8355fi
8356
8357
8358    test -n "$DUMPBIN" && break
8359  done
8360fi
8361if test -z "$DUMPBIN"; then
8362  ac_ct_DUMPBIN=$DUMPBIN
8363  for ac_prog in dumpbin "link -dump"
8364do
8365  # Extract the first word of "$ac_prog", so it can be a program name with args.
8366set dummy $ac_prog; ac_word=$2
8367{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8368printf %s "checking for $ac_word... " >&6; }
8369if test ${ac_cv_prog_ac_ct_DUMPBIN+y}
8370then :
8371  printf %s "(cached) " >&6
8372else $as_nop
8373  if test -n "$ac_ct_DUMPBIN"; then
8374  ac_cv_prog_ac_ct_DUMPBIN="$ac_ct_DUMPBIN" # Let the user override the test.
8375else
8376as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8377for as_dir in $PATH
8378do
8379  IFS=$as_save_IFS
8380  case $as_dir in #(((
8381    '') as_dir=./ ;;
8382    */) ;;
8383    *) as_dir=$as_dir/ ;;
8384  esac
8385    for ac_exec_ext in '' $ac_executable_extensions; do
8386  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
8387    ac_cv_prog_ac_ct_DUMPBIN="$ac_prog"
8388    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
8389    break 2
8390  fi
8391done
8392  done
8393IFS=$as_save_IFS
8394
8395fi
8396fi
8397ac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN
8398if test -n "$ac_ct_DUMPBIN"; then
8399  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DUMPBIN" >&5
8400printf "%s\n" "$ac_ct_DUMPBIN" >&6; }
8401else
8402  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
8403printf "%s\n" "no" >&6; }
8404fi
8405
8406
8407  test -n "$ac_ct_DUMPBIN" && break
8408done
8409
8410  if test "x$ac_ct_DUMPBIN" = x; then
8411    DUMPBIN=":"
8412  else
8413    case $cross_compiling:$ac_tool_warned in
8414yes:)
8415{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8416printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8417ac_tool_warned=yes ;;
8418esac
8419    DUMPBIN=$ac_ct_DUMPBIN
8420  fi
8421fi
8422
8423    case `$DUMPBIN -symbols -headers /dev/null 2>&1 | sed '1q'` in
8424    *COFF*)
8425      DUMPBIN="$DUMPBIN -symbols -headers"
8426      ;;
8427    *)
8428      DUMPBIN=:
8429      ;;
8430    esac
8431  fi
8432
8433  if test : != "$DUMPBIN"; then
8434    NM=$DUMPBIN
8435  fi
8436fi
8437test -z "$NM" && NM=nm
8438
8439
8440
8441
8442
8443
8444{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface" >&5
8445printf %s "checking the name lister ($NM) interface... " >&6; }
8446if test ${lt_cv_nm_interface+y}
8447then :
8448  printf %s "(cached) " >&6
8449else $as_nop
8450  lt_cv_nm_interface="BSD nm"
8451  echo "int some_variable = 0;" > conftest.$ac_ext
8452  (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&5)
8453  (eval "$ac_compile" 2>conftest.err)
8454  cat conftest.err >&5
8455  (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
8456  (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
8457  cat conftest.err >&5
8458  (eval echo "\"\$as_me:$LINENO: output\"" >&5)
8459  cat conftest.out >&5
8460  if $GREP 'External.*some_variable' conftest.out > /dev/null; then
8461    lt_cv_nm_interface="MS dumpbin"
8462  fi
8463  rm -f conftest*
8464fi
8465{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_nm_interface" >&5
8466printf "%s\n" "$lt_cv_nm_interface" >&6; }
8467
8468{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
8469printf %s "checking whether ln -s works... " >&6; }
8470LN_S=$as_ln_s
8471if test "$LN_S" = "ln -s"; then
8472  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8473printf "%s\n" "yes" >&6; }
8474else
8475  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
8476printf "%s\n" "no, using $LN_S" >&6; }
8477fi
8478
8479# find the maximum length of command line arguments
8480{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5
8481printf %s "checking the maximum length of command line arguments... " >&6; }
8482if test ${lt_cv_sys_max_cmd_len+y}
8483then :
8484  printf %s "(cached) " >&6
8485else $as_nop
8486    i=0
8487  teststring=ABCD
8488
8489  case $build_os in
8490  msdosdjgpp*)
8491    # On DJGPP, this test can blow up pretty badly due to problems in libc
8492    # (any single argument exceeding 2000 bytes causes a buffer overrun
8493    # during glob expansion).  Even if it were fixed, the result of this
8494    # check would be larger than it should be.
8495    lt_cv_sys_max_cmd_len=12288;    # 12K is about right
8496    ;;
8497
8498  gnu*)
8499    # Under GNU Hurd, this test is not required because there is
8500    # no limit to the length of command line arguments.
8501    # Libtool will interpret -1 as no limit whatsoever
8502    lt_cv_sys_max_cmd_len=-1;
8503    ;;
8504
8505  cygwin* | mingw* | cegcc*)
8506    # On Win9x/ME, this test blows up -- it succeeds, but takes
8507    # about 5 minutes as the teststring grows exponentially.
8508    # Worse, since 9x/ME are not pre-emptively multitasking,
8509    # you end up with a "frozen" computer, even though with patience
8510    # the test eventually succeeds (with a max line length of 256k).
8511    # Instead, let's just punt: use the minimum linelength reported by
8512    # all of the supported platforms: 8192 (on NT/2K/XP).
8513    lt_cv_sys_max_cmd_len=8192;
8514    ;;
8515
8516  mint*)
8517    # On MiNT this can take a long time and run out of memory.
8518    lt_cv_sys_max_cmd_len=8192;
8519    ;;
8520
8521  amigaos*)
8522    # On AmigaOS with pdksh, this test takes hours, literally.
8523    # So we just punt and use a minimum line length of 8192.
8524    lt_cv_sys_max_cmd_len=8192;
8525    ;;
8526
8527  bitrig* | darwin* | dragonfly* | freebsd* | netbsd* | openbsd*)
8528    # This has been around since 386BSD, at least.  Likely further.
8529    if test -x /sbin/sysctl; then
8530      lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
8531    elif test -x /usr/sbin/sysctl; then
8532      lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
8533    else
8534      lt_cv_sys_max_cmd_len=65536	# usable default for all BSDs
8535    fi
8536    # And add a safety zone
8537    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
8538    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
8539    ;;
8540
8541  interix*)
8542    # We know the value 262144 and hardcode it with a safety zone (like BSD)
8543    lt_cv_sys_max_cmd_len=196608
8544    ;;
8545
8546  os2*)
8547    # The test takes a long time on OS/2.
8548    lt_cv_sys_max_cmd_len=8192
8549    ;;
8550
8551  osf*)
8552    # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
8553    # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
8554    # nice to cause kernel panics so lets avoid the loop below.
8555    # First set a reasonable default.
8556    lt_cv_sys_max_cmd_len=16384
8557    #
8558    if test -x /sbin/sysconfig; then
8559      case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
8560        *1*) lt_cv_sys_max_cmd_len=-1 ;;
8561      esac
8562    fi
8563    ;;
8564  sco3.2v5*)
8565    lt_cv_sys_max_cmd_len=102400
8566    ;;
8567  sysv5* | sco5v6* | sysv4.2uw2*)
8568    kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
8569    if test -n "$kargmax"; then
8570      lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[	 ]//'`
8571    else
8572      lt_cv_sys_max_cmd_len=32768
8573    fi
8574    ;;
8575  *)
8576    lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
8577    if test -n "$lt_cv_sys_max_cmd_len" && \
8578       test undefined != "$lt_cv_sys_max_cmd_len"; then
8579      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
8580      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
8581    else
8582      # Make teststring a little bigger before we do anything with it.
8583      # a 1K string should be a reasonable start.
8584      for i in 1 2 3 4 5 6 7 8; do
8585        teststring=$teststring$teststring
8586      done
8587      SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
8588      # If test is not a shell built-in, we'll probably end up computing a
8589      # maximum length that is only half of the actual maximum length, but
8590      # we can't tell.
8591      while { test X`env echo "$teststring$teststring" 2>/dev/null` \
8592	         = "X$teststring$teststring"; } >/dev/null 2>&1 &&
8593	      test 17 != "$i" # 1/2 MB should be enough
8594      do
8595        i=`expr $i + 1`
8596        teststring=$teststring$teststring
8597      done
8598      # Only check the string length outside the loop.
8599      lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
8600      teststring=
8601      # Add a significant safety factor because C++ compilers can tack on
8602      # massive amounts of additional arguments before passing them to the
8603      # linker.  It appears as though 1/2 is a usable value.
8604      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
8605    fi
8606    ;;
8607  esac
8608
8609fi
8610
8611if test -n "$lt_cv_sys_max_cmd_len"; then
8612  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len" >&5
8613printf "%s\n" "$lt_cv_sys_max_cmd_len" >&6; }
8614else
8615  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none" >&5
8616printf "%s\n" "none" >&6; }
8617fi
8618max_cmd_len=$lt_cv_sys_max_cmd_len
8619
8620
8621
8622
8623
8624
8625: ${CP="cp -f"}
8626: ${MV="mv -f"}
8627: ${RM="rm -f"}
8628
8629if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
8630  lt_unset=unset
8631else
8632  lt_unset=false
8633fi
8634
8635
8636
8637
8638
8639# test EBCDIC or ASCII
8640case `echo X|tr X '\101'` in
8641 A) # ASCII based system
8642    # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
8643  lt_SP2NL='tr \040 \012'
8644  lt_NL2SP='tr \015\012 \040\040'
8645  ;;
8646 *) # EBCDIC based system
8647  lt_SP2NL='tr \100 \n'
8648  lt_NL2SP='tr \r\n \100\100'
8649  ;;
8650esac
8651
8652
8653
8654
8655
8656
8657
8658
8659
8660{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to $host format" >&5
8661printf %s "checking how to convert $build file names to $host format... " >&6; }
8662if test ${lt_cv_to_host_file_cmd+y}
8663then :
8664  printf %s "(cached) " >&6
8665else $as_nop
8666  case $host in
8667  *-*-mingw* )
8668    case $build in
8669      *-*-mingw* ) # actually msys
8670        lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32
8671        ;;
8672      *-*-cygwin* )
8673        lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32
8674        ;;
8675      * ) # otherwise, assume *nix
8676        lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32
8677        ;;
8678    esac
8679    ;;
8680  *-*-cygwin* )
8681    case $build in
8682      *-*-mingw* ) # actually msys
8683        lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin
8684        ;;
8685      *-*-cygwin* )
8686        lt_cv_to_host_file_cmd=func_convert_file_noop
8687        ;;
8688      * ) # otherwise, assume *nix
8689        lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin
8690        ;;
8691    esac
8692    ;;
8693  * ) # unhandled hosts (and "normal" native builds)
8694    lt_cv_to_host_file_cmd=func_convert_file_noop
8695    ;;
8696esac
8697
8698fi
8699
8700to_host_file_cmd=$lt_cv_to_host_file_cmd
8701{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_host_file_cmd" >&5
8702printf "%s\n" "$lt_cv_to_host_file_cmd" >&6; }
8703
8704
8705
8706
8707
8708{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format" >&5
8709printf %s "checking how to convert $build file names to toolchain format... " >&6; }
8710if test ${lt_cv_to_tool_file_cmd+y}
8711then :
8712  printf %s "(cached) " >&6
8713else $as_nop
8714  #assume ordinary cross tools, or native build.
8715lt_cv_to_tool_file_cmd=func_convert_file_noop
8716case $host in
8717  *-*-mingw* )
8718    case $build in
8719      *-*-mingw* ) # actually msys
8720        lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32
8721        ;;
8722    esac
8723    ;;
8724esac
8725
8726fi
8727
8728to_tool_file_cmd=$lt_cv_to_tool_file_cmd
8729{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_tool_file_cmd" >&5
8730printf "%s\n" "$lt_cv_to_tool_file_cmd" >&6; }
8731
8732
8733
8734
8735
8736{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5
8737printf %s "checking for $LD option to reload object files... " >&6; }
8738if test ${lt_cv_ld_reload_flag+y}
8739then :
8740  printf %s "(cached) " >&6
8741else $as_nop
8742  lt_cv_ld_reload_flag='-r'
8743fi
8744{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_reload_flag" >&5
8745printf "%s\n" "$lt_cv_ld_reload_flag" >&6; }
8746reload_flag=$lt_cv_ld_reload_flag
8747case $reload_flag in
8748"" | " "*) ;;
8749*) reload_flag=" $reload_flag" ;;
8750esac
8751reload_cmds='$LD$reload_flag -o $output$reload_objs'
8752case $host_os in
8753  cygwin* | mingw* | pw32* | cegcc*)
8754    if test yes != "$GCC"; then
8755      reload_cmds=false
8756    fi
8757    ;;
8758  darwin*)
8759    if test yes = "$GCC"; then
8760      reload_cmds='$LTCC $LTCFLAGS -nostdlib $wl-r -o $output$reload_objs'
8761    else
8762      reload_cmds='$LD$reload_flag -o $output$reload_objs'
8763    fi
8764    ;;
8765esac
8766
8767
8768
8769
8770
8771
8772
8773
8774
8775if test -n "$ac_tool_prefix"; then
8776  # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
8777set dummy ${ac_tool_prefix}objdump; ac_word=$2
8778{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8779printf %s "checking for $ac_word... " >&6; }
8780if test ${ac_cv_prog_OBJDUMP+y}
8781then :
8782  printf %s "(cached) " >&6
8783else $as_nop
8784  if test -n "$OBJDUMP"; then
8785  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
8786else
8787as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8788for as_dir in $PATH
8789do
8790  IFS=$as_save_IFS
8791  case $as_dir in #(((
8792    '') as_dir=./ ;;
8793    */) ;;
8794    *) as_dir=$as_dir/ ;;
8795  esac
8796    for ac_exec_ext in '' $ac_executable_extensions; do
8797  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
8798    ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
8799    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
8800    break 2
8801  fi
8802done
8803  done
8804IFS=$as_save_IFS
8805
8806fi
8807fi
8808OBJDUMP=$ac_cv_prog_OBJDUMP
8809if test -n "$OBJDUMP"; then
8810  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
8811printf "%s\n" "$OBJDUMP" >&6; }
8812else
8813  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
8814printf "%s\n" "no" >&6; }
8815fi
8816
8817
8818fi
8819if test -z "$ac_cv_prog_OBJDUMP"; then
8820  ac_ct_OBJDUMP=$OBJDUMP
8821  # Extract the first word of "objdump", so it can be a program name with args.
8822set dummy objdump; ac_word=$2
8823{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8824printf %s "checking for $ac_word... " >&6; }
8825if test ${ac_cv_prog_ac_ct_OBJDUMP+y}
8826then :
8827  printf %s "(cached) " >&6
8828else $as_nop
8829  if test -n "$ac_ct_OBJDUMP"; then
8830  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
8831else
8832as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8833for as_dir in $PATH
8834do
8835  IFS=$as_save_IFS
8836  case $as_dir in #(((
8837    '') as_dir=./ ;;
8838    */) ;;
8839    *) as_dir=$as_dir/ ;;
8840  esac
8841    for ac_exec_ext in '' $ac_executable_extensions; do
8842  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
8843    ac_cv_prog_ac_ct_OBJDUMP="objdump"
8844    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
8845    break 2
8846  fi
8847done
8848  done
8849IFS=$as_save_IFS
8850
8851fi
8852fi
8853ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
8854if test -n "$ac_ct_OBJDUMP"; then
8855  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
8856printf "%s\n" "$ac_ct_OBJDUMP" >&6; }
8857else
8858  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
8859printf "%s\n" "no" >&6; }
8860fi
8861
8862  if test "x$ac_ct_OBJDUMP" = x; then
8863    OBJDUMP="false"
8864  else
8865    case $cross_compiling:$ac_tool_warned in
8866yes:)
8867{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8868printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8869ac_tool_warned=yes ;;
8870esac
8871    OBJDUMP=$ac_ct_OBJDUMP
8872  fi
8873else
8874  OBJDUMP="$ac_cv_prog_OBJDUMP"
8875fi
8876
8877test -z "$OBJDUMP" && OBJDUMP=objdump
8878
8879
8880
8881
8882
8883
8884
8885
8886
8887{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries" >&5
8888printf %s "checking how to recognize dependent libraries... " >&6; }
8889if test ${lt_cv_deplibs_check_method+y}
8890then :
8891  printf %s "(cached) " >&6
8892else $as_nop
8893  lt_cv_file_magic_cmd='$MAGIC_CMD'
8894lt_cv_file_magic_test_file=
8895lt_cv_deplibs_check_method='unknown'
8896# Need to set the preceding variable on all platforms that support
8897# interlibrary dependencies.
8898# 'none' -- dependencies not supported.
8899# 'unknown' -- same as none, but documents that we really don't know.
8900# 'pass_all' -- all dependencies passed with no checks.
8901# 'test_compile' -- check by making test program.
8902# 'file_magic [[regex]]' -- check by looking for files in library path
8903# that responds to the $file_magic_cmd with a given extended regex.
8904# If you have 'file' or equivalent on your system and you're not sure
8905# whether 'pass_all' will *always* work, you probably want this one.
8906
8907case $host_os in
8908aix[4-9]*)
8909  lt_cv_deplibs_check_method=pass_all
8910  ;;
8911
8912beos*)
8913  lt_cv_deplibs_check_method=pass_all
8914  ;;
8915
8916bsdi[45]*)
8917  lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
8918  lt_cv_file_magic_cmd='/usr/bin/file -L'
8919  lt_cv_file_magic_test_file=/shlib/libc.so
8920  ;;
8921
8922cygwin*)
8923  # func_win32_libid is a shell function defined in ltmain.sh
8924  lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
8925  lt_cv_file_magic_cmd='func_win32_libid'
8926  ;;
8927
8928mingw* | pw32*)
8929  # Base MSYS/MinGW do not provide the 'file' command needed by
8930  # func_win32_libid shell function, so use a weaker test based on 'objdump',
8931  # unless we find 'file', for example because we are cross-compiling.
8932  if ( file / ) >/dev/null 2>&1; then
8933    lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
8934    lt_cv_file_magic_cmd='func_win32_libid'
8935  else
8936    # Keep this pattern in sync with the one in func_win32_libid.
8937    lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)'
8938    lt_cv_file_magic_cmd='$OBJDUMP -f'
8939  fi
8940  ;;
8941
8942cegcc*)
8943  # use the weaker test based on 'objdump'. See mingw*.
8944  lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
8945  lt_cv_file_magic_cmd='$OBJDUMP -f'
8946  ;;
8947
8948darwin* | rhapsody*)
8949  lt_cv_deplibs_check_method=pass_all
8950  ;;
8951
8952freebsd* | dragonfly*)
8953  if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
8954    case $host_cpu in
8955    i*86 )
8956      # Not sure whether the presence of OpenBSD here was a mistake.
8957      # Let's accept both of them until this is cleared up.
8958      lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library'
8959      lt_cv_file_magic_cmd=/usr/bin/file
8960      lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
8961      ;;
8962    esac
8963  else
8964    lt_cv_deplibs_check_method=pass_all
8965  fi
8966  ;;
8967
8968haiku*)
8969  lt_cv_deplibs_check_method=pass_all
8970  ;;
8971
8972hpux10.20* | hpux11*)
8973  lt_cv_file_magic_cmd=/usr/bin/file
8974  case $host_cpu in
8975  ia64*)
8976    lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64'
8977    lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
8978    ;;
8979  hppa*64*)
8980    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]'
8981    lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
8982    ;;
8983  *)
8984    lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9]\.[0-9]) shared library'
8985    lt_cv_file_magic_test_file=/usr/lib/libc.sl
8986    ;;
8987  esac
8988  ;;
8989
8990interix[3-9]*)
8991  # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
8992  lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$'
8993  ;;
8994
8995irix5* | irix6* | nonstopux*)
8996  case $LD in
8997  *-32|*"-32 ") libmagic=32-bit;;
8998  *-n32|*"-n32 ") libmagic=N32;;
8999  *-64|*"-64 ") libmagic=64-bit;;
9000  *) libmagic=never-match;;
9001  esac
9002  lt_cv_deplibs_check_method=pass_all
9003  ;;
9004
9005# This must be glibc/ELF.
9006linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
9007  lt_cv_deplibs_check_method=pass_all
9008  ;;
9009
9010netbsd*)
9011  if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
9012    lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
9013  else
9014    lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$'
9015  fi
9016  ;;
9017
9018newos6*)
9019  lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'
9020  lt_cv_file_magic_cmd=/usr/bin/file
9021  lt_cv_file_magic_test_file=/usr/lib/libnls.so
9022  ;;
9023
9024*nto* | *qnx*)
9025  lt_cv_deplibs_check_method=pass_all
9026  ;;
9027
9028openbsd* | bitrig*)
9029  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
9030    lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$'
9031  else
9032    lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
9033  fi
9034  ;;
9035
9036osf3* | osf4* | osf5*)
9037  lt_cv_deplibs_check_method=pass_all
9038  ;;
9039
9040rdos*)
9041  lt_cv_deplibs_check_method=pass_all
9042  ;;
9043
9044solaris*)
9045  lt_cv_deplibs_check_method=pass_all
9046  ;;
9047
9048sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
9049  lt_cv_deplibs_check_method=pass_all
9050  ;;
9051
9052sysv4 | sysv4.3*)
9053  case $host_vendor in
9054  motorola)
9055    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]'
9056    lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
9057    ;;
9058  ncr)
9059    lt_cv_deplibs_check_method=pass_all
9060    ;;
9061  sequent)
9062    lt_cv_file_magic_cmd='/bin/file'
9063    lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'
9064    ;;
9065  sni)
9066    lt_cv_file_magic_cmd='/bin/file'
9067    lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib"
9068    lt_cv_file_magic_test_file=/lib/libc.so
9069    ;;
9070  siemens)
9071    lt_cv_deplibs_check_method=pass_all
9072    ;;
9073  pc)
9074    lt_cv_deplibs_check_method=pass_all
9075    ;;
9076  esac
9077  ;;
9078
9079tpf*)
9080  lt_cv_deplibs_check_method=pass_all
9081  ;;
9082os2*)
9083  lt_cv_deplibs_check_method=pass_all
9084  ;;
9085esac
9086
9087fi
9088{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5
9089printf "%s\n" "$lt_cv_deplibs_check_method" >&6; }
9090
9091file_magic_glob=
9092want_nocaseglob=no
9093if test "$build" = "$host"; then
9094  case $host_os in
9095  mingw* | pw32*)
9096    if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then
9097      want_nocaseglob=yes
9098    else
9099      file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[\1]\/[\1]\/g;/g"`
9100    fi
9101    ;;
9102  esac
9103fi
9104
9105file_magic_cmd=$lt_cv_file_magic_cmd
9106deplibs_check_method=$lt_cv_deplibs_check_method
9107test -z "$deplibs_check_method" && deplibs_check_method=unknown
9108
9109
9110
9111
9112
9113
9114
9115
9116
9117
9118
9119
9120
9121
9122
9123
9124
9125
9126
9127
9128
9129
9130if test -n "$ac_tool_prefix"; then
9131  # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
9132set dummy ${ac_tool_prefix}dlltool; ac_word=$2
9133{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9134printf %s "checking for $ac_word... " >&6; }
9135if test ${ac_cv_prog_DLLTOOL+y}
9136then :
9137  printf %s "(cached) " >&6
9138else $as_nop
9139  if test -n "$DLLTOOL"; then
9140  ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
9141else
9142as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9143for as_dir in $PATH
9144do
9145  IFS=$as_save_IFS
9146  case $as_dir in #(((
9147    '') as_dir=./ ;;
9148    */) ;;
9149    *) as_dir=$as_dir/ ;;
9150  esac
9151    for ac_exec_ext in '' $ac_executable_extensions; do
9152  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
9153    ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
9154    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
9155    break 2
9156  fi
9157done
9158  done
9159IFS=$as_save_IFS
9160
9161fi
9162fi
9163DLLTOOL=$ac_cv_prog_DLLTOOL
9164if test -n "$DLLTOOL"; then
9165  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5
9166printf "%s\n" "$DLLTOOL" >&6; }
9167else
9168  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
9169printf "%s\n" "no" >&6; }
9170fi
9171
9172
9173fi
9174if test -z "$ac_cv_prog_DLLTOOL"; then
9175  ac_ct_DLLTOOL=$DLLTOOL
9176  # Extract the first word of "dlltool", so it can be a program name with args.
9177set dummy dlltool; ac_word=$2
9178{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9179printf %s "checking for $ac_word... " >&6; }
9180if test ${ac_cv_prog_ac_ct_DLLTOOL+y}
9181then :
9182  printf %s "(cached) " >&6
9183else $as_nop
9184  if test -n "$ac_ct_DLLTOOL"; then
9185  ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
9186else
9187as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9188for as_dir in $PATH
9189do
9190  IFS=$as_save_IFS
9191  case $as_dir in #(((
9192    '') as_dir=./ ;;
9193    */) ;;
9194    *) as_dir=$as_dir/ ;;
9195  esac
9196    for ac_exec_ext in '' $ac_executable_extensions; do
9197  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
9198    ac_cv_prog_ac_ct_DLLTOOL="dlltool"
9199    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
9200    break 2
9201  fi
9202done
9203  done
9204IFS=$as_save_IFS
9205
9206fi
9207fi
9208ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
9209if test -n "$ac_ct_DLLTOOL"; then
9210  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5
9211printf "%s\n" "$ac_ct_DLLTOOL" >&6; }
9212else
9213  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
9214printf "%s\n" "no" >&6; }
9215fi
9216
9217  if test "x$ac_ct_DLLTOOL" = x; then
9218    DLLTOOL="false"
9219  else
9220    case $cross_compiling:$ac_tool_warned in
9221yes:)
9222{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9223printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9224ac_tool_warned=yes ;;
9225esac
9226    DLLTOOL=$ac_ct_DLLTOOL
9227  fi
9228else
9229  DLLTOOL="$ac_cv_prog_DLLTOOL"
9230fi
9231
9232test -z "$DLLTOOL" && DLLTOOL=dlltool
9233
9234
9235
9236
9237
9238
9239
9240
9241
9242
9243{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to associate runtime and link libraries" >&5
9244printf %s "checking how to associate runtime and link libraries... " >&6; }
9245if test ${lt_cv_sharedlib_from_linklib_cmd+y}
9246then :
9247  printf %s "(cached) " >&6
9248else $as_nop
9249  lt_cv_sharedlib_from_linklib_cmd='unknown'
9250
9251case $host_os in
9252cygwin* | mingw* | pw32* | cegcc*)
9253  # two different shell functions defined in ltmain.sh;
9254  # decide which one to use based on capabilities of $DLLTOOL
9255  case `$DLLTOOL --help 2>&1` in
9256  *--identify-strict*)
9257    lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib
9258    ;;
9259  *)
9260    lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback
9261    ;;
9262  esac
9263  ;;
9264*)
9265  # fallback: assume linklib IS sharedlib
9266  lt_cv_sharedlib_from_linklib_cmd=$ECHO
9267  ;;
9268esac
9269
9270fi
9271{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sharedlib_from_linklib_cmd" >&5
9272printf "%s\n" "$lt_cv_sharedlib_from_linklib_cmd" >&6; }
9273sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd
9274test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO
9275
9276
9277
9278
9279
9280
9281
9282if test -n "$ac_tool_prefix"; then
9283  for ac_prog in ar
9284  do
9285    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
9286set dummy $ac_tool_prefix$ac_prog; ac_word=$2
9287{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9288printf %s "checking for $ac_word... " >&6; }
9289if test ${ac_cv_prog_AR+y}
9290then :
9291  printf %s "(cached) " >&6
9292else $as_nop
9293  if test -n "$AR"; then
9294  ac_cv_prog_AR="$AR" # Let the user override the test.
9295else
9296as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9297for as_dir in $PATH
9298do
9299  IFS=$as_save_IFS
9300  case $as_dir in #(((
9301    '') as_dir=./ ;;
9302    */) ;;
9303    *) as_dir=$as_dir/ ;;
9304  esac
9305    for ac_exec_ext in '' $ac_executable_extensions; do
9306  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
9307    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
9308    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
9309    break 2
9310  fi
9311done
9312  done
9313IFS=$as_save_IFS
9314
9315fi
9316fi
9317AR=$ac_cv_prog_AR
9318if test -n "$AR"; then
9319  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
9320printf "%s\n" "$AR" >&6; }
9321else
9322  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
9323printf "%s\n" "no" >&6; }
9324fi
9325
9326
9327    test -n "$AR" && break
9328  done
9329fi
9330if test -z "$AR"; then
9331  ac_ct_AR=$AR
9332  for ac_prog in ar
9333do
9334  # Extract the first word of "$ac_prog", so it can be a program name with args.
9335set dummy $ac_prog; ac_word=$2
9336{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9337printf %s "checking for $ac_word... " >&6; }
9338if test ${ac_cv_prog_ac_ct_AR+y}
9339then :
9340  printf %s "(cached) " >&6
9341else $as_nop
9342  if test -n "$ac_ct_AR"; then
9343  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
9344else
9345as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9346for as_dir in $PATH
9347do
9348  IFS=$as_save_IFS
9349  case $as_dir in #(((
9350    '') as_dir=./ ;;
9351    */) ;;
9352    *) as_dir=$as_dir/ ;;
9353  esac
9354    for ac_exec_ext in '' $ac_executable_extensions; do
9355  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
9356    ac_cv_prog_ac_ct_AR="$ac_prog"
9357    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
9358    break 2
9359  fi
9360done
9361  done
9362IFS=$as_save_IFS
9363
9364fi
9365fi
9366ac_ct_AR=$ac_cv_prog_ac_ct_AR
9367if test -n "$ac_ct_AR"; then
9368  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
9369printf "%s\n" "$ac_ct_AR" >&6; }
9370else
9371  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
9372printf "%s\n" "no" >&6; }
9373fi
9374
9375
9376  test -n "$ac_ct_AR" && break
9377done
9378
9379  if test "x$ac_ct_AR" = x; then
9380    AR="false"
9381  else
9382    case $cross_compiling:$ac_tool_warned in
9383yes:)
9384{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9385printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9386ac_tool_warned=yes ;;
9387esac
9388    AR=$ac_ct_AR
9389  fi
9390fi
9391
9392: ${AR=ar}
9393: ${AR_FLAGS=cru}
9394
9395
9396
9397
9398
9399
9400
9401
9402
9403
9404
9405{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support" >&5
9406printf %s "checking for archiver @FILE support... " >&6; }
9407if test ${lt_cv_ar_at_file+y}
9408then :
9409  printf %s "(cached) " >&6
9410else $as_nop
9411  lt_cv_ar_at_file=no
9412   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9413/* end confdefs.h.  */
9414
9415int
9416main (void)
9417{
9418
9419  ;
9420  return 0;
9421}
9422_ACEOF
9423if ac_fn_c_try_compile "$LINENO"
9424then :
9425  echo conftest.$ac_objext > conftest.lst
9426      lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&5'
9427      { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5
9428  (eval $lt_ar_try) 2>&5
9429  ac_status=$?
9430  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
9431  test $ac_status = 0; }
9432      if test 0 -eq "$ac_status"; then
9433	# Ensure the archiver fails upon bogus file names.
9434	rm -f conftest.$ac_objext libconftest.a
9435	{ { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5
9436  (eval $lt_ar_try) 2>&5
9437  ac_status=$?
9438  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
9439  test $ac_status = 0; }
9440	if test 0 -ne "$ac_status"; then
9441          lt_cv_ar_at_file=@
9442        fi
9443      fi
9444      rm -f conftest.* libconftest.a
9445
9446fi
9447rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
9448
9449fi
9450{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5
9451printf "%s\n" "$lt_cv_ar_at_file" >&6; }
9452
9453if test no = "$lt_cv_ar_at_file"; then
9454  archiver_list_spec=
9455else
9456  archiver_list_spec=$lt_cv_ar_at_file
9457fi
9458
9459
9460
9461
9462
9463
9464
9465if test -n "$ac_tool_prefix"; then
9466  # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
9467set dummy ${ac_tool_prefix}strip; ac_word=$2
9468{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9469printf %s "checking for $ac_word... " >&6; }
9470if test ${ac_cv_prog_STRIP+y}
9471then :
9472  printf %s "(cached) " >&6
9473else $as_nop
9474  if test -n "$STRIP"; then
9475  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
9476else
9477as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9478for as_dir in $PATH
9479do
9480  IFS=$as_save_IFS
9481  case $as_dir in #(((
9482    '') as_dir=./ ;;
9483    */) ;;
9484    *) as_dir=$as_dir/ ;;
9485  esac
9486    for ac_exec_ext in '' $ac_executable_extensions; do
9487  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
9488    ac_cv_prog_STRIP="${ac_tool_prefix}strip"
9489    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
9490    break 2
9491  fi
9492done
9493  done
9494IFS=$as_save_IFS
9495
9496fi
9497fi
9498STRIP=$ac_cv_prog_STRIP
9499if test -n "$STRIP"; then
9500  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
9501printf "%s\n" "$STRIP" >&6; }
9502else
9503  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
9504printf "%s\n" "no" >&6; }
9505fi
9506
9507
9508fi
9509if test -z "$ac_cv_prog_STRIP"; then
9510  ac_ct_STRIP=$STRIP
9511  # Extract the first word of "strip", so it can be a program name with args.
9512set dummy strip; ac_word=$2
9513{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9514printf %s "checking for $ac_word... " >&6; }
9515if test ${ac_cv_prog_ac_ct_STRIP+y}
9516then :
9517  printf %s "(cached) " >&6
9518else $as_nop
9519  if test -n "$ac_ct_STRIP"; then
9520  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
9521else
9522as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9523for as_dir in $PATH
9524do
9525  IFS=$as_save_IFS
9526  case $as_dir in #(((
9527    '') as_dir=./ ;;
9528    */) ;;
9529    *) as_dir=$as_dir/ ;;
9530  esac
9531    for ac_exec_ext in '' $ac_executable_extensions; do
9532  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
9533    ac_cv_prog_ac_ct_STRIP="strip"
9534    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
9535    break 2
9536  fi
9537done
9538  done
9539IFS=$as_save_IFS
9540
9541fi
9542fi
9543ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
9544if test -n "$ac_ct_STRIP"; then
9545  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
9546printf "%s\n" "$ac_ct_STRIP" >&6; }
9547else
9548  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
9549printf "%s\n" "no" >&6; }
9550fi
9551
9552  if test "x$ac_ct_STRIP" = x; then
9553    STRIP=":"
9554  else
9555    case $cross_compiling:$ac_tool_warned in
9556yes:)
9557{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9558printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9559ac_tool_warned=yes ;;
9560esac
9561    STRIP=$ac_ct_STRIP
9562  fi
9563else
9564  STRIP="$ac_cv_prog_STRIP"
9565fi
9566
9567test -z "$STRIP" && STRIP=:
9568
9569
9570
9571
9572
9573
9574if test -n "$ac_tool_prefix"; then
9575  # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
9576set dummy ${ac_tool_prefix}ranlib; ac_word=$2
9577{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9578printf %s "checking for $ac_word... " >&6; }
9579if test ${ac_cv_prog_RANLIB+y}
9580then :
9581  printf %s "(cached) " >&6
9582else $as_nop
9583  if test -n "$RANLIB"; then
9584  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
9585else
9586as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9587for as_dir in $PATH
9588do
9589  IFS=$as_save_IFS
9590  case $as_dir in #(((
9591    '') as_dir=./ ;;
9592    */) ;;
9593    *) as_dir=$as_dir/ ;;
9594  esac
9595    for ac_exec_ext in '' $ac_executable_extensions; do
9596  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
9597    ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
9598    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
9599    break 2
9600  fi
9601done
9602  done
9603IFS=$as_save_IFS
9604
9605fi
9606fi
9607RANLIB=$ac_cv_prog_RANLIB
9608if test -n "$RANLIB"; then
9609  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
9610printf "%s\n" "$RANLIB" >&6; }
9611else
9612  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
9613printf "%s\n" "no" >&6; }
9614fi
9615
9616
9617fi
9618if test -z "$ac_cv_prog_RANLIB"; then
9619  ac_ct_RANLIB=$RANLIB
9620  # Extract the first word of "ranlib", so it can be a program name with args.
9621set dummy ranlib; ac_word=$2
9622{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9623printf %s "checking for $ac_word... " >&6; }
9624if test ${ac_cv_prog_ac_ct_RANLIB+y}
9625then :
9626  printf %s "(cached) " >&6
9627else $as_nop
9628  if test -n "$ac_ct_RANLIB"; then
9629  ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
9630else
9631as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9632for as_dir in $PATH
9633do
9634  IFS=$as_save_IFS
9635  case $as_dir in #(((
9636    '') as_dir=./ ;;
9637    */) ;;
9638    *) as_dir=$as_dir/ ;;
9639  esac
9640    for ac_exec_ext in '' $ac_executable_extensions; do
9641  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
9642    ac_cv_prog_ac_ct_RANLIB="ranlib"
9643    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
9644    break 2
9645  fi
9646done
9647  done
9648IFS=$as_save_IFS
9649
9650fi
9651fi
9652ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
9653if test -n "$ac_ct_RANLIB"; then
9654  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
9655printf "%s\n" "$ac_ct_RANLIB" >&6; }
9656else
9657  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
9658printf "%s\n" "no" >&6; }
9659fi
9660
9661  if test "x$ac_ct_RANLIB" = x; then
9662    RANLIB=":"
9663  else
9664    case $cross_compiling:$ac_tool_warned in
9665yes:)
9666{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9667printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9668ac_tool_warned=yes ;;
9669esac
9670    RANLIB=$ac_ct_RANLIB
9671  fi
9672else
9673  RANLIB="$ac_cv_prog_RANLIB"
9674fi
9675
9676test -z "$RANLIB" && RANLIB=:
9677
9678
9679
9680
9681
9682
9683# Determine commands to create old-style static archives.
9684old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
9685old_postinstall_cmds='chmod 644 $oldlib'
9686old_postuninstall_cmds=
9687
9688if test -n "$RANLIB"; then
9689  case $host_os in
9690  bitrig* | openbsd*)
9691    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib"
9692    ;;
9693  *)
9694    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib"
9695    ;;
9696  esac
9697  old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib"
9698fi
9699
9700case $host_os in
9701  darwin*)
9702    lock_old_archive_extraction=yes ;;
9703  *)
9704    lock_old_archive_extraction=no ;;
9705esac
9706
9707
9708
9709
9710
9711
9712
9713
9714
9715
9716
9717
9718
9719
9720
9721
9722
9723
9724
9725
9726
9727for ac_prog in gawk mawk nawk awk
9728do
9729  # Extract the first word of "$ac_prog", so it can be a program name with args.
9730set dummy $ac_prog; ac_word=$2
9731{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9732printf %s "checking for $ac_word... " >&6; }
9733if test ${ac_cv_prog_AWK+y}
9734then :
9735  printf %s "(cached) " >&6
9736else $as_nop
9737  if test -n "$AWK"; then
9738  ac_cv_prog_AWK="$AWK" # Let the user override the test.
9739else
9740as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9741for as_dir in $PATH
9742do
9743  IFS=$as_save_IFS
9744  case $as_dir in #(((
9745    '') as_dir=./ ;;
9746    */) ;;
9747    *) as_dir=$as_dir/ ;;
9748  esac
9749    for ac_exec_ext in '' $ac_executable_extensions; do
9750  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
9751    ac_cv_prog_AWK="$ac_prog"
9752    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
9753    break 2
9754  fi
9755done
9756  done
9757IFS=$as_save_IFS
9758
9759fi
9760fi
9761AWK=$ac_cv_prog_AWK
9762if test -n "$AWK"; then
9763  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
9764printf "%s\n" "$AWK" >&6; }
9765else
9766  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
9767printf "%s\n" "no" >&6; }
9768fi
9769
9770
9771  test -n "$AWK" && break
9772done
9773
9774
9775
9776
9777
9778
9779
9780
9781
9782
9783
9784
9785
9786
9787
9788
9789
9790
9791
9792# If no C compiler was specified, use CC.
9793LTCC=${LTCC-"$CC"}
9794
9795# If no C compiler flags were specified, use CFLAGS.
9796LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
9797
9798# Allow CC to be a program name with arguments.
9799compiler=$CC
9800
9801
9802# Check for command to grab the raw symbol name followed by C symbol from nm.
9803{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5
9804printf %s "checking command to parse $NM output from $compiler object... " >&6; }
9805if test ${lt_cv_sys_global_symbol_pipe+y}
9806then :
9807  printf %s "(cached) " >&6
9808else $as_nop
9809
9810# These are sane defaults that work on at least a few old systems.
9811# [They come from Ultrix.  What could be older than Ultrix?!! ;)]
9812
9813# Character class describing NM global symbol codes.
9814symcode='[BCDEGRST]'
9815
9816# Regexp to match symbols that can be accessed directly from C.
9817sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
9818
9819# Define system-specific variables.
9820case $host_os in
9821aix*)
9822  symcode='[BCDT]'
9823  ;;
9824cygwin* | mingw* | pw32* | cegcc*)
9825  symcode='[ABCDGISTW]'
9826  ;;
9827hpux*)
9828  if test ia64 = "$host_cpu"; then
9829    symcode='[ABCDEGRST]'
9830  fi
9831  ;;
9832irix* | nonstopux*)
9833  symcode='[BCDEGRST]'
9834  ;;
9835osf*)
9836  symcode='[BCDEGQRST]'
9837  ;;
9838solaris*)
9839  symcode='[BDRT]'
9840  ;;
9841sco3.2v5*)
9842  symcode='[DT]'
9843  ;;
9844sysv4.2uw2*)
9845  symcode='[DT]'
9846  ;;
9847sysv5* | sco5v6* | unixware* | OpenUNIX*)
9848  symcode='[ABDT]'
9849  ;;
9850sysv4)
9851  symcode='[DFNSTU]'
9852  ;;
9853esac
9854
9855# If we're using GNU nm, then use its standard symbol codes.
9856case `$NM -V 2>&1` in
9857*GNU* | *'with BFD'*)
9858  symcode='[ABCDGIRSTW]' ;;
9859esac
9860
9861if test "$lt_cv_nm_interface" = "MS dumpbin"; then
9862  # Gets list of data symbols to import.
9863  lt_cv_sys_global_symbol_to_import="sed -n -e 's/^I .* \(.*\)$/\1/p'"
9864  # Adjust the below global symbol transforms to fixup imported variables.
9865  lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'"
9866  lt_c_name_hook=" -e 's/^I .* \(.*\)$/  {\"\1\", (void *) 0},/p'"
9867  lt_c_name_lib_hook="\
9868  -e 's/^I .* \(lib.*\)$/  {\"\1\", (void *) 0},/p'\
9869  -e 's/^I .* \(.*\)$/  {\"lib\1\", (void *) 0},/p'"
9870else
9871  # Disable hooks by default.
9872  lt_cv_sys_global_symbol_to_import=
9873  lt_cdecl_hook=
9874  lt_c_name_hook=
9875  lt_c_name_lib_hook=
9876fi
9877
9878# Transform an extracted symbol line into a proper C declaration.
9879# Some systems (esp. on ia64) link data and code symbols differently,
9880# so use this general approach.
9881lt_cv_sys_global_symbol_to_cdecl="sed -n"\
9882$lt_cdecl_hook\
9883" -e 's/^T .* \(.*\)$/extern int \1();/p'"\
9884" -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'"
9885
9886# Transform an extracted symbol line into symbol name and symbol address
9887lt_cv_sys_global_symbol_to_c_name_address="sed -n"\
9888$lt_c_name_hook\
9889" -e 's/^: \(.*\) .*$/  {\"\1\", (void *) 0},/p'"\
9890" -e 's/^$symcode$symcode* .* \(.*\)$/  {\"\1\", (void *) \&\1},/p'"
9891
9892# Transform an extracted symbol line into symbol name with lib prefix and
9893# symbol address.
9894lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n"\
9895$lt_c_name_lib_hook\
9896" -e 's/^: \(.*\) .*$/  {\"\1\", (void *) 0},/p'"\
9897" -e 's/^$symcode$symcode* .* \(lib.*\)$/  {\"\1\", (void *) \&\1},/p'"\
9898" -e 's/^$symcode$symcode* .* \(.*\)$/  {\"lib\1\", (void *) \&\1},/p'"
9899
9900# Handle CRLF in mingw tool chain
9901opt_cr=
9902case $build_os in
9903mingw*)
9904  opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
9905  ;;
9906esac
9907
9908# Try without a prefix underscore, then with it.
9909for ac_symprfx in "" "_"; do
9910
9911  # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
9912  symxfrm="\\1 $ac_symprfx\\2 \\2"
9913
9914  # Write the raw and C identifiers.
9915  if test "$lt_cv_nm_interface" = "MS dumpbin"; then
9916    # Fake it for dumpbin and say T for any non-static function,
9917    # D for any global variable and I for any imported variable.
9918    # Also find C++ and __fastcall symbols from MSVC++,
9919    # which start with @ or ?.
9920    lt_cv_sys_global_symbol_pipe="$AWK '"\
9921"     {last_section=section; section=\$ 3};"\
9922"     /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\
9923"     /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
9924"     /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\
9925"     /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\
9926"     /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\
9927"     \$ 0!~/External *\|/{next};"\
9928"     / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
9929"     {if(hide[section]) next};"\
9930"     {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\
9931"     {split(\$ 0,a,/\||\r/); split(a[2],s)};"\
9932"     s[1]~/^[@?]/{print f,s[1],s[1]; next};"\
9933"     s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\
9934"     ' prfx=^$ac_symprfx"
9935  else
9936    lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[	 ]\($symcode$symcode*\)[	 ][	 ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
9937  fi
9938  lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'"
9939
9940  # Check to see that the pipe works correctly.
9941  pipe_works=no
9942
9943  rm -f conftest*
9944  cat > conftest.$ac_ext <<_LT_EOF
9945#ifdef __cplusplus
9946extern "C" {
9947#endif
9948char nm_test_var;
9949void nm_test_func(void);
9950void nm_test_func(void){}
9951#ifdef __cplusplus
9952}
9953#endif
9954int main(){nm_test_var='a';nm_test_func();return(0);}
9955_LT_EOF
9956
9957  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
9958  (eval $ac_compile) 2>&5
9959  ac_status=$?
9960  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
9961  test $ac_status = 0; }; then
9962    # Now try to grab the symbols.
9963    nlist=conftest.nm
9964    if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist\""; } >&5
9965  (eval $NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) 2>&5
9966  ac_status=$?
9967  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
9968  test $ac_status = 0; } && test -s "$nlist"; then
9969      # Try sorting and uniquifying the output.
9970      if sort "$nlist" | uniq > "$nlist"T; then
9971	mv -f "$nlist"T "$nlist"
9972      else
9973	rm -f "$nlist"T
9974      fi
9975
9976      # Make sure that we snagged all the symbols we need.
9977      if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
9978	if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
9979	  cat <<_LT_EOF > conftest.$ac_ext
9980/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests.  */
9981#if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE
9982/* DATA imports from DLLs on WIN32 can't be const, because runtime
9983   relocations are performed -- see ld's documentation on pseudo-relocs.  */
9984# define LT_DLSYM_CONST
9985#elif defined __osf__
9986/* This system does not cope well with relocations in const data.  */
9987# define LT_DLSYM_CONST
9988#else
9989# define LT_DLSYM_CONST const
9990#endif
9991
9992#ifdef __cplusplus
9993extern "C" {
9994#endif
9995
9996_LT_EOF
9997	  # Now generate the symbol file.
9998	  eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
9999
10000	  cat <<_LT_EOF >> conftest.$ac_ext
10001
10002/* The mapping between symbol names and symbols.  */
10003LT_DLSYM_CONST struct {
10004  const char *name;
10005  void       *address;
10006}
10007lt__PROGRAM__LTX_preloaded_symbols[] =
10008{
10009  { "@PROGRAM@", (void *) 0 },
10010_LT_EOF
10011	  $SED "s/^$symcode$symcode* .* \(.*\)$/  {\"\1\", (void *) \&\1},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
10012	  cat <<\_LT_EOF >> conftest.$ac_ext
10013  {0, (void *) 0}
10014};
10015
10016/* This works around a problem in FreeBSD linker */
10017#ifdef FREEBSD_WORKAROUND
10018static const void *lt_preloaded_setup() {
10019  return lt__PROGRAM__LTX_preloaded_symbols;
10020}
10021#endif
10022
10023#ifdef __cplusplus
10024}
10025#endif
10026_LT_EOF
10027	  # Now try linking the two files.
10028	  mv conftest.$ac_objext conftstm.$ac_objext
10029	  lt_globsym_save_LIBS=$LIBS
10030	  lt_globsym_save_CFLAGS=$CFLAGS
10031	  LIBS=conftstm.$ac_objext
10032	  CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag"
10033	  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
10034  (eval $ac_link) 2>&5
10035  ac_status=$?
10036  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
10037  test $ac_status = 0; } && test -s conftest$ac_exeext; then
10038	    pipe_works=yes
10039	  fi
10040	  LIBS=$lt_globsym_save_LIBS
10041	  CFLAGS=$lt_globsym_save_CFLAGS
10042	else
10043	  echo "cannot find nm_test_func in $nlist" >&5
10044	fi
10045      else
10046	echo "cannot find nm_test_var in $nlist" >&5
10047      fi
10048    else
10049      echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5
10050    fi
10051  else
10052    echo "$progname: failed program was:" >&5
10053    cat conftest.$ac_ext >&5
10054  fi
10055  rm -rf conftest* conftst*
10056
10057  # Do not use the global_symbol_pipe unless it works.
10058  if test yes = "$pipe_works"; then
10059    break
10060  else
10061    lt_cv_sys_global_symbol_pipe=
10062  fi
10063done
10064
10065fi
10066
10067if test -z "$lt_cv_sys_global_symbol_pipe"; then
10068  lt_cv_sys_global_symbol_to_cdecl=
10069fi
10070if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
10071  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: failed" >&5
10072printf "%s\n" "failed" >&6; }
10073else
10074  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ok" >&5
10075printf "%s\n" "ok" >&6; }
10076fi
10077
10078# Response file support.
10079if test "$lt_cv_nm_interface" = "MS dumpbin"; then
10080  nm_file_list_spec='@'
10081elif $NM --help 2>/dev/null | grep '[@]FILE' >/dev/null; then
10082  nm_file_list_spec='@'
10083fi
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
10115
10116
10117
10118
10119
10120
10121{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
10122printf %s "checking for sysroot... " >&6; }
10123
10124# Check whether --with-sysroot was given.
10125if test ${with_sysroot+y}
10126then :
10127  withval=$with_sysroot;
10128else $as_nop
10129  with_sysroot=no
10130fi
10131
10132
10133lt_sysroot=
10134case $with_sysroot in #(
10135 yes)
10136   if test yes = "$GCC"; then
10137     lt_sysroot=`$CC --print-sysroot 2>/dev/null`
10138   fi
10139   ;; #(
10140 /*)
10141   lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"`
10142   ;; #(
10143 no|'')
10144   ;; #(
10145 *)
10146   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $with_sysroot" >&5
10147printf "%s\n" "$with_sysroot" >&6; }
10148   as_fn_error $? "The sysroot must be an absolute path." "$LINENO" 5
10149   ;;
10150esac
10151
10152 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}" >&5
10153printf "%s\n" "${lt_sysroot:-no}" >&6; }
10154
10155
10156
10157
10158
10159{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a working dd" >&5
10160printf %s "checking for a working dd... " >&6; }
10161if test ${ac_cv_path_lt_DD+y}
10162then :
10163  printf %s "(cached) " >&6
10164else $as_nop
10165  printf 0123456789abcdef0123456789abcdef >conftest.i
10166cat conftest.i conftest.i >conftest2.i
10167: ${lt_DD:=$DD}
10168if test -z "$lt_DD"; then
10169  ac_path_lt_DD_found=false
10170  # Loop through the user's path and test for each of PROGNAME-LIST
10171  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10172for as_dir in $PATH
10173do
10174  IFS=$as_save_IFS
10175  case $as_dir in #(((
10176    '') as_dir=./ ;;
10177    */) ;;
10178    *) as_dir=$as_dir/ ;;
10179  esac
10180    for ac_prog in dd
10181   do
10182    for ac_exec_ext in '' $ac_executable_extensions; do
10183      ac_path_lt_DD="$as_dir$ac_prog$ac_exec_ext"
10184      as_fn_executable_p "$ac_path_lt_DD" || continue
10185if "$ac_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then
10186  cmp -s conftest.i conftest.out \
10187  && ac_cv_path_lt_DD="$ac_path_lt_DD" ac_path_lt_DD_found=:
10188fi
10189      $ac_path_lt_DD_found && break 3
10190    done
10191  done
10192  done
10193IFS=$as_save_IFS
10194  if test -z "$ac_cv_path_lt_DD"; then
10195    :
10196  fi
10197else
10198  ac_cv_path_lt_DD=$lt_DD
10199fi
10200
10201rm -f conftest.i conftest2.i conftest.out
10202fi
10203{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_lt_DD" >&5
10204printf "%s\n" "$ac_cv_path_lt_DD" >&6; }
10205
10206
10207{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to truncate binary pipes" >&5
10208printf %s "checking how to truncate binary pipes... " >&6; }
10209if test ${lt_cv_truncate_bin+y}
10210then :
10211  printf %s "(cached) " >&6
10212else $as_nop
10213  printf 0123456789abcdef0123456789abcdef >conftest.i
10214cat conftest.i conftest.i >conftest2.i
10215lt_cv_truncate_bin=
10216if "$ac_cv_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then
10217  cmp -s conftest.i conftest.out \
10218  && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1"
10219fi
10220rm -f conftest.i conftest2.i conftest.out
10221test -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q"
10222fi
10223{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_truncate_bin" >&5
10224printf "%s\n" "$lt_cv_truncate_bin" >&6; }
10225
10226
10227
10228
10229
10230
10231
10232# Calculate cc_basename.  Skip known compiler wrappers and cross-prefix.
10233func_cc_basename ()
10234{
10235    for cc_temp in $*""; do
10236      case $cc_temp in
10237        compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
10238        distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
10239        \-*) ;;
10240        *) break;;
10241      esac
10242    done
10243    func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
10244}
10245
10246# Check whether --enable-libtool-lock was given.
10247if test ${enable_libtool_lock+y}
10248then :
10249  enableval=$enable_libtool_lock;
10250fi
10251
10252test no = "$enable_libtool_lock" || enable_libtool_lock=yes
10253
10254# Some flags need to be propagated to the compiler or linker for good
10255# libtool support.
10256case $host in
10257ia64-*-hpux*)
10258  # Find out what ABI is being produced by ac_compile, and set mode
10259  # options accordingly.
10260  echo 'int i;' > conftest.$ac_ext
10261  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
10262  (eval $ac_compile) 2>&5
10263  ac_status=$?
10264  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
10265  test $ac_status = 0; }; then
10266    case `/usr/bin/file conftest.$ac_objext` in
10267      *ELF-32*)
10268	HPUX_IA64_MODE=32
10269	;;
10270      *ELF-64*)
10271	HPUX_IA64_MODE=64
10272	;;
10273    esac
10274  fi
10275  rm -rf conftest*
10276  ;;
10277*-*-irix6*)
10278  # Find out what ABI is being produced by ac_compile, and set linker
10279  # options accordingly.
10280  echo '#line '$LINENO' "configure"' > conftest.$ac_ext
10281  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
10282  (eval $ac_compile) 2>&5
10283  ac_status=$?
10284  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
10285  test $ac_status = 0; }; then
10286    if test yes = "$lt_cv_prog_gnu_ld"; then
10287      case `/usr/bin/file conftest.$ac_objext` in
10288	*32-bit*)
10289	  LD="${LD-ld} -melf32bsmip"
10290	  ;;
10291	*N32*)
10292	  LD="${LD-ld} -melf32bmipn32"
10293	  ;;
10294	*64-bit*)
10295	  LD="${LD-ld} -melf64bmip"
10296	;;
10297      esac
10298    else
10299      case `/usr/bin/file conftest.$ac_objext` in
10300	*32-bit*)
10301	  LD="${LD-ld} -32"
10302	  ;;
10303	*N32*)
10304	  LD="${LD-ld} -n32"
10305	  ;;
10306	*64-bit*)
10307	  LD="${LD-ld} -64"
10308	  ;;
10309      esac
10310    fi
10311  fi
10312  rm -rf conftest*
10313  ;;
10314
10315mips64*-*linux*)
10316  # Find out what ABI is being produced by ac_compile, and set linker
10317  # options accordingly.
10318  echo '#line '$LINENO' "configure"' > conftest.$ac_ext
10319  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
10320  (eval $ac_compile) 2>&5
10321  ac_status=$?
10322  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
10323  test $ac_status = 0; }; then
10324    emul=elf
10325    case `/usr/bin/file conftest.$ac_objext` in
10326      *32-bit*)
10327	emul="${emul}32"
10328	;;
10329      *64-bit*)
10330	emul="${emul}64"
10331	;;
10332    esac
10333    case `/usr/bin/file conftest.$ac_objext` in
10334      *MSB*)
10335	emul="${emul}btsmip"
10336	;;
10337      *LSB*)
10338	emul="${emul}ltsmip"
10339	;;
10340    esac
10341    case `/usr/bin/file conftest.$ac_objext` in
10342      *N32*)
10343	emul="${emul}n32"
10344	;;
10345    esac
10346    LD="${LD-ld} -m $emul"
10347  fi
10348  rm -rf conftest*
10349  ;;
10350
10351x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \
10352s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
10353  # Find out what ABI is being produced by ac_compile, and set linker
10354  # options accordingly.  Note that the listed cases only cover the
10355  # situations where additional linker options are needed (such as when
10356  # doing 32-bit compilation for a host where ld defaults to 64-bit, or
10357  # vice versa); the common cases where no linker options are needed do
10358  # not appear in the list.
10359  echo 'int i;' > conftest.$ac_ext
10360  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
10361  (eval $ac_compile) 2>&5
10362  ac_status=$?
10363  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
10364  test $ac_status = 0; }; then
10365    case `/usr/bin/file conftest.o` in
10366      *32-bit*)
10367	case $host in
10368	  x86_64-*kfreebsd*-gnu)
10369	    LD="${LD-ld} -m elf_i386_fbsd"
10370	    ;;
10371	  x86_64-*linux*)
10372	    case `/usr/bin/file conftest.o` in
10373	      *x86-64*)
10374		LD="${LD-ld} -m elf32_x86_64"
10375		;;
10376	      *)
10377		LD="${LD-ld} -m elf_i386"
10378		;;
10379	    esac
10380	    ;;
10381	  powerpc64le-*linux*)
10382	    LD="${LD-ld} -m elf32lppclinux"
10383	    ;;
10384	  powerpc64-*linux*)
10385	    LD="${LD-ld} -m elf32ppclinux"
10386	    ;;
10387	  s390x-*linux*)
10388	    LD="${LD-ld} -m elf_s390"
10389	    ;;
10390	  sparc64-*linux*)
10391	    LD="${LD-ld} -m elf32_sparc"
10392	    ;;
10393	esac
10394	;;
10395      *64-bit*)
10396	case $host in
10397	  x86_64-*kfreebsd*-gnu)
10398	    LD="${LD-ld} -m elf_x86_64_fbsd"
10399	    ;;
10400	  x86_64-*linux*)
10401	    LD="${LD-ld} -m elf_x86_64"
10402	    ;;
10403	  powerpcle-*linux*)
10404	    LD="${LD-ld} -m elf64lppc"
10405	    ;;
10406	  powerpc-*linux*)
10407	    LD="${LD-ld} -m elf64ppc"
10408	    ;;
10409	  s390*-*linux*|s390*-*tpf*)
10410	    LD="${LD-ld} -m elf64_s390"
10411	    ;;
10412	  sparc*-*linux*)
10413	    LD="${LD-ld} -m elf64_sparc"
10414	    ;;
10415	esac
10416	;;
10417    esac
10418  fi
10419  rm -rf conftest*
10420  ;;
10421
10422*-*-sco3.2v5*)
10423  # On SCO OpenServer 5, we need -belf to get full-featured binaries.
10424  SAVE_CFLAGS=$CFLAGS
10425  CFLAGS="$CFLAGS -belf"
10426  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5
10427printf %s "checking whether the C compiler needs -belf... " >&6; }
10428if test ${lt_cv_cc_needs_belf+y}
10429then :
10430  printf %s "(cached) " >&6
10431else $as_nop
10432  ac_ext=c
10433ac_cpp='$CPP $CPPFLAGS'
10434ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
10435ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
10436ac_compiler_gnu=$ac_cv_c_compiler_gnu
10437
10438     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10439/* end confdefs.h.  */
10440
10441int
10442main (void)
10443{
10444
10445  ;
10446  return 0;
10447}
10448_ACEOF
10449if ac_fn_c_try_link "$LINENO"
10450then :
10451  lt_cv_cc_needs_belf=yes
10452else $as_nop
10453  lt_cv_cc_needs_belf=no
10454fi
10455rm -f core conftest.err conftest.$ac_objext conftest.beam \
10456    conftest$ac_exeext conftest.$ac_ext
10457     ac_ext=c
10458ac_cpp='$CPP $CPPFLAGS'
10459ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
10460ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
10461ac_compiler_gnu=$ac_cv_c_compiler_gnu
10462
10463fi
10464{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5
10465printf "%s\n" "$lt_cv_cc_needs_belf" >&6; }
10466  if test yes != "$lt_cv_cc_needs_belf"; then
10467    # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
10468    CFLAGS=$SAVE_CFLAGS
10469  fi
10470  ;;
10471*-*solaris*)
10472  # Find out what ABI is being produced by ac_compile, and set linker
10473  # options accordingly.
10474  echo 'int i;' > conftest.$ac_ext
10475  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
10476  (eval $ac_compile) 2>&5
10477  ac_status=$?
10478  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
10479  test $ac_status = 0; }; then
10480    case `/usr/bin/file conftest.o` in
10481    *64-bit*)
10482      case $lt_cv_prog_gnu_ld in
10483      yes*)
10484        case $host in
10485        i?86-*-solaris*|x86_64-*-solaris*)
10486          LD="${LD-ld} -m elf_x86_64"
10487          ;;
10488        sparc*-*-solaris*)
10489          LD="${LD-ld} -m elf64_sparc"
10490          ;;
10491        esac
10492        # GNU ld 2.21 introduced _sol2 emulations.  Use them if available.
10493        if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then
10494          LD=${LD-ld}_sol2
10495        fi
10496        ;;
10497      *)
10498	if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
10499	  LD="${LD-ld} -64"
10500	fi
10501	;;
10502      esac
10503      ;;
10504    esac
10505  fi
10506  rm -rf conftest*
10507  ;;
10508esac
10509
10510need_locks=$enable_libtool_lock
10511
10512if test -n "$ac_tool_prefix"; then
10513  # Extract the first word of "${ac_tool_prefix}mt", so it can be a program name with args.
10514set dummy ${ac_tool_prefix}mt; ac_word=$2
10515{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10516printf %s "checking for $ac_word... " >&6; }
10517if test ${ac_cv_prog_MANIFEST_TOOL+y}
10518then :
10519  printf %s "(cached) " >&6
10520else $as_nop
10521  if test -n "$MANIFEST_TOOL"; then
10522  ac_cv_prog_MANIFEST_TOOL="$MANIFEST_TOOL" # Let the user override the test.
10523else
10524as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10525for as_dir in $PATH
10526do
10527  IFS=$as_save_IFS
10528  case $as_dir in #(((
10529    '') as_dir=./ ;;
10530    */) ;;
10531    *) as_dir=$as_dir/ ;;
10532  esac
10533    for ac_exec_ext in '' $ac_executable_extensions; do
10534  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
10535    ac_cv_prog_MANIFEST_TOOL="${ac_tool_prefix}mt"
10536    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
10537    break 2
10538  fi
10539done
10540  done
10541IFS=$as_save_IFS
10542
10543fi
10544fi
10545MANIFEST_TOOL=$ac_cv_prog_MANIFEST_TOOL
10546if test -n "$MANIFEST_TOOL"; then
10547  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MANIFEST_TOOL" >&5
10548printf "%s\n" "$MANIFEST_TOOL" >&6; }
10549else
10550  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
10551printf "%s\n" "no" >&6; }
10552fi
10553
10554
10555fi
10556if test -z "$ac_cv_prog_MANIFEST_TOOL"; then
10557  ac_ct_MANIFEST_TOOL=$MANIFEST_TOOL
10558  # Extract the first word of "mt", so it can be a program name with args.
10559set dummy mt; ac_word=$2
10560{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10561printf %s "checking for $ac_word... " >&6; }
10562if test ${ac_cv_prog_ac_ct_MANIFEST_TOOL+y}
10563then :
10564  printf %s "(cached) " >&6
10565else $as_nop
10566  if test -n "$ac_ct_MANIFEST_TOOL"; then
10567  ac_cv_prog_ac_ct_MANIFEST_TOOL="$ac_ct_MANIFEST_TOOL" # Let the user override the test.
10568else
10569as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10570for as_dir in $PATH
10571do
10572  IFS=$as_save_IFS
10573  case $as_dir in #(((
10574    '') as_dir=./ ;;
10575    */) ;;
10576    *) as_dir=$as_dir/ ;;
10577  esac
10578    for ac_exec_ext in '' $ac_executable_extensions; do
10579  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
10580    ac_cv_prog_ac_ct_MANIFEST_TOOL="mt"
10581    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
10582    break 2
10583  fi
10584done
10585  done
10586IFS=$as_save_IFS
10587
10588fi
10589fi
10590ac_ct_MANIFEST_TOOL=$ac_cv_prog_ac_ct_MANIFEST_TOOL
10591if test -n "$ac_ct_MANIFEST_TOOL"; then
10592  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MANIFEST_TOOL" >&5
10593printf "%s\n" "$ac_ct_MANIFEST_TOOL" >&6; }
10594else
10595  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
10596printf "%s\n" "no" >&6; }
10597fi
10598
10599  if test "x$ac_ct_MANIFEST_TOOL" = x; then
10600    MANIFEST_TOOL=":"
10601  else
10602    case $cross_compiling:$ac_tool_warned in
10603yes:)
10604{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
10605printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
10606ac_tool_warned=yes ;;
10607esac
10608    MANIFEST_TOOL=$ac_ct_MANIFEST_TOOL
10609  fi
10610else
10611  MANIFEST_TOOL="$ac_cv_prog_MANIFEST_TOOL"
10612fi
10613
10614test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt
10615{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool" >&5
10616printf %s "checking if $MANIFEST_TOOL is a manifest tool... " >&6; }
10617if test ${lt_cv_path_mainfest_tool+y}
10618then :
10619  printf %s "(cached) " >&6
10620else $as_nop
10621  lt_cv_path_mainfest_tool=no
10622  echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&5
10623  $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out
10624  cat conftest.err >&5
10625  if $GREP 'Manifest Tool' conftest.out > /dev/null; then
10626    lt_cv_path_mainfest_tool=yes
10627  fi
10628  rm -f conftest*
10629fi
10630{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5
10631printf "%s\n" "$lt_cv_path_mainfest_tool" >&6; }
10632if test yes != "$lt_cv_path_mainfest_tool"; then
10633  MANIFEST_TOOL=:
10634fi
10635
10636
10637
10638
10639
10640
10641  case $host_os in
10642    rhapsody* | darwin*)
10643    if test -n "$ac_tool_prefix"; then
10644  # Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args.
10645set dummy ${ac_tool_prefix}dsymutil; ac_word=$2
10646{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10647printf %s "checking for $ac_word... " >&6; }
10648if test ${ac_cv_prog_DSYMUTIL+y}
10649then :
10650  printf %s "(cached) " >&6
10651else $as_nop
10652  if test -n "$DSYMUTIL"; then
10653  ac_cv_prog_DSYMUTIL="$DSYMUTIL" # Let the user override the test.
10654else
10655as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10656for as_dir in $PATH
10657do
10658  IFS=$as_save_IFS
10659  case $as_dir in #(((
10660    '') as_dir=./ ;;
10661    */) ;;
10662    *) as_dir=$as_dir/ ;;
10663  esac
10664    for ac_exec_ext in '' $ac_executable_extensions; do
10665  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
10666    ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil"
10667    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
10668    break 2
10669  fi
10670done
10671  done
10672IFS=$as_save_IFS
10673
10674fi
10675fi
10676DSYMUTIL=$ac_cv_prog_DSYMUTIL
10677if test -n "$DSYMUTIL"; then
10678  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
10679printf "%s\n" "$DSYMUTIL" >&6; }
10680else
10681  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
10682printf "%s\n" "no" >&6; }
10683fi
10684
10685
10686fi
10687if test -z "$ac_cv_prog_DSYMUTIL"; then
10688  ac_ct_DSYMUTIL=$DSYMUTIL
10689  # Extract the first word of "dsymutil", so it can be a program name with args.
10690set dummy dsymutil; ac_word=$2
10691{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10692printf %s "checking for $ac_word... " >&6; }
10693if test ${ac_cv_prog_ac_ct_DSYMUTIL+y}
10694then :
10695  printf %s "(cached) " >&6
10696else $as_nop
10697  if test -n "$ac_ct_DSYMUTIL"; then
10698  ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # Let the user override the test.
10699else
10700as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10701for as_dir in $PATH
10702do
10703  IFS=$as_save_IFS
10704  case $as_dir in #(((
10705    '') as_dir=./ ;;
10706    */) ;;
10707    *) as_dir=$as_dir/ ;;
10708  esac
10709    for ac_exec_ext in '' $ac_executable_extensions; do
10710  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
10711    ac_cv_prog_ac_ct_DSYMUTIL="dsymutil"
10712    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
10713    break 2
10714  fi
10715done
10716  done
10717IFS=$as_save_IFS
10718
10719fi
10720fi
10721ac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL
10722if test -n "$ac_ct_DSYMUTIL"; then
10723  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DSYMUTIL" >&5
10724printf "%s\n" "$ac_ct_DSYMUTIL" >&6; }
10725else
10726  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
10727printf "%s\n" "no" >&6; }
10728fi
10729
10730  if test "x$ac_ct_DSYMUTIL" = x; then
10731    DSYMUTIL=":"
10732  else
10733    case $cross_compiling:$ac_tool_warned in
10734yes:)
10735{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
10736printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
10737ac_tool_warned=yes ;;
10738esac
10739    DSYMUTIL=$ac_ct_DSYMUTIL
10740  fi
10741else
10742  DSYMUTIL="$ac_cv_prog_DSYMUTIL"
10743fi
10744
10745    if test -n "$ac_tool_prefix"; then
10746  # Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args.
10747set dummy ${ac_tool_prefix}nmedit; ac_word=$2
10748{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10749printf %s "checking for $ac_word... " >&6; }
10750if test ${ac_cv_prog_NMEDIT+y}
10751then :
10752  printf %s "(cached) " >&6
10753else $as_nop
10754  if test -n "$NMEDIT"; then
10755  ac_cv_prog_NMEDIT="$NMEDIT" # Let the user override the test.
10756else
10757as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10758for as_dir in $PATH
10759do
10760  IFS=$as_save_IFS
10761  case $as_dir in #(((
10762    '') as_dir=./ ;;
10763    */) ;;
10764    *) as_dir=$as_dir/ ;;
10765  esac
10766    for ac_exec_ext in '' $ac_executable_extensions; do
10767  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
10768    ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit"
10769    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
10770    break 2
10771  fi
10772done
10773  done
10774IFS=$as_save_IFS
10775
10776fi
10777fi
10778NMEDIT=$ac_cv_prog_NMEDIT
10779if test -n "$NMEDIT"; then
10780  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $NMEDIT" >&5
10781printf "%s\n" "$NMEDIT" >&6; }
10782else
10783  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
10784printf "%s\n" "no" >&6; }
10785fi
10786
10787
10788fi
10789if test -z "$ac_cv_prog_NMEDIT"; then
10790  ac_ct_NMEDIT=$NMEDIT
10791  # Extract the first word of "nmedit", so it can be a program name with args.
10792set dummy nmedit; ac_word=$2
10793{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10794printf %s "checking for $ac_word... " >&6; }
10795if test ${ac_cv_prog_ac_ct_NMEDIT+y}
10796then :
10797  printf %s "(cached) " >&6
10798else $as_nop
10799  if test -n "$ac_ct_NMEDIT"; then
10800  ac_cv_prog_ac_ct_NMEDIT="$ac_ct_NMEDIT" # Let the user override the test.
10801else
10802as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10803for as_dir in $PATH
10804do
10805  IFS=$as_save_IFS
10806  case $as_dir in #(((
10807    '') as_dir=./ ;;
10808    */) ;;
10809    *) as_dir=$as_dir/ ;;
10810  esac
10811    for ac_exec_ext in '' $ac_executable_extensions; do
10812  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
10813    ac_cv_prog_ac_ct_NMEDIT="nmedit"
10814    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
10815    break 2
10816  fi
10817done
10818  done
10819IFS=$as_save_IFS
10820
10821fi
10822fi
10823ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT
10824if test -n "$ac_ct_NMEDIT"; then
10825  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NMEDIT" >&5
10826printf "%s\n" "$ac_ct_NMEDIT" >&6; }
10827else
10828  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
10829printf "%s\n" "no" >&6; }
10830fi
10831
10832  if test "x$ac_ct_NMEDIT" = x; then
10833    NMEDIT=":"
10834  else
10835    case $cross_compiling:$ac_tool_warned in
10836yes:)
10837{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
10838printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
10839ac_tool_warned=yes ;;
10840esac
10841    NMEDIT=$ac_ct_NMEDIT
10842  fi
10843else
10844  NMEDIT="$ac_cv_prog_NMEDIT"
10845fi
10846
10847    if test -n "$ac_tool_prefix"; then
10848  # Extract the first word of "${ac_tool_prefix}lipo", so it can be a program name with args.
10849set dummy ${ac_tool_prefix}lipo; ac_word=$2
10850{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10851printf %s "checking for $ac_word... " >&6; }
10852if test ${ac_cv_prog_LIPO+y}
10853then :
10854  printf %s "(cached) " >&6
10855else $as_nop
10856  if test -n "$LIPO"; then
10857  ac_cv_prog_LIPO="$LIPO" # Let the user override the test.
10858else
10859as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10860for as_dir in $PATH
10861do
10862  IFS=$as_save_IFS
10863  case $as_dir in #(((
10864    '') as_dir=./ ;;
10865    */) ;;
10866    *) as_dir=$as_dir/ ;;
10867  esac
10868    for ac_exec_ext in '' $ac_executable_extensions; do
10869  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
10870    ac_cv_prog_LIPO="${ac_tool_prefix}lipo"
10871    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
10872    break 2
10873  fi
10874done
10875  done
10876IFS=$as_save_IFS
10877
10878fi
10879fi
10880LIPO=$ac_cv_prog_LIPO
10881if test -n "$LIPO"; then
10882  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
10883printf "%s\n" "$LIPO" >&6; }
10884else
10885  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
10886printf "%s\n" "no" >&6; }
10887fi
10888
10889
10890fi
10891if test -z "$ac_cv_prog_LIPO"; then
10892  ac_ct_LIPO=$LIPO
10893  # Extract the first word of "lipo", so it can be a program name with args.
10894set dummy lipo; ac_word=$2
10895{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10896printf %s "checking for $ac_word... " >&6; }
10897if test ${ac_cv_prog_ac_ct_LIPO+y}
10898then :
10899  printf %s "(cached) " >&6
10900else $as_nop
10901  if test -n "$ac_ct_LIPO"; then
10902  ac_cv_prog_ac_ct_LIPO="$ac_ct_LIPO" # Let the user override the test.
10903else
10904as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10905for as_dir in $PATH
10906do
10907  IFS=$as_save_IFS
10908  case $as_dir in #(((
10909    '') as_dir=./ ;;
10910    */) ;;
10911    *) as_dir=$as_dir/ ;;
10912  esac
10913    for ac_exec_ext in '' $ac_executable_extensions; do
10914  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
10915    ac_cv_prog_ac_ct_LIPO="lipo"
10916    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
10917    break 2
10918  fi
10919done
10920  done
10921IFS=$as_save_IFS
10922
10923fi
10924fi
10925ac_ct_LIPO=$ac_cv_prog_ac_ct_LIPO
10926if test -n "$ac_ct_LIPO"; then
10927  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LIPO" >&5
10928printf "%s\n" "$ac_ct_LIPO" >&6; }
10929else
10930  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
10931printf "%s\n" "no" >&6; }
10932fi
10933
10934  if test "x$ac_ct_LIPO" = x; then
10935    LIPO=":"
10936  else
10937    case $cross_compiling:$ac_tool_warned in
10938yes:)
10939{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
10940printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
10941ac_tool_warned=yes ;;
10942esac
10943    LIPO=$ac_ct_LIPO
10944  fi
10945else
10946  LIPO="$ac_cv_prog_LIPO"
10947fi
10948
10949    if test -n "$ac_tool_prefix"; then
10950  # Extract the first word of "${ac_tool_prefix}otool", so it can be a program name with args.
10951set dummy ${ac_tool_prefix}otool; ac_word=$2
10952{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10953printf %s "checking for $ac_word... " >&6; }
10954if test ${ac_cv_prog_OTOOL+y}
10955then :
10956  printf %s "(cached) " >&6
10957else $as_nop
10958  if test -n "$OTOOL"; then
10959  ac_cv_prog_OTOOL="$OTOOL" # Let the user override the test.
10960else
10961as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10962for as_dir in $PATH
10963do
10964  IFS=$as_save_IFS
10965  case $as_dir in #(((
10966    '') as_dir=./ ;;
10967    */) ;;
10968    *) as_dir=$as_dir/ ;;
10969  esac
10970    for ac_exec_ext in '' $ac_executable_extensions; do
10971  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
10972    ac_cv_prog_OTOOL="${ac_tool_prefix}otool"
10973    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
10974    break 2
10975  fi
10976done
10977  done
10978IFS=$as_save_IFS
10979
10980fi
10981fi
10982OTOOL=$ac_cv_prog_OTOOL
10983if test -n "$OTOOL"; then
10984  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
10985printf "%s\n" "$OTOOL" >&6; }
10986else
10987  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
10988printf "%s\n" "no" >&6; }
10989fi
10990
10991
10992fi
10993if test -z "$ac_cv_prog_OTOOL"; then
10994  ac_ct_OTOOL=$OTOOL
10995  # Extract the first word of "otool", so it can be a program name with args.
10996set dummy otool; ac_word=$2
10997{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10998printf %s "checking for $ac_word... " >&6; }
10999if test ${ac_cv_prog_ac_ct_OTOOL+y}
11000then :
11001  printf %s "(cached) " >&6
11002else $as_nop
11003  if test -n "$ac_ct_OTOOL"; then
11004  ac_cv_prog_ac_ct_OTOOL="$ac_ct_OTOOL" # Let the user override the test.
11005else
11006as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11007for as_dir in $PATH
11008do
11009  IFS=$as_save_IFS
11010  case $as_dir in #(((
11011    '') as_dir=./ ;;
11012    */) ;;
11013    *) as_dir=$as_dir/ ;;
11014  esac
11015    for ac_exec_ext in '' $ac_executable_extensions; do
11016  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
11017    ac_cv_prog_ac_ct_OTOOL="otool"
11018    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
11019    break 2
11020  fi
11021done
11022  done
11023IFS=$as_save_IFS
11024
11025fi
11026fi
11027ac_ct_OTOOL=$ac_cv_prog_ac_ct_OTOOL
11028if test -n "$ac_ct_OTOOL"; then
11029  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL" >&5
11030printf "%s\n" "$ac_ct_OTOOL" >&6; }
11031else
11032  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
11033printf "%s\n" "no" >&6; }
11034fi
11035
11036  if test "x$ac_ct_OTOOL" = x; then
11037    OTOOL=":"
11038  else
11039    case $cross_compiling:$ac_tool_warned in
11040yes:)
11041{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
11042printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
11043ac_tool_warned=yes ;;
11044esac
11045    OTOOL=$ac_ct_OTOOL
11046  fi
11047else
11048  OTOOL="$ac_cv_prog_OTOOL"
11049fi
11050
11051    if test -n "$ac_tool_prefix"; then
11052  # Extract the first word of "${ac_tool_prefix}otool64", so it can be a program name with args.
11053set dummy ${ac_tool_prefix}otool64; ac_word=$2
11054{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11055printf %s "checking for $ac_word... " >&6; }
11056if test ${ac_cv_prog_OTOOL64+y}
11057then :
11058  printf %s "(cached) " >&6
11059else $as_nop
11060  if test -n "$OTOOL64"; then
11061  ac_cv_prog_OTOOL64="$OTOOL64" # Let the user override the test.
11062else
11063as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11064for as_dir in $PATH
11065do
11066  IFS=$as_save_IFS
11067  case $as_dir in #(((
11068    '') as_dir=./ ;;
11069    */) ;;
11070    *) as_dir=$as_dir/ ;;
11071  esac
11072    for ac_exec_ext in '' $ac_executable_extensions; do
11073  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
11074    ac_cv_prog_OTOOL64="${ac_tool_prefix}otool64"
11075    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
11076    break 2
11077  fi
11078done
11079  done
11080IFS=$as_save_IFS
11081
11082fi
11083fi
11084OTOOL64=$ac_cv_prog_OTOOL64
11085if test -n "$OTOOL64"; then
11086  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $OTOOL64" >&5
11087printf "%s\n" "$OTOOL64" >&6; }
11088else
11089  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
11090printf "%s\n" "no" >&6; }
11091fi
11092
11093
11094fi
11095if test -z "$ac_cv_prog_OTOOL64"; then
11096  ac_ct_OTOOL64=$OTOOL64
11097  # Extract the first word of "otool64", so it can be a program name with args.
11098set dummy otool64; ac_word=$2
11099{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11100printf %s "checking for $ac_word... " >&6; }
11101if test ${ac_cv_prog_ac_ct_OTOOL64+y}
11102then :
11103  printf %s "(cached) " >&6
11104else $as_nop
11105  if test -n "$ac_ct_OTOOL64"; then
11106  ac_cv_prog_ac_ct_OTOOL64="$ac_ct_OTOOL64" # Let the user override the test.
11107else
11108as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11109for as_dir in $PATH
11110do
11111  IFS=$as_save_IFS
11112  case $as_dir in #(((
11113    '') as_dir=./ ;;
11114    */) ;;
11115    *) as_dir=$as_dir/ ;;
11116  esac
11117    for ac_exec_ext in '' $ac_executable_extensions; do
11118  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
11119    ac_cv_prog_ac_ct_OTOOL64="otool64"
11120    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
11121    break 2
11122  fi
11123done
11124  done
11125IFS=$as_save_IFS
11126
11127fi
11128fi
11129ac_ct_OTOOL64=$ac_cv_prog_ac_ct_OTOOL64
11130if test -n "$ac_ct_OTOOL64"; then
11131  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL64" >&5
11132printf "%s\n" "$ac_ct_OTOOL64" >&6; }
11133else
11134  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
11135printf "%s\n" "no" >&6; }
11136fi
11137
11138  if test "x$ac_ct_OTOOL64" = x; then
11139    OTOOL64=":"
11140  else
11141    case $cross_compiling:$ac_tool_warned in
11142yes:)
11143{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
11144printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
11145ac_tool_warned=yes ;;
11146esac
11147    OTOOL64=$ac_ct_OTOOL64
11148  fi
11149else
11150  OTOOL64="$ac_cv_prog_OTOOL64"
11151fi
11152
11153
11154
11155
11156
11157
11158
11159
11160
11161
11162
11163
11164
11165
11166
11167
11168
11169
11170
11171
11172
11173
11174
11175
11176
11177
11178
11179    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for -single_module linker flag" >&5
11180printf %s "checking for -single_module linker flag... " >&6; }
11181if test ${lt_cv_apple_cc_single_mod+y}
11182then :
11183  printf %s "(cached) " >&6
11184else $as_nop
11185  lt_cv_apple_cc_single_mod=no
11186      if test -z "$LT_MULTI_MODULE"; then
11187	# By default we will add the -single_module flag. You can override
11188	# by either setting the environment variable LT_MULTI_MODULE
11189	# non-empty at configure time, or by adding -multi_module to the
11190	# link flags.
11191	rm -rf libconftest.dylib*
11192	echo "int foo(void){return 1;}" > conftest.c
11193	echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
11194-dynamiclib -Wl,-single_module conftest.c" >&5
11195	$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
11196	  -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
11197        _lt_result=$?
11198	# If there is a non-empty error log, and "single_module"
11199	# appears in it, assume the flag caused a linker warning
11200        if test -s conftest.err && $GREP single_module conftest.err; then
11201	  cat conftest.err >&5
11202	# Otherwise, if the output was created with a 0 exit code from
11203	# the compiler, it worked.
11204	elif test -f libconftest.dylib && test 0 = "$_lt_result"; then
11205	  lt_cv_apple_cc_single_mod=yes
11206	else
11207	  cat conftest.err >&5
11208	fi
11209	rm -rf libconftest.dylib*
11210	rm -f conftest.*
11211      fi
11212fi
11213{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5
11214printf "%s\n" "$lt_cv_apple_cc_single_mod" >&6; }
11215
11216    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5
11217printf %s "checking for -exported_symbols_list linker flag... " >&6; }
11218if test ${lt_cv_ld_exported_symbols_list+y}
11219then :
11220  printf %s "(cached) " >&6
11221else $as_nop
11222  lt_cv_ld_exported_symbols_list=no
11223      save_LDFLAGS=$LDFLAGS
11224      echo "_main" > conftest.sym
11225      LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
11226      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11227/* end confdefs.h.  */
11228
11229int
11230main (void)
11231{
11232
11233  ;
11234  return 0;
11235}
11236_ACEOF
11237if ac_fn_c_try_link "$LINENO"
11238then :
11239  lt_cv_ld_exported_symbols_list=yes
11240else $as_nop
11241  lt_cv_ld_exported_symbols_list=no
11242fi
11243rm -f core conftest.err conftest.$ac_objext conftest.beam \
11244    conftest$ac_exeext conftest.$ac_ext
11245	LDFLAGS=$save_LDFLAGS
11246
11247fi
11248{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5
11249printf "%s\n" "$lt_cv_ld_exported_symbols_list" >&6; }
11250
11251    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for -force_load linker flag" >&5
11252printf %s "checking for -force_load linker flag... " >&6; }
11253if test ${lt_cv_ld_force_load+y}
11254then :
11255  printf %s "(cached) " >&6
11256else $as_nop
11257  lt_cv_ld_force_load=no
11258      cat > conftest.c << _LT_EOF
11259int forced_loaded() { return 2;}
11260_LT_EOF
11261      echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&5
11262      $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5
11263      echo "$AR cru libconftest.a conftest.o" >&5
11264      $AR cru libconftest.a conftest.o 2>&5
11265      echo "$RANLIB libconftest.a" >&5
11266      $RANLIB libconftest.a 2>&5
11267      cat > conftest.c << _LT_EOF
11268int main() { return 0;}
11269_LT_EOF
11270      echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&5
11271      $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err
11272      _lt_result=$?
11273      if test -s conftest.err && $GREP force_load conftest.err; then
11274	cat conftest.err >&5
11275      elif test -f conftest && test 0 = "$_lt_result" && $GREP forced_load conftest >/dev/null 2>&1; then
11276	lt_cv_ld_force_load=yes
11277      else
11278	cat conftest.err >&5
11279      fi
11280        rm -f conftest.err libconftest.a conftest conftest.c
11281        rm -rf conftest.dSYM
11282
11283fi
11284{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_force_load" >&5
11285printf "%s\n" "$lt_cv_ld_force_load" >&6; }
11286    case $host_os in
11287    rhapsody* | darwin1.[012])
11288      _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;;
11289    darwin1.*)
11290      _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
11291    darwin*) # darwin 5.x on
11292      # if running on 10.5 or later, the deployment target defaults
11293      # to the OS version, if on x86, and 10.4, the deployment
11294      # target defaults to 10.4. Don't you love it?
11295      case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
11296	10.0,*86*-darwin8*|10.0,*-darwin[91]*)
11297	  _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
11298	10.[012][,.]*)
11299	  _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
11300	10.*)
11301	  _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
11302      esac
11303    ;;
11304  esac
11305    if test yes = "$lt_cv_apple_cc_single_mod"; then
11306      _lt_dar_single_mod='$single_module'
11307    fi
11308    if test yes = "$lt_cv_ld_exported_symbols_list"; then
11309      _lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym'
11310    else
11311      _lt_dar_export_syms='~$NMEDIT -s $output_objdir/$libname-symbols.expsym $lib'
11312    fi
11313    if test : != "$DSYMUTIL" && test no = "$lt_cv_ld_force_load"; then
11314      _lt_dsymutil='~$DSYMUTIL $lib || :'
11315    else
11316      _lt_dsymutil=
11317    fi
11318    ;;
11319  esac
11320
11321# func_munge_path_list VARIABLE PATH
11322# -----------------------------------
11323# VARIABLE is name of variable containing _space_ separated list of
11324# directories to be munged by the contents of PATH, which is string
11325# having a format:
11326# "DIR[:DIR]:"
11327#       string "DIR[ DIR]" will be prepended to VARIABLE
11328# ":DIR[:DIR]"
11329#       string "DIR[ DIR]" will be appended to VARIABLE
11330# "DIRP[:DIRP]::[DIRA:]DIRA"
11331#       string "DIRP[ DIRP]" will be prepended to VARIABLE and string
11332#       "DIRA[ DIRA]" will be appended to VARIABLE
11333# "DIR[:DIR]"
11334#       VARIABLE will be replaced by "DIR[ DIR]"
11335func_munge_path_list ()
11336{
11337    case x$2 in
11338    x)
11339        ;;
11340    *:)
11341        eval $1=\"`$ECHO $2 | $SED 's/:/ /g'` \$$1\"
11342        ;;
11343    x:*)
11344        eval $1=\"\$$1 `$ECHO $2 | $SED 's/:/ /g'`\"
11345        ;;
11346    *::*)
11347        eval $1=\"\$$1\ `$ECHO $2 | $SED -e 's/.*:://' -e 's/:/ /g'`\"
11348        eval $1=\"`$ECHO $2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \$$1\"
11349        ;;
11350    *)
11351        eval $1=\"`$ECHO $2 | $SED 's/:/ /g'`\"
11352        ;;
11353    esac
11354}
11355
11356ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default
11357"
11358if test "x$ac_cv_header_dlfcn_h" = xyes
11359then :
11360  printf "%s\n" "#define HAVE_DLFCN_H 1" >>confdefs.h
11361
11362fi
11363
11364
11365
11366
11367
11368
11369
11370# Set options
11371
11372
11373
11374        enable_dlopen=no
11375
11376
11377  enable_win32_dll=no
11378
11379
11380            # Check whether --enable-shared was given.
11381if test ${enable_shared+y}
11382then :
11383  enableval=$enable_shared; p=${PACKAGE-default}
11384    case $enableval in
11385    yes) enable_shared=yes ;;
11386    no) enable_shared=no ;;
11387    *)
11388      enable_shared=no
11389      # Look at the argument we got.  We use all the common list separators.
11390      lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
11391      for pkg in $enableval; do
11392	IFS=$lt_save_ifs
11393	if test "X$pkg" = "X$p"; then
11394	  enable_shared=yes
11395	fi
11396      done
11397      IFS=$lt_save_ifs
11398      ;;
11399    esac
11400else $as_nop
11401  enable_shared=yes
11402fi
11403
11404
11405
11406
11407
11408
11409
11410
11411
11412  # Check whether --enable-static was given.
11413if test ${enable_static+y}
11414then :
11415  enableval=$enable_static; p=${PACKAGE-default}
11416    case $enableval in
11417    yes) enable_static=yes ;;
11418    no) enable_static=no ;;
11419    *)
11420     enable_static=no
11421      # Look at the argument we got.  We use all the common list separators.
11422      lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
11423      for pkg in $enableval; do
11424	IFS=$lt_save_ifs
11425	if test "X$pkg" = "X$p"; then
11426	  enable_static=yes
11427	fi
11428      done
11429      IFS=$lt_save_ifs
11430      ;;
11431    esac
11432else $as_nop
11433  enable_static=yes
11434fi
11435
11436
11437
11438
11439
11440
11441
11442
11443
11444
11445# Check whether --with-pic was given.
11446if test ${with_pic+y}
11447then :
11448  withval=$with_pic; lt_p=${PACKAGE-default}
11449    case $withval in
11450    yes|no) pic_mode=$withval ;;
11451    *)
11452      pic_mode=default
11453      # Look at the argument we got.  We use all the common list separators.
11454      lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
11455      for lt_pkg in $withval; do
11456	IFS=$lt_save_ifs
11457	if test "X$lt_pkg" = "X$lt_p"; then
11458	  pic_mode=yes
11459	fi
11460      done
11461      IFS=$lt_save_ifs
11462      ;;
11463    esac
11464else $as_nop
11465  pic_mode=default
11466fi
11467
11468
11469
11470
11471
11472
11473
11474
11475  # Check whether --enable-fast-install was given.
11476if test ${enable_fast_install+y}
11477then :
11478  enableval=$enable_fast_install; p=${PACKAGE-default}
11479    case $enableval in
11480    yes) enable_fast_install=yes ;;
11481    no) enable_fast_install=no ;;
11482    *)
11483      enable_fast_install=no
11484      # Look at the argument we got.  We use all the common list separators.
11485      lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
11486      for pkg in $enableval; do
11487	IFS=$lt_save_ifs
11488	if test "X$pkg" = "X$p"; then
11489	  enable_fast_install=yes
11490	fi
11491      done
11492      IFS=$lt_save_ifs
11493      ;;
11494    esac
11495else $as_nop
11496  enable_fast_install=yes
11497fi
11498
11499
11500
11501
11502
11503
11504
11505
11506  shared_archive_member_spec=
11507case $host,$enable_shared in
11508power*-*-aix[5-9]*,yes)
11509  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking which variant of shared library versioning to provide" >&5
11510printf %s "checking which variant of shared library versioning to provide... " >&6; }
11511
11512# Check whether --with-aix-soname was given.
11513if test ${with_aix_soname+y}
11514then :
11515  withval=$with_aix_soname; case $withval in
11516    aix|svr4|both)
11517      ;;
11518    *)
11519      as_fn_error $? "Unknown argument to --with-aix-soname" "$LINENO" 5
11520      ;;
11521    esac
11522    lt_cv_with_aix_soname=$with_aix_soname
11523else $as_nop
11524  if test ${lt_cv_with_aix_soname+y}
11525then :
11526  printf %s "(cached) " >&6
11527else $as_nop
11528  lt_cv_with_aix_soname=aix
11529fi
11530
11531    with_aix_soname=$lt_cv_with_aix_soname
11532fi
11533
11534  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $with_aix_soname" >&5
11535printf "%s\n" "$with_aix_soname" >&6; }
11536  if test aix != "$with_aix_soname"; then
11537    # For the AIX way of multilib, we name the shared archive member
11538    # based on the bitwidth used, traditionally 'shr.o' or 'shr_64.o',
11539    # and 'shr.imp' or 'shr_64.imp', respectively, for the Import File.
11540    # Even when GNU compilers ignore OBJECT_MODE but need '-maix64' flag,
11541    # the AIX toolchain works better with OBJECT_MODE set (default 32).
11542    if test 64 = "${OBJECT_MODE-32}"; then
11543      shared_archive_member_spec=shr_64
11544    else
11545      shared_archive_member_spec=shr
11546    fi
11547  fi
11548  ;;
11549*)
11550  with_aix_soname=aix
11551  ;;
11552esac
11553
11554
11555
11556
11557
11558
11559
11560
11561
11562
11563# This can be used to rebuild libtool when needed
11564LIBTOOL_DEPS=$ltmain
11565
11566# Always use our own libtool.
11567LIBTOOL='$(SHELL) $(top_builddir)/libtool'
11568
11569
11570
11571
11572
11573
11574
11575
11576
11577
11578
11579
11580
11581
11582
11583
11584
11585
11586
11587
11588
11589
11590
11591
11592
11593
11594
11595
11596
11597
11598test -z "$LN_S" && LN_S="ln -s"
11599
11600
11601
11602
11603
11604
11605
11606
11607
11608
11609
11610
11611
11612
11613if test -n "${ZSH_VERSION+set}"; then
11614   setopt NO_GLOB_SUBST
11615fi
11616
11617{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5
11618printf %s "checking for objdir... " >&6; }
11619if test ${lt_cv_objdir+y}
11620then :
11621  printf %s "(cached) " >&6
11622else $as_nop
11623  rm -f .libs 2>/dev/null
11624mkdir .libs 2>/dev/null
11625if test -d .libs; then
11626  lt_cv_objdir=.libs
11627else
11628  # MS-DOS does not allow filenames that begin with a dot.
11629  lt_cv_objdir=_libs
11630fi
11631rmdir .libs 2>/dev/null
11632fi
11633{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_objdir" >&5
11634printf "%s\n" "$lt_cv_objdir" >&6; }
11635objdir=$lt_cv_objdir
11636
11637
11638
11639
11640
11641printf "%s\n" "#define LT_OBJDIR \"$lt_cv_objdir/\"" >>confdefs.h
11642
11643
11644
11645
11646case $host_os in
11647aix3*)
11648  # AIX sometimes has problems with the GCC collect2 program.  For some
11649  # reason, if we set the COLLECT_NAMES environment variable, the problems
11650  # vanish in a puff of smoke.
11651  if test set != "${COLLECT_NAMES+set}"; then
11652    COLLECT_NAMES=
11653    export COLLECT_NAMES
11654  fi
11655  ;;
11656esac
11657
11658# Global variables:
11659ofile=libtool
11660can_build_shared=yes
11661
11662# All known linkers require a '.a' archive for static linking (except MSVC,
11663# which needs '.lib').
11664libext=a
11665
11666with_gnu_ld=$lt_cv_prog_gnu_ld
11667
11668old_CC=$CC
11669old_CFLAGS=$CFLAGS
11670
11671# Set sane defaults for various variables
11672test -z "$CC" && CC=cc
11673test -z "$LTCC" && LTCC=$CC
11674test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
11675test -z "$LD" && LD=ld
11676test -z "$ac_objext" && ac_objext=o
11677
11678func_cc_basename $compiler
11679cc_basename=$func_cc_basename_result
11680
11681
11682# Only perform the check for file, if the check method requires it
11683test -z "$MAGIC_CMD" && MAGIC_CMD=file
11684case $deplibs_check_method in
11685file_magic*)
11686  if test "$file_magic_cmd" = '$MAGIC_CMD'; then
11687    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5
11688printf %s "checking for ${ac_tool_prefix}file... " >&6; }
11689if test ${lt_cv_path_MAGIC_CMD+y}
11690then :
11691  printf %s "(cached) " >&6
11692else $as_nop
11693  case $MAGIC_CMD in
11694[\\/*] |  ?:[\\/]*)
11695  lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path.
11696  ;;
11697*)
11698  lt_save_MAGIC_CMD=$MAGIC_CMD
11699  lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
11700  ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
11701  for ac_dir in $ac_dummy; do
11702    IFS=$lt_save_ifs
11703    test -z "$ac_dir" && ac_dir=.
11704    if test -f "$ac_dir/${ac_tool_prefix}file"; then
11705      lt_cv_path_MAGIC_CMD=$ac_dir/"${ac_tool_prefix}file"
11706      if test -n "$file_magic_test_file"; then
11707	case $deplibs_check_method in
11708	"file_magic "*)
11709	  file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
11710	  MAGIC_CMD=$lt_cv_path_MAGIC_CMD
11711	  if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
11712	    $EGREP "$file_magic_regex" > /dev/null; then
11713	    :
11714	  else
11715	    cat <<_LT_EOF 1>&2
11716
11717*** Warning: the command libtool uses to detect shared libraries,
11718*** $file_magic_cmd, produces output that libtool cannot recognize.
11719*** The result is that libtool may fail to recognize shared libraries
11720*** as such.  This will affect the creation of libtool libraries that
11721*** depend on shared libraries, but programs linked with such libtool
11722*** libraries will work regardless of this problem.  Nevertheless, you
11723*** may want to report the problem to your system manager and/or to
11724*** bug-libtool@gnu.org
11725
11726_LT_EOF
11727	  fi ;;
11728	esac
11729      fi
11730      break
11731    fi
11732  done
11733  IFS=$lt_save_ifs
11734  MAGIC_CMD=$lt_save_MAGIC_CMD
11735  ;;
11736esac
11737fi
11738
11739MAGIC_CMD=$lt_cv_path_MAGIC_CMD
11740if test -n "$MAGIC_CMD"; then
11741  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5
11742printf "%s\n" "$MAGIC_CMD" >&6; }
11743else
11744  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
11745printf "%s\n" "no" >&6; }
11746fi
11747
11748
11749
11750
11751
11752if test -z "$lt_cv_path_MAGIC_CMD"; then
11753  if test -n "$ac_tool_prefix"; then
11754    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for file" >&5
11755printf %s "checking for file... " >&6; }
11756if test ${lt_cv_path_MAGIC_CMD+y}
11757then :
11758  printf %s "(cached) " >&6
11759else $as_nop
11760  case $MAGIC_CMD in
11761[\\/*] |  ?:[\\/]*)
11762  lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path.
11763  ;;
11764*)
11765  lt_save_MAGIC_CMD=$MAGIC_CMD
11766  lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
11767  ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
11768  for ac_dir in $ac_dummy; do
11769    IFS=$lt_save_ifs
11770    test -z "$ac_dir" && ac_dir=.
11771    if test -f "$ac_dir/file"; then
11772      lt_cv_path_MAGIC_CMD=$ac_dir/"file"
11773      if test -n "$file_magic_test_file"; then
11774	case $deplibs_check_method in
11775	"file_magic "*)
11776	  file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
11777	  MAGIC_CMD=$lt_cv_path_MAGIC_CMD
11778	  if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
11779	    $EGREP "$file_magic_regex" > /dev/null; then
11780	    :
11781	  else
11782	    cat <<_LT_EOF 1>&2
11783
11784*** Warning: the command libtool uses to detect shared libraries,
11785*** $file_magic_cmd, produces output that libtool cannot recognize.
11786*** The result is that libtool may fail to recognize shared libraries
11787*** as such.  This will affect the creation of libtool libraries that
11788*** depend on shared libraries, but programs linked with such libtool
11789*** libraries will work regardless of this problem.  Nevertheless, you
11790*** may want to report the problem to your system manager and/or to
11791*** bug-libtool@gnu.org
11792
11793_LT_EOF
11794	  fi ;;
11795	esac
11796      fi
11797      break
11798    fi
11799  done
11800  IFS=$lt_save_ifs
11801  MAGIC_CMD=$lt_save_MAGIC_CMD
11802  ;;
11803esac
11804fi
11805
11806MAGIC_CMD=$lt_cv_path_MAGIC_CMD
11807if test -n "$MAGIC_CMD"; then
11808  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5
11809printf "%s\n" "$MAGIC_CMD" >&6; }
11810else
11811  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
11812printf "%s\n" "no" >&6; }
11813fi
11814
11815
11816  else
11817    MAGIC_CMD=:
11818  fi
11819fi
11820
11821  fi
11822  ;;
11823esac
11824
11825# Use C for the default configuration in the libtool script
11826
11827lt_save_CC=$CC
11828ac_ext=c
11829ac_cpp='$CPP $CPPFLAGS'
11830ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
11831ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
11832ac_compiler_gnu=$ac_cv_c_compiler_gnu
11833
11834
11835# Source file extension for C test sources.
11836ac_ext=c
11837
11838# Object file extension for compiled C test sources.
11839objext=o
11840objext=$objext
11841
11842# Code to be used in simple compile tests
11843lt_simple_compile_test_code="int some_variable = 0;"
11844
11845# Code to be used in simple link tests
11846lt_simple_link_test_code='int main(){return(0);}'
11847
11848
11849
11850
11851
11852
11853
11854# If no C compiler was specified, use CC.
11855LTCC=${LTCC-"$CC"}
11856
11857# If no C compiler flags were specified, use CFLAGS.
11858LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
11859
11860# Allow CC to be a program name with arguments.
11861compiler=$CC
11862
11863# Save the default compiler, since it gets overwritten when the other
11864# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
11865compiler_DEFAULT=$CC
11866
11867# save warnings/boilerplate of simple test code
11868ac_outfile=conftest.$ac_objext
11869echo "$lt_simple_compile_test_code" >conftest.$ac_ext
11870eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
11871_lt_compiler_boilerplate=`cat conftest.err`
11872$RM conftest*
11873
11874ac_outfile=conftest.$ac_objext
11875echo "$lt_simple_link_test_code" >conftest.$ac_ext
11876eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
11877_lt_linker_boilerplate=`cat conftest.err`
11878$RM -r conftest*
11879
11880
11881if test -n "$compiler"; then
11882
11883lt_prog_compiler_no_builtin_flag=
11884
11885if test yes = "$GCC"; then
11886  case $cc_basename in
11887  nvcc*)
11888    lt_prog_compiler_no_builtin_flag=' -Xcompiler -fno-builtin' ;;
11889  *)
11890    lt_prog_compiler_no_builtin_flag=' -fno-builtin' ;;
11891  esac
11892
11893  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
11894printf %s "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; }
11895if test ${lt_cv_prog_compiler_rtti_exceptions+y}
11896then :
11897  printf %s "(cached) " >&6
11898else $as_nop
11899  lt_cv_prog_compiler_rtti_exceptions=no
11900   ac_outfile=conftest.$ac_objext
11901   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
11902   lt_compiler_flag="-fno-rtti -fno-exceptions"  ## exclude from sc_useless_quotes_in_assignment
11903   # Insert the option either (1) after the last *FLAGS variable, or
11904   # (2) before a word containing "conftest.", or (3) at the end.
11905   # Note that $ac_compile itself does not contain backslashes and begins
11906   # with a dollar sign (not a hyphen), so the echo should work correctly.
11907   # The option is referenced via a variable to avoid confusing sed.
11908   lt_compile=`echo "$ac_compile" | $SED \
11909   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
11910   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
11911   -e 's:$: $lt_compiler_flag:'`
11912   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
11913   (eval "$lt_compile" 2>conftest.err)
11914   ac_status=$?
11915   cat conftest.err >&5
11916   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11917   if (exit $ac_status) && test -s "$ac_outfile"; then
11918     # The compiler can only warn and ignore the option if not recognized
11919     # So say no if there are warnings other than the usual output.
11920     $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
11921     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
11922     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
11923       lt_cv_prog_compiler_rtti_exceptions=yes
11924     fi
11925   fi
11926   $RM conftest*
11927
11928fi
11929{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5
11930printf "%s\n" "$lt_cv_prog_compiler_rtti_exceptions" >&6; }
11931
11932if test yes = "$lt_cv_prog_compiler_rtti_exceptions"; then
11933    lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions"
11934else
11935    :
11936fi
11937
11938fi
11939
11940
11941
11942
11943
11944
11945  lt_prog_compiler_wl=
11946lt_prog_compiler_pic=
11947lt_prog_compiler_static=
11948
11949
11950  if test yes = "$GCC"; then
11951    lt_prog_compiler_wl='-Wl,'
11952    lt_prog_compiler_static='-static'
11953
11954    case $host_os in
11955      aix*)
11956      # All AIX code is PIC.
11957      if test ia64 = "$host_cpu"; then
11958	# AIX 5 now supports IA64 processor
11959	lt_prog_compiler_static='-Bstatic'
11960      fi
11961      lt_prog_compiler_pic='-fPIC'
11962      ;;
11963
11964    amigaos*)
11965      case $host_cpu in
11966      powerpc)
11967            # see comment about AmigaOS4 .so support
11968            lt_prog_compiler_pic='-fPIC'
11969        ;;
11970      m68k)
11971            # FIXME: we need at least 68020 code to build shared libraries, but
11972            # adding the '-m68020' flag to GCC prevents building anything better,
11973            # like '-m68040'.
11974            lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4'
11975        ;;
11976      esac
11977      ;;
11978
11979    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
11980      # PIC is the default for these OSes.
11981      ;;
11982
11983    mingw* | cygwin* | pw32* | os2* | cegcc*)
11984      # This hack is so that the source file can tell whether it is being
11985      # built for inclusion in a dll (and should export symbols for example).
11986      # Although the cygwin gcc ignores -fPIC, still need this for old-style
11987      # (--disable-auto-import) libraries
11988      lt_prog_compiler_pic='-DDLL_EXPORT'
11989      case $host_os in
11990      os2*)
11991	lt_prog_compiler_static='$wl-static'
11992	;;
11993      esac
11994      ;;
11995
11996    darwin* | rhapsody*)
11997      # PIC is the default on this platform
11998      # Common symbols not allowed in MH_DYLIB files
11999      lt_prog_compiler_pic='-fno-common'
12000      ;;
12001
12002    haiku*)
12003      # PIC is the default for Haiku.
12004      # The "-static" flag exists, but is broken.
12005      lt_prog_compiler_static=
12006      ;;
12007
12008    hpux*)
12009      # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
12010      # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
12011      # sets the default TLS model and affects inlining.
12012      case $host_cpu in
12013      hppa*64*)
12014	# +Z the default
12015	;;
12016      *)
12017	lt_prog_compiler_pic='-fPIC'
12018	;;
12019      esac
12020      ;;
12021
12022    interix[3-9]*)
12023      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
12024      # Instead, we relocate shared libraries at runtime.
12025      ;;
12026
12027    msdosdjgpp*)
12028      # Just because we use GCC doesn't mean we suddenly get shared libraries
12029      # on systems that don't support them.
12030      lt_prog_compiler_can_build_shared=no
12031      enable_shared=no
12032      ;;
12033
12034    *nto* | *qnx*)
12035      # QNX uses GNU C++, but need to define -shared option too, otherwise
12036      # it will coredump.
12037      lt_prog_compiler_pic='-fPIC -shared'
12038      ;;
12039
12040    sysv4*MP*)
12041      if test -d /usr/nec; then
12042	lt_prog_compiler_pic=-Kconform_pic
12043      fi
12044      ;;
12045
12046    *)
12047      lt_prog_compiler_pic='-fPIC'
12048      ;;
12049    esac
12050
12051    case $cc_basename in
12052    nvcc*) # Cuda Compiler Driver 2.2
12053      lt_prog_compiler_wl='-Xlinker '
12054      if test -n "$lt_prog_compiler_pic"; then
12055        lt_prog_compiler_pic="-Xcompiler $lt_prog_compiler_pic"
12056      fi
12057      ;;
12058    esac
12059  else
12060    # PORTME Check for flag to pass linker flags through the system compiler.
12061    case $host_os in
12062    aix*)
12063      lt_prog_compiler_wl='-Wl,'
12064      if test ia64 = "$host_cpu"; then
12065	# AIX 5 now supports IA64 processor
12066	lt_prog_compiler_static='-Bstatic'
12067      else
12068	lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp'
12069      fi
12070      ;;
12071
12072    darwin* | rhapsody*)
12073      # PIC is the default on this platform
12074      # Common symbols not allowed in MH_DYLIB files
12075      lt_prog_compiler_pic='-fno-common'
12076      case $cc_basename in
12077      nagfor*)
12078        # NAG Fortran compiler
12079        lt_prog_compiler_wl='-Wl,-Wl,,'
12080        lt_prog_compiler_pic='-PIC'
12081        lt_prog_compiler_static='-Bstatic'
12082        ;;
12083      esac
12084      ;;
12085
12086    mingw* | cygwin* | pw32* | os2* | cegcc*)
12087      # This hack is so that the source file can tell whether it is being
12088      # built for inclusion in a dll (and should export symbols for example).
12089      lt_prog_compiler_pic='-DDLL_EXPORT'
12090      case $host_os in
12091      os2*)
12092	lt_prog_compiler_static='$wl-static'
12093	;;
12094      esac
12095      ;;
12096
12097    hpux9* | hpux10* | hpux11*)
12098      lt_prog_compiler_wl='-Wl,'
12099      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
12100      # not for PA HP-UX.
12101      case $host_cpu in
12102      hppa*64*|ia64*)
12103	# +Z the default
12104	;;
12105      *)
12106	lt_prog_compiler_pic='+Z'
12107	;;
12108      esac
12109      # Is there a better lt_prog_compiler_static that works with the bundled CC?
12110      lt_prog_compiler_static='$wl-a ${wl}archive'
12111      ;;
12112
12113    irix5* | irix6* | nonstopux*)
12114      lt_prog_compiler_wl='-Wl,'
12115      # PIC (with -KPIC) is the default.
12116      lt_prog_compiler_static='-non_shared'
12117      ;;
12118
12119    linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
12120      case $cc_basename in
12121      # old Intel for x86_64, which still supported -KPIC.
12122      ecc*)
12123	lt_prog_compiler_wl='-Wl,'
12124	lt_prog_compiler_pic='-KPIC'
12125	lt_prog_compiler_static='-static'
12126        ;;
12127      # icc used to be incompatible with GCC.
12128      # ICC 10 doesn't accept -KPIC any more.
12129      icc* | ifort*)
12130	lt_prog_compiler_wl='-Wl,'
12131	lt_prog_compiler_pic='-fPIC'
12132	lt_prog_compiler_static='-static'
12133        ;;
12134      # Lahey Fortran 8.1.
12135      lf95*)
12136	lt_prog_compiler_wl='-Wl,'
12137	lt_prog_compiler_pic='--shared'
12138	lt_prog_compiler_static='--static'
12139	;;
12140      nagfor*)
12141	# NAG Fortran compiler
12142	lt_prog_compiler_wl='-Wl,-Wl,,'
12143	lt_prog_compiler_pic='-PIC'
12144	lt_prog_compiler_static='-Bstatic'
12145	;;
12146      tcc*)
12147	# Fabrice Bellard et al's Tiny C Compiler
12148	lt_prog_compiler_wl='-Wl,'
12149	lt_prog_compiler_pic='-fPIC'
12150	lt_prog_compiler_static='-static'
12151	;;
12152      pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
12153        # Portland Group compilers (*not* the Pentium gcc compiler,
12154	# which looks to be a dead project)
12155	lt_prog_compiler_wl='-Wl,'
12156	lt_prog_compiler_pic='-fpic'
12157	lt_prog_compiler_static='-Bstatic'
12158        ;;
12159      ccc*)
12160        lt_prog_compiler_wl='-Wl,'
12161        # All Alpha code is PIC.
12162        lt_prog_compiler_static='-non_shared'
12163        ;;
12164      xl* | bgxl* | bgf* | mpixl*)
12165	# IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene
12166	lt_prog_compiler_wl='-Wl,'
12167	lt_prog_compiler_pic='-qpic'
12168	lt_prog_compiler_static='-qstaticlink'
12169	;;
12170      *)
12171	case `$CC -V 2>&1 | sed 5q` in
12172	*Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [1-7].* | *Sun*Fortran*\ 8.[0-3]*)
12173	  # Sun Fortran 8.3 passes all unrecognized flags to the linker
12174	  lt_prog_compiler_pic='-KPIC'
12175	  lt_prog_compiler_static='-Bstatic'
12176	  lt_prog_compiler_wl=''
12177	  ;;
12178	*Sun\ F* | *Sun*Fortran*)
12179	  lt_prog_compiler_pic='-KPIC'
12180	  lt_prog_compiler_static='-Bstatic'
12181	  lt_prog_compiler_wl='-Qoption ld '
12182	  ;;
12183	*Sun\ C*)
12184	  # Sun C 5.9
12185	  lt_prog_compiler_pic='-KPIC'
12186	  lt_prog_compiler_static='-Bstatic'
12187	  lt_prog_compiler_wl='-Wl,'
12188	  ;;
12189        *Intel*\ [CF]*Compiler*)
12190	  lt_prog_compiler_wl='-Wl,'
12191	  lt_prog_compiler_pic='-fPIC'
12192	  lt_prog_compiler_static='-static'
12193	  ;;
12194	*Portland\ Group*)
12195	  lt_prog_compiler_wl='-Wl,'
12196	  lt_prog_compiler_pic='-fpic'
12197	  lt_prog_compiler_static='-Bstatic'
12198	  ;;
12199	esac
12200	;;
12201      esac
12202      ;;
12203
12204    newsos6)
12205      lt_prog_compiler_pic='-KPIC'
12206      lt_prog_compiler_static='-Bstatic'
12207      ;;
12208
12209    *nto* | *qnx*)
12210      # QNX uses GNU C++, but need to define -shared option too, otherwise
12211      # it will coredump.
12212      lt_prog_compiler_pic='-fPIC -shared'
12213      ;;
12214
12215    osf3* | osf4* | osf5*)
12216      lt_prog_compiler_wl='-Wl,'
12217      # All OSF/1 code is PIC.
12218      lt_prog_compiler_static='-non_shared'
12219      ;;
12220
12221    rdos*)
12222      lt_prog_compiler_static='-non_shared'
12223      ;;
12224
12225    solaris*)
12226      lt_prog_compiler_pic='-KPIC'
12227      lt_prog_compiler_static='-Bstatic'
12228      case $cc_basename in
12229      f77* | f90* | f95* | sunf77* | sunf90* | sunf95*)
12230	lt_prog_compiler_wl='-Qoption ld ';;
12231      *)
12232	lt_prog_compiler_wl='-Wl,';;
12233      esac
12234      ;;
12235
12236    sunos4*)
12237      lt_prog_compiler_wl='-Qoption ld '
12238      lt_prog_compiler_pic='-PIC'
12239      lt_prog_compiler_static='-Bstatic'
12240      ;;
12241
12242    sysv4 | sysv4.2uw2* | sysv4.3*)
12243      lt_prog_compiler_wl='-Wl,'
12244      lt_prog_compiler_pic='-KPIC'
12245      lt_prog_compiler_static='-Bstatic'
12246      ;;
12247
12248    sysv4*MP*)
12249      if test -d /usr/nec; then
12250	lt_prog_compiler_pic='-Kconform_pic'
12251	lt_prog_compiler_static='-Bstatic'
12252      fi
12253      ;;
12254
12255    sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
12256      lt_prog_compiler_wl='-Wl,'
12257      lt_prog_compiler_pic='-KPIC'
12258      lt_prog_compiler_static='-Bstatic'
12259      ;;
12260
12261    unicos*)
12262      lt_prog_compiler_wl='-Wl,'
12263      lt_prog_compiler_can_build_shared=no
12264      ;;
12265
12266    uts4*)
12267      lt_prog_compiler_pic='-pic'
12268      lt_prog_compiler_static='-Bstatic'
12269      ;;
12270
12271    *)
12272      lt_prog_compiler_can_build_shared=no
12273      ;;
12274    esac
12275  fi
12276
12277case $host_os in
12278  # For platforms that do not support PIC, -DPIC is meaningless:
12279  *djgpp*)
12280    lt_prog_compiler_pic=
12281    ;;
12282  *)
12283    lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC"
12284    ;;
12285esac
12286
12287{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5
12288printf %s "checking for $compiler option to produce PIC... " >&6; }
12289if test ${lt_cv_prog_compiler_pic+y}
12290then :
12291  printf %s "(cached) " >&6
12292else $as_nop
12293  lt_cv_prog_compiler_pic=$lt_prog_compiler_pic
12294fi
12295{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic" >&5
12296printf "%s\n" "$lt_cv_prog_compiler_pic" >&6; }
12297lt_prog_compiler_pic=$lt_cv_prog_compiler_pic
12298
12299#
12300# Check to make sure the PIC flag actually works.
12301#
12302if test -n "$lt_prog_compiler_pic"; then
12303  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5
12304printf %s "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; }
12305if test ${lt_cv_prog_compiler_pic_works+y}
12306then :
12307  printf %s "(cached) " >&6
12308else $as_nop
12309  lt_cv_prog_compiler_pic_works=no
12310   ac_outfile=conftest.$ac_objext
12311   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
12312   lt_compiler_flag="$lt_prog_compiler_pic -DPIC"  ## exclude from sc_useless_quotes_in_assignment
12313   # Insert the option either (1) after the last *FLAGS variable, or
12314   # (2) before a word containing "conftest.", or (3) at the end.
12315   # Note that $ac_compile itself does not contain backslashes and begins
12316   # with a dollar sign (not a hyphen), so the echo should work correctly.
12317   # The option is referenced via a variable to avoid confusing sed.
12318   lt_compile=`echo "$ac_compile" | $SED \
12319   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
12320   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
12321   -e 's:$: $lt_compiler_flag:'`
12322   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
12323   (eval "$lt_compile" 2>conftest.err)
12324   ac_status=$?
12325   cat conftest.err >&5
12326   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12327   if (exit $ac_status) && test -s "$ac_outfile"; then
12328     # The compiler can only warn and ignore the option if not recognized
12329     # So say no if there are warnings other than the usual output.
12330     $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
12331     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
12332     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
12333       lt_cv_prog_compiler_pic_works=yes
12334     fi
12335   fi
12336   $RM conftest*
12337
12338fi
12339{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5
12340printf "%s\n" "$lt_cv_prog_compiler_pic_works" >&6; }
12341
12342if test yes = "$lt_cv_prog_compiler_pic_works"; then
12343    case $lt_prog_compiler_pic in
12344     "" | " "*) ;;
12345     *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;;
12346     esac
12347else
12348    lt_prog_compiler_pic=
12349     lt_prog_compiler_can_build_shared=no
12350fi
12351
12352fi
12353
12354
12355
12356
12357
12358
12359
12360
12361
12362
12363
12364#
12365# Check to make sure the static flag actually works.
12366#
12367wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\"
12368{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5
12369printf %s "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; }
12370if test ${lt_cv_prog_compiler_static_works+y}
12371then :
12372  printf %s "(cached) " >&6
12373else $as_nop
12374  lt_cv_prog_compiler_static_works=no
12375   save_LDFLAGS=$LDFLAGS
12376   LDFLAGS="$LDFLAGS $lt_tmp_static_flag"
12377   echo "$lt_simple_link_test_code" > conftest.$ac_ext
12378   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
12379     # The linker can only warn and ignore the option if not recognized
12380     # So say no if there are warnings
12381     if test -s conftest.err; then
12382       # Append any errors to the config.log.
12383       cat conftest.err 1>&5
12384       $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
12385       $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
12386       if diff conftest.exp conftest.er2 >/dev/null; then
12387         lt_cv_prog_compiler_static_works=yes
12388       fi
12389     else
12390       lt_cv_prog_compiler_static_works=yes
12391     fi
12392   fi
12393   $RM -r conftest*
12394   LDFLAGS=$save_LDFLAGS
12395
12396fi
12397{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5
12398printf "%s\n" "$lt_cv_prog_compiler_static_works" >&6; }
12399
12400if test yes = "$lt_cv_prog_compiler_static_works"; then
12401    :
12402else
12403    lt_prog_compiler_static=
12404fi
12405
12406
12407
12408
12409
12410
12411
12412  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
12413printf %s "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
12414if test ${lt_cv_prog_compiler_c_o+y}
12415then :
12416  printf %s "(cached) " >&6
12417else $as_nop
12418  lt_cv_prog_compiler_c_o=no
12419   $RM -r conftest 2>/dev/null
12420   mkdir conftest
12421   cd conftest
12422   mkdir out
12423   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
12424
12425   lt_compiler_flag="-o out/conftest2.$ac_objext"
12426   # Insert the option either (1) after the last *FLAGS variable, or
12427   # (2) before a word containing "conftest.", or (3) at the end.
12428   # Note that $ac_compile itself does not contain backslashes and begins
12429   # with a dollar sign (not a hyphen), so the echo should work correctly.
12430   lt_compile=`echo "$ac_compile" | $SED \
12431   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
12432   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
12433   -e 's:$: $lt_compiler_flag:'`
12434   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
12435   (eval "$lt_compile" 2>out/conftest.err)
12436   ac_status=$?
12437   cat out/conftest.err >&5
12438   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12439   if (exit $ac_status) && test -s out/conftest2.$ac_objext
12440   then
12441     # The compiler can only warn and ignore the option if not recognized
12442     # So say no if there are warnings
12443     $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
12444     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
12445     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
12446       lt_cv_prog_compiler_c_o=yes
12447     fi
12448   fi
12449   chmod u+w . 2>&5
12450   $RM conftest*
12451   # SGI C++ compiler will create directory out/ii_files/ for
12452   # template instantiation
12453   test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
12454   $RM out/* && rmdir out
12455   cd ..
12456   $RM -r conftest
12457   $RM conftest*
12458
12459fi
12460{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5
12461printf "%s\n" "$lt_cv_prog_compiler_c_o" >&6; }
12462
12463
12464
12465
12466
12467
12468  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
12469printf %s "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
12470if test ${lt_cv_prog_compiler_c_o+y}
12471then :
12472  printf %s "(cached) " >&6
12473else $as_nop
12474  lt_cv_prog_compiler_c_o=no
12475   $RM -r conftest 2>/dev/null
12476   mkdir conftest
12477   cd conftest
12478   mkdir out
12479   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
12480
12481   lt_compiler_flag="-o out/conftest2.$ac_objext"
12482   # Insert the option either (1) after the last *FLAGS variable, or
12483   # (2) before a word containing "conftest.", or (3) at the end.
12484   # Note that $ac_compile itself does not contain backslashes and begins
12485   # with a dollar sign (not a hyphen), so the echo should work correctly.
12486   lt_compile=`echo "$ac_compile" | $SED \
12487   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
12488   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
12489   -e 's:$: $lt_compiler_flag:'`
12490   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
12491   (eval "$lt_compile" 2>out/conftest.err)
12492   ac_status=$?
12493   cat out/conftest.err >&5
12494   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12495   if (exit $ac_status) && test -s out/conftest2.$ac_objext
12496   then
12497     # The compiler can only warn and ignore the option if not recognized
12498     # So say no if there are warnings
12499     $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
12500     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
12501     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
12502       lt_cv_prog_compiler_c_o=yes
12503     fi
12504   fi
12505   chmod u+w . 2>&5
12506   $RM conftest*
12507   # SGI C++ compiler will create directory out/ii_files/ for
12508   # template instantiation
12509   test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
12510   $RM out/* && rmdir out
12511   cd ..
12512   $RM -r conftest
12513   $RM conftest*
12514
12515fi
12516{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5
12517printf "%s\n" "$lt_cv_prog_compiler_c_o" >&6; }
12518
12519
12520
12521
12522hard_links=nottested
12523if test no = "$lt_cv_prog_compiler_c_o" && test no != "$need_locks"; then
12524  # do not overwrite the value of need_locks provided by the user
12525  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5
12526printf %s "checking if we can lock with hard links... " >&6; }
12527  hard_links=yes
12528  $RM conftest*
12529  ln conftest.a conftest.b 2>/dev/null && hard_links=no
12530  touch conftest.a
12531  ln conftest.a conftest.b 2>&5 || hard_links=no
12532  ln conftest.a conftest.b 2>/dev/null && hard_links=no
12533  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5
12534printf "%s\n" "$hard_links" >&6; }
12535  if test no = "$hard_links"; then
12536    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&5
12537printf "%s\n" "$as_me: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&2;}
12538    need_locks=warn
12539  fi
12540else
12541  need_locks=no
12542fi
12543
12544
12545
12546
12547
12548
12549  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5
12550printf %s "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; }
12551
12552  runpath_var=
12553  allow_undefined_flag=
12554  always_export_symbols=no
12555  archive_cmds=
12556  archive_expsym_cmds=
12557  compiler_needs_object=no
12558  enable_shared_with_static_runtimes=no
12559  export_dynamic_flag_spec=
12560  export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
12561  hardcode_automatic=no
12562  hardcode_direct=no
12563  hardcode_direct_absolute=no
12564  hardcode_libdir_flag_spec=
12565  hardcode_libdir_separator=
12566  hardcode_minus_L=no
12567  hardcode_shlibpath_var=unsupported
12568  inherit_rpath=no
12569  link_all_deplibs=unknown
12570  module_cmds=
12571  module_expsym_cmds=
12572  old_archive_from_new_cmds=
12573  old_archive_from_expsyms_cmds=
12574  thread_safe_flag_spec=
12575  whole_archive_flag_spec=
12576  # include_expsyms should be a list of space-separated symbols to be *always*
12577  # included in the symbol list
12578  include_expsyms=
12579  # exclude_expsyms can be an extended regexp of symbols to exclude
12580  # it will be wrapped by ' (' and ')$', so one must not match beginning or
12581  # end of line.  Example: 'a|bc|.*d.*' will exclude the symbols 'a' and 'bc',
12582  # as well as any symbol that contains 'd'.
12583  exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'
12584  # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
12585  # platforms (ab)use it in PIC code, but their linkers get confused if
12586  # the symbol is explicitly referenced.  Since portable code cannot
12587  # rely on this symbol name, it's probably fine to never include it in
12588  # preloaded symbol tables.
12589  # Exclude shared library initialization/finalization symbols.
12590  extract_expsyms_cmds=
12591
12592  case $host_os in
12593  cygwin* | mingw* | pw32* | cegcc*)
12594    # FIXME: the MSVC++ port hasn't been tested in a loooong time
12595    # When not using gcc, we currently assume that we are using
12596    # Microsoft Visual C++.
12597    if test yes != "$GCC"; then
12598      with_gnu_ld=no
12599    fi
12600    ;;
12601  interix*)
12602    # we just hope/assume this is gcc and not c89 (= MSVC++)
12603    with_gnu_ld=yes
12604    ;;
12605  openbsd* | bitrig*)
12606    with_gnu_ld=no
12607    ;;
12608  esac
12609
12610  ld_shlibs=yes
12611
12612  # On some targets, GNU ld is compatible enough with the native linker
12613  # that we're better off using the native interface for both.
12614  lt_use_gnu_ld_interface=no
12615  if test yes = "$with_gnu_ld"; then
12616    case $host_os in
12617      aix*)
12618	# The AIX port of GNU ld has always aspired to compatibility
12619	# with the native linker.  However, as the warning in the GNU ld
12620	# block says, versions before 2.19.5* couldn't really create working
12621	# shared libraries, regardless of the interface used.
12622	case `$LD -v 2>&1` in
12623	  *\ \(GNU\ Binutils\)\ 2.19.5*) ;;
12624	  *\ \(GNU\ Binutils\)\ 2.[2-9]*) ;;
12625	  *\ \(GNU\ Binutils\)\ [3-9]*) ;;
12626	  *)
12627	    lt_use_gnu_ld_interface=yes
12628	    ;;
12629	esac
12630	;;
12631      *)
12632	lt_use_gnu_ld_interface=yes
12633	;;
12634    esac
12635  fi
12636
12637  if test yes = "$lt_use_gnu_ld_interface"; then
12638    # If archive_cmds runs LD, not CC, wlarc should be empty
12639    wlarc='$wl'
12640
12641    # Set some defaults for GNU ld with shared library support. These
12642    # are reset later if shared libraries are not supported. Putting them
12643    # here allows them to be overridden if necessary.
12644    runpath_var=LD_RUN_PATH
12645    hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
12646    export_dynamic_flag_spec='$wl--export-dynamic'
12647    # ancient GNU ld didn't support --whole-archive et. al.
12648    if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
12649      whole_archive_flag_spec=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
12650    else
12651      whole_archive_flag_spec=
12652    fi
12653    supports_anon_versioning=no
12654    case `$LD -v | $SED -e 's/(^)\+)\s\+//' 2>&1` in
12655      *GNU\ gold*) supports_anon_versioning=yes ;;
12656      *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11
12657      *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
12658      *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
12659      *\ 2.11.*) ;; # other 2.11 versions
12660      *) supports_anon_versioning=yes ;;
12661    esac
12662
12663    # See if GNU ld supports shared libraries.
12664    case $host_os in
12665    aix[3-9]*)
12666      # On AIX/PPC, the GNU linker is very broken
12667      if test ia64 != "$host_cpu"; then
12668	ld_shlibs=no
12669	cat <<_LT_EOF 1>&2
12670
12671*** Warning: the GNU linker, at least up to release 2.19, is reported
12672*** to be unable to reliably create shared libraries on AIX.
12673*** Therefore, libtool is disabling shared libraries support.  If you
12674*** really care for shared libraries, you may want to install binutils
12675*** 2.20 or above, or modify your PATH so that a non-GNU linker is found.
12676*** You will then need to restart the configuration process.
12677
12678_LT_EOF
12679      fi
12680      ;;
12681
12682    amigaos*)
12683      case $host_cpu in
12684      powerpc)
12685            # see comment about AmigaOS4 .so support
12686            archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
12687            archive_expsym_cmds=''
12688        ;;
12689      m68k)
12690            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)'
12691            hardcode_libdir_flag_spec='-L$libdir'
12692            hardcode_minus_L=yes
12693        ;;
12694      esac
12695      ;;
12696
12697    beos*)
12698      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
12699	allow_undefined_flag=unsupported
12700	# Joseph Beckenbach <jrb3@best.com> says some releases of gcc
12701	# support --undefined.  This deserves some investigation.  FIXME
12702	archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
12703      else
12704	ld_shlibs=no
12705      fi
12706      ;;
12707
12708    cygwin* | mingw* | pw32* | cegcc*)
12709      # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless,
12710      # as there is no search path for DLLs.
12711      hardcode_libdir_flag_spec='-L$libdir'
12712      export_dynamic_flag_spec='$wl--export-all-symbols'
12713      allow_undefined_flag=unsupported
12714      always_export_symbols=no
12715      enable_shared_with_static_runtimes=yes
12716      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'
12717      exclude_expsyms='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'
12718
12719      if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
12720        archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
12721	# If the export-symbols file already is a .def file, use it as
12722	# is; otherwise, prepend EXPORTS...
12723	archive_expsym_cmds='if   test DEF = "`$SED -n     -e '\''s/^[	 ]*//'\''     -e '\''/^\(;.*\)*$/d'\''     -e '\''s/^\(EXPORTS\|LIBRARY\)\([	 ].*\)*$/DEF/p'\''     -e q     $export_symbols`" ; then
12724          cp $export_symbols $output_objdir/$soname.def;
12725        else
12726          echo EXPORTS > $output_objdir/$soname.def;
12727          cat $export_symbols >> $output_objdir/$soname.def;
12728        fi~
12729        $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
12730      else
12731	ld_shlibs=no
12732      fi
12733      ;;
12734
12735    haiku*)
12736      archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
12737      link_all_deplibs=yes
12738      ;;
12739
12740    os2*)
12741      hardcode_libdir_flag_spec='-L$libdir'
12742      hardcode_minus_L=yes
12743      allow_undefined_flag=unsupported
12744      shrext_cmds=.dll
12745      archive_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	emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
12750	$CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
12751	emximp -o $lib $output_objdir/$libname.def'
12752      archive_expsym_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
12753	$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
12754	$ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
12755	$ECHO EXPORTS >> $output_objdir/$libname.def~
12756	prefix_cmds="$SED"~
12757	if test EXPORTS = "`$SED 1q $export_symbols`"; then
12758	  prefix_cmds="$prefix_cmds -e 1d";
12759	fi~
12760	prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
12761	cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
12762	$CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
12763	emximp -o $lib $output_objdir/$libname.def'
12764      old_archive_From_new_cmds='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
12765      enable_shared_with_static_runtimes=yes
12766      ;;
12767
12768    interix[3-9]*)
12769      hardcode_direct=no
12770      hardcode_shlibpath_var=no
12771      hardcode_libdir_flag_spec='$wl-rpath,$libdir'
12772      export_dynamic_flag_spec='$wl-E'
12773      # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
12774      # Instead, shared libraries are loaded at an image base (0x10000000 by
12775      # default) and relocated if they conflict, which is a slow very memory
12776      # consuming and fragmenting process.  To avoid this, we pick a random,
12777      # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
12778      # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
12779      archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
12780      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'
12781      ;;
12782
12783    gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
12784      tmp_diet=no
12785      if test linux-dietlibc = "$host_os"; then
12786	case $cc_basename in
12787	  diet\ *) tmp_diet=yes;;	# linux-dietlibc with static linking (!diet-dyn)
12788	esac
12789      fi
12790      if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
12791	 && test no = "$tmp_diet"
12792      then
12793	tmp_addflag=' $pic_flag'
12794	tmp_sharedflag='-shared'
12795	case $cc_basename,$host_cpu in
12796        pgcc*)				# Portland Group C compiler
12797	  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'
12798	  tmp_addflag=' $pic_flag'
12799	  ;;
12800	pgf77* | pgf90* | pgf95* | pgfortran*)
12801					# Portland Group f77 and f90 compilers
12802	  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'
12803	  tmp_addflag=' $pic_flag -Mnomain' ;;
12804	ecc*,ia64* | icc*,ia64*)	# Intel C compiler on ia64
12805	  tmp_addflag=' -i_dynamic' ;;
12806	efc*,ia64* | ifort*,ia64*)	# Intel Fortran compiler on ia64
12807	  tmp_addflag=' -i_dynamic -nofor_main' ;;
12808	ifc* | ifort*)			# Intel Fortran compiler
12809	  tmp_addflag=' -nofor_main' ;;
12810	lf95*)				# Lahey Fortran 8.1
12811	  whole_archive_flag_spec=
12812	  tmp_sharedflag='--shared' ;;
12813        nagfor*)                        # NAGFOR 5.3
12814          tmp_sharedflag='-Wl,-shared' ;;
12815	xl[cC]* | bgxl[cC]* | mpixl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below)
12816	  tmp_sharedflag='-qmkshrobj'
12817	  tmp_addflag= ;;
12818	nvcc*)	# Cuda Compiler Driver 2.2
12819	  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'
12820	  compiler_needs_object=yes
12821	  ;;
12822	esac
12823	case `$CC -V 2>&1 | sed 5q` in
12824	*Sun\ C*)			# Sun C 5.9
12825	  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'
12826	  compiler_needs_object=yes
12827	  tmp_sharedflag='-G' ;;
12828	*Sun\ F*)			# Sun Fortran 8.3
12829	  tmp_sharedflag='-G' ;;
12830	esac
12831	archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
12832
12833        if test yes = "$supports_anon_versioning"; then
12834          archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~
12835            cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
12836            echo "local: *; };" >> $output_objdir/$libname.ver~
12837            $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib'
12838        fi
12839
12840	case $cc_basename in
12841	tcc*)
12842	  export_dynamic_flag_spec='-rdynamic'
12843	  ;;
12844	xlf* | bgf* | bgxlf* | mpixlf*)
12845	  # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
12846	  whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive'
12847	  hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
12848	  archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
12849	  if test yes = "$supports_anon_versioning"; then
12850	    archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~
12851              cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
12852              echo "local: *; };" >> $output_objdir/$libname.ver~
12853              $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
12854	  fi
12855	  ;;
12856	esac
12857      else
12858        ld_shlibs=no
12859      fi
12860      ;;
12861
12862    netbsd*)
12863      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
12864	archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
12865	wlarc=
12866      else
12867	archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
12868	archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
12869      fi
12870      ;;
12871
12872    solaris*)
12873      if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
12874	ld_shlibs=no
12875	cat <<_LT_EOF 1>&2
12876
12877*** Warning: The releases 2.8.* of the GNU linker cannot reliably
12878*** create shared libraries on Solaris systems.  Therefore, libtool
12879*** is disabling shared libraries support.  We urge you to upgrade GNU
12880*** binutils to release 2.9.1 or newer.  Another option is to modify
12881*** your PATH or compiler configuration so that the native linker is
12882*** used, and then restart.
12883
12884_LT_EOF
12885      elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
12886	archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
12887	archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
12888      else
12889	ld_shlibs=no
12890      fi
12891      ;;
12892
12893    sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
12894      case `$LD -v 2>&1` in
12895        *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*)
12896	ld_shlibs=no
12897	cat <<_LT_EOF 1>&2
12898
12899*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot
12900*** reliably create shared libraries on SCO systems.  Therefore, libtool
12901*** is disabling shared libraries support.  We urge you to upgrade GNU
12902*** binutils to release 2.16.91.0.3 or newer.  Another option is to modify
12903*** your PATH or compiler configuration so that the native linker is
12904*** used, and then restart.
12905
12906_LT_EOF
12907	;;
12908	*)
12909	  # For security reasons, it is highly recommended that you always
12910	  # use absolute paths for naming shared libraries, and exclude the
12911	  # DT_RUNPATH tag from executables and libraries.  But doing so
12912	  # requires that you compile everything twice, which is a pain.
12913	  if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
12914	    hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
12915	    archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
12916	    archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
12917	  else
12918	    ld_shlibs=no
12919	  fi
12920	;;
12921      esac
12922      ;;
12923
12924    sunos4*)
12925      archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
12926      wlarc=
12927      hardcode_direct=yes
12928      hardcode_shlibpath_var=no
12929      ;;
12930
12931    *)
12932      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
12933	archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
12934	archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
12935      else
12936	ld_shlibs=no
12937      fi
12938      ;;
12939    esac
12940
12941    if test no = "$ld_shlibs"; then
12942      runpath_var=
12943      hardcode_libdir_flag_spec=
12944      export_dynamic_flag_spec=
12945      whole_archive_flag_spec=
12946    fi
12947  else
12948    # PORTME fill in a description of your system's linker (not GNU ld)
12949    case $host_os in
12950    aix3*)
12951      allow_undefined_flag=unsupported
12952      always_export_symbols=yes
12953      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'
12954      # Note: this linker hardcodes the directories in LIBPATH if there
12955      # are no directories specified by -L.
12956      hardcode_minus_L=yes
12957      if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then
12958	# Neither direct hardcoding nor static linking is supported with a
12959	# broken collect2.
12960	hardcode_direct=unsupported
12961      fi
12962      ;;
12963
12964    aix[4-9]*)
12965      if test ia64 = "$host_cpu"; then
12966	# On IA64, the linker does run time linking by default, so we don't
12967	# have to do anything special.
12968	aix_use_runtimelinking=no
12969	exp_sym_flag='-Bexport'
12970	no_entry_flag=
12971      else
12972	# If we're using GNU nm, then we don't want the "-C" option.
12973	# -C means demangle to GNU nm, but means don't demangle to AIX nm.
12974	# Without the "-l" option, or with the "-B" option, AIX nm treats
12975	# weak defined symbols like other global defined symbols, whereas
12976	# GNU nm marks them as "W".
12977	# While the 'weak' keyword is ignored in the Export File, we need
12978	# it in the Import File for the 'aix-soname' feature, so we have
12979	# to replace the "-B" option with "-P" for AIX nm.
12980	if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
12981	  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'
12982	else
12983	  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'
12984	fi
12985	aix_use_runtimelinking=no
12986
12987	# Test if we are trying to use run time linking or normal
12988	# AIX style linking. If -brtl is somewhere in LDFLAGS, we
12989	# have runtime linking enabled, and use it for executables.
12990	# For shared libraries, we enable/disable runtime linking
12991	# depending on the kind of the shared library created -
12992	# when "with_aix_soname,aix_use_runtimelinking" is:
12993	# "aix,no"   lib.a(lib.so.V) shared, rtl:no,  for executables
12994	# "aix,yes"  lib.so          shared, rtl:yes, for executables
12995	#            lib.a           static archive
12996	# "both,no"  lib.so.V(shr.o) shared, rtl:yes
12997	#            lib.a(lib.so.V) shared, rtl:no,  for executables
12998	# "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables
12999	#            lib.a(lib.so.V) shared, rtl:no
13000	# "svr4,*"   lib.so.V(shr.o) shared, rtl:yes, for executables
13001	#            lib.a           static archive
13002	case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*)
13003	  for ld_flag in $LDFLAGS; do
13004	  if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then
13005	    aix_use_runtimelinking=yes
13006	    break
13007	  fi
13008	  done
13009	  if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then
13010	    # With aix-soname=svr4, we create the lib.so.V shared archives only,
13011	    # so we don't have lib.a shared libs to link our executables.
13012	    # We have to force runtime linking in this case.
13013	    aix_use_runtimelinking=yes
13014	    LDFLAGS="$LDFLAGS -Wl,-brtl"
13015	  fi
13016	  ;;
13017	esac
13018
13019	exp_sym_flag='-bexport'
13020	no_entry_flag='-bnoentry'
13021      fi
13022
13023      # When large executables or shared objects are built, AIX ld can
13024      # have problems creating the table of contents.  If linking a library
13025      # or program results in "error TOC overflow" add -mminimal-toc to
13026      # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
13027      # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
13028
13029      archive_cmds=''
13030      hardcode_direct=yes
13031      hardcode_direct_absolute=yes
13032      hardcode_libdir_separator=':'
13033      link_all_deplibs=yes
13034      file_list_spec='$wl-f,'
13035      case $with_aix_soname,$aix_use_runtimelinking in
13036      aix,*) ;; # traditional, no import file
13037      svr4,* | *,yes) # use import file
13038	# The Import File defines what to hardcode.
13039	hardcode_direct=no
13040	hardcode_direct_absolute=no
13041	;;
13042      esac
13043
13044      if test yes = "$GCC"; then
13045	case $host_os in aix4.[012]|aix4.[012].*)
13046	# We only want to do this on AIX 4.2 and lower, the check
13047	# below for broken collect2 doesn't work under 4.3+
13048	  collect2name=`$CC -print-prog-name=collect2`
13049	  if test -f "$collect2name" &&
13050	   strings "$collect2name" | $GREP resolve_lib_name >/dev/null
13051	  then
13052	  # We have reworked collect2
13053	  :
13054	  else
13055	  # We have old collect2
13056	  hardcode_direct=unsupported
13057	  # It fails to find uninstalled libraries when the uninstalled
13058	  # path is not listed in the libpath.  Setting hardcode_minus_L
13059	  # to unsupported forces relinking
13060	  hardcode_minus_L=yes
13061	  hardcode_libdir_flag_spec='-L$libdir'
13062	  hardcode_libdir_separator=
13063	  fi
13064	  ;;
13065	esac
13066	shared_flag='-shared'
13067	if test yes = "$aix_use_runtimelinking"; then
13068	  shared_flag="$shared_flag "'$wl-G'
13069	fi
13070	# Need to ensure runtime linking is disabled for the traditional
13071	# shared library, or the linker may eventually find shared libraries
13072	# /with/ Import File - we do not want to mix them.
13073	shared_flag_aix='-shared'
13074	shared_flag_svr4='-shared $wl-G'
13075      else
13076	# not using gcc
13077	if test ia64 = "$host_cpu"; then
13078	# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
13079	# chokes on -Wl,-G. The following line is correct:
13080	  shared_flag='-G'
13081	else
13082	  if test yes = "$aix_use_runtimelinking"; then
13083	    shared_flag='$wl-G'
13084	  else
13085	    shared_flag='$wl-bM:SRE'
13086	  fi
13087	  shared_flag_aix='$wl-bM:SRE'
13088	  shared_flag_svr4='$wl-G'
13089	fi
13090      fi
13091
13092      export_dynamic_flag_spec='$wl-bexpall'
13093      # It seems that -bexpall does not export symbols beginning with
13094      # underscore (_), so it is better to generate a list of symbols to export.
13095      always_export_symbols=yes
13096      if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then
13097	# Warning - without using the other runtime loading flags (-brtl),
13098	# -berok will link without error, but may produce a broken library.
13099	allow_undefined_flag='-berok'
13100        # Determine the default libpath from the value encoded in an
13101        # empty executable.
13102        if test set = "${lt_cv_aix_libpath+set}"; then
13103  aix_libpath=$lt_cv_aix_libpath
13104else
13105  if test ${lt_cv_aix_libpath_+y}
13106then :
13107  printf %s "(cached) " >&6
13108else $as_nop
13109  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13110/* end confdefs.h.  */
13111
13112int
13113main (void)
13114{
13115
13116  ;
13117  return 0;
13118}
13119_ACEOF
13120if ac_fn_c_try_link "$LINENO"
13121then :
13122
13123  lt_aix_libpath_sed='
13124      /Import File Strings/,/^$/ {
13125	  /^0/ {
13126	      s/^0  *\([^ ]*\) *$/\1/
13127	      p
13128	  }
13129      }'
13130  lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
13131  # Check for a 64-bit object if we didn't find anything.
13132  if test -z "$lt_cv_aix_libpath_"; then
13133    lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
13134  fi
13135fi
13136rm -f core conftest.err conftest.$ac_objext conftest.beam \
13137    conftest$ac_exeext conftest.$ac_ext
13138  if test -z "$lt_cv_aix_libpath_"; then
13139    lt_cv_aix_libpath_=/usr/lib:/lib
13140  fi
13141
13142fi
13143
13144  aix_libpath=$lt_cv_aix_libpath_
13145fi
13146
13147        hardcode_libdir_flag_spec='$wl-blibpath:$libdir:'"$aix_libpath"
13148        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
13149      else
13150	if test ia64 = "$host_cpu"; then
13151	  hardcode_libdir_flag_spec='$wl-R $libdir:/usr/lib:/lib'
13152	  allow_undefined_flag="-z nodefs"
13153	  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"
13154	else
13155	 # Determine the default libpath from the value encoded in an
13156	 # empty executable.
13157	 if test set = "${lt_cv_aix_libpath+set}"; then
13158  aix_libpath=$lt_cv_aix_libpath
13159else
13160  if test ${lt_cv_aix_libpath_+y}
13161then :
13162  printf %s "(cached) " >&6
13163else $as_nop
13164  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13165/* end confdefs.h.  */
13166
13167int
13168main (void)
13169{
13170
13171  ;
13172  return 0;
13173}
13174_ACEOF
13175if ac_fn_c_try_link "$LINENO"
13176then :
13177
13178  lt_aix_libpath_sed='
13179      /Import File Strings/,/^$/ {
13180	  /^0/ {
13181	      s/^0  *\([^ ]*\) *$/\1/
13182	      p
13183	  }
13184      }'
13185  lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
13186  # Check for a 64-bit object if we didn't find anything.
13187  if test -z "$lt_cv_aix_libpath_"; then
13188    lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
13189  fi
13190fi
13191rm -f core conftest.err conftest.$ac_objext conftest.beam \
13192    conftest$ac_exeext conftest.$ac_ext
13193  if test -z "$lt_cv_aix_libpath_"; then
13194    lt_cv_aix_libpath_=/usr/lib:/lib
13195  fi
13196
13197fi
13198
13199  aix_libpath=$lt_cv_aix_libpath_
13200fi
13201
13202	 hardcode_libdir_flag_spec='$wl-blibpath:$libdir:'"$aix_libpath"
13203	  # Warning - without using the other run time loading flags,
13204	  # -berok will link without error, but may produce a broken library.
13205	  no_undefined_flag=' $wl-bernotok'
13206	  allow_undefined_flag=' $wl-berok'
13207	  if test yes = "$with_gnu_ld"; then
13208	    # We only use this code for GNU lds that support --whole-archive.
13209	    whole_archive_flag_spec='$wl--whole-archive$convenience $wl--no-whole-archive'
13210	  else
13211	    # Exported symbols can be pulled into shared objects from archives
13212	    whole_archive_flag_spec='$convenience'
13213	  fi
13214	  archive_cmds_need_lc=yes
13215	  archive_expsym_cmds='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d'
13216	  # -brtl affects multiple linker settings, -berok does not and is overridden later
13217	  compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([, ]\\)%-berok\\1%g"`'
13218	  if test svr4 != "$with_aix_soname"; then
13219	    # This is similar to how AIX traditionally builds its shared libraries.
13220	    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'
13221	  fi
13222	  if test aix != "$with_aix_soname"; then
13223	    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'
13224	  else
13225	    # used by -dlpreopen to get the symbols
13226	    archive_expsym_cmds="$archive_expsym_cmds"'~$MV  $output_objdir/$realname.d/$soname $output_objdir'
13227	  fi
13228	  archive_expsym_cmds="$archive_expsym_cmds"'~$RM -r $output_objdir/$realname.d'
13229	fi
13230      fi
13231      ;;
13232
13233    amigaos*)
13234      case $host_cpu in
13235      powerpc)
13236            # see comment about AmigaOS4 .so support
13237            archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
13238            archive_expsym_cmds=''
13239        ;;
13240      m68k)
13241            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)'
13242            hardcode_libdir_flag_spec='-L$libdir'
13243            hardcode_minus_L=yes
13244        ;;
13245      esac
13246      ;;
13247
13248    bsdi[45]*)
13249      export_dynamic_flag_spec=-rdynamic
13250      ;;
13251
13252    cygwin* | mingw* | pw32* | cegcc*)
13253      # When not using gcc, we currently assume that we are using
13254      # Microsoft Visual C++.
13255      # hardcode_libdir_flag_spec is actually meaningless, as there is
13256      # no search path for DLLs.
13257      case $cc_basename in
13258      cl*)
13259	# Native MSVC
13260	hardcode_libdir_flag_spec=' '
13261	allow_undefined_flag=unsupported
13262	always_export_symbols=yes
13263	file_list_spec='@'
13264	# Tell ltmain to make .lib files, not .a files.
13265	libext=lib
13266	# Tell ltmain to make .dll files, not .so files.
13267	shrext_cmds=.dll
13268	# FIXME: Setting linknames here is a bad hack.
13269	archive_cmds='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames='
13270	archive_expsym_cmds='if   test DEF = "`$SED -n     -e '\''s/^[	 ]*//'\''     -e '\''/^\(;.*\)*$/d'\''     -e '\''s/^\(EXPORTS\|LIBRARY\)\([	 ].*\)*$/DEF/p'\''     -e q     $export_symbols`" ; then
13271            cp "$export_symbols" "$output_objdir/$soname.def";
13272            echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp";
13273          else
13274            $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp;
13275          fi~
13276          $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
13277          linknames='
13278	# The linker will not automatically build a static lib if we build a DLL.
13279	# _LT_TAGVAR(old_archive_from_new_cmds, )='true'
13280	enable_shared_with_static_runtimes=yes
13281	exclude_expsyms='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
13282	export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1,DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols'
13283	# Don't use ranlib
13284	old_postinstall_cmds='chmod 644 $oldlib'
13285	postlink_cmds='lt_outputfile="@OUTPUT@"~
13286          lt_tool_outputfile="@TOOL_OUTPUT@"~
13287          case $lt_outputfile in
13288            *.exe|*.EXE) ;;
13289            *)
13290              lt_outputfile=$lt_outputfile.exe
13291              lt_tool_outputfile=$lt_tool_outputfile.exe
13292              ;;
13293          esac~
13294          if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then
13295            $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
13296            $RM "$lt_outputfile.manifest";
13297          fi'
13298	;;
13299      *)
13300	# Assume MSVC wrapper
13301	hardcode_libdir_flag_spec=' '
13302	allow_undefined_flag=unsupported
13303	# Tell ltmain to make .lib files, not .a files.
13304	libext=lib
13305	# Tell ltmain to make .dll files, not .so files.
13306	shrext_cmds=.dll
13307	# FIXME: Setting linknames here is a bad hack.
13308	archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
13309	# The linker will automatically build a .lib file if we build a DLL.
13310	old_archive_from_new_cmds='true'
13311	# FIXME: Should let the user specify the lib program.
13312	old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs'
13313	enable_shared_with_static_runtimes=yes
13314	;;
13315      esac
13316      ;;
13317
13318    darwin* | rhapsody*)
13319
13320
13321  archive_cmds_need_lc=no
13322  hardcode_direct=no
13323  hardcode_automatic=yes
13324  hardcode_shlibpath_var=unsupported
13325  if test yes = "$lt_cv_ld_force_load"; then
13326    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\"`'
13327
13328  else
13329    whole_archive_flag_spec=''
13330  fi
13331  link_all_deplibs=yes
13332  allow_undefined_flag=$_lt_dar_allow_undefined
13333  case $cc_basename in
13334     ifort*|nagfor*) _lt_dar_can_shared=yes ;;
13335     *) _lt_dar_can_shared=$GCC ;;
13336  esac
13337  if test yes = "$_lt_dar_can_shared"; then
13338    output_verbose_link_cmd=func_echo_all
13339    archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dsymutil"
13340    module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil"
13341    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"
13342    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"
13343
13344  else
13345  ld_shlibs=no
13346  fi
13347
13348      ;;
13349
13350    dgux*)
13351      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
13352      hardcode_libdir_flag_spec='-L$libdir'
13353      hardcode_shlibpath_var=no
13354      ;;
13355
13356    # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
13357    # support.  Future versions do this automatically, but an explicit c++rt0.o
13358    # does not break anything, and helps significantly (at the cost of a little
13359    # extra space).
13360    freebsd2.2*)
13361      archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
13362      hardcode_libdir_flag_spec='-R$libdir'
13363      hardcode_direct=yes
13364      hardcode_shlibpath_var=no
13365      ;;
13366
13367    # Unfortunately, older versions of FreeBSD 2 do not have this feature.
13368    freebsd2.*)
13369      archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
13370      hardcode_direct=yes
13371      hardcode_minus_L=yes
13372      hardcode_shlibpath_var=no
13373      ;;
13374
13375    # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
13376    freebsd* | dragonfly*)
13377      archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
13378      hardcode_libdir_flag_spec='-R$libdir'
13379      hardcode_direct=yes
13380      hardcode_shlibpath_var=no
13381      ;;
13382
13383    hpux9*)
13384      if test yes = "$GCC"; then
13385	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'
13386      else
13387	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'
13388      fi
13389      hardcode_libdir_flag_spec='$wl+b $wl$libdir'
13390      hardcode_libdir_separator=:
13391      hardcode_direct=yes
13392
13393      # hardcode_minus_L: Not really in the search PATH,
13394      # but as the default location of the library.
13395      hardcode_minus_L=yes
13396      export_dynamic_flag_spec='$wl-E'
13397      ;;
13398
13399    hpux10*)
13400      if test yes,no = "$GCC,$with_gnu_ld"; then
13401	archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
13402      else
13403	archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
13404      fi
13405      if test no = "$with_gnu_ld"; then
13406	hardcode_libdir_flag_spec='$wl+b $wl$libdir'
13407	hardcode_libdir_separator=:
13408	hardcode_direct=yes
13409	hardcode_direct_absolute=yes
13410	export_dynamic_flag_spec='$wl-E'
13411	# hardcode_minus_L: Not really in the search PATH,
13412	# but as the default location of the library.
13413	hardcode_minus_L=yes
13414      fi
13415      ;;
13416
13417    hpux11*)
13418      if test yes,no = "$GCC,$with_gnu_ld"; then
13419	case $host_cpu in
13420	hppa*64*)
13421	  archive_cmds='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
13422	  ;;
13423	ia64*)
13424	  archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
13425	  ;;
13426	*)
13427	  archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
13428	  ;;
13429	esac
13430      else
13431	case $host_cpu in
13432	hppa*64*)
13433	  archive_cmds='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
13434	  ;;
13435	ia64*)
13436	  archive_cmds='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
13437	  ;;
13438	*)
13439
13440	  # Older versions of the 11.00 compiler do not understand -b yet
13441	  # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does)
13442	  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC understands -b" >&5
13443printf %s "checking if $CC understands -b... " >&6; }
13444if test ${lt_cv_prog_compiler__b+y}
13445then :
13446  printf %s "(cached) " >&6
13447else $as_nop
13448  lt_cv_prog_compiler__b=no
13449   save_LDFLAGS=$LDFLAGS
13450   LDFLAGS="$LDFLAGS -b"
13451   echo "$lt_simple_link_test_code" > conftest.$ac_ext
13452   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
13453     # The linker can only warn and ignore the option if not recognized
13454     # So say no if there are warnings
13455     if test -s conftest.err; then
13456       # Append any errors to the config.log.
13457       cat conftest.err 1>&5
13458       $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
13459       $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
13460       if diff conftest.exp conftest.er2 >/dev/null; then
13461         lt_cv_prog_compiler__b=yes
13462       fi
13463     else
13464       lt_cv_prog_compiler__b=yes
13465     fi
13466   fi
13467   $RM -r conftest*
13468   LDFLAGS=$save_LDFLAGS
13469
13470fi
13471{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler__b" >&5
13472printf "%s\n" "$lt_cv_prog_compiler__b" >&6; }
13473
13474if test yes = "$lt_cv_prog_compiler__b"; then
13475    archive_cmds='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
13476else
13477    archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
13478fi
13479
13480	  ;;
13481	esac
13482      fi
13483      if test no = "$with_gnu_ld"; then
13484	hardcode_libdir_flag_spec='$wl+b $wl$libdir'
13485	hardcode_libdir_separator=:
13486
13487	case $host_cpu in
13488	hppa*64*|ia64*)
13489	  hardcode_direct=no
13490	  hardcode_shlibpath_var=no
13491	  ;;
13492	*)
13493	  hardcode_direct=yes
13494	  hardcode_direct_absolute=yes
13495	  export_dynamic_flag_spec='$wl-E'
13496
13497	  # hardcode_minus_L: Not really in the search PATH,
13498	  # but as the default location of the library.
13499	  hardcode_minus_L=yes
13500	  ;;
13501	esac
13502      fi
13503      ;;
13504
13505    irix5* | irix6* | nonstopux*)
13506      if test yes = "$GCC"; then
13507	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'
13508	# Try to use the -exported_symbol ld option, if it does not
13509	# work, assume that -exports_file does not work either and
13510	# implicitly export all symbols.
13511	# This should be the same for all languages, so no per-tag cache variable.
13512	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5
13513printf %s "checking whether the $host_os linker accepts -exported_symbol... " >&6; }
13514if test ${lt_cv_irix_exported_symbol+y}
13515then :
13516  printf %s "(cached) " >&6
13517else $as_nop
13518  save_LDFLAGS=$LDFLAGS
13519	   LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null"
13520	   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13521/* end confdefs.h.  */
13522int foo (void) { return 0; }
13523_ACEOF
13524if ac_fn_c_try_link "$LINENO"
13525then :
13526  lt_cv_irix_exported_symbol=yes
13527else $as_nop
13528  lt_cv_irix_exported_symbol=no
13529fi
13530rm -f core conftest.err conftest.$ac_objext conftest.beam \
13531    conftest$ac_exeext conftest.$ac_ext
13532           LDFLAGS=$save_LDFLAGS
13533fi
13534{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5
13535printf "%s\n" "$lt_cv_irix_exported_symbol" >&6; }
13536	if test yes = "$lt_cv_irix_exported_symbol"; then
13537          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'
13538	fi
13539      else
13540	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'
13541	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'
13542      fi
13543      archive_cmds_need_lc='no'
13544      hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
13545      hardcode_libdir_separator=:
13546      inherit_rpath=yes
13547      link_all_deplibs=yes
13548      ;;
13549
13550    linux*)
13551      case $cc_basename in
13552      tcc*)
13553	# Fabrice Bellard et al's Tiny C Compiler
13554	ld_shlibs=yes
13555	archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
13556	;;
13557      esac
13558      ;;
13559
13560    netbsd*)
13561      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
13562	archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
13563      else
13564	archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
13565      fi
13566      hardcode_libdir_flag_spec='-R$libdir'
13567      hardcode_direct=yes
13568      hardcode_shlibpath_var=no
13569      ;;
13570
13571    newsos6)
13572      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
13573      hardcode_direct=yes
13574      hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
13575      hardcode_libdir_separator=:
13576      hardcode_shlibpath_var=no
13577      ;;
13578
13579    *nto* | *qnx*)
13580      ;;
13581
13582    openbsd* | bitrig*)
13583      if test -f /usr/libexec/ld.so; then
13584	hardcode_direct=yes
13585	hardcode_shlibpath_var=no
13586	hardcode_direct_absolute=yes
13587	if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
13588	  archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
13589	  archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols'
13590	  hardcode_libdir_flag_spec='$wl-rpath,$libdir'
13591	  export_dynamic_flag_spec='$wl-E'
13592	else
13593	  archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
13594	  hardcode_libdir_flag_spec='$wl-rpath,$libdir'
13595	fi
13596      else
13597	ld_shlibs=no
13598      fi
13599      ;;
13600
13601    os2*)
13602      hardcode_libdir_flag_spec='-L$libdir'
13603      hardcode_minus_L=yes
13604      allow_undefined_flag=unsupported
13605      shrext_cmds=.dll
13606      archive_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	emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
13611	$CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
13612	emximp -o $lib $output_objdir/$libname.def'
13613      archive_expsym_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
13614	$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
13615	$ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
13616	$ECHO EXPORTS >> $output_objdir/$libname.def~
13617	prefix_cmds="$SED"~
13618	if test EXPORTS = "`$SED 1q $export_symbols`"; then
13619	  prefix_cmds="$prefix_cmds -e 1d";
13620	fi~
13621	prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
13622	cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
13623	$CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
13624	emximp -o $lib $output_objdir/$libname.def'
13625      old_archive_From_new_cmds='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
13626      enable_shared_with_static_runtimes=yes
13627      ;;
13628
13629    osf3*)
13630      if test yes = "$GCC"; then
13631	allow_undefined_flag=' $wl-expect_unresolved $wl\*'
13632	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'
13633      else
13634	allow_undefined_flag=' -expect_unresolved \*'
13635	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'
13636      fi
13637      archive_cmds_need_lc='no'
13638      hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
13639      hardcode_libdir_separator=:
13640      ;;
13641
13642    osf4* | osf5*)	# as osf3* with the addition of -msym flag
13643      if test yes = "$GCC"; then
13644	allow_undefined_flag=' $wl-expect_unresolved $wl\*'
13645	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'
13646	hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
13647      else
13648	allow_undefined_flag=' -expect_unresolved \*'
13649	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'
13650	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~
13651          $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'
13652
13653	# Both c and cxx compiler support -rpath directly
13654	hardcode_libdir_flag_spec='-rpath $libdir'
13655      fi
13656      archive_cmds_need_lc='no'
13657      hardcode_libdir_separator=:
13658      ;;
13659
13660    solaris*)
13661      no_undefined_flag=' -z defs'
13662      if test yes = "$GCC"; then
13663	wlarc='$wl'
13664	archive_cmds='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
13665	archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
13666          $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'
13667      else
13668	case `$CC -V 2>&1` in
13669	*"Compilers 5.0"*)
13670	  wlarc=''
13671	  archive_cmds='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags'
13672	  archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
13673            $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
13674	  ;;
13675	*)
13676	  wlarc='$wl'
13677	  archive_cmds='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags'
13678	  archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
13679            $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
13680	  ;;
13681	esac
13682      fi
13683      hardcode_libdir_flag_spec='-R$libdir'
13684      hardcode_shlibpath_var=no
13685      case $host_os in
13686      solaris2.[0-5] | solaris2.[0-5].*) ;;
13687      *)
13688	# The compiler driver will combine and reorder linker options,
13689	# but understands '-z linker_flag'.  GCC discards it without '$wl',
13690	# but is careful enough not to reorder.
13691	# Supported since Solaris 2.6 (maybe 2.5.1?)
13692	if test yes = "$GCC"; then
13693	  whole_archive_flag_spec='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract'
13694	else
13695	  whole_archive_flag_spec='-z allextract$convenience -z defaultextract'
13696	fi
13697	;;
13698      esac
13699      link_all_deplibs=yes
13700      ;;
13701
13702    sunos4*)
13703      if test sequent = "$host_vendor"; then
13704	# Use $CC to link under sequent, because it throws in some extra .o
13705	# files that make .init and .fini sections work.
13706	archive_cmds='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags'
13707      else
13708	archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
13709      fi
13710      hardcode_libdir_flag_spec='-L$libdir'
13711      hardcode_direct=yes
13712      hardcode_minus_L=yes
13713      hardcode_shlibpath_var=no
13714      ;;
13715
13716    sysv4)
13717      case $host_vendor in
13718	sni)
13719	  archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
13720	  hardcode_direct=yes # is this really true???
13721	;;
13722	siemens)
13723	  ## LD is ld it makes a PLAMLIB
13724	  ## CC just makes a GrossModule.
13725	  archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
13726	  reload_cmds='$CC -r -o $output$reload_objs'
13727	  hardcode_direct=no
13728        ;;
13729	motorola)
13730	  archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
13731	  hardcode_direct=no #Motorola manual says yes, but my tests say they lie
13732	;;
13733      esac
13734      runpath_var='LD_RUN_PATH'
13735      hardcode_shlibpath_var=no
13736      ;;
13737
13738    sysv4.3*)
13739      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
13740      hardcode_shlibpath_var=no
13741      export_dynamic_flag_spec='-Bexport'
13742      ;;
13743
13744    sysv4*MP*)
13745      if test -d /usr/nec; then
13746	archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
13747	hardcode_shlibpath_var=no
13748	runpath_var=LD_RUN_PATH
13749	hardcode_runpath_var=yes
13750	ld_shlibs=yes
13751      fi
13752      ;;
13753
13754    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*)
13755      no_undefined_flag='$wl-z,text'
13756      archive_cmds_need_lc=no
13757      hardcode_shlibpath_var=no
13758      runpath_var='LD_RUN_PATH'
13759
13760      if test yes = "$GCC"; then
13761	archive_cmds='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
13762	archive_expsym_cmds='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
13763      else
13764	archive_cmds='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
13765	archive_expsym_cmds='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
13766      fi
13767      ;;
13768
13769    sysv5* | sco3.2v5* | sco5v6*)
13770      # Note: We CANNOT use -z defs as we might desire, because we do not
13771      # link with -lc, and that would cause any symbols used from libc to
13772      # always be unresolved, which means just about no library would
13773      # ever link correctly.  If we're not using GNU ld we use -z text
13774      # though, which does catch some bad symbols but isn't as heavy-handed
13775      # as -z defs.
13776      no_undefined_flag='$wl-z,text'
13777      allow_undefined_flag='$wl-z,nodefs'
13778      archive_cmds_need_lc=no
13779      hardcode_shlibpath_var=no
13780      hardcode_libdir_flag_spec='$wl-R,$libdir'
13781      hardcode_libdir_separator=':'
13782      link_all_deplibs=yes
13783      export_dynamic_flag_spec='$wl-Bexport'
13784      runpath_var='LD_RUN_PATH'
13785
13786      if test yes = "$GCC"; then
13787	archive_cmds='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
13788	archive_expsym_cmds='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
13789      else
13790	archive_cmds='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
13791	archive_expsym_cmds='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
13792      fi
13793      ;;
13794
13795    uts4*)
13796      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
13797      hardcode_libdir_flag_spec='-L$libdir'
13798      hardcode_shlibpath_var=no
13799      ;;
13800
13801    *)
13802      ld_shlibs=no
13803      ;;
13804    esac
13805
13806    if test sni = "$host_vendor"; then
13807      case $host in
13808      sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
13809	export_dynamic_flag_spec='$wl-Blargedynsym'
13810	;;
13811      esac
13812    fi
13813  fi
13814
13815{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5
13816printf "%s\n" "$ld_shlibs" >&6; }
13817test no = "$ld_shlibs" && can_build_shared=no
13818
13819with_gnu_ld=$with_gnu_ld
13820
13821
13822
13823
13824
13825
13826
13827
13828
13829
13830
13831
13832
13833
13834
13835#
13836# Do we need to explicitly link libc?
13837#
13838case "x$archive_cmds_need_lc" in
13839x|xyes)
13840  # Assume -lc should be added
13841  archive_cmds_need_lc=yes
13842
13843  if test yes,yes = "$GCC,$enable_shared"; then
13844    case $archive_cmds in
13845    *'~'*)
13846      # FIXME: we may have to deal with multi-command sequences.
13847      ;;
13848    '$CC '*)
13849      # Test whether the compiler implicitly links with -lc since on some
13850      # systems, -lgcc has to come before -lc. If gcc already passes -lc
13851      # to ld, don't add -lc before -lgcc.
13852      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5
13853printf %s "checking whether -lc should be explicitly linked in... " >&6; }
13854if test ${lt_cv_archive_cmds_need_lc+y}
13855then :
13856  printf %s "(cached) " >&6
13857else $as_nop
13858  $RM conftest*
13859	echo "$lt_simple_compile_test_code" > conftest.$ac_ext
13860
13861	if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
13862  (eval $ac_compile) 2>&5
13863  ac_status=$?
13864  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
13865  test $ac_status = 0; } 2>conftest.err; then
13866	  soname=conftest
13867	  lib=conftest
13868	  libobjs=conftest.$ac_objext
13869	  deplibs=
13870	  wl=$lt_prog_compiler_wl
13871	  pic_flag=$lt_prog_compiler_pic
13872	  compiler_flags=-v
13873	  linker_flags=-v
13874	  verstring=
13875	  output_objdir=.
13876	  libname=conftest
13877	  lt_save_allow_undefined_flag=$allow_undefined_flag
13878	  allow_undefined_flag=
13879	  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5
13880  (eval $archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5
13881  ac_status=$?
13882  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
13883  test $ac_status = 0; }
13884	  then
13885	    lt_cv_archive_cmds_need_lc=no
13886	  else
13887	    lt_cv_archive_cmds_need_lc=yes
13888	  fi
13889	  allow_undefined_flag=$lt_save_allow_undefined_flag
13890	else
13891	  cat conftest.err 1>&5
13892	fi
13893	$RM conftest*
13894
13895fi
13896{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc" >&5
13897printf "%s\n" "$lt_cv_archive_cmds_need_lc" >&6; }
13898      archive_cmds_need_lc=$lt_cv_archive_cmds_need_lc
13899      ;;
13900    esac
13901  fi
13902  ;;
13903esac
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
14050
14051
14052
14053
14054
14055
14056  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5
14057printf %s "checking dynamic linker characteristics... " >&6; }
14058
14059if test yes = "$GCC"; then
14060  case $host_os in
14061    darwin*) lt_awk_arg='/^libraries:/,/LR/' ;;
14062    *) lt_awk_arg='/^libraries:/' ;;
14063  esac
14064  case $host_os in
14065    mingw* | cegcc*) lt_sed_strip_eq='s|=\([A-Za-z]:\)|\1|g' ;;
14066    *) lt_sed_strip_eq='s|=/|/|g' ;;
14067  esac
14068  lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq`
14069  case $lt_search_path_spec in
14070  *\;*)
14071    # if the path contains ";" then we assume it to be the separator
14072    # otherwise default to the standard path separator (i.e. ":") - it is
14073    # assumed that no part of a normal pathname contains ";" but that should
14074    # okay in the real world where ";" in dirpaths is itself problematic.
14075    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'`
14076    ;;
14077  *)
14078    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"`
14079    ;;
14080  esac
14081  # Ok, now we have the path, separated by spaces, we can step through it
14082  # and add multilib dir if necessary...
14083  lt_tmp_lt_search_path_spec=
14084  lt_multi_os_dir=/`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
14085  # ...but if some path component already ends with the multilib dir we assume
14086  # that all is fine and trust -print-search-dirs as is (GCC 4.2? or newer).
14087  case "$lt_multi_os_dir; $lt_search_path_spec " in
14088  "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*)
14089    lt_multi_os_dir=
14090    ;;
14091  esac
14092  for lt_sys_path in $lt_search_path_spec; do
14093    if test -d "$lt_sys_path$lt_multi_os_dir"; then
14094      lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path$lt_multi_os_dir"
14095    elif test -n "$lt_multi_os_dir"; then
14096      test -d "$lt_sys_path" && \
14097	lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
14098    fi
14099  done
14100  lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk '
14101BEGIN {RS = " "; FS = "/|\n";} {
14102  lt_foo = "";
14103  lt_count = 0;
14104  for (lt_i = NF; lt_i > 0; lt_i--) {
14105    if ($lt_i != "" && $lt_i != ".") {
14106      if ($lt_i == "..") {
14107        lt_count++;
14108      } else {
14109        if (lt_count == 0) {
14110          lt_foo = "/" $lt_i lt_foo;
14111        } else {
14112          lt_count--;
14113        }
14114      }
14115    }
14116  }
14117  if (lt_foo != "") { lt_freq[lt_foo]++; }
14118  if (lt_freq[lt_foo] == 1) { print lt_foo; }
14119}'`
14120  # AWK program above erroneously prepends '/' to C:/dos/paths
14121  # for these hosts.
14122  case $host_os in
14123    mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\
14124      $SED 's|/\([A-Za-z]:\)|\1|g'` ;;
14125  esac
14126  sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP`
14127else
14128  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
14129fi
14130library_names_spec=
14131libname_spec='lib$name'
14132soname_spec=
14133shrext_cmds=.so
14134postinstall_cmds=
14135postuninstall_cmds=
14136finish_cmds=
14137finish_eval=
14138shlibpath_var=
14139shlibpath_overrides_runpath=unknown
14140version_type=none
14141dynamic_linker="$host_os ld.so"
14142sys_lib_dlsearch_path_spec="/lib /usr/lib"
14143need_lib_prefix=unknown
14144hardcode_into_libs=no
14145
14146# when you set need_version to no, make sure it does not cause -set_version
14147# flags to be left without arguments
14148need_version=unknown
14149
14150
14151
14152case $host_os in
14153aix3*)
14154  version_type=linux # correct to gnu/linux during the next big refactor
14155  library_names_spec='$libname$release$shared_ext$versuffix $libname.a'
14156  shlibpath_var=LIBPATH
14157
14158  # AIX 3 has no versioning support, so we append a major version to the name.
14159  soname_spec='$libname$release$shared_ext$major'
14160  ;;
14161
14162aix[4-9]*)
14163  version_type=linux # correct to gnu/linux during the next big refactor
14164  need_lib_prefix=no
14165  need_version=no
14166  hardcode_into_libs=yes
14167  if test ia64 = "$host_cpu"; then
14168    # AIX 5 supports IA64
14169    library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext'
14170    shlibpath_var=LD_LIBRARY_PATH
14171  else
14172    # With GCC up to 2.95.x, collect2 would create an import file
14173    # for dependence libraries.  The import file would start with
14174    # the line '#! .'.  This would cause the generated library to
14175    # depend on '.', always an invalid library.  This was fixed in
14176    # development snapshots of GCC prior to 3.0.
14177    case $host_os in
14178      aix4 | aix4.[01] | aix4.[01].*)
14179      if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
14180	   echo ' yes '
14181	   echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then
14182	:
14183      else
14184	can_build_shared=no
14185      fi
14186      ;;
14187    esac
14188    # Using Import Files as archive members, it is possible to support
14189    # filename-based versioning of shared library archives on AIX. While
14190    # this would work for both with and without runtime linking, it will
14191    # prevent static linking of such archives. So we do filename-based
14192    # shared library versioning with .so extension only, which is used
14193    # when both runtime linking and shared linking is enabled.
14194    # Unfortunately, runtime linking may impact performance, so we do
14195    # not want this to be the default eventually. Also, we use the
14196    # versioned .so libs for executables only if there is the -brtl
14197    # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only.
14198    # To allow for filename-based versioning support, we need to create
14199    # libNAME.so.V as an archive file, containing:
14200    # *) an Import File, referring to the versioned filename of the
14201    #    archive as well as the shared archive member, telling the
14202    #    bitwidth (32 or 64) of that shared object, and providing the
14203    #    list of exported symbols of that shared object, eventually
14204    #    decorated with the 'weak' keyword
14205    # *) the shared object with the F_LOADONLY flag set, to really avoid
14206    #    it being seen by the linker.
14207    # At run time we better use the real file rather than another symlink,
14208    # but for link time we create the symlink libNAME.so -> libNAME.so.V
14209
14210    case $with_aix_soname,$aix_use_runtimelinking in
14211    # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct
14212    # soname into executable. Probably we can add versioning support to
14213    # collect2, so additional links can be useful in future.
14214    aix,yes) # traditional libtool
14215      dynamic_linker='AIX unversionable lib.so'
14216      # If using run time linking (on AIX 4.2 or later) use lib<name>.so
14217      # instead of lib<name>.a to let people know that these are not
14218      # typical AIX shared libraries.
14219      library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
14220      ;;
14221    aix,no) # traditional AIX only
14222      dynamic_linker='AIX lib.a(lib.so.V)'
14223      # We preserve .a as extension for shared libraries through AIX4.2
14224      # and later when we are not doing run time linking.
14225      library_names_spec='$libname$release.a $libname.a'
14226      soname_spec='$libname$release$shared_ext$major'
14227      ;;
14228    svr4,*) # full svr4 only
14229      dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o)"
14230      library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
14231      # We do not specify a path in Import Files, so LIBPATH fires.
14232      shlibpath_overrides_runpath=yes
14233      ;;
14234    *,yes) # both, prefer svr4
14235      dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o), lib.a(lib.so.V)"
14236      library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
14237      # unpreferred sharedlib libNAME.a needs extra handling
14238      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"'
14239      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"'
14240      # We do not specify a path in Import Files, so LIBPATH fires.
14241      shlibpath_overrides_runpath=yes
14242      ;;
14243    *,no) # both, prefer aix
14244      dynamic_linker="AIX lib.a(lib.so.V), lib.so.V($shared_archive_member_spec.o)"
14245      library_names_spec='$libname$release.a $libname.a'
14246      soname_spec='$libname$release$shared_ext$major'
14247      # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling
14248      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)'
14249      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"'
14250      ;;
14251    esac
14252    shlibpath_var=LIBPATH
14253  fi
14254  ;;
14255
14256amigaos*)
14257  case $host_cpu in
14258  powerpc)
14259    # Since July 2007 AmigaOS4 officially supports .so libraries.
14260    # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
14261    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
14262    ;;
14263  m68k)
14264    library_names_spec='$libname.ixlibrary $libname.a'
14265    # Create ${libname}_ixlibrary.a entries in /sys/libs.
14266    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'
14267    ;;
14268  esac
14269  ;;
14270
14271beos*)
14272  library_names_spec='$libname$shared_ext'
14273  dynamic_linker="$host_os ld.so"
14274  shlibpath_var=LIBRARY_PATH
14275  ;;
14276
14277bsdi[45]*)
14278  version_type=linux # correct to gnu/linux during the next big refactor
14279  need_version=no
14280  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
14281  soname_spec='$libname$release$shared_ext$major'
14282  finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
14283  shlibpath_var=LD_LIBRARY_PATH
14284  sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
14285  sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
14286  # the default ld.so.conf also contains /usr/contrib/lib and
14287  # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
14288  # libtool to hard-code these into programs
14289  ;;
14290
14291cygwin* | mingw* | pw32* | cegcc*)
14292  version_type=windows
14293  shrext_cmds=.dll
14294  need_version=no
14295  need_lib_prefix=no
14296
14297  case $GCC,$cc_basename in
14298  yes,*)
14299    # gcc
14300    library_names_spec='$libname.dll.a'
14301    # DLL is installed to $(libdir)/../bin by postinstall_cmds
14302    postinstall_cmds='base_file=`basename \$file`~
14303      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
14304      dldir=$destdir/`dirname \$dlpath`~
14305      test -d \$dldir || mkdir -p \$dldir~
14306      $install_prog $dir/$dlname \$dldir/$dlname~
14307      chmod a+x \$dldir/$dlname~
14308      if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
14309        eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
14310      fi'
14311    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
14312      dlpath=$dir/\$dldll~
14313       $RM \$dlpath'
14314    shlibpath_overrides_runpath=yes
14315
14316    case $host_os in
14317    cygwin*)
14318      # Cygwin DLLs use 'cyg' prefix rather than 'lib'
14319      soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
14320
14321      sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"
14322      ;;
14323    mingw* | cegcc*)
14324      # MinGW DLLs use traditional 'lib' prefix
14325      soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
14326      ;;
14327    pw32*)
14328      # pw32 DLLs use 'pw' prefix rather than 'lib'
14329      library_names_spec='`echo $libname | sed -e 's/^lib/pw/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
14330      ;;
14331    esac
14332    dynamic_linker='Win32 ld.exe'
14333    ;;
14334
14335  *,cl*)
14336    # Native MSVC
14337    libname_spec='$name'
14338    soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
14339    library_names_spec='$libname.dll.lib'
14340
14341    case $build_os in
14342    mingw*)
14343      sys_lib_search_path_spec=
14344      lt_save_ifs=$IFS
14345      IFS=';'
14346      for lt_path in $LIB
14347      do
14348        IFS=$lt_save_ifs
14349        # Let DOS variable expansion print the short 8.3 style file name.
14350        lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"`
14351        sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path"
14352      done
14353      IFS=$lt_save_ifs
14354      # Convert to MSYS style.
14355      sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'`
14356      ;;
14357    cygwin*)
14358      # Convert to unix form, then to dos form, then back to unix form
14359      # but this time dos style (no spaces!) so that the unix form looks
14360      # like /cygdrive/c/PROGRA~1:/cygdr...
14361      sys_lib_search_path_spec=`cygpath --path --unix "$LIB"`
14362      sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null`
14363      sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
14364      ;;
14365    *)
14366      sys_lib_search_path_spec=$LIB
14367      if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then
14368        # It is most probably a Windows format PATH.
14369        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
14370      else
14371        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
14372      fi
14373      # FIXME: find the short name or the path components, as spaces are
14374      # common. (e.g. "Program Files" -> "PROGRA~1")
14375      ;;
14376    esac
14377
14378    # DLL is installed to $(libdir)/../bin by postinstall_cmds
14379    postinstall_cmds='base_file=`basename \$file`~
14380      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
14381      dldir=$destdir/`dirname \$dlpath`~
14382      test -d \$dldir || mkdir -p \$dldir~
14383      $install_prog $dir/$dlname \$dldir/$dlname'
14384    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
14385      dlpath=$dir/\$dldll~
14386       $RM \$dlpath'
14387    shlibpath_overrides_runpath=yes
14388    dynamic_linker='Win32 link.exe'
14389    ;;
14390
14391  *)
14392    # Assume MSVC wrapper
14393    library_names_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext $libname.lib'
14394    dynamic_linker='Win32 ld.exe'
14395    ;;
14396  esac
14397  # FIXME: first we should search . and the directory the executable is in
14398  shlibpath_var=PATH
14399  ;;
14400
14401darwin* | rhapsody*)
14402  dynamic_linker="$host_os dyld"
14403  version_type=darwin
14404  need_lib_prefix=no
14405  need_version=no
14406  library_names_spec='$libname$release$major$shared_ext $libname$shared_ext'
14407  soname_spec='$libname$release$major$shared_ext'
14408  shlibpath_overrides_runpath=yes
14409  shlibpath_var=DYLD_LIBRARY_PATH
14410  shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
14411
14412  sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"
14413  sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
14414  ;;
14415
14416dgux*)
14417  version_type=linux # correct to gnu/linux during the next big refactor
14418  need_lib_prefix=no
14419  need_version=no
14420  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
14421  soname_spec='$libname$release$shared_ext$major'
14422  shlibpath_var=LD_LIBRARY_PATH
14423  ;;
14424
14425freebsd* | dragonfly*)
14426  # DragonFly does not have aout.  When/if they implement a new
14427  # versioning mechanism, adjust this.
14428  if test -x /usr/bin/objformat; then
14429    objformat=`/usr/bin/objformat`
14430  else
14431    case $host_os in
14432    freebsd[23].*) objformat=aout ;;
14433    *) objformat=elf ;;
14434    esac
14435  fi
14436  version_type=freebsd-$objformat
14437  case $version_type in
14438    freebsd-elf*)
14439      library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
14440      soname_spec='$libname$release$shared_ext$major'
14441      need_version=no
14442      need_lib_prefix=no
14443      ;;
14444    freebsd-*)
14445      library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
14446      need_version=yes
14447      ;;
14448  esac
14449  shlibpath_var=LD_LIBRARY_PATH
14450  case $host_os in
14451  freebsd2.*)
14452    shlibpath_overrides_runpath=yes
14453    ;;
14454  freebsd3.[01]* | freebsdelf3.[01]*)
14455    shlibpath_overrides_runpath=yes
14456    hardcode_into_libs=yes
14457    ;;
14458  freebsd3.[2-9]* | freebsdelf3.[2-9]* | \
14459  freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1)
14460    shlibpath_overrides_runpath=no
14461    hardcode_into_libs=yes
14462    ;;
14463  *) # from 4.6 on, and DragonFly
14464    shlibpath_overrides_runpath=yes
14465    hardcode_into_libs=yes
14466    ;;
14467  esac
14468  ;;
14469
14470haiku*)
14471  version_type=linux # correct to gnu/linux during the next big refactor
14472  need_lib_prefix=no
14473  need_version=no
14474  dynamic_linker="$host_os runtime_loader"
14475  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
14476  soname_spec='$libname$release$shared_ext$major'
14477  shlibpath_var=LIBRARY_PATH
14478  shlibpath_overrides_runpath=no
14479  sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
14480  hardcode_into_libs=yes
14481  ;;
14482
14483hpux9* | hpux10* | hpux11*)
14484  # Give a soname corresponding to the major version so that dld.sl refuses to
14485  # link against other versions.
14486  version_type=sunos
14487  need_lib_prefix=no
14488  need_version=no
14489  case $host_cpu in
14490  ia64*)
14491    shrext_cmds='.so'
14492    hardcode_into_libs=yes
14493    dynamic_linker="$host_os dld.so"
14494    shlibpath_var=LD_LIBRARY_PATH
14495    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
14496    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
14497    soname_spec='$libname$release$shared_ext$major'
14498    if test 32 = "$HPUX_IA64_MODE"; then
14499      sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
14500      sys_lib_dlsearch_path_spec=/usr/lib/hpux32
14501    else
14502      sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
14503      sys_lib_dlsearch_path_spec=/usr/lib/hpux64
14504    fi
14505    ;;
14506  hppa*64*)
14507    shrext_cmds='.sl'
14508    hardcode_into_libs=yes
14509    dynamic_linker="$host_os dld.sl"
14510    shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
14511    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
14512    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
14513    soname_spec='$libname$release$shared_ext$major'
14514    sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
14515    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
14516    ;;
14517  *)
14518    shrext_cmds='.sl'
14519    dynamic_linker="$host_os dld.sl"
14520    shlibpath_var=SHLIB_PATH
14521    shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
14522    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
14523    soname_spec='$libname$release$shared_ext$major'
14524    ;;
14525  esac
14526  # HP-UX runs *really* slowly unless shared libraries are mode 555, ...
14527  postinstall_cmds='chmod 555 $lib'
14528  # or fails outright, so override atomically:
14529  install_override_mode=555
14530  ;;
14531
14532interix[3-9]*)
14533  version_type=linux # correct to gnu/linux during the next big refactor
14534  need_lib_prefix=no
14535  need_version=no
14536  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
14537  soname_spec='$libname$release$shared_ext$major'
14538  dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
14539  shlibpath_var=LD_LIBRARY_PATH
14540  shlibpath_overrides_runpath=no
14541  hardcode_into_libs=yes
14542  ;;
14543
14544irix5* | irix6* | nonstopux*)
14545  case $host_os in
14546    nonstopux*) version_type=nonstopux ;;
14547    *)
14548	if test yes = "$lt_cv_prog_gnu_ld"; then
14549		version_type=linux # correct to gnu/linux during the next big refactor
14550	else
14551		version_type=irix
14552	fi ;;
14553  esac
14554  need_lib_prefix=no
14555  need_version=no
14556  soname_spec='$libname$release$shared_ext$major'
14557  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext'
14558  case $host_os in
14559  irix5* | nonstopux*)
14560    libsuff= shlibsuff=
14561    ;;
14562  *)
14563    case $LD in # libtool.m4 will add one of these switches to LD
14564    *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
14565      libsuff= shlibsuff= libmagic=32-bit;;
14566    *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
14567      libsuff=32 shlibsuff=N32 libmagic=N32;;
14568    *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
14569      libsuff=64 shlibsuff=64 libmagic=64-bit;;
14570    *) libsuff= shlibsuff= libmagic=never-match;;
14571    esac
14572    ;;
14573  esac
14574  shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
14575  shlibpath_overrides_runpath=no
14576  sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff"
14577  sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff"
14578  hardcode_into_libs=yes
14579  ;;
14580
14581# No shared lib support for Linux oldld, aout, or coff.
14582linux*oldld* | linux*aout* | linux*coff*)
14583  dynamic_linker=no
14584  ;;
14585
14586linux*android*)
14587  version_type=none # Android doesn't support versioned libraries.
14588  need_lib_prefix=no
14589  need_version=no
14590  library_names_spec='$libname$release$shared_ext'
14591  soname_spec='$libname$release$shared_ext'
14592  finish_cmds=
14593  shlibpath_var=LD_LIBRARY_PATH
14594  shlibpath_overrides_runpath=yes
14595
14596  # This implies no fast_install, which is unacceptable.
14597  # Some rework will be needed to allow for fast_install
14598  # before this can be enabled.
14599  hardcode_into_libs=yes
14600
14601  dynamic_linker='Android linker'
14602  # Don't embed -rpath directories since the linker doesn't support them.
14603  hardcode_libdir_flag_spec='-L$libdir'
14604  ;;
14605
14606# This must be glibc/ELF.
14607linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
14608  version_type=linux # correct to gnu/linux during the next big refactor
14609  need_lib_prefix=no
14610  need_version=no
14611  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
14612  soname_spec='$libname$release$shared_ext$major'
14613  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
14614  shlibpath_var=LD_LIBRARY_PATH
14615  shlibpath_overrides_runpath=no
14616
14617  # Some binutils ld are patched to set DT_RUNPATH
14618  if test ${lt_cv_shlibpath_overrides_runpath+y}
14619then :
14620  printf %s "(cached) " >&6
14621else $as_nop
14622  lt_cv_shlibpath_overrides_runpath=no
14623    save_LDFLAGS=$LDFLAGS
14624    save_libdir=$libdir
14625    eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \
14626	 LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\""
14627    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14628/* end confdefs.h.  */
14629
14630int
14631main (void)
14632{
14633
14634  ;
14635  return 0;
14636}
14637_ACEOF
14638if ac_fn_c_try_link "$LINENO"
14639then :
14640  if  ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null
14641then :
14642  lt_cv_shlibpath_overrides_runpath=yes
14643fi
14644fi
14645rm -f core conftest.err conftest.$ac_objext conftest.beam \
14646    conftest$ac_exeext conftest.$ac_ext
14647    LDFLAGS=$save_LDFLAGS
14648    libdir=$save_libdir
14649
14650fi
14651
14652  shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
14653
14654  # This implies no fast_install, which is unacceptable.
14655  # Some rework will be needed to allow for fast_install
14656  # before this can be enabled.
14657  hardcode_into_libs=yes
14658
14659  # Add ABI-specific directories to the system library path.
14660  sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib"
14661
14662  # Ideally, we could use ldconfig to report *all* directores which are
14663  # searched for libraries, however this is still not possible.  Aside from not
14664  # being certain /sbin/ldconfig is available, command
14665  # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64,
14666  # even though it is searched at run-time.  Try to do the best guess by
14667  # appending ld.so.conf contents (and includes) to the search path.
14668  if test -f /etc/ld.so.conf; then
14669    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' ' '`
14670    sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra"
14671  fi
14672
14673  # We used to test for /lib/ld.so.1 and disable shared libraries on
14674  # powerpc, because MkLinux only supported shared libraries with the
14675  # GNU dynamic linker.  Since this was broken with cross compilers,
14676  # most powerpc-linux boxes support dynamic linking these days and
14677  # people can always --disable-shared, the test was removed, and we
14678  # assume the GNU/Linux dynamic linker is in use.
14679  dynamic_linker='GNU/Linux ld.so'
14680  ;;
14681
14682netbsd*)
14683  version_type=sunos
14684  need_lib_prefix=no
14685  need_version=no
14686  if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
14687    library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
14688    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
14689    dynamic_linker='NetBSD (a.out) ld.so'
14690  else
14691    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
14692    soname_spec='$libname$release$shared_ext$major'
14693    dynamic_linker='NetBSD ld.elf_so'
14694  fi
14695  shlibpath_var=LD_LIBRARY_PATH
14696  shlibpath_overrides_runpath=yes
14697  hardcode_into_libs=yes
14698  ;;
14699
14700newsos6)
14701  version_type=linux # correct to gnu/linux during the next big refactor
14702  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
14703  shlibpath_var=LD_LIBRARY_PATH
14704  shlibpath_overrides_runpath=yes
14705  ;;
14706
14707*nto* | *qnx*)
14708  version_type=qnx
14709  need_lib_prefix=no
14710  need_version=no
14711  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
14712  soname_spec='$libname$release$shared_ext$major'
14713  shlibpath_var=LD_LIBRARY_PATH
14714  shlibpath_overrides_runpath=no
14715  hardcode_into_libs=yes
14716  dynamic_linker='ldqnx.so'
14717  ;;
14718
14719openbsd* | bitrig*)
14720  version_type=sunos
14721  sys_lib_dlsearch_path_spec=/usr/lib
14722  need_lib_prefix=no
14723  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
14724    need_version=no
14725  else
14726    need_version=yes
14727  fi
14728  library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
14729  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
14730  shlibpath_var=LD_LIBRARY_PATH
14731  shlibpath_overrides_runpath=yes
14732  ;;
14733
14734os2*)
14735  libname_spec='$name'
14736  version_type=windows
14737  shrext_cmds=.dll
14738  need_version=no
14739  need_lib_prefix=no
14740  # OS/2 can only load a DLL with a base name of 8 characters or less.
14741  soname_spec='`test -n "$os2dllname" && libname="$os2dllname";
14742    v=$($ECHO $release$versuffix | tr -d .-);
14743    n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _);
14744    $ECHO $n$v`$shared_ext'
14745  library_names_spec='${libname}_dll.$libext'
14746  dynamic_linker='OS/2 ld.exe'
14747  shlibpath_var=BEGINLIBPATH
14748  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
14749  sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
14750  postinstall_cmds='base_file=`basename \$file`~
14751    dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~
14752    dldir=$destdir/`dirname \$dlpath`~
14753    test -d \$dldir || mkdir -p \$dldir~
14754    $install_prog $dir/$dlname \$dldir/$dlname~
14755    chmod a+x \$dldir/$dlname~
14756    if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
14757      eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
14758    fi'
14759  postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~
14760    dlpath=$dir/\$dldll~
14761    $RM \$dlpath'
14762  ;;
14763
14764osf3* | osf4* | osf5*)
14765  version_type=osf
14766  need_lib_prefix=no
14767  need_version=no
14768  soname_spec='$libname$release$shared_ext$major'
14769  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
14770  shlibpath_var=LD_LIBRARY_PATH
14771  sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
14772  sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
14773  ;;
14774
14775rdos*)
14776  dynamic_linker=no
14777  ;;
14778
14779solaris*)
14780  version_type=linux # correct to gnu/linux during the next big refactor
14781  need_lib_prefix=no
14782  need_version=no
14783  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
14784  soname_spec='$libname$release$shared_ext$major'
14785  shlibpath_var=LD_LIBRARY_PATH
14786  shlibpath_overrides_runpath=yes
14787  hardcode_into_libs=yes
14788  # ldd complains unless libraries are executable
14789  postinstall_cmds='chmod +x $lib'
14790  ;;
14791
14792sunos4*)
14793  version_type=sunos
14794  library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
14795  finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
14796  shlibpath_var=LD_LIBRARY_PATH
14797  shlibpath_overrides_runpath=yes
14798  if test yes = "$with_gnu_ld"; then
14799    need_lib_prefix=no
14800  fi
14801  need_version=yes
14802  ;;
14803
14804sysv4 | sysv4.3*)
14805  version_type=linux # correct to gnu/linux during the next big refactor
14806  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
14807  soname_spec='$libname$release$shared_ext$major'
14808  shlibpath_var=LD_LIBRARY_PATH
14809  case $host_vendor in
14810    sni)
14811      shlibpath_overrides_runpath=no
14812      need_lib_prefix=no
14813      runpath_var=LD_RUN_PATH
14814      ;;
14815    siemens)
14816      need_lib_prefix=no
14817      ;;
14818    motorola)
14819      need_lib_prefix=no
14820      need_version=no
14821      shlibpath_overrides_runpath=no
14822      sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
14823      ;;
14824  esac
14825  ;;
14826
14827sysv4*MP*)
14828  if test -d /usr/nec; then
14829    version_type=linux # correct to gnu/linux during the next big refactor
14830    library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext'
14831    soname_spec='$libname$shared_ext.$major'
14832    shlibpath_var=LD_LIBRARY_PATH
14833  fi
14834  ;;
14835
14836sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
14837  version_type=sco
14838  need_lib_prefix=no
14839  need_version=no
14840  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext'
14841  soname_spec='$libname$release$shared_ext$major'
14842  shlibpath_var=LD_LIBRARY_PATH
14843  shlibpath_overrides_runpath=yes
14844  hardcode_into_libs=yes
14845  if test yes = "$with_gnu_ld"; then
14846    sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
14847  else
14848    sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
14849    case $host_os in
14850      sco3.2v5*)
14851        sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
14852	;;
14853    esac
14854  fi
14855  sys_lib_dlsearch_path_spec='/usr/lib'
14856  ;;
14857
14858tpf*)
14859  # TPF is a cross-target only.  Preferred cross-host = GNU/Linux.
14860  version_type=linux # correct to gnu/linux during the next big refactor
14861  need_lib_prefix=no
14862  need_version=no
14863  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
14864  shlibpath_var=LD_LIBRARY_PATH
14865  shlibpath_overrides_runpath=no
14866  hardcode_into_libs=yes
14867  ;;
14868
14869uts4*)
14870  version_type=linux # correct to gnu/linux during the next big refactor
14871  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
14872  soname_spec='$libname$release$shared_ext$major'
14873  shlibpath_var=LD_LIBRARY_PATH
14874  ;;
14875
14876*)
14877  dynamic_linker=no
14878  ;;
14879esac
14880{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5
14881printf "%s\n" "$dynamic_linker" >&6; }
14882test no = "$dynamic_linker" && can_build_shared=no
14883
14884variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
14885if test yes = "$GCC"; then
14886  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
14887fi
14888
14889if test set = "${lt_cv_sys_lib_search_path_spec+set}"; then
14890  sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec
14891fi
14892
14893if test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then
14894  sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec
14895fi
14896
14897# remember unaugmented sys_lib_dlsearch_path content for libtool script decls...
14898configure_time_dlsearch_path=$sys_lib_dlsearch_path_spec
14899
14900# ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code
14901func_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH"
14902
14903# to be used as default LT_SYS_LIBRARY_PATH value in generated libtool
14904configure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH
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
14996
14997
14998
14999
15000
15001
15002  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5
15003printf %s "checking how to hardcode library paths into programs... " >&6; }
15004hardcode_action=
15005if test -n "$hardcode_libdir_flag_spec" ||
15006   test -n "$runpath_var" ||
15007   test yes = "$hardcode_automatic"; then
15008
15009  # We can hardcode non-existent directories.
15010  if test no != "$hardcode_direct" &&
15011     # If the only mechanism to avoid hardcoding is shlibpath_var, we
15012     # have to relink, otherwise we might link with an installed library
15013     # when we should be linking with a yet-to-be-installed one
15014     ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, )" &&
15015     test no != "$hardcode_minus_L"; then
15016    # Linking always hardcodes the temporary library directory.
15017    hardcode_action=relink
15018  else
15019    # We can link without hardcoding, and we can hardcode nonexisting dirs.
15020    hardcode_action=immediate
15021  fi
15022else
15023  # We cannot hardcode anything, or else we can only hardcode existing
15024  # directories.
15025  hardcode_action=unsupported
15026fi
15027{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5
15028printf "%s\n" "$hardcode_action" >&6; }
15029
15030if test relink = "$hardcode_action" ||
15031   test yes = "$inherit_rpath"; then
15032  # Fast installation is not supported
15033  enable_fast_install=no
15034elif test yes = "$shlibpath_overrides_runpath" ||
15035     test no = "$enable_shared"; then
15036  # Fast installation is not necessary
15037  enable_fast_install=needless
15038fi
15039
15040
15041
15042
15043
15044
15045  if test yes != "$enable_dlopen"; then
15046  enable_dlopen=unknown
15047  enable_dlopen_self=unknown
15048  enable_dlopen_self_static=unknown
15049else
15050  lt_cv_dlopen=no
15051  lt_cv_dlopen_libs=
15052
15053  case $host_os in
15054  beos*)
15055    lt_cv_dlopen=load_add_on
15056    lt_cv_dlopen_libs=
15057    lt_cv_dlopen_self=yes
15058    ;;
15059
15060  mingw* | pw32* | cegcc*)
15061    lt_cv_dlopen=LoadLibrary
15062    lt_cv_dlopen_libs=
15063    ;;
15064
15065  cygwin*)
15066    lt_cv_dlopen=dlopen
15067    lt_cv_dlopen_libs=
15068    ;;
15069
15070  darwin*)
15071    # if libdl is installed we need to link against it
15072    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
15073printf %s "checking for dlopen in -ldl... " >&6; }
15074if test ${ac_cv_lib_dl_dlopen+y}
15075then :
15076  printf %s "(cached) " >&6
15077else $as_nop
15078  ac_check_lib_save_LIBS=$LIBS
15079LIBS="-ldl  $LIBS"
15080cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15081/* end confdefs.h.  */
15082
15083/* Override any GCC internal prototype to avoid an error.
15084   Use char because int might match the return type of a GCC
15085   builtin and then its argument prototype would still apply.  */
15086char dlopen ();
15087int
15088main (void)
15089{
15090return dlopen ();
15091  ;
15092  return 0;
15093}
15094_ACEOF
15095if ac_fn_c_try_link "$LINENO"
15096then :
15097  ac_cv_lib_dl_dlopen=yes
15098else $as_nop
15099  ac_cv_lib_dl_dlopen=no
15100fi
15101rm -f core conftest.err conftest.$ac_objext conftest.beam \
15102    conftest$ac_exeext conftest.$ac_ext
15103LIBS=$ac_check_lib_save_LIBS
15104fi
15105{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
15106printf "%s\n" "$ac_cv_lib_dl_dlopen" >&6; }
15107if test "x$ac_cv_lib_dl_dlopen" = xyes
15108then :
15109  lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl
15110else $as_nop
15111
15112    lt_cv_dlopen=dyld
15113    lt_cv_dlopen_libs=
15114    lt_cv_dlopen_self=yes
15115
15116fi
15117
15118    ;;
15119
15120  tpf*)
15121    # Don't try to run any link tests for TPF.  We know it's impossible
15122    # because TPF is a cross-compiler, and we know how we open DSOs.
15123    lt_cv_dlopen=dlopen
15124    lt_cv_dlopen_libs=
15125    lt_cv_dlopen_self=no
15126    ;;
15127
15128  *)
15129    ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load"
15130if test "x$ac_cv_func_shl_load" = xyes
15131then :
15132  lt_cv_dlopen=shl_load
15133else $as_nop
15134  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
15135printf %s "checking for shl_load in -ldld... " >&6; }
15136if test ${ac_cv_lib_dld_shl_load+y}
15137then :
15138  printf %s "(cached) " >&6
15139else $as_nop
15140  ac_check_lib_save_LIBS=$LIBS
15141LIBS="-ldld  $LIBS"
15142cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15143/* end confdefs.h.  */
15144
15145/* Override any GCC internal prototype to avoid an error.
15146   Use char because int might match the return type of a GCC
15147   builtin and then its argument prototype would still apply.  */
15148char shl_load ();
15149int
15150main (void)
15151{
15152return shl_load ();
15153  ;
15154  return 0;
15155}
15156_ACEOF
15157if ac_fn_c_try_link "$LINENO"
15158then :
15159  ac_cv_lib_dld_shl_load=yes
15160else $as_nop
15161  ac_cv_lib_dld_shl_load=no
15162fi
15163rm -f core conftest.err conftest.$ac_objext conftest.beam \
15164    conftest$ac_exeext conftest.$ac_ext
15165LIBS=$ac_check_lib_save_LIBS
15166fi
15167{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
15168printf "%s\n" "$ac_cv_lib_dld_shl_load" >&6; }
15169if test "x$ac_cv_lib_dld_shl_load" = xyes
15170then :
15171  lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld
15172else $as_nop
15173  ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
15174if test "x$ac_cv_func_dlopen" = xyes
15175then :
15176  lt_cv_dlopen=dlopen
15177else $as_nop
15178  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
15179printf %s "checking for dlopen in -ldl... " >&6; }
15180if test ${ac_cv_lib_dl_dlopen+y}
15181then :
15182  printf %s "(cached) " >&6
15183else $as_nop
15184  ac_check_lib_save_LIBS=$LIBS
15185LIBS="-ldl  $LIBS"
15186cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15187/* end confdefs.h.  */
15188
15189/* Override any GCC internal prototype to avoid an error.
15190   Use char because int might match the return type of a GCC
15191   builtin and then its argument prototype would still apply.  */
15192char dlopen ();
15193int
15194main (void)
15195{
15196return dlopen ();
15197  ;
15198  return 0;
15199}
15200_ACEOF
15201if ac_fn_c_try_link "$LINENO"
15202then :
15203  ac_cv_lib_dl_dlopen=yes
15204else $as_nop
15205  ac_cv_lib_dl_dlopen=no
15206fi
15207rm -f core conftest.err conftest.$ac_objext conftest.beam \
15208    conftest$ac_exeext conftest.$ac_ext
15209LIBS=$ac_check_lib_save_LIBS
15210fi
15211{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
15212printf "%s\n" "$ac_cv_lib_dl_dlopen" >&6; }
15213if test "x$ac_cv_lib_dl_dlopen" = xyes
15214then :
15215  lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl
15216else $as_nop
15217  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5
15218printf %s "checking for dlopen in -lsvld... " >&6; }
15219if test ${ac_cv_lib_svld_dlopen+y}
15220then :
15221  printf %s "(cached) " >&6
15222else $as_nop
15223  ac_check_lib_save_LIBS=$LIBS
15224LIBS="-lsvld  $LIBS"
15225cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15226/* end confdefs.h.  */
15227
15228/* Override any GCC internal prototype to avoid an error.
15229   Use char because int might match the return type of a GCC
15230   builtin and then its argument prototype would still apply.  */
15231char dlopen ();
15232int
15233main (void)
15234{
15235return dlopen ();
15236  ;
15237  return 0;
15238}
15239_ACEOF
15240if ac_fn_c_try_link "$LINENO"
15241then :
15242  ac_cv_lib_svld_dlopen=yes
15243else $as_nop
15244  ac_cv_lib_svld_dlopen=no
15245fi
15246rm -f core conftest.err conftest.$ac_objext conftest.beam \
15247    conftest$ac_exeext conftest.$ac_ext
15248LIBS=$ac_check_lib_save_LIBS
15249fi
15250{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5
15251printf "%s\n" "$ac_cv_lib_svld_dlopen" >&6; }
15252if test "x$ac_cv_lib_svld_dlopen" = xyes
15253then :
15254  lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld
15255else $as_nop
15256  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5
15257printf %s "checking for dld_link in -ldld... " >&6; }
15258if test ${ac_cv_lib_dld_dld_link+y}
15259then :
15260  printf %s "(cached) " >&6
15261else $as_nop
15262  ac_check_lib_save_LIBS=$LIBS
15263LIBS="-ldld  $LIBS"
15264cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15265/* end confdefs.h.  */
15266
15267/* Override any GCC internal prototype to avoid an error.
15268   Use char because int might match the return type of a GCC
15269   builtin and then its argument prototype would still apply.  */
15270char dld_link ();
15271int
15272main (void)
15273{
15274return dld_link ();
15275  ;
15276  return 0;
15277}
15278_ACEOF
15279if ac_fn_c_try_link "$LINENO"
15280then :
15281  ac_cv_lib_dld_dld_link=yes
15282else $as_nop
15283  ac_cv_lib_dld_dld_link=no
15284fi
15285rm -f core conftest.err conftest.$ac_objext conftest.beam \
15286    conftest$ac_exeext conftest.$ac_ext
15287LIBS=$ac_check_lib_save_LIBS
15288fi
15289{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5
15290printf "%s\n" "$ac_cv_lib_dld_dld_link" >&6; }
15291if test "x$ac_cv_lib_dld_dld_link" = xyes
15292then :
15293  lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld
15294fi
15295
15296
15297fi
15298
15299
15300fi
15301
15302
15303fi
15304
15305
15306fi
15307
15308
15309fi
15310
15311    ;;
15312  esac
15313
15314  if test no = "$lt_cv_dlopen"; then
15315    enable_dlopen=no
15316  else
15317    enable_dlopen=yes
15318  fi
15319
15320  case $lt_cv_dlopen in
15321  dlopen)
15322    save_CPPFLAGS=$CPPFLAGS
15323    test yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
15324
15325    save_LDFLAGS=$LDFLAGS
15326    wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
15327
15328    save_LIBS=$LIBS
15329    LIBS="$lt_cv_dlopen_libs $LIBS"
15330
15331    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5
15332printf %s "checking whether a program can dlopen itself... " >&6; }
15333if test ${lt_cv_dlopen_self+y}
15334then :
15335  printf %s "(cached) " >&6
15336else $as_nop
15337  	  if test yes = "$cross_compiling"; then :
15338  lt_cv_dlopen_self=cross
15339else
15340  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
15341  lt_status=$lt_dlunknown
15342  cat > conftest.$ac_ext <<_LT_EOF
15343#line $LINENO "configure"
15344#include "confdefs.h"
15345
15346#if HAVE_DLFCN_H
15347#include <dlfcn.h>
15348#endif
15349
15350#include <stdio.h>
15351
15352#ifdef RTLD_GLOBAL
15353#  define LT_DLGLOBAL		RTLD_GLOBAL
15354#else
15355#  ifdef DL_GLOBAL
15356#    define LT_DLGLOBAL		DL_GLOBAL
15357#  else
15358#    define LT_DLGLOBAL		0
15359#  endif
15360#endif
15361
15362/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
15363   find out it does not work in some platform. */
15364#ifndef LT_DLLAZY_OR_NOW
15365#  ifdef RTLD_LAZY
15366#    define LT_DLLAZY_OR_NOW		RTLD_LAZY
15367#  else
15368#    ifdef DL_LAZY
15369#      define LT_DLLAZY_OR_NOW		DL_LAZY
15370#    else
15371#      ifdef RTLD_NOW
15372#        define LT_DLLAZY_OR_NOW	RTLD_NOW
15373#      else
15374#        ifdef DL_NOW
15375#          define LT_DLLAZY_OR_NOW	DL_NOW
15376#        else
15377#          define LT_DLLAZY_OR_NOW	0
15378#        endif
15379#      endif
15380#    endif
15381#  endif
15382#endif
15383
15384/* When -fvisibility=hidden is used, assume the code has been annotated
15385   correspondingly for the symbols needed.  */
15386#if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
15387int fnord () __attribute__((visibility("default")));
15388#endif
15389
15390int fnord () { return 42; }
15391int main ()
15392{
15393  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
15394  int status = $lt_dlunknown;
15395
15396  if (self)
15397    {
15398      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
15399      else
15400        {
15401	  if (dlsym( self,"_fnord"))  status = $lt_dlneed_uscore;
15402          else puts (dlerror ());
15403	}
15404      /* dlclose (self); */
15405    }
15406  else
15407    puts (dlerror ());
15408
15409  return status;
15410}
15411_LT_EOF
15412  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
15413  (eval $ac_link) 2>&5
15414  ac_status=$?
15415  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
15416  test $ac_status = 0; } && test -s "conftest$ac_exeext" 2>/dev/null; then
15417    (./conftest; exit; ) >&5 2>/dev/null
15418    lt_status=$?
15419    case x$lt_status in
15420      x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;;
15421      x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;;
15422      x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;;
15423    esac
15424  else :
15425    # compilation failed
15426    lt_cv_dlopen_self=no
15427  fi
15428fi
15429rm -fr conftest*
15430
15431
15432fi
15433{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5
15434printf "%s\n" "$lt_cv_dlopen_self" >&6; }
15435
15436    if test yes = "$lt_cv_dlopen_self"; then
15437      wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
15438      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5
15439printf %s "checking whether a statically linked program can dlopen itself... " >&6; }
15440if test ${lt_cv_dlopen_self_static+y}
15441then :
15442  printf %s "(cached) " >&6
15443else $as_nop
15444  	  if test yes = "$cross_compiling"; then :
15445  lt_cv_dlopen_self_static=cross
15446else
15447  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
15448  lt_status=$lt_dlunknown
15449  cat > conftest.$ac_ext <<_LT_EOF
15450#line $LINENO "configure"
15451#include "confdefs.h"
15452
15453#if HAVE_DLFCN_H
15454#include <dlfcn.h>
15455#endif
15456
15457#include <stdio.h>
15458
15459#ifdef RTLD_GLOBAL
15460#  define LT_DLGLOBAL		RTLD_GLOBAL
15461#else
15462#  ifdef DL_GLOBAL
15463#    define LT_DLGLOBAL		DL_GLOBAL
15464#  else
15465#    define LT_DLGLOBAL		0
15466#  endif
15467#endif
15468
15469/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
15470   find out it does not work in some platform. */
15471#ifndef LT_DLLAZY_OR_NOW
15472#  ifdef RTLD_LAZY
15473#    define LT_DLLAZY_OR_NOW		RTLD_LAZY
15474#  else
15475#    ifdef DL_LAZY
15476#      define LT_DLLAZY_OR_NOW		DL_LAZY
15477#    else
15478#      ifdef RTLD_NOW
15479#        define LT_DLLAZY_OR_NOW	RTLD_NOW
15480#      else
15481#        ifdef DL_NOW
15482#          define LT_DLLAZY_OR_NOW	DL_NOW
15483#        else
15484#          define LT_DLLAZY_OR_NOW	0
15485#        endif
15486#      endif
15487#    endif
15488#  endif
15489#endif
15490
15491/* When -fvisibility=hidden is used, assume the code has been annotated
15492   correspondingly for the symbols needed.  */
15493#if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
15494int fnord () __attribute__((visibility("default")));
15495#endif
15496
15497int fnord () { return 42; }
15498int main ()
15499{
15500  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
15501  int status = $lt_dlunknown;
15502
15503  if (self)
15504    {
15505      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
15506      else
15507        {
15508	  if (dlsym( self,"_fnord"))  status = $lt_dlneed_uscore;
15509          else puts (dlerror ());
15510	}
15511      /* dlclose (self); */
15512    }
15513  else
15514    puts (dlerror ());
15515
15516  return status;
15517}
15518_LT_EOF
15519  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
15520  (eval $ac_link) 2>&5
15521  ac_status=$?
15522  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
15523  test $ac_status = 0; } && test -s "conftest$ac_exeext" 2>/dev/null; then
15524    (./conftest; exit; ) >&5 2>/dev/null
15525    lt_status=$?
15526    case x$lt_status in
15527      x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;;
15528      x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;;
15529      x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;;
15530    esac
15531  else :
15532    # compilation failed
15533    lt_cv_dlopen_self_static=no
15534  fi
15535fi
15536rm -fr conftest*
15537
15538
15539fi
15540{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self_static" >&5
15541printf "%s\n" "$lt_cv_dlopen_self_static" >&6; }
15542    fi
15543
15544    CPPFLAGS=$save_CPPFLAGS
15545    LDFLAGS=$save_LDFLAGS
15546    LIBS=$save_LIBS
15547    ;;
15548  esac
15549
15550  case $lt_cv_dlopen_self in
15551  yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
15552  *) enable_dlopen_self=unknown ;;
15553  esac
15554
15555  case $lt_cv_dlopen_self_static in
15556  yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
15557  *) enable_dlopen_self_static=unknown ;;
15558  esac
15559fi
15560
15561
15562
15563
15564
15565
15566
15567
15568
15569
15570
15571
15572
15573
15574
15575
15576
15577striplib=
15578old_striplib=
15579{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5
15580printf %s "checking whether stripping libraries is possible... " >&6; }
15581if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
15582  test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
15583  test -z "$striplib" && striplib="$STRIP --strip-unneeded"
15584  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15585printf "%s\n" "yes" >&6; }
15586else
15587# FIXME - insert some real tests, host_os isn't really good enough
15588  case $host_os in
15589  darwin*)
15590    if test -n "$STRIP"; then
15591      striplib="$STRIP -x"
15592      old_striplib="$STRIP -S"
15593      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15594printf "%s\n" "yes" >&6; }
15595    else
15596      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
15597printf "%s\n" "no" >&6; }
15598    fi
15599    ;;
15600  *)
15601    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
15602printf "%s\n" "no" >&6; }
15603    ;;
15604  esac
15605fi
15606
15607
15608
15609
15610
15611
15612
15613
15614
15615
15616
15617
15618  # Report what library types will actually be built
15619  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5
15620printf %s "checking if libtool supports shared libraries... " >&6; }
15621  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5
15622printf "%s\n" "$can_build_shared" >&6; }
15623
15624  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5
15625printf %s "checking whether to build shared libraries... " >&6; }
15626  test no = "$can_build_shared" && enable_shared=no
15627
15628  # On AIX, shared libraries and static libraries use the same namespace, and
15629  # are all built from PIC.
15630  case $host_os in
15631  aix3*)
15632    test yes = "$enable_shared" && enable_static=no
15633    if test -n "$RANLIB"; then
15634      archive_cmds="$archive_cmds~\$RANLIB \$lib"
15635      postinstall_cmds='$RANLIB $lib'
15636    fi
15637    ;;
15638
15639  aix[4-9]*)
15640    if test ia64 != "$host_cpu"; then
15641      case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in
15642      yes,aix,yes) ;;			# shared object as lib.so file only
15643      yes,svr4,*) ;;			# shared object as lib.so archive member only
15644      yes,*) enable_static=no ;;	# shared object in lib.a archive as well
15645      esac
15646    fi
15647    ;;
15648  esac
15649  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
15650printf "%s\n" "$enable_shared" >&6; }
15651
15652  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5
15653printf %s "checking whether to build static libraries... " >&6; }
15654  # Make sure either enable_shared or enable_static is yes.
15655  test yes = "$enable_shared" || enable_static=yes
15656  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5
15657printf "%s\n" "$enable_static" >&6; }
15658
15659
15660
15661
15662fi
15663ac_ext=c
15664ac_cpp='$CPP $CPPFLAGS'
15665ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15666ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15667ac_compiler_gnu=$ac_cv_c_compiler_gnu
15668
15669CC=$lt_save_CC
15670
15671
15672
15673
15674
15675
15676
15677
15678
15679
15680
15681
15682
15683
15684
15685        ac_config_commands="$ac_config_commands libtool"
15686
15687
15688
15689
15690# Only expand once:
15691
15692
15693
15694
15695# pkg-config is only needed for these options, do not require it otherwise
15696if test "$enable_systemd" = "yes" -o "$enable_dnstap" = "yes" -o "$with_pyunbound" = "yes" -o "$with_pythonmod" = "yes"; then
15697
15698
15699
15700
15701
15702
15703
15704if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
15705	if test -n "$ac_tool_prefix"; then
15706  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
15707set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
15708{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15709printf %s "checking for $ac_word... " >&6; }
15710if test ${ac_cv_path_PKG_CONFIG+y}
15711then :
15712  printf %s "(cached) " >&6
15713else $as_nop
15714  case $PKG_CONFIG in
15715  [\\/]* | ?:[\\/]*)
15716  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
15717  ;;
15718  *)
15719  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15720for as_dir in $PATH
15721do
15722  IFS=$as_save_IFS
15723  case $as_dir in #(((
15724    '') as_dir=./ ;;
15725    */) ;;
15726    *) as_dir=$as_dir/ ;;
15727  esac
15728    for ac_exec_ext in '' $ac_executable_extensions; do
15729  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
15730    ac_cv_path_PKG_CONFIG="$as_dir$ac_word$ac_exec_ext"
15731    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
15732    break 2
15733  fi
15734done
15735  done
15736IFS=$as_save_IFS
15737
15738  ;;
15739esac
15740fi
15741PKG_CONFIG=$ac_cv_path_PKG_CONFIG
15742if test -n "$PKG_CONFIG"; then
15743  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
15744printf "%s\n" "$PKG_CONFIG" >&6; }
15745else
15746  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
15747printf "%s\n" "no" >&6; }
15748fi
15749
15750
15751fi
15752if test -z "$ac_cv_path_PKG_CONFIG"; then
15753  ac_pt_PKG_CONFIG=$PKG_CONFIG
15754  # Extract the first word of "pkg-config", so it can be a program name with args.
15755set dummy pkg-config; ac_word=$2
15756{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15757printf %s "checking for $ac_word... " >&6; }
15758if test ${ac_cv_path_ac_pt_PKG_CONFIG+y}
15759then :
15760  printf %s "(cached) " >&6
15761else $as_nop
15762  case $ac_pt_PKG_CONFIG in
15763  [\\/]* | ?:[\\/]*)
15764  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
15765  ;;
15766  *)
15767  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15768for as_dir in $PATH
15769do
15770  IFS=$as_save_IFS
15771  case $as_dir in #(((
15772    '') as_dir=./ ;;
15773    */) ;;
15774    *) as_dir=$as_dir/ ;;
15775  esac
15776    for ac_exec_ext in '' $ac_executable_extensions; do
15777  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
15778    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir$ac_word$ac_exec_ext"
15779    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
15780    break 2
15781  fi
15782done
15783  done
15784IFS=$as_save_IFS
15785
15786  ;;
15787esac
15788fi
15789ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
15790if test -n "$ac_pt_PKG_CONFIG"; then
15791  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
15792printf "%s\n" "$ac_pt_PKG_CONFIG" >&6; }
15793else
15794  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
15795printf "%s\n" "no" >&6; }
15796fi
15797
15798  if test "x$ac_pt_PKG_CONFIG" = x; then
15799    PKG_CONFIG=""
15800  else
15801    case $cross_compiling:$ac_tool_warned in
15802yes:)
15803{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
15804printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
15805ac_tool_warned=yes ;;
15806esac
15807    PKG_CONFIG=$ac_pt_PKG_CONFIG
15808  fi
15809else
15810  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
15811fi
15812
15813fi
15814if test -n "$PKG_CONFIG"; then
15815	_pkg_min_version=0.9.0
15816	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
15817printf %s "checking pkg-config is at least version $_pkg_min_version... " >&6; }
15818	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
15819		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15820printf "%s\n" "yes" >&6; }
15821	else
15822		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
15823printf "%s\n" "no" >&6; }
15824		PKG_CONFIG=""
15825	fi
15826fi
15827fi
15828
15829# Checks for header files.
15830ac_fn_c_check_header_compile "$LINENO" "stdarg.h" "ac_cv_header_stdarg_h" "$ac_includes_default
15831"
15832if test "x$ac_cv_header_stdarg_h" = xyes
15833then :
15834  printf "%s\n" "#define HAVE_STDARG_H 1" >>confdefs.h
15835
15836fi
15837ac_fn_c_check_header_compile "$LINENO" "stdbool.h" "ac_cv_header_stdbool_h" "$ac_includes_default
15838"
15839if test "x$ac_cv_header_stdbool_h" = xyes
15840then :
15841  printf "%s\n" "#define HAVE_STDBOOL_H 1" >>confdefs.h
15842
15843fi
15844ac_fn_c_check_header_compile "$LINENO" "netinet/in.h" "ac_cv_header_netinet_in_h" "$ac_includes_default
15845"
15846if test "x$ac_cv_header_netinet_in_h" = xyes
15847then :
15848  printf "%s\n" "#define HAVE_NETINET_IN_H 1" >>confdefs.h
15849
15850fi
15851ac_fn_c_check_header_compile "$LINENO" "netinet/tcp.h" "ac_cv_header_netinet_tcp_h" "$ac_includes_default
15852"
15853if test "x$ac_cv_header_netinet_tcp_h" = xyes
15854then :
15855  printf "%s\n" "#define HAVE_NETINET_TCP_H 1" >>confdefs.h
15856
15857fi
15858ac_fn_c_check_header_compile "$LINENO" "sys/param.h" "ac_cv_header_sys_param_h" "$ac_includes_default
15859"
15860if test "x$ac_cv_header_sys_param_h" = xyes
15861then :
15862  printf "%s\n" "#define HAVE_SYS_PARAM_H 1" >>confdefs.h
15863
15864fi
15865ac_fn_c_check_header_compile "$LINENO" "sys/select.h" "ac_cv_header_sys_select_h" "$ac_includes_default
15866"
15867if test "x$ac_cv_header_sys_select_h" = xyes
15868then :
15869  printf "%s\n" "#define HAVE_SYS_SELECT_H 1" >>confdefs.h
15870
15871fi
15872ac_fn_c_check_header_compile "$LINENO" "sys/socket.h" "ac_cv_header_sys_socket_h" "$ac_includes_default
15873"
15874if test "x$ac_cv_header_sys_socket_h" = xyes
15875then :
15876  printf "%s\n" "#define HAVE_SYS_SOCKET_H 1" >>confdefs.h
15877
15878fi
15879ac_fn_c_check_header_compile "$LINENO" "sys/un.h" "ac_cv_header_sys_un_h" "$ac_includes_default
15880"
15881if test "x$ac_cv_header_sys_un_h" = xyes
15882then :
15883  printf "%s\n" "#define HAVE_SYS_UN_H 1" >>confdefs.h
15884
15885fi
15886ac_fn_c_check_header_compile "$LINENO" "sys/uio.h" "ac_cv_header_sys_uio_h" "$ac_includes_default
15887"
15888if test "x$ac_cv_header_sys_uio_h" = xyes
15889then :
15890  printf "%s\n" "#define HAVE_SYS_UIO_H 1" >>confdefs.h
15891
15892fi
15893ac_fn_c_check_header_compile "$LINENO" "sys/resource.h" "ac_cv_header_sys_resource_h" "$ac_includes_default
15894"
15895if test "x$ac_cv_header_sys_resource_h" = xyes
15896then :
15897  printf "%s\n" "#define HAVE_SYS_RESOURCE_H 1" >>confdefs.h
15898
15899fi
15900ac_fn_c_check_header_compile "$LINENO" "arpa/inet.h" "ac_cv_header_arpa_inet_h" "$ac_includes_default
15901"
15902if test "x$ac_cv_header_arpa_inet_h" = xyes
15903then :
15904  printf "%s\n" "#define HAVE_ARPA_INET_H 1" >>confdefs.h
15905
15906fi
15907ac_fn_c_check_header_compile "$LINENO" "syslog.h" "ac_cv_header_syslog_h" "$ac_includes_default
15908"
15909if test "x$ac_cv_header_syslog_h" = xyes
15910then :
15911  printf "%s\n" "#define HAVE_SYSLOG_H 1" >>confdefs.h
15912
15913fi
15914ac_fn_c_check_header_compile "$LINENO" "netdb.h" "ac_cv_header_netdb_h" "$ac_includes_default
15915"
15916if test "x$ac_cv_header_netdb_h" = xyes
15917then :
15918  printf "%s\n" "#define HAVE_NETDB_H 1" >>confdefs.h
15919
15920fi
15921ac_fn_c_check_header_compile "$LINENO" "sys/wait.h" "ac_cv_header_sys_wait_h" "$ac_includes_default
15922"
15923if test "x$ac_cv_header_sys_wait_h" = xyes
15924then :
15925  printf "%s\n" "#define HAVE_SYS_WAIT_H 1" >>confdefs.h
15926
15927fi
15928ac_fn_c_check_header_compile "$LINENO" "pwd.h" "ac_cv_header_pwd_h" "$ac_includes_default
15929"
15930if test "x$ac_cv_header_pwd_h" = xyes
15931then :
15932  printf "%s\n" "#define HAVE_PWD_H 1" >>confdefs.h
15933
15934fi
15935ac_fn_c_check_header_compile "$LINENO" "glob.h" "ac_cv_header_glob_h" "$ac_includes_default
15936"
15937if test "x$ac_cv_header_glob_h" = xyes
15938then :
15939  printf "%s\n" "#define HAVE_GLOB_H 1" >>confdefs.h
15940
15941fi
15942ac_fn_c_check_header_compile "$LINENO" "grp.h" "ac_cv_header_grp_h" "$ac_includes_default
15943"
15944if test "x$ac_cv_header_grp_h" = xyes
15945then :
15946  printf "%s\n" "#define HAVE_GRP_H 1" >>confdefs.h
15947
15948fi
15949ac_fn_c_check_header_compile "$LINENO" "login_cap.h" "ac_cv_header_login_cap_h" "$ac_includes_default
15950"
15951if test "x$ac_cv_header_login_cap_h" = xyes
15952then :
15953  printf "%s\n" "#define HAVE_LOGIN_CAP_H 1" >>confdefs.h
15954
15955fi
15956ac_fn_c_check_header_compile "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default
15957"
15958if test "x$ac_cv_header_winsock2_h" = xyes
15959then :
15960  printf "%s\n" "#define HAVE_WINSOCK2_H 1" >>confdefs.h
15961
15962fi
15963ac_fn_c_check_header_compile "$LINENO" "ws2tcpip.h" "ac_cv_header_ws2tcpip_h" "$ac_includes_default
15964"
15965if test "x$ac_cv_header_ws2tcpip_h" = xyes
15966then :
15967  printf "%s\n" "#define HAVE_WS2TCPIP_H 1" >>confdefs.h
15968
15969fi
15970ac_fn_c_check_header_compile "$LINENO" "endian.h" "ac_cv_header_endian_h" "$ac_includes_default
15971"
15972if test "x$ac_cv_header_endian_h" = xyes
15973then :
15974  printf "%s\n" "#define HAVE_ENDIAN_H 1" >>confdefs.h
15975
15976fi
15977ac_fn_c_check_header_compile "$LINENO" "sys/endian.h" "ac_cv_header_sys_endian_h" "$ac_includes_default
15978"
15979if test "x$ac_cv_header_sys_endian_h" = xyes
15980then :
15981  printf "%s\n" "#define HAVE_SYS_ENDIAN_H 1" >>confdefs.h
15982
15983fi
15984ac_fn_c_check_header_compile "$LINENO" "libkern/OSByteOrder.h" "ac_cv_header_libkern_OSByteOrder_h" "$ac_includes_default
15985"
15986if test "x$ac_cv_header_libkern_OSByteOrder_h" = xyes
15987then :
15988  printf "%s\n" "#define HAVE_LIBKERN_OSBYTEORDER_H 1" >>confdefs.h
15989
15990fi
15991ac_fn_c_check_header_compile "$LINENO" "sys/ipc.h" "ac_cv_header_sys_ipc_h" "$ac_includes_default
15992"
15993if test "x$ac_cv_header_sys_ipc_h" = xyes
15994then :
15995  printf "%s\n" "#define HAVE_SYS_IPC_H 1" >>confdefs.h
15996
15997fi
15998ac_fn_c_check_header_compile "$LINENO" "sys/shm.h" "ac_cv_header_sys_shm_h" "$ac_includes_default
15999"
16000if test "x$ac_cv_header_sys_shm_h" = xyes
16001then :
16002  printf "%s\n" "#define HAVE_SYS_SHM_H 1" >>confdefs.h
16003
16004fi
16005ac_fn_c_check_header_compile "$LINENO" "ifaddrs.h" "ac_cv_header_ifaddrs_h" "$ac_includes_default
16006"
16007if test "x$ac_cv_header_ifaddrs_h" = xyes
16008then :
16009  printf "%s\n" "#define HAVE_IFADDRS_H 1" >>confdefs.h
16010
16011fi
16012ac_fn_c_check_header_compile "$LINENO" "poll.h" "ac_cv_header_poll_h" "$ac_includes_default
16013"
16014if test "x$ac_cv_header_poll_h" = xyes
16015then :
16016  printf "%s\n" "#define HAVE_POLL_H 1" >>confdefs.h
16017
16018fi
16019
16020# net/if.h portability for Darwin see:
16021# https://www.gnu.org/software/autoconf/manual/autoconf-2.69/html_node/Header-Portability.html
16022ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "
16023#include <stdio.h>
16024#ifdef STDC_HEADERS
16025# include <stdlib.h>
16026# include <stddef.h>
16027#else
16028# ifdef HAVE_STDLIB_H
16029#  include <stdlib.h>
16030# endif
16031#endif
16032#ifdef HAVE_SYS_SOCKET_H
16033# include <sys/socket.h>
16034#endif
16035
16036"
16037if test "x$ac_cv_header_net_if_h" = xyes
16038then :
16039  printf "%s\n" "#define HAVE_NET_IF_H 1" >>confdefs.h
16040
16041fi
16042
16043
16044# Check for Apple header. This uncovers TARGET_OS_IPHONE, TARGET_OS_TV or TARGET_OS_WATCH
16045ac_fn_c_check_header_compile "$LINENO" "TargetConditionals.h" "ac_cv_header_TargetConditionals_h" "$ac_includes_default
16046"
16047if test "x$ac_cv_header_TargetConditionals_h" = xyes
16048then :
16049  printf "%s\n" "#define HAVE_TARGETCONDITIONALS_H 1" >>confdefs.h
16050
16051fi
16052
16053ac_fn_c_check_header_compile "$LINENO" "netioapi.h" "ac_cv_header_netioapi_h" "$ac_includes_default
16054#if HAVE_SYS_PARAM_H
16055#include <sys/param.h>
16056#endif
16057
16058#ifdef HAVE_SYS_SOCKET_H
16059#include <sys/socket.h>
16060#endif
16061
16062#ifdef HAVE_SYS_UIO_H
16063#include <sys/uio.h>
16064#endif
16065
16066#ifdef HAVE_NETINET_IN_H
16067#include <netinet/in.h>
16068#endif
16069
16070#ifdef HAVE_NETINET_TCP_H
16071#include <netinet/tcp.h>
16072#endif
16073
16074#ifdef HAVE_ARPA_INET_H
16075#include <arpa/inet.h>
16076#endif
16077
16078#ifdef HAVE_WINSOCK2_H
16079#include <winsock2.h>
16080#endif
16081
16082#ifdef HAVE_WS2TCPIP_H
16083#include <ws2tcpip.h>
16084#endif
16085
16086"
16087if test "x$ac_cv_header_netioapi_h" = xyes
16088then :
16089  printf "%s\n" "#define HAVE_NETIOAPI_H 1" >>confdefs.h
16090
16091fi
16092
16093
16094# Check for Linux timestamping headers
16095ac_fn_c_check_header_compile "$LINENO" "linux/net_tstamp.h" "ac_cv_header_linux_net_tstamp_h" "$ac_includes_default
16096"
16097if test "x$ac_cv_header_linux_net_tstamp_h" = xyes
16098then :
16099  printf "%s\n" "#define HAVE_LINUX_NET_TSTAMP_H 1" >>confdefs.h
16100
16101fi
16102
16103ac_fn_c_check_header_compile "$LINENO" "stdatomic.h" "ac_cv_header_stdatomic_h" "$ac_includes_default
16104"
16105if test "x$ac_cv_header_stdatomic_h" = xyes
16106then :
16107  printf "%s\n" "#define HAVE_STDATOMIC_H 1" >>confdefs.h
16108
16109fi
16110
16111
16112# check for types.
16113# Using own tests for int64* because autoconf builtin only give 32bit.
16114ac_fn_c_check_type "$LINENO" "int8_t" "ac_cv_type_int8_t" "$ac_includes_default"
16115if test "x$ac_cv_type_int8_t" = xyes
16116then :
16117
16118else $as_nop
16119
16120printf "%s\n" "#define int8_t signed char" >>confdefs.h
16121
16122fi
16123
16124ac_fn_c_check_type "$LINENO" "int16_t" "ac_cv_type_int16_t" "$ac_includes_default"
16125if test "x$ac_cv_type_int16_t" = xyes
16126then :
16127
16128else $as_nop
16129
16130printf "%s\n" "#define int16_t short" >>confdefs.h
16131
16132fi
16133
16134ac_fn_c_check_type "$LINENO" "int32_t" "ac_cv_type_int32_t" "$ac_includes_default"
16135if test "x$ac_cv_type_int32_t" = xyes
16136then :
16137
16138else $as_nop
16139
16140printf "%s\n" "#define int32_t int" >>confdefs.h
16141
16142fi
16143
16144ac_fn_c_check_type "$LINENO" "int64_t" "ac_cv_type_int64_t" "$ac_includes_default"
16145if test "x$ac_cv_type_int64_t" = xyes
16146then :
16147
16148else $as_nop
16149
16150printf "%s\n" "#define int64_t long long" >>confdefs.h
16151
16152fi
16153
16154ac_fn_c_check_type "$LINENO" "uint8_t" "ac_cv_type_uint8_t" "$ac_includes_default"
16155if test "x$ac_cv_type_uint8_t" = xyes
16156then :
16157
16158else $as_nop
16159
16160printf "%s\n" "#define uint8_t unsigned char" >>confdefs.h
16161
16162fi
16163
16164ac_fn_c_check_type "$LINENO" "uint16_t" "ac_cv_type_uint16_t" "$ac_includes_default"
16165if test "x$ac_cv_type_uint16_t" = xyes
16166then :
16167
16168else $as_nop
16169
16170printf "%s\n" "#define uint16_t unsigned short" >>confdefs.h
16171
16172fi
16173
16174ac_fn_c_check_type "$LINENO" "uint32_t" "ac_cv_type_uint32_t" "$ac_includes_default"
16175if test "x$ac_cv_type_uint32_t" = xyes
16176then :
16177
16178else $as_nop
16179
16180printf "%s\n" "#define uint32_t unsigned int" >>confdefs.h
16181
16182fi
16183
16184ac_fn_c_check_type "$LINENO" "uint64_t" "ac_cv_type_uint64_t" "$ac_includes_default"
16185if test "x$ac_cv_type_uint64_t" = xyes
16186then :
16187
16188else $as_nop
16189
16190printf "%s\n" "#define uint64_t unsigned long long" >>confdefs.h
16191
16192fi
16193
16194ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
16195if test "x$ac_cv_type_size_t" = xyes
16196then :
16197
16198else $as_nop
16199
16200printf "%s\n" "#define size_t unsigned int" >>confdefs.h
16201
16202fi
16203
16204ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
16205if test "x$ac_cv_type_ssize_t" = xyes
16206then :
16207
16208else $as_nop
16209
16210printf "%s\n" "#define ssize_t int" >>confdefs.h
16211
16212fi
16213
16214ac_ext=c
16215ac_cpp='$CPP $CPPFLAGS'
16216ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16217ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16218ac_compiler_gnu=$ac_cv_c_compiler_gnu
16219{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
16220printf %s "checking how to run the C preprocessor... " >&6; }
16221# On Suns, sometimes $CPP names a directory.
16222if test -n "$CPP" && test -d "$CPP"; then
16223  CPP=
16224fi
16225if test -z "$CPP"; then
16226  if test ${ac_cv_prog_CPP+y}
16227then :
16228  printf %s "(cached) " >&6
16229else $as_nop
16230      # Double quotes because $CC needs to be expanded
16231    for CPP in "$CC -E" "$CC -E -traditional-cpp" cpp /lib/cpp
16232    do
16233      ac_preproc_ok=false
16234for ac_c_preproc_warn_flag in '' yes
16235do
16236  # Use a header file that comes with gcc, so configuring glibc
16237  # with a fresh cross-compiler works.
16238  # On the NeXT, cc -E runs the code through the compiler's parser,
16239  # not just through cpp. "Syntax error" is here to catch this case.
16240  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16241/* end confdefs.h.  */
16242#include <limits.h>
16243		     Syntax error
16244_ACEOF
16245if ac_fn_c_try_cpp "$LINENO"
16246then :
16247
16248else $as_nop
16249  # Broken: fails on valid input.
16250continue
16251fi
16252rm -f conftest.err conftest.i conftest.$ac_ext
16253
16254  # OK, works on sane cases.  Now check whether nonexistent headers
16255  # can be detected and how.
16256  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16257/* end confdefs.h.  */
16258#include <ac_nonexistent.h>
16259_ACEOF
16260if ac_fn_c_try_cpp "$LINENO"
16261then :
16262  # Broken: success on invalid input.
16263continue
16264else $as_nop
16265  # Passes both tests.
16266ac_preproc_ok=:
16267break
16268fi
16269rm -f conftest.err conftest.i conftest.$ac_ext
16270
16271done
16272# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
16273rm -f conftest.i conftest.err conftest.$ac_ext
16274if $ac_preproc_ok
16275then :
16276  break
16277fi
16278
16279    done
16280    ac_cv_prog_CPP=$CPP
16281
16282fi
16283  CPP=$ac_cv_prog_CPP
16284else
16285  ac_cv_prog_CPP=$CPP
16286fi
16287{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
16288printf "%s\n" "$CPP" >&6; }
16289ac_preproc_ok=false
16290for ac_c_preproc_warn_flag in '' yes
16291do
16292  # Use a header file that comes with gcc, so configuring glibc
16293  # with a fresh cross-compiler works.
16294  # On the NeXT, cc -E runs the code through the compiler's parser,
16295  # not just through cpp. "Syntax error" is here to catch this case.
16296  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16297/* end confdefs.h.  */
16298#include <limits.h>
16299		     Syntax error
16300_ACEOF
16301if ac_fn_c_try_cpp "$LINENO"
16302then :
16303
16304else $as_nop
16305  # Broken: fails on valid input.
16306continue
16307fi
16308rm -f conftest.err conftest.i conftest.$ac_ext
16309
16310  # OK, works on sane cases.  Now check whether nonexistent headers
16311  # can be detected and how.
16312  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16313/* end confdefs.h.  */
16314#include <ac_nonexistent.h>
16315_ACEOF
16316if ac_fn_c_try_cpp "$LINENO"
16317then :
16318  # Broken: success on invalid input.
16319continue
16320else $as_nop
16321  # Passes both tests.
16322ac_preproc_ok=:
16323break
16324fi
16325rm -f conftest.err conftest.i conftest.$ac_ext
16326
16327done
16328# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
16329rm -f conftest.i conftest.err conftest.$ac_ext
16330if $ac_preproc_ok
16331then :
16332
16333else $as_nop
16334  { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
16335printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
16336as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
16337See \`config.log' for more details" "$LINENO" 5; }
16338fi
16339
16340ac_ext=c
16341ac_cpp='$CPP $CPPFLAGS'
16342ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16343ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16344ac_compiler_gnu=$ac_cv_c_compiler_gnu
16345
16346
16347{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
16348printf %s "checking for uid_t in sys/types.h... " >&6; }
16349if test ${ac_cv_type_uid_t+y}
16350then :
16351  printf %s "(cached) " >&6
16352else $as_nop
16353  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16354/* end confdefs.h.  */
16355#include <sys/types.h>
16356
16357_ACEOF
16358if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16359  $EGREP "uid_t" >/dev/null 2>&1
16360then :
16361  ac_cv_type_uid_t=yes
16362else $as_nop
16363  ac_cv_type_uid_t=no
16364fi
16365rm -rf conftest*
16366
16367fi
16368{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
16369printf "%s\n" "$ac_cv_type_uid_t" >&6; }
16370if test $ac_cv_type_uid_t = no; then
16371
16372printf "%s\n" "#define uid_t int" >>confdefs.h
16373
16374
16375printf "%s\n" "#define gid_t int" >>confdefs.h
16376
16377fi
16378
16379
16380  ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default
16381"
16382if test "x$ac_cv_type_pid_t" = xyes
16383then :
16384
16385else $as_nop
16386                                          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16387/* end confdefs.h.  */
16388
16389          #if defined _WIN64 && !defined __CYGWIN__
16390          LLP64
16391          #endif
16392
16393int
16394main (void)
16395{
16396
16397  ;
16398  return 0;
16399}
16400
16401_ACEOF
16402if ac_fn_c_try_compile "$LINENO"
16403then :
16404  ac_pid_type='int'
16405else $as_nop
16406  ac_pid_type='__int64'
16407fi
16408rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
16409
16410printf "%s\n" "#define pid_t $ac_pid_type" >>confdefs.h
16411
16412
16413fi
16414
16415
16416ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
16417if test "x$ac_cv_type_off_t" = xyes
16418then :
16419
16420else $as_nop
16421
16422printf "%s\n" "#define off_t long int" >>confdefs.h
16423
16424fi
16425
16426ac_fn_c_check_type "$LINENO" "u_char" "ac_cv_type_u_char" "
16427$ac_includes_default
16428#ifdef HAVE_WINSOCK2_H
16429#  include <winsock2.h>
16430#endif
16431
16432"
16433if test "x$ac_cv_type_u_char" = xyes
16434then :
16435
16436else $as_nop
16437
16438printf "%s\n" "#define u_char unsigned char" >>confdefs.h
16439
16440fi
16441
16442ac_fn_c_check_type "$LINENO" "rlim_t" "ac_cv_type_rlim_t" "
16443$ac_includes_default
16444#ifdef HAVE_SYS_RESOURCE_H
16445#  include <sys/resource.h>
16446#endif
16447
16448"
16449if test "x$ac_cv_type_rlim_t" = xyes
16450then :
16451
16452else $as_nop
16453
16454printf "%s\n" "#define rlim_t unsigned long" >>confdefs.h
16455
16456fi
16457
16458
16459ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
16460$ac_includes_default
16461#ifdef HAVE_SYS_SOCKET_H
16462#  include <sys/socket.h>
16463#endif
16464#ifdef HAVE_WS2TCPIP_H
16465#  include <ws2tcpip.h>
16466#endif
16467
16468"
16469if test "x$ac_cv_type_socklen_t" = xyes
16470then :
16471
16472else $as_nop
16473
16474printf "%s\n" "#define socklen_t int" >>confdefs.h
16475
16476fi
16477
16478 ac_fn_c_check_type "$LINENO" "in_addr_t" "ac_cv_type_in_addr_t" "
16479$ac_includes_default
16480#ifdef HAVE_SYS_TYPES_H
16481# include <sys/types.h>
16482#endif
16483#ifdef HAVE_NETINET_IN_H
16484# include <netinet/in.h>
16485#endif
16486
16487"
16488if test "x$ac_cv_type_in_addr_t" = xyes
16489then :
16490
16491else $as_nop
16492
16493printf "%s\n" "#define in_addr_t uint32_t" >>confdefs.h
16494
16495fi
16496
16497 ac_fn_c_check_type "$LINENO" "in_port_t" "ac_cv_type_in_port_t" "
16498$ac_includes_default
16499#ifdef HAVE_SYS_TYPES_H
16500# include <sys/types.h>
16501#endif
16502#ifdef HAVE_NETINET_IN_H
16503# include <netinet/in.h>
16504#endif
16505
16506"
16507if test "x$ac_cv_type_in_port_t" = xyes
16508then :
16509
16510else $as_nop
16511
16512printf "%s\n" "#define in_port_t uint16_t" >>confdefs.h
16513
16514fi
16515
16516{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if memcmp compares unsigned" >&5
16517printf %s "checking if memcmp compares unsigned... " >&6; }
16518if test "$cross_compiling" = yes
16519then :
16520   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: cross-compile no" >&5
16521printf "%s\n" "cross-compile no" >&6; }
16522
16523printf "%s\n" "#define MEMCMP_IS_BROKEN 1" >>confdefs.h
16524
16525  case " $LIBOBJS " in
16526  *" memcmp.$ac_objext "* ) ;;
16527  *) LIBOBJS="$LIBOBJS memcmp.$ac_objext"
16528 ;;
16529esac
16530
16531
16532else $as_nop
16533  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16534/* end confdefs.h.  */
16535
16536#include <stdio.h>
16537#include <stdlib.h>
16538#include <string.h>
16539int main(void)
16540{
16541	char a = 255, b = 0;
16542	if(memcmp(&a, &b, 1) < 0)
16543		return 1;
16544	return 0;
16545}
16546
16547_ACEOF
16548if ac_fn_c_try_run "$LINENO"
16549then :
16550  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16551printf "%s\n" "yes" >&6; }
16552else $as_nop
16553   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
16554printf "%s\n" "no" >&6; }
16555
16556printf "%s\n" "#define MEMCMP_IS_BROKEN 1" >>confdefs.h
16557
16558  case " $LIBOBJS " in
16559  *" memcmp.$ac_objext "* ) ;;
16560  *) LIBOBJS="$LIBOBJS memcmp.$ac_objext"
16561 ;;
16562esac
16563
16564
16565fi
16566rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16567  conftest.$ac_objext conftest.beam conftest.$ac_ext
16568fi
16569
16570
16571# The cast to long int works around a bug in the HP C Compiler
16572# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
16573# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
16574# This bug is HP SR number 8606223364.
16575{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
16576printf %s "checking size of time_t... " >&6; }
16577if test ${ac_cv_sizeof_time_t+y}
16578then :
16579  printf %s "(cached) " >&6
16580else $as_nop
16581  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t"        "
16582$ac_includes_default
16583#ifdef TIME_WITH_SYS_TIME
16584# include <sys/time.h>
16585# include <time.h>
16586#else
16587# ifdef HAVE_SYS_TIME_H
16588#  include <sys/time.h>
16589# else
16590#  include <time.h>
16591# endif
16592#endif
16593
16594"
16595then :
16596
16597else $as_nop
16598  if test "$ac_cv_type_time_t" = yes; then
16599     { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
16600printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
16601as_fn_error 77 "cannot compute sizeof (time_t)
16602See \`config.log' for more details" "$LINENO" 5; }
16603   else
16604     ac_cv_sizeof_time_t=0
16605   fi
16606fi
16607
16608fi
16609{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
16610printf "%s\n" "$ac_cv_sizeof_time_t" >&6; }
16611
16612
16613
16614printf "%s\n" "#define SIZEOF_TIME_T $ac_cv_sizeof_time_t" >>confdefs.h
16615
16616
16617# The cast to long int works around a bug in the HP C Compiler
16618# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
16619# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
16620# This bug is HP SR number 8606223364.
16621{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
16622printf %s "checking size of size_t... " >&6; }
16623if test ${ac_cv_sizeof_size_t+y}
16624then :
16625  printf %s "(cached) " >&6
16626else $as_nop
16627  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (size_t))" "ac_cv_sizeof_size_t"        "$ac_includes_default"
16628then :
16629
16630else $as_nop
16631  if test "$ac_cv_type_size_t" = yes; then
16632     { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
16633printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
16634as_fn_error 77 "cannot compute sizeof (size_t)
16635See \`config.log' for more details" "$LINENO" 5; }
16636   else
16637     ac_cv_sizeof_size_t=0
16638   fi
16639fi
16640
16641fi
16642{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
16643printf "%s\n" "$ac_cv_sizeof_size_t" >&6; }
16644
16645
16646
16647printf "%s\n" "#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t" >>confdefs.h
16648
16649
16650
16651# add option to disable the evil rpath
16652
16653# Check whether --enable-rpath was given.
16654if test ${enable_rpath+y}
16655then :
16656  enableval=$enable_rpath; enable_rpath=$enableval
16657else $as_nop
16658  enable_rpath=yes
16659fi
16660
16661if test "x$enable_rpath" = xno; then
16662		ac_config_commands="$ac_config_commands disable-rpath"
16663
16664fi
16665
16666
16667
16668# check to see if libraries are needed for these functions.
16669{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing inet_pton" >&5
16670printf %s "checking for library containing inet_pton... " >&6; }
16671if test ${ac_cv_search_inet_pton+y}
16672then :
16673  printf %s "(cached) " >&6
16674else $as_nop
16675  ac_func_search_save_LIBS=$LIBS
16676cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16677/* end confdefs.h.  */
16678
16679/* Override any GCC internal prototype to avoid an error.
16680   Use char because int might match the return type of a GCC
16681   builtin and then its argument prototype would still apply.  */
16682char inet_pton ();
16683int
16684main (void)
16685{
16686return inet_pton ();
16687  ;
16688  return 0;
16689}
16690_ACEOF
16691for ac_lib in '' nsl
16692do
16693  if test -z "$ac_lib"; then
16694    ac_res="none required"
16695  else
16696    ac_res=-l$ac_lib
16697    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
16698  fi
16699  if ac_fn_c_try_link "$LINENO"
16700then :
16701  ac_cv_search_inet_pton=$ac_res
16702fi
16703rm -f core conftest.err conftest.$ac_objext conftest.beam \
16704    conftest$ac_exeext
16705  if test ${ac_cv_search_inet_pton+y}
16706then :
16707  break
16708fi
16709done
16710if test ${ac_cv_search_inet_pton+y}
16711then :
16712
16713else $as_nop
16714  ac_cv_search_inet_pton=no
16715fi
16716rm conftest.$ac_ext
16717LIBS=$ac_func_search_save_LIBS
16718fi
16719{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_inet_pton" >&5
16720printf "%s\n" "$ac_cv_search_inet_pton" >&6; }
16721ac_res=$ac_cv_search_inet_pton
16722if test "$ac_res" != no
16723then :
16724  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
16725
16726fi
16727
16728{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing socket" >&5
16729printf %s "checking for library containing socket... " >&6; }
16730if test ${ac_cv_search_socket+y}
16731then :
16732  printf %s "(cached) " >&6
16733else $as_nop
16734  ac_func_search_save_LIBS=$LIBS
16735cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16736/* end confdefs.h.  */
16737
16738/* Override any GCC internal prototype to avoid an error.
16739   Use char because int might match the return type of a GCC
16740   builtin and then its argument prototype would still apply.  */
16741char socket ();
16742int
16743main (void)
16744{
16745return socket ();
16746  ;
16747  return 0;
16748}
16749_ACEOF
16750for ac_lib in '' socket
16751do
16752  if test -z "$ac_lib"; then
16753    ac_res="none required"
16754  else
16755    ac_res=-l$ac_lib
16756    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
16757  fi
16758  if ac_fn_c_try_link "$LINENO"
16759then :
16760  ac_cv_search_socket=$ac_res
16761fi
16762rm -f core conftest.err conftest.$ac_objext conftest.beam \
16763    conftest$ac_exeext
16764  if test ${ac_cv_search_socket+y}
16765then :
16766  break
16767fi
16768done
16769if test ${ac_cv_search_socket+y}
16770then :
16771
16772else $as_nop
16773  ac_cv_search_socket=no
16774fi
16775rm conftest.$ac_ext
16776LIBS=$ac_func_search_save_LIBS
16777fi
16778{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socket" >&5
16779printf "%s\n" "$ac_cv_search_socket" >&6; }
16780ac_res=$ac_cv_search_socket
16781if test "$ac_res" != no
16782then :
16783  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
16784
16785fi
16786
16787
16788# check whether strptime also works
16789
16790# check some functions of the OS before linking libs (while still runnable).
16791{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working chown" >&5
16792printf %s "checking for working chown... " >&6; }
16793if test ${ac_cv_func_chown_works+y}
16794then :
16795  printf %s "(cached) " >&6
16796else $as_nop
16797  if test "$cross_compiling" = yes
16798then :
16799  case "$host_os" in # ((
16800			  # Guess yes on glibc systems.
16801		  *-gnu*) ac_cv_func_chown_works=yes ;;
16802			  # If we don't know, assume the worst.
16803		  *)      ac_cv_func_chown_works=no ;;
16804		esac
16805else $as_nop
16806  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16807/* end confdefs.h.  */
16808$ac_includes_default
16809#include <fcntl.h>
16810
16811int
16812main (void)
16813{
16814  char *f = "conftest.chown";
16815  struct stat before, after;
16816
16817  if (creat (f, 0600) < 0)
16818    return 1;
16819  if (stat (f, &before) < 0)
16820    return 1;
16821  if (chown (f, (uid_t) -1, (gid_t) -1) == -1)
16822    return 1;
16823  if (stat (f, &after) < 0)
16824    return 1;
16825  return ! (before.st_uid == after.st_uid && before.st_gid == after.st_gid);
16826
16827  ;
16828  return 0;
16829}
16830_ACEOF
16831if ac_fn_c_try_run "$LINENO"
16832then :
16833  ac_cv_func_chown_works=yes
16834else $as_nop
16835  ac_cv_func_chown_works=no
16836fi
16837rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16838  conftest.$ac_objext conftest.beam conftest.$ac_ext
16839fi
16840
16841rm -f conftest.chown
16842
16843fi
16844{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_chown_works" >&5
16845printf "%s\n" "$ac_cv_func_chown_works" >&6; }
16846if test $ac_cv_func_chown_works = yes; then
16847
16848printf "%s\n" "#define HAVE_CHOWN 1" >>confdefs.h
16849
16850fi
16851
16852
16853ac_func=
16854for ac_item in $ac_func_c_list
16855do
16856  if test $ac_func; then
16857    ac_fn_c_check_func "$LINENO" $ac_func ac_cv_func_$ac_func
16858    if eval test \"x\$ac_cv_func_$ac_func\" = xyes; then
16859      echo "#define $ac_item 1" >> confdefs.h
16860    fi
16861    ac_func=
16862  else
16863    ac_func=$ac_item
16864  fi
16865done
16866
16867
16868
16869if test "x$ac_cv_func_fork" = xyes; then
16870  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5
16871printf %s "checking for working fork... " >&6; }
16872if test ${ac_cv_func_fork_works+y}
16873then :
16874  printf %s "(cached) " >&6
16875else $as_nop
16876  if test "$cross_compiling" = yes
16877then :
16878  ac_cv_func_fork_works=cross
16879else $as_nop
16880  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16881/* end confdefs.h.  */
16882$ac_includes_default
16883int
16884main (void)
16885{
16886
16887	  /* By Ruediger Kuhlmann. */
16888	  return fork () < 0;
16889
16890  ;
16891  return 0;
16892}
16893_ACEOF
16894if ac_fn_c_try_run "$LINENO"
16895then :
16896  ac_cv_func_fork_works=yes
16897else $as_nop
16898  ac_cv_func_fork_works=no
16899fi
16900rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16901  conftest.$ac_objext conftest.beam conftest.$ac_ext
16902fi
16903
16904fi
16905{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5
16906printf "%s\n" "$ac_cv_func_fork_works" >&6; }
16907
16908else
16909  ac_cv_func_fork_works=$ac_cv_func_fork
16910fi
16911if test "x$ac_cv_func_fork_works" = xcross; then
16912  case $host in
16913    *-*-amigaos* | *-*-msdosdjgpp*)
16914      # Override, as these systems have only a dummy fork() stub
16915      ac_cv_func_fork_works=no
16916      ;;
16917    *)
16918      ac_cv_func_fork_works=yes
16919      ;;
16920  esac
16921  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
16922printf "%s\n" "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
16923fi
16924ac_cv_func_vfork_works=$ac_cv_func_vfork
16925if test "x$ac_cv_func_vfork" = xyes; then
16926  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5
16927printf %s "checking for working vfork... " >&6; }
16928if test ${ac_cv_func_vfork_works+y}
16929then :
16930  printf %s "(cached) " >&6
16931else $as_nop
16932  if test "$cross_compiling" = yes
16933then :
16934  ac_cv_func_vfork_works=cross
16935else $as_nop
16936  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16937/* end confdefs.h.  */
16938/* Thanks to Paul Eggert for this test.  */
16939$ac_includes_default
16940#include <signal.h>
16941#include <sys/wait.h>
16942#ifdef HAVE_VFORK_H
16943# include <vfork.h>
16944#endif
16945
16946static void
16947do_nothing (int sig)
16948{
16949  (void) sig;
16950}
16951
16952/* On some sparc systems, changes by the child to local and incoming
16953   argument registers are propagated back to the parent.  The compiler
16954   is told about this with #include <vfork.h>, but some compilers
16955   (e.g. gcc -O) don't grok <vfork.h>.  Test for this by using a
16956   static variable whose address is put into a register that is
16957   clobbered by the vfork.  */
16958static void
16959sparc_address_test (int arg)
16960{
16961  static pid_t child;
16962  if (!child) {
16963    child = vfork ();
16964    if (child < 0) {
16965      perror ("vfork");
16966      _exit(2);
16967    }
16968    if (!child) {
16969      arg = getpid();
16970      write(-1, "", 0);
16971      _exit (arg);
16972    }
16973  }
16974}
16975
16976int
16977main (void)
16978{
16979  pid_t parent = getpid ();
16980  pid_t child;
16981
16982  sparc_address_test (0);
16983
16984  /* On Solaris 2.4, changes by the child to the signal handler
16985     also munge signal handlers in the parent.  To detect this,
16986     start by putting the parent's handler in a known state.  */
16987  signal (SIGTERM, SIG_DFL);
16988
16989  child = vfork ();
16990
16991  if (child == 0) {
16992    /* Here is another test for sparc vfork register problems.  This
16993       test uses lots of local variables, at least as many local
16994       variables as main has allocated so far including compiler
16995       temporaries.  4 locals are enough for gcc 1.40.3 on a Solaris
16996       4.1.3 sparc, but we use 8 to be safe.  A buggy compiler should
16997       reuse the register of parent for one of the local variables,
16998       since it will think that parent can't possibly be used any more
16999       in this routine.  Assigning to the local variable will thus
17000       munge parent in the parent process.  */
17001    pid_t
17002      p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
17003      p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
17004    /* Convince the compiler that p..p7 are live; otherwise, it might
17005       use the same hardware register for all 8 local variables.  */
17006    if (p != p1 || p != p2 || p != p3 || p != p4
17007	|| p != p5 || p != p6 || p != p7)
17008      _exit(1);
17009
17010    /* Alter the child's signal handler.  */
17011    if (signal (SIGTERM, do_nothing) != SIG_DFL)
17012      _exit(1);
17013
17014    /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
17015       from child file descriptors.  If the child closes a descriptor
17016       before it execs or exits, this munges the parent's descriptor
17017       as well.  Test for this by closing stdout in the child.  */
17018    _exit(close(fileno(stdout)) != 0);
17019  } else {
17020    int status;
17021    struct stat st;
17022
17023    while (wait(&status) != child)
17024      ;
17025    return (
17026	 /* Was there some problem with vforking?  */
17027	 child < 0
17028
17029	 /* Did the child munge the parent's signal handler?  */
17030	 || signal (SIGTERM, SIG_DFL) != SIG_DFL
17031
17032	 /* Did the child fail?  (This shouldn't happen.)  */
17033	 || status
17034
17035	 /* Did the vfork/compiler bug occur?  */
17036	 || parent != getpid()
17037
17038	 /* Did the file descriptor bug occur?  */
17039	 || fstat(fileno(stdout), &st) != 0
17040	 );
17041  }
17042}
17043_ACEOF
17044if ac_fn_c_try_run "$LINENO"
17045then :
17046  ac_cv_func_vfork_works=yes
17047else $as_nop
17048  ac_cv_func_vfork_works=no
17049fi
17050rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17051  conftest.$ac_objext conftest.beam conftest.$ac_ext
17052fi
17053
17054fi
17055{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5
17056printf "%s\n" "$ac_cv_func_vfork_works" >&6; }
17057
17058fi;
17059if test "x$ac_cv_func_fork_works" = xcross; then
17060  ac_cv_func_vfork_works=$ac_cv_func_vfork
17061  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
17062printf "%s\n" "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
17063fi
17064
17065if test "x$ac_cv_func_vfork_works" = xyes; then
17066
17067printf "%s\n" "#define HAVE_WORKING_VFORK 1" >>confdefs.h
17068
17069else
17070
17071printf "%s\n" "#define vfork fork" >>confdefs.h
17072
17073fi
17074if test "x$ac_cv_func_fork_works" = xyes; then
17075
17076printf "%s\n" "#define HAVE_WORKING_FORK 1" >>confdefs.h
17077
17078fi
17079
17080
17081printf "%s\n" "#define RETSIGTYPE void" >>confdefs.h
17082
17083{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for _LARGEFILE_SOURCE value needed for large files" >&5
17084printf %s "checking for _LARGEFILE_SOURCE value needed for large files... " >&6; }
17085if test ${ac_cv_sys_largefile_source+y}
17086then :
17087  printf %s "(cached) " >&6
17088else $as_nop
17089  while :; do
17090  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17091/* end confdefs.h.  */
17092#include <sys/types.h> /* for off_t */
17093     #include <stdio.h>
17094int
17095main (void)
17096{
17097int (*fp) (FILE *, off_t, int) = fseeko;
17098     return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
17099  ;
17100  return 0;
17101}
17102_ACEOF
17103if ac_fn_c_try_link "$LINENO"
17104then :
17105  ac_cv_sys_largefile_source=no; break
17106fi
17107rm -f core conftest.err conftest.$ac_objext conftest.beam \
17108    conftest$ac_exeext conftest.$ac_ext
17109  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17110/* end confdefs.h.  */
17111#define _LARGEFILE_SOURCE 1
17112#include <sys/types.h> /* for off_t */
17113     #include <stdio.h>
17114int
17115main (void)
17116{
17117int (*fp) (FILE *, off_t, int) = fseeko;
17118     return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
17119  ;
17120  return 0;
17121}
17122_ACEOF
17123if ac_fn_c_try_link "$LINENO"
17124then :
17125  ac_cv_sys_largefile_source=1; break
17126fi
17127rm -f core conftest.err conftest.$ac_objext conftest.beam \
17128    conftest$ac_exeext conftest.$ac_ext
17129  ac_cv_sys_largefile_source=unknown
17130  break
17131done
17132fi
17133{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_source" >&5
17134printf "%s\n" "$ac_cv_sys_largefile_source" >&6; }
17135case $ac_cv_sys_largefile_source in #(
17136  no | unknown) ;;
17137  *)
17138printf "%s\n" "#define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source" >>confdefs.h
17139;;
17140esac
17141rm -rf conftest*
17142
17143# We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
17144# in glibc 2.1.3, but that breaks too many other things.
17145# If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
17146if test $ac_cv_sys_largefile_source != unknown; then
17147
17148printf "%s\n" "#define HAVE_FSEEKO 1" >>confdefs.h
17149
17150fi
17151
17152
17153# Check whether --enable-largefile was given.
17154if test ${enable_largefile+y}
17155then :
17156  enableval=$enable_largefile;
17157fi
17158
17159if test "$enable_largefile" != no; then
17160
17161  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
17162printf %s "checking for special C compiler options needed for large files... " >&6; }
17163if test ${ac_cv_sys_largefile_CC+y}
17164then :
17165  printf %s "(cached) " >&6
17166else $as_nop
17167  ac_cv_sys_largefile_CC=no
17168     if test "$GCC" != yes; then
17169       ac_save_CC=$CC
17170       while :; do
17171	 # IRIX 6.2 and later do not support large files by default,
17172	 # so use the C compiler's -n32 option if that helps.
17173	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17174/* end confdefs.h.  */
17175#include <sys/types.h>
17176 /* Check that off_t can represent 2**63 - 1 correctly.
17177    We can't simply define LARGE_OFF_T to be 9223372036854775807,
17178    since some C++ compilers masquerading as C compilers
17179    incorrectly reject 9223372036854775807.  */
17180#define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31))
17181  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
17182		       && LARGE_OFF_T % 2147483647 == 1)
17183		      ? 1 : -1];
17184int
17185main (void)
17186{
17187
17188  ;
17189  return 0;
17190}
17191_ACEOF
17192	 if ac_fn_c_try_compile "$LINENO"
17193then :
17194  break
17195fi
17196rm -f core conftest.err conftest.$ac_objext conftest.beam
17197	 CC="$CC -n32"
17198	 if ac_fn_c_try_compile "$LINENO"
17199then :
17200  ac_cv_sys_largefile_CC=' -n32'; break
17201fi
17202rm -f core conftest.err conftest.$ac_objext conftest.beam
17203	 break
17204       done
17205       CC=$ac_save_CC
17206       rm -f conftest.$ac_ext
17207    fi
17208fi
17209{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
17210printf "%s\n" "$ac_cv_sys_largefile_CC" >&6; }
17211  if test "$ac_cv_sys_largefile_CC" != no; then
17212    CC=$CC$ac_cv_sys_largefile_CC
17213  fi
17214
17215  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
17216printf %s "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
17217if test ${ac_cv_sys_file_offset_bits+y}
17218then :
17219  printf %s "(cached) " >&6
17220else $as_nop
17221  while :; do
17222  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17223/* end confdefs.h.  */
17224#include <sys/types.h>
17225 /* Check that off_t can represent 2**63 - 1 correctly.
17226    We can't simply define LARGE_OFF_T to be 9223372036854775807,
17227    since some C++ compilers masquerading as C compilers
17228    incorrectly reject 9223372036854775807.  */
17229#define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31))
17230  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
17231		       && LARGE_OFF_T % 2147483647 == 1)
17232		      ? 1 : -1];
17233int
17234main (void)
17235{
17236
17237  ;
17238  return 0;
17239}
17240_ACEOF
17241if ac_fn_c_try_compile "$LINENO"
17242then :
17243  ac_cv_sys_file_offset_bits=no; break
17244fi
17245rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
17246  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17247/* end confdefs.h.  */
17248#define _FILE_OFFSET_BITS 64
17249#include <sys/types.h>
17250 /* Check that off_t can represent 2**63 - 1 correctly.
17251    We can't simply define LARGE_OFF_T to be 9223372036854775807,
17252    since some C++ compilers masquerading as C compilers
17253    incorrectly reject 9223372036854775807.  */
17254#define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31))
17255  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
17256		       && LARGE_OFF_T % 2147483647 == 1)
17257		      ? 1 : -1];
17258int
17259main (void)
17260{
17261
17262  ;
17263  return 0;
17264}
17265_ACEOF
17266if ac_fn_c_try_compile "$LINENO"
17267then :
17268  ac_cv_sys_file_offset_bits=64; break
17269fi
17270rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
17271  ac_cv_sys_file_offset_bits=unknown
17272  break
17273done
17274fi
17275{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
17276printf "%s\n" "$ac_cv_sys_file_offset_bits" >&6; }
17277case $ac_cv_sys_file_offset_bits in #(
17278  no | unknown) ;;
17279  *)
17280printf "%s\n" "#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits" >>confdefs.h
17281;;
17282esac
17283rm -rf conftest*
17284  if test $ac_cv_sys_file_offset_bits = unknown; then
17285    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
17286printf %s "checking for _LARGE_FILES value needed for large files... " >&6; }
17287if test ${ac_cv_sys_large_files+y}
17288then :
17289  printf %s "(cached) " >&6
17290else $as_nop
17291  while :; do
17292  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17293/* end confdefs.h.  */
17294#include <sys/types.h>
17295 /* Check that off_t can represent 2**63 - 1 correctly.
17296    We can't simply define LARGE_OFF_T to be 9223372036854775807,
17297    since some C++ compilers masquerading as C compilers
17298    incorrectly reject 9223372036854775807.  */
17299#define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31))
17300  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
17301		       && LARGE_OFF_T % 2147483647 == 1)
17302		      ? 1 : -1];
17303int
17304main (void)
17305{
17306
17307  ;
17308  return 0;
17309}
17310_ACEOF
17311if ac_fn_c_try_compile "$LINENO"
17312then :
17313  ac_cv_sys_large_files=no; break
17314fi
17315rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
17316  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17317/* end confdefs.h.  */
17318#define _LARGE_FILES 1
17319#include <sys/types.h>
17320 /* Check that off_t can represent 2**63 - 1 correctly.
17321    We can't simply define LARGE_OFF_T to be 9223372036854775807,
17322    since some C++ compilers masquerading as C compilers
17323    incorrectly reject 9223372036854775807.  */
17324#define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31))
17325  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
17326		       && LARGE_OFF_T % 2147483647 == 1)
17327		      ? 1 : -1];
17328int
17329main (void)
17330{
17331
17332  ;
17333  return 0;
17334}
17335_ACEOF
17336if ac_fn_c_try_compile "$LINENO"
17337then :
17338  ac_cv_sys_large_files=1; break
17339fi
17340rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
17341  ac_cv_sys_large_files=unknown
17342  break
17343done
17344fi
17345{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
17346printf "%s\n" "$ac_cv_sys_large_files" >&6; }
17347case $ac_cv_sys_large_files in #(
17348  no | unknown) ;;
17349  *)
17350printf "%s\n" "#define _LARGE_FILES $ac_cv_sys_large_files" >>confdefs.h
17351;;
17352esac
17353rm -rf conftest*
17354  fi
17355fi
17356
17357
17358
17359
17360{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we need -D_LARGEFILE_SOURCE=1 as a flag for $CC" >&5
17361printf %s "checking whether we need -D_LARGEFILE_SOURCE=1 as a flag for $CC... " >&6; }
17362cache=_D_LARGEFILE_SOURCE_1
17363if eval test \${cv_prog_cc_flag_needed_$cache+y}
17364then :
17365  printf %s "(cached) " >&6
17366else $as_nop
17367
17368echo '
17369#include <stdio.h>
17370int test(void) {
17371        int a = fseeko(stdin, 0, 0);
17372        return a;
17373}
17374' > conftest.c
17375echo 'void f(void){}' >>conftest.c
17376if test -z "`$CC $CPPFLAGS $CFLAGS $ERRFLAG -c conftest.c 2>&1`"; then
17377eval "cv_prog_cc_flag_needed_$cache=no"
17378else
17379
17380if test -z "`$CC $CPPFLAGS $CFLAGS -D_LARGEFILE_SOURCE=1 $ERRFLAG -c conftest.c 2>&1`"; then
17381eval "cv_prog_cc_flag_needed_$cache=yes"
17382else
17383eval "cv_prog_cc_flag_needed_$cache=fail"
17384#echo 'Test with flag fails too!'
17385#cat conftest.c
17386#echo "$CC $CPPFLAGS $CFLAGS -D_LARGEFILE_SOURCE=1 $ERRFLAG -c conftest.c 2>&1"
17387#echo `$CC $CPPFLAGS $CFLAGS -D_LARGEFILE_SOURCE=1 $ERRFLAG -c conftest.c 2>&1`
17388#exit 1
17389fi
17390
17391fi
17392rm -f conftest conftest.c conftest.o
17393
17394fi
17395
17396if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = yes"; then
17397{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17398printf "%s\n" "yes" >&6; }
17399:
17400CFLAGS="$CFLAGS -D_LARGEFILE_SOURCE=1"
17401else
17402if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = no"; then
17403{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
17404printf "%s\n" "no" >&6; }
17405#echo 'Test with flag is no!'
17406#cat conftest.c
17407#echo "$CC $CPPFLAGS $CFLAGS -D_LARGEFILE_SOURCE=1 $ERRFLAG -c conftest.c 2>&1"
17408#echo `$CC $CPPFLAGS $CFLAGS -D_LARGEFILE_SOURCE=1 $ERRFLAG -c conftest.c 2>&1`
17409#exit 1
17410:
17411
17412else
17413{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: failed" >&5
17414printf "%s\n" "failed" >&6; }
17415:
17416
17417fi
17418fi
17419
17420
17421
17422{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if nonblocking sockets work" >&5
17423printf %s "checking if nonblocking sockets work... " >&6; }
17424if echo $host | grep mingw >/dev/null; then
17425	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no (windows)" >&5
17426printf "%s\n" "no (windows)" >&6; }
17427
17428printf "%s\n" "#define NONBLOCKING_IS_BROKEN 1" >>confdefs.h
17429
17430else
17431if test "$cross_compiling" = yes
17432then :
17433
17434	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: crosscompile(yes)" >&5
17435printf "%s\n" "crosscompile(yes)" >&6; }
17436
17437else $as_nop
17438  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17439/* end confdefs.h.  */
17440
17441
17442#include <stdio.h>
17443#include <string.h>
17444#include <stdlib.h>
17445#include <fcntl.h>
17446#include <errno.h>
17447#ifdef HAVE_SYS_TYPES_H
17448#include <sys/types.h>
17449#endif
17450#ifdef HAVE_SYS_SELECT_H
17451#include <sys/select.h>
17452#endif
17453#ifdef HAVE_SYS_SOCKET_H
17454#include <sys/socket.h>
17455#endif
17456#ifdef HAVE_NETINET_IN_H
17457#include <netinet/in.h>
17458#endif
17459#ifdef HAVE_ARPA_INET_H
17460#include <arpa/inet.h>
17461#endif
17462#ifdef HAVE_UNISTD_H
17463#include <unistd.h>
17464#endif
17465#ifdef HAVE_TIME_H
17466#include <time.h>
17467#endif
17468
17469int main(void)
17470{
17471	int port;
17472	int sfd, cfd;
17473	int num = 10;
17474	int i, p;
17475	struct sockaddr_in a;
17476	/* test if select and nonblocking reads work well together */
17477	/* open port.
17478	   fork child to send 10 messages.
17479	   select to read.
17480	   then try to nonblocking read the 10 messages
17481	   then, nonblocking read must give EAGAIN
17482	*/
17483
17484	port = 12345 + (time(0)%32);
17485	sfd = socket(PF_INET, SOCK_DGRAM, 0);
17486	if(sfd == -1) {
17487		perror("socket");
17488		return 1;
17489	}
17490	memset(&a, 0, sizeof(a));
17491	a.sin_family = AF_INET;
17492	a.sin_port = htons(port);
17493	a.sin_addr.s_addr = inet_addr("127.0.0.1");
17494	if(bind(sfd, (struct sockaddr*)&a, sizeof(a)) < 0) {
17495		perror("bind");
17496		return 1;
17497	}
17498	if(fcntl(sfd, F_SETFL, O_NONBLOCK) == -1) {
17499		perror("fcntl");
17500		return 1;
17501	}
17502
17503	cfd = socket(PF_INET, SOCK_DGRAM, 0);
17504	if(cfd == -1) {
17505		perror("client socket");
17506		return 1;
17507	}
17508	a.sin_port = 0;
17509	if(bind(cfd, (struct sockaddr*)&a, sizeof(a)) < 0) {
17510		perror("client bind");
17511		return 1;
17512	}
17513	a.sin_port = htons(port);
17514
17515	/* no handler, causes exit in 10 seconds */
17516	alarm(10);
17517
17518	/* send and receive on the socket */
17519	if((p=fork()) == 0) {
17520		for(i=0; i<num; i++) {
17521			if(sendto(cfd, &i, sizeof(i), 0,
17522				(struct sockaddr*)&a, sizeof(a)) < 0) {
17523				perror("sendto");
17524				return 1;
17525			}
17526		}
17527	} else {
17528		/* parent */
17529		fd_set rset;
17530		int x;
17531		if(p == -1) {
17532			perror("fork");
17533			return 1;
17534		}
17535		FD_ZERO(&rset);
17536		FD_SET(sfd, &rset);
17537		if(select(sfd+1, &rset, NULL, NULL, NULL) < 1) {
17538			perror("select");
17539			return 1;
17540		}
17541		i = 0;
17542		while(i < num) {
17543			if(recv(sfd, &x, sizeof(x), 0) != sizeof(x)) {
17544				if(errno == EAGAIN)
17545					continue;
17546				perror("recv");
17547				return 1;
17548			}
17549			i++;
17550		}
17551		/* now we want to get EAGAIN: nonblocking goodness */
17552		errno = 0;
17553		recv(sfd, &x, sizeof(x), 0);
17554		if(errno != EAGAIN) {
17555			perror("trying to recv again");
17556			return 1;
17557		}
17558		/* EAGAIN encountered */
17559	}
17560
17561	close(sfd);
17562	close(cfd);
17563	return 0;
17564}
17565
17566_ACEOF
17567if ac_fn_c_try_run "$LINENO"
17568then :
17569
17570	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17571printf "%s\n" "yes" >&6; }
17572
17573else $as_nop
17574
17575	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
17576printf "%s\n" "no" >&6; }
17577
17578printf "%s\n" "#define NONBLOCKING_IS_BROKEN 1" >>confdefs.h
17579
17580
17581fi
17582rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17583  conftest.$ac_objext conftest.beam conftest.$ac_ext
17584fi
17585
17586fi
17587
17588
17589{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mkdir has one arg" >&5
17590printf %s "checking whether mkdir has one arg... " >&6; }
17591cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17592/* end confdefs.h.  */
17593
17594#include <stdio.h>
17595#include <unistd.h>
17596#ifdef HAVE_WINSOCK2_H
17597#include <winsock2.h>
17598#endif
17599#ifdef HAVE_SYS_STAT_H
17600#include <sys/stat.h>
17601#endif
17602
17603int
17604main (void)
17605{
17606
17607	(void)mkdir("directory");
17608
17609  ;
17610  return 0;
17611}
17612_ACEOF
17613if ac_fn_c_try_compile "$LINENO"
17614then :
17615  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17616printf "%s\n" "yes" >&6; }
17617
17618printf "%s\n" "#define MKDIR_HAS_ONE_ARG 1" >>confdefs.h
17619
17620
17621else $as_nop
17622  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
17623printf "%s\n" "no" >&6; }
17624
17625fi
17626rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
17627
17628
17629  for ac_func in strptime
17630do :
17631  ac_fn_c_check_func "$LINENO" "strptime" "ac_cv_func_strptime"
17632if test "x$ac_cv_func_strptime" = xyes
17633then :
17634  printf "%s\n" "#define HAVE_STRPTIME 1" >>confdefs.h
17635
17636{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether strptime works" >&5
17637printf %s "checking whether strptime works... " >&6; }
17638if test c${cross_compiling} = cno; then
17639if test "$cross_compiling" = yes
17640then :
17641  eval "ac_cv_c_strptime_works=maybe"
17642else $as_nop
17643  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17644/* end confdefs.h.  */
17645
17646#define _XOPEN_SOURCE 600
17647#include <time.h>
17648int main(void) { struct tm tm; char *res;
17649res = 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);
17650if (!res) return 2;
17651res = strptime("20070207111842", "%Y%m%d%H%M%S", &tm);
17652if (!res) return 1; return 0; }
17653
17654_ACEOF
17655if ac_fn_c_try_run "$LINENO"
17656then :
17657  eval "ac_cv_c_strptime_works=yes"
17658else $as_nop
17659  eval "ac_cv_c_strptime_works=no"
17660fi
17661rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17662  conftest.$ac_objext conftest.beam conftest.$ac_ext
17663fi
17664
17665else
17666eval "ac_cv_c_strptime_works=maybe"
17667fi
17668{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_strptime_works" >&5
17669printf "%s\n" "$ac_cv_c_strptime_works" >&6; }
17670if test $ac_cv_c_strptime_works = no; then
17671case " $LIBOBJS " in
17672  *" strptime.$ac_objext "* ) ;;
17673  *) LIBOBJS="$LIBOBJS strptime.$ac_objext"
17674 ;;
17675esac
17676
17677else
17678
17679printf "%s\n" "#define STRPTIME_WORKS 1" >>confdefs.h
17680
17681fi
17682
17683else $as_nop
17684  case " $LIBOBJS " in
17685  *" strptime.$ac_objext "* ) ;;
17686  *) LIBOBJS="$LIBOBJS strptime.$ac_objext"
17687 ;;
17688esac
17689
17690fi
17691
17692done
17693
17694# check if we can use SO_REUSEPORT
17695reuseport_default=0
17696if echo "$host" | $GREP -i -e linux >/dev/null; then reuseport_default=1; fi
17697if echo "$host" | $GREP -i -e dragonfly >/dev/null; then reuseport_default=1; fi
17698if test "$reuseport_default" = 1; then
17699
17700printf "%s\n" "#define REUSEPORT_DEFAULT 1" >>confdefs.h
17701
17702else
17703
17704printf "%s\n" "#define REUSEPORT_DEFAULT 0" >>confdefs.h
17705
17706fi
17707
17708# Include systemd.m4 - begin
17709#   macros for configuring systemd
17710#   Copyright 2015, Sami Kerola, CloudFlare.
17711#   BSD licensed.
17712# Check whether --enable-systemd was given.
17713if test ${enable_systemd+y}
17714then :
17715  enableval=$enable_systemd;
17716else $as_nop
17717  enable_systemd=no
17718fi
17719
17720have_systemd=no
17721if test "x$enable_systemd" != xno
17722then :
17723
17724    if test -n "$PKG_CONFIG"; then
17725		have_systemd=no
17726
17727pkg_failed=no
17728{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for SYSTEMD" >&5
17729printf %s "checking for SYSTEMD... " >&6; }
17730
17731if test -n "$SYSTEMD_CFLAGS"; then
17732    pkg_cv_SYSTEMD_CFLAGS="$SYSTEMD_CFLAGS"
17733 elif test -n "$PKG_CONFIG"; then
17734    if test -n "$PKG_CONFIG" && \
17735    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libsystemd\""; } >&5
17736  ($PKG_CONFIG --exists --print-errors "libsystemd") 2>&5
17737  ac_status=$?
17738  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
17739  test $ac_status = 0; }; then
17740  pkg_cv_SYSTEMD_CFLAGS=`$PKG_CONFIG --cflags "libsystemd" 2>/dev/null`
17741		      test "x$?" != "x0" && pkg_failed=yes
17742else
17743  pkg_failed=yes
17744fi
17745 else
17746    pkg_failed=untried
17747fi
17748if test -n "$SYSTEMD_LIBS"; then
17749    pkg_cv_SYSTEMD_LIBS="$SYSTEMD_LIBS"
17750 elif test -n "$PKG_CONFIG"; then
17751    if test -n "$PKG_CONFIG" && \
17752    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libsystemd\""; } >&5
17753  ($PKG_CONFIG --exists --print-errors "libsystemd") 2>&5
17754  ac_status=$?
17755  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
17756  test $ac_status = 0; }; then
17757  pkg_cv_SYSTEMD_LIBS=`$PKG_CONFIG --libs "libsystemd" 2>/dev/null`
17758		      test "x$?" != "x0" && pkg_failed=yes
17759else
17760  pkg_failed=yes
17761fi
17762 else
17763    pkg_failed=untried
17764fi
17765
17766
17767
17768if test $pkg_failed = yes; then
17769   	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
17770printf "%s\n" "no" >&6; }
17771
17772if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
17773        _pkg_short_errors_supported=yes
17774else
17775        _pkg_short_errors_supported=no
17776fi
17777        if test $_pkg_short_errors_supported = yes; then
17778	        SYSTEMD_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libsystemd" 2>&1`
17779        else
17780	        SYSTEMD_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libsystemd" 2>&1`
17781        fi
17782	# Put the nasty error message in config.log where it belongs
17783	echo "$SYSTEMD_PKG_ERRORS" >&5
17784
17785	as_fn_error $? "Package requirements (libsystemd) were not met:
17786
17787$SYSTEMD_PKG_ERRORS
17788
17789Consider adjusting the PKG_CONFIG_PATH environment variable if you
17790installed software in a non-standard prefix.
17791
17792Alternatively, you may set the environment variables SYSTEMD_CFLAGS
17793and SYSTEMD_LIBS to avoid the need to call pkg-config.
17794See the pkg-config man page for more details." "$LINENO" 5
17795elif test $pkg_failed = untried; then
17796     	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
17797printf "%s\n" "no" >&6; }
17798	{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
17799printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
17800as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
17801is in your PATH or set the PKG_CONFIG environment variable to the full
17802path to pkg-config.
17803
17804Alternatively, you may set the environment variables SYSTEMD_CFLAGS
17805and SYSTEMD_LIBS to avoid the need to call pkg-config.
17806See the pkg-config man page for more details.
17807
17808To get pkg-config, see <http://pkg-config.freedesktop.org/>.
17809See \`config.log' for more details" "$LINENO" 5; }
17810else
17811	SYSTEMD_CFLAGS=$pkg_cv_SYSTEMD_CFLAGS
17812	SYSTEMD_LIBS=$pkg_cv_SYSTEMD_LIBS
17813        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17814printf "%s\n" "yes" >&6; }
17815	have_systemd=yes
17816fi
17817		if test "x$have_systemd" != "xyes"
17818then :
17819
17820		have_systemd_daemon=no
17821
17822pkg_failed=no
17823{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for SYSTEMD_DAEMON" >&5
17824printf %s "checking for SYSTEMD_DAEMON... " >&6; }
17825
17826if test -n "$SYSTEMD_DAEMON_CFLAGS"; then
17827    pkg_cv_SYSTEMD_DAEMON_CFLAGS="$SYSTEMD_DAEMON_CFLAGS"
17828 elif test -n "$PKG_CONFIG"; then
17829    if test -n "$PKG_CONFIG" && \
17830    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libsystemd-daemon\""; } >&5
17831  ($PKG_CONFIG --exists --print-errors "libsystemd-daemon") 2>&5
17832  ac_status=$?
17833  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
17834  test $ac_status = 0; }; then
17835  pkg_cv_SYSTEMD_DAEMON_CFLAGS=`$PKG_CONFIG --cflags "libsystemd-daemon" 2>/dev/null`
17836		      test "x$?" != "x0" && pkg_failed=yes
17837else
17838  pkg_failed=yes
17839fi
17840 else
17841    pkg_failed=untried
17842fi
17843if test -n "$SYSTEMD_DAEMON_LIBS"; then
17844    pkg_cv_SYSTEMD_DAEMON_LIBS="$SYSTEMD_DAEMON_LIBS"
17845 elif test -n "$PKG_CONFIG"; then
17846    if test -n "$PKG_CONFIG" && \
17847    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libsystemd-daemon\""; } >&5
17848  ($PKG_CONFIG --exists --print-errors "libsystemd-daemon") 2>&5
17849  ac_status=$?
17850  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
17851  test $ac_status = 0; }; then
17852  pkg_cv_SYSTEMD_DAEMON_LIBS=`$PKG_CONFIG --libs "libsystemd-daemon" 2>/dev/null`
17853		      test "x$?" != "x0" && pkg_failed=yes
17854else
17855  pkg_failed=yes
17856fi
17857 else
17858    pkg_failed=untried
17859fi
17860
17861
17862
17863if test $pkg_failed = yes; then
17864   	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
17865printf "%s\n" "no" >&6; }
17866
17867if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
17868        _pkg_short_errors_supported=yes
17869else
17870        _pkg_short_errors_supported=no
17871fi
17872        if test $_pkg_short_errors_supported = yes; then
17873	        SYSTEMD_DAEMON_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libsystemd-daemon" 2>&1`
17874        else
17875	        SYSTEMD_DAEMON_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libsystemd-daemon" 2>&1`
17876        fi
17877	# Put the nasty error message in config.log where it belongs
17878	echo "$SYSTEMD_DAEMON_PKG_ERRORS" >&5
17879
17880	as_fn_error $? "Package requirements (libsystemd-daemon) were not met:
17881
17882$SYSTEMD_DAEMON_PKG_ERRORS
17883
17884Consider adjusting the PKG_CONFIG_PATH environment variable if you
17885installed software in a non-standard prefix.
17886
17887Alternatively, you may set the environment variables SYSTEMD_DAEMON_CFLAGS
17888and SYSTEMD_DAEMON_LIBS to avoid the need to call pkg-config.
17889See the pkg-config man page for more details." "$LINENO" 5
17890elif test $pkg_failed = untried; then
17891     	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
17892printf "%s\n" "no" >&6; }
17893	{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
17894printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
17895as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
17896is in your PATH or set the PKG_CONFIG environment variable to the full
17897path to pkg-config.
17898
17899Alternatively, you may set the environment variables SYSTEMD_DAEMON_CFLAGS
17900and SYSTEMD_DAEMON_LIBS to avoid the need to call pkg-config.
17901See the pkg-config man page for more details.
17902
17903To get pkg-config, see <http://pkg-config.freedesktop.org/>.
17904See \`config.log' for more details" "$LINENO" 5; }
17905else
17906	SYSTEMD_DAEMON_CFLAGS=$pkg_cv_SYSTEMD_DAEMON_CFLAGS
17907	SYSTEMD_DAEMON_LIBS=$pkg_cv_SYSTEMD_DAEMON_LIBS
17908        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17909printf "%s\n" "yes" >&6; }
17910	have_systemd_daemon=yes
17911fi
17912		if test "x$have_systemd_daemon" = "xyes"
17913then :
17914  have_systemd=yes
17915fi
17916
17917fi
17918	case $enable_systemd:$have_systemd in #(
17919  yes:no) :
17920    as_fn_error $? "systemd enabled but libsystemd not found" "$LINENO" 5 ;; #(
17921  *:yes) :
17922
17923printf "%s\n" "#define HAVE_SYSTEMD 1" >>confdefs.h
17924
17925		LIBS="$LIBS $SYSTEMD_LIBS"
17926
17927	 ;; #(
17928  *) :
17929     ;;
17930esac
17931    else
17932    	as_fn_error $? "systemd enabled but need pkg-config to configure for it" "$LINENO" 5
17933    fi
17934
17935fi
17936 if test "x$have_systemd" = xyes; then
17937  USE_SYSTEMD_TRUE=
17938  USE_SYSTEMD_FALSE='#'
17939else
17940  USE_SYSTEMD_TRUE='#'
17941  USE_SYSTEMD_FALSE=
17942fi
17943
17944
17945# Include systemd.m4 - end
17946
17947# set memory allocation checking if requested
17948# Check whether --enable-alloc-checks was given.
17949if test ${enable_alloc_checks+y}
17950then :
17951  enableval=$enable_alloc_checks;
17952fi
17953
17954# Check whether --enable-alloc-lite was given.
17955if test ${enable_alloc_lite+y}
17956then :
17957  enableval=$enable_alloc_lite;
17958fi
17959
17960# Check whether --enable-alloc-nonregional was given.
17961if test ${enable_alloc_nonregional+y}
17962then :
17963  enableval=$enable_alloc_nonregional;
17964fi
17965
17966if test x_$enable_alloc_nonregional = x_yes; then
17967
17968printf "%s\n" "#define UNBOUND_ALLOC_NONREGIONAL 1" >>confdefs.h
17969
17970fi
17971if test x_$enable_alloc_checks = x_yes; then
17972
17973printf "%s\n" "#define UNBOUND_ALLOC_STATS 1" >>confdefs.h
17974
17975	SLDNS_ALLOCCHECK_EXTRA_OBJ="alloc.lo log.lo"
17976
17977	ASYNCLOOK_ALLOCCHECK_EXTRA_OBJ="alloc.lo"
17978
17979else
17980	if test x_$enable_alloc_lite = x_yes; then
17981
17982printf "%s\n" "#define UNBOUND_ALLOC_LITE 1" >>confdefs.h
17983
17984	else
17985
17986	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible malloc" >&5
17987printf %s "checking for GNU libc compatible malloc... " >&6; }
17988	if test "$cross_compiling" = yes
17989then :
17990  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no (crosscompile)" >&5
17991printf "%s\n" "no (crosscompile)" >&6; }
17992	case " $LIBOBJS " in
17993  *" malloc.$ac_objext "* ) ;;
17994  *) LIBOBJS="$LIBOBJS malloc.$ac_objext"
17995 ;;
17996esac
17997
17998
17999printf "%s\n" "#define malloc rpl_malloc_unbound" >>confdefs.h
18000
18001else $as_nop
18002  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18003/* end confdefs.h.  */
18004#if defined STDC_HEADERS || defined HAVE_STDLIB_H
18005#include <stdlib.h>
18006#else
18007char *malloc ();
18008#endif
18009
18010int
18011main (void)
18012{
18013 if(malloc(0) != 0) return 1;
18014  ;
18015  return 0;
18016}
18017
18018_ACEOF
18019if ac_fn_c_try_run "$LINENO"
18020then :
18021  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
18022printf "%s\n" "no" >&6; }
18023	case " $LIBOBJS " in
18024  *" malloc.$ac_objext "* ) ;;
18025  *) LIBOBJS="$LIBOBJS malloc.$ac_objext"
18026 ;;
18027esac
18028
18029
18030printf "%s\n" "#define malloc rpl_malloc_unbound" >>confdefs.h
18031
18032else $as_nop
18033  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
18034printf "%s\n" "yes" >&6; }
18035
18036printf "%s\n" "#define HAVE_MALLOC 1" >>confdefs.h
18037
18038fi
18039rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18040  conftest.$ac_objext conftest.beam conftest.$ac_ext
18041fi
18042
18043
18044	fi
18045fi
18046
18047# check windows threads (we use them, not pthreads, on windows).
18048if test "$on_mingw" = "yes"; then
18049# check windows threads
18050	ac_fn_c_check_header_compile "$LINENO" "windows.h" "ac_cv_header_windows_h" "$ac_includes_default
18051"
18052if test "x$ac_cv_header_windows_h" = xyes
18053then :
18054  printf "%s\n" "#define HAVE_WINDOWS_H 1" >>confdefs.h
18055
18056fi
18057
18058	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for CreateThread" >&5
18059printf %s "checking for CreateThread... " >&6; }
18060	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18061/* end confdefs.h.  */
18062
18063#ifdef HAVE_WINDOWS_H
18064#include <windows.h>
18065#endif
18066
18067int
18068main (void)
18069{
18070
18071	HANDLE t = CreateThread(NULL, 0, NULL, NULL, 0, NULL);
18072
18073  ;
18074  return 0;
18075}
18076_ACEOF
18077if ac_fn_c_try_compile "$LINENO"
18078then :
18079  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
18080printf "%s\n" "yes" >&6; }
18081
18082printf "%s\n" "#define HAVE_WINDOWS_THREADS 1" >>confdefs.h
18083
18084
18085else $as_nop
18086  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
18087printf "%s\n" "no" >&6; }
18088
18089fi
18090rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
18091
18092else
18093# not on mingw, check thread libraries.
18094
18095# check for thread library.
18096# check this first, so that the pthread lib does not get linked in via
18097# libssl or libpython, and thus distorts the tests, and we end up using
18098# the non-threadsafe C libraries.
18099
18100# Check whether --with-pthreads was given.
18101if test ${with_pthreads+y}
18102then :
18103  withval=$with_pthreads;
18104else $as_nop
18105   withval="yes"
18106fi
18107
18108ub_have_pthreads=no
18109if test x_$withval != x_no; then
18110
18111
18112
18113
18114ac_ext=c
18115ac_cpp='$CPP $CPPFLAGS'
18116ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
18117ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
18118ac_compiler_gnu=$ac_cv_c_compiler_gnu
18119
18120ax_pthread_ok=no
18121
18122# We used to check for pthread.h first, but this fails if pthread.h
18123# requires special compiler flags (e.g. on Tru64 or Sequent).
18124# It gets checked for in the link test anyway.
18125
18126# First of all, check if the user has set any of the PTHREAD_LIBS,
18127# etcetera environment variables, and if threads linking works using
18128# them:
18129if test "x$PTHREAD_CFLAGS$PTHREAD_LIBS" != "x"; then
18130        ax_pthread_save_CC="$CC"
18131        ax_pthread_save_CFLAGS="$CFLAGS"
18132        ax_pthread_save_LIBS="$LIBS"
18133        if test "x$PTHREAD_CC" != "x"
18134then :
18135  CC="$PTHREAD_CC"
18136fi
18137        if test "x$PTHREAD_CXX" != "x"
18138then :
18139  CXX="$PTHREAD_CXX"
18140fi
18141        CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
18142        LIBS="$PTHREAD_LIBS $LIBS"
18143        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS" >&5
18144printf %s "checking for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS... " >&6; }
18145        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18146/* end confdefs.h.  */
18147
18148/* Override any GCC internal prototype to avoid an error.
18149   Use char because int might match the return type of a GCC
18150   builtin and then its argument prototype would still apply.  */
18151char pthread_join ();
18152int
18153main (void)
18154{
18155return pthread_join ();
18156  ;
18157  return 0;
18158}
18159_ACEOF
18160if ac_fn_c_try_link "$LINENO"
18161then :
18162  ax_pthread_ok=yes
18163fi
18164rm -f core conftest.err conftest.$ac_objext conftest.beam \
18165    conftest$ac_exeext conftest.$ac_ext
18166        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
18167printf "%s\n" "$ax_pthread_ok" >&6; }
18168        if test "x$ax_pthread_ok" = "xno"; then
18169                PTHREAD_LIBS=""
18170                PTHREAD_CFLAGS=""
18171        fi
18172        CC="$ax_pthread_save_CC"
18173        CFLAGS="$ax_pthread_save_CFLAGS"
18174        LIBS="$ax_pthread_save_LIBS"
18175fi
18176
18177# We must check for the threads library under a number of different
18178# names; the ordering is very important because some systems
18179# (e.g. DEC) have both -lpthread and -lpthreads, where one of the
18180# libraries is broken (non-POSIX).
18181
18182# Create a list of thread flags to try. Items with a "," contain both
18183# C compiler flags (before ",") and linker flags (after ","). Other items
18184# starting with a "-" are C compiler flags, and remaining items are
18185# library names, except for "none" which indicates that we try without
18186# any flags at all, and "pthread-config" which is a program returning
18187# the flags for the Pth emulation library.
18188
18189ax_pthread_flags="pthreads none -Kthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config"
18190
18191# The ordering *is* (sometimes) important.  Some notes on the
18192# individual items follow:
18193
18194# pthreads: AIX (must check this before -lpthread)
18195# none: in case threads are in libc; should be tried before -Kthread and
18196#       other compiler flags to prevent continual compiler warnings
18197# -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h)
18198# -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads), Tru64
18199#           (Note: HP C rejects this with "bad form for `-t' option")
18200# -pthreads: Solaris/gcc (Note: HP C also rejects)
18201# -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
18202#      doesn't hurt to check since this sometimes defines pthreads and
18203#      -D_REENTRANT too), HP C (must be checked before -lpthread, which
18204#      is present but should not be used directly; and before -mthreads,
18205#      because the compiler interprets this as "-mt" + "-hreads")
18206# -mthreads: Mingw32/gcc, Lynx/gcc
18207# pthread: Linux, etcetera
18208# --thread-safe: KAI C++
18209# pthread-config: use pthread-config program (for GNU Pth library)
18210
18211case $host_os in
18212
18213        freebsd*)
18214
18215        # -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
18216        # lthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
18217
18218        ax_pthread_flags="-kthread lthread $ax_pthread_flags"
18219        ;;
18220
18221        hpux*)
18222
18223        # From the cc(1) man page: "[-mt] Sets various -D flags to enable
18224        # multi-threading and also sets -lpthread."
18225
18226        ax_pthread_flags="-mt -pthread pthread $ax_pthread_flags"
18227        ;;
18228
18229        openedition*)
18230
18231        # IBM z/OS requires a feature-test macro to be defined in order to
18232        # enable POSIX threads at all, so give the user a hint if this is
18233        # not set. (We don't define these ourselves, as they can affect
18234        # other portions of the system API in unpredictable ways.)
18235
18236        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18237/* end confdefs.h.  */
18238
18239#            if !defined(_OPEN_THREADS) && !defined(_UNIX03_THREADS)
18240             AX_PTHREAD_ZOS_MISSING
18241#            endif
18242
18243_ACEOF
18244if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
18245  $EGREP "AX_PTHREAD_ZOS_MISSING" >/dev/null 2>&1
18246then :
18247  { 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
18248printf "%s\n" "$as_me: WARNING: IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support." >&2;}
18249fi
18250rm -rf conftest*
18251
18252        ;;
18253
18254        solaris*)
18255
18256        # On Solaris (at least, for some versions), libc contains stubbed
18257        # (non-functional) versions of the pthreads routines, so link-based
18258        # tests will erroneously succeed. (N.B.: The stubs are missing
18259        # pthread_cleanup_push, or rather a function called by this macro,
18260        # so we could check for that, but who knows whether they'll stub
18261        # that too in a future libc.)  So we'll check first for the
18262        # standard Solaris way of linking pthreads (-mt -lpthread).
18263
18264        ax_pthread_flags="-mt,-lpthread pthread $ax_pthread_flags"
18265        ;;
18266esac
18267
18268# Are we compiling with Clang?
18269
18270{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC is Clang" >&5
18271printf %s "checking whether $CC is Clang... " >&6; }
18272if test ${ax_cv_PTHREAD_CLANG+y}
18273then :
18274  printf %s "(cached) " >&6
18275else $as_nop
18276  ax_cv_PTHREAD_CLANG=no
18277     # Note that Autoconf sets GCC=yes for Clang as well as GCC
18278     if test "x$GCC" = "xyes"; then
18279        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18280/* end confdefs.h.  */
18281/* Note: Clang 2.7 lacks __clang_[a-z]+__ */
18282#            if defined(__clang__) && defined(__llvm__)
18283             AX_PTHREAD_CC_IS_CLANG
18284#            endif
18285
18286_ACEOF
18287if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
18288  $EGREP "AX_PTHREAD_CC_IS_CLANG" >/dev/null 2>&1
18289then :
18290  ax_cv_PTHREAD_CLANG=yes
18291fi
18292rm -rf conftest*
18293
18294     fi
18295
18296fi
18297{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_CLANG" >&5
18298printf "%s\n" "$ax_cv_PTHREAD_CLANG" >&6; }
18299ax_pthread_clang="$ax_cv_PTHREAD_CLANG"
18300
18301
18302# GCC generally uses -pthread, or -pthreads on some platforms (e.g. SPARC)
18303
18304# Note that for GCC and Clang -pthread generally implies -lpthread,
18305# except when -nostdlib is passed.
18306# This is problematic using libtool to build C++ shared libraries with pthread:
18307# [1] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=25460
18308# [2] https://bugzilla.redhat.com/show_bug.cgi?id=661333
18309# [3] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=468555
18310# To solve this, first try -pthread together with -lpthread for GCC
18311
18312if test "x$GCC" = "xyes"
18313then :
18314  ax_pthread_flags="-pthread,-lpthread -pthread -pthreads $ax_pthread_flags"
18315fi
18316
18317# Clang takes -pthread (never supported any other flag), but we'll try with -lpthread first
18318
18319if test "x$ax_pthread_clang" = "xyes"
18320then :
18321  ax_pthread_flags="-pthread,-lpthread -pthread"
18322fi
18323
18324
18325# The presence of a feature test macro requesting re-entrant function
18326# definitions is, on some systems, a strong hint that pthreads support is
18327# correctly enabled
18328
18329case $host_os in
18330        darwin* | hpux* | linux* | osf* | solaris*)
18331        ax_pthread_check_macro="_REENTRANT"
18332        ;;
18333
18334        aix*)
18335        ax_pthread_check_macro="_THREAD_SAFE"
18336        ;;
18337
18338        *)
18339        ax_pthread_check_macro="--"
18340        ;;
18341esac
18342if test "x$ax_pthread_check_macro" = "x--"
18343then :
18344  ax_pthread_check_cond=0
18345else $as_nop
18346  ax_pthread_check_cond="!defined($ax_pthread_check_macro)"
18347fi
18348
18349
18350if test "x$ax_pthread_ok" = "xno"; then
18351for ax_pthread_try_flag in $ax_pthread_flags; do
18352
18353        case $ax_pthread_try_flag in
18354                none)
18355                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether pthreads work without any flags" >&5
18356printf %s "checking whether pthreads work without any flags... " >&6; }
18357                ;;
18358
18359                *,*)
18360                PTHREAD_CFLAGS=`echo $ax_pthread_try_flag | sed "s/^\(.*\),\(.*\)$/\1/"`
18361                PTHREAD_LIBS=`echo $ax_pthread_try_flag | sed "s/^\(.*\),\(.*\)$/\2/"`
18362                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with \"$PTHREAD_CFLAGS\" and \"$PTHREAD_LIBS\"" >&5
18363printf %s "checking whether pthreads work with \"$PTHREAD_CFLAGS\" and \"$PTHREAD_LIBS\"... " >&6; }
18364                ;;
18365
18366                -*)
18367                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with $ax_pthread_try_flag" >&5
18368printf %s "checking whether pthreads work with $ax_pthread_try_flag... " >&6; }
18369                PTHREAD_CFLAGS="$ax_pthread_try_flag"
18370                ;;
18371
18372                pthread-config)
18373                # Extract the first word of "pthread-config", so it can be a program name with args.
18374set dummy pthread-config; ac_word=$2
18375{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18376printf %s "checking for $ac_word... " >&6; }
18377if test ${ac_cv_prog_ax_pthread_config+y}
18378then :
18379  printf %s "(cached) " >&6
18380else $as_nop
18381  if test -n "$ax_pthread_config"; then
18382  ac_cv_prog_ax_pthread_config="$ax_pthread_config" # Let the user override the test.
18383else
18384as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18385for as_dir in $PATH
18386do
18387  IFS=$as_save_IFS
18388  case $as_dir in #(((
18389    '') as_dir=./ ;;
18390    */) ;;
18391    *) as_dir=$as_dir/ ;;
18392  esac
18393    for ac_exec_ext in '' $ac_executable_extensions; do
18394  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
18395    ac_cv_prog_ax_pthread_config="yes"
18396    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
18397    break 2
18398  fi
18399done
18400  done
18401IFS=$as_save_IFS
18402
18403  test -z "$ac_cv_prog_ax_pthread_config" && ac_cv_prog_ax_pthread_config="no"
18404fi
18405fi
18406ax_pthread_config=$ac_cv_prog_ax_pthread_config
18407if test -n "$ax_pthread_config"; then
18408  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_config" >&5
18409printf "%s\n" "$ax_pthread_config" >&6; }
18410else
18411  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
18412printf "%s\n" "no" >&6; }
18413fi
18414
18415
18416                if test "x$ax_pthread_config" = "xno"
18417then :
18418  continue
18419fi
18420                PTHREAD_CFLAGS="`pthread-config --cflags`"
18421                PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`"
18422                ;;
18423
18424                *)
18425                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for the pthreads library -l$ax_pthread_try_flag" >&5
18426printf %s "checking for the pthreads library -l$ax_pthread_try_flag... " >&6; }
18427                PTHREAD_LIBS="-l$ax_pthread_try_flag"
18428                ;;
18429        esac
18430
18431        ax_pthread_save_CFLAGS="$CFLAGS"
18432        ax_pthread_save_LIBS="$LIBS"
18433        CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
18434        LIBS="$PTHREAD_LIBS $LIBS"
18435
18436        # Check for various functions.  We must include pthread.h,
18437        # since some functions may be macros.  (On the Sequent, we
18438        # need a special flag -Kthread to make this header compile.)
18439        # We check for pthread_join because it is in -lpthread on IRIX
18440        # while pthread_create is in libc.  We check for pthread_attr_init
18441        # due to DEC craziness with -lpthreads.  We check for
18442        # pthread_cleanup_push because it is one of the few pthread
18443        # functions on Solaris that doesn't have a non-functional libc stub.
18444        # We try pthread_create on general principles.
18445
18446        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18447/* end confdefs.h.  */
18448#include <pthread.h>
18449#                       if $ax_pthread_check_cond
18450#                        error "$ax_pthread_check_macro must be defined"
18451#                       endif
18452                        static void *some_global = NULL;
18453                        static void routine(void *a)
18454                          {
18455                             /* To avoid any unused-parameter or
18456                                unused-but-set-parameter warning.  */
18457                             some_global = a;
18458                          }
18459                        static void *start_routine(void *a) { return a; }
18460int
18461main (void)
18462{
18463pthread_t th; pthread_attr_t attr;
18464                        pthread_create(&th, 0, start_routine, 0);
18465                        pthread_join(th, 0);
18466                        pthread_attr_init(&attr);
18467                        pthread_cleanup_push(routine, 0);
18468                        pthread_cleanup_pop(0) /* ; */
18469  ;
18470  return 0;
18471}
18472_ACEOF
18473if ac_fn_c_try_link "$LINENO"
18474then :
18475  ax_pthread_ok=yes
18476fi
18477rm -f core conftest.err conftest.$ac_objext conftest.beam \
18478    conftest$ac_exeext conftest.$ac_ext
18479
18480        CFLAGS="$ax_pthread_save_CFLAGS"
18481        LIBS="$ax_pthread_save_LIBS"
18482
18483        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
18484printf "%s\n" "$ax_pthread_ok" >&6; }
18485        if test "x$ax_pthread_ok" = "xyes"
18486then :
18487  break
18488fi
18489
18490        PTHREAD_LIBS=""
18491        PTHREAD_CFLAGS=""
18492done
18493fi
18494
18495
18496# Clang needs special handling, because older versions handle the -pthread
18497# option in a rather... idiosyncratic way
18498
18499if test "x$ax_pthread_clang" = "xyes"; then
18500
18501        # Clang takes -pthread; it has never supported any other flag
18502
18503        # (Note 1: This will need to be revisited if a system that Clang
18504        # supports has POSIX threads in a separate library.  This tends not
18505        # to be the way of modern systems, but it's conceivable.)
18506
18507        # (Note 2: On some systems, notably Darwin, -pthread is not needed
18508        # to get POSIX threads support; the API is always present and
18509        # active.  We could reasonably leave PTHREAD_CFLAGS empty.  But
18510        # -pthread does define _REENTRANT, and while the Darwin headers
18511        # ignore this macro, third-party headers might not.)
18512
18513        # However, older versions of Clang make a point of warning the user
18514        # that, in an invocation where only linking and no compilation is
18515        # taking place, the -pthread option has no effect ("argument unused
18516        # during compilation").  They expect -pthread to be passed in only
18517        # when source code is being compiled.
18518        #
18519        # Problem is, this is at odds with the way Automake and most other
18520        # C build frameworks function, which is that the same flags used in
18521        # compilation (CFLAGS) are also used in linking.  Many systems
18522        # supported by AX_PTHREAD require exactly this for POSIX threads
18523        # support, and in fact it is often not straightforward to specify a
18524        # flag that is used only in the compilation phase and not in
18525        # linking.  Such a scenario is extremely rare in practice.
18526        #
18527        # Even though use of the -pthread flag in linking would only print
18528        # a warning, this can be a nuisance for well-run software projects
18529        # that build with -Werror.  So if the active version of Clang has
18530        # this misfeature, we search for an option to squash it.
18531
18532        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether Clang needs flag to prevent \"argument unused\" warning when linking with -pthread" >&5
18533printf %s "checking whether Clang needs flag to prevent \"argument unused\" warning when linking with -pthread... " >&6; }
18534if test ${ax_cv_PTHREAD_CLANG_NO_WARN_FLAG+y}
18535then :
18536  printf %s "(cached) " >&6
18537else $as_nop
18538  ax_cv_PTHREAD_CLANG_NO_WARN_FLAG=unknown
18539             # Create an alternate version of $ac_link that compiles and
18540             # links in two steps (.c -> .o, .o -> exe) instead of one
18541             # (.c -> exe), because the warning occurs only in the second
18542             # step
18543             ax_pthread_save_ac_link="$ac_link"
18544             ax_pthread_sed='s/conftest\.\$ac_ext/conftest.$ac_objext/g'
18545             ax_pthread_link_step=`printf "%s\n" "$ac_link" | sed "$ax_pthread_sed"`
18546             ax_pthread_2step_ac_link="($ac_compile) && (echo ==== >&5) && ($ax_pthread_link_step)"
18547             ax_pthread_save_CFLAGS="$CFLAGS"
18548             for ax_pthread_try in '' -Qunused-arguments -Wno-unused-command-line-argument unknown; do
18549                if test "x$ax_pthread_try" = "xunknown"
18550then :
18551  break
18552fi
18553                CFLAGS="-Werror -Wunknown-warning-option $ax_pthread_try -pthread $ax_pthread_save_CFLAGS"
18554                ac_link="$ax_pthread_save_ac_link"
18555                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18556/* end confdefs.h.  */
18557int main(void){return 0;}
18558_ACEOF
18559if ac_fn_c_try_link "$LINENO"
18560then :
18561  ac_link="$ax_pthread_2step_ac_link"
18562                     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18563/* end confdefs.h.  */
18564int main(void){return 0;}
18565_ACEOF
18566if ac_fn_c_try_link "$LINENO"
18567then :
18568  break
18569fi
18570rm -f core conftest.err conftest.$ac_objext conftest.beam \
18571    conftest$ac_exeext conftest.$ac_ext
18572
18573fi
18574rm -f core conftest.err conftest.$ac_objext conftest.beam \
18575    conftest$ac_exeext conftest.$ac_ext
18576             done
18577             ac_link="$ax_pthread_save_ac_link"
18578             CFLAGS="$ax_pthread_save_CFLAGS"
18579             if test "x$ax_pthread_try" = "x"
18580then :
18581  ax_pthread_try=no
18582fi
18583             ax_cv_PTHREAD_CLANG_NO_WARN_FLAG="$ax_pthread_try"
18584
18585fi
18586{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" >&5
18587printf "%s\n" "$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" >&6; }
18588
18589        case "$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" in
18590                no | unknown) ;;
18591                *) PTHREAD_CFLAGS="$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG $PTHREAD_CFLAGS" ;;
18592        esac
18593
18594fi # $ax_pthread_clang = yes
18595
18596
18597
18598# Various other checks:
18599if test "x$ax_pthread_ok" = "xyes"; then
18600        ax_pthread_save_CFLAGS="$CFLAGS"
18601        ax_pthread_save_LIBS="$LIBS"
18602        CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
18603        LIBS="$PTHREAD_LIBS $LIBS"
18604
18605        # Detect AIX lossage: JOINABLE attribute is called UNDETACHED.
18606        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for joinable pthread attribute" >&5
18607printf %s "checking for joinable pthread attribute... " >&6; }
18608if test ${ax_cv_PTHREAD_JOINABLE_ATTR+y}
18609then :
18610  printf %s "(cached) " >&6
18611else $as_nop
18612  ax_cv_PTHREAD_JOINABLE_ATTR=unknown
18613             for ax_pthread_attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do
18614                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18615/* end confdefs.h.  */
18616#include <pthread.h>
18617int
18618main (void)
18619{
18620int attr = $ax_pthread_attr; return attr /* ; */
18621  ;
18622  return 0;
18623}
18624_ACEOF
18625if ac_fn_c_try_link "$LINENO"
18626then :
18627  ax_cv_PTHREAD_JOINABLE_ATTR=$ax_pthread_attr; break
18628fi
18629rm -f core conftest.err conftest.$ac_objext conftest.beam \
18630    conftest$ac_exeext conftest.$ac_ext
18631             done
18632
18633fi
18634{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_JOINABLE_ATTR" >&5
18635printf "%s\n" "$ax_cv_PTHREAD_JOINABLE_ATTR" >&6; }
18636        if test "x$ax_cv_PTHREAD_JOINABLE_ATTR" != "xunknown" && \
18637               test "x$ax_cv_PTHREAD_JOINABLE_ATTR" != "xPTHREAD_CREATE_JOINABLE" && \
18638               test "x$ax_pthread_joinable_attr_defined" != "xyes"
18639then :
18640
18641printf "%s\n" "#define PTHREAD_CREATE_JOINABLE $ax_cv_PTHREAD_JOINABLE_ATTR" >>confdefs.h
18642
18643               ax_pthread_joinable_attr_defined=yes
18644
18645fi
18646
18647        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether more special flags are required for pthreads" >&5
18648printf %s "checking whether more special flags are required for pthreads... " >&6; }
18649if test ${ax_cv_PTHREAD_SPECIAL_FLAGS+y}
18650then :
18651  printf %s "(cached) " >&6
18652else $as_nop
18653  ax_cv_PTHREAD_SPECIAL_FLAGS=no
18654             case $host_os in
18655             solaris*)
18656             ax_cv_PTHREAD_SPECIAL_FLAGS="-D_POSIX_PTHREAD_SEMANTICS"
18657             ;;
18658             esac
18659
18660fi
18661{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_SPECIAL_FLAGS" >&5
18662printf "%s\n" "$ax_cv_PTHREAD_SPECIAL_FLAGS" >&6; }
18663        if test "x$ax_cv_PTHREAD_SPECIAL_FLAGS" != "xno" && \
18664               test "x$ax_pthread_special_flags_added" != "xyes"
18665then :
18666  PTHREAD_CFLAGS="$ax_cv_PTHREAD_SPECIAL_FLAGS $PTHREAD_CFLAGS"
18667               ax_pthread_special_flags_added=yes
18668fi
18669
18670        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for PTHREAD_PRIO_INHERIT" >&5
18671printf %s "checking for PTHREAD_PRIO_INHERIT... " >&6; }
18672if test ${ax_cv_PTHREAD_PRIO_INHERIT+y}
18673then :
18674  printf %s "(cached) " >&6
18675else $as_nop
18676  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18677/* end confdefs.h.  */
18678#include <pthread.h>
18679int
18680main (void)
18681{
18682int i = PTHREAD_PRIO_INHERIT;
18683                                               return i;
18684  ;
18685  return 0;
18686}
18687_ACEOF
18688if ac_fn_c_try_link "$LINENO"
18689then :
18690  ax_cv_PTHREAD_PRIO_INHERIT=yes
18691else $as_nop
18692  ax_cv_PTHREAD_PRIO_INHERIT=no
18693fi
18694rm -f core conftest.err conftest.$ac_objext conftest.beam \
18695    conftest$ac_exeext conftest.$ac_ext
18696
18697fi
18698{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_PRIO_INHERIT" >&5
18699printf "%s\n" "$ax_cv_PTHREAD_PRIO_INHERIT" >&6; }
18700        if test "x$ax_cv_PTHREAD_PRIO_INHERIT" = "xyes" && \
18701               test "x$ax_pthread_prio_inherit_defined" != "xyes"
18702then :
18703
18704printf "%s\n" "#define HAVE_PTHREAD_PRIO_INHERIT 1" >>confdefs.h
18705
18706               ax_pthread_prio_inherit_defined=yes
18707
18708fi
18709
18710        CFLAGS="$ax_pthread_save_CFLAGS"
18711        LIBS="$ax_pthread_save_LIBS"
18712
18713        # More AIX lossage: compile with *_r variant
18714        if test "x$GCC" != "xyes"; then
18715            case $host_os in
18716                aix*)
18717                case "x/$CC" in #(
18718  x*/c89|x*/c89_128|x*/c99|x*/c99_128|x*/cc|x*/cc128|x*/xlc|x*/xlc_v6|x*/xlc128|x*/xlc128_v6) :
18719    #handle absolute path differently from PATH based program lookup
18720                     case "x$CC" in #(
18721  x/*) :
18722
18723			   if as_fn_executable_p ${CC}_r
18724then :
18725  PTHREAD_CC="${CC}_r"
18726fi
18727			   if test "x${CXX}" != "x"
18728then :
18729  if as_fn_executable_p ${CXX}_r
18730then :
18731  PTHREAD_CXX="${CXX}_r"
18732fi
18733fi
18734			  ;; #(
18735  *) :
18736
18737			   for ac_prog in ${CC}_r
18738do
18739  # Extract the first word of "$ac_prog", so it can be a program name with args.
18740set dummy $ac_prog; ac_word=$2
18741{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18742printf %s "checking for $ac_word... " >&6; }
18743if test ${ac_cv_prog_PTHREAD_CC+y}
18744then :
18745  printf %s "(cached) " >&6
18746else $as_nop
18747  if test -n "$PTHREAD_CC"; then
18748  ac_cv_prog_PTHREAD_CC="$PTHREAD_CC" # Let the user override the test.
18749else
18750as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18751for as_dir in $PATH
18752do
18753  IFS=$as_save_IFS
18754  case $as_dir in #(((
18755    '') as_dir=./ ;;
18756    */) ;;
18757    *) as_dir=$as_dir/ ;;
18758  esac
18759    for ac_exec_ext in '' $ac_executable_extensions; do
18760  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
18761    ac_cv_prog_PTHREAD_CC="$ac_prog"
18762    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
18763    break 2
18764  fi
18765done
18766  done
18767IFS=$as_save_IFS
18768
18769fi
18770fi
18771PTHREAD_CC=$ac_cv_prog_PTHREAD_CC
18772if test -n "$PTHREAD_CC"; then
18773  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PTHREAD_CC" >&5
18774printf "%s\n" "$PTHREAD_CC" >&6; }
18775else
18776  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
18777printf "%s\n" "no" >&6; }
18778fi
18779
18780
18781  test -n "$PTHREAD_CC" && break
18782done
18783test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
18784
18785			   if test "x${CXX}" != "x"
18786then :
18787  for ac_prog in ${CXX}_r
18788do
18789  # Extract the first word of "$ac_prog", so it can be a program name with args.
18790set dummy $ac_prog; ac_word=$2
18791{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18792printf %s "checking for $ac_word... " >&6; }
18793if test ${ac_cv_prog_PTHREAD_CXX+y}
18794then :
18795  printf %s "(cached) " >&6
18796else $as_nop
18797  if test -n "$PTHREAD_CXX"; then
18798  ac_cv_prog_PTHREAD_CXX="$PTHREAD_CXX" # Let the user override the test.
18799else
18800as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18801for as_dir in $PATH
18802do
18803  IFS=$as_save_IFS
18804  case $as_dir in #(((
18805    '') as_dir=./ ;;
18806    */) ;;
18807    *) as_dir=$as_dir/ ;;
18808  esac
18809    for ac_exec_ext in '' $ac_executable_extensions; do
18810  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
18811    ac_cv_prog_PTHREAD_CXX="$ac_prog"
18812    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
18813    break 2
18814  fi
18815done
18816  done
18817IFS=$as_save_IFS
18818
18819fi
18820fi
18821PTHREAD_CXX=$ac_cv_prog_PTHREAD_CXX
18822if test -n "$PTHREAD_CXX"; then
18823  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PTHREAD_CXX" >&5
18824printf "%s\n" "$PTHREAD_CXX" >&6; }
18825else
18826  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
18827printf "%s\n" "no" >&6; }
18828fi
18829
18830
18831  test -n "$PTHREAD_CXX" && break
18832done
18833test -n "$PTHREAD_CXX" || PTHREAD_CXX="$CXX"
18834
18835fi
18836
18837                      ;;
18838esac
18839                     ;; #(
18840  *) :
18841     ;;
18842esac
18843                ;;
18844            esac
18845        fi
18846fi
18847
18848test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
18849test -n "$PTHREAD_CXX" || PTHREAD_CXX="$CXX"
18850
18851
18852
18853
18854
18855
18856# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
18857if test "x$ax_pthread_ok" = "xyes"; then
18858
18859
18860printf "%s\n" "#define HAVE_PTHREAD 1" >>confdefs.h
18861
18862		if test -n "$PTHREAD_LIBS"; then
18863		  LIBS="$PTHREAD_LIBS $LIBS"
18864		fi
18865		CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
18866		CC="$PTHREAD_CC"
18867		ub_have_pthreads=yes
18868		ac_fn_c_check_type "$LINENO" "pthread_spinlock_t" "ac_cv_type_pthread_spinlock_t" "#include <pthread.h>
18869"
18870if test "x$ac_cv_type_pthread_spinlock_t" = xyes
18871then :
18872
18873printf "%s\n" "#define HAVE_PTHREAD_SPINLOCK_T 1" >>confdefs.h
18874
18875
18876fi
18877ac_fn_c_check_type "$LINENO" "pthread_rwlock_t" "ac_cv_type_pthread_rwlock_t" "#include <pthread.h>
18878"
18879if test "x$ac_cv_type_pthread_rwlock_t" = xyes
18880then :
18881
18882printf "%s\n" "#define HAVE_PTHREAD_RWLOCK_T 1" >>confdefs.h
18883
18884
18885fi
18886
18887		# The cast to long int works around a bug in the HP C Compiler
18888# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
18889# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
18890# This bug is HP SR number 8606223364.
18891{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of unsigned long" >&5
18892printf %s "checking size of unsigned long... " >&6; }
18893if test ${ac_cv_sizeof_unsigned_long+y}
18894then :
18895  printf %s "(cached) " >&6
18896else $as_nop
18897  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned long))" "ac_cv_sizeof_unsigned_long"        "$ac_includes_default"
18898then :
18899
18900else $as_nop
18901  if test "$ac_cv_type_unsigned_long" = yes; then
18902     { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
18903printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
18904as_fn_error 77 "cannot compute sizeof (unsigned long)
18905See \`config.log' for more details" "$LINENO" 5; }
18906   else
18907     ac_cv_sizeof_unsigned_long=0
18908   fi
18909fi
18910
18911fi
18912{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned_long" >&5
18913printf "%s\n" "$ac_cv_sizeof_unsigned_long" >&6; }
18914
18915
18916
18917printf "%s\n" "#define SIZEOF_UNSIGNED_LONG $ac_cv_sizeof_unsigned_long" >>confdefs.h
18918
18919
18920		# The cast to long int works around a bug in the HP C Compiler
18921# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
18922# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
18923# This bug is HP SR number 8606223364.
18924{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
18925printf %s "checking size of pthread_t... " >&6; }
18926if test ${ac_cv_sizeof_pthread_t+y}
18927then :
18928  printf %s "(cached) " >&6
18929else $as_nop
18930  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t"        "$ac_includes_default"
18931then :
18932
18933else $as_nop
18934  if test "$ac_cv_type_pthread_t" = yes; then
18935     { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
18936printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
18937as_fn_error 77 "cannot compute sizeof (pthread_t)
18938See \`config.log' for more details" "$LINENO" 5; }
18939   else
18940     ac_cv_sizeof_pthread_t=0
18941   fi
18942fi
18943
18944fi
18945{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
18946printf "%s\n" "$ac_cv_sizeof_pthread_t" >&6; }
18947
18948
18949
18950printf "%s\n" "#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t" >>confdefs.h
18951
18952
18953
18954		if echo "$CFLAGS" | $GREP -e "-pthread" >/dev/null; then
18955		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if -pthread unused during linking" >&5
18956printf %s "checking if -pthread unused during linking... " >&6; }
18957		# catch clang warning 'argument unused during compilation'
18958		cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18959/* end confdefs.h.  */
18960$ac_includes_default
18961
18962int main(void) {return 0;}
18963
18964_ACEOF
18965		pthread_unused="yes"
18966		# first compile
18967		echo "$CC $CFLAGS -c conftest.c -o conftest.o" >&5
18968		$CC $CFLAGS -c conftest.c -o conftest.o 2>&5 >&5
18969		if test $? = 0; then
18970			# then link
18971			echo "$CC $CFLAGS -Werror $LDFLAGS $LIBS -o conftest contest.o" >&5
18972			$CC $CFLAGS -Werror $LDFLAGS $LIBS -o conftest conftest.o 2>&5 >&5
18973			if test $? -ne 0; then
18974				{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
18975printf "%s\n" "yes" >&6; }
18976				CFLAGS=`echo "$CFLAGS" | sed -e 's/-pthread//'`
18977				PTHREAD_CFLAGS_ONLY="-pthread"
18978
18979			else
18980				{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
18981printf "%s\n" "no" >&6; }
18982			fi
18983		else
18984			{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
18985printf "%s\n" "no" >&6; }
18986		fi # endif cc successful
18987		rm -f conftest conftest.c conftest.o
18988		fi # endif -pthread in CFLAGS
18989
18990
18991        :
18992else
18993        ax_pthread_ok=no
18994
18995fi
18996ac_ext=c
18997ac_cpp='$CPP $CPPFLAGS'
18998ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
18999ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
19000ac_compiler_gnu=$ac_cv_c_compiler_gnu
19001
19002
19003fi
19004
19005# check solaris thread library
19006
19007# Check whether --with-solaris-threads was given.
19008if test ${with_solaris_threads+y}
19009then :
19010  withval=$with_solaris_threads;
19011else $as_nop
19012   withval="no"
19013fi
19014
19015ub_have_sol_threads=no
19016if test x_$withval != x_no; then
19017	if test x_$ub_have_pthreads != x_no; then
19018	    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Have pthreads already, ignoring --with-solaris-threads" >&5
19019printf "%s\n" "$as_me: WARNING: Have pthreads already, ignoring --with-solaris-threads" >&2;}
19020	else
19021	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing thr_create" >&5
19022printf %s "checking for library containing thr_create... " >&6; }
19023if test ${ac_cv_search_thr_create+y}
19024then :
19025  printf %s "(cached) " >&6
19026else $as_nop
19027  ac_func_search_save_LIBS=$LIBS
19028cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19029/* end confdefs.h.  */
19030
19031/* Override any GCC internal prototype to avoid an error.
19032   Use char because int might match the return type of a GCC
19033   builtin and then its argument prototype would still apply.  */
19034char thr_create ();
19035int
19036main (void)
19037{
19038return thr_create ();
19039  ;
19040  return 0;
19041}
19042_ACEOF
19043for ac_lib in '' thread
19044do
19045  if test -z "$ac_lib"; then
19046    ac_res="none required"
19047  else
19048    ac_res=-l$ac_lib
19049    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
19050  fi
19051  if ac_fn_c_try_link "$LINENO"
19052then :
19053  ac_cv_search_thr_create=$ac_res
19054fi
19055rm -f core conftest.err conftest.$ac_objext conftest.beam \
19056    conftest$ac_exeext
19057  if test ${ac_cv_search_thr_create+y}
19058then :
19059  break
19060fi
19061done
19062if test ${ac_cv_search_thr_create+y}
19063then :
19064
19065else $as_nop
19066  ac_cv_search_thr_create=no
19067fi
19068rm conftest.$ac_ext
19069LIBS=$ac_func_search_save_LIBS
19070fi
19071{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_thr_create" >&5
19072printf "%s\n" "$ac_cv_search_thr_create" >&6; }
19073ac_res=$ac_cv_search_thr_create
19074if test "$ac_res" != no
19075then :
19076  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
19077
19078
19079printf "%s\n" "#define HAVE_SOLARIS_THREADS 1" >>confdefs.h
19080
19081
19082
19083
19084{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -mt" >&5
19085printf %s "checking whether $CC supports -mt... " >&6; }
19086cache=`echo mt | sed 'y%.=/+-%___p_%'`
19087if eval test \${cv_prog_cc_flag_$cache+y}
19088then :
19089  printf %s "(cached) " >&6
19090else $as_nop
19091
19092echo 'void f(void){}' >conftest.c
19093if test -z "`$CC $CPPFLAGS $CFLAGS -mt -c conftest.c 2>&1`"; then
19094eval "cv_prog_cc_flag_$cache=yes"
19095else
19096eval "cv_prog_cc_flag_$cache=no"
19097fi
19098rm -f conftest conftest.o conftest.c
19099
19100fi
19101
19102if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
19103{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19104printf "%s\n" "yes" >&6; }
19105:
19106CFLAGS="$CFLAGS -mt"
19107else
19108{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
19109printf "%s\n" "no" >&6; }
19110:
19111CFLAGS="$CFLAGS -D_REENTRANT"
19112fi
19113
19114		ub_have_sol_threads=yes
19115
19116else $as_nop
19117
19118		as_fn_error $? "no solaris threads found." "$LINENO" 5
19119
19120fi
19121
19122	fi
19123fi
19124
19125fi # end of non-mingw check of thread libraries
19126
19127# Check for SYSLOG_FACILITY
19128
19129# Check whether --with-syslog-facility was given.
19130if test ${with_syslog_facility+y}
19131then :
19132  withval=$with_syslog_facility;  UNBOUND_SYSLOG_FACILITY="$withval"
19133fi
19134
19135case "${UNBOUND_SYSLOG_FACILITY}" in
19136
19137  LOCAL[0-7]) UNBOUND_SYSLOG_FACILITY="LOG_${UNBOUND_SYSLOG_FACILITY}" ;;
19138
19139           *) UNBOUND_SYSLOG_FACILITY="LOG_DAEMON" ;;
19140
19141esac
19142
19143printf "%s\n" "#define UB_SYSLOG_FACILITY ${UNBOUND_SYSLOG_FACILITY}" >>confdefs.h
19144
19145
19146# Check for dynamic library module
19147
19148# Check whether --with-dynlibmodule was given.
19149if test ${with_dynlibmodule+y}
19150then :
19151  withval=$with_dynlibmodule;
19152else $as_nop
19153   withval="no"
19154fi
19155
19156
19157if test x_$withval != x_no; then
19158
19159printf "%s\n" "#define WITH_DYNLIBMODULE 1" >>confdefs.h
19160
19161  WITH_DYNLIBMODULE=yes
19162
19163  DYNLIBMOD_OBJ="dynlibmod.lo"
19164
19165  DYNLIBMOD_HEADER='$(srcdir)/dynlibmod/dynlibmod.h'
19166
19167  if test $on_mingw = "no"; then
19168    # link with -ldl if not already there, for all executables because
19169    # dlopen call is in the dynlib module.  For unbound executable, also
19170    # export symbols.
19171    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
19172printf %s "checking for library containing dlopen... " >&6; }
19173if test ${ac_cv_search_dlopen+y}
19174then :
19175  printf %s "(cached) " >&6
19176else $as_nop
19177  ac_func_search_save_LIBS=$LIBS
19178cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19179/* end confdefs.h.  */
19180
19181/* Override any GCC internal prototype to avoid an error.
19182   Use char because int might match the return type of a GCC
19183   builtin and then its argument prototype would still apply.  */
19184char dlopen ();
19185int
19186main (void)
19187{
19188return dlopen ();
19189  ;
19190  return 0;
19191}
19192_ACEOF
19193for ac_lib in '' dl
19194do
19195  if test -z "$ac_lib"; then
19196    ac_res="none required"
19197  else
19198    ac_res=-l$ac_lib
19199    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
19200  fi
19201  if ac_fn_c_try_link "$LINENO"
19202then :
19203  ac_cv_search_dlopen=$ac_res
19204fi
19205rm -f core conftest.err conftest.$ac_objext conftest.beam \
19206    conftest$ac_exeext
19207  if test ${ac_cv_search_dlopen+y}
19208then :
19209  break
19210fi
19211done
19212if test ${ac_cv_search_dlopen+y}
19213then :
19214
19215else $as_nop
19216  ac_cv_search_dlopen=no
19217fi
19218rm conftest.$ac_ext
19219LIBS=$ac_func_search_save_LIBS
19220fi
19221{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
19222printf "%s\n" "$ac_cv_search_dlopen" >&6; }
19223ac_res=$ac_cv_search_dlopen
19224if test "$ac_res" != no
19225then :
19226  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
19227
19228fi
19229
19230    DYNLIBMOD_EXTRALIBS="-export-dynamic"
19231  else
19232    DYNLIBMOD_EXTRALIBS="-Wl,--export-all-symbols,--out-implib,libunbound.dll.a"
19233  fi
19234
19235fi
19236
19237# Check for PyUnbound
19238
19239# Check whether --with-pyunbound was given.
19240if test ${with_pyunbound+y}
19241then :
19242  withval=$with_pyunbound;
19243else $as_nop
19244   withval="no"
19245fi
19246
19247
19248ub_test_python=no
19249ub_with_pyunbound=no
19250if test x_$withval != x_no; then
19251   ub_with_pyunbound=yes
19252   ub_test_python=yes
19253fi
19254
19255# Check for Python module
19256
19257# Check whether --with-pythonmodule was given.
19258if test ${with_pythonmodule+y}
19259then :
19260  withval=$with_pythonmodule;
19261else $as_nop
19262   withval="no"
19263fi
19264
19265
19266ub_with_pythonmod=no
19267if test x_$withval != x_no; then
19268   ub_with_pythonmod=yes
19269   ub_test_python=yes
19270fi
19271
19272# Check for Python & SWIG only on PyUnbound or PyModule
19273if test x_$ub_test_python != x_no; then
19274
19275   # Check for Python
19276   ub_have_python=no
19277   ac_save_LIBS="$LIBS"
19278        #
19279        # Allow the use of a (user set) custom python version
19280        #
19281
19282
19283        # Extract the first word of "python[$PYTHON_VERSION]", so it can be a program name with args.
19284set dummy python$PYTHON_VERSION; ac_word=$2
19285{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19286printf %s "checking for $ac_word... " >&6; }
19287if test ${ac_cv_path_PYTHON+y}
19288then :
19289  printf %s "(cached) " >&6
19290else $as_nop
19291  case $PYTHON in
19292  [\\/]* | ?:[\\/]*)
19293  ac_cv_path_PYTHON="$PYTHON" # Let the user override the test with a path.
19294  ;;
19295  *)
19296  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19297for as_dir in $PATH
19298do
19299  IFS=$as_save_IFS
19300  case $as_dir in #(((
19301    '') as_dir=./ ;;
19302    */) ;;
19303    *) as_dir=$as_dir/ ;;
19304  esac
19305    for ac_exec_ext in '' $ac_executable_extensions; do
19306  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
19307    ac_cv_path_PYTHON="$as_dir$ac_word$ac_exec_ext"
19308    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
19309    break 2
19310  fi
19311done
19312  done
19313IFS=$as_save_IFS
19314
19315  ;;
19316esac
19317fi
19318PYTHON=$ac_cv_path_PYTHON
19319if test -n "$PYTHON"; then
19320  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5
19321printf "%s\n" "$PYTHON" >&6; }
19322else
19323  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
19324printf "%s\n" "no" >&6; }
19325fi
19326
19327
19328        if test -z "$PYTHON"; then
19329           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
19330           PYTHON_VERSION=""
19331        fi
19332
19333        if test -z "$PYTHON_VERSION"; then
19334		PYTHON_VERSION=`$PYTHON -c "import sys; \
19335			print(sys.version.split()[0])"`
19336	fi
19337	# calculate the version number components.
19338
19339	v="$PYTHON_VERSION"
19340	PYTHON_VERSION_MAJOR=`echo $v | sed 's/[^0-9].*//'`
19341	if test -z "$PYTHON_VERSION_MAJOR"; then PYTHON_VERSION_MAJOR="0"; fi
19342	v=`echo $v | sed -e 's/^[0-9]*$//' -e 's/[0-9]*[^0-9]//'`
19343	PYTHON_VERSION_MINOR=`echo $v | sed 's/[^0-9].*//'`
19344	if test -z "$PYTHON_VERSION_MINOR"; then PYTHON_VERSION_MINOR="0"; fi
19345	v=`echo $v | sed -e 's/^[0-9]*$//' -e 's/[0-9]*[^0-9]//'`
19346	PYTHON_VERSION_PATCH=`echo $v | sed 's/[^0-9].*//'`
19347	if test -z "$PYTHON_VERSION_PATCH"; then PYTHON_VERSION_PATCH="0"; fi
19348
19349
19350	# For some systems, sysconfig exists, but has the wrong paths,
19351	# on Debian 10, for python 2.7 and 3.7. So, we check the version,
19352	# and for older versions try distutils.sysconfig first. For newer
19353	# versions>=3.10, where distutils.sysconfig is deprecated, use
19354	# sysconfig first and then attempt the other one.
19355	py_distutils_first="no"
19356	if test $PYTHON_VERSION_MAJOR -lt 3; then
19357		py_distutils_first="yes"
19358	fi
19359	if test $PYTHON_VERSION_MAJOR -eq 3 -a $PYTHON_VERSION_MINOR -lt 10; then
19360		py_distutils_first="yes"
19361	fi
19362
19363	# Check if you have the first module
19364	if test "$py_distutils_first" = "yes"; then m="distutils"; else m="sysconfig"; fi
19365	sysconfig_module=""
19366	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for the $m Python module" >&5
19367printf %s "checking for the $m Python module... " >&6; }
19368        if ac_modulecheck_result1=`$PYTHON -c "import $m" 2>&1`; then
19369                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19370printf "%s\n" "yes" >&6; }
19371		sysconfig_module="$m"
19372	else
19373                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
19374printf "%s\n" "no" >&6; }
19375	fi
19376
19377	# if not found, try the other one.
19378	if test -z "$sysconfig_module"; then
19379		if test "$py_distutils_first" = "yes"; then m2="sysconfig"; else m2="distutils"; fi
19380		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for the $m2 Python module" >&5
19381printf %s "checking for the $m2 Python module... " >&6; }
19382		if ac_modulecheck_result2=`$PYTHON -c "import $m2" 2>&1`; then
19383			{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19384printf "%s\n" "yes" >&6; }
19385			sysconfig_module="$m2"
19386		else
19387			{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
19388printf "%s\n" "no" >&6; }
19389			as_fn_error $? "cannot import Python module \"$m\", or \"$m2\".
19390	Please check your Python installation. The errors are:
19391	$m
19392	$ac_modulecheck_result1
19393	$m2
19394	$ac_modulecheck_result2" "$LINENO" 5
19395			PYTHON_VERSION=""
19396		fi
19397	fi
19398	if test "$sysconfig_module" = "distutils"; then sysconfig_module="distutils.sysconfig"; fi
19399
19400        #
19401        # Check for Python include path
19402        #
19403        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Python include path" >&5
19404printf %s "checking for Python include path... " >&6; }
19405        if test -z "$PYTHON_CPPFLAGS"; then
19406		if test "$sysconfig_module" = "sysconfig"; then
19407			python_path=`$PYTHON -c 'import sysconfig; \
19408				print(sysconfig.get_path("include"));'`
19409		else
19410			python_path=`$PYTHON -c "import distutils.sysconfig; \
19411				print(distutils.sysconfig.get_python_inc());"`
19412		fi
19413                if test -n "${python_path}"; then
19414                        python_path="-I$python_path"
19415                fi
19416                PYTHON_CPPFLAGS=$python_path
19417        fi
19418        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PYTHON_CPPFLAGS" >&5
19419printf "%s\n" "$PYTHON_CPPFLAGS" >&6; }
19420
19421
19422        #
19423        # Check for Python library path
19424        #
19425        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Python library path" >&5
19426printf %s "checking for Python library path... " >&6; }
19427        if test -z "$PYTHON_LDFLAGS"; then
19428                PYTHON_LDFLAGS=`$PYTHON -c "from $sysconfig_module import *; \
19429                        print('-L'+get_config_var('LIBDIR')+' -L'+get_config_var('LIBDEST')+' '+get_config_var('BLDLIBRARY'));"`
19430        fi
19431        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PYTHON_LDFLAGS" >&5
19432printf "%s\n" "$PYTHON_LDFLAGS" >&6; }
19433
19434
19435        if test -z "$PYTHON_LIBDIR"; then
19436                PYTHON_LIBDIR=`$PYTHON -c "from $sysconfig_module import *; \
19437                        print(get_config_var('LIBDIR'));"`
19438        fi
19439
19440        #
19441        # Check for site packages
19442        #
19443        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Python site-packages path" >&5
19444printf %s "checking for Python site-packages path... " >&6; }
19445        if test -z "$PYTHON_SITE_PKG"; then
19446		if test "$sysconfig_module" = "sysconfig"; then
19447			PYTHON_SITE_PKG=`$PYTHON -c 'import sysconfig; \
19448				print(sysconfig.get_path("platlib"));'`
19449		else
19450			PYTHON_SITE_PKG=`$PYTHON -c "import distutils.sysconfig; \
19451				print(distutils.sysconfig.get_python_lib(1,0));"`
19452		fi
19453        fi
19454        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PYTHON_SITE_PKG" >&5
19455printf "%s\n" "$PYTHON_SITE_PKG" >&6; }
19456
19457
19458        #
19459        # final check to see if everything compiles alright
19460        #
19461        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking consistency of all components of python development environment" >&5
19462printf %s "checking consistency of all components of python development environment... " >&6; }
19463        ac_ext=c
19464ac_cpp='$CPP $CPPFLAGS'
19465ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
19466ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
19467ac_compiler_gnu=$ac_cv_c_compiler_gnu
19468
19469        # save current global flags
19470        ac_save_LIBS="$LIBS"
19471        ac_save_CPPFLAGS="$CPPFLAGS"
19472
19473        LIBS="$LIBS $PYTHON_LDFLAGS"
19474        CPPFLAGS="$CPPFLAGS $PYTHON_CPPFLAGS"
19475        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19476/* end confdefs.h.  */
19477
19478                #include <Python.h>
19479
19480int
19481main (void)
19482{
19483
19484                Py_Initialize();
19485
19486  ;
19487  return 0;
19488}
19489_ACEOF
19490if ac_fn_c_try_link "$LINENO"
19491then :
19492  pythonexists=yes
19493else $as_nop
19494  pythonexists=no
19495fi
19496rm -f core conftest.err conftest.$ac_objext conftest.beam \
19497    conftest$ac_exeext conftest.$ac_ext
19498
19499        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $pythonexists" >&5
19500printf "%s\n" "$pythonexists" >&6; }
19501
19502        if test ! "$pythonexists" = "yes"; then
19503           as_fn_error $? "
19504  Could not link test program to Python. Maybe the main Python library has been
19505  installed in some non-standard library path. If so, pass it to configure,
19506  via the LDFLAGS environment variable.
19507  Example: ./configure LDFLAGS=\"-L/usr/non-standard-path/python/lib\"
19508  ============================================================================
19509   ERROR!
19510   You probably have to install the development version of the Python package
19511   for your distribution.  The exact name of this package varies among them.
19512  ============================================================================
19513           " "$LINENO" 5
19514          PYTHON_VERSION=""
19515        fi
19516        ac_ext=c
19517ac_cpp='$CPP $CPPFLAGS'
19518ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
19519ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
19520ac_compiler_gnu=$ac_cv_c_compiler_gnu
19521
19522        # turn back to default flags
19523        CPPFLAGS="$ac_save_CPPFLAGS"
19524        LIBS="$ac_save_LIBS"
19525
19526        #
19527        # all done!
19528        #
19529
19530   if test ! -z "$PYTHON_VERSION"; then
19531	badversion="no"
19532	if test "$PYTHON_VERSION_MAJOR" -lt 2; then
19533		badversion="yes"
19534	fi
19535	if test "$PYTHON_VERSION_MAJOR" -eq 2 -a "$PYTHON_VERSION_MINOR" -lt 4; then
19536		badversion="yes"
19537	fi
19538	if test "$badversion" = "yes"; then
19539		as_fn_error $? "Python version >= 2.4.0 is required" "$LINENO" 5
19540	fi
19541
19542      PY_MAJOR_VERSION="`$PYTHON -c \"import sys; print(sys.version_info[0])\"`"
19543
19544      # Have Python
19545
19546printf "%s\n" "#define HAVE_PYTHON 1" >>confdefs.h
19547
19548      if test x_$ub_with_pythonmod != x_no; then
19549        if test -n "$LIBS"; then
19550          LIBS="$PYTHON_LDFLAGS $LIBS"
19551        else
19552          LIBS="$PYTHON_LDFLAGS"
19553        fi
19554      fi
19555      PYTHON_LIBS="$PYTHON_LDFLAGS"
19556
19557      if test -n "$CPPFLAGS"; then
19558        CPPFLAGS="$CPPFLAGS $PYTHON_CPPFLAGS"
19559      else
19560        CPPFLAGS="$PYTHON_CPPFLAGS"
19561      fi
19562      if test "$PYTHON_LIBDIR" != "/usr/lib" -a "$PYTHON_LIBDIR" != "" -a "$PYTHON_LIBDIR" != "/usr/lib64"; then
19563
19564	if test "x$enable_rpath" = xyes; then
19565		if echo "$PYTHON_LIBDIR" | grep "^/" >/dev/null; then
19566			RUNTIME_PATH="$RUNTIME_PATH -R$PYTHON_LIBDIR"
19567		fi
19568	fi
19569
19570      fi
19571      ub_have_python=yes
19572      if test -n "$PKG_CONFIG" && \
19573    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\"python\${PY_MAJOR_VERSION}\"\""; } >&5
19574  ($PKG_CONFIG --exists --print-errors ""python${PY_MAJOR_VERSION}"") 2>&5
19575  ac_status=$?
19576  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19577  test $ac_status = 0; }; then
19578  PC_PY_DEPENDENCY="python${PY_MAJOR_VERSION}"
19579else
19580  PC_PY_DEPENDENCY="python"
19581fi
19582
19583
19584      # Check for SWIG
19585      ub_have_swig=no
19586      # Check whether --enable-swig-version-check was given.
19587if test ${enable_swig_version_check+y}
19588then :
19589  enableval=$enable_swig_version_check;
19590fi
19591
19592      if test "$enable_swig_version_check" = "yes"; then
19593
19594        # Find path to the "swig" executable.
19595        for ac_prog in swig swig3.0 swig2.0
19596do
19597  # Extract the first word of "$ac_prog", so it can be a program name with args.
19598set dummy $ac_prog; ac_word=$2
19599{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19600printf %s "checking for $ac_word... " >&6; }
19601if test ${ac_cv_path_SWIG+y}
19602then :
19603  printf %s "(cached) " >&6
19604else $as_nop
19605  case $SWIG in
19606  [\\/]* | ?:[\\/]*)
19607  ac_cv_path_SWIG="$SWIG" # Let the user override the test with a path.
19608  ;;
19609  *)
19610  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19611for as_dir in $PATH
19612do
19613  IFS=$as_save_IFS
19614  case $as_dir in #(((
19615    '') as_dir=./ ;;
19616    */) ;;
19617    *) as_dir=$as_dir/ ;;
19618  esac
19619    for ac_exec_ext in '' $ac_executable_extensions; do
19620  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
19621    ac_cv_path_SWIG="$as_dir$ac_word$ac_exec_ext"
19622    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
19623    break 2
19624  fi
19625done
19626  done
19627IFS=$as_save_IFS
19628
19629  ;;
19630esac
19631fi
19632SWIG=$ac_cv_path_SWIG
19633if test -n "$SWIG"; then
19634  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $SWIG" >&5
19635printf "%s\n" "$SWIG" >&6; }
19636else
19637  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
19638printf "%s\n" "no" >&6; }
19639fi
19640
19641
19642  test -n "$SWIG" && break
19643done
19644
19645        if test -z "$SWIG" ; then
19646                :
19647        elif test -z "2.0.1" ; then
19648                :
19649	else
19650                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking SWIG version" >&5
19651printf %s "checking SWIG version... " >&6; }
19652                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'`
19653                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $swig_version" >&5
19654printf "%s\n" "$swig_version" >&6; }
19655                if test -n "$swig_version" ; then
19656                        # Calculate the required version number components
19657                        required=2.0.1
19658                        required_major=`echo $required | sed 's/[^0-9].*//'`
19659                        if test -z "$required_major" ; then
19660                                required_major=0
19661                        fi
19662                        required=`echo $required. | sed 's/[0-9]*[^0-9]//'`
19663                        required_minor=`echo $required | sed 's/[^0-9].*//'`
19664                        if test -z "$required_minor" ; then
19665                                required_minor=0
19666                        fi
19667                        required=`echo $required. | sed 's/[0-9]*[^0-9]//'`
19668                        required_patch=`echo $required | sed 's/[^0-9].*//'`
19669                        if test -z "$required_patch" ; then
19670                                required_patch=0
19671                        fi
19672                        # Calculate the available version number components
19673                        available=$swig_version
19674                        available_major=`echo $available | sed 's/[^0-9].*//'`
19675                        if test -z "$available_major" ; then
19676                                available_major=0
19677                        fi
19678                        available=`echo $available | sed 's/[0-9]*[^0-9]//'`
19679                        available_minor=`echo $available | sed 's/[^0-9].*//'`
19680                        if test -z "$available_minor" ; then
19681                                available_minor=0
19682                        fi
19683                        available=`echo $available | sed 's/[0-9]*[^0-9]//'`
19684                        available_patch=`echo $available | sed 's/[^0-9].*//'`
19685                        if test -z "$available_patch" ; then
19686                                available_patch=0
19687                        fi
19688                        # Convert the version tuple into a single number for easier comparison.
19689                        # Using base 100 should be safe since SWIG internally uses BCD values
19690                        # to encode its version number.
19691                        required_swig_vernum=`expr $required_major \* 10000 \
19692                            \+ $required_minor \* 100 \+ $required_patch`
19693                        available_swig_vernum=`expr $available_major \* 10000 \
19694                            \+ $available_minor \* 100 \+ $available_patch`
19695
19696                        if test $available_swig_vernum -lt $required_swig_vernum; then
19697                                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: SWIG version >= 2.0.1 is required.  You have $swig_version." >&5
19698printf "%s\n" "$as_me: WARNING: SWIG version >= 2.0.1 is required.  You have $swig_version." >&2;}
19699                                SWIG=''
19700
19701                        else
19702                                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for SWIG library" >&5
19703printf %s "checking for SWIG library... " >&6; }
19704                                SWIG_LIB=`$SWIG -swiglib | tr '\r\n' '  '`
19705                                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $SWIG_LIB" >&5
19706printf "%s\n" "$SWIG_LIB" >&6; }
19707
19708                        fi
19709                else
19710                        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cannot determine SWIG version" >&5
19711printf "%s\n" "$as_me: WARNING: cannot determine SWIG version" >&2;}
19712                        SWIG=''
19713
19714                fi
19715        fi
19716
19717
19718      else
19719
19720        # Find path to the "swig" executable.
19721        for ac_prog in swig swig3.0 swig2.0
19722do
19723  # Extract the first word of "$ac_prog", so it can be a program name with args.
19724set dummy $ac_prog; ac_word=$2
19725{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19726printf %s "checking for $ac_word... " >&6; }
19727if test ${ac_cv_path_SWIG+y}
19728then :
19729  printf %s "(cached) " >&6
19730else $as_nop
19731  case $SWIG in
19732  [\\/]* | ?:[\\/]*)
19733  ac_cv_path_SWIG="$SWIG" # Let the user override the test with a path.
19734  ;;
19735  *)
19736  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19737for as_dir in $PATH
19738do
19739  IFS=$as_save_IFS
19740  case $as_dir in #(((
19741    '') as_dir=./ ;;
19742    */) ;;
19743    *) as_dir=$as_dir/ ;;
19744  esac
19745    for ac_exec_ext in '' $ac_executable_extensions; do
19746  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
19747    ac_cv_path_SWIG="$as_dir$ac_word$ac_exec_ext"
19748    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
19749    break 2
19750  fi
19751done
19752  done
19753IFS=$as_save_IFS
19754
19755  ;;
19756esac
19757fi
19758SWIG=$ac_cv_path_SWIG
19759if test -n "$SWIG"; then
19760  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $SWIG" >&5
19761printf "%s\n" "$SWIG" >&6; }
19762else
19763  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
19764printf "%s\n" "no" >&6; }
19765fi
19766
19767
19768  test -n "$SWIG" && break
19769done
19770
19771        if test -z "$SWIG" ; then
19772                :
19773        elif test -z "" ; then
19774                :
19775	else
19776                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking SWIG version" >&5
19777printf %s "checking SWIG version... " >&6; }
19778                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'`
19779                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $swig_version" >&5
19780printf "%s\n" "$swig_version" >&6; }
19781                if test -n "$swig_version" ; then
19782                        # Calculate the required version number components
19783                        required=
19784                        required_major=`echo $required | sed 's/[^0-9].*//'`
19785                        if test -z "$required_major" ; then
19786                                required_major=0
19787                        fi
19788                        required=`echo $required. | sed 's/[0-9]*[^0-9]//'`
19789                        required_minor=`echo $required | sed 's/[^0-9].*//'`
19790                        if test -z "$required_minor" ; then
19791                                required_minor=0
19792                        fi
19793                        required=`echo $required. | sed 's/[0-9]*[^0-9]//'`
19794                        required_patch=`echo $required | sed 's/[^0-9].*//'`
19795                        if test -z "$required_patch" ; then
19796                                required_patch=0
19797                        fi
19798                        # Calculate the available version number components
19799                        available=$swig_version
19800                        available_major=`echo $available | sed 's/[^0-9].*//'`
19801                        if test -z "$available_major" ; then
19802                                available_major=0
19803                        fi
19804                        available=`echo $available | sed 's/[0-9]*[^0-9]//'`
19805                        available_minor=`echo $available | sed 's/[^0-9].*//'`
19806                        if test -z "$available_minor" ; then
19807                                available_minor=0
19808                        fi
19809                        available=`echo $available | sed 's/[0-9]*[^0-9]//'`
19810                        available_patch=`echo $available | sed 's/[^0-9].*//'`
19811                        if test -z "$available_patch" ; then
19812                                available_patch=0
19813                        fi
19814                        # Convert the version tuple into a single number for easier comparison.
19815                        # Using base 100 should be safe since SWIG internally uses BCD values
19816                        # to encode its version number.
19817                        required_swig_vernum=`expr $required_major \* 10000 \
19818                            \+ $required_minor \* 100 \+ $required_patch`
19819                        available_swig_vernum=`expr $available_major \* 10000 \
19820                            \+ $available_minor \* 100 \+ $available_patch`
19821
19822                        if test $available_swig_vernum -lt $required_swig_vernum; then
19823                                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: SWIG version >=  is required.  You have $swig_version." >&5
19824printf "%s\n" "$as_me: WARNING: SWIG version >=  is required.  You have $swig_version." >&2;}
19825                                SWIG=''
19826
19827                        else
19828                                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for SWIG library" >&5
19829printf %s "checking for SWIG library... " >&6; }
19830                                SWIG_LIB=`$SWIG -swiglib | tr '\r\n' '  '`
19831                                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $SWIG_LIB" >&5
19832printf "%s\n" "$SWIG_LIB" >&6; }
19833
19834                        fi
19835                else
19836                        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cannot determine SWIG version" >&5
19837printf "%s\n" "$as_me: WARNING: cannot determine SWIG version" >&2;}
19838                        SWIG=''
19839
19840                fi
19841        fi
19842
19843
19844      fi
19845      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking SWIG" >&5
19846printf %s "checking SWIG... " >&6; }
19847      if test ! -x "$SWIG"; then
19848         as_fn_error $? "failed to find swig tool, install it, or do not build Python module and PyUnbound" "$LINENO" 5
19849      else
19850
19851printf "%s\n" "#define HAVE_SWIG 1" >>confdefs.h
19852
19853         swig="$SWIG"
19854
19855         { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: present" >&5
19856printf "%s\n" "present" >&6; }
19857
19858         # If have Python & SWIG
19859         # Declare PythonMod
19860         if test x_$ub_with_pythonmod != x_no; then
19861
19862printf "%s\n" "#define WITH_PYTHONMODULE 1" >>confdefs.h
19863
19864            WITH_PYTHONMODULE=yes
19865
19866	    PYTHONMOD_OBJ="pythonmod.lo pythonmod_utils.lo"
19867
19868	    PYTHONMOD_HEADER='$(srcdir)/pythonmod/pythonmod.h'
19869
19870	    PYTHONMOD_INSTALL=pythonmod-install
19871
19872	    PYTHONMOD_UNINSTALL=pythonmod-uninstall
19873
19874         fi
19875
19876         # Declare PyUnbound
19877         if test x_$ub_with_pyunbound != x_no; then
19878
19879printf "%s\n" "#define WITH_PYUNBOUND 1" >>confdefs.h
19880
19881            WITH_PYUNBOUND=yes
19882
19883	    PYUNBOUND_OBJ="libunbound_wrap.lo"
19884
19885	    PYUNBOUND_TARGET="_unbound.la"
19886
19887	    PYUNBOUND_INSTALL=pyunbound-install
19888
19889	    PYUNBOUND_UNINSTALL=pyunbound-uninstall
19890
19891         fi
19892      fi
19893   else
19894      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: *** Python libraries not found, won't build PythonMod or PyUnbound ***" >&5
19895printf "%s\n" "*** Python libraries not found, won't build PythonMod or PyUnbound ***" >&6; }
19896      ub_with_pyunbound=no
19897      ub_with_pythonmod=no
19898   fi
19899fi
19900
19901if test "`uname`" = "NetBSD"; then
19902	NETBSD_LINTFLAGS='"-D__RENAME(x)=" -D_NETINET_IN_H_'
19903
19904fi
19905
19906if test "`uname`" = "Linux"; then
19907	# splint cannot parse modern c99 header files
19908	GCC_DOCKER_LINTFLAGS='-syntax'
19909
19910fi
19911{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for build time" >&5
19912printf %s "checking for build time... " >&6; }
19913ax_date_fmt="%Y%m%d"
19914if test x"$SOURCE_DATE_EPOCH" = x
19915then :
19916  CONFIG_DATE=`date "+$ax_date_fmt"`
19917else $as_nop
19918  ax_build_date=`date -u -d "@$SOURCE_DATE_EPOCH" "+$ax_date_fmt" 2>/dev/null \
19919                 || date -u -r "$SOURCE_DATE_EPOCH" "+$ax_date_fmt" 2>/dev/null`
19920  if test x"$ax_build_date" = x
19921then :
19922  as_fn_error $? "malformed SOURCE_DATE_EPOCH" "$LINENO" 5
19923else $as_nop
19924  CONFIG_DATE=$ax_build_date
19925fi
19926fi
19927{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CONFIG_DATE" >&5
19928printf "%s\n" "$CONFIG_DATE" >&6; }
19929
19930
19931
19932
19933# Checks for libraries.
19934
19935# libnss
19936USE_NSS="no"
19937
19938# Check whether --with-nss was given.
19939if test ${with_nss+y}
19940then :
19941  withval=$with_nss;
19942	USE_NSS="yes"
19943
19944printf "%s\n" "#define HAVE_NSS 1" >>confdefs.h
19945
19946	if test "$withval" != "" -a "$withval" != "yes"; then
19947		CPPFLAGS="$CPPFLAGS -I$withval/include/nss3"
19948		LDFLAGS="$LDFLAGS -L$withval/lib"
19949
19950	if test "x$enable_rpath" = xyes; then
19951		if echo "$withval/lib" | grep "^/" >/dev/null; then
19952			RUNTIME_PATH="$RUNTIME_PATH -R$withval/lib"
19953		fi
19954	fi
19955
19956		CPPFLAGS="-I$withval/include/nspr4 $CPPFLAGS"
19957	else
19958		CPPFLAGS="$CPPFLAGS -I/usr/include/nss3"
19959		CPPFLAGS="-I/usr/include/nspr4 $CPPFLAGS"
19960	fi
19961        LIBS="$LIBS -lnss3 -lnspr4"
19962	SSLLIB=""
19963	PC_CRYPTO_DEPENDENCY="nss nspr"
19964
19965
19966
19967fi
19968
19969
19970# libnettle
19971USE_NETTLE="no"
19972
19973# Check whether --with-nettle was given.
19974if test ${with_nettle+y}
19975then :
19976  withval=$with_nettle;
19977	USE_NETTLE="yes"
19978
19979printf "%s\n" "#define HAVE_NETTLE 1" >>confdefs.h
19980
19981	ac_fn_c_check_header_compile "$LINENO" "nettle/dsa-compat.h" "ac_cv_header_nettle_dsa_compat_h" "$ac_includes_default
19982"
19983if test "x$ac_cv_header_nettle_dsa_compat_h" = xyes
19984then :
19985  printf "%s\n" "#define HAVE_NETTLE_DSA_COMPAT_H 1" >>confdefs.h
19986
19987fi
19988
19989	if test "$withval" != "" -a "$withval" != "yes"; then
19990		CPPFLAGS="$CPPFLAGS -I$withval/include/nettle"
19991		LDFLAGS="$LDFLAGS -L$withval/lib"
19992
19993	if test "x$enable_rpath" = xyes; then
19994		if echo "$withval/lib" | grep "^/" >/dev/null; then
19995			RUNTIME_PATH="$RUNTIME_PATH -R$withval/lib"
19996		fi
19997	fi
19998
19999	else
20000		CPPFLAGS="$CPPFLAGS -I/usr/include/nettle"
20001	fi
20002        LIBS="$LIBS -lhogweed -lnettle -lgmp"
20003	SSLLIB=""
20004	PC_CRYPTO_DEPENDENCY="hogweed nettle"
20005
20006
20007
20008fi
20009
20010
20011# openssl
20012if test $USE_NSS = "no" -a $USE_NETTLE = "no"; then
20013
20014
20015# Check whether --with-ssl was given.
20016if test ${with_ssl+y}
20017then :
20018  withval=$with_ssl;
20019
20020else $as_nop
20021
20022            withval="yes"
20023
20024fi
20025
20026    if test x_$withval = x_no; then
20027	as_fn_error $? "Need SSL library to do digital signature cryptography" "$LINENO" 5
20028    fi
20029
20030    withval=$withval
20031    if test x_$withval != x_no; then
20032        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for SSL" >&5
20033printf %s "checking for SSL... " >&6; }
20034	if test -n "$withval"; then
20035										if test ! -f "$withval/include/openssl/ssl.h" -a -f "$withval/openssl/ssl.h"; then
20036			ssldir="$withval"
20037			found_ssl="yes"
20038			withval=""
20039			ssldir_include="$ssldir"
20040						ssldir_lib=`echo $ssldir | sed -e 's/include/lib/'`
20041			if test -f "$ssldir_lib/libssl.a" -o -f "$ssldir_lib/libssl.so"; then
20042				: # found here
20043			else
20044				ssldir_lib=`echo $ssldir | sed -e 's/include/lib64/'`
20045				if test -f "$ssldir_lib/libssl.a" -o -f "$ssldir_lib/libssl.so"; then
20046					: # found here
20047				else
20048					as_fn_error $? "Could not find openssl lib file, $ssldir_lib/libssl.so,a, pass like \"/usr/local\" or \"/usr/include/openssl11\"" "$LINENO" 5
20049				fi
20050			fi
20051		fi
20052	fi
20053        if test x_$withval = x_ -o x_$withval = x_yes; then
20054            withval="/usr/local/ssl /usr/lib/ssl /usr/ssl /usr/pkg /usr/local /opt/local /usr/sfw /usr"
20055        fi
20056        for dir in $withval; do
20057            ssldir="$dir"
20058            if test -f "$dir/include/openssl/ssl.h"; then
20059                found_ssl="yes"
20060		ssldir_include="$ssldir/include"
20061		if test ! -d "$ssldir/lib" -a -d "$ssldir/lib64"; then
20062			ssldir_lib="$ssldir/lib64"
20063		else
20064			ssldir_lib="$ssldir/lib"
20065		fi
20066                break;
20067            fi
20068        done
20069        if test x_$found_ssl != x_yes; then
20070            as_fn_error $? "Cannot find the SSL libraries in $withval" "$LINENO" 5
20071        else
20072            { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: found in $ssldir" >&5
20073printf "%s\n" "found in $ssldir" >&6; }
20074
20075printf "%s\n" "#define HAVE_SSL /**/" >>confdefs.h
20076
20077            HAVE_SSL=yes
20078	                if test "$ssldir" != "/usr"; then
20079		    CPPFLAGS="$CPPFLAGS -I$ssldir_include"
20080		    LIBSSL_CPPFLAGS="$LIBSSL_CPPFLAGS -I$ssldir_include"
20081		    LDFLAGS="$LDFLAGS -L$ssldir_lib"
20082		    LIBSSL_LDFLAGS="$LIBSSL_LDFLAGS -L$ssldir_lib"
20083
20084	if test "x$enable_rpath" = xyes; then
20085		if echo "$ssldir_lib" | grep "^/" >/dev/null; then
20086			RUNTIME_PATH="$RUNTIME_PATH -R$ssldir_lib"
20087		fi
20088	fi
20089
20090	    fi
20091
20092            { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for EVP_sha256 in -lcrypto" >&5
20093printf %s "checking for EVP_sha256 in -lcrypto... " >&6; }
20094            LIBS="$LIBS -lcrypto"
20095            LIBSSL_LIBS="$LIBSSL_LIBS -lcrypto"
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                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
20114printf "%s\n" "yes" >&6; }
20115
20116printf "%s\n" "#define HAVE_EVP_SHA256 1" >>confdefs.h
20117
20118
20119else $as_nop
20120
20121                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
20122printf "%s\n" "no" >&6; }
20123                # check if -lwsock32 or -lgdi32 are needed.
20124                BAKLIBS="$LIBS"
20125                BAKSSLLIBS="$LIBSSL_LIBS"
20126		LIBS="$LIBS -lgdi32 -lws2_32"
20127		LIBSSL_LIBS="$LIBSSL_LIBS -lgdi32 -lws2_32"
20128                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if -lcrypto needs -lgdi32" >&5
20129printf %s "checking if -lcrypto needs -lgdi32... " >&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"
20161		    LIBSSL_LIBS="$LIBSSL_LIBS -lgdi32 -lws2_32 -lcrypt32"
20162                    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if -lcrypto needs -lgdi32 -lws2_32 -lcrypt32" >&5
20163printf %s "checking if -lcrypto needs -lgdi32 -lws2_32 -lcrypt32... " >&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 -lgdi32 -lws2_32 -lcrypt32 -l:libssp.a"
20195			LIBSSL_LIBS="$LIBSSL_LIBS -lgdi32 -lws2_32 -lcrypt32 -l:libssp.a"
20196			{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if -lcrypto needs -lgdi32 -lws2_32 -lcrypt32 -l:libssp.a" >&5
20197printf %s "checking if -lcrypto needs -lgdi32 -lws2_32 -lcrypt32 -l:libssp.a... " >&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
20228			    LIBS="$LIBS -ldl"
20229			    LIBSSL_LIBS="$LIBSSL_LIBS -ldl"
20230			    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if -lcrypto needs -ldl" >&5
20231printf %s "checking if -lcrypto needs -ldl... " >&6; }
20232			    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20233/* end confdefs.h.  */
20234
20235int
20236main (void)
20237{
20238
20239				int EVP_sha256(void);
20240				(void)EVP_sha256();
20241
20242  ;
20243  return 0;
20244}
20245_ACEOF
20246if ac_fn_c_try_link "$LINENO"
20247then :
20248
20249
20250printf "%s\n" "#define HAVE_EVP_SHA256 1" >>confdefs.h
20251
20252				{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
20253printf "%s\n" "yes" >&6; }
20254
20255else $as_nop
20256
20257				{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
20258printf "%s\n" "no" >&6; }
20259				LIBS="$BAKLIBS"
20260				LIBSSL_LIBS="$BAKSSLLIBS"
20261				LIBS="$LIBS -ldl -pthread"
20262				LIBSSL_LIBS="$LIBSSL_LIBS -ldl -pthread"
20263				{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if -lcrypto needs -ldl -pthread" >&5
20264printf %s "checking if -lcrypto needs -ldl -pthread... " >&6; }
20265				cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20266/* end confdefs.h.  */
20267
20268int
20269main (void)
20270{
20271
20272				    int EVP_sha256(void);
20273				    (void)EVP_sha256();
20274
20275  ;
20276  return 0;
20277}
20278_ACEOF
20279if ac_fn_c_try_link "$LINENO"
20280then :
20281
20282
20283printf "%s\n" "#define HAVE_EVP_SHA256 1" >>confdefs.h
20284
20285				    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
20286printf "%s\n" "yes" >&6; }
20287
20288else $as_nop
20289
20290				    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
20291printf "%s\n" "no" >&6; }
20292				    as_fn_error $? "OpenSSL found in $ssldir, but version 0.9.7 or higher is required" "$LINENO" 5
20293
20294fi
20295rm -f core conftest.err conftest.$ac_objext conftest.beam \
20296    conftest$ac_exeext conftest.$ac_ext
20297
20298fi
20299rm -f core conftest.err conftest.$ac_objext conftest.beam \
20300    conftest$ac_exeext conftest.$ac_ext
20301
20302fi
20303rm -f core conftest.err conftest.$ac_objext conftest.beam \
20304    conftest$ac_exeext conftest.$ac_ext
20305
20306fi
20307rm -f core conftest.err conftest.$ac_objext conftest.beam \
20308    conftest$ac_exeext conftest.$ac_ext
20309
20310fi
20311rm -f core conftest.err conftest.$ac_objext conftest.beam \
20312    conftest$ac_exeext conftest.$ac_ext
20313
20314fi
20315rm -f core conftest.err conftest.$ac_objext conftest.beam \
20316    conftest$ac_exeext conftest.$ac_ext
20317        fi
20318
20319
20320    fi
20321ac_fn_c_check_header_compile "$LINENO" "openssl/ssl.h" "ac_cv_header_openssl_ssl_h" "$ac_includes_default
20322"
20323if test "x$ac_cv_header_openssl_ssl_h" = xyes
20324then :
20325  printf "%s\n" "#define HAVE_OPENSSL_SSL_H 1" >>confdefs.h
20326
20327fi
20328
20329ac_fn_c_check_header_compile "$LINENO" "openssl/err.h" "ac_cv_header_openssl_err_h" "$ac_includes_default
20330"
20331if test "x$ac_cv_header_openssl_err_h" = xyes
20332then :
20333  printf "%s\n" "#define HAVE_OPENSSL_ERR_H 1" >>confdefs.h
20334
20335fi
20336
20337ac_fn_c_check_header_compile "$LINENO" "openssl/rand.h" "ac_cv_header_openssl_rand_h" "$ac_includes_default
20338"
20339if test "x$ac_cv_header_openssl_rand_h" = xyes
20340then :
20341  printf "%s\n" "#define HAVE_OPENSSL_RAND_H 1" >>confdefs.h
20342
20343fi
20344
20345
20346
20347
20348# check if libssl needs libdl
20349BAKLIBS="$LIBS"
20350LIBS="-lssl $LIBS"
20351{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if libssl needs libdl" >&5
20352printf %s "checking if libssl needs libdl... " >&6; }
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 SSL_CTX_new ();
20360int
20361main (void)
20362{
20363return SSL_CTX_new ();
20364  ;
20365  return 0;
20366}
20367_ACEOF
20368if ac_fn_c_try_link "$LINENO"
20369then :
20370
20371	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
20372printf "%s\n" "no" >&6; }
20373	LIBS="$BAKLIBS"
20374
20375else $as_nop
20376
20377	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
20378printf "%s\n" "yes" >&6; }
20379	LIBS="$BAKLIBS"
20380	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
20381printf %s "checking for library containing dlopen... " >&6; }
20382if test ${ac_cv_search_dlopen+y}
20383then :
20384  printf %s "(cached) " >&6
20385else $as_nop
20386  ac_func_search_save_LIBS=$LIBS
20387cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20388/* end confdefs.h.  */
20389
20390/* Override any GCC internal prototype to avoid an error.
20391   Use char because int might match the return type of a GCC
20392   builtin and then its argument prototype would still apply.  */
20393char dlopen ();
20394int
20395main (void)
20396{
20397return dlopen ();
20398  ;
20399  return 0;
20400}
20401_ACEOF
20402for ac_lib in '' dl
20403do
20404  if test -z "$ac_lib"; then
20405    ac_res="none required"
20406  else
20407    ac_res=-l$ac_lib
20408    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
20409  fi
20410  if ac_fn_c_try_link "$LINENO"
20411then :
20412  ac_cv_search_dlopen=$ac_res
20413fi
20414rm -f core conftest.err conftest.$ac_objext conftest.beam \
20415    conftest$ac_exeext
20416  if test ${ac_cv_search_dlopen+y}
20417then :
20418  break
20419fi
20420done
20421if test ${ac_cv_search_dlopen+y}
20422then :
20423
20424else $as_nop
20425  ac_cv_search_dlopen=no
20426fi
20427rm conftest.$ac_ext
20428LIBS=$ac_func_search_save_LIBS
20429fi
20430{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
20431printf "%s\n" "$ac_cv_search_dlopen" >&6; }
20432ac_res=$ac_cv_search_dlopen
20433if test "$ac_res" != no
20434then :
20435  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
20436
20437fi
20438
20439
20440fi
20441rm -f core conftest.err conftest.$ac_objext conftest.beam \
20442    conftest$ac_exeext conftest.$ac_ext
20443SSLLIB="-lssl"
20444
20445PC_CRYPTO_DEPENDENCY=""
20446
20447
20448# check if -lcrypt32 is needed because CAPIENG needs that. (on windows)
20449BAKLIBS="$LIBS"
20450LIBS="-lssl $LIBS"
20451{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if libssl needs -lcrypt32" >&5
20452printf %s "checking if libssl needs -lcrypt32... " >&6; }
20453cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20454/* end confdefs.h.  */
20455
20456int
20457main (void)
20458{
20459
20460	int EVP_sha256(void);
20461	(void)EVP_sha256();
20462
20463  ;
20464  return 0;
20465}
20466_ACEOF
20467if ac_fn_c_try_link "$LINENO"
20468then :
20469
20470	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
20471printf "%s\n" "no" >&6; }
20472	LIBS="$BAKLIBS"
20473
20474else $as_nop
20475
20476	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
20477printf "%s\n" "yes" >&6; }
20478	LIBS="$BAKLIBS"
20479	LIBS="$LIBS -lcrypt32"
20480
20481fi
20482rm -f core conftest.err conftest.$ac_objext conftest.beam \
20483    conftest$ac_exeext conftest.$ac_ext
20484
20485{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for LibreSSL" >&5
20486printf %s "checking for LibreSSL... " >&6; }
20487if grep VERSION_TEXT $ssldir_include/openssl/opensslv.h | grep "LibreSSL" >/dev/null; then
20488	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
20489printf "%s\n" "yes" >&6; }
20490
20491printf "%s\n" "#define HAVE_LIBRESSL 1" >>confdefs.h
20492
20493	# libressl provides these compat functions, but they may also be
20494	# declared by the OS in libc.  See if they have been declared.
20495	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC options needed to detect all undeclared functions" >&5
20496printf %s "checking for $CC options needed to detect all undeclared functions... " >&6; }
20497if test ${ac_cv_c_undeclared_builtin_options+y}
20498then :
20499  printf %s "(cached) " >&6
20500else $as_nop
20501  ac_save_CFLAGS=$CFLAGS
20502   ac_cv_c_undeclared_builtin_options='cannot detect'
20503   for ac_arg in '' -fno-builtin; do
20504     CFLAGS="$ac_save_CFLAGS $ac_arg"
20505     # This test program should *not* compile successfully.
20506     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20507/* end confdefs.h.  */
20508
20509int
20510main (void)
20511{
20512(void) strchr;
20513  ;
20514  return 0;
20515}
20516_ACEOF
20517if ac_fn_c_try_compile "$LINENO"
20518then :
20519
20520else $as_nop
20521  # This test program should compile successfully.
20522        # No library function is consistently available on
20523        # freestanding implementations, so test against a dummy
20524        # declaration.  Include always-available headers on the
20525        # off chance that they somehow elicit warnings.
20526        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20527/* end confdefs.h.  */
20528#include <float.h>
20529#include <limits.h>
20530#include <stdarg.h>
20531#include <stddef.h>
20532extern void ac_decl (int, char *);
20533
20534int
20535main (void)
20536{
20537(void) ac_decl (0, (char *) 0);
20538  (void) ac_decl;
20539
20540  ;
20541  return 0;
20542}
20543_ACEOF
20544if ac_fn_c_try_compile "$LINENO"
20545then :
20546  if test x"$ac_arg" = x
20547then :
20548  ac_cv_c_undeclared_builtin_options='none needed'
20549else $as_nop
20550  ac_cv_c_undeclared_builtin_options=$ac_arg
20551fi
20552          break
20553fi
20554rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
20555fi
20556rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
20557    done
20558    CFLAGS=$ac_save_CFLAGS
20559
20560fi
20561{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_undeclared_builtin_options" >&5
20562printf "%s\n" "$ac_cv_c_undeclared_builtin_options" >&6; }
20563  case $ac_cv_c_undeclared_builtin_options in #(
20564  'cannot detect') :
20565    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
20566printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
20567as_fn_error $? "cannot make $CC report undeclared builtins
20568See \`config.log' for more details" "$LINENO" 5; } ;; #(
20569  'none needed') :
20570    ac_c_undeclared_builtin_options='' ;; #(
20571  *) :
20572    ac_c_undeclared_builtin_options=$ac_cv_c_undeclared_builtin_options ;;
20573esac
20574
20575ac_fn_check_decl "$LINENO" "strlcpy" "ac_cv_have_decl_strlcpy" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
20576if test "x$ac_cv_have_decl_strlcpy" = xyes
20577then :
20578  ac_have_decl=1
20579else $as_nop
20580  ac_have_decl=0
20581fi
20582printf "%s\n" "#define HAVE_DECL_STRLCPY $ac_have_decl" >>confdefs.h
20583ac_fn_check_decl "$LINENO" "strlcat" "ac_cv_have_decl_strlcat" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
20584if test "x$ac_cv_have_decl_strlcat" = xyes
20585then :
20586  ac_have_decl=1
20587else $as_nop
20588  ac_have_decl=0
20589fi
20590printf "%s\n" "#define HAVE_DECL_STRLCAT $ac_have_decl" >>confdefs.h
20591ac_fn_check_decl "$LINENO" "arc4random" "ac_cv_have_decl_arc4random" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
20592if test "x$ac_cv_have_decl_arc4random" = xyes
20593then :
20594  ac_have_decl=1
20595else $as_nop
20596  ac_have_decl=0
20597fi
20598printf "%s\n" "#define HAVE_DECL_ARC4RANDOM $ac_have_decl" >>confdefs.h
20599ac_fn_check_decl "$LINENO" "arc4random_uniform" "ac_cv_have_decl_arc4random_uniform" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
20600if test "x$ac_cv_have_decl_arc4random_uniform" = xyes
20601then :
20602  ac_have_decl=1
20603else $as_nop
20604  ac_have_decl=0
20605fi
20606printf "%s\n" "#define HAVE_DECL_ARC4RANDOM_UNIFORM $ac_have_decl" >>confdefs.h
20607
20608else
20609	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
20610printf "%s\n" "no" >&6; }
20611fi
20612ac_fn_c_check_header_compile "$LINENO" "openssl/conf.h" "ac_cv_header_openssl_conf_h" "$ac_includes_default
20613"
20614if test "x$ac_cv_header_openssl_conf_h" = xyes
20615then :
20616  printf "%s\n" "#define HAVE_OPENSSL_CONF_H 1" >>confdefs.h
20617
20618fi
20619ac_fn_c_check_header_compile "$LINENO" "openssl/engine.h" "ac_cv_header_openssl_engine_h" "$ac_includes_default
20620"
20621if test "x$ac_cv_header_openssl_engine_h" = xyes
20622then :
20623  printf "%s\n" "#define HAVE_OPENSSL_ENGINE_H 1" >>confdefs.h
20624
20625fi
20626ac_fn_c_check_header_compile "$LINENO" "openssl/bn.h" "ac_cv_header_openssl_bn_h" "$ac_includes_default
20627"
20628if test "x$ac_cv_header_openssl_bn_h" = xyes
20629then :
20630  printf "%s\n" "#define HAVE_OPENSSL_BN_H 1" >>confdefs.h
20631
20632fi
20633ac_fn_c_check_header_compile "$LINENO" "openssl/dh.h" "ac_cv_header_openssl_dh_h" "$ac_includes_default
20634"
20635if test "x$ac_cv_header_openssl_dh_h" = xyes
20636then :
20637  printf "%s\n" "#define HAVE_OPENSSL_DH_H 1" >>confdefs.h
20638
20639fi
20640ac_fn_c_check_header_compile "$LINENO" "openssl/dsa.h" "ac_cv_header_openssl_dsa_h" "$ac_includes_default
20641"
20642if test "x$ac_cv_header_openssl_dsa_h" = xyes
20643then :
20644  printf "%s\n" "#define HAVE_OPENSSL_DSA_H 1" >>confdefs.h
20645
20646fi
20647ac_fn_c_check_header_compile "$LINENO" "openssl/rsa.h" "ac_cv_header_openssl_rsa_h" "$ac_includes_default
20648"
20649if test "x$ac_cv_header_openssl_rsa_h" = xyes
20650then :
20651  printf "%s\n" "#define HAVE_OPENSSL_RSA_H 1" >>confdefs.h
20652
20653fi
20654ac_fn_c_check_header_compile "$LINENO" "openssl/core_names.h" "ac_cv_header_openssl_core_names_h" "$ac_includes_default
20655"
20656if test "x$ac_cv_header_openssl_core_names_h" = xyes
20657then :
20658  printf "%s\n" "#define HAVE_OPENSSL_CORE_NAMES_H 1" >>confdefs.h
20659
20660fi
20661ac_fn_c_check_header_compile "$LINENO" "openssl/param_build.h" "ac_cv_header_openssl_param_build_h" "$ac_includes_default
20662"
20663if test "x$ac_cv_header_openssl_param_build_h" = xyes
20664then :
20665  printf "%s\n" "#define HAVE_OPENSSL_PARAM_BUILD_H 1" >>confdefs.h
20666
20667fi
20668
20669ac_fn_c_check_func "$LINENO" "OPENSSL_config" "ac_cv_func_OPENSSL_config"
20670if test "x$ac_cv_func_OPENSSL_config" = xyes
20671then :
20672  printf "%s\n" "#define HAVE_OPENSSL_CONFIG 1" >>confdefs.h
20673
20674fi
20675ac_fn_c_check_func "$LINENO" "EVP_sha1" "ac_cv_func_EVP_sha1"
20676if test "x$ac_cv_func_EVP_sha1" = xyes
20677then :
20678  printf "%s\n" "#define HAVE_EVP_SHA1 1" >>confdefs.h
20679
20680fi
20681ac_fn_c_check_func "$LINENO" "EVP_sha256" "ac_cv_func_EVP_sha256"
20682if test "x$ac_cv_func_EVP_sha256" = xyes
20683then :
20684  printf "%s\n" "#define HAVE_EVP_SHA256 1" >>confdefs.h
20685
20686fi
20687ac_fn_c_check_func "$LINENO" "EVP_sha512" "ac_cv_func_EVP_sha512"
20688if test "x$ac_cv_func_EVP_sha512" = xyes
20689then :
20690  printf "%s\n" "#define HAVE_EVP_SHA512 1" >>confdefs.h
20691
20692fi
20693ac_fn_c_check_func "$LINENO" "FIPS_mode" "ac_cv_func_FIPS_mode"
20694if test "x$ac_cv_func_FIPS_mode" = xyes
20695then :
20696  printf "%s\n" "#define HAVE_FIPS_MODE 1" >>confdefs.h
20697
20698fi
20699ac_fn_c_check_func "$LINENO" "EVP_default_properties_is_fips_enabled" "ac_cv_func_EVP_default_properties_is_fips_enabled"
20700if test "x$ac_cv_func_EVP_default_properties_is_fips_enabled" = xyes
20701then :
20702  printf "%s\n" "#define HAVE_EVP_DEFAULT_PROPERTIES_IS_FIPS_ENABLED 1" >>confdefs.h
20703
20704fi
20705ac_fn_c_check_func "$LINENO" "EVP_MD_CTX_new" "ac_cv_func_EVP_MD_CTX_new"
20706if test "x$ac_cv_func_EVP_MD_CTX_new" = xyes
20707then :
20708  printf "%s\n" "#define HAVE_EVP_MD_CTX_NEW 1" >>confdefs.h
20709
20710fi
20711ac_fn_c_check_func "$LINENO" "OpenSSL_add_all_digests" "ac_cv_func_OpenSSL_add_all_digests"
20712if test "x$ac_cv_func_OpenSSL_add_all_digests" = xyes
20713then :
20714  printf "%s\n" "#define HAVE_OPENSSL_ADD_ALL_DIGESTS 1" >>confdefs.h
20715
20716fi
20717ac_fn_c_check_func "$LINENO" "OPENSSL_init_crypto" "ac_cv_func_OPENSSL_init_crypto"
20718if test "x$ac_cv_func_OPENSSL_init_crypto" = xyes
20719then :
20720  printf "%s\n" "#define HAVE_OPENSSL_INIT_CRYPTO 1" >>confdefs.h
20721
20722fi
20723ac_fn_c_check_func "$LINENO" "EVP_cleanup" "ac_cv_func_EVP_cleanup"
20724if test "x$ac_cv_func_EVP_cleanup" = xyes
20725then :
20726  printf "%s\n" "#define HAVE_EVP_CLEANUP 1" >>confdefs.h
20727
20728fi
20729ac_fn_c_check_func "$LINENO" "ENGINE_cleanup" "ac_cv_func_ENGINE_cleanup"
20730if test "x$ac_cv_func_ENGINE_cleanup" = xyes
20731then :
20732  printf "%s\n" "#define HAVE_ENGINE_CLEANUP 1" >>confdefs.h
20733
20734fi
20735ac_fn_c_check_func "$LINENO" "ERR_load_crypto_strings" "ac_cv_func_ERR_load_crypto_strings"
20736if test "x$ac_cv_func_ERR_load_crypto_strings" = xyes
20737then :
20738  printf "%s\n" "#define HAVE_ERR_LOAD_CRYPTO_STRINGS 1" >>confdefs.h
20739
20740fi
20741ac_fn_c_check_func "$LINENO" "CRYPTO_cleanup_all_ex_data" "ac_cv_func_CRYPTO_cleanup_all_ex_data"
20742if test "x$ac_cv_func_CRYPTO_cleanup_all_ex_data" = xyes
20743then :
20744  printf "%s\n" "#define HAVE_CRYPTO_CLEANUP_ALL_EX_DATA 1" >>confdefs.h
20745
20746fi
20747ac_fn_c_check_func "$LINENO" "ERR_free_strings" "ac_cv_func_ERR_free_strings"
20748if test "x$ac_cv_func_ERR_free_strings" = xyes
20749then :
20750  printf "%s\n" "#define HAVE_ERR_FREE_STRINGS 1" >>confdefs.h
20751
20752fi
20753ac_fn_c_check_func "$LINENO" "RAND_cleanup" "ac_cv_func_RAND_cleanup"
20754if test "x$ac_cv_func_RAND_cleanup" = xyes
20755then :
20756  printf "%s\n" "#define HAVE_RAND_CLEANUP 1" >>confdefs.h
20757
20758fi
20759ac_fn_c_check_func "$LINENO" "DSA_SIG_set0" "ac_cv_func_DSA_SIG_set0"
20760if test "x$ac_cv_func_DSA_SIG_set0" = xyes
20761then :
20762  printf "%s\n" "#define HAVE_DSA_SIG_SET0 1" >>confdefs.h
20763
20764fi
20765ac_fn_c_check_func "$LINENO" "EVP_dss1" "ac_cv_func_EVP_dss1"
20766if test "x$ac_cv_func_EVP_dss1" = xyes
20767then :
20768  printf "%s\n" "#define HAVE_EVP_DSS1 1" >>confdefs.h
20769
20770fi
20771ac_fn_c_check_func "$LINENO" "EVP_DigestVerify" "ac_cv_func_EVP_DigestVerify"
20772if test "x$ac_cv_func_EVP_DigestVerify" = xyes
20773then :
20774  printf "%s\n" "#define HAVE_EVP_DIGESTVERIFY 1" >>confdefs.h
20775
20776fi
20777ac_fn_c_check_func "$LINENO" "EVP_aes_256_cbc" "ac_cv_func_EVP_aes_256_cbc"
20778if test "x$ac_cv_func_EVP_aes_256_cbc" = xyes
20779then :
20780  printf "%s\n" "#define HAVE_EVP_AES_256_CBC 1" >>confdefs.h
20781
20782fi
20783ac_fn_c_check_func "$LINENO" "EVP_EncryptInit_ex" "ac_cv_func_EVP_EncryptInit_ex"
20784if test "x$ac_cv_func_EVP_EncryptInit_ex" = xyes
20785then :
20786  printf "%s\n" "#define HAVE_EVP_ENCRYPTINIT_EX 1" >>confdefs.h
20787
20788fi
20789ac_fn_c_check_func "$LINENO" "HMAC_Init_ex" "ac_cv_func_HMAC_Init_ex"
20790if test "x$ac_cv_func_HMAC_Init_ex" = xyes
20791then :
20792  printf "%s\n" "#define HAVE_HMAC_INIT_EX 1" >>confdefs.h
20793
20794fi
20795ac_fn_c_check_func "$LINENO" "CRYPTO_THREADID_set_callback" "ac_cv_func_CRYPTO_THREADID_set_callback"
20796if test "x$ac_cv_func_CRYPTO_THREADID_set_callback" = xyes
20797then :
20798  printf "%s\n" "#define HAVE_CRYPTO_THREADID_SET_CALLBACK 1" >>confdefs.h
20799
20800fi
20801ac_fn_c_check_func "$LINENO" "EVP_MAC_CTX_set_params" "ac_cv_func_EVP_MAC_CTX_set_params"
20802if test "x$ac_cv_func_EVP_MAC_CTX_set_params" = xyes
20803then :
20804  printf "%s\n" "#define HAVE_EVP_MAC_CTX_SET_PARAMS 1" >>confdefs.h
20805
20806fi
20807ac_fn_c_check_func "$LINENO" "OSSL_PARAM_BLD_new" "ac_cv_func_OSSL_PARAM_BLD_new"
20808if test "x$ac_cv_func_OSSL_PARAM_BLD_new" = xyes
20809then :
20810  printf "%s\n" "#define HAVE_OSSL_PARAM_BLD_NEW 1" >>confdefs.h
20811
20812fi
20813ac_fn_c_check_func "$LINENO" "BIO_set_callback_ex" "ac_cv_func_BIO_set_callback_ex"
20814if test "x$ac_cv_func_BIO_set_callback_ex" = xyes
20815then :
20816  printf "%s\n" "#define HAVE_BIO_SET_CALLBACK_EX 1" >>confdefs.h
20817
20818fi
20819ac_fn_c_check_func "$LINENO" "SSL_CTX_set_tmp_ecdh" "ac_cv_func_SSL_CTX_set_tmp_ecdh"
20820if test "x$ac_cv_func_SSL_CTX_set_tmp_ecdh" = xyes
20821then :
20822  printf "%s\n" "#define HAVE_SSL_CTX_SET_TMP_ECDH 1" >>confdefs.h
20823
20824fi
20825
20826
20827# these check_funcs need -lssl
20828BAKLIBS="$LIBS"
20829LIBS="-lssl $LIBS"
20830ac_fn_c_check_func "$LINENO" "OPENSSL_init_ssl" "ac_cv_func_OPENSSL_init_ssl"
20831if test "x$ac_cv_func_OPENSSL_init_ssl" = xyes
20832then :
20833  printf "%s\n" "#define HAVE_OPENSSL_INIT_SSL 1" >>confdefs.h
20834
20835fi
20836ac_fn_c_check_func "$LINENO" "SSL_CTX_set_security_level" "ac_cv_func_SSL_CTX_set_security_level"
20837if test "x$ac_cv_func_SSL_CTX_set_security_level" = xyes
20838then :
20839  printf "%s\n" "#define HAVE_SSL_CTX_SET_SECURITY_LEVEL 1" >>confdefs.h
20840
20841fi
20842ac_fn_c_check_func "$LINENO" "SSL_set1_host" "ac_cv_func_SSL_set1_host"
20843if test "x$ac_cv_func_SSL_set1_host" = xyes
20844then :
20845  printf "%s\n" "#define HAVE_SSL_SET1_HOST 1" >>confdefs.h
20846
20847fi
20848ac_fn_c_check_func "$LINENO" "SSL_get0_peername" "ac_cv_func_SSL_get0_peername"
20849if test "x$ac_cv_func_SSL_get0_peername" = xyes
20850then :
20851  printf "%s\n" "#define HAVE_SSL_GET0_PEERNAME 1" >>confdefs.h
20852
20853fi
20854ac_fn_c_check_func "$LINENO" "X509_VERIFY_PARAM_set1_host" "ac_cv_func_X509_VERIFY_PARAM_set1_host"
20855if test "x$ac_cv_func_X509_VERIFY_PARAM_set1_host" = xyes
20856then :
20857  printf "%s\n" "#define HAVE_X509_VERIFY_PARAM_SET1_HOST 1" >>confdefs.h
20858
20859fi
20860ac_fn_c_check_func "$LINENO" "SSL_CTX_set_ciphersuites" "ac_cv_func_SSL_CTX_set_ciphersuites"
20861if test "x$ac_cv_func_SSL_CTX_set_ciphersuites" = xyes
20862then :
20863  printf "%s\n" "#define HAVE_SSL_CTX_SET_CIPHERSUITES 1" >>confdefs.h
20864
20865fi
20866ac_fn_c_check_func "$LINENO" "SSL_CTX_set_tlsext_ticket_key_evp_cb" "ac_cv_func_SSL_CTX_set_tlsext_ticket_key_evp_cb"
20867if test "x$ac_cv_func_SSL_CTX_set_tlsext_ticket_key_evp_cb" = xyes
20868then :
20869  printf "%s\n" "#define HAVE_SSL_CTX_SET_TLSEXT_TICKET_KEY_EVP_CB 1" >>confdefs.h
20870
20871fi
20872ac_fn_c_check_func "$LINENO" "SSL_CTX_set_alpn_select_cb" "ac_cv_func_SSL_CTX_set_alpn_select_cb"
20873if test "x$ac_cv_func_SSL_CTX_set_alpn_select_cb" = xyes
20874then :
20875  printf "%s\n" "#define HAVE_SSL_CTX_SET_ALPN_SELECT_CB 1" >>confdefs.h
20876
20877fi
20878ac_fn_c_check_func "$LINENO" "SSL_get0_alpn_selected" "ac_cv_func_SSL_get0_alpn_selected"
20879if test "x$ac_cv_func_SSL_get0_alpn_selected" = xyes
20880then :
20881  printf "%s\n" "#define HAVE_SSL_GET0_ALPN_SELECTED 1" >>confdefs.h
20882
20883fi
20884ac_fn_c_check_func "$LINENO" "SSL_CTX_set_alpn_protos" "ac_cv_func_SSL_CTX_set_alpn_protos"
20885if test "x$ac_cv_func_SSL_CTX_set_alpn_protos" = xyes
20886then :
20887  printf "%s\n" "#define HAVE_SSL_CTX_SET_ALPN_PROTOS 1" >>confdefs.h
20888
20889fi
20890ac_fn_c_check_func "$LINENO" "SSL_get1_peer_certificate" "ac_cv_func_SSL_get1_peer_certificate"
20891if test "x$ac_cv_func_SSL_get1_peer_certificate" = xyes
20892then :
20893  printf "%s\n" "#define HAVE_SSL_GET1_PEER_CERTIFICATE 1" >>confdefs.h
20894
20895fi
20896
20897LIBS="$BAKLIBS"
20898
20899ac_fn_check_decl "$LINENO" "SSL_COMP_get_compression_methods" "ac_cv_have_decl_SSL_COMP_get_compression_methods" "
20900$ac_includes_default
20901#ifdef HAVE_OPENSSL_ERR_H
20902#include <openssl/err.h>
20903#endif
20904
20905#ifdef HAVE_OPENSSL_RAND_H
20906#include <openssl/rand.h>
20907#endif
20908
20909#ifdef HAVE_OPENSSL_CONF_H
20910#include <openssl/conf.h>
20911#endif
20912
20913#ifdef HAVE_OPENSSL_ENGINE_H
20914#include <openssl/engine.h>
20915#endif
20916#include <openssl/ssl.h>
20917#include <openssl/evp.h>
20918
20919" "$ac_c_undeclared_builtin_options" "CFLAGS"
20920if test "x$ac_cv_have_decl_SSL_COMP_get_compression_methods" = xyes
20921then :
20922  ac_have_decl=1
20923else $as_nop
20924  ac_have_decl=0
20925fi
20926printf "%s\n" "#define HAVE_DECL_SSL_COMP_GET_COMPRESSION_METHODS $ac_have_decl" >>confdefs.h
20927ac_fn_check_decl "$LINENO" "sk_SSL_COMP_pop_free" "ac_cv_have_decl_sk_SSL_COMP_pop_free" "
20928$ac_includes_default
20929#ifdef HAVE_OPENSSL_ERR_H
20930#include <openssl/err.h>
20931#endif
20932
20933#ifdef HAVE_OPENSSL_RAND_H
20934#include <openssl/rand.h>
20935#endif
20936
20937#ifdef HAVE_OPENSSL_CONF_H
20938#include <openssl/conf.h>
20939#endif
20940
20941#ifdef HAVE_OPENSSL_ENGINE_H
20942#include <openssl/engine.h>
20943#endif
20944#include <openssl/ssl.h>
20945#include <openssl/evp.h>
20946
20947" "$ac_c_undeclared_builtin_options" "CFLAGS"
20948if test "x$ac_cv_have_decl_sk_SSL_COMP_pop_free" = xyes
20949then :
20950  ac_have_decl=1
20951else $as_nop
20952  ac_have_decl=0
20953fi
20954printf "%s\n" "#define HAVE_DECL_SK_SSL_COMP_POP_FREE $ac_have_decl" >>confdefs.h
20955ac_fn_check_decl "$LINENO" "SSL_CTX_set_ecdh_auto" "ac_cv_have_decl_SSL_CTX_set_ecdh_auto" "
20956$ac_includes_default
20957#ifdef HAVE_OPENSSL_ERR_H
20958#include <openssl/err.h>
20959#endif
20960
20961#ifdef HAVE_OPENSSL_RAND_H
20962#include <openssl/rand.h>
20963#endif
20964
20965#ifdef HAVE_OPENSSL_CONF_H
20966#include <openssl/conf.h>
20967#endif
20968
20969#ifdef HAVE_OPENSSL_ENGINE_H
20970#include <openssl/engine.h>
20971#endif
20972#include <openssl/ssl.h>
20973#include <openssl/evp.h>
20974
20975" "$ac_c_undeclared_builtin_options" "CFLAGS"
20976if test "x$ac_cv_have_decl_SSL_CTX_set_ecdh_auto" = xyes
20977then :
20978  ac_have_decl=1
20979else $as_nop
20980  ac_have_decl=0
20981fi
20982printf "%s\n" "#define HAVE_DECL_SSL_CTX_SET_ECDH_AUTO $ac_have_decl" >>confdefs.h
20983
20984
20985if test "$ac_cv_func_HMAC_Init_ex" = "yes"; then
20986# check function return type.
20987{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking the return type of HMAC_Init_ex" >&5
20988printf %s "checking the return type of HMAC_Init_ex... " >&6; }
20989cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20990/* end confdefs.h.  */
20991
20992#ifdef HAVE_OPENSSL_ERR_H
20993#include <openssl/err.h>
20994#endif
20995
20996#ifdef HAVE_OPENSSL_RAND_H
20997#include <openssl/rand.h>
20998#endif
20999
21000#ifdef HAVE_OPENSSL_CONF_H
21001#include <openssl/conf.h>
21002#endif
21003
21004#ifdef HAVE_OPENSSL_ENGINE_H
21005#include <openssl/engine.h>
21006#endif
21007#include <openssl/ssl.h>
21008#include <openssl/evp.h>
21009
21010int
21011main (void)
21012{
21013
21014	HMAC_CTX* hmac_ctx = NULL;
21015	void* hmac_key = NULL;
21016	const EVP_MD* digest = NULL;
21017	int x = HMAC_Init_ex(hmac_ctx, hmac_key, 32, digest, NULL);
21018	(void)x;
21019
21020  ;
21021  return 0;
21022}
21023_ACEOF
21024if ac_fn_c_try_compile "$LINENO"
21025then :
21026
21027	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: int" >&5
21028printf "%s\n" "int" >&6; }
21029
21030else $as_nop
21031
21032	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: void" >&5
21033printf "%s\n" "void" >&6; }
21034
21035printf "%s\n" "#define HMAC_INIT_EX_RETURNS_VOID 1" >>confdefs.h
21036
21037
21038fi
21039rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
21040fi
21041
21042fi
21043
21044
21045# libbsd
21046
21047# Check whether --with-libbsd was given.
21048if test ${with_libbsd+y}
21049then :
21050  withval=$with_libbsd;
21051	ac_fn_c_check_header_compile "$LINENO" "bsd/string.h" "ac_cv_header_bsd_string_h" "$ac_includes_default
21052"
21053if test "x$ac_cv_header_bsd_string_h" = xyes
21054then :
21055  printf "%s\n" "#define HAVE_BSD_STRING_H 1" >>confdefs.h
21056
21057fi
21058ac_fn_c_check_header_compile "$LINENO" "bsd/stdlib.h" "ac_cv_header_bsd_stdlib_h" "$ac_includes_default
21059"
21060if test "x$ac_cv_header_bsd_stdlib_h" = xyes
21061then :
21062  printf "%s\n" "#define HAVE_BSD_STDLIB_H 1" >>confdefs.h
21063
21064fi
21065
21066	if test "x$ac_cv_header_bsd_string_h" = xyes -a "x$ac_cv_header_bsd_stdlib_h" = xyes; then
21067		for func in strlcpy strlcat arc4random arc4random_uniform reallocarray; do
21068			as_ac_Search=`printf "%s\n" "ac_cv_search_$func" | $as_tr_sh`
21069{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing $func" >&5
21070printf %s "checking for library containing $func... " >&6; }
21071if eval test \${$as_ac_Search+y}
21072then :
21073  printf %s "(cached) " >&6
21074else $as_nop
21075  ac_func_search_save_LIBS=$LIBS
21076cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21077/* end confdefs.h.  */
21078
21079/* Override any GCC internal prototype to avoid an error.
21080   Use char because int might match the return type of a GCC
21081   builtin and then its argument prototype would still apply.  */
21082char $func ();
21083int
21084main (void)
21085{
21086return $func ();
21087  ;
21088  return 0;
21089}
21090_ACEOF
21091for ac_lib in '' bsd
21092do
21093  if test -z "$ac_lib"; then
21094    ac_res="none required"
21095  else
21096    ac_res=-l$ac_lib
21097    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
21098  fi
21099  if ac_fn_c_try_link "$LINENO"
21100then :
21101  eval "$as_ac_Search=\$ac_res"
21102fi
21103rm -f core conftest.err conftest.$ac_objext conftest.beam \
21104    conftest$ac_exeext
21105  if eval test \${$as_ac_Search+y}
21106then :
21107  break
21108fi
21109done
21110if eval test \${$as_ac_Search+y}
21111then :
21112
21113else $as_nop
21114  eval "$as_ac_Search=no"
21115fi
21116rm conftest.$ac_ext
21117LIBS=$ac_func_search_save_LIBS
21118fi
21119eval ac_res=\$$as_ac_Search
21120	       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
21121printf "%s\n" "$ac_res" >&6; }
21122eval ac_res=\$$as_ac_Search
21123if test "$ac_res" != no
21124then :
21125  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
21126
21127
21128printf "%s\n" "#define HAVE_LIBBSD 1" >>confdefs.h
21129
21130				PC_LIBBSD_DEPENDENCY=libbsd
21131
21132
21133fi
21134
21135		done
21136	fi
21137
21138fi
21139
21140
21141# Check whether --enable-sha1 was given.
21142if test ${enable_sha1+y}
21143then :
21144  enableval=$enable_sha1;
21145fi
21146
21147case "$enable_sha1" in
21148	no)
21149	;;
21150	yes|*)
21151
21152printf "%s\n" "#define USE_SHA1 1" >>confdefs.h
21153
21154	;;
21155esac
21156
21157
21158# Check whether --enable-sha2 was given.
21159if test ${enable_sha2+y}
21160then :
21161  enableval=$enable_sha2;
21162fi
21163
21164case "$enable_sha2" in
21165	no)
21166	;;
21167	yes|*)
21168
21169printf "%s\n" "#define USE_SHA2 1" >>confdefs.h
21170
21171	;;
21172esac
21173
21174# Check whether --enable-subnet was given.
21175if test ${enable_subnet+y}
21176then :
21177  enableval=$enable_subnet;
21178fi
21179
21180case "$enable_subnet" in
21181	yes)
21182
21183printf "%s\n" "#define CLIENT_SUBNET 1" >>confdefs.h
21184
21185	SUBNET_OBJ="edns-subnet.lo subnetmod.lo addrtree.lo subnet-whitelist.lo"
21186
21187	SUBNET_HEADER='$(srcdir)/edns-subnet/subnetmod.h $(srcdir)/edns-subnet/edns-subnet.h $(srcdir)/edns-subnet/subnet-whitelist.h $(srcdir)/edns-subnet/addrtree.h'
21188
21189	;;
21190	no|*)
21191	;;
21192esac
21193
21194# check whether gost also works
21195
21196# Check whether --enable-gost was given.
21197if test ${enable_gost+y}
21198then :
21199  enableval=$enable_gost;
21200fi
21201
21202use_gost="no"
21203if test $USE_NSS = "no" -a $USE_NETTLE = "no"; then
21204case "$enable_gost" in
21205	no)
21206	;;
21207	*)
21208	ac_fn_c_check_func "$LINENO" "EVP_PKEY_set_type_str" "ac_cv_func_EVP_PKEY_set_type_str"
21209if test "x$ac_cv_func_EVP_PKEY_set_type_str" = xyes
21210then :
21211  :
21212else $as_nop
21213  as_fn_error $? "OpenSSL 1.0.0 is needed for GOST support" "$LINENO" 5
21214fi
21215
21216	ac_fn_c_check_func "$LINENO" "EC_KEY_new" "ac_cv_func_EC_KEY_new"
21217if test "x$ac_cv_func_EC_KEY_new" = xyes
21218then :
21219
21220else $as_nop
21221  as_fn_error $? "OpenSSL does not support ECC, needed for GOST support" "$LINENO" 5
21222fi
21223
21224
21225{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if GOST works" >&5
21226printf %s "checking if GOST works... " >&6; }
21227if test c${cross_compiling} = cno; then
21228BAKCFLAGS="$CFLAGS"
21229if test -n "$ssldir"; then
21230	CFLAGS="$CFLAGS -Wl,-rpath,$ssldir_lib"
21231fi
21232if test "$cross_compiling" = yes
21233then :
21234  eval "ac_cv_c_gost_works=maybe"
21235else $as_nop
21236  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21237/* end confdefs.h.  */
21238
21239#include <string.h>
21240#include <openssl/ssl.h>
21241#include <openssl/evp.h>
21242#include <openssl/engine.h>
21243#include <openssl/conf.h>
21244/* routine to load gost (from sldns) */
21245int load_gost_id(void)
21246{
21247	static int gost_id = 0;
21248	const EVP_PKEY_ASN1_METHOD* meth;
21249	ENGINE* e;
21250
21251	if(gost_id) return gost_id;
21252
21253	/* see if configuration loaded gost implementation from other engine*/
21254	meth = EVP_PKEY_asn1_find_str(NULL, "gost2001", -1);
21255	if(meth) {
21256		EVP_PKEY_asn1_get0_info(&gost_id, NULL, NULL, NULL, NULL, meth);
21257		return gost_id;
21258	}
21259
21260	/* see if engine can be loaded already */
21261	e = ENGINE_by_id("gost");
21262	if(!e) {
21263		/* load it ourself, in case statically linked */
21264		ENGINE_load_builtin_engines();
21265		ENGINE_load_dynamic();
21266		e = ENGINE_by_id("gost");
21267	}
21268	if(!e) {
21269		/* no gost engine in openssl */
21270		return 0;
21271	}
21272	if(!ENGINE_set_default(e, ENGINE_METHOD_ALL)) {
21273		ENGINE_finish(e);
21274		ENGINE_free(e);
21275		return 0;
21276	}
21277
21278	meth = EVP_PKEY_asn1_find_str(&e, "gost2001", -1);
21279	if(!meth) {
21280		/* algo not found */
21281		ENGINE_finish(e);
21282		ENGINE_free(e);
21283		return 0;
21284	}
21285	EVP_PKEY_asn1_get0_info(&gost_id, NULL, NULL, NULL, NULL, meth);
21286	return gost_id;
21287}
21288int main(void) {
21289	EVP_MD_CTX* ctx;
21290	const EVP_MD* md;
21291	unsigned char digest[64]; /* its a 256-bit digest, so uses 32 bytes */
21292	const char* str = "Hello world";
21293	const unsigned char check[] = {
21294		0x40 , 0xed , 0xf8 , 0x56 , 0x5a , 0xc5 , 0x36 , 0xe1 ,
21295		0x33 , 0x7c , 0x7e , 0x87 , 0x62 , 0x1c , 0x42 , 0xe0 ,
21296		0x17 , 0x1b , 0x5e , 0xce , 0xa8 , 0x46 , 0x65 , 0x4d ,
21297		0x8d , 0x3e , 0x22 , 0x9b , 0xe1 , 0x30 , 0x19 , 0x9d
21298	};
21299	OPENSSL_config(NULL);
21300	(void)load_gost_id();
21301	md = EVP_get_digestbyname("md_gost94");
21302	if(!md) return 1;
21303	memset(digest, 0, sizeof(digest));
21304	ctx = EVP_MD_CTX_create();
21305	if(!ctx) return 2;
21306	if(!EVP_DigestInit_ex(ctx, md, NULL)) return 3;
21307	if(!EVP_DigestUpdate(ctx, str, 10)) return 4;
21308	if(!EVP_DigestFinal_ex(ctx, digest, NULL)) return 5;
21309	/* uncomment to see the hash calculated.
21310		{int i;
21311		for(i=0; i<32; i++)
21312			printf(" %2.2x", (int)digest[i]);
21313		printf("\n");}
21314	*/
21315	if(memcmp(digest, check, sizeof(check)) != 0)
21316		return 6;
21317	return 0;
21318}
21319
21320_ACEOF
21321if ac_fn_c_try_run "$LINENO"
21322then :
21323  eval "ac_cv_c_gost_works=yes"
21324else $as_nop
21325  eval "ac_cv_c_gost_works=no"
21326fi
21327rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21328  conftest.$ac_objext conftest.beam conftest.$ac_ext
21329fi
21330
21331CFLAGS="$BAKCFLAGS"
21332else
21333eval "ac_cv_c_gost_works=maybe"
21334fi
21335{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_gost_works" >&5
21336printf "%s\n" "$ac_cv_c_gost_works" >&6; }
21337
21338	if test "$ac_cv_c_gost_works" != no; then
21339		use_gost="yes"
21340
21341printf "%s\n" "#define USE_GOST 1" >>confdefs.h
21342
21343	fi
21344	;;
21345esac
21346fi
21347# Check whether --enable-ecdsa was given.
21348if test ${enable_ecdsa+y}
21349then :
21350  enableval=$enable_ecdsa;
21351fi
21352
21353use_ecdsa="no"
21354case "$enable_ecdsa" in
21355    no)
21356      ;;
21357    *)
21358      if test $USE_NSS = "no" -a $USE_NETTLE = "no"; then
21359	      ac_fn_c_check_func "$LINENO" "EVP_PKEY_fromdata" "ac_cv_func_EVP_PKEY_fromdata"
21360if test "x$ac_cv_func_EVP_PKEY_fromdata" = xyes
21361then :
21362
21363	          # with EVP_PKEY_fromdata, check if EC is not disabled
21364	          ac_fn_check_decl "$LINENO" "OPENSSL_NO_EC" "ac_cv_have_decl_OPENSSL_NO_EC" "$ac_includes_default
21365#include <openssl/evp.h>
21366
21367" "$ac_c_undeclared_builtin_options" "CFLAGS"
21368if test "x$ac_cv_have_decl_OPENSSL_NO_EC" = xyes
21369then :
21370  as_fn_error $? "OpenSSL does not support ECDSA: please upgrade or rerun with --disable-ecdsa" "$LINENO" 5
21371
21372fi
21373
21374else $as_nop
21375
21376		  # without EVP_PKEY_fromdata, older openssl, check for support
21377		  ac_fn_c_check_func "$LINENO" "ECDSA_sign" "ac_cv_func_ECDSA_sign"
21378if test "x$ac_cv_func_ECDSA_sign" = xyes
21379then :
21380
21381else $as_nop
21382  as_fn_error $? "OpenSSL does not support ECDSA: please upgrade or rerun with --disable-ecdsa" "$LINENO" 5
21383fi
21384
21385		  ac_fn_c_check_func "$LINENO" "SHA384_Init" "ac_cv_func_SHA384_Init"
21386if test "x$ac_cv_func_SHA384_Init" = xyes
21387then :
21388
21389else $as_nop
21390  as_fn_error $? "OpenSSL does not support SHA384: please upgrade or rerun with --disable-ecdsa" "$LINENO" 5
21391fi
21392
21393
21394fi
21395
21396	      ac_fn_check_decl "$LINENO" "NID_X9_62_prime256v1" "ac_cv_have_decl_NID_X9_62_prime256v1" "$ac_includes_default
21397#include <openssl/evp.h>
21398
21399" "$ac_c_undeclared_builtin_options" "CFLAGS"
21400if test "x$ac_cv_have_decl_NID_X9_62_prime256v1" = xyes
21401then :
21402  ac_have_decl=1
21403else $as_nop
21404  ac_have_decl=0
21405fi
21406printf "%s\n" "#define HAVE_DECL_NID_X9_62_PRIME256V1 $ac_have_decl" >>confdefs.h
21407if test $ac_have_decl = 1
21408then :
21409
21410else $as_nop
21411  as_fn_error $? "OpenSSL does not support the ECDSA curves: please upgrade or rerun with --disable-ecdsa" "$LINENO" 5
21412fi
21413ac_fn_check_decl "$LINENO" "NID_secp384r1" "ac_cv_have_decl_NID_secp384r1" "$ac_includes_default
21414#include <openssl/evp.h>
21415
21416" "$ac_c_undeclared_builtin_options" "CFLAGS"
21417if test "x$ac_cv_have_decl_NID_secp384r1" = xyes
21418then :
21419  ac_have_decl=1
21420else $as_nop
21421  ac_have_decl=0
21422fi
21423printf "%s\n" "#define HAVE_DECL_NID_SECP384R1 $ac_have_decl" >>confdefs.h
21424if test $ac_have_decl = 1
21425then :
21426
21427else $as_nop
21428  as_fn_error $? "OpenSSL does not support the ECDSA curves: please upgrade or rerun with --disable-ecdsa" "$LINENO" 5
21429fi
21430
21431	      # see if OPENSSL 1.0.0 or later (has EVP MD and Verify independency)
21432	      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if openssl supports SHA2 and ECDSA with EVP" >&5
21433printf %s "checking if openssl supports SHA2 and ECDSA with EVP... " >&6; }
21434	      if grep OPENSSL_VERSION_TEXT $ssldir_include/openssl/opensslv.h | grep "OpenSSL" >/dev/null; then
21435		if grep OPENSSL_VERSION_NUMBER $ssldir_include/openssl/opensslv.h | grep 0x0 >/dev/null; then
21436		  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
21437printf "%s\n" "no" >&6; }
21438
21439printf "%s\n" "#define USE_ECDSA_EVP_WORKAROUND 1" >>confdefs.h
21440
21441		else
21442		  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
21443printf "%s\n" "yes" >&6; }
21444		fi
21445	      else
21446		# not OpenSSL, thus likely LibreSSL, which supports it
21447		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
21448printf "%s\n" "yes" >&6; }
21449	      fi
21450      fi
21451      # we now know we have ECDSA and the required curves.
21452
21453printf "%s\n" "#define USE_ECDSA 1" >>confdefs.h
21454
21455      use_ecdsa="yes"
21456      ;;
21457esac
21458
21459# Check whether --enable-dsa was given.
21460if test ${enable_dsa+y}
21461then :
21462  enableval=$enable_dsa;
21463fi
21464
21465use_dsa="no"
21466case "$enable_dsa" in
21467    yes)
21468      # detect if DSA is supported, and turn it off if not.
21469      if test $USE_NSS = "no" -a $USE_NETTLE = "no"; then
21470      ac_fn_c_check_func "$LINENO" "DSA_SIG_new" "ac_cv_func_DSA_SIG_new"
21471if test "x$ac_cv_func_DSA_SIG_new" = xyes
21472then :
21473
21474      as_ac_Type=`printf "%s\n" "ac_cv_type_DSA_SIG*" | $as_tr_sh`
21475ac_fn_c_check_type "$LINENO" "DSA_SIG*" "$as_ac_Type" "
21476$ac_includes_default
21477#ifdef HAVE_OPENSSL_ERR_H
21478#include <openssl/err.h>
21479#endif
21480
21481#ifdef HAVE_OPENSSL_RAND_H
21482#include <openssl/rand.h>
21483#endif
21484
21485#ifdef HAVE_OPENSSL_CONF_H
21486#include <openssl/conf.h>
21487#endif
21488
21489#ifdef HAVE_OPENSSL_ENGINE_H
21490#include <openssl/engine.h>
21491#endif
21492
21493"
21494if eval test \"x\$"$as_ac_Type"\" = x"yes"
21495then :
21496
21497
21498printf "%s\n" "#define USE_DSA 1" >>confdefs.h
21499
21500
21501else $as_nop
21502  if test "x$enable_dsa" = "xyes"; then as_fn_error $? "OpenSSL does not support DSA and you used --enable-dsa." "$LINENO" 5
21503               fi
21504fi
21505
21506
21507else $as_nop
21508  if test "x$enable_dsa" = "xyes"; then as_fn_error $? "OpenSSL does not support DSA and you used --enable-dsa." "$LINENO" 5
21509               fi
21510fi
21511
21512      else
21513
21514printf "%s\n" "#define USE_DSA 1" >>confdefs.h
21515
21516      fi
21517      ;;
21518    *)
21519      # disable dsa by default, RFC 8624 section 3.1, validators MUST NOT
21520      # support DSA for DNSSEC Validation.
21521      ;;
21522esac
21523
21524
21525# Check whether --with-deprecate-rsa-1024 was given.
21526if test ${with_deprecate_rsa_1024+y}
21527then :
21528  withval=$with_deprecate_rsa_1024;
21529fi
21530
21531if test "$with_deprecate_rsa_1024" = "yes"; then
21532
21533printf "%s\n" "#define DEPRECATE_RSA_1024 1" >>confdefs.h
21534
21535fi
21536
21537# Check whether --enable-ed25519 was given.
21538if test ${enable_ed25519+y}
21539then :
21540  enableval=$enable_ed25519;
21541fi
21542
21543use_ed25519="no"
21544case "$enable_ed25519" in
21545    no)
21546      ;;
21547    *)
21548      if test $USE_NSS = "no" -a $USE_NETTLE = "no"; then
21549	      ac_fn_check_decl "$LINENO" "NID_ED25519" "ac_cv_have_decl_NID_ED25519" "$ac_includes_default
21550#include <openssl/evp.h>
21551
21552" "$ac_c_undeclared_builtin_options" "CFLAGS"
21553if test "x$ac_cv_have_decl_NID_ED25519" = xyes
21554then :
21555  ac_have_decl=1
21556else $as_nop
21557  ac_have_decl=0
21558fi
21559printf "%s\n" "#define HAVE_DECL_NID_ED25519 $ac_have_decl" >>confdefs.h
21560if test $ac_have_decl = 1
21561then :
21562
21563      		use_ed25519="yes"
21564
21565else $as_nop
21566   if test "x$enable_ed25519" = "xyes"; then as_fn_error $? "OpenSSL does not support ED25519 and you used --enable-ed25519." "$LINENO" 5
21567	      	fi
21568fi
21569
21570      fi
21571      if test $USE_NETTLE = "yes"; then
21572		       for ac_header in nettle/eddsa.h
21573do :
21574  ac_fn_c_check_header_compile "$LINENO" "nettle/eddsa.h" "ac_cv_header_nettle_eddsa_h" "$ac_includes_default
21575"
21576if test "x$ac_cv_header_nettle_eddsa_h" = xyes
21577then :
21578  printf "%s\n" "#define HAVE_NETTLE_EDDSA_H 1" >>confdefs.h
21579 use_ed25519="yes"
21580fi
21581
21582done
21583      fi
21584      if test $use_ed25519 = "yes"; then
21585
21586printf "%s\n" "#define USE_ED25519 1" >>confdefs.h
21587
21588      fi
21589      ;;
21590esac
21591
21592# Check whether --enable-ed448 was given.
21593if test ${enable_ed448+y}
21594then :
21595  enableval=$enable_ed448;
21596fi
21597
21598use_ed448="no"
21599case "$enable_ed448" in
21600    no)
21601      ;;
21602    *)
21603      if test $USE_NSS = "no" -a $USE_NETTLE = "no"; then
21604	      ac_fn_check_decl "$LINENO" "NID_ED448" "ac_cv_have_decl_NID_ED448" "$ac_includes_default
21605#include <openssl/evp.h>
21606
21607" "$ac_c_undeclared_builtin_options" "CFLAGS"
21608if test "x$ac_cv_have_decl_NID_ED448" = xyes
21609then :
21610  ac_have_decl=1
21611else $as_nop
21612  ac_have_decl=0
21613fi
21614printf "%s\n" "#define HAVE_DECL_NID_ED448 $ac_have_decl" >>confdefs.h
21615if test $ac_have_decl = 1
21616then :
21617
21618      		use_ed448="yes"
21619
21620else $as_nop
21621   if test "x$enable_ed448" = "xyes"; then as_fn_error $? "OpenSSL does not support ED448 and you used --enable-ed448." "$LINENO" 5
21622	      	fi
21623fi
21624
21625      fi
21626      if test $use_ed448 = "yes"; then
21627
21628printf "%s\n" "#define USE_ED448 1" >>confdefs.h
21629
21630      fi
21631      ;;
21632esac
21633
21634# Check whether --enable-event-api was given.
21635if test ${enable_event_api+y}
21636then :
21637  enableval=$enable_event_api;
21638fi
21639
21640case "$enable_event_api" in
21641    yes)
21642      UNBOUND_EVENT_INSTALL=unbound-event-install
21643
21644      UNBOUND_EVENT_UNINSTALL=unbound-event-uninstall
21645
21646      ;;
21647    *)
21648      ;;
21649esac
21650
21651# Check whether --enable-tfo-client was given.
21652if test ${enable_tfo_client+y}
21653then :
21654  enableval=$enable_tfo_client;
21655fi
21656
21657case "$enable_tfo_client" in
21658	yes)
21659		case "$host_os" in
21660			linux*) ac_fn_check_decl "$LINENO" "MSG_FASTOPEN" "ac_cv_have_decl_MSG_FASTOPEN" "$ac_includes_default
21661#include <netinet/tcp.h>
21662
21663" "$ac_c_undeclared_builtin_options" "CFLAGS"
21664if test "x$ac_cv_have_decl_MSG_FASTOPEN" = xyes
21665then :
21666  { 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
21667printf "%s\n" "$as_me: WARNING: Check the platform specific TFO kernel parameters are correctly configured to support client mode TFO" >&2;}
21668else $as_nop
21669  as_fn_error $? "TCP Fast Open is not available for client mode: please rerun without --enable-tfo-client" "$LINENO" 5
21670fi
21671
21672printf "%s\n" "#define USE_MSG_FASTOPEN 1" >>confdefs.h
21673
21674				;;
21675			darwin*) ac_fn_check_decl "$LINENO" "CONNECT_RESUME_ON_READ_WRITE" "ac_cv_have_decl_CONNECT_RESUME_ON_READ_WRITE" "$ac_includes_default
21676#include <sys/socket.h>
21677
21678" "$ac_c_undeclared_builtin_options" "CFLAGS"
21679if test "x$ac_cv_have_decl_CONNECT_RESUME_ON_READ_WRITE" = xyes
21680then :
21681  { 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
21682printf "%s\n" "$as_me: WARNING: Check the platform specific TFO kernel parameters are correctly configured to support client mode TFO" >&2;}
21683else $as_nop
21684  as_fn_error $? "TCP Fast Open is not available for client mode: please rerun without --enable-tfo-client" "$LINENO" 5
21685fi
21686
21687printf "%s\n" "#define USE_OSX_MSG_FASTOPEN 1" >>confdefs.h
21688
21689				;;
21690		esac
21691		;;
21692	no|*)
21693		;;
21694esac
21695
21696# Check whether --enable-tfo-server was given.
21697if test ${enable_tfo_server+y}
21698then :
21699  enableval=$enable_tfo_server;
21700fi
21701
21702case "$enable_tfo_server" in
21703	yes)
21704	      ac_fn_check_decl "$LINENO" "TCP_FASTOPEN" "ac_cv_have_decl_TCP_FASTOPEN" "$ac_includes_default
21705#include <netinet/tcp.h>
21706
21707" "$ac_c_undeclared_builtin_options" "CFLAGS"
21708if test "x$ac_cv_have_decl_TCP_FASTOPEN" = xyes
21709then :
21710  { 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
21711printf "%s\n" "$as_me: WARNING: Check the platform specific TFO kernel parameters are correctly configured to support server mode TFO" >&2;}
21712else $as_nop
21713  as_fn_error $? "TCP Fast Open is not available for server mode: please rerun without --enable-tfo-server" "$LINENO" 5
21714fi
21715
21716printf "%s\n" "#define USE_TCP_FASTOPEN 1" >>confdefs.h
21717
21718		;;
21719	no|*)
21720		;;
21721esac
21722
21723# check for libevent
21724
21725# Check whether --with-libevent was given.
21726if test ${with_libevent+y}
21727then :
21728  withval=$with_libevent;
21729else $as_nop
21730   with_libevent="no"
21731fi
21732
21733if test "x_$with_libevent" != x_no; then
21734
21735printf "%s\n" "#define USE_LIBEVENT 1" >>confdefs.h
21736
21737        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libevent" >&5
21738printf %s "checking for libevent... " >&6; }
21739        if test "x_$with_libevent" = x_ -o "x_$with_libevent" = x_yes; then
21740            with_libevent="/usr/local /opt/local /usr/lib /usr/pkg /usr/sfw /usr"
21741        fi
21742        for dir in $with_libevent; do
21743            thedir="$dir"
21744            if test -f "$dir/include/event.h" -o -f "$dir/include/event2/event.h"; then
21745                found_libevent="yes"
21746								if test "$thedir" != "/usr"; then
21747				    CPPFLAGS="$CPPFLAGS -I$thedir/include"
21748				fi
21749				break;
21750		    fi
21751        done
21752        if test x_$found_libevent != x_yes; then
21753		if test -f "$dir/event.h" -a \( -f "$dir/libevent.la" -o -f "$dir/libev.la" \) ; then
21754			# libevent source directory
21755			{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: found in $thedir" >&5
21756printf "%s\n" "found in $thedir" >&6; }
21757			CPPFLAGS="$CPPFLAGS -I$thedir -I$thedir/include"
21758			BAK_LDFLAGS_SET="1"
21759			BAK_LDFLAGS="$LDFLAGS"
21760			# remove evdns from linking
21761			mkdir build >/dev/null 2>&1
21762			mkdir build/libevent >/dev/null 2>&1
21763			mkdir build/libevent/.libs >/dev/null 2>&1
21764			ev_files_o=`ls $thedir/*.o | grep -v evdns\.o | grep -v bufferevent_openssl\.o`
21765			ev_files_lo=`ls $thedir/*.lo | grep -v evdns\.lo | grep -v bufferevent_openssl\.lo`
21766			ev_files_libso=`ls $thedir/.libs/*.o | grep -v evdns\.o | grep -v bufferevent_openssl\.o`
21767			cp $ev_files_o build/libevent
21768			cp $ev_files_lo build/libevent
21769			cp $ev_files_libso build/libevent/.libs
21770			LATE_LDFLAGS="build/libevent/*.lo -lm"
21771			LDFLAGS="build/libevent/*.o $LDFLAGS -lm"
21772		else
21773            as_fn_error $? "Cannot find the libevent library in $with_libevent
21774You can restart ./configure --with-libevent=no to use a builtin alternative.
21775Please note that this alternative is not as capable as libevent when using
21776large outgoing port ranges.  " "$LINENO" 5
21777		fi
21778        else
21779            { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: found in $thedir" >&5
21780printf "%s\n" "found in $thedir" >&6; }
21781	    	    if test ! -f $thedir/lib/libevent.a -a ! -f $thedir/lib/libevent.so -a -d "$thedir/lib/event2"; then
21782		    LDFLAGS="$LDFLAGS -L$thedir/lib/event2"
21783
21784	if test "x$enable_rpath" = xyes; then
21785		if echo "$thedir/lib/event2" | grep "^/" >/dev/null; then
21786			RUNTIME_PATH="$RUNTIME_PATH -R$thedir/lib/event2"
21787		fi
21788	fi
21789
21790	    else
21791		    		    if test "$thedir" != "/usr" -a "$thedir" != ""; then
21792			LDFLAGS="$LDFLAGS -L$thedir/lib"
21793
21794	if test "x$enable_rpath" = xyes; then
21795		if echo "$thedir/lib" | grep "^/" >/dev/null; then
21796			RUNTIME_PATH="$RUNTIME_PATH -R$thedir/lib"
21797		fi
21798	fi
21799
21800		    fi
21801	    fi
21802        fi
21803	# check for library used by libevent after 1.3c
21804	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5
21805printf %s "checking for library containing clock_gettime... " >&6; }
21806if test ${ac_cv_search_clock_gettime+y}
21807then :
21808  printf %s "(cached) " >&6
21809else $as_nop
21810  ac_func_search_save_LIBS=$LIBS
21811cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21812/* end confdefs.h.  */
21813
21814/* Override any GCC internal prototype to avoid an error.
21815   Use char because int might match the return type of a GCC
21816   builtin and then its argument prototype would still apply.  */
21817char clock_gettime ();
21818int
21819main (void)
21820{
21821return clock_gettime ();
21822  ;
21823  return 0;
21824}
21825_ACEOF
21826for ac_lib in '' rt
21827do
21828  if test -z "$ac_lib"; then
21829    ac_res="none required"
21830  else
21831    ac_res=-l$ac_lib
21832    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
21833  fi
21834  if ac_fn_c_try_link "$LINENO"
21835then :
21836  ac_cv_search_clock_gettime=$ac_res
21837fi
21838rm -f core conftest.err conftest.$ac_objext conftest.beam \
21839    conftest$ac_exeext
21840  if test ${ac_cv_search_clock_gettime+y}
21841then :
21842  break
21843fi
21844done
21845if test ${ac_cv_search_clock_gettime+y}
21846then :
21847
21848else $as_nop
21849  ac_cv_search_clock_gettime=no
21850fi
21851rm conftest.$ac_ext
21852LIBS=$ac_func_search_save_LIBS
21853fi
21854{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5
21855printf "%s\n" "$ac_cv_search_clock_gettime" >&6; }
21856ac_res=$ac_cv_search_clock_gettime
21857if test "$ac_res" != no
21858then :
21859  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
21860
21861fi
21862
21863
21864	# is the event.h header libev or libevent?
21865	ac_fn_c_check_header_compile "$LINENO" "event.h" "ac_cv_header_event_h" "$ac_includes_default
21866"
21867if test "x$ac_cv_header_event_h" = xyes
21868then :
21869  printf "%s\n" "#define HAVE_EVENT_H 1" >>confdefs.h
21870
21871fi
21872
21873	ac_fn_check_decl "$LINENO" "EV_VERSION_MAJOR" "ac_cv_have_decl_EV_VERSION_MAJOR" "$ac_includes_default
21874#include <event.h>
21875
21876" "$ac_c_undeclared_builtin_options" "CFLAGS"
21877if test "x$ac_cv_have_decl_EV_VERSION_MAJOR" = xyes
21878then :
21879
21880		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing event_set" >&5
21881printf %s "checking for library containing event_set... " >&6; }
21882if test ${ac_cv_search_event_set+y}
21883then :
21884  printf %s "(cached) " >&6
21885else $as_nop
21886  ac_func_search_save_LIBS=$LIBS
21887cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21888/* end confdefs.h.  */
21889
21890/* Override any GCC internal prototype to avoid an error.
21891   Use char because int might match the return type of a GCC
21892   builtin and then its argument prototype would still apply.  */
21893char event_set ();
21894int
21895main (void)
21896{
21897return event_set ();
21898  ;
21899  return 0;
21900}
21901_ACEOF
21902for ac_lib in '' ev
21903do
21904  if test -z "$ac_lib"; then
21905    ac_res="none required"
21906  else
21907    ac_res=-l$ac_lib
21908    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
21909  fi
21910  if ac_fn_c_try_link "$LINENO"
21911then :
21912  ac_cv_search_event_set=$ac_res
21913fi
21914rm -f core conftest.err conftest.$ac_objext conftest.beam \
21915    conftest$ac_exeext
21916  if test ${ac_cv_search_event_set+y}
21917then :
21918  break
21919fi
21920done
21921if test ${ac_cv_search_event_set+y}
21922then :
21923
21924else $as_nop
21925  ac_cv_search_event_set=no
21926fi
21927rm conftest.$ac_ext
21928LIBS=$ac_func_search_save_LIBS
21929fi
21930{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_event_set" >&5
21931printf "%s\n" "$ac_cv_search_event_set" >&6; }
21932ac_res=$ac_cv_search_event_set
21933if test "$ac_res" != no
21934then :
21935  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
21936
21937fi
21938
21939
21940else $as_nop
21941
21942		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing event_set" >&5
21943printf %s "checking for library containing event_set... " >&6; }
21944if test ${ac_cv_search_event_set+y}
21945then :
21946  printf %s "(cached) " >&6
21947else $as_nop
21948  ac_func_search_save_LIBS=$LIBS
21949cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21950/* end confdefs.h.  */
21951
21952/* Override any GCC internal prototype to avoid an error.
21953   Use char because int might match the return type of a GCC
21954   builtin and then its argument prototype would still apply.  */
21955char event_set ();
21956int
21957main (void)
21958{
21959return event_set ();
21960  ;
21961  return 0;
21962}
21963_ACEOF
21964for ac_lib in '' event
21965do
21966  if test -z "$ac_lib"; then
21967    ac_res="none required"
21968  else
21969    ac_res=-l$ac_lib
21970    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
21971  fi
21972  if ac_fn_c_try_link "$LINENO"
21973then :
21974  ac_cv_search_event_set=$ac_res
21975fi
21976rm -f core conftest.err conftest.$ac_objext conftest.beam \
21977    conftest$ac_exeext
21978  if test ${ac_cv_search_event_set+y}
21979then :
21980  break
21981fi
21982done
21983if test ${ac_cv_search_event_set+y}
21984then :
21985
21986else $as_nop
21987  ac_cv_search_event_set=no
21988fi
21989rm conftest.$ac_ext
21990LIBS=$ac_func_search_save_LIBS
21991fi
21992{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_event_set" >&5
21993printf "%s\n" "$ac_cv_search_event_set" >&6; }
21994ac_res=$ac_cv_search_event_set
21995if test "$ac_res" != no
21996then :
21997  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
21998
21999fi
22000
22001
22002fi
22003	ac_fn_c_check_func "$LINENO" "event_base_free" "ac_cv_func_event_base_free"
22004if test "x$ac_cv_func_event_base_free" = xyes
22005then :
22006  printf "%s\n" "#define HAVE_EVENT_BASE_FREE 1" >>confdefs.h
22007
22008fi
22009 # only in libevent 1.2 and later
22010	ac_fn_c_check_func "$LINENO" "event_base_once" "ac_cv_func_event_base_once"
22011if test "x$ac_cv_func_event_base_once" = xyes
22012then :
22013  printf "%s\n" "#define HAVE_EVENT_BASE_ONCE 1" >>confdefs.h
22014
22015fi
22016 # only in libevent 1.4.1 and later
22017	ac_fn_c_check_func "$LINENO" "event_base_new" "ac_cv_func_event_base_new"
22018if test "x$ac_cv_func_event_base_new" = xyes
22019then :
22020  printf "%s\n" "#define HAVE_EVENT_BASE_NEW 1" >>confdefs.h
22021
22022fi
22023 # only in libevent 1.4.1 and later
22024	ac_fn_c_check_func "$LINENO" "event_base_get_method" "ac_cv_func_event_base_get_method"
22025if test "x$ac_cv_func_event_base_get_method" = xyes
22026then :
22027  printf "%s\n" "#define HAVE_EVENT_BASE_GET_METHOD 1" >>confdefs.h
22028
22029fi
22030 # only in libevent 1.4.3 and later
22031	ac_fn_c_check_func "$LINENO" "ev_loop" "ac_cv_func_ev_loop"
22032if test "x$ac_cv_func_ev_loop" = xyes
22033then :
22034  printf "%s\n" "#define HAVE_EV_LOOP 1" >>confdefs.h
22035
22036fi
22037 # only in libev. (tested on 3.51)
22038	ac_fn_c_check_func "$LINENO" "ev_default_loop" "ac_cv_func_ev_default_loop"
22039if test "x$ac_cv_func_ev_default_loop" = xyes
22040then :
22041  printf "%s\n" "#define HAVE_EV_DEFAULT_LOOP 1" >>confdefs.h
22042
22043fi
22044 # only in libev. (tested on 4.00)
22045	ac_fn_c_check_func "$LINENO" "event_assign" "ac_cv_func_event_assign"
22046if test "x$ac_cv_func_event_assign" = xyes
22047then :
22048  printf "%s\n" "#define HAVE_EVENT_ASSIGN 1" >>confdefs.h
22049
22050fi
22051 # in libevent, for thread-safety
22052	ac_fn_check_decl "$LINENO" "evsignal_assign" "ac_cv_have_decl_evsignal_assign" "$ac_includes_default
22053#ifdef HAVE_EVENT_H
22054#  include <event.h>
22055#else
22056#  include \"event2/event.h\"
22057#endif
22058
22059" "$ac_c_undeclared_builtin_options" "CFLAGS"
22060if test "x$ac_cv_have_decl_evsignal_assign" = xyes
22061then :
22062  ac_have_decl=1
22063else $as_nop
22064  ac_have_decl=0
22065fi
22066printf "%s\n" "#define HAVE_DECL_EVSIGNAL_ASSIGN $ac_have_decl" >>confdefs.h
22067
22068        PC_LIBEVENT_DEPENDENCY="libevent"
22069
22070	if test -n "$BAK_LDFLAGS_SET"; then
22071		LDFLAGS="$BAK_LDFLAGS"
22072	fi
22073else
22074
22075printf "%s\n" "#define USE_MINI_EVENT 1" >>confdefs.h
22076
22077fi
22078
22079# check for libexpat
22080
22081# Check whether --with-libexpat was given.
22082if test ${with_libexpat+y}
22083then :
22084  withval=$with_libexpat;
22085else $as_nop
22086   withval="/usr/local /opt/local /usr/lib /usr/pkg /usr/sfw /usr"
22087fi
22088
22089{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libexpat" >&5
22090printf %s "checking for libexpat... " >&6; }
22091found_libexpat="no"
22092for dir in $withval ; do
22093            if test -f "$dir/include/expat.h"; then
22094		found_libexpat="yes"
22095				if test "$dir" != "/usr"; then
22096                    CPPFLAGS="$CPPFLAGS -I$dir/include"
22097		    LDFLAGS="$LDFLAGS -L$dir/lib"
22098		fi
22099            	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: found in $dir" >&5
22100printf "%s\n" "found in $dir" >&6; }
22101                break;
22102            fi
22103done
22104if test x_$found_libexpat != x_yes; then
22105	as_fn_error $? "Could not find libexpat, expat.h" "$LINENO" 5
22106fi
22107ac_fn_c_check_header_compile "$LINENO" "expat.h" "ac_cv_header_expat_h" "$ac_includes_default
22108"
22109if test "x$ac_cv_header_expat_h" = xyes
22110then :
22111  printf "%s\n" "#define HAVE_EXPAT_H 1" >>confdefs.h
22112
22113fi
22114
22115ac_fn_check_decl "$LINENO" "XML_StopParser" "ac_cv_have_decl_XML_StopParser" "$ac_includes_default
22116#include <expat.h>
22117
22118" "$ac_c_undeclared_builtin_options" "CFLAGS"
22119if test "x$ac_cv_have_decl_XML_StopParser" = xyes
22120then :
22121  ac_have_decl=1
22122else $as_nop
22123  ac_have_decl=0
22124fi
22125printf "%s\n" "#define HAVE_DECL_XML_STOPPARSER $ac_have_decl" >>confdefs.h
22126
22127
22128# hiredis (redis C client for cachedb)
22129
22130# Check whether --with-libhiredis was given.
22131if test ${with_libhiredis+y}
22132then :
22133  withval=$with_libhiredis;
22134else $as_nop
22135   withval="no"
22136fi
22137
22138found_libhiredis="no"
22139if test x_$withval = x_yes -o x_$withval != x_no; then
22140   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libhiredis" >&5
22141printf %s "checking for libhiredis... " >&6; }
22142   if test x_$withval = x_ -o x_$withval = x_yes; then
22143            withval="/usr/local /opt/local /usr/lib /usr/pkg /usr/sfw /usr"
22144   fi
22145   for dir in $withval ; do
22146            if test -f "$dir/include/hiredis/hiredis.h"; then
22147		found_libhiredis="yes"
22148				if test "$dir" != "/usr"; then
22149                    CPPFLAGS="$CPPFLAGS -I$dir/include"
22150		    LDFLAGS="$LDFLAGS -L$dir/lib"
22151		fi
22152		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: found in $dir" >&5
22153printf "%s\n" "found in $dir" >&6; }
22154
22155printf "%s\n" "#define USE_REDIS 1" >>confdefs.h
22156
22157		LIBS="$LIBS -lhiredis"
22158                break;
22159            fi
22160    done
22161    if test x_$found_libhiredis != x_yes; then
22162	as_fn_error $? "Could not find libhiredis, hiredis.h" "$LINENO" 5
22163    fi
22164    ac_fn_c_check_header_compile "$LINENO" "hiredis/hiredis.h" "ac_cv_header_hiredis_hiredis_h" "$ac_includes_default
22165"
22166if test "x$ac_cv_header_hiredis_hiredis_h" = xyes
22167then :
22168  printf "%s\n" "#define HAVE_HIREDIS_HIREDIS_H 1" >>confdefs.h
22169
22170fi
22171
22172    ac_fn_check_decl "$LINENO" "redisConnect" "ac_cv_have_decl_redisConnect" "$ac_includes_default
22173    #include <hiredis/hiredis.h>
22174
22175" "$ac_c_undeclared_builtin_options" "CFLAGS"
22176if test "x$ac_cv_have_decl_redisConnect" = xyes
22177then :
22178  ac_have_decl=1
22179else $as_nop
22180  ac_have_decl=0
22181fi
22182printf "%s\n" "#define HAVE_DECL_REDISCONNECT $ac_have_decl" >>confdefs.h
22183
22184fi
22185
22186# nghttp2
22187
22188# Check whether --with-libnghttp2 was given.
22189if test ${with_libnghttp2+y}
22190then :
22191  withval=$with_libnghttp2;
22192else $as_nop
22193   withval="no"
22194fi
22195
22196found_libnghttp2="no"
22197if test x_$withval = x_yes -o x_$withval != x_no; then
22198   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libnghttp2" >&5
22199printf %s "checking for libnghttp2... " >&6; }
22200   if test x_$withval = x_ -o x_$withval = x_yes; then
22201            withval="/usr/local /opt/local /usr/lib /usr/pkg /usr/sfw /usr"
22202   fi
22203   for dir in $withval ; do
22204            if test -f "$dir/include/nghttp2/nghttp2.h"; then
22205		found_libnghttp2="yes"
22206				if test "$dir" != "/usr"; then
22207                    CPPFLAGS="$CPPFLAGS -I$dir/include"
22208		    LDFLAGS="$LDFLAGS -L$dir/lib"
22209		fi
22210		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: found in $dir" >&5
22211printf "%s\n" "found in $dir" >&6; }
22212
22213printf "%s\n" "#define HAVE_NGHTTP2 1" >>confdefs.h
22214
22215		LIBS="$LIBS -lnghttp2"
22216                break;
22217            fi
22218    done
22219    if test x_$found_libnghttp2 != x_yes; then
22220	as_fn_error $? "Could not find libnghttp2, nghttp2.h" "$LINENO" 5
22221    fi
22222    ac_fn_c_check_header_compile "$LINENO" "nghttp2/nghttp2.h" "ac_cv_header_nghttp2_nghttp2_h" "$ac_includes_default
22223"
22224if test "x$ac_cv_header_nghttp2_nghttp2_h" = xyes
22225then :
22226  printf "%s\n" "#define HAVE_NGHTTP2_NGHTTP2_H 1" >>confdefs.h
22227
22228fi
22229
22230    ac_fn_check_decl "$LINENO" "nghttp2_session_server_new" "ac_cv_have_decl_nghttp2_session_server_new" "$ac_includes_default
22231    #include <nghttp2/nghttp2.h>
22232
22233" "$ac_c_undeclared_builtin_options" "CFLAGS"
22234if test "x$ac_cv_have_decl_nghttp2_session_server_new" = xyes
22235then :
22236  ac_have_decl=1
22237else $as_nop
22238  ac_have_decl=0
22239fi
22240printf "%s\n" "#define HAVE_DECL_NGHTTP2_SESSION_SERVER_NEW $ac_have_decl" >>confdefs.h
22241
22242fi
22243
22244# ngtcp2
22245
22246# Check whether --with-libngtcp2 was given.
22247if test ${with_libngtcp2+y}
22248then :
22249  withval=$with_libngtcp2;
22250else $as_nop
22251   withval="no"
22252fi
22253
22254found_libngtcp2="no"
22255if test x_$withval = x_yes -o x_$withval != x_no; then
22256   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libngtcp2" >&5
22257printf %s "checking for libngtcp2... " >&6; }
22258   if test x_$withval = x_ -o x_$withval = x_yes; then
22259            withval="/usr/local /opt/local /usr/lib /usr/pkg /usr/sfw /usr"
22260   fi
22261   for dir in $withval ; do
22262            if test -f "$dir/include/ngtcp2/ngtcp2.h"; then
22263		found_libngtcp2="yes"
22264				if test "$dir" != "/usr"; then
22265                    CPPFLAGS="$CPPFLAGS -I$dir/include"
22266		    LDFLAGS="$LDFLAGS -L$dir/lib"
22267		fi
22268		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: found in $dir" >&5
22269printf "%s\n" "found in $dir" >&6; }
22270
22271printf "%s\n" "#define HAVE_NGTCP2 1" >>confdefs.h
22272
22273		LIBS="$LIBS -lngtcp2"
22274                break;
22275            fi
22276    done
22277    if test x_$found_libngtcp2 != x_yes; then
22278	as_fn_error $? "Could not find libngtcp2, ngtcp2.h" "$LINENO" 5
22279    fi
22280    ac_fn_c_check_header_compile "$LINENO" "ngtcp2/ngtcp2.h" "ac_cv_header_ngtcp2_ngtcp2_h" "$ac_includes_default
22281"
22282if test "x$ac_cv_header_ngtcp2_ngtcp2_h" = xyes
22283then :
22284  printf "%s\n" "#define HAVE_NGTCP2_NGTCP2_H 1" >>confdefs.h
22285
22286fi
22287ac_fn_c_check_header_compile "$LINENO" "ngtcp2/ngtcp2_crypto_openssl.h" "ac_cv_header_ngtcp2_ngtcp2_crypto_openssl_h" "$ac_includes_default
22288"
22289if test "x$ac_cv_header_ngtcp2_ngtcp2_crypto_openssl_h" = xyes
22290then :
22291  printf "%s\n" "#define HAVE_NGTCP2_NGTCP2_CRYPTO_OPENSSL_H 1" >>confdefs.h
22292
22293fi
22294ac_fn_c_check_header_compile "$LINENO" "ngtcp2/ngtcp2_crypto_quictls.h" "ac_cv_header_ngtcp2_ngtcp2_crypto_quictls_h" "$ac_includes_default
22295"
22296if test "x$ac_cv_header_ngtcp2_ngtcp2_crypto_quictls_h" = xyes
22297then :
22298  printf "%s\n" "#define HAVE_NGTCP2_NGTCP2_CRYPTO_QUICTLS_H 1" >>confdefs.h
22299
22300fi
22301
22302    ac_fn_check_decl "$LINENO" "ngtcp2_conn_server_new" "ac_cv_have_decl_ngtcp2_conn_server_new" "$ac_includes_default
22303    #include <ngtcp2/ngtcp2.h>
22304
22305" "$ac_c_undeclared_builtin_options" "CFLAGS"
22306if test "x$ac_cv_have_decl_ngtcp2_conn_server_new" = xyes
22307then :
22308  ac_have_decl=1
22309else $as_nop
22310  ac_have_decl=0
22311fi
22312printf "%s\n" "#define HAVE_DECL_NGTCP2_CONN_SERVER_NEW $ac_have_decl" >>confdefs.h
22313
22314    ac_fn_check_decl "$LINENO" "ngtcp2_crypto_encrypt_cb" "ac_cv_have_decl_ngtcp2_crypto_encrypt_cb" "$ac_includes_default
22315    #include <ngtcp2/ngtcp2_crypto.h>
22316
22317" "$ac_c_undeclared_builtin_options" "CFLAGS"
22318if test "x$ac_cv_have_decl_ngtcp2_crypto_encrypt_cb" = xyes
22319then :
22320  ac_have_decl=1
22321else $as_nop
22322  ac_have_decl=0
22323fi
22324printf "%s\n" "#define HAVE_DECL_NGTCP2_CRYPTO_ENCRYPT_CB $ac_have_decl" >>confdefs.h
22325
22326    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ngtcp2_crypto_encrypt_cb in -lngtcp2_crypto_openssl" >&5
22327printf %s "checking for ngtcp2_crypto_encrypt_cb in -lngtcp2_crypto_openssl... " >&6; }
22328if test ${ac_cv_lib_ngtcp2_crypto_openssl_ngtcp2_crypto_encrypt_cb+y}
22329then :
22330  printf %s "(cached) " >&6
22331else $as_nop
22332  ac_check_lib_save_LIBS=$LIBS
22333LIBS="-lngtcp2_crypto_openssl  $LIBS"
22334cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22335/* end confdefs.h.  */
22336
22337/* Override any GCC internal prototype to avoid an error.
22338   Use char because int might match the return type of a GCC
22339   builtin and then its argument prototype would still apply.  */
22340char ngtcp2_crypto_encrypt_cb ();
22341int
22342main (void)
22343{
22344return ngtcp2_crypto_encrypt_cb ();
22345  ;
22346  return 0;
22347}
22348_ACEOF
22349if ac_fn_c_try_link "$LINENO"
22350then :
22351  ac_cv_lib_ngtcp2_crypto_openssl_ngtcp2_crypto_encrypt_cb=yes
22352else $as_nop
22353  ac_cv_lib_ngtcp2_crypto_openssl_ngtcp2_crypto_encrypt_cb=no
22354fi
22355rm -f core conftest.err conftest.$ac_objext conftest.beam \
22356    conftest$ac_exeext conftest.$ac_ext
22357LIBS=$ac_check_lib_save_LIBS
22358fi
22359{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ngtcp2_crypto_openssl_ngtcp2_crypto_encrypt_cb" >&5
22360printf "%s\n" "$ac_cv_lib_ngtcp2_crypto_openssl_ngtcp2_crypto_encrypt_cb" >&6; }
22361if test "x$ac_cv_lib_ngtcp2_crypto_openssl_ngtcp2_crypto_encrypt_cb" = xyes
22362then :
22363   LIBS="$LIBS -lngtcp2_crypto_openssl"
22364fi
22365
22366    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ngtcp2_crypto_encrypt_cb in -lngtcp2_crypto_quictls" >&5
22367printf %s "checking for ngtcp2_crypto_encrypt_cb in -lngtcp2_crypto_quictls... " >&6; }
22368if test ${ac_cv_lib_ngtcp2_crypto_quictls_ngtcp2_crypto_encrypt_cb+y}
22369then :
22370  printf %s "(cached) " >&6
22371else $as_nop
22372  ac_check_lib_save_LIBS=$LIBS
22373LIBS="-lngtcp2_crypto_quictls  $LIBS"
22374cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22375/* end confdefs.h.  */
22376
22377/* Override any GCC internal prototype to avoid an error.
22378   Use char because int might match the return type of a GCC
22379   builtin and then its argument prototype would still apply.  */
22380char ngtcp2_crypto_encrypt_cb ();
22381int
22382main (void)
22383{
22384return ngtcp2_crypto_encrypt_cb ();
22385  ;
22386  return 0;
22387}
22388_ACEOF
22389if ac_fn_c_try_link "$LINENO"
22390then :
22391  ac_cv_lib_ngtcp2_crypto_quictls_ngtcp2_crypto_encrypt_cb=yes
22392else $as_nop
22393  ac_cv_lib_ngtcp2_crypto_quictls_ngtcp2_crypto_encrypt_cb=no
22394fi
22395rm -f core conftest.err conftest.$ac_objext conftest.beam \
22396    conftest$ac_exeext conftest.$ac_ext
22397LIBS=$ac_check_lib_save_LIBS
22398fi
22399{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ngtcp2_crypto_quictls_ngtcp2_crypto_encrypt_cb" >&5
22400printf "%s\n" "$ac_cv_lib_ngtcp2_crypto_quictls_ngtcp2_crypto_encrypt_cb" >&6; }
22401if test "x$ac_cv_lib_ngtcp2_crypto_quictls_ngtcp2_crypto_encrypt_cb" = xyes
22402then :
22403   LIBS="$LIBS -lngtcp2_crypto_quictls"
22404fi
22405
22406    ac_fn_c_check_func "$LINENO" "ngtcp2_crypto_encrypt_cb" "ac_cv_func_ngtcp2_crypto_encrypt_cb"
22407if test "x$ac_cv_func_ngtcp2_crypto_encrypt_cb" = xyes
22408then :
22409  printf "%s\n" "#define HAVE_NGTCP2_CRYPTO_ENCRYPT_CB 1" >>confdefs.h
22410
22411fi
22412ac_fn_c_check_func "$LINENO" "ngtcp2_ccerr_default" "ac_cv_func_ngtcp2_ccerr_default"
22413if test "x$ac_cv_func_ngtcp2_ccerr_default" = xyes
22414then :
22415  printf "%s\n" "#define HAVE_NGTCP2_CCERR_DEFAULT 1" >>confdefs.h
22416
22417fi
22418ac_fn_c_check_func "$LINENO" "ngtcp2_conn_in_closing_period" "ac_cv_func_ngtcp2_conn_in_closing_period"
22419if test "x$ac_cv_func_ngtcp2_conn_in_closing_period" = xyes
22420then :
22421  printf "%s\n" "#define HAVE_NGTCP2_CONN_IN_CLOSING_PERIOD 1" >>confdefs.h
22422
22423fi
22424ac_fn_c_check_func "$LINENO" "ngtcp2_conn_in_draining_period" "ac_cv_func_ngtcp2_conn_in_draining_period"
22425if test "x$ac_cv_func_ngtcp2_conn_in_draining_period" = xyes
22426then :
22427  printf "%s\n" "#define HAVE_NGTCP2_CONN_IN_DRAINING_PERIOD 1" >>confdefs.h
22428
22429fi
22430ac_fn_c_check_func "$LINENO" "ngtcp2_conn_get_max_local_streams_uni" "ac_cv_func_ngtcp2_conn_get_max_local_streams_uni"
22431if test "x$ac_cv_func_ngtcp2_conn_get_max_local_streams_uni" = xyes
22432then :
22433  printf "%s\n" "#define HAVE_NGTCP2_CONN_GET_MAX_LOCAL_STREAMS_UNI 1" >>confdefs.h
22434
22435fi
22436ac_fn_c_check_func "$LINENO" "ngtcp2_crypto_quictls_from_ossl_encryption_level" "ac_cv_func_ngtcp2_crypto_quictls_from_ossl_encryption_level"
22437if test "x$ac_cv_func_ngtcp2_crypto_quictls_from_ossl_encryption_level" = xyes
22438then :
22439  printf "%s\n" "#define HAVE_NGTCP2_CRYPTO_QUICTLS_FROM_OSSL_ENCRYPTION_LEVEL 1" >>confdefs.h
22440
22441fi
22442ac_fn_c_check_func "$LINENO" "ngtcp2_crypto_quictls_configure_server_context" "ac_cv_func_ngtcp2_crypto_quictls_configure_server_context"
22443if test "x$ac_cv_func_ngtcp2_crypto_quictls_configure_server_context" = xyes
22444then :
22445  printf "%s\n" "#define HAVE_NGTCP2_CRYPTO_QUICTLS_CONFIGURE_SERVER_CONTEXT 1" >>confdefs.h
22446
22447fi
22448ac_fn_c_check_func "$LINENO" "ngtcp2_crypto_quictls_configure_client_context" "ac_cv_func_ngtcp2_crypto_quictls_configure_client_context"
22449if test "x$ac_cv_func_ngtcp2_crypto_quictls_configure_client_context" = xyes
22450then :
22451  printf "%s\n" "#define HAVE_NGTCP2_CRYPTO_QUICTLS_CONFIGURE_CLIENT_CONTEXT 1" >>confdefs.h
22452
22453fi
22454ac_fn_c_check_func "$LINENO" "ngtcp2_conn_get_num_scid" "ac_cv_func_ngtcp2_conn_get_num_scid"
22455if test "x$ac_cv_func_ngtcp2_conn_get_num_scid" = xyes
22456then :
22457  printf "%s\n" "#define HAVE_NGTCP2_CONN_GET_NUM_SCID 1" >>confdefs.h
22458
22459fi
22460ac_fn_c_check_func "$LINENO" "ngtcp2_conn_tls_early_data_rejected" "ac_cv_func_ngtcp2_conn_tls_early_data_rejected"
22461if test "x$ac_cv_func_ngtcp2_conn_tls_early_data_rejected" = xyes
22462then :
22463  printf "%s\n" "#define HAVE_NGTCP2_CONN_TLS_EARLY_DATA_REJECTED 1" >>confdefs.h
22464
22465fi
22466ac_fn_c_check_func "$LINENO" "ngtcp2_conn_encode_0rtt_transport_params" "ac_cv_func_ngtcp2_conn_encode_0rtt_transport_params"
22467if test "x$ac_cv_func_ngtcp2_conn_encode_0rtt_transport_params" = xyes
22468then :
22469  printf "%s\n" "#define HAVE_NGTCP2_CONN_ENCODE_0RTT_TRANSPORT_PARAMS 1" >>confdefs.h
22470
22471fi
22472
22473
22474  for ac_func in SSL_is_quic
22475do :
22476  ac_fn_c_check_func "$LINENO" "SSL_is_quic" "ac_cv_func_SSL_is_quic"
22477if test "x$ac_cv_func_SSL_is_quic" = xyes
22478then :
22479  printf "%s\n" "#define HAVE_SSL_IS_QUIC 1" >>confdefs.h
22480
22481else $as_nop
22482  as_fn_error $? "No QUIC support detected in OpenSSL. Need OpenSSL version with QUIC support to enable DNS over QUIC with libngtcp2." "$LINENO" 5
22483fi
22484
22485done
22486    ac_fn_c_check_type "$LINENO" "struct ngtcp2_version_cid" "ac_cv_type_struct_ngtcp2_version_cid" "$ac_includes_default
22487    #include <ngtcp2/ngtcp2.h>
22488
22489"
22490if test "x$ac_cv_type_struct_ngtcp2_version_cid" = xyes
22491then :
22492
22493printf "%s\n" "#define HAVE_STRUCT_NGTCP2_VERSION_CID 1" >>confdefs.h
22494
22495
22496fi
22497ac_fn_c_check_type "$LINENO" "ngtcp2_encryption_level" "ac_cv_type_ngtcp2_encryption_level" "$ac_includes_default
22498    #include <ngtcp2/ngtcp2.h>
22499
22500"
22501if test "x$ac_cv_type_ngtcp2_encryption_level" = xyes
22502then :
22503
22504printf "%s\n" "#define HAVE_NGTCP2_ENCRYPTION_LEVEL 1" >>confdefs.h
22505
22506
22507fi
22508
22509    ac_fn_c_check_member "$LINENO" "struct ngtcp2_pkt_hd" "tokenlen" "ac_cv_member_struct_ngtcp2_pkt_hd_tokenlen" "$ac_includes_default
22510    #include <ngtcp2/ngtcp2.h>
22511
22512"
22513if test "x$ac_cv_member_struct_ngtcp2_pkt_hd_tokenlen" = xyes
22514then :
22515
22516printf "%s\n" "#define HAVE_STRUCT_NGTCP2_PKT_HD_TOKENLEN 1" >>confdefs.h
22517
22518
22519fi
22520ac_fn_c_check_member "$LINENO" "struct ngtcp2_settings" "tokenlen" "ac_cv_member_struct_ngtcp2_settings_tokenlen" "$ac_includes_default
22521    #include <ngtcp2/ngtcp2.h>
22522
22523"
22524if test "x$ac_cv_member_struct_ngtcp2_settings_tokenlen" = xyes
22525then :
22526
22527printf "%s\n" "#define HAVE_STRUCT_NGTCP2_SETTINGS_TOKENLEN 1" >>confdefs.h
22528
22529
22530fi
22531ac_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
22532    #include <ngtcp2/ngtcp2.h>
22533
22534"
22535if test "x$ac_cv_member_struct_ngtcp2_settings_max_tx_udp_payload_size" = xyes
22536then :
22537
22538printf "%s\n" "#define HAVE_STRUCT_NGTCP2_SETTINGS_MAX_TX_UDP_PAYLOAD_SIZE 1" >>confdefs.h
22539
22540
22541fi
22542ac_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
22543    #include <ngtcp2/ngtcp2.h>
22544
22545"
22546if test "x$ac_cv_member_struct_ngtcp2_transport_params_original_dcid_present" = xyes
22547then :
22548
22549printf "%s\n" "#define HAVE_STRUCT_NGTCP2_TRANSPORT_PARAMS_ORIGINAL_DCID_PRESENT 1" >>confdefs.h
22550
22551
22552fi
22553
22554
22555    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ngtcp2_conn_shutdown_stream has 4 arguments" >&5
22556printf %s "checking whether ngtcp2_conn_shutdown_stream has 4 arguments... " >&6; }
22557    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22558/* end confdefs.h.  */
22559$ac_includes_default
22560#include <ngtcp2/ngtcp2.h>
22561
22562int
22563main (void)
22564{
22565
22566	(void)ngtcp2_conn_shutdown_stream(NULL, 0, 0, 0);
22567
22568  ;
22569  return 0;
22570}
22571_ACEOF
22572if ac_fn_c_try_compile "$LINENO"
22573then :
22574
22575	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
22576printf "%s\n" "yes" >&6; }
22577
22578printf "%s\n" "#define HAVE_NGTCP2_CONN_SHUTDOWN_STREAM4 1" >>confdefs.h
22579
22580
22581else $as_nop
22582
22583	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
22584printf "%s\n" "no" >&6; }
22585
22586fi
22587rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
22588
22589fi
22590
22591# set static linking for uninstalled libraries if requested
22592
22593staticexe=""
22594# Check whether --enable-static-exe was given.
22595if test ${enable_static_exe+y}
22596then :
22597  enableval=$enable_static_exe;
22598fi
22599
22600if test x_$enable_static_exe = x_yes; then
22601	staticexe="-static"
22602	if test "$on_mingw" = yes; then
22603		staticexe="-all-static"
22604		# for static compile, include gdi32 and zlib here.
22605		if echo "$LIBS" | grep 'lgdi32' >/dev/null; then
22606			:
22607		else
22608			LIBS="$LIBS -lgdi32"
22609		fi
22610		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
22611printf %s "checking for compress in -lz... " >&6; }
22612if test ${ac_cv_lib_z_compress+y}
22613then :
22614  printf %s "(cached) " >&6
22615else $as_nop
22616  ac_check_lib_save_LIBS=$LIBS
22617LIBS="-lz  $LIBS"
22618cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22619/* end confdefs.h.  */
22620
22621/* Override any GCC internal prototype to avoid an error.
22622   Use char because int might match the return type of a GCC
22623   builtin and then its argument prototype would still apply.  */
22624char compress ();
22625int
22626main (void)
22627{
22628return compress ();
22629  ;
22630  return 0;
22631}
22632_ACEOF
22633if ac_fn_c_try_link "$LINENO"
22634then :
22635  ac_cv_lib_z_compress=yes
22636else $as_nop
22637  ac_cv_lib_z_compress=no
22638fi
22639rm -f core conftest.err conftest.$ac_objext conftest.beam \
22640    conftest$ac_exeext conftest.$ac_ext
22641LIBS=$ac_check_lib_save_LIBS
22642fi
22643{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
22644printf "%s\n" "$ac_cv_lib_z_compress" >&6; }
22645if test "x$ac_cv_lib_z_compress" = xyes
22646then :
22647   LIBS="$LIBS -lz"
22648fi
22649
22650		if echo "$LIBS" | grep -e "libssp.a" -e "lssp" >/dev/null; then
22651			:
22652		else
22653			LIBS="$LIBS -l:libssp.a"
22654		fi
22655	fi
22656fi
22657
22658# set full static linking if requested
22659# Check whether --enable-fully-static was given.
22660if test ${enable_fully_static+y}
22661then :
22662  enableval=$enable_fully_static;
22663fi
22664
22665if test x_$enable_fully_static = x_yes; then
22666	staticexe="-all-static"
22667	if test "$on_mingw" = yes; then
22668		# for static compile, include gdi32 and zlib here.
22669		if echo $LIBS | grep 'lgdi32' >/dev/null; then
22670			:
22671		else
22672			LIBS="$LIBS -lgdi32"
22673		fi
22674		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
22675printf %s "checking for compress in -lz... " >&6; }
22676if test ${ac_cv_lib_z_compress+y}
22677then :
22678  printf %s "(cached) " >&6
22679else $as_nop
22680  ac_check_lib_save_LIBS=$LIBS
22681LIBS="-lz  $LIBS"
22682cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22683/* end confdefs.h.  */
22684
22685/* Override any GCC internal prototype to avoid an error.
22686   Use char because int might match the return type of a GCC
22687   builtin and then its argument prototype would still apply.  */
22688char compress ();
22689int
22690main (void)
22691{
22692return compress ();
22693  ;
22694  return 0;
22695}
22696_ACEOF
22697if ac_fn_c_try_link "$LINENO"
22698then :
22699  ac_cv_lib_z_compress=yes
22700else $as_nop
22701  ac_cv_lib_z_compress=no
22702fi
22703rm -f core conftest.err conftest.$ac_objext conftest.beam \
22704    conftest$ac_exeext conftest.$ac_ext
22705LIBS=$ac_check_lib_save_LIBS
22706fi
22707{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
22708printf "%s\n" "$ac_cv_lib_z_compress" >&6; }
22709if test "x$ac_cv_lib_z_compress" = xyes
22710then :
22711   LIBS="$LIBS -lz"
22712fi
22713
22714		if echo "$LIBS" | grep -e "libssp.a" -e "lssp" >/dev/null; then
22715			:
22716		else
22717			LIBS="$LIBS -l:libssp.a"
22718		fi
22719	fi
22720fi
22721
22722# set lock checking if requested
22723# Check whether --enable-lock_checks was given.
22724if test ${enable_lock_checks+y}
22725then :
22726  enableval=$enable_lock_checks;
22727fi
22728
22729if test x_$enable_lock_checks = x_yes; then
22730
22731printf "%s\n" "#define ENABLE_LOCK_CHECKS 1" >>confdefs.h
22732
22733	CHECKLOCK_OBJ="checklocks.lo"
22734
22735fi
22736
22737
22738{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
22739printf %s "checking for getaddrinfo... " >&6; }
22740ac_cv_func_getaddrinfo=no
22741cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22742/* end confdefs.h.  */
22743
22744#ifdef __cplusplus
22745extern "C"
22746{
22747#endif
22748char* getaddrinfo();
22749char* (*f) () = getaddrinfo;
22750#ifdef __cplusplus
22751}
22752#endif
22753int main(void) {
22754        ;
22755        return 0;
22756}
22757
22758_ACEOF
22759if ac_fn_c_try_link "$LINENO"
22760then :
22761  ac_cv_func_getaddrinfo="yes"
22762if test "$ac_cv_header_windows_h" = "yes"; then
22763
22764printf "%s\n" "#define USE_WINSOCK 1" >>confdefs.h
22765
22766	USE_WINSOCK="1"
22767	if echo "$LIBS" | grep 'lws2_32' >/dev/null; then
22768		:
22769	else
22770		LIBS="$LIBS -lws2_32"
22771	fi
22772fi
22773
22774else $as_nop
22775  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22776/* end confdefs.h.  */
22777
22778#ifdef HAVE_WS2TCPIP_H
22779#include <ws2tcpip.h>
22780#endif
22781
22782int
22783main (void)
22784{
22785
22786        (void)getaddrinfo(NULL, NULL, NULL, NULL);
22787
22788
22789  ;
22790  return 0;
22791}
22792_ACEOF
22793if ac_fn_c_try_link "$LINENO"
22794then :
22795
22796ac_cv_func_getaddrinfo="yes"
22797
22798printf "%s\n" "#define USE_WINSOCK 1" >>confdefs.h
22799
22800USE_WINSOCK="1"
22801
22802else $as_nop
22803  ORIGLIBS="$LIBS"
22804LIBS="$LIBS -lws2_32"
22805cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22806/* end confdefs.h.  */
22807
22808#ifdef HAVE_WS2TCPIP_H
22809#include <ws2tcpip.h>
22810#endif
22811
22812int
22813main (void)
22814{
22815
22816        (void)getaddrinfo(NULL, NULL, NULL, NULL);
22817
22818
22819  ;
22820  return 0;
22821}
22822_ACEOF
22823if ac_fn_c_try_link "$LINENO"
22824then :
22825
22826ac_cv_func_getaddrinfo="yes"
22827
22828printf "%s\n" "#define USE_WINSOCK 1" >>confdefs.h
22829
22830USE_WINSOCK="1"
22831
22832else $as_nop
22833
22834ac_cv_func_getaddrinfo="no"
22835LIBS="$ORIGLIBS"
22836
22837fi
22838rm -f core conftest.err conftest.$ac_objext conftest.beam \
22839    conftest$ac_exeext conftest.$ac_ext
22840
22841fi
22842rm -f core conftest.err conftest.$ac_objext conftest.beam \
22843    conftest$ac_exeext conftest.$ac_ext
22844
22845fi
22846rm -f core conftest.err conftest.$ac_objext conftest.beam \
22847    conftest$ac_exeext conftest.$ac_ext
22848
22849{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_getaddrinfo" >&5
22850printf "%s\n" "$ac_cv_func_getaddrinfo" >&6; }
22851if test $ac_cv_func_getaddrinfo = yes; then
22852
22853printf "%s\n" "#define HAVE_GETADDRINFO 1" >>confdefs.h
22854
22855fi
22856
22857if test "$USE_WINSOCK" = 1; then
22858
22859printf "%s\n" "#define UB_ON_WINDOWS 1" >>confdefs.h
22860
22861	ac_fn_c_check_header_compile "$LINENO" "iphlpapi.h" "ac_cv_header_iphlpapi_h" "$ac_includes_default
22862#include <windows.h>
22863
22864"
22865if test "x$ac_cv_header_iphlpapi_h" = xyes
22866then :
22867  printf "%s\n" "#define HAVE_IPHLPAPI_H 1" >>confdefs.h
22868
22869fi
22870
22871	if test -n "$ac_tool_prefix"; then
22872  # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
22873set dummy ${ac_tool_prefix}windres; ac_word=$2
22874{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22875printf %s "checking for $ac_word... " >&6; }
22876if test ${ac_cv_prog_WINDRES+y}
22877then :
22878  printf %s "(cached) " >&6
22879else $as_nop
22880  if test -n "$WINDRES"; then
22881  ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
22882else
22883as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22884for as_dir in $PATH
22885do
22886  IFS=$as_save_IFS
22887  case $as_dir in #(((
22888    '') as_dir=./ ;;
22889    */) ;;
22890    *) as_dir=$as_dir/ ;;
22891  esac
22892    for ac_exec_ext in '' $ac_executable_extensions; do
22893  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
22894    ac_cv_prog_WINDRES="${ac_tool_prefix}windres"
22895    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
22896    break 2
22897  fi
22898done
22899  done
22900IFS=$as_save_IFS
22901
22902fi
22903fi
22904WINDRES=$ac_cv_prog_WINDRES
22905if test -n "$WINDRES"; then
22906  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $WINDRES" >&5
22907printf "%s\n" "$WINDRES" >&6; }
22908else
22909  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
22910printf "%s\n" "no" >&6; }
22911fi
22912
22913
22914fi
22915if test -z "$ac_cv_prog_WINDRES"; then
22916  ac_ct_WINDRES=$WINDRES
22917  # Extract the first word of "windres", so it can be a program name with args.
22918set dummy windres; ac_word=$2
22919{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22920printf %s "checking for $ac_word... " >&6; }
22921if test ${ac_cv_prog_ac_ct_WINDRES+y}
22922then :
22923  printf %s "(cached) " >&6
22924else $as_nop
22925  if test -n "$ac_ct_WINDRES"; then
22926  ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # Let the user override the test.
22927else
22928as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22929for as_dir in $PATH
22930do
22931  IFS=$as_save_IFS
22932  case $as_dir in #(((
22933    '') as_dir=./ ;;
22934    */) ;;
22935    *) as_dir=$as_dir/ ;;
22936  esac
22937    for ac_exec_ext in '' $ac_executable_extensions; do
22938  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
22939    ac_cv_prog_ac_ct_WINDRES="windres"
22940    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
22941    break 2
22942  fi
22943done
22944  done
22945IFS=$as_save_IFS
22946
22947fi
22948fi
22949ac_ct_WINDRES=$ac_cv_prog_ac_ct_WINDRES
22950if test -n "$ac_ct_WINDRES"; then
22951  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_WINDRES" >&5
22952printf "%s\n" "$ac_ct_WINDRES" >&6; }
22953else
22954  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
22955printf "%s\n" "no" >&6; }
22956fi
22957
22958  if test "x$ac_ct_WINDRES" = x; then
22959    WINDRES=""
22960  else
22961    case $cross_compiling:$ac_tool_warned in
22962yes:)
22963{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
22964printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
22965ac_tool_warned=yes ;;
22966esac
22967    WINDRES=$ac_ct_WINDRES
22968  fi
22969else
22970  WINDRES="$ac_cv_prog_WINDRES"
22971fi
22972
22973	if echo "$LIBS" | grep crypt32 >/dev/null; then
22974		LIBS="$LIBS -liphlpapi"
22975	else
22976		LIBS="$LIBS -liphlpapi -lcrypt32"
22977	fi
22978	WINAPPS="unbound-service-install.exe unbound-service-remove.exe anchor-update.exe"
22979
22980	WIN_DAEMON_SRC="winrc/win_svc.c winrc/w_inst.c"
22981
22982	WIN_DAEMON_OBJ="win_svc.lo w_inst.lo"
22983
22984	WIN_DAEMON_OBJ_LINK="rsrc_unbound.o"
22985
22986	WIN_HOST_OBJ_LINK="rsrc_unbound_host.o"
22987
22988	WIN_UBANCHOR_OBJ_LINK="rsrc_unbound_anchor.o log.lo locks.lo"
22989
22990	WIN_CONTROL_OBJ_LINK="rsrc_unbound_control.o"
22991
22992	WIN_CHECKCONF_OBJ_LINK="rsrc_unbound_checkconf.o"
22993
22994
22995printf "%s\n" "#define __USE_MINGW_ANSI_STDIO 1" >>confdefs.h
22996
22997fi
22998if test $ac_cv_func_getaddrinfo = no; then
22999	case " $LIBOBJS " in
23000  *" fake-rfc2553.$ac_objext "* ) ;;
23001  *) LIBOBJS="$LIBOBJS fake-rfc2553.$ac_objext"
23002 ;;
23003esac
23004
23005fi
23006# check after getaddrinfo for its libraries
23007
23008# check ioctlsocket
23009{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ioctlsocket" >&5
23010printf %s "checking for ioctlsocket... " >&6; }
23011cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23012/* end confdefs.h.  */
23013
23014#ifdef HAVE_WINSOCK2_H
23015#include <winsock2.h>
23016#endif
23017
23018int
23019main (void)
23020{
23021
23022	(void)ioctlsocket(0, 0, NULL);
23023
23024  ;
23025  return 0;
23026}
23027_ACEOF
23028if ac_fn_c_try_link "$LINENO"
23029then :
23030
23031{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
23032printf "%s\n" "yes" >&6; }
23033
23034printf "%s\n" "#define HAVE_IOCTLSOCKET 1" >>confdefs.h
23035
23036
23037else $as_nop
23038  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
23039printf "%s\n" "no" >&6; }
23040fi
23041rm -f core conftest.err conftest.$ac_objext conftest.beam \
23042    conftest$ac_exeext conftest.$ac_ext
23043
23044
23045# see if daemon(3) exists, and if it is deprecated.
23046ac_fn_c_check_func "$LINENO" "daemon" "ac_cv_func_daemon"
23047if test "x$ac_cv_func_daemon" = xyes
23048then :
23049  printf "%s\n" "#define HAVE_DAEMON 1" >>confdefs.h
23050
23051fi
23052
23053if test $ac_cv_func_daemon = yes; then
23054
23055
23056{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if daemon is deprecated" >&5
23057printf %s "checking if daemon is deprecated... " >&6; }
23058cache=`echo daemon | sed 'y%.=/+-%___p_%'`
23059if eval test \${cv_cc_deprecated_$cache+y}
23060then :
23061  printf %s "(cached) " >&6
23062else $as_nop
23063
23064echo '
23065#include <stdlib.h>
23066#include <unistd.h>
23067' >conftest.c
23068echo 'void f(void){ (void)daemon(0, 0); }' >>conftest.c
23069if test -z "`$CC $CPPFLAGS $CFLAGS -c conftest.c 2>&1 | grep -e deprecated -e unavailable`"; then
23070eval "cv_cc_deprecated_$cache=no"
23071else
23072eval "cv_cc_deprecated_$cache=yes"
23073fi
23074rm -f conftest conftest.o conftest.c
23075
23076fi
23077
23078if eval "test \"`echo '$cv_cc_deprecated_'$cache`\" = yes"; then
23079{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
23080printf "%s\n" "yes" >&6; }
23081
23082printf "%s\n" "#define DEPRECATED_DAEMON 1" >>confdefs.h
23083
23084:
23085
23086else
23087{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
23088printf "%s\n" "no" >&6; }
23089:
23090
23091fi
23092
23093fi
23094
23095ac_fn_c_check_member "$LINENO" "struct sockaddr_un" "sun_len" "ac_cv_member_struct_sockaddr_un_sun_len" "
23096$ac_includes_default
23097#ifdef HAVE_SYS_UN_H
23098#include <sys/un.h>
23099#endif
23100
23101"
23102if test "x$ac_cv_member_struct_sockaddr_un_sun_len" = xyes
23103then :
23104
23105printf "%s\n" "#define HAVE_STRUCT_SOCKADDR_UN_SUN_LEN 1" >>confdefs.h
23106
23107
23108fi
23109
23110ac_fn_c_check_member "$LINENO" "struct in_pktinfo" "ipi_spec_dst" "ac_cv_member_struct_in_pktinfo_ipi_spec_dst" "
23111$ac_includes_default
23112#if HAVE_SYS_PARAM_H
23113#include <sys/param.h>
23114#endif
23115
23116#ifdef HAVE_SYS_SOCKET_H
23117#include <sys/socket.h>
23118#endif
23119
23120#ifdef HAVE_SYS_UIO_H
23121#include <sys/uio.h>
23122#endif
23123
23124#ifdef HAVE_NETINET_IN_H
23125#include <netinet/in.h>
23126#endif
23127
23128#ifdef HAVE_NETINET_TCP_H
23129#include <netinet/tcp.h>
23130#endif
23131
23132#ifdef HAVE_ARPA_INET_H
23133#include <arpa/inet.h>
23134#endif
23135
23136#ifdef HAVE_WINSOCK2_H
23137#include <winsock2.h>
23138#endif
23139
23140#ifdef HAVE_WS2TCPIP_H
23141#include <ws2tcpip.h>
23142#endif
23143
23144"
23145if test "x$ac_cv_member_struct_in_pktinfo_ipi_spec_dst" = xyes
23146then :
23147
23148printf "%s\n" "#define HAVE_STRUCT_IN_PKTINFO_IPI_SPEC_DST 1" >>confdefs.h
23149
23150
23151fi
23152
23153
23154{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for htobe64" >&5
23155printf %s "checking for htobe64... " >&6; }
23156cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23157/* end confdefs.h.  */
23158
23159#include <stdio.h>
23160#ifdef HAVE_ENDIAN_H
23161#  include <endian.h>
23162#endif
23163#ifdef HAVE_SYS_ENDIAN_H
23164#  include <sys/endian.h>
23165#endif
23166
23167int
23168main (void)
23169{
23170unsigned long long x = htobe64(0); printf("%u", (unsigned)x);
23171  ;
23172  return 0;
23173}
23174_ACEOF
23175if ac_fn_c_try_link "$LINENO"
23176then :
23177  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
23178printf "%s\n" "yes" >&6; }
23179
23180printf "%s\n" "#define HAVE_HTOBE64 1" >>confdefs.h
23181
23182else $as_nop
23183  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
23184printf "%s\n" "no" >&6; }
23185fi
23186rm -f core conftest.err conftest.$ac_objext conftest.beam \
23187    conftest$ac_exeext conftest.$ac_ext
23188
23189{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for be64toh" >&5
23190printf %s "checking for be64toh... " >&6; }
23191cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23192/* end confdefs.h.  */
23193
23194#include <stdio.h>
23195#ifdef HAVE_ENDIAN_H
23196#  include <endian.h>
23197#endif
23198#ifdef HAVE_SYS_ENDIAN_H
23199#  include <sys/endian.h>
23200#endif
23201
23202int
23203main (void)
23204{
23205unsigned long long x = be64toh(0); printf("%u", (unsigned)x);
23206  ;
23207  return 0;
23208}
23209_ACEOF
23210if ac_fn_c_try_link "$LINENO"
23211then :
23212  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
23213printf "%s\n" "yes" >&6; }
23214
23215printf "%s\n" "#define HAVE_BE64TOH 1" >>confdefs.h
23216
23217else $as_nop
23218  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
23219printf "%s\n" "no" >&6; }
23220fi
23221rm -f core conftest.err conftest.$ac_objext conftest.beam \
23222    conftest$ac_exeext conftest.$ac_ext
23223
23224{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing setusercontext" >&5
23225printf %s "checking for library containing setusercontext... " >&6; }
23226if test ${ac_cv_search_setusercontext+y}
23227then :
23228  printf %s "(cached) " >&6
23229else $as_nop
23230  ac_func_search_save_LIBS=$LIBS
23231cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23232/* end confdefs.h.  */
23233
23234/* Override any GCC internal prototype to avoid an error.
23235   Use char because int might match the return type of a GCC
23236   builtin and then its argument prototype would still apply.  */
23237char setusercontext ();
23238int
23239main (void)
23240{
23241return setusercontext ();
23242  ;
23243  return 0;
23244}
23245_ACEOF
23246for ac_lib in '' util
23247do
23248  if test -z "$ac_lib"; then
23249    ac_res="none required"
23250  else
23251    ac_res=-l$ac_lib
23252    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
23253  fi
23254  if ac_fn_c_try_link "$LINENO"
23255then :
23256  ac_cv_search_setusercontext=$ac_res
23257fi
23258rm -f core conftest.err conftest.$ac_objext conftest.beam \
23259    conftest$ac_exeext
23260  if test ${ac_cv_search_setusercontext+y}
23261then :
23262  break
23263fi
23264done
23265if test ${ac_cv_search_setusercontext+y}
23266then :
23267
23268else $as_nop
23269  ac_cv_search_setusercontext=no
23270fi
23271rm conftest.$ac_ext
23272LIBS=$ac_func_search_save_LIBS
23273fi
23274{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_setusercontext" >&5
23275printf "%s\n" "$ac_cv_search_setusercontext" >&6; }
23276ac_res=$ac_cv_search_setusercontext
23277if test "$ac_res" != no
23278then :
23279  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
23280
23281fi
23282
23283ac_fn_c_check_func "$LINENO" "tzset" "ac_cv_func_tzset"
23284if test "x$ac_cv_func_tzset" = xyes
23285then :
23286  printf "%s\n" "#define HAVE_TZSET 1" >>confdefs.h
23287
23288fi
23289ac_fn_c_check_func "$LINENO" "sigprocmask" "ac_cv_func_sigprocmask"
23290if test "x$ac_cv_func_sigprocmask" = xyes
23291then :
23292  printf "%s\n" "#define HAVE_SIGPROCMASK 1" >>confdefs.h
23293
23294fi
23295ac_fn_c_check_func "$LINENO" "fcntl" "ac_cv_func_fcntl"
23296if test "x$ac_cv_func_fcntl" = xyes
23297then :
23298  printf "%s\n" "#define HAVE_FCNTL 1" >>confdefs.h
23299
23300fi
23301ac_fn_c_check_func "$LINENO" "getpwnam" "ac_cv_func_getpwnam"
23302if test "x$ac_cv_func_getpwnam" = xyes
23303then :
23304  printf "%s\n" "#define HAVE_GETPWNAM 1" >>confdefs.h
23305
23306fi
23307ac_fn_c_check_func "$LINENO" "endpwent" "ac_cv_func_endpwent"
23308if test "x$ac_cv_func_endpwent" = xyes
23309then :
23310  printf "%s\n" "#define HAVE_ENDPWENT 1" >>confdefs.h
23311
23312fi
23313ac_fn_c_check_func "$LINENO" "getrlimit" "ac_cv_func_getrlimit"
23314if test "x$ac_cv_func_getrlimit" = xyes
23315then :
23316  printf "%s\n" "#define HAVE_GETRLIMIT 1" >>confdefs.h
23317
23318fi
23319ac_fn_c_check_func "$LINENO" "setrlimit" "ac_cv_func_setrlimit"
23320if test "x$ac_cv_func_setrlimit" = xyes
23321then :
23322  printf "%s\n" "#define HAVE_SETRLIMIT 1" >>confdefs.h
23323
23324fi
23325ac_fn_c_check_func "$LINENO" "setsid" "ac_cv_func_setsid"
23326if test "x$ac_cv_func_setsid" = xyes
23327then :
23328  printf "%s\n" "#define HAVE_SETSID 1" >>confdefs.h
23329
23330fi
23331ac_fn_c_check_func "$LINENO" "chroot" "ac_cv_func_chroot"
23332if test "x$ac_cv_func_chroot" = xyes
23333then :
23334  printf "%s\n" "#define HAVE_CHROOT 1" >>confdefs.h
23335
23336fi
23337ac_fn_c_check_func "$LINENO" "kill" "ac_cv_func_kill"
23338if test "x$ac_cv_func_kill" = xyes
23339then :
23340  printf "%s\n" "#define HAVE_KILL 1" >>confdefs.h
23341
23342fi
23343ac_fn_c_check_func "$LINENO" "chown" "ac_cv_func_chown"
23344if test "x$ac_cv_func_chown" = xyes
23345then :
23346  printf "%s\n" "#define HAVE_CHOWN 1" >>confdefs.h
23347
23348fi
23349ac_fn_c_check_func "$LINENO" "sleep" "ac_cv_func_sleep"
23350if test "x$ac_cv_func_sleep" = xyes
23351then :
23352  printf "%s\n" "#define HAVE_SLEEP 1" >>confdefs.h
23353
23354fi
23355ac_fn_c_check_func "$LINENO" "usleep" "ac_cv_func_usleep"
23356if test "x$ac_cv_func_usleep" = xyes
23357then :
23358  printf "%s\n" "#define HAVE_USLEEP 1" >>confdefs.h
23359
23360fi
23361ac_fn_c_check_func "$LINENO" "random" "ac_cv_func_random"
23362if test "x$ac_cv_func_random" = xyes
23363then :
23364  printf "%s\n" "#define HAVE_RANDOM 1" >>confdefs.h
23365
23366fi
23367ac_fn_c_check_func "$LINENO" "srandom" "ac_cv_func_srandom"
23368if test "x$ac_cv_func_srandom" = xyes
23369then :
23370  printf "%s\n" "#define HAVE_SRANDOM 1" >>confdefs.h
23371
23372fi
23373ac_fn_c_check_func "$LINENO" "recvmsg" "ac_cv_func_recvmsg"
23374if test "x$ac_cv_func_recvmsg" = xyes
23375then :
23376  printf "%s\n" "#define HAVE_RECVMSG 1" >>confdefs.h
23377
23378fi
23379ac_fn_c_check_func "$LINENO" "sendmsg" "ac_cv_func_sendmsg"
23380if test "x$ac_cv_func_sendmsg" = xyes
23381then :
23382  printf "%s\n" "#define HAVE_SENDMSG 1" >>confdefs.h
23383
23384fi
23385ac_fn_c_check_func "$LINENO" "writev" "ac_cv_func_writev"
23386if test "x$ac_cv_func_writev" = xyes
23387then :
23388  printf "%s\n" "#define HAVE_WRITEV 1" >>confdefs.h
23389
23390fi
23391ac_fn_c_check_func "$LINENO" "socketpair" "ac_cv_func_socketpair"
23392if test "x$ac_cv_func_socketpair" = xyes
23393then :
23394  printf "%s\n" "#define HAVE_SOCKETPAIR 1" >>confdefs.h
23395
23396fi
23397ac_fn_c_check_func "$LINENO" "glob" "ac_cv_func_glob"
23398if test "x$ac_cv_func_glob" = xyes
23399then :
23400  printf "%s\n" "#define HAVE_GLOB 1" >>confdefs.h
23401
23402fi
23403ac_fn_c_check_func "$LINENO" "initgroups" "ac_cv_func_initgroups"
23404if test "x$ac_cv_func_initgroups" = xyes
23405then :
23406  printf "%s\n" "#define HAVE_INITGROUPS 1" >>confdefs.h
23407
23408fi
23409ac_fn_c_check_func "$LINENO" "strftime" "ac_cv_func_strftime"
23410if test "x$ac_cv_func_strftime" = xyes
23411then :
23412  printf "%s\n" "#define HAVE_STRFTIME 1" >>confdefs.h
23413
23414fi
23415ac_fn_c_check_func "$LINENO" "localtime_r" "ac_cv_func_localtime_r"
23416if test "x$ac_cv_func_localtime_r" = xyes
23417then :
23418  printf "%s\n" "#define HAVE_LOCALTIME_R 1" >>confdefs.h
23419
23420fi
23421ac_fn_c_check_func "$LINENO" "setusercontext" "ac_cv_func_setusercontext"
23422if test "x$ac_cv_func_setusercontext" = xyes
23423then :
23424  printf "%s\n" "#define HAVE_SETUSERCONTEXT 1" >>confdefs.h
23425
23426fi
23427ac_fn_c_check_func "$LINENO" "_beginthreadex" "ac_cv_func__beginthreadex"
23428if test "x$ac_cv_func__beginthreadex" = xyes
23429then :
23430  printf "%s\n" "#define HAVE__BEGINTHREADEX 1" >>confdefs.h
23431
23432fi
23433ac_fn_c_check_func "$LINENO" "endservent" "ac_cv_func_endservent"
23434if test "x$ac_cv_func_endservent" = xyes
23435then :
23436  printf "%s\n" "#define HAVE_ENDSERVENT 1" >>confdefs.h
23437
23438fi
23439ac_fn_c_check_func "$LINENO" "endprotoent" "ac_cv_func_endprotoent"
23440if test "x$ac_cv_func_endprotoent" = xyes
23441then :
23442  printf "%s\n" "#define HAVE_ENDPROTOENT 1" >>confdefs.h
23443
23444fi
23445ac_fn_c_check_func "$LINENO" "fsync" "ac_cv_func_fsync"
23446if test "x$ac_cv_func_fsync" = xyes
23447then :
23448  printf "%s\n" "#define HAVE_FSYNC 1" >>confdefs.h
23449
23450fi
23451ac_fn_c_check_func "$LINENO" "shmget" "ac_cv_func_shmget"
23452if test "x$ac_cv_func_shmget" = xyes
23453then :
23454  printf "%s\n" "#define HAVE_SHMGET 1" >>confdefs.h
23455
23456fi
23457ac_fn_c_check_func "$LINENO" "accept4" "ac_cv_func_accept4"
23458if test "x$ac_cv_func_accept4" = xyes
23459then :
23460  printf "%s\n" "#define HAVE_ACCEPT4 1" >>confdefs.h
23461
23462fi
23463ac_fn_c_check_func "$LINENO" "getifaddrs" "ac_cv_func_getifaddrs"
23464if test "x$ac_cv_func_getifaddrs" = xyes
23465then :
23466  printf "%s\n" "#define HAVE_GETIFADDRS 1" >>confdefs.h
23467
23468fi
23469ac_fn_c_check_func "$LINENO" "if_nametoindex" "ac_cv_func_if_nametoindex"
23470if test "x$ac_cv_func_if_nametoindex" = xyes
23471then :
23472  printf "%s\n" "#define HAVE_IF_NAMETOINDEX 1" >>confdefs.h
23473
23474fi
23475ac_fn_c_check_func "$LINENO" "poll" "ac_cv_func_poll"
23476if test "x$ac_cv_func_poll" = xyes
23477then :
23478  printf "%s\n" "#define HAVE_POLL 1" >>confdefs.h
23479
23480fi
23481ac_fn_c_check_func "$LINENO" "gettid" "ac_cv_func_gettid"
23482if test "x$ac_cv_func_gettid" = xyes
23483then :
23484  printf "%s\n" "#define HAVE_GETTID 1" >>confdefs.h
23485
23486fi
23487
23488
23489  for ac_func in setresuid
23490do :
23491  ac_fn_c_check_func "$LINENO" "setresuid" "ac_cv_func_setresuid"
23492if test "x$ac_cv_func_setresuid" = xyes
23493then :
23494  printf "%s\n" "#define HAVE_SETRESUID 1" >>confdefs.h
23495
23496else $as_nop
23497  ac_fn_c_check_func "$LINENO" "setreuid" "ac_cv_func_setreuid"
23498if test "x$ac_cv_func_setreuid" = xyes
23499then :
23500  printf "%s\n" "#define HAVE_SETREUID 1" >>confdefs.h
23501
23502fi
23503
23504fi
23505
23506done
23507
23508  for ac_func in setresgid
23509do :
23510  ac_fn_c_check_func "$LINENO" "setresgid" "ac_cv_func_setresgid"
23511if test "x$ac_cv_func_setresgid" = xyes
23512then :
23513  printf "%s\n" "#define HAVE_SETRESGID 1" >>confdefs.h
23514
23515else $as_nop
23516  ac_fn_c_check_func "$LINENO" "setregid" "ac_cv_func_setregid"
23517if test "x$ac_cv_func_setregid" = xyes
23518then :
23519  printf "%s\n" "#define HAVE_SETREGID 1" >>confdefs.h
23520
23521fi
23522
23523fi
23524
23525done
23526
23527# check if setreuid en setregid fail, on MacOSX10.4(darwin8).
23528if echo $host_os | grep darwin8 > /dev/null; then
23529
23530printf "%s\n" "#define DARWIN_BROKEN_SETREUID 1" >>confdefs.h
23531
23532fi
23533
23534{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for atomic_store" >&5
23535printf %s "checking for atomic_store... " >&6; }
23536cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23537/* end confdefs.h.  */
23538$ac_includes_default
23539#ifdef HAVE_STDATOMIC_H
23540#include <stdatomic.h>
23541#endif
23542
23543int
23544main (void)
23545{
23546
23547	int newvar = 5, var = 0;
23548	atomic_store((_Atomic int*)&var, newvar);
23549	newvar = 0;
23550	/* condition to use the variables. */
23551	if(var == newvar) return 1;
23552
23553  ;
23554  return 0;
23555}
23556_ACEOF
23557if ac_fn_c_try_link "$LINENO"
23558then :
23559
23560	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
23561printf "%s\n" "yes" >&6; }
23562
23563printf "%s\n" "#define HAVE_LINK_ATOMIC_STORE 1" >>confdefs.h
23564
23565
23566else $as_nop
23567
23568	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
23569printf "%s\n" "no" >&6; }
23570
23571fi
23572rm -f core conftest.err conftest.$ac_objext conftest.beam \
23573    conftest$ac_exeext conftest.$ac_ext
23574
23575ac_fn_check_decl "$LINENO" "inet_pton" "ac_cv_have_decl_inet_pton" "
23576$ac_includes_default
23577#ifdef HAVE_NETINET_IN_H
23578#include <netinet/in.h>
23579#endif
23580
23581#ifdef HAVE_NETINET_TCP_H
23582#include <netinet/tcp.h>
23583#endif
23584
23585#ifdef HAVE_ARPA_INET_H
23586#include <arpa/inet.h>
23587#endif
23588
23589#ifdef HAVE_WINSOCK2_H
23590#include <winsock2.h>
23591#endif
23592
23593#ifdef HAVE_WS2TCPIP_H
23594#include <ws2tcpip.h>
23595#endif
23596
23597" "$ac_c_undeclared_builtin_options" "CFLAGS"
23598if test "x$ac_cv_have_decl_inet_pton" = xyes
23599then :
23600  ac_have_decl=1
23601else $as_nop
23602  ac_have_decl=0
23603fi
23604printf "%s\n" "#define HAVE_DECL_INET_PTON $ac_have_decl" >>confdefs.h
23605ac_fn_check_decl "$LINENO" "inet_ntop" "ac_cv_have_decl_inet_ntop" "
23606$ac_includes_default
23607#ifdef HAVE_NETINET_IN_H
23608#include <netinet/in.h>
23609#endif
23610
23611#ifdef HAVE_NETINET_TCP_H
23612#include <netinet/tcp.h>
23613#endif
23614
23615#ifdef HAVE_ARPA_INET_H
23616#include <arpa/inet.h>
23617#endif
23618
23619#ifdef HAVE_WINSOCK2_H
23620#include <winsock2.h>
23621#endif
23622
23623#ifdef HAVE_WS2TCPIP_H
23624#include <ws2tcpip.h>
23625#endif
23626
23627" "$ac_c_undeclared_builtin_options" "CFLAGS"
23628if test "x$ac_cv_have_decl_inet_ntop" = xyes
23629then :
23630  ac_have_decl=1
23631else $as_nop
23632  ac_have_decl=0
23633fi
23634printf "%s\n" "#define HAVE_DECL_INET_NTOP $ac_have_decl" >>confdefs.h
23635
23636ac_fn_c_check_func "$LINENO" "inet_aton" "ac_cv_func_inet_aton"
23637if test "x$ac_cv_func_inet_aton" = xyes
23638then :
23639  printf "%s\n" "#define HAVE_INET_ATON 1" >>confdefs.h
23640
23641else $as_nop
23642  case " $LIBOBJS " in
23643  *" inet_aton.$ac_objext "* ) ;;
23644  *) LIBOBJS="$LIBOBJS inet_aton.$ac_objext"
23645 ;;
23646esac
23647
23648fi
23649
23650ac_fn_c_check_func "$LINENO" "inet_pton" "ac_cv_func_inet_pton"
23651if test "x$ac_cv_func_inet_pton" = xyes
23652then :
23653  printf "%s\n" "#define HAVE_INET_PTON 1" >>confdefs.h
23654
23655else $as_nop
23656  case " $LIBOBJS " in
23657  *" inet_pton.$ac_objext "* ) ;;
23658  *) LIBOBJS="$LIBOBJS inet_pton.$ac_objext"
23659 ;;
23660esac
23661
23662fi
23663
23664ac_fn_c_check_func "$LINENO" "inet_ntop" "ac_cv_func_inet_ntop"
23665if test "x$ac_cv_func_inet_ntop" = xyes
23666then :
23667  printf "%s\n" "#define HAVE_INET_NTOP 1" >>confdefs.h
23668
23669else $as_nop
23670  case " $LIBOBJS " in
23671  *" inet_ntop.$ac_objext "* ) ;;
23672  *) LIBOBJS="$LIBOBJS inet_ntop.$ac_objext"
23673 ;;
23674esac
23675
23676fi
23677
23678ac_fn_c_check_func "$LINENO" "snprintf" "ac_cv_func_snprintf"
23679if test "x$ac_cv_func_snprintf" = xyes
23680then :
23681  printf "%s\n" "#define HAVE_SNPRINTF 1" >>confdefs.h
23682
23683else $as_nop
23684  case " $LIBOBJS " in
23685  *" snprintf.$ac_objext "* ) ;;
23686  *) LIBOBJS="$LIBOBJS snprintf.$ac_objext"
23687 ;;
23688esac
23689
23690fi
23691
23692# test if snprintf return the proper length
23693if test "x$ac_cv_func_snprintf" = xyes; then
23694    if test c${cross_compiling} = cno; then
23695	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for correct snprintf return value" >&5
23696printf %s "checking for correct snprintf return value... " >&6; }
23697	if test "$cross_compiling" = yes
23698then :
23699  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: maybe" >&5
23700printf "%s\n" "maybe" >&6; }
23701else $as_nop
23702  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23703/* end confdefs.h.  */
23704$ac_includes_default
23705
23706int main(void) { return !(snprintf(NULL, 0, "test") == 4); }
23707
23708_ACEOF
23709if ac_fn_c_try_run "$LINENO"
23710then :
23711  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
23712printf "%s\n" "yes" >&6; }
23713else $as_nop
23714
23715		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
23716printf "%s\n" "no" >&6; }
23717
23718printf "%s\n" "#define SNPRINTF_RET_BROKEN /**/" >>confdefs.h
23719
23720		case " $LIBOBJS " in
23721  *" snprintf.$ac_objext "* ) ;;
23722  *) LIBOBJS="$LIBOBJS snprintf.$ac_objext"
23723 ;;
23724esac
23725
23726
23727fi
23728rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23729  conftest.$ac_objext conftest.beam conftest.$ac_ext
23730fi
23731
23732    fi
23733fi
23734ac_fn_c_check_func "$LINENO" "strlcat" "ac_cv_func_strlcat"
23735if test "x$ac_cv_func_strlcat" = xyes
23736then :
23737  printf "%s\n" "#define HAVE_STRLCAT 1" >>confdefs.h
23738
23739else $as_nop
23740  case " $LIBOBJS " in
23741  *" strlcat.$ac_objext "* ) ;;
23742  *) LIBOBJS="$LIBOBJS strlcat.$ac_objext"
23743 ;;
23744esac
23745
23746fi
23747
23748ac_fn_c_check_func "$LINENO" "strlcpy" "ac_cv_func_strlcpy"
23749if test "x$ac_cv_func_strlcpy" = xyes
23750then :
23751  printf "%s\n" "#define HAVE_STRLCPY 1" >>confdefs.h
23752
23753else $as_nop
23754  case " $LIBOBJS " in
23755  *" strlcpy.$ac_objext "* ) ;;
23756  *) LIBOBJS="$LIBOBJS strlcpy.$ac_objext"
23757 ;;
23758esac
23759
23760fi
23761
23762ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove"
23763if test "x$ac_cv_func_memmove" = xyes
23764then :
23765  printf "%s\n" "#define HAVE_MEMMOVE 1" >>confdefs.h
23766
23767else $as_nop
23768  case " $LIBOBJS " in
23769  *" memmove.$ac_objext "* ) ;;
23770  *) LIBOBJS="$LIBOBJS memmove.$ac_objext"
23771 ;;
23772esac
23773
23774fi
23775
23776ac_fn_c_check_func "$LINENO" "gmtime_r" "ac_cv_func_gmtime_r"
23777if test "x$ac_cv_func_gmtime_r" = xyes
23778then :
23779  printf "%s\n" "#define HAVE_GMTIME_R 1" >>confdefs.h
23780
23781else $as_nop
23782  case " $LIBOBJS " in
23783  *" gmtime_r.$ac_objext "* ) ;;
23784  *) LIBOBJS="$LIBOBJS gmtime_r.$ac_objext"
23785 ;;
23786esac
23787
23788fi
23789
23790ac_fn_c_check_func "$LINENO" "isblank" "ac_cv_func_isblank"
23791if test "x$ac_cv_func_isblank" = xyes
23792then :
23793  printf "%s\n" "#define HAVE_ISBLANK 1" >>confdefs.h
23794
23795else $as_nop
23796  case " $LIBOBJS " in
23797  *" isblank.$ac_objext "* ) ;;
23798  *) LIBOBJS="$LIBOBJS isblank.$ac_objext"
23799 ;;
23800esac
23801
23802fi
23803
23804ac_fn_c_check_func "$LINENO" "explicit_bzero" "ac_cv_func_explicit_bzero"
23805if test "x$ac_cv_func_explicit_bzero" = xyes
23806then :
23807  printf "%s\n" "#define HAVE_EXPLICIT_BZERO 1" >>confdefs.h
23808
23809else $as_nop
23810  case " $LIBOBJS " in
23811  *" explicit_bzero.$ac_objext "* ) ;;
23812  *) LIBOBJS="$LIBOBJS explicit_bzero.$ac_objext"
23813 ;;
23814esac
23815
23816fi
23817
23818LIBOBJ_WITHOUT_CTIMEARC4="$LIBOBJS"
23819
23820{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for reallocarray" >&5
23821printf %s "checking for reallocarray... " >&6; }
23822cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23823/* end confdefs.h.  */
23824$ac_includes_default
23825
23826#ifndef _OPENBSD_SOURCE
23827#define _OPENBSD_SOURCE 1
23828#endif
23829#include <stdlib.h>
23830int main(void) {
23831	void* p = reallocarray(NULL, 10, 100);
23832	free(p);
23833	return 0;
23834}
23835
23836_ACEOF
23837if ac_fn_c_try_link "$LINENO"
23838then :
23839  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
23840printf "%s\n" "yes" >&6; }
23841
23842printf "%s\n" "#define HAVE_REALLOCARRAY 1" >>confdefs.h
23843
23844
23845else $as_nop
23846
23847	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
23848printf "%s\n" "no" >&6; }
23849	case " $LIBOBJS " in
23850  *" reallocarray.$ac_objext "* ) ;;
23851  *) LIBOBJS="$LIBOBJS reallocarray.$ac_objext"
23852 ;;
23853esac
23854
23855
23856fi
23857rm -f core conftest.err conftest.$ac_objext conftest.beam \
23858    conftest$ac_exeext conftest.$ac_ext
23859ac_fn_check_decl "$LINENO" "reallocarray" "ac_cv_have_decl_reallocarray" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
23860if test "x$ac_cv_have_decl_reallocarray" = xyes
23861then :
23862  ac_have_decl=1
23863else $as_nop
23864  ac_have_decl=0
23865fi
23866printf "%s\n" "#define HAVE_DECL_REALLOCARRAY $ac_have_decl" >>confdefs.h
23867
23868if test "$USE_NSS" = "no"; then
23869	ac_fn_c_check_func "$LINENO" "arc4random" "ac_cv_func_arc4random"
23870if test "x$ac_cv_func_arc4random" = xyes
23871then :
23872  printf "%s\n" "#define HAVE_ARC4RANDOM 1" >>confdefs.h
23873
23874else $as_nop
23875  case " $LIBOBJS " in
23876  *" arc4random.$ac_objext "* ) ;;
23877  *) LIBOBJS="$LIBOBJS arc4random.$ac_objext"
23878 ;;
23879esac
23880
23881fi
23882
23883	ac_fn_c_check_func "$LINENO" "arc4random_uniform" "ac_cv_func_arc4random_uniform"
23884if test "x$ac_cv_func_arc4random_uniform" = xyes
23885then :
23886  printf "%s\n" "#define HAVE_ARC4RANDOM_UNIFORM 1" >>confdefs.h
23887
23888else $as_nop
23889  case " $LIBOBJS " in
23890  *" arc4random_uniform.$ac_objext "* ) ;;
23891  *) LIBOBJS="$LIBOBJS arc4random_uniform.$ac_objext"
23892 ;;
23893esac
23894
23895fi
23896
23897	if test "$ac_cv_func_arc4random" = "no"; then
23898		case " $LIBOBJS " in
23899  *" arc4_lock.$ac_objext "* ) ;;
23900  *) LIBOBJS="$LIBOBJS arc4_lock.$ac_objext"
23901 ;;
23902esac
23903
23904
23905  for ac_func in getentropy
23906do :
23907  ac_fn_c_check_func "$LINENO" "getentropy" "ac_cv_func_getentropy"
23908if test "x$ac_cv_func_getentropy" = xyes
23909then :
23910  printf "%s\n" "#define HAVE_GETENTROPY 1" >>confdefs.h
23911
23912else $as_nop
23913
23914		    if test "$USE_WINSOCK" = 1; then
23915			case " $LIBOBJS " in
23916  *" getentropy_win.$ac_objext "* ) ;;
23917  *) LIBOBJS="$LIBOBJS getentropy_win.$ac_objext"
23918 ;;
23919esac
23920
23921		    else
23922			case "$host" in
23923			Darwin|*darwin*)
23924				case " $LIBOBJS " in
23925  *" getentropy_osx.$ac_objext "* ) ;;
23926  *) LIBOBJS="$LIBOBJS getentropy_osx.$ac_objext"
23927 ;;
23928esac
23929
23930			;;
23931			*solaris*|*sunos*|SunOS)
23932				case " $LIBOBJS " in
23933  *" getentropy_solaris.$ac_objext "* ) ;;
23934  *) LIBOBJS="$LIBOBJS getentropy_solaris.$ac_objext"
23935 ;;
23936esac
23937
23938				       for ac_header in sys/sha2.h
23939do :
23940  ac_fn_c_check_header_compile "$LINENO" "sys/sha2.h" "ac_cv_header_sys_sha2_h" "$ac_includes_default
23941"
23942if test "x$ac_cv_header_sys_sha2_h" = xyes
23943then :
23944  printf "%s\n" "#define HAVE_SYS_SHA2_H 1" >>confdefs.h
23945
23946else $as_nop
23947
23948
23949  for ac_func in SHA512_Update
23950do :
23951  ac_fn_c_check_func "$LINENO" "SHA512_Update" "ac_cv_func_SHA512_Update"
23952if test "x$ac_cv_func_SHA512_Update" = xyes
23953then :
23954  printf "%s\n" "#define HAVE_SHA512_UPDATE 1" >>confdefs.h
23955
23956else $as_nop
23957
23958						case " $LIBOBJS " in
23959  *" sha512.$ac_objext "* ) ;;
23960  *) LIBOBJS="$LIBOBJS sha512.$ac_objext"
23961 ;;
23962esac
23963
23964
23965fi
23966
23967done
23968
23969fi
23970
23971done
23972				if test "$ac_cv_header_sys_sha2_h" = "yes"; then
23973					# this lib needed for sha2 on solaris
23974					LIBS="$LIBS -lmd"
23975				fi
23976				{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5
23977printf %s "checking for library containing clock_gettime... " >&6; }
23978if test ${ac_cv_search_clock_gettime+y}
23979then :
23980  printf %s "(cached) " >&6
23981else $as_nop
23982  ac_func_search_save_LIBS=$LIBS
23983cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23984/* end confdefs.h.  */
23985
23986/* Override any GCC internal prototype to avoid an error.
23987   Use char because int might match the return type of a GCC
23988   builtin and then its argument prototype would still apply.  */
23989char clock_gettime ();
23990int
23991main (void)
23992{
23993return clock_gettime ();
23994  ;
23995  return 0;
23996}
23997_ACEOF
23998for ac_lib in '' rt
23999do
24000  if test -z "$ac_lib"; then
24001    ac_res="none required"
24002  else
24003    ac_res=-l$ac_lib
24004    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
24005  fi
24006  if ac_fn_c_try_link "$LINENO"
24007then :
24008  ac_cv_search_clock_gettime=$ac_res
24009fi
24010rm -f core conftest.err conftest.$ac_objext conftest.beam \
24011    conftest$ac_exeext
24012  if test ${ac_cv_search_clock_gettime+y}
24013then :
24014  break
24015fi
24016done
24017if test ${ac_cv_search_clock_gettime+y}
24018then :
24019
24020else $as_nop
24021  ac_cv_search_clock_gettime=no
24022fi
24023rm conftest.$ac_ext
24024LIBS=$ac_func_search_save_LIBS
24025fi
24026{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5
24027printf "%s\n" "$ac_cv_search_clock_gettime" >&6; }
24028ac_res=$ac_cv_search_clock_gettime
24029if test "$ac_res" != no
24030then :
24031  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
24032
24033fi
24034
24035			;;
24036			*freebsd*|*FreeBSD)
24037				case " $LIBOBJS " in
24038  *" getentropy_freebsd.$ac_objext "* ) ;;
24039  *) LIBOBJS="$LIBOBJS getentropy_freebsd.$ac_objext"
24040 ;;
24041esac
24042
24043			;;
24044			*linux*|Linux|*)
24045				case " $LIBOBJS " in
24046  *" getentropy_linux.$ac_objext "* ) ;;
24047  *) LIBOBJS="$LIBOBJS getentropy_linux.$ac_objext"
24048 ;;
24049esac
24050
24051
24052  for ac_func in SHA512_Update
24053do :
24054  ac_fn_c_check_func "$LINENO" "SHA512_Update" "ac_cv_func_SHA512_Update"
24055if test "x$ac_cv_func_SHA512_Update" = xyes
24056then :
24057  printf "%s\n" "#define HAVE_SHA512_UPDATE 1" >>confdefs.h
24058
24059else $as_nop
24060
24061
24062printf "%s\n" "#define COMPAT_SHA512 1" >>confdefs.h
24063
24064					case " $LIBOBJS " in
24065  *" sha512.$ac_objext "* ) ;;
24066  *) LIBOBJS="$LIBOBJS sha512.$ac_objext"
24067 ;;
24068esac
24069
24070
24071fi
24072
24073done
24074				ac_fn_c_check_header_compile "$LINENO" "sys/sysctl.h" "ac_cv_header_sys_sysctl_h" "$ac_includes_default
24075"
24076if test "x$ac_cv_header_sys_sysctl_h" = xyes
24077then :
24078  printf "%s\n" "#define HAVE_SYS_SYSCTL_H 1" >>confdefs.h
24079
24080fi
24081
24082				ac_fn_c_check_func "$LINENO" "getauxval" "ac_cv_func_getauxval"
24083if test "x$ac_cv_func_getauxval" = xyes
24084then :
24085  printf "%s\n" "#define HAVE_GETAUXVAL 1" >>confdefs.h
24086
24087fi
24088
24089				{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5
24090printf %s "checking for library containing clock_gettime... " >&6; }
24091if test ${ac_cv_search_clock_gettime+y}
24092then :
24093  printf %s "(cached) " >&6
24094else $as_nop
24095  ac_func_search_save_LIBS=$LIBS
24096cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24097/* end confdefs.h.  */
24098
24099/* Override any GCC internal prototype to avoid an error.
24100   Use char because int might match the return type of a GCC
24101   builtin and then its argument prototype would still apply.  */
24102char clock_gettime ();
24103int
24104main (void)
24105{
24106return clock_gettime ();
24107  ;
24108  return 0;
24109}
24110_ACEOF
24111for ac_lib in '' rt
24112do
24113  if test -z "$ac_lib"; then
24114    ac_res="none required"
24115  else
24116    ac_res=-l$ac_lib
24117    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
24118  fi
24119  if ac_fn_c_try_link "$LINENO"
24120then :
24121  ac_cv_search_clock_gettime=$ac_res
24122fi
24123rm -f core conftest.err conftest.$ac_objext conftest.beam \
24124    conftest$ac_exeext
24125  if test ${ac_cv_search_clock_gettime+y}
24126then :
24127  break
24128fi
24129done
24130if test ${ac_cv_search_clock_gettime+y}
24131then :
24132
24133else $as_nop
24134  ac_cv_search_clock_gettime=no
24135fi
24136rm conftest.$ac_ext
24137LIBS=$ac_func_search_save_LIBS
24138fi
24139{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5
24140printf "%s\n" "$ac_cv_search_clock_gettime" >&6; }
24141ac_res=$ac_cv_search_clock_gettime
24142if test "$ac_res" != no
24143then :
24144  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
24145
24146fi
24147
24148			;;
24149			esac
24150		    fi
24151
24152fi
24153
24154done
24155	fi
24156fi
24157LIBOBJ_WITHOUT_CTIME="$LIBOBJS"
24158
24159ac_fn_c_check_func "$LINENO" "ctime_r" "ac_cv_func_ctime_r"
24160if test "x$ac_cv_func_ctime_r" = xyes
24161then :
24162  printf "%s\n" "#define HAVE_CTIME_R 1" >>confdefs.h
24163
24164else $as_nop
24165  case " $LIBOBJS " in
24166  *" ctime_r.$ac_objext "* ) ;;
24167  *) LIBOBJS="$LIBOBJS ctime_r.$ac_objext"
24168 ;;
24169esac
24170
24171fi
24172
24173ac_fn_c_check_func "$LINENO" "strsep" "ac_cv_func_strsep"
24174if test "x$ac_cv_func_strsep" = xyes
24175then :
24176  printf "%s\n" "#define HAVE_STRSEP 1" >>confdefs.h
24177
24178else $as_nop
24179  case " $LIBOBJS " in
24180  *" strsep.$ac_objext "* ) ;;
24181  *) LIBOBJS="$LIBOBJS strsep.$ac_objext"
24182 ;;
24183esac
24184
24185fi
24186
24187
24188# Check whether --enable-allsymbols was given.
24189if test ${enable_allsymbols+y}
24190then :
24191  enableval=$enable_allsymbols;
24192fi
24193
24194case "$enable_allsymbols" in
24195	yes)
24196	COMMON_OBJ_ALL_SYMBOLS=""
24197	UBSYMS=""
24198	EXTRALINK="libunbound.la"
24199
24200printf "%s\n" "#define EXPORT_ALL_SYMBOLS 1" >>confdefs.h
24201
24202	;;
24203	no|*)
24204	COMMON_OBJ_ALL_SYMBOLS='$(COMMON_OBJ)'
24205	UBSYMS='-export-symbols $(srcdir)/libunbound/ubsyms.def'
24206	EXTRALINK=""
24207	;;
24208esac
24209
24210
24211
24212if test x_$enable_lock_checks = x_yes; then
24213	UBSYMS="-export-symbols clubsyms.def"
24214	cp ${srcdir}/libunbound/ubsyms.def clubsyms.def
24215	echo lock_protect >> clubsyms.def
24216	echo lock_protect_place >> clubsyms.def
24217	echo lock_unprotect >> clubsyms.def
24218	echo lock_get_mem >> clubsyms.def
24219	echo checklock_start >> clubsyms.def
24220	echo checklock_stop >> clubsyms.def
24221	echo checklock_set_output_name >> clubsyms.def
24222	echo checklock_lock >> clubsyms.def
24223	echo checklock_unlock >> clubsyms.def
24224	echo checklock_init >> clubsyms.def
24225	echo checklock_thrcreate >> clubsyms.def
24226	echo checklock_thrjoin >> clubsyms.def
24227fi
24228
24229# check for dnstap if requested
24230
24231    # Check whether --enable-dnstap was given.
24232if test ${enable_dnstap+y}
24233then :
24234  enableval=$enable_dnstap; opt_dnstap=$enableval
24235else $as_nop
24236  opt_dnstap=no
24237fi
24238
24239
24240
24241# Check whether --with-dnstap-socket-path was given.
24242if test ${with_dnstap_socket_path+y}
24243then :
24244  withval=$with_dnstap_socket_path; opt_dnstap_socket_path=$withval
24245else $as_nop
24246  opt_dnstap_socket_path="$UNBOUND_RUN_DIR/dnstap.sock"
24247fi
24248
24249
24250    if test "x$opt_dnstap" != "xno"; then
24251        # Extract the first word of "protoc-c", so it can be a program name with args.
24252set dummy protoc-c; ac_word=$2
24253{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24254printf %s "checking for $ac_word... " >&6; }
24255if test ${ac_cv_path_PROTOC_C+y}
24256then :
24257  printf %s "(cached) " >&6
24258else $as_nop
24259  case $PROTOC_C in
24260  [\\/]* | ?:[\\/]*)
24261  ac_cv_path_PROTOC_C="$PROTOC_C" # Let the user override the test with a path.
24262  ;;
24263  *)
24264  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24265for as_dir in $PATH
24266do
24267  IFS=$as_save_IFS
24268  case $as_dir in #(((
24269    '') as_dir=./ ;;
24270    */) ;;
24271    *) as_dir=$as_dir/ ;;
24272  esac
24273    for ac_exec_ext in '' $ac_executable_extensions; do
24274  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
24275    ac_cv_path_PROTOC_C="$as_dir$ac_word$ac_exec_ext"
24276    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
24277    break 2
24278  fi
24279done
24280  done
24281IFS=$as_save_IFS
24282
24283  ;;
24284esac
24285fi
24286PROTOC_C=$ac_cv_path_PROTOC_C
24287if test -n "$PROTOC_C"; then
24288  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PROTOC_C" >&5
24289printf "%s\n" "$PROTOC_C" >&6; }
24290else
24291  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
24292printf "%s\n" "no" >&6; }
24293fi
24294
24295
24296        if test -z "$PROTOC_C"; then
24297          as_fn_error $? "The protoc-c program was not found. Please install protobuf-c!" "$LINENO" 5
24298        fi
24299
24300# Check whether --with-protobuf-c was given.
24301if test ${with_protobuf_c+y}
24302then :
24303  withval=$with_protobuf_c;
24304                # workaround for protobuf-c includes at old dir before protobuf-c-1.0.0
24305                if test -f $withval/include/google/protobuf-c/protobuf-c.h; then
24306                    CFLAGS="$CFLAGS -I$withval/include/google"
24307                else
24308                    CFLAGS="$CFLAGS -I$withval/include"
24309                fi
24310                LDFLAGS="$LDFLAGS -L$withval/lib"
24311
24312else $as_nop
24313
24314                if test -n "$PKG_CONFIG"; then
24315
24316pkg_failed=no
24317{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for PROTOBUFC" >&5
24318printf %s "checking for PROTOBUFC... " >&6; }
24319
24320if test -n "$PROTOBUFC_CFLAGS"; then
24321    pkg_cv_PROTOBUFC_CFLAGS="$PROTOBUFC_CFLAGS"
24322 elif test -n "$PKG_CONFIG"; then
24323    if test -n "$PKG_CONFIG" && \
24324    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libprotobuf-c\""; } >&5
24325  ($PKG_CONFIG --exists --print-errors "libprotobuf-c") 2>&5
24326  ac_status=$?
24327  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
24328  test $ac_status = 0; }; then
24329  pkg_cv_PROTOBUFC_CFLAGS=`$PKG_CONFIG --cflags "libprotobuf-c" 2>/dev/null`
24330		      test "x$?" != "x0" && pkg_failed=yes
24331else
24332  pkg_failed=yes
24333fi
24334 else
24335    pkg_failed=untried
24336fi
24337if test -n "$PROTOBUFC_LIBS"; then
24338    pkg_cv_PROTOBUFC_LIBS="$PROTOBUFC_LIBS"
24339 elif test -n "$PKG_CONFIG"; then
24340    if test -n "$PKG_CONFIG" && \
24341    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libprotobuf-c\""; } >&5
24342  ($PKG_CONFIG --exists --print-errors "libprotobuf-c") 2>&5
24343  ac_status=$?
24344  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
24345  test $ac_status = 0; }; then
24346  pkg_cv_PROTOBUFC_LIBS=`$PKG_CONFIG --libs "libprotobuf-c" 2>/dev/null`
24347		      test "x$?" != "x0" && pkg_failed=yes
24348else
24349  pkg_failed=yes
24350fi
24351 else
24352    pkg_failed=untried
24353fi
24354
24355
24356
24357if test $pkg_failed = yes; then
24358   	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
24359printf "%s\n" "no" >&6; }
24360
24361if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
24362        _pkg_short_errors_supported=yes
24363else
24364        _pkg_short_errors_supported=no
24365fi
24366        if test $_pkg_short_errors_supported = yes; then
24367	        PROTOBUFC_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libprotobuf-c" 2>&1`
24368        else
24369	        PROTOBUFC_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libprotobuf-c" 2>&1`
24370        fi
24371	# Put the nasty error message in config.log where it belongs
24372	echo "$PROTOBUFC_PKG_ERRORS" >&5
24373
24374
24375                            # pkg-config failed; try falling back to known values
24376                            # workaround for protobuf-c includes at old dir before protobuf-c-1.0.0
24377                            if test -f /usr/include/google/protobuf-c/protobuf-c.h; then
24378                                CFLAGS="$CFLAGS -I/usr/include/google"
24379                            else
24380                                if test -f /usr/local/include/google/protobuf-c/protobuf-c.h; then
24381                                    CFLAGS="$CFLAGS -I/usr/local/include/google"
24382                                    LDFLAGS="$LDFLAGS -L/usr/local/lib"
24383                                else
24384                                    as_fn_error $? "The protobuf-c package was not found with pkg-config. Please install protobuf-c!" "$LINENO" 5
24385                                fi
24386                            fi
24387
24388
24389elif test $pkg_failed = untried; then
24390     	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
24391printf "%s\n" "no" >&6; }
24392
24393                            # pkg-config failed; try falling back to known values
24394                            # workaround for protobuf-c includes at old dir before protobuf-c-1.0.0
24395                            if test -f /usr/include/google/protobuf-c/protobuf-c.h; then
24396                                CFLAGS="$CFLAGS -I/usr/include/google"
24397                            else
24398                                if test -f /usr/local/include/google/protobuf-c/protobuf-c.h; then
24399                                    CFLAGS="$CFLAGS -I/usr/local/include/google"
24400                                    LDFLAGS="$LDFLAGS -L/usr/local/lib"
24401                                else
24402                                    as_fn_error $? "The protobuf-c package was not found with pkg-config. Please install protobuf-c!" "$LINENO" 5
24403                                fi
24404                            fi
24405
24406
24407else
24408	PROTOBUFC_CFLAGS=$pkg_cv_PROTOBUFC_CFLAGS
24409	PROTOBUFC_LIBS=$pkg_cv_PROTOBUFC_LIBS
24410        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24411printf "%s\n" "yes" >&6; }
24412
24413                            CFLAGS="$CFLAGS $PROTOBUFC_CFLAGS"
24414                            LIBS="$LIBS $PROTOBUFC_LIBS"
24415
24416fi
24417                else
24418                    # workaround for protobuf-c includes at old dir before protobuf-c-1.0.0
24419                    if test -f /usr/include/google/protobuf-c/protobuf-c.h; then
24420                        CFLAGS="$CFLAGS -I/usr/include/google"
24421                    else
24422                        if test -f /usr/local/include/google/protobuf-c/protobuf-c.h; then
24423                            CFLAGS="$CFLAGS -I/usr/local/include/google"
24424                            LDFLAGS="$LDFLAGS -L/usr/local/lib"
24425                        fi
24426                    fi
24427                fi
24428
24429
24430fi
24431
24432        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing protobuf_c_message_pack" >&5
24433printf %s "checking for library containing protobuf_c_message_pack... " >&6; }
24434if test ${ac_cv_search_protobuf_c_message_pack+y}
24435then :
24436  printf %s "(cached) " >&6
24437else $as_nop
24438  ac_func_search_save_LIBS=$LIBS
24439cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24440/* end confdefs.h.  */
24441
24442/* Override any GCC internal prototype to avoid an error.
24443   Use char because int might match the return type of a GCC
24444   builtin and then its argument prototype would still apply.  */
24445char protobuf_c_message_pack ();
24446int
24447main (void)
24448{
24449return protobuf_c_message_pack ();
24450  ;
24451  return 0;
24452}
24453_ACEOF
24454for ac_lib in '' protobuf-c
24455do
24456  if test -z "$ac_lib"; then
24457    ac_res="none required"
24458  else
24459    ac_res=-l$ac_lib
24460    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
24461  fi
24462  if ac_fn_c_try_link "$LINENO"
24463then :
24464  ac_cv_search_protobuf_c_message_pack=$ac_res
24465fi
24466rm -f core conftest.err conftest.$ac_objext conftest.beam \
24467    conftest$ac_exeext
24468  if test ${ac_cv_search_protobuf_c_message_pack+y}
24469then :
24470  break
24471fi
24472done
24473if test ${ac_cv_search_protobuf_c_message_pack+y}
24474then :
24475
24476else $as_nop
24477  ac_cv_search_protobuf_c_message_pack=no
24478fi
24479rm conftest.$ac_ext
24480LIBS=$ac_func_search_save_LIBS
24481fi
24482{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_protobuf_c_message_pack" >&5
24483printf "%s\n" "$ac_cv_search_protobuf_c_message_pack" >&6; }
24484ac_res=$ac_cv_search_protobuf_c_message_pack
24485if test "$ac_res" != no
24486then :
24487  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
24488
24489else $as_nop
24490  as_fn_error $? "The protobuf-c library was not found. Please install the development libraries for protobuf-c!" "$LINENO" 5
24491fi
24492
24493
24494
24495printf "%s\n" "#define USE_DNSTAP 1" >>confdefs.h
24496
24497        ENABLE_DNSTAP=1
24498
24499
24500
24501        hdr_dnstap_socket_path="`echo $opt_dnstap_socket_path | sed -e 's/\\\\/\\\\\\\\/g'`"
24502
24503
24504printf "%s\n" "#define DNSTAP_SOCKET_PATH \"$hdr_dnstap_socket_path\"" >>confdefs.h
24505
24506	DNSTAP_SOCKET_PATH="$hdr_dnstap_socket_path"
24507
24508	DNSTAP_SOCKET_TESTBIN='unbound-dnstap-socket$(EXEEXT)'
24509
24510        DNSTAP_SRC="dnstap/dnstap.c dnstap/dnstap.pb-c.c dnstap/dnstap_fstrm.c dnstap/dtstream.c"
24511
24512        DNSTAP_OBJ="dnstap.lo dnstap.pb-c.lo dnstap_fstrm.lo dtstream.lo"
24513
24514
24515    else
24516
24517        ENABLE_DNSTAP=0
24518
24519
24520
24521    fi
24522
24523
24524# check for dnscrypt if requested
24525
24526  # Check whether --enable-dnscrypt was given.
24527if test ${enable_dnscrypt+y}
24528then :
24529  enableval=$enable_dnscrypt; opt_dnscrypt=$enableval
24530else $as_nop
24531  opt_dnscrypt=no
24532fi
24533
24534
24535  if test "x$opt_dnscrypt" != "xno"; then
24536
24537# Check whether --with-libsodium was given.
24538if test ${with_libsodium+y}
24539then :
24540  withval=$with_libsodium;
24541	CFLAGS="$CFLAGS -I$withval/include"
24542	LDFLAGS="$LDFLAGS -L$withval/lib"
24543
24544fi
24545
24546    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing sodium_init" >&5
24547printf %s "checking for library containing sodium_init... " >&6; }
24548if test ${ac_cv_search_sodium_init+y}
24549then :
24550  printf %s "(cached) " >&6
24551else $as_nop
24552  ac_func_search_save_LIBS=$LIBS
24553cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24554/* end confdefs.h.  */
24555
24556/* Override any GCC internal prototype to avoid an error.
24557   Use char because int might match the return type of a GCC
24558   builtin and then its argument prototype would still apply.  */
24559char sodium_init ();
24560int
24561main (void)
24562{
24563return sodium_init ();
24564  ;
24565  return 0;
24566}
24567_ACEOF
24568for ac_lib in '' sodium
24569do
24570  if test -z "$ac_lib"; then
24571    ac_res="none required"
24572  else
24573    ac_res=-l$ac_lib
24574    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
24575  fi
24576  if ac_fn_c_try_link "$LINENO"
24577then :
24578  ac_cv_search_sodium_init=$ac_res
24579fi
24580rm -f core conftest.err conftest.$ac_objext conftest.beam \
24581    conftest$ac_exeext
24582  if test ${ac_cv_search_sodium_init+y}
24583then :
24584  break
24585fi
24586done
24587if test ${ac_cv_search_sodium_init+y}
24588then :
24589
24590else $as_nop
24591  ac_cv_search_sodium_init=no
24592fi
24593rm conftest.$ac_ext
24594LIBS=$ac_func_search_save_LIBS
24595fi
24596{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sodium_init" >&5
24597printf "%s\n" "$ac_cv_search_sodium_init" >&6; }
24598ac_res=$ac_cv_search_sodium_init
24599if test "$ac_res" != no
24600then :
24601  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
24602
24603else $as_nop
24604  as_fn_error $? "The sodium library was not found. Please install sodium!" "$LINENO" 5
24605fi
24606
24607    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing crypto_box_curve25519xchacha20poly1305_beforenm" >&5
24608printf %s "checking for library containing crypto_box_curve25519xchacha20poly1305_beforenm... " >&6; }
24609if test ${ac_cv_search_crypto_box_curve25519xchacha20poly1305_beforenm+y}
24610then :
24611  printf %s "(cached) " >&6
24612else $as_nop
24613  ac_func_search_save_LIBS=$LIBS
24614cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24615/* end confdefs.h.  */
24616
24617/* Override any GCC internal prototype to avoid an error.
24618   Use char because int might match the return type of a GCC
24619   builtin and then its argument prototype would still apply.  */
24620char crypto_box_curve25519xchacha20poly1305_beforenm ();
24621int
24622main (void)
24623{
24624return crypto_box_curve25519xchacha20poly1305_beforenm ();
24625  ;
24626  return 0;
24627}
24628_ACEOF
24629for ac_lib in '' sodium
24630do
24631  if test -z "$ac_lib"; then
24632    ac_res="none required"
24633  else
24634    ac_res=-l$ac_lib
24635    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
24636  fi
24637  if ac_fn_c_try_link "$LINENO"
24638then :
24639  ac_cv_search_crypto_box_curve25519xchacha20poly1305_beforenm=$ac_res
24640fi
24641rm -f core conftest.err conftest.$ac_objext conftest.beam \
24642    conftest$ac_exeext
24643  if test ${ac_cv_search_crypto_box_curve25519xchacha20poly1305_beforenm+y}
24644then :
24645  break
24646fi
24647done
24648if test ${ac_cv_search_crypto_box_curve25519xchacha20poly1305_beforenm+y}
24649then :
24650
24651else $as_nop
24652  ac_cv_search_crypto_box_curve25519xchacha20poly1305_beforenm=no
24653fi
24654rm conftest.$ac_ext
24655LIBS=$ac_func_search_save_LIBS
24656fi
24657{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_crypto_box_curve25519xchacha20poly1305_beforenm" >&5
24658printf "%s\n" "$ac_cv_search_crypto_box_curve25519xchacha20poly1305_beforenm" >&6; }
24659ac_res=$ac_cv_search_crypto_box_curve25519xchacha20poly1305_beforenm
24660if test "$ac_res" != no
24661then :
24662  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
24663
24664            ENABLE_DNSCRYPT_XCHACHA20=1
24665
24666
24667printf "%s\n" "#define USE_DNSCRYPT_XCHACHA20 1" >>confdefs.h
24668
24669
24670else $as_nop
24671
24672            ENABLE_DNSCRYPT_XCHACHA20=0
24673
24674
24675fi
24676
24677    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing sodium_set_misuse_handler" >&5
24678printf %s "checking for library containing sodium_set_misuse_handler... " >&6; }
24679if test ${ac_cv_search_sodium_set_misuse_handler+y}
24680then :
24681  printf %s "(cached) " >&6
24682else $as_nop
24683  ac_func_search_save_LIBS=$LIBS
24684cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24685/* end confdefs.h.  */
24686
24687/* Override any GCC internal prototype to avoid an error.
24688   Use char because int might match the return type of a GCC
24689   builtin and then its argument prototype would still apply.  */
24690char sodium_set_misuse_handler ();
24691int
24692main (void)
24693{
24694return sodium_set_misuse_handler ();
24695  ;
24696  return 0;
24697}
24698_ACEOF
24699for ac_lib in '' sodium
24700do
24701  if test -z "$ac_lib"; then
24702    ac_res="none required"
24703  else
24704    ac_res=-l$ac_lib
24705    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
24706  fi
24707  if ac_fn_c_try_link "$LINENO"
24708then :
24709  ac_cv_search_sodium_set_misuse_handler=$ac_res
24710fi
24711rm -f core conftest.err conftest.$ac_objext conftest.beam \
24712    conftest$ac_exeext
24713  if test ${ac_cv_search_sodium_set_misuse_handler+y}
24714then :
24715  break
24716fi
24717done
24718if test ${ac_cv_search_sodium_set_misuse_handler+y}
24719then :
24720
24721else $as_nop
24722  ac_cv_search_sodium_set_misuse_handler=no
24723fi
24724rm conftest.$ac_ext
24725LIBS=$ac_func_search_save_LIBS
24726fi
24727{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sodium_set_misuse_handler" >&5
24728printf "%s\n" "$ac_cv_search_sodium_set_misuse_handler" >&6; }
24729ac_res=$ac_cv_search_sodium_set_misuse_handler
24730if test "$ac_res" != no
24731then :
24732  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
24733
24734
24735printf "%s\n" "#define SODIUM_MISUSE_HANDLER 1" >>confdefs.h
24736
24737
24738fi
24739
24740
24741
24742printf "%s\n" "#define USE_DNSCRYPT 1" >>confdefs.h
24743
24744        ENABLE_DNSCRYPT=1
24745
24746
24747        DNSCRYPT_SRC="dnscrypt/dnscrypt.c"
24748
24749        DNSCRYPT_OBJ="dnscrypt.lo"
24750
24751
24752  else
24753    ENABLE_DNSCRYPT_XCHACHA20=0
24754
24755
24756        ENABLE_DNSCRYPT=0
24757
24758
24759
24760  fi
24761
24762
24763# check for cachedb if requested
24764# Check whether --enable-cachedb was given.
24765if test ${enable_cachedb+y}
24766then :
24767  enableval=$enable_cachedb;
24768fi
24769
24770# turn on cachedb when hiredis support is enabled.
24771if test "$found_libhiredis" = "yes"; then enable_cachedb="yes"; fi
24772case "$enable_cachedb" in
24773    yes)
24774
24775printf "%s\n" "#define USE_CACHEDB 1" >>confdefs.h
24776
24777	CACHEDB_SRC="cachedb/cachedb.c cachedb/redis.c"
24778
24779	CACHEDB_OBJ="cachedb.lo redis.lo"
24780
24781    	;;
24782    no|*)
24783    	# nothing
24784    	;;
24785esac
24786
24787# check for ipsecmod if requested
24788# Check whether --enable-ipsecmod was given.
24789if test ${enable_ipsecmod+y}
24790then :
24791  enableval=$enable_ipsecmod;
24792fi
24793
24794case "$enable_ipsecmod" in
24795	yes)
24796
24797printf "%s\n" "#define USE_IPSECMOD 1" >>confdefs.h
24798
24799		IPSECMOD_OBJ="ipsecmod.lo ipsecmod-whitelist.lo"
24800
24801		IPSECMOD_HEADER='$(srcdir)/ipsecmod/ipsecmod.h $(srcdir)/ipsecmod/ipsecmod-whitelist.h'
24802
24803		;;
24804	no|*)
24805		# nothing
24806		;;
24807esac
24808
24809# check for ipset if requested
24810# Check whether --enable-ipset was given.
24811if test ${enable_ipset+y}
24812then :
24813  enableval=$enable_ipset;
24814fi
24815
24816case "$enable_ipset" in
24817    yes)
24818
24819printf "%s\n" "#define USE_IPSET 1" >>confdefs.h
24820
24821		IPSET_SRC="ipset/ipset.c"
24822
24823		IPSET_OBJ="ipset.lo"
24824
24825
24826		# BSD's pf
24827		       for ac_header in net/pfvar.h
24828do :
24829  ac_fn_c_check_header_compile "$LINENO" "net/pfvar.h" "ac_cv_header_net_pfvar_h" "
24830		  #include <netinet/in.h>
24831		  #include <net/if.h>
24832
24833"
24834if test "x$ac_cv_header_net_pfvar_h" = xyes
24835then :
24836  printf "%s\n" "#define HAVE_NET_PFVAR_H 1" >>confdefs.h
24837
24838else $as_nop
24839
24840		    # mnl
24841
24842# Check whether --with-libmnl was given.
24843if test ${with_libmnl+y}
24844then :
24845  withval=$with_libmnl;
24846else $as_nop
24847   withval="yes"
24848fi
24849
24850		    found_libmnl="no"
24851		    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libmnl" >&5
24852printf %s "checking for libmnl... " >&6; }
24853		    if test x_$withval = x_ -o x_$withval = x_yes; then
24854			withval="/usr/local /opt/local /usr/lib /usr/pkg /usr/sfw /usr"
24855		    fi
24856		    for dir in $withval ; do
24857			if test -f "$dir/include/libmnl/libmnl.h" -o -f "$dir/include/libmnl/libmnl/libmnl.h"; then
24858				found_libmnl="yes"
24859								extralibmnl=""
24860				if test -f "$dir/include/libmnl/libmnl/libmnl.h"; then
24861					extralibmnl="/libmnl"
24862				fi
24863				if test "$dir" != "/usr" -o -n "$extralibmnl"; then
24864					CPPFLAGS="$CPPFLAGS -I$dir/include$extralibmnl"
24865				fi
24866				if test "$dir" != "/usr"; then
24867					LDFLAGS="$LDFLAGS -L$dir/lib"
24868				fi
24869				{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: found in $dir" >&5
24870printf "%s\n" "found in $dir" >&6; }
24871				LIBS="$LIBS -lmnl"
24872				break;
24873			fi
24874		    done
24875		    if test x_$found_libmnl != x_yes; then
24876			  as_fn_error $? "Could not find libmnl, libmnl.h" "$LINENO" 5
24877		    fi
24878
24879fi
24880
24881done
24882		;;
24883    no|*)
24884    	# nothing
24885		;;
24886esac
24887# Check whether --enable-explicit-port-randomisation was given.
24888if test ${enable_explicit_port_randomisation+y}
24889then :
24890  enableval=$enable_explicit_port_randomisation;
24891fi
24892
24893case "$enable_explicit_port_randomisation" in
24894	no)
24895
24896printf "%s\n" "#define DISABLE_EXPLICIT_PORT_RANDOMISATION 1" >>confdefs.h
24897
24898		;;
24899	yes|*)
24900		;;
24901esac
24902
24903if echo "$host" | $GREP -i -e linux >/dev/null; then
24904	# Check whether --enable-linux-ip-local-port-range was given.
24905if test ${enable_linux_ip_local_port_range+y}
24906then :
24907  enableval=$enable_linux_ip_local_port_range;
24908fi
24909
24910	case "$enable_linux_ip_local_port_range" in
24911		yes)
24912
24913printf "%s\n" "#define USE_LINUX_IP_LOCAL_PORT_RANGE 1" >>confdefs.h
24914
24915			;;
24916		no|*)
24917			;;
24918	esac
24919fi
24920
24921
24922{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if ${MAKE:-make} supports $< with implicit rule in scope" >&5
24923printf %s "checking if ${MAKE:-make} supports $< with implicit rule in scope... " >&6; }
24924# on openBSD, the implicit rule make $< work.
24925# on Solaris, it does not work ($? is changed sources, $^ lists dependencies).
24926# gmake works.
24927cat >conftest.make <<EOF
24928all:	conftest.lo
24929
24930conftest.lo foo.lo bla.lo:
24931	if test -f "\$<"; then touch \$@; fi
24932
24933.SUFFIXES: .lo
24934.c.lo:
24935	if test -f "\$<"; then touch \$@; fi
24936
24937conftest.lo:        conftest.dir/conftest.c
24938EOF
24939mkdir conftest.dir
24940touch conftest.dir/conftest.c
24941rm -f conftest.lo conftest.c
24942${MAKE:-make} -f conftest.make >/dev/null
24943rm -f conftest.make conftest.c conftest.dir/conftest.c
24944rm -rf conftest.dir
24945if test ! -f conftest.lo; then
24946	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
24947printf "%s\n" "no" >&6; }
24948	SOURCEDETERMINE='echo "$^" | awk "-F " "{print \$$1;}" > .source'
24949	SOURCEFILE='`cat .source`'
24950else
24951	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24952printf "%s\n" "yes" >&6; }
24953	SOURCEDETERMINE=':'
24954	SOURCEFILE='$<'
24955fi
24956rm -f conftest.lo
24957
24958
24959
24960# see if we want to build the library or everything
24961ALLTARGET="alltargets"
24962INSTALLTARGET="install-all"
24963
24964# Check whether --with-libunbound-only was given.
24965if test ${with_libunbound_only+y}
24966then :
24967  withval=$with_libunbound_only;
24968	if test "$withval" = "yes"; then
24969		ALLTARGET="lib"
24970		INSTALLTARGET="install-lib"
24971	fi
24972
24973fi
24974
24975if test $ALLTARGET = "alltargets"; then
24976	if test $USE_NSS = "yes"; then
24977		as_fn_error $? "--with-nss can only be used in combination with --with-libunbound-only." "$LINENO" 5
24978	fi
24979	if test $USE_NETTLE = "yes"; then
24980		as_fn_error $? "--with-nettle can only be used in combination with --with-libunbound-only." "$LINENO" 5
24981	fi
24982fi
24983
24984
24985
24986
24987
24988  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Stripping extension flags..." >&5
24989printf "%s\n" "$as_me: Stripping extension flags..." >&6;}
24990
24991  if echo $CFLAGS | grep " -D_GNU_SOURCE" >/dev/null 2>&1; then
24992    CFLAGS="`echo $CFLAGS | sed -e 's/ -D_GNU_SOURCE//g'`"
24993
24994printf "%s\n" "#define OMITTED__D_GNU_SOURCE 1" >>confdefs.h
24995
24996  fi
24997
24998
24999  if echo $CFLAGS | grep " -D_BSD_SOURCE" >/dev/null 2>&1; then
25000    CFLAGS="`echo $CFLAGS | sed -e 's/ -D_BSD_SOURCE//g'`"
25001
25002printf "%s\n" "#define OMITTED__D_BSD_SOURCE 1" >>confdefs.h
25003
25004  fi
25005
25006
25007  if echo $CFLAGS | grep " -D_DEFAULT_SOURCE" >/dev/null 2>&1; then
25008    CFLAGS="`echo $CFLAGS | sed -e 's/ -D_DEFAULT_SOURCE//g'`"
25009
25010printf "%s\n" "#define OMITTED__D_DEFAULT_SOURCE 1" >>confdefs.h
25011
25012  fi
25013
25014
25015  if echo $CFLAGS | grep " -D__EXTENSIONS__" >/dev/null 2>&1; then
25016    CFLAGS="`echo $CFLAGS | sed -e 's/ -D__EXTENSIONS__//g'`"
25017
25018printf "%s\n" "#define OMITTED__D__EXTENSIONS__ 1" >>confdefs.h
25019
25020  fi
25021
25022
25023  if echo $CFLAGS | grep " -D_POSIX_C_SOURCE=200112" >/dev/null 2>&1; then
25024    CFLAGS="`echo $CFLAGS | sed -e 's/ -D_POSIX_C_SOURCE=200112//g'`"
25025
25026printf "%s\n" "#define OMITTED__D_POSIX_C_SOURCE_200112 1" >>confdefs.h
25027
25028  fi
25029
25030
25031  if echo $CFLAGS | grep " -D_XOPEN_SOURCE=600" >/dev/null 2>&1; then
25032    CFLAGS="`echo $CFLAGS | sed -e 's/ -D_XOPEN_SOURCE=600//g'`"
25033
25034printf "%s\n" "#define OMITTED__D_XOPEN_SOURCE_600 1" >>confdefs.h
25035
25036  fi
25037
25038
25039  if echo $CFLAGS | grep " -D_XOPEN_SOURCE_EXTENDED=1" >/dev/null 2>&1; then
25040    CFLAGS="`echo $CFLAGS | sed -e 's/ -D_XOPEN_SOURCE_EXTENDED=1//g'`"
25041
25042printf "%s\n" "#define OMITTED__D_XOPEN_SOURCE_EXTENDED_1 1" >>confdefs.h
25043
25044  fi
25045
25046
25047  if echo $CFLAGS | grep " -D_ALL_SOURCE" >/dev/null 2>&1; then
25048    CFLAGS="`echo $CFLAGS | sed -e 's/ -D_ALL_SOURCE//g'`"
25049
25050printf "%s\n" "#define OMITTED__D_ALL_SOURCE 1" >>confdefs.h
25051
25052  fi
25053
25054
25055  if echo $CFLAGS | grep " -D_LARGEFILE_SOURCE=1" >/dev/null 2>&1; then
25056    CFLAGS="`echo $CFLAGS | sed -e 's/ -D_LARGEFILE_SOURCE=1//g'`"
25057
25058printf "%s\n" "#define OMITTED__D_LARGEFILE_SOURCE_1 1" >>confdefs.h
25059
25060  fi
25061
25062
25063if test -n "$LATE_LDFLAGS"; then
25064  LDFLAGS="$LATE_LDFLAGS $LDFLAGS"
25065fi
25066# remove start spaces
25067LDFLAGS=`echo "$LDFLAGS"|sed -e 's/^ *//'`
25068LIBS=`echo "$LIBS"|sed -e 's/^ *//'`
25069
25070
25071printf "%s\n" "#define MAXSYSLOGMSGLEN 10240" >>confdefs.h
25072
25073
25074
25075
25076version=1.23.0
25077
25078{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for build time" >&5
25079printf %s "checking for build time... " >&6; }
25080ax_date_fmt="%b %e, %Y"
25081if test x"$SOURCE_DATE_EPOCH" = x
25082then :
25083  date=`date "+$ax_date_fmt"`
25084else $as_nop
25085  ax_build_date=`date -u -d "@$SOURCE_DATE_EPOCH" "+$ax_date_fmt" 2>/dev/null \
25086                 || date -u -r "$SOURCE_DATE_EPOCH" "+$ax_date_fmt" 2>/dev/null`
25087  if test x"$ax_build_date" = x
25088then :
25089  as_fn_error $? "malformed SOURCE_DATE_EPOCH" "$LINENO" 5
25090else $as_nop
25091  date=$ax_build_date
25092fi
25093fi
25094{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $date" >&5
25095printf "%s\n" "$date" >&6; }
25096
25097
25098
25099ac_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"
25100
25101ac_config_headers="$ac_config_headers config.h"
25102
25103cat >confcache <<\_ACEOF
25104# This file is a shell script that caches the results of configure
25105# tests run on this system so they can be shared between configure
25106# scripts and configure runs, see configure's option --config-cache.
25107# It is not useful on other systems.  If it contains results you don't
25108# want to keep, you may remove or edit it.
25109#
25110# config.status only pays attention to the cache file if you give it
25111# the --recheck option to rerun configure.
25112#
25113# `ac_cv_env_foo' variables (set or unset) will be overridden when
25114# loading this file, other *unset* `ac_cv_foo' will be assigned the
25115# following values.
25116
25117_ACEOF
25118
25119# The following way of writing the cache mishandles newlines in values,
25120# but we know of no workaround that is simple, portable, and efficient.
25121# So, we kill variables containing newlines.
25122# Ultrix sh set writes to stderr and can't be redirected directly,
25123# and sets the high bit in the cache file unless we assign to the vars.
25124(
25125  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
25126    eval ac_val=\$$ac_var
25127    case $ac_val in #(
25128    *${as_nl}*)
25129      case $ac_var in #(
25130      *_cv_*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
25131printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
25132      esac
25133      case $ac_var in #(
25134      _ | IFS | as_nl) ;; #(
25135      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
25136      *) { eval $ac_var=; unset $ac_var;} ;;
25137      esac ;;
25138    esac
25139  done
25140
25141  (set) 2>&1 |
25142    case $as_nl`(ac_space=' '; set) 2>&1` in #(
25143    *${as_nl}ac_space=\ *)
25144      # `set' does not quote correctly, so add quotes: double-quote
25145      # substitution turns \\\\ into \\, and sed turns \\ into \.
25146      sed -n \
25147	"s/'/'\\\\''/g;
25148	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
25149      ;; #(
25150    *)
25151      # `set' quotes correctly as required by POSIX, so do not add quotes.
25152      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
25153      ;;
25154    esac |
25155    sort
25156) |
25157  sed '
25158     /^ac_cv_env_/b end
25159     t clear
25160     :clear
25161     s/^\([^=]*\)=\(.*[{}].*\)$/test ${\1+y} || &/
25162     t end
25163     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
25164     :end' >>confcache
25165if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
25166  if test -w "$cache_file"; then
25167    if test "x$cache_file" != "x/dev/null"; then
25168      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
25169printf "%s\n" "$as_me: updating cache $cache_file" >&6;}
25170      if test ! -f "$cache_file" || test -h "$cache_file"; then
25171	cat confcache >"$cache_file"
25172      else
25173        case $cache_file in #(
25174        */* | ?:*)
25175	  mv -f confcache "$cache_file"$$ &&
25176	  mv -f "$cache_file"$$ "$cache_file" ;; #(
25177        *)
25178	  mv -f confcache "$cache_file" ;;
25179	esac
25180      fi
25181    fi
25182  else
25183    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
25184printf "%s\n" "$as_me: not updating unwritable cache $cache_file" >&6;}
25185  fi
25186fi
25187rm -f confcache
25188
25189test "x$prefix" = xNONE && prefix=$ac_default_prefix
25190# Let make expand exec_prefix.
25191test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
25192
25193DEFS=-DHAVE_CONFIG_H
25194
25195ac_libobjs=
25196ac_ltlibobjs=
25197U=
25198for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
25199  # 1. Remove the extension, and $U if already installed.
25200  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
25201  ac_i=`printf "%s\n" "$ac_i" | sed "$ac_script"`
25202  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
25203  #    will be set to the directory where LIBOBJS objects are built.
25204  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
25205  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
25206done
25207LIBOBJS=$ac_libobjs
25208
25209LTLIBOBJS=$ac_ltlibobjs
25210
25211
25212if test -z "${USE_SYSTEMD_TRUE}" && test -z "${USE_SYSTEMD_FALSE}"; then
25213  as_fn_error $? "conditional \"USE_SYSTEMD\" was never defined.
25214Usually this means the macro was only invoked conditionally." "$LINENO" 5
25215fi
25216
25217: "${CONFIG_STATUS=./config.status}"
25218ac_write_fail=0
25219ac_clean_files_save=$ac_clean_files
25220ac_clean_files="$ac_clean_files $CONFIG_STATUS"
25221{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
25222printf "%s\n" "$as_me: creating $CONFIG_STATUS" >&6;}
25223as_write_fail=0
25224cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
25225#! $SHELL
25226# Generated by $as_me.
25227# Run this file to recreate the current configuration.
25228# Compiler output produced by configure, useful for debugging
25229# configure, is in config.log if it exists.
25230
25231debug=false
25232ac_cs_recheck=false
25233ac_cs_silent=false
25234
25235SHELL=\${CONFIG_SHELL-$SHELL}
25236export SHELL
25237_ASEOF
25238cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
25239## -------------------- ##
25240## M4sh Initialization. ##
25241## -------------------- ##
25242
25243# Be more Bourne compatible
25244DUALCASE=1; export DUALCASE # for MKS sh
25245as_nop=:
25246if test ${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1
25247then :
25248  emulate sh
25249  NULLCMD=:
25250  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
25251  # is contrary to our usage.  Disable this feature.
25252  alias -g '${1+"$@"}'='"$@"'
25253  setopt NO_GLOB_SUBST
25254else $as_nop
25255  case `(set -o) 2>/dev/null` in #(
25256  *posix*) :
25257    set -o posix ;; #(
25258  *) :
25259     ;;
25260esac
25261fi
25262
25263
25264
25265# Reset variables that may have inherited troublesome values from
25266# the environment.
25267
25268# IFS needs to be set, to space, tab, and newline, in precisely that order.
25269# (If _AS_PATH_WALK were called with IFS unset, it would have the
25270# side effect of setting IFS to empty, thus disabling word splitting.)
25271# Quoting is to prevent editors from complaining about space-tab.
25272as_nl='
25273'
25274export as_nl
25275IFS=" ""	$as_nl"
25276
25277PS1='$ '
25278PS2='> '
25279PS4='+ '
25280
25281# Ensure predictable behavior from utilities with locale-dependent output.
25282LC_ALL=C
25283export LC_ALL
25284LANGUAGE=C
25285export LANGUAGE
25286
25287# We cannot yet rely on "unset" to work, but we need these variables
25288# to be unset--not just set to an empty or harmless value--now, to
25289# avoid bugs in old shells (e.g. pre-3.0 UWIN ksh).  This construct
25290# also avoids known problems related to "unset" and subshell syntax
25291# in other old shells (e.g. bash 2.01 and pdksh 5.2.14).
25292for as_var in BASH_ENV ENV MAIL MAILPATH CDPATH
25293do eval test \${$as_var+y} \
25294  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
25295done
25296
25297# Ensure that fds 0, 1, and 2 are open.
25298if (exec 3>&0) 2>/dev/null; then :; else exec 0</dev/null; fi
25299if (exec 3>&1) 2>/dev/null; then :; else exec 1>/dev/null; fi
25300if (exec 3>&2)            ; then :; else exec 2>/dev/null; fi
25301
25302# The user is always right.
25303if ${PATH_SEPARATOR+false} :; then
25304  PATH_SEPARATOR=:
25305  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
25306    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
25307      PATH_SEPARATOR=';'
25308  }
25309fi
25310
25311
25312# Find who we are.  Look in the path if we contain no directory separator.
25313as_myself=
25314case $0 in #((
25315  *[\\/]* ) as_myself=$0 ;;
25316  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25317for as_dir in $PATH
25318do
25319  IFS=$as_save_IFS
25320  case $as_dir in #(((
25321    '') as_dir=./ ;;
25322    */) ;;
25323    *) as_dir=$as_dir/ ;;
25324  esac
25325    test -r "$as_dir$0" && as_myself=$as_dir$0 && break
25326  done
25327IFS=$as_save_IFS
25328
25329     ;;
25330esac
25331# We did not find ourselves, most probably we were run as `sh COMMAND'
25332# in which case we are not to be found in the path.
25333if test "x$as_myself" = x; then
25334  as_myself=$0
25335fi
25336if test ! -f "$as_myself"; then
25337  printf "%s\n" "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
25338  exit 1
25339fi
25340
25341
25342
25343# as_fn_error STATUS ERROR [LINENO LOG_FD]
25344# ----------------------------------------
25345# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
25346# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
25347# script with STATUS, using 1 if that was 0.
25348as_fn_error ()
25349{
25350  as_status=$1; test $as_status -eq 0 && as_status=1
25351  if test "$4"; then
25352    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
25353    printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
25354  fi
25355  printf "%s\n" "$as_me: error: $2" >&2
25356  as_fn_exit $as_status
25357} # as_fn_error
25358
25359
25360
25361# as_fn_set_status STATUS
25362# -----------------------
25363# Set $? to STATUS, without forking.
25364as_fn_set_status ()
25365{
25366  return $1
25367} # as_fn_set_status
25368
25369# as_fn_exit STATUS
25370# -----------------
25371# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
25372as_fn_exit ()
25373{
25374  set +e
25375  as_fn_set_status $1
25376  exit $1
25377} # as_fn_exit
25378
25379# as_fn_unset VAR
25380# ---------------
25381# Portably unset VAR.
25382as_fn_unset ()
25383{
25384  { eval $1=; unset $1;}
25385}
25386as_unset=as_fn_unset
25387
25388# as_fn_append VAR VALUE
25389# ----------------------
25390# Append the text in VALUE to the end of the definition contained in VAR. Take
25391# advantage of any shell optimizations that allow amortized linear growth over
25392# repeated appends, instead of the typical quadratic growth present in naive
25393# implementations.
25394if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null
25395then :
25396  eval 'as_fn_append ()
25397  {
25398    eval $1+=\$2
25399  }'
25400else $as_nop
25401  as_fn_append ()
25402  {
25403    eval $1=\$$1\$2
25404  }
25405fi # as_fn_append
25406
25407# as_fn_arith ARG...
25408# ------------------
25409# Perform arithmetic evaluation on the ARGs, and store the result in the
25410# global $as_val. Take advantage of shells that can avoid forks. The arguments
25411# must be portable across $(()) and expr.
25412if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null
25413then :
25414  eval 'as_fn_arith ()
25415  {
25416    as_val=$(( $* ))
25417  }'
25418else $as_nop
25419  as_fn_arith ()
25420  {
25421    as_val=`expr "$@" || test $? -eq 1`
25422  }
25423fi # as_fn_arith
25424
25425
25426if expr a : '\(a\)' >/dev/null 2>&1 &&
25427   test "X`expr 00001 : '.*\(...\)'`" = X001; then
25428  as_expr=expr
25429else
25430  as_expr=false
25431fi
25432
25433if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
25434  as_basename=basename
25435else
25436  as_basename=false
25437fi
25438
25439if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
25440  as_dirname=dirname
25441else
25442  as_dirname=false
25443fi
25444
25445as_me=`$as_basename -- "$0" ||
25446$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
25447	 X"$0" : 'X\(//\)$' \| \
25448	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
25449printf "%s\n" X/"$0" |
25450    sed '/^.*\/\([^/][^/]*\)\/*$/{
25451	    s//\1/
25452	    q
25453	  }
25454	  /^X\/\(\/\/\)$/{
25455	    s//\1/
25456	    q
25457	  }
25458	  /^X\/\(\/\).*/{
25459	    s//\1/
25460	    q
25461	  }
25462	  s/.*/./; q'`
25463
25464# Avoid depending upon Character Ranges.
25465as_cr_letters='abcdefghijklmnopqrstuvwxyz'
25466as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
25467as_cr_Letters=$as_cr_letters$as_cr_LETTERS
25468as_cr_digits='0123456789'
25469as_cr_alnum=$as_cr_Letters$as_cr_digits
25470
25471
25472# Determine whether it's possible to make 'echo' print without a newline.
25473# These variables are no longer used directly by Autoconf, but are AC_SUBSTed
25474# for compatibility with existing Makefiles.
25475ECHO_C= ECHO_N= ECHO_T=
25476case `echo -n x` in #(((((
25477-n*)
25478  case `echo 'xy\c'` in
25479  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
25480  xy)  ECHO_C='\c';;
25481  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
25482       ECHO_T='	';;
25483  esac;;
25484*)
25485  ECHO_N='-n';;
25486esac
25487
25488# For backward compatibility with old third-party macros, we provide
25489# the shell variables $as_echo and $as_echo_n.  New code should use
25490# AS_ECHO(["message"]) and AS_ECHO_N(["message"]), respectively.
25491as_echo='printf %s\n'
25492as_echo_n='printf %s'
25493
25494rm -f conf$$ conf$$.exe conf$$.file
25495if test -d conf$$.dir; then
25496  rm -f conf$$.dir/conf$$.file
25497else
25498  rm -f conf$$.dir
25499  mkdir conf$$.dir 2>/dev/null
25500fi
25501if (echo >conf$$.file) 2>/dev/null; then
25502  if ln -s conf$$.file conf$$ 2>/dev/null; then
25503    as_ln_s='ln -s'
25504    # ... but there are two gotchas:
25505    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
25506    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
25507    # In both cases, we have to default to `cp -pR'.
25508    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
25509      as_ln_s='cp -pR'
25510  elif ln conf$$.file conf$$ 2>/dev/null; then
25511    as_ln_s=ln
25512  else
25513    as_ln_s='cp -pR'
25514  fi
25515else
25516  as_ln_s='cp -pR'
25517fi
25518rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
25519rmdir conf$$.dir 2>/dev/null
25520
25521
25522# as_fn_mkdir_p
25523# -------------
25524# Create "$as_dir" as a directory, including parents if necessary.
25525as_fn_mkdir_p ()
25526{
25527
25528  case $as_dir in #(
25529  -*) as_dir=./$as_dir;;
25530  esac
25531  test -d "$as_dir" || eval $as_mkdir_p || {
25532    as_dirs=
25533    while :; do
25534      case $as_dir in #(
25535      *\'*) as_qdir=`printf "%s\n" "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
25536      *) as_qdir=$as_dir;;
25537      esac
25538      as_dirs="'$as_qdir' $as_dirs"
25539      as_dir=`$as_dirname -- "$as_dir" ||
25540$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
25541	 X"$as_dir" : 'X\(//\)[^/]' \| \
25542	 X"$as_dir" : 'X\(//\)$' \| \
25543	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
25544printf "%s\n" X"$as_dir" |
25545    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
25546	    s//\1/
25547	    q
25548	  }
25549	  /^X\(\/\/\)[^/].*/{
25550	    s//\1/
25551	    q
25552	  }
25553	  /^X\(\/\/\)$/{
25554	    s//\1/
25555	    q
25556	  }
25557	  /^X\(\/\).*/{
25558	    s//\1/
25559	    q
25560	  }
25561	  s/.*/./; q'`
25562      test -d "$as_dir" && break
25563    done
25564    test -z "$as_dirs" || eval "mkdir $as_dirs"
25565  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
25566
25567
25568} # as_fn_mkdir_p
25569if mkdir -p . 2>/dev/null; then
25570  as_mkdir_p='mkdir -p "$as_dir"'
25571else
25572  test -d ./-p && rmdir ./-p
25573  as_mkdir_p=false
25574fi
25575
25576
25577# as_fn_executable_p FILE
25578# -----------------------
25579# Test if FILE is an executable regular file.
25580as_fn_executable_p ()
25581{
25582  test -f "$1" && test -x "$1"
25583} # as_fn_executable_p
25584as_test_x='test -x'
25585as_executable_p=as_fn_executable_p
25586
25587# Sed expression to map a string onto a valid CPP name.
25588as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
25589
25590# Sed expression to map a string onto a valid variable name.
25591as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
25592
25593
25594exec 6>&1
25595## ----------------------------------- ##
25596## Main body of $CONFIG_STATUS script. ##
25597## ----------------------------------- ##
25598_ASEOF
25599test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
25600
25601cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
25602# Save the log message, to keep $0 and so on meaningful, and to
25603# report actual input values of CONFIG_FILES etc. instead of their
25604# values after options handling.
25605ac_log="
25606This file was extended by unbound $as_me 1.23.0, which was
25607generated by GNU Autoconf 2.71.  Invocation command line was
25608
25609  CONFIG_FILES    = $CONFIG_FILES
25610  CONFIG_HEADERS  = $CONFIG_HEADERS
25611  CONFIG_LINKS    = $CONFIG_LINKS
25612  CONFIG_COMMANDS = $CONFIG_COMMANDS
25613  $ $0 $@
25614
25615on `(hostname || uname -n) 2>/dev/null | sed 1q`
25616"
25617
25618_ACEOF
25619
25620case $ac_config_files in *"
25621"*) set x $ac_config_files; shift; ac_config_files=$*;;
25622esac
25623
25624case $ac_config_headers in *"
25625"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
25626esac
25627
25628
25629cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
25630# Files that config.status was made for.
25631config_files="$ac_config_files"
25632config_headers="$ac_config_headers"
25633config_commands="$ac_config_commands"
25634
25635_ACEOF
25636
25637cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
25638ac_cs_usage="\
25639\`$as_me' instantiates files and other configuration actions
25640from templates according to the current configuration.  Unless the files
25641and actions are specified as TAGs, all are instantiated by default.
25642
25643Usage: $0 [OPTION]... [TAG]...
25644
25645  -h, --help       print this help, then exit
25646  -V, --version    print version number and configuration settings, then exit
25647      --config     print configuration, then exit
25648  -q, --quiet, --silent
25649                   do not print progress messages
25650  -d, --debug      don't remove temporary files
25651      --recheck    update $as_me by reconfiguring in the same conditions
25652      --file=FILE[:TEMPLATE]
25653                   instantiate the configuration file FILE
25654      --header=FILE[:TEMPLATE]
25655                   instantiate the configuration header FILE
25656
25657Configuration files:
25658$config_files
25659
25660Configuration headers:
25661$config_headers
25662
25663Configuration commands:
25664$config_commands
25665
25666Report bugs to <unbound-bugs@nlnetlabs.nl or https://github.com/NLnetLabs/unbound/issues>."
25667
25668_ACEOF
25669ac_cs_config=`printf "%s\n" "$ac_configure_args" | sed "$ac_safe_unquote"`
25670ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\''/g"`
25671cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
25672ac_cs_config='$ac_cs_config_escaped'
25673ac_cs_version="\\
25674unbound config.status 1.23.0
25675configured by $0, generated by GNU Autoconf 2.71,
25676  with options \\"\$ac_cs_config\\"
25677
25678Copyright (C) 2021 Free Software Foundation, Inc.
25679This config.status script is free software; the Free Software Foundation
25680gives unlimited permission to copy, distribute and modify it."
25681
25682ac_pwd='$ac_pwd'
25683srcdir='$srcdir'
25684AWK='$AWK'
25685test -n "\$AWK" || AWK=awk
25686_ACEOF
25687
25688cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
25689# The default lists apply if the user does not specify any file.
25690ac_need_defaults=:
25691while test $# != 0
25692do
25693  case $1 in
25694  --*=?*)
25695    ac_option=`expr "X$1" : 'X\([^=]*\)='`
25696    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
25697    ac_shift=:
25698    ;;
25699  --*=)
25700    ac_option=`expr "X$1" : 'X\([^=]*\)='`
25701    ac_optarg=
25702    ac_shift=:
25703    ;;
25704  *)
25705    ac_option=$1
25706    ac_optarg=$2
25707    ac_shift=shift
25708    ;;
25709  esac
25710
25711  case $ac_option in
25712  # Handling of the options.
25713  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
25714    ac_cs_recheck=: ;;
25715  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
25716    printf "%s\n" "$ac_cs_version"; exit ;;
25717  --config | --confi | --conf | --con | --co | --c )
25718    printf "%s\n" "$ac_cs_config"; exit ;;
25719  --debug | --debu | --deb | --de | --d | -d )
25720    debug=: ;;
25721  --file | --fil | --fi | --f )
25722    $ac_shift
25723    case $ac_optarg in
25724    *\'*) ac_optarg=`printf "%s\n" "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
25725    '') as_fn_error $? "missing file argument" ;;
25726    esac
25727    as_fn_append CONFIG_FILES " '$ac_optarg'"
25728    ac_need_defaults=false;;
25729  --header | --heade | --head | --hea )
25730    $ac_shift
25731    case $ac_optarg in
25732    *\'*) ac_optarg=`printf "%s\n" "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
25733    esac
25734    as_fn_append CONFIG_HEADERS " '$ac_optarg'"
25735    ac_need_defaults=false;;
25736  --he | --h)
25737    # Conflict between --help and --header
25738    as_fn_error $? "ambiguous option: \`$1'
25739Try \`$0 --help' for more information.";;
25740  --help | --hel | -h )
25741    printf "%s\n" "$ac_cs_usage"; exit ;;
25742  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
25743  | -silent | --silent | --silen | --sile | --sil | --si | --s)
25744    ac_cs_silent=: ;;
25745
25746  # This is an error.
25747  -*) as_fn_error $? "unrecognized option: \`$1'
25748Try \`$0 --help' for more information." ;;
25749
25750  *) as_fn_append ac_config_targets " $1"
25751     ac_need_defaults=false ;;
25752
25753  esac
25754  shift
25755done
25756
25757ac_configure_extra_args=
25758
25759if $ac_cs_silent; then
25760  exec 6>/dev/null
25761  ac_configure_extra_args="$ac_configure_extra_args --silent"
25762fi
25763
25764_ACEOF
25765cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
25766if \$ac_cs_recheck; then
25767  set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
25768  shift
25769  \printf "%s\n" "running CONFIG_SHELL=$SHELL \$*" >&6
25770  CONFIG_SHELL='$SHELL'
25771  export CONFIG_SHELL
25772  exec "\$@"
25773fi
25774
25775_ACEOF
25776cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
25777exec 5>>config.log
25778{
25779  echo
25780  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
25781## Running $as_me. ##
25782_ASBOX
25783  printf "%s\n" "$ac_log"
25784} >&5
25785
25786_ACEOF
25787cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
25788#
25789# INIT-COMMANDS
25790#
25791
25792
25793# The HP-UX ksh and POSIX shell print the target directory to stdout
25794# if CDPATH is set.
25795(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
25796
25797sed_quote_subst='$sed_quote_subst'
25798double_quote_subst='$double_quote_subst'
25799delay_variable_subst='$delay_variable_subst'
25800macro_version='`$ECHO "$macro_version" | $SED "$delay_single_quote_subst"`'
25801macro_revision='`$ECHO "$macro_revision" | $SED "$delay_single_quote_subst"`'
25802enable_shared='`$ECHO "$enable_shared" | $SED "$delay_single_quote_subst"`'
25803enable_static='`$ECHO "$enable_static" | $SED "$delay_single_quote_subst"`'
25804pic_mode='`$ECHO "$pic_mode" | $SED "$delay_single_quote_subst"`'
25805enable_fast_install='`$ECHO "$enable_fast_install" | $SED "$delay_single_quote_subst"`'
25806shared_archive_member_spec='`$ECHO "$shared_archive_member_spec" | $SED "$delay_single_quote_subst"`'
25807SHELL='`$ECHO "$SHELL" | $SED "$delay_single_quote_subst"`'
25808ECHO='`$ECHO "$ECHO" | $SED "$delay_single_quote_subst"`'
25809PATH_SEPARATOR='`$ECHO "$PATH_SEPARATOR" | $SED "$delay_single_quote_subst"`'
25810host_alias='`$ECHO "$host_alias" | $SED "$delay_single_quote_subst"`'
25811host='`$ECHO "$host" | $SED "$delay_single_quote_subst"`'
25812host_os='`$ECHO "$host_os" | $SED "$delay_single_quote_subst"`'
25813build_alias='`$ECHO "$build_alias" | $SED "$delay_single_quote_subst"`'
25814build='`$ECHO "$build" | $SED "$delay_single_quote_subst"`'
25815build_os='`$ECHO "$build_os" | $SED "$delay_single_quote_subst"`'
25816SED='`$ECHO "$SED" | $SED "$delay_single_quote_subst"`'
25817Xsed='`$ECHO "$Xsed" | $SED "$delay_single_quote_subst"`'
25818GREP='`$ECHO "$GREP" | $SED "$delay_single_quote_subst"`'
25819EGREP='`$ECHO "$EGREP" | $SED "$delay_single_quote_subst"`'
25820FGREP='`$ECHO "$FGREP" | $SED "$delay_single_quote_subst"`'
25821LD='`$ECHO "$LD" | $SED "$delay_single_quote_subst"`'
25822NM='`$ECHO "$NM" | $SED "$delay_single_quote_subst"`'
25823LN_S='`$ECHO "$LN_S" | $SED "$delay_single_quote_subst"`'
25824max_cmd_len='`$ECHO "$max_cmd_len" | $SED "$delay_single_quote_subst"`'
25825ac_objext='`$ECHO "$ac_objext" | $SED "$delay_single_quote_subst"`'
25826exeext='`$ECHO "$exeext" | $SED "$delay_single_quote_subst"`'
25827lt_unset='`$ECHO "$lt_unset" | $SED "$delay_single_quote_subst"`'
25828lt_SP2NL='`$ECHO "$lt_SP2NL" | $SED "$delay_single_quote_subst"`'
25829lt_NL2SP='`$ECHO "$lt_NL2SP" | $SED "$delay_single_quote_subst"`'
25830lt_cv_to_host_file_cmd='`$ECHO "$lt_cv_to_host_file_cmd" | $SED "$delay_single_quote_subst"`'
25831lt_cv_to_tool_file_cmd='`$ECHO "$lt_cv_to_tool_file_cmd" | $SED "$delay_single_quote_subst"`'
25832reload_flag='`$ECHO "$reload_flag" | $SED "$delay_single_quote_subst"`'
25833reload_cmds='`$ECHO "$reload_cmds" | $SED "$delay_single_quote_subst"`'
25834OBJDUMP='`$ECHO "$OBJDUMP" | $SED "$delay_single_quote_subst"`'
25835deplibs_check_method='`$ECHO "$deplibs_check_method" | $SED "$delay_single_quote_subst"`'
25836file_magic_cmd='`$ECHO "$file_magic_cmd" | $SED "$delay_single_quote_subst"`'
25837file_magic_glob='`$ECHO "$file_magic_glob" | $SED "$delay_single_quote_subst"`'
25838want_nocaseglob='`$ECHO "$want_nocaseglob" | $SED "$delay_single_quote_subst"`'
25839DLLTOOL='`$ECHO "$DLLTOOL" | $SED "$delay_single_quote_subst"`'
25840sharedlib_from_linklib_cmd='`$ECHO "$sharedlib_from_linklib_cmd" | $SED "$delay_single_quote_subst"`'
25841AR='`$ECHO "$AR" | $SED "$delay_single_quote_subst"`'
25842AR_FLAGS='`$ECHO "$AR_FLAGS" | $SED "$delay_single_quote_subst"`'
25843archiver_list_spec='`$ECHO "$archiver_list_spec" | $SED "$delay_single_quote_subst"`'
25844STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`'
25845RANLIB='`$ECHO "$RANLIB" | $SED "$delay_single_quote_subst"`'
25846old_postinstall_cmds='`$ECHO "$old_postinstall_cmds" | $SED "$delay_single_quote_subst"`'
25847old_postuninstall_cmds='`$ECHO "$old_postuninstall_cmds" | $SED "$delay_single_quote_subst"`'
25848old_archive_cmds='`$ECHO "$old_archive_cmds" | $SED "$delay_single_quote_subst"`'
25849lock_old_archive_extraction='`$ECHO "$lock_old_archive_extraction" | $SED "$delay_single_quote_subst"`'
25850CC='`$ECHO "$CC" | $SED "$delay_single_quote_subst"`'
25851CFLAGS='`$ECHO "$CFLAGS" | $SED "$delay_single_quote_subst"`'
25852compiler='`$ECHO "$compiler" | $SED "$delay_single_quote_subst"`'
25853GCC='`$ECHO "$GCC" | $SED "$delay_single_quote_subst"`'
25854lt_cv_sys_global_symbol_pipe='`$ECHO "$lt_cv_sys_global_symbol_pipe" | $SED "$delay_single_quote_subst"`'
25855lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`'
25856lt_cv_sys_global_symbol_to_import='`$ECHO "$lt_cv_sys_global_symbol_to_import" | $SED "$delay_single_quote_subst"`'
25857lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`'
25858lt_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"`'
25859lt_cv_nm_interface='`$ECHO "$lt_cv_nm_interface" | $SED "$delay_single_quote_subst"`'
25860nm_file_list_spec='`$ECHO "$nm_file_list_spec" | $SED "$delay_single_quote_subst"`'
25861lt_sysroot='`$ECHO "$lt_sysroot" | $SED "$delay_single_quote_subst"`'
25862lt_cv_truncate_bin='`$ECHO "$lt_cv_truncate_bin" | $SED "$delay_single_quote_subst"`'
25863objdir='`$ECHO "$objdir" | $SED "$delay_single_quote_subst"`'
25864MAGIC_CMD='`$ECHO "$MAGIC_CMD" | $SED "$delay_single_quote_subst"`'
25865lt_prog_compiler_no_builtin_flag='`$ECHO "$lt_prog_compiler_no_builtin_flag" | $SED "$delay_single_quote_subst"`'
25866lt_prog_compiler_pic='`$ECHO "$lt_prog_compiler_pic" | $SED "$delay_single_quote_subst"`'
25867lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`'
25868lt_prog_compiler_static='`$ECHO "$lt_prog_compiler_static" | $SED "$delay_single_quote_subst"`'
25869lt_cv_prog_compiler_c_o='`$ECHO "$lt_cv_prog_compiler_c_o" | $SED "$delay_single_quote_subst"`'
25870need_locks='`$ECHO "$need_locks" | $SED "$delay_single_quote_subst"`'
25871MANIFEST_TOOL='`$ECHO "$MANIFEST_TOOL" | $SED "$delay_single_quote_subst"`'
25872DSYMUTIL='`$ECHO "$DSYMUTIL" | $SED "$delay_single_quote_subst"`'
25873NMEDIT='`$ECHO "$NMEDIT" | $SED "$delay_single_quote_subst"`'
25874LIPO='`$ECHO "$LIPO" | $SED "$delay_single_quote_subst"`'
25875OTOOL='`$ECHO "$OTOOL" | $SED "$delay_single_quote_subst"`'
25876OTOOL64='`$ECHO "$OTOOL64" | $SED "$delay_single_quote_subst"`'
25877libext='`$ECHO "$libext" | $SED "$delay_single_quote_subst"`'
25878shrext_cmds='`$ECHO "$shrext_cmds" | $SED "$delay_single_quote_subst"`'
25879extract_expsyms_cmds='`$ECHO "$extract_expsyms_cmds" | $SED "$delay_single_quote_subst"`'
25880archive_cmds_need_lc='`$ECHO "$archive_cmds_need_lc" | $SED "$delay_single_quote_subst"`'
25881enable_shared_with_static_runtimes='`$ECHO "$enable_shared_with_static_runtimes" | $SED "$delay_single_quote_subst"`'
25882export_dynamic_flag_spec='`$ECHO "$export_dynamic_flag_spec" | $SED "$delay_single_quote_subst"`'
25883whole_archive_flag_spec='`$ECHO "$whole_archive_flag_spec" | $SED "$delay_single_quote_subst"`'
25884compiler_needs_object='`$ECHO "$compiler_needs_object" | $SED "$delay_single_quote_subst"`'
25885old_archive_from_new_cmds='`$ECHO "$old_archive_from_new_cmds" | $SED "$delay_single_quote_subst"`'
25886old_archive_from_expsyms_cmds='`$ECHO "$old_archive_from_expsyms_cmds" | $SED "$delay_single_quote_subst"`'
25887archive_cmds='`$ECHO "$archive_cmds" | $SED "$delay_single_quote_subst"`'
25888archive_expsym_cmds='`$ECHO "$archive_expsym_cmds" | $SED "$delay_single_quote_subst"`'
25889module_cmds='`$ECHO "$module_cmds" | $SED "$delay_single_quote_subst"`'
25890module_expsym_cmds='`$ECHO "$module_expsym_cmds" | $SED "$delay_single_quote_subst"`'
25891with_gnu_ld='`$ECHO "$with_gnu_ld" | $SED "$delay_single_quote_subst"`'
25892allow_undefined_flag='`$ECHO "$allow_undefined_flag" | $SED "$delay_single_quote_subst"`'
25893no_undefined_flag='`$ECHO "$no_undefined_flag" | $SED "$delay_single_quote_subst"`'
25894hardcode_libdir_flag_spec='`$ECHO "$hardcode_libdir_flag_spec" | $SED "$delay_single_quote_subst"`'
25895hardcode_libdir_separator='`$ECHO "$hardcode_libdir_separator" | $SED "$delay_single_quote_subst"`'
25896hardcode_direct='`$ECHO "$hardcode_direct" | $SED "$delay_single_quote_subst"`'
25897hardcode_direct_absolute='`$ECHO "$hardcode_direct_absolute" | $SED "$delay_single_quote_subst"`'
25898hardcode_minus_L='`$ECHO "$hardcode_minus_L" | $SED "$delay_single_quote_subst"`'
25899hardcode_shlibpath_var='`$ECHO "$hardcode_shlibpath_var" | $SED "$delay_single_quote_subst"`'
25900hardcode_automatic='`$ECHO "$hardcode_automatic" | $SED "$delay_single_quote_subst"`'
25901inherit_rpath='`$ECHO "$inherit_rpath" | $SED "$delay_single_quote_subst"`'
25902link_all_deplibs='`$ECHO "$link_all_deplibs" | $SED "$delay_single_quote_subst"`'
25903always_export_symbols='`$ECHO "$always_export_symbols" | $SED "$delay_single_quote_subst"`'
25904export_symbols_cmds='`$ECHO "$export_symbols_cmds" | $SED "$delay_single_quote_subst"`'
25905exclude_expsyms='`$ECHO "$exclude_expsyms" | $SED "$delay_single_quote_subst"`'
25906include_expsyms='`$ECHO "$include_expsyms" | $SED "$delay_single_quote_subst"`'
25907prelink_cmds='`$ECHO "$prelink_cmds" | $SED "$delay_single_quote_subst"`'
25908postlink_cmds='`$ECHO "$postlink_cmds" | $SED "$delay_single_quote_subst"`'
25909file_list_spec='`$ECHO "$file_list_spec" | $SED "$delay_single_quote_subst"`'
25910variables_saved_for_relink='`$ECHO "$variables_saved_for_relink" | $SED "$delay_single_quote_subst"`'
25911need_lib_prefix='`$ECHO "$need_lib_prefix" | $SED "$delay_single_quote_subst"`'
25912need_version='`$ECHO "$need_version" | $SED "$delay_single_quote_subst"`'
25913version_type='`$ECHO "$version_type" | $SED "$delay_single_quote_subst"`'
25914runpath_var='`$ECHO "$runpath_var" | $SED "$delay_single_quote_subst"`'
25915shlibpath_var='`$ECHO "$shlibpath_var" | $SED "$delay_single_quote_subst"`'
25916shlibpath_overrides_runpath='`$ECHO "$shlibpath_overrides_runpath" | $SED "$delay_single_quote_subst"`'
25917libname_spec='`$ECHO "$libname_spec" | $SED "$delay_single_quote_subst"`'
25918library_names_spec='`$ECHO "$library_names_spec" | $SED "$delay_single_quote_subst"`'
25919soname_spec='`$ECHO "$soname_spec" | $SED "$delay_single_quote_subst"`'
25920install_override_mode='`$ECHO "$install_override_mode" | $SED "$delay_single_quote_subst"`'
25921postinstall_cmds='`$ECHO "$postinstall_cmds" | $SED "$delay_single_quote_subst"`'
25922postuninstall_cmds='`$ECHO "$postuninstall_cmds" | $SED "$delay_single_quote_subst"`'
25923finish_cmds='`$ECHO "$finish_cmds" | $SED "$delay_single_quote_subst"`'
25924finish_eval='`$ECHO "$finish_eval" | $SED "$delay_single_quote_subst"`'
25925hardcode_into_libs='`$ECHO "$hardcode_into_libs" | $SED "$delay_single_quote_subst"`'
25926sys_lib_search_path_spec='`$ECHO "$sys_lib_search_path_spec" | $SED "$delay_single_quote_subst"`'
25927configure_time_dlsearch_path='`$ECHO "$configure_time_dlsearch_path" | $SED "$delay_single_quote_subst"`'
25928configure_time_lt_sys_library_path='`$ECHO "$configure_time_lt_sys_library_path" | $SED "$delay_single_quote_subst"`'
25929hardcode_action='`$ECHO "$hardcode_action" | $SED "$delay_single_quote_subst"`'
25930enable_dlopen='`$ECHO "$enable_dlopen" | $SED "$delay_single_quote_subst"`'
25931enable_dlopen_self='`$ECHO "$enable_dlopen_self" | $SED "$delay_single_quote_subst"`'
25932enable_dlopen_self_static='`$ECHO "$enable_dlopen_self_static" | $SED "$delay_single_quote_subst"`'
25933old_striplib='`$ECHO "$old_striplib" | $SED "$delay_single_quote_subst"`'
25934striplib='`$ECHO "$striplib" | $SED "$delay_single_quote_subst"`'
25935
25936LTCC='$LTCC'
25937LTCFLAGS='$LTCFLAGS'
25938compiler='$compiler_DEFAULT'
25939
25940# A function that is used when there is no print builtin or printf.
25941func_fallback_echo ()
25942{
25943  eval 'cat <<_LTECHO_EOF
25944\$1
25945_LTECHO_EOF'
25946}
25947
25948# Quote evaled strings.
25949for var in SHELL \
25950ECHO \
25951PATH_SEPARATOR \
25952SED \
25953GREP \
25954EGREP \
25955FGREP \
25956LD \
25957NM \
25958LN_S \
25959lt_SP2NL \
25960lt_NL2SP \
25961reload_flag \
25962OBJDUMP \
25963deplibs_check_method \
25964file_magic_cmd \
25965file_magic_glob \
25966want_nocaseglob \
25967DLLTOOL \
25968sharedlib_from_linklib_cmd \
25969AR \
25970AR_FLAGS \
25971archiver_list_spec \
25972STRIP \
25973RANLIB \
25974CC \
25975CFLAGS \
25976compiler \
25977lt_cv_sys_global_symbol_pipe \
25978lt_cv_sys_global_symbol_to_cdecl \
25979lt_cv_sys_global_symbol_to_import \
25980lt_cv_sys_global_symbol_to_c_name_address \
25981lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \
25982lt_cv_nm_interface \
25983nm_file_list_spec \
25984lt_cv_truncate_bin \
25985lt_prog_compiler_no_builtin_flag \
25986lt_prog_compiler_pic \
25987lt_prog_compiler_wl \
25988lt_prog_compiler_static \
25989lt_cv_prog_compiler_c_o \
25990need_locks \
25991MANIFEST_TOOL \
25992DSYMUTIL \
25993NMEDIT \
25994LIPO \
25995OTOOL \
25996OTOOL64 \
25997shrext_cmds \
25998export_dynamic_flag_spec \
25999whole_archive_flag_spec \
26000compiler_needs_object \
26001with_gnu_ld \
26002allow_undefined_flag \
26003no_undefined_flag \
26004hardcode_libdir_flag_spec \
26005hardcode_libdir_separator \
26006exclude_expsyms \
26007include_expsyms \
26008file_list_spec \
26009variables_saved_for_relink \
26010libname_spec \
26011library_names_spec \
26012soname_spec \
26013install_override_mode \
26014finish_eval \
26015old_striplib \
26016striplib; do
26017    case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
26018    *[\\\\\\\`\\"\\\$]*)
26019      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes
26020      ;;
26021    *)
26022      eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
26023      ;;
26024    esac
26025done
26026
26027# Double-quote double-evaled strings.
26028for var in reload_cmds \
26029old_postinstall_cmds \
26030old_postuninstall_cmds \
26031old_archive_cmds \
26032extract_expsyms_cmds \
26033old_archive_from_new_cmds \
26034old_archive_from_expsyms_cmds \
26035archive_cmds \
26036archive_expsym_cmds \
26037module_cmds \
26038module_expsym_cmds \
26039export_symbols_cmds \
26040prelink_cmds \
26041postlink_cmds \
26042postinstall_cmds \
26043postuninstall_cmds \
26044finish_cmds \
26045sys_lib_search_path_spec \
26046configure_time_dlsearch_path \
26047configure_time_lt_sys_library_path; do
26048    case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
26049    *[\\\\\\\`\\"\\\$]*)
26050      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes
26051      ;;
26052    *)
26053      eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
26054      ;;
26055    esac
26056done
26057
26058ac_aux_dir='$ac_aux_dir'
26059
26060# See if we are running on zsh, and set the options that allow our
26061# commands through without removal of \ escapes INIT.
26062if test -n "\${ZSH_VERSION+set}"; then
26063   setopt NO_GLOB_SUBST
26064fi
26065
26066
26067    PACKAGE='$PACKAGE'
26068    VERSION='$VERSION'
26069    RM='$RM'
26070    ofile='$ofile'
26071
26072
26073
26074
26075_ACEOF
26076
26077cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
26078
26079# Handling of arguments.
26080for ac_config_target in $ac_config_targets
26081do
26082  case $ac_config_target in
26083    "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;;
26084    "disable-rpath") CONFIG_COMMANDS="$CONFIG_COMMANDS disable-rpath" ;;
26085    "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
26086    "doc/example.conf") CONFIG_FILES="$CONFIG_FILES doc/example.conf" ;;
26087    "doc/libunbound.3") CONFIG_FILES="$CONFIG_FILES doc/libunbound.3" ;;
26088    "doc/unbound.8") CONFIG_FILES="$CONFIG_FILES doc/unbound.8" ;;
26089    "doc/unbound-anchor.8") CONFIG_FILES="$CONFIG_FILES doc/unbound-anchor.8" ;;
26090    "doc/unbound-checkconf.8") CONFIG_FILES="$CONFIG_FILES doc/unbound-checkconf.8" ;;
26091    "doc/unbound.conf.5") CONFIG_FILES="$CONFIG_FILES doc/unbound.conf.5" ;;
26092    "doc/unbound-control.8") CONFIG_FILES="$CONFIG_FILES doc/unbound-control.8" ;;
26093    "doc/unbound-host.1") CONFIG_FILES="$CONFIG_FILES doc/unbound-host.1" ;;
26094    "smallapp/unbound-control-setup.sh") CONFIG_FILES="$CONFIG_FILES smallapp/unbound-control-setup.sh" ;;
26095    "dnstap/dnstap_config.h") CONFIG_FILES="$CONFIG_FILES dnstap/dnstap_config.h" ;;
26096    "dnscrypt/dnscrypt_config.h") CONFIG_FILES="$CONFIG_FILES dnscrypt/dnscrypt_config.h" ;;
26097    "contrib/libunbound.pc") CONFIG_FILES="$CONFIG_FILES contrib/libunbound.pc" ;;
26098    "contrib/unbound.socket") CONFIG_FILES="$CONFIG_FILES contrib/unbound.socket" ;;
26099    "contrib/unbound.service") CONFIG_FILES="$CONFIG_FILES contrib/unbound.service" ;;
26100    "contrib/unbound_portable.service") CONFIG_FILES="$CONFIG_FILES contrib/unbound_portable.service" ;;
26101    "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
26102
26103  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
26104  esac
26105done
26106
26107
26108# If the user did not use the arguments to specify the items to instantiate,
26109# then the envvar interface is used.  Set only those that are not.
26110# We use the long form for the default assignment because of an extremely
26111# bizarre bug on SunOS 4.1.3.
26112if $ac_need_defaults; then
26113  test ${CONFIG_FILES+y} || CONFIG_FILES=$config_files
26114  test ${CONFIG_HEADERS+y} || CONFIG_HEADERS=$config_headers
26115  test ${CONFIG_COMMANDS+y} || CONFIG_COMMANDS=$config_commands
26116fi
26117
26118# Have a temporary directory for convenience.  Make it in the build tree
26119# simply because there is no reason against having it here, and in addition,
26120# creating and moving files from /tmp can sometimes cause problems.
26121# Hook for its removal unless debugging.
26122# Note that there is a small window in which the directory will not be cleaned:
26123# after its creation but before its name has been assigned to `$tmp'.
26124$debug ||
26125{
26126  tmp= ac_tmp=
26127  trap 'exit_status=$?
26128  : "${ac_tmp:=$tmp}"
26129  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
26130' 0
26131  trap 'as_fn_exit 1' 1 2 13 15
26132}
26133# Create a (secure) tmp directory for tmp files.
26134
26135{
26136  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
26137  test -d "$tmp"
26138}  ||
26139{
26140  tmp=./conf$$-$RANDOM
26141  (umask 077 && mkdir "$tmp")
26142} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
26143ac_tmp=$tmp
26144
26145# Set up the scripts for CONFIG_FILES section.
26146# No need to generate them if there are no CONFIG_FILES.
26147# This happens for instance with `./config.status config.h'.
26148if test -n "$CONFIG_FILES"; then
26149
26150
26151ac_cr=`echo X | tr X '\015'`
26152# On cygwin, bash can eat \r inside `` if the user requested igncr.
26153# But we know of no other shell where ac_cr would be empty at this
26154# point, so we can use a bashism as a fallback.
26155if test "x$ac_cr" = x; then
26156  eval ac_cr=\$\'\\r\'
26157fi
26158ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
26159if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
26160  ac_cs_awk_cr='\\r'
26161else
26162  ac_cs_awk_cr=$ac_cr
26163fi
26164
26165echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
26166_ACEOF
26167
26168
26169{
26170  echo "cat >conf$$subs.awk <<_ACEOF" &&
26171  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
26172  echo "_ACEOF"
26173} >conf$$subs.sh ||
26174  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
26175ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
26176ac_delim='%!_!# '
26177for ac_last_try in false false false false false :; do
26178  . ./conf$$subs.sh ||
26179    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
26180
26181  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
26182  if test $ac_delim_n = $ac_delim_num; then
26183    break
26184  elif $ac_last_try; then
26185    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
26186  else
26187    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
26188  fi
26189done
26190rm -f conf$$subs.sh
26191
26192cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
26193cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
26194_ACEOF
26195sed -n '
26196h
26197s/^/S["/; s/!.*/"]=/
26198p
26199g
26200s/^[^!]*!//
26201:repl
26202t repl
26203s/'"$ac_delim"'$//
26204t delim
26205:nl
26206h
26207s/\(.\{148\}\)..*/\1/
26208t more1
26209s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
26210p
26211n
26212b repl
26213:more1
26214s/["\\]/\\&/g; s/^/"/; s/$/"\\/
26215p
26216g
26217s/.\{148\}//
26218t nl
26219:delim
26220h
26221s/\(.\{148\}\)..*/\1/
26222t more2
26223s/["\\]/\\&/g; s/^/"/; s/$/"/
26224p
26225b
26226:more2
26227s/["\\]/\\&/g; s/^/"/; s/$/"\\/
26228p
26229g
26230s/.\{148\}//
26231t delim
26232' <conf$$subs.awk | sed '
26233/^[^""]/{
26234  N
26235  s/\n//
26236}
26237' >>$CONFIG_STATUS || ac_write_fail=1
26238rm -f conf$$subs.awk
26239cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
26240_ACAWK
26241cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
26242  for (key in S) S_is_set[key] = 1
26243  FS = ""
26244
26245}
26246{
26247  line = $ 0
26248  nfields = split(line, field, "@")
26249  substed = 0
26250  len = length(field[1])
26251  for (i = 2; i < nfields; i++) {
26252    key = field[i]
26253    keylen = length(key)
26254    if (S_is_set[key]) {
26255      value = S[key]
26256      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
26257      len += length(value) + length(field[++i])
26258      substed = 1
26259    } else
26260      len += 1 + keylen
26261  }
26262
26263  print line
26264}
26265
26266_ACAWK
26267_ACEOF
26268cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
26269if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
26270  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
26271else
26272  cat
26273fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
26274  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
26275_ACEOF
26276
26277# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
26278# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
26279# trailing colons and then remove the whole line if VPATH becomes empty
26280# (actually we leave an empty line to preserve line numbers).
26281if test "x$srcdir" = x.; then
26282  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
26283h
26284s///
26285s/^/:/
26286s/[	 ]*$/:/
26287s/:\$(srcdir):/:/g
26288s/:\${srcdir}:/:/g
26289s/:@srcdir@:/:/g
26290s/^:*//
26291s/:*$//
26292x
26293s/\(=[	 ]*\).*/\1/
26294G
26295s/\n//
26296s/^[^=]*=[	 ]*$//
26297}'
26298fi
26299
26300cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
26301fi # test -n "$CONFIG_FILES"
26302
26303# Set up the scripts for CONFIG_HEADERS section.
26304# No need to generate them if there are no CONFIG_HEADERS.
26305# This happens for instance with `./config.status Makefile'.
26306if test -n "$CONFIG_HEADERS"; then
26307cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
26308BEGIN {
26309_ACEOF
26310
26311# Transform confdefs.h into an awk script `defines.awk', embedded as
26312# here-document in config.status, that substitutes the proper values into
26313# config.h.in to produce config.h.
26314
26315# Create a delimiter string that does not exist in confdefs.h, to ease
26316# handling of long lines.
26317ac_delim='%!_!# '
26318for ac_last_try in false false :; do
26319  ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
26320  if test -z "$ac_tt"; then
26321    break
26322  elif $ac_last_try; then
26323    as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
26324  else
26325    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
26326  fi
26327done
26328
26329# For the awk script, D is an array of macro values keyed by name,
26330# likewise P contains macro parameters if any.  Preserve backslash
26331# newline sequences.
26332
26333ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
26334sed -n '
26335s/.\{148\}/&'"$ac_delim"'/g
26336t rset
26337:rset
26338s/^[	 ]*#[	 ]*define[	 ][	 ]*/ /
26339t def
26340d
26341:def
26342s/\\$//
26343t bsnl
26344s/["\\]/\\&/g
26345s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
26346D["\1"]=" \3"/p
26347s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2"/p
26348d
26349:bsnl
26350s/["\\]/\\&/g
26351s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
26352D["\1"]=" \3\\\\\\n"\\/p
26353t cont
26354s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
26355t cont
26356d
26357:cont
26358n
26359s/.\{148\}/&'"$ac_delim"'/g
26360t clear
26361:clear
26362s/\\$//
26363t bsnlc
26364s/["\\]/\\&/g; s/^/"/; s/$/"/p
26365d
26366:bsnlc
26367s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
26368b cont
26369' <confdefs.h | sed '
26370s/'"$ac_delim"'/"\\\
26371"/g' >>$CONFIG_STATUS || ac_write_fail=1
26372
26373cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
26374  for (key in D) D_is_set[key] = 1
26375  FS = ""
26376}
26377/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
26378  line = \$ 0
26379  split(line, arg, " ")
26380  if (arg[1] == "#") {
26381    defundef = arg[2]
26382    mac1 = arg[3]
26383  } else {
26384    defundef = substr(arg[1], 2)
26385    mac1 = arg[2]
26386  }
26387  split(mac1, mac2, "(") #)
26388  macro = mac2[1]
26389  prefix = substr(line, 1, index(line, defundef) - 1)
26390  if (D_is_set[macro]) {
26391    # Preserve the white space surrounding the "#".
26392    print prefix "define", macro P[macro] D[macro]
26393    next
26394  } else {
26395    # Replace #undef with comments.  This is necessary, for example,
26396    # in the case of _POSIX_SOURCE, which is predefined and required
26397    # on some systems where configure will not decide to define it.
26398    if (defundef == "undef") {
26399      print "/*", prefix defundef, macro, "*/"
26400      next
26401    }
26402  }
26403}
26404{ print }
26405_ACAWK
26406_ACEOF
26407cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
26408  as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
26409fi # test -n "$CONFIG_HEADERS"
26410
26411
26412eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS    :C $CONFIG_COMMANDS"
26413shift
26414for ac_tag
26415do
26416  case $ac_tag in
26417  :[FHLC]) ac_mode=$ac_tag; continue;;
26418  esac
26419  case $ac_mode$ac_tag in
26420  :[FHL]*:*);;
26421  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
26422  :[FH]-) ac_tag=-:-;;
26423  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
26424  esac
26425  ac_save_IFS=$IFS
26426  IFS=:
26427  set x $ac_tag
26428  IFS=$ac_save_IFS
26429  shift
26430  ac_file=$1
26431  shift
26432
26433  case $ac_mode in
26434  :L) ac_source=$1;;
26435  :[FH])
26436    ac_file_inputs=
26437    for ac_f
26438    do
26439      case $ac_f in
26440      -) ac_f="$ac_tmp/stdin";;
26441      *) # Look for the file first in the build tree, then in the source tree
26442	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
26443	 # because $ac_f cannot contain `:'.
26444	 test -f "$ac_f" ||
26445	   case $ac_f in
26446	   [\\/$]*) false;;
26447	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
26448	   esac ||
26449	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
26450      esac
26451      case $ac_f in *\'*) ac_f=`printf "%s\n" "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
26452      as_fn_append ac_file_inputs " '$ac_f'"
26453    done
26454
26455    # Let's still pretend it is `configure' which instantiates (i.e., don't
26456    # use $as_me), people would be surprised to read:
26457    #    /* config.h.  Generated by config.status.  */
26458    configure_input='Generated from '`
26459	  printf "%s\n" "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
26460	`' by configure.'
26461    if test x"$ac_file" != x-; then
26462      configure_input="$ac_file.  $configure_input"
26463      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
26464printf "%s\n" "$as_me: creating $ac_file" >&6;}
26465    fi
26466    # Neutralize special characters interpreted by sed in replacement strings.
26467    case $configure_input in #(
26468    *\&* | *\|* | *\\* )
26469       ac_sed_conf_input=`printf "%s\n" "$configure_input" |
26470       sed 's/[\\\\&|]/\\\\&/g'`;; #(
26471    *) ac_sed_conf_input=$configure_input;;
26472    esac
26473
26474    case $ac_tag in
26475    *:-:* | *:-) cat >"$ac_tmp/stdin" \
26476      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
26477    esac
26478    ;;
26479  esac
26480
26481  ac_dir=`$as_dirname -- "$ac_file" ||
26482$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
26483	 X"$ac_file" : 'X\(//\)[^/]' \| \
26484	 X"$ac_file" : 'X\(//\)$' \| \
26485	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
26486printf "%s\n" X"$ac_file" |
26487    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
26488	    s//\1/
26489	    q
26490	  }
26491	  /^X\(\/\/\)[^/].*/{
26492	    s//\1/
26493	    q
26494	  }
26495	  /^X\(\/\/\)$/{
26496	    s//\1/
26497	    q
26498	  }
26499	  /^X\(\/\).*/{
26500	    s//\1/
26501	    q
26502	  }
26503	  s/.*/./; q'`
26504  as_dir="$ac_dir"; as_fn_mkdir_p
26505  ac_builddir=.
26506
26507case "$ac_dir" in
26508.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
26509*)
26510  ac_dir_suffix=/`printf "%s\n" "$ac_dir" | sed 's|^\.[\\/]||'`
26511  # A ".." for each directory in $ac_dir_suffix.
26512  ac_top_builddir_sub=`printf "%s\n" "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
26513  case $ac_top_builddir_sub in
26514  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
26515  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
26516  esac ;;
26517esac
26518ac_abs_top_builddir=$ac_pwd
26519ac_abs_builddir=$ac_pwd$ac_dir_suffix
26520# for backward compatibility:
26521ac_top_builddir=$ac_top_build_prefix
26522
26523case $srcdir in
26524  .)  # We are building in place.
26525    ac_srcdir=.
26526    ac_top_srcdir=$ac_top_builddir_sub
26527    ac_abs_top_srcdir=$ac_pwd ;;
26528  [\\/]* | ?:[\\/]* )  # Absolute name.
26529    ac_srcdir=$srcdir$ac_dir_suffix;
26530    ac_top_srcdir=$srcdir
26531    ac_abs_top_srcdir=$srcdir ;;
26532  *) # Relative name.
26533    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
26534    ac_top_srcdir=$ac_top_build_prefix$srcdir
26535    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
26536esac
26537ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
26538
26539
26540  case $ac_mode in
26541  :F)
26542  #
26543  # CONFIG_FILE
26544  #
26545
26546_ACEOF
26547
26548cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
26549# If the template does not know about datarootdir, expand it.
26550# FIXME: This hack should be removed a few years after 2.60.
26551ac_datarootdir_hack=; ac_datarootdir_seen=
26552ac_sed_dataroot='
26553/datarootdir/ {
26554  p
26555  q
26556}
26557/@datadir@/p
26558/@docdir@/p
26559/@infodir@/p
26560/@localedir@/p
26561/@mandir@/p'
26562case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
26563*datarootdir*) ac_datarootdir_seen=yes;;
26564*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
26565  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
26566printf "%s\n" "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
26567_ACEOF
26568cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
26569  ac_datarootdir_hack='
26570  s&@datadir@&$datadir&g
26571  s&@docdir@&$docdir&g
26572  s&@infodir@&$infodir&g
26573  s&@localedir@&$localedir&g
26574  s&@mandir@&$mandir&g
26575  s&\\\${datarootdir}&$datarootdir&g' ;;
26576esac
26577_ACEOF
26578
26579# Neutralize VPATH when `$srcdir' = `.'.
26580# Shell code in configure.ac might set extrasub.
26581# FIXME: do we really want to maintain this feature?
26582cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
26583ac_sed_extra="$ac_vpsub
26584$extrasub
26585_ACEOF
26586cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
26587:t
26588/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
26589s|@configure_input@|$ac_sed_conf_input|;t t
26590s&@top_builddir@&$ac_top_builddir_sub&;t t
26591s&@top_build_prefix@&$ac_top_build_prefix&;t t
26592s&@srcdir@&$ac_srcdir&;t t
26593s&@abs_srcdir@&$ac_abs_srcdir&;t t
26594s&@top_srcdir@&$ac_top_srcdir&;t t
26595s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
26596s&@builddir@&$ac_builddir&;t t
26597s&@abs_builddir@&$ac_abs_builddir&;t t
26598s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
26599$ac_datarootdir_hack
26600"
26601eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
26602  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
26603
26604test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
26605  { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
26606  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' \
26607      "$ac_tmp/out"`; test -z "$ac_out"; } &&
26608  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
26609which seems to be undefined.  Please make sure it is defined" >&5
26610printf "%s\n" "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
26611which seems to be undefined.  Please make sure it is defined" >&2;}
26612
26613  rm -f "$ac_tmp/stdin"
26614  case $ac_file in
26615  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
26616  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
26617  esac \
26618  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
26619 ;;
26620  :H)
26621  #
26622  # CONFIG_HEADER
26623  #
26624  if test x"$ac_file" != x-; then
26625    {
26626      printf "%s\n" "/* $configure_input  */" >&1 \
26627      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
26628    } >"$ac_tmp/config.h" \
26629      || as_fn_error $? "could not create $ac_file" "$LINENO" 5
26630    if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
26631      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
26632printf "%s\n" "$as_me: $ac_file is unchanged" >&6;}
26633    else
26634      rm -f "$ac_file"
26635      mv "$ac_tmp/config.h" "$ac_file" \
26636	|| as_fn_error $? "could not create $ac_file" "$LINENO" 5
26637    fi
26638  else
26639    printf "%s\n" "/* $configure_input  */" >&1 \
26640      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
26641      || as_fn_error $? "could not create -" "$LINENO" 5
26642  fi
26643 ;;
26644
26645  :C)  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
26646printf "%s\n" "$as_me: executing $ac_file commands" >&6;}
26647 ;;
26648  esac
26649
26650
26651  case $ac_file$ac_mode in
26652    "libtool":C)
26653
26654    # See if we are running on zsh, and set the options that allow our
26655    # commands through without removal of \ escapes.
26656    if test -n "${ZSH_VERSION+set}"; then
26657      setopt NO_GLOB_SUBST
26658    fi
26659
26660    cfgfile=${ofile}T
26661    trap "$RM \"$cfgfile\"; exit 1" 1 2 15
26662    $RM "$cfgfile"
26663
26664    cat <<_LT_EOF >> "$cfgfile"
26665#! $SHELL
26666# Generated automatically by $as_me ($PACKAGE) $VERSION
26667# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
26668# NOTE: Changes made to this file will be lost: look at ltmain.sh.
26669
26670# Provide generalized library-building support services.
26671# Written by Gordon Matzigkeit, 1996
26672
26673# Copyright (C) 2014 Free Software Foundation, Inc.
26674# This is free software; see the source for copying conditions.  There is NO
26675# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
26676
26677# GNU Libtool is free software; you can redistribute it and/or modify
26678# it under the terms of the GNU General Public License as published by
26679# the Free Software Foundation; either version 2 of of the License, or
26680# (at your option) any later version.
26681#
26682# As a special exception to the GNU General Public License, if you
26683# distribute this file as part of a program or library that is built
26684# using GNU Libtool, you may include this file under the  same
26685# distribution terms that you use for the rest of that program.
26686#
26687# GNU Libtool is distributed in the hope that it will be useful, but
26688# WITHOUT ANY WARRANTY; without even the implied warranty of
26689# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
26690# GNU General Public License for more details.
26691#
26692# You should have received a copy of the GNU General Public License
26693# along with this program.  If not, see <http://www.gnu.org/licenses/>.
26694
26695
26696# The names of the tagged configurations supported by this script.
26697available_tags=''
26698
26699# Configured defaults for sys_lib_dlsearch_path munging.
26700: \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"}
26701
26702# ### BEGIN LIBTOOL CONFIG
26703
26704# Which release of libtool.m4 was used?
26705macro_version=$macro_version
26706macro_revision=$macro_revision
26707
26708# Whether or not to build shared libraries.
26709build_libtool_libs=$enable_shared
26710
26711# Whether or not to build static libraries.
26712build_old_libs=$enable_static
26713
26714# What type of objects to build.
26715pic_mode=$pic_mode
26716
26717# Whether or not to optimize for fast installation.
26718fast_install=$enable_fast_install
26719
26720# Shared archive member basename,for filename based shared library versioning on AIX.
26721shared_archive_member_spec=$shared_archive_member_spec
26722
26723# Shell to use when invoking shell scripts.
26724SHELL=$lt_SHELL
26725
26726# An echo program that protects backslashes.
26727ECHO=$lt_ECHO
26728
26729# The PATH separator for the build system.
26730PATH_SEPARATOR=$lt_PATH_SEPARATOR
26731
26732# The host system.
26733host_alias=$host_alias
26734host=$host
26735host_os=$host_os
26736
26737# The build system.
26738build_alias=$build_alias
26739build=$build
26740build_os=$build_os
26741
26742# A sed program that does not truncate output.
26743SED=$lt_SED
26744
26745# Sed that helps us avoid accidentally triggering echo(1) options like -n.
26746Xsed="\$SED -e 1s/^X//"
26747
26748# A grep program that handles long lines.
26749GREP=$lt_GREP
26750
26751# An ERE matcher.
26752EGREP=$lt_EGREP
26753
26754# A literal string matcher.
26755FGREP=$lt_FGREP
26756
26757# A BSD- or MS-compatible name lister.
26758NM=$lt_NM
26759
26760# Whether we need soft or hard links.
26761LN_S=$lt_LN_S
26762
26763# What is the maximum length of a command?
26764max_cmd_len=$max_cmd_len
26765
26766# Object file suffix (normally "o").
26767objext=$ac_objext
26768
26769# Executable file suffix (normally "").
26770exeext=$exeext
26771
26772# whether the shell understands "unset".
26773lt_unset=$lt_unset
26774
26775# turn spaces into newlines.
26776SP2NL=$lt_lt_SP2NL
26777
26778# turn newlines into spaces.
26779NL2SP=$lt_lt_NL2SP
26780
26781# convert \$build file names to \$host format.
26782to_host_file_cmd=$lt_cv_to_host_file_cmd
26783
26784# convert \$build files to toolchain format.
26785to_tool_file_cmd=$lt_cv_to_tool_file_cmd
26786
26787# An object symbol dumper.
26788OBJDUMP=$lt_OBJDUMP
26789
26790# Method to check whether dependent libraries are shared objects.
26791deplibs_check_method=$lt_deplibs_check_method
26792
26793# Command to use when deplibs_check_method = "file_magic".
26794file_magic_cmd=$lt_file_magic_cmd
26795
26796# How to find potential files when deplibs_check_method = "file_magic".
26797file_magic_glob=$lt_file_magic_glob
26798
26799# Find potential files using nocaseglob when deplibs_check_method = "file_magic".
26800want_nocaseglob=$lt_want_nocaseglob
26801
26802# DLL creation program.
26803DLLTOOL=$lt_DLLTOOL
26804
26805# Command to associate shared and link libraries.
26806sharedlib_from_linklib_cmd=$lt_sharedlib_from_linklib_cmd
26807
26808# The archiver.
26809AR=$lt_AR
26810
26811# Flags to create an archive.
26812AR_FLAGS=$lt_AR_FLAGS
26813
26814# How to feed a file listing to the archiver.
26815archiver_list_spec=$lt_archiver_list_spec
26816
26817# A symbol stripping program.
26818STRIP=$lt_STRIP
26819
26820# Commands used to install an old-style archive.
26821RANLIB=$lt_RANLIB
26822old_postinstall_cmds=$lt_old_postinstall_cmds
26823old_postuninstall_cmds=$lt_old_postuninstall_cmds
26824
26825# Whether to use a lock for old archive extraction.
26826lock_old_archive_extraction=$lock_old_archive_extraction
26827
26828# A C compiler.
26829LTCC=$lt_CC
26830
26831# LTCC compiler flags.
26832LTCFLAGS=$lt_CFLAGS
26833
26834# Take the output of nm and produce a listing of raw symbols and C names.
26835global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
26836
26837# Transform the output of nm in a proper C declaration.
26838global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
26839
26840# Transform the output of nm into a list of symbols to manually relocate.
26841global_symbol_to_import=$lt_lt_cv_sys_global_symbol_to_import
26842
26843# Transform the output of nm in a C name address pair.
26844global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
26845
26846# Transform the output of nm in a C name address pair when lib prefix is needed.
26847global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix
26848
26849# The name lister interface.
26850nm_interface=$lt_lt_cv_nm_interface
26851
26852# Specify filename containing input files for \$NM.
26853nm_file_list_spec=$lt_nm_file_list_spec
26854
26855# The root where to search for dependent libraries,and where our libraries should be installed.
26856lt_sysroot=$lt_sysroot
26857
26858# Command to truncate a binary pipe.
26859lt_truncate_bin=$lt_lt_cv_truncate_bin
26860
26861# The name of the directory that contains temporary libtool files.
26862objdir=$objdir
26863
26864# Used to examine libraries when file_magic_cmd begins with "file".
26865MAGIC_CMD=$MAGIC_CMD
26866
26867# Must we lock files when doing compilation?
26868need_locks=$lt_need_locks
26869
26870# Manifest tool.
26871MANIFEST_TOOL=$lt_MANIFEST_TOOL
26872
26873# Tool to manipulate archived DWARF debug symbol files on Mac OS X.
26874DSYMUTIL=$lt_DSYMUTIL
26875
26876# Tool to change global to local symbols on Mac OS X.
26877NMEDIT=$lt_NMEDIT
26878
26879# Tool to manipulate fat objects and archives on Mac OS X.
26880LIPO=$lt_LIPO
26881
26882# ldd/readelf like tool for Mach-O binaries on Mac OS X.
26883OTOOL=$lt_OTOOL
26884
26885# ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4.
26886OTOOL64=$lt_OTOOL64
26887
26888# Old archive suffix (normally "a").
26889libext=$libext
26890
26891# Shared library suffix (normally ".so").
26892shrext_cmds=$lt_shrext_cmds
26893
26894# The commands to extract the exported symbol list from a shared archive.
26895extract_expsyms_cmds=$lt_extract_expsyms_cmds
26896
26897# Variables whose values should be saved in libtool wrapper scripts and
26898# restored at link time.
26899variables_saved_for_relink=$lt_variables_saved_for_relink
26900
26901# Do we need the "lib" prefix for modules?
26902need_lib_prefix=$need_lib_prefix
26903
26904# Do we need a version for libraries?
26905need_version=$need_version
26906
26907# Library versioning type.
26908version_type=$version_type
26909
26910# Shared library runtime path variable.
26911runpath_var=$runpath_var
26912
26913# Shared library path variable.
26914shlibpath_var=$shlibpath_var
26915
26916# Is shlibpath searched before the hard-coded library search path?
26917shlibpath_overrides_runpath=$shlibpath_overrides_runpath
26918
26919# Format of library name prefix.
26920libname_spec=$lt_libname_spec
26921
26922# List of archive names.  First name is the real one, the rest are links.
26923# The last name is the one that the linker finds with -lNAME
26924library_names_spec=$lt_library_names_spec
26925
26926# The coded name of the library, if different from the real name.
26927soname_spec=$lt_soname_spec
26928
26929# Permission mode override for installation of shared libraries.
26930install_override_mode=$lt_install_override_mode
26931
26932# Command to use after installation of a shared archive.
26933postinstall_cmds=$lt_postinstall_cmds
26934
26935# Command to use after uninstallation of a shared archive.
26936postuninstall_cmds=$lt_postuninstall_cmds
26937
26938# Commands used to finish a libtool library installation in a directory.
26939finish_cmds=$lt_finish_cmds
26940
26941# As "finish_cmds", except a single script fragment to be evaled but
26942# not shown.
26943finish_eval=$lt_finish_eval
26944
26945# Whether we should hardcode library paths into libraries.
26946hardcode_into_libs=$hardcode_into_libs
26947
26948# Compile-time system search path for libraries.
26949sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
26950
26951# Detected run-time system search path for libraries.
26952sys_lib_dlsearch_path_spec=$lt_configure_time_dlsearch_path
26953
26954# Explicit LT_SYS_LIBRARY_PATH set during ./configure time.
26955configure_time_lt_sys_library_path=$lt_configure_time_lt_sys_library_path
26956
26957# Whether dlopen is supported.
26958dlopen_support=$enable_dlopen
26959
26960# Whether dlopen of programs is supported.
26961dlopen_self=$enable_dlopen_self
26962
26963# Whether dlopen of statically linked programs is supported.
26964dlopen_self_static=$enable_dlopen_self_static
26965
26966# Commands to strip libraries.
26967old_striplib=$lt_old_striplib
26968striplib=$lt_striplib
26969
26970
26971# The linker used to build libraries.
26972LD=$lt_LD
26973
26974# How to create reloadable object files.
26975reload_flag=$lt_reload_flag
26976reload_cmds=$lt_reload_cmds
26977
26978# Commands used to build an old-style archive.
26979old_archive_cmds=$lt_old_archive_cmds
26980
26981# A language specific compiler.
26982CC=$lt_compiler
26983
26984# Is the compiler the GNU compiler?
26985with_gcc=$GCC
26986
26987# Compiler flag to turn off builtin functions.
26988no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag
26989
26990# Additional compiler flags for building library objects.
26991pic_flag=$lt_lt_prog_compiler_pic
26992
26993# How to pass a linker flag through the compiler.
26994wl=$lt_lt_prog_compiler_wl
26995
26996# Compiler flag to prevent dynamic linking.
26997link_static_flag=$lt_lt_prog_compiler_static
26998
26999# Does compiler simultaneously support -c and -o options?
27000compiler_c_o=$lt_lt_cv_prog_compiler_c_o
27001
27002# Whether or not to add -lc for building shared libraries.
27003build_libtool_need_lc=$archive_cmds_need_lc
27004
27005# Whether or not to disallow shared libs when runtime libs are static.
27006allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes
27007
27008# Compiler flag to allow reflexive dlopens.
27009export_dynamic_flag_spec=$lt_export_dynamic_flag_spec
27010
27011# Compiler flag to generate shared objects directly from archives.
27012whole_archive_flag_spec=$lt_whole_archive_flag_spec
27013
27014# Whether the compiler copes with passing no objects directly.
27015compiler_needs_object=$lt_compiler_needs_object
27016
27017# Create an old-style archive from a shared archive.
27018old_archive_from_new_cmds=$lt_old_archive_from_new_cmds
27019
27020# Create a temporary old-style archive to link instead of a shared archive.
27021old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds
27022
27023# Commands used to build a shared archive.
27024archive_cmds=$lt_archive_cmds
27025archive_expsym_cmds=$lt_archive_expsym_cmds
27026
27027# Commands used to build a loadable module if different from building
27028# a shared archive.
27029module_cmds=$lt_module_cmds
27030module_expsym_cmds=$lt_module_expsym_cmds
27031
27032# Whether we are building with GNU ld or not.
27033with_gnu_ld=$lt_with_gnu_ld
27034
27035# Flag that allows shared libraries with undefined symbols to be built.
27036allow_undefined_flag=$lt_allow_undefined_flag
27037
27038# Flag that enforces no undefined symbols.
27039no_undefined_flag=$lt_no_undefined_flag
27040
27041# Flag to hardcode \$libdir into a binary during linking.
27042# This must work even if \$libdir does not exist
27043hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
27044
27045# Whether we need a single "-rpath" flag with a separated argument.
27046hardcode_libdir_separator=$lt_hardcode_libdir_separator
27047
27048# Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes
27049# DIR into the resulting binary.
27050hardcode_direct=$hardcode_direct
27051
27052# Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes
27053# DIR into the resulting binary and the resulting library dependency is
27054# "absolute",i.e impossible to change by setting \$shlibpath_var if the
27055# library is relocated.
27056hardcode_direct_absolute=$hardcode_direct_absolute
27057
27058# Set to "yes" if using the -LDIR flag during linking hardcodes DIR
27059# into the resulting binary.
27060hardcode_minus_L=$hardcode_minus_L
27061
27062# Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
27063# into the resulting binary.
27064hardcode_shlibpath_var=$hardcode_shlibpath_var
27065
27066# Set to "yes" if building a shared library automatically hardcodes DIR
27067# into the library and all subsequent libraries and executables linked
27068# against it.
27069hardcode_automatic=$hardcode_automatic
27070
27071# Set to yes if linker adds runtime paths of dependent libraries
27072# to runtime path list.
27073inherit_rpath=$inherit_rpath
27074
27075# Whether libtool must link a program against all its dependency libraries.
27076link_all_deplibs=$link_all_deplibs
27077
27078# Set to "yes" if exported symbols are required.
27079always_export_symbols=$always_export_symbols
27080
27081# The commands to list exported symbols.
27082export_symbols_cmds=$lt_export_symbols_cmds
27083
27084# Symbols that should not be listed in the preloaded symbols.
27085exclude_expsyms=$lt_exclude_expsyms
27086
27087# Symbols that must always be exported.
27088include_expsyms=$lt_include_expsyms
27089
27090# Commands necessary for linking programs (against libraries) with templates.
27091prelink_cmds=$lt_prelink_cmds
27092
27093# Commands necessary for finishing linking programs.
27094postlink_cmds=$lt_postlink_cmds
27095
27096# Specify filename containing input files.
27097file_list_spec=$lt_file_list_spec
27098
27099# How to hardcode a shared library path into an executable.
27100hardcode_action=$hardcode_action
27101
27102# ### END LIBTOOL CONFIG
27103
27104_LT_EOF
27105
27106    cat <<'_LT_EOF' >> "$cfgfile"
27107
27108# ### BEGIN FUNCTIONS SHARED WITH CONFIGURE
27109
27110# func_munge_path_list VARIABLE PATH
27111# -----------------------------------
27112# VARIABLE is name of variable containing _space_ separated list of
27113# directories to be munged by the contents of PATH, which is string
27114# having a format:
27115# "DIR[:DIR]:"
27116#       string "DIR[ DIR]" will be prepended to VARIABLE
27117# ":DIR[:DIR]"
27118#       string "DIR[ DIR]" will be appended to VARIABLE
27119# "DIRP[:DIRP]::[DIRA:]DIRA"
27120#       string "DIRP[ DIRP]" will be prepended to VARIABLE and string
27121#       "DIRA[ DIRA]" will be appended to VARIABLE
27122# "DIR[:DIR]"
27123#       VARIABLE will be replaced by "DIR[ DIR]"
27124func_munge_path_list ()
27125{
27126    case x$2 in
27127    x)
27128        ;;
27129    *:)
27130        eval $1=\"`$ECHO $2 | $SED 's/:/ /g'` \$$1\"
27131        ;;
27132    x:*)
27133        eval $1=\"\$$1 `$ECHO $2 | $SED 's/:/ /g'`\"
27134        ;;
27135    *::*)
27136        eval $1=\"\$$1\ `$ECHO $2 | $SED -e 's/.*:://' -e 's/:/ /g'`\"
27137        eval $1=\"`$ECHO $2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \$$1\"
27138        ;;
27139    *)
27140        eval $1=\"`$ECHO $2 | $SED 's/:/ /g'`\"
27141        ;;
27142    esac
27143}
27144
27145
27146# Calculate cc_basename.  Skip known compiler wrappers and cross-prefix.
27147func_cc_basename ()
27148{
27149    for cc_temp in $*""; do
27150      case $cc_temp in
27151        compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
27152        distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
27153        \-*) ;;
27154        *) break;;
27155      esac
27156    done
27157    func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
27158}
27159
27160
27161# ### END FUNCTIONS SHARED WITH CONFIGURE
27162
27163_LT_EOF
27164
27165  case $host_os in
27166  aix3*)
27167    cat <<\_LT_EOF >> "$cfgfile"
27168# AIX sometimes has problems with the GCC collect2 program.  For some
27169# reason, if we set the COLLECT_NAMES environment variable, the problems
27170# vanish in a puff of smoke.
27171if test set != "${COLLECT_NAMES+set}"; then
27172  COLLECT_NAMES=
27173  export COLLECT_NAMES
27174fi
27175_LT_EOF
27176    ;;
27177  esac
27178
27179
27180
27181ltmain=$ac_aux_dir/ltmain.sh
27182
27183
27184  # We use sed instead of cat because bash on DJGPP gets confused if
27185  # if finds mixed CR/LF and LF-only lines.  Since sed operates in
27186  # text mode, it properly converts lines to CR/LF.  This bash problem
27187  # is reportedly fixed, but why not run on old versions too?
27188  sed '$q' "$ltmain" >> "$cfgfile" \
27189     || (rm -f "$cfgfile"; exit 1)
27190
27191   mv -f "$cfgfile" "$ofile" ||
27192    (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
27193  chmod +x "$ofile"
27194
27195 ;;
27196    "disable-rpath":C)
27197	sed < libtool > libtool-2 \
27198	's/^hardcode_libdir_flag_spec.*$'/'hardcode_libdir_flag_spec=" -D__LIBTOOL_RPATH_SED__ "/'
27199	mv libtool-2 libtool
27200	chmod 755 libtool
27201	libtool="./libtool"
27202	 ;;
27203
27204  esac
27205done # for ac_tag
27206
27207
27208as_fn_exit 0
27209_ACEOF
27210ac_clean_files=$ac_clean_files_save
27211
27212test $ac_write_fail = 0 ||
27213  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
27214
27215
27216# configure is writing to config.log, and then calls config.status.
27217# config.status does its own redirection, appending to config.log.
27218# Unfortunately, on DOS this fails, as config.log is still kept open
27219# by configure, so config.status won't be able to write to it; its
27220# output is simply discarded.  So we exec the FD to /dev/null,
27221# effectively closing config.log, so it can be properly (re)opened and
27222# appended to by config.status.  When coming back to configure, we
27223# need to make the FD available again.
27224if test "$no_create" != yes; then
27225  ac_cs_success=:
27226  ac_config_status_args=
27227  test "$silent" = yes &&
27228    ac_config_status_args="$ac_config_status_args --quiet"
27229  exec 5>/dev/null
27230  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
27231  exec 5>>config.log
27232  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
27233  # would make configure fail if this is the last instruction.
27234  $ac_cs_success || as_fn_exit 1
27235fi
27236if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
27237  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
27238printf "%s\n" "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
27239fi
27240
27241
27242