xref: /freebsd/contrib/unbound/configure (revision b2efd602aea8b3cbc3fb215b9611946d04fceb10)
1#! /bin/sh
2# Guess values for system-dependent variables and create Makefiles.
3# Generated by GNU Autoconf 2.71 for unbound 1.24.0.
4#
5# Report bugs to <unbound-bugs@nlnetlabs.nl or https://github.com/NLnetLabs/unbound/issues>.
6#
7#
8# Copyright (C) 1992-1996, 1998-2017, 2020-2023 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
20if test ${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1
21then :
22  emulate sh
23  NULLCMD=:
24  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
25  # is contrary to our usage.  Disable this feature.
26  alias -g '${1+"$@"}'='"$@"'
27  setopt NO_GLOB_SUBST
28else case e in #(
29  e) case `(set -o) 2>/dev/null` in #(
30  *posix*) :
31    set -o posix ;; #(
32  *) :
33     ;;
34esac ;;
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="if test \${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1
144then :
145  emulate sh
146  NULLCMD=:
147  # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
148  # is contrary to our usage.  Disable this feature.
149  alias -g '\${1+\"\$@\"}'='\"\$@\"'
150  setopt NO_GLOB_SUBST
151else case e in #(
152  e) case \`(set -o) 2>/dev/null\` in #(
153  *posix*) :
154    set -o posix ;; #(
155  *) :
156     ;;
157esac ;;
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 case e in #(
176  e) exitcode=1; echo positional parameters were not saved. ;;
177esac
178fi
179test x\$exitcode = x0 || exit 1
180blah=\$(echo \$(echo blah))
181test x\"\$blah\" = xblah || exit 1
182test -x / || exit 1"
183  as_suggested="  as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
184  as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
185  eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
186  test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
187test \$(( 1 + 1 )) = 2 || exit 1
188
189  test -n \"\${ZSH_VERSION+set}\${BASH_VERSION+set}\" || (
190    ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
191    ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO
192    ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO
193    PATH=/empty FPATH=/empty; export PATH FPATH
194    test \"X\`printf %s \$ECHO\`\" = \"X\$ECHO\" \\
195      || test \"X\`print -r -- \$ECHO\`\" = \"X\$ECHO\" ) || exit 1"
196  if (eval "$as_required") 2>/dev/null
197then :
198  as_have_required=yes
199else case e in #(
200  e) as_have_required=no ;;
201esac
202fi
203  if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null
204then :
205
206else case e in #(
207  e) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
208as_found=false
209for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
210do
211  IFS=$as_save_IFS
212  case $as_dir in #(((
213    '') as_dir=./ ;;
214    */) ;;
215    *) as_dir=$as_dir/ ;;
216  esac
217  as_found=:
218  case $as_dir in #(
219	 /*)
220	   for as_base in sh bash ksh sh5; do
221	     # Try only shells that exist, to save several forks.
222	     as_shell=$as_dir$as_base
223	     if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
224		    as_run=a "$as_shell" -c "$as_bourne_compatible""$as_required" 2>/dev/null
225then :
226  CONFIG_SHELL=$as_shell as_have_required=yes
227		   if as_run=a "$as_shell" -c "$as_bourne_compatible""$as_suggested" 2>/dev/null
228then :
229  break 2
230fi
231fi
232	   done;;
233       esac
234  as_found=false
235done
236IFS=$as_save_IFS
237if $as_found
238then :
239
240else case e in #(
241  e) if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
242	      as_run=a "$SHELL" -c "$as_bourne_compatible""$as_required" 2>/dev/null
243then :
244  CONFIG_SHELL=$SHELL as_have_required=yes
245fi ;;
246esac
247fi
248
249
250      if test "x$CONFIG_SHELL" != x
251then :
252  export CONFIG_SHELL
253             # We cannot yet assume a decent shell, so we have to provide a
254# neutralization value for shells without unset; and this also
255# works around shells that cannot unset nonexistent variables.
256# Preserve -v and -x to the replacement shell.
257BASH_ENV=/dev/null
258ENV=/dev/null
259(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
260case $- in # ((((
261  *v*x* | *x*v* ) as_opts=-vx ;;
262  *v* ) as_opts=-v ;;
263  *x* ) as_opts=-x ;;
264  * ) as_opts= ;;
265esac
266exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
267# Admittedly, this is quite paranoid, since all the known shells bail
268# out after a failed 'exec'.
269printf "%s\n" "$0: could not re-execute with $CONFIG_SHELL" >&2
270exit 255
271fi
272
273    if test x$as_have_required = xno
274then :
275  printf "%s\n" "$0: This script requires a shell more modern than all"
276  printf "%s\n" "$0: the shells that I found on your system."
277  if test ${ZSH_VERSION+y} ; then
278    printf "%s\n" "$0: In particular, zsh $ZSH_VERSION has bugs and should"
279    printf "%s\n" "$0: be upgraded to zsh 4.3.4 or later."
280  else
281    printf "%s\n" "$0: Please tell bug-autoconf@gnu.org and
282$0: unbound-bugs@nlnetlabs.nl or
283$0: https://github.com/NLnetLabs/unbound/issues about your
284$0: system, including any error possibly output before this
285$0: message. Then install a modern shell, or manually run
286$0: the script under such a shell if you do have one."
287  fi
288  exit 1
289fi ;;
290esac
291fi
292fi
293SHELL=${CONFIG_SHELL-/bin/sh}
294export SHELL
295# Unset more variables known to interfere with behavior of common tools.
296CLICOLOR_FORCE= GREP_OPTIONS=
297unset CLICOLOR_FORCE GREP_OPTIONS
298
299## --------------------- ##
300## M4sh Shell Functions. ##
301## --------------------- ##
302# as_fn_unset VAR
303# ---------------
304# Portably unset VAR.
305as_fn_unset ()
306{
307  { eval $1=; unset $1;}
308}
309as_unset=as_fn_unset
310
311
312# as_fn_set_status STATUS
313# -----------------------
314# Set $? to STATUS, without forking.
315as_fn_set_status ()
316{
317  return $1
318} # as_fn_set_status
319
320# as_fn_exit STATUS
321# -----------------
322# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
323as_fn_exit ()
324{
325  set +e
326  as_fn_set_status $1
327  exit $1
328} # as_fn_exit
329
330# as_fn_mkdir_p
331# -------------
332# Create "$as_dir" as a directory, including parents if necessary.
333as_fn_mkdir_p ()
334{
335
336  case $as_dir in #(
337  -*) as_dir=./$as_dir;;
338  esac
339  test -d "$as_dir" || eval $as_mkdir_p || {
340    as_dirs=
341    while :; do
342      case $as_dir in #(
343      *\'*) as_qdir=`printf "%s\n" "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
344      *) as_qdir=$as_dir;;
345      esac
346      as_dirs="'$as_qdir' $as_dirs"
347      as_dir=`$as_dirname -- "$as_dir" ||
348$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
349	 X"$as_dir" : 'X\(//\)[^/]' \| \
350	 X"$as_dir" : 'X\(//\)$' \| \
351	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
352printf "%s\n" X"$as_dir" |
353    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
354	    s//\1/
355	    q
356	  }
357	  /^X\(\/\/\)[^/].*/{
358	    s//\1/
359	    q
360	  }
361	  /^X\(\/\/\)$/{
362	    s//\1/
363	    q
364	  }
365	  /^X\(\/\).*/{
366	    s//\1/
367	    q
368	  }
369	  s/.*/./; q'`
370      test -d "$as_dir" && break
371    done
372    test -z "$as_dirs" || eval "mkdir $as_dirs"
373  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
374
375
376} # as_fn_mkdir_p
377
378# as_fn_executable_p FILE
379# -----------------------
380# Test if FILE is an executable regular file.
381as_fn_executable_p ()
382{
383  test -f "$1" && test -x "$1"
384} # as_fn_executable_p
385# as_fn_append VAR VALUE
386# ----------------------
387# Append the text in VALUE to the end of the definition contained in VAR. Take
388# advantage of any shell optimizations that allow amortized linear growth over
389# repeated appends, instead of the typical quadratic growth present in naive
390# implementations.
391if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null
392then :
393  eval 'as_fn_append ()
394  {
395    eval $1+=\$2
396  }'
397else case e in #(
398  e) as_fn_append ()
399  {
400    eval $1=\$$1\$2
401  } ;;
402esac
403fi # as_fn_append
404
405# as_fn_arith ARG...
406# ------------------
407# Perform arithmetic evaluation on the ARGs, and store the result in the
408# global $as_val. Take advantage of shells that can avoid forks. The arguments
409# must be portable across $(()) and expr.
410if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null
411then :
412  eval 'as_fn_arith ()
413  {
414    as_val=$(( $* ))
415  }'
416else case e in #(
417  e) as_fn_arith ()
418  {
419    as_val=`expr "$@" || test $? -eq 1`
420  } ;;
421esac
422fi # as_fn_arith
423
424
425# as_fn_error STATUS ERROR [LINENO LOG_FD]
426# ----------------------------------------
427# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
428# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
429# script with STATUS, using 1 if that was 0.
430as_fn_error ()
431{
432  as_status=$1; test $as_status -eq 0 && as_status=1
433  if test "$4"; then
434    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
435    printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
436  fi
437  printf "%s\n" "$as_me: error: $2" >&2
438  as_fn_exit $as_status
439} # as_fn_error
440
441if expr a : '\(a\)' >/dev/null 2>&1 &&
442   test "X`expr 00001 : '.*\(...\)'`" = X001; then
443  as_expr=expr
444else
445  as_expr=false
446fi
447
448if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
449  as_basename=basename
450else
451  as_basename=false
452fi
453
454if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
455  as_dirname=dirname
456else
457  as_dirname=false
458fi
459
460as_me=`$as_basename -- "$0" ||
461$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
462	 X"$0" : 'X\(//\)$' \| \
463	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
464printf "%s\n" X/"$0" |
465    sed '/^.*\/\([^/][^/]*\)\/*$/{
466	    s//\1/
467	    q
468	  }
469	  /^X\/\(\/\/\)$/{
470	    s//\1/
471	    q
472	  }
473	  /^X\/\(\/\).*/{
474	    s//\1/
475	    q
476	  }
477	  s/.*/./; q'`
478
479# Avoid depending upon Character Ranges.
480as_cr_letters='abcdefghijklmnopqrstuvwxyz'
481as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
482as_cr_Letters=$as_cr_letters$as_cr_LETTERS
483as_cr_digits='0123456789'
484as_cr_alnum=$as_cr_Letters$as_cr_digits
485
486
487  as_lineno_1=$LINENO as_lineno_1a=$LINENO
488  as_lineno_2=$LINENO as_lineno_2a=$LINENO
489  eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
490  test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
491  # Blame Lee E. McMahon (1931-1989) for sed's syntax.  :-)
492  sed -n '
493    p
494    /[$]LINENO/=
495  ' <$as_myself |
496    sed '
497      t clear
498      :clear
499      s/[$]LINENO.*/&-/
500      t lineno
501      b
502      :lineno
503      N
504      :loop
505      s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
506      t loop
507      s/-\n.*//
508    ' >$as_me.lineno &&
509  chmod +x "$as_me.lineno" ||
510    { printf "%s\n" "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
511
512  # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
513  # already done that, so ensure we don't try to do so again and fall
514  # in an infinite loop.  This has already happened in practice.
515  _as_can_reexec=no; export _as_can_reexec
516  # Don't try to exec as it changes $[0], causing all sort of problems
517  # (the dirname of $[0] is not the place where we might find the
518  # original and so on.  Autoconf is especially sensitive to this).
519  . "./$as_me.lineno"
520  # Exit status is that of the last command.
521  exit
522}
523
524
525# Determine whether it's possible to make 'echo' print without a newline.
526# These variables are no longer used directly by Autoconf, but are AC_SUBSTed
527# for compatibility with existing Makefiles.
528ECHO_C= ECHO_N= ECHO_T=
529case `echo -n x` in #(((((
530-n*)
531  case `echo 'xy\c'` in
532  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
533  xy)  ECHO_C='\c';;
534  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
535       ECHO_T='	';;
536  esac;;
537*)
538  ECHO_N='-n';;
539esac
540
541# For backward compatibility with old third-party macros, we provide
542# the shell variables $as_echo and $as_echo_n.  New code should use
543# AS_ECHO(["message"]) and AS_ECHO_N(["message"]), respectively.
544as_echo='printf %s\n'
545as_echo_n='printf %s'
546
547rm -f conf$$ conf$$.exe conf$$.file
548if test -d conf$$.dir; then
549  rm -f conf$$.dir/conf$$.file
550else
551  rm -f conf$$.dir
552  mkdir conf$$.dir 2>/dev/null
553fi
554if (echo >conf$$.file) 2>/dev/null; then
555  if ln -s conf$$.file conf$$ 2>/dev/null; then
556    as_ln_s='ln -s'
557    # ... but there are two gotchas:
558    # 1) On MSYS, both 'ln -s file dir' and 'ln file dir' fail.
559    # 2) DJGPP < 2.04 has no symlinks; 'ln -s' creates a wrapper executable.
560    # In both cases, we have to default to 'cp -pR'.
561    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
562      as_ln_s='cp -pR'
563  elif ln conf$$.file conf$$ 2>/dev/null; then
564    as_ln_s=ln
565  else
566    as_ln_s='cp -pR'
567  fi
568else
569  as_ln_s='cp -pR'
570fi
571rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
572rmdir conf$$.dir 2>/dev/null
573
574if mkdir -p . 2>/dev/null; then
575  as_mkdir_p='mkdir -p "$as_dir"'
576else
577  test -d ./-p && rmdir ./-p
578  as_mkdir_p=false
579fi
580
581as_test_x='test -x'
582as_executable_p=as_fn_executable_p
583
584# Sed expression to map a string onto a valid CPP name.
585as_sed_cpp="y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
586as_tr_cpp="eval sed '$as_sed_cpp'" # deprecated
587
588# Sed expression to map a string onto a valid variable name.
589as_sed_sh="y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
590as_tr_sh="eval sed '$as_sed_sh'" # deprecated
591
592SHELL=${CONFIG_SHELL-/bin/sh}
593
594
595test -n "$DJDIR" || exec 7<&0 </dev/null
596exec 6>&1
597
598# Name of the host.
599# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
600# so uname gets run too.
601ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
602
603#
604# Initializations.
605#
606ac_default_prefix=/usr/local
607ac_clean_files=
608ac_config_libobj_dir=.
609LIBOBJS=
610cross_compiling=no
611subdirs=
612MFLAGS=
613MAKEFLAGS=
614
615# Identity of this package.
616PACKAGE_NAME='unbound'
617PACKAGE_TARNAME='unbound'
618PACKAGE_VERSION='1.24.0'
619PACKAGE_STRING='unbound 1.24.0'
620PACKAGE_BUGREPORT='unbound-bugs@nlnetlabs.nl or https://github.com/NLnetLabs/unbound/issues'
621PACKAGE_URL=''
622
623# Factoring default headers for most tests.
624ac_includes_default="\
625#include <stddef.h>
626#ifdef HAVE_STDIO_H
627# include <stdio.h>
628#endif
629#ifdef HAVE_STDLIB_H
630# include <stdlib.h>
631#endif
632#ifdef HAVE_STRING_H
633# include <string.h>
634#endif
635#ifdef HAVE_INTTYPES_H
636# include <inttypes.h>
637#endif
638#ifdef HAVE_STDINT_H
639# include <stdint.h>
640#endif
641#ifdef HAVE_STRINGS_H
642# include <strings.h>
643#endif
644#ifdef HAVE_SYS_TYPES_H
645# include <sys/types.h>
646#endif
647#ifdef HAVE_SYS_STAT_H
648# include <sys/stat.h>
649#endif
650#ifdef HAVE_UNISTD_H
651# include <unistd.h>
652#endif"
653
654ac_header_c_list=
655ac_func_c_list=
656enable_year2038=no
657ac_subst_vars='LTLIBOBJS
658date
659version
660INSTALLTARGET
661ALLTARGET
662SOURCEFILE
663SOURCEDETERMINE
664IPSET_OBJ
665IPSET_SRC
666IPSECMOD_HEADER
667IPSECMOD_OBJ
668CACHEDB_OBJ
669CACHEDB_SRC
670DNSCRYPT_OBJ
671DNSCRYPT_SRC
672ENABLE_DNSCRYPT
673ENABLE_DNSCRYPT_XCHACHA20
674DNSTAP_OBJ
675DNSTAP_SRC
676DNSTAP_SOCKET_TESTBIN
677DNSTAP_SOCKET_PATH
678opt_dnstap_socket_path
679ENABLE_DNSTAP
680PROTOBUFC_LIBS
681PROTOBUFC_CFLAGS
682PROTOC_GEN_C
683PROTOC_C
684PROTOC
685UBSYMS
686EXTRALINK
687COMMON_OBJ_ALL_SYMBOLS
688LIBOBJ_WITHOUT_CTIME
689LIBOBJ_WITHOUT_CTIMEARC4
690WIN_CHECKCONF_OBJ_LINK
691WIN_CONTROL_OBJ_LINK
692WIN_UBANCHOR_OBJ_LINK
693WIN_HOST_OBJ_LINK
694WIN_DAEMON_OBJ_LINK
695WIN_DAEMON_OBJ
696WIN_DAEMON_SRC
697WINAPPS
698WINDRES
699CHECKLOCK_OBJ
700staticexe
701PC_LIBEVENT_DEPENDENCY
702UNBOUND_EVENT_UNINSTALL
703UNBOUND_EVENT_INSTALL
704SUBNET_HEADER
705SUBNET_OBJ
706PC_LIBBSD_DEPENDENCY
707SSLLIB
708HAVE_SSL
709PC_CRYPTO_DEPENDENCY
710CONFIG_DATE
711SOURCE_DATE_EPOCH
712GCC_DOCKER_LINTFLAGS
713NETBSD_LINTFLAGS
714PYUNBOUND_UNINSTALL
715PYUNBOUND_INSTALL
716PYUNBOUND_TARGET
717PYUNBOUND_OBJ
718WITH_PYUNBOUND
719PYTHONMOD_UNINSTALL
720PYTHONMOD_INSTALL
721PYTHONMOD_HEADER
722PYTHONMOD_OBJ
723WITH_PYTHONMODULE
724swig
725SWIG_LIB
726SWIG
727PC_PY_DEPENDENCY
728PYTHON_LIBS
729PY_MAJOR_VERSION
730PYTHON_SITE_PKG
731PYTHON_LDFLAGS
732PYTHON_CPPFLAGS
733PYTHON
734PYTHON_VERSION
735DYNLIBMOD_EXTRALIBS
736DYNLIBMOD_HEADER
737DYNLIBMOD_OBJ
738WITH_DYNLIBMODULE
739PTHREAD_CFLAGS_ONLY
740PTHREAD_CFLAGS
741PTHREAD_LIBS
742PTHREAD_CXX
743PTHREAD_CC
744ax_pthread_config
745CPP
746ASYNCLOOK_ALLOCCHECK_EXTRA_OBJ
747SLDNS_ALLOCCHECK_EXTRA_OBJ
748USE_SYSTEMD_FALSE
749USE_SYSTEMD_TRUE
750SYSTEMD_DAEMON_LIBS
751SYSTEMD_DAEMON_CFLAGS
752SYSTEMD_LIBS
753SYSTEMD_CFLAGS
754RUNTIME_PATH
755LIBOBJS
756PKG_CONFIG_LIBDIR
757PKG_CONFIG_PATH
758PKG_CONFIG
759LT_SYS_LIBRARY_PATH
760OTOOL64
761OTOOL
762LIPO
763NMEDIT
764DSYMUTIL
765MANIFEST_TOOL
766AWK
767RANLIB
768ac_ct_AR
769DLLTOOL
770OBJDUMP
771LN_S
772NM
773ac_ct_DUMPBIN
774DUMPBIN
775LD
776FGREP
777EGREP
778SED
779LIBTOOL
780AR
781host_os
782host_vendor
783host_cpu
784host
785build_os
786build_vendor
787build_cpu
788build
789libtool
790STRIP
791doxygen
792YFLAGS
793YACC
794LEXLIB
795LEX_OUTPUT_ROOT
796LEX
797debug_enabled
798DEPFLAG
799GREP
800UNBOUND_USERNAME
801UNBOUND_ROOTCERT_FILE
802UNBOUND_ROOTKEY_FILE
803UNBOUND_PIDFILE
804UNBOUND_SHARE_DIR
805UNBOUND_CHROOT_DIR
806UNBOUND_RUN_DIR
807ub_conf_dir
808ub_conf_file
809UNBOUND_LOCALSTATE_DIR
810UNBOUND_SYSCONF_DIR
811UNBOUND_SBIN_DIR
812OBJEXT
813EXEEXT
814ac_ct_CC
815CPPFLAGS
816LDFLAGS
817CFLAGS
818CC
819LIBUNBOUND_AGE
820LIBUNBOUND_REVISION
821LIBUNBOUND_CURRENT
822UNBOUND_VERSION_MICRO
823UNBOUND_VERSION_MINOR
824UNBOUND_VERSION_MAJOR
825target_alias
826host_alias
827build_alias
828LIBS
829ECHO_T
830ECHO_N
831ECHO_C
832DEFS
833mandir
834localedir
835libdir
836psdir
837pdfdir
838dvidir
839htmldir
840infodir
841docdir
842oldincludedir
843includedir
844runstatedir
845localstatedir
846sharedstatedir
847sysconfdir
848datadir
849datarootdir
850libexecdir
851sbindir
852bindir
853program_transform_name
854prefix
855exec_prefix
856PACKAGE_URL
857PACKAGE_BUGREPORT
858PACKAGE_STRING
859PACKAGE_VERSION
860PACKAGE_TARNAME
861PACKAGE_NAME
862PATH_SEPARATOR
863SHELL'
864ac_subst_files=''
865ac_user_opts='
866enable_option_checking
867with_conf_file
868with_run_dir
869with_chroot_dir
870with_share_dir
871with_pidfile
872with_rootkey_file
873with_rootcert_file
874with_username
875enable_checking
876enable_debug
877enable_flto
878enable_pie
879enable_relro_now
880enable_shared
881enable_static
882with_pic
883enable_fast_install
884with_aix_soname
885with_gnu_ld
886with_sysroot
887enable_libtool_lock
888enable_rpath
889enable_largefile
890enable_systemd
891enable_alloc_checks
892enable_alloc_lite
893enable_alloc_nonregional
894with_pthreads
895with_solaris_threads
896with_syslog_facility
897with_dynlibmodule
898with_pyunbound
899with_pythonmodule
900enable_swig_version_check
901with_nss
902with_nettle
903with_ssl
904with_libbsd
905enable_sha1
906enable_sha2
907enable_subnet
908enable_gost
909enable_ecdsa
910enable_dsa
911with_deprecate_rsa_1024
912enable_ed25519
913enable_ed448
914enable_event_api
915enable_tfo_client
916enable_tfo_server
917with_libevent
918with_libexpat
919with_libhiredis
920with_libnghttp2
921with_libngtcp2
922enable_static_exe
923enable_fully_static
924enable_lock_checks
925enable_allsymbols
926enable_dnstap
927with_dnstap_socket_path
928with_protobuf_c
929enable_dnscrypt
930with_libsodium
931enable_cachedb
932enable_ipsecmod
933enable_ipset
934with_libmnl
935enable_explicit_port_randomisation
936enable_linux_ip_local_port_range
937with_libunbound_only
938enable_year2038
939'
940      ac_precious_vars='build_alias
941host_alias
942target_alias
943CC
944CFLAGS
945LDFLAGS
946LIBS
947CPPFLAGS
948YACC
949YFLAGS
950LT_SYS_LIBRARY_PATH
951PKG_CONFIG
952PKG_CONFIG_PATH
953PKG_CONFIG_LIBDIR
954SYSTEMD_CFLAGS
955SYSTEMD_LIBS
956SYSTEMD_DAEMON_CFLAGS
957SYSTEMD_DAEMON_LIBS
958CPP
959PYTHON_VERSION
960SOURCE_DATE_EPOCH
961PROTOBUFC_CFLAGS
962PROTOBUFC_LIBS'
963
964
965# Initialize some variables set by options.
966ac_init_help=
967ac_init_version=false
968ac_unrecognized_opts=
969ac_unrecognized_sep=
970# The variables have the same names as the options, with
971# dashes changed to underlines.
972cache_file=/dev/null
973exec_prefix=NONE
974no_create=
975no_recursion=
976prefix=NONE
977program_prefix=NONE
978program_suffix=NONE
979program_transform_name=s,x,x,
980silent=
981site=
982srcdir=
983verbose=
984x_includes=NONE
985x_libraries=NONE
986
987# Installation directory options.
988# These are left unexpanded so users can "make install exec_prefix=/foo"
989# and all the variables that are supposed to be based on exec_prefix
990# by default will actually change.
991# Use braces instead of parens because sh, perl, etc. also accept them.
992# (The list follows the same order as the GNU Coding Standards.)
993bindir='${exec_prefix}/bin'
994sbindir='${exec_prefix}/sbin'
995libexecdir='${exec_prefix}/libexec'
996datarootdir='${prefix}/share'
997datadir='${datarootdir}'
998sysconfdir='${prefix}/etc'
999sharedstatedir='${prefix}/com'
1000localstatedir='${prefix}/var'
1001runstatedir='${localstatedir}/run'
1002includedir='${prefix}/include'
1003oldincludedir='/usr/include'
1004docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1005infodir='${datarootdir}/info'
1006htmldir='${docdir}'
1007dvidir='${docdir}'
1008pdfdir='${docdir}'
1009psdir='${docdir}'
1010libdir='${exec_prefix}/lib'
1011localedir='${datarootdir}/locale'
1012mandir='${datarootdir}/man'
1013
1014ac_prev=
1015ac_dashdash=
1016for ac_option
1017do
1018  # If the previous option needs an argument, assign it.
1019  if test -n "$ac_prev"; then
1020    eval $ac_prev=\$ac_option
1021    ac_prev=
1022    continue
1023  fi
1024
1025  case $ac_option in
1026  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1027  *=)   ac_optarg= ;;
1028  *)    ac_optarg=yes ;;
1029  esac
1030
1031  case $ac_dashdash$ac_option in
1032  --)
1033    ac_dashdash=yes ;;
1034
1035  -bindir | --bindir | --bindi | --bind | --bin | --bi)
1036    ac_prev=bindir ;;
1037  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1038    bindir=$ac_optarg ;;
1039
1040  -build | --build | --buil | --bui | --bu)
1041    ac_prev=build_alias ;;
1042  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1043    build_alias=$ac_optarg ;;
1044
1045  -cache-file | --cache-file | --cache-fil | --cache-fi \
1046  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1047    ac_prev=cache_file ;;
1048  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1049  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1050    cache_file=$ac_optarg ;;
1051
1052  --config-cache | -C)
1053    cache_file=config.cache ;;
1054
1055  -datadir | --datadir | --datadi | --datad)
1056    ac_prev=datadir ;;
1057  -datadir=* | --datadir=* | --datadi=* | --datad=*)
1058    datadir=$ac_optarg ;;
1059
1060  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1061  | --dataroo | --dataro | --datar)
1062    ac_prev=datarootdir ;;
1063  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1064  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1065    datarootdir=$ac_optarg ;;
1066
1067  -disable-* | --disable-*)
1068    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1069    # Reject names that are not valid shell variable names.
1070    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1071      as_fn_error $? "invalid feature name: '$ac_useropt'"
1072    ac_useropt_orig=$ac_useropt
1073    ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
1074    case $ac_user_opts in
1075      *"
1076"enable_$ac_useropt"
1077"*) ;;
1078      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1079	 ac_unrecognized_sep=', ';;
1080    esac
1081    eval enable_$ac_useropt=no ;;
1082
1083  -docdir | --docdir | --docdi | --doc | --do)
1084    ac_prev=docdir ;;
1085  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1086    docdir=$ac_optarg ;;
1087
1088  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1089    ac_prev=dvidir ;;
1090  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1091    dvidir=$ac_optarg ;;
1092
1093  -enable-* | --enable-*)
1094    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1095    # Reject names that are not valid shell variable names.
1096    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1097      as_fn_error $? "invalid feature name: '$ac_useropt'"
1098    ac_useropt_orig=$ac_useropt
1099    ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
1100    case $ac_user_opts in
1101      *"
1102"enable_$ac_useropt"
1103"*) ;;
1104      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1105	 ac_unrecognized_sep=', ';;
1106    esac
1107    eval enable_$ac_useropt=\$ac_optarg ;;
1108
1109  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1110  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1111  | --exec | --exe | --ex)
1112    ac_prev=exec_prefix ;;
1113  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1114  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1115  | --exec=* | --exe=* | --ex=*)
1116    exec_prefix=$ac_optarg ;;
1117
1118  -gas | --gas | --ga | --g)
1119    # Obsolete; use --with-gas.
1120    with_gas=yes ;;
1121
1122  -help | --help | --hel | --he | -h)
1123    ac_init_help=long ;;
1124  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1125    ac_init_help=recursive ;;
1126  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1127    ac_init_help=short ;;
1128
1129  -host | --host | --hos | --ho)
1130    ac_prev=host_alias ;;
1131  -host=* | --host=* | --hos=* | --ho=*)
1132    host_alias=$ac_optarg ;;
1133
1134  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1135    ac_prev=htmldir ;;
1136  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1137  | --ht=*)
1138    htmldir=$ac_optarg ;;
1139
1140  -includedir | --includedir | --includedi | --included | --include \
1141  | --includ | --inclu | --incl | --inc)
1142    ac_prev=includedir ;;
1143  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1144  | --includ=* | --inclu=* | --incl=* | --inc=*)
1145    includedir=$ac_optarg ;;
1146
1147  -infodir | --infodir | --infodi | --infod | --info | --inf)
1148    ac_prev=infodir ;;
1149  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1150    infodir=$ac_optarg ;;
1151
1152  -libdir | --libdir | --libdi | --libd)
1153    ac_prev=libdir ;;
1154  -libdir=* | --libdir=* | --libdi=* | --libd=*)
1155    libdir=$ac_optarg ;;
1156
1157  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1158  | --libexe | --libex | --libe)
1159    ac_prev=libexecdir ;;
1160  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1161  | --libexe=* | --libex=* | --libe=*)
1162    libexecdir=$ac_optarg ;;
1163
1164  -localedir | --localedir | --localedi | --localed | --locale)
1165    ac_prev=localedir ;;
1166  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1167    localedir=$ac_optarg ;;
1168
1169  -localstatedir | --localstatedir | --localstatedi | --localstated \
1170  | --localstate | --localstat | --localsta | --localst | --locals)
1171    ac_prev=localstatedir ;;
1172  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1173  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1174    localstatedir=$ac_optarg ;;
1175
1176  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1177    ac_prev=mandir ;;
1178  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1179    mandir=$ac_optarg ;;
1180
1181  -nfp | --nfp | --nf)
1182    # Obsolete; use --without-fp.
1183    with_fp=no ;;
1184
1185  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1186  | --no-cr | --no-c | -n)
1187    no_create=yes ;;
1188
1189  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1190  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1191    no_recursion=yes ;;
1192
1193  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1194  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1195  | --oldin | --oldi | --old | --ol | --o)
1196    ac_prev=oldincludedir ;;
1197  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1198  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1199  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1200    oldincludedir=$ac_optarg ;;
1201
1202  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1203    ac_prev=prefix ;;
1204  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1205    prefix=$ac_optarg ;;
1206
1207  -program-prefix | --program-prefix | --program-prefi | --program-pref \
1208  | --program-pre | --program-pr | --program-p)
1209    ac_prev=program_prefix ;;
1210  -program-prefix=* | --program-prefix=* | --program-prefi=* \
1211  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1212    program_prefix=$ac_optarg ;;
1213
1214  -program-suffix | --program-suffix | --program-suffi | --program-suff \
1215  | --program-suf | --program-su | --program-s)
1216    ac_prev=program_suffix ;;
1217  -program-suffix=* | --program-suffix=* | --program-suffi=* \
1218  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1219    program_suffix=$ac_optarg ;;
1220
1221  -program-transform-name | --program-transform-name \
1222  | --program-transform-nam | --program-transform-na \
1223  | --program-transform-n | --program-transform- \
1224  | --program-transform | --program-transfor \
1225  | --program-transfo | --program-transf \
1226  | --program-trans | --program-tran \
1227  | --progr-tra | --program-tr | --program-t)
1228    ac_prev=program_transform_name ;;
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    program_transform_name=$ac_optarg ;;
1237
1238  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1239    ac_prev=pdfdir ;;
1240  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1241    pdfdir=$ac_optarg ;;
1242
1243  -psdir | --psdir | --psdi | --psd | --ps)
1244    ac_prev=psdir ;;
1245  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1246    psdir=$ac_optarg ;;
1247
1248  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1249  | -silent | --silent | --silen | --sile | --sil)
1250    silent=yes ;;
1251
1252  -runstatedir | --runstatedir | --runstatedi | --runstated \
1253  | --runstate | --runstat | --runsta | --runst | --runs \
1254  | --run | --ru | --r)
1255    ac_prev=runstatedir ;;
1256  -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
1257  | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
1258  | --run=* | --ru=* | --r=*)
1259    runstatedir=$ac_optarg ;;
1260
1261  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1262    ac_prev=sbindir ;;
1263  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1264  | --sbi=* | --sb=*)
1265    sbindir=$ac_optarg ;;
1266
1267  -sharedstatedir | --sharedstatedir | --sharedstatedi \
1268  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1269  | --sharedst | --shareds | --shared | --share | --shar \
1270  | --sha | --sh)
1271    ac_prev=sharedstatedir ;;
1272  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1273  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1274  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1275  | --sha=* | --sh=*)
1276    sharedstatedir=$ac_optarg ;;
1277
1278  -site | --site | --sit)
1279    ac_prev=site ;;
1280  -site=* | --site=* | --sit=*)
1281    site=$ac_optarg ;;
1282
1283  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1284    ac_prev=srcdir ;;
1285  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1286    srcdir=$ac_optarg ;;
1287
1288  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1289  | --syscon | --sysco | --sysc | --sys | --sy)
1290    ac_prev=sysconfdir ;;
1291  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1292  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1293    sysconfdir=$ac_optarg ;;
1294
1295  -target | --target | --targe | --targ | --tar | --ta | --t)
1296    ac_prev=target_alias ;;
1297  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1298    target_alias=$ac_optarg ;;
1299
1300  -v | -verbose | --verbose | --verbos | --verbo | --verb)
1301    verbose=yes ;;
1302
1303  -version | --version | --versio | --versi | --vers | -V)
1304    ac_init_version=: ;;
1305
1306  -with-* | --with-*)
1307    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1308    # Reject names that are not valid shell variable names.
1309    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1310      as_fn_error $? "invalid package name: '$ac_useropt'"
1311    ac_useropt_orig=$ac_useropt
1312    ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
1313    case $ac_user_opts in
1314      *"
1315"with_$ac_useropt"
1316"*) ;;
1317      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1318	 ac_unrecognized_sep=', ';;
1319    esac
1320    eval with_$ac_useropt=\$ac_optarg ;;
1321
1322  -without-* | --without-*)
1323    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1324    # Reject names that are not valid shell variable names.
1325    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1326      as_fn_error $? "invalid package name: '$ac_useropt'"
1327    ac_useropt_orig=$ac_useropt
1328    ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
1329    case $ac_user_opts in
1330      *"
1331"with_$ac_useropt"
1332"*) ;;
1333      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1334	 ac_unrecognized_sep=', ';;
1335    esac
1336    eval with_$ac_useropt=no ;;
1337
1338  --x)
1339    # Obsolete; use --with-x.
1340    with_x=yes ;;
1341
1342  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1343  | --x-incl | --x-inc | --x-in | --x-i)
1344    ac_prev=x_includes ;;
1345  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1346  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1347    x_includes=$ac_optarg ;;
1348
1349  -x-libraries | --x-libraries | --x-librarie | --x-librari \
1350  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1351    ac_prev=x_libraries ;;
1352  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1353  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1354    x_libraries=$ac_optarg ;;
1355
1356  -*) as_fn_error $? "unrecognized option: '$ac_option'
1357Try '$0 --help' for more information"
1358    ;;
1359
1360  *=*)
1361    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1362    # Reject names that are not valid shell variable names.
1363    case $ac_envvar in #(
1364      '' | [0-9]* | *[!_$as_cr_alnum]* )
1365      as_fn_error $? "invalid variable name: '$ac_envvar'" ;;
1366    esac
1367    eval $ac_envvar=\$ac_optarg
1368    export $ac_envvar ;;
1369
1370  *)
1371    # FIXME: should be removed in autoconf 3.0.
1372    printf "%s\n" "$as_me: WARNING: you should use --build, --host, --target" >&2
1373    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1374      printf "%s\n" "$as_me: WARNING: invalid host type: $ac_option" >&2
1375    : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1376    ;;
1377
1378  esac
1379done
1380
1381if test -n "$ac_prev"; then
1382  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1383  as_fn_error $? "missing argument to $ac_option"
1384fi
1385
1386if test -n "$ac_unrecognized_opts"; then
1387  case $enable_option_checking in
1388    no) ;;
1389    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1390    *)     printf "%s\n" "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1391  esac
1392fi
1393
1394# Check all directory arguments for consistency.
1395for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
1396		datadir sysconfdir sharedstatedir localstatedir includedir \
1397		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1398		libdir localedir mandir runstatedir
1399do
1400  eval ac_val=\$$ac_var
1401  # Remove trailing slashes.
1402  case $ac_val in
1403    */ )
1404      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1405      eval $ac_var=\$ac_val;;
1406  esac
1407  # Be sure to have absolute directory names.
1408  case $ac_val in
1409    [\\/$]* | ?:[\\/]* )  continue;;
1410    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1411  esac
1412  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1413done
1414
1415# There might be people who depend on the old broken behavior: '$host'
1416# used to hold the argument of --host etc.
1417# FIXME: To remove some day.
1418build=$build_alias
1419host=$host_alias
1420target=$target_alias
1421
1422# FIXME: To remove some day.
1423if test "x$host_alias" != x; then
1424  if test "x$build_alias" = x; then
1425    cross_compiling=maybe
1426  elif test "x$build_alias" != "x$host_alias"; then
1427    cross_compiling=yes
1428  fi
1429fi
1430
1431ac_tool_prefix=
1432test -n "$host_alias" && ac_tool_prefix=$host_alias-
1433
1434test "$silent" = yes && exec 6>/dev/null
1435
1436
1437ac_pwd=`pwd` && test -n "$ac_pwd" &&
1438ac_ls_di=`ls -di .` &&
1439ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1440  as_fn_error $? "working directory cannot be determined"
1441test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1442  as_fn_error $? "pwd does not report name of working directory"
1443
1444
1445# Find the source files, if location was not specified.
1446if test -z "$srcdir"; then
1447  ac_srcdir_defaulted=yes
1448  # Try the directory containing this script, then the parent directory.
1449  ac_confdir=`$as_dirname -- "$as_myself" ||
1450$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1451	 X"$as_myself" : 'X\(//\)[^/]' \| \
1452	 X"$as_myself" : 'X\(//\)$' \| \
1453	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1454printf "%s\n" X"$as_myself" |
1455    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1456	    s//\1/
1457	    q
1458	  }
1459	  /^X\(\/\/\)[^/].*/{
1460	    s//\1/
1461	    q
1462	  }
1463	  /^X\(\/\/\)$/{
1464	    s//\1/
1465	    q
1466	  }
1467	  /^X\(\/\).*/{
1468	    s//\1/
1469	    q
1470	  }
1471	  s/.*/./; q'`
1472  srcdir=$ac_confdir
1473  if test ! -r "$srcdir/$ac_unique_file"; then
1474    srcdir=..
1475  fi
1476else
1477  ac_srcdir_defaulted=no
1478fi
1479if test ! -r "$srcdir/$ac_unique_file"; then
1480  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1481  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1482fi
1483ac_msg="sources are in $srcdir, but 'cd $srcdir' does not work"
1484ac_abs_confdir=`(
1485	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1486	pwd)`
1487# When building in place, set srcdir=.
1488if test "$ac_abs_confdir" = "$ac_pwd"; then
1489  srcdir=.
1490fi
1491# Remove unnecessary trailing slashes from srcdir.
1492# Double slashes in file names in object file debugging info
1493# mess up M-x gdb in Emacs.
1494case $srcdir in
1495*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1496esac
1497for ac_var in $ac_precious_vars; do
1498  eval ac_env_${ac_var}_set=\${${ac_var}+set}
1499  eval ac_env_${ac_var}_value=\$${ac_var}
1500  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1501  eval ac_cv_env_${ac_var}_value=\$${ac_var}
1502done
1503
1504#
1505# Report the --help message.
1506#
1507if test "$ac_init_help" = "long"; then
1508  # Omit some internal or obsolete options to make the list less imposing.
1509  # This message is too long to be a string in the A/UX 3.1 sh.
1510  cat <<_ACEOF
1511\`configure' configures unbound 1.24.0 to adapt to many kinds of systems.
1512
1513Usage: $0 [OPTION]... [VAR=VALUE]...
1514
1515To assign environment variables (e.g., CC, CFLAGS...), specify them as
1516VAR=VALUE.  See below for descriptions of some of the useful variables.
1517
1518Defaults for the options are specified in brackets.
1519
1520Configuration:
1521  -h, --help              display this help and exit
1522      --help=short        display options specific to this package
1523      --help=recursive    display the short help of all the included packages
1524  -V, --version           display version information and exit
1525  -q, --quiet, --silent   do not print 'checking ...' messages
1526      --cache-file=FILE   cache test results in FILE [disabled]
1527  -C, --config-cache      alias for '--cache-file=config.cache'
1528  -n, --no-create         do not create output files
1529      --srcdir=DIR        find the sources in DIR [configure dir or '..']
1530
1531Installation directories:
1532  --prefix=PREFIX         install architecture-independent files in PREFIX
1533                          [$ac_default_prefix]
1534  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1535                          [PREFIX]
1536
1537By default, 'make install' will install all the files in
1538'$ac_default_prefix/bin', '$ac_default_prefix/lib' etc.  You can specify
1539an installation prefix other than '$ac_default_prefix' using '--prefix',
1540for instance '--prefix=\$HOME'.
1541
1542For better control, use the options below.
1543
1544Fine tuning of the installation directories:
1545  --bindir=DIR            user executables [EPREFIX/bin]
1546  --sbindir=DIR           system admin executables [EPREFIX/sbin]
1547  --libexecdir=DIR        program executables [EPREFIX/libexec]
1548  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1549  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1550  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1551  --runstatedir=DIR       modifiable per-process data [LOCALSTATEDIR/run]
1552  --libdir=DIR            object code libraries [EPREFIX/lib]
1553  --includedir=DIR        C header files [PREFIX/include]
1554  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1555  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1556  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1557  --infodir=DIR           info documentation [DATAROOTDIR/info]
1558  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1559  --mandir=DIR            man documentation [DATAROOTDIR/man]
1560  --docdir=DIR            documentation root [DATAROOTDIR/doc/unbound]
1561  --htmldir=DIR           html documentation [DOCDIR]
1562  --dvidir=DIR            dvi documentation [DOCDIR]
1563  --pdfdir=DIR            pdf documentation [DOCDIR]
1564  --psdir=DIR             ps documentation [DOCDIR]
1565_ACEOF
1566
1567  cat <<\_ACEOF
1568
1569System types:
1570  --build=BUILD     configure for building on BUILD [guessed]
1571  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1572_ACEOF
1573fi
1574
1575if test -n "$ac_init_help"; then
1576  case $ac_init_help in
1577     short | recursive ) echo "Configuration of unbound 1.24.0:";;
1578   esac
1579  cat <<\_ACEOF
1580
1581Optional Features:
1582  --disable-option-checking  ignore unrecognized --enable/--with options
1583  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1584  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1585  --enable-checking       Enable warnings, asserts, makefile-dependencies
1586  --enable-debug          same as enable-checking
1587  --disable-flto          Disable link-time optimization (gcc specific option)
1588  --enable-pie            Enable Position-Independent Executable (eg. to fully
1589                          benefit from ASLR, small performance penalty)
1590  --enable-relro-now      Enable full relocation binding at load-time (RELRO
1591                          NOW, to protect GOT and .dtor areas)
1592  --enable-shared[=PKGS]  build shared libraries [default=yes]
1593  --enable-static[=PKGS]  build static libraries [default=yes]
1594  --enable-fast-install[=PKGS]
1595                          optimize for fast installation [default=yes]
1596  --disable-libtool-lock  avoid locking (might break parallel builds)
1597  --disable-rpath         disable hardcoded rpath (default=enabled)
1598  --disable-largefile     omit support for large files
1599  --enable-systemd        compile with systemd support (requires libsystemd,
1600                          pkg-config)
1601  --enable-alloc-checks   enable to memory allocation statistics, for debug
1602                          purposes
1603  --enable-alloc-lite     enable for lightweight alloc assertions, for debug
1604                          purposes
1605  --enable-alloc-nonregional
1606                          enable nonregional allocs, slow but exposes regional
1607                          allocations to other memory purifiers, for debug
1608                          purposes
1609  --disable-swig-version-check
1610                          Disable swig version check to build python modules
1611                          with older swig even though that is unreliable
1612  --disable-sha1          Disable SHA1 RRSIG support, does not disable nsec3
1613                          support
1614  --disable-sha2          Disable SHA256 and SHA512 RRSIG support
1615  --enable-subnet         Enable client subnet
1616  --disable-gost          Disable GOST support
1617  --disable-ecdsa         Disable ECDSA support
1618  --disable-dsa           Disable DSA support
1619  --disable-ed25519       Disable ED25519 support
1620  --disable-ed448         Disable ED448 support
1621  --enable-event-api      Enable (experimental) pluggable event base
1622                          libunbound API installed to unbound-event.h
1623  --enable-tfo-client     Enable TCP Fast Open for client mode
1624  --enable-tfo-server     Enable TCP Fast Open for server mode
1625  --enable-static-exe     enable to compile executables statically against
1626                          (event) uninstalled libs, for debug purposes
1627  --enable-fully-static   enable to compile fully static
1628  --enable-lock-checks    enable to check lock and unlock calls, for debug
1629                          purposes
1630  --enable-allsymbols     export all symbols from libunbound and link binaries
1631                          to it, smaller install size but libunbound export
1632                          table is polluted by internal symbols
1633  --enable-dnstap         Enable dnstap support (requires protobuf-c)
1634  --enable-dnscrypt       Enable dnscrypt support (requires libsodium)
1635  --enable-cachedb        enable cachedb module that can use external cache
1636                          storage
1637  --enable-ipsecmod       Enable ipsecmod module that facilitates
1638                          opportunistic IPsec
1639  --enable-ipset          enable ipset module
1640  --disable-explicit-port-randomisation
1641                          disable explicit source port randomisation and rely
1642                          on the kernel to provide random source ports
1643  --enable-linux-ip-local-port-range
1644                          Define this to enable use of
1645                          /proc/sys/net/ipv4/ip_local_port_range as a default
1646                          outgoing port range. This is only for the libunbound
1647                          on Linux and does not affect unbound resolving
1648                          daemon itself. This may severely limit the number of
1649                          available outgoing ports and thus decrease
1650                          randomness. Define this only when the target system
1651                          restricts (e.g. some of SELinux enabled
1652                          distributions) the use of non-ephemeral ports.
1653  --enable-year2038       support timestamps after 2038
1654
1655Optional Packages:
1656  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1657  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1658  --with-conf-file=path   Pathname to the Unbound configuration file
1659  --with-run-dir=path     set default directory to chdir to (by default dir
1660                          part of cfg file)
1661  --with-chroot-dir=path  set default directory to chroot to (by default same
1662                          as run-dir)
1663  --with-share-dir=path   set default directory with shared data (by default
1664                          same as share/unbound)
1665  --with-pidfile=filename set default pathname to unbound pidfile (default
1666                          run-dir/unbound.pid)
1667  --with-rootkey-file=filename
1668                          set default pathname to root key file (default
1669                          run-dir/root.key). This file is read and written.
1670  --with-rootcert-file=filename
1671                          set default pathname to root update certificate file
1672                          (default run-dir/icannbundle.pem). This file need
1673                          not exist if you are content with the builtin.
1674  --with-username=user    set default user that unbound changes to (default
1675                          user is unbound)
1676  --with-pic[=PKGS]       try to use only PIC/non-PIC objects [default=use
1677                          both]
1678  --with-aix-soname=aix|svr4|both
1679                          shared library versioning (aka "SONAME") variant to
1680                          provide on AIX, [default=aix].
1681  --with-gnu-ld           assume the C compiler uses GNU ld [default=no]
1682  --with-sysroot[=DIR]    Search for dependent libraries within DIR (or the
1683                          compiler's sysroot if not specified).
1684  --with-pthreads         use pthreads library, or --without-pthreads to
1685                          disable threading support.
1686  --with-solaris-threads  use solaris native thread library.
1687  --with-syslog-facility=LOCAL0 - LOCAL7
1688                          set SYSLOG_FACILITY, default DAEMON
1689  --with-dynlibmodule     build dynamic library module, or
1690                          --without-dynlibmodule to disable it. (default=no)
1691  --with-pyunbound        build PyUnbound, or --without-pyunbound to skip it.
1692                          (default=no)
1693  --with-pythonmodule     build Python module, or --without-pythonmodule to
1694                          disable script engine. (default=no)
1695  --with-nss=path         use libnss instead of openssl, installed at path.
1696  --with-nettle=path      use libnettle as crypto library, installed at path.
1697  --with-ssl=pathname     enable SSL (will check /usr/local/ssl /usr/lib/ssl
1698                          /usr/ssl /usr/pkg /usr/local /opt/local /usr/sfw
1699                          /usr or specify like /usr/include/openssl11)
1700  --with-libbsd           Use portable libbsd functions
1701  --with-deprecate-rsa-1024
1702                          Deprecate RSA 1024 bit length, makes that an
1703                          unsupported key, for use when OpenSSL FIPS refuses
1704                          1024 bit verification
1705  --with-libevent=pathname
1706                          use libevent (will check /usr/local /opt/local
1707                          /usr/lib /usr/pkg /usr/sfw /usr or you can specify
1708                          an explicit path). Slower, but allows use of large
1709                          outgoing port ranges.
1710  --with-libexpat=path    specify explicit path for libexpat.
1711  --with-libhiredis=path  specify explicit path for libhiredis.
1712  --with-libnghttp2=path  specify explicit path for libnghttp2.
1713  --with-libngtcp2=path   specify explicit path for libngtcp2, for QUIC.
1714  --with-dnstap-socket-path=pathname
1715                          set default dnstap socket path
1716  --with-protobuf-c=path  Path where protobuf-c is installed, for dnstap
1717  --with-libsodium=path   Path where libsodium is installed, for dnscrypt
1718  --with-libmnl=path      specify explicit path for libmnl.
1719  --with-libunbound-only  do not build daemon and tool programs
1720
1721Some influential environment variables:
1722  CC          C compiler command
1723  CFLAGS      C compiler flags
1724  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
1725              nonstandard directory <lib dir>
1726  LIBS        libraries to pass to the linker, e.g. -l<library>
1727  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1728              you have headers in a nonstandard directory <include dir>
1729  YACC        The 'Yet Another Compiler Compiler' implementation to use.
1730              Defaults to the first program found out of: 'bison -y', 'byacc',
1731              'yacc'.
1732  YFLAGS      The list of arguments that will be passed by default to $YACC.
1733              This script will default YFLAGS to the empty string to avoid a
1734              default value of '-d' given by some make applications.
1735  LT_SYS_LIBRARY_PATH
1736              User-defined run-time library search path.
1737  PKG_CONFIG  path to pkg-config utility
1738  PKG_CONFIG_PATH
1739              directories to add to pkg-config's search path
1740  PKG_CONFIG_LIBDIR
1741              path overriding pkg-config's built-in search path
1742  SYSTEMD_CFLAGS
1743              C compiler flags for SYSTEMD, overriding pkg-config
1744  SYSTEMD_LIBS
1745              linker flags for SYSTEMD, overriding pkg-config
1746  SYSTEMD_DAEMON_CFLAGS
1747              C compiler flags for SYSTEMD_DAEMON, overriding pkg-config
1748  SYSTEMD_DAEMON_LIBS
1749              linker flags for SYSTEMD_DAEMON, overriding pkg-config
1750  CPP         C preprocessor
1751  PYTHON_VERSION
1752              The installed Python version to use, for example '2.3'. This
1753              string will be appended to the Python interpreter canonical
1754              name.
1755  SOURCE_DATE_EPOCH
1756              If it is set, it uses the value of that variable instead of the
1757              current time as the build timestamp. The format is a unix
1758              timestamp. This enables reproducible build output.
1759  PROTOBUFC_CFLAGS
1760              C compiler flags for PROTOBUFC, overriding pkg-config
1761  PROTOBUFC_LIBS
1762              linker flags for PROTOBUFC, overriding pkg-config
1763
1764Use these variables to override the choices made by 'configure' or to help
1765it to find libraries and programs with nonstandard names/locations.
1766
1767Report bugs to <unbound-bugs@nlnetlabs.nl or https://github.com/NLnetLabs/unbound/issues>.
1768_ACEOF
1769ac_status=$?
1770fi
1771
1772if test "$ac_init_help" = "recursive"; then
1773  # If there are subdirs, report their specific --help.
1774  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1775    test -d "$ac_dir" ||
1776      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1777      continue
1778    ac_builddir=.
1779
1780case "$ac_dir" in
1781.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1782*)
1783  ac_dir_suffix=/`printf "%s\n" "$ac_dir" | sed 's|^\.[\\/]||'`
1784  # A ".." for each directory in $ac_dir_suffix.
1785  ac_top_builddir_sub=`printf "%s\n" "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1786  case $ac_top_builddir_sub in
1787  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1788  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1789  esac ;;
1790esac
1791ac_abs_top_builddir=$ac_pwd
1792ac_abs_builddir=$ac_pwd$ac_dir_suffix
1793# for backward compatibility:
1794ac_top_builddir=$ac_top_build_prefix
1795
1796case $srcdir in
1797  .)  # We are building in place.
1798    ac_srcdir=.
1799    ac_top_srcdir=$ac_top_builddir_sub
1800    ac_abs_top_srcdir=$ac_pwd ;;
1801  [\\/]* | ?:[\\/]* )  # Absolute name.
1802    ac_srcdir=$srcdir$ac_dir_suffix;
1803    ac_top_srcdir=$srcdir
1804    ac_abs_top_srcdir=$srcdir ;;
1805  *) # Relative name.
1806    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1807    ac_top_srcdir=$ac_top_build_prefix$srcdir
1808    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1809esac
1810ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1811
1812    cd "$ac_dir" || { ac_status=$?; continue; }
1813    # Check for configure.gnu first; this name is used for a wrapper for
1814    # Metaconfig's "Configure" on case-insensitive file systems.
1815    if test -f "$ac_srcdir/configure.gnu"; then
1816      echo &&
1817      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1818    elif test -f "$ac_srcdir/configure"; then
1819      echo &&
1820      $SHELL "$ac_srcdir/configure" --help=recursive
1821    else
1822      printf "%s\n" "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1823    fi || ac_status=$?
1824    cd "$ac_pwd" || { ac_status=$?; break; }
1825  done
1826fi
1827
1828test -n "$ac_init_help" && exit $ac_status
1829if $ac_init_version; then
1830  cat <<\_ACEOF
1831unbound configure 1.24.0
1832generated by GNU Autoconf 2.71
1833
1834Copyright (C) 2023 Free Software Foundation, Inc.
1835This configure script is free software; the Free Software Foundation
1836gives unlimited permission to copy, distribute and modify it.
1837_ACEOF
1838  exit
1839fi
1840
1841## ------------------------ ##
1842## Autoconf initialization. ##
1843## ------------------------ ##
1844
1845# ac_fn_c_try_compile LINENO
1846# --------------------------
1847# Try to compile conftest.$ac_ext, and return whether this succeeded.
1848ac_fn_c_try_compile ()
1849{
1850  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1851  rm -f conftest.$ac_objext conftest.beam
1852  if { { ac_try="$ac_compile"
1853case "(($ac_try" in
1854  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1855  *) ac_try_echo=$ac_try;;
1856esac
1857eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1858printf "%s\n" "$ac_try_echo"; } >&5
1859  (eval "$ac_compile") 2>conftest.err
1860  ac_status=$?
1861  if test -s conftest.err; then
1862    grep -v '^ *+' conftest.err >conftest.er1
1863    cat conftest.er1 >&5
1864    mv -f conftest.er1 conftest.err
1865  fi
1866  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1867  test $ac_status = 0; } && {
1868	 test -z "$ac_c_werror_flag" ||
1869	 test ! -s conftest.err
1870       } && test -s conftest.$ac_objext
1871then :
1872  ac_retval=0
1873else case e in #(
1874  e) printf "%s\n" "$as_me: failed program was:" >&5
1875sed 's/^/| /' conftest.$ac_ext >&5
1876
1877	ac_retval=1 ;;
1878esac
1879fi
1880  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1881  as_fn_set_status $ac_retval
1882
1883} # ac_fn_c_try_compile
1884
1885# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1886# -------------------------------------------------------
1887# Tests whether HEADER exists and can be compiled using the include files in
1888# INCLUDES, setting the cache variable VAR accordingly.
1889ac_fn_c_check_header_compile ()
1890{
1891  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1892  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1893printf %s "checking for $2... " >&6; }
1894if eval test \${$3+y}
1895then :
1896  printf %s "(cached) " >&6
1897else case e in #(
1898  e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1899/* end confdefs.h.  */
1900$4
1901#include <$2>
1902_ACEOF
1903if ac_fn_c_try_compile "$LINENO"
1904then :
1905  eval "$3=yes"
1906else case e in #(
1907  e) eval "$3=no" ;;
1908esac
1909fi
1910rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
1911esac
1912fi
1913eval ac_res=\$$3
1914	       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1915printf "%s\n" "$ac_res" >&6; }
1916  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1917
1918} # ac_fn_c_check_header_compile
1919
1920# ac_fn_c_try_link LINENO
1921# -----------------------
1922# Try to link conftest.$ac_ext, and return whether this succeeded.
1923ac_fn_c_try_link ()
1924{
1925  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1926  rm -f conftest.$ac_objext conftest.beam conftest$ac_exeext
1927  if { { ac_try="$ac_link"
1928case "(($ac_try" in
1929  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1930  *) ac_try_echo=$ac_try;;
1931esac
1932eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1933printf "%s\n" "$ac_try_echo"; } >&5
1934  (eval "$ac_link") 2>conftest.err
1935  ac_status=$?
1936  if test -s conftest.err; then
1937    grep -v '^ *+' conftest.err >conftest.er1
1938    cat conftest.er1 >&5
1939    mv -f conftest.er1 conftest.err
1940  fi
1941  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1942  test $ac_status = 0; } && {
1943	 test -z "$ac_c_werror_flag" ||
1944	 test ! -s conftest.err
1945       } && test -s conftest$ac_exeext && {
1946	 test "$cross_compiling" = yes ||
1947	 test -x conftest$ac_exeext
1948       }
1949then :
1950  ac_retval=0
1951else case e in #(
1952  e) printf "%s\n" "$as_me: failed program was:" >&5
1953sed 's/^/| /' conftest.$ac_ext >&5
1954
1955	ac_retval=1 ;;
1956esac
1957fi
1958  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1959  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1960  # interfere with the next link command; also delete a directory that is
1961  # left behind by Apple's compiler.  We do this before executing the actions.
1962  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1963  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1964  as_fn_set_status $ac_retval
1965
1966} # ac_fn_c_try_link
1967
1968# ac_fn_c_check_func LINENO FUNC VAR
1969# ----------------------------------
1970# Tests whether FUNC exists, setting the cache variable VAR accordingly
1971ac_fn_c_check_func ()
1972{
1973  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1974  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1975printf %s "checking for $2... " >&6; }
1976if eval test \${$3+y}
1977then :
1978  printf %s "(cached) " >&6
1979else case e in #(
1980  e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1981/* end confdefs.h.  */
1982/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
1983   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
1984#define $2 innocuous_$2
1985
1986/* System header to define __stub macros and hopefully few prototypes,
1987   which can conflict with char $2 (void); below.  */
1988
1989#include <limits.h>
1990#undef $2
1991
1992/* Override any GCC internal prototype to avoid an error.
1993   Use char because int might match the return type of a GCC
1994   builtin and then its argument prototype would still apply.  */
1995#ifdef __cplusplus
1996extern "C"
1997#endif
1998char $2 (void);
1999/* The GNU C library defines this for functions which it implements
2000    to always fail with ENOSYS.  Some functions are actually named
2001    something starting with __ and the normal name is an alias.  */
2002#if defined __stub_$2 || defined __stub___$2
2003choke me
2004#endif
2005
2006int
2007main (void)
2008{
2009return $2 ();
2010  ;
2011  return 0;
2012}
2013_ACEOF
2014if ac_fn_c_try_link "$LINENO"
2015then :
2016  eval "$3=yes"
2017else case e in #(
2018  e) eval "$3=no" ;;
2019esac
2020fi
2021rm -f core conftest.err conftest.$ac_objext conftest.beam \
2022    conftest$ac_exeext conftest.$ac_ext ;;
2023esac
2024fi
2025eval ac_res=\$$3
2026	       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2027printf "%s\n" "$ac_res" >&6; }
2028  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2029
2030} # ac_fn_c_check_func
2031
2032# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2033# -------------------------------------------
2034# Tests whether TYPE exists after having included INCLUDES, setting cache
2035# variable VAR accordingly.
2036ac_fn_c_check_type ()
2037{
2038  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2039  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2040printf %s "checking for $2... " >&6; }
2041if eval test \${$3+y}
2042then :
2043  printf %s "(cached) " >&6
2044else case e in #(
2045  e) eval "$3=no"
2046  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2047/* end confdefs.h.  */
2048$4
2049int
2050main (void)
2051{
2052if (sizeof ($2))
2053	 return 0;
2054  ;
2055  return 0;
2056}
2057_ACEOF
2058if ac_fn_c_try_compile "$LINENO"
2059then :
2060  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2061/* end confdefs.h.  */
2062$4
2063int
2064main (void)
2065{
2066if (sizeof (($2)))
2067	    return 0;
2068  ;
2069  return 0;
2070}
2071_ACEOF
2072if ac_fn_c_try_compile "$LINENO"
2073then :
2074
2075else case e in #(
2076  e) eval "$3=yes" ;;
2077esac
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 ;;
2082esac
2083fi
2084eval ac_res=\$$3
2085	       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2086printf "%s\n" "$ac_res" >&6; }
2087  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2088
2089} # ac_fn_c_check_type
2090
2091# ac_fn_c_try_run LINENO
2092# ----------------------
2093# Try to run conftest.$ac_ext, and return whether this succeeded. Assumes that
2094# executables *can* be run.
2095ac_fn_c_try_run ()
2096{
2097  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2098  if { { ac_try="$ac_link"
2099case "(($ac_try" in
2100  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2101  *) ac_try_echo=$ac_try;;
2102esac
2103eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2104printf "%s\n" "$ac_try_echo"; } >&5
2105  (eval "$ac_link") 2>&5
2106  ac_status=$?
2107  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2108  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2109  { { case "(($ac_try" in
2110  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2111  *) ac_try_echo=$ac_try;;
2112esac
2113eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2114printf "%s\n" "$ac_try_echo"; } >&5
2115  (eval "$ac_try") 2>&5
2116  ac_status=$?
2117  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2118  test $ac_status = 0; }; }
2119then :
2120  ac_retval=0
2121else case e in #(
2122  e) printf "%s\n" "$as_me: program exited with status $ac_status" >&5
2123       printf "%s\n" "$as_me: failed program was:" >&5
2124sed 's/^/| /' conftest.$ac_ext >&5
2125
2126       ac_retval=$ac_status ;;
2127esac
2128fi
2129  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2130  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2131  as_fn_set_status $ac_retval
2132
2133} # ac_fn_c_try_run
2134
2135# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2136# --------------------------------------------
2137# Tries to find the compile-time value of EXPR in a program that includes
2138# INCLUDES, setting VAR accordingly. Returns whether the value could be
2139# computed
2140ac_fn_c_compute_int ()
2141{
2142  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2143  if test "$cross_compiling" = yes; then
2144    # Depending upon the size, compute the lo and hi bounds.
2145cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2146/* end confdefs.h.  */
2147$4
2148int
2149main (void)
2150{
2151static int test_array [1 - 2 * !(($2) >= 0)];
2152test_array [0] = 0;
2153return test_array [0];
2154
2155  ;
2156  return 0;
2157}
2158_ACEOF
2159if ac_fn_c_try_compile "$LINENO"
2160then :
2161  ac_lo=0 ac_mid=0
2162  while :; do
2163    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2164/* end confdefs.h.  */
2165$4
2166int
2167main (void)
2168{
2169static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2170test_array [0] = 0;
2171return test_array [0];
2172
2173  ;
2174  return 0;
2175}
2176_ACEOF
2177if ac_fn_c_try_compile "$LINENO"
2178then :
2179  ac_hi=$ac_mid; break
2180else case e in #(
2181  e) as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2182			if test $ac_lo -le $ac_mid; then
2183			  ac_lo= ac_hi=
2184			  break
2185			fi
2186			as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val ;;
2187esac
2188fi
2189rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
2190  done
2191else case e in #(
2192  e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2193/* end confdefs.h.  */
2194$4
2195int
2196main (void)
2197{
2198static int test_array [1 - 2 * !(($2) < 0)];
2199test_array [0] = 0;
2200return test_array [0];
2201
2202  ;
2203  return 0;
2204}
2205_ACEOF
2206if ac_fn_c_try_compile "$LINENO"
2207then :
2208  ac_hi=-1 ac_mid=-1
2209  while :; do
2210    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2211/* end confdefs.h.  */
2212$4
2213int
2214main (void)
2215{
2216static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2217test_array [0] = 0;
2218return test_array [0];
2219
2220  ;
2221  return 0;
2222}
2223_ACEOF
2224if ac_fn_c_try_compile "$LINENO"
2225then :
2226  ac_lo=$ac_mid; break
2227else case e in #(
2228  e) as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2229			if test $ac_mid -le $ac_hi; then
2230			  ac_lo= ac_hi=
2231			  break
2232			fi
2233			as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val ;;
2234esac
2235fi
2236rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
2237  done
2238else case e in #(
2239  e) ac_lo= ac_hi= ;;
2240esac
2241fi
2242rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
2243esac
2244fi
2245rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
2246# Binary search between lo and hi bounds.
2247while test "x$ac_lo" != "x$ac_hi"; do
2248  as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2249  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2250/* end confdefs.h.  */
2251$4
2252int
2253main (void)
2254{
2255static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2256test_array [0] = 0;
2257return test_array [0];
2258
2259  ;
2260  return 0;
2261}
2262_ACEOF
2263if ac_fn_c_try_compile "$LINENO"
2264then :
2265  ac_hi=$ac_mid
2266else case e in #(
2267  e) as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val ;;
2268esac
2269fi
2270rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
2271done
2272case $ac_lo in #((
2273?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2274'') ac_retval=1 ;;
2275esac
2276  else
2277    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2278/* end confdefs.h.  */
2279$4
2280static long int longval (void) { return $2; }
2281static unsigned long int ulongval (void) { return $2; }
2282#include <stdio.h>
2283#include <stdlib.h>
2284int
2285main (void)
2286{
2287
2288  FILE *f = fopen ("conftest.val", "w");
2289  if (! f)
2290    return 1;
2291  if (($2) < 0)
2292    {
2293      long int i = longval ();
2294      if (i != ($2))
2295	return 1;
2296      fprintf (f, "%ld", i);
2297    }
2298  else
2299    {
2300      unsigned long int i = ulongval ();
2301      if (i != ($2))
2302	return 1;
2303      fprintf (f, "%lu", i);
2304    }
2305  /* Do not output a trailing newline, as this causes \r\n confusion
2306     on some platforms.  */
2307  return ferror (f) || fclose (f) != 0;
2308
2309  ;
2310  return 0;
2311}
2312_ACEOF
2313if ac_fn_c_try_run "$LINENO"
2314then :
2315  echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2316else case e in #(
2317  e) ac_retval=1 ;;
2318esac
2319fi
2320rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2321  conftest.$ac_objext conftest.beam conftest.$ac_ext
2322rm -f conftest.val
2323
2324  fi
2325  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2326  as_fn_set_status $ac_retval
2327
2328} # ac_fn_c_compute_int
2329
2330# ac_fn_c_try_cpp LINENO
2331# ----------------------
2332# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2333ac_fn_c_try_cpp ()
2334{
2335  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2336  if { { ac_try="$ac_cpp conftest.$ac_ext"
2337case "(($ac_try" in
2338  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2339  *) ac_try_echo=$ac_try;;
2340esac
2341eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2342printf "%s\n" "$ac_try_echo"; } >&5
2343  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2344  ac_status=$?
2345  if test -s conftest.err; then
2346    grep -v '^ *+' conftest.err >conftest.er1
2347    cat conftest.er1 >&5
2348    mv -f conftest.er1 conftest.err
2349  fi
2350  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2351  test $ac_status = 0; } > conftest.i && {
2352	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2353	 test ! -s conftest.err
2354       }
2355then :
2356  ac_retval=0
2357else case e in #(
2358  e) printf "%s\n" "$as_me: failed program was:" >&5
2359sed 's/^/| /' conftest.$ac_ext >&5
2360
2361    ac_retval=1 ;;
2362esac
2363fi
2364  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2365  as_fn_set_status $ac_retval
2366
2367} # ac_fn_c_try_cpp
2368
2369# ac_fn_check_decl LINENO SYMBOL VAR INCLUDES EXTRA-OPTIONS FLAG-VAR
2370# ------------------------------------------------------------------
2371# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2372# accordingly. Pass EXTRA-OPTIONS to the compiler, using FLAG-VAR.
2373ac_fn_check_decl ()
2374{
2375  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2376  as_decl_name=`echo $2|sed 's/ *(.*//'`
2377  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2378printf %s "checking whether $as_decl_name is declared... " >&6; }
2379if eval test \${$3+y}
2380then :
2381  printf %s "(cached) " >&6
2382else case e in #(
2383  e) as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2384  eval ac_save_FLAGS=\$$6
2385  as_fn_append $6 " $5"
2386  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2387/* end confdefs.h.  */
2388$4
2389int
2390main (void)
2391{
2392#ifndef $as_decl_name
2393#ifdef __cplusplus
2394  (void) $as_decl_use;
2395#else
2396  (void) $as_decl_name;
2397#endif
2398#endif
2399
2400  ;
2401  return 0;
2402}
2403_ACEOF
2404if ac_fn_c_try_compile "$LINENO"
2405then :
2406  eval "$3=yes"
2407else case e in #(
2408  e) eval "$3=no" ;;
2409esac
2410fi
2411rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
2412  eval $6=\$ac_save_FLAGS
2413 ;;
2414esac
2415fi
2416eval ac_res=\$$3
2417	       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2418printf "%s\n" "$ac_res" >&6; }
2419  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2420
2421} # ac_fn_check_decl
2422
2423# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2424# ----------------------------------------------------
2425# Tries to find if the field MEMBER exists in type AGGR, after including
2426# INCLUDES, setting cache variable VAR accordingly.
2427ac_fn_c_check_member ()
2428{
2429  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2430  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2431printf %s "checking for $2.$3... " >&6; }
2432if eval test \${$4+y}
2433then :
2434  printf %s "(cached) " >&6
2435else case e in #(
2436  e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2437/* end confdefs.h.  */
2438$5
2439int
2440main (void)
2441{
2442static $2 ac_aggr;
2443if (ac_aggr.$3)
2444return 0;
2445  ;
2446  return 0;
2447}
2448_ACEOF
2449if ac_fn_c_try_compile "$LINENO"
2450then :
2451  eval "$4=yes"
2452else case e in #(
2453  e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2454/* end confdefs.h.  */
2455$5
2456int
2457main (void)
2458{
2459static $2 ac_aggr;
2460if (sizeof ac_aggr.$3)
2461return 0;
2462  ;
2463  return 0;
2464}
2465_ACEOF
2466if ac_fn_c_try_compile "$LINENO"
2467then :
2468  eval "$4=yes"
2469else case e in #(
2470  e) eval "$4=no" ;;
2471esac
2472fi
2473rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
2474esac
2475fi
2476rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
2477esac
2478fi
2479eval ac_res=\$$4
2480	       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2481printf "%s\n" "$ac_res" >&6; }
2482  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2483
2484} # ac_fn_c_check_member
2485ac_configure_args_raw=
2486for ac_arg
2487do
2488  case $ac_arg in
2489  *\'*)
2490    ac_arg=`printf "%s\n" "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2491  esac
2492  as_fn_append ac_configure_args_raw " '$ac_arg'"
2493done
2494
2495case $ac_configure_args_raw in
2496  *$as_nl*)
2497    ac_safe_unquote= ;;
2498  *)
2499    ac_unsafe_z='|&;<>()$`\\"*?[ ''	' # This string ends in space, tab.
2500    ac_unsafe_a="$ac_unsafe_z#~"
2501    ac_safe_unquote="s/ '\\([^$ac_unsafe_a][^$ac_unsafe_z]*\\)'/ \\1/g"
2502    ac_configure_args_raw=`      printf "%s\n" "$ac_configure_args_raw" | sed "$ac_safe_unquote"`;;
2503esac
2504
2505cat >config.log <<_ACEOF
2506This file contains any messages produced by compilers while
2507running configure, to aid debugging if configure makes a mistake.
2508
2509It was created by unbound $as_me 1.24.0, which was
2510generated by GNU Autoconf 2.71.  Invocation command line was
2511
2512  $ $0$ac_configure_args_raw
2513
2514_ACEOF
2515exec 5>>config.log
2516{
2517cat <<_ASUNAME
2518## --------- ##
2519## Platform. ##
2520## --------- ##
2521
2522hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2523uname -m = `(uname -m) 2>/dev/null || echo unknown`
2524uname -r = `(uname -r) 2>/dev/null || echo unknown`
2525uname -s = `(uname -s) 2>/dev/null || echo unknown`
2526uname -v = `(uname -v) 2>/dev/null || echo unknown`
2527
2528/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2529/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2530
2531/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2532/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2533/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2534/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2535/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2536/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2537/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2538
2539_ASUNAME
2540
2541as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2542for as_dir in $PATH
2543do
2544  IFS=$as_save_IFS
2545  case $as_dir in #(((
2546    '') as_dir=./ ;;
2547    */) ;;
2548    *) as_dir=$as_dir/ ;;
2549  esac
2550    printf "%s\n" "PATH: $as_dir"
2551  done
2552IFS=$as_save_IFS
2553
2554} >&5
2555
2556cat >&5 <<_ACEOF
2557
2558
2559## ----------- ##
2560## Core tests. ##
2561## ----------- ##
2562
2563_ACEOF
2564
2565
2566# Keep a trace of the command line.
2567# Strip out --no-create and --no-recursion so they do not pile up.
2568# Strip out --silent because we don't want to record it for future runs.
2569# Also quote any args containing shell meta-characters.
2570# Make two passes to allow for proper duplicate-argument suppression.
2571ac_configure_args=
2572ac_configure_args0=
2573ac_configure_args1=
2574ac_must_keep_next=false
2575for ac_pass in 1 2
2576do
2577  for ac_arg
2578  do
2579    case $ac_arg in
2580    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2581    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2582    | -silent | --silent | --silen | --sile | --sil)
2583      continue ;;
2584    *\'*)
2585      ac_arg=`printf "%s\n" "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2586    esac
2587    case $ac_pass in
2588    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2589    2)
2590      as_fn_append ac_configure_args1 " '$ac_arg'"
2591      if test $ac_must_keep_next = true; then
2592	ac_must_keep_next=false # Got value, back to normal.
2593      else
2594	case $ac_arg in
2595	  *=* | --config-cache | -C | -disable-* | --disable-* \
2596	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2597	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2598	  | -with-* | --with-* | -without-* | --without-* | --x)
2599	    case "$ac_configure_args0 " in
2600	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2601	    esac
2602	    ;;
2603	  -* ) ac_must_keep_next=true ;;
2604	esac
2605      fi
2606      as_fn_append ac_configure_args " '$ac_arg'"
2607      ;;
2608    esac
2609  done
2610done
2611{ ac_configure_args0=; unset ac_configure_args0;}
2612{ ac_configure_args1=; unset ac_configure_args1;}
2613
2614# When interrupted or exit'd, cleanup temporary files, and complete
2615# config.log.  We remove comments because anyway the quotes in there
2616# would cause problems or look ugly.
2617# WARNING: Use '\'' to represent an apostrophe within the trap.
2618# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2619trap 'exit_status=$?
2620  # Sanitize IFS.
2621  IFS=" ""	$as_nl"
2622  # Save into config.log some information that might help in debugging.
2623  {
2624    echo
2625
2626    printf "%s\n" "## ---------------- ##
2627## Cache variables. ##
2628## ---------------- ##"
2629    echo
2630    # The following way of writing the cache mishandles newlines in values,
2631(
2632  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2633    eval ac_val=\$$ac_var
2634    case $ac_val in #(
2635    *${as_nl}*)
2636      case $ac_var in #(
2637      *_cv_*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2638printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2639      esac
2640      case $ac_var in #(
2641      _ | IFS | as_nl) ;; #(
2642      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2643      *) { eval $ac_var=; unset $ac_var;} ;;
2644      esac ;;
2645    esac
2646  done
2647  (set) 2>&1 |
2648    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2649    *${as_nl}ac_space=\ *)
2650      sed -n \
2651	"s/'\''/'\''\\\\'\'''\''/g;
2652	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2653      ;; #(
2654    *)
2655      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2656      ;;
2657    esac |
2658    sort
2659)
2660    echo
2661
2662    printf "%s\n" "## ----------------- ##
2663## Output variables. ##
2664## ----------------- ##"
2665    echo
2666    for ac_var in $ac_subst_vars
2667    do
2668      eval ac_val=\$$ac_var
2669      case $ac_val in
2670      *\'\''*) ac_val=`printf "%s\n" "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2671      esac
2672      printf "%s\n" "$ac_var='\''$ac_val'\''"
2673    done | sort
2674    echo
2675
2676    if test -n "$ac_subst_files"; then
2677      printf "%s\n" "## ------------------- ##
2678## File substitutions. ##
2679## ------------------- ##"
2680      echo
2681      for ac_var in $ac_subst_files
2682      do
2683	eval ac_val=\$$ac_var
2684	case $ac_val in
2685	*\'\''*) ac_val=`printf "%s\n" "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2686	esac
2687	printf "%s\n" "$ac_var='\''$ac_val'\''"
2688      done | sort
2689      echo
2690    fi
2691
2692    if test -s confdefs.h; then
2693      printf "%s\n" "## ----------- ##
2694## confdefs.h. ##
2695## ----------- ##"
2696      echo
2697      cat confdefs.h
2698      echo
2699    fi
2700    test "$ac_signal" != 0 &&
2701      printf "%s\n" "$as_me: caught signal $ac_signal"
2702    printf "%s\n" "$as_me: exit $exit_status"
2703  } >&5
2704  rm -f core *.core core.conftest.* &&
2705    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2706    exit $exit_status
2707' 0
2708for ac_signal in 1 2 13 15; do
2709  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2710done
2711ac_signal=0
2712
2713# confdefs.h avoids OS command line length limits that DEFS can exceed.
2714rm -f -r conftest* confdefs.h
2715
2716printf "%s\n" "/* confdefs.h */" > confdefs.h
2717
2718# Predefined preprocessor variables.
2719
2720printf "%s\n" "#define PACKAGE_NAME \"$PACKAGE_NAME\"" >>confdefs.h
2721
2722printf "%s\n" "#define PACKAGE_TARNAME \"$PACKAGE_TARNAME\"" >>confdefs.h
2723
2724printf "%s\n" "#define PACKAGE_VERSION \"$PACKAGE_VERSION\"" >>confdefs.h
2725
2726printf "%s\n" "#define PACKAGE_STRING \"$PACKAGE_STRING\"" >>confdefs.h
2727
2728printf "%s\n" "#define PACKAGE_BUGREPORT \"$PACKAGE_BUGREPORT\"" >>confdefs.h
2729
2730printf "%s\n" "#define PACKAGE_URL \"$PACKAGE_URL\"" >>confdefs.h
2731
2732
2733# Let the site file select an alternate cache file if it wants to.
2734# Prefer an explicitly selected file to automatically selected ones.
2735if test -n "$CONFIG_SITE"; then
2736  ac_site_files="$CONFIG_SITE"
2737elif test "x$prefix" != xNONE; then
2738  ac_site_files="$prefix/share/config.site $prefix/etc/config.site"
2739else
2740  ac_site_files="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
2741fi
2742
2743for ac_site_file in $ac_site_files
2744do
2745  case $ac_site_file in #(
2746  */*) :
2747     ;; #(
2748  *) :
2749    ac_site_file=./$ac_site_file ;;
2750esac
2751  if test -f "$ac_site_file" && test -r "$ac_site_file"; then
2752    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2753printf "%s\n" "$as_me: loading site script $ac_site_file" >&6;}
2754    sed 's/^/| /' "$ac_site_file" >&5
2755    . "$ac_site_file" \
2756      || { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
2757printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
2758as_fn_error $? "failed to load site script $ac_site_file
2759See 'config.log' for more details" "$LINENO" 5; }
2760  fi
2761done
2762
2763if test -r "$cache_file"; then
2764  # Some versions of bash will fail to source /dev/null (special files
2765  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
2766  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2767    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2768printf "%s\n" "$as_me: loading cache $cache_file" >&6;}
2769    case $cache_file in
2770      [\\/]* | ?:[\\/]* ) . "$cache_file";;
2771      *)                      . "./$cache_file";;
2772    esac
2773  fi
2774else
2775  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2776printf "%s\n" "$as_me: creating cache $cache_file" >&6;}
2777  >$cache_file
2778fi
2779
2780as_fn_append ac_header_c_list " stdio.h stdio_h HAVE_STDIO_H"
2781# Test code for whether the C compiler supports C89 (global declarations)
2782ac_c_conftest_c89_globals='
2783/* Does the compiler advertise C89 conformance?
2784   Do not test the value of __STDC__, because some compilers set it to 0
2785   while being otherwise adequately conformant. */
2786#if !defined __STDC__
2787# error "Compiler does not advertise C89 conformance"
2788#endif
2789
2790#include <stddef.h>
2791#include <stdarg.h>
2792struct stat;
2793/* Most of the following tests are stolen from RCS 5.7 src/conf.sh.  */
2794struct buf { int x; };
2795struct buf * (*rcsopen) (struct buf *, struct stat *, int);
2796static char *e (char **p, int i)
2797{
2798  return p[i];
2799}
2800static char *f (char * (*g) (char **, int), char **p, ...)
2801{
2802  char *s;
2803  va_list v;
2804  va_start (v,p);
2805  s = g (p, va_arg (v,int));
2806  va_end (v);
2807  return s;
2808}
2809
2810/* C89 style stringification. */
2811#define noexpand_stringify(a) #a
2812const char *stringified = noexpand_stringify(arbitrary+token=sequence);
2813
2814/* C89 style token pasting.  Exercises some of the corner cases that
2815   e.g. old MSVC gets wrong, but not very hard. */
2816#define noexpand_concat(a,b) a##b
2817#define expand_concat(a,b) noexpand_concat(a,b)
2818extern int vA;
2819extern int vbee;
2820#define aye A
2821#define bee B
2822int *pvA = &expand_concat(v,aye);
2823int *pvbee = &noexpand_concat(v,bee);
2824
2825/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
2826   function prototypes and stuff, but not \xHH hex character constants.
2827   These do not provoke an error unfortunately, instead are silently treated
2828   as an "x".  The following induces an error, until -std is added to get
2829   proper ANSI mode.  Curiously \x00 != x always comes out true, for an
2830   array size at least.  It is necessary to write \x00 == 0 to get something
2831   that is true only with -std.  */
2832int osf4_cc_array ['\''\x00'\'' == 0 ? 1 : -1];
2833
2834/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
2835   inside strings and character constants.  */
2836#define FOO(x) '\''x'\''
2837int xlc6_cc_array[FOO(a) == '\''x'\'' ? 1 : -1];
2838
2839int test (int i, double x);
2840struct s1 {int (*f) (int a);};
2841struct s2 {int (*f) (double a);};
2842int pairnames (int, char **, int *(*)(struct buf *, struct stat *, int),
2843               int, int);'
2844
2845# Test code for whether the C compiler supports C89 (body of main).
2846ac_c_conftest_c89_main='
2847ok |= (argc == 0 || f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]);
2848'
2849
2850# Test code for whether the C compiler supports C99 (global declarations)
2851ac_c_conftest_c99_globals='
2852/* Does the compiler advertise C99 conformance? */
2853#if !defined __STDC_VERSION__ || __STDC_VERSION__ < 199901L
2854# error "Compiler does not advertise C99 conformance"
2855#endif
2856
2857// See if C++-style comments work.
2858
2859#include <stdbool.h>
2860extern int puts (const char *);
2861extern int printf (const char *, ...);
2862extern int dprintf (int, const char *, ...);
2863extern void *malloc (size_t);
2864extern void free (void *);
2865
2866// Check varargs macros.  These examples are taken from C99 6.10.3.5.
2867// dprintf is used instead of fprintf to avoid needing to declare
2868// FILE and stderr.
2869#define debug(...) dprintf (2, __VA_ARGS__)
2870#define showlist(...) puts (#__VA_ARGS__)
2871#define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__))
2872static void
2873test_varargs_macros (void)
2874{
2875  int x = 1234;
2876  int y = 5678;
2877  debug ("Flag");
2878  debug ("X = %d\n", x);
2879  showlist (The first, second, and third items.);
2880  report (x>y, "x is %d but y is %d", x, y);
2881}
2882
2883// Check long long types.
2884#define BIG64 18446744073709551615ull
2885#define BIG32 4294967295ul
2886#define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0)
2887#if !BIG_OK
2888  #error "your preprocessor is broken"
2889#endif
2890#if BIG_OK
2891#else
2892  #error "your preprocessor is broken"
2893#endif
2894static long long int bignum = -9223372036854775807LL;
2895static unsigned long long int ubignum = BIG64;
2896
2897struct incomplete_array
2898{
2899  int datasize;
2900  double data[];
2901};
2902
2903struct named_init {
2904  int number;
2905  const wchar_t *name;
2906  double average;
2907};
2908
2909typedef const char *ccp;
2910
2911static inline int
2912test_restrict (ccp restrict text)
2913{
2914  // Iterate through items via the restricted pointer.
2915  // Also check for declarations in for loops.
2916  for (unsigned int i = 0; *(text+i) != '\''\0'\''; ++i)
2917    continue;
2918  return 0;
2919}
2920
2921// Check varargs and va_copy.
2922static bool
2923test_varargs (const char *format, ...)
2924{
2925  va_list args;
2926  va_start (args, format);
2927  va_list args_copy;
2928  va_copy (args_copy, args);
2929
2930  const char *str = "";
2931  int number = 0;
2932  float fnumber = 0;
2933
2934  while (*format)
2935    {
2936      switch (*format++)
2937	{
2938	case '\''s'\'': // string
2939	  str = va_arg (args_copy, const char *);
2940	  break;
2941	case '\''d'\'': // int
2942	  number = va_arg (args_copy, int);
2943	  break;
2944	case '\''f'\'': // float
2945	  fnumber = va_arg (args_copy, double);
2946	  break;
2947	default:
2948	  break;
2949	}
2950    }
2951  va_end (args_copy);
2952  va_end (args);
2953
2954  return *str && number && fnumber;
2955}
2956'
2957
2958# Test code for whether the C compiler supports C99 (body of main).
2959ac_c_conftest_c99_main='
2960  // Check bool.
2961  _Bool success = false;
2962  success |= (argc != 0);
2963
2964  // Check restrict.
2965  if (test_restrict ("String literal") == 0)
2966    success = true;
2967  char *restrict newvar = "Another string";
2968
2969  // Check varargs.
2970  success &= test_varargs ("s, d'\'' f .", "string", 65, 34.234);
2971  test_varargs_macros ();
2972
2973  // Check flexible array members.
2974  struct incomplete_array *ia =
2975    malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10));
2976  ia->datasize = 10;
2977  for (int i = 0; i < ia->datasize; ++i)
2978    ia->data[i] = i * 1.234;
2979  // Work around memory leak warnings.
2980  free (ia);
2981
2982  // Check named initializers.
2983  struct named_init ni = {
2984    .number = 34,
2985    .name = L"Test wide string",
2986    .average = 543.34343,
2987  };
2988
2989  ni.number = 58;
2990
2991  int dynamic_array[ni.number];
2992  dynamic_array[0] = argv[0][0];
2993  dynamic_array[ni.number - 1] = 543;
2994
2995  // work around unused variable warnings
2996  ok |= (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == '\''x'\''
2997	 || dynamic_array[ni.number - 1] != 543);
2998'
2999
3000# Test code for whether the C compiler supports C11 (global declarations)
3001ac_c_conftest_c11_globals='
3002/* Does the compiler advertise C11 conformance? */
3003#if !defined __STDC_VERSION__ || __STDC_VERSION__ < 201112L
3004# error "Compiler does not advertise C11 conformance"
3005#endif
3006
3007// Check _Alignas.
3008char _Alignas (double) aligned_as_double;
3009char _Alignas (0) no_special_alignment;
3010extern char aligned_as_int;
3011char _Alignas (0) _Alignas (int) aligned_as_int;
3012
3013// Check _Alignof.
3014enum
3015{
3016  int_alignment = _Alignof (int),
3017  int_array_alignment = _Alignof (int[100]),
3018  char_alignment = _Alignof (char)
3019};
3020_Static_assert (0 < -_Alignof (int), "_Alignof is signed");
3021
3022// Check _Noreturn.
3023int _Noreturn does_not_return (void) { for (;;) continue; }
3024
3025// Check _Static_assert.
3026struct test_static_assert
3027{
3028  int x;
3029  _Static_assert (sizeof (int) <= sizeof (long int),
3030                  "_Static_assert does not work in struct");
3031  long int y;
3032};
3033
3034// Check UTF-8 literals.
3035#define u8 syntax error!
3036char const utf8_literal[] = u8"happens to be ASCII" "another string";
3037
3038// Check duplicate typedefs.
3039typedef long *long_ptr;
3040typedef long int *long_ptr;
3041typedef long_ptr long_ptr;
3042
3043// Anonymous structures and unions -- taken from C11 6.7.2.1 Example 1.
3044struct anonymous
3045{
3046  union {
3047    struct { int i; int j; };
3048    struct { int k; long int l; } w;
3049  };
3050  int m;
3051} v1;
3052'
3053
3054# Test code for whether the C compiler supports C11 (body of main).
3055ac_c_conftest_c11_main='
3056  _Static_assert ((offsetof (struct anonymous, i)
3057		   == offsetof (struct anonymous, w.k)),
3058		  "Anonymous union alignment botch");
3059  v1.i = 2;
3060  v1.w.k = 5;
3061  ok |= v1.i != 5;
3062'
3063
3064# Test code for whether the C compiler supports C11 (complete).
3065ac_c_conftest_c11_program="${ac_c_conftest_c89_globals}
3066${ac_c_conftest_c99_globals}
3067${ac_c_conftest_c11_globals}
3068
3069int
3070main (int argc, char **argv)
3071{
3072  int ok = 0;
3073  ${ac_c_conftest_c89_main}
3074  ${ac_c_conftest_c99_main}
3075  ${ac_c_conftest_c11_main}
3076  return ok;
3077}
3078"
3079
3080# Test code for whether the C compiler supports C99 (complete).
3081ac_c_conftest_c99_program="${ac_c_conftest_c89_globals}
3082${ac_c_conftest_c99_globals}
3083
3084int
3085main (int argc, char **argv)
3086{
3087  int ok = 0;
3088  ${ac_c_conftest_c89_main}
3089  ${ac_c_conftest_c99_main}
3090  return ok;
3091}
3092"
3093
3094# Test code for whether the C compiler supports C89 (complete).
3095ac_c_conftest_c89_program="${ac_c_conftest_c89_globals}
3096
3097int
3098main (int argc, char **argv)
3099{
3100  int ok = 0;
3101  ${ac_c_conftest_c89_main}
3102  return ok;
3103}
3104"
3105
3106as_fn_append ac_header_c_list " stdlib.h stdlib_h HAVE_STDLIB_H"
3107as_fn_append ac_header_c_list " string.h string_h HAVE_STRING_H"
3108as_fn_append ac_header_c_list " inttypes.h inttypes_h HAVE_INTTYPES_H"
3109as_fn_append ac_header_c_list " stdint.h stdint_h HAVE_STDINT_H"
3110as_fn_append ac_header_c_list " strings.h strings_h HAVE_STRINGS_H"
3111as_fn_append ac_header_c_list " sys/stat.h sys_stat_h HAVE_SYS_STAT_H"
3112as_fn_append ac_header_c_list " sys/types.h sys_types_h HAVE_SYS_TYPES_H"
3113as_fn_append ac_header_c_list " unistd.h unistd_h HAVE_UNISTD_H"
3114as_fn_append ac_header_c_list " wchar.h wchar_h HAVE_WCHAR_H"
3115as_fn_append ac_header_c_list " minix/config.h minix_config_h HAVE_MINIX_CONFIG_H"
3116as_fn_append ac_header_c_list " vfork.h vfork_h HAVE_VFORK_H"
3117as_fn_append ac_func_c_list " fork HAVE_FORK"
3118as_fn_append ac_func_c_list " vfork HAVE_VFORK"
3119
3120# Auxiliary files required by this configure script.
3121ac_aux_files="ltmain.sh config.guess config.sub"
3122
3123# Locations in which to look for auxiliary files.
3124ac_aux_dir_candidates="${srcdir}${PATH_SEPARATOR}${srcdir}/..${PATH_SEPARATOR}${srcdir}/../.."
3125
3126# Search for a directory containing all of the required auxiliary files,
3127# $ac_aux_files, from the $PATH-style list $ac_aux_dir_candidates.
3128# If we don't find one directory that contains all the files we need,
3129# we report the set of missing files from the *first* directory in
3130# $ac_aux_dir_candidates and give up.
3131ac_missing_aux_files=""
3132ac_first_candidate=:
3133printf "%s\n" "$as_me:${as_lineno-$LINENO}: looking for aux files: $ac_aux_files" >&5
3134as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3135as_found=false
3136for as_dir in $ac_aux_dir_candidates
3137do
3138  IFS=$as_save_IFS
3139  case $as_dir in #(((
3140    '') as_dir=./ ;;
3141    */) ;;
3142    *) as_dir=$as_dir/ ;;
3143  esac
3144  as_found=:
3145
3146  printf "%s\n" "$as_me:${as_lineno-$LINENO}:  trying $as_dir" >&5
3147  ac_aux_dir_found=yes
3148  ac_install_sh=
3149  for ac_aux in $ac_aux_files
3150  do
3151    # As a special case, if "install-sh" is required, that requirement
3152    # can be satisfied by any of "install-sh", "install.sh", or "shtool",
3153    # and $ac_install_sh is set appropriately for whichever one is found.
3154    if test x"$ac_aux" = x"install-sh"
3155    then
3156      if test -f "${as_dir}install-sh"; then
3157        printf "%s\n" "$as_me:${as_lineno-$LINENO}:   ${as_dir}install-sh found" >&5
3158        ac_install_sh="${as_dir}install-sh -c"
3159      elif test -f "${as_dir}install.sh"; then
3160        printf "%s\n" "$as_me:${as_lineno-$LINENO}:   ${as_dir}install.sh found" >&5
3161        ac_install_sh="${as_dir}install.sh -c"
3162      elif test -f "${as_dir}shtool"; then
3163        printf "%s\n" "$as_me:${as_lineno-$LINENO}:   ${as_dir}shtool found" >&5
3164        ac_install_sh="${as_dir}shtool install -c"
3165      else
3166        ac_aux_dir_found=no
3167        if $ac_first_candidate; then
3168          ac_missing_aux_files="${ac_missing_aux_files} install-sh"
3169        else
3170          break
3171        fi
3172      fi
3173    else
3174      if test -f "${as_dir}${ac_aux}"; then
3175        printf "%s\n" "$as_me:${as_lineno-$LINENO}:   ${as_dir}${ac_aux} found" >&5
3176      else
3177        ac_aux_dir_found=no
3178        if $ac_first_candidate; then
3179          ac_missing_aux_files="${ac_missing_aux_files} ${ac_aux}"
3180        else
3181          break
3182        fi
3183      fi
3184    fi
3185  done
3186  if test "$ac_aux_dir_found" = yes; then
3187    ac_aux_dir="$as_dir"
3188    break
3189  fi
3190  ac_first_candidate=false
3191
3192  as_found=false
3193done
3194IFS=$as_save_IFS
3195if $as_found
3196then :
3197
3198else case e in #(
3199  e) as_fn_error $? "cannot find required auxiliary files:$ac_missing_aux_files" "$LINENO" 5 ;;
3200esac
3201fi
3202
3203
3204# These three variables are undocumented and unsupported,
3205# and are intended to be withdrawn in a future Autoconf release.
3206# They can cause serious problems if a builder's source tree is in a directory
3207# whose full name contains unusual characters.
3208if test -f "${ac_aux_dir}config.guess"; then
3209  ac_config_guess="$SHELL ${ac_aux_dir}config.guess"
3210fi
3211if test -f "${ac_aux_dir}config.sub"; then
3212  ac_config_sub="$SHELL ${ac_aux_dir}config.sub"
3213fi
3214if test -f "$ac_aux_dir/configure"; then
3215  ac_configure="$SHELL ${ac_aux_dir}configure"
3216fi
3217
3218# Check that the precious variables saved in the cache have kept the same
3219# value.
3220ac_cache_corrupted=false
3221for ac_var in $ac_precious_vars; do
3222  eval ac_old_set=\$ac_cv_env_${ac_var}_set
3223  eval ac_new_set=\$ac_env_${ac_var}_set
3224  eval ac_old_val=\$ac_cv_env_${ac_var}_value
3225  eval ac_new_val=\$ac_env_${ac_var}_value
3226  case $ac_old_set,$ac_new_set in
3227    set,)
3228      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: '$ac_var' was set to '$ac_old_val' in the previous run" >&5
3229printf "%s\n" "$as_me: error: '$ac_var' was set to '$ac_old_val' in the previous run" >&2;}
3230      ac_cache_corrupted=: ;;
3231    ,set)
3232      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: '$ac_var' was not set in the previous run" >&5
3233printf "%s\n" "$as_me: error: '$ac_var' was not set in the previous run" >&2;}
3234      ac_cache_corrupted=: ;;
3235    ,);;
3236    *)
3237      if test "x$ac_old_val" != "x$ac_new_val"; then
3238	# differences in whitespace do not lead to failure.
3239	ac_old_val_w=`echo x $ac_old_val`
3240	ac_new_val_w=`echo x $ac_new_val`
3241	if test "$ac_old_val_w" != "$ac_new_val_w"; then
3242	  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: '$ac_var' has changed since the previous run:" >&5
3243printf "%s\n" "$as_me: error: '$ac_var' has changed since the previous run:" >&2;}
3244	  ac_cache_corrupted=:
3245	else
3246	  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in '$ac_var' since the previous run:" >&5
3247printf "%s\n" "$as_me: warning: ignoring whitespace changes in '$ac_var' since the previous run:" >&2;}
3248	  eval $ac_var=\$ac_old_val
3249	fi
3250	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}:   former value:  '$ac_old_val'" >&5
3251printf "%s\n" "$as_me:   former value:  '$ac_old_val'" >&2;}
3252	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}:   current value: '$ac_new_val'" >&5
3253printf "%s\n" "$as_me:   current value: '$ac_new_val'" >&2;}
3254      fi;;
3255  esac
3256  # Pass precious variables to config.status.
3257  if test "$ac_new_set" = set; then
3258    case $ac_new_val in
3259    *\'*) ac_arg=$ac_var=`printf "%s\n" "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
3260    *) ac_arg=$ac_var=$ac_new_val ;;
3261    esac
3262    case " $ac_configure_args " in
3263      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
3264      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
3265    esac
3266  fi
3267done
3268if $ac_cache_corrupted; then
3269  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
3270printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
3271  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
3272printf "%s\n" "$as_me: error: changes in the environment can compromise the build" >&2;}
3273  as_fn_error $? "run '${MAKE-make} distclean' and/or 'rm $cache_file'
3274	    and start over" "$LINENO" 5
3275fi
3276## -------------------- ##
3277## Main body of script. ##
3278## -------------------- ##
3279
3280ac_ext=c
3281ac_cpp='$CPP $CPPFLAGS'
3282ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3283ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3284ac_compiler_gnu=$ac_cv_c_compiler_gnu
3285
3286
3287UNBOUND_VERSION_MAJOR=1
3288
3289UNBOUND_VERSION_MINOR=24
3290
3291UNBOUND_VERSION_MICRO=1
3292
3293
3294LIBUNBOUND_CURRENT=9
3295LIBUNBOUND_REVISION=33
3296LIBUNBOUND_AGE=1
3297# 1.0.0 had 0:12:0
3298# 1.0.1 had 0:13:0
3299# 1.0.2 had 0:14:0
3300# 1.1.0 had 0:15:0
3301# 1.1.1 had 0:16:0
3302# 1.2.0 had 0:17:0
3303# 1.2.1 had 0:18:0
3304# 1.3.0 had 1:0:0   # ub_cancel and -export-symbols.
3305# 1.3.1 had 1:1:0
3306# 1.3.2 had 1:2:0
3307# 1.3.3 had 1:3:0
3308# 1.3.4 had 1:4:0
3309# 1.4.0-snapshots had 1:5:0
3310# 1.4.0 had 1:5:0 (not 2:0:0)   # ub_result.why_bogus
3311# 1.4.1 had 2:1:0
3312# 1.4.2 had 2:2:0
3313# 1.4.3 had 2:3:0
3314# 1.4.4 had 2:4:0
3315# 1.4.5 had 2:5:0
3316# 1.4.6 had 2:6:0
3317# 1.4.7 had 2:7:0
3318# 1.4.8 had 2:8:0
3319# 1.4.9 had 2:9:0
3320# 1.4.10 had 2:10:0
3321# 1.4.11 had 2:11:0
3322# 1.4.12 had 2:12:0
3323# 1.4.13 had 2:13:0
3324# and 1.4.13p1 and 1.4.13.p2
3325# 1.4.14 had 2:14:0
3326# 1.4.15 had 3:0:1 # adds ub_version()
3327# 1.4.16 had 3:1:1
3328# 1.4.17 had 3:2:1
3329# 1.4.18 had 3:3:1
3330# 1.4.19 had 3:4:1
3331# 1.4.20 had 4:0:2 # adds libunbound.ttl # but shipped 3:5:1
3332# 1.4.21 had 4:1:2
3333# 1.4.22 had 4:1:2
3334# 1.5.0 had 5:3:3 # adds ub_ctx_add_ta_autr
3335# 1.5.1 had 5:3:3
3336# 1.5.2 had 5:5:3
3337# 1.5.3 had 5:6:3
3338# 1.5.4 had 5:7:3
3339# 1.5.5 had 5:8:3
3340# 1.5.6 had 5:9:3
3341# 1.5.7 had 5:10:3
3342# 1.5.8 had 6:0:4 # adds ub_ctx_set_stub
3343# 1.5.9 had 6:1:4
3344# 1.5.10 had 6:2:4
3345# 1.6.0 had 6:3:4
3346# 1.6.1 had 7:0:5 # ub_callback_t typedef renamed to ub_callback_type
3347# 1.6.2 had 7:1:5
3348# 1.6.3 had 7:2:5
3349# 1.6.4 had 7:3:5
3350# 1.6.5 had 7:4:5
3351# 1.6.6 had 7:5:5
3352# 1.6.7 had 7:6:5
3353# 1.6.8 had 7:7:5
3354# 1.7.0 had 7:8:5
3355# 1.7.1 had 7:9:5
3356# 1.7.2 had 7:10:5
3357# 1.7.3 had 7:11:5
3358# 1.8.0 had 8:0:0 # changes the event callback function signature
3359# 1.8.1 had 8:1:0
3360# 1.8.2 had 8:2:0
3361# 1.8.3 had 8:3:0
3362# 1.9.0 had 9:0:1 # add ub_ctx_set_tls
3363# 1.9.1 had 9:1:1
3364# 1.9.2 had 9:2:1
3365# 1.9.3 had 9:3:1
3366# 1.9.4 had 9:4:1
3367# 1.9.5 had 9:5:1
3368# 1.9.6 had 9:6:1
3369# 1.10.0 had 9:7:1
3370# 1.10.1 had 9:8:1
3371# 1.11.0 had 9:9:1
3372# 1.12.0 had 9:10:1
3373# 1.13.0 had 9:11:1
3374# 1.13.1 had 9:12:1
3375# 1.13.2 had 9:13:1
3376# 1.14.0 had 9:14:1
3377# 1.15.0 had 9:15:1
3378# 1.16.0 had 9:16:1
3379# 1.16.1 had 9:17:1
3380# 1.16.2 had 9:18:1
3381# 1.16.3 had 9:19:1
3382# 1.17.0 had 9:20:1
3383# 1.17.1 had 9:21:1
3384# 1.18.0 had 9:22:1
3385# 1.19.0 had 9:23:1
3386# 1.19.1 had 9:24:1
3387# 1.19.2 had 9:25:1
3388# 1.19.3 had 9:26:1
3389# 1.20.0 had 9:27:1
3390# 1.21.0 had 9:28:1
3391# 1.21.1 had 9:29:1
3392# 1.22.0 had 9:30:1
3393# 1.23.0 had 9:31:1
3394# 1.23.1 had 9:32:1
3395# 1.24.0 had 9:33:1
3396
3397#   Current  -- the number of the binary API that we're implementing
3398#   Revision -- which iteration of the implementation of the binary
3399#               API are we supplying?
3400#   Age      -- How many previous binary API versions do we also
3401#               support?
3402#
3403# If we release a new version that does not change the binary API,
3404# increment Revision.
3405#
3406# If we release a new version that changes the binary API, but does
3407# not break programs compiled against the old binary API, increment
3408# Current and Age.  Set Revision to 0, since this is the first
3409# implementation of the new API.
3410#
3411# Otherwise, we're changing the binary API and breaking backward
3412# compatibility with old binaries.  Increment Current.  Set Age to 0,
3413# since we're backward compatible with no previous APIs.  Set Revision
3414# to 0 too.
3415
3416
3417
3418
3419
3420cmdln="`echo $@ | sed -e 's/\\\\/\\\\\\\\/g' | sed -e 's/"/\\\\"/'g`"
3421
3422printf "%s\n" "#define CONFCMDLINE \"$cmdln\"" >>confdefs.h
3423
3424
3425CFLAGS="$CFLAGS"
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435ac_ext=c
3436ac_cpp='$CPP $CPPFLAGS'
3437ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3438ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3439ac_compiler_gnu=$ac_cv_c_compiler_gnu
3440if test -n "$ac_tool_prefix"; then
3441  # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3442set dummy ${ac_tool_prefix}gcc; ac_word=$2
3443{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3444printf %s "checking for $ac_word... " >&6; }
3445if test ${ac_cv_prog_CC+y}
3446then :
3447  printf %s "(cached) " >&6
3448else case e in #(
3449  e) if test -n "$CC"; then
3450  ac_cv_prog_CC="$CC" # Let the user override the test.
3451else
3452as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3453for as_dir in $PATH
3454do
3455  IFS=$as_save_IFS
3456  case $as_dir in #(((
3457    '') as_dir=./ ;;
3458    */) ;;
3459    *) as_dir=$as_dir/ ;;
3460  esac
3461    for ac_exec_ext in '' $ac_executable_extensions; do
3462  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
3463    ac_cv_prog_CC="${ac_tool_prefix}gcc"
3464    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
3465    break 2
3466  fi
3467done
3468  done
3469IFS=$as_save_IFS
3470
3471fi ;;
3472esac
3473fi
3474CC=$ac_cv_prog_CC
3475if test -n "$CC"; then
3476  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3477printf "%s\n" "$CC" >&6; }
3478else
3479  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
3480printf "%s\n" "no" >&6; }
3481fi
3482
3483
3484fi
3485if test -z "$ac_cv_prog_CC"; then
3486  ac_ct_CC=$CC
3487  # Extract the first word of "gcc", so it can be a program name with args.
3488set dummy gcc; ac_word=$2
3489{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3490printf %s "checking for $ac_word... " >&6; }
3491if test ${ac_cv_prog_ac_ct_CC+y}
3492then :
3493  printf %s "(cached) " >&6
3494else case e in #(
3495  e) if test -n "$ac_ct_CC"; then
3496  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3497else
3498as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3499for as_dir in $PATH
3500do
3501  IFS=$as_save_IFS
3502  case $as_dir in #(((
3503    '') as_dir=./ ;;
3504    */) ;;
3505    *) as_dir=$as_dir/ ;;
3506  esac
3507    for ac_exec_ext in '' $ac_executable_extensions; do
3508  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
3509    ac_cv_prog_ac_ct_CC="gcc"
3510    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
3511    break 2
3512  fi
3513done
3514  done
3515IFS=$as_save_IFS
3516
3517fi ;;
3518esac
3519fi
3520ac_ct_CC=$ac_cv_prog_ac_ct_CC
3521if test -n "$ac_ct_CC"; then
3522  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3523printf "%s\n" "$ac_ct_CC" >&6; }
3524else
3525  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
3526printf "%s\n" "no" >&6; }
3527fi
3528
3529  if test "x$ac_ct_CC" = x; then
3530    CC=""
3531  else
3532    case $cross_compiling:$ac_tool_warned in
3533yes:)
3534{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3535printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3536ac_tool_warned=yes ;;
3537esac
3538    CC=$ac_ct_CC
3539  fi
3540else
3541  CC="$ac_cv_prog_CC"
3542fi
3543
3544if test -z "$CC"; then
3545          if test -n "$ac_tool_prefix"; then
3546    # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
3547set dummy ${ac_tool_prefix}cc; ac_word=$2
3548{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3549printf %s "checking for $ac_word... " >&6; }
3550if test ${ac_cv_prog_CC+y}
3551then :
3552  printf %s "(cached) " >&6
3553else case e in #(
3554  e) if test -n "$CC"; then
3555  ac_cv_prog_CC="$CC" # Let the user override the test.
3556else
3557as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3558for as_dir in $PATH
3559do
3560  IFS=$as_save_IFS
3561  case $as_dir in #(((
3562    '') as_dir=./ ;;
3563    */) ;;
3564    *) as_dir=$as_dir/ ;;
3565  esac
3566    for ac_exec_ext in '' $ac_executable_extensions; do
3567  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
3568    ac_cv_prog_CC="${ac_tool_prefix}cc"
3569    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
3570    break 2
3571  fi
3572done
3573  done
3574IFS=$as_save_IFS
3575
3576fi ;;
3577esac
3578fi
3579CC=$ac_cv_prog_CC
3580if test -n "$CC"; then
3581  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3582printf "%s\n" "$CC" >&6; }
3583else
3584  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
3585printf "%s\n" "no" >&6; }
3586fi
3587
3588
3589  fi
3590fi
3591if test -z "$CC"; then
3592  # Extract the first word of "cc", so it can be a program name with args.
3593set dummy cc; ac_word=$2
3594{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3595printf %s "checking for $ac_word... " >&6; }
3596if test ${ac_cv_prog_CC+y}
3597then :
3598  printf %s "(cached) " >&6
3599else case e in #(
3600  e) if test -n "$CC"; then
3601  ac_cv_prog_CC="$CC" # Let the user override the test.
3602else
3603  ac_prog_rejected=no
3604as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3605for as_dir in $PATH
3606do
3607  IFS=$as_save_IFS
3608  case $as_dir in #(((
3609    '') as_dir=./ ;;
3610    */) ;;
3611    *) as_dir=$as_dir/ ;;
3612  esac
3613    for ac_exec_ext in '' $ac_executable_extensions; do
3614  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
3615    if test "$as_dir$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3616       ac_prog_rejected=yes
3617       continue
3618     fi
3619    ac_cv_prog_CC="cc"
3620    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
3621    break 2
3622  fi
3623done
3624  done
3625IFS=$as_save_IFS
3626
3627if test $ac_prog_rejected = yes; then
3628  # We found a bogon in the path, so make sure we never use it.
3629  set dummy $ac_cv_prog_CC
3630  shift
3631  if test $# != 0; then
3632    # We chose a different compiler from the bogus one.
3633    # However, it has the same basename, so the bogon will be chosen
3634    # first if we set CC to just the basename; use the full file name.
3635    shift
3636    ac_cv_prog_CC="$as_dir$ac_word${1+' '}$@"
3637  fi
3638fi
3639fi ;;
3640esac
3641fi
3642CC=$ac_cv_prog_CC
3643if test -n "$CC"; then
3644  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3645printf "%s\n" "$CC" >&6; }
3646else
3647  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
3648printf "%s\n" "no" >&6; }
3649fi
3650
3651
3652fi
3653if test -z "$CC"; then
3654  if test -n "$ac_tool_prefix"; then
3655  for ac_prog in cl.exe
3656  do
3657    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3658set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3659{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3660printf %s "checking for $ac_word... " >&6; }
3661if test ${ac_cv_prog_CC+y}
3662then :
3663  printf %s "(cached) " >&6
3664else case e in #(
3665  e) if test -n "$CC"; then
3666  ac_cv_prog_CC="$CC" # Let the user override the test.
3667else
3668as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3669for as_dir in $PATH
3670do
3671  IFS=$as_save_IFS
3672  case $as_dir in #(((
3673    '') as_dir=./ ;;
3674    */) ;;
3675    *) as_dir=$as_dir/ ;;
3676  esac
3677    for ac_exec_ext in '' $ac_executable_extensions; do
3678  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
3679    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
3680    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
3681    break 2
3682  fi
3683done
3684  done
3685IFS=$as_save_IFS
3686
3687fi ;;
3688esac
3689fi
3690CC=$ac_cv_prog_CC
3691if test -n "$CC"; then
3692  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3693printf "%s\n" "$CC" >&6; }
3694else
3695  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
3696printf "%s\n" "no" >&6; }
3697fi
3698
3699
3700    test -n "$CC" && break
3701  done
3702fi
3703if test -z "$CC"; then
3704  ac_ct_CC=$CC
3705  for ac_prog in cl.exe
3706do
3707  # Extract the first word of "$ac_prog", so it can be a program name with args.
3708set dummy $ac_prog; ac_word=$2
3709{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3710printf %s "checking for $ac_word... " >&6; }
3711if test ${ac_cv_prog_ac_ct_CC+y}
3712then :
3713  printf %s "(cached) " >&6
3714else case e in #(
3715  e) if test -n "$ac_ct_CC"; then
3716  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3717else
3718as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3719for as_dir in $PATH
3720do
3721  IFS=$as_save_IFS
3722  case $as_dir in #(((
3723    '') as_dir=./ ;;
3724    */) ;;
3725    *) as_dir=$as_dir/ ;;
3726  esac
3727    for ac_exec_ext in '' $ac_executable_extensions; do
3728  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
3729    ac_cv_prog_ac_ct_CC="$ac_prog"
3730    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
3731    break 2
3732  fi
3733done
3734  done
3735IFS=$as_save_IFS
3736
3737fi ;;
3738esac
3739fi
3740ac_ct_CC=$ac_cv_prog_ac_ct_CC
3741if test -n "$ac_ct_CC"; then
3742  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3743printf "%s\n" "$ac_ct_CC" >&6; }
3744else
3745  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
3746printf "%s\n" "no" >&6; }
3747fi
3748
3749
3750  test -n "$ac_ct_CC" && break
3751done
3752
3753  if test "x$ac_ct_CC" = x; then
3754    CC=""
3755  else
3756    case $cross_compiling:$ac_tool_warned in
3757yes:)
3758{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3759printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3760ac_tool_warned=yes ;;
3761esac
3762    CC=$ac_ct_CC
3763  fi
3764fi
3765
3766fi
3767if test -z "$CC"; then
3768  if test -n "$ac_tool_prefix"; then
3769  # Extract the first word of "${ac_tool_prefix}clang", so it can be a program name with args.
3770set dummy ${ac_tool_prefix}clang; ac_word=$2
3771{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3772printf %s "checking for $ac_word... " >&6; }
3773if test ${ac_cv_prog_CC+y}
3774then :
3775  printf %s "(cached) " >&6
3776else case e in #(
3777  e) if test -n "$CC"; then
3778  ac_cv_prog_CC="$CC" # Let the user override the test.
3779else
3780as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3781for as_dir in $PATH
3782do
3783  IFS=$as_save_IFS
3784  case $as_dir in #(((
3785    '') as_dir=./ ;;
3786    */) ;;
3787    *) as_dir=$as_dir/ ;;
3788  esac
3789    for ac_exec_ext in '' $ac_executable_extensions; do
3790  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
3791    ac_cv_prog_CC="${ac_tool_prefix}clang"
3792    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
3793    break 2
3794  fi
3795done
3796  done
3797IFS=$as_save_IFS
3798
3799fi ;;
3800esac
3801fi
3802CC=$ac_cv_prog_CC
3803if test -n "$CC"; then
3804  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3805printf "%s\n" "$CC" >&6; }
3806else
3807  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
3808printf "%s\n" "no" >&6; }
3809fi
3810
3811
3812fi
3813if test -z "$ac_cv_prog_CC"; then
3814  ac_ct_CC=$CC
3815  # Extract the first word of "clang", so it can be a program name with args.
3816set dummy clang; ac_word=$2
3817{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3818printf %s "checking for $ac_word... " >&6; }
3819if test ${ac_cv_prog_ac_ct_CC+y}
3820then :
3821  printf %s "(cached) " >&6
3822else case e in #(
3823  e) if test -n "$ac_ct_CC"; then
3824  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3825else
3826as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3827for as_dir in $PATH
3828do
3829  IFS=$as_save_IFS
3830  case $as_dir in #(((
3831    '') as_dir=./ ;;
3832    */) ;;
3833    *) as_dir=$as_dir/ ;;
3834  esac
3835    for ac_exec_ext in '' $ac_executable_extensions; do
3836  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
3837    ac_cv_prog_ac_ct_CC="clang"
3838    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
3839    break 2
3840  fi
3841done
3842  done
3843IFS=$as_save_IFS
3844
3845fi ;;
3846esac
3847fi
3848ac_ct_CC=$ac_cv_prog_ac_ct_CC
3849if test -n "$ac_ct_CC"; then
3850  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3851printf "%s\n" "$ac_ct_CC" >&6; }
3852else
3853  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
3854printf "%s\n" "no" >&6; }
3855fi
3856
3857  if test "x$ac_ct_CC" = x; then
3858    CC=""
3859  else
3860    case $cross_compiling:$ac_tool_warned in
3861yes:)
3862{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3863printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3864ac_tool_warned=yes ;;
3865esac
3866    CC=$ac_ct_CC
3867  fi
3868else
3869  CC="$ac_cv_prog_CC"
3870fi
3871
3872fi
3873
3874
3875test -z "$CC" && { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
3876printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
3877as_fn_error $? "no acceptable C compiler found in \$PATH
3878See 'config.log' for more details" "$LINENO" 5; }
3879
3880# Provide some information about the compiler.
3881printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3882set X $ac_compile
3883ac_compiler=$2
3884for ac_option in --version -v -V -qversion -version; do
3885  { { ac_try="$ac_compiler $ac_option >&5"
3886case "(($ac_try" in
3887  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3888  *) ac_try_echo=$ac_try;;
3889esac
3890eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3891printf "%s\n" "$ac_try_echo"; } >&5
3892  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
3893  ac_status=$?
3894  if test -s conftest.err; then
3895    sed '10a\
3896... rest of stderr output deleted ...
3897         10q' conftest.err >conftest.er1
3898    cat conftest.er1 >&5
3899  fi
3900  rm -f conftest.er1 conftest.err
3901  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3902  test $ac_status = 0; }
3903done
3904
3905cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3906/* end confdefs.h.  */
3907
3908int
3909main (void)
3910{
3911
3912  ;
3913  return 0;
3914}
3915_ACEOF
3916ac_clean_files_save=$ac_clean_files
3917ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
3918# Try to create an executable without -o first, disregard a.out.
3919# It will help us diagnose broken compilers, and finding out an intuition
3920# of exeext.
3921{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3922printf %s "checking whether the C compiler works... " >&6; }
3923ac_link_default=`printf "%s\n" "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3924
3925# The possible output files:
3926ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3927
3928ac_rmfiles=
3929for ac_file in $ac_files
3930do
3931  case $ac_file in
3932    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3933    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3934  esac
3935done
3936rm -f $ac_rmfiles
3937
3938if { { ac_try="$ac_link_default"
3939case "(($ac_try" in
3940  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3941  *) ac_try_echo=$ac_try;;
3942esac
3943eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3944printf "%s\n" "$ac_try_echo"; } >&5
3945  (eval "$ac_link_default") 2>&5
3946  ac_status=$?
3947  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3948  test $ac_status = 0; }
3949then :
3950  # Autoconf-2.13 could set the ac_cv_exeext variable to 'no'.
3951# So ignore a value of 'no', otherwise this would lead to 'EXEEXT = no'
3952# in a Makefile.  We should not override ac_cv_exeext if it was cached,
3953# so that the user can short-circuit this test for compilers unknown to
3954# Autoconf.
3955for ac_file in $ac_files ''
3956do
3957  test -f "$ac_file" || continue
3958  case $ac_file in
3959    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
3960	;;
3961    [ab].out )
3962	# We found the default executable, but exeext='' is most
3963	# certainly right.
3964	break;;
3965    *.* )
3966	if test ${ac_cv_exeext+y} && test "$ac_cv_exeext" != no;
3967	then :; else
3968	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3969	fi
3970	# We set ac_cv_exeext here because the later test for it is not
3971	# safe: cross compilers may not add the suffix if given an '-o'
3972	# argument, so we may need to know it at that point already.
3973	# Even if this section looks crufty: it has the advantage of
3974	# actually working.
3975	break;;
3976    * )
3977	break;;
3978  esac
3979done
3980test "$ac_cv_exeext" = no && ac_cv_exeext=
3981
3982else case e in #(
3983  e) ac_file='' ;;
3984esac
3985fi
3986if test -z "$ac_file"
3987then :
3988  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
3989printf "%s\n" "no" >&6; }
3990printf "%s\n" "$as_me: failed program was:" >&5
3991sed 's/^/| /' conftest.$ac_ext >&5
3992
3993{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
3994printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
3995as_fn_error 77 "C compiler cannot create executables
3996See 'config.log' for more details" "$LINENO" 5; }
3997else case e in #(
3998  e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3999printf "%s\n" "yes" >&6; } ;;
4000esac
4001fi
4002{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
4003printf %s "checking for C compiler default output file name... " >&6; }
4004{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
4005printf "%s\n" "$ac_file" >&6; }
4006ac_exeext=$ac_cv_exeext
4007
4008rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
4009ac_clean_files=$ac_clean_files_save
4010{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
4011printf %s "checking for suffix of executables... " >&6; }
4012if { { ac_try="$ac_link"
4013case "(($ac_try" in
4014  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4015  *) ac_try_echo=$ac_try;;
4016esac
4017eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4018printf "%s\n" "$ac_try_echo"; } >&5
4019  (eval "$ac_link") 2>&5
4020  ac_status=$?
4021  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4022  test $ac_status = 0; }
4023then :
4024  # If both 'conftest.exe' and 'conftest' are 'present' (well, observable)
4025# catch 'conftest.exe'.  For instance with Cygwin, 'ls conftest' will
4026# work properly (i.e., refer to 'conftest.exe'), while it won't with
4027# 'rm'.
4028for ac_file in conftest.exe conftest conftest.*; do
4029  test -f "$ac_file" || continue
4030  case $ac_file in
4031    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
4032    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4033	  break;;
4034    * ) break;;
4035  esac
4036done
4037else case e in #(
4038  e) { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
4039printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
4040as_fn_error $? "cannot compute suffix of executables: cannot compile and link
4041See 'config.log' for more details" "$LINENO" 5; } ;;
4042esac
4043fi
4044rm -f conftest conftest$ac_cv_exeext
4045{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
4046printf "%s\n" "$ac_cv_exeext" >&6; }
4047
4048rm -f conftest.$ac_ext
4049EXEEXT=$ac_cv_exeext
4050ac_exeext=$EXEEXT
4051cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4052/* end confdefs.h.  */
4053#include <stdio.h>
4054int
4055main (void)
4056{
4057FILE *f = fopen ("conftest.out", "w");
4058 if (!f)
4059  return 1;
4060 return ferror (f) || fclose (f) != 0;
4061
4062  ;
4063  return 0;
4064}
4065_ACEOF
4066ac_clean_files="$ac_clean_files conftest.out"
4067# Check that the compiler produces executables we can run.  If not, either
4068# the compiler is broken, or we cross compile.
4069{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4070printf %s "checking whether we are cross compiling... " >&6; }
4071if test "$cross_compiling" != yes; then
4072  { { ac_try="$ac_link"
4073case "(($ac_try" in
4074  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4075  *) ac_try_echo=$ac_try;;
4076esac
4077eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4078printf "%s\n" "$ac_try_echo"; } >&5
4079  (eval "$ac_link") 2>&5
4080  ac_status=$?
4081  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4082  test $ac_status = 0; }
4083  if { ac_try='./conftest$ac_cv_exeext'
4084  { { case "(($ac_try" in
4085  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4086  *) ac_try_echo=$ac_try;;
4087esac
4088eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4089printf "%s\n" "$ac_try_echo"; } >&5
4090  (eval "$ac_try") 2>&5
4091  ac_status=$?
4092  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4093  test $ac_status = 0; }; }; then
4094    cross_compiling=no
4095  else
4096    if test "$cross_compiling" = maybe; then
4097	cross_compiling=yes
4098    else
4099	{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
4100printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
4101as_fn_error 77 "cannot run C compiled programs.
4102If you meant to cross compile, use '--host'.
4103See 'config.log' for more details" "$LINENO" 5; }
4104    fi
4105  fi
4106fi
4107{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4108printf "%s\n" "$cross_compiling" >&6; }
4109
4110rm -f conftest.$ac_ext conftest$ac_cv_exeext \
4111  conftest.o conftest.obj conftest.out
4112ac_clean_files=$ac_clean_files_save
4113{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4114printf %s "checking for suffix of object files... " >&6; }
4115if test ${ac_cv_objext+y}
4116then :
4117  printf %s "(cached) " >&6
4118else case e in #(
4119  e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4120/* end confdefs.h.  */
4121
4122int
4123main (void)
4124{
4125
4126  ;
4127  return 0;
4128}
4129_ACEOF
4130rm -f conftest.o conftest.obj
4131if { { ac_try="$ac_compile"
4132case "(($ac_try" in
4133  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4134  *) ac_try_echo=$ac_try;;
4135esac
4136eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4137printf "%s\n" "$ac_try_echo"; } >&5
4138  (eval "$ac_compile") 2>&5
4139  ac_status=$?
4140  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4141  test $ac_status = 0; }
4142then :
4143  for ac_file in conftest.o conftest.obj conftest.*; do
4144  test -f "$ac_file" || continue;
4145  case $ac_file in
4146    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
4147    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4148       break;;
4149  esac
4150done
4151else case e in #(
4152  e) printf "%s\n" "$as_me: failed program was:" >&5
4153sed 's/^/| /' conftest.$ac_ext >&5
4154
4155{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
4156printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
4157as_fn_error $? "cannot compute suffix of object files: cannot compile
4158See 'config.log' for more details" "$LINENO" 5; } ;;
4159esac
4160fi
4161rm -f conftest.$ac_cv_objext conftest.$ac_ext ;;
4162esac
4163fi
4164{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4165printf "%s\n" "$ac_cv_objext" >&6; }
4166OBJEXT=$ac_cv_objext
4167ac_objext=$OBJEXT
4168{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports GNU C" >&5
4169printf %s "checking whether the compiler supports GNU C... " >&6; }
4170if test ${ac_cv_c_compiler_gnu+y}
4171then :
4172  printf %s "(cached) " >&6
4173else case e in #(
4174  e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4175/* end confdefs.h.  */
4176
4177int
4178main (void)
4179{
4180#ifndef __GNUC__
4181       choke me
4182#endif
4183
4184  ;
4185  return 0;
4186}
4187_ACEOF
4188if ac_fn_c_try_compile "$LINENO"
4189then :
4190  ac_compiler_gnu=yes
4191else case e in #(
4192  e) ac_compiler_gnu=no ;;
4193esac
4194fi
4195rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
4196ac_cv_c_compiler_gnu=$ac_compiler_gnu
4197 ;;
4198esac
4199fi
4200{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4201printf "%s\n" "$ac_cv_c_compiler_gnu" >&6; }
4202ac_compiler_gnu=$ac_cv_c_compiler_gnu
4203
4204if test $ac_compiler_gnu = yes; then
4205  GCC=yes
4206else
4207  GCC=
4208fi
4209ac_test_CFLAGS=${CFLAGS+y}
4210ac_save_CFLAGS=$CFLAGS
4211{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4212printf %s "checking whether $CC accepts -g... " >&6; }
4213if test ${ac_cv_prog_cc_g+y}
4214then :
4215  printf %s "(cached) " >&6
4216else case e in #(
4217  e) ac_save_c_werror_flag=$ac_c_werror_flag
4218   ac_c_werror_flag=yes
4219   ac_cv_prog_cc_g=no
4220   CFLAGS="-g"
4221   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4222/* end confdefs.h.  */
4223
4224int
4225main (void)
4226{
4227
4228  ;
4229  return 0;
4230}
4231_ACEOF
4232if ac_fn_c_try_compile "$LINENO"
4233then :
4234  ac_cv_prog_cc_g=yes
4235else case e in #(
4236  e) CFLAGS=""
4237      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4238/* end confdefs.h.  */
4239
4240int
4241main (void)
4242{
4243
4244  ;
4245  return 0;
4246}
4247_ACEOF
4248if ac_fn_c_try_compile "$LINENO"
4249then :
4250
4251else case e in #(
4252  e) ac_c_werror_flag=$ac_save_c_werror_flag
4253	 CFLAGS="-g"
4254	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4255/* end confdefs.h.  */
4256
4257int
4258main (void)
4259{
4260
4261  ;
4262  return 0;
4263}
4264_ACEOF
4265if ac_fn_c_try_compile "$LINENO"
4266then :
4267  ac_cv_prog_cc_g=yes
4268fi
4269rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
4270esac
4271fi
4272rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
4273esac
4274fi
4275rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
4276   ac_c_werror_flag=$ac_save_c_werror_flag ;;
4277esac
4278fi
4279{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4280printf "%s\n" "$ac_cv_prog_cc_g" >&6; }
4281if test $ac_test_CFLAGS; then
4282  CFLAGS=$ac_save_CFLAGS
4283elif test $ac_cv_prog_cc_g = yes; then
4284  if test "$GCC" = yes; then
4285    CFLAGS="-g -O2"
4286  else
4287    CFLAGS="-g"
4288  fi
4289else
4290  if test "$GCC" = yes; then
4291    CFLAGS="-O2"
4292  else
4293    CFLAGS=
4294  fi
4295fi
4296ac_prog_cc_stdc=no
4297if test x$ac_prog_cc_stdc = xno
4298then :
4299  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C11 features" >&5
4300printf %s "checking for $CC option to enable C11 features... " >&6; }
4301if test ${ac_cv_prog_cc_c11+y}
4302then :
4303  printf %s "(cached) " >&6
4304else case e in #(
4305  e) ac_cv_prog_cc_c11=no
4306ac_save_CC=$CC
4307cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4308/* end confdefs.h.  */
4309$ac_c_conftest_c11_program
4310_ACEOF
4311for ac_arg in '' -std=gnu11
4312do
4313  CC="$ac_save_CC $ac_arg"
4314  if ac_fn_c_try_compile "$LINENO"
4315then :
4316  ac_cv_prog_cc_c11=$ac_arg
4317fi
4318rm -f core conftest.err conftest.$ac_objext conftest.beam
4319  test "x$ac_cv_prog_cc_c11" != "xno" && break
4320done
4321rm -f conftest.$ac_ext
4322CC=$ac_save_CC ;;
4323esac
4324fi
4325
4326if test "x$ac_cv_prog_cc_c11" = xno
4327then :
4328  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4329printf "%s\n" "unsupported" >&6; }
4330else case e in #(
4331  e) if test "x$ac_cv_prog_cc_c11" = x
4332then :
4333  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4334printf "%s\n" "none needed" >&6; }
4335else case e in #(
4336  e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c11" >&5
4337printf "%s\n" "$ac_cv_prog_cc_c11" >&6; }
4338     CC="$CC $ac_cv_prog_cc_c11" ;;
4339esac
4340fi
4341  ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c11
4342  ac_prog_cc_stdc=c11 ;;
4343esac
4344fi
4345fi
4346if test x$ac_prog_cc_stdc = xno
4347then :
4348  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C99 features" >&5
4349printf %s "checking for $CC option to enable C99 features... " >&6; }
4350if test ${ac_cv_prog_cc_c99+y}
4351then :
4352  printf %s "(cached) " >&6
4353else case e in #(
4354  e) ac_cv_prog_cc_c99=no
4355ac_save_CC=$CC
4356cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4357/* end confdefs.h.  */
4358$ac_c_conftest_c99_program
4359_ACEOF
4360for ac_arg in '' -std=gnu99 -std=c99 -c99 -qlanglvl=extc1x -qlanglvl=extc99 -AC99 -D_STDC_C99=
4361do
4362  CC="$ac_save_CC $ac_arg"
4363  if ac_fn_c_try_compile "$LINENO"
4364then :
4365  ac_cv_prog_cc_c99=$ac_arg
4366fi
4367rm -f core conftest.err conftest.$ac_objext conftest.beam
4368  test "x$ac_cv_prog_cc_c99" != "xno" && break
4369done
4370rm -f conftest.$ac_ext
4371CC=$ac_save_CC ;;
4372esac
4373fi
4374
4375if test "x$ac_cv_prog_cc_c99" = xno
4376then :
4377  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4378printf "%s\n" "unsupported" >&6; }
4379else case e in #(
4380  e) if test "x$ac_cv_prog_cc_c99" = x
4381then :
4382  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4383printf "%s\n" "none needed" >&6; }
4384else case e in #(
4385  e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5
4386printf "%s\n" "$ac_cv_prog_cc_c99" >&6; }
4387     CC="$CC $ac_cv_prog_cc_c99" ;;
4388esac
4389fi
4390  ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99
4391  ac_prog_cc_stdc=c99 ;;
4392esac
4393fi
4394fi
4395if test x$ac_prog_cc_stdc = xno
4396then :
4397  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C89 features" >&5
4398printf %s "checking for $CC option to enable C89 features... " >&6; }
4399if test ${ac_cv_prog_cc_c89+y}
4400then :
4401  printf %s "(cached) " >&6
4402else case e in #(
4403  e) ac_cv_prog_cc_c89=no
4404ac_save_CC=$CC
4405cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4406/* end confdefs.h.  */
4407$ac_c_conftest_c89_program
4408_ACEOF
4409for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
4410do
4411  CC="$ac_save_CC $ac_arg"
4412  if ac_fn_c_try_compile "$LINENO"
4413then :
4414  ac_cv_prog_cc_c89=$ac_arg
4415fi
4416rm -f core conftest.err conftest.$ac_objext conftest.beam
4417  test "x$ac_cv_prog_cc_c89" != "xno" && break
4418done
4419rm -f conftest.$ac_ext
4420CC=$ac_save_CC ;;
4421esac
4422fi
4423
4424if test "x$ac_cv_prog_cc_c89" = xno
4425then :
4426  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4427printf "%s\n" "unsupported" >&6; }
4428else case e in #(
4429  e) if test "x$ac_cv_prog_cc_c89" = x
4430then :
4431  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4432printf "%s\n" "none needed" >&6; }
4433else case e in #(
4434  e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4435printf "%s\n" "$ac_cv_prog_cc_c89" >&6; }
4436     CC="$CC $ac_cv_prog_cc_c89" ;;
4437esac
4438fi
4439  ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89
4440  ac_prog_cc_stdc=c89 ;;
4441esac
4442fi
4443fi
4444
4445ac_ext=c
4446ac_cpp='$CPP $CPPFLAGS'
4447ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4448ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4449ac_compiler_gnu=$ac_cv_c_compiler_gnu
4450
4451
4452ac_header= ac_cache=
4453for ac_item in $ac_header_c_list
4454do
4455  if test $ac_cache; then
4456    ac_fn_c_check_header_compile "$LINENO" $ac_header ac_cv_header_$ac_cache "$ac_includes_default"
4457    if eval test \"x\$ac_cv_header_$ac_cache\" = xyes; then
4458      printf "%s\n" "#define $ac_item 1" >> confdefs.h
4459    fi
4460    ac_header= ac_cache=
4461  elif test $ac_header; then
4462    ac_cache=$ac_item
4463  else
4464    ac_header=$ac_item
4465  fi
4466done
4467
4468
4469
4470
4471
4472
4473
4474
4475if test $ac_cv_header_stdlib_h = yes && test $ac_cv_header_string_h = yes
4476then :
4477
4478printf "%s\n" "#define STDC_HEADERS 1" >>confdefs.h
4479
4480fi
4481
4482
4483
4484
4485
4486
4487  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
4488printf %s "checking whether it is safe to define __EXTENSIONS__... " >&6; }
4489if test ${ac_cv_safe_to_define___extensions__+y}
4490then :
4491  printf %s "(cached) " >&6
4492else case e in #(
4493  e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4494/* end confdefs.h.  */
4495
4496#         define __EXTENSIONS__ 1
4497          $ac_includes_default
4498int
4499main (void)
4500{
4501
4502  ;
4503  return 0;
4504}
4505_ACEOF
4506if ac_fn_c_try_compile "$LINENO"
4507then :
4508  ac_cv_safe_to_define___extensions__=yes
4509else case e in #(
4510  e) ac_cv_safe_to_define___extensions__=no ;;
4511esac
4512fi
4513rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
4514esac
4515fi
4516{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
4517printf "%s\n" "$ac_cv_safe_to_define___extensions__" >&6; }
4518
4519  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether _XOPEN_SOURCE should be defined" >&5
4520printf %s "checking whether _XOPEN_SOURCE should be defined... " >&6; }
4521if test ${ac_cv_should_define__xopen_source+y}
4522then :
4523  printf %s "(cached) " >&6
4524else case e in #(
4525  e) ac_cv_should_define__xopen_source=no
4526    if test $ac_cv_header_wchar_h = yes
4527then :
4528  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4529/* end confdefs.h.  */
4530
4531          #include <wchar.h>
4532          mbstate_t x;
4533int
4534main (void)
4535{
4536
4537  ;
4538  return 0;
4539}
4540_ACEOF
4541if ac_fn_c_try_compile "$LINENO"
4542then :
4543
4544else case e in #(
4545  e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4546/* end confdefs.h.  */
4547
4548            #define _XOPEN_SOURCE 500
4549            #include <wchar.h>
4550            mbstate_t x;
4551int
4552main (void)
4553{
4554
4555  ;
4556  return 0;
4557}
4558_ACEOF
4559if ac_fn_c_try_compile "$LINENO"
4560then :
4561  ac_cv_should_define__xopen_source=yes
4562fi
4563rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
4564esac
4565fi
4566rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
4567fi ;;
4568esac
4569fi
4570{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_should_define__xopen_source" >&5
4571printf "%s\n" "$ac_cv_should_define__xopen_source" >&6; }
4572
4573  printf "%s\n" "#define _ALL_SOURCE 1" >>confdefs.h
4574
4575  printf "%s\n" "#define _DARWIN_C_SOURCE 1" >>confdefs.h
4576
4577  printf "%s\n" "#define _GNU_SOURCE 1" >>confdefs.h
4578
4579  printf "%s\n" "#define _HPUX_ALT_XOPEN_SOCKET_API 1" >>confdefs.h
4580
4581  printf "%s\n" "#define _NETBSD_SOURCE 1" >>confdefs.h
4582
4583  printf "%s\n" "#define _OPENBSD_SOURCE 1" >>confdefs.h
4584
4585  printf "%s\n" "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
4586
4587  printf "%s\n" "#define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1" >>confdefs.h
4588
4589  printf "%s\n" "#define __STDC_WANT_IEC_60559_BFP_EXT__ 1" >>confdefs.h
4590
4591  printf "%s\n" "#define __STDC_WANT_IEC_60559_DFP_EXT__ 1" >>confdefs.h
4592
4593  printf "%s\n" "#define __STDC_WANT_IEC_60559_EXT__ 1" >>confdefs.h
4594
4595  printf "%s\n" "#define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1" >>confdefs.h
4596
4597  printf "%s\n" "#define __STDC_WANT_IEC_60559_TYPES_EXT__ 1" >>confdefs.h
4598
4599  printf "%s\n" "#define __STDC_WANT_LIB_EXT2__ 1" >>confdefs.h
4600
4601  printf "%s\n" "#define __STDC_WANT_MATH_SPEC_FUNCS__ 1" >>confdefs.h
4602
4603  printf "%s\n" "#define _TANDEM_SOURCE 1" >>confdefs.h
4604
4605  if test $ac_cv_header_minix_config_h = yes
4606then :
4607  MINIX=yes
4608    printf "%s\n" "#define _MINIX 1" >>confdefs.h
4609
4610    printf "%s\n" "#define _POSIX_SOURCE 1" >>confdefs.h
4611
4612    printf "%s\n" "#define _POSIX_1_SOURCE 2" >>confdefs.h
4613
4614else case e in #(
4615  e) MINIX= ;;
4616esac
4617fi
4618  if test $ac_cv_safe_to_define___extensions__ = yes
4619then :
4620  printf "%s\n" "#define __EXTENSIONS__ 1" >>confdefs.h
4621
4622fi
4623  if test $ac_cv_should_define__xopen_source = yes
4624then :
4625  printf "%s\n" "#define _XOPEN_SOURCE 500" >>confdefs.h
4626
4627fi
4628
4629if test "$ac_cv_header_minix_config_h" = "yes"; then
4630
4631printf "%s\n" "#define _NETBSD_SOURCE 1" >>confdefs.h
4632
4633fi
4634
4635case "$prefix" in
4636        NONE)
4637		prefix="/usr/local"
4638        ;;
4639esac
4640case "$exec_prefix" in
4641        NONE)
4642		exec_prefix="$prefix"
4643        ;;
4644esac
4645
4646# are we on MinGW?
4647if uname -s 2>&1 | grep MINGW >/dev/null; then on_mingw="yes"
4648else
4649	if echo $host | grep mingw >/dev/null; then on_mingw="yes"
4650	else on_mingw="no"; fi
4651fi
4652
4653#
4654# Determine configuration file
4655# the eval is to evaluate shell expansion twice
4656UNBOUND_SBIN_DIR=`eval echo "${sbindir}"`
4657
4658UNBOUND_SYSCONF_DIR=`eval echo "${sysconfdir}"`
4659
4660UNBOUND_LOCALSTATE_DIR=`eval echo "${localstatedir}"`
4661
4662if test $on_mingw = "no"; then
4663  ub_conf_file=`eval echo "${sysconfdir}/unbound/unbound.conf"`
4664else
4665  ub_conf_file="C:\\Program Files\\Unbound\\service.conf"
4666fi
4667
4668# Check whether --with-conf_file was given.
4669if test ${with_conf_file+y}
4670then :
4671  withval=$with_conf_file; ub_conf_file="$withval"
4672fi
4673
4674
4675hdr_config="`echo $ub_conf_file | sed -e 's/\\\\/\\\\\\\\/g'`"
4676
4677
4678printf "%s\n" "#define CONFIGFILE \"$hdr_config\"" >>confdefs.h
4679
4680ub_conf_dir=`$as_dirname -- "$ub_conf_file" ||
4681$as_expr X"$ub_conf_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
4682	 X"$ub_conf_file" : 'X\(//\)[^/]' \| \
4683	 X"$ub_conf_file" : 'X\(//\)$' \| \
4684	 X"$ub_conf_file" : 'X\(/\)' \| . 2>/dev/null ||
4685printf "%s\n" X"$ub_conf_file" |
4686    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
4687	    s//\1/
4688	    q
4689	  }
4690	  /^X\(\/\/\)[^/].*/{
4691	    s//\1/
4692	    q
4693	  }
4694	  /^X\(\/\/\)$/{
4695	    s//\1/
4696	    q
4697	  }
4698	  /^X\(\/\).*/{
4699	    s//\1/
4700	    q
4701	  }
4702	  s/.*/./; q'`
4703
4704
4705# Determine run, chroot directory and pidfile locations
4706
4707# Check whether --with-run-dir was given.
4708if test ${with_run_dir+y}
4709then :
4710  withval=$with_run_dir; UNBOUND_RUN_DIR="$withval"
4711else case e in #(
4712  e) if test $on_mingw = no; then
4713    UNBOUND_RUN_DIR=`dirname "$ub_conf_file"`
4714else
4715    UNBOUND_RUN_DIR=""
4716fi
4717 ;;
4718esac
4719fi
4720
4721
4722hdr_run="`echo $UNBOUND_RUN_DIR | sed -e 's/\\\\/\\\\\\\\/g'`"
4723
4724
4725printf "%s\n" "#define RUN_DIR \"$hdr_run\"" >>confdefs.h
4726
4727
4728
4729# Check whether --with-chroot-dir was given.
4730if test ${with_chroot_dir+y}
4731then :
4732  withval=$with_chroot_dir; UNBOUND_CHROOT_DIR="$withval"
4733else case e in #(
4734  e) if test $on_mingw = no; then
4735    UNBOUND_CHROOT_DIR="$UNBOUND_RUN_DIR"
4736else
4737    UNBOUND_CHROOT_DIR=""
4738fi
4739 ;;
4740esac
4741fi
4742
4743
4744hdr_chroot="`echo $UNBOUND_CHROOT_DIR | sed -e 's/\\\\/\\\\\\\\/g'`"
4745
4746
4747printf "%s\n" "#define CHROOT_DIR \"$hdr_chroot\"" >>confdefs.h
4748
4749
4750
4751# Check whether --with-share-dir was given.
4752if test ${with_share_dir+y}
4753then :
4754  withval=$with_share_dir; UNBOUND_SHARE_DIR="$withval"
4755else case e in #(
4756  e) UNBOUND_SHARE_DIR="$UNBOUND_RUN_DIR" ;;
4757esac
4758fi
4759
4760
4761
4762printf "%s\n" "#define SHARE_DIR \"$UNBOUND_SHARE_DIR\"" >>confdefs.h
4763
4764
4765
4766# Check whether --with-pidfile was given.
4767if test ${with_pidfile+y}
4768then :
4769  withval=$with_pidfile; UNBOUND_PIDFILE="$withval"
4770else case e in #(
4771  e) if test $on_mingw = no; then
4772    UNBOUND_PIDFILE="$UNBOUND_RUN_DIR/unbound.pid"
4773else
4774    UNBOUND_PIDFILE=""
4775fi
4776 ;;
4777esac
4778fi
4779
4780
4781hdr_pid="`echo $UNBOUND_PIDFILE | sed -e 's/\\\\/\\\\\\\\/g'`"
4782
4783
4784printf "%s\n" "#define PIDFILE \"$hdr_pid\"" >>confdefs.h
4785
4786
4787
4788# Check whether --with-rootkey-file was given.
4789if test ${with_rootkey_file+y}
4790then :
4791  withval=$with_rootkey_file; UNBOUND_ROOTKEY_FILE="$withval"
4792else case e in #(
4793  e) if test $on_mingw = no; then
4794    UNBOUND_ROOTKEY_FILE="$UNBOUND_RUN_DIR/root.key"
4795else
4796    UNBOUND_ROOTKEY_FILE="C:\\Program Files\\Unbound\\root.key"
4797fi
4798 ;;
4799esac
4800fi
4801
4802
4803hdr_rkey="`echo $UNBOUND_ROOTKEY_FILE | sed -e 's/\\\\/\\\\\\\\/g'`"
4804
4805
4806printf "%s\n" "#define ROOT_ANCHOR_FILE \"$hdr_rkey\"" >>confdefs.h
4807
4808
4809
4810# Check whether --with-rootcert-file was given.
4811if test ${with_rootcert_file+y}
4812then :
4813  withval=$with_rootcert_file; UNBOUND_ROOTCERT_FILE="$withval"
4814else case e in #(
4815  e) if test $on_mingw = no; then
4816    UNBOUND_ROOTCERT_FILE="$UNBOUND_RUN_DIR/icannbundle.pem"
4817else
4818    UNBOUND_ROOTCERT_FILE="C:\\Program Files\\Unbound\\icannbundle.pem"
4819fi
4820 ;;
4821esac
4822fi
4823
4824
4825hdr_rpem="`echo $UNBOUND_ROOTCERT_FILE | sed -e 's/\\\\/\\\\\\\\/g'`"
4826
4827
4828printf "%s\n" "#define ROOT_CERT_FILE \"$hdr_rpem\"" >>confdefs.h
4829
4830
4831
4832# Check whether --with-username was given.
4833if test ${with_username+y}
4834then :
4835  withval=$with_username; UNBOUND_USERNAME="$withval"
4836else case e in #(
4837  e) UNBOUND_USERNAME="unbound" ;;
4838esac
4839fi
4840
4841
4842
4843printf "%s\n" "#define UB_USERNAME \"$UNBOUND_USERNAME\"" >>confdefs.h
4844
4845
4846
4847printf "%s\n" "#define WINVER 0x0502" >>confdefs.h
4848
4849wnvs=`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/' `
4850
4851
4852printf "%s\n" "#define RSRC_PACKAGE_VERSION $wnvs" >>confdefs.h
4853
4854
4855# Check for 'grep -e' program, here, since ACX_CHECK_FLTO needs that.
4856{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4857printf %s "checking for grep that handles long lines and -e... " >&6; }
4858if test ${ac_cv_path_GREP+y}
4859then :
4860  printf %s "(cached) " >&6
4861else case e in #(
4862  e) if test -z "$GREP"; then
4863  ac_path_GREP_found=false
4864  # Loop through the user's path and test for each of PROGNAME-LIST
4865  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4866for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4867do
4868  IFS=$as_save_IFS
4869  case $as_dir in #(((
4870    '') as_dir=./ ;;
4871    */) ;;
4872    *) as_dir=$as_dir/ ;;
4873  esac
4874    for ac_prog in grep ggrep
4875   do
4876    for ac_exec_ext in '' $ac_executable_extensions; do
4877      ac_path_GREP="$as_dir$ac_prog$ac_exec_ext"
4878      as_fn_executable_p "$ac_path_GREP" || continue
4879# Check for GNU ac_path_GREP and select it if it is found.
4880  # Check for GNU $ac_path_GREP
4881case `"$ac_path_GREP" --version 2>&1` in #(
4882*GNU*)
4883  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4884#(
4885*)
4886  ac_count=0
4887  printf %s 0123456789 >"conftest.in"
4888  while :
4889  do
4890    cat "conftest.in" "conftest.in" >"conftest.tmp"
4891    mv "conftest.tmp" "conftest.in"
4892    cp "conftest.in" "conftest.nl"
4893    printf "%s\n" 'GREP' >> "conftest.nl"
4894    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4895    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4896    as_fn_arith $ac_count + 1 && ac_count=$as_val
4897    if test $ac_count -gt ${ac_path_GREP_max-0}; then
4898      # Best one so far, save it but keep looking for a better one
4899      ac_cv_path_GREP="$ac_path_GREP"
4900      ac_path_GREP_max=$ac_count
4901    fi
4902    # 10*(2^10) chars as input seems more than enough
4903    test $ac_count -gt 10 && break
4904  done
4905  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4906esac
4907
4908      $ac_path_GREP_found && break 3
4909    done
4910  done
4911  done
4912IFS=$as_save_IFS
4913  if test -z "$ac_cv_path_GREP"; then
4914    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4915  fi
4916else
4917  ac_cv_path_GREP=$GREP
4918fi
4919 ;;
4920esac
4921fi
4922{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4923printf "%s\n" "$ac_cv_path_GREP" >&6; }
4924 GREP="$ac_cv_path_GREP"
4925
4926
4927
4928# Checks for typedefs, structures, and compiler characteristics.
4929{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
4930printf %s "checking for an ANSI C-conforming const... " >&6; }
4931if test ${ac_cv_c_const+y}
4932then :
4933  printf %s "(cached) " >&6
4934else case e in #(
4935  e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4936/* end confdefs.h.  */
4937
4938int
4939main (void)
4940{
4941
4942#ifndef __cplusplus
4943  /* Ultrix mips cc rejects this sort of thing.  */
4944  typedef int charset[2];
4945  const charset cs = { 0, 0 };
4946  /* SunOS 4.1.1 cc rejects this.  */
4947  char const *const *pcpcc;
4948  char **ppc;
4949  /* NEC SVR4.0.2 mips cc rejects this.  */
4950  struct point {int x, y;};
4951  static struct point const zero = {0,0};
4952  /* IBM XL C 1.02.0.0 rejects this.
4953     It does not let you subtract one const X* pointer from another in
4954     an arm of an if-expression whose if-part is not a constant
4955     expression */
4956  const char *g = "string";
4957  pcpcc = &g + (g ? g-g : 0);
4958  /* HPUX 7.0 cc rejects these. */
4959  ++pcpcc;
4960  ppc = (char**) pcpcc;
4961  pcpcc = (char const *const *) ppc;
4962  { /* SCO 3.2v4 cc rejects this sort of thing.  */
4963    char tx;
4964    char *t = &tx;
4965    char const *s = 0 ? (char *) 0 : (char const *) 0;
4966
4967    *t++ = 0;
4968    if (s) return 0;
4969  }
4970  { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
4971    int x[] = {25, 17};
4972    const int *foo = &x[0];
4973    ++foo;
4974  }
4975  { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
4976    typedef const int *iptr;
4977    iptr p = 0;
4978    ++p;
4979  }
4980  { /* IBM XL C 1.02.0.0 rejects this sort of thing, saying
4981       "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
4982    struct s { int j; const int *ap[3]; } bx;
4983    struct s *b = &bx; b->j = 5;
4984  }
4985  { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
4986    const int foo = 10;
4987    if (!foo) return 0;
4988  }
4989  return !cs[0] && !zero.x;
4990#endif
4991
4992  ;
4993  return 0;
4994}
4995_ACEOF
4996if ac_fn_c_try_compile "$LINENO"
4997then :
4998  ac_cv_c_const=yes
4999else case e in #(
5000  e) ac_cv_c_const=no ;;
5001esac
5002fi
5003rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
5004esac
5005fi
5006{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
5007printf "%s\n" "$ac_cv_c_const" >&6; }
5008if test $ac_cv_c_const = no; then
5009
5010printf "%s\n" "#define const /**/" >>confdefs.h
5011
5012fi
5013
5014ac_ext=c
5015ac_cpp='$CPP $CPPFLAGS'
5016ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5017ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5018ac_compiler_gnu=$ac_cv_c_compiler_gnu
5019
5020# allow user to override the -g -O2 flags.
5021default_cflags=no
5022if test "x$CFLAGS" = "x" ; then
5023
5024
5025{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -g" >&5
5026printf %s "checking whether $CC supports -g... " >&6; }
5027cache=`echo g | sed 'y%.=/+-%___p_%'`
5028if eval test \${cv_prog_cc_flag_$cache+y}
5029then :
5030  printf %s "(cached) " >&6
5031else case e in #(
5032  e)
5033echo 'void f(void){}' >conftest.c
5034if test -z "`$CC $CPPFLAGS $CFLAGS -g -c conftest.c 2>&1`"; then
5035eval "cv_prog_cc_flag_$cache=yes"
5036else
5037eval "cv_prog_cc_flag_$cache=no"
5038fi
5039rm -f conftest conftest.o conftest.c
5040 ;;
5041esac
5042fi
5043
5044if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
5045{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5046printf "%s\n" "yes" >&6; }
5047:
5048CFLAGS="$CFLAGS -g"
5049else
5050{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5051printf "%s\n" "no" >&6; }
5052:
5053
5054fi
5055
5056
5057
5058{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -O2" >&5
5059printf %s "checking whether $CC supports -O2... " >&6; }
5060cache=`echo O2 | sed 'y%.=/+-%___p_%'`
5061if eval test \${cv_prog_cc_flag_$cache+y}
5062then :
5063  printf %s "(cached) " >&6
5064else case e in #(
5065  e)
5066echo 'void f(void){}' >conftest.c
5067if test -z "`$CC $CPPFLAGS $CFLAGS -O2 -c conftest.c 2>&1`"; then
5068eval "cv_prog_cc_flag_$cache=yes"
5069else
5070eval "cv_prog_cc_flag_$cache=no"
5071fi
5072rm -f conftest conftest.o conftest.c
5073 ;;
5074esac
5075fi
5076
5077if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
5078{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5079printf "%s\n" "yes" >&6; }
5080:
5081CFLAGS="$CFLAGS -O2"
5082else
5083{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5084printf "%s\n" "no" >&6; }
5085:
5086
5087fi
5088
5089default_cflags=yes
5090fi
5091ac_ext=c
5092ac_cpp='$CPP $CPPFLAGS'
5093ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5094ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5095ac_compiler_gnu=$ac_cv_c_compiler_gnu
5096if test -n "$ac_tool_prefix"; then
5097  # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
5098set dummy ${ac_tool_prefix}gcc; ac_word=$2
5099{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5100printf %s "checking for $ac_word... " >&6; }
5101if test ${ac_cv_prog_CC+y}
5102then :
5103  printf %s "(cached) " >&6
5104else case e in #(
5105  e) if test -n "$CC"; then
5106  ac_cv_prog_CC="$CC" # Let the user override the test.
5107else
5108as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5109for as_dir in $PATH
5110do
5111  IFS=$as_save_IFS
5112  case $as_dir in #(((
5113    '') as_dir=./ ;;
5114    */) ;;
5115    *) as_dir=$as_dir/ ;;
5116  esac
5117    for ac_exec_ext in '' $ac_executable_extensions; do
5118  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
5119    ac_cv_prog_CC="${ac_tool_prefix}gcc"
5120    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
5121    break 2
5122  fi
5123done
5124  done
5125IFS=$as_save_IFS
5126
5127fi ;;
5128esac
5129fi
5130CC=$ac_cv_prog_CC
5131if test -n "$CC"; then
5132  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5133printf "%s\n" "$CC" >&6; }
5134else
5135  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5136printf "%s\n" "no" >&6; }
5137fi
5138
5139
5140fi
5141if test -z "$ac_cv_prog_CC"; then
5142  ac_ct_CC=$CC
5143  # Extract the first word of "gcc", so it can be a program name with args.
5144set dummy gcc; ac_word=$2
5145{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5146printf %s "checking for $ac_word... " >&6; }
5147if test ${ac_cv_prog_ac_ct_CC+y}
5148then :
5149  printf %s "(cached) " >&6
5150else case e in #(
5151  e) if test -n "$ac_ct_CC"; then
5152  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
5153else
5154as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5155for as_dir in $PATH
5156do
5157  IFS=$as_save_IFS
5158  case $as_dir in #(((
5159    '') as_dir=./ ;;
5160    */) ;;
5161    *) as_dir=$as_dir/ ;;
5162  esac
5163    for ac_exec_ext in '' $ac_executable_extensions; do
5164  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
5165    ac_cv_prog_ac_ct_CC="gcc"
5166    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
5167    break 2
5168  fi
5169done
5170  done
5171IFS=$as_save_IFS
5172
5173fi ;;
5174esac
5175fi
5176ac_ct_CC=$ac_cv_prog_ac_ct_CC
5177if test -n "$ac_ct_CC"; then
5178  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
5179printf "%s\n" "$ac_ct_CC" >&6; }
5180else
5181  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5182printf "%s\n" "no" >&6; }
5183fi
5184
5185  if test "x$ac_ct_CC" = x; then
5186    CC=""
5187  else
5188    case $cross_compiling:$ac_tool_warned in
5189yes:)
5190{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5191printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5192ac_tool_warned=yes ;;
5193esac
5194    CC=$ac_ct_CC
5195  fi
5196else
5197  CC="$ac_cv_prog_CC"
5198fi
5199
5200if test -z "$CC"; then
5201          if test -n "$ac_tool_prefix"; then
5202    # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
5203set dummy ${ac_tool_prefix}cc; ac_word=$2
5204{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5205printf %s "checking for $ac_word... " >&6; }
5206if test ${ac_cv_prog_CC+y}
5207then :
5208  printf %s "(cached) " >&6
5209else case e in #(
5210  e) if test -n "$CC"; then
5211  ac_cv_prog_CC="$CC" # Let the user override the test.
5212else
5213as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5214for as_dir in $PATH
5215do
5216  IFS=$as_save_IFS
5217  case $as_dir in #(((
5218    '') as_dir=./ ;;
5219    */) ;;
5220    *) as_dir=$as_dir/ ;;
5221  esac
5222    for ac_exec_ext in '' $ac_executable_extensions; do
5223  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
5224    ac_cv_prog_CC="${ac_tool_prefix}cc"
5225    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
5226    break 2
5227  fi
5228done
5229  done
5230IFS=$as_save_IFS
5231
5232fi ;;
5233esac
5234fi
5235CC=$ac_cv_prog_CC
5236if test -n "$CC"; then
5237  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5238printf "%s\n" "$CC" >&6; }
5239else
5240  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5241printf "%s\n" "no" >&6; }
5242fi
5243
5244
5245  fi
5246fi
5247if test -z "$CC"; then
5248  # Extract the first word of "cc", so it can be a program name with args.
5249set dummy cc; ac_word=$2
5250{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5251printf %s "checking for $ac_word... " >&6; }
5252if test ${ac_cv_prog_CC+y}
5253then :
5254  printf %s "(cached) " >&6
5255else case e in #(
5256  e) if test -n "$CC"; then
5257  ac_cv_prog_CC="$CC" # Let the user override the test.
5258else
5259  ac_prog_rejected=no
5260as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5261for as_dir in $PATH
5262do
5263  IFS=$as_save_IFS
5264  case $as_dir in #(((
5265    '') as_dir=./ ;;
5266    */) ;;
5267    *) as_dir=$as_dir/ ;;
5268  esac
5269    for ac_exec_ext in '' $ac_executable_extensions; do
5270  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
5271    if test "$as_dir$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
5272       ac_prog_rejected=yes
5273       continue
5274     fi
5275    ac_cv_prog_CC="cc"
5276    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
5277    break 2
5278  fi
5279done
5280  done
5281IFS=$as_save_IFS
5282
5283if test $ac_prog_rejected = yes; then
5284  # We found a bogon in the path, so make sure we never use it.
5285  set dummy $ac_cv_prog_CC
5286  shift
5287  if test $# != 0; then
5288    # We chose a different compiler from the bogus one.
5289    # However, it has the same basename, so the bogon will be chosen
5290    # first if we set CC to just the basename; use the full file name.
5291    shift
5292    ac_cv_prog_CC="$as_dir$ac_word${1+' '}$@"
5293  fi
5294fi
5295fi ;;
5296esac
5297fi
5298CC=$ac_cv_prog_CC
5299if test -n "$CC"; then
5300  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5301printf "%s\n" "$CC" >&6; }
5302else
5303  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5304printf "%s\n" "no" >&6; }
5305fi
5306
5307
5308fi
5309if test -z "$CC"; then
5310  if test -n "$ac_tool_prefix"; then
5311  for ac_prog in cl.exe
5312  do
5313    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5314set dummy $ac_tool_prefix$ac_prog; ac_word=$2
5315{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5316printf %s "checking for $ac_word... " >&6; }
5317if test ${ac_cv_prog_CC+y}
5318then :
5319  printf %s "(cached) " >&6
5320else case e in #(
5321  e) if test -n "$CC"; then
5322  ac_cv_prog_CC="$CC" # Let the user override the test.
5323else
5324as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5325for as_dir in $PATH
5326do
5327  IFS=$as_save_IFS
5328  case $as_dir in #(((
5329    '') as_dir=./ ;;
5330    */) ;;
5331    *) as_dir=$as_dir/ ;;
5332  esac
5333    for ac_exec_ext in '' $ac_executable_extensions; do
5334  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
5335    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
5336    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
5337    break 2
5338  fi
5339done
5340  done
5341IFS=$as_save_IFS
5342
5343fi ;;
5344esac
5345fi
5346CC=$ac_cv_prog_CC
5347if test -n "$CC"; then
5348  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5349printf "%s\n" "$CC" >&6; }
5350else
5351  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5352printf "%s\n" "no" >&6; }
5353fi
5354
5355
5356    test -n "$CC" && break
5357  done
5358fi
5359if test -z "$CC"; then
5360  ac_ct_CC=$CC
5361  for ac_prog in cl.exe
5362do
5363  # Extract the first word of "$ac_prog", so it can be a program name with args.
5364set dummy $ac_prog; ac_word=$2
5365{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5366printf %s "checking for $ac_word... " >&6; }
5367if test ${ac_cv_prog_ac_ct_CC+y}
5368then :
5369  printf %s "(cached) " >&6
5370else case e in #(
5371  e) if test -n "$ac_ct_CC"; then
5372  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
5373else
5374as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5375for as_dir in $PATH
5376do
5377  IFS=$as_save_IFS
5378  case $as_dir in #(((
5379    '') as_dir=./ ;;
5380    */) ;;
5381    *) as_dir=$as_dir/ ;;
5382  esac
5383    for ac_exec_ext in '' $ac_executable_extensions; do
5384  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
5385    ac_cv_prog_ac_ct_CC="$ac_prog"
5386    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
5387    break 2
5388  fi
5389done
5390  done
5391IFS=$as_save_IFS
5392
5393fi ;;
5394esac
5395fi
5396ac_ct_CC=$ac_cv_prog_ac_ct_CC
5397if test -n "$ac_ct_CC"; then
5398  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
5399printf "%s\n" "$ac_ct_CC" >&6; }
5400else
5401  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5402printf "%s\n" "no" >&6; }
5403fi
5404
5405
5406  test -n "$ac_ct_CC" && break
5407done
5408
5409  if test "x$ac_ct_CC" = x; then
5410    CC=""
5411  else
5412    case $cross_compiling:$ac_tool_warned in
5413yes:)
5414{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5415printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5416ac_tool_warned=yes ;;
5417esac
5418    CC=$ac_ct_CC
5419  fi
5420fi
5421
5422fi
5423if test -z "$CC"; then
5424  if test -n "$ac_tool_prefix"; then
5425  # Extract the first word of "${ac_tool_prefix}clang", so it can be a program name with args.
5426set dummy ${ac_tool_prefix}clang; ac_word=$2
5427{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5428printf %s "checking for $ac_word... " >&6; }
5429if test ${ac_cv_prog_CC+y}
5430then :
5431  printf %s "(cached) " >&6
5432else case e in #(
5433  e) if test -n "$CC"; then
5434  ac_cv_prog_CC="$CC" # Let the user override the test.
5435else
5436as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5437for as_dir in $PATH
5438do
5439  IFS=$as_save_IFS
5440  case $as_dir in #(((
5441    '') as_dir=./ ;;
5442    */) ;;
5443    *) as_dir=$as_dir/ ;;
5444  esac
5445    for ac_exec_ext in '' $ac_executable_extensions; do
5446  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
5447    ac_cv_prog_CC="${ac_tool_prefix}clang"
5448    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
5449    break 2
5450  fi
5451done
5452  done
5453IFS=$as_save_IFS
5454
5455fi ;;
5456esac
5457fi
5458CC=$ac_cv_prog_CC
5459if test -n "$CC"; then
5460  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5461printf "%s\n" "$CC" >&6; }
5462else
5463  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5464printf "%s\n" "no" >&6; }
5465fi
5466
5467
5468fi
5469if test -z "$ac_cv_prog_CC"; then
5470  ac_ct_CC=$CC
5471  # Extract the first word of "clang", so it can be a program name with args.
5472set dummy clang; ac_word=$2
5473{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5474printf %s "checking for $ac_word... " >&6; }
5475if test ${ac_cv_prog_ac_ct_CC+y}
5476then :
5477  printf %s "(cached) " >&6
5478else case e in #(
5479  e) if test -n "$ac_ct_CC"; then
5480  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
5481else
5482as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5483for as_dir in $PATH
5484do
5485  IFS=$as_save_IFS
5486  case $as_dir in #(((
5487    '') as_dir=./ ;;
5488    */) ;;
5489    *) as_dir=$as_dir/ ;;
5490  esac
5491    for ac_exec_ext in '' $ac_executable_extensions; do
5492  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
5493    ac_cv_prog_ac_ct_CC="clang"
5494    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
5495    break 2
5496  fi
5497done
5498  done
5499IFS=$as_save_IFS
5500
5501fi ;;
5502esac
5503fi
5504ac_ct_CC=$ac_cv_prog_ac_ct_CC
5505if test -n "$ac_ct_CC"; then
5506  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
5507printf "%s\n" "$ac_ct_CC" >&6; }
5508else
5509  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5510printf "%s\n" "no" >&6; }
5511fi
5512
5513  if test "x$ac_ct_CC" = x; then
5514    CC=""
5515  else
5516    case $cross_compiling:$ac_tool_warned in
5517yes:)
5518{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5519printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5520ac_tool_warned=yes ;;
5521esac
5522    CC=$ac_ct_CC
5523  fi
5524else
5525  CC="$ac_cv_prog_CC"
5526fi
5527
5528fi
5529
5530
5531test -z "$CC" && { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
5532printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
5533as_fn_error $? "no acceptable C compiler found in \$PATH
5534See 'config.log' for more details" "$LINENO" 5; }
5535
5536# Provide some information about the compiler.
5537printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
5538set X $ac_compile
5539ac_compiler=$2
5540for ac_option in --version -v -V -qversion -version; do
5541  { { ac_try="$ac_compiler $ac_option >&5"
5542case "(($ac_try" in
5543  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5544  *) ac_try_echo=$ac_try;;
5545esac
5546eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5547printf "%s\n" "$ac_try_echo"; } >&5
5548  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
5549  ac_status=$?
5550  if test -s conftest.err; then
5551    sed '10a\
5552... rest of stderr output deleted ...
5553         10q' conftest.err >conftest.er1
5554    cat conftest.er1 >&5
5555  fi
5556  rm -f conftest.er1 conftest.err
5557  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5558  test $ac_status = 0; }
5559done
5560
5561{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports GNU C" >&5
5562printf %s "checking whether the compiler supports GNU C... " >&6; }
5563if test ${ac_cv_c_compiler_gnu+y}
5564then :
5565  printf %s "(cached) " >&6
5566else case e in #(
5567  e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5568/* end confdefs.h.  */
5569
5570int
5571main (void)
5572{
5573#ifndef __GNUC__
5574       choke me
5575#endif
5576
5577  ;
5578  return 0;
5579}
5580_ACEOF
5581if ac_fn_c_try_compile "$LINENO"
5582then :
5583  ac_compiler_gnu=yes
5584else case e in #(
5585  e) ac_compiler_gnu=no ;;
5586esac
5587fi
5588rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
5589ac_cv_c_compiler_gnu=$ac_compiler_gnu
5590 ;;
5591esac
5592fi
5593{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
5594printf "%s\n" "$ac_cv_c_compiler_gnu" >&6; }
5595ac_compiler_gnu=$ac_cv_c_compiler_gnu
5596
5597if test $ac_compiler_gnu = yes; then
5598  GCC=yes
5599else
5600  GCC=
5601fi
5602ac_test_CFLAGS=${CFLAGS+y}
5603ac_save_CFLAGS=$CFLAGS
5604{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
5605printf %s "checking whether $CC accepts -g... " >&6; }
5606if test ${ac_cv_prog_cc_g+y}
5607then :
5608  printf %s "(cached) " >&6
5609else case e in #(
5610  e) ac_save_c_werror_flag=$ac_c_werror_flag
5611   ac_c_werror_flag=yes
5612   ac_cv_prog_cc_g=no
5613   CFLAGS="-g"
5614   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5615/* end confdefs.h.  */
5616
5617int
5618main (void)
5619{
5620
5621  ;
5622  return 0;
5623}
5624_ACEOF
5625if ac_fn_c_try_compile "$LINENO"
5626then :
5627  ac_cv_prog_cc_g=yes
5628else case e in #(
5629  e) CFLAGS=""
5630      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5631/* end confdefs.h.  */
5632
5633int
5634main (void)
5635{
5636
5637  ;
5638  return 0;
5639}
5640_ACEOF
5641if ac_fn_c_try_compile "$LINENO"
5642then :
5643
5644else case e in #(
5645  e) ac_c_werror_flag=$ac_save_c_werror_flag
5646	 CFLAGS="-g"
5647	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5648/* end confdefs.h.  */
5649
5650int
5651main (void)
5652{
5653
5654  ;
5655  return 0;
5656}
5657_ACEOF
5658if ac_fn_c_try_compile "$LINENO"
5659then :
5660  ac_cv_prog_cc_g=yes
5661fi
5662rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
5663esac
5664fi
5665rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
5666esac
5667fi
5668rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
5669   ac_c_werror_flag=$ac_save_c_werror_flag ;;
5670esac
5671fi
5672{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
5673printf "%s\n" "$ac_cv_prog_cc_g" >&6; }
5674if test $ac_test_CFLAGS; then
5675  CFLAGS=$ac_save_CFLAGS
5676elif test $ac_cv_prog_cc_g = yes; then
5677  if test "$GCC" = yes; then
5678    CFLAGS="-g -O2"
5679  else
5680    CFLAGS="-g"
5681  fi
5682else
5683  if test "$GCC" = yes; then
5684    CFLAGS="-O2"
5685  else
5686    CFLAGS=
5687  fi
5688fi
5689ac_prog_cc_stdc=no
5690if test x$ac_prog_cc_stdc = xno
5691then :
5692  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C11 features" >&5
5693printf %s "checking for $CC option to enable C11 features... " >&6; }
5694if test ${ac_cv_prog_cc_c11+y}
5695then :
5696  printf %s "(cached) " >&6
5697else case e in #(
5698  e) ac_cv_prog_cc_c11=no
5699ac_save_CC=$CC
5700cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5701/* end confdefs.h.  */
5702$ac_c_conftest_c11_program
5703_ACEOF
5704for ac_arg in '' -std=gnu11
5705do
5706  CC="$ac_save_CC $ac_arg"
5707  if ac_fn_c_try_compile "$LINENO"
5708then :
5709  ac_cv_prog_cc_c11=$ac_arg
5710fi
5711rm -f core conftest.err conftest.$ac_objext conftest.beam
5712  test "x$ac_cv_prog_cc_c11" != "xno" && break
5713done
5714rm -f conftest.$ac_ext
5715CC=$ac_save_CC ;;
5716esac
5717fi
5718
5719if test "x$ac_cv_prog_cc_c11" = xno
5720then :
5721  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
5722printf "%s\n" "unsupported" >&6; }
5723else case e in #(
5724  e) if test "x$ac_cv_prog_cc_c11" = x
5725then :
5726  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
5727printf "%s\n" "none needed" >&6; }
5728else case e in #(
5729  e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c11" >&5
5730printf "%s\n" "$ac_cv_prog_cc_c11" >&6; }
5731     CC="$CC $ac_cv_prog_cc_c11" ;;
5732esac
5733fi
5734  ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c11
5735  ac_prog_cc_stdc=c11 ;;
5736esac
5737fi
5738fi
5739if test x$ac_prog_cc_stdc = xno
5740then :
5741  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C99 features" >&5
5742printf %s "checking for $CC option to enable C99 features... " >&6; }
5743if test ${ac_cv_prog_cc_c99+y}
5744then :
5745  printf %s "(cached) " >&6
5746else case e in #(
5747  e) ac_cv_prog_cc_c99=no
5748ac_save_CC=$CC
5749cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5750/* end confdefs.h.  */
5751$ac_c_conftest_c99_program
5752_ACEOF
5753for ac_arg in '' -std=gnu99 -std=c99 -c99 -qlanglvl=extc1x -qlanglvl=extc99 -AC99 -D_STDC_C99=
5754do
5755  CC="$ac_save_CC $ac_arg"
5756  if ac_fn_c_try_compile "$LINENO"
5757then :
5758  ac_cv_prog_cc_c99=$ac_arg
5759fi
5760rm -f core conftest.err conftest.$ac_objext conftest.beam
5761  test "x$ac_cv_prog_cc_c99" != "xno" && break
5762done
5763rm -f conftest.$ac_ext
5764CC=$ac_save_CC ;;
5765esac
5766fi
5767
5768if test "x$ac_cv_prog_cc_c99" = xno
5769then :
5770  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
5771printf "%s\n" "unsupported" >&6; }
5772else case e in #(
5773  e) if test "x$ac_cv_prog_cc_c99" = x
5774then :
5775  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
5776printf "%s\n" "none needed" >&6; }
5777else case e in #(
5778  e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5
5779printf "%s\n" "$ac_cv_prog_cc_c99" >&6; }
5780     CC="$CC $ac_cv_prog_cc_c99" ;;
5781esac
5782fi
5783  ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99
5784  ac_prog_cc_stdc=c99 ;;
5785esac
5786fi
5787fi
5788if test x$ac_prog_cc_stdc = xno
5789then :
5790  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C89 features" >&5
5791printf %s "checking for $CC option to enable C89 features... " >&6; }
5792if test ${ac_cv_prog_cc_c89+y}
5793then :
5794  printf %s "(cached) " >&6
5795else case e in #(
5796  e) ac_cv_prog_cc_c89=no
5797ac_save_CC=$CC
5798cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5799/* end confdefs.h.  */
5800$ac_c_conftest_c89_program
5801_ACEOF
5802for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
5803do
5804  CC="$ac_save_CC $ac_arg"
5805  if ac_fn_c_try_compile "$LINENO"
5806then :
5807  ac_cv_prog_cc_c89=$ac_arg
5808fi
5809rm -f core conftest.err conftest.$ac_objext conftest.beam
5810  test "x$ac_cv_prog_cc_c89" != "xno" && break
5811done
5812rm -f conftest.$ac_ext
5813CC=$ac_save_CC ;;
5814esac
5815fi
5816
5817if test "x$ac_cv_prog_cc_c89" = xno
5818then :
5819  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
5820printf "%s\n" "unsupported" >&6; }
5821else case e in #(
5822  e) if test "x$ac_cv_prog_cc_c89" = x
5823then :
5824  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
5825printf "%s\n" "none needed" >&6; }
5826else case e in #(
5827  e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
5828printf "%s\n" "$ac_cv_prog_cc_c89" >&6; }
5829     CC="$CC $ac_cv_prog_cc_c89" ;;
5830esac
5831fi
5832  ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89
5833  ac_prog_cc_stdc=c89 ;;
5834esac
5835fi
5836fi
5837
5838ac_ext=c
5839ac_cpp='$CPP $CPPFLAGS'
5840ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5841ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5842ac_compiler_gnu=$ac_cv_c_compiler_gnu
5843
5844
5845{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking $CC dependency flag" >&5
5846printf %s "checking $CC dependency flag... " >&6; }
5847echo 'void f(void){}' >conftest.c
5848if test "`$CC -MM conftest.c 2>&1`" = "conftest.o: conftest.c"; then
5849	DEPFLAG="-MM"
5850else
5851  if test "`$CC -xM1 conftest.c 2>&1`" = "conftest.o: conftest.c"; then
5852	DEPFLAG="-xM1"
5853  else
5854	DEPFLAG="-MM"  # dunno do something
5855  fi
5856fi
5857{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $DEPFLAG" >&5
5858printf "%s\n" "$DEPFLAG" >&6; }
5859rm -f conftest.c
5860
5861
5862
5863
5864
5865{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Werror" >&5
5866printf %s "checking whether $CC supports -Werror... " >&6; }
5867cache=`echo Werror | sed 'y%.=/+-%___p_%'`
5868if eval test \${cv_prog_cc_flag_$cache+y}
5869then :
5870  printf %s "(cached) " >&6
5871else case e in #(
5872  e)
5873echo 'void f(void){}' >conftest.c
5874if test -z "`$CC $CPPFLAGS $CFLAGS -Werror -c conftest.c 2>&1`"; then
5875eval "cv_prog_cc_flag_$cache=yes"
5876else
5877eval "cv_prog_cc_flag_$cache=no"
5878fi
5879rm -f conftest conftest.o conftest.c
5880 ;;
5881esac
5882fi
5883
5884if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
5885{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5886printf "%s\n" "yes" >&6; }
5887:
5888ERRFLAG="-Werror"
5889else
5890{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5891printf "%s\n" "no" >&6; }
5892:
5893ERRFLAG="-errwarn"
5894fi
5895
5896
5897
5898{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wall" >&5
5899printf %s "checking whether $CC supports -Wall... " >&6; }
5900cache=`echo Wall | sed 'y%.=/+-%___p_%'`
5901if eval test \${cv_prog_cc_flag_$cache+y}
5902then :
5903  printf %s "(cached) " >&6
5904else case e in #(
5905  e)
5906echo 'void f(void){}' >conftest.c
5907if test -z "`$CC $CPPFLAGS $CFLAGS -Wall -c conftest.c 2>&1`"; then
5908eval "cv_prog_cc_flag_$cache=yes"
5909else
5910eval "cv_prog_cc_flag_$cache=no"
5911fi
5912rm -f conftest conftest.o conftest.c
5913 ;;
5914esac
5915fi
5916
5917if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
5918{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5919printf "%s\n" "yes" >&6; }
5920:
5921ERRFLAG="$ERRFLAG -Wall"
5922else
5923{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5924printf "%s\n" "no" >&6; }
5925:
5926ERRFLAG="$ERRFLAG -errfmt"
5927fi
5928
5929
5930
5931
5932
5933{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -std=c99" >&5
5934printf %s "checking whether $CC supports -std=c99... " >&6; }
5935cache=`echo std=c99 | sed 'y%.=/+-%___p_%'`
5936if eval test \${cv_prog_cc_flag_$cache+y}
5937then :
5938  printf %s "(cached) " >&6
5939else case e in #(
5940  e)
5941echo 'void f(void){}' >conftest.c
5942if test -z "`$CC $CPPFLAGS $CFLAGS -std=c99 -c conftest.c 2>&1`"; then
5943eval "cv_prog_cc_flag_$cache=yes"
5944else
5945eval "cv_prog_cc_flag_$cache=no"
5946fi
5947rm -f conftest conftest.o conftest.c
5948 ;;
5949esac
5950fi
5951
5952if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
5953{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5954printf "%s\n" "yes" >&6; }
5955:
5956C99FLAG="-std=c99"
5957else
5958{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5959printf "%s\n" "no" >&6; }
5960:
5961
5962fi
5963
5964
5965
5966{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -xc99" >&5
5967printf %s "checking whether $CC supports -xc99... " >&6; }
5968cache=`echo xc99 | sed 'y%.=/+-%___p_%'`
5969if eval test \${cv_prog_cc_flag_$cache+y}
5970then :
5971  printf %s "(cached) " >&6
5972else case e in #(
5973  e)
5974echo 'void f(void){}' >conftest.c
5975if test -z "`$CC $CPPFLAGS $CFLAGS -xc99 -c conftest.c 2>&1`"; then
5976eval "cv_prog_cc_flag_$cache=yes"
5977else
5978eval "cv_prog_cc_flag_$cache=no"
5979fi
5980rm -f conftest conftest.o conftest.c
5981 ;;
5982esac
5983fi
5984
5985if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
5986{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5987printf "%s\n" "yes" >&6; }
5988:
5989C99FLAG="-xc99"
5990else
5991{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5992printf "%s\n" "no" >&6; }
5993:
5994
5995fi
5996
5997
5998ac_fn_c_check_header_compile "$LINENO" "getopt.h" "ac_cv_header_getopt_h" "$ac_includes_default
5999"
6000if test "x$ac_cv_header_getopt_h" = xyes
6001then :
6002  printf "%s\n" "#define HAVE_GETOPT_H 1" >>confdefs.h
6003
6004fi
6005ac_fn_c_check_header_compile "$LINENO" "time.h" "ac_cv_header_time_h" "$ac_includes_default
6006"
6007if test "x$ac_cv_header_time_h" = xyes
6008then :
6009  printf "%s\n" "#define HAVE_TIME_H 1" >>confdefs.h
6010
6011fi
6012
6013
6014
6015
6016
6017{ 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
6018printf %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; }
6019cache=`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" | sed "$as_sed_sh"`
6020if eval test \${cv_prog_cc_flag_needed_$cache+y}
6021then :
6022  printf %s "(cached) " >&6
6023else case e in #(
6024  e)
6025echo '
6026#include "confdefs.h"
6027#include <stdlib.h>
6028#include <ctype.h>
6029#include <sys/time.h>
6030#ifdef HAVE_TIME_H
6031#include <time.h>
6032#endif
6033#include <unistd.h>
6034#include <netdb.h>
6035#ifdef HAVE_GETOPT_H
6036#include <getopt.h>
6037#endif
6038
6039int test(void) {
6040	int a;
6041	char **opts = NULL;
6042	struct timeval tv;
6043	char *t;
6044	time_t time = 0;
6045	char *buf = NULL;
6046	const char* str = NULL;
6047	struct msghdr msg;
6048	msg.msg_control = 0;
6049	t = ctime_r(&time, buf);
6050	tv.tv_usec = 10;
6051	srandom(32);
6052	a = getopt(2, opts, "a");
6053	a = isascii(32);
6054	str = gai_strerror(0);
6055	if(str && t && tv.tv_usec && msg.msg_control)
6056		a = 0;
6057	return a;
6058}
6059' > conftest.c
6060echo 'void f(void){}' >>conftest.c
6061if test -z "`$CC $CPPFLAGS $CFLAGS $ERRFLAG -c conftest.c 2>&1`"; then
6062eval "cv_prog_cc_flag_needed_$cache=no"
6063else
6064
6065if 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
6066eval "cv_prog_cc_flag_needed_$cache=yes"
6067else
6068eval "cv_prog_cc_flag_needed_$cache=fail"
6069#echo 'Test with flag fails too!'
6070#cat conftest.c
6071#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"
6072#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`
6073#exit 1
6074fi
6075
6076fi
6077rm -f conftest conftest.c conftest.o
6078 ;;
6079esac
6080fi
6081
6082if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = yes"; then
6083{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6084printf "%s\n" "yes" >&6; }
6085:
6086CFLAGS="$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"
6087else
6088if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = no"; then
6089{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6090printf "%s\n" "no" >&6; }
6091#echo 'Test with flag is no!'
6092#cat conftest.c
6093#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"
6094#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`
6095#exit 1
6096:
6097
6098else
6099{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: failed" >&5
6100printf "%s\n" "failed" >&6; }
6101:
6102
6103fi
6104fi
6105
6106
6107
6108
6109
6110{ 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
6111printf %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; }
6112cache=`printf "%s\n" "$C99FLAG -D__EXTENSIONS__ -D_BSD_SOURCE -D_DEFAULT_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -D_ALL_SOURCE" | sed "$as_sed_sh"`
6113if eval test \${cv_prog_cc_flag_needed_$cache+y}
6114then :
6115  printf %s "(cached) " >&6
6116else case e in #(
6117  e)
6118echo '
6119#include "confdefs.h"
6120#include <stdlib.h>
6121#include <ctype.h>
6122#include <sys/time.h>
6123#ifdef HAVE_TIME_H
6124#include <time.h>
6125#endif
6126#include <unistd.h>
6127#include <netdb.h>
6128#ifdef HAVE_GETOPT_H
6129#include <getopt.h>
6130#endif
6131
6132int test(void) {
6133	int a;
6134	char **opts = NULL;
6135	struct timeval tv;
6136	char *t;
6137	time_t time = 0;
6138	char *buf = NULL;
6139	const char* str = NULL;
6140	struct msghdr msg;
6141	msg.msg_control = 0;
6142	t = ctime_r(&time, buf);
6143	tv.tv_usec = 10;
6144	srandom(32);
6145	a = getopt(2, opts, "a");
6146	a = isascii(32);
6147	str = gai_strerror(0);
6148	if(str && t && tv.tv_usec && msg.msg_control)
6149		a = 0;
6150	return a;
6151}
6152' > conftest.c
6153echo 'void f(void){}' >>conftest.c
6154if test -z "`$CC $CPPFLAGS $CFLAGS $ERRFLAG -c conftest.c 2>&1`"; then
6155eval "cv_prog_cc_flag_needed_$cache=no"
6156else
6157
6158if 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
6159eval "cv_prog_cc_flag_needed_$cache=yes"
6160else
6161eval "cv_prog_cc_flag_needed_$cache=fail"
6162#echo 'Test with flag fails too!'
6163#cat conftest.c
6164#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"
6165#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`
6166#exit 1
6167fi
6168
6169fi
6170rm -f conftest conftest.c conftest.o
6171 ;;
6172esac
6173fi
6174
6175if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = yes"; then
6176{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6177printf "%s\n" "yes" >&6; }
6178:
6179CFLAGS="$CFLAGS $C99FLAG -D__EXTENSIONS__ -D_BSD_SOURCE -D_DEFAULT_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -D_ALL_SOURCE"
6180else
6181if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = no"; then
6182{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6183printf "%s\n" "no" >&6; }
6184#echo 'Test with flag is no!'
6185#cat conftest.c
6186#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"
6187#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`
6188#exit 1
6189:
6190
6191else
6192{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: failed" >&5
6193printf "%s\n" "failed" >&6; }
6194:
6195
6196fi
6197fi
6198
6199
6200
6201
6202
6203{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we need $C99FLAG as a flag for $CC" >&5
6204printf %s "checking whether we need $C99FLAG as a flag for $CC... " >&6; }
6205cache=`printf "%s\n" "$C99FLAG" | sed "$as_sed_sh"`
6206if eval test \${cv_prog_cc_flag_needed_$cache+y}
6207then :
6208  printf %s "(cached) " >&6
6209else case e in #(
6210  e)
6211echo '
6212#include <stdbool.h>
6213#include <ctype.h>
6214int test(void) {
6215        int a = 0;
6216        return a;
6217}
6218' > conftest.c
6219echo 'void f(void){}' >>conftest.c
6220if test -z "`$CC $CPPFLAGS $CFLAGS $ERRFLAG -c conftest.c 2>&1`"; then
6221eval "cv_prog_cc_flag_needed_$cache=no"
6222else
6223
6224if test -z "`$CC $CPPFLAGS $CFLAGS $C99FLAG $ERRFLAG -c conftest.c 2>&1`"; then
6225eval "cv_prog_cc_flag_needed_$cache=yes"
6226else
6227eval "cv_prog_cc_flag_needed_$cache=fail"
6228#echo 'Test with flag fails too!'
6229#cat conftest.c
6230#echo "$CC $CPPFLAGS $CFLAGS $C99FLAG $ERRFLAG -c conftest.c 2>&1"
6231#echo `$CC $CPPFLAGS $CFLAGS $C99FLAG $ERRFLAG -c conftest.c 2>&1`
6232#exit 1
6233fi
6234
6235fi
6236rm -f conftest conftest.c conftest.o
6237 ;;
6238esac
6239fi
6240
6241if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = yes"; then
6242{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6243printf "%s\n" "yes" >&6; }
6244:
6245CFLAGS="$CFLAGS $C99FLAG"
6246else
6247if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = no"; then
6248{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6249printf "%s\n" "no" >&6; }
6250#echo 'Test with flag is no!'
6251#cat conftest.c
6252#echo "$CC $CPPFLAGS $CFLAGS $C99FLAG $ERRFLAG -c conftest.c 2>&1"
6253#echo `$CC $CPPFLAGS $CFLAGS $C99FLAG $ERRFLAG -c conftest.c 2>&1`
6254#exit 1
6255:
6256
6257else
6258{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: failed" >&5
6259printf "%s\n" "failed" >&6; }
6260:
6261
6262fi
6263fi
6264
6265
6266
6267
6268
6269{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we need -D_BSD_SOURCE -D_DEFAULT_SOURCE as a flag for $CC" >&5
6270printf %s "checking whether we need -D_BSD_SOURCE -D_DEFAULT_SOURCE as a flag for $CC... " >&6; }
6271cache=_D_BSD_SOURCE__D_DEFAULT_SOURCE
6272if eval test \${cv_prog_cc_flag_needed_$cache+y}
6273then :
6274  printf %s "(cached) " >&6
6275else case e in #(
6276  e)
6277echo '
6278#include <ctype.h>
6279
6280int test(void) {
6281        int a;
6282        a = isascii(32);
6283        return a;
6284}
6285' > conftest.c
6286echo 'void f(void){}' >>conftest.c
6287if test -z "`$CC $CPPFLAGS $CFLAGS $ERRFLAG -c conftest.c 2>&1`"; then
6288eval "cv_prog_cc_flag_needed_$cache=no"
6289else
6290
6291if test -z "`$CC $CPPFLAGS $CFLAGS -D_BSD_SOURCE -D_DEFAULT_SOURCE $ERRFLAG -c conftest.c 2>&1`"; then
6292eval "cv_prog_cc_flag_needed_$cache=yes"
6293else
6294eval "cv_prog_cc_flag_needed_$cache=fail"
6295#echo 'Test with flag fails too!'
6296#cat conftest.c
6297#echo "$CC $CPPFLAGS $CFLAGS -D_BSD_SOURCE -D_DEFAULT_SOURCE $ERRFLAG -c conftest.c 2>&1"
6298#echo `$CC $CPPFLAGS $CFLAGS -D_BSD_SOURCE -D_DEFAULT_SOURCE $ERRFLAG -c conftest.c 2>&1`
6299#exit 1
6300fi
6301
6302fi
6303rm -f conftest conftest.c conftest.o
6304 ;;
6305esac
6306fi
6307
6308if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = yes"; then
6309{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6310printf "%s\n" "yes" >&6; }
6311:
6312CFLAGS="$CFLAGS -D_BSD_SOURCE -D_DEFAULT_SOURCE"
6313else
6314if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = no"; then
6315{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6316printf "%s\n" "no" >&6; }
6317#echo 'Test with flag is no!'
6318#cat conftest.c
6319#echo "$CC $CPPFLAGS $CFLAGS -D_BSD_SOURCE -D_DEFAULT_SOURCE $ERRFLAG -c conftest.c 2>&1"
6320#echo `$CC $CPPFLAGS $CFLAGS -D_BSD_SOURCE -D_DEFAULT_SOURCE $ERRFLAG -c conftest.c 2>&1`
6321#exit 1
6322:
6323
6324else
6325{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: failed" >&5
6326printf "%s\n" "failed" >&6; }
6327:
6328
6329fi
6330fi
6331
6332
6333
6334
6335
6336{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we need -D_GNU_SOURCE as a flag for $CC" >&5
6337printf %s "checking whether we need -D_GNU_SOURCE as a flag for $CC... " >&6; }
6338cache=_D_GNU_SOURCE
6339if eval test \${cv_prog_cc_flag_needed_$cache+y}
6340then :
6341  printf %s "(cached) " >&6
6342else case e in #(
6343  e)
6344echo '
6345#include <netinet/in.h>
6346
6347int test(void) {
6348        struct in6_pktinfo inf;
6349	int a = (int)sizeof(inf);
6350        return a;
6351}
6352' > conftest.c
6353echo 'void f(void){}' >>conftest.c
6354if test -z "`$CC $CPPFLAGS $CFLAGS $ERRFLAG -c conftest.c 2>&1`"; then
6355eval "cv_prog_cc_flag_needed_$cache=no"
6356else
6357
6358if test -z "`$CC $CPPFLAGS $CFLAGS -D_GNU_SOURCE $ERRFLAG -c conftest.c 2>&1`"; then
6359eval "cv_prog_cc_flag_needed_$cache=yes"
6360else
6361eval "cv_prog_cc_flag_needed_$cache=fail"
6362#echo 'Test with flag fails too!'
6363#cat conftest.c
6364#echo "$CC $CPPFLAGS $CFLAGS -D_GNU_SOURCE $ERRFLAG -c conftest.c 2>&1"
6365#echo `$CC $CPPFLAGS $CFLAGS -D_GNU_SOURCE $ERRFLAG -c conftest.c 2>&1`
6366#exit 1
6367fi
6368
6369fi
6370rm -f conftest conftest.c conftest.o
6371 ;;
6372esac
6373fi
6374
6375if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = yes"; then
6376{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6377printf "%s\n" "yes" >&6; }
6378:
6379CFLAGS="$CFLAGS -D_GNU_SOURCE"
6380else
6381if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = no"; then
6382{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6383printf "%s\n" "no" >&6; }
6384#echo 'Test with flag is no!'
6385#cat conftest.c
6386#echo "$CC $CPPFLAGS $CFLAGS -D_GNU_SOURCE $ERRFLAG -c conftest.c 2>&1"
6387#echo `$CC $CPPFLAGS $CFLAGS -D_GNU_SOURCE $ERRFLAG -c conftest.c 2>&1`
6388#exit 1
6389:
6390
6391else
6392{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: failed" >&5
6393printf "%s\n" "failed" >&6; }
6394:
6395
6396fi
6397fi
6398
6399
6400# check again for GNU_SOURCE for setresgid. May fail if setresgid
6401# is not available at all. -D_FRSRESGID is to make this check unique.
6402# otherwise we would get the previous cached result.
6403
6404
6405
6406{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we need -D_GNU_SOURCE -D_FRSRESGID as a flag for $CC" >&5
6407printf %s "checking whether we need -D_GNU_SOURCE -D_FRSRESGID as a flag for $CC... " >&6; }
6408cache=_D_GNU_SOURCE__D_FRSRESGID
6409if eval test \${cv_prog_cc_flag_needed_$cache+y}
6410then :
6411  printf %s "(cached) " >&6
6412else case e in #(
6413  e)
6414echo '
6415#include <unistd.h>
6416
6417int test(void) {
6418	int a = setresgid(0,0,0);
6419	a = setresuid(0,0,0);
6420        return a;
6421}
6422' > conftest.c
6423echo 'void f(void){}' >>conftest.c
6424if test -z "`$CC $CPPFLAGS $CFLAGS $ERRFLAG -c conftest.c 2>&1`"; then
6425eval "cv_prog_cc_flag_needed_$cache=no"
6426else
6427
6428if test -z "`$CC $CPPFLAGS $CFLAGS -D_GNU_SOURCE -D_FRSRESGID $ERRFLAG -c conftest.c 2>&1`"; then
6429eval "cv_prog_cc_flag_needed_$cache=yes"
6430else
6431eval "cv_prog_cc_flag_needed_$cache=fail"
6432#echo 'Test with flag fails too!'
6433#cat conftest.c
6434#echo "$CC $CPPFLAGS $CFLAGS -D_GNU_SOURCE -D_FRSRESGID $ERRFLAG -c conftest.c 2>&1"
6435#echo `$CC $CPPFLAGS $CFLAGS -D_GNU_SOURCE -D_FRSRESGID $ERRFLAG -c conftest.c 2>&1`
6436#exit 1
6437fi
6438
6439fi
6440rm -f conftest conftest.c conftest.o
6441 ;;
6442esac
6443fi
6444
6445if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = yes"; then
6446{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6447printf "%s\n" "yes" >&6; }
6448:
6449CFLAGS="$CFLAGS -D_GNU_SOURCE"
6450else
6451if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = no"; then
6452{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6453printf "%s\n" "no" >&6; }
6454#echo 'Test with flag is no!'
6455#cat conftest.c
6456#echo "$CC $CPPFLAGS $CFLAGS -D_GNU_SOURCE -D_FRSRESGID $ERRFLAG -c conftest.c 2>&1"
6457#echo `$CC $CPPFLAGS $CFLAGS -D_GNU_SOURCE -D_FRSRESGID $ERRFLAG -c conftest.c 2>&1`
6458#exit 1
6459:
6460
6461else
6462{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: failed" >&5
6463printf "%s\n" "failed" >&6; }
6464:
6465
6466fi
6467fi
6468
6469
6470
6471
6472
6473{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we need -D_POSIX_C_SOURCE=200112 as a flag for $CC" >&5
6474printf %s "checking whether we need -D_POSIX_C_SOURCE=200112 as a flag for $CC... " >&6; }
6475cache=_D_POSIX_C_SOURCE_200112
6476if eval test \${cv_prog_cc_flag_needed_$cache+y}
6477then :
6478  printf %s "(cached) " >&6
6479else case e in #(
6480  e)
6481echo '
6482#include "confdefs.h"
6483#ifdef HAVE_TIME_H
6484#include <time.h>
6485#endif
6486#include <netdb.h>
6487
6488int test(void) {
6489        int a = 0;
6490        char *t;
6491        time_t time = 0;
6492        char *buf = NULL;
6493	const char* str = NULL;
6494        t = ctime_r(&time, buf);
6495	str = gai_strerror(0);
6496	if(t && str)
6497		a = 0;
6498        return a;
6499}
6500' > conftest.c
6501echo 'void f(void){}' >>conftest.c
6502if test -z "`$CC $CPPFLAGS $CFLAGS $ERRFLAG -c conftest.c 2>&1`"; then
6503eval "cv_prog_cc_flag_needed_$cache=no"
6504else
6505
6506if test -z "`$CC $CPPFLAGS $CFLAGS -D_POSIX_C_SOURCE=200112 $ERRFLAG -c conftest.c 2>&1`"; then
6507eval "cv_prog_cc_flag_needed_$cache=yes"
6508else
6509eval "cv_prog_cc_flag_needed_$cache=fail"
6510#echo 'Test with flag fails too!'
6511#cat conftest.c
6512#echo "$CC $CPPFLAGS $CFLAGS -D_POSIX_C_SOURCE=200112 $ERRFLAG -c conftest.c 2>&1"
6513#echo `$CC $CPPFLAGS $CFLAGS -D_POSIX_C_SOURCE=200112 $ERRFLAG -c conftest.c 2>&1`
6514#exit 1
6515fi
6516
6517fi
6518rm -f conftest conftest.c conftest.o
6519 ;;
6520esac
6521fi
6522
6523if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = yes"; then
6524{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6525printf "%s\n" "yes" >&6; }
6526:
6527CFLAGS="$CFLAGS -D_POSIX_C_SOURCE=200112"
6528else
6529if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = no"; then
6530{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6531printf "%s\n" "no" >&6; }
6532#echo 'Test with flag is no!'
6533#cat conftest.c
6534#echo "$CC $CPPFLAGS $CFLAGS -D_POSIX_C_SOURCE=200112 $ERRFLAG -c conftest.c 2>&1"
6535#echo `$CC $CPPFLAGS $CFLAGS -D_POSIX_C_SOURCE=200112 $ERRFLAG -c conftest.c 2>&1`
6536#exit 1
6537:
6538
6539else
6540{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: failed" >&5
6541printf "%s\n" "failed" >&6; }
6542:
6543
6544fi
6545fi
6546
6547
6548
6549
6550
6551{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we need -D__EXTENSIONS__ as a flag for $CC" >&5
6552printf %s "checking whether we need -D__EXTENSIONS__ as a flag for $CC... " >&6; }
6553cache=_D__EXTENSIONS__
6554if eval test \${cv_prog_cc_flag_needed_$cache+y}
6555then :
6556  printf %s "(cached) " >&6
6557else case e in #(
6558  e)
6559echo '
6560#include "confdefs.h"
6561#include <stdlib.h>
6562#include <ctype.h>
6563#include <sys/time.h>
6564#ifdef HAVE_TIME_H
6565#include <time.h>
6566#endif
6567#include <unistd.h>
6568#ifdef HAVE_GETOPT_H
6569#include <getopt.h>
6570#endif
6571
6572int test(void) {
6573        int a;
6574        char **opts = NULL;
6575        struct timeval tv;
6576        tv.tv_usec = 10;
6577        srandom(32);
6578        a = getopt(2, opts, "a");
6579        a = isascii(32);
6580	if(tv.tv_usec)
6581		a = 0;
6582        return a;
6583}
6584' > conftest.c
6585echo 'void f(void){}' >>conftest.c
6586if test -z "`$CC $CPPFLAGS $CFLAGS $ERRFLAG -c conftest.c 2>&1`"; then
6587eval "cv_prog_cc_flag_needed_$cache=no"
6588else
6589
6590if test -z "`$CC $CPPFLAGS $CFLAGS -D__EXTENSIONS__ $ERRFLAG -c conftest.c 2>&1`"; then
6591eval "cv_prog_cc_flag_needed_$cache=yes"
6592else
6593eval "cv_prog_cc_flag_needed_$cache=fail"
6594#echo 'Test with flag fails too!'
6595#cat conftest.c
6596#echo "$CC $CPPFLAGS $CFLAGS -D__EXTENSIONS__ $ERRFLAG -c conftest.c 2>&1"
6597#echo `$CC $CPPFLAGS $CFLAGS -D__EXTENSIONS__ $ERRFLAG -c conftest.c 2>&1`
6598#exit 1
6599fi
6600
6601fi
6602rm -f conftest conftest.c conftest.o
6603 ;;
6604esac
6605fi
6606
6607if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = yes"; then
6608{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6609printf "%s\n" "yes" >&6; }
6610:
6611CFLAGS="$CFLAGS -D__EXTENSIONS__"
6612else
6613if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = no"; then
6614{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6615printf "%s\n" "no" >&6; }
6616#echo 'Test with flag is no!'
6617#cat conftest.c
6618#echo "$CC $CPPFLAGS $CFLAGS -D__EXTENSIONS__ $ERRFLAG -c conftest.c 2>&1"
6619#echo `$CC $CPPFLAGS $CFLAGS -D__EXTENSIONS__ $ERRFLAG -c conftest.c 2>&1`
6620#exit 1
6621:
6622
6623else
6624{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: failed" >&5
6625printf "%s\n" "failed" >&6; }
6626:
6627
6628fi
6629fi
6630
6631
6632
6633
6634# debug mode flags warnings
6635# Check whether --enable-checking was given.
6636if test ${enable_checking+y}
6637then :
6638  enableval=$enable_checking;
6639fi
6640
6641# Check whether --enable-debug was given.
6642if test ${enable_debug+y}
6643then :
6644  enableval=$enable_debug;
6645fi
6646
6647if test "$enable_debug" = "yes"; then debug_enabled="$enable_debug";
6648else debug_enabled="$enable_checking"; fi
6649
6650case "$debug_enabled" in
6651        yes)
6652
6653
6654{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -W" >&5
6655printf %s "checking whether $CC supports -W... " >&6; }
6656cache=`echo W | sed 'y%.=/+-%___p_%'`
6657if eval test \${cv_prog_cc_flag_$cache+y}
6658then :
6659  printf %s "(cached) " >&6
6660else case e in #(
6661  e)
6662echo 'void f(void){}' >conftest.c
6663if test -z "`$CC $CPPFLAGS $CFLAGS -W -c conftest.c 2>&1`"; then
6664eval "cv_prog_cc_flag_$cache=yes"
6665else
6666eval "cv_prog_cc_flag_$cache=no"
6667fi
6668rm -f conftest conftest.o conftest.c
6669 ;;
6670esac
6671fi
6672
6673if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
6674{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6675printf "%s\n" "yes" >&6; }
6676:
6677CFLAGS="$CFLAGS -W"
6678else
6679{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6680printf "%s\n" "no" >&6; }
6681:
6682
6683fi
6684
6685
6686
6687{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wall" >&5
6688printf %s "checking whether $CC supports -Wall... " >&6; }
6689cache=`echo Wall | sed 'y%.=/+-%___p_%'`
6690if eval test \${cv_prog_cc_flag_$cache+y}
6691then :
6692  printf %s "(cached) " >&6
6693else case e in #(
6694  e)
6695echo 'void f(void){}' >conftest.c
6696if test -z "`$CC $CPPFLAGS $CFLAGS -Wall -c conftest.c 2>&1`"; then
6697eval "cv_prog_cc_flag_$cache=yes"
6698else
6699eval "cv_prog_cc_flag_$cache=no"
6700fi
6701rm -f conftest conftest.o conftest.c
6702 ;;
6703esac
6704fi
6705
6706if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
6707{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6708printf "%s\n" "yes" >&6; }
6709:
6710CFLAGS="$CFLAGS -Wall"
6711else
6712{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6713printf "%s\n" "no" >&6; }
6714:
6715
6716fi
6717
6718
6719
6720{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wextra" >&5
6721printf %s "checking whether $CC supports -Wextra... " >&6; }
6722cache=`echo Wextra | sed 'y%.=/+-%___p_%'`
6723if eval test \${cv_prog_cc_flag_$cache+y}
6724then :
6725  printf %s "(cached) " >&6
6726else case e in #(
6727  e)
6728echo 'void f(void){}' >conftest.c
6729if test -z "`$CC $CPPFLAGS $CFLAGS -Wextra -c conftest.c 2>&1`"; then
6730eval "cv_prog_cc_flag_$cache=yes"
6731else
6732eval "cv_prog_cc_flag_$cache=no"
6733fi
6734rm -f conftest conftest.o conftest.c
6735 ;;
6736esac
6737fi
6738
6739if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
6740{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6741printf "%s\n" "yes" >&6; }
6742:
6743CFLAGS="$CFLAGS -Wextra"
6744else
6745{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6746printf "%s\n" "no" >&6; }
6747:
6748
6749fi
6750
6751
6752
6753{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wdeclaration-after-statement" >&5
6754printf %s "checking whether $CC supports -Wdeclaration-after-statement... " >&6; }
6755cache=`echo Wdeclaration-after-statement | sed 'y%.=/+-%___p_%'`
6756if eval test \${cv_prog_cc_flag_$cache+y}
6757then :
6758  printf %s "(cached) " >&6
6759else case e in #(
6760  e)
6761echo 'void f(void){}' >conftest.c
6762if test -z "`$CC $CPPFLAGS $CFLAGS -Wdeclaration-after-statement -c conftest.c 2>&1`"; then
6763eval "cv_prog_cc_flag_$cache=yes"
6764else
6765eval "cv_prog_cc_flag_$cache=no"
6766fi
6767rm -f conftest conftest.o conftest.c
6768 ;;
6769esac
6770fi
6771
6772if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
6773{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6774printf "%s\n" "yes" >&6; }
6775:
6776CFLAGS="$CFLAGS -Wdeclaration-after-statement"
6777else
6778{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6779printf "%s\n" "no" >&6; }
6780:
6781
6782fi
6783
6784
6785printf "%s\n" "#define UNBOUND_DEBUG /**/" >>confdefs.h
6786
6787		;;
6788	no|*)
6789		# nothing to do.
6790		;;
6791esac
6792if test "$default_cflags" = "yes"; then
6793	# only when CFLAGS was "" at the start, if the users wants to
6794	# override we shouldn't add default cflags, because they wouldn't
6795	# be able to turn off these options and set the CFLAGS wanted.
6796
6797    # Check whether --enable-flto was given.
6798if test ${enable_flto+y}
6799then :
6800  enableval=$enable_flto;
6801fi
6802
6803    if test "x$enable_flto" != "xno"
6804then :
6805
6806        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -flto" >&5
6807printf %s "checking if $CC supports -flto... " >&6; }
6808        BAKCFLAGS="$CFLAGS"
6809        CFLAGS="$CFLAGS -flto"
6810        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6811/* end confdefs.h.  */
6812
6813int
6814main (void)
6815{
6816
6817  ;
6818  return 0;
6819}
6820_ACEOF
6821if ac_fn_c_try_link "$LINENO"
6822then :
6823
6824            if $CC $CFLAGS -o conftest conftest.c 2>&1 | $GREP -e "warning: no debug symbols in executable" -e "warning: object" >/dev/null; then
6825                CFLAGS="$BAKCFLAGS"
6826                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6827printf "%s\n" "no" >&6; }
6828            else
6829                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6830printf "%s\n" "yes" >&6; }
6831            fi
6832            rm -f conftest conftest.c conftest.o
6833
6834else case e in #(
6835  e) CFLAGS="$BAKCFLAGS" ; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6836printf "%s\n" "no" >&6; } ;;
6837esac
6838fi
6839rm -f core conftest.err conftest.$ac_objext conftest.beam \
6840    conftest$ac_exeext conftest.$ac_ext
6841
6842fi
6843
6844
6845    # Check whether --enable-pie was given.
6846if test ${enable_pie+y}
6847then :
6848  enableval=$enable_pie;
6849fi
6850
6851    if test "x$enable_pie" = "xyes"
6852then :
6853
6854	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports PIE" >&5
6855printf %s "checking if $CC supports PIE... " >&6; }
6856	BAKLDFLAGS="$LDFLAGS"
6857	BAKCFLAGS="$CFLAGS"
6858	LDFLAGS="$LDFLAGS -pie"
6859	CFLAGS="$CFLAGS -fPIE"
6860	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6861/* end confdefs.h.  */
6862
6863int
6864main (void)
6865{
6866
6867  ;
6868  return 0;
6869}
6870_ACEOF
6871if ac_fn_c_try_link "$LINENO"
6872then :
6873
6874	    if $CC $CFLAGS $LDFLAGS -o conftest conftest.c 2>&1 | grep "warning: no debug symbols in executable" >/dev/null; then
6875		LDFLAGS="$BAKLDFLAGS"
6876		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6877printf "%s\n" "no" >&6; }
6878	    else
6879		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6880printf "%s\n" "yes" >&6; }
6881	    fi
6882	    rm -f conftest conftest.c conftest.o
6883
6884else case e in #(
6885  e) LDFLAGS="$BAKLDFLAGS" ; CFLAGS="$BAKCFLAGS" ; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6886printf "%s\n" "no" >&6; } ;;
6887esac
6888fi
6889rm -f core conftest.err conftest.$ac_objext conftest.beam \
6890    conftest$ac_exeext conftest.$ac_ext
6891
6892fi
6893
6894
6895    # Check whether --enable-relro_now was given.
6896if test ${enable_relro_now+y}
6897then :
6898  enableval=$enable_relro_now;
6899fi
6900
6901    if test "x$enable_relro_now" = "xyes"
6902then :
6903
6904	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wl,-z,relro,-z,now" >&5
6905printf %s "checking if $CC supports -Wl,-z,relro,-z,now... " >&6; }
6906	BAKLDFLAGS="$LDFLAGS"
6907	LDFLAGS="$LDFLAGS -Wl,-z,relro,-z,now"
6908	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6909/* end confdefs.h.  */
6910
6911int
6912main (void)
6913{
6914
6915  ;
6916  return 0;
6917}
6918_ACEOF
6919if ac_fn_c_try_link "$LINENO"
6920then :
6921
6922	    if $CC $CFLAGS $LDFLAGS -o conftest conftest.c 2>&1 | grep "warning: no debug symbols in executable" >/dev/null; then
6923		LDFLAGS="$BAKLDFLAGS"
6924		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6925printf "%s\n" "no" >&6; }
6926	    else
6927		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6928printf "%s\n" "yes" >&6; }
6929	    fi
6930	    rm -f conftest conftest.c conftest.o
6931
6932else case e in #(
6933  e) LDFLAGS="$BAKLDFLAGS" ; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6934printf "%s\n" "no" >&6; } ;;
6935esac
6936fi
6937rm -f core conftest.err conftest.$ac_objext conftest.beam \
6938    conftest$ac_exeext conftest.$ac_ext
6939
6940fi
6941
6942fi
6943
6944{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
6945printf %s "checking for inline... " >&6; }
6946if test ${ac_cv_c_inline+y}
6947then :
6948  printf %s "(cached) " >&6
6949else case e in #(
6950  e) ac_cv_c_inline=no
6951for ac_kw in inline __inline__ __inline; do
6952  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6953/* end confdefs.h.  */
6954#ifndef __cplusplus
6955typedef int foo_t;
6956static $ac_kw foo_t static_foo (void) {return 0; }
6957$ac_kw foo_t foo (void) {return 0; }
6958#endif
6959
6960_ACEOF
6961if ac_fn_c_try_compile "$LINENO"
6962then :
6963  ac_cv_c_inline=$ac_kw
6964fi
6965rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
6966  test "$ac_cv_c_inline" != no && break
6967done
6968 ;;
6969esac
6970fi
6971{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
6972printf "%s\n" "$ac_cv_c_inline" >&6; }
6973
6974case $ac_cv_c_inline in
6975  inline | yes) ;;
6976  *)
6977    case $ac_cv_c_inline in
6978      no) ac_val=;;
6979      *) ac_val=$ac_cv_c_inline;;
6980    esac
6981    cat >>confdefs.h <<_ACEOF
6982#ifndef __cplusplus
6983#define inline $ac_val
6984#endif
6985_ACEOF
6986    ;;
6987esac
6988
6989
6990{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler (${CC-cc}) accepts the \"format\" attribute" >&5
6991printf %s "checking whether the C compiler (${CC-cc}) accepts the \"format\" attribute... " >&6; }
6992if test ${ac_cv_c_format_attribute+y}
6993then :
6994  printf %s "(cached) " >&6
6995else case e in #(
6996  e) ac_cv_c_format_attribute=no
6997cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6998/* end confdefs.h.  */
6999#include <stdio.h>
7000void f (char *format, ...) __attribute__ ((format (printf, 1, 2)));
7001void (*pf) (char *format, ...) __attribute__ ((format (printf, 1, 2)));
7002
7003int
7004main (void)
7005{
7006
7007   f ("%s", "str");
7008
7009  ;
7010  return 0;
7011}
7012_ACEOF
7013if ac_fn_c_try_compile "$LINENO"
7014then :
7015  ac_cv_c_format_attribute="yes"
7016else case e in #(
7017  e) ac_cv_c_format_attribute="no" ;;
7018esac
7019fi
7020rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
7021 ;;
7022esac
7023fi
7024
7025
7026{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_format_attribute" >&5
7027printf "%s\n" "$ac_cv_c_format_attribute" >&6; }
7028if test $ac_cv_c_format_attribute = yes; then
7029
7030printf "%s\n" "#define HAVE_ATTR_FORMAT 1" >>confdefs.h
7031
7032fi
7033
7034
7035{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler (${CC-cc}) accepts the \"unused\" attribute" >&5
7036printf %s "checking whether the C compiler (${CC-cc}) accepts the \"unused\" attribute... " >&6; }
7037if test ${ac_cv_c_unused_attribute+y}
7038then :
7039  printf %s "(cached) " >&6
7040else case e in #(
7041  e) ac_cv_c_unused_attribute=no
7042cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7043/* end confdefs.h.  */
7044#include <stdio.h>
7045void f (char *u __attribute__((unused)));
7046
7047int
7048main (void)
7049{
7050
7051   f ("x");
7052
7053  ;
7054  return 0;
7055}
7056_ACEOF
7057if ac_fn_c_try_compile "$LINENO"
7058then :
7059  ac_cv_c_unused_attribute="yes"
7060else case e in #(
7061  e) ac_cv_c_unused_attribute="no" ;;
7062esac
7063fi
7064rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
7065 ;;
7066esac
7067fi
7068
7069
7070
7071
7072{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_unused_attribute" >&5
7073printf "%s\n" "$ac_cv_c_unused_attribute" >&6; }
7074if test $ac_cv_c_unused_attribute = yes; then
7075
7076printf "%s\n" "#define HAVE_ATTR_UNUSED 1" >>confdefs.h
7077
7078fi
7079
7080
7081
7082
7083{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler (${CC-cc}) accepts the \"weak\" attribute" >&5
7084printf %s "checking whether the C compiler (${CC-cc}) accepts the \"weak\" attribute... " >&6; }
7085if test ${ac_cv_c_weak_attribute+y}
7086then :
7087  printf %s "(cached) " >&6
7088else case e in #(
7089  e) ac_cv_c_weak_attribute=no
7090cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7091/* end confdefs.h.  */
7092 #include <stdio.h>
7093__attribute__((weak)) void f(int x) { printf("%d", x); }
7094
7095int
7096main (void)
7097{
7098
7099   f(1);
7100
7101  ;
7102  return 0;
7103}
7104_ACEOF
7105if ac_fn_c_try_compile "$LINENO"
7106then :
7107  ac_cv_c_weak_attribute="yes"
7108else case e in #(
7109  e) ac_cv_c_weak_attribute="no" ;;
7110esac
7111fi
7112rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
7113 ;;
7114esac
7115fi
7116
7117
7118{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_weak_attribute" >&5
7119printf "%s\n" "$ac_cv_c_weak_attribute" >&6; }
7120if test $ac_cv_c_weak_attribute = yes; then
7121
7122printf "%s\n" "#define HAVE_ATTR_WEAK 1" >>confdefs.h
7123
7124
7125printf "%s\n" "#define ATTR_WEAK __attribute__((weak))" >>confdefs.h
7126
7127else
7128
7129printf "%s\n" "#define ATTR_WEAK /**/" >>confdefs.h
7130
7131fi
7132
7133
7134
7135
7136{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler (${CC-cc}) accepts the \"noreturn\" attribute" >&5
7137printf %s "checking whether the C compiler (${CC-cc}) accepts the \"noreturn\" attribute... " >&6; }
7138if test ${ac_cv_c_noreturn_attribute+y}
7139then :
7140  printf %s "(cached) " >&6
7141else case e in #(
7142  e) ac_cv_c_noreturn_attribute=no
7143cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7144/* end confdefs.h.  */
7145 #include <stdio.h>
7146__attribute__((noreturn)) void f(int x) { printf("%d", x); }
7147
7148int
7149main (void)
7150{
7151
7152   f(1);
7153
7154  ;
7155  return 0;
7156}
7157_ACEOF
7158if ac_fn_c_try_compile "$LINENO"
7159then :
7160  ac_cv_c_noreturn_attribute="yes"
7161else case e in #(
7162  e) ac_cv_c_noreturn_attribute="no" ;;
7163esac
7164fi
7165rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
7166 ;;
7167esac
7168fi
7169
7170
7171{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_noreturn_attribute" >&5
7172printf "%s\n" "$ac_cv_c_noreturn_attribute" >&6; }
7173if test $ac_cv_c_noreturn_attribute = yes; then
7174
7175printf "%s\n" "#define HAVE_ATTR_NORETURN 1" >>confdefs.h
7176
7177
7178printf "%s\n" "#define ATTR_NORETURN __attribute__((__noreturn__))" >>confdefs.h
7179
7180else
7181
7182printf "%s\n" "#define ATTR_NORETURN /**/" >>confdefs.h
7183
7184fi
7185
7186
7187
7188
7189{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler (${CC-cc}) accepts the \"fallthrough\" attribute" >&5
7190printf %s "checking whether the C compiler (${CC-cc}) accepts the \"fallthrough\" attribute... " >&6; }
7191BAKCFLAGS="$CFLAGS"
7192CFLAGS="$CFLAGS -Werror"
7193if test ${ac_cv_c_fallthrough_attribute+y}
7194then :
7195  printf %s "(cached) " >&6
7196else case e in #(
7197  e) ac_cv_c_fallthrough_attribute=no
7198cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7199/* end confdefs.h.  */
7200 #include <stdio.h>
7201void f(int x) {
7202	int y = 0;
7203	switch(x) {
7204	case 1:
7205		y = 1;
7206		__attribute__((fallthrough));
7207		/* fallthrough */
7208	case 2:
7209		y++;
7210		break;
7211	case 3:
7212		y = 3;
7213		break;
7214	}
7215	printf("%d", y);
7216}
7217
7218int
7219main (void)
7220{
7221
7222   f(1);
7223
7224  ;
7225  return 0;
7226}
7227_ACEOF
7228if ac_fn_c_try_compile "$LINENO"
7229then :
7230  ac_cv_c_fallthrough_attribute="yes"
7231else case e in #(
7232  e) ac_cv_c_fallthrough_attribute="no" ;;
7233esac
7234fi
7235rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
7236 ;;
7237esac
7238fi
7239
7240CFLAGS="$BAKCFLAGS"
7241
7242{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_fallthrough_attribute" >&5
7243printf "%s\n" "$ac_cv_c_fallthrough_attribute" >&6; }
7244if test $ac_cv_c_fallthrough_attribute = yes; then
7245
7246printf "%s\n" "#define HAVE_ATTR_FALLTHROUGH 1" >>confdefs.h
7247
7248
7249printf "%s\n" "#define ATTR_FALLTHROUGH __attribute__((fallthrough));" >>confdefs.h
7250
7251else
7252
7253printf "%s\n" "#define ATTR_FALLTHROUGH /**/" >>confdefs.h
7254
7255fi
7256
7257
7258if test "$srcdir" != "."; then
7259	CPPFLAGS="$CPPFLAGS -I$srcdir"
7260fi
7261
7262
7263
7264
7265
7266for ac_prog in flex lex
7267do
7268  # Extract the first word of "$ac_prog", so it can be a program name with args.
7269set dummy $ac_prog; ac_word=$2
7270{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7271printf %s "checking for $ac_word... " >&6; }
7272if test ${ac_cv_prog_LEX+y}
7273then :
7274  printf %s "(cached) " >&6
7275else case e in #(
7276  e) if test -n "$LEX"; then
7277  ac_cv_prog_LEX="$LEX" # Let the user override the test.
7278else
7279as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7280for as_dir in $PATH
7281do
7282  IFS=$as_save_IFS
7283  case $as_dir in #(((
7284    '') as_dir=./ ;;
7285    */) ;;
7286    *) as_dir=$as_dir/ ;;
7287  esac
7288    for ac_exec_ext in '' $ac_executable_extensions; do
7289  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
7290    ac_cv_prog_LEX="$ac_prog"
7291    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
7292    break 2
7293  fi
7294done
7295  done
7296IFS=$as_save_IFS
7297
7298fi ;;
7299esac
7300fi
7301LEX=$ac_cv_prog_LEX
7302if test -n "$LEX"; then
7303  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LEX" >&5
7304printf "%s\n" "$LEX" >&6; }
7305else
7306  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7307printf "%s\n" "no" >&6; }
7308fi
7309
7310
7311  test -n "$LEX" && break
7312done
7313test -n "$LEX" || LEX=":"
7314
7315  if test "x$LEX" != "x:"; then
7316    cat >conftest.l <<_ACEOF
7317%{
7318#ifdef __cplusplus
7319extern "C"
7320#endif
7321int yywrap(void);
7322%}
7323%%
7324a { ECHO; }
7325b { REJECT; }
7326c { yymore (); }
7327d { yyless (1); }
7328e { /* IRIX 6.5 flex 2.5.4 underquotes its yyless argument.  */
7329#ifdef __cplusplus
7330    yyless ((yyinput () != 0));
7331#else
7332    yyless ((input () != 0));
7333#endif
7334  }
7335f { unput (yytext[0]); }
7336. { BEGIN INITIAL; }
7337%%
7338#ifdef YYTEXT_POINTER
7339extern char *yytext;
7340#endif
7341int
7342yywrap (void)
7343{
7344  return 1;
7345}
7346int
7347main (void)
7348{
7349  return ! yylex ();
7350}
7351_ACEOF
7352{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for lex output file root" >&5
7353printf %s "checking for lex output file root... " >&6; }
7354if test ${ac_cv_prog_lex_root+y}
7355then :
7356  printf %s "(cached) " >&6
7357else case e in #(
7358  e)
7359ac_cv_prog_lex_root=unknown
7360{ { ac_try="$LEX conftest.l"
7361case "(($ac_try" in
7362  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7363  *) ac_try_echo=$ac_try;;
7364esac
7365eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
7366printf "%s\n" "$ac_try_echo"; } >&5
7367  (eval "$LEX conftest.l") 2>&5
7368  ac_status=$?
7369  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7370  test $ac_status = 0; } &&
7371if test -f lex.yy.c; then
7372  ac_cv_prog_lex_root=lex.yy
7373elif test -f lexyy.c; then
7374  ac_cv_prog_lex_root=lexyy
7375fi ;;
7376esac
7377fi
7378{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_lex_root" >&5
7379printf "%s\n" "$ac_cv_prog_lex_root" >&6; }
7380if test "$ac_cv_prog_lex_root" = unknown
7381then :
7382  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cannot find output from $LEX; giving up on $LEX" >&5
7383printf "%s\n" "$as_me: WARNING: cannot find output from $LEX; giving up on $LEX" >&2;}
7384   LEX=: LEXLIB=
7385fi
7386LEX_OUTPUT_ROOT=$ac_cv_prog_lex_root
7387
7388if test ${LEXLIB+y}
7389then :
7390
7391else case e in #(
7392  e)
7393  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for lex library" >&5
7394printf %s "checking for lex library... " >&6; }
7395if test ${ac_cv_lib_lex+y}
7396then :
7397  printf %s "(cached) " >&6
7398else case e in #(
7399  e)
7400    ac_save_LIBS="$LIBS"
7401    ac_found=false
7402    for ac_cv_lib_lex in 'none needed' -lfl -ll 'not found'; do
7403      case $ac_cv_lib_lex in #(
7404  'none needed') :
7405     ;; #(
7406  'not found') :
7407    break ;; #(
7408  *) :
7409    LIBS="$ac_cv_lib_lex $ac_save_LIBS" ;; #(
7410  *) :
7411     ;;
7412esac
7413
7414      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7415/* end confdefs.h.  */
7416`cat $LEX_OUTPUT_ROOT.c`
7417_ACEOF
7418if ac_fn_c_try_link "$LINENO"
7419then :
7420  ac_found=:
7421fi
7422rm -f core conftest.err conftest.$ac_objext conftest.beam \
7423    conftest$ac_exeext conftest.$ac_ext
7424      if $ac_found; then
7425        break
7426      fi
7427    done
7428    LIBS="$ac_save_LIBS"
7429   ;;
7430esac
7431fi
7432{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_lex" >&5
7433printf "%s\n" "$ac_cv_lib_lex" >&6; }
7434  if test "$ac_cv_lib_lex" = 'not found'
7435then :
7436  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: required lex library not found; giving up on $LEX" >&5
7437printf "%s\n" "$as_me: WARNING: required lex library not found; giving up on $LEX" >&2;}
7438	 LEX=: LEXLIB=
7439elif test "$ac_cv_lib_lex" = 'none needed'
7440then :
7441  LEXLIB=''
7442else case e in #(
7443  e) LEXLIB=$ac_cv_lib_lex ;;
7444esac
7445fi
7446   ;;
7447esac
7448fi
7449
7450
7451if test "$LEX" != :
7452then :
7453
7454{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether yytext is a pointer" >&5
7455printf %s "checking whether yytext is a pointer... " >&6; }
7456if test ${ac_cv_prog_lex_yytext_pointer+y}
7457then :
7458  printf %s "(cached) " >&6
7459else case e in #(
7460  e) # POSIX says lex can declare yytext either as a pointer or an array; the
7461# default is implementation-dependent.  Figure out which it is, since
7462# not all implementations provide the %pointer and %array declarations.
7463ac_cv_prog_lex_yytext_pointer=no
7464cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7465/* end confdefs.h.  */
7466
7467  #define YYTEXT_POINTER 1
7468`cat $LEX_OUTPUT_ROOT.c`
7469_ACEOF
7470if ac_fn_c_try_compile "$LINENO"
7471then :
7472  ac_cv_prog_lex_yytext_pointer=yes
7473fi
7474rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
7475 ;;
7476esac
7477fi
7478{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_lex_yytext_pointer" >&5
7479printf "%s\n" "$ac_cv_prog_lex_yytext_pointer" >&6; }
7480if test $ac_cv_prog_lex_yytext_pointer = yes; then
7481
7482printf "%s\n" "#define YYTEXT_POINTER 1" >>confdefs.h
7483
7484fi
7485
7486fi
7487rm -f conftest.l $LEX_OUTPUT_ROOT.c
7488
7489fi
7490if test "$LEX" != "" -a "$LEX" != ":"; then
7491
7492	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for yylex_destroy" >&5
7493printf %s "checking for yylex_destroy... " >&6; }
7494	if echo %% | $LEX -t 2>&1 | grep yylex_destroy >/dev/null 2>&1; then
7495
7496printf "%s\n" "#define LEX_HAS_YYLEX_DESTROY 1" >>confdefs.h
7497
7498		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7499printf "%s\n" "yes" >&6; }
7500	else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7501printf "%s\n" "no" >&6; };
7502		LEX=":"
7503	fi
7504
7505fi
7506if test "$LEX" != "" -a "$LEX" != ":"; then
7507
7508	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for lex %option" >&5
7509printf %s "checking for lex %option... " >&6; }
7510	if cat <<EOF | $LEX -t 2>&1 | grep yy_delete_buffer >/dev/null 2>&1; then
7511%option nounput
7512%%
7513EOF
7514		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7515printf "%s\n" "yes" >&6; }
7516	else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7517printf "%s\n" "no" >&6; };
7518		LEX=":"
7519	fi
7520
7521fi
7522if test "$LEX" = "" -o "$LEX" = ":"; then
7523	if test ! -f util/configlexer.c; then
7524		as_fn_error $? "no lex and no util/configlexer.c: need flex and bison to compile from source repository." "$LINENO" 5
7525	fi
7526fi
7527for ac_prog in 'bison -y' byacc
7528do
7529  # Extract the first word of "$ac_prog", so it can be a program name with args.
7530set dummy $ac_prog; 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_YACC+y}
7534then :
7535  printf %s "(cached) " >&6
7536else case e in #(
7537  e) if test -n "$YACC"; then
7538  ac_cv_prog_YACC="$YACC" # 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_YACC="$ac_prog"
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 ;;
7560esac
7561fi
7562YACC=$ac_cv_prog_YACC
7563if test -n "$YACC"; then
7564  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $YACC" >&5
7565printf "%s\n" "$YACC" >&6; }
7566else
7567  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7568printf "%s\n" "no" >&6; }
7569fi
7570
7571
7572  test -n "$YACC" && break
7573done
7574test -n "$YACC" || YACC="yacc"
7575
7576if test "$YACC" = "" -o "$YACC" = ":"; then
7577	if test ! -f util/configparser.c; then
7578		as_fn_error $? "no yacc and no util/configparser.c: need flex and bison to compile from source repository." "$LINENO" 5
7579	fi
7580fi
7581# Extract the first word of "doxygen", so it can be a program name with args.
7582set dummy doxygen; ac_word=$2
7583{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7584printf %s "checking for $ac_word... " >&6; }
7585if test ${ac_cv_prog_doxygen+y}
7586then :
7587  printf %s "(cached) " >&6
7588else case e in #(
7589  e) if test -n "$doxygen"; then
7590  ac_cv_prog_doxygen="$doxygen" # Let the user override the test.
7591else
7592as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7593for as_dir in $PATH
7594do
7595  IFS=$as_save_IFS
7596  case $as_dir in #(((
7597    '') as_dir=./ ;;
7598    */) ;;
7599    *) as_dir=$as_dir/ ;;
7600  esac
7601    for ac_exec_ext in '' $ac_executable_extensions; do
7602  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
7603    ac_cv_prog_doxygen="doxygen"
7604    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
7605    break 2
7606  fi
7607done
7608  done
7609IFS=$as_save_IFS
7610
7611fi ;;
7612esac
7613fi
7614doxygen=$ac_cv_prog_doxygen
7615if test -n "$doxygen"; then
7616  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $doxygen" >&5
7617printf "%s\n" "$doxygen" >&6; }
7618else
7619  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7620printf "%s\n" "no" >&6; }
7621fi
7622
7623
7624if test -n "$ac_tool_prefix"; then
7625  # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
7626set dummy ${ac_tool_prefix}strip; ac_word=$2
7627{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7628printf %s "checking for $ac_word... " >&6; }
7629if test ${ac_cv_prog_STRIP+y}
7630then :
7631  printf %s "(cached) " >&6
7632else case e in #(
7633  e) if test -n "$STRIP"; then
7634  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
7635else
7636as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7637for as_dir in $PATH
7638do
7639  IFS=$as_save_IFS
7640  case $as_dir in #(((
7641    '') as_dir=./ ;;
7642    */) ;;
7643    *) as_dir=$as_dir/ ;;
7644  esac
7645    for ac_exec_ext in '' $ac_executable_extensions; do
7646  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
7647    ac_cv_prog_STRIP="${ac_tool_prefix}strip"
7648    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
7649    break 2
7650  fi
7651done
7652  done
7653IFS=$as_save_IFS
7654
7655fi ;;
7656esac
7657fi
7658STRIP=$ac_cv_prog_STRIP
7659if test -n "$STRIP"; then
7660  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
7661printf "%s\n" "$STRIP" >&6; }
7662else
7663  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7664printf "%s\n" "no" >&6; }
7665fi
7666
7667
7668fi
7669if test -z "$ac_cv_prog_STRIP"; then
7670  ac_ct_STRIP=$STRIP
7671  # Extract the first word of "strip", so it can be a program name with args.
7672set dummy strip; ac_word=$2
7673{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7674printf %s "checking for $ac_word... " >&6; }
7675if test ${ac_cv_prog_ac_ct_STRIP+y}
7676then :
7677  printf %s "(cached) " >&6
7678else case e in #(
7679  e) if test -n "$ac_ct_STRIP"; then
7680  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
7681else
7682as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7683for as_dir in $PATH
7684do
7685  IFS=$as_save_IFS
7686  case $as_dir in #(((
7687    '') as_dir=./ ;;
7688    */) ;;
7689    *) as_dir=$as_dir/ ;;
7690  esac
7691    for ac_exec_ext in '' $ac_executable_extensions; do
7692  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
7693    ac_cv_prog_ac_ct_STRIP="strip"
7694    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
7695    break 2
7696  fi
7697done
7698  done
7699IFS=$as_save_IFS
7700
7701fi ;;
7702esac
7703fi
7704ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
7705if test -n "$ac_ct_STRIP"; then
7706  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
7707printf "%s\n" "$ac_ct_STRIP" >&6; }
7708else
7709  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7710printf "%s\n" "no" >&6; }
7711fi
7712
7713  if test "x$ac_ct_STRIP" = x; then
7714    STRIP=""
7715  else
7716    case $cross_compiling:$ac_tool_warned in
7717yes:)
7718{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7719printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7720ac_tool_warned=yes ;;
7721esac
7722    STRIP=$ac_ct_STRIP
7723  fi
7724else
7725  STRIP="$ac_cv_prog_STRIP"
7726fi
7727
7728
7729
7730
7731  # Make sure we can run config.sub.
7732$SHELL "${ac_aux_dir}config.sub" sun4 >/dev/null 2>&1 ||
7733  as_fn_error $? "cannot run $SHELL ${ac_aux_dir}config.sub" "$LINENO" 5
7734
7735{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
7736printf %s "checking build system type... " >&6; }
7737if test ${ac_cv_build+y}
7738then :
7739  printf %s "(cached) " >&6
7740else case e in #(
7741  e) ac_build_alias=$build_alias
7742test "x$ac_build_alias" = x &&
7743  ac_build_alias=`$SHELL "${ac_aux_dir}config.guess"`
7744test "x$ac_build_alias" = x &&
7745  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
7746ac_cv_build=`$SHELL "${ac_aux_dir}config.sub" $ac_build_alias` ||
7747  as_fn_error $? "$SHELL ${ac_aux_dir}config.sub $ac_build_alias failed" "$LINENO" 5
7748 ;;
7749esac
7750fi
7751{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
7752printf "%s\n" "$ac_cv_build" >&6; }
7753case $ac_cv_build in
7754*-*-*) ;;
7755*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
7756esac
7757build=$ac_cv_build
7758ac_save_IFS=$IFS; IFS='-'
7759set x $ac_cv_build
7760shift
7761build_cpu=$1
7762build_vendor=$2
7763shift; shift
7764# Remember, the first character of IFS is used to create $*,
7765# except with old shells:
7766build_os=$*
7767IFS=$ac_save_IFS
7768case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
7769
7770
7771{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
7772printf %s "checking host system type... " >&6; }
7773if test ${ac_cv_host+y}
7774then :
7775  printf %s "(cached) " >&6
7776else case e in #(
7777  e) if test "x$host_alias" = x; then
7778  ac_cv_host=$ac_cv_build
7779else
7780  ac_cv_host=`$SHELL "${ac_aux_dir}config.sub" $host_alias` ||
7781    as_fn_error $? "$SHELL ${ac_aux_dir}config.sub $host_alias failed" "$LINENO" 5
7782fi
7783 ;;
7784esac
7785fi
7786{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
7787printf "%s\n" "$ac_cv_host" >&6; }
7788case $ac_cv_host in
7789*-*-*) ;;
7790*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
7791esac
7792host=$ac_cv_host
7793ac_save_IFS=$IFS; IFS='-'
7794set x $ac_cv_host
7795shift
7796host_cpu=$1
7797host_vendor=$2
7798shift; shift
7799# Remember, the first character of IFS is used to create $*,
7800# except with old shells:
7801host_os=$*
7802IFS=$ac_save_IFS
7803case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
7804
7805
7806
7807# skip these tests, we do not need them.
7808
7809
7810
7811
7812
7813
7814
7815
7816# always use ./libtool unless override from commandline (libtool=mylibtool)
7817if test -z "$libtool"; then
7818	libtool="./libtool"
7819fi
7820
7821# avoid libtool max commandline length test on systems that fork slowly.
7822
7823if echo "$host_os" | grep "sunos4" >/dev/null; then
7824	lt_cv_sys_max_cmd_len=32750;
7825fi
7826if test -n "$ac_tool_prefix"; then
7827  # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
7828set dummy ${ac_tool_prefix}ar; ac_word=$2
7829{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7830printf %s "checking for $ac_word... " >&6; }
7831if test ${ac_cv_path_AR+y}
7832then :
7833  printf %s "(cached) " >&6
7834else case e in #(
7835  e) case $AR in
7836  [\\/]* | ?:[\\/]*)
7837  ac_cv_path_AR="$AR" # Let the user override the test with a path.
7838  ;;
7839  *)
7840  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7841for as_dir in $PATH
7842do
7843  IFS=$as_save_IFS
7844  case $as_dir in #(((
7845    '') as_dir=./ ;;
7846    */) ;;
7847    *) as_dir=$as_dir/ ;;
7848  esac
7849    for ac_exec_ext in '' $ac_executable_extensions; do
7850  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
7851    ac_cv_path_AR="$as_dir$ac_word$ac_exec_ext"
7852    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
7853    break 2
7854  fi
7855done
7856  done
7857IFS=$as_save_IFS
7858
7859  ;;
7860esac ;;
7861esac
7862fi
7863AR=$ac_cv_path_AR
7864if test -n "$AR"; then
7865  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
7866printf "%s\n" "$AR" >&6; }
7867else
7868  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7869printf "%s\n" "no" >&6; }
7870fi
7871
7872
7873fi
7874if test -z "$ac_cv_path_AR"; then
7875  ac_pt_AR=$AR
7876  # Extract the first word of "ar", so it can be a program name with args.
7877set dummy ar; ac_word=$2
7878{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7879printf %s "checking for $ac_word... " >&6; }
7880if test ${ac_cv_path_ac_pt_AR+y}
7881then :
7882  printf %s "(cached) " >&6
7883else case e in #(
7884  e) case $ac_pt_AR in
7885  [\\/]* | ?:[\\/]*)
7886  ac_cv_path_ac_pt_AR="$ac_pt_AR" # Let the user override the test with a path.
7887  ;;
7888  *)
7889  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7890for as_dir in $PATH
7891do
7892  IFS=$as_save_IFS
7893  case $as_dir in #(((
7894    '') as_dir=./ ;;
7895    */) ;;
7896    *) as_dir=$as_dir/ ;;
7897  esac
7898    for ac_exec_ext in '' $ac_executable_extensions; do
7899  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
7900    ac_cv_path_ac_pt_AR="$as_dir$ac_word$ac_exec_ext"
7901    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
7902    break 2
7903  fi
7904done
7905  done
7906IFS=$as_save_IFS
7907
7908  ;;
7909esac ;;
7910esac
7911fi
7912ac_pt_AR=$ac_cv_path_ac_pt_AR
7913if test -n "$ac_pt_AR"; then
7914  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_pt_AR" >&5
7915printf "%s\n" "$ac_pt_AR" >&6; }
7916else
7917  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7918printf "%s\n" "no" >&6; }
7919fi
7920
7921  if test "x$ac_pt_AR" = x; then
7922    AR="false"
7923  else
7924    case $cross_compiling:$ac_tool_warned in
7925yes:)
7926{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7927printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7928ac_tool_warned=yes ;;
7929esac
7930    AR=$ac_pt_AR
7931  fi
7932else
7933  AR="$ac_cv_path_AR"
7934fi
7935
7936if test $AR = false; then
7937	as_fn_error $? "Cannot find 'ar', please extend PATH to include it" "$LINENO" 5
7938fi
7939
7940
7941case `pwd` in
7942  *\ * | *\	*)
7943    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5
7944printf "%s\n" "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;;
7945esac
7946
7947
7948
7949macro_version='2.4.6'
7950macro_revision='2.4.6'
7951
7952
7953
7954
7955
7956
7957
7958
7959
7960
7961
7962
7963
7964
7965ltmain=$ac_aux_dir/ltmain.sh
7966
7967# Backslashify metacharacters that are still active within
7968# double-quoted strings.
7969sed_quote_subst='s/\(["`$\\]\)/\\\1/g'
7970
7971# Same as above, but do not quote variable references.
7972double_quote_subst='s/\(["`\\]\)/\\\1/g'
7973
7974# Sed substitution to delay expansion of an escaped shell variable in a
7975# double_quote_subst'ed string.
7976delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
7977
7978# Sed substitution to delay expansion of an escaped single quote.
7979delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
7980
7981# Sed substitution to avoid accidental globbing in evaled expressions
7982no_glob_subst='s/\*/\\\*/g'
7983
7984ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
7985ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
7986ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
7987
7988{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5
7989printf %s "checking how to print strings... " >&6; }
7990# Test print first, because it will be a builtin if present.
7991if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \
7992   test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
7993  ECHO='print -r --'
7994elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
7995  ECHO='printf %s\n'
7996else
7997  # Use this function as a fallback that always works.
7998  func_fallback_echo ()
7999  {
8000    eval 'cat <<_LTECHO_EOF
8001$1
8002_LTECHO_EOF'
8003  }
8004  ECHO='func_fallback_echo'
8005fi
8006
8007# func_echo_all arg...
8008# Invoke $ECHO with all args, space-separated.
8009func_echo_all ()
8010{
8011    $ECHO ""
8012}
8013
8014case $ECHO in
8015  printf*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: printf" >&5
8016printf "%s\n" "printf" >&6; } ;;
8017  print*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: print -r" >&5
8018printf "%s\n" "print -r" >&6; } ;;
8019  *) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: cat" >&5
8020printf "%s\n" "cat" >&6; } ;;
8021esac
8022
8023
8024
8025
8026
8027
8028
8029
8030
8031
8032
8033
8034
8035
8036{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
8037printf %s "checking for a sed that does not truncate output... " >&6; }
8038if test ${ac_cv_path_SED+y}
8039then :
8040  printf %s "(cached) " >&6
8041else case e in #(
8042  e)           ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
8043     for ac_i in 1 2 3 4 5 6 7; do
8044       ac_script="$ac_script$as_nl$ac_script"
8045     done
8046     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
8047     { ac_script=; unset ac_script;}
8048     if test -z "$SED"; then
8049  ac_path_SED_found=false
8050  # Loop through the user's path and test for each of PROGNAME-LIST
8051  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8052for as_dir in $PATH
8053do
8054  IFS=$as_save_IFS
8055  case $as_dir in #(((
8056    '') as_dir=./ ;;
8057    */) ;;
8058    *) as_dir=$as_dir/ ;;
8059  esac
8060    for ac_prog in sed gsed
8061   do
8062    for ac_exec_ext in '' $ac_executable_extensions; do
8063      ac_path_SED="$as_dir$ac_prog$ac_exec_ext"
8064      as_fn_executable_p "$ac_path_SED" || continue
8065# Check for GNU ac_path_SED and select it if it is found.
8066  # Check for GNU $ac_path_SED
8067case `"$ac_path_SED" --version 2>&1` in #(
8068*GNU*)
8069  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
8070#(
8071*)
8072  ac_count=0
8073  printf %s 0123456789 >"conftest.in"
8074  while :
8075  do
8076    cat "conftest.in" "conftest.in" >"conftest.tmp"
8077    mv "conftest.tmp" "conftest.in"
8078    cp "conftest.in" "conftest.nl"
8079    printf "%s\n" '' >> "conftest.nl"
8080    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
8081    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
8082    as_fn_arith $ac_count + 1 && ac_count=$as_val
8083    if test $ac_count -gt ${ac_path_SED_max-0}; then
8084      # Best one so far, save it but keep looking for a better one
8085      ac_cv_path_SED="$ac_path_SED"
8086      ac_path_SED_max=$ac_count
8087    fi
8088    # 10*(2^10) chars as input seems more than enough
8089    test $ac_count -gt 10 && break
8090  done
8091  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
8092esac
8093
8094      $ac_path_SED_found && break 3
8095    done
8096  done
8097  done
8098IFS=$as_save_IFS
8099  if test -z "$ac_cv_path_SED"; then
8100    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
8101  fi
8102else
8103  ac_cv_path_SED=$SED
8104fi
8105 ;;
8106esac
8107fi
8108{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
8109printf "%s\n" "$ac_cv_path_SED" >&6; }
8110 SED="$ac_cv_path_SED"
8111  rm -f conftest.sed
8112
8113test -z "$SED" && SED=sed
8114Xsed="$SED -e 1s/^X//"
8115
8116
8117
8118
8119
8120
8121
8122
8123
8124
8125
8126{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
8127printf %s "checking for egrep... " >&6; }
8128if test ${ac_cv_path_EGREP+y}
8129then :
8130  printf %s "(cached) " >&6
8131else case e in #(
8132  e) if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
8133   then ac_cv_path_EGREP="$GREP -E"
8134   else
8135     if test -z "$EGREP"; then
8136  ac_path_EGREP_found=false
8137  # Loop through the user's path and test for each of PROGNAME-LIST
8138  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8139for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
8140do
8141  IFS=$as_save_IFS
8142  case $as_dir in #(((
8143    '') as_dir=./ ;;
8144    */) ;;
8145    *) as_dir=$as_dir/ ;;
8146  esac
8147    for ac_prog in egrep
8148   do
8149    for ac_exec_ext in '' $ac_executable_extensions; do
8150      ac_path_EGREP="$as_dir$ac_prog$ac_exec_ext"
8151      as_fn_executable_p "$ac_path_EGREP" || continue
8152# Check for GNU ac_path_EGREP and select it if it is found.
8153  # Check for GNU $ac_path_EGREP
8154case `"$ac_path_EGREP" --version 2>&1` in #(
8155*GNU*)
8156  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
8157#(
8158*)
8159  ac_count=0
8160  printf %s 0123456789 >"conftest.in"
8161  while :
8162  do
8163    cat "conftest.in" "conftest.in" >"conftest.tmp"
8164    mv "conftest.tmp" "conftest.in"
8165    cp "conftest.in" "conftest.nl"
8166    printf "%s\n" 'EGREP' >> "conftest.nl"
8167    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
8168    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
8169    as_fn_arith $ac_count + 1 && ac_count=$as_val
8170    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
8171      # Best one so far, save it but keep looking for a better one
8172      ac_cv_path_EGREP="$ac_path_EGREP"
8173      ac_path_EGREP_max=$ac_count
8174    fi
8175    # 10*(2^10) chars as input seems more than enough
8176    test $ac_count -gt 10 && break
8177  done
8178  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
8179esac
8180
8181      $ac_path_EGREP_found && break 3
8182    done
8183  done
8184  done
8185IFS=$as_save_IFS
8186  if test -z "$ac_cv_path_EGREP"; then
8187    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
8188  fi
8189else
8190  ac_cv_path_EGREP=$EGREP
8191fi
8192
8193   fi ;;
8194esac
8195fi
8196{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
8197printf "%s\n" "$ac_cv_path_EGREP" >&6; }
8198 EGREP="$ac_cv_path_EGREP"
8199
8200         EGREP_TRADITIONAL=$EGREP
8201 ac_cv_path_EGREP_TRADITIONAL=$EGREP
8202
8203{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
8204printf %s "checking for fgrep... " >&6; }
8205if test ${ac_cv_path_FGREP+y}
8206then :
8207  printf %s "(cached) " >&6
8208else case e in #(
8209  e) if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
8210   then ac_cv_path_FGREP="$GREP -F"
8211   else
8212     if test -z "$FGREP"; then
8213  ac_path_FGREP_found=false
8214  # Loop through the user's path and test for each of PROGNAME-LIST
8215  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8216for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
8217do
8218  IFS=$as_save_IFS
8219  case $as_dir in #(((
8220    '') as_dir=./ ;;
8221    */) ;;
8222    *) as_dir=$as_dir/ ;;
8223  esac
8224    for ac_prog in fgrep
8225   do
8226    for ac_exec_ext in '' $ac_executable_extensions; do
8227      ac_path_FGREP="$as_dir$ac_prog$ac_exec_ext"
8228      as_fn_executable_p "$ac_path_FGREP" || continue
8229# Check for GNU ac_path_FGREP and select it if it is found.
8230  # Check for GNU $ac_path_FGREP
8231case `"$ac_path_FGREP" --version 2>&1` in #(
8232*GNU*)
8233  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
8234#(
8235*)
8236  ac_count=0
8237  printf %s 0123456789 >"conftest.in"
8238  while :
8239  do
8240    cat "conftest.in" "conftest.in" >"conftest.tmp"
8241    mv "conftest.tmp" "conftest.in"
8242    cp "conftest.in" "conftest.nl"
8243    printf "%s\n" 'FGREP' >> "conftest.nl"
8244    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
8245    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
8246    as_fn_arith $ac_count + 1 && ac_count=$as_val
8247    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
8248      # Best one so far, save it but keep looking for a better one
8249      ac_cv_path_FGREP="$ac_path_FGREP"
8250      ac_path_FGREP_max=$ac_count
8251    fi
8252    # 10*(2^10) chars as input seems more than enough
8253    test $ac_count -gt 10 && break
8254  done
8255  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
8256esac
8257
8258      $ac_path_FGREP_found && break 3
8259    done
8260  done
8261  done
8262IFS=$as_save_IFS
8263  if test -z "$ac_cv_path_FGREP"; then
8264    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
8265  fi
8266else
8267  ac_cv_path_FGREP=$FGREP
8268fi
8269
8270   fi ;;
8271esac
8272fi
8273{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
8274printf "%s\n" "$ac_cv_path_FGREP" >&6; }
8275 FGREP="$ac_cv_path_FGREP"
8276
8277
8278test -z "$GREP" && GREP=grep
8279
8280
8281
8282
8283
8284
8285
8286
8287
8288
8289
8290
8291
8292
8293
8294
8295
8296
8297
8298# Check whether --with-gnu-ld was given.
8299if test ${with_gnu_ld+y}
8300then :
8301  withval=$with_gnu_ld; test no = "$withval" || with_gnu_ld=yes
8302else case e in #(
8303  e) with_gnu_ld=no ;;
8304esac
8305fi
8306
8307ac_prog=ld
8308if test yes = "$GCC"; then
8309  # Check if gcc -print-prog-name=ld gives a path.
8310  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5
8311printf %s "checking for ld used by $CC... " >&6; }
8312  case $host in
8313  *-*-mingw*)
8314    # gcc leaves a trailing carriage return, which upsets mingw
8315    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
8316  *)
8317    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
8318  esac
8319  case $ac_prog in
8320    # Accept absolute paths.
8321    [\\/]* | ?:[\\/]*)
8322      re_direlt='/[^/][^/]*/\.\./'
8323      # Canonicalize the pathname of ld
8324      ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
8325      while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
8326	ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
8327      done
8328      test -z "$LD" && LD=$ac_prog
8329      ;;
8330  "")
8331    # If it fails, then pretend we aren't using GCC.
8332    ac_prog=ld
8333    ;;
8334  *)
8335    # If it is relative, then search for the first ld in PATH.
8336    with_gnu_ld=unknown
8337    ;;
8338  esac
8339elif test yes = "$with_gnu_ld"; then
8340  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
8341printf %s "checking for GNU ld... " >&6; }
8342else
8343  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
8344printf %s "checking for non-GNU ld... " >&6; }
8345fi
8346if test ${lt_cv_path_LD+y}
8347then :
8348  printf %s "(cached) " >&6
8349else case e in #(
8350  e) if test -z "$LD"; then
8351  lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
8352  for ac_dir in $PATH; do
8353    IFS=$lt_save_ifs
8354    test -z "$ac_dir" && ac_dir=.
8355    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
8356      lt_cv_path_LD=$ac_dir/$ac_prog
8357      # Check to see if the program is GNU ld.  I'd rather use --version,
8358      # but apparently some variants of GNU ld only accept -v.
8359      # Break only if it was the GNU/non-GNU ld that we prefer.
8360      case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
8361      *GNU* | *'with BFD'*)
8362	test no != "$with_gnu_ld" && break
8363	;;
8364      *)
8365	test yes != "$with_gnu_ld" && break
8366	;;
8367      esac
8368    fi
8369  done
8370  IFS=$lt_save_ifs
8371else
8372  lt_cv_path_LD=$LD # Let the user override the test with a path.
8373fi ;;
8374esac
8375fi
8376
8377LD=$lt_cv_path_LD
8378if test -n "$LD"; then
8379  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
8380printf "%s\n" "$LD" >&6; }
8381else
8382  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
8383printf "%s\n" "no" >&6; }
8384fi
8385test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
8386{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
8387printf %s "checking if the linker ($LD) is GNU ld... " >&6; }
8388if test ${lt_cv_prog_gnu_ld+y}
8389then :
8390  printf %s "(cached) " >&6
8391else case e in #(
8392  e) # I'd rather use --version here, but apparently some GNU lds only accept -v.
8393case `$LD -v 2>&1 </dev/null` in
8394*GNU* | *'with BFD'*)
8395  lt_cv_prog_gnu_ld=yes
8396  ;;
8397*)
8398  lt_cv_prog_gnu_ld=no
8399  ;;
8400esac ;;
8401esac
8402fi
8403{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_gnu_ld" >&5
8404printf "%s\n" "$lt_cv_prog_gnu_ld" >&6; }
8405with_gnu_ld=$lt_cv_prog_gnu_ld
8406
8407
8408
8409
8410
8411
8412
8413
8414
8415{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)" >&5
8416printf %s "checking for BSD- or MS-compatible name lister (nm)... " >&6; }
8417if test ${lt_cv_path_NM+y}
8418then :
8419  printf %s "(cached) " >&6
8420else case e in #(
8421  e) if test -n "$NM"; then
8422  # Let the user override the test.
8423  lt_cv_path_NM=$NM
8424else
8425  lt_nm_to_check=${ac_tool_prefix}nm
8426  if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
8427    lt_nm_to_check="$lt_nm_to_check nm"
8428  fi
8429  for lt_tmp_nm in $lt_nm_to_check; do
8430    lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
8431    for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
8432      IFS=$lt_save_ifs
8433      test -z "$ac_dir" && ac_dir=.
8434      tmp_nm=$ac_dir/$lt_tmp_nm
8435      if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then
8436	# Check to see if the nm accepts a BSD-compat flag.
8437	# Adding the 'sed 1q' prevents false positives on HP-UX, which says:
8438	#   nm: unknown option "B" ignored
8439	# Tru64's nm complains that /dev/null is an invalid object file
8440	# MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty
8441	case $build_os in
8442	mingw*) lt_bad_file=conftest.nm/nofile ;;
8443	*) lt_bad_file=/dev/null ;;
8444	esac
8445	case `"$tmp_nm" -B $lt_bad_file 2>&1 | sed '1q'` in
8446	*$lt_bad_file* | *'Invalid file or object type'*)
8447	  lt_cv_path_NM="$tmp_nm -B"
8448	  break 2
8449	  ;;
8450	*)
8451	  case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
8452	  */dev/null*)
8453	    lt_cv_path_NM="$tmp_nm -p"
8454	    break 2
8455	    ;;
8456	  *)
8457	    lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
8458	    continue # so that we can try to find one that supports BSD flags
8459	    ;;
8460	  esac
8461	  ;;
8462	esac
8463      fi
8464    done
8465    IFS=$lt_save_ifs
8466  done
8467  : ${lt_cv_path_NM=no}
8468fi ;;
8469esac
8470fi
8471{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5
8472printf "%s\n" "$lt_cv_path_NM" >&6; }
8473if test no != "$lt_cv_path_NM"; then
8474  NM=$lt_cv_path_NM
8475else
8476  # Didn't find any BSD compatible name lister, look for dumpbin.
8477  if test -n "$DUMPBIN"; then :
8478    # Let the user override the test.
8479  else
8480    if test -n "$ac_tool_prefix"; then
8481  for ac_prog in dumpbin "link -dump"
8482  do
8483    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
8484set dummy $ac_tool_prefix$ac_prog; ac_word=$2
8485{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8486printf %s "checking for $ac_word... " >&6; }
8487if test ${ac_cv_prog_DUMPBIN+y}
8488then :
8489  printf %s "(cached) " >&6
8490else case e in #(
8491  e) if test -n "$DUMPBIN"; then
8492  ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
8493else
8494as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8495for as_dir in $PATH
8496do
8497  IFS=$as_save_IFS
8498  case $as_dir in #(((
8499    '') as_dir=./ ;;
8500    */) ;;
8501    *) as_dir=$as_dir/ ;;
8502  esac
8503    for ac_exec_ext in '' $ac_executable_extensions; do
8504  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
8505    ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog"
8506    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
8507    break 2
8508  fi
8509done
8510  done
8511IFS=$as_save_IFS
8512
8513fi ;;
8514esac
8515fi
8516DUMPBIN=$ac_cv_prog_DUMPBIN
8517if test -n "$DUMPBIN"; then
8518  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
8519printf "%s\n" "$DUMPBIN" >&6; }
8520else
8521  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
8522printf "%s\n" "no" >&6; }
8523fi
8524
8525
8526    test -n "$DUMPBIN" && break
8527  done
8528fi
8529if test -z "$DUMPBIN"; then
8530  ac_ct_DUMPBIN=$DUMPBIN
8531  for ac_prog in dumpbin "link -dump"
8532do
8533  # Extract the first word of "$ac_prog", so it can be a program name with args.
8534set dummy $ac_prog; ac_word=$2
8535{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8536printf %s "checking for $ac_word... " >&6; }
8537if test ${ac_cv_prog_ac_ct_DUMPBIN+y}
8538then :
8539  printf %s "(cached) " >&6
8540else case e in #(
8541  e) if test -n "$ac_ct_DUMPBIN"; then
8542  ac_cv_prog_ac_ct_DUMPBIN="$ac_ct_DUMPBIN" # Let the user override the test.
8543else
8544as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8545for as_dir in $PATH
8546do
8547  IFS=$as_save_IFS
8548  case $as_dir in #(((
8549    '') as_dir=./ ;;
8550    */) ;;
8551    *) as_dir=$as_dir/ ;;
8552  esac
8553    for ac_exec_ext in '' $ac_executable_extensions; do
8554  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
8555    ac_cv_prog_ac_ct_DUMPBIN="$ac_prog"
8556    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
8557    break 2
8558  fi
8559done
8560  done
8561IFS=$as_save_IFS
8562
8563fi ;;
8564esac
8565fi
8566ac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN
8567if test -n "$ac_ct_DUMPBIN"; then
8568  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DUMPBIN" >&5
8569printf "%s\n" "$ac_ct_DUMPBIN" >&6; }
8570else
8571  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
8572printf "%s\n" "no" >&6; }
8573fi
8574
8575
8576  test -n "$ac_ct_DUMPBIN" && break
8577done
8578
8579  if test "x$ac_ct_DUMPBIN" = x; then
8580    DUMPBIN=":"
8581  else
8582    case $cross_compiling:$ac_tool_warned in
8583yes:)
8584{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8585printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8586ac_tool_warned=yes ;;
8587esac
8588    DUMPBIN=$ac_ct_DUMPBIN
8589  fi
8590fi
8591
8592    case `$DUMPBIN -symbols -headers /dev/null 2>&1 | sed '1q'` in
8593    *COFF*)
8594      DUMPBIN="$DUMPBIN -symbols -headers"
8595      ;;
8596    *)
8597      DUMPBIN=:
8598      ;;
8599    esac
8600  fi
8601
8602  if test : != "$DUMPBIN"; then
8603    NM=$DUMPBIN
8604  fi
8605fi
8606test -z "$NM" && NM=nm
8607
8608
8609
8610
8611
8612
8613{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface" >&5
8614printf %s "checking the name lister ($NM) interface... " >&6; }
8615if test ${lt_cv_nm_interface+y}
8616then :
8617  printf %s "(cached) " >&6
8618else case e in #(
8619  e) lt_cv_nm_interface="BSD nm"
8620  echo "int some_variable = 0;" > conftest.$ac_ext
8621  (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&5)
8622  (eval "$ac_compile" 2>conftest.err)
8623  cat conftest.err >&5
8624  (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
8625  (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
8626  cat conftest.err >&5
8627  (eval echo "\"\$as_me:$LINENO: output\"" >&5)
8628  cat conftest.out >&5
8629  if $GREP 'External.*some_variable' conftest.out > /dev/null; then
8630    lt_cv_nm_interface="MS dumpbin"
8631  fi
8632  rm -f conftest* ;;
8633esac
8634fi
8635{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_nm_interface" >&5
8636printf "%s\n" "$lt_cv_nm_interface" >&6; }
8637
8638{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
8639printf %s "checking whether ln -s works... " >&6; }
8640LN_S=$as_ln_s
8641if test "$LN_S" = "ln -s"; then
8642  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8643printf "%s\n" "yes" >&6; }
8644else
8645  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
8646printf "%s\n" "no, using $LN_S" >&6; }
8647fi
8648
8649# find the maximum length of command line arguments
8650{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5
8651printf %s "checking the maximum length of command line arguments... " >&6; }
8652if test ${lt_cv_sys_max_cmd_len+y}
8653then :
8654  printf %s "(cached) " >&6
8655else case e in #(
8656  e)   i=0
8657  teststring=ABCD
8658
8659  case $build_os in
8660  msdosdjgpp*)
8661    # On DJGPP, this test can blow up pretty badly due to problems in libc
8662    # (any single argument exceeding 2000 bytes causes a buffer overrun
8663    # during glob expansion).  Even if it were fixed, the result of this
8664    # check would be larger than it should be.
8665    lt_cv_sys_max_cmd_len=12288;    # 12K is about right
8666    ;;
8667
8668  gnu*)
8669    # Under GNU Hurd, this test is not required because there is
8670    # no limit to the length of command line arguments.
8671    # Libtool will interpret -1 as no limit whatsoever
8672    lt_cv_sys_max_cmd_len=-1;
8673    ;;
8674
8675  cygwin* | mingw* | cegcc*)
8676    # On Win9x/ME, this test blows up -- it succeeds, but takes
8677    # about 5 minutes as the teststring grows exponentially.
8678    # Worse, since 9x/ME are not pre-emptively multitasking,
8679    # you end up with a "frozen" computer, even though with patience
8680    # the test eventually succeeds (with a max line length of 256k).
8681    # Instead, let's just punt: use the minimum linelength reported by
8682    # all of the supported platforms: 8192 (on NT/2K/XP).
8683    lt_cv_sys_max_cmd_len=8192;
8684    ;;
8685
8686  mint*)
8687    # On MiNT this can take a long time and run out of memory.
8688    lt_cv_sys_max_cmd_len=8192;
8689    ;;
8690
8691  amigaos*)
8692    # On AmigaOS with pdksh, this test takes hours, literally.
8693    # So we just punt and use a minimum line length of 8192.
8694    lt_cv_sys_max_cmd_len=8192;
8695    ;;
8696
8697  bitrig* | darwin* | dragonfly* | freebsd* | netbsd* | openbsd*)
8698    # This has been around since 386BSD, at least.  Likely further.
8699    if test -x /sbin/sysctl; then
8700      lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
8701    elif test -x /usr/sbin/sysctl; then
8702      lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
8703    else
8704      lt_cv_sys_max_cmd_len=65536	# usable default for all BSDs
8705    fi
8706    # And add a safety zone
8707    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
8708    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
8709    ;;
8710
8711  interix*)
8712    # We know the value 262144 and hardcode it with a safety zone (like BSD)
8713    lt_cv_sys_max_cmd_len=196608
8714    ;;
8715
8716  os2*)
8717    # The test takes a long time on OS/2.
8718    lt_cv_sys_max_cmd_len=8192
8719    ;;
8720
8721  osf*)
8722    # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
8723    # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
8724    # nice to cause kernel panics so lets avoid the loop below.
8725    # First set a reasonable default.
8726    lt_cv_sys_max_cmd_len=16384
8727    #
8728    if test -x /sbin/sysconfig; then
8729      case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
8730        *1*) lt_cv_sys_max_cmd_len=-1 ;;
8731      esac
8732    fi
8733    ;;
8734  sco3.2v5*)
8735    lt_cv_sys_max_cmd_len=102400
8736    ;;
8737  sysv5* | sco5v6* | sysv4.2uw2*)
8738    kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
8739    if test -n "$kargmax"; then
8740      lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[	 ]//'`
8741    else
8742      lt_cv_sys_max_cmd_len=32768
8743    fi
8744    ;;
8745  *)
8746    lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
8747    if test -n "$lt_cv_sys_max_cmd_len" && \
8748       test undefined != "$lt_cv_sys_max_cmd_len"; then
8749      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
8750      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
8751    else
8752      # Make teststring a little bigger before we do anything with it.
8753      # a 1K string should be a reasonable start.
8754      for i in 1 2 3 4 5 6 7 8; do
8755        teststring=$teststring$teststring
8756      done
8757      SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
8758      # If test is not a shell built-in, we'll probably end up computing a
8759      # maximum length that is only half of the actual maximum length, but
8760      # we can't tell.
8761      while { test X`env echo "$teststring$teststring" 2>/dev/null` \
8762	         = "X$teststring$teststring"; } >/dev/null 2>&1 &&
8763	      test 17 != "$i" # 1/2 MB should be enough
8764      do
8765        i=`expr $i + 1`
8766        teststring=$teststring$teststring
8767      done
8768      # Only check the string length outside the loop.
8769      lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
8770      teststring=
8771      # Add a significant safety factor because C++ compilers can tack on
8772      # massive amounts of additional arguments before passing them to the
8773      # linker.  It appears as though 1/2 is a usable value.
8774      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
8775    fi
8776    ;;
8777  esac
8778 ;;
8779esac
8780fi
8781
8782if test -n "$lt_cv_sys_max_cmd_len"; then
8783  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len" >&5
8784printf "%s\n" "$lt_cv_sys_max_cmd_len" >&6; }
8785else
8786  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none" >&5
8787printf "%s\n" "none" >&6; }
8788fi
8789max_cmd_len=$lt_cv_sys_max_cmd_len
8790
8791
8792
8793
8794
8795
8796: ${CP="cp -f"}
8797: ${MV="mv -f"}
8798: ${RM="rm -f"}
8799
8800if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
8801  lt_unset=unset
8802else
8803  lt_unset=false
8804fi
8805
8806
8807
8808
8809
8810# test EBCDIC or ASCII
8811case `echo X|tr X '\101'` in
8812 A) # ASCII based system
8813    # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
8814  lt_SP2NL='tr \040 \012'
8815  lt_NL2SP='tr \015\012 \040\040'
8816  ;;
8817 *) # EBCDIC based system
8818  lt_SP2NL='tr \100 \n'
8819  lt_NL2SP='tr \r\n \100\100'
8820  ;;
8821esac
8822
8823
8824
8825
8826
8827
8828
8829
8830
8831{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to $host format" >&5
8832printf %s "checking how to convert $build file names to $host format... " >&6; }
8833if test ${lt_cv_to_host_file_cmd+y}
8834then :
8835  printf %s "(cached) " >&6
8836else case e in #(
8837  e) case $host in
8838  *-*-mingw* )
8839    case $build in
8840      *-*-mingw* ) # actually msys
8841        lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32
8842        ;;
8843      *-*-cygwin* )
8844        lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32
8845        ;;
8846      * ) # otherwise, assume *nix
8847        lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32
8848        ;;
8849    esac
8850    ;;
8851  *-*-cygwin* )
8852    case $build in
8853      *-*-mingw* ) # actually msys
8854        lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin
8855        ;;
8856      *-*-cygwin* )
8857        lt_cv_to_host_file_cmd=func_convert_file_noop
8858        ;;
8859      * ) # otherwise, assume *nix
8860        lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin
8861        ;;
8862    esac
8863    ;;
8864  * ) # unhandled hosts (and "normal" native builds)
8865    lt_cv_to_host_file_cmd=func_convert_file_noop
8866    ;;
8867esac
8868 ;;
8869esac
8870fi
8871
8872to_host_file_cmd=$lt_cv_to_host_file_cmd
8873{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_host_file_cmd" >&5
8874printf "%s\n" "$lt_cv_to_host_file_cmd" >&6; }
8875
8876
8877
8878
8879
8880{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format" >&5
8881printf %s "checking how to convert $build file names to toolchain format... " >&6; }
8882if test ${lt_cv_to_tool_file_cmd+y}
8883then :
8884  printf %s "(cached) " >&6
8885else case e in #(
8886  e) #assume ordinary cross tools, or native build.
8887lt_cv_to_tool_file_cmd=func_convert_file_noop
8888case $host in
8889  *-*-mingw* )
8890    case $build in
8891      *-*-mingw* ) # actually msys
8892        lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32
8893        ;;
8894    esac
8895    ;;
8896esac
8897 ;;
8898esac
8899fi
8900
8901to_tool_file_cmd=$lt_cv_to_tool_file_cmd
8902{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_tool_file_cmd" >&5
8903printf "%s\n" "$lt_cv_to_tool_file_cmd" >&6; }
8904
8905
8906
8907
8908
8909{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5
8910printf %s "checking for $LD option to reload object files... " >&6; }
8911if test ${lt_cv_ld_reload_flag+y}
8912then :
8913  printf %s "(cached) " >&6
8914else case e in #(
8915  e) lt_cv_ld_reload_flag='-r' ;;
8916esac
8917fi
8918{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_reload_flag" >&5
8919printf "%s\n" "$lt_cv_ld_reload_flag" >&6; }
8920reload_flag=$lt_cv_ld_reload_flag
8921case $reload_flag in
8922"" | " "*) ;;
8923*) reload_flag=" $reload_flag" ;;
8924esac
8925reload_cmds='$LD$reload_flag -o $output$reload_objs'
8926case $host_os in
8927  cygwin* | mingw* | pw32* | cegcc*)
8928    if test yes != "$GCC"; then
8929      reload_cmds=false
8930    fi
8931    ;;
8932  darwin*)
8933    if test yes = "$GCC"; then
8934      reload_cmds='$LTCC $LTCFLAGS -nostdlib $wl-r -o $output$reload_objs'
8935    else
8936      reload_cmds='$LD$reload_flag -o $output$reload_objs'
8937    fi
8938    ;;
8939esac
8940
8941
8942
8943
8944
8945
8946
8947
8948
8949if test -n "$ac_tool_prefix"; then
8950  # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
8951set dummy ${ac_tool_prefix}objdump; ac_word=$2
8952{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8953printf %s "checking for $ac_word... " >&6; }
8954if test ${ac_cv_prog_OBJDUMP+y}
8955then :
8956  printf %s "(cached) " >&6
8957else case e in #(
8958  e) if test -n "$OBJDUMP"; then
8959  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
8960else
8961as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8962for as_dir in $PATH
8963do
8964  IFS=$as_save_IFS
8965  case $as_dir in #(((
8966    '') as_dir=./ ;;
8967    */) ;;
8968    *) as_dir=$as_dir/ ;;
8969  esac
8970    for ac_exec_ext in '' $ac_executable_extensions; do
8971  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
8972    ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
8973    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
8974    break 2
8975  fi
8976done
8977  done
8978IFS=$as_save_IFS
8979
8980fi ;;
8981esac
8982fi
8983OBJDUMP=$ac_cv_prog_OBJDUMP
8984if test -n "$OBJDUMP"; then
8985  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
8986printf "%s\n" "$OBJDUMP" >&6; }
8987else
8988  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
8989printf "%s\n" "no" >&6; }
8990fi
8991
8992
8993fi
8994if test -z "$ac_cv_prog_OBJDUMP"; then
8995  ac_ct_OBJDUMP=$OBJDUMP
8996  # Extract the first word of "objdump", so it can be a program name with args.
8997set dummy objdump; ac_word=$2
8998{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8999printf %s "checking for $ac_word... " >&6; }
9000if test ${ac_cv_prog_ac_ct_OBJDUMP+y}
9001then :
9002  printf %s "(cached) " >&6
9003else case e in #(
9004  e) if test -n "$ac_ct_OBJDUMP"; then
9005  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
9006else
9007as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9008for as_dir in $PATH
9009do
9010  IFS=$as_save_IFS
9011  case $as_dir in #(((
9012    '') as_dir=./ ;;
9013    */) ;;
9014    *) as_dir=$as_dir/ ;;
9015  esac
9016    for ac_exec_ext in '' $ac_executable_extensions; do
9017  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
9018    ac_cv_prog_ac_ct_OBJDUMP="objdump"
9019    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
9020    break 2
9021  fi
9022done
9023  done
9024IFS=$as_save_IFS
9025
9026fi ;;
9027esac
9028fi
9029ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
9030if test -n "$ac_ct_OBJDUMP"; then
9031  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
9032printf "%s\n" "$ac_ct_OBJDUMP" >&6; }
9033else
9034  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
9035printf "%s\n" "no" >&6; }
9036fi
9037
9038  if test "x$ac_ct_OBJDUMP" = x; then
9039    OBJDUMP="false"
9040  else
9041    case $cross_compiling:$ac_tool_warned in
9042yes:)
9043{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9044printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9045ac_tool_warned=yes ;;
9046esac
9047    OBJDUMP=$ac_ct_OBJDUMP
9048  fi
9049else
9050  OBJDUMP="$ac_cv_prog_OBJDUMP"
9051fi
9052
9053test -z "$OBJDUMP" && OBJDUMP=objdump
9054
9055
9056
9057
9058
9059
9060
9061
9062
9063{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries" >&5
9064printf %s "checking how to recognize dependent libraries... " >&6; }
9065if test ${lt_cv_deplibs_check_method+y}
9066then :
9067  printf %s "(cached) " >&6
9068else case e in #(
9069  e) lt_cv_file_magic_cmd='$MAGIC_CMD'
9070lt_cv_file_magic_test_file=
9071lt_cv_deplibs_check_method='unknown'
9072# Need to set the preceding variable on all platforms that support
9073# interlibrary dependencies.
9074# 'none' -- dependencies not supported.
9075# 'unknown' -- same as none, but documents that we really don't know.
9076# 'pass_all' -- all dependencies passed with no checks.
9077# 'test_compile' -- check by making test program.
9078# 'file_magic [[regex]]' -- check by looking for files in library path
9079# that responds to the $file_magic_cmd with a given extended regex.
9080# If you have 'file' or equivalent on your system and you're not sure
9081# whether 'pass_all' will *always* work, you probably want this one.
9082
9083case $host_os in
9084aix[4-9]*)
9085  lt_cv_deplibs_check_method=pass_all
9086  ;;
9087
9088beos*)
9089  lt_cv_deplibs_check_method=pass_all
9090  ;;
9091
9092bsdi[45]*)
9093  lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
9094  lt_cv_file_magic_cmd='/usr/bin/file -L'
9095  lt_cv_file_magic_test_file=/shlib/libc.so
9096  ;;
9097
9098cygwin*)
9099  # func_win32_libid is a shell function defined in ltmain.sh
9100  lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
9101  lt_cv_file_magic_cmd='func_win32_libid'
9102  ;;
9103
9104mingw* | pw32*)
9105  # Base MSYS/MinGW do not provide the 'file' command needed by
9106  # func_win32_libid shell function, so use a weaker test based on 'objdump',
9107  # unless we find 'file', for example because we are cross-compiling.
9108  if ( file / ) >/dev/null 2>&1; then
9109    lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
9110    lt_cv_file_magic_cmd='func_win32_libid'
9111  else
9112    # Keep this pattern in sync with the one in func_win32_libid.
9113    lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)'
9114    lt_cv_file_magic_cmd='$OBJDUMP -f'
9115  fi
9116  ;;
9117
9118cegcc*)
9119  # use the weaker test based on 'objdump'. See mingw*.
9120  lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
9121  lt_cv_file_magic_cmd='$OBJDUMP -f'
9122  ;;
9123
9124darwin* | rhapsody*)
9125  lt_cv_deplibs_check_method=pass_all
9126  ;;
9127
9128freebsd* | dragonfly*)
9129  if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
9130    case $host_cpu in
9131    i*86 )
9132      # Not sure whether the presence of OpenBSD here was a mistake.
9133      # Let's accept both of them until this is cleared up.
9134      lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library'
9135      lt_cv_file_magic_cmd=/usr/bin/file
9136      lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
9137      ;;
9138    esac
9139  else
9140    lt_cv_deplibs_check_method=pass_all
9141  fi
9142  ;;
9143
9144haiku*)
9145  lt_cv_deplibs_check_method=pass_all
9146  ;;
9147
9148hpux10.20* | hpux11*)
9149  lt_cv_file_magic_cmd=/usr/bin/file
9150  case $host_cpu in
9151  ia64*)
9152    lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64'
9153    lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
9154    ;;
9155  hppa*64*)
9156    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]'
9157    lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
9158    ;;
9159  *)
9160    lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9]\.[0-9]) shared library'
9161    lt_cv_file_magic_test_file=/usr/lib/libc.sl
9162    ;;
9163  esac
9164  ;;
9165
9166interix[3-9]*)
9167  # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
9168  lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$'
9169  ;;
9170
9171irix5* | irix6* | nonstopux*)
9172  case $LD in
9173  *-32|*"-32 ") libmagic=32-bit;;
9174  *-n32|*"-n32 ") libmagic=N32;;
9175  *-64|*"-64 ") libmagic=64-bit;;
9176  *) libmagic=never-match;;
9177  esac
9178  lt_cv_deplibs_check_method=pass_all
9179  ;;
9180
9181# This must be glibc/ELF.
9182linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
9183  lt_cv_deplibs_check_method=pass_all
9184  ;;
9185
9186netbsd*)
9187  if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
9188    lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
9189  else
9190    lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$'
9191  fi
9192  ;;
9193
9194newos6*)
9195  lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'
9196  lt_cv_file_magic_cmd=/usr/bin/file
9197  lt_cv_file_magic_test_file=/usr/lib/libnls.so
9198  ;;
9199
9200*nto* | *qnx*)
9201  lt_cv_deplibs_check_method=pass_all
9202  ;;
9203
9204openbsd* | bitrig*)
9205  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
9206    lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$'
9207  else
9208    lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
9209  fi
9210  ;;
9211
9212osf3* | osf4* | osf5*)
9213  lt_cv_deplibs_check_method=pass_all
9214  ;;
9215
9216rdos*)
9217  lt_cv_deplibs_check_method=pass_all
9218  ;;
9219
9220solaris*)
9221  lt_cv_deplibs_check_method=pass_all
9222  ;;
9223
9224sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
9225  lt_cv_deplibs_check_method=pass_all
9226  ;;
9227
9228sysv4 | sysv4.3*)
9229  case $host_vendor in
9230  motorola)
9231    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]'
9232    lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
9233    ;;
9234  ncr)
9235    lt_cv_deplibs_check_method=pass_all
9236    ;;
9237  sequent)
9238    lt_cv_file_magic_cmd='/bin/file'
9239    lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'
9240    ;;
9241  sni)
9242    lt_cv_file_magic_cmd='/bin/file'
9243    lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib"
9244    lt_cv_file_magic_test_file=/lib/libc.so
9245    ;;
9246  siemens)
9247    lt_cv_deplibs_check_method=pass_all
9248    ;;
9249  pc)
9250    lt_cv_deplibs_check_method=pass_all
9251    ;;
9252  esac
9253  ;;
9254
9255tpf*)
9256  lt_cv_deplibs_check_method=pass_all
9257  ;;
9258os2*)
9259  lt_cv_deplibs_check_method=pass_all
9260  ;;
9261esac
9262 ;;
9263esac
9264fi
9265{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5
9266printf "%s\n" "$lt_cv_deplibs_check_method" >&6; }
9267
9268file_magic_glob=
9269want_nocaseglob=no
9270if test "$build" = "$host"; then
9271  case $host_os in
9272  mingw* | pw32*)
9273    if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then
9274      want_nocaseglob=yes
9275    else
9276      file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[\1]\/[\1]\/g;/g"`
9277    fi
9278    ;;
9279  esac
9280fi
9281
9282file_magic_cmd=$lt_cv_file_magic_cmd
9283deplibs_check_method=$lt_cv_deplibs_check_method
9284test -z "$deplibs_check_method" && deplibs_check_method=unknown
9285
9286
9287
9288
9289
9290
9291
9292
9293
9294
9295
9296
9297
9298
9299
9300
9301
9302
9303
9304
9305
9306
9307if test -n "$ac_tool_prefix"; then
9308  # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
9309set dummy ${ac_tool_prefix}dlltool; ac_word=$2
9310{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9311printf %s "checking for $ac_word... " >&6; }
9312if test ${ac_cv_prog_DLLTOOL+y}
9313then :
9314  printf %s "(cached) " >&6
9315else case e in #(
9316  e) if test -n "$DLLTOOL"; then
9317  ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
9318else
9319as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9320for as_dir in $PATH
9321do
9322  IFS=$as_save_IFS
9323  case $as_dir in #(((
9324    '') as_dir=./ ;;
9325    */) ;;
9326    *) as_dir=$as_dir/ ;;
9327  esac
9328    for ac_exec_ext in '' $ac_executable_extensions; do
9329  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
9330    ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
9331    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
9332    break 2
9333  fi
9334done
9335  done
9336IFS=$as_save_IFS
9337
9338fi ;;
9339esac
9340fi
9341DLLTOOL=$ac_cv_prog_DLLTOOL
9342if test -n "$DLLTOOL"; then
9343  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5
9344printf "%s\n" "$DLLTOOL" >&6; }
9345else
9346  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
9347printf "%s\n" "no" >&6; }
9348fi
9349
9350
9351fi
9352if test -z "$ac_cv_prog_DLLTOOL"; then
9353  ac_ct_DLLTOOL=$DLLTOOL
9354  # Extract the first word of "dlltool", so it can be a program name with args.
9355set dummy dlltool; ac_word=$2
9356{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9357printf %s "checking for $ac_word... " >&6; }
9358if test ${ac_cv_prog_ac_ct_DLLTOOL+y}
9359then :
9360  printf %s "(cached) " >&6
9361else case e in #(
9362  e) if test -n "$ac_ct_DLLTOOL"; then
9363  ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
9364else
9365as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9366for as_dir in $PATH
9367do
9368  IFS=$as_save_IFS
9369  case $as_dir in #(((
9370    '') as_dir=./ ;;
9371    */) ;;
9372    *) as_dir=$as_dir/ ;;
9373  esac
9374    for ac_exec_ext in '' $ac_executable_extensions; do
9375  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
9376    ac_cv_prog_ac_ct_DLLTOOL="dlltool"
9377    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
9378    break 2
9379  fi
9380done
9381  done
9382IFS=$as_save_IFS
9383
9384fi ;;
9385esac
9386fi
9387ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
9388if test -n "$ac_ct_DLLTOOL"; then
9389  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5
9390printf "%s\n" "$ac_ct_DLLTOOL" >&6; }
9391else
9392  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
9393printf "%s\n" "no" >&6; }
9394fi
9395
9396  if test "x$ac_ct_DLLTOOL" = x; then
9397    DLLTOOL="false"
9398  else
9399    case $cross_compiling:$ac_tool_warned in
9400yes:)
9401{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9402printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9403ac_tool_warned=yes ;;
9404esac
9405    DLLTOOL=$ac_ct_DLLTOOL
9406  fi
9407else
9408  DLLTOOL="$ac_cv_prog_DLLTOOL"
9409fi
9410
9411test -z "$DLLTOOL" && DLLTOOL=dlltool
9412
9413
9414
9415
9416
9417
9418
9419
9420
9421
9422{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to associate runtime and link libraries" >&5
9423printf %s "checking how to associate runtime and link libraries... " >&6; }
9424if test ${lt_cv_sharedlib_from_linklib_cmd+y}
9425then :
9426  printf %s "(cached) " >&6
9427else case e in #(
9428  e) lt_cv_sharedlib_from_linklib_cmd='unknown'
9429
9430case $host_os in
9431cygwin* | mingw* | pw32* | cegcc*)
9432  # two different shell functions defined in ltmain.sh;
9433  # decide which one to use based on capabilities of $DLLTOOL
9434  case `$DLLTOOL --help 2>&1` in
9435  *--identify-strict*)
9436    lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib
9437    ;;
9438  *)
9439    lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback
9440    ;;
9441  esac
9442  ;;
9443*)
9444  # fallback: assume linklib IS sharedlib
9445  lt_cv_sharedlib_from_linklib_cmd=$ECHO
9446  ;;
9447esac
9448 ;;
9449esac
9450fi
9451{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sharedlib_from_linklib_cmd" >&5
9452printf "%s\n" "$lt_cv_sharedlib_from_linklib_cmd" >&6; }
9453sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd
9454test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO
9455
9456
9457
9458
9459
9460
9461
9462if test -n "$ac_tool_prefix"; then
9463  for ac_prog in ar
9464  do
9465    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
9466set dummy $ac_tool_prefix$ac_prog; ac_word=$2
9467{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9468printf %s "checking for $ac_word... " >&6; }
9469if test ${ac_cv_prog_AR+y}
9470then :
9471  printf %s "(cached) " >&6
9472else case e in #(
9473  e) if test -n "$AR"; then
9474  ac_cv_prog_AR="$AR" # Let the user override the test.
9475else
9476as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9477for as_dir in $PATH
9478do
9479  IFS=$as_save_IFS
9480  case $as_dir in #(((
9481    '') as_dir=./ ;;
9482    */) ;;
9483    *) as_dir=$as_dir/ ;;
9484  esac
9485    for ac_exec_ext in '' $ac_executable_extensions; do
9486  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
9487    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
9488    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
9489    break 2
9490  fi
9491done
9492  done
9493IFS=$as_save_IFS
9494
9495fi ;;
9496esac
9497fi
9498AR=$ac_cv_prog_AR
9499if test -n "$AR"; then
9500  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
9501printf "%s\n" "$AR" >&6; }
9502else
9503  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
9504printf "%s\n" "no" >&6; }
9505fi
9506
9507
9508    test -n "$AR" && break
9509  done
9510fi
9511if test -z "$AR"; then
9512  ac_ct_AR=$AR
9513  for ac_prog in ar
9514do
9515  # Extract the first word of "$ac_prog", so it can be a program name with args.
9516set dummy $ac_prog; ac_word=$2
9517{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9518printf %s "checking for $ac_word... " >&6; }
9519if test ${ac_cv_prog_ac_ct_AR+y}
9520then :
9521  printf %s "(cached) " >&6
9522else case e in #(
9523  e) if test -n "$ac_ct_AR"; then
9524  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
9525else
9526as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9527for as_dir in $PATH
9528do
9529  IFS=$as_save_IFS
9530  case $as_dir in #(((
9531    '') as_dir=./ ;;
9532    */) ;;
9533    *) as_dir=$as_dir/ ;;
9534  esac
9535    for ac_exec_ext in '' $ac_executable_extensions; do
9536  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
9537    ac_cv_prog_ac_ct_AR="$ac_prog"
9538    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
9539    break 2
9540  fi
9541done
9542  done
9543IFS=$as_save_IFS
9544
9545fi ;;
9546esac
9547fi
9548ac_ct_AR=$ac_cv_prog_ac_ct_AR
9549if test -n "$ac_ct_AR"; then
9550  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
9551printf "%s\n" "$ac_ct_AR" >&6; }
9552else
9553  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
9554printf "%s\n" "no" >&6; }
9555fi
9556
9557
9558  test -n "$ac_ct_AR" && break
9559done
9560
9561  if test "x$ac_ct_AR" = x; then
9562    AR="false"
9563  else
9564    case $cross_compiling:$ac_tool_warned in
9565yes:)
9566{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9567printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9568ac_tool_warned=yes ;;
9569esac
9570    AR=$ac_ct_AR
9571  fi
9572fi
9573
9574: ${AR=ar}
9575: ${AR_FLAGS=cru}
9576
9577
9578
9579
9580
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 case e in #(
9593  e) 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   ;;
9631esac
9632fi
9633{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5
9634printf "%s\n" "$lt_cv_ar_at_file" >&6; }
9635
9636if test no = "$lt_cv_ar_at_file"; then
9637  archiver_list_spec=
9638else
9639  archiver_list_spec=$lt_cv_ar_at_file
9640fi
9641
9642
9643
9644
9645
9646
9647
9648if test -n "$ac_tool_prefix"; then
9649  # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
9650set dummy ${ac_tool_prefix}strip; ac_word=$2
9651{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9652printf %s "checking for $ac_word... " >&6; }
9653if test ${ac_cv_prog_STRIP+y}
9654then :
9655  printf %s "(cached) " >&6
9656else case e in #(
9657  e) if test -n "$STRIP"; then
9658  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
9659else
9660as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9661for as_dir in $PATH
9662do
9663  IFS=$as_save_IFS
9664  case $as_dir in #(((
9665    '') as_dir=./ ;;
9666    */) ;;
9667    *) as_dir=$as_dir/ ;;
9668  esac
9669    for ac_exec_ext in '' $ac_executable_extensions; do
9670  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
9671    ac_cv_prog_STRIP="${ac_tool_prefix}strip"
9672    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
9673    break 2
9674  fi
9675done
9676  done
9677IFS=$as_save_IFS
9678
9679fi ;;
9680esac
9681fi
9682STRIP=$ac_cv_prog_STRIP
9683if test -n "$STRIP"; then
9684  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
9685printf "%s\n" "$STRIP" >&6; }
9686else
9687  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
9688printf "%s\n" "no" >&6; }
9689fi
9690
9691
9692fi
9693if test -z "$ac_cv_prog_STRIP"; then
9694  ac_ct_STRIP=$STRIP
9695  # Extract the first word of "strip", so it can be a program name with args.
9696set dummy strip; ac_word=$2
9697{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9698printf %s "checking for $ac_word... " >&6; }
9699if test ${ac_cv_prog_ac_ct_STRIP+y}
9700then :
9701  printf %s "(cached) " >&6
9702else case e in #(
9703  e) if test -n "$ac_ct_STRIP"; then
9704  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
9705else
9706as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9707for as_dir in $PATH
9708do
9709  IFS=$as_save_IFS
9710  case $as_dir in #(((
9711    '') as_dir=./ ;;
9712    */) ;;
9713    *) as_dir=$as_dir/ ;;
9714  esac
9715    for ac_exec_ext in '' $ac_executable_extensions; do
9716  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
9717    ac_cv_prog_ac_ct_STRIP="strip"
9718    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
9719    break 2
9720  fi
9721done
9722  done
9723IFS=$as_save_IFS
9724
9725fi ;;
9726esac
9727fi
9728ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
9729if test -n "$ac_ct_STRIP"; then
9730  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
9731printf "%s\n" "$ac_ct_STRIP" >&6; }
9732else
9733  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
9734printf "%s\n" "no" >&6; }
9735fi
9736
9737  if test "x$ac_ct_STRIP" = x; then
9738    STRIP=":"
9739  else
9740    case $cross_compiling:$ac_tool_warned in
9741yes:)
9742{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9743printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9744ac_tool_warned=yes ;;
9745esac
9746    STRIP=$ac_ct_STRIP
9747  fi
9748else
9749  STRIP="$ac_cv_prog_STRIP"
9750fi
9751
9752test -z "$STRIP" && STRIP=:
9753
9754
9755
9756
9757
9758
9759if test -n "$ac_tool_prefix"; then
9760  # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
9761set dummy ${ac_tool_prefix}ranlib; ac_word=$2
9762{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9763printf %s "checking for $ac_word... " >&6; }
9764if test ${ac_cv_prog_RANLIB+y}
9765then :
9766  printf %s "(cached) " >&6
9767else case e in #(
9768  e) if test -n "$RANLIB"; then
9769  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
9770else
9771as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9772for as_dir in $PATH
9773do
9774  IFS=$as_save_IFS
9775  case $as_dir in #(((
9776    '') as_dir=./ ;;
9777    */) ;;
9778    *) as_dir=$as_dir/ ;;
9779  esac
9780    for ac_exec_ext in '' $ac_executable_extensions; do
9781  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
9782    ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
9783    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
9784    break 2
9785  fi
9786done
9787  done
9788IFS=$as_save_IFS
9789
9790fi ;;
9791esac
9792fi
9793RANLIB=$ac_cv_prog_RANLIB
9794if test -n "$RANLIB"; then
9795  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
9796printf "%s\n" "$RANLIB" >&6; }
9797else
9798  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
9799printf "%s\n" "no" >&6; }
9800fi
9801
9802
9803fi
9804if test -z "$ac_cv_prog_RANLIB"; then
9805  ac_ct_RANLIB=$RANLIB
9806  # Extract the first word of "ranlib", so it can be a program name with args.
9807set dummy ranlib; ac_word=$2
9808{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9809printf %s "checking for $ac_word... " >&6; }
9810if test ${ac_cv_prog_ac_ct_RANLIB+y}
9811then :
9812  printf %s "(cached) " >&6
9813else case e in #(
9814  e) if test -n "$ac_ct_RANLIB"; then
9815  ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
9816else
9817as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9818for as_dir in $PATH
9819do
9820  IFS=$as_save_IFS
9821  case $as_dir in #(((
9822    '') as_dir=./ ;;
9823    */) ;;
9824    *) as_dir=$as_dir/ ;;
9825  esac
9826    for ac_exec_ext in '' $ac_executable_extensions; do
9827  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
9828    ac_cv_prog_ac_ct_RANLIB="ranlib"
9829    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
9830    break 2
9831  fi
9832done
9833  done
9834IFS=$as_save_IFS
9835
9836fi ;;
9837esac
9838fi
9839ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
9840if test -n "$ac_ct_RANLIB"; then
9841  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
9842printf "%s\n" "$ac_ct_RANLIB" >&6; }
9843else
9844  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
9845printf "%s\n" "no" >&6; }
9846fi
9847
9848  if test "x$ac_ct_RANLIB" = x; then
9849    RANLIB=":"
9850  else
9851    case $cross_compiling:$ac_tool_warned in
9852yes:)
9853{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9854printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9855ac_tool_warned=yes ;;
9856esac
9857    RANLIB=$ac_ct_RANLIB
9858  fi
9859else
9860  RANLIB="$ac_cv_prog_RANLIB"
9861fi
9862
9863test -z "$RANLIB" && RANLIB=:
9864
9865
9866
9867
9868
9869
9870# Determine commands to create old-style static archives.
9871old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
9872old_postinstall_cmds='chmod 644 $oldlib'
9873old_postuninstall_cmds=
9874
9875if test -n "$RANLIB"; then
9876  case $host_os in
9877  bitrig* | openbsd*)
9878    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib"
9879    ;;
9880  *)
9881    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib"
9882    ;;
9883  esac
9884  old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib"
9885fi
9886
9887case $host_os in
9888  darwin*)
9889    lock_old_archive_extraction=yes ;;
9890  *)
9891    lock_old_archive_extraction=no ;;
9892esac
9893
9894
9895
9896
9897
9898
9899
9900
9901
9902
9903
9904
9905
9906
9907
9908
9909
9910
9911
9912
9913
9914for ac_prog in gawk mawk nawk awk
9915do
9916  # Extract the first word of "$ac_prog", so it can be a program name with args.
9917set dummy $ac_prog; ac_word=$2
9918{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9919printf %s "checking for $ac_word... " >&6; }
9920if test ${ac_cv_prog_AWK+y}
9921then :
9922  printf %s "(cached) " >&6
9923else case e in #(
9924  e) if test -n "$AWK"; then
9925  ac_cv_prog_AWK="$AWK" # Let the user override the test.
9926else
9927as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9928for as_dir in $PATH
9929do
9930  IFS=$as_save_IFS
9931  case $as_dir in #(((
9932    '') as_dir=./ ;;
9933    */) ;;
9934    *) as_dir=$as_dir/ ;;
9935  esac
9936    for ac_exec_ext in '' $ac_executable_extensions; do
9937  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
9938    ac_cv_prog_AWK="$ac_prog"
9939    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
9940    break 2
9941  fi
9942done
9943  done
9944IFS=$as_save_IFS
9945
9946fi ;;
9947esac
9948fi
9949AWK=$ac_cv_prog_AWK
9950if test -n "$AWK"; then
9951  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
9952printf "%s\n" "$AWK" >&6; }
9953else
9954  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
9955printf "%s\n" "no" >&6; }
9956fi
9957
9958
9959  test -n "$AWK" && break
9960done
9961
9962
9963
9964
9965
9966
9967
9968
9969
9970
9971
9972
9973
9974
9975
9976
9977
9978
9979
9980# If no C compiler was specified, use CC.
9981LTCC=${LTCC-"$CC"}
9982
9983# If no C compiler flags were specified, use CFLAGS.
9984LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
9985
9986# Allow CC to be a program name with arguments.
9987compiler=$CC
9988
9989
9990# Check for command to grab the raw symbol name followed by C symbol from nm.
9991{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5
9992printf %s "checking command to parse $NM output from $compiler object... " >&6; }
9993if test ${lt_cv_sys_global_symbol_pipe+y}
9994then :
9995  printf %s "(cached) " >&6
9996else case e in #(
9997  e)
9998# These are sane defaults that work on at least a few old systems.
9999# [They come from Ultrix.  What could be older than Ultrix?!! ;)]
10000
10001# Character class describing NM global symbol codes.
10002symcode='[BCDEGRST]'
10003
10004# Regexp to match symbols that can be accessed directly from C.
10005sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
10006
10007# Define system-specific variables.
10008case $host_os in
10009aix*)
10010  symcode='[BCDT]'
10011  ;;
10012cygwin* | mingw* | pw32* | cegcc*)
10013  symcode='[ABCDGISTW]'
10014  ;;
10015hpux*)
10016  if test ia64 = "$host_cpu"; then
10017    symcode='[ABCDEGRST]'
10018  fi
10019  ;;
10020irix* | nonstopux*)
10021  symcode='[BCDEGRST]'
10022  ;;
10023osf*)
10024  symcode='[BCDEGQRST]'
10025  ;;
10026solaris*)
10027  symcode='[BDRT]'
10028  ;;
10029sco3.2v5*)
10030  symcode='[DT]'
10031  ;;
10032sysv4.2uw2*)
10033  symcode='[DT]'
10034  ;;
10035sysv5* | sco5v6* | unixware* | OpenUNIX*)
10036  symcode='[ABDT]'
10037  ;;
10038sysv4)
10039  symcode='[DFNSTU]'
10040  ;;
10041esac
10042
10043# If we're using GNU nm, then use its standard symbol codes.
10044case `$NM -V 2>&1` in
10045*GNU* | *'with BFD'*)
10046  symcode='[ABCDGIRSTW]' ;;
10047esac
10048
10049if test "$lt_cv_nm_interface" = "MS dumpbin"; then
10050  # Gets list of data symbols to import.
10051  lt_cv_sys_global_symbol_to_import="sed -n -e 's/^I .* \(.*\)$/\1/p'"
10052  # Adjust the below global symbol transforms to fixup imported variables.
10053  lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'"
10054  lt_c_name_hook=" -e 's/^I .* \(.*\)$/  {\"\1\", (void *) 0},/p'"
10055  lt_c_name_lib_hook="\
10056  -e 's/^I .* \(lib.*\)$/  {\"\1\", (void *) 0},/p'\
10057  -e 's/^I .* \(.*\)$/  {\"lib\1\", (void *) 0},/p'"
10058else
10059  # Disable hooks by default.
10060  lt_cv_sys_global_symbol_to_import=
10061  lt_cdecl_hook=
10062  lt_c_name_hook=
10063  lt_c_name_lib_hook=
10064fi
10065
10066# Transform an extracted symbol line into a proper C declaration.
10067# Some systems (esp. on ia64) link data and code symbols differently,
10068# so use this general approach.
10069lt_cv_sys_global_symbol_to_cdecl="sed -n"\
10070$lt_cdecl_hook\
10071" -e 's/^T .* \(.*\)$/extern int \1();/p'"\
10072" -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'"
10073
10074# Transform an extracted symbol line into symbol name and symbol address
10075lt_cv_sys_global_symbol_to_c_name_address="sed -n"\
10076$lt_c_name_hook\
10077" -e 's/^: \(.*\) .*$/  {\"\1\", (void *) 0},/p'"\
10078" -e 's/^$symcode$symcode* .* \(.*\)$/  {\"\1\", (void *) \&\1},/p'"
10079
10080# Transform an extracted symbol line into symbol name with lib prefix and
10081# symbol address.
10082lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n"\
10083$lt_c_name_lib_hook\
10084" -e 's/^: \(.*\) .*$/  {\"\1\", (void *) 0},/p'"\
10085" -e 's/^$symcode$symcode* .* \(lib.*\)$/  {\"\1\", (void *) \&\1},/p'"\
10086" -e 's/^$symcode$symcode* .* \(.*\)$/  {\"lib\1\", (void *) \&\1},/p'"
10087
10088# Handle CRLF in mingw tool chain
10089opt_cr=
10090case $build_os in
10091mingw*)
10092  opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
10093  ;;
10094esac
10095
10096# Try without a prefix underscore, then with it.
10097for ac_symprfx in "" "_"; do
10098
10099  # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
10100  symxfrm="\\1 $ac_symprfx\\2 \\2"
10101
10102  # Write the raw and C identifiers.
10103  if test "$lt_cv_nm_interface" = "MS dumpbin"; then
10104    # Fake it for dumpbin and say T for any non-static function,
10105    # D for any global variable and I for any imported variable.
10106    # Also find C++ and __fastcall symbols from MSVC++,
10107    # which start with @ or ?.
10108    lt_cv_sys_global_symbol_pipe="$AWK '"\
10109"     {last_section=section; section=\$ 3};"\
10110"     /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\
10111"     /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
10112"     /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\
10113"     /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\
10114"     /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\
10115"     \$ 0!~/External *\|/{next};"\
10116"     / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
10117"     {if(hide[section]) next};"\
10118"     {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\
10119"     {split(\$ 0,a,/\||\r/); split(a[2],s)};"\
10120"     s[1]~/^[@?]/{print f,s[1],s[1]; next};"\
10121"     s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\
10122"     ' prfx=^$ac_symprfx"
10123  else
10124    lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[	 ]\($symcode$symcode*\)[	 ][	 ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
10125  fi
10126  lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'"
10127
10128  # Check to see that the pipe works correctly.
10129  pipe_works=no
10130
10131  rm -f conftest*
10132  cat > conftest.$ac_ext <<_LT_EOF
10133#ifdef __cplusplus
10134extern "C" {
10135#endif
10136char nm_test_var;
10137void nm_test_func(void);
10138void nm_test_func(void){}
10139#ifdef __cplusplus
10140}
10141#endif
10142int main(){nm_test_var='a';nm_test_func();return(0);}
10143_LT_EOF
10144
10145  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
10146  (eval $ac_compile) 2>&5
10147  ac_status=$?
10148  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
10149  test $ac_status = 0; }; then
10150    # Now try to grab the symbols.
10151    nlist=conftest.nm
10152    if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist\""; } >&5
10153  (eval $NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) 2>&5
10154  ac_status=$?
10155  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
10156  test $ac_status = 0; } && test -s "$nlist"; then
10157      # Try sorting and uniquifying the output.
10158      if sort "$nlist" | uniq > "$nlist"T; then
10159	mv -f "$nlist"T "$nlist"
10160      else
10161	rm -f "$nlist"T
10162      fi
10163
10164      # Make sure that we snagged all the symbols we need.
10165      if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
10166	if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
10167	  cat <<_LT_EOF > conftest.$ac_ext
10168/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests.  */
10169#if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE
10170/* DATA imports from DLLs on WIN32 can't be const, because runtime
10171   relocations are performed -- see ld's documentation on pseudo-relocs.  */
10172# define LT_DLSYM_CONST
10173#elif defined __osf__
10174/* This system does not cope well with relocations in const data.  */
10175# define LT_DLSYM_CONST
10176#else
10177# define LT_DLSYM_CONST const
10178#endif
10179
10180#ifdef __cplusplus
10181extern "C" {
10182#endif
10183
10184_LT_EOF
10185	  # Now generate the symbol file.
10186	  eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
10187
10188	  cat <<_LT_EOF >> conftest.$ac_ext
10189
10190/* The mapping between symbol names and symbols.  */
10191LT_DLSYM_CONST struct {
10192  const char *name;
10193  void       *address;
10194}
10195lt__PROGRAM__LTX_preloaded_symbols[] =
10196{
10197  { "@PROGRAM@", (void *) 0 },
10198_LT_EOF
10199	  $SED "s/^$symcode$symcode* .* \(.*\)$/  {\"\1\", (void *) \&\1},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
10200	  cat <<\_LT_EOF >> conftest.$ac_ext
10201  {0, (void *) 0}
10202};
10203
10204/* This works around a problem in FreeBSD linker */
10205#ifdef FREEBSD_WORKAROUND
10206static const void *lt_preloaded_setup() {
10207  return lt__PROGRAM__LTX_preloaded_symbols;
10208}
10209#endif
10210
10211#ifdef __cplusplus
10212}
10213#endif
10214_LT_EOF
10215	  # Now try linking the two files.
10216	  mv conftest.$ac_objext conftstm.$ac_objext
10217	  lt_globsym_save_LIBS=$LIBS
10218	  lt_globsym_save_CFLAGS=$CFLAGS
10219	  LIBS=conftstm.$ac_objext
10220	  CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag"
10221	  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
10222  (eval $ac_link) 2>&5
10223  ac_status=$?
10224  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
10225  test $ac_status = 0; } && test -s conftest$ac_exeext; then
10226	    pipe_works=yes
10227	  fi
10228	  LIBS=$lt_globsym_save_LIBS
10229	  CFLAGS=$lt_globsym_save_CFLAGS
10230	else
10231	  echo "cannot find nm_test_func in $nlist" >&5
10232	fi
10233      else
10234	echo "cannot find nm_test_var in $nlist" >&5
10235      fi
10236    else
10237      echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5
10238    fi
10239  else
10240    echo "$progname: failed program was:" >&5
10241    cat conftest.$ac_ext >&5
10242  fi
10243  rm -rf conftest* conftst*
10244
10245  # Do not use the global_symbol_pipe unless it works.
10246  if test yes = "$pipe_works"; then
10247    break
10248  else
10249    lt_cv_sys_global_symbol_pipe=
10250  fi
10251done
10252 ;;
10253esac
10254fi
10255
10256if test -z "$lt_cv_sys_global_symbol_pipe"; then
10257  lt_cv_sys_global_symbol_to_cdecl=
10258fi
10259if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
10260  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: failed" >&5
10261printf "%s\n" "failed" >&6; }
10262else
10263  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ok" >&5
10264printf "%s\n" "ok" >&6; }
10265fi
10266
10267# Response file support.
10268if test "$lt_cv_nm_interface" = "MS dumpbin"; then
10269  nm_file_list_spec='@'
10270elif $NM --help 2>/dev/null | grep '[@]FILE' >/dev/null; then
10271  nm_file_list_spec='@'
10272fi
10273
10274
10275
10276
10277
10278
10279
10280
10281
10282
10283
10284
10285
10286
10287
10288
10289
10290
10291
10292
10293
10294
10295
10296
10297
10298
10299
10300
10301
10302
10303
10304
10305
10306
10307
10308
10309
10310{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
10311printf %s "checking for sysroot... " >&6; }
10312
10313# Check whether --with-sysroot was given.
10314if test ${with_sysroot+y}
10315then :
10316  withval=$with_sysroot;
10317else case e in #(
10318  e) with_sysroot=no ;;
10319esac
10320fi
10321
10322
10323lt_sysroot=
10324case $with_sysroot in #(
10325 yes)
10326   if test yes = "$GCC"; then
10327     lt_sysroot=`$CC --print-sysroot 2>/dev/null`
10328   fi
10329   ;; #(
10330 /*)
10331   lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"`
10332   ;; #(
10333 no|'')
10334   ;; #(
10335 *)
10336   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $with_sysroot" >&5
10337printf "%s\n" "$with_sysroot" >&6; }
10338   as_fn_error $? "The sysroot must be an absolute path." "$LINENO" 5
10339   ;;
10340esac
10341
10342 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}" >&5
10343printf "%s\n" "${lt_sysroot:-no}" >&6; }
10344
10345
10346
10347
10348
10349{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a working dd" >&5
10350printf %s "checking for a working dd... " >&6; }
10351if test ${ac_cv_path_lt_DD+y}
10352then :
10353  printf %s "(cached) " >&6
10354else case e in #(
10355  e) printf 0123456789abcdef0123456789abcdef >conftest.i
10356cat conftest.i conftest.i >conftest2.i
10357: ${lt_DD:=$DD}
10358if test -z "$lt_DD"; then
10359  ac_path_lt_DD_found=false
10360  # Loop through the user's path and test for each of PROGNAME-LIST
10361  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10362for as_dir in $PATH
10363do
10364  IFS=$as_save_IFS
10365  case $as_dir in #(((
10366    '') as_dir=./ ;;
10367    */) ;;
10368    *) as_dir=$as_dir/ ;;
10369  esac
10370    for ac_prog in dd
10371   do
10372    for ac_exec_ext in '' $ac_executable_extensions; do
10373      ac_path_lt_DD="$as_dir$ac_prog$ac_exec_ext"
10374      as_fn_executable_p "$ac_path_lt_DD" || continue
10375if "$ac_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then
10376  cmp -s conftest.i conftest.out \
10377  && ac_cv_path_lt_DD="$ac_path_lt_DD" ac_path_lt_DD_found=:
10378fi
10379      $ac_path_lt_DD_found && break 3
10380    done
10381  done
10382  done
10383IFS=$as_save_IFS
10384  if test -z "$ac_cv_path_lt_DD"; then
10385    :
10386  fi
10387else
10388  ac_cv_path_lt_DD=$lt_DD
10389fi
10390
10391rm -f conftest.i conftest2.i conftest.out ;;
10392esac
10393fi
10394{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_lt_DD" >&5
10395printf "%s\n" "$ac_cv_path_lt_DD" >&6; }
10396
10397
10398{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to truncate binary pipes" >&5
10399printf %s "checking how to truncate binary pipes... " >&6; }
10400if test ${lt_cv_truncate_bin+y}
10401then :
10402  printf %s "(cached) " >&6
10403else case e in #(
10404  e) printf 0123456789abcdef0123456789abcdef >conftest.i
10405cat conftest.i conftest.i >conftest2.i
10406lt_cv_truncate_bin=
10407if "$ac_cv_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then
10408  cmp -s conftest.i conftest.out \
10409  && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1"
10410fi
10411rm -f conftest.i conftest2.i conftest.out
10412test -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q" ;;
10413esac
10414fi
10415{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_truncate_bin" >&5
10416printf "%s\n" "$lt_cv_truncate_bin" >&6; }
10417
10418
10419
10420
10421
10422
10423
10424# Calculate cc_basename.  Skip known compiler wrappers and cross-prefix.
10425func_cc_basename ()
10426{
10427    for cc_temp in $*""; do
10428      case $cc_temp in
10429        compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
10430        distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
10431        \-*) ;;
10432        *) break;;
10433      esac
10434    done
10435    func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
10436}
10437
10438# Check whether --enable-libtool-lock was given.
10439if test ${enable_libtool_lock+y}
10440then :
10441  enableval=$enable_libtool_lock;
10442fi
10443
10444test no = "$enable_libtool_lock" || enable_libtool_lock=yes
10445
10446# Some flags need to be propagated to the compiler or linker for good
10447# libtool support.
10448case $host in
10449ia64-*-hpux*)
10450  # Find out what ABI is being produced by ac_compile, and set mode
10451  # options accordingly.
10452  echo 'int i;' > conftest.$ac_ext
10453  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
10454  (eval $ac_compile) 2>&5
10455  ac_status=$?
10456  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
10457  test $ac_status = 0; }; then
10458    case `/usr/bin/file conftest.$ac_objext` in
10459      *ELF-32*)
10460	HPUX_IA64_MODE=32
10461	;;
10462      *ELF-64*)
10463	HPUX_IA64_MODE=64
10464	;;
10465    esac
10466  fi
10467  rm -rf conftest*
10468  ;;
10469*-*-irix6*)
10470  # Find out what ABI is being produced by ac_compile, and set linker
10471  # options accordingly.
10472  echo '#line '$LINENO' "configure"' > conftest.$ac_ext
10473  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
10474  (eval $ac_compile) 2>&5
10475  ac_status=$?
10476  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
10477  test $ac_status = 0; }; then
10478    if test yes = "$lt_cv_prog_gnu_ld"; then
10479      case `/usr/bin/file conftest.$ac_objext` in
10480	*32-bit*)
10481	  LD="${LD-ld} -melf32bsmip"
10482	  ;;
10483	*N32*)
10484	  LD="${LD-ld} -melf32bmipn32"
10485	  ;;
10486	*64-bit*)
10487	  LD="${LD-ld} -melf64bmip"
10488	;;
10489      esac
10490    else
10491      case `/usr/bin/file conftest.$ac_objext` in
10492	*32-bit*)
10493	  LD="${LD-ld} -32"
10494	  ;;
10495	*N32*)
10496	  LD="${LD-ld} -n32"
10497	  ;;
10498	*64-bit*)
10499	  LD="${LD-ld} -64"
10500	  ;;
10501      esac
10502    fi
10503  fi
10504  rm -rf conftest*
10505  ;;
10506
10507mips64*-*linux*)
10508  # Find out what ABI is being produced by ac_compile, and set linker
10509  # options accordingly.
10510  echo '#line '$LINENO' "configure"' > conftest.$ac_ext
10511  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
10512  (eval $ac_compile) 2>&5
10513  ac_status=$?
10514  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
10515  test $ac_status = 0; }; then
10516    emul=elf
10517    case `/usr/bin/file conftest.$ac_objext` in
10518      *32-bit*)
10519	emul="${emul}32"
10520	;;
10521      *64-bit*)
10522	emul="${emul}64"
10523	;;
10524    esac
10525    case `/usr/bin/file conftest.$ac_objext` in
10526      *MSB*)
10527	emul="${emul}btsmip"
10528	;;
10529      *LSB*)
10530	emul="${emul}ltsmip"
10531	;;
10532    esac
10533    case `/usr/bin/file conftest.$ac_objext` in
10534      *N32*)
10535	emul="${emul}n32"
10536	;;
10537    esac
10538    LD="${LD-ld} -m $emul"
10539  fi
10540  rm -rf conftest*
10541  ;;
10542
10543x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \
10544s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
10545  # Find out what ABI is being produced by ac_compile, and set linker
10546  # options accordingly.  Note that the listed cases only cover the
10547  # situations where additional linker options are needed (such as when
10548  # doing 32-bit compilation for a host where ld defaults to 64-bit, or
10549  # vice versa); the common cases where no linker options are needed do
10550  # not appear in the list.
10551  echo 'int i;' > conftest.$ac_ext
10552  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
10553  (eval $ac_compile) 2>&5
10554  ac_status=$?
10555  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
10556  test $ac_status = 0; }; then
10557    case `/usr/bin/file conftest.o` in
10558      *32-bit*)
10559	case $host in
10560	  x86_64-*kfreebsd*-gnu)
10561	    LD="${LD-ld} -m elf_i386_fbsd"
10562	    ;;
10563	  x86_64-*linux*)
10564	    case `/usr/bin/file conftest.o` in
10565	      *x86-64*)
10566		LD="${LD-ld} -m elf32_x86_64"
10567		;;
10568	      *)
10569		LD="${LD-ld} -m elf_i386"
10570		;;
10571	    esac
10572	    ;;
10573	  powerpc64le-*linux*)
10574	    LD="${LD-ld} -m elf32lppclinux"
10575	    ;;
10576	  powerpc64-*linux*)
10577	    LD="${LD-ld} -m elf32ppclinux"
10578	    ;;
10579	  s390x-*linux*)
10580	    LD="${LD-ld} -m elf_s390"
10581	    ;;
10582	  sparc64-*linux*)
10583	    LD="${LD-ld} -m elf32_sparc"
10584	    ;;
10585	esac
10586	;;
10587      *64-bit*)
10588	case $host in
10589	  x86_64-*kfreebsd*-gnu)
10590	    LD="${LD-ld} -m elf_x86_64_fbsd"
10591	    ;;
10592	  x86_64-*linux*)
10593	    LD="${LD-ld} -m elf_x86_64"
10594	    ;;
10595	  powerpcle-*linux*)
10596	    LD="${LD-ld} -m elf64lppc"
10597	    ;;
10598	  powerpc-*linux*)
10599	    LD="${LD-ld} -m elf64ppc"
10600	    ;;
10601	  s390*-*linux*|s390*-*tpf*)
10602	    LD="${LD-ld} -m elf64_s390"
10603	    ;;
10604	  sparc*-*linux*)
10605	    LD="${LD-ld} -m elf64_sparc"
10606	    ;;
10607	esac
10608	;;
10609    esac
10610  fi
10611  rm -rf conftest*
10612  ;;
10613
10614*-*-sco3.2v5*)
10615  # On SCO OpenServer 5, we need -belf to get full-featured binaries.
10616  SAVE_CFLAGS=$CFLAGS
10617  CFLAGS="$CFLAGS -belf"
10618  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5
10619printf %s "checking whether the C compiler needs -belf... " >&6; }
10620if test ${lt_cv_cc_needs_belf+y}
10621then :
10622  printf %s "(cached) " >&6
10623else case e in #(
10624  e) ac_ext=c
10625ac_cpp='$CPP $CPPFLAGS'
10626ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
10627ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
10628ac_compiler_gnu=$ac_cv_c_compiler_gnu
10629
10630     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10631/* end confdefs.h.  */
10632
10633int
10634main (void)
10635{
10636
10637  ;
10638  return 0;
10639}
10640_ACEOF
10641if ac_fn_c_try_link "$LINENO"
10642then :
10643  lt_cv_cc_needs_belf=yes
10644else case e in #(
10645  e) lt_cv_cc_needs_belf=no ;;
10646esac
10647fi
10648rm -f core conftest.err conftest.$ac_objext conftest.beam \
10649    conftest$ac_exeext conftest.$ac_ext
10650     ac_ext=c
10651ac_cpp='$CPP $CPPFLAGS'
10652ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
10653ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
10654ac_compiler_gnu=$ac_cv_c_compiler_gnu
10655 ;;
10656esac
10657fi
10658{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5
10659printf "%s\n" "$lt_cv_cc_needs_belf" >&6; }
10660  if test yes != "$lt_cv_cc_needs_belf"; then
10661    # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
10662    CFLAGS=$SAVE_CFLAGS
10663  fi
10664  ;;
10665*-*solaris*)
10666  # Find out what ABI is being produced by ac_compile, and set linker
10667  # options accordingly.
10668  echo 'int i;' > conftest.$ac_ext
10669  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
10670  (eval $ac_compile) 2>&5
10671  ac_status=$?
10672  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
10673  test $ac_status = 0; }; then
10674    case `/usr/bin/file conftest.o` in
10675    *64-bit*)
10676      case $lt_cv_prog_gnu_ld in
10677      yes*)
10678        case $host in
10679        i?86-*-solaris*|x86_64-*-solaris*)
10680          LD="${LD-ld} -m elf_x86_64"
10681          ;;
10682        sparc*-*-solaris*)
10683          LD="${LD-ld} -m elf64_sparc"
10684          ;;
10685        esac
10686        # GNU ld 2.21 introduced _sol2 emulations.  Use them if available.
10687        if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then
10688          LD=${LD-ld}_sol2
10689        fi
10690        ;;
10691      *)
10692	if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
10693	  LD="${LD-ld} -64"
10694	fi
10695	;;
10696      esac
10697      ;;
10698    esac
10699  fi
10700  rm -rf conftest*
10701  ;;
10702esac
10703
10704need_locks=$enable_libtool_lock
10705
10706if test -n "$ac_tool_prefix"; then
10707  # Extract the first word of "${ac_tool_prefix}mt", so it can be a program name with args.
10708set dummy ${ac_tool_prefix}mt; ac_word=$2
10709{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10710printf %s "checking for $ac_word... " >&6; }
10711if test ${ac_cv_prog_MANIFEST_TOOL+y}
10712then :
10713  printf %s "(cached) " >&6
10714else case e in #(
10715  e) if test -n "$MANIFEST_TOOL"; then
10716  ac_cv_prog_MANIFEST_TOOL="$MANIFEST_TOOL" # Let the user override the test.
10717else
10718as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10719for as_dir in $PATH
10720do
10721  IFS=$as_save_IFS
10722  case $as_dir in #(((
10723    '') as_dir=./ ;;
10724    */) ;;
10725    *) as_dir=$as_dir/ ;;
10726  esac
10727    for ac_exec_ext in '' $ac_executable_extensions; do
10728  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
10729    ac_cv_prog_MANIFEST_TOOL="${ac_tool_prefix}mt"
10730    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
10731    break 2
10732  fi
10733done
10734  done
10735IFS=$as_save_IFS
10736
10737fi ;;
10738esac
10739fi
10740MANIFEST_TOOL=$ac_cv_prog_MANIFEST_TOOL
10741if test -n "$MANIFEST_TOOL"; then
10742  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MANIFEST_TOOL" >&5
10743printf "%s\n" "$MANIFEST_TOOL" >&6; }
10744else
10745  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
10746printf "%s\n" "no" >&6; }
10747fi
10748
10749
10750fi
10751if test -z "$ac_cv_prog_MANIFEST_TOOL"; then
10752  ac_ct_MANIFEST_TOOL=$MANIFEST_TOOL
10753  # Extract the first word of "mt", so it can be a program name with args.
10754set dummy mt; ac_word=$2
10755{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10756printf %s "checking for $ac_word... " >&6; }
10757if test ${ac_cv_prog_ac_ct_MANIFEST_TOOL+y}
10758then :
10759  printf %s "(cached) " >&6
10760else case e in #(
10761  e) if test -n "$ac_ct_MANIFEST_TOOL"; then
10762  ac_cv_prog_ac_ct_MANIFEST_TOOL="$ac_ct_MANIFEST_TOOL" # Let the user override the test.
10763else
10764as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10765for as_dir in $PATH
10766do
10767  IFS=$as_save_IFS
10768  case $as_dir in #(((
10769    '') as_dir=./ ;;
10770    */) ;;
10771    *) as_dir=$as_dir/ ;;
10772  esac
10773    for ac_exec_ext in '' $ac_executable_extensions; do
10774  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
10775    ac_cv_prog_ac_ct_MANIFEST_TOOL="mt"
10776    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
10777    break 2
10778  fi
10779done
10780  done
10781IFS=$as_save_IFS
10782
10783fi ;;
10784esac
10785fi
10786ac_ct_MANIFEST_TOOL=$ac_cv_prog_ac_ct_MANIFEST_TOOL
10787if test -n "$ac_ct_MANIFEST_TOOL"; then
10788  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MANIFEST_TOOL" >&5
10789printf "%s\n" "$ac_ct_MANIFEST_TOOL" >&6; }
10790else
10791  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
10792printf "%s\n" "no" >&6; }
10793fi
10794
10795  if test "x$ac_ct_MANIFEST_TOOL" = x; then
10796    MANIFEST_TOOL=":"
10797  else
10798    case $cross_compiling:$ac_tool_warned in
10799yes:)
10800{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
10801printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
10802ac_tool_warned=yes ;;
10803esac
10804    MANIFEST_TOOL=$ac_ct_MANIFEST_TOOL
10805  fi
10806else
10807  MANIFEST_TOOL="$ac_cv_prog_MANIFEST_TOOL"
10808fi
10809
10810test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt
10811{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool" >&5
10812printf %s "checking if $MANIFEST_TOOL is a manifest tool... " >&6; }
10813if test ${lt_cv_path_mainfest_tool+y}
10814then :
10815  printf %s "(cached) " >&6
10816else case e in #(
10817  e) lt_cv_path_mainfest_tool=no
10818  echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&5
10819  $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out
10820  cat conftest.err >&5
10821  if $GREP 'Manifest Tool' conftest.out > /dev/null; then
10822    lt_cv_path_mainfest_tool=yes
10823  fi
10824  rm -f conftest* ;;
10825esac
10826fi
10827{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5
10828printf "%s\n" "$lt_cv_path_mainfest_tool" >&6; }
10829if test yes != "$lt_cv_path_mainfest_tool"; then
10830  MANIFEST_TOOL=:
10831fi
10832
10833
10834
10835
10836
10837
10838  case $host_os in
10839    rhapsody* | darwin*)
10840    if test -n "$ac_tool_prefix"; then
10841  # Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args.
10842set dummy ${ac_tool_prefix}dsymutil; ac_word=$2
10843{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10844printf %s "checking for $ac_word... " >&6; }
10845if test ${ac_cv_prog_DSYMUTIL+y}
10846then :
10847  printf %s "(cached) " >&6
10848else case e in #(
10849  e) if test -n "$DSYMUTIL"; then
10850  ac_cv_prog_DSYMUTIL="$DSYMUTIL" # Let the user override the test.
10851else
10852as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10853for as_dir in $PATH
10854do
10855  IFS=$as_save_IFS
10856  case $as_dir in #(((
10857    '') as_dir=./ ;;
10858    */) ;;
10859    *) as_dir=$as_dir/ ;;
10860  esac
10861    for ac_exec_ext in '' $ac_executable_extensions; do
10862  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
10863    ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil"
10864    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
10865    break 2
10866  fi
10867done
10868  done
10869IFS=$as_save_IFS
10870
10871fi ;;
10872esac
10873fi
10874DSYMUTIL=$ac_cv_prog_DSYMUTIL
10875if test -n "$DSYMUTIL"; then
10876  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
10877printf "%s\n" "$DSYMUTIL" >&6; }
10878else
10879  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
10880printf "%s\n" "no" >&6; }
10881fi
10882
10883
10884fi
10885if test -z "$ac_cv_prog_DSYMUTIL"; then
10886  ac_ct_DSYMUTIL=$DSYMUTIL
10887  # Extract the first word of "dsymutil", so it can be a program name with args.
10888set dummy dsymutil; ac_word=$2
10889{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10890printf %s "checking for $ac_word... " >&6; }
10891if test ${ac_cv_prog_ac_ct_DSYMUTIL+y}
10892then :
10893  printf %s "(cached) " >&6
10894else case e in #(
10895  e) if test -n "$ac_ct_DSYMUTIL"; then
10896  ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # Let the user override the test.
10897else
10898as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10899for as_dir in $PATH
10900do
10901  IFS=$as_save_IFS
10902  case $as_dir in #(((
10903    '') as_dir=./ ;;
10904    */) ;;
10905    *) as_dir=$as_dir/ ;;
10906  esac
10907    for ac_exec_ext in '' $ac_executable_extensions; do
10908  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
10909    ac_cv_prog_ac_ct_DSYMUTIL="dsymutil"
10910    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
10911    break 2
10912  fi
10913done
10914  done
10915IFS=$as_save_IFS
10916
10917fi ;;
10918esac
10919fi
10920ac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL
10921if test -n "$ac_ct_DSYMUTIL"; then
10922  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DSYMUTIL" >&5
10923printf "%s\n" "$ac_ct_DSYMUTIL" >&6; }
10924else
10925  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
10926printf "%s\n" "no" >&6; }
10927fi
10928
10929  if test "x$ac_ct_DSYMUTIL" = x; then
10930    DSYMUTIL=":"
10931  else
10932    case $cross_compiling:$ac_tool_warned in
10933yes:)
10934{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
10935printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
10936ac_tool_warned=yes ;;
10937esac
10938    DSYMUTIL=$ac_ct_DSYMUTIL
10939  fi
10940else
10941  DSYMUTIL="$ac_cv_prog_DSYMUTIL"
10942fi
10943
10944    if test -n "$ac_tool_prefix"; then
10945  # Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args.
10946set dummy ${ac_tool_prefix}nmedit; ac_word=$2
10947{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10948printf %s "checking for $ac_word... " >&6; }
10949if test ${ac_cv_prog_NMEDIT+y}
10950then :
10951  printf %s "(cached) " >&6
10952else case e in #(
10953  e) if test -n "$NMEDIT"; then
10954  ac_cv_prog_NMEDIT="$NMEDIT" # Let the user override the test.
10955else
10956as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10957for as_dir in $PATH
10958do
10959  IFS=$as_save_IFS
10960  case $as_dir in #(((
10961    '') as_dir=./ ;;
10962    */) ;;
10963    *) as_dir=$as_dir/ ;;
10964  esac
10965    for ac_exec_ext in '' $ac_executable_extensions; do
10966  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
10967    ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit"
10968    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
10969    break 2
10970  fi
10971done
10972  done
10973IFS=$as_save_IFS
10974
10975fi ;;
10976esac
10977fi
10978NMEDIT=$ac_cv_prog_NMEDIT
10979if test -n "$NMEDIT"; then
10980  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $NMEDIT" >&5
10981printf "%s\n" "$NMEDIT" >&6; }
10982else
10983  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
10984printf "%s\n" "no" >&6; }
10985fi
10986
10987
10988fi
10989if test -z "$ac_cv_prog_NMEDIT"; then
10990  ac_ct_NMEDIT=$NMEDIT
10991  # Extract the first word of "nmedit", so it can be a program name with args.
10992set dummy nmedit; ac_word=$2
10993{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10994printf %s "checking for $ac_word... " >&6; }
10995if test ${ac_cv_prog_ac_ct_NMEDIT+y}
10996then :
10997  printf %s "(cached) " >&6
10998else case e in #(
10999  e) if test -n "$ac_ct_NMEDIT"; then
11000  ac_cv_prog_ac_ct_NMEDIT="$ac_ct_NMEDIT" # Let the user override the test.
11001else
11002as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11003for as_dir in $PATH
11004do
11005  IFS=$as_save_IFS
11006  case $as_dir in #(((
11007    '') as_dir=./ ;;
11008    */) ;;
11009    *) as_dir=$as_dir/ ;;
11010  esac
11011    for ac_exec_ext in '' $ac_executable_extensions; do
11012  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
11013    ac_cv_prog_ac_ct_NMEDIT="nmedit"
11014    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
11015    break 2
11016  fi
11017done
11018  done
11019IFS=$as_save_IFS
11020
11021fi ;;
11022esac
11023fi
11024ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT
11025if test -n "$ac_ct_NMEDIT"; then
11026  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NMEDIT" >&5
11027printf "%s\n" "$ac_ct_NMEDIT" >&6; }
11028else
11029  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
11030printf "%s\n" "no" >&6; }
11031fi
11032
11033  if test "x$ac_ct_NMEDIT" = x; then
11034    NMEDIT=":"
11035  else
11036    case $cross_compiling:$ac_tool_warned in
11037yes:)
11038{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
11039printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
11040ac_tool_warned=yes ;;
11041esac
11042    NMEDIT=$ac_ct_NMEDIT
11043  fi
11044else
11045  NMEDIT="$ac_cv_prog_NMEDIT"
11046fi
11047
11048    if test -n "$ac_tool_prefix"; then
11049  # Extract the first word of "${ac_tool_prefix}lipo", so it can be a program name with args.
11050set dummy ${ac_tool_prefix}lipo; ac_word=$2
11051{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11052printf %s "checking for $ac_word... " >&6; }
11053if test ${ac_cv_prog_LIPO+y}
11054then :
11055  printf %s "(cached) " >&6
11056else case e in #(
11057  e) if test -n "$LIPO"; then
11058  ac_cv_prog_LIPO="$LIPO" # Let the user override the test.
11059else
11060as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11061for as_dir in $PATH
11062do
11063  IFS=$as_save_IFS
11064  case $as_dir in #(((
11065    '') as_dir=./ ;;
11066    */) ;;
11067    *) as_dir=$as_dir/ ;;
11068  esac
11069    for ac_exec_ext in '' $ac_executable_extensions; do
11070  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
11071    ac_cv_prog_LIPO="${ac_tool_prefix}lipo"
11072    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
11073    break 2
11074  fi
11075done
11076  done
11077IFS=$as_save_IFS
11078
11079fi ;;
11080esac
11081fi
11082LIPO=$ac_cv_prog_LIPO
11083if test -n "$LIPO"; then
11084  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
11085printf "%s\n" "$LIPO" >&6; }
11086else
11087  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
11088printf "%s\n" "no" >&6; }
11089fi
11090
11091
11092fi
11093if test -z "$ac_cv_prog_LIPO"; then
11094  ac_ct_LIPO=$LIPO
11095  # Extract the first word of "lipo", so it can be a program name with args.
11096set dummy lipo; ac_word=$2
11097{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11098printf %s "checking for $ac_word... " >&6; }
11099if test ${ac_cv_prog_ac_ct_LIPO+y}
11100then :
11101  printf %s "(cached) " >&6
11102else case e in #(
11103  e) if test -n "$ac_ct_LIPO"; then
11104  ac_cv_prog_ac_ct_LIPO="$ac_ct_LIPO" # Let the user override the test.
11105else
11106as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11107for as_dir in $PATH
11108do
11109  IFS=$as_save_IFS
11110  case $as_dir in #(((
11111    '') as_dir=./ ;;
11112    */) ;;
11113    *) as_dir=$as_dir/ ;;
11114  esac
11115    for ac_exec_ext in '' $ac_executable_extensions; do
11116  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
11117    ac_cv_prog_ac_ct_LIPO="lipo"
11118    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
11119    break 2
11120  fi
11121done
11122  done
11123IFS=$as_save_IFS
11124
11125fi ;;
11126esac
11127fi
11128ac_ct_LIPO=$ac_cv_prog_ac_ct_LIPO
11129if test -n "$ac_ct_LIPO"; then
11130  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LIPO" >&5
11131printf "%s\n" "$ac_ct_LIPO" >&6; }
11132else
11133  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
11134printf "%s\n" "no" >&6; }
11135fi
11136
11137  if test "x$ac_ct_LIPO" = x; then
11138    LIPO=":"
11139  else
11140    case $cross_compiling:$ac_tool_warned in
11141yes:)
11142{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
11143printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
11144ac_tool_warned=yes ;;
11145esac
11146    LIPO=$ac_ct_LIPO
11147  fi
11148else
11149  LIPO="$ac_cv_prog_LIPO"
11150fi
11151
11152    if test -n "$ac_tool_prefix"; then
11153  # Extract the first word of "${ac_tool_prefix}otool", so it can be a program name with args.
11154set dummy ${ac_tool_prefix}otool; ac_word=$2
11155{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11156printf %s "checking for $ac_word... " >&6; }
11157if test ${ac_cv_prog_OTOOL+y}
11158then :
11159  printf %s "(cached) " >&6
11160else case e in #(
11161  e) if test -n "$OTOOL"; then
11162  ac_cv_prog_OTOOL="$OTOOL" # Let the user override the test.
11163else
11164as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11165for as_dir in $PATH
11166do
11167  IFS=$as_save_IFS
11168  case $as_dir in #(((
11169    '') as_dir=./ ;;
11170    */) ;;
11171    *) as_dir=$as_dir/ ;;
11172  esac
11173    for ac_exec_ext in '' $ac_executable_extensions; do
11174  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
11175    ac_cv_prog_OTOOL="${ac_tool_prefix}otool"
11176    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
11177    break 2
11178  fi
11179done
11180  done
11181IFS=$as_save_IFS
11182
11183fi ;;
11184esac
11185fi
11186OTOOL=$ac_cv_prog_OTOOL
11187if test -n "$OTOOL"; then
11188  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
11189printf "%s\n" "$OTOOL" >&6; }
11190else
11191  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
11192printf "%s\n" "no" >&6; }
11193fi
11194
11195
11196fi
11197if test -z "$ac_cv_prog_OTOOL"; then
11198  ac_ct_OTOOL=$OTOOL
11199  # Extract the first word of "otool", so it can be a program name with args.
11200set dummy otool; ac_word=$2
11201{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11202printf %s "checking for $ac_word... " >&6; }
11203if test ${ac_cv_prog_ac_ct_OTOOL+y}
11204then :
11205  printf %s "(cached) " >&6
11206else case e in #(
11207  e) if test -n "$ac_ct_OTOOL"; then
11208  ac_cv_prog_ac_ct_OTOOL="$ac_ct_OTOOL" # Let the user override the test.
11209else
11210as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11211for as_dir in $PATH
11212do
11213  IFS=$as_save_IFS
11214  case $as_dir in #(((
11215    '') as_dir=./ ;;
11216    */) ;;
11217    *) as_dir=$as_dir/ ;;
11218  esac
11219    for ac_exec_ext in '' $ac_executable_extensions; do
11220  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
11221    ac_cv_prog_ac_ct_OTOOL="otool"
11222    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
11223    break 2
11224  fi
11225done
11226  done
11227IFS=$as_save_IFS
11228
11229fi ;;
11230esac
11231fi
11232ac_ct_OTOOL=$ac_cv_prog_ac_ct_OTOOL
11233if test -n "$ac_ct_OTOOL"; then
11234  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL" >&5
11235printf "%s\n" "$ac_ct_OTOOL" >&6; }
11236else
11237  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
11238printf "%s\n" "no" >&6; }
11239fi
11240
11241  if test "x$ac_ct_OTOOL" = x; then
11242    OTOOL=":"
11243  else
11244    case $cross_compiling:$ac_tool_warned in
11245yes:)
11246{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
11247printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
11248ac_tool_warned=yes ;;
11249esac
11250    OTOOL=$ac_ct_OTOOL
11251  fi
11252else
11253  OTOOL="$ac_cv_prog_OTOOL"
11254fi
11255
11256    if test -n "$ac_tool_prefix"; then
11257  # Extract the first word of "${ac_tool_prefix}otool64", so it can be a program name with args.
11258set dummy ${ac_tool_prefix}otool64; ac_word=$2
11259{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11260printf %s "checking for $ac_word... " >&6; }
11261if test ${ac_cv_prog_OTOOL64+y}
11262then :
11263  printf %s "(cached) " >&6
11264else case e in #(
11265  e) if test -n "$OTOOL64"; then
11266  ac_cv_prog_OTOOL64="$OTOOL64" # Let the user override the test.
11267else
11268as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11269for as_dir in $PATH
11270do
11271  IFS=$as_save_IFS
11272  case $as_dir in #(((
11273    '') as_dir=./ ;;
11274    */) ;;
11275    *) as_dir=$as_dir/ ;;
11276  esac
11277    for ac_exec_ext in '' $ac_executable_extensions; do
11278  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
11279    ac_cv_prog_OTOOL64="${ac_tool_prefix}otool64"
11280    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
11281    break 2
11282  fi
11283done
11284  done
11285IFS=$as_save_IFS
11286
11287fi ;;
11288esac
11289fi
11290OTOOL64=$ac_cv_prog_OTOOL64
11291if test -n "$OTOOL64"; then
11292  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $OTOOL64" >&5
11293printf "%s\n" "$OTOOL64" >&6; }
11294else
11295  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
11296printf "%s\n" "no" >&6; }
11297fi
11298
11299
11300fi
11301if test -z "$ac_cv_prog_OTOOL64"; then
11302  ac_ct_OTOOL64=$OTOOL64
11303  # Extract the first word of "otool64", so it can be a program name with args.
11304set dummy otool64; ac_word=$2
11305{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11306printf %s "checking for $ac_word... " >&6; }
11307if test ${ac_cv_prog_ac_ct_OTOOL64+y}
11308then :
11309  printf %s "(cached) " >&6
11310else case e in #(
11311  e) if test -n "$ac_ct_OTOOL64"; then
11312  ac_cv_prog_ac_ct_OTOOL64="$ac_ct_OTOOL64" # Let the user override the test.
11313else
11314as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11315for as_dir in $PATH
11316do
11317  IFS=$as_save_IFS
11318  case $as_dir in #(((
11319    '') as_dir=./ ;;
11320    */) ;;
11321    *) as_dir=$as_dir/ ;;
11322  esac
11323    for ac_exec_ext in '' $ac_executable_extensions; do
11324  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
11325    ac_cv_prog_ac_ct_OTOOL64="otool64"
11326    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
11327    break 2
11328  fi
11329done
11330  done
11331IFS=$as_save_IFS
11332
11333fi ;;
11334esac
11335fi
11336ac_ct_OTOOL64=$ac_cv_prog_ac_ct_OTOOL64
11337if test -n "$ac_ct_OTOOL64"; then
11338  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL64" >&5
11339printf "%s\n" "$ac_ct_OTOOL64" >&6; }
11340else
11341  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
11342printf "%s\n" "no" >&6; }
11343fi
11344
11345  if test "x$ac_ct_OTOOL64" = x; then
11346    OTOOL64=":"
11347  else
11348    case $cross_compiling:$ac_tool_warned in
11349yes:)
11350{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
11351printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
11352ac_tool_warned=yes ;;
11353esac
11354    OTOOL64=$ac_ct_OTOOL64
11355  fi
11356else
11357  OTOOL64="$ac_cv_prog_OTOOL64"
11358fi
11359
11360
11361
11362
11363
11364
11365
11366
11367
11368
11369
11370
11371
11372
11373
11374
11375
11376
11377
11378
11379
11380
11381
11382
11383
11384
11385
11386    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for -single_module linker flag" >&5
11387printf %s "checking for -single_module linker flag... " >&6; }
11388if test ${lt_cv_apple_cc_single_mod+y}
11389then :
11390  printf %s "(cached) " >&6
11391else case e in #(
11392  e) lt_cv_apple_cc_single_mod=no
11393      if test -z "$LT_MULTI_MODULE"; then
11394	# By default we will add the -single_module flag. You can override
11395	# by either setting the environment variable LT_MULTI_MODULE
11396	# non-empty at configure time, or by adding -multi_module to the
11397	# link flags.
11398	rm -rf libconftest.dylib*
11399	echo "int foo(void){return 1;}" > conftest.c
11400	echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
11401-dynamiclib -Wl,-single_module conftest.c" >&5
11402	$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
11403	  -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
11404        _lt_result=$?
11405	# If there is a non-empty error log, and "single_module"
11406	# appears in it, assume the flag caused a linker warning
11407        if test -s conftest.err && $GREP single_module conftest.err; then
11408	  cat conftest.err >&5
11409	# Otherwise, if the output was created with a 0 exit code from
11410	# the compiler, it worked.
11411	elif test -f libconftest.dylib && test 0 = "$_lt_result"; then
11412	  lt_cv_apple_cc_single_mod=yes
11413	else
11414	  cat conftest.err >&5
11415	fi
11416	rm -rf libconftest.dylib*
11417	rm -f conftest.*
11418      fi ;;
11419esac
11420fi
11421{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5
11422printf "%s\n" "$lt_cv_apple_cc_single_mod" >&6; }
11423
11424    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5
11425printf %s "checking for -exported_symbols_list linker flag... " >&6; }
11426if test ${lt_cv_ld_exported_symbols_list+y}
11427then :
11428  printf %s "(cached) " >&6
11429else case e in #(
11430  e) lt_cv_ld_exported_symbols_list=no
11431      save_LDFLAGS=$LDFLAGS
11432      echo "_main" > conftest.sym
11433      LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
11434      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11435/* end confdefs.h.  */
11436
11437int
11438main (void)
11439{
11440
11441  ;
11442  return 0;
11443}
11444_ACEOF
11445if ac_fn_c_try_link "$LINENO"
11446then :
11447  lt_cv_ld_exported_symbols_list=yes
11448else case e in #(
11449  e) lt_cv_ld_exported_symbols_list=no ;;
11450esac
11451fi
11452rm -f core conftest.err conftest.$ac_objext conftest.beam \
11453    conftest$ac_exeext conftest.$ac_ext
11454	LDFLAGS=$save_LDFLAGS
11455     ;;
11456esac
11457fi
11458{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5
11459printf "%s\n" "$lt_cv_ld_exported_symbols_list" >&6; }
11460
11461    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for -force_load linker flag" >&5
11462printf %s "checking for -force_load linker flag... " >&6; }
11463if test ${lt_cv_ld_force_load+y}
11464then :
11465  printf %s "(cached) " >&6
11466else case e in #(
11467  e) lt_cv_ld_force_load=no
11468      cat > conftest.c << _LT_EOF
11469int forced_loaded() { return 2;}
11470_LT_EOF
11471      echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&5
11472      $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5
11473      echo "$AR cru libconftest.a conftest.o" >&5
11474      $AR cru libconftest.a conftest.o 2>&5
11475      echo "$RANLIB libconftest.a" >&5
11476      $RANLIB libconftest.a 2>&5
11477      cat > conftest.c << _LT_EOF
11478int main() { return 0;}
11479_LT_EOF
11480      echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&5
11481      $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err
11482      _lt_result=$?
11483      if test -s conftest.err && $GREP force_load conftest.err; then
11484	cat conftest.err >&5
11485      elif test -f conftest && test 0 = "$_lt_result" && $GREP forced_load conftest >/dev/null 2>&1; then
11486	lt_cv_ld_force_load=yes
11487      else
11488	cat conftest.err >&5
11489      fi
11490        rm -f conftest.err libconftest.a conftest conftest.c
11491        rm -rf conftest.dSYM
11492     ;;
11493esac
11494fi
11495{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_force_load" >&5
11496printf "%s\n" "$lt_cv_ld_force_load" >&6; }
11497    case $host_os in
11498    rhapsody* | darwin1.[012])
11499      _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;;
11500    darwin1.*)
11501      _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
11502    darwin*) # darwin 5.x on
11503      # if running on 10.5 or later, the deployment target defaults
11504      # to the OS version, if on x86, and 10.4, the deployment
11505      # target defaults to 10.4. Don't you love it?
11506      case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
11507	10.0,*86*-darwin8*|10.0,*-darwin[91]*)
11508	  _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
11509	10.[012][,.]*)
11510	  _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
11511	10.*)
11512	  _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
11513      esac
11514    ;;
11515  esac
11516    if test yes = "$lt_cv_apple_cc_single_mod"; then
11517      _lt_dar_single_mod='$single_module'
11518    fi
11519    if test yes = "$lt_cv_ld_exported_symbols_list"; then
11520      _lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym'
11521    else
11522      _lt_dar_export_syms='~$NMEDIT -s $output_objdir/$libname-symbols.expsym $lib'
11523    fi
11524    if test : != "$DSYMUTIL" && test no = "$lt_cv_ld_force_load"; then
11525      _lt_dsymutil='~$DSYMUTIL $lib || :'
11526    else
11527      _lt_dsymutil=
11528    fi
11529    ;;
11530  esac
11531
11532# func_munge_path_list VARIABLE PATH
11533# -----------------------------------
11534# VARIABLE is name of variable containing _space_ separated list of
11535# directories to be munged by the contents of PATH, which is string
11536# having a format:
11537# "DIR[:DIR]:"
11538#       string "DIR[ DIR]" will be prepended to VARIABLE
11539# ":DIR[:DIR]"
11540#       string "DIR[ DIR]" will be appended to VARIABLE
11541# "DIRP[:DIRP]::[DIRA:]DIRA"
11542#       string "DIRP[ DIRP]" will be prepended to VARIABLE and string
11543#       "DIRA[ DIRA]" will be appended to VARIABLE
11544# "DIR[:DIR]"
11545#       VARIABLE will be replaced by "DIR[ DIR]"
11546func_munge_path_list ()
11547{
11548    case x$2 in
11549    x)
11550        ;;
11551    *:)
11552        eval $1=\"`$ECHO $2 | $SED 's/:/ /g'` \$$1\"
11553        ;;
11554    x:*)
11555        eval $1=\"\$$1 `$ECHO $2 | $SED 's/:/ /g'`\"
11556        ;;
11557    *::*)
11558        eval $1=\"\$$1\ `$ECHO $2 | $SED -e 's/.*:://' -e 's/:/ /g'`\"
11559        eval $1=\"`$ECHO $2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \$$1\"
11560        ;;
11561    *)
11562        eval $1=\"`$ECHO $2 | $SED 's/:/ /g'`\"
11563        ;;
11564    esac
11565}
11566
11567ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default
11568"
11569if test "x$ac_cv_header_dlfcn_h" = xyes
11570then :
11571  printf "%s\n" "#define HAVE_DLFCN_H 1" >>confdefs.h
11572
11573fi
11574
11575
11576
11577
11578
11579
11580
11581# Set options
11582
11583
11584
11585        enable_dlopen=no
11586
11587
11588  enable_win32_dll=no
11589
11590
11591            # Check whether --enable-shared was given.
11592if test ${enable_shared+y}
11593then :
11594  enableval=$enable_shared; p=${PACKAGE-default}
11595    case $enableval in
11596    yes) enable_shared=yes ;;
11597    no) enable_shared=no ;;
11598    *)
11599      enable_shared=no
11600      # Look at the argument we got.  We use all the common list separators.
11601      lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
11602      for pkg in $enableval; do
11603	IFS=$lt_save_ifs
11604	if test "X$pkg" = "X$p"; then
11605	  enable_shared=yes
11606	fi
11607      done
11608      IFS=$lt_save_ifs
11609      ;;
11610    esac
11611else case e in #(
11612  e) enable_shared=yes ;;
11613esac
11614fi
11615
11616
11617
11618
11619
11620
11621
11622
11623
11624  # Check whether --enable-static was given.
11625if test ${enable_static+y}
11626then :
11627  enableval=$enable_static; p=${PACKAGE-default}
11628    case $enableval in
11629    yes) enable_static=yes ;;
11630    no) enable_static=no ;;
11631    *)
11632     enable_static=no
11633      # Look at the argument we got.  We use all the common list separators.
11634      lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
11635      for pkg in $enableval; do
11636	IFS=$lt_save_ifs
11637	if test "X$pkg" = "X$p"; then
11638	  enable_static=yes
11639	fi
11640      done
11641      IFS=$lt_save_ifs
11642      ;;
11643    esac
11644else case e in #(
11645  e) enable_static=yes ;;
11646esac
11647fi
11648
11649
11650
11651
11652
11653
11654
11655
11656
11657
11658# Check whether --with-pic was given.
11659if test ${with_pic+y}
11660then :
11661  withval=$with_pic; lt_p=${PACKAGE-default}
11662    case $withval in
11663    yes|no) pic_mode=$withval ;;
11664    *)
11665      pic_mode=default
11666      # Look at the argument we got.  We use all the common list separators.
11667      lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
11668      for lt_pkg in $withval; do
11669	IFS=$lt_save_ifs
11670	if test "X$lt_pkg" = "X$lt_p"; then
11671	  pic_mode=yes
11672	fi
11673      done
11674      IFS=$lt_save_ifs
11675      ;;
11676    esac
11677else case e in #(
11678  e) pic_mode=default ;;
11679esac
11680fi
11681
11682
11683
11684
11685
11686
11687
11688
11689  # Check whether --enable-fast-install was given.
11690if test ${enable_fast_install+y}
11691then :
11692  enableval=$enable_fast_install; p=${PACKAGE-default}
11693    case $enableval in
11694    yes) enable_fast_install=yes ;;
11695    no) enable_fast_install=no ;;
11696    *)
11697      enable_fast_install=no
11698      # Look at the argument we got.  We use all the common list separators.
11699      lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
11700      for pkg in $enableval; do
11701	IFS=$lt_save_ifs
11702	if test "X$pkg" = "X$p"; then
11703	  enable_fast_install=yes
11704	fi
11705      done
11706      IFS=$lt_save_ifs
11707      ;;
11708    esac
11709else case e in #(
11710  e) enable_fast_install=yes ;;
11711esac
11712fi
11713
11714
11715
11716
11717
11718
11719
11720
11721  shared_archive_member_spec=
11722case $host,$enable_shared in
11723power*-*-aix[5-9]*,yes)
11724  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking which variant of shared library versioning to provide" >&5
11725printf %s "checking which variant of shared library versioning to provide... " >&6; }
11726
11727# Check whether --with-aix-soname was given.
11728if test ${with_aix_soname+y}
11729then :
11730  withval=$with_aix_soname; case $withval in
11731    aix|svr4|both)
11732      ;;
11733    *)
11734      as_fn_error $? "Unknown argument to --with-aix-soname" "$LINENO" 5
11735      ;;
11736    esac
11737    lt_cv_with_aix_soname=$with_aix_soname
11738else case e in #(
11739  e) if test ${lt_cv_with_aix_soname+y}
11740then :
11741  printf %s "(cached) " >&6
11742else case e in #(
11743  e) lt_cv_with_aix_soname=aix ;;
11744esac
11745fi
11746
11747    with_aix_soname=$lt_cv_with_aix_soname ;;
11748esac
11749fi
11750
11751  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $with_aix_soname" >&5
11752printf "%s\n" "$with_aix_soname" >&6; }
11753  if test aix != "$with_aix_soname"; then
11754    # For the AIX way of multilib, we name the shared archive member
11755    # based on the bitwidth used, traditionally 'shr.o' or 'shr_64.o',
11756    # and 'shr.imp' or 'shr_64.imp', respectively, for the Import File.
11757    # Even when GNU compilers ignore OBJECT_MODE but need '-maix64' flag,
11758    # the AIX toolchain works better with OBJECT_MODE set (default 32).
11759    if test 64 = "${OBJECT_MODE-32}"; then
11760      shared_archive_member_spec=shr_64
11761    else
11762      shared_archive_member_spec=shr
11763    fi
11764  fi
11765  ;;
11766*)
11767  with_aix_soname=aix
11768  ;;
11769esac
11770
11771
11772
11773
11774
11775
11776
11777
11778
11779
11780# This can be used to rebuild libtool when needed
11781LIBTOOL_DEPS=$ltmain
11782
11783# Always use our own libtool.
11784LIBTOOL='$(SHELL) $(top_builddir)/libtool'
11785
11786
11787
11788
11789
11790
11791
11792
11793
11794
11795
11796
11797
11798
11799
11800
11801
11802
11803
11804
11805
11806
11807
11808
11809
11810
11811
11812
11813
11814
11815test -z "$LN_S" && LN_S="ln -s"
11816
11817
11818
11819
11820
11821
11822
11823
11824
11825
11826
11827
11828
11829
11830if test -n "${ZSH_VERSION+set}"; then
11831   setopt NO_GLOB_SUBST
11832fi
11833
11834{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5
11835printf %s "checking for objdir... " >&6; }
11836if test ${lt_cv_objdir+y}
11837then :
11838  printf %s "(cached) " >&6
11839else case e in #(
11840  e) rm -f .libs 2>/dev/null
11841mkdir .libs 2>/dev/null
11842if test -d .libs; then
11843  lt_cv_objdir=.libs
11844else
11845  # MS-DOS does not allow filenames that begin with a dot.
11846  lt_cv_objdir=_libs
11847fi
11848rmdir .libs 2>/dev/null ;;
11849esac
11850fi
11851{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_objdir" >&5
11852printf "%s\n" "$lt_cv_objdir" >&6; }
11853objdir=$lt_cv_objdir
11854
11855
11856
11857
11858
11859printf "%s\n" "#define LT_OBJDIR \"$lt_cv_objdir/\"" >>confdefs.h
11860
11861
11862
11863
11864case $host_os in
11865aix3*)
11866  # AIX sometimes has problems with the GCC collect2 program.  For some
11867  # reason, if we set the COLLECT_NAMES environment variable, the problems
11868  # vanish in a puff of smoke.
11869  if test set != "${COLLECT_NAMES+set}"; then
11870    COLLECT_NAMES=
11871    export COLLECT_NAMES
11872  fi
11873  ;;
11874esac
11875
11876# Global variables:
11877ofile=libtool
11878can_build_shared=yes
11879
11880# All known linkers require a '.a' archive for static linking (except MSVC,
11881# which needs '.lib').
11882libext=a
11883
11884with_gnu_ld=$lt_cv_prog_gnu_ld
11885
11886old_CC=$CC
11887old_CFLAGS=$CFLAGS
11888
11889# Set sane defaults for various variables
11890test -z "$CC" && CC=cc
11891test -z "$LTCC" && LTCC=$CC
11892test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
11893test -z "$LD" && LD=ld
11894test -z "$ac_objext" && ac_objext=o
11895
11896func_cc_basename $compiler
11897cc_basename=$func_cc_basename_result
11898
11899
11900# Only perform the check for file, if the check method requires it
11901test -z "$MAGIC_CMD" && MAGIC_CMD=file
11902case $deplibs_check_method in
11903file_magic*)
11904  if test "$file_magic_cmd" = '$MAGIC_CMD'; then
11905    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5
11906printf %s "checking for ${ac_tool_prefix}file... " >&6; }
11907if test ${lt_cv_path_MAGIC_CMD+y}
11908then :
11909  printf %s "(cached) " >&6
11910else case e in #(
11911  e) case $MAGIC_CMD in
11912[\\/*] |  ?:[\\/]*)
11913  lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path.
11914  ;;
11915*)
11916  lt_save_MAGIC_CMD=$MAGIC_CMD
11917  lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
11918  ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
11919  for ac_dir in $ac_dummy; do
11920    IFS=$lt_save_ifs
11921    test -z "$ac_dir" && ac_dir=.
11922    if test -f "$ac_dir/${ac_tool_prefix}file"; then
11923      lt_cv_path_MAGIC_CMD=$ac_dir/"${ac_tool_prefix}file"
11924      if test -n "$file_magic_test_file"; then
11925	case $deplibs_check_method in
11926	"file_magic "*)
11927	  file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
11928	  MAGIC_CMD=$lt_cv_path_MAGIC_CMD
11929	  if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
11930	    $EGREP "$file_magic_regex" > /dev/null; then
11931	    :
11932	  else
11933	    cat <<_LT_EOF 1>&2
11934
11935*** Warning: the command libtool uses to detect shared libraries,
11936*** $file_magic_cmd, produces output that libtool cannot recognize.
11937*** The result is that libtool may fail to recognize shared libraries
11938*** as such.  This will affect the creation of libtool libraries that
11939*** depend on shared libraries, but programs linked with such libtool
11940*** libraries will work regardless of this problem.  Nevertheless, you
11941*** may want to report the problem to your system manager and/or to
11942*** bug-libtool@gnu.org
11943
11944_LT_EOF
11945	  fi ;;
11946	esac
11947      fi
11948      break
11949    fi
11950  done
11951  IFS=$lt_save_ifs
11952  MAGIC_CMD=$lt_save_MAGIC_CMD
11953  ;;
11954esac ;;
11955esac
11956fi
11957
11958MAGIC_CMD=$lt_cv_path_MAGIC_CMD
11959if test -n "$MAGIC_CMD"; then
11960  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5
11961printf "%s\n" "$MAGIC_CMD" >&6; }
11962else
11963  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
11964printf "%s\n" "no" >&6; }
11965fi
11966
11967
11968
11969
11970
11971if test -z "$lt_cv_path_MAGIC_CMD"; then
11972  if test -n "$ac_tool_prefix"; then
11973    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for file" >&5
11974printf %s "checking for file... " >&6; }
11975if test ${lt_cv_path_MAGIC_CMD+y}
11976then :
11977  printf %s "(cached) " >&6
11978else case e in #(
11979  e) case $MAGIC_CMD in
11980[\\/*] |  ?:[\\/]*)
11981  lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path.
11982  ;;
11983*)
11984  lt_save_MAGIC_CMD=$MAGIC_CMD
11985  lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
11986  ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
11987  for ac_dir in $ac_dummy; do
11988    IFS=$lt_save_ifs
11989    test -z "$ac_dir" && ac_dir=.
11990    if test -f "$ac_dir/file"; then
11991      lt_cv_path_MAGIC_CMD=$ac_dir/"file"
11992      if test -n "$file_magic_test_file"; then
11993	case $deplibs_check_method in
11994	"file_magic "*)
11995	  file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
11996	  MAGIC_CMD=$lt_cv_path_MAGIC_CMD
11997	  if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
11998	    $EGREP "$file_magic_regex" > /dev/null; then
11999	    :
12000	  else
12001	    cat <<_LT_EOF 1>&2
12002
12003*** Warning: the command libtool uses to detect shared libraries,
12004*** $file_magic_cmd, produces output that libtool cannot recognize.
12005*** The result is that libtool may fail to recognize shared libraries
12006*** as such.  This will affect the creation of libtool libraries that
12007*** depend on shared libraries, but programs linked with such libtool
12008*** libraries will work regardless of this problem.  Nevertheless, you
12009*** may want to report the problem to your system manager and/or to
12010*** bug-libtool@gnu.org
12011
12012_LT_EOF
12013	  fi ;;
12014	esac
12015      fi
12016      break
12017    fi
12018  done
12019  IFS=$lt_save_ifs
12020  MAGIC_CMD=$lt_save_MAGIC_CMD
12021  ;;
12022esac ;;
12023esac
12024fi
12025
12026MAGIC_CMD=$lt_cv_path_MAGIC_CMD
12027if test -n "$MAGIC_CMD"; then
12028  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5
12029printf "%s\n" "$MAGIC_CMD" >&6; }
12030else
12031  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
12032printf "%s\n" "no" >&6; }
12033fi
12034
12035
12036  else
12037    MAGIC_CMD=:
12038  fi
12039fi
12040
12041  fi
12042  ;;
12043esac
12044
12045# Use C for the default configuration in the libtool script
12046
12047lt_save_CC=$CC
12048ac_ext=c
12049ac_cpp='$CPP $CPPFLAGS'
12050ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
12051ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
12052ac_compiler_gnu=$ac_cv_c_compiler_gnu
12053
12054
12055# Source file extension for C test sources.
12056ac_ext=c
12057
12058# Object file extension for compiled C test sources.
12059objext=o
12060objext=$objext
12061
12062# Code to be used in simple compile tests
12063lt_simple_compile_test_code="int some_variable = 0;"
12064
12065# Code to be used in simple link tests
12066lt_simple_link_test_code='int main(){return(0);}'
12067
12068
12069
12070
12071
12072
12073
12074# If no C compiler was specified, use CC.
12075LTCC=${LTCC-"$CC"}
12076
12077# If no C compiler flags were specified, use CFLAGS.
12078LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
12079
12080# Allow CC to be a program name with arguments.
12081compiler=$CC
12082
12083# Save the default compiler, since it gets overwritten when the other
12084# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
12085compiler_DEFAULT=$CC
12086
12087# save warnings/boilerplate of simple test code
12088ac_outfile=conftest.$ac_objext
12089echo "$lt_simple_compile_test_code" >conftest.$ac_ext
12090eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
12091_lt_compiler_boilerplate=`cat conftest.err`
12092$RM conftest*
12093
12094ac_outfile=conftest.$ac_objext
12095echo "$lt_simple_link_test_code" >conftest.$ac_ext
12096eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
12097_lt_linker_boilerplate=`cat conftest.err`
12098$RM -r conftest*
12099
12100
12101if test -n "$compiler"; then
12102
12103lt_prog_compiler_no_builtin_flag=
12104
12105if test yes = "$GCC"; then
12106  case $cc_basename in
12107  nvcc*)
12108    lt_prog_compiler_no_builtin_flag=' -Xcompiler -fno-builtin' ;;
12109  *)
12110    lt_prog_compiler_no_builtin_flag=' -fno-builtin' ;;
12111  esac
12112
12113  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
12114printf %s "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; }
12115if test ${lt_cv_prog_compiler_rtti_exceptions+y}
12116then :
12117  printf %s "(cached) " >&6
12118else case e in #(
12119  e) lt_cv_prog_compiler_rtti_exceptions=no
12120   ac_outfile=conftest.$ac_objext
12121   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
12122   lt_compiler_flag="-fno-rtti -fno-exceptions"  ## exclude from sc_useless_quotes_in_assignment
12123   # Insert the option either (1) after the last *FLAGS variable, or
12124   # (2) before a word containing "conftest.", or (3) at the end.
12125   # Note that $ac_compile itself does not contain backslashes and begins
12126   # with a dollar sign (not a hyphen), so the echo should work correctly.
12127   # The option is referenced via a variable to avoid confusing sed.
12128   lt_compile=`echo "$ac_compile" | $SED \
12129   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
12130   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
12131   -e 's:$: $lt_compiler_flag:'`
12132   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
12133   (eval "$lt_compile" 2>conftest.err)
12134   ac_status=$?
12135   cat conftest.err >&5
12136   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12137   if (exit $ac_status) && test -s "$ac_outfile"; then
12138     # The compiler can only warn and ignore the option if not recognized
12139     # So say no if there are warnings other than the usual output.
12140     $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
12141     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
12142     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
12143       lt_cv_prog_compiler_rtti_exceptions=yes
12144     fi
12145   fi
12146   $RM conftest*
12147 ;;
12148esac
12149fi
12150{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5
12151printf "%s\n" "$lt_cv_prog_compiler_rtti_exceptions" >&6; }
12152
12153if test yes = "$lt_cv_prog_compiler_rtti_exceptions"; then
12154    lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions"
12155else
12156    :
12157fi
12158
12159fi
12160
12161
12162
12163
12164
12165
12166  lt_prog_compiler_wl=
12167lt_prog_compiler_pic=
12168lt_prog_compiler_static=
12169
12170
12171  if test yes = "$GCC"; then
12172    lt_prog_compiler_wl='-Wl,'
12173    lt_prog_compiler_static='-static'
12174
12175    case $host_os in
12176      aix*)
12177      # All AIX code is PIC.
12178      if test ia64 = "$host_cpu"; then
12179	# AIX 5 now supports IA64 processor
12180	lt_prog_compiler_static='-Bstatic'
12181      fi
12182      lt_prog_compiler_pic='-fPIC'
12183      ;;
12184
12185    amigaos*)
12186      case $host_cpu in
12187      powerpc)
12188            # see comment about AmigaOS4 .so support
12189            lt_prog_compiler_pic='-fPIC'
12190        ;;
12191      m68k)
12192            # FIXME: we need at least 68020 code to build shared libraries, but
12193            # adding the '-m68020' flag to GCC prevents building anything better,
12194            # like '-m68040'.
12195            lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4'
12196        ;;
12197      esac
12198      ;;
12199
12200    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
12201      # PIC is the default for these OSes.
12202      ;;
12203
12204    mingw* | cygwin* | pw32* | os2* | cegcc*)
12205      # This hack is so that the source file can tell whether it is being
12206      # built for inclusion in a dll (and should export symbols for example).
12207      # Although the cygwin gcc ignores -fPIC, still need this for old-style
12208      # (--disable-auto-import) libraries
12209      lt_prog_compiler_pic='-DDLL_EXPORT'
12210      case $host_os in
12211      os2*)
12212	lt_prog_compiler_static='$wl-static'
12213	;;
12214      esac
12215      ;;
12216
12217    darwin* | rhapsody*)
12218      # PIC is the default on this platform
12219      # Common symbols not allowed in MH_DYLIB files
12220      lt_prog_compiler_pic='-fno-common'
12221      ;;
12222
12223    haiku*)
12224      # PIC is the default for Haiku.
12225      # The "-static" flag exists, but is broken.
12226      lt_prog_compiler_static=
12227      ;;
12228
12229    hpux*)
12230      # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
12231      # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
12232      # sets the default TLS model and affects inlining.
12233      case $host_cpu in
12234      hppa*64*)
12235	# +Z the default
12236	;;
12237      *)
12238	lt_prog_compiler_pic='-fPIC'
12239	;;
12240      esac
12241      ;;
12242
12243    interix[3-9]*)
12244      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
12245      # Instead, we relocate shared libraries at runtime.
12246      ;;
12247
12248    msdosdjgpp*)
12249      # Just because we use GCC doesn't mean we suddenly get shared libraries
12250      # on systems that don't support them.
12251      lt_prog_compiler_can_build_shared=no
12252      enable_shared=no
12253      ;;
12254
12255    *nto* | *qnx*)
12256      # QNX uses GNU C++, but need to define -shared option too, otherwise
12257      # it will coredump.
12258      lt_prog_compiler_pic='-fPIC -shared'
12259      ;;
12260
12261    sysv4*MP*)
12262      if test -d /usr/nec; then
12263	lt_prog_compiler_pic=-Kconform_pic
12264      fi
12265      ;;
12266
12267    *)
12268      lt_prog_compiler_pic='-fPIC'
12269      ;;
12270    esac
12271
12272    case $cc_basename in
12273    nvcc*) # Cuda Compiler Driver 2.2
12274      lt_prog_compiler_wl='-Xlinker '
12275      if test -n "$lt_prog_compiler_pic"; then
12276        lt_prog_compiler_pic="-Xcompiler $lt_prog_compiler_pic"
12277      fi
12278      ;;
12279    esac
12280  else
12281    # PORTME Check for flag to pass linker flags through the system compiler.
12282    case $host_os in
12283    aix*)
12284      lt_prog_compiler_wl='-Wl,'
12285      if test ia64 = "$host_cpu"; then
12286	# AIX 5 now supports IA64 processor
12287	lt_prog_compiler_static='-Bstatic'
12288      else
12289	lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp'
12290      fi
12291      ;;
12292
12293    darwin* | rhapsody*)
12294      # PIC is the default on this platform
12295      # Common symbols not allowed in MH_DYLIB files
12296      lt_prog_compiler_pic='-fno-common'
12297      case $cc_basename in
12298      nagfor*)
12299        # NAG Fortran compiler
12300        lt_prog_compiler_wl='-Wl,-Wl,,'
12301        lt_prog_compiler_pic='-PIC'
12302        lt_prog_compiler_static='-Bstatic'
12303        ;;
12304      esac
12305      ;;
12306
12307    mingw* | cygwin* | pw32* | os2* | cegcc*)
12308      # This hack is so that the source file can tell whether it is being
12309      # built for inclusion in a dll (and should export symbols for example).
12310      lt_prog_compiler_pic='-DDLL_EXPORT'
12311      case $host_os in
12312      os2*)
12313	lt_prog_compiler_static='$wl-static'
12314	;;
12315      esac
12316      ;;
12317
12318    hpux9* | hpux10* | hpux11*)
12319      lt_prog_compiler_wl='-Wl,'
12320      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
12321      # not for PA HP-UX.
12322      case $host_cpu in
12323      hppa*64*|ia64*)
12324	# +Z the default
12325	;;
12326      *)
12327	lt_prog_compiler_pic='+Z'
12328	;;
12329      esac
12330      # Is there a better lt_prog_compiler_static that works with the bundled CC?
12331      lt_prog_compiler_static='$wl-a ${wl}archive'
12332      ;;
12333
12334    irix5* | irix6* | nonstopux*)
12335      lt_prog_compiler_wl='-Wl,'
12336      # PIC (with -KPIC) is the default.
12337      lt_prog_compiler_static='-non_shared'
12338      ;;
12339
12340    linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
12341      case $cc_basename in
12342      # old Intel for x86_64, which still supported -KPIC.
12343      ecc*)
12344	lt_prog_compiler_wl='-Wl,'
12345	lt_prog_compiler_pic='-KPIC'
12346	lt_prog_compiler_static='-static'
12347        ;;
12348      # icc used to be incompatible with GCC.
12349      # ICC 10 doesn't accept -KPIC any more.
12350      icc* | ifort*)
12351	lt_prog_compiler_wl='-Wl,'
12352	lt_prog_compiler_pic='-fPIC'
12353	lt_prog_compiler_static='-static'
12354        ;;
12355      # Lahey Fortran 8.1.
12356      lf95*)
12357	lt_prog_compiler_wl='-Wl,'
12358	lt_prog_compiler_pic='--shared'
12359	lt_prog_compiler_static='--static'
12360	;;
12361      nagfor*)
12362	# NAG Fortran compiler
12363	lt_prog_compiler_wl='-Wl,-Wl,,'
12364	lt_prog_compiler_pic='-PIC'
12365	lt_prog_compiler_static='-Bstatic'
12366	;;
12367      tcc*)
12368	# Fabrice Bellard et al's Tiny C Compiler
12369	lt_prog_compiler_wl='-Wl,'
12370	lt_prog_compiler_pic='-fPIC'
12371	lt_prog_compiler_static='-static'
12372	;;
12373      pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
12374        # Portland Group compilers (*not* the Pentium gcc compiler,
12375	# which looks to be a dead project)
12376	lt_prog_compiler_wl='-Wl,'
12377	lt_prog_compiler_pic='-fpic'
12378	lt_prog_compiler_static='-Bstatic'
12379        ;;
12380      ccc*)
12381        lt_prog_compiler_wl='-Wl,'
12382        # All Alpha code is PIC.
12383        lt_prog_compiler_static='-non_shared'
12384        ;;
12385      xl* | bgxl* | bgf* | mpixl*)
12386	# IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene
12387	lt_prog_compiler_wl='-Wl,'
12388	lt_prog_compiler_pic='-qpic'
12389	lt_prog_compiler_static='-qstaticlink'
12390	;;
12391      *)
12392	case `$CC -V 2>&1 | sed 5q` in
12393	*Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [1-7].* | *Sun*Fortran*\ 8.[0-3]*)
12394	  # Sun Fortran 8.3 passes all unrecognized flags to the linker
12395	  lt_prog_compiler_pic='-KPIC'
12396	  lt_prog_compiler_static='-Bstatic'
12397	  lt_prog_compiler_wl=''
12398	  ;;
12399	*Sun\ F* | *Sun*Fortran*)
12400	  lt_prog_compiler_pic='-KPIC'
12401	  lt_prog_compiler_static='-Bstatic'
12402	  lt_prog_compiler_wl='-Qoption ld '
12403	  ;;
12404	*Sun\ C*)
12405	  # Sun C 5.9
12406	  lt_prog_compiler_pic='-KPIC'
12407	  lt_prog_compiler_static='-Bstatic'
12408	  lt_prog_compiler_wl='-Wl,'
12409	  ;;
12410        *Intel*\ [CF]*Compiler*)
12411	  lt_prog_compiler_wl='-Wl,'
12412	  lt_prog_compiler_pic='-fPIC'
12413	  lt_prog_compiler_static='-static'
12414	  ;;
12415	*Portland\ Group*)
12416	  lt_prog_compiler_wl='-Wl,'
12417	  lt_prog_compiler_pic='-fpic'
12418	  lt_prog_compiler_static='-Bstatic'
12419	  ;;
12420	esac
12421	;;
12422      esac
12423      ;;
12424
12425    newsos6)
12426      lt_prog_compiler_pic='-KPIC'
12427      lt_prog_compiler_static='-Bstatic'
12428      ;;
12429
12430    *nto* | *qnx*)
12431      # QNX uses GNU C++, but need to define -shared option too, otherwise
12432      # it will coredump.
12433      lt_prog_compiler_pic='-fPIC -shared'
12434      ;;
12435
12436    osf3* | osf4* | osf5*)
12437      lt_prog_compiler_wl='-Wl,'
12438      # All OSF/1 code is PIC.
12439      lt_prog_compiler_static='-non_shared'
12440      ;;
12441
12442    rdos*)
12443      lt_prog_compiler_static='-non_shared'
12444      ;;
12445
12446    solaris*)
12447      lt_prog_compiler_pic='-KPIC'
12448      lt_prog_compiler_static='-Bstatic'
12449      case $cc_basename in
12450      f77* | f90* | f95* | sunf77* | sunf90* | sunf95*)
12451	lt_prog_compiler_wl='-Qoption ld ';;
12452      *)
12453	lt_prog_compiler_wl='-Wl,';;
12454      esac
12455      ;;
12456
12457    sunos4*)
12458      lt_prog_compiler_wl='-Qoption ld '
12459      lt_prog_compiler_pic='-PIC'
12460      lt_prog_compiler_static='-Bstatic'
12461      ;;
12462
12463    sysv4 | sysv4.2uw2* | sysv4.3*)
12464      lt_prog_compiler_wl='-Wl,'
12465      lt_prog_compiler_pic='-KPIC'
12466      lt_prog_compiler_static='-Bstatic'
12467      ;;
12468
12469    sysv4*MP*)
12470      if test -d /usr/nec; then
12471	lt_prog_compiler_pic='-Kconform_pic'
12472	lt_prog_compiler_static='-Bstatic'
12473      fi
12474      ;;
12475
12476    sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
12477      lt_prog_compiler_wl='-Wl,'
12478      lt_prog_compiler_pic='-KPIC'
12479      lt_prog_compiler_static='-Bstatic'
12480      ;;
12481
12482    unicos*)
12483      lt_prog_compiler_wl='-Wl,'
12484      lt_prog_compiler_can_build_shared=no
12485      ;;
12486
12487    uts4*)
12488      lt_prog_compiler_pic='-pic'
12489      lt_prog_compiler_static='-Bstatic'
12490      ;;
12491
12492    *)
12493      lt_prog_compiler_can_build_shared=no
12494      ;;
12495    esac
12496  fi
12497
12498case $host_os in
12499  # For platforms that do not support PIC, -DPIC is meaningless:
12500  *djgpp*)
12501    lt_prog_compiler_pic=
12502    ;;
12503  *)
12504    lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC"
12505    ;;
12506esac
12507
12508{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5
12509printf %s "checking for $compiler option to produce PIC... " >&6; }
12510if test ${lt_cv_prog_compiler_pic+y}
12511then :
12512  printf %s "(cached) " >&6
12513else case e in #(
12514  e) lt_cv_prog_compiler_pic=$lt_prog_compiler_pic ;;
12515esac
12516fi
12517{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic" >&5
12518printf "%s\n" "$lt_cv_prog_compiler_pic" >&6; }
12519lt_prog_compiler_pic=$lt_cv_prog_compiler_pic
12520
12521#
12522# Check to make sure the PIC flag actually works.
12523#
12524if test -n "$lt_prog_compiler_pic"; then
12525  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5
12526printf %s "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; }
12527if test ${lt_cv_prog_compiler_pic_works+y}
12528then :
12529  printf %s "(cached) " >&6
12530else case e in #(
12531  e) lt_cv_prog_compiler_pic_works=no
12532   ac_outfile=conftest.$ac_objext
12533   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
12534   lt_compiler_flag="$lt_prog_compiler_pic -DPIC"  ## exclude from sc_useless_quotes_in_assignment
12535   # Insert the option either (1) after the last *FLAGS variable, or
12536   # (2) before a word containing "conftest.", or (3) at the end.
12537   # Note that $ac_compile itself does not contain backslashes and begins
12538   # with a dollar sign (not a hyphen), so the echo should work correctly.
12539   # The option is referenced via a variable to avoid confusing sed.
12540   lt_compile=`echo "$ac_compile" | $SED \
12541   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
12542   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
12543   -e 's:$: $lt_compiler_flag:'`
12544   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
12545   (eval "$lt_compile" 2>conftest.err)
12546   ac_status=$?
12547   cat conftest.err >&5
12548   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12549   if (exit $ac_status) && test -s "$ac_outfile"; then
12550     # The compiler can only warn and ignore the option if not recognized
12551     # So say no if there are warnings other than the usual output.
12552     $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
12553     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
12554     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
12555       lt_cv_prog_compiler_pic_works=yes
12556     fi
12557   fi
12558   $RM conftest*
12559 ;;
12560esac
12561fi
12562{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5
12563printf "%s\n" "$lt_cv_prog_compiler_pic_works" >&6; }
12564
12565if test yes = "$lt_cv_prog_compiler_pic_works"; then
12566    case $lt_prog_compiler_pic in
12567     "" | " "*) ;;
12568     *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;;
12569     esac
12570else
12571    lt_prog_compiler_pic=
12572     lt_prog_compiler_can_build_shared=no
12573fi
12574
12575fi
12576
12577
12578
12579
12580
12581
12582
12583
12584
12585
12586
12587#
12588# Check to make sure the static flag actually works.
12589#
12590wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\"
12591{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5
12592printf %s "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; }
12593if test ${lt_cv_prog_compiler_static_works+y}
12594then :
12595  printf %s "(cached) " >&6
12596else case e in #(
12597  e) lt_cv_prog_compiler_static_works=no
12598   save_LDFLAGS=$LDFLAGS
12599   LDFLAGS="$LDFLAGS $lt_tmp_static_flag"
12600   echo "$lt_simple_link_test_code" > conftest.$ac_ext
12601   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
12602     # The linker can only warn and ignore the option if not recognized
12603     # So say no if there are warnings
12604     if test -s conftest.err; then
12605       # Append any errors to the config.log.
12606       cat conftest.err 1>&5
12607       $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
12608       $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
12609       if diff conftest.exp conftest.er2 >/dev/null; then
12610         lt_cv_prog_compiler_static_works=yes
12611       fi
12612     else
12613       lt_cv_prog_compiler_static_works=yes
12614     fi
12615   fi
12616   $RM -r conftest*
12617   LDFLAGS=$save_LDFLAGS
12618 ;;
12619esac
12620fi
12621{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5
12622printf "%s\n" "$lt_cv_prog_compiler_static_works" >&6; }
12623
12624if test yes = "$lt_cv_prog_compiler_static_works"; then
12625    :
12626else
12627    lt_prog_compiler_static=
12628fi
12629
12630
12631
12632
12633
12634
12635
12636  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
12637printf %s "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
12638if test ${lt_cv_prog_compiler_c_o+y}
12639then :
12640  printf %s "(cached) " >&6
12641else case e in #(
12642  e) lt_cv_prog_compiler_c_o=no
12643   $RM -r conftest 2>/dev/null
12644   mkdir conftest
12645   cd conftest
12646   mkdir out
12647   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
12648
12649   lt_compiler_flag="-o out/conftest2.$ac_objext"
12650   # Insert the option either (1) after the last *FLAGS variable, or
12651   # (2) before a word containing "conftest.", or (3) at the end.
12652   # Note that $ac_compile itself does not contain backslashes and begins
12653   # with a dollar sign (not a hyphen), so the echo should work correctly.
12654   lt_compile=`echo "$ac_compile" | $SED \
12655   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
12656   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
12657   -e 's:$: $lt_compiler_flag:'`
12658   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
12659   (eval "$lt_compile" 2>out/conftest.err)
12660   ac_status=$?
12661   cat out/conftest.err >&5
12662   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12663   if (exit $ac_status) && test -s out/conftest2.$ac_objext
12664   then
12665     # The compiler can only warn and ignore the option if not recognized
12666     # So say no if there are warnings
12667     $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
12668     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
12669     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
12670       lt_cv_prog_compiler_c_o=yes
12671     fi
12672   fi
12673   chmod u+w . 2>&5
12674   $RM conftest*
12675   # SGI C++ compiler will create directory out/ii_files/ for
12676   # template instantiation
12677   test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
12678   $RM out/* && rmdir out
12679   cd ..
12680   $RM -r conftest
12681   $RM conftest*
12682 ;;
12683esac
12684fi
12685{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5
12686printf "%s\n" "$lt_cv_prog_compiler_c_o" >&6; }
12687
12688
12689
12690
12691
12692
12693  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
12694printf %s "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
12695if test ${lt_cv_prog_compiler_c_o+y}
12696then :
12697  printf %s "(cached) " >&6
12698else case e in #(
12699  e) lt_cv_prog_compiler_c_o=no
12700   $RM -r conftest 2>/dev/null
12701   mkdir conftest
12702   cd conftest
12703   mkdir out
12704   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
12705
12706   lt_compiler_flag="-o out/conftest2.$ac_objext"
12707   # Insert the option either (1) after the last *FLAGS variable, or
12708   # (2) before a word containing "conftest.", or (3) at the end.
12709   # Note that $ac_compile itself does not contain backslashes and begins
12710   # with a dollar sign (not a hyphen), so the echo should work correctly.
12711   lt_compile=`echo "$ac_compile" | $SED \
12712   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
12713   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
12714   -e 's:$: $lt_compiler_flag:'`
12715   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
12716   (eval "$lt_compile" 2>out/conftest.err)
12717   ac_status=$?
12718   cat out/conftest.err >&5
12719   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12720   if (exit $ac_status) && test -s out/conftest2.$ac_objext
12721   then
12722     # The compiler can only warn and ignore the option if not recognized
12723     # So say no if there are warnings
12724     $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
12725     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
12726     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
12727       lt_cv_prog_compiler_c_o=yes
12728     fi
12729   fi
12730   chmod u+w . 2>&5
12731   $RM conftest*
12732   # SGI C++ compiler will create directory out/ii_files/ for
12733   # template instantiation
12734   test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
12735   $RM out/* && rmdir out
12736   cd ..
12737   $RM -r conftest
12738   $RM conftest*
12739 ;;
12740esac
12741fi
12742{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5
12743printf "%s\n" "$lt_cv_prog_compiler_c_o" >&6; }
12744
12745
12746
12747
12748hard_links=nottested
12749if test no = "$lt_cv_prog_compiler_c_o" && test no != "$need_locks"; then
12750  # do not overwrite the value of need_locks provided by the user
12751  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5
12752printf %s "checking if we can lock with hard links... " >&6; }
12753  hard_links=yes
12754  $RM conftest*
12755  ln conftest.a conftest.b 2>/dev/null && hard_links=no
12756  touch conftest.a
12757  ln conftest.a conftest.b 2>&5 || hard_links=no
12758  ln conftest.a conftest.b 2>/dev/null && hard_links=no
12759  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5
12760printf "%s\n" "$hard_links" >&6; }
12761  if test no = "$hard_links"; then
12762    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&5
12763printf "%s\n" "$as_me: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&2;}
12764    need_locks=warn
12765  fi
12766else
12767  need_locks=no
12768fi
12769
12770
12771
12772
12773
12774
12775  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5
12776printf %s "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; }
12777
12778  runpath_var=
12779  allow_undefined_flag=
12780  always_export_symbols=no
12781  archive_cmds=
12782  archive_expsym_cmds=
12783  compiler_needs_object=no
12784  enable_shared_with_static_runtimes=no
12785  export_dynamic_flag_spec=
12786  export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
12787  hardcode_automatic=no
12788  hardcode_direct=no
12789  hardcode_direct_absolute=no
12790  hardcode_libdir_flag_spec=
12791  hardcode_libdir_separator=
12792  hardcode_minus_L=no
12793  hardcode_shlibpath_var=unsupported
12794  inherit_rpath=no
12795  link_all_deplibs=unknown
12796  module_cmds=
12797  module_expsym_cmds=
12798  old_archive_from_new_cmds=
12799  old_archive_from_expsyms_cmds=
12800  thread_safe_flag_spec=
12801  whole_archive_flag_spec=
12802  # include_expsyms should be a list of space-separated symbols to be *always*
12803  # included in the symbol list
12804  include_expsyms=
12805  # exclude_expsyms can be an extended regexp of symbols to exclude
12806  # it will be wrapped by ' (' and ')$', so one must not match beginning or
12807  # end of line.  Example: 'a|bc|.*d.*' will exclude the symbols 'a' and 'bc',
12808  # as well as any symbol that contains 'd'.
12809  exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'
12810  # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
12811  # platforms (ab)use it in PIC code, but their linkers get confused if
12812  # the symbol is explicitly referenced.  Since portable code cannot
12813  # rely on this symbol name, it's probably fine to never include it in
12814  # preloaded symbol tables.
12815  # Exclude shared library initialization/finalization symbols.
12816  extract_expsyms_cmds=
12817
12818  case $host_os in
12819  cygwin* | mingw* | pw32* | cegcc*)
12820    # FIXME: the MSVC++ port hasn't been tested in a loooong time
12821    # When not using gcc, we currently assume that we are using
12822    # Microsoft Visual C++.
12823    if test yes != "$GCC"; then
12824      with_gnu_ld=no
12825    fi
12826    ;;
12827  interix*)
12828    # we just hope/assume this is gcc and not c89 (= MSVC++)
12829    with_gnu_ld=yes
12830    ;;
12831  openbsd* | bitrig*)
12832    with_gnu_ld=no
12833    ;;
12834  esac
12835
12836  ld_shlibs=yes
12837
12838  # On some targets, GNU ld is compatible enough with the native linker
12839  # that we're better off using the native interface for both.
12840  lt_use_gnu_ld_interface=no
12841  if test yes = "$with_gnu_ld"; then
12842    case $host_os in
12843      aix*)
12844	# The AIX port of GNU ld has always aspired to compatibility
12845	# with the native linker.  However, as the warning in the GNU ld
12846	# block says, versions before 2.19.5* couldn't really create working
12847	# shared libraries, regardless of the interface used.
12848	case `$LD -v 2>&1` in
12849	  *\ \(GNU\ Binutils\)\ 2.19.5*) ;;
12850	  *\ \(GNU\ Binutils\)\ 2.[2-9]*) ;;
12851	  *\ \(GNU\ Binutils\)\ [3-9]*) ;;
12852	  *)
12853	    lt_use_gnu_ld_interface=yes
12854	    ;;
12855	esac
12856	;;
12857      *)
12858	lt_use_gnu_ld_interface=yes
12859	;;
12860    esac
12861  fi
12862
12863  if test yes = "$lt_use_gnu_ld_interface"; then
12864    # If archive_cmds runs LD, not CC, wlarc should be empty
12865    wlarc='$wl'
12866
12867    # Set some defaults for GNU ld with shared library support. These
12868    # are reset later if shared libraries are not supported. Putting them
12869    # here allows them to be overridden if necessary.
12870    runpath_var=LD_RUN_PATH
12871    hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
12872    export_dynamic_flag_spec='$wl--export-dynamic'
12873    # ancient GNU ld didn't support --whole-archive et. al.
12874    if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
12875      whole_archive_flag_spec=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
12876    else
12877      whole_archive_flag_spec=
12878    fi
12879    supports_anon_versioning=no
12880    case `$LD -v | $SED -e 's/(^)\+)\s\+//' 2>&1` in
12881      *GNU\ gold*) supports_anon_versioning=yes ;;
12882      *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11
12883      *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
12884      *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
12885      *\ 2.11.*) ;; # other 2.11 versions
12886      *) supports_anon_versioning=yes ;;
12887    esac
12888
12889    # See if GNU ld supports shared libraries.
12890    case $host_os in
12891    aix[3-9]*)
12892      # On AIX/PPC, the GNU linker is very broken
12893      if test ia64 != "$host_cpu"; then
12894	ld_shlibs=no
12895	cat <<_LT_EOF 1>&2
12896
12897*** Warning: the GNU linker, at least up to release 2.19, is reported
12898*** to be unable to reliably create shared libraries on AIX.
12899*** Therefore, libtool is disabling shared libraries support.  If you
12900*** really care for shared libraries, you may want to install binutils
12901*** 2.20 or above, or modify your PATH so that a non-GNU linker is found.
12902*** You will then need to restart the configuration process.
12903
12904_LT_EOF
12905      fi
12906      ;;
12907
12908    amigaos*)
12909      case $host_cpu in
12910      powerpc)
12911            # see comment about AmigaOS4 .so support
12912            archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
12913            archive_expsym_cmds=''
12914        ;;
12915      m68k)
12916            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)'
12917            hardcode_libdir_flag_spec='-L$libdir'
12918            hardcode_minus_L=yes
12919        ;;
12920      esac
12921      ;;
12922
12923    beos*)
12924      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
12925	allow_undefined_flag=unsupported
12926	# Joseph Beckenbach <jrb3@best.com> says some releases of gcc
12927	# support --undefined.  This deserves some investigation.  FIXME
12928	archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
12929      else
12930	ld_shlibs=no
12931      fi
12932      ;;
12933
12934    cygwin* | mingw* | pw32* | cegcc*)
12935      # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless,
12936      # as there is no search path for DLLs.
12937      hardcode_libdir_flag_spec='-L$libdir'
12938      export_dynamic_flag_spec='$wl--export-all-symbols'
12939      allow_undefined_flag=unsupported
12940      always_export_symbols=no
12941      enable_shared_with_static_runtimes=yes
12942      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'
12943      exclude_expsyms='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'
12944
12945      if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
12946        archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
12947	# If the export-symbols file already is a .def file, use it as
12948	# is; otherwise, prepend EXPORTS...
12949	archive_expsym_cmds='if   test DEF = "`$SED -n     -e '\''s/^[	 ]*//'\''     -e '\''/^\(;.*\)*$/d'\''     -e '\''s/^\(EXPORTS\|LIBRARY\)\([	 ].*\)*$/DEF/p'\''     -e q     $export_symbols`" ; then
12950          cp $export_symbols $output_objdir/$soname.def;
12951        else
12952          echo EXPORTS > $output_objdir/$soname.def;
12953          cat $export_symbols >> $output_objdir/$soname.def;
12954        fi~
12955        $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
12956      else
12957	ld_shlibs=no
12958      fi
12959      ;;
12960
12961    haiku*)
12962      archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
12963      link_all_deplibs=yes
12964      ;;
12965
12966    os2*)
12967      hardcode_libdir_flag_spec='-L$libdir'
12968      hardcode_minus_L=yes
12969      allow_undefined_flag=unsupported
12970      shrext_cmds=.dll
12971      archive_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
12972	$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
12973	$ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
12974	$ECHO EXPORTS >> $output_objdir/$libname.def~
12975	emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
12976	$CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
12977	emximp -o $lib $output_objdir/$libname.def'
12978      archive_expsym_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
12979	$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
12980	$ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
12981	$ECHO EXPORTS >> $output_objdir/$libname.def~
12982	prefix_cmds="$SED"~
12983	if test EXPORTS = "`$SED 1q $export_symbols`"; then
12984	  prefix_cmds="$prefix_cmds -e 1d";
12985	fi~
12986	prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
12987	cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
12988	$CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
12989	emximp -o $lib $output_objdir/$libname.def'
12990      old_archive_From_new_cmds='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
12991      enable_shared_with_static_runtimes=yes
12992      ;;
12993
12994    interix[3-9]*)
12995      hardcode_direct=no
12996      hardcode_shlibpath_var=no
12997      hardcode_libdir_flag_spec='$wl-rpath,$libdir'
12998      export_dynamic_flag_spec='$wl-E'
12999      # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
13000      # Instead, shared libraries are loaded at an image base (0x10000000 by
13001      # default) and relocated if they conflict, which is a slow very memory
13002      # consuming and fragmenting process.  To avoid this, we pick a random,
13003      # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
13004      # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
13005      archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
13006      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'
13007      ;;
13008
13009    gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
13010      tmp_diet=no
13011      if test linux-dietlibc = "$host_os"; then
13012	case $cc_basename in
13013	  diet\ *) tmp_diet=yes;;	# linux-dietlibc with static linking (!diet-dyn)
13014	esac
13015      fi
13016      if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
13017	 && test no = "$tmp_diet"
13018      then
13019	tmp_addflag=' $pic_flag'
13020	tmp_sharedflag='-shared'
13021	case $cc_basename,$host_cpu in
13022        pgcc*)				# Portland Group C compiler
13023	  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'
13024	  tmp_addflag=' $pic_flag'
13025	  ;;
13026	pgf77* | pgf90* | pgf95* | pgfortran*)
13027					# Portland Group f77 and f90 compilers
13028	  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'
13029	  tmp_addflag=' $pic_flag -Mnomain' ;;
13030	ecc*,ia64* | icc*,ia64*)	# Intel C compiler on ia64
13031	  tmp_addflag=' -i_dynamic' ;;
13032	efc*,ia64* | ifort*,ia64*)	# Intel Fortran compiler on ia64
13033	  tmp_addflag=' -i_dynamic -nofor_main' ;;
13034	ifc* | ifort*)			# Intel Fortran compiler
13035	  tmp_addflag=' -nofor_main' ;;
13036	lf95*)				# Lahey Fortran 8.1
13037	  whole_archive_flag_spec=
13038	  tmp_sharedflag='--shared' ;;
13039        nagfor*)                        # NAGFOR 5.3
13040          tmp_sharedflag='-Wl,-shared' ;;
13041	xl[cC]* | bgxl[cC]* | mpixl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below)
13042	  tmp_sharedflag='-qmkshrobj'
13043	  tmp_addflag= ;;
13044	nvcc*)	# Cuda Compiler Driver 2.2
13045	  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'
13046	  compiler_needs_object=yes
13047	  ;;
13048	esac
13049	case `$CC -V 2>&1 | sed 5q` in
13050	*Sun\ C*)			# Sun C 5.9
13051	  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'
13052	  compiler_needs_object=yes
13053	  tmp_sharedflag='-G' ;;
13054	*Sun\ F*)			# Sun Fortran 8.3
13055	  tmp_sharedflag='-G' ;;
13056	esac
13057	archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
13058
13059        if test yes = "$supports_anon_versioning"; then
13060          archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~
13061            cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
13062            echo "local: *; };" >> $output_objdir/$libname.ver~
13063            $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib'
13064        fi
13065
13066	case $cc_basename in
13067	tcc*)
13068	  export_dynamic_flag_spec='-rdynamic'
13069	  ;;
13070	xlf* | bgf* | bgxlf* | mpixlf*)
13071	  # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
13072	  whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive'
13073	  hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
13074	  archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
13075	  if test yes = "$supports_anon_versioning"; then
13076	    archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~
13077              cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
13078              echo "local: *; };" >> $output_objdir/$libname.ver~
13079              $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
13080	  fi
13081	  ;;
13082	esac
13083      else
13084        ld_shlibs=no
13085      fi
13086      ;;
13087
13088    netbsd*)
13089      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
13090	archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
13091	wlarc=
13092      else
13093	archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
13094	archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
13095      fi
13096      ;;
13097
13098    solaris*)
13099      if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
13100	ld_shlibs=no
13101	cat <<_LT_EOF 1>&2
13102
13103*** Warning: The releases 2.8.* of the GNU linker cannot reliably
13104*** create shared libraries on Solaris systems.  Therefore, libtool
13105*** is disabling shared libraries support.  We urge you to upgrade GNU
13106*** binutils to release 2.9.1 or newer.  Another option is to modify
13107*** your PATH or compiler configuration so that the native linker is
13108*** used, and then restart.
13109
13110_LT_EOF
13111      elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
13112	archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
13113	archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
13114      else
13115	ld_shlibs=no
13116      fi
13117      ;;
13118
13119    sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
13120      case `$LD -v 2>&1` in
13121        *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*)
13122	ld_shlibs=no
13123	cat <<_LT_EOF 1>&2
13124
13125*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot
13126*** reliably create shared libraries on SCO systems.  Therefore, libtool
13127*** is disabling shared libraries support.  We urge you to upgrade GNU
13128*** binutils to release 2.16.91.0.3 or newer.  Another option is to modify
13129*** your PATH or compiler configuration so that the native linker is
13130*** used, and then restart.
13131
13132_LT_EOF
13133	;;
13134	*)
13135	  # For security reasons, it is highly recommended that you always
13136	  # use absolute paths for naming shared libraries, and exclude the
13137	  # DT_RUNPATH tag from executables and libraries.  But doing so
13138	  # requires that you compile everything twice, which is a pain.
13139	  if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
13140	    hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
13141	    archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
13142	    archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
13143	  else
13144	    ld_shlibs=no
13145	  fi
13146	;;
13147      esac
13148      ;;
13149
13150    sunos4*)
13151      archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
13152      wlarc=
13153      hardcode_direct=yes
13154      hardcode_shlibpath_var=no
13155      ;;
13156
13157    *)
13158      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
13159	archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
13160	archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
13161      else
13162	ld_shlibs=no
13163      fi
13164      ;;
13165    esac
13166
13167    if test no = "$ld_shlibs"; then
13168      runpath_var=
13169      hardcode_libdir_flag_spec=
13170      export_dynamic_flag_spec=
13171      whole_archive_flag_spec=
13172    fi
13173  else
13174    # PORTME fill in a description of your system's linker (not GNU ld)
13175    case $host_os in
13176    aix3*)
13177      allow_undefined_flag=unsupported
13178      always_export_symbols=yes
13179      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'
13180      # Note: this linker hardcodes the directories in LIBPATH if there
13181      # are no directories specified by -L.
13182      hardcode_minus_L=yes
13183      if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then
13184	# Neither direct hardcoding nor static linking is supported with a
13185	# broken collect2.
13186	hardcode_direct=unsupported
13187      fi
13188      ;;
13189
13190    aix[4-9]*)
13191      if test ia64 = "$host_cpu"; then
13192	# On IA64, the linker does run time linking by default, so we don't
13193	# have to do anything special.
13194	aix_use_runtimelinking=no
13195	exp_sym_flag='-Bexport'
13196	no_entry_flag=
13197      else
13198	# If we're using GNU nm, then we don't want the "-C" option.
13199	# -C means demangle to GNU nm, but means don't demangle to AIX nm.
13200	# Without the "-l" option, or with the "-B" option, AIX nm treats
13201	# weak defined symbols like other global defined symbols, whereas
13202	# GNU nm marks them as "W".
13203	# While the 'weak' keyword is ignored in the Export File, we need
13204	# it in the Import File for the 'aix-soname' feature, so we have
13205	# to replace the "-B" option with "-P" for AIX nm.
13206	if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
13207	  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'
13208	else
13209	  export_symbols_cmds='`func_echo_all $NM | $SED -e '\''s/B\([^B]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && (substr(\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols'
13210	fi
13211	aix_use_runtimelinking=no
13212
13213	# Test if we are trying to use run time linking or normal
13214	# AIX style linking. If -brtl is somewhere in LDFLAGS, we
13215	# have runtime linking enabled, and use it for executables.
13216	# For shared libraries, we enable/disable runtime linking
13217	# depending on the kind of the shared library created -
13218	# when "with_aix_soname,aix_use_runtimelinking" is:
13219	# "aix,no"   lib.a(lib.so.V) shared, rtl:no,  for executables
13220	# "aix,yes"  lib.so          shared, rtl:yes, for executables
13221	#            lib.a           static archive
13222	# "both,no"  lib.so.V(shr.o) shared, rtl:yes
13223	#            lib.a(lib.so.V) shared, rtl:no,  for executables
13224	# "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables
13225	#            lib.a(lib.so.V) shared, rtl:no
13226	# "svr4,*"   lib.so.V(shr.o) shared, rtl:yes, for executables
13227	#            lib.a           static archive
13228	case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*)
13229	  for ld_flag in $LDFLAGS; do
13230	  if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then
13231	    aix_use_runtimelinking=yes
13232	    break
13233	  fi
13234	  done
13235	  if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then
13236	    # With aix-soname=svr4, we create the lib.so.V shared archives only,
13237	    # so we don't have lib.a shared libs to link our executables.
13238	    # We have to force runtime linking in this case.
13239	    aix_use_runtimelinking=yes
13240	    LDFLAGS="$LDFLAGS -Wl,-brtl"
13241	  fi
13242	  ;;
13243	esac
13244
13245	exp_sym_flag='-bexport'
13246	no_entry_flag='-bnoentry'
13247      fi
13248
13249      # When large executables or shared objects are built, AIX ld can
13250      # have problems creating the table of contents.  If linking a library
13251      # or program results in "error TOC overflow" add -mminimal-toc to
13252      # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
13253      # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
13254
13255      archive_cmds=''
13256      hardcode_direct=yes
13257      hardcode_direct_absolute=yes
13258      hardcode_libdir_separator=':'
13259      link_all_deplibs=yes
13260      file_list_spec='$wl-f,'
13261      case $with_aix_soname,$aix_use_runtimelinking in
13262      aix,*) ;; # traditional, no import file
13263      svr4,* | *,yes) # use import file
13264	# The Import File defines what to hardcode.
13265	hardcode_direct=no
13266	hardcode_direct_absolute=no
13267	;;
13268      esac
13269
13270      if test yes = "$GCC"; then
13271	case $host_os in aix4.[012]|aix4.[012].*)
13272	# We only want to do this on AIX 4.2 and lower, the check
13273	# below for broken collect2 doesn't work under 4.3+
13274	  collect2name=`$CC -print-prog-name=collect2`
13275	  if test -f "$collect2name" &&
13276	   strings "$collect2name" | $GREP resolve_lib_name >/dev/null
13277	  then
13278	  # We have reworked collect2
13279	  :
13280	  else
13281	  # We have old collect2
13282	  hardcode_direct=unsupported
13283	  # It fails to find uninstalled libraries when the uninstalled
13284	  # path is not listed in the libpath.  Setting hardcode_minus_L
13285	  # to unsupported forces relinking
13286	  hardcode_minus_L=yes
13287	  hardcode_libdir_flag_spec='-L$libdir'
13288	  hardcode_libdir_separator=
13289	  fi
13290	  ;;
13291	esac
13292	shared_flag='-shared'
13293	if test yes = "$aix_use_runtimelinking"; then
13294	  shared_flag="$shared_flag "'$wl-G'
13295	fi
13296	# Need to ensure runtime linking is disabled for the traditional
13297	# shared library, or the linker may eventually find shared libraries
13298	# /with/ Import File - we do not want to mix them.
13299	shared_flag_aix='-shared'
13300	shared_flag_svr4='-shared $wl-G'
13301      else
13302	# not using gcc
13303	if test ia64 = "$host_cpu"; then
13304	# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
13305	# chokes on -Wl,-G. The following line is correct:
13306	  shared_flag='-G'
13307	else
13308	  if test yes = "$aix_use_runtimelinking"; then
13309	    shared_flag='$wl-G'
13310	  else
13311	    shared_flag='$wl-bM:SRE'
13312	  fi
13313	  shared_flag_aix='$wl-bM:SRE'
13314	  shared_flag_svr4='$wl-G'
13315	fi
13316      fi
13317
13318      export_dynamic_flag_spec='$wl-bexpall'
13319      # It seems that -bexpall does not export symbols beginning with
13320      # underscore (_), so it is better to generate a list of symbols to export.
13321      always_export_symbols=yes
13322      if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then
13323	# Warning - without using the other runtime loading flags (-brtl),
13324	# -berok will link without error, but may produce a broken library.
13325	allow_undefined_flag='-berok'
13326        # Determine the default libpath from the value encoded in an
13327        # empty executable.
13328        if test set = "${lt_cv_aix_libpath+set}"; then
13329  aix_libpath=$lt_cv_aix_libpath
13330else
13331  if test ${lt_cv_aix_libpath_+y}
13332then :
13333  printf %s "(cached) " >&6
13334else case e in #(
13335  e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13336/* end confdefs.h.  */
13337
13338int
13339main (void)
13340{
13341
13342  ;
13343  return 0;
13344}
13345_ACEOF
13346if ac_fn_c_try_link "$LINENO"
13347then :
13348
13349  lt_aix_libpath_sed='
13350      /Import File Strings/,/^$/ {
13351	  /^0/ {
13352	      s/^0  *\([^ ]*\) *$/\1/
13353	      p
13354	  }
13355      }'
13356  lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
13357  # Check for a 64-bit object if we didn't find anything.
13358  if test -z "$lt_cv_aix_libpath_"; then
13359    lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
13360  fi
13361fi
13362rm -f core conftest.err conftest.$ac_objext conftest.beam \
13363    conftest$ac_exeext conftest.$ac_ext
13364  if test -z "$lt_cv_aix_libpath_"; then
13365    lt_cv_aix_libpath_=/usr/lib:/lib
13366  fi
13367   ;;
13368esac
13369fi
13370
13371  aix_libpath=$lt_cv_aix_libpath_
13372fi
13373
13374        hardcode_libdir_flag_spec='$wl-blibpath:$libdir:'"$aix_libpath"
13375        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
13376      else
13377	if test ia64 = "$host_cpu"; then
13378	  hardcode_libdir_flag_spec='$wl-R $libdir:/usr/lib:/lib'
13379	  allow_undefined_flag="-z nodefs"
13380	  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"
13381	else
13382	 # Determine the default libpath from the value encoded in an
13383	 # empty executable.
13384	 if test set = "${lt_cv_aix_libpath+set}"; then
13385  aix_libpath=$lt_cv_aix_libpath
13386else
13387  if test ${lt_cv_aix_libpath_+y}
13388then :
13389  printf %s "(cached) " >&6
13390else case e in #(
13391  e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13392/* end confdefs.h.  */
13393
13394int
13395main (void)
13396{
13397
13398  ;
13399  return 0;
13400}
13401_ACEOF
13402if ac_fn_c_try_link "$LINENO"
13403then :
13404
13405  lt_aix_libpath_sed='
13406      /Import File Strings/,/^$/ {
13407	  /^0/ {
13408	      s/^0  *\([^ ]*\) *$/\1/
13409	      p
13410	  }
13411      }'
13412  lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
13413  # Check for a 64-bit object if we didn't find anything.
13414  if test -z "$lt_cv_aix_libpath_"; then
13415    lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
13416  fi
13417fi
13418rm -f core conftest.err conftest.$ac_objext conftest.beam \
13419    conftest$ac_exeext conftest.$ac_ext
13420  if test -z "$lt_cv_aix_libpath_"; then
13421    lt_cv_aix_libpath_=/usr/lib:/lib
13422  fi
13423   ;;
13424esac
13425fi
13426
13427  aix_libpath=$lt_cv_aix_libpath_
13428fi
13429
13430	 hardcode_libdir_flag_spec='$wl-blibpath:$libdir:'"$aix_libpath"
13431	  # Warning - without using the other run time loading flags,
13432	  # -berok will link without error, but may produce a broken library.
13433	  no_undefined_flag=' $wl-bernotok'
13434	  allow_undefined_flag=' $wl-berok'
13435	  if test yes = "$with_gnu_ld"; then
13436	    # We only use this code for GNU lds that support --whole-archive.
13437	    whole_archive_flag_spec='$wl--whole-archive$convenience $wl--no-whole-archive'
13438	  else
13439	    # Exported symbols can be pulled into shared objects from archives
13440	    whole_archive_flag_spec='$convenience'
13441	  fi
13442	  archive_cmds_need_lc=yes
13443	  archive_expsym_cmds='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d'
13444	  # -brtl affects multiple linker settings, -berok does not and is overridden later
13445	  compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([, ]\\)%-berok\\1%g"`'
13446	  if test svr4 != "$with_aix_soname"; then
13447	    # This is similar to how AIX traditionally builds its shared libraries.
13448	    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'
13449	  fi
13450	  if test aix != "$with_aix_soname"; then
13451	    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'
13452	  else
13453	    # used by -dlpreopen to get the symbols
13454	    archive_expsym_cmds="$archive_expsym_cmds"'~$MV  $output_objdir/$realname.d/$soname $output_objdir'
13455	  fi
13456	  archive_expsym_cmds="$archive_expsym_cmds"'~$RM -r $output_objdir/$realname.d'
13457	fi
13458      fi
13459      ;;
13460
13461    amigaos*)
13462      case $host_cpu in
13463      powerpc)
13464            # see comment about AmigaOS4 .so support
13465            archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
13466            archive_expsym_cmds=''
13467        ;;
13468      m68k)
13469            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)'
13470            hardcode_libdir_flag_spec='-L$libdir'
13471            hardcode_minus_L=yes
13472        ;;
13473      esac
13474      ;;
13475
13476    bsdi[45]*)
13477      export_dynamic_flag_spec=-rdynamic
13478      ;;
13479
13480    cygwin* | mingw* | pw32* | cegcc*)
13481      # When not using gcc, we currently assume that we are using
13482      # Microsoft Visual C++.
13483      # hardcode_libdir_flag_spec is actually meaningless, as there is
13484      # no search path for DLLs.
13485      case $cc_basename in
13486      cl*)
13487	# Native MSVC
13488	hardcode_libdir_flag_spec=' '
13489	allow_undefined_flag=unsupported
13490	always_export_symbols=yes
13491	file_list_spec='@'
13492	# Tell ltmain to make .lib files, not .a files.
13493	libext=lib
13494	# Tell ltmain to make .dll files, not .so files.
13495	shrext_cmds=.dll
13496	# FIXME: Setting linknames here is a bad hack.
13497	archive_cmds='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames='
13498	archive_expsym_cmds='if   test DEF = "`$SED -n     -e '\''s/^[	 ]*//'\''     -e '\''/^\(;.*\)*$/d'\''     -e '\''s/^\(EXPORTS\|LIBRARY\)\([	 ].*\)*$/DEF/p'\''     -e q     $export_symbols`" ; then
13499            cp "$export_symbols" "$output_objdir/$soname.def";
13500            echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp";
13501          else
13502            $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp;
13503          fi~
13504          $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
13505          linknames='
13506	# The linker will not automatically build a static lib if we build a DLL.
13507	# _LT_TAGVAR(old_archive_from_new_cmds, )='true'
13508	enable_shared_with_static_runtimes=yes
13509	exclude_expsyms='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
13510	export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1,DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols'
13511	# Don't use ranlib
13512	old_postinstall_cmds='chmod 644 $oldlib'
13513	postlink_cmds='lt_outputfile="@OUTPUT@"~
13514          lt_tool_outputfile="@TOOL_OUTPUT@"~
13515          case $lt_outputfile in
13516            *.exe|*.EXE) ;;
13517            *)
13518              lt_outputfile=$lt_outputfile.exe
13519              lt_tool_outputfile=$lt_tool_outputfile.exe
13520              ;;
13521          esac~
13522          if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then
13523            $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
13524            $RM "$lt_outputfile.manifest";
13525          fi'
13526	;;
13527      *)
13528	# Assume MSVC wrapper
13529	hardcode_libdir_flag_spec=' '
13530	allow_undefined_flag=unsupported
13531	# Tell ltmain to make .lib files, not .a files.
13532	libext=lib
13533	# Tell ltmain to make .dll files, not .so files.
13534	shrext_cmds=.dll
13535	# FIXME: Setting linknames here is a bad hack.
13536	archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
13537	# The linker will automatically build a .lib file if we build a DLL.
13538	old_archive_from_new_cmds='true'
13539	# FIXME: Should let the user specify the lib program.
13540	old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs'
13541	enable_shared_with_static_runtimes=yes
13542	;;
13543      esac
13544      ;;
13545
13546    darwin* | rhapsody*)
13547
13548
13549  archive_cmds_need_lc=no
13550  hardcode_direct=no
13551  hardcode_automatic=yes
13552  hardcode_shlibpath_var=unsupported
13553  if test yes = "$lt_cv_ld_force_load"; then
13554    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\"`'
13555
13556  else
13557    whole_archive_flag_spec=''
13558  fi
13559  link_all_deplibs=yes
13560  allow_undefined_flag=$_lt_dar_allow_undefined
13561  case $cc_basename in
13562     ifort*|nagfor*) _lt_dar_can_shared=yes ;;
13563     *) _lt_dar_can_shared=$GCC ;;
13564  esac
13565  if test yes = "$_lt_dar_can_shared"; then
13566    output_verbose_link_cmd=func_echo_all
13567    archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dsymutil"
13568    module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil"
13569    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"
13570    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"
13571
13572  else
13573  ld_shlibs=no
13574  fi
13575
13576      ;;
13577
13578    dgux*)
13579      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
13580      hardcode_libdir_flag_spec='-L$libdir'
13581      hardcode_shlibpath_var=no
13582      ;;
13583
13584    # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
13585    # support.  Future versions do this automatically, but an explicit c++rt0.o
13586    # does not break anything, and helps significantly (at the cost of a little
13587    # extra space).
13588    freebsd2.2*)
13589      archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
13590      hardcode_libdir_flag_spec='-R$libdir'
13591      hardcode_direct=yes
13592      hardcode_shlibpath_var=no
13593      ;;
13594
13595    # Unfortunately, older versions of FreeBSD 2 do not have this feature.
13596    freebsd2.*)
13597      archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
13598      hardcode_direct=yes
13599      hardcode_minus_L=yes
13600      hardcode_shlibpath_var=no
13601      ;;
13602
13603    # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
13604    freebsd* | dragonfly*)
13605      archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
13606      hardcode_libdir_flag_spec='-R$libdir'
13607      hardcode_direct=yes
13608      hardcode_shlibpath_var=no
13609      ;;
13610
13611    hpux9*)
13612      if test yes = "$GCC"; then
13613	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'
13614      else
13615	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'
13616      fi
13617      hardcode_libdir_flag_spec='$wl+b $wl$libdir'
13618      hardcode_libdir_separator=:
13619      hardcode_direct=yes
13620
13621      # hardcode_minus_L: Not really in the search PATH,
13622      # but as the default location of the library.
13623      hardcode_minus_L=yes
13624      export_dynamic_flag_spec='$wl-E'
13625      ;;
13626
13627    hpux10*)
13628      if test yes,no = "$GCC,$with_gnu_ld"; then
13629	archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
13630      else
13631	archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
13632      fi
13633      if test no = "$with_gnu_ld"; then
13634	hardcode_libdir_flag_spec='$wl+b $wl$libdir'
13635	hardcode_libdir_separator=:
13636	hardcode_direct=yes
13637	hardcode_direct_absolute=yes
13638	export_dynamic_flag_spec='$wl-E'
13639	# hardcode_minus_L: Not really in the search PATH,
13640	# but as the default location of the library.
13641	hardcode_minus_L=yes
13642      fi
13643      ;;
13644
13645    hpux11*)
13646      if test yes,no = "$GCC,$with_gnu_ld"; then
13647	case $host_cpu in
13648	hppa*64*)
13649	  archive_cmds='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
13650	  ;;
13651	ia64*)
13652	  archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
13653	  ;;
13654	*)
13655	  archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
13656	  ;;
13657	esac
13658      else
13659	case $host_cpu in
13660	hppa*64*)
13661	  archive_cmds='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
13662	  ;;
13663	ia64*)
13664	  archive_cmds='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
13665	  ;;
13666	*)
13667
13668	  # Older versions of the 11.00 compiler do not understand -b yet
13669	  # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does)
13670	  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC understands -b" >&5
13671printf %s "checking if $CC understands -b... " >&6; }
13672if test ${lt_cv_prog_compiler__b+y}
13673then :
13674  printf %s "(cached) " >&6
13675else case e in #(
13676  e) lt_cv_prog_compiler__b=no
13677   save_LDFLAGS=$LDFLAGS
13678   LDFLAGS="$LDFLAGS -b"
13679   echo "$lt_simple_link_test_code" > conftest.$ac_ext
13680   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
13681     # The linker can only warn and ignore the option if not recognized
13682     # So say no if there are warnings
13683     if test -s conftest.err; then
13684       # Append any errors to the config.log.
13685       cat conftest.err 1>&5
13686       $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
13687       $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
13688       if diff conftest.exp conftest.er2 >/dev/null; then
13689         lt_cv_prog_compiler__b=yes
13690       fi
13691     else
13692       lt_cv_prog_compiler__b=yes
13693     fi
13694   fi
13695   $RM -r conftest*
13696   LDFLAGS=$save_LDFLAGS
13697 ;;
13698esac
13699fi
13700{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler__b" >&5
13701printf "%s\n" "$lt_cv_prog_compiler__b" >&6; }
13702
13703if test yes = "$lt_cv_prog_compiler__b"; then
13704    archive_cmds='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
13705else
13706    archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
13707fi
13708
13709	  ;;
13710	esac
13711      fi
13712      if test no = "$with_gnu_ld"; then
13713	hardcode_libdir_flag_spec='$wl+b $wl$libdir'
13714	hardcode_libdir_separator=:
13715
13716	case $host_cpu in
13717	hppa*64*|ia64*)
13718	  hardcode_direct=no
13719	  hardcode_shlibpath_var=no
13720	  ;;
13721	*)
13722	  hardcode_direct=yes
13723	  hardcode_direct_absolute=yes
13724	  export_dynamic_flag_spec='$wl-E'
13725
13726	  # hardcode_minus_L: Not really in the search PATH,
13727	  # but as the default location of the library.
13728	  hardcode_minus_L=yes
13729	  ;;
13730	esac
13731      fi
13732      ;;
13733
13734    irix5* | irix6* | nonstopux*)
13735      if test yes = "$GCC"; then
13736	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'
13737	# Try to use the -exported_symbol ld option, if it does not
13738	# work, assume that -exports_file does not work either and
13739	# implicitly export all symbols.
13740	# This should be the same for all languages, so no per-tag cache variable.
13741	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5
13742printf %s "checking whether the $host_os linker accepts -exported_symbol... " >&6; }
13743if test ${lt_cv_irix_exported_symbol+y}
13744then :
13745  printf %s "(cached) " >&6
13746else case e in #(
13747  e) save_LDFLAGS=$LDFLAGS
13748	   LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null"
13749	   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13750/* end confdefs.h.  */
13751int foo (void) { return 0; }
13752_ACEOF
13753if ac_fn_c_try_link "$LINENO"
13754then :
13755  lt_cv_irix_exported_symbol=yes
13756else case e in #(
13757  e) lt_cv_irix_exported_symbol=no ;;
13758esac
13759fi
13760rm -f core conftest.err conftest.$ac_objext conftest.beam \
13761    conftest$ac_exeext conftest.$ac_ext
13762           LDFLAGS=$save_LDFLAGS ;;
13763esac
13764fi
13765{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5
13766printf "%s\n" "$lt_cv_irix_exported_symbol" >&6; }
13767	if test yes = "$lt_cv_irix_exported_symbol"; then
13768          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'
13769	fi
13770      else
13771	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'
13772	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'
13773      fi
13774      archive_cmds_need_lc='no'
13775      hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
13776      hardcode_libdir_separator=:
13777      inherit_rpath=yes
13778      link_all_deplibs=yes
13779      ;;
13780
13781    linux*)
13782      case $cc_basename in
13783      tcc*)
13784	# Fabrice Bellard et al's Tiny C Compiler
13785	ld_shlibs=yes
13786	archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
13787	;;
13788      esac
13789      ;;
13790
13791    netbsd*)
13792      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
13793	archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
13794      else
13795	archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
13796      fi
13797      hardcode_libdir_flag_spec='-R$libdir'
13798      hardcode_direct=yes
13799      hardcode_shlibpath_var=no
13800      ;;
13801
13802    newsos6)
13803      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
13804      hardcode_direct=yes
13805      hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
13806      hardcode_libdir_separator=:
13807      hardcode_shlibpath_var=no
13808      ;;
13809
13810    *nto* | *qnx*)
13811      ;;
13812
13813    openbsd* | bitrig*)
13814      if test -f /usr/libexec/ld.so; then
13815	hardcode_direct=yes
13816	hardcode_shlibpath_var=no
13817	hardcode_direct_absolute=yes
13818	if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
13819	  archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
13820	  archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols'
13821	  hardcode_libdir_flag_spec='$wl-rpath,$libdir'
13822	  export_dynamic_flag_spec='$wl-E'
13823	else
13824	  archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
13825	  hardcode_libdir_flag_spec='$wl-rpath,$libdir'
13826	fi
13827      else
13828	ld_shlibs=no
13829      fi
13830      ;;
13831
13832    os2*)
13833      hardcode_libdir_flag_spec='-L$libdir'
13834      hardcode_minus_L=yes
13835      allow_undefined_flag=unsupported
13836      shrext_cmds=.dll
13837      archive_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
13838	$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
13839	$ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
13840	$ECHO EXPORTS >> $output_objdir/$libname.def~
13841	emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
13842	$CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
13843	emximp -o $lib $output_objdir/$libname.def'
13844      archive_expsym_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
13845	$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
13846	$ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
13847	$ECHO EXPORTS >> $output_objdir/$libname.def~
13848	prefix_cmds="$SED"~
13849	if test EXPORTS = "`$SED 1q $export_symbols`"; then
13850	  prefix_cmds="$prefix_cmds -e 1d";
13851	fi~
13852	prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
13853	cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
13854	$CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
13855	emximp -o $lib $output_objdir/$libname.def'
13856      old_archive_From_new_cmds='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
13857      enable_shared_with_static_runtimes=yes
13858      ;;
13859
13860    osf3*)
13861      if test yes = "$GCC"; then
13862	allow_undefined_flag=' $wl-expect_unresolved $wl\*'
13863	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'
13864      else
13865	allow_undefined_flag=' -expect_unresolved \*'
13866	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'
13867      fi
13868      archive_cmds_need_lc='no'
13869      hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
13870      hardcode_libdir_separator=:
13871      ;;
13872
13873    osf4* | osf5*)	# as osf3* with the addition of -msym flag
13874      if test yes = "$GCC"; then
13875	allow_undefined_flag=' $wl-expect_unresolved $wl\*'
13876	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'
13877	hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
13878      else
13879	allow_undefined_flag=' -expect_unresolved \*'
13880	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'
13881	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~
13882          $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'
13883
13884	# Both c and cxx compiler support -rpath directly
13885	hardcode_libdir_flag_spec='-rpath $libdir'
13886      fi
13887      archive_cmds_need_lc='no'
13888      hardcode_libdir_separator=:
13889      ;;
13890
13891    solaris*)
13892      no_undefined_flag=' -z defs'
13893      if test yes = "$GCC"; then
13894	wlarc='$wl'
13895	archive_cmds='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
13896	archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
13897          $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'
13898      else
13899	case `$CC -V 2>&1` in
13900	*"Compilers 5.0"*)
13901	  wlarc=''
13902	  archive_cmds='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags'
13903	  archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
13904            $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
13905	  ;;
13906	*)
13907	  wlarc='$wl'
13908	  archive_cmds='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags'
13909	  archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
13910            $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
13911	  ;;
13912	esac
13913      fi
13914      hardcode_libdir_flag_spec='-R$libdir'
13915      hardcode_shlibpath_var=no
13916      case $host_os in
13917      solaris2.[0-5] | solaris2.[0-5].*) ;;
13918      *)
13919	# The compiler driver will combine and reorder linker options,
13920	# but understands '-z linker_flag'.  GCC discards it without '$wl',
13921	# but is careful enough not to reorder.
13922	# Supported since Solaris 2.6 (maybe 2.5.1?)
13923	if test yes = "$GCC"; then
13924	  whole_archive_flag_spec='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract'
13925	else
13926	  whole_archive_flag_spec='-z allextract$convenience -z defaultextract'
13927	fi
13928	;;
13929      esac
13930      link_all_deplibs=yes
13931      ;;
13932
13933    sunos4*)
13934      if test sequent = "$host_vendor"; then
13935	# Use $CC to link under sequent, because it throws in some extra .o
13936	# files that make .init and .fini sections work.
13937	archive_cmds='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags'
13938      else
13939	archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
13940      fi
13941      hardcode_libdir_flag_spec='-L$libdir'
13942      hardcode_direct=yes
13943      hardcode_minus_L=yes
13944      hardcode_shlibpath_var=no
13945      ;;
13946
13947    sysv4)
13948      case $host_vendor in
13949	sni)
13950	  archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
13951	  hardcode_direct=yes # is this really true???
13952	;;
13953	siemens)
13954	  ## LD is ld it makes a PLAMLIB
13955	  ## CC just makes a GrossModule.
13956	  archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
13957	  reload_cmds='$CC -r -o $output$reload_objs'
13958	  hardcode_direct=no
13959        ;;
13960	motorola)
13961	  archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
13962	  hardcode_direct=no #Motorola manual says yes, but my tests say they lie
13963	;;
13964      esac
13965      runpath_var='LD_RUN_PATH'
13966      hardcode_shlibpath_var=no
13967      ;;
13968
13969    sysv4.3*)
13970      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
13971      hardcode_shlibpath_var=no
13972      export_dynamic_flag_spec='-Bexport'
13973      ;;
13974
13975    sysv4*MP*)
13976      if test -d /usr/nec; then
13977	archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
13978	hardcode_shlibpath_var=no
13979	runpath_var=LD_RUN_PATH
13980	hardcode_runpath_var=yes
13981	ld_shlibs=yes
13982      fi
13983      ;;
13984
13985    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*)
13986      no_undefined_flag='$wl-z,text'
13987      archive_cmds_need_lc=no
13988      hardcode_shlibpath_var=no
13989      runpath_var='LD_RUN_PATH'
13990
13991      if test yes = "$GCC"; then
13992	archive_cmds='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
13993	archive_expsym_cmds='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
13994      else
13995	archive_cmds='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
13996	archive_expsym_cmds='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
13997      fi
13998      ;;
13999
14000    sysv5* | sco3.2v5* | sco5v6*)
14001      # Note: We CANNOT use -z defs as we might desire, because we do not
14002      # link with -lc, and that would cause any symbols used from libc to
14003      # always be unresolved, which means just about no library would
14004      # ever link correctly.  If we're not using GNU ld we use -z text
14005      # though, which does catch some bad symbols but isn't as heavy-handed
14006      # as -z defs.
14007      no_undefined_flag='$wl-z,text'
14008      allow_undefined_flag='$wl-z,nodefs'
14009      archive_cmds_need_lc=no
14010      hardcode_shlibpath_var=no
14011      hardcode_libdir_flag_spec='$wl-R,$libdir'
14012      hardcode_libdir_separator=':'
14013      link_all_deplibs=yes
14014      export_dynamic_flag_spec='$wl-Bexport'
14015      runpath_var='LD_RUN_PATH'
14016
14017      if test yes = "$GCC"; then
14018	archive_cmds='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
14019	archive_expsym_cmds='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
14020      else
14021	archive_cmds='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
14022	archive_expsym_cmds='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
14023      fi
14024      ;;
14025
14026    uts4*)
14027      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
14028      hardcode_libdir_flag_spec='-L$libdir'
14029      hardcode_shlibpath_var=no
14030      ;;
14031
14032    *)
14033      ld_shlibs=no
14034      ;;
14035    esac
14036
14037    if test sni = "$host_vendor"; then
14038      case $host in
14039      sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
14040	export_dynamic_flag_spec='$wl-Blargedynsym'
14041	;;
14042      esac
14043    fi
14044  fi
14045
14046{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5
14047printf "%s\n" "$ld_shlibs" >&6; }
14048test no = "$ld_shlibs" && can_build_shared=no
14049
14050with_gnu_ld=$with_gnu_ld
14051
14052
14053
14054
14055
14056
14057
14058
14059
14060
14061
14062
14063
14064
14065
14066#
14067# Do we need to explicitly link libc?
14068#
14069case "x$archive_cmds_need_lc" in
14070x|xyes)
14071  # Assume -lc should be added
14072  archive_cmds_need_lc=yes
14073
14074  if test yes,yes = "$GCC,$enable_shared"; then
14075    case $archive_cmds in
14076    *'~'*)
14077      # FIXME: we may have to deal with multi-command sequences.
14078      ;;
14079    '$CC '*)
14080      # Test whether the compiler implicitly links with -lc since on some
14081      # systems, -lgcc has to come before -lc. If gcc already passes -lc
14082      # to ld, don't add -lc before -lgcc.
14083      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5
14084printf %s "checking whether -lc should be explicitly linked in... " >&6; }
14085if test ${lt_cv_archive_cmds_need_lc+y}
14086then :
14087  printf %s "(cached) " >&6
14088else case e in #(
14089  e) $RM conftest*
14090	echo "$lt_simple_compile_test_code" > conftest.$ac_ext
14091
14092	if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
14093  (eval $ac_compile) 2>&5
14094  ac_status=$?
14095  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
14096  test $ac_status = 0; } 2>conftest.err; then
14097	  soname=conftest
14098	  lib=conftest
14099	  libobjs=conftest.$ac_objext
14100	  deplibs=
14101	  wl=$lt_prog_compiler_wl
14102	  pic_flag=$lt_prog_compiler_pic
14103	  compiler_flags=-v
14104	  linker_flags=-v
14105	  verstring=
14106	  output_objdir=.
14107	  libname=conftest
14108	  lt_save_allow_undefined_flag=$allow_undefined_flag
14109	  allow_undefined_flag=
14110	  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5
14111  (eval $archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5
14112  ac_status=$?
14113  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
14114  test $ac_status = 0; }
14115	  then
14116	    lt_cv_archive_cmds_need_lc=no
14117	  else
14118	    lt_cv_archive_cmds_need_lc=yes
14119	  fi
14120	  allow_undefined_flag=$lt_save_allow_undefined_flag
14121	else
14122	  cat conftest.err 1>&5
14123	fi
14124	$RM conftest*
14125	 ;;
14126esac
14127fi
14128{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc" >&5
14129printf "%s\n" "$lt_cv_archive_cmds_need_lc" >&6; }
14130      archive_cmds_need_lc=$lt_cv_archive_cmds_need_lc
14131      ;;
14132    esac
14133  fi
14134  ;;
14135esac
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
14245
14246
14247
14248
14249
14250
14251
14252
14253
14254
14255
14256
14257
14258
14259
14260
14261
14262
14263
14264
14265
14266
14267
14268
14269
14270
14271
14272
14273
14274
14275
14276
14277
14278
14279
14280
14281
14282
14283
14284
14285
14286
14287
14288  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5
14289printf %s "checking dynamic linker characteristics... " >&6; }
14290
14291if test yes = "$GCC"; then
14292  case $host_os in
14293    darwin*) lt_awk_arg='/^libraries:/,/LR/' ;;
14294    *) lt_awk_arg='/^libraries:/' ;;
14295  esac
14296  case $host_os in
14297    mingw* | cegcc*) lt_sed_strip_eq='s|=\([A-Za-z]:\)|\1|g' ;;
14298    *) lt_sed_strip_eq='s|=/|/|g' ;;
14299  esac
14300  lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq`
14301  case $lt_search_path_spec in
14302  *\;*)
14303    # if the path contains ";" then we assume it to be the separator
14304    # otherwise default to the standard path separator (i.e. ":") - it is
14305    # assumed that no part of a normal pathname contains ";" but that should
14306    # okay in the real world where ";" in dirpaths is itself problematic.
14307    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'`
14308    ;;
14309  *)
14310    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"`
14311    ;;
14312  esac
14313  # Ok, now we have the path, separated by spaces, we can step through it
14314  # and add multilib dir if necessary...
14315  lt_tmp_lt_search_path_spec=
14316  lt_multi_os_dir=/`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
14317  # ...but if some path component already ends with the multilib dir we assume
14318  # that all is fine and trust -print-search-dirs as is (GCC 4.2? or newer).
14319  case "$lt_multi_os_dir; $lt_search_path_spec " in
14320  "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*)
14321    lt_multi_os_dir=
14322    ;;
14323  esac
14324  for lt_sys_path in $lt_search_path_spec; do
14325    if test -d "$lt_sys_path$lt_multi_os_dir"; then
14326      lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path$lt_multi_os_dir"
14327    elif test -n "$lt_multi_os_dir"; then
14328      test -d "$lt_sys_path" && \
14329	lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
14330    fi
14331  done
14332  lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk '
14333BEGIN {RS = " "; FS = "/|\n";} {
14334  lt_foo = "";
14335  lt_count = 0;
14336  for (lt_i = NF; lt_i > 0; lt_i--) {
14337    if ($lt_i != "" && $lt_i != ".") {
14338      if ($lt_i == "..") {
14339        lt_count++;
14340      } else {
14341        if (lt_count == 0) {
14342          lt_foo = "/" $lt_i lt_foo;
14343        } else {
14344          lt_count--;
14345        }
14346      }
14347    }
14348  }
14349  if (lt_foo != "") { lt_freq[lt_foo]++; }
14350  if (lt_freq[lt_foo] == 1) { print lt_foo; }
14351}'`
14352  # AWK program above erroneously prepends '/' to C:/dos/paths
14353  # for these hosts.
14354  case $host_os in
14355    mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\
14356      $SED 's|/\([A-Za-z]:\)|\1|g'` ;;
14357  esac
14358  sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP`
14359else
14360  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
14361fi
14362library_names_spec=
14363libname_spec='lib$name'
14364soname_spec=
14365shrext_cmds=.so
14366postinstall_cmds=
14367postuninstall_cmds=
14368finish_cmds=
14369finish_eval=
14370shlibpath_var=
14371shlibpath_overrides_runpath=unknown
14372version_type=none
14373dynamic_linker="$host_os ld.so"
14374sys_lib_dlsearch_path_spec="/lib /usr/lib"
14375need_lib_prefix=unknown
14376hardcode_into_libs=no
14377
14378# when you set need_version to no, make sure it does not cause -set_version
14379# flags to be left without arguments
14380need_version=unknown
14381
14382
14383
14384case $host_os in
14385aix3*)
14386  version_type=linux # correct to gnu/linux during the next big refactor
14387  library_names_spec='$libname$release$shared_ext$versuffix $libname.a'
14388  shlibpath_var=LIBPATH
14389
14390  # AIX 3 has no versioning support, so we append a major version to the name.
14391  soname_spec='$libname$release$shared_ext$major'
14392  ;;
14393
14394aix[4-9]*)
14395  version_type=linux # correct to gnu/linux during the next big refactor
14396  need_lib_prefix=no
14397  need_version=no
14398  hardcode_into_libs=yes
14399  if test ia64 = "$host_cpu"; then
14400    # AIX 5 supports IA64
14401    library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext'
14402    shlibpath_var=LD_LIBRARY_PATH
14403  else
14404    # With GCC up to 2.95.x, collect2 would create an import file
14405    # for dependence libraries.  The import file would start with
14406    # the line '#! .'.  This would cause the generated library to
14407    # depend on '.', always an invalid library.  This was fixed in
14408    # development snapshots of GCC prior to 3.0.
14409    case $host_os in
14410      aix4 | aix4.[01] | aix4.[01].*)
14411      if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
14412	   echo ' yes '
14413	   echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then
14414	:
14415      else
14416	can_build_shared=no
14417      fi
14418      ;;
14419    esac
14420    # Using Import Files as archive members, it is possible to support
14421    # filename-based versioning of shared library archives on AIX. While
14422    # this would work for both with and without runtime linking, it will
14423    # prevent static linking of such archives. So we do filename-based
14424    # shared library versioning with .so extension only, which is used
14425    # when both runtime linking and shared linking is enabled.
14426    # Unfortunately, runtime linking may impact performance, so we do
14427    # not want this to be the default eventually. Also, we use the
14428    # versioned .so libs for executables only if there is the -brtl
14429    # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only.
14430    # To allow for filename-based versioning support, we need to create
14431    # libNAME.so.V as an archive file, containing:
14432    # *) an Import File, referring to the versioned filename of the
14433    #    archive as well as the shared archive member, telling the
14434    #    bitwidth (32 or 64) of that shared object, and providing the
14435    #    list of exported symbols of that shared object, eventually
14436    #    decorated with the 'weak' keyword
14437    # *) the shared object with the F_LOADONLY flag set, to really avoid
14438    #    it being seen by the linker.
14439    # At run time we better use the real file rather than another symlink,
14440    # but for link time we create the symlink libNAME.so -> libNAME.so.V
14441
14442    case $with_aix_soname,$aix_use_runtimelinking in
14443    # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct
14444    # soname into executable. Probably we can add versioning support to
14445    # collect2, so additional links can be useful in future.
14446    aix,yes) # traditional libtool
14447      dynamic_linker='AIX unversionable lib.so'
14448      # If using run time linking (on AIX 4.2 or later) use lib<name>.so
14449      # instead of lib<name>.a to let people know that these are not
14450      # typical AIX shared libraries.
14451      library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
14452      ;;
14453    aix,no) # traditional AIX only
14454      dynamic_linker='AIX lib.a(lib.so.V)'
14455      # We preserve .a as extension for shared libraries through AIX4.2
14456      # and later when we are not doing run time linking.
14457      library_names_spec='$libname$release.a $libname.a'
14458      soname_spec='$libname$release$shared_ext$major'
14459      ;;
14460    svr4,*) # full svr4 only
14461      dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o)"
14462      library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
14463      # We do not specify a path in Import Files, so LIBPATH fires.
14464      shlibpath_overrides_runpath=yes
14465      ;;
14466    *,yes) # both, prefer svr4
14467      dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o), lib.a(lib.so.V)"
14468      library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
14469      # unpreferred sharedlib libNAME.a needs extra handling
14470      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"'
14471      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"'
14472      # We do not specify a path in Import Files, so LIBPATH fires.
14473      shlibpath_overrides_runpath=yes
14474      ;;
14475    *,no) # both, prefer aix
14476      dynamic_linker="AIX lib.a(lib.so.V), lib.so.V($shared_archive_member_spec.o)"
14477      library_names_spec='$libname$release.a $libname.a'
14478      soname_spec='$libname$release$shared_ext$major'
14479      # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling
14480      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)'
14481      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"'
14482      ;;
14483    esac
14484    shlibpath_var=LIBPATH
14485  fi
14486  ;;
14487
14488amigaos*)
14489  case $host_cpu in
14490  powerpc)
14491    # Since July 2007 AmigaOS4 officially supports .so libraries.
14492    # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
14493    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
14494    ;;
14495  m68k)
14496    library_names_spec='$libname.ixlibrary $libname.a'
14497    # Create ${libname}_ixlibrary.a entries in /sys/libs.
14498    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'
14499    ;;
14500  esac
14501  ;;
14502
14503beos*)
14504  library_names_spec='$libname$shared_ext'
14505  dynamic_linker="$host_os ld.so"
14506  shlibpath_var=LIBRARY_PATH
14507  ;;
14508
14509bsdi[45]*)
14510  version_type=linux # correct to gnu/linux during the next big refactor
14511  need_version=no
14512  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
14513  soname_spec='$libname$release$shared_ext$major'
14514  finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
14515  shlibpath_var=LD_LIBRARY_PATH
14516  sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
14517  sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
14518  # the default ld.so.conf also contains /usr/contrib/lib and
14519  # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
14520  # libtool to hard-code these into programs
14521  ;;
14522
14523cygwin* | mingw* | pw32* | cegcc*)
14524  version_type=windows
14525  shrext_cmds=.dll
14526  need_version=no
14527  need_lib_prefix=no
14528
14529  case $GCC,$cc_basename in
14530  yes,*)
14531    # gcc
14532    library_names_spec='$libname.dll.a'
14533    # DLL is installed to $(libdir)/../bin by postinstall_cmds
14534    postinstall_cmds='base_file=`basename \$file`~
14535      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
14536      dldir=$destdir/`dirname \$dlpath`~
14537      test -d \$dldir || mkdir -p \$dldir~
14538      $install_prog $dir/$dlname \$dldir/$dlname~
14539      chmod a+x \$dldir/$dlname~
14540      if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
14541        eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
14542      fi'
14543    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
14544      dlpath=$dir/\$dldll~
14545       $RM \$dlpath'
14546    shlibpath_overrides_runpath=yes
14547
14548    case $host_os in
14549    cygwin*)
14550      # Cygwin DLLs use 'cyg' prefix rather than 'lib'
14551      soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
14552
14553      sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"
14554      ;;
14555    mingw* | cegcc*)
14556      # MinGW DLLs use traditional 'lib' prefix
14557      soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
14558      ;;
14559    pw32*)
14560      # pw32 DLLs use 'pw' prefix rather than 'lib'
14561      library_names_spec='`echo $libname | sed -e 's/^lib/pw/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
14562      ;;
14563    esac
14564    dynamic_linker='Win32 ld.exe'
14565    ;;
14566
14567  *,cl*)
14568    # Native MSVC
14569    libname_spec='$name'
14570    soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
14571    library_names_spec='$libname.dll.lib'
14572
14573    case $build_os in
14574    mingw*)
14575      sys_lib_search_path_spec=
14576      lt_save_ifs=$IFS
14577      IFS=';'
14578      for lt_path in $LIB
14579      do
14580        IFS=$lt_save_ifs
14581        # Let DOS variable expansion print the short 8.3 style file name.
14582        lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"`
14583        sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path"
14584      done
14585      IFS=$lt_save_ifs
14586      # Convert to MSYS style.
14587      sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'`
14588      ;;
14589    cygwin*)
14590      # Convert to unix form, then to dos form, then back to unix form
14591      # but this time dos style (no spaces!) so that the unix form looks
14592      # like /cygdrive/c/PROGRA~1:/cygdr...
14593      sys_lib_search_path_spec=`cygpath --path --unix "$LIB"`
14594      sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null`
14595      sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
14596      ;;
14597    *)
14598      sys_lib_search_path_spec=$LIB
14599      if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then
14600        # It is most probably a Windows format PATH.
14601        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
14602      else
14603        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
14604      fi
14605      # FIXME: find the short name or the path components, as spaces are
14606      # common. (e.g. "Program Files" -> "PROGRA~1")
14607      ;;
14608    esac
14609
14610    # DLL is installed to $(libdir)/../bin by postinstall_cmds
14611    postinstall_cmds='base_file=`basename \$file`~
14612      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
14613      dldir=$destdir/`dirname \$dlpath`~
14614      test -d \$dldir || mkdir -p \$dldir~
14615      $install_prog $dir/$dlname \$dldir/$dlname'
14616    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
14617      dlpath=$dir/\$dldll~
14618       $RM \$dlpath'
14619    shlibpath_overrides_runpath=yes
14620    dynamic_linker='Win32 link.exe'
14621    ;;
14622
14623  *)
14624    # Assume MSVC wrapper
14625    library_names_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext $libname.lib'
14626    dynamic_linker='Win32 ld.exe'
14627    ;;
14628  esac
14629  # FIXME: first we should search . and the directory the executable is in
14630  shlibpath_var=PATH
14631  ;;
14632
14633darwin* | rhapsody*)
14634  dynamic_linker="$host_os dyld"
14635  version_type=darwin
14636  need_lib_prefix=no
14637  need_version=no
14638  library_names_spec='$libname$release$major$shared_ext $libname$shared_ext'
14639  soname_spec='$libname$release$major$shared_ext'
14640  shlibpath_overrides_runpath=yes
14641  shlibpath_var=DYLD_LIBRARY_PATH
14642  shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
14643
14644  sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"
14645  sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
14646  ;;
14647
14648dgux*)
14649  version_type=linux # correct to gnu/linux during the next big refactor
14650  need_lib_prefix=no
14651  need_version=no
14652  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
14653  soname_spec='$libname$release$shared_ext$major'
14654  shlibpath_var=LD_LIBRARY_PATH
14655  ;;
14656
14657freebsd* | dragonfly*)
14658  # DragonFly does not have aout.  When/if they implement a new
14659  # versioning mechanism, adjust this.
14660  if test -x /usr/bin/objformat; then
14661    objformat=`/usr/bin/objformat`
14662  else
14663    case $host_os in
14664    freebsd[23].*) objformat=aout ;;
14665    *) objformat=elf ;;
14666    esac
14667  fi
14668  version_type=freebsd-$objformat
14669  case $version_type in
14670    freebsd-elf*)
14671      library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
14672      soname_spec='$libname$release$shared_ext$major'
14673      need_version=no
14674      need_lib_prefix=no
14675      ;;
14676    freebsd-*)
14677      library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
14678      need_version=yes
14679      ;;
14680  esac
14681  shlibpath_var=LD_LIBRARY_PATH
14682  case $host_os in
14683  freebsd2.*)
14684    shlibpath_overrides_runpath=yes
14685    ;;
14686  freebsd3.[01]* | freebsdelf3.[01]*)
14687    shlibpath_overrides_runpath=yes
14688    hardcode_into_libs=yes
14689    ;;
14690  freebsd3.[2-9]* | freebsdelf3.[2-9]* | \
14691  freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1)
14692    shlibpath_overrides_runpath=no
14693    hardcode_into_libs=yes
14694    ;;
14695  *) # from 4.6 on, and DragonFly
14696    shlibpath_overrides_runpath=yes
14697    hardcode_into_libs=yes
14698    ;;
14699  esac
14700  ;;
14701
14702haiku*)
14703  version_type=linux # correct to gnu/linux during the next big refactor
14704  need_lib_prefix=no
14705  need_version=no
14706  dynamic_linker="$host_os runtime_loader"
14707  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
14708  soname_spec='$libname$release$shared_ext$major'
14709  shlibpath_var=LIBRARY_PATH
14710  shlibpath_overrides_runpath=no
14711  sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
14712  hardcode_into_libs=yes
14713  ;;
14714
14715hpux9* | hpux10* | hpux11*)
14716  # Give a soname corresponding to the major version so that dld.sl refuses to
14717  # link against other versions.
14718  version_type=sunos
14719  need_lib_prefix=no
14720  need_version=no
14721  case $host_cpu in
14722  ia64*)
14723    shrext_cmds='.so'
14724    hardcode_into_libs=yes
14725    dynamic_linker="$host_os dld.so"
14726    shlibpath_var=LD_LIBRARY_PATH
14727    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
14728    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
14729    soname_spec='$libname$release$shared_ext$major'
14730    if test 32 = "$HPUX_IA64_MODE"; then
14731      sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
14732      sys_lib_dlsearch_path_spec=/usr/lib/hpux32
14733    else
14734      sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
14735      sys_lib_dlsearch_path_spec=/usr/lib/hpux64
14736    fi
14737    ;;
14738  hppa*64*)
14739    shrext_cmds='.sl'
14740    hardcode_into_libs=yes
14741    dynamic_linker="$host_os dld.sl"
14742    shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
14743    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
14744    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
14745    soname_spec='$libname$release$shared_ext$major'
14746    sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
14747    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
14748    ;;
14749  *)
14750    shrext_cmds='.sl'
14751    dynamic_linker="$host_os dld.sl"
14752    shlibpath_var=SHLIB_PATH
14753    shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
14754    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
14755    soname_spec='$libname$release$shared_ext$major'
14756    ;;
14757  esac
14758  # HP-UX runs *really* slowly unless shared libraries are mode 555, ...
14759  postinstall_cmds='chmod 555 $lib'
14760  # or fails outright, so override atomically:
14761  install_override_mode=555
14762  ;;
14763
14764interix[3-9]*)
14765  version_type=linux # correct to gnu/linux during the next big refactor
14766  need_lib_prefix=no
14767  need_version=no
14768  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
14769  soname_spec='$libname$release$shared_ext$major'
14770  dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
14771  shlibpath_var=LD_LIBRARY_PATH
14772  shlibpath_overrides_runpath=no
14773  hardcode_into_libs=yes
14774  ;;
14775
14776irix5* | irix6* | nonstopux*)
14777  case $host_os in
14778    nonstopux*) version_type=nonstopux ;;
14779    *)
14780	if test yes = "$lt_cv_prog_gnu_ld"; then
14781		version_type=linux # correct to gnu/linux during the next big refactor
14782	else
14783		version_type=irix
14784	fi ;;
14785  esac
14786  need_lib_prefix=no
14787  need_version=no
14788  soname_spec='$libname$release$shared_ext$major'
14789  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext'
14790  case $host_os in
14791  irix5* | nonstopux*)
14792    libsuff= shlibsuff=
14793    ;;
14794  *)
14795    case $LD in # libtool.m4 will add one of these switches to LD
14796    *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
14797      libsuff= shlibsuff= libmagic=32-bit;;
14798    *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
14799      libsuff=32 shlibsuff=N32 libmagic=N32;;
14800    *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
14801      libsuff=64 shlibsuff=64 libmagic=64-bit;;
14802    *) libsuff= shlibsuff= libmagic=never-match;;
14803    esac
14804    ;;
14805  esac
14806  shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
14807  shlibpath_overrides_runpath=no
14808  sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff"
14809  sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff"
14810  hardcode_into_libs=yes
14811  ;;
14812
14813# No shared lib support for Linux oldld, aout, or coff.
14814linux*oldld* | linux*aout* | linux*coff*)
14815  dynamic_linker=no
14816  ;;
14817
14818linux*android*)
14819  version_type=none # Android doesn't support versioned libraries.
14820  need_lib_prefix=no
14821  need_version=no
14822  library_names_spec='$libname$release$shared_ext'
14823  soname_spec='$libname$release$shared_ext'
14824  finish_cmds=
14825  shlibpath_var=LD_LIBRARY_PATH
14826  shlibpath_overrides_runpath=yes
14827
14828  # This implies no fast_install, which is unacceptable.
14829  # Some rework will be needed to allow for fast_install
14830  # before this can be enabled.
14831  hardcode_into_libs=yes
14832
14833  dynamic_linker='Android linker'
14834  # Don't embed -rpath directories since the linker doesn't support them.
14835  hardcode_libdir_flag_spec='-L$libdir'
14836  ;;
14837
14838# This must be glibc/ELF.
14839linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
14840  version_type=linux # correct to gnu/linux during the next big refactor
14841  need_lib_prefix=no
14842  need_version=no
14843  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
14844  soname_spec='$libname$release$shared_ext$major'
14845  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
14846  shlibpath_var=LD_LIBRARY_PATH
14847  shlibpath_overrides_runpath=no
14848
14849  # Some binutils ld are patched to set DT_RUNPATH
14850  if test ${lt_cv_shlibpath_overrides_runpath+y}
14851then :
14852  printf %s "(cached) " >&6
14853else case e in #(
14854  e) lt_cv_shlibpath_overrides_runpath=no
14855    save_LDFLAGS=$LDFLAGS
14856    save_libdir=$libdir
14857    eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \
14858	 LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\""
14859    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14860/* end confdefs.h.  */
14861
14862int
14863main (void)
14864{
14865
14866  ;
14867  return 0;
14868}
14869_ACEOF
14870if ac_fn_c_try_link "$LINENO"
14871then :
14872  if  ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null
14873then :
14874  lt_cv_shlibpath_overrides_runpath=yes
14875fi
14876fi
14877rm -f core conftest.err conftest.$ac_objext conftest.beam \
14878    conftest$ac_exeext conftest.$ac_ext
14879    LDFLAGS=$save_LDFLAGS
14880    libdir=$save_libdir
14881     ;;
14882esac
14883fi
14884
14885  shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
14886
14887  # This implies no fast_install, which is unacceptable.
14888  # Some rework will be needed to allow for fast_install
14889  # before this can be enabled.
14890  hardcode_into_libs=yes
14891
14892  # Add ABI-specific directories to the system library path.
14893  sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib"
14894
14895  # Ideally, we could use ldconfig to report *all* directores which are
14896  # searched for libraries, however this is still not possible.  Aside from not
14897  # being certain /sbin/ldconfig is available, command
14898  # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64,
14899  # even though it is searched at run-time.  Try to do the best guess by
14900  # appending ld.so.conf contents (and includes) to the search path.
14901  if test -f /etc/ld.so.conf; then
14902    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' ' '`
14903    sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra"
14904  fi
14905
14906  # We used to test for /lib/ld.so.1 and disable shared libraries on
14907  # powerpc, because MkLinux only supported shared libraries with the
14908  # GNU dynamic linker.  Since this was broken with cross compilers,
14909  # most powerpc-linux boxes support dynamic linking these days and
14910  # people can always --disable-shared, the test was removed, and we
14911  # assume the GNU/Linux dynamic linker is in use.
14912  dynamic_linker='GNU/Linux ld.so'
14913  ;;
14914
14915netbsd*)
14916  version_type=sunos
14917  need_lib_prefix=no
14918  need_version=no
14919  if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
14920    library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
14921    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
14922    dynamic_linker='NetBSD (a.out) ld.so'
14923  else
14924    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
14925    soname_spec='$libname$release$shared_ext$major'
14926    dynamic_linker='NetBSD ld.elf_so'
14927  fi
14928  shlibpath_var=LD_LIBRARY_PATH
14929  shlibpath_overrides_runpath=yes
14930  hardcode_into_libs=yes
14931  ;;
14932
14933newsos6)
14934  version_type=linux # correct to gnu/linux during the next big refactor
14935  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
14936  shlibpath_var=LD_LIBRARY_PATH
14937  shlibpath_overrides_runpath=yes
14938  ;;
14939
14940*nto* | *qnx*)
14941  version_type=qnx
14942  need_lib_prefix=no
14943  need_version=no
14944  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
14945  soname_spec='$libname$release$shared_ext$major'
14946  shlibpath_var=LD_LIBRARY_PATH
14947  shlibpath_overrides_runpath=no
14948  hardcode_into_libs=yes
14949  dynamic_linker='ldqnx.so'
14950  ;;
14951
14952openbsd* | bitrig*)
14953  version_type=sunos
14954  sys_lib_dlsearch_path_spec=/usr/lib
14955  need_lib_prefix=no
14956  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
14957    need_version=no
14958  else
14959    need_version=yes
14960  fi
14961  library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
14962  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
14963  shlibpath_var=LD_LIBRARY_PATH
14964  shlibpath_overrides_runpath=yes
14965  ;;
14966
14967os2*)
14968  libname_spec='$name'
14969  version_type=windows
14970  shrext_cmds=.dll
14971  need_version=no
14972  need_lib_prefix=no
14973  # OS/2 can only load a DLL with a base name of 8 characters or less.
14974  soname_spec='`test -n "$os2dllname" && libname="$os2dllname";
14975    v=$($ECHO $release$versuffix | tr -d .-);
14976    n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _);
14977    $ECHO $n$v`$shared_ext'
14978  library_names_spec='${libname}_dll.$libext'
14979  dynamic_linker='OS/2 ld.exe'
14980  shlibpath_var=BEGINLIBPATH
14981  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
14982  sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
14983  postinstall_cmds='base_file=`basename \$file`~
14984    dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~
14985    dldir=$destdir/`dirname \$dlpath`~
14986    test -d \$dldir || mkdir -p \$dldir~
14987    $install_prog $dir/$dlname \$dldir/$dlname~
14988    chmod a+x \$dldir/$dlname~
14989    if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
14990      eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
14991    fi'
14992  postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~
14993    dlpath=$dir/\$dldll~
14994    $RM \$dlpath'
14995  ;;
14996
14997osf3* | osf4* | osf5*)
14998  version_type=osf
14999  need_lib_prefix=no
15000  need_version=no
15001  soname_spec='$libname$release$shared_ext$major'
15002  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
15003  shlibpath_var=LD_LIBRARY_PATH
15004  sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
15005  sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
15006  ;;
15007
15008rdos*)
15009  dynamic_linker=no
15010  ;;
15011
15012solaris*)
15013  version_type=linux # correct to gnu/linux during the next big refactor
15014  need_lib_prefix=no
15015  need_version=no
15016  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
15017  soname_spec='$libname$release$shared_ext$major'
15018  shlibpath_var=LD_LIBRARY_PATH
15019  shlibpath_overrides_runpath=yes
15020  hardcode_into_libs=yes
15021  # ldd complains unless libraries are executable
15022  postinstall_cmds='chmod +x $lib'
15023  ;;
15024
15025sunos4*)
15026  version_type=sunos
15027  library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
15028  finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
15029  shlibpath_var=LD_LIBRARY_PATH
15030  shlibpath_overrides_runpath=yes
15031  if test yes = "$with_gnu_ld"; then
15032    need_lib_prefix=no
15033  fi
15034  need_version=yes
15035  ;;
15036
15037sysv4 | sysv4.3*)
15038  version_type=linux # correct to gnu/linux during the next big refactor
15039  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
15040  soname_spec='$libname$release$shared_ext$major'
15041  shlibpath_var=LD_LIBRARY_PATH
15042  case $host_vendor in
15043    sni)
15044      shlibpath_overrides_runpath=no
15045      need_lib_prefix=no
15046      runpath_var=LD_RUN_PATH
15047      ;;
15048    siemens)
15049      need_lib_prefix=no
15050      ;;
15051    motorola)
15052      need_lib_prefix=no
15053      need_version=no
15054      shlibpath_overrides_runpath=no
15055      sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
15056      ;;
15057  esac
15058  ;;
15059
15060sysv4*MP*)
15061  if test -d /usr/nec; then
15062    version_type=linux # correct to gnu/linux during the next big refactor
15063    library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext'
15064    soname_spec='$libname$shared_ext.$major'
15065    shlibpath_var=LD_LIBRARY_PATH
15066  fi
15067  ;;
15068
15069sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
15070  version_type=sco
15071  need_lib_prefix=no
15072  need_version=no
15073  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext'
15074  soname_spec='$libname$release$shared_ext$major'
15075  shlibpath_var=LD_LIBRARY_PATH
15076  shlibpath_overrides_runpath=yes
15077  hardcode_into_libs=yes
15078  if test yes = "$with_gnu_ld"; then
15079    sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
15080  else
15081    sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
15082    case $host_os in
15083      sco3.2v5*)
15084        sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
15085	;;
15086    esac
15087  fi
15088  sys_lib_dlsearch_path_spec='/usr/lib'
15089  ;;
15090
15091tpf*)
15092  # TPF is a cross-target only.  Preferred cross-host = GNU/Linux.
15093  version_type=linux # correct to gnu/linux during the next big refactor
15094  need_lib_prefix=no
15095  need_version=no
15096  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
15097  shlibpath_var=LD_LIBRARY_PATH
15098  shlibpath_overrides_runpath=no
15099  hardcode_into_libs=yes
15100  ;;
15101
15102uts4*)
15103  version_type=linux # correct to gnu/linux during the next big refactor
15104  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
15105  soname_spec='$libname$release$shared_ext$major'
15106  shlibpath_var=LD_LIBRARY_PATH
15107  ;;
15108
15109*)
15110  dynamic_linker=no
15111  ;;
15112esac
15113{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5
15114printf "%s\n" "$dynamic_linker" >&6; }
15115test no = "$dynamic_linker" && can_build_shared=no
15116
15117variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
15118if test yes = "$GCC"; then
15119  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
15120fi
15121
15122if test set = "${lt_cv_sys_lib_search_path_spec+set}"; then
15123  sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec
15124fi
15125
15126if test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then
15127  sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec
15128fi
15129
15130# remember unaugmented sys_lib_dlsearch_path content for libtool script decls...
15131configure_time_dlsearch_path=$sys_lib_dlsearch_path_spec
15132
15133# ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code
15134func_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH"
15135
15136# to be used as default LT_SYS_LIBRARY_PATH value in generated libtool
15137configure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH
15138
15139
15140
15141
15142
15143
15144
15145
15146
15147
15148
15149
15150
15151
15152
15153
15154
15155
15156
15157
15158
15159
15160
15161
15162
15163
15164
15165
15166
15167
15168
15169
15170
15171
15172
15173
15174
15175
15176
15177
15178
15179
15180
15181
15182
15183
15184
15185
15186
15187
15188
15189
15190
15191
15192
15193
15194
15195
15196
15197
15198
15199
15200
15201
15202
15203
15204
15205
15206
15207
15208
15209
15210
15211
15212
15213
15214
15215
15216
15217
15218
15219
15220
15221
15222
15223
15224
15225
15226
15227
15228
15229
15230
15231
15232
15233
15234
15235  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5
15236printf %s "checking how to hardcode library paths into programs... " >&6; }
15237hardcode_action=
15238if test -n "$hardcode_libdir_flag_spec" ||
15239   test -n "$runpath_var" ||
15240   test yes = "$hardcode_automatic"; then
15241
15242  # We can hardcode non-existent directories.
15243  if test no != "$hardcode_direct" &&
15244     # If the only mechanism to avoid hardcoding is shlibpath_var, we
15245     # have to relink, otherwise we might link with an installed library
15246     # when we should be linking with a yet-to-be-installed one
15247     ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, )" &&
15248     test no != "$hardcode_minus_L"; then
15249    # Linking always hardcodes the temporary library directory.
15250    hardcode_action=relink
15251  else
15252    # We can link without hardcoding, and we can hardcode nonexisting dirs.
15253    hardcode_action=immediate
15254  fi
15255else
15256  # We cannot hardcode anything, or else we can only hardcode existing
15257  # directories.
15258  hardcode_action=unsupported
15259fi
15260{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5
15261printf "%s\n" "$hardcode_action" >&6; }
15262
15263if test relink = "$hardcode_action" ||
15264   test yes = "$inherit_rpath"; then
15265  # Fast installation is not supported
15266  enable_fast_install=no
15267elif test yes = "$shlibpath_overrides_runpath" ||
15268     test no = "$enable_shared"; then
15269  # Fast installation is not necessary
15270  enable_fast_install=needless
15271fi
15272
15273
15274
15275
15276
15277
15278  if test yes != "$enable_dlopen"; then
15279  enable_dlopen=unknown
15280  enable_dlopen_self=unknown
15281  enable_dlopen_self_static=unknown
15282else
15283  lt_cv_dlopen=no
15284  lt_cv_dlopen_libs=
15285
15286  case $host_os in
15287  beos*)
15288    lt_cv_dlopen=load_add_on
15289    lt_cv_dlopen_libs=
15290    lt_cv_dlopen_self=yes
15291    ;;
15292
15293  mingw* | pw32* | cegcc*)
15294    lt_cv_dlopen=LoadLibrary
15295    lt_cv_dlopen_libs=
15296    ;;
15297
15298  cygwin*)
15299    lt_cv_dlopen=dlopen
15300    lt_cv_dlopen_libs=
15301    ;;
15302
15303  darwin*)
15304    # if libdl is installed we need to link against it
15305    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
15306printf %s "checking for dlopen in -ldl... " >&6; }
15307if test ${ac_cv_lib_dl_dlopen+y}
15308then :
15309  printf %s "(cached) " >&6
15310else case e in #(
15311  e) ac_check_lib_save_LIBS=$LIBS
15312LIBS="-ldl  $LIBS"
15313cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15314/* end confdefs.h.  */
15315
15316/* Override any GCC internal prototype to avoid an error.
15317   Use char because int might match the return type of a GCC
15318   builtin and then its argument prototype would still apply.
15319   The 'extern "C"' is for builds by C++ compilers;
15320   although this is not generally supported in C code supporting it here
15321   has little cost and some practical benefit (sr 110532).  */
15322#ifdef __cplusplus
15323extern "C"
15324#endif
15325char dlopen (void);
15326int
15327main (void)
15328{
15329return dlopen ();
15330  ;
15331  return 0;
15332}
15333_ACEOF
15334if ac_fn_c_try_link "$LINENO"
15335then :
15336  ac_cv_lib_dl_dlopen=yes
15337else case e in #(
15338  e) ac_cv_lib_dl_dlopen=no ;;
15339esac
15340fi
15341rm -f core conftest.err conftest.$ac_objext conftest.beam \
15342    conftest$ac_exeext conftest.$ac_ext
15343LIBS=$ac_check_lib_save_LIBS ;;
15344esac
15345fi
15346{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
15347printf "%s\n" "$ac_cv_lib_dl_dlopen" >&6; }
15348if test "x$ac_cv_lib_dl_dlopen" = xyes
15349then :
15350  lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl
15351else case e in #(
15352  e)
15353    lt_cv_dlopen=dyld
15354    lt_cv_dlopen_libs=
15355    lt_cv_dlopen_self=yes
15356     ;;
15357esac
15358fi
15359
15360    ;;
15361
15362  tpf*)
15363    # Don't try to run any link tests for TPF.  We know it's impossible
15364    # because TPF is a cross-compiler, and we know how we open DSOs.
15365    lt_cv_dlopen=dlopen
15366    lt_cv_dlopen_libs=
15367    lt_cv_dlopen_self=no
15368    ;;
15369
15370  *)
15371    ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load"
15372if test "x$ac_cv_func_shl_load" = xyes
15373then :
15374  lt_cv_dlopen=shl_load
15375else case e in #(
15376  e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
15377printf %s "checking for shl_load in -ldld... " >&6; }
15378if test ${ac_cv_lib_dld_shl_load+y}
15379then :
15380  printf %s "(cached) " >&6
15381else case e in #(
15382  e) ac_check_lib_save_LIBS=$LIBS
15383LIBS="-ldld  $LIBS"
15384cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15385/* end confdefs.h.  */
15386
15387/* Override any GCC internal prototype to avoid an error.
15388   Use char because int might match the return type of a GCC
15389   builtin and then its argument prototype would still apply.
15390   The 'extern "C"' is for builds by C++ compilers;
15391   although this is not generally supported in C code supporting it here
15392   has little cost and some practical benefit (sr 110532).  */
15393#ifdef __cplusplus
15394extern "C"
15395#endif
15396char shl_load (void);
15397int
15398main (void)
15399{
15400return shl_load ();
15401  ;
15402  return 0;
15403}
15404_ACEOF
15405if ac_fn_c_try_link "$LINENO"
15406then :
15407  ac_cv_lib_dld_shl_load=yes
15408else case e in #(
15409  e) ac_cv_lib_dld_shl_load=no ;;
15410esac
15411fi
15412rm -f core conftest.err conftest.$ac_objext conftest.beam \
15413    conftest$ac_exeext conftest.$ac_ext
15414LIBS=$ac_check_lib_save_LIBS ;;
15415esac
15416fi
15417{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
15418printf "%s\n" "$ac_cv_lib_dld_shl_load" >&6; }
15419if test "x$ac_cv_lib_dld_shl_load" = xyes
15420then :
15421  lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld
15422else case e in #(
15423  e) ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
15424if test "x$ac_cv_func_dlopen" = xyes
15425then :
15426  lt_cv_dlopen=dlopen
15427else case e in #(
15428  e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
15429printf %s "checking for dlopen in -ldl... " >&6; }
15430if test ${ac_cv_lib_dl_dlopen+y}
15431then :
15432  printf %s "(cached) " >&6
15433else case e in #(
15434  e) ac_check_lib_save_LIBS=$LIBS
15435LIBS="-ldl  $LIBS"
15436cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15437/* end confdefs.h.  */
15438
15439/* Override any GCC internal prototype to avoid an error.
15440   Use char because int might match the return type of a GCC
15441   builtin and then its argument prototype would still apply.
15442   The 'extern "C"' is for builds by C++ compilers;
15443   although this is not generally supported in C code supporting it here
15444   has little cost and some practical benefit (sr 110532).  */
15445#ifdef __cplusplus
15446extern "C"
15447#endif
15448char dlopen (void);
15449int
15450main (void)
15451{
15452return dlopen ();
15453  ;
15454  return 0;
15455}
15456_ACEOF
15457if ac_fn_c_try_link "$LINENO"
15458then :
15459  ac_cv_lib_dl_dlopen=yes
15460else case e in #(
15461  e) ac_cv_lib_dl_dlopen=no ;;
15462esac
15463fi
15464rm -f core conftest.err conftest.$ac_objext conftest.beam \
15465    conftest$ac_exeext conftest.$ac_ext
15466LIBS=$ac_check_lib_save_LIBS ;;
15467esac
15468fi
15469{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
15470printf "%s\n" "$ac_cv_lib_dl_dlopen" >&6; }
15471if test "x$ac_cv_lib_dl_dlopen" = xyes
15472then :
15473  lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl
15474else case e in #(
15475  e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5
15476printf %s "checking for dlopen in -lsvld... " >&6; }
15477if test ${ac_cv_lib_svld_dlopen+y}
15478then :
15479  printf %s "(cached) " >&6
15480else case e in #(
15481  e) ac_check_lib_save_LIBS=$LIBS
15482LIBS="-lsvld  $LIBS"
15483cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15484/* end confdefs.h.  */
15485
15486/* Override any GCC internal prototype to avoid an error.
15487   Use char because int might match the return type of a GCC
15488   builtin and then its argument prototype would still apply.
15489   The 'extern "C"' is for builds by C++ compilers;
15490   although this is not generally supported in C code supporting it here
15491   has little cost and some practical benefit (sr 110532).  */
15492#ifdef __cplusplus
15493extern "C"
15494#endif
15495char dlopen (void);
15496int
15497main (void)
15498{
15499return dlopen ();
15500  ;
15501  return 0;
15502}
15503_ACEOF
15504if ac_fn_c_try_link "$LINENO"
15505then :
15506  ac_cv_lib_svld_dlopen=yes
15507else case e in #(
15508  e) ac_cv_lib_svld_dlopen=no ;;
15509esac
15510fi
15511rm -f core conftest.err conftest.$ac_objext conftest.beam \
15512    conftest$ac_exeext conftest.$ac_ext
15513LIBS=$ac_check_lib_save_LIBS ;;
15514esac
15515fi
15516{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5
15517printf "%s\n" "$ac_cv_lib_svld_dlopen" >&6; }
15518if test "x$ac_cv_lib_svld_dlopen" = xyes
15519then :
15520  lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld
15521else case e in #(
15522  e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5
15523printf %s "checking for dld_link in -ldld... " >&6; }
15524if test ${ac_cv_lib_dld_dld_link+y}
15525then :
15526  printf %s "(cached) " >&6
15527else case e in #(
15528  e) ac_check_lib_save_LIBS=$LIBS
15529LIBS="-ldld  $LIBS"
15530cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15531/* end confdefs.h.  */
15532
15533/* Override any GCC internal prototype to avoid an error.
15534   Use char because int might match the return type of a GCC
15535   builtin and then its argument prototype would still apply.
15536   The 'extern "C"' is for builds by C++ compilers;
15537   although this is not generally supported in C code supporting it here
15538   has little cost and some practical benefit (sr 110532).  */
15539#ifdef __cplusplus
15540extern "C"
15541#endif
15542char dld_link (void);
15543int
15544main (void)
15545{
15546return dld_link ();
15547  ;
15548  return 0;
15549}
15550_ACEOF
15551if ac_fn_c_try_link "$LINENO"
15552then :
15553  ac_cv_lib_dld_dld_link=yes
15554else case e in #(
15555  e) ac_cv_lib_dld_dld_link=no ;;
15556esac
15557fi
15558rm -f core conftest.err conftest.$ac_objext conftest.beam \
15559    conftest$ac_exeext conftest.$ac_ext
15560LIBS=$ac_check_lib_save_LIBS ;;
15561esac
15562fi
15563{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5
15564printf "%s\n" "$ac_cv_lib_dld_dld_link" >&6; }
15565if test "x$ac_cv_lib_dld_dld_link" = xyes
15566then :
15567  lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld
15568fi
15569
15570	       ;;
15571esac
15572fi
15573
15574	     ;;
15575esac
15576fi
15577
15578	   ;;
15579esac
15580fi
15581
15582	 ;;
15583esac
15584fi
15585
15586       ;;
15587esac
15588fi
15589
15590    ;;
15591  esac
15592
15593  if test no = "$lt_cv_dlopen"; then
15594    enable_dlopen=no
15595  else
15596    enable_dlopen=yes
15597  fi
15598
15599  case $lt_cv_dlopen in
15600  dlopen)
15601    save_CPPFLAGS=$CPPFLAGS
15602    test yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
15603
15604    save_LDFLAGS=$LDFLAGS
15605    wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
15606
15607    save_LIBS=$LIBS
15608    LIBS="$lt_cv_dlopen_libs $LIBS"
15609
15610    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5
15611printf %s "checking whether a program can dlopen itself... " >&6; }
15612if test ${lt_cv_dlopen_self+y}
15613then :
15614  printf %s "(cached) " >&6
15615else case e in #(
15616  e) 	  if test yes = "$cross_compiling"; then :
15617  lt_cv_dlopen_self=cross
15618else
15619  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
15620  lt_status=$lt_dlunknown
15621  cat > conftest.$ac_ext <<_LT_EOF
15622#line $LINENO "configure"
15623#include "confdefs.h"
15624
15625#if HAVE_DLFCN_H
15626#include <dlfcn.h>
15627#endif
15628
15629#include <stdio.h>
15630
15631#ifdef RTLD_GLOBAL
15632#  define LT_DLGLOBAL		RTLD_GLOBAL
15633#else
15634#  ifdef DL_GLOBAL
15635#    define LT_DLGLOBAL		DL_GLOBAL
15636#  else
15637#    define LT_DLGLOBAL		0
15638#  endif
15639#endif
15640
15641/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
15642   find out it does not work in some platform. */
15643#ifndef LT_DLLAZY_OR_NOW
15644#  ifdef RTLD_LAZY
15645#    define LT_DLLAZY_OR_NOW		RTLD_LAZY
15646#  else
15647#    ifdef DL_LAZY
15648#      define LT_DLLAZY_OR_NOW		DL_LAZY
15649#    else
15650#      ifdef RTLD_NOW
15651#        define LT_DLLAZY_OR_NOW	RTLD_NOW
15652#      else
15653#        ifdef DL_NOW
15654#          define LT_DLLAZY_OR_NOW	DL_NOW
15655#        else
15656#          define LT_DLLAZY_OR_NOW	0
15657#        endif
15658#      endif
15659#    endif
15660#  endif
15661#endif
15662
15663/* When -fvisibility=hidden is used, assume the code has been annotated
15664   correspondingly for the symbols needed.  */
15665#if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
15666int fnord () __attribute__((visibility("default")));
15667#endif
15668
15669int fnord () { return 42; }
15670int main ()
15671{
15672  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
15673  int status = $lt_dlunknown;
15674
15675  if (self)
15676    {
15677      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
15678      else
15679        {
15680	  if (dlsym( self,"_fnord"))  status = $lt_dlneed_uscore;
15681          else puts (dlerror ());
15682	}
15683      /* dlclose (self); */
15684    }
15685  else
15686    puts (dlerror ());
15687
15688  return status;
15689}
15690_LT_EOF
15691  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
15692  (eval $ac_link) 2>&5
15693  ac_status=$?
15694  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
15695  test $ac_status = 0; } && test -s "conftest$ac_exeext" 2>/dev/null; then
15696    (./conftest; exit; ) >&5 2>/dev/null
15697    lt_status=$?
15698    case x$lt_status in
15699      x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;;
15700      x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;;
15701      x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;;
15702    esac
15703  else :
15704    # compilation failed
15705    lt_cv_dlopen_self=no
15706  fi
15707fi
15708rm -fr conftest*
15709
15710     ;;
15711esac
15712fi
15713{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5
15714printf "%s\n" "$lt_cv_dlopen_self" >&6; }
15715
15716    if test yes = "$lt_cv_dlopen_self"; then
15717      wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
15718      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5
15719printf %s "checking whether a statically linked program can dlopen itself... " >&6; }
15720if test ${lt_cv_dlopen_self_static+y}
15721then :
15722  printf %s "(cached) " >&6
15723else case e in #(
15724  e) 	  if test yes = "$cross_compiling"; then :
15725  lt_cv_dlopen_self_static=cross
15726else
15727  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
15728  lt_status=$lt_dlunknown
15729  cat > conftest.$ac_ext <<_LT_EOF
15730#line $LINENO "configure"
15731#include "confdefs.h"
15732
15733#if HAVE_DLFCN_H
15734#include <dlfcn.h>
15735#endif
15736
15737#include <stdio.h>
15738
15739#ifdef RTLD_GLOBAL
15740#  define LT_DLGLOBAL		RTLD_GLOBAL
15741#else
15742#  ifdef DL_GLOBAL
15743#    define LT_DLGLOBAL		DL_GLOBAL
15744#  else
15745#    define LT_DLGLOBAL		0
15746#  endif
15747#endif
15748
15749/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
15750   find out it does not work in some platform. */
15751#ifndef LT_DLLAZY_OR_NOW
15752#  ifdef RTLD_LAZY
15753#    define LT_DLLAZY_OR_NOW		RTLD_LAZY
15754#  else
15755#    ifdef DL_LAZY
15756#      define LT_DLLAZY_OR_NOW		DL_LAZY
15757#    else
15758#      ifdef RTLD_NOW
15759#        define LT_DLLAZY_OR_NOW	RTLD_NOW
15760#      else
15761#        ifdef DL_NOW
15762#          define LT_DLLAZY_OR_NOW	DL_NOW
15763#        else
15764#          define LT_DLLAZY_OR_NOW	0
15765#        endif
15766#      endif
15767#    endif
15768#  endif
15769#endif
15770
15771/* When -fvisibility=hidden is used, assume the code has been annotated
15772   correspondingly for the symbols needed.  */
15773#if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
15774int fnord () __attribute__((visibility("default")));
15775#endif
15776
15777int fnord () { return 42; }
15778int main ()
15779{
15780  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
15781  int status = $lt_dlunknown;
15782
15783  if (self)
15784    {
15785      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
15786      else
15787        {
15788	  if (dlsym( self,"_fnord"))  status = $lt_dlneed_uscore;
15789          else puts (dlerror ());
15790	}
15791      /* dlclose (self); */
15792    }
15793  else
15794    puts (dlerror ());
15795
15796  return status;
15797}
15798_LT_EOF
15799  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
15800  (eval $ac_link) 2>&5
15801  ac_status=$?
15802  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
15803  test $ac_status = 0; } && test -s "conftest$ac_exeext" 2>/dev/null; then
15804    (./conftest; exit; ) >&5 2>/dev/null
15805    lt_status=$?
15806    case x$lt_status in
15807      x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;;
15808      x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;;
15809      x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;;
15810    esac
15811  else :
15812    # compilation failed
15813    lt_cv_dlopen_self_static=no
15814  fi
15815fi
15816rm -fr conftest*
15817
15818       ;;
15819esac
15820fi
15821{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self_static" >&5
15822printf "%s\n" "$lt_cv_dlopen_self_static" >&6; }
15823    fi
15824
15825    CPPFLAGS=$save_CPPFLAGS
15826    LDFLAGS=$save_LDFLAGS
15827    LIBS=$save_LIBS
15828    ;;
15829  esac
15830
15831  case $lt_cv_dlopen_self in
15832  yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
15833  *) enable_dlopen_self=unknown ;;
15834  esac
15835
15836  case $lt_cv_dlopen_self_static in
15837  yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
15838  *) enable_dlopen_self_static=unknown ;;
15839  esac
15840fi
15841
15842
15843
15844
15845
15846
15847
15848
15849
15850
15851
15852
15853
15854
15855
15856
15857
15858striplib=
15859old_striplib=
15860{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5
15861printf %s "checking whether stripping libraries is possible... " >&6; }
15862if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
15863  test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
15864  test -z "$striplib" && striplib="$STRIP --strip-unneeded"
15865  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15866printf "%s\n" "yes" >&6; }
15867else
15868# FIXME - insert some real tests, host_os isn't really good enough
15869  case $host_os in
15870  darwin*)
15871    if test -n "$STRIP"; then
15872      striplib="$STRIP -x"
15873      old_striplib="$STRIP -S"
15874      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15875printf "%s\n" "yes" >&6; }
15876    else
15877      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
15878printf "%s\n" "no" >&6; }
15879    fi
15880    ;;
15881  *)
15882    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
15883printf "%s\n" "no" >&6; }
15884    ;;
15885  esac
15886fi
15887
15888
15889
15890
15891
15892
15893
15894
15895
15896
15897
15898
15899  # Report what library types will actually be built
15900  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5
15901printf %s "checking if libtool supports shared libraries... " >&6; }
15902  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5
15903printf "%s\n" "$can_build_shared" >&6; }
15904
15905  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5
15906printf %s "checking whether to build shared libraries... " >&6; }
15907  test no = "$can_build_shared" && enable_shared=no
15908
15909  # On AIX, shared libraries and static libraries use the same namespace, and
15910  # are all built from PIC.
15911  case $host_os in
15912  aix3*)
15913    test yes = "$enable_shared" && enable_static=no
15914    if test -n "$RANLIB"; then
15915      archive_cmds="$archive_cmds~\$RANLIB \$lib"
15916      postinstall_cmds='$RANLIB $lib'
15917    fi
15918    ;;
15919
15920  aix[4-9]*)
15921    if test ia64 != "$host_cpu"; then
15922      case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in
15923      yes,aix,yes) ;;			# shared object as lib.so file only
15924      yes,svr4,*) ;;			# shared object as lib.so archive member only
15925      yes,*) enable_static=no ;;	# shared object in lib.a archive as well
15926      esac
15927    fi
15928    ;;
15929  esac
15930  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
15931printf "%s\n" "$enable_shared" >&6; }
15932
15933  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5
15934printf %s "checking whether to build static libraries... " >&6; }
15935  # Make sure either enable_shared or enable_static is yes.
15936  test yes = "$enable_shared" || enable_static=yes
15937  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5
15938printf "%s\n" "$enable_static" >&6; }
15939
15940
15941
15942
15943fi
15944ac_ext=c
15945ac_cpp='$CPP $CPPFLAGS'
15946ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15947ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15948ac_compiler_gnu=$ac_cv_c_compiler_gnu
15949
15950CC=$lt_save_CC
15951
15952
15953
15954
15955
15956
15957
15958
15959
15960
15961
15962
15963
15964
15965
15966        ac_config_commands="$ac_config_commands libtool"
15967
15968
15969
15970
15971# Only expand once:
15972
15973
15974
15975
15976# pkg-config is only needed for these options, do not require it otherwise
15977if test "$enable_systemd" = "yes" -o "$enable_dnstap" = "yes" -o "$with_pyunbound" = "yes" -o "$with_pythonmod" = "yes"; then
15978
15979
15980
15981
15982
15983
15984
15985if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
15986	if test -n "$ac_tool_prefix"; then
15987  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
15988set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
15989{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15990printf %s "checking for $ac_word... " >&6; }
15991if test ${ac_cv_path_PKG_CONFIG+y}
15992then :
15993  printf %s "(cached) " >&6
15994else case e in #(
15995  e) case $PKG_CONFIG in
15996  [\\/]* | ?:[\\/]*)
15997  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
15998  ;;
15999  *)
16000  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16001for as_dir in $PATH
16002do
16003  IFS=$as_save_IFS
16004  case $as_dir in #(((
16005    '') as_dir=./ ;;
16006    */) ;;
16007    *) as_dir=$as_dir/ ;;
16008  esac
16009    for ac_exec_ext in '' $ac_executable_extensions; do
16010  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
16011    ac_cv_path_PKG_CONFIG="$as_dir$ac_word$ac_exec_ext"
16012    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
16013    break 2
16014  fi
16015done
16016  done
16017IFS=$as_save_IFS
16018
16019  ;;
16020esac ;;
16021esac
16022fi
16023PKG_CONFIG=$ac_cv_path_PKG_CONFIG
16024if test -n "$PKG_CONFIG"; then
16025  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
16026printf "%s\n" "$PKG_CONFIG" >&6; }
16027else
16028  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
16029printf "%s\n" "no" >&6; }
16030fi
16031
16032
16033fi
16034if test -z "$ac_cv_path_PKG_CONFIG"; then
16035  ac_pt_PKG_CONFIG=$PKG_CONFIG
16036  # Extract the first word of "pkg-config", so it can be a program name with args.
16037set dummy pkg-config; ac_word=$2
16038{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16039printf %s "checking for $ac_word... " >&6; }
16040if test ${ac_cv_path_ac_pt_PKG_CONFIG+y}
16041then :
16042  printf %s "(cached) " >&6
16043else case e in #(
16044  e) case $ac_pt_PKG_CONFIG in
16045  [\\/]* | ?:[\\/]*)
16046  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
16047  ;;
16048  *)
16049  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16050for as_dir in $PATH
16051do
16052  IFS=$as_save_IFS
16053  case $as_dir in #(((
16054    '') as_dir=./ ;;
16055    */) ;;
16056    *) as_dir=$as_dir/ ;;
16057  esac
16058    for ac_exec_ext in '' $ac_executable_extensions; do
16059  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
16060    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir$ac_word$ac_exec_ext"
16061    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
16062    break 2
16063  fi
16064done
16065  done
16066IFS=$as_save_IFS
16067
16068  ;;
16069esac ;;
16070esac
16071fi
16072ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
16073if test -n "$ac_pt_PKG_CONFIG"; then
16074  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
16075printf "%s\n" "$ac_pt_PKG_CONFIG" >&6; }
16076else
16077  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
16078printf "%s\n" "no" >&6; }
16079fi
16080
16081  if test "x$ac_pt_PKG_CONFIG" = x; then
16082    PKG_CONFIG=""
16083  else
16084    case $cross_compiling:$ac_tool_warned in
16085yes:)
16086{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
16087printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
16088ac_tool_warned=yes ;;
16089esac
16090    PKG_CONFIG=$ac_pt_PKG_CONFIG
16091  fi
16092else
16093  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
16094fi
16095
16096fi
16097if test -n "$PKG_CONFIG"; then
16098	_pkg_min_version=0.9.0
16099	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
16100printf %s "checking pkg-config is at least version $_pkg_min_version... " >&6; }
16101	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
16102		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16103printf "%s\n" "yes" >&6; }
16104	else
16105		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
16106printf "%s\n" "no" >&6; }
16107		PKG_CONFIG=""
16108	fi
16109fi
16110fi
16111
16112# Checks for header files.
16113ac_fn_c_check_header_compile "$LINENO" "stdarg.h" "ac_cv_header_stdarg_h" "$ac_includes_default
16114"
16115if test "x$ac_cv_header_stdarg_h" = xyes
16116then :
16117  printf "%s\n" "#define HAVE_STDARG_H 1" >>confdefs.h
16118
16119fi
16120ac_fn_c_check_header_compile "$LINENO" "stdbool.h" "ac_cv_header_stdbool_h" "$ac_includes_default
16121"
16122if test "x$ac_cv_header_stdbool_h" = xyes
16123then :
16124  printf "%s\n" "#define HAVE_STDBOOL_H 1" >>confdefs.h
16125
16126fi
16127ac_fn_c_check_header_compile "$LINENO" "netinet/in.h" "ac_cv_header_netinet_in_h" "$ac_includes_default
16128"
16129if test "x$ac_cv_header_netinet_in_h" = xyes
16130then :
16131  printf "%s\n" "#define HAVE_NETINET_IN_H 1" >>confdefs.h
16132
16133fi
16134ac_fn_c_check_header_compile "$LINENO" "netinet/tcp.h" "ac_cv_header_netinet_tcp_h" "$ac_includes_default
16135"
16136if test "x$ac_cv_header_netinet_tcp_h" = xyes
16137then :
16138  printf "%s\n" "#define HAVE_NETINET_TCP_H 1" >>confdefs.h
16139
16140fi
16141ac_fn_c_check_header_compile "$LINENO" "sys/param.h" "ac_cv_header_sys_param_h" "$ac_includes_default
16142"
16143if test "x$ac_cv_header_sys_param_h" = xyes
16144then :
16145  printf "%s\n" "#define HAVE_SYS_PARAM_H 1" >>confdefs.h
16146
16147fi
16148ac_fn_c_check_header_compile "$LINENO" "sys/select.h" "ac_cv_header_sys_select_h" "$ac_includes_default
16149"
16150if test "x$ac_cv_header_sys_select_h" = xyes
16151then :
16152  printf "%s\n" "#define HAVE_SYS_SELECT_H 1" >>confdefs.h
16153
16154fi
16155ac_fn_c_check_header_compile "$LINENO" "sys/socket.h" "ac_cv_header_sys_socket_h" "$ac_includes_default
16156"
16157if test "x$ac_cv_header_sys_socket_h" = xyes
16158then :
16159  printf "%s\n" "#define HAVE_SYS_SOCKET_H 1" >>confdefs.h
16160
16161fi
16162ac_fn_c_check_header_compile "$LINENO" "sys/un.h" "ac_cv_header_sys_un_h" "$ac_includes_default
16163"
16164if test "x$ac_cv_header_sys_un_h" = xyes
16165then :
16166  printf "%s\n" "#define HAVE_SYS_UN_H 1" >>confdefs.h
16167
16168fi
16169ac_fn_c_check_header_compile "$LINENO" "sys/uio.h" "ac_cv_header_sys_uio_h" "$ac_includes_default
16170"
16171if test "x$ac_cv_header_sys_uio_h" = xyes
16172then :
16173  printf "%s\n" "#define HAVE_SYS_UIO_H 1" >>confdefs.h
16174
16175fi
16176ac_fn_c_check_header_compile "$LINENO" "sys/resource.h" "ac_cv_header_sys_resource_h" "$ac_includes_default
16177"
16178if test "x$ac_cv_header_sys_resource_h" = xyes
16179then :
16180  printf "%s\n" "#define HAVE_SYS_RESOURCE_H 1" >>confdefs.h
16181
16182fi
16183ac_fn_c_check_header_compile "$LINENO" "arpa/inet.h" "ac_cv_header_arpa_inet_h" "$ac_includes_default
16184"
16185if test "x$ac_cv_header_arpa_inet_h" = xyes
16186then :
16187  printf "%s\n" "#define HAVE_ARPA_INET_H 1" >>confdefs.h
16188
16189fi
16190ac_fn_c_check_header_compile "$LINENO" "syslog.h" "ac_cv_header_syslog_h" "$ac_includes_default
16191"
16192if test "x$ac_cv_header_syslog_h" = xyes
16193then :
16194  printf "%s\n" "#define HAVE_SYSLOG_H 1" >>confdefs.h
16195
16196fi
16197ac_fn_c_check_header_compile "$LINENO" "netdb.h" "ac_cv_header_netdb_h" "$ac_includes_default
16198"
16199if test "x$ac_cv_header_netdb_h" = xyes
16200then :
16201  printf "%s\n" "#define HAVE_NETDB_H 1" >>confdefs.h
16202
16203fi
16204ac_fn_c_check_header_compile "$LINENO" "sys/wait.h" "ac_cv_header_sys_wait_h" "$ac_includes_default
16205"
16206if test "x$ac_cv_header_sys_wait_h" = xyes
16207then :
16208  printf "%s\n" "#define HAVE_SYS_WAIT_H 1" >>confdefs.h
16209
16210fi
16211ac_fn_c_check_header_compile "$LINENO" "pwd.h" "ac_cv_header_pwd_h" "$ac_includes_default
16212"
16213if test "x$ac_cv_header_pwd_h" = xyes
16214then :
16215  printf "%s\n" "#define HAVE_PWD_H 1" >>confdefs.h
16216
16217fi
16218ac_fn_c_check_header_compile "$LINENO" "glob.h" "ac_cv_header_glob_h" "$ac_includes_default
16219"
16220if test "x$ac_cv_header_glob_h" = xyes
16221then :
16222  printf "%s\n" "#define HAVE_GLOB_H 1" >>confdefs.h
16223
16224fi
16225ac_fn_c_check_header_compile "$LINENO" "grp.h" "ac_cv_header_grp_h" "$ac_includes_default
16226"
16227if test "x$ac_cv_header_grp_h" = xyes
16228then :
16229  printf "%s\n" "#define HAVE_GRP_H 1" >>confdefs.h
16230
16231fi
16232ac_fn_c_check_header_compile "$LINENO" "login_cap.h" "ac_cv_header_login_cap_h" "$ac_includes_default
16233"
16234if test "x$ac_cv_header_login_cap_h" = xyes
16235then :
16236  printf "%s\n" "#define HAVE_LOGIN_CAP_H 1" >>confdefs.h
16237
16238fi
16239ac_fn_c_check_header_compile "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default
16240"
16241if test "x$ac_cv_header_winsock2_h" = xyes
16242then :
16243  printf "%s\n" "#define HAVE_WINSOCK2_H 1" >>confdefs.h
16244
16245fi
16246ac_fn_c_check_header_compile "$LINENO" "ws2tcpip.h" "ac_cv_header_ws2tcpip_h" "$ac_includes_default
16247"
16248if test "x$ac_cv_header_ws2tcpip_h" = xyes
16249then :
16250  printf "%s\n" "#define HAVE_WS2TCPIP_H 1" >>confdefs.h
16251
16252fi
16253ac_fn_c_check_header_compile "$LINENO" "endian.h" "ac_cv_header_endian_h" "$ac_includes_default
16254"
16255if test "x$ac_cv_header_endian_h" = xyes
16256then :
16257  printf "%s\n" "#define HAVE_ENDIAN_H 1" >>confdefs.h
16258
16259fi
16260ac_fn_c_check_header_compile "$LINENO" "sys/endian.h" "ac_cv_header_sys_endian_h" "$ac_includes_default
16261"
16262if test "x$ac_cv_header_sys_endian_h" = xyes
16263then :
16264  printf "%s\n" "#define HAVE_SYS_ENDIAN_H 1" >>confdefs.h
16265
16266fi
16267ac_fn_c_check_header_compile "$LINENO" "libkern/OSByteOrder.h" "ac_cv_header_libkern_OSByteOrder_h" "$ac_includes_default
16268"
16269if test "x$ac_cv_header_libkern_OSByteOrder_h" = xyes
16270then :
16271  printf "%s\n" "#define HAVE_LIBKERN_OSBYTEORDER_H 1" >>confdefs.h
16272
16273fi
16274ac_fn_c_check_header_compile "$LINENO" "sys/ipc.h" "ac_cv_header_sys_ipc_h" "$ac_includes_default
16275"
16276if test "x$ac_cv_header_sys_ipc_h" = xyes
16277then :
16278  printf "%s\n" "#define HAVE_SYS_IPC_H 1" >>confdefs.h
16279
16280fi
16281ac_fn_c_check_header_compile "$LINENO" "sys/shm.h" "ac_cv_header_sys_shm_h" "$ac_includes_default
16282"
16283if test "x$ac_cv_header_sys_shm_h" = xyes
16284then :
16285  printf "%s\n" "#define HAVE_SYS_SHM_H 1" >>confdefs.h
16286
16287fi
16288ac_fn_c_check_header_compile "$LINENO" "ifaddrs.h" "ac_cv_header_ifaddrs_h" "$ac_includes_default
16289"
16290if test "x$ac_cv_header_ifaddrs_h" = xyes
16291then :
16292  printf "%s\n" "#define HAVE_IFADDRS_H 1" >>confdefs.h
16293
16294fi
16295ac_fn_c_check_header_compile "$LINENO" "poll.h" "ac_cv_header_poll_h" "$ac_includes_default
16296"
16297if test "x$ac_cv_header_poll_h" = xyes
16298then :
16299  printf "%s\n" "#define HAVE_POLL_H 1" >>confdefs.h
16300
16301fi
16302
16303# net/if.h portability for Darwin see:
16304# https://www.gnu.org/software/autoconf/manual/autoconf-2.69/html_node/Header-Portability.html
16305ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "
16306#include <stdio.h>
16307#ifdef STDC_HEADERS
16308# include <stdlib.h>
16309# include <stddef.h>
16310#else
16311# ifdef HAVE_STDLIB_H
16312#  include <stdlib.h>
16313# endif
16314#endif
16315#ifdef HAVE_SYS_SOCKET_H
16316# include <sys/socket.h>
16317#endif
16318
16319"
16320if test "x$ac_cv_header_net_if_h" = xyes
16321then :
16322  printf "%s\n" "#define HAVE_NET_IF_H 1" >>confdefs.h
16323
16324fi
16325
16326
16327# Check for Apple header. This uncovers TARGET_OS_IPHONE, TARGET_OS_TV or TARGET_OS_WATCH
16328ac_fn_c_check_header_compile "$LINENO" "TargetConditionals.h" "ac_cv_header_TargetConditionals_h" "$ac_includes_default
16329"
16330if test "x$ac_cv_header_TargetConditionals_h" = xyes
16331then :
16332  printf "%s\n" "#define HAVE_TARGETCONDITIONALS_H 1" >>confdefs.h
16333
16334fi
16335
16336ac_fn_c_check_header_compile "$LINENO" "netioapi.h" "ac_cv_header_netioapi_h" "$ac_includes_default
16337#if HAVE_SYS_PARAM_H
16338#include <sys/param.h>
16339#endif
16340
16341#ifdef HAVE_SYS_SOCKET_H
16342#include <sys/socket.h>
16343#endif
16344
16345#ifdef HAVE_SYS_UIO_H
16346#include <sys/uio.h>
16347#endif
16348
16349#ifdef HAVE_NETINET_IN_H
16350#include <netinet/in.h>
16351#endif
16352
16353#ifdef HAVE_NETINET_TCP_H
16354#include <netinet/tcp.h>
16355#endif
16356
16357#ifdef HAVE_ARPA_INET_H
16358#include <arpa/inet.h>
16359#endif
16360
16361#ifdef HAVE_WINSOCK2_H
16362#include <winsock2.h>
16363#endif
16364
16365#ifdef HAVE_WS2TCPIP_H
16366#include <ws2tcpip.h>
16367#endif
16368
16369"
16370if test "x$ac_cv_header_netioapi_h" = xyes
16371then :
16372  printf "%s\n" "#define HAVE_NETIOAPI_H 1" >>confdefs.h
16373
16374fi
16375
16376
16377# Check for Linux timestamping headers
16378ac_fn_c_check_header_compile "$LINENO" "linux/net_tstamp.h" "ac_cv_header_linux_net_tstamp_h" "$ac_includes_default
16379"
16380if test "x$ac_cv_header_linux_net_tstamp_h" = xyes
16381then :
16382  printf "%s\n" "#define HAVE_LINUX_NET_TSTAMP_H 1" >>confdefs.h
16383
16384fi
16385
16386ac_fn_c_check_header_compile "$LINENO" "stdatomic.h" "ac_cv_header_stdatomic_h" "$ac_includes_default
16387"
16388if test "x$ac_cv_header_stdatomic_h" = xyes
16389then :
16390  printf "%s\n" "#define HAVE_STDATOMIC_H 1" >>confdefs.h
16391
16392fi
16393
16394
16395# check for types.
16396# Using own tests for int64* because autoconf builtin only give 32bit.
16397ac_fn_c_check_type "$LINENO" "int8_t" "ac_cv_type_int8_t" "$ac_includes_default"
16398if test "x$ac_cv_type_int8_t" = xyes
16399then :
16400
16401else case e in #(
16402  e)
16403printf "%s\n" "#define int8_t signed char" >>confdefs.h
16404 ;;
16405esac
16406fi
16407
16408ac_fn_c_check_type "$LINENO" "int16_t" "ac_cv_type_int16_t" "$ac_includes_default"
16409if test "x$ac_cv_type_int16_t" = xyes
16410then :
16411
16412else case e in #(
16413  e)
16414printf "%s\n" "#define int16_t short" >>confdefs.h
16415 ;;
16416esac
16417fi
16418
16419ac_fn_c_check_type "$LINENO" "int32_t" "ac_cv_type_int32_t" "$ac_includes_default"
16420if test "x$ac_cv_type_int32_t" = xyes
16421then :
16422
16423else case e in #(
16424  e)
16425printf "%s\n" "#define int32_t int" >>confdefs.h
16426 ;;
16427esac
16428fi
16429
16430ac_fn_c_check_type "$LINENO" "int64_t" "ac_cv_type_int64_t" "$ac_includes_default"
16431if test "x$ac_cv_type_int64_t" = xyes
16432then :
16433
16434else case e in #(
16435  e)
16436printf "%s\n" "#define int64_t long long" >>confdefs.h
16437 ;;
16438esac
16439fi
16440
16441ac_fn_c_check_type "$LINENO" "uint8_t" "ac_cv_type_uint8_t" "$ac_includes_default"
16442if test "x$ac_cv_type_uint8_t" = xyes
16443then :
16444
16445else case e in #(
16446  e)
16447printf "%s\n" "#define uint8_t unsigned char" >>confdefs.h
16448 ;;
16449esac
16450fi
16451
16452ac_fn_c_check_type "$LINENO" "uint16_t" "ac_cv_type_uint16_t" "$ac_includes_default"
16453if test "x$ac_cv_type_uint16_t" = xyes
16454then :
16455
16456else case e in #(
16457  e)
16458printf "%s\n" "#define uint16_t unsigned short" >>confdefs.h
16459 ;;
16460esac
16461fi
16462
16463ac_fn_c_check_type "$LINENO" "uint32_t" "ac_cv_type_uint32_t" "$ac_includes_default"
16464if test "x$ac_cv_type_uint32_t" = xyes
16465then :
16466
16467else case e in #(
16468  e)
16469printf "%s\n" "#define uint32_t unsigned int" >>confdefs.h
16470 ;;
16471esac
16472fi
16473
16474ac_fn_c_check_type "$LINENO" "uint64_t" "ac_cv_type_uint64_t" "$ac_includes_default"
16475if test "x$ac_cv_type_uint64_t" = xyes
16476then :
16477
16478else case e in #(
16479  e)
16480printf "%s\n" "#define uint64_t unsigned long long" >>confdefs.h
16481 ;;
16482esac
16483fi
16484
16485ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
16486if test "x$ac_cv_type_size_t" = xyes
16487then :
16488
16489else case e in #(
16490  e)
16491printf "%s\n" "#define size_t unsigned int" >>confdefs.h
16492 ;;
16493esac
16494fi
16495
16496ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
16497if test "x$ac_cv_type_ssize_t" = xyes
16498then :
16499
16500else case e in #(
16501  e)
16502printf "%s\n" "#define ssize_t int" >>confdefs.h
16503 ;;
16504esac
16505fi
16506
16507ac_fn_c_check_type "$LINENO" "uid_t" "ac_cv_type_uid_t" "$ac_includes_default"
16508if test "x$ac_cv_type_uid_t" = xyes
16509then :
16510
16511else case e in #(
16512  e)
16513printf "%s\n" "#define uid_t int" >>confdefs.h
16514 ;;
16515esac
16516fi
16517
16518ac_fn_c_check_type "$LINENO" "gid_t" "ac_cv_type_gid_t" "$ac_includes_default"
16519if test "x$ac_cv_type_gid_t" = xyes
16520then :
16521
16522else case e in #(
16523  e)
16524printf "%s\n" "#define gid_t int" >>confdefs.h
16525 ;;
16526esac
16527fi
16528
16529
16530  ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default
16531"
16532if test "x$ac_cv_type_pid_t" = xyes
16533then :
16534
16535else case e in #(
16536  e)                                         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16537/* end confdefs.h.  */
16538
16539          #if defined _WIN64 && !defined __CYGWIN__
16540          LLP64
16541          #endif
16542
16543int
16544main (void)
16545{
16546
16547  ;
16548  return 0;
16549}
16550
16551_ACEOF
16552if ac_fn_c_try_compile "$LINENO"
16553then :
16554  ac_pid_type='int'
16555else case e in #(
16556  e) ac_pid_type='__int64' ;;
16557esac
16558fi
16559rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
16560
16561printf "%s\n" "#define pid_t $ac_pid_type" >>confdefs.h
16562
16563     ;;
16564esac
16565fi
16566
16567
16568ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
16569if test "x$ac_cv_type_off_t" = xyes
16570then :
16571
16572else case e in #(
16573  e)
16574printf "%s\n" "#define off_t long int" >>confdefs.h
16575 ;;
16576esac
16577fi
16578
16579ac_fn_c_check_type "$LINENO" "u_char" "ac_cv_type_u_char" "
16580$ac_includes_default
16581#ifdef HAVE_WINSOCK2_H
16582#  include <winsock2.h>
16583#endif
16584
16585"
16586if test "x$ac_cv_type_u_char" = xyes
16587then :
16588
16589else case e in #(
16590  e)
16591printf "%s\n" "#define u_char unsigned char" >>confdefs.h
16592 ;;
16593esac
16594fi
16595
16596ac_fn_c_check_type "$LINENO" "rlim_t" "ac_cv_type_rlim_t" "
16597$ac_includes_default
16598#ifdef HAVE_SYS_RESOURCE_H
16599#  include <sys/resource.h>
16600#endif
16601
16602"
16603if test "x$ac_cv_type_rlim_t" = xyes
16604then :
16605
16606else case e in #(
16607  e)
16608printf "%s\n" "#define rlim_t unsigned long" >>confdefs.h
16609 ;;
16610esac
16611fi
16612
16613
16614ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
16615$ac_includes_default
16616#ifdef HAVE_SYS_SOCKET_H
16617#  include <sys/socket.h>
16618#endif
16619#ifdef HAVE_WS2TCPIP_H
16620#  include <ws2tcpip.h>
16621#endif
16622
16623"
16624if test "x$ac_cv_type_socklen_t" = xyes
16625then :
16626
16627else case e in #(
16628  e)
16629printf "%s\n" "#define socklen_t int" >>confdefs.h
16630 ;;
16631esac
16632fi
16633
16634 ac_fn_c_check_type "$LINENO" "in_addr_t" "ac_cv_type_in_addr_t" "
16635$ac_includes_default
16636#ifdef HAVE_SYS_TYPES_H
16637# include <sys/types.h>
16638#endif
16639#ifdef HAVE_NETINET_IN_H
16640# include <netinet/in.h>
16641#endif
16642
16643"
16644if test "x$ac_cv_type_in_addr_t" = xyes
16645then :
16646
16647else case e in #(
16648  e)
16649printf "%s\n" "#define in_addr_t uint32_t" >>confdefs.h
16650 ;;
16651esac
16652fi
16653
16654 ac_fn_c_check_type "$LINENO" "in_port_t" "ac_cv_type_in_port_t" "
16655$ac_includes_default
16656#ifdef HAVE_SYS_TYPES_H
16657# include <sys/types.h>
16658#endif
16659#ifdef HAVE_NETINET_IN_H
16660# include <netinet/in.h>
16661#endif
16662
16663"
16664if test "x$ac_cv_type_in_port_t" = xyes
16665then :
16666
16667else case e in #(
16668  e)
16669printf "%s\n" "#define in_port_t uint16_t" >>confdefs.h
16670 ;;
16671esac
16672fi
16673
16674{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if memcmp compares unsigned" >&5
16675printf %s "checking if memcmp compares unsigned... " >&6; }
16676if test "$cross_compiling" = yes
16677then :
16678   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: cross-compile no" >&5
16679printf "%s\n" "cross-compile no" >&6; }
16680
16681printf "%s\n" "#define MEMCMP_IS_BROKEN 1" >>confdefs.h
16682
16683  case " $LIBOBJS " in
16684  *" memcmp.$ac_objext "* ) ;;
16685  *) LIBOBJS="$LIBOBJS memcmp.$ac_objext"
16686 ;;
16687esac
16688
16689
16690else case e in #(
16691  e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16692/* end confdefs.h.  */
16693
16694#include <stdio.h>
16695#include <stdlib.h>
16696#include <string.h>
16697int main(void)
16698{
16699	char a = 255, b = 0;
16700	if(memcmp(&a, &b, 1) < 0)
16701		return 1;
16702	return 0;
16703}
16704
16705_ACEOF
16706if ac_fn_c_try_run "$LINENO"
16707then :
16708  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16709printf "%s\n" "yes" >&6; }
16710else case e in #(
16711  e)  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
16712printf "%s\n" "no" >&6; }
16713
16714printf "%s\n" "#define MEMCMP_IS_BROKEN 1" >>confdefs.h
16715
16716  case " $LIBOBJS " in
16717  *" memcmp.$ac_objext "* ) ;;
16718  *) LIBOBJS="$LIBOBJS memcmp.$ac_objext"
16719 ;;
16720esac
16721
16722 ;;
16723esac
16724fi
16725rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16726  conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
16727esac
16728fi
16729
16730
16731# The cast to long int works around a bug in the HP C Compiler
16732# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
16733# declarations like 'int a3[[(sizeof (unsigned char)) >= 0]];'.
16734# This bug is HP SR number 8606223364.
16735{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
16736printf %s "checking size of time_t... " >&6; }
16737if test ${ac_cv_sizeof_time_t+y}
16738then :
16739  printf %s "(cached) " >&6
16740else case e in #(
16741  e) if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t"        "
16742$ac_includes_default
16743#ifdef TIME_WITH_SYS_TIME
16744# include <sys/time.h>
16745# include <time.h>
16746#else
16747# ifdef HAVE_SYS_TIME_H
16748#  include <sys/time.h>
16749# else
16750#  include <time.h>
16751# endif
16752#endif
16753
16754"
16755then :
16756
16757else case e in #(
16758  e) if test "$ac_cv_type_time_t" = yes; then
16759     { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
16760printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
16761as_fn_error 77 "cannot compute sizeof (time_t)
16762See 'config.log' for more details" "$LINENO" 5; }
16763   else
16764     ac_cv_sizeof_time_t=0
16765   fi ;;
16766esac
16767fi
16768 ;;
16769esac
16770fi
16771{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
16772printf "%s\n" "$ac_cv_sizeof_time_t" >&6; }
16773
16774
16775
16776printf "%s\n" "#define SIZEOF_TIME_T $ac_cv_sizeof_time_t" >>confdefs.h
16777
16778
16779# The cast to long int works around a bug in the HP C Compiler
16780# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
16781# declarations like 'int a3[[(sizeof (unsigned char)) >= 0]];'.
16782# This bug is HP SR number 8606223364.
16783{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
16784printf %s "checking size of size_t... " >&6; }
16785if test ${ac_cv_sizeof_size_t+y}
16786then :
16787  printf %s "(cached) " >&6
16788else case e in #(
16789  e) if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (size_t))" "ac_cv_sizeof_size_t"        "$ac_includes_default"
16790then :
16791
16792else case e in #(
16793  e) if test "$ac_cv_type_size_t" = yes; then
16794     { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
16795printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
16796as_fn_error 77 "cannot compute sizeof (size_t)
16797See 'config.log' for more details" "$LINENO" 5; }
16798   else
16799     ac_cv_sizeof_size_t=0
16800   fi ;;
16801esac
16802fi
16803 ;;
16804esac
16805fi
16806{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
16807printf "%s\n" "$ac_cv_sizeof_size_t" >&6; }
16808
16809
16810
16811printf "%s\n" "#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t" >>confdefs.h
16812
16813
16814
16815# add option to disable the evil rpath
16816
16817# Check whether --enable-rpath was given.
16818if test ${enable_rpath+y}
16819then :
16820  enableval=$enable_rpath; enable_rpath=$enableval
16821else case e in #(
16822  e) enable_rpath=yes ;;
16823esac
16824fi
16825
16826if test "x$enable_rpath" = xno; then
16827		ac_config_commands="$ac_config_commands disable-rpath"
16828
16829fi
16830
16831
16832
16833# check to see if libraries are needed for these functions.
16834{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing inet_pton" >&5
16835printf %s "checking for library containing inet_pton... " >&6; }
16836if test ${ac_cv_search_inet_pton+y}
16837then :
16838  printf %s "(cached) " >&6
16839else case e in #(
16840  e) ac_func_search_save_LIBS=$LIBS
16841cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16842/* end confdefs.h.  */
16843
16844/* Override any GCC internal prototype to avoid an error.
16845   Use char because int might match the return type of a GCC
16846   builtin and then its argument prototype would still apply.
16847   The 'extern "C"' is for builds by C++ compilers;
16848   although this is not generally supported in C code supporting it here
16849   has little cost and some practical benefit (sr 110532).  */
16850#ifdef __cplusplus
16851extern "C"
16852#endif
16853char inet_pton (void);
16854int
16855main (void)
16856{
16857return inet_pton ();
16858  ;
16859  return 0;
16860}
16861_ACEOF
16862for ac_lib in '' nsl
16863do
16864  if test -z "$ac_lib"; then
16865    ac_res="none required"
16866  else
16867    ac_res=-l$ac_lib
16868    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
16869  fi
16870  if ac_fn_c_try_link "$LINENO"
16871then :
16872  ac_cv_search_inet_pton=$ac_res
16873fi
16874rm -f core conftest.err conftest.$ac_objext conftest.beam \
16875    conftest$ac_exeext
16876  if test ${ac_cv_search_inet_pton+y}
16877then :
16878  break
16879fi
16880done
16881if test ${ac_cv_search_inet_pton+y}
16882then :
16883
16884else case e in #(
16885  e) ac_cv_search_inet_pton=no ;;
16886esac
16887fi
16888rm conftest.$ac_ext
16889LIBS=$ac_func_search_save_LIBS ;;
16890esac
16891fi
16892{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_inet_pton" >&5
16893printf "%s\n" "$ac_cv_search_inet_pton" >&6; }
16894ac_res=$ac_cv_search_inet_pton
16895if test "$ac_res" != no
16896then :
16897  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
16898
16899fi
16900
16901{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing socket" >&5
16902printf %s "checking for library containing socket... " >&6; }
16903if test ${ac_cv_search_socket+y}
16904then :
16905  printf %s "(cached) " >&6
16906else case e in #(
16907  e) ac_func_search_save_LIBS=$LIBS
16908cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16909/* end confdefs.h.  */
16910
16911/* Override any GCC internal prototype to avoid an error.
16912   Use char because int might match the return type of a GCC
16913   builtin and then its argument prototype would still apply.
16914   The 'extern "C"' is for builds by C++ compilers;
16915   although this is not generally supported in C code supporting it here
16916   has little cost and some practical benefit (sr 110532).  */
16917#ifdef __cplusplus
16918extern "C"
16919#endif
16920char socket (void);
16921int
16922main (void)
16923{
16924return socket ();
16925  ;
16926  return 0;
16927}
16928_ACEOF
16929for ac_lib in '' socket
16930do
16931  if test -z "$ac_lib"; then
16932    ac_res="none required"
16933  else
16934    ac_res=-l$ac_lib
16935    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
16936  fi
16937  if ac_fn_c_try_link "$LINENO"
16938then :
16939  ac_cv_search_socket=$ac_res
16940fi
16941rm -f core conftest.err conftest.$ac_objext conftest.beam \
16942    conftest$ac_exeext
16943  if test ${ac_cv_search_socket+y}
16944then :
16945  break
16946fi
16947done
16948if test ${ac_cv_search_socket+y}
16949then :
16950
16951else case e in #(
16952  e) ac_cv_search_socket=no ;;
16953esac
16954fi
16955rm conftest.$ac_ext
16956LIBS=$ac_func_search_save_LIBS ;;
16957esac
16958fi
16959{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socket" >&5
16960printf "%s\n" "$ac_cv_search_socket" >&6; }
16961ac_res=$ac_cv_search_socket
16962if test "$ac_res" != no
16963then :
16964  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
16965
16966fi
16967
16968
16969# check whether strptime also works
16970
16971# check some functions of the OS before linking libs (while still runnable).
16972{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working chown" >&5
16973printf %s "checking for working chown... " >&6; }
16974if test ${ac_cv_func_chown_works+y}
16975then :
16976  printf %s "(cached) " >&6
16977else case e in #(
16978  e) if test "$cross_compiling" = yes
16979then :
16980  case "$host_os" in # ((
16981			  # Guess yes on glibc systems.
16982		  *-gnu*) ac_cv_func_chown_works=yes ;;
16983			  # If we don't know, assume the worst.
16984		  *)      ac_cv_func_chown_works=no ;;
16985		esac
16986else case e in #(
16987  e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16988/* end confdefs.h.  */
16989$ac_includes_default
16990#include <fcntl.h>
16991
16992int
16993main (void)
16994{
16995  char *f = "conftest.chown";
16996  struct stat before, after;
16997
16998  if (creat (f, 0600) < 0)
16999    return 1;
17000  if (stat (f, &before) < 0)
17001    return 1;
17002  if (chown (f, (uid_t) -1, (gid_t) -1) == -1)
17003    return 1;
17004  if (stat (f, &after) < 0)
17005    return 1;
17006  return ! (before.st_uid == after.st_uid && before.st_gid == after.st_gid);
17007
17008  ;
17009  return 0;
17010}
17011_ACEOF
17012if ac_fn_c_try_run "$LINENO"
17013then :
17014  ac_cv_func_chown_works=yes
17015else case e in #(
17016  e) ac_cv_func_chown_works=no ;;
17017esac
17018fi
17019rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17020  conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
17021esac
17022fi
17023
17024rm -f conftest.chown
17025 ;;
17026esac
17027fi
17028{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_chown_works" >&5
17029printf "%s\n" "$ac_cv_func_chown_works" >&6; }
17030if test $ac_cv_func_chown_works = yes; then
17031
17032printf "%s\n" "#define HAVE_CHOWN 1" >>confdefs.h
17033
17034fi
17035
17036
17037ac_func=
17038for ac_item in $ac_func_c_list
17039do
17040  if test $ac_func; then
17041    ac_fn_c_check_func "$LINENO" $ac_func ac_cv_func_$ac_func
17042    if eval test \"x\$ac_cv_func_$ac_func\" = xyes; then
17043      echo "#define $ac_item 1" >> confdefs.h
17044    fi
17045    ac_func=
17046  else
17047    ac_func=$ac_item
17048  fi
17049done
17050
17051
17052
17053if test "x$ac_cv_func_fork" = xyes; then
17054  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5
17055printf %s "checking for working fork... " >&6; }
17056if test ${ac_cv_func_fork_works+y}
17057then :
17058  printf %s "(cached) " >&6
17059else case e in #(
17060  e) if test "$cross_compiling" = yes
17061then :
17062  ac_cv_func_fork_works=cross
17063else case e in #(
17064  e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17065/* end confdefs.h.  */
17066$ac_includes_default
17067int
17068main (void)
17069{
17070
17071	  /* By R. Kuhlmann. */
17072	  return fork () < 0;
17073
17074  ;
17075  return 0;
17076}
17077_ACEOF
17078if ac_fn_c_try_run "$LINENO"
17079then :
17080  ac_cv_func_fork_works=yes
17081else case e in #(
17082  e) ac_cv_func_fork_works=no ;;
17083esac
17084fi
17085rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17086  conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
17087esac
17088fi
17089 ;;
17090esac
17091fi
17092{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5
17093printf "%s\n" "$ac_cv_func_fork_works" >&6; }
17094
17095else
17096  ac_cv_func_fork_works=$ac_cv_func_fork
17097fi
17098if test "x$ac_cv_func_fork_works" = xcross; then
17099  case $host in
17100    *-*-amigaos* | *-*-msdosdjgpp*)
17101      # Override, as these systems have only a dummy fork() stub
17102      ac_cv_func_fork_works=no
17103      ;;
17104    *)
17105      ac_cv_func_fork_works=yes
17106      ;;
17107  esac
17108  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
17109printf "%s\n" "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
17110fi
17111ac_cv_func_vfork_works=$ac_cv_func_vfork
17112if test "x$ac_cv_func_vfork" = xyes; then
17113  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5
17114printf %s "checking for working vfork... " >&6; }
17115if test ${ac_cv_func_vfork_works+y}
17116then :
17117  printf %s "(cached) " >&6
17118else case e in #(
17119  e) if test "$cross_compiling" = yes
17120then :
17121  ac_cv_func_vfork_works=cross
17122else case e in #(
17123  e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17124/* end confdefs.h.  */
17125/* Thanks to Paul Eggert for this test.  */
17126$ac_includes_default
17127#include <signal.h>
17128#include <sys/wait.h>
17129#ifdef HAVE_VFORK_H
17130# include <vfork.h>
17131#endif
17132
17133static void
17134do_nothing (int sig)
17135{
17136  (void) sig;
17137}
17138
17139/* On some sparc systems, changes by the child to local and incoming
17140   argument registers are propagated back to the parent.  The compiler
17141   is told about this with #include <vfork.h>, but some compilers
17142   (e.g. gcc -O) don't grok <vfork.h>.  Test for this by using a
17143   static variable whose address is put into a register that is
17144   clobbered by the vfork.  */
17145static void
17146sparc_address_test (int arg)
17147{
17148  static pid_t child;
17149  if (!child) {
17150    child = vfork ();
17151    if (child < 0) {
17152      perror ("vfork");
17153      _exit(2);
17154    }
17155    if (!child) {
17156      arg = getpid();
17157      write(-1, "", 0);
17158      _exit (arg);
17159    }
17160  }
17161}
17162
17163int
17164main (void)
17165{
17166  pid_t parent = getpid ();
17167  pid_t child;
17168
17169  sparc_address_test (0);
17170
17171  /* On Solaris 2.4, changes by the child to the signal handler
17172     also munge signal handlers in the parent.  To detect this,
17173     start by putting the parent's handler in a known state.  */
17174  signal (SIGTERM, SIG_DFL);
17175
17176  child = vfork ();
17177
17178  if (child == 0) {
17179    /* Here is another test for sparc vfork register problems.  This
17180       test uses lots of local variables, at least as many local
17181       variables as main has allocated so far including compiler
17182       temporaries.  4 locals are enough for gcc 1.40.3 on a Solaris
17183       4.1.3 sparc, but we use 8 to be safe.  A buggy compiler should
17184       reuse the register of parent for one of the local variables,
17185       since it will think that parent can't possibly be used any more
17186       in this routine.  Assigning to the local variable will thus
17187       munge parent in the parent process.  */
17188    pid_t
17189      p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
17190      p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
17191    /* Convince the compiler that p..p7 are live; otherwise, it might
17192       use the same hardware register for all 8 local variables.  */
17193    if (p != p1 || p != p2 || p != p3 || p != p4
17194	|| p != p5 || p != p6 || p != p7)
17195      _exit(1);
17196
17197    /* Alter the child's signal handler.  */
17198    if (signal (SIGTERM, do_nothing) != SIG_DFL)
17199      _exit(1);
17200
17201    /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
17202       from child file descriptors.  If the child closes a descriptor
17203       before it execs or exits, this munges the parent's descriptor
17204       as well.  Test for this by closing stdout in the child.  */
17205    _exit(close(fileno(stdout)) != 0);
17206  } else {
17207    int status;
17208    struct stat st;
17209
17210    while (wait(&status) != child)
17211      ;
17212    return (
17213	 /* Was there some problem with vforking?  */
17214	 child < 0
17215
17216	 /* Did the child munge the parent's signal handler?  */
17217	 || signal (SIGTERM, SIG_DFL) != SIG_DFL
17218
17219	 /* Did the child fail?  (This shouldn't happen.)  */
17220	 || status
17221
17222	 /* Did the vfork/compiler bug occur?  */
17223	 || parent != getpid()
17224
17225	 /* Did the file descriptor bug occur?  */
17226	 || fstat(fileno(stdout), &st) != 0
17227	 );
17228  }
17229}
17230_ACEOF
17231if ac_fn_c_try_run "$LINENO"
17232then :
17233  ac_cv_func_vfork_works=yes
17234else case e in #(
17235  e) ac_cv_func_vfork_works=no ;;
17236esac
17237fi
17238rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17239  conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
17240esac
17241fi
17242 ;;
17243esac
17244fi
17245{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5
17246printf "%s\n" "$ac_cv_func_vfork_works" >&6; }
17247
17248fi;
17249if test "x$ac_cv_func_fork_works" = xcross; then
17250  ac_cv_func_vfork_works=$ac_cv_func_vfork
17251  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
17252printf "%s\n" "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
17253fi
17254
17255if test "x$ac_cv_func_vfork_works" = xyes; then
17256
17257printf "%s\n" "#define HAVE_WORKING_VFORK 1" >>confdefs.h
17258
17259else
17260
17261printf "%s\n" "#define vfork fork" >>confdefs.h
17262
17263fi
17264if test "x$ac_cv_func_fork_works" = xyes; then
17265
17266printf "%s\n" "#define HAVE_WORKING_FORK 1" >>confdefs.h
17267
17268fi
17269
17270
17271printf "%s\n" "#define RETSIGTYPE void" >>confdefs.h
17272
17273{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for declarations of fseeko and ftello" >&5
17274printf %s "checking for declarations of fseeko and ftello... " >&6; }
17275if test ${ac_cv_func_fseeko_ftello+y}
17276then :
17277  printf %s "(cached) " >&6
17278else case e in #(
17279  e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17280/* end confdefs.h.  */
17281
17282#if defined __hpux && !defined _LARGEFILE_SOURCE
17283# include <limits.h>
17284# if LONG_MAX >> 31 == 0
17285#  error "32-bit HP-UX 11/ia64 needs _LARGEFILE_SOURCE for fseeko in C++"
17286# endif
17287#endif
17288#include <sys/types.h> /* for off_t */
17289#include <stdio.h>
17290
17291int
17292main (void)
17293{
17294
17295  int (*fp1) (FILE *, off_t, int) = fseeko;
17296  off_t (*fp2) (FILE *) = ftello;
17297  return fseeko (stdin, 0, 0)
17298      && fp1 (stdin, 0, 0)
17299      && ftello (stdin) >= 0
17300      && fp2 (stdin) >= 0;
17301
17302  ;
17303  return 0;
17304}
17305_ACEOF
17306if ac_fn_c_try_compile "$LINENO"
17307then :
17308  ac_cv_func_fseeko_ftello=yes
17309else case e in #(
17310  e) ac_save_CPPFLAGS="$CPPFLAGS"
17311    CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE=1"
17312    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17313/* end confdefs.h.  */
17314
17315#if defined __hpux && !defined _LARGEFILE_SOURCE
17316# include <limits.h>
17317# if LONG_MAX >> 31 == 0
17318#  error "32-bit HP-UX 11/ia64 needs _LARGEFILE_SOURCE for fseeko in C++"
17319# endif
17320#endif
17321#include <sys/types.h> /* for off_t */
17322#include <stdio.h>
17323
17324int
17325main (void)
17326{
17327
17328  int (*fp1) (FILE *, off_t, int) = fseeko;
17329  off_t (*fp2) (FILE *) = ftello;
17330  return fseeko (stdin, 0, 0)
17331      && fp1 (stdin, 0, 0)
17332      && ftello (stdin) >= 0
17333      && fp2 (stdin) >= 0;
17334
17335  ;
17336  return 0;
17337}
17338_ACEOF
17339if ac_fn_c_try_compile "$LINENO"
17340then :
17341  ac_cv_func_fseeko_ftello="need _LARGEFILE_SOURCE"
17342else case e in #(
17343  e) ac_cv_func_fseeko_ftello=no ;;
17344esac
17345fi
17346rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
17347esac
17348fi
17349rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
17350esac
17351fi
17352{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fseeko_ftello" >&5
17353printf "%s\n" "$ac_cv_func_fseeko_ftello" >&6; }
17354if test "$ac_cv_func_fseeko_ftello" != no
17355then :
17356
17357printf "%s\n" "#define HAVE_FSEEKO 1" >>confdefs.h
17358
17359fi
17360if test "$ac_cv_func_fseeko_ftello" = "need _LARGEFILE_SOURCE"
17361then :
17362
17363printf "%s\n" "#define _LARGEFILE_SOURCE 1" >>confdefs.h
17364
17365fi
17366
17367
17368# Check whether --enable-largefile was given.
17369if test ${enable_largefile+y}
17370then :
17371  enableval=$enable_largefile;
17372fi
17373if test "$enable_largefile,$enable_year2038" != no,no
17374then :
17375  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable large file support" >&5
17376printf %s "checking for $CC option to enable large file support... " >&6; }
17377if test ${ac_cv_sys_largefile_opts+y}
17378then :
17379  printf %s "(cached) " >&6
17380else case e in #(
17381  e) ac_save_CC="$CC"
17382  ac_opt_found=no
17383  for ac_opt in "none needed" "-D_FILE_OFFSET_BITS=64" "-D_LARGE_FILES=1" "-n32"; do
17384    if test x"$ac_opt" != x"none needed"
17385then :
17386  CC="$ac_save_CC $ac_opt"
17387fi
17388    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17389/* end confdefs.h.  */
17390#include <sys/types.h>
17391#ifndef FTYPE
17392# define FTYPE off_t
17393#endif
17394 /* Check that FTYPE can represent 2**63 - 1 correctly.
17395    We can't simply define LARGE_FTYPE to be 9223372036854775807,
17396    since some C++ compilers masquerading as C compilers
17397    incorrectly reject 9223372036854775807.  */
17398#define LARGE_FTYPE (((FTYPE) 1 << 31 << 31) - 1 + ((FTYPE) 1 << 31 << 31))
17399  int FTYPE_is_large[(LARGE_FTYPE % 2147483629 == 721
17400		       && LARGE_FTYPE % 2147483647 == 1)
17401		      ? 1 : -1];
17402int
17403main (void)
17404{
17405
17406  ;
17407  return 0;
17408}
17409_ACEOF
17410if ac_fn_c_try_compile "$LINENO"
17411then :
17412  if test x"$ac_opt" = x"none needed"
17413then :
17414  # GNU/Linux s390x and alpha need _FILE_OFFSET_BITS=64 for wide ino_t.
17415	 CC="$CC -DFTYPE=ino_t"
17416	 if ac_fn_c_try_compile "$LINENO"
17417then :
17418
17419else case e in #(
17420  e) CC="$CC -D_FILE_OFFSET_BITS=64"
17421	    if ac_fn_c_try_compile "$LINENO"
17422then :
17423  ac_opt='-D_FILE_OFFSET_BITS=64'
17424fi
17425rm -f core conftest.err conftest.$ac_objext conftest.beam ;;
17426esac
17427fi
17428rm -f core conftest.err conftest.$ac_objext conftest.beam
17429fi
17430      ac_cv_sys_largefile_opts=$ac_opt
17431      ac_opt_found=yes
17432fi
17433rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
17434    test $ac_opt_found = no || break
17435  done
17436  CC="$ac_save_CC"
17437
17438  test $ac_opt_found = yes || ac_cv_sys_largefile_opts="support not detected" ;;
17439esac
17440fi
17441{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_opts" >&5
17442printf "%s\n" "$ac_cv_sys_largefile_opts" >&6; }
17443
17444ac_have_largefile=yes
17445case $ac_cv_sys_largefile_opts in #(
17446  "none needed") :
17447     ;; #(
17448  "supported through gnulib") :
17449     ;; #(
17450  "support not detected") :
17451    ac_have_largefile=no ;; #(
17452  "-D_FILE_OFFSET_BITS=64") :
17453
17454printf "%s\n" "#define _FILE_OFFSET_BITS 64" >>confdefs.h
17455 ;; #(
17456  "-D_LARGE_FILES=1") :
17457
17458printf "%s\n" "#define _LARGE_FILES 1" >>confdefs.h
17459 ;; #(
17460  "-n32") :
17461    CC="$CC -n32" ;; #(
17462  *) :
17463    as_fn_error $? "internal error: bad value for \$ac_cv_sys_largefile_opts" "$LINENO" 5 ;;
17464esac
17465
17466if test "$enable_year2038" != no
17467then :
17468  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option for timestamps after 2038" >&5
17469printf %s "checking for $CC option for timestamps after 2038... " >&6; }
17470if test ${ac_cv_sys_year2038_opts+y}
17471then :
17472  printf %s "(cached) " >&6
17473else case e in #(
17474  e) ac_save_CPPFLAGS="$CPPFLAGS"
17475  ac_opt_found=no
17476  for ac_opt in "none needed" "-D_TIME_BITS=64" "-D__MINGW_USE_VC2005_COMPAT" "-U_USE_32_BIT_TIME_T -D__MINGW_USE_VC2005_COMPAT"; do
17477    if test x"$ac_opt" != x"none needed"
17478then :
17479  CPPFLAGS="$ac_save_CPPFLAGS $ac_opt"
17480fi
17481    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17482/* end confdefs.h.  */
17483
17484  #include <time.h>
17485  /* Check that time_t can represent 2**32 - 1 correctly.  */
17486  #define LARGE_TIME_T \\
17487    ((time_t) (((time_t) 1 << 30) - 1 + 3 * ((time_t) 1 << 30)))
17488  int verify_time_t_range[(LARGE_TIME_T / 65537 == 65535
17489                           && LARGE_TIME_T % 65537 == 0)
17490                          ? 1 : -1];
17491
17492int
17493main (void)
17494{
17495
17496  ;
17497  return 0;
17498}
17499_ACEOF
17500if ac_fn_c_try_compile "$LINENO"
17501then :
17502  ac_cv_sys_year2038_opts="$ac_opt"
17503      ac_opt_found=yes
17504fi
17505rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
17506    test $ac_opt_found = no || break
17507  done
17508  CPPFLAGS="$ac_save_CPPFLAGS"
17509  test $ac_opt_found = yes || ac_cv_sys_year2038_opts="support not detected" ;;
17510esac
17511fi
17512{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_year2038_opts" >&5
17513printf "%s\n" "$ac_cv_sys_year2038_opts" >&6; }
17514
17515ac_have_year2038=yes
17516case $ac_cv_sys_year2038_opts in #(
17517  "none needed") :
17518     ;; #(
17519  "support not detected") :
17520    ac_have_year2038=no ;; #(
17521  "-D_TIME_BITS=64") :
17522
17523printf "%s\n" "#define _TIME_BITS 64" >>confdefs.h
17524 ;; #(
17525  "-D__MINGW_USE_VC2005_COMPAT") :
17526
17527printf "%s\n" "#define __MINGW_USE_VC2005_COMPAT 1" >>confdefs.h
17528 ;; #(
17529  "-U_USE_32_BIT_TIME_T"*) :
17530    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
17531printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
17532as_fn_error $? "the 'time_t' type is currently forced to be 32-bit. It
17533will stop working after mid-January 2038. Remove
17534_USE_32BIT_TIME_T from the compiler flags.
17535See 'config.log' for more details" "$LINENO" 5; } ;; #(
17536  *) :
17537    as_fn_error $? "internal error: bad value for \$ac_cv_sys_year2038_opts" "$LINENO" 5 ;;
17538esac
17539
17540fi
17541
17542fi
17543
17544
17545
17546{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we need -D_LARGEFILE_SOURCE=1 as a flag for $CC" >&5
17547printf %s "checking whether we need -D_LARGEFILE_SOURCE=1 as a flag for $CC... " >&6; }
17548cache=_D_LARGEFILE_SOURCE_1
17549if eval test \${cv_prog_cc_flag_needed_$cache+y}
17550then :
17551  printf %s "(cached) " >&6
17552else case e in #(
17553  e)
17554echo '
17555#include <stdio.h>
17556int test(void) {
17557        int a = fseeko(stdin, 0, 0);
17558        return a;
17559}
17560' > conftest.c
17561echo 'void f(void){}' >>conftest.c
17562if test -z "`$CC $CPPFLAGS $CFLAGS $ERRFLAG -c conftest.c 2>&1`"; then
17563eval "cv_prog_cc_flag_needed_$cache=no"
17564else
17565
17566if test -z "`$CC $CPPFLAGS $CFLAGS -D_LARGEFILE_SOURCE=1 $ERRFLAG -c conftest.c 2>&1`"; then
17567eval "cv_prog_cc_flag_needed_$cache=yes"
17568else
17569eval "cv_prog_cc_flag_needed_$cache=fail"
17570#echo 'Test with flag fails too!'
17571#cat conftest.c
17572#echo "$CC $CPPFLAGS $CFLAGS -D_LARGEFILE_SOURCE=1 $ERRFLAG -c conftest.c 2>&1"
17573#echo `$CC $CPPFLAGS $CFLAGS -D_LARGEFILE_SOURCE=1 $ERRFLAG -c conftest.c 2>&1`
17574#exit 1
17575fi
17576
17577fi
17578rm -f conftest conftest.c conftest.o
17579 ;;
17580esac
17581fi
17582
17583if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = yes"; then
17584{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17585printf "%s\n" "yes" >&6; }
17586:
17587CFLAGS="$CFLAGS -D_LARGEFILE_SOURCE=1"
17588else
17589if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = no"; then
17590{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
17591printf "%s\n" "no" >&6; }
17592#echo 'Test with flag is no!'
17593#cat conftest.c
17594#echo "$CC $CPPFLAGS $CFLAGS -D_LARGEFILE_SOURCE=1 $ERRFLAG -c conftest.c 2>&1"
17595#echo `$CC $CPPFLAGS $CFLAGS -D_LARGEFILE_SOURCE=1 $ERRFLAG -c conftest.c 2>&1`
17596#exit 1
17597:
17598
17599else
17600{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: failed" >&5
17601printf "%s\n" "failed" >&6; }
17602:
17603
17604fi
17605fi
17606
17607
17608
17609{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if nonblocking sockets work" >&5
17610printf %s "checking if nonblocking sockets work... " >&6; }
17611if echo $host | grep mingw >/dev/null; then
17612	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no (windows)" >&5
17613printf "%s\n" "no (windows)" >&6; }
17614
17615printf "%s\n" "#define NONBLOCKING_IS_BROKEN 1" >>confdefs.h
17616
17617else
17618if test "$cross_compiling" = yes
17619then :
17620
17621	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: crosscompile(yes)" >&5
17622printf "%s\n" "crosscompile(yes)" >&6; }
17623
17624else case e in #(
17625  e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17626/* end confdefs.h.  */
17627
17628
17629#include <stdio.h>
17630#include <string.h>
17631#include <stdlib.h>
17632#include <fcntl.h>
17633#include <errno.h>
17634#ifdef HAVE_SYS_TYPES_H
17635#include <sys/types.h>
17636#endif
17637#ifdef HAVE_SYS_SELECT_H
17638#include <sys/select.h>
17639#endif
17640#ifdef HAVE_SYS_SOCKET_H
17641#include <sys/socket.h>
17642#endif
17643#ifdef HAVE_NETINET_IN_H
17644#include <netinet/in.h>
17645#endif
17646#ifdef HAVE_ARPA_INET_H
17647#include <arpa/inet.h>
17648#endif
17649#ifdef HAVE_UNISTD_H
17650#include <unistd.h>
17651#endif
17652#ifdef HAVE_TIME_H
17653#include <time.h>
17654#endif
17655
17656int main(void)
17657{
17658	int port;
17659	int sfd, cfd;
17660	int num = 10;
17661	int i, p;
17662	struct sockaddr_in a;
17663	/* test if select and nonblocking reads work well together */
17664	/* open port.
17665	   fork child to send 10 messages.
17666	   select to read.
17667	   then try to nonblocking read the 10 messages
17668	   then, nonblocking read must give EAGAIN
17669	*/
17670
17671	port = 12345 + (time(0)%32);
17672	sfd = socket(PF_INET, SOCK_DGRAM, 0);
17673	if(sfd == -1) {
17674		perror("socket");
17675		return 1;
17676	}
17677	memset(&a, 0, sizeof(a));
17678	a.sin_family = AF_INET;
17679	a.sin_port = htons(port);
17680	a.sin_addr.s_addr = inet_addr("127.0.0.1");
17681	if(bind(sfd, (struct sockaddr*)&a, sizeof(a)) < 0) {
17682		perror("bind");
17683		return 1;
17684	}
17685	if(fcntl(sfd, F_SETFL, O_NONBLOCK) == -1) {
17686		perror("fcntl");
17687		return 1;
17688	}
17689
17690	cfd = socket(PF_INET, SOCK_DGRAM, 0);
17691	if(cfd == -1) {
17692		perror("client socket");
17693		return 1;
17694	}
17695	a.sin_port = 0;
17696	if(bind(cfd, (struct sockaddr*)&a, sizeof(a)) < 0) {
17697		perror("client bind");
17698		return 1;
17699	}
17700	a.sin_port = htons(port);
17701
17702	/* no handler, causes exit in 10 seconds */
17703	alarm(10);
17704
17705	/* send and receive on the socket */
17706	if((p=fork()) == 0) {
17707		for(i=0; i<num; i++) {
17708			if(sendto(cfd, &i, sizeof(i), 0,
17709				(struct sockaddr*)&a, sizeof(a)) < 0) {
17710				perror("sendto");
17711				return 1;
17712			}
17713		}
17714	} else {
17715		/* parent */
17716		fd_set rset;
17717		int x;
17718		if(p == -1) {
17719			perror("fork");
17720			return 1;
17721		}
17722		FD_ZERO(&rset);
17723		FD_SET(sfd, &rset);
17724		if(select(sfd+1, &rset, NULL, NULL, NULL) < 1) {
17725			perror("select");
17726			return 1;
17727		}
17728		i = 0;
17729		while(i < num) {
17730			if(recv(sfd, &x, sizeof(x), 0) != sizeof(x)) {
17731				if(errno == EAGAIN)
17732					continue;
17733				perror("recv");
17734				return 1;
17735			}
17736			i++;
17737		}
17738		/* now we want to get EAGAIN: nonblocking goodness */
17739		errno = 0;
17740		recv(sfd, &x, sizeof(x), 0);
17741		if(errno != EAGAIN) {
17742			perror("trying to recv again");
17743			return 1;
17744		}
17745		/* EAGAIN encountered */
17746	}
17747
17748	close(sfd);
17749	close(cfd);
17750	return 0;
17751}
17752
17753_ACEOF
17754if ac_fn_c_try_run "$LINENO"
17755then :
17756
17757	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17758printf "%s\n" "yes" >&6; }
17759
17760else case e in #(
17761  e)
17762	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
17763printf "%s\n" "no" >&6; }
17764
17765printf "%s\n" "#define NONBLOCKING_IS_BROKEN 1" >>confdefs.h
17766
17767 ;;
17768esac
17769fi
17770rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17771  conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
17772esac
17773fi
17774
17775fi
17776
17777
17778{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mkdir has one arg" >&5
17779printf %s "checking whether mkdir has one arg... " >&6; }
17780cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17781/* end confdefs.h.  */
17782
17783#include <stdio.h>
17784#include <unistd.h>
17785#ifdef HAVE_WINSOCK2_H
17786#include <winsock2.h>
17787#endif
17788#ifdef HAVE_SYS_STAT_H
17789#include <sys/stat.h>
17790#endif
17791
17792int
17793main (void)
17794{
17795
17796	(void)mkdir("directory");
17797
17798  ;
17799  return 0;
17800}
17801_ACEOF
17802if ac_fn_c_try_compile "$LINENO"
17803then :
17804  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17805printf "%s\n" "yes" >&6; }
17806
17807printf "%s\n" "#define MKDIR_HAS_ONE_ARG 1" >>confdefs.h
17808
17809
17810else case e in #(
17811  e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
17812printf "%s\n" "no" >&6; }
17813 ;;
17814esac
17815fi
17816rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
17817
17818
17819  for ac_func in strptime
17820do :
17821  ac_fn_c_check_func "$LINENO" "strptime" "ac_cv_func_strptime"
17822if test "x$ac_cv_func_strptime" = xyes
17823then :
17824  printf "%s\n" "#define HAVE_STRPTIME 1" >>confdefs.h
17825
17826{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether strptime works" >&5
17827printf %s "checking whether strptime works... " >&6; }
17828if test c${cross_compiling} = cno; then
17829if test "$cross_compiling" = yes
17830then :
17831  eval "ac_cv_c_strptime_works=maybe"
17832else case e in #(
17833  e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17834/* end confdefs.h.  */
17835
17836#define _XOPEN_SOURCE 600
17837#include <time.h>
17838int main(void) { struct tm tm; char *res;
17839res = 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);
17840if (!res) return 2;
17841res = strptime("20070207111842", "%Y%m%d%H%M%S", &tm);
17842if (!res) return 1; return 0; }
17843
17844_ACEOF
17845if ac_fn_c_try_run "$LINENO"
17846then :
17847  eval "ac_cv_c_strptime_works=yes"
17848else case e in #(
17849  e) eval "ac_cv_c_strptime_works=no" ;;
17850esac
17851fi
17852rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17853  conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
17854esac
17855fi
17856
17857else
17858eval "ac_cv_c_strptime_works=maybe"
17859fi
17860{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_strptime_works" >&5
17861printf "%s\n" "$ac_cv_c_strptime_works" >&6; }
17862if test $ac_cv_c_strptime_works = no; then
17863case " $LIBOBJS " in
17864  *" strptime.$ac_objext "* ) ;;
17865  *) LIBOBJS="$LIBOBJS strptime.$ac_objext"
17866 ;;
17867esac
17868
17869else
17870
17871printf "%s\n" "#define STRPTIME_WORKS 1" >>confdefs.h
17872
17873fi
17874
17875else case e in #(
17876  e) case " $LIBOBJS " in
17877  *" strptime.$ac_objext "* ) ;;
17878  *) LIBOBJS="$LIBOBJS strptime.$ac_objext"
17879 ;;
17880esac
17881 ;;
17882esac
17883fi
17884
17885done
17886
17887# check if we can use SO_REUSEPORT
17888reuseport_default=0
17889if echo "$host" | $GREP -i -e linux >/dev/null; then reuseport_default=1; fi
17890if echo "$host" | $GREP -i -e dragonfly >/dev/null; then reuseport_default=1; fi
17891if test "$reuseport_default" = 1; then
17892
17893printf "%s\n" "#define REUSEPORT_DEFAULT 1" >>confdefs.h
17894
17895else
17896
17897printf "%s\n" "#define REUSEPORT_DEFAULT 0" >>confdefs.h
17898
17899fi
17900
17901# Include systemd.m4 - begin
17902#   macros for configuring systemd
17903#   Copyright 2015, Sami Kerola, CloudFlare.
17904#   BSD licensed.
17905# Check whether --enable-systemd was given.
17906if test ${enable_systemd+y}
17907then :
17908  enableval=$enable_systemd;
17909else case e in #(
17910  e) enable_systemd=no ;;
17911esac
17912fi
17913
17914have_systemd=no
17915if test "x$enable_systemd" != xno
17916then :
17917
17918    if test -n "$PKG_CONFIG"; then
17919		have_systemd=no
17920
17921pkg_failed=no
17922{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for SYSTEMD" >&5
17923printf %s "checking for SYSTEMD... " >&6; }
17924
17925if test -n "$SYSTEMD_CFLAGS"; then
17926    pkg_cv_SYSTEMD_CFLAGS="$SYSTEMD_CFLAGS"
17927 elif test -n "$PKG_CONFIG"; then
17928    if test -n "$PKG_CONFIG" && \
17929    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libsystemd\""; } >&5
17930  ($PKG_CONFIG --exists --print-errors "libsystemd") 2>&5
17931  ac_status=$?
17932  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
17933  test $ac_status = 0; }; then
17934  pkg_cv_SYSTEMD_CFLAGS=`$PKG_CONFIG --cflags "libsystemd" 2>/dev/null`
17935		      test "x$?" != "x0" && pkg_failed=yes
17936else
17937  pkg_failed=yes
17938fi
17939 else
17940    pkg_failed=untried
17941fi
17942if test -n "$SYSTEMD_LIBS"; then
17943    pkg_cv_SYSTEMD_LIBS="$SYSTEMD_LIBS"
17944 elif test -n "$PKG_CONFIG"; then
17945    if test -n "$PKG_CONFIG" && \
17946    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libsystemd\""; } >&5
17947  ($PKG_CONFIG --exists --print-errors "libsystemd") 2>&5
17948  ac_status=$?
17949  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
17950  test $ac_status = 0; }; then
17951  pkg_cv_SYSTEMD_LIBS=`$PKG_CONFIG --libs "libsystemd" 2>/dev/null`
17952		      test "x$?" != "x0" && pkg_failed=yes
17953else
17954  pkg_failed=yes
17955fi
17956 else
17957    pkg_failed=untried
17958fi
17959
17960
17961
17962if test $pkg_failed = yes; then
17963   	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
17964printf "%s\n" "no" >&6; }
17965
17966if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
17967        _pkg_short_errors_supported=yes
17968else
17969        _pkg_short_errors_supported=no
17970fi
17971        if test $_pkg_short_errors_supported = yes; then
17972	        SYSTEMD_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libsystemd" 2>&1`
17973        else
17974	        SYSTEMD_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libsystemd" 2>&1`
17975        fi
17976	# Put the nasty error message in config.log where it belongs
17977	echo "$SYSTEMD_PKG_ERRORS" >&5
17978
17979	as_fn_error $? "Package requirements (libsystemd) were not met:
17980
17981$SYSTEMD_PKG_ERRORS
17982
17983Consider adjusting the PKG_CONFIG_PATH environment variable if you
17984installed software in a non-standard prefix.
17985
17986Alternatively, you may set the environment variables SYSTEMD_CFLAGS
17987and SYSTEMD_LIBS to avoid the need to call pkg-config.
17988See the pkg-config man page for more details." "$LINENO" 5
17989elif test $pkg_failed = untried; then
17990     	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
17991printf "%s\n" "no" >&6; }
17992	{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
17993printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
17994as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
17995is in your PATH or set the PKG_CONFIG environment variable to the full
17996path to pkg-config.
17997
17998Alternatively, you may set the environment variables SYSTEMD_CFLAGS
17999and SYSTEMD_LIBS to avoid the need to call pkg-config.
18000See the pkg-config man page for more details.
18001
18002To get pkg-config, see <http://pkg-config.freedesktop.org/>.
18003See 'config.log' for more details" "$LINENO" 5; }
18004else
18005	SYSTEMD_CFLAGS=$pkg_cv_SYSTEMD_CFLAGS
18006	SYSTEMD_LIBS=$pkg_cv_SYSTEMD_LIBS
18007        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
18008printf "%s\n" "yes" >&6; }
18009	have_systemd=yes
18010fi
18011		if test "x$have_systemd" != "xyes"
18012then :
18013
18014		have_systemd_daemon=no
18015
18016pkg_failed=no
18017{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for SYSTEMD_DAEMON" >&5
18018printf %s "checking for SYSTEMD_DAEMON... " >&6; }
18019
18020if test -n "$SYSTEMD_DAEMON_CFLAGS"; then
18021    pkg_cv_SYSTEMD_DAEMON_CFLAGS="$SYSTEMD_DAEMON_CFLAGS"
18022 elif test -n "$PKG_CONFIG"; then
18023    if test -n "$PKG_CONFIG" && \
18024    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libsystemd-daemon\""; } >&5
18025  ($PKG_CONFIG --exists --print-errors "libsystemd-daemon") 2>&5
18026  ac_status=$?
18027  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
18028  test $ac_status = 0; }; then
18029  pkg_cv_SYSTEMD_DAEMON_CFLAGS=`$PKG_CONFIG --cflags "libsystemd-daemon" 2>/dev/null`
18030		      test "x$?" != "x0" && pkg_failed=yes
18031else
18032  pkg_failed=yes
18033fi
18034 else
18035    pkg_failed=untried
18036fi
18037if test -n "$SYSTEMD_DAEMON_LIBS"; then
18038    pkg_cv_SYSTEMD_DAEMON_LIBS="$SYSTEMD_DAEMON_LIBS"
18039 elif test -n "$PKG_CONFIG"; then
18040    if test -n "$PKG_CONFIG" && \
18041    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libsystemd-daemon\""; } >&5
18042  ($PKG_CONFIG --exists --print-errors "libsystemd-daemon") 2>&5
18043  ac_status=$?
18044  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
18045  test $ac_status = 0; }; then
18046  pkg_cv_SYSTEMD_DAEMON_LIBS=`$PKG_CONFIG --libs "libsystemd-daemon" 2>/dev/null`
18047		      test "x$?" != "x0" && pkg_failed=yes
18048else
18049  pkg_failed=yes
18050fi
18051 else
18052    pkg_failed=untried
18053fi
18054
18055
18056
18057if test $pkg_failed = yes; then
18058   	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
18059printf "%s\n" "no" >&6; }
18060
18061if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
18062        _pkg_short_errors_supported=yes
18063else
18064        _pkg_short_errors_supported=no
18065fi
18066        if test $_pkg_short_errors_supported = yes; then
18067	        SYSTEMD_DAEMON_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libsystemd-daemon" 2>&1`
18068        else
18069	        SYSTEMD_DAEMON_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libsystemd-daemon" 2>&1`
18070        fi
18071	# Put the nasty error message in config.log where it belongs
18072	echo "$SYSTEMD_DAEMON_PKG_ERRORS" >&5
18073
18074	as_fn_error $? "Package requirements (libsystemd-daemon) were not met:
18075
18076$SYSTEMD_DAEMON_PKG_ERRORS
18077
18078Consider adjusting the PKG_CONFIG_PATH environment variable if you
18079installed software in a non-standard prefix.
18080
18081Alternatively, you may set the environment variables SYSTEMD_DAEMON_CFLAGS
18082and SYSTEMD_DAEMON_LIBS to avoid the need to call pkg-config.
18083See the pkg-config man page for more details." "$LINENO" 5
18084elif test $pkg_failed = untried; then
18085     	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
18086printf "%s\n" "no" >&6; }
18087	{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
18088printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
18089as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
18090is in your PATH or set the PKG_CONFIG environment variable to the full
18091path to pkg-config.
18092
18093Alternatively, you may set the environment variables SYSTEMD_DAEMON_CFLAGS
18094and SYSTEMD_DAEMON_LIBS to avoid the need to call pkg-config.
18095See the pkg-config man page for more details.
18096
18097To get pkg-config, see <http://pkg-config.freedesktop.org/>.
18098See 'config.log' for more details" "$LINENO" 5; }
18099else
18100	SYSTEMD_DAEMON_CFLAGS=$pkg_cv_SYSTEMD_DAEMON_CFLAGS
18101	SYSTEMD_DAEMON_LIBS=$pkg_cv_SYSTEMD_DAEMON_LIBS
18102        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
18103printf "%s\n" "yes" >&6; }
18104	have_systemd_daemon=yes
18105fi
18106		if test "x$have_systemd_daemon" = "xyes"
18107then :
18108  have_systemd=yes
18109fi
18110
18111fi
18112	case $enable_systemd:$have_systemd in #(
18113  yes:no) :
18114    as_fn_error $? "systemd enabled but libsystemd not found" "$LINENO" 5 ;; #(
18115  *:yes) :
18116
18117printf "%s\n" "#define HAVE_SYSTEMD 1" >>confdefs.h
18118
18119		LIBS="$LIBS $SYSTEMD_LIBS"
18120
18121	 ;; #(
18122  *) :
18123     ;;
18124esac
18125    else
18126    	as_fn_error $? "systemd enabled but need pkg-config to configure for it" "$LINENO" 5
18127    fi
18128
18129fi
18130 if test "x$have_systemd" = xyes; then
18131  USE_SYSTEMD_TRUE=
18132  USE_SYSTEMD_FALSE='#'
18133else
18134  USE_SYSTEMD_TRUE='#'
18135  USE_SYSTEMD_FALSE=
18136fi
18137
18138
18139# Include systemd.m4 - end
18140
18141# set memory allocation checking if requested
18142# Check whether --enable-alloc-checks was given.
18143if test ${enable_alloc_checks+y}
18144then :
18145  enableval=$enable_alloc_checks;
18146fi
18147
18148# Check whether --enable-alloc-lite was given.
18149if test ${enable_alloc_lite+y}
18150then :
18151  enableval=$enable_alloc_lite;
18152fi
18153
18154# Check whether --enable-alloc-nonregional was given.
18155if test ${enable_alloc_nonregional+y}
18156then :
18157  enableval=$enable_alloc_nonregional;
18158fi
18159
18160if test x_$enable_alloc_nonregional = x_yes; then
18161
18162printf "%s\n" "#define UNBOUND_ALLOC_NONREGIONAL 1" >>confdefs.h
18163
18164fi
18165if test x_$enable_alloc_checks = x_yes; then
18166
18167printf "%s\n" "#define UNBOUND_ALLOC_STATS 1" >>confdefs.h
18168
18169	SLDNS_ALLOCCHECK_EXTRA_OBJ="alloc.lo log.lo"
18170
18171	ASYNCLOOK_ALLOCCHECK_EXTRA_OBJ="alloc.lo"
18172
18173else
18174	if test x_$enable_alloc_lite = x_yes; then
18175
18176printf "%s\n" "#define UNBOUND_ALLOC_LITE 1" >>confdefs.h
18177
18178	else
18179
18180	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible malloc" >&5
18181printf %s "checking for GNU libc compatible malloc... " >&6; }
18182	if test "$cross_compiling" = yes
18183then :
18184  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no (crosscompile)" >&5
18185printf "%s\n" "no (crosscompile)" >&6; }
18186	case " $LIBOBJS " in
18187  *" malloc.$ac_objext "* ) ;;
18188  *) LIBOBJS="$LIBOBJS malloc.$ac_objext"
18189 ;;
18190esac
18191
18192
18193printf "%s\n" "#define malloc rpl_malloc_unbound" >>confdefs.h
18194
18195else case e in #(
18196  e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18197/* end confdefs.h.  */
18198#if defined STDC_HEADERS || defined HAVE_STDLIB_H
18199#include <stdlib.h>
18200#else
18201char *malloc ();
18202#endif
18203
18204int
18205main (void)
18206{
18207 if(malloc(0) != 0) return 1;
18208  ;
18209  return 0;
18210}
18211
18212_ACEOF
18213if ac_fn_c_try_run "$LINENO"
18214then :
18215  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
18216printf "%s\n" "no" >&6; }
18217	case " $LIBOBJS " in
18218  *" malloc.$ac_objext "* ) ;;
18219  *) LIBOBJS="$LIBOBJS malloc.$ac_objext"
18220 ;;
18221esac
18222
18223
18224printf "%s\n" "#define malloc rpl_malloc_unbound" >>confdefs.h
18225
18226else case e in #(
18227  e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
18228printf "%s\n" "yes" >&6; }
18229
18230printf "%s\n" "#define HAVE_MALLOC 1" >>confdefs.h
18231 ;;
18232esac
18233fi
18234rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18235  conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
18236esac
18237fi
18238
18239
18240	fi
18241fi
18242
18243# check windows threads (we use them, not pthreads, on windows).
18244if test "$on_mingw" = "yes"; then
18245# check windows threads
18246	ac_fn_c_check_header_compile "$LINENO" "windows.h" "ac_cv_header_windows_h" "$ac_includes_default
18247"
18248if test "x$ac_cv_header_windows_h" = xyes
18249then :
18250  printf "%s\n" "#define HAVE_WINDOWS_H 1" >>confdefs.h
18251
18252fi
18253
18254	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for CreateThread" >&5
18255printf %s "checking for CreateThread... " >&6; }
18256	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18257/* end confdefs.h.  */
18258
18259#ifdef HAVE_WINDOWS_H
18260#include <windows.h>
18261#endif
18262
18263int
18264main (void)
18265{
18266
18267	HANDLE t = CreateThread(NULL, 0, NULL, NULL, 0, NULL);
18268
18269  ;
18270  return 0;
18271}
18272_ACEOF
18273if ac_fn_c_try_compile "$LINENO"
18274then :
18275  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
18276printf "%s\n" "yes" >&6; }
18277
18278printf "%s\n" "#define HAVE_WINDOWS_THREADS 1" >>confdefs.h
18279
18280
18281else case e in #(
18282  e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
18283printf "%s\n" "no" >&6; }
18284 ;;
18285esac
18286fi
18287rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
18288
18289else
18290# not on mingw, check thread libraries.
18291
18292# check for thread library.
18293# check this first, so that the pthread lib does not get linked in via
18294# libssl or libpython, and thus distorts the tests, and we end up using
18295# the non-threadsafe C libraries.
18296
18297# Check whether --with-pthreads was given.
18298if test ${with_pthreads+y}
18299then :
18300  withval=$with_pthreads;
18301else case e in #(
18302  e)  withval="yes"  ;;
18303esac
18304fi
18305
18306ub_have_pthreads=no
18307if test x_$withval != x_no; then
18308	ac_ext=c
18309ac_cpp='$CPP $CPPFLAGS'
18310ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
18311ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
18312ac_compiler_gnu=$ac_cv_c_compiler_gnu
18313{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
18314printf %s "checking how to run the C preprocessor... " >&6; }
18315# On Suns, sometimes $CPP names a directory.
18316if test -n "$CPP" && test -d "$CPP"; then
18317  CPP=
18318fi
18319if test -z "$CPP"; then
18320  if test ${ac_cv_prog_CPP+y}
18321then :
18322  printf %s "(cached) " >&6
18323else case e in #(
18324  e)     # Double quotes because $CC needs to be expanded
18325    for CPP in "$CC -E" "$CC -E -traditional-cpp" cpp /lib/cpp
18326    do
18327      ac_preproc_ok=false
18328for ac_c_preproc_warn_flag in '' yes
18329do
18330  # Use a header file that comes with gcc, so configuring glibc
18331  # with a fresh cross-compiler works.
18332  # On the NeXT, cc -E runs the code through the compiler's parser,
18333  # not just through cpp. "Syntax error" is here to catch this case.
18334  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18335/* end confdefs.h.  */
18336#include <limits.h>
18337		     Syntax error
18338_ACEOF
18339if ac_fn_c_try_cpp "$LINENO"
18340then :
18341
18342else case e in #(
18343  e) # Broken: fails on valid input.
18344continue ;;
18345esac
18346fi
18347rm -f conftest.err conftest.i conftest.$ac_ext
18348
18349  # OK, works on sane cases.  Now check whether nonexistent headers
18350  # can be detected and how.
18351  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18352/* end confdefs.h.  */
18353#include <ac_nonexistent.h>
18354_ACEOF
18355if ac_fn_c_try_cpp "$LINENO"
18356then :
18357  # Broken: success on invalid input.
18358continue
18359else case e in #(
18360  e) # Passes both tests.
18361ac_preproc_ok=:
18362break ;;
18363esac
18364fi
18365rm -f conftest.err conftest.i conftest.$ac_ext
18366
18367done
18368# Because of 'break', _AC_PREPROC_IFELSE's cleaning code was skipped.
18369rm -f conftest.i conftest.err conftest.$ac_ext
18370if $ac_preproc_ok
18371then :
18372  break
18373fi
18374
18375    done
18376    ac_cv_prog_CPP=$CPP
18377   ;;
18378esac
18379fi
18380  CPP=$ac_cv_prog_CPP
18381else
18382  ac_cv_prog_CPP=$CPP
18383fi
18384{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
18385printf "%s\n" "$CPP" >&6; }
18386ac_preproc_ok=false
18387for ac_c_preproc_warn_flag in '' yes
18388do
18389  # Use a header file that comes with gcc, so configuring glibc
18390  # with a fresh cross-compiler works.
18391  # On the NeXT, cc -E runs the code through the compiler's parser,
18392  # not just through cpp. "Syntax error" is here to catch this case.
18393  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18394/* end confdefs.h.  */
18395#include <limits.h>
18396		     Syntax error
18397_ACEOF
18398if ac_fn_c_try_cpp "$LINENO"
18399then :
18400
18401else case e in #(
18402  e) # Broken: fails on valid input.
18403continue ;;
18404esac
18405fi
18406rm -f conftest.err conftest.i conftest.$ac_ext
18407
18408  # OK, works on sane cases.  Now check whether nonexistent headers
18409  # can be detected and how.
18410  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18411/* end confdefs.h.  */
18412#include <ac_nonexistent.h>
18413_ACEOF
18414if ac_fn_c_try_cpp "$LINENO"
18415then :
18416  # Broken: success on invalid input.
18417continue
18418else case e in #(
18419  e) # Passes both tests.
18420ac_preproc_ok=:
18421break ;;
18422esac
18423fi
18424rm -f conftest.err conftest.i conftest.$ac_ext
18425
18426done
18427# Because of 'break', _AC_PREPROC_IFELSE's cleaning code was skipped.
18428rm -f conftest.i conftest.err conftest.$ac_ext
18429if $ac_preproc_ok
18430then :
18431
18432else case e in #(
18433  e) { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
18434printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
18435as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
18436See 'config.log' for more details" "$LINENO" 5; } ;;
18437esac
18438fi
18439
18440ac_ext=c
18441ac_cpp='$CPP $CPPFLAGS'
18442ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
18443ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
18444ac_compiler_gnu=$ac_cv_c_compiler_gnu
18445
18446
18447{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for egrep -e" >&5
18448printf %s "checking for egrep -e... " >&6; }
18449if test ${ac_cv_path_EGREP_TRADITIONAL+y}
18450then :
18451  printf %s "(cached) " >&6
18452else case e in #(
18453  e) if test -z "$EGREP_TRADITIONAL"; then
18454  ac_path_EGREP_TRADITIONAL_found=false
18455  # Loop through the user's path and test for each of PROGNAME-LIST
18456  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18457for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
18458do
18459  IFS=$as_save_IFS
18460  case $as_dir in #(((
18461    '') as_dir=./ ;;
18462    */) ;;
18463    *) as_dir=$as_dir/ ;;
18464  esac
18465    for ac_prog in grep ggrep
18466   do
18467    for ac_exec_ext in '' $ac_executable_extensions; do
18468      ac_path_EGREP_TRADITIONAL="$as_dir$ac_prog$ac_exec_ext"
18469      as_fn_executable_p "$ac_path_EGREP_TRADITIONAL" || continue
18470# Check for GNU ac_path_EGREP_TRADITIONAL and select it if it is found.
18471  # Check for GNU $ac_path_EGREP_TRADITIONAL
18472case `"$ac_path_EGREP_TRADITIONAL" --version 2>&1` in #(
18473*GNU*)
18474  ac_cv_path_EGREP_TRADITIONAL="$ac_path_EGREP_TRADITIONAL" ac_path_EGREP_TRADITIONAL_found=:;;
18475#(
18476*)
18477  ac_count=0
18478  printf %s 0123456789 >"conftest.in"
18479  while :
18480  do
18481    cat "conftest.in" "conftest.in" >"conftest.tmp"
18482    mv "conftest.tmp" "conftest.in"
18483    cp "conftest.in" "conftest.nl"
18484    printf "%s\n" 'EGREP_TRADITIONAL' >> "conftest.nl"
18485    "$ac_path_EGREP_TRADITIONAL" -E 'EGR(EP|AC)_TRADITIONAL$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
18486    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
18487    as_fn_arith $ac_count + 1 && ac_count=$as_val
18488    if test $ac_count -gt ${ac_path_EGREP_TRADITIONAL_max-0}; then
18489      # Best one so far, save it but keep looking for a better one
18490      ac_cv_path_EGREP_TRADITIONAL="$ac_path_EGREP_TRADITIONAL"
18491      ac_path_EGREP_TRADITIONAL_max=$ac_count
18492    fi
18493    # 10*(2^10) chars as input seems more than enough
18494    test $ac_count -gt 10 && break
18495  done
18496  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
18497esac
18498
18499      $ac_path_EGREP_TRADITIONAL_found && break 3
18500    done
18501  done
18502  done
18503IFS=$as_save_IFS
18504  if test -z "$ac_cv_path_EGREP_TRADITIONAL"; then
18505    :
18506  fi
18507else
18508  ac_cv_path_EGREP_TRADITIONAL=$EGREP_TRADITIONAL
18509fi
18510
18511    if test "$ac_cv_path_EGREP_TRADITIONAL"
18512then :
18513  ac_cv_path_EGREP_TRADITIONAL="$ac_cv_path_EGREP_TRADITIONAL -E"
18514else case e in #(
18515  e) if test -z "$EGREP_TRADITIONAL"; then
18516  ac_path_EGREP_TRADITIONAL_found=false
18517  # Loop through the user's path and test for each of PROGNAME-LIST
18518  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18519for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
18520do
18521  IFS=$as_save_IFS
18522  case $as_dir in #(((
18523    '') as_dir=./ ;;
18524    */) ;;
18525    *) as_dir=$as_dir/ ;;
18526  esac
18527    for ac_prog in egrep
18528   do
18529    for ac_exec_ext in '' $ac_executable_extensions; do
18530      ac_path_EGREP_TRADITIONAL="$as_dir$ac_prog$ac_exec_ext"
18531      as_fn_executable_p "$ac_path_EGREP_TRADITIONAL" || continue
18532# Check for GNU ac_path_EGREP_TRADITIONAL and select it if it is found.
18533  # Check for GNU $ac_path_EGREP_TRADITIONAL
18534case `"$ac_path_EGREP_TRADITIONAL" --version 2>&1` in #(
18535*GNU*)
18536  ac_cv_path_EGREP_TRADITIONAL="$ac_path_EGREP_TRADITIONAL" ac_path_EGREP_TRADITIONAL_found=:;;
18537#(
18538*)
18539  ac_count=0
18540  printf %s 0123456789 >"conftest.in"
18541  while :
18542  do
18543    cat "conftest.in" "conftest.in" >"conftest.tmp"
18544    mv "conftest.tmp" "conftest.in"
18545    cp "conftest.in" "conftest.nl"
18546    printf "%s\n" 'EGREP_TRADITIONAL' >> "conftest.nl"
18547    "$ac_path_EGREP_TRADITIONAL" 'EGR(EP|AC)_TRADITIONAL$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
18548    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
18549    as_fn_arith $ac_count + 1 && ac_count=$as_val
18550    if test $ac_count -gt ${ac_path_EGREP_TRADITIONAL_max-0}; then
18551      # Best one so far, save it but keep looking for a better one
18552      ac_cv_path_EGREP_TRADITIONAL="$ac_path_EGREP_TRADITIONAL"
18553      ac_path_EGREP_TRADITIONAL_max=$ac_count
18554    fi
18555    # 10*(2^10) chars as input seems more than enough
18556    test $ac_count -gt 10 && break
18557  done
18558  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
18559esac
18560
18561      $ac_path_EGREP_TRADITIONAL_found && break 3
18562    done
18563  done
18564  done
18565IFS=$as_save_IFS
18566  if test -z "$ac_cv_path_EGREP_TRADITIONAL"; then
18567    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
18568  fi
18569else
18570  ac_cv_path_EGREP_TRADITIONAL=$EGREP_TRADITIONAL
18571fi
18572 ;;
18573esac
18574fi ;;
18575esac
18576fi
18577{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP_TRADITIONAL" >&5
18578printf "%s\n" "$ac_cv_path_EGREP_TRADITIONAL" >&6; }
18579 EGREP_TRADITIONAL=$ac_cv_path_EGREP_TRADITIONAL
18580
18581
18582
18583
18584
18585ac_ext=c
18586ac_cpp='$CPP $CPPFLAGS'
18587ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
18588ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
18589ac_compiler_gnu=$ac_cv_c_compiler_gnu
18590
18591ax_pthread_ok=no
18592
18593# We used to check for pthread.h first, but this fails if pthread.h
18594# requires special compiler flags (e.g. on Tru64 or Sequent).
18595# It gets checked for in the link test anyway.
18596
18597# First of all, check if the user has set any of the PTHREAD_LIBS,
18598# etcetera environment variables, and if threads linking works using
18599# them:
18600if test "x$PTHREAD_CFLAGS$PTHREAD_LIBS" != "x"; then
18601        ax_pthread_save_CC="$CC"
18602        ax_pthread_save_CFLAGS="$CFLAGS"
18603        ax_pthread_save_LIBS="$LIBS"
18604        if test "x$PTHREAD_CC" != "x"
18605then :
18606  CC="$PTHREAD_CC"
18607fi
18608        if test "x$PTHREAD_CXX" != "x"
18609then :
18610  CXX="$PTHREAD_CXX"
18611fi
18612        CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
18613        LIBS="$PTHREAD_LIBS $LIBS"
18614        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS" >&5
18615printf %s "checking for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS... " >&6; }
18616        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18617/* end confdefs.h.  */
18618
18619/* Override any GCC internal prototype to avoid an error.
18620   Use char because int might match the return type of a GCC
18621   builtin and then its argument prototype would still apply.
18622   The 'extern "C"' is for builds by C++ compilers;
18623   although this is not generally supported in C code supporting it here
18624   has little cost and some practical benefit (sr 110532).  */
18625#ifdef __cplusplus
18626extern "C"
18627#endif
18628char pthread_join (void);
18629int
18630main (void)
18631{
18632return pthread_join ();
18633  ;
18634  return 0;
18635}
18636_ACEOF
18637if ac_fn_c_try_link "$LINENO"
18638then :
18639  ax_pthread_ok=yes
18640fi
18641rm -f core conftest.err conftest.$ac_objext conftest.beam \
18642    conftest$ac_exeext conftest.$ac_ext
18643        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
18644printf "%s\n" "$ax_pthread_ok" >&6; }
18645        if test "x$ax_pthread_ok" = "xno"; then
18646                PTHREAD_LIBS=""
18647                PTHREAD_CFLAGS=""
18648        fi
18649        CC="$ax_pthread_save_CC"
18650        CFLAGS="$ax_pthread_save_CFLAGS"
18651        LIBS="$ax_pthread_save_LIBS"
18652fi
18653
18654# We must check for the threads library under a number of different
18655# names; the ordering is very important because some systems
18656# (e.g. DEC) have both -lpthread and -lpthreads, where one of the
18657# libraries is broken (non-POSIX).
18658
18659# Create a list of thread flags to try. Items with a "," contain both
18660# C compiler flags (before ",") and linker flags (after ","). Other items
18661# starting with a "-" are C compiler flags, and remaining items are
18662# library names, except for "none" which indicates that we try without
18663# any flags at all, and "pthread-config" which is a program returning
18664# the flags for the Pth emulation library.
18665
18666ax_pthread_flags="pthreads none -Kthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config"
18667
18668# The ordering *is* (sometimes) important.  Some notes on the
18669# individual items follow:
18670
18671# pthreads: AIX (must check this before -lpthread)
18672# none: in case threads are in libc; should be tried before -Kthread and
18673#       other compiler flags to prevent continual compiler warnings
18674# -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h)
18675# -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads), Tru64
18676#           (Note: HP C rejects this with "bad form for `-t' option")
18677# -pthreads: Solaris/gcc (Note: HP C also rejects)
18678# -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
18679#      doesn't hurt to check since this sometimes defines pthreads and
18680#      -D_REENTRANT too), HP C (must be checked before -lpthread, which
18681#      is present but should not be used directly; and before -mthreads,
18682#      because the compiler interprets this as "-mt" + "-hreads")
18683# -mthreads: Mingw32/gcc, Lynx/gcc
18684# pthread: Linux, etcetera
18685# --thread-safe: KAI C++
18686# pthread-config: use pthread-config program (for GNU Pth library)
18687
18688case $host_os in
18689
18690        freebsd*)
18691
18692        # -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
18693        # lthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
18694
18695        ax_pthread_flags="-kthread lthread $ax_pthread_flags"
18696        ;;
18697
18698        hpux*)
18699
18700        # From the cc(1) man page: "[-mt] Sets various -D flags to enable
18701        # multi-threading and also sets -lpthread."
18702
18703        ax_pthread_flags="-mt -pthread pthread $ax_pthread_flags"
18704        ;;
18705
18706        openedition*)
18707
18708        # IBM z/OS requires a feature-test macro to be defined in order to
18709        # enable POSIX threads at all, so give the user a hint if this is
18710        # not set. (We don't define these ourselves, as they can affect
18711        # other portions of the system API in unpredictable ways.)
18712
18713        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18714/* end confdefs.h.  */
18715
18716#            if !defined(_OPEN_THREADS) && !defined(_UNIX03_THREADS)
18717             AX_PTHREAD_ZOS_MISSING
18718#            endif
18719
18720_ACEOF
18721if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
18722  $EGREP_TRADITIONAL "AX_PTHREAD_ZOS_MISSING" >/dev/null 2>&1
18723then :
18724  { 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
18725printf "%s\n" "$as_me: WARNING: IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support." >&2;}
18726fi
18727rm -rf conftest*
18728
18729        ;;
18730
18731        solaris*)
18732
18733        # On Solaris (at least, for some versions), libc contains stubbed
18734        # (non-functional) versions of the pthreads routines, so link-based
18735        # tests will erroneously succeed. (N.B.: The stubs are missing
18736        # pthread_cleanup_push, or rather a function called by this macro,
18737        # so we could check for that, but who knows whether they'll stub
18738        # that too in a future libc.)  So we'll check first for the
18739        # standard Solaris way of linking pthreads (-mt -lpthread).
18740
18741        ax_pthread_flags="-mt,-lpthread pthread $ax_pthread_flags"
18742        ;;
18743esac
18744
18745# Are we compiling with Clang?
18746
18747{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC is Clang" >&5
18748printf %s "checking whether $CC is Clang... " >&6; }
18749if test ${ax_cv_PTHREAD_CLANG+y}
18750then :
18751  printf %s "(cached) " >&6
18752else case e in #(
18753  e) ax_cv_PTHREAD_CLANG=no
18754     # Note that Autoconf sets GCC=yes for Clang as well as GCC
18755     if test "x$GCC" = "xyes"; then
18756        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18757/* end confdefs.h.  */
18758/* Note: Clang 2.7 lacks __clang_[a-z]+__ */
18759#            if defined(__clang__) && defined(__llvm__)
18760             AX_PTHREAD_CC_IS_CLANG
18761#            endif
18762
18763_ACEOF
18764if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
18765  $EGREP_TRADITIONAL "AX_PTHREAD_CC_IS_CLANG" >/dev/null 2>&1
18766then :
18767  ax_cv_PTHREAD_CLANG=yes
18768fi
18769rm -rf conftest*
18770
18771     fi
18772     ;;
18773esac
18774fi
18775{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_CLANG" >&5
18776printf "%s\n" "$ax_cv_PTHREAD_CLANG" >&6; }
18777ax_pthread_clang="$ax_cv_PTHREAD_CLANG"
18778
18779
18780# GCC generally uses -pthread, or -pthreads on some platforms (e.g. SPARC)
18781
18782# Note that for GCC and Clang -pthread generally implies -lpthread,
18783# except when -nostdlib is passed.
18784# This is problematic using libtool to build C++ shared libraries with pthread:
18785# [1] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=25460
18786# [2] https://bugzilla.redhat.com/show_bug.cgi?id=661333
18787# [3] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=468555
18788# To solve this, first try -pthread together with -lpthread for GCC
18789
18790if test "x$GCC" = "xyes"
18791then :
18792  ax_pthread_flags="-pthread,-lpthread -pthread -pthreads $ax_pthread_flags"
18793fi
18794
18795# Clang takes -pthread (never supported any other flag), but we'll try with -lpthread first
18796
18797if test "x$ax_pthread_clang" = "xyes"
18798then :
18799  ax_pthread_flags="-pthread,-lpthread -pthread"
18800fi
18801
18802
18803# The presence of a feature test macro requesting re-entrant function
18804# definitions is, on some systems, a strong hint that pthreads support is
18805# correctly enabled
18806
18807case $host_os in
18808        darwin* | hpux* | linux* | osf* | solaris*)
18809        ax_pthread_check_macro="_REENTRANT"
18810        ;;
18811
18812        aix*)
18813        ax_pthread_check_macro="_THREAD_SAFE"
18814        ;;
18815
18816        *)
18817        ax_pthread_check_macro="--"
18818        ;;
18819esac
18820if test "x$ax_pthread_check_macro" = "x--"
18821then :
18822  ax_pthread_check_cond=0
18823else case e in #(
18824  e) ax_pthread_check_cond="!defined($ax_pthread_check_macro)" ;;
18825esac
18826fi
18827
18828
18829if test "x$ax_pthread_ok" = "xno"; then
18830for ax_pthread_try_flag in $ax_pthread_flags; do
18831
18832        case $ax_pthread_try_flag in
18833                none)
18834                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether pthreads work without any flags" >&5
18835printf %s "checking whether pthreads work without any flags... " >&6; }
18836                ;;
18837
18838                *,*)
18839                PTHREAD_CFLAGS=`echo $ax_pthread_try_flag | sed "s/^\(.*\),\(.*\)$/\1/"`
18840                PTHREAD_LIBS=`echo $ax_pthread_try_flag | sed "s/^\(.*\),\(.*\)$/\2/"`
18841                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with \"$PTHREAD_CFLAGS\" and \"$PTHREAD_LIBS\"" >&5
18842printf %s "checking whether pthreads work with \"$PTHREAD_CFLAGS\" and \"$PTHREAD_LIBS\"... " >&6; }
18843                ;;
18844
18845                -*)
18846                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with $ax_pthread_try_flag" >&5
18847printf %s "checking whether pthreads work with $ax_pthread_try_flag... " >&6; }
18848                PTHREAD_CFLAGS="$ax_pthread_try_flag"
18849                ;;
18850
18851                pthread-config)
18852                # Extract the first word of "pthread-config", so it can be a program name with args.
18853set dummy pthread-config; ac_word=$2
18854{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18855printf %s "checking for $ac_word... " >&6; }
18856if test ${ac_cv_prog_ax_pthread_config+y}
18857then :
18858  printf %s "(cached) " >&6
18859else case e in #(
18860  e) if test -n "$ax_pthread_config"; then
18861  ac_cv_prog_ax_pthread_config="$ax_pthread_config" # Let the user override the test.
18862else
18863as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18864for as_dir in $PATH
18865do
18866  IFS=$as_save_IFS
18867  case $as_dir in #(((
18868    '') as_dir=./ ;;
18869    */) ;;
18870    *) as_dir=$as_dir/ ;;
18871  esac
18872    for ac_exec_ext in '' $ac_executable_extensions; do
18873  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
18874    ac_cv_prog_ax_pthread_config="yes"
18875    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
18876    break 2
18877  fi
18878done
18879  done
18880IFS=$as_save_IFS
18881
18882  test -z "$ac_cv_prog_ax_pthread_config" && ac_cv_prog_ax_pthread_config="no"
18883fi ;;
18884esac
18885fi
18886ax_pthread_config=$ac_cv_prog_ax_pthread_config
18887if test -n "$ax_pthread_config"; then
18888  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_config" >&5
18889printf "%s\n" "$ax_pthread_config" >&6; }
18890else
18891  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
18892printf "%s\n" "no" >&6; }
18893fi
18894
18895
18896                if test "x$ax_pthread_config" = "xno"
18897then :
18898  continue
18899fi
18900                PTHREAD_CFLAGS="`pthread-config --cflags`"
18901                PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`"
18902                ;;
18903
18904                *)
18905                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for the pthreads library -l$ax_pthread_try_flag" >&5
18906printf %s "checking for the pthreads library -l$ax_pthread_try_flag... " >&6; }
18907                PTHREAD_LIBS="-l$ax_pthread_try_flag"
18908                ;;
18909        esac
18910
18911        ax_pthread_save_CFLAGS="$CFLAGS"
18912        ax_pthread_save_LIBS="$LIBS"
18913        CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
18914        LIBS="$PTHREAD_LIBS $LIBS"
18915
18916        # Check for various functions.  We must include pthread.h,
18917        # since some functions may be macros.  (On the Sequent, we
18918        # need a special flag -Kthread to make this header compile.)
18919        # We check for pthread_join because it is in -lpthread on IRIX
18920        # while pthread_create is in libc.  We check for pthread_attr_init
18921        # due to DEC craziness with -lpthreads.  We check for
18922        # pthread_cleanup_push because it is one of the few pthread
18923        # functions on Solaris that doesn't have a non-functional libc stub.
18924        # We try pthread_create on general principles.
18925
18926        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18927/* end confdefs.h.  */
18928#include <pthread.h>
18929#                       if $ax_pthread_check_cond
18930#                        error "$ax_pthread_check_macro must be defined"
18931#                       endif
18932                        static void *some_global = NULL;
18933                        static void routine(void *a)
18934                          {
18935                             /* To avoid any unused-parameter or
18936                                unused-but-set-parameter warning.  */
18937                             some_global = a;
18938                          }
18939                        static void *start_routine(void *a) { return a; }
18940int
18941main (void)
18942{
18943pthread_t th; pthread_attr_t attr;
18944                        pthread_create(&th, 0, start_routine, 0);
18945                        pthread_join(th, 0);
18946                        pthread_attr_init(&attr);
18947                        pthread_cleanup_push(routine, 0);
18948                        pthread_cleanup_pop(0) /* ; */
18949  ;
18950  return 0;
18951}
18952_ACEOF
18953if ac_fn_c_try_link "$LINENO"
18954then :
18955  ax_pthread_ok=yes
18956fi
18957rm -f core conftest.err conftest.$ac_objext conftest.beam \
18958    conftest$ac_exeext conftest.$ac_ext
18959
18960        CFLAGS="$ax_pthread_save_CFLAGS"
18961        LIBS="$ax_pthread_save_LIBS"
18962
18963        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
18964printf "%s\n" "$ax_pthread_ok" >&6; }
18965        if test "x$ax_pthread_ok" = "xyes"
18966then :
18967  break
18968fi
18969
18970        PTHREAD_LIBS=""
18971        PTHREAD_CFLAGS=""
18972done
18973fi
18974
18975
18976# Clang needs special handling, because older versions handle the -pthread
18977# option in a rather... idiosyncratic way
18978
18979if test "x$ax_pthread_clang" = "xyes"; then
18980
18981        # Clang takes -pthread; it has never supported any other flag
18982
18983        # (Note 1: This will need to be revisited if a system that Clang
18984        # supports has POSIX threads in a separate library.  This tends not
18985        # to be the way of modern systems, but it's conceivable.)
18986
18987        # (Note 2: On some systems, notably Darwin, -pthread is not needed
18988        # to get POSIX threads support; the API is always present and
18989        # active.  We could reasonably leave PTHREAD_CFLAGS empty.  But
18990        # -pthread does define _REENTRANT, and while the Darwin headers
18991        # ignore this macro, third-party headers might not.)
18992
18993        # However, older versions of Clang make a point of warning the user
18994        # that, in an invocation where only linking and no compilation is
18995        # taking place, the -pthread option has no effect ("argument unused
18996        # during compilation").  They expect -pthread to be passed in only
18997        # when source code is being compiled.
18998        #
18999        # Problem is, this is at odds with the way Automake and most other
19000        # C build frameworks function, which is that the same flags used in
19001        # compilation (CFLAGS) are also used in linking.  Many systems
19002        # supported by AX_PTHREAD require exactly this for POSIX threads
19003        # support, and in fact it is often not straightforward to specify a
19004        # flag that is used only in the compilation phase and not in
19005        # linking.  Such a scenario is extremely rare in practice.
19006        #
19007        # Even though use of the -pthread flag in linking would only print
19008        # a warning, this can be a nuisance for well-run software projects
19009        # that build with -Werror.  So if the active version of Clang has
19010        # this misfeature, we search for an option to squash it.
19011
19012        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether Clang needs flag to prevent \"argument unused\" warning when linking with -pthread" >&5
19013printf %s "checking whether Clang needs flag to prevent \"argument unused\" warning when linking with -pthread... " >&6; }
19014if test ${ax_cv_PTHREAD_CLANG_NO_WARN_FLAG+y}
19015then :
19016  printf %s "(cached) " >&6
19017else case e in #(
19018  e) ax_cv_PTHREAD_CLANG_NO_WARN_FLAG=unknown
19019             # Create an alternate version of $ac_link that compiles and
19020             # links in two steps (.c -> .o, .o -> exe) instead of one
19021             # (.c -> exe), because the warning occurs only in the second
19022             # step
19023             ax_pthread_save_ac_link="$ac_link"
19024             ax_pthread_sed='s/conftest\.\$ac_ext/conftest.$ac_objext/g'
19025             ax_pthread_link_step=`printf "%s\n" "$ac_link" | sed "$ax_pthread_sed"`
19026             ax_pthread_2step_ac_link="($ac_compile) && (echo ==== >&5) && ($ax_pthread_link_step)"
19027             ax_pthread_save_CFLAGS="$CFLAGS"
19028             for ax_pthread_try in '' -Qunused-arguments -Wno-unused-command-line-argument unknown; do
19029                if test "x$ax_pthread_try" = "xunknown"
19030then :
19031  break
19032fi
19033                CFLAGS="-Werror -Wunknown-warning-option $ax_pthread_try -pthread $ax_pthread_save_CFLAGS"
19034                ac_link="$ax_pthread_save_ac_link"
19035                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19036/* end confdefs.h.  */
19037int main(void){return 0;}
19038_ACEOF
19039if ac_fn_c_try_link "$LINENO"
19040then :
19041  ac_link="$ax_pthread_2step_ac_link"
19042                     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19043/* end confdefs.h.  */
19044int main(void){return 0;}
19045_ACEOF
19046if ac_fn_c_try_link "$LINENO"
19047then :
19048  break
19049fi
19050rm -f core conftest.err conftest.$ac_objext conftest.beam \
19051    conftest$ac_exeext conftest.$ac_ext
19052
19053fi
19054rm -f core conftest.err conftest.$ac_objext conftest.beam \
19055    conftest$ac_exeext conftest.$ac_ext
19056             done
19057             ac_link="$ax_pthread_save_ac_link"
19058             CFLAGS="$ax_pthread_save_CFLAGS"
19059             if test "x$ax_pthread_try" = "x"
19060then :
19061  ax_pthread_try=no
19062fi
19063             ax_cv_PTHREAD_CLANG_NO_WARN_FLAG="$ax_pthread_try"
19064             ;;
19065esac
19066fi
19067{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" >&5
19068printf "%s\n" "$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" >&6; }
19069
19070        case "$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" in
19071                no | unknown) ;;
19072                *) PTHREAD_CFLAGS="$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG $PTHREAD_CFLAGS" ;;
19073        esac
19074
19075fi # $ax_pthread_clang = yes
19076
19077
19078
19079# Various other checks:
19080if test "x$ax_pthread_ok" = "xyes"; then
19081        ax_pthread_save_CFLAGS="$CFLAGS"
19082        ax_pthread_save_LIBS="$LIBS"
19083        CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
19084        LIBS="$PTHREAD_LIBS $LIBS"
19085
19086        # Detect AIX lossage: JOINABLE attribute is called UNDETACHED.
19087        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for joinable pthread attribute" >&5
19088printf %s "checking for joinable pthread attribute... " >&6; }
19089if test ${ax_cv_PTHREAD_JOINABLE_ATTR+y}
19090then :
19091  printf %s "(cached) " >&6
19092else case e in #(
19093  e) ax_cv_PTHREAD_JOINABLE_ATTR=unknown
19094             for ax_pthread_attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do
19095                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19096/* end confdefs.h.  */
19097#include <pthread.h>
19098int
19099main (void)
19100{
19101int attr = $ax_pthread_attr; return attr /* ; */
19102  ;
19103  return 0;
19104}
19105_ACEOF
19106if ac_fn_c_try_link "$LINENO"
19107then :
19108  ax_cv_PTHREAD_JOINABLE_ATTR=$ax_pthread_attr; break
19109fi
19110rm -f core conftest.err conftest.$ac_objext conftest.beam \
19111    conftest$ac_exeext conftest.$ac_ext
19112             done
19113             ;;
19114esac
19115fi
19116{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_JOINABLE_ATTR" >&5
19117printf "%s\n" "$ax_cv_PTHREAD_JOINABLE_ATTR" >&6; }
19118        if test "x$ax_cv_PTHREAD_JOINABLE_ATTR" != "xunknown" && \
19119               test "x$ax_cv_PTHREAD_JOINABLE_ATTR" != "xPTHREAD_CREATE_JOINABLE" && \
19120               test "x$ax_pthread_joinable_attr_defined" != "xyes"
19121then :
19122
19123printf "%s\n" "#define PTHREAD_CREATE_JOINABLE $ax_cv_PTHREAD_JOINABLE_ATTR" >>confdefs.h
19124
19125               ax_pthread_joinable_attr_defined=yes
19126
19127fi
19128
19129        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether more special flags are required for pthreads" >&5
19130printf %s "checking whether more special flags are required for pthreads... " >&6; }
19131if test ${ax_cv_PTHREAD_SPECIAL_FLAGS+y}
19132then :
19133  printf %s "(cached) " >&6
19134else case e in #(
19135  e) ax_cv_PTHREAD_SPECIAL_FLAGS=no
19136             case $host_os in
19137             solaris*)
19138             ax_cv_PTHREAD_SPECIAL_FLAGS="-D_POSIX_PTHREAD_SEMANTICS"
19139             ;;
19140             esac
19141             ;;
19142esac
19143fi
19144{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_SPECIAL_FLAGS" >&5
19145printf "%s\n" "$ax_cv_PTHREAD_SPECIAL_FLAGS" >&6; }
19146        if test "x$ax_cv_PTHREAD_SPECIAL_FLAGS" != "xno" && \
19147               test "x$ax_pthread_special_flags_added" != "xyes"
19148then :
19149  PTHREAD_CFLAGS="$ax_cv_PTHREAD_SPECIAL_FLAGS $PTHREAD_CFLAGS"
19150               ax_pthread_special_flags_added=yes
19151fi
19152
19153        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for PTHREAD_PRIO_INHERIT" >&5
19154printf %s "checking for PTHREAD_PRIO_INHERIT... " >&6; }
19155if test ${ax_cv_PTHREAD_PRIO_INHERIT+y}
19156then :
19157  printf %s "(cached) " >&6
19158else case e in #(
19159  e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19160/* end confdefs.h.  */
19161#include <pthread.h>
19162int
19163main (void)
19164{
19165int i = PTHREAD_PRIO_INHERIT;
19166                                               return i;
19167  ;
19168  return 0;
19169}
19170_ACEOF
19171if ac_fn_c_try_link "$LINENO"
19172then :
19173  ax_cv_PTHREAD_PRIO_INHERIT=yes
19174else case e in #(
19175  e) ax_cv_PTHREAD_PRIO_INHERIT=no ;;
19176esac
19177fi
19178rm -f core conftest.err conftest.$ac_objext conftest.beam \
19179    conftest$ac_exeext conftest.$ac_ext
19180             ;;
19181esac
19182fi
19183{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_PRIO_INHERIT" >&5
19184printf "%s\n" "$ax_cv_PTHREAD_PRIO_INHERIT" >&6; }
19185        if test "x$ax_cv_PTHREAD_PRIO_INHERIT" = "xyes" && \
19186               test "x$ax_pthread_prio_inherit_defined" != "xyes"
19187then :
19188
19189printf "%s\n" "#define HAVE_PTHREAD_PRIO_INHERIT 1" >>confdefs.h
19190
19191               ax_pthread_prio_inherit_defined=yes
19192
19193fi
19194
19195        CFLAGS="$ax_pthread_save_CFLAGS"
19196        LIBS="$ax_pthread_save_LIBS"
19197
19198        # More AIX lossage: compile with *_r variant
19199        if test "x$GCC" != "xyes"; then
19200            case $host_os in
19201                aix*)
19202                case "x/$CC" in #(
19203  x*/c89|x*/c89_128|x*/c99|x*/c99_128|x*/cc|x*/cc128|x*/xlc|x*/xlc_v6|x*/xlc128|x*/xlc128_v6) :
19204    #handle absolute path differently from PATH based program lookup
19205                     case "x$CC" in #(
19206  x/*) :
19207
19208			   if as_fn_executable_p ${CC}_r
19209then :
19210  PTHREAD_CC="${CC}_r"
19211fi
19212			   if test "x${CXX}" != "x"
19213then :
19214  if as_fn_executable_p ${CXX}_r
19215then :
19216  PTHREAD_CXX="${CXX}_r"
19217fi
19218fi
19219			  ;; #(
19220  *) :
19221
19222			   for ac_prog in ${CC}_r
19223do
19224  # Extract the first word of "$ac_prog", so it can be a program name with args.
19225set dummy $ac_prog; ac_word=$2
19226{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19227printf %s "checking for $ac_word... " >&6; }
19228if test ${ac_cv_prog_PTHREAD_CC+y}
19229then :
19230  printf %s "(cached) " >&6
19231else case e in #(
19232  e) if test -n "$PTHREAD_CC"; then
19233  ac_cv_prog_PTHREAD_CC="$PTHREAD_CC" # Let the user override the test.
19234else
19235as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19236for as_dir in $PATH
19237do
19238  IFS=$as_save_IFS
19239  case $as_dir in #(((
19240    '') as_dir=./ ;;
19241    */) ;;
19242    *) as_dir=$as_dir/ ;;
19243  esac
19244    for ac_exec_ext in '' $ac_executable_extensions; do
19245  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
19246    ac_cv_prog_PTHREAD_CC="$ac_prog"
19247    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
19248    break 2
19249  fi
19250done
19251  done
19252IFS=$as_save_IFS
19253
19254fi ;;
19255esac
19256fi
19257PTHREAD_CC=$ac_cv_prog_PTHREAD_CC
19258if test -n "$PTHREAD_CC"; then
19259  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PTHREAD_CC" >&5
19260printf "%s\n" "$PTHREAD_CC" >&6; }
19261else
19262  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
19263printf "%s\n" "no" >&6; }
19264fi
19265
19266
19267  test -n "$PTHREAD_CC" && break
19268done
19269test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
19270
19271			   if test "x${CXX}" != "x"
19272then :
19273  for ac_prog in ${CXX}_r
19274do
19275  # Extract the first word of "$ac_prog", so it can be a program name with args.
19276set dummy $ac_prog; ac_word=$2
19277{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19278printf %s "checking for $ac_word... " >&6; }
19279if test ${ac_cv_prog_PTHREAD_CXX+y}
19280then :
19281  printf %s "(cached) " >&6
19282else case e in #(
19283  e) if test -n "$PTHREAD_CXX"; then
19284  ac_cv_prog_PTHREAD_CXX="$PTHREAD_CXX" # Let the user override the test.
19285else
19286as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19287for as_dir in $PATH
19288do
19289  IFS=$as_save_IFS
19290  case $as_dir in #(((
19291    '') as_dir=./ ;;
19292    */) ;;
19293    *) as_dir=$as_dir/ ;;
19294  esac
19295    for ac_exec_ext in '' $ac_executable_extensions; do
19296  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
19297    ac_cv_prog_PTHREAD_CXX="$ac_prog"
19298    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
19299    break 2
19300  fi
19301done
19302  done
19303IFS=$as_save_IFS
19304
19305fi ;;
19306esac
19307fi
19308PTHREAD_CXX=$ac_cv_prog_PTHREAD_CXX
19309if test -n "$PTHREAD_CXX"; then
19310  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PTHREAD_CXX" >&5
19311printf "%s\n" "$PTHREAD_CXX" >&6; }
19312else
19313  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
19314printf "%s\n" "no" >&6; }
19315fi
19316
19317
19318  test -n "$PTHREAD_CXX" && break
19319done
19320test -n "$PTHREAD_CXX" || PTHREAD_CXX="$CXX"
19321
19322fi
19323
19324                      ;;
19325esac
19326                     ;; #(
19327  *) :
19328     ;;
19329esac
19330                ;;
19331            esac
19332        fi
19333fi
19334
19335test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
19336test -n "$PTHREAD_CXX" || PTHREAD_CXX="$CXX"
19337
19338
19339
19340
19341
19342
19343# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
19344if test "x$ax_pthread_ok" = "xyes"; then
19345
19346
19347printf "%s\n" "#define HAVE_PTHREAD 1" >>confdefs.h
19348
19349		if test -n "$PTHREAD_LIBS"; then
19350		  LIBS="$PTHREAD_LIBS $LIBS"
19351		fi
19352		CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
19353		CC="$PTHREAD_CC"
19354		ub_have_pthreads=yes
19355		ac_fn_c_check_type "$LINENO" "pthread_spinlock_t" "ac_cv_type_pthread_spinlock_t" "#include <pthread.h>
19356"
19357if test "x$ac_cv_type_pthread_spinlock_t" = xyes
19358then :
19359
19360printf "%s\n" "#define HAVE_PTHREAD_SPINLOCK_T 1" >>confdefs.h
19361
19362
19363fi
19364ac_fn_c_check_type "$LINENO" "pthread_rwlock_t" "ac_cv_type_pthread_rwlock_t" "#include <pthread.h>
19365"
19366if test "x$ac_cv_type_pthread_rwlock_t" = xyes
19367then :
19368
19369printf "%s\n" "#define HAVE_PTHREAD_RWLOCK_T 1" >>confdefs.h
19370
19371
19372fi
19373
19374		# The cast to long int works around a bug in the HP C Compiler
19375# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
19376# declarations like 'int a3[[(sizeof (unsigned char)) >= 0]];'.
19377# This bug is HP SR number 8606223364.
19378{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of unsigned long" >&5
19379printf %s "checking size of unsigned long... " >&6; }
19380if test ${ac_cv_sizeof_unsigned_long+y}
19381then :
19382  printf %s "(cached) " >&6
19383else case e in #(
19384  e) if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned long))" "ac_cv_sizeof_unsigned_long"        "$ac_includes_default"
19385then :
19386
19387else case e in #(
19388  e) if test "$ac_cv_type_unsigned_long" = yes; then
19389     { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
19390printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
19391as_fn_error 77 "cannot compute sizeof (unsigned long)
19392See 'config.log' for more details" "$LINENO" 5; }
19393   else
19394     ac_cv_sizeof_unsigned_long=0
19395   fi ;;
19396esac
19397fi
19398 ;;
19399esac
19400fi
19401{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned_long" >&5
19402printf "%s\n" "$ac_cv_sizeof_unsigned_long" >&6; }
19403
19404
19405
19406printf "%s\n" "#define SIZEOF_UNSIGNED_LONG $ac_cv_sizeof_unsigned_long" >>confdefs.h
19407
19408
19409		# The cast to long int works around a bug in the HP C Compiler
19410# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
19411# declarations like 'int a3[[(sizeof (unsigned char)) >= 0]];'.
19412# This bug is HP SR number 8606223364.
19413{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
19414printf %s "checking size of pthread_t... " >&6; }
19415if test ${ac_cv_sizeof_pthread_t+y}
19416then :
19417  printf %s "(cached) " >&6
19418else case e in #(
19419  e) if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t"        "$ac_includes_default"
19420then :
19421
19422else case e in #(
19423  e) if test "$ac_cv_type_pthread_t" = yes; then
19424     { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
19425printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
19426as_fn_error 77 "cannot compute sizeof (pthread_t)
19427See 'config.log' for more details" "$LINENO" 5; }
19428   else
19429     ac_cv_sizeof_pthread_t=0
19430   fi ;;
19431esac
19432fi
19433 ;;
19434esac
19435fi
19436{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
19437printf "%s\n" "$ac_cv_sizeof_pthread_t" >&6; }
19438
19439
19440
19441printf "%s\n" "#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t" >>confdefs.h
19442
19443
19444
19445		if echo "$CFLAGS" | $GREP -e "-pthread" >/dev/null; then
19446		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if -pthread unused during linking" >&5
19447printf %s "checking if -pthread unused during linking... " >&6; }
19448		# catch clang warning 'argument unused during compilation'
19449		cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19450/* end confdefs.h.  */
19451$ac_includes_default
19452
19453int main(void) {return 0;}
19454
19455_ACEOF
19456		pthread_unused="yes"
19457		# first compile
19458		echo "$CC $CFLAGS -c conftest.c -o conftest.o" >&5
19459		$CC $CFLAGS -c conftest.c -o conftest.o 2>&5 >&5
19460		if test $? = 0; then
19461			# then link
19462			echo "$CC $CFLAGS -Werror $LDFLAGS $LIBS -o conftest contest.o" >&5
19463			$CC $CFLAGS -Werror $LDFLAGS $LIBS -o conftest conftest.o 2>&5 >&5
19464			if test $? -ne 0; then
19465				{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19466printf "%s\n" "yes" >&6; }
19467				CFLAGS=`echo "$CFLAGS" | sed -e 's/-pthread//'`
19468				PTHREAD_CFLAGS_ONLY="-pthread"
19469
19470			else
19471				{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
19472printf "%s\n" "no" >&6; }
19473			fi
19474		else
19475			{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
19476printf "%s\n" "no" >&6; }
19477		fi # endif cc successful
19478		rm -f conftest conftest.c conftest.o
19479		fi # endif -pthread in CFLAGS
19480
19481
19482        :
19483else
19484        ax_pthread_ok=no
19485
19486fi
19487ac_ext=c
19488ac_cpp='$CPP $CPPFLAGS'
19489ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
19490ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
19491ac_compiler_gnu=$ac_cv_c_compiler_gnu
19492
19493
19494fi
19495
19496# check solaris thread library
19497
19498# Check whether --with-solaris-threads was given.
19499if test ${with_solaris_threads+y}
19500then :
19501  withval=$with_solaris_threads;
19502else case e in #(
19503  e)  withval="no"  ;;
19504esac
19505fi
19506
19507ub_have_sol_threads=no
19508if test x_$withval != x_no; then
19509	if test x_$ub_have_pthreads != x_no; then
19510	    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Have pthreads already, ignoring --with-solaris-threads" >&5
19511printf "%s\n" "$as_me: WARNING: Have pthreads already, ignoring --with-solaris-threads" >&2;}
19512	else
19513	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing thr_create" >&5
19514printf %s "checking for library containing thr_create... " >&6; }
19515if test ${ac_cv_search_thr_create+y}
19516then :
19517  printf %s "(cached) " >&6
19518else case e in #(
19519  e) ac_func_search_save_LIBS=$LIBS
19520cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19521/* end confdefs.h.  */
19522
19523/* Override any GCC internal prototype to avoid an error.
19524   Use char because int might match the return type of a GCC
19525   builtin and then its argument prototype would still apply.
19526   The 'extern "C"' is for builds by C++ compilers;
19527   although this is not generally supported in C code supporting it here
19528   has little cost and some practical benefit (sr 110532).  */
19529#ifdef __cplusplus
19530extern "C"
19531#endif
19532char thr_create (void);
19533int
19534main (void)
19535{
19536return thr_create ();
19537  ;
19538  return 0;
19539}
19540_ACEOF
19541for ac_lib in '' thread
19542do
19543  if test -z "$ac_lib"; then
19544    ac_res="none required"
19545  else
19546    ac_res=-l$ac_lib
19547    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
19548  fi
19549  if ac_fn_c_try_link "$LINENO"
19550then :
19551  ac_cv_search_thr_create=$ac_res
19552fi
19553rm -f core conftest.err conftest.$ac_objext conftest.beam \
19554    conftest$ac_exeext
19555  if test ${ac_cv_search_thr_create+y}
19556then :
19557  break
19558fi
19559done
19560if test ${ac_cv_search_thr_create+y}
19561then :
19562
19563else case e in #(
19564  e) ac_cv_search_thr_create=no ;;
19565esac
19566fi
19567rm conftest.$ac_ext
19568LIBS=$ac_func_search_save_LIBS ;;
19569esac
19570fi
19571{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_thr_create" >&5
19572printf "%s\n" "$ac_cv_search_thr_create" >&6; }
19573ac_res=$ac_cv_search_thr_create
19574if test "$ac_res" != no
19575then :
19576  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
19577
19578
19579printf "%s\n" "#define HAVE_SOLARIS_THREADS 1" >>confdefs.h
19580
19581
19582
19583
19584{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -mt" >&5
19585printf %s "checking whether $CC supports -mt... " >&6; }
19586cache=`echo mt | sed 'y%.=/+-%___p_%'`
19587if eval test \${cv_prog_cc_flag_$cache+y}
19588then :
19589  printf %s "(cached) " >&6
19590else case e in #(
19591  e)
19592echo 'void f(void){}' >conftest.c
19593if test -z "`$CC $CPPFLAGS $CFLAGS -mt -c conftest.c 2>&1`"; then
19594eval "cv_prog_cc_flag_$cache=yes"
19595else
19596eval "cv_prog_cc_flag_$cache=no"
19597fi
19598rm -f conftest conftest.o conftest.c
19599 ;;
19600esac
19601fi
19602
19603if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
19604{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19605printf "%s\n" "yes" >&6; }
19606:
19607CFLAGS="$CFLAGS -mt"
19608else
19609{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
19610printf "%s\n" "no" >&6; }
19611:
19612CFLAGS="$CFLAGS -D_REENTRANT"
19613fi
19614
19615		ub_have_sol_threads=yes
19616
19617else case e in #(
19618  e)
19619		as_fn_error $? "no solaris threads found." "$LINENO" 5
19620	 ;;
19621esac
19622fi
19623
19624	fi
19625fi
19626
19627fi # end of non-mingw check of thread libraries
19628
19629# Check for SYSLOG_FACILITY
19630
19631# Check whether --with-syslog-facility was given.
19632if test ${with_syslog_facility+y}
19633then :
19634  withval=$with_syslog_facility;  UNBOUND_SYSLOG_FACILITY="$withval"
19635fi
19636
19637case "${UNBOUND_SYSLOG_FACILITY}" in
19638
19639  LOCAL[0-7]) UNBOUND_SYSLOG_FACILITY="LOG_${UNBOUND_SYSLOG_FACILITY}" ;;
19640
19641           *) UNBOUND_SYSLOG_FACILITY="LOG_DAEMON" ;;
19642
19643esac
19644
19645printf "%s\n" "#define UB_SYSLOG_FACILITY ${UNBOUND_SYSLOG_FACILITY}" >>confdefs.h
19646
19647
19648# Check for dynamic library module
19649
19650# Check whether --with-dynlibmodule was given.
19651if test ${with_dynlibmodule+y}
19652then :
19653  withval=$with_dynlibmodule;
19654else case e in #(
19655  e)  withval="no"  ;;
19656esac
19657fi
19658
19659
19660if test x_$withval != x_no; then
19661
19662printf "%s\n" "#define WITH_DYNLIBMODULE 1" >>confdefs.h
19663
19664  WITH_DYNLIBMODULE=yes
19665
19666  DYNLIBMOD_OBJ="dynlibmod.lo"
19667
19668  DYNLIBMOD_HEADER='$(srcdir)/dynlibmod/dynlibmod.h'
19669
19670  if test $on_mingw = "no"; then
19671    # link with -ldl if not already there, for all executables because
19672    # dlopen call is in the dynlib module.  For unbound executable, also
19673    # export symbols.
19674    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
19675printf %s "checking for library containing dlopen... " >&6; }
19676if test ${ac_cv_search_dlopen+y}
19677then :
19678  printf %s "(cached) " >&6
19679else case e in #(
19680  e) ac_func_search_save_LIBS=$LIBS
19681cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19682/* end confdefs.h.  */
19683
19684/* Override any GCC internal prototype to avoid an error.
19685   Use char because int might match the return type of a GCC
19686   builtin and then its argument prototype would still apply.
19687   The 'extern "C"' is for builds by C++ compilers;
19688   although this is not generally supported in C code supporting it here
19689   has little cost and some practical benefit (sr 110532).  */
19690#ifdef __cplusplus
19691extern "C"
19692#endif
19693char dlopen (void);
19694int
19695main (void)
19696{
19697return dlopen ();
19698  ;
19699  return 0;
19700}
19701_ACEOF
19702for ac_lib in '' dl
19703do
19704  if test -z "$ac_lib"; then
19705    ac_res="none required"
19706  else
19707    ac_res=-l$ac_lib
19708    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
19709  fi
19710  if ac_fn_c_try_link "$LINENO"
19711then :
19712  ac_cv_search_dlopen=$ac_res
19713fi
19714rm -f core conftest.err conftest.$ac_objext conftest.beam \
19715    conftest$ac_exeext
19716  if test ${ac_cv_search_dlopen+y}
19717then :
19718  break
19719fi
19720done
19721if test ${ac_cv_search_dlopen+y}
19722then :
19723
19724else case e in #(
19725  e) ac_cv_search_dlopen=no ;;
19726esac
19727fi
19728rm conftest.$ac_ext
19729LIBS=$ac_func_search_save_LIBS ;;
19730esac
19731fi
19732{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
19733printf "%s\n" "$ac_cv_search_dlopen" >&6; }
19734ac_res=$ac_cv_search_dlopen
19735if test "$ac_res" != no
19736then :
19737  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
19738
19739fi
19740
19741    DYNLIBMOD_EXTRALIBS="-export-dynamic"
19742  else
19743    DYNLIBMOD_EXTRALIBS="-Wl,--export-all-symbols,--out-implib,libunbound.dll.a"
19744  fi
19745
19746fi
19747
19748# Check for PyUnbound
19749
19750# Check whether --with-pyunbound was given.
19751if test ${with_pyunbound+y}
19752then :
19753  withval=$with_pyunbound;
19754else case e in #(
19755  e)  withval="no"  ;;
19756esac
19757fi
19758
19759
19760ub_test_python=no
19761ub_with_pyunbound=no
19762if test x_$withval != x_no; then
19763   ub_with_pyunbound=yes
19764   ub_test_python=yes
19765fi
19766
19767# Check for Python module
19768
19769# Check whether --with-pythonmodule was given.
19770if test ${with_pythonmodule+y}
19771then :
19772  withval=$with_pythonmodule;
19773else case e in #(
19774  e)  withval="no"  ;;
19775esac
19776fi
19777
19778
19779ub_with_pythonmod=no
19780if test x_$withval != x_no; then
19781   ub_with_pythonmod=yes
19782   ub_test_python=yes
19783fi
19784
19785# Check for Python & SWIG only on PyUnbound or PyModule
19786if test x_$ub_test_python != x_no; then
19787
19788   # Check for Python
19789   ub_have_python=no
19790   ac_save_LIBS="$LIBS"
19791        #
19792        # Allow the use of a (user set) custom python version
19793        #
19794
19795
19796        # Extract the first word of "python[$PYTHON_VERSION]", so it can be a program name with args.
19797set dummy python$PYTHON_VERSION; ac_word=$2
19798{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19799printf %s "checking for $ac_word... " >&6; }
19800if test ${ac_cv_path_PYTHON+y}
19801then :
19802  printf %s "(cached) " >&6
19803else case e in #(
19804  e) case $PYTHON in
19805  [\\/]* | ?:[\\/]*)
19806  ac_cv_path_PYTHON="$PYTHON" # Let the user override the test with a path.
19807  ;;
19808  *)
19809  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19810for as_dir in $PATH
19811do
19812  IFS=$as_save_IFS
19813  case $as_dir in #(((
19814    '') as_dir=./ ;;
19815    */) ;;
19816    *) as_dir=$as_dir/ ;;
19817  esac
19818    for ac_exec_ext in '' $ac_executable_extensions; do
19819  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
19820    ac_cv_path_PYTHON="$as_dir$ac_word$ac_exec_ext"
19821    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
19822    break 2
19823  fi
19824done
19825  done
19826IFS=$as_save_IFS
19827
19828  ;;
19829esac ;;
19830esac
19831fi
19832PYTHON=$ac_cv_path_PYTHON
19833if test -n "$PYTHON"; then
19834  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5
19835printf "%s\n" "$PYTHON" >&6; }
19836else
19837  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
19838printf "%s\n" "no" >&6; }
19839fi
19840
19841
19842        if test -z "$PYTHON"; then
19843           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
19844           PYTHON_VERSION=""
19845        fi
19846
19847        if test -z "$PYTHON_VERSION"; then
19848		PYTHON_VERSION=`$PYTHON -c "import sys; \
19849			print(sys.version.split()[0])"`
19850	fi
19851	# calculate the version number components.
19852
19853	v="$PYTHON_VERSION"
19854	PYTHON_VERSION_MAJOR=`echo $v | sed 's/[^0-9].*//'`
19855	if test -z "$PYTHON_VERSION_MAJOR"; then PYTHON_VERSION_MAJOR="0"; fi
19856	v=`echo $v | sed -e 's/^[0-9]*$//' -e 's/[0-9]*[^0-9]//'`
19857	PYTHON_VERSION_MINOR=`echo $v | sed 's/[^0-9].*//'`
19858	if test -z "$PYTHON_VERSION_MINOR"; then PYTHON_VERSION_MINOR="0"; fi
19859	v=`echo $v | sed -e 's/^[0-9]*$//' -e 's/[0-9]*[^0-9]//'`
19860	PYTHON_VERSION_PATCH=`echo $v | sed 's/[^0-9].*//'`
19861	if test -z "$PYTHON_VERSION_PATCH"; then PYTHON_VERSION_PATCH="0"; fi
19862
19863
19864	# For some systems, sysconfig exists, but has the wrong paths,
19865	# on Debian 10, for python 2.7 and 3.7. So, we check the version,
19866	# and for older versions try distutils.sysconfig first. For newer
19867	# versions>=3.10, where distutils.sysconfig is deprecated, use
19868	# sysconfig first and then attempt the other one.
19869	py_distutils_first="no"
19870	if test $PYTHON_VERSION_MAJOR -lt 3; then
19871		py_distutils_first="yes"
19872	fi
19873	if test $PYTHON_VERSION_MAJOR -eq 3 -a $PYTHON_VERSION_MINOR -lt 10; then
19874		py_distutils_first="yes"
19875	fi
19876
19877	# Check if you have the first module
19878	if test "$py_distutils_first" = "yes"; then m="distutils"; else m="sysconfig"; fi
19879	sysconfig_module=""
19880	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for the $m Python module" >&5
19881printf %s "checking for the $m Python module... " >&6; }
19882        if ac_modulecheck_result1=`$PYTHON -c "import $m" 2>&1`; then
19883                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19884printf "%s\n" "yes" >&6; }
19885		sysconfig_module="$m"
19886	else
19887                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
19888printf "%s\n" "no" >&6; }
19889	fi
19890
19891	# if not found, try the other one.
19892	if test -z "$sysconfig_module"; then
19893		if test "$py_distutils_first" = "yes"; then m2="sysconfig"; else m2="distutils"; fi
19894		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for the $m2 Python module" >&5
19895printf %s "checking for the $m2 Python module... " >&6; }
19896		if ac_modulecheck_result2=`$PYTHON -c "import $m2" 2>&1`; then
19897			{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19898printf "%s\n" "yes" >&6; }
19899			sysconfig_module="$m2"
19900		else
19901			{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
19902printf "%s\n" "no" >&6; }
19903			as_fn_error $? "cannot import Python module \"$m\", or \"$m2\".
19904	Please check your Python installation. The errors are:
19905	$m
19906	$ac_modulecheck_result1
19907	$m2
19908	$ac_modulecheck_result2" "$LINENO" 5
19909			PYTHON_VERSION=""
19910		fi
19911	fi
19912	if test "$sysconfig_module" = "distutils"; then sysconfig_module="distutils.sysconfig"; fi
19913
19914        #
19915        # Check for Python include path
19916        #
19917        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Python include path" >&5
19918printf %s "checking for Python include path... " >&6; }
19919        if test -z "$PYTHON_CPPFLAGS"; then
19920		if test "$sysconfig_module" = "sysconfig"; then
19921			python_path=`$PYTHON -c 'import sysconfig; \
19922				print(sysconfig.get_path("include"));'`
19923		else
19924			python_path=`$PYTHON -c "import distutils.sysconfig; \
19925				print(distutils.sysconfig.get_python_inc());"`
19926		fi
19927                if test -n "${python_path}"; then
19928                        python_path="-I$python_path"
19929                fi
19930                PYTHON_CPPFLAGS=$python_path
19931        fi
19932        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PYTHON_CPPFLAGS" >&5
19933printf "%s\n" "$PYTHON_CPPFLAGS" >&6; }
19934
19935
19936        #
19937        # Check for Python library path
19938        #
19939        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Python library path" >&5
19940printf %s "checking for Python library path... " >&6; }
19941        if test -z "$PYTHON_LDFLAGS"; then
19942                PYTHON_LDFLAGS=`$PYTHON -c "from $sysconfig_module import *; \
19943                        print('-L'+get_config_var('LIBDIR')+' -L'+get_config_var('LIBDEST')+' '+get_config_var('BLDLIBRARY'));"`
19944        fi
19945        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PYTHON_LDFLAGS" >&5
19946printf "%s\n" "$PYTHON_LDFLAGS" >&6; }
19947
19948
19949        if test -z "$PYTHON_LIBDIR"; then
19950                PYTHON_LIBDIR=`$PYTHON -c "from $sysconfig_module import *; \
19951                        print(get_config_var('LIBDIR'));"`
19952        fi
19953
19954        #
19955        # Check for site packages
19956        #
19957        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Python site-packages path" >&5
19958printf %s "checking for Python site-packages path... " >&6; }
19959        if test -z "$PYTHON_SITE_PKG"; then
19960		if test "$sysconfig_module" = "sysconfig"; then
19961			PYTHON_SITE_PKG=`$PYTHON -c 'import sysconfig; \
19962				print(sysconfig.get_path("platlib"));'`
19963		else
19964			PYTHON_SITE_PKG=`$PYTHON -c "import distutils.sysconfig; \
19965				print(distutils.sysconfig.get_python_lib(1,0));"`
19966		fi
19967        fi
19968        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PYTHON_SITE_PKG" >&5
19969printf "%s\n" "$PYTHON_SITE_PKG" >&6; }
19970
19971
19972        #
19973        # final check to see if everything compiles alright
19974        #
19975        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking consistency of all components of python development environment" >&5
19976printf %s "checking consistency of all components of python development environment... " >&6; }
19977        ac_ext=c
19978ac_cpp='$CPP $CPPFLAGS'
19979ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
19980ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
19981ac_compiler_gnu=$ac_cv_c_compiler_gnu
19982
19983        # save current global flags
19984        ac_save_LIBS="$LIBS"
19985        ac_save_CPPFLAGS="$CPPFLAGS"
19986
19987        LIBS="$LIBS $PYTHON_LDFLAGS"
19988        CPPFLAGS="$CPPFLAGS $PYTHON_CPPFLAGS"
19989        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19990/* end confdefs.h.  */
19991
19992                #include <Python.h>
19993
19994int
19995main (void)
19996{
19997
19998                Py_Initialize();
19999
20000  ;
20001  return 0;
20002}
20003_ACEOF
20004if ac_fn_c_try_link "$LINENO"
20005then :
20006  pythonexists=yes
20007else case e in #(
20008  e) pythonexists=no ;;
20009esac
20010fi
20011rm -f core conftest.err conftest.$ac_objext conftest.beam \
20012    conftest$ac_exeext conftest.$ac_ext
20013
20014        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $pythonexists" >&5
20015printf "%s\n" "$pythonexists" >&6; }
20016
20017        if test ! "$pythonexists" = "yes"; then
20018           as_fn_error $? "
20019  Could not link test program to Python. Maybe the main Python library has been
20020  installed in some non-standard library path. If so, pass it to configure,
20021  via the LDFLAGS environment variable.
20022  Example: ./configure LDFLAGS=\"-L/usr/non-standard-path/python/lib\"
20023  ============================================================================
20024   ERROR!
20025   You probably have to install the development version of the Python package
20026   for your distribution.  The exact name of this package varies among them.
20027  ============================================================================
20028           " "$LINENO" 5
20029          PYTHON_VERSION=""
20030        fi
20031        ac_ext=c
20032ac_cpp='$CPP $CPPFLAGS'
20033ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20034ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20035ac_compiler_gnu=$ac_cv_c_compiler_gnu
20036
20037        # turn back to default flags
20038        CPPFLAGS="$ac_save_CPPFLAGS"
20039        LIBS="$ac_save_LIBS"
20040
20041        #
20042        # all done!
20043        #
20044
20045   if test ! -z "$PYTHON_VERSION"; then
20046	badversion="no"
20047	if test "$PYTHON_VERSION_MAJOR" -lt 2; then
20048		badversion="yes"
20049	fi
20050	if test "$PYTHON_VERSION_MAJOR" -eq 2 -a "$PYTHON_VERSION_MINOR" -lt 4; then
20051		badversion="yes"
20052	fi
20053	if test "$badversion" = "yes"; then
20054		as_fn_error $? "Python version >= 2.4.0 is required" "$LINENO" 5
20055	fi
20056
20057      PY_MAJOR_VERSION="`$PYTHON -c \"import sys; print(sys.version_info[0])\"`"
20058
20059      # Have Python
20060
20061printf "%s\n" "#define HAVE_PYTHON 1" >>confdefs.h
20062
20063      if test x_$ub_with_pythonmod != x_no; then
20064        if test -n "$LIBS"; then
20065          LIBS="$PYTHON_LDFLAGS $LIBS"
20066        else
20067          LIBS="$PYTHON_LDFLAGS"
20068        fi
20069      fi
20070      PYTHON_LIBS="$PYTHON_LDFLAGS"
20071
20072      if test -n "$CPPFLAGS"; then
20073        CPPFLAGS="$CPPFLAGS $PYTHON_CPPFLAGS"
20074      else
20075        CPPFLAGS="$PYTHON_CPPFLAGS"
20076      fi
20077      if test "$PYTHON_LIBDIR" != "/usr/lib" -a "$PYTHON_LIBDIR" != "" -a "$PYTHON_LIBDIR" != "/usr/lib64"; then
20078
20079	if test "x$enable_rpath" = xyes; then
20080		if echo "$PYTHON_LIBDIR" | grep "^/" >/dev/null; then
20081			RUNTIME_PATH="$RUNTIME_PATH -R$PYTHON_LIBDIR"
20082		fi
20083	fi
20084
20085      fi
20086      ub_have_python=yes
20087      if test -n "$PKG_CONFIG" && \
20088    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\"python\${PY_MAJOR_VERSION}\"\""; } >&5
20089  ($PKG_CONFIG --exists --print-errors ""python${PY_MAJOR_VERSION}"") 2>&5
20090  ac_status=$?
20091  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20092  test $ac_status = 0; }; then
20093  PC_PY_DEPENDENCY="python${PY_MAJOR_VERSION}"
20094else
20095  PC_PY_DEPENDENCY="python"
20096fi
20097
20098
20099      # Check for SWIG
20100      ub_have_swig=no
20101      # Check whether --enable-swig-version-check was given.
20102if test ${enable_swig_version_check+y}
20103then :
20104  enableval=$enable_swig_version_check;
20105fi
20106
20107      if test "$enable_swig_version_check" = "yes"; then
20108
20109        # Find path to the "swig" executable.
20110        for ac_prog in swig swig3.0 swig2.0
20111do
20112  # Extract the first word of "$ac_prog", so it can be a program name with args.
20113set dummy $ac_prog; ac_word=$2
20114{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20115printf %s "checking for $ac_word... " >&6; }
20116if test ${ac_cv_path_SWIG+y}
20117then :
20118  printf %s "(cached) " >&6
20119else case e in #(
20120  e) case $SWIG in
20121  [\\/]* | ?:[\\/]*)
20122  ac_cv_path_SWIG="$SWIG" # Let the user override the test with a path.
20123  ;;
20124  *)
20125  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20126for as_dir in $PATH
20127do
20128  IFS=$as_save_IFS
20129  case $as_dir in #(((
20130    '') as_dir=./ ;;
20131    */) ;;
20132    *) as_dir=$as_dir/ ;;
20133  esac
20134    for ac_exec_ext in '' $ac_executable_extensions; do
20135  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
20136    ac_cv_path_SWIG="$as_dir$ac_word$ac_exec_ext"
20137    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
20138    break 2
20139  fi
20140done
20141  done
20142IFS=$as_save_IFS
20143
20144  ;;
20145esac ;;
20146esac
20147fi
20148SWIG=$ac_cv_path_SWIG
20149if test -n "$SWIG"; then
20150  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $SWIG" >&5
20151printf "%s\n" "$SWIG" >&6; }
20152else
20153  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
20154printf "%s\n" "no" >&6; }
20155fi
20156
20157
20158  test -n "$SWIG" && break
20159done
20160
20161        if test -z "$SWIG" ; then
20162                :
20163        elif test -z "2.0.1" ; then
20164                :
20165	else
20166                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking SWIG version" >&5
20167printf %s "checking SWIG version... " >&6; }
20168                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'`
20169                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $swig_version" >&5
20170printf "%s\n" "$swig_version" >&6; }
20171                if test -n "$swig_version" ; then
20172                        # Calculate the required version number components
20173                        required=2.0.1
20174                        required_major=`echo $required | sed 's/[^0-9].*//'`
20175                        if test -z "$required_major" ; then
20176                                required_major=0
20177                        fi
20178                        required=`echo $required. | sed 's/[0-9]*[^0-9]//'`
20179                        required_minor=`echo $required | sed 's/[^0-9].*//'`
20180                        if test -z "$required_minor" ; then
20181                                required_minor=0
20182                        fi
20183                        required=`echo $required. | sed 's/[0-9]*[^0-9]//'`
20184                        required_patch=`echo $required | sed 's/[^0-9].*//'`
20185                        if test -z "$required_patch" ; then
20186                                required_patch=0
20187                        fi
20188                        # Calculate the available version number components
20189                        available=$swig_version
20190                        available_major=`echo $available | sed 's/[^0-9].*//'`
20191                        if test -z "$available_major" ; then
20192                                available_major=0
20193                        fi
20194                        available=`echo $available | sed 's/[0-9]*[^0-9]//'`
20195                        available_minor=`echo $available | sed 's/[^0-9].*//'`
20196                        if test -z "$available_minor" ; then
20197                                available_minor=0
20198                        fi
20199                        available=`echo $available | sed 's/[0-9]*[^0-9]//'`
20200                        available_patch=`echo $available | sed 's/[^0-9].*//'`
20201                        if test -z "$available_patch" ; then
20202                                available_patch=0
20203                        fi
20204                        # Convert the version tuple into a single number for easier comparison.
20205                        # Using base 100 should be safe since SWIG internally uses BCD values
20206                        # to encode its version number.
20207                        required_swig_vernum=`expr $required_major \* 10000 \
20208                            \+ $required_minor \* 100 \+ $required_patch`
20209                        available_swig_vernum=`expr $available_major \* 10000 \
20210                            \+ $available_minor \* 100 \+ $available_patch`
20211
20212                        if test $available_swig_vernum -lt $required_swig_vernum; then
20213                                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: SWIG version >= 2.0.1 is required.  You have $swig_version." >&5
20214printf "%s\n" "$as_me: WARNING: SWIG version >= 2.0.1 is required.  You have $swig_version." >&2;}
20215                                SWIG=''
20216
20217                        else
20218                                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for SWIG library" >&5
20219printf %s "checking for SWIG library... " >&6; }
20220                                SWIG_LIB=`$SWIG -swiglib | tr '\r\n' '  '`
20221                                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $SWIG_LIB" >&5
20222printf "%s\n" "$SWIG_LIB" >&6; }
20223
20224                        fi
20225                else
20226                        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cannot determine SWIG version" >&5
20227printf "%s\n" "$as_me: WARNING: cannot determine SWIG version" >&2;}
20228                        SWIG=''
20229
20230                fi
20231        fi
20232
20233
20234      else
20235
20236        # Find path to the "swig" executable.
20237        for ac_prog in swig swig3.0 swig2.0
20238do
20239  # Extract the first word of "$ac_prog", so it can be a program name with args.
20240set dummy $ac_prog; ac_word=$2
20241{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20242printf %s "checking for $ac_word... " >&6; }
20243if test ${ac_cv_path_SWIG+y}
20244then :
20245  printf %s "(cached) " >&6
20246else case e in #(
20247  e) case $SWIG in
20248  [\\/]* | ?:[\\/]*)
20249  ac_cv_path_SWIG="$SWIG" # Let the user override the test with a path.
20250  ;;
20251  *)
20252  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20253for as_dir in $PATH
20254do
20255  IFS=$as_save_IFS
20256  case $as_dir in #(((
20257    '') as_dir=./ ;;
20258    */) ;;
20259    *) as_dir=$as_dir/ ;;
20260  esac
20261    for ac_exec_ext in '' $ac_executable_extensions; do
20262  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
20263    ac_cv_path_SWIG="$as_dir$ac_word$ac_exec_ext"
20264    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
20265    break 2
20266  fi
20267done
20268  done
20269IFS=$as_save_IFS
20270
20271  ;;
20272esac ;;
20273esac
20274fi
20275SWIG=$ac_cv_path_SWIG
20276if test -n "$SWIG"; then
20277  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $SWIG" >&5
20278printf "%s\n" "$SWIG" >&6; }
20279else
20280  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
20281printf "%s\n" "no" >&6; }
20282fi
20283
20284
20285  test -n "$SWIG" && break
20286done
20287
20288        if test -z "$SWIG" ; then
20289                :
20290        elif test -z "" ; then
20291                :
20292	else
20293                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking SWIG version" >&5
20294printf %s "checking SWIG version... " >&6; }
20295                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'`
20296                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $swig_version" >&5
20297printf "%s\n" "$swig_version" >&6; }
20298                if test -n "$swig_version" ; then
20299                        # Calculate the required version number components
20300                        required=
20301                        required_major=`echo $required | sed 's/[^0-9].*//'`
20302                        if test -z "$required_major" ; then
20303                                required_major=0
20304                        fi
20305                        required=`echo $required. | sed 's/[0-9]*[^0-9]//'`
20306                        required_minor=`echo $required | sed 's/[^0-9].*//'`
20307                        if test -z "$required_minor" ; then
20308                                required_minor=0
20309                        fi
20310                        required=`echo $required. | sed 's/[0-9]*[^0-9]//'`
20311                        required_patch=`echo $required | sed 's/[^0-9].*//'`
20312                        if test -z "$required_patch" ; then
20313                                required_patch=0
20314                        fi
20315                        # Calculate the available version number components
20316                        available=$swig_version
20317                        available_major=`echo $available | sed 's/[^0-9].*//'`
20318                        if test -z "$available_major" ; then
20319                                available_major=0
20320                        fi
20321                        available=`echo $available | sed 's/[0-9]*[^0-9]//'`
20322                        available_minor=`echo $available | sed 's/[^0-9].*//'`
20323                        if test -z "$available_minor" ; then
20324                                available_minor=0
20325                        fi
20326                        available=`echo $available | sed 's/[0-9]*[^0-9]//'`
20327                        available_patch=`echo $available | sed 's/[^0-9].*//'`
20328                        if test -z "$available_patch" ; then
20329                                available_patch=0
20330                        fi
20331                        # Convert the version tuple into a single number for easier comparison.
20332                        # Using base 100 should be safe since SWIG internally uses BCD values
20333                        # to encode its version number.
20334                        required_swig_vernum=`expr $required_major \* 10000 \
20335                            \+ $required_minor \* 100 \+ $required_patch`
20336                        available_swig_vernum=`expr $available_major \* 10000 \
20337                            \+ $available_minor \* 100 \+ $available_patch`
20338
20339                        if test $available_swig_vernum -lt $required_swig_vernum; then
20340                                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: SWIG version >=  is required.  You have $swig_version." >&5
20341printf "%s\n" "$as_me: WARNING: SWIG version >=  is required.  You have $swig_version." >&2;}
20342                                SWIG=''
20343
20344                        else
20345                                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for SWIG library" >&5
20346printf %s "checking for SWIG library... " >&6; }
20347                                SWIG_LIB=`$SWIG -swiglib | tr '\r\n' '  '`
20348                                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $SWIG_LIB" >&5
20349printf "%s\n" "$SWIG_LIB" >&6; }
20350
20351                        fi
20352                else
20353                        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cannot determine SWIG version" >&5
20354printf "%s\n" "$as_me: WARNING: cannot determine SWIG version" >&2;}
20355                        SWIG=''
20356
20357                fi
20358        fi
20359
20360
20361      fi
20362      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking SWIG" >&5
20363printf %s "checking SWIG... " >&6; }
20364      if test ! -x "$SWIG"; then
20365         as_fn_error $? "failed to find swig tool, install it, or do not build Python module and PyUnbound" "$LINENO" 5
20366      else
20367
20368printf "%s\n" "#define HAVE_SWIG 1" >>confdefs.h
20369
20370         swig="$SWIG"
20371
20372         { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: present" >&5
20373printf "%s\n" "present" >&6; }
20374
20375         # If have Python & SWIG
20376         # Declare PythonMod
20377         if test x_$ub_with_pythonmod != x_no; then
20378
20379printf "%s\n" "#define WITH_PYTHONMODULE 1" >>confdefs.h
20380
20381            WITH_PYTHONMODULE=yes
20382
20383	    PYTHONMOD_OBJ="pythonmod.lo pythonmod_utils.lo"
20384
20385	    PYTHONMOD_HEADER='$(srcdir)/pythonmod/pythonmod.h'
20386
20387	    PYTHONMOD_INSTALL=pythonmod-install
20388
20389	    PYTHONMOD_UNINSTALL=pythonmod-uninstall
20390
20391         fi
20392
20393         # Declare PyUnbound
20394         if test x_$ub_with_pyunbound != x_no; then
20395
20396printf "%s\n" "#define WITH_PYUNBOUND 1" >>confdefs.h
20397
20398            WITH_PYUNBOUND=yes
20399
20400	    PYUNBOUND_OBJ="libunbound_wrap.lo"
20401
20402	    PYUNBOUND_TARGET="_unbound.la"
20403
20404	    PYUNBOUND_INSTALL=pyunbound-install
20405
20406	    PYUNBOUND_UNINSTALL=pyunbound-uninstall
20407
20408         fi
20409      fi
20410   else
20411      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: *** Python libraries not found, won't build PythonMod or PyUnbound ***" >&5
20412printf "%s\n" "*** Python libraries not found, won't build PythonMod or PyUnbound ***" >&6; }
20413      ub_with_pyunbound=no
20414      ub_with_pythonmod=no
20415   fi
20416fi
20417
20418if test "`uname`" = "NetBSD"; then
20419	NETBSD_LINTFLAGS='"-D__RENAME(x)=" -D_NETINET_IN_H_'
20420
20421fi
20422
20423if test "`uname`" = "Linux"; then
20424	# splint cannot parse modern c99 header files
20425	GCC_DOCKER_LINTFLAGS='-syntax'
20426
20427fi
20428{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for build time" >&5
20429printf %s "checking for build time... " >&6; }
20430ax_date_fmt="%Y%m%d"
20431if test x"$SOURCE_DATE_EPOCH" = x
20432then :
20433  CONFIG_DATE=`date "+$ax_date_fmt"`
20434else case e in #(
20435  e) ax_build_date=`date -u -d "@$SOURCE_DATE_EPOCH" "+$ax_date_fmt" 2>/dev/null \
20436                 || date -u -r "$SOURCE_DATE_EPOCH" "+$ax_date_fmt" 2>/dev/null`
20437  if test x"$ax_build_date" = x
20438then :
20439  as_fn_error $? "malformed SOURCE_DATE_EPOCH" "$LINENO" 5
20440else case e in #(
20441  e) CONFIG_DATE=$ax_build_date ;;
20442esac
20443fi ;;
20444esac
20445fi
20446{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CONFIG_DATE" >&5
20447printf "%s\n" "$CONFIG_DATE" >&6; }
20448
20449
20450
20451
20452# Checks for libraries.
20453
20454# libnss
20455USE_NSS="no"
20456
20457# Check whether --with-nss was given.
20458if test ${with_nss+y}
20459then :
20460  withval=$with_nss;
20461	USE_NSS="yes"
20462
20463printf "%s\n" "#define HAVE_NSS 1" >>confdefs.h
20464
20465	if test "$withval" != "" -a "$withval" != "yes"; then
20466		CPPFLAGS="$CPPFLAGS -I$withval/include/nss3"
20467		LDFLAGS="$LDFLAGS -L$withval/lib"
20468
20469	if test "x$enable_rpath" = xyes; then
20470		if echo "$withval/lib" | grep "^/" >/dev/null; then
20471			RUNTIME_PATH="$RUNTIME_PATH -R$withval/lib"
20472		fi
20473	fi
20474
20475		CPPFLAGS="-I$withval/include/nspr4 $CPPFLAGS"
20476	else
20477		CPPFLAGS="$CPPFLAGS -I/usr/include/nss3"
20478		CPPFLAGS="-I/usr/include/nspr4 $CPPFLAGS"
20479	fi
20480        LIBS="$LIBS -lnss3 -lnspr4"
20481	SSLLIB=""
20482	PC_CRYPTO_DEPENDENCY="nss nspr"
20483
20484
20485
20486fi
20487
20488
20489# libnettle
20490USE_NETTLE="no"
20491
20492# Check whether --with-nettle was given.
20493if test ${with_nettle+y}
20494then :
20495  withval=$with_nettle;
20496	USE_NETTLE="yes"
20497
20498printf "%s\n" "#define HAVE_NETTLE 1" >>confdefs.h
20499
20500	ac_fn_c_check_header_compile "$LINENO" "nettle/dsa-compat.h" "ac_cv_header_nettle_dsa_compat_h" "$ac_includes_default
20501"
20502if test "x$ac_cv_header_nettle_dsa_compat_h" = xyes
20503then :
20504  printf "%s\n" "#define HAVE_NETTLE_DSA_COMPAT_H 1" >>confdefs.h
20505
20506fi
20507
20508	if test "$withval" != "" -a "$withval" != "yes"; then
20509		CPPFLAGS="$CPPFLAGS -I$withval/include/nettle"
20510		LDFLAGS="$LDFLAGS -L$withval/lib"
20511
20512	if test "x$enable_rpath" = xyes; then
20513		if echo "$withval/lib" | grep "^/" >/dev/null; then
20514			RUNTIME_PATH="$RUNTIME_PATH -R$withval/lib"
20515		fi
20516	fi
20517
20518	else
20519		CPPFLAGS="$CPPFLAGS -I/usr/include/nettle"
20520	fi
20521        LIBS="$LIBS -lhogweed -lnettle -lgmp"
20522	SSLLIB=""
20523	PC_CRYPTO_DEPENDENCY="hogweed nettle"
20524
20525
20526
20527fi
20528
20529
20530# openssl
20531if test $USE_NSS = "no" -a $USE_NETTLE = "no"; then
20532
20533
20534# Check whether --with-ssl was given.
20535if test ${with_ssl+y}
20536then :
20537  withval=$with_ssl;
20538
20539else case e in #(
20540  e)
20541            withval="yes"
20542         ;;
20543esac
20544fi
20545
20546    if test x_$withval = x_no; then
20547	as_fn_error $? "Need SSL library to do digital signature cryptography" "$LINENO" 5
20548    fi
20549
20550    withval=$withval
20551    if test x_$withval != x_no; then
20552        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for SSL" >&5
20553printf %s "checking for SSL... " >&6; }
20554	if test -n "$withval"; then
20555										if test ! -f "$withval/include/openssl/ssl.h" -a -f "$withval/openssl/ssl.h"; then
20556			ssldir="$withval"
20557			found_ssl="yes"
20558			withval=""
20559			ssldir_include="$ssldir"
20560						ssldir_lib=`echo $ssldir | sed -e 's/include/lib/'`
20561			if test -f "$ssldir_lib/libssl.a" -o -f "$ssldir_lib/libssl.so"; then
20562				: # found here
20563			else
20564				ssldir_lib=`echo $ssldir | sed -e 's/include/lib64/'`
20565				if test -f "$ssldir_lib/libssl.a" -o -f "$ssldir_lib/libssl.so"; then
20566					: # found here
20567				else
20568					as_fn_error $? "Could not find openssl lib file, $ssldir_lib/libssl.so,a, pass like \"/usr/local\" or \"/usr/include/openssl11\"" "$LINENO" 5
20569				fi
20570			fi
20571		fi
20572	fi
20573        if test x_$withval = x_ -o x_$withval = x_yes; then
20574            withval="/usr/local/ssl /usr/lib/ssl /usr/ssl /usr/pkg /usr/local /opt/local /usr/sfw /usr"
20575        fi
20576        for dir in $withval; do
20577            ssldir="$dir"
20578            if test -f "$dir/include/openssl/ssl.h"; then
20579                found_ssl="yes"
20580		ssldir_include="$ssldir/include"
20581		if test ! -d "$ssldir/lib" -a -d "$ssldir/lib64"; then
20582			ssldir_lib="$ssldir/lib64"
20583		else
20584			ssldir_lib="$ssldir/lib"
20585		fi
20586                break;
20587            fi
20588        done
20589        if test x_$found_ssl != x_yes; then
20590            as_fn_error $? "Cannot find the SSL libraries in $withval" "$LINENO" 5
20591        else
20592            { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: found in $ssldir" >&5
20593printf "%s\n" "found in $ssldir" >&6; }
20594
20595printf "%s\n" "#define HAVE_SSL /**/" >>confdefs.h
20596
20597            HAVE_SSL=yes
20598	                if test "$ssldir" != "/usr"; then
20599		    CPPFLAGS="$CPPFLAGS -I$ssldir_include"
20600		    LIBSSL_CPPFLAGS="$LIBSSL_CPPFLAGS -I$ssldir_include"
20601		    LDFLAGS="$LDFLAGS -L$ssldir_lib"
20602		    LIBSSL_LDFLAGS="$LIBSSL_LDFLAGS -L$ssldir_lib"
20603
20604	if test "x$enable_rpath" = xyes; then
20605		if echo "$ssldir_lib" | grep "^/" >/dev/null; then
20606			RUNTIME_PATH="$RUNTIME_PATH -R$ssldir_lib"
20607		fi
20608	fi
20609
20610	    fi
20611
20612            { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for EVP_sha256 in -lcrypto" >&5
20613printf %s "checking for EVP_sha256 in -lcrypto... " >&6; }
20614            LIBS="$LIBS -lcrypto"
20615            LIBSSL_LIBS="$LIBSSL_LIBS -lcrypto"
20616            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20617/* end confdefs.h.  */
20618
20619int
20620main (void)
20621{
20622
20623                int EVP_sha256(void);
20624                (void)EVP_sha256();
20625
20626  ;
20627  return 0;
20628}
20629_ACEOF
20630if ac_fn_c_try_link "$LINENO"
20631then :
20632
20633                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
20634printf "%s\n" "yes" >&6; }
20635
20636printf "%s\n" "#define HAVE_EVP_SHA256 1" >>confdefs.h
20637
20638
20639else case e in #(
20640  e)
20641                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
20642printf "%s\n" "no" >&6; }
20643                # check if -lwsock32 or -lgdi32 are needed.
20644                BAKLIBS="$LIBS"
20645                BAKSSLLIBS="$LIBSSL_LIBS"
20646		LIBS="$LIBS -lgdi32 -lws2_32"
20647		LIBSSL_LIBS="$LIBSSL_LIBS -lgdi32 -lws2_32"
20648                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if -lcrypto needs -lgdi32" >&5
20649printf %s "checking if -lcrypto needs -lgdi32... " >&6; }
20650                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20651/* end confdefs.h.  */
20652
20653int
20654main (void)
20655{
20656
20657                    int EVP_sha256(void);
20658                    (void)EVP_sha256();
20659
20660  ;
20661  return 0;
20662}
20663_ACEOF
20664if ac_fn_c_try_link "$LINENO"
20665then :
20666
20667
20668printf "%s\n" "#define HAVE_EVP_SHA256 1" >>confdefs.h
20669
20670                    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
20671printf "%s\n" "yes" >&6; }
20672
20673else case e in #(
20674  e)
20675                    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
20676printf "%s\n" "no" >&6; }
20677                    LIBS="$BAKLIBS"
20678                    LIBSSL_LIBS="$BAKSSLLIBS"
20679
20680		    LIBS="$LIBS -lgdi32 -lws2_32 -lcrypt32"
20681		    LIBSSL_LIBS="$LIBSSL_LIBS -lgdi32 -lws2_32 -lcrypt32"
20682                    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if -lcrypto needs -lgdi32 -lws2_32 -lcrypt32" >&5
20683printf %s "checking if -lcrypto needs -lgdi32 -lws2_32 -lcrypt32... " >&6; }
20684		    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20685/* end confdefs.h.  */
20686
20687int
20688main (void)
20689{
20690
20691			int EVP_sha256(void);
20692			(void)EVP_sha256();
20693
20694  ;
20695  return 0;
20696}
20697_ACEOF
20698if ac_fn_c_try_link "$LINENO"
20699then :
20700
20701
20702printf "%s\n" "#define HAVE_EVP_SHA256 1" >>confdefs.h
20703
20704			{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
20705printf "%s\n" "yes" >&6; }
20706
20707else case e in #(
20708  e)
20709			{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
20710printf "%s\n" "no" >&6; }
20711			LIBS="$BAKLIBS"
20712			LIBSSL_LIBS="$BAKSSLLIBS"
20713
20714			LIBS="$LIBS -lgdi32 -lws2_32 -lcrypt32 -l:libssp.a"
20715			LIBSSL_LIBS="$LIBSSL_LIBS -lgdi32 -lws2_32 -lcrypt32 -l:libssp.a"
20716			{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if -lcrypto needs -lgdi32 -lws2_32 -lcrypt32 -l:libssp.a" >&5
20717printf %s "checking if -lcrypto needs -lgdi32 -lws2_32 -lcrypt32 -l:libssp.a... " >&6; }
20718			cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20719/* end confdefs.h.  */
20720
20721int
20722main (void)
20723{
20724
20725			    int EVP_sha256(void);
20726			    (void)EVP_sha256();
20727
20728  ;
20729  return 0;
20730}
20731_ACEOF
20732if ac_fn_c_try_link "$LINENO"
20733then :
20734
20735
20736printf "%s\n" "#define HAVE_EVP_SHA256 1" >>confdefs.h
20737
20738			    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
20739printf "%s\n" "yes" >&6; }
20740
20741else case e in #(
20742  e)
20743			    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
20744printf "%s\n" "no" >&6; }
20745			    LIBS="$BAKLIBS"
20746			    LIBSSL_LIBS="$BAKSSLLIBS"
20747
20748			    LIBS="$LIBS -ldl"
20749			    LIBSSL_LIBS="$LIBSSL_LIBS -ldl"
20750			    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if -lcrypto needs -ldl" >&5
20751printf %s "checking if -lcrypto needs -ldl... " >&6; }
20752			    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20753/* end confdefs.h.  */
20754
20755int
20756main (void)
20757{
20758
20759				int EVP_sha256(void);
20760				(void)EVP_sha256();
20761
20762  ;
20763  return 0;
20764}
20765_ACEOF
20766if ac_fn_c_try_link "$LINENO"
20767then :
20768
20769
20770printf "%s\n" "#define HAVE_EVP_SHA256 1" >>confdefs.h
20771
20772				{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
20773printf "%s\n" "yes" >&6; }
20774
20775else case e in #(
20776  e)
20777				{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
20778printf "%s\n" "no" >&6; }
20779				LIBS="$BAKLIBS"
20780				LIBSSL_LIBS="$BAKSSLLIBS"
20781				LIBS="$LIBS -ldl -pthread"
20782				LIBSSL_LIBS="$LIBSSL_LIBS -ldl -pthread"
20783				{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if -lcrypto needs -ldl -pthread" >&5
20784printf %s "checking if -lcrypto needs -ldl -pthread... " >&6; }
20785				cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20786/* end confdefs.h.  */
20787
20788int
20789main (void)
20790{
20791
20792				    int EVP_sha256(void);
20793				    (void)EVP_sha256();
20794
20795  ;
20796  return 0;
20797}
20798_ACEOF
20799if ac_fn_c_try_link "$LINENO"
20800then :
20801
20802
20803printf "%s\n" "#define HAVE_EVP_SHA256 1" >>confdefs.h
20804
20805				    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
20806printf "%s\n" "yes" >&6; }
20807
20808else case e in #(
20809  e)
20810				    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
20811printf "%s\n" "no" >&6; }
20812				    as_fn_error $? "OpenSSL found in $ssldir, but version 0.9.7 or higher is required" "$LINENO" 5
20813				 ;;
20814esac
20815fi
20816rm -f core conftest.err conftest.$ac_objext conftest.beam \
20817    conftest$ac_exeext conftest.$ac_ext
20818			     ;;
20819esac
20820fi
20821rm -f core conftest.err conftest.$ac_objext conftest.beam \
20822    conftest$ac_exeext conftest.$ac_ext
20823			 ;;
20824esac
20825fi
20826rm -f core conftest.err conftest.$ac_objext conftest.beam \
20827    conftest$ac_exeext conftest.$ac_ext
20828		     ;;
20829esac
20830fi
20831rm -f core conftest.err conftest.$ac_objext conftest.beam \
20832    conftest$ac_exeext conftest.$ac_ext
20833                 ;;
20834esac
20835fi
20836rm -f core conftest.err conftest.$ac_objext conftest.beam \
20837    conftest$ac_exeext conftest.$ac_ext
20838             ;;
20839esac
20840fi
20841rm -f core conftest.err conftest.$ac_objext conftest.beam \
20842    conftest$ac_exeext conftest.$ac_ext
20843        fi
20844
20845
20846    fi
20847ac_fn_c_check_header_compile "$LINENO" "openssl/ssl.h" "ac_cv_header_openssl_ssl_h" "$ac_includes_default
20848"
20849if test "x$ac_cv_header_openssl_ssl_h" = xyes
20850then :
20851  printf "%s\n" "#define HAVE_OPENSSL_SSL_H 1" >>confdefs.h
20852
20853fi
20854
20855ac_fn_c_check_header_compile "$LINENO" "openssl/err.h" "ac_cv_header_openssl_err_h" "$ac_includes_default
20856"
20857if test "x$ac_cv_header_openssl_err_h" = xyes
20858then :
20859  printf "%s\n" "#define HAVE_OPENSSL_ERR_H 1" >>confdefs.h
20860
20861fi
20862
20863ac_fn_c_check_header_compile "$LINENO" "openssl/rand.h" "ac_cv_header_openssl_rand_h" "$ac_includes_default
20864"
20865if test "x$ac_cv_header_openssl_rand_h" = xyes
20866then :
20867  printf "%s\n" "#define HAVE_OPENSSL_RAND_H 1" >>confdefs.h
20868
20869fi
20870
20871
20872
20873
20874# check if libssl needs libdl
20875BAKLIBS="$LIBS"
20876LIBS="-lssl $LIBS"
20877{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if libssl needs libdl" >&5
20878printf %s "checking if libssl needs libdl... " >&6; }
20879cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20880/* end confdefs.h.  */
20881
20882/* Override any GCC internal prototype to avoid an error.
20883   Use char because int might match the return type of a GCC
20884   builtin and then its argument prototype would still apply.
20885   The 'extern "C"' is for builds by C++ compilers;
20886   although this is not generally supported in C code supporting it here
20887   has little cost and some practical benefit (sr 110532).  */
20888#ifdef __cplusplus
20889extern "C"
20890#endif
20891char SSL_CTX_new (void);
20892int
20893main (void)
20894{
20895return SSL_CTX_new ();
20896  ;
20897  return 0;
20898}
20899_ACEOF
20900if ac_fn_c_try_link "$LINENO"
20901then :
20902
20903	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
20904printf "%s\n" "no" >&6; }
20905	LIBS="$BAKLIBS"
20906
20907else case e in #(
20908  e)
20909	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
20910printf "%s\n" "yes" >&6; }
20911	LIBS="$BAKLIBS"
20912	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
20913printf %s "checking for library containing dlopen... " >&6; }
20914if test ${ac_cv_search_dlopen+y}
20915then :
20916  printf %s "(cached) " >&6
20917else case e in #(
20918  e) ac_func_search_save_LIBS=$LIBS
20919cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20920/* end confdefs.h.  */
20921
20922/* Override any GCC internal prototype to avoid an error.
20923   Use char because int might match the return type of a GCC
20924   builtin and then its argument prototype would still apply.
20925   The 'extern "C"' is for builds by C++ compilers;
20926   although this is not generally supported in C code supporting it here
20927   has little cost and some practical benefit (sr 110532).  */
20928#ifdef __cplusplus
20929extern "C"
20930#endif
20931char dlopen (void);
20932int
20933main (void)
20934{
20935return dlopen ();
20936  ;
20937  return 0;
20938}
20939_ACEOF
20940for ac_lib in '' dl
20941do
20942  if test -z "$ac_lib"; then
20943    ac_res="none required"
20944  else
20945    ac_res=-l$ac_lib
20946    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
20947  fi
20948  if ac_fn_c_try_link "$LINENO"
20949then :
20950  ac_cv_search_dlopen=$ac_res
20951fi
20952rm -f core conftest.err conftest.$ac_objext conftest.beam \
20953    conftest$ac_exeext
20954  if test ${ac_cv_search_dlopen+y}
20955then :
20956  break
20957fi
20958done
20959if test ${ac_cv_search_dlopen+y}
20960then :
20961
20962else case e in #(
20963  e) ac_cv_search_dlopen=no ;;
20964esac
20965fi
20966rm conftest.$ac_ext
20967LIBS=$ac_func_search_save_LIBS ;;
20968esac
20969fi
20970{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
20971printf "%s\n" "$ac_cv_search_dlopen" >&6; }
20972ac_res=$ac_cv_search_dlopen
20973if test "$ac_res" != no
20974then :
20975  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
20976
20977fi
20978
20979 ;;
20980esac
20981fi
20982rm -f core conftest.err conftest.$ac_objext conftest.beam \
20983    conftest$ac_exeext conftest.$ac_ext
20984SSLLIB="-lssl"
20985
20986PC_CRYPTO_DEPENDENCY=""
20987
20988
20989# check if -lcrypt32 is needed because CAPIENG needs that. (on windows)
20990BAKLIBS="$LIBS"
20991LIBS="-lssl $LIBS"
20992{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if libssl needs -lcrypt32" >&5
20993printf %s "checking if libssl needs -lcrypt32... " >&6; }
20994cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20995/* end confdefs.h.  */
20996
20997int
20998main (void)
20999{
21000
21001	int EVP_sha256(void);
21002	(void)EVP_sha256();
21003
21004  ;
21005  return 0;
21006}
21007_ACEOF
21008if ac_fn_c_try_link "$LINENO"
21009then :
21010
21011	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
21012printf "%s\n" "no" >&6; }
21013	LIBS="$BAKLIBS"
21014
21015else case e in #(
21016  e)
21017	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
21018printf "%s\n" "yes" >&6; }
21019	LIBS="$BAKLIBS"
21020	LIBS="$LIBS -lcrypt32"
21021 ;;
21022esac
21023fi
21024rm -f core conftest.err conftest.$ac_objext conftest.beam \
21025    conftest$ac_exeext conftest.$ac_ext
21026
21027{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for LibreSSL" >&5
21028printf %s "checking for LibreSSL... " >&6; }
21029if grep VERSION_TEXT $ssldir_include/openssl/opensslv.h | grep "LibreSSL" >/dev/null; then
21030	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
21031printf "%s\n" "yes" >&6; }
21032
21033printf "%s\n" "#define HAVE_LIBRESSL 1" >>confdefs.h
21034
21035	# libressl provides these compat functions, but they may also be
21036	# declared by the OS in libc.  See if they have been declared.
21037	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC options needed to detect all undeclared functions" >&5
21038printf %s "checking for $CC options needed to detect all undeclared functions... " >&6; }
21039if test ${ac_cv_c_undeclared_builtin_options+y}
21040then :
21041  printf %s "(cached) " >&6
21042else case e in #(
21043  e) ac_save_CFLAGS=$CFLAGS
21044   ac_cv_c_undeclared_builtin_options='cannot detect'
21045   for ac_arg in '' -fno-builtin; do
21046     CFLAGS="$ac_save_CFLAGS $ac_arg"
21047     # This test program should *not* compile successfully.
21048     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21049/* end confdefs.h.  */
21050
21051int
21052main (void)
21053{
21054(void) strchr;
21055  ;
21056  return 0;
21057}
21058_ACEOF
21059if ac_fn_c_try_compile "$LINENO"
21060then :
21061
21062else case e in #(
21063  e) # This test program should compile successfully.
21064        # No library function is consistently available on
21065        # freestanding implementations, so test against a dummy
21066        # declaration.  Include always-available headers on the
21067        # off chance that they somehow elicit warnings.
21068        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21069/* end confdefs.h.  */
21070#include <float.h>
21071#include <limits.h>
21072#include <stdarg.h>
21073#include <stddef.h>
21074extern void ac_decl (int, char *);
21075
21076int
21077main (void)
21078{
21079(void) ac_decl (0, (char *) 0);
21080  (void) ac_decl;
21081
21082  ;
21083  return 0;
21084}
21085_ACEOF
21086if ac_fn_c_try_compile "$LINENO"
21087then :
21088  if test x"$ac_arg" = x
21089then :
21090  ac_cv_c_undeclared_builtin_options='none needed'
21091else case e in #(
21092  e) ac_cv_c_undeclared_builtin_options=$ac_arg ;;
21093esac
21094fi
21095          break
21096fi
21097rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
21098esac
21099fi
21100rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
21101    done
21102    CFLAGS=$ac_save_CFLAGS
21103   ;;
21104esac
21105fi
21106{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_undeclared_builtin_options" >&5
21107printf "%s\n" "$ac_cv_c_undeclared_builtin_options" >&6; }
21108  case $ac_cv_c_undeclared_builtin_options in #(
21109  'cannot detect') :
21110    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
21111printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
21112as_fn_error $? "cannot make $CC report undeclared builtins
21113See 'config.log' for more details" "$LINENO" 5; } ;; #(
21114  'none needed') :
21115    ac_c_undeclared_builtin_options='' ;; #(
21116  *) :
21117    ac_c_undeclared_builtin_options=$ac_cv_c_undeclared_builtin_options ;;
21118esac
21119
21120ac_fn_check_decl "$LINENO" "strlcpy" "ac_cv_have_decl_strlcpy" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
21121if test "x$ac_cv_have_decl_strlcpy" = xyes
21122then :
21123  ac_have_decl=1
21124else case e in #(
21125  e) ac_have_decl=0 ;;
21126esac
21127fi
21128printf "%s\n" "#define HAVE_DECL_STRLCPY $ac_have_decl" >>confdefs.h
21129ac_fn_check_decl "$LINENO" "strlcat" "ac_cv_have_decl_strlcat" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
21130if test "x$ac_cv_have_decl_strlcat" = xyes
21131then :
21132  ac_have_decl=1
21133else case e in #(
21134  e) ac_have_decl=0 ;;
21135esac
21136fi
21137printf "%s\n" "#define HAVE_DECL_STRLCAT $ac_have_decl" >>confdefs.h
21138ac_fn_check_decl "$LINENO" "arc4random" "ac_cv_have_decl_arc4random" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
21139if test "x$ac_cv_have_decl_arc4random" = xyes
21140then :
21141  ac_have_decl=1
21142else case e in #(
21143  e) ac_have_decl=0 ;;
21144esac
21145fi
21146printf "%s\n" "#define HAVE_DECL_ARC4RANDOM $ac_have_decl" >>confdefs.h
21147ac_fn_check_decl "$LINENO" "arc4random_uniform" "ac_cv_have_decl_arc4random_uniform" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
21148if test "x$ac_cv_have_decl_arc4random_uniform" = xyes
21149then :
21150  ac_have_decl=1
21151else case e in #(
21152  e) ac_have_decl=0 ;;
21153esac
21154fi
21155printf "%s\n" "#define HAVE_DECL_ARC4RANDOM_UNIFORM $ac_have_decl" >>confdefs.h
21156
21157else
21158	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
21159printf "%s\n" "no" >&6; }
21160fi
21161ac_fn_c_check_header_compile "$LINENO" "openssl/conf.h" "ac_cv_header_openssl_conf_h" "$ac_includes_default
21162"
21163if test "x$ac_cv_header_openssl_conf_h" = xyes
21164then :
21165  printf "%s\n" "#define HAVE_OPENSSL_CONF_H 1" >>confdefs.h
21166
21167fi
21168ac_fn_c_check_header_compile "$LINENO" "openssl/engine.h" "ac_cv_header_openssl_engine_h" "$ac_includes_default
21169"
21170if test "x$ac_cv_header_openssl_engine_h" = xyes
21171then :
21172  printf "%s\n" "#define HAVE_OPENSSL_ENGINE_H 1" >>confdefs.h
21173
21174fi
21175ac_fn_c_check_header_compile "$LINENO" "openssl/bn.h" "ac_cv_header_openssl_bn_h" "$ac_includes_default
21176"
21177if test "x$ac_cv_header_openssl_bn_h" = xyes
21178then :
21179  printf "%s\n" "#define HAVE_OPENSSL_BN_H 1" >>confdefs.h
21180
21181fi
21182ac_fn_c_check_header_compile "$LINENO" "openssl/dh.h" "ac_cv_header_openssl_dh_h" "$ac_includes_default
21183"
21184if test "x$ac_cv_header_openssl_dh_h" = xyes
21185then :
21186  printf "%s\n" "#define HAVE_OPENSSL_DH_H 1" >>confdefs.h
21187
21188fi
21189ac_fn_c_check_header_compile "$LINENO" "openssl/dsa.h" "ac_cv_header_openssl_dsa_h" "$ac_includes_default
21190"
21191if test "x$ac_cv_header_openssl_dsa_h" = xyes
21192then :
21193  printf "%s\n" "#define HAVE_OPENSSL_DSA_H 1" >>confdefs.h
21194
21195fi
21196ac_fn_c_check_header_compile "$LINENO" "openssl/rsa.h" "ac_cv_header_openssl_rsa_h" "$ac_includes_default
21197"
21198if test "x$ac_cv_header_openssl_rsa_h" = xyes
21199then :
21200  printf "%s\n" "#define HAVE_OPENSSL_RSA_H 1" >>confdefs.h
21201
21202fi
21203ac_fn_c_check_header_compile "$LINENO" "openssl/core_names.h" "ac_cv_header_openssl_core_names_h" "$ac_includes_default
21204"
21205if test "x$ac_cv_header_openssl_core_names_h" = xyes
21206then :
21207  printf "%s\n" "#define HAVE_OPENSSL_CORE_NAMES_H 1" >>confdefs.h
21208
21209fi
21210ac_fn_c_check_header_compile "$LINENO" "openssl/param_build.h" "ac_cv_header_openssl_param_build_h" "$ac_includes_default
21211"
21212if test "x$ac_cv_header_openssl_param_build_h" = xyes
21213then :
21214  printf "%s\n" "#define HAVE_OPENSSL_PARAM_BUILD_H 1" >>confdefs.h
21215
21216fi
21217
21218ac_fn_c_check_func "$LINENO" "OPENSSL_config" "ac_cv_func_OPENSSL_config"
21219if test "x$ac_cv_func_OPENSSL_config" = xyes
21220then :
21221  printf "%s\n" "#define HAVE_OPENSSL_CONFIG 1" >>confdefs.h
21222
21223fi
21224ac_fn_c_check_func "$LINENO" "EVP_sha1" "ac_cv_func_EVP_sha1"
21225if test "x$ac_cv_func_EVP_sha1" = xyes
21226then :
21227  printf "%s\n" "#define HAVE_EVP_SHA1 1" >>confdefs.h
21228
21229fi
21230ac_fn_c_check_func "$LINENO" "EVP_sha256" "ac_cv_func_EVP_sha256"
21231if test "x$ac_cv_func_EVP_sha256" = xyes
21232then :
21233  printf "%s\n" "#define HAVE_EVP_SHA256 1" >>confdefs.h
21234
21235fi
21236ac_fn_c_check_func "$LINENO" "EVP_sha512" "ac_cv_func_EVP_sha512"
21237if test "x$ac_cv_func_EVP_sha512" = xyes
21238then :
21239  printf "%s\n" "#define HAVE_EVP_SHA512 1" >>confdefs.h
21240
21241fi
21242ac_fn_c_check_func "$LINENO" "FIPS_mode" "ac_cv_func_FIPS_mode"
21243if test "x$ac_cv_func_FIPS_mode" = xyes
21244then :
21245  printf "%s\n" "#define HAVE_FIPS_MODE 1" >>confdefs.h
21246
21247fi
21248ac_fn_c_check_func "$LINENO" "EVP_default_properties_is_fips_enabled" "ac_cv_func_EVP_default_properties_is_fips_enabled"
21249if test "x$ac_cv_func_EVP_default_properties_is_fips_enabled" = xyes
21250then :
21251  printf "%s\n" "#define HAVE_EVP_DEFAULT_PROPERTIES_IS_FIPS_ENABLED 1" >>confdefs.h
21252
21253fi
21254ac_fn_c_check_func "$LINENO" "EVP_MD_CTX_new" "ac_cv_func_EVP_MD_CTX_new"
21255if test "x$ac_cv_func_EVP_MD_CTX_new" = xyes
21256then :
21257  printf "%s\n" "#define HAVE_EVP_MD_CTX_NEW 1" >>confdefs.h
21258
21259fi
21260ac_fn_c_check_func "$LINENO" "OpenSSL_add_all_digests" "ac_cv_func_OpenSSL_add_all_digests"
21261if test "x$ac_cv_func_OpenSSL_add_all_digests" = xyes
21262then :
21263  printf "%s\n" "#define HAVE_OPENSSL_ADD_ALL_DIGESTS 1" >>confdefs.h
21264
21265fi
21266ac_fn_c_check_func "$LINENO" "OPENSSL_init_crypto" "ac_cv_func_OPENSSL_init_crypto"
21267if test "x$ac_cv_func_OPENSSL_init_crypto" = xyes
21268then :
21269  printf "%s\n" "#define HAVE_OPENSSL_INIT_CRYPTO 1" >>confdefs.h
21270
21271fi
21272ac_fn_c_check_func "$LINENO" "EVP_cleanup" "ac_cv_func_EVP_cleanup"
21273if test "x$ac_cv_func_EVP_cleanup" = xyes
21274then :
21275  printf "%s\n" "#define HAVE_EVP_CLEANUP 1" >>confdefs.h
21276
21277fi
21278ac_fn_c_check_func "$LINENO" "ENGINE_cleanup" "ac_cv_func_ENGINE_cleanup"
21279if test "x$ac_cv_func_ENGINE_cleanup" = xyes
21280then :
21281  printf "%s\n" "#define HAVE_ENGINE_CLEANUP 1" >>confdefs.h
21282
21283fi
21284ac_fn_c_check_func "$LINENO" "ERR_load_crypto_strings" "ac_cv_func_ERR_load_crypto_strings"
21285if test "x$ac_cv_func_ERR_load_crypto_strings" = xyes
21286then :
21287  printf "%s\n" "#define HAVE_ERR_LOAD_CRYPTO_STRINGS 1" >>confdefs.h
21288
21289fi
21290ac_fn_c_check_func "$LINENO" "CRYPTO_cleanup_all_ex_data" "ac_cv_func_CRYPTO_cleanup_all_ex_data"
21291if test "x$ac_cv_func_CRYPTO_cleanup_all_ex_data" = xyes
21292then :
21293  printf "%s\n" "#define HAVE_CRYPTO_CLEANUP_ALL_EX_DATA 1" >>confdefs.h
21294
21295fi
21296ac_fn_c_check_func "$LINENO" "ERR_free_strings" "ac_cv_func_ERR_free_strings"
21297if test "x$ac_cv_func_ERR_free_strings" = xyes
21298then :
21299  printf "%s\n" "#define HAVE_ERR_FREE_STRINGS 1" >>confdefs.h
21300
21301fi
21302ac_fn_c_check_func "$LINENO" "RAND_cleanup" "ac_cv_func_RAND_cleanup"
21303if test "x$ac_cv_func_RAND_cleanup" = xyes
21304then :
21305  printf "%s\n" "#define HAVE_RAND_CLEANUP 1" >>confdefs.h
21306
21307fi
21308ac_fn_c_check_func "$LINENO" "DSA_SIG_set0" "ac_cv_func_DSA_SIG_set0"
21309if test "x$ac_cv_func_DSA_SIG_set0" = xyes
21310then :
21311  printf "%s\n" "#define HAVE_DSA_SIG_SET0 1" >>confdefs.h
21312
21313fi
21314ac_fn_c_check_func "$LINENO" "EVP_dss1" "ac_cv_func_EVP_dss1"
21315if test "x$ac_cv_func_EVP_dss1" = xyes
21316then :
21317  printf "%s\n" "#define HAVE_EVP_DSS1 1" >>confdefs.h
21318
21319fi
21320ac_fn_c_check_func "$LINENO" "EVP_DigestVerify" "ac_cv_func_EVP_DigestVerify"
21321if test "x$ac_cv_func_EVP_DigestVerify" = xyes
21322then :
21323  printf "%s\n" "#define HAVE_EVP_DIGESTVERIFY 1" >>confdefs.h
21324
21325fi
21326ac_fn_c_check_func "$LINENO" "EVP_aes_256_cbc" "ac_cv_func_EVP_aes_256_cbc"
21327if test "x$ac_cv_func_EVP_aes_256_cbc" = xyes
21328then :
21329  printf "%s\n" "#define HAVE_EVP_AES_256_CBC 1" >>confdefs.h
21330
21331fi
21332ac_fn_c_check_func "$LINENO" "EVP_EncryptInit_ex" "ac_cv_func_EVP_EncryptInit_ex"
21333if test "x$ac_cv_func_EVP_EncryptInit_ex" = xyes
21334then :
21335  printf "%s\n" "#define HAVE_EVP_ENCRYPTINIT_EX 1" >>confdefs.h
21336
21337fi
21338ac_fn_c_check_func "$LINENO" "HMAC_Init_ex" "ac_cv_func_HMAC_Init_ex"
21339if test "x$ac_cv_func_HMAC_Init_ex" = xyes
21340then :
21341  printf "%s\n" "#define HAVE_HMAC_INIT_EX 1" >>confdefs.h
21342
21343fi
21344ac_fn_c_check_func "$LINENO" "CRYPTO_THREADID_set_callback" "ac_cv_func_CRYPTO_THREADID_set_callback"
21345if test "x$ac_cv_func_CRYPTO_THREADID_set_callback" = xyes
21346then :
21347  printf "%s\n" "#define HAVE_CRYPTO_THREADID_SET_CALLBACK 1" >>confdefs.h
21348
21349fi
21350ac_fn_c_check_func "$LINENO" "EVP_MAC_CTX_set_params" "ac_cv_func_EVP_MAC_CTX_set_params"
21351if test "x$ac_cv_func_EVP_MAC_CTX_set_params" = xyes
21352then :
21353  printf "%s\n" "#define HAVE_EVP_MAC_CTX_SET_PARAMS 1" >>confdefs.h
21354
21355fi
21356ac_fn_c_check_func "$LINENO" "OSSL_PARAM_BLD_new" "ac_cv_func_OSSL_PARAM_BLD_new"
21357if test "x$ac_cv_func_OSSL_PARAM_BLD_new" = xyes
21358then :
21359  printf "%s\n" "#define HAVE_OSSL_PARAM_BLD_NEW 1" >>confdefs.h
21360
21361fi
21362ac_fn_c_check_func "$LINENO" "BIO_set_callback_ex" "ac_cv_func_BIO_set_callback_ex"
21363if test "x$ac_cv_func_BIO_set_callback_ex" = xyes
21364then :
21365  printf "%s\n" "#define HAVE_BIO_SET_CALLBACK_EX 1" >>confdefs.h
21366
21367fi
21368
21369
21370# these check_funcs need -lssl
21371BAKLIBS="$LIBS"
21372LIBS="-lssl $LIBS"
21373ac_fn_c_check_func "$LINENO" "OPENSSL_init_ssl" "ac_cv_func_OPENSSL_init_ssl"
21374if test "x$ac_cv_func_OPENSSL_init_ssl" = xyes
21375then :
21376  printf "%s\n" "#define HAVE_OPENSSL_INIT_SSL 1" >>confdefs.h
21377
21378fi
21379ac_fn_c_check_func "$LINENO" "SSL_CTX_set_security_level" "ac_cv_func_SSL_CTX_set_security_level"
21380if test "x$ac_cv_func_SSL_CTX_set_security_level" = xyes
21381then :
21382  printf "%s\n" "#define HAVE_SSL_CTX_SET_SECURITY_LEVEL 1" >>confdefs.h
21383
21384fi
21385ac_fn_c_check_func "$LINENO" "SSL_set1_host" "ac_cv_func_SSL_set1_host"
21386if test "x$ac_cv_func_SSL_set1_host" = xyes
21387then :
21388  printf "%s\n" "#define HAVE_SSL_SET1_HOST 1" >>confdefs.h
21389
21390fi
21391ac_fn_c_check_func "$LINENO" "SSL_get0_peername" "ac_cv_func_SSL_get0_peername"
21392if test "x$ac_cv_func_SSL_get0_peername" = xyes
21393then :
21394  printf "%s\n" "#define HAVE_SSL_GET0_PEERNAME 1" >>confdefs.h
21395
21396fi
21397ac_fn_c_check_func "$LINENO" "X509_VERIFY_PARAM_set1_host" "ac_cv_func_X509_VERIFY_PARAM_set1_host"
21398if test "x$ac_cv_func_X509_VERIFY_PARAM_set1_host" = xyes
21399then :
21400  printf "%s\n" "#define HAVE_X509_VERIFY_PARAM_SET1_HOST 1" >>confdefs.h
21401
21402fi
21403ac_fn_c_check_func "$LINENO" "SSL_CTX_set_ciphersuites" "ac_cv_func_SSL_CTX_set_ciphersuites"
21404if test "x$ac_cv_func_SSL_CTX_set_ciphersuites" = xyes
21405then :
21406  printf "%s\n" "#define HAVE_SSL_CTX_SET_CIPHERSUITES 1" >>confdefs.h
21407
21408fi
21409ac_fn_c_check_func "$LINENO" "SSL_CTX_set_tlsext_ticket_key_evp_cb" "ac_cv_func_SSL_CTX_set_tlsext_ticket_key_evp_cb"
21410if test "x$ac_cv_func_SSL_CTX_set_tlsext_ticket_key_evp_cb" = xyes
21411then :
21412  printf "%s\n" "#define HAVE_SSL_CTX_SET_TLSEXT_TICKET_KEY_EVP_CB 1" >>confdefs.h
21413
21414fi
21415ac_fn_c_check_func "$LINENO" "SSL_CTX_set_alpn_select_cb" "ac_cv_func_SSL_CTX_set_alpn_select_cb"
21416if test "x$ac_cv_func_SSL_CTX_set_alpn_select_cb" = xyes
21417then :
21418  printf "%s\n" "#define HAVE_SSL_CTX_SET_ALPN_SELECT_CB 1" >>confdefs.h
21419
21420fi
21421ac_fn_c_check_func "$LINENO" "SSL_get0_alpn_selected" "ac_cv_func_SSL_get0_alpn_selected"
21422if test "x$ac_cv_func_SSL_get0_alpn_selected" = xyes
21423then :
21424  printf "%s\n" "#define HAVE_SSL_GET0_ALPN_SELECTED 1" >>confdefs.h
21425
21426fi
21427ac_fn_c_check_func "$LINENO" "SSL_CTX_set_alpn_protos" "ac_cv_func_SSL_CTX_set_alpn_protos"
21428if test "x$ac_cv_func_SSL_CTX_set_alpn_protos" = xyes
21429then :
21430  printf "%s\n" "#define HAVE_SSL_CTX_SET_ALPN_PROTOS 1" >>confdefs.h
21431
21432fi
21433ac_fn_c_check_func "$LINENO" "SSL_get1_peer_certificate" "ac_cv_func_SSL_get1_peer_certificate"
21434if test "x$ac_cv_func_SSL_get1_peer_certificate" = xyes
21435then :
21436  printf "%s\n" "#define HAVE_SSL_GET1_PEER_CERTIFICATE 1" >>confdefs.h
21437
21438fi
21439
21440LIBS="$BAKLIBS"
21441
21442ac_fn_check_decl "$LINENO" "SSL_COMP_get_compression_methods" "ac_cv_have_decl_SSL_COMP_get_compression_methods" "
21443$ac_includes_default
21444#ifdef HAVE_OPENSSL_ERR_H
21445#include <openssl/err.h>
21446#endif
21447
21448#ifdef HAVE_OPENSSL_RAND_H
21449#include <openssl/rand.h>
21450#endif
21451
21452#ifdef HAVE_OPENSSL_CONF_H
21453#include <openssl/conf.h>
21454#endif
21455
21456#ifdef HAVE_OPENSSL_ENGINE_H
21457#include <openssl/engine.h>
21458#endif
21459#include <openssl/ssl.h>
21460#include <openssl/evp.h>
21461
21462" "$ac_c_undeclared_builtin_options" "CFLAGS"
21463if test "x$ac_cv_have_decl_SSL_COMP_get_compression_methods" = xyes
21464then :
21465  ac_have_decl=1
21466else case e in #(
21467  e) ac_have_decl=0 ;;
21468esac
21469fi
21470printf "%s\n" "#define HAVE_DECL_SSL_COMP_GET_COMPRESSION_METHODS $ac_have_decl" >>confdefs.h
21471ac_fn_check_decl "$LINENO" "sk_SSL_COMP_pop_free" "ac_cv_have_decl_sk_SSL_COMP_pop_free" "
21472$ac_includes_default
21473#ifdef HAVE_OPENSSL_ERR_H
21474#include <openssl/err.h>
21475#endif
21476
21477#ifdef HAVE_OPENSSL_RAND_H
21478#include <openssl/rand.h>
21479#endif
21480
21481#ifdef HAVE_OPENSSL_CONF_H
21482#include <openssl/conf.h>
21483#endif
21484
21485#ifdef HAVE_OPENSSL_ENGINE_H
21486#include <openssl/engine.h>
21487#endif
21488#include <openssl/ssl.h>
21489#include <openssl/evp.h>
21490
21491" "$ac_c_undeclared_builtin_options" "CFLAGS"
21492if test "x$ac_cv_have_decl_sk_SSL_COMP_pop_free" = xyes
21493then :
21494  ac_have_decl=1
21495else case e in #(
21496  e) ac_have_decl=0 ;;
21497esac
21498fi
21499printf "%s\n" "#define HAVE_DECL_SK_SSL_COMP_POP_FREE $ac_have_decl" >>confdefs.h
21500ac_fn_check_decl "$LINENO" "SSL_CTX_set_ecdh_auto" "ac_cv_have_decl_SSL_CTX_set_ecdh_auto" "
21501$ac_includes_default
21502#ifdef HAVE_OPENSSL_ERR_H
21503#include <openssl/err.h>
21504#endif
21505
21506#ifdef HAVE_OPENSSL_RAND_H
21507#include <openssl/rand.h>
21508#endif
21509
21510#ifdef HAVE_OPENSSL_CONF_H
21511#include <openssl/conf.h>
21512#endif
21513
21514#ifdef HAVE_OPENSSL_ENGINE_H
21515#include <openssl/engine.h>
21516#endif
21517#include <openssl/ssl.h>
21518#include <openssl/evp.h>
21519
21520" "$ac_c_undeclared_builtin_options" "CFLAGS"
21521if test "x$ac_cv_have_decl_SSL_CTX_set_ecdh_auto" = xyes
21522then :
21523  ac_have_decl=1
21524else case e in #(
21525  e) ac_have_decl=0 ;;
21526esac
21527fi
21528printf "%s\n" "#define HAVE_DECL_SSL_CTX_SET_ECDH_AUTO $ac_have_decl" >>confdefs.h
21529ac_fn_check_decl "$LINENO" "SSL_CTX_set_tmp_ecdh" "ac_cv_have_decl_SSL_CTX_set_tmp_ecdh" "
21530$ac_includes_default
21531#ifdef HAVE_OPENSSL_ERR_H
21532#include <openssl/err.h>
21533#endif
21534
21535#ifdef HAVE_OPENSSL_RAND_H
21536#include <openssl/rand.h>
21537#endif
21538
21539#ifdef HAVE_OPENSSL_CONF_H
21540#include <openssl/conf.h>
21541#endif
21542
21543#ifdef HAVE_OPENSSL_ENGINE_H
21544#include <openssl/engine.h>
21545#endif
21546#include <openssl/ssl.h>
21547#include <openssl/evp.h>
21548
21549" "$ac_c_undeclared_builtin_options" "CFLAGS"
21550if test "x$ac_cv_have_decl_SSL_CTX_set_tmp_ecdh" = xyes
21551then :
21552  ac_have_decl=1
21553else $as_nop
21554  ac_have_decl=0
21555fi
21556printf "%s\n" "#define HAVE_DECL_SSL_CTX_SET_TMP_ECDH $ac_have_decl" >>confdefs.h
21557
21558
21559if test "$ac_cv_func_HMAC_Init_ex" = "yes"; then
21560# check function return type.
21561{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking the return type of HMAC_Init_ex" >&5
21562printf %s "checking the return type of HMAC_Init_ex... " >&6; }
21563cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21564/* end confdefs.h.  */
21565
21566#ifdef HAVE_OPENSSL_ERR_H
21567#include <openssl/err.h>
21568#endif
21569
21570#ifdef HAVE_OPENSSL_RAND_H
21571#include <openssl/rand.h>
21572#endif
21573
21574#ifdef HAVE_OPENSSL_CONF_H
21575#include <openssl/conf.h>
21576#endif
21577
21578#ifdef HAVE_OPENSSL_ENGINE_H
21579#include <openssl/engine.h>
21580#endif
21581#include <openssl/ssl.h>
21582#include <openssl/evp.h>
21583
21584int
21585main (void)
21586{
21587
21588	HMAC_CTX* hmac_ctx = NULL;
21589	void* hmac_key = NULL;
21590	const EVP_MD* digest = NULL;
21591	int x = HMAC_Init_ex(hmac_ctx, hmac_key, 32, digest, NULL);
21592	(void)x;
21593
21594  ;
21595  return 0;
21596}
21597_ACEOF
21598if ac_fn_c_try_compile "$LINENO"
21599then :
21600
21601	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: int" >&5
21602printf "%s\n" "int" >&6; }
21603
21604else case e in #(
21605  e)
21606	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: void" >&5
21607printf "%s\n" "void" >&6; }
21608
21609printf "%s\n" "#define HMAC_INIT_EX_RETURNS_VOID 1" >>confdefs.h
21610
21611 ;;
21612esac
21613fi
21614rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
21615fi
21616
21617fi
21618
21619
21620# libbsd
21621
21622# Check whether --with-libbsd was given.
21623if test ${with_libbsd+y}
21624then :
21625  withval=$with_libbsd;
21626	ac_fn_c_check_header_compile "$LINENO" "bsd/string.h" "ac_cv_header_bsd_string_h" "$ac_includes_default
21627"
21628if test "x$ac_cv_header_bsd_string_h" = xyes
21629then :
21630  printf "%s\n" "#define HAVE_BSD_STRING_H 1" >>confdefs.h
21631
21632fi
21633ac_fn_c_check_header_compile "$LINENO" "bsd/stdlib.h" "ac_cv_header_bsd_stdlib_h" "$ac_includes_default
21634"
21635if test "x$ac_cv_header_bsd_stdlib_h" = xyes
21636then :
21637  printf "%s\n" "#define HAVE_BSD_STDLIB_H 1" >>confdefs.h
21638
21639fi
21640
21641	if test "x$ac_cv_header_bsd_string_h" = xyes -a "x$ac_cv_header_bsd_stdlib_h" = xyes; then
21642		for func in strlcpy strlcat arc4random arc4random_uniform reallocarray; do
21643			as_ac_Search=`printf "%s\n" "ac_cv_search_$func" | sed "$as_sed_sh"`
21644{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing $func" >&5
21645printf %s "checking for library containing $func... " >&6; }
21646if eval test \${$as_ac_Search+y}
21647then :
21648  printf %s "(cached) " >&6
21649else case e in #(
21650  e) ac_func_search_save_LIBS=$LIBS
21651cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21652/* end confdefs.h.  */
21653
21654/* Override any GCC internal prototype to avoid an error.
21655   Use char because int might match the return type of a GCC
21656   builtin and then its argument prototype would still apply.
21657   The 'extern "C"' is for builds by C++ compilers;
21658   although this is not generally supported in C code supporting it here
21659   has little cost and some practical benefit (sr 110532).  */
21660#ifdef __cplusplus
21661extern "C"
21662#endif
21663char $func (void);
21664int
21665main (void)
21666{
21667return $func ();
21668  ;
21669  return 0;
21670}
21671_ACEOF
21672for ac_lib in '' bsd
21673do
21674  if test -z "$ac_lib"; then
21675    ac_res="none required"
21676  else
21677    ac_res=-l$ac_lib
21678    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
21679  fi
21680  if ac_fn_c_try_link "$LINENO"
21681then :
21682  eval "$as_ac_Search=\$ac_res"
21683fi
21684rm -f core conftest.err conftest.$ac_objext conftest.beam \
21685    conftest$ac_exeext
21686  if eval test \${$as_ac_Search+y}
21687then :
21688  break
21689fi
21690done
21691if eval test \${$as_ac_Search+y}
21692then :
21693
21694else case e in #(
21695  e) eval "$as_ac_Search=no" ;;
21696esac
21697fi
21698rm conftest.$ac_ext
21699LIBS=$ac_func_search_save_LIBS ;;
21700esac
21701fi
21702eval ac_res=\$$as_ac_Search
21703	       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
21704printf "%s\n" "$ac_res" >&6; }
21705eval ac_res=\$$as_ac_Search
21706if test "$ac_res" != no
21707then :
21708  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
21709
21710
21711printf "%s\n" "#define HAVE_LIBBSD 1" >>confdefs.h
21712
21713				PC_LIBBSD_DEPENDENCY=libbsd
21714
21715
21716fi
21717
21718		done
21719	fi
21720
21721fi
21722
21723
21724# Check whether --enable-sha1 was given.
21725if test ${enable_sha1+y}
21726then :
21727  enableval=$enable_sha1;
21728fi
21729
21730case "$enable_sha1" in
21731	no)
21732	;;
21733	yes|*)
21734
21735printf "%s\n" "#define USE_SHA1 1" >>confdefs.h
21736
21737	;;
21738esac
21739
21740
21741# Check whether --enable-sha2 was given.
21742if test ${enable_sha2+y}
21743then :
21744  enableval=$enable_sha2;
21745fi
21746
21747case "$enable_sha2" in
21748	no)
21749	;;
21750	yes|*)
21751
21752printf "%s\n" "#define USE_SHA2 1" >>confdefs.h
21753
21754	;;
21755esac
21756
21757# Check whether --enable-subnet was given.
21758if test ${enable_subnet+y}
21759then :
21760  enableval=$enable_subnet;
21761fi
21762
21763case "$enable_subnet" in
21764	yes)
21765
21766printf "%s\n" "#define CLIENT_SUBNET 1" >>confdefs.h
21767
21768	SUBNET_OBJ="edns-subnet.lo subnetmod.lo addrtree.lo subnet-whitelist.lo"
21769
21770	SUBNET_HEADER='$(srcdir)/edns-subnet/subnetmod.h $(srcdir)/edns-subnet/edns-subnet.h $(srcdir)/edns-subnet/subnet-whitelist.h $(srcdir)/edns-subnet/addrtree.h'
21771
21772	;;
21773	no|*)
21774	;;
21775esac
21776
21777# check whether gost also works
21778
21779# Check whether --enable-gost was given.
21780if test ${enable_gost+y}
21781then :
21782  enableval=$enable_gost;
21783fi
21784
21785use_gost="no"
21786if test $USE_NSS = "no" -a $USE_NETTLE = "no"; then
21787case "$enable_gost" in
21788	no)
21789	;;
21790	*)
21791	ac_fn_c_check_func "$LINENO" "EVP_PKEY_set_type_str" "ac_cv_func_EVP_PKEY_set_type_str"
21792if test "x$ac_cv_func_EVP_PKEY_set_type_str" = xyes
21793then :
21794  :
21795else case e in #(
21796  e) as_fn_error $? "OpenSSL 1.0.0 is needed for GOST support" "$LINENO" 5 ;;
21797esac
21798fi
21799
21800	ac_fn_c_check_func "$LINENO" "EC_KEY_new" "ac_cv_func_EC_KEY_new"
21801if test "x$ac_cv_func_EC_KEY_new" = xyes
21802then :
21803
21804else case e in #(
21805  e) as_fn_error $? "OpenSSL does not support ECC, needed for GOST support" "$LINENO" 5 ;;
21806esac
21807fi
21808
21809
21810{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if GOST works" >&5
21811printf %s "checking if GOST works... " >&6; }
21812if test c${cross_compiling} = cno; then
21813BAKCFLAGS="$CFLAGS"
21814if test -n "$ssldir"; then
21815	CFLAGS="$CFLAGS -Wl,-rpath,$ssldir_lib"
21816fi
21817if test "$cross_compiling" = yes
21818then :
21819  eval "ac_cv_c_gost_works=maybe"
21820else case e in #(
21821  e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21822/* end confdefs.h.  */
21823
21824#include <string.h>
21825#include <openssl/ssl.h>
21826#include <openssl/evp.h>
21827#include <openssl/engine.h>
21828#include <openssl/conf.h>
21829/* routine to load gost (from sldns) */
21830int load_gost_id(void)
21831{
21832	static int gost_id = 0;
21833	const EVP_PKEY_ASN1_METHOD* meth;
21834	ENGINE* e;
21835
21836	if(gost_id) return gost_id;
21837
21838	/* see if configuration loaded gost implementation from other engine*/
21839	meth = EVP_PKEY_asn1_find_str(NULL, "gost2001", -1);
21840	if(meth) {
21841		EVP_PKEY_asn1_get0_info(&gost_id, NULL, NULL, NULL, NULL, meth);
21842		return gost_id;
21843	}
21844
21845	/* see if engine can be loaded already */
21846	e = ENGINE_by_id("gost");
21847	if(!e) {
21848		/* load it ourself, in case statically linked */
21849		ENGINE_load_builtin_engines();
21850		ENGINE_load_dynamic();
21851		e = ENGINE_by_id("gost");
21852	}
21853	if(!e) {
21854		/* no gost engine in openssl */
21855		return 0;
21856	}
21857	if(!ENGINE_set_default(e, ENGINE_METHOD_ALL)) {
21858		ENGINE_finish(e);
21859		ENGINE_free(e);
21860		return 0;
21861	}
21862
21863	meth = EVP_PKEY_asn1_find_str(&e, "gost2001", -1);
21864	if(!meth) {
21865		/* algo not found */
21866		ENGINE_finish(e);
21867		ENGINE_free(e);
21868		return 0;
21869	}
21870	EVP_PKEY_asn1_get0_info(&gost_id, NULL, NULL, NULL, NULL, meth);
21871	return gost_id;
21872}
21873int main(void) {
21874	EVP_MD_CTX* ctx;
21875	const EVP_MD* md;
21876	unsigned char digest[64]; /* its a 256-bit digest, so uses 32 bytes */
21877	const char* str = "Hello world";
21878	const unsigned char check[] = {
21879		0x40 , 0xed , 0xf8 , 0x56 , 0x5a , 0xc5 , 0x36 , 0xe1 ,
21880		0x33 , 0x7c , 0x7e , 0x87 , 0x62 , 0x1c , 0x42 , 0xe0 ,
21881		0x17 , 0x1b , 0x5e , 0xce , 0xa8 , 0x46 , 0x65 , 0x4d ,
21882		0x8d , 0x3e , 0x22 , 0x9b , 0xe1 , 0x30 , 0x19 , 0x9d
21883	};
21884	OPENSSL_config(NULL);
21885	(void)load_gost_id();
21886	md = EVP_get_digestbyname("md_gost94");
21887	if(!md) return 1;
21888	memset(digest, 0, sizeof(digest));
21889	ctx = EVP_MD_CTX_create();
21890	if(!ctx) return 2;
21891	if(!EVP_DigestInit_ex(ctx, md, NULL)) return 3;
21892	if(!EVP_DigestUpdate(ctx, str, 10)) return 4;
21893	if(!EVP_DigestFinal_ex(ctx, digest, NULL)) return 5;
21894	/* uncomment to see the hash calculated.
21895		{int i;
21896		for(i=0; i<32; i++)
21897			printf(" %2.2x", (int)digest[i]);
21898		printf("\n");}
21899	*/
21900	if(memcmp(digest, check, sizeof(check)) != 0)
21901		return 6;
21902	return 0;
21903}
21904
21905_ACEOF
21906if ac_fn_c_try_run "$LINENO"
21907then :
21908  eval "ac_cv_c_gost_works=yes"
21909else case e in #(
21910  e) eval "ac_cv_c_gost_works=no" ;;
21911esac
21912fi
21913rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21914  conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
21915esac
21916fi
21917
21918CFLAGS="$BAKCFLAGS"
21919else
21920eval "ac_cv_c_gost_works=maybe"
21921fi
21922{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_gost_works" >&5
21923printf "%s\n" "$ac_cv_c_gost_works" >&6; }
21924
21925	if test "$ac_cv_c_gost_works" != no; then
21926		use_gost="yes"
21927
21928printf "%s\n" "#define USE_GOST 1" >>confdefs.h
21929
21930	fi
21931	;;
21932esac
21933fi
21934# Check whether --enable-ecdsa was given.
21935if test ${enable_ecdsa+y}
21936then :
21937  enableval=$enable_ecdsa;
21938fi
21939
21940use_ecdsa="no"
21941case "$enable_ecdsa" in
21942    no)
21943      ;;
21944    *)
21945      if test $USE_NSS = "no" -a $USE_NETTLE = "no"; then
21946	      ac_fn_c_check_func "$LINENO" "EVP_PKEY_fromdata" "ac_cv_func_EVP_PKEY_fromdata"
21947if test "x$ac_cv_func_EVP_PKEY_fromdata" = xyes
21948then :
21949
21950	          # with EVP_PKEY_fromdata, check if EC is not disabled
21951	          ac_fn_check_decl "$LINENO" "OPENSSL_NO_EC" "ac_cv_have_decl_OPENSSL_NO_EC" "$ac_includes_default
21952#include <openssl/evp.h>
21953
21954" "$ac_c_undeclared_builtin_options" "CFLAGS"
21955if test "x$ac_cv_have_decl_OPENSSL_NO_EC" = xyes
21956then :
21957  as_fn_error $? "OpenSSL does not support ECDSA: please upgrade or rerun with --disable-ecdsa" "$LINENO" 5
21958
21959fi
21960
21961else case e in #(
21962  e)
21963		  # without EVP_PKEY_fromdata, older openssl, check for support
21964		  ac_fn_c_check_func "$LINENO" "ECDSA_sign" "ac_cv_func_ECDSA_sign"
21965if test "x$ac_cv_func_ECDSA_sign" = xyes
21966then :
21967
21968else case e in #(
21969  e) as_fn_error $? "OpenSSL does not support ECDSA: please upgrade or rerun with --disable-ecdsa" "$LINENO" 5 ;;
21970esac
21971fi
21972
21973		  ac_fn_c_check_func "$LINENO" "SHA384_Init" "ac_cv_func_SHA384_Init"
21974if test "x$ac_cv_func_SHA384_Init" = xyes
21975then :
21976
21977else case e in #(
21978  e) as_fn_error $? "OpenSSL does not support SHA384: please upgrade or rerun with --disable-ecdsa" "$LINENO" 5 ;;
21979esac
21980fi
21981
21982		 ;;
21983esac
21984fi
21985
21986	      ac_fn_check_decl "$LINENO" "NID_X9_62_prime256v1" "ac_cv_have_decl_NID_X9_62_prime256v1" "$ac_includes_default
21987#include <openssl/evp.h>
21988
21989" "$ac_c_undeclared_builtin_options" "CFLAGS"
21990if test "x$ac_cv_have_decl_NID_X9_62_prime256v1" = xyes
21991then :
21992  ac_have_decl=1
21993else case e in #(
21994  e) ac_have_decl=0 ;;
21995esac
21996fi
21997printf "%s\n" "#define HAVE_DECL_NID_X9_62_PRIME256V1 $ac_have_decl" >>confdefs.h
21998if test $ac_have_decl = 1
21999then :
22000
22001else case e in #(
22002  e) as_fn_error $? "OpenSSL does not support the ECDSA curves: please upgrade or rerun with --disable-ecdsa" "$LINENO" 5 ;;
22003esac
22004fi
22005ac_fn_check_decl "$LINENO" "NID_secp384r1" "ac_cv_have_decl_NID_secp384r1" "$ac_includes_default
22006#include <openssl/evp.h>
22007
22008" "$ac_c_undeclared_builtin_options" "CFLAGS"
22009if test "x$ac_cv_have_decl_NID_secp384r1" = xyes
22010then :
22011  ac_have_decl=1
22012else case e in #(
22013  e) ac_have_decl=0 ;;
22014esac
22015fi
22016printf "%s\n" "#define HAVE_DECL_NID_SECP384R1 $ac_have_decl" >>confdefs.h
22017if test $ac_have_decl = 1
22018then :
22019
22020else case e in #(
22021  e) as_fn_error $? "OpenSSL does not support the ECDSA curves: please upgrade or rerun with --disable-ecdsa" "$LINENO" 5 ;;
22022esac
22023fi
22024
22025	      # see if OPENSSL 1.0.0 or later (has EVP MD and Verify independency)
22026	      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if openssl supports SHA2 and ECDSA with EVP" >&5
22027printf %s "checking if openssl supports SHA2 and ECDSA with EVP... " >&6; }
22028	      if grep OPENSSL_VERSION_TEXT $ssldir_include/openssl/opensslv.h | grep "OpenSSL" >/dev/null; then
22029		if grep OPENSSL_VERSION_NUMBER $ssldir_include/openssl/opensslv.h | grep 0x0 >/dev/null; then
22030		  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
22031printf "%s\n" "no" >&6; }
22032
22033printf "%s\n" "#define USE_ECDSA_EVP_WORKAROUND 1" >>confdefs.h
22034
22035		else
22036		  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
22037printf "%s\n" "yes" >&6; }
22038		fi
22039	      else
22040		# not OpenSSL, thus likely LibreSSL, which supports it
22041		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
22042printf "%s\n" "yes" >&6; }
22043	      fi
22044      fi
22045      # we now know we have ECDSA and the required curves.
22046
22047printf "%s\n" "#define USE_ECDSA 1" >>confdefs.h
22048
22049      use_ecdsa="yes"
22050      ;;
22051esac
22052
22053# Check whether --enable-dsa was given.
22054if test ${enable_dsa+y}
22055then :
22056  enableval=$enable_dsa;
22057fi
22058
22059use_dsa="no"
22060case "$enable_dsa" in
22061    yes)
22062      # detect if DSA is supported, and turn it off if not.
22063      if test $USE_NSS = "no" -a $USE_NETTLE = "no"; then
22064      ac_fn_c_check_func "$LINENO" "DSA_SIG_new" "ac_cv_func_DSA_SIG_new"
22065if test "x$ac_cv_func_DSA_SIG_new" = xyes
22066then :
22067
22068      as_ac_Type=`printf "%s\n" "ac_cv_type_DSA_SIG*" | sed "$as_sed_sh"`
22069ac_fn_c_check_type "$LINENO" "DSA_SIG*" "$as_ac_Type" "
22070$ac_includes_default
22071#ifdef HAVE_OPENSSL_ERR_H
22072#include <openssl/err.h>
22073#endif
22074
22075#ifdef HAVE_OPENSSL_RAND_H
22076#include <openssl/rand.h>
22077#endif
22078
22079#ifdef HAVE_OPENSSL_CONF_H
22080#include <openssl/conf.h>
22081#endif
22082
22083#ifdef HAVE_OPENSSL_ENGINE_H
22084#include <openssl/engine.h>
22085#endif
22086
22087"
22088if eval test \"x\$"$as_ac_Type"\" = x"yes"
22089then :
22090
22091
22092printf "%s\n" "#define USE_DSA 1" >>confdefs.h
22093
22094
22095else case e in #(
22096  e) if test "x$enable_dsa" = "xyes"; then as_fn_error $? "OpenSSL does not support DSA and you used --enable-dsa." "$LINENO" 5
22097               fi  ;;
22098esac
22099fi
22100
22101
22102else case e in #(
22103  e) if test "x$enable_dsa" = "xyes"; then as_fn_error $? "OpenSSL does not support DSA and you used --enable-dsa." "$LINENO" 5
22104               fi  ;;
22105esac
22106fi
22107
22108      else
22109
22110printf "%s\n" "#define USE_DSA 1" >>confdefs.h
22111
22112      fi
22113      ;;
22114    *)
22115      # disable dsa by default, RFC 8624 section 3.1, validators MUST NOT
22116      # support DSA for DNSSEC Validation.
22117      ;;
22118esac
22119
22120
22121# Check whether --with-deprecate-rsa-1024 was given.
22122if test ${with_deprecate_rsa_1024+y}
22123then :
22124  withval=$with_deprecate_rsa_1024;
22125fi
22126
22127if test "$with_deprecate_rsa_1024" = "yes"; then
22128
22129printf "%s\n" "#define DEPRECATE_RSA_1024 1" >>confdefs.h
22130
22131fi
22132
22133# Check whether --enable-ed25519 was given.
22134if test ${enable_ed25519+y}
22135then :
22136  enableval=$enable_ed25519;
22137fi
22138
22139use_ed25519="no"
22140case "$enable_ed25519" in
22141    no)
22142      ;;
22143    *)
22144      if test $USE_NSS = "no" -a $USE_NETTLE = "no"; then
22145	      ac_fn_check_decl "$LINENO" "NID_ED25519" "ac_cv_have_decl_NID_ED25519" "$ac_includes_default
22146#include <openssl/evp.h>
22147
22148" "$ac_c_undeclared_builtin_options" "CFLAGS"
22149if test "x$ac_cv_have_decl_NID_ED25519" = xyes
22150then :
22151  ac_have_decl=1
22152else case e in #(
22153  e) ac_have_decl=0 ;;
22154esac
22155fi
22156printf "%s\n" "#define HAVE_DECL_NID_ED25519 $ac_have_decl" >>confdefs.h
22157if test $ac_have_decl = 1
22158then :
22159
22160      		use_ed25519="yes"
22161
22162else case e in #(
22163  e)  if test "x$enable_ed25519" = "xyes"; then as_fn_error $? "OpenSSL does not support ED25519 and you used --enable-ed25519." "$LINENO" 5
22164	      	fi  ;;
22165esac
22166fi
22167
22168      fi
22169      if test $USE_NETTLE = "yes"; then
22170		       for ac_header in nettle/eddsa.h
22171do :
22172  ac_fn_c_check_header_compile "$LINENO" "nettle/eddsa.h" "ac_cv_header_nettle_eddsa_h" "$ac_includes_default
22173"
22174if test "x$ac_cv_header_nettle_eddsa_h" = xyes
22175then :
22176  printf "%s\n" "#define HAVE_NETTLE_EDDSA_H 1" >>confdefs.h
22177 use_ed25519="yes"
22178fi
22179
22180done
22181      fi
22182      if test $use_ed25519 = "yes"; then
22183
22184printf "%s\n" "#define USE_ED25519 1" >>confdefs.h
22185
22186      fi
22187      ;;
22188esac
22189
22190# Check whether --enable-ed448 was given.
22191if test ${enable_ed448+y}
22192then :
22193  enableval=$enable_ed448;
22194fi
22195
22196use_ed448="no"
22197case "$enable_ed448" in
22198    no)
22199      ;;
22200    *)
22201      if test $USE_NSS = "no" -a $USE_NETTLE = "no"; then
22202	      ac_fn_check_decl "$LINENO" "NID_ED448" "ac_cv_have_decl_NID_ED448" "$ac_includes_default
22203#include <openssl/evp.h>
22204
22205" "$ac_c_undeclared_builtin_options" "CFLAGS"
22206if test "x$ac_cv_have_decl_NID_ED448" = xyes
22207then :
22208  ac_have_decl=1
22209else case e in #(
22210  e) ac_have_decl=0 ;;
22211esac
22212fi
22213printf "%s\n" "#define HAVE_DECL_NID_ED448 $ac_have_decl" >>confdefs.h
22214if test $ac_have_decl = 1
22215then :
22216
22217      		use_ed448="yes"
22218
22219else case e in #(
22220  e)  if test "x$enable_ed448" = "xyes"; then as_fn_error $? "OpenSSL does not support ED448 and you used --enable-ed448." "$LINENO" 5
22221	      	fi  ;;
22222esac
22223fi
22224
22225      fi
22226      if test $use_ed448 = "yes"; then
22227
22228printf "%s\n" "#define USE_ED448 1" >>confdefs.h
22229
22230      fi
22231      ;;
22232esac
22233
22234# Check whether --enable-event-api was given.
22235if test ${enable_event_api+y}
22236then :
22237  enableval=$enable_event_api;
22238fi
22239
22240case "$enable_event_api" in
22241    yes)
22242      UNBOUND_EVENT_INSTALL=unbound-event-install
22243
22244      UNBOUND_EVENT_UNINSTALL=unbound-event-uninstall
22245
22246      ;;
22247    *)
22248      ;;
22249esac
22250
22251# Check whether --enable-tfo-client was given.
22252if test ${enable_tfo_client+y}
22253then :
22254  enableval=$enable_tfo_client;
22255fi
22256
22257case "$enable_tfo_client" in
22258	yes)
22259		case "$host_os" in
22260			linux*) ac_fn_check_decl "$LINENO" "MSG_FASTOPEN" "ac_cv_have_decl_MSG_FASTOPEN" "$ac_includes_default
22261#include <netinet/tcp.h>
22262
22263" "$ac_c_undeclared_builtin_options" "CFLAGS"
22264if test "x$ac_cv_have_decl_MSG_FASTOPEN" = xyes
22265then :
22266  { 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
22267printf "%s\n" "$as_me: WARNING: Check the platform specific TFO kernel parameters are correctly configured to support client mode TFO" >&2;}
22268else case e in #(
22269  e) as_fn_error $? "TCP Fast Open is not available for client mode: please rerun without --enable-tfo-client" "$LINENO" 5 ;;
22270esac
22271fi
22272
22273printf "%s\n" "#define USE_MSG_FASTOPEN 1" >>confdefs.h
22274
22275				;;
22276			darwin*) ac_fn_check_decl "$LINENO" "CONNECT_RESUME_ON_READ_WRITE" "ac_cv_have_decl_CONNECT_RESUME_ON_READ_WRITE" "$ac_includes_default
22277#include <sys/socket.h>
22278
22279" "$ac_c_undeclared_builtin_options" "CFLAGS"
22280if test "x$ac_cv_have_decl_CONNECT_RESUME_ON_READ_WRITE" = xyes
22281then :
22282  { 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
22283printf "%s\n" "$as_me: WARNING: Check the platform specific TFO kernel parameters are correctly configured to support client mode TFO" >&2;}
22284else case e in #(
22285  e) as_fn_error $? "TCP Fast Open is not available for client mode: please rerun without --enable-tfo-client" "$LINENO" 5 ;;
22286esac
22287fi
22288
22289printf "%s\n" "#define USE_OSX_MSG_FASTOPEN 1" >>confdefs.h
22290
22291				;;
22292		esac
22293		;;
22294	no|*)
22295		;;
22296esac
22297
22298# Check whether --enable-tfo-server was given.
22299if test ${enable_tfo_server+y}
22300then :
22301  enableval=$enable_tfo_server;
22302fi
22303
22304case "$enable_tfo_server" in
22305	yes)
22306	      ac_fn_check_decl "$LINENO" "TCP_FASTOPEN" "ac_cv_have_decl_TCP_FASTOPEN" "$ac_includes_default
22307#include <netinet/tcp.h>
22308
22309" "$ac_c_undeclared_builtin_options" "CFLAGS"
22310if test "x$ac_cv_have_decl_TCP_FASTOPEN" = xyes
22311then :
22312  { 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
22313printf "%s\n" "$as_me: WARNING: Check the platform specific TFO kernel parameters are correctly configured to support server mode TFO" >&2;}
22314else case e in #(
22315  e) as_fn_error $? "TCP Fast Open is not available for server mode: please rerun without --enable-tfo-server" "$LINENO" 5 ;;
22316esac
22317fi
22318
22319printf "%s\n" "#define USE_TCP_FASTOPEN 1" >>confdefs.h
22320
22321		;;
22322	no|*)
22323		;;
22324esac
22325
22326# check for libevent
22327
22328# Check whether --with-libevent was given.
22329if test ${with_libevent+y}
22330then :
22331  withval=$with_libevent;
22332else case e in #(
22333  e)  with_libevent="no"  ;;
22334esac
22335fi
22336
22337if test "x_$with_libevent" != x_no; then
22338
22339printf "%s\n" "#define USE_LIBEVENT 1" >>confdefs.h
22340
22341        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libevent" >&5
22342printf %s "checking for libevent... " >&6; }
22343        if test "x_$with_libevent" = x_ -o "x_$with_libevent" = x_yes; then
22344            with_libevent="/usr/local /opt/local /usr/lib /usr/pkg /usr/sfw /usr"
22345        fi
22346        for dir in $with_libevent; do
22347            thedir="$dir"
22348            if test -f "$dir/include/event.h" -o -f "$dir/include/event2/event.h"; then
22349                found_libevent="yes"
22350								if test "$thedir" != "/usr"; then
22351				    CPPFLAGS="$CPPFLAGS -I$thedir/include"
22352				fi
22353				break;
22354		    fi
22355        done
22356        if test x_$found_libevent != x_yes; then
22357		if test -f "$dir/event.h" -a \( -f "$dir/libevent.la" -o -f "$dir/libev.la" \) ; then
22358			# libevent source directory
22359			{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: found in $thedir" >&5
22360printf "%s\n" "found in $thedir" >&6; }
22361			CPPFLAGS="$CPPFLAGS -I$thedir -I$thedir/include"
22362			BAK_LDFLAGS_SET="1"
22363			BAK_LDFLAGS="$LDFLAGS"
22364			# remove evdns from linking
22365			mkdir build >/dev/null 2>&1
22366			mkdir build/libevent >/dev/null 2>&1
22367			mkdir build/libevent/.libs >/dev/null 2>&1
22368			ev_files_o=`ls $thedir/*.o | grep -v evdns\.o | grep -v bufferevent_openssl\.o`
22369			ev_files_lo=`ls $thedir/*.lo | grep -v evdns\.lo | grep -v bufferevent_openssl\.lo`
22370			ev_files_libso=`ls $thedir/.libs/*.o | grep -v evdns\.o | grep -v bufferevent_openssl\.o`
22371			cp $ev_files_o build/libevent
22372			cp $ev_files_lo build/libevent
22373			cp $ev_files_libso build/libevent/.libs
22374			LATE_LDFLAGS="build/libevent/*.lo -lm"
22375			LDFLAGS="build/libevent/*.o $LDFLAGS -lm"
22376		else
22377            as_fn_error $? "Cannot find the libevent library in $with_libevent
22378You can restart ./configure --with-libevent=no to use a builtin alternative.
22379Please note that this alternative is not as capable as libevent when using
22380large outgoing port ranges.  " "$LINENO" 5
22381		fi
22382        else
22383            { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: found in $thedir" >&5
22384printf "%s\n" "found in $thedir" >&6; }
22385	    	    if test ! -f $thedir/lib/libevent.a -a ! -f $thedir/lib/libevent.so -a -d "$thedir/lib/event2"; then
22386		    LDFLAGS="$LDFLAGS -L$thedir/lib/event2"
22387
22388	if test "x$enable_rpath" = xyes; then
22389		if echo "$thedir/lib/event2" | grep "^/" >/dev/null; then
22390			RUNTIME_PATH="$RUNTIME_PATH -R$thedir/lib/event2"
22391		fi
22392	fi
22393
22394	    else
22395		    		    if test "$thedir" != "/usr" -a "$thedir" != ""; then
22396			LDFLAGS="$LDFLAGS -L$thedir/lib"
22397
22398	if test "x$enable_rpath" = xyes; then
22399		if echo "$thedir/lib" | grep "^/" >/dev/null; then
22400			RUNTIME_PATH="$RUNTIME_PATH -R$thedir/lib"
22401		fi
22402	fi
22403
22404		    fi
22405	    fi
22406        fi
22407	# check for library used by libevent after 1.3c
22408	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5
22409printf %s "checking for library containing clock_gettime... " >&6; }
22410if test ${ac_cv_search_clock_gettime+y}
22411then :
22412  printf %s "(cached) " >&6
22413else case e in #(
22414  e) ac_func_search_save_LIBS=$LIBS
22415cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22416/* end confdefs.h.  */
22417
22418/* Override any GCC internal prototype to avoid an error.
22419   Use char because int might match the return type of a GCC
22420   builtin and then its argument prototype would still apply.
22421   The 'extern "C"' is for builds by C++ compilers;
22422   although this is not generally supported in C code supporting it here
22423   has little cost and some practical benefit (sr 110532).  */
22424#ifdef __cplusplus
22425extern "C"
22426#endif
22427char clock_gettime (void);
22428int
22429main (void)
22430{
22431return clock_gettime ();
22432  ;
22433  return 0;
22434}
22435_ACEOF
22436for ac_lib in '' rt
22437do
22438  if test -z "$ac_lib"; then
22439    ac_res="none required"
22440  else
22441    ac_res=-l$ac_lib
22442    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
22443  fi
22444  if ac_fn_c_try_link "$LINENO"
22445then :
22446  ac_cv_search_clock_gettime=$ac_res
22447fi
22448rm -f core conftest.err conftest.$ac_objext conftest.beam \
22449    conftest$ac_exeext
22450  if test ${ac_cv_search_clock_gettime+y}
22451then :
22452  break
22453fi
22454done
22455if test ${ac_cv_search_clock_gettime+y}
22456then :
22457
22458else case e in #(
22459  e) ac_cv_search_clock_gettime=no ;;
22460esac
22461fi
22462rm conftest.$ac_ext
22463LIBS=$ac_func_search_save_LIBS ;;
22464esac
22465fi
22466{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5
22467printf "%s\n" "$ac_cv_search_clock_gettime" >&6; }
22468ac_res=$ac_cv_search_clock_gettime
22469if test "$ac_res" != no
22470then :
22471  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
22472
22473fi
22474
22475
22476	# is the event.h header libev or libevent?
22477	ac_fn_c_check_header_compile "$LINENO" "event.h" "ac_cv_header_event_h" "$ac_includes_default
22478"
22479if test "x$ac_cv_header_event_h" = xyes
22480then :
22481  printf "%s\n" "#define HAVE_EVENT_H 1" >>confdefs.h
22482
22483fi
22484
22485	ac_fn_check_decl "$LINENO" "EV_VERSION_MAJOR" "ac_cv_have_decl_EV_VERSION_MAJOR" "$ac_includes_default
22486#include <event.h>
22487
22488" "$ac_c_undeclared_builtin_options" "CFLAGS"
22489if test "x$ac_cv_have_decl_EV_VERSION_MAJOR" = xyes
22490then :
22491
22492		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing event_set" >&5
22493printf %s "checking for library containing event_set... " >&6; }
22494if test ${ac_cv_search_event_set+y}
22495then :
22496  printf %s "(cached) " >&6
22497else case e in #(
22498  e) ac_func_search_save_LIBS=$LIBS
22499cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22500/* end confdefs.h.  */
22501
22502/* Override any GCC internal prototype to avoid an error.
22503   Use char because int might match the return type of a GCC
22504   builtin and then its argument prototype would still apply.
22505   The 'extern "C"' is for builds by C++ compilers;
22506   although this is not generally supported in C code supporting it here
22507   has little cost and some practical benefit (sr 110532).  */
22508#ifdef __cplusplus
22509extern "C"
22510#endif
22511char event_set (void);
22512int
22513main (void)
22514{
22515return event_set ();
22516  ;
22517  return 0;
22518}
22519_ACEOF
22520for ac_lib in '' ev
22521do
22522  if test -z "$ac_lib"; then
22523    ac_res="none required"
22524  else
22525    ac_res=-l$ac_lib
22526    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
22527  fi
22528  if ac_fn_c_try_link "$LINENO"
22529then :
22530  ac_cv_search_event_set=$ac_res
22531fi
22532rm -f core conftest.err conftest.$ac_objext conftest.beam \
22533    conftest$ac_exeext
22534  if test ${ac_cv_search_event_set+y}
22535then :
22536  break
22537fi
22538done
22539if test ${ac_cv_search_event_set+y}
22540then :
22541
22542else case e in #(
22543  e) ac_cv_search_event_set=no ;;
22544esac
22545fi
22546rm conftest.$ac_ext
22547LIBS=$ac_func_search_save_LIBS ;;
22548esac
22549fi
22550{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_event_set" >&5
22551printf "%s\n" "$ac_cv_search_event_set" >&6; }
22552ac_res=$ac_cv_search_event_set
22553if test "$ac_res" != no
22554then :
22555  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
22556
22557fi
22558
22559
22560else case e in #(
22561  e)
22562		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing event_set" >&5
22563printf %s "checking for library containing event_set... " >&6; }
22564if test ${ac_cv_search_event_set+y}
22565then :
22566  printf %s "(cached) " >&6
22567else case e in #(
22568  e) ac_func_search_save_LIBS=$LIBS
22569cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22570/* end confdefs.h.  */
22571
22572/* Override any GCC internal prototype to avoid an error.
22573   Use char because int might match the return type of a GCC
22574   builtin and then its argument prototype would still apply.
22575   The 'extern "C"' is for builds by C++ compilers;
22576   although this is not generally supported in C code supporting it here
22577   has little cost and some practical benefit (sr 110532).  */
22578#ifdef __cplusplus
22579extern "C"
22580#endif
22581char event_set (void);
22582int
22583main (void)
22584{
22585return event_set ();
22586  ;
22587  return 0;
22588}
22589_ACEOF
22590for ac_lib in '' event
22591do
22592  if test -z "$ac_lib"; then
22593    ac_res="none required"
22594  else
22595    ac_res=-l$ac_lib
22596    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
22597  fi
22598  if ac_fn_c_try_link "$LINENO"
22599then :
22600  ac_cv_search_event_set=$ac_res
22601fi
22602rm -f core conftest.err conftest.$ac_objext conftest.beam \
22603    conftest$ac_exeext
22604  if test ${ac_cv_search_event_set+y}
22605then :
22606  break
22607fi
22608done
22609if test ${ac_cv_search_event_set+y}
22610then :
22611
22612else case e in #(
22613  e) ac_cv_search_event_set=no ;;
22614esac
22615fi
22616rm conftest.$ac_ext
22617LIBS=$ac_func_search_save_LIBS ;;
22618esac
22619fi
22620{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_event_set" >&5
22621printf "%s\n" "$ac_cv_search_event_set" >&6; }
22622ac_res=$ac_cv_search_event_set
22623if test "$ac_res" != no
22624then :
22625  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
22626
22627fi
22628
22629	 ;;
22630esac
22631fi
22632	ac_fn_c_check_func "$LINENO" "event_base_free" "ac_cv_func_event_base_free"
22633if test "x$ac_cv_func_event_base_free" = xyes
22634then :
22635  printf "%s\n" "#define HAVE_EVENT_BASE_FREE 1" >>confdefs.h
22636
22637fi
22638 # only in libevent 1.2 and later
22639	ac_fn_c_check_func "$LINENO" "event_base_once" "ac_cv_func_event_base_once"
22640if test "x$ac_cv_func_event_base_once" = xyes
22641then :
22642  printf "%s\n" "#define HAVE_EVENT_BASE_ONCE 1" >>confdefs.h
22643
22644fi
22645 # only in libevent 1.4.1 and later
22646	ac_fn_c_check_func "$LINENO" "event_base_new" "ac_cv_func_event_base_new"
22647if test "x$ac_cv_func_event_base_new" = xyes
22648then :
22649  printf "%s\n" "#define HAVE_EVENT_BASE_NEW 1" >>confdefs.h
22650
22651fi
22652 # only in libevent 1.4.1 and later
22653	ac_fn_c_check_func "$LINENO" "event_base_get_method" "ac_cv_func_event_base_get_method"
22654if test "x$ac_cv_func_event_base_get_method" = xyes
22655then :
22656  printf "%s\n" "#define HAVE_EVENT_BASE_GET_METHOD 1" >>confdefs.h
22657
22658fi
22659 # only in libevent 1.4.3 and later
22660	ac_fn_c_check_func "$LINENO" "ev_loop" "ac_cv_func_ev_loop"
22661if test "x$ac_cv_func_ev_loop" = xyes
22662then :
22663  printf "%s\n" "#define HAVE_EV_LOOP 1" >>confdefs.h
22664
22665fi
22666 # only in libev. (tested on 3.51)
22667	ac_fn_c_check_func "$LINENO" "ev_default_loop" "ac_cv_func_ev_default_loop"
22668if test "x$ac_cv_func_ev_default_loop" = xyes
22669then :
22670  printf "%s\n" "#define HAVE_EV_DEFAULT_LOOP 1" >>confdefs.h
22671
22672fi
22673 # only in libev. (tested on 4.00)
22674	ac_fn_c_check_func "$LINENO" "event_assign" "ac_cv_func_event_assign"
22675if test "x$ac_cv_func_event_assign" = xyes
22676then :
22677  printf "%s\n" "#define HAVE_EVENT_ASSIGN 1" >>confdefs.h
22678
22679fi
22680 # in libevent, for thread-safety
22681	ac_fn_check_decl "$LINENO" "evsignal_assign" "ac_cv_have_decl_evsignal_assign" "$ac_includes_default
22682#ifdef HAVE_EVENT_H
22683#  include <event.h>
22684#else
22685#  include \"event2/event.h\"
22686#endif
22687
22688" "$ac_c_undeclared_builtin_options" "CFLAGS"
22689if test "x$ac_cv_have_decl_evsignal_assign" = xyes
22690then :
22691  ac_have_decl=1
22692else case e in #(
22693  e) ac_have_decl=0 ;;
22694esac
22695fi
22696printf "%s\n" "#define HAVE_DECL_EVSIGNAL_ASSIGN $ac_have_decl" >>confdefs.h
22697
22698        PC_LIBEVENT_DEPENDENCY="libevent"
22699
22700	if test -n "$BAK_LDFLAGS_SET"; then
22701		LDFLAGS="$BAK_LDFLAGS"
22702	fi
22703else
22704
22705printf "%s\n" "#define USE_MINI_EVENT 1" >>confdefs.h
22706
22707fi
22708
22709# check for libexpat
22710
22711# Check whether --with-libexpat was given.
22712if test ${with_libexpat+y}
22713then :
22714  withval=$with_libexpat;
22715else case e in #(
22716  e)  withval="/usr/local /opt/local /usr/lib /usr/pkg /usr/sfw /usr"  ;;
22717esac
22718fi
22719
22720{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libexpat" >&5
22721printf %s "checking for libexpat... " >&6; }
22722found_libexpat="no"
22723for dir in $withval ; do
22724            if test -f "$dir/include/expat.h"; then
22725		found_libexpat="yes"
22726				if test "$dir" != "/usr"; then
22727                    CPPFLAGS="$CPPFLAGS -I$dir/include"
22728		    LDFLAGS="$LDFLAGS -L$dir/lib"
22729		fi
22730            	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: found in $dir" >&5
22731printf "%s\n" "found in $dir" >&6; }
22732                break;
22733            fi
22734done
22735if test x_$found_libexpat != x_yes; then
22736	as_fn_error $? "Could not find libexpat, expat.h" "$LINENO" 5
22737fi
22738ac_fn_c_check_header_compile "$LINENO" "expat.h" "ac_cv_header_expat_h" "$ac_includes_default
22739"
22740if test "x$ac_cv_header_expat_h" = xyes
22741then :
22742  printf "%s\n" "#define HAVE_EXPAT_H 1" >>confdefs.h
22743
22744fi
22745
22746ac_fn_check_decl "$LINENO" "XML_StopParser" "ac_cv_have_decl_XML_StopParser" "$ac_includes_default
22747#include <expat.h>
22748
22749" "$ac_c_undeclared_builtin_options" "CFLAGS"
22750if test "x$ac_cv_have_decl_XML_StopParser" = xyes
22751then :
22752  ac_have_decl=1
22753else case e in #(
22754  e) ac_have_decl=0 ;;
22755esac
22756fi
22757printf "%s\n" "#define HAVE_DECL_XML_STOPPARSER $ac_have_decl" >>confdefs.h
22758
22759
22760# hiredis (redis C client for cachedb)
22761
22762# Check whether --with-libhiredis was given.
22763if test ${with_libhiredis+y}
22764then :
22765  withval=$with_libhiredis;
22766else case e in #(
22767  e)  withval="no"  ;;
22768esac
22769fi
22770
22771found_libhiredis="no"
22772if test x_$withval = x_yes -o x_$withval != x_no; then
22773   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libhiredis" >&5
22774printf %s "checking for libhiredis... " >&6; }
22775   if test x_$withval = x_ -o x_$withval = x_yes; then
22776            withval="/usr/local /opt/local /usr/lib /usr/pkg /usr/sfw /usr"
22777   fi
22778   for dir in $withval ; do
22779            if test -f "$dir/include/hiredis/hiredis.h"; then
22780		found_libhiredis="yes"
22781				if test "$dir" != "/usr"; then
22782                    CPPFLAGS="$CPPFLAGS -I$dir/include"
22783		    LDFLAGS="$LDFLAGS -L$dir/lib"
22784		fi
22785		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: found in $dir" >&5
22786printf "%s\n" "found in $dir" >&6; }
22787
22788printf "%s\n" "#define USE_REDIS 1" >>confdefs.h
22789
22790		LIBS="$LIBS -lhiredis"
22791                break;
22792            fi
22793    done
22794    if test x_$found_libhiredis != x_yes; then
22795	as_fn_error $? "Could not find libhiredis, hiredis.h" "$LINENO" 5
22796    fi
22797    ac_fn_c_check_header_compile "$LINENO" "hiredis/hiredis.h" "ac_cv_header_hiredis_hiredis_h" "$ac_includes_default
22798"
22799if test "x$ac_cv_header_hiredis_hiredis_h" = xyes
22800then :
22801  printf "%s\n" "#define HAVE_HIREDIS_HIREDIS_H 1" >>confdefs.h
22802
22803fi
22804
22805    ac_fn_check_decl "$LINENO" "redisConnect" "ac_cv_have_decl_redisConnect" "$ac_includes_default
22806    #include <hiredis/hiredis.h>
22807
22808" "$ac_c_undeclared_builtin_options" "CFLAGS"
22809if test "x$ac_cv_have_decl_redisConnect" = xyes
22810then :
22811  ac_have_decl=1
22812else case e in #(
22813  e) ac_have_decl=0 ;;
22814esac
22815fi
22816printf "%s\n" "#define HAVE_DECL_REDISCONNECT $ac_have_decl" >>confdefs.h
22817
22818fi
22819
22820# nghttp2
22821
22822# Check whether --with-libnghttp2 was given.
22823if test ${with_libnghttp2+y}
22824then :
22825  withval=$with_libnghttp2;
22826else case e in #(
22827  e)  withval="no"  ;;
22828esac
22829fi
22830
22831found_libnghttp2="no"
22832if test x_$withval = x_yes -o x_$withval != x_no; then
22833   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libnghttp2" >&5
22834printf %s "checking for libnghttp2... " >&6; }
22835   if test x_$withval = x_ -o x_$withval = x_yes; then
22836            withval="/usr/local /opt/local /usr/lib /usr/pkg /usr/sfw /usr"
22837   fi
22838   for dir in $withval ; do
22839            if test -f "$dir/include/nghttp2/nghttp2.h"; then
22840		found_libnghttp2="yes"
22841				if test "$dir" != "/usr"; then
22842                    CPPFLAGS="$CPPFLAGS -I$dir/include"
22843		    LDFLAGS="$LDFLAGS -L$dir/lib"
22844		fi
22845		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: found in $dir" >&5
22846printf "%s\n" "found in $dir" >&6; }
22847
22848printf "%s\n" "#define HAVE_NGHTTP2 1" >>confdefs.h
22849
22850		LIBS="$LIBS -lnghttp2"
22851                break;
22852            fi
22853    done
22854    if test x_$found_libnghttp2 != x_yes; then
22855	as_fn_error $? "Could not find libnghttp2, nghttp2.h" "$LINENO" 5
22856    fi
22857    ac_fn_c_check_header_compile "$LINENO" "nghttp2/nghttp2.h" "ac_cv_header_nghttp2_nghttp2_h" "$ac_includes_default
22858"
22859if test "x$ac_cv_header_nghttp2_nghttp2_h" = xyes
22860then :
22861  printf "%s\n" "#define HAVE_NGHTTP2_NGHTTP2_H 1" >>confdefs.h
22862
22863fi
22864
22865    ac_fn_check_decl "$LINENO" "nghttp2_session_server_new" "ac_cv_have_decl_nghttp2_session_server_new" "$ac_includes_default
22866    #include <nghttp2/nghttp2.h>
22867
22868" "$ac_c_undeclared_builtin_options" "CFLAGS"
22869if test "x$ac_cv_have_decl_nghttp2_session_server_new" = xyes
22870then :
22871  ac_have_decl=1
22872else case e in #(
22873  e) ac_have_decl=0 ;;
22874esac
22875fi
22876printf "%s\n" "#define HAVE_DECL_NGHTTP2_SESSION_SERVER_NEW $ac_have_decl" >>confdefs.h
22877
22878fi
22879
22880# ngtcp2
22881
22882# Check whether --with-libngtcp2 was given.
22883if test ${with_libngtcp2+y}
22884then :
22885  withval=$with_libngtcp2;
22886else case e in #(
22887  e)  withval="no"  ;;
22888esac
22889fi
22890
22891found_libngtcp2="no"
22892if test x_$withval = x_yes -o x_$withval != x_no; then
22893   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libngtcp2" >&5
22894printf %s "checking for libngtcp2... " >&6; }
22895   if test x_$withval = x_ -o x_$withval = x_yes; then
22896            withval="/usr/local /opt/local /usr/lib /usr/pkg /usr/sfw /usr"
22897   fi
22898   for dir in $withval ; do
22899            if test -f "$dir/include/ngtcp2/ngtcp2.h"; then
22900		found_libngtcp2="yes"
22901				if test "$dir" != "/usr"; then
22902                    CPPFLAGS="$CPPFLAGS -I$dir/include"
22903		    LDFLAGS="$LDFLAGS -L$dir/lib"
22904		fi
22905		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: found in $dir" >&5
22906printf "%s\n" "found in $dir" >&6; }
22907
22908printf "%s\n" "#define HAVE_NGTCP2 1" >>confdefs.h
22909
22910		LIBS="$LIBS -lngtcp2"
22911                break;
22912            fi
22913    done
22914    if test x_$found_libngtcp2 != x_yes; then
22915	as_fn_error $? "Could not find libngtcp2, ngtcp2.h" "$LINENO" 5
22916    fi
22917    ac_fn_c_check_header_compile "$LINENO" "ngtcp2/ngtcp2.h" "ac_cv_header_ngtcp2_ngtcp2_h" "$ac_includes_default
22918"
22919if test "x$ac_cv_header_ngtcp2_ngtcp2_h" = xyes
22920then :
22921  printf "%s\n" "#define HAVE_NGTCP2_NGTCP2_H 1" >>confdefs.h
22922
22923fi
22924ac_fn_c_check_header_compile "$LINENO" "ngtcp2/ngtcp2_crypto_ossl.h" "ac_cv_header_ngtcp2_ngtcp2_crypto_ossl_h" "$ac_includes_default
22925"
22926if test "x$ac_cv_header_ngtcp2_ngtcp2_crypto_ossl_h" = xyes
22927then :
22928  printf "%s\n" "#define HAVE_NGTCP2_NGTCP2_CRYPTO_OSSL_H 1" >>confdefs.h
22929
22930fi
22931ac_fn_c_check_header_compile "$LINENO" "ngtcp2/ngtcp2_crypto_openssl.h" "ac_cv_header_ngtcp2_ngtcp2_crypto_openssl_h" "$ac_includes_default
22932"
22933if test "x$ac_cv_header_ngtcp2_ngtcp2_crypto_openssl_h" = xyes
22934then :
22935  printf "%s\n" "#define HAVE_NGTCP2_NGTCP2_CRYPTO_OPENSSL_H 1" >>confdefs.h
22936
22937fi
22938ac_fn_c_check_header_compile "$LINENO" "ngtcp2/ngtcp2_crypto_quictls.h" "ac_cv_header_ngtcp2_ngtcp2_crypto_quictls_h" "$ac_includes_default
22939"
22940if test "x$ac_cv_header_ngtcp2_ngtcp2_crypto_quictls_h" = xyes
22941then :
22942  printf "%s\n" "#define HAVE_NGTCP2_NGTCP2_CRYPTO_QUICTLS_H 1" >>confdefs.h
22943
22944fi
22945
22946    ac_fn_check_decl "$LINENO" "ngtcp2_conn_server_new" "ac_cv_have_decl_ngtcp2_conn_server_new" "$ac_includes_default
22947    #include <ngtcp2/ngtcp2.h>
22948
22949" "$ac_c_undeclared_builtin_options" "CFLAGS"
22950if test "x$ac_cv_have_decl_ngtcp2_conn_server_new" = xyes
22951then :
22952  ac_have_decl=1
22953else case e in #(
22954  e) ac_have_decl=0 ;;
22955esac
22956fi
22957printf "%s\n" "#define HAVE_DECL_NGTCP2_CONN_SERVER_NEW $ac_have_decl" >>confdefs.h
22958
22959    ac_fn_check_decl "$LINENO" "ngtcp2_crypto_encrypt_cb" "ac_cv_have_decl_ngtcp2_crypto_encrypt_cb" "$ac_includes_default
22960    #include <ngtcp2/ngtcp2_crypto.h>
22961
22962" "$ac_c_undeclared_builtin_options" "CFLAGS"
22963if test "x$ac_cv_have_decl_ngtcp2_crypto_encrypt_cb" = xyes
22964then :
22965  ac_have_decl=1
22966else case e in #(
22967  e) ac_have_decl=0 ;;
22968esac
22969fi
22970printf "%s\n" "#define HAVE_DECL_NGTCP2_CRYPTO_ENCRYPT_CB $ac_have_decl" >>confdefs.h
22971
22972    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ngtcp2_crypto_encrypt_cb in -lngtcp2_crypto_ossl" >&5
22973printf %s "checking for ngtcp2_crypto_encrypt_cb in -lngtcp2_crypto_ossl... " >&6; }
22974if test ${ac_cv_lib_ngtcp2_crypto_ossl_ngtcp2_crypto_encrypt_cb+y}
22975then :
22976  printf %s "(cached) " >&6
22977else $as_nop
22978  ac_check_lib_save_LIBS=$LIBS
22979LIBS="-lngtcp2_crypto_ossl  $LIBS"
22980cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22981/* end confdefs.h.  */
22982
22983/* Override any GCC internal prototype to avoid an error.
22984   Use char because int might match the return type of a GCC
22985   builtin and then its argument prototype would still apply.  */
22986char ngtcp2_crypto_encrypt_cb ();
22987int
22988main (void)
22989{
22990return ngtcp2_crypto_encrypt_cb ();
22991  ;
22992  return 0;
22993}
22994_ACEOF
22995if ac_fn_c_try_link "$LINENO"
22996then :
22997  ac_cv_lib_ngtcp2_crypto_ossl_ngtcp2_crypto_encrypt_cb=yes
22998else $as_nop
22999  ac_cv_lib_ngtcp2_crypto_ossl_ngtcp2_crypto_encrypt_cb=no
23000fi
23001rm -f core conftest.err conftest.$ac_objext conftest.beam \
23002    conftest$ac_exeext conftest.$ac_ext
23003LIBS=$ac_check_lib_save_LIBS
23004fi
23005{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ngtcp2_crypto_ossl_ngtcp2_crypto_encrypt_cb" >&5
23006printf "%s\n" "$ac_cv_lib_ngtcp2_crypto_ossl_ngtcp2_crypto_encrypt_cb" >&6; }
23007if test "x$ac_cv_lib_ngtcp2_crypto_ossl_ngtcp2_crypto_encrypt_cb" = xyes
23008then :
23009
23010	LIBS="$LIBS -lngtcp2_crypto_ossl"
23011
23012printf "%s\n" "#define USE_NGTCP2_CRYPTO_OSSL 1" >>confdefs.h
23013
23014
23015else $as_nop
23016
23017        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ngtcp2_crypto_encrypt_cb in -lngtcp2_crypto_openssl" >&5
23018printf %s "checking for ngtcp2_crypto_encrypt_cb in -lngtcp2_crypto_openssl... " >&6; }
23019if test ${ac_cv_lib_ngtcp2_crypto_openssl_ngtcp2_crypto_encrypt_cb+y}
23020then :
23021  printf %s "(cached) " >&6
23022else case e in #(
23023  e) ac_check_lib_save_LIBS=$LIBS
23024LIBS="-lngtcp2_crypto_openssl  $LIBS"
23025cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23026/* end confdefs.h.  */
23027
23028/* Override any GCC internal prototype to avoid an error.
23029   Use char because int might match the return type of a GCC
23030   builtin and then its argument prototype would still apply.
23031   The 'extern "C"' is for builds by C++ compilers;
23032   although this is not generally supported in C code supporting it here
23033   has little cost and some practical benefit (sr 110532).  */
23034#ifdef __cplusplus
23035extern "C"
23036#endif
23037char ngtcp2_crypto_encrypt_cb (void);
23038int
23039main (void)
23040{
23041return ngtcp2_crypto_encrypt_cb ();
23042  ;
23043  return 0;
23044}
23045_ACEOF
23046if ac_fn_c_try_link "$LINENO"
23047then :
23048  ac_cv_lib_ngtcp2_crypto_openssl_ngtcp2_crypto_encrypt_cb=yes
23049else case e in #(
23050  e) ac_cv_lib_ngtcp2_crypto_openssl_ngtcp2_crypto_encrypt_cb=no ;;
23051esac
23052fi
23053rm -f core conftest.err conftest.$ac_objext conftest.beam \
23054    conftest$ac_exeext conftest.$ac_ext
23055LIBS=$ac_check_lib_save_LIBS ;;
23056esac
23057fi
23058{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ngtcp2_crypto_openssl_ngtcp2_crypto_encrypt_cb" >&5
23059printf "%s\n" "$ac_cv_lib_ngtcp2_crypto_openssl_ngtcp2_crypto_encrypt_cb" >&6; }
23060if test "x$ac_cv_lib_ngtcp2_crypto_openssl_ngtcp2_crypto_encrypt_cb" = xyes
23061then :
23062   LIBS="$LIBS -lngtcp2_crypto_openssl"
23063else $as_nop
23064
23065            { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ngtcp2_crypto_encrypt_cb in -lngtcp2_crypto_quictls" >&5
23066printf %s "checking for ngtcp2_crypto_encrypt_cb in -lngtcp2_crypto_quictls... " >&6; }
23067if test ${ac_cv_lib_ngtcp2_crypto_quictls_ngtcp2_crypto_encrypt_cb+y}
23068then :
23069  printf %s "(cached) " >&6
23070else case e in #(
23071  e) ac_check_lib_save_LIBS=$LIBS
23072LIBS="-lngtcp2_crypto_quictls  $LIBS"
23073cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23074/* end confdefs.h.  */
23075
23076/* Override any GCC internal prototype to avoid an error.
23077   Use char because int might match the return type of a GCC
23078   builtin and then its argument prototype would still apply.
23079   The 'extern "C"' is for builds by C++ compilers;
23080   although this is not generally supported in C code supporting it here
23081   has little cost and some practical benefit (sr 110532).  */
23082#ifdef __cplusplus
23083extern "C"
23084#endif
23085char ngtcp2_crypto_encrypt_cb (void);
23086int
23087main (void)
23088{
23089return ngtcp2_crypto_encrypt_cb ();
23090  ;
23091  return 0;
23092}
23093_ACEOF
23094if ac_fn_c_try_link "$LINENO"
23095then :
23096  ac_cv_lib_ngtcp2_crypto_quictls_ngtcp2_crypto_encrypt_cb=yes
23097else case e in #(
23098  e) ac_cv_lib_ngtcp2_crypto_quictls_ngtcp2_crypto_encrypt_cb=no ;;
23099esac
23100fi
23101rm -f core conftest.err conftest.$ac_objext conftest.beam \
23102    conftest$ac_exeext conftest.$ac_ext
23103LIBS=$ac_check_lib_save_LIBS ;;
23104esac
23105fi
23106{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ngtcp2_crypto_quictls_ngtcp2_crypto_encrypt_cb" >&5
23107printf "%s\n" "$ac_cv_lib_ngtcp2_crypto_quictls_ngtcp2_crypto_encrypt_cb" >&6; }
23108if test "x$ac_cv_lib_ngtcp2_crypto_quictls_ngtcp2_crypto_encrypt_cb" = xyes
23109then :
23110   LIBS="$LIBS -lngtcp2_crypto_quictls"
23111fi
23112
23113
23114fi
23115
23116
23117fi
23118
23119    ac_fn_c_check_func "$LINENO" "ngtcp2_crypto_encrypt_cb" "ac_cv_func_ngtcp2_crypto_encrypt_cb"
23120if test "x$ac_cv_func_ngtcp2_crypto_encrypt_cb" = xyes
23121then :
23122  printf "%s\n" "#define HAVE_NGTCP2_CRYPTO_ENCRYPT_CB 1" >>confdefs.h
23123
23124fi
23125ac_fn_c_check_func "$LINENO" "ngtcp2_ccerr_default" "ac_cv_func_ngtcp2_ccerr_default"
23126if test "x$ac_cv_func_ngtcp2_ccerr_default" = xyes
23127then :
23128  printf "%s\n" "#define HAVE_NGTCP2_CCERR_DEFAULT 1" >>confdefs.h
23129
23130fi
23131ac_fn_c_check_func "$LINENO" "ngtcp2_conn_in_closing_period" "ac_cv_func_ngtcp2_conn_in_closing_period"
23132if test "x$ac_cv_func_ngtcp2_conn_in_closing_period" = xyes
23133then :
23134  printf "%s\n" "#define HAVE_NGTCP2_CONN_IN_CLOSING_PERIOD 1" >>confdefs.h
23135
23136fi
23137ac_fn_c_check_func "$LINENO" "ngtcp2_conn_in_draining_period" "ac_cv_func_ngtcp2_conn_in_draining_period"
23138if test "x$ac_cv_func_ngtcp2_conn_in_draining_period" = xyes
23139then :
23140  printf "%s\n" "#define HAVE_NGTCP2_CONN_IN_DRAINING_PERIOD 1" >>confdefs.h
23141
23142fi
23143ac_fn_c_check_func "$LINENO" "ngtcp2_conn_get_max_local_streams_uni" "ac_cv_func_ngtcp2_conn_get_max_local_streams_uni"
23144if test "x$ac_cv_func_ngtcp2_conn_get_max_local_streams_uni" = xyes
23145then :
23146  printf "%s\n" "#define HAVE_NGTCP2_CONN_GET_MAX_LOCAL_STREAMS_UNI 1" >>confdefs.h
23147
23148fi
23149ac_fn_c_check_func "$LINENO" "ngtcp2_crypto_quictls_from_ossl_encryption_level" "ac_cv_func_ngtcp2_crypto_quictls_from_ossl_encryption_level"
23150if test "x$ac_cv_func_ngtcp2_crypto_quictls_from_ossl_encryption_level" = xyes
23151then :
23152  printf "%s\n" "#define HAVE_NGTCP2_CRYPTO_QUICTLS_FROM_OSSL_ENCRYPTION_LEVEL 1" >>confdefs.h
23153
23154fi
23155ac_fn_c_check_func "$LINENO" "ngtcp2_crypto_quictls_configure_server_context" "ac_cv_func_ngtcp2_crypto_quictls_configure_server_context"
23156if test "x$ac_cv_func_ngtcp2_crypto_quictls_configure_server_context" = xyes
23157then :
23158  printf "%s\n" "#define HAVE_NGTCP2_CRYPTO_QUICTLS_CONFIGURE_SERVER_CONTEXT 1" >>confdefs.h
23159
23160fi
23161ac_fn_c_check_func "$LINENO" "ngtcp2_crypto_quictls_configure_client_context" "ac_cv_func_ngtcp2_crypto_quictls_configure_client_context"
23162if test "x$ac_cv_func_ngtcp2_crypto_quictls_configure_client_context" = xyes
23163then :
23164  printf "%s\n" "#define HAVE_NGTCP2_CRYPTO_QUICTLS_CONFIGURE_CLIENT_CONTEXT 1" >>confdefs.h
23165
23166fi
23167ac_fn_c_check_func "$LINENO" "ngtcp2_crypto_quictls_init" "ac_cv_func_ngtcp2_crypto_quictls_init"
23168if test "x$ac_cv_func_ngtcp2_crypto_quictls_init" = xyes
23169then :
23170  printf "%s\n" "#define HAVE_NGTCP2_CRYPTO_QUICTLS_INIT 1" >>confdefs.h
23171
23172fi
23173ac_fn_c_check_func "$LINENO" "ngtcp2_conn_get_num_scid" "ac_cv_func_ngtcp2_conn_get_num_scid"
23174if test "x$ac_cv_func_ngtcp2_conn_get_num_scid" = xyes
23175then :
23176  printf "%s\n" "#define HAVE_NGTCP2_CONN_GET_NUM_SCID 1" >>confdefs.h
23177
23178fi
23179ac_fn_c_check_func "$LINENO" "ngtcp2_conn_tls_early_data_rejected" "ac_cv_func_ngtcp2_conn_tls_early_data_rejected"
23180if test "x$ac_cv_func_ngtcp2_conn_tls_early_data_rejected" = xyes
23181then :
23182  printf "%s\n" "#define HAVE_NGTCP2_CONN_TLS_EARLY_DATA_REJECTED 1" >>confdefs.h
23183
23184fi
23185ac_fn_c_check_func "$LINENO" "ngtcp2_conn_encode_0rtt_transport_params" "ac_cv_func_ngtcp2_conn_encode_0rtt_transport_params"
23186if test "x$ac_cv_func_ngtcp2_conn_encode_0rtt_transport_params" = xyes
23187then :
23188  printf "%s\n" "#define HAVE_NGTCP2_CONN_ENCODE_0RTT_TRANSPORT_PARAMS 1" >>confdefs.h
23189
23190fi
23191
23192
23193    # these check_funcs need -lssl
23194    BAKLIBS="$LIBS"
23195    LIBS="-lssl $LIBS"
23196
23197  for ac_func in SSL_is_quic
23198do :
23199  ac_fn_c_check_func "$LINENO" "SSL_is_quic" "ac_cv_func_SSL_is_quic"
23200if test "x$ac_cv_func_SSL_is_quic" = xyes
23201then :
23202  printf "%s\n" "#define HAVE_SSL_IS_QUIC 1" >>confdefs.h
23203
23204else case e in #(
23205  e) as_fn_error $? "No QUIC support detected in OpenSSL. Need OpenSSL version with QUIC support to enable DNS over QUIC with libngtcp2." "$LINENO" 5 ;;
23206esac
23207fi
23208
23209done
23210    LIBS="$BAKLIBS"
23211
23212    ac_fn_c_check_type "$LINENO" "struct ngtcp2_version_cid" "ac_cv_type_struct_ngtcp2_version_cid" "$ac_includes_default
23213    #include <ngtcp2/ngtcp2.h>
23214
23215"
23216if test "x$ac_cv_type_struct_ngtcp2_version_cid" = xyes
23217then :
23218
23219printf "%s\n" "#define HAVE_STRUCT_NGTCP2_VERSION_CID 1" >>confdefs.h
23220
23221
23222fi
23223ac_fn_c_check_type "$LINENO" "ngtcp2_encryption_level" "ac_cv_type_ngtcp2_encryption_level" "$ac_includes_default
23224    #include <ngtcp2/ngtcp2.h>
23225
23226"
23227if test "x$ac_cv_type_ngtcp2_encryption_level" = xyes
23228then :
23229
23230printf "%s\n" "#define HAVE_NGTCP2_ENCRYPTION_LEVEL 1" >>confdefs.h
23231
23232
23233fi
23234
23235    ac_fn_c_check_member "$LINENO" "struct ngtcp2_pkt_hd" "tokenlen" "ac_cv_member_struct_ngtcp2_pkt_hd_tokenlen" "$ac_includes_default
23236    #include <ngtcp2/ngtcp2.h>
23237
23238"
23239if test "x$ac_cv_member_struct_ngtcp2_pkt_hd_tokenlen" = xyes
23240then :
23241
23242printf "%s\n" "#define HAVE_STRUCT_NGTCP2_PKT_HD_TOKENLEN 1" >>confdefs.h
23243
23244
23245fi
23246ac_fn_c_check_member "$LINENO" "struct ngtcp2_settings" "tokenlen" "ac_cv_member_struct_ngtcp2_settings_tokenlen" "$ac_includes_default
23247    #include <ngtcp2/ngtcp2.h>
23248
23249"
23250if test "x$ac_cv_member_struct_ngtcp2_settings_tokenlen" = xyes
23251then :
23252
23253printf "%s\n" "#define HAVE_STRUCT_NGTCP2_SETTINGS_TOKENLEN 1" >>confdefs.h
23254
23255
23256fi
23257ac_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
23258    #include <ngtcp2/ngtcp2.h>
23259
23260"
23261if test "x$ac_cv_member_struct_ngtcp2_settings_max_tx_udp_payload_size" = xyes
23262then :
23263
23264printf "%s\n" "#define HAVE_STRUCT_NGTCP2_SETTINGS_MAX_TX_UDP_PAYLOAD_SIZE 1" >>confdefs.h
23265
23266
23267fi
23268ac_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
23269    #include <ngtcp2/ngtcp2.h>
23270
23271"
23272if test "x$ac_cv_member_struct_ngtcp2_transport_params_original_dcid_present" = xyes
23273then :
23274
23275printf "%s\n" "#define HAVE_STRUCT_NGTCP2_TRANSPORT_PARAMS_ORIGINAL_DCID_PRESENT 1" >>confdefs.h
23276
23277
23278fi
23279
23280
23281    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ngtcp2_conn_shutdown_stream has 4 arguments" >&5
23282printf %s "checking whether ngtcp2_conn_shutdown_stream has 4 arguments... " >&6; }
23283    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23284/* end confdefs.h.  */
23285$ac_includes_default
23286#include <ngtcp2/ngtcp2.h>
23287
23288int
23289main (void)
23290{
23291
23292	(void)ngtcp2_conn_shutdown_stream(NULL, 0, 0, 0);
23293
23294  ;
23295  return 0;
23296}
23297_ACEOF
23298if ac_fn_c_try_compile "$LINENO"
23299then :
23300
23301	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
23302printf "%s\n" "yes" >&6; }
23303
23304printf "%s\n" "#define HAVE_NGTCP2_CONN_SHUTDOWN_STREAM4 1" >>confdefs.h
23305
23306
23307else case e in #(
23308  e)
23309	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
23310printf "%s\n" "no" >&6; }
23311     ;;
23312esac
23313fi
23314rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
23315
23316fi
23317
23318# set static linking for uninstalled libraries if requested
23319
23320staticexe=""
23321# Check whether --enable-static-exe was given.
23322if test ${enable_static_exe+y}
23323then :
23324  enableval=$enable_static_exe;
23325fi
23326
23327if test x_$enable_static_exe = x_yes; then
23328	staticexe="-static"
23329	if test "$on_mingw" = yes; then
23330		staticexe="-all-static"
23331		# for static compile, include gdi32 and zlib here.
23332		if echo "$LIBS" | grep 'lgdi32' >/dev/null; then
23333			:
23334		else
23335			LIBS="$LIBS -lgdi32"
23336		fi
23337		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
23338printf %s "checking for compress in -lz... " >&6; }
23339if test ${ac_cv_lib_z_compress+y}
23340then :
23341  printf %s "(cached) " >&6
23342else case e in #(
23343  e) ac_check_lib_save_LIBS=$LIBS
23344LIBS="-lz  $LIBS"
23345cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23346/* end confdefs.h.  */
23347
23348/* Override any GCC internal prototype to avoid an error.
23349   Use char because int might match the return type of a GCC
23350   builtin and then its argument prototype would still apply.
23351   The 'extern "C"' is for builds by C++ compilers;
23352   although this is not generally supported in C code supporting it here
23353   has little cost and some practical benefit (sr 110532).  */
23354#ifdef __cplusplus
23355extern "C"
23356#endif
23357char compress (void);
23358int
23359main (void)
23360{
23361return compress ();
23362  ;
23363  return 0;
23364}
23365_ACEOF
23366if ac_fn_c_try_link "$LINENO"
23367then :
23368  ac_cv_lib_z_compress=yes
23369else case e in #(
23370  e) ac_cv_lib_z_compress=no ;;
23371esac
23372fi
23373rm -f core conftest.err conftest.$ac_objext conftest.beam \
23374    conftest$ac_exeext conftest.$ac_ext
23375LIBS=$ac_check_lib_save_LIBS ;;
23376esac
23377fi
23378{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
23379printf "%s\n" "$ac_cv_lib_z_compress" >&6; }
23380if test "x$ac_cv_lib_z_compress" = xyes
23381then :
23382   LIBS="$LIBS -lz"
23383fi
23384
23385		if echo "$LIBS" | grep -e "libssp.a" -e "lssp" >/dev/null; then
23386			:
23387		else
23388			LIBS="$LIBS -l:libssp.a"
23389		fi
23390	fi
23391fi
23392
23393# set full static linking if requested
23394# Check whether --enable-fully-static was given.
23395if test ${enable_fully_static+y}
23396then :
23397  enableval=$enable_fully_static;
23398fi
23399
23400if test x_$enable_fully_static = x_yes; then
23401	staticexe="-all-static"
23402	if test "$on_mingw" = yes; then
23403		# for static compile, include gdi32 and zlib here.
23404		if echo $LIBS | grep 'lgdi32' >/dev/null; then
23405			:
23406		else
23407			LIBS="$LIBS -lgdi32"
23408		fi
23409		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
23410printf %s "checking for compress in -lz... " >&6; }
23411if test ${ac_cv_lib_z_compress+y}
23412then :
23413  printf %s "(cached) " >&6
23414else case e in #(
23415  e) ac_check_lib_save_LIBS=$LIBS
23416LIBS="-lz  $LIBS"
23417cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23418/* end confdefs.h.  */
23419
23420/* Override any GCC internal prototype to avoid an error.
23421   Use char because int might match the return type of a GCC
23422   builtin and then its argument prototype would still apply.
23423   The 'extern "C"' is for builds by C++ compilers;
23424   although this is not generally supported in C code supporting it here
23425   has little cost and some practical benefit (sr 110532).  */
23426#ifdef __cplusplus
23427extern "C"
23428#endif
23429char compress (void);
23430int
23431main (void)
23432{
23433return compress ();
23434  ;
23435  return 0;
23436}
23437_ACEOF
23438if ac_fn_c_try_link "$LINENO"
23439then :
23440  ac_cv_lib_z_compress=yes
23441else case e in #(
23442  e) ac_cv_lib_z_compress=no ;;
23443esac
23444fi
23445rm -f core conftest.err conftest.$ac_objext conftest.beam \
23446    conftest$ac_exeext conftest.$ac_ext
23447LIBS=$ac_check_lib_save_LIBS ;;
23448esac
23449fi
23450{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
23451printf "%s\n" "$ac_cv_lib_z_compress" >&6; }
23452if test "x$ac_cv_lib_z_compress" = xyes
23453then :
23454   LIBS="$LIBS -lz"
23455fi
23456
23457		if echo "$LIBS" | grep -e "libssp.a" -e "lssp" >/dev/null; then
23458			:
23459		else
23460			LIBS="$LIBS -l:libssp.a"
23461		fi
23462	fi
23463fi
23464
23465# set lock checking if requested
23466# Check whether --enable-lock_checks was given.
23467if test ${enable_lock_checks+y}
23468then :
23469  enableval=$enable_lock_checks;
23470fi
23471
23472if test x_$enable_lock_checks = x_yes; then
23473
23474printf "%s\n" "#define ENABLE_LOCK_CHECKS 1" >>confdefs.h
23475
23476	CHECKLOCK_OBJ="checklocks.lo"
23477
23478fi
23479
23480
23481{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
23482printf %s "checking for getaddrinfo... " >&6; }
23483ac_cv_func_getaddrinfo=no
23484cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23485/* end confdefs.h.  */
23486
23487#ifdef __cplusplus
23488extern "C"
23489{
23490#endif
23491char* getaddrinfo();
23492char* (*f) () = getaddrinfo;
23493#ifdef __cplusplus
23494}
23495#endif
23496int main(void) {
23497        ;
23498        return 0;
23499}
23500
23501_ACEOF
23502if ac_fn_c_try_link "$LINENO"
23503then :
23504  ac_cv_func_getaddrinfo="yes"
23505if test "$ac_cv_header_windows_h" = "yes"; then
23506
23507printf "%s\n" "#define USE_WINSOCK 1" >>confdefs.h
23508
23509	USE_WINSOCK="1"
23510	if echo "$LIBS" | grep 'lws2_32' >/dev/null; then
23511		:
23512	else
23513		LIBS="$LIBS -lws2_32"
23514	fi
23515fi
23516
23517else case e in #(
23518  e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23519/* end confdefs.h.  */
23520
23521#ifdef HAVE_WS2TCPIP_H
23522#include <ws2tcpip.h>
23523#endif
23524
23525int
23526main (void)
23527{
23528
23529        (void)getaddrinfo(NULL, NULL, NULL, NULL);
23530
23531
23532  ;
23533  return 0;
23534}
23535_ACEOF
23536if ac_fn_c_try_link "$LINENO"
23537then :
23538
23539ac_cv_func_getaddrinfo="yes"
23540
23541printf "%s\n" "#define USE_WINSOCK 1" >>confdefs.h
23542
23543USE_WINSOCK="1"
23544
23545else case e in #(
23546  e) ORIGLIBS="$LIBS"
23547LIBS="$LIBS -lws2_32"
23548cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23549/* end confdefs.h.  */
23550
23551#ifdef HAVE_WS2TCPIP_H
23552#include <ws2tcpip.h>
23553#endif
23554
23555int
23556main (void)
23557{
23558
23559        (void)getaddrinfo(NULL, NULL, NULL, NULL);
23560
23561
23562  ;
23563  return 0;
23564}
23565_ACEOF
23566if ac_fn_c_try_link "$LINENO"
23567then :
23568
23569ac_cv_func_getaddrinfo="yes"
23570
23571printf "%s\n" "#define USE_WINSOCK 1" >>confdefs.h
23572
23573USE_WINSOCK="1"
23574
23575else case e in #(
23576  e)
23577ac_cv_func_getaddrinfo="no"
23578LIBS="$ORIGLIBS"
23579 ;;
23580esac
23581fi
23582rm -f core conftest.err conftest.$ac_objext conftest.beam \
23583    conftest$ac_exeext conftest.$ac_ext
23584 ;;
23585esac
23586fi
23587rm -f core conftest.err conftest.$ac_objext conftest.beam \
23588    conftest$ac_exeext conftest.$ac_ext
23589 ;;
23590esac
23591fi
23592rm -f core conftest.err conftest.$ac_objext conftest.beam \
23593    conftest$ac_exeext conftest.$ac_ext
23594
23595{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_getaddrinfo" >&5
23596printf "%s\n" "$ac_cv_func_getaddrinfo" >&6; }
23597if test $ac_cv_func_getaddrinfo = yes; then
23598
23599printf "%s\n" "#define HAVE_GETADDRINFO 1" >>confdefs.h
23600
23601fi
23602
23603if test "$USE_WINSOCK" = 1; then
23604
23605printf "%s\n" "#define UB_ON_WINDOWS 1" >>confdefs.h
23606
23607	ac_fn_c_check_header_compile "$LINENO" "iphlpapi.h" "ac_cv_header_iphlpapi_h" "$ac_includes_default
23608#include <windows.h>
23609
23610"
23611if test "x$ac_cv_header_iphlpapi_h" = xyes
23612then :
23613  printf "%s\n" "#define HAVE_IPHLPAPI_H 1" >>confdefs.h
23614
23615fi
23616
23617	if test -n "$ac_tool_prefix"; then
23618  # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
23619set dummy ${ac_tool_prefix}windres; ac_word=$2
23620{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23621printf %s "checking for $ac_word... " >&6; }
23622if test ${ac_cv_prog_WINDRES+y}
23623then :
23624  printf %s "(cached) " >&6
23625else case e in #(
23626  e) if test -n "$WINDRES"; then
23627  ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
23628else
23629as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23630for as_dir in $PATH
23631do
23632  IFS=$as_save_IFS
23633  case $as_dir in #(((
23634    '') as_dir=./ ;;
23635    */) ;;
23636    *) as_dir=$as_dir/ ;;
23637  esac
23638    for ac_exec_ext in '' $ac_executable_extensions; do
23639  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
23640    ac_cv_prog_WINDRES="${ac_tool_prefix}windres"
23641    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
23642    break 2
23643  fi
23644done
23645  done
23646IFS=$as_save_IFS
23647
23648fi ;;
23649esac
23650fi
23651WINDRES=$ac_cv_prog_WINDRES
23652if test -n "$WINDRES"; then
23653  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $WINDRES" >&5
23654printf "%s\n" "$WINDRES" >&6; }
23655else
23656  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
23657printf "%s\n" "no" >&6; }
23658fi
23659
23660
23661fi
23662if test -z "$ac_cv_prog_WINDRES"; then
23663  ac_ct_WINDRES=$WINDRES
23664  # Extract the first word of "windres", so it can be a program name with args.
23665set dummy windres; ac_word=$2
23666{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23667printf %s "checking for $ac_word... " >&6; }
23668if test ${ac_cv_prog_ac_ct_WINDRES+y}
23669then :
23670  printf %s "(cached) " >&6
23671else case e in #(
23672  e) if test -n "$ac_ct_WINDRES"; then
23673  ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # Let the user override the test.
23674else
23675as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23676for as_dir in $PATH
23677do
23678  IFS=$as_save_IFS
23679  case $as_dir in #(((
23680    '') as_dir=./ ;;
23681    */) ;;
23682    *) as_dir=$as_dir/ ;;
23683  esac
23684    for ac_exec_ext in '' $ac_executable_extensions; do
23685  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
23686    ac_cv_prog_ac_ct_WINDRES="windres"
23687    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
23688    break 2
23689  fi
23690done
23691  done
23692IFS=$as_save_IFS
23693
23694fi ;;
23695esac
23696fi
23697ac_ct_WINDRES=$ac_cv_prog_ac_ct_WINDRES
23698if test -n "$ac_ct_WINDRES"; then
23699  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_WINDRES" >&5
23700printf "%s\n" "$ac_ct_WINDRES" >&6; }
23701else
23702  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
23703printf "%s\n" "no" >&6; }
23704fi
23705
23706  if test "x$ac_ct_WINDRES" = x; then
23707    WINDRES=""
23708  else
23709    case $cross_compiling:$ac_tool_warned in
23710yes:)
23711{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
23712printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
23713ac_tool_warned=yes ;;
23714esac
23715    WINDRES=$ac_ct_WINDRES
23716  fi
23717else
23718  WINDRES="$ac_cv_prog_WINDRES"
23719fi
23720
23721	if echo "$LIBS" | grep crypt32 >/dev/null; then
23722		LIBS="$LIBS -liphlpapi"
23723	else
23724		LIBS="$LIBS -liphlpapi -lcrypt32"
23725	fi
23726	WINAPPS="unbound-service-install.exe unbound-service-remove.exe anchor-update.exe"
23727
23728	WIN_DAEMON_SRC="winrc/win_svc.c winrc/w_inst.c"
23729
23730	WIN_DAEMON_OBJ="win_svc.lo w_inst.lo"
23731
23732	WIN_DAEMON_OBJ_LINK="rsrc_unbound.o"
23733
23734	WIN_HOST_OBJ_LINK="rsrc_unbound_host.o"
23735
23736	WIN_UBANCHOR_OBJ_LINK="rsrc_unbound_anchor.o log.lo locks.lo"
23737
23738	WIN_CONTROL_OBJ_LINK="rsrc_unbound_control.o"
23739
23740	WIN_CHECKCONF_OBJ_LINK="rsrc_unbound_checkconf.o"
23741
23742
23743printf "%s\n" "#define __USE_MINGW_ANSI_STDIO 1" >>confdefs.h
23744
23745fi
23746if test $ac_cv_func_getaddrinfo = no; then
23747	case " $LIBOBJS " in
23748  *" fake-rfc2553.$ac_objext "* ) ;;
23749  *) LIBOBJS="$LIBOBJS fake-rfc2553.$ac_objext"
23750 ;;
23751esac
23752
23753fi
23754# check after getaddrinfo for its libraries
23755
23756# check ioctlsocket
23757{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ioctlsocket" >&5
23758printf %s "checking for ioctlsocket... " >&6; }
23759cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23760/* end confdefs.h.  */
23761
23762#ifdef HAVE_WINSOCK2_H
23763#include <winsock2.h>
23764#endif
23765
23766int
23767main (void)
23768{
23769
23770	(void)ioctlsocket(0, 0, NULL);
23771
23772  ;
23773  return 0;
23774}
23775_ACEOF
23776if ac_fn_c_try_link "$LINENO"
23777then :
23778
23779{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
23780printf "%s\n" "yes" >&6; }
23781
23782printf "%s\n" "#define HAVE_IOCTLSOCKET 1" >>confdefs.h
23783
23784
23785else case e in #(
23786  e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
23787printf "%s\n" "no" >&6; } ;;
23788esac
23789fi
23790rm -f core conftest.err conftest.$ac_objext conftest.beam \
23791    conftest$ac_exeext conftest.$ac_ext
23792
23793
23794# see if daemon(3) exists, and if it is deprecated.
23795ac_fn_c_check_func "$LINENO" "daemon" "ac_cv_func_daemon"
23796if test "x$ac_cv_func_daemon" = xyes
23797then :
23798  printf "%s\n" "#define HAVE_DAEMON 1" >>confdefs.h
23799
23800fi
23801
23802if test $ac_cv_func_daemon = yes; then
23803
23804
23805{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if daemon is deprecated" >&5
23806printf %s "checking if daemon is deprecated... " >&6; }
23807cache=`echo daemon | sed 'y%.=/+-%___p_%'`
23808if eval test \${cv_cc_deprecated_$cache+y}
23809then :
23810  printf %s "(cached) " >&6
23811else case e in #(
23812  e)
23813echo '
23814#include <stdlib.h>
23815#include <unistd.h>
23816' >conftest.c
23817echo 'void f(void){ (void)daemon(0, 0); }' >>conftest.c
23818if test -z "`$CC $CPPFLAGS $CFLAGS -c conftest.c 2>&1 | grep -e deprecated -e unavailable`"; then
23819eval "cv_cc_deprecated_$cache=no"
23820else
23821eval "cv_cc_deprecated_$cache=yes"
23822fi
23823rm -f conftest conftest.o conftest.c
23824 ;;
23825esac
23826fi
23827
23828if eval "test \"`echo '$cv_cc_deprecated_'$cache`\" = yes"; then
23829{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
23830printf "%s\n" "yes" >&6; }
23831
23832printf "%s\n" "#define DEPRECATED_DAEMON 1" >>confdefs.h
23833
23834:
23835
23836else
23837{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
23838printf "%s\n" "no" >&6; }
23839:
23840
23841fi
23842
23843fi
23844
23845ac_fn_c_check_member "$LINENO" "struct sockaddr_un" "sun_len" "ac_cv_member_struct_sockaddr_un_sun_len" "
23846$ac_includes_default
23847#ifdef HAVE_SYS_UN_H
23848#include <sys/un.h>
23849#endif
23850
23851"
23852if test "x$ac_cv_member_struct_sockaddr_un_sun_len" = xyes
23853then :
23854
23855printf "%s\n" "#define HAVE_STRUCT_SOCKADDR_UN_SUN_LEN 1" >>confdefs.h
23856
23857
23858fi
23859
23860ac_fn_c_check_member "$LINENO" "struct in_pktinfo" "ipi_spec_dst" "ac_cv_member_struct_in_pktinfo_ipi_spec_dst" "
23861$ac_includes_default
23862#if HAVE_SYS_PARAM_H
23863#include <sys/param.h>
23864#endif
23865
23866#ifdef HAVE_SYS_SOCKET_H
23867#include <sys/socket.h>
23868#endif
23869
23870#ifdef HAVE_SYS_UIO_H
23871#include <sys/uio.h>
23872#endif
23873
23874#ifdef HAVE_NETINET_IN_H
23875#include <netinet/in.h>
23876#endif
23877
23878#ifdef HAVE_NETINET_TCP_H
23879#include <netinet/tcp.h>
23880#endif
23881
23882#ifdef HAVE_ARPA_INET_H
23883#include <arpa/inet.h>
23884#endif
23885
23886#ifdef HAVE_WINSOCK2_H
23887#include <winsock2.h>
23888#endif
23889
23890#ifdef HAVE_WS2TCPIP_H
23891#include <ws2tcpip.h>
23892#endif
23893
23894"
23895if test "x$ac_cv_member_struct_in_pktinfo_ipi_spec_dst" = xyes
23896then :
23897
23898printf "%s\n" "#define HAVE_STRUCT_IN_PKTINFO_IPI_SPEC_DST 1" >>confdefs.h
23899
23900
23901fi
23902
23903
23904{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for htobe64" >&5
23905printf %s "checking for htobe64... " >&6; }
23906cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23907/* end confdefs.h.  */
23908
23909#include <stdio.h>
23910#ifdef HAVE_ENDIAN_H
23911#  include <endian.h>
23912#endif
23913#ifdef HAVE_SYS_ENDIAN_H
23914#  include <sys/endian.h>
23915#endif
23916
23917int
23918main (void)
23919{
23920unsigned long long x = htobe64(0); printf("%u", (unsigned)x);
23921  ;
23922  return 0;
23923}
23924_ACEOF
23925if ac_fn_c_try_link "$LINENO"
23926then :
23927  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
23928printf "%s\n" "yes" >&6; }
23929
23930printf "%s\n" "#define HAVE_HTOBE64 1" >>confdefs.h
23931
23932else case e in #(
23933  e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
23934printf "%s\n" "no" >&6; } ;;
23935esac
23936fi
23937rm -f core conftest.err conftest.$ac_objext conftest.beam \
23938    conftest$ac_exeext conftest.$ac_ext
23939
23940{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for be64toh" >&5
23941printf %s "checking for be64toh... " >&6; }
23942cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23943/* end confdefs.h.  */
23944
23945#include <stdio.h>
23946#ifdef HAVE_ENDIAN_H
23947#  include <endian.h>
23948#endif
23949#ifdef HAVE_SYS_ENDIAN_H
23950#  include <sys/endian.h>
23951#endif
23952
23953int
23954main (void)
23955{
23956unsigned long long x = be64toh(0); printf("%u", (unsigned)x);
23957  ;
23958  return 0;
23959}
23960_ACEOF
23961if ac_fn_c_try_link "$LINENO"
23962then :
23963  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
23964printf "%s\n" "yes" >&6; }
23965
23966printf "%s\n" "#define HAVE_BE64TOH 1" >>confdefs.h
23967
23968else case e in #(
23969  e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
23970printf "%s\n" "no" >&6; } ;;
23971esac
23972fi
23973rm -f core conftest.err conftest.$ac_objext conftest.beam \
23974    conftest$ac_exeext conftest.$ac_ext
23975
23976{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing setusercontext" >&5
23977printf %s "checking for library containing setusercontext... " >&6; }
23978if test ${ac_cv_search_setusercontext+y}
23979then :
23980  printf %s "(cached) " >&6
23981else case e in #(
23982  e) ac_func_search_save_LIBS=$LIBS
23983cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23984/* end confdefs.h.  */
23985
23986/* Override any GCC internal prototype to avoid an error.
23987   Use char because int might match the return type of a GCC
23988   builtin and then its argument prototype would still apply.
23989   The 'extern "C"' is for builds by C++ compilers;
23990   although this is not generally supported in C code supporting it here
23991   has little cost and some practical benefit (sr 110532).  */
23992#ifdef __cplusplus
23993extern "C"
23994#endif
23995char setusercontext (void);
23996int
23997main (void)
23998{
23999return setusercontext ();
24000  ;
24001  return 0;
24002}
24003_ACEOF
24004for ac_lib in '' util
24005do
24006  if test -z "$ac_lib"; then
24007    ac_res="none required"
24008  else
24009    ac_res=-l$ac_lib
24010    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
24011  fi
24012  if ac_fn_c_try_link "$LINENO"
24013then :
24014  ac_cv_search_setusercontext=$ac_res
24015fi
24016rm -f core conftest.err conftest.$ac_objext conftest.beam \
24017    conftest$ac_exeext
24018  if test ${ac_cv_search_setusercontext+y}
24019then :
24020  break
24021fi
24022done
24023if test ${ac_cv_search_setusercontext+y}
24024then :
24025
24026else case e in #(
24027  e) ac_cv_search_setusercontext=no ;;
24028esac
24029fi
24030rm conftest.$ac_ext
24031LIBS=$ac_func_search_save_LIBS ;;
24032esac
24033fi
24034{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_setusercontext" >&5
24035printf "%s\n" "$ac_cv_search_setusercontext" >&6; }
24036ac_res=$ac_cv_search_setusercontext
24037if test "$ac_res" != no
24038then :
24039  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
24040
24041fi
24042
24043ac_fn_c_check_func "$LINENO" "tzset" "ac_cv_func_tzset"
24044if test "x$ac_cv_func_tzset" = xyes
24045then :
24046  printf "%s\n" "#define HAVE_TZSET 1" >>confdefs.h
24047
24048fi
24049ac_fn_c_check_func "$LINENO" "sigprocmask" "ac_cv_func_sigprocmask"
24050if test "x$ac_cv_func_sigprocmask" = xyes
24051then :
24052  printf "%s\n" "#define HAVE_SIGPROCMASK 1" >>confdefs.h
24053
24054fi
24055ac_fn_c_check_func "$LINENO" "fcntl" "ac_cv_func_fcntl"
24056if test "x$ac_cv_func_fcntl" = xyes
24057then :
24058  printf "%s\n" "#define HAVE_FCNTL 1" >>confdefs.h
24059
24060fi
24061ac_fn_c_check_func "$LINENO" "getpwnam" "ac_cv_func_getpwnam"
24062if test "x$ac_cv_func_getpwnam" = xyes
24063then :
24064  printf "%s\n" "#define HAVE_GETPWNAM 1" >>confdefs.h
24065
24066fi
24067ac_fn_c_check_func "$LINENO" "endpwent" "ac_cv_func_endpwent"
24068if test "x$ac_cv_func_endpwent" = xyes
24069then :
24070  printf "%s\n" "#define HAVE_ENDPWENT 1" >>confdefs.h
24071
24072fi
24073ac_fn_c_check_func "$LINENO" "getrlimit" "ac_cv_func_getrlimit"
24074if test "x$ac_cv_func_getrlimit" = xyes
24075then :
24076  printf "%s\n" "#define HAVE_GETRLIMIT 1" >>confdefs.h
24077
24078fi
24079ac_fn_c_check_func "$LINENO" "setrlimit" "ac_cv_func_setrlimit"
24080if test "x$ac_cv_func_setrlimit" = xyes
24081then :
24082  printf "%s\n" "#define HAVE_SETRLIMIT 1" >>confdefs.h
24083
24084fi
24085ac_fn_c_check_func "$LINENO" "setsid" "ac_cv_func_setsid"
24086if test "x$ac_cv_func_setsid" = xyes
24087then :
24088  printf "%s\n" "#define HAVE_SETSID 1" >>confdefs.h
24089
24090fi
24091ac_fn_c_check_func "$LINENO" "chroot" "ac_cv_func_chroot"
24092if test "x$ac_cv_func_chroot" = xyes
24093then :
24094  printf "%s\n" "#define HAVE_CHROOT 1" >>confdefs.h
24095
24096fi
24097ac_fn_c_check_func "$LINENO" "kill" "ac_cv_func_kill"
24098if test "x$ac_cv_func_kill" = xyes
24099then :
24100  printf "%s\n" "#define HAVE_KILL 1" >>confdefs.h
24101
24102fi
24103ac_fn_c_check_func "$LINENO" "chown" "ac_cv_func_chown"
24104if test "x$ac_cv_func_chown" = xyes
24105then :
24106  printf "%s\n" "#define HAVE_CHOWN 1" >>confdefs.h
24107
24108fi
24109ac_fn_c_check_func "$LINENO" "sleep" "ac_cv_func_sleep"
24110if test "x$ac_cv_func_sleep" = xyes
24111then :
24112  printf "%s\n" "#define HAVE_SLEEP 1" >>confdefs.h
24113
24114fi
24115ac_fn_c_check_func "$LINENO" "usleep" "ac_cv_func_usleep"
24116if test "x$ac_cv_func_usleep" = xyes
24117then :
24118  printf "%s\n" "#define HAVE_USLEEP 1" >>confdefs.h
24119
24120fi
24121ac_fn_c_check_func "$LINENO" "random" "ac_cv_func_random"
24122if test "x$ac_cv_func_random" = xyes
24123then :
24124  printf "%s\n" "#define HAVE_RANDOM 1" >>confdefs.h
24125
24126fi
24127ac_fn_c_check_func "$LINENO" "srandom" "ac_cv_func_srandom"
24128if test "x$ac_cv_func_srandom" = xyes
24129then :
24130  printf "%s\n" "#define HAVE_SRANDOM 1" >>confdefs.h
24131
24132fi
24133ac_fn_c_check_func "$LINENO" "recvmsg" "ac_cv_func_recvmsg"
24134if test "x$ac_cv_func_recvmsg" = xyes
24135then :
24136  printf "%s\n" "#define HAVE_RECVMSG 1" >>confdefs.h
24137
24138fi
24139ac_fn_c_check_func "$LINENO" "sendmsg" "ac_cv_func_sendmsg"
24140if test "x$ac_cv_func_sendmsg" = xyes
24141then :
24142  printf "%s\n" "#define HAVE_SENDMSG 1" >>confdefs.h
24143
24144fi
24145ac_fn_c_check_func "$LINENO" "writev" "ac_cv_func_writev"
24146if test "x$ac_cv_func_writev" = xyes
24147then :
24148  printf "%s\n" "#define HAVE_WRITEV 1" >>confdefs.h
24149
24150fi
24151ac_fn_c_check_func "$LINENO" "socketpair" "ac_cv_func_socketpair"
24152if test "x$ac_cv_func_socketpair" = xyes
24153then :
24154  printf "%s\n" "#define HAVE_SOCKETPAIR 1" >>confdefs.h
24155
24156fi
24157ac_fn_c_check_func "$LINENO" "glob" "ac_cv_func_glob"
24158if test "x$ac_cv_func_glob" = xyes
24159then :
24160  printf "%s\n" "#define HAVE_GLOB 1" >>confdefs.h
24161
24162fi
24163ac_fn_c_check_func "$LINENO" "initgroups" "ac_cv_func_initgroups"
24164if test "x$ac_cv_func_initgroups" = xyes
24165then :
24166  printf "%s\n" "#define HAVE_INITGROUPS 1" >>confdefs.h
24167
24168fi
24169ac_fn_c_check_func "$LINENO" "strftime" "ac_cv_func_strftime"
24170if test "x$ac_cv_func_strftime" = xyes
24171then :
24172  printf "%s\n" "#define HAVE_STRFTIME 1" >>confdefs.h
24173
24174fi
24175ac_fn_c_check_func "$LINENO" "localtime_r" "ac_cv_func_localtime_r"
24176if test "x$ac_cv_func_localtime_r" = xyes
24177then :
24178  printf "%s\n" "#define HAVE_LOCALTIME_R 1" >>confdefs.h
24179
24180fi
24181ac_fn_c_check_func "$LINENO" "setusercontext" "ac_cv_func_setusercontext"
24182if test "x$ac_cv_func_setusercontext" = xyes
24183then :
24184  printf "%s\n" "#define HAVE_SETUSERCONTEXT 1" >>confdefs.h
24185
24186fi
24187ac_fn_c_check_func "$LINENO" "_beginthreadex" "ac_cv_func__beginthreadex"
24188if test "x$ac_cv_func__beginthreadex" = xyes
24189then :
24190  printf "%s\n" "#define HAVE__BEGINTHREADEX 1" >>confdefs.h
24191
24192fi
24193ac_fn_c_check_func "$LINENO" "endservent" "ac_cv_func_endservent"
24194if test "x$ac_cv_func_endservent" = xyes
24195then :
24196  printf "%s\n" "#define HAVE_ENDSERVENT 1" >>confdefs.h
24197
24198fi
24199ac_fn_c_check_func "$LINENO" "endprotoent" "ac_cv_func_endprotoent"
24200if test "x$ac_cv_func_endprotoent" = xyes
24201then :
24202  printf "%s\n" "#define HAVE_ENDPROTOENT 1" >>confdefs.h
24203
24204fi
24205ac_fn_c_check_func "$LINENO" "fsync" "ac_cv_func_fsync"
24206if test "x$ac_cv_func_fsync" = xyes
24207then :
24208  printf "%s\n" "#define HAVE_FSYNC 1" >>confdefs.h
24209
24210fi
24211ac_fn_c_check_func "$LINENO" "shmget" "ac_cv_func_shmget"
24212if test "x$ac_cv_func_shmget" = xyes
24213then :
24214  printf "%s\n" "#define HAVE_SHMGET 1" >>confdefs.h
24215
24216fi
24217ac_fn_c_check_func "$LINENO" "accept4" "ac_cv_func_accept4"
24218if test "x$ac_cv_func_accept4" = xyes
24219then :
24220  printf "%s\n" "#define HAVE_ACCEPT4 1" >>confdefs.h
24221
24222fi
24223ac_fn_c_check_func "$LINENO" "getifaddrs" "ac_cv_func_getifaddrs"
24224if test "x$ac_cv_func_getifaddrs" = xyes
24225then :
24226  printf "%s\n" "#define HAVE_GETIFADDRS 1" >>confdefs.h
24227
24228fi
24229ac_fn_c_check_func "$LINENO" "if_nametoindex" "ac_cv_func_if_nametoindex"
24230if test "x$ac_cv_func_if_nametoindex" = xyes
24231then :
24232  printf "%s\n" "#define HAVE_IF_NAMETOINDEX 1" >>confdefs.h
24233
24234fi
24235ac_fn_c_check_func "$LINENO" "poll" "ac_cv_func_poll"
24236if test "x$ac_cv_func_poll" = xyes
24237then :
24238  printf "%s\n" "#define HAVE_POLL 1" >>confdefs.h
24239
24240fi
24241ac_fn_c_check_func "$LINENO" "gettid" "ac_cv_func_gettid"
24242if test "x$ac_cv_func_gettid" = xyes
24243then :
24244  printf "%s\n" "#define HAVE_GETTID 1" >>confdefs.h
24245
24246fi
24247
24248
24249  for ac_func in setresuid
24250do :
24251  ac_fn_c_check_func "$LINENO" "setresuid" "ac_cv_func_setresuid"
24252if test "x$ac_cv_func_setresuid" = xyes
24253then :
24254  printf "%s\n" "#define HAVE_SETRESUID 1" >>confdefs.h
24255
24256else case e in #(
24257  e) ac_fn_c_check_func "$LINENO" "setreuid" "ac_cv_func_setreuid"
24258if test "x$ac_cv_func_setreuid" = xyes
24259then :
24260  printf "%s\n" "#define HAVE_SETREUID 1" >>confdefs.h
24261
24262fi
24263 ;;
24264esac
24265fi
24266
24267done
24268
24269  for ac_func in setresgid
24270do :
24271  ac_fn_c_check_func "$LINENO" "setresgid" "ac_cv_func_setresgid"
24272if test "x$ac_cv_func_setresgid" = xyes
24273then :
24274  printf "%s\n" "#define HAVE_SETRESGID 1" >>confdefs.h
24275
24276else case e in #(
24277  e) ac_fn_c_check_func "$LINENO" "setregid" "ac_cv_func_setregid"
24278if test "x$ac_cv_func_setregid" = xyes
24279then :
24280  printf "%s\n" "#define HAVE_SETREGID 1" >>confdefs.h
24281
24282fi
24283 ;;
24284esac
24285fi
24286
24287done
24288
24289# check if setreuid en setregid fail, on MacOSX10.4(darwin8).
24290if echo $host_os | grep darwin8 > /dev/null; then
24291
24292printf "%s\n" "#define DARWIN_BROKEN_SETREUID 1" >>confdefs.h
24293
24294fi
24295
24296{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for atomic_store" >&5
24297printf %s "checking for atomic_store... " >&6; }
24298cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24299/* end confdefs.h.  */
24300$ac_includes_default
24301#ifdef HAVE_STDATOMIC_H
24302#include <stdatomic.h>
24303#endif
24304
24305int
24306main (void)
24307{
24308
24309	int newvar = 5, var = 0;
24310	atomic_store((_Atomic int*)&var, newvar);
24311	newvar = 0;
24312	/* condition to use the variables. */
24313	if(var == newvar) return 1;
24314
24315  ;
24316  return 0;
24317}
24318_ACEOF
24319if ac_fn_c_try_link "$LINENO"
24320then :
24321
24322	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24323printf "%s\n" "yes" >&6; }
24324
24325printf "%s\n" "#define HAVE_LINK_ATOMIC_STORE 1" >>confdefs.h
24326
24327
24328else case e in #(
24329  e)
24330	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
24331printf "%s\n" "no" >&6; }
24332 ;;
24333esac
24334fi
24335rm -f core conftest.err conftest.$ac_objext conftest.beam \
24336    conftest$ac_exeext conftest.$ac_ext
24337
24338ac_fn_check_decl "$LINENO" "inet_pton" "ac_cv_have_decl_inet_pton" "
24339$ac_includes_default
24340#ifdef HAVE_NETINET_IN_H
24341#include <netinet/in.h>
24342#endif
24343
24344#ifdef HAVE_NETINET_TCP_H
24345#include <netinet/tcp.h>
24346#endif
24347
24348#ifdef HAVE_ARPA_INET_H
24349#include <arpa/inet.h>
24350#endif
24351
24352#ifdef HAVE_WINSOCK2_H
24353#include <winsock2.h>
24354#endif
24355
24356#ifdef HAVE_WS2TCPIP_H
24357#include <ws2tcpip.h>
24358#endif
24359
24360" "$ac_c_undeclared_builtin_options" "CFLAGS"
24361if test "x$ac_cv_have_decl_inet_pton" = xyes
24362then :
24363  ac_have_decl=1
24364else case e in #(
24365  e) ac_have_decl=0 ;;
24366esac
24367fi
24368printf "%s\n" "#define HAVE_DECL_INET_PTON $ac_have_decl" >>confdefs.h
24369ac_fn_check_decl "$LINENO" "inet_ntop" "ac_cv_have_decl_inet_ntop" "
24370$ac_includes_default
24371#ifdef HAVE_NETINET_IN_H
24372#include <netinet/in.h>
24373#endif
24374
24375#ifdef HAVE_NETINET_TCP_H
24376#include <netinet/tcp.h>
24377#endif
24378
24379#ifdef HAVE_ARPA_INET_H
24380#include <arpa/inet.h>
24381#endif
24382
24383#ifdef HAVE_WINSOCK2_H
24384#include <winsock2.h>
24385#endif
24386
24387#ifdef HAVE_WS2TCPIP_H
24388#include <ws2tcpip.h>
24389#endif
24390
24391" "$ac_c_undeclared_builtin_options" "CFLAGS"
24392if test "x$ac_cv_have_decl_inet_ntop" = xyes
24393then :
24394  ac_have_decl=1
24395else case e in #(
24396  e) ac_have_decl=0 ;;
24397esac
24398fi
24399printf "%s\n" "#define HAVE_DECL_INET_NTOP $ac_have_decl" >>confdefs.h
24400
24401ac_fn_c_check_func "$LINENO" "inet_aton" "ac_cv_func_inet_aton"
24402if test "x$ac_cv_func_inet_aton" = xyes
24403then :
24404  printf "%s\n" "#define HAVE_INET_ATON 1" >>confdefs.h
24405
24406else case e in #(
24407  e) case " $LIBOBJS " in
24408  *" inet_aton.$ac_objext "* ) ;;
24409  *) LIBOBJS="$LIBOBJS inet_aton.$ac_objext"
24410 ;;
24411esac
24412 ;;
24413esac
24414fi
24415
24416ac_fn_c_check_func "$LINENO" "inet_pton" "ac_cv_func_inet_pton"
24417if test "x$ac_cv_func_inet_pton" = xyes
24418then :
24419  printf "%s\n" "#define HAVE_INET_PTON 1" >>confdefs.h
24420
24421else case e in #(
24422  e) case " $LIBOBJS " in
24423  *" inet_pton.$ac_objext "* ) ;;
24424  *) LIBOBJS="$LIBOBJS inet_pton.$ac_objext"
24425 ;;
24426esac
24427 ;;
24428esac
24429fi
24430
24431ac_fn_c_check_func "$LINENO" "inet_ntop" "ac_cv_func_inet_ntop"
24432if test "x$ac_cv_func_inet_ntop" = xyes
24433then :
24434  printf "%s\n" "#define HAVE_INET_NTOP 1" >>confdefs.h
24435
24436else case e in #(
24437  e) case " $LIBOBJS " in
24438  *" inet_ntop.$ac_objext "* ) ;;
24439  *) LIBOBJS="$LIBOBJS inet_ntop.$ac_objext"
24440 ;;
24441esac
24442 ;;
24443esac
24444fi
24445
24446ac_fn_c_check_func "$LINENO" "snprintf" "ac_cv_func_snprintf"
24447if test "x$ac_cv_func_snprintf" = xyes
24448then :
24449  printf "%s\n" "#define HAVE_SNPRINTF 1" >>confdefs.h
24450
24451else case e in #(
24452  e) case " $LIBOBJS " in
24453  *" snprintf.$ac_objext "* ) ;;
24454  *) LIBOBJS="$LIBOBJS snprintf.$ac_objext"
24455 ;;
24456esac
24457 ;;
24458esac
24459fi
24460
24461# test if snprintf return the proper length
24462if test "x$ac_cv_func_snprintf" = xyes; then
24463    if test c${cross_compiling} = cno; then
24464	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for correct snprintf return value" >&5
24465printf %s "checking for correct snprintf return value... " >&6; }
24466	if test "$cross_compiling" = yes
24467then :
24468  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: maybe" >&5
24469printf "%s\n" "maybe" >&6; }
24470else case e in #(
24471  e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24472/* end confdefs.h.  */
24473$ac_includes_default
24474
24475int main(void) { return !(snprintf(NULL, 0, "test") == 4); }
24476
24477_ACEOF
24478if ac_fn_c_try_run "$LINENO"
24479then :
24480  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24481printf "%s\n" "yes" >&6; }
24482else case e in #(
24483  e)
24484		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
24485printf "%s\n" "no" >&6; }
24486
24487printf "%s\n" "#define SNPRINTF_RET_BROKEN /**/" >>confdefs.h
24488
24489		case " $LIBOBJS " in
24490  *" snprintf.$ac_objext "* ) ;;
24491  *) LIBOBJS="$LIBOBJS snprintf.$ac_objext"
24492 ;;
24493esac
24494
24495	   ;;
24496esac
24497fi
24498rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24499  conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
24500esac
24501fi
24502
24503    fi
24504fi
24505ac_fn_c_check_func "$LINENO" "strlcat" "ac_cv_func_strlcat"
24506if test "x$ac_cv_func_strlcat" = xyes
24507then :
24508  printf "%s\n" "#define HAVE_STRLCAT 1" >>confdefs.h
24509
24510else case e in #(
24511  e) case " $LIBOBJS " in
24512  *" strlcat.$ac_objext "* ) ;;
24513  *) LIBOBJS="$LIBOBJS strlcat.$ac_objext"
24514 ;;
24515esac
24516 ;;
24517esac
24518fi
24519
24520ac_fn_c_check_func "$LINENO" "strlcpy" "ac_cv_func_strlcpy"
24521if test "x$ac_cv_func_strlcpy" = xyes
24522then :
24523  printf "%s\n" "#define HAVE_STRLCPY 1" >>confdefs.h
24524
24525else case e in #(
24526  e) case " $LIBOBJS " in
24527  *" strlcpy.$ac_objext "* ) ;;
24528  *) LIBOBJS="$LIBOBJS strlcpy.$ac_objext"
24529 ;;
24530esac
24531 ;;
24532esac
24533fi
24534
24535ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove"
24536if test "x$ac_cv_func_memmove" = xyes
24537then :
24538  printf "%s\n" "#define HAVE_MEMMOVE 1" >>confdefs.h
24539
24540else case e in #(
24541  e) case " $LIBOBJS " in
24542  *" memmove.$ac_objext "* ) ;;
24543  *) LIBOBJS="$LIBOBJS memmove.$ac_objext"
24544 ;;
24545esac
24546 ;;
24547esac
24548fi
24549
24550ac_fn_c_check_func "$LINENO" "gmtime_r" "ac_cv_func_gmtime_r"
24551if test "x$ac_cv_func_gmtime_r" = xyes
24552then :
24553  printf "%s\n" "#define HAVE_GMTIME_R 1" >>confdefs.h
24554
24555else case e in #(
24556  e) case " $LIBOBJS " in
24557  *" gmtime_r.$ac_objext "* ) ;;
24558  *) LIBOBJS="$LIBOBJS gmtime_r.$ac_objext"
24559 ;;
24560esac
24561 ;;
24562esac
24563fi
24564
24565ac_fn_c_check_func "$LINENO" "isblank" "ac_cv_func_isblank"
24566if test "x$ac_cv_func_isblank" = xyes
24567then :
24568  printf "%s\n" "#define HAVE_ISBLANK 1" >>confdefs.h
24569
24570else case e in #(
24571  e) case " $LIBOBJS " in
24572  *" isblank.$ac_objext "* ) ;;
24573  *) LIBOBJS="$LIBOBJS isblank.$ac_objext"
24574 ;;
24575esac
24576 ;;
24577esac
24578fi
24579
24580ac_fn_c_check_func "$LINENO" "explicit_bzero" "ac_cv_func_explicit_bzero"
24581if test "x$ac_cv_func_explicit_bzero" = xyes
24582then :
24583  printf "%s\n" "#define HAVE_EXPLICIT_BZERO 1" >>confdefs.h
24584
24585else case e in #(
24586  e) case " $LIBOBJS " in
24587  *" explicit_bzero.$ac_objext "* ) ;;
24588  *) LIBOBJS="$LIBOBJS explicit_bzero.$ac_objext"
24589 ;;
24590esac
24591 ;;
24592esac
24593fi
24594
24595LIBOBJ_WITHOUT_CTIMEARC4="$LIBOBJS"
24596
24597{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for reallocarray" >&5
24598printf %s "checking for reallocarray... " >&6; }
24599cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24600/* end confdefs.h.  */
24601$ac_includes_default
24602
24603#ifndef _OPENBSD_SOURCE
24604#define _OPENBSD_SOURCE 1
24605#endif
24606#include <stdlib.h>
24607int main(void) {
24608	void* p = reallocarray(NULL, 10, 100);
24609	free(p);
24610	return 0;
24611}
24612
24613_ACEOF
24614if ac_fn_c_try_link "$LINENO"
24615then :
24616  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24617printf "%s\n" "yes" >&6; }
24618
24619printf "%s\n" "#define HAVE_REALLOCARRAY 1" >>confdefs.h
24620
24621
24622else case e in #(
24623  e)
24624	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
24625printf "%s\n" "no" >&6; }
24626	case " $LIBOBJS " in
24627  *" reallocarray.$ac_objext "* ) ;;
24628  *) LIBOBJS="$LIBOBJS reallocarray.$ac_objext"
24629 ;;
24630esac
24631
24632 ;;
24633esac
24634fi
24635rm -f core conftest.err conftest.$ac_objext conftest.beam \
24636    conftest$ac_exeext conftest.$ac_ext
24637ac_fn_check_decl "$LINENO" "reallocarray" "ac_cv_have_decl_reallocarray" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
24638if test "x$ac_cv_have_decl_reallocarray" = xyes
24639then :
24640  ac_have_decl=1
24641else case e in #(
24642  e) ac_have_decl=0 ;;
24643esac
24644fi
24645printf "%s\n" "#define HAVE_DECL_REALLOCARRAY $ac_have_decl" >>confdefs.h
24646
24647if test "$USE_NSS" = "no"; then
24648	ac_fn_c_check_func "$LINENO" "arc4random" "ac_cv_func_arc4random"
24649if test "x$ac_cv_func_arc4random" = xyes
24650then :
24651  printf "%s\n" "#define HAVE_ARC4RANDOM 1" >>confdefs.h
24652
24653else case e in #(
24654  e) case " $LIBOBJS " in
24655  *" arc4random.$ac_objext "* ) ;;
24656  *) LIBOBJS="$LIBOBJS arc4random.$ac_objext"
24657 ;;
24658esac
24659 ;;
24660esac
24661fi
24662
24663	ac_fn_c_check_func "$LINENO" "arc4random_uniform" "ac_cv_func_arc4random_uniform"
24664if test "x$ac_cv_func_arc4random_uniform" = xyes
24665then :
24666  printf "%s\n" "#define HAVE_ARC4RANDOM_UNIFORM 1" >>confdefs.h
24667
24668else case e in #(
24669  e) case " $LIBOBJS " in
24670  *" arc4random_uniform.$ac_objext "* ) ;;
24671  *) LIBOBJS="$LIBOBJS arc4random_uniform.$ac_objext"
24672 ;;
24673esac
24674 ;;
24675esac
24676fi
24677
24678	if test "$ac_cv_func_arc4random" = "no"; then
24679		case " $LIBOBJS " in
24680  *" arc4_lock.$ac_objext "* ) ;;
24681  *) LIBOBJS="$LIBOBJS arc4_lock.$ac_objext"
24682 ;;
24683esac
24684
24685
24686  for ac_func in getentropy
24687do :
24688  ac_fn_c_check_func "$LINENO" "getentropy" "ac_cv_func_getentropy"
24689if test "x$ac_cv_func_getentropy" = xyes
24690then :
24691  printf "%s\n" "#define HAVE_GETENTROPY 1" >>confdefs.h
24692
24693else case e in #(
24694  e)
24695		    if test "$USE_WINSOCK" = 1; then
24696			case " $LIBOBJS " in
24697  *" getentropy_win.$ac_objext "* ) ;;
24698  *) LIBOBJS="$LIBOBJS getentropy_win.$ac_objext"
24699 ;;
24700esac
24701
24702		    else
24703			case "$host" in
24704			Darwin|*darwin*)
24705				case " $LIBOBJS " in
24706  *" getentropy_osx.$ac_objext "* ) ;;
24707  *) LIBOBJS="$LIBOBJS getentropy_osx.$ac_objext"
24708 ;;
24709esac
24710
24711			;;
24712			*solaris*|*sunos*|SunOS)
24713				case " $LIBOBJS " in
24714  *" getentropy_solaris.$ac_objext "* ) ;;
24715  *) LIBOBJS="$LIBOBJS getentropy_solaris.$ac_objext"
24716 ;;
24717esac
24718
24719				       for ac_header in sys/sha2.h
24720do :
24721  ac_fn_c_check_header_compile "$LINENO" "sys/sha2.h" "ac_cv_header_sys_sha2_h" "$ac_includes_default
24722"
24723if test "x$ac_cv_header_sys_sha2_h" = xyes
24724then :
24725  printf "%s\n" "#define HAVE_SYS_SHA2_H 1" >>confdefs.h
24726
24727else case e in #(
24728  e)
24729
24730  for ac_func in SHA512_Update
24731do :
24732  ac_fn_c_check_func "$LINENO" "SHA512_Update" "ac_cv_func_SHA512_Update"
24733if test "x$ac_cv_func_SHA512_Update" = xyes
24734then :
24735  printf "%s\n" "#define HAVE_SHA512_UPDATE 1" >>confdefs.h
24736
24737else case e in #(
24738  e)
24739						case " $LIBOBJS " in
24740  *" sha512.$ac_objext "* ) ;;
24741  *) LIBOBJS="$LIBOBJS sha512.$ac_objext"
24742 ;;
24743esac
24744
24745					 ;;
24746esac
24747fi
24748
24749done
24750				 ;;
24751esac
24752fi
24753
24754done
24755				if test "$ac_cv_header_sys_sha2_h" = "yes"; then
24756					# this lib needed for sha2 on solaris
24757					LIBS="$LIBS -lmd"
24758				fi
24759				{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5
24760printf %s "checking for library containing clock_gettime... " >&6; }
24761if test ${ac_cv_search_clock_gettime+y}
24762then :
24763  printf %s "(cached) " >&6
24764else case e in #(
24765  e) ac_func_search_save_LIBS=$LIBS
24766cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24767/* end confdefs.h.  */
24768
24769/* Override any GCC internal prototype to avoid an error.
24770   Use char because int might match the return type of a GCC
24771   builtin and then its argument prototype would still apply.
24772   The 'extern "C"' is for builds by C++ compilers;
24773   although this is not generally supported in C code supporting it here
24774   has little cost and some practical benefit (sr 110532).  */
24775#ifdef __cplusplus
24776extern "C"
24777#endif
24778char clock_gettime (void);
24779int
24780main (void)
24781{
24782return clock_gettime ();
24783  ;
24784  return 0;
24785}
24786_ACEOF
24787for ac_lib in '' rt
24788do
24789  if test -z "$ac_lib"; then
24790    ac_res="none required"
24791  else
24792    ac_res=-l$ac_lib
24793    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
24794  fi
24795  if ac_fn_c_try_link "$LINENO"
24796then :
24797  ac_cv_search_clock_gettime=$ac_res
24798fi
24799rm -f core conftest.err conftest.$ac_objext conftest.beam \
24800    conftest$ac_exeext
24801  if test ${ac_cv_search_clock_gettime+y}
24802then :
24803  break
24804fi
24805done
24806if test ${ac_cv_search_clock_gettime+y}
24807then :
24808
24809else case e in #(
24810  e) ac_cv_search_clock_gettime=no ;;
24811esac
24812fi
24813rm conftest.$ac_ext
24814LIBS=$ac_func_search_save_LIBS ;;
24815esac
24816fi
24817{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5
24818printf "%s\n" "$ac_cv_search_clock_gettime" >&6; }
24819ac_res=$ac_cv_search_clock_gettime
24820if test "$ac_res" != no
24821then :
24822  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
24823
24824fi
24825
24826			;;
24827			*freebsd*|*FreeBSD)
24828				case " $LIBOBJS " in
24829  *" getentropy_freebsd.$ac_objext "* ) ;;
24830  *) LIBOBJS="$LIBOBJS getentropy_freebsd.$ac_objext"
24831 ;;
24832esac
24833
24834			;;
24835			*linux*|Linux|*)
24836				case " $LIBOBJS " in
24837  *" getentropy_linux.$ac_objext "* ) ;;
24838  *) LIBOBJS="$LIBOBJS getentropy_linux.$ac_objext"
24839 ;;
24840esac
24841
24842
24843  for ac_func in SHA512_Update
24844do :
24845  ac_fn_c_check_func "$LINENO" "SHA512_Update" "ac_cv_func_SHA512_Update"
24846if test "x$ac_cv_func_SHA512_Update" = xyes
24847then :
24848  printf "%s\n" "#define HAVE_SHA512_UPDATE 1" >>confdefs.h
24849
24850else case e in #(
24851  e)
24852
24853printf "%s\n" "#define COMPAT_SHA512 1" >>confdefs.h
24854
24855					case " $LIBOBJS " in
24856  *" sha512.$ac_objext "* ) ;;
24857  *) LIBOBJS="$LIBOBJS sha512.$ac_objext"
24858 ;;
24859esac
24860
24861				 ;;
24862esac
24863fi
24864
24865done
24866				ac_fn_c_check_header_compile "$LINENO" "sys/sysctl.h" "ac_cv_header_sys_sysctl_h" "$ac_includes_default
24867"
24868if test "x$ac_cv_header_sys_sysctl_h" = xyes
24869then :
24870  printf "%s\n" "#define HAVE_SYS_SYSCTL_H 1" >>confdefs.h
24871
24872fi
24873
24874				ac_fn_c_check_func "$LINENO" "getauxval" "ac_cv_func_getauxval"
24875if test "x$ac_cv_func_getauxval" = xyes
24876then :
24877  printf "%s\n" "#define HAVE_GETAUXVAL 1" >>confdefs.h
24878
24879fi
24880
24881				{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5
24882printf %s "checking for library containing clock_gettime... " >&6; }
24883if test ${ac_cv_search_clock_gettime+y}
24884then :
24885  printf %s "(cached) " >&6
24886else case e in #(
24887  e) ac_func_search_save_LIBS=$LIBS
24888cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24889/* end confdefs.h.  */
24890
24891/* Override any GCC internal prototype to avoid an error.
24892   Use char because int might match the return type of a GCC
24893   builtin and then its argument prototype would still apply.
24894   The 'extern "C"' is for builds by C++ compilers;
24895   although this is not generally supported in C code supporting it here
24896   has little cost and some practical benefit (sr 110532).  */
24897#ifdef __cplusplus
24898extern "C"
24899#endif
24900char clock_gettime (void);
24901int
24902main (void)
24903{
24904return clock_gettime ();
24905  ;
24906  return 0;
24907}
24908_ACEOF
24909for ac_lib in '' rt
24910do
24911  if test -z "$ac_lib"; then
24912    ac_res="none required"
24913  else
24914    ac_res=-l$ac_lib
24915    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
24916  fi
24917  if ac_fn_c_try_link "$LINENO"
24918then :
24919  ac_cv_search_clock_gettime=$ac_res
24920fi
24921rm -f core conftest.err conftest.$ac_objext conftest.beam \
24922    conftest$ac_exeext
24923  if test ${ac_cv_search_clock_gettime+y}
24924then :
24925  break
24926fi
24927done
24928if test ${ac_cv_search_clock_gettime+y}
24929then :
24930
24931else case e in #(
24932  e) ac_cv_search_clock_gettime=no ;;
24933esac
24934fi
24935rm conftest.$ac_ext
24936LIBS=$ac_func_search_save_LIBS ;;
24937esac
24938fi
24939{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5
24940printf "%s\n" "$ac_cv_search_clock_gettime" >&6; }
24941ac_res=$ac_cv_search_clock_gettime
24942if test "$ac_res" != no
24943then :
24944  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
24945
24946fi
24947
24948			;;
24949			esac
24950		    fi
24951		 ;;
24952esac
24953fi
24954
24955done
24956	fi
24957fi
24958LIBOBJ_WITHOUT_CTIME="$LIBOBJS"
24959
24960ac_fn_c_check_func "$LINENO" "ctime_r" "ac_cv_func_ctime_r"
24961if test "x$ac_cv_func_ctime_r" = xyes
24962then :
24963  printf "%s\n" "#define HAVE_CTIME_R 1" >>confdefs.h
24964
24965else case e in #(
24966  e) case " $LIBOBJS " in
24967  *" ctime_r.$ac_objext "* ) ;;
24968  *) LIBOBJS="$LIBOBJS ctime_r.$ac_objext"
24969 ;;
24970esac
24971 ;;
24972esac
24973fi
24974
24975ac_fn_c_check_func "$LINENO" "strsep" "ac_cv_func_strsep"
24976if test "x$ac_cv_func_strsep" = xyes
24977then :
24978  printf "%s\n" "#define HAVE_STRSEP 1" >>confdefs.h
24979
24980else case e in #(
24981  e) case " $LIBOBJS " in
24982  *" strsep.$ac_objext "* ) ;;
24983  *) LIBOBJS="$LIBOBJS strsep.$ac_objext"
24984 ;;
24985esac
24986 ;;
24987esac
24988fi
24989
24990
24991# Check whether --enable-allsymbols was given.
24992if test ${enable_allsymbols+y}
24993then :
24994  enableval=$enable_allsymbols;
24995fi
24996
24997case "$enable_allsymbols" in
24998	yes)
24999	COMMON_OBJ_ALL_SYMBOLS=""
25000	UBSYMS=""
25001	EXTRALINK="libunbound.la"
25002
25003printf "%s\n" "#define EXPORT_ALL_SYMBOLS 1" >>confdefs.h
25004
25005	;;
25006	no|*)
25007	COMMON_OBJ_ALL_SYMBOLS='$(COMMON_OBJ)'
25008	UBSYMS='-export-symbols $(srcdir)/libunbound/ubsyms.def'
25009	EXTRALINK=""
25010	;;
25011esac
25012
25013
25014
25015if test x_$enable_lock_checks = x_yes; then
25016	UBSYMS="-export-symbols clubsyms.def"
25017	cp ${srcdir}/libunbound/ubsyms.def clubsyms.def
25018	echo lock_protect >> clubsyms.def
25019	echo lock_protect_place >> clubsyms.def
25020	echo lock_unprotect >> clubsyms.def
25021	echo lock_get_mem >> clubsyms.def
25022	echo checklock_start >> clubsyms.def
25023	echo checklock_stop >> clubsyms.def
25024	echo checklock_set_output_name >> clubsyms.def
25025	echo checklock_lock >> clubsyms.def
25026	echo checklock_unlock >> clubsyms.def
25027	echo checklock_init >> clubsyms.def
25028	echo checklock_thrcreate >> clubsyms.def
25029	echo checklock_thrjoin >> clubsyms.def
25030fi
25031
25032# check for dnstap if requested
25033
25034    # Check whether --enable-dnstap was given.
25035if test ${enable_dnstap+y}
25036then :
25037  enableval=$enable_dnstap; opt_dnstap=$enableval
25038else case e in #(
25039  e) opt_dnstap=no ;;
25040esac
25041fi
25042
25043
25044
25045# Check whether --with-dnstap-socket-path was given.
25046if test ${with_dnstap_socket_path+y}
25047then :
25048  withval=$with_dnstap_socket_path; opt_dnstap_socket_path=$withval
25049else case e in #(
25050  e) opt_dnstap_socket_path="$UNBOUND_RUN_DIR/dnstap.sock" ;;
25051esac
25052fi
25053
25054
25055    if test "x$opt_dnstap" != "xno"; then
25056	# Extract the first word of "protoc", so it can be a program name with args.
25057set dummy protoc; ac_word=$2
25058{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25059printf %s "checking for $ac_word... " >&6; }
25060if test ${ac_cv_path_PROTOC+y}
25061then :
25062  printf %s "(cached) " >&6
25063else $as_nop
25064  case $PROTOC in
25065  [\\/]* | ?:[\\/]*)
25066  ac_cv_path_PROTOC="$PROTOC" # Let the user override the test with a path.
25067  ;;
25068  *)
25069  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25070for as_dir in $PATH
25071do
25072  IFS=$as_save_IFS
25073  case $as_dir in #(((
25074    '') as_dir=./ ;;
25075    */) ;;
25076    *) as_dir=$as_dir/ ;;
25077  esac
25078    for ac_exec_ext in '' $ac_executable_extensions; do
25079  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
25080    ac_cv_path_PROTOC="$as_dir$ac_word$ac_exec_ext"
25081    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
25082    break 2
25083  fi
25084done
25085  done
25086IFS=$as_save_IFS
25087
25088  ;;
25089esac
25090fi
25091PROTOC=$ac_cv_path_PROTOC
25092if test -n "$PROTOC"; then
25093  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PROTOC" >&5
25094printf "%s\n" "$PROTOC" >&6; }
25095else
25096  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
25097printf "%s\n" "no" >&6; }
25098fi
25099
25100
25101	# 'protoc-c' is deprecated. We use 'protoc' instead. If it can not be
25102	# found, try 'protoc-c'.
25103	if test -z "$PROTOC"; then
25104	    # Extract the first word of "protoc-c", so it can be a program name with args.
25105set dummy protoc-c; ac_word=$2
25106{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25107printf %s "checking for $ac_word... " >&6; }
25108if test ${ac_cv_path_PROTOC_C+y}
25109then :
25110  printf %s "(cached) " >&6
25111else case e in #(
25112  e) case $PROTOC_C in
25113  [\\/]* | ?:[\\/]*)
25114  ac_cv_path_PROTOC_C="$PROTOC_C" # Let the user override the test with a path.
25115  ;;
25116  *)
25117  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25118for as_dir in $PATH
25119do
25120  IFS=$as_save_IFS
25121  case $as_dir in #(((
25122    '') as_dir=./ ;;
25123    */) ;;
25124    *) as_dir=$as_dir/ ;;
25125  esac
25126    for ac_exec_ext in '' $ac_executable_extensions; do
25127  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
25128    ac_cv_path_PROTOC_C="$as_dir$ac_word$ac_exec_ext"
25129    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
25130    break 2
25131  fi
25132done
25133  done
25134IFS=$as_save_IFS
25135
25136  ;;
25137esac ;;
25138esac
25139fi
25140PROTOC_C=$ac_cv_path_PROTOC_C
25141if test -n "$PROTOC_C"; then
25142  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PROTOC_C" >&5
25143printf "%s\n" "$PROTOC_C" >&6; }
25144else
25145  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
25146printf "%s\n" "no" >&6; }
25147fi
25148
25149
25150	else
25151	    PROTOC_C="$PROTOC"
25152	fi
25153	if test -z "$PROTOC_C"; then
25154	  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
25155	fi
25156
25157	# Check for protoc-gen-c plugin
25158	# Extract the first word of "protoc-gen-c", so it can be a program name with args.
25159set dummy protoc-gen-c; ac_word=$2
25160{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25161printf %s "checking for $ac_word... " >&6; }
25162if test ${ac_cv_path_PROTOC_GEN_C+y}
25163then :
25164  printf %s "(cached) " >&6
25165else $as_nop
25166  case $PROTOC_GEN_C in
25167  [\\/]* | ?:[\\/]*)
25168  ac_cv_path_PROTOC_GEN_C="$PROTOC_GEN_C" # Let the user override the test with a path.
25169  ;;
25170  *)
25171  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25172for as_dir in $PATH
25173do
25174  IFS=$as_save_IFS
25175  case $as_dir in #(((
25176    '') as_dir=./ ;;
25177    */) ;;
25178    *) as_dir=$as_dir/ ;;
25179  esac
25180    for ac_exec_ext in '' $ac_executable_extensions; do
25181  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
25182    ac_cv_path_PROTOC_GEN_C="$as_dir$ac_word$ac_exec_ext"
25183    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
25184    break 2
25185  fi
25186done
25187  done
25188IFS=$as_save_IFS
25189
25190  ;;
25191esac
25192fi
25193PROTOC_GEN_C=$ac_cv_path_PROTOC_GEN_C
25194if test -n "$PROTOC_GEN_C"; then
25195  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PROTOC_GEN_C" >&5
25196printf "%s\n" "$PROTOC_GEN_C" >&6; }
25197else
25198  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
25199printf "%s\n" "no" >&6; }
25200fi
25201
25202
25203	if test -z "$PROTOC_GEN_C"; then
25204	  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
25205	fi
25206
25207	# Test that protoc-gen-c actually works
25208	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if protoc-gen-c plugin works" >&5
25209printf %s "checking if protoc-gen-c plugin works... " >&6; }
25210	cat > conftest.proto << EOF
25211syntax = "proto2";
25212message TestMessage {
25213  optional string test_field = 1;
25214}
25215EOF
25216	if $PROTOC_C --c_out=. conftest.proto >/dev/null 2>&1; then
25217	  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
25218printf "%s\n" "yes" >&6; }
25219	  rm -f conftest.proto conftest.pb-c.c conftest.pb-c.h
25220	else
25221	  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
25222printf "%s\n" "no" >&6; }
25223	  rm -f conftest.proto conftest.pb-c.c conftest.pb-c.h
25224	  as_fn_error $? "The protoc-gen-c plugin is not working properly. Please ensure protobuf-c-compiler is properly installed" "$LINENO" 5
25225	fi
25226
25227
25228# Check whether --with-protobuf-c was given.
25229if test ${with_protobuf_c+y}
25230then :
25231  withval=$with_protobuf_c;
25232                # workaround for protobuf-c includes at old dir before protobuf-c-1.0.0
25233                if test -f $withval/include/google/protobuf-c/protobuf-c.h; then
25234                    CFLAGS="$CFLAGS -I$withval/include/google"
25235                else
25236                    CFLAGS="$CFLAGS -I$withval/include"
25237                fi
25238                LDFLAGS="$LDFLAGS -L$withval/lib"
25239
25240else case e in #(
25241  e)
25242                if test -n "$PKG_CONFIG"; then
25243
25244pkg_failed=no
25245{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for PROTOBUFC" >&5
25246printf %s "checking for PROTOBUFC... " >&6; }
25247
25248if test -n "$PROTOBUFC_CFLAGS"; then
25249    pkg_cv_PROTOBUFC_CFLAGS="$PROTOBUFC_CFLAGS"
25250 elif test -n "$PKG_CONFIG"; then
25251    if test -n "$PKG_CONFIG" && \
25252    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libprotobuf-c\""; } >&5
25253  ($PKG_CONFIG --exists --print-errors "libprotobuf-c") 2>&5
25254  ac_status=$?
25255  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
25256  test $ac_status = 0; }; then
25257  pkg_cv_PROTOBUFC_CFLAGS=`$PKG_CONFIG --cflags "libprotobuf-c" 2>/dev/null`
25258		      test "x$?" != "x0" && pkg_failed=yes
25259else
25260  pkg_failed=yes
25261fi
25262 else
25263    pkg_failed=untried
25264fi
25265if test -n "$PROTOBUFC_LIBS"; then
25266    pkg_cv_PROTOBUFC_LIBS="$PROTOBUFC_LIBS"
25267 elif test -n "$PKG_CONFIG"; then
25268    if test -n "$PKG_CONFIG" && \
25269    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libprotobuf-c\""; } >&5
25270  ($PKG_CONFIG --exists --print-errors "libprotobuf-c") 2>&5
25271  ac_status=$?
25272  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
25273  test $ac_status = 0; }; then
25274  pkg_cv_PROTOBUFC_LIBS=`$PKG_CONFIG --libs "libprotobuf-c" 2>/dev/null`
25275		      test "x$?" != "x0" && pkg_failed=yes
25276else
25277  pkg_failed=yes
25278fi
25279 else
25280    pkg_failed=untried
25281fi
25282
25283
25284
25285if test $pkg_failed = yes; then
25286   	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
25287printf "%s\n" "no" >&6; }
25288
25289if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
25290        _pkg_short_errors_supported=yes
25291else
25292        _pkg_short_errors_supported=no
25293fi
25294        if test $_pkg_short_errors_supported = yes; then
25295	        PROTOBUFC_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libprotobuf-c" 2>&1`
25296        else
25297	        PROTOBUFC_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libprotobuf-c" 2>&1`
25298        fi
25299	# Put the nasty error message in config.log where it belongs
25300	echo "$PROTOBUFC_PKG_ERRORS" >&5
25301
25302
25303                            # pkg-config failed; try falling back to known values
25304                            # workaround for protobuf-c includes at old dir before protobuf-c-1.0.0
25305                            if test -f /usr/include/google/protobuf-c/protobuf-c.h; then
25306                                CFLAGS="$CFLAGS -I/usr/include/google"
25307                            else
25308                                if test -f /usr/local/include/google/protobuf-c/protobuf-c.h; then
25309                                    CFLAGS="$CFLAGS -I/usr/local/include/google"
25310                                    LDFLAGS="$LDFLAGS -L/usr/local/lib"
25311                                else
25312                                    as_fn_error $? "The protobuf-c package was not found with pkg-config. Please install protobuf-c!" "$LINENO" 5
25313                                fi
25314                            fi
25315
25316
25317elif test $pkg_failed = untried; then
25318     	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
25319printf "%s\n" "no" >&6; }
25320
25321                            # pkg-config failed; try falling back to known values
25322                            # workaround for protobuf-c includes at old dir before protobuf-c-1.0.0
25323                            if test -f /usr/include/google/protobuf-c/protobuf-c.h; then
25324                                CFLAGS="$CFLAGS -I/usr/include/google"
25325                            else
25326                                if test -f /usr/local/include/google/protobuf-c/protobuf-c.h; then
25327                                    CFLAGS="$CFLAGS -I/usr/local/include/google"
25328                                    LDFLAGS="$LDFLAGS -L/usr/local/lib"
25329                                else
25330                                    as_fn_error $? "The protobuf-c package was not found with pkg-config. Please install protobuf-c!" "$LINENO" 5
25331                                fi
25332                            fi
25333
25334
25335else
25336	PROTOBUFC_CFLAGS=$pkg_cv_PROTOBUFC_CFLAGS
25337	PROTOBUFC_LIBS=$pkg_cv_PROTOBUFC_LIBS
25338        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
25339printf "%s\n" "yes" >&6; }
25340
25341                            CFLAGS="$CFLAGS $PROTOBUFC_CFLAGS"
25342                            LIBS="$LIBS $PROTOBUFC_LIBS"
25343
25344fi
25345                else
25346                    # workaround for protobuf-c includes at old dir before protobuf-c-1.0.0
25347                    if test -f /usr/include/google/protobuf-c/protobuf-c.h; then
25348                        CFLAGS="$CFLAGS -I/usr/include/google"
25349                    else
25350                        if test -f /usr/local/include/google/protobuf-c/protobuf-c.h; then
25351                            CFLAGS="$CFLAGS -I/usr/local/include/google"
25352                            LDFLAGS="$LDFLAGS -L/usr/local/lib"
25353                        fi
25354                    fi
25355                fi
25356
25357         ;;
25358esac
25359fi
25360
25361        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing protobuf_c_message_pack" >&5
25362printf %s "checking for library containing protobuf_c_message_pack... " >&6; }
25363if test ${ac_cv_search_protobuf_c_message_pack+y}
25364then :
25365  printf %s "(cached) " >&6
25366else case e in #(
25367  e) ac_func_search_save_LIBS=$LIBS
25368cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25369/* end confdefs.h.  */
25370
25371/* Override any GCC internal prototype to avoid an error.
25372   Use char because int might match the return type of a GCC
25373   builtin and then its argument prototype would still apply.
25374   The 'extern "C"' is for builds by C++ compilers;
25375   although this is not generally supported in C code supporting it here
25376   has little cost and some practical benefit (sr 110532).  */
25377#ifdef __cplusplus
25378extern "C"
25379#endif
25380char protobuf_c_message_pack (void);
25381int
25382main (void)
25383{
25384return protobuf_c_message_pack ();
25385  ;
25386  return 0;
25387}
25388_ACEOF
25389for ac_lib in '' protobuf-c
25390do
25391  if test -z "$ac_lib"; then
25392    ac_res="none required"
25393  else
25394    ac_res=-l$ac_lib
25395    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
25396  fi
25397  if ac_fn_c_try_link "$LINENO"
25398then :
25399  ac_cv_search_protobuf_c_message_pack=$ac_res
25400fi
25401rm -f core conftest.err conftest.$ac_objext conftest.beam \
25402    conftest$ac_exeext
25403  if test ${ac_cv_search_protobuf_c_message_pack+y}
25404then :
25405  break
25406fi
25407done
25408if test ${ac_cv_search_protobuf_c_message_pack+y}
25409then :
25410
25411else case e in #(
25412  e) ac_cv_search_protobuf_c_message_pack=no ;;
25413esac
25414fi
25415rm conftest.$ac_ext
25416LIBS=$ac_func_search_save_LIBS ;;
25417esac
25418fi
25419{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_protobuf_c_message_pack" >&5
25420printf "%s\n" "$ac_cv_search_protobuf_c_message_pack" >&6; }
25421ac_res=$ac_cv_search_protobuf_c_message_pack
25422if test "$ac_res" != no
25423then :
25424  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
25425
25426else case e in #(
25427  e) as_fn_error $? "The protobuf-c library was not found. Please install the development libraries for protobuf-c!" "$LINENO" 5 ;;
25428esac
25429fi
25430
25431
25432
25433printf "%s\n" "#define USE_DNSTAP 1" >>confdefs.h
25434
25435        ENABLE_DNSTAP=1
25436
25437
25438
25439        hdr_dnstap_socket_path="`echo $opt_dnstap_socket_path | sed -e 's/\\\\/\\\\\\\\/g'`"
25440
25441
25442printf "%s\n" "#define DNSTAP_SOCKET_PATH \"$hdr_dnstap_socket_path\"" >>confdefs.h
25443
25444	DNSTAP_SOCKET_PATH="$hdr_dnstap_socket_path"
25445
25446	DNSTAP_SOCKET_TESTBIN='unbound-dnstap-socket$(EXEEXT)'
25447
25448        DNSTAP_SRC="dnstap/dnstap.c dnstap/dnstap.pb-c.c dnstap/dnstap_fstrm.c dnstap/dtstream.c"
25449
25450        DNSTAP_OBJ="dnstap.lo dnstap.pb-c.lo dnstap_fstrm.lo dtstream.lo"
25451
25452
25453    else
25454
25455        ENABLE_DNSTAP=0
25456
25457
25458
25459    fi
25460
25461
25462# check for dnscrypt if requested
25463
25464  # Check whether --enable-dnscrypt was given.
25465if test ${enable_dnscrypt+y}
25466then :
25467  enableval=$enable_dnscrypt; opt_dnscrypt=$enableval
25468else case e in #(
25469  e) opt_dnscrypt=no ;;
25470esac
25471fi
25472
25473
25474  if test "x$opt_dnscrypt" != "xno"; then
25475
25476# Check whether --with-libsodium was given.
25477if test ${with_libsodium+y}
25478then :
25479  withval=$with_libsodium;
25480	CFLAGS="$CFLAGS -I$withval/include"
25481	LDFLAGS="$LDFLAGS -L$withval/lib"
25482
25483fi
25484
25485    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing sodium_init" >&5
25486printf %s "checking for library containing sodium_init... " >&6; }
25487if test ${ac_cv_search_sodium_init+y}
25488then :
25489  printf %s "(cached) " >&6
25490else case e in #(
25491  e) ac_func_search_save_LIBS=$LIBS
25492cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25493/* end confdefs.h.  */
25494
25495/* Override any GCC internal prototype to avoid an error.
25496   Use char because int might match the return type of a GCC
25497   builtin and then its argument prototype would still apply.
25498   The 'extern "C"' is for builds by C++ compilers;
25499   although this is not generally supported in C code supporting it here
25500   has little cost and some practical benefit (sr 110532).  */
25501#ifdef __cplusplus
25502extern "C"
25503#endif
25504char sodium_init (void);
25505int
25506main (void)
25507{
25508return sodium_init ();
25509  ;
25510  return 0;
25511}
25512_ACEOF
25513for ac_lib in '' sodium
25514do
25515  if test -z "$ac_lib"; then
25516    ac_res="none required"
25517  else
25518    ac_res=-l$ac_lib
25519    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
25520  fi
25521  if ac_fn_c_try_link "$LINENO"
25522then :
25523  ac_cv_search_sodium_init=$ac_res
25524fi
25525rm -f core conftest.err conftest.$ac_objext conftest.beam \
25526    conftest$ac_exeext
25527  if test ${ac_cv_search_sodium_init+y}
25528then :
25529  break
25530fi
25531done
25532if test ${ac_cv_search_sodium_init+y}
25533then :
25534
25535else case e in #(
25536  e) ac_cv_search_sodium_init=no ;;
25537esac
25538fi
25539rm conftest.$ac_ext
25540LIBS=$ac_func_search_save_LIBS ;;
25541esac
25542fi
25543{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sodium_init" >&5
25544printf "%s\n" "$ac_cv_search_sodium_init" >&6; }
25545ac_res=$ac_cv_search_sodium_init
25546if test "$ac_res" != no
25547then :
25548  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
25549
25550else case e in #(
25551  e) as_fn_error $? "The sodium library was not found. Please install sodium!" "$LINENO" 5 ;;
25552esac
25553fi
25554
25555    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing crypto_box_curve25519xchacha20poly1305_beforenm" >&5
25556printf %s "checking for library containing crypto_box_curve25519xchacha20poly1305_beforenm... " >&6; }
25557if test ${ac_cv_search_crypto_box_curve25519xchacha20poly1305_beforenm+y}
25558then :
25559  printf %s "(cached) " >&6
25560else case e in #(
25561  e) ac_func_search_save_LIBS=$LIBS
25562cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25563/* end confdefs.h.  */
25564
25565/* Override any GCC internal prototype to avoid an error.
25566   Use char because int might match the return type of a GCC
25567   builtin and then its argument prototype would still apply.
25568   The 'extern "C"' is for builds by C++ compilers;
25569   although this is not generally supported in C code supporting it here
25570   has little cost and some practical benefit (sr 110532).  */
25571#ifdef __cplusplus
25572extern "C"
25573#endif
25574char crypto_box_curve25519xchacha20poly1305_beforenm (void);
25575int
25576main (void)
25577{
25578return crypto_box_curve25519xchacha20poly1305_beforenm ();
25579  ;
25580  return 0;
25581}
25582_ACEOF
25583for ac_lib in '' sodium
25584do
25585  if test -z "$ac_lib"; then
25586    ac_res="none required"
25587  else
25588    ac_res=-l$ac_lib
25589    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
25590  fi
25591  if ac_fn_c_try_link "$LINENO"
25592then :
25593  ac_cv_search_crypto_box_curve25519xchacha20poly1305_beforenm=$ac_res
25594fi
25595rm -f core conftest.err conftest.$ac_objext conftest.beam \
25596    conftest$ac_exeext
25597  if test ${ac_cv_search_crypto_box_curve25519xchacha20poly1305_beforenm+y}
25598then :
25599  break
25600fi
25601done
25602if test ${ac_cv_search_crypto_box_curve25519xchacha20poly1305_beforenm+y}
25603then :
25604
25605else case e in #(
25606  e) ac_cv_search_crypto_box_curve25519xchacha20poly1305_beforenm=no ;;
25607esac
25608fi
25609rm conftest.$ac_ext
25610LIBS=$ac_func_search_save_LIBS ;;
25611esac
25612fi
25613{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_crypto_box_curve25519xchacha20poly1305_beforenm" >&5
25614printf "%s\n" "$ac_cv_search_crypto_box_curve25519xchacha20poly1305_beforenm" >&6; }
25615ac_res=$ac_cv_search_crypto_box_curve25519xchacha20poly1305_beforenm
25616if test "$ac_res" != no
25617then :
25618  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
25619
25620            ENABLE_DNSCRYPT_XCHACHA20=1
25621
25622
25623printf "%s\n" "#define USE_DNSCRYPT_XCHACHA20 1" >>confdefs.h
25624
25625
25626else case e in #(
25627  e)
25628            ENABLE_DNSCRYPT_XCHACHA20=0
25629
25630         ;;
25631esac
25632fi
25633
25634    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing sodium_set_misuse_handler" >&5
25635printf %s "checking for library containing sodium_set_misuse_handler... " >&6; }
25636if test ${ac_cv_search_sodium_set_misuse_handler+y}
25637then :
25638  printf %s "(cached) " >&6
25639else case e in #(
25640  e) ac_func_search_save_LIBS=$LIBS
25641cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25642/* end confdefs.h.  */
25643
25644/* Override any GCC internal prototype to avoid an error.
25645   Use char because int might match the return type of a GCC
25646   builtin and then its argument prototype would still apply.
25647   The 'extern "C"' is for builds by C++ compilers;
25648   although this is not generally supported in C code supporting it here
25649   has little cost and some practical benefit (sr 110532).  */
25650#ifdef __cplusplus
25651extern "C"
25652#endif
25653char sodium_set_misuse_handler (void);
25654int
25655main (void)
25656{
25657return sodium_set_misuse_handler ();
25658  ;
25659  return 0;
25660}
25661_ACEOF
25662for ac_lib in '' sodium
25663do
25664  if test -z "$ac_lib"; then
25665    ac_res="none required"
25666  else
25667    ac_res=-l$ac_lib
25668    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
25669  fi
25670  if ac_fn_c_try_link "$LINENO"
25671then :
25672  ac_cv_search_sodium_set_misuse_handler=$ac_res
25673fi
25674rm -f core conftest.err conftest.$ac_objext conftest.beam \
25675    conftest$ac_exeext
25676  if test ${ac_cv_search_sodium_set_misuse_handler+y}
25677then :
25678  break
25679fi
25680done
25681if test ${ac_cv_search_sodium_set_misuse_handler+y}
25682then :
25683
25684else case e in #(
25685  e) ac_cv_search_sodium_set_misuse_handler=no ;;
25686esac
25687fi
25688rm conftest.$ac_ext
25689LIBS=$ac_func_search_save_LIBS ;;
25690esac
25691fi
25692{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sodium_set_misuse_handler" >&5
25693printf "%s\n" "$ac_cv_search_sodium_set_misuse_handler" >&6; }
25694ac_res=$ac_cv_search_sodium_set_misuse_handler
25695if test "$ac_res" != no
25696then :
25697  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
25698
25699
25700printf "%s\n" "#define SODIUM_MISUSE_HANDLER 1" >>confdefs.h
25701
25702
25703fi
25704
25705
25706
25707printf "%s\n" "#define USE_DNSCRYPT 1" >>confdefs.h
25708
25709        ENABLE_DNSCRYPT=1
25710
25711
25712        DNSCRYPT_SRC="dnscrypt/dnscrypt.c"
25713
25714        DNSCRYPT_OBJ="dnscrypt.lo"
25715
25716
25717  else
25718    ENABLE_DNSCRYPT_XCHACHA20=0
25719
25720
25721        ENABLE_DNSCRYPT=0
25722
25723
25724
25725  fi
25726
25727
25728# check for cachedb if requested
25729# Check whether --enable-cachedb was given.
25730if test ${enable_cachedb+y}
25731then :
25732  enableval=$enable_cachedb;
25733fi
25734
25735# turn on cachedb when hiredis support is enabled.
25736if test "$found_libhiredis" = "yes"; then enable_cachedb="yes"; fi
25737case "$enable_cachedb" in
25738    yes)
25739
25740printf "%s\n" "#define USE_CACHEDB 1" >>confdefs.h
25741
25742	CACHEDB_SRC="cachedb/cachedb.c cachedb/redis.c"
25743
25744	CACHEDB_OBJ="cachedb.lo redis.lo"
25745
25746    	;;
25747    no|*)
25748    	# nothing
25749    	;;
25750esac
25751
25752# check for ipsecmod if requested
25753# Check whether --enable-ipsecmod was given.
25754if test ${enable_ipsecmod+y}
25755then :
25756  enableval=$enable_ipsecmod;
25757fi
25758
25759case "$enable_ipsecmod" in
25760	yes)
25761
25762printf "%s\n" "#define USE_IPSECMOD 1" >>confdefs.h
25763
25764		IPSECMOD_OBJ="ipsecmod.lo ipsecmod-whitelist.lo"
25765
25766		IPSECMOD_HEADER='$(srcdir)/ipsecmod/ipsecmod.h $(srcdir)/ipsecmod/ipsecmod-whitelist.h'
25767
25768		;;
25769	no|*)
25770		# nothing
25771		;;
25772esac
25773
25774# check for ipset if requested
25775# Check whether --enable-ipset was given.
25776if test ${enable_ipset+y}
25777then :
25778  enableval=$enable_ipset;
25779fi
25780
25781case "$enable_ipset" in
25782    yes)
25783
25784printf "%s\n" "#define USE_IPSET 1" >>confdefs.h
25785
25786		IPSET_SRC="ipset/ipset.c"
25787
25788		IPSET_OBJ="ipset.lo"
25789
25790
25791		# BSD's pf
25792		       for ac_header in net/pfvar.h
25793do :
25794  ac_fn_c_check_header_compile "$LINENO" "net/pfvar.h" "ac_cv_header_net_pfvar_h" "
25795		  #include <netinet/in.h>
25796		  #include <net/if.h>
25797
25798"
25799if test "x$ac_cv_header_net_pfvar_h" = xyes
25800then :
25801  printf "%s\n" "#define HAVE_NET_PFVAR_H 1" >>confdefs.h
25802
25803else case e in #(
25804  e)
25805		    # mnl
25806
25807# Check whether --with-libmnl was given.
25808if test ${with_libmnl+y}
25809then :
25810  withval=$with_libmnl;
25811else case e in #(
25812  e)  withval="yes"  ;;
25813esac
25814fi
25815
25816		    found_libmnl="no"
25817		    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libmnl" >&5
25818printf %s "checking for libmnl... " >&6; }
25819		    if test x_$withval = x_ -o x_$withval = x_yes; then
25820			withval="/usr/local /opt/local /usr/lib /usr/pkg /usr/sfw /usr"
25821		    fi
25822		    for dir in $withval ; do
25823			if test -f "$dir/include/libmnl/libmnl.h" -o -f "$dir/include/libmnl/libmnl/libmnl.h"; then
25824				found_libmnl="yes"
25825								extralibmnl=""
25826				if test -f "$dir/include/libmnl/libmnl/libmnl.h"; then
25827					extralibmnl="/libmnl"
25828				fi
25829				if test "$dir" != "/usr" -o -n "$extralibmnl"; then
25830					CPPFLAGS="$CPPFLAGS -I$dir/include$extralibmnl"
25831				fi
25832				if test "$dir" != "/usr"; then
25833					LDFLAGS="$LDFLAGS -L$dir/lib"
25834				fi
25835				{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: found in $dir" >&5
25836printf "%s\n" "found in $dir" >&6; }
25837				LIBS="$LIBS -lmnl"
25838				break;
25839			fi
25840		    done
25841		    if test x_$found_libmnl != x_yes; then
25842			  as_fn_error $? "Could not find libmnl, libmnl.h" "$LINENO" 5
25843		    fi
25844		 ;;
25845esac
25846fi
25847
25848done
25849		;;
25850    no|*)
25851    	# nothing
25852		;;
25853esac
25854# Check whether --enable-explicit-port-randomisation was given.
25855if test ${enable_explicit_port_randomisation+y}
25856then :
25857  enableval=$enable_explicit_port_randomisation;
25858fi
25859
25860case "$enable_explicit_port_randomisation" in
25861	no)
25862
25863printf "%s\n" "#define DISABLE_EXPLICIT_PORT_RANDOMISATION 1" >>confdefs.h
25864
25865		;;
25866	yes|*)
25867		;;
25868esac
25869
25870if echo "$host" | $GREP -i -e linux >/dev/null; then
25871	# Check whether --enable-linux-ip-local-port-range was given.
25872if test ${enable_linux_ip_local_port_range+y}
25873then :
25874  enableval=$enable_linux_ip_local_port_range;
25875fi
25876
25877	case "$enable_linux_ip_local_port_range" in
25878		yes)
25879
25880printf "%s\n" "#define USE_LINUX_IP_LOCAL_PORT_RANGE 1" >>confdefs.h
25881
25882			;;
25883		no|*)
25884			;;
25885	esac
25886fi
25887
25888
25889{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if ${MAKE:-make} supports $< with implicit rule in scope" >&5
25890printf %s "checking if ${MAKE:-make} supports $< with implicit rule in scope... " >&6; }
25891# on openBSD, the implicit rule make $< work.
25892# on Solaris, it does not work ($? is changed sources, $^ lists dependencies).
25893# gmake works.
25894cat >conftest.make <<EOF
25895all:	conftest.lo
25896
25897conftest.lo foo.lo bla.lo:
25898	if test -f "\$<"; then touch \$@; fi
25899
25900.SUFFIXES: .lo
25901.c.lo:
25902	if test -f "\$<"; then touch \$@; fi
25903
25904conftest.lo:        conftest.dir/conftest.c
25905EOF
25906mkdir conftest.dir
25907touch conftest.dir/conftest.c
25908rm -f conftest.lo conftest.c
25909${MAKE:-make} -f conftest.make >/dev/null
25910rm -f conftest.make conftest.c conftest.dir/conftest.c
25911rm -rf conftest.dir
25912if test ! -f conftest.lo; then
25913	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
25914printf "%s\n" "no" >&6; }
25915	SOURCEDETERMINE='echo "$^" | awk "-F " "{print \$$1;}" > .source'
25916	SOURCEFILE='`cat .source`'
25917else
25918	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
25919printf "%s\n" "yes" >&6; }
25920	SOURCEDETERMINE=':'
25921	SOURCEFILE='$<'
25922fi
25923rm -f conftest.lo
25924
25925
25926
25927# see if we want to build the library or everything
25928ALLTARGET="alltargets"
25929INSTALLTARGET="install-all"
25930
25931# Check whether --with-libunbound-only was given.
25932if test ${with_libunbound_only+y}
25933then :
25934  withval=$with_libunbound_only;
25935	if test "$withval" = "yes"; then
25936		ALLTARGET="lib"
25937		INSTALLTARGET="install-lib"
25938	fi
25939
25940fi
25941
25942if test $ALLTARGET = "alltargets"; then
25943	if test $USE_NSS = "yes"; then
25944		as_fn_error $? "--with-nss can only be used in combination with --with-libunbound-only." "$LINENO" 5
25945	fi
25946	if test $USE_NETTLE = "yes"; then
25947		as_fn_error $? "--with-nettle can only be used in combination with --with-libunbound-only." "$LINENO" 5
25948	fi
25949fi
25950
25951
25952
25953
25954
25955  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Stripping extension flags..." >&5
25956printf "%s\n" "$as_me: Stripping extension flags..." >&6;}
25957
25958  if echo $CFLAGS | grep " -D_GNU_SOURCE" >/dev/null 2>&1; then
25959    CFLAGS="`echo $CFLAGS | sed -e 's/ -D_GNU_SOURCE//g'`"
25960
25961printf "%s\n" "#define OMITTED__D_GNU_SOURCE 1" >>confdefs.h
25962
25963  fi
25964
25965
25966  if echo $CFLAGS | grep " -D_BSD_SOURCE" >/dev/null 2>&1; then
25967    CFLAGS="`echo $CFLAGS | sed -e 's/ -D_BSD_SOURCE//g'`"
25968
25969printf "%s\n" "#define OMITTED__D_BSD_SOURCE 1" >>confdefs.h
25970
25971  fi
25972
25973
25974  if echo $CFLAGS | grep " -D_DEFAULT_SOURCE" >/dev/null 2>&1; then
25975    CFLAGS="`echo $CFLAGS | sed -e 's/ -D_DEFAULT_SOURCE//g'`"
25976
25977printf "%s\n" "#define OMITTED__D_DEFAULT_SOURCE 1" >>confdefs.h
25978
25979  fi
25980
25981
25982  if echo $CFLAGS | grep " -D__EXTENSIONS__" >/dev/null 2>&1; then
25983    CFLAGS="`echo $CFLAGS | sed -e 's/ -D__EXTENSIONS__//g'`"
25984
25985printf "%s\n" "#define OMITTED__D__EXTENSIONS__ 1" >>confdefs.h
25986
25987  fi
25988
25989
25990  if echo $CFLAGS | grep " -D_POSIX_C_SOURCE=200112" >/dev/null 2>&1; then
25991    CFLAGS="`echo $CFLAGS | sed -e 's/ -D_POSIX_C_SOURCE=200112//g'`"
25992
25993printf "%s\n" "#define OMITTED__D_POSIX_C_SOURCE_200112 1" >>confdefs.h
25994
25995  fi
25996
25997
25998  if echo $CFLAGS | grep " -D_XOPEN_SOURCE=600" >/dev/null 2>&1; then
25999    CFLAGS="`echo $CFLAGS | sed -e 's/ -D_XOPEN_SOURCE=600//g'`"
26000
26001printf "%s\n" "#define OMITTED__D_XOPEN_SOURCE_600 1" >>confdefs.h
26002
26003  fi
26004
26005
26006  if echo $CFLAGS | grep " -D_XOPEN_SOURCE_EXTENDED=1" >/dev/null 2>&1; then
26007    CFLAGS="`echo $CFLAGS | sed -e 's/ -D_XOPEN_SOURCE_EXTENDED=1//g'`"
26008
26009printf "%s\n" "#define OMITTED__D_XOPEN_SOURCE_EXTENDED_1 1" >>confdefs.h
26010
26011  fi
26012
26013
26014  if echo $CFLAGS | grep " -D_ALL_SOURCE" >/dev/null 2>&1; then
26015    CFLAGS="`echo $CFLAGS | sed -e 's/ -D_ALL_SOURCE//g'`"
26016
26017printf "%s\n" "#define OMITTED__D_ALL_SOURCE 1" >>confdefs.h
26018
26019  fi
26020
26021
26022  if echo $CFLAGS | grep " -D_LARGEFILE_SOURCE=1" >/dev/null 2>&1; then
26023    CFLAGS="`echo $CFLAGS | sed -e 's/ -D_LARGEFILE_SOURCE=1//g'`"
26024
26025printf "%s\n" "#define OMITTED__D_LARGEFILE_SOURCE_1 1" >>confdefs.h
26026
26027  fi
26028
26029
26030if test -n "$LATE_LDFLAGS"; then
26031  LDFLAGS="$LATE_LDFLAGS $LDFLAGS"
26032fi
26033# remove start spaces
26034LDFLAGS=`echo "$LDFLAGS"|sed -e 's/^ *//'`
26035LIBS=`echo "$LIBS"|sed -e 's/^ *//'`
26036
26037
26038printf "%s\n" "#define MAXSYSLOGMSGLEN 10240" >>confdefs.h
26039
26040
26041
26042
26043version=1.24.0
26044
26045{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for build time" >&5
26046printf %s "checking for build time... " >&6; }
26047ax_date_fmt="%b %e, %Y"
26048if test x"$SOURCE_DATE_EPOCH" = x
26049then :
26050  date=`date "+$ax_date_fmt"`
26051else case e in #(
26052  e) ax_build_date=`date -u -d "@$SOURCE_DATE_EPOCH" "+$ax_date_fmt" 2>/dev/null \
26053                 || date -u -r "$SOURCE_DATE_EPOCH" "+$ax_date_fmt" 2>/dev/null`
26054  if test x"$ax_build_date" = x
26055then :
26056  as_fn_error $? "malformed SOURCE_DATE_EPOCH" "$LINENO" 5
26057else case e in #(
26058  e) date=$ax_build_date ;;
26059esac
26060fi ;;
26061esac
26062fi
26063{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $date" >&5
26064printf "%s\n" "$date" >&6; }
26065
26066
26067
26068ac_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"
26069
26070ac_config_headers="$ac_config_headers config.h"
26071
26072cat >confcache <<\_ACEOF
26073# This file is a shell script that caches the results of configure
26074# tests run on this system so they can be shared between configure
26075# scripts and configure runs, see configure's option --config-cache.
26076# It is not useful on other systems.  If it contains results you don't
26077# want to keep, you may remove or edit it.
26078#
26079# config.status only pays attention to the cache file if you give it
26080# the --recheck option to rerun configure.
26081#
26082# 'ac_cv_env_foo' variables (set or unset) will be overridden when
26083# loading this file, other *unset* 'ac_cv_foo' will be assigned the
26084# following values.
26085
26086_ACEOF
26087
26088# The following way of writing the cache mishandles newlines in values,
26089# but we know of no workaround that is simple, portable, and efficient.
26090# So, we kill variables containing newlines.
26091# Ultrix sh set writes to stderr and can't be redirected directly,
26092# and sets the high bit in the cache file unless we assign to the vars.
26093(
26094  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
26095    eval ac_val=\$$ac_var
26096    case $ac_val in #(
26097    *${as_nl}*)
26098      case $ac_var in #(
26099      *_cv_*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
26100printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
26101      esac
26102      case $ac_var in #(
26103      _ | IFS | as_nl) ;; #(
26104      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
26105      *) { eval $ac_var=; unset $ac_var;} ;;
26106      esac ;;
26107    esac
26108  done
26109
26110  (set) 2>&1 |
26111    case $as_nl`(ac_space=' '; set) 2>&1` in #(
26112    *${as_nl}ac_space=\ *)
26113      # 'set' does not quote correctly, so add quotes: double-quote
26114      # substitution turns \\\\ into \\, and sed turns \\ into \.
26115      sed -n \
26116	"s/'/'\\\\''/g;
26117	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
26118      ;; #(
26119    *)
26120      # 'set' quotes correctly as required by POSIX, so do not add quotes.
26121      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
26122      ;;
26123    esac |
26124    sort
26125) |
26126  sed '
26127     /^ac_cv_env_/b end
26128     t clear
26129     :clear
26130     s/^\([^=]*\)=\(.*[{}].*\)$/test ${\1+y} || &/
26131     t end
26132     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
26133     :end' >>confcache
26134if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
26135  if test -w "$cache_file"; then
26136    if test "x$cache_file" != "x/dev/null"; then
26137      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
26138printf "%s\n" "$as_me: updating cache $cache_file" >&6;}
26139      if test ! -f "$cache_file" || test -h "$cache_file"; then
26140	cat confcache >"$cache_file"
26141      else
26142        case $cache_file in #(
26143        */* | ?:*)
26144	  mv -f confcache "$cache_file"$$ &&
26145	  mv -f "$cache_file"$$ "$cache_file" ;; #(
26146        *)
26147	  mv -f confcache "$cache_file" ;;
26148	esac
26149      fi
26150    fi
26151  else
26152    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
26153printf "%s\n" "$as_me: not updating unwritable cache $cache_file" >&6;}
26154  fi
26155fi
26156rm -f confcache
26157
26158test "x$prefix" = xNONE && prefix=$ac_default_prefix
26159# Let make expand exec_prefix.
26160test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
26161
26162DEFS=-DHAVE_CONFIG_H
26163
26164ac_libobjs=
26165ac_ltlibobjs=
26166U=
26167for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
26168  # 1. Remove the extension, and $U if already installed.
26169  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
26170  ac_i=`printf "%s\n" "$ac_i" | sed "$ac_script"`
26171  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
26172  #    will be set to the directory where LIBOBJS objects are built.
26173  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
26174  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
26175done
26176LIBOBJS=$ac_libobjs
26177
26178LTLIBOBJS=$ac_ltlibobjs
26179
26180
26181# Check whether --enable-year2038 was given.
26182if test ${enable_year2038+y}
26183then :
26184  enableval=$enable_year2038;
26185fi
26186
26187if test -z "${USE_SYSTEMD_TRUE}" && test -z "${USE_SYSTEMD_FALSE}"; then
26188  as_fn_error $? "conditional \"USE_SYSTEMD\" was never defined.
26189Usually this means the macro was only invoked conditionally." "$LINENO" 5
26190fi
26191
26192: "${CONFIG_STATUS=./config.status}"
26193ac_write_fail=0
26194ac_clean_files_save=$ac_clean_files
26195ac_clean_files="$ac_clean_files $CONFIG_STATUS"
26196{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
26197printf "%s\n" "$as_me: creating $CONFIG_STATUS" >&6;}
26198as_write_fail=0
26199cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
26200#! $SHELL
26201# Generated by $as_me.
26202# Run this file to recreate the current configuration.
26203# Compiler output produced by configure, useful for debugging
26204# configure, is in config.log if it exists.
26205
26206debug=false
26207ac_cs_recheck=false
26208ac_cs_silent=false
26209
26210SHELL=\${CONFIG_SHELL-$SHELL}
26211export SHELL
26212_ASEOF
26213cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
26214## -------------------- ##
26215## M4sh Initialization. ##
26216## -------------------- ##
26217
26218# Be more Bourne compatible
26219DUALCASE=1; export DUALCASE # for MKS sh
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 case e in #(
26229  e) case `(set -o) 2>/dev/null` in #(
26230  *posix*) :
26231    set -o posix ;; #(
26232  *) :
26233     ;;
26234esac ;;
26235esac
26236fi
26237
26238
26239
26240# Reset variables that may have inherited troublesome values from
26241# the environment.
26242
26243# IFS needs to be set, to space, tab, and newline, in precisely that order.
26244# (If _AS_PATH_WALK were called with IFS unset, it would have the
26245# side effect of setting IFS to empty, thus disabling word splitting.)
26246# Quoting is to prevent editors from complaining about space-tab.
26247as_nl='
26248'
26249export as_nl
26250IFS=" ""	$as_nl"
26251
26252PS1='$ '
26253PS2='> '
26254PS4='+ '
26255
26256# Ensure predictable behavior from utilities with locale-dependent output.
26257LC_ALL=C
26258export LC_ALL
26259LANGUAGE=C
26260export LANGUAGE
26261
26262# We cannot yet rely on "unset" to work, but we need these variables
26263# to be unset--not just set to an empty or harmless value--now, to
26264# avoid bugs in old shells (e.g. pre-3.0 UWIN ksh).  This construct
26265# also avoids known problems related to "unset" and subshell syntax
26266# in other old shells (e.g. bash 2.01 and pdksh 5.2.14).
26267for as_var in BASH_ENV ENV MAIL MAILPATH CDPATH
26268do eval test \${$as_var+y} \
26269  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
26270done
26271
26272# Ensure that fds 0, 1, and 2 are open.
26273if (exec 3>&0) 2>/dev/null; then :; else exec 0</dev/null; fi
26274if (exec 3>&1) 2>/dev/null; then :; else exec 1>/dev/null; fi
26275if (exec 3>&2)            ; then :; else exec 2>/dev/null; fi
26276
26277# The user is always right.
26278if ${PATH_SEPARATOR+false} :; then
26279  PATH_SEPARATOR=:
26280  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
26281    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
26282      PATH_SEPARATOR=';'
26283  }
26284fi
26285
26286
26287# Find who we are.  Look in the path if we contain no directory separator.
26288as_myself=
26289case $0 in #((
26290  *[\\/]* ) as_myself=$0 ;;
26291  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26292for as_dir in $PATH
26293do
26294  IFS=$as_save_IFS
26295  case $as_dir in #(((
26296    '') as_dir=./ ;;
26297    */) ;;
26298    *) as_dir=$as_dir/ ;;
26299  esac
26300    test -r "$as_dir$0" && as_myself=$as_dir$0 && break
26301  done
26302IFS=$as_save_IFS
26303
26304     ;;
26305esac
26306# We did not find ourselves, most probably we were run as 'sh COMMAND'
26307# in which case we are not to be found in the path.
26308if test "x$as_myself" = x; then
26309  as_myself=$0
26310fi
26311if test ! -f "$as_myself"; then
26312  printf "%s\n" "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
26313  exit 1
26314fi
26315
26316
26317
26318# as_fn_error STATUS ERROR [LINENO LOG_FD]
26319# ----------------------------------------
26320# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
26321# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
26322# script with STATUS, using 1 if that was 0.
26323as_fn_error ()
26324{
26325  as_status=$1; test $as_status -eq 0 && as_status=1
26326  if test "$4"; then
26327    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
26328    printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
26329  fi
26330  printf "%s\n" "$as_me: error: $2" >&2
26331  as_fn_exit $as_status
26332} # as_fn_error
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 case e in #(
26375  e) as_fn_append ()
26376  {
26377    eval $1=\$$1\$2
26378  } ;;
26379esac
26380fi # as_fn_append
26381
26382# as_fn_arith ARG...
26383# ------------------
26384# Perform arithmetic evaluation on the ARGs, and store the result in the
26385# global $as_val. Take advantage of shells that can avoid forks. The arguments
26386# must be portable across $(()) and expr.
26387if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null
26388then :
26389  eval 'as_fn_arith ()
26390  {
26391    as_val=$(( $* ))
26392  }'
26393else case e in #(
26394  e) as_fn_arith ()
26395  {
26396    as_val=`expr "$@" || test $? -eq 1`
26397  } ;;
26398esac
26399fi # as_fn_arith
26400
26401
26402if expr a : '\(a\)' >/dev/null 2>&1 &&
26403   test "X`expr 00001 : '.*\(...\)'`" = X001; then
26404  as_expr=expr
26405else
26406  as_expr=false
26407fi
26408
26409if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
26410  as_basename=basename
26411else
26412  as_basename=false
26413fi
26414
26415if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
26416  as_dirname=dirname
26417else
26418  as_dirname=false
26419fi
26420
26421as_me=`$as_basename -- "$0" ||
26422$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
26423	 X"$0" : 'X\(//\)$' \| \
26424	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
26425printf "%s\n" X/"$0" |
26426    sed '/^.*\/\([^/][^/]*\)\/*$/{
26427	    s//\1/
26428	    q
26429	  }
26430	  /^X\/\(\/\/\)$/{
26431	    s//\1/
26432	    q
26433	  }
26434	  /^X\/\(\/\).*/{
26435	    s//\1/
26436	    q
26437	  }
26438	  s/.*/./; q'`
26439
26440# Avoid depending upon Character Ranges.
26441as_cr_letters='abcdefghijklmnopqrstuvwxyz'
26442as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
26443as_cr_Letters=$as_cr_letters$as_cr_LETTERS
26444as_cr_digits='0123456789'
26445as_cr_alnum=$as_cr_Letters$as_cr_digits
26446
26447
26448# Determine whether it's possible to make 'echo' print without a newline.
26449# These variables are no longer used directly by Autoconf, but are AC_SUBSTed
26450# for compatibility with existing Makefiles.
26451ECHO_C= ECHO_N= ECHO_T=
26452case `echo -n x` in #(((((
26453-n*)
26454  case `echo 'xy\c'` in
26455  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
26456  xy)  ECHO_C='\c';;
26457  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
26458       ECHO_T='	';;
26459  esac;;
26460*)
26461  ECHO_N='-n';;
26462esac
26463
26464# For backward compatibility with old third-party macros, we provide
26465# the shell variables $as_echo and $as_echo_n.  New code should use
26466# AS_ECHO(["message"]) and AS_ECHO_N(["message"]), respectively.
26467as_echo='printf %s\n'
26468as_echo_n='printf %s'
26469
26470rm -f conf$$ conf$$.exe conf$$.file
26471if test -d conf$$.dir; then
26472  rm -f conf$$.dir/conf$$.file
26473else
26474  rm -f conf$$.dir
26475  mkdir conf$$.dir 2>/dev/null
26476fi
26477if (echo >conf$$.file) 2>/dev/null; then
26478  if ln -s conf$$.file conf$$ 2>/dev/null; then
26479    as_ln_s='ln -s'
26480    # ... but there are two gotchas:
26481    # 1) On MSYS, both 'ln -s file dir' and 'ln file dir' fail.
26482    # 2) DJGPP < 2.04 has no symlinks; 'ln -s' creates a wrapper executable.
26483    # In both cases, we have to default to 'cp -pR'.
26484    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
26485      as_ln_s='cp -pR'
26486  elif ln conf$$.file conf$$ 2>/dev/null; then
26487    as_ln_s=ln
26488  else
26489    as_ln_s='cp -pR'
26490  fi
26491else
26492  as_ln_s='cp -pR'
26493fi
26494rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
26495rmdir conf$$.dir 2>/dev/null
26496
26497
26498# as_fn_mkdir_p
26499# -------------
26500# Create "$as_dir" as a directory, including parents if necessary.
26501as_fn_mkdir_p ()
26502{
26503
26504  case $as_dir in #(
26505  -*) as_dir=./$as_dir;;
26506  esac
26507  test -d "$as_dir" || eval $as_mkdir_p || {
26508    as_dirs=
26509    while :; do
26510      case $as_dir in #(
26511      *\'*) as_qdir=`printf "%s\n" "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
26512      *) as_qdir=$as_dir;;
26513      esac
26514      as_dirs="'$as_qdir' $as_dirs"
26515      as_dir=`$as_dirname -- "$as_dir" ||
26516$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
26517	 X"$as_dir" : 'X\(//\)[^/]' \| \
26518	 X"$as_dir" : 'X\(//\)$' \| \
26519	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
26520printf "%s\n" X"$as_dir" |
26521    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
26522	    s//\1/
26523	    q
26524	  }
26525	  /^X\(\/\/\)[^/].*/{
26526	    s//\1/
26527	    q
26528	  }
26529	  /^X\(\/\/\)$/{
26530	    s//\1/
26531	    q
26532	  }
26533	  /^X\(\/\).*/{
26534	    s//\1/
26535	    q
26536	  }
26537	  s/.*/./; q'`
26538      test -d "$as_dir" && break
26539    done
26540    test -z "$as_dirs" || eval "mkdir $as_dirs"
26541  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
26542
26543
26544} # as_fn_mkdir_p
26545if mkdir -p . 2>/dev/null; then
26546  as_mkdir_p='mkdir -p "$as_dir"'
26547else
26548  test -d ./-p && rmdir ./-p
26549  as_mkdir_p=false
26550fi
26551
26552
26553# as_fn_executable_p FILE
26554# -----------------------
26555# Test if FILE is an executable regular file.
26556as_fn_executable_p ()
26557{
26558  test -f "$1" && test -x "$1"
26559} # as_fn_executable_p
26560as_test_x='test -x'
26561as_executable_p=as_fn_executable_p
26562
26563# Sed expression to map a string onto a valid CPP name.
26564as_sed_cpp="y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
26565as_tr_cpp="eval sed '$as_sed_cpp'" # deprecated
26566
26567# Sed expression to map a string onto a valid variable name.
26568as_sed_sh="y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
26569as_tr_sh="eval sed '$as_sed_sh'" # deprecated
26570
26571
26572exec 6>&1
26573## ----------------------------------- ##
26574## Main body of $CONFIG_STATUS script. ##
26575## ----------------------------------- ##
26576_ASEOF
26577test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
26578
26579cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
26580# Save the log message, to keep $0 and so on meaningful, and to
26581# report actual input values of CONFIG_FILES etc. instead of their
26582# values after options handling.
26583ac_log="
26584This file was extended by unbound $as_me 1.24.0, which was
26585generated by GNU Autoconf 2.71.  Invocation command line was
26586
26587  CONFIG_FILES    = $CONFIG_FILES
26588  CONFIG_HEADERS  = $CONFIG_HEADERS
26589  CONFIG_LINKS    = $CONFIG_LINKS
26590  CONFIG_COMMANDS = $CONFIG_COMMANDS
26591  $ $0 $@
26592
26593on `(hostname || uname -n) 2>/dev/null | sed 1q`
26594"
26595
26596_ACEOF
26597
26598case $ac_config_files in *"
26599"*) set x $ac_config_files; shift; ac_config_files=$*;;
26600esac
26601
26602case $ac_config_headers in *"
26603"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
26604esac
26605
26606
26607cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
26608# Files that config.status was made for.
26609config_files="$ac_config_files"
26610config_headers="$ac_config_headers"
26611config_commands="$ac_config_commands"
26612
26613_ACEOF
26614
26615cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
26616ac_cs_usage="\
26617'$as_me' instantiates files and other configuration actions
26618from templates according to the current configuration.  Unless the files
26619and actions are specified as TAGs, all are instantiated by default.
26620
26621Usage: $0 [OPTION]... [TAG]...
26622
26623  -h, --help       print this help, then exit
26624  -V, --version    print version number and configuration settings, then exit
26625      --config     print configuration, then exit
26626  -q, --quiet, --silent
26627                   do not print progress messages
26628  -d, --debug      don't remove temporary files
26629      --recheck    update $as_me by reconfiguring in the same conditions
26630      --file=FILE[:TEMPLATE]
26631                   instantiate the configuration file FILE
26632      --header=FILE[:TEMPLATE]
26633                   instantiate the configuration header FILE
26634
26635Configuration files:
26636$config_files
26637
26638Configuration headers:
26639$config_headers
26640
26641Configuration commands:
26642$config_commands
26643
26644Report bugs to <unbound-bugs@nlnetlabs.nl or https://github.com/NLnetLabs/unbound/issues>."
26645
26646_ACEOF
26647ac_cs_config=`printf "%s\n" "$ac_configure_args" | sed "$ac_safe_unquote"`
26648ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\''/g"`
26649cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
26650ac_cs_config='$ac_cs_config_escaped'
26651ac_cs_version="\\
26652unbound config.status 1.24.0
26653configured by $0, generated by GNU Autoconf 2.71,
26654  with options \\"\$ac_cs_config\\"
26655
26656Copyright (C) 2023 Free Software Foundation, Inc.
26657This config.status script is free software; the Free Software Foundation
26658gives unlimited permission to copy, distribute and modify it."
26659
26660ac_pwd='$ac_pwd'
26661srcdir='$srcdir'
26662AWK='$AWK'
26663test -n "\$AWK" || AWK=awk
26664_ACEOF
26665
26666cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
26667# The default lists apply if the user does not specify any file.
26668ac_need_defaults=:
26669while test $# != 0
26670do
26671  case $1 in
26672  --*=?*)
26673    ac_option=`expr "X$1" : 'X\([^=]*\)='`
26674    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
26675    ac_shift=:
26676    ;;
26677  --*=)
26678    ac_option=`expr "X$1" : 'X\([^=]*\)='`
26679    ac_optarg=
26680    ac_shift=:
26681    ;;
26682  *)
26683    ac_option=$1
26684    ac_optarg=$2
26685    ac_shift=shift
26686    ;;
26687  esac
26688
26689  case $ac_option in
26690  # Handling of the options.
26691  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
26692    ac_cs_recheck=: ;;
26693  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
26694    printf "%s\n" "$ac_cs_version"; exit ;;
26695  --config | --confi | --conf | --con | --co | --c )
26696    printf "%s\n" "$ac_cs_config"; exit ;;
26697  --debug | --debu | --deb | --de | --d | -d )
26698    debug=: ;;
26699  --file | --fil | --fi | --f )
26700    $ac_shift
26701    case $ac_optarg in
26702    *\'*) ac_optarg=`printf "%s\n" "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
26703    '') as_fn_error $? "missing file argument" ;;
26704    esac
26705    as_fn_append CONFIG_FILES " '$ac_optarg'"
26706    ac_need_defaults=false;;
26707  --header | --heade | --head | --hea )
26708    $ac_shift
26709    case $ac_optarg in
26710    *\'*) ac_optarg=`printf "%s\n" "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
26711    esac
26712    as_fn_append CONFIG_HEADERS " '$ac_optarg'"
26713    ac_need_defaults=false;;
26714  --he | --h)
26715    # Conflict between --help and --header
26716    as_fn_error $? "ambiguous option: '$1'
26717Try '$0 --help' for more information.";;
26718  --help | --hel | -h )
26719    printf "%s\n" "$ac_cs_usage"; exit ;;
26720  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
26721  | -silent | --silent | --silen | --sile | --sil | --si | --s)
26722    ac_cs_silent=: ;;
26723
26724  # This is an error.
26725  -*) as_fn_error $? "unrecognized option: '$1'
26726Try '$0 --help' for more information." ;;
26727
26728  *) as_fn_append ac_config_targets " $1"
26729     ac_need_defaults=false ;;
26730
26731  esac
26732  shift
26733done
26734
26735ac_configure_extra_args=
26736
26737if $ac_cs_silent; then
26738  exec 6>/dev/null
26739  ac_configure_extra_args="$ac_configure_extra_args --silent"
26740fi
26741
26742_ACEOF
26743cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
26744if \$ac_cs_recheck; then
26745  set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
26746  shift
26747  \printf "%s\n" "running CONFIG_SHELL=$SHELL \$*" >&6
26748  CONFIG_SHELL='$SHELL'
26749  export CONFIG_SHELL
26750  exec "\$@"
26751fi
26752
26753_ACEOF
26754cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
26755exec 5>>config.log
26756{
26757  echo
26758  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
26759## Running $as_me. ##
26760_ASBOX
26761  printf "%s\n" "$ac_log"
26762} >&5
26763
26764_ACEOF
26765cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
26766#
26767# INIT-COMMANDS
26768#
26769
26770
26771# The HP-UX ksh and POSIX shell print the target directory to stdout
26772# if CDPATH is set.
26773(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
26774
26775sed_quote_subst='$sed_quote_subst'
26776double_quote_subst='$double_quote_subst'
26777delay_variable_subst='$delay_variable_subst'
26778macro_version='`$ECHO "$macro_version" | $SED "$delay_single_quote_subst"`'
26779macro_revision='`$ECHO "$macro_revision" | $SED "$delay_single_quote_subst"`'
26780enable_shared='`$ECHO "$enable_shared" | $SED "$delay_single_quote_subst"`'
26781enable_static='`$ECHO "$enable_static" | $SED "$delay_single_quote_subst"`'
26782pic_mode='`$ECHO "$pic_mode" | $SED "$delay_single_quote_subst"`'
26783enable_fast_install='`$ECHO "$enable_fast_install" | $SED "$delay_single_quote_subst"`'
26784shared_archive_member_spec='`$ECHO "$shared_archive_member_spec" | $SED "$delay_single_quote_subst"`'
26785SHELL='`$ECHO "$SHELL" | $SED "$delay_single_quote_subst"`'
26786ECHO='`$ECHO "$ECHO" | $SED "$delay_single_quote_subst"`'
26787PATH_SEPARATOR='`$ECHO "$PATH_SEPARATOR" | $SED "$delay_single_quote_subst"`'
26788host_alias='`$ECHO "$host_alias" | $SED "$delay_single_quote_subst"`'
26789host='`$ECHO "$host" | $SED "$delay_single_quote_subst"`'
26790host_os='`$ECHO "$host_os" | $SED "$delay_single_quote_subst"`'
26791build_alias='`$ECHO "$build_alias" | $SED "$delay_single_quote_subst"`'
26792build='`$ECHO "$build" | $SED "$delay_single_quote_subst"`'
26793build_os='`$ECHO "$build_os" | $SED "$delay_single_quote_subst"`'
26794SED='`$ECHO "$SED" | $SED "$delay_single_quote_subst"`'
26795Xsed='`$ECHO "$Xsed" | $SED "$delay_single_quote_subst"`'
26796GREP='`$ECHO "$GREP" | $SED "$delay_single_quote_subst"`'
26797EGREP='`$ECHO "$EGREP" | $SED "$delay_single_quote_subst"`'
26798FGREP='`$ECHO "$FGREP" | $SED "$delay_single_quote_subst"`'
26799LD='`$ECHO "$LD" | $SED "$delay_single_quote_subst"`'
26800NM='`$ECHO "$NM" | $SED "$delay_single_quote_subst"`'
26801LN_S='`$ECHO "$LN_S" | $SED "$delay_single_quote_subst"`'
26802max_cmd_len='`$ECHO "$max_cmd_len" | $SED "$delay_single_quote_subst"`'
26803ac_objext='`$ECHO "$ac_objext" | $SED "$delay_single_quote_subst"`'
26804exeext='`$ECHO "$exeext" | $SED "$delay_single_quote_subst"`'
26805lt_unset='`$ECHO "$lt_unset" | $SED "$delay_single_quote_subst"`'
26806lt_SP2NL='`$ECHO "$lt_SP2NL" | $SED "$delay_single_quote_subst"`'
26807lt_NL2SP='`$ECHO "$lt_NL2SP" | $SED "$delay_single_quote_subst"`'
26808lt_cv_to_host_file_cmd='`$ECHO "$lt_cv_to_host_file_cmd" | $SED "$delay_single_quote_subst"`'
26809lt_cv_to_tool_file_cmd='`$ECHO "$lt_cv_to_tool_file_cmd" | $SED "$delay_single_quote_subst"`'
26810reload_flag='`$ECHO "$reload_flag" | $SED "$delay_single_quote_subst"`'
26811reload_cmds='`$ECHO "$reload_cmds" | $SED "$delay_single_quote_subst"`'
26812OBJDUMP='`$ECHO "$OBJDUMP" | $SED "$delay_single_quote_subst"`'
26813deplibs_check_method='`$ECHO "$deplibs_check_method" | $SED "$delay_single_quote_subst"`'
26814file_magic_cmd='`$ECHO "$file_magic_cmd" | $SED "$delay_single_quote_subst"`'
26815file_magic_glob='`$ECHO "$file_magic_glob" | $SED "$delay_single_quote_subst"`'
26816want_nocaseglob='`$ECHO "$want_nocaseglob" | $SED "$delay_single_quote_subst"`'
26817DLLTOOL='`$ECHO "$DLLTOOL" | $SED "$delay_single_quote_subst"`'
26818sharedlib_from_linklib_cmd='`$ECHO "$sharedlib_from_linklib_cmd" | $SED "$delay_single_quote_subst"`'
26819AR='`$ECHO "$AR" | $SED "$delay_single_quote_subst"`'
26820AR_FLAGS='`$ECHO "$AR_FLAGS" | $SED "$delay_single_quote_subst"`'
26821archiver_list_spec='`$ECHO "$archiver_list_spec" | $SED "$delay_single_quote_subst"`'
26822STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`'
26823RANLIB='`$ECHO "$RANLIB" | $SED "$delay_single_quote_subst"`'
26824old_postinstall_cmds='`$ECHO "$old_postinstall_cmds" | $SED "$delay_single_quote_subst"`'
26825old_postuninstall_cmds='`$ECHO "$old_postuninstall_cmds" | $SED "$delay_single_quote_subst"`'
26826old_archive_cmds='`$ECHO "$old_archive_cmds" | $SED "$delay_single_quote_subst"`'
26827lock_old_archive_extraction='`$ECHO "$lock_old_archive_extraction" | $SED "$delay_single_quote_subst"`'
26828CC='`$ECHO "$CC" | $SED "$delay_single_quote_subst"`'
26829CFLAGS='`$ECHO "$CFLAGS" | $SED "$delay_single_quote_subst"`'
26830compiler='`$ECHO "$compiler" | $SED "$delay_single_quote_subst"`'
26831GCC='`$ECHO "$GCC" | $SED "$delay_single_quote_subst"`'
26832lt_cv_sys_global_symbol_pipe='`$ECHO "$lt_cv_sys_global_symbol_pipe" | $SED "$delay_single_quote_subst"`'
26833lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`'
26834lt_cv_sys_global_symbol_to_import='`$ECHO "$lt_cv_sys_global_symbol_to_import" | $SED "$delay_single_quote_subst"`'
26835lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`'
26836lt_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"`'
26837lt_cv_nm_interface='`$ECHO "$lt_cv_nm_interface" | $SED "$delay_single_quote_subst"`'
26838nm_file_list_spec='`$ECHO "$nm_file_list_spec" | $SED "$delay_single_quote_subst"`'
26839lt_sysroot='`$ECHO "$lt_sysroot" | $SED "$delay_single_quote_subst"`'
26840lt_cv_truncate_bin='`$ECHO "$lt_cv_truncate_bin" | $SED "$delay_single_quote_subst"`'
26841objdir='`$ECHO "$objdir" | $SED "$delay_single_quote_subst"`'
26842MAGIC_CMD='`$ECHO "$MAGIC_CMD" | $SED "$delay_single_quote_subst"`'
26843lt_prog_compiler_no_builtin_flag='`$ECHO "$lt_prog_compiler_no_builtin_flag" | $SED "$delay_single_quote_subst"`'
26844lt_prog_compiler_pic='`$ECHO "$lt_prog_compiler_pic" | $SED "$delay_single_quote_subst"`'
26845lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`'
26846lt_prog_compiler_static='`$ECHO "$lt_prog_compiler_static" | $SED "$delay_single_quote_subst"`'
26847lt_cv_prog_compiler_c_o='`$ECHO "$lt_cv_prog_compiler_c_o" | $SED "$delay_single_quote_subst"`'
26848need_locks='`$ECHO "$need_locks" | $SED "$delay_single_quote_subst"`'
26849MANIFEST_TOOL='`$ECHO "$MANIFEST_TOOL" | $SED "$delay_single_quote_subst"`'
26850DSYMUTIL='`$ECHO "$DSYMUTIL" | $SED "$delay_single_quote_subst"`'
26851NMEDIT='`$ECHO "$NMEDIT" | $SED "$delay_single_quote_subst"`'
26852LIPO='`$ECHO "$LIPO" | $SED "$delay_single_quote_subst"`'
26853OTOOL='`$ECHO "$OTOOL" | $SED "$delay_single_quote_subst"`'
26854OTOOL64='`$ECHO "$OTOOL64" | $SED "$delay_single_quote_subst"`'
26855libext='`$ECHO "$libext" | $SED "$delay_single_quote_subst"`'
26856shrext_cmds='`$ECHO "$shrext_cmds" | $SED "$delay_single_quote_subst"`'
26857extract_expsyms_cmds='`$ECHO "$extract_expsyms_cmds" | $SED "$delay_single_quote_subst"`'
26858archive_cmds_need_lc='`$ECHO "$archive_cmds_need_lc" | $SED "$delay_single_quote_subst"`'
26859enable_shared_with_static_runtimes='`$ECHO "$enable_shared_with_static_runtimes" | $SED "$delay_single_quote_subst"`'
26860export_dynamic_flag_spec='`$ECHO "$export_dynamic_flag_spec" | $SED "$delay_single_quote_subst"`'
26861whole_archive_flag_spec='`$ECHO "$whole_archive_flag_spec" | $SED "$delay_single_quote_subst"`'
26862compiler_needs_object='`$ECHO "$compiler_needs_object" | $SED "$delay_single_quote_subst"`'
26863old_archive_from_new_cmds='`$ECHO "$old_archive_from_new_cmds" | $SED "$delay_single_quote_subst"`'
26864old_archive_from_expsyms_cmds='`$ECHO "$old_archive_from_expsyms_cmds" | $SED "$delay_single_quote_subst"`'
26865archive_cmds='`$ECHO "$archive_cmds" | $SED "$delay_single_quote_subst"`'
26866archive_expsym_cmds='`$ECHO "$archive_expsym_cmds" | $SED "$delay_single_quote_subst"`'
26867module_cmds='`$ECHO "$module_cmds" | $SED "$delay_single_quote_subst"`'
26868module_expsym_cmds='`$ECHO "$module_expsym_cmds" | $SED "$delay_single_quote_subst"`'
26869with_gnu_ld='`$ECHO "$with_gnu_ld" | $SED "$delay_single_quote_subst"`'
26870allow_undefined_flag='`$ECHO "$allow_undefined_flag" | $SED "$delay_single_quote_subst"`'
26871no_undefined_flag='`$ECHO "$no_undefined_flag" | $SED "$delay_single_quote_subst"`'
26872hardcode_libdir_flag_spec='`$ECHO "$hardcode_libdir_flag_spec" | $SED "$delay_single_quote_subst"`'
26873hardcode_libdir_separator='`$ECHO "$hardcode_libdir_separator" | $SED "$delay_single_quote_subst"`'
26874hardcode_direct='`$ECHO "$hardcode_direct" | $SED "$delay_single_quote_subst"`'
26875hardcode_direct_absolute='`$ECHO "$hardcode_direct_absolute" | $SED "$delay_single_quote_subst"`'
26876hardcode_minus_L='`$ECHO "$hardcode_minus_L" | $SED "$delay_single_quote_subst"`'
26877hardcode_shlibpath_var='`$ECHO "$hardcode_shlibpath_var" | $SED "$delay_single_quote_subst"`'
26878hardcode_automatic='`$ECHO "$hardcode_automatic" | $SED "$delay_single_quote_subst"`'
26879inherit_rpath='`$ECHO "$inherit_rpath" | $SED "$delay_single_quote_subst"`'
26880link_all_deplibs='`$ECHO "$link_all_deplibs" | $SED "$delay_single_quote_subst"`'
26881always_export_symbols='`$ECHO "$always_export_symbols" | $SED "$delay_single_quote_subst"`'
26882export_symbols_cmds='`$ECHO "$export_symbols_cmds" | $SED "$delay_single_quote_subst"`'
26883exclude_expsyms='`$ECHO "$exclude_expsyms" | $SED "$delay_single_quote_subst"`'
26884include_expsyms='`$ECHO "$include_expsyms" | $SED "$delay_single_quote_subst"`'
26885prelink_cmds='`$ECHO "$prelink_cmds" | $SED "$delay_single_quote_subst"`'
26886postlink_cmds='`$ECHO "$postlink_cmds" | $SED "$delay_single_quote_subst"`'
26887file_list_spec='`$ECHO "$file_list_spec" | $SED "$delay_single_quote_subst"`'
26888variables_saved_for_relink='`$ECHO "$variables_saved_for_relink" | $SED "$delay_single_quote_subst"`'
26889need_lib_prefix='`$ECHO "$need_lib_prefix" | $SED "$delay_single_quote_subst"`'
26890need_version='`$ECHO "$need_version" | $SED "$delay_single_quote_subst"`'
26891version_type='`$ECHO "$version_type" | $SED "$delay_single_quote_subst"`'
26892runpath_var='`$ECHO "$runpath_var" | $SED "$delay_single_quote_subst"`'
26893shlibpath_var='`$ECHO "$shlibpath_var" | $SED "$delay_single_quote_subst"`'
26894shlibpath_overrides_runpath='`$ECHO "$shlibpath_overrides_runpath" | $SED "$delay_single_quote_subst"`'
26895libname_spec='`$ECHO "$libname_spec" | $SED "$delay_single_quote_subst"`'
26896library_names_spec='`$ECHO "$library_names_spec" | $SED "$delay_single_quote_subst"`'
26897soname_spec='`$ECHO "$soname_spec" | $SED "$delay_single_quote_subst"`'
26898install_override_mode='`$ECHO "$install_override_mode" | $SED "$delay_single_quote_subst"`'
26899postinstall_cmds='`$ECHO "$postinstall_cmds" | $SED "$delay_single_quote_subst"`'
26900postuninstall_cmds='`$ECHO "$postuninstall_cmds" | $SED "$delay_single_quote_subst"`'
26901finish_cmds='`$ECHO "$finish_cmds" | $SED "$delay_single_quote_subst"`'
26902finish_eval='`$ECHO "$finish_eval" | $SED "$delay_single_quote_subst"`'
26903hardcode_into_libs='`$ECHO "$hardcode_into_libs" | $SED "$delay_single_quote_subst"`'
26904sys_lib_search_path_spec='`$ECHO "$sys_lib_search_path_spec" | $SED "$delay_single_quote_subst"`'
26905configure_time_dlsearch_path='`$ECHO "$configure_time_dlsearch_path" | $SED "$delay_single_quote_subst"`'
26906configure_time_lt_sys_library_path='`$ECHO "$configure_time_lt_sys_library_path" | $SED "$delay_single_quote_subst"`'
26907hardcode_action='`$ECHO "$hardcode_action" | $SED "$delay_single_quote_subst"`'
26908enable_dlopen='`$ECHO "$enable_dlopen" | $SED "$delay_single_quote_subst"`'
26909enable_dlopen_self='`$ECHO "$enable_dlopen_self" | $SED "$delay_single_quote_subst"`'
26910enable_dlopen_self_static='`$ECHO "$enable_dlopen_self_static" | $SED "$delay_single_quote_subst"`'
26911old_striplib='`$ECHO "$old_striplib" | $SED "$delay_single_quote_subst"`'
26912striplib='`$ECHO "$striplib" | $SED "$delay_single_quote_subst"`'
26913
26914LTCC='$LTCC'
26915LTCFLAGS='$LTCFLAGS'
26916compiler='$compiler_DEFAULT'
26917
26918# A function that is used when there is no print builtin or printf.
26919func_fallback_echo ()
26920{
26921  eval 'cat <<_LTECHO_EOF
26922\$1
26923_LTECHO_EOF'
26924}
26925
26926# Quote evaled strings.
26927for var in SHELL \
26928ECHO \
26929PATH_SEPARATOR \
26930SED \
26931GREP \
26932EGREP \
26933FGREP \
26934LD \
26935NM \
26936LN_S \
26937lt_SP2NL \
26938lt_NL2SP \
26939reload_flag \
26940OBJDUMP \
26941deplibs_check_method \
26942file_magic_cmd \
26943file_magic_glob \
26944want_nocaseglob \
26945DLLTOOL \
26946sharedlib_from_linklib_cmd \
26947AR \
26948AR_FLAGS \
26949archiver_list_spec \
26950STRIP \
26951RANLIB \
26952CC \
26953CFLAGS \
26954compiler \
26955lt_cv_sys_global_symbol_pipe \
26956lt_cv_sys_global_symbol_to_cdecl \
26957lt_cv_sys_global_symbol_to_import \
26958lt_cv_sys_global_symbol_to_c_name_address \
26959lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \
26960lt_cv_nm_interface \
26961nm_file_list_spec \
26962lt_cv_truncate_bin \
26963lt_prog_compiler_no_builtin_flag \
26964lt_prog_compiler_pic \
26965lt_prog_compiler_wl \
26966lt_prog_compiler_static \
26967lt_cv_prog_compiler_c_o \
26968need_locks \
26969MANIFEST_TOOL \
26970DSYMUTIL \
26971NMEDIT \
26972LIPO \
26973OTOOL \
26974OTOOL64 \
26975shrext_cmds \
26976export_dynamic_flag_spec \
26977whole_archive_flag_spec \
26978compiler_needs_object \
26979with_gnu_ld \
26980allow_undefined_flag \
26981no_undefined_flag \
26982hardcode_libdir_flag_spec \
26983hardcode_libdir_separator \
26984exclude_expsyms \
26985include_expsyms \
26986file_list_spec \
26987variables_saved_for_relink \
26988libname_spec \
26989library_names_spec \
26990soname_spec \
26991install_override_mode \
26992finish_eval \
26993old_striplib \
26994striplib; do
26995    case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
26996    *[\\\\\\\`\\"\\\$]*)
26997      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes
26998      ;;
26999    *)
27000      eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
27001      ;;
27002    esac
27003done
27004
27005# Double-quote double-evaled strings.
27006for var in reload_cmds \
27007old_postinstall_cmds \
27008old_postuninstall_cmds \
27009old_archive_cmds \
27010extract_expsyms_cmds \
27011old_archive_from_new_cmds \
27012old_archive_from_expsyms_cmds \
27013archive_cmds \
27014archive_expsym_cmds \
27015module_cmds \
27016module_expsym_cmds \
27017export_symbols_cmds \
27018prelink_cmds \
27019postlink_cmds \
27020postinstall_cmds \
27021postuninstall_cmds \
27022finish_cmds \
27023sys_lib_search_path_spec \
27024configure_time_dlsearch_path \
27025configure_time_lt_sys_library_path; do
27026    case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
27027    *[\\\\\\\`\\"\\\$]*)
27028      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes
27029      ;;
27030    *)
27031      eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
27032      ;;
27033    esac
27034done
27035
27036ac_aux_dir='$ac_aux_dir'
27037
27038# See if we are running on zsh, and set the options that allow our
27039# commands through without removal of \ escapes INIT.
27040if test -n "\${ZSH_VERSION+set}"; then
27041   setopt NO_GLOB_SUBST
27042fi
27043
27044
27045    PACKAGE='$PACKAGE'
27046    VERSION='$VERSION'
27047    RM='$RM'
27048    ofile='$ofile'
27049
27050
27051
27052
27053_ACEOF
27054
27055cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
27056
27057# Handling of arguments.
27058for ac_config_target in $ac_config_targets
27059do
27060  case $ac_config_target in
27061    "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;;
27062    "disable-rpath") CONFIG_COMMANDS="$CONFIG_COMMANDS disable-rpath" ;;
27063    "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
27064    "doc/example.conf") CONFIG_FILES="$CONFIG_FILES doc/example.conf" ;;
27065    "doc/libunbound.3") CONFIG_FILES="$CONFIG_FILES doc/libunbound.3" ;;
27066    "doc/unbound.8") CONFIG_FILES="$CONFIG_FILES doc/unbound.8" ;;
27067    "doc/unbound-anchor.8") CONFIG_FILES="$CONFIG_FILES doc/unbound-anchor.8" ;;
27068    "doc/unbound-checkconf.8") CONFIG_FILES="$CONFIG_FILES doc/unbound-checkconf.8" ;;
27069    "doc/unbound.conf.5") CONFIG_FILES="$CONFIG_FILES doc/unbound.conf.5" ;;
27070    "doc/unbound-control.8") CONFIG_FILES="$CONFIG_FILES doc/unbound-control.8" ;;
27071    "doc/unbound-host.1") CONFIG_FILES="$CONFIG_FILES doc/unbound-host.1" ;;
27072    "smallapp/unbound-control-setup.sh") CONFIG_FILES="$CONFIG_FILES smallapp/unbound-control-setup.sh" ;;
27073    "dnstap/dnstap_config.h") CONFIG_FILES="$CONFIG_FILES dnstap/dnstap_config.h" ;;
27074    "dnscrypt/dnscrypt_config.h") CONFIG_FILES="$CONFIG_FILES dnscrypt/dnscrypt_config.h" ;;
27075    "contrib/libunbound.pc") CONFIG_FILES="$CONFIG_FILES contrib/libunbound.pc" ;;
27076    "contrib/unbound.socket") CONFIG_FILES="$CONFIG_FILES contrib/unbound.socket" ;;
27077    "contrib/unbound.service") CONFIG_FILES="$CONFIG_FILES contrib/unbound.service" ;;
27078    "contrib/unbound_portable.service") CONFIG_FILES="$CONFIG_FILES contrib/unbound_portable.service" ;;
27079    "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
27080
27081  *) as_fn_error $? "invalid argument: '$ac_config_target'" "$LINENO" 5;;
27082  esac
27083done
27084
27085
27086# If the user did not use the arguments to specify the items to instantiate,
27087# then the envvar interface is used.  Set only those that are not.
27088# We use the long form for the default assignment because of an extremely
27089# bizarre bug on SunOS 4.1.3.
27090if $ac_need_defaults; then
27091  test ${CONFIG_FILES+y} || CONFIG_FILES=$config_files
27092  test ${CONFIG_HEADERS+y} || CONFIG_HEADERS=$config_headers
27093  test ${CONFIG_COMMANDS+y} || CONFIG_COMMANDS=$config_commands
27094fi
27095
27096# Have a temporary directory for convenience.  Make it in the build tree
27097# simply because there is no reason against having it here, and in addition,
27098# creating and moving files from /tmp can sometimes cause problems.
27099# Hook for its removal unless debugging.
27100# Note that there is a small window in which the directory will not be cleaned:
27101# after its creation but before its name has been assigned to '$tmp'.
27102$debug ||
27103{
27104  tmp= ac_tmp=
27105  trap 'exit_status=$?
27106  : "${ac_tmp:=$tmp}"
27107  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
27108' 0
27109  trap 'as_fn_exit 1' 1 2 13 15
27110}
27111# Create a (secure) tmp directory for tmp files.
27112
27113{
27114  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
27115  test -d "$tmp"
27116}  ||
27117{
27118  tmp=./conf$$-$RANDOM
27119  (umask 077 && mkdir "$tmp")
27120} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
27121ac_tmp=$tmp
27122
27123# Set up the scripts for CONFIG_FILES section.
27124# No need to generate them if there are no CONFIG_FILES.
27125# This happens for instance with './config.status config.h'.
27126if test -n "$CONFIG_FILES"; then
27127
27128
27129ac_cr=`echo X | tr X '\015'`
27130# On cygwin, bash can eat \r inside `` if the user requested igncr.
27131# But we know of no other shell where ac_cr would be empty at this
27132# point, so we can use a bashism as a fallback.
27133if test "x$ac_cr" = x; then
27134  eval ac_cr=\$\'\\r\'
27135fi
27136ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
27137if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
27138  ac_cs_awk_cr='\\r'
27139else
27140  ac_cs_awk_cr=$ac_cr
27141fi
27142
27143echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
27144_ACEOF
27145
27146
27147{
27148  echo "cat >conf$$subs.awk <<_ACEOF" &&
27149  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
27150  echo "_ACEOF"
27151} >conf$$subs.sh ||
27152  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
27153ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
27154ac_delim='%!_!# '
27155for ac_last_try in false false false false false :; do
27156  . ./conf$$subs.sh ||
27157    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
27158
27159  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
27160  if test $ac_delim_n = $ac_delim_num; then
27161    break
27162  elif $ac_last_try; then
27163    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
27164  else
27165    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
27166  fi
27167done
27168rm -f conf$$subs.sh
27169
27170cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
27171cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
27172_ACEOF
27173sed -n '
27174h
27175s/^/S["/; s/!.*/"]=/
27176p
27177g
27178s/^[^!]*!//
27179:repl
27180t repl
27181s/'"$ac_delim"'$//
27182t delim
27183:nl
27184h
27185s/\(.\{148\}\)..*/\1/
27186t more1
27187s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
27188p
27189n
27190b repl
27191:more1
27192s/["\\]/\\&/g; s/^/"/; s/$/"\\/
27193p
27194g
27195s/.\{148\}//
27196t nl
27197:delim
27198h
27199s/\(.\{148\}\)..*/\1/
27200t more2
27201s/["\\]/\\&/g; s/^/"/; s/$/"/
27202p
27203b
27204:more2
27205s/["\\]/\\&/g; s/^/"/; s/$/"\\/
27206p
27207g
27208s/.\{148\}//
27209t delim
27210' <conf$$subs.awk | sed '
27211/^[^""]/{
27212  N
27213  s/\n//
27214}
27215' >>$CONFIG_STATUS || ac_write_fail=1
27216rm -f conf$$subs.awk
27217cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
27218_ACAWK
27219cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
27220  for (key in S) S_is_set[key] = 1
27221  FS = ""
27222
27223}
27224{
27225  line = $ 0
27226  nfields = split(line, field, "@")
27227  substed = 0
27228  len = length(field[1])
27229  for (i = 2; i < nfields; i++) {
27230    key = field[i]
27231    keylen = length(key)
27232    if (S_is_set[key]) {
27233      value = S[key]
27234      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
27235      len += length(value) + length(field[++i])
27236      substed = 1
27237    } else
27238      len += 1 + keylen
27239  }
27240
27241  print line
27242}
27243
27244_ACAWK
27245_ACEOF
27246cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
27247if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
27248  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
27249else
27250  cat
27251fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
27252  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
27253_ACEOF
27254
27255# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
27256# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
27257# trailing colons and then remove the whole line if VPATH becomes empty
27258# (actually we leave an empty line to preserve line numbers).
27259if test "x$srcdir" = x.; then
27260  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
27261h
27262s///
27263s/^/:/
27264s/[	 ]*$/:/
27265s/:\$(srcdir):/:/g
27266s/:\${srcdir}:/:/g
27267s/:@srcdir@:/:/g
27268s/^:*//
27269s/:*$//
27270x
27271s/\(=[	 ]*\).*/\1/
27272G
27273s/\n//
27274s/^[^=]*=[	 ]*$//
27275}'
27276fi
27277
27278cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
27279fi # test -n "$CONFIG_FILES"
27280
27281# Set up the scripts for CONFIG_HEADERS section.
27282# No need to generate them if there are no CONFIG_HEADERS.
27283# This happens for instance with './config.status Makefile'.
27284if test -n "$CONFIG_HEADERS"; then
27285cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
27286BEGIN {
27287_ACEOF
27288
27289# Transform confdefs.h into an awk script 'defines.awk', embedded as
27290# here-document in config.status, that substitutes the proper values into
27291# config.h.in to produce config.h.
27292
27293# Create a delimiter string that does not exist in confdefs.h, to ease
27294# handling of long lines.
27295ac_delim='%!_!# '
27296for ac_last_try in false false :; do
27297  ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
27298  if test -z "$ac_tt"; then
27299    break
27300  elif $ac_last_try; then
27301    as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
27302  else
27303    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
27304  fi
27305done
27306
27307# For the awk script, D is an array of macro values keyed by name,
27308# likewise P contains macro parameters if any.  Preserve backslash
27309# newline sequences.
27310
27311ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
27312sed -n '
27313s/.\{148\}/&'"$ac_delim"'/g
27314t rset
27315:rset
27316s/^[	 ]*#[	 ]*define[	 ][	 ]*/ /
27317t def
27318d
27319:def
27320s/\\$//
27321t bsnl
27322s/["\\]/\\&/g
27323s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
27324D["\1"]=" \3"/p
27325s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2"/p
27326d
27327:bsnl
27328s/["\\]/\\&/g
27329s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
27330D["\1"]=" \3\\\\\\n"\\/p
27331t cont
27332s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
27333t cont
27334d
27335:cont
27336n
27337s/.\{148\}/&'"$ac_delim"'/g
27338t clear
27339:clear
27340s/\\$//
27341t bsnlc
27342s/["\\]/\\&/g; s/^/"/; s/$/"/p
27343d
27344:bsnlc
27345s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
27346b cont
27347' <confdefs.h | sed '
27348s/'"$ac_delim"'/"\\\
27349"/g' >>$CONFIG_STATUS || ac_write_fail=1
27350
27351cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
27352  for (key in D) D_is_set[key] = 1
27353  FS = ""
27354}
27355/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
27356  line = \$ 0
27357  split(line, arg, " ")
27358  if (arg[1] == "#") {
27359    defundef = arg[2]
27360    mac1 = arg[3]
27361  } else {
27362    defundef = substr(arg[1], 2)
27363    mac1 = arg[2]
27364  }
27365  split(mac1, mac2, "(") #)
27366  macro = mac2[1]
27367  prefix = substr(line, 1, index(line, defundef) - 1)
27368  if (D_is_set[macro]) {
27369    # Preserve the white space surrounding the "#".
27370    print prefix "define", macro P[macro] D[macro]
27371    next
27372  } else {
27373    # Replace #undef with comments.  This is necessary, for example,
27374    # in the case of _POSIX_SOURCE, which is predefined and required
27375    # on some systems where configure will not decide to define it.
27376    if (defundef == "undef") {
27377      print "/*", prefix defundef, macro, "*/"
27378      next
27379    }
27380  }
27381}
27382{ print }
27383_ACAWK
27384_ACEOF
27385cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
27386  as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
27387fi # test -n "$CONFIG_HEADERS"
27388
27389
27390eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS    :C $CONFIG_COMMANDS"
27391shift
27392for ac_tag
27393do
27394  case $ac_tag in
27395  :[FHLC]) ac_mode=$ac_tag; continue;;
27396  esac
27397  case $ac_mode$ac_tag in
27398  :[FHL]*:*);;
27399  :L* | :C*:*) as_fn_error $? "invalid tag '$ac_tag'" "$LINENO" 5;;
27400  :[FH]-) ac_tag=-:-;;
27401  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
27402  esac
27403  ac_save_IFS=$IFS
27404  IFS=:
27405  set x $ac_tag
27406  IFS=$ac_save_IFS
27407  shift
27408  ac_file=$1
27409  shift
27410
27411  case $ac_mode in
27412  :L) ac_source=$1;;
27413  :[FH])
27414    ac_file_inputs=
27415    for ac_f
27416    do
27417      case $ac_f in
27418      -) ac_f="$ac_tmp/stdin";;
27419      *) # Look for the file first in the build tree, then in the source tree
27420	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
27421	 # because $ac_f cannot contain ':'.
27422	 test -f "$ac_f" ||
27423	   case $ac_f in
27424	   [\\/$]*) false;;
27425	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
27426	   esac ||
27427	   as_fn_error 1 "cannot find input file: '$ac_f'" "$LINENO" 5;;
27428      esac
27429      case $ac_f in *\'*) ac_f=`printf "%s\n" "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
27430      as_fn_append ac_file_inputs " '$ac_f'"
27431    done
27432
27433    # Let's still pretend it is 'configure' which instantiates (i.e., don't
27434    # use $as_me), people would be surprised to read:
27435    #    /* config.h.  Generated by config.status.  */
27436    configure_input='Generated from '`
27437	  printf "%s\n" "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
27438	`' by configure.'
27439    if test x"$ac_file" != x-; then
27440      configure_input="$ac_file.  $configure_input"
27441      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
27442printf "%s\n" "$as_me: creating $ac_file" >&6;}
27443    fi
27444    # Neutralize special characters interpreted by sed in replacement strings.
27445    case $configure_input in #(
27446    *\&* | *\|* | *\\* )
27447       ac_sed_conf_input=`printf "%s\n" "$configure_input" |
27448       sed 's/[\\\\&|]/\\\\&/g'`;; #(
27449    *) ac_sed_conf_input=$configure_input;;
27450    esac
27451
27452    case $ac_tag in
27453    *:-:* | *:-) cat >"$ac_tmp/stdin" \
27454      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
27455    esac
27456    ;;
27457  esac
27458
27459  ac_dir=`$as_dirname -- "$ac_file" ||
27460$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
27461	 X"$ac_file" : 'X\(//\)[^/]' \| \
27462	 X"$ac_file" : 'X\(//\)$' \| \
27463	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
27464printf "%s\n" X"$ac_file" |
27465    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
27466	    s//\1/
27467	    q
27468	  }
27469	  /^X\(\/\/\)[^/].*/{
27470	    s//\1/
27471	    q
27472	  }
27473	  /^X\(\/\/\)$/{
27474	    s//\1/
27475	    q
27476	  }
27477	  /^X\(\/\).*/{
27478	    s//\1/
27479	    q
27480	  }
27481	  s/.*/./; q'`
27482  as_dir="$ac_dir"; as_fn_mkdir_p
27483  ac_builddir=.
27484
27485case "$ac_dir" in
27486.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
27487*)
27488  ac_dir_suffix=/`printf "%s\n" "$ac_dir" | sed 's|^\.[\\/]||'`
27489  # A ".." for each directory in $ac_dir_suffix.
27490  ac_top_builddir_sub=`printf "%s\n" "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
27491  case $ac_top_builddir_sub in
27492  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
27493  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
27494  esac ;;
27495esac
27496ac_abs_top_builddir=$ac_pwd
27497ac_abs_builddir=$ac_pwd$ac_dir_suffix
27498# for backward compatibility:
27499ac_top_builddir=$ac_top_build_prefix
27500
27501case $srcdir in
27502  .)  # We are building in place.
27503    ac_srcdir=.
27504    ac_top_srcdir=$ac_top_builddir_sub
27505    ac_abs_top_srcdir=$ac_pwd ;;
27506  [\\/]* | ?:[\\/]* )  # Absolute name.
27507    ac_srcdir=$srcdir$ac_dir_suffix;
27508    ac_top_srcdir=$srcdir
27509    ac_abs_top_srcdir=$srcdir ;;
27510  *) # Relative name.
27511    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
27512    ac_top_srcdir=$ac_top_build_prefix$srcdir
27513    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
27514esac
27515ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
27516
27517
27518  case $ac_mode in
27519  :F)
27520  #
27521  # CONFIG_FILE
27522  #
27523
27524_ACEOF
27525
27526cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
27527# If the template does not know about datarootdir, expand it.
27528# FIXME: This hack should be removed a few years after 2.60.
27529ac_datarootdir_hack=; ac_datarootdir_seen=
27530ac_sed_dataroot='
27531/datarootdir/ {
27532  p
27533  q
27534}
27535/@datadir@/p
27536/@docdir@/p
27537/@infodir@/p
27538/@localedir@/p
27539/@mandir@/p'
27540case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
27541*datarootdir*) ac_datarootdir_seen=yes;;
27542*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
27543  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
27544printf "%s\n" "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
27545_ACEOF
27546cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
27547  ac_datarootdir_hack='
27548  s&@datadir@&$datadir&g
27549  s&@docdir@&$docdir&g
27550  s&@infodir@&$infodir&g
27551  s&@localedir@&$localedir&g
27552  s&@mandir@&$mandir&g
27553  s&\\\${datarootdir}&$datarootdir&g' ;;
27554esac
27555_ACEOF
27556
27557# Neutralize VPATH when '$srcdir' = '.'.
27558# Shell code in configure.ac might set extrasub.
27559# FIXME: do we really want to maintain this feature?
27560cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
27561ac_sed_extra="$ac_vpsub
27562$extrasub
27563_ACEOF
27564cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
27565:t
27566/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
27567s|@configure_input@|$ac_sed_conf_input|;t t
27568s&@top_builddir@&$ac_top_builddir_sub&;t t
27569s&@top_build_prefix@&$ac_top_build_prefix&;t t
27570s&@srcdir@&$ac_srcdir&;t t
27571s&@abs_srcdir@&$ac_abs_srcdir&;t t
27572s&@top_srcdir@&$ac_top_srcdir&;t t
27573s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
27574s&@builddir@&$ac_builddir&;t t
27575s&@abs_builddir@&$ac_abs_builddir&;t t
27576s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
27577$ac_datarootdir_hack
27578"
27579eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
27580  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
27581
27582test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
27583  { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
27584  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' \
27585      "$ac_tmp/out"`; test -z "$ac_out"; } &&
27586  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable 'datarootdir'
27587which seems to be undefined.  Please make sure it is defined" >&5
27588printf "%s\n" "$as_me: WARNING: $ac_file contains a reference to the variable 'datarootdir'
27589which seems to be undefined.  Please make sure it is defined" >&2;}
27590
27591  rm -f "$ac_tmp/stdin"
27592  case $ac_file in
27593  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
27594  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
27595  esac \
27596  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
27597 ;;
27598  :H)
27599  #
27600  # CONFIG_HEADER
27601  #
27602  if test x"$ac_file" != x-; then
27603    {
27604      printf "%s\n" "/* $configure_input  */" >&1 \
27605      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
27606    } >"$ac_tmp/config.h" \
27607      || as_fn_error $? "could not create $ac_file" "$LINENO" 5
27608    if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
27609      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
27610printf "%s\n" "$as_me: $ac_file is unchanged" >&6;}
27611    else
27612      rm -f "$ac_file"
27613      mv "$ac_tmp/config.h" "$ac_file" \
27614	|| as_fn_error $? "could not create $ac_file" "$LINENO" 5
27615    fi
27616  else
27617    printf "%s\n" "/* $configure_input  */" >&1 \
27618      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
27619      || as_fn_error $? "could not create -" "$LINENO" 5
27620  fi
27621 ;;
27622
27623  :C)  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
27624printf "%s\n" "$as_me: executing $ac_file commands" >&6;}
27625 ;;
27626  esac
27627
27628
27629  case $ac_file$ac_mode in
27630    "libtool":C)
27631
27632    # See if we are running on zsh, and set the options that allow our
27633    # commands through without removal of \ escapes.
27634    if test -n "${ZSH_VERSION+set}"; then
27635      setopt NO_GLOB_SUBST
27636    fi
27637
27638    cfgfile=${ofile}T
27639    trap "$RM \"$cfgfile\"; exit 1" 1 2 15
27640    $RM "$cfgfile"
27641
27642    cat <<_LT_EOF >> "$cfgfile"
27643#! $SHELL
27644# Generated automatically by $as_me ($PACKAGE) $VERSION
27645# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
27646# NOTE: Changes made to this file will be lost: look at ltmain.sh.
27647
27648# Provide generalized library-building support services.
27649# Written by Gordon Matzigkeit, 1996
27650
27651# Copyright (C) 2014 Free Software Foundation, Inc.
27652# This is free software; see the source for copying conditions.  There is NO
27653# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
27654
27655# GNU Libtool is free software; you can redistribute it and/or modify
27656# it under the terms of the GNU General Public License as published by
27657# the Free Software Foundation; either version 2 of of the License, or
27658# (at your option) any later version.
27659#
27660# As a special exception to the GNU General Public License, if you
27661# distribute this file as part of a program or library that is built
27662# using GNU Libtool, you may include this file under the  same
27663# distribution terms that you use for the rest of that program.
27664#
27665# GNU Libtool is distributed in the hope that it will be useful, but
27666# WITHOUT ANY WARRANTY; without even the implied warranty of
27667# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
27668# GNU General Public License for more details.
27669#
27670# You should have received a copy of the GNU General Public License
27671# along with this program.  If not, see <http://www.gnu.org/licenses/>.
27672
27673
27674# The names of the tagged configurations supported by this script.
27675available_tags=''
27676
27677# Configured defaults for sys_lib_dlsearch_path munging.
27678: \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"}
27679
27680# ### BEGIN LIBTOOL CONFIG
27681
27682# Which release of libtool.m4 was used?
27683macro_version=$macro_version
27684macro_revision=$macro_revision
27685
27686# Whether or not to build shared libraries.
27687build_libtool_libs=$enable_shared
27688
27689# Whether or not to build static libraries.
27690build_old_libs=$enable_static
27691
27692# What type of objects to build.
27693pic_mode=$pic_mode
27694
27695# Whether or not to optimize for fast installation.
27696fast_install=$enable_fast_install
27697
27698# Shared archive member basename,for filename based shared library versioning on AIX.
27699shared_archive_member_spec=$shared_archive_member_spec
27700
27701# Shell to use when invoking shell scripts.
27702SHELL=$lt_SHELL
27703
27704# An echo program that protects backslashes.
27705ECHO=$lt_ECHO
27706
27707# The PATH separator for the build system.
27708PATH_SEPARATOR=$lt_PATH_SEPARATOR
27709
27710# The host system.
27711host_alias=$host_alias
27712host=$host
27713host_os=$host_os
27714
27715# The build system.
27716build_alias=$build_alias
27717build=$build
27718build_os=$build_os
27719
27720# A sed program that does not truncate output.
27721SED=$lt_SED
27722
27723# Sed that helps us avoid accidentally triggering echo(1) options like -n.
27724Xsed="\$SED -e 1s/^X//"
27725
27726# A grep program that handles long lines.
27727GREP=$lt_GREP
27728
27729# An ERE matcher.
27730EGREP=$lt_EGREP
27731
27732# A literal string matcher.
27733FGREP=$lt_FGREP
27734
27735# A BSD- or MS-compatible name lister.
27736NM=$lt_NM
27737
27738# Whether we need soft or hard links.
27739LN_S=$lt_LN_S
27740
27741# What is the maximum length of a command?
27742max_cmd_len=$max_cmd_len
27743
27744# Object file suffix (normally "o").
27745objext=$ac_objext
27746
27747# Executable file suffix (normally "").
27748exeext=$exeext
27749
27750# whether the shell understands "unset".
27751lt_unset=$lt_unset
27752
27753# turn spaces into newlines.
27754SP2NL=$lt_lt_SP2NL
27755
27756# turn newlines into spaces.
27757NL2SP=$lt_lt_NL2SP
27758
27759# convert \$build file names to \$host format.
27760to_host_file_cmd=$lt_cv_to_host_file_cmd
27761
27762# convert \$build files to toolchain format.
27763to_tool_file_cmd=$lt_cv_to_tool_file_cmd
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.
27790AR_FLAGS=$lt_AR_FLAGS
27791
27792# How to feed a file listing to the archiver.
27793archiver_list_spec=$lt_archiver_list_spec
27794
27795# A symbol stripping program.
27796STRIP=$lt_STRIP
27797
27798# Commands used to install an old-style archive.
27799RANLIB=$lt_RANLIB
27800old_postinstall_cmds=$lt_old_postinstall_cmds
27801old_postuninstall_cmds=$lt_old_postuninstall_cmds
27802
27803# Whether to use a lock for old archive extraction.
27804lock_old_archive_extraction=$lock_old_archive_extraction
27805
27806# A C compiler.
27807LTCC=$lt_CC
27808
27809# LTCC compiler flags.
27810LTCFLAGS=$lt_CFLAGS
27811
27812# Take the output of nm and produce a listing of raw symbols and C names.
27813global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
27814
27815# Transform the output of nm in a proper C declaration.
27816global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
27817
27818# Transform the output of nm into a list of symbols to manually relocate.
27819global_symbol_to_import=$lt_lt_cv_sys_global_symbol_to_import
27820
27821# Transform the output of nm in a C name address pair.
27822global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
27823
27824# Transform the output of nm in a C name address pair when lib prefix is needed.
27825global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix
27826
27827# The name lister interface.
27828nm_interface=$lt_lt_cv_nm_interface
27829
27830# Specify filename containing input files for \$NM.
27831nm_file_list_spec=$lt_nm_file_list_spec
27832
27833# The root where to search for dependent libraries,and where our libraries should be installed.
27834lt_sysroot=$lt_sysroot
27835
27836# Command to truncate a binary pipe.
27837lt_truncate_bin=$lt_lt_cv_truncate_bin
27838
27839# The name of the directory that contains temporary libtool files.
27840objdir=$objdir
27841
27842# Used to examine libraries when file_magic_cmd begins with "file".
27843MAGIC_CMD=$MAGIC_CMD
27844
27845# Must we lock files when doing compilation?
27846need_locks=$lt_need_locks
27847
27848# Manifest tool.
27849MANIFEST_TOOL=$lt_MANIFEST_TOOL
27850
27851# Tool to manipulate archived DWARF debug symbol files on Mac OS X.
27852DSYMUTIL=$lt_DSYMUTIL
27853
27854# Tool to change global to local symbols on Mac OS X.
27855NMEDIT=$lt_NMEDIT
27856
27857# Tool to manipulate fat objects and archives on Mac OS X.
27858LIPO=$lt_LIPO
27859
27860# ldd/readelf like tool for Mach-O binaries on Mac OS X.
27861OTOOL=$lt_OTOOL
27862
27863# ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4.
27864OTOOL64=$lt_OTOOL64
27865
27866# Old archive suffix (normally "a").
27867libext=$libext
27868
27869# Shared library suffix (normally ".so").
27870shrext_cmds=$lt_shrext_cmds
27871
27872# The commands to extract the exported symbol list from a shared archive.
27873extract_expsyms_cmds=$lt_extract_expsyms_cmds
27874
27875# Variables whose values should be saved in libtool wrapper scripts and
27876# restored at link time.
27877variables_saved_for_relink=$lt_variables_saved_for_relink
27878
27879# Do we need the "lib" prefix for modules?
27880need_lib_prefix=$need_lib_prefix
27881
27882# Do we need a version for libraries?
27883need_version=$need_version
27884
27885# Library versioning type.
27886version_type=$version_type
27887
27888# Shared library runtime path variable.
27889runpath_var=$runpath_var
27890
27891# Shared library path variable.
27892shlibpath_var=$shlibpath_var
27893
27894# Is shlibpath searched before the hard-coded library search path?
27895shlibpath_overrides_runpath=$shlibpath_overrides_runpath
27896
27897# Format of library name prefix.
27898libname_spec=$lt_libname_spec
27899
27900# List of archive names.  First name is the real one, the rest are links.
27901# The last name is the one that the linker finds with -lNAME
27902library_names_spec=$lt_library_names_spec
27903
27904# The coded name of the library, if different from the real name.
27905soname_spec=$lt_soname_spec
27906
27907# Permission mode override for installation of shared libraries.
27908install_override_mode=$lt_install_override_mode
27909
27910# Command to use after installation of a shared archive.
27911postinstall_cmds=$lt_postinstall_cmds
27912
27913# Command to use after uninstallation of a shared archive.
27914postuninstall_cmds=$lt_postuninstall_cmds
27915
27916# Commands used to finish a libtool library installation in a directory.
27917finish_cmds=$lt_finish_cmds
27918
27919# As "finish_cmds", except a single script fragment to be evaled but
27920# not shown.
27921finish_eval=$lt_finish_eval
27922
27923# Whether we should hardcode library paths into libraries.
27924hardcode_into_libs=$hardcode_into_libs
27925
27926# Compile-time system search path for libraries.
27927sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
27928
27929# Detected run-time system search path for libraries.
27930sys_lib_dlsearch_path_spec=$lt_configure_time_dlsearch_path
27931
27932# Explicit LT_SYS_LIBRARY_PATH set during ./configure time.
27933configure_time_lt_sys_library_path=$lt_configure_time_lt_sys_library_path
27934
27935# Whether dlopen is supported.
27936dlopen_support=$enable_dlopen
27937
27938# Whether dlopen of programs is supported.
27939dlopen_self=$enable_dlopen_self
27940
27941# Whether dlopen of statically linked programs is supported.
27942dlopen_self_static=$enable_dlopen_self_static
27943
27944# Commands to strip libraries.
27945old_striplib=$lt_old_striplib
27946striplib=$lt_striplib
27947
27948
27949# The linker used to build libraries.
27950LD=$lt_LD
27951
27952# How to create reloadable object files.
27953reload_flag=$lt_reload_flag
27954reload_cmds=$lt_reload_cmds
27955
27956# Commands used to build an old-style archive.
27957old_archive_cmds=$lt_old_archive_cmds
27958
27959# A language specific compiler.
27960CC=$lt_compiler
27961
27962# Is the compiler the GNU compiler?
27963with_gcc=$GCC
27964
27965# Compiler flag to turn off builtin functions.
27966no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag
27967
27968# Additional compiler flags for building library objects.
27969pic_flag=$lt_lt_prog_compiler_pic
27970
27971# How to pass a linker flag through the compiler.
27972wl=$lt_lt_prog_compiler_wl
27973
27974# Compiler flag to prevent dynamic linking.
27975link_static_flag=$lt_lt_prog_compiler_static
27976
27977# Does compiler simultaneously support -c and -o options?
27978compiler_c_o=$lt_lt_cv_prog_compiler_c_o
27979
27980# Whether or not to add -lc for building shared libraries.
27981build_libtool_need_lc=$archive_cmds_need_lc
27982
27983# Whether or not to disallow shared libs when runtime libs are static.
27984allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes
27985
27986# Compiler flag to allow reflexive dlopens.
27987export_dynamic_flag_spec=$lt_export_dynamic_flag_spec
27988
27989# Compiler flag to generate shared objects directly from archives.
27990whole_archive_flag_spec=$lt_whole_archive_flag_spec
27991
27992# Whether the compiler copes with passing no objects directly.
27993compiler_needs_object=$lt_compiler_needs_object
27994
27995# Create an old-style archive from a shared archive.
27996old_archive_from_new_cmds=$lt_old_archive_from_new_cmds
27997
27998# Create a temporary old-style archive to link instead of a shared archive.
27999old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds
28000
28001# Commands used to build a shared archive.
28002archive_cmds=$lt_archive_cmds
28003archive_expsym_cmds=$lt_archive_expsym_cmds
28004
28005# Commands used to build a loadable module if different from building
28006# a shared archive.
28007module_cmds=$lt_module_cmds
28008module_expsym_cmds=$lt_module_expsym_cmds
28009
28010# Whether we are building with GNU ld or not.
28011with_gnu_ld=$lt_with_gnu_ld
28012
28013# Flag that allows shared libraries with undefined symbols to be built.
28014allow_undefined_flag=$lt_allow_undefined_flag
28015
28016# Flag that enforces no undefined symbols.
28017no_undefined_flag=$lt_no_undefined_flag
28018
28019# Flag to hardcode \$libdir into a binary during linking.
28020# This must work even if \$libdir does not exist
28021hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
28022
28023# Whether we need a single "-rpath" flag with a separated argument.
28024hardcode_libdir_separator=$lt_hardcode_libdir_separator
28025
28026# Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes
28027# DIR into the resulting binary.
28028hardcode_direct=$hardcode_direct
28029
28030# Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes
28031# DIR into the resulting binary and the resulting library dependency is
28032# "absolute",i.e impossible to change by setting \$shlibpath_var if the
28033# library is relocated.
28034hardcode_direct_absolute=$hardcode_direct_absolute
28035
28036# Set to "yes" if using the -LDIR flag during linking hardcodes DIR
28037# into the resulting binary.
28038hardcode_minus_L=$hardcode_minus_L
28039
28040# Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
28041# into the resulting binary.
28042hardcode_shlibpath_var=$hardcode_shlibpath_var
28043
28044# Set to "yes" if building a shared library automatically hardcodes DIR
28045# into the library and all subsequent libraries and executables linked
28046# against it.
28047hardcode_automatic=$hardcode_automatic
28048
28049# Set to yes if linker adds runtime paths of dependent libraries
28050# to runtime path list.
28051inherit_rpath=$inherit_rpath
28052
28053# Whether libtool must link a program against all its dependency libraries.
28054link_all_deplibs=$link_all_deplibs
28055
28056# Set to "yes" if exported symbols are required.
28057always_export_symbols=$always_export_symbols
28058
28059# The commands to list exported symbols.
28060export_symbols_cmds=$lt_export_symbols_cmds
28061
28062# Symbols that should not be listed in the preloaded symbols.
28063exclude_expsyms=$lt_exclude_expsyms
28064
28065# Symbols that must always be exported.
28066include_expsyms=$lt_include_expsyms
28067
28068# Commands necessary for linking programs (against libraries) with templates.
28069prelink_cmds=$lt_prelink_cmds
28070
28071# Commands necessary for finishing linking programs.
28072postlink_cmds=$lt_postlink_cmds
28073
28074# Specify filename containing input files.
28075file_list_spec=$lt_file_list_spec
28076
28077# How to hardcode a shared library path into an executable.
28078hardcode_action=$hardcode_action
28079
28080# ### END LIBTOOL CONFIG
28081
28082_LT_EOF
28083
28084    cat <<'_LT_EOF' >> "$cfgfile"
28085
28086# ### BEGIN FUNCTIONS SHARED WITH CONFIGURE
28087
28088# func_munge_path_list VARIABLE PATH
28089# -----------------------------------
28090# VARIABLE is name of variable containing _space_ separated list of
28091# directories to be munged by the contents of PATH, which is string
28092# having a format:
28093# "DIR[:DIR]:"
28094#       string "DIR[ DIR]" will be prepended to VARIABLE
28095# ":DIR[:DIR]"
28096#       string "DIR[ DIR]" will be appended to VARIABLE
28097# "DIRP[:DIRP]::[DIRA:]DIRA"
28098#       string "DIRP[ DIRP]" will be prepended to VARIABLE and string
28099#       "DIRA[ DIRA]" will be appended to VARIABLE
28100# "DIR[:DIR]"
28101#       VARIABLE will be replaced by "DIR[ DIR]"
28102func_munge_path_list ()
28103{
28104    case x$2 in
28105    x)
28106        ;;
28107    *:)
28108        eval $1=\"`$ECHO $2 | $SED 's/:/ /g'` \$$1\"
28109        ;;
28110    x:*)
28111        eval $1=\"\$$1 `$ECHO $2 | $SED 's/:/ /g'`\"
28112        ;;
28113    *::*)
28114        eval $1=\"\$$1\ `$ECHO $2 | $SED -e 's/.*:://' -e 's/:/ /g'`\"
28115        eval $1=\"`$ECHO $2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \$$1\"
28116        ;;
28117    *)
28118        eval $1=\"`$ECHO $2 | $SED 's/:/ /g'`\"
28119        ;;
28120    esac
28121}
28122
28123
28124# Calculate cc_basename.  Skip known compiler wrappers and cross-prefix.
28125func_cc_basename ()
28126{
28127    for cc_temp in $*""; do
28128      case $cc_temp in
28129        compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
28130        distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
28131        \-*) ;;
28132        *) break;;
28133      esac
28134    done
28135    func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
28136}
28137
28138
28139# ### END FUNCTIONS SHARED WITH CONFIGURE
28140
28141_LT_EOF
28142
28143  case $host_os in
28144  aix3*)
28145    cat <<\_LT_EOF >> "$cfgfile"
28146# AIX sometimes has problems with the GCC collect2 program.  For some
28147# reason, if we set the COLLECT_NAMES environment variable, the problems
28148# vanish in a puff of smoke.
28149if test set != "${COLLECT_NAMES+set}"; then
28150  COLLECT_NAMES=
28151  export COLLECT_NAMES
28152fi
28153_LT_EOF
28154    ;;
28155  esac
28156
28157
28158
28159ltmain=$ac_aux_dir/ltmain.sh
28160
28161
28162  # We use sed instead of cat because bash on DJGPP gets confused if
28163  # if finds mixed CR/LF and LF-only lines.  Since sed operates in
28164  # text mode, it properly converts lines to CR/LF.  This bash problem
28165  # is reportedly fixed, but why not run on old versions too?
28166  sed '$q' "$ltmain" >> "$cfgfile" \
28167     || (rm -f "$cfgfile"; exit 1)
28168
28169   mv -f "$cfgfile" "$ofile" ||
28170    (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
28171  chmod +x "$ofile"
28172
28173 ;;
28174    "disable-rpath":C)
28175	sed < libtool > libtool-2 \
28176	's/^hardcode_libdir_flag_spec.*$'/'hardcode_libdir_flag_spec=" -D__LIBTOOL_RPATH_SED__ "/'
28177	mv libtool-2 libtool
28178	chmod 755 libtool
28179	libtool="./libtool"
28180	 ;;
28181
28182  esac
28183done # for ac_tag
28184
28185
28186as_fn_exit 0
28187_ACEOF
28188ac_clean_files=$ac_clean_files_save
28189
28190test $ac_write_fail = 0 ||
28191  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
28192
28193
28194# configure is writing to config.log, and then calls config.status.
28195# config.status does its own redirection, appending to config.log.
28196# Unfortunately, on DOS this fails, as config.log is still kept open
28197# by configure, so config.status won't be able to write to it; its
28198# output is simply discarded.  So we exec the FD to /dev/null,
28199# effectively closing config.log, so it can be properly (re)opened and
28200# appended to by config.status.  When coming back to configure, we
28201# need to make the FD available again.
28202if test "$no_create" != yes; then
28203  ac_cs_success=:
28204  ac_config_status_args=
28205  test "$silent" = yes &&
28206    ac_config_status_args="$ac_config_status_args --quiet"
28207  exec 5>/dev/null
28208  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
28209  exec 5>>config.log
28210  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
28211  # would make configure fail if this is the last instruction.
28212  $ac_cs_success || as_fn_exit 1
28213fi
28214if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
28215  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
28216printf "%s\n" "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
28217fi
28218
28219
28220