xref: /freebsd/contrib/unbound/configure (revision 8b29c373e6ab530b62122ea2adcbe637c07e06c9)
1#! /bin/sh
2# Guess values for system-dependent variables and create Makefiles.
3# Generated by GNU Autoconf 2.71 for unbound 1.24.1.
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.24.1'
626PACKAGE_STRING='unbound 1.24.1'
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_GEN_C
689PROTOC_C
690PROTOC
691UBSYMS
692EXTRALINK
693COMMON_OBJ_ALL_SYMBOLS
694LIBOBJ_WITHOUT_CTIME
695LIBOBJ_WITHOUT_CTIMEARC4
696WIN_CHECKCONF_OBJ_LINK
697WIN_CONTROL_OBJ_LINK
698WIN_UBANCHOR_OBJ_LINK
699WIN_HOST_OBJ_LINK
700WIN_DAEMON_OBJ_LINK
701WIN_DAEMON_OBJ
702WIN_DAEMON_SRC
703WINAPPS
704WINDRES
705CHECKLOCK_OBJ
706staticexe
707PC_LIBEVENT_DEPENDENCY
708UNBOUND_EVENT_UNINSTALL
709UNBOUND_EVENT_INSTALL
710SUBNET_HEADER
711SUBNET_OBJ
712PC_LIBBSD_DEPENDENCY
713SSLLIB
714HAVE_SSL
715PC_CRYPTO_DEPENDENCY
716CONFIG_DATE
717SOURCE_DATE_EPOCH
718GCC_DOCKER_LINTFLAGS
719NETBSD_LINTFLAGS
720PYUNBOUND_UNINSTALL
721PYUNBOUND_INSTALL
722PYUNBOUND_TARGET
723PYUNBOUND_OBJ
724WITH_PYUNBOUND
725PYTHONMOD_UNINSTALL
726PYTHONMOD_INSTALL
727PYTHONMOD_HEADER
728PYTHONMOD_OBJ
729WITH_PYTHONMODULE
730swig
731SWIG_LIB
732SWIG
733PC_PY_DEPENDENCY
734PYTHON_LIBS
735PY_MAJOR_VERSION
736PYTHON_SITE_PKG
737PYTHON_LDFLAGS
738PYTHON_CPPFLAGS
739PYTHON
740PYTHON_VERSION
741DYNLIBMOD_EXTRALIBS
742DYNLIBMOD_HEADER
743DYNLIBMOD_OBJ
744WITH_DYNLIBMODULE
745PTHREAD_CFLAGS_ONLY
746PTHREAD_CFLAGS
747PTHREAD_LIBS
748PTHREAD_CXX
749PTHREAD_CC
750ax_pthread_config
751ASYNCLOOK_ALLOCCHECK_EXTRA_OBJ
752SLDNS_ALLOCCHECK_EXTRA_OBJ
753USE_SYSTEMD_FALSE
754USE_SYSTEMD_TRUE
755SYSTEMD_DAEMON_LIBS
756SYSTEMD_DAEMON_CFLAGS
757SYSTEMD_LIBS
758SYSTEMD_CFLAGS
759RUNTIME_PATH
760LIBOBJS
761CPP
762PKG_CONFIG_LIBDIR
763PKG_CONFIG_PATH
764PKG_CONFIG
765LT_SYS_LIBRARY_PATH
766OTOOL64
767OTOOL
768LIPO
769NMEDIT
770DSYMUTIL
771MANIFEST_TOOL
772AWK
773RANLIB
774ac_ct_AR
775DLLTOOL
776OBJDUMP
777FILECMD
778LN_S
779NM
780ac_ct_DUMPBIN
781DUMPBIN
782LD
783FGREP
784EGREP
785SED
786LIBTOOL
787AR
788host_os
789host_vendor
790host_cpu
791host
792build_os
793build_vendor
794build_cpu
795build
796libtool
797STRIP
798doxygen
799YFLAGS
800YACC
801LEXLIB
802LEX_OUTPUT_ROOT
803LEX
804debug_enabled
805DEPFLAG
806GREP
807UNBOUND_USERNAME
808UNBOUND_ROOTCERT_FILE
809UNBOUND_ROOTKEY_FILE
810UNBOUND_PIDFILE
811UNBOUND_SHARE_DIR
812UNBOUND_CHROOT_DIR
813UNBOUND_RUN_DIR
814ub_conf_dir
815ub_conf_file
816UNBOUND_LOCALSTATE_DIR
817UNBOUND_SYSCONF_DIR
818UNBOUND_SBIN_DIR
819OBJEXT
820EXEEXT
821ac_ct_CC
822CPPFLAGS
823LDFLAGS
824CFLAGS
825CC
826LIBUNBOUND_AGE
827LIBUNBOUND_REVISION
828LIBUNBOUND_CURRENT
829UNBOUND_VERSION_MICRO
830UNBOUND_VERSION_MINOR
831UNBOUND_VERSION_MAJOR
832target_alias
833host_alias
834build_alias
835LIBS
836ECHO_T
837ECHO_N
838ECHO_C
839DEFS
840mandir
841localedir
842libdir
843psdir
844pdfdir
845dvidir
846htmldir
847infodir
848docdir
849oldincludedir
850includedir
851runstatedir
852localstatedir
853sharedstatedir
854sysconfdir
855datadir
856datarootdir
857libexecdir
858sbindir
859bindir
860program_transform_name
861prefix
862exec_prefix
863PACKAGE_URL
864PACKAGE_BUGREPORT
865PACKAGE_STRING
866PACKAGE_VERSION
867PACKAGE_TARNAME
868PACKAGE_NAME
869PATH_SEPARATOR
870SHELL'
871ac_subst_files=''
872ac_user_opts='
873enable_option_checking
874with_conf_file
875with_run_dir
876with_chroot_dir
877with_share_dir
878with_pidfile
879with_rootkey_file
880with_rootcert_file
881with_username
882enable_checking
883enable_debug
884enable_flto
885enable_pie
886enable_relro_now
887enable_shared
888enable_static
889enable_pic
890with_pic
891enable_fast_install
892enable_aix_soname
893with_aix_soname
894with_gnu_ld
895with_sysroot
896enable_libtool_lock
897enable_rpath
898enable_largefile
899enable_systemd
900enable_alloc_checks
901enable_alloc_lite
902enable_alloc_nonregional
903with_pthreads
904with_solaris_threads
905with_syslog_facility
906with_dynlibmodule
907with_pyunbound
908with_pythonmodule
909enable_swig_version_check
910with_nss
911with_nettle
912with_ssl
913with_libbsd
914enable_sha1
915enable_sha2
916enable_subnet
917enable_gost
918enable_ecdsa
919enable_dsa
920with_deprecate_rsa_1024
921enable_ed25519
922enable_ed448
923enable_event_api
924enable_tfo_client
925enable_tfo_server
926with_libevent
927with_libexpat
928with_libhiredis
929with_libnghttp2
930with_libngtcp2
931enable_static_exe
932enable_fully_static
933enable_lock_checks
934enable_allsymbols
935enable_dnstap
936with_dnstap_socket_path
937with_protobuf_c
938enable_dnscrypt
939with_libsodium
940enable_cachedb
941enable_ipsecmod
942enable_ipset
943with_libmnl
944enable_explicit_port_randomisation
945enable_linux_ip_local_port_range
946with_libunbound_only
947'
948      ac_precious_vars='build_alias
949host_alias
950target_alias
951CC
952CFLAGS
953LDFLAGS
954LIBS
955CPPFLAGS
956YACC
957YFLAGS
958LT_SYS_LIBRARY_PATH
959PKG_CONFIG
960PKG_CONFIG_PATH
961PKG_CONFIG_LIBDIR
962CPP
963SYSTEMD_CFLAGS
964SYSTEMD_LIBS
965SYSTEMD_DAEMON_CFLAGS
966SYSTEMD_DAEMON_LIBS
967PYTHON_VERSION
968SOURCE_DATE_EPOCH
969PROTOBUFC_CFLAGS
970PROTOBUFC_LIBS'
971
972
973# Initialize some variables set by options.
974ac_init_help=
975ac_init_version=false
976ac_unrecognized_opts=
977ac_unrecognized_sep=
978# The variables have the same names as the options, with
979# dashes changed to underlines.
980cache_file=/dev/null
981exec_prefix=NONE
982no_create=
983no_recursion=
984prefix=NONE
985program_prefix=NONE
986program_suffix=NONE
987program_transform_name=s,x,x,
988silent=
989site=
990srcdir=
991verbose=
992x_includes=NONE
993x_libraries=NONE
994
995# Installation directory options.
996# These are left unexpanded so users can "make install exec_prefix=/foo"
997# and all the variables that are supposed to be based on exec_prefix
998# by default will actually change.
999# Use braces instead of parens because sh, perl, etc. also accept them.
1000# (The list follows the same order as the GNU Coding Standards.)
1001bindir='${exec_prefix}/bin'
1002sbindir='${exec_prefix}/sbin'
1003libexecdir='${exec_prefix}/libexec'
1004datarootdir='${prefix}/share'
1005datadir='${datarootdir}'
1006sysconfdir='${prefix}/etc'
1007sharedstatedir='${prefix}/com'
1008localstatedir='${prefix}/var'
1009runstatedir='${localstatedir}/run'
1010includedir='${prefix}/include'
1011oldincludedir='/usr/include'
1012docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1013infodir='${datarootdir}/info'
1014htmldir='${docdir}'
1015dvidir='${docdir}'
1016pdfdir='${docdir}'
1017psdir='${docdir}'
1018libdir='${exec_prefix}/lib'
1019localedir='${datarootdir}/locale'
1020mandir='${datarootdir}/man'
1021
1022ac_prev=
1023ac_dashdash=
1024for ac_option
1025do
1026  # If the previous option needs an argument, assign it.
1027  if test -n "$ac_prev"; then
1028    eval $ac_prev=\$ac_option
1029    ac_prev=
1030    continue
1031  fi
1032
1033  case $ac_option in
1034  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1035  *=)   ac_optarg= ;;
1036  *)    ac_optarg=yes ;;
1037  esac
1038
1039  case $ac_dashdash$ac_option in
1040  --)
1041    ac_dashdash=yes ;;
1042
1043  -bindir | --bindir | --bindi | --bind | --bin | --bi)
1044    ac_prev=bindir ;;
1045  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1046    bindir=$ac_optarg ;;
1047
1048  -build | --build | --buil | --bui | --bu)
1049    ac_prev=build_alias ;;
1050  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1051    build_alias=$ac_optarg ;;
1052
1053  -cache-file | --cache-file | --cache-fil | --cache-fi \
1054  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1055    ac_prev=cache_file ;;
1056  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1057  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1058    cache_file=$ac_optarg ;;
1059
1060  --config-cache | -C)
1061    cache_file=config.cache ;;
1062
1063  -datadir | --datadir | --datadi | --datad)
1064    ac_prev=datadir ;;
1065  -datadir=* | --datadir=* | --datadi=* | --datad=*)
1066    datadir=$ac_optarg ;;
1067
1068  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1069  | --dataroo | --dataro | --datar)
1070    ac_prev=datarootdir ;;
1071  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1072  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1073    datarootdir=$ac_optarg ;;
1074
1075  -disable-* | --disable-*)
1076    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1077    # Reject names that are not valid shell variable names.
1078    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1079      as_fn_error $? "invalid feature name: \`$ac_useropt'"
1080    ac_useropt_orig=$ac_useropt
1081    ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
1082    case $ac_user_opts in
1083      *"
1084"enable_$ac_useropt"
1085"*) ;;
1086      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1087	 ac_unrecognized_sep=', ';;
1088    esac
1089    eval enable_$ac_useropt=no ;;
1090
1091  -docdir | --docdir | --docdi | --doc | --do)
1092    ac_prev=docdir ;;
1093  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1094    docdir=$ac_optarg ;;
1095
1096  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1097    ac_prev=dvidir ;;
1098  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1099    dvidir=$ac_optarg ;;
1100
1101  -enable-* | --enable-*)
1102    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1103    # Reject names that are not valid shell variable names.
1104    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1105      as_fn_error $? "invalid feature name: \`$ac_useropt'"
1106    ac_useropt_orig=$ac_useropt
1107    ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
1108    case $ac_user_opts in
1109      *"
1110"enable_$ac_useropt"
1111"*) ;;
1112      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1113	 ac_unrecognized_sep=', ';;
1114    esac
1115    eval enable_$ac_useropt=\$ac_optarg ;;
1116
1117  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1118  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1119  | --exec | --exe | --ex)
1120    ac_prev=exec_prefix ;;
1121  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1122  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1123  | --exec=* | --exe=* | --ex=*)
1124    exec_prefix=$ac_optarg ;;
1125
1126  -gas | --gas | --ga | --g)
1127    # Obsolete; use --with-gas.
1128    with_gas=yes ;;
1129
1130  -help | --help | --hel | --he | -h)
1131    ac_init_help=long ;;
1132  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1133    ac_init_help=recursive ;;
1134  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1135    ac_init_help=short ;;
1136
1137  -host | --host | --hos | --ho)
1138    ac_prev=host_alias ;;
1139  -host=* | --host=* | --hos=* | --ho=*)
1140    host_alias=$ac_optarg ;;
1141
1142  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1143    ac_prev=htmldir ;;
1144  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1145  | --ht=*)
1146    htmldir=$ac_optarg ;;
1147
1148  -includedir | --includedir | --includedi | --included | --include \
1149  | --includ | --inclu | --incl | --inc)
1150    ac_prev=includedir ;;
1151  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1152  | --includ=* | --inclu=* | --incl=* | --inc=*)
1153    includedir=$ac_optarg ;;
1154
1155  -infodir | --infodir | --infodi | --infod | --info | --inf)
1156    ac_prev=infodir ;;
1157  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1158    infodir=$ac_optarg ;;
1159
1160  -libdir | --libdir | --libdi | --libd)
1161    ac_prev=libdir ;;
1162  -libdir=* | --libdir=* | --libdi=* | --libd=*)
1163    libdir=$ac_optarg ;;
1164
1165  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1166  | --libexe | --libex | --libe)
1167    ac_prev=libexecdir ;;
1168  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1169  | --libexe=* | --libex=* | --libe=*)
1170    libexecdir=$ac_optarg ;;
1171
1172  -localedir | --localedir | --localedi | --localed | --locale)
1173    ac_prev=localedir ;;
1174  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1175    localedir=$ac_optarg ;;
1176
1177  -localstatedir | --localstatedir | --localstatedi | --localstated \
1178  | --localstate | --localstat | --localsta | --localst | --locals)
1179    ac_prev=localstatedir ;;
1180  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1181  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1182    localstatedir=$ac_optarg ;;
1183
1184  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1185    ac_prev=mandir ;;
1186  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1187    mandir=$ac_optarg ;;
1188
1189  -nfp | --nfp | --nf)
1190    # Obsolete; use --without-fp.
1191    with_fp=no ;;
1192
1193  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1194  | --no-cr | --no-c | -n)
1195    no_create=yes ;;
1196
1197  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1198  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1199    no_recursion=yes ;;
1200
1201  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1202  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1203  | --oldin | --oldi | --old | --ol | --o)
1204    ac_prev=oldincludedir ;;
1205  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1206  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1207  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1208    oldincludedir=$ac_optarg ;;
1209
1210  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1211    ac_prev=prefix ;;
1212  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1213    prefix=$ac_optarg ;;
1214
1215  -program-prefix | --program-prefix | --program-prefi | --program-pref \
1216  | --program-pre | --program-pr | --program-p)
1217    ac_prev=program_prefix ;;
1218  -program-prefix=* | --program-prefix=* | --program-prefi=* \
1219  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1220    program_prefix=$ac_optarg ;;
1221
1222  -program-suffix | --program-suffix | --program-suffi | --program-suff \
1223  | --program-suf | --program-su | --program-s)
1224    ac_prev=program_suffix ;;
1225  -program-suffix=* | --program-suffix=* | --program-suffi=* \
1226  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1227    program_suffix=$ac_optarg ;;
1228
1229  -program-transform-name | --program-transform-name \
1230  | --program-transform-nam | --program-transform-na \
1231  | --program-transform-n | --program-transform- \
1232  | --program-transform | --program-transfor \
1233  | --program-transfo | --program-transf \
1234  | --program-trans | --program-tran \
1235  | --progr-tra | --program-tr | --program-t)
1236    ac_prev=program_transform_name ;;
1237  -program-transform-name=* | --program-transform-name=* \
1238  | --program-transform-nam=* | --program-transform-na=* \
1239  | --program-transform-n=* | --program-transform-=* \
1240  | --program-transform=* | --program-transfor=* \
1241  | --program-transfo=* | --program-transf=* \
1242  | --program-trans=* | --program-tran=* \
1243  | --progr-tra=* | --program-tr=* | --program-t=*)
1244    program_transform_name=$ac_optarg ;;
1245
1246  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1247    ac_prev=pdfdir ;;
1248  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1249    pdfdir=$ac_optarg ;;
1250
1251  -psdir | --psdir | --psdi | --psd | --ps)
1252    ac_prev=psdir ;;
1253  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1254    psdir=$ac_optarg ;;
1255
1256  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1257  | -silent | --silent | --silen | --sile | --sil)
1258    silent=yes ;;
1259
1260  -runstatedir | --runstatedir | --runstatedi | --runstated \
1261  | --runstate | --runstat | --runsta | --runst | --runs \
1262  | --run | --ru | --r)
1263    ac_prev=runstatedir ;;
1264  -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
1265  | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
1266  | --run=* | --ru=* | --r=*)
1267    runstatedir=$ac_optarg ;;
1268
1269  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1270    ac_prev=sbindir ;;
1271  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1272  | --sbi=* | --sb=*)
1273    sbindir=$ac_optarg ;;
1274
1275  -sharedstatedir | --sharedstatedir | --sharedstatedi \
1276  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1277  | --sharedst | --shareds | --shared | --share | --shar \
1278  | --sha | --sh)
1279    ac_prev=sharedstatedir ;;
1280  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1281  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1282  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1283  | --sha=* | --sh=*)
1284    sharedstatedir=$ac_optarg ;;
1285
1286  -site | --site | --sit)
1287    ac_prev=site ;;
1288  -site=* | --site=* | --sit=*)
1289    site=$ac_optarg ;;
1290
1291  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1292    ac_prev=srcdir ;;
1293  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1294    srcdir=$ac_optarg ;;
1295
1296  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1297  | --syscon | --sysco | --sysc | --sys | --sy)
1298    ac_prev=sysconfdir ;;
1299  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1300  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1301    sysconfdir=$ac_optarg ;;
1302
1303  -target | --target | --targe | --targ | --tar | --ta | --t)
1304    ac_prev=target_alias ;;
1305  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1306    target_alias=$ac_optarg ;;
1307
1308  -v | -verbose | --verbose | --verbos | --verbo | --verb)
1309    verbose=yes ;;
1310
1311  -version | --version | --versio | --versi | --vers | -V)
1312    ac_init_version=: ;;
1313
1314  -with-* | --with-*)
1315    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1316    # Reject names that are not valid shell variable names.
1317    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1318      as_fn_error $? "invalid package name: \`$ac_useropt'"
1319    ac_useropt_orig=$ac_useropt
1320    ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
1321    case $ac_user_opts in
1322      *"
1323"with_$ac_useropt"
1324"*) ;;
1325      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1326	 ac_unrecognized_sep=', ';;
1327    esac
1328    eval with_$ac_useropt=\$ac_optarg ;;
1329
1330  -without-* | --without-*)
1331    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1332    # Reject names that are not valid shell variable names.
1333    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1334      as_fn_error $? "invalid package name: \`$ac_useropt'"
1335    ac_useropt_orig=$ac_useropt
1336    ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
1337    case $ac_user_opts in
1338      *"
1339"with_$ac_useropt"
1340"*) ;;
1341      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1342	 ac_unrecognized_sep=', ';;
1343    esac
1344    eval with_$ac_useropt=no ;;
1345
1346  --x)
1347    # Obsolete; use --with-x.
1348    with_x=yes ;;
1349
1350  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1351  | --x-incl | --x-inc | --x-in | --x-i)
1352    ac_prev=x_includes ;;
1353  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1354  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1355    x_includes=$ac_optarg ;;
1356
1357  -x-libraries | --x-libraries | --x-librarie | --x-librari \
1358  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1359    ac_prev=x_libraries ;;
1360  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1361  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1362    x_libraries=$ac_optarg ;;
1363
1364  -*) as_fn_error $? "unrecognized option: \`$ac_option'
1365Try \`$0 --help' for more information"
1366    ;;
1367
1368  *=*)
1369    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1370    # Reject names that are not valid shell variable names.
1371    case $ac_envvar in #(
1372      '' | [0-9]* | *[!_$as_cr_alnum]* )
1373      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1374    esac
1375    eval $ac_envvar=\$ac_optarg
1376    export $ac_envvar ;;
1377
1378  *)
1379    # FIXME: should be removed in autoconf 3.0.
1380    printf "%s\n" "$as_me: WARNING: you should use --build, --host, --target" >&2
1381    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1382      printf "%s\n" "$as_me: WARNING: invalid host type: $ac_option" >&2
1383    : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1384    ;;
1385
1386  esac
1387done
1388
1389if test -n "$ac_prev"; then
1390  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1391  as_fn_error $? "missing argument to $ac_option"
1392fi
1393
1394if test -n "$ac_unrecognized_opts"; then
1395  case $enable_option_checking in
1396    no) ;;
1397    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1398    *)     printf "%s\n" "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1399  esac
1400fi
1401
1402# Check all directory arguments for consistency.
1403for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
1404		datadir sysconfdir sharedstatedir localstatedir includedir \
1405		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1406		libdir localedir mandir runstatedir
1407do
1408  eval ac_val=\$$ac_var
1409  # Remove trailing slashes.
1410  case $ac_val in
1411    */ )
1412      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1413      eval $ac_var=\$ac_val;;
1414  esac
1415  # Be sure to have absolute directory names.
1416  case $ac_val in
1417    [\\/$]* | ?:[\\/]* )  continue;;
1418    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1419  esac
1420  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1421done
1422
1423# There might be people who depend on the old broken behavior: `$host'
1424# used to hold the argument of --host etc.
1425# FIXME: To remove some day.
1426build=$build_alias
1427host=$host_alias
1428target=$target_alias
1429
1430# FIXME: To remove some day.
1431if test "x$host_alias" != x; then
1432  if test "x$build_alias" = x; then
1433    cross_compiling=maybe
1434  elif test "x$build_alias" != "x$host_alias"; then
1435    cross_compiling=yes
1436  fi
1437fi
1438
1439ac_tool_prefix=
1440test -n "$host_alias" && ac_tool_prefix=$host_alias-
1441
1442test "$silent" = yes && exec 6>/dev/null
1443
1444
1445ac_pwd=`pwd` && test -n "$ac_pwd" &&
1446ac_ls_di=`ls -di .` &&
1447ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1448  as_fn_error $? "working directory cannot be determined"
1449test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1450  as_fn_error $? "pwd does not report name of working directory"
1451
1452
1453# Find the source files, if location was not specified.
1454if test -z "$srcdir"; then
1455  ac_srcdir_defaulted=yes
1456  # Try the directory containing this script, then the parent directory.
1457  ac_confdir=`$as_dirname -- "$as_myself" ||
1458$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1459	 X"$as_myself" : 'X\(//\)[^/]' \| \
1460	 X"$as_myself" : 'X\(//\)$' \| \
1461	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1462printf "%s\n" X"$as_myself" |
1463    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1464	    s//\1/
1465	    q
1466	  }
1467	  /^X\(\/\/\)[^/].*/{
1468	    s//\1/
1469	    q
1470	  }
1471	  /^X\(\/\/\)$/{
1472	    s//\1/
1473	    q
1474	  }
1475	  /^X\(\/\).*/{
1476	    s//\1/
1477	    q
1478	  }
1479	  s/.*/./; q'`
1480  srcdir=$ac_confdir
1481  if test ! -r "$srcdir/$ac_unique_file"; then
1482    srcdir=..
1483  fi
1484else
1485  ac_srcdir_defaulted=no
1486fi
1487if test ! -r "$srcdir/$ac_unique_file"; then
1488  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1489  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1490fi
1491ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1492ac_abs_confdir=`(
1493	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1494	pwd)`
1495# When building in place, set srcdir=.
1496if test "$ac_abs_confdir" = "$ac_pwd"; then
1497  srcdir=.
1498fi
1499# Remove unnecessary trailing slashes from srcdir.
1500# Double slashes in file names in object file debugging info
1501# mess up M-x gdb in Emacs.
1502case $srcdir in
1503*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1504esac
1505for ac_var in $ac_precious_vars; do
1506  eval ac_env_${ac_var}_set=\${${ac_var}+set}
1507  eval ac_env_${ac_var}_value=\$${ac_var}
1508  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1509  eval ac_cv_env_${ac_var}_value=\$${ac_var}
1510done
1511
1512#
1513# Report the --help message.
1514#
1515if test "$ac_init_help" = "long"; then
1516  # Omit some internal or obsolete options to make the list less imposing.
1517  # This message is too long to be a string in the A/UX 3.1 sh.
1518  cat <<_ACEOF
1519\`configure' configures unbound 1.24.1 to adapt to many kinds of systems.
1520
1521Usage: $0 [OPTION]... [VAR=VALUE]...
1522
1523To assign environment variables (e.g., CC, CFLAGS...), specify them as
1524VAR=VALUE.  See below for descriptions of some of the useful variables.
1525
1526Defaults for the options are specified in brackets.
1527
1528Configuration:
1529  -h, --help              display this help and exit
1530      --help=short        display options specific to this package
1531      --help=recursive    display the short help of all the included packages
1532  -V, --version           display version information and exit
1533  -q, --quiet, --silent   do not print \`checking ...' messages
1534      --cache-file=FILE   cache test results in FILE [disabled]
1535  -C, --config-cache      alias for \`--cache-file=config.cache'
1536  -n, --no-create         do not create output files
1537      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1538
1539Installation directories:
1540  --prefix=PREFIX         install architecture-independent files in PREFIX
1541                          [$ac_default_prefix]
1542  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1543                          [PREFIX]
1544
1545By default, \`make install' will install all the files in
1546\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1547an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1548for instance \`--prefix=\$HOME'.
1549
1550For better control, use the options below.
1551
1552Fine tuning of the installation directories:
1553  --bindir=DIR            user executables [EPREFIX/bin]
1554  --sbindir=DIR           system admin executables [EPREFIX/sbin]
1555  --libexecdir=DIR        program executables [EPREFIX/libexec]
1556  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1557  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1558  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1559  --runstatedir=DIR       modifiable per-process data [LOCALSTATEDIR/run]
1560  --libdir=DIR            object code libraries [EPREFIX/lib]
1561  --includedir=DIR        C header files [PREFIX/include]
1562  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1563  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1564  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1565  --infodir=DIR           info documentation [DATAROOTDIR/info]
1566  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1567  --mandir=DIR            man documentation [DATAROOTDIR/man]
1568  --docdir=DIR            documentation root [DATAROOTDIR/doc/unbound]
1569  --htmldir=DIR           html documentation [DOCDIR]
1570  --dvidir=DIR            dvi documentation [DOCDIR]
1571  --pdfdir=DIR            pdf documentation [DOCDIR]
1572  --psdir=DIR             ps documentation [DOCDIR]
1573_ACEOF
1574
1575  cat <<\_ACEOF
1576
1577System types:
1578  --build=BUILD     configure for building on BUILD [guessed]
1579  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1580_ACEOF
1581fi
1582
1583if test -n "$ac_init_help"; then
1584  case $ac_init_help in
1585     short | recursive ) echo "Configuration of unbound 1.24.1:";;
1586   esac
1587  cat <<\_ACEOF
1588
1589Optional Features:
1590  --disable-option-checking  ignore unrecognized --enable/--with options
1591  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1592  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1593  --enable-checking       Enable warnings, asserts, makefile-dependencies
1594  --enable-debug          same as enable-checking
1595  --disable-flto          Disable link-time optimization (gcc specific option)
1596  --enable-pie            Enable Position-Independent Executable (eg. to fully
1597                          benefit from ASLR, small performance penalty)
1598  --enable-relro-now      Enable full relocation binding at load-time (RELRO
1599                          NOW, to protect GOT and .dtor areas)
1600  --enable-shared[=PKGS]  build shared libraries [default=yes]
1601  --enable-static[=PKGS]  build static libraries [default=yes]
1602  --enable-pic[=PKGS]     try to use only PIC/non-PIC objects [default=use
1603                          both]
1604  --enable-fast-install[=PKGS]
1605                          optimize for fast installation [default=yes]
1606  --enable-aix-soname=aix|svr4|both
1607                          shared library versioning (aka "SONAME") variant to
1608                          provide on AIX, [default=aix].
1609  --disable-libtool-lock  avoid locking (might break parallel builds)
1610  --disable-rpath         disable hardcoded rpath (default=enabled)
1611  --disable-largefile     omit support for large files
1612  --enable-systemd        compile with systemd support (requires libsystemd,
1613                          pkg-config)
1614  --enable-alloc-checks   enable to memory allocation statistics, for debug
1615                          purposes
1616  --enable-alloc-lite     enable for lightweight alloc assertions, for debug
1617                          purposes
1618  --enable-alloc-nonregional
1619                          enable nonregional allocs, slow but exposes regional
1620                          allocations to other memory purifiers, for debug
1621                          purposes
1622  --disable-swig-version-check
1623                          Disable swig version check to build python modules
1624                          with older swig even though that is unreliable
1625  --disable-sha1          Disable SHA1 RRSIG support, does not disable nsec3
1626                          support
1627  --disable-sha2          Disable SHA256 and SHA512 RRSIG support
1628  --enable-subnet         Enable client subnet
1629  --disable-gost          Disable GOST support
1630  --disable-ecdsa         Disable ECDSA support
1631  --disable-dsa           Disable DSA support
1632  --disable-ed25519       Disable ED25519 support
1633  --disable-ed448         Disable ED448 support
1634  --enable-event-api      Enable (experimental) pluggable event base
1635                          libunbound API installed to unbound-event.h
1636  --enable-tfo-client     Enable TCP Fast Open for client mode
1637  --enable-tfo-server     Enable TCP Fast Open for server mode
1638  --enable-static-exe     enable to compile executables statically against
1639                          (event) uninstalled libs, for debug purposes
1640  --enable-fully-static   enable to compile fully static
1641  --enable-lock-checks    enable to check lock and unlock calls, for debug
1642                          purposes
1643  --enable-allsymbols     export all symbols from libunbound and link binaries
1644                          to it, smaller install size but libunbound export
1645                          table is polluted by internal symbols
1646  --enable-dnstap         Enable dnstap support (requires protobuf-c)
1647  --enable-dnscrypt       Enable dnscrypt support (requires libsodium)
1648  --enable-cachedb        enable cachedb module that can use external cache
1649                          storage
1650  --enable-ipsecmod       Enable ipsecmod module that facilitates
1651                          opportunistic IPsec
1652  --enable-ipset          enable ipset module
1653  --disable-explicit-port-randomisation
1654                          disable explicit source port randomisation and rely
1655                          on the kernel to provide random source ports
1656  --enable-linux-ip-local-port-range
1657                          Define this to enable use of
1658                          /proc/sys/net/ipv4/ip_local_port_range as a default
1659                          outgoing port range. This is only for the libunbound
1660                          on Linux and does not affect unbound resolving
1661                          daemon itself. This may severely limit the number of
1662                          available outgoing ports and thus decrease
1663                          randomness. Define this only when the target system
1664                          restricts (e.g. some of SELinux enabled
1665                          distributions) the use of non-ephemeral ports.
1666
1667Optional Packages:
1668  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1669  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1670  --with-conf-file=path   Pathname to the Unbound configuration file
1671  --with-run-dir=path     set default directory to chdir to (by default dir
1672                          part of cfg file)
1673  --with-chroot-dir=path  set default directory to chroot to (by default same
1674                          as run-dir)
1675  --with-share-dir=path   set default directory with shared data (by default
1676                          same as share/unbound)
1677  --with-pidfile=filename set default pathname to unbound pidfile (default
1678                          run-dir/unbound.pid)
1679  --with-rootkey-file=filename
1680                          set default pathname to root key file (default
1681                          run-dir/root.key). This file is read and written.
1682  --with-rootcert-file=filename
1683                          set default pathname to root update certificate file
1684                          (default run-dir/icannbundle.pem). This file need
1685                          not exist if you are content with the builtin.
1686  --with-username=user    set default user that unbound changes to (default
1687                          user is unbound)
1688  --with-gnu-ld           assume the C compiler uses GNU ld [default=no]
1689  --with-sysroot[=DIR]    Search for dependent libraries within DIR (or the
1690                          compiler's sysroot if not specified).
1691  --with-pthreads         use pthreads library, or --without-pthreads to
1692                          disable threading support.
1693  --with-solaris-threads  use solaris native thread library.
1694  --with-syslog-facility=LOCAL0 - LOCAL7
1695                          set SYSLOG_FACILITY, default DAEMON
1696  --with-dynlibmodule     build dynamic library module, or
1697                          --without-dynlibmodule to disable it. (default=no)
1698  --with-pyunbound        build PyUnbound, or --without-pyunbound to skip it.
1699                          (default=no)
1700  --with-pythonmodule     build Python module, or --without-pythonmodule to
1701                          disable script engine. (default=no)
1702  --with-nss=path         use libnss instead of openssl, installed at path.
1703  --with-nettle=path      use libnettle as crypto library, installed at path.
1704  --with-ssl=pathname     enable SSL (will check /usr/local/ssl /usr/lib/ssl
1705                          /usr/ssl /usr/pkg /usr/local /opt/local /usr/sfw
1706                          /usr or specify like /usr/include/openssl11)
1707  --with-libbsd           Use portable libbsd functions
1708  --with-deprecate-rsa-1024
1709                          Deprecate RSA 1024 bit length, makes that an
1710                          unsupported key, for use when OpenSSL FIPS refuses
1711                          1024 bit verification
1712  --with-libevent=pathname
1713                          use libevent (will check /usr/local /opt/local
1714                          /usr/lib /usr/pkg /usr/sfw /usr or you can specify
1715                          an explicit path). Slower, but allows use of large
1716                          outgoing port ranges.
1717  --with-libexpat=path    specify explicit path for libexpat.
1718  --with-libhiredis=path  specify explicit path for libhiredis.
1719  --with-libnghttp2=path  specify explicit path for libnghttp2.
1720  --with-libngtcp2=path   specify explicit path for libngtcp2, for QUIC.
1721  --with-dnstap-socket-path=pathname
1722                          set default dnstap socket path
1723  --with-protobuf-c=path  Path where protobuf-c is installed, for dnstap
1724  --with-libsodium=path   Path where libsodium is installed, for dnscrypt
1725  --with-libmnl=path      specify explicit path for libmnl.
1726  --with-libunbound-only  do not build daemon and tool programs
1727
1728Some influential environment variables:
1729  CC          C compiler command
1730  CFLAGS      C compiler flags
1731  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
1732              nonstandard directory <lib dir>
1733  LIBS        libraries to pass to the linker, e.g. -l<library>
1734  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1735              you have headers in a nonstandard directory <include dir>
1736  YACC        The `Yet Another Compiler Compiler' implementation to use.
1737              Defaults to the first program found out of: `bison -y', `byacc',
1738              `yacc'.
1739  YFLAGS      The list of arguments that will be passed by default to $YACC.
1740              This script will default YFLAGS to the empty string to avoid a
1741              default value of `-d' given by some make applications.
1742  LT_SYS_LIBRARY_PATH
1743              User-defined run-time library search path.
1744  PKG_CONFIG  path to pkg-config utility
1745  PKG_CONFIG_PATH
1746              directories to add to pkg-config's search path
1747  PKG_CONFIG_LIBDIR
1748              path overriding pkg-config's built-in search path
1749  CPP         C preprocessor
1750  SYSTEMD_CFLAGS
1751              C compiler flags for SYSTEMD, overriding pkg-config
1752  SYSTEMD_LIBS
1753              linker flags for SYSTEMD, overriding pkg-config
1754  SYSTEMD_DAEMON_CFLAGS
1755              C compiler flags for SYSTEMD_DAEMON, overriding pkg-config
1756  SYSTEMD_DAEMON_LIBS
1757              linker flags for SYSTEMD_DAEMON, overriding pkg-config
1758  PYTHON_VERSION
1759              The installed Python version to use, for example '2.3'. This
1760              string will be appended to the Python interpreter canonical
1761              name.
1762  SOURCE_DATE_EPOCH
1763              If it is set, it uses the value of that variable instead of the
1764              current time as the build timestamp. The format is a unix
1765              timestamp. This enables reproducible build output.
1766  PROTOBUFC_CFLAGS
1767              C compiler flags for PROTOBUFC, overriding pkg-config
1768  PROTOBUFC_LIBS
1769              linker flags for PROTOBUFC, overriding pkg-config
1770
1771Use these variables to override the choices made by `configure' or to help
1772it to find libraries and programs with nonstandard names/locations.
1773
1774Report bugs to <unbound-bugs@nlnetlabs.nl or https://github.com/NLnetLabs/unbound/issues>.
1775_ACEOF
1776ac_status=$?
1777fi
1778
1779if test "$ac_init_help" = "recursive"; then
1780  # If there are subdirs, report their specific --help.
1781  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1782    test -d "$ac_dir" ||
1783      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1784      continue
1785    ac_builddir=.
1786
1787case "$ac_dir" in
1788.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1789*)
1790  ac_dir_suffix=/`printf "%s\n" "$ac_dir" | sed 's|^\.[\\/]||'`
1791  # A ".." for each directory in $ac_dir_suffix.
1792  ac_top_builddir_sub=`printf "%s\n" "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1793  case $ac_top_builddir_sub in
1794  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1795  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1796  esac ;;
1797esac
1798ac_abs_top_builddir=$ac_pwd
1799ac_abs_builddir=$ac_pwd$ac_dir_suffix
1800# for backward compatibility:
1801ac_top_builddir=$ac_top_build_prefix
1802
1803case $srcdir in
1804  .)  # We are building in place.
1805    ac_srcdir=.
1806    ac_top_srcdir=$ac_top_builddir_sub
1807    ac_abs_top_srcdir=$ac_pwd ;;
1808  [\\/]* | ?:[\\/]* )  # Absolute name.
1809    ac_srcdir=$srcdir$ac_dir_suffix;
1810    ac_top_srcdir=$srcdir
1811    ac_abs_top_srcdir=$srcdir ;;
1812  *) # Relative name.
1813    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1814    ac_top_srcdir=$ac_top_build_prefix$srcdir
1815    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1816esac
1817ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1818
1819    cd "$ac_dir" || { ac_status=$?; continue; }
1820    # Check for configure.gnu first; this name is used for a wrapper for
1821    # Metaconfig's "Configure" on case-insensitive file systems.
1822    if test -f "$ac_srcdir/configure.gnu"; then
1823      echo &&
1824      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1825    elif test -f "$ac_srcdir/configure"; then
1826      echo &&
1827      $SHELL "$ac_srcdir/configure" --help=recursive
1828    else
1829      printf "%s\n" "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1830    fi || ac_status=$?
1831    cd "$ac_pwd" || { ac_status=$?; break; }
1832  done
1833fi
1834
1835test -n "$ac_init_help" && exit $ac_status
1836if $ac_init_version; then
1837  cat <<\_ACEOF
1838unbound configure 1.24.1
1839generated by GNU Autoconf 2.71
1840
1841Copyright (C) 2021 Free Software Foundation, Inc.
1842This configure script is free software; the Free Software Foundation
1843gives unlimited permission to copy, distribute and modify it.
1844_ACEOF
1845  exit
1846fi
1847
1848## ------------------------ ##
1849## Autoconf initialization. ##
1850## ------------------------ ##
1851
1852# ac_fn_c_try_compile LINENO
1853# --------------------------
1854# Try to compile conftest.$ac_ext, and return whether this succeeded.
1855ac_fn_c_try_compile ()
1856{
1857  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1858  rm -f conftest.$ac_objext conftest.beam
1859  if { { ac_try="$ac_compile"
1860case "(($ac_try" in
1861  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1862  *) ac_try_echo=$ac_try;;
1863esac
1864eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1865printf "%s\n" "$ac_try_echo"; } >&5
1866  (eval "$ac_compile") 2>conftest.err
1867  ac_status=$?
1868  if test -s conftest.err; then
1869    grep -v '^ *+' conftest.err >conftest.er1
1870    cat conftest.er1 >&5
1871    mv -f conftest.er1 conftest.err
1872  fi
1873  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1874  test $ac_status = 0; } && {
1875	 test -z "$ac_c_werror_flag" ||
1876	 test ! -s conftest.err
1877       } && test -s conftest.$ac_objext
1878then :
1879  ac_retval=0
1880else $as_nop
1881  printf "%s\n" "$as_me: failed program was:" >&5
1882sed 's/^/| /' conftest.$ac_ext >&5
1883
1884	ac_retval=1
1885fi
1886  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1887  as_fn_set_status $ac_retval
1888
1889} # ac_fn_c_try_compile
1890
1891# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1892# -------------------------------------------------------
1893# Tests whether HEADER exists and can be compiled using the include files in
1894# INCLUDES, setting the cache variable VAR accordingly.
1895ac_fn_c_check_header_compile ()
1896{
1897  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1898  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1899printf %s "checking for $2... " >&6; }
1900if eval test \${$3+y}
1901then :
1902  printf %s "(cached) " >&6
1903else $as_nop
1904  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1905/* end confdefs.h.  */
1906$4
1907#include <$2>
1908_ACEOF
1909if ac_fn_c_try_compile "$LINENO"
1910then :
1911  eval "$3=yes"
1912else $as_nop
1913  eval "$3=no"
1914fi
1915rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
1916fi
1917eval ac_res=\$$3
1918	       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1919printf "%s\n" "$ac_res" >&6; }
1920  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1921
1922} # ac_fn_c_check_header_compile
1923
1924# ac_fn_c_try_link LINENO
1925# -----------------------
1926# Try to link conftest.$ac_ext, and return whether this succeeded.
1927ac_fn_c_try_link ()
1928{
1929  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1930  rm -f conftest.$ac_objext conftest.beam conftest$ac_exeext
1931  if { { ac_try="$ac_link"
1932case "(($ac_try" in
1933  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1934  *) ac_try_echo=$ac_try;;
1935esac
1936eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1937printf "%s\n" "$ac_try_echo"; } >&5
1938  (eval "$ac_link") 2>conftest.err
1939  ac_status=$?
1940  if test -s conftest.err; then
1941    grep -v '^ *+' conftest.err >conftest.er1
1942    cat conftest.er1 >&5
1943    mv -f conftest.er1 conftest.err
1944  fi
1945  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1946  test $ac_status = 0; } && {
1947	 test -z "$ac_c_werror_flag" ||
1948	 test ! -s conftest.err
1949       } && test -s conftest$ac_exeext && {
1950	 test "$cross_compiling" = yes ||
1951	 test -x conftest$ac_exeext
1952       }
1953then :
1954  ac_retval=0
1955else $as_nop
1956  printf "%s\n" "$as_me: failed program was:" >&5
1957sed 's/^/| /' conftest.$ac_ext >&5
1958
1959	ac_retval=1
1960fi
1961  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1962  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1963  # interfere with the next link command; also delete a directory that is
1964  # left behind by Apple's compiler.  We do this before executing the actions.
1965  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1966  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1967  as_fn_set_status $ac_retval
1968
1969} # ac_fn_c_try_link
1970
1971# ac_fn_c_check_func LINENO FUNC VAR
1972# ----------------------------------
1973# Tests whether FUNC exists, setting the cache variable VAR accordingly
1974ac_fn_c_check_func ()
1975{
1976  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1977  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1978printf %s "checking for $2... " >&6; }
1979if eval test \${$3+y}
1980then :
1981  printf %s "(cached) " >&6
1982else $as_nop
1983  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1984/* end confdefs.h.  */
1985/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
1986   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
1987#define $2 innocuous_$2
1988
1989/* System header to define __stub macros and hopefully few prototypes,
1990   which can conflict with char $2 (); below.  */
1991
1992#include <limits.h>
1993#undef $2
1994
1995/* Override any GCC internal prototype to avoid an error.
1996   Use char because int might match the return type of a GCC
1997   builtin and then its argument prototype would still apply.  */
1998#ifdef __cplusplus
1999extern "C"
2000#endif
2001char $2 ();
2002/* The GNU C library defines this for functions which it implements
2003    to always fail with ENOSYS.  Some functions are actually named
2004    something starting with __ and the normal name is an alias.  */
2005#if defined __stub_$2 || defined __stub___$2
2006choke me
2007#endif
2008
2009int
2010main (void)
2011{
2012return $2 ();
2013  ;
2014  return 0;
2015}
2016_ACEOF
2017if ac_fn_c_try_link "$LINENO"
2018then :
2019  eval "$3=yes"
2020else $as_nop
2021  eval "$3=no"
2022fi
2023rm -f core conftest.err conftest.$ac_objext conftest.beam \
2024    conftest$ac_exeext conftest.$ac_ext
2025fi
2026eval ac_res=\$$3
2027	       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2028printf "%s\n" "$ac_res" >&6; }
2029  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2030
2031} # ac_fn_c_check_func
2032
2033# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2034# -------------------------------------------
2035# Tests whether TYPE exists after having included INCLUDES, setting cache
2036# variable VAR accordingly.
2037ac_fn_c_check_type ()
2038{
2039  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2040  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2041printf %s "checking for $2... " >&6; }
2042if eval test \${$3+y}
2043then :
2044  printf %s "(cached) " >&6
2045else $as_nop
2046  eval "$3=no"
2047  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2048/* end confdefs.h.  */
2049$4
2050int
2051main (void)
2052{
2053if (sizeof ($2))
2054	 return 0;
2055  ;
2056  return 0;
2057}
2058_ACEOF
2059if ac_fn_c_try_compile "$LINENO"
2060then :
2061  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2062/* end confdefs.h.  */
2063$4
2064int
2065main (void)
2066{
2067if (sizeof (($2)))
2068	    return 0;
2069  ;
2070  return 0;
2071}
2072_ACEOF
2073if ac_fn_c_try_compile "$LINENO"
2074then :
2075
2076else $as_nop
2077  eval "$3=yes"
2078fi
2079rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
2080fi
2081rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
2082fi
2083eval ac_res=\$$3
2084	       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2085printf "%s\n" "$ac_res" >&6; }
2086  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2087
2088} # ac_fn_c_check_type
2089
2090# ac_fn_c_try_cpp LINENO
2091# ----------------------
2092# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2093ac_fn_c_try_cpp ()
2094{
2095  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2096  if { { ac_try="$ac_cpp conftest.$ac_ext"
2097case "(($ac_try" in
2098  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2099  *) ac_try_echo=$ac_try;;
2100esac
2101eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2102printf "%s\n" "$ac_try_echo"; } >&5
2103  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2104  ac_status=$?
2105  if test -s conftest.err; then
2106    grep -v '^ *+' conftest.err >conftest.er1
2107    cat conftest.er1 >&5
2108    mv -f conftest.er1 conftest.err
2109  fi
2110  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2111  test $ac_status = 0; } > conftest.i && {
2112	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2113	 test ! -s conftest.err
2114       }
2115then :
2116  ac_retval=0
2117else $as_nop
2118  printf "%s\n" "$as_me: failed program was:" >&5
2119sed 's/^/| /' conftest.$ac_ext >&5
2120
2121    ac_retval=1
2122fi
2123  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2124  as_fn_set_status $ac_retval
2125
2126} # ac_fn_c_try_cpp
2127
2128# ac_fn_c_try_run LINENO
2129# ----------------------
2130# Try to run conftest.$ac_ext, and return whether this succeeded. Assumes that
2131# executables *can* be run.
2132ac_fn_c_try_run ()
2133{
2134  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2135  if { { ac_try="$ac_link"
2136case "(($ac_try" in
2137  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2138  *) ac_try_echo=$ac_try;;
2139esac
2140eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2141printf "%s\n" "$ac_try_echo"; } >&5
2142  (eval "$ac_link") 2>&5
2143  ac_status=$?
2144  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2145  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2146  { { case "(($ac_try" in
2147  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2148  *) ac_try_echo=$ac_try;;
2149esac
2150eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2151printf "%s\n" "$ac_try_echo"; } >&5
2152  (eval "$ac_try") 2>&5
2153  ac_status=$?
2154  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2155  test $ac_status = 0; }; }
2156then :
2157  ac_retval=0
2158else $as_nop
2159  printf "%s\n" "$as_me: program exited with status $ac_status" >&5
2160       printf "%s\n" "$as_me: failed program was:" >&5
2161sed 's/^/| /' conftest.$ac_ext >&5
2162
2163       ac_retval=$ac_status
2164fi
2165  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2166  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2167  as_fn_set_status $ac_retval
2168
2169} # ac_fn_c_try_run
2170
2171# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2172# --------------------------------------------
2173# Tries to find the compile-time value of EXPR in a program that includes
2174# INCLUDES, setting VAR accordingly. Returns whether the value could be
2175# computed
2176ac_fn_c_compute_int ()
2177{
2178  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2179  if test "$cross_compiling" = yes; then
2180    # Depending upon the size, compute the lo and hi bounds.
2181cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2182/* end confdefs.h.  */
2183$4
2184int
2185main (void)
2186{
2187static int test_array [1 - 2 * !(($2) >= 0)];
2188test_array [0] = 0;
2189return test_array [0];
2190
2191  ;
2192  return 0;
2193}
2194_ACEOF
2195if ac_fn_c_try_compile "$LINENO"
2196then :
2197  ac_lo=0 ac_mid=0
2198  while :; do
2199    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2200/* end confdefs.h.  */
2201$4
2202int
2203main (void)
2204{
2205static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2206test_array [0] = 0;
2207return test_array [0];
2208
2209  ;
2210  return 0;
2211}
2212_ACEOF
2213if ac_fn_c_try_compile "$LINENO"
2214then :
2215  ac_hi=$ac_mid; break
2216else $as_nop
2217  as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2218			if test $ac_lo -le $ac_mid; then
2219			  ac_lo= ac_hi=
2220			  break
2221			fi
2222			as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2223fi
2224rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
2225  done
2226else $as_nop
2227  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2228/* end confdefs.h.  */
2229$4
2230int
2231main (void)
2232{
2233static int test_array [1 - 2 * !(($2) < 0)];
2234test_array [0] = 0;
2235return test_array [0];
2236
2237  ;
2238  return 0;
2239}
2240_ACEOF
2241if ac_fn_c_try_compile "$LINENO"
2242then :
2243  ac_hi=-1 ac_mid=-1
2244  while :; do
2245    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2246/* end confdefs.h.  */
2247$4
2248int
2249main (void)
2250{
2251static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2252test_array [0] = 0;
2253return test_array [0];
2254
2255  ;
2256  return 0;
2257}
2258_ACEOF
2259if ac_fn_c_try_compile "$LINENO"
2260then :
2261  ac_lo=$ac_mid; break
2262else $as_nop
2263  as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2264			if test $ac_mid -le $ac_hi; then
2265			  ac_lo= ac_hi=
2266			  break
2267			fi
2268			as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2269fi
2270rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
2271  done
2272else $as_nop
2273  ac_lo= ac_hi=
2274fi
2275rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
2276fi
2277rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
2278# Binary search between lo and hi bounds.
2279while test "x$ac_lo" != "x$ac_hi"; do
2280  as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2281  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2282/* end confdefs.h.  */
2283$4
2284int
2285main (void)
2286{
2287static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2288test_array [0] = 0;
2289return test_array [0];
2290
2291  ;
2292  return 0;
2293}
2294_ACEOF
2295if ac_fn_c_try_compile "$LINENO"
2296then :
2297  ac_hi=$ac_mid
2298else $as_nop
2299  as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2300fi
2301rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
2302done
2303case $ac_lo in #((
2304?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2305'') ac_retval=1 ;;
2306esac
2307  else
2308    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2309/* end confdefs.h.  */
2310$4
2311static long int longval (void) { return $2; }
2312static unsigned long int ulongval (void) { return $2; }
2313#include <stdio.h>
2314#include <stdlib.h>
2315int
2316main (void)
2317{
2318
2319  FILE *f = fopen ("conftest.val", "w");
2320  if (! f)
2321    return 1;
2322  if (($2) < 0)
2323    {
2324      long int i = longval ();
2325      if (i != ($2))
2326	return 1;
2327      fprintf (f, "%ld", i);
2328    }
2329  else
2330    {
2331      unsigned long int i = ulongval ();
2332      if (i != ($2))
2333	return 1;
2334      fprintf (f, "%lu", i);
2335    }
2336  /* Do not output a trailing newline, as this causes \r\n confusion
2337     on some platforms.  */
2338  return ferror (f) || fclose (f) != 0;
2339
2340  ;
2341  return 0;
2342}
2343_ACEOF
2344if ac_fn_c_try_run "$LINENO"
2345then :
2346  echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2347else $as_nop
2348  ac_retval=1
2349fi
2350rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2351  conftest.$ac_objext conftest.beam conftest.$ac_ext
2352rm -f conftest.val
2353
2354  fi
2355  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2356  as_fn_set_status $ac_retval
2357
2358} # ac_fn_c_compute_int
2359
2360# ac_fn_check_decl LINENO SYMBOL VAR INCLUDES EXTRA-OPTIONS FLAG-VAR
2361# ------------------------------------------------------------------
2362# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2363# accordingly. Pass EXTRA-OPTIONS to the compiler, using FLAG-VAR.
2364ac_fn_check_decl ()
2365{
2366  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2367  as_decl_name=`echo $2|sed 's/ *(.*//'`
2368  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2369printf %s "checking whether $as_decl_name is declared... " >&6; }
2370if eval test \${$3+y}
2371then :
2372  printf %s "(cached) " >&6
2373else $as_nop
2374  as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2375  eval ac_save_FLAGS=\$$6
2376  as_fn_append $6 " $5"
2377  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2378/* end confdefs.h.  */
2379$4
2380int
2381main (void)
2382{
2383#ifndef $as_decl_name
2384#ifdef __cplusplus
2385  (void) $as_decl_use;
2386#else
2387  (void) $as_decl_name;
2388#endif
2389#endif
2390
2391  ;
2392  return 0;
2393}
2394_ACEOF
2395if ac_fn_c_try_compile "$LINENO"
2396then :
2397  eval "$3=yes"
2398else $as_nop
2399  eval "$3=no"
2400fi
2401rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
2402  eval $6=\$ac_save_FLAGS
2403
2404fi
2405eval ac_res=\$$3
2406	       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2407printf "%s\n" "$ac_res" >&6; }
2408  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2409
2410} # ac_fn_check_decl
2411
2412# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2413# ----------------------------------------------------
2414# Tries to find if the field MEMBER exists in type AGGR, after including
2415# INCLUDES, setting cache variable VAR accordingly.
2416ac_fn_c_check_member ()
2417{
2418  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2419  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2420printf %s "checking for $2.$3... " >&6; }
2421if eval test \${$4+y}
2422then :
2423  printf %s "(cached) " >&6
2424else $as_nop
2425  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2426/* end confdefs.h.  */
2427$5
2428int
2429main (void)
2430{
2431static $2 ac_aggr;
2432if (ac_aggr.$3)
2433return 0;
2434  ;
2435  return 0;
2436}
2437_ACEOF
2438if ac_fn_c_try_compile "$LINENO"
2439then :
2440  eval "$4=yes"
2441else $as_nop
2442  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2443/* end confdefs.h.  */
2444$5
2445int
2446main (void)
2447{
2448static $2 ac_aggr;
2449if (sizeof ac_aggr.$3)
2450return 0;
2451  ;
2452  return 0;
2453}
2454_ACEOF
2455if ac_fn_c_try_compile "$LINENO"
2456then :
2457  eval "$4=yes"
2458else $as_nop
2459  eval "$4=no"
2460fi
2461rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
2462fi
2463rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
2464fi
2465eval ac_res=\$$4
2466	       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2467printf "%s\n" "$ac_res" >&6; }
2468  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2469
2470} # ac_fn_c_check_member
2471ac_configure_args_raw=
2472for ac_arg
2473do
2474  case $ac_arg in
2475  *\'*)
2476    ac_arg=`printf "%s\n" "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2477  esac
2478  as_fn_append ac_configure_args_raw " '$ac_arg'"
2479done
2480
2481case $ac_configure_args_raw in
2482  *$as_nl*)
2483    ac_safe_unquote= ;;
2484  *)
2485    ac_unsafe_z='|&;<>()$`\\"*?[ ''	' # This string ends in space, tab.
2486    ac_unsafe_a="$ac_unsafe_z#~"
2487    ac_safe_unquote="s/ '\\([^$ac_unsafe_a][^$ac_unsafe_z]*\\)'/ \\1/g"
2488    ac_configure_args_raw=`      printf "%s\n" "$ac_configure_args_raw" | sed "$ac_safe_unquote"`;;
2489esac
2490
2491cat >config.log <<_ACEOF
2492This file contains any messages produced by compilers while
2493running configure, to aid debugging if configure makes a mistake.
2494
2495It was created by unbound $as_me 1.24.1, which was
2496generated by GNU Autoconf 2.71.  Invocation command line was
2497
2498  $ $0$ac_configure_args_raw
2499
2500_ACEOF
2501exec 5>>config.log
2502{
2503cat <<_ASUNAME
2504## --------- ##
2505## Platform. ##
2506## --------- ##
2507
2508hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2509uname -m = `(uname -m) 2>/dev/null || echo unknown`
2510uname -r = `(uname -r) 2>/dev/null || echo unknown`
2511uname -s = `(uname -s) 2>/dev/null || echo unknown`
2512uname -v = `(uname -v) 2>/dev/null || echo unknown`
2513
2514/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2515/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2516
2517/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2518/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2519/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2520/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2521/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2522/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2523/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2524
2525_ASUNAME
2526
2527as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2528for as_dir in $PATH
2529do
2530  IFS=$as_save_IFS
2531  case $as_dir in #(((
2532    '') as_dir=./ ;;
2533    */) ;;
2534    *) as_dir=$as_dir/ ;;
2535  esac
2536    printf "%s\n" "PATH: $as_dir"
2537  done
2538IFS=$as_save_IFS
2539
2540} >&5
2541
2542cat >&5 <<_ACEOF
2543
2544
2545## ----------- ##
2546## Core tests. ##
2547## ----------- ##
2548
2549_ACEOF
2550
2551
2552# Keep a trace of the command line.
2553# Strip out --no-create and --no-recursion so they do not pile up.
2554# Strip out --silent because we don't want to record it for future runs.
2555# Also quote any args containing shell meta-characters.
2556# Make two passes to allow for proper duplicate-argument suppression.
2557ac_configure_args=
2558ac_configure_args0=
2559ac_configure_args1=
2560ac_must_keep_next=false
2561for ac_pass in 1 2
2562do
2563  for ac_arg
2564  do
2565    case $ac_arg in
2566    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2567    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2568    | -silent | --silent | --silen | --sile | --sil)
2569      continue ;;
2570    *\'*)
2571      ac_arg=`printf "%s\n" "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2572    esac
2573    case $ac_pass in
2574    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2575    2)
2576      as_fn_append ac_configure_args1 " '$ac_arg'"
2577      if test $ac_must_keep_next = true; then
2578	ac_must_keep_next=false # Got value, back to normal.
2579      else
2580	case $ac_arg in
2581	  *=* | --config-cache | -C | -disable-* | --disable-* \
2582	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2583	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2584	  | -with-* | --with-* | -without-* | --without-* | --x)
2585	    case "$ac_configure_args0 " in
2586	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2587	    esac
2588	    ;;
2589	  -* ) ac_must_keep_next=true ;;
2590	esac
2591      fi
2592      as_fn_append ac_configure_args " '$ac_arg'"
2593      ;;
2594    esac
2595  done
2596done
2597{ ac_configure_args0=; unset ac_configure_args0;}
2598{ ac_configure_args1=; unset ac_configure_args1;}
2599
2600# When interrupted or exit'd, cleanup temporary files, and complete
2601# config.log.  We remove comments because anyway the quotes in there
2602# would cause problems or look ugly.
2603# WARNING: Use '\'' to represent an apostrophe within the trap.
2604# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2605trap 'exit_status=$?
2606  # Sanitize IFS.
2607  IFS=" ""	$as_nl"
2608  # Save into config.log some information that might help in debugging.
2609  {
2610    echo
2611
2612    printf "%s\n" "## ---------------- ##
2613## Cache variables. ##
2614## ---------------- ##"
2615    echo
2616    # The following way of writing the cache mishandles newlines in values,
2617(
2618  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2619    eval ac_val=\$$ac_var
2620    case $ac_val in #(
2621    *${as_nl}*)
2622      case $ac_var in #(
2623      *_cv_*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2624printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2625      esac
2626      case $ac_var in #(
2627      _ | IFS | as_nl) ;; #(
2628      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2629      *) { eval $ac_var=; unset $ac_var;} ;;
2630      esac ;;
2631    esac
2632  done
2633  (set) 2>&1 |
2634    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2635    *${as_nl}ac_space=\ *)
2636      sed -n \
2637	"s/'\''/'\''\\\\'\'''\''/g;
2638	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2639      ;; #(
2640    *)
2641      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2642      ;;
2643    esac |
2644    sort
2645)
2646    echo
2647
2648    printf "%s\n" "## ----------------- ##
2649## Output variables. ##
2650## ----------------- ##"
2651    echo
2652    for ac_var in $ac_subst_vars
2653    do
2654      eval ac_val=\$$ac_var
2655      case $ac_val in
2656      *\'\''*) ac_val=`printf "%s\n" "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2657      esac
2658      printf "%s\n" "$ac_var='\''$ac_val'\''"
2659    done | sort
2660    echo
2661
2662    if test -n "$ac_subst_files"; then
2663      printf "%s\n" "## ------------------- ##
2664## File substitutions. ##
2665## ------------------- ##"
2666      echo
2667      for ac_var in $ac_subst_files
2668      do
2669	eval ac_val=\$$ac_var
2670	case $ac_val in
2671	*\'\''*) ac_val=`printf "%s\n" "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2672	esac
2673	printf "%s\n" "$ac_var='\''$ac_val'\''"
2674      done | sort
2675      echo
2676    fi
2677
2678    if test -s confdefs.h; then
2679      printf "%s\n" "## ----------- ##
2680## confdefs.h. ##
2681## ----------- ##"
2682      echo
2683      cat confdefs.h
2684      echo
2685    fi
2686    test "$ac_signal" != 0 &&
2687      printf "%s\n" "$as_me: caught signal $ac_signal"
2688    printf "%s\n" "$as_me: exit $exit_status"
2689  } >&5
2690  rm -f core *.core core.conftest.* &&
2691    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2692    exit $exit_status
2693' 0
2694for ac_signal in 1 2 13 15; do
2695  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2696done
2697ac_signal=0
2698
2699# confdefs.h avoids OS command line length limits that DEFS can exceed.
2700rm -f -r conftest* confdefs.h
2701
2702printf "%s\n" "/* confdefs.h */" > confdefs.h
2703
2704# Predefined preprocessor variables.
2705
2706printf "%s\n" "#define PACKAGE_NAME \"$PACKAGE_NAME\"" >>confdefs.h
2707
2708printf "%s\n" "#define PACKAGE_TARNAME \"$PACKAGE_TARNAME\"" >>confdefs.h
2709
2710printf "%s\n" "#define PACKAGE_VERSION \"$PACKAGE_VERSION\"" >>confdefs.h
2711
2712printf "%s\n" "#define PACKAGE_STRING \"$PACKAGE_STRING\"" >>confdefs.h
2713
2714printf "%s\n" "#define PACKAGE_BUGREPORT \"$PACKAGE_BUGREPORT\"" >>confdefs.h
2715
2716printf "%s\n" "#define PACKAGE_URL \"$PACKAGE_URL\"" >>confdefs.h
2717
2718
2719# Let the site file select an alternate cache file if it wants to.
2720# Prefer an explicitly selected file to automatically selected ones.
2721if test -n "$CONFIG_SITE"; then
2722  ac_site_files="$CONFIG_SITE"
2723elif test "x$prefix" != xNONE; then
2724  ac_site_files="$prefix/share/config.site $prefix/etc/config.site"
2725else
2726  ac_site_files="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
2727fi
2728
2729for ac_site_file in $ac_site_files
2730do
2731  case $ac_site_file in #(
2732  */*) :
2733     ;; #(
2734  *) :
2735    ac_site_file=./$ac_site_file ;;
2736esac
2737  if test -f "$ac_site_file" && test -r "$ac_site_file"; then
2738    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2739printf "%s\n" "$as_me: loading site script $ac_site_file" >&6;}
2740    sed 's/^/| /' "$ac_site_file" >&5
2741    . "$ac_site_file" \
2742      || { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2743printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
2744as_fn_error $? "failed to load site script $ac_site_file
2745See \`config.log' for more details" "$LINENO" 5; }
2746  fi
2747done
2748
2749if test -r "$cache_file"; then
2750  # Some versions of bash will fail to source /dev/null (special files
2751  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
2752  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2753    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2754printf "%s\n" "$as_me: loading cache $cache_file" >&6;}
2755    case $cache_file in
2756      [\\/]* | ?:[\\/]* ) . "$cache_file";;
2757      *)                      . "./$cache_file";;
2758    esac
2759  fi
2760else
2761  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2762printf "%s\n" "$as_me: creating cache $cache_file" >&6;}
2763  >$cache_file
2764fi
2765
2766as_fn_append ac_header_c_list " stdio.h stdio_h HAVE_STDIO_H"
2767# Test code for whether the C compiler supports C89 (global declarations)
2768ac_c_conftest_c89_globals='
2769/* Does the compiler advertise C89 conformance?
2770   Do not test the value of __STDC__, because some compilers set it to 0
2771   while being otherwise adequately conformant. */
2772#if !defined __STDC__
2773# error "Compiler does not advertise C89 conformance"
2774#endif
2775
2776#include <stddef.h>
2777#include <stdarg.h>
2778struct stat;
2779/* Most of the following tests are stolen from RCS 5.7 src/conf.sh.  */
2780struct buf { int x; };
2781struct buf * (*rcsopen) (struct buf *, struct stat *, int);
2782static char *e (p, i)
2783     char **p;
2784     int i;
2785{
2786  return p[i];
2787}
2788static char *f (char * (*g) (char **, int), char **p, ...)
2789{
2790  char *s;
2791  va_list v;
2792  va_start (v,p);
2793  s = g (p, va_arg (v,int));
2794  va_end (v);
2795  return s;
2796}
2797
2798/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
2799   function prototypes and stuff, but not \xHH hex character constants.
2800   These do not provoke an error unfortunately, instead are silently treated
2801   as an "x".  The following induces an error, until -std is added to get
2802   proper ANSI mode.  Curiously \x00 != x always comes out true, for an
2803   array size at least.  It is necessary to write \x00 == 0 to get something
2804   that is true only with -std.  */
2805int osf4_cc_array ['\''\x00'\'' == 0 ? 1 : -1];
2806
2807/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
2808   inside strings and character constants.  */
2809#define FOO(x) '\''x'\''
2810int xlc6_cc_array[FOO(a) == '\''x'\'' ? 1 : -1];
2811
2812int test (int i, double x);
2813struct s1 {int (*f) (int a);};
2814struct s2 {int (*f) (double a);};
2815int pairnames (int, char **, int *(*)(struct buf *, struct stat *, int),
2816               int, int);'
2817
2818# Test code for whether the C compiler supports C89 (body of main).
2819ac_c_conftest_c89_main='
2820ok |= (argc == 0 || f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]);
2821'
2822
2823# Test code for whether the C compiler supports C99 (global declarations)
2824ac_c_conftest_c99_globals='
2825// Does the compiler advertise C99 conformance?
2826#if !defined __STDC_VERSION__ || __STDC_VERSION__ < 199901L
2827# error "Compiler does not advertise C99 conformance"
2828#endif
2829
2830#include <stdbool.h>
2831extern int puts (const char *);
2832extern int printf (const char *, ...);
2833extern int dprintf (int, const char *, ...);
2834extern void *malloc (size_t);
2835
2836// Check varargs macros.  These examples are taken from C99 6.10.3.5.
2837// dprintf is used instead of fprintf to avoid needing to declare
2838// FILE and stderr.
2839#define debug(...) dprintf (2, __VA_ARGS__)
2840#define showlist(...) puts (#__VA_ARGS__)
2841#define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__))
2842static void
2843test_varargs_macros (void)
2844{
2845  int x = 1234;
2846  int y = 5678;
2847  debug ("Flag");
2848  debug ("X = %d\n", x);
2849  showlist (The first, second, and third items.);
2850  report (x>y, "x is %d but y is %d", x, y);
2851}
2852
2853// Check long long types.
2854#define BIG64 18446744073709551615ull
2855#define BIG32 4294967295ul
2856#define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0)
2857#if !BIG_OK
2858  #error "your preprocessor is broken"
2859#endif
2860#if BIG_OK
2861#else
2862  #error "your preprocessor is broken"
2863#endif
2864static long long int bignum = -9223372036854775807LL;
2865static unsigned long long int ubignum = BIG64;
2866
2867struct incomplete_array
2868{
2869  int datasize;
2870  double data[];
2871};
2872
2873struct named_init {
2874  int number;
2875  const wchar_t *name;
2876  double average;
2877};
2878
2879typedef const char *ccp;
2880
2881static inline int
2882test_restrict (ccp restrict text)
2883{
2884  // See if C++-style comments work.
2885  // Iterate through items via the restricted pointer.
2886  // Also check for declarations in for loops.
2887  for (unsigned int i = 0; *(text+i) != '\''\0'\''; ++i)
2888    continue;
2889  return 0;
2890}
2891
2892// Check varargs and va_copy.
2893static bool
2894test_varargs (const char *format, ...)
2895{
2896  va_list args;
2897  va_start (args, format);
2898  va_list args_copy;
2899  va_copy (args_copy, args);
2900
2901  const char *str = "";
2902  int number = 0;
2903  float fnumber = 0;
2904
2905  while (*format)
2906    {
2907      switch (*format++)
2908	{
2909	case '\''s'\'': // string
2910	  str = va_arg (args_copy, const char *);
2911	  break;
2912	case '\''d'\'': // int
2913	  number = va_arg (args_copy, int);
2914	  break;
2915	case '\''f'\'': // float
2916	  fnumber = va_arg (args_copy, double);
2917	  break;
2918	default:
2919	  break;
2920	}
2921    }
2922  va_end (args_copy);
2923  va_end (args);
2924
2925  return *str && number && fnumber;
2926}
2927'
2928
2929# Test code for whether the C compiler supports C99 (body of main).
2930ac_c_conftest_c99_main='
2931  // Check bool.
2932  _Bool success = false;
2933  success |= (argc != 0);
2934
2935  // Check restrict.
2936  if (test_restrict ("String literal") == 0)
2937    success = true;
2938  char *restrict newvar = "Another string";
2939
2940  // Check varargs.
2941  success &= test_varargs ("s, d'\'' f .", "string", 65, 34.234);
2942  test_varargs_macros ();
2943
2944  // Check flexible array members.
2945  struct incomplete_array *ia =
2946    malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10));
2947  ia->datasize = 10;
2948  for (int i = 0; i < ia->datasize; ++i)
2949    ia->data[i] = i * 1.234;
2950
2951  // Check named initializers.
2952  struct named_init ni = {
2953    .number = 34,
2954    .name = L"Test wide string",
2955    .average = 543.34343,
2956  };
2957
2958  ni.number = 58;
2959
2960  int dynamic_array[ni.number];
2961  dynamic_array[0] = argv[0][0];
2962  dynamic_array[ni.number - 1] = 543;
2963
2964  // work around unused variable warnings
2965  ok |= (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == '\''x'\''
2966	 || dynamic_array[ni.number - 1] != 543);
2967'
2968
2969# Test code for whether the C compiler supports C11 (global declarations)
2970ac_c_conftest_c11_globals='
2971// Does the compiler advertise C11 conformance?
2972#if !defined __STDC_VERSION__ || __STDC_VERSION__ < 201112L
2973# error "Compiler does not advertise C11 conformance"
2974#endif
2975
2976// Check _Alignas.
2977char _Alignas (double) aligned_as_double;
2978char _Alignas (0) no_special_alignment;
2979extern char aligned_as_int;
2980char _Alignas (0) _Alignas (int) aligned_as_int;
2981
2982// Check _Alignof.
2983enum
2984{
2985  int_alignment = _Alignof (int),
2986  int_array_alignment = _Alignof (int[100]),
2987  char_alignment = _Alignof (char)
2988};
2989_Static_assert (0 < -_Alignof (int), "_Alignof is signed");
2990
2991// Check _Noreturn.
2992int _Noreturn does_not_return (void) { for (;;) continue; }
2993
2994// Check _Static_assert.
2995struct test_static_assert
2996{
2997  int x;
2998  _Static_assert (sizeof (int) <= sizeof (long int),
2999                  "_Static_assert does not work in struct");
3000  long int y;
3001};
3002
3003// Check UTF-8 literals.
3004#define u8 syntax error!
3005char const utf8_literal[] = u8"happens to be ASCII" "another string";
3006
3007// Check duplicate typedefs.
3008typedef long *long_ptr;
3009typedef long int *long_ptr;
3010typedef long_ptr long_ptr;
3011
3012// Anonymous structures and unions -- taken from C11 6.7.2.1 Example 1.
3013struct anonymous
3014{
3015  union {
3016    struct { int i; int j; };
3017    struct { int k; long int l; } w;
3018  };
3019  int m;
3020} v1;
3021'
3022
3023# Test code for whether the C compiler supports C11 (body of main).
3024ac_c_conftest_c11_main='
3025  _Static_assert ((offsetof (struct anonymous, i)
3026		   == offsetof (struct anonymous, w.k)),
3027		  "Anonymous union alignment botch");
3028  v1.i = 2;
3029  v1.w.k = 5;
3030  ok |= v1.i != 5;
3031'
3032
3033# Test code for whether the C compiler supports C11 (complete).
3034ac_c_conftest_c11_program="${ac_c_conftest_c89_globals}
3035${ac_c_conftest_c99_globals}
3036${ac_c_conftest_c11_globals}
3037
3038int
3039main (int argc, char **argv)
3040{
3041  int ok = 0;
3042  ${ac_c_conftest_c89_main}
3043  ${ac_c_conftest_c99_main}
3044  ${ac_c_conftest_c11_main}
3045  return ok;
3046}
3047"
3048
3049# Test code for whether the C compiler supports C99 (complete).
3050ac_c_conftest_c99_program="${ac_c_conftest_c89_globals}
3051${ac_c_conftest_c99_globals}
3052
3053int
3054main (int argc, char **argv)
3055{
3056  int ok = 0;
3057  ${ac_c_conftest_c89_main}
3058  ${ac_c_conftest_c99_main}
3059  return ok;
3060}
3061"
3062
3063# Test code for whether the C compiler supports C89 (complete).
3064ac_c_conftest_c89_program="${ac_c_conftest_c89_globals}
3065
3066int
3067main (int argc, char **argv)
3068{
3069  int ok = 0;
3070  ${ac_c_conftest_c89_main}
3071  return ok;
3072}
3073"
3074
3075as_fn_append ac_header_c_list " stdlib.h stdlib_h HAVE_STDLIB_H"
3076as_fn_append ac_header_c_list " string.h string_h HAVE_STRING_H"
3077as_fn_append ac_header_c_list " inttypes.h inttypes_h HAVE_INTTYPES_H"
3078as_fn_append ac_header_c_list " stdint.h stdint_h HAVE_STDINT_H"
3079as_fn_append ac_header_c_list " strings.h strings_h HAVE_STRINGS_H"
3080as_fn_append ac_header_c_list " sys/stat.h sys_stat_h HAVE_SYS_STAT_H"
3081as_fn_append ac_header_c_list " sys/types.h sys_types_h HAVE_SYS_TYPES_H"
3082as_fn_append ac_header_c_list " unistd.h unistd_h HAVE_UNISTD_H"
3083as_fn_append ac_header_c_list " wchar.h wchar_h HAVE_WCHAR_H"
3084as_fn_append ac_header_c_list " minix/config.h minix_config_h HAVE_MINIX_CONFIG_H"
3085as_fn_append ac_header_c_list " vfork.h vfork_h HAVE_VFORK_H"
3086as_fn_append ac_func_c_list " fork HAVE_FORK"
3087as_fn_append ac_func_c_list " vfork HAVE_VFORK"
3088
3089# Auxiliary files required by this configure script.
3090ac_aux_files="ltmain.sh config.guess config.sub"
3091
3092# Locations in which to look for auxiliary files.
3093ac_aux_dir_candidates="${srcdir}${PATH_SEPARATOR}${srcdir}/..${PATH_SEPARATOR}${srcdir}/../.."
3094
3095# Search for a directory containing all of the required auxiliary files,
3096# $ac_aux_files, from the $PATH-style list $ac_aux_dir_candidates.
3097# If we don't find one directory that contains all the files we need,
3098# we report the set of missing files from the *first* directory in
3099# $ac_aux_dir_candidates and give up.
3100ac_missing_aux_files=""
3101ac_first_candidate=:
3102printf "%s\n" "$as_me:${as_lineno-$LINENO}: looking for aux files: $ac_aux_files" >&5
3103as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3104as_found=false
3105for as_dir in $ac_aux_dir_candidates
3106do
3107  IFS=$as_save_IFS
3108  case $as_dir in #(((
3109    '') as_dir=./ ;;
3110    */) ;;
3111    *) as_dir=$as_dir/ ;;
3112  esac
3113  as_found=:
3114
3115  printf "%s\n" "$as_me:${as_lineno-$LINENO}:  trying $as_dir" >&5
3116  ac_aux_dir_found=yes
3117  ac_install_sh=
3118  for ac_aux in $ac_aux_files
3119  do
3120    # As a special case, if "install-sh" is required, that requirement
3121    # can be satisfied by any of "install-sh", "install.sh", or "shtool",
3122    # and $ac_install_sh is set appropriately for whichever one is found.
3123    if test x"$ac_aux" = x"install-sh"
3124    then
3125      if test -f "${as_dir}install-sh"; then
3126        printf "%s\n" "$as_me:${as_lineno-$LINENO}:   ${as_dir}install-sh found" >&5
3127        ac_install_sh="${as_dir}install-sh -c"
3128      elif test -f "${as_dir}install.sh"; then
3129        printf "%s\n" "$as_me:${as_lineno-$LINENO}:   ${as_dir}install.sh found" >&5
3130        ac_install_sh="${as_dir}install.sh -c"
3131      elif test -f "${as_dir}shtool"; then
3132        printf "%s\n" "$as_me:${as_lineno-$LINENO}:   ${as_dir}shtool found" >&5
3133        ac_install_sh="${as_dir}shtool install -c"
3134      else
3135        ac_aux_dir_found=no
3136        if $ac_first_candidate; then
3137          ac_missing_aux_files="${ac_missing_aux_files} install-sh"
3138        else
3139          break
3140        fi
3141      fi
3142    else
3143      if test -f "${as_dir}${ac_aux}"; then
3144        printf "%s\n" "$as_me:${as_lineno-$LINENO}:   ${as_dir}${ac_aux} found" >&5
3145      else
3146        ac_aux_dir_found=no
3147        if $ac_first_candidate; then
3148          ac_missing_aux_files="${ac_missing_aux_files} ${ac_aux}"
3149        else
3150          break
3151        fi
3152      fi
3153    fi
3154  done
3155  if test "$ac_aux_dir_found" = yes; then
3156    ac_aux_dir="$as_dir"
3157    break
3158  fi
3159  ac_first_candidate=false
3160
3161  as_found=false
3162done
3163IFS=$as_save_IFS
3164if $as_found
3165then :
3166
3167else $as_nop
3168  as_fn_error $? "cannot find required auxiliary files:$ac_missing_aux_files" "$LINENO" 5
3169fi
3170
3171
3172# These three variables are undocumented and unsupported,
3173# and are intended to be withdrawn in a future Autoconf release.
3174# They can cause serious problems if a builder's source tree is in a directory
3175# whose full name contains unusual characters.
3176if test -f "${ac_aux_dir}config.guess"; then
3177  ac_config_guess="$SHELL ${ac_aux_dir}config.guess"
3178fi
3179if test -f "${ac_aux_dir}config.sub"; then
3180  ac_config_sub="$SHELL ${ac_aux_dir}config.sub"
3181fi
3182if test -f "$ac_aux_dir/configure"; then
3183  ac_configure="$SHELL ${ac_aux_dir}configure"
3184fi
3185
3186# Check that the precious variables saved in the cache have kept the same
3187# value.
3188ac_cache_corrupted=false
3189for ac_var in $ac_precious_vars; do
3190  eval ac_old_set=\$ac_cv_env_${ac_var}_set
3191  eval ac_new_set=\$ac_env_${ac_var}_set
3192  eval ac_old_val=\$ac_cv_env_${ac_var}_value
3193  eval ac_new_val=\$ac_env_${ac_var}_value
3194  case $ac_old_set,$ac_new_set in
3195    set,)
3196      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
3197printf "%s\n" "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
3198      ac_cache_corrupted=: ;;
3199    ,set)
3200      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
3201printf "%s\n" "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
3202      ac_cache_corrupted=: ;;
3203    ,);;
3204    *)
3205      if test "x$ac_old_val" != "x$ac_new_val"; then
3206	# differences in whitespace do not lead to failure.
3207	ac_old_val_w=`echo x $ac_old_val`
3208	ac_new_val_w=`echo x $ac_new_val`
3209	if test "$ac_old_val_w" != "$ac_new_val_w"; then
3210	  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
3211printf "%s\n" "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
3212	  ac_cache_corrupted=:
3213	else
3214	  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
3215printf "%s\n" "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
3216	  eval $ac_var=\$ac_old_val
3217	fi
3218	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
3219printf "%s\n" "$as_me:   former value:  \`$ac_old_val'" >&2;}
3220	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
3221printf "%s\n" "$as_me:   current value: \`$ac_new_val'" >&2;}
3222      fi;;
3223  esac
3224  # Pass precious variables to config.status.
3225  if test "$ac_new_set" = set; then
3226    case $ac_new_val in
3227    *\'*) ac_arg=$ac_var=`printf "%s\n" "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
3228    *) ac_arg=$ac_var=$ac_new_val ;;
3229    esac
3230    case " $ac_configure_args " in
3231      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
3232      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
3233    esac
3234  fi
3235done
3236if $ac_cache_corrupted; then
3237  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3238printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
3239  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
3240printf "%s\n" "$as_me: error: changes in the environment can compromise the build" >&2;}
3241  as_fn_error $? "run \`${MAKE-make} distclean' and/or \`rm $cache_file'
3242	    and start over" "$LINENO" 5
3243fi
3244## -------------------- ##
3245## Main body of script. ##
3246## -------------------- ##
3247
3248ac_ext=c
3249ac_cpp='$CPP $CPPFLAGS'
3250ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3251ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3252ac_compiler_gnu=$ac_cv_c_compiler_gnu
3253
3254
3255UNBOUND_VERSION_MAJOR=1
3256
3257UNBOUND_VERSION_MINOR=24
3258
3259UNBOUND_VERSION_MICRO=1
3260
3261
3262LIBUNBOUND_CURRENT=9
3263LIBUNBOUND_REVISION=34
3264LIBUNBOUND_AGE=1
3265# 1.0.0 had 0:12:0
3266# 1.0.1 had 0:13:0
3267# 1.0.2 had 0:14:0
3268# 1.1.0 had 0:15:0
3269# 1.1.1 had 0:16:0
3270# 1.2.0 had 0:17:0
3271# 1.2.1 had 0:18:0
3272# 1.3.0 had 1:0:0   # ub_cancel and -export-symbols.
3273# 1.3.1 had 1:1:0
3274# 1.3.2 had 1:2:0
3275# 1.3.3 had 1:3:0
3276# 1.3.4 had 1:4:0
3277# 1.4.0-snapshots had 1:5:0
3278# 1.4.0 had 1:5:0 (not 2:0:0)   # ub_result.why_bogus
3279# 1.4.1 had 2:1:0
3280# 1.4.2 had 2:2:0
3281# 1.4.3 had 2:3:0
3282# 1.4.4 had 2:4:0
3283# 1.4.5 had 2:5:0
3284# 1.4.6 had 2:6:0
3285# 1.4.7 had 2:7:0
3286# 1.4.8 had 2:8:0
3287# 1.4.9 had 2:9:0
3288# 1.4.10 had 2:10:0
3289# 1.4.11 had 2:11:0
3290# 1.4.12 had 2:12:0
3291# 1.4.13 had 2:13:0
3292# and 1.4.13p1 and 1.4.13.p2
3293# 1.4.14 had 2:14:0
3294# 1.4.15 had 3:0:1 # adds ub_version()
3295# 1.4.16 had 3:1:1
3296# 1.4.17 had 3:2:1
3297# 1.4.18 had 3:3:1
3298# 1.4.19 had 3:4:1
3299# 1.4.20 had 4:0:2 # adds libunbound.ttl # but shipped 3:5:1
3300# 1.4.21 had 4:1:2
3301# 1.4.22 had 4:1:2
3302# 1.5.0 had 5:3:3 # adds ub_ctx_add_ta_autr
3303# 1.5.1 had 5:3:3
3304# 1.5.2 had 5:5:3
3305# 1.5.3 had 5:6:3
3306# 1.5.4 had 5:7:3
3307# 1.5.5 had 5:8:3
3308# 1.5.6 had 5:9:3
3309# 1.5.7 had 5:10:3
3310# 1.5.8 had 6:0:4 # adds ub_ctx_set_stub
3311# 1.5.9 had 6:1:4
3312# 1.5.10 had 6:2:4
3313# 1.6.0 had 6:3:4
3314# 1.6.1 had 7:0:5 # ub_callback_t typedef renamed to ub_callback_type
3315# 1.6.2 had 7:1:5
3316# 1.6.3 had 7:2:5
3317# 1.6.4 had 7:3:5
3318# 1.6.5 had 7:4:5
3319# 1.6.6 had 7:5:5
3320# 1.6.7 had 7:6:5
3321# 1.6.8 had 7:7:5
3322# 1.7.0 had 7:8:5
3323# 1.7.1 had 7:9:5
3324# 1.7.2 had 7:10:5
3325# 1.7.3 had 7:11:5
3326# 1.8.0 had 8:0:0 # changes the event callback function signature
3327# 1.8.1 had 8:1:0
3328# 1.8.2 had 8:2:0
3329# 1.8.3 had 8:3:0
3330# 1.9.0 had 9:0:1 # add ub_ctx_set_tls
3331# 1.9.1 had 9:1:1
3332# 1.9.2 had 9:2:1
3333# 1.9.3 had 9:3:1
3334# 1.9.4 had 9:4:1
3335# 1.9.5 had 9:5:1
3336# 1.9.6 had 9:6:1
3337# 1.10.0 had 9:7:1
3338# 1.10.1 had 9:8:1
3339# 1.11.0 had 9:9:1
3340# 1.12.0 had 9:10:1
3341# 1.13.0 had 9:11:1
3342# 1.13.1 had 9:12:1
3343# 1.13.2 had 9:13:1
3344# 1.14.0 had 9:14:1
3345# 1.15.0 had 9:15:1
3346# 1.16.0 had 9:16:1
3347# 1.16.1 had 9:17:1
3348# 1.16.2 had 9:18:1
3349# 1.16.3 had 9:19:1
3350# 1.17.0 had 9:20:1
3351# 1.17.1 had 9:21:1
3352# 1.18.0 had 9:22:1
3353# 1.19.0 had 9:23:1
3354# 1.19.1 had 9:24:1
3355# 1.19.2 had 9:25:1
3356# 1.19.3 had 9:26:1
3357# 1.20.0 had 9:27:1
3358# 1.21.0 had 9:28:1
3359# 1.21.1 had 9:29:1
3360# 1.22.0 had 9:30:1
3361# 1.23.0 had 9:31:1
3362# 1.23.1 had 9:32:1
3363# 1.24.0 had 9:33:1
3364# 1.24.1 had 9:34:1
3365
3366#   Current  -- the number of the binary API that we're implementing
3367#   Revision -- which iteration of the implementation of the binary
3368#               API are we supplying?
3369#   Age      -- How many previous binary API versions do we also
3370#               support?
3371#
3372# If we release a new version that does not change the binary API,
3373# increment Revision.
3374#
3375# If we release a new version that changes the binary API, but does
3376# not break programs compiled against the old binary API, increment
3377# Current and Age.  Set Revision to 0, since this is the first
3378# implementation of the new API.
3379#
3380# Otherwise, we're changing the binary API and breaking backward
3381# compatibility with old binaries.  Increment Current.  Set Age to 0,
3382# since we're backward compatible with no previous APIs.  Set Revision
3383# to 0 too.
3384
3385
3386
3387
3388
3389cmdln="`echo $@ | sed -e 's/\\\\/\\\\\\\\/g' | sed -e 's/"/\\\\"/'g`"
3390
3391printf "%s\n" "#define CONFCMDLINE \"$cmdln\"" >>confdefs.h
3392
3393
3394CFLAGS="$CFLAGS"
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404ac_ext=c
3405ac_cpp='$CPP $CPPFLAGS'
3406ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3407ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3408ac_compiler_gnu=$ac_cv_c_compiler_gnu
3409if test -n "$ac_tool_prefix"; then
3410  # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3411set dummy ${ac_tool_prefix}gcc; ac_word=$2
3412{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3413printf %s "checking for $ac_word... " >&6; }
3414if test ${ac_cv_prog_CC+y}
3415then :
3416  printf %s "(cached) " >&6
3417else $as_nop
3418  if test -n "$CC"; then
3419  ac_cv_prog_CC="$CC" # Let the user override the test.
3420else
3421as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3422for as_dir in $PATH
3423do
3424  IFS=$as_save_IFS
3425  case $as_dir in #(((
3426    '') as_dir=./ ;;
3427    */) ;;
3428    *) as_dir=$as_dir/ ;;
3429  esac
3430    for ac_exec_ext in '' $ac_executable_extensions; do
3431  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
3432    ac_cv_prog_CC="${ac_tool_prefix}gcc"
3433    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
3434    break 2
3435  fi
3436done
3437  done
3438IFS=$as_save_IFS
3439
3440fi
3441fi
3442CC=$ac_cv_prog_CC
3443if test -n "$CC"; then
3444  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3445printf "%s\n" "$CC" >&6; }
3446else
3447  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
3448printf "%s\n" "no" >&6; }
3449fi
3450
3451
3452fi
3453if test -z "$ac_cv_prog_CC"; then
3454  ac_ct_CC=$CC
3455  # Extract the first word of "gcc", so it can be a program name with args.
3456set dummy gcc; ac_word=$2
3457{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3458printf %s "checking for $ac_word... " >&6; }
3459if test ${ac_cv_prog_ac_ct_CC+y}
3460then :
3461  printf %s "(cached) " >&6
3462else $as_nop
3463  if test -n "$ac_ct_CC"; then
3464  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3465else
3466as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3467for as_dir in $PATH
3468do
3469  IFS=$as_save_IFS
3470  case $as_dir in #(((
3471    '') as_dir=./ ;;
3472    */) ;;
3473    *) as_dir=$as_dir/ ;;
3474  esac
3475    for ac_exec_ext in '' $ac_executable_extensions; do
3476  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
3477    ac_cv_prog_ac_ct_CC="gcc"
3478    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
3479    break 2
3480  fi
3481done
3482  done
3483IFS=$as_save_IFS
3484
3485fi
3486fi
3487ac_ct_CC=$ac_cv_prog_ac_ct_CC
3488if test -n "$ac_ct_CC"; then
3489  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3490printf "%s\n" "$ac_ct_CC" >&6; }
3491else
3492  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
3493printf "%s\n" "no" >&6; }
3494fi
3495
3496  if test "x$ac_ct_CC" = x; then
3497    CC=""
3498  else
3499    case $cross_compiling:$ac_tool_warned in
3500yes:)
3501{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3502printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3503ac_tool_warned=yes ;;
3504esac
3505    CC=$ac_ct_CC
3506  fi
3507else
3508  CC="$ac_cv_prog_CC"
3509fi
3510
3511if test -z "$CC"; then
3512          if test -n "$ac_tool_prefix"; then
3513    # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
3514set dummy ${ac_tool_prefix}cc; ac_word=$2
3515{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3516printf %s "checking for $ac_word... " >&6; }
3517if test ${ac_cv_prog_CC+y}
3518then :
3519  printf %s "(cached) " >&6
3520else $as_nop
3521  if test -n "$CC"; then
3522  ac_cv_prog_CC="$CC" # Let the user override the test.
3523else
3524as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3525for as_dir in $PATH
3526do
3527  IFS=$as_save_IFS
3528  case $as_dir in #(((
3529    '') as_dir=./ ;;
3530    */) ;;
3531    *) as_dir=$as_dir/ ;;
3532  esac
3533    for ac_exec_ext in '' $ac_executable_extensions; do
3534  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
3535    ac_cv_prog_CC="${ac_tool_prefix}cc"
3536    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
3537    break 2
3538  fi
3539done
3540  done
3541IFS=$as_save_IFS
3542
3543fi
3544fi
3545CC=$ac_cv_prog_CC
3546if test -n "$CC"; then
3547  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3548printf "%s\n" "$CC" >&6; }
3549else
3550  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
3551printf "%s\n" "no" >&6; }
3552fi
3553
3554
3555  fi
3556fi
3557if test -z "$CC"; then
3558  # Extract the first word of "cc", so it can be a program name with args.
3559set dummy cc; ac_word=$2
3560{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3561printf %s "checking for $ac_word... " >&6; }
3562if test ${ac_cv_prog_CC+y}
3563then :
3564  printf %s "(cached) " >&6
3565else $as_nop
3566  if test -n "$CC"; then
3567  ac_cv_prog_CC="$CC" # Let the user override the test.
3568else
3569  ac_prog_rejected=no
3570as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3571for as_dir in $PATH
3572do
3573  IFS=$as_save_IFS
3574  case $as_dir in #(((
3575    '') as_dir=./ ;;
3576    */) ;;
3577    *) as_dir=$as_dir/ ;;
3578  esac
3579    for ac_exec_ext in '' $ac_executable_extensions; do
3580  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
3581    if test "$as_dir$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3582       ac_prog_rejected=yes
3583       continue
3584     fi
3585    ac_cv_prog_CC="cc"
3586    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
3587    break 2
3588  fi
3589done
3590  done
3591IFS=$as_save_IFS
3592
3593if test $ac_prog_rejected = yes; then
3594  # We found a bogon in the path, so make sure we never use it.
3595  set dummy $ac_cv_prog_CC
3596  shift
3597  if test $# != 0; then
3598    # We chose a different compiler from the bogus one.
3599    # However, it has the same basename, so the bogon will be chosen
3600    # first if we set CC to just the basename; use the full file name.
3601    shift
3602    ac_cv_prog_CC="$as_dir$ac_word${1+' '}$@"
3603  fi
3604fi
3605fi
3606fi
3607CC=$ac_cv_prog_CC
3608if test -n "$CC"; then
3609  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3610printf "%s\n" "$CC" >&6; }
3611else
3612  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
3613printf "%s\n" "no" >&6; }
3614fi
3615
3616
3617fi
3618if test -z "$CC"; then
3619  if test -n "$ac_tool_prefix"; then
3620  for ac_prog in cl.exe
3621  do
3622    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3623set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3624{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3625printf %s "checking for $ac_word... " >&6; }
3626if test ${ac_cv_prog_CC+y}
3627then :
3628  printf %s "(cached) " >&6
3629else $as_nop
3630  if test -n "$CC"; then
3631  ac_cv_prog_CC="$CC" # Let the user override the test.
3632else
3633as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3634for as_dir in $PATH
3635do
3636  IFS=$as_save_IFS
3637  case $as_dir in #(((
3638    '') as_dir=./ ;;
3639    */) ;;
3640    *) as_dir=$as_dir/ ;;
3641  esac
3642    for ac_exec_ext in '' $ac_executable_extensions; do
3643  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
3644    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
3645    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
3646    break 2
3647  fi
3648done
3649  done
3650IFS=$as_save_IFS
3651
3652fi
3653fi
3654CC=$ac_cv_prog_CC
3655if test -n "$CC"; then
3656  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3657printf "%s\n" "$CC" >&6; }
3658else
3659  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
3660printf "%s\n" "no" >&6; }
3661fi
3662
3663
3664    test -n "$CC" && break
3665  done
3666fi
3667if test -z "$CC"; then
3668  ac_ct_CC=$CC
3669  for ac_prog in cl.exe
3670do
3671  # Extract the first word of "$ac_prog", so it can be a program name with args.
3672set dummy $ac_prog; ac_word=$2
3673{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3674printf %s "checking for $ac_word... " >&6; }
3675if test ${ac_cv_prog_ac_ct_CC+y}
3676then :
3677  printf %s "(cached) " >&6
3678else $as_nop
3679  if test -n "$ac_ct_CC"; then
3680  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3681else
3682as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3683for as_dir in $PATH
3684do
3685  IFS=$as_save_IFS
3686  case $as_dir in #(((
3687    '') as_dir=./ ;;
3688    */) ;;
3689    *) as_dir=$as_dir/ ;;
3690  esac
3691    for ac_exec_ext in '' $ac_executable_extensions; do
3692  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
3693    ac_cv_prog_ac_ct_CC="$ac_prog"
3694    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
3695    break 2
3696  fi
3697done
3698  done
3699IFS=$as_save_IFS
3700
3701fi
3702fi
3703ac_ct_CC=$ac_cv_prog_ac_ct_CC
3704if test -n "$ac_ct_CC"; then
3705  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3706printf "%s\n" "$ac_ct_CC" >&6; }
3707else
3708  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
3709printf "%s\n" "no" >&6; }
3710fi
3711
3712
3713  test -n "$ac_ct_CC" && break
3714done
3715
3716  if test "x$ac_ct_CC" = x; then
3717    CC=""
3718  else
3719    case $cross_compiling:$ac_tool_warned in
3720yes:)
3721{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3722printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3723ac_tool_warned=yes ;;
3724esac
3725    CC=$ac_ct_CC
3726  fi
3727fi
3728
3729fi
3730if test -z "$CC"; then
3731  if test -n "$ac_tool_prefix"; then
3732  # Extract the first word of "${ac_tool_prefix}clang", so it can be a program name with args.
3733set dummy ${ac_tool_prefix}clang; ac_word=$2
3734{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3735printf %s "checking for $ac_word... " >&6; }
3736if test ${ac_cv_prog_CC+y}
3737then :
3738  printf %s "(cached) " >&6
3739else $as_nop
3740  if test -n "$CC"; then
3741  ac_cv_prog_CC="$CC" # Let the user override the test.
3742else
3743as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3744for as_dir in $PATH
3745do
3746  IFS=$as_save_IFS
3747  case $as_dir in #(((
3748    '') as_dir=./ ;;
3749    */) ;;
3750    *) as_dir=$as_dir/ ;;
3751  esac
3752    for ac_exec_ext in '' $ac_executable_extensions; do
3753  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
3754    ac_cv_prog_CC="${ac_tool_prefix}clang"
3755    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
3756    break 2
3757  fi
3758done
3759  done
3760IFS=$as_save_IFS
3761
3762fi
3763fi
3764CC=$ac_cv_prog_CC
3765if test -n "$CC"; then
3766  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3767printf "%s\n" "$CC" >&6; }
3768else
3769  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
3770printf "%s\n" "no" >&6; }
3771fi
3772
3773
3774fi
3775if test -z "$ac_cv_prog_CC"; then
3776  ac_ct_CC=$CC
3777  # Extract the first word of "clang", so it can be a program name with args.
3778set dummy clang; ac_word=$2
3779{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3780printf %s "checking for $ac_word... " >&6; }
3781if test ${ac_cv_prog_ac_ct_CC+y}
3782then :
3783  printf %s "(cached) " >&6
3784else $as_nop
3785  if test -n "$ac_ct_CC"; then
3786  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3787else
3788as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3789for as_dir in $PATH
3790do
3791  IFS=$as_save_IFS
3792  case $as_dir in #(((
3793    '') as_dir=./ ;;
3794    */) ;;
3795    *) as_dir=$as_dir/ ;;
3796  esac
3797    for ac_exec_ext in '' $ac_executable_extensions; do
3798  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
3799    ac_cv_prog_ac_ct_CC="clang"
3800    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
3801    break 2
3802  fi
3803done
3804  done
3805IFS=$as_save_IFS
3806
3807fi
3808fi
3809ac_ct_CC=$ac_cv_prog_ac_ct_CC
3810if test -n "$ac_ct_CC"; then
3811  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3812printf "%s\n" "$ac_ct_CC" >&6; }
3813else
3814  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
3815printf "%s\n" "no" >&6; }
3816fi
3817
3818  if test "x$ac_ct_CC" = x; then
3819    CC=""
3820  else
3821    case $cross_compiling:$ac_tool_warned in
3822yes:)
3823{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3824printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3825ac_tool_warned=yes ;;
3826esac
3827    CC=$ac_ct_CC
3828  fi
3829else
3830  CC="$ac_cv_prog_CC"
3831fi
3832
3833fi
3834
3835
3836test -z "$CC" && { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3837printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
3838as_fn_error $? "no acceptable C compiler found in \$PATH
3839See \`config.log' for more details" "$LINENO" 5; }
3840
3841# Provide some information about the compiler.
3842printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3843set X $ac_compile
3844ac_compiler=$2
3845for ac_option in --version -v -V -qversion -version; do
3846  { { ac_try="$ac_compiler $ac_option >&5"
3847case "(($ac_try" in
3848  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3849  *) ac_try_echo=$ac_try;;
3850esac
3851eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3852printf "%s\n" "$ac_try_echo"; } >&5
3853  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
3854  ac_status=$?
3855  if test -s conftest.err; then
3856    sed '10a\
3857... rest of stderr output deleted ...
3858         10q' conftest.err >conftest.er1
3859    cat conftest.er1 >&5
3860  fi
3861  rm -f conftest.er1 conftest.err
3862  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3863  test $ac_status = 0; }
3864done
3865
3866cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3867/* end confdefs.h.  */
3868
3869int
3870main (void)
3871{
3872
3873  ;
3874  return 0;
3875}
3876_ACEOF
3877ac_clean_files_save=$ac_clean_files
3878ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
3879# Try to create an executable without -o first, disregard a.out.
3880# It will help us diagnose broken compilers, and finding out an intuition
3881# of exeext.
3882{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3883printf %s "checking whether the C compiler works... " >&6; }
3884ac_link_default=`printf "%s\n" "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3885
3886# The possible output files:
3887ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3888
3889ac_rmfiles=
3890for ac_file in $ac_files
3891do
3892  case $ac_file in
3893    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3894    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3895  esac
3896done
3897rm -f $ac_rmfiles
3898
3899if { { ac_try="$ac_link_default"
3900case "(($ac_try" in
3901  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3902  *) ac_try_echo=$ac_try;;
3903esac
3904eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3905printf "%s\n" "$ac_try_echo"; } >&5
3906  (eval "$ac_link_default") 2>&5
3907  ac_status=$?
3908  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3909  test $ac_status = 0; }
3910then :
3911  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3912# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3913# in a Makefile.  We should not override ac_cv_exeext if it was cached,
3914# so that the user can short-circuit this test for compilers unknown to
3915# Autoconf.
3916for ac_file in $ac_files ''
3917do
3918  test -f "$ac_file" || continue
3919  case $ac_file in
3920    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
3921	;;
3922    [ab].out )
3923	# We found the default executable, but exeext='' is most
3924	# certainly right.
3925	break;;
3926    *.* )
3927	if test ${ac_cv_exeext+y} && test "$ac_cv_exeext" != no;
3928	then :; else
3929	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3930	fi
3931	# We set ac_cv_exeext here because the later test for it is not
3932	# safe: cross compilers may not add the suffix if given an `-o'
3933	# argument, so we may need to know it at that point already.
3934	# Even if this section looks crufty: it has the advantage of
3935	# actually working.
3936	break;;
3937    * )
3938	break;;
3939  esac
3940done
3941test "$ac_cv_exeext" = no && ac_cv_exeext=
3942
3943else $as_nop
3944  ac_file=''
3945fi
3946if test -z "$ac_file"
3947then :
3948  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
3949printf "%s\n" "no" >&6; }
3950printf "%s\n" "$as_me: failed program was:" >&5
3951sed 's/^/| /' conftest.$ac_ext >&5
3952
3953{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3954printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
3955as_fn_error 77 "C compiler cannot create executables
3956See \`config.log' for more details" "$LINENO" 5; }
3957else $as_nop
3958  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3959printf "%s\n" "yes" >&6; }
3960fi
3961{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3962printf %s "checking for C compiler default output file name... " >&6; }
3963{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3964printf "%s\n" "$ac_file" >&6; }
3965ac_exeext=$ac_cv_exeext
3966
3967rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
3968ac_clean_files=$ac_clean_files_save
3969{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3970printf %s "checking for suffix of executables... " >&6; }
3971if { { ac_try="$ac_link"
3972case "(($ac_try" in
3973  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3974  *) ac_try_echo=$ac_try;;
3975esac
3976eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3977printf "%s\n" "$ac_try_echo"; } >&5
3978  (eval "$ac_link") 2>&5
3979  ac_status=$?
3980  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3981  test $ac_status = 0; }
3982then :
3983  # If both `conftest.exe' and `conftest' are `present' (well, observable)
3984# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
3985# work properly (i.e., refer to `conftest.exe'), while it won't with
3986# `rm'.
3987for ac_file in conftest.exe conftest conftest.*; do
3988  test -f "$ac_file" || continue
3989  case $ac_file in
3990    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3991    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3992	  break;;
3993    * ) break;;
3994  esac
3995done
3996else $as_nop
3997  { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3998printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
3999as_fn_error $? "cannot compute suffix of executables: cannot compile and link
4000See \`config.log' for more details" "$LINENO" 5; }
4001fi
4002rm -f conftest conftest$ac_cv_exeext
4003{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
4004printf "%s\n" "$ac_cv_exeext" >&6; }
4005
4006rm -f conftest.$ac_ext
4007EXEEXT=$ac_cv_exeext
4008ac_exeext=$EXEEXT
4009cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4010/* end confdefs.h.  */
4011#include <stdio.h>
4012int
4013main (void)
4014{
4015FILE *f = fopen ("conftest.out", "w");
4016 return ferror (f) || fclose (f) != 0;
4017
4018  ;
4019  return 0;
4020}
4021_ACEOF
4022ac_clean_files="$ac_clean_files conftest.out"
4023# Check that the compiler produces executables we can run.  If not, either
4024# the compiler is broken, or we cross compile.
4025{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4026printf %s "checking whether we are cross compiling... " >&6; }
4027if test "$cross_compiling" != yes; then
4028  { { ac_try="$ac_link"
4029case "(($ac_try" in
4030  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4031  *) ac_try_echo=$ac_try;;
4032esac
4033eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4034printf "%s\n" "$ac_try_echo"; } >&5
4035  (eval "$ac_link") 2>&5
4036  ac_status=$?
4037  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4038  test $ac_status = 0; }
4039  if { ac_try='./conftest$ac_cv_exeext'
4040  { { case "(($ac_try" in
4041  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4042  *) ac_try_echo=$ac_try;;
4043esac
4044eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4045printf "%s\n" "$ac_try_echo"; } >&5
4046  (eval "$ac_try") 2>&5
4047  ac_status=$?
4048  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4049  test $ac_status = 0; }; }; then
4050    cross_compiling=no
4051  else
4052    if test "$cross_compiling" = maybe; then
4053	cross_compiling=yes
4054    else
4055	{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4056printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
4057as_fn_error 77 "cannot run C compiled programs.
4058If you meant to cross compile, use \`--host'.
4059See \`config.log' for more details" "$LINENO" 5; }
4060    fi
4061  fi
4062fi
4063{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4064printf "%s\n" "$cross_compiling" >&6; }
4065
4066rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4067ac_clean_files=$ac_clean_files_save
4068{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4069printf %s "checking for suffix of object files... " >&6; }
4070if test ${ac_cv_objext+y}
4071then :
4072  printf %s "(cached) " >&6
4073else $as_nop
4074  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4075/* end confdefs.h.  */
4076
4077int
4078main (void)
4079{
4080
4081  ;
4082  return 0;
4083}
4084_ACEOF
4085rm -f conftest.o conftest.obj
4086if { { ac_try="$ac_compile"
4087case "(($ac_try" in
4088  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4089  *) ac_try_echo=$ac_try;;
4090esac
4091eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4092printf "%s\n" "$ac_try_echo"; } >&5
4093  (eval "$ac_compile") 2>&5
4094  ac_status=$?
4095  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4096  test $ac_status = 0; }
4097then :
4098  for ac_file in conftest.o conftest.obj conftest.*; do
4099  test -f "$ac_file" || continue;
4100  case $ac_file in
4101    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
4102    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4103       break;;
4104  esac
4105done
4106else $as_nop
4107  printf "%s\n" "$as_me: failed program was:" >&5
4108sed 's/^/| /' conftest.$ac_ext >&5
4109
4110{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4111printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
4112as_fn_error $? "cannot compute suffix of object files: cannot compile
4113See \`config.log' for more details" "$LINENO" 5; }
4114fi
4115rm -f conftest.$ac_cv_objext conftest.$ac_ext
4116fi
4117{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4118printf "%s\n" "$ac_cv_objext" >&6; }
4119OBJEXT=$ac_cv_objext
4120ac_objext=$OBJEXT
4121{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports GNU C" >&5
4122printf %s "checking whether the compiler supports GNU C... " >&6; }
4123if test ${ac_cv_c_compiler_gnu+y}
4124then :
4125  printf %s "(cached) " >&6
4126else $as_nop
4127  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4128/* end confdefs.h.  */
4129
4130int
4131main (void)
4132{
4133#ifndef __GNUC__
4134       choke me
4135#endif
4136
4137  ;
4138  return 0;
4139}
4140_ACEOF
4141if ac_fn_c_try_compile "$LINENO"
4142then :
4143  ac_compiler_gnu=yes
4144else $as_nop
4145  ac_compiler_gnu=no
4146fi
4147rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
4148ac_cv_c_compiler_gnu=$ac_compiler_gnu
4149
4150fi
4151{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4152printf "%s\n" "$ac_cv_c_compiler_gnu" >&6; }
4153ac_compiler_gnu=$ac_cv_c_compiler_gnu
4154
4155if test $ac_compiler_gnu = yes; then
4156  GCC=yes
4157else
4158  GCC=
4159fi
4160ac_test_CFLAGS=${CFLAGS+y}
4161ac_save_CFLAGS=$CFLAGS
4162{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4163printf %s "checking whether $CC accepts -g... " >&6; }
4164if test ${ac_cv_prog_cc_g+y}
4165then :
4166  printf %s "(cached) " >&6
4167else $as_nop
4168  ac_save_c_werror_flag=$ac_c_werror_flag
4169   ac_c_werror_flag=yes
4170   ac_cv_prog_cc_g=no
4171   CFLAGS="-g"
4172   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4173/* end confdefs.h.  */
4174
4175int
4176main (void)
4177{
4178
4179  ;
4180  return 0;
4181}
4182_ACEOF
4183if ac_fn_c_try_compile "$LINENO"
4184then :
4185  ac_cv_prog_cc_g=yes
4186else $as_nop
4187  CFLAGS=""
4188      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4189/* end confdefs.h.  */
4190
4191int
4192main (void)
4193{
4194
4195  ;
4196  return 0;
4197}
4198_ACEOF
4199if ac_fn_c_try_compile "$LINENO"
4200then :
4201
4202else $as_nop
4203  ac_c_werror_flag=$ac_save_c_werror_flag
4204	 CFLAGS="-g"
4205	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4206/* end confdefs.h.  */
4207
4208int
4209main (void)
4210{
4211
4212  ;
4213  return 0;
4214}
4215_ACEOF
4216if ac_fn_c_try_compile "$LINENO"
4217then :
4218  ac_cv_prog_cc_g=yes
4219fi
4220rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
4221fi
4222rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
4223fi
4224rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
4225   ac_c_werror_flag=$ac_save_c_werror_flag
4226fi
4227{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4228printf "%s\n" "$ac_cv_prog_cc_g" >&6; }
4229if test $ac_test_CFLAGS; then
4230  CFLAGS=$ac_save_CFLAGS
4231elif test $ac_cv_prog_cc_g = yes; then
4232  if test "$GCC" = yes; then
4233    CFLAGS="-g -O2"
4234  else
4235    CFLAGS="-g"
4236  fi
4237else
4238  if test "$GCC" = yes; then
4239    CFLAGS="-O2"
4240  else
4241    CFLAGS=
4242  fi
4243fi
4244ac_prog_cc_stdc=no
4245if test x$ac_prog_cc_stdc = xno
4246then :
4247  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C11 features" >&5
4248printf %s "checking for $CC option to enable C11 features... " >&6; }
4249if test ${ac_cv_prog_cc_c11+y}
4250then :
4251  printf %s "(cached) " >&6
4252else $as_nop
4253  ac_cv_prog_cc_c11=no
4254ac_save_CC=$CC
4255cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4256/* end confdefs.h.  */
4257$ac_c_conftest_c11_program
4258_ACEOF
4259for ac_arg in '' -std=gnu11
4260do
4261  CC="$ac_save_CC $ac_arg"
4262  if ac_fn_c_try_compile "$LINENO"
4263then :
4264  ac_cv_prog_cc_c11=$ac_arg
4265fi
4266rm -f core conftest.err conftest.$ac_objext conftest.beam
4267  test "x$ac_cv_prog_cc_c11" != "xno" && break
4268done
4269rm -f conftest.$ac_ext
4270CC=$ac_save_CC
4271fi
4272
4273if test "x$ac_cv_prog_cc_c11" = xno
4274then :
4275  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4276printf "%s\n" "unsupported" >&6; }
4277else $as_nop
4278  if test "x$ac_cv_prog_cc_c11" = x
4279then :
4280  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4281printf "%s\n" "none needed" >&6; }
4282else $as_nop
4283  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c11" >&5
4284printf "%s\n" "$ac_cv_prog_cc_c11" >&6; }
4285     CC="$CC $ac_cv_prog_cc_c11"
4286fi
4287  ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c11
4288  ac_prog_cc_stdc=c11
4289fi
4290fi
4291if test x$ac_prog_cc_stdc = xno
4292then :
4293  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C99 features" >&5
4294printf %s "checking for $CC option to enable C99 features... " >&6; }
4295if test ${ac_cv_prog_cc_c99+y}
4296then :
4297  printf %s "(cached) " >&6
4298else $as_nop
4299  ac_cv_prog_cc_c99=no
4300ac_save_CC=$CC
4301cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4302/* end confdefs.h.  */
4303$ac_c_conftest_c99_program
4304_ACEOF
4305for ac_arg in '' -std=gnu99 -std=c99 -c99 -qlanglvl=extc1x -qlanglvl=extc99 -AC99 -D_STDC_C99=
4306do
4307  CC="$ac_save_CC $ac_arg"
4308  if ac_fn_c_try_compile "$LINENO"
4309then :
4310  ac_cv_prog_cc_c99=$ac_arg
4311fi
4312rm -f core conftest.err conftest.$ac_objext conftest.beam
4313  test "x$ac_cv_prog_cc_c99" != "xno" && break
4314done
4315rm -f conftest.$ac_ext
4316CC=$ac_save_CC
4317fi
4318
4319if test "x$ac_cv_prog_cc_c99" = xno
4320then :
4321  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4322printf "%s\n" "unsupported" >&6; }
4323else $as_nop
4324  if test "x$ac_cv_prog_cc_c99" = x
4325then :
4326  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4327printf "%s\n" "none needed" >&6; }
4328else $as_nop
4329  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5
4330printf "%s\n" "$ac_cv_prog_cc_c99" >&6; }
4331     CC="$CC $ac_cv_prog_cc_c99"
4332fi
4333  ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99
4334  ac_prog_cc_stdc=c99
4335fi
4336fi
4337if test x$ac_prog_cc_stdc = xno
4338then :
4339  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C89 features" >&5
4340printf %s "checking for $CC option to enable C89 features... " >&6; }
4341if test ${ac_cv_prog_cc_c89+y}
4342then :
4343  printf %s "(cached) " >&6
4344else $as_nop
4345  ac_cv_prog_cc_c89=no
4346ac_save_CC=$CC
4347cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4348/* end confdefs.h.  */
4349$ac_c_conftest_c89_program
4350_ACEOF
4351for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
4352do
4353  CC="$ac_save_CC $ac_arg"
4354  if ac_fn_c_try_compile "$LINENO"
4355then :
4356  ac_cv_prog_cc_c89=$ac_arg
4357fi
4358rm -f core conftest.err conftest.$ac_objext conftest.beam
4359  test "x$ac_cv_prog_cc_c89" != "xno" && break
4360done
4361rm -f conftest.$ac_ext
4362CC=$ac_save_CC
4363fi
4364
4365if test "x$ac_cv_prog_cc_c89" = xno
4366then :
4367  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4368printf "%s\n" "unsupported" >&6; }
4369else $as_nop
4370  if test "x$ac_cv_prog_cc_c89" = x
4371then :
4372  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4373printf "%s\n" "none needed" >&6; }
4374else $as_nop
4375  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4376printf "%s\n" "$ac_cv_prog_cc_c89" >&6; }
4377     CC="$CC $ac_cv_prog_cc_c89"
4378fi
4379  ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89
4380  ac_prog_cc_stdc=c89
4381fi
4382fi
4383
4384ac_ext=c
4385ac_cpp='$CPP $CPPFLAGS'
4386ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4387ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4388ac_compiler_gnu=$ac_cv_c_compiler_gnu
4389
4390
4391ac_header= ac_cache=
4392for ac_item in $ac_header_c_list
4393do
4394  if test $ac_cache; then
4395    ac_fn_c_check_header_compile "$LINENO" $ac_header ac_cv_header_$ac_cache "$ac_includes_default"
4396    if eval test \"x\$ac_cv_header_$ac_cache\" = xyes; then
4397      printf "%s\n" "#define $ac_item 1" >> confdefs.h
4398    fi
4399    ac_header= ac_cache=
4400  elif test $ac_header; then
4401    ac_cache=$ac_item
4402  else
4403    ac_header=$ac_item
4404  fi
4405done
4406
4407
4408
4409
4410
4411
4412
4413
4414if test $ac_cv_header_stdlib_h = yes && test $ac_cv_header_string_h = yes
4415then :
4416
4417printf "%s\n" "#define STDC_HEADERS 1" >>confdefs.h
4418
4419fi
4420
4421
4422
4423
4424
4425
4426  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
4427printf %s "checking whether it is safe to define __EXTENSIONS__... " >&6; }
4428if test ${ac_cv_safe_to_define___extensions__+y}
4429then :
4430  printf %s "(cached) " >&6
4431else $as_nop
4432  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4433/* end confdefs.h.  */
4434
4435#         define __EXTENSIONS__ 1
4436          $ac_includes_default
4437int
4438main (void)
4439{
4440
4441  ;
4442  return 0;
4443}
4444_ACEOF
4445if ac_fn_c_try_compile "$LINENO"
4446then :
4447  ac_cv_safe_to_define___extensions__=yes
4448else $as_nop
4449  ac_cv_safe_to_define___extensions__=no
4450fi
4451rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
4452fi
4453{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
4454printf "%s\n" "$ac_cv_safe_to_define___extensions__" >&6; }
4455
4456  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether _XOPEN_SOURCE should be defined" >&5
4457printf %s "checking whether _XOPEN_SOURCE should be defined... " >&6; }
4458if test ${ac_cv_should_define__xopen_source+y}
4459then :
4460  printf %s "(cached) " >&6
4461else $as_nop
4462  ac_cv_should_define__xopen_source=no
4463    if test $ac_cv_header_wchar_h = yes
4464then :
4465  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4466/* end confdefs.h.  */
4467
4468          #include <wchar.h>
4469          mbstate_t x;
4470int
4471main (void)
4472{
4473
4474  ;
4475  return 0;
4476}
4477_ACEOF
4478if ac_fn_c_try_compile "$LINENO"
4479then :
4480
4481else $as_nop
4482  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4483/* end confdefs.h.  */
4484
4485            #define _XOPEN_SOURCE 500
4486            #include <wchar.h>
4487            mbstate_t x;
4488int
4489main (void)
4490{
4491
4492  ;
4493  return 0;
4494}
4495_ACEOF
4496if ac_fn_c_try_compile "$LINENO"
4497then :
4498  ac_cv_should_define__xopen_source=yes
4499fi
4500rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
4501fi
4502rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
4503fi
4504fi
4505{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_should_define__xopen_source" >&5
4506printf "%s\n" "$ac_cv_should_define__xopen_source" >&6; }
4507
4508  printf "%s\n" "#define _ALL_SOURCE 1" >>confdefs.h
4509
4510  printf "%s\n" "#define _DARWIN_C_SOURCE 1" >>confdefs.h
4511
4512  printf "%s\n" "#define _GNU_SOURCE 1" >>confdefs.h
4513
4514  printf "%s\n" "#define _HPUX_ALT_XOPEN_SOCKET_API 1" >>confdefs.h
4515
4516  printf "%s\n" "#define _NETBSD_SOURCE 1" >>confdefs.h
4517
4518  printf "%s\n" "#define _OPENBSD_SOURCE 1" >>confdefs.h
4519
4520  printf "%s\n" "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
4521
4522  printf "%s\n" "#define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1" >>confdefs.h
4523
4524  printf "%s\n" "#define __STDC_WANT_IEC_60559_BFP_EXT__ 1" >>confdefs.h
4525
4526  printf "%s\n" "#define __STDC_WANT_IEC_60559_DFP_EXT__ 1" >>confdefs.h
4527
4528  printf "%s\n" "#define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1" >>confdefs.h
4529
4530  printf "%s\n" "#define __STDC_WANT_IEC_60559_TYPES_EXT__ 1" >>confdefs.h
4531
4532  printf "%s\n" "#define __STDC_WANT_LIB_EXT2__ 1" >>confdefs.h
4533
4534  printf "%s\n" "#define __STDC_WANT_MATH_SPEC_FUNCS__ 1" >>confdefs.h
4535
4536  printf "%s\n" "#define _TANDEM_SOURCE 1" >>confdefs.h
4537
4538  if test $ac_cv_header_minix_config_h = yes
4539then :
4540  MINIX=yes
4541    printf "%s\n" "#define _MINIX 1" >>confdefs.h
4542
4543    printf "%s\n" "#define _POSIX_SOURCE 1" >>confdefs.h
4544
4545    printf "%s\n" "#define _POSIX_1_SOURCE 2" >>confdefs.h
4546
4547else $as_nop
4548  MINIX=
4549fi
4550  if test $ac_cv_safe_to_define___extensions__ = yes
4551then :
4552  printf "%s\n" "#define __EXTENSIONS__ 1" >>confdefs.h
4553
4554fi
4555  if test $ac_cv_should_define__xopen_source = yes
4556then :
4557  printf "%s\n" "#define _XOPEN_SOURCE 500" >>confdefs.h
4558
4559fi
4560
4561if test "$ac_cv_header_minix_config_h" = "yes"; then
4562
4563printf "%s\n" "#define _NETBSD_SOURCE 1" >>confdefs.h
4564
4565fi
4566
4567case "$prefix" in
4568        NONE)
4569		prefix="/usr/local"
4570        ;;
4571esac
4572case "$exec_prefix" in
4573        NONE)
4574		exec_prefix="$prefix"
4575        ;;
4576esac
4577
4578# are we on MinGW?
4579if uname -s 2>&1 | grep MINGW >/dev/null; then on_mingw="yes"
4580else
4581	if echo $host | grep mingw >/dev/null; then on_mingw="yes"
4582	else on_mingw="no"; fi
4583fi
4584
4585#
4586# Determine configuration file
4587# the eval is to evaluate shell expansion twice
4588UNBOUND_SBIN_DIR=`eval echo "${sbindir}"`
4589
4590UNBOUND_SYSCONF_DIR=`eval echo "${sysconfdir}"`
4591
4592UNBOUND_LOCALSTATE_DIR=`eval echo "${localstatedir}"`
4593
4594if test $on_mingw = "no"; then
4595  ub_conf_file=`eval echo "${sysconfdir}/unbound/unbound.conf"`
4596else
4597  ub_conf_file="C:\\Program Files\\Unbound\\service.conf"
4598fi
4599
4600# Check whether --with-conf_file was given.
4601if test ${with_conf_file+y}
4602then :
4603  withval=$with_conf_file; ub_conf_file="$withval"
4604fi
4605
4606
4607hdr_config="`echo $ub_conf_file | sed -e 's/\\\\/\\\\\\\\/g'`"
4608
4609
4610printf "%s\n" "#define CONFIGFILE \"$hdr_config\"" >>confdefs.h
4611
4612ub_conf_dir=`$as_dirname -- "$ub_conf_file" ||
4613$as_expr X"$ub_conf_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
4614	 X"$ub_conf_file" : 'X\(//\)[^/]' \| \
4615	 X"$ub_conf_file" : 'X\(//\)$' \| \
4616	 X"$ub_conf_file" : 'X\(/\)' \| . 2>/dev/null ||
4617printf "%s\n" X"$ub_conf_file" |
4618    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
4619	    s//\1/
4620	    q
4621	  }
4622	  /^X\(\/\/\)[^/].*/{
4623	    s//\1/
4624	    q
4625	  }
4626	  /^X\(\/\/\)$/{
4627	    s//\1/
4628	    q
4629	  }
4630	  /^X\(\/\).*/{
4631	    s//\1/
4632	    q
4633	  }
4634	  s/.*/./; q'`
4635
4636
4637# Determine run, chroot directory and pidfile locations
4638
4639# Check whether --with-run-dir was given.
4640if test ${with_run_dir+y}
4641then :
4642  withval=$with_run_dir; UNBOUND_RUN_DIR="$withval"
4643else $as_nop
4644  if test $on_mingw = no; then
4645    UNBOUND_RUN_DIR=`dirname "$ub_conf_file"`
4646else
4647    UNBOUND_RUN_DIR=""
4648fi
4649
4650fi
4651
4652
4653hdr_run="`echo $UNBOUND_RUN_DIR | sed -e 's/\\\\/\\\\\\\\/g'`"
4654
4655
4656printf "%s\n" "#define RUN_DIR \"$hdr_run\"" >>confdefs.h
4657
4658
4659
4660# Check whether --with-chroot-dir was given.
4661if test ${with_chroot_dir+y}
4662then :
4663  withval=$with_chroot_dir; UNBOUND_CHROOT_DIR="$withval"
4664else $as_nop
4665  if test $on_mingw = no; then
4666    UNBOUND_CHROOT_DIR="$UNBOUND_RUN_DIR"
4667else
4668    UNBOUND_CHROOT_DIR=""
4669fi
4670
4671fi
4672
4673
4674hdr_chroot="`echo $UNBOUND_CHROOT_DIR | sed -e 's/\\\\/\\\\\\\\/g'`"
4675
4676
4677printf "%s\n" "#define CHROOT_DIR \"$hdr_chroot\"" >>confdefs.h
4678
4679
4680
4681# Check whether --with-share-dir was given.
4682if test ${with_share_dir+y}
4683then :
4684  withval=$with_share_dir; UNBOUND_SHARE_DIR="$withval"
4685else $as_nop
4686  UNBOUND_SHARE_DIR="$UNBOUND_RUN_DIR"
4687fi
4688
4689
4690
4691printf "%s\n" "#define SHARE_DIR \"$UNBOUND_SHARE_DIR\"" >>confdefs.h
4692
4693
4694
4695# Check whether --with-pidfile was given.
4696if test ${with_pidfile+y}
4697then :
4698  withval=$with_pidfile; UNBOUND_PIDFILE="$withval"
4699else $as_nop
4700  if test $on_mingw = no; then
4701    UNBOUND_PIDFILE="$UNBOUND_RUN_DIR/unbound.pid"
4702else
4703    UNBOUND_PIDFILE=""
4704fi
4705
4706fi
4707
4708
4709hdr_pid="`echo $UNBOUND_PIDFILE | sed -e 's/\\\\/\\\\\\\\/g'`"
4710
4711
4712printf "%s\n" "#define PIDFILE \"$hdr_pid\"" >>confdefs.h
4713
4714
4715
4716# Check whether --with-rootkey-file was given.
4717if test ${with_rootkey_file+y}
4718then :
4719  withval=$with_rootkey_file; UNBOUND_ROOTKEY_FILE="$withval"
4720else $as_nop
4721  if test $on_mingw = no; then
4722    UNBOUND_ROOTKEY_FILE="$UNBOUND_RUN_DIR/root.key"
4723else
4724    UNBOUND_ROOTKEY_FILE="C:\\Program Files\\Unbound\\root.key"
4725fi
4726
4727fi
4728
4729
4730hdr_rkey="`echo $UNBOUND_ROOTKEY_FILE | sed -e 's/\\\\/\\\\\\\\/g'`"
4731
4732
4733printf "%s\n" "#define ROOT_ANCHOR_FILE \"$hdr_rkey\"" >>confdefs.h
4734
4735
4736
4737# Check whether --with-rootcert-file was given.
4738if test ${with_rootcert_file+y}
4739then :
4740  withval=$with_rootcert_file; UNBOUND_ROOTCERT_FILE="$withval"
4741else $as_nop
4742  if test $on_mingw = no; then
4743    UNBOUND_ROOTCERT_FILE="$UNBOUND_RUN_DIR/icannbundle.pem"
4744else
4745    UNBOUND_ROOTCERT_FILE="C:\\Program Files\\Unbound\\icannbundle.pem"
4746fi
4747
4748fi
4749
4750
4751hdr_rpem="`echo $UNBOUND_ROOTCERT_FILE | sed -e 's/\\\\/\\\\\\\\/g'`"
4752
4753
4754printf "%s\n" "#define ROOT_CERT_FILE \"$hdr_rpem\"" >>confdefs.h
4755
4756
4757
4758# Check whether --with-username was given.
4759if test ${with_username+y}
4760then :
4761  withval=$with_username; UNBOUND_USERNAME="$withval"
4762else $as_nop
4763  UNBOUND_USERNAME="unbound"
4764fi
4765
4766
4767
4768printf "%s\n" "#define UB_USERNAME \"$UNBOUND_USERNAME\"" >>confdefs.h
4769
4770
4771
4772printf "%s\n" "#define WINVER 0x0502" >>confdefs.h
4773
4774wnvs=`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/' `
4775
4776
4777printf "%s\n" "#define RSRC_PACKAGE_VERSION $wnvs" >>confdefs.h
4778
4779
4780# Check for 'grep -e' program, here, since ACX_CHECK_FLTO needs that.
4781{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4782printf %s "checking for grep that handles long lines and -e... " >&6; }
4783if test ${ac_cv_path_GREP+y}
4784then :
4785  printf %s "(cached) " >&6
4786else $as_nop
4787  if test -z "$GREP"; then
4788  ac_path_GREP_found=false
4789  # Loop through the user's path and test for each of PROGNAME-LIST
4790  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4791for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4792do
4793  IFS=$as_save_IFS
4794  case $as_dir in #(((
4795    '') as_dir=./ ;;
4796    */) ;;
4797    *) as_dir=$as_dir/ ;;
4798  esac
4799    for ac_prog in grep ggrep
4800   do
4801    for ac_exec_ext in '' $ac_executable_extensions; do
4802      ac_path_GREP="$as_dir$ac_prog$ac_exec_ext"
4803      as_fn_executable_p "$ac_path_GREP" || continue
4804# Check for GNU ac_path_GREP and select it if it is found.
4805  # Check for GNU $ac_path_GREP
4806case `"$ac_path_GREP" --version 2>&1` in
4807*GNU*)
4808  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4809*)
4810  ac_count=0
4811  printf %s 0123456789 >"conftest.in"
4812  while :
4813  do
4814    cat "conftest.in" "conftest.in" >"conftest.tmp"
4815    mv "conftest.tmp" "conftest.in"
4816    cp "conftest.in" "conftest.nl"
4817    printf "%s\n" 'GREP' >> "conftest.nl"
4818    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4819    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4820    as_fn_arith $ac_count + 1 && ac_count=$as_val
4821    if test $ac_count -gt ${ac_path_GREP_max-0}; then
4822      # Best one so far, save it but keep looking for a better one
4823      ac_cv_path_GREP="$ac_path_GREP"
4824      ac_path_GREP_max=$ac_count
4825    fi
4826    # 10*(2^10) chars as input seems more than enough
4827    test $ac_count -gt 10 && break
4828  done
4829  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4830esac
4831
4832      $ac_path_GREP_found && break 3
4833    done
4834  done
4835  done
4836IFS=$as_save_IFS
4837  if test -z "$ac_cv_path_GREP"; then
4838    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4839  fi
4840else
4841  ac_cv_path_GREP=$GREP
4842fi
4843
4844fi
4845{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4846printf "%s\n" "$ac_cv_path_GREP" >&6; }
4847 GREP="$ac_cv_path_GREP"
4848
4849
4850
4851# Checks for typedefs, structures, and compiler characteristics.
4852{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
4853printf %s "checking for an ANSI C-conforming const... " >&6; }
4854if test ${ac_cv_c_const+y}
4855then :
4856  printf %s "(cached) " >&6
4857else $as_nop
4858  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4859/* end confdefs.h.  */
4860
4861int
4862main (void)
4863{
4864
4865#ifndef __cplusplus
4866  /* Ultrix mips cc rejects this sort of thing.  */
4867  typedef int charset[2];
4868  const charset cs = { 0, 0 };
4869  /* SunOS 4.1.1 cc rejects this.  */
4870  char const *const *pcpcc;
4871  char **ppc;
4872  /* NEC SVR4.0.2 mips cc rejects this.  */
4873  struct point {int x, y;};
4874  static struct point const zero = {0,0};
4875  /* IBM XL C 1.02.0.0 rejects this.
4876     It does not let you subtract one const X* pointer from another in
4877     an arm of an if-expression whose if-part is not a constant
4878     expression */
4879  const char *g = "string";
4880  pcpcc = &g + (g ? g-g : 0);
4881  /* HPUX 7.0 cc rejects these. */
4882  ++pcpcc;
4883  ppc = (char**) pcpcc;
4884  pcpcc = (char const *const *) ppc;
4885  { /* SCO 3.2v4 cc rejects this sort of thing.  */
4886    char tx;
4887    char *t = &tx;
4888    char const *s = 0 ? (char *) 0 : (char const *) 0;
4889
4890    *t++ = 0;
4891    if (s) return 0;
4892  }
4893  { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
4894    int x[] = {25, 17};
4895    const int *foo = &x[0];
4896    ++foo;
4897  }
4898  { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
4899    typedef const int *iptr;
4900    iptr p = 0;
4901    ++p;
4902  }
4903  { /* IBM XL C 1.02.0.0 rejects this sort of thing, saying
4904       "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
4905    struct s { int j; const int *ap[3]; } bx;
4906    struct s *b = &bx; b->j = 5;
4907  }
4908  { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
4909    const int foo = 10;
4910    if (!foo) return 0;
4911  }
4912  return !cs[0] && !zero.x;
4913#endif
4914
4915  ;
4916  return 0;
4917}
4918_ACEOF
4919if ac_fn_c_try_compile "$LINENO"
4920then :
4921  ac_cv_c_const=yes
4922else $as_nop
4923  ac_cv_c_const=no
4924fi
4925rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
4926fi
4927{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
4928printf "%s\n" "$ac_cv_c_const" >&6; }
4929if test $ac_cv_c_const = no; then
4930
4931printf "%s\n" "#define const /**/" >>confdefs.h
4932
4933fi
4934
4935ac_ext=c
4936ac_cpp='$CPP $CPPFLAGS'
4937ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4938ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4939ac_compiler_gnu=$ac_cv_c_compiler_gnu
4940
4941# allow user to override the -g -O2 flags.
4942default_cflags=no
4943if test "x$CFLAGS" = "x" ; then
4944
4945
4946{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -g" >&5
4947printf %s "checking whether $CC supports -g... " >&6; }
4948cache=`echo g | sed 'y%.=/+-%___p_%'`
4949if eval test \${cv_prog_cc_flag_$cache+y}
4950then :
4951  printf %s "(cached) " >&6
4952else $as_nop
4953
4954echo 'void f(void){}' >conftest.c
4955if test -z "`$CC $CPPFLAGS $CFLAGS -g -c conftest.c 2>&1`"; then
4956eval "cv_prog_cc_flag_$cache=yes"
4957else
4958eval "cv_prog_cc_flag_$cache=no"
4959fi
4960rm -f conftest conftest.o conftest.c
4961
4962fi
4963
4964if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
4965{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4966printf "%s\n" "yes" >&6; }
4967:
4968CFLAGS="$CFLAGS -g"
4969else
4970{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4971printf "%s\n" "no" >&6; }
4972:
4973
4974fi
4975
4976
4977
4978{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -O2" >&5
4979printf %s "checking whether $CC supports -O2... " >&6; }
4980cache=`echo O2 | sed 'y%.=/+-%___p_%'`
4981if eval test \${cv_prog_cc_flag_$cache+y}
4982then :
4983  printf %s "(cached) " >&6
4984else $as_nop
4985
4986echo 'void f(void){}' >conftest.c
4987if test -z "`$CC $CPPFLAGS $CFLAGS -O2 -c conftest.c 2>&1`"; then
4988eval "cv_prog_cc_flag_$cache=yes"
4989else
4990eval "cv_prog_cc_flag_$cache=no"
4991fi
4992rm -f conftest conftest.o conftest.c
4993
4994fi
4995
4996if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
4997{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4998printf "%s\n" "yes" >&6; }
4999:
5000CFLAGS="$CFLAGS -O2"
5001else
5002{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5003printf "%s\n" "no" >&6; }
5004:
5005
5006fi
5007
5008default_cflags=yes
5009fi
5010ac_ext=c
5011ac_cpp='$CPP $CPPFLAGS'
5012ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5013ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5014ac_compiler_gnu=$ac_cv_c_compiler_gnu
5015if test -n "$ac_tool_prefix"; then
5016  # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
5017set dummy ${ac_tool_prefix}gcc; ac_word=$2
5018{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5019printf %s "checking for $ac_word... " >&6; }
5020if test ${ac_cv_prog_CC+y}
5021then :
5022  printf %s "(cached) " >&6
5023else $as_nop
5024  if test -n "$CC"; then
5025  ac_cv_prog_CC="$CC" # Let the user override the test.
5026else
5027as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5028for as_dir in $PATH
5029do
5030  IFS=$as_save_IFS
5031  case $as_dir in #(((
5032    '') as_dir=./ ;;
5033    */) ;;
5034    *) as_dir=$as_dir/ ;;
5035  esac
5036    for ac_exec_ext in '' $ac_executable_extensions; do
5037  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
5038    ac_cv_prog_CC="${ac_tool_prefix}gcc"
5039    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
5040    break 2
5041  fi
5042done
5043  done
5044IFS=$as_save_IFS
5045
5046fi
5047fi
5048CC=$ac_cv_prog_CC
5049if test -n "$CC"; then
5050  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5051printf "%s\n" "$CC" >&6; }
5052else
5053  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5054printf "%s\n" "no" >&6; }
5055fi
5056
5057
5058fi
5059if test -z "$ac_cv_prog_CC"; then
5060  ac_ct_CC=$CC
5061  # Extract the first word of "gcc", so it can be a program name with args.
5062set dummy gcc; ac_word=$2
5063{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5064printf %s "checking for $ac_word... " >&6; }
5065if test ${ac_cv_prog_ac_ct_CC+y}
5066then :
5067  printf %s "(cached) " >&6
5068else $as_nop
5069  if test -n "$ac_ct_CC"; then
5070  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
5071else
5072as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5073for as_dir in $PATH
5074do
5075  IFS=$as_save_IFS
5076  case $as_dir in #(((
5077    '') as_dir=./ ;;
5078    */) ;;
5079    *) as_dir=$as_dir/ ;;
5080  esac
5081    for ac_exec_ext in '' $ac_executable_extensions; do
5082  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
5083    ac_cv_prog_ac_ct_CC="gcc"
5084    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
5085    break 2
5086  fi
5087done
5088  done
5089IFS=$as_save_IFS
5090
5091fi
5092fi
5093ac_ct_CC=$ac_cv_prog_ac_ct_CC
5094if test -n "$ac_ct_CC"; then
5095  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
5096printf "%s\n" "$ac_ct_CC" >&6; }
5097else
5098  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5099printf "%s\n" "no" >&6; }
5100fi
5101
5102  if test "x$ac_ct_CC" = x; then
5103    CC=""
5104  else
5105    case $cross_compiling:$ac_tool_warned in
5106yes:)
5107{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5108printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5109ac_tool_warned=yes ;;
5110esac
5111    CC=$ac_ct_CC
5112  fi
5113else
5114  CC="$ac_cv_prog_CC"
5115fi
5116
5117if test -z "$CC"; then
5118          if test -n "$ac_tool_prefix"; then
5119    # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
5120set dummy ${ac_tool_prefix}cc; ac_word=$2
5121{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5122printf %s "checking for $ac_word... " >&6; }
5123if test ${ac_cv_prog_CC+y}
5124then :
5125  printf %s "(cached) " >&6
5126else $as_nop
5127  if test -n "$CC"; then
5128  ac_cv_prog_CC="$CC" # Let the user override the test.
5129else
5130as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5131for as_dir in $PATH
5132do
5133  IFS=$as_save_IFS
5134  case $as_dir in #(((
5135    '') as_dir=./ ;;
5136    */) ;;
5137    *) as_dir=$as_dir/ ;;
5138  esac
5139    for ac_exec_ext in '' $ac_executable_extensions; do
5140  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
5141    ac_cv_prog_CC="${ac_tool_prefix}cc"
5142    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
5143    break 2
5144  fi
5145done
5146  done
5147IFS=$as_save_IFS
5148
5149fi
5150fi
5151CC=$ac_cv_prog_CC
5152if test -n "$CC"; then
5153  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5154printf "%s\n" "$CC" >&6; }
5155else
5156  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5157printf "%s\n" "no" >&6; }
5158fi
5159
5160
5161  fi
5162fi
5163if test -z "$CC"; then
5164  # Extract the first word of "cc", so it can be a program name with args.
5165set dummy cc; ac_word=$2
5166{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5167printf %s "checking for $ac_word... " >&6; }
5168if test ${ac_cv_prog_CC+y}
5169then :
5170  printf %s "(cached) " >&6
5171else $as_nop
5172  if test -n "$CC"; then
5173  ac_cv_prog_CC="$CC" # Let the user override the test.
5174else
5175  ac_prog_rejected=no
5176as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5177for as_dir in $PATH
5178do
5179  IFS=$as_save_IFS
5180  case $as_dir in #(((
5181    '') as_dir=./ ;;
5182    */) ;;
5183    *) as_dir=$as_dir/ ;;
5184  esac
5185    for ac_exec_ext in '' $ac_executable_extensions; do
5186  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
5187    if test "$as_dir$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
5188       ac_prog_rejected=yes
5189       continue
5190     fi
5191    ac_cv_prog_CC="cc"
5192    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
5193    break 2
5194  fi
5195done
5196  done
5197IFS=$as_save_IFS
5198
5199if test $ac_prog_rejected = yes; then
5200  # We found a bogon in the path, so make sure we never use it.
5201  set dummy $ac_cv_prog_CC
5202  shift
5203  if test $# != 0; then
5204    # We chose a different compiler from the bogus one.
5205    # However, it has the same basename, so the bogon will be chosen
5206    # first if we set CC to just the basename; use the full file name.
5207    shift
5208    ac_cv_prog_CC="$as_dir$ac_word${1+' '}$@"
5209  fi
5210fi
5211fi
5212fi
5213CC=$ac_cv_prog_CC
5214if test -n "$CC"; then
5215  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5216printf "%s\n" "$CC" >&6; }
5217else
5218  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5219printf "%s\n" "no" >&6; }
5220fi
5221
5222
5223fi
5224if test -z "$CC"; then
5225  if test -n "$ac_tool_prefix"; then
5226  for ac_prog in cl.exe
5227  do
5228    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5229set dummy $ac_tool_prefix$ac_prog; ac_word=$2
5230{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5231printf %s "checking for $ac_word... " >&6; }
5232if test ${ac_cv_prog_CC+y}
5233then :
5234  printf %s "(cached) " >&6
5235else $as_nop
5236  if test -n "$CC"; then
5237  ac_cv_prog_CC="$CC" # Let the user override the test.
5238else
5239as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5240for as_dir in $PATH
5241do
5242  IFS=$as_save_IFS
5243  case $as_dir in #(((
5244    '') as_dir=./ ;;
5245    */) ;;
5246    *) as_dir=$as_dir/ ;;
5247  esac
5248    for ac_exec_ext in '' $ac_executable_extensions; do
5249  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
5250    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
5251    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
5252    break 2
5253  fi
5254done
5255  done
5256IFS=$as_save_IFS
5257
5258fi
5259fi
5260CC=$ac_cv_prog_CC
5261if test -n "$CC"; then
5262  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5263printf "%s\n" "$CC" >&6; }
5264else
5265  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5266printf "%s\n" "no" >&6; }
5267fi
5268
5269
5270    test -n "$CC" && break
5271  done
5272fi
5273if test -z "$CC"; then
5274  ac_ct_CC=$CC
5275  for ac_prog in cl.exe
5276do
5277  # Extract the first word of "$ac_prog", so it can be a program name with args.
5278set dummy $ac_prog; ac_word=$2
5279{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5280printf %s "checking for $ac_word... " >&6; }
5281if test ${ac_cv_prog_ac_ct_CC+y}
5282then :
5283  printf %s "(cached) " >&6
5284else $as_nop
5285  if test -n "$ac_ct_CC"; then
5286  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
5287else
5288as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5289for as_dir in $PATH
5290do
5291  IFS=$as_save_IFS
5292  case $as_dir in #(((
5293    '') as_dir=./ ;;
5294    */) ;;
5295    *) as_dir=$as_dir/ ;;
5296  esac
5297    for ac_exec_ext in '' $ac_executable_extensions; do
5298  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
5299    ac_cv_prog_ac_ct_CC="$ac_prog"
5300    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
5301    break 2
5302  fi
5303done
5304  done
5305IFS=$as_save_IFS
5306
5307fi
5308fi
5309ac_ct_CC=$ac_cv_prog_ac_ct_CC
5310if test -n "$ac_ct_CC"; then
5311  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
5312printf "%s\n" "$ac_ct_CC" >&6; }
5313else
5314  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5315printf "%s\n" "no" >&6; }
5316fi
5317
5318
5319  test -n "$ac_ct_CC" && break
5320done
5321
5322  if test "x$ac_ct_CC" = x; then
5323    CC=""
5324  else
5325    case $cross_compiling:$ac_tool_warned in
5326yes:)
5327{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5328printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5329ac_tool_warned=yes ;;
5330esac
5331    CC=$ac_ct_CC
5332  fi
5333fi
5334
5335fi
5336if test -z "$CC"; then
5337  if test -n "$ac_tool_prefix"; then
5338  # Extract the first word of "${ac_tool_prefix}clang", so it can be a program name with args.
5339set dummy ${ac_tool_prefix}clang; ac_word=$2
5340{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5341printf %s "checking for $ac_word... " >&6; }
5342if test ${ac_cv_prog_CC+y}
5343then :
5344  printf %s "(cached) " >&6
5345else $as_nop
5346  if test -n "$CC"; then
5347  ac_cv_prog_CC="$CC" # Let the user override the test.
5348else
5349as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5350for as_dir in $PATH
5351do
5352  IFS=$as_save_IFS
5353  case $as_dir in #(((
5354    '') as_dir=./ ;;
5355    */) ;;
5356    *) as_dir=$as_dir/ ;;
5357  esac
5358    for ac_exec_ext in '' $ac_executable_extensions; do
5359  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
5360    ac_cv_prog_CC="${ac_tool_prefix}clang"
5361    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
5362    break 2
5363  fi
5364done
5365  done
5366IFS=$as_save_IFS
5367
5368fi
5369fi
5370CC=$ac_cv_prog_CC
5371if test -n "$CC"; then
5372  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5373printf "%s\n" "$CC" >&6; }
5374else
5375  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5376printf "%s\n" "no" >&6; }
5377fi
5378
5379
5380fi
5381if test -z "$ac_cv_prog_CC"; then
5382  ac_ct_CC=$CC
5383  # Extract the first word of "clang", so it can be a program name with args.
5384set dummy clang; ac_word=$2
5385{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5386printf %s "checking for $ac_word... " >&6; }
5387if test ${ac_cv_prog_ac_ct_CC+y}
5388then :
5389  printf %s "(cached) " >&6
5390else $as_nop
5391  if test -n "$ac_ct_CC"; then
5392  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
5393else
5394as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5395for as_dir in $PATH
5396do
5397  IFS=$as_save_IFS
5398  case $as_dir in #(((
5399    '') as_dir=./ ;;
5400    */) ;;
5401    *) as_dir=$as_dir/ ;;
5402  esac
5403    for ac_exec_ext in '' $ac_executable_extensions; do
5404  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
5405    ac_cv_prog_ac_ct_CC="clang"
5406    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
5407    break 2
5408  fi
5409done
5410  done
5411IFS=$as_save_IFS
5412
5413fi
5414fi
5415ac_ct_CC=$ac_cv_prog_ac_ct_CC
5416if test -n "$ac_ct_CC"; then
5417  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
5418printf "%s\n" "$ac_ct_CC" >&6; }
5419else
5420  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5421printf "%s\n" "no" >&6; }
5422fi
5423
5424  if test "x$ac_ct_CC" = x; then
5425    CC=""
5426  else
5427    case $cross_compiling:$ac_tool_warned in
5428yes:)
5429{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5430printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5431ac_tool_warned=yes ;;
5432esac
5433    CC=$ac_ct_CC
5434  fi
5435else
5436  CC="$ac_cv_prog_CC"
5437fi
5438
5439fi
5440
5441
5442test -z "$CC" && { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5443printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
5444as_fn_error $? "no acceptable C compiler found in \$PATH
5445See \`config.log' for more details" "$LINENO" 5; }
5446
5447# Provide some information about the compiler.
5448printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
5449set X $ac_compile
5450ac_compiler=$2
5451for ac_option in --version -v -V -qversion -version; do
5452  { { ac_try="$ac_compiler $ac_option >&5"
5453case "(($ac_try" in
5454  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5455  *) ac_try_echo=$ac_try;;
5456esac
5457eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5458printf "%s\n" "$ac_try_echo"; } >&5
5459  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
5460  ac_status=$?
5461  if test -s conftest.err; then
5462    sed '10a\
5463... rest of stderr output deleted ...
5464         10q' conftest.err >conftest.er1
5465    cat conftest.er1 >&5
5466  fi
5467  rm -f conftest.er1 conftest.err
5468  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5469  test $ac_status = 0; }
5470done
5471
5472{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports GNU C" >&5
5473printf %s "checking whether the compiler supports GNU C... " >&6; }
5474if test ${ac_cv_c_compiler_gnu+y}
5475then :
5476  printf %s "(cached) " >&6
5477else $as_nop
5478  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5479/* end confdefs.h.  */
5480
5481int
5482main (void)
5483{
5484#ifndef __GNUC__
5485       choke me
5486#endif
5487
5488  ;
5489  return 0;
5490}
5491_ACEOF
5492if ac_fn_c_try_compile "$LINENO"
5493then :
5494  ac_compiler_gnu=yes
5495else $as_nop
5496  ac_compiler_gnu=no
5497fi
5498rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
5499ac_cv_c_compiler_gnu=$ac_compiler_gnu
5500
5501fi
5502{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
5503printf "%s\n" "$ac_cv_c_compiler_gnu" >&6; }
5504ac_compiler_gnu=$ac_cv_c_compiler_gnu
5505
5506if test $ac_compiler_gnu = yes; then
5507  GCC=yes
5508else
5509  GCC=
5510fi
5511ac_test_CFLAGS=${CFLAGS+y}
5512ac_save_CFLAGS=$CFLAGS
5513{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
5514printf %s "checking whether $CC accepts -g... " >&6; }
5515if test ${ac_cv_prog_cc_g+y}
5516then :
5517  printf %s "(cached) " >&6
5518else $as_nop
5519  ac_save_c_werror_flag=$ac_c_werror_flag
5520   ac_c_werror_flag=yes
5521   ac_cv_prog_cc_g=no
5522   CFLAGS="-g"
5523   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5524/* end confdefs.h.  */
5525
5526int
5527main (void)
5528{
5529
5530  ;
5531  return 0;
5532}
5533_ACEOF
5534if ac_fn_c_try_compile "$LINENO"
5535then :
5536  ac_cv_prog_cc_g=yes
5537else $as_nop
5538  CFLAGS=""
5539      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5540/* end confdefs.h.  */
5541
5542int
5543main (void)
5544{
5545
5546  ;
5547  return 0;
5548}
5549_ACEOF
5550if ac_fn_c_try_compile "$LINENO"
5551then :
5552
5553else $as_nop
5554  ac_c_werror_flag=$ac_save_c_werror_flag
5555	 CFLAGS="-g"
5556	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5557/* end confdefs.h.  */
5558
5559int
5560main (void)
5561{
5562
5563  ;
5564  return 0;
5565}
5566_ACEOF
5567if ac_fn_c_try_compile "$LINENO"
5568then :
5569  ac_cv_prog_cc_g=yes
5570fi
5571rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
5572fi
5573rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
5574fi
5575rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
5576   ac_c_werror_flag=$ac_save_c_werror_flag
5577fi
5578{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
5579printf "%s\n" "$ac_cv_prog_cc_g" >&6; }
5580if test $ac_test_CFLAGS; then
5581  CFLAGS=$ac_save_CFLAGS
5582elif test $ac_cv_prog_cc_g = yes; then
5583  if test "$GCC" = yes; then
5584    CFLAGS="-g -O2"
5585  else
5586    CFLAGS="-g"
5587  fi
5588else
5589  if test "$GCC" = yes; then
5590    CFLAGS="-O2"
5591  else
5592    CFLAGS=
5593  fi
5594fi
5595ac_prog_cc_stdc=no
5596if test x$ac_prog_cc_stdc = xno
5597then :
5598  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C11 features" >&5
5599printf %s "checking for $CC option to enable C11 features... " >&6; }
5600if test ${ac_cv_prog_cc_c11+y}
5601then :
5602  printf %s "(cached) " >&6
5603else $as_nop
5604  ac_cv_prog_cc_c11=no
5605ac_save_CC=$CC
5606cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5607/* end confdefs.h.  */
5608$ac_c_conftest_c11_program
5609_ACEOF
5610for ac_arg in '' -std=gnu11
5611do
5612  CC="$ac_save_CC $ac_arg"
5613  if ac_fn_c_try_compile "$LINENO"
5614then :
5615  ac_cv_prog_cc_c11=$ac_arg
5616fi
5617rm -f core conftest.err conftest.$ac_objext conftest.beam
5618  test "x$ac_cv_prog_cc_c11" != "xno" && break
5619done
5620rm -f conftest.$ac_ext
5621CC=$ac_save_CC
5622fi
5623
5624if test "x$ac_cv_prog_cc_c11" = xno
5625then :
5626  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
5627printf "%s\n" "unsupported" >&6; }
5628else $as_nop
5629  if test "x$ac_cv_prog_cc_c11" = x
5630then :
5631  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
5632printf "%s\n" "none needed" >&6; }
5633else $as_nop
5634  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c11" >&5
5635printf "%s\n" "$ac_cv_prog_cc_c11" >&6; }
5636     CC="$CC $ac_cv_prog_cc_c11"
5637fi
5638  ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c11
5639  ac_prog_cc_stdc=c11
5640fi
5641fi
5642if test x$ac_prog_cc_stdc = xno
5643then :
5644  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C99 features" >&5
5645printf %s "checking for $CC option to enable C99 features... " >&6; }
5646if test ${ac_cv_prog_cc_c99+y}
5647then :
5648  printf %s "(cached) " >&6
5649else $as_nop
5650  ac_cv_prog_cc_c99=no
5651ac_save_CC=$CC
5652cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5653/* end confdefs.h.  */
5654$ac_c_conftest_c99_program
5655_ACEOF
5656for ac_arg in '' -std=gnu99 -std=c99 -c99 -qlanglvl=extc1x -qlanglvl=extc99 -AC99 -D_STDC_C99=
5657do
5658  CC="$ac_save_CC $ac_arg"
5659  if ac_fn_c_try_compile "$LINENO"
5660then :
5661  ac_cv_prog_cc_c99=$ac_arg
5662fi
5663rm -f core conftest.err conftest.$ac_objext conftest.beam
5664  test "x$ac_cv_prog_cc_c99" != "xno" && break
5665done
5666rm -f conftest.$ac_ext
5667CC=$ac_save_CC
5668fi
5669
5670if test "x$ac_cv_prog_cc_c99" = xno
5671then :
5672  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
5673printf "%s\n" "unsupported" >&6; }
5674else $as_nop
5675  if test "x$ac_cv_prog_cc_c99" = x
5676then :
5677  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
5678printf "%s\n" "none needed" >&6; }
5679else $as_nop
5680  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5
5681printf "%s\n" "$ac_cv_prog_cc_c99" >&6; }
5682     CC="$CC $ac_cv_prog_cc_c99"
5683fi
5684  ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99
5685  ac_prog_cc_stdc=c99
5686fi
5687fi
5688if test x$ac_prog_cc_stdc = xno
5689then :
5690  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C89 features" >&5
5691printf %s "checking for $CC option to enable C89 features... " >&6; }
5692if test ${ac_cv_prog_cc_c89+y}
5693then :
5694  printf %s "(cached) " >&6
5695else $as_nop
5696  ac_cv_prog_cc_c89=no
5697ac_save_CC=$CC
5698cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5699/* end confdefs.h.  */
5700$ac_c_conftest_c89_program
5701_ACEOF
5702for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
5703do
5704  CC="$ac_save_CC $ac_arg"
5705  if ac_fn_c_try_compile "$LINENO"
5706then :
5707  ac_cv_prog_cc_c89=$ac_arg
5708fi
5709rm -f core conftest.err conftest.$ac_objext conftest.beam
5710  test "x$ac_cv_prog_cc_c89" != "xno" && break
5711done
5712rm -f conftest.$ac_ext
5713CC=$ac_save_CC
5714fi
5715
5716if test "x$ac_cv_prog_cc_c89" = xno
5717then :
5718  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
5719printf "%s\n" "unsupported" >&6; }
5720else $as_nop
5721  if test "x$ac_cv_prog_cc_c89" = x
5722then :
5723  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
5724printf "%s\n" "none needed" >&6; }
5725else $as_nop
5726  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
5727printf "%s\n" "$ac_cv_prog_cc_c89" >&6; }
5728     CC="$CC $ac_cv_prog_cc_c89"
5729fi
5730  ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89
5731  ac_prog_cc_stdc=c89
5732fi
5733fi
5734
5735ac_ext=c
5736ac_cpp='$CPP $CPPFLAGS'
5737ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5738ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5739ac_compiler_gnu=$ac_cv_c_compiler_gnu
5740
5741
5742{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking $CC dependency flag" >&5
5743printf %s "checking $CC dependency flag... " >&6; }
5744echo 'void f(void){}' >conftest.c
5745if test "`$CC -MM conftest.c 2>&1`" = "conftest.o: conftest.c"; then
5746	DEPFLAG="-MM"
5747else
5748  if test "`$CC -xM1 conftest.c 2>&1`" = "conftest.o: conftest.c"; then
5749	DEPFLAG="-xM1"
5750  else
5751	DEPFLAG="-MM"  # dunno do something
5752  fi
5753fi
5754{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $DEPFLAG" >&5
5755printf "%s\n" "$DEPFLAG" >&6; }
5756rm -f conftest.c
5757
5758
5759
5760
5761
5762{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Werror" >&5
5763printf %s "checking whether $CC supports -Werror... " >&6; }
5764cache=`echo Werror | sed 'y%.=/+-%___p_%'`
5765if eval test \${cv_prog_cc_flag_$cache+y}
5766then :
5767  printf %s "(cached) " >&6
5768else $as_nop
5769
5770echo 'void f(void){}' >conftest.c
5771if test -z "`$CC $CPPFLAGS $CFLAGS -Werror -c conftest.c 2>&1`"; then
5772eval "cv_prog_cc_flag_$cache=yes"
5773else
5774eval "cv_prog_cc_flag_$cache=no"
5775fi
5776rm -f conftest conftest.o conftest.c
5777
5778fi
5779
5780if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
5781{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5782printf "%s\n" "yes" >&6; }
5783:
5784ERRFLAG="-Werror"
5785else
5786{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5787printf "%s\n" "no" >&6; }
5788:
5789ERRFLAG="-errwarn"
5790fi
5791
5792
5793
5794{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wall" >&5
5795printf %s "checking whether $CC supports -Wall... " >&6; }
5796cache=`echo Wall | sed 'y%.=/+-%___p_%'`
5797if eval test \${cv_prog_cc_flag_$cache+y}
5798then :
5799  printf %s "(cached) " >&6
5800else $as_nop
5801
5802echo 'void f(void){}' >conftest.c
5803if test -z "`$CC $CPPFLAGS $CFLAGS -Wall -c conftest.c 2>&1`"; then
5804eval "cv_prog_cc_flag_$cache=yes"
5805else
5806eval "cv_prog_cc_flag_$cache=no"
5807fi
5808rm -f conftest conftest.o conftest.c
5809
5810fi
5811
5812if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
5813{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5814printf "%s\n" "yes" >&6; }
5815:
5816ERRFLAG="$ERRFLAG -Wall"
5817else
5818{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5819printf "%s\n" "no" >&6; }
5820:
5821ERRFLAG="$ERRFLAG -errfmt"
5822fi
5823
5824
5825
5826
5827
5828{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -std=c99" >&5
5829printf %s "checking whether $CC supports -std=c99... " >&6; }
5830cache=`echo std=c99 | sed 'y%.=/+-%___p_%'`
5831if eval test \${cv_prog_cc_flag_$cache+y}
5832then :
5833  printf %s "(cached) " >&6
5834else $as_nop
5835
5836echo 'void f(void){}' >conftest.c
5837if test -z "`$CC $CPPFLAGS $CFLAGS -std=c99 -c conftest.c 2>&1`"; then
5838eval "cv_prog_cc_flag_$cache=yes"
5839else
5840eval "cv_prog_cc_flag_$cache=no"
5841fi
5842rm -f conftest conftest.o conftest.c
5843
5844fi
5845
5846if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
5847{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5848printf "%s\n" "yes" >&6; }
5849:
5850C99FLAG="-std=c99"
5851else
5852{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5853printf "%s\n" "no" >&6; }
5854:
5855
5856fi
5857
5858
5859
5860{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -xc99" >&5
5861printf %s "checking whether $CC supports -xc99... " >&6; }
5862cache=`echo xc99 | sed 'y%.=/+-%___p_%'`
5863if eval test \${cv_prog_cc_flag_$cache+y}
5864then :
5865  printf %s "(cached) " >&6
5866else $as_nop
5867
5868echo 'void f(void){}' >conftest.c
5869if test -z "`$CC $CPPFLAGS $CFLAGS -xc99 -c conftest.c 2>&1`"; then
5870eval "cv_prog_cc_flag_$cache=yes"
5871else
5872eval "cv_prog_cc_flag_$cache=no"
5873fi
5874rm -f conftest conftest.o conftest.c
5875
5876fi
5877
5878if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
5879{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5880printf "%s\n" "yes" >&6; }
5881:
5882C99FLAG="-xc99"
5883else
5884{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5885printf "%s\n" "no" >&6; }
5886:
5887
5888fi
5889
5890
5891ac_fn_c_check_header_compile "$LINENO" "getopt.h" "ac_cv_header_getopt_h" "$ac_includes_default
5892"
5893if test "x$ac_cv_header_getopt_h" = xyes
5894then :
5895  printf "%s\n" "#define HAVE_GETOPT_H 1" >>confdefs.h
5896
5897fi
5898ac_fn_c_check_header_compile "$LINENO" "time.h" "ac_cv_header_time_h" "$ac_includes_default
5899"
5900if test "x$ac_cv_header_time_h" = xyes
5901then :
5902  printf "%s\n" "#define HAVE_TIME_H 1" >>confdefs.h
5903
5904fi
5905
5906
5907
5908
5909
5910{ 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
5911printf %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; }
5912cache=`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`
5913if eval test \${cv_prog_cc_flag_needed_$cache+y}
5914then :
5915  printf %s "(cached) " >&6
5916else $as_nop
5917
5918echo '
5919#include "confdefs.h"
5920#include <stdlib.h>
5921#include <ctype.h>
5922#include <sys/time.h>
5923#ifdef HAVE_TIME_H
5924#include <time.h>
5925#endif
5926#include <unistd.h>
5927#include <netdb.h>
5928#ifdef HAVE_GETOPT_H
5929#include <getopt.h>
5930#endif
5931
5932int test(void) {
5933	int a;
5934	char **opts = NULL;
5935	struct timeval tv;
5936	char *t;
5937	time_t time = 0;
5938	char *buf = NULL;
5939	const char* str = NULL;
5940	struct msghdr msg;
5941	msg.msg_control = 0;
5942	t = ctime_r(&time, buf);
5943	tv.tv_usec = 10;
5944	srandom(32);
5945	a = getopt(2, opts, "a");
5946	a = isascii(32);
5947	str = gai_strerror(0);
5948	if(str && t && tv.tv_usec && msg.msg_control)
5949		a = 0;
5950	return a;
5951}
5952' > conftest.c
5953echo 'void f(void){}' >>conftest.c
5954if test -z "`$CC $CPPFLAGS $CFLAGS $ERRFLAG -c conftest.c 2>&1`"; then
5955eval "cv_prog_cc_flag_needed_$cache=no"
5956else
5957
5958if 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
5959eval "cv_prog_cc_flag_needed_$cache=yes"
5960else
5961eval "cv_prog_cc_flag_needed_$cache=fail"
5962#echo 'Test with flag fails too!'
5963#cat conftest.c
5964#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"
5965#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`
5966#exit 1
5967fi
5968
5969fi
5970rm -f conftest conftest.c conftest.o
5971
5972fi
5973
5974if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = yes"; then
5975{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5976printf "%s\n" "yes" >&6; }
5977:
5978CFLAGS="$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"
5979else
5980if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = no"; then
5981{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5982printf "%s\n" "no" >&6; }
5983#echo 'Test with flag is no!'
5984#cat conftest.c
5985#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"
5986#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`
5987#exit 1
5988:
5989
5990else
5991{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: failed" >&5
5992printf "%s\n" "failed" >&6; }
5993:
5994
5995fi
5996fi
5997
5998
5999
6000
6001
6002{ 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
6003printf %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; }
6004cache=`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`
6005if eval test \${cv_prog_cc_flag_needed_$cache+y}
6006then :
6007  printf %s "(cached) " >&6
6008else $as_nop
6009
6010echo '
6011#include "confdefs.h"
6012#include <stdlib.h>
6013#include <ctype.h>
6014#include <sys/time.h>
6015#ifdef HAVE_TIME_H
6016#include <time.h>
6017#endif
6018#include <unistd.h>
6019#include <netdb.h>
6020#ifdef HAVE_GETOPT_H
6021#include <getopt.h>
6022#endif
6023
6024int test(void) {
6025	int a;
6026	char **opts = NULL;
6027	struct timeval tv;
6028	char *t;
6029	time_t time = 0;
6030	char *buf = NULL;
6031	const char* str = NULL;
6032	struct msghdr msg;
6033	msg.msg_control = 0;
6034	t = ctime_r(&time, buf);
6035	tv.tv_usec = 10;
6036	srandom(32);
6037	a = getopt(2, opts, "a");
6038	a = isascii(32);
6039	str = gai_strerror(0);
6040	if(str && t && tv.tv_usec && msg.msg_control)
6041		a = 0;
6042	return a;
6043}
6044' > conftest.c
6045echo 'void f(void){}' >>conftest.c
6046if test -z "`$CC $CPPFLAGS $CFLAGS $ERRFLAG -c conftest.c 2>&1`"; then
6047eval "cv_prog_cc_flag_needed_$cache=no"
6048else
6049
6050if 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
6051eval "cv_prog_cc_flag_needed_$cache=yes"
6052else
6053eval "cv_prog_cc_flag_needed_$cache=fail"
6054#echo 'Test with flag fails too!'
6055#cat conftest.c
6056#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"
6057#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`
6058#exit 1
6059fi
6060
6061fi
6062rm -f conftest conftest.c conftest.o
6063
6064fi
6065
6066if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = yes"; then
6067{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6068printf "%s\n" "yes" >&6; }
6069:
6070CFLAGS="$CFLAGS $C99FLAG -D__EXTENSIONS__ -D_BSD_SOURCE -D_DEFAULT_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -D_ALL_SOURCE"
6071else
6072if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = no"; then
6073{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6074printf "%s\n" "no" >&6; }
6075#echo 'Test with flag is no!'
6076#cat conftest.c
6077#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"
6078#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`
6079#exit 1
6080:
6081
6082else
6083{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: failed" >&5
6084printf "%s\n" "failed" >&6; }
6085:
6086
6087fi
6088fi
6089
6090
6091
6092
6093
6094{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we need $C99FLAG as a flag for $CC" >&5
6095printf %s "checking whether we need $C99FLAG as a flag for $CC... " >&6; }
6096cache=`printf "%s\n" "$C99FLAG" | $as_tr_sh`
6097if eval test \${cv_prog_cc_flag_needed_$cache+y}
6098then :
6099  printf %s "(cached) " >&6
6100else $as_nop
6101
6102echo '
6103#include <stdbool.h>
6104#include <ctype.h>
6105int test(void) {
6106        int a = 0;
6107        return a;
6108}
6109' > conftest.c
6110echo 'void f(void){}' >>conftest.c
6111if test -z "`$CC $CPPFLAGS $CFLAGS $ERRFLAG -c conftest.c 2>&1`"; then
6112eval "cv_prog_cc_flag_needed_$cache=no"
6113else
6114
6115if test -z "`$CC $CPPFLAGS $CFLAGS $C99FLAG $ERRFLAG -c conftest.c 2>&1`"; then
6116eval "cv_prog_cc_flag_needed_$cache=yes"
6117else
6118eval "cv_prog_cc_flag_needed_$cache=fail"
6119#echo 'Test with flag fails too!'
6120#cat conftest.c
6121#echo "$CC $CPPFLAGS $CFLAGS $C99FLAG $ERRFLAG -c conftest.c 2>&1"
6122#echo `$CC $CPPFLAGS $CFLAGS $C99FLAG $ERRFLAG -c conftest.c 2>&1`
6123#exit 1
6124fi
6125
6126fi
6127rm -f conftest conftest.c conftest.o
6128
6129fi
6130
6131if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = yes"; then
6132{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6133printf "%s\n" "yes" >&6; }
6134:
6135CFLAGS="$CFLAGS $C99FLAG"
6136else
6137if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = no"; then
6138{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6139printf "%s\n" "no" >&6; }
6140#echo 'Test with flag is no!'
6141#cat conftest.c
6142#echo "$CC $CPPFLAGS $CFLAGS $C99FLAG $ERRFLAG -c conftest.c 2>&1"
6143#echo `$CC $CPPFLAGS $CFLAGS $C99FLAG $ERRFLAG -c conftest.c 2>&1`
6144#exit 1
6145:
6146
6147else
6148{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: failed" >&5
6149printf "%s\n" "failed" >&6; }
6150:
6151
6152fi
6153fi
6154
6155
6156
6157
6158
6159{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we need -D_BSD_SOURCE -D_DEFAULT_SOURCE as a flag for $CC" >&5
6160printf %s "checking whether we need -D_BSD_SOURCE -D_DEFAULT_SOURCE as a flag for $CC... " >&6; }
6161cache=_D_BSD_SOURCE__D_DEFAULT_SOURCE
6162if eval test \${cv_prog_cc_flag_needed_$cache+y}
6163then :
6164  printf %s "(cached) " >&6
6165else $as_nop
6166
6167echo '
6168#include <ctype.h>
6169
6170int test(void) {
6171        int a;
6172        a = isascii(32);
6173        return a;
6174}
6175' > conftest.c
6176echo 'void f(void){}' >>conftest.c
6177if test -z "`$CC $CPPFLAGS $CFLAGS $ERRFLAG -c conftest.c 2>&1`"; then
6178eval "cv_prog_cc_flag_needed_$cache=no"
6179else
6180
6181if test -z "`$CC $CPPFLAGS $CFLAGS -D_BSD_SOURCE -D_DEFAULT_SOURCE $ERRFLAG -c conftest.c 2>&1`"; then
6182eval "cv_prog_cc_flag_needed_$cache=yes"
6183else
6184eval "cv_prog_cc_flag_needed_$cache=fail"
6185#echo 'Test with flag fails too!'
6186#cat conftest.c
6187#echo "$CC $CPPFLAGS $CFLAGS -D_BSD_SOURCE -D_DEFAULT_SOURCE $ERRFLAG -c conftest.c 2>&1"
6188#echo `$CC $CPPFLAGS $CFLAGS -D_BSD_SOURCE -D_DEFAULT_SOURCE $ERRFLAG -c conftest.c 2>&1`
6189#exit 1
6190fi
6191
6192fi
6193rm -f conftest conftest.c conftest.o
6194
6195fi
6196
6197if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = yes"; then
6198{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6199printf "%s\n" "yes" >&6; }
6200:
6201CFLAGS="$CFLAGS -D_BSD_SOURCE -D_DEFAULT_SOURCE"
6202else
6203if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = no"; then
6204{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6205printf "%s\n" "no" >&6; }
6206#echo 'Test with flag is no!'
6207#cat conftest.c
6208#echo "$CC $CPPFLAGS $CFLAGS -D_BSD_SOURCE -D_DEFAULT_SOURCE $ERRFLAG -c conftest.c 2>&1"
6209#echo `$CC $CPPFLAGS $CFLAGS -D_BSD_SOURCE -D_DEFAULT_SOURCE $ERRFLAG -c conftest.c 2>&1`
6210#exit 1
6211:
6212
6213else
6214{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: failed" >&5
6215printf "%s\n" "failed" >&6; }
6216:
6217
6218fi
6219fi
6220
6221
6222
6223
6224
6225{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we need -D_GNU_SOURCE as a flag for $CC" >&5
6226printf %s "checking whether we need -D_GNU_SOURCE as a flag for $CC... " >&6; }
6227cache=_D_GNU_SOURCE
6228if eval test \${cv_prog_cc_flag_needed_$cache+y}
6229then :
6230  printf %s "(cached) " >&6
6231else $as_nop
6232
6233echo '
6234#include <netinet/in.h>
6235
6236int test(void) {
6237        struct in6_pktinfo inf;
6238	int a = (int)sizeof(inf);
6239        return a;
6240}
6241' > conftest.c
6242echo 'void f(void){}' >>conftest.c
6243if test -z "`$CC $CPPFLAGS $CFLAGS $ERRFLAG -c conftest.c 2>&1`"; then
6244eval "cv_prog_cc_flag_needed_$cache=no"
6245else
6246
6247if test -z "`$CC $CPPFLAGS $CFLAGS -D_GNU_SOURCE $ERRFLAG -c conftest.c 2>&1`"; then
6248eval "cv_prog_cc_flag_needed_$cache=yes"
6249else
6250eval "cv_prog_cc_flag_needed_$cache=fail"
6251#echo 'Test with flag fails too!'
6252#cat conftest.c
6253#echo "$CC $CPPFLAGS $CFLAGS -D_GNU_SOURCE $ERRFLAG -c conftest.c 2>&1"
6254#echo `$CC $CPPFLAGS $CFLAGS -D_GNU_SOURCE $ERRFLAG -c conftest.c 2>&1`
6255#exit 1
6256fi
6257
6258fi
6259rm -f conftest conftest.c conftest.o
6260
6261fi
6262
6263if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = yes"; then
6264{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6265printf "%s\n" "yes" >&6; }
6266:
6267CFLAGS="$CFLAGS -D_GNU_SOURCE"
6268else
6269if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = no"; then
6270{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6271printf "%s\n" "no" >&6; }
6272#echo 'Test with flag is no!'
6273#cat conftest.c
6274#echo "$CC $CPPFLAGS $CFLAGS -D_GNU_SOURCE $ERRFLAG -c conftest.c 2>&1"
6275#echo `$CC $CPPFLAGS $CFLAGS -D_GNU_SOURCE $ERRFLAG -c conftest.c 2>&1`
6276#exit 1
6277:
6278
6279else
6280{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: failed" >&5
6281printf "%s\n" "failed" >&6; }
6282:
6283
6284fi
6285fi
6286
6287
6288# check again for GNU_SOURCE for setresgid. May fail if setresgid
6289# is not available at all. -D_FRSRESGID is to make this check unique.
6290# otherwise we would get the previous cached result.
6291
6292
6293
6294{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we need -D_GNU_SOURCE -D_FRSRESGID as a flag for $CC" >&5
6295printf %s "checking whether we need -D_GNU_SOURCE -D_FRSRESGID as a flag for $CC... " >&6; }
6296cache=_D_GNU_SOURCE__D_FRSRESGID
6297if eval test \${cv_prog_cc_flag_needed_$cache+y}
6298then :
6299  printf %s "(cached) " >&6
6300else $as_nop
6301
6302echo '
6303#include <unistd.h>
6304
6305int test(void) {
6306	int a = setresgid(0,0,0);
6307	a = setresuid(0,0,0);
6308        return a;
6309}
6310' > conftest.c
6311echo 'void f(void){}' >>conftest.c
6312if test -z "`$CC $CPPFLAGS $CFLAGS $ERRFLAG -c conftest.c 2>&1`"; then
6313eval "cv_prog_cc_flag_needed_$cache=no"
6314else
6315
6316if test -z "`$CC $CPPFLAGS $CFLAGS -D_GNU_SOURCE -D_FRSRESGID $ERRFLAG -c conftest.c 2>&1`"; then
6317eval "cv_prog_cc_flag_needed_$cache=yes"
6318else
6319eval "cv_prog_cc_flag_needed_$cache=fail"
6320#echo 'Test with flag fails too!'
6321#cat conftest.c
6322#echo "$CC $CPPFLAGS $CFLAGS -D_GNU_SOURCE -D_FRSRESGID $ERRFLAG -c conftest.c 2>&1"
6323#echo `$CC $CPPFLAGS $CFLAGS -D_GNU_SOURCE -D_FRSRESGID $ERRFLAG -c conftest.c 2>&1`
6324#exit 1
6325fi
6326
6327fi
6328rm -f conftest conftest.c conftest.o
6329
6330fi
6331
6332if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = yes"; then
6333{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6334printf "%s\n" "yes" >&6; }
6335:
6336CFLAGS="$CFLAGS -D_GNU_SOURCE"
6337else
6338if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = no"; then
6339{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6340printf "%s\n" "no" >&6; }
6341#echo 'Test with flag is no!'
6342#cat conftest.c
6343#echo "$CC $CPPFLAGS $CFLAGS -D_GNU_SOURCE -D_FRSRESGID $ERRFLAG -c conftest.c 2>&1"
6344#echo `$CC $CPPFLAGS $CFLAGS -D_GNU_SOURCE -D_FRSRESGID $ERRFLAG -c conftest.c 2>&1`
6345#exit 1
6346:
6347
6348else
6349{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: failed" >&5
6350printf "%s\n" "failed" >&6; }
6351:
6352
6353fi
6354fi
6355
6356
6357
6358
6359
6360{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we need -D_POSIX_C_SOURCE=200112 as a flag for $CC" >&5
6361printf %s "checking whether we need -D_POSIX_C_SOURCE=200112 as a flag for $CC... " >&6; }
6362cache=_D_POSIX_C_SOURCE_200112
6363if eval test \${cv_prog_cc_flag_needed_$cache+y}
6364then :
6365  printf %s "(cached) " >&6
6366else $as_nop
6367
6368echo '
6369#include "confdefs.h"
6370#ifdef HAVE_TIME_H
6371#include <time.h>
6372#endif
6373#include <netdb.h>
6374
6375int test(void) {
6376        int a = 0;
6377        char *t;
6378        time_t time = 0;
6379        char *buf = NULL;
6380	const char* str = NULL;
6381        t = ctime_r(&time, buf);
6382	str = gai_strerror(0);
6383	if(t && str)
6384		a = 0;
6385        return a;
6386}
6387' > conftest.c
6388echo 'void f(void){}' >>conftest.c
6389if test -z "`$CC $CPPFLAGS $CFLAGS $ERRFLAG -c conftest.c 2>&1`"; then
6390eval "cv_prog_cc_flag_needed_$cache=no"
6391else
6392
6393if test -z "`$CC $CPPFLAGS $CFLAGS -D_POSIX_C_SOURCE=200112 $ERRFLAG -c conftest.c 2>&1`"; then
6394eval "cv_prog_cc_flag_needed_$cache=yes"
6395else
6396eval "cv_prog_cc_flag_needed_$cache=fail"
6397#echo 'Test with flag fails too!'
6398#cat conftest.c
6399#echo "$CC $CPPFLAGS $CFLAGS -D_POSIX_C_SOURCE=200112 $ERRFLAG -c conftest.c 2>&1"
6400#echo `$CC $CPPFLAGS $CFLAGS -D_POSIX_C_SOURCE=200112 $ERRFLAG -c conftest.c 2>&1`
6401#exit 1
6402fi
6403
6404fi
6405rm -f conftest conftest.c conftest.o
6406
6407fi
6408
6409if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = yes"; then
6410{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6411printf "%s\n" "yes" >&6; }
6412:
6413CFLAGS="$CFLAGS -D_POSIX_C_SOURCE=200112"
6414else
6415if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = no"; then
6416{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6417printf "%s\n" "no" >&6; }
6418#echo 'Test with flag is no!'
6419#cat conftest.c
6420#echo "$CC $CPPFLAGS $CFLAGS -D_POSIX_C_SOURCE=200112 $ERRFLAG -c conftest.c 2>&1"
6421#echo `$CC $CPPFLAGS $CFLAGS -D_POSIX_C_SOURCE=200112 $ERRFLAG -c conftest.c 2>&1`
6422#exit 1
6423:
6424
6425else
6426{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: failed" >&5
6427printf "%s\n" "failed" >&6; }
6428:
6429
6430fi
6431fi
6432
6433
6434
6435
6436
6437{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we need -D__EXTENSIONS__ as a flag for $CC" >&5
6438printf %s "checking whether we need -D__EXTENSIONS__ as a flag for $CC... " >&6; }
6439cache=_D__EXTENSIONS__
6440if eval test \${cv_prog_cc_flag_needed_$cache+y}
6441then :
6442  printf %s "(cached) " >&6
6443else $as_nop
6444
6445echo '
6446#include "confdefs.h"
6447#include <stdlib.h>
6448#include <ctype.h>
6449#include <sys/time.h>
6450#ifdef HAVE_TIME_H
6451#include <time.h>
6452#endif
6453#include <unistd.h>
6454#ifdef HAVE_GETOPT_H
6455#include <getopt.h>
6456#endif
6457
6458int test(void) {
6459        int a;
6460        char **opts = NULL;
6461        struct timeval tv;
6462        tv.tv_usec = 10;
6463        srandom(32);
6464        a = getopt(2, opts, "a");
6465        a = isascii(32);
6466	if(tv.tv_usec)
6467		a = 0;
6468        return a;
6469}
6470' > conftest.c
6471echo 'void f(void){}' >>conftest.c
6472if test -z "`$CC $CPPFLAGS $CFLAGS $ERRFLAG -c conftest.c 2>&1`"; then
6473eval "cv_prog_cc_flag_needed_$cache=no"
6474else
6475
6476if test -z "`$CC $CPPFLAGS $CFLAGS -D__EXTENSIONS__ $ERRFLAG -c conftest.c 2>&1`"; then
6477eval "cv_prog_cc_flag_needed_$cache=yes"
6478else
6479eval "cv_prog_cc_flag_needed_$cache=fail"
6480#echo 'Test with flag fails too!'
6481#cat conftest.c
6482#echo "$CC $CPPFLAGS $CFLAGS -D__EXTENSIONS__ $ERRFLAG -c conftest.c 2>&1"
6483#echo `$CC $CPPFLAGS $CFLAGS -D__EXTENSIONS__ $ERRFLAG -c conftest.c 2>&1`
6484#exit 1
6485fi
6486
6487fi
6488rm -f conftest conftest.c conftest.o
6489
6490fi
6491
6492if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = yes"; then
6493{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6494printf "%s\n" "yes" >&6; }
6495:
6496CFLAGS="$CFLAGS -D__EXTENSIONS__"
6497else
6498if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = no"; then
6499{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6500printf "%s\n" "no" >&6; }
6501#echo 'Test with flag is no!'
6502#cat conftest.c
6503#echo "$CC $CPPFLAGS $CFLAGS -D__EXTENSIONS__ $ERRFLAG -c conftest.c 2>&1"
6504#echo `$CC $CPPFLAGS $CFLAGS -D__EXTENSIONS__ $ERRFLAG -c conftest.c 2>&1`
6505#exit 1
6506:
6507
6508else
6509{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: failed" >&5
6510printf "%s\n" "failed" >&6; }
6511:
6512
6513fi
6514fi
6515
6516
6517
6518
6519# debug mode flags warnings
6520# Check whether --enable-checking was given.
6521if test ${enable_checking+y}
6522then :
6523  enableval=$enable_checking;
6524fi
6525
6526# Check whether --enable-debug was given.
6527if test ${enable_debug+y}
6528then :
6529  enableval=$enable_debug;
6530fi
6531
6532if test "$enable_debug" = "yes"; then debug_enabled="$enable_debug";
6533else debug_enabled="$enable_checking"; fi
6534
6535case "$debug_enabled" in
6536        yes)
6537
6538
6539{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -W" >&5
6540printf %s "checking whether $CC supports -W... " >&6; }
6541cache=`echo W | sed 'y%.=/+-%___p_%'`
6542if eval test \${cv_prog_cc_flag_$cache+y}
6543then :
6544  printf %s "(cached) " >&6
6545else $as_nop
6546
6547echo 'void f(void){}' >conftest.c
6548if test -z "`$CC $CPPFLAGS $CFLAGS -W -c conftest.c 2>&1`"; then
6549eval "cv_prog_cc_flag_$cache=yes"
6550else
6551eval "cv_prog_cc_flag_$cache=no"
6552fi
6553rm -f conftest conftest.o conftest.c
6554
6555fi
6556
6557if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
6558{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6559printf "%s\n" "yes" >&6; }
6560:
6561CFLAGS="$CFLAGS -W"
6562else
6563{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6564printf "%s\n" "no" >&6; }
6565:
6566
6567fi
6568
6569
6570
6571{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wall" >&5
6572printf %s "checking whether $CC supports -Wall... " >&6; }
6573cache=`echo Wall | sed 'y%.=/+-%___p_%'`
6574if eval test \${cv_prog_cc_flag_$cache+y}
6575then :
6576  printf %s "(cached) " >&6
6577else $as_nop
6578
6579echo 'void f(void){}' >conftest.c
6580if test -z "`$CC $CPPFLAGS $CFLAGS -Wall -c conftest.c 2>&1`"; then
6581eval "cv_prog_cc_flag_$cache=yes"
6582else
6583eval "cv_prog_cc_flag_$cache=no"
6584fi
6585rm -f conftest conftest.o conftest.c
6586
6587fi
6588
6589if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
6590{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6591printf "%s\n" "yes" >&6; }
6592:
6593CFLAGS="$CFLAGS -Wall"
6594else
6595{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6596printf "%s\n" "no" >&6; }
6597:
6598
6599fi
6600
6601
6602
6603{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wextra" >&5
6604printf %s "checking whether $CC supports -Wextra... " >&6; }
6605cache=`echo Wextra | sed 'y%.=/+-%___p_%'`
6606if eval test \${cv_prog_cc_flag_$cache+y}
6607then :
6608  printf %s "(cached) " >&6
6609else $as_nop
6610
6611echo 'void f(void){}' >conftest.c
6612if test -z "`$CC $CPPFLAGS $CFLAGS -Wextra -c conftest.c 2>&1`"; then
6613eval "cv_prog_cc_flag_$cache=yes"
6614else
6615eval "cv_prog_cc_flag_$cache=no"
6616fi
6617rm -f conftest conftest.o conftest.c
6618
6619fi
6620
6621if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
6622{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6623printf "%s\n" "yes" >&6; }
6624:
6625CFLAGS="$CFLAGS -Wextra"
6626else
6627{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6628printf "%s\n" "no" >&6; }
6629:
6630
6631fi
6632
6633
6634
6635{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wdeclaration-after-statement" >&5
6636printf %s "checking whether $CC supports -Wdeclaration-after-statement... " >&6; }
6637cache=`echo Wdeclaration-after-statement | sed 'y%.=/+-%___p_%'`
6638if eval test \${cv_prog_cc_flag_$cache+y}
6639then :
6640  printf %s "(cached) " >&6
6641else $as_nop
6642
6643echo 'void f(void){}' >conftest.c
6644if test -z "`$CC $CPPFLAGS $CFLAGS -Wdeclaration-after-statement -c conftest.c 2>&1`"; then
6645eval "cv_prog_cc_flag_$cache=yes"
6646else
6647eval "cv_prog_cc_flag_$cache=no"
6648fi
6649rm -f conftest conftest.o conftest.c
6650
6651fi
6652
6653if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
6654{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6655printf "%s\n" "yes" >&6; }
6656:
6657CFLAGS="$CFLAGS -Wdeclaration-after-statement"
6658else
6659{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6660printf "%s\n" "no" >&6; }
6661:
6662
6663fi
6664
6665
6666printf "%s\n" "#define UNBOUND_DEBUG /**/" >>confdefs.h
6667
6668		;;
6669	no|*)
6670		# nothing to do.
6671		;;
6672esac
6673if test "$default_cflags" = "yes"; then
6674	# only when CFLAGS was "" at the start, if the users wants to
6675	# override we shouldn't add default cflags, because they wouldn't
6676	# be able to turn off these options and set the CFLAGS wanted.
6677
6678    # Check whether --enable-flto was given.
6679if test ${enable_flto+y}
6680then :
6681  enableval=$enable_flto;
6682fi
6683
6684    if test "x$enable_flto" != "xno"
6685then :
6686
6687        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -flto" >&5
6688printf %s "checking if $CC supports -flto... " >&6; }
6689        BAKCFLAGS="$CFLAGS"
6690        CFLAGS="$CFLAGS -flto"
6691        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6692/* end confdefs.h.  */
6693
6694int
6695main (void)
6696{
6697
6698  ;
6699  return 0;
6700}
6701_ACEOF
6702if ac_fn_c_try_link "$LINENO"
6703then :
6704
6705            if $CC $CFLAGS -o conftest conftest.c 2>&1 | $GREP -e "warning: no debug symbols in executable" -e "warning: object" >/dev/null; then
6706                CFLAGS="$BAKCFLAGS"
6707                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6708printf "%s\n" "no" >&6; }
6709            else
6710                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6711printf "%s\n" "yes" >&6; }
6712            fi
6713            rm -f conftest conftest.c conftest.o
6714
6715else $as_nop
6716  CFLAGS="$BAKCFLAGS" ; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6717printf "%s\n" "no" >&6; }
6718fi
6719rm -f core conftest.err conftest.$ac_objext conftest.beam \
6720    conftest$ac_exeext conftest.$ac_ext
6721
6722fi
6723
6724
6725    # Check whether --enable-pie was given.
6726if test ${enable_pie+y}
6727then :
6728  enableval=$enable_pie;
6729fi
6730
6731    if test "x$enable_pie" = "xyes"
6732then :
6733
6734	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports PIE" >&5
6735printf %s "checking if $CC supports PIE... " >&6; }
6736	BAKLDFLAGS="$LDFLAGS"
6737	BAKCFLAGS="$CFLAGS"
6738	LDFLAGS="$LDFLAGS -pie"
6739	CFLAGS="$CFLAGS -fPIE"
6740	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6741/* end confdefs.h.  */
6742
6743int
6744main (void)
6745{
6746
6747  ;
6748  return 0;
6749}
6750_ACEOF
6751if ac_fn_c_try_link "$LINENO"
6752then :
6753
6754	    if $CC $CFLAGS $LDFLAGS -o conftest conftest.c 2>&1 | grep "warning: no debug symbols in executable" >/dev/null; then
6755		LDFLAGS="$BAKLDFLAGS"
6756		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6757printf "%s\n" "no" >&6; }
6758	    else
6759		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6760printf "%s\n" "yes" >&6; }
6761	    fi
6762	    rm -f conftest conftest.c conftest.o
6763
6764else $as_nop
6765  LDFLAGS="$BAKLDFLAGS" ; CFLAGS="$BAKCFLAGS" ; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6766printf "%s\n" "no" >&6; }
6767fi
6768rm -f core conftest.err conftest.$ac_objext conftest.beam \
6769    conftest$ac_exeext conftest.$ac_ext
6770
6771fi
6772
6773
6774    # Check whether --enable-relro_now was given.
6775if test ${enable_relro_now+y}
6776then :
6777  enableval=$enable_relro_now;
6778fi
6779
6780    if test "x$enable_relro_now" = "xyes"
6781then :
6782
6783	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wl,-z,relro,-z,now" >&5
6784printf %s "checking if $CC supports -Wl,-z,relro,-z,now... " >&6; }
6785	BAKLDFLAGS="$LDFLAGS"
6786	LDFLAGS="$LDFLAGS -Wl,-z,relro,-z,now"
6787	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6788/* end confdefs.h.  */
6789
6790int
6791main (void)
6792{
6793
6794  ;
6795  return 0;
6796}
6797_ACEOF
6798if ac_fn_c_try_link "$LINENO"
6799then :
6800
6801	    if $CC $CFLAGS $LDFLAGS -o conftest conftest.c 2>&1 | grep "warning: no debug symbols in executable" >/dev/null; then
6802		LDFLAGS="$BAKLDFLAGS"
6803		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6804printf "%s\n" "no" >&6; }
6805	    else
6806		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6807printf "%s\n" "yes" >&6; }
6808	    fi
6809	    rm -f conftest conftest.c conftest.o
6810
6811else $as_nop
6812  LDFLAGS="$BAKLDFLAGS" ; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6813printf "%s\n" "no" >&6; }
6814fi
6815rm -f core conftest.err conftest.$ac_objext conftest.beam \
6816    conftest$ac_exeext conftest.$ac_ext
6817
6818fi
6819
6820fi
6821
6822{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
6823printf %s "checking for inline... " >&6; }
6824if test ${ac_cv_c_inline+y}
6825then :
6826  printf %s "(cached) " >&6
6827else $as_nop
6828  ac_cv_c_inline=no
6829for ac_kw in inline __inline__ __inline; do
6830  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6831/* end confdefs.h.  */
6832#ifndef __cplusplus
6833typedef int foo_t;
6834static $ac_kw foo_t static_foo (void) {return 0; }
6835$ac_kw foo_t foo (void) {return 0; }
6836#endif
6837
6838_ACEOF
6839if ac_fn_c_try_compile "$LINENO"
6840then :
6841  ac_cv_c_inline=$ac_kw
6842fi
6843rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
6844  test "$ac_cv_c_inline" != no && break
6845done
6846
6847fi
6848{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
6849printf "%s\n" "$ac_cv_c_inline" >&6; }
6850
6851case $ac_cv_c_inline in
6852  inline | yes) ;;
6853  *)
6854    case $ac_cv_c_inline in
6855      no) ac_val=;;
6856      *) ac_val=$ac_cv_c_inline;;
6857    esac
6858    cat >>confdefs.h <<_ACEOF
6859#ifndef __cplusplus
6860#define inline $ac_val
6861#endif
6862_ACEOF
6863    ;;
6864esac
6865
6866
6867{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler (${CC-cc}) accepts the \"format\" attribute" >&5
6868printf %s "checking whether the C compiler (${CC-cc}) accepts the \"format\" attribute... " >&6; }
6869if test ${ac_cv_c_format_attribute+y}
6870then :
6871  printf %s "(cached) " >&6
6872else $as_nop
6873  ac_cv_c_format_attribute=no
6874cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6875/* end confdefs.h.  */
6876#include <stdio.h>
6877void f (char *format, ...) __attribute__ ((format (printf, 1, 2)));
6878void (*pf) (char *format, ...) __attribute__ ((format (printf, 1, 2)));
6879
6880int
6881main (void)
6882{
6883
6884   f ("%s", "str");
6885
6886  ;
6887  return 0;
6888}
6889_ACEOF
6890if ac_fn_c_try_compile "$LINENO"
6891then :
6892  ac_cv_c_format_attribute="yes"
6893else $as_nop
6894  ac_cv_c_format_attribute="no"
6895fi
6896rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
6897
6898fi
6899
6900
6901{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_format_attribute" >&5
6902printf "%s\n" "$ac_cv_c_format_attribute" >&6; }
6903if test $ac_cv_c_format_attribute = yes; then
6904
6905printf "%s\n" "#define HAVE_ATTR_FORMAT 1" >>confdefs.h
6906
6907fi
6908
6909
6910{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler (${CC-cc}) accepts the \"unused\" attribute" >&5
6911printf %s "checking whether the C compiler (${CC-cc}) accepts the \"unused\" attribute... " >&6; }
6912if test ${ac_cv_c_unused_attribute+y}
6913then :
6914  printf %s "(cached) " >&6
6915else $as_nop
6916  ac_cv_c_unused_attribute=no
6917cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6918/* end confdefs.h.  */
6919#include <stdio.h>
6920void f (char *u __attribute__((unused)));
6921
6922int
6923main (void)
6924{
6925
6926   f ("x");
6927
6928  ;
6929  return 0;
6930}
6931_ACEOF
6932if ac_fn_c_try_compile "$LINENO"
6933then :
6934  ac_cv_c_unused_attribute="yes"
6935else $as_nop
6936  ac_cv_c_unused_attribute="no"
6937fi
6938rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
6939
6940fi
6941
6942
6943
6944
6945{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_unused_attribute" >&5
6946printf "%s\n" "$ac_cv_c_unused_attribute" >&6; }
6947if test $ac_cv_c_unused_attribute = yes; then
6948
6949printf "%s\n" "#define HAVE_ATTR_UNUSED 1" >>confdefs.h
6950
6951fi
6952
6953
6954
6955
6956{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler (${CC-cc}) accepts the \"weak\" attribute" >&5
6957printf %s "checking whether the C compiler (${CC-cc}) accepts the \"weak\" attribute... " >&6; }
6958if test ${ac_cv_c_weak_attribute+y}
6959then :
6960  printf %s "(cached) " >&6
6961else $as_nop
6962  ac_cv_c_weak_attribute=no
6963cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6964/* end confdefs.h.  */
6965 #include <stdio.h>
6966__attribute__((weak)) void f(int x) { printf("%d", x); }
6967
6968int
6969main (void)
6970{
6971
6972   f(1);
6973
6974  ;
6975  return 0;
6976}
6977_ACEOF
6978if ac_fn_c_try_compile "$LINENO"
6979then :
6980  ac_cv_c_weak_attribute="yes"
6981else $as_nop
6982  ac_cv_c_weak_attribute="no"
6983fi
6984rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
6985
6986fi
6987
6988
6989{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_weak_attribute" >&5
6990printf "%s\n" "$ac_cv_c_weak_attribute" >&6; }
6991if test $ac_cv_c_weak_attribute = yes; then
6992
6993printf "%s\n" "#define HAVE_ATTR_WEAK 1" >>confdefs.h
6994
6995
6996printf "%s\n" "#define ATTR_WEAK __attribute__((weak))" >>confdefs.h
6997
6998else
6999
7000printf "%s\n" "#define ATTR_WEAK /**/" >>confdefs.h
7001
7002fi
7003
7004
7005
7006
7007{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler (${CC-cc}) accepts the \"noreturn\" attribute" >&5
7008printf %s "checking whether the C compiler (${CC-cc}) accepts the \"noreturn\" attribute... " >&6; }
7009if test ${ac_cv_c_noreturn_attribute+y}
7010then :
7011  printf %s "(cached) " >&6
7012else $as_nop
7013  ac_cv_c_noreturn_attribute=no
7014cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7015/* end confdefs.h.  */
7016 #include <stdio.h>
7017__attribute__((noreturn)) void f(int x) { printf("%d", x); }
7018
7019int
7020main (void)
7021{
7022
7023   f(1);
7024
7025  ;
7026  return 0;
7027}
7028_ACEOF
7029if ac_fn_c_try_compile "$LINENO"
7030then :
7031  ac_cv_c_noreturn_attribute="yes"
7032else $as_nop
7033  ac_cv_c_noreturn_attribute="no"
7034fi
7035rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
7036
7037fi
7038
7039
7040{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_noreturn_attribute" >&5
7041printf "%s\n" "$ac_cv_c_noreturn_attribute" >&6; }
7042if test $ac_cv_c_noreturn_attribute = yes; then
7043
7044printf "%s\n" "#define HAVE_ATTR_NORETURN 1" >>confdefs.h
7045
7046
7047printf "%s\n" "#define ATTR_NORETURN __attribute__((__noreturn__))" >>confdefs.h
7048
7049else
7050
7051printf "%s\n" "#define ATTR_NORETURN /**/" >>confdefs.h
7052
7053fi
7054
7055
7056
7057
7058{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler (${CC-cc}) accepts the \"fallthrough\" attribute" >&5
7059printf %s "checking whether the C compiler (${CC-cc}) accepts the \"fallthrough\" attribute... " >&6; }
7060BAKCFLAGS="$CFLAGS"
7061CFLAGS="$CFLAGS -Werror"
7062if test ${ac_cv_c_fallthrough_attribute+y}
7063then :
7064  printf %s "(cached) " >&6
7065else $as_nop
7066  ac_cv_c_fallthrough_attribute=no
7067cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7068/* end confdefs.h.  */
7069 #include <stdio.h>
7070void f(int x) {
7071	int y = 0;
7072	switch(x) {
7073	case 1:
7074		y = 1;
7075		__attribute__((fallthrough));
7076		/* fallthrough */
7077	case 2:
7078		y++;
7079		break;
7080	case 3:
7081		y = 3;
7082		break;
7083	}
7084	printf("%d", y);
7085}
7086
7087int
7088main (void)
7089{
7090
7091   f(1);
7092
7093  ;
7094  return 0;
7095}
7096_ACEOF
7097if ac_fn_c_try_compile "$LINENO"
7098then :
7099  ac_cv_c_fallthrough_attribute="yes"
7100else $as_nop
7101  ac_cv_c_fallthrough_attribute="no"
7102fi
7103rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
7104
7105fi
7106
7107CFLAGS="$BAKCFLAGS"
7108
7109{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_fallthrough_attribute" >&5
7110printf "%s\n" "$ac_cv_c_fallthrough_attribute" >&6; }
7111if test $ac_cv_c_fallthrough_attribute = yes; then
7112
7113printf "%s\n" "#define HAVE_ATTR_FALLTHROUGH 1" >>confdefs.h
7114
7115
7116printf "%s\n" "#define ATTR_FALLTHROUGH __attribute__((fallthrough));" >>confdefs.h
7117
7118else
7119
7120printf "%s\n" "#define ATTR_FALLTHROUGH /**/" >>confdefs.h
7121
7122fi
7123
7124
7125if test "$srcdir" != "."; then
7126	CPPFLAGS="$CPPFLAGS -I$srcdir"
7127fi
7128
7129
7130
7131
7132
7133for ac_prog in flex lex
7134do
7135  # Extract the first word of "$ac_prog", so it can be a program name with args.
7136set dummy $ac_prog; ac_word=$2
7137{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7138printf %s "checking for $ac_word... " >&6; }
7139if test ${ac_cv_prog_LEX+y}
7140then :
7141  printf %s "(cached) " >&6
7142else $as_nop
7143  if test -n "$LEX"; then
7144  ac_cv_prog_LEX="$LEX" # Let the user override the test.
7145else
7146as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7147for as_dir in $PATH
7148do
7149  IFS=$as_save_IFS
7150  case $as_dir in #(((
7151    '') as_dir=./ ;;
7152    */) ;;
7153    *) as_dir=$as_dir/ ;;
7154  esac
7155    for ac_exec_ext in '' $ac_executable_extensions; do
7156  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
7157    ac_cv_prog_LEX="$ac_prog"
7158    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
7159    break 2
7160  fi
7161done
7162  done
7163IFS=$as_save_IFS
7164
7165fi
7166fi
7167LEX=$ac_cv_prog_LEX
7168if test -n "$LEX"; then
7169  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LEX" >&5
7170printf "%s\n" "$LEX" >&6; }
7171else
7172  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7173printf "%s\n" "no" >&6; }
7174fi
7175
7176
7177  test -n "$LEX" && break
7178done
7179test -n "$LEX" || LEX=":"
7180
7181  if test "x$LEX" != "x:"; then
7182    cat >conftest.l <<_ACEOF
7183%{
7184#ifdef __cplusplus
7185extern "C"
7186#endif
7187int yywrap(void);
7188%}
7189%%
7190a { ECHO; }
7191b { REJECT; }
7192c { yymore (); }
7193d { yyless (1); }
7194e { /* IRIX 6.5 flex 2.5.4 underquotes its yyless argument.  */
7195#ifdef __cplusplus
7196    yyless ((yyinput () != 0));
7197#else
7198    yyless ((input () != 0));
7199#endif
7200  }
7201f { unput (yytext[0]); }
7202. { BEGIN INITIAL; }
7203%%
7204#ifdef YYTEXT_POINTER
7205extern char *yytext;
7206#endif
7207int
7208yywrap (void)
7209{
7210  return 1;
7211}
7212int
7213main (void)
7214{
7215  return ! yylex ();
7216}
7217_ACEOF
7218{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for lex output file root" >&5
7219printf %s "checking for lex output file root... " >&6; }
7220if test ${ac_cv_prog_lex_root+y}
7221then :
7222  printf %s "(cached) " >&6
7223else $as_nop
7224
7225ac_cv_prog_lex_root=unknown
7226{ { ac_try="$LEX conftest.l"
7227case "(($ac_try" in
7228  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7229  *) ac_try_echo=$ac_try;;
7230esac
7231eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
7232printf "%s\n" "$ac_try_echo"; } >&5
7233  (eval "$LEX conftest.l") 2>&5
7234  ac_status=$?
7235  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7236  test $ac_status = 0; } &&
7237if test -f lex.yy.c; then
7238  ac_cv_prog_lex_root=lex.yy
7239elif test -f lexyy.c; then
7240  ac_cv_prog_lex_root=lexyy
7241fi
7242fi
7243{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_lex_root" >&5
7244printf "%s\n" "$ac_cv_prog_lex_root" >&6; }
7245if test "$ac_cv_prog_lex_root" = unknown
7246then :
7247  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cannot find output from $LEX; giving up on $LEX" >&5
7248printf "%s\n" "$as_me: WARNING: cannot find output from $LEX; giving up on $LEX" >&2;}
7249   LEX=: LEXLIB=
7250fi
7251LEX_OUTPUT_ROOT=$ac_cv_prog_lex_root
7252
7253if test ${LEXLIB+y}
7254then :
7255
7256else $as_nop
7257
7258  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for lex library" >&5
7259printf %s "checking for lex library... " >&6; }
7260if test ${ac_cv_lib_lex+y}
7261then :
7262  printf %s "(cached) " >&6
7263else $as_nop
7264
7265    ac_save_LIBS="$LIBS"
7266    ac_found=false
7267    for ac_cv_lib_lex in 'none needed' -lfl -ll 'not found'; do
7268      case $ac_cv_lib_lex in #(
7269  'none needed') :
7270     ;; #(
7271  'not found') :
7272    break ;; #(
7273  *) :
7274    LIBS="$ac_cv_lib_lex $ac_save_LIBS" ;; #(
7275  *) :
7276     ;;
7277esac
7278
7279      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7280/* end confdefs.h.  */
7281`cat $LEX_OUTPUT_ROOT.c`
7282_ACEOF
7283if ac_fn_c_try_link "$LINENO"
7284then :
7285  ac_found=:
7286fi
7287rm -f core conftest.err conftest.$ac_objext conftest.beam \
7288    conftest$ac_exeext conftest.$ac_ext
7289      if $ac_found; then
7290        break
7291      fi
7292    done
7293    LIBS="$ac_save_LIBS"
7294
7295fi
7296{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_lex" >&5
7297printf "%s\n" "$ac_cv_lib_lex" >&6; }
7298  if test "$ac_cv_lib_lex" = 'not found'
7299then :
7300  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: required lex library not found; giving up on $LEX" >&5
7301printf "%s\n" "$as_me: WARNING: required lex library not found; giving up on $LEX" >&2;}
7302	 LEX=: LEXLIB=
7303elif test "$ac_cv_lib_lex" = 'none needed'
7304then :
7305  LEXLIB=''
7306else $as_nop
7307  LEXLIB=$ac_cv_lib_lex
7308fi
7309
7310fi
7311
7312
7313if test "$LEX" != :
7314then :
7315
7316{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether yytext is a pointer" >&5
7317printf %s "checking whether yytext is a pointer... " >&6; }
7318if test ${ac_cv_prog_lex_yytext_pointer+y}
7319then :
7320  printf %s "(cached) " >&6
7321else $as_nop
7322  # POSIX says lex can declare yytext either as a pointer or an array; the
7323# default is implementation-dependent.  Figure out which it is, since
7324# not all implementations provide the %pointer and %array declarations.
7325ac_cv_prog_lex_yytext_pointer=no
7326cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7327/* end confdefs.h.  */
7328
7329  #define YYTEXT_POINTER 1
7330`cat $LEX_OUTPUT_ROOT.c`
7331_ACEOF
7332if ac_fn_c_try_compile "$LINENO"
7333then :
7334  ac_cv_prog_lex_yytext_pointer=yes
7335fi
7336rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
7337
7338fi
7339{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_lex_yytext_pointer" >&5
7340printf "%s\n" "$ac_cv_prog_lex_yytext_pointer" >&6; }
7341if test $ac_cv_prog_lex_yytext_pointer = yes; then
7342
7343printf "%s\n" "#define YYTEXT_POINTER 1" >>confdefs.h
7344
7345fi
7346
7347fi
7348rm -f conftest.l $LEX_OUTPUT_ROOT.c
7349
7350fi
7351if test "$LEX" != "" -a "$LEX" != ":"; then
7352
7353	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for yylex_destroy" >&5
7354printf %s "checking for yylex_destroy... " >&6; }
7355	if echo %% | $LEX -t 2>&1 | grep yylex_destroy >/dev/null 2>&1; then
7356
7357printf "%s\n" "#define LEX_HAS_YYLEX_DESTROY 1" >>confdefs.h
7358
7359		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7360printf "%s\n" "yes" >&6; }
7361	else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7362printf "%s\n" "no" >&6; };
7363		LEX=":"
7364	fi
7365
7366fi
7367if test "$LEX" != "" -a "$LEX" != ":"; then
7368
7369	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for lex %option" >&5
7370printf %s "checking for lex %option... " >&6; }
7371	if cat <<EOF | $LEX -t 2>&1 | grep yy_delete_buffer >/dev/null 2>&1; then
7372%option nounput
7373%%
7374EOF
7375		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7376printf "%s\n" "yes" >&6; }
7377	else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7378printf "%s\n" "no" >&6; };
7379		LEX=":"
7380	fi
7381
7382fi
7383if test "$LEX" = "" -o "$LEX" = ":"; then
7384	if test ! -f util/configlexer.c; then
7385		as_fn_error $? "no lex and no util/configlexer.c: need flex and bison to compile from source repository." "$LINENO" 5
7386	fi
7387fi
7388for ac_prog in 'bison -y' byacc
7389do
7390  # Extract the first word of "$ac_prog", so it can be a program name with args.
7391set dummy $ac_prog; ac_word=$2
7392{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7393printf %s "checking for $ac_word... " >&6; }
7394if test ${ac_cv_prog_YACC+y}
7395then :
7396  printf %s "(cached) " >&6
7397else $as_nop
7398  if test -n "$YACC"; then
7399  ac_cv_prog_YACC="$YACC" # Let the user override the test.
7400else
7401as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7402for as_dir in $PATH
7403do
7404  IFS=$as_save_IFS
7405  case $as_dir in #(((
7406    '') as_dir=./ ;;
7407    */) ;;
7408    *) as_dir=$as_dir/ ;;
7409  esac
7410    for ac_exec_ext in '' $ac_executable_extensions; do
7411  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
7412    ac_cv_prog_YACC="$ac_prog"
7413    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
7414    break 2
7415  fi
7416done
7417  done
7418IFS=$as_save_IFS
7419
7420fi
7421fi
7422YACC=$ac_cv_prog_YACC
7423if test -n "$YACC"; then
7424  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $YACC" >&5
7425printf "%s\n" "$YACC" >&6; }
7426else
7427  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7428printf "%s\n" "no" >&6; }
7429fi
7430
7431
7432  test -n "$YACC" && break
7433done
7434test -n "$YACC" || YACC="yacc"
7435
7436if test "$YACC" = "" -o "$YACC" = ":"; then
7437	if test ! -f util/configparser.c; then
7438		as_fn_error $? "no yacc and no util/configparser.c: need flex and bison to compile from source repository." "$LINENO" 5
7439	fi
7440fi
7441# Extract the first word of "doxygen", so it can be a program name with args.
7442set dummy doxygen; ac_word=$2
7443{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7444printf %s "checking for $ac_word... " >&6; }
7445if test ${ac_cv_prog_doxygen+y}
7446then :
7447  printf %s "(cached) " >&6
7448else $as_nop
7449  if test -n "$doxygen"; then
7450  ac_cv_prog_doxygen="$doxygen" # Let the user override the test.
7451else
7452as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7453for as_dir in $PATH
7454do
7455  IFS=$as_save_IFS
7456  case $as_dir in #(((
7457    '') as_dir=./ ;;
7458    */) ;;
7459    *) as_dir=$as_dir/ ;;
7460  esac
7461    for ac_exec_ext in '' $ac_executable_extensions; do
7462  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
7463    ac_cv_prog_doxygen="doxygen"
7464    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
7465    break 2
7466  fi
7467done
7468  done
7469IFS=$as_save_IFS
7470
7471fi
7472fi
7473doxygen=$ac_cv_prog_doxygen
7474if test -n "$doxygen"; then
7475  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $doxygen" >&5
7476printf "%s\n" "$doxygen" >&6; }
7477else
7478  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7479printf "%s\n" "no" >&6; }
7480fi
7481
7482
7483if test -n "$ac_tool_prefix"; then
7484  # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
7485set dummy ${ac_tool_prefix}strip; ac_word=$2
7486{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7487printf %s "checking for $ac_word... " >&6; }
7488if test ${ac_cv_prog_STRIP+y}
7489then :
7490  printf %s "(cached) " >&6
7491else $as_nop
7492  if test -n "$STRIP"; then
7493  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
7494else
7495as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7496for as_dir in $PATH
7497do
7498  IFS=$as_save_IFS
7499  case $as_dir in #(((
7500    '') as_dir=./ ;;
7501    */) ;;
7502    *) as_dir=$as_dir/ ;;
7503  esac
7504    for ac_exec_ext in '' $ac_executable_extensions; do
7505  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
7506    ac_cv_prog_STRIP="${ac_tool_prefix}strip"
7507    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
7508    break 2
7509  fi
7510done
7511  done
7512IFS=$as_save_IFS
7513
7514fi
7515fi
7516STRIP=$ac_cv_prog_STRIP
7517if test -n "$STRIP"; then
7518  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
7519printf "%s\n" "$STRIP" >&6; }
7520else
7521  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7522printf "%s\n" "no" >&6; }
7523fi
7524
7525
7526fi
7527if test -z "$ac_cv_prog_STRIP"; then
7528  ac_ct_STRIP=$STRIP
7529  # Extract the first word of "strip", so it can be a program name with args.
7530set dummy strip; ac_word=$2
7531{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7532printf %s "checking for $ac_word... " >&6; }
7533if test ${ac_cv_prog_ac_ct_STRIP+y}
7534then :
7535  printf %s "(cached) " >&6
7536else $as_nop
7537  if test -n "$ac_ct_STRIP"; then
7538  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
7539else
7540as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7541for as_dir in $PATH
7542do
7543  IFS=$as_save_IFS
7544  case $as_dir in #(((
7545    '') as_dir=./ ;;
7546    */) ;;
7547    *) as_dir=$as_dir/ ;;
7548  esac
7549    for ac_exec_ext in '' $ac_executable_extensions; do
7550  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
7551    ac_cv_prog_ac_ct_STRIP="strip"
7552    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
7553    break 2
7554  fi
7555done
7556  done
7557IFS=$as_save_IFS
7558
7559fi
7560fi
7561ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
7562if test -n "$ac_ct_STRIP"; then
7563  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
7564printf "%s\n" "$ac_ct_STRIP" >&6; }
7565else
7566  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7567printf "%s\n" "no" >&6; }
7568fi
7569
7570  if test "x$ac_ct_STRIP" = x; then
7571    STRIP=""
7572  else
7573    case $cross_compiling:$ac_tool_warned in
7574yes:)
7575{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7576printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7577ac_tool_warned=yes ;;
7578esac
7579    STRIP=$ac_ct_STRIP
7580  fi
7581else
7582  STRIP="$ac_cv_prog_STRIP"
7583fi
7584
7585
7586
7587
7588  # Make sure we can run config.sub.
7589$SHELL "${ac_aux_dir}config.sub" sun4 >/dev/null 2>&1 ||
7590  as_fn_error $? "cannot run $SHELL ${ac_aux_dir}config.sub" "$LINENO" 5
7591
7592{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
7593printf %s "checking build system type... " >&6; }
7594if test ${ac_cv_build+y}
7595then :
7596  printf %s "(cached) " >&6
7597else $as_nop
7598  ac_build_alias=$build_alias
7599test "x$ac_build_alias" = x &&
7600  ac_build_alias=`$SHELL "${ac_aux_dir}config.guess"`
7601test "x$ac_build_alias" = x &&
7602  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
7603ac_cv_build=`$SHELL "${ac_aux_dir}config.sub" $ac_build_alias` ||
7604  as_fn_error $? "$SHELL ${ac_aux_dir}config.sub $ac_build_alias failed" "$LINENO" 5
7605
7606fi
7607{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
7608printf "%s\n" "$ac_cv_build" >&6; }
7609case $ac_cv_build in
7610*-*-*) ;;
7611*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
7612esac
7613build=$ac_cv_build
7614ac_save_IFS=$IFS; IFS='-'
7615set x $ac_cv_build
7616shift
7617build_cpu=$1
7618build_vendor=$2
7619shift; shift
7620# Remember, the first character of IFS is used to create $*,
7621# except with old shells:
7622build_os=$*
7623IFS=$ac_save_IFS
7624case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
7625
7626
7627{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
7628printf %s "checking host system type... " >&6; }
7629if test ${ac_cv_host+y}
7630then :
7631  printf %s "(cached) " >&6
7632else $as_nop
7633  if test "x$host_alias" = x; then
7634  ac_cv_host=$ac_cv_build
7635else
7636  ac_cv_host=`$SHELL "${ac_aux_dir}config.sub" $host_alias` ||
7637    as_fn_error $? "$SHELL ${ac_aux_dir}config.sub $host_alias failed" "$LINENO" 5
7638fi
7639
7640fi
7641{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
7642printf "%s\n" "$ac_cv_host" >&6; }
7643case $ac_cv_host in
7644*-*-*) ;;
7645*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
7646esac
7647host=$ac_cv_host
7648ac_save_IFS=$IFS; IFS='-'
7649set x $ac_cv_host
7650shift
7651host_cpu=$1
7652host_vendor=$2
7653shift; shift
7654# Remember, the first character of IFS is used to create $*,
7655# except with old shells:
7656host_os=$*
7657IFS=$ac_save_IFS
7658case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
7659
7660
7661
7662# skip these tests, we do not need them.
7663
7664
7665
7666
7667
7668
7669
7670
7671# always use ./libtool unless override from commandline (libtool=mylibtool)
7672if test -z "$libtool"; then
7673	libtool="./libtool"
7674fi
7675
7676# avoid libtool max commandline length test on systems that fork slowly.
7677
7678if echo "$host_os" | grep "sunos4" >/dev/null; then
7679	lt_cv_sys_max_cmd_len=32750;
7680fi
7681if test -n "$ac_tool_prefix"; then
7682  # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
7683set dummy ${ac_tool_prefix}ar; ac_word=$2
7684{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7685printf %s "checking for $ac_word... " >&6; }
7686if test ${ac_cv_path_AR+y}
7687then :
7688  printf %s "(cached) " >&6
7689else $as_nop
7690  case $AR in
7691  [\\/]* | ?:[\\/]*)
7692  ac_cv_path_AR="$AR" # Let the user override the test with a path.
7693  ;;
7694  *)
7695  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7696for as_dir in $PATH
7697do
7698  IFS=$as_save_IFS
7699  case $as_dir in #(((
7700    '') as_dir=./ ;;
7701    */) ;;
7702    *) as_dir=$as_dir/ ;;
7703  esac
7704    for ac_exec_ext in '' $ac_executable_extensions; do
7705  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
7706    ac_cv_path_AR="$as_dir$ac_word$ac_exec_ext"
7707    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
7708    break 2
7709  fi
7710done
7711  done
7712IFS=$as_save_IFS
7713
7714  ;;
7715esac
7716fi
7717AR=$ac_cv_path_AR
7718if test -n "$AR"; then
7719  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
7720printf "%s\n" "$AR" >&6; }
7721else
7722  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7723printf "%s\n" "no" >&6; }
7724fi
7725
7726
7727fi
7728if test -z "$ac_cv_path_AR"; then
7729  ac_pt_AR=$AR
7730  # Extract the first word of "ar", so it can be a program name with args.
7731set dummy ar; ac_word=$2
7732{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7733printf %s "checking for $ac_word... " >&6; }
7734if test ${ac_cv_path_ac_pt_AR+y}
7735then :
7736  printf %s "(cached) " >&6
7737else $as_nop
7738  case $ac_pt_AR in
7739  [\\/]* | ?:[\\/]*)
7740  ac_cv_path_ac_pt_AR="$ac_pt_AR" # Let the user override the test with a path.
7741  ;;
7742  *)
7743  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7744for as_dir in $PATH
7745do
7746  IFS=$as_save_IFS
7747  case $as_dir in #(((
7748    '') as_dir=./ ;;
7749    */) ;;
7750    *) as_dir=$as_dir/ ;;
7751  esac
7752    for ac_exec_ext in '' $ac_executable_extensions; do
7753  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
7754    ac_cv_path_ac_pt_AR="$as_dir$ac_word$ac_exec_ext"
7755    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
7756    break 2
7757  fi
7758done
7759  done
7760IFS=$as_save_IFS
7761
7762  ;;
7763esac
7764fi
7765ac_pt_AR=$ac_cv_path_ac_pt_AR
7766if test -n "$ac_pt_AR"; then
7767  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_pt_AR" >&5
7768printf "%s\n" "$ac_pt_AR" >&6; }
7769else
7770  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7771printf "%s\n" "no" >&6; }
7772fi
7773
7774  if test "x$ac_pt_AR" = x; then
7775    AR="false"
7776  else
7777    case $cross_compiling:$ac_tool_warned in
7778yes:)
7779{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7780printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7781ac_tool_warned=yes ;;
7782esac
7783    AR=$ac_pt_AR
7784  fi
7785else
7786  AR="$ac_cv_path_AR"
7787fi
7788
7789if test $AR = false; then
7790	as_fn_error $? "Cannot find 'ar', please extend PATH to include it" "$LINENO" 5
7791fi
7792
7793
7794case `pwd` in
7795  *\ * | *\	*)
7796    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5
7797printf "%s\n" "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;;
7798esac
7799
7800
7801
7802macro_version='2.5.4'
7803macro_revision='2.5.4'
7804
7805
7806
7807
7808
7809
7810
7811
7812
7813
7814
7815
7816
7817
7818ltmain=$ac_aux_dir/ltmain.sh
7819
7820# Backslashify metacharacters that are still active within
7821# double-quoted strings.
7822sed_quote_subst='s/\(["`$\\]\)/\\\1/g'
7823
7824# Same as above, but do not quote variable references.
7825double_quote_subst='s/\(["`\\]\)/\\\1/g'
7826
7827# Sed substitution to delay expansion of an escaped shell variable in a
7828# double_quote_subst'ed string.
7829delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
7830
7831# Sed substitution to delay expansion of an escaped single quote.
7832delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
7833
7834# Sed substitution to avoid accidental globbing in evaled expressions
7835no_glob_subst='s/\*/\\\*/g'
7836
7837ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
7838ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
7839ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
7840
7841{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5
7842printf %s "checking how to print strings... " >&6; }
7843# Test print first, because it will be a builtin if present.
7844if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \
7845   test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
7846  ECHO='print -r --'
7847elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
7848  ECHO='printf %s\n'
7849else
7850  # Use this function as a fallback that always works.
7851  func_fallback_echo ()
7852  {
7853    eval 'cat <<_LTECHO_EOF
7854$1
7855_LTECHO_EOF'
7856  }
7857  ECHO='func_fallback_echo'
7858fi
7859
7860# func_echo_all arg...
7861# Invoke $ECHO with all args, space-separated.
7862func_echo_all ()
7863{
7864    $ECHO ""
7865}
7866
7867case $ECHO in
7868  printf*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: printf" >&5
7869printf "%s\n" "printf" >&6; } ;;
7870  print*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: print -r" >&5
7871printf "%s\n" "print -r" >&6; } ;;
7872  *) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: cat" >&5
7873printf "%s\n" "cat" >&6; } ;;
7874esac
7875
7876
7877
7878
7879
7880
7881
7882
7883
7884
7885
7886
7887
7888
7889{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
7890printf %s "checking for a sed that does not truncate output... " >&6; }
7891if test ${ac_cv_path_SED+y}
7892then :
7893  printf %s "(cached) " >&6
7894else $as_nop
7895            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
7896     for ac_i in 1 2 3 4 5 6 7; do
7897       ac_script="$ac_script$as_nl$ac_script"
7898     done
7899     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
7900     { ac_script=; unset ac_script;}
7901     if test -z "$SED"; then
7902  ac_path_SED_found=false
7903  # Loop through the user's path and test for each of PROGNAME-LIST
7904  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7905for as_dir in $PATH
7906do
7907  IFS=$as_save_IFS
7908  case $as_dir in #(((
7909    '') as_dir=./ ;;
7910    */) ;;
7911    *) as_dir=$as_dir/ ;;
7912  esac
7913    for ac_prog in sed gsed
7914   do
7915    for ac_exec_ext in '' $ac_executable_extensions; do
7916      ac_path_SED="$as_dir$ac_prog$ac_exec_ext"
7917      as_fn_executable_p "$ac_path_SED" || continue
7918# Check for GNU ac_path_SED and select it if it is found.
7919  # Check for GNU $ac_path_SED
7920case `"$ac_path_SED" --version 2>&1` in
7921*GNU*)
7922  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
7923*)
7924  ac_count=0
7925  printf %s 0123456789 >"conftest.in"
7926  while :
7927  do
7928    cat "conftest.in" "conftest.in" >"conftest.tmp"
7929    mv "conftest.tmp" "conftest.in"
7930    cp "conftest.in" "conftest.nl"
7931    printf "%s\n" '' >> "conftest.nl"
7932    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
7933    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
7934    as_fn_arith $ac_count + 1 && ac_count=$as_val
7935    if test $ac_count -gt ${ac_path_SED_max-0}; then
7936      # Best one so far, save it but keep looking for a better one
7937      ac_cv_path_SED="$ac_path_SED"
7938      ac_path_SED_max=$ac_count
7939    fi
7940    # 10*(2^10) chars as input seems more than enough
7941    test $ac_count -gt 10 && break
7942  done
7943  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
7944esac
7945
7946      $ac_path_SED_found && break 3
7947    done
7948  done
7949  done
7950IFS=$as_save_IFS
7951  if test -z "$ac_cv_path_SED"; then
7952    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
7953  fi
7954else
7955  ac_cv_path_SED=$SED
7956fi
7957
7958fi
7959{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
7960printf "%s\n" "$ac_cv_path_SED" >&6; }
7961 SED="$ac_cv_path_SED"
7962  rm -f conftest.sed
7963
7964test -z "$SED" && SED=sed
7965Xsed="$SED -e 1s/^X//"
7966
7967
7968
7969
7970
7971
7972
7973
7974
7975
7976
7977{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
7978printf %s "checking for egrep... " >&6; }
7979if test ${ac_cv_path_EGREP+y}
7980then :
7981  printf %s "(cached) " >&6
7982else $as_nop
7983  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
7984   then ac_cv_path_EGREP="$GREP -E"
7985   else
7986     if test -z "$EGREP"; then
7987  ac_path_EGREP_found=false
7988  # Loop through the user's path and test for each of PROGNAME-LIST
7989  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7990for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
7991do
7992  IFS=$as_save_IFS
7993  case $as_dir in #(((
7994    '') as_dir=./ ;;
7995    */) ;;
7996    *) as_dir=$as_dir/ ;;
7997  esac
7998    for ac_prog in egrep
7999   do
8000    for ac_exec_ext in '' $ac_executable_extensions; do
8001      ac_path_EGREP="$as_dir$ac_prog$ac_exec_ext"
8002      as_fn_executable_p "$ac_path_EGREP" || continue
8003# Check for GNU ac_path_EGREP and select it if it is found.
8004  # Check for GNU $ac_path_EGREP
8005case `"$ac_path_EGREP" --version 2>&1` in
8006*GNU*)
8007  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
8008*)
8009  ac_count=0
8010  printf %s 0123456789 >"conftest.in"
8011  while :
8012  do
8013    cat "conftest.in" "conftest.in" >"conftest.tmp"
8014    mv "conftest.tmp" "conftest.in"
8015    cp "conftest.in" "conftest.nl"
8016    printf "%s\n" 'EGREP' >> "conftest.nl"
8017    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
8018    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
8019    as_fn_arith $ac_count + 1 && ac_count=$as_val
8020    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
8021      # Best one so far, save it but keep looking for a better one
8022      ac_cv_path_EGREP="$ac_path_EGREP"
8023      ac_path_EGREP_max=$ac_count
8024    fi
8025    # 10*(2^10) chars as input seems more than enough
8026    test $ac_count -gt 10 && break
8027  done
8028  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
8029esac
8030
8031      $ac_path_EGREP_found && break 3
8032    done
8033  done
8034  done
8035IFS=$as_save_IFS
8036  if test -z "$ac_cv_path_EGREP"; then
8037    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
8038  fi
8039else
8040  ac_cv_path_EGREP=$EGREP
8041fi
8042
8043   fi
8044fi
8045{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
8046printf "%s\n" "$ac_cv_path_EGREP" >&6; }
8047 EGREP="$ac_cv_path_EGREP"
8048
8049
8050{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
8051printf %s "checking for fgrep... " >&6; }
8052if test ${ac_cv_path_FGREP+y}
8053then :
8054  printf %s "(cached) " >&6
8055else $as_nop
8056  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
8057   then ac_cv_path_FGREP="$GREP -F"
8058   else
8059     if test -z "$FGREP"; then
8060  ac_path_FGREP_found=false
8061  # Loop through the user's path and test for each of PROGNAME-LIST
8062  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8063for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
8064do
8065  IFS=$as_save_IFS
8066  case $as_dir in #(((
8067    '') as_dir=./ ;;
8068    */) ;;
8069    *) as_dir=$as_dir/ ;;
8070  esac
8071    for ac_prog in fgrep
8072   do
8073    for ac_exec_ext in '' $ac_executable_extensions; do
8074      ac_path_FGREP="$as_dir$ac_prog$ac_exec_ext"
8075      as_fn_executable_p "$ac_path_FGREP" || continue
8076# Check for GNU ac_path_FGREP and select it if it is found.
8077  # Check for GNU $ac_path_FGREP
8078case `"$ac_path_FGREP" --version 2>&1` in
8079*GNU*)
8080  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
8081*)
8082  ac_count=0
8083  printf %s 0123456789 >"conftest.in"
8084  while :
8085  do
8086    cat "conftest.in" "conftest.in" >"conftest.tmp"
8087    mv "conftest.tmp" "conftest.in"
8088    cp "conftest.in" "conftest.nl"
8089    printf "%s\n" 'FGREP' >> "conftest.nl"
8090    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
8091    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
8092    as_fn_arith $ac_count + 1 && ac_count=$as_val
8093    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
8094      # Best one so far, save it but keep looking for a better one
8095      ac_cv_path_FGREP="$ac_path_FGREP"
8096      ac_path_FGREP_max=$ac_count
8097    fi
8098    # 10*(2^10) chars as input seems more than enough
8099    test $ac_count -gt 10 && break
8100  done
8101  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
8102esac
8103
8104      $ac_path_FGREP_found && break 3
8105    done
8106  done
8107  done
8108IFS=$as_save_IFS
8109  if test -z "$ac_cv_path_FGREP"; then
8110    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
8111  fi
8112else
8113  ac_cv_path_FGREP=$FGREP
8114fi
8115
8116   fi
8117fi
8118{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
8119printf "%s\n" "$ac_cv_path_FGREP" >&6; }
8120 FGREP="$ac_cv_path_FGREP"
8121
8122
8123test -z "$GREP" && GREP=grep
8124
8125
8126
8127
8128
8129
8130
8131
8132
8133
8134
8135
8136
8137
8138
8139
8140
8141
8142
8143# Check whether --with-gnu-ld was given.
8144if test ${with_gnu_ld+y}
8145then :
8146  withval=$with_gnu_ld; test no = "$withval" || with_gnu_ld=yes
8147else $as_nop
8148  with_gnu_ld=no
8149fi
8150
8151ac_prog=ld
8152if test yes = "$GCC"; then
8153  # Check if gcc -print-prog-name=ld gives a path.
8154  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5
8155printf %s "checking for ld used by $CC... " >&6; }
8156  case $host in
8157  *-*-mingw* | *-*-windows*)
8158    # gcc leaves a trailing carriage return, which upsets mingw
8159    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
8160  *)
8161    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
8162  esac
8163  case $ac_prog in
8164    # Accept absolute paths.
8165    [\\/]* | ?:[\\/]*)
8166      re_direlt='/[^/][^/]*/\.\./'
8167      # Canonicalize the pathname of ld
8168      ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
8169      while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
8170	ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
8171      done
8172      test -z "$LD" && LD=$ac_prog
8173      ;;
8174  "")
8175    # If it fails, then pretend we aren't using GCC.
8176    ac_prog=ld
8177    ;;
8178  *)
8179    # If it is relative, then search for the first ld in PATH.
8180    with_gnu_ld=unknown
8181    ;;
8182  esac
8183elif test yes = "$with_gnu_ld"; then
8184  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
8185printf %s "checking for GNU ld... " >&6; }
8186else
8187  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
8188printf %s "checking for non-GNU ld... " >&6; }
8189fi
8190if test ${lt_cv_path_LD+y}
8191then :
8192  printf %s "(cached) " >&6
8193else $as_nop
8194  if test -z "$LD"; then
8195  lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
8196  for ac_dir in $PATH; do
8197    IFS=$lt_save_ifs
8198    test -z "$ac_dir" && ac_dir=.
8199    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
8200      lt_cv_path_LD=$ac_dir/$ac_prog
8201      # Check to see if the program is GNU ld.  I'd rather use --version,
8202      # but apparently some variants of GNU ld only accept -v.
8203      # Break only if it was the GNU/non-GNU ld that we prefer.
8204      case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
8205      *GNU* | *'with BFD'*)
8206	test no != "$with_gnu_ld" && break
8207	;;
8208      *)
8209	test yes != "$with_gnu_ld" && break
8210	;;
8211      esac
8212    fi
8213  done
8214  IFS=$lt_save_ifs
8215else
8216  lt_cv_path_LD=$LD # Let the user override the test with a path.
8217fi
8218fi
8219
8220LD=$lt_cv_path_LD
8221if test -n "$LD"; then
8222  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
8223printf "%s\n" "$LD" >&6; }
8224else
8225  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
8226printf "%s\n" "no" >&6; }
8227fi
8228test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
8229{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
8230printf %s "checking if the linker ($LD) is GNU ld... " >&6; }
8231if test ${lt_cv_prog_gnu_ld+y}
8232then :
8233  printf %s "(cached) " >&6
8234else $as_nop
8235  # I'd rather use --version here, but apparently some GNU lds only accept -v.
8236case `$LD -v 2>&1 </dev/null` in
8237*GNU* | *'with BFD'*)
8238  lt_cv_prog_gnu_ld=yes
8239  ;;
8240*)
8241  lt_cv_prog_gnu_ld=no
8242  ;;
8243esac
8244fi
8245{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_gnu_ld" >&5
8246printf "%s\n" "$lt_cv_prog_gnu_ld" >&6; }
8247with_gnu_ld=$lt_cv_prog_gnu_ld
8248
8249
8250
8251
8252
8253
8254
8255
8256
8257{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)" >&5
8258printf %s "checking for BSD- or MS-compatible name lister (nm)... " >&6; }
8259if test ${lt_cv_path_NM+y}
8260then :
8261  printf %s "(cached) " >&6
8262else $as_nop
8263  if test -n "$NM"; then
8264  # Let the user override the test.
8265  lt_cv_path_NM=$NM
8266else
8267  lt_nm_to_check=${ac_tool_prefix}nm
8268  if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
8269    lt_nm_to_check="$lt_nm_to_check nm"
8270  fi
8271  for lt_tmp_nm in $lt_nm_to_check; do
8272    lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
8273    for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
8274      IFS=$lt_save_ifs
8275      test -z "$ac_dir" && ac_dir=.
8276      tmp_nm=$ac_dir/$lt_tmp_nm
8277      if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then
8278	# Check to see if the nm accepts a BSD-compat flag.
8279	# Adding the 'sed 1q' prevents false positives on HP-UX, which says:
8280	#   nm: unknown option "B" ignored
8281	# Tru64's nm complains that /dev/null is an invalid object file
8282	# MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty
8283	case $build_os in
8284	mingw* | windows*) lt_bad_file=conftest.nm/nofile ;;
8285	*) lt_bad_file=/dev/null ;;
8286	esac
8287	case `"$tmp_nm" -B $lt_bad_file 2>&1 | $SED '1q'` in
8288	*$lt_bad_file* | *'Invalid file or object type'*)
8289	  lt_cv_path_NM="$tmp_nm -B"
8290	  break 2
8291	  ;;
8292	*)
8293	  case `"$tmp_nm" -p /dev/null 2>&1 | $SED '1q'` in
8294	  */dev/null*)
8295	    lt_cv_path_NM="$tmp_nm -p"
8296	    break 2
8297	    ;;
8298	  *)
8299	    lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
8300	    continue # so that we can try to find one that supports BSD flags
8301	    ;;
8302	  esac
8303	  ;;
8304	esac
8305      fi
8306    done
8307    IFS=$lt_save_ifs
8308  done
8309  : ${lt_cv_path_NM=no}
8310fi
8311fi
8312{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5
8313printf "%s\n" "$lt_cv_path_NM" >&6; }
8314if test no != "$lt_cv_path_NM"; then
8315  NM=$lt_cv_path_NM
8316else
8317  # Didn't find any BSD compatible name lister, look for dumpbin.
8318  if test -n "$DUMPBIN"; then :
8319    # Let the user override the test.
8320  else
8321    if test -n "$ac_tool_prefix"; then
8322  for ac_prog in dumpbin "link -dump"
8323  do
8324    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
8325set dummy $ac_tool_prefix$ac_prog; ac_word=$2
8326{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8327printf %s "checking for $ac_word... " >&6; }
8328if test ${ac_cv_prog_DUMPBIN+y}
8329then :
8330  printf %s "(cached) " >&6
8331else $as_nop
8332  if test -n "$DUMPBIN"; then
8333  ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
8334else
8335as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8336for as_dir in $PATH
8337do
8338  IFS=$as_save_IFS
8339  case $as_dir in #(((
8340    '') as_dir=./ ;;
8341    */) ;;
8342    *) as_dir=$as_dir/ ;;
8343  esac
8344    for ac_exec_ext in '' $ac_executable_extensions; do
8345  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
8346    ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog"
8347    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
8348    break 2
8349  fi
8350done
8351  done
8352IFS=$as_save_IFS
8353
8354fi
8355fi
8356DUMPBIN=$ac_cv_prog_DUMPBIN
8357if test -n "$DUMPBIN"; then
8358  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
8359printf "%s\n" "$DUMPBIN" >&6; }
8360else
8361  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
8362printf "%s\n" "no" >&6; }
8363fi
8364
8365
8366    test -n "$DUMPBIN" && break
8367  done
8368fi
8369if test -z "$DUMPBIN"; then
8370  ac_ct_DUMPBIN=$DUMPBIN
8371  for ac_prog in dumpbin "link -dump"
8372do
8373  # Extract the first word of "$ac_prog", so it can be a program name with args.
8374set dummy $ac_prog; ac_word=$2
8375{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8376printf %s "checking for $ac_word... " >&6; }
8377if test ${ac_cv_prog_ac_ct_DUMPBIN+y}
8378then :
8379  printf %s "(cached) " >&6
8380else $as_nop
8381  if test -n "$ac_ct_DUMPBIN"; then
8382  ac_cv_prog_ac_ct_DUMPBIN="$ac_ct_DUMPBIN" # Let the user override the test.
8383else
8384as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8385for as_dir in $PATH
8386do
8387  IFS=$as_save_IFS
8388  case $as_dir in #(((
8389    '') as_dir=./ ;;
8390    */) ;;
8391    *) as_dir=$as_dir/ ;;
8392  esac
8393    for ac_exec_ext in '' $ac_executable_extensions; do
8394  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
8395    ac_cv_prog_ac_ct_DUMPBIN="$ac_prog"
8396    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
8397    break 2
8398  fi
8399done
8400  done
8401IFS=$as_save_IFS
8402
8403fi
8404fi
8405ac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN
8406if test -n "$ac_ct_DUMPBIN"; then
8407  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DUMPBIN" >&5
8408printf "%s\n" "$ac_ct_DUMPBIN" >&6; }
8409else
8410  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
8411printf "%s\n" "no" >&6; }
8412fi
8413
8414
8415  test -n "$ac_ct_DUMPBIN" && break
8416done
8417
8418  if test "x$ac_ct_DUMPBIN" = x; then
8419    DUMPBIN=":"
8420  else
8421    case $cross_compiling:$ac_tool_warned in
8422yes:)
8423{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8424printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8425ac_tool_warned=yes ;;
8426esac
8427    DUMPBIN=$ac_ct_DUMPBIN
8428  fi
8429fi
8430
8431    case `$DUMPBIN -symbols -headers /dev/null 2>&1 | $SED '1q'` in
8432    *COFF*)
8433      DUMPBIN="$DUMPBIN -symbols -headers"
8434      ;;
8435    *)
8436      DUMPBIN=:
8437      ;;
8438    esac
8439  fi
8440
8441  if test : != "$DUMPBIN"; then
8442    NM=$DUMPBIN
8443  fi
8444fi
8445test -z "$NM" && NM=nm
8446
8447
8448
8449
8450
8451
8452{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface" >&5
8453printf %s "checking the name lister ($NM) interface... " >&6; }
8454if test ${lt_cv_nm_interface+y}
8455then :
8456  printf %s "(cached) " >&6
8457else $as_nop
8458  lt_cv_nm_interface="BSD nm"
8459  echo "int some_variable = 0;" > conftest.$ac_ext
8460  (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&5)
8461  (eval "$ac_compile" 2>conftest.err)
8462  cat conftest.err >&5
8463  (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
8464  (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
8465  cat conftest.err >&5
8466  (eval echo "\"\$as_me:$LINENO: output\"" >&5)
8467  cat conftest.out >&5
8468  if $GREP 'External.*some_variable' conftest.out > /dev/null; then
8469    lt_cv_nm_interface="MS dumpbin"
8470  fi
8471  rm -f conftest*
8472fi
8473{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_nm_interface" >&5
8474printf "%s\n" "$lt_cv_nm_interface" >&6; }
8475
8476{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
8477printf %s "checking whether ln -s works... " >&6; }
8478LN_S=$as_ln_s
8479if test "$LN_S" = "ln -s"; then
8480  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8481printf "%s\n" "yes" >&6; }
8482else
8483  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
8484printf "%s\n" "no, using $LN_S" >&6; }
8485fi
8486
8487# find the maximum length of command line arguments
8488{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5
8489printf %s "checking the maximum length of command line arguments... " >&6; }
8490if test ${lt_cv_sys_max_cmd_len+y}
8491then :
8492  printf %s "(cached) " >&6
8493else $as_nop
8494    i=0
8495  teststring=ABCD
8496
8497  case $build_os in
8498  msdosdjgpp*)
8499    # On DJGPP, this test can blow up pretty badly due to problems in libc
8500    # (any single argument exceeding 2000 bytes causes a buffer overrun
8501    # during glob expansion).  Even if it were fixed, the result of this
8502    # check would be larger than it should be.
8503    lt_cv_sys_max_cmd_len=12288;    # 12K is about right
8504    ;;
8505
8506  gnu* | ironclad*)
8507    # Under GNU Hurd and Ironclad, this test is not required because there
8508    # is no limit to the length of command line arguments.
8509    # Libtool will interpret -1 as no limit whatsoever
8510    lt_cv_sys_max_cmd_len=-1;
8511    ;;
8512
8513  cygwin* | mingw* | windows* | cegcc*)
8514    # On Win9x/ME, this test blows up -- it succeeds, but takes
8515    # about 5 minutes as the teststring grows exponentially.
8516    # Worse, since 9x/ME are not pre-emptively multitasking,
8517    # you end up with a "frozen" computer, even though with patience
8518    # the test eventually succeeds (with a max line length of 256k).
8519    # Instead, let's just punt: use the minimum linelength reported by
8520    # all of the supported platforms: 8192 (on NT/2K/XP).
8521    lt_cv_sys_max_cmd_len=8192;
8522    ;;
8523
8524  mint*)
8525    # On MiNT this can take a long time and run out of memory.
8526    lt_cv_sys_max_cmd_len=8192;
8527    ;;
8528
8529  amigaos*)
8530    # On AmigaOS with pdksh, this test takes hours, literally.
8531    # So we just punt and use a minimum line length of 8192.
8532    lt_cv_sys_max_cmd_len=8192;
8533    ;;
8534
8535  darwin* | dragonfly* | freebsd* | midnightbsd* | netbsd* | openbsd*)
8536    # This has been around since 386BSD, at least.  Likely further.
8537    if test -x /sbin/sysctl; then
8538      lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
8539    elif test -x /usr/sbin/sysctl; then
8540      lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
8541    else
8542      lt_cv_sys_max_cmd_len=65536	# usable default for all BSDs
8543    fi
8544    # And add a safety zone
8545    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
8546    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
8547    ;;
8548
8549  interix*)
8550    # We know the value 262144 and hardcode it with a safety zone (like BSD)
8551    lt_cv_sys_max_cmd_len=196608
8552    ;;
8553
8554  os2*)
8555    # The test takes a long time on OS/2.
8556    lt_cv_sys_max_cmd_len=8192
8557    ;;
8558
8559  osf*)
8560    # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
8561    # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
8562    # nice to cause kernel panics so lets avoid the loop below.
8563    # First set a reasonable default.
8564    lt_cv_sys_max_cmd_len=16384
8565    #
8566    if test -x /sbin/sysconfig; then
8567      case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
8568        *1*) lt_cv_sys_max_cmd_len=-1 ;;
8569      esac
8570    fi
8571    ;;
8572  sco3.2v5*)
8573    lt_cv_sys_max_cmd_len=102400
8574    ;;
8575  sysv5* | sco5v6* | sysv4.2uw2*)
8576    kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
8577    if test -n "$kargmax"; then
8578      lt_cv_sys_max_cmd_len=`echo $kargmax | $SED 's/.*[	 ]//'`
8579    else
8580      lt_cv_sys_max_cmd_len=32768
8581    fi
8582    ;;
8583  *)
8584    lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
8585    if test -n "$lt_cv_sys_max_cmd_len" && \
8586       test undefined != "$lt_cv_sys_max_cmd_len"; then
8587      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
8588      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
8589    else
8590      # Make teststring a little bigger before we do anything with it.
8591      # a 1K string should be a reasonable start.
8592      for i in 1 2 3 4 5 6 7 8; do
8593        teststring=$teststring$teststring
8594      done
8595      SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
8596      # If test is not a shell built-in, we'll probably end up computing a
8597      # maximum length that is only half of the actual maximum length, but
8598      # we can't tell.
8599      while { test X`env echo "$teststring$teststring" 2>/dev/null` \
8600	         = "X$teststring$teststring"; } >/dev/null 2>&1 &&
8601	      test 17 != "$i" # 1/2 MB should be enough
8602      do
8603        i=`expr $i + 1`
8604        teststring=$teststring$teststring
8605      done
8606      # Only check the string length outside the loop.
8607      lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
8608      teststring=
8609      # Add a significant safety factor because C++ compilers can tack on
8610      # massive amounts of additional arguments before passing them to the
8611      # linker.  It appears as though 1/2 is a usable value.
8612      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
8613    fi
8614    ;;
8615  esac
8616
8617fi
8618
8619if test -n "$lt_cv_sys_max_cmd_len"; then
8620  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len" >&5
8621printf "%s\n" "$lt_cv_sys_max_cmd_len" >&6; }
8622else
8623  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none" >&5
8624printf "%s\n" "none" >&6; }
8625fi
8626max_cmd_len=$lt_cv_sys_max_cmd_len
8627
8628
8629
8630
8631
8632
8633: ${CP="cp -f"}
8634: ${MV="mv -f"}
8635: ${RM="rm -f"}
8636
8637if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
8638  lt_unset=unset
8639else
8640  lt_unset=false
8641fi
8642
8643
8644
8645
8646
8647# test EBCDIC or ASCII
8648case `echo X|tr X '\101'` in
8649 A) # ASCII based system
8650    # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
8651  lt_SP2NL='tr \040 \012'
8652  lt_NL2SP='tr \015\012 \040\040'
8653  ;;
8654 *) # EBCDIC based system
8655  lt_SP2NL='tr \100 \n'
8656  lt_NL2SP='tr \r\n \100\100'
8657  ;;
8658esac
8659
8660
8661
8662
8663
8664
8665
8666
8667
8668{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to $host format" >&5
8669printf %s "checking how to convert $build file names to $host format... " >&6; }
8670if test ${lt_cv_to_host_file_cmd+y}
8671then :
8672  printf %s "(cached) " >&6
8673else $as_nop
8674  case $host in
8675  *-*-mingw* )
8676    case $build in
8677      *-*-mingw* | *-*-windows* ) # actually msys
8678        lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32
8679        ;;
8680      *-*-cygwin* )
8681        lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32
8682        ;;
8683      * ) # otherwise, assume *nix
8684        lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32
8685        ;;
8686    esac
8687    ;;
8688  *-*-cygwin* )
8689    case $build in
8690      *-*-mingw* | *-*-windows* ) # actually msys
8691        lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin
8692        ;;
8693      *-*-cygwin* )
8694        lt_cv_to_host_file_cmd=func_convert_file_noop
8695        ;;
8696      * ) # otherwise, assume *nix
8697        lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin
8698        ;;
8699    esac
8700    ;;
8701  * ) # unhandled hosts (and "normal" native builds)
8702    lt_cv_to_host_file_cmd=func_convert_file_noop
8703    ;;
8704esac
8705
8706fi
8707
8708to_host_file_cmd=$lt_cv_to_host_file_cmd
8709{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_host_file_cmd" >&5
8710printf "%s\n" "$lt_cv_to_host_file_cmd" >&6; }
8711
8712
8713
8714
8715
8716{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format" >&5
8717printf %s "checking how to convert $build file names to toolchain format... " >&6; }
8718if test ${lt_cv_to_tool_file_cmd+y}
8719then :
8720  printf %s "(cached) " >&6
8721else $as_nop
8722  #assume ordinary cross tools, or native build.
8723lt_cv_to_tool_file_cmd=func_convert_file_noop
8724case $host in
8725  *-*-mingw* | *-*-windows* )
8726    case $build in
8727      *-*-mingw* | *-*-windows* ) # actually msys
8728        lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32
8729        ;;
8730    esac
8731    ;;
8732esac
8733
8734fi
8735
8736to_tool_file_cmd=$lt_cv_to_tool_file_cmd
8737{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_tool_file_cmd" >&5
8738printf "%s\n" "$lt_cv_to_tool_file_cmd" >&6; }
8739
8740
8741
8742
8743
8744{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5
8745printf %s "checking for $LD option to reload object files... " >&6; }
8746if test ${lt_cv_ld_reload_flag+y}
8747then :
8748  printf %s "(cached) " >&6
8749else $as_nop
8750  lt_cv_ld_reload_flag='-r'
8751fi
8752{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_reload_flag" >&5
8753printf "%s\n" "$lt_cv_ld_reload_flag" >&6; }
8754reload_flag=$lt_cv_ld_reload_flag
8755case $reload_flag in
8756"" | " "*) ;;
8757*) reload_flag=" $reload_flag" ;;
8758esac
8759reload_cmds='$LD$reload_flag -o $output$reload_objs'
8760case $host_os in
8761  cygwin* | mingw* | windows* | pw32* | cegcc*)
8762    if test yes != "$GCC"; then
8763      reload_cmds=false
8764    fi
8765    ;;
8766  darwin*)
8767    if test yes = "$GCC"; then
8768      reload_cmds='$LTCC $LTCFLAGS -nostdlib $wl-r -o $output$reload_objs'
8769    else
8770      reload_cmds='$LD$reload_flag -o $output$reload_objs'
8771    fi
8772    ;;
8773esac
8774
8775
8776
8777
8778
8779
8780
8781
8782
8783# Extract the first word of "file", so it can be a program name with args.
8784set dummy file; ac_word=$2
8785{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8786printf %s "checking for $ac_word... " >&6; }
8787if test ${ac_cv_prog_FILECMD+y}
8788then :
8789  printf %s "(cached) " >&6
8790else $as_nop
8791  if test -n "$FILECMD"; then
8792  ac_cv_prog_FILECMD="$FILECMD" # Let the user override the test.
8793else
8794as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8795for as_dir in $PATH
8796do
8797  IFS=$as_save_IFS
8798  case $as_dir in #(((
8799    '') as_dir=./ ;;
8800    */) ;;
8801    *) as_dir=$as_dir/ ;;
8802  esac
8803    for ac_exec_ext in '' $ac_executable_extensions; do
8804  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
8805    ac_cv_prog_FILECMD="file"
8806    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
8807    break 2
8808  fi
8809done
8810  done
8811IFS=$as_save_IFS
8812
8813  test -z "$ac_cv_prog_FILECMD" && ac_cv_prog_FILECMD=":"
8814fi
8815fi
8816FILECMD=$ac_cv_prog_FILECMD
8817if test -n "$FILECMD"; then
8818  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $FILECMD" >&5
8819printf "%s\n" "$FILECMD" >&6; }
8820else
8821  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
8822printf "%s\n" "no" >&6; }
8823fi
8824
8825
8826
8827
8828
8829
8830
8831
8832if test -n "$ac_tool_prefix"; then
8833  # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
8834set dummy ${ac_tool_prefix}objdump; ac_word=$2
8835{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8836printf %s "checking for $ac_word... " >&6; }
8837if test ${ac_cv_prog_OBJDUMP+y}
8838then :
8839  printf %s "(cached) " >&6
8840else $as_nop
8841  if test -n "$OBJDUMP"; then
8842  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
8843else
8844as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8845for as_dir in $PATH
8846do
8847  IFS=$as_save_IFS
8848  case $as_dir in #(((
8849    '') as_dir=./ ;;
8850    */) ;;
8851    *) as_dir=$as_dir/ ;;
8852  esac
8853    for ac_exec_ext in '' $ac_executable_extensions; do
8854  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
8855    ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
8856    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
8857    break 2
8858  fi
8859done
8860  done
8861IFS=$as_save_IFS
8862
8863fi
8864fi
8865OBJDUMP=$ac_cv_prog_OBJDUMP
8866if test -n "$OBJDUMP"; then
8867  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
8868printf "%s\n" "$OBJDUMP" >&6; }
8869else
8870  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
8871printf "%s\n" "no" >&6; }
8872fi
8873
8874
8875fi
8876if test -z "$ac_cv_prog_OBJDUMP"; then
8877  ac_ct_OBJDUMP=$OBJDUMP
8878  # Extract the first word of "objdump", so it can be a program name with args.
8879set dummy objdump; ac_word=$2
8880{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8881printf %s "checking for $ac_word... " >&6; }
8882if test ${ac_cv_prog_ac_ct_OBJDUMP+y}
8883then :
8884  printf %s "(cached) " >&6
8885else $as_nop
8886  if test -n "$ac_ct_OBJDUMP"; then
8887  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
8888else
8889as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8890for as_dir in $PATH
8891do
8892  IFS=$as_save_IFS
8893  case $as_dir in #(((
8894    '') as_dir=./ ;;
8895    */) ;;
8896    *) as_dir=$as_dir/ ;;
8897  esac
8898    for ac_exec_ext in '' $ac_executable_extensions; do
8899  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
8900    ac_cv_prog_ac_ct_OBJDUMP="objdump"
8901    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
8902    break 2
8903  fi
8904done
8905  done
8906IFS=$as_save_IFS
8907
8908fi
8909fi
8910ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
8911if test -n "$ac_ct_OBJDUMP"; then
8912  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
8913printf "%s\n" "$ac_ct_OBJDUMP" >&6; }
8914else
8915  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
8916printf "%s\n" "no" >&6; }
8917fi
8918
8919  if test "x$ac_ct_OBJDUMP" = x; then
8920    OBJDUMP="false"
8921  else
8922    case $cross_compiling:$ac_tool_warned in
8923yes:)
8924{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8925printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8926ac_tool_warned=yes ;;
8927esac
8928    OBJDUMP=$ac_ct_OBJDUMP
8929  fi
8930else
8931  OBJDUMP="$ac_cv_prog_OBJDUMP"
8932fi
8933
8934test -z "$OBJDUMP" && OBJDUMP=objdump
8935
8936
8937
8938
8939
8940
8941
8942
8943
8944{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries" >&5
8945printf %s "checking how to recognize dependent libraries... " >&6; }
8946if test ${lt_cv_deplibs_check_method+y}
8947then :
8948  printf %s "(cached) " >&6
8949else $as_nop
8950  lt_cv_file_magic_cmd='$MAGIC_CMD'
8951lt_cv_file_magic_test_file=
8952lt_cv_deplibs_check_method='unknown'
8953# Need to set the preceding variable on all platforms that support
8954# interlibrary dependencies.
8955# 'none' -- dependencies not supported.
8956# 'unknown' -- same as none, but documents that we really don't know.
8957# 'pass_all' -- all dependencies passed with no checks.
8958# 'file_magic [[regex]]' -- check by looking for files in library path
8959# that responds to the $file_magic_cmd with a given extended regex.
8960# If you have 'file' or equivalent on your system and you're not sure
8961# whether 'pass_all' will *always* work, you probably want this one.
8962
8963case $host_os in
8964aix[4-9]*)
8965  lt_cv_deplibs_check_method=pass_all
8966  ;;
8967
8968beos*)
8969  lt_cv_deplibs_check_method=pass_all
8970  ;;
8971
8972bsdi[45]*)
8973  lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
8974  lt_cv_file_magic_cmd='$FILECMD -L'
8975  lt_cv_file_magic_test_file=/shlib/libc.so
8976  ;;
8977
8978cygwin*)
8979  # func_win32_libid is a shell function defined in ltmain.sh
8980  lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
8981  lt_cv_file_magic_cmd='func_win32_libid'
8982  ;;
8983
8984mingw* | windows* | pw32*)
8985  # Base MSYS/MinGW do not provide the 'file' command needed by
8986  # func_win32_libid shell function, so use a weaker test based on 'objdump',
8987  # unless we find 'file', for example because we are cross-compiling.
8988  if ( file / ) >/dev/null 2>&1; then
8989    lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
8990    lt_cv_file_magic_cmd='func_win32_libid'
8991  else
8992    # Keep this pattern in sync with the one in func_win32_libid.
8993    lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64|pe-aarch64)'
8994    lt_cv_file_magic_cmd='$OBJDUMP -f'
8995  fi
8996  ;;
8997
8998cegcc*)
8999  # use the weaker test based on 'objdump'. See mingw*.
9000  lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
9001  lt_cv_file_magic_cmd='$OBJDUMP -f'
9002  ;;
9003
9004darwin* | rhapsody*)
9005  lt_cv_deplibs_check_method=pass_all
9006  ;;
9007
9008freebsd* | dragonfly* | midnightbsd*)
9009  if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
9010    case $host_cpu in
9011    i*86 )
9012      # Not sure whether the presence of OpenBSD here was a mistake.
9013      # Let's accept both of them until this is cleared up.
9014      lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library'
9015      lt_cv_file_magic_cmd=$FILECMD
9016      lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
9017      ;;
9018    esac
9019  else
9020    lt_cv_deplibs_check_method=pass_all
9021  fi
9022  ;;
9023
9024haiku*)
9025  lt_cv_deplibs_check_method=pass_all
9026  ;;
9027
9028hpux10.20* | hpux11*)
9029  lt_cv_file_magic_cmd=$FILECMD
9030  case $host_cpu in
9031  ia64*)
9032    lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64'
9033    lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
9034    ;;
9035  hppa*64*)
9036    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]'
9037    lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
9038    ;;
9039  *)
9040    lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9]\.[0-9]) shared library'
9041    lt_cv_file_magic_test_file=/usr/lib/libc.sl
9042    ;;
9043  esac
9044  ;;
9045
9046interix[3-9]*)
9047  # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
9048  lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$'
9049  ;;
9050
9051irix5* | irix6* | nonstopux*)
9052  case $LD in
9053  *-32|*"-32 ") libmagic=32-bit;;
9054  *-n32|*"-n32 ") libmagic=N32;;
9055  *-64|*"-64 ") libmagic=64-bit;;
9056  *) libmagic=never-match;;
9057  esac
9058  lt_cv_deplibs_check_method=pass_all
9059  ;;
9060
9061# This must be glibc/ELF.
9062linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
9063  lt_cv_deplibs_check_method=pass_all
9064  ;;
9065
9066*-mlibc)
9067  lt_cv_deplibs_check_method=pass_all
9068  ;;
9069
9070netbsd* | netbsdelf*-gnu)
9071  if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
9072    lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
9073  else
9074    lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$'
9075  fi
9076  ;;
9077
9078newos6*)
9079  lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'
9080  lt_cv_file_magic_cmd=$FILECMD
9081  lt_cv_file_magic_test_file=/usr/lib/libnls.so
9082  ;;
9083
9084*nto* | *qnx*)
9085  lt_cv_deplibs_check_method=pass_all
9086  ;;
9087
9088openbsd*)
9089  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
9090    lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$'
9091  else
9092    lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
9093  fi
9094  ;;
9095
9096osf3* | osf4* | osf5*)
9097  lt_cv_deplibs_check_method=pass_all
9098  ;;
9099
9100rdos*)
9101  lt_cv_deplibs_check_method=pass_all
9102  ;;
9103
9104serenity*)
9105  lt_cv_deplibs_check_method=pass_all
9106  ;;
9107
9108solaris*)
9109  lt_cv_deplibs_check_method=pass_all
9110  ;;
9111
9112sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
9113  lt_cv_deplibs_check_method=pass_all
9114  ;;
9115
9116sysv4 | sysv4.3*)
9117  case $host_vendor in
9118  motorola)
9119    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]'
9120    lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
9121    ;;
9122  ncr)
9123    lt_cv_deplibs_check_method=pass_all
9124    ;;
9125  sequent)
9126    lt_cv_file_magic_cmd='/bin/file'
9127    lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'
9128    ;;
9129  sni)
9130    lt_cv_file_magic_cmd='/bin/file'
9131    lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib"
9132    lt_cv_file_magic_test_file=/lib/libc.so
9133    ;;
9134  siemens)
9135    lt_cv_deplibs_check_method=pass_all
9136    ;;
9137  pc)
9138    lt_cv_deplibs_check_method=pass_all
9139    ;;
9140  esac
9141  ;;
9142
9143tpf*)
9144  lt_cv_deplibs_check_method=pass_all
9145  ;;
9146os2*)
9147  lt_cv_deplibs_check_method=pass_all
9148  ;;
9149esac
9150
9151fi
9152{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5
9153printf "%s\n" "$lt_cv_deplibs_check_method" >&6; }
9154
9155file_magic_glob=
9156want_nocaseglob=no
9157if test "$build" = "$host"; then
9158  case $host_os in
9159  mingw* | windows* | pw32*)
9160    if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then
9161      want_nocaseglob=yes
9162    else
9163      file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[\1]\/[\1]\/g;/g"`
9164    fi
9165    ;;
9166  esac
9167fi
9168
9169file_magic_cmd=$lt_cv_file_magic_cmd
9170deplibs_check_method=$lt_cv_deplibs_check_method
9171test -z "$deplibs_check_method" && deplibs_check_method=unknown
9172
9173
9174
9175
9176
9177
9178
9179
9180
9181
9182
9183
9184
9185
9186
9187
9188
9189
9190
9191
9192
9193
9194if test -n "$ac_tool_prefix"; then
9195  # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
9196set dummy ${ac_tool_prefix}dlltool; ac_word=$2
9197{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9198printf %s "checking for $ac_word... " >&6; }
9199if test ${ac_cv_prog_DLLTOOL+y}
9200then :
9201  printf %s "(cached) " >&6
9202else $as_nop
9203  if test -n "$DLLTOOL"; then
9204  ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
9205else
9206as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9207for as_dir in $PATH
9208do
9209  IFS=$as_save_IFS
9210  case $as_dir in #(((
9211    '') as_dir=./ ;;
9212    */) ;;
9213    *) as_dir=$as_dir/ ;;
9214  esac
9215    for ac_exec_ext in '' $ac_executable_extensions; do
9216  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
9217    ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
9218    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
9219    break 2
9220  fi
9221done
9222  done
9223IFS=$as_save_IFS
9224
9225fi
9226fi
9227DLLTOOL=$ac_cv_prog_DLLTOOL
9228if test -n "$DLLTOOL"; then
9229  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5
9230printf "%s\n" "$DLLTOOL" >&6; }
9231else
9232  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
9233printf "%s\n" "no" >&6; }
9234fi
9235
9236
9237fi
9238if test -z "$ac_cv_prog_DLLTOOL"; then
9239  ac_ct_DLLTOOL=$DLLTOOL
9240  # Extract the first word of "dlltool", so it can be a program name with args.
9241set dummy dlltool; ac_word=$2
9242{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9243printf %s "checking for $ac_word... " >&6; }
9244if test ${ac_cv_prog_ac_ct_DLLTOOL+y}
9245then :
9246  printf %s "(cached) " >&6
9247else $as_nop
9248  if test -n "$ac_ct_DLLTOOL"; then
9249  ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
9250else
9251as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9252for as_dir in $PATH
9253do
9254  IFS=$as_save_IFS
9255  case $as_dir in #(((
9256    '') as_dir=./ ;;
9257    */) ;;
9258    *) as_dir=$as_dir/ ;;
9259  esac
9260    for ac_exec_ext in '' $ac_executable_extensions; do
9261  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
9262    ac_cv_prog_ac_ct_DLLTOOL="dlltool"
9263    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
9264    break 2
9265  fi
9266done
9267  done
9268IFS=$as_save_IFS
9269
9270fi
9271fi
9272ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
9273if test -n "$ac_ct_DLLTOOL"; then
9274  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5
9275printf "%s\n" "$ac_ct_DLLTOOL" >&6; }
9276else
9277  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
9278printf "%s\n" "no" >&6; }
9279fi
9280
9281  if test "x$ac_ct_DLLTOOL" = x; then
9282    DLLTOOL="false"
9283  else
9284    case $cross_compiling:$ac_tool_warned in
9285yes:)
9286{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9287printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9288ac_tool_warned=yes ;;
9289esac
9290    DLLTOOL=$ac_ct_DLLTOOL
9291  fi
9292else
9293  DLLTOOL="$ac_cv_prog_DLLTOOL"
9294fi
9295
9296test -z "$DLLTOOL" && DLLTOOL=dlltool
9297
9298
9299
9300
9301
9302
9303
9304
9305
9306
9307{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to associate runtime and link libraries" >&5
9308printf %s "checking how to associate runtime and link libraries... " >&6; }
9309if test ${lt_cv_sharedlib_from_linklib_cmd+y}
9310then :
9311  printf %s "(cached) " >&6
9312else $as_nop
9313  lt_cv_sharedlib_from_linklib_cmd='unknown'
9314
9315case $host_os in
9316cygwin* | mingw* | windows* | pw32* | cegcc*)
9317  # two different shell functions defined in ltmain.sh;
9318  # decide which one to use based on capabilities of $DLLTOOL
9319  case `$DLLTOOL --help 2>&1` in
9320  *--identify-strict*)
9321    lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib
9322    ;;
9323  *)
9324    lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback
9325    ;;
9326  esac
9327  ;;
9328*)
9329  # fallback: assume linklib IS sharedlib
9330  lt_cv_sharedlib_from_linklib_cmd=$ECHO
9331  ;;
9332esac
9333
9334fi
9335{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sharedlib_from_linklib_cmd" >&5
9336printf "%s\n" "$lt_cv_sharedlib_from_linklib_cmd" >&6; }
9337sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd
9338test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO
9339
9340
9341
9342
9343
9344
9345
9346if test -n "$ac_tool_prefix"; then
9347  # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
9348set dummy ${ac_tool_prefix}ranlib; ac_word=$2
9349{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9350printf %s "checking for $ac_word... " >&6; }
9351if test ${ac_cv_prog_RANLIB+y}
9352then :
9353  printf %s "(cached) " >&6
9354else $as_nop
9355  if test -n "$RANLIB"; then
9356  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
9357else
9358as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9359for as_dir in $PATH
9360do
9361  IFS=$as_save_IFS
9362  case $as_dir in #(((
9363    '') as_dir=./ ;;
9364    */) ;;
9365    *) as_dir=$as_dir/ ;;
9366  esac
9367    for ac_exec_ext in '' $ac_executable_extensions; do
9368  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
9369    ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
9370    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
9371    break 2
9372  fi
9373done
9374  done
9375IFS=$as_save_IFS
9376
9377fi
9378fi
9379RANLIB=$ac_cv_prog_RANLIB
9380if test -n "$RANLIB"; then
9381  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
9382printf "%s\n" "$RANLIB" >&6; }
9383else
9384  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
9385printf "%s\n" "no" >&6; }
9386fi
9387
9388
9389fi
9390if test -z "$ac_cv_prog_RANLIB"; then
9391  ac_ct_RANLIB=$RANLIB
9392  # Extract the first word of "ranlib", so it can be a program name with args.
9393set dummy ranlib; ac_word=$2
9394{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9395printf %s "checking for $ac_word... " >&6; }
9396if test ${ac_cv_prog_ac_ct_RANLIB+y}
9397then :
9398  printf %s "(cached) " >&6
9399else $as_nop
9400  if test -n "$ac_ct_RANLIB"; then
9401  ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
9402else
9403as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9404for as_dir in $PATH
9405do
9406  IFS=$as_save_IFS
9407  case $as_dir in #(((
9408    '') as_dir=./ ;;
9409    */) ;;
9410    *) as_dir=$as_dir/ ;;
9411  esac
9412    for ac_exec_ext in '' $ac_executable_extensions; do
9413  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
9414    ac_cv_prog_ac_ct_RANLIB="ranlib"
9415    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
9416    break 2
9417  fi
9418done
9419  done
9420IFS=$as_save_IFS
9421
9422fi
9423fi
9424ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
9425if test -n "$ac_ct_RANLIB"; then
9426  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
9427printf "%s\n" "$ac_ct_RANLIB" >&6; }
9428else
9429  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
9430printf "%s\n" "no" >&6; }
9431fi
9432
9433  if test "x$ac_ct_RANLIB" = x; then
9434    RANLIB=":"
9435  else
9436    case $cross_compiling:$ac_tool_warned in
9437yes:)
9438{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9439printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9440ac_tool_warned=yes ;;
9441esac
9442    RANLIB=$ac_ct_RANLIB
9443  fi
9444else
9445  RANLIB="$ac_cv_prog_RANLIB"
9446fi
9447
9448if test -n "$ac_tool_prefix"; then
9449  for ac_prog in ar
9450  do
9451    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
9452set dummy $ac_tool_prefix$ac_prog; ac_word=$2
9453{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9454printf %s "checking for $ac_word... " >&6; }
9455if test ${ac_cv_prog_AR+y}
9456then :
9457  printf %s "(cached) " >&6
9458else $as_nop
9459  if test -n "$AR"; then
9460  ac_cv_prog_AR="$AR" # Let the user override the test.
9461else
9462as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9463for as_dir in $PATH
9464do
9465  IFS=$as_save_IFS
9466  case $as_dir in #(((
9467    '') as_dir=./ ;;
9468    */) ;;
9469    *) as_dir=$as_dir/ ;;
9470  esac
9471    for ac_exec_ext in '' $ac_executable_extensions; do
9472  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
9473    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
9474    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
9475    break 2
9476  fi
9477done
9478  done
9479IFS=$as_save_IFS
9480
9481fi
9482fi
9483AR=$ac_cv_prog_AR
9484if test -n "$AR"; then
9485  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
9486printf "%s\n" "$AR" >&6; }
9487else
9488  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
9489printf "%s\n" "no" >&6; }
9490fi
9491
9492
9493    test -n "$AR" && break
9494  done
9495fi
9496if test -z "$AR"; then
9497  ac_ct_AR=$AR
9498  for ac_prog in ar
9499do
9500  # Extract the first word of "$ac_prog", so it can be a program name with args.
9501set dummy $ac_prog; ac_word=$2
9502{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9503printf %s "checking for $ac_word... " >&6; }
9504if test ${ac_cv_prog_ac_ct_AR+y}
9505then :
9506  printf %s "(cached) " >&6
9507else $as_nop
9508  if test -n "$ac_ct_AR"; then
9509  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
9510else
9511as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9512for as_dir in $PATH
9513do
9514  IFS=$as_save_IFS
9515  case $as_dir in #(((
9516    '') as_dir=./ ;;
9517    */) ;;
9518    *) as_dir=$as_dir/ ;;
9519  esac
9520    for ac_exec_ext in '' $ac_executable_extensions; do
9521  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
9522    ac_cv_prog_ac_ct_AR="$ac_prog"
9523    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
9524    break 2
9525  fi
9526done
9527  done
9528IFS=$as_save_IFS
9529
9530fi
9531fi
9532ac_ct_AR=$ac_cv_prog_ac_ct_AR
9533if test -n "$ac_ct_AR"; then
9534  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
9535printf "%s\n" "$ac_ct_AR" >&6; }
9536else
9537  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
9538printf "%s\n" "no" >&6; }
9539fi
9540
9541
9542  test -n "$ac_ct_AR" && break
9543done
9544
9545  if test "x$ac_ct_AR" = x; then
9546    AR="false"
9547  else
9548    case $cross_compiling:$ac_tool_warned in
9549yes:)
9550{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9551printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9552ac_tool_warned=yes ;;
9553esac
9554    AR=$ac_ct_AR
9555  fi
9556fi
9557
9558: ${AR=ar}
9559
9560
9561
9562
9563
9564
9565# Use ARFLAGS variable as AR's operation code to sync the variable naming with
9566# Automake.  If both AR_FLAGS and ARFLAGS are specified, AR_FLAGS should have
9567# higher priority because that's what people were doing historically (setting
9568# ARFLAGS for automake and AR_FLAGS for libtool).  FIXME: Make the AR_FLAGS
9569# variable obsoleted/removed.
9570
9571test ${AR_FLAGS+y} || AR_FLAGS=${ARFLAGS-cr}
9572lt_ar_flags=$AR_FLAGS
9573
9574
9575
9576
9577
9578
9579# Make AR_FLAGS overridable by 'make ARFLAGS='.  Don't try to run-time override
9580# by AR_FLAGS because that was never working and AR_FLAGS is about to die.
9581
9582
9583
9584
9585
9586
9587{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support" >&5
9588printf %s "checking for archiver @FILE support... " >&6; }
9589if test ${lt_cv_ar_at_file+y}
9590then :
9591  printf %s "(cached) " >&6
9592else $as_nop
9593  lt_cv_ar_at_file=no
9594   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9595/* end confdefs.h.  */
9596
9597int
9598main (void)
9599{
9600
9601  ;
9602  return 0;
9603}
9604_ACEOF
9605if ac_fn_c_try_compile "$LINENO"
9606then :
9607  echo conftest.$ac_objext > conftest.lst
9608      lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&5'
9609      { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5
9610  (eval $lt_ar_try) 2>&5
9611  ac_status=$?
9612  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
9613  test $ac_status = 0; }
9614      if test 0 -eq "$ac_status"; then
9615	# Ensure the archiver fails upon bogus file names.
9616	rm -f conftest.$ac_objext libconftest.a
9617	{ { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5
9618  (eval $lt_ar_try) 2>&5
9619  ac_status=$?
9620  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
9621  test $ac_status = 0; }
9622	if test 0 -ne "$ac_status"; then
9623          lt_cv_ar_at_file=@
9624        fi
9625      fi
9626      rm -f conftest.* libconftest.a
9627
9628fi
9629rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
9630
9631fi
9632{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5
9633printf "%s\n" "$lt_cv_ar_at_file" >&6; }
9634
9635if test no = "$lt_cv_ar_at_file"; then
9636  archiver_list_spec=
9637else
9638  archiver_list_spec=$lt_cv_ar_at_file
9639fi
9640
9641
9642
9643
9644
9645
9646
9647if test -n "$ac_tool_prefix"; then
9648  # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
9649set dummy ${ac_tool_prefix}strip; ac_word=$2
9650{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9651printf %s "checking for $ac_word... " >&6; }
9652if test ${ac_cv_prog_STRIP+y}
9653then :
9654  printf %s "(cached) " >&6
9655else $as_nop
9656  if test -n "$STRIP"; then
9657  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
9658else
9659as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9660for as_dir in $PATH
9661do
9662  IFS=$as_save_IFS
9663  case $as_dir in #(((
9664    '') as_dir=./ ;;
9665    */) ;;
9666    *) as_dir=$as_dir/ ;;
9667  esac
9668    for ac_exec_ext in '' $ac_executable_extensions; do
9669  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
9670    ac_cv_prog_STRIP="${ac_tool_prefix}strip"
9671    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
9672    break 2
9673  fi
9674done
9675  done
9676IFS=$as_save_IFS
9677
9678fi
9679fi
9680STRIP=$ac_cv_prog_STRIP
9681if test -n "$STRIP"; then
9682  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
9683printf "%s\n" "$STRIP" >&6; }
9684else
9685  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
9686printf "%s\n" "no" >&6; }
9687fi
9688
9689
9690fi
9691if test -z "$ac_cv_prog_STRIP"; then
9692  ac_ct_STRIP=$STRIP
9693  # Extract the first word of "strip", so it can be a program name with args.
9694set dummy strip; ac_word=$2
9695{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9696printf %s "checking for $ac_word... " >&6; }
9697if test ${ac_cv_prog_ac_ct_STRIP+y}
9698then :
9699  printf %s "(cached) " >&6
9700else $as_nop
9701  if test -n "$ac_ct_STRIP"; then
9702  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
9703else
9704as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9705for as_dir in $PATH
9706do
9707  IFS=$as_save_IFS
9708  case $as_dir in #(((
9709    '') as_dir=./ ;;
9710    */) ;;
9711    *) as_dir=$as_dir/ ;;
9712  esac
9713    for ac_exec_ext in '' $ac_executable_extensions; do
9714  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
9715    ac_cv_prog_ac_ct_STRIP="strip"
9716    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
9717    break 2
9718  fi
9719done
9720  done
9721IFS=$as_save_IFS
9722
9723fi
9724fi
9725ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
9726if test -n "$ac_ct_STRIP"; then
9727  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
9728printf "%s\n" "$ac_ct_STRIP" >&6; }
9729else
9730  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
9731printf "%s\n" "no" >&6; }
9732fi
9733
9734  if test "x$ac_ct_STRIP" = x; then
9735    STRIP=":"
9736  else
9737    case $cross_compiling:$ac_tool_warned in
9738yes:)
9739{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9740printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9741ac_tool_warned=yes ;;
9742esac
9743    STRIP=$ac_ct_STRIP
9744  fi
9745else
9746  STRIP="$ac_cv_prog_STRIP"
9747fi
9748
9749test -z "$STRIP" && STRIP=:
9750
9751
9752
9753
9754
9755
9756
9757test -z "$RANLIB" && RANLIB=:
9758
9759
9760
9761
9762
9763
9764# Determine commands to create old-style static archives.
9765old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
9766old_postinstall_cmds='chmod 644 $oldlib'
9767old_postuninstall_cmds=
9768
9769if test -n "$RANLIB"; then
9770  old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib"
9771  old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib"
9772fi
9773
9774case $host_os in
9775  darwin*)
9776    lock_old_archive_extraction=yes ;;
9777  *)
9778    lock_old_archive_extraction=no ;;
9779esac
9780
9781
9782
9783
9784
9785
9786
9787
9788
9789
9790
9791
9792
9793
9794
9795
9796
9797
9798
9799
9800
9801for ac_prog in gawk mawk nawk awk
9802do
9803  # Extract the first word of "$ac_prog", so it can be a program name with args.
9804set dummy $ac_prog; ac_word=$2
9805{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9806printf %s "checking for $ac_word... " >&6; }
9807if test ${ac_cv_prog_AWK+y}
9808then :
9809  printf %s "(cached) " >&6
9810else $as_nop
9811  if test -n "$AWK"; then
9812  ac_cv_prog_AWK="$AWK" # Let the user override the test.
9813else
9814as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9815for as_dir in $PATH
9816do
9817  IFS=$as_save_IFS
9818  case $as_dir in #(((
9819    '') as_dir=./ ;;
9820    */) ;;
9821    *) as_dir=$as_dir/ ;;
9822  esac
9823    for ac_exec_ext in '' $ac_executable_extensions; do
9824  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
9825    ac_cv_prog_AWK="$ac_prog"
9826    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
9827    break 2
9828  fi
9829done
9830  done
9831IFS=$as_save_IFS
9832
9833fi
9834fi
9835AWK=$ac_cv_prog_AWK
9836if test -n "$AWK"; then
9837  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
9838printf "%s\n" "$AWK" >&6; }
9839else
9840  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
9841printf "%s\n" "no" >&6; }
9842fi
9843
9844
9845  test -n "$AWK" && break
9846done
9847
9848
9849
9850
9851
9852
9853
9854
9855
9856
9857
9858
9859
9860
9861
9862
9863
9864
9865
9866# If no C compiler was specified, use CC.
9867LTCC=${LTCC-"$CC"}
9868
9869# If no C compiler flags were specified, use CFLAGS.
9870LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
9871
9872# Allow CC to be a program name with arguments.
9873compiler=$CC
9874
9875
9876# Check for command to grab the raw symbol name followed by C symbol from nm.
9877{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5
9878printf %s "checking command to parse $NM output from $compiler object... " >&6; }
9879if test ${lt_cv_sys_global_symbol_pipe+y}
9880then :
9881  printf %s "(cached) " >&6
9882else $as_nop
9883
9884# These are sane defaults that work on at least a few old systems.
9885# [They come from Ultrix.  What could be older than Ultrix?!! ;)]
9886
9887# Character class describing NM global symbol codes.
9888symcode='[BCDEGRST]'
9889
9890# Regexp to match symbols that can be accessed directly from C.
9891sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
9892
9893# Define system-specific variables.
9894case $host_os in
9895aix*)
9896  symcode='[BCDT]'
9897  ;;
9898cygwin* | mingw* | windows* | pw32* | cegcc*)
9899  symcode='[ABCDGISTW]'
9900  ;;
9901hpux*)
9902  if test ia64 = "$host_cpu"; then
9903    symcode='[ABCDEGRST]'
9904  fi
9905  ;;
9906irix* | nonstopux*)
9907  symcode='[BCDEGRST]'
9908  ;;
9909osf*)
9910  symcode='[BCDEGQRST]'
9911  ;;
9912solaris*)
9913  symcode='[BCDRT]'
9914  ;;
9915sco3.2v5*)
9916  symcode='[DT]'
9917  ;;
9918sysv4.2uw2*)
9919  symcode='[DT]'
9920  ;;
9921sysv5* | sco5v6* | unixware* | OpenUNIX*)
9922  symcode='[ABDT]'
9923  ;;
9924sysv4)
9925  symcode='[DFNSTU]'
9926  ;;
9927esac
9928
9929# If we're using GNU nm, then use its standard symbol codes.
9930case `$NM -V 2>&1` in
9931*GNU* | *'with BFD'*)
9932  symcode='[ABCDGIRSTW]' ;;
9933esac
9934
9935if test "$lt_cv_nm_interface" = "MS dumpbin"; then
9936  # Gets list of data symbols to import.
9937  lt_cv_sys_global_symbol_to_import="$SED -n -e 's/^I .* \(.*\)$/\1/p'"
9938  # Adjust the below global symbol transforms to fixup imported variables.
9939  lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'"
9940  lt_c_name_hook=" -e 's/^I .* \(.*\)$/  {\"\1\", (void *) 0},/p'"
9941  lt_c_name_lib_hook="\
9942  -e 's/^I .* \(lib.*\)$/  {\"\1\", (void *) 0},/p'\
9943  -e 's/^I .* \(.*\)$/  {\"lib\1\", (void *) 0},/p'"
9944else
9945  # Disable hooks by default.
9946  lt_cv_sys_global_symbol_to_import=
9947  lt_cdecl_hook=
9948  lt_c_name_hook=
9949  lt_c_name_lib_hook=
9950fi
9951
9952# Transform an extracted symbol line into a proper C declaration.
9953# Some systems (esp. on ia64) link data and code symbols differently,
9954# so use this general approach.
9955lt_cv_sys_global_symbol_to_cdecl="$SED -n"\
9956$lt_cdecl_hook\
9957" -e 's/^T .* \(.*\)$/extern int \1();/p'"\
9958" -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'"
9959
9960# Transform an extracted symbol line into symbol name and symbol address
9961lt_cv_sys_global_symbol_to_c_name_address="$SED -n"\
9962$lt_c_name_hook\
9963" -e 's/^: \(.*\) .*$/  {\"\1\", (void *) 0},/p'"\
9964" -e 's/^$symcode$symcode* .* \(.*\)$/  {\"\1\", (void *) \&\1},/p'"
9965
9966# Transform an extracted symbol line into symbol name with lib prefix and
9967# symbol address.
9968lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="$SED -n"\
9969$lt_c_name_lib_hook\
9970" -e 's/^: \(.*\) .*$/  {\"\1\", (void *) 0},/p'"\
9971" -e 's/^$symcode$symcode* .* \(lib.*\)$/  {\"\1\", (void *) \&\1},/p'"\
9972" -e 's/^$symcode$symcode* .* \(.*\)$/  {\"lib\1\", (void *) \&\1},/p'"
9973
9974# Handle CRLF in mingw tool chain
9975opt_cr=
9976case $build_os in
9977mingw* | windows*)
9978  opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
9979  ;;
9980esac
9981
9982# Try without a prefix underscore, then with it.
9983for ac_symprfx in "" "_"; do
9984
9985  # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
9986  symxfrm="\\1 $ac_symprfx\\2 \\2"
9987
9988  # Write the raw and C identifiers.
9989  if test "$lt_cv_nm_interface" = "MS dumpbin"; then
9990    # Fake it for dumpbin and say T for any non-static function,
9991    # D for any global variable and I for any imported variable.
9992    # Also find C++ and __fastcall symbols from MSVC++ or ICC,
9993    # which start with @ or ?.
9994    lt_cv_sys_global_symbol_pipe="$AWK '"\
9995"     {last_section=section; section=\$ 3};"\
9996"     /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\
9997"     /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
9998"     /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\
9999"     /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\
10000"     /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\
10001"     \$ 0!~/External *\|/{next};"\
10002"     / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
10003"     {if(hide[section]) next};"\
10004"     {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\
10005"     {split(\$ 0,a,/\||\r/); split(a[2],s)};"\
10006"     s[1]~/^[@?]/{print f,s[1],s[1]; next};"\
10007"     s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\
10008"     ' prfx=^$ac_symprfx"
10009  else
10010    lt_cv_sys_global_symbol_pipe="$SED -n -e 's/^.*[	 ]\($symcode$symcode*\)[	 ][	 ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
10011  fi
10012  lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | $SED '/ __gnu_lto/d'"
10013
10014  # Check to see that the pipe works correctly.
10015  pipe_works=no
10016
10017  rm -f conftest*
10018  cat > conftest.$ac_ext <<_LT_EOF
10019#ifdef __cplusplus
10020extern "C" {
10021#endif
10022char nm_test_var;
10023void nm_test_func(void);
10024void nm_test_func(void){}
10025#ifdef __cplusplus
10026}
10027#endif
10028int main(void){nm_test_var='a';nm_test_func();return(0);}
10029_LT_EOF
10030
10031  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
10032  (eval $ac_compile) 2>&5
10033  ac_status=$?
10034  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
10035  test $ac_status = 0; }; then
10036    # Now try to grab the symbols.
10037    nlist=conftest.nm
10038    $ECHO "$as_me:$LINENO: $NM conftest.$ac_objext | $lt_cv_sys_global_symbol_pipe > $nlist" >&5
10039    if eval "$NM" conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist 2>&5 && test -s "$nlist"; then
10040      # Try sorting and uniquifying the output.
10041      if sort "$nlist" | uniq > "$nlist"T; then
10042	mv -f "$nlist"T "$nlist"
10043      else
10044	rm -f "$nlist"T
10045      fi
10046
10047      # Make sure that we snagged all the symbols we need.
10048      if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
10049	if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
10050	  cat <<_LT_EOF > conftest.$ac_ext
10051/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests.  */
10052#if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE
10053/* DATA imports from DLLs on WIN32 can't be const, because runtime
10054   relocations are performed -- see ld's documentation on pseudo-relocs.  */
10055# define LT_DLSYM_CONST
10056#elif defined __osf__
10057/* This system does not cope well with relocations in const data.  */
10058# define LT_DLSYM_CONST
10059#else
10060# define LT_DLSYM_CONST const
10061#endif
10062
10063#ifdef __cplusplus
10064extern "C" {
10065#endif
10066
10067_LT_EOF
10068	  # Now generate the symbol file.
10069	  eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
10070
10071	  cat <<_LT_EOF >> conftest.$ac_ext
10072
10073/* The mapping between symbol names and symbols.  */
10074LT_DLSYM_CONST struct {
10075  const char *name;
10076  void       *address;
10077}
10078lt__PROGRAM__LTX_preloaded_symbols[] =
10079{
10080  { "@PROGRAM@", (void *) 0 },
10081_LT_EOF
10082	  $SED "s/^$symcode$symcode* .* \(.*\)$/  {\"\1\", (void *) \&\1},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
10083	  cat <<\_LT_EOF >> conftest.$ac_ext
10084  {0, (void *) 0}
10085};
10086
10087/* This works around a problem in FreeBSD linker */
10088#ifdef FREEBSD_WORKAROUND
10089static const void *lt_preloaded_setup() {
10090  return lt__PROGRAM__LTX_preloaded_symbols;
10091}
10092#endif
10093
10094#ifdef __cplusplus
10095}
10096#endif
10097_LT_EOF
10098	  # Now try linking the two files.
10099	  mv conftest.$ac_objext conftstm.$ac_objext
10100	  lt_globsym_save_LIBS=$LIBS
10101	  lt_globsym_save_CFLAGS=$CFLAGS
10102	  LIBS=conftstm.$ac_objext
10103	  CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag"
10104	  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
10105  (eval $ac_link) 2>&5
10106  ac_status=$?
10107  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
10108  test $ac_status = 0; } && test -s conftest$ac_exeext; then
10109	    pipe_works=yes
10110	  fi
10111	  LIBS=$lt_globsym_save_LIBS
10112	  CFLAGS=$lt_globsym_save_CFLAGS
10113	else
10114	  echo "cannot find nm_test_func in $nlist" >&5
10115	fi
10116      else
10117	echo "cannot find nm_test_var in $nlist" >&5
10118      fi
10119    else
10120      echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5
10121    fi
10122  else
10123    echo "$progname: failed program was:" >&5
10124    cat conftest.$ac_ext >&5
10125  fi
10126  rm -rf conftest* conftst*
10127
10128  # Do not use the global_symbol_pipe unless it works.
10129  if test yes = "$pipe_works"; then
10130    break
10131  else
10132    lt_cv_sys_global_symbol_pipe=
10133  fi
10134done
10135
10136fi
10137
10138if test -z "$lt_cv_sys_global_symbol_pipe"; then
10139  lt_cv_sys_global_symbol_to_cdecl=
10140fi
10141if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
10142  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: failed" >&5
10143printf "%s\n" "failed" >&6; }
10144else
10145  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ok" >&5
10146printf "%s\n" "ok" >&6; }
10147fi
10148
10149# Response file support.
10150if test "$lt_cv_nm_interface" = "MS dumpbin"; then
10151  nm_file_list_spec='@'
10152elif $NM --help 2>/dev/null | grep '[@]FILE' >/dev/null; then
10153  nm_file_list_spec='@'
10154fi
10155
10156
10157
10158
10159
10160
10161
10162
10163
10164
10165
10166
10167
10168
10169
10170
10171
10172
10173
10174
10175
10176
10177
10178
10179
10180
10181
10182
10183
10184
10185
10186
10187
10188
10189
10190
10191
10192{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
10193printf %s "checking for sysroot... " >&6; }
10194
10195# Check whether --with-sysroot was given.
10196if test ${with_sysroot+y}
10197then :
10198  withval=$with_sysroot;
10199else $as_nop
10200  with_sysroot=no
10201fi
10202
10203
10204lt_sysroot=
10205case $with_sysroot in #(
10206 yes)
10207   if test yes = "$GCC"; then
10208     # Trim trailing / since we'll always append absolute paths and we want
10209     # to avoid //, if only for less confusing output for the user.
10210     lt_sysroot=`$CC --print-sysroot 2>/dev/null | $SED 's:/\+$::'`
10211   fi
10212   ;; #(
10213 /*)
10214   lt_sysroot=`echo "$with_sysroot" | $SED -e "$sed_quote_subst"`
10215   ;; #(
10216 no|'')
10217   ;; #(
10218 *)
10219   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $with_sysroot" >&5
10220printf "%s\n" "$with_sysroot" >&6; }
10221   as_fn_error $? "The sysroot must be an absolute path." "$LINENO" 5
10222   ;;
10223esac
10224
10225 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}" >&5
10226printf "%s\n" "${lt_sysroot:-no}" >&6; }
10227
10228
10229
10230
10231
10232{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a working dd" >&5
10233printf %s "checking for a working dd... " >&6; }
10234if test ${ac_cv_path_lt_DD+y}
10235then :
10236  printf %s "(cached) " >&6
10237else $as_nop
10238  printf 0123456789abcdef0123456789abcdef >conftest.i
10239cat conftest.i conftest.i >conftest2.i
10240: ${lt_DD:=$DD}
10241if test -z "$lt_DD"; then
10242  ac_path_lt_DD_found=false
10243  # Loop through the user's path and test for each of PROGNAME-LIST
10244  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10245for as_dir in $PATH
10246do
10247  IFS=$as_save_IFS
10248  case $as_dir in #(((
10249    '') as_dir=./ ;;
10250    */) ;;
10251    *) as_dir=$as_dir/ ;;
10252  esac
10253    for ac_prog in dd
10254   do
10255    for ac_exec_ext in '' $ac_executable_extensions; do
10256      ac_path_lt_DD="$as_dir$ac_prog$ac_exec_ext"
10257      as_fn_executable_p "$ac_path_lt_DD" || continue
10258if "$ac_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then
10259  cmp -s conftest.i conftest.out \
10260  && ac_cv_path_lt_DD="$ac_path_lt_DD" ac_path_lt_DD_found=:
10261fi
10262      $ac_path_lt_DD_found && break 3
10263    done
10264  done
10265  done
10266IFS=$as_save_IFS
10267  if test -z "$ac_cv_path_lt_DD"; then
10268    :
10269  fi
10270else
10271  ac_cv_path_lt_DD=$lt_DD
10272fi
10273
10274rm -f conftest.i conftest2.i conftest.out
10275fi
10276{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_lt_DD" >&5
10277printf "%s\n" "$ac_cv_path_lt_DD" >&6; }
10278
10279
10280{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to truncate binary pipes" >&5
10281printf %s "checking how to truncate binary pipes... " >&6; }
10282if test ${lt_cv_truncate_bin+y}
10283then :
10284  printf %s "(cached) " >&6
10285else $as_nop
10286  printf 0123456789abcdef0123456789abcdef >conftest.i
10287cat conftest.i conftest.i >conftest2.i
10288lt_cv_truncate_bin=
10289if "$ac_cv_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then
10290  cmp -s conftest.i conftest.out \
10291  && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1"
10292fi
10293rm -f conftest.i conftest2.i conftest.out
10294test -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q"
10295fi
10296{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_truncate_bin" >&5
10297printf "%s\n" "$lt_cv_truncate_bin" >&6; }
10298
10299
10300
10301
10302
10303
10304
10305# Calculate cc_basename.  Skip known compiler wrappers and cross-prefix.
10306func_cc_basename ()
10307{
10308    for cc_temp in $*""; do
10309      case $cc_temp in
10310        compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
10311        distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
10312        \-*) ;;
10313        *) break;;
10314      esac
10315    done
10316    func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
10317}
10318
10319# Check whether --enable-libtool-lock was given.
10320if test ${enable_libtool_lock+y}
10321then :
10322  enableval=$enable_libtool_lock;
10323fi
10324
10325test no = "$enable_libtool_lock" || enable_libtool_lock=yes
10326
10327# Some flags need to be propagated to the compiler or linker for good
10328# libtool support.
10329case $host in
10330ia64-*-hpux*)
10331  # Find out what ABI is being produced by ac_compile, and set mode
10332  # options accordingly.
10333  echo 'int i;' > conftest.$ac_ext
10334  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
10335  (eval $ac_compile) 2>&5
10336  ac_status=$?
10337  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
10338  test $ac_status = 0; }; then
10339    case `$FILECMD conftest.$ac_objext` in
10340      *ELF-32*)
10341	HPUX_IA64_MODE=32
10342	;;
10343      *ELF-64*)
10344	HPUX_IA64_MODE=64
10345	;;
10346    esac
10347  fi
10348  rm -rf conftest*
10349  ;;
10350*-*-irix6*)
10351  # Find out what ABI is being produced by ac_compile, and set linker
10352  # options accordingly.
10353  echo '#line '$LINENO' "configure"' > conftest.$ac_ext
10354  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
10355  (eval $ac_compile) 2>&5
10356  ac_status=$?
10357  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
10358  test $ac_status = 0; }; then
10359    if test yes = "$lt_cv_prog_gnu_ld"; then
10360      case `$FILECMD conftest.$ac_objext` in
10361	*32-bit*)
10362	  LD="${LD-ld} -melf32bsmip"
10363	  ;;
10364	*N32*)
10365	  LD="${LD-ld} -melf32bmipn32"
10366	  ;;
10367	*64-bit*)
10368	  LD="${LD-ld} -melf64bmip"
10369	;;
10370      esac
10371    else
10372      case `$FILECMD conftest.$ac_objext` in
10373	*32-bit*)
10374	  LD="${LD-ld} -32"
10375	  ;;
10376	*N32*)
10377	  LD="${LD-ld} -n32"
10378	  ;;
10379	*64-bit*)
10380	  LD="${LD-ld} -64"
10381	  ;;
10382      esac
10383    fi
10384  fi
10385  rm -rf conftest*
10386  ;;
10387
10388mips64*-*linux*)
10389  # Find out what ABI is being produced by ac_compile, and set linker
10390  # options accordingly.
10391  echo '#line '$LINENO' "configure"' > conftest.$ac_ext
10392  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
10393  (eval $ac_compile) 2>&5
10394  ac_status=$?
10395  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
10396  test $ac_status = 0; }; then
10397    emul=elf
10398    case `$FILECMD conftest.$ac_objext` in
10399      *32-bit*)
10400	emul="${emul}32"
10401	;;
10402      *64-bit*)
10403	emul="${emul}64"
10404	;;
10405    esac
10406    case `$FILECMD conftest.$ac_objext` in
10407      *MSB*)
10408	emul="${emul}btsmip"
10409	;;
10410      *LSB*)
10411	emul="${emul}ltsmip"
10412	;;
10413    esac
10414    case `$FILECMD conftest.$ac_objext` in
10415      *N32*)
10416	emul="${emul}n32"
10417	;;
10418    esac
10419    LD="${LD-ld} -m $emul"
10420  fi
10421  rm -rf conftest*
10422  ;;
10423
10424x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \
10425s390*-*linux*|s390*-*tpf*|sparc*-*linux*|x86_64-gnu*)
10426  # Find out what ABI is being produced by ac_compile, and set linker
10427  # options accordingly.  Note that the listed cases only cover the
10428  # situations where additional linker options are needed (such as when
10429  # doing 32-bit compilation for a host where ld defaults to 64-bit, or
10430  # vice versa); the common cases where no linker options are needed do
10431  # not appear in the list.
10432  echo 'int i;' > conftest.$ac_ext
10433  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
10434  (eval $ac_compile) 2>&5
10435  ac_status=$?
10436  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
10437  test $ac_status = 0; }; then
10438    case `$FILECMD conftest.o` in
10439      *32-bit*)
10440	case $host in
10441	  x86_64-*kfreebsd*-gnu)
10442	    LD="${LD-ld} -m elf_i386_fbsd"
10443	    ;;
10444	  x86_64-*linux*|x86_64-gnu*)
10445	    case `$FILECMD conftest.o` in
10446	      *x86-64*)
10447		LD="${LD-ld} -m elf32_x86_64"
10448		;;
10449	      *)
10450		LD="${LD-ld} -m elf_i386"
10451		;;
10452	    esac
10453	    ;;
10454	  powerpc64le-*linux*)
10455	    LD="${LD-ld} -m elf32lppclinux"
10456	    ;;
10457	  powerpc64-*linux*)
10458	    LD="${LD-ld} -m elf32ppclinux"
10459	    ;;
10460	  s390x-*linux*)
10461	    LD="${LD-ld} -m elf_s390"
10462	    ;;
10463	  sparc64-*linux*)
10464	    LD="${LD-ld} -m elf32_sparc"
10465	    ;;
10466	esac
10467	;;
10468      *64-bit*)
10469	case $host in
10470	  x86_64-*kfreebsd*-gnu)
10471	    LD="${LD-ld} -m elf_x86_64_fbsd"
10472	    ;;
10473	  x86_64-*linux*|x86_64-gnu*)
10474	    LD="${LD-ld} -m elf_x86_64"
10475	    ;;
10476	  powerpcle-*linux*)
10477	    LD="${LD-ld} -m elf64lppc"
10478	    ;;
10479	  powerpc-*linux*)
10480	    LD="${LD-ld} -m elf64ppc"
10481	    ;;
10482	  s390*-*linux*|s390*-*tpf*)
10483	    LD="${LD-ld} -m elf64_s390"
10484	    ;;
10485	  sparc*-*linux*)
10486	    LD="${LD-ld} -m elf64_sparc"
10487	    ;;
10488	esac
10489	;;
10490    esac
10491  fi
10492  rm -rf conftest*
10493  ;;
10494
10495*-*-sco3.2v5*)
10496  # On SCO OpenServer 5, we need -belf to get full-featured binaries.
10497  SAVE_CFLAGS=$CFLAGS
10498  CFLAGS="$CFLAGS -belf"
10499  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5
10500printf %s "checking whether the C compiler needs -belf... " >&6; }
10501if test ${lt_cv_cc_needs_belf+y}
10502then :
10503  printf %s "(cached) " >&6
10504else $as_nop
10505  ac_ext=c
10506ac_cpp='$CPP $CPPFLAGS'
10507ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
10508ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
10509ac_compiler_gnu=$ac_cv_c_compiler_gnu
10510
10511     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10512/* end confdefs.h.  */
10513
10514int
10515main (void)
10516{
10517
10518  ;
10519  return 0;
10520}
10521_ACEOF
10522if ac_fn_c_try_link "$LINENO"
10523then :
10524  lt_cv_cc_needs_belf=yes
10525else $as_nop
10526  lt_cv_cc_needs_belf=no
10527fi
10528rm -f core conftest.err conftest.$ac_objext conftest.beam \
10529    conftest$ac_exeext conftest.$ac_ext
10530     ac_ext=c
10531ac_cpp='$CPP $CPPFLAGS'
10532ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
10533ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
10534ac_compiler_gnu=$ac_cv_c_compiler_gnu
10535
10536fi
10537{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5
10538printf "%s\n" "$lt_cv_cc_needs_belf" >&6; }
10539  if test yes != "$lt_cv_cc_needs_belf"; then
10540    # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
10541    CFLAGS=$SAVE_CFLAGS
10542  fi
10543  ;;
10544*-*solaris*)
10545  # Find out what ABI is being produced by ac_compile, and set linker
10546  # options accordingly.
10547  echo 'int i;' > conftest.$ac_ext
10548  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
10549  (eval $ac_compile) 2>&5
10550  ac_status=$?
10551  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
10552  test $ac_status = 0; }; then
10553    case `$FILECMD conftest.o` in
10554    *64-bit*)
10555      case $lt_cv_prog_gnu_ld in
10556      yes*)
10557        case $host in
10558        i?86-*-solaris*|x86_64-*-solaris*)
10559          LD="${LD-ld} -m elf_x86_64"
10560          ;;
10561        sparc*-*-solaris*)
10562          LD="${LD-ld} -m elf64_sparc"
10563          ;;
10564        esac
10565        # GNU ld 2.21 introduced _sol2 emulations.  Use them if available.
10566        if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then
10567          LD=${LD-ld}_sol2
10568        fi
10569        ;;
10570      *)
10571	if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
10572	  LD="${LD-ld} -64"
10573	fi
10574	;;
10575      esac
10576      ;;
10577    esac
10578  fi
10579  rm -rf conftest*
10580  ;;
10581esac
10582
10583need_locks=$enable_libtool_lock
10584
10585if test -n "$ac_tool_prefix"; then
10586  # Extract the first word of "${ac_tool_prefix}mt", so it can be a program name with args.
10587set dummy ${ac_tool_prefix}mt; ac_word=$2
10588{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10589printf %s "checking for $ac_word... " >&6; }
10590if test ${ac_cv_prog_MANIFEST_TOOL+y}
10591then :
10592  printf %s "(cached) " >&6
10593else $as_nop
10594  if test -n "$MANIFEST_TOOL"; then
10595  ac_cv_prog_MANIFEST_TOOL="$MANIFEST_TOOL" # Let the user override the test.
10596else
10597as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10598for as_dir in $PATH
10599do
10600  IFS=$as_save_IFS
10601  case $as_dir in #(((
10602    '') as_dir=./ ;;
10603    */) ;;
10604    *) as_dir=$as_dir/ ;;
10605  esac
10606    for ac_exec_ext in '' $ac_executable_extensions; do
10607  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
10608    ac_cv_prog_MANIFEST_TOOL="${ac_tool_prefix}mt"
10609    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
10610    break 2
10611  fi
10612done
10613  done
10614IFS=$as_save_IFS
10615
10616fi
10617fi
10618MANIFEST_TOOL=$ac_cv_prog_MANIFEST_TOOL
10619if test -n "$MANIFEST_TOOL"; then
10620  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MANIFEST_TOOL" >&5
10621printf "%s\n" "$MANIFEST_TOOL" >&6; }
10622else
10623  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
10624printf "%s\n" "no" >&6; }
10625fi
10626
10627
10628fi
10629if test -z "$ac_cv_prog_MANIFEST_TOOL"; then
10630  ac_ct_MANIFEST_TOOL=$MANIFEST_TOOL
10631  # Extract the first word of "mt", so it can be a program name with args.
10632set dummy mt; ac_word=$2
10633{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10634printf %s "checking for $ac_word... " >&6; }
10635if test ${ac_cv_prog_ac_ct_MANIFEST_TOOL+y}
10636then :
10637  printf %s "(cached) " >&6
10638else $as_nop
10639  if test -n "$ac_ct_MANIFEST_TOOL"; then
10640  ac_cv_prog_ac_ct_MANIFEST_TOOL="$ac_ct_MANIFEST_TOOL" # Let the user override the test.
10641else
10642as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10643for as_dir in $PATH
10644do
10645  IFS=$as_save_IFS
10646  case $as_dir in #(((
10647    '') as_dir=./ ;;
10648    */) ;;
10649    *) as_dir=$as_dir/ ;;
10650  esac
10651    for ac_exec_ext in '' $ac_executable_extensions; do
10652  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
10653    ac_cv_prog_ac_ct_MANIFEST_TOOL="mt"
10654    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
10655    break 2
10656  fi
10657done
10658  done
10659IFS=$as_save_IFS
10660
10661fi
10662fi
10663ac_ct_MANIFEST_TOOL=$ac_cv_prog_ac_ct_MANIFEST_TOOL
10664if test -n "$ac_ct_MANIFEST_TOOL"; then
10665  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MANIFEST_TOOL" >&5
10666printf "%s\n" "$ac_ct_MANIFEST_TOOL" >&6; }
10667else
10668  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
10669printf "%s\n" "no" >&6; }
10670fi
10671
10672  if test "x$ac_ct_MANIFEST_TOOL" = x; then
10673    MANIFEST_TOOL=":"
10674  else
10675    case $cross_compiling:$ac_tool_warned in
10676yes:)
10677{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
10678printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
10679ac_tool_warned=yes ;;
10680esac
10681    MANIFEST_TOOL=$ac_ct_MANIFEST_TOOL
10682  fi
10683else
10684  MANIFEST_TOOL="$ac_cv_prog_MANIFEST_TOOL"
10685fi
10686
10687test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt
10688{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool" >&5
10689printf %s "checking if $MANIFEST_TOOL is a manifest tool... " >&6; }
10690if test ${lt_cv_path_manifest_tool+y}
10691then :
10692  printf %s "(cached) " >&6
10693else $as_nop
10694  lt_cv_path_manifest_tool=no
10695  echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&5
10696  $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out
10697  cat conftest.err >&5
10698  if $GREP 'Manifest Tool' conftest.out > /dev/null; then
10699    lt_cv_path_manifest_tool=yes
10700  fi
10701  rm -f conftest*
10702fi
10703{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_manifest_tool" >&5
10704printf "%s\n" "$lt_cv_path_manifest_tool" >&6; }
10705if test yes != "$lt_cv_path_manifest_tool"; then
10706  MANIFEST_TOOL=:
10707fi
10708
10709
10710
10711
10712
10713
10714  case $host_os in
10715    rhapsody* | darwin*)
10716    if test -n "$ac_tool_prefix"; then
10717  # Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args.
10718set dummy ${ac_tool_prefix}dsymutil; ac_word=$2
10719{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10720printf %s "checking for $ac_word... " >&6; }
10721if test ${ac_cv_prog_DSYMUTIL+y}
10722then :
10723  printf %s "(cached) " >&6
10724else $as_nop
10725  if test -n "$DSYMUTIL"; then
10726  ac_cv_prog_DSYMUTIL="$DSYMUTIL" # Let the user override the test.
10727else
10728as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10729for as_dir in $PATH
10730do
10731  IFS=$as_save_IFS
10732  case $as_dir in #(((
10733    '') as_dir=./ ;;
10734    */) ;;
10735    *) as_dir=$as_dir/ ;;
10736  esac
10737    for ac_exec_ext in '' $ac_executable_extensions; do
10738  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
10739    ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil"
10740    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
10741    break 2
10742  fi
10743done
10744  done
10745IFS=$as_save_IFS
10746
10747fi
10748fi
10749DSYMUTIL=$ac_cv_prog_DSYMUTIL
10750if test -n "$DSYMUTIL"; then
10751  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
10752printf "%s\n" "$DSYMUTIL" >&6; }
10753else
10754  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
10755printf "%s\n" "no" >&6; }
10756fi
10757
10758
10759fi
10760if test -z "$ac_cv_prog_DSYMUTIL"; then
10761  ac_ct_DSYMUTIL=$DSYMUTIL
10762  # Extract the first word of "dsymutil", so it can be a program name with args.
10763set dummy dsymutil; ac_word=$2
10764{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10765printf %s "checking for $ac_word... " >&6; }
10766if test ${ac_cv_prog_ac_ct_DSYMUTIL+y}
10767then :
10768  printf %s "(cached) " >&6
10769else $as_nop
10770  if test -n "$ac_ct_DSYMUTIL"; then
10771  ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # Let the user override the test.
10772else
10773as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10774for as_dir in $PATH
10775do
10776  IFS=$as_save_IFS
10777  case $as_dir in #(((
10778    '') as_dir=./ ;;
10779    */) ;;
10780    *) as_dir=$as_dir/ ;;
10781  esac
10782    for ac_exec_ext in '' $ac_executable_extensions; do
10783  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
10784    ac_cv_prog_ac_ct_DSYMUTIL="dsymutil"
10785    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
10786    break 2
10787  fi
10788done
10789  done
10790IFS=$as_save_IFS
10791
10792fi
10793fi
10794ac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL
10795if test -n "$ac_ct_DSYMUTIL"; then
10796  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DSYMUTIL" >&5
10797printf "%s\n" "$ac_ct_DSYMUTIL" >&6; }
10798else
10799  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
10800printf "%s\n" "no" >&6; }
10801fi
10802
10803  if test "x$ac_ct_DSYMUTIL" = x; then
10804    DSYMUTIL=":"
10805  else
10806    case $cross_compiling:$ac_tool_warned in
10807yes:)
10808{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
10809printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
10810ac_tool_warned=yes ;;
10811esac
10812    DSYMUTIL=$ac_ct_DSYMUTIL
10813  fi
10814else
10815  DSYMUTIL="$ac_cv_prog_DSYMUTIL"
10816fi
10817
10818    if test -n "$ac_tool_prefix"; then
10819  # Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args.
10820set dummy ${ac_tool_prefix}nmedit; ac_word=$2
10821{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10822printf %s "checking for $ac_word... " >&6; }
10823if test ${ac_cv_prog_NMEDIT+y}
10824then :
10825  printf %s "(cached) " >&6
10826else $as_nop
10827  if test -n "$NMEDIT"; then
10828  ac_cv_prog_NMEDIT="$NMEDIT" # Let the user override the test.
10829else
10830as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10831for as_dir in $PATH
10832do
10833  IFS=$as_save_IFS
10834  case $as_dir in #(((
10835    '') as_dir=./ ;;
10836    */) ;;
10837    *) as_dir=$as_dir/ ;;
10838  esac
10839    for ac_exec_ext in '' $ac_executable_extensions; do
10840  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
10841    ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit"
10842    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
10843    break 2
10844  fi
10845done
10846  done
10847IFS=$as_save_IFS
10848
10849fi
10850fi
10851NMEDIT=$ac_cv_prog_NMEDIT
10852if test -n "$NMEDIT"; then
10853  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $NMEDIT" >&5
10854printf "%s\n" "$NMEDIT" >&6; }
10855else
10856  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
10857printf "%s\n" "no" >&6; }
10858fi
10859
10860
10861fi
10862if test -z "$ac_cv_prog_NMEDIT"; then
10863  ac_ct_NMEDIT=$NMEDIT
10864  # Extract the first word of "nmedit", so it can be a program name with args.
10865set dummy nmedit; ac_word=$2
10866{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10867printf %s "checking for $ac_word... " >&6; }
10868if test ${ac_cv_prog_ac_ct_NMEDIT+y}
10869then :
10870  printf %s "(cached) " >&6
10871else $as_nop
10872  if test -n "$ac_ct_NMEDIT"; then
10873  ac_cv_prog_ac_ct_NMEDIT="$ac_ct_NMEDIT" # Let the user override the test.
10874else
10875as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10876for as_dir in $PATH
10877do
10878  IFS=$as_save_IFS
10879  case $as_dir in #(((
10880    '') as_dir=./ ;;
10881    */) ;;
10882    *) as_dir=$as_dir/ ;;
10883  esac
10884    for ac_exec_ext in '' $ac_executable_extensions; do
10885  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
10886    ac_cv_prog_ac_ct_NMEDIT="nmedit"
10887    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
10888    break 2
10889  fi
10890done
10891  done
10892IFS=$as_save_IFS
10893
10894fi
10895fi
10896ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT
10897if test -n "$ac_ct_NMEDIT"; then
10898  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NMEDIT" >&5
10899printf "%s\n" "$ac_ct_NMEDIT" >&6; }
10900else
10901  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
10902printf "%s\n" "no" >&6; }
10903fi
10904
10905  if test "x$ac_ct_NMEDIT" = x; then
10906    NMEDIT=":"
10907  else
10908    case $cross_compiling:$ac_tool_warned in
10909yes:)
10910{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
10911printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
10912ac_tool_warned=yes ;;
10913esac
10914    NMEDIT=$ac_ct_NMEDIT
10915  fi
10916else
10917  NMEDIT="$ac_cv_prog_NMEDIT"
10918fi
10919
10920    if test -n "$ac_tool_prefix"; then
10921  # Extract the first word of "${ac_tool_prefix}lipo", so it can be a program name with args.
10922set dummy ${ac_tool_prefix}lipo; ac_word=$2
10923{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10924printf %s "checking for $ac_word... " >&6; }
10925if test ${ac_cv_prog_LIPO+y}
10926then :
10927  printf %s "(cached) " >&6
10928else $as_nop
10929  if test -n "$LIPO"; then
10930  ac_cv_prog_LIPO="$LIPO" # Let the user override the test.
10931else
10932as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10933for as_dir in $PATH
10934do
10935  IFS=$as_save_IFS
10936  case $as_dir in #(((
10937    '') as_dir=./ ;;
10938    */) ;;
10939    *) as_dir=$as_dir/ ;;
10940  esac
10941    for ac_exec_ext in '' $ac_executable_extensions; do
10942  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
10943    ac_cv_prog_LIPO="${ac_tool_prefix}lipo"
10944    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
10945    break 2
10946  fi
10947done
10948  done
10949IFS=$as_save_IFS
10950
10951fi
10952fi
10953LIPO=$ac_cv_prog_LIPO
10954if test -n "$LIPO"; then
10955  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
10956printf "%s\n" "$LIPO" >&6; }
10957else
10958  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
10959printf "%s\n" "no" >&6; }
10960fi
10961
10962
10963fi
10964if test -z "$ac_cv_prog_LIPO"; then
10965  ac_ct_LIPO=$LIPO
10966  # Extract the first word of "lipo", so it can be a program name with args.
10967set dummy lipo; ac_word=$2
10968{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10969printf %s "checking for $ac_word... " >&6; }
10970if test ${ac_cv_prog_ac_ct_LIPO+y}
10971then :
10972  printf %s "(cached) " >&6
10973else $as_nop
10974  if test -n "$ac_ct_LIPO"; then
10975  ac_cv_prog_ac_ct_LIPO="$ac_ct_LIPO" # Let the user override the test.
10976else
10977as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10978for as_dir in $PATH
10979do
10980  IFS=$as_save_IFS
10981  case $as_dir in #(((
10982    '') as_dir=./ ;;
10983    */) ;;
10984    *) as_dir=$as_dir/ ;;
10985  esac
10986    for ac_exec_ext in '' $ac_executable_extensions; do
10987  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
10988    ac_cv_prog_ac_ct_LIPO="lipo"
10989    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
10990    break 2
10991  fi
10992done
10993  done
10994IFS=$as_save_IFS
10995
10996fi
10997fi
10998ac_ct_LIPO=$ac_cv_prog_ac_ct_LIPO
10999if test -n "$ac_ct_LIPO"; then
11000  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LIPO" >&5
11001printf "%s\n" "$ac_ct_LIPO" >&6; }
11002else
11003  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
11004printf "%s\n" "no" >&6; }
11005fi
11006
11007  if test "x$ac_ct_LIPO" = x; then
11008    LIPO=":"
11009  else
11010    case $cross_compiling:$ac_tool_warned in
11011yes:)
11012{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
11013printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
11014ac_tool_warned=yes ;;
11015esac
11016    LIPO=$ac_ct_LIPO
11017  fi
11018else
11019  LIPO="$ac_cv_prog_LIPO"
11020fi
11021
11022    if test -n "$ac_tool_prefix"; then
11023  # Extract the first word of "${ac_tool_prefix}otool", so it can be a program name with args.
11024set dummy ${ac_tool_prefix}otool; ac_word=$2
11025{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11026printf %s "checking for $ac_word... " >&6; }
11027if test ${ac_cv_prog_OTOOL+y}
11028then :
11029  printf %s "(cached) " >&6
11030else $as_nop
11031  if test -n "$OTOOL"; then
11032  ac_cv_prog_OTOOL="$OTOOL" # Let the user override the test.
11033else
11034as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11035for as_dir in $PATH
11036do
11037  IFS=$as_save_IFS
11038  case $as_dir in #(((
11039    '') as_dir=./ ;;
11040    */) ;;
11041    *) as_dir=$as_dir/ ;;
11042  esac
11043    for ac_exec_ext in '' $ac_executable_extensions; do
11044  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
11045    ac_cv_prog_OTOOL="${ac_tool_prefix}otool"
11046    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
11047    break 2
11048  fi
11049done
11050  done
11051IFS=$as_save_IFS
11052
11053fi
11054fi
11055OTOOL=$ac_cv_prog_OTOOL
11056if test -n "$OTOOL"; then
11057  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
11058printf "%s\n" "$OTOOL" >&6; }
11059else
11060  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
11061printf "%s\n" "no" >&6; }
11062fi
11063
11064
11065fi
11066if test -z "$ac_cv_prog_OTOOL"; then
11067  ac_ct_OTOOL=$OTOOL
11068  # Extract the first word of "otool", so it can be a program name with args.
11069set dummy otool; ac_word=$2
11070{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11071printf %s "checking for $ac_word... " >&6; }
11072if test ${ac_cv_prog_ac_ct_OTOOL+y}
11073then :
11074  printf %s "(cached) " >&6
11075else $as_nop
11076  if test -n "$ac_ct_OTOOL"; then
11077  ac_cv_prog_ac_ct_OTOOL="$ac_ct_OTOOL" # Let the user override the test.
11078else
11079as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11080for as_dir in $PATH
11081do
11082  IFS=$as_save_IFS
11083  case $as_dir in #(((
11084    '') as_dir=./ ;;
11085    */) ;;
11086    *) as_dir=$as_dir/ ;;
11087  esac
11088    for ac_exec_ext in '' $ac_executable_extensions; do
11089  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
11090    ac_cv_prog_ac_ct_OTOOL="otool"
11091    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
11092    break 2
11093  fi
11094done
11095  done
11096IFS=$as_save_IFS
11097
11098fi
11099fi
11100ac_ct_OTOOL=$ac_cv_prog_ac_ct_OTOOL
11101if test -n "$ac_ct_OTOOL"; then
11102  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL" >&5
11103printf "%s\n" "$ac_ct_OTOOL" >&6; }
11104else
11105  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
11106printf "%s\n" "no" >&6; }
11107fi
11108
11109  if test "x$ac_ct_OTOOL" = x; then
11110    OTOOL=":"
11111  else
11112    case $cross_compiling:$ac_tool_warned in
11113yes:)
11114{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
11115printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
11116ac_tool_warned=yes ;;
11117esac
11118    OTOOL=$ac_ct_OTOOL
11119  fi
11120else
11121  OTOOL="$ac_cv_prog_OTOOL"
11122fi
11123
11124    if test -n "$ac_tool_prefix"; then
11125  # Extract the first word of "${ac_tool_prefix}otool64", so it can be a program name with args.
11126set dummy ${ac_tool_prefix}otool64; ac_word=$2
11127{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11128printf %s "checking for $ac_word... " >&6; }
11129if test ${ac_cv_prog_OTOOL64+y}
11130then :
11131  printf %s "(cached) " >&6
11132else $as_nop
11133  if test -n "$OTOOL64"; then
11134  ac_cv_prog_OTOOL64="$OTOOL64" # Let the user override the test.
11135else
11136as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11137for as_dir in $PATH
11138do
11139  IFS=$as_save_IFS
11140  case $as_dir in #(((
11141    '') as_dir=./ ;;
11142    */) ;;
11143    *) as_dir=$as_dir/ ;;
11144  esac
11145    for ac_exec_ext in '' $ac_executable_extensions; do
11146  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
11147    ac_cv_prog_OTOOL64="${ac_tool_prefix}otool64"
11148    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
11149    break 2
11150  fi
11151done
11152  done
11153IFS=$as_save_IFS
11154
11155fi
11156fi
11157OTOOL64=$ac_cv_prog_OTOOL64
11158if test -n "$OTOOL64"; then
11159  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $OTOOL64" >&5
11160printf "%s\n" "$OTOOL64" >&6; }
11161else
11162  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
11163printf "%s\n" "no" >&6; }
11164fi
11165
11166
11167fi
11168if test -z "$ac_cv_prog_OTOOL64"; then
11169  ac_ct_OTOOL64=$OTOOL64
11170  # Extract the first word of "otool64", so it can be a program name with args.
11171set dummy otool64; ac_word=$2
11172{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11173printf %s "checking for $ac_word... " >&6; }
11174if test ${ac_cv_prog_ac_ct_OTOOL64+y}
11175then :
11176  printf %s "(cached) " >&6
11177else $as_nop
11178  if test -n "$ac_ct_OTOOL64"; then
11179  ac_cv_prog_ac_ct_OTOOL64="$ac_ct_OTOOL64" # Let the user override the test.
11180else
11181as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11182for as_dir in $PATH
11183do
11184  IFS=$as_save_IFS
11185  case $as_dir in #(((
11186    '') as_dir=./ ;;
11187    */) ;;
11188    *) as_dir=$as_dir/ ;;
11189  esac
11190    for ac_exec_ext in '' $ac_executable_extensions; do
11191  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
11192    ac_cv_prog_ac_ct_OTOOL64="otool64"
11193    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
11194    break 2
11195  fi
11196done
11197  done
11198IFS=$as_save_IFS
11199
11200fi
11201fi
11202ac_ct_OTOOL64=$ac_cv_prog_ac_ct_OTOOL64
11203if test -n "$ac_ct_OTOOL64"; then
11204  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL64" >&5
11205printf "%s\n" "$ac_ct_OTOOL64" >&6; }
11206else
11207  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
11208printf "%s\n" "no" >&6; }
11209fi
11210
11211  if test "x$ac_ct_OTOOL64" = x; then
11212    OTOOL64=":"
11213  else
11214    case $cross_compiling:$ac_tool_warned in
11215yes:)
11216{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
11217printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
11218ac_tool_warned=yes ;;
11219esac
11220    OTOOL64=$ac_ct_OTOOL64
11221  fi
11222else
11223  OTOOL64="$ac_cv_prog_OTOOL64"
11224fi
11225
11226
11227
11228
11229
11230
11231
11232
11233
11234
11235
11236
11237
11238
11239
11240
11241
11242
11243
11244
11245
11246
11247
11248
11249
11250
11251
11252    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for -single_module linker flag" >&5
11253printf %s "checking for -single_module linker flag... " >&6; }
11254if test ${lt_cv_apple_cc_single_mod+y}
11255then :
11256  printf %s "(cached) " >&6
11257else $as_nop
11258  lt_cv_apple_cc_single_mod=no
11259      if test -z "$LT_MULTI_MODULE"; then
11260	# By default we will add the -single_module flag. You can override
11261	# by either setting the environment variable LT_MULTI_MODULE
11262	# non-empty at configure time, or by adding -multi_module to the
11263	# link flags.
11264	rm -rf libconftest.dylib*
11265	echo "int foo(void){return 1;}" > conftest.c
11266	echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
11267-dynamiclib -Wl,-single_module conftest.c" >&5
11268	$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
11269	  -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
11270        _lt_result=$?
11271	# If there is a non-empty error log, and "single_module"
11272	# appears in it, assume the flag caused a linker warning
11273        if test -s conftest.err && $GREP single_module conftest.err; then
11274	  cat conftest.err >&5
11275	# Otherwise, if the output was created with a 0 exit code from
11276	# the compiler, it worked.
11277	elif test -f libconftest.dylib && test 0 = "$_lt_result"; then
11278	  lt_cv_apple_cc_single_mod=yes
11279	else
11280	  cat conftest.err >&5
11281	fi
11282	rm -rf libconftest.dylib*
11283	rm -f conftest.*
11284      fi
11285fi
11286{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5
11287printf "%s\n" "$lt_cv_apple_cc_single_mod" >&6; }
11288
11289    # Feature test to disable chained fixups since it is not
11290    # compatible with '-undefined dynamic_lookup'
11291    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for -no_fixup_chains linker flag" >&5
11292printf %s "checking for -no_fixup_chains linker flag... " >&6; }
11293if test ${lt_cv_support_no_fixup_chains+y}
11294then :
11295  printf %s "(cached) " >&6
11296else $as_nop
11297   save_LDFLAGS=$LDFLAGS
11298        LDFLAGS="$LDFLAGS -Wl,-no_fixup_chains"
11299        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11300/* end confdefs.h.  */
11301
11302int
11303main (void)
11304{
11305
11306  ;
11307  return 0;
11308}
11309_ACEOF
11310if ac_fn_c_try_link "$LINENO"
11311then :
11312  lt_cv_support_no_fixup_chains=yes
11313else $as_nop
11314  lt_cv_support_no_fixup_chains=no
11315
11316fi
11317rm -f core conftest.err conftest.$ac_objext conftest.beam \
11318    conftest$ac_exeext conftest.$ac_ext
11319        LDFLAGS=$save_LDFLAGS
11320
11321
11322fi
11323{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_support_no_fixup_chains" >&5
11324printf "%s\n" "$lt_cv_support_no_fixup_chains" >&6; }
11325
11326    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5
11327printf %s "checking for -exported_symbols_list linker flag... " >&6; }
11328if test ${lt_cv_ld_exported_symbols_list+y}
11329then :
11330  printf %s "(cached) " >&6
11331else $as_nop
11332  lt_cv_ld_exported_symbols_list=no
11333      save_LDFLAGS=$LDFLAGS
11334      echo "_main" > conftest.sym
11335      LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
11336      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11337/* end confdefs.h.  */
11338
11339int
11340main (void)
11341{
11342
11343  ;
11344  return 0;
11345}
11346_ACEOF
11347if ac_fn_c_try_link "$LINENO"
11348then :
11349  lt_cv_ld_exported_symbols_list=yes
11350else $as_nop
11351  lt_cv_ld_exported_symbols_list=no
11352fi
11353rm -f core conftest.err conftest.$ac_objext conftest.beam \
11354    conftest$ac_exeext conftest.$ac_ext
11355	LDFLAGS=$save_LDFLAGS
11356
11357fi
11358{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5
11359printf "%s\n" "$lt_cv_ld_exported_symbols_list" >&6; }
11360
11361    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for -force_load linker flag" >&5
11362printf %s "checking for -force_load linker flag... " >&6; }
11363if test ${lt_cv_ld_force_load+y}
11364then :
11365  printf %s "(cached) " >&6
11366else $as_nop
11367  lt_cv_ld_force_load=no
11368      cat > conftest.c << _LT_EOF
11369int forced_loaded() { return 2;}
11370_LT_EOF
11371      echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&5
11372      $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5
11373      echo "$AR $AR_FLAGS libconftest.a conftest.o" >&5
11374      $AR $AR_FLAGS libconftest.a conftest.o 2>&5
11375      echo "$RANLIB libconftest.a" >&5
11376      $RANLIB libconftest.a 2>&5
11377      cat > conftest.c << _LT_EOF
11378int main(void) { return 0;}
11379_LT_EOF
11380      echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&5
11381      $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err
11382      _lt_result=$?
11383      if test -s conftest.err && $GREP force_load conftest.err; then
11384	cat conftest.err >&5
11385      elif test -f conftest && test 0 = "$_lt_result" && $GREP forced_load conftest >/dev/null 2>&1; then
11386	lt_cv_ld_force_load=yes
11387      else
11388	cat conftest.err >&5
11389      fi
11390        rm -f conftest.err libconftest.a conftest conftest.c
11391        rm -rf conftest.dSYM
11392
11393fi
11394{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_force_load" >&5
11395printf "%s\n" "$lt_cv_ld_force_load" >&6; }
11396    case $host_os in
11397    rhapsody* | darwin1.[012])
11398      _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;;
11399    darwin1.*)
11400      _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
11401    darwin*)
11402      case $MACOSX_DEPLOYMENT_TARGET,$host in
11403        10.[012],*|,*powerpc*-darwin[5-8]*)
11404          _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
11405        *)
11406          _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup'
11407          if test yes = "$lt_cv_support_no_fixup_chains"; then
11408            as_fn_append _lt_dar_allow_undefined ' $wl-no_fixup_chains'
11409          fi
11410        ;;
11411      esac
11412    ;;
11413  esac
11414    if test yes = "$lt_cv_apple_cc_single_mod"; then
11415      _lt_dar_single_mod='$single_module'
11416    fi
11417    _lt_dar_needs_single_mod=no
11418    case $host_os in
11419    rhapsody* | darwin1.*)
11420      _lt_dar_needs_single_mod=yes ;;
11421    darwin*)
11422      # When targeting Mac OS X 10.4 (darwin 8) or later,
11423      # -single_module is the default and -multi_module is unsupported.
11424      # The toolchain on macOS 10.14 (darwin 18) and later cannot
11425      # target any OS version that needs -single_module.
11426      case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
11427      10.0,*-darwin[567].*|10.[0-3],*-darwin[5-9].*|10.[0-3],*-darwin1[0-7].*)
11428        _lt_dar_needs_single_mod=yes ;;
11429      esac
11430    ;;
11431    esac
11432    if test yes = "$lt_cv_ld_exported_symbols_list"; then
11433      _lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym'
11434    else
11435      _lt_dar_export_syms='~$NMEDIT -s $output_objdir/$libname-symbols.expsym $lib'
11436    fi
11437    if test : != "$DSYMUTIL" && test no = "$lt_cv_ld_force_load"; then
11438      _lt_dsymutil='~$DSYMUTIL $lib || :'
11439    else
11440      _lt_dsymutil=
11441    fi
11442    ;;
11443  esac
11444
11445# func_munge_path_list VARIABLE PATH
11446# -----------------------------------
11447# VARIABLE is name of variable containing _space_ separated list of
11448# directories to be munged by the contents of PATH, which is string
11449# having a format:
11450# "DIR[:DIR]:"
11451#       string "DIR[ DIR]" will be prepended to VARIABLE
11452# ":DIR[:DIR]"
11453#       string "DIR[ DIR]" will be appended to VARIABLE
11454# "DIRP[:DIRP]::[DIRA:]DIRA"
11455#       string "DIRP[ DIRP]" will be prepended to VARIABLE and string
11456#       "DIRA[ DIRA]" will be appended to VARIABLE
11457# "DIR[:DIR]"
11458#       VARIABLE will be replaced by "DIR[ DIR]"
11459func_munge_path_list ()
11460{
11461    case x$2 in
11462    x)
11463        ;;
11464    *:)
11465        eval $1=\"`$ECHO $2 | $SED 's/:/ /g'` \$$1\"
11466        ;;
11467    x:*)
11468        eval $1=\"\$$1 `$ECHO $2 | $SED 's/:/ /g'`\"
11469        ;;
11470    *::*)
11471        eval $1=\"\$$1\ `$ECHO $2 | $SED -e 's/.*:://' -e 's/:/ /g'`\"
11472        eval $1=\"`$ECHO $2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \$$1\"
11473        ;;
11474    *)
11475        eval $1=\"`$ECHO $2 | $SED 's/:/ /g'`\"
11476        ;;
11477    esac
11478}
11479
11480ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default
11481"
11482if test "x$ac_cv_header_dlfcn_h" = xyes
11483then :
11484  printf "%s\n" "#define HAVE_DLFCN_H 1" >>confdefs.h
11485
11486fi
11487
11488
11489
11490
11491
11492
11493
11494# Set options
11495
11496
11497
11498        enable_dlopen=no
11499
11500
11501  enable_win32_dll=no
11502
11503
11504            # Check whether --enable-shared was given.
11505if test ${enable_shared+y}
11506then :
11507  enableval=$enable_shared; p=${PACKAGE-default}
11508    case $enableval in
11509    yes) enable_shared=yes ;;
11510    no) enable_shared=no ;;
11511    *)
11512      enable_shared=no
11513      # Look at the argument we got.  We use all the common list separators.
11514      lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
11515      for pkg in $enableval; do
11516	IFS=$lt_save_ifs
11517	if test "X$pkg" = "X$p"; then
11518	  enable_shared=yes
11519	fi
11520      done
11521      IFS=$lt_save_ifs
11522      ;;
11523    esac
11524else $as_nop
11525  enable_shared=yes
11526fi
11527
11528
11529
11530
11531
11532
11533
11534
11535
11536  # Check whether --enable-static was given.
11537if test ${enable_static+y}
11538then :
11539  enableval=$enable_static; p=${PACKAGE-default}
11540    case $enableval in
11541    yes) enable_static=yes ;;
11542    no) enable_static=no ;;
11543    *)
11544     enable_static=no
11545      # Look at the argument we got.  We use all the common list separators.
11546      lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
11547      for pkg in $enableval; do
11548	IFS=$lt_save_ifs
11549	if test "X$pkg" = "X$p"; then
11550	  enable_static=yes
11551	fi
11552      done
11553      IFS=$lt_save_ifs
11554      ;;
11555    esac
11556else $as_nop
11557  enable_static=yes
11558fi
11559
11560
11561
11562
11563
11564
11565
11566
11567
11568  # Check whether --enable-pic was given.
11569if test ${enable_pic+y}
11570then :
11571  enableval=$enable_pic; lt_p=${PACKAGE-default}
11572     case $enableval in
11573     yes|no) pic_mode=$enableval ;;
11574     *)
11575       pic_mode=default
11576       # Look at the argument we got.  We use all the common list separators.
11577       lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
11578       for lt_pkg in $enableval; do
11579	 IFS=$lt_save_ifs
11580	 if test "X$lt_pkg" = "X$lt_p"; then
11581	   pic_mode=yes
11582	 fi
11583       done
11584       IFS=$lt_save_ifs
11585       ;;
11586     esac
11587else $as_nop
11588            # Check whether --with-pic was given.
11589if test ${with_pic+y}
11590then :
11591  withval=$with_pic; lt_p=${PACKAGE-default}
11592	 case $withval in
11593	 yes|no) pic_mode=$withval ;;
11594	 *)
11595	   pic_mode=default
11596	   # Look at the argument we got.  We use all the common list separators.
11597	   lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
11598	   for lt_pkg in $withval; do
11599	     IFS=$lt_save_ifs
11600	     if test "X$lt_pkg" = "X$lt_p"; then
11601	       pic_mode=yes
11602	     fi
11603	   done
11604	   IFS=$lt_save_ifs
11605	   ;;
11606	 esac
11607else $as_nop
11608  pic_mode=default
11609fi
11610
11611
11612fi
11613
11614
11615
11616
11617
11618
11619
11620
11621  # Check whether --enable-fast-install was given.
11622if test ${enable_fast_install+y}
11623then :
11624  enableval=$enable_fast_install; p=${PACKAGE-default}
11625    case $enableval in
11626    yes) enable_fast_install=yes ;;
11627    no) enable_fast_install=no ;;
11628    *)
11629      enable_fast_install=no
11630      # Look at the argument we got.  We use all the common list separators.
11631      lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
11632      for pkg in $enableval; do
11633	IFS=$lt_save_ifs
11634	if test "X$pkg" = "X$p"; then
11635	  enable_fast_install=yes
11636	fi
11637      done
11638      IFS=$lt_save_ifs
11639      ;;
11640    esac
11641else $as_nop
11642  enable_fast_install=yes
11643fi
11644
11645
11646
11647
11648
11649
11650
11651
11652  shared_archive_member_spec=
11653case $host,$enable_shared in
11654power*-*-aix[5-9]*,yes)
11655  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking which variant of shared library versioning to provide" >&5
11656printf %s "checking which variant of shared library versioning to provide... " >&6; }
11657  # Check whether --enable-aix-soname was given.
11658if test ${enable_aix_soname+y}
11659then :
11660  enableval=$enable_aix_soname; case $enableval in
11661     aix|svr4|both)
11662       ;;
11663     *)
11664       as_fn_error $? "Unknown argument to --enable-aix-soname" "$LINENO" 5
11665       ;;
11666     esac
11667     lt_cv_with_aix_soname=$enable_aix_soname
11668else $as_nop
11669  # Check whether --with-aix-soname was given.
11670if test ${with_aix_soname+y}
11671then :
11672  withval=$with_aix_soname; case $withval in
11673         aix|svr4|both)
11674           ;;
11675         *)
11676           as_fn_error $? "Unknown argument to --with-aix-soname" "$LINENO" 5
11677           ;;
11678         esac
11679         lt_cv_with_aix_soname=$with_aix_soname
11680else $as_nop
11681  if test ${lt_cv_with_aix_soname+y}
11682then :
11683  printf %s "(cached) " >&6
11684else $as_nop
11685  lt_cv_with_aix_soname=aix
11686fi
11687
11688fi
11689
11690     enable_aix_soname=$lt_cv_with_aix_soname
11691fi
11692
11693  with_aix_soname=$enable_aix_soname
11694  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $with_aix_soname" >&5
11695printf "%s\n" "$with_aix_soname" >&6; }
11696  if test aix != "$with_aix_soname"; then
11697    # For the AIX way of multilib, we name the shared archive member
11698    # based on the bitwidth used, traditionally 'shr.o' or 'shr_64.o',
11699    # and 'shr.imp' or 'shr_64.imp', respectively, for the Import File.
11700    # Even when GNU compilers ignore OBJECT_MODE but need '-maix64' flag,
11701    # the AIX toolchain works better with OBJECT_MODE set (default 32).
11702    if test 64 = "${OBJECT_MODE-32}"; then
11703      shared_archive_member_spec=shr_64
11704    else
11705      shared_archive_member_spec=shr
11706    fi
11707  fi
11708  ;;
11709*)
11710  with_aix_soname=aix
11711  ;;
11712esac
11713
11714
11715
11716
11717
11718
11719
11720
11721
11722
11723# This can be used to rebuild libtool when needed
11724LIBTOOL_DEPS=$ltmain
11725
11726# Always use our own libtool.
11727LIBTOOL='$(SHELL) $(top_builddir)/libtool'
11728
11729
11730
11731
11732
11733
11734
11735
11736
11737
11738
11739
11740
11741
11742
11743
11744
11745
11746
11747
11748
11749
11750
11751
11752
11753
11754
11755
11756
11757
11758test -z "$LN_S" && LN_S="ln -s"
11759
11760
11761
11762
11763
11764
11765
11766
11767
11768
11769
11770
11771
11772
11773if test -n "${ZSH_VERSION+set}"; then
11774   setopt NO_GLOB_SUBST
11775fi
11776
11777{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5
11778printf %s "checking for objdir... " >&6; }
11779if test ${lt_cv_objdir+y}
11780then :
11781  printf %s "(cached) " >&6
11782else $as_nop
11783  rm -f .libs 2>/dev/null
11784mkdir .libs 2>/dev/null
11785if test -d .libs; then
11786  lt_cv_objdir=.libs
11787else
11788  # MS-DOS does not allow filenames that begin with a dot.
11789  lt_cv_objdir=_libs
11790fi
11791rmdir .libs 2>/dev/null
11792fi
11793{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_objdir" >&5
11794printf "%s\n" "$lt_cv_objdir" >&6; }
11795objdir=$lt_cv_objdir
11796
11797
11798
11799
11800
11801printf "%s\n" "#define LT_OBJDIR \"$lt_cv_objdir/\"" >>confdefs.h
11802
11803
11804
11805
11806case $host_os in
11807aix3*)
11808  # AIX sometimes has problems with the GCC collect2 program.  For some
11809  # reason, if we set the COLLECT_NAMES environment variable, the problems
11810  # vanish in a puff of smoke.
11811  if test set != "${COLLECT_NAMES+set}"; then
11812    COLLECT_NAMES=
11813    export COLLECT_NAMES
11814  fi
11815  ;;
11816esac
11817
11818# Global variables:
11819ofile=libtool
11820can_build_shared=yes
11821
11822# All known linkers require a '.a' archive for static linking (except MSVC and
11823# ICC, which need '.lib').
11824libext=a
11825
11826with_gnu_ld=$lt_cv_prog_gnu_ld
11827
11828old_CC=$CC
11829old_CFLAGS=$CFLAGS
11830
11831# Set sane defaults for various variables
11832test -z "$CC" && CC=cc
11833test -z "$LTCC" && LTCC=$CC
11834test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
11835test -z "$LD" && LD=ld
11836test -z "$ac_objext" && ac_objext=o
11837
11838func_cc_basename $compiler
11839cc_basename=$func_cc_basename_result
11840
11841
11842# Only perform the check for file, if the check method requires it
11843test -z "$MAGIC_CMD" && MAGIC_CMD=file
11844case $deplibs_check_method in
11845file_magic*)
11846  if test "$file_magic_cmd" = '$MAGIC_CMD'; then
11847    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5
11848printf %s "checking for ${ac_tool_prefix}file... " >&6; }
11849if test ${lt_cv_path_MAGIC_CMD+y}
11850then :
11851  printf %s "(cached) " >&6
11852else $as_nop
11853  case $MAGIC_CMD in
11854[\\/*] |  ?:[\\/]*)
11855  lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path.
11856  ;;
11857*)
11858  lt_save_MAGIC_CMD=$MAGIC_CMD
11859  lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
11860  ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
11861  for ac_dir in $ac_dummy; do
11862    IFS=$lt_save_ifs
11863    test -z "$ac_dir" && ac_dir=.
11864    if test -f "$ac_dir/${ac_tool_prefix}file"; then
11865      lt_cv_path_MAGIC_CMD=$ac_dir/"${ac_tool_prefix}file"
11866      if test -n "$file_magic_test_file"; then
11867	case $deplibs_check_method in
11868	"file_magic "*)
11869	  file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
11870	  MAGIC_CMD=$lt_cv_path_MAGIC_CMD
11871	  if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
11872	    $EGREP "$file_magic_regex" > /dev/null; then
11873	    :
11874	  else
11875	    cat <<_LT_EOF 1>&2
11876
11877*** Warning: the command libtool uses to detect shared libraries,
11878*** $file_magic_cmd, produces output that libtool cannot recognize.
11879*** The result is that libtool may fail to recognize shared libraries
11880*** as such.  This will affect the creation of libtool libraries that
11881*** depend on shared libraries, but programs linked with such libtool
11882*** libraries will work regardless of this problem.  Nevertheless, you
11883*** may want to report the problem to your system manager and/or to
11884*** bug-libtool@gnu.org
11885
11886_LT_EOF
11887	  fi ;;
11888	esac
11889      fi
11890      break
11891    fi
11892  done
11893  IFS=$lt_save_ifs
11894  MAGIC_CMD=$lt_save_MAGIC_CMD
11895  ;;
11896esac
11897fi
11898
11899MAGIC_CMD=$lt_cv_path_MAGIC_CMD
11900if test -n "$MAGIC_CMD"; then
11901  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5
11902printf "%s\n" "$MAGIC_CMD" >&6; }
11903else
11904  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
11905printf "%s\n" "no" >&6; }
11906fi
11907
11908
11909
11910
11911
11912if test -z "$lt_cv_path_MAGIC_CMD"; then
11913  if test -n "$ac_tool_prefix"; then
11914    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for file" >&5
11915printf %s "checking for file... " >&6; }
11916if test ${lt_cv_path_MAGIC_CMD+y}
11917then :
11918  printf %s "(cached) " >&6
11919else $as_nop
11920  case $MAGIC_CMD in
11921[\\/*] |  ?:[\\/]*)
11922  lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path.
11923  ;;
11924*)
11925  lt_save_MAGIC_CMD=$MAGIC_CMD
11926  lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
11927  ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
11928  for ac_dir in $ac_dummy; do
11929    IFS=$lt_save_ifs
11930    test -z "$ac_dir" && ac_dir=.
11931    if test -f "$ac_dir/file"; then
11932      lt_cv_path_MAGIC_CMD=$ac_dir/"file"
11933      if test -n "$file_magic_test_file"; then
11934	case $deplibs_check_method in
11935	"file_magic "*)
11936	  file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
11937	  MAGIC_CMD=$lt_cv_path_MAGIC_CMD
11938	  if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
11939	    $EGREP "$file_magic_regex" > /dev/null; then
11940	    :
11941	  else
11942	    cat <<_LT_EOF 1>&2
11943
11944*** Warning: the command libtool uses to detect shared libraries,
11945*** $file_magic_cmd, produces output that libtool cannot recognize.
11946*** The result is that libtool may fail to recognize shared libraries
11947*** as such.  This will affect the creation of libtool libraries that
11948*** depend on shared libraries, but programs linked with such libtool
11949*** libraries will work regardless of this problem.  Nevertheless, you
11950*** may want to report the problem to your system manager and/or to
11951*** bug-libtool@gnu.org
11952
11953_LT_EOF
11954	  fi ;;
11955	esac
11956      fi
11957      break
11958    fi
11959  done
11960  IFS=$lt_save_ifs
11961  MAGIC_CMD=$lt_save_MAGIC_CMD
11962  ;;
11963esac
11964fi
11965
11966MAGIC_CMD=$lt_cv_path_MAGIC_CMD
11967if test -n "$MAGIC_CMD"; then
11968  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5
11969printf "%s\n" "$MAGIC_CMD" >&6; }
11970else
11971  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
11972printf "%s\n" "no" >&6; }
11973fi
11974
11975
11976  else
11977    MAGIC_CMD=:
11978  fi
11979fi
11980
11981  fi
11982  ;;
11983esac
11984
11985# Use C for the default configuration in the libtool script
11986
11987lt_save_CC=$CC
11988ac_ext=c
11989ac_cpp='$CPP $CPPFLAGS'
11990ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
11991ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
11992ac_compiler_gnu=$ac_cv_c_compiler_gnu
11993
11994
11995# Source file extension for C test sources.
11996ac_ext=c
11997
11998# Object file extension for compiled C test sources.
11999objext=o
12000objext=$objext
12001
12002# Code to be used in simple compile tests
12003lt_simple_compile_test_code="int some_variable = 0;"
12004
12005# Code to be used in simple link tests
12006lt_simple_link_test_code='int main(void){return(0);}'
12007
12008
12009
12010
12011
12012
12013
12014# If no C compiler was specified, use CC.
12015LTCC=${LTCC-"$CC"}
12016
12017# If no C compiler flags were specified, use CFLAGS.
12018LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
12019
12020# Allow CC to be a program name with arguments.
12021compiler=$CC
12022
12023# Save the default compiler, since it gets overwritten when the other
12024# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
12025compiler_DEFAULT=$CC
12026
12027# save warnings/boilerplate of simple test code
12028ac_outfile=conftest.$ac_objext
12029echo "$lt_simple_compile_test_code" >conftest.$ac_ext
12030eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
12031_lt_compiler_boilerplate=`cat conftest.err`
12032$RM conftest*
12033
12034ac_outfile=conftest.$ac_objext
12035echo "$lt_simple_link_test_code" >conftest.$ac_ext
12036eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
12037_lt_linker_boilerplate=`cat conftest.err`
12038$RM -r conftest*
12039
12040
12041if test -n "$compiler"; then
12042
12043lt_prog_compiler_no_builtin_flag=
12044
12045if test yes = "$GCC"; then
12046  case $cc_basename in
12047  nvcc*)
12048    lt_prog_compiler_no_builtin_flag=' -Xcompiler -fno-builtin' ;;
12049  *)
12050    lt_prog_compiler_no_builtin_flag=' -fno-builtin' ;;
12051  esac
12052
12053  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
12054printf %s "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; }
12055if test ${lt_cv_prog_compiler_rtti_exceptions+y}
12056then :
12057  printf %s "(cached) " >&6
12058else $as_nop
12059  lt_cv_prog_compiler_rtti_exceptions=no
12060   ac_outfile=conftest.$ac_objext
12061   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
12062   lt_compiler_flag="-fno-rtti -fno-exceptions"  ## exclude from sc_useless_quotes_in_assignment
12063   # Insert the option either (1) after the last *FLAGS variable, or
12064   # (2) before a word containing "conftest.", or (3) at the end.
12065   # Note that $ac_compile itself does not contain backslashes and begins
12066   # with a dollar sign (not a hyphen), so the echo should work correctly.
12067   # The option is referenced via a variable to avoid confusing sed.
12068   lt_compile=`echo "$ac_compile" | $SED \
12069   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
12070   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
12071   -e 's:$: $lt_compiler_flag:'`
12072   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
12073   (eval "$lt_compile" 2>conftest.err)
12074   ac_status=$?
12075   cat conftest.err >&5
12076   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12077   if (exit $ac_status) && test -s "$ac_outfile"; then
12078     # The compiler can only warn and ignore the option if not recognized
12079     # So say no if there are warnings other than the usual output.
12080     $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
12081     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
12082     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
12083       lt_cv_prog_compiler_rtti_exceptions=yes
12084     fi
12085   fi
12086   $RM conftest*
12087
12088fi
12089{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5
12090printf "%s\n" "$lt_cv_prog_compiler_rtti_exceptions" >&6; }
12091
12092if test yes = "$lt_cv_prog_compiler_rtti_exceptions"; then
12093    lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions"
12094else
12095    :
12096fi
12097
12098fi
12099
12100
12101
12102
12103
12104
12105  lt_prog_compiler_wl=
12106lt_prog_compiler_pic=
12107lt_prog_compiler_static=
12108
12109
12110  if test yes = "$GCC"; then
12111    lt_prog_compiler_wl='-Wl,'
12112    lt_prog_compiler_static='-static'
12113
12114    case $host_os in
12115      aix*)
12116      # All AIX code is PIC.
12117      if test ia64 = "$host_cpu"; then
12118	# AIX 5 now supports IA64 processor
12119	lt_prog_compiler_static='-Bstatic'
12120      fi
12121      lt_prog_compiler_pic='-fPIC'
12122      ;;
12123
12124    amigaos*)
12125      case $host_cpu in
12126      powerpc)
12127            # see comment about AmigaOS4 .so support
12128            lt_prog_compiler_pic='-fPIC'
12129        ;;
12130      m68k)
12131            # FIXME: we need at least 68020 code to build shared libraries, but
12132            # adding the '-m68020' flag to GCC prevents building anything better,
12133            # like '-m68040'.
12134            lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4'
12135        ;;
12136      esac
12137      ;;
12138
12139    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
12140      # PIC is the default for these OSes.
12141      ;;
12142
12143    mingw* | windows* | cygwin* | pw32* | os2* | cegcc*)
12144      # This hack is so that the source file can tell whether it is being
12145      # built for inclusion in a dll (and should export symbols for example).
12146      # Although the cygwin gcc ignores -fPIC, still need this for old-style
12147      # (--disable-auto-import) libraries
12148      lt_prog_compiler_pic='-DDLL_EXPORT'
12149      case $host_os in
12150      os2*)
12151	lt_prog_compiler_static='$wl-static'
12152	;;
12153      esac
12154      ;;
12155
12156    darwin* | rhapsody*)
12157      # PIC is the default on this platform
12158      # Common symbols not allowed in MH_DYLIB files
12159      lt_prog_compiler_pic='-fno-common'
12160      ;;
12161
12162    haiku*)
12163      # PIC is the default for Haiku.
12164      # The "-static" flag exists, but is broken.
12165      lt_prog_compiler_static=
12166      ;;
12167
12168    hpux*)
12169      # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
12170      # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
12171      # sets the default TLS model and affects inlining.
12172      case $host_cpu in
12173      hppa*64*)
12174	# +Z the default
12175	;;
12176      *)
12177	lt_prog_compiler_pic='-fPIC'
12178	;;
12179      esac
12180      ;;
12181
12182    interix[3-9]*)
12183      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
12184      # Instead, we relocate shared libraries at runtime.
12185      ;;
12186
12187    msdosdjgpp*)
12188      # Just because we use GCC doesn't mean we suddenly get shared libraries
12189      # on systems that don't support them.
12190      lt_prog_compiler_can_build_shared=no
12191      enable_shared=no
12192      ;;
12193
12194    *nto* | *qnx*)
12195      # QNX uses GNU C++, but need to define -shared option too, otherwise
12196      # it will coredump.
12197      lt_prog_compiler_pic='-fPIC -shared'
12198      ;;
12199
12200    sysv4*MP*)
12201      if test -d /usr/nec; then
12202	lt_prog_compiler_pic=-Kconform_pic
12203      fi
12204      ;;
12205
12206    *)
12207      lt_prog_compiler_pic='-fPIC'
12208      ;;
12209    esac
12210
12211    case $cc_basename in
12212    nvcc*) # Cuda Compiler Driver 2.2
12213      lt_prog_compiler_wl='-Xlinker '
12214      if test -n "$lt_prog_compiler_pic"; then
12215        lt_prog_compiler_pic="-Xcompiler $lt_prog_compiler_pic"
12216      fi
12217      ;;
12218    esac
12219  else
12220    # PORTME Check for flag to pass linker flags through the system compiler.
12221    case $host_os in
12222    aix*)
12223      lt_prog_compiler_wl='-Wl,'
12224      if test ia64 = "$host_cpu"; then
12225	# AIX 5 now supports IA64 processor
12226	lt_prog_compiler_static='-Bstatic'
12227      else
12228	lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp'
12229      fi
12230      ;;
12231
12232    darwin* | rhapsody*)
12233      # PIC is the default on this platform
12234      # Common symbols not allowed in MH_DYLIB files
12235      lt_prog_compiler_pic='-fno-common'
12236      case $cc_basename in
12237      nagfor*)
12238        # NAG Fortran compiler
12239        lt_prog_compiler_wl='-Wl,-Wl,,'
12240        lt_prog_compiler_pic='-PIC'
12241        lt_prog_compiler_static='-Bstatic'
12242        ;;
12243      esac
12244      ;;
12245
12246    mingw* | windows* | cygwin* | pw32* | os2* | cegcc*)
12247      # This hack is so that the source file can tell whether it is being
12248      # built for inclusion in a dll (and should export symbols for example).
12249      lt_prog_compiler_pic='-DDLL_EXPORT'
12250      case $host_os in
12251      os2*)
12252	lt_prog_compiler_static='$wl-static'
12253	;;
12254      esac
12255      ;;
12256
12257    hpux9* | hpux10* | hpux11*)
12258      lt_prog_compiler_wl='-Wl,'
12259      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
12260      # not for PA HP-UX.
12261      case $host_cpu in
12262      hppa*64*|ia64*)
12263	# +Z the default
12264	;;
12265      *)
12266	lt_prog_compiler_pic='+Z'
12267	;;
12268      esac
12269      # Is there a better lt_prog_compiler_static that works with the bundled CC?
12270      lt_prog_compiler_static='$wl-a ${wl}archive'
12271      ;;
12272
12273    irix5* | irix6* | nonstopux*)
12274      lt_prog_compiler_wl='-Wl,'
12275      # PIC (with -KPIC) is the default.
12276      lt_prog_compiler_static='-non_shared'
12277      ;;
12278
12279    linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
12280      case $cc_basename in
12281      # old Intel for x86_64, which still supported -KPIC.
12282      ecc*)
12283	lt_prog_compiler_wl='-Wl,'
12284	lt_prog_compiler_pic='-KPIC'
12285	lt_prog_compiler_static='-static'
12286        ;;
12287      *flang* | ftn | f18* | f95*)
12288        # Flang compiler.
12289	lt_prog_compiler_wl='-Wl,'
12290	lt_prog_compiler_pic='-fPIC'
12291	lt_prog_compiler_static='-static'
12292        ;;
12293      # icc used to be incompatible with GCC.
12294      # ICC 10 doesn't accept -KPIC any more.
12295      icc* | ifort*)
12296	lt_prog_compiler_wl='-Wl,'
12297	lt_prog_compiler_pic='-fPIC'
12298	lt_prog_compiler_static='-static'
12299        ;;
12300      # Lahey Fortran 8.1.
12301      lf95*)
12302	lt_prog_compiler_wl='-Wl,'
12303	lt_prog_compiler_pic='--shared'
12304	lt_prog_compiler_static='--static'
12305	;;
12306      nagfor*)
12307	# NAG Fortran compiler
12308	lt_prog_compiler_wl='-Wl,-Wl,,'
12309	lt_prog_compiler_pic='-PIC'
12310	lt_prog_compiler_static='-Bstatic'
12311	;;
12312      tcc*)
12313	# Fabrice Bellard et al's Tiny C Compiler
12314	lt_prog_compiler_wl='-Wl,'
12315	lt_prog_compiler_pic='-fPIC'
12316	lt_prog_compiler_static='-static'
12317	;;
12318      pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
12319        # Portland Group compilers (*not* the Pentium gcc compiler,
12320	# which looks to be a dead project)
12321	lt_prog_compiler_wl='-Wl,'
12322	lt_prog_compiler_pic='-fpic'
12323	lt_prog_compiler_static='-Bstatic'
12324        ;;
12325      ccc*)
12326        lt_prog_compiler_wl='-Wl,'
12327        # All Alpha code is PIC.
12328        lt_prog_compiler_static='-non_shared'
12329        ;;
12330      xl* | bgxl* | bgf* | mpixl*)
12331	# IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene
12332	lt_prog_compiler_wl='-Wl,'
12333	lt_prog_compiler_pic='-qpic'
12334	lt_prog_compiler_static='-qstaticlink'
12335	;;
12336      *)
12337	case `$CC -V 2>&1 | $SED 5q` in
12338	*Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [1-7].* | *Sun*Fortran*\ 8.[0-3]*)
12339	  # Sun Fortran 8.3 passes all unrecognized flags to the linker
12340	  lt_prog_compiler_pic='-KPIC'
12341	  lt_prog_compiler_static='-Bstatic'
12342	  lt_prog_compiler_wl=''
12343	  ;;
12344	*Sun\ F* | *Sun*Fortran*)
12345	  lt_prog_compiler_pic='-KPIC'
12346	  lt_prog_compiler_static='-Bstatic'
12347	  lt_prog_compiler_wl='-Qoption ld '
12348	  ;;
12349	*Sun\ C*)
12350	  # Sun C 5.9
12351	  lt_prog_compiler_pic='-KPIC'
12352	  lt_prog_compiler_static='-Bstatic'
12353	  lt_prog_compiler_wl='-Wl,'
12354	  ;;
12355        *Intel*\ [CF]*Compiler*)
12356	  lt_prog_compiler_wl='-Wl,'
12357	  lt_prog_compiler_pic='-fPIC'
12358	  lt_prog_compiler_static='-static'
12359	  ;;
12360	*Portland\ Group*)
12361	  lt_prog_compiler_wl='-Wl,'
12362	  lt_prog_compiler_pic='-fpic'
12363	  lt_prog_compiler_static='-Bstatic'
12364	  ;;
12365	esac
12366	;;
12367      esac
12368      ;;
12369
12370    newsos6)
12371      lt_prog_compiler_pic='-KPIC'
12372      lt_prog_compiler_static='-Bstatic'
12373      ;;
12374
12375    *-mlibc)
12376      lt_prog_compiler_wl='-Wl,'
12377      lt_prog_compiler_pic='-fPIC'
12378      lt_prog_compiler_static='-static'
12379      ;;
12380
12381    *nto* | *qnx*)
12382      # QNX uses GNU C++, but need to define -shared option too, otherwise
12383      # it will coredump.
12384      lt_prog_compiler_pic='-fPIC -shared'
12385      ;;
12386
12387    osf3* | osf4* | osf5*)
12388      lt_prog_compiler_wl='-Wl,'
12389      # All OSF/1 code is PIC.
12390      lt_prog_compiler_static='-non_shared'
12391      ;;
12392
12393    rdos*)
12394      lt_prog_compiler_static='-non_shared'
12395      ;;
12396
12397    serenity*)
12398      ;;
12399
12400    solaris*)
12401      lt_prog_compiler_pic='-KPIC'
12402      lt_prog_compiler_static='-Bstatic'
12403      case $cc_basename in
12404      f77* | f90* | f95* | sunf77* | sunf90* | sunf95*)
12405	lt_prog_compiler_wl='-Qoption ld ';;
12406      *)
12407	lt_prog_compiler_wl='-Wl,';;
12408      esac
12409      ;;
12410
12411    sunos4*)
12412      lt_prog_compiler_wl='-Qoption ld '
12413      lt_prog_compiler_pic='-PIC'
12414      lt_prog_compiler_static='-Bstatic'
12415      ;;
12416
12417    sysv4 | sysv4.2uw2* | sysv4.3*)
12418      lt_prog_compiler_wl='-Wl,'
12419      lt_prog_compiler_pic='-KPIC'
12420      lt_prog_compiler_static='-Bstatic'
12421      ;;
12422
12423    sysv4*MP*)
12424      if test -d /usr/nec; then
12425	lt_prog_compiler_pic='-Kconform_pic'
12426	lt_prog_compiler_static='-Bstatic'
12427      fi
12428      ;;
12429
12430    sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
12431      lt_prog_compiler_wl='-Wl,'
12432      lt_prog_compiler_pic='-KPIC'
12433      lt_prog_compiler_static='-Bstatic'
12434      ;;
12435
12436    unicos*)
12437      lt_prog_compiler_wl='-Wl,'
12438      lt_prog_compiler_can_build_shared=no
12439      ;;
12440
12441    uts4*)
12442      lt_prog_compiler_pic='-pic'
12443      lt_prog_compiler_static='-Bstatic'
12444      ;;
12445
12446    *)
12447      lt_prog_compiler_can_build_shared=no
12448      ;;
12449    esac
12450  fi
12451
12452case $host_os in
12453  # For platforms that do not support PIC, -DPIC is meaningless:
12454  *djgpp*)
12455    lt_prog_compiler_pic=
12456    ;;
12457  *)
12458    lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC"
12459    ;;
12460esac
12461
12462{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5
12463printf %s "checking for $compiler option to produce PIC... " >&6; }
12464if test ${lt_cv_prog_compiler_pic+y}
12465then :
12466  printf %s "(cached) " >&6
12467else $as_nop
12468  lt_cv_prog_compiler_pic=$lt_prog_compiler_pic
12469fi
12470{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic" >&5
12471printf "%s\n" "$lt_cv_prog_compiler_pic" >&6; }
12472lt_prog_compiler_pic=$lt_cv_prog_compiler_pic
12473
12474#
12475# Check to make sure the PIC flag actually works.
12476#
12477if test -n "$lt_prog_compiler_pic"; then
12478  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5
12479printf %s "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; }
12480if test ${lt_cv_prog_compiler_pic_works+y}
12481then :
12482  printf %s "(cached) " >&6
12483else $as_nop
12484  lt_cv_prog_compiler_pic_works=no
12485   ac_outfile=conftest.$ac_objext
12486   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
12487   lt_compiler_flag="$lt_prog_compiler_pic -DPIC"  ## exclude from sc_useless_quotes_in_assignment
12488   # Insert the option either (1) after the last *FLAGS variable, or
12489   # (2) before a word containing "conftest.", or (3) at the end.
12490   # Note that $ac_compile itself does not contain backslashes and begins
12491   # with a dollar sign (not a hyphen), so the echo should work correctly.
12492   # The option is referenced via a variable to avoid confusing sed.
12493   lt_compile=`echo "$ac_compile" | $SED \
12494   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
12495   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
12496   -e 's:$: $lt_compiler_flag:'`
12497   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
12498   (eval "$lt_compile" 2>conftest.err)
12499   ac_status=$?
12500   cat conftest.err >&5
12501   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12502   if (exit $ac_status) && test -s "$ac_outfile"; then
12503     # The compiler can only warn and ignore the option if not recognized
12504     # So say no if there are warnings other than the usual output.
12505     $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
12506     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
12507     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
12508       lt_cv_prog_compiler_pic_works=yes
12509     fi
12510   fi
12511   $RM conftest*
12512
12513fi
12514{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5
12515printf "%s\n" "$lt_cv_prog_compiler_pic_works" >&6; }
12516
12517if test yes = "$lt_cv_prog_compiler_pic_works"; then
12518    case $lt_prog_compiler_pic in
12519     "" | " "*) ;;
12520     *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;;
12521     esac
12522else
12523    lt_prog_compiler_pic=
12524     lt_prog_compiler_can_build_shared=no
12525fi
12526
12527fi
12528
12529
12530
12531
12532
12533
12534
12535
12536
12537
12538
12539#
12540# Check to make sure the static flag actually works.
12541#
12542wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\"
12543{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5
12544printf %s "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; }
12545if test ${lt_cv_prog_compiler_static_works+y}
12546then :
12547  printf %s "(cached) " >&6
12548else $as_nop
12549  lt_cv_prog_compiler_static_works=no
12550   save_LDFLAGS=$LDFLAGS
12551   LDFLAGS="$LDFLAGS $lt_tmp_static_flag"
12552   echo "$lt_simple_link_test_code" > conftest.$ac_ext
12553   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
12554     # The linker can only warn and ignore the option if not recognized
12555     # So say no if there are warnings
12556     if test -s conftest.err; then
12557       # Append any errors to the config.log.
12558       cat conftest.err 1>&5
12559       $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
12560       $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
12561       if diff conftest.exp conftest.er2 >/dev/null; then
12562         lt_cv_prog_compiler_static_works=yes
12563       fi
12564     else
12565       lt_cv_prog_compiler_static_works=yes
12566     fi
12567   fi
12568   $RM -r conftest*
12569   LDFLAGS=$save_LDFLAGS
12570
12571fi
12572{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5
12573printf "%s\n" "$lt_cv_prog_compiler_static_works" >&6; }
12574
12575if test yes = "$lt_cv_prog_compiler_static_works"; then
12576    :
12577else
12578    lt_prog_compiler_static=
12579fi
12580
12581
12582
12583
12584
12585
12586
12587  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
12588printf %s "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
12589if test ${lt_cv_prog_compiler_c_o+y}
12590then :
12591  printf %s "(cached) " >&6
12592else $as_nop
12593  lt_cv_prog_compiler_c_o=no
12594   $RM -r conftest 2>/dev/null
12595   mkdir conftest
12596   cd conftest
12597   mkdir out
12598   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
12599
12600   lt_compiler_flag="-o out/conftest2.$ac_objext"
12601   # Insert the option either (1) after the last *FLAGS variable, or
12602   # (2) before a word containing "conftest.", or (3) at the end.
12603   # Note that $ac_compile itself does not contain backslashes and begins
12604   # with a dollar sign (not a hyphen), so the echo should work correctly.
12605   lt_compile=`echo "$ac_compile" | $SED \
12606   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
12607   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
12608   -e 's:$: $lt_compiler_flag:'`
12609   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
12610   (eval "$lt_compile" 2>out/conftest.err)
12611   ac_status=$?
12612   cat out/conftest.err >&5
12613   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12614   if (exit $ac_status) && test -s out/conftest2.$ac_objext
12615   then
12616     # The compiler can only warn and ignore the option if not recognized
12617     # So say no if there are warnings
12618     $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
12619     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
12620     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
12621       lt_cv_prog_compiler_c_o=yes
12622     fi
12623   fi
12624   chmod u+w . 2>&5
12625   $RM conftest*
12626   # SGI C++ compiler will create directory out/ii_files/ for
12627   # template instantiation
12628   test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
12629   $RM out/* && rmdir out
12630   cd ..
12631   $RM -r conftest
12632   $RM conftest*
12633
12634fi
12635{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5
12636printf "%s\n" "$lt_cv_prog_compiler_c_o" >&6; }
12637
12638
12639
12640
12641
12642
12643  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
12644printf %s "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
12645if test ${lt_cv_prog_compiler_c_o+y}
12646then :
12647  printf %s "(cached) " >&6
12648else $as_nop
12649  lt_cv_prog_compiler_c_o=no
12650   $RM -r conftest 2>/dev/null
12651   mkdir conftest
12652   cd conftest
12653   mkdir out
12654   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
12655
12656   lt_compiler_flag="-o out/conftest2.$ac_objext"
12657   # Insert the option either (1) after the last *FLAGS variable, or
12658   # (2) before a word containing "conftest.", or (3) at the end.
12659   # Note that $ac_compile itself does not contain backslashes and begins
12660   # with a dollar sign (not a hyphen), so the echo should work correctly.
12661   lt_compile=`echo "$ac_compile" | $SED \
12662   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
12663   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
12664   -e 's:$: $lt_compiler_flag:'`
12665   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
12666   (eval "$lt_compile" 2>out/conftest.err)
12667   ac_status=$?
12668   cat out/conftest.err >&5
12669   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12670   if (exit $ac_status) && test -s out/conftest2.$ac_objext
12671   then
12672     # The compiler can only warn and ignore the option if not recognized
12673     # So say no if there are warnings
12674     $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
12675     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
12676     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
12677       lt_cv_prog_compiler_c_o=yes
12678     fi
12679   fi
12680   chmod u+w . 2>&5
12681   $RM conftest*
12682   # SGI C++ compiler will create directory out/ii_files/ for
12683   # template instantiation
12684   test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
12685   $RM out/* && rmdir out
12686   cd ..
12687   $RM -r conftest
12688   $RM conftest*
12689
12690fi
12691{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5
12692printf "%s\n" "$lt_cv_prog_compiler_c_o" >&6; }
12693
12694
12695
12696
12697hard_links=nottested
12698if test no = "$lt_cv_prog_compiler_c_o" && test no != "$need_locks"; then
12699  # do not overwrite the value of need_locks provided by the user
12700  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5
12701printf %s "checking if we can lock with hard links... " >&6; }
12702  hard_links=yes
12703  $RM conftest*
12704  ln conftest.a conftest.b 2>/dev/null && hard_links=no
12705  touch conftest.a
12706  ln conftest.a conftest.b 2>&5 || hard_links=no
12707  ln conftest.a conftest.b 2>/dev/null && hard_links=no
12708  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5
12709printf "%s\n" "$hard_links" >&6; }
12710  if test no = "$hard_links"; then
12711    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&5
12712printf "%s\n" "$as_me: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&2;}
12713    need_locks=warn
12714  fi
12715else
12716  need_locks=no
12717fi
12718
12719
12720
12721
12722
12723
12724  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5
12725printf %s "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; }
12726
12727  runpath_var=
12728  allow_undefined_flag=
12729  always_export_symbols=no
12730  archive_cmds=
12731  archive_expsym_cmds=
12732  compiler_needs_object=no
12733  enable_shared_with_static_runtimes=no
12734  export_dynamic_flag_spec=
12735  export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
12736  hardcode_automatic=no
12737  hardcode_direct=no
12738  hardcode_direct_absolute=no
12739  hardcode_libdir_flag_spec=
12740  hardcode_libdir_separator=
12741  hardcode_minus_L=no
12742  hardcode_shlibpath_var=unsupported
12743  inherit_rpath=no
12744  link_all_deplibs=unknown
12745  module_cmds=
12746  module_expsym_cmds=
12747  old_archive_from_new_cmds=
12748  old_archive_from_expsyms_cmds=
12749  thread_safe_flag_spec=
12750  whole_archive_flag_spec=
12751  # include_expsyms should be a list of space-separated symbols to be *always*
12752  # included in the symbol list
12753  include_expsyms=
12754  # exclude_expsyms can be an extended regexp of symbols to exclude
12755  # it will be wrapped by ' (' and ')$', so one must not match beginning or
12756  # end of line.  Example: 'a|bc|.*d.*' will exclude the symbols 'a' and 'bc',
12757  # as well as any symbol that contains 'd'.
12758  exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'
12759  # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
12760  # platforms (ab)use it in PIC code, but their linkers get confused if
12761  # the symbol is explicitly referenced.  Since portable code cannot
12762  # rely on this symbol name, it's probably fine to never include it in
12763  # preloaded symbol tables.
12764  # Exclude shared library initialization/finalization symbols.
12765  extract_expsyms_cmds=
12766
12767  case $host_os in
12768  cygwin* | mingw* | windows* | pw32* | cegcc*)
12769    # FIXME: the MSVC++ and ICC port hasn't been tested in a loooong time
12770    # When not using gcc, we currently assume that we are using
12771    # Microsoft Visual C++ or Intel C++ Compiler.
12772    if test yes != "$GCC"; then
12773      with_gnu_ld=no
12774    fi
12775    ;;
12776  interix*)
12777    # we just hope/assume this is gcc and not c89 (= MSVC++ or ICC)
12778    with_gnu_ld=yes
12779    ;;
12780  esac
12781
12782  ld_shlibs=yes
12783
12784  # On some targets, GNU ld is compatible enough with the native linker
12785  # that we're better off using the native interface for both.
12786  lt_use_gnu_ld_interface=no
12787  if test yes = "$with_gnu_ld"; then
12788    case $host_os in
12789      aix*)
12790	# The AIX port of GNU ld has always aspired to compatibility
12791	# with the native linker.  However, as the warning in the GNU ld
12792	# block says, versions before 2.19.5* couldn't really create working
12793	# shared libraries, regardless of the interface used.
12794	case `$LD -v 2>&1` in
12795	  *\ \(GNU\ Binutils\)\ 2.19.5*) ;;
12796	  *\ \(GNU\ Binutils\)\ 2.[2-9]*) ;;
12797	  *\ \(GNU\ Binutils\)\ [3-9]*) ;;
12798	  *)
12799	    lt_use_gnu_ld_interface=yes
12800	    ;;
12801	esac
12802	;;
12803      *)
12804	lt_use_gnu_ld_interface=yes
12805	;;
12806    esac
12807  fi
12808
12809  if test yes = "$lt_use_gnu_ld_interface"; then
12810    # If archive_cmds runs LD, not CC, wlarc should be empty
12811    wlarc='$wl'
12812
12813    # Set some defaults for GNU ld with shared library support. These
12814    # are reset later if shared libraries are not supported. Putting them
12815    # here allows them to be overridden if necessary.
12816    runpath_var=LD_RUN_PATH
12817    hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
12818    export_dynamic_flag_spec='$wl--export-dynamic'
12819    # ancient GNU ld didn't support --whole-archive et. al.
12820    if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
12821      whole_archive_flag_spec=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
12822    else
12823      whole_archive_flag_spec=
12824    fi
12825    supports_anon_versioning=no
12826    case `$LD -v | $SED -e 's/([^)]\+)\s\+//' 2>&1` in
12827      *GNU\ gold*) supports_anon_versioning=yes ;;
12828      *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11
12829      *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
12830      *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
12831      *\ 2.11.*) ;; # other 2.11 versions
12832      *) supports_anon_versioning=yes ;;
12833    esac
12834
12835    # See if GNU ld supports shared libraries.
12836    case $host_os in
12837    aix[3-9]*)
12838      # On AIX/PPC, the GNU linker is very broken
12839      if test ia64 != "$host_cpu"; then
12840	ld_shlibs=no
12841	cat <<_LT_EOF 1>&2
12842
12843*** Warning: the GNU linker, at least up to release 2.19, is reported
12844*** to be unable to reliably create shared libraries on AIX.
12845*** Therefore, libtool is disabling shared libraries support.  If you
12846*** really care for shared libraries, you may want to install binutils
12847*** 2.20 or above, or modify your PATH so that a non-GNU linker is found.
12848*** You will then need to restart the configuration process.
12849
12850_LT_EOF
12851      fi
12852      ;;
12853
12854    amigaos*)
12855      case $host_cpu in
12856      powerpc)
12857            # see comment about AmigaOS4 .so support
12858            archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
12859            archive_expsym_cmds=''
12860        ;;
12861      m68k)
12862            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)'
12863            hardcode_libdir_flag_spec='-L$libdir'
12864            hardcode_minus_L=yes
12865        ;;
12866      esac
12867      ;;
12868
12869    beos*)
12870      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
12871	allow_undefined_flag=unsupported
12872	# Joseph Beckenbach <jrb3@best.com> says some releases of gcc
12873	# support --undefined.  This deserves some investigation.  FIXME
12874	archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
12875      else
12876	ld_shlibs=no
12877      fi
12878      ;;
12879
12880    cygwin* | mingw* | windows* | pw32* | cegcc*)
12881      # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless,
12882      # as there is no search path for DLLs.
12883      hardcode_libdir_flag_spec='-L$libdir'
12884      export_dynamic_flag_spec='$wl--export-all-symbols'
12885      allow_undefined_flag=unsupported
12886      always_export_symbols=no
12887      enable_shared_with_static_runtimes=yes
12888      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'
12889      exclude_expsyms='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'
12890      file_list_spec='@'
12891
12892      if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
12893        archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
12894	# If the export-symbols file already is a .def file, use it as
12895	# is; otherwise, prepend EXPORTS...
12896	archive_expsym_cmds='if   test DEF = "`$SED -n     -e '\''s/^[	 ]*//'\''     -e '\''/^\(;.*\)*$/d'\''     -e '\''s/^\(EXPORTS\|LIBRARY\)\([	 ].*\)*$/DEF/p'\''     -e q     $export_symbols`" ; then
12897          cp $export_symbols $output_objdir/$soname.def;
12898        else
12899          echo EXPORTS > $output_objdir/$soname.def;
12900          cat $export_symbols >> $output_objdir/$soname.def;
12901        fi~
12902        $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
12903      else
12904	ld_shlibs=no
12905      fi
12906      ;;
12907
12908    haiku*)
12909      archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
12910      link_all_deplibs=no
12911      ;;
12912
12913    os2*)
12914      hardcode_libdir_flag_spec='-L$libdir'
12915      hardcode_minus_L=yes
12916      allow_undefined_flag=unsupported
12917      shrext_cmds=.dll
12918      archive_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
12919	$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
12920	$ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
12921	$ECHO EXPORTS >> $output_objdir/$libname.def~
12922	emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
12923	$CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
12924	emximp -o $lib $output_objdir/$libname.def'
12925      archive_expsym_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
12926	$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
12927	$ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
12928	$ECHO EXPORTS >> $output_objdir/$libname.def~
12929	prefix_cmds="$SED"~
12930	if test EXPORTS = "`$SED 1q $export_symbols`"; then
12931	  prefix_cmds="$prefix_cmds -e 1d";
12932	fi~
12933	prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
12934	cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
12935	$CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
12936	emximp -o $lib $output_objdir/$libname.def'
12937      old_archive_from_new_cmds='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
12938      enable_shared_with_static_runtimes=yes
12939      file_list_spec='@'
12940      ;;
12941
12942    interix[3-9]*)
12943      hardcode_direct=no
12944      hardcode_shlibpath_var=no
12945      hardcode_libdir_flag_spec='$wl-rpath,$libdir'
12946      export_dynamic_flag_spec='$wl-E'
12947      # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
12948      # Instead, shared libraries are loaded at an image base (0x10000000 by
12949      # default) and relocated if they conflict, which is a slow very memory
12950      # consuming and fragmenting process.  To avoid this, we pick a random,
12951      # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
12952      # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
12953      archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
12954      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'
12955      ;;
12956
12957    gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
12958      tmp_diet=no
12959      if test linux-dietlibc = "$host_os"; then
12960	case $cc_basename in
12961	  diet\ *) tmp_diet=yes;;	# linux-dietlibc with static linking (!diet-dyn)
12962	esac
12963      fi
12964      if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
12965	 && test no = "$tmp_diet"
12966      then
12967	tmp_addflag=' $pic_flag'
12968	tmp_sharedflag='-shared'
12969	case $cc_basename,$host_cpu in
12970        pgcc*)				# Portland Group C compiler
12971	  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'
12972	  tmp_addflag=' $pic_flag'
12973	  ;;
12974	pgf77* | pgf90* | pgf95* | pgfortran*)
12975					# Portland Group f77 and f90 compilers
12976	  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'
12977	  tmp_addflag=' $pic_flag -Mnomain' ;;
12978	ecc*,ia64* | icc*,ia64*)	# Intel C compiler on ia64
12979	  tmp_addflag=' -i_dynamic' ;;
12980	efc*,ia64* | ifort*,ia64*)	# Intel Fortran compiler on ia64
12981	  tmp_addflag=' -i_dynamic -nofor_main' ;;
12982	ifc* | ifort*)			# Intel Fortran compiler
12983	  tmp_addflag=' -nofor_main' ;;
12984	lf95*)				# Lahey Fortran 8.1
12985	  whole_archive_flag_spec=
12986	  tmp_sharedflag='--shared' ;;
12987        nagfor*)                        # NAGFOR 5.3
12988          tmp_sharedflag='-Wl,-shared' ;;
12989	xl[cC]* | bgxl[cC]* | mpixl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below)
12990	  tmp_sharedflag='-qmkshrobj'
12991	  tmp_addflag= ;;
12992	nvcc*)	# Cuda Compiler Driver 2.2
12993	  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'
12994	  compiler_needs_object=yes
12995	  ;;
12996	esac
12997	case `$CC -V 2>&1 | $SED 5q` in
12998	*Sun\ C*)			# Sun C 5.9
12999	  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'
13000	  compiler_needs_object=yes
13001	  tmp_sharedflag='-G' ;;
13002	*Sun\ F*)			# Sun Fortran 8.3
13003	  tmp_sharedflag='-G' ;;
13004	esac
13005	archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
13006
13007        if test yes = "$supports_anon_versioning"; then
13008          archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~
13009            cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
13010            echo "local: *; };" >> $output_objdir/$libname.ver~
13011            $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib'
13012        fi
13013
13014	case $cc_basename in
13015	tcc*)
13016	  hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
13017	  export_dynamic_flag_spec='-rdynamic'
13018	  ;;
13019	xlf* | bgf* | bgxlf* | mpixlf*)
13020	  # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
13021	  whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive'
13022	  hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
13023	  archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
13024	  if test yes = "$supports_anon_versioning"; then
13025	    archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~
13026              cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
13027              echo "local: *; };" >> $output_objdir/$libname.ver~
13028              $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
13029	  fi
13030	  ;;
13031	esac
13032      else
13033        ld_shlibs=no
13034      fi
13035      ;;
13036
13037    *-mlibc)
13038	archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
13039	archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
13040      ;;
13041
13042    netbsd* | netbsdelf*-gnu)
13043      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
13044	archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
13045	wlarc=
13046      else
13047	archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
13048	archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
13049      fi
13050      ;;
13051
13052    solaris*)
13053      if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
13054	ld_shlibs=no
13055	cat <<_LT_EOF 1>&2
13056
13057*** Warning: The releases 2.8.* of the GNU linker cannot reliably
13058*** create shared libraries on Solaris systems.  Therefore, libtool
13059*** is disabling shared libraries support.  We urge you to upgrade GNU
13060*** binutils to release 2.9.1 or newer.  Another option is to modify
13061*** your PATH or compiler configuration so that the native linker is
13062*** used, and then restart.
13063
13064_LT_EOF
13065      elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
13066	archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
13067	archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
13068      else
13069	ld_shlibs=no
13070      fi
13071      ;;
13072
13073    sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
13074      case `$LD -v 2>&1` in
13075        *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*)
13076	ld_shlibs=no
13077	cat <<_LT_EOF 1>&2
13078
13079*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot
13080*** reliably create shared libraries on SCO systems.  Therefore, libtool
13081*** is disabling shared libraries support.  We urge you to upgrade GNU
13082*** binutils to release 2.16.91.0.3 or newer.  Another option is to modify
13083*** your PATH or compiler configuration so that the native linker is
13084*** used, and then restart.
13085
13086_LT_EOF
13087	;;
13088	*)
13089	  # For security reasons, it is highly recommended that you always
13090	  # use absolute paths for naming shared libraries, and exclude the
13091	  # DT_RUNPATH tag from executables and libraries.  But doing so
13092	  # requires that you compile everything twice, which is a pain.
13093	  if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
13094	    hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
13095	    archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
13096	    archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
13097	  else
13098	    ld_shlibs=no
13099	  fi
13100	;;
13101      esac
13102      ;;
13103
13104    sunos4*)
13105      archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
13106      wlarc=
13107      hardcode_direct=yes
13108      hardcode_shlibpath_var=no
13109      ;;
13110
13111    *)
13112      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
13113	archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
13114	archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
13115      else
13116	ld_shlibs=no
13117      fi
13118      ;;
13119    esac
13120
13121    if test no = "$ld_shlibs"; then
13122      runpath_var=
13123      hardcode_libdir_flag_spec=
13124      export_dynamic_flag_spec=
13125      whole_archive_flag_spec=
13126    fi
13127  else
13128    # PORTME fill in a description of your system's linker (not GNU ld)
13129    case $host_os in
13130    aix3*)
13131      allow_undefined_flag=unsupported
13132      always_export_symbols=yes
13133      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'
13134      # Note: this linker hardcodes the directories in LIBPATH if there
13135      # are no directories specified by -L.
13136      hardcode_minus_L=yes
13137      if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then
13138	# Neither direct hardcoding nor static linking is supported with a
13139	# broken collect2.
13140	hardcode_direct=unsupported
13141      fi
13142      ;;
13143
13144    aix[4-9]*)
13145      if test ia64 = "$host_cpu"; then
13146	# On IA64, the linker does run time linking by default, so we don't
13147	# have to do anything special.
13148	aix_use_runtimelinking=no
13149	exp_sym_flag='-Bexport'
13150	no_entry_flag=
13151      else
13152	# If we're using GNU nm, then we don't want the "-C" option.
13153	# -C means demangle to GNU nm, but means don't demangle to AIX nm.
13154	# Without the "-l" option, or with the "-B" option, AIX nm treats
13155	# weak defined symbols like other global defined symbols, whereas
13156	# GNU nm marks them as "W".
13157	# While the 'weak' keyword is ignored in the Export File, we need
13158	# it in the Import File for the 'aix-soname' feature, so we have
13159	# to replace the "-B" option with "-P" for AIX nm.
13160	if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
13161	  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'
13162	else
13163	  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 == "L") || (\$ 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'
13164	fi
13165	aix_use_runtimelinking=no
13166
13167	# Test if we are trying to use run time linking or normal
13168	# AIX style linking. If -brtl is somewhere in LDFLAGS, we
13169	# have runtime linking enabled, and use it for executables.
13170	# For shared libraries, we enable/disable runtime linking
13171	# depending on the kind of the shared library created -
13172	# when "with_aix_soname,aix_use_runtimelinking" is:
13173	# "aix,no"   lib.a(lib.so.V) shared, rtl:no,  for executables
13174	# "aix,yes"  lib.so          shared, rtl:yes, for executables
13175	#            lib.a           static archive
13176	# "both,no"  lib.so.V(shr.o) shared, rtl:yes
13177	#            lib.a(lib.so.V) shared, rtl:no,  for executables
13178	# "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables
13179	#            lib.a(lib.so.V) shared, rtl:no
13180	# "svr4,*"   lib.so.V(shr.o) shared, rtl:yes, for executables
13181	#            lib.a           static archive
13182	case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*)
13183	  for ld_flag in $LDFLAGS; do
13184	  if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then
13185	    aix_use_runtimelinking=yes
13186	    break
13187	  fi
13188	  done
13189	  if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then
13190	    # With aix-soname=svr4, we create the lib.so.V shared archives only,
13191	    # so we don't have lib.a shared libs to link our executables.
13192	    # We have to force runtime linking in this case.
13193	    aix_use_runtimelinking=yes
13194	    LDFLAGS="$LDFLAGS -Wl,-brtl"
13195	  fi
13196	  ;;
13197	esac
13198
13199	exp_sym_flag='-bexport'
13200	no_entry_flag='-bnoentry'
13201      fi
13202
13203      # When large executables or shared objects are built, AIX ld can
13204      # have problems creating the table of contents.  If linking a library
13205      # or program results in "error TOC overflow" add -mminimal-toc to
13206      # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
13207      # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
13208
13209      archive_cmds=''
13210      hardcode_direct=yes
13211      hardcode_direct_absolute=yes
13212      hardcode_libdir_separator=':'
13213      link_all_deplibs=yes
13214      file_list_spec='$wl-f,'
13215      case $with_aix_soname,$aix_use_runtimelinking in
13216      aix,*) ;; # traditional, no import file
13217      svr4,* | *,yes) # use import file
13218	# The Import File defines what to hardcode.
13219	hardcode_direct=no
13220	hardcode_direct_absolute=no
13221	;;
13222      esac
13223
13224      if test yes = "$GCC"; then
13225	case $host_os in aix4.[012]|aix4.[012].*)
13226	# We only want to do this on AIX 4.2 and lower, the check
13227	# below for broken collect2 doesn't work under 4.3+
13228	  collect2name=`$CC -print-prog-name=collect2`
13229	  if test -f "$collect2name" &&
13230	   strings "$collect2name" | $GREP resolve_lib_name >/dev/null
13231	  then
13232	  # We have reworked collect2
13233	  :
13234	  else
13235	  # We have old collect2
13236	  hardcode_direct=unsupported
13237	  # It fails to find uninstalled libraries when the uninstalled
13238	  # path is not listed in the libpath.  Setting hardcode_minus_L
13239	  # to unsupported forces relinking
13240	  hardcode_minus_L=yes
13241	  hardcode_libdir_flag_spec='-L$libdir'
13242	  hardcode_libdir_separator=
13243	  fi
13244	  ;;
13245	esac
13246	shared_flag='-shared'
13247	if test yes = "$aix_use_runtimelinking"; then
13248	  shared_flag="$shared_flag "'$wl-G'
13249	fi
13250	# Need to ensure runtime linking is disabled for the traditional
13251	# shared library, or the linker may eventually find shared libraries
13252	# /with/ Import File - we do not want to mix them.
13253	shared_flag_aix='-shared'
13254	shared_flag_svr4='-shared $wl-G'
13255      else
13256	# not using gcc
13257	if test ia64 = "$host_cpu"; then
13258	# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
13259	# chokes on -Wl,-G. The following line is correct:
13260	  shared_flag='-G'
13261	else
13262	  if test yes = "$aix_use_runtimelinking"; then
13263	    shared_flag='$wl-G'
13264	  else
13265	    shared_flag='$wl-bM:SRE'
13266	  fi
13267	  shared_flag_aix='$wl-bM:SRE'
13268	  shared_flag_svr4='$wl-G'
13269	fi
13270      fi
13271
13272      export_dynamic_flag_spec='$wl-bexpall'
13273      # It seems that -bexpall does not export symbols beginning with
13274      # underscore (_), so it is better to generate a list of symbols to export.
13275      always_export_symbols=yes
13276      if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then
13277	# Warning - without using the other runtime loading flags (-brtl),
13278	# -berok will link without error, but may produce a broken library.
13279	allow_undefined_flag='-berok'
13280        # Determine the default libpath from the value encoded in an
13281        # empty executable.
13282        if test set = "${lt_cv_aix_libpath+set}"; then
13283  aix_libpath=$lt_cv_aix_libpath
13284else
13285  if test ${lt_cv_aix_libpath_+y}
13286then :
13287  printf %s "(cached) " >&6
13288else $as_nop
13289  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13290/* end confdefs.h.  */
13291
13292int
13293main (void)
13294{
13295
13296  ;
13297  return 0;
13298}
13299_ACEOF
13300if ac_fn_c_try_link "$LINENO"
13301then :
13302
13303  lt_aix_libpath_sed='
13304      /Import File Strings/,/^$/ {
13305	  /^0/ {
13306	      s/^0  *\([^ ]*\) *$/\1/
13307	      p
13308	  }
13309      }'
13310  lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
13311  # Check for a 64-bit object if we didn't find anything.
13312  if test -z "$lt_cv_aix_libpath_"; then
13313    lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
13314  fi
13315fi
13316rm -f core conftest.err conftest.$ac_objext conftest.beam \
13317    conftest$ac_exeext conftest.$ac_ext
13318  if test -z "$lt_cv_aix_libpath_"; then
13319    lt_cv_aix_libpath_=/usr/lib:/lib
13320  fi
13321
13322fi
13323
13324  aix_libpath=$lt_cv_aix_libpath_
13325fi
13326
13327        hardcode_libdir_flag_spec='$wl-blibpath:$libdir:'"$aix_libpath"
13328        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
13329      else
13330	if test ia64 = "$host_cpu"; then
13331	  hardcode_libdir_flag_spec='$wl-R $libdir:/usr/lib:/lib'
13332	  allow_undefined_flag="-z nodefs"
13333	  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"
13334	else
13335	 # Determine the default libpath from the value encoded in an
13336	 # empty executable.
13337	 if test set = "${lt_cv_aix_libpath+set}"; then
13338  aix_libpath=$lt_cv_aix_libpath
13339else
13340  if test ${lt_cv_aix_libpath_+y}
13341then :
13342  printf %s "(cached) " >&6
13343else $as_nop
13344  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13345/* end confdefs.h.  */
13346
13347int
13348main (void)
13349{
13350
13351  ;
13352  return 0;
13353}
13354_ACEOF
13355if ac_fn_c_try_link "$LINENO"
13356then :
13357
13358  lt_aix_libpath_sed='
13359      /Import File Strings/,/^$/ {
13360	  /^0/ {
13361	      s/^0  *\([^ ]*\) *$/\1/
13362	      p
13363	  }
13364      }'
13365  lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
13366  # Check for a 64-bit object if we didn't find anything.
13367  if test -z "$lt_cv_aix_libpath_"; then
13368    lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
13369  fi
13370fi
13371rm -f core conftest.err conftest.$ac_objext conftest.beam \
13372    conftest$ac_exeext conftest.$ac_ext
13373  if test -z "$lt_cv_aix_libpath_"; then
13374    lt_cv_aix_libpath_=/usr/lib:/lib
13375  fi
13376
13377fi
13378
13379  aix_libpath=$lt_cv_aix_libpath_
13380fi
13381
13382	 hardcode_libdir_flag_spec='$wl-blibpath:$libdir:'"$aix_libpath"
13383	  # Warning - without using the other run time loading flags,
13384	  # -berok will link without error, but may produce a broken library.
13385	  no_undefined_flag=' $wl-bernotok'
13386	  allow_undefined_flag=' $wl-berok'
13387	  if test yes = "$with_gnu_ld"; then
13388	    # We only use this code for GNU lds that support --whole-archive.
13389	    whole_archive_flag_spec='$wl--whole-archive$convenience $wl--no-whole-archive'
13390	  else
13391	    # Exported symbols can be pulled into shared objects from archives
13392	    whole_archive_flag_spec='$convenience'
13393	  fi
13394	  archive_cmds_need_lc=yes
13395	  archive_expsym_cmds='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d'
13396	  # -brtl affects multiple linker settings, -berok does not and is overridden later
13397	  compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([, ]\\)%-berok\\1%g"`'
13398	  if test svr4 != "$with_aix_soname"; then
13399	    # This is similar to how AIX traditionally builds its shared libraries.
13400	    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'
13401	  fi
13402	  if test aix != "$with_aix_soname"; then
13403	    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'
13404	  else
13405	    # used by -dlpreopen to get the symbols
13406	    archive_expsym_cmds="$archive_expsym_cmds"'~$MV  $output_objdir/$realname.d/$soname $output_objdir'
13407	  fi
13408	  archive_expsym_cmds="$archive_expsym_cmds"'~$RM -r $output_objdir/$realname.d'
13409	fi
13410      fi
13411      ;;
13412
13413    amigaos*)
13414      case $host_cpu in
13415      powerpc)
13416            # see comment about AmigaOS4 .so support
13417            archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
13418            archive_expsym_cmds=''
13419        ;;
13420      m68k)
13421            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)'
13422            hardcode_libdir_flag_spec='-L$libdir'
13423            hardcode_minus_L=yes
13424        ;;
13425      esac
13426      ;;
13427
13428    bsdi[45]*)
13429      export_dynamic_flag_spec=-rdynamic
13430      ;;
13431
13432    cygwin* | mingw* | windows* | pw32* | cegcc*)
13433      # When not using gcc, we currently assume that we are using
13434      # Microsoft Visual C++ or Intel C++ Compiler.
13435      # hardcode_libdir_flag_spec is actually meaningless, as there is
13436      # no search path for DLLs.
13437      case $cc_basename in
13438      cl* | icl*)
13439	# Native MSVC or ICC
13440	hardcode_libdir_flag_spec=' '
13441	allow_undefined_flag=unsupported
13442	always_export_symbols=yes
13443	file_list_spec='@'
13444	# Tell ltmain to make .lib files, not .a files.
13445	libext=lib
13446	# Tell ltmain to make .dll files, not .so files.
13447	shrext_cmds=.dll
13448	# FIXME: Setting linknames here is a bad hack.
13449	archive_cmds='$CC -Fe$output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames='
13450	archive_expsym_cmds='if   test DEF = "`$SED -n     -e '\''s/^[	 ]*//'\''     -e '\''/^\(;.*\)*$/d'\''     -e '\''s/^\(EXPORTS\|LIBRARY\)\([	 ].*\)*$/DEF/p'\''     -e q     $export_symbols`" ; then
13451            cp "$export_symbols" "$output_objdir/$soname.def";
13452            echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp";
13453          else
13454            $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp;
13455          fi~
13456          $CC -Fe$tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
13457          linknames='
13458	# The linker will not automatically build a static lib if we build a DLL.
13459	# _LT_TAGVAR(old_archive_from_new_cmds, )='true'
13460	enable_shared_with_static_runtimes=yes
13461	exclude_expsyms='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
13462	export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1,DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols'
13463	# Don't use ranlib
13464	old_postinstall_cmds='chmod 644 $oldlib'
13465	postlink_cmds='lt_outputfile="@OUTPUT@"~
13466          lt_tool_outputfile="@TOOL_OUTPUT@"~
13467          case $lt_outputfile in
13468            *.exe|*.EXE) ;;
13469            *)
13470              lt_outputfile=$lt_outputfile.exe
13471              lt_tool_outputfile=$lt_tool_outputfile.exe
13472              ;;
13473          esac~
13474          if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then
13475            $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
13476            $RM "$lt_outputfile.manifest";
13477          fi'
13478	;;
13479      *)
13480	# Assume MSVC and ICC wrapper
13481	hardcode_libdir_flag_spec=' '
13482	allow_undefined_flag=unsupported
13483	# Tell ltmain to make .lib files, not .a files.
13484	libext=lib
13485	# Tell ltmain to make .dll files, not .so files.
13486	shrext_cmds=.dll
13487	# FIXME: Setting linknames here is a bad hack.
13488	archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
13489	# The linker will automatically build a .lib file if we build a DLL.
13490	old_archive_from_new_cmds='true'
13491	# FIXME: Should let the user specify the lib program.
13492	old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs'
13493	enable_shared_with_static_runtimes=yes
13494	;;
13495      esac
13496      ;;
13497
13498    darwin* | rhapsody*)
13499
13500
13501  archive_cmds_need_lc=no
13502  hardcode_direct=no
13503  hardcode_automatic=yes
13504  hardcode_shlibpath_var=unsupported
13505  if test yes = "$lt_cv_ld_force_load"; then
13506    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\"`'
13507
13508  else
13509    whole_archive_flag_spec=''
13510  fi
13511  link_all_deplibs=yes
13512  allow_undefined_flag=$_lt_dar_allow_undefined
13513  case $cc_basename in
13514     ifort*|nagfor*) _lt_dar_can_shared=yes ;;
13515     *) _lt_dar_can_shared=$GCC ;;
13516  esac
13517  if test yes = "$_lt_dar_can_shared"; then
13518    output_verbose_link_cmd=func_echo_all
13519    archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dsymutil"
13520    module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil"
13521    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"
13522    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"
13523
13524  else
13525  ld_shlibs=no
13526  fi
13527
13528      ;;
13529
13530    dgux*)
13531      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
13532      hardcode_libdir_flag_spec='-L$libdir'
13533      hardcode_shlibpath_var=no
13534      ;;
13535
13536    # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
13537    # support.  Future versions do this automatically, but an explicit c++rt0.o
13538    # does not break anything, and helps significantly (at the cost of a little
13539    # extra space).
13540    freebsd2.2*)
13541      archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
13542      hardcode_libdir_flag_spec='-R$libdir'
13543      hardcode_direct=yes
13544      hardcode_shlibpath_var=no
13545      ;;
13546
13547    # Unfortunately, older versions of FreeBSD 2 do not have this feature.
13548    freebsd2.*)
13549      archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
13550      hardcode_direct=yes
13551      hardcode_minus_L=yes
13552      hardcode_shlibpath_var=no
13553      ;;
13554
13555    # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
13556    freebsd* | dragonfly* | midnightbsd*)
13557      archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
13558      hardcode_libdir_flag_spec='-R$libdir'
13559      hardcode_direct=yes
13560      hardcode_shlibpath_var=no
13561      ;;
13562
13563    hpux9*)
13564      if test yes = "$GCC"; then
13565	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'
13566      else
13567	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'
13568      fi
13569      hardcode_libdir_flag_spec='$wl+b $wl$libdir'
13570      hardcode_libdir_separator=:
13571      hardcode_direct=yes
13572
13573      # hardcode_minus_L: Not really in the search PATH,
13574      # but as the default location of the library.
13575      hardcode_minus_L=yes
13576      export_dynamic_flag_spec='$wl-E'
13577      ;;
13578
13579    hpux10*)
13580      if test yes,no = "$GCC,$with_gnu_ld"; then
13581	archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
13582      else
13583	archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
13584      fi
13585      if test no = "$with_gnu_ld"; then
13586	hardcode_libdir_flag_spec='$wl+b $wl$libdir'
13587	hardcode_libdir_separator=:
13588	hardcode_direct=yes
13589	hardcode_direct_absolute=yes
13590	export_dynamic_flag_spec='$wl-E'
13591	# hardcode_minus_L: Not really in the search PATH,
13592	# but as the default location of the library.
13593	hardcode_minus_L=yes
13594      fi
13595      ;;
13596
13597    hpux11*)
13598      if test yes,no = "$GCC,$with_gnu_ld"; then
13599	case $host_cpu in
13600	hppa*64*)
13601	  archive_cmds='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
13602	  ;;
13603	ia64*)
13604	  archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
13605	  ;;
13606	*)
13607	  archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
13608	  ;;
13609	esac
13610      else
13611	case $host_cpu in
13612	hppa*64*)
13613	  archive_cmds='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
13614	  ;;
13615	ia64*)
13616	  archive_cmds='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
13617	  ;;
13618	*)
13619
13620	  # Older versions of the 11.00 compiler do not understand -b yet
13621	  # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does)
13622	  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC understands -b" >&5
13623printf %s "checking if $CC understands -b... " >&6; }
13624if test ${lt_cv_prog_compiler__b+y}
13625then :
13626  printf %s "(cached) " >&6
13627else $as_nop
13628  lt_cv_prog_compiler__b=no
13629   save_LDFLAGS=$LDFLAGS
13630   LDFLAGS="$LDFLAGS -b"
13631   echo "$lt_simple_link_test_code" > conftest.$ac_ext
13632   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
13633     # The linker can only warn and ignore the option if not recognized
13634     # So say no if there are warnings
13635     if test -s conftest.err; then
13636       # Append any errors to the config.log.
13637       cat conftest.err 1>&5
13638       $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
13639       $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
13640       if diff conftest.exp conftest.er2 >/dev/null; then
13641         lt_cv_prog_compiler__b=yes
13642       fi
13643     else
13644       lt_cv_prog_compiler__b=yes
13645     fi
13646   fi
13647   $RM -r conftest*
13648   LDFLAGS=$save_LDFLAGS
13649
13650fi
13651{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler__b" >&5
13652printf "%s\n" "$lt_cv_prog_compiler__b" >&6; }
13653
13654if test yes = "$lt_cv_prog_compiler__b"; then
13655    archive_cmds='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
13656else
13657    archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
13658fi
13659
13660	  ;;
13661	esac
13662      fi
13663      if test no = "$with_gnu_ld"; then
13664	hardcode_libdir_flag_spec='$wl+b $wl$libdir'
13665	hardcode_libdir_separator=:
13666
13667	case $host_cpu in
13668	hppa*64*|ia64*)
13669	  hardcode_direct=no
13670	  hardcode_shlibpath_var=no
13671	  ;;
13672	*)
13673	  hardcode_direct=yes
13674	  hardcode_direct_absolute=yes
13675	  export_dynamic_flag_spec='$wl-E'
13676
13677	  # hardcode_minus_L: Not really in the search PATH,
13678	  # but as the default location of the library.
13679	  hardcode_minus_L=yes
13680	  ;;
13681	esac
13682      fi
13683      ;;
13684
13685    irix5* | irix6* | nonstopux*)
13686      if test yes = "$GCC"; then
13687	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'
13688	# Try to use the -exported_symbol ld option, if it does not
13689	# work, assume that -exports_file does not work either and
13690	# implicitly export all symbols.
13691	# This should be the same for all languages, so no per-tag cache variable.
13692	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5
13693printf %s "checking whether the $host_os linker accepts -exported_symbol... " >&6; }
13694if test ${lt_cv_irix_exported_symbol+y}
13695then :
13696  printf %s "(cached) " >&6
13697else $as_nop
13698  save_LDFLAGS=$LDFLAGS
13699	   LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null"
13700	   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13701/* end confdefs.h.  */
13702int foo (void) { return 0; }
13703_ACEOF
13704if ac_fn_c_try_link "$LINENO"
13705then :
13706  lt_cv_irix_exported_symbol=yes
13707else $as_nop
13708  lt_cv_irix_exported_symbol=no
13709fi
13710rm -f core conftest.err conftest.$ac_objext conftest.beam \
13711    conftest$ac_exeext conftest.$ac_ext
13712           LDFLAGS=$save_LDFLAGS
13713fi
13714{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5
13715printf "%s\n" "$lt_cv_irix_exported_symbol" >&6; }
13716	if test yes = "$lt_cv_irix_exported_symbol"; then
13717          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'
13718	fi
13719      else
13720	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'
13721	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'
13722      fi
13723      archive_cmds_need_lc='no'
13724      hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
13725      hardcode_libdir_separator=:
13726      inherit_rpath=yes
13727      link_all_deplibs=yes
13728      ;;
13729
13730    linux*)
13731      case $cc_basename in
13732      tcc*)
13733	# Fabrice Bellard et al's Tiny C Compiler
13734	ld_shlibs=yes
13735	archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
13736	hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
13737	;;
13738      esac
13739      ;;
13740
13741    *-mlibc)
13742      ;;
13743
13744    netbsd* | netbsdelf*-gnu)
13745      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
13746	archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
13747      else
13748	archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
13749      fi
13750      hardcode_libdir_flag_spec='-R$libdir'
13751      hardcode_direct=yes
13752      hardcode_shlibpath_var=no
13753      ;;
13754
13755    newsos6)
13756      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
13757      hardcode_direct=yes
13758      hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
13759      hardcode_libdir_separator=:
13760      hardcode_shlibpath_var=no
13761      ;;
13762
13763    *nto* | *qnx*)
13764      ;;
13765
13766    openbsd*)
13767      if test -f /usr/libexec/ld.so; then
13768	hardcode_direct=yes
13769	hardcode_shlibpath_var=no
13770	hardcode_direct_absolute=yes
13771	if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
13772	  archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
13773	  archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols'
13774	  hardcode_libdir_flag_spec='$wl-rpath,$libdir'
13775	  export_dynamic_flag_spec='$wl-E'
13776	else
13777	  archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
13778	  hardcode_libdir_flag_spec='$wl-rpath,$libdir'
13779	fi
13780      else
13781	ld_shlibs=no
13782      fi
13783      ;;
13784
13785    os2*)
13786      hardcode_libdir_flag_spec='-L$libdir'
13787      hardcode_minus_L=yes
13788      allow_undefined_flag=unsupported
13789      shrext_cmds=.dll
13790      archive_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
13791	$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
13792	$ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
13793	$ECHO EXPORTS >> $output_objdir/$libname.def~
13794	emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
13795	$CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
13796	emximp -o $lib $output_objdir/$libname.def'
13797      archive_expsym_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
13798	$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
13799	$ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
13800	$ECHO EXPORTS >> $output_objdir/$libname.def~
13801	prefix_cmds="$SED"~
13802	if test EXPORTS = "`$SED 1q $export_symbols`"; then
13803	  prefix_cmds="$prefix_cmds -e 1d";
13804	fi~
13805	prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
13806	cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
13807	$CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
13808	emximp -o $lib $output_objdir/$libname.def'
13809      old_archive_from_new_cmds='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
13810      enable_shared_with_static_runtimes=yes
13811      file_list_spec='@'
13812      ;;
13813
13814    osf3*)
13815      if test yes = "$GCC"; then
13816	allow_undefined_flag=' $wl-expect_unresolved $wl\*'
13817	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'
13818      else
13819	allow_undefined_flag=' -expect_unresolved \*'
13820	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'
13821      fi
13822      archive_cmds_need_lc='no'
13823      hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
13824      hardcode_libdir_separator=:
13825      ;;
13826
13827    osf4* | osf5*)	# as osf3* with the addition of -msym flag
13828      if test yes = "$GCC"; then
13829	allow_undefined_flag=' $wl-expect_unresolved $wl\*'
13830	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'
13831	hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
13832      else
13833	allow_undefined_flag=' -expect_unresolved \*'
13834	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'
13835	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~
13836          $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'
13837
13838	# Both c and cxx compiler support -rpath directly
13839	hardcode_libdir_flag_spec='-rpath $libdir'
13840      fi
13841      archive_cmds_need_lc='no'
13842      hardcode_libdir_separator=:
13843      ;;
13844
13845    serenity*)
13846      ;;
13847
13848    solaris*)
13849      no_undefined_flag=' -z defs'
13850      if test yes = "$GCC"; then
13851	wlarc='$wl'
13852	archive_cmds='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
13853	archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
13854          $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'
13855      else
13856	case `$CC -V 2>&1` in
13857	*"Compilers 5.0"*)
13858	  wlarc=''
13859	  archive_cmds='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags'
13860	  archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
13861            $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
13862	  ;;
13863	*)
13864	  wlarc='$wl'
13865	  archive_cmds='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags'
13866	  archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
13867            $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
13868	  ;;
13869	esac
13870      fi
13871      hardcode_libdir_flag_spec='-R$libdir'
13872      hardcode_shlibpath_var=no
13873      case $host_os in
13874      solaris2.[0-5] | solaris2.[0-5].*) ;;
13875      *)
13876	# The compiler driver will combine and reorder linker options,
13877	# but understands '-z linker_flag'.  GCC discards it without '$wl',
13878	# but is careful enough not to reorder.
13879	# Supported since Solaris 2.6 (maybe 2.5.1?)
13880	if test yes = "$GCC"; then
13881	  whole_archive_flag_spec='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract'
13882	else
13883	  whole_archive_flag_spec='-z allextract$convenience -z defaultextract'
13884	fi
13885	;;
13886      esac
13887      link_all_deplibs=yes
13888      ;;
13889
13890    sunos4*)
13891      if test sequent = "$host_vendor"; then
13892	# Use $CC to link under sequent, because it throws in some extra .o
13893	# files that make .init and .fini sections work.
13894	archive_cmds='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags'
13895      else
13896	archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
13897      fi
13898      hardcode_libdir_flag_spec='-L$libdir'
13899      hardcode_direct=yes
13900      hardcode_minus_L=yes
13901      hardcode_shlibpath_var=no
13902      ;;
13903
13904    sysv4)
13905      case $host_vendor in
13906	sni)
13907	  archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
13908	  hardcode_direct=yes # is this really true???
13909	;;
13910	siemens)
13911	  ## LD is ld it makes a PLAMLIB
13912	  ## CC just makes a GrossModule.
13913	  archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
13914	  reload_cmds='$CC -r -o $output$reload_objs'
13915	  hardcode_direct=no
13916        ;;
13917	motorola)
13918	  archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
13919	  hardcode_direct=no #Motorola manual says yes, but my tests say they lie
13920	;;
13921      esac
13922      runpath_var='LD_RUN_PATH'
13923      hardcode_shlibpath_var=no
13924      ;;
13925
13926    sysv4.3*)
13927      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
13928      hardcode_shlibpath_var=no
13929      export_dynamic_flag_spec='-Bexport'
13930      ;;
13931
13932    sysv4*MP*)
13933      if test -d /usr/nec; then
13934	archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
13935	hardcode_shlibpath_var=no
13936	runpath_var=LD_RUN_PATH
13937	hardcode_runpath_var=yes
13938	ld_shlibs=yes
13939      fi
13940      ;;
13941
13942    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*)
13943      no_undefined_flag='$wl-z,text'
13944      archive_cmds_need_lc=no
13945      hardcode_shlibpath_var=no
13946      runpath_var='LD_RUN_PATH'
13947
13948      if test yes = "$GCC"; then
13949	archive_cmds='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
13950	archive_expsym_cmds='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
13951      else
13952	archive_cmds='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
13953	archive_expsym_cmds='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
13954      fi
13955      ;;
13956
13957    sysv5* | sco3.2v5* | sco5v6*)
13958      # Note: We CANNOT use -z defs as we might desire, because we do not
13959      # link with -lc, and that would cause any symbols used from libc to
13960      # always be unresolved, which means just about no library would
13961      # ever link correctly.  If we're not using GNU ld we use -z text
13962      # though, which does catch some bad symbols but isn't as heavy-handed
13963      # as -z defs.
13964      no_undefined_flag='$wl-z,text'
13965      allow_undefined_flag='$wl-z,nodefs'
13966      archive_cmds_need_lc=no
13967      hardcode_shlibpath_var=no
13968      hardcode_libdir_flag_spec='$wl-R,$libdir'
13969      hardcode_libdir_separator=':'
13970      link_all_deplibs=yes
13971      export_dynamic_flag_spec='$wl-Bexport'
13972      runpath_var='LD_RUN_PATH'
13973
13974      if test yes = "$GCC"; then
13975	archive_cmds='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
13976	archive_expsym_cmds='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
13977      else
13978	archive_cmds='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
13979	archive_expsym_cmds='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
13980      fi
13981      ;;
13982
13983    uts4*)
13984      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
13985      hardcode_libdir_flag_spec='-L$libdir'
13986      hardcode_shlibpath_var=no
13987      ;;
13988
13989    *)
13990      ld_shlibs=no
13991      ;;
13992    esac
13993
13994    if test sni = "$host_vendor"; then
13995      case $host in
13996      sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
13997	export_dynamic_flag_spec='$wl-Blargedynsym'
13998	;;
13999      esac
14000    fi
14001  fi
14002
14003{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5
14004printf "%s\n" "$ld_shlibs" >&6; }
14005test no = "$ld_shlibs" && can_build_shared=no
14006
14007with_gnu_ld=$with_gnu_ld
14008
14009
14010
14011
14012
14013
14014
14015
14016
14017
14018
14019
14020
14021
14022
14023#
14024# Do we need to explicitly link libc?
14025#
14026case "x$archive_cmds_need_lc" in
14027x|xyes)
14028  # Assume -lc should be added
14029  archive_cmds_need_lc=yes
14030
14031  if test yes,yes = "$GCC,$enable_shared"; then
14032    case $archive_cmds in
14033    *'~'*)
14034      # FIXME: we may have to deal with multi-command sequences.
14035      ;;
14036    '$CC '*)
14037      # Test whether the compiler implicitly links with -lc since on some
14038      # systems, -lgcc has to come before -lc. If gcc already passes -lc
14039      # to ld, don't add -lc before -lgcc.
14040      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5
14041printf %s "checking whether -lc should be explicitly linked in... " >&6; }
14042if test ${lt_cv_archive_cmds_need_lc+y}
14043then :
14044  printf %s "(cached) " >&6
14045else $as_nop
14046  $RM conftest*
14047	echo "$lt_simple_compile_test_code" > conftest.$ac_ext
14048
14049	if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
14050  (eval $ac_compile) 2>&5
14051  ac_status=$?
14052  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
14053  test $ac_status = 0; } 2>conftest.err; then
14054	  soname=conftest
14055	  lib=conftest
14056	  libobjs=conftest.$ac_objext
14057	  deplibs=
14058	  wl=$lt_prog_compiler_wl
14059	  pic_flag=$lt_prog_compiler_pic
14060	  compiler_flags=-v
14061	  linker_flags=-v
14062	  verstring=
14063	  output_objdir=.
14064	  libname=conftest
14065	  lt_save_allow_undefined_flag=$allow_undefined_flag
14066	  allow_undefined_flag=
14067	  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5
14068  (eval $archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5
14069  ac_status=$?
14070  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
14071  test $ac_status = 0; }
14072	  then
14073	    lt_cv_archive_cmds_need_lc=no
14074	  else
14075	    lt_cv_archive_cmds_need_lc=yes
14076	  fi
14077	  allow_undefined_flag=$lt_save_allow_undefined_flag
14078	else
14079	  cat conftest.err 1>&5
14080	fi
14081	$RM conftest*
14082
14083fi
14084{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc" >&5
14085printf "%s\n" "$lt_cv_archive_cmds_need_lc" >&6; }
14086      archive_cmds_need_lc=$lt_cv_archive_cmds_need_lc
14087      ;;
14088    esac
14089  fi
14090  ;;
14091esac
14092
14093
14094
14095
14096
14097
14098
14099
14100
14101
14102
14103
14104
14105
14106
14107
14108
14109
14110
14111
14112
14113
14114
14115
14116
14117
14118
14119
14120
14121
14122
14123
14124
14125
14126
14127
14128
14129
14130
14131
14132
14133
14134
14135
14136
14137
14138
14139
14140
14141
14142
14143
14144
14145
14146
14147
14148
14149
14150
14151
14152
14153
14154
14155
14156
14157
14158
14159
14160
14161
14162
14163
14164
14165
14166
14167
14168
14169
14170
14171
14172
14173
14174
14175
14176
14177
14178
14179
14180
14181
14182
14183
14184
14185
14186
14187
14188
14189
14190
14191
14192
14193
14194
14195
14196
14197
14198
14199
14200
14201
14202
14203
14204
14205
14206
14207
14208
14209
14210
14211
14212
14213
14214
14215
14216
14217
14218
14219
14220
14221
14222
14223
14224
14225
14226
14227
14228
14229
14230
14231
14232
14233
14234
14235
14236
14237
14238
14239
14240
14241
14242
14243
14244  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5
14245printf %s "checking dynamic linker characteristics... " >&6; }
14246
14247if test yes = "$GCC"; then
14248  case $host_os in
14249    darwin*) lt_awk_arg='/^libraries:/,/LR/' ;;
14250    *) lt_awk_arg='/^libraries:/' ;;
14251  esac
14252  case $host_os in
14253    mingw* | windows* | cegcc*) lt_sed_strip_eq='s|=\([A-Za-z]:\)|\1|g' ;;
14254    *) lt_sed_strip_eq='s|=/|/|g' ;;
14255  esac
14256  lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq`
14257  case $lt_search_path_spec in
14258  *\;*)
14259    # if the path contains ";" then we assume it to be the separator
14260    # otherwise default to the standard path separator (i.e. ":") - it is
14261    # assumed that no part of a normal pathname contains ";" but that should
14262    # okay in the real world where ";" in dirpaths is itself problematic.
14263    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'`
14264    ;;
14265  *)
14266    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"`
14267    ;;
14268  esac
14269  # Ok, now we have the path, separated by spaces, we can step through it
14270  # and add multilib dir if necessary...
14271  lt_tmp_lt_search_path_spec=
14272  lt_multi_os_dir=/`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
14273  # ...but if some path component already ends with the multilib dir we assume
14274  # that all is fine and trust -print-search-dirs as is (GCC 4.2? or newer).
14275  case "$lt_multi_os_dir; $lt_search_path_spec " in
14276  "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*)
14277    lt_multi_os_dir=
14278    ;;
14279  esac
14280  for lt_sys_path in $lt_search_path_spec; do
14281    if test -d "$lt_sys_path$lt_multi_os_dir"; then
14282      lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path$lt_multi_os_dir"
14283    elif test -n "$lt_multi_os_dir"; then
14284      test -d "$lt_sys_path" && \
14285	lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
14286    fi
14287  done
14288  lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk '
14289BEGIN {RS = " "; FS = "/|\n";} {
14290  lt_foo = "";
14291  lt_count = 0;
14292  for (lt_i = NF; lt_i > 0; lt_i--) {
14293    if ($lt_i != "" && $lt_i != ".") {
14294      if ($lt_i == "..") {
14295        lt_count++;
14296      } else {
14297        if (lt_count == 0) {
14298          lt_foo = "/" $lt_i lt_foo;
14299        } else {
14300          lt_count--;
14301        }
14302      }
14303    }
14304  }
14305  if (lt_foo != "") { lt_freq[lt_foo]++; }
14306  if (lt_freq[lt_foo] == 1) { print lt_foo; }
14307}'`
14308  # AWK program above erroneously prepends '/' to C:/dos/paths
14309  # for these hosts.
14310  case $host_os in
14311    mingw* | windows* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\
14312      $SED 's|/\([A-Za-z]:\)|\1|g'` ;;
14313  esac
14314  sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP`
14315else
14316  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
14317fi
14318library_names_spec=
14319libname_spec='lib$name'
14320soname_spec=
14321shrext_cmds=.so
14322postinstall_cmds=
14323postuninstall_cmds=
14324finish_cmds=
14325finish_eval=
14326shlibpath_var=
14327shlibpath_overrides_runpath=unknown
14328version_type=none
14329dynamic_linker="$host_os ld.so"
14330sys_lib_dlsearch_path_spec="/lib /usr/lib"
14331need_lib_prefix=unknown
14332hardcode_into_libs=no
14333
14334# when you set need_version to no, make sure it does not cause -set_version
14335# flags to be left without arguments
14336need_version=unknown
14337
14338
14339
14340case $host_os in
14341aix3*)
14342  version_type=linux # correct to gnu/linux during the next big refactor
14343  library_names_spec='$libname$release$shared_ext$versuffix $libname.a'
14344  shlibpath_var=LIBPATH
14345
14346  # AIX 3 has no versioning support, so we append a major version to the name.
14347  soname_spec='$libname$release$shared_ext$major'
14348  ;;
14349
14350aix[4-9]*)
14351  version_type=linux # correct to gnu/linux during the next big refactor
14352  need_lib_prefix=no
14353  need_version=no
14354  hardcode_into_libs=yes
14355  if test ia64 = "$host_cpu"; then
14356    # AIX 5 supports IA64
14357    library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext'
14358    shlibpath_var=LD_LIBRARY_PATH
14359  else
14360    # With GCC up to 2.95.x, collect2 would create an import file
14361    # for dependence libraries.  The import file would start with
14362    # the line '#! .'.  This would cause the generated library to
14363    # depend on '.', always an invalid library.  This was fixed in
14364    # development snapshots of GCC prior to 3.0.
14365    case $host_os in
14366      aix4 | aix4.[01] | aix4.[01].*)
14367      if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
14368	   echo ' yes '
14369	   echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then
14370	:
14371      else
14372	can_build_shared=no
14373      fi
14374      ;;
14375    esac
14376    # Using Import Files as archive members, it is possible to support
14377    # filename-based versioning of shared library archives on AIX. While
14378    # this would work for both with and without runtime linking, it will
14379    # prevent static linking of such archives. So we do filename-based
14380    # shared library versioning with .so extension only, which is used
14381    # when both runtime linking and shared linking is enabled.
14382    # Unfortunately, runtime linking may impact performance, so we do
14383    # not want this to be the default eventually. Also, we use the
14384    # versioned .so libs for executables only if there is the -brtl
14385    # linker flag in LDFLAGS as well, or --enable-aix-soname=svr4 only.
14386    # To allow for filename-based versioning support, we need to create
14387    # libNAME.so.V as an archive file, containing:
14388    # *) an Import File, referring to the versioned filename of the
14389    #    archive as well as the shared archive member, telling the
14390    #    bitwidth (32 or 64) of that shared object, and providing the
14391    #    list of exported symbols of that shared object, eventually
14392    #    decorated with the 'weak' keyword
14393    # *) the shared object with the F_LOADONLY flag set, to really avoid
14394    #    it being seen by the linker.
14395    # At run time we better use the real file rather than another symlink,
14396    # but for link time we create the symlink libNAME.so -> libNAME.so.V
14397
14398    case $with_aix_soname,$aix_use_runtimelinking in
14399    # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct
14400    # soname into executable. Probably we can add versioning support to
14401    # collect2, so additional links can be useful in future.
14402    aix,yes) # traditional libtool
14403      dynamic_linker='AIX unversionable lib.so'
14404      # If using run time linking (on AIX 4.2 or later) use lib<name>.so
14405      # instead of lib<name>.a to let people know that these are not
14406      # typical AIX shared libraries.
14407      library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
14408      ;;
14409    aix,no) # traditional AIX only
14410      dynamic_linker='AIX lib.a(lib.so.V)'
14411      # We preserve .a as extension for shared libraries through AIX4.2
14412      # and later when we are not doing run time linking.
14413      library_names_spec='$libname$release.a $libname.a'
14414      soname_spec='$libname$release$shared_ext$major'
14415      ;;
14416    svr4,*) # full svr4 only
14417      dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o)"
14418      library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
14419      # We do not specify a path in Import Files, so LIBPATH fires.
14420      shlibpath_overrides_runpath=yes
14421      ;;
14422    *,yes) # both, prefer svr4
14423      dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o), lib.a(lib.so.V)"
14424      library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
14425      # unpreferred sharedlib libNAME.a needs extra handling
14426      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"'
14427      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"'
14428      # We do not specify a path in Import Files, so LIBPATH fires.
14429      shlibpath_overrides_runpath=yes
14430      ;;
14431    *,no) # both, prefer aix
14432      dynamic_linker="AIX lib.a(lib.so.V), lib.so.V($shared_archive_member_spec.o)"
14433      library_names_spec='$libname$release.a $libname.a'
14434      soname_spec='$libname$release$shared_ext$major'
14435      # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling
14436      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)'
14437      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"'
14438      ;;
14439    esac
14440    shlibpath_var=LIBPATH
14441  fi
14442  ;;
14443
14444amigaos*)
14445  case $host_cpu in
14446  powerpc)
14447    # Since July 2007 AmigaOS4 officially supports .so libraries.
14448    # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
14449    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
14450    ;;
14451  m68k)
14452    library_names_spec='$libname.ixlibrary $libname.a'
14453    # Create ${libname}_ixlibrary.a entries in /sys/libs.
14454    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'
14455    ;;
14456  esac
14457  ;;
14458
14459beos*)
14460  library_names_spec='$libname$shared_ext'
14461  dynamic_linker="$host_os ld.so"
14462  shlibpath_var=LIBRARY_PATH
14463  ;;
14464
14465bsdi[45]*)
14466  version_type=linux # correct to gnu/linux during the next big refactor
14467  need_version=no
14468  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
14469  soname_spec='$libname$release$shared_ext$major'
14470  finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
14471  shlibpath_var=LD_LIBRARY_PATH
14472  sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
14473  sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
14474  # the default ld.so.conf also contains /usr/contrib/lib and
14475  # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
14476  # libtool to hard-code these into programs
14477  ;;
14478
14479cygwin* | mingw* | windows* | pw32* | cegcc*)
14480  version_type=windows
14481  shrext_cmds=.dll
14482  need_version=no
14483  need_lib_prefix=no
14484
14485  case $GCC,$cc_basename in
14486  yes,*)
14487    # gcc
14488    library_names_spec='$libname.dll.a'
14489    # DLL is installed to $(libdir)/../bin by postinstall_cmds
14490    # If user builds GCC with multilib enabled,
14491    # it should just install on $(libdir)
14492    # not on $(libdir)/../bin or 32 bits dlls would override 64 bit ones.
14493    if test xyes = x"$multilib"; then
14494      postinstall_cmds='base_file=`basename \$file`~
14495        dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
14496        dldir=$destdir/`dirname \$dlpath`~
14497        $install_prog $dir/$dlname $destdir/$dlname~
14498        chmod a+x $destdir/$dlname~
14499        if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
14500          eval '\''$striplib $destdir/$dlname'\'' || exit \$?;
14501        fi'
14502    else
14503      postinstall_cmds='base_file=`basename \$file`~
14504        dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
14505        dldir=$destdir/`dirname \$dlpath`~
14506        test -d \$dldir || mkdir -p \$dldir~
14507        $install_prog $dir/$dlname \$dldir/$dlname~
14508        chmod a+x \$dldir/$dlname~
14509        if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
14510          eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
14511        fi'
14512    fi
14513    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
14514      dlpath=$dir/\$dldll~
14515       $RM \$dlpath'
14516    shlibpath_overrides_runpath=yes
14517
14518    case $host_os in
14519    cygwin*)
14520      # Cygwin DLLs use 'cyg' prefix rather than 'lib'
14521      soname_spec='`echo $libname | $SED -e 's/^lib/cyg/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
14522
14523      sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"
14524      ;;
14525    mingw* | windows* | cegcc*)
14526      # MinGW DLLs use traditional 'lib' prefix
14527      soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
14528      ;;
14529    pw32*)
14530      # pw32 DLLs use 'pw' prefix rather than 'lib'
14531      library_names_spec='`echo $libname | $SED -e 's/^lib/pw/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
14532      ;;
14533    esac
14534    dynamic_linker='Win32 ld.exe'
14535    ;;
14536
14537  *,cl* | *,icl*)
14538    # Native MSVC or ICC
14539    libname_spec='$name'
14540    soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
14541    library_names_spec='$libname.dll.lib'
14542
14543    case $build_os in
14544    mingw* | windows*)
14545      sys_lib_search_path_spec=
14546      lt_save_ifs=$IFS
14547      IFS=';'
14548      for lt_path in $LIB
14549      do
14550        IFS=$lt_save_ifs
14551        # Let DOS variable expansion print the short 8.3 style file name.
14552        lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"`
14553        sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path"
14554      done
14555      IFS=$lt_save_ifs
14556      # Convert to MSYS style.
14557      sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'`
14558      ;;
14559    cygwin*)
14560      # Convert to unix form, then to dos form, then back to unix form
14561      # but this time dos style (no spaces!) so that the unix form looks
14562      # like /cygdrive/c/PROGRA~1:/cygdr...
14563      sys_lib_search_path_spec=`cygpath --path --unix "$LIB"`
14564      sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null`
14565      sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
14566      ;;
14567    *)
14568      sys_lib_search_path_spec=$LIB
14569      if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then
14570        # It is most probably a Windows format PATH.
14571        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
14572      else
14573        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
14574      fi
14575      # FIXME: find the short name or the path components, as spaces are
14576      # common. (e.g. "Program Files" -> "PROGRA~1")
14577      ;;
14578    esac
14579
14580    # DLL is installed to $(libdir)/../bin by postinstall_cmds
14581    postinstall_cmds='base_file=`basename \$file`~
14582      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
14583      dldir=$destdir/`dirname \$dlpath`~
14584      test -d \$dldir || mkdir -p \$dldir~
14585      $install_prog $dir/$dlname \$dldir/$dlname'
14586    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
14587      dlpath=$dir/\$dldll~
14588       $RM \$dlpath'
14589    shlibpath_overrides_runpath=yes
14590    dynamic_linker='Win32 link.exe'
14591    ;;
14592
14593  *)
14594    # Assume MSVC and ICC wrapper
14595    library_names_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext $libname.lib'
14596    dynamic_linker='Win32 ld.exe'
14597    ;;
14598  esac
14599  # FIXME: first we should search . and the directory the executable is in
14600  shlibpath_var=PATH
14601  ;;
14602
14603darwin* | rhapsody*)
14604  dynamic_linker="$host_os dyld"
14605  version_type=darwin
14606  need_lib_prefix=no
14607  need_version=no
14608  library_names_spec='$libname$release$major$shared_ext $libname$shared_ext'
14609  soname_spec='$libname$release$major$shared_ext'
14610  shlibpath_overrides_runpath=yes
14611  shlibpath_var=DYLD_LIBRARY_PATH
14612  shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
14613
14614  sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"
14615  sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
14616  ;;
14617
14618dgux*)
14619  version_type=linux # correct to gnu/linux during the next big refactor
14620  need_lib_prefix=no
14621  need_version=no
14622  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
14623  soname_spec='$libname$release$shared_ext$major'
14624  shlibpath_var=LD_LIBRARY_PATH
14625  ;;
14626
14627freebsd* | dragonfly* | midnightbsd*)
14628  # DragonFly does not have aout.  When/if they implement a new
14629  # versioning mechanism, adjust this.
14630  if test -x /usr/bin/objformat; then
14631    objformat=`/usr/bin/objformat`
14632  else
14633    case $host_os in
14634    freebsd[23].*) objformat=aout ;;
14635    *) objformat=elf ;;
14636    esac
14637  fi
14638  version_type=freebsd-$objformat
14639  case $version_type in
14640    freebsd-elf*)
14641      library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
14642      soname_spec='$libname$release$shared_ext$major'
14643      need_version=no
14644      need_lib_prefix=no
14645      ;;
14646    freebsd-*)
14647      library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
14648      need_version=yes
14649      ;;
14650  esac
14651  case $host_cpu in
14652    powerpc64)
14653      # On FreeBSD bi-arch platforms, a different variable is used for 32-bit
14654      # binaries.  See <https://man.freebsd.org/cgi/man.cgi?query=ld.so>.
14655      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14656/* end confdefs.h.  */
14657int test_pointer_size[sizeof (void *) - 5];
14658
14659_ACEOF
14660if ac_fn_c_try_compile "$LINENO"
14661then :
14662  shlibpath_var=LD_LIBRARY_PATH
14663else $as_nop
14664  shlibpath_var=LD_32_LIBRARY_PATH
14665fi
14666rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
14667      ;;
14668    *)
14669      shlibpath_var=LD_LIBRARY_PATH
14670      ;;
14671  esac
14672  case $host_os in
14673  freebsd2.*)
14674    shlibpath_overrides_runpath=yes
14675    ;;
14676  freebsd3.[01]* | freebsdelf3.[01]*)
14677    shlibpath_overrides_runpath=yes
14678    hardcode_into_libs=yes
14679    ;;
14680  freebsd3.[2-9]* | freebsdelf3.[2-9]* | \
14681  freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1)
14682    shlibpath_overrides_runpath=no
14683    hardcode_into_libs=yes
14684    ;;
14685  *) # from 4.6 on, and DragonFly
14686    shlibpath_overrides_runpath=yes
14687    hardcode_into_libs=yes
14688    ;;
14689  esac
14690  ;;
14691
14692haiku*)
14693  version_type=linux # correct to gnu/linux during the next big refactor
14694  need_lib_prefix=no
14695  need_version=no
14696  dynamic_linker="$host_os runtime_loader"
14697  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
14698  soname_spec='$libname$release$shared_ext$major'
14699  shlibpath_var=LIBRARY_PATH
14700  shlibpath_overrides_runpath=no
14701  sys_lib_search_path_spec='/boot/system/non-packaged/develop/lib /boot/system/develop/lib'
14702  sys_lib_dlsearch_path_spec='/boot/home/config/non-packaged/lib /boot/home/config/lib /boot/system/non-packaged/lib /boot/system/lib'
14703  hardcode_into_libs=no
14704  ;;
14705
14706hpux9* | hpux10* | hpux11*)
14707  # Give a soname corresponding to the major version so that dld.sl refuses to
14708  # link against other versions.
14709  version_type=sunos
14710  need_lib_prefix=no
14711  need_version=no
14712  case $host_cpu in
14713  ia64*)
14714    shrext_cmds='.so'
14715    hardcode_into_libs=yes
14716    dynamic_linker="$host_os dld.so"
14717    shlibpath_var=LD_LIBRARY_PATH
14718    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
14719    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
14720    soname_spec='$libname$release$shared_ext$major'
14721    if test 32 = "$HPUX_IA64_MODE"; then
14722      sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
14723      sys_lib_dlsearch_path_spec=/usr/lib/hpux32
14724    else
14725      sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
14726      sys_lib_dlsearch_path_spec=/usr/lib/hpux64
14727    fi
14728    ;;
14729  hppa*64*)
14730    shrext_cmds='.sl'
14731    hardcode_into_libs=yes
14732    dynamic_linker="$host_os dld.sl"
14733    shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
14734    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
14735    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
14736    soname_spec='$libname$release$shared_ext$major'
14737    sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
14738    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
14739    ;;
14740  *)
14741    shrext_cmds='.sl'
14742    dynamic_linker="$host_os dld.sl"
14743    shlibpath_var=SHLIB_PATH
14744    shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
14745    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
14746    soname_spec='$libname$release$shared_ext$major'
14747    ;;
14748  esac
14749  # HP-UX runs *really* slowly unless shared libraries are mode 555, ...
14750  postinstall_cmds='chmod 555 $lib'
14751  # or fails outright, so override atomically:
14752  install_override_mode=555
14753  ;;
14754
14755interix[3-9]*)
14756  version_type=linux # correct to gnu/linux during the next big refactor
14757  need_lib_prefix=no
14758  need_version=no
14759  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
14760  soname_spec='$libname$release$shared_ext$major'
14761  dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
14762  shlibpath_var=LD_LIBRARY_PATH
14763  shlibpath_overrides_runpath=no
14764  hardcode_into_libs=yes
14765  ;;
14766
14767irix5* | irix6* | nonstopux*)
14768  case $host_os in
14769    nonstopux*) version_type=nonstopux ;;
14770    *)
14771	if test yes = "$lt_cv_prog_gnu_ld"; then
14772		version_type=linux # correct to gnu/linux during the next big refactor
14773	else
14774		version_type=irix
14775	fi ;;
14776  esac
14777  need_lib_prefix=no
14778  need_version=no
14779  soname_spec='$libname$release$shared_ext$major'
14780  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext'
14781  case $host_os in
14782  irix5* | nonstopux*)
14783    libsuff= shlibsuff=
14784    ;;
14785  *)
14786    case $LD in # libtool.m4 will add one of these switches to LD
14787    *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
14788      libsuff= shlibsuff= libmagic=32-bit;;
14789    *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
14790      libsuff=32 shlibsuff=N32 libmagic=N32;;
14791    *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
14792      libsuff=64 shlibsuff=64 libmagic=64-bit;;
14793    *) libsuff= shlibsuff= libmagic=never-match;;
14794    esac
14795    ;;
14796  esac
14797  shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
14798  shlibpath_overrides_runpath=no
14799  sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff"
14800  sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff"
14801  hardcode_into_libs=yes
14802  ;;
14803
14804# No shared lib support for Linux oldld, aout, or coff.
14805linux*oldld* | linux*aout* | linux*coff*)
14806  dynamic_linker=no
14807  ;;
14808
14809linux*android*)
14810  version_type=none # Android doesn't support versioned libraries.
14811  need_lib_prefix=no
14812  need_version=no
14813  library_names_spec='$libname$release$shared_ext $libname$shared_ext'
14814  soname_spec='$libname$release$shared_ext'
14815  finish_cmds=
14816  shlibpath_var=LD_LIBRARY_PATH
14817  shlibpath_overrides_runpath=yes
14818
14819  # This implies no fast_install, which is unacceptable.
14820  # Some rework will be needed to allow for fast_install
14821  # before this can be enabled.
14822  hardcode_into_libs=yes
14823
14824  dynamic_linker='Android linker'
14825  # -rpath works at least for libraries that are not overridden by
14826  # libraries installed in system locations.
14827  hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
14828  ;;
14829
14830# This must be glibc/ELF.
14831linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
14832  version_type=linux # correct to gnu/linux during the next big refactor
14833  need_lib_prefix=no
14834  need_version=no
14835  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
14836  soname_spec='$libname$release$shared_ext$major'
14837  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
14838  shlibpath_var=LD_LIBRARY_PATH
14839  shlibpath_overrides_runpath=no
14840
14841  # Some binutils ld are patched to set DT_RUNPATH
14842  if test ${lt_cv_shlibpath_overrides_runpath+y}
14843then :
14844  printf %s "(cached) " >&6
14845else $as_nop
14846  lt_cv_shlibpath_overrides_runpath=no
14847    save_LDFLAGS=$LDFLAGS
14848    save_libdir=$libdir
14849    eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \
14850	 LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\""
14851    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14852/* end confdefs.h.  */
14853
14854int
14855main (void)
14856{
14857
14858  ;
14859  return 0;
14860}
14861_ACEOF
14862if ac_fn_c_try_link "$LINENO"
14863then :
14864  if  ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null
14865then :
14866  lt_cv_shlibpath_overrides_runpath=yes
14867fi
14868fi
14869rm -f core conftest.err conftest.$ac_objext conftest.beam \
14870    conftest$ac_exeext conftest.$ac_ext
14871    LDFLAGS=$save_LDFLAGS
14872    libdir=$save_libdir
14873
14874fi
14875
14876  shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
14877
14878  # This implies no fast_install, which is unacceptable.
14879  # Some rework will be needed to allow for fast_install
14880  # before this can be enabled.
14881  hardcode_into_libs=yes
14882
14883  # Add ABI-specific directories to the system library path.
14884  sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib"
14885
14886  # Ideally, we could use ldconfig to report *all* directories which are
14887  # searched for libraries, however this is still not possible.  Aside from not
14888  # being certain /sbin/ldconfig is available, command
14889  # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64,
14890  # even though it is searched at run-time.  Try to do the best guess by
14891  # appending ld.so.conf contents (and includes) to the search path.
14892  if test -f /etc/ld.so.conf; then
14893    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' ' '`
14894    sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra"
14895  fi
14896
14897  # We used to test for /lib/ld.so.1 and disable shared libraries on
14898  # powerpc, because MkLinux only supported shared libraries with the
14899  # GNU dynamic linker.  Since this was broken with cross compilers,
14900  # most powerpc-linux boxes support dynamic linking these days and
14901  # people can always --disable-shared, the test was removed, and we
14902  # assume the GNU/Linux dynamic linker is in use.
14903  dynamic_linker='GNU/Linux ld.so'
14904  ;;
14905
14906netbsdelf*-gnu)
14907  version_type=linux
14908  need_lib_prefix=no
14909  need_version=no
14910  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
14911  soname_spec='$libname$release$shared_ext$major'
14912  shlibpath_var=LD_LIBRARY_PATH
14913  shlibpath_overrides_runpath=no
14914  hardcode_into_libs=yes
14915  dynamic_linker='NetBSD ld.elf_so'
14916  ;;
14917
14918netbsd*)
14919  version_type=sunos
14920  need_lib_prefix=no
14921  need_version=no
14922  if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
14923    library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
14924    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
14925    dynamic_linker='NetBSD (a.out) ld.so'
14926  else
14927    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
14928    soname_spec='$libname$release$shared_ext$major'
14929    dynamic_linker='NetBSD ld.elf_so'
14930  fi
14931  shlibpath_var=LD_LIBRARY_PATH
14932  shlibpath_overrides_runpath=yes
14933  hardcode_into_libs=yes
14934  ;;
14935
14936*-mlibc)
14937  version_type=linux # correct to gnu/linux during the next big refactor
14938  need_lib_prefix=no
14939  need_version=no
14940  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
14941  soname_spec='$libname$release$shared_ext$major'
14942  dynamic_linker='mlibc ld.so'
14943  shlibpath_var=LD_LIBRARY_PATH
14944  shlibpath_overrides_runpath=no
14945  hardcode_into_libs=yes
14946  ;;
14947
14948newsos6)
14949  version_type=linux # correct to gnu/linux during the next big refactor
14950  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
14951  shlibpath_var=LD_LIBRARY_PATH
14952  shlibpath_overrides_runpath=yes
14953  ;;
14954
14955*nto* | *qnx*)
14956  version_type=qnx
14957  need_lib_prefix=no
14958  need_version=no
14959  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
14960  soname_spec='$libname$release$shared_ext$major'
14961  shlibpath_var=LD_LIBRARY_PATH
14962  shlibpath_overrides_runpath=no
14963  hardcode_into_libs=yes
14964  dynamic_linker='ldqnx.so'
14965  ;;
14966
14967openbsd*)
14968  version_type=sunos
14969  sys_lib_dlsearch_path_spec=/usr/lib
14970  need_lib_prefix=no
14971  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
14972    need_version=no
14973  else
14974    need_version=yes
14975  fi
14976  library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
14977  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
14978  shlibpath_var=LD_LIBRARY_PATH
14979  shlibpath_overrides_runpath=yes
14980  ;;
14981
14982os2*)
14983  libname_spec='$name'
14984  version_type=windows
14985  shrext_cmds=.dll
14986  need_version=no
14987  need_lib_prefix=no
14988  # OS/2 can only load a DLL with a base name of 8 characters or less.
14989  soname_spec='`test -n "$os2dllname" && libname="$os2dllname";
14990    v=$($ECHO $release$versuffix | tr -d .-);
14991    n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _);
14992    $ECHO $n$v`$shared_ext'
14993  library_names_spec='${libname}_dll.$libext'
14994  dynamic_linker='OS/2 ld.exe'
14995  shlibpath_var=BEGINLIBPATH
14996  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
14997  sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
14998  postinstall_cmds='base_file=`basename \$file`~
14999    dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~
15000    dldir=$destdir/`dirname \$dlpath`~
15001    test -d \$dldir || mkdir -p \$dldir~
15002    $install_prog $dir/$dlname \$dldir/$dlname~
15003    chmod a+x \$dldir/$dlname~
15004    if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
15005      eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
15006    fi'
15007  postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~
15008    dlpath=$dir/\$dldll~
15009    $RM \$dlpath'
15010  ;;
15011
15012osf3* | osf4* | osf5*)
15013  version_type=osf
15014  need_lib_prefix=no
15015  need_version=no
15016  soname_spec='$libname$release$shared_ext$major'
15017  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
15018  shlibpath_var=LD_LIBRARY_PATH
15019  sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
15020  sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
15021  ;;
15022
15023rdos*)
15024  dynamic_linker=no
15025  ;;
15026
15027serenity*)
15028  version_type=linux # correct to gnu/linux during the next big refactor
15029  need_lib_prefix=no
15030  need_version=no
15031  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
15032  soname_spec='$libname$release$shared_ext$major'
15033  shlibpath_var=LD_LIBRARY_PATH
15034  shlibpath_overrides_runpath=no
15035  dynamic_linker='SerenityOS LibELF'
15036  ;;
15037
15038solaris*)
15039  version_type=linux # correct to gnu/linux during the next big refactor
15040  need_lib_prefix=no
15041  need_version=no
15042  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
15043  soname_spec='$libname$release$shared_ext$major'
15044  shlibpath_var=LD_LIBRARY_PATH
15045  shlibpath_overrides_runpath=yes
15046  hardcode_into_libs=yes
15047  # ldd complains unless libraries are executable
15048  postinstall_cmds='chmod +x $lib'
15049  ;;
15050
15051sunos4*)
15052  version_type=sunos
15053  library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
15054  finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
15055  shlibpath_var=LD_LIBRARY_PATH
15056  shlibpath_overrides_runpath=yes
15057  if test yes = "$with_gnu_ld"; then
15058    need_lib_prefix=no
15059  fi
15060  need_version=yes
15061  ;;
15062
15063sysv4 | sysv4.3*)
15064  version_type=linux # correct to gnu/linux during the next big refactor
15065  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
15066  soname_spec='$libname$release$shared_ext$major'
15067  shlibpath_var=LD_LIBRARY_PATH
15068  case $host_vendor in
15069    sni)
15070      shlibpath_overrides_runpath=no
15071      need_lib_prefix=no
15072      runpath_var=LD_RUN_PATH
15073      ;;
15074    siemens)
15075      need_lib_prefix=no
15076      ;;
15077    motorola)
15078      need_lib_prefix=no
15079      need_version=no
15080      shlibpath_overrides_runpath=no
15081      sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
15082      ;;
15083  esac
15084  ;;
15085
15086sysv4*MP*)
15087  if test -d /usr/nec; then
15088    version_type=linux # correct to gnu/linux during the next big refactor
15089    library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext'
15090    soname_spec='$libname$shared_ext.$major'
15091    shlibpath_var=LD_LIBRARY_PATH
15092  fi
15093  ;;
15094
15095sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
15096  version_type=sco
15097  need_lib_prefix=no
15098  need_version=no
15099  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext'
15100  soname_spec='$libname$release$shared_ext$major'
15101  shlibpath_var=LD_LIBRARY_PATH
15102  shlibpath_overrides_runpath=yes
15103  hardcode_into_libs=yes
15104  if test yes = "$with_gnu_ld"; then
15105    sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
15106  else
15107    sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
15108    case $host_os in
15109      sco3.2v5*)
15110        sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
15111	;;
15112    esac
15113  fi
15114  sys_lib_dlsearch_path_spec='/usr/lib'
15115  ;;
15116
15117tpf*)
15118  # TPF is a cross-target only.  Preferred cross-host = GNU/Linux.
15119  version_type=linux # correct to gnu/linux during the next big refactor
15120  need_lib_prefix=no
15121  need_version=no
15122  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
15123  shlibpath_var=LD_LIBRARY_PATH
15124  shlibpath_overrides_runpath=no
15125  hardcode_into_libs=yes
15126  ;;
15127
15128uts4*)
15129  version_type=linux # correct to gnu/linux during the next big refactor
15130  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
15131  soname_spec='$libname$release$shared_ext$major'
15132  shlibpath_var=LD_LIBRARY_PATH
15133  ;;
15134
15135emscripten*)
15136  version_type=none
15137  need_lib_prefix=no
15138  need_version=no
15139  library_names_spec='$libname$release$shared_ext'
15140  soname_spec='$libname$release$shared_ext'
15141  finish_cmds=
15142  dynamic_linker="Emscripten linker"
15143  lt_prog_compiler_wl=
15144lt_prog_compiler_pic=
15145lt_prog_compiler_static=
15146
15147
15148  if test yes = "$GCC"; then
15149    lt_prog_compiler_wl='-Wl,'
15150    lt_prog_compiler_static='-static'
15151
15152    case $host_os in
15153      aix*)
15154      # All AIX code is PIC.
15155      if test ia64 = "$host_cpu"; then
15156	# AIX 5 now supports IA64 processor
15157	lt_prog_compiler_static='-Bstatic'
15158      fi
15159      lt_prog_compiler_pic='-fPIC'
15160      ;;
15161
15162    amigaos*)
15163      case $host_cpu in
15164      powerpc)
15165            # see comment about AmigaOS4 .so support
15166            lt_prog_compiler_pic='-fPIC'
15167        ;;
15168      m68k)
15169            # FIXME: we need at least 68020 code to build shared libraries, but
15170            # adding the '-m68020' flag to GCC prevents building anything better,
15171            # like '-m68040'.
15172            lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4'
15173        ;;
15174      esac
15175      ;;
15176
15177    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
15178      # PIC is the default for these OSes.
15179      ;;
15180
15181    mingw* | windows* | cygwin* | pw32* | os2* | cegcc*)
15182      # This hack is so that the source file can tell whether it is being
15183      # built for inclusion in a dll (and should export symbols for example).
15184      # Although the cygwin gcc ignores -fPIC, still need this for old-style
15185      # (--disable-auto-import) libraries
15186      lt_prog_compiler_pic='-DDLL_EXPORT'
15187      case $host_os in
15188      os2*)
15189	lt_prog_compiler_static='$wl-static'
15190	;;
15191      esac
15192      ;;
15193
15194    darwin* | rhapsody*)
15195      # PIC is the default on this platform
15196      # Common symbols not allowed in MH_DYLIB files
15197      lt_prog_compiler_pic='-fno-common'
15198      ;;
15199
15200    haiku*)
15201      # PIC is the default for Haiku.
15202      # The "-static" flag exists, but is broken.
15203      lt_prog_compiler_static=
15204      ;;
15205
15206    hpux*)
15207      # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
15208      # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
15209      # sets the default TLS model and affects inlining.
15210      case $host_cpu in
15211      hppa*64*)
15212	# +Z the default
15213	;;
15214      *)
15215	lt_prog_compiler_pic='-fPIC'
15216	;;
15217      esac
15218      ;;
15219
15220    interix[3-9]*)
15221      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
15222      # Instead, we relocate shared libraries at runtime.
15223      ;;
15224
15225    msdosdjgpp*)
15226      # Just because we use GCC doesn't mean we suddenly get shared libraries
15227      # on systems that don't support them.
15228      lt_prog_compiler_can_build_shared=no
15229      enable_shared=no
15230      ;;
15231
15232    *nto* | *qnx*)
15233      # QNX uses GNU C++, but need to define -shared option too, otherwise
15234      # it will coredump.
15235      lt_prog_compiler_pic='-fPIC -shared'
15236      ;;
15237
15238    sysv4*MP*)
15239      if test -d /usr/nec; then
15240	lt_prog_compiler_pic=-Kconform_pic
15241      fi
15242      ;;
15243
15244    *)
15245      lt_prog_compiler_pic='-fPIC'
15246      ;;
15247    esac
15248
15249    case $cc_basename in
15250    nvcc*) # Cuda Compiler Driver 2.2
15251      lt_prog_compiler_wl='-Xlinker '
15252      if test -n "$lt_prog_compiler_pic"; then
15253        lt_prog_compiler_pic="-Xcompiler $lt_prog_compiler_pic"
15254      fi
15255      ;;
15256    esac
15257  else
15258    # PORTME Check for flag to pass linker flags through the system compiler.
15259    case $host_os in
15260    aix*)
15261      lt_prog_compiler_wl='-Wl,'
15262      if test ia64 = "$host_cpu"; then
15263	# AIX 5 now supports IA64 processor
15264	lt_prog_compiler_static='-Bstatic'
15265      else
15266	lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp'
15267      fi
15268      ;;
15269
15270    darwin* | rhapsody*)
15271      # PIC is the default on this platform
15272      # Common symbols not allowed in MH_DYLIB files
15273      lt_prog_compiler_pic='-fno-common'
15274      case $cc_basename in
15275      nagfor*)
15276        # NAG Fortran compiler
15277        lt_prog_compiler_wl='-Wl,-Wl,,'
15278        lt_prog_compiler_pic='-PIC'
15279        lt_prog_compiler_static='-Bstatic'
15280        ;;
15281      esac
15282      ;;
15283
15284    mingw* | windows* | cygwin* | pw32* | os2* | cegcc*)
15285      # This hack is so that the source file can tell whether it is being
15286      # built for inclusion in a dll (and should export symbols for example).
15287      lt_prog_compiler_pic='-DDLL_EXPORT'
15288      case $host_os in
15289      os2*)
15290	lt_prog_compiler_static='$wl-static'
15291	;;
15292      esac
15293      ;;
15294
15295    hpux9* | hpux10* | hpux11*)
15296      lt_prog_compiler_wl='-Wl,'
15297      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
15298      # not for PA HP-UX.
15299      case $host_cpu in
15300      hppa*64*|ia64*)
15301	# +Z the default
15302	;;
15303      *)
15304	lt_prog_compiler_pic='+Z'
15305	;;
15306      esac
15307      # Is there a better lt_prog_compiler_static that works with the bundled CC?
15308      lt_prog_compiler_static='$wl-a ${wl}archive'
15309      ;;
15310
15311    irix5* | irix6* | nonstopux*)
15312      lt_prog_compiler_wl='-Wl,'
15313      # PIC (with -KPIC) is the default.
15314      lt_prog_compiler_static='-non_shared'
15315      ;;
15316
15317    linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
15318      case $cc_basename in
15319      # old Intel for x86_64, which still supported -KPIC.
15320      ecc*)
15321	lt_prog_compiler_wl='-Wl,'
15322	lt_prog_compiler_pic='-KPIC'
15323	lt_prog_compiler_static='-static'
15324        ;;
15325      *flang* | ftn | f18* | f95*)
15326        # Flang compiler.
15327	lt_prog_compiler_wl='-Wl,'
15328	lt_prog_compiler_pic='-fPIC'
15329	lt_prog_compiler_static='-static'
15330        ;;
15331      # icc used to be incompatible with GCC.
15332      # ICC 10 doesn't accept -KPIC any more.
15333      icc* | ifort*)
15334	lt_prog_compiler_wl='-Wl,'
15335	lt_prog_compiler_pic='-fPIC'
15336	lt_prog_compiler_static='-static'
15337        ;;
15338      # Lahey Fortran 8.1.
15339      lf95*)
15340	lt_prog_compiler_wl='-Wl,'
15341	lt_prog_compiler_pic='--shared'
15342	lt_prog_compiler_static='--static'
15343	;;
15344      nagfor*)
15345	# NAG Fortran compiler
15346	lt_prog_compiler_wl='-Wl,-Wl,,'
15347	lt_prog_compiler_pic='-PIC'
15348	lt_prog_compiler_static='-Bstatic'
15349	;;
15350      tcc*)
15351	# Fabrice Bellard et al's Tiny C Compiler
15352	lt_prog_compiler_wl='-Wl,'
15353	lt_prog_compiler_pic='-fPIC'
15354	lt_prog_compiler_static='-static'
15355	;;
15356      pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
15357        # Portland Group compilers (*not* the Pentium gcc compiler,
15358	# which looks to be a dead project)
15359	lt_prog_compiler_wl='-Wl,'
15360	lt_prog_compiler_pic='-fpic'
15361	lt_prog_compiler_static='-Bstatic'
15362        ;;
15363      ccc*)
15364        lt_prog_compiler_wl='-Wl,'
15365        # All Alpha code is PIC.
15366        lt_prog_compiler_static='-non_shared'
15367        ;;
15368      xl* | bgxl* | bgf* | mpixl*)
15369	# IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene
15370	lt_prog_compiler_wl='-Wl,'
15371	lt_prog_compiler_pic='-qpic'
15372	lt_prog_compiler_static='-qstaticlink'
15373	;;
15374      *)
15375	case `$CC -V 2>&1 | $SED 5q` in
15376	*Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [1-7].* | *Sun*Fortran*\ 8.[0-3]*)
15377	  # Sun Fortran 8.3 passes all unrecognized flags to the linker
15378	  lt_prog_compiler_pic='-KPIC'
15379	  lt_prog_compiler_static='-Bstatic'
15380	  lt_prog_compiler_wl=''
15381	  ;;
15382	*Sun\ F* | *Sun*Fortran*)
15383	  lt_prog_compiler_pic='-KPIC'
15384	  lt_prog_compiler_static='-Bstatic'
15385	  lt_prog_compiler_wl='-Qoption ld '
15386	  ;;
15387	*Sun\ C*)
15388	  # Sun C 5.9
15389	  lt_prog_compiler_pic='-KPIC'
15390	  lt_prog_compiler_static='-Bstatic'
15391	  lt_prog_compiler_wl='-Wl,'
15392	  ;;
15393        *Intel*\ [CF]*Compiler*)
15394	  lt_prog_compiler_wl='-Wl,'
15395	  lt_prog_compiler_pic='-fPIC'
15396	  lt_prog_compiler_static='-static'
15397	  ;;
15398	*Portland\ Group*)
15399	  lt_prog_compiler_wl='-Wl,'
15400	  lt_prog_compiler_pic='-fpic'
15401	  lt_prog_compiler_static='-Bstatic'
15402	  ;;
15403	esac
15404	;;
15405      esac
15406      ;;
15407
15408    newsos6)
15409      lt_prog_compiler_pic='-KPIC'
15410      lt_prog_compiler_static='-Bstatic'
15411      ;;
15412
15413    *-mlibc)
15414      lt_prog_compiler_wl='-Wl,'
15415      lt_prog_compiler_pic='-fPIC'
15416      lt_prog_compiler_static='-static'
15417      ;;
15418
15419    *nto* | *qnx*)
15420      # QNX uses GNU C++, but need to define -shared option too, otherwise
15421      # it will coredump.
15422      lt_prog_compiler_pic='-fPIC -shared'
15423      ;;
15424
15425    osf3* | osf4* | osf5*)
15426      lt_prog_compiler_wl='-Wl,'
15427      # All OSF/1 code is PIC.
15428      lt_prog_compiler_static='-non_shared'
15429      ;;
15430
15431    rdos*)
15432      lt_prog_compiler_static='-non_shared'
15433      ;;
15434
15435    serenity*)
15436      ;;
15437
15438    solaris*)
15439      lt_prog_compiler_pic='-KPIC'
15440      lt_prog_compiler_static='-Bstatic'
15441      case $cc_basename in
15442      f77* | f90* | f95* | sunf77* | sunf90* | sunf95*)
15443	lt_prog_compiler_wl='-Qoption ld ';;
15444      *)
15445	lt_prog_compiler_wl='-Wl,';;
15446      esac
15447      ;;
15448
15449    sunos4*)
15450      lt_prog_compiler_wl='-Qoption ld '
15451      lt_prog_compiler_pic='-PIC'
15452      lt_prog_compiler_static='-Bstatic'
15453      ;;
15454
15455    sysv4 | sysv4.2uw2* | sysv4.3*)
15456      lt_prog_compiler_wl='-Wl,'
15457      lt_prog_compiler_pic='-KPIC'
15458      lt_prog_compiler_static='-Bstatic'
15459      ;;
15460
15461    sysv4*MP*)
15462      if test -d /usr/nec; then
15463	lt_prog_compiler_pic='-Kconform_pic'
15464	lt_prog_compiler_static='-Bstatic'
15465      fi
15466      ;;
15467
15468    sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
15469      lt_prog_compiler_wl='-Wl,'
15470      lt_prog_compiler_pic='-KPIC'
15471      lt_prog_compiler_static='-Bstatic'
15472      ;;
15473
15474    unicos*)
15475      lt_prog_compiler_wl='-Wl,'
15476      lt_prog_compiler_can_build_shared=no
15477      ;;
15478
15479    uts4*)
15480      lt_prog_compiler_pic='-pic'
15481      lt_prog_compiler_static='-Bstatic'
15482      ;;
15483
15484    *)
15485      lt_prog_compiler_can_build_shared=no
15486      ;;
15487    esac
15488  fi
15489
15490case $host_os in
15491  # For platforms that do not support PIC, -DPIC is meaningless:
15492  *djgpp*)
15493    lt_prog_compiler_pic=
15494    ;;
15495  *)
15496    lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC"
15497    ;;
15498esac
15499
15500{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5
15501printf %s "checking for $compiler option to produce PIC... " >&6; }
15502if test ${lt_cv_prog_compiler_pic+y}
15503then :
15504  printf %s "(cached) " >&6
15505else $as_nop
15506  lt_cv_prog_compiler_pic=$lt_prog_compiler_pic
15507fi
15508{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic" >&5
15509printf "%s\n" "$lt_cv_prog_compiler_pic" >&6; }
15510lt_prog_compiler_pic=$lt_cv_prog_compiler_pic
15511
15512#
15513# Check to make sure the PIC flag actually works.
15514#
15515if test -n "$lt_prog_compiler_pic"; then
15516  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5
15517printf %s "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; }
15518if test ${lt_cv_prog_compiler_pic_works+y}
15519then :
15520  printf %s "(cached) " >&6
15521else $as_nop
15522  lt_cv_prog_compiler_pic_works=no
15523   ac_outfile=conftest.$ac_objext
15524   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
15525   lt_compiler_flag="$lt_prog_compiler_pic -DPIC"  ## exclude from sc_useless_quotes_in_assignment
15526   # Insert the option either (1) after the last *FLAGS variable, or
15527   # (2) before a word containing "conftest.", or (3) at the end.
15528   # Note that $ac_compile itself does not contain backslashes and begins
15529   # with a dollar sign (not a hyphen), so the echo should work correctly.
15530   # The option is referenced via a variable to avoid confusing sed.
15531   lt_compile=`echo "$ac_compile" | $SED \
15532   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
15533   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
15534   -e 's:$: $lt_compiler_flag:'`
15535   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
15536   (eval "$lt_compile" 2>conftest.err)
15537   ac_status=$?
15538   cat conftest.err >&5
15539   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15540   if (exit $ac_status) && test -s "$ac_outfile"; then
15541     # The compiler can only warn and ignore the option if not recognized
15542     # So say no if there are warnings other than the usual output.
15543     $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
15544     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
15545     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
15546       lt_cv_prog_compiler_pic_works=yes
15547     fi
15548   fi
15549   $RM conftest*
15550
15551fi
15552{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5
15553printf "%s\n" "$lt_cv_prog_compiler_pic_works" >&6; }
15554
15555if test yes = "$lt_cv_prog_compiler_pic_works"; then
15556    case $lt_prog_compiler_pic in
15557     "" | " "*) ;;
15558     *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;;
15559     esac
15560else
15561    lt_prog_compiler_pic=
15562     lt_prog_compiler_can_build_shared=no
15563fi
15564
15565fi
15566
15567
15568
15569
15570
15571#
15572# Check to make sure the static flag actually works.
15573#
15574wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\"
15575{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5
15576printf %s "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; }
15577if test ${lt_cv_prog_compiler_static_works+y}
15578then :
15579  printf %s "(cached) " >&6
15580else $as_nop
15581  lt_cv_prog_compiler_static_works=no
15582   save_LDFLAGS=$LDFLAGS
15583   LDFLAGS="$LDFLAGS $lt_tmp_static_flag"
15584   echo "$lt_simple_link_test_code" > conftest.$ac_ext
15585   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
15586     # The linker can only warn and ignore the option if not recognized
15587     # So say no if there are warnings
15588     if test -s conftest.err; then
15589       # Append any errors to the config.log.
15590       cat conftest.err 1>&5
15591       $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
15592       $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
15593       if diff conftest.exp conftest.er2 >/dev/null; then
15594         lt_cv_prog_compiler_static_works=yes
15595       fi
15596     else
15597       lt_cv_prog_compiler_static_works=yes
15598     fi
15599   fi
15600   $RM -r conftest*
15601   LDFLAGS=$save_LDFLAGS
15602
15603fi
15604{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5
15605printf "%s\n" "$lt_cv_prog_compiler_static_works" >&6; }
15606
15607if test yes = "$lt_cv_prog_compiler_static_works"; then
15608    :
15609else
15610    lt_prog_compiler_static=
15611fi
15612
15613
15614
15615='-fPIC'
15616  archive_cmds='$CC -sSIDE_MODULE=2 -shared $libobjs $deplibs $compiler_flags -o $lib'
15617  archive_expsym_cmds='$SED "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -sSIDE_MODULE=2 -shared $libobjs $deplibs $compiler_flags -o $lib -s EXPORTED_FUNCTIONS=@$output_objdir/$soname.expsym'
15618  archive_cmds_need_lc=no
15619  no_undefined_flag=
15620  ;;
15621
15622*)
15623  dynamic_linker=no
15624  ;;
15625esac
15626{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5
15627printf "%s\n" "$dynamic_linker" >&6; }
15628test no = "$dynamic_linker" && can_build_shared=no
15629
15630variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
15631if test yes = "$GCC"; then
15632  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
15633fi
15634
15635if test set = "${lt_cv_sys_lib_search_path_spec+set}"; then
15636  sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec
15637fi
15638
15639if test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then
15640  sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec
15641fi
15642
15643# remember unaugmented sys_lib_dlsearch_path content for libtool script decls...
15644configure_time_dlsearch_path=$sys_lib_dlsearch_path_spec
15645
15646# ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code
15647func_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH"
15648
15649# to be used as default LT_SYS_LIBRARY_PATH value in generated libtool
15650configure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH
15651
15652
15653
15654
15655
15656
15657
15658
15659
15660
15661
15662
15663
15664
15665
15666
15667
15668
15669
15670
15671
15672
15673
15674
15675
15676
15677
15678
15679
15680
15681
15682
15683
15684
15685
15686
15687
15688
15689
15690
15691
15692
15693
15694
15695
15696
15697
15698
15699
15700
15701
15702
15703
15704
15705
15706
15707
15708
15709
15710
15711
15712
15713
15714
15715
15716
15717
15718
15719
15720
15721
15722
15723
15724
15725
15726
15727
15728
15729
15730
15731
15732
15733
15734
15735
15736
15737
15738
15739
15740
15741
15742
15743
15744
15745
15746
15747
15748  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5
15749printf %s "checking how to hardcode library paths into programs... " >&6; }
15750hardcode_action=
15751if test -n "$hardcode_libdir_flag_spec" ||
15752   test -n "$runpath_var" ||
15753   test yes = "$hardcode_automatic"; then
15754
15755  # We can hardcode non-existent directories.
15756  if test no != "$hardcode_direct" &&
15757     # If the only mechanism to avoid hardcoding is shlibpath_var, we
15758     # have to relink, otherwise we might link with an installed library
15759     # when we should be linking with a yet-to-be-installed one
15760     ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, )" &&
15761     test no != "$hardcode_minus_L"; then
15762    # Linking always hardcodes the temporary library directory.
15763    hardcode_action=relink
15764  else
15765    # We can link without hardcoding, and we can hardcode nonexisting dirs.
15766    hardcode_action=immediate
15767  fi
15768else
15769  # We cannot hardcode anything, or else we can only hardcode existing
15770  # directories.
15771  hardcode_action=unsupported
15772fi
15773{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5
15774printf "%s\n" "$hardcode_action" >&6; }
15775
15776if test relink = "$hardcode_action" ||
15777   test yes = "$inherit_rpath"; then
15778  # Fast installation is not supported
15779  enable_fast_install=no
15780elif test yes = "$shlibpath_overrides_runpath" ||
15781     test no = "$enable_shared"; then
15782  # Fast installation is not necessary
15783  enable_fast_install=needless
15784fi
15785
15786
15787
15788
15789
15790
15791  if test yes != "$enable_dlopen"; then
15792  enable_dlopen=unknown
15793  enable_dlopen_self=unknown
15794  enable_dlopen_self_static=unknown
15795else
15796  lt_cv_dlopen=no
15797  lt_cv_dlopen_libs=
15798
15799  case $host_os in
15800  beos*)
15801    lt_cv_dlopen=load_add_on
15802    lt_cv_dlopen_libs=
15803    lt_cv_dlopen_self=yes
15804    ;;
15805
15806  mingw* | windows* | pw32* | cegcc*)
15807    lt_cv_dlopen=LoadLibrary
15808    lt_cv_dlopen_libs=
15809    ;;
15810
15811  cygwin*)
15812    lt_cv_dlopen=dlopen
15813    lt_cv_dlopen_libs=
15814    ;;
15815
15816  darwin*)
15817    # if libdl is installed we need to link against it
15818    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
15819printf %s "checking for dlopen in -ldl... " >&6; }
15820if test ${ac_cv_lib_dl_dlopen+y}
15821then :
15822  printf %s "(cached) " >&6
15823else $as_nop
15824  ac_check_lib_save_LIBS=$LIBS
15825LIBS="-ldl  $LIBS"
15826cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15827/* end confdefs.h.  */
15828
15829/* Override any GCC internal prototype to avoid an error.
15830   Use char because int might match the return type of a GCC
15831   builtin and then its argument prototype would still apply.  */
15832char dlopen ();
15833int
15834main (void)
15835{
15836return dlopen ();
15837  ;
15838  return 0;
15839}
15840_ACEOF
15841if ac_fn_c_try_link "$LINENO"
15842then :
15843  ac_cv_lib_dl_dlopen=yes
15844else $as_nop
15845  ac_cv_lib_dl_dlopen=no
15846fi
15847rm -f core conftest.err conftest.$ac_objext conftest.beam \
15848    conftest$ac_exeext conftest.$ac_ext
15849LIBS=$ac_check_lib_save_LIBS
15850fi
15851{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
15852printf "%s\n" "$ac_cv_lib_dl_dlopen" >&6; }
15853if test "x$ac_cv_lib_dl_dlopen" = xyes
15854then :
15855  lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl
15856else $as_nop
15857
15858    lt_cv_dlopen=dyld
15859    lt_cv_dlopen_libs=
15860    lt_cv_dlopen_self=yes
15861
15862fi
15863
15864    ;;
15865
15866  tpf*)
15867    # Don't try to run any link tests for TPF.  We know it's impossible
15868    # because TPF is a cross-compiler, and we know how we open DSOs.
15869    lt_cv_dlopen=dlopen
15870    lt_cv_dlopen_libs=
15871    lt_cv_dlopen_self=no
15872    ;;
15873
15874  *)
15875    ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load"
15876if test "x$ac_cv_func_shl_load" = xyes
15877then :
15878  lt_cv_dlopen=shl_load
15879else $as_nop
15880  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
15881printf %s "checking for shl_load in -ldld... " >&6; }
15882if test ${ac_cv_lib_dld_shl_load+y}
15883then :
15884  printf %s "(cached) " >&6
15885else $as_nop
15886  ac_check_lib_save_LIBS=$LIBS
15887LIBS="-ldld  $LIBS"
15888cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15889/* end confdefs.h.  */
15890
15891/* Override any GCC internal prototype to avoid an error.
15892   Use char because int might match the return type of a GCC
15893   builtin and then its argument prototype would still apply.  */
15894char shl_load ();
15895int
15896main (void)
15897{
15898return shl_load ();
15899  ;
15900  return 0;
15901}
15902_ACEOF
15903if ac_fn_c_try_link "$LINENO"
15904then :
15905  ac_cv_lib_dld_shl_load=yes
15906else $as_nop
15907  ac_cv_lib_dld_shl_load=no
15908fi
15909rm -f core conftest.err conftest.$ac_objext conftest.beam \
15910    conftest$ac_exeext conftest.$ac_ext
15911LIBS=$ac_check_lib_save_LIBS
15912fi
15913{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
15914printf "%s\n" "$ac_cv_lib_dld_shl_load" >&6; }
15915if test "x$ac_cv_lib_dld_shl_load" = xyes
15916then :
15917  lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld
15918else $as_nop
15919  ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
15920if test "x$ac_cv_func_dlopen" = xyes
15921then :
15922  lt_cv_dlopen=dlopen
15923else $as_nop
15924  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
15925printf %s "checking for dlopen in -ldl... " >&6; }
15926if test ${ac_cv_lib_dl_dlopen+y}
15927then :
15928  printf %s "(cached) " >&6
15929else $as_nop
15930  ac_check_lib_save_LIBS=$LIBS
15931LIBS="-ldl  $LIBS"
15932cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15933/* end confdefs.h.  */
15934
15935/* Override any GCC internal prototype to avoid an error.
15936   Use char because int might match the return type of a GCC
15937   builtin and then its argument prototype would still apply.  */
15938char dlopen ();
15939int
15940main (void)
15941{
15942return dlopen ();
15943  ;
15944  return 0;
15945}
15946_ACEOF
15947if ac_fn_c_try_link "$LINENO"
15948then :
15949  ac_cv_lib_dl_dlopen=yes
15950else $as_nop
15951  ac_cv_lib_dl_dlopen=no
15952fi
15953rm -f core conftest.err conftest.$ac_objext conftest.beam \
15954    conftest$ac_exeext conftest.$ac_ext
15955LIBS=$ac_check_lib_save_LIBS
15956fi
15957{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
15958printf "%s\n" "$ac_cv_lib_dl_dlopen" >&6; }
15959if test "x$ac_cv_lib_dl_dlopen" = xyes
15960then :
15961  lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl
15962else $as_nop
15963  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5
15964printf %s "checking for dlopen in -lsvld... " >&6; }
15965if test ${ac_cv_lib_svld_dlopen+y}
15966then :
15967  printf %s "(cached) " >&6
15968else $as_nop
15969  ac_check_lib_save_LIBS=$LIBS
15970LIBS="-lsvld  $LIBS"
15971cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15972/* end confdefs.h.  */
15973
15974/* Override any GCC internal prototype to avoid an error.
15975   Use char because int might match the return type of a GCC
15976   builtin and then its argument prototype would still apply.  */
15977char dlopen ();
15978int
15979main (void)
15980{
15981return dlopen ();
15982  ;
15983  return 0;
15984}
15985_ACEOF
15986if ac_fn_c_try_link "$LINENO"
15987then :
15988  ac_cv_lib_svld_dlopen=yes
15989else $as_nop
15990  ac_cv_lib_svld_dlopen=no
15991fi
15992rm -f core conftest.err conftest.$ac_objext conftest.beam \
15993    conftest$ac_exeext conftest.$ac_ext
15994LIBS=$ac_check_lib_save_LIBS
15995fi
15996{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5
15997printf "%s\n" "$ac_cv_lib_svld_dlopen" >&6; }
15998if test "x$ac_cv_lib_svld_dlopen" = xyes
15999then :
16000  lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld
16001else $as_nop
16002  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5
16003printf %s "checking for dld_link in -ldld... " >&6; }
16004if test ${ac_cv_lib_dld_dld_link+y}
16005then :
16006  printf %s "(cached) " >&6
16007else $as_nop
16008  ac_check_lib_save_LIBS=$LIBS
16009LIBS="-ldld  $LIBS"
16010cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16011/* end confdefs.h.  */
16012
16013/* Override any GCC internal prototype to avoid an error.
16014   Use char because int might match the return type of a GCC
16015   builtin and then its argument prototype would still apply.  */
16016char dld_link ();
16017int
16018main (void)
16019{
16020return dld_link ();
16021  ;
16022  return 0;
16023}
16024_ACEOF
16025if ac_fn_c_try_link "$LINENO"
16026then :
16027  ac_cv_lib_dld_dld_link=yes
16028else $as_nop
16029  ac_cv_lib_dld_dld_link=no
16030fi
16031rm -f core conftest.err conftest.$ac_objext conftest.beam \
16032    conftest$ac_exeext conftest.$ac_ext
16033LIBS=$ac_check_lib_save_LIBS
16034fi
16035{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5
16036printf "%s\n" "$ac_cv_lib_dld_dld_link" >&6; }
16037if test "x$ac_cv_lib_dld_dld_link" = xyes
16038then :
16039  lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld
16040fi
16041
16042
16043fi
16044
16045
16046fi
16047
16048
16049fi
16050
16051
16052fi
16053
16054
16055fi
16056
16057    ;;
16058  esac
16059
16060  if test no = "$lt_cv_dlopen"; then
16061    enable_dlopen=no
16062  else
16063    enable_dlopen=yes
16064  fi
16065
16066  case $lt_cv_dlopen in
16067  dlopen)
16068    save_CPPFLAGS=$CPPFLAGS
16069    test yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
16070
16071    save_LDFLAGS=$LDFLAGS
16072    wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
16073
16074    save_LIBS=$LIBS
16075    LIBS="$lt_cv_dlopen_libs $LIBS"
16076
16077    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5
16078printf %s "checking whether a program can dlopen itself... " >&6; }
16079if test ${lt_cv_dlopen_self+y}
16080then :
16081  printf %s "(cached) " >&6
16082else $as_nop
16083  	  if test yes = "$cross_compiling"; then :
16084  lt_cv_dlopen_self=cross
16085else
16086  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
16087  lt_status=$lt_dlunknown
16088  cat > conftest.$ac_ext <<_LT_EOF
16089#line $LINENO "configure"
16090#include "confdefs.h"
16091
16092#if HAVE_DLFCN_H
16093#include <dlfcn.h>
16094#endif
16095
16096#include <stdio.h>
16097
16098#ifdef RTLD_GLOBAL
16099#  define LT_DLGLOBAL		RTLD_GLOBAL
16100#else
16101#  ifdef DL_GLOBAL
16102#    define LT_DLGLOBAL		DL_GLOBAL
16103#  else
16104#    define LT_DLGLOBAL		0
16105#  endif
16106#endif
16107
16108/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
16109   find out it does not work in some platform. */
16110#ifndef LT_DLLAZY_OR_NOW
16111#  ifdef RTLD_LAZY
16112#    define LT_DLLAZY_OR_NOW		RTLD_LAZY
16113#  else
16114#    ifdef DL_LAZY
16115#      define LT_DLLAZY_OR_NOW		DL_LAZY
16116#    else
16117#      ifdef RTLD_NOW
16118#        define LT_DLLAZY_OR_NOW	RTLD_NOW
16119#      else
16120#        ifdef DL_NOW
16121#          define LT_DLLAZY_OR_NOW	DL_NOW
16122#        else
16123#          define LT_DLLAZY_OR_NOW	0
16124#        endif
16125#      endif
16126#    endif
16127#  endif
16128#endif
16129
16130/* When -fvisibility=hidden is used, assume the code has been annotated
16131   correspondingly for the symbols needed.  */
16132#if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
16133int fnord (void) __attribute__((visibility("default")));
16134#endif
16135
16136int fnord (void) { return 42; }
16137int main (void)
16138{
16139  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
16140  int status = $lt_dlunknown;
16141
16142  if (self)
16143    {
16144      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
16145      else
16146        {
16147	  if (dlsym( self,"_fnord"))  status = $lt_dlneed_uscore;
16148          else puts (dlerror ());
16149	}
16150      /* dlclose (self); */
16151    }
16152  else
16153    puts (dlerror ());
16154
16155  return status;
16156}
16157_LT_EOF
16158  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
16159  (eval $ac_link) 2>&5
16160  ac_status=$?
16161  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
16162  test $ac_status = 0; } && test -s "conftest$ac_exeext" 2>/dev/null; then
16163    (./conftest; exit; ) >&5 2>/dev/null
16164    lt_status=$?
16165    case x$lt_status in
16166      x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;;
16167      x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;;
16168      x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;;
16169    esac
16170  else :
16171    # compilation failed
16172    lt_cv_dlopen_self=no
16173  fi
16174fi
16175rm -fr conftest*
16176
16177
16178fi
16179{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5
16180printf "%s\n" "$lt_cv_dlopen_self" >&6; }
16181
16182    if test yes = "$lt_cv_dlopen_self"; then
16183      wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
16184      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5
16185printf %s "checking whether a statically linked program can dlopen itself... " >&6; }
16186if test ${lt_cv_dlopen_self_static+y}
16187then :
16188  printf %s "(cached) " >&6
16189else $as_nop
16190  	  if test yes = "$cross_compiling"; then :
16191  lt_cv_dlopen_self_static=cross
16192else
16193  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
16194  lt_status=$lt_dlunknown
16195  cat > conftest.$ac_ext <<_LT_EOF
16196#line $LINENO "configure"
16197#include "confdefs.h"
16198
16199#if HAVE_DLFCN_H
16200#include <dlfcn.h>
16201#endif
16202
16203#include <stdio.h>
16204
16205#ifdef RTLD_GLOBAL
16206#  define LT_DLGLOBAL		RTLD_GLOBAL
16207#else
16208#  ifdef DL_GLOBAL
16209#    define LT_DLGLOBAL		DL_GLOBAL
16210#  else
16211#    define LT_DLGLOBAL		0
16212#  endif
16213#endif
16214
16215/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
16216   find out it does not work in some platform. */
16217#ifndef LT_DLLAZY_OR_NOW
16218#  ifdef RTLD_LAZY
16219#    define LT_DLLAZY_OR_NOW		RTLD_LAZY
16220#  else
16221#    ifdef DL_LAZY
16222#      define LT_DLLAZY_OR_NOW		DL_LAZY
16223#    else
16224#      ifdef RTLD_NOW
16225#        define LT_DLLAZY_OR_NOW	RTLD_NOW
16226#      else
16227#        ifdef DL_NOW
16228#          define LT_DLLAZY_OR_NOW	DL_NOW
16229#        else
16230#          define LT_DLLAZY_OR_NOW	0
16231#        endif
16232#      endif
16233#    endif
16234#  endif
16235#endif
16236
16237/* When -fvisibility=hidden is used, assume the code has been annotated
16238   correspondingly for the symbols needed.  */
16239#if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
16240int fnord (void) __attribute__((visibility("default")));
16241#endif
16242
16243int fnord (void) { return 42; }
16244int main (void)
16245{
16246  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
16247  int status = $lt_dlunknown;
16248
16249  if (self)
16250    {
16251      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
16252      else
16253        {
16254	  if (dlsym( self,"_fnord"))  status = $lt_dlneed_uscore;
16255          else puts (dlerror ());
16256	}
16257      /* dlclose (self); */
16258    }
16259  else
16260    puts (dlerror ());
16261
16262  return status;
16263}
16264_LT_EOF
16265  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
16266  (eval $ac_link) 2>&5
16267  ac_status=$?
16268  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
16269  test $ac_status = 0; } && test -s "conftest$ac_exeext" 2>/dev/null; then
16270    (./conftest; exit; ) >&5 2>/dev/null
16271    lt_status=$?
16272    case x$lt_status in
16273      x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;;
16274      x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;;
16275      x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;;
16276    esac
16277  else :
16278    # compilation failed
16279    lt_cv_dlopen_self_static=no
16280  fi
16281fi
16282rm -fr conftest*
16283
16284
16285fi
16286{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self_static" >&5
16287printf "%s\n" "$lt_cv_dlopen_self_static" >&6; }
16288    fi
16289
16290    CPPFLAGS=$save_CPPFLAGS
16291    LDFLAGS=$save_LDFLAGS
16292    LIBS=$save_LIBS
16293    ;;
16294  esac
16295
16296  case $lt_cv_dlopen_self in
16297  yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
16298  *) enable_dlopen_self=unknown ;;
16299  esac
16300
16301  case $lt_cv_dlopen_self_static in
16302  yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
16303  *) enable_dlopen_self_static=unknown ;;
16304  esac
16305fi
16306
16307
16308
16309
16310
16311
16312
16313
16314
16315
16316
16317
16318
16319
16320
16321
16322
16323striplib=
16324old_striplib=
16325{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5
16326printf %s "checking whether stripping libraries is possible... " >&6; }
16327if test -z "$STRIP"; then
16328  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
16329printf "%s\n" "no" >&6; }
16330else
16331  if $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
16332    old_striplib="$STRIP --strip-debug"
16333    striplib="$STRIP --strip-unneeded"
16334    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16335printf "%s\n" "yes" >&6; }
16336  else
16337    case $host_os in
16338    darwin*)
16339      # FIXME - insert some real tests, host_os isn't really good enough
16340      striplib="$STRIP -x"
16341      old_striplib="$STRIP -S"
16342      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16343printf "%s\n" "yes" >&6; }
16344      ;;
16345    freebsd*)
16346      if $STRIP -V 2>&1 | $GREP "elftoolchain" >/dev/null; then
16347        old_striplib="$STRIP --strip-debug"
16348        striplib="$STRIP --strip-unneeded"
16349        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16350printf "%s\n" "yes" >&6; }
16351      else
16352        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
16353printf "%s\n" "no" >&6; }
16354      fi
16355      ;;
16356    *)
16357      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
16358printf "%s\n" "no" >&6; }
16359      ;;
16360    esac
16361  fi
16362fi
16363
16364
16365
16366
16367
16368
16369
16370
16371
16372
16373
16374
16375  # Report what library types will actually be built
16376  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5
16377printf %s "checking if libtool supports shared libraries... " >&6; }
16378  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5
16379printf "%s\n" "$can_build_shared" >&6; }
16380
16381  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5
16382printf %s "checking whether to build shared libraries... " >&6; }
16383  test no = "$can_build_shared" && enable_shared=no
16384
16385  # On AIX, shared libraries and static libraries use the same namespace, and
16386  # are all built from PIC.
16387  case $host_os in
16388  aix3*)
16389    test yes = "$enable_shared" && enable_static=no
16390    if test -n "$RANLIB"; then
16391      archive_cmds="$archive_cmds~\$RANLIB \$lib"
16392      postinstall_cmds='$RANLIB $lib'
16393    fi
16394    ;;
16395
16396  aix[4-9]*)
16397    if test ia64 != "$host_cpu"; then
16398      case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in
16399      yes,aix,yes) ;;			# shared object as lib.so file only
16400      yes,svr4,*) ;;			# shared object as lib.so archive member only
16401      yes,*) enable_static=no ;;	# shared object in lib.a archive as well
16402      esac
16403    fi
16404    ;;
16405  esac
16406  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
16407printf "%s\n" "$enable_shared" >&6; }
16408
16409  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5
16410printf %s "checking whether to build static libraries... " >&6; }
16411  # Make sure either enable_shared or enable_static is yes.
16412  test yes = "$enable_shared" || enable_static=yes
16413  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5
16414printf "%s\n" "$enable_static" >&6; }
16415
16416
16417
16418
16419fi
16420ac_ext=c
16421ac_cpp='$CPP $CPPFLAGS'
16422ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16423ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16424ac_compiler_gnu=$ac_cv_c_compiler_gnu
16425
16426CC=$lt_save_CC
16427
16428
16429
16430
16431
16432
16433
16434
16435
16436
16437
16438
16439
16440
16441
16442        ac_config_commands="$ac_config_commands libtool"
16443
16444
16445
16446
16447# Only expand once:
16448
16449
16450
16451
16452# pkg-config is only needed for these options, do not require it otherwise
16453if test "$enable_systemd" = "yes" -o "$enable_dnstap" = "yes" -o "$with_pyunbound" = "yes" -o "$with_pythonmod" = "yes"; then
16454
16455
16456
16457
16458
16459
16460
16461if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
16462	if test -n "$ac_tool_prefix"; then
16463  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
16464set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
16465{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16466printf %s "checking for $ac_word... " >&6; }
16467if test ${ac_cv_path_PKG_CONFIG+y}
16468then :
16469  printf %s "(cached) " >&6
16470else $as_nop
16471  case $PKG_CONFIG in
16472  [\\/]* | ?:[\\/]*)
16473  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
16474  ;;
16475  *)
16476  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16477for as_dir in $PATH
16478do
16479  IFS=$as_save_IFS
16480  case $as_dir in #(((
16481    '') as_dir=./ ;;
16482    */) ;;
16483    *) as_dir=$as_dir/ ;;
16484  esac
16485    for ac_exec_ext in '' $ac_executable_extensions; do
16486  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
16487    ac_cv_path_PKG_CONFIG="$as_dir$ac_word$ac_exec_ext"
16488    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
16489    break 2
16490  fi
16491done
16492  done
16493IFS=$as_save_IFS
16494
16495  ;;
16496esac
16497fi
16498PKG_CONFIG=$ac_cv_path_PKG_CONFIG
16499if test -n "$PKG_CONFIG"; then
16500  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
16501printf "%s\n" "$PKG_CONFIG" >&6; }
16502else
16503  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
16504printf "%s\n" "no" >&6; }
16505fi
16506
16507
16508fi
16509if test -z "$ac_cv_path_PKG_CONFIG"; then
16510  ac_pt_PKG_CONFIG=$PKG_CONFIG
16511  # Extract the first word of "pkg-config", so it can be a program name with args.
16512set dummy pkg-config; ac_word=$2
16513{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16514printf %s "checking for $ac_word... " >&6; }
16515if test ${ac_cv_path_ac_pt_PKG_CONFIG+y}
16516then :
16517  printf %s "(cached) " >&6
16518else $as_nop
16519  case $ac_pt_PKG_CONFIG in
16520  [\\/]* | ?:[\\/]*)
16521  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
16522  ;;
16523  *)
16524  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16525for as_dir in $PATH
16526do
16527  IFS=$as_save_IFS
16528  case $as_dir in #(((
16529    '') as_dir=./ ;;
16530    */) ;;
16531    *) as_dir=$as_dir/ ;;
16532  esac
16533    for ac_exec_ext in '' $ac_executable_extensions; do
16534  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
16535    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir$ac_word$ac_exec_ext"
16536    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
16537    break 2
16538  fi
16539done
16540  done
16541IFS=$as_save_IFS
16542
16543  ;;
16544esac
16545fi
16546ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
16547if test -n "$ac_pt_PKG_CONFIG"; then
16548  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
16549printf "%s\n" "$ac_pt_PKG_CONFIG" >&6; }
16550else
16551  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
16552printf "%s\n" "no" >&6; }
16553fi
16554
16555  if test "x$ac_pt_PKG_CONFIG" = x; then
16556    PKG_CONFIG=""
16557  else
16558    case $cross_compiling:$ac_tool_warned in
16559yes:)
16560{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
16561printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
16562ac_tool_warned=yes ;;
16563esac
16564    PKG_CONFIG=$ac_pt_PKG_CONFIG
16565  fi
16566else
16567  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
16568fi
16569
16570fi
16571if test -n "$PKG_CONFIG"; then
16572	_pkg_min_version=0.9.0
16573	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
16574printf %s "checking pkg-config is at least version $_pkg_min_version... " >&6; }
16575	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
16576		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16577printf "%s\n" "yes" >&6; }
16578	else
16579		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
16580printf "%s\n" "no" >&6; }
16581		PKG_CONFIG=""
16582	fi
16583fi
16584if test -z "$PKG_CONFIG"; then
16585	as_fn_error $? "pkg-config not found" "$LINENO" 5
16586fi
16587fi
16588
16589# Checks for header files.
16590ac_fn_c_check_header_compile "$LINENO" "stdarg.h" "ac_cv_header_stdarg_h" "$ac_includes_default
16591"
16592if test "x$ac_cv_header_stdarg_h" = xyes
16593then :
16594  printf "%s\n" "#define HAVE_STDARG_H 1" >>confdefs.h
16595
16596fi
16597ac_fn_c_check_header_compile "$LINENO" "stdbool.h" "ac_cv_header_stdbool_h" "$ac_includes_default
16598"
16599if test "x$ac_cv_header_stdbool_h" = xyes
16600then :
16601  printf "%s\n" "#define HAVE_STDBOOL_H 1" >>confdefs.h
16602
16603fi
16604ac_fn_c_check_header_compile "$LINENO" "netinet/in.h" "ac_cv_header_netinet_in_h" "$ac_includes_default
16605"
16606if test "x$ac_cv_header_netinet_in_h" = xyes
16607then :
16608  printf "%s\n" "#define HAVE_NETINET_IN_H 1" >>confdefs.h
16609
16610fi
16611ac_fn_c_check_header_compile "$LINENO" "netinet/tcp.h" "ac_cv_header_netinet_tcp_h" "$ac_includes_default
16612"
16613if test "x$ac_cv_header_netinet_tcp_h" = xyes
16614then :
16615  printf "%s\n" "#define HAVE_NETINET_TCP_H 1" >>confdefs.h
16616
16617fi
16618ac_fn_c_check_header_compile "$LINENO" "sys/param.h" "ac_cv_header_sys_param_h" "$ac_includes_default
16619"
16620if test "x$ac_cv_header_sys_param_h" = xyes
16621then :
16622  printf "%s\n" "#define HAVE_SYS_PARAM_H 1" >>confdefs.h
16623
16624fi
16625ac_fn_c_check_header_compile "$LINENO" "sys/select.h" "ac_cv_header_sys_select_h" "$ac_includes_default
16626"
16627if test "x$ac_cv_header_sys_select_h" = xyes
16628then :
16629  printf "%s\n" "#define HAVE_SYS_SELECT_H 1" >>confdefs.h
16630
16631fi
16632ac_fn_c_check_header_compile "$LINENO" "sys/socket.h" "ac_cv_header_sys_socket_h" "$ac_includes_default
16633"
16634if test "x$ac_cv_header_sys_socket_h" = xyes
16635then :
16636  printf "%s\n" "#define HAVE_SYS_SOCKET_H 1" >>confdefs.h
16637
16638fi
16639ac_fn_c_check_header_compile "$LINENO" "sys/un.h" "ac_cv_header_sys_un_h" "$ac_includes_default
16640"
16641if test "x$ac_cv_header_sys_un_h" = xyes
16642then :
16643  printf "%s\n" "#define HAVE_SYS_UN_H 1" >>confdefs.h
16644
16645fi
16646ac_fn_c_check_header_compile "$LINENO" "sys/uio.h" "ac_cv_header_sys_uio_h" "$ac_includes_default
16647"
16648if test "x$ac_cv_header_sys_uio_h" = xyes
16649then :
16650  printf "%s\n" "#define HAVE_SYS_UIO_H 1" >>confdefs.h
16651
16652fi
16653ac_fn_c_check_header_compile "$LINENO" "sys/resource.h" "ac_cv_header_sys_resource_h" "$ac_includes_default
16654"
16655if test "x$ac_cv_header_sys_resource_h" = xyes
16656then :
16657  printf "%s\n" "#define HAVE_SYS_RESOURCE_H 1" >>confdefs.h
16658
16659fi
16660ac_fn_c_check_header_compile "$LINENO" "arpa/inet.h" "ac_cv_header_arpa_inet_h" "$ac_includes_default
16661"
16662if test "x$ac_cv_header_arpa_inet_h" = xyes
16663then :
16664  printf "%s\n" "#define HAVE_ARPA_INET_H 1" >>confdefs.h
16665
16666fi
16667ac_fn_c_check_header_compile "$LINENO" "syslog.h" "ac_cv_header_syslog_h" "$ac_includes_default
16668"
16669if test "x$ac_cv_header_syslog_h" = xyes
16670then :
16671  printf "%s\n" "#define HAVE_SYSLOG_H 1" >>confdefs.h
16672
16673fi
16674ac_fn_c_check_header_compile "$LINENO" "netdb.h" "ac_cv_header_netdb_h" "$ac_includes_default
16675"
16676if test "x$ac_cv_header_netdb_h" = xyes
16677then :
16678  printf "%s\n" "#define HAVE_NETDB_H 1" >>confdefs.h
16679
16680fi
16681ac_fn_c_check_header_compile "$LINENO" "sys/wait.h" "ac_cv_header_sys_wait_h" "$ac_includes_default
16682"
16683if test "x$ac_cv_header_sys_wait_h" = xyes
16684then :
16685  printf "%s\n" "#define HAVE_SYS_WAIT_H 1" >>confdefs.h
16686
16687fi
16688ac_fn_c_check_header_compile "$LINENO" "pwd.h" "ac_cv_header_pwd_h" "$ac_includes_default
16689"
16690if test "x$ac_cv_header_pwd_h" = xyes
16691then :
16692  printf "%s\n" "#define HAVE_PWD_H 1" >>confdefs.h
16693
16694fi
16695ac_fn_c_check_header_compile "$LINENO" "glob.h" "ac_cv_header_glob_h" "$ac_includes_default
16696"
16697if test "x$ac_cv_header_glob_h" = xyes
16698then :
16699  printf "%s\n" "#define HAVE_GLOB_H 1" >>confdefs.h
16700
16701fi
16702ac_fn_c_check_header_compile "$LINENO" "grp.h" "ac_cv_header_grp_h" "$ac_includes_default
16703"
16704if test "x$ac_cv_header_grp_h" = xyes
16705then :
16706  printf "%s\n" "#define HAVE_GRP_H 1" >>confdefs.h
16707
16708fi
16709ac_fn_c_check_header_compile "$LINENO" "login_cap.h" "ac_cv_header_login_cap_h" "$ac_includes_default
16710"
16711if test "x$ac_cv_header_login_cap_h" = xyes
16712then :
16713  printf "%s\n" "#define HAVE_LOGIN_CAP_H 1" >>confdefs.h
16714
16715fi
16716ac_fn_c_check_header_compile "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default
16717"
16718if test "x$ac_cv_header_winsock2_h" = xyes
16719then :
16720  printf "%s\n" "#define HAVE_WINSOCK2_H 1" >>confdefs.h
16721
16722fi
16723ac_fn_c_check_header_compile "$LINENO" "ws2tcpip.h" "ac_cv_header_ws2tcpip_h" "$ac_includes_default
16724"
16725if test "x$ac_cv_header_ws2tcpip_h" = xyes
16726then :
16727  printf "%s\n" "#define HAVE_WS2TCPIP_H 1" >>confdefs.h
16728
16729fi
16730ac_fn_c_check_header_compile "$LINENO" "endian.h" "ac_cv_header_endian_h" "$ac_includes_default
16731"
16732if test "x$ac_cv_header_endian_h" = xyes
16733then :
16734  printf "%s\n" "#define HAVE_ENDIAN_H 1" >>confdefs.h
16735
16736fi
16737ac_fn_c_check_header_compile "$LINENO" "sys/endian.h" "ac_cv_header_sys_endian_h" "$ac_includes_default
16738"
16739if test "x$ac_cv_header_sys_endian_h" = xyes
16740then :
16741  printf "%s\n" "#define HAVE_SYS_ENDIAN_H 1" >>confdefs.h
16742
16743fi
16744ac_fn_c_check_header_compile "$LINENO" "libkern/OSByteOrder.h" "ac_cv_header_libkern_OSByteOrder_h" "$ac_includes_default
16745"
16746if test "x$ac_cv_header_libkern_OSByteOrder_h" = xyes
16747then :
16748  printf "%s\n" "#define HAVE_LIBKERN_OSBYTEORDER_H 1" >>confdefs.h
16749
16750fi
16751ac_fn_c_check_header_compile "$LINENO" "sys/ipc.h" "ac_cv_header_sys_ipc_h" "$ac_includes_default
16752"
16753if test "x$ac_cv_header_sys_ipc_h" = xyes
16754then :
16755  printf "%s\n" "#define HAVE_SYS_IPC_H 1" >>confdefs.h
16756
16757fi
16758ac_fn_c_check_header_compile "$LINENO" "sys/shm.h" "ac_cv_header_sys_shm_h" "$ac_includes_default
16759"
16760if test "x$ac_cv_header_sys_shm_h" = xyes
16761then :
16762  printf "%s\n" "#define HAVE_SYS_SHM_H 1" >>confdefs.h
16763
16764fi
16765ac_fn_c_check_header_compile "$LINENO" "ifaddrs.h" "ac_cv_header_ifaddrs_h" "$ac_includes_default
16766"
16767if test "x$ac_cv_header_ifaddrs_h" = xyes
16768then :
16769  printf "%s\n" "#define HAVE_IFADDRS_H 1" >>confdefs.h
16770
16771fi
16772ac_fn_c_check_header_compile "$LINENO" "poll.h" "ac_cv_header_poll_h" "$ac_includes_default
16773"
16774if test "x$ac_cv_header_poll_h" = xyes
16775then :
16776  printf "%s\n" "#define HAVE_POLL_H 1" >>confdefs.h
16777
16778fi
16779
16780# net/if.h portability for Darwin see:
16781# https://www.gnu.org/software/autoconf/manual/autoconf-2.69/html_node/Header-Portability.html
16782ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "
16783#include <stdio.h>
16784#ifdef STDC_HEADERS
16785# include <stdlib.h>
16786# include <stddef.h>
16787#else
16788# ifdef HAVE_STDLIB_H
16789#  include <stdlib.h>
16790# endif
16791#endif
16792#ifdef HAVE_SYS_SOCKET_H
16793# include <sys/socket.h>
16794#endif
16795
16796"
16797if test "x$ac_cv_header_net_if_h" = xyes
16798then :
16799  printf "%s\n" "#define HAVE_NET_IF_H 1" >>confdefs.h
16800
16801fi
16802
16803
16804# Check for Apple header. This uncovers TARGET_OS_IPHONE, TARGET_OS_TV or TARGET_OS_WATCH
16805ac_fn_c_check_header_compile "$LINENO" "TargetConditionals.h" "ac_cv_header_TargetConditionals_h" "$ac_includes_default
16806"
16807if test "x$ac_cv_header_TargetConditionals_h" = xyes
16808then :
16809  printf "%s\n" "#define HAVE_TARGETCONDITIONALS_H 1" >>confdefs.h
16810
16811fi
16812
16813ac_fn_c_check_header_compile "$LINENO" "netioapi.h" "ac_cv_header_netioapi_h" "$ac_includes_default
16814#if HAVE_SYS_PARAM_H
16815#include <sys/param.h>
16816#endif
16817
16818#ifdef HAVE_SYS_SOCKET_H
16819#include <sys/socket.h>
16820#endif
16821
16822#ifdef HAVE_SYS_UIO_H
16823#include <sys/uio.h>
16824#endif
16825
16826#ifdef HAVE_NETINET_IN_H
16827#include <netinet/in.h>
16828#endif
16829
16830#ifdef HAVE_NETINET_TCP_H
16831#include <netinet/tcp.h>
16832#endif
16833
16834#ifdef HAVE_ARPA_INET_H
16835#include <arpa/inet.h>
16836#endif
16837
16838#ifdef HAVE_WINSOCK2_H
16839#include <winsock2.h>
16840#endif
16841
16842#ifdef HAVE_WS2TCPIP_H
16843#include <ws2tcpip.h>
16844#endif
16845
16846"
16847if test "x$ac_cv_header_netioapi_h" = xyes
16848then :
16849  printf "%s\n" "#define HAVE_NETIOAPI_H 1" >>confdefs.h
16850
16851fi
16852
16853
16854# Check for Linux timestamping headers
16855ac_fn_c_check_header_compile "$LINENO" "linux/net_tstamp.h" "ac_cv_header_linux_net_tstamp_h" "$ac_includes_default
16856"
16857if test "x$ac_cv_header_linux_net_tstamp_h" = xyes
16858then :
16859  printf "%s\n" "#define HAVE_LINUX_NET_TSTAMP_H 1" >>confdefs.h
16860
16861fi
16862
16863ac_fn_c_check_header_compile "$LINENO" "stdatomic.h" "ac_cv_header_stdatomic_h" "$ac_includes_default
16864"
16865if test "x$ac_cv_header_stdatomic_h" = xyes
16866then :
16867  printf "%s\n" "#define HAVE_STDATOMIC_H 1" >>confdefs.h
16868
16869fi
16870
16871
16872# check for types.
16873# Using own tests for int64* because autoconf builtin only give 32bit.
16874ac_fn_c_check_type "$LINENO" "int8_t" "ac_cv_type_int8_t" "$ac_includes_default"
16875if test "x$ac_cv_type_int8_t" = xyes
16876then :
16877
16878else $as_nop
16879
16880printf "%s\n" "#define int8_t signed char" >>confdefs.h
16881
16882fi
16883
16884ac_fn_c_check_type "$LINENO" "int16_t" "ac_cv_type_int16_t" "$ac_includes_default"
16885if test "x$ac_cv_type_int16_t" = xyes
16886then :
16887
16888else $as_nop
16889
16890printf "%s\n" "#define int16_t short" >>confdefs.h
16891
16892fi
16893
16894ac_fn_c_check_type "$LINENO" "int32_t" "ac_cv_type_int32_t" "$ac_includes_default"
16895if test "x$ac_cv_type_int32_t" = xyes
16896then :
16897
16898else $as_nop
16899
16900printf "%s\n" "#define int32_t int" >>confdefs.h
16901
16902fi
16903
16904ac_fn_c_check_type "$LINENO" "int64_t" "ac_cv_type_int64_t" "$ac_includes_default"
16905if test "x$ac_cv_type_int64_t" = xyes
16906then :
16907
16908else $as_nop
16909
16910printf "%s\n" "#define int64_t long long" >>confdefs.h
16911
16912fi
16913
16914ac_fn_c_check_type "$LINENO" "uint8_t" "ac_cv_type_uint8_t" "$ac_includes_default"
16915if test "x$ac_cv_type_uint8_t" = xyes
16916then :
16917
16918else $as_nop
16919
16920printf "%s\n" "#define uint8_t unsigned char" >>confdefs.h
16921
16922fi
16923
16924ac_fn_c_check_type "$LINENO" "uint16_t" "ac_cv_type_uint16_t" "$ac_includes_default"
16925if test "x$ac_cv_type_uint16_t" = xyes
16926then :
16927
16928else $as_nop
16929
16930printf "%s\n" "#define uint16_t unsigned short" >>confdefs.h
16931
16932fi
16933
16934ac_fn_c_check_type "$LINENO" "uint32_t" "ac_cv_type_uint32_t" "$ac_includes_default"
16935if test "x$ac_cv_type_uint32_t" = xyes
16936then :
16937
16938else $as_nop
16939
16940printf "%s\n" "#define uint32_t unsigned int" >>confdefs.h
16941
16942fi
16943
16944ac_fn_c_check_type "$LINENO" "uint64_t" "ac_cv_type_uint64_t" "$ac_includes_default"
16945if test "x$ac_cv_type_uint64_t" = xyes
16946then :
16947
16948else $as_nop
16949
16950printf "%s\n" "#define uint64_t unsigned long long" >>confdefs.h
16951
16952fi
16953
16954ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
16955if test "x$ac_cv_type_size_t" = xyes
16956then :
16957
16958else $as_nop
16959
16960printf "%s\n" "#define size_t unsigned int" >>confdefs.h
16961
16962fi
16963
16964ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
16965if test "x$ac_cv_type_ssize_t" = xyes
16966then :
16967
16968else $as_nop
16969
16970printf "%s\n" "#define ssize_t int" >>confdefs.h
16971
16972fi
16973
16974ac_ext=c
16975ac_cpp='$CPP $CPPFLAGS'
16976ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16977ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16978ac_compiler_gnu=$ac_cv_c_compiler_gnu
16979{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
16980printf %s "checking how to run the C preprocessor... " >&6; }
16981# On Suns, sometimes $CPP names a directory.
16982if test -n "$CPP" && test -d "$CPP"; then
16983  CPP=
16984fi
16985if test -z "$CPP"; then
16986  if test ${ac_cv_prog_CPP+y}
16987then :
16988  printf %s "(cached) " >&6
16989else $as_nop
16990      # Double quotes because $CC needs to be expanded
16991    for CPP in "$CC -E" "$CC -E -traditional-cpp" cpp /lib/cpp
16992    do
16993      ac_preproc_ok=false
16994for ac_c_preproc_warn_flag in '' yes
16995do
16996  # Use a header file that comes with gcc, so configuring glibc
16997  # with a fresh cross-compiler works.
16998  # On the NeXT, cc -E runs the code through the compiler's parser,
16999  # not just through cpp. "Syntax error" is here to catch this case.
17000  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17001/* end confdefs.h.  */
17002#include <limits.h>
17003		     Syntax error
17004_ACEOF
17005if ac_fn_c_try_cpp "$LINENO"
17006then :
17007
17008else $as_nop
17009  # Broken: fails on valid input.
17010continue
17011fi
17012rm -f conftest.err conftest.i conftest.$ac_ext
17013
17014  # OK, works on sane cases.  Now check whether nonexistent headers
17015  # can be detected and how.
17016  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17017/* end confdefs.h.  */
17018#include <ac_nonexistent.h>
17019_ACEOF
17020if ac_fn_c_try_cpp "$LINENO"
17021then :
17022  # Broken: success on invalid input.
17023continue
17024else $as_nop
17025  # Passes both tests.
17026ac_preproc_ok=:
17027break
17028fi
17029rm -f conftest.err conftest.i conftest.$ac_ext
17030
17031done
17032# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
17033rm -f conftest.i conftest.err conftest.$ac_ext
17034if $ac_preproc_ok
17035then :
17036  break
17037fi
17038
17039    done
17040    ac_cv_prog_CPP=$CPP
17041
17042fi
17043  CPP=$ac_cv_prog_CPP
17044else
17045  ac_cv_prog_CPP=$CPP
17046fi
17047{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
17048printf "%s\n" "$CPP" >&6; }
17049ac_preproc_ok=false
17050for ac_c_preproc_warn_flag in '' yes
17051do
17052  # Use a header file that comes with gcc, so configuring glibc
17053  # with a fresh cross-compiler works.
17054  # On the NeXT, cc -E runs the code through the compiler's parser,
17055  # not just through cpp. "Syntax error" is here to catch this case.
17056  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17057/* end confdefs.h.  */
17058#include <limits.h>
17059		     Syntax error
17060_ACEOF
17061if ac_fn_c_try_cpp "$LINENO"
17062then :
17063
17064else $as_nop
17065  # Broken: fails on valid input.
17066continue
17067fi
17068rm -f conftest.err conftest.i conftest.$ac_ext
17069
17070  # OK, works on sane cases.  Now check whether nonexistent headers
17071  # can be detected and how.
17072  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17073/* end confdefs.h.  */
17074#include <ac_nonexistent.h>
17075_ACEOF
17076if ac_fn_c_try_cpp "$LINENO"
17077then :
17078  # Broken: success on invalid input.
17079continue
17080else $as_nop
17081  # Passes both tests.
17082ac_preproc_ok=:
17083break
17084fi
17085rm -f conftest.err conftest.i conftest.$ac_ext
17086
17087done
17088# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
17089rm -f conftest.i conftest.err conftest.$ac_ext
17090if $ac_preproc_ok
17091then :
17092
17093else $as_nop
17094  { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
17095printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
17096as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
17097See \`config.log' for more details" "$LINENO" 5; }
17098fi
17099
17100ac_ext=c
17101ac_cpp='$CPP $CPPFLAGS'
17102ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
17103ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
17104ac_compiler_gnu=$ac_cv_c_compiler_gnu
17105
17106
17107{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
17108printf %s "checking for uid_t in sys/types.h... " >&6; }
17109if test ${ac_cv_type_uid_t+y}
17110then :
17111  printf %s "(cached) " >&6
17112else $as_nop
17113  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17114/* end confdefs.h.  */
17115#include <sys/types.h>
17116
17117_ACEOF
17118if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
17119  $EGREP "uid_t" >/dev/null 2>&1
17120then :
17121  ac_cv_type_uid_t=yes
17122else $as_nop
17123  ac_cv_type_uid_t=no
17124fi
17125rm -rf conftest*
17126
17127fi
17128{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
17129printf "%s\n" "$ac_cv_type_uid_t" >&6; }
17130if test $ac_cv_type_uid_t = no; then
17131
17132printf "%s\n" "#define uid_t int" >>confdefs.h
17133
17134
17135printf "%s\n" "#define gid_t int" >>confdefs.h
17136
17137fi
17138
17139
17140  ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default
17141"
17142if test "x$ac_cv_type_pid_t" = xyes
17143then :
17144
17145else $as_nop
17146                                          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17147/* end confdefs.h.  */
17148
17149          #if defined _WIN64 && !defined __CYGWIN__
17150          LLP64
17151          #endif
17152
17153int
17154main (void)
17155{
17156
17157  ;
17158  return 0;
17159}
17160
17161_ACEOF
17162if ac_fn_c_try_compile "$LINENO"
17163then :
17164  ac_pid_type='int'
17165else $as_nop
17166  ac_pid_type='__int64'
17167fi
17168rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
17169
17170printf "%s\n" "#define pid_t $ac_pid_type" >>confdefs.h
17171
17172
17173fi
17174
17175
17176ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
17177if test "x$ac_cv_type_off_t" = xyes
17178then :
17179
17180else $as_nop
17181
17182printf "%s\n" "#define off_t long int" >>confdefs.h
17183
17184fi
17185
17186ac_fn_c_check_type "$LINENO" "u_char" "ac_cv_type_u_char" "
17187$ac_includes_default
17188#ifdef HAVE_WINSOCK2_H
17189#  include <winsock2.h>
17190#endif
17191
17192"
17193if test "x$ac_cv_type_u_char" = xyes
17194then :
17195
17196else $as_nop
17197
17198printf "%s\n" "#define u_char unsigned char" >>confdefs.h
17199
17200fi
17201
17202ac_fn_c_check_type "$LINENO" "rlim_t" "ac_cv_type_rlim_t" "
17203$ac_includes_default
17204#ifdef HAVE_SYS_RESOURCE_H
17205#  include <sys/resource.h>
17206#endif
17207
17208"
17209if test "x$ac_cv_type_rlim_t" = xyes
17210then :
17211
17212else $as_nop
17213
17214printf "%s\n" "#define rlim_t unsigned long" >>confdefs.h
17215
17216fi
17217
17218
17219ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
17220$ac_includes_default
17221#ifdef HAVE_SYS_SOCKET_H
17222#  include <sys/socket.h>
17223#endif
17224#ifdef HAVE_WS2TCPIP_H
17225#  include <ws2tcpip.h>
17226#endif
17227
17228"
17229if test "x$ac_cv_type_socklen_t" = xyes
17230then :
17231
17232else $as_nop
17233
17234printf "%s\n" "#define socklen_t int" >>confdefs.h
17235
17236fi
17237
17238 ac_fn_c_check_type "$LINENO" "in_addr_t" "ac_cv_type_in_addr_t" "
17239$ac_includes_default
17240#ifdef HAVE_SYS_TYPES_H
17241# include <sys/types.h>
17242#endif
17243#ifdef HAVE_NETINET_IN_H
17244# include <netinet/in.h>
17245#endif
17246
17247"
17248if test "x$ac_cv_type_in_addr_t" = xyes
17249then :
17250
17251else $as_nop
17252
17253printf "%s\n" "#define in_addr_t uint32_t" >>confdefs.h
17254
17255fi
17256
17257 ac_fn_c_check_type "$LINENO" "in_port_t" "ac_cv_type_in_port_t" "
17258$ac_includes_default
17259#ifdef HAVE_SYS_TYPES_H
17260# include <sys/types.h>
17261#endif
17262#ifdef HAVE_NETINET_IN_H
17263# include <netinet/in.h>
17264#endif
17265
17266"
17267if test "x$ac_cv_type_in_port_t" = xyes
17268then :
17269
17270else $as_nop
17271
17272printf "%s\n" "#define in_port_t uint16_t" >>confdefs.h
17273
17274fi
17275
17276{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if memcmp compares unsigned" >&5
17277printf %s "checking if memcmp compares unsigned... " >&6; }
17278if test "$cross_compiling" = yes
17279then :
17280   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: cross-compile no" >&5
17281printf "%s\n" "cross-compile no" >&6; }
17282
17283printf "%s\n" "#define MEMCMP_IS_BROKEN 1" >>confdefs.h
17284
17285  case " $LIBOBJS " in
17286  *" memcmp.$ac_objext "* ) ;;
17287  *) LIBOBJS="$LIBOBJS memcmp.$ac_objext"
17288 ;;
17289esac
17290
17291
17292else $as_nop
17293  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17294/* end confdefs.h.  */
17295
17296#include <stdio.h>
17297#include <stdlib.h>
17298#include <string.h>
17299int main(void)
17300{
17301	char a = 255, b = 0;
17302	if(memcmp(&a, &b, 1) < 0)
17303		return 1;
17304	return 0;
17305}
17306
17307_ACEOF
17308if ac_fn_c_try_run "$LINENO"
17309then :
17310  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17311printf "%s\n" "yes" >&6; }
17312else $as_nop
17313   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
17314printf "%s\n" "no" >&6; }
17315
17316printf "%s\n" "#define MEMCMP_IS_BROKEN 1" >>confdefs.h
17317
17318  case " $LIBOBJS " in
17319  *" memcmp.$ac_objext "* ) ;;
17320  *) LIBOBJS="$LIBOBJS memcmp.$ac_objext"
17321 ;;
17322esac
17323
17324
17325fi
17326rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17327  conftest.$ac_objext conftest.beam conftest.$ac_ext
17328fi
17329
17330
17331# The cast to long int works around a bug in the HP C Compiler
17332# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
17333# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
17334# This bug is HP SR number 8606223364.
17335{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
17336printf %s "checking size of time_t... " >&6; }
17337if test ${ac_cv_sizeof_time_t+y}
17338then :
17339  printf %s "(cached) " >&6
17340else $as_nop
17341  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t"        "
17342$ac_includes_default
17343#ifdef TIME_WITH_SYS_TIME
17344# include <sys/time.h>
17345# include <time.h>
17346#else
17347# ifdef HAVE_SYS_TIME_H
17348#  include <sys/time.h>
17349# else
17350#  include <time.h>
17351# endif
17352#endif
17353
17354"
17355then :
17356
17357else $as_nop
17358  if test "$ac_cv_type_time_t" = yes; then
17359     { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
17360printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
17361as_fn_error 77 "cannot compute sizeof (time_t)
17362See \`config.log' for more details" "$LINENO" 5; }
17363   else
17364     ac_cv_sizeof_time_t=0
17365   fi
17366fi
17367
17368fi
17369{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
17370printf "%s\n" "$ac_cv_sizeof_time_t" >&6; }
17371
17372
17373
17374printf "%s\n" "#define SIZEOF_TIME_T $ac_cv_sizeof_time_t" >>confdefs.h
17375
17376
17377# The cast to long int works around a bug in the HP C Compiler
17378# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
17379# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
17380# This bug is HP SR number 8606223364.
17381{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
17382printf %s "checking size of size_t... " >&6; }
17383if test ${ac_cv_sizeof_size_t+y}
17384then :
17385  printf %s "(cached) " >&6
17386else $as_nop
17387  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (size_t))" "ac_cv_sizeof_size_t"        "$ac_includes_default"
17388then :
17389
17390else $as_nop
17391  if test "$ac_cv_type_size_t" = yes; then
17392     { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
17393printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
17394as_fn_error 77 "cannot compute sizeof (size_t)
17395See \`config.log' for more details" "$LINENO" 5; }
17396   else
17397     ac_cv_sizeof_size_t=0
17398   fi
17399fi
17400
17401fi
17402{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
17403printf "%s\n" "$ac_cv_sizeof_size_t" >&6; }
17404
17405
17406
17407printf "%s\n" "#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t" >>confdefs.h
17408
17409
17410
17411# add option to disable the evil rpath
17412
17413# Check whether --enable-rpath was given.
17414if test ${enable_rpath+y}
17415then :
17416  enableval=$enable_rpath; enable_rpath=$enableval
17417else $as_nop
17418  enable_rpath=yes
17419fi
17420
17421if test "x$enable_rpath" = xno; then
17422		ac_config_commands="$ac_config_commands disable-rpath"
17423
17424fi
17425
17426
17427
17428# check to see if libraries are needed for these functions.
17429{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing inet_pton" >&5
17430printf %s "checking for library containing inet_pton... " >&6; }
17431if test ${ac_cv_search_inet_pton+y}
17432then :
17433  printf %s "(cached) " >&6
17434else $as_nop
17435  ac_func_search_save_LIBS=$LIBS
17436cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17437/* end confdefs.h.  */
17438
17439/* Override any GCC internal prototype to avoid an error.
17440   Use char because int might match the return type of a GCC
17441   builtin and then its argument prototype would still apply.  */
17442char inet_pton ();
17443int
17444main (void)
17445{
17446return inet_pton ();
17447  ;
17448  return 0;
17449}
17450_ACEOF
17451for ac_lib in '' nsl
17452do
17453  if test -z "$ac_lib"; then
17454    ac_res="none required"
17455  else
17456    ac_res=-l$ac_lib
17457    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
17458  fi
17459  if ac_fn_c_try_link "$LINENO"
17460then :
17461  ac_cv_search_inet_pton=$ac_res
17462fi
17463rm -f core conftest.err conftest.$ac_objext conftest.beam \
17464    conftest$ac_exeext
17465  if test ${ac_cv_search_inet_pton+y}
17466then :
17467  break
17468fi
17469done
17470if test ${ac_cv_search_inet_pton+y}
17471then :
17472
17473else $as_nop
17474  ac_cv_search_inet_pton=no
17475fi
17476rm conftest.$ac_ext
17477LIBS=$ac_func_search_save_LIBS
17478fi
17479{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_inet_pton" >&5
17480printf "%s\n" "$ac_cv_search_inet_pton" >&6; }
17481ac_res=$ac_cv_search_inet_pton
17482if test "$ac_res" != no
17483then :
17484  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
17485
17486fi
17487
17488{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing socket" >&5
17489printf %s "checking for library containing socket... " >&6; }
17490if test ${ac_cv_search_socket+y}
17491then :
17492  printf %s "(cached) " >&6
17493else $as_nop
17494  ac_func_search_save_LIBS=$LIBS
17495cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17496/* end confdefs.h.  */
17497
17498/* Override any GCC internal prototype to avoid an error.
17499   Use char because int might match the return type of a GCC
17500   builtin and then its argument prototype would still apply.  */
17501char socket ();
17502int
17503main (void)
17504{
17505return socket ();
17506  ;
17507  return 0;
17508}
17509_ACEOF
17510for ac_lib in '' socket
17511do
17512  if test -z "$ac_lib"; then
17513    ac_res="none required"
17514  else
17515    ac_res=-l$ac_lib
17516    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
17517  fi
17518  if ac_fn_c_try_link "$LINENO"
17519then :
17520  ac_cv_search_socket=$ac_res
17521fi
17522rm -f core conftest.err conftest.$ac_objext conftest.beam \
17523    conftest$ac_exeext
17524  if test ${ac_cv_search_socket+y}
17525then :
17526  break
17527fi
17528done
17529if test ${ac_cv_search_socket+y}
17530then :
17531
17532else $as_nop
17533  ac_cv_search_socket=no
17534fi
17535rm conftest.$ac_ext
17536LIBS=$ac_func_search_save_LIBS
17537fi
17538{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socket" >&5
17539printf "%s\n" "$ac_cv_search_socket" >&6; }
17540ac_res=$ac_cv_search_socket
17541if test "$ac_res" != no
17542then :
17543  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
17544
17545fi
17546
17547
17548# check whether strptime also works
17549
17550# check some functions of the OS before linking libs (while still runnable).
17551{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working chown" >&5
17552printf %s "checking for working chown... " >&6; }
17553if test ${ac_cv_func_chown_works+y}
17554then :
17555  printf %s "(cached) " >&6
17556else $as_nop
17557  if test "$cross_compiling" = yes
17558then :
17559  case "$host_os" in # ((
17560			  # Guess yes on glibc systems.
17561		  *-gnu*) ac_cv_func_chown_works=yes ;;
17562			  # If we don't know, assume the worst.
17563		  *)      ac_cv_func_chown_works=no ;;
17564		esac
17565else $as_nop
17566  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17567/* end confdefs.h.  */
17568$ac_includes_default
17569#include <fcntl.h>
17570
17571int
17572main (void)
17573{
17574  char *f = "conftest.chown";
17575  struct stat before, after;
17576
17577  if (creat (f, 0600) < 0)
17578    return 1;
17579  if (stat (f, &before) < 0)
17580    return 1;
17581  if (chown (f, (uid_t) -1, (gid_t) -1) == -1)
17582    return 1;
17583  if (stat (f, &after) < 0)
17584    return 1;
17585  return ! (before.st_uid == after.st_uid && before.st_gid == after.st_gid);
17586
17587  ;
17588  return 0;
17589}
17590_ACEOF
17591if ac_fn_c_try_run "$LINENO"
17592then :
17593  ac_cv_func_chown_works=yes
17594else $as_nop
17595  ac_cv_func_chown_works=no
17596fi
17597rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17598  conftest.$ac_objext conftest.beam conftest.$ac_ext
17599fi
17600
17601rm -f conftest.chown
17602
17603fi
17604{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_chown_works" >&5
17605printf "%s\n" "$ac_cv_func_chown_works" >&6; }
17606if test $ac_cv_func_chown_works = yes; then
17607
17608printf "%s\n" "#define HAVE_CHOWN 1" >>confdefs.h
17609
17610fi
17611
17612
17613ac_func=
17614for ac_item in $ac_func_c_list
17615do
17616  if test $ac_func; then
17617    ac_fn_c_check_func "$LINENO" $ac_func ac_cv_func_$ac_func
17618    if eval test \"x\$ac_cv_func_$ac_func\" = xyes; then
17619      echo "#define $ac_item 1" >> confdefs.h
17620    fi
17621    ac_func=
17622  else
17623    ac_func=$ac_item
17624  fi
17625done
17626
17627
17628
17629if test "x$ac_cv_func_fork" = xyes; then
17630  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5
17631printf %s "checking for working fork... " >&6; }
17632if test ${ac_cv_func_fork_works+y}
17633then :
17634  printf %s "(cached) " >&6
17635else $as_nop
17636  if test "$cross_compiling" = yes
17637then :
17638  ac_cv_func_fork_works=cross
17639else $as_nop
17640  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17641/* end confdefs.h.  */
17642$ac_includes_default
17643int
17644main (void)
17645{
17646
17647	  /* By Ruediger Kuhlmann. */
17648	  return fork () < 0;
17649
17650  ;
17651  return 0;
17652}
17653_ACEOF
17654if ac_fn_c_try_run "$LINENO"
17655then :
17656  ac_cv_func_fork_works=yes
17657else $as_nop
17658  ac_cv_func_fork_works=no
17659fi
17660rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17661  conftest.$ac_objext conftest.beam conftest.$ac_ext
17662fi
17663
17664fi
17665{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5
17666printf "%s\n" "$ac_cv_func_fork_works" >&6; }
17667
17668else
17669  ac_cv_func_fork_works=$ac_cv_func_fork
17670fi
17671if test "x$ac_cv_func_fork_works" = xcross; then
17672  case $host in
17673    *-*-amigaos* | *-*-msdosdjgpp*)
17674      # Override, as these systems have only a dummy fork() stub
17675      ac_cv_func_fork_works=no
17676      ;;
17677    *)
17678      ac_cv_func_fork_works=yes
17679      ;;
17680  esac
17681  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
17682printf "%s\n" "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
17683fi
17684ac_cv_func_vfork_works=$ac_cv_func_vfork
17685if test "x$ac_cv_func_vfork" = xyes; then
17686  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5
17687printf %s "checking for working vfork... " >&6; }
17688if test ${ac_cv_func_vfork_works+y}
17689then :
17690  printf %s "(cached) " >&6
17691else $as_nop
17692  if test "$cross_compiling" = yes
17693then :
17694  ac_cv_func_vfork_works=cross
17695else $as_nop
17696  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17697/* end confdefs.h.  */
17698/* Thanks to Paul Eggert for this test.  */
17699$ac_includes_default
17700#include <signal.h>
17701#include <sys/wait.h>
17702#ifdef HAVE_VFORK_H
17703# include <vfork.h>
17704#endif
17705
17706static void
17707do_nothing (int sig)
17708{
17709  (void) sig;
17710}
17711
17712/* On some sparc systems, changes by the child to local and incoming
17713   argument registers are propagated back to the parent.  The compiler
17714   is told about this with #include <vfork.h>, but some compilers
17715   (e.g. gcc -O) don't grok <vfork.h>.  Test for this by using a
17716   static variable whose address is put into a register that is
17717   clobbered by the vfork.  */
17718static void
17719sparc_address_test (int arg)
17720{
17721  static pid_t child;
17722  if (!child) {
17723    child = vfork ();
17724    if (child < 0) {
17725      perror ("vfork");
17726      _exit(2);
17727    }
17728    if (!child) {
17729      arg = getpid();
17730      write(-1, "", 0);
17731      _exit (arg);
17732    }
17733  }
17734}
17735
17736int
17737main (void)
17738{
17739  pid_t parent = getpid ();
17740  pid_t child;
17741
17742  sparc_address_test (0);
17743
17744  /* On Solaris 2.4, changes by the child to the signal handler
17745     also munge signal handlers in the parent.  To detect this,
17746     start by putting the parent's handler in a known state.  */
17747  signal (SIGTERM, SIG_DFL);
17748
17749  child = vfork ();
17750
17751  if (child == 0) {
17752    /* Here is another test for sparc vfork register problems.  This
17753       test uses lots of local variables, at least as many local
17754       variables as main has allocated so far including compiler
17755       temporaries.  4 locals are enough for gcc 1.40.3 on a Solaris
17756       4.1.3 sparc, but we use 8 to be safe.  A buggy compiler should
17757       reuse the register of parent for one of the local variables,
17758       since it will think that parent can't possibly be used any more
17759       in this routine.  Assigning to the local variable will thus
17760       munge parent in the parent process.  */
17761    pid_t
17762      p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
17763      p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
17764    /* Convince the compiler that p..p7 are live; otherwise, it might
17765       use the same hardware register for all 8 local variables.  */
17766    if (p != p1 || p != p2 || p != p3 || p != p4
17767	|| p != p5 || p != p6 || p != p7)
17768      _exit(1);
17769
17770    /* Alter the child's signal handler.  */
17771    if (signal (SIGTERM, do_nothing) != SIG_DFL)
17772      _exit(1);
17773
17774    /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
17775       from child file descriptors.  If the child closes a descriptor
17776       before it execs or exits, this munges the parent's descriptor
17777       as well.  Test for this by closing stdout in the child.  */
17778    _exit(close(fileno(stdout)) != 0);
17779  } else {
17780    int status;
17781    struct stat st;
17782
17783    while (wait(&status) != child)
17784      ;
17785    return (
17786	 /* Was there some problem with vforking?  */
17787	 child < 0
17788
17789	 /* Did the child munge the parent's signal handler?  */
17790	 || signal (SIGTERM, SIG_DFL) != SIG_DFL
17791
17792	 /* Did the child fail?  (This shouldn't happen.)  */
17793	 || status
17794
17795	 /* Did the vfork/compiler bug occur?  */
17796	 || parent != getpid()
17797
17798	 /* Did the file descriptor bug occur?  */
17799	 || fstat(fileno(stdout), &st) != 0
17800	 );
17801  }
17802}
17803_ACEOF
17804if ac_fn_c_try_run "$LINENO"
17805then :
17806  ac_cv_func_vfork_works=yes
17807else $as_nop
17808  ac_cv_func_vfork_works=no
17809fi
17810rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17811  conftest.$ac_objext conftest.beam conftest.$ac_ext
17812fi
17813
17814fi
17815{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5
17816printf "%s\n" "$ac_cv_func_vfork_works" >&6; }
17817
17818fi;
17819if test "x$ac_cv_func_fork_works" = xcross; then
17820  ac_cv_func_vfork_works=$ac_cv_func_vfork
17821  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
17822printf "%s\n" "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
17823fi
17824
17825if test "x$ac_cv_func_vfork_works" = xyes; then
17826
17827printf "%s\n" "#define HAVE_WORKING_VFORK 1" >>confdefs.h
17828
17829else
17830
17831printf "%s\n" "#define vfork fork" >>confdefs.h
17832
17833fi
17834if test "x$ac_cv_func_fork_works" = xyes; then
17835
17836printf "%s\n" "#define HAVE_WORKING_FORK 1" >>confdefs.h
17837
17838fi
17839
17840
17841printf "%s\n" "#define RETSIGTYPE void" >>confdefs.h
17842
17843{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for _LARGEFILE_SOURCE value needed for large files" >&5
17844printf %s "checking for _LARGEFILE_SOURCE value needed for large files... " >&6; }
17845if test ${ac_cv_sys_largefile_source+y}
17846then :
17847  printf %s "(cached) " >&6
17848else $as_nop
17849  while :; do
17850  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17851/* end confdefs.h.  */
17852#include <sys/types.h> /* for off_t */
17853     #include <stdio.h>
17854int
17855main (void)
17856{
17857int (*fp) (FILE *, off_t, int) = fseeko;
17858     return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
17859  ;
17860  return 0;
17861}
17862_ACEOF
17863if ac_fn_c_try_link "$LINENO"
17864then :
17865  ac_cv_sys_largefile_source=no; break
17866fi
17867rm -f core conftest.err conftest.$ac_objext conftest.beam \
17868    conftest$ac_exeext conftest.$ac_ext
17869  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17870/* end confdefs.h.  */
17871#define _LARGEFILE_SOURCE 1
17872#include <sys/types.h> /* for off_t */
17873     #include <stdio.h>
17874int
17875main (void)
17876{
17877int (*fp) (FILE *, off_t, int) = fseeko;
17878     return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
17879  ;
17880  return 0;
17881}
17882_ACEOF
17883if ac_fn_c_try_link "$LINENO"
17884then :
17885  ac_cv_sys_largefile_source=1; break
17886fi
17887rm -f core conftest.err conftest.$ac_objext conftest.beam \
17888    conftest$ac_exeext conftest.$ac_ext
17889  ac_cv_sys_largefile_source=unknown
17890  break
17891done
17892fi
17893{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_source" >&5
17894printf "%s\n" "$ac_cv_sys_largefile_source" >&6; }
17895case $ac_cv_sys_largefile_source in #(
17896  no | unknown) ;;
17897  *)
17898printf "%s\n" "#define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source" >>confdefs.h
17899;;
17900esac
17901rm -rf conftest*
17902
17903# We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
17904# in glibc 2.1.3, but that breaks too many other things.
17905# If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
17906if test $ac_cv_sys_largefile_source != unknown; then
17907
17908printf "%s\n" "#define HAVE_FSEEKO 1" >>confdefs.h
17909
17910fi
17911
17912
17913# Check whether --enable-largefile was given.
17914if test ${enable_largefile+y}
17915then :
17916  enableval=$enable_largefile;
17917fi
17918
17919if test "$enable_largefile" != no; then
17920
17921  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
17922printf %s "checking for special C compiler options needed for large files... " >&6; }
17923if test ${ac_cv_sys_largefile_CC+y}
17924then :
17925  printf %s "(cached) " >&6
17926else $as_nop
17927  ac_cv_sys_largefile_CC=no
17928     if test "$GCC" != yes; then
17929       ac_save_CC=$CC
17930       while :; do
17931	 # IRIX 6.2 and later do not support large files by default,
17932	 # so use the C compiler's -n32 option if that helps.
17933	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17934/* end confdefs.h.  */
17935#include <sys/types.h>
17936 /* Check that off_t can represent 2**63 - 1 correctly.
17937    We can't simply define LARGE_OFF_T to be 9223372036854775807,
17938    since some C++ compilers masquerading as C compilers
17939    incorrectly reject 9223372036854775807.  */
17940#define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31))
17941  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
17942		       && LARGE_OFF_T % 2147483647 == 1)
17943		      ? 1 : -1];
17944int
17945main (void)
17946{
17947
17948  ;
17949  return 0;
17950}
17951_ACEOF
17952	 if ac_fn_c_try_compile "$LINENO"
17953then :
17954  break
17955fi
17956rm -f core conftest.err conftest.$ac_objext conftest.beam
17957	 CC="$CC -n32"
17958	 if ac_fn_c_try_compile "$LINENO"
17959then :
17960  ac_cv_sys_largefile_CC=' -n32'; break
17961fi
17962rm -f core conftest.err conftest.$ac_objext conftest.beam
17963	 break
17964       done
17965       CC=$ac_save_CC
17966       rm -f conftest.$ac_ext
17967    fi
17968fi
17969{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
17970printf "%s\n" "$ac_cv_sys_largefile_CC" >&6; }
17971  if test "$ac_cv_sys_largefile_CC" != no; then
17972    CC=$CC$ac_cv_sys_largefile_CC
17973  fi
17974
17975  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
17976printf %s "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
17977if test ${ac_cv_sys_file_offset_bits+y}
17978then :
17979  printf %s "(cached) " >&6
17980else $as_nop
17981  while :; do
17982  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17983/* end confdefs.h.  */
17984#include <sys/types.h>
17985 /* Check that off_t can represent 2**63 - 1 correctly.
17986    We can't simply define LARGE_OFF_T to be 9223372036854775807,
17987    since some C++ compilers masquerading as C compilers
17988    incorrectly reject 9223372036854775807.  */
17989#define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31))
17990  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
17991		       && LARGE_OFF_T % 2147483647 == 1)
17992		      ? 1 : -1];
17993int
17994main (void)
17995{
17996
17997  ;
17998  return 0;
17999}
18000_ACEOF
18001if ac_fn_c_try_compile "$LINENO"
18002then :
18003  ac_cv_sys_file_offset_bits=no; break
18004fi
18005rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
18006  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18007/* end confdefs.h.  */
18008#define _FILE_OFFSET_BITS 64
18009#include <sys/types.h>
18010 /* Check that off_t can represent 2**63 - 1 correctly.
18011    We can't simply define LARGE_OFF_T to be 9223372036854775807,
18012    since some C++ compilers masquerading as C compilers
18013    incorrectly reject 9223372036854775807.  */
18014#define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31))
18015  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
18016		       && LARGE_OFF_T % 2147483647 == 1)
18017		      ? 1 : -1];
18018int
18019main (void)
18020{
18021
18022  ;
18023  return 0;
18024}
18025_ACEOF
18026if ac_fn_c_try_compile "$LINENO"
18027then :
18028  ac_cv_sys_file_offset_bits=64; break
18029fi
18030rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
18031  ac_cv_sys_file_offset_bits=unknown
18032  break
18033done
18034fi
18035{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
18036printf "%s\n" "$ac_cv_sys_file_offset_bits" >&6; }
18037case $ac_cv_sys_file_offset_bits in #(
18038  no | unknown) ;;
18039  *)
18040printf "%s\n" "#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits" >>confdefs.h
18041;;
18042esac
18043rm -rf conftest*
18044  if test $ac_cv_sys_file_offset_bits = unknown; then
18045    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
18046printf %s "checking for _LARGE_FILES value needed for large files... " >&6; }
18047if test ${ac_cv_sys_large_files+y}
18048then :
18049  printf %s "(cached) " >&6
18050else $as_nop
18051  while :; do
18052  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18053/* end confdefs.h.  */
18054#include <sys/types.h>
18055 /* Check that off_t can represent 2**63 - 1 correctly.
18056    We can't simply define LARGE_OFF_T to be 9223372036854775807,
18057    since some C++ compilers masquerading as C compilers
18058    incorrectly reject 9223372036854775807.  */
18059#define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31))
18060  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
18061		       && LARGE_OFF_T % 2147483647 == 1)
18062		      ? 1 : -1];
18063int
18064main (void)
18065{
18066
18067  ;
18068  return 0;
18069}
18070_ACEOF
18071if ac_fn_c_try_compile "$LINENO"
18072then :
18073  ac_cv_sys_large_files=no; break
18074fi
18075rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
18076  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18077/* end confdefs.h.  */
18078#define _LARGE_FILES 1
18079#include <sys/types.h>
18080 /* Check that off_t can represent 2**63 - 1 correctly.
18081    We can't simply define LARGE_OFF_T to be 9223372036854775807,
18082    since some C++ compilers masquerading as C compilers
18083    incorrectly reject 9223372036854775807.  */
18084#define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31))
18085  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
18086		       && LARGE_OFF_T % 2147483647 == 1)
18087		      ? 1 : -1];
18088int
18089main (void)
18090{
18091
18092  ;
18093  return 0;
18094}
18095_ACEOF
18096if ac_fn_c_try_compile "$LINENO"
18097then :
18098  ac_cv_sys_large_files=1; break
18099fi
18100rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
18101  ac_cv_sys_large_files=unknown
18102  break
18103done
18104fi
18105{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
18106printf "%s\n" "$ac_cv_sys_large_files" >&6; }
18107case $ac_cv_sys_large_files in #(
18108  no | unknown) ;;
18109  *)
18110printf "%s\n" "#define _LARGE_FILES $ac_cv_sys_large_files" >>confdefs.h
18111;;
18112esac
18113rm -rf conftest*
18114  fi
18115fi
18116
18117
18118
18119
18120{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we need -D_LARGEFILE_SOURCE=1 as a flag for $CC" >&5
18121printf %s "checking whether we need -D_LARGEFILE_SOURCE=1 as a flag for $CC... " >&6; }
18122cache=_D_LARGEFILE_SOURCE_1
18123if eval test \${cv_prog_cc_flag_needed_$cache+y}
18124then :
18125  printf %s "(cached) " >&6
18126else $as_nop
18127
18128echo '
18129#include <stdio.h>
18130int test(void) {
18131        int a = fseeko(stdin, 0, 0);
18132        return a;
18133}
18134' > conftest.c
18135echo 'void f(void){}' >>conftest.c
18136if test -z "`$CC $CPPFLAGS $CFLAGS $ERRFLAG -c conftest.c 2>&1`"; then
18137eval "cv_prog_cc_flag_needed_$cache=no"
18138else
18139
18140if test -z "`$CC $CPPFLAGS $CFLAGS -D_LARGEFILE_SOURCE=1 $ERRFLAG -c conftest.c 2>&1`"; then
18141eval "cv_prog_cc_flag_needed_$cache=yes"
18142else
18143eval "cv_prog_cc_flag_needed_$cache=fail"
18144#echo 'Test with flag fails too!'
18145#cat conftest.c
18146#echo "$CC $CPPFLAGS $CFLAGS -D_LARGEFILE_SOURCE=1 $ERRFLAG -c conftest.c 2>&1"
18147#echo `$CC $CPPFLAGS $CFLAGS -D_LARGEFILE_SOURCE=1 $ERRFLAG -c conftest.c 2>&1`
18148#exit 1
18149fi
18150
18151fi
18152rm -f conftest conftest.c conftest.o
18153
18154fi
18155
18156if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = yes"; then
18157{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
18158printf "%s\n" "yes" >&6; }
18159:
18160CFLAGS="$CFLAGS -D_LARGEFILE_SOURCE=1"
18161else
18162if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = no"; then
18163{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
18164printf "%s\n" "no" >&6; }
18165#echo 'Test with flag is no!'
18166#cat conftest.c
18167#echo "$CC $CPPFLAGS $CFLAGS -D_LARGEFILE_SOURCE=1 $ERRFLAG -c conftest.c 2>&1"
18168#echo `$CC $CPPFLAGS $CFLAGS -D_LARGEFILE_SOURCE=1 $ERRFLAG -c conftest.c 2>&1`
18169#exit 1
18170:
18171
18172else
18173{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: failed" >&5
18174printf "%s\n" "failed" >&6; }
18175:
18176
18177fi
18178fi
18179
18180
18181
18182{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if nonblocking sockets work" >&5
18183printf %s "checking if nonblocking sockets work... " >&6; }
18184if echo $host | grep mingw >/dev/null; then
18185	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no (windows)" >&5
18186printf "%s\n" "no (windows)" >&6; }
18187
18188printf "%s\n" "#define NONBLOCKING_IS_BROKEN 1" >>confdefs.h
18189
18190else
18191if test "$cross_compiling" = yes
18192then :
18193
18194	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: crosscompile(yes)" >&5
18195printf "%s\n" "crosscompile(yes)" >&6; }
18196
18197else $as_nop
18198  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18199/* end confdefs.h.  */
18200
18201
18202#include <stdio.h>
18203#include <string.h>
18204#include <stdlib.h>
18205#include <fcntl.h>
18206#include <errno.h>
18207#ifdef HAVE_SYS_TYPES_H
18208#include <sys/types.h>
18209#endif
18210#ifdef HAVE_SYS_SELECT_H
18211#include <sys/select.h>
18212#endif
18213#ifdef HAVE_SYS_SOCKET_H
18214#include <sys/socket.h>
18215#endif
18216#ifdef HAVE_NETINET_IN_H
18217#include <netinet/in.h>
18218#endif
18219#ifdef HAVE_ARPA_INET_H
18220#include <arpa/inet.h>
18221#endif
18222#ifdef HAVE_UNISTD_H
18223#include <unistd.h>
18224#endif
18225#ifdef HAVE_TIME_H
18226#include <time.h>
18227#endif
18228
18229int main(void)
18230{
18231	int port;
18232	int sfd, cfd;
18233	int num = 10;
18234	int i, p;
18235	struct sockaddr_in a;
18236	/* test if select and nonblocking reads work well together */
18237	/* open port.
18238	   fork child to send 10 messages.
18239	   select to read.
18240	   then try to nonblocking read the 10 messages
18241	   then, nonblocking read must give EAGAIN
18242	*/
18243
18244	port = 12345 + (time(0)%32);
18245	sfd = socket(PF_INET, SOCK_DGRAM, 0);
18246	if(sfd == -1) {
18247		perror("socket");
18248		return 1;
18249	}
18250	memset(&a, 0, sizeof(a));
18251	a.sin_family = AF_INET;
18252	a.sin_port = htons(port);
18253	a.sin_addr.s_addr = inet_addr("127.0.0.1");
18254	if(bind(sfd, (struct sockaddr*)&a, sizeof(a)) < 0) {
18255		perror("bind");
18256		return 1;
18257	}
18258	if(fcntl(sfd, F_SETFL, O_NONBLOCK) == -1) {
18259		perror("fcntl");
18260		return 1;
18261	}
18262
18263	cfd = socket(PF_INET, SOCK_DGRAM, 0);
18264	if(cfd == -1) {
18265		perror("client socket");
18266		return 1;
18267	}
18268	a.sin_port = 0;
18269	if(bind(cfd, (struct sockaddr*)&a, sizeof(a)) < 0) {
18270		perror("client bind");
18271		return 1;
18272	}
18273	a.sin_port = htons(port);
18274
18275	/* no handler, causes exit in 10 seconds */
18276	alarm(10);
18277
18278	/* send and receive on the socket */
18279	if((p=fork()) == 0) {
18280		for(i=0; i<num; i++) {
18281			if(sendto(cfd, &i, sizeof(i), 0,
18282				(struct sockaddr*)&a, sizeof(a)) < 0) {
18283				perror("sendto");
18284				return 1;
18285			}
18286		}
18287	} else {
18288		/* parent */
18289		fd_set rset;
18290		int x;
18291		if(p == -1) {
18292			perror("fork");
18293			return 1;
18294		}
18295		FD_ZERO(&rset);
18296		FD_SET(sfd, &rset);
18297		if(select(sfd+1, &rset, NULL, NULL, NULL) < 1) {
18298			perror("select");
18299			return 1;
18300		}
18301		i = 0;
18302		while(i < num) {
18303			if(recv(sfd, &x, sizeof(x), 0) != sizeof(x)) {
18304				if(errno == EAGAIN)
18305					continue;
18306				perror("recv");
18307				return 1;
18308			}
18309			i++;
18310		}
18311		/* now we want to get EAGAIN: nonblocking goodness */
18312		errno = 0;
18313		recv(sfd, &x, sizeof(x), 0);
18314		if(errno != EAGAIN) {
18315			perror("trying to recv again");
18316			return 1;
18317		}
18318		/* EAGAIN encountered */
18319	}
18320
18321	close(sfd);
18322	close(cfd);
18323	return 0;
18324}
18325
18326_ACEOF
18327if ac_fn_c_try_run "$LINENO"
18328then :
18329
18330	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
18331printf "%s\n" "yes" >&6; }
18332
18333else $as_nop
18334
18335	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
18336printf "%s\n" "no" >&6; }
18337
18338printf "%s\n" "#define NONBLOCKING_IS_BROKEN 1" >>confdefs.h
18339
18340
18341fi
18342rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18343  conftest.$ac_objext conftest.beam conftest.$ac_ext
18344fi
18345
18346fi
18347
18348
18349{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mkdir has one arg" >&5
18350printf %s "checking whether mkdir has one arg... " >&6; }
18351cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18352/* end confdefs.h.  */
18353
18354#include <stdio.h>
18355#include <unistd.h>
18356#ifdef HAVE_WINSOCK2_H
18357#include <winsock2.h>
18358#endif
18359#ifdef HAVE_SYS_STAT_H
18360#include <sys/stat.h>
18361#endif
18362
18363int
18364main (void)
18365{
18366
18367	(void)mkdir("directory");
18368
18369  ;
18370  return 0;
18371}
18372_ACEOF
18373if ac_fn_c_try_compile "$LINENO"
18374then :
18375  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
18376printf "%s\n" "yes" >&6; }
18377
18378printf "%s\n" "#define MKDIR_HAS_ONE_ARG 1" >>confdefs.h
18379
18380
18381else $as_nop
18382  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
18383printf "%s\n" "no" >&6; }
18384
18385fi
18386rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
18387
18388
18389  for ac_func in strptime
18390do :
18391  ac_fn_c_check_func "$LINENO" "strptime" "ac_cv_func_strptime"
18392if test "x$ac_cv_func_strptime" = xyes
18393then :
18394  printf "%s\n" "#define HAVE_STRPTIME 1" >>confdefs.h
18395
18396{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether strptime works" >&5
18397printf %s "checking whether strptime works... " >&6; }
18398if test c${cross_compiling} = cno; then
18399if test "$cross_compiling" = yes
18400then :
18401  eval "ac_cv_c_strptime_works=maybe"
18402else $as_nop
18403  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18404/* end confdefs.h.  */
18405
18406#define _XOPEN_SOURCE 600
18407#include <time.h>
18408int main(void) { struct tm tm; char *res;
18409res = 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);
18410if (!res) return 2;
18411res = strptime("20070207111842", "%Y%m%d%H%M%S", &tm);
18412if (!res) return 1; return 0; }
18413
18414_ACEOF
18415if ac_fn_c_try_run "$LINENO"
18416then :
18417  eval "ac_cv_c_strptime_works=yes"
18418else $as_nop
18419  eval "ac_cv_c_strptime_works=no"
18420fi
18421rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18422  conftest.$ac_objext conftest.beam conftest.$ac_ext
18423fi
18424
18425else
18426eval "ac_cv_c_strptime_works=maybe"
18427fi
18428{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_strptime_works" >&5
18429printf "%s\n" "$ac_cv_c_strptime_works" >&6; }
18430if test $ac_cv_c_strptime_works = no; then
18431case " $LIBOBJS " in
18432  *" strptime.$ac_objext "* ) ;;
18433  *) LIBOBJS="$LIBOBJS strptime.$ac_objext"
18434 ;;
18435esac
18436
18437else
18438
18439printf "%s\n" "#define STRPTIME_WORKS 1" >>confdefs.h
18440
18441fi
18442
18443else $as_nop
18444  case " $LIBOBJS " in
18445  *" strptime.$ac_objext "* ) ;;
18446  *) LIBOBJS="$LIBOBJS strptime.$ac_objext"
18447 ;;
18448esac
18449
18450fi
18451
18452done
18453
18454# check if we can use SO_REUSEPORT
18455reuseport_default=0
18456if echo "$host" | $GREP -i -e linux >/dev/null; then reuseport_default=1; fi
18457if echo "$host" | $GREP -i -e dragonfly >/dev/null; then reuseport_default=1; fi
18458if test "$reuseport_default" = 1; then
18459
18460printf "%s\n" "#define REUSEPORT_DEFAULT 1" >>confdefs.h
18461
18462else
18463
18464printf "%s\n" "#define REUSEPORT_DEFAULT 0" >>confdefs.h
18465
18466fi
18467
18468# Include systemd.m4 - begin
18469#   macros for configuring systemd
18470#   Copyright 2015, Sami Kerola, CloudFlare.
18471#   BSD licensed.
18472# Check whether --enable-systemd was given.
18473if test ${enable_systemd+y}
18474then :
18475  enableval=$enable_systemd;
18476else $as_nop
18477  enable_systemd=no
18478fi
18479
18480have_systemd=no
18481if test "x$enable_systemd" != xno
18482then :
18483
18484    if test -n "$PKG_CONFIG"; then
18485		have_systemd=no
18486
18487pkg_failed=no
18488{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libsystemd" >&5
18489printf %s "checking for libsystemd... " >&6; }
18490
18491if test -n "$SYSTEMD_CFLAGS"; then
18492    pkg_cv_SYSTEMD_CFLAGS="$SYSTEMD_CFLAGS"
18493 elif test -n "$PKG_CONFIG"; then
18494    if test -n "$PKG_CONFIG" && \
18495    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libsystemd\""; } >&5
18496  ($PKG_CONFIG --exists --print-errors "libsystemd") 2>&5
18497  ac_status=$?
18498  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
18499  test $ac_status = 0; }; then
18500  pkg_cv_SYSTEMD_CFLAGS=`$PKG_CONFIG --cflags "libsystemd" 2>/dev/null`
18501		      test "x$?" != "x0" && pkg_failed=yes
18502else
18503  pkg_failed=yes
18504fi
18505 else
18506    pkg_failed=untried
18507fi
18508if test -n "$SYSTEMD_LIBS"; then
18509    pkg_cv_SYSTEMD_LIBS="$SYSTEMD_LIBS"
18510 elif test -n "$PKG_CONFIG"; then
18511    if test -n "$PKG_CONFIG" && \
18512    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libsystemd\""; } >&5
18513  ($PKG_CONFIG --exists --print-errors "libsystemd") 2>&5
18514  ac_status=$?
18515  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
18516  test $ac_status = 0; }; then
18517  pkg_cv_SYSTEMD_LIBS=`$PKG_CONFIG --libs "libsystemd" 2>/dev/null`
18518		      test "x$?" != "x0" && pkg_failed=yes
18519else
18520  pkg_failed=yes
18521fi
18522 else
18523    pkg_failed=untried
18524fi
18525
18526
18527
18528if test $pkg_failed = yes; then
18529        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
18530printf "%s\n" "no" >&6; }
18531
18532if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
18533        _pkg_short_errors_supported=yes
18534else
18535        _pkg_short_errors_supported=no
18536fi
18537        if test $_pkg_short_errors_supported = yes; then
18538                SYSTEMD_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libsystemd" 2>&1`
18539        else
18540                SYSTEMD_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libsystemd" 2>&1`
18541        fi
18542        # Put the nasty error message in config.log where it belongs
18543        echo "$SYSTEMD_PKG_ERRORS" >&5
18544
18545        as_fn_error $? "Package requirements (libsystemd) were not met:
18546
18547$SYSTEMD_PKG_ERRORS
18548
18549Consider adjusting the PKG_CONFIG_PATH environment variable if you
18550installed software in a non-standard prefix.
18551
18552Alternatively, you may set the environment variables SYSTEMD_CFLAGS
18553and SYSTEMD_LIBS to avoid the need to call pkg-config.
18554See the pkg-config man page for more details." "$LINENO" 5
18555elif test $pkg_failed = untried; then
18556        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
18557printf "%s\n" "no" >&6; }
18558        { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
18559printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
18560as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
18561is in your PATH or set the PKG_CONFIG environment variable to the full
18562path to pkg-config.
18563
18564Alternatively, you may set the environment variables SYSTEMD_CFLAGS
18565and SYSTEMD_LIBS to avoid the need to call pkg-config.
18566See the pkg-config man page for more details.
18567
18568To get pkg-config, see <http://pkg-config.freedesktop.org/>.
18569See \`config.log' for more details" "$LINENO" 5; }
18570else
18571        SYSTEMD_CFLAGS=$pkg_cv_SYSTEMD_CFLAGS
18572        SYSTEMD_LIBS=$pkg_cv_SYSTEMD_LIBS
18573        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
18574printf "%s\n" "yes" >&6; }
18575        have_systemd=yes
18576fi
18577		if test "x$have_systemd" != "xyes"
18578then :
18579
18580		have_systemd_daemon=no
18581
18582pkg_failed=no
18583{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libsystemd-daemon" >&5
18584printf %s "checking for libsystemd-daemon... " >&6; }
18585
18586if test -n "$SYSTEMD_DAEMON_CFLAGS"; then
18587    pkg_cv_SYSTEMD_DAEMON_CFLAGS="$SYSTEMD_DAEMON_CFLAGS"
18588 elif test -n "$PKG_CONFIG"; then
18589    if test -n "$PKG_CONFIG" && \
18590    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libsystemd-daemon\""; } >&5
18591  ($PKG_CONFIG --exists --print-errors "libsystemd-daemon") 2>&5
18592  ac_status=$?
18593  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
18594  test $ac_status = 0; }; then
18595  pkg_cv_SYSTEMD_DAEMON_CFLAGS=`$PKG_CONFIG --cflags "libsystemd-daemon" 2>/dev/null`
18596		      test "x$?" != "x0" && pkg_failed=yes
18597else
18598  pkg_failed=yes
18599fi
18600 else
18601    pkg_failed=untried
18602fi
18603if test -n "$SYSTEMD_DAEMON_LIBS"; then
18604    pkg_cv_SYSTEMD_DAEMON_LIBS="$SYSTEMD_DAEMON_LIBS"
18605 elif test -n "$PKG_CONFIG"; then
18606    if test -n "$PKG_CONFIG" && \
18607    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libsystemd-daemon\""; } >&5
18608  ($PKG_CONFIG --exists --print-errors "libsystemd-daemon") 2>&5
18609  ac_status=$?
18610  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
18611  test $ac_status = 0; }; then
18612  pkg_cv_SYSTEMD_DAEMON_LIBS=`$PKG_CONFIG --libs "libsystemd-daemon" 2>/dev/null`
18613		      test "x$?" != "x0" && pkg_failed=yes
18614else
18615  pkg_failed=yes
18616fi
18617 else
18618    pkg_failed=untried
18619fi
18620
18621
18622
18623if test $pkg_failed = yes; then
18624        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
18625printf "%s\n" "no" >&6; }
18626
18627if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
18628        _pkg_short_errors_supported=yes
18629else
18630        _pkg_short_errors_supported=no
18631fi
18632        if test $_pkg_short_errors_supported = yes; then
18633                SYSTEMD_DAEMON_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libsystemd-daemon" 2>&1`
18634        else
18635                SYSTEMD_DAEMON_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libsystemd-daemon" 2>&1`
18636        fi
18637        # Put the nasty error message in config.log where it belongs
18638        echo "$SYSTEMD_DAEMON_PKG_ERRORS" >&5
18639
18640        as_fn_error $? "Package requirements (libsystemd-daemon) were not met:
18641
18642$SYSTEMD_DAEMON_PKG_ERRORS
18643
18644Consider adjusting the PKG_CONFIG_PATH environment variable if you
18645installed software in a non-standard prefix.
18646
18647Alternatively, you may set the environment variables SYSTEMD_DAEMON_CFLAGS
18648and SYSTEMD_DAEMON_LIBS to avoid the need to call pkg-config.
18649See the pkg-config man page for more details." "$LINENO" 5
18650elif test $pkg_failed = untried; then
18651        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
18652printf "%s\n" "no" >&6; }
18653        { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
18654printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
18655as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
18656is in your PATH or set the PKG_CONFIG environment variable to the full
18657path to pkg-config.
18658
18659Alternatively, you may set the environment variables SYSTEMD_DAEMON_CFLAGS
18660and SYSTEMD_DAEMON_LIBS to avoid the need to call pkg-config.
18661See the pkg-config man page for more details.
18662
18663To get pkg-config, see <http://pkg-config.freedesktop.org/>.
18664See \`config.log' for more details" "$LINENO" 5; }
18665else
18666        SYSTEMD_DAEMON_CFLAGS=$pkg_cv_SYSTEMD_DAEMON_CFLAGS
18667        SYSTEMD_DAEMON_LIBS=$pkg_cv_SYSTEMD_DAEMON_LIBS
18668        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
18669printf "%s\n" "yes" >&6; }
18670        have_systemd_daemon=yes
18671fi
18672		if test "x$have_systemd_daemon" = "xyes"
18673then :
18674  have_systemd=yes
18675fi
18676
18677fi
18678	case $enable_systemd:$have_systemd in #(
18679  yes:no) :
18680    as_fn_error $? "systemd enabled but libsystemd not found" "$LINENO" 5 ;; #(
18681  *:yes) :
18682
18683printf "%s\n" "#define HAVE_SYSTEMD 1" >>confdefs.h
18684
18685		LIBS="$LIBS $SYSTEMD_LIBS"
18686
18687	 ;; #(
18688  *) :
18689     ;;
18690esac
18691    else
18692    	as_fn_error $? "systemd enabled but need pkg-config to configure for it" "$LINENO" 5
18693    fi
18694
18695fi
18696 if test "x$have_systemd" = xyes; then
18697  USE_SYSTEMD_TRUE=
18698  USE_SYSTEMD_FALSE='#'
18699else
18700  USE_SYSTEMD_TRUE='#'
18701  USE_SYSTEMD_FALSE=
18702fi
18703
18704
18705# Include systemd.m4 - end
18706
18707# set memory allocation checking if requested
18708# Check whether --enable-alloc-checks was given.
18709if test ${enable_alloc_checks+y}
18710then :
18711  enableval=$enable_alloc_checks;
18712fi
18713
18714# Check whether --enable-alloc-lite was given.
18715if test ${enable_alloc_lite+y}
18716then :
18717  enableval=$enable_alloc_lite;
18718fi
18719
18720# Check whether --enable-alloc-nonregional was given.
18721if test ${enable_alloc_nonregional+y}
18722then :
18723  enableval=$enable_alloc_nonregional;
18724fi
18725
18726if test x_$enable_alloc_nonregional = x_yes; then
18727
18728printf "%s\n" "#define UNBOUND_ALLOC_NONREGIONAL 1" >>confdefs.h
18729
18730fi
18731if test x_$enable_alloc_checks = x_yes; then
18732
18733printf "%s\n" "#define UNBOUND_ALLOC_STATS 1" >>confdefs.h
18734
18735	SLDNS_ALLOCCHECK_EXTRA_OBJ="alloc.lo log.lo"
18736
18737	ASYNCLOOK_ALLOCCHECK_EXTRA_OBJ="alloc.lo"
18738
18739else
18740	if test x_$enable_alloc_lite = x_yes; then
18741
18742printf "%s\n" "#define UNBOUND_ALLOC_LITE 1" >>confdefs.h
18743
18744	else
18745
18746	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible malloc" >&5
18747printf %s "checking for GNU libc compatible malloc... " >&6; }
18748	if test "$cross_compiling" = yes
18749then :
18750  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no (crosscompile)" >&5
18751printf "%s\n" "no (crosscompile)" >&6; }
18752	case " $LIBOBJS " in
18753  *" malloc.$ac_objext "* ) ;;
18754  *) LIBOBJS="$LIBOBJS malloc.$ac_objext"
18755 ;;
18756esac
18757
18758
18759printf "%s\n" "#define malloc rpl_malloc_unbound" >>confdefs.h
18760
18761else $as_nop
18762  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18763/* end confdefs.h.  */
18764#if defined STDC_HEADERS || defined HAVE_STDLIB_H
18765#include <stdlib.h>
18766#else
18767char *malloc ();
18768#endif
18769
18770int
18771main (void)
18772{
18773 if(malloc(0) != 0) return 1;
18774  ;
18775  return 0;
18776}
18777
18778_ACEOF
18779if ac_fn_c_try_run "$LINENO"
18780then :
18781  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
18782printf "%s\n" "no" >&6; }
18783	case " $LIBOBJS " in
18784  *" malloc.$ac_objext "* ) ;;
18785  *) LIBOBJS="$LIBOBJS malloc.$ac_objext"
18786 ;;
18787esac
18788
18789
18790printf "%s\n" "#define malloc rpl_malloc_unbound" >>confdefs.h
18791
18792else $as_nop
18793  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
18794printf "%s\n" "yes" >&6; }
18795
18796printf "%s\n" "#define HAVE_MALLOC 1" >>confdefs.h
18797
18798fi
18799rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18800  conftest.$ac_objext conftest.beam conftest.$ac_ext
18801fi
18802
18803
18804	fi
18805fi
18806
18807# check windows threads (we use them, not pthreads, on windows).
18808if test "$on_mingw" = "yes"; then
18809# check windows threads
18810	ac_fn_c_check_header_compile "$LINENO" "windows.h" "ac_cv_header_windows_h" "$ac_includes_default
18811"
18812if test "x$ac_cv_header_windows_h" = xyes
18813then :
18814  printf "%s\n" "#define HAVE_WINDOWS_H 1" >>confdefs.h
18815
18816fi
18817
18818	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for CreateThread" >&5
18819printf %s "checking for CreateThread... " >&6; }
18820	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18821/* end confdefs.h.  */
18822
18823#ifdef HAVE_WINDOWS_H
18824#include <windows.h>
18825#endif
18826
18827int
18828main (void)
18829{
18830
18831	HANDLE t = CreateThread(NULL, 0, NULL, NULL, 0, NULL);
18832
18833  ;
18834  return 0;
18835}
18836_ACEOF
18837if ac_fn_c_try_compile "$LINENO"
18838then :
18839  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
18840printf "%s\n" "yes" >&6; }
18841
18842printf "%s\n" "#define HAVE_WINDOWS_THREADS 1" >>confdefs.h
18843
18844
18845else $as_nop
18846  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
18847printf "%s\n" "no" >&6; }
18848
18849fi
18850rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
18851
18852else
18853# not on mingw, check thread libraries.
18854
18855# check for thread library.
18856# check this first, so that the pthread lib does not get linked in via
18857# libssl or libpython, and thus distorts the tests, and we end up using
18858# the non-threadsafe C libraries.
18859
18860# Check whether --with-pthreads was given.
18861if test ${with_pthreads+y}
18862then :
18863  withval=$with_pthreads;
18864else $as_nop
18865   withval="yes"
18866fi
18867
18868ub_have_pthreads=no
18869if test x_$withval != x_no; then
18870
18871
18872
18873
18874ac_ext=c
18875ac_cpp='$CPP $CPPFLAGS'
18876ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
18877ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
18878ac_compiler_gnu=$ac_cv_c_compiler_gnu
18879
18880ax_pthread_ok=no
18881
18882# We used to check for pthread.h first, but this fails if pthread.h
18883# requires special compiler flags (e.g. on Tru64 or Sequent).
18884# It gets checked for in the link test anyway.
18885
18886# First of all, check if the user has set any of the PTHREAD_LIBS,
18887# etcetera environment variables, and if threads linking works using
18888# them:
18889if test "x$PTHREAD_CFLAGS$PTHREAD_LIBS" != "x"; then
18890        ax_pthread_save_CC="$CC"
18891        ax_pthread_save_CFLAGS="$CFLAGS"
18892        ax_pthread_save_LIBS="$LIBS"
18893        if test "x$PTHREAD_CC" != "x"
18894then :
18895  CC="$PTHREAD_CC"
18896fi
18897        if test "x$PTHREAD_CXX" != "x"
18898then :
18899  CXX="$PTHREAD_CXX"
18900fi
18901        CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
18902        LIBS="$PTHREAD_LIBS $LIBS"
18903        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS" >&5
18904printf %s "checking for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS... " >&6; }
18905        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18906/* end confdefs.h.  */
18907
18908/* Override any GCC internal prototype to avoid an error.
18909   Use char because int might match the return type of a GCC
18910   builtin and then its argument prototype would still apply.  */
18911char pthread_join ();
18912int
18913main (void)
18914{
18915return pthread_join ();
18916  ;
18917  return 0;
18918}
18919_ACEOF
18920if ac_fn_c_try_link "$LINENO"
18921then :
18922  ax_pthread_ok=yes
18923fi
18924rm -f core conftest.err conftest.$ac_objext conftest.beam \
18925    conftest$ac_exeext conftest.$ac_ext
18926        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
18927printf "%s\n" "$ax_pthread_ok" >&6; }
18928        if test "x$ax_pthread_ok" = "xno"; then
18929                PTHREAD_LIBS=""
18930                PTHREAD_CFLAGS=""
18931        fi
18932        CC="$ax_pthread_save_CC"
18933        CFLAGS="$ax_pthread_save_CFLAGS"
18934        LIBS="$ax_pthread_save_LIBS"
18935fi
18936
18937# We must check for the threads library under a number of different
18938# names; the ordering is very important because some systems
18939# (e.g. DEC) have both -lpthread and -lpthreads, where one of the
18940# libraries is broken (non-POSIX).
18941
18942# Create a list of thread flags to try. Items with a "," contain both
18943# C compiler flags (before ",") and linker flags (after ","). Other items
18944# starting with a "-" are C compiler flags, and remaining items are
18945# library names, except for "none" which indicates that we try without
18946# any flags at all, and "pthread-config" which is a program returning
18947# the flags for the Pth emulation library.
18948
18949ax_pthread_flags="pthreads none -Kthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config"
18950
18951# The ordering *is* (sometimes) important.  Some notes on the
18952# individual items follow:
18953
18954# pthreads: AIX (must check this before -lpthread)
18955# none: in case threads are in libc; should be tried before -Kthread and
18956#       other compiler flags to prevent continual compiler warnings
18957# -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h)
18958# -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads), Tru64
18959#           (Note: HP C rejects this with "bad form for `-t' option")
18960# -pthreads: Solaris/gcc (Note: HP C also rejects)
18961# -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
18962#      doesn't hurt to check since this sometimes defines pthreads and
18963#      -D_REENTRANT too), HP C (must be checked before -lpthread, which
18964#      is present but should not be used directly; and before -mthreads,
18965#      because the compiler interprets this as "-mt" + "-hreads")
18966# -mthreads: Mingw32/gcc, Lynx/gcc
18967# pthread: Linux, etcetera
18968# --thread-safe: KAI C++
18969# pthread-config: use pthread-config program (for GNU Pth library)
18970
18971case $host_os in
18972
18973        freebsd*)
18974
18975        # -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
18976        # lthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
18977
18978        ax_pthread_flags="-kthread lthread $ax_pthread_flags"
18979        ;;
18980
18981        hpux*)
18982
18983        # From the cc(1) man page: "[-mt] Sets various -D flags to enable
18984        # multi-threading and also sets -lpthread."
18985
18986        ax_pthread_flags="-mt -pthread pthread $ax_pthread_flags"
18987        ;;
18988
18989        openedition*)
18990
18991        # IBM z/OS requires a feature-test macro to be defined in order to
18992        # enable POSIX threads at all, so give the user a hint if this is
18993        # not set. (We don't define these ourselves, as they can affect
18994        # other portions of the system API in unpredictable ways.)
18995
18996        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18997/* end confdefs.h.  */
18998
18999#            if !defined(_OPEN_THREADS) && !defined(_UNIX03_THREADS)
19000             AX_PTHREAD_ZOS_MISSING
19001#            endif
19002
19003_ACEOF
19004if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
19005  $EGREP "AX_PTHREAD_ZOS_MISSING" >/dev/null 2>&1
19006then :
19007  { 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
19008printf "%s\n" "$as_me: WARNING: IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support." >&2;}
19009fi
19010rm -rf conftest*
19011
19012        ;;
19013
19014        solaris*)
19015
19016        # On Solaris (at least, for some versions), libc contains stubbed
19017        # (non-functional) versions of the pthreads routines, so link-based
19018        # tests will erroneously succeed. (N.B.: The stubs are missing
19019        # pthread_cleanup_push, or rather a function called by this macro,
19020        # so we could check for that, but who knows whether they'll stub
19021        # that too in a future libc.)  So we'll check first for the
19022        # standard Solaris way of linking pthreads (-mt -lpthread).
19023
19024        ax_pthread_flags="-mt,-lpthread pthread $ax_pthread_flags"
19025        ;;
19026esac
19027
19028# Are we compiling with Clang?
19029
19030{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC is Clang" >&5
19031printf %s "checking whether $CC is Clang... " >&6; }
19032if test ${ax_cv_PTHREAD_CLANG+y}
19033then :
19034  printf %s "(cached) " >&6
19035else $as_nop
19036  ax_cv_PTHREAD_CLANG=no
19037     # Note that Autoconf sets GCC=yes for Clang as well as GCC
19038     if test "x$GCC" = "xyes"; then
19039        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19040/* end confdefs.h.  */
19041/* Note: Clang 2.7 lacks __clang_[a-z]+__ */
19042#            if defined(__clang__) && defined(__llvm__)
19043             AX_PTHREAD_CC_IS_CLANG
19044#            endif
19045
19046_ACEOF
19047if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
19048  $EGREP "AX_PTHREAD_CC_IS_CLANG" >/dev/null 2>&1
19049then :
19050  ax_cv_PTHREAD_CLANG=yes
19051fi
19052rm -rf conftest*
19053
19054     fi
19055
19056fi
19057{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_CLANG" >&5
19058printf "%s\n" "$ax_cv_PTHREAD_CLANG" >&6; }
19059ax_pthread_clang="$ax_cv_PTHREAD_CLANG"
19060
19061
19062# GCC generally uses -pthread, or -pthreads on some platforms (e.g. SPARC)
19063
19064# Note that for GCC and Clang -pthread generally implies -lpthread,
19065# except when -nostdlib is passed.
19066# This is problematic using libtool to build C++ shared libraries with pthread:
19067# [1] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=25460
19068# [2] https://bugzilla.redhat.com/show_bug.cgi?id=661333
19069# [3] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=468555
19070# To solve this, first try -pthread together with -lpthread for GCC
19071
19072if test "x$GCC" = "xyes"
19073then :
19074  ax_pthread_flags="-pthread,-lpthread -pthread -pthreads $ax_pthread_flags"
19075fi
19076
19077# Clang takes -pthread (never supported any other flag), but we'll try with -lpthread first
19078
19079if test "x$ax_pthread_clang" = "xyes"
19080then :
19081  ax_pthread_flags="-pthread,-lpthread -pthread"
19082fi
19083
19084
19085# The presence of a feature test macro requesting re-entrant function
19086# definitions is, on some systems, a strong hint that pthreads support is
19087# correctly enabled
19088
19089case $host_os in
19090        darwin* | hpux* | linux* | osf* | solaris*)
19091        ax_pthread_check_macro="_REENTRANT"
19092        ;;
19093
19094        aix*)
19095        ax_pthread_check_macro="_THREAD_SAFE"
19096        ;;
19097
19098        *)
19099        ax_pthread_check_macro="--"
19100        ;;
19101esac
19102if test "x$ax_pthread_check_macro" = "x--"
19103then :
19104  ax_pthread_check_cond=0
19105else $as_nop
19106  ax_pthread_check_cond="!defined($ax_pthread_check_macro)"
19107fi
19108
19109
19110if test "x$ax_pthread_ok" = "xno"; then
19111for ax_pthread_try_flag in $ax_pthread_flags; do
19112
19113        case $ax_pthread_try_flag in
19114                none)
19115                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether pthreads work without any flags" >&5
19116printf %s "checking whether pthreads work without any flags... " >&6; }
19117                ;;
19118
19119                *,*)
19120                PTHREAD_CFLAGS=`echo $ax_pthread_try_flag | sed "s/^\(.*\),\(.*\)$/\1/"`
19121                PTHREAD_LIBS=`echo $ax_pthread_try_flag | sed "s/^\(.*\),\(.*\)$/\2/"`
19122                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with \"$PTHREAD_CFLAGS\" and \"$PTHREAD_LIBS\"" >&5
19123printf %s "checking whether pthreads work with \"$PTHREAD_CFLAGS\" and \"$PTHREAD_LIBS\"... " >&6; }
19124                ;;
19125
19126                -*)
19127                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with $ax_pthread_try_flag" >&5
19128printf %s "checking whether pthreads work with $ax_pthread_try_flag... " >&6; }
19129                PTHREAD_CFLAGS="$ax_pthread_try_flag"
19130                ;;
19131
19132                pthread-config)
19133                # Extract the first word of "pthread-config", so it can be a program name with args.
19134set dummy pthread-config; ac_word=$2
19135{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19136printf %s "checking for $ac_word... " >&6; }
19137if test ${ac_cv_prog_ax_pthread_config+y}
19138then :
19139  printf %s "(cached) " >&6
19140else $as_nop
19141  if test -n "$ax_pthread_config"; then
19142  ac_cv_prog_ax_pthread_config="$ax_pthread_config" # Let the user override the test.
19143else
19144as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19145for as_dir in $PATH
19146do
19147  IFS=$as_save_IFS
19148  case $as_dir in #(((
19149    '') as_dir=./ ;;
19150    */) ;;
19151    *) as_dir=$as_dir/ ;;
19152  esac
19153    for ac_exec_ext in '' $ac_executable_extensions; do
19154  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
19155    ac_cv_prog_ax_pthread_config="yes"
19156    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
19157    break 2
19158  fi
19159done
19160  done
19161IFS=$as_save_IFS
19162
19163  test -z "$ac_cv_prog_ax_pthread_config" && ac_cv_prog_ax_pthread_config="no"
19164fi
19165fi
19166ax_pthread_config=$ac_cv_prog_ax_pthread_config
19167if test -n "$ax_pthread_config"; then
19168  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_config" >&5
19169printf "%s\n" "$ax_pthread_config" >&6; }
19170else
19171  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
19172printf "%s\n" "no" >&6; }
19173fi
19174
19175
19176                if test "x$ax_pthread_config" = "xno"
19177then :
19178  continue
19179fi
19180                PTHREAD_CFLAGS="`pthread-config --cflags`"
19181                PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`"
19182                ;;
19183
19184                *)
19185                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for the pthreads library -l$ax_pthread_try_flag" >&5
19186printf %s "checking for the pthreads library -l$ax_pthread_try_flag... " >&6; }
19187                PTHREAD_LIBS="-l$ax_pthread_try_flag"
19188                ;;
19189        esac
19190
19191        ax_pthread_save_CFLAGS="$CFLAGS"
19192        ax_pthread_save_LIBS="$LIBS"
19193        CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
19194        LIBS="$PTHREAD_LIBS $LIBS"
19195
19196        # Check for various functions.  We must include pthread.h,
19197        # since some functions may be macros.  (On the Sequent, we
19198        # need a special flag -Kthread to make this header compile.)
19199        # We check for pthread_join because it is in -lpthread on IRIX
19200        # while pthread_create is in libc.  We check for pthread_attr_init
19201        # due to DEC craziness with -lpthreads.  We check for
19202        # pthread_cleanup_push because it is one of the few pthread
19203        # functions on Solaris that doesn't have a non-functional libc stub.
19204        # We try pthread_create on general principles.
19205
19206        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19207/* end confdefs.h.  */
19208#include <pthread.h>
19209#                       if $ax_pthread_check_cond
19210#                        error "$ax_pthread_check_macro must be defined"
19211#                       endif
19212                        static void *some_global = NULL;
19213                        static void routine(void *a)
19214                          {
19215                             /* To avoid any unused-parameter or
19216                                unused-but-set-parameter warning.  */
19217                             some_global = a;
19218                          }
19219                        static void *start_routine(void *a) { return a; }
19220int
19221main (void)
19222{
19223pthread_t th; pthread_attr_t attr;
19224                        pthread_create(&th, 0, start_routine, 0);
19225                        pthread_join(th, 0);
19226                        pthread_attr_init(&attr);
19227                        pthread_cleanup_push(routine, 0);
19228                        pthread_cleanup_pop(0) /* ; */
19229  ;
19230  return 0;
19231}
19232_ACEOF
19233if ac_fn_c_try_link "$LINENO"
19234then :
19235  ax_pthread_ok=yes
19236fi
19237rm -f core conftest.err conftest.$ac_objext conftest.beam \
19238    conftest$ac_exeext conftest.$ac_ext
19239
19240        CFLAGS="$ax_pthread_save_CFLAGS"
19241        LIBS="$ax_pthread_save_LIBS"
19242
19243        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
19244printf "%s\n" "$ax_pthread_ok" >&6; }
19245        if test "x$ax_pthread_ok" = "xyes"
19246then :
19247  break
19248fi
19249
19250        PTHREAD_LIBS=""
19251        PTHREAD_CFLAGS=""
19252done
19253fi
19254
19255
19256# Clang needs special handling, because older versions handle the -pthread
19257# option in a rather... idiosyncratic way
19258
19259if test "x$ax_pthread_clang" = "xyes"; then
19260
19261        # Clang takes -pthread; it has never supported any other flag
19262
19263        # (Note 1: This will need to be revisited if a system that Clang
19264        # supports has POSIX threads in a separate library.  This tends not
19265        # to be the way of modern systems, but it's conceivable.)
19266
19267        # (Note 2: On some systems, notably Darwin, -pthread is not needed
19268        # to get POSIX threads support; the API is always present and
19269        # active.  We could reasonably leave PTHREAD_CFLAGS empty.  But
19270        # -pthread does define _REENTRANT, and while the Darwin headers
19271        # ignore this macro, third-party headers might not.)
19272
19273        # However, older versions of Clang make a point of warning the user
19274        # that, in an invocation where only linking and no compilation is
19275        # taking place, the -pthread option has no effect ("argument unused
19276        # during compilation").  They expect -pthread to be passed in only
19277        # when source code is being compiled.
19278        #
19279        # Problem is, this is at odds with the way Automake and most other
19280        # C build frameworks function, which is that the same flags used in
19281        # compilation (CFLAGS) are also used in linking.  Many systems
19282        # supported by AX_PTHREAD require exactly this for POSIX threads
19283        # support, and in fact it is often not straightforward to specify a
19284        # flag that is used only in the compilation phase and not in
19285        # linking.  Such a scenario is extremely rare in practice.
19286        #
19287        # Even though use of the -pthread flag in linking would only print
19288        # a warning, this can be a nuisance for well-run software projects
19289        # that build with -Werror.  So if the active version of Clang has
19290        # this misfeature, we search for an option to squash it.
19291
19292        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether Clang needs flag to prevent \"argument unused\" warning when linking with -pthread" >&5
19293printf %s "checking whether Clang needs flag to prevent \"argument unused\" warning when linking with -pthread... " >&6; }
19294if test ${ax_cv_PTHREAD_CLANG_NO_WARN_FLAG+y}
19295then :
19296  printf %s "(cached) " >&6
19297else $as_nop
19298  ax_cv_PTHREAD_CLANG_NO_WARN_FLAG=unknown
19299             # Create an alternate version of $ac_link that compiles and
19300             # links in two steps (.c -> .o, .o -> exe) instead of one
19301             # (.c -> exe), because the warning occurs only in the second
19302             # step
19303             ax_pthread_save_ac_link="$ac_link"
19304             ax_pthread_sed='s/conftest\.\$ac_ext/conftest.$ac_objext/g'
19305             ax_pthread_link_step=`printf "%s\n" "$ac_link" | sed "$ax_pthread_sed"`
19306             ax_pthread_2step_ac_link="($ac_compile) && (echo ==== >&5) && ($ax_pthread_link_step)"
19307             ax_pthread_save_CFLAGS="$CFLAGS"
19308             for ax_pthread_try in '' -Qunused-arguments -Wno-unused-command-line-argument unknown; do
19309                if test "x$ax_pthread_try" = "xunknown"
19310then :
19311  break
19312fi
19313                CFLAGS="-Werror -Wunknown-warning-option $ax_pthread_try -pthread $ax_pthread_save_CFLAGS"
19314                ac_link="$ax_pthread_save_ac_link"
19315                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19316/* end confdefs.h.  */
19317int main(void){return 0;}
19318_ACEOF
19319if ac_fn_c_try_link "$LINENO"
19320then :
19321  ac_link="$ax_pthread_2step_ac_link"
19322                     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19323/* end confdefs.h.  */
19324int main(void){return 0;}
19325_ACEOF
19326if ac_fn_c_try_link "$LINENO"
19327then :
19328  break
19329fi
19330rm -f core conftest.err conftest.$ac_objext conftest.beam \
19331    conftest$ac_exeext conftest.$ac_ext
19332
19333fi
19334rm -f core conftest.err conftest.$ac_objext conftest.beam \
19335    conftest$ac_exeext conftest.$ac_ext
19336             done
19337             ac_link="$ax_pthread_save_ac_link"
19338             CFLAGS="$ax_pthread_save_CFLAGS"
19339             if test "x$ax_pthread_try" = "x"
19340then :
19341  ax_pthread_try=no
19342fi
19343             ax_cv_PTHREAD_CLANG_NO_WARN_FLAG="$ax_pthread_try"
19344
19345fi
19346{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" >&5
19347printf "%s\n" "$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" >&6; }
19348
19349        case "$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" in
19350                no | unknown) ;;
19351                *) PTHREAD_CFLAGS="$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG $PTHREAD_CFLAGS" ;;
19352        esac
19353
19354fi # $ax_pthread_clang = yes
19355
19356
19357
19358# Various other checks:
19359if test "x$ax_pthread_ok" = "xyes"; then
19360        ax_pthread_save_CFLAGS="$CFLAGS"
19361        ax_pthread_save_LIBS="$LIBS"
19362        CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
19363        LIBS="$PTHREAD_LIBS $LIBS"
19364
19365        # Detect AIX lossage: JOINABLE attribute is called UNDETACHED.
19366        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for joinable pthread attribute" >&5
19367printf %s "checking for joinable pthread attribute... " >&6; }
19368if test ${ax_cv_PTHREAD_JOINABLE_ATTR+y}
19369then :
19370  printf %s "(cached) " >&6
19371else $as_nop
19372  ax_cv_PTHREAD_JOINABLE_ATTR=unknown
19373             for ax_pthread_attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do
19374                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19375/* end confdefs.h.  */
19376#include <pthread.h>
19377int
19378main (void)
19379{
19380int attr = $ax_pthread_attr; return attr /* ; */
19381  ;
19382  return 0;
19383}
19384_ACEOF
19385if ac_fn_c_try_link "$LINENO"
19386then :
19387  ax_cv_PTHREAD_JOINABLE_ATTR=$ax_pthread_attr; break
19388fi
19389rm -f core conftest.err conftest.$ac_objext conftest.beam \
19390    conftest$ac_exeext conftest.$ac_ext
19391             done
19392
19393fi
19394{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_JOINABLE_ATTR" >&5
19395printf "%s\n" "$ax_cv_PTHREAD_JOINABLE_ATTR" >&6; }
19396        if test "x$ax_cv_PTHREAD_JOINABLE_ATTR" != "xunknown" && \
19397               test "x$ax_cv_PTHREAD_JOINABLE_ATTR" != "xPTHREAD_CREATE_JOINABLE" && \
19398               test "x$ax_pthread_joinable_attr_defined" != "xyes"
19399then :
19400
19401printf "%s\n" "#define PTHREAD_CREATE_JOINABLE $ax_cv_PTHREAD_JOINABLE_ATTR" >>confdefs.h
19402
19403               ax_pthread_joinable_attr_defined=yes
19404
19405fi
19406
19407        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether more special flags are required for pthreads" >&5
19408printf %s "checking whether more special flags are required for pthreads... " >&6; }
19409if test ${ax_cv_PTHREAD_SPECIAL_FLAGS+y}
19410then :
19411  printf %s "(cached) " >&6
19412else $as_nop
19413  ax_cv_PTHREAD_SPECIAL_FLAGS=no
19414             case $host_os in
19415             solaris*)
19416             ax_cv_PTHREAD_SPECIAL_FLAGS="-D_POSIX_PTHREAD_SEMANTICS"
19417             ;;
19418             esac
19419
19420fi
19421{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_SPECIAL_FLAGS" >&5
19422printf "%s\n" "$ax_cv_PTHREAD_SPECIAL_FLAGS" >&6; }
19423        if test "x$ax_cv_PTHREAD_SPECIAL_FLAGS" != "xno" && \
19424               test "x$ax_pthread_special_flags_added" != "xyes"
19425then :
19426  PTHREAD_CFLAGS="$ax_cv_PTHREAD_SPECIAL_FLAGS $PTHREAD_CFLAGS"
19427               ax_pthread_special_flags_added=yes
19428fi
19429
19430        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for PTHREAD_PRIO_INHERIT" >&5
19431printf %s "checking for PTHREAD_PRIO_INHERIT... " >&6; }
19432if test ${ax_cv_PTHREAD_PRIO_INHERIT+y}
19433then :
19434  printf %s "(cached) " >&6
19435else $as_nop
19436  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19437/* end confdefs.h.  */
19438#include <pthread.h>
19439int
19440main (void)
19441{
19442int i = PTHREAD_PRIO_INHERIT;
19443                                               return i;
19444  ;
19445  return 0;
19446}
19447_ACEOF
19448if ac_fn_c_try_link "$LINENO"
19449then :
19450  ax_cv_PTHREAD_PRIO_INHERIT=yes
19451else $as_nop
19452  ax_cv_PTHREAD_PRIO_INHERIT=no
19453fi
19454rm -f core conftest.err conftest.$ac_objext conftest.beam \
19455    conftest$ac_exeext conftest.$ac_ext
19456
19457fi
19458{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_PRIO_INHERIT" >&5
19459printf "%s\n" "$ax_cv_PTHREAD_PRIO_INHERIT" >&6; }
19460        if test "x$ax_cv_PTHREAD_PRIO_INHERIT" = "xyes" && \
19461               test "x$ax_pthread_prio_inherit_defined" != "xyes"
19462then :
19463
19464printf "%s\n" "#define HAVE_PTHREAD_PRIO_INHERIT 1" >>confdefs.h
19465
19466               ax_pthread_prio_inherit_defined=yes
19467
19468fi
19469
19470        CFLAGS="$ax_pthread_save_CFLAGS"
19471        LIBS="$ax_pthread_save_LIBS"
19472
19473        # More AIX lossage: compile with *_r variant
19474        if test "x$GCC" != "xyes"; then
19475            case $host_os in
19476                aix*)
19477                case "x/$CC" in #(
19478  x*/c89|x*/c89_128|x*/c99|x*/c99_128|x*/cc|x*/cc128|x*/xlc|x*/xlc_v6|x*/xlc128|x*/xlc128_v6) :
19479    #handle absolute path differently from PATH based program lookup
19480                     case "x$CC" in #(
19481  x/*) :
19482
19483			   if as_fn_executable_p ${CC}_r
19484then :
19485  PTHREAD_CC="${CC}_r"
19486fi
19487			   if test "x${CXX}" != "x"
19488then :
19489  if as_fn_executable_p ${CXX}_r
19490then :
19491  PTHREAD_CXX="${CXX}_r"
19492fi
19493fi
19494			  ;; #(
19495  *) :
19496
19497			   for ac_prog in ${CC}_r
19498do
19499  # Extract the first word of "$ac_prog", so it can be a program name with args.
19500set dummy $ac_prog; ac_word=$2
19501{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19502printf %s "checking for $ac_word... " >&6; }
19503if test ${ac_cv_prog_PTHREAD_CC+y}
19504then :
19505  printf %s "(cached) " >&6
19506else $as_nop
19507  if test -n "$PTHREAD_CC"; then
19508  ac_cv_prog_PTHREAD_CC="$PTHREAD_CC" # Let the user override the test.
19509else
19510as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19511for as_dir in $PATH
19512do
19513  IFS=$as_save_IFS
19514  case $as_dir in #(((
19515    '') as_dir=./ ;;
19516    */) ;;
19517    *) as_dir=$as_dir/ ;;
19518  esac
19519    for ac_exec_ext in '' $ac_executable_extensions; do
19520  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
19521    ac_cv_prog_PTHREAD_CC="$ac_prog"
19522    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
19523    break 2
19524  fi
19525done
19526  done
19527IFS=$as_save_IFS
19528
19529fi
19530fi
19531PTHREAD_CC=$ac_cv_prog_PTHREAD_CC
19532if test -n "$PTHREAD_CC"; then
19533  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PTHREAD_CC" >&5
19534printf "%s\n" "$PTHREAD_CC" >&6; }
19535else
19536  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
19537printf "%s\n" "no" >&6; }
19538fi
19539
19540
19541  test -n "$PTHREAD_CC" && break
19542done
19543test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
19544
19545			   if test "x${CXX}" != "x"
19546then :
19547  for ac_prog in ${CXX}_r
19548do
19549  # Extract the first word of "$ac_prog", so it can be a program name with args.
19550set dummy $ac_prog; ac_word=$2
19551{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19552printf %s "checking for $ac_word... " >&6; }
19553if test ${ac_cv_prog_PTHREAD_CXX+y}
19554then :
19555  printf %s "(cached) " >&6
19556else $as_nop
19557  if test -n "$PTHREAD_CXX"; then
19558  ac_cv_prog_PTHREAD_CXX="$PTHREAD_CXX" # Let the user override the test.
19559else
19560as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19561for as_dir in $PATH
19562do
19563  IFS=$as_save_IFS
19564  case $as_dir in #(((
19565    '') as_dir=./ ;;
19566    */) ;;
19567    *) as_dir=$as_dir/ ;;
19568  esac
19569    for ac_exec_ext in '' $ac_executable_extensions; do
19570  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
19571    ac_cv_prog_PTHREAD_CXX="$ac_prog"
19572    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
19573    break 2
19574  fi
19575done
19576  done
19577IFS=$as_save_IFS
19578
19579fi
19580fi
19581PTHREAD_CXX=$ac_cv_prog_PTHREAD_CXX
19582if test -n "$PTHREAD_CXX"; then
19583  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PTHREAD_CXX" >&5
19584printf "%s\n" "$PTHREAD_CXX" >&6; }
19585else
19586  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
19587printf "%s\n" "no" >&6; }
19588fi
19589
19590
19591  test -n "$PTHREAD_CXX" && break
19592done
19593test -n "$PTHREAD_CXX" || PTHREAD_CXX="$CXX"
19594
19595fi
19596
19597                      ;;
19598esac
19599                     ;; #(
19600  *) :
19601     ;;
19602esac
19603                ;;
19604            esac
19605        fi
19606fi
19607
19608test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
19609test -n "$PTHREAD_CXX" || PTHREAD_CXX="$CXX"
19610
19611
19612
19613
19614
19615
19616# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
19617if test "x$ax_pthread_ok" = "xyes"; then
19618
19619
19620printf "%s\n" "#define HAVE_PTHREAD 1" >>confdefs.h
19621
19622		if test -n "$PTHREAD_LIBS"; then
19623		  LIBS="$PTHREAD_LIBS $LIBS"
19624		fi
19625		CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
19626		CC="$PTHREAD_CC"
19627		ub_have_pthreads=yes
19628		ac_fn_c_check_type "$LINENO" "pthread_spinlock_t" "ac_cv_type_pthread_spinlock_t" "#include <pthread.h>
19629"
19630if test "x$ac_cv_type_pthread_spinlock_t" = xyes
19631then :
19632
19633printf "%s\n" "#define HAVE_PTHREAD_SPINLOCK_T 1" >>confdefs.h
19634
19635
19636fi
19637ac_fn_c_check_type "$LINENO" "pthread_rwlock_t" "ac_cv_type_pthread_rwlock_t" "#include <pthread.h>
19638"
19639if test "x$ac_cv_type_pthread_rwlock_t" = xyes
19640then :
19641
19642printf "%s\n" "#define HAVE_PTHREAD_RWLOCK_T 1" >>confdefs.h
19643
19644
19645fi
19646
19647		# The cast to long int works around a bug in the HP C Compiler
19648# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
19649# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
19650# This bug is HP SR number 8606223364.
19651{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of unsigned long" >&5
19652printf %s "checking size of unsigned long... " >&6; }
19653if test ${ac_cv_sizeof_unsigned_long+y}
19654then :
19655  printf %s "(cached) " >&6
19656else $as_nop
19657  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned long))" "ac_cv_sizeof_unsigned_long"        "$ac_includes_default"
19658then :
19659
19660else $as_nop
19661  if test "$ac_cv_type_unsigned_long" = yes; then
19662     { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
19663printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
19664as_fn_error 77 "cannot compute sizeof (unsigned long)
19665See \`config.log' for more details" "$LINENO" 5; }
19666   else
19667     ac_cv_sizeof_unsigned_long=0
19668   fi
19669fi
19670
19671fi
19672{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned_long" >&5
19673printf "%s\n" "$ac_cv_sizeof_unsigned_long" >&6; }
19674
19675
19676
19677printf "%s\n" "#define SIZEOF_UNSIGNED_LONG $ac_cv_sizeof_unsigned_long" >>confdefs.h
19678
19679
19680		# The cast to long int works around a bug in the HP C Compiler
19681# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
19682# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
19683# This bug is HP SR number 8606223364.
19684{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
19685printf %s "checking size of pthread_t... " >&6; }
19686if test ${ac_cv_sizeof_pthread_t+y}
19687then :
19688  printf %s "(cached) " >&6
19689else $as_nop
19690  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t"        "$ac_includes_default"
19691then :
19692
19693else $as_nop
19694  if test "$ac_cv_type_pthread_t" = yes; then
19695     { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
19696printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
19697as_fn_error 77 "cannot compute sizeof (pthread_t)
19698See \`config.log' for more details" "$LINENO" 5; }
19699   else
19700     ac_cv_sizeof_pthread_t=0
19701   fi
19702fi
19703
19704fi
19705{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
19706printf "%s\n" "$ac_cv_sizeof_pthread_t" >&6; }
19707
19708
19709
19710printf "%s\n" "#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t" >>confdefs.h
19711
19712
19713
19714		if echo "$CFLAGS" | $GREP -e "-pthread" >/dev/null; then
19715		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if -pthread unused during linking" >&5
19716printf %s "checking if -pthread unused during linking... " >&6; }
19717		# catch clang warning 'argument unused during compilation'
19718		cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19719/* end confdefs.h.  */
19720$ac_includes_default
19721
19722int main(void) {return 0;}
19723
19724_ACEOF
19725		pthread_unused="yes"
19726		# first compile
19727		echo "$CC $CFLAGS -c conftest.c -o conftest.o" >&5
19728		$CC $CFLAGS -c conftest.c -o conftest.o 2>&5 >&5
19729		if test $? = 0; then
19730			# then link
19731			echo "$CC $CFLAGS -Werror $LDFLAGS $LIBS -o conftest contest.o" >&5
19732			$CC $CFLAGS -Werror $LDFLAGS $LIBS -o conftest conftest.o 2>&5 >&5
19733			if test $? -ne 0; then
19734				{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19735printf "%s\n" "yes" >&6; }
19736				CFLAGS=`echo "$CFLAGS" | sed -e 's/-pthread//'`
19737				PTHREAD_CFLAGS_ONLY="-pthread"
19738
19739			else
19740				{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
19741printf "%s\n" "no" >&6; }
19742			fi
19743		else
19744			{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
19745printf "%s\n" "no" >&6; }
19746		fi # endif cc successful
19747		rm -f conftest conftest.c conftest.o
19748		fi # endif -pthread in CFLAGS
19749
19750
19751        :
19752else
19753        ax_pthread_ok=no
19754
19755fi
19756ac_ext=c
19757ac_cpp='$CPP $CPPFLAGS'
19758ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
19759ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
19760ac_compiler_gnu=$ac_cv_c_compiler_gnu
19761
19762
19763fi
19764
19765# check solaris thread library
19766
19767# Check whether --with-solaris-threads was given.
19768if test ${with_solaris_threads+y}
19769then :
19770  withval=$with_solaris_threads;
19771else $as_nop
19772   withval="no"
19773fi
19774
19775ub_have_sol_threads=no
19776if test x_$withval != x_no; then
19777	if test x_$ub_have_pthreads != x_no; then
19778	    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Have pthreads already, ignoring --with-solaris-threads" >&5
19779printf "%s\n" "$as_me: WARNING: Have pthreads already, ignoring --with-solaris-threads" >&2;}
19780	else
19781	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing thr_create" >&5
19782printf %s "checking for library containing thr_create... " >&6; }
19783if test ${ac_cv_search_thr_create+y}
19784then :
19785  printf %s "(cached) " >&6
19786else $as_nop
19787  ac_func_search_save_LIBS=$LIBS
19788cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19789/* end confdefs.h.  */
19790
19791/* Override any GCC internal prototype to avoid an error.
19792   Use char because int might match the return type of a GCC
19793   builtin and then its argument prototype would still apply.  */
19794char thr_create ();
19795int
19796main (void)
19797{
19798return thr_create ();
19799  ;
19800  return 0;
19801}
19802_ACEOF
19803for ac_lib in '' thread
19804do
19805  if test -z "$ac_lib"; then
19806    ac_res="none required"
19807  else
19808    ac_res=-l$ac_lib
19809    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
19810  fi
19811  if ac_fn_c_try_link "$LINENO"
19812then :
19813  ac_cv_search_thr_create=$ac_res
19814fi
19815rm -f core conftest.err conftest.$ac_objext conftest.beam \
19816    conftest$ac_exeext
19817  if test ${ac_cv_search_thr_create+y}
19818then :
19819  break
19820fi
19821done
19822if test ${ac_cv_search_thr_create+y}
19823then :
19824
19825else $as_nop
19826  ac_cv_search_thr_create=no
19827fi
19828rm conftest.$ac_ext
19829LIBS=$ac_func_search_save_LIBS
19830fi
19831{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_thr_create" >&5
19832printf "%s\n" "$ac_cv_search_thr_create" >&6; }
19833ac_res=$ac_cv_search_thr_create
19834if test "$ac_res" != no
19835then :
19836  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
19837
19838
19839printf "%s\n" "#define HAVE_SOLARIS_THREADS 1" >>confdefs.h
19840
19841
19842
19843
19844{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -mt" >&5
19845printf %s "checking whether $CC supports -mt... " >&6; }
19846cache=`echo mt | sed 'y%.=/+-%___p_%'`
19847if eval test \${cv_prog_cc_flag_$cache+y}
19848then :
19849  printf %s "(cached) " >&6
19850else $as_nop
19851
19852echo 'void f(void){}' >conftest.c
19853if test -z "`$CC $CPPFLAGS $CFLAGS -mt -c conftest.c 2>&1`"; then
19854eval "cv_prog_cc_flag_$cache=yes"
19855else
19856eval "cv_prog_cc_flag_$cache=no"
19857fi
19858rm -f conftest conftest.o conftest.c
19859
19860fi
19861
19862if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
19863{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19864printf "%s\n" "yes" >&6; }
19865:
19866CFLAGS="$CFLAGS -mt"
19867else
19868{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
19869printf "%s\n" "no" >&6; }
19870:
19871CFLAGS="$CFLAGS -D_REENTRANT"
19872fi
19873
19874		ub_have_sol_threads=yes
19875
19876else $as_nop
19877
19878		as_fn_error $? "no solaris threads found." "$LINENO" 5
19879
19880fi
19881
19882	fi
19883fi
19884
19885fi # end of non-mingw check of thread libraries
19886
19887# Check for SYSLOG_FACILITY
19888
19889# Check whether --with-syslog-facility was given.
19890if test ${with_syslog_facility+y}
19891then :
19892  withval=$with_syslog_facility;  UNBOUND_SYSLOG_FACILITY="$withval"
19893fi
19894
19895case "${UNBOUND_SYSLOG_FACILITY}" in
19896
19897  LOCAL[0-7]) UNBOUND_SYSLOG_FACILITY="LOG_${UNBOUND_SYSLOG_FACILITY}" ;;
19898
19899           *) UNBOUND_SYSLOG_FACILITY="LOG_DAEMON" ;;
19900
19901esac
19902
19903printf "%s\n" "#define UB_SYSLOG_FACILITY ${UNBOUND_SYSLOG_FACILITY}" >>confdefs.h
19904
19905
19906# Check for dynamic library module
19907
19908# Check whether --with-dynlibmodule was given.
19909if test ${with_dynlibmodule+y}
19910then :
19911  withval=$with_dynlibmodule;
19912else $as_nop
19913   withval="no"
19914fi
19915
19916
19917if test x_$withval != x_no; then
19918
19919printf "%s\n" "#define WITH_DYNLIBMODULE 1" >>confdefs.h
19920
19921  WITH_DYNLIBMODULE=yes
19922
19923  DYNLIBMOD_OBJ="dynlibmod.lo"
19924
19925  DYNLIBMOD_HEADER='$(srcdir)/dynlibmod/dynlibmod.h'
19926
19927  if test $on_mingw = "no"; then
19928    # link with -ldl if not already there, for all executables because
19929    # dlopen call is in the dynlib module.  For unbound executable, also
19930    # export symbols.
19931    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
19932printf %s "checking for library containing dlopen... " >&6; }
19933if test ${ac_cv_search_dlopen+y}
19934then :
19935  printf %s "(cached) " >&6
19936else $as_nop
19937  ac_func_search_save_LIBS=$LIBS
19938cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19939/* end confdefs.h.  */
19940
19941/* Override any GCC internal prototype to avoid an error.
19942   Use char because int might match the return type of a GCC
19943   builtin and then its argument prototype would still apply.  */
19944char dlopen ();
19945int
19946main (void)
19947{
19948return dlopen ();
19949  ;
19950  return 0;
19951}
19952_ACEOF
19953for ac_lib in '' dl
19954do
19955  if test -z "$ac_lib"; then
19956    ac_res="none required"
19957  else
19958    ac_res=-l$ac_lib
19959    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
19960  fi
19961  if ac_fn_c_try_link "$LINENO"
19962then :
19963  ac_cv_search_dlopen=$ac_res
19964fi
19965rm -f core conftest.err conftest.$ac_objext conftest.beam \
19966    conftest$ac_exeext
19967  if test ${ac_cv_search_dlopen+y}
19968then :
19969  break
19970fi
19971done
19972if test ${ac_cv_search_dlopen+y}
19973then :
19974
19975else $as_nop
19976  ac_cv_search_dlopen=no
19977fi
19978rm conftest.$ac_ext
19979LIBS=$ac_func_search_save_LIBS
19980fi
19981{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
19982printf "%s\n" "$ac_cv_search_dlopen" >&6; }
19983ac_res=$ac_cv_search_dlopen
19984if test "$ac_res" != no
19985then :
19986  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
19987
19988fi
19989
19990    DYNLIBMOD_EXTRALIBS="-export-dynamic"
19991  else
19992    DYNLIBMOD_EXTRALIBS="-Wl,--export-all-symbols,--out-implib,libunbound.dll.a"
19993  fi
19994
19995fi
19996
19997# Check for PyUnbound
19998
19999# Check whether --with-pyunbound was given.
20000if test ${with_pyunbound+y}
20001then :
20002  withval=$with_pyunbound;
20003else $as_nop
20004   withval="no"
20005fi
20006
20007
20008ub_test_python=no
20009ub_with_pyunbound=no
20010if test x_$withval != x_no; then
20011   ub_with_pyunbound=yes
20012   ub_test_python=yes
20013fi
20014
20015# Check for Python module
20016
20017# Check whether --with-pythonmodule was given.
20018if test ${with_pythonmodule+y}
20019then :
20020  withval=$with_pythonmodule;
20021else $as_nop
20022   withval="no"
20023fi
20024
20025
20026ub_with_pythonmod=no
20027if test x_$withval != x_no; then
20028   ub_with_pythonmod=yes
20029   ub_test_python=yes
20030fi
20031
20032# Check for Python & SWIG only on PyUnbound or PyModule
20033if test x_$ub_test_python != x_no; then
20034
20035   # Check for Python
20036   ub_have_python=no
20037   ac_save_LIBS="$LIBS"
20038        #
20039        # Allow the use of a (user set) custom python version
20040        #
20041
20042
20043        # Extract the first word of "python[$PYTHON_VERSION]", so it can be a program name with args.
20044set dummy python$PYTHON_VERSION; ac_word=$2
20045{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20046printf %s "checking for $ac_word... " >&6; }
20047if test ${ac_cv_path_PYTHON+y}
20048then :
20049  printf %s "(cached) " >&6
20050else $as_nop
20051  case $PYTHON in
20052  [\\/]* | ?:[\\/]*)
20053  ac_cv_path_PYTHON="$PYTHON" # Let the user override the test with a path.
20054  ;;
20055  *)
20056  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20057for as_dir in $PATH
20058do
20059  IFS=$as_save_IFS
20060  case $as_dir in #(((
20061    '') as_dir=./ ;;
20062    */) ;;
20063    *) as_dir=$as_dir/ ;;
20064  esac
20065    for ac_exec_ext in '' $ac_executable_extensions; do
20066  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
20067    ac_cv_path_PYTHON="$as_dir$ac_word$ac_exec_ext"
20068    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
20069    break 2
20070  fi
20071done
20072  done
20073IFS=$as_save_IFS
20074
20075  ;;
20076esac
20077fi
20078PYTHON=$ac_cv_path_PYTHON
20079if test -n "$PYTHON"; then
20080  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5
20081printf "%s\n" "$PYTHON" >&6; }
20082else
20083  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
20084printf "%s\n" "no" >&6; }
20085fi
20086
20087
20088        if test -z "$PYTHON"; then
20089           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
20090           PYTHON_VERSION=""
20091        fi
20092
20093        if test -z "$PYTHON_VERSION"; then
20094		PYTHON_VERSION=`$PYTHON -c "import sys; \
20095			print(sys.version.split()[0])"`
20096	fi
20097	# calculate the version number components.
20098
20099	v="$PYTHON_VERSION"
20100	PYTHON_VERSION_MAJOR=`echo $v | sed 's/[^0-9].*//'`
20101	if test -z "$PYTHON_VERSION_MAJOR"; then PYTHON_VERSION_MAJOR="0"; fi
20102	v=`echo $v | sed -e 's/^[0-9]*$//' -e 's/[0-9]*[^0-9]//'`
20103	PYTHON_VERSION_MINOR=`echo $v | sed 's/[^0-9].*//'`
20104	if test -z "$PYTHON_VERSION_MINOR"; then PYTHON_VERSION_MINOR="0"; fi
20105	v=`echo $v | sed -e 's/^[0-9]*$//' -e 's/[0-9]*[^0-9]//'`
20106	PYTHON_VERSION_PATCH=`echo $v | sed 's/[^0-9].*//'`
20107	if test -z "$PYTHON_VERSION_PATCH"; then PYTHON_VERSION_PATCH="0"; fi
20108
20109
20110	# For some systems, sysconfig exists, but has the wrong paths,
20111	# on Debian 10, for python 2.7 and 3.7. So, we check the version,
20112	# and for older versions try distutils.sysconfig first. For newer
20113	# versions>=3.10, where distutils.sysconfig is deprecated, use
20114	# sysconfig first and then attempt the other one.
20115	py_distutils_first="no"
20116	if test $PYTHON_VERSION_MAJOR -lt 3; then
20117		py_distutils_first="yes"
20118	fi
20119	if test $PYTHON_VERSION_MAJOR -eq 3 -a $PYTHON_VERSION_MINOR -lt 10; then
20120		py_distutils_first="yes"
20121	fi
20122
20123	# Check if you have the first module
20124	if test "$py_distutils_first" = "yes"; then m="distutils"; else m="sysconfig"; fi
20125	sysconfig_module=""
20126	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for the $m Python module" >&5
20127printf %s "checking for the $m Python module... " >&6; }
20128        if ac_modulecheck_result1=`$PYTHON -c "import $m" 2>&1`; then
20129                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
20130printf "%s\n" "yes" >&6; }
20131		sysconfig_module="$m"
20132	else
20133                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
20134printf "%s\n" "no" >&6; }
20135	fi
20136
20137	# if not found, try the other one.
20138	if test -z "$sysconfig_module"; then
20139		if test "$py_distutils_first" = "yes"; then m2="sysconfig"; else m2="distutils"; fi
20140		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for the $m2 Python module" >&5
20141printf %s "checking for the $m2 Python module... " >&6; }
20142		if ac_modulecheck_result2=`$PYTHON -c "import $m2" 2>&1`; then
20143			{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
20144printf "%s\n" "yes" >&6; }
20145			sysconfig_module="$m2"
20146		else
20147			{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
20148printf "%s\n" "no" >&6; }
20149			as_fn_error $? "cannot import Python module \"$m\", or \"$m2\".
20150	Please check your Python installation. The errors are:
20151	$m
20152	$ac_modulecheck_result1
20153	$m2
20154	$ac_modulecheck_result2" "$LINENO" 5
20155			PYTHON_VERSION=""
20156		fi
20157	fi
20158	if test "$sysconfig_module" = "distutils"; then sysconfig_module="distutils.sysconfig"; fi
20159
20160        #
20161        # Check for Python include path
20162        #
20163        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Python include path" >&5
20164printf %s "checking for Python include path... " >&6; }
20165        if test -z "$PYTHON_CPPFLAGS"; then
20166		if test "$sysconfig_module" = "sysconfig"; then
20167			python_path=`$PYTHON -c 'import sysconfig; \
20168				print(sysconfig.get_path("include"));'`
20169		else
20170			python_path=`$PYTHON -c "import distutils.sysconfig; \
20171				print(distutils.sysconfig.get_python_inc());"`
20172		fi
20173                if test -n "${python_path}"; then
20174                        python_path="-I$python_path"
20175                fi
20176                PYTHON_CPPFLAGS=$python_path
20177        fi
20178        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PYTHON_CPPFLAGS" >&5
20179printf "%s\n" "$PYTHON_CPPFLAGS" >&6; }
20180
20181
20182        #
20183        # Check for Python library path
20184        #
20185        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Python library path" >&5
20186printf %s "checking for Python library path... " >&6; }
20187        if test -z "$PYTHON_LDFLAGS"; then
20188                PYTHON_LDFLAGS=`$PYTHON -c "from $sysconfig_module import *; \
20189                        print('-L'+get_config_var('LIBDIR')+' -L'+get_config_var('LIBDEST')+' '+get_config_var('BLDLIBRARY'));"`
20190        fi
20191        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PYTHON_LDFLAGS" >&5
20192printf "%s\n" "$PYTHON_LDFLAGS" >&6; }
20193
20194
20195        if test -z "$PYTHON_LIBDIR"; then
20196                PYTHON_LIBDIR=`$PYTHON -c "from $sysconfig_module import *; \
20197                        print(get_config_var('LIBDIR'));"`
20198        fi
20199
20200        #
20201        # Check for site packages
20202        #
20203        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Python site-packages path" >&5
20204printf %s "checking for Python site-packages path... " >&6; }
20205        if test -z "$PYTHON_SITE_PKG"; then
20206		if test "$sysconfig_module" = "sysconfig"; then
20207			PYTHON_SITE_PKG=`$PYTHON -c 'import sysconfig; \
20208				print(sysconfig.get_path("platlib"));'`
20209		else
20210			PYTHON_SITE_PKG=`$PYTHON -c "import distutils.sysconfig; \
20211				print(distutils.sysconfig.get_python_lib(1,0));"`
20212		fi
20213        fi
20214        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PYTHON_SITE_PKG" >&5
20215printf "%s\n" "$PYTHON_SITE_PKG" >&6; }
20216
20217
20218        #
20219        # final check to see if everything compiles alright
20220        #
20221        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking consistency of all components of python development environment" >&5
20222printf %s "checking consistency of all components of python development environment... " >&6; }
20223        ac_ext=c
20224ac_cpp='$CPP $CPPFLAGS'
20225ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20226ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20227ac_compiler_gnu=$ac_cv_c_compiler_gnu
20228
20229        # save current global flags
20230        ac_save_LIBS="$LIBS"
20231        ac_save_CPPFLAGS="$CPPFLAGS"
20232
20233        LIBS="$LIBS $PYTHON_LDFLAGS"
20234        CPPFLAGS="$CPPFLAGS $PYTHON_CPPFLAGS"
20235        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20236/* end confdefs.h.  */
20237
20238                #include <Python.h>
20239
20240int
20241main (void)
20242{
20243
20244                Py_Initialize();
20245
20246  ;
20247  return 0;
20248}
20249_ACEOF
20250if ac_fn_c_try_link "$LINENO"
20251then :
20252  pythonexists=yes
20253else $as_nop
20254  pythonexists=no
20255fi
20256rm -f core conftest.err conftest.$ac_objext conftest.beam \
20257    conftest$ac_exeext conftest.$ac_ext
20258
20259        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $pythonexists" >&5
20260printf "%s\n" "$pythonexists" >&6; }
20261
20262        if test ! "$pythonexists" = "yes"; then
20263           as_fn_error $? "
20264  Could not link test program to Python. Maybe the main Python library has been
20265  installed in some non-standard library path. If so, pass it to configure,
20266  via the LDFLAGS environment variable.
20267  Example: ./configure LDFLAGS=\"-L/usr/non-standard-path/python/lib\"
20268  ============================================================================
20269   ERROR!
20270   You probably have to install the development version of the Python package
20271   for your distribution.  The exact name of this package varies among them.
20272  ============================================================================
20273           " "$LINENO" 5
20274          PYTHON_VERSION=""
20275        fi
20276        ac_ext=c
20277ac_cpp='$CPP $CPPFLAGS'
20278ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20279ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20280ac_compiler_gnu=$ac_cv_c_compiler_gnu
20281
20282        # turn back to default flags
20283        CPPFLAGS="$ac_save_CPPFLAGS"
20284        LIBS="$ac_save_LIBS"
20285
20286        #
20287        # all done!
20288        #
20289
20290   if test ! -z "$PYTHON_VERSION"; then
20291	badversion="no"
20292	if test "$PYTHON_VERSION_MAJOR" -lt 2; then
20293		badversion="yes"
20294	fi
20295	if test "$PYTHON_VERSION_MAJOR" -eq 2 -a "$PYTHON_VERSION_MINOR" -lt 4; then
20296		badversion="yes"
20297	fi
20298	if test "$badversion" = "yes"; then
20299		as_fn_error $? "Python version >= 2.4.0 is required" "$LINENO" 5
20300	fi
20301
20302      PY_MAJOR_VERSION="`$PYTHON -c \"import sys; print(sys.version_info[0])\"`"
20303
20304      # Have Python
20305
20306printf "%s\n" "#define HAVE_PYTHON 1" >>confdefs.h
20307
20308      if test x_$ub_with_pythonmod != x_no; then
20309        if test -n "$LIBS"; then
20310          LIBS="$PYTHON_LDFLAGS $LIBS"
20311        else
20312          LIBS="$PYTHON_LDFLAGS"
20313        fi
20314      fi
20315      PYTHON_LIBS="$PYTHON_LDFLAGS"
20316
20317      if test -n "$CPPFLAGS"; then
20318        CPPFLAGS="$CPPFLAGS $PYTHON_CPPFLAGS"
20319      else
20320        CPPFLAGS="$PYTHON_CPPFLAGS"
20321      fi
20322      if test "$PYTHON_LIBDIR" != "/usr/lib" -a "$PYTHON_LIBDIR" != "" -a "$PYTHON_LIBDIR" != "/usr/lib64"; then
20323
20324	if test "x$enable_rpath" = xyes; then
20325		if echo "$PYTHON_LIBDIR" | grep "^/" >/dev/null; then
20326			RUNTIME_PATH="$RUNTIME_PATH -R$PYTHON_LIBDIR"
20327		fi
20328	fi
20329
20330      fi
20331      ub_have_python=yes
20332      if test -n "$PKG_CONFIG" && \
20333    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\"python\${PY_MAJOR_VERSION}\"\""; } >&5
20334  ($PKG_CONFIG --exists --print-errors ""python${PY_MAJOR_VERSION}"") 2>&5
20335  ac_status=$?
20336  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20337  test $ac_status = 0; }; then
20338  PC_PY_DEPENDENCY="python${PY_MAJOR_VERSION}"
20339else
20340  PC_PY_DEPENDENCY="python"
20341fi
20342
20343
20344      # Check for SWIG
20345      ub_have_swig=no
20346      # Check whether --enable-swig-version-check was given.
20347if test ${enable_swig_version_check+y}
20348then :
20349  enableval=$enable_swig_version_check;
20350fi
20351
20352      if test "$enable_swig_version_check" = "yes"; then
20353
20354        # Find path to the "swig" executable.
20355        for ac_prog in swig swig3.0 swig2.0
20356do
20357  # Extract the first word of "$ac_prog", so it can be a program name with args.
20358set dummy $ac_prog; ac_word=$2
20359{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20360printf %s "checking for $ac_word... " >&6; }
20361if test ${ac_cv_path_SWIG+y}
20362then :
20363  printf %s "(cached) " >&6
20364else $as_nop
20365  case $SWIG in
20366  [\\/]* | ?:[\\/]*)
20367  ac_cv_path_SWIG="$SWIG" # Let the user override the test with a path.
20368  ;;
20369  *)
20370  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20371for as_dir in $PATH
20372do
20373  IFS=$as_save_IFS
20374  case $as_dir in #(((
20375    '') as_dir=./ ;;
20376    */) ;;
20377    *) as_dir=$as_dir/ ;;
20378  esac
20379    for ac_exec_ext in '' $ac_executable_extensions; do
20380  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
20381    ac_cv_path_SWIG="$as_dir$ac_word$ac_exec_ext"
20382    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
20383    break 2
20384  fi
20385done
20386  done
20387IFS=$as_save_IFS
20388
20389  ;;
20390esac
20391fi
20392SWIG=$ac_cv_path_SWIG
20393if test -n "$SWIG"; then
20394  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $SWIG" >&5
20395printf "%s\n" "$SWIG" >&6; }
20396else
20397  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
20398printf "%s\n" "no" >&6; }
20399fi
20400
20401
20402  test -n "$SWIG" && break
20403done
20404
20405        if test -z "$SWIG" ; then
20406                :
20407        elif test -z "2.0.1" ; then
20408                :
20409	else
20410                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking SWIG version" >&5
20411printf %s "checking SWIG version... " >&6; }
20412                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'`
20413                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $swig_version" >&5
20414printf "%s\n" "$swig_version" >&6; }
20415                if test -n "$swig_version" ; then
20416                        # Calculate the required version number components
20417                        required=2.0.1
20418                        required_major=`echo $required | sed 's/[^0-9].*//'`
20419                        if test -z "$required_major" ; then
20420                                required_major=0
20421                        fi
20422                        required=`echo $required. | sed 's/[0-9]*[^0-9]//'`
20423                        required_minor=`echo $required | sed 's/[^0-9].*//'`
20424                        if test -z "$required_minor" ; then
20425                                required_minor=0
20426                        fi
20427                        required=`echo $required. | sed 's/[0-9]*[^0-9]//'`
20428                        required_patch=`echo $required | sed 's/[^0-9].*//'`
20429                        if test -z "$required_patch" ; then
20430                                required_patch=0
20431                        fi
20432                        # Calculate the available version number components
20433                        available=$swig_version
20434                        available_major=`echo $available | sed 's/[^0-9].*//'`
20435                        if test -z "$available_major" ; then
20436                                available_major=0
20437                        fi
20438                        available=`echo $available | sed 's/[0-9]*[^0-9]//'`
20439                        available_minor=`echo $available | sed 's/[^0-9].*//'`
20440                        if test -z "$available_minor" ; then
20441                                available_minor=0
20442                        fi
20443                        available=`echo $available | sed 's/[0-9]*[^0-9]//'`
20444                        available_patch=`echo $available | sed 's/[^0-9].*//'`
20445                        if test -z "$available_patch" ; then
20446                                available_patch=0
20447                        fi
20448                        # Convert the version tuple into a single number for easier comparison.
20449                        # Using base 100 should be safe since SWIG internally uses BCD values
20450                        # to encode its version number.
20451                        required_swig_vernum=`expr $required_major \* 10000 \
20452                            \+ $required_minor \* 100 \+ $required_patch`
20453                        available_swig_vernum=`expr $available_major \* 10000 \
20454                            \+ $available_minor \* 100 \+ $available_patch`
20455
20456                        if test $available_swig_vernum -lt $required_swig_vernum; then
20457                                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: SWIG version >= 2.0.1 is required.  You have $swig_version." >&5
20458printf "%s\n" "$as_me: WARNING: SWIG version >= 2.0.1 is required.  You have $swig_version." >&2;}
20459                                SWIG=''
20460
20461                        else
20462                                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for SWIG library" >&5
20463printf %s "checking for SWIG library... " >&6; }
20464                                SWIG_LIB=`$SWIG -swiglib | tr '\r\n' '  '`
20465                                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $SWIG_LIB" >&5
20466printf "%s\n" "$SWIG_LIB" >&6; }
20467
20468                        fi
20469                else
20470                        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cannot determine SWIG version" >&5
20471printf "%s\n" "$as_me: WARNING: cannot determine SWIG version" >&2;}
20472                        SWIG=''
20473
20474                fi
20475        fi
20476
20477
20478      else
20479
20480        # Find path to the "swig" executable.
20481        for ac_prog in swig swig3.0 swig2.0
20482do
20483  # Extract the first word of "$ac_prog", so it can be a program name with args.
20484set dummy $ac_prog; ac_word=$2
20485{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20486printf %s "checking for $ac_word... " >&6; }
20487if test ${ac_cv_path_SWIG+y}
20488then :
20489  printf %s "(cached) " >&6
20490else $as_nop
20491  case $SWIG in
20492  [\\/]* | ?:[\\/]*)
20493  ac_cv_path_SWIG="$SWIG" # Let the user override the test with a path.
20494  ;;
20495  *)
20496  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20497for as_dir in $PATH
20498do
20499  IFS=$as_save_IFS
20500  case $as_dir in #(((
20501    '') as_dir=./ ;;
20502    */) ;;
20503    *) as_dir=$as_dir/ ;;
20504  esac
20505    for ac_exec_ext in '' $ac_executable_extensions; do
20506  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
20507    ac_cv_path_SWIG="$as_dir$ac_word$ac_exec_ext"
20508    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
20509    break 2
20510  fi
20511done
20512  done
20513IFS=$as_save_IFS
20514
20515  ;;
20516esac
20517fi
20518SWIG=$ac_cv_path_SWIG
20519if test -n "$SWIG"; then
20520  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $SWIG" >&5
20521printf "%s\n" "$SWIG" >&6; }
20522else
20523  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
20524printf "%s\n" "no" >&6; }
20525fi
20526
20527
20528  test -n "$SWIG" && break
20529done
20530
20531        if test -z "$SWIG" ; then
20532                :
20533        elif test -z "" ; then
20534                :
20535	else
20536                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking SWIG version" >&5
20537printf %s "checking SWIG version... " >&6; }
20538                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'`
20539                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $swig_version" >&5
20540printf "%s\n" "$swig_version" >&6; }
20541                if test -n "$swig_version" ; then
20542                        # Calculate the required version number components
20543                        required=
20544                        required_major=`echo $required | sed 's/[^0-9].*//'`
20545                        if test -z "$required_major" ; then
20546                                required_major=0
20547                        fi
20548                        required=`echo $required. | sed 's/[0-9]*[^0-9]//'`
20549                        required_minor=`echo $required | sed 's/[^0-9].*//'`
20550                        if test -z "$required_minor" ; then
20551                                required_minor=0
20552                        fi
20553                        required=`echo $required. | sed 's/[0-9]*[^0-9]//'`
20554                        required_patch=`echo $required | sed 's/[^0-9].*//'`
20555                        if test -z "$required_patch" ; then
20556                                required_patch=0
20557                        fi
20558                        # Calculate the available version number components
20559                        available=$swig_version
20560                        available_major=`echo $available | sed 's/[^0-9].*//'`
20561                        if test -z "$available_major" ; then
20562                                available_major=0
20563                        fi
20564                        available=`echo $available | sed 's/[0-9]*[^0-9]//'`
20565                        available_minor=`echo $available | sed 's/[^0-9].*//'`
20566                        if test -z "$available_minor" ; then
20567                                available_minor=0
20568                        fi
20569                        available=`echo $available | sed 's/[0-9]*[^0-9]//'`
20570                        available_patch=`echo $available | sed 's/[^0-9].*//'`
20571                        if test -z "$available_patch" ; then
20572                                available_patch=0
20573                        fi
20574                        # Convert the version tuple into a single number for easier comparison.
20575                        # Using base 100 should be safe since SWIG internally uses BCD values
20576                        # to encode its version number.
20577                        required_swig_vernum=`expr $required_major \* 10000 \
20578                            \+ $required_minor \* 100 \+ $required_patch`
20579                        available_swig_vernum=`expr $available_major \* 10000 \
20580                            \+ $available_minor \* 100 \+ $available_patch`
20581
20582                        if test $available_swig_vernum -lt $required_swig_vernum; then
20583                                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: SWIG version >=  is required.  You have $swig_version." >&5
20584printf "%s\n" "$as_me: WARNING: SWIG version >=  is required.  You have $swig_version." >&2;}
20585                                SWIG=''
20586
20587                        else
20588                                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for SWIG library" >&5
20589printf %s "checking for SWIG library... " >&6; }
20590                                SWIG_LIB=`$SWIG -swiglib | tr '\r\n' '  '`
20591                                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $SWIG_LIB" >&5
20592printf "%s\n" "$SWIG_LIB" >&6; }
20593
20594                        fi
20595                else
20596                        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cannot determine SWIG version" >&5
20597printf "%s\n" "$as_me: WARNING: cannot determine SWIG version" >&2;}
20598                        SWIG=''
20599
20600                fi
20601        fi
20602
20603
20604      fi
20605      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking SWIG" >&5
20606printf %s "checking SWIG... " >&6; }
20607      if test ! -x "$SWIG"; then
20608         as_fn_error $? "failed to find swig tool, install it, or do not build Python module and PyUnbound" "$LINENO" 5
20609      else
20610
20611printf "%s\n" "#define HAVE_SWIG 1" >>confdefs.h
20612
20613         swig="$SWIG"
20614
20615         { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: present" >&5
20616printf "%s\n" "present" >&6; }
20617
20618         # If have Python & SWIG
20619         # Declare PythonMod
20620         if test x_$ub_with_pythonmod != x_no; then
20621
20622printf "%s\n" "#define WITH_PYTHONMODULE 1" >>confdefs.h
20623
20624            WITH_PYTHONMODULE=yes
20625
20626	    PYTHONMOD_OBJ="pythonmod.lo pythonmod_utils.lo"
20627
20628	    PYTHONMOD_HEADER='$(srcdir)/pythonmod/pythonmod.h'
20629
20630	    PYTHONMOD_INSTALL=pythonmod-install
20631
20632	    PYTHONMOD_UNINSTALL=pythonmod-uninstall
20633
20634         fi
20635
20636         # Declare PyUnbound
20637         if test x_$ub_with_pyunbound != x_no; then
20638
20639printf "%s\n" "#define WITH_PYUNBOUND 1" >>confdefs.h
20640
20641            WITH_PYUNBOUND=yes
20642
20643	    PYUNBOUND_OBJ="libunbound_wrap.lo"
20644
20645	    PYUNBOUND_TARGET="_unbound.la"
20646
20647	    PYUNBOUND_INSTALL=pyunbound-install
20648
20649	    PYUNBOUND_UNINSTALL=pyunbound-uninstall
20650
20651         fi
20652      fi
20653   else
20654      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: *** Python libraries not found, won't build PythonMod or PyUnbound ***" >&5
20655printf "%s\n" "*** Python libraries not found, won't build PythonMod or PyUnbound ***" >&6; }
20656      ub_with_pyunbound=no
20657      ub_with_pythonmod=no
20658   fi
20659fi
20660
20661if test "`uname`" = "NetBSD"; then
20662	NETBSD_LINTFLAGS='"-D__RENAME(x)=" -D_NETINET_IN_H_'
20663
20664fi
20665
20666if test "`uname`" = "Linux"; then
20667	# splint cannot parse modern c99 header files
20668	GCC_DOCKER_LINTFLAGS='-syntax'
20669
20670fi
20671{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for build time" >&5
20672printf %s "checking for build time... " >&6; }
20673ax_date_fmt="%Y%m%d"
20674if test x"$SOURCE_DATE_EPOCH" = x
20675then :
20676  CONFIG_DATE=`date "+$ax_date_fmt"`
20677else $as_nop
20678  ax_build_date=`date -u -d "@$SOURCE_DATE_EPOCH" "+$ax_date_fmt" 2>/dev/null \
20679                 || date -u -r "$SOURCE_DATE_EPOCH" "+$ax_date_fmt" 2>/dev/null`
20680  if test x"$ax_build_date" = x
20681then :
20682  as_fn_error $? "malformed SOURCE_DATE_EPOCH" "$LINENO" 5
20683else $as_nop
20684  CONFIG_DATE=$ax_build_date
20685fi
20686fi
20687{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CONFIG_DATE" >&5
20688printf "%s\n" "$CONFIG_DATE" >&6; }
20689
20690
20691
20692
20693# Checks for libraries.
20694
20695# libnss
20696USE_NSS="no"
20697
20698# Check whether --with-nss was given.
20699if test ${with_nss+y}
20700then :
20701  withval=$with_nss;
20702	USE_NSS="yes"
20703
20704printf "%s\n" "#define HAVE_NSS 1" >>confdefs.h
20705
20706	if test "$withval" != "" -a "$withval" != "yes"; then
20707		CPPFLAGS="$CPPFLAGS -I$withval/include/nss3"
20708		LDFLAGS="$LDFLAGS -L$withval/lib"
20709
20710	if test "x$enable_rpath" = xyes; then
20711		if echo "$withval/lib" | grep "^/" >/dev/null; then
20712			RUNTIME_PATH="$RUNTIME_PATH -R$withval/lib"
20713		fi
20714	fi
20715
20716		CPPFLAGS="-I$withval/include/nspr4 $CPPFLAGS"
20717	else
20718		CPPFLAGS="$CPPFLAGS -I/usr/include/nss3"
20719		CPPFLAGS="-I/usr/include/nspr4 $CPPFLAGS"
20720	fi
20721        LIBS="$LIBS -lnss3 -lnspr4"
20722	SSLLIB=""
20723	PC_CRYPTO_DEPENDENCY="nss nspr"
20724
20725
20726
20727fi
20728
20729
20730# libnettle
20731USE_NETTLE="no"
20732
20733# Check whether --with-nettle was given.
20734if test ${with_nettle+y}
20735then :
20736  withval=$with_nettle;
20737	USE_NETTLE="yes"
20738
20739printf "%s\n" "#define HAVE_NETTLE 1" >>confdefs.h
20740
20741	ac_fn_c_check_header_compile "$LINENO" "nettle/dsa-compat.h" "ac_cv_header_nettle_dsa_compat_h" "$ac_includes_default
20742"
20743if test "x$ac_cv_header_nettle_dsa_compat_h" = xyes
20744then :
20745  printf "%s\n" "#define HAVE_NETTLE_DSA_COMPAT_H 1" >>confdefs.h
20746
20747fi
20748
20749	if test "$withval" != "" -a "$withval" != "yes"; then
20750		CPPFLAGS="$CPPFLAGS -I$withval/include/nettle"
20751		LDFLAGS="$LDFLAGS -L$withval/lib"
20752
20753	if test "x$enable_rpath" = xyes; then
20754		if echo "$withval/lib" | grep "^/" >/dev/null; then
20755			RUNTIME_PATH="$RUNTIME_PATH -R$withval/lib"
20756		fi
20757	fi
20758
20759	else
20760		CPPFLAGS="$CPPFLAGS -I/usr/include/nettle"
20761	fi
20762        LIBS="$LIBS -lhogweed -lnettle -lgmp"
20763	SSLLIB=""
20764	PC_CRYPTO_DEPENDENCY="hogweed nettle"
20765
20766
20767
20768fi
20769
20770
20771# openssl
20772if test $USE_NSS = "no" -a $USE_NETTLE = "no"; then
20773
20774
20775# Check whether --with-ssl was given.
20776if test ${with_ssl+y}
20777then :
20778  withval=$with_ssl;
20779
20780else $as_nop
20781
20782            withval="yes"
20783
20784fi
20785
20786    if test x_$withval = x_no; then
20787	as_fn_error $? "Need SSL library to do digital signature cryptography" "$LINENO" 5
20788    fi
20789
20790    withval=$withval
20791    if test x_$withval != x_no; then
20792        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for SSL" >&5
20793printf %s "checking for SSL... " >&6; }
20794	if test -n "$withval"; then
20795										if test ! -f "$withval/include/openssl/ssl.h" -a -f "$withval/openssl/ssl.h"; then
20796			ssldir="$withval"
20797			found_ssl="yes"
20798			withval=""
20799			ssldir_include="$ssldir"
20800						ssldir_lib=`echo $ssldir | sed -e 's/include/lib/'`
20801			if test -f "$ssldir_lib/libssl.a" -o -f "$ssldir_lib/libssl.so"; then
20802				: # found here
20803			else
20804				ssldir_lib=`echo $ssldir | sed -e 's/include/lib64/'`
20805				if test -f "$ssldir_lib/libssl.a" -o -f "$ssldir_lib/libssl.so"; then
20806					: # found here
20807				else
20808					as_fn_error $? "Could not find openssl lib file, $ssldir_lib/libssl.so,a, pass like \"/usr/local\" or \"/usr/include/openssl11\"" "$LINENO" 5
20809				fi
20810			fi
20811		fi
20812	fi
20813        if test x_$withval = x_ -o x_$withval = x_yes; then
20814            withval="/usr/local/ssl /usr/lib/ssl /usr/ssl /usr/pkg /usr/local /opt/local /usr/sfw /usr"
20815        fi
20816        for dir in $withval; do
20817            ssldir="$dir"
20818            if test -f "$dir/include/openssl/ssl.h"; then
20819                found_ssl="yes"
20820		ssldir_include="$ssldir/include"
20821		if test ! -d "$ssldir/lib" -a -d "$ssldir/lib64"; then
20822			ssldir_lib="$ssldir/lib64"
20823		else
20824			ssldir_lib="$ssldir/lib"
20825		fi
20826                break;
20827            fi
20828        done
20829        if test x_$found_ssl != x_yes; then
20830            as_fn_error $? "Cannot find the SSL libraries in $withval" "$LINENO" 5
20831        else
20832            { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: found in $ssldir" >&5
20833printf "%s\n" "found in $ssldir" >&6; }
20834
20835printf "%s\n" "#define HAVE_SSL /**/" >>confdefs.h
20836
20837            HAVE_SSL=yes
20838	                if test "$ssldir" != "/usr"; then
20839		    CPPFLAGS="$CPPFLAGS -I$ssldir_include"
20840		    LIBSSL_CPPFLAGS="$LIBSSL_CPPFLAGS -I$ssldir_include"
20841		    LDFLAGS="$LDFLAGS -L$ssldir_lib"
20842		    LIBSSL_LDFLAGS="$LIBSSL_LDFLAGS -L$ssldir_lib"
20843
20844	if test "x$enable_rpath" = xyes; then
20845		if echo "$ssldir_lib" | grep "^/" >/dev/null; then
20846			RUNTIME_PATH="$RUNTIME_PATH -R$ssldir_lib"
20847		fi
20848	fi
20849
20850	    fi
20851
20852            { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for EVP_sha256 in -lcrypto" >&5
20853printf %s "checking for EVP_sha256 in -lcrypto... " >&6; }
20854            LIBS="$LIBS -lcrypto"
20855            LIBSSL_LIBS="$LIBSSL_LIBS -lcrypto"
20856            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20857/* end confdefs.h.  */
20858
20859int
20860main (void)
20861{
20862
20863                int EVP_sha256(void);
20864                (void)EVP_sha256();
20865
20866  ;
20867  return 0;
20868}
20869_ACEOF
20870if ac_fn_c_try_link "$LINENO"
20871then :
20872
20873                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
20874printf "%s\n" "yes" >&6; }
20875
20876printf "%s\n" "#define HAVE_EVP_SHA256 1" >>confdefs.h
20877
20878
20879else $as_nop
20880
20881                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
20882printf "%s\n" "no" >&6; }
20883                # check if -lwsock32 or -lgdi32 are needed.
20884                BAKLIBS="$LIBS"
20885                BAKSSLLIBS="$LIBSSL_LIBS"
20886		LIBS="$LIBS -lgdi32 -lws2_32"
20887		LIBSSL_LIBS="$LIBSSL_LIBS -lgdi32 -lws2_32"
20888                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if -lcrypto needs -lgdi32" >&5
20889printf %s "checking if -lcrypto needs -lgdi32... " >&6; }
20890                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20891/* end confdefs.h.  */
20892
20893int
20894main (void)
20895{
20896
20897                    int EVP_sha256(void);
20898                    (void)EVP_sha256();
20899
20900  ;
20901  return 0;
20902}
20903_ACEOF
20904if ac_fn_c_try_link "$LINENO"
20905then :
20906
20907
20908printf "%s\n" "#define HAVE_EVP_SHA256 1" >>confdefs.h
20909
20910                    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
20911printf "%s\n" "yes" >&6; }
20912
20913else $as_nop
20914
20915                    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
20916printf "%s\n" "no" >&6; }
20917                    LIBS="$BAKLIBS"
20918                    LIBSSL_LIBS="$BAKSSLLIBS"
20919
20920		    LIBS="$LIBS -lgdi32 -lws2_32 -lcrypt32"
20921		    LIBSSL_LIBS="$LIBSSL_LIBS -lgdi32 -lws2_32 -lcrypt32"
20922                    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if -lcrypto needs -lgdi32 -lws2_32 -lcrypt32" >&5
20923printf %s "checking if -lcrypto needs -lgdi32 -lws2_32 -lcrypt32... " >&6; }
20924		    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20925/* end confdefs.h.  */
20926
20927int
20928main (void)
20929{
20930
20931			int EVP_sha256(void);
20932			(void)EVP_sha256();
20933
20934  ;
20935  return 0;
20936}
20937_ACEOF
20938if ac_fn_c_try_link "$LINENO"
20939then :
20940
20941
20942printf "%s\n" "#define HAVE_EVP_SHA256 1" >>confdefs.h
20943
20944			{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
20945printf "%s\n" "yes" >&6; }
20946
20947else $as_nop
20948
20949			{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
20950printf "%s\n" "no" >&6; }
20951			LIBS="$BAKLIBS"
20952			LIBSSL_LIBS="$BAKSSLLIBS"
20953
20954			LIBS="$LIBS -lgdi32 -lws2_32 -lcrypt32 -l:libssp.a"
20955			LIBSSL_LIBS="$LIBSSL_LIBS -lgdi32 -lws2_32 -lcrypt32 -l:libssp.a"
20956			{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if -lcrypto needs -lgdi32 -lws2_32 -lcrypt32 -l:libssp.a" >&5
20957printf %s "checking if -lcrypto needs -lgdi32 -lws2_32 -lcrypt32 -l:libssp.a... " >&6; }
20958			cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20959/* end confdefs.h.  */
20960
20961int
20962main (void)
20963{
20964
20965			    int EVP_sha256(void);
20966			    (void)EVP_sha256();
20967
20968  ;
20969  return 0;
20970}
20971_ACEOF
20972if ac_fn_c_try_link "$LINENO"
20973then :
20974
20975
20976printf "%s\n" "#define HAVE_EVP_SHA256 1" >>confdefs.h
20977
20978			    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
20979printf "%s\n" "yes" >&6; }
20980
20981else $as_nop
20982
20983			    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
20984printf "%s\n" "no" >&6; }
20985			    LIBS="$BAKLIBS"
20986			    LIBSSL_LIBS="$BAKSSLLIBS"
20987
20988			    LIBS="$LIBS -ldl"
20989			    LIBSSL_LIBS="$LIBSSL_LIBS -ldl"
20990			    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if -lcrypto needs -ldl" >&5
20991printf %s "checking if -lcrypto needs -ldl... " >&6; }
20992			    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20993/* end confdefs.h.  */
20994
20995int
20996main (void)
20997{
20998
20999				int EVP_sha256(void);
21000				(void)EVP_sha256();
21001
21002  ;
21003  return 0;
21004}
21005_ACEOF
21006if ac_fn_c_try_link "$LINENO"
21007then :
21008
21009
21010printf "%s\n" "#define HAVE_EVP_SHA256 1" >>confdefs.h
21011
21012				{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
21013printf "%s\n" "yes" >&6; }
21014
21015else $as_nop
21016
21017				{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
21018printf "%s\n" "no" >&6; }
21019				LIBS="$BAKLIBS"
21020				LIBSSL_LIBS="$BAKSSLLIBS"
21021				LIBS="$LIBS -ldl -pthread"
21022				LIBSSL_LIBS="$LIBSSL_LIBS -ldl -pthread"
21023				{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if -lcrypto needs -ldl -pthread" >&5
21024printf %s "checking if -lcrypto needs -ldl -pthread... " >&6; }
21025				cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21026/* end confdefs.h.  */
21027
21028int
21029main (void)
21030{
21031
21032				    int EVP_sha256(void);
21033				    (void)EVP_sha256();
21034
21035  ;
21036  return 0;
21037}
21038_ACEOF
21039if ac_fn_c_try_link "$LINENO"
21040then :
21041
21042
21043printf "%s\n" "#define HAVE_EVP_SHA256 1" >>confdefs.h
21044
21045				    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
21046printf "%s\n" "yes" >&6; }
21047
21048else $as_nop
21049
21050				    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
21051printf "%s\n" "no" >&6; }
21052				    as_fn_error $? "OpenSSL found in $ssldir, but version 0.9.7 or higher is required" "$LINENO" 5
21053
21054fi
21055rm -f core conftest.err conftest.$ac_objext conftest.beam \
21056    conftest$ac_exeext conftest.$ac_ext
21057
21058fi
21059rm -f core conftest.err conftest.$ac_objext conftest.beam \
21060    conftest$ac_exeext conftest.$ac_ext
21061
21062fi
21063rm -f core conftest.err conftest.$ac_objext conftest.beam \
21064    conftest$ac_exeext conftest.$ac_ext
21065
21066fi
21067rm -f core conftest.err conftest.$ac_objext conftest.beam \
21068    conftest$ac_exeext conftest.$ac_ext
21069
21070fi
21071rm -f core conftest.err conftest.$ac_objext conftest.beam \
21072    conftest$ac_exeext conftest.$ac_ext
21073
21074fi
21075rm -f core conftest.err conftest.$ac_objext conftest.beam \
21076    conftest$ac_exeext conftest.$ac_ext
21077        fi
21078
21079
21080    fi
21081ac_fn_c_check_header_compile "$LINENO" "openssl/ssl.h" "ac_cv_header_openssl_ssl_h" "$ac_includes_default
21082"
21083if test "x$ac_cv_header_openssl_ssl_h" = xyes
21084then :
21085  printf "%s\n" "#define HAVE_OPENSSL_SSL_H 1" >>confdefs.h
21086
21087fi
21088
21089ac_fn_c_check_header_compile "$LINENO" "openssl/err.h" "ac_cv_header_openssl_err_h" "$ac_includes_default
21090"
21091if test "x$ac_cv_header_openssl_err_h" = xyes
21092then :
21093  printf "%s\n" "#define HAVE_OPENSSL_ERR_H 1" >>confdefs.h
21094
21095fi
21096
21097ac_fn_c_check_header_compile "$LINENO" "openssl/rand.h" "ac_cv_header_openssl_rand_h" "$ac_includes_default
21098"
21099if test "x$ac_cv_header_openssl_rand_h" = xyes
21100then :
21101  printf "%s\n" "#define HAVE_OPENSSL_RAND_H 1" >>confdefs.h
21102
21103fi
21104
21105
21106
21107
21108# check if libssl needs libdl
21109BAKLIBS="$LIBS"
21110LIBS="-lssl $LIBS"
21111{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if libssl needs libdl" >&5
21112printf %s "checking if libssl needs libdl... " >&6; }
21113cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21114/* end confdefs.h.  */
21115
21116/* Override any GCC internal prototype to avoid an error.
21117   Use char because int might match the return type of a GCC
21118   builtin and then its argument prototype would still apply.  */
21119char SSL_CTX_new ();
21120int
21121main (void)
21122{
21123return SSL_CTX_new ();
21124  ;
21125  return 0;
21126}
21127_ACEOF
21128if ac_fn_c_try_link "$LINENO"
21129then :
21130
21131	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
21132printf "%s\n" "no" >&6; }
21133	LIBS="$BAKLIBS"
21134
21135else $as_nop
21136
21137	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
21138printf "%s\n" "yes" >&6; }
21139	LIBS="$BAKLIBS"
21140	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
21141printf %s "checking for library containing dlopen... " >&6; }
21142if test ${ac_cv_search_dlopen+y}
21143then :
21144  printf %s "(cached) " >&6
21145else $as_nop
21146  ac_func_search_save_LIBS=$LIBS
21147cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21148/* end confdefs.h.  */
21149
21150/* Override any GCC internal prototype to avoid an error.
21151   Use char because int might match the return type of a GCC
21152   builtin and then its argument prototype would still apply.  */
21153char dlopen ();
21154int
21155main (void)
21156{
21157return dlopen ();
21158  ;
21159  return 0;
21160}
21161_ACEOF
21162for ac_lib in '' dl
21163do
21164  if test -z "$ac_lib"; then
21165    ac_res="none required"
21166  else
21167    ac_res=-l$ac_lib
21168    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
21169  fi
21170  if ac_fn_c_try_link "$LINENO"
21171then :
21172  ac_cv_search_dlopen=$ac_res
21173fi
21174rm -f core conftest.err conftest.$ac_objext conftest.beam \
21175    conftest$ac_exeext
21176  if test ${ac_cv_search_dlopen+y}
21177then :
21178  break
21179fi
21180done
21181if test ${ac_cv_search_dlopen+y}
21182then :
21183
21184else $as_nop
21185  ac_cv_search_dlopen=no
21186fi
21187rm conftest.$ac_ext
21188LIBS=$ac_func_search_save_LIBS
21189fi
21190{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
21191printf "%s\n" "$ac_cv_search_dlopen" >&6; }
21192ac_res=$ac_cv_search_dlopen
21193if test "$ac_res" != no
21194then :
21195  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
21196
21197fi
21198
21199
21200fi
21201rm -f core conftest.err conftest.$ac_objext conftest.beam \
21202    conftest$ac_exeext conftest.$ac_ext
21203SSLLIB="-lssl"
21204
21205PC_CRYPTO_DEPENDENCY=""
21206
21207
21208# check if -lcrypt32 is needed because CAPIENG needs that. (on windows)
21209BAKLIBS="$LIBS"
21210LIBS="-lssl $LIBS"
21211{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if libssl needs -lcrypt32" >&5
21212printf %s "checking if libssl needs -lcrypt32... " >&6; }
21213cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21214/* end confdefs.h.  */
21215
21216int
21217main (void)
21218{
21219
21220	int EVP_sha256(void);
21221	(void)EVP_sha256();
21222
21223  ;
21224  return 0;
21225}
21226_ACEOF
21227if ac_fn_c_try_link "$LINENO"
21228then :
21229
21230	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
21231printf "%s\n" "no" >&6; }
21232	LIBS="$BAKLIBS"
21233
21234else $as_nop
21235
21236	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
21237printf "%s\n" "yes" >&6; }
21238	LIBS="$BAKLIBS"
21239	LIBS="$LIBS -lcrypt32"
21240
21241fi
21242rm -f core conftest.err conftest.$ac_objext conftest.beam \
21243    conftest$ac_exeext conftest.$ac_ext
21244
21245{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for LibreSSL" >&5
21246printf %s "checking for LibreSSL... " >&6; }
21247if grep VERSION_TEXT $ssldir_include/openssl/opensslv.h | grep "LibreSSL" >/dev/null; then
21248	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
21249printf "%s\n" "yes" >&6; }
21250
21251printf "%s\n" "#define HAVE_LIBRESSL 1" >>confdefs.h
21252
21253	# libressl provides these compat functions, but they may also be
21254	# declared by the OS in libc.  See if they have been declared.
21255	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC options needed to detect all undeclared functions" >&5
21256printf %s "checking for $CC options needed to detect all undeclared functions... " >&6; }
21257if test ${ac_cv_c_undeclared_builtin_options+y}
21258then :
21259  printf %s "(cached) " >&6
21260else $as_nop
21261  ac_save_CFLAGS=$CFLAGS
21262   ac_cv_c_undeclared_builtin_options='cannot detect'
21263   for ac_arg in '' -fno-builtin; do
21264     CFLAGS="$ac_save_CFLAGS $ac_arg"
21265     # This test program should *not* compile successfully.
21266     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21267/* end confdefs.h.  */
21268
21269int
21270main (void)
21271{
21272(void) strchr;
21273  ;
21274  return 0;
21275}
21276_ACEOF
21277if ac_fn_c_try_compile "$LINENO"
21278then :
21279
21280else $as_nop
21281  # This test program should compile successfully.
21282        # No library function is consistently available on
21283        # freestanding implementations, so test against a dummy
21284        # declaration.  Include always-available headers on the
21285        # off chance that they somehow elicit warnings.
21286        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21287/* end confdefs.h.  */
21288#include <float.h>
21289#include <limits.h>
21290#include <stdarg.h>
21291#include <stddef.h>
21292extern void ac_decl (int, char *);
21293
21294int
21295main (void)
21296{
21297(void) ac_decl (0, (char *) 0);
21298  (void) ac_decl;
21299
21300  ;
21301  return 0;
21302}
21303_ACEOF
21304if ac_fn_c_try_compile "$LINENO"
21305then :
21306  if test x"$ac_arg" = x
21307then :
21308  ac_cv_c_undeclared_builtin_options='none needed'
21309else $as_nop
21310  ac_cv_c_undeclared_builtin_options=$ac_arg
21311fi
21312          break
21313fi
21314rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
21315fi
21316rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
21317    done
21318    CFLAGS=$ac_save_CFLAGS
21319
21320fi
21321{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_undeclared_builtin_options" >&5
21322printf "%s\n" "$ac_cv_c_undeclared_builtin_options" >&6; }
21323  case $ac_cv_c_undeclared_builtin_options in #(
21324  'cannot detect') :
21325    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
21326printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
21327as_fn_error $? "cannot make $CC report undeclared builtins
21328See \`config.log' for more details" "$LINENO" 5; } ;; #(
21329  'none needed') :
21330    ac_c_undeclared_builtin_options='' ;; #(
21331  *) :
21332    ac_c_undeclared_builtin_options=$ac_cv_c_undeclared_builtin_options ;;
21333esac
21334
21335ac_fn_check_decl "$LINENO" "strlcpy" "ac_cv_have_decl_strlcpy" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
21336if test "x$ac_cv_have_decl_strlcpy" = xyes
21337then :
21338  ac_have_decl=1
21339else $as_nop
21340  ac_have_decl=0
21341fi
21342printf "%s\n" "#define HAVE_DECL_STRLCPY $ac_have_decl" >>confdefs.h
21343ac_fn_check_decl "$LINENO" "strlcat" "ac_cv_have_decl_strlcat" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
21344if test "x$ac_cv_have_decl_strlcat" = xyes
21345then :
21346  ac_have_decl=1
21347else $as_nop
21348  ac_have_decl=0
21349fi
21350printf "%s\n" "#define HAVE_DECL_STRLCAT $ac_have_decl" >>confdefs.h
21351ac_fn_check_decl "$LINENO" "arc4random" "ac_cv_have_decl_arc4random" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
21352if test "x$ac_cv_have_decl_arc4random" = xyes
21353then :
21354  ac_have_decl=1
21355else $as_nop
21356  ac_have_decl=0
21357fi
21358printf "%s\n" "#define HAVE_DECL_ARC4RANDOM $ac_have_decl" >>confdefs.h
21359ac_fn_check_decl "$LINENO" "arc4random_uniform" "ac_cv_have_decl_arc4random_uniform" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
21360if test "x$ac_cv_have_decl_arc4random_uniform" = xyes
21361then :
21362  ac_have_decl=1
21363else $as_nop
21364  ac_have_decl=0
21365fi
21366printf "%s\n" "#define HAVE_DECL_ARC4RANDOM_UNIFORM $ac_have_decl" >>confdefs.h
21367
21368else
21369	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
21370printf "%s\n" "no" >&6; }
21371fi
21372ac_fn_c_check_header_compile "$LINENO" "openssl/conf.h" "ac_cv_header_openssl_conf_h" "$ac_includes_default
21373"
21374if test "x$ac_cv_header_openssl_conf_h" = xyes
21375then :
21376  printf "%s\n" "#define HAVE_OPENSSL_CONF_H 1" >>confdefs.h
21377
21378fi
21379ac_fn_c_check_header_compile "$LINENO" "openssl/engine.h" "ac_cv_header_openssl_engine_h" "$ac_includes_default
21380"
21381if test "x$ac_cv_header_openssl_engine_h" = xyes
21382then :
21383  printf "%s\n" "#define HAVE_OPENSSL_ENGINE_H 1" >>confdefs.h
21384
21385fi
21386ac_fn_c_check_header_compile "$LINENO" "openssl/bn.h" "ac_cv_header_openssl_bn_h" "$ac_includes_default
21387"
21388if test "x$ac_cv_header_openssl_bn_h" = xyes
21389then :
21390  printf "%s\n" "#define HAVE_OPENSSL_BN_H 1" >>confdefs.h
21391
21392fi
21393ac_fn_c_check_header_compile "$LINENO" "openssl/dh.h" "ac_cv_header_openssl_dh_h" "$ac_includes_default
21394"
21395if test "x$ac_cv_header_openssl_dh_h" = xyes
21396then :
21397  printf "%s\n" "#define HAVE_OPENSSL_DH_H 1" >>confdefs.h
21398
21399fi
21400ac_fn_c_check_header_compile "$LINENO" "openssl/dsa.h" "ac_cv_header_openssl_dsa_h" "$ac_includes_default
21401"
21402if test "x$ac_cv_header_openssl_dsa_h" = xyes
21403then :
21404  printf "%s\n" "#define HAVE_OPENSSL_DSA_H 1" >>confdefs.h
21405
21406fi
21407ac_fn_c_check_header_compile "$LINENO" "openssl/rsa.h" "ac_cv_header_openssl_rsa_h" "$ac_includes_default
21408"
21409if test "x$ac_cv_header_openssl_rsa_h" = xyes
21410then :
21411  printf "%s\n" "#define HAVE_OPENSSL_RSA_H 1" >>confdefs.h
21412
21413fi
21414ac_fn_c_check_header_compile "$LINENO" "openssl/core_names.h" "ac_cv_header_openssl_core_names_h" "$ac_includes_default
21415"
21416if test "x$ac_cv_header_openssl_core_names_h" = xyes
21417then :
21418  printf "%s\n" "#define HAVE_OPENSSL_CORE_NAMES_H 1" >>confdefs.h
21419
21420fi
21421ac_fn_c_check_header_compile "$LINENO" "openssl/param_build.h" "ac_cv_header_openssl_param_build_h" "$ac_includes_default
21422"
21423if test "x$ac_cv_header_openssl_param_build_h" = xyes
21424then :
21425  printf "%s\n" "#define HAVE_OPENSSL_PARAM_BUILD_H 1" >>confdefs.h
21426
21427fi
21428
21429ac_fn_c_check_func "$LINENO" "OPENSSL_config" "ac_cv_func_OPENSSL_config"
21430if test "x$ac_cv_func_OPENSSL_config" = xyes
21431then :
21432  printf "%s\n" "#define HAVE_OPENSSL_CONFIG 1" >>confdefs.h
21433
21434fi
21435ac_fn_c_check_func "$LINENO" "EVP_sha1" "ac_cv_func_EVP_sha1"
21436if test "x$ac_cv_func_EVP_sha1" = xyes
21437then :
21438  printf "%s\n" "#define HAVE_EVP_SHA1 1" >>confdefs.h
21439
21440fi
21441ac_fn_c_check_func "$LINENO" "EVP_sha256" "ac_cv_func_EVP_sha256"
21442if test "x$ac_cv_func_EVP_sha256" = xyes
21443then :
21444  printf "%s\n" "#define HAVE_EVP_SHA256 1" >>confdefs.h
21445
21446fi
21447ac_fn_c_check_func "$LINENO" "EVP_sha512" "ac_cv_func_EVP_sha512"
21448if test "x$ac_cv_func_EVP_sha512" = xyes
21449then :
21450  printf "%s\n" "#define HAVE_EVP_SHA512 1" >>confdefs.h
21451
21452fi
21453ac_fn_c_check_func "$LINENO" "FIPS_mode" "ac_cv_func_FIPS_mode"
21454if test "x$ac_cv_func_FIPS_mode" = xyes
21455then :
21456  printf "%s\n" "#define HAVE_FIPS_MODE 1" >>confdefs.h
21457
21458fi
21459ac_fn_c_check_func "$LINENO" "EVP_default_properties_is_fips_enabled" "ac_cv_func_EVP_default_properties_is_fips_enabled"
21460if test "x$ac_cv_func_EVP_default_properties_is_fips_enabled" = xyes
21461then :
21462  printf "%s\n" "#define HAVE_EVP_DEFAULT_PROPERTIES_IS_FIPS_ENABLED 1" >>confdefs.h
21463
21464fi
21465ac_fn_c_check_func "$LINENO" "EVP_MD_CTX_new" "ac_cv_func_EVP_MD_CTX_new"
21466if test "x$ac_cv_func_EVP_MD_CTX_new" = xyes
21467then :
21468  printf "%s\n" "#define HAVE_EVP_MD_CTX_NEW 1" >>confdefs.h
21469
21470fi
21471ac_fn_c_check_func "$LINENO" "OpenSSL_add_all_digests" "ac_cv_func_OpenSSL_add_all_digests"
21472if test "x$ac_cv_func_OpenSSL_add_all_digests" = xyes
21473then :
21474  printf "%s\n" "#define HAVE_OPENSSL_ADD_ALL_DIGESTS 1" >>confdefs.h
21475
21476fi
21477ac_fn_c_check_func "$LINENO" "OPENSSL_init_crypto" "ac_cv_func_OPENSSL_init_crypto"
21478if test "x$ac_cv_func_OPENSSL_init_crypto" = xyes
21479then :
21480  printf "%s\n" "#define HAVE_OPENSSL_INIT_CRYPTO 1" >>confdefs.h
21481
21482fi
21483ac_fn_c_check_func "$LINENO" "EVP_cleanup" "ac_cv_func_EVP_cleanup"
21484if test "x$ac_cv_func_EVP_cleanup" = xyes
21485then :
21486  printf "%s\n" "#define HAVE_EVP_CLEANUP 1" >>confdefs.h
21487
21488fi
21489ac_fn_c_check_func "$LINENO" "ENGINE_cleanup" "ac_cv_func_ENGINE_cleanup"
21490if test "x$ac_cv_func_ENGINE_cleanup" = xyes
21491then :
21492  printf "%s\n" "#define HAVE_ENGINE_CLEANUP 1" >>confdefs.h
21493
21494fi
21495ac_fn_c_check_func "$LINENO" "ERR_load_crypto_strings" "ac_cv_func_ERR_load_crypto_strings"
21496if test "x$ac_cv_func_ERR_load_crypto_strings" = xyes
21497then :
21498  printf "%s\n" "#define HAVE_ERR_LOAD_CRYPTO_STRINGS 1" >>confdefs.h
21499
21500fi
21501ac_fn_c_check_func "$LINENO" "CRYPTO_cleanup_all_ex_data" "ac_cv_func_CRYPTO_cleanup_all_ex_data"
21502if test "x$ac_cv_func_CRYPTO_cleanup_all_ex_data" = xyes
21503then :
21504  printf "%s\n" "#define HAVE_CRYPTO_CLEANUP_ALL_EX_DATA 1" >>confdefs.h
21505
21506fi
21507ac_fn_c_check_func "$LINENO" "ERR_free_strings" "ac_cv_func_ERR_free_strings"
21508if test "x$ac_cv_func_ERR_free_strings" = xyes
21509then :
21510  printf "%s\n" "#define HAVE_ERR_FREE_STRINGS 1" >>confdefs.h
21511
21512fi
21513ac_fn_c_check_func "$LINENO" "RAND_cleanup" "ac_cv_func_RAND_cleanup"
21514if test "x$ac_cv_func_RAND_cleanup" = xyes
21515then :
21516  printf "%s\n" "#define HAVE_RAND_CLEANUP 1" >>confdefs.h
21517
21518fi
21519ac_fn_c_check_func "$LINENO" "DSA_SIG_set0" "ac_cv_func_DSA_SIG_set0"
21520if test "x$ac_cv_func_DSA_SIG_set0" = xyes
21521then :
21522  printf "%s\n" "#define HAVE_DSA_SIG_SET0 1" >>confdefs.h
21523
21524fi
21525ac_fn_c_check_func "$LINENO" "EVP_dss1" "ac_cv_func_EVP_dss1"
21526if test "x$ac_cv_func_EVP_dss1" = xyes
21527then :
21528  printf "%s\n" "#define HAVE_EVP_DSS1 1" >>confdefs.h
21529
21530fi
21531ac_fn_c_check_func "$LINENO" "EVP_DigestVerify" "ac_cv_func_EVP_DigestVerify"
21532if test "x$ac_cv_func_EVP_DigestVerify" = xyes
21533then :
21534  printf "%s\n" "#define HAVE_EVP_DIGESTVERIFY 1" >>confdefs.h
21535
21536fi
21537ac_fn_c_check_func "$LINENO" "EVP_aes_256_cbc" "ac_cv_func_EVP_aes_256_cbc"
21538if test "x$ac_cv_func_EVP_aes_256_cbc" = xyes
21539then :
21540  printf "%s\n" "#define HAVE_EVP_AES_256_CBC 1" >>confdefs.h
21541
21542fi
21543ac_fn_c_check_func "$LINENO" "EVP_EncryptInit_ex" "ac_cv_func_EVP_EncryptInit_ex"
21544if test "x$ac_cv_func_EVP_EncryptInit_ex" = xyes
21545then :
21546  printf "%s\n" "#define HAVE_EVP_ENCRYPTINIT_EX 1" >>confdefs.h
21547
21548fi
21549ac_fn_c_check_func "$LINENO" "HMAC_Init_ex" "ac_cv_func_HMAC_Init_ex"
21550if test "x$ac_cv_func_HMAC_Init_ex" = xyes
21551then :
21552  printf "%s\n" "#define HAVE_HMAC_INIT_EX 1" >>confdefs.h
21553
21554fi
21555ac_fn_c_check_func "$LINENO" "CRYPTO_THREADID_set_callback" "ac_cv_func_CRYPTO_THREADID_set_callback"
21556if test "x$ac_cv_func_CRYPTO_THREADID_set_callback" = xyes
21557then :
21558  printf "%s\n" "#define HAVE_CRYPTO_THREADID_SET_CALLBACK 1" >>confdefs.h
21559
21560fi
21561ac_fn_c_check_func "$LINENO" "EVP_MAC_CTX_set_params" "ac_cv_func_EVP_MAC_CTX_set_params"
21562if test "x$ac_cv_func_EVP_MAC_CTX_set_params" = xyes
21563then :
21564  printf "%s\n" "#define HAVE_EVP_MAC_CTX_SET_PARAMS 1" >>confdefs.h
21565
21566fi
21567ac_fn_c_check_func "$LINENO" "OSSL_PARAM_BLD_new" "ac_cv_func_OSSL_PARAM_BLD_new"
21568if test "x$ac_cv_func_OSSL_PARAM_BLD_new" = xyes
21569then :
21570  printf "%s\n" "#define HAVE_OSSL_PARAM_BLD_NEW 1" >>confdefs.h
21571
21572fi
21573ac_fn_c_check_func "$LINENO" "BIO_set_callback_ex" "ac_cv_func_BIO_set_callback_ex"
21574if test "x$ac_cv_func_BIO_set_callback_ex" = xyes
21575then :
21576  printf "%s\n" "#define HAVE_BIO_SET_CALLBACK_EX 1" >>confdefs.h
21577
21578fi
21579
21580
21581# these check_funcs need -lssl
21582BAKLIBS="$LIBS"
21583LIBS="-lssl $LIBS"
21584ac_fn_c_check_func "$LINENO" "OPENSSL_init_ssl" "ac_cv_func_OPENSSL_init_ssl"
21585if test "x$ac_cv_func_OPENSSL_init_ssl" = xyes
21586then :
21587  printf "%s\n" "#define HAVE_OPENSSL_INIT_SSL 1" >>confdefs.h
21588
21589fi
21590ac_fn_c_check_func "$LINENO" "SSL_CTX_set_security_level" "ac_cv_func_SSL_CTX_set_security_level"
21591if test "x$ac_cv_func_SSL_CTX_set_security_level" = xyes
21592then :
21593  printf "%s\n" "#define HAVE_SSL_CTX_SET_SECURITY_LEVEL 1" >>confdefs.h
21594
21595fi
21596ac_fn_c_check_func "$LINENO" "SSL_set1_host" "ac_cv_func_SSL_set1_host"
21597if test "x$ac_cv_func_SSL_set1_host" = xyes
21598then :
21599  printf "%s\n" "#define HAVE_SSL_SET1_HOST 1" >>confdefs.h
21600
21601fi
21602ac_fn_c_check_func "$LINENO" "SSL_get0_peername" "ac_cv_func_SSL_get0_peername"
21603if test "x$ac_cv_func_SSL_get0_peername" = xyes
21604then :
21605  printf "%s\n" "#define HAVE_SSL_GET0_PEERNAME 1" >>confdefs.h
21606
21607fi
21608ac_fn_c_check_func "$LINENO" "X509_VERIFY_PARAM_set1_host" "ac_cv_func_X509_VERIFY_PARAM_set1_host"
21609if test "x$ac_cv_func_X509_VERIFY_PARAM_set1_host" = xyes
21610then :
21611  printf "%s\n" "#define HAVE_X509_VERIFY_PARAM_SET1_HOST 1" >>confdefs.h
21612
21613fi
21614ac_fn_c_check_func "$LINENO" "SSL_CTX_set_ciphersuites" "ac_cv_func_SSL_CTX_set_ciphersuites"
21615if test "x$ac_cv_func_SSL_CTX_set_ciphersuites" = xyes
21616then :
21617  printf "%s\n" "#define HAVE_SSL_CTX_SET_CIPHERSUITES 1" >>confdefs.h
21618
21619fi
21620ac_fn_c_check_func "$LINENO" "SSL_CTX_set_tlsext_ticket_key_evp_cb" "ac_cv_func_SSL_CTX_set_tlsext_ticket_key_evp_cb"
21621if test "x$ac_cv_func_SSL_CTX_set_tlsext_ticket_key_evp_cb" = xyes
21622then :
21623  printf "%s\n" "#define HAVE_SSL_CTX_SET_TLSEXT_TICKET_KEY_EVP_CB 1" >>confdefs.h
21624
21625fi
21626ac_fn_c_check_func "$LINENO" "SSL_CTX_set_alpn_select_cb" "ac_cv_func_SSL_CTX_set_alpn_select_cb"
21627if test "x$ac_cv_func_SSL_CTX_set_alpn_select_cb" = xyes
21628then :
21629  printf "%s\n" "#define HAVE_SSL_CTX_SET_ALPN_SELECT_CB 1" >>confdefs.h
21630
21631fi
21632ac_fn_c_check_func "$LINENO" "SSL_get0_alpn_selected" "ac_cv_func_SSL_get0_alpn_selected"
21633if test "x$ac_cv_func_SSL_get0_alpn_selected" = xyes
21634then :
21635  printf "%s\n" "#define HAVE_SSL_GET0_ALPN_SELECTED 1" >>confdefs.h
21636
21637fi
21638ac_fn_c_check_func "$LINENO" "SSL_CTX_set_alpn_protos" "ac_cv_func_SSL_CTX_set_alpn_protos"
21639if test "x$ac_cv_func_SSL_CTX_set_alpn_protos" = xyes
21640then :
21641  printf "%s\n" "#define HAVE_SSL_CTX_SET_ALPN_PROTOS 1" >>confdefs.h
21642
21643fi
21644ac_fn_c_check_func "$LINENO" "SSL_get1_peer_certificate" "ac_cv_func_SSL_get1_peer_certificate"
21645if test "x$ac_cv_func_SSL_get1_peer_certificate" = xyes
21646then :
21647  printf "%s\n" "#define HAVE_SSL_GET1_PEER_CERTIFICATE 1" >>confdefs.h
21648
21649fi
21650
21651LIBS="$BAKLIBS"
21652
21653ac_fn_check_decl "$LINENO" "SSL_COMP_get_compression_methods" "ac_cv_have_decl_SSL_COMP_get_compression_methods" "
21654$ac_includes_default
21655#ifdef HAVE_OPENSSL_ERR_H
21656#include <openssl/err.h>
21657#endif
21658
21659#ifdef HAVE_OPENSSL_RAND_H
21660#include <openssl/rand.h>
21661#endif
21662
21663#ifdef HAVE_OPENSSL_CONF_H
21664#include <openssl/conf.h>
21665#endif
21666
21667#ifdef HAVE_OPENSSL_ENGINE_H
21668#include <openssl/engine.h>
21669#endif
21670#include <openssl/ssl.h>
21671#include <openssl/evp.h>
21672
21673" "$ac_c_undeclared_builtin_options" "CFLAGS"
21674if test "x$ac_cv_have_decl_SSL_COMP_get_compression_methods" = xyes
21675then :
21676  ac_have_decl=1
21677else $as_nop
21678  ac_have_decl=0
21679fi
21680printf "%s\n" "#define HAVE_DECL_SSL_COMP_GET_COMPRESSION_METHODS $ac_have_decl" >>confdefs.h
21681ac_fn_check_decl "$LINENO" "sk_SSL_COMP_pop_free" "ac_cv_have_decl_sk_SSL_COMP_pop_free" "
21682$ac_includes_default
21683#ifdef HAVE_OPENSSL_ERR_H
21684#include <openssl/err.h>
21685#endif
21686
21687#ifdef HAVE_OPENSSL_RAND_H
21688#include <openssl/rand.h>
21689#endif
21690
21691#ifdef HAVE_OPENSSL_CONF_H
21692#include <openssl/conf.h>
21693#endif
21694
21695#ifdef HAVE_OPENSSL_ENGINE_H
21696#include <openssl/engine.h>
21697#endif
21698#include <openssl/ssl.h>
21699#include <openssl/evp.h>
21700
21701" "$ac_c_undeclared_builtin_options" "CFLAGS"
21702if test "x$ac_cv_have_decl_sk_SSL_COMP_pop_free" = xyes
21703then :
21704  ac_have_decl=1
21705else $as_nop
21706  ac_have_decl=0
21707fi
21708printf "%s\n" "#define HAVE_DECL_SK_SSL_COMP_POP_FREE $ac_have_decl" >>confdefs.h
21709ac_fn_check_decl "$LINENO" "SSL_CTX_set_ecdh_auto" "ac_cv_have_decl_SSL_CTX_set_ecdh_auto" "
21710$ac_includes_default
21711#ifdef HAVE_OPENSSL_ERR_H
21712#include <openssl/err.h>
21713#endif
21714
21715#ifdef HAVE_OPENSSL_RAND_H
21716#include <openssl/rand.h>
21717#endif
21718
21719#ifdef HAVE_OPENSSL_CONF_H
21720#include <openssl/conf.h>
21721#endif
21722
21723#ifdef HAVE_OPENSSL_ENGINE_H
21724#include <openssl/engine.h>
21725#endif
21726#include <openssl/ssl.h>
21727#include <openssl/evp.h>
21728
21729" "$ac_c_undeclared_builtin_options" "CFLAGS"
21730if test "x$ac_cv_have_decl_SSL_CTX_set_ecdh_auto" = xyes
21731then :
21732  ac_have_decl=1
21733else $as_nop
21734  ac_have_decl=0
21735fi
21736printf "%s\n" "#define HAVE_DECL_SSL_CTX_SET_ECDH_AUTO $ac_have_decl" >>confdefs.h
21737ac_fn_check_decl "$LINENO" "SSL_CTX_set_tmp_ecdh" "ac_cv_have_decl_SSL_CTX_set_tmp_ecdh" "
21738$ac_includes_default
21739#ifdef HAVE_OPENSSL_ERR_H
21740#include <openssl/err.h>
21741#endif
21742
21743#ifdef HAVE_OPENSSL_RAND_H
21744#include <openssl/rand.h>
21745#endif
21746
21747#ifdef HAVE_OPENSSL_CONF_H
21748#include <openssl/conf.h>
21749#endif
21750
21751#ifdef HAVE_OPENSSL_ENGINE_H
21752#include <openssl/engine.h>
21753#endif
21754#include <openssl/ssl.h>
21755#include <openssl/evp.h>
21756
21757" "$ac_c_undeclared_builtin_options" "CFLAGS"
21758if test "x$ac_cv_have_decl_SSL_CTX_set_tmp_ecdh" = xyes
21759then :
21760  ac_have_decl=1
21761else $as_nop
21762  ac_have_decl=0
21763fi
21764printf "%s\n" "#define HAVE_DECL_SSL_CTX_SET_TMP_ECDH $ac_have_decl" >>confdefs.h
21765
21766
21767if test "$ac_cv_func_HMAC_Init_ex" = "yes"; then
21768# check function return type.
21769{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking the return type of HMAC_Init_ex" >&5
21770printf %s "checking the return type of HMAC_Init_ex... " >&6; }
21771cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21772/* end confdefs.h.  */
21773
21774#ifdef HAVE_OPENSSL_ERR_H
21775#include <openssl/err.h>
21776#endif
21777
21778#ifdef HAVE_OPENSSL_RAND_H
21779#include <openssl/rand.h>
21780#endif
21781
21782#ifdef HAVE_OPENSSL_CONF_H
21783#include <openssl/conf.h>
21784#endif
21785
21786#ifdef HAVE_OPENSSL_ENGINE_H
21787#include <openssl/engine.h>
21788#endif
21789#include <openssl/ssl.h>
21790#include <openssl/evp.h>
21791
21792int
21793main (void)
21794{
21795
21796	HMAC_CTX* hmac_ctx = NULL;
21797	void* hmac_key = NULL;
21798	const EVP_MD* digest = NULL;
21799	int x = HMAC_Init_ex(hmac_ctx, hmac_key, 32, digest, NULL);
21800	(void)x;
21801
21802  ;
21803  return 0;
21804}
21805_ACEOF
21806if ac_fn_c_try_compile "$LINENO"
21807then :
21808
21809	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: int" >&5
21810printf "%s\n" "int" >&6; }
21811
21812else $as_nop
21813
21814	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: void" >&5
21815printf "%s\n" "void" >&6; }
21816
21817printf "%s\n" "#define HMAC_INIT_EX_RETURNS_VOID 1" >>confdefs.h
21818
21819
21820fi
21821rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
21822fi
21823
21824fi
21825
21826
21827# libbsd
21828
21829# Check whether --with-libbsd was given.
21830if test ${with_libbsd+y}
21831then :
21832  withval=$with_libbsd;
21833	ac_fn_c_check_header_compile "$LINENO" "bsd/string.h" "ac_cv_header_bsd_string_h" "$ac_includes_default
21834"
21835if test "x$ac_cv_header_bsd_string_h" = xyes
21836then :
21837  printf "%s\n" "#define HAVE_BSD_STRING_H 1" >>confdefs.h
21838
21839fi
21840ac_fn_c_check_header_compile "$LINENO" "bsd/stdlib.h" "ac_cv_header_bsd_stdlib_h" "$ac_includes_default
21841"
21842if test "x$ac_cv_header_bsd_stdlib_h" = xyes
21843then :
21844  printf "%s\n" "#define HAVE_BSD_STDLIB_H 1" >>confdefs.h
21845
21846fi
21847
21848	if test "x$ac_cv_header_bsd_string_h" = xyes -a "x$ac_cv_header_bsd_stdlib_h" = xyes; then
21849		for func in strlcpy strlcat arc4random arc4random_uniform reallocarray; do
21850			as_ac_Search=`printf "%s\n" "ac_cv_search_$func" | $as_tr_sh`
21851{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing $func" >&5
21852printf %s "checking for library containing $func... " >&6; }
21853if eval test \${$as_ac_Search+y}
21854then :
21855  printf %s "(cached) " >&6
21856else $as_nop
21857  ac_func_search_save_LIBS=$LIBS
21858cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21859/* end confdefs.h.  */
21860
21861/* Override any GCC internal prototype to avoid an error.
21862   Use char because int might match the return type of a GCC
21863   builtin and then its argument prototype would still apply.  */
21864char $func ();
21865int
21866main (void)
21867{
21868return $func ();
21869  ;
21870  return 0;
21871}
21872_ACEOF
21873for ac_lib in '' bsd
21874do
21875  if test -z "$ac_lib"; then
21876    ac_res="none required"
21877  else
21878    ac_res=-l$ac_lib
21879    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
21880  fi
21881  if ac_fn_c_try_link "$LINENO"
21882then :
21883  eval "$as_ac_Search=\$ac_res"
21884fi
21885rm -f core conftest.err conftest.$ac_objext conftest.beam \
21886    conftest$ac_exeext
21887  if eval test \${$as_ac_Search+y}
21888then :
21889  break
21890fi
21891done
21892if eval test \${$as_ac_Search+y}
21893then :
21894
21895else $as_nop
21896  eval "$as_ac_Search=no"
21897fi
21898rm conftest.$ac_ext
21899LIBS=$ac_func_search_save_LIBS
21900fi
21901eval ac_res=\$$as_ac_Search
21902	       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
21903printf "%s\n" "$ac_res" >&6; }
21904eval ac_res=\$$as_ac_Search
21905if test "$ac_res" != no
21906then :
21907  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
21908
21909
21910printf "%s\n" "#define HAVE_LIBBSD 1" >>confdefs.h
21911
21912				PC_LIBBSD_DEPENDENCY=libbsd
21913
21914
21915fi
21916
21917		done
21918	fi
21919
21920fi
21921
21922
21923# Check whether --enable-sha1 was given.
21924if test ${enable_sha1+y}
21925then :
21926  enableval=$enable_sha1;
21927fi
21928
21929case "$enable_sha1" in
21930	no)
21931	;;
21932	yes|*)
21933
21934printf "%s\n" "#define USE_SHA1 1" >>confdefs.h
21935
21936	;;
21937esac
21938
21939
21940# Check whether --enable-sha2 was given.
21941if test ${enable_sha2+y}
21942then :
21943  enableval=$enable_sha2;
21944fi
21945
21946case "$enable_sha2" in
21947	no)
21948	;;
21949	yes|*)
21950
21951printf "%s\n" "#define USE_SHA2 1" >>confdefs.h
21952
21953	;;
21954esac
21955
21956# Check whether --enable-subnet was given.
21957if test ${enable_subnet+y}
21958then :
21959  enableval=$enable_subnet;
21960fi
21961
21962case "$enable_subnet" in
21963	yes)
21964
21965printf "%s\n" "#define CLIENT_SUBNET 1" >>confdefs.h
21966
21967	SUBNET_OBJ="edns-subnet.lo subnetmod.lo addrtree.lo subnet-whitelist.lo"
21968
21969	SUBNET_HEADER='$(srcdir)/edns-subnet/subnetmod.h $(srcdir)/edns-subnet/edns-subnet.h $(srcdir)/edns-subnet/subnet-whitelist.h $(srcdir)/edns-subnet/addrtree.h'
21970
21971	;;
21972	no|*)
21973	;;
21974esac
21975
21976# check whether gost also works
21977
21978# Check whether --enable-gost was given.
21979if test ${enable_gost+y}
21980then :
21981  enableval=$enable_gost;
21982fi
21983
21984use_gost="no"
21985if test $USE_NSS = "no" -a $USE_NETTLE = "no"; then
21986case "$enable_gost" in
21987	no)
21988	;;
21989	*)
21990	ac_fn_c_check_func "$LINENO" "EVP_PKEY_set_type_str" "ac_cv_func_EVP_PKEY_set_type_str"
21991if test "x$ac_cv_func_EVP_PKEY_set_type_str" = xyes
21992then :
21993  :
21994else $as_nop
21995  as_fn_error $? "OpenSSL 1.0.0 is needed for GOST support" "$LINENO" 5
21996fi
21997
21998	ac_fn_c_check_func "$LINENO" "EC_KEY_new" "ac_cv_func_EC_KEY_new"
21999if test "x$ac_cv_func_EC_KEY_new" = xyes
22000then :
22001
22002else $as_nop
22003  as_fn_error $? "OpenSSL does not support ECC, needed for GOST support" "$LINENO" 5
22004fi
22005
22006
22007{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if GOST works" >&5
22008printf %s "checking if GOST works... " >&6; }
22009if test c${cross_compiling} = cno; then
22010BAKCFLAGS="$CFLAGS"
22011if test -n "$ssldir"; then
22012	CFLAGS="$CFLAGS -Wl,-rpath,$ssldir_lib"
22013fi
22014if test "$cross_compiling" = yes
22015then :
22016  eval "ac_cv_c_gost_works=maybe"
22017else $as_nop
22018  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22019/* end confdefs.h.  */
22020
22021#include <string.h>
22022#include <openssl/ssl.h>
22023#include <openssl/evp.h>
22024#include <openssl/engine.h>
22025#include <openssl/conf.h>
22026/* routine to load gost (from sldns) */
22027int load_gost_id(void)
22028{
22029	static int gost_id = 0;
22030	const EVP_PKEY_ASN1_METHOD* meth;
22031	ENGINE* e;
22032
22033	if(gost_id) return gost_id;
22034
22035	/* see if configuration loaded gost implementation from other engine*/
22036	meth = EVP_PKEY_asn1_find_str(NULL, "gost2001", -1);
22037	if(meth) {
22038		EVP_PKEY_asn1_get0_info(&gost_id, NULL, NULL, NULL, NULL, meth);
22039		return gost_id;
22040	}
22041
22042	/* see if engine can be loaded already */
22043	e = ENGINE_by_id("gost");
22044	if(!e) {
22045		/* load it ourself, in case statically linked */
22046		ENGINE_load_builtin_engines();
22047		ENGINE_load_dynamic();
22048		e = ENGINE_by_id("gost");
22049	}
22050	if(!e) {
22051		/* no gost engine in openssl */
22052		return 0;
22053	}
22054	if(!ENGINE_set_default(e, ENGINE_METHOD_ALL)) {
22055		ENGINE_finish(e);
22056		ENGINE_free(e);
22057		return 0;
22058	}
22059
22060	meth = EVP_PKEY_asn1_find_str(&e, "gost2001", -1);
22061	if(!meth) {
22062		/* algo not found */
22063		ENGINE_finish(e);
22064		ENGINE_free(e);
22065		return 0;
22066	}
22067	EVP_PKEY_asn1_get0_info(&gost_id, NULL, NULL, NULL, NULL, meth);
22068	return gost_id;
22069}
22070int main(void) {
22071	EVP_MD_CTX* ctx;
22072	const EVP_MD* md;
22073	unsigned char digest[64]; /* its a 256-bit digest, so uses 32 bytes */
22074	const char* str = "Hello world";
22075	const unsigned char check[] = {
22076		0x40 , 0xed , 0xf8 , 0x56 , 0x5a , 0xc5 , 0x36 , 0xe1 ,
22077		0x33 , 0x7c , 0x7e , 0x87 , 0x62 , 0x1c , 0x42 , 0xe0 ,
22078		0x17 , 0x1b , 0x5e , 0xce , 0xa8 , 0x46 , 0x65 , 0x4d ,
22079		0x8d , 0x3e , 0x22 , 0x9b , 0xe1 , 0x30 , 0x19 , 0x9d
22080	};
22081	OPENSSL_config(NULL);
22082	(void)load_gost_id();
22083	md = EVP_get_digestbyname("md_gost94");
22084	if(!md) return 1;
22085	memset(digest, 0, sizeof(digest));
22086	ctx = EVP_MD_CTX_create();
22087	if(!ctx) return 2;
22088	if(!EVP_DigestInit_ex(ctx, md, NULL)) return 3;
22089	if(!EVP_DigestUpdate(ctx, str, 10)) return 4;
22090	if(!EVP_DigestFinal_ex(ctx, digest, NULL)) return 5;
22091	/* uncomment to see the hash calculated.
22092		{int i;
22093		for(i=0; i<32; i++)
22094			printf(" %2.2x", (int)digest[i]);
22095		printf("\n");}
22096	*/
22097	if(memcmp(digest, check, sizeof(check)) != 0)
22098		return 6;
22099	return 0;
22100}
22101
22102_ACEOF
22103if ac_fn_c_try_run "$LINENO"
22104then :
22105  eval "ac_cv_c_gost_works=yes"
22106else $as_nop
22107  eval "ac_cv_c_gost_works=no"
22108fi
22109rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22110  conftest.$ac_objext conftest.beam conftest.$ac_ext
22111fi
22112
22113CFLAGS="$BAKCFLAGS"
22114else
22115eval "ac_cv_c_gost_works=maybe"
22116fi
22117{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_gost_works" >&5
22118printf "%s\n" "$ac_cv_c_gost_works" >&6; }
22119
22120	if test "$ac_cv_c_gost_works" != no; then
22121		use_gost="yes"
22122
22123printf "%s\n" "#define USE_GOST 1" >>confdefs.h
22124
22125	fi
22126	;;
22127esac
22128fi
22129# Check whether --enable-ecdsa was given.
22130if test ${enable_ecdsa+y}
22131then :
22132  enableval=$enable_ecdsa;
22133fi
22134
22135use_ecdsa="no"
22136case "$enable_ecdsa" in
22137    no)
22138      ;;
22139    *)
22140      if test $USE_NSS = "no" -a $USE_NETTLE = "no"; then
22141	      ac_fn_c_check_func "$LINENO" "EVP_PKEY_fromdata" "ac_cv_func_EVP_PKEY_fromdata"
22142if test "x$ac_cv_func_EVP_PKEY_fromdata" = xyes
22143then :
22144
22145	          # with EVP_PKEY_fromdata, check if EC is not disabled
22146	          ac_fn_check_decl "$LINENO" "OPENSSL_NO_EC" "ac_cv_have_decl_OPENSSL_NO_EC" "$ac_includes_default
22147#include <openssl/evp.h>
22148
22149" "$ac_c_undeclared_builtin_options" "CFLAGS"
22150if test "x$ac_cv_have_decl_OPENSSL_NO_EC" = xyes
22151then :
22152  as_fn_error $? "OpenSSL does not support ECDSA: please upgrade or rerun with --disable-ecdsa" "$LINENO" 5
22153
22154fi
22155
22156else $as_nop
22157
22158		  # without EVP_PKEY_fromdata, older openssl, check for support
22159		  ac_fn_c_check_func "$LINENO" "ECDSA_sign" "ac_cv_func_ECDSA_sign"
22160if test "x$ac_cv_func_ECDSA_sign" = xyes
22161then :
22162
22163else $as_nop
22164  as_fn_error $? "OpenSSL does not support ECDSA: please upgrade or rerun with --disable-ecdsa" "$LINENO" 5
22165fi
22166
22167		  ac_fn_c_check_func "$LINENO" "SHA384_Init" "ac_cv_func_SHA384_Init"
22168if test "x$ac_cv_func_SHA384_Init" = xyes
22169then :
22170
22171else $as_nop
22172  as_fn_error $? "OpenSSL does not support SHA384: please upgrade or rerun with --disable-ecdsa" "$LINENO" 5
22173fi
22174
22175
22176fi
22177
22178	      ac_fn_check_decl "$LINENO" "NID_X9_62_prime256v1" "ac_cv_have_decl_NID_X9_62_prime256v1" "$ac_includes_default
22179#include <openssl/evp.h>
22180
22181" "$ac_c_undeclared_builtin_options" "CFLAGS"
22182if test "x$ac_cv_have_decl_NID_X9_62_prime256v1" = xyes
22183then :
22184  ac_have_decl=1
22185else $as_nop
22186  ac_have_decl=0
22187fi
22188printf "%s\n" "#define HAVE_DECL_NID_X9_62_PRIME256V1 $ac_have_decl" >>confdefs.h
22189if test $ac_have_decl = 1
22190then :
22191
22192else $as_nop
22193  as_fn_error $? "OpenSSL does not support the ECDSA curves: please upgrade or rerun with --disable-ecdsa" "$LINENO" 5
22194fi
22195ac_fn_check_decl "$LINENO" "NID_secp384r1" "ac_cv_have_decl_NID_secp384r1" "$ac_includes_default
22196#include <openssl/evp.h>
22197
22198" "$ac_c_undeclared_builtin_options" "CFLAGS"
22199if test "x$ac_cv_have_decl_NID_secp384r1" = xyes
22200then :
22201  ac_have_decl=1
22202else $as_nop
22203  ac_have_decl=0
22204fi
22205printf "%s\n" "#define HAVE_DECL_NID_SECP384R1 $ac_have_decl" >>confdefs.h
22206if test $ac_have_decl = 1
22207then :
22208
22209else $as_nop
22210  as_fn_error $? "OpenSSL does not support the ECDSA curves: please upgrade or rerun with --disable-ecdsa" "$LINENO" 5
22211fi
22212
22213	      # see if OPENSSL 1.0.0 or later (has EVP MD and Verify independency)
22214	      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if openssl supports SHA2 and ECDSA with EVP" >&5
22215printf %s "checking if openssl supports SHA2 and ECDSA with EVP... " >&6; }
22216	      if grep OPENSSL_VERSION_TEXT $ssldir_include/openssl/opensslv.h | grep "OpenSSL" >/dev/null; then
22217		if grep OPENSSL_VERSION_NUMBER $ssldir_include/openssl/opensslv.h | grep 0x0 >/dev/null; then
22218		  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
22219printf "%s\n" "no" >&6; }
22220
22221printf "%s\n" "#define USE_ECDSA_EVP_WORKAROUND 1" >>confdefs.h
22222
22223		else
22224		  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
22225printf "%s\n" "yes" >&6; }
22226		fi
22227	      else
22228		# not OpenSSL, thus likely LibreSSL, which supports it
22229		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
22230printf "%s\n" "yes" >&6; }
22231	      fi
22232      fi
22233      # we now know we have ECDSA and the required curves.
22234
22235printf "%s\n" "#define USE_ECDSA 1" >>confdefs.h
22236
22237      use_ecdsa="yes"
22238      ;;
22239esac
22240
22241# Check whether --enable-dsa was given.
22242if test ${enable_dsa+y}
22243then :
22244  enableval=$enable_dsa;
22245fi
22246
22247use_dsa="no"
22248case "$enable_dsa" in
22249    yes)
22250      # detect if DSA is supported, and turn it off if not.
22251      if test $USE_NSS = "no" -a $USE_NETTLE = "no"; then
22252      ac_fn_c_check_func "$LINENO" "DSA_SIG_new" "ac_cv_func_DSA_SIG_new"
22253if test "x$ac_cv_func_DSA_SIG_new" = xyes
22254then :
22255
22256      as_ac_Type=`printf "%s\n" "ac_cv_type_DSA_SIG*" | $as_tr_sh`
22257ac_fn_c_check_type "$LINENO" "DSA_SIG*" "$as_ac_Type" "
22258$ac_includes_default
22259#ifdef HAVE_OPENSSL_ERR_H
22260#include <openssl/err.h>
22261#endif
22262
22263#ifdef HAVE_OPENSSL_RAND_H
22264#include <openssl/rand.h>
22265#endif
22266
22267#ifdef HAVE_OPENSSL_CONF_H
22268#include <openssl/conf.h>
22269#endif
22270
22271#ifdef HAVE_OPENSSL_ENGINE_H
22272#include <openssl/engine.h>
22273#endif
22274
22275"
22276if eval test \"x\$"$as_ac_Type"\" = x"yes"
22277then :
22278
22279
22280printf "%s\n" "#define USE_DSA 1" >>confdefs.h
22281
22282
22283else $as_nop
22284  if test "x$enable_dsa" = "xyes"; then as_fn_error $? "OpenSSL does not support DSA and you used --enable-dsa." "$LINENO" 5
22285               fi
22286fi
22287
22288
22289else $as_nop
22290  if test "x$enable_dsa" = "xyes"; then as_fn_error $? "OpenSSL does not support DSA and you used --enable-dsa." "$LINENO" 5
22291               fi
22292fi
22293
22294      else
22295
22296printf "%s\n" "#define USE_DSA 1" >>confdefs.h
22297
22298      fi
22299      ;;
22300    *)
22301      # disable dsa by default, RFC 8624 section 3.1, validators MUST NOT
22302      # support DSA for DNSSEC Validation.
22303      ;;
22304esac
22305
22306
22307# Check whether --with-deprecate-rsa-1024 was given.
22308if test ${with_deprecate_rsa_1024+y}
22309then :
22310  withval=$with_deprecate_rsa_1024;
22311fi
22312
22313if test "$with_deprecate_rsa_1024" = "yes"; then
22314
22315printf "%s\n" "#define DEPRECATE_RSA_1024 1" >>confdefs.h
22316
22317fi
22318
22319# Check whether --enable-ed25519 was given.
22320if test ${enable_ed25519+y}
22321then :
22322  enableval=$enable_ed25519;
22323fi
22324
22325use_ed25519="no"
22326case "$enable_ed25519" in
22327    no)
22328      ;;
22329    *)
22330      if test $USE_NSS = "no" -a $USE_NETTLE = "no"; then
22331	      ac_fn_check_decl "$LINENO" "NID_ED25519" "ac_cv_have_decl_NID_ED25519" "$ac_includes_default
22332#include <openssl/evp.h>
22333
22334" "$ac_c_undeclared_builtin_options" "CFLAGS"
22335if test "x$ac_cv_have_decl_NID_ED25519" = xyes
22336then :
22337  ac_have_decl=1
22338else $as_nop
22339  ac_have_decl=0
22340fi
22341printf "%s\n" "#define HAVE_DECL_NID_ED25519 $ac_have_decl" >>confdefs.h
22342if test $ac_have_decl = 1
22343then :
22344
22345      		use_ed25519="yes"
22346
22347else $as_nop
22348   if test "x$enable_ed25519" = "xyes"; then as_fn_error $? "OpenSSL does not support ED25519 and you used --enable-ed25519." "$LINENO" 5
22349	      	fi
22350fi
22351
22352      fi
22353      if test $USE_NETTLE = "yes"; then
22354		       for ac_header in nettle/eddsa.h
22355do :
22356  ac_fn_c_check_header_compile "$LINENO" "nettle/eddsa.h" "ac_cv_header_nettle_eddsa_h" "$ac_includes_default
22357"
22358if test "x$ac_cv_header_nettle_eddsa_h" = xyes
22359then :
22360  printf "%s\n" "#define HAVE_NETTLE_EDDSA_H 1" >>confdefs.h
22361 use_ed25519="yes"
22362fi
22363
22364done
22365      fi
22366      if test $use_ed25519 = "yes"; then
22367
22368printf "%s\n" "#define USE_ED25519 1" >>confdefs.h
22369
22370      fi
22371      ;;
22372esac
22373
22374# Check whether --enable-ed448 was given.
22375if test ${enable_ed448+y}
22376then :
22377  enableval=$enable_ed448;
22378fi
22379
22380use_ed448="no"
22381case "$enable_ed448" in
22382    no)
22383      ;;
22384    *)
22385      if test $USE_NSS = "no" -a $USE_NETTLE = "no"; then
22386	      ac_fn_check_decl "$LINENO" "NID_ED448" "ac_cv_have_decl_NID_ED448" "$ac_includes_default
22387#include <openssl/evp.h>
22388
22389" "$ac_c_undeclared_builtin_options" "CFLAGS"
22390if test "x$ac_cv_have_decl_NID_ED448" = xyes
22391then :
22392  ac_have_decl=1
22393else $as_nop
22394  ac_have_decl=0
22395fi
22396printf "%s\n" "#define HAVE_DECL_NID_ED448 $ac_have_decl" >>confdefs.h
22397if test $ac_have_decl = 1
22398then :
22399
22400      		use_ed448="yes"
22401
22402else $as_nop
22403   if test "x$enable_ed448" = "xyes"; then as_fn_error $? "OpenSSL does not support ED448 and you used --enable-ed448." "$LINENO" 5
22404	      	fi
22405fi
22406
22407      fi
22408      if test $use_ed448 = "yes"; then
22409
22410printf "%s\n" "#define USE_ED448 1" >>confdefs.h
22411
22412      fi
22413      ;;
22414esac
22415
22416# Check whether --enable-event-api was given.
22417if test ${enable_event_api+y}
22418then :
22419  enableval=$enable_event_api;
22420fi
22421
22422case "$enable_event_api" in
22423    yes)
22424      UNBOUND_EVENT_INSTALL=unbound-event-install
22425
22426      UNBOUND_EVENT_UNINSTALL=unbound-event-uninstall
22427
22428      ;;
22429    *)
22430      ;;
22431esac
22432
22433# Check whether --enable-tfo-client was given.
22434if test ${enable_tfo_client+y}
22435then :
22436  enableval=$enable_tfo_client;
22437fi
22438
22439case "$enable_tfo_client" in
22440	yes)
22441		case "$host_os" in
22442			linux*) ac_fn_check_decl "$LINENO" "MSG_FASTOPEN" "ac_cv_have_decl_MSG_FASTOPEN" "$ac_includes_default
22443#include <netinet/tcp.h>
22444
22445" "$ac_c_undeclared_builtin_options" "CFLAGS"
22446if test "x$ac_cv_have_decl_MSG_FASTOPEN" = xyes
22447then :
22448  { 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
22449printf "%s\n" "$as_me: WARNING: Check the platform specific TFO kernel parameters are correctly configured to support client mode TFO" >&2;}
22450else $as_nop
22451  as_fn_error $? "TCP Fast Open is not available for client mode: please rerun without --enable-tfo-client" "$LINENO" 5
22452fi
22453
22454printf "%s\n" "#define USE_MSG_FASTOPEN 1" >>confdefs.h
22455
22456				;;
22457			darwin*) ac_fn_check_decl "$LINENO" "CONNECT_RESUME_ON_READ_WRITE" "ac_cv_have_decl_CONNECT_RESUME_ON_READ_WRITE" "$ac_includes_default
22458#include <sys/socket.h>
22459
22460" "$ac_c_undeclared_builtin_options" "CFLAGS"
22461if test "x$ac_cv_have_decl_CONNECT_RESUME_ON_READ_WRITE" = xyes
22462then :
22463  { 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
22464printf "%s\n" "$as_me: WARNING: Check the platform specific TFO kernel parameters are correctly configured to support client mode TFO" >&2;}
22465else $as_nop
22466  as_fn_error $? "TCP Fast Open is not available for client mode: please rerun without --enable-tfo-client" "$LINENO" 5
22467fi
22468
22469printf "%s\n" "#define USE_OSX_MSG_FASTOPEN 1" >>confdefs.h
22470
22471				;;
22472		esac
22473		;;
22474	no|*)
22475		;;
22476esac
22477
22478# Check whether --enable-tfo-server was given.
22479if test ${enable_tfo_server+y}
22480then :
22481  enableval=$enable_tfo_server;
22482fi
22483
22484case "$enable_tfo_server" in
22485	yes)
22486	      ac_fn_check_decl "$LINENO" "TCP_FASTOPEN" "ac_cv_have_decl_TCP_FASTOPEN" "$ac_includes_default
22487#include <netinet/tcp.h>
22488
22489" "$ac_c_undeclared_builtin_options" "CFLAGS"
22490if test "x$ac_cv_have_decl_TCP_FASTOPEN" = xyes
22491then :
22492  { 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
22493printf "%s\n" "$as_me: WARNING: Check the platform specific TFO kernel parameters are correctly configured to support server mode TFO" >&2;}
22494else $as_nop
22495  as_fn_error $? "TCP Fast Open is not available for server mode: please rerun without --enable-tfo-server" "$LINENO" 5
22496fi
22497
22498printf "%s\n" "#define USE_TCP_FASTOPEN 1" >>confdefs.h
22499
22500		;;
22501	no|*)
22502		;;
22503esac
22504
22505# check for libevent
22506
22507# Check whether --with-libevent was given.
22508if test ${with_libevent+y}
22509then :
22510  withval=$with_libevent;
22511else $as_nop
22512   with_libevent="no"
22513fi
22514
22515if test "x_$with_libevent" != x_no; then
22516
22517printf "%s\n" "#define USE_LIBEVENT 1" >>confdefs.h
22518
22519        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libevent" >&5
22520printf %s "checking for libevent... " >&6; }
22521        if test "x_$with_libevent" = x_ -o "x_$with_libevent" = x_yes; then
22522            with_libevent="/usr/local /opt/local /usr/lib /usr/pkg /usr/sfw /usr"
22523        fi
22524        for dir in $with_libevent; do
22525            thedir="$dir"
22526            if test -f "$dir/include/event.h" -o -f "$dir/include/event2/event.h"; then
22527                found_libevent="yes"
22528								if test "$thedir" != "/usr"; then
22529				    CPPFLAGS="$CPPFLAGS -I$thedir/include"
22530				fi
22531				break;
22532		    fi
22533        done
22534        if test x_$found_libevent != x_yes; then
22535		if test -f "$dir/event.h" -a \( -f "$dir/libevent.la" -o -f "$dir/libev.la" \) ; then
22536			# libevent source directory
22537			{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: found in $thedir" >&5
22538printf "%s\n" "found in $thedir" >&6; }
22539			CPPFLAGS="$CPPFLAGS -I$thedir -I$thedir/include"
22540			BAK_LDFLAGS_SET="1"
22541			BAK_LDFLAGS="$LDFLAGS"
22542			# remove evdns from linking
22543			mkdir build >/dev/null 2>&1
22544			mkdir build/libevent >/dev/null 2>&1
22545			mkdir build/libevent/.libs >/dev/null 2>&1
22546			ev_files_o=`ls $thedir/*.o | grep -v evdns\.o | grep -v bufferevent_openssl\.o`
22547			ev_files_lo=`ls $thedir/*.lo | grep -v evdns\.lo | grep -v bufferevent_openssl\.lo`
22548			ev_files_libso=`ls $thedir/.libs/*.o | grep -v evdns\.o | grep -v bufferevent_openssl\.o`
22549			cp $ev_files_o build/libevent
22550			cp $ev_files_lo build/libevent
22551			cp $ev_files_libso build/libevent/.libs
22552			LATE_LDFLAGS="build/libevent/*.lo -lm"
22553			LDFLAGS="build/libevent/*.o $LDFLAGS -lm"
22554		else
22555            as_fn_error $? "Cannot find the libevent library in $with_libevent
22556You can restart ./configure --with-libevent=no to use a builtin alternative.
22557Please note that this alternative is not as capable as libevent when using
22558large outgoing port ranges.  " "$LINENO" 5
22559		fi
22560        else
22561            { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: found in $thedir" >&5
22562printf "%s\n" "found in $thedir" >&6; }
22563	    	    if test ! -f $thedir/lib/libevent.a -a ! -f $thedir/lib/libevent.so -a -d "$thedir/lib/event2"; then
22564		    LDFLAGS="$LDFLAGS -L$thedir/lib/event2"
22565
22566	if test "x$enable_rpath" = xyes; then
22567		if echo "$thedir/lib/event2" | grep "^/" >/dev/null; then
22568			RUNTIME_PATH="$RUNTIME_PATH -R$thedir/lib/event2"
22569		fi
22570	fi
22571
22572	    else
22573		    		    if test "$thedir" != "/usr" -a "$thedir" != ""; then
22574			LDFLAGS="$LDFLAGS -L$thedir/lib"
22575
22576	if test "x$enable_rpath" = xyes; then
22577		if echo "$thedir/lib" | grep "^/" >/dev/null; then
22578			RUNTIME_PATH="$RUNTIME_PATH -R$thedir/lib"
22579		fi
22580	fi
22581
22582		    fi
22583	    fi
22584        fi
22585	# check for library used by libevent after 1.3c
22586	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5
22587printf %s "checking for library containing clock_gettime... " >&6; }
22588if test ${ac_cv_search_clock_gettime+y}
22589then :
22590  printf %s "(cached) " >&6
22591else $as_nop
22592  ac_func_search_save_LIBS=$LIBS
22593cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22594/* end confdefs.h.  */
22595
22596/* Override any GCC internal prototype to avoid an error.
22597   Use char because int might match the return type of a GCC
22598   builtin and then its argument prototype would still apply.  */
22599char clock_gettime ();
22600int
22601main (void)
22602{
22603return clock_gettime ();
22604  ;
22605  return 0;
22606}
22607_ACEOF
22608for ac_lib in '' rt
22609do
22610  if test -z "$ac_lib"; then
22611    ac_res="none required"
22612  else
22613    ac_res=-l$ac_lib
22614    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
22615  fi
22616  if ac_fn_c_try_link "$LINENO"
22617then :
22618  ac_cv_search_clock_gettime=$ac_res
22619fi
22620rm -f core conftest.err conftest.$ac_objext conftest.beam \
22621    conftest$ac_exeext
22622  if test ${ac_cv_search_clock_gettime+y}
22623then :
22624  break
22625fi
22626done
22627if test ${ac_cv_search_clock_gettime+y}
22628then :
22629
22630else $as_nop
22631  ac_cv_search_clock_gettime=no
22632fi
22633rm conftest.$ac_ext
22634LIBS=$ac_func_search_save_LIBS
22635fi
22636{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5
22637printf "%s\n" "$ac_cv_search_clock_gettime" >&6; }
22638ac_res=$ac_cv_search_clock_gettime
22639if test "$ac_res" != no
22640then :
22641  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
22642
22643fi
22644
22645
22646	# is the event.h header libev or libevent?
22647	ac_fn_c_check_header_compile "$LINENO" "event.h" "ac_cv_header_event_h" "$ac_includes_default
22648"
22649if test "x$ac_cv_header_event_h" = xyes
22650then :
22651  printf "%s\n" "#define HAVE_EVENT_H 1" >>confdefs.h
22652
22653fi
22654
22655	ac_fn_check_decl "$LINENO" "EV_VERSION_MAJOR" "ac_cv_have_decl_EV_VERSION_MAJOR" "$ac_includes_default
22656#include <event.h>
22657
22658" "$ac_c_undeclared_builtin_options" "CFLAGS"
22659if test "x$ac_cv_have_decl_EV_VERSION_MAJOR" = xyes
22660then :
22661
22662		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing event_set" >&5
22663printf %s "checking for library containing event_set... " >&6; }
22664if test ${ac_cv_search_event_set+y}
22665then :
22666  printf %s "(cached) " >&6
22667else $as_nop
22668  ac_func_search_save_LIBS=$LIBS
22669cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22670/* end confdefs.h.  */
22671
22672/* Override any GCC internal prototype to avoid an error.
22673   Use char because int might match the return type of a GCC
22674   builtin and then its argument prototype would still apply.  */
22675char event_set ();
22676int
22677main (void)
22678{
22679return event_set ();
22680  ;
22681  return 0;
22682}
22683_ACEOF
22684for ac_lib in '' ev
22685do
22686  if test -z "$ac_lib"; then
22687    ac_res="none required"
22688  else
22689    ac_res=-l$ac_lib
22690    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
22691  fi
22692  if ac_fn_c_try_link "$LINENO"
22693then :
22694  ac_cv_search_event_set=$ac_res
22695fi
22696rm -f core conftest.err conftest.$ac_objext conftest.beam \
22697    conftest$ac_exeext
22698  if test ${ac_cv_search_event_set+y}
22699then :
22700  break
22701fi
22702done
22703if test ${ac_cv_search_event_set+y}
22704then :
22705
22706else $as_nop
22707  ac_cv_search_event_set=no
22708fi
22709rm conftest.$ac_ext
22710LIBS=$ac_func_search_save_LIBS
22711fi
22712{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_event_set" >&5
22713printf "%s\n" "$ac_cv_search_event_set" >&6; }
22714ac_res=$ac_cv_search_event_set
22715if test "$ac_res" != no
22716then :
22717  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
22718
22719fi
22720
22721
22722else $as_nop
22723
22724		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing event_set" >&5
22725printf %s "checking for library containing event_set... " >&6; }
22726if test ${ac_cv_search_event_set+y}
22727then :
22728  printf %s "(cached) " >&6
22729else $as_nop
22730  ac_func_search_save_LIBS=$LIBS
22731cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22732/* end confdefs.h.  */
22733
22734/* Override any GCC internal prototype to avoid an error.
22735   Use char because int might match the return type of a GCC
22736   builtin and then its argument prototype would still apply.  */
22737char event_set ();
22738int
22739main (void)
22740{
22741return event_set ();
22742  ;
22743  return 0;
22744}
22745_ACEOF
22746for ac_lib in '' event
22747do
22748  if test -z "$ac_lib"; then
22749    ac_res="none required"
22750  else
22751    ac_res=-l$ac_lib
22752    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
22753  fi
22754  if ac_fn_c_try_link "$LINENO"
22755then :
22756  ac_cv_search_event_set=$ac_res
22757fi
22758rm -f core conftest.err conftest.$ac_objext conftest.beam \
22759    conftest$ac_exeext
22760  if test ${ac_cv_search_event_set+y}
22761then :
22762  break
22763fi
22764done
22765if test ${ac_cv_search_event_set+y}
22766then :
22767
22768else $as_nop
22769  ac_cv_search_event_set=no
22770fi
22771rm conftest.$ac_ext
22772LIBS=$ac_func_search_save_LIBS
22773fi
22774{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_event_set" >&5
22775printf "%s\n" "$ac_cv_search_event_set" >&6; }
22776ac_res=$ac_cv_search_event_set
22777if test "$ac_res" != no
22778then :
22779  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
22780
22781fi
22782
22783
22784fi
22785	ac_fn_c_check_func "$LINENO" "event_base_free" "ac_cv_func_event_base_free"
22786if test "x$ac_cv_func_event_base_free" = xyes
22787then :
22788  printf "%s\n" "#define HAVE_EVENT_BASE_FREE 1" >>confdefs.h
22789
22790fi
22791 # only in libevent 1.2 and later
22792	ac_fn_c_check_func "$LINENO" "event_base_once" "ac_cv_func_event_base_once"
22793if test "x$ac_cv_func_event_base_once" = xyes
22794then :
22795  printf "%s\n" "#define HAVE_EVENT_BASE_ONCE 1" >>confdefs.h
22796
22797fi
22798 # only in libevent 1.4.1 and later
22799	ac_fn_c_check_func "$LINENO" "event_base_new" "ac_cv_func_event_base_new"
22800if test "x$ac_cv_func_event_base_new" = xyes
22801then :
22802  printf "%s\n" "#define HAVE_EVENT_BASE_NEW 1" >>confdefs.h
22803
22804fi
22805 # only in libevent 1.4.1 and later
22806	ac_fn_c_check_func "$LINENO" "event_base_get_method" "ac_cv_func_event_base_get_method"
22807if test "x$ac_cv_func_event_base_get_method" = xyes
22808then :
22809  printf "%s\n" "#define HAVE_EVENT_BASE_GET_METHOD 1" >>confdefs.h
22810
22811fi
22812 # only in libevent 1.4.3 and later
22813	ac_fn_c_check_func "$LINENO" "ev_loop" "ac_cv_func_ev_loop"
22814if test "x$ac_cv_func_ev_loop" = xyes
22815then :
22816  printf "%s\n" "#define HAVE_EV_LOOP 1" >>confdefs.h
22817
22818fi
22819 # only in libev. (tested on 3.51)
22820	ac_fn_c_check_func "$LINENO" "ev_default_loop" "ac_cv_func_ev_default_loop"
22821if test "x$ac_cv_func_ev_default_loop" = xyes
22822then :
22823  printf "%s\n" "#define HAVE_EV_DEFAULT_LOOP 1" >>confdefs.h
22824
22825fi
22826 # only in libev. (tested on 4.00)
22827	ac_fn_c_check_func "$LINENO" "event_assign" "ac_cv_func_event_assign"
22828if test "x$ac_cv_func_event_assign" = xyes
22829then :
22830  printf "%s\n" "#define HAVE_EVENT_ASSIGN 1" >>confdefs.h
22831
22832fi
22833 # in libevent, for thread-safety
22834	ac_fn_check_decl "$LINENO" "evsignal_assign" "ac_cv_have_decl_evsignal_assign" "$ac_includes_default
22835#ifdef HAVE_EVENT_H
22836#  include <event.h>
22837#else
22838#  include \"event2/event.h\"
22839#endif
22840
22841" "$ac_c_undeclared_builtin_options" "CFLAGS"
22842if test "x$ac_cv_have_decl_evsignal_assign" = xyes
22843then :
22844  ac_have_decl=1
22845else $as_nop
22846  ac_have_decl=0
22847fi
22848printf "%s\n" "#define HAVE_DECL_EVSIGNAL_ASSIGN $ac_have_decl" >>confdefs.h
22849
22850        PC_LIBEVENT_DEPENDENCY="libevent"
22851
22852	if test -n "$BAK_LDFLAGS_SET"; then
22853		LDFLAGS="$BAK_LDFLAGS"
22854	fi
22855else
22856
22857printf "%s\n" "#define USE_MINI_EVENT 1" >>confdefs.h
22858
22859fi
22860
22861# check for libexpat
22862
22863# Check whether --with-libexpat was given.
22864if test ${with_libexpat+y}
22865then :
22866  withval=$with_libexpat;
22867else $as_nop
22868   withval="/usr/local /opt/local /usr/lib /usr/pkg /usr/sfw /usr"
22869fi
22870
22871{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libexpat" >&5
22872printf %s "checking for libexpat... " >&6; }
22873found_libexpat="no"
22874for dir in $withval ; do
22875            if test -f "$dir/include/expat.h"; then
22876		found_libexpat="yes"
22877				if test "$dir" != "/usr"; then
22878                    CPPFLAGS="$CPPFLAGS -I$dir/include"
22879		    LDFLAGS="$LDFLAGS -L$dir/lib"
22880		fi
22881            	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: found in $dir" >&5
22882printf "%s\n" "found in $dir" >&6; }
22883                break;
22884            fi
22885done
22886if test x_$found_libexpat != x_yes; then
22887	as_fn_error $? "Could not find libexpat, expat.h" "$LINENO" 5
22888fi
22889ac_fn_c_check_header_compile "$LINENO" "expat.h" "ac_cv_header_expat_h" "$ac_includes_default
22890"
22891if test "x$ac_cv_header_expat_h" = xyes
22892then :
22893  printf "%s\n" "#define HAVE_EXPAT_H 1" >>confdefs.h
22894
22895fi
22896
22897ac_fn_check_decl "$LINENO" "XML_StopParser" "ac_cv_have_decl_XML_StopParser" "$ac_includes_default
22898#include <expat.h>
22899
22900" "$ac_c_undeclared_builtin_options" "CFLAGS"
22901if test "x$ac_cv_have_decl_XML_StopParser" = xyes
22902then :
22903  ac_have_decl=1
22904else $as_nop
22905  ac_have_decl=0
22906fi
22907printf "%s\n" "#define HAVE_DECL_XML_STOPPARSER $ac_have_decl" >>confdefs.h
22908
22909
22910# hiredis (redis C client for cachedb)
22911
22912# Check whether --with-libhiredis was given.
22913if test ${with_libhiredis+y}
22914then :
22915  withval=$with_libhiredis;
22916else $as_nop
22917   withval="no"
22918fi
22919
22920found_libhiredis="no"
22921if test x_$withval = x_yes -o x_$withval != x_no; then
22922   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libhiredis" >&5
22923printf %s "checking for libhiredis... " >&6; }
22924   if test x_$withval = x_ -o x_$withval = x_yes; then
22925            withval="/usr/local /opt/local /usr/lib /usr/pkg /usr/sfw /usr"
22926   fi
22927   for dir in $withval ; do
22928            if test -f "$dir/include/hiredis/hiredis.h"; then
22929		found_libhiredis="yes"
22930				if test "$dir" != "/usr"; then
22931                    CPPFLAGS="$CPPFLAGS -I$dir/include"
22932		    LDFLAGS="$LDFLAGS -L$dir/lib"
22933		fi
22934		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: found in $dir" >&5
22935printf "%s\n" "found in $dir" >&6; }
22936
22937printf "%s\n" "#define USE_REDIS 1" >>confdefs.h
22938
22939		LIBS="$LIBS -lhiredis"
22940                break;
22941            fi
22942    done
22943    if test x_$found_libhiredis != x_yes; then
22944	as_fn_error $? "Could not find libhiredis, hiredis.h" "$LINENO" 5
22945    fi
22946    ac_fn_c_check_header_compile "$LINENO" "hiredis/hiredis.h" "ac_cv_header_hiredis_hiredis_h" "$ac_includes_default
22947"
22948if test "x$ac_cv_header_hiredis_hiredis_h" = xyes
22949then :
22950  printf "%s\n" "#define HAVE_HIREDIS_HIREDIS_H 1" >>confdefs.h
22951
22952fi
22953
22954    ac_fn_check_decl "$LINENO" "redisConnect" "ac_cv_have_decl_redisConnect" "$ac_includes_default
22955    #include <hiredis/hiredis.h>
22956
22957" "$ac_c_undeclared_builtin_options" "CFLAGS"
22958if test "x$ac_cv_have_decl_redisConnect" = xyes
22959then :
22960  ac_have_decl=1
22961else $as_nop
22962  ac_have_decl=0
22963fi
22964printf "%s\n" "#define HAVE_DECL_REDISCONNECT $ac_have_decl" >>confdefs.h
22965
22966fi
22967
22968# nghttp2
22969
22970# Check whether --with-libnghttp2 was given.
22971if test ${with_libnghttp2+y}
22972then :
22973  withval=$with_libnghttp2;
22974else $as_nop
22975   withval="no"
22976fi
22977
22978found_libnghttp2="no"
22979if test x_$withval = x_yes -o x_$withval != x_no; then
22980   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libnghttp2" >&5
22981printf %s "checking for libnghttp2... " >&6; }
22982   if test x_$withval = x_ -o x_$withval = x_yes; then
22983            withval="/usr/local /opt/local /usr/lib /usr/pkg /usr/sfw /usr"
22984   fi
22985   for dir in $withval ; do
22986            if test -f "$dir/include/nghttp2/nghttp2.h"; then
22987		found_libnghttp2="yes"
22988				if test "$dir" != "/usr"; then
22989                    CPPFLAGS="$CPPFLAGS -I$dir/include"
22990		    LDFLAGS="$LDFLAGS -L$dir/lib"
22991		fi
22992		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: found in $dir" >&5
22993printf "%s\n" "found in $dir" >&6; }
22994
22995printf "%s\n" "#define HAVE_NGHTTP2 1" >>confdefs.h
22996
22997		LIBS="$LIBS -lnghttp2"
22998                break;
22999            fi
23000    done
23001    if test x_$found_libnghttp2 != x_yes; then
23002	as_fn_error $? "Could not find libnghttp2, nghttp2.h" "$LINENO" 5
23003    fi
23004    ac_fn_c_check_header_compile "$LINENO" "nghttp2/nghttp2.h" "ac_cv_header_nghttp2_nghttp2_h" "$ac_includes_default
23005"
23006if test "x$ac_cv_header_nghttp2_nghttp2_h" = xyes
23007then :
23008  printf "%s\n" "#define HAVE_NGHTTP2_NGHTTP2_H 1" >>confdefs.h
23009
23010fi
23011
23012    ac_fn_check_decl "$LINENO" "nghttp2_session_server_new" "ac_cv_have_decl_nghttp2_session_server_new" "$ac_includes_default
23013    #include <nghttp2/nghttp2.h>
23014
23015" "$ac_c_undeclared_builtin_options" "CFLAGS"
23016if test "x$ac_cv_have_decl_nghttp2_session_server_new" = xyes
23017then :
23018  ac_have_decl=1
23019else $as_nop
23020  ac_have_decl=0
23021fi
23022printf "%s\n" "#define HAVE_DECL_NGHTTP2_SESSION_SERVER_NEW $ac_have_decl" >>confdefs.h
23023
23024fi
23025
23026# ngtcp2
23027
23028# Check whether --with-libngtcp2 was given.
23029if test ${with_libngtcp2+y}
23030then :
23031  withval=$with_libngtcp2;
23032else $as_nop
23033   withval="no"
23034fi
23035
23036found_libngtcp2="no"
23037if test x_$withval = x_yes -o x_$withval != x_no; then
23038   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libngtcp2" >&5
23039printf %s "checking for libngtcp2... " >&6; }
23040   if test x_$withval = x_ -o x_$withval = x_yes; then
23041            withval="/usr/local /opt/local /usr/lib /usr/pkg /usr/sfw /usr"
23042   fi
23043   for dir in $withval ; do
23044            if test -f "$dir/include/ngtcp2/ngtcp2.h"; then
23045		found_libngtcp2="yes"
23046				if test "$dir" != "/usr"; then
23047                    CPPFLAGS="$CPPFLAGS -I$dir/include"
23048		    LDFLAGS="$LDFLAGS -L$dir/lib"
23049		fi
23050		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: found in $dir" >&5
23051printf "%s\n" "found in $dir" >&6; }
23052
23053printf "%s\n" "#define HAVE_NGTCP2 1" >>confdefs.h
23054
23055		LIBS="$LIBS -lngtcp2"
23056                break;
23057            fi
23058    done
23059    if test x_$found_libngtcp2 != x_yes; then
23060	as_fn_error $? "Could not find libngtcp2, ngtcp2.h" "$LINENO" 5
23061    fi
23062    ac_fn_c_check_header_compile "$LINENO" "ngtcp2/ngtcp2.h" "ac_cv_header_ngtcp2_ngtcp2_h" "$ac_includes_default
23063"
23064if test "x$ac_cv_header_ngtcp2_ngtcp2_h" = xyes
23065then :
23066  printf "%s\n" "#define HAVE_NGTCP2_NGTCP2_H 1" >>confdefs.h
23067
23068fi
23069ac_fn_c_check_header_compile "$LINENO" "ngtcp2/ngtcp2_crypto_ossl.h" "ac_cv_header_ngtcp2_ngtcp2_crypto_ossl_h" "$ac_includes_default
23070"
23071if test "x$ac_cv_header_ngtcp2_ngtcp2_crypto_ossl_h" = xyes
23072then :
23073  printf "%s\n" "#define HAVE_NGTCP2_NGTCP2_CRYPTO_OSSL_H 1" >>confdefs.h
23074
23075fi
23076ac_fn_c_check_header_compile "$LINENO" "ngtcp2/ngtcp2_crypto_openssl.h" "ac_cv_header_ngtcp2_ngtcp2_crypto_openssl_h" "$ac_includes_default
23077"
23078if test "x$ac_cv_header_ngtcp2_ngtcp2_crypto_openssl_h" = xyes
23079then :
23080  printf "%s\n" "#define HAVE_NGTCP2_NGTCP2_CRYPTO_OPENSSL_H 1" >>confdefs.h
23081
23082fi
23083ac_fn_c_check_header_compile "$LINENO" "ngtcp2/ngtcp2_crypto_quictls.h" "ac_cv_header_ngtcp2_ngtcp2_crypto_quictls_h" "$ac_includes_default
23084"
23085if test "x$ac_cv_header_ngtcp2_ngtcp2_crypto_quictls_h" = xyes
23086then :
23087  printf "%s\n" "#define HAVE_NGTCP2_NGTCP2_CRYPTO_QUICTLS_H 1" >>confdefs.h
23088
23089fi
23090
23091    ac_fn_check_decl "$LINENO" "ngtcp2_conn_server_new" "ac_cv_have_decl_ngtcp2_conn_server_new" "$ac_includes_default
23092    #include <ngtcp2/ngtcp2.h>
23093
23094" "$ac_c_undeclared_builtin_options" "CFLAGS"
23095if test "x$ac_cv_have_decl_ngtcp2_conn_server_new" = xyes
23096then :
23097  ac_have_decl=1
23098else $as_nop
23099  ac_have_decl=0
23100fi
23101printf "%s\n" "#define HAVE_DECL_NGTCP2_CONN_SERVER_NEW $ac_have_decl" >>confdefs.h
23102
23103    ac_fn_check_decl "$LINENO" "ngtcp2_crypto_encrypt_cb" "ac_cv_have_decl_ngtcp2_crypto_encrypt_cb" "$ac_includes_default
23104    #include <ngtcp2/ngtcp2_crypto.h>
23105
23106" "$ac_c_undeclared_builtin_options" "CFLAGS"
23107if test "x$ac_cv_have_decl_ngtcp2_crypto_encrypt_cb" = xyes
23108then :
23109  ac_have_decl=1
23110else $as_nop
23111  ac_have_decl=0
23112fi
23113printf "%s\n" "#define HAVE_DECL_NGTCP2_CRYPTO_ENCRYPT_CB $ac_have_decl" >>confdefs.h
23114
23115    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ngtcp2_crypto_encrypt_cb in -lngtcp2_crypto_ossl" >&5
23116printf %s "checking for ngtcp2_crypto_encrypt_cb in -lngtcp2_crypto_ossl... " >&6; }
23117if test ${ac_cv_lib_ngtcp2_crypto_ossl_ngtcp2_crypto_encrypt_cb+y}
23118then :
23119  printf %s "(cached) " >&6
23120else $as_nop
23121  ac_check_lib_save_LIBS=$LIBS
23122LIBS="-lngtcp2_crypto_ossl  $LIBS"
23123cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23124/* end confdefs.h.  */
23125
23126/* Override any GCC internal prototype to avoid an error.
23127   Use char because int might match the return type of a GCC
23128   builtin and then its argument prototype would still apply.  */
23129char ngtcp2_crypto_encrypt_cb ();
23130int
23131main (void)
23132{
23133return ngtcp2_crypto_encrypt_cb ();
23134  ;
23135  return 0;
23136}
23137_ACEOF
23138if ac_fn_c_try_link "$LINENO"
23139then :
23140  ac_cv_lib_ngtcp2_crypto_ossl_ngtcp2_crypto_encrypt_cb=yes
23141else $as_nop
23142  ac_cv_lib_ngtcp2_crypto_ossl_ngtcp2_crypto_encrypt_cb=no
23143fi
23144rm -f core conftest.err conftest.$ac_objext conftest.beam \
23145    conftest$ac_exeext conftest.$ac_ext
23146LIBS=$ac_check_lib_save_LIBS
23147fi
23148{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ngtcp2_crypto_ossl_ngtcp2_crypto_encrypt_cb" >&5
23149printf "%s\n" "$ac_cv_lib_ngtcp2_crypto_ossl_ngtcp2_crypto_encrypt_cb" >&6; }
23150if test "x$ac_cv_lib_ngtcp2_crypto_ossl_ngtcp2_crypto_encrypt_cb" = xyes
23151then :
23152
23153	LIBS="$LIBS -lngtcp2_crypto_ossl"
23154
23155printf "%s\n" "#define USE_NGTCP2_CRYPTO_OSSL 1" >>confdefs.h
23156
23157
23158else $as_nop
23159
23160        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ngtcp2_crypto_encrypt_cb in -lngtcp2_crypto_openssl" >&5
23161printf %s "checking for ngtcp2_crypto_encrypt_cb in -lngtcp2_crypto_openssl... " >&6; }
23162if test ${ac_cv_lib_ngtcp2_crypto_openssl_ngtcp2_crypto_encrypt_cb+y}
23163then :
23164  printf %s "(cached) " >&6
23165else $as_nop
23166  ac_check_lib_save_LIBS=$LIBS
23167LIBS="-lngtcp2_crypto_openssl  $LIBS"
23168cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23169/* end confdefs.h.  */
23170
23171/* Override any GCC internal prototype to avoid an error.
23172   Use char because int might match the return type of a GCC
23173   builtin and then its argument prototype would still apply.  */
23174char ngtcp2_crypto_encrypt_cb ();
23175int
23176main (void)
23177{
23178return ngtcp2_crypto_encrypt_cb ();
23179  ;
23180  return 0;
23181}
23182_ACEOF
23183if ac_fn_c_try_link "$LINENO"
23184then :
23185  ac_cv_lib_ngtcp2_crypto_openssl_ngtcp2_crypto_encrypt_cb=yes
23186else $as_nop
23187  ac_cv_lib_ngtcp2_crypto_openssl_ngtcp2_crypto_encrypt_cb=no
23188fi
23189rm -f core conftest.err conftest.$ac_objext conftest.beam \
23190    conftest$ac_exeext conftest.$ac_ext
23191LIBS=$ac_check_lib_save_LIBS
23192fi
23193{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ngtcp2_crypto_openssl_ngtcp2_crypto_encrypt_cb" >&5
23194printf "%s\n" "$ac_cv_lib_ngtcp2_crypto_openssl_ngtcp2_crypto_encrypt_cb" >&6; }
23195if test "x$ac_cv_lib_ngtcp2_crypto_openssl_ngtcp2_crypto_encrypt_cb" = xyes
23196then :
23197   LIBS="$LIBS -lngtcp2_crypto_openssl"
23198else $as_nop
23199
23200            { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ngtcp2_crypto_encrypt_cb in -lngtcp2_crypto_quictls" >&5
23201printf %s "checking for ngtcp2_crypto_encrypt_cb in -lngtcp2_crypto_quictls... " >&6; }
23202if test ${ac_cv_lib_ngtcp2_crypto_quictls_ngtcp2_crypto_encrypt_cb+y}
23203then :
23204  printf %s "(cached) " >&6
23205else $as_nop
23206  ac_check_lib_save_LIBS=$LIBS
23207LIBS="-lngtcp2_crypto_quictls  $LIBS"
23208cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23209/* end confdefs.h.  */
23210
23211/* Override any GCC internal prototype to avoid an error.
23212   Use char because int might match the return type of a GCC
23213   builtin and then its argument prototype would still apply.  */
23214char ngtcp2_crypto_encrypt_cb ();
23215int
23216main (void)
23217{
23218return ngtcp2_crypto_encrypt_cb ();
23219  ;
23220  return 0;
23221}
23222_ACEOF
23223if ac_fn_c_try_link "$LINENO"
23224then :
23225  ac_cv_lib_ngtcp2_crypto_quictls_ngtcp2_crypto_encrypt_cb=yes
23226else $as_nop
23227  ac_cv_lib_ngtcp2_crypto_quictls_ngtcp2_crypto_encrypt_cb=no
23228fi
23229rm -f core conftest.err conftest.$ac_objext conftest.beam \
23230    conftest$ac_exeext conftest.$ac_ext
23231LIBS=$ac_check_lib_save_LIBS
23232fi
23233{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ngtcp2_crypto_quictls_ngtcp2_crypto_encrypt_cb" >&5
23234printf "%s\n" "$ac_cv_lib_ngtcp2_crypto_quictls_ngtcp2_crypto_encrypt_cb" >&6; }
23235if test "x$ac_cv_lib_ngtcp2_crypto_quictls_ngtcp2_crypto_encrypt_cb" = xyes
23236then :
23237   LIBS="$LIBS -lngtcp2_crypto_quictls"
23238fi
23239
23240
23241fi
23242
23243
23244fi
23245
23246    ac_fn_c_check_func "$LINENO" "ngtcp2_crypto_encrypt_cb" "ac_cv_func_ngtcp2_crypto_encrypt_cb"
23247if test "x$ac_cv_func_ngtcp2_crypto_encrypt_cb" = xyes
23248then :
23249  printf "%s\n" "#define HAVE_NGTCP2_CRYPTO_ENCRYPT_CB 1" >>confdefs.h
23250
23251fi
23252ac_fn_c_check_func "$LINENO" "ngtcp2_ccerr_default" "ac_cv_func_ngtcp2_ccerr_default"
23253if test "x$ac_cv_func_ngtcp2_ccerr_default" = xyes
23254then :
23255  printf "%s\n" "#define HAVE_NGTCP2_CCERR_DEFAULT 1" >>confdefs.h
23256
23257fi
23258ac_fn_c_check_func "$LINENO" "ngtcp2_conn_in_closing_period" "ac_cv_func_ngtcp2_conn_in_closing_period"
23259if test "x$ac_cv_func_ngtcp2_conn_in_closing_period" = xyes
23260then :
23261  printf "%s\n" "#define HAVE_NGTCP2_CONN_IN_CLOSING_PERIOD 1" >>confdefs.h
23262
23263fi
23264ac_fn_c_check_func "$LINENO" "ngtcp2_conn_in_draining_period" "ac_cv_func_ngtcp2_conn_in_draining_period"
23265if test "x$ac_cv_func_ngtcp2_conn_in_draining_period" = xyes
23266then :
23267  printf "%s\n" "#define HAVE_NGTCP2_CONN_IN_DRAINING_PERIOD 1" >>confdefs.h
23268
23269fi
23270ac_fn_c_check_func "$LINENO" "ngtcp2_conn_get_max_local_streams_uni" "ac_cv_func_ngtcp2_conn_get_max_local_streams_uni"
23271if test "x$ac_cv_func_ngtcp2_conn_get_max_local_streams_uni" = xyes
23272then :
23273  printf "%s\n" "#define HAVE_NGTCP2_CONN_GET_MAX_LOCAL_STREAMS_UNI 1" >>confdefs.h
23274
23275fi
23276ac_fn_c_check_func "$LINENO" "ngtcp2_crypto_quictls_from_ossl_encryption_level" "ac_cv_func_ngtcp2_crypto_quictls_from_ossl_encryption_level"
23277if test "x$ac_cv_func_ngtcp2_crypto_quictls_from_ossl_encryption_level" = xyes
23278then :
23279  printf "%s\n" "#define HAVE_NGTCP2_CRYPTO_QUICTLS_FROM_OSSL_ENCRYPTION_LEVEL 1" >>confdefs.h
23280
23281fi
23282ac_fn_c_check_func "$LINENO" "ngtcp2_crypto_quictls_configure_server_context" "ac_cv_func_ngtcp2_crypto_quictls_configure_server_context"
23283if test "x$ac_cv_func_ngtcp2_crypto_quictls_configure_server_context" = xyes
23284then :
23285  printf "%s\n" "#define HAVE_NGTCP2_CRYPTO_QUICTLS_CONFIGURE_SERVER_CONTEXT 1" >>confdefs.h
23286
23287fi
23288ac_fn_c_check_func "$LINENO" "ngtcp2_crypto_quictls_configure_client_context" "ac_cv_func_ngtcp2_crypto_quictls_configure_client_context"
23289if test "x$ac_cv_func_ngtcp2_crypto_quictls_configure_client_context" = xyes
23290then :
23291  printf "%s\n" "#define HAVE_NGTCP2_CRYPTO_QUICTLS_CONFIGURE_CLIENT_CONTEXT 1" >>confdefs.h
23292
23293fi
23294ac_fn_c_check_func "$LINENO" "ngtcp2_crypto_quictls_init" "ac_cv_func_ngtcp2_crypto_quictls_init"
23295if test "x$ac_cv_func_ngtcp2_crypto_quictls_init" = xyes
23296then :
23297  printf "%s\n" "#define HAVE_NGTCP2_CRYPTO_QUICTLS_INIT 1" >>confdefs.h
23298
23299fi
23300ac_fn_c_check_func "$LINENO" "ngtcp2_conn_get_num_scid" "ac_cv_func_ngtcp2_conn_get_num_scid"
23301if test "x$ac_cv_func_ngtcp2_conn_get_num_scid" = xyes
23302then :
23303  printf "%s\n" "#define HAVE_NGTCP2_CONN_GET_NUM_SCID 1" >>confdefs.h
23304
23305fi
23306ac_fn_c_check_func "$LINENO" "ngtcp2_conn_tls_early_data_rejected" "ac_cv_func_ngtcp2_conn_tls_early_data_rejected"
23307if test "x$ac_cv_func_ngtcp2_conn_tls_early_data_rejected" = xyes
23308then :
23309  printf "%s\n" "#define HAVE_NGTCP2_CONN_TLS_EARLY_DATA_REJECTED 1" >>confdefs.h
23310
23311fi
23312ac_fn_c_check_func "$LINENO" "ngtcp2_conn_encode_0rtt_transport_params" "ac_cv_func_ngtcp2_conn_encode_0rtt_transport_params"
23313if test "x$ac_cv_func_ngtcp2_conn_encode_0rtt_transport_params" = xyes
23314then :
23315  printf "%s\n" "#define HAVE_NGTCP2_CONN_ENCODE_0RTT_TRANSPORT_PARAMS 1" >>confdefs.h
23316
23317fi
23318
23319
23320    # these check_funcs need -lssl
23321    BAKLIBS="$LIBS"
23322    LIBS="-lssl $LIBS"
23323
23324  for ac_func in SSL_is_quic
23325do :
23326  ac_fn_c_check_func "$LINENO" "SSL_is_quic" "ac_cv_func_SSL_is_quic"
23327if test "x$ac_cv_func_SSL_is_quic" = xyes
23328then :
23329  printf "%s\n" "#define HAVE_SSL_IS_QUIC 1" >>confdefs.h
23330
23331else $as_nop
23332  as_fn_error $? "No QUIC support detected in OpenSSL. Need OpenSSL version with QUIC support to enable DNS over QUIC with libngtcp2." "$LINENO" 5
23333fi
23334
23335done
23336    LIBS="$BAKLIBS"
23337
23338    ac_fn_c_check_type "$LINENO" "struct ngtcp2_version_cid" "ac_cv_type_struct_ngtcp2_version_cid" "$ac_includes_default
23339    #include <ngtcp2/ngtcp2.h>
23340
23341"
23342if test "x$ac_cv_type_struct_ngtcp2_version_cid" = xyes
23343then :
23344
23345printf "%s\n" "#define HAVE_STRUCT_NGTCP2_VERSION_CID 1" >>confdefs.h
23346
23347
23348fi
23349ac_fn_c_check_type "$LINENO" "ngtcp2_encryption_level" "ac_cv_type_ngtcp2_encryption_level" "$ac_includes_default
23350    #include <ngtcp2/ngtcp2.h>
23351
23352"
23353if test "x$ac_cv_type_ngtcp2_encryption_level" = xyes
23354then :
23355
23356printf "%s\n" "#define HAVE_NGTCP2_ENCRYPTION_LEVEL 1" >>confdefs.h
23357
23358
23359fi
23360
23361    ac_fn_c_check_member "$LINENO" "struct ngtcp2_pkt_hd" "tokenlen" "ac_cv_member_struct_ngtcp2_pkt_hd_tokenlen" "$ac_includes_default
23362    #include <ngtcp2/ngtcp2.h>
23363
23364"
23365if test "x$ac_cv_member_struct_ngtcp2_pkt_hd_tokenlen" = xyes
23366then :
23367
23368printf "%s\n" "#define HAVE_STRUCT_NGTCP2_PKT_HD_TOKENLEN 1" >>confdefs.h
23369
23370
23371fi
23372ac_fn_c_check_member "$LINENO" "struct ngtcp2_settings" "tokenlen" "ac_cv_member_struct_ngtcp2_settings_tokenlen" "$ac_includes_default
23373    #include <ngtcp2/ngtcp2.h>
23374
23375"
23376if test "x$ac_cv_member_struct_ngtcp2_settings_tokenlen" = xyes
23377then :
23378
23379printf "%s\n" "#define HAVE_STRUCT_NGTCP2_SETTINGS_TOKENLEN 1" >>confdefs.h
23380
23381
23382fi
23383ac_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
23384    #include <ngtcp2/ngtcp2.h>
23385
23386"
23387if test "x$ac_cv_member_struct_ngtcp2_settings_max_tx_udp_payload_size" = xyes
23388then :
23389
23390printf "%s\n" "#define HAVE_STRUCT_NGTCP2_SETTINGS_MAX_TX_UDP_PAYLOAD_SIZE 1" >>confdefs.h
23391
23392
23393fi
23394ac_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
23395    #include <ngtcp2/ngtcp2.h>
23396
23397"
23398if test "x$ac_cv_member_struct_ngtcp2_transport_params_original_dcid_present" = xyes
23399then :
23400
23401printf "%s\n" "#define HAVE_STRUCT_NGTCP2_TRANSPORT_PARAMS_ORIGINAL_DCID_PRESENT 1" >>confdefs.h
23402
23403
23404fi
23405
23406
23407    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ngtcp2_conn_shutdown_stream has 4 arguments" >&5
23408printf %s "checking whether ngtcp2_conn_shutdown_stream has 4 arguments... " >&6; }
23409    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23410/* end confdefs.h.  */
23411$ac_includes_default
23412#include <ngtcp2/ngtcp2.h>
23413
23414int
23415main (void)
23416{
23417
23418	(void)ngtcp2_conn_shutdown_stream(NULL, 0, 0, 0);
23419
23420  ;
23421  return 0;
23422}
23423_ACEOF
23424if ac_fn_c_try_compile "$LINENO"
23425then :
23426
23427	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
23428printf "%s\n" "yes" >&6; }
23429
23430printf "%s\n" "#define HAVE_NGTCP2_CONN_SHUTDOWN_STREAM4 1" >>confdefs.h
23431
23432
23433else $as_nop
23434
23435	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
23436printf "%s\n" "no" >&6; }
23437
23438fi
23439rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
23440
23441fi
23442
23443# set static linking for uninstalled libraries if requested
23444
23445staticexe=""
23446# Check whether --enable-static-exe was given.
23447if test ${enable_static_exe+y}
23448then :
23449  enableval=$enable_static_exe;
23450fi
23451
23452if test x_$enable_static_exe = x_yes; then
23453	staticexe="-static"
23454	if test "$on_mingw" = yes; then
23455		staticexe="-all-static"
23456		# for static compile, include gdi32 and zlib here.
23457		if echo "$LIBS" | grep 'lgdi32' >/dev/null; then
23458			:
23459		else
23460			LIBS="$LIBS -lgdi32"
23461		fi
23462		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
23463printf %s "checking for compress in -lz... " >&6; }
23464if test ${ac_cv_lib_z_compress+y}
23465then :
23466  printf %s "(cached) " >&6
23467else $as_nop
23468  ac_check_lib_save_LIBS=$LIBS
23469LIBS="-lz  $LIBS"
23470cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23471/* end confdefs.h.  */
23472
23473/* Override any GCC internal prototype to avoid an error.
23474   Use char because int might match the return type of a GCC
23475   builtin and then its argument prototype would still apply.  */
23476char compress ();
23477int
23478main (void)
23479{
23480return compress ();
23481  ;
23482  return 0;
23483}
23484_ACEOF
23485if ac_fn_c_try_link "$LINENO"
23486then :
23487  ac_cv_lib_z_compress=yes
23488else $as_nop
23489  ac_cv_lib_z_compress=no
23490fi
23491rm -f core conftest.err conftest.$ac_objext conftest.beam \
23492    conftest$ac_exeext conftest.$ac_ext
23493LIBS=$ac_check_lib_save_LIBS
23494fi
23495{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
23496printf "%s\n" "$ac_cv_lib_z_compress" >&6; }
23497if test "x$ac_cv_lib_z_compress" = xyes
23498then :
23499   LIBS="$LIBS -lz"
23500fi
23501
23502		if echo "$LIBS" | grep -e "libssp.a" -e "lssp" >/dev/null; then
23503			:
23504		else
23505			LIBS="$LIBS -l:libssp.a"
23506		fi
23507	fi
23508fi
23509
23510# set full static linking if requested
23511# Check whether --enable-fully-static was given.
23512if test ${enable_fully_static+y}
23513then :
23514  enableval=$enable_fully_static;
23515fi
23516
23517if test x_$enable_fully_static = x_yes; then
23518	staticexe="-all-static"
23519	if test "$on_mingw" = yes; then
23520		# for static compile, include gdi32 and zlib here.
23521		if echo $LIBS | grep 'lgdi32' >/dev/null; then
23522			:
23523		else
23524			LIBS="$LIBS -lgdi32"
23525		fi
23526		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
23527printf %s "checking for compress in -lz... " >&6; }
23528if test ${ac_cv_lib_z_compress+y}
23529then :
23530  printf %s "(cached) " >&6
23531else $as_nop
23532  ac_check_lib_save_LIBS=$LIBS
23533LIBS="-lz  $LIBS"
23534cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23535/* end confdefs.h.  */
23536
23537/* Override any GCC internal prototype to avoid an error.
23538   Use char because int might match the return type of a GCC
23539   builtin and then its argument prototype would still apply.  */
23540char compress ();
23541int
23542main (void)
23543{
23544return compress ();
23545  ;
23546  return 0;
23547}
23548_ACEOF
23549if ac_fn_c_try_link "$LINENO"
23550then :
23551  ac_cv_lib_z_compress=yes
23552else $as_nop
23553  ac_cv_lib_z_compress=no
23554fi
23555rm -f core conftest.err conftest.$ac_objext conftest.beam \
23556    conftest$ac_exeext conftest.$ac_ext
23557LIBS=$ac_check_lib_save_LIBS
23558fi
23559{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
23560printf "%s\n" "$ac_cv_lib_z_compress" >&6; }
23561if test "x$ac_cv_lib_z_compress" = xyes
23562then :
23563   LIBS="$LIBS -lz"
23564fi
23565
23566		if echo "$LIBS" | grep -e "libssp.a" -e "lssp" >/dev/null; then
23567			:
23568		else
23569			LIBS="$LIBS -l:libssp.a"
23570		fi
23571	fi
23572fi
23573
23574# set lock checking if requested
23575# Check whether --enable-lock_checks was given.
23576if test ${enable_lock_checks+y}
23577then :
23578  enableval=$enable_lock_checks;
23579fi
23580
23581if test x_$enable_lock_checks = x_yes; then
23582
23583printf "%s\n" "#define ENABLE_LOCK_CHECKS 1" >>confdefs.h
23584
23585	CHECKLOCK_OBJ="checklocks.lo"
23586
23587fi
23588
23589
23590{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
23591printf %s "checking for getaddrinfo... " >&6; }
23592ac_cv_func_getaddrinfo=no
23593cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23594/* end confdefs.h.  */
23595
23596#ifdef __cplusplus
23597extern "C"
23598{
23599#endif
23600char* getaddrinfo();
23601char* (*f) () = getaddrinfo;
23602#ifdef __cplusplus
23603}
23604#endif
23605int main(void) {
23606        ;
23607        return 0;
23608}
23609
23610_ACEOF
23611if ac_fn_c_try_link "$LINENO"
23612then :
23613  ac_cv_func_getaddrinfo="yes"
23614if test "$ac_cv_header_windows_h" = "yes"; then
23615
23616printf "%s\n" "#define USE_WINSOCK 1" >>confdefs.h
23617
23618	USE_WINSOCK="1"
23619	if echo "$LIBS" | grep 'lws2_32' >/dev/null; then
23620		:
23621	else
23622		LIBS="$LIBS -lws2_32"
23623	fi
23624fi
23625
23626else $as_nop
23627  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23628/* end confdefs.h.  */
23629
23630#ifdef HAVE_WS2TCPIP_H
23631#include <ws2tcpip.h>
23632#endif
23633
23634int
23635main (void)
23636{
23637
23638        (void)getaddrinfo(NULL, NULL, NULL, NULL);
23639
23640
23641  ;
23642  return 0;
23643}
23644_ACEOF
23645if ac_fn_c_try_link "$LINENO"
23646then :
23647
23648ac_cv_func_getaddrinfo="yes"
23649
23650printf "%s\n" "#define USE_WINSOCK 1" >>confdefs.h
23651
23652USE_WINSOCK="1"
23653
23654else $as_nop
23655  ORIGLIBS="$LIBS"
23656LIBS="$LIBS -lws2_32"
23657cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23658/* end confdefs.h.  */
23659
23660#ifdef HAVE_WS2TCPIP_H
23661#include <ws2tcpip.h>
23662#endif
23663
23664int
23665main (void)
23666{
23667
23668        (void)getaddrinfo(NULL, NULL, NULL, NULL);
23669
23670
23671  ;
23672  return 0;
23673}
23674_ACEOF
23675if ac_fn_c_try_link "$LINENO"
23676then :
23677
23678ac_cv_func_getaddrinfo="yes"
23679
23680printf "%s\n" "#define USE_WINSOCK 1" >>confdefs.h
23681
23682USE_WINSOCK="1"
23683
23684else $as_nop
23685
23686ac_cv_func_getaddrinfo="no"
23687LIBS="$ORIGLIBS"
23688
23689fi
23690rm -f core conftest.err conftest.$ac_objext conftest.beam \
23691    conftest$ac_exeext conftest.$ac_ext
23692
23693fi
23694rm -f core conftest.err conftest.$ac_objext conftest.beam \
23695    conftest$ac_exeext conftest.$ac_ext
23696
23697fi
23698rm -f core conftest.err conftest.$ac_objext conftest.beam \
23699    conftest$ac_exeext conftest.$ac_ext
23700
23701{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_getaddrinfo" >&5
23702printf "%s\n" "$ac_cv_func_getaddrinfo" >&6; }
23703if test $ac_cv_func_getaddrinfo = yes; then
23704
23705printf "%s\n" "#define HAVE_GETADDRINFO 1" >>confdefs.h
23706
23707fi
23708
23709if test "$USE_WINSOCK" = 1; then
23710
23711printf "%s\n" "#define UB_ON_WINDOWS 1" >>confdefs.h
23712
23713	ac_fn_c_check_header_compile "$LINENO" "iphlpapi.h" "ac_cv_header_iphlpapi_h" "$ac_includes_default
23714#include <windows.h>
23715
23716"
23717if test "x$ac_cv_header_iphlpapi_h" = xyes
23718then :
23719  printf "%s\n" "#define HAVE_IPHLPAPI_H 1" >>confdefs.h
23720
23721fi
23722
23723	if test -n "$ac_tool_prefix"; then
23724  # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
23725set dummy ${ac_tool_prefix}windres; ac_word=$2
23726{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23727printf %s "checking for $ac_word... " >&6; }
23728if test ${ac_cv_prog_WINDRES+y}
23729then :
23730  printf %s "(cached) " >&6
23731else $as_nop
23732  if test -n "$WINDRES"; then
23733  ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
23734else
23735as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23736for as_dir in $PATH
23737do
23738  IFS=$as_save_IFS
23739  case $as_dir in #(((
23740    '') as_dir=./ ;;
23741    */) ;;
23742    *) as_dir=$as_dir/ ;;
23743  esac
23744    for ac_exec_ext in '' $ac_executable_extensions; do
23745  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
23746    ac_cv_prog_WINDRES="${ac_tool_prefix}windres"
23747    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
23748    break 2
23749  fi
23750done
23751  done
23752IFS=$as_save_IFS
23753
23754fi
23755fi
23756WINDRES=$ac_cv_prog_WINDRES
23757if test -n "$WINDRES"; then
23758  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $WINDRES" >&5
23759printf "%s\n" "$WINDRES" >&6; }
23760else
23761  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
23762printf "%s\n" "no" >&6; }
23763fi
23764
23765
23766fi
23767if test -z "$ac_cv_prog_WINDRES"; then
23768  ac_ct_WINDRES=$WINDRES
23769  # Extract the first word of "windres", so it can be a program name with args.
23770set dummy windres; ac_word=$2
23771{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23772printf %s "checking for $ac_word... " >&6; }
23773if test ${ac_cv_prog_ac_ct_WINDRES+y}
23774then :
23775  printf %s "(cached) " >&6
23776else $as_nop
23777  if test -n "$ac_ct_WINDRES"; then
23778  ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # Let the user override the test.
23779else
23780as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23781for as_dir in $PATH
23782do
23783  IFS=$as_save_IFS
23784  case $as_dir in #(((
23785    '') as_dir=./ ;;
23786    */) ;;
23787    *) as_dir=$as_dir/ ;;
23788  esac
23789    for ac_exec_ext in '' $ac_executable_extensions; do
23790  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
23791    ac_cv_prog_ac_ct_WINDRES="windres"
23792    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
23793    break 2
23794  fi
23795done
23796  done
23797IFS=$as_save_IFS
23798
23799fi
23800fi
23801ac_ct_WINDRES=$ac_cv_prog_ac_ct_WINDRES
23802if test -n "$ac_ct_WINDRES"; then
23803  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_WINDRES" >&5
23804printf "%s\n" "$ac_ct_WINDRES" >&6; }
23805else
23806  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
23807printf "%s\n" "no" >&6; }
23808fi
23809
23810  if test "x$ac_ct_WINDRES" = x; then
23811    WINDRES=""
23812  else
23813    case $cross_compiling:$ac_tool_warned in
23814yes:)
23815{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
23816printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
23817ac_tool_warned=yes ;;
23818esac
23819    WINDRES=$ac_ct_WINDRES
23820  fi
23821else
23822  WINDRES="$ac_cv_prog_WINDRES"
23823fi
23824
23825	if echo "$LIBS" | grep crypt32 >/dev/null; then
23826		LIBS="$LIBS -liphlpapi"
23827	else
23828		LIBS="$LIBS -liphlpapi -lcrypt32"
23829	fi
23830	WINAPPS="unbound-service-install.exe unbound-service-remove.exe anchor-update.exe"
23831
23832	WIN_DAEMON_SRC="winrc/win_svc.c winrc/w_inst.c"
23833
23834	WIN_DAEMON_OBJ="win_svc.lo w_inst.lo"
23835
23836	WIN_DAEMON_OBJ_LINK="rsrc_unbound.o"
23837
23838	WIN_HOST_OBJ_LINK="rsrc_unbound_host.o"
23839
23840	WIN_UBANCHOR_OBJ_LINK="rsrc_unbound_anchor.o log.lo locks.lo"
23841
23842	WIN_CONTROL_OBJ_LINK="rsrc_unbound_control.o"
23843
23844	WIN_CHECKCONF_OBJ_LINK="rsrc_unbound_checkconf.o"
23845
23846
23847printf "%s\n" "#define __USE_MINGW_ANSI_STDIO 1" >>confdefs.h
23848
23849fi
23850if test $ac_cv_func_getaddrinfo = no; then
23851	case " $LIBOBJS " in
23852  *" fake-rfc2553.$ac_objext "* ) ;;
23853  *) LIBOBJS="$LIBOBJS fake-rfc2553.$ac_objext"
23854 ;;
23855esac
23856
23857fi
23858# check after getaddrinfo for its libraries
23859
23860# check ioctlsocket
23861{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ioctlsocket" >&5
23862printf %s "checking for ioctlsocket... " >&6; }
23863cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23864/* end confdefs.h.  */
23865
23866#ifdef HAVE_WINSOCK2_H
23867#include <winsock2.h>
23868#endif
23869
23870int
23871main (void)
23872{
23873
23874	(void)ioctlsocket(0, 0, NULL);
23875
23876  ;
23877  return 0;
23878}
23879_ACEOF
23880if ac_fn_c_try_link "$LINENO"
23881then :
23882
23883{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
23884printf "%s\n" "yes" >&6; }
23885
23886printf "%s\n" "#define HAVE_IOCTLSOCKET 1" >>confdefs.h
23887
23888
23889else $as_nop
23890  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
23891printf "%s\n" "no" >&6; }
23892fi
23893rm -f core conftest.err conftest.$ac_objext conftest.beam \
23894    conftest$ac_exeext conftest.$ac_ext
23895
23896
23897# see if daemon(3) exists, and if it is deprecated.
23898ac_fn_c_check_func "$LINENO" "daemon" "ac_cv_func_daemon"
23899if test "x$ac_cv_func_daemon" = xyes
23900then :
23901  printf "%s\n" "#define HAVE_DAEMON 1" >>confdefs.h
23902
23903fi
23904
23905if test $ac_cv_func_daemon = yes; then
23906
23907
23908{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if daemon is deprecated" >&5
23909printf %s "checking if daemon is deprecated... " >&6; }
23910cache=`echo daemon | sed 'y%.=/+-%___p_%'`
23911if eval test \${cv_cc_deprecated_$cache+y}
23912then :
23913  printf %s "(cached) " >&6
23914else $as_nop
23915
23916echo '
23917#include <stdlib.h>
23918#include <unistd.h>
23919' >conftest.c
23920echo 'void f(void){ (void)daemon(0, 0); }' >>conftest.c
23921if test -z "`$CC $CPPFLAGS $CFLAGS -c conftest.c 2>&1 | grep -e deprecated -e unavailable`"; then
23922eval "cv_cc_deprecated_$cache=no"
23923else
23924eval "cv_cc_deprecated_$cache=yes"
23925fi
23926rm -f conftest conftest.o conftest.c
23927
23928fi
23929
23930if eval "test \"`echo '$cv_cc_deprecated_'$cache`\" = yes"; then
23931{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
23932printf "%s\n" "yes" >&6; }
23933
23934printf "%s\n" "#define DEPRECATED_DAEMON 1" >>confdefs.h
23935
23936:
23937
23938else
23939{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
23940printf "%s\n" "no" >&6; }
23941:
23942
23943fi
23944
23945fi
23946
23947ac_fn_c_check_member "$LINENO" "struct sockaddr_un" "sun_len" "ac_cv_member_struct_sockaddr_un_sun_len" "
23948$ac_includes_default
23949#ifdef HAVE_SYS_UN_H
23950#include <sys/un.h>
23951#endif
23952
23953"
23954if test "x$ac_cv_member_struct_sockaddr_un_sun_len" = xyes
23955then :
23956
23957printf "%s\n" "#define HAVE_STRUCT_SOCKADDR_UN_SUN_LEN 1" >>confdefs.h
23958
23959
23960fi
23961
23962ac_fn_c_check_member "$LINENO" "struct in_pktinfo" "ipi_spec_dst" "ac_cv_member_struct_in_pktinfo_ipi_spec_dst" "
23963$ac_includes_default
23964#if HAVE_SYS_PARAM_H
23965#include <sys/param.h>
23966#endif
23967
23968#ifdef HAVE_SYS_SOCKET_H
23969#include <sys/socket.h>
23970#endif
23971
23972#ifdef HAVE_SYS_UIO_H
23973#include <sys/uio.h>
23974#endif
23975
23976#ifdef HAVE_NETINET_IN_H
23977#include <netinet/in.h>
23978#endif
23979
23980#ifdef HAVE_NETINET_TCP_H
23981#include <netinet/tcp.h>
23982#endif
23983
23984#ifdef HAVE_ARPA_INET_H
23985#include <arpa/inet.h>
23986#endif
23987
23988#ifdef HAVE_WINSOCK2_H
23989#include <winsock2.h>
23990#endif
23991
23992#ifdef HAVE_WS2TCPIP_H
23993#include <ws2tcpip.h>
23994#endif
23995
23996"
23997if test "x$ac_cv_member_struct_in_pktinfo_ipi_spec_dst" = xyes
23998then :
23999
24000printf "%s\n" "#define HAVE_STRUCT_IN_PKTINFO_IPI_SPEC_DST 1" >>confdefs.h
24001
24002
24003fi
24004
24005
24006{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for htobe64" >&5
24007printf %s "checking for htobe64... " >&6; }
24008cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24009/* end confdefs.h.  */
24010
24011#include <stdio.h>
24012#ifdef HAVE_ENDIAN_H
24013#  include <endian.h>
24014#endif
24015#ifdef HAVE_SYS_ENDIAN_H
24016#  include <sys/endian.h>
24017#endif
24018
24019int
24020main (void)
24021{
24022unsigned long long x = htobe64(0); printf("%u", (unsigned)x);
24023  ;
24024  return 0;
24025}
24026_ACEOF
24027if ac_fn_c_try_link "$LINENO"
24028then :
24029  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24030printf "%s\n" "yes" >&6; }
24031
24032printf "%s\n" "#define HAVE_HTOBE64 1" >>confdefs.h
24033
24034else $as_nop
24035  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
24036printf "%s\n" "no" >&6; }
24037fi
24038rm -f core conftest.err conftest.$ac_objext conftest.beam \
24039    conftest$ac_exeext conftest.$ac_ext
24040
24041{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for be64toh" >&5
24042printf %s "checking for be64toh... " >&6; }
24043cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24044/* end confdefs.h.  */
24045
24046#include <stdio.h>
24047#ifdef HAVE_ENDIAN_H
24048#  include <endian.h>
24049#endif
24050#ifdef HAVE_SYS_ENDIAN_H
24051#  include <sys/endian.h>
24052#endif
24053
24054int
24055main (void)
24056{
24057unsigned long long x = be64toh(0); printf("%u", (unsigned)x);
24058  ;
24059  return 0;
24060}
24061_ACEOF
24062if ac_fn_c_try_link "$LINENO"
24063then :
24064  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24065printf "%s\n" "yes" >&6; }
24066
24067printf "%s\n" "#define HAVE_BE64TOH 1" >>confdefs.h
24068
24069else $as_nop
24070  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
24071printf "%s\n" "no" >&6; }
24072fi
24073rm -f core conftest.err conftest.$ac_objext conftest.beam \
24074    conftest$ac_exeext conftest.$ac_ext
24075
24076{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing setusercontext" >&5
24077printf %s "checking for library containing setusercontext... " >&6; }
24078if test ${ac_cv_search_setusercontext+y}
24079then :
24080  printf %s "(cached) " >&6
24081else $as_nop
24082  ac_func_search_save_LIBS=$LIBS
24083cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24084/* end confdefs.h.  */
24085
24086/* Override any GCC internal prototype to avoid an error.
24087   Use char because int might match the return type of a GCC
24088   builtin and then its argument prototype would still apply.  */
24089char setusercontext ();
24090int
24091main (void)
24092{
24093return setusercontext ();
24094  ;
24095  return 0;
24096}
24097_ACEOF
24098for ac_lib in '' util
24099do
24100  if test -z "$ac_lib"; then
24101    ac_res="none required"
24102  else
24103    ac_res=-l$ac_lib
24104    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
24105  fi
24106  if ac_fn_c_try_link "$LINENO"
24107then :
24108  ac_cv_search_setusercontext=$ac_res
24109fi
24110rm -f core conftest.err conftest.$ac_objext conftest.beam \
24111    conftest$ac_exeext
24112  if test ${ac_cv_search_setusercontext+y}
24113then :
24114  break
24115fi
24116done
24117if test ${ac_cv_search_setusercontext+y}
24118then :
24119
24120else $as_nop
24121  ac_cv_search_setusercontext=no
24122fi
24123rm conftest.$ac_ext
24124LIBS=$ac_func_search_save_LIBS
24125fi
24126{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_setusercontext" >&5
24127printf "%s\n" "$ac_cv_search_setusercontext" >&6; }
24128ac_res=$ac_cv_search_setusercontext
24129if test "$ac_res" != no
24130then :
24131  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
24132
24133fi
24134
24135ac_fn_c_check_func "$LINENO" "tzset" "ac_cv_func_tzset"
24136if test "x$ac_cv_func_tzset" = xyes
24137then :
24138  printf "%s\n" "#define HAVE_TZSET 1" >>confdefs.h
24139
24140fi
24141ac_fn_c_check_func "$LINENO" "sigprocmask" "ac_cv_func_sigprocmask"
24142if test "x$ac_cv_func_sigprocmask" = xyes
24143then :
24144  printf "%s\n" "#define HAVE_SIGPROCMASK 1" >>confdefs.h
24145
24146fi
24147ac_fn_c_check_func "$LINENO" "fcntl" "ac_cv_func_fcntl"
24148if test "x$ac_cv_func_fcntl" = xyes
24149then :
24150  printf "%s\n" "#define HAVE_FCNTL 1" >>confdefs.h
24151
24152fi
24153ac_fn_c_check_func "$LINENO" "getpwnam" "ac_cv_func_getpwnam"
24154if test "x$ac_cv_func_getpwnam" = xyes
24155then :
24156  printf "%s\n" "#define HAVE_GETPWNAM 1" >>confdefs.h
24157
24158fi
24159ac_fn_c_check_func "$LINENO" "endpwent" "ac_cv_func_endpwent"
24160if test "x$ac_cv_func_endpwent" = xyes
24161then :
24162  printf "%s\n" "#define HAVE_ENDPWENT 1" >>confdefs.h
24163
24164fi
24165ac_fn_c_check_func "$LINENO" "getrlimit" "ac_cv_func_getrlimit"
24166if test "x$ac_cv_func_getrlimit" = xyes
24167then :
24168  printf "%s\n" "#define HAVE_GETRLIMIT 1" >>confdefs.h
24169
24170fi
24171ac_fn_c_check_func "$LINENO" "setrlimit" "ac_cv_func_setrlimit"
24172if test "x$ac_cv_func_setrlimit" = xyes
24173then :
24174  printf "%s\n" "#define HAVE_SETRLIMIT 1" >>confdefs.h
24175
24176fi
24177ac_fn_c_check_func "$LINENO" "setsid" "ac_cv_func_setsid"
24178if test "x$ac_cv_func_setsid" = xyes
24179then :
24180  printf "%s\n" "#define HAVE_SETSID 1" >>confdefs.h
24181
24182fi
24183ac_fn_c_check_func "$LINENO" "chroot" "ac_cv_func_chroot"
24184if test "x$ac_cv_func_chroot" = xyes
24185then :
24186  printf "%s\n" "#define HAVE_CHROOT 1" >>confdefs.h
24187
24188fi
24189ac_fn_c_check_func "$LINENO" "kill" "ac_cv_func_kill"
24190if test "x$ac_cv_func_kill" = xyes
24191then :
24192  printf "%s\n" "#define HAVE_KILL 1" >>confdefs.h
24193
24194fi
24195ac_fn_c_check_func "$LINENO" "chown" "ac_cv_func_chown"
24196if test "x$ac_cv_func_chown" = xyes
24197then :
24198  printf "%s\n" "#define HAVE_CHOWN 1" >>confdefs.h
24199
24200fi
24201ac_fn_c_check_func "$LINENO" "sleep" "ac_cv_func_sleep"
24202if test "x$ac_cv_func_sleep" = xyes
24203then :
24204  printf "%s\n" "#define HAVE_SLEEP 1" >>confdefs.h
24205
24206fi
24207ac_fn_c_check_func "$LINENO" "usleep" "ac_cv_func_usleep"
24208if test "x$ac_cv_func_usleep" = xyes
24209then :
24210  printf "%s\n" "#define HAVE_USLEEP 1" >>confdefs.h
24211
24212fi
24213ac_fn_c_check_func "$LINENO" "random" "ac_cv_func_random"
24214if test "x$ac_cv_func_random" = xyes
24215then :
24216  printf "%s\n" "#define HAVE_RANDOM 1" >>confdefs.h
24217
24218fi
24219ac_fn_c_check_func "$LINENO" "srandom" "ac_cv_func_srandom"
24220if test "x$ac_cv_func_srandom" = xyes
24221then :
24222  printf "%s\n" "#define HAVE_SRANDOM 1" >>confdefs.h
24223
24224fi
24225ac_fn_c_check_func "$LINENO" "recvmsg" "ac_cv_func_recvmsg"
24226if test "x$ac_cv_func_recvmsg" = xyes
24227then :
24228  printf "%s\n" "#define HAVE_RECVMSG 1" >>confdefs.h
24229
24230fi
24231ac_fn_c_check_func "$LINENO" "sendmsg" "ac_cv_func_sendmsg"
24232if test "x$ac_cv_func_sendmsg" = xyes
24233then :
24234  printf "%s\n" "#define HAVE_SENDMSG 1" >>confdefs.h
24235
24236fi
24237ac_fn_c_check_func "$LINENO" "writev" "ac_cv_func_writev"
24238if test "x$ac_cv_func_writev" = xyes
24239then :
24240  printf "%s\n" "#define HAVE_WRITEV 1" >>confdefs.h
24241
24242fi
24243ac_fn_c_check_func "$LINENO" "socketpair" "ac_cv_func_socketpair"
24244if test "x$ac_cv_func_socketpair" = xyes
24245then :
24246  printf "%s\n" "#define HAVE_SOCKETPAIR 1" >>confdefs.h
24247
24248fi
24249ac_fn_c_check_func "$LINENO" "glob" "ac_cv_func_glob"
24250if test "x$ac_cv_func_glob" = xyes
24251then :
24252  printf "%s\n" "#define HAVE_GLOB 1" >>confdefs.h
24253
24254fi
24255ac_fn_c_check_func "$LINENO" "initgroups" "ac_cv_func_initgroups"
24256if test "x$ac_cv_func_initgroups" = xyes
24257then :
24258  printf "%s\n" "#define HAVE_INITGROUPS 1" >>confdefs.h
24259
24260fi
24261ac_fn_c_check_func "$LINENO" "strftime" "ac_cv_func_strftime"
24262if test "x$ac_cv_func_strftime" = xyes
24263then :
24264  printf "%s\n" "#define HAVE_STRFTIME 1" >>confdefs.h
24265
24266fi
24267ac_fn_c_check_func "$LINENO" "localtime_r" "ac_cv_func_localtime_r"
24268if test "x$ac_cv_func_localtime_r" = xyes
24269then :
24270  printf "%s\n" "#define HAVE_LOCALTIME_R 1" >>confdefs.h
24271
24272fi
24273ac_fn_c_check_func "$LINENO" "setusercontext" "ac_cv_func_setusercontext"
24274if test "x$ac_cv_func_setusercontext" = xyes
24275then :
24276  printf "%s\n" "#define HAVE_SETUSERCONTEXT 1" >>confdefs.h
24277
24278fi
24279ac_fn_c_check_func "$LINENO" "_beginthreadex" "ac_cv_func__beginthreadex"
24280if test "x$ac_cv_func__beginthreadex" = xyes
24281then :
24282  printf "%s\n" "#define HAVE__BEGINTHREADEX 1" >>confdefs.h
24283
24284fi
24285ac_fn_c_check_func "$LINENO" "endservent" "ac_cv_func_endservent"
24286if test "x$ac_cv_func_endservent" = xyes
24287then :
24288  printf "%s\n" "#define HAVE_ENDSERVENT 1" >>confdefs.h
24289
24290fi
24291ac_fn_c_check_func "$LINENO" "endprotoent" "ac_cv_func_endprotoent"
24292if test "x$ac_cv_func_endprotoent" = xyes
24293then :
24294  printf "%s\n" "#define HAVE_ENDPROTOENT 1" >>confdefs.h
24295
24296fi
24297ac_fn_c_check_func "$LINENO" "fsync" "ac_cv_func_fsync"
24298if test "x$ac_cv_func_fsync" = xyes
24299then :
24300  printf "%s\n" "#define HAVE_FSYNC 1" >>confdefs.h
24301
24302fi
24303ac_fn_c_check_func "$LINENO" "shmget" "ac_cv_func_shmget"
24304if test "x$ac_cv_func_shmget" = xyes
24305then :
24306  printf "%s\n" "#define HAVE_SHMGET 1" >>confdefs.h
24307
24308fi
24309ac_fn_c_check_func "$LINENO" "accept4" "ac_cv_func_accept4"
24310if test "x$ac_cv_func_accept4" = xyes
24311then :
24312  printf "%s\n" "#define HAVE_ACCEPT4 1" >>confdefs.h
24313
24314fi
24315ac_fn_c_check_func "$LINENO" "getifaddrs" "ac_cv_func_getifaddrs"
24316if test "x$ac_cv_func_getifaddrs" = xyes
24317then :
24318  printf "%s\n" "#define HAVE_GETIFADDRS 1" >>confdefs.h
24319
24320fi
24321ac_fn_c_check_func "$LINENO" "if_nametoindex" "ac_cv_func_if_nametoindex"
24322if test "x$ac_cv_func_if_nametoindex" = xyes
24323then :
24324  printf "%s\n" "#define HAVE_IF_NAMETOINDEX 1" >>confdefs.h
24325
24326fi
24327ac_fn_c_check_func "$LINENO" "poll" "ac_cv_func_poll"
24328if test "x$ac_cv_func_poll" = xyes
24329then :
24330  printf "%s\n" "#define HAVE_POLL 1" >>confdefs.h
24331
24332fi
24333ac_fn_c_check_func "$LINENO" "gettid" "ac_cv_func_gettid"
24334if test "x$ac_cv_func_gettid" = xyes
24335then :
24336  printf "%s\n" "#define HAVE_GETTID 1" >>confdefs.h
24337
24338fi
24339
24340
24341  for ac_func in setresuid
24342do :
24343  ac_fn_c_check_func "$LINENO" "setresuid" "ac_cv_func_setresuid"
24344if test "x$ac_cv_func_setresuid" = xyes
24345then :
24346  printf "%s\n" "#define HAVE_SETRESUID 1" >>confdefs.h
24347
24348else $as_nop
24349  ac_fn_c_check_func "$LINENO" "setreuid" "ac_cv_func_setreuid"
24350if test "x$ac_cv_func_setreuid" = xyes
24351then :
24352  printf "%s\n" "#define HAVE_SETREUID 1" >>confdefs.h
24353
24354fi
24355
24356fi
24357
24358done
24359
24360  for ac_func in setresgid
24361do :
24362  ac_fn_c_check_func "$LINENO" "setresgid" "ac_cv_func_setresgid"
24363if test "x$ac_cv_func_setresgid" = xyes
24364then :
24365  printf "%s\n" "#define HAVE_SETRESGID 1" >>confdefs.h
24366
24367else $as_nop
24368  ac_fn_c_check_func "$LINENO" "setregid" "ac_cv_func_setregid"
24369if test "x$ac_cv_func_setregid" = xyes
24370then :
24371  printf "%s\n" "#define HAVE_SETREGID 1" >>confdefs.h
24372
24373fi
24374
24375fi
24376
24377done
24378
24379# check if setreuid en setregid fail, on MacOSX10.4(darwin8).
24380if echo $host_os | grep darwin8 > /dev/null; then
24381
24382printf "%s\n" "#define DARWIN_BROKEN_SETREUID 1" >>confdefs.h
24383
24384fi
24385
24386{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for atomic_store" >&5
24387printf %s "checking for atomic_store... " >&6; }
24388cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24389/* end confdefs.h.  */
24390$ac_includes_default
24391#ifdef HAVE_STDATOMIC_H
24392#include <stdatomic.h>
24393#endif
24394
24395int
24396main (void)
24397{
24398
24399	int newvar = 5, var = 0;
24400	atomic_store((_Atomic int*)&var, newvar);
24401	newvar = 0;
24402	/* condition to use the variables. */
24403	if(var == newvar) return 1;
24404
24405  ;
24406  return 0;
24407}
24408_ACEOF
24409if ac_fn_c_try_link "$LINENO"
24410then :
24411
24412	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24413printf "%s\n" "yes" >&6; }
24414
24415printf "%s\n" "#define HAVE_LINK_ATOMIC_STORE 1" >>confdefs.h
24416
24417
24418else $as_nop
24419
24420	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
24421printf "%s\n" "no" >&6; }
24422
24423fi
24424rm -f core conftest.err conftest.$ac_objext conftest.beam \
24425    conftest$ac_exeext conftest.$ac_ext
24426
24427ac_fn_check_decl "$LINENO" "inet_pton" "ac_cv_have_decl_inet_pton" "
24428$ac_includes_default
24429#ifdef HAVE_NETINET_IN_H
24430#include <netinet/in.h>
24431#endif
24432
24433#ifdef HAVE_NETINET_TCP_H
24434#include <netinet/tcp.h>
24435#endif
24436
24437#ifdef HAVE_ARPA_INET_H
24438#include <arpa/inet.h>
24439#endif
24440
24441#ifdef HAVE_WINSOCK2_H
24442#include <winsock2.h>
24443#endif
24444
24445#ifdef HAVE_WS2TCPIP_H
24446#include <ws2tcpip.h>
24447#endif
24448
24449" "$ac_c_undeclared_builtin_options" "CFLAGS"
24450if test "x$ac_cv_have_decl_inet_pton" = xyes
24451then :
24452  ac_have_decl=1
24453else $as_nop
24454  ac_have_decl=0
24455fi
24456printf "%s\n" "#define HAVE_DECL_INET_PTON $ac_have_decl" >>confdefs.h
24457ac_fn_check_decl "$LINENO" "inet_ntop" "ac_cv_have_decl_inet_ntop" "
24458$ac_includes_default
24459#ifdef HAVE_NETINET_IN_H
24460#include <netinet/in.h>
24461#endif
24462
24463#ifdef HAVE_NETINET_TCP_H
24464#include <netinet/tcp.h>
24465#endif
24466
24467#ifdef HAVE_ARPA_INET_H
24468#include <arpa/inet.h>
24469#endif
24470
24471#ifdef HAVE_WINSOCK2_H
24472#include <winsock2.h>
24473#endif
24474
24475#ifdef HAVE_WS2TCPIP_H
24476#include <ws2tcpip.h>
24477#endif
24478
24479" "$ac_c_undeclared_builtin_options" "CFLAGS"
24480if test "x$ac_cv_have_decl_inet_ntop" = xyes
24481then :
24482  ac_have_decl=1
24483else $as_nop
24484  ac_have_decl=0
24485fi
24486printf "%s\n" "#define HAVE_DECL_INET_NTOP $ac_have_decl" >>confdefs.h
24487
24488ac_fn_c_check_func "$LINENO" "inet_aton" "ac_cv_func_inet_aton"
24489if test "x$ac_cv_func_inet_aton" = xyes
24490then :
24491  printf "%s\n" "#define HAVE_INET_ATON 1" >>confdefs.h
24492
24493else $as_nop
24494  case " $LIBOBJS " in
24495  *" inet_aton.$ac_objext "* ) ;;
24496  *) LIBOBJS="$LIBOBJS inet_aton.$ac_objext"
24497 ;;
24498esac
24499
24500fi
24501
24502ac_fn_c_check_func "$LINENO" "inet_pton" "ac_cv_func_inet_pton"
24503if test "x$ac_cv_func_inet_pton" = xyes
24504then :
24505  printf "%s\n" "#define HAVE_INET_PTON 1" >>confdefs.h
24506
24507else $as_nop
24508  case " $LIBOBJS " in
24509  *" inet_pton.$ac_objext "* ) ;;
24510  *) LIBOBJS="$LIBOBJS inet_pton.$ac_objext"
24511 ;;
24512esac
24513
24514fi
24515
24516ac_fn_c_check_func "$LINENO" "inet_ntop" "ac_cv_func_inet_ntop"
24517if test "x$ac_cv_func_inet_ntop" = xyes
24518then :
24519  printf "%s\n" "#define HAVE_INET_NTOP 1" >>confdefs.h
24520
24521else $as_nop
24522  case " $LIBOBJS " in
24523  *" inet_ntop.$ac_objext "* ) ;;
24524  *) LIBOBJS="$LIBOBJS inet_ntop.$ac_objext"
24525 ;;
24526esac
24527
24528fi
24529
24530ac_fn_c_check_func "$LINENO" "snprintf" "ac_cv_func_snprintf"
24531if test "x$ac_cv_func_snprintf" = xyes
24532then :
24533  printf "%s\n" "#define HAVE_SNPRINTF 1" >>confdefs.h
24534
24535else $as_nop
24536  case " $LIBOBJS " in
24537  *" snprintf.$ac_objext "* ) ;;
24538  *) LIBOBJS="$LIBOBJS snprintf.$ac_objext"
24539 ;;
24540esac
24541
24542fi
24543
24544# test if snprintf return the proper length
24545if test "x$ac_cv_func_snprintf" = xyes; then
24546    if test c${cross_compiling} = cno; then
24547	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for correct snprintf return value" >&5
24548printf %s "checking for correct snprintf return value... " >&6; }
24549	if test "$cross_compiling" = yes
24550then :
24551  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: maybe" >&5
24552printf "%s\n" "maybe" >&6; }
24553else $as_nop
24554  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24555/* end confdefs.h.  */
24556$ac_includes_default
24557
24558int main(void) { return !(snprintf(NULL, 0, "test") == 4); }
24559
24560_ACEOF
24561if ac_fn_c_try_run "$LINENO"
24562then :
24563  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24564printf "%s\n" "yes" >&6; }
24565else $as_nop
24566
24567		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
24568printf "%s\n" "no" >&6; }
24569
24570printf "%s\n" "#define SNPRINTF_RET_BROKEN /**/" >>confdefs.h
24571
24572		case " $LIBOBJS " in
24573  *" snprintf.$ac_objext "* ) ;;
24574  *) LIBOBJS="$LIBOBJS snprintf.$ac_objext"
24575 ;;
24576esac
24577
24578
24579fi
24580rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24581  conftest.$ac_objext conftest.beam conftest.$ac_ext
24582fi
24583
24584    fi
24585fi
24586ac_fn_c_check_func "$LINENO" "strlcat" "ac_cv_func_strlcat"
24587if test "x$ac_cv_func_strlcat" = xyes
24588then :
24589  printf "%s\n" "#define HAVE_STRLCAT 1" >>confdefs.h
24590
24591else $as_nop
24592  case " $LIBOBJS " in
24593  *" strlcat.$ac_objext "* ) ;;
24594  *) LIBOBJS="$LIBOBJS strlcat.$ac_objext"
24595 ;;
24596esac
24597
24598fi
24599
24600ac_fn_c_check_func "$LINENO" "strlcpy" "ac_cv_func_strlcpy"
24601if test "x$ac_cv_func_strlcpy" = xyes
24602then :
24603  printf "%s\n" "#define HAVE_STRLCPY 1" >>confdefs.h
24604
24605else $as_nop
24606  case " $LIBOBJS " in
24607  *" strlcpy.$ac_objext "* ) ;;
24608  *) LIBOBJS="$LIBOBJS strlcpy.$ac_objext"
24609 ;;
24610esac
24611
24612fi
24613
24614ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove"
24615if test "x$ac_cv_func_memmove" = xyes
24616then :
24617  printf "%s\n" "#define HAVE_MEMMOVE 1" >>confdefs.h
24618
24619else $as_nop
24620  case " $LIBOBJS " in
24621  *" memmove.$ac_objext "* ) ;;
24622  *) LIBOBJS="$LIBOBJS memmove.$ac_objext"
24623 ;;
24624esac
24625
24626fi
24627
24628ac_fn_c_check_func "$LINENO" "gmtime_r" "ac_cv_func_gmtime_r"
24629if test "x$ac_cv_func_gmtime_r" = xyes
24630then :
24631  printf "%s\n" "#define HAVE_GMTIME_R 1" >>confdefs.h
24632
24633else $as_nop
24634  case " $LIBOBJS " in
24635  *" gmtime_r.$ac_objext "* ) ;;
24636  *) LIBOBJS="$LIBOBJS gmtime_r.$ac_objext"
24637 ;;
24638esac
24639
24640fi
24641
24642ac_fn_c_check_func "$LINENO" "isblank" "ac_cv_func_isblank"
24643if test "x$ac_cv_func_isblank" = xyes
24644then :
24645  printf "%s\n" "#define HAVE_ISBLANK 1" >>confdefs.h
24646
24647else $as_nop
24648  case " $LIBOBJS " in
24649  *" isblank.$ac_objext "* ) ;;
24650  *) LIBOBJS="$LIBOBJS isblank.$ac_objext"
24651 ;;
24652esac
24653
24654fi
24655
24656ac_fn_c_check_func "$LINENO" "explicit_bzero" "ac_cv_func_explicit_bzero"
24657if test "x$ac_cv_func_explicit_bzero" = xyes
24658then :
24659  printf "%s\n" "#define HAVE_EXPLICIT_BZERO 1" >>confdefs.h
24660
24661else $as_nop
24662  case " $LIBOBJS " in
24663  *" explicit_bzero.$ac_objext "* ) ;;
24664  *) LIBOBJS="$LIBOBJS explicit_bzero.$ac_objext"
24665 ;;
24666esac
24667
24668fi
24669
24670LIBOBJ_WITHOUT_CTIMEARC4="$LIBOBJS"
24671
24672{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for reallocarray" >&5
24673printf %s "checking for reallocarray... " >&6; }
24674cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24675/* end confdefs.h.  */
24676$ac_includes_default
24677
24678#ifndef _OPENBSD_SOURCE
24679#define _OPENBSD_SOURCE 1
24680#endif
24681#include <stdlib.h>
24682int main(void) {
24683	void* p = reallocarray(NULL, 10, 100);
24684	free(p);
24685	return 0;
24686}
24687
24688_ACEOF
24689if ac_fn_c_try_link "$LINENO"
24690then :
24691  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24692printf "%s\n" "yes" >&6; }
24693
24694printf "%s\n" "#define HAVE_REALLOCARRAY 1" >>confdefs.h
24695
24696
24697else $as_nop
24698
24699	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
24700printf "%s\n" "no" >&6; }
24701	case " $LIBOBJS " in
24702  *" reallocarray.$ac_objext "* ) ;;
24703  *) LIBOBJS="$LIBOBJS reallocarray.$ac_objext"
24704 ;;
24705esac
24706
24707
24708fi
24709rm -f core conftest.err conftest.$ac_objext conftest.beam \
24710    conftest$ac_exeext conftest.$ac_ext
24711ac_fn_check_decl "$LINENO" "reallocarray" "ac_cv_have_decl_reallocarray" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
24712if test "x$ac_cv_have_decl_reallocarray" = xyes
24713then :
24714  ac_have_decl=1
24715else $as_nop
24716  ac_have_decl=0
24717fi
24718printf "%s\n" "#define HAVE_DECL_REALLOCARRAY $ac_have_decl" >>confdefs.h
24719
24720if test "$USE_NSS" = "no"; then
24721	ac_fn_c_check_func "$LINENO" "arc4random" "ac_cv_func_arc4random"
24722if test "x$ac_cv_func_arc4random" = xyes
24723then :
24724  printf "%s\n" "#define HAVE_ARC4RANDOM 1" >>confdefs.h
24725
24726else $as_nop
24727  case " $LIBOBJS " in
24728  *" arc4random.$ac_objext "* ) ;;
24729  *) LIBOBJS="$LIBOBJS arc4random.$ac_objext"
24730 ;;
24731esac
24732
24733fi
24734
24735	ac_fn_c_check_func "$LINENO" "arc4random_uniform" "ac_cv_func_arc4random_uniform"
24736if test "x$ac_cv_func_arc4random_uniform" = xyes
24737then :
24738  printf "%s\n" "#define HAVE_ARC4RANDOM_UNIFORM 1" >>confdefs.h
24739
24740else $as_nop
24741  case " $LIBOBJS " in
24742  *" arc4random_uniform.$ac_objext "* ) ;;
24743  *) LIBOBJS="$LIBOBJS arc4random_uniform.$ac_objext"
24744 ;;
24745esac
24746
24747fi
24748
24749	if test "$ac_cv_func_arc4random" = "no"; then
24750		case " $LIBOBJS " in
24751  *" arc4_lock.$ac_objext "* ) ;;
24752  *) LIBOBJS="$LIBOBJS arc4_lock.$ac_objext"
24753 ;;
24754esac
24755
24756
24757  for ac_func in getentropy
24758do :
24759  ac_fn_c_check_func "$LINENO" "getentropy" "ac_cv_func_getentropy"
24760if test "x$ac_cv_func_getentropy" = xyes
24761then :
24762  printf "%s\n" "#define HAVE_GETENTROPY 1" >>confdefs.h
24763
24764else $as_nop
24765
24766		    if test "$USE_WINSOCK" = 1; then
24767			case " $LIBOBJS " in
24768  *" getentropy_win.$ac_objext "* ) ;;
24769  *) LIBOBJS="$LIBOBJS getentropy_win.$ac_objext"
24770 ;;
24771esac
24772
24773		    else
24774			case "$host" in
24775			Darwin|*darwin*)
24776				case " $LIBOBJS " in
24777  *" getentropy_osx.$ac_objext "* ) ;;
24778  *) LIBOBJS="$LIBOBJS getentropy_osx.$ac_objext"
24779 ;;
24780esac
24781
24782			;;
24783			*solaris*|*sunos*|SunOS)
24784				case " $LIBOBJS " in
24785  *" getentropy_solaris.$ac_objext "* ) ;;
24786  *) LIBOBJS="$LIBOBJS getentropy_solaris.$ac_objext"
24787 ;;
24788esac
24789
24790				       for ac_header in sys/sha2.h
24791do :
24792  ac_fn_c_check_header_compile "$LINENO" "sys/sha2.h" "ac_cv_header_sys_sha2_h" "$ac_includes_default
24793"
24794if test "x$ac_cv_header_sys_sha2_h" = xyes
24795then :
24796  printf "%s\n" "#define HAVE_SYS_SHA2_H 1" >>confdefs.h
24797
24798else $as_nop
24799
24800
24801  for ac_func in SHA512_Update
24802do :
24803  ac_fn_c_check_func "$LINENO" "SHA512_Update" "ac_cv_func_SHA512_Update"
24804if test "x$ac_cv_func_SHA512_Update" = xyes
24805then :
24806  printf "%s\n" "#define HAVE_SHA512_UPDATE 1" >>confdefs.h
24807
24808else $as_nop
24809
24810						case " $LIBOBJS " in
24811  *" sha512.$ac_objext "* ) ;;
24812  *) LIBOBJS="$LIBOBJS sha512.$ac_objext"
24813 ;;
24814esac
24815
24816
24817fi
24818
24819done
24820
24821fi
24822
24823done
24824				if test "$ac_cv_header_sys_sha2_h" = "yes"; then
24825					# this lib needed for sha2 on solaris
24826					LIBS="$LIBS -lmd"
24827				fi
24828				{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5
24829printf %s "checking for library containing clock_gettime... " >&6; }
24830if test ${ac_cv_search_clock_gettime+y}
24831then :
24832  printf %s "(cached) " >&6
24833else $as_nop
24834  ac_func_search_save_LIBS=$LIBS
24835cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24836/* end confdefs.h.  */
24837
24838/* Override any GCC internal prototype to avoid an error.
24839   Use char because int might match the return type of a GCC
24840   builtin and then its argument prototype would still apply.  */
24841char clock_gettime ();
24842int
24843main (void)
24844{
24845return clock_gettime ();
24846  ;
24847  return 0;
24848}
24849_ACEOF
24850for ac_lib in '' rt
24851do
24852  if test -z "$ac_lib"; then
24853    ac_res="none required"
24854  else
24855    ac_res=-l$ac_lib
24856    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
24857  fi
24858  if ac_fn_c_try_link "$LINENO"
24859then :
24860  ac_cv_search_clock_gettime=$ac_res
24861fi
24862rm -f core conftest.err conftest.$ac_objext conftest.beam \
24863    conftest$ac_exeext
24864  if test ${ac_cv_search_clock_gettime+y}
24865then :
24866  break
24867fi
24868done
24869if test ${ac_cv_search_clock_gettime+y}
24870then :
24871
24872else $as_nop
24873  ac_cv_search_clock_gettime=no
24874fi
24875rm conftest.$ac_ext
24876LIBS=$ac_func_search_save_LIBS
24877fi
24878{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5
24879printf "%s\n" "$ac_cv_search_clock_gettime" >&6; }
24880ac_res=$ac_cv_search_clock_gettime
24881if test "$ac_res" != no
24882then :
24883  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
24884
24885fi
24886
24887			;;
24888			*freebsd*|*FreeBSD)
24889				case " $LIBOBJS " in
24890  *" getentropy_freebsd.$ac_objext "* ) ;;
24891  *) LIBOBJS="$LIBOBJS getentropy_freebsd.$ac_objext"
24892 ;;
24893esac
24894
24895			;;
24896			*linux*|Linux|*)
24897				case " $LIBOBJS " in
24898  *" getentropy_linux.$ac_objext "* ) ;;
24899  *) LIBOBJS="$LIBOBJS getentropy_linux.$ac_objext"
24900 ;;
24901esac
24902
24903
24904  for ac_func in SHA512_Update
24905do :
24906  ac_fn_c_check_func "$LINENO" "SHA512_Update" "ac_cv_func_SHA512_Update"
24907if test "x$ac_cv_func_SHA512_Update" = xyes
24908then :
24909  printf "%s\n" "#define HAVE_SHA512_UPDATE 1" >>confdefs.h
24910
24911else $as_nop
24912
24913
24914printf "%s\n" "#define COMPAT_SHA512 1" >>confdefs.h
24915
24916					case " $LIBOBJS " in
24917  *" sha512.$ac_objext "* ) ;;
24918  *) LIBOBJS="$LIBOBJS sha512.$ac_objext"
24919 ;;
24920esac
24921
24922
24923fi
24924
24925done
24926				ac_fn_c_check_header_compile "$LINENO" "sys/sysctl.h" "ac_cv_header_sys_sysctl_h" "$ac_includes_default
24927"
24928if test "x$ac_cv_header_sys_sysctl_h" = xyes
24929then :
24930  printf "%s\n" "#define HAVE_SYS_SYSCTL_H 1" >>confdefs.h
24931
24932fi
24933
24934				ac_fn_c_check_func "$LINENO" "getauxval" "ac_cv_func_getauxval"
24935if test "x$ac_cv_func_getauxval" = xyes
24936then :
24937  printf "%s\n" "#define HAVE_GETAUXVAL 1" >>confdefs.h
24938
24939fi
24940
24941				{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5
24942printf %s "checking for library containing clock_gettime... " >&6; }
24943if test ${ac_cv_search_clock_gettime+y}
24944then :
24945  printf %s "(cached) " >&6
24946else $as_nop
24947  ac_func_search_save_LIBS=$LIBS
24948cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24949/* end confdefs.h.  */
24950
24951/* Override any GCC internal prototype to avoid an error.
24952   Use char because int might match the return type of a GCC
24953   builtin and then its argument prototype would still apply.  */
24954char clock_gettime ();
24955int
24956main (void)
24957{
24958return clock_gettime ();
24959  ;
24960  return 0;
24961}
24962_ACEOF
24963for ac_lib in '' rt
24964do
24965  if test -z "$ac_lib"; then
24966    ac_res="none required"
24967  else
24968    ac_res=-l$ac_lib
24969    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
24970  fi
24971  if ac_fn_c_try_link "$LINENO"
24972then :
24973  ac_cv_search_clock_gettime=$ac_res
24974fi
24975rm -f core conftest.err conftest.$ac_objext conftest.beam \
24976    conftest$ac_exeext
24977  if test ${ac_cv_search_clock_gettime+y}
24978then :
24979  break
24980fi
24981done
24982if test ${ac_cv_search_clock_gettime+y}
24983then :
24984
24985else $as_nop
24986  ac_cv_search_clock_gettime=no
24987fi
24988rm conftest.$ac_ext
24989LIBS=$ac_func_search_save_LIBS
24990fi
24991{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5
24992printf "%s\n" "$ac_cv_search_clock_gettime" >&6; }
24993ac_res=$ac_cv_search_clock_gettime
24994if test "$ac_res" != no
24995then :
24996  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
24997
24998fi
24999
25000			;;
25001			esac
25002		    fi
25003
25004fi
25005
25006done
25007	fi
25008fi
25009LIBOBJ_WITHOUT_CTIME="$LIBOBJS"
25010
25011ac_fn_c_check_func "$LINENO" "ctime_r" "ac_cv_func_ctime_r"
25012if test "x$ac_cv_func_ctime_r" = xyes
25013then :
25014  printf "%s\n" "#define HAVE_CTIME_R 1" >>confdefs.h
25015
25016else $as_nop
25017  case " $LIBOBJS " in
25018  *" ctime_r.$ac_objext "* ) ;;
25019  *) LIBOBJS="$LIBOBJS ctime_r.$ac_objext"
25020 ;;
25021esac
25022
25023fi
25024
25025ac_fn_c_check_func "$LINENO" "strsep" "ac_cv_func_strsep"
25026if test "x$ac_cv_func_strsep" = xyes
25027then :
25028  printf "%s\n" "#define HAVE_STRSEP 1" >>confdefs.h
25029
25030else $as_nop
25031  case " $LIBOBJS " in
25032  *" strsep.$ac_objext "* ) ;;
25033  *) LIBOBJS="$LIBOBJS strsep.$ac_objext"
25034 ;;
25035esac
25036
25037fi
25038
25039
25040# Check whether --enable-allsymbols was given.
25041if test ${enable_allsymbols+y}
25042then :
25043  enableval=$enable_allsymbols;
25044fi
25045
25046case "$enable_allsymbols" in
25047	yes)
25048	COMMON_OBJ_ALL_SYMBOLS=""
25049	UBSYMS=""
25050	EXTRALINK="libunbound.la"
25051
25052printf "%s\n" "#define EXPORT_ALL_SYMBOLS 1" >>confdefs.h
25053
25054	;;
25055	no|*)
25056	COMMON_OBJ_ALL_SYMBOLS='$(COMMON_OBJ)'
25057	UBSYMS='-export-symbols $(srcdir)/libunbound/ubsyms.def'
25058	EXTRALINK=""
25059	;;
25060esac
25061
25062
25063
25064if test x_$enable_lock_checks = x_yes; then
25065	UBSYMS="-export-symbols clubsyms.def"
25066	cp ${srcdir}/libunbound/ubsyms.def clubsyms.def
25067	echo lock_protect >> clubsyms.def
25068	echo lock_protect_place >> clubsyms.def
25069	echo lock_unprotect >> clubsyms.def
25070	echo lock_get_mem >> clubsyms.def
25071	echo checklock_start >> clubsyms.def
25072	echo checklock_stop >> clubsyms.def
25073	echo checklock_set_output_name >> clubsyms.def
25074	echo checklock_lock >> clubsyms.def
25075	echo checklock_unlock >> clubsyms.def
25076	echo checklock_init >> clubsyms.def
25077	echo checklock_thrcreate >> clubsyms.def
25078	echo checklock_thrjoin >> clubsyms.def
25079fi
25080
25081# check for dnstap if requested
25082
25083    # Check whether --enable-dnstap was given.
25084if test ${enable_dnstap+y}
25085then :
25086  enableval=$enable_dnstap; opt_dnstap=$enableval
25087else $as_nop
25088  opt_dnstap=no
25089fi
25090
25091
25092
25093# Check whether --with-dnstap-socket-path was given.
25094if test ${with_dnstap_socket_path+y}
25095then :
25096  withval=$with_dnstap_socket_path; opt_dnstap_socket_path=$withval
25097else $as_nop
25098  opt_dnstap_socket_path="$UNBOUND_RUN_DIR/dnstap.sock"
25099fi
25100
25101
25102    if test "x$opt_dnstap" != "xno"; then
25103	# Extract the first word of "protoc", so it can be a program name with args.
25104set dummy protoc; ac_word=$2
25105{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25106printf %s "checking for $ac_word... " >&6; }
25107if test ${ac_cv_path_PROTOC+y}
25108then :
25109  printf %s "(cached) " >&6
25110else $as_nop
25111  case $PROTOC in
25112  [\\/]* | ?:[\\/]*)
25113  ac_cv_path_PROTOC="$PROTOC" # Let the user override the test with a path.
25114  ;;
25115  *)
25116  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25117for as_dir in $PATH
25118do
25119  IFS=$as_save_IFS
25120  case $as_dir in #(((
25121    '') as_dir=./ ;;
25122    */) ;;
25123    *) as_dir=$as_dir/ ;;
25124  esac
25125    for ac_exec_ext in '' $ac_executable_extensions; do
25126  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
25127    ac_cv_path_PROTOC="$as_dir$ac_word$ac_exec_ext"
25128    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
25129    break 2
25130  fi
25131done
25132  done
25133IFS=$as_save_IFS
25134
25135  ;;
25136esac
25137fi
25138PROTOC=$ac_cv_path_PROTOC
25139if test -n "$PROTOC"; then
25140  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PROTOC" >&5
25141printf "%s\n" "$PROTOC" >&6; }
25142else
25143  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
25144printf "%s\n" "no" >&6; }
25145fi
25146
25147
25148	# 'protoc-c' is deprecated. We use 'protoc' instead. If it can not be
25149	# found, try 'protoc-c'.
25150	if test -z "$PROTOC"; then
25151	    # Extract the first word of "protoc-c", so it can be a program name with args.
25152set dummy protoc-c; ac_word=$2
25153{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25154printf %s "checking for $ac_word... " >&6; }
25155if test ${ac_cv_path_PROTOC_C+y}
25156then :
25157  printf %s "(cached) " >&6
25158else $as_nop
25159  case $PROTOC_C in
25160  [\\/]* | ?:[\\/]*)
25161  ac_cv_path_PROTOC_C="$PROTOC_C" # Let the user override the test with a path.
25162  ;;
25163  *)
25164  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25165for as_dir in $PATH
25166do
25167  IFS=$as_save_IFS
25168  case $as_dir in #(((
25169    '') as_dir=./ ;;
25170    */) ;;
25171    *) as_dir=$as_dir/ ;;
25172  esac
25173    for ac_exec_ext in '' $ac_executable_extensions; do
25174  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
25175    ac_cv_path_PROTOC_C="$as_dir$ac_word$ac_exec_ext"
25176    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
25177    break 2
25178  fi
25179done
25180  done
25181IFS=$as_save_IFS
25182
25183  ;;
25184esac
25185fi
25186PROTOC_C=$ac_cv_path_PROTOC_C
25187if test -n "$PROTOC_C"; then
25188  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PROTOC_C" >&5
25189printf "%s\n" "$PROTOC_C" >&6; }
25190else
25191  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
25192printf "%s\n" "no" >&6; }
25193fi
25194
25195
25196	else
25197	    PROTOC_C="$PROTOC"
25198	fi
25199	if test -z "$PROTOC_C"; then
25200	  as_fn_error $? "The protoc or protoc-c program was not found. It is needed for dnstap, use --disable-dnstap, or install protobuf-c to provide protoc or protoc-c" "$LINENO" 5
25201	fi
25202
25203	# Check for protoc-gen-c plugin
25204	# Extract the first word of "protoc-gen-c", so it can be a program name with args.
25205set dummy protoc-gen-c; ac_word=$2
25206{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25207printf %s "checking for $ac_word... " >&6; }
25208if test ${ac_cv_path_PROTOC_GEN_C+y}
25209then :
25210  printf %s "(cached) " >&6
25211else $as_nop
25212  case $PROTOC_GEN_C in
25213  [\\/]* | ?:[\\/]*)
25214  ac_cv_path_PROTOC_GEN_C="$PROTOC_GEN_C" # Let the user override the test with a path.
25215  ;;
25216  *)
25217  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25218for as_dir in $PATH
25219do
25220  IFS=$as_save_IFS
25221  case $as_dir in #(((
25222    '') as_dir=./ ;;
25223    */) ;;
25224    *) as_dir=$as_dir/ ;;
25225  esac
25226    for ac_exec_ext in '' $ac_executable_extensions; do
25227  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
25228    ac_cv_path_PROTOC_GEN_C="$as_dir$ac_word$ac_exec_ext"
25229    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
25230    break 2
25231  fi
25232done
25233  done
25234IFS=$as_save_IFS
25235
25236  ;;
25237esac
25238fi
25239PROTOC_GEN_C=$ac_cv_path_PROTOC_GEN_C
25240if test -n "$PROTOC_GEN_C"; then
25241  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PROTOC_GEN_C" >&5
25242printf "%s\n" "$PROTOC_GEN_C" >&6; }
25243else
25244  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
25245printf "%s\n" "no" >&6; }
25246fi
25247
25248
25249	if test -z "$PROTOC_GEN_C"; then
25250	  as_fn_error $? "The protoc-gen-c plugin was not found. It is needed for dnstap, use --disable-dnstap, or install protobuf-c-compiler to provide protoc-gen-c" "$LINENO" 5
25251	fi
25252
25253	# Test that protoc-gen-c actually works
25254	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if protoc-gen-c plugin works" >&5
25255printf %s "checking if protoc-gen-c plugin works... " >&6; }
25256	cat > conftest.proto << EOF
25257syntax = "proto2";
25258message TestMessage {
25259  optional string test_field = 1;
25260}
25261EOF
25262	if $PROTOC_C --c_out=. conftest.proto >/dev/null 2>&1; then
25263	  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
25264printf "%s\n" "yes" >&6; }
25265	  rm -f conftest.proto conftest.pb-c.c conftest.pb-c.h
25266	else
25267	  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
25268printf "%s\n" "no" >&6; }
25269	  rm -f conftest.proto conftest.pb-c.c conftest.pb-c.h
25270	  as_fn_error $? "The protoc-gen-c plugin is not working properly. Please ensure protobuf-c-compiler is properly installed" "$LINENO" 5
25271	fi
25272
25273
25274# Check whether --with-protobuf-c was given.
25275if test ${with_protobuf_c+y}
25276then :
25277  withval=$with_protobuf_c;
25278                # workaround for protobuf-c includes at old dir before protobuf-c-1.0.0
25279                if test -f $withval/include/google/protobuf-c/protobuf-c.h; then
25280                    CFLAGS="$CFLAGS -I$withval/include/google"
25281                else
25282                    CFLAGS="$CFLAGS -I$withval/include"
25283                fi
25284                LDFLAGS="$LDFLAGS -L$withval/lib"
25285
25286else $as_nop
25287
25288                if test -n "$PKG_CONFIG"; then
25289
25290pkg_failed=no
25291{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libprotobuf-c" >&5
25292printf %s "checking for libprotobuf-c... " >&6; }
25293
25294if test -n "$PROTOBUFC_CFLAGS"; then
25295    pkg_cv_PROTOBUFC_CFLAGS="$PROTOBUFC_CFLAGS"
25296 elif test -n "$PKG_CONFIG"; then
25297    if test -n "$PKG_CONFIG" && \
25298    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libprotobuf-c\""; } >&5
25299  ($PKG_CONFIG --exists --print-errors "libprotobuf-c") 2>&5
25300  ac_status=$?
25301  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
25302  test $ac_status = 0; }; then
25303  pkg_cv_PROTOBUFC_CFLAGS=`$PKG_CONFIG --cflags "libprotobuf-c" 2>/dev/null`
25304		      test "x$?" != "x0" && pkg_failed=yes
25305else
25306  pkg_failed=yes
25307fi
25308 else
25309    pkg_failed=untried
25310fi
25311if test -n "$PROTOBUFC_LIBS"; then
25312    pkg_cv_PROTOBUFC_LIBS="$PROTOBUFC_LIBS"
25313 elif test -n "$PKG_CONFIG"; then
25314    if test -n "$PKG_CONFIG" && \
25315    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libprotobuf-c\""; } >&5
25316  ($PKG_CONFIG --exists --print-errors "libprotobuf-c") 2>&5
25317  ac_status=$?
25318  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
25319  test $ac_status = 0; }; then
25320  pkg_cv_PROTOBUFC_LIBS=`$PKG_CONFIG --libs "libprotobuf-c" 2>/dev/null`
25321		      test "x$?" != "x0" && pkg_failed=yes
25322else
25323  pkg_failed=yes
25324fi
25325 else
25326    pkg_failed=untried
25327fi
25328
25329
25330
25331if test $pkg_failed = yes; then
25332        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
25333printf "%s\n" "no" >&6; }
25334
25335if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
25336        _pkg_short_errors_supported=yes
25337else
25338        _pkg_short_errors_supported=no
25339fi
25340        if test $_pkg_short_errors_supported = yes; then
25341                PROTOBUFC_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libprotobuf-c" 2>&1`
25342        else
25343                PROTOBUFC_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libprotobuf-c" 2>&1`
25344        fi
25345        # Put the nasty error message in config.log where it belongs
25346        echo "$PROTOBUFC_PKG_ERRORS" >&5
25347
25348
25349                            # pkg-config failed; try falling back to known values
25350                            # workaround for protobuf-c includes at old dir before protobuf-c-1.0.0
25351                            if test -f /usr/include/google/protobuf-c/protobuf-c.h; then
25352                                CFLAGS="$CFLAGS -I/usr/include/google"
25353                            else
25354                                if test -f /usr/local/include/google/protobuf-c/protobuf-c.h; then
25355                                    CFLAGS="$CFLAGS -I/usr/local/include/google"
25356                                    LDFLAGS="$LDFLAGS -L/usr/local/lib"
25357                                else
25358                                    as_fn_error $? "The protobuf-c package was not found with pkg-config. Please install protobuf-c!" "$LINENO" 5
25359                                fi
25360                            fi
25361
25362
25363elif test $pkg_failed = untried; then
25364        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
25365printf "%s\n" "no" >&6; }
25366
25367                            # pkg-config failed; try falling back to known values
25368                            # workaround for protobuf-c includes at old dir before protobuf-c-1.0.0
25369                            if test -f /usr/include/google/protobuf-c/protobuf-c.h; then
25370                                CFLAGS="$CFLAGS -I/usr/include/google"
25371                            else
25372                                if test -f /usr/local/include/google/protobuf-c/protobuf-c.h; then
25373                                    CFLAGS="$CFLAGS -I/usr/local/include/google"
25374                                    LDFLAGS="$LDFLAGS -L/usr/local/lib"
25375                                else
25376                                    as_fn_error $? "The protobuf-c package was not found with pkg-config. Please install protobuf-c!" "$LINENO" 5
25377                                fi
25378                            fi
25379
25380
25381else
25382        PROTOBUFC_CFLAGS=$pkg_cv_PROTOBUFC_CFLAGS
25383        PROTOBUFC_LIBS=$pkg_cv_PROTOBUFC_LIBS
25384        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
25385printf "%s\n" "yes" >&6; }
25386
25387                            CFLAGS="$CFLAGS $PROTOBUFC_CFLAGS"
25388                            LIBS="$LIBS $PROTOBUFC_LIBS"
25389
25390fi
25391                else
25392                    # workaround for protobuf-c includes at old dir before protobuf-c-1.0.0
25393                    if test -f /usr/include/google/protobuf-c/protobuf-c.h; then
25394                        CFLAGS="$CFLAGS -I/usr/include/google"
25395                    else
25396                        if test -f /usr/local/include/google/protobuf-c/protobuf-c.h; then
25397                            CFLAGS="$CFLAGS -I/usr/local/include/google"
25398                            LDFLAGS="$LDFLAGS -L/usr/local/lib"
25399                        fi
25400                    fi
25401                fi
25402
25403
25404fi
25405
25406        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing protobuf_c_message_pack" >&5
25407printf %s "checking for library containing protobuf_c_message_pack... " >&6; }
25408if test ${ac_cv_search_protobuf_c_message_pack+y}
25409then :
25410  printf %s "(cached) " >&6
25411else $as_nop
25412  ac_func_search_save_LIBS=$LIBS
25413cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25414/* end confdefs.h.  */
25415
25416/* Override any GCC internal prototype to avoid an error.
25417   Use char because int might match the return type of a GCC
25418   builtin and then its argument prototype would still apply.  */
25419char protobuf_c_message_pack ();
25420int
25421main (void)
25422{
25423return protobuf_c_message_pack ();
25424  ;
25425  return 0;
25426}
25427_ACEOF
25428for ac_lib in '' protobuf-c
25429do
25430  if test -z "$ac_lib"; then
25431    ac_res="none required"
25432  else
25433    ac_res=-l$ac_lib
25434    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
25435  fi
25436  if ac_fn_c_try_link "$LINENO"
25437then :
25438  ac_cv_search_protobuf_c_message_pack=$ac_res
25439fi
25440rm -f core conftest.err conftest.$ac_objext conftest.beam \
25441    conftest$ac_exeext
25442  if test ${ac_cv_search_protobuf_c_message_pack+y}
25443then :
25444  break
25445fi
25446done
25447if test ${ac_cv_search_protobuf_c_message_pack+y}
25448then :
25449
25450else $as_nop
25451  ac_cv_search_protobuf_c_message_pack=no
25452fi
25453rm conftest.$ac_ext
25454LIBS=$ac_func_search_save_LIBS
25455fi
25456{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_protobuf_c_message_pack" >&5
25457printf "%s\n" "$ac_cv_search_protobuf_c_message_pack" >&6; }
25458ac_res=$ac_cv_search_protobuf_c_message_pack
25459if test "$ac_res" != no
25460then :
25461  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
25462
25463else $as_nop
25464  as_fn_error $? "The protobuf-c library was not found. Please install the development libraries for protobuf-c!" "$LINENO" 5
25465fi
25466
25467
25468
25469printf "%s\n" "#define USE_DNSTAP 1" >>confdefs.h
25470
25471        ENABLE_DNSTAP=1
25472
25473
25474
25475        hdr_dnstap_socket_path="`echo $opt_dnstap_socket_path | sed -e 's/\\\\/\\\\\\\\/g'`"
25476
25477
25478printf "%s\n" "#define DNSTAP_SOCKET_PATH \"$hdr_dnstap_socket_path\"" >>confdefs.h
25479
25480	DNSTAP_SOCKET_PATH="$hdr_dnstap_socket_path"
25481
25482	DNSTAP_SOCKET_TESTBIN='unbound-dnstap-socket$(EXEEXT)'
25483
25484        DNSTAP_SRC="dnstap/dnstap.c dnstap/dnstap.pb-c.c dnstap/dnstap_fstrm.c dnstap/dtstream.c"
25485
25486        DNSTAP_OBJ="dnstap.lo dnstap.pb-c.lo dnstap_fstrm.lo dtstream.lo"
25487
25488
25489    else
25490
25491        ENABLE_DNSTAP=0
25492
25493
25494
25495    fi
25496
25497
25498# check for dnscrypt if requested
25499
25500  # Check whether --enable-dnscrypt was given.
25501if test ${enable_dnscrypt+y}
25502then :
25503  enableval=$enable_dnscrypt; opt_dnscrypt=$enableval
25504else $as_nop
25505  opt_dnscrypt=no
25506fi
25507
25508
25509  if test "x$opt_dnscrypt" != "xno"; then
25510
25511# Check whether --with-libsodium was given.
25512if test ${with_libsodium+y}
25513then :
25514  withval=$with_libsodium;
25515	CFLAGS="$CFLAGS -I$withval/include"
25516	LDFLAGS="$LDFLAGS -L$withval/lib"
25517
25518fi
25519
25520    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing sodium_init" >&5
25521printf %s "checking for library containing sodium_init... " >&6; }
25522if test ${ac_cv_search_sodium_init+y}
25523then :
25524  printf %s "(cached) " >&6
25525else $as_nop
25526  ac_func_search_save_LIBS=$LIBS
25527cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25528/* end confdefs.h.  */
25529
25530/* Override any GCC internal prototype to avoid an error.
25531   Use char because int might match the return type of a GCC
25532   builtin and then its argument prototype would still apply.  */
25533char sodium_init ();
25534int
25535main (void)
25536{
25537return sodium_init ();
25538  ;
25539  return 0;
25540}
25541_ACEOF
25542for ac_lib in '' sodium
25543do
25544  if test -z "$ac_lib"; then
25545    ac_res="none required"
25546  else
25547    ac_res=-l$ac_lib
25548    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
25549  fi
25550  if ac_fn_c_try_link "$LINENO"
25551then :
25552  ac_cv_search_sodium_init=$ac_res
25553fi
25554rm -f core conftest.err conftest.$ac_objext conftest.beam \
25555    conftest$ac_exeext
25556  if test ${ac_cv_search_sodium_init+y}
25557then :
25558  break
25559fi
25560done
25561if test ${ac_cv_search_sodium_init+y}
25562then :
25563
25564else $as_nop
25565  ac_cv_search_sodium_init=no
25566fi
25567rm conftest.$ac_ext
25568LIBS=$ac_func_search_save_LIBS
25569fi
25570{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sodium_init" >&5
25571printf "%s\n" "$ac_cv_search_sodium_init" >&6; }
25572ac_res=$ac_cv_search_sodium_init
25573if test "$ac_res" != no
25574then :
25575  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
25576
25577else $as_nop
25578  as_fn_error $? "The sodium library was not found. Please install sodium!" "$LINENO" 5
25579fi
25580
25581    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing crypto_box_curve25519xchacha20poly1305_beforenm" >&5
25582printf %s "checking for library containing crypto_box_curve25519xchacha20poly1305_beforenm... " >&6; }
25583if test ${ac_cv_search_crypto_box_curve25519xchacha20poly1305_beforenm+y}
25584then :
25585  printf %s "(cached) " >&6
25586else $as_nop
25587  ac_func_search_save_LIBS=$LIBS
25588cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25589/* end confdefs.h.  */
25590
25591/* Override any GCC internal prototype to avoid an error.
25592   Use char because int might match the return type of a GCC
25593   builtin and then its argument prototype would still apply.  */
25594char crypto_box_curve25519xchacha20poly1305_beforenm ();
25595int
25596main (void)
25597{
25598return crypto_box_curve25519xchacha20poly1305_beforenm ();
25599  ;
25600  return 0;
25601}
25602_ACEOF
25603for ac_lib in '' sodium
25604do
25605  if test -z "$ac_lib"; then
25606    ac_res="none required"
25607  else
25608    ac_res=-l$ac_lib
25609    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
25610  fi
25611  if ac_fn_c_try_link "$LINENO"
25612then :
25613  ac_cv_search_crypto_box_curve25519xchacha20poly1305_beforenm=$ac_res
25614fi
25615rm -f core conftest.err conftest.$ac_objext conftest.beam \
25616    conftest$ac_exeext
25617  if test ${ac_cv_search_crypto_box_curve25519xchacha20poly1305_beforenm+y}
25618then :
25619  break
25620fi
25621done
25622if test ${ac_cv_search_crypto_box_curve25519xchacha20poly1305_beforenm+y}
25623then :
25624
25625else $as_nop
25626  ac_cv_search_crypto_box_curve25519xchacha20poly1305_beforenm=no
25627fi
25628rm conftest.$ac_ext
25629LIBS=$ac_func_search_save_LIBS
25630fi
25631{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_crypto_box_curve25519xchacha20poly1305_beforenm" >&5
25632printf "%s\n" "$ac_cv_search_crypto_box_curve25519xchacha20poly1305_beforenm" >&6; }
25633ac_res=$ac_cv_search_crypto_box_curve25519xchacha20poly1305_beforenm
25634if test "$ac_res" != no
25635then :
25636  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
25637
25638            ENABLE_DNSCRYPT_XCHACHA20=1
25639
25640
25641printf "%s\n" "#define USE_DNSCRYPT_XCHACHA20 1" >>confdefs.h
25642
25643
25644else $as_nop
25645
25646            ENABLE_DNSCRYPT_XCHACHA20=0
25647
25648
25649fi
25650
25651    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing sodium_set_misuse_handler" >&5
25652printf %s "checking for library containing sodium_set_misuse_handler... " >&6; }
25653if test ${ac_cv_search_sodium_set_misuse_handler+y}
25654then :
25655  printf %s "(cached) " >&6
25656else $as_nop
25657  ac_func_search_save_LIBS=$LIBS
25658cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25659/* end confdefs.h.  */
25660
25661/* Override any GCC internal prototype to avoid an error.
25662   Use char because int might match the return type of a GCC
25663   builtin and then its argument prototype would still apply.  */
25664char sodium_set_misuse_handler ();
25665int
25666main (void)
25667{
25668return sodium_set_misuse_handler ();
25669  ;
25670  return 0;
25671}
25672_ACEOF
25673for ac_lib in '' sodium
25674do
25675  if test -z "$ac_lib"; then
25676    ac_res="none required"
25677  else
25678    ac_res=-l$ac_lib
25679    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
25680  fi
25681  if ac_fn_c_try_link "$LINENO"
25682then :
25683  ac_cv_search_sodium_set_misuse_handler=$ac_res
25684fi
25685rm -f core conftest.err conftest.$ac_objext conftest.beam \
25686    conftest$ac_exeext
25687  if test ${ac_cv_search_sodium_set_misuse_handler+y}
25688then :
25689  break
25690fi
25691done
25692if test ${ac_cv_search_sodium_set_misuse_handler+y}
25693then :
25694
25695else $as_nop
25696  ac_cv_search_sodium_set_misuse_handler=no
25697fi
25698rm conftest.$ac_ext
25699LIBS=$ac_func_search_save_LIBS
25700fi
25701{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sodium_set_misuse_handler" >&5
25702printf "%s\n" "$ac_cv_search_sodium_set_misuse_handler" >&6; }
25703ac_res=$ac_cv_search_sodium_set_misuse_handler
25704if test "$ac_res" != no
25705then :
25706  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
25707
25708
25709printf "%s\n" "#define SODIUM_MISUSE_HANDLER 1" >>confdefs.h
25710
25711
25712fi
25713
25714
25715
25716printf "%s\n" "#define USE_DNSCRYPT 1" >>confdefs.h
25717
25718        ENABLE_DNSCRYPT=1
25719
25720
25721        DNSCRYPT_SRC="dnscrypt/dnscrypt.c"
25722
25723        DNSCRYPT_OBJ="dnscrypt.lo"
25724
25725
25726  else
25727    ENABLE_DNSCRYPT_XCHACHA20=0
25728
25729
25730        ENABLE_DNSCRYPT=0
25731
25732
25733
25734  fi
25735
25736
25737# check for cachedb if requested
25738# Check whether --enable-cachedb was given.
25739if test ${enable_cachedb+y}
25740then :
25741  enableval=$enable_cachedb;
25742fi
25743
25744# turn on cachedb when hiredis support is enabled.
25745if test "$found_libhiredis" = "yes"; then enable_cachedb="yes"; fi
25746case "$enable_cachedb" in
25747    yes)
25748
25749printf "%s\n" "#define USE_CACHEDB 1" >>confdefs.h
25750
25751	CACHEDB_SRC="cachedb/cachedb.c cachedb/redis.c"
25752
25753	CACHEDB_OBJ="cachedb.lo redis.lo"
25754
25755    	;;
25756    no|*)
25757    	# nothing
25758    	;;
25759esac
25760
25761# check for ipsecmod if requested
25762# Check whether --enable-ipsecmod was given.
25763if test ${enable_ipsecmod+y}
25764then :
25765  enableval=$enable_ipsecmod;
25766fi
25767
25768case "$enable_ipsecmod" in
25769	yes)
25770
25771printf "%s\n" "#define USE_IPSECMOD 1" >>confdefs.h
25772
25773		IPSECMOD_OBJ="ipsecmod.lo ipsecmod-whitelist.lo"
25774
25775		IPSECMOD_HEADER='$(srcdir)/ipsecmod/ipsecmod.h $(srcdir)/ipsecmod/ipsecmod-whitelist.h'
25776
25777		;;
25778	no|*)
25779		# nothing
25780		;;
25781esac
25782
25783# check for ipset if requested
25784# Check whether --enable-ipset was given.
25785if test ${enable_ipset+y}
25786then :
25787  enableval=$enable_ipset;
25788fi
25789
25790case "$enable_ipset" in
25791    yes)
25792
25793printf "%s\n" "#define USE_IPSET 1" >>confdefs.h
25794
25795		IPSET_SRC="ipset/ipset.c"
25796
25797		IPSET_OBJ="ipset.lo"
25798
25799
25800		# BSD's pf
25801		       for ac_header in net/pfvar.h
25802do :
25803  ac_fn_c_check_header_compile "$LINENO" "net/pfvar.h" "ac_cv_header_net_pfvar_h" "
25804		  #include <netinet/in.h>
25805		  #include <net/if.h>
25806
25807"
25808if test "x$ac_cv_header_net_pfvar_h" = xyes
25809then :
25810  printf "%s\n" "#define HAVE_NET_PFVAR_H 1" >>confdefs.h
25811
25812else $as_nop
25813
25814		    # mnl
25815
25816# Check whether --with-libmnl was given.
25817if test ${with_libmnl+y}
25818then :
25819  withval=$with_libmnl;
25820else $as_nop
25821   withval="yes"
25822fi
25823
25824		    found_libmnl="no"
25825		    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libmnl" >&5
25826printf %s "checking for libmnl... " >&6; }
25827		    if test x_$withval = x_ -o x_$withval = x_yes; then
25828			withval="/usr/local /opt/local /usr/lib /usr/pkg /usr/sfw /usr"
25829		    fi
25830		    for dir in $withval ; do
25831			if test -f "$dir/include/libmnl/libmnl.h" -o -f "$dir/include/libmnl/libmnl/libmnl.h"; then
25832				found_libmnl="yes"
25833								extralibmnl=""
25834				if test -f "$dir/include/libmnl/libmnl/libmnl.h"; then
25835					extralibmnl="/libmnl"
25836				fi
25837				if test "$dir" != "/usr" -o -n "$extralibmnl"; then
25838					CPPFLAGS="$CPPFLAGS -I$dir/include$extralibmnl"
25839				fi
25840				if test "$dir" != "/usr"; then
25841					LDFLAGS="$LDFLAGS -L$dir/lib"
25842				fi
25843				{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: found in $dir" >&5
25844printf "%s\n" "found in $dir" >&6; }
25845				LIBS="$LIBS -lmnl"
25846				break;
25847			fi
25848		    done
25849		    if test x_$found_libmnl != x_yes; then
25850			  as_fn_error $? "Could not find libmnl, libmnl.h" "$LINENO" 5
25851		    fi
25852
25853fi
25854
25855done
25856		;;
25857    no|*)
25858    	# nothing
25859		;;
25860esac
25861# Check whether --enable-explicit-port-randomisation was given.
25862if test ${enable_explicit_port_randomisation+y}
25863then :
25864  enableval=$enable_explicit_port_randomisation;
25865fi
25866
25867case "$enable_explicit_port_randomisation" in
25868	no)
25869
25870printf "%s\n" "#define DISABLE_EXPLICIT_PORT_RANDOMISATION 1" >>confdefs.h
25871
25872		;;
25873	yes|*)
25874		;;
25875esac
25876
25877if echo "$host" | $GREP -i -e linux >/dev/null; then
25878	# Check whether --enable-linux-ip-local-port-range was given.
25879if test ${enable_linux_ip_local_port_range+y}
25880then :
25881  enableval=$enable_linux_ip_local_port_range;
25882fi
25883
25884	case "$enable_linux_ip_local_port_range" in
25885		yes)
25886
25887printf "%s\n" "#define USE_LINUX_IP_LOCAL_PORT_RANGE 1" >>confdefs.h
25888
25889			;;
25890		no|*)
25891			;;
25892	esac
25893fi
25894
25895
25896{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if ${MAKE:-make} supports $< with implicit rule in scope" >&5
25897printf %s "checking if ${MAKE:-make} supports $< with implicit rule in scope... " >&6; }
25898# on openBSD, the implicit rule make $< work.
25899# on Solaris, it does not work ($? is changed sources, $^ lists dependencies).
25900# gmake works.
25901cat >conftest.make <<EOF
25902all:	conftest.lo
25903
25904conftest.lo foo.lo bla.lo:
25905	if test -f "\$<"; then touch \$@; fi
25906
25907.SUFFIXES: .lo
25908.c.lo:
25909	if test -f "\$<"; then touch \$@; fi
25910
25911conftest.lo:        conftest.dir/conftest.c
25912EOF
25913mkdir conftest.dir
25914touch conftest.dir/conftest.c
25915rm -f conftest.lo conftest.c
25916${MAKE:-make} -f conftest.make >/dev/null
25917rm -f conftest.make conftest.c conftest.dir/conftest.c
25918rm -rf conftest.dir
25919if test ! -f conftest.lo; then
25920	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
25921printf "%s\n" "no" >&6; }
25922	SOURCEDETERMINE='echo "$^" | awk "-F " "{print \$$1;}" > .source'
25923	SOURCEFILE='`cat .source`'
25924else
25925	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
25926printf "%s\n" "yes" >&6; }
25927	SOURCEDETERMINE=':'
25928	SOURCEFILE='$<'
25929fi
25930rm -f conftest.lo
25931
25932
25933
25934# see if we want to build the library or everything
25935ALLTARGET="alltargets"
25936INSTALLTARGET="install-all"
25937
25938# Check whether --with-libunbound-only was given.
25939if test ${with_libunbound_only+y}
25940then :
25941  withval=$with_libunbound_only;
25942	if test "$withval" = "yes"; then
25943		ALLTARGET="lib"
25944		INSTALLTARGET="install-lib"
25945	fi
25946
25947fi
25948
25949if test $ALLTARGET = "alltargets"; then
25950	if test $USE_NSS = "yes"; then
25951		as_fn_error $? "--with-nss can only be used in combination with --with-libunbound-only." "$LINENO" 5
25952	fi
25953	if test $USE_NETTLE = "yes"; then
25954		as_fn_error $? "--with-nettle can only be used in combination with --with-libunbound-only." "$LINENO" 5
25955	fi
25956fi
25957
25958
25959
25960
25961
25962  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Stripping extension flags..." >&5
25963printf "%s\n" "$as_me: Stripping extension flags..." >&6;}
25964
25965  if echo $CFLAGS | grep " -D_GNU_SOURCE" >/dev/null 2>&1; then
25966    CFLAGS="`echo $CFLAGS | sed -e 's/ -D_GNU_SOURCE//g'`"
25967
25968printf "%s\n" "#define OMITTED__D_GNU_SOURCE 1" >>confdefs.h
25969
25970  fi
25971
25972
25973  if echo $CFLAGS | grep " -D_BSD_SOURCE" >/dev/null 2>&1; then
25974    CFLAGS="`echo $CFLAGS | sed -e 's/ -D_BSD_SOURCE//g'`"
25975
25976printf "%s\n" "#define OMITTED__D_BSD_SOURCE 1" >>confdefs.h
25977
25978  fi
25979
25980
25981  if echo $CFLAGS | grep " -D_DEFAULT_SOURCE" >/dev/null 2>&1; then
25982    CFLAGS="`echo $CFLAGS | sed -e 's/ -D_DEFAULT_SOURCE//g'`"
25983
25984printf "%s\n" "#define OMITTED__D_DEFAULT_SOURCE 1" >>confdefs.h
25985
25986  fi
25987
25988
25989  if echo $CFLAGS | grep " -D__EXTENSIONS__" >/dev/null 2>&1; then
25990    CFLAGS="`echo $CFLAGS | sed -e 's/ -D__EXTENSIONS__//g'`"
25991
25992printf "%s\n" "#define OMITTED__D__EXTENSIONS__ 1" >>confdefs.h
25993
25994  fi
25995
25996
25997  if echo $CFLAGS | grep " -D_POSIX_C_SOURCE=200112" >/dev/null 2>&1; then
25998    CFLAGS="`echo $CFLAGS | sed -e 's/ -D_POSIX_C_SOURCE=200112//g'`"
25999
26000printf "%s\n" "#define OMITTED__D_POSIX_C_SOURCE_200112 1" >>confdefs.h
26001
26002  fi
26003
26004
26005  if echo $CFLAGS | grep " -D_XOPEN_SOURCE=600" >/dev/null 2>&1; then
26006    CFLAGS="`echo $CFLAGS | sed -e 's/ -D_XOPEN_SOURCE=600//g'`"
26007
26008printf "%s\n" "#define OMITTED__D_XOPEN_SOURCE_600 1" >>confdefs.h
26009
26010  fi
26011
26012
26013  if echo $CFLAGS | grep " -D_XOPEN_SOURCE_EXTENDED=1" >/dev/null 2>&1; then
26014    CFLAGS="`echo $CFLAGS | sed -e 's/ -D_XOPEN_SOURCE_EXTENDED=1//g'`"
26015
26016printf "%s\n" "#define OMITTED__D_XOPEN_SOURCE_EXTENDED_1 1" >>confdefs.h
26017
26018  fi
26019
26020
26021  if echo $CFLAGS | grep " -D_ALL_SOURCE" >/dev/null 2>&1; then
26022    CFLAGS="`echo $CFLAGS | sed -e 's/ -D_ALL_SOURCE//g'`"
26023
26024printf "%s\n" "#define OMITTED__D_ALL_SOURCE 1" >>confdefs.h
26025
26026  fi
26027
26028
26029  if echo $CFLAGS | grep " -D_LARGEFILE_SOURCE=1" >/dev/null 2>&1; then
26030    CFLAGS="`echo $CFLAGS | sed -e 's/ -D_LARGEFILE_SOURCE=1//g'`"
26031
26032printf "%s\n" "#define OMITTED__D_LARGEFILE_SOURCE_1 1" >>confdefs.h
26033
26034  fi
26035
26036
26037if test -n "$LATE_LDFLAGS"; then
26038  LDFLAGS="$LATE_LDFLAGS $LDFLAGS"
26039fi
26040# remove start spaces
26041LDFLAGS=`echo "$LDFLAGS"|sed -e 's/^ *//'`
26042LIBS=`echo "$LIBS"|sed -e 's/^ *//'`
26043
26044
26045printf "%s\n" "#define MAXSYSLOGMSGLEN 10240" >>confdefs.h
26046
26047
26048
26049
26050version=1.24.1
26051
26052{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for build time" >&5
26053printf %s "checking for build time... " >&6; }
26054ax_date_fmt="%b %e, %Y"
26055if test x"$SOURCE_DATE_EPOCH" = x
26056then :
26057  date=`date "+$ax_date_fmt"`
26058else $as_nop
26059  ax_build_date=`date -u -d "@$SOURCE_DATE_EPOCH" "+$ax_date_fmt" 2>/dev/null \
26060                 || date -u -r "$SOURCE_DATE_EPOCH" "+$ax_date_fmt" 2>/dev/null`
26061  if test x"$ax_build_date" = x
26062then :
26063  as_fn_error $? "malformed SOURCE_DATE_EPOCH" "$LINENO" 5
26064else $as_nop
26065  date=$ax_build_date
26066fi
26067fi
26068{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $date" >&5
26069printf "%s\n" "$date" >&6; }
26070
26071
26072
26073ac_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"
26074
26075ac_config_headers="$ac_config_headers config.h"
26076
26077cat >confcache <<\_ACEOF
26078# This file is a shell script that caches the results of configure
26079# tests run on this system so they can be shared between configure
26080# scripts and configure runs, see configure's option --config-cache.
26081# It is not useful on other systems.  If it contains results you don't
26082# want to keep, you may remove or edit it.
26083#
26084# config.status only pays attention to the cache file if you give it
26085# the --recheck option to rerun configure.
26086#
26087# `ac_cv_env_foo' variables (set or unset) will be overridden when
26088# loading this file, other *unset* `ac_cv_foo' will be assigned the
26089# following values.
26090
26091_ACEOF
26092
26093# The following way of writing the cache mishandles newlines in values,
26094# but we know of no workaround that is simple, portable, and efficient.
26095# So, we kill variables containing newlines.
26096# Ultrix sh set writes to stderr and can't be redirected directly,
26097# and sets the high bit in the cache file unless we assign to the vars.
26098(
26099  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
26100    eval ac_val=\$$ac_var
26101    case $ac_val in #(
26102    *${as_nl}*)
26103      case $ac_var in #(
26104      *_cv_*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
26105printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
26106      esac
26107      case $ac_var in #(
26108      _ | IFS | as_nl) ;; #(
26109      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
26110      *) { eval $ac_var=; unset $ac_var;} ;;
26111      esac ;;
26112    esac
26113  done
26114
26115  (set) 2>&1 |
26116    case $as_nl`(ac_space=' '; set) 2>&1` in #(
26117    *${as_nl}ac_space=\ *)
26118      # `set' does not quote correctly, so add quotes: double-quote
26119      # substitution turns \\\\ into \\, and sed turns \\ into \.
26120      sed -n \
26121	"s/'/'\\\\''/g;
26122	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
26123      ;; #(
26124    *)
26125      # `set' quotes correctly as required by POSIX, so do not add quotes.
26126      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
26127      ;;
26128    esac |
26129    sort
26130) |
26131  sed '
26132     /^ac_cv_env_/b end
26133     t clear
26134     :clear
26135     s/^\([^=]*\)=\(.*[{}].*\)$/test ${\1+y} || &/
26136     t end
26137     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
26138     :end' >>confcache
26139if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
26140  if test -w "$cache_file"; then
26141    if test "x$cache_file" != "x/dev/null"; then
26142      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
26143printf "%s\n" "$as_me: updating cache $cache_file" >&6;}
26144      if test ! -f "$cache_file" || test -h "$cache_file"; then
26145	cat confcache >"$cache_file"
26146      else
26147        case $cache_file in #(
26148        */* | ?:*)
26149	  mv -f confcache "$cache_file"$$ &&
26150	  mv -f "$cache_file"$$ "$cache_file" ;; #(
26151        *)
26152	  mv -f confcache "$cache_file" ;;
26153	esac
26154      fi
26155    fi
26156  else
26157    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
26158printf "%s\n" "$as_me: not updating unwritable cache $cache_file" >&6;}
26159  fi
26160fi
26161rm -f confcache
26162
26163test "x$prefix" = xNONE && prefix=$ac_default_prefix
26164# Let make expand exec_prefix.
26165test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
26166
26167DEFS=-DHAVE_CONFIG_H
26168
26169ac_libobjs=
26170ac_ltlibobjs=
26171U=
26172for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
26173  # 1. Remove the extension, and $U if already installed.
26174  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
26175  ac_i=`printf "%s\n" "$ac_i" | sed "$ac_script"`
26176  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
26177  #    will be set to the directory where LIBOBJS objects are built.
26178  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
26179  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
26180done
26181LIBOBJS=$ac_libobjs
26182
26183LTLIBOBJS=$ac_ltlibobjs
26184
26185
26186if test -z "${USE_SYSTEMD_TRUE}" && test -z "${USE_SYSTEMD_FALSE}"; then
26187  as_fn_error $? "conditional \"USE_SYSTEMD\" was never defined.
26188Usually this means the macro was only invoked conditionally." "$LINENO" 5
26189fi
26190
26191: "${CONFIG_STATUS=./config.status}"
26192ac_write_fail=0
26193ac_clean_files_save=$ac_clean_files
26194ac_clean_files="$ac_clean_files $CONFIG_STATUS"
26195{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
26196printf "%s\n" "$as_me: creating $CONFIG_STATUS" >&6;}
26197as_write_fail=0
26198cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
26199#! $SHELL
26200# Generated by $as_me.
26201# Run this file to recreate the current configuration.
26202# Compiler output produced by configure, useful for debugging
26203# configure, is in config.log if it exists.
26204
26205debug=false
26206ac_cs_recheck=false
26207ac_cs_silent=false
26208
26209SHELL=\${CONFIG_SHELL-$SHELL}
26210export SHELL
26211_ASEOF
26212cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
26213## -------------------- ##
26214## M4sh Initialization. ##
26215## -------------------- ##
26216
26217# Be more Bourne compatible
26218DUALCASE=1; export DUALCASE # for MKS sh
26219as_nop=:
26220if test ${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1
26221then :
26222  emulate sh
26223  NULLCMD=:
26224  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
26225  # is contrary to our usage.  Disable this feature.
26226  alias -g '${1+"$@"}'='"$@"'
26227  setopt NO_GLOB_SUBST
26228else $as_nop
26229  case `(set -o) 2>/dev/null` in #(
26230  *posix*) :
26231    set -o posix ;; #(
26232  *) :
26233     ;;
26234esac
26235fi
26236
26237
26238
26239# Reset variables that may have inherited troublesome values from
26240# the environment.
26241
26242# IFS needs to be set, to space, tab, and newline, in precisely that order.
26243# (If _AS_PATH_WALK were called with IFS unset, it would have the
26244# side effect of setting IFS to empty, thus disabling word splitting.)
26245# Quoting is to prevent editors from complaining about space-tab.
26246as_nl='
26247'
26248export as_nl
26249IFS=" ""	$as_nl"
26250
26251PS1='$ '
26252PS2='> '
26253PS4='+ '
26254
26255# Ensure predictable behavior from utilities with locale-dependent output.
26256LC_ALL=C
26257export LC_ALL
26258LANGUAGE=C
26259export LANGUAGE
26260
26261# We cannot yet rely on "unset" to work, but we need these variables
26262# to be unset--not just set to an empty or harmless value--now, to
26263# avoid bugs in old shells (e.g. pre-3.0 UWIN ksh).  This construct
26264# also avoids known problems related to "unset" and subshell syntax
26265# in other old shells (e.g. bash 2.01 and pdksh 5.2.14).
26266for as_var in BASH_ENV ENV MAIL MAILPATH CDPATH
26267do eval test \${$as_var+y} \
26268  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
26269done
26270
26271# Ensure that fds 0, 1, and 2 are open.
26272if (exec 3>&0) 2>/dev/null; then :; else exec 0</dev/null; fi
26273if (exec 3>&1) 2>/dev/null; then :; else exec 1>/dev/null; fi
26274if (exec 3>&2)            ; then :; else exec 2>/dev/null; fi
26275
26276# The user is always right.
26277if ${PATH_SEPARATOR+false} :; then
26278  PATH_SEPARATOR=:
26279  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
26280    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
26281      PATH_SEPARATOR=';'
26282  }
26283fi
26284
26285
26286# Find who we are.  Look in the path if we contain no directory separator.
26287as_myself=
26288case $0 in #((
26289  *[\\/]* ) as_myself=$0 ;;
26290  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26291for as_dir in $PATH
26292do
26293  IFS=$as_save_IFS
26294  case $as_dir in #(((
26295    '') as_dir=./ ;;
26296    */) ;;
26297    *) as_dir=$as_dir/ ;;
26298  esac
26299    test -r "$as_dir$0" && as_myself=$as_dir$0 && break
26300  done
26301IFS=$as_save_IFS
26302
26303     ;;
26304esac
26305# We did not find ourselves, most probably we were run as `sh COMMAND'
26306# in which case we are not to be found in the path.
26307if test "x$as_myself" = x; then
26308  as_myself=$0
26309fi
26310if test ! -f "$as_myself"; then
26311  printf "%s\n" "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
26312  exit 1
26313fi
26314
26315
26316
26317# as_fn_error STATUS ERROR [LINENO LOG_FD]
26318# ----------------------------------------
26319# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
26320# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
26321# script with STATUS, using 1 if that was 0.
26322as_fn_error ()
26323{
26324  as_status=$1; test $as_status -eq 0 && as_status=1
26325  if test "$4"; then
26326    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
26327    printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
26328  fi
26329  printf "%s\n" "$as_me: error: $2" >&2
26330  as_fn_exit $as_status
26331} # as_fn_error
26332
26333
26334
26335# as_fn_set_status STATUS
26336# -----------------------
26337# Set $? to STATUS, without forking.
26338as_fn_set_status ()
26339{
26340  return $1
26341} # as_fn_set_status
26342
26343# as_fn_exit STATUS
26344# -----------------
26345# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
26346as_fn_exit ()
26347{
26348  set +e
26349  as_fn_set_status $1
26350  exit $1
26351} # as_fn_exit
26352
26353# as_fn_unset VAR
26354# ---------------
26355# Portably unset VAR.
26356as_fn_unset ()
26357{
26358  { eval $1=; unset $1;}
26359}
26360as_unset=as_fn_unset
26361
26362# as_fn_append VAR VALUE
26363# ----------------------
26364# Append the text in VALUE to the end of the definition contained in VAR. Take
26365# advantage of any shell optimizations that allow amortized linear growth over
26366# repeated appends, instead of the typical quadratic growth present in naive
26367# implementations.
26368if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null
26369then :
26370  eval 'as_fn_append ()
26371  {
26372    eval $1+=\$2
26373  }'
26374else $as_nop
26375  as_fn_append ()
26376  {
26377    eval $1=\$$1\$2
26378  }
26379fi # as_fn_append
26380
26381# as_fn_arith ARG...
26382# ------------------
26383# Perform arithmetic evaluation on the ARGs, and store the result in the
26384# global $as_val. Take advantage of shells that can avoid forks. The arguments
26385# must be portable across $(()) and expr.
26386if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null
26387then :
26388  eval 'as_fn_arith ()
26389  {
26390    as_val=$(( $* ))
26391  }'
26392else $as_nop
26393  as_fn_arith ()
26394  {
26395    as_val=`expr "$@" || test $? -eq 1`
26396  }
26397fi # as_fn_arith
26398
26399
26400if expr a : '\(a\)' >/dev/null 2>&1 &&
26401   test "X`expr 00001 : '.*\(...\)'`" = X001; then
26402  as_expr=expr
26403else
26404  as_expr=false
26405fi
26406
26407if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
26408  as_basename=basename
26409else
26410  as_basename=false
26411fi
26412
26413if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
26414  as_dirname=dirname
26415else
26416  as_dirname=false
26417fi
26418
26419as_me=`$as_basename -- "$0" ||
26420$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
26421	 X"$0" : 'X\(//\)$' \| \
26422	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
26423printf "%s\n" X/"$0" |
26424    sed '/^.*\/\([^/][^/]*\)\/*$/{
26425	    s//\1/
26426	    q
26427	  }
26428	  /^X\/\(\/\/\)$/{
26429	    s//\1/
26430	    q
26431	  }
26432	  /^X\/\(\/\).*/{
26433	    s//\1/
26434	    q
26435	  }
26436	  s/.*/./; q'`
26437
26438# Avoid depending upon Character Ranges.
26439as_cr_letters='abcdefghijklmnopqrstuvwxyz'
26440as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
26441as_cr_Letters=$as_cr_letters$as_cr_LETTERS
26442as_cr_digits='0123456789'
26443as_cr_alnum=$as_cr_Letters$as_cr_digits
26444
26445
26446# Determine whether it's possible to make 'echo' print without a newline.
26447# These variables are no longer used directly by Autoconf, but are AC_SUBSTed
26448# for compatibility with existing Makefiles.
26449ECHO_C= ECHO_N= ECHO_T=
26450case `echo -n x` in #(((((
26451-n*)
26452  case `echo 'xy\c'` in
26453  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
26454  xy)  ECHO_C='\c';;
26455  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
26456       ECHO_T='	';;
26457  esac;;
26458*)
26459  ECHO_N='-n';;
26460esac
26461
26462# For backward compatibility with old third-party macros, we provide
26463# the shell variables $as_echo and $as_echo_n.  New code should use
26464# AS_ECHO(["message"]) and AS_ECHO_N(["message"]), respectively.
26465as_echo='printf %s\n'
26466as_echo_n='printf %s'
26467
26468rm -f conf$$ conf$$.exe conf$$.file
26469if test -d conf$$.dir; then
26470  rm -f conf$$.dir/conf$$.file
26471else
26472  rm -f conf$$.dir
26473  mkdir conf$$.dir 2>/dev/null
26474fi
26475if (echo >conf$$.file) 2>/dev/null; then
26476  if ln -s conf$$.file conf$$ 2>/dev/null; then
26477    as_ln_s='ln -s'
26478    # ... but there are two gotchas:
26479    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
26480    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
26481    # In both cases, we have to default to `cp -pR'.
26482    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
26483      as_ln_s='cp -pR'
26484  elif ln conf$$.file conf$$ 2>/dev/null; then
26485    as_ln_s=ln
26486  else
26487    as_ln_s='cp -pR'
26488  fi
26489else
26490  as_ln_s='cp -pR'
26491fi
26492rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
26493rmdir conf$$.dir 2>/dev/null
26494
26495
26496# as_fn_mkdir_p
26497# -------------
26498# Create "$as_dir" as a directory, including parents if necessary.
26499as_fn_mkdir_p ()
26500{
26501
26502  case $as_dir in #(
26503  -*) as_dir=./$as_dir;;
26504  esac
26505  test -d "$as_dir" || eval $as_mkdir_p || {
26506    as_dirs=
26507    while :; do
26508      case $as_dir in #(
26509      *\'*) as_qdir=`printf "%s\n" "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
26510      *) as_qdir=$as_dir;;
26511      esac
26512      as_dirs="'$as_qdir' $as_dirs"
26513      as_dir=`$as_dirname -- "$as_dir" ||
26514$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
26515	 X"$as_dir" : 'X\(//\)[^/]' \| \
26516	 X"$as_dir" : 'X\(//\)$' \| \
26517	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
26518printf "%s\n" X"$as_dir" |
26519    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
26520	    s//\1/
26521	    q
26522	  }
26523	  /^X\(\/\/\)[^/].*/{
26524	    s//\1/
26525	    q
26526	  }
26527	  /^X\(\/\/\)$/{
26528	    s//\1/
26529	    q
26530	  }
26531	  /^X\(\/\).*/{
26532	    s//\1/
26533	    q
26534	  }
26535	  s/.*/./; q'`
26536      test -d "$as_dir" && break
26537    done
26538    test -z "$as_dirs" || eval "mkdir $as_dirs"
26539  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
26540
26541
26542} # as_fn_mkdir_p
26543if mkdir -p . 2>/dev/null; then
26544  as_mkdir_p='mkdir -p "$as_dir"'
26545else
26546  test -d ./-p && rmdir ./-p
26547  as_mkdir_p=false
26548fi
26549
26550
26551# as_fn_executable_p FILE
26552# -----------------------
26553# Test if FILE is an executable regular file.
26554as_fn_executable_p ()
26555{
26556  test -f "$1" && test -x "$1"
26557} # as_fn_executable_p
26558as_test_x='test -x'
26559as_executable_p=as_fn_executable_p
26560
26561# Sed expression to map a string onto a valid CPP name.
26562as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
26563
26564# Sed expression to map a string onto a valid variable name.
26565as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
26566
26567
26568exec 6>&1
26569## ----------------------------------- ##
26570## Main body of $CONFIG_STATUS script. ##
26571## ----------------------------------- ##
26572_ASEOF
26573test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
26574
26575cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
26576# Save the log message, to keep $0 and so on meaningful, and to
26577# report actual input values of CONFIG_FILES etc. instead of their
26578# values after options handling.
26579ac_log="
26580This file was extended by unbound $as_me 1.24.1, which was
26581generated by GNU Autoconf 2.71.  Invocation command line was
26582
26583  CONFIG_FILES    = $CONFIG_FILES
26584  CONFIG_HEADERS  = $CONFIG_HEADERS
26585  CONFIG_LINKS    = $CONFIG_LINKS
26586  CONFIG_COMMANDS = $CONFIG_COMMANDS
26587  $ $0 $@
26588
26589on `(hostname || uname -n) 2>/dev/null | sed 1q`
26590"
26591
26592_ACEOF
26593
26594case $ac_config_files in *"
26595"*) set x $ac_config_files; shift; ac_config_files=$*;;
26596esac
26597
26598case $ac_config_headers in *"
26599"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
26600esac
26601
26602
26603cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
26604# Files that config.status was made for.
26605config_files="$ac_config_files"
26606config_headers="$ac_config_headers"
26607config_commands="$ac_config_commands"
26608
26609_ACEOF
26610
26611cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
26612ac_cs_usage="\
26613\`$as_me' instantiates files and other configuration actions
26614from templates according to the current configuration.  Unless the files
26615and actions are specified as TAGs, all are instantiated by default.
26616
26617Usage: $0 [OPTION]... [TAG]...
26618
26619  -h, --help       print this help, then exit
26620  -V, --version    print version number and configuration settings, then exit
26621      --config     print configuration, then exit
26622  -q, --quiet, --silent
26623                   do not print progress messages
26624  -d, --debug      don't remove temporary files
26625      --recheck    update $as_me by reconfiguring in the same conditions
26626      --file=FILE[:TEMPLATE]
26627                   instantiate the configuration file FILE
26628      --header=FILE[:TEMPLATE]
26629                   instantiate the configuration header FILE
26630
26631Configuration files:
26632$config_files
26633
26634Configuration headers:
26635$config_headers
26636
26637Configuration commands:
26638$config_commands
26639
26640Report bugs to <unbound-bugs@nlnetlabs.nl or https://github.com/NLnetLabs/unbound/issues>."
26641
26642_ACEOF
26643ac_cs_config=`printf "%s\n" "$ac_configure_args" | sed "$ac_safe_unquote"`
26644ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\''/g"`
26645cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
26646ac_cs_config='$ac_cs_config_escaped'
26647ac_cs_version="\\
26648unbound config.status 1.24.1
26649configured by $0, generated by GNU Autoconf 2.71,
26650  with options \\"\$ac_cs_config\\"
26651
26652Copyright (C) 2021 Free Software Foundation, Inc.
26653This config.status script is free software; the Free Software Foundation
26654gives unlimited permission to copy, distribute and modify it."
26655
26656ac_pwd='$ac_pwd'
26657srcdir='$srcdir'
26658AWK='$AWK'
26659test -n "\$AWK" || AWK=awk
26660_ACEOF
26661
26662cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
26663# The default lists apply if the user does not specify any file.
26664ac_need_defaults=:
26665while test $# != 0
26666do
26667  case $1 in
26668  --*=?*)
26669    ac_option=`expr "X$1" : 'X\([^=]*\)='`
26670    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
26671    ac_shift=:
26672    ;;
26673  --*=)
26674    ac_option=`expr "X$1" : 'X\([^=]*\)='`
26675    ac_optarg=
26676    ac_shift=:
26677    ;;
26678  *)
26679    ac_option=$1
26680    ac_optarg=$2
26681    ac_shift=shift
26682    ;;
26683  esac
26684
26685  case $ac_option in
26686  # Handling of the options.
26687  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
26688    ac_cs_recheck=: ;;
26689  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
26690    printf "%s\n" "$ac_cs_version"; exit ;;
26691  --config | --confi | --conf | --con | --co | --c )
26692    printf "%s\n" "$ac_cs_config"; exit ;;
26693  --debug | --debu | --deb | --de | --d | -d )
26694    debug=: ;;
26695  --file | --fil | --fi | --f )
26696    $ac_shift
26697    case $ac_optarg in
26698    *\'*) ac_optarg=`printf "%s\n" "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
26699    '') as_fn_error $? "missing file argument" ;;
26700    esac
26701    as_fn_append CONFIG_FILES " '$ac_optarg'"
26702    ac_need_defaults=false;;
26703  --header | --heade | --head | --hea )
26704    $ac_shift
26705    case $ac_optarg in
26706    *\'*) ac_optarg=`printf "%s\n" "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
26707    esac
26708    as_fn_append CONFIG_HEADERS " '$ac_optarg'"
26709    ac_need_defaults=false;;
26710  --he | --h)
26711    # Conflict between --help and --header
26712    as_fn_error $? "ambiguous option: \`$1'
26713Try \`$0 --help' for more information.";;
26714  --help | --hel | -h )
26715    printf "%s\n" "$ac_cs_usage"; exit ;;
26716  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
26717  | -silent | --silent | --silen | --sile | --sil | --si | --s)
26718    ac_cs_silent=: ;;
26719
26720  # This is an error.
26721  -*) as_fn_error $? "unrecognized option: \`$1'
26722Try \`$0 --help' for more information." ;;
26723
26724  *) as_fn_append ac_config_targets " $1"
26725     ac_need_defaults=false ;;
26726
26727  esac
26728  shift
26729done
26730
26731ac_configure_extra_args=
26732
26733if $ac_cs_silent; then
26734  exec 6>/dev/null
26735  ac_configure_extra_args="$ac_configure_extra_args --silent"
26736fi
26737
26738_ACEOF
26739cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
26740if \$ac_cs_recheck; then
26741  set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
26742  shift
26743  \printf "%s\n" "running CONFIG_SHELL=$SHELL \$*" >&6
26744  CONFIG_SHELL='$SHELL'
26745  export CONFIG_SHELL
26746  exec "\$@"
26747fi
26748
26749_ACEOF
26750cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
26751exec 5>>config.log
26752{
26753  echo
26754  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
26755## Running $as_me. ##
26756_ASBOX
26757  printf "%s\n" "$ac_log"
26758} >&5
26759
26760_ACEOF
26761cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
26762#
26763# INIT-COMMANDS
26764#
26765
26766
26767# The HP-UX ksh and POSIX shell print the target directory to stdout
26768# if CDPATH is set.
26769(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
26770
26771sed_quote_subst='$sed_quote_subst'
26772double_quote_subst='$double_quote_subst'
26773delay_variable_subst='$delay_variable_subst'
26774macro_version='`$ECHO "$macro_version" | $SED "$delay_single_quote_subst"`'
26775macro_revision='`$ECHO "$macro_revision" | $SED "$delay_single_quote_subst"`'
26776enable_shared='`$ECHO "$enable_shared" | $SED "$delay_single_quote_subst"`'
26777enable_static='`$ECHO "$enable_static" | $SED "$delay_single_quote_subst"`'
26778pic_mode='`$ECHO "$pic_mode" | $SED "$delay_single_quote_subst"`'
26779enable_fast_install='`$ECHO "$enable_fast_install" | $SED "$delay_single_quote_subst"`'
26780shared_archive_member_spec='`$ECHO "$shared_archive_member_spec" | $SED "$delay_single_quote_subst"`'
26781SHELL='`$ECHO "$SHELL" | $SED "$delay_single_quote_subst"`'
26782ECHO='`$ECHO "$ECHO" | $SED "$delay_single_quote_subst"`'
26783PATH_SEPARATOR='`$ECHO "$PATH_SEPARATOR" | $SED "$delay_single_quote_subst"`'
26784host_alias='`$ECHO "$host_alias" | $SED "$delay_single_quote_subst"`'
26785host='`$ECHO "$host" | $SED "$delay_single_quote_subst"`'
26786host_os='`$ECHO "$host_os" | $SED "$delay_single_quote_subst"`'
26787build_alias='`$ECHO "$build_alias" | $SED "$delay_single_quote_subst"`'
26788build='`$ECHO "$build" | $SED "$delay_single_quote_subst"`'
26789build_os='`$ECHO "$build_os" | $SED "$delay_single_quote_subst"`'
26790SED='`$ECHO "$SED" | $SED "$delay_single_quote_subst"`'
26791Xsed='`$ECHO "$Xsed" | $SED "$delay_single_quote_subst"`'
26792GREP='`$ECHO "$GREP" | $SED "$delay_single_quote_subst"`'
26793EGREP='`$ECHO "$EGREP" | $SED "$delay_single_quote_subst"`'
26794FGREP='`$ECHO "$FGREP" | $SED "$delay_single_quote_subst"`'
26795LD='`$ECHO "$LD" | $SED "$delay_single_quote_subst"`'
26796NM='`$ECHO "$NM" | $SED "$delay_single_quote_subst"`'
26797LN_S='`$ECHO "$LN_S" | $SED "$delay_single_quote_subst"`'
26798max_cmd_len='`$ECHO "$max_cmd_len" | $SED "$delay_single_quote_subst"`'
26799ac_objext='`$ECHO "$ac_objext" | $SED "$delay_single_quote_subst"`'
26800exeext='`$ECHO "$exeext" | $SED "$delay_single_quote_subst"`'
26801lt_unset='`$ECHO "$lt_unset" | $SED "$delay_single_quote_subst"`'
26802lt_SP2NL='`$ECHO "$lt_SP2NL" | $SED "$delay_single_quote_subst"`'
26803lt_NL2SP='`$ECHO "$lt_NL2SP" | $SED "$delay_single_quote_subst"`'
26804lt_cv_to_host_file_cmd='`$ECHO "$lt_cv_to_host_file_cmd" | $SED "$delay_single_quote_subst"`'
26805lt_cv_to_tool_file_cmd='`$ECHO "$lt_cv_to_tool_file_cmd" | $SED "$delay_single_quote_subst"`'
26806reload_flag='`$ECHO "$reload_flag" | $SED "$delay_single_quote_subst"`'
26807reload_cmds='`$ECHO "$reload_cmds" | $SED "$delay_single_quote_subst"`'
26808FILECMD='`$ECHO "$FILECMD" | $SED "$delay_single_quote_subst"`'
26809OBJDUMP='`$ECHO "$OBJDUMP" | $SED "$delay_single_quote_subst"`'
26810deplibs_check_method='`$ECHO "$deplibs_check_method" | $SED "$delay_single_quote_subst"`'
26811file_magic_cmd='`$ECHO "$file_magic_cmd" | $SED "$delay_single_quote_subst"`'
26812file_magic_glob='`$ECHO "$file_magic_glob" | $SED "$delay_single_quote_subst"`'
26813want_nocaseglob='`$ECHO "$want_nocaseglob" | $SED "$delay_single_quote_subst"`'
26814DLLTOOL='`$ECHO "$DLLTOOL" | $SED "$delay_single_quote_subst"`'
26815sharedlib_from_linklib_cmd='`$ECHO "$sharedlib_from_linklib_cmd" | $SED "$delay_single_quote_subst"`'
26816AR='`$ECHO "$AR" | $SED "$delay_single_quote_subst"`'
26817lt_ar_flags='`$ECHO "$lt_ar_flags" | $SED "$delay_single_quote_subst"`'
26818AR_FLAGS='`$ECHO "$AR_FLAGS" | $SED "$delay_single_quote_subst"`'
26819archiver_list_spec='`$ECHO "$archiver_list_spec" | $SED "$delay_single_quote_subst"`'
26820STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`'
26821RANLIB='`$ECHO "$RANLIB" | $SED "$delay_single_quote_subst"`'
26822old_postinstall_cmds='`$ECHO "$old_postinstall_cmds" | $SED "$delay_single_quote_subst"`'
26823old_postuninstall_cmds='`$ECHO "$old_postuninstall_cmds" | $SED "$delay_single_quote_subst"`'
26824old_archive_cmds='`$ECHO "$old_archive_cmds" | $SED "$delay_single_quote_subst"`'
26825lock_old_archive_extraction='`$ECHO "$lock_old_archive_extraction" | $SED "$delay_single_quote_subst"`'
26826CC='`$ECHO "$CC" | $SED "$delay_single_quote_subst"`'
26827CFLAGS='`$ECHO "$CFLAGS" | $SED "$delay_single_quote_subst"`'
26828compiler='`$ECHO "$compiler" | $SED "$delay_single_quote_subst"`'
26829GCC='`$ECHO "$GCC" | $SED "$delay_single_quote_subst"`'
26830lt_cv_sys_global_symbol_pipe='`$ECHO "$lt_cv_sys_global_symbol_pipe" | $SED "$delay_single_quote_subst"`'
26831lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`'
26832lt_cv_sys_global_symbol_to_import='`$ECHO "$lt_cv_sys_global_symbol_to_import" | $SED "$delay_single_quote_subst"`'
26833lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`'
26834lt_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"`'
26835lt_cv_nm_interface='`$ECHO "$lt_cv_nm_interface" | $SED "$delay_single_quote_subst"`'
26836nm_file_list_spec='`$ECHO "$nm_file_list_spec" | $SED "$delay_single_quote_subst"`'
26837lt_sysroot='`$ECHO "$lt_sysroot" | $SED "$delay_single_quote_subst"`'
26838lt_cv_truncate_bin='`$ECHO "$lt_cv_truncate_bin" | $SED "$delay_single_quote_subst"`'
26839objdir='`$ECHO "$objdir" | $SED "$delay_single_quote_subst"`'
26840MAGIC_CMD='`$ECHO "$MAGIC_CMD" | $SED "$delay_single_quote_subst"`'
26841lt_prog_compiler_no_builtin_flag='`$ECHO "$lt_prog_compiler_no_builtin_flag" | $SED "$delay_single_quote_subst"`'
26842lt_prog_compiler_pic='`$ECHO "$lt_prog_compiler_pic" | $SED "$delay_single_quote_subst"`'
26843lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`'
26844lt_prog_compiler_static='`$ECHO "$lt_prog_compiler_static" | $SED "$delay_single_quote_subst"`'
26845lt_cv_prog_compiler_c_o='`$ECHO "$lt_cv_prog_compiler_c_o" | $SED "$delay_single_quote_subst"`'
26846need_locks='`$ECHO "$need_locks" | $SED "$delay_single_quote_subst"`'
26847MANIFEST_TOOL='`$ECHO "$MANIFEST_TOOL" | $SED "$delay_single_quote_subst"`'
26848DSYMUTIL='`$ECHO "$DSYMUTIL" | $SED "$delay_single_quote_subst"`'
26849NMEDIT='`$ECHO "$NMEDIT" | $SED "$delay_single_quote_subst"`'
26850LIPO='`$ECHO "$LIPO" | $SED "$delay_single_quote_subst"`'
26851OTOOL='`$ECHO "$OTOOL" | $SED "$delay_single_quote_subst"`'
26852OTOOL64='`$ECHO "$OTOOL64" | $SED "$delay_single_quote_subst"`'
26853libext='`$ECHO "$libext" | $SED "$delay_single_quote_subst"`'
26854shrext_cmds='`$ECHO "$shrext_cmds" | $SED "$delay_single_quote_subst"`'
26855extract_expsyms_cmds='`$ECHO "$extract_expsyms_cmds" | $SED "$delay_single_quote_subst"`'
26856archive_cmds_need_lc='`$ECHO "$archive_cmds_need_lc" | $SED "$delay_single_quote_subst"`'
26857enable_shared_with_static_runtimes='`$ECHO "$enable_shared_with_static_runtimes" | $SED "$delay_single_quote_subst"`'
26858export_dynamic_flag_spec='`$ECHO "$export_dynamic_flag_spec" | $SED "$delay_single_quote_subst"`'
26859whole_archive_flag_spec='`$ECHO "$whole_archive_flag_spec" | $SED "$delay_single_quote_subst"`'
26860compiler_needs_object='`$ECHO "$compiler_needs_object" | $SED "$delay_single_quote_subst"`'
26861old_archive_from_new_cmds='`$ECHO "$old_archive_from_new_cmds" | $SED "$delay_single_quote_subst"`'
26862old_archive_from_expsyms_cmds='`$ECHO "$old_archive_from_expsyms_cmds" | $SED "$delay_single_quote_subst"`'
26863archive_cmds='`$ECHO "$archive_cmds" | $SED "$delay_single_quote_subst"`'
26864archive_expsym_cmds='`$ECHO "$archive_expsym_cmds" | $SED "$delay_single_quote_subst"`'
26865module_cmds='`$ECHO "$module_cmds" | $SED "$delay_single_quote_subst"`'
26866module_expsym_cmds='`$ECHO "$module_expsym_cmds" | $SED "$delay_single_quote_subst"`'
26867with_gnu_ld='`$ECHO "$with_gnu_ld" | $SED "$delay_single_quote_subst"`'
26868allow_undefined_flag='`$ECHO "$allow_undefined_flag" | $SED "$delay_single_quote_subst"`'
26869no_undefined_flag='`$ECHO "$no_undefined_flag" | $SED "$delay_single_quote_subst"`'
26870hardcode_libdir_flag_spec='`$ECHO "$hardcode_libdir_flag_spec" | $SED "$delay_single_quote_subst"`'
26871hardcode_libdir_separator='`$ECHO "$hardcode_libdir_separator" | $SED "$delay_single_quote_subst"`'
26872hardcode_direct='`$ECHO "$hardcode_direct" | $SED "$delay_single_quote_subst"`'
26873hardcode_direct_absolute='`$ECHO "$hardcode_direct_absolute" | $SED "$delay_single_quote_subst"`'
26874hardcode_minus_L='`$ECHO "$hardcode_minus_L" | $SED "$delay_single_quote_subst"`'
26875hardcode_shlibpath_var='`$ECHO "$hardcode_shlibpath_var" | $SED "$delay_single_quote_subst"`'
26876hardcode_automatic='`$ECHO "$hardcode_automatic" | $SED "$delay_single_quote_subst"`'
26877inherit_rpath='`$ECHO "$inherit_rpath" | $SED "$delay_single_quote_subst"`'
26878link_all_deplibs='`$ECHO "$link_all_deplibs" | $SED "$delay_single_quote_subst"`'
26879always_export_symbols='`$ECHO "$always_export_symbols" | $SED "$delay_single_quote_subst"`'
26880export_symbols_cmds='`$ECHO "$export_symbols_cmds" | $SED "$delay_single_quote_subst"`'
26881exclude_expsyms='`$ECHO "$exclude_expsyms" | $SED "$delay_single_quote_subst"`'
26882include_expsyms='`$ECHO "$include_expsyms" | $SED "$delay_single_quote_subst"`'
26883prelink_cmds='`$ECHO "$prelink_cmds" | $SED "$delay_single_quote_subst"`'
26884postlink_cmds='`$ECHO "$postlink_cmds" | $SED "$delay_single_quote_subst"`'
26885file_list_spec='`$ECHO "$file_list_spec" | $SED "$delay_single_quote_subst"`'
26886variables_saved_for_relink='`$ECHO "$variables_saved_for_relink" | $SED "$delay_single_quote_subst"`'
26887need_lib_prefix='`$ECHO "$need_lib_prefix" | $SED "$delay_single_quote_subst"`'
26888need_version='`$ECHO "$need_version" | $SED "$delay_single_quote_subst"`'
26889version_type='`$ECHO "$version_type" | $SED "$delay_single_quote_subst"`'
26890runpath_var='`$ECHO "$runpath_var" | $SED "$delay_single_quote_subst"`'
26891shlibpath_var='`$ECHO "$shlibpath_var" | $SED "$delay_single_quote_subst"`'
26892shlibpath_overrides_runpath='`$ECHO "$shlibpath_overrides_runpath" | $SED "$delay_single_quote_subst"`'
26893libname_spec='`$ECHO "$libname_spec" | $SED "$delay_single_quote_subst"`'
26894library_names_spec='`$ECHO "$library_names_spec" | $SED "$delay_single_quote_subst"`'
26895soname_spec='`$ECHO "$soname_spec" | $SED "$delay_single_quote_subst"`'
26896install_override_mode='`$ECHO "$install_override_mode" | $SED "$delay_single_quote_subst"`'
26897postinstall_cmds='`$ECHO "$postinstall_cmds" | $SED "$delay_single_quote_subst"`'
26898postuninstall_cmds='`$ECHO "$postuninstall_cmds" | $SED "$delay_single_quote_subst"`'
26899finish_cmds='`$ECHO "$finish_cmds" | $SED "$delay_single_quote_subst"`'
26900finish_eval='`$ECHO "$finish_eval" | $SED "$delay_single_quote_subst"`'
26901hardcode_into_libs='`$ECHO "$hardcode_into_libs" | $SED "$delay_single_quote_subst"`'
26902sys_lib_search_path_spec='`$ECHO "$sys_lib_search_path_spec" | $SED "$delay_single_quote_subst"`'
26903configure_time_dlsearch_path='`$ECHO "$configure_time_dlsearch_path" | $SED "$delay_single_quote_subst"`'
26904configure_time_lt_sys_library_path='`$ECHO "$configure_time_lt_sys_library_path" | $SED "$delay_single_quote_subst"`'
26905hardcode_action='`$ECHO "$hardcode_action" | $SED "$delay_single_quote_subst"`'
26906enable_dlopen='`$ECHO "$enable_dlopen" | $SED "$delay_single_quote_subst"`'
26907enable_dlopen_self='`$ECHO "$enable_dlopen_self" | $SED "$delay_single_quote_subst"`'
26908enable_dlopen_self_static='`$ECHO "$enable_dlopen_self_static" | $SED "$delay_single_quote_subst"`'
26909old_striplib='`$ECHO "$old_striplib" | $SED "$delay_single_quote_subst"`'
26910striplib='`$ECHO "$striplib" | $SED "$delay_single_quote_subst"`'
26911
26912LTCC='$LTCC'
26913LTCFLAGS='$LTCFLAGS'
26914compiler='$compiler_DEFAULT'
26915
26916# A function that is used when there is no print builtin or printf.
26917func_fallback_echo ()
26918{
26919  eval 'cat <<_LTECHO_EOF
26920\$1
26921_LTECHO_EOF'
26922}
26923
26924# Quote evaled strings.
26925for var in SHELL \
26926ECHO \
26927PATH_SEPARATOR \
26928SED \
26929GREP \
26930EGREP \
26931FGREP \
26932LD \
26933NM \
26934LN_S \
26935lt_SP2NL \
26936lt_NL2SP \
26937reload_flag \
26938FILECMD \
26939OBJDUMP \
26940deplibs_check_method \
26941file_magic_cmd \
26942file_magic_glob \
26943want_nocaseglob \
26944DLLTOOL \
26945sharedlib_from_linklib_cmd \
26946AR \
26947archiver_list_spec \
26948STRIP \
26949RANLIB \
26950CC \
26951CFLAGS \
26952compiler \
26953lt_cv_sys_global_symbol_pipe \
26954lt_cv_sys_global_symbol_to_cdecl \
26955lt_cv_sys_global_symbol_to_import \
26956lt_cv_sys_global_symbol_to_c_name_address \
26957lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \
26958lt_cv_nm_interface \
26959nm_file_list_spec \
26960lt_cv_truncate_bin \
26961lt_prog_compiler_no_builtin_flag \
26962lt_prog_compiler_pic \
26963lt_prog_compiler_wl \
26964lt_prog_compiler_static \
26965lt_cv_prog_compiler_c_o \
26966need_locks \
26967MANIFEST_TOOL \
26968DSYMUTIL \
26969NMEDIT \
26970LIPO \
26971OTOOL \
26972OTOOL64 \
26973shrext_cmds \
26974export_dynamic_flag_spec \
26975whole_archive_flag_spec \
26976compiler_needs_object \
26977with_gnu_ld \
26978allow_undefined_flag \
26979no_undefined_flag \
26980hardcode_libdir_flag_spec \
26981hardcode_libdir_separator \
26982exclude_expsyms \
26983include_expsyms \
26984file_list_spec \
26985variables_saved_for_relink \
26986libname_spec \
26987library_names_spec \
26988soname_spec \
26989install_override_mode \
26990finish_eval \
26991old_striplib \
26992striplib; do
26993    case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
26994    *[\\\\\\\`\\"\\\$]*)
26995      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes
26996      ;;
26997    *)
26998      eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
26999      ;;
27000    esac
27001done
27002
27003# Double-quote double-evaled strings.
27004for var in reload_cmds \
27005old_postinstall_cmds \
27006old_postuninstall_cmds \
27007old_archive_cmds \
27008extract_expsyms_cmds \
27009old_archive_from_new_cmds \
27010old_archive_from_expsyms_cmds \
27011archive_cmds \
27012archive_expsym_cmds \
27013module_cmds \
27014module_expsym_cmds \
27015export_symbols_cmds \
27016prelink_cmds \
27017postlink_cmds \
27018postinstall_cmds \
27019postuninstall_cmds \
27020finish_cmds \
27021sys_lib_search_path_spec \
27022configure_time_dlsearch_path \
27023configure_time_lt_sys_library_path; do
27024    case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
27025    *[\\\\\\\`\\"\\\$]*)
27026      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes
27027      ;;
27028    *)
27029      eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
27030      ;;
27031    esac
27032done
27033
27034ac_aux_dir='$ac_aux_dir'
27035
27036# See if we are running on zsh, and set the options that allow our
27037# commands through without removal of \ escapes INIT.
27038if test -n "\${ZSH_VERSION+set}"; then
27039   setopt NO_GLOB_SUBST
27040fi
27041
27042
27043    PACKAGE='$PACKAGE'
27044    VERSION='$VERSION'
27045    RM='$RM'
27046    ofile='$ofile'
27047
27048
27049
27050
27051_ACEOF
27052
27053cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
27054
27055# Handling of arguments.
27056for ac_config_target in $ac_config_targets
27057do
27058  case $ac_config_target in
27059    "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;;
27060    "disable-rpath") CONFIG_COMMANDS="$CONFIG_COMMANDS disable-rpath" ;;
27061    "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
27062    "doc/example.conf") CONFIG_FILES="$CONFIG_FILES doc/example.conf" ;;
27063    "doc/libunbound.3") CONFIG_FILES="$CONFIG_FILES doc/libunbound.3" ;;
27064    "doc/unbound.8") CONFIG_FILES="$CONFIG_FILES doc/unbound.8" ;;
27065    "doc/unbound-anchor.8") CONFIG_FILES="$CONFIG_FILES doc/unbound-anchor.8" ;;
27066    "doc/unbound-checkconf.8") CONFIG_FILES="$CONFIG_FILES doc/unbound-checkconf.8" ;;
27067    "doc/unbound.conf.5") CONFIG_FILES="$CONFIG_FILES doc/unbound.conf.5" ;;
27068    "doc/unbound-control.8") CONFIG_FILES="$CONFIG_FILES doc/unbound-control.8" ;;
27069    "doc/unbound-host.1") CONFIG_FILES="$CONFIG_FILES doc/unbound-host.1" ;;
27070    "smallapp/unbound-control-setup.sh") CONFIG_FILES="$CONFIG_FILES smallapp/unbound-control-setup.sh" ;;
27071    "dnstap/dnstap_config.h") CONFIG_FILES="$CONFIG_FILES dnstap/dnstap_config.h" ;;
27072    "dnscrypt/dnscrypt_config.h") CONFIG_FILES="$CONFIG_FILES dnscrypt/dnscrypt_config.h" ;;
27073    "contrib/libunbound.pc") CONFIG_FILES="$CONFIG_FILES contrib/libunbound.pc" ;;
27074    "contrib/unbound.socket") CONFIG_FILES="$CONFIG_FILES contrib/unbound.socket" ;;
27075    "contrib/unbound.service") CONFIG_FILES="$CONFIG_FILES contrib/unbound.service" ;;
27076    "contrib/unbound_portable.service") CONFIG_FILES="$CONFIG_FILES contrib/unbound_portable.service" ;;
27077    "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
27078
27079  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
27080  esac
27081done
27082
27083
27084# If the user did not use the arguments to specify the items to instantiate,
27085# then the envvar interface is used.  Set only those that are not.
27086# We use the long form for the default assignment because of an extremely
27087# bizarre bug on SunOS 4.1.3.
27088if $ac_need_defaults; then
27089  test ${CONFIG_FILES+y} || CONFIG_FILES=$config_files
27090  test ${CONFIG_HEADERS+y} || CONFIG_HEADERS=$config_headers
27091  test ${CONFIG_COMMANDS+y} || CONFIG_COMMANDS=$config_commands
27092fi
27093
27094# Have a temporary directory for convenience.  Make it in the build tree
27095# simply because there is no reason against having it here, and in addition,
27096# creating and moving files from /tmp can sometimes cause problems.
27097# Hook for its removal unless debugging.
27098# Note that there is a small window in which the directory will not be cleaned:
27099# after its creation but before its name has been assigned to `$tmp'.
27100$debug ||
27101{
27102  tmp= ac_tmp=
27103  trap 'exit_status=$?
27104  : "${ac_tmp:=$tmp}"
27105  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
27106' 0
27107  trap 'as_fn_exit 1' 1 2 13 15
27108}
27109# Create a (secure) tmp directory for tmp files.
27110
27111{
27112  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
27113  test -d "$tmp"
27114}  ||
27115{
27116  tmp=./conf$$-$RANDOM
27117  (umask 077 && mkdir "$tmp")
27118} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
27119ac_tmp=$tmp
27120
27121# Set up the scripts for CONFIG_FILES section.
27122# No need to generate them if there are no CONFIG_FILES.
27123# This happens for instance with `./config.status config.h'.
27124if test -n "$CONFIG_FILES"; then
27125
27126
27127ac_cr=`echo X | tr X '\015'`
27128# On cygwin, bash can eat \r inside `` if the user requested igncr.
27129# But we know of no other shell where ac_cr would be empty at this
27130# point, so we can use a bashism as a fallback.
27131if test "x$ac_cr" = x; then
27132  eval ac_cr=\$\'\\r\'
27133fi
27134ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
27135if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
27136  ac_cs_awk_cr='\\r'
27137else
27138  ac_cs_awk_cr=$ac_cr
27139fi
27140
27141echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
27142_ACEOF
27143
27144
27145{
27146  echo "cat >conf$$subs.awk <<_ACEOF" &&
27147  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
27148  echo "_ACEOF"
27149} >conf$$subs.sh ||
27150  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
27151ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
27152ac_delim='%!_!# '
27153for ac_last_try in false false false false false :; do
27154  . ./conf$$subs.sh ||
27155    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
27156
27157  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
27158  if test $ac_delim_n = $ac_delim_num; then
27159    break
27160  elif $ac_last_try; then
27161    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
27162  else
27163    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
27164  fi
27165done
27166rm -f conf$$subs.sh
27167
27168cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
27169cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
27170_ACEOF
27171sed -n '
27172h
27173s/^/S["/; s/!.*/"]=/
27174p
27175g
27176s/^[^!]*!//
27177:repl
27178t repl
27179s/'"$ac_delim"'$//
27180t delim
27181:nl
27182h
27183s/\(.\{148\}\)..*/\1/
27184t more1
27185s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
27186p
27187n
27188b repl
27189:more1
27190s/["\\]/\\&/g; s/^/"/; s/$/"\\/
27191p
27192g
27193s/.\{148\}//
27194t nl
27195:delim
27196h
27197s/\(.\{148\}\)..*/\1/
27198t more2
27199s/["\\]/\\&/g; s/^/"/; s/$/"/
27200p
27201b
27202:more2
27203s/["\\]/\\&/g; s/^/"/; s/$/"\\/
27204p
27205g
27206s/.\{148\}//
27207t delim
27208' <conf$$subs.awk | sed '
27209/^[^""]/{
27210  N
27211  s/\n//
27212}
27213' >>$CONFIG_STATUS || ac_write_fail=1
27214rm -f conf$$subs.awk
27215cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
27216_ACAWK
27217cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
27218  for (key in S) S_is_set[key] = 1
27219  FS = ""
27220
27221}
27222{
27223  line = $ 0
27224  nfields = split(line, field, "@")
27225  substed = 0
27226  len = length(field[1])
27227  for (i = 2; i < nfields; i++) {
27228    key = field[i]
27229    keylen = length(key)
27230    if (S_is_set[key]) {
27231      value = S[key]
27232      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
27233      len += length(value) + length(field[++i])
27234      substed = 1
27235    } else
27236      len += 1 + keylen
27237  }
27238
27239  print line
27240}
27241
27242_ACAWK
27243_ACEOF
27244cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
27245if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
27246  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
27247else
27248  cat
27249fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
27250  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
27251_ACEOF
27252
27253# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
27254# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
27255# trailing colons and then remove the whole line if VPATH becomes empty
27256# (actually we leave an empty line to preserve line numbers).
27257if test "x$srcdir" = x.; then
27258  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
27259h
27260s///
27261s/^/:/
27262s/[	 ]*$/:/
27263s/:\$(srcdir):/:/g
27264s/:\${srcdir}:/:/g
27265s/:@srcdir@:/:/g
27266s/^:*//
27267s/:*$//
27268x
27269s/\(=[	 ]*\).*/\1/
27270G
27271s/\n//
27272s/^[^=]*=[	 ]*$//
27273}'
27274fi
27275
27276cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
27277fi # test -n "$CONFIG_FILES"
27278
27279# Set up the scripts for CONFIG_HEADERS section.
27280# No need to generate them if there are no CONFIG_HEADERS.
27281# This happens for instance with `./config.status Makefile'.
27282if test -n "$CONFIG_HEADERS"; then
27283cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
27284BEGIN {
27285_ACEOF
27286
27287# Transform confdefs.h into an awk script `defines.awk', embedded as
27288# here-document in config.status, that substitutes the proper values into
27289# config.h.in to produce config.h.
27290
27291# Create a delimiter string that does not exist in confdefs.h, to ease
27292# handling of long lines.
27293ac_delim='%!_!# '
27294for ac_last_try in false false :; do
27295  ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
27296  if test -z "$ac_tt"; then
27297    break
27298  elif $ac_last_try; then
27299    as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
27300  else
27301    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
27302  fi
27303done
27304
27305# For the awk script, D is an array of macro values keyed by name,
27306# likewise P contains macro parameters if any.  Preserve backslash
27307# newline sequences.
27308
27309ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
27310sed -n '
27311s/.\{148\}/&'"$ac_delim"'/g
27312t rset
27313:rset
27314s/^[	 ]*#[	 ]*define[	 ][	 ]*/ /
27315t def
27316d
27317:def
27318s/\\$//
27319t bsnl
27320s/["\\]/\\&/g
27321s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
27322D["\1"]=" \3"/p
27323s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2"/p
27324d
27325:bsnl
27326s/["\\]/\\&/g
27327s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
27328D["\1"]=" \3\\\\\\n"\\/p
27329t cont
27330s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
27331t cont
27332d
27333:cont
27334n
27335s/.\{148\}/&'"$ac_delim"'/g
27336t clear
27337:clear
27338s/\\$//
27339t bsnlc
27340s/["\\]/\\&/g; s/^/"/; s/$/"/p
27341d
27342:bsnlc
27343s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
27344b cont
27345' <confdefs.h | sed '
27346s/'"$ac_delim"'/"\\\
27347"/g' >>$CONFIG_STATUS || ac_write_fail=1
27348
27349cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
27350  for (key in D) D_is_set[key] = 1
27351  FS = ""
27352}
27353/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
27354  line = \$ 0
27355  split(line, arg, " ")
27356  if (arg[1] == "#") {
27357    defundef = arg[2]
27358    mac1 = arg[3]
27359  } else {
27360    defundef = substr(arg[1], 2)
27361    mac1 = arg[2]
27362  }
27363  split(mac1, mac2, "(") #)
27364  macro = mac2[1]
27365  prefix = substr(line, 1, index(line, defundef) - 1)
27366  if (D_is_set[macro]) {
27367    # Preserve the white space surrounding the "#".
27368    print prefix "define", macro P[macro] D[macro]
27369    next
27370  } else {
27371    # Replace #undef with comments.  This is necessary, for example,
27372    # in the case of _POSIX_SOURCE, which is predefined and required
27373    # on some systems where configure will not decide to define it.
27374    if (defundef == "undef") {
27375      print "/*", prefix defundef, macro, "*/"
27376      next
27377    }
27378  }
27379}
27380{ print }
27381_ACAWK
27382_ACEOF
27383cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
27384  as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
27385fi # test -n "$CONFIG_HEADERS"
27386
27387
27388eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS    :C $CONFIG_COMMANDS"
27389shift
27390for ac_tag
27391do
27392  case $ac_tag in
27393  :[FHLC]) ac_mode=$ac_tag; continue;;
27394  esac
27395  case $ac_mode$ac_tag in
27396  :[FHL]*:*);;
27397  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
27398  :[FH]-) ac_tag=-:-;;
27399  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
27400  esac
27401  ac_save_IFS=$IFS
27402  IFS=:
27403  set x $ac_tag
27404  IFS=$ac_save_IFS
27405  shift
27406  ac_file=$1
27407  shift
27408
27409  case $ac_mode in
27410  :L) ac_source=$1;;
27411  :[FH])
27412    ac_file_inputs=
27413    for ac_f
27414    do
27415      case $ac_f in
27416      -) ac_f="$ac_tmp/stdin";;
27417      *) # Look for the file first in the build tree, then in the source tree
27418	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
27419	 # because $ac_f cannot contain `:'.
27420	 test -f "$ac_f" ||
27421	   case $ac_f in
27422	   [\\/$]*) false;;
27423	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
27424	   esac ||
27425	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
27426      esac
27427      case $ac_f in *\'*) ac_f=`printf "%s\n" "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
27428      as_fn_append ac_file_inputs " '$ac_f'"
27429    done
27430
27431    # Let's still pretend it is `configure' which instantiates (i.e., don't
27432    # use $as_me), people would be surprised to read:
27433    #    /* config.h.  Generated by config.status.  */
27434    configure_input='Generated from '`
27435	  printf "%s\n" "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
27436	`' by configure.'
27437    if test x"$ac_file" != x-; then
27438      configure_input="$ac_file.  $configure_input"
27439      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
27440printf "%s\n" "$as_me: creating $ac_file" >&6;}
27441    fi
27442    # Neutralize special characters interpreted by sed in replacement strings.
27443    case $configure_input in #(
27444    *\&* | *\|* | *\\* )
27445       ac_sed_conf_input=`printf "%s\n" "$configure_input" |
27446       sed 's/[\\\\&|]/\\\\&/g'`;; #(
27447    *) ac_sed_conf_input=$configure_input;;
27448    esac
27449
27450    case $ac_tag in
27451    *:-:* | *:-) cat >"$ac_tmp/stdin" \
27452      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
27453    esac
27454    ;;
27455  esac
27456
27457  ac_dir=`$as_dirname -- "$ac_file" ||
27458$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
27459	 X"$ac_file" : 'X\(//\)[^/]' \| \
27460	 X"$ac_file" : 'X\(//\)$' \| \
27461	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
27462printf "%s\n" X"$ac_file" |
27463    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
27464	    s//\1/
27465	    q
27466	  }
27467	  /^X\(\/\/\)[^/].*/{
27468	    s//\1/
27469	    q
27470	  }
27471	  /^X\(\/\/\)$/{
27472	    s//\1/
27473	    q
27474	  }
27475	  /^X\(\/\).*/{
27476	    s//\1/
27477	    q
27478	  }
27479	  s/.*/./; q'`
27480  as_dir="$ac_dir"; as_fn_mkdir_p
27481  ac_builddir=.
27482
27483case "$ac_dir" in
27484.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
27485*)
27486  ac_dir_suffix=/`printf "%s\n" "$ac_dir" | sed 's|^\.[\\/]||'`
27487  # A ".." for each directory in $ac_dir_suffix.
27488  ac_top_builddir_sub=`printf "%s\n" "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
27489  case $ac_top_builddir_sub in
27490  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
27491  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
27492  esac ;;
27493esac
27494ac_abs_top_builddir=$ac_pwd
27495ac_abs_builddir=$ac_pwd$ac_dir_suffix
27496# for backward compatibility:
27497ac_top_builddir=$ac_top_build_prefix
27498
27499case $srcdir in
27500  .)  # We are building in place.
27501    ac_srcdir=.
27502    ac_top_srcdir=$ac_top_builddir_sub
27503    ac_abs_top_srcdir=$ac_pwd ;;
27504  [\\/]* | ?:[\\/]* )  # Absolute name.
27505    ac_srcdir=$srcdir$ac_dir_suffix;
27506    ac_top_srcdir=$srcdir
27507    ac_abs_top_srcdir=$srcdir ;;
27508  *) # Relative name.
27509    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
27510    ac_top_srcdir=$ac_top_build_prefix$srcdir
27511    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
27512esac
27513ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
27514
27515
27516  case $ac_mode in
27517  :F)
27518  #
27519  # CONFIG_FILE
27520  #
27521
27522_ACEOF
27523
27524cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
27525# If the template does not know about datarootdir, expand it.
27526# FIXME: This hack should be removed a few years after 2.60.
27527ac_datarootdir_hack=; ac_datarootdir_seen=
27528ac_sed_dataroot='
27529/datarootdir/ {
27530  p
27531  q
27532}
27533/@datadir@/p
27534/@docdir@/p
27535/@infodir@/p
27536/@localedir@/p
27537/@mandir@/p'
27538case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
27539*datarootdir*) ac_datarootdir_seen=yes;;
27540*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
27541  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
27542printf "%s\n" "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
27543_ACEOF
27544cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
27545  ac_datarootdir_hack='
27546  s&@datadir@&$datadir&g
27547  s&@docdir@&$docdir&g
27548  s&@infodir@&$infodir&g
27549  s&@localedir@&$localedir&g
27550  s&@mandir@&$mandir&g
27551  s&\\\${datarootdir}&$datarootdir&g' ;;
27552esac
27553_ACEOF
27554
27555# Neutralize VPATH when `$srcdir' = `.'.
27556# Shell code in configure.ac might set extrasub.
27557# FIXME: do we really want to maintain this feature?
27558cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
27559ac_sed_extra="$ac_vpsub
27560$extrasub
27561_ACEOF
27562cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
27563:t
27564/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
27565s|@configure_input@|$ac_sed_conf_input|;t t
27566s&@top_builddir@&$ac_top_builddir_sub&;t t
27567s&@top_build_prefix@&$ac_top_build_prefix&;t t
27568s&@srcdir@&$ac_srcdir&;t t
27569s&@abs_srcdir@&$ac_abs_srcdir&;t t
27570s&@top_srcdir@&$ac_top_srcdir&;t t
27571s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
27572s&@builddir@&$ac_builddir&;t t
27573s&@abs_builddir@&$ac_abs_builddir&;t t
27574s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
27575$ac_datarootdir_hack
27576"
27577eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
27578  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
27579
27580test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
27581  { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
27582  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' \
27583      "$ac_tmp/out"`; test -z "$ac_out"; } &&
27584  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
27585which seems to be undefined.  Please make sure it is defined" >&5
27586printf "%s\n" "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
27587which seems to be undefined.  Please make sure it is defined" >&2;}
27588
27589  rm -f "$ac_tmp/stdin"
27590  case $ac_file in
27591  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
27592  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
27593  esac \
27594  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
27595 ;;
27596  :H)
27597  #
27598  # CONFIG_HEADER
27599  #
27600  if test x"$ac_file" != x-; then
27601    {
27602      printf "%s\n" "/* $configure_input  */" >&1 \
27603      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
27604    } >"$ac_tmp/config.h" \
27605      || as_fn_error $? "could not create $ac_file" "$LINENO" 5
27606    if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
27607      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
27608printf "%s\n" "$as_me: $ac_file is unchanged" >&6;}
27609    else
27610      rm -f "$ac_file"
27611      mv "$ac_tmp/config.h" "$ac_file" \
27612	|| as_fn_error $? "could not create $ac_file" "$LINENO" 5
27613    fi
27614  else
27615    printf "%s\n" "/* $configure_input  */" >&1 \
27616      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
27617      || as_fn_error $? "could not create -" "$LINENO" 5
27618  fi
27619 ;;
27620
27621  :C)  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
27622printf "%s\n" "$as_me: executing $ac_file commands" >&6;}
27623 ;;
27624  esac
27625
27626
27627  case $ac_file$ac_mode in
27628    "libtool":C)
27629
27630    # See if we are running on zsh, and set the options that allow our
27631    # commands through without removal of \ escapes.
27632    if test -n "${ZSH_VERSION+set}"; then
27633      setopt NO_GLOB_SUBST
27634    fi
27635
27636    cfgfile=${ofile}T
27637    trap "$RM \"$cfgfile\"; exit 1" 1 2 15
27638    $RM "$cfgfile"
27639
27640    cat <<_LT_EOF >> "$cfgfile"
27641#! $SHELL
27642# Generated automatically by $as_me ($PACKAGE) $VERSION
27643# NOTE: Changes made to this file will be lost: look at ltmain.sh.
27644
27645# Provide generalized library-building support services.
27646# Written by Gordon Matzigkeit, 1996
27647
27648# Copyright (C) 2024 Free Software Foundation, Inc.
27649# This is free software; see the source for copying conditions.  There is NO
27650# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
27651
27652# GNU Libtool is free software; you can redistribute it and/or modify
27653# it under the terms of the GNU General Public License as published by
27654# the Free Software Foundation; either version 2 of the License, or
27655# (at your option) any later version.
27656#
27657# As a special exception to the GNU General Public License, if you
27658# distribute this file as part of a program or library that is built
27659# using GNU Libtool, you may include this file under the  same
27660# distribution terms that you use for the rest of that program.
27661#
27662# GNU Libtool is distributed in the hope that it will be useful, but
27663# WITHOUT ANY WARRANTY; without even the implied warranty of
27664# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
27665# GNU General Public License for more details.
27666#
27667# You should have received a copy of the GNU General Public License
27668# along with this program.  If not, see <http://www.gnu.org/licenses/>.
27669
27670
27671# The names of the tagged configurations supported by this script.
27672available_tags=''
27673
27674# Configured defaults for sys_lib_dlsearch_path munging.
27675: \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"}
27676
27677# ### BEGIN LIBTOOL CONFIG
27678
27679# Which release of libtool.m4 was used?
27680macro_version=$macro_version
27681macro_revision=$macro_revision
27682
27683# Whether or not to build shared libraries.
27684build_libtool_libs=$enable_shared
27685
27686# Whether or not to build static libraries.
27687build_old_libs=$enable_static
27688
27689# What type of objects to build.
27690pic_mode=$pic_mode
27691
27692# Whether or not to optimize for fast installation.
27693fast_install=$enable_fast_install
27694
27695# Shared archive member basename,for filename based shared library versioning on AIX.
27696shared_archive_member_spec=$shared_archive_member_spec
27697
27698# Shell to use when invoking shell scripts.
27699SHELL=$lt_SHELL
27700
27701# An echo program that protects backslashes.
27702ECHO=$lt_ECHO
27703
27704# The PATH separator for the build system.
27705PATH_SEPARATOR=$lt_PATH_SEPARATOR
27706
27707# The host system.
27708host_alias=$host_alias
27709host=$host
27710host_os=$host_os
27711
27712# The build system.
27713build_alias=$build_alias
27714build=$build
27715build_os=$build_os
27716
27717# A sed program that does not truncate output.
27718SED=$lt_SED
27719
27720# Sed that helps us avoid accidentally triggering echo(1) options like -n.
27721Xsed="\$SED -e 1s/^X//"
27722
27723# A grep program that handles long lines.
27724GREP=$lt_GREP
27725
27726# An ERE matcher.
27727EGREP=$lt_EGREP
27728
27729# A literal string matcher.
27730FGREP=$lt_FGREP
27731
27732# A BSD- or MS-compatible name lister.
27733NM=$lt_NM
27734
27735# Whether we need soft or hard links.
27736LN_S=$lt_LN_S
27737
27738# What is the maximum length of a command?
27739max_cmd_len=$max_cmd_len
27740
27741# Object file suffix (normally "o").
27742objext=$ac_objext
27743
27744# Executable file suffix (normally "").
27745exeext=$exeext
27746
27747# whether the shell understands "unset".
27748lt_unset=$lt_unset
27749
27750# turn spaces into newlines.
27751SP2NL=$lt_lt_SP2NL
27752
27753# turn newlines into spaces.
27754NL2SP=$lt_lt_NL2SP
27755
27756# convert \$build file names to \$host format.
27757to_host_file_cmd=$lt_cv_to_host_file_cmd
27758
27759# convert \$build files to toolchain format.
27760to_tool_file_cmd=$lt_cv_to_tool_file_cmd
27761
27762# A file(cmd) program that detects file types.
27763FILECMD=$lt_FILECMD
27764
27765# An object symbol dumper.
27766OBJDUMP=$lt_OBJDUMP
27767
27768# Method to check whether dependent libraries are shared objects.
27769deplibs_check_method=$lt_deplibs_check_method
27770
27771# Command to use when deplibs_check_method = "file_magic".
27772file_magic_cmd=$lt_file_magic_cmd
27773
27774# How to find potential files when deplibs_check_method = "file_magic".
27775file_magic_glob=$lt_file_magic_glob
27776
27777# Find potential files using nocaseglob when deplibs_check_method = "file_magic".
27778want_nocaseglob=$lt_want_nocaseglob
27779
27780# DLL creation program.
27781DLLTOOL=$lt_DLLTOOL
27782
27783# Command to associate shared and link libraries.
27784sharedlib_from_linklib_cmd=$lt_sharedlib_from_linklib_cmd
27785
27786# The archiver.
27787AR=$lt_AR
27788
27789# Flags to create an archive (by configure).
27790lt_ar_flags=$lt_ar_flags
27791
27792# Flags to create an archive.
27793AR_FLAGS=\${ARFLAGS-"\$lt_ar_flags"}
27794
27795# How to feed a file listing to the archiver.
27796archiver_list_spec=$lt_archiver_list_spec
27797
27798# A symbol stripping program.
27799STRIP=$lt_STRIP
27800
27801# Commands used to install an old-style archive.
27802RANLIB=$lt_RANLIB
27803old_postinstall_cmds=$lt_old_postinstall_cmds
27804old_postuninstall_cmds=$lt_old_postuninstall_cmds
27805
27806# Whether to use a lock for old archive extraction.
27807lock_old_archive_extraction=$lock_old_archive_extraction
27808
27809# A C compiler.
27810LTCC=$lt_CC
27811
27812# LTCC compiler flags.
27813LTCFLAGS=$lt_CFLAGS
27814
27815# Take the output of nm and produce a listing of raw symbols and C names.
27816global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
27817
27818# Transform the output of nm in a proper C declaration.
27819global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
27820
27821# Transform the output of nm into a list of symbols to manually relocate.
27822global_symbol_to_import=$lt_lt_cv_sys_global_symbol_to_import
27823
27824# Transform the output of nm in a C name address pair.
27825global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
27826
27827# Transform the output of nm in a C name address pair when lib prefix is needed.
27828global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix
27829
27830# The name lister interface.
27831nm_interface=$lt_lt_cv_nm_interface
27832
27833# Specify filename containing input files for \$NM.
27834nm_file_list_spec=$lt_nm_file_list_spec
27835
27836# The root where to search for dependent libraries,and where our libraries should be installed.
27837lt_sysroot=$lt_sysroot
27838
27839# Command to truncate a binary pipe.
27840lt_truncate_bin=$lt_lt_cv_truncate_bin
27841
27842# The name of the directory that contains temporary libtool files.
27843objdir=$objdir
27844
27845# Used to examine libraries when file_magic_cmd begins with "file".
27846MAGIC_CMD=$MAGIC_CMD
27847
27848# Must we lock files when doing compilation?
27849need_locks=$lt_need_locks
27850
27851# Manifest tool.
27852MANIFEST_TOOL=$lt_MANIFEST_TOOL
27853
27854# Tool to manipulate archived DWARF debug symbol files on Mac OS X.
27855DSYMUTIL=$lt_DSYMUTIL
27856
27857# Tool to change global to local symbols on Mac OS X.
27858NMEDIT=$lt_NMEDIT
27859
27860# Tool to manipulate fat objects and archives on Mac OS X.
27861LIPO=$lt_LIPO
27862
27863# ldd/readelf like tool for Mach-O binaries on Mac OS X.
27864OTOOL=$lt_OTOOL
27865
27866# ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4.
27867OTOOL64=$lt_OTOOL64
27868
27869# Old archive suffix (normally "a").
27870libext=$libext
27871
27872# Shared library suffix (normally ".so").
27873shrext_cmds=$lt_shrext_cmds
27874
27875# The commands to extract the exported symbol list from a shared archive.
27876extract_expsyms_cmds=$lt_extract_expsyms_cmds
27877
27878# Variables whose values should be saved in libtool wrapper scripts and
27879# restored at link time.
27880variables_saved_for_relink=$lt_variables_saved_for_relink
27881
27882# Do we need the "lib" prefix for modules?
27883need_lib_prefix=$need_lib_prefix
27884
27885# Do we need a version for libraries?
27886need_version=$need_version
27887
27888# Library versioning type.
27889version_type=$version_type
27890
27891# Shared library runtime path variable.
27892runpath_var=$runpath_var
27893
27894# Shared library path variable.
27895shlibpath_var=$shlibpath_var
27896
27897# Is shlibpath searched before the hard-coded library search path?
27898shlibpath_overrides_runpath=$shlibpath_overrides_runpath
27899
27900# Format of library name prefix.
27901libname_spec=$lt_libname_spec
27902
27903# List of archive names.  First name is the real one, the rest are links.
27904# The last name is the one that the linker finds with -lNAME
27905library_names_spec=$lt_library_names_spec
27906
27907# The coded name of the library, if different from the real name.
27908soname_spec=$lt_soname_spec
27909
27910# Permission mode override for installation of shared libraries.
27911install_override_mode=$lt_install_override_mode
27912
27913# Command to use after installation of a shared archive.
27914postinstall_cmds=$lt_postinstall_cmds
27915
27916# Command to use after uninstallation of a shared archive.
27917postuninstall_cmds=$lt_postuninstall_cmds
27918
27919# Commands used to finish a libtool library installation in a directory.
27920finish_cmds=$lt_finish_cmds
27921
27922# As "finish_cmds", except a single script fragment to be evaled but
27923# not shown.
27924finish_eval=$lt_finish_eval
27925
27926# Whether we should hardcode library paths into libraries.
27927hardcode_into_libs=$hardcode_into_libs
27928
27929# Compile-time system search path for libraries.
27930sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
27931
27932# Detected run-time system search path for libraries.
27933sys_lib_dlsearch_path_spec=$lt_configure_time_dlsearch_path
27934
27935# Explicit LT_SYS_LIBRARY_PATH set during ./configure time.
27936configure_time_lt_sys_library_path=$lt_configure_time_lt_sys_library_path
27937
27938# Whether dlopen is supported.
27939dlopen_support=$enable_dlopen
27940
27941# Whether dlopen of programs is supported.
27942dlopen_self=$enable_dlopen_self
27943
27944# Whether dlopen of statically linked programs is supported.
27945dlopen_self_static=$enable_dlopen_self_static
27946
27947# Commands to strip libraries.
27948old_striplib=$lt_old_striplib
27949striplib=$lt_striplib
27950
27951
27952# The linker used to build libraries.
27953LD=$lt_LD
27954
27955# How to create reloadable object files.
27956reload_flag=$lt_reload_flag
27957reload_cmds=$lt_reload_cmds
27958
27959# Commands used to build an old-style archive.
27960old_archive_cmds=$lt_old_archive_cmds
27961
27962# A language specific compiler.
27963CC=$lt_compiler
27964
27965# Is the compiler the GNU compiler?
27966with_gcc=$GCC
27967
27968# Compiler flag to turn off builtin functions.
27969no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag
27970
27971# Additional compiler flags for building library objects.
27972pic_flag=$lt_lt_prog_compiler_pic
27973
27974# How to pass a linker flag through the compiler.
27975wl=$lt_lt_prog_compiler_wl
27976
27977# Compiler flag to prevent dynamic linking.
27978link_static_flag=$lt_lt_prog_compiler_static
27979
27980# Does compiler simultaneously support -c and -o options?
27981compiler_c_o=$lt_lt_cv_prog_compiler_c_o
27982
27983# Whether or not to add -lc for building shared libraries.
27984build_libtool_need_lc=$archive_cmds_need_lc
27985
27986# Whether or not to disallow shared libs when runtime libs are static.
27987allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes
27988
27989# Compiler flag to allow reflexive dlopens.
27990export_dynamic_flag_spec=$lt_export_dynamic_flag_spec
27991
27992# Compiler flag to generate shared objects directly from archives.
27993whole_archive_flag_spec=$lt_whole_archive_flag_spec
27994
27995# Whether the compiler copes with passing no objects directly.
27996compiler_needs_object=$lt_compiler_needs_object
27997
27998# Create an old-style archive from a shared archive.
27999old_archive_from_new_cmds=$lt_old_archive_from_new_cmds
28000
28001# Create a temporary old-style archive to link instead of a shared archive.
28002old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds
28003
28004# Commands used to build a shared archive.
28005archive_cmds=$lt_archive_cmds
28006archive_expsym_cmds=$lt_archive_expsym_cmds
28007
28008# Commands used to build a loadable module if different from building
28009# a shared archive.
28010module_cmds=$lt_module_cmds
28011module_expsym_cmds=$lt_module_expsym_cmds
28012
28013# Whether we are building with GNU ld or not.
28014with_gnu_ld=$lt_with_gnu_ld
28015
28016# Flag that allows shared libraries with undefined symbols to be built.
28017allow_undefined_flag=$lt_allow_undefined_flag
28018
28019# Flag that enforces no undefined symbols.
28020no_undefined_flag=$lt_no_undefined_flag
28021
28022# Flag to hardcode \$libdir into a binary during linking.
28023# This must work even if \$libdir does not exist
28024hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
28025
28026# Whether we need a single "-rpath" flag with a separated argument.
28027hardcode_libdir_separator=$lt_hardcode_libdir_separator
28028
28029# Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes
28030# DIR into the resulting binary.
28031hardcode_direct=$hardcode_direct
28032
28033# Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes
28034# DIR into the resulting binary and the resulting library dependency is
28035# "absolute",i.e. impossible to change by setting \$shlibpath_var if the
28036# library is relocated.
28037hardcode_direct_absolute=$hardcode_direct_absolute
28038
28039# Set to "yes" if using the -LDIR flag during linking hardcodes DIR
28040# into the resulting binary.
28041hardcode_minus_L=$hardcode_minus_L
28042
28043# Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
28044# into the resulting binary.
28045hardcode_shlibpath_var=$hardcode_shlibpath_var
28046
28047# Set to "yes" if building a shared library automatically hardcodes DIR
28048# into the library and all subsequent libraries and executables linked
28049# against it.
28050hardcode_automatic=$hardcode_automatic
28051
28052# Set to yes if linker adds runtime paths of dependent libraries
28053# to runtime path list.
28054inherit_rpath=$inherit_rpath
28055
28056# Whether libtool must link a program against all its dependency libraries.
28057link_all_deplibs=$link_all_deplibs
28058
28059# Set to "yes" if exported symbols are required.
28060always_export_symbols=$always_export_symbols
28061
28062# The commands to list exported symbols.
28063export_symbols_cmds=$lt_export_symbols_cmds
28064
28065# Symbols that should not be listed in the preloaded symbols.
28066exclude_expsyms=$lt_exclude_expsyms
28067
28068# Symbols that must always be exported.
28069include_expsyms=$lt_include_expsyms
28070
28071# Commands necessary for linking programs (against libraries) with templates.
28072prelink_cmds=$lt_prelink_cmds
28073
28074# Commands necessary for finishing linking programs.
28075postlink_cmds=$lt_postlink_cmds
28076
28077# Specify filename containing input files.
28078file_list_spec=$lt_file_list_spec
28079
28080# How to hardcode a shared library path into an executable.
28081hardcode_action=$hardcode_action
28082
28083# ### END LIBTOOL CONFIG
28084
28085_LT_EOF
28086
28087    cat <<'_LT_EOF' >> "$cfgfile"
28088
28089# ### BEGIN FUNCTIONS SHARED WITH CONFIGURE
28090
28091# func_munge_path_list VARIABLE PATH
28092# -----------------------------------
28093# VARIABLE is name of variable containing _space_ separated list of
28094# directories to be munged by the contents of PATH, which is string
28095# having a format:
28096# "DIR[:DIR]:"
28097#       string "DIR[ DIR]" will be prepended to VARIABLE
28098# ":DIR[:DIR]"
28099#       string "DIR[ DIR]" will be appended to VARIABLE
28100# "DIRP[:DIRP]::[DIRA:]DIRA"
28101#       string "DIRP[ DIRP]" will be prepended to VARIABLE and string
28102#       "DIRA[ DIRA]" will be appended to VARIABLE
28103# "DIR[:DIR]"
28104#       VARIABLE will be replaced by "DIR[ DIR]"
28105func_munge_path_list ()
28106{
28107    case x$2 in
28108    x)
28109        ;;
28110    *:)
28111        eval $1=\"`$ECHO $2 | $SED 's/:/ /g'` \$$1\"
28112        ;;
28113    x:*)
28114        eval $1=\"\$$1 `$ECHO $2 | $SED 's/:/ /g'`\"
28115        ;;
28116    *::*)
28117        eval $1=\"\$$1\ `$ECHO $2 | $SED -e 's/.*:://' -e 's/:/ /g'`\"
28118        eval $1=\"`$ECHO $2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \$$1\"
28119        ;;
28120    *)
28121        eval $1=\"`$ECHO $2 | $SED 's/:/ /g'`\"
28122        ;;
28123    esac
28124}
28125
28126
28127# Calculate cc_basename.  Skip known compiler wrappers and cross-prefix.
28128func_cc_basename ()
28129{
28130    for cc_temp in $*""; do
28131      case $cc_temp in
28132        compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
28133        distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
28134        \-*) ;;
28135        *) break;;
28136      esac
28137    done
28138    func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
28139}
28140
28141
28142# ### END FUNCTIONS SHARED WITH CONFIGURE
28143
28144_LT_EOF
28145
28146  case $host_os in
28147  aix3*)
28148    cat <<\_LT_EOF >> "$cfgfile"
28149# AIX sometimes has problems with the GCC collect2 program.  For some
28150# reason, if we set the COLLECT_NAMES environment variable, the problems
28151# vanish in a puff of smoke.
28152if test set != "${COLLECT_NAMES+set}"; then
28153  COLLECT_NAMES=
28154  export COLLECT_NAMES
28155fi
28156_LT_EOF
28157    ;;
28158  esac
28159
28160
28161
28162ltmain=$ac_aux_dir/ltmain.sh
28163
28164
28165  # We use sed instead of cat because bash on DJGPP gets confused if
28166  # if finds mixed CR/LF and LF-only lines.  Since sed operates in
28167  # text mode, it properly converts lines to CR/LF.  This bash problem
28168  # is reportedly fixed, but why not run on old versions too?
28169  $SED '$q' "$ltmain" >> "$cfgfile" \
28170     || (rm -f "$cfgfile"; exit 1)
28171
28172   mv -f "$cfgfile" "$ofile" ||
28173    (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
28174  chmod +x "$ofile"
28175
28176 ;;
28177    "disable-rpath":C)
28178	sed < libtool > libtool-2 \
28179	's/^hardcode_libdir_flag_spec.*$'/'hardcode_libdir_flag_spec=" -D__LIBTOOL_RPATH_SED__ "/'
28180	mv libtool-2 libtool
28181	chmod 755 libtool
28182	libtool="./libtool"
28183	 ;;
28184
28185  esac
28186done # for ac_tag
28187
28188
28189as_fn_exit 0
28190_ACEOF
28191ac_clean_files=$ac_clean_files_save
28192
28193test $ac_write_fail = 0 ||
28194  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
28195
28196
28197# configure is writing to config.log, and then calls config.status.
28198# config.status does its own redirection, appending to config.log.
28199# Unfortunately, on DOS this fails, as config.log is still kept open
28200# by configure, so config.status won't be able to write to it; its
28201# output is simply discarded.  So we exec the FD to /dev/null,
28202# effectively closing config.log, so it can be properly (re)opened and
28203# appended to by config.status.  When coming back to configure, we
28204# need to make the FD available again.
28205if test "$no_create" != yes; then
28206  ac_cs_success=:
28207  ac_config_status_args=
28208  test "$silent" = yes &&
28209    ac_config_status_args="$ac_config_status_args --quiet"
28210  exec 5>/dev/null
28211  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
28212  exec 5>>config.log
28213  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
28214  # would make configure fail if this is the last instruction.
28215  $ac_cs_success || as_fn_exit 1
28216fi
28217if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
28218  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
28219printf "%s\n" "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
28220fi
28221
28222
28223