xref: /freebsd/contrib/unbound/configure (revision 5a0119491adbea0876d9d6dc0ef3e71f3d64a20b)
1#! /bin/sh
2# Guess values for system-dependent variables and create Makefiles.
3# Generated by GNU Autoconf 2.72 for unbound 1.23.1.
4#
5# Report bugs to <unbound-bugs@nlnetlabs.nl or https://github.com/NLnetLabs/unbound/issues>.
6#
7#
8# Copyright (C) 1992-1996, 1998-2017, 2020-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.23.1'
619PACKAGE_STRING='unbound 1.23.1'
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_C
683UBSYMS
684EXTRALINK
685COMMON_OBJ_ALL_SYMBOLS
686LIBOBJ_WITHOUT_CTIME
687LIBOBJ_WITHOUT_CTIMEARC4
688WIN_CHECKCONF_OBJ_LINK
689WIN_CONTROL_OBJ_LINK
690WIN_UBANCHOR_OBJ_LINK
691WIN_HOST_OBJ_LINK
692WIN_DAEMON_OBJ_LINK
693WIN_DAEMON_OBJ
694WIN_DAEMON_SRC
695WINAPPS
696WINDRES
697CHECKLOCK_OBJ
698staticexe
699PC_LIBEVENT_DEPENDENCY
700UNBOUND_EVENT_UNINSTALL
701UNBOUND_EVENT_INSTALL
702SUBNET_HEADER
703SUBNET_OBJ
704PC_LIBBSD_DEPENDENCY
705SSLLIB
706HAVE_SSL
707PC_CRYPTO_DEPENDENCY
708CONFIG_DATE
709SOURCE_DATE_EPOCH
710GCC_DOCKER_LINTFLAGS
711NETBSD_LINTFLAGS
712PYUNBOUND_UNINSTALL
713PYUNBOUND_INSTALL
714PYUNBOUND_TARGET
715PYUNBOUND_OBJ
716WITH_PYUNBOUND
717PYTHONMOD_UNINSTALL
718PYTHONMOD_INSTALL
719PYTHONMOD_HEADER
720PYTHONMOD_OBJ
721WITH_PYTHONMODULE
722swig
723SWIG_LIB
724SWIG
725PC_PY_DEPENDENCY
726PYTHON_LIBS
727PY_MAJOR_VERSION
728PYTHON_SITE_PKG
729PYTHON_LDFLAGS
730PYTHON_CPPFLAGS
731PYTHON
732PYTHON_VERSION
733DYNLIBMOD_EXTRALIBS
734DYNLIBMOD_HEADER
735DYNLIBMOD_OBJ
736WITH_DYNLIBMODULE
737PTHREAD_CFLAGS_ONLY
738PTHREAD_CFLAGS
739PTHREAD_LIBS
740PTHREAD_CXX
741PTHREAD_CC
742ax_pthread_config
743CPP
744ASYNCLOOK_ALLOCCHECK_EXTRA_OBJ
745SLDNS_ALLOCCHECK_EXTRA_OBJ
746USE_SYSTEMD_FALSE
747USE_SYSTEMD_TRUE
748SYSTEMD_DAEMON_LIBS
749SYSTEMD_DAEMON_CFLAGS
750SYSTEMD_LIBS
751SYSTEMD_CFLAGS
752RUNTIME_PATH
753LIBOBJS
754PKG_CONFIG_LIBDIR
755PKG_CONFIG_PATH
756PKG_CONFIG
757LT_SYS_LIBRARY_PATH
758OTOOL64
759OTOOL
760LIPO
761NMEDIT
762DSYMUTIL
763MANIFEST_TOOL
764AWK
765RANLIB
766ac_ct_AR
767DLLTOOL
768OBJDUMP
769LN_S
770NM
771ac_ct_DUMPBIN
772DUMPBIN
773LD
774FGREP
775EGREP
776SED
777LIBTOOL
778AR
779host_os
780host_vendor
781host_cpu
782host
783build_os
784build_vendor
785build_cpu
786build
787libtool
788STRIP
789doxygen
790YFLAGS
791YACC
792LEXLIB
793LEX_OUTPUT_ROOT
794LEX
795debug_enabled
796DEPFLAG
797GREP
798UNBOUND_USERNAME
799UNBOUND_ROOTCERT_FILE
800UNBOUND_ROOTKEY_FILE
801UNBOUND_PIDFILE
802UNBOUND_SHARE_DIR
803UNBOUND_CHROOT_DIR
804UNBOUND_RUN_DIR
805ub_conf_dir
806ub_conf_file
807UNBOUND_LOCALSTATE_DIR
808UNBOUND_SYSCONF_DIR
809UNBOUND_SBIN_DIR
810OBJEXT
811EXEEXT
812ac_ct_CC
813CPPFLAGS
814LDFLAGS
815CFLAGS
816CC
817LIBUNBOUND_AGE
818LIBUNBOUND_REVISION
819LIBUNBOUND_CURRENT
820UNBOUND_VERSION_MICRO
821UNBOUND_VERSION_MINOR
822UNBOUND_VERSION_MAJOR
823target_alias
824host_alias
825build_alias
826LIBS
827ECHO_T
828ECHO_N
829ECHO_C
830DEFS
831mandir
832localedir
833libdir
834psdir
835pdfdir
836dvidir
837htmldir
838infodir
839docdir
840oldincludedir
841includedir
842runstatedir
843localstatedir
844sharedstatedir
845sysconfdir
846datadir
847datarootdir
848libexecdir
849sbindir
850bindir
851program_transform_name
852prefix
853exec_prefix
854PACKAGE_URL
855PACKAGE_BUGREPORT
856PACKAGE_STRING
857PACKAGE_VERSION
858PACKAGE_TARNAME
859PACKAGE_NAME
860PATH_SEPARATOR
861SHELL'
862ac_subst_files=''
863ac_user_opts='
864enable_option_checking
865with_conf_file
866with_run_dir
867with_chroot_dir
868with_share_dir
869with_pidfile
870with_rootkey_file
871with_rootcert_file
872with_username
873enable_checking
874enable_debug
875enable_flto
876enable_pie
877enable_relro_now
878enable_shared
879enable_static
880with_pic
881enable_fast_install
882with_aix_soname
883with_gnu_ld
884with_sysroot
885enable_libtool_lock
886enable_rpath
887enable_largefile
888enable_systemd
889enable_alloc_checks
890enable_alloc_lite
891enable_alloc_nonregional
892with_pthreads
893with_solaris_threads
894with_syslog_facility
895with_dynlibmodule
896with_pyunbound
897with_pythonmodule
898enable_swig_version_check
899with_nss
900with_nettle
901with_ssl
902with_libbsd
903enable_sha1
904enable_sha2
905enable_subnet
906enable_gost
907enable_ecdsa
908enable_dsa
909with_deprecate_rsa_1024
910enable_ed25519
911enable_ed448
912enable_event_api
913enable_tfo_client
914enable_tfo_server
915with_libevent
916with_libexpat
917with_libhiredis
918with_libnghttp2
919with_libngtcp2
920enable_static_exe
921enable_fully_static
922enable_lock_checks
923enable_allsymbols
924enable_dnstap
925with_dnstap_socket_path
926with_protobuf_c
927enable_dnscrypt
928with_libsodium
929enable_cachedb
930enable_ipsecmod
931enable_ipset
932with_libmnl
933enable_explicit_port_randomisation
934enable_linux_ip_local_port_range
935with_libunbound_only
936enable_year2038
937'
938      ac_precious_vars='build_alias
939host_alias
940target_alias
941CC
942CFLAGS
943LDFLAGS
944LIBS
945CPPFLAGS
946YACC
947YFLAGS
948LT_SYS_LIBRARY_PATH
949PKG_CONFIG
950PKG_CONFIG_PATH
951PKG_CONFIG_LIBDIR
952SYSTEMD_CFLAGS
953SYSTEMD_LIBS
954SYSTEMD_DAEMON_CFLAGS
955SYSTEMD_DAEMON_LIBS
956CPP
957PYTHON_VERSION
958SOURCE_DATE_EPOCH
959PROTOBUFC_CFLAGS
960PROTOBUFC_LIBS'
961
962
963# Initialize some variables set by options.
964ac_init_help=
965ac_init_version=false
966ac_unrecognized_opts=
967ac_unrecognized_sep=
968# The variables have the same names as the options, with
969# dashes changed to underlines.
970cache_file=/dev/null
971exec_prefix=NONE
972no_create=
973no_recursion=
974prefix=NONE
975program_prefix=NONE
976program_suffix=NONE
977program_transform_name=s,x,x,
978silent=
979site=
980srcdir=
981verbose=
982x_includes=NONE
983x_libraries=NONE
984
985# Installation directory options.
986# These are left unexpanded so users can "make install exec_prefix=/foo"
987# and all the variables that are supposed to be based on exec_prefix
988# by default will actually change.
989# Use braces instead of parens because sh, perl, etc. also accept them.
990# (The list follows the same order as the GNU Coding Standards.)
991bindir='${exec_prefix}/bin'
992sbindir='${exec_prefix}/sbin'
993libexecdir='${exec_prefix}/libexec'
994datarootdir='${prefix}/share'
995datadir='${datarootdir}'
996sysconfdir='${prefix}/etc'
997sharedstatedir='${prefix}/com'
998localstatedir='${prefix}/var'
999runstatedir='${localstatedir}/run'
1000includedir='${prefix}/include'
1001oldincludedir='/usr/include'
1002docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1003infodir='${datarootdir}/info'
1004htmldir='${docdir}'
1005dvidir='${docdir}'
1006pdfdir='${docdir}'
1007psdir='${docdir}'
1008libdir='${exec_prefix}/lib'
1009localedir='${datarootdir}/locale'
1010mandir='${datarootdir}/man'
1011
1012ac_prev=
1013ac_dashdash=
1014for ac_option
1015do
1016  # If the previous option needs an argument, assign it.
1017  if test -n "$ac_prev"; then
1018    eval $ac_prev=\$ac_option
1019    ac_prev=
1020    continue
1021  fi
1022
1023  case $ac_option in
1024  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1025  *=)   ac_optarg= ;;
1026  *)    ac_optarg=yes ;;
1027  esac
1028
1029  case $ac_dashdash$ac_option in
1030  --)
1031    ac_dashdash=yes ;;
1032
1033  -bindir | --bindir | --bindi | --bind | --bin | --bi)
1034    ac_prev=bindir ;;
1035  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1036    bindir=$ac_optarg ;;
1037
1038  -build | --build | --buil | --bui | --bu)
1039    ac_prev=build_alias ;;
1040  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1041    build_alias=$ac_optarg ;;
1042
1043  -cache-file | --cache-file | --cache-fil | --cache-fi \
1044  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1045    ac_prev=cache_file ;;
1046  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1047  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1048    cache_file=$ac_optarg ;;
1049
1050  --config-cache | -C)
1051    cache_file=config.cache ;;
1052
1053  -datadir | --datadir | --datadi | --datad)
1054    ac_prev=datadir ;;
1055  -datadir=* | --datadir=* | --datadi=* | --datad=*)
1056    datadir=$ac_optarg ;;
1057
1058  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1059  | --dataroo | --dataro | --datar)
1060    ac_prev=datarootdir ;;
1061  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1062  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1063    datarootdir=$ac_optarg ;;
1064
1065  -disable-* | --disable-*)
1066    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1067    # Reject names that are not valid shell variable names.
1068    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1069      as_fn_error $? "invalid feature name: '$ac_useropt'"
1070    ac_useropt_orig=$ac_useropt
1071    ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
1072    case $ac_user_opts in
1073      *"
1074"enable_$ac_useropt"
1075"*) ;;
1076      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1077	 ac_unrecognized_sep=', ';;
1078    esac
1079    eval enable_$ac_useropt=no ;;
1080
1081  -docdir | --docdir | --docdi | --doc | --do)
1082    ac_prev=docdir ;;
1083  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1084    docdir=$ac_optarg ;;
1085
1086  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1087    ac_prev=dvidir ;;
1088  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1089    dvidir=$ac_optarg ;;
1090
1091  -enable-* | --enable-*)
1092    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1093    # Reject names that are not valid shell variable names.
1094    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1095      as_fn_error $? "invalid feature name: '$ac_useropt'"
1096    ac_useropt_orig=$ac_useropt
1097    ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
1098    case $ac_user_opts in
1099      *"
1100"enable_$ac_useropt"
1101"*) ;;
1102      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1103	 ac_unrecognized_sep=', ';;
1104    esac
1105    eval enable_$ac_useropt=\$ac_optarg ;;
1106
1107  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1108  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1109  | --exec | --exe | --ex)
1110    ac_prev=exec_prefix ;;
1111  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1112  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1113  | --exec=* | --exe=* | --ex=*)
1114    exec_prefix=$ac_optarg ;;
1115
1116  -gas | --gas | --ga | --g)
1117    # Obsolete; use --with-gas.
1118    with_gas=yes ;;
1119
1120  -help | --help | --hel | --he | -h)
1121    ac_init_help=long ;;
1122  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1123    ac_init_help=recursive ;;
1124  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1125    ac_init_help=short ;;
1126
1127  -host | --host | --hos | --ho)
1128    ac_prev=host_alias ;;
1129  -host=* | --host=* | --hos=* | --ho=*)
1130    host_alias=$ac_optarg ;;
1131
1132  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1133    ac_prev=htmldir ;;
1134  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1135  | --ht=*)
1136    htmldir=$ac_optarg ;;
1137
1138  -includedir | --includedir | --includedi | --included | --include \
1139  | --includ | --inclu | --incl | --inc)
1140    ac_prev=includedir ;;
1141  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1142  | --includ=* | --inclu=* | --incl=* | --inc=*)
1143    includedir=$ac_optarg ;;
1144
1145  -infodir | --infodir | --infodi | --infod | --info | --inf)
1146    ac_prev=infodir ;;
1147  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1148    infodir=$ac_optarg ;;
1149
1150  -libdir | --libdir | --libdi | --libd)
1151    ac_prev=libdir ;;
1152  -libdir=* | --libdir=* | --libdi=* | --libd=*)
1153    libdir=$ac_optarg ;;
1154
1155  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1156  | --libexe | --libex | --libe)
1157    ac_prev=libexecdir ;;
1158  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1159  | --libexe=* | --libex=* | --libe=*)
1160    libexecdir=$ac_optarg ;;
1161
1162  -localedir | --localedir | --localedi | --localed | --locale)
1163    ac_prev=localedir ;;
1164  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1165    localedir=$ac_optarg ;;
1166
1167  -localstatedir | --localstatedir | --localstatedi | --localstated \
1168  | --localstate | --localstat | --localsta | --localst | --locals)
1169    ac_prev=localstatedir ;;
1170  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1171  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1172    localstatedir=$ac_optarg ;;
1173
1174  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1175    ac_prev=mandir ;;
1176  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1177    mandir=$ac_optarg ;;
1178
1179  -nfp | --nfp | --nf)
1180    # Obsolete; use --without-fp.
1181    with_fp=no ;;
1182
1183  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1184  | --no-cr | --no-c | -n)
1185    no_create=yes ;;
1186
1187  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1188  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1189    no_recursion=yes ;;
1190
1191  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1192  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1193  | --oldin | --oldi | --old | --ol | --o)
1194    ac_prev=oldincludedir ;;
1195  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1196  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1197  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1198    oldincludedir=$ac_optarg ;;
1199
1200  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1201    ac_prev=prefix ;;
1202  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1203    prefix=$ac_optarg ;;
1204
1205  -program-prefix | --program-prefix | --program-prefi | --program-pref \
1206  | --program-pre | --program-pr | --program-p)
1207    ac_prev=program_prefix ;;
1208  -program-prefix=* | --program-prefix=* | --program-prefi=* \
1209  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1210    program_prefix=$ac_optarg ;;
1211
1212  -program-suffix | --program-suffix | --program-suffi | --program-suff \
1213  | --program-suf | --program-su | --program-s)
1214    ac_prev=program_suffix ;;
1215  -program-suffix=* | --program-suffix=* | --program-suffi=* \
1216  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1217    program_suffix=$ac_optarg ;;
1218
1219  -program-transform-name | --program-transform-name \
1220  | --program-transform-nam | --program-transform-na \
1221  | --program-transform-n | --program-transform- \
1222  | --program-transform | --program-transfor \
1223  | --program-transfo | --program-transf \
1224  | --program-trans | --program-tran \
1225  | --progr-tra | --program-tr | --program-t)
1226    ac_prev=program_transform_name ;;
1227  -program-transform-name=* | --program-transform-name=* \
1228  | --program-transform-nam=* | --program-transform-na=* \
1229  | --program-transform-n=* | --program-transform-=* \
1230  | --program-transform=* | --program-transfor=* \
1231  | --program-transfo=* | --program-transf=* \
1232  | --program-trans=* | --program-tran=* \
1233  | --progr-tra=* | --program-tr=* | --program-t=*)
1234    program_transform_name=$ac_optarg ;;
1235
1236  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1237    ac_prev=pdfdir ;;
1238  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1239    pdfdir=$ac_optarg ;;
1240
1241  -psdir | --psdir | --psdi | --psd | --ps)
1242    ac_prev=psdir ;;
1243  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1244    psdir=$ac_optarg ;;
1245
1246  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1247  | -silent | --silent | --silen | --sile | --sil)
1248    silent=yes ;;
1249
1250  -runstatedir | --runstatedir | --runstatedi | --runstated \
1251  | --runstate | --runstat | --runsta | --runst | --runs \
1252  | --run | --ru | --r)
1253    ac_prev=runstatedir ;;
1254  -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
1255  | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
1256  | --run=* | --ru=* | --r=*)
1257    runstatedir=$ac_optarg ;;
1258
1259  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1260    ac_prev=sbindir ;;
1261  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1262  | --sbi=* | --sb=*)
1263    sbindir=$ac_optarg ;;
1264
1265  -sharedstatedir | --sharedstatedir | --sharedstatedi \
1266  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1267  | --sharedst | --shareds | --shared | --share | --shar \
1268  | --sha | --sh)
1269    ac_prev=sharedstatedir ;;
1270  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1271  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1272  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1273  | --sha=* | --sh=*)
1274    sharedstatedir=$ac_optarg ;;
1275
1276  -site | --site | --sit)
1277    ac_prev=site ;;
1278  -site=* | --site=* | --sit=*)
1279    site=$ac_optarg ;;
1280
1281  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1282    ac_prev=srcdir ;;
1283  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1284    srcdir=$ac_optarg ;;
1285
1286  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1287  | --syscon | --sysco | --sysc | --sys | --sy)
1288    ac_prev=sysconfdir ;;
1289  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1290  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1291    sysconfdir=$ac_optarg ;;
1292
1293  -target | --target | --targe | --targ | --tar | --ta | --t)
1294    ac_prev=target_alias ;;
1295  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1296    target_alias=$ac_optarg ;;
1297
1298  -v | -verbose | --verbose | --verbos | --verbo | --verb)
1299    verbose=yes ;;
1300
1301  -version | --version | --versio | --versi | --vers | -V)
1302    ac_init_version=: ;;
1303
1304  -with-* | --with-*)
1305    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1306    # Reject names that are not valid shell variable names.
1307    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1308      as_fn_error $? "invalid package name: '$ac_useropt'"
1309    ac_useropt_orig=$ac_useropt
1310    ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
1311    case $ac_user_opts in
1312      *"
1313"with_$ac_useropt"
1314"*) ;;
1315      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1316	 ac_unrecognized_sep=', ';;
1317    esac
1318    eval with_$ac_useropt=\$ac_optarg ;;
1319
1320  -without-* | --without-*)
1321    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1322    # Reject names that are not valid shell variable names.
1323    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1324      as_fn_error $? "invalid package name: '$ac_useropt'"
1325    ac_useropt_orig=$ac_useropt
1326    ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
1327    case $ac_user_opts in
1328      *"
1329"with_$ac_useropt"
1330"*) ;;
1331      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1332	 ac_unrecognized_sep=', ';;
1333    esac
1334    eval with_$ac_useropt=no ;;
1335
1336  --x)
1337    # Obsolete; use --with-x.
1338    with_x=yes ;;
1339
1340  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1341  | --x-incl | --x-inc | --x-in | --x-i)
1342    ac_prev=x_includes ;;
1343  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1344  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1345    x_includes=$ac_optarg ;;
1346
1347  -x-libraries | --x-libraries | --x-librarie | --x-librari \
1348  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1349    ac_prev=x_libraries ;;
1350  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1351  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1352    x_libraries=$ac_optarg ;;
1353
1354  -*) as_fn_error $? "unrecognized option: '$ac_option'
1355Try '$0 --help' for more information"
1356    ;;
1357
1358  *=*)
1359    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1360    # Reject names that are not valid shell variable names.
1361    case $ac_envvar in #(
1362      '' | [0-9]* | *[!_$as_cr_alnum]* )
1363      as_fn_error $? "invalid variable name: '$ac_envvar'" ;;
1364    esac
1365    eval $ac_envvar=\$ac_optarg
1366    export $ac_envvar ;;
1367
1368  *)
1369    # FIXME: should be removed in autoconf 3.0.
1370    printf "%s\n" "$as_me: WARNING: you should use --build, --host, --target" >&2
1371    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1372      printf "%s\n" "$as_me: WARNING: invalid host type: $ac_option" >&2
1373    : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1374    ;;
1375
1376  esac
1377done
1378
1379if test -n "$ac_prev"; then
1380  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1381  as_fn_error $? "missing argument to $ac_option"
1382fi
1383
1384if test -n "$ac_unrecognized_opts"; then
1385  case $enable_option_checking in
1386    no) ;;
1387    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1388    *)     printf "%s\n" "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1389  esac
1390fi
1391
1392# Check all directory arguments for consistency.
1393for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
1394		datadir sysconfdir sharedstatedir localstatedir includedir \
1395		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1396		libdir localedir mandir runstatedir
1397do
1398  eval ac_val=\$$ac_var
1399  # Remove trailing slashes.
1400  case $ac_val in
1401    */ )
1402      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1403      eval $ac_var=\$ac_val;;
1404  esac
1405  # Be sure to have absolute directory names.
1406  case $ac_val in
1407    [\\/$]* | ?:[\\/]* )  continue;;
1408    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1409  esac
1410  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1411done
1412
1413# There might be people who depend on the old broken behavior: '$host'
1414# used to hold the argument of --host etc.
1415# FIXME: To remove some day.
1416build=$build_alias
1417host=$host_alias
1418target=$target_alias
1419
1420# FIXME: To remove some day.
1421if test "x$host_alias" != x; then
1422  if test "x$build_alias" = x; then
1423    cross_compiling=maybe
1424  elif test "x$build_alias" != "x$host_alias"; then
1425    cross_compiling=yes
1426  fi
1427fi
1428
1429ac_tool_prefix=
1430test -n "$host_alias" && ac_tool_prefix=$host_alias-
1431
1432test "$silent" = yes && exec 6>/dev/null
1433
1434
1435ac_pwd=`pwd` && test -n "$ac_pwd" &&
1436ac_ls_di=`ls -di .` &&
1437ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1438  as_fn_error $? "working directory cannot be determined"
1439test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1440  as_fn_error $? "pwd does not report name of working directory"
1441
1442
1443# Find the source files, if location was not specified.
1444if test -z "$srcdir"; then
1445  ac_srcdir_defaulted=yes
1446  # Try the directory containing this script, then the parent directory.
1447  ac_confdir=`$as_dirname -- "$as_myself" ||
1448$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1449	 X"$as_myself" : 'X\(//\)[^/]' \| \
1450	 X"$as_myself" : 'X\(//\)$' \| \
1451	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1452printf "%s\n" X"$as_myself" |
1453    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1454	    s//\1/
1455	    q
1456	  }
1457	  /^X\(\/\/\)[^/].*/{
1458	    s//\1/
1459	    q
1460	  }
1461	  /^X\(\/\/\)$/{
1462	    s//\1/
1463	    q
1464	  }
1465	  /^X\(\/\).*/{
1466	    s//\1/
1467	    q
1468	  }
1469	  s/.*/./; q'`
1470  srcdir=$ac_confdir
1471  if test ! -r "$srcdir/$ac_unique_file"; then
1472    srcdir=..
1473  fi
1474else
1475  ac_srcdir_defaulted=no
1476fi
1477if test ! -r "$srcdir/$ac_unique_file"; then
1478  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1479  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1480fi
1481ac_msg="sources are in $srcdir, but 'cd $srcdir' does not work"
1482ac_abs_confdir=`(
1483	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1484	pwd)`
1485# When building in place, set srcdir=.
1486if test "$ac_abs_confdir" = "$ac_pwd"; then
1487  srcdir=.
1488fi
1489# Remove unnecessary trailing slashes from srcdir.
1490# Double slashes in file names in object file debugging info
1491# mess up M-x gdb in Emacs.
1492case $srcdir in
1493*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1494esac
1495for ac_var in $ac_precious_vars; do
1496  eval ac_env_${ac_var}_set=\${${ac_var}+set}
1497  eval ac_env_${ac_var}_value=\$${ac_var}
1498  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1499  eval ac_cv_env_${ac_var}_value=\$${ac_var}
1500done
1501
1502#
1503# Report the --help message.
1504#
1505if test "$ac_init_help" = "long"; then
1506  # Omit some internal or obsolete options to make the list less imposing.
1507  # This message is too long to be a string in the A/UX 3.1 sh.
1508  cat <<_ACEOF
1509'configure' configures unbound 1.23.1 to adapt to many kinds of systems.
1510
1511Usage: $0 [OPTION]... [VAR=VALUE]...
1512
1513To assign environment variables (e.g., CC, CFLAGS...), specify them as
1514VAR=VALUE.  See below for descriptions of some of the useful variables.
1515
1516Defaults for the options are specified in brackets.
1517
1518Configuration:
1519  -h, --help              display this help and exit
1520      --help=short        display options specific to this package
1521      --help=recursive    display the short help of all the included packages
1522  -V, --version           display version information and exit
1523  -q, --quiet, --silent   do not print 'checking ...' messages
1524      --cache-file=FILE   cache test results in FILE [disabled]
1525  -C, --config-cache      alias for '--cache-file=config.cache'
1526  -n, --no-create         do not create output files
1527      --srcdir=DIR        find the sources in DIR [configure dir or '..']
1528
1529Installation directories:
1530  --prefix=PREFIX         install architecture-independent files in PREFIX
1531                          [$ac_default_prefix]
1532  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1533                          [PREFIX]
1534
1535By default, 'make install' will install all the files in
1536'$ac_default_prefix/bin', '$ac_default_prefix/lib' etc.  You can specify
1537an installation prefix other than '$ac_default_prefix' using '--prefix',
1538for instance '--prefix=\$HOME'.
1539
1540For better control, use the options below.
1541
1542Fine tuning of the installation directories:
1543  --bindir=DIR            user executables [EPREFIX/bin]
1544  --sbindir=DIR           system admin executables [EPREFIX/sbin]
1545  --libexecdir=DIR        program executables [EPREFIX/libexec]
1546  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1547  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1548  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1549  --runstatedir=DIR       modifiable per-process data [LOCALSTATEDIR/run]
1550  --libdir=DIR            object code libraries [EPREFIX/lib]
1551  --includedir=DIR        C header files [PREFIX/include]
1552  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1553  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1554  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1555  --infodir=DIR           info documentation [DATAROOTDIR/info]
1556  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1557  --mandir=DIR            man documentation [DATAROOTDIR/man]
1558  --docdir=DIR            documentation root [DATAROOTDIR/doc/unbound]
1559  --htmldir=DIR           html documentation [DOCDIR]
1560  --dvidir=DIR            dvi documentation [DOCDIR]
1561  --pdfdir=DIR            pdf documentation [DOCDIR]
1562  --psdir=DIR             ps documentation [DOCDIR]
1563_ACEOF
1564
1565  cat <<\_ACEOF
1566
1567System types:
1568  --build=BUILD     configure for building on BUILD [guessed]
1569  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1570_ACEOF
1571fi
1572
1573if test -n "$ac_init_help"; then
1574  case $ac_init_help in
1575     short | recursive ) echo "Configuration of unbound 1.23.1:";;
1576   esac
1577  cat <<\_ACEOF
1578
1579Optional Features:
1580  --disable-option-checking  ignore unrecognized --enable/--with options
1581  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1582  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1583  --enable-checking       Enable warnings, asserts, makefile-dependencies
1584  --enable-debug          same as enable-checking
1585  --disable-flto          Disable link-time optimization (gcc specific option)
1586  --enable-pie            Enable Position-Independent Executable (eg. to fully
1587                          benefit from ASLR, small performance penalty)
1588  --enable-relro-now      Enable full relocation binding at load-time (RELRO
1589                          NOW, to protect GOT and .dtor areas)
1590  --enable-shared[=PKGS]  build shared libraries [default=yes]
1591  --enable-static[=PKGS]  build static libraries [default=yes]
1592  --enable-fast-install[=PKGS]
1593                          optimize for fast installation [default=yes]
1594  --disable-libtool-lock  avoid locking (might break parallel builds)
1595  --disable-rpath         disable hardcoded rpath (default=enabled)
1596  --disable-largefile     omit support for large files
1597  --enable-systemd        compile with systemd support (requires libsystemd,
1598                          pkg-config)
1599  --enable-alloc-checks   enable to memory allocation statistics, for debug
1600                          purposes
1601  --enable-alloc-lite     enable for lightweight alloc assertions, for debug
1602                          purposes
1603  --enable-alloc-nonregional
1604                          enable nonregional allocs, slow but exposes regional
1605                          allocations to other memory purifiers, for debug
1606                          purposes
1607  --disable-swig-version-check
1608                          Disable swig version check to build python modules
1609                          with older swig even though that is unreliable
1610  --disable-sha1          Disable SHA1 RRSIG support, does not disable nsec3
1611                          support
1612  --disable-sha2          Disable SHA256 and SHA512 RRSIG support
1613  --enable-subnet         Enable client subnet
1614  --disable-gost          Disable GOST support
1615  --disable-ecdsa         Disable ECDSA support
1616  --disable-dsa           Disable DSA support
1617  --disable-ed25519       Disable ED25519 support
1618  --disable-ed448         Disable ED448 support
1619  --enable-event-api      Enable (experimental) pluggable event base
1620                          libunbound API installed to unbound-event.h
1621  --enable-tfo-client     Enable TCP Fast Open for client mode
1622  --enable-tfo-server     Enable TCP Fast Open for server mode
1623  --enable-static-exe     enable to compile executables statically against
1624                          (event) uninstalled libs, for debug purposes
1625  --enable-fully-static   enable to compile fully static
1626  --enable-lock-checks    enable to check lock and unlock calls, for debug
1627                          purposes
1628  --enable-allsymbols     export all symbols from libunbound and link binaries
1629                          to it, smaller install size but libunbound export
1630                          table is polluted by internal symbols
1631  --enable-dnstap         Enable dnstap support (requires protobuf-c)
1632  --enable-dnscrypt       Enable dnscrypt support (requires libsodium)
1633  --enable-cachedb        enable cachedb module that can use external cache
1634                          storage
1635  --enable-ipsecmod       Enable ipsecmod module that facilitates
1636                          opportunistic IPsec
1637  --enable-ipset          enable ipset module
1638  --disable-explicit-port-randomisation
1639                          disable explicit source port randomisation and rely
1640                          on the kernel to provide random source ports
1641  --enable-linux-ip-local-port-range
1642                          Define this to enable use of
1643                          /proc/sys/net/ipv4/ip_local_port_range as a default
1644                          outgoing port range. This is only for the libunbound
1645                          on Linux and does not affect unbound resolving
1646                          daemon itself. This may severely limit the number of
1647                          available outgoing ports and thus decrease
1648                          randomness. Define this only when the target system
1649                          restricts (e.g. some of SELinux enabled
1650                          distributions) the use of non-ephemeral ports.
1651  --enable-year2038       support timestamps after 2038
1652
1653Optional Packages:
1654  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1655  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1656  --with-conf-file=path   Pathname to the Unbound configuration file
1657  --with-run-dir=path     set default directory to chdir to (by default dir
1658                          part of cfg file)
1659  --with-chroot-dir=path  set default directory to chroot to (by default same
1660                          as run-dir)
1661  --with-share-dir=path   set default directory with shared data (by default
1662                          same as share/unbound)
1663  --with-pidfile=filename set default pathname to unbound pidfile (default
1664                          run-dir/unbound.pid)
1665  --with-rootkey-file=filename
1666                          set default pathname to root key file (default
1667                          run-dir/root.key). This file is read and written.
1668  --with-rootcert-file=filename
1669                          set default pathname to root update certificate file
1670                          (default run-dir/icannbundle.pem). This file need
1671                          not exist if you are content with the builtin.
1672  --with-username=user    set default user that unbound changes to (default
1673                          user is unbound)
1674  --with-pic[=PKGS]       try to use only PIC/non-PIC objects [default=use
1675                          both]
1676  --with-aix-soname=aix|svr4|both
1677                          shared library versioning (aka "SONAME") variant to
1678                          provide on AIX, [default=aix].
1679  --with-gnu-ld           assume the C compiler uses GNU ld [default=no]
1680  --with-sysroot[=DIR]    Search for dependent libraries within DIR (or the
1681                          compiler's sysroot if not specified).
1682  --with-pthreads         use pthreads library, or --without-pthreads to
1683                          disable threading support.
1684  --with-solaris-threads  use solaris native thread library.
1685  --with-syslog-facility=LOCAL0 - LOCAL7
1686                          set SYSLOG_FACILITY, default DAEMON
1687  --with-dynlibmodule     build dynamic library module, or
1688                          --without-dynlibmodule to disable it. (default=no)
1689  --with-pyunbound        build PyUnbound, or --without-pyunbound to skip it.
1690                          (default=no)
1691  --with-pythonmodule     build Python module, or --without-pythonmodule to
1692                          disable script engine. (default=no)
1693  --with-nss=path         use libnss instead of openssl, installed at path.
1694  --with-nettle=path      use libnettle as crypto library, installed at path.
1695  --with-ssl=pathname     enable SSL (will check /usr/local/ssl /usr/lib/ssl
1696                          /usr/ssl /usr/pkg /usr/local /opt/local /usr/sfw
1697                          /usr or specify like /usr/include/openssl11)
1698  --with-libbsd           Use portable libbsd functions
1699  --with-deprecate-rsa-1024
1700                          Deprecate RSA 1024 bit length, makes that an
1701                          unsupported key, for use when OpenSSL FIPS refuses
1702                          1024 bit verification
1703  --with-libevent=pathname
1704                          use libevent (will check /usr/local /opt/local
1705                          /usr/lib /usr/pkg /usr/sfw /usr or you can specify
1706                          an explicit path). Slower, but allows use of large
1707                          outgoing port ranges.
1708  --with-libexpat=path    specify explicit path for libexpat.
1709  --with-libhiredis=path  specify explicit path for libhiredis.
1710  --with-libnghttp2=path  specify explicit path for libnghttp2.
1711  --with-libngtcp2=path   specify explicit path for libngtcp2, for QUIC.
1712  --with-dnstap-socket-path=pathname
1713                          set default dnstap socket path
1714  --with-protobuf-c=path  Path where protobuf-c is installed, for dnstap
1715  --with-libsodium=path   Path where libsodium is installed, for dnscrypt
1716  --with-libmnl=path      specify explicit path for libmnl.
1717  --with-libunbound-only  do not build daemon and tool programs
1718
1719Some influential environment variables:
1720  CC          C compiler command
1721  CFLAGS      C compiler flags
1722  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
1723              nonstandard directory <lib dir>
1724  LIBS        libraries to pass to the linker, e.g. -l<library>
1725  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1726              you have headers in a nonstandard directory <include dir>
1727  YACC        The 'Yet Another Compiler Compiler' implementation to use.
1728              Defaults to the first program found out of: 'bison -y', 'byacc',
1729              'yacc'.
1730  YFLAGS      The list of arguments that will be passed by default to $YACC.
1731              This script will default YFLAGS to the empty string to avoid a
1732              default value of '-d' given by some make applications.
1733  LT_SYS_LIBRARY_PATH
1734              User-defined run-time library search path.
1735  PKG_CONFIG  path to pkg-config utility
1736  PKG_CONFIG_PATH
1737              directories to add to pkg-config's search path
1738  PKG_CONFIG_LIBDIR
1739              path overriding pkg-config's built-in search path
1740  SYSTEMD_CFLAGS
1741              C compiler flags for SYSTEMD, overriding pkg-config
1742  SYSTEMD_LIBS
1743              linker flags for SYSTEMD, overriding pkg-config
1744  SYSTEMD_DAEMON_CFLAGS
1745              C compiler flags for SYSTEMD_DAEMON, overriding pkg-config
1746  SYSTEMD_DAEMON_LIBS
1747              linker flags for SYSTEMD_DAEMON, overriding pkg-config
1748  CPP         C preprocessor
1749  PYTHON_VERSION
1750              The installed Python version to use, for example '2.3'. This
1751              string will be appended to the Python interpreter canonical
1752              name.
1753  SOURCE_DATE_EPOCH
1754              If it is set, it uses the value of that variable instead of the
1755              current time as the build timestamp. The format is a unix
1756              timestamp. This enables reproducible build output.
1757  PROTOBUFC_CFLAGS
1758              C compiler flags for PROTOBUFC, overriding pkg-config
1759  PROTOBUFC_LIBS
1760              linker flags for PROTOBUFC, overriding pkg-config
1761
1762Use these variables to override the choices made by 'configure' or to help
1763it to find libraries and programs with nonstandard names/locations.
1764
1765Report bugs to <unbound-bugs@nlnetlabs.nl or https://github.com/NLnetLabs/unbound/issues>.
1766_ACEOF
1767ac_status=$?
1768fi
1769
1770if test "$ac_init_help" = "recursive"; then
1771  # If there are subdirs, report their specific --help.
1772  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1773    test -d "$ac_dir" ||
1774      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1775      continue
1776    ac_builddir=.
1777
1778case "$ac_dir" in
1779.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1780*)
1781  ac_dir_suffix=/`printf "%s\n" "$ac_dir" | sed 's|^\.[\\/]||'`
1782  # A ".." for each directory in $ac_dir_suffix.
1783  ac_top_builddir_sub=`printf "%s\n" "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1784  case $ac_top_builddir_sub in
1785  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1786  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1787  esac ;;
1788esac
1789ac_abs_top_builddir=$ac_pwd
1790ac_abs_builddir=$ac_pwd$ac_dir_suffix
1791# for backward compatibility:
1792ac_top_builddir=$ac_top_build_prefix
1793
1794case $srcdir in
1795  .)  # We are building in place.
1796    ac_srcdir=.
1797    ac_top_srcdir=$ac_top_builddir_sub
1798    ac_abs_top_srcdir=$ac_pwd ;;
1799  [\\/]* | ?:[\\/]* )  # Absolute name.
1800    ac_srcdir=$srcdir$ac_dir_suffix;
1801    ac_top_srcdir=$srcdir
1802    ac_abs_top_srcdir=$srcdir ;;
1803  *) # Relative name.
1804    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1805    ac_top_srcdir=$ac_top_build_prefix$srcdir
1806    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1807esac
1808ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1809
1810    cd "$ac_dir" || { ac_status=$?; continue; }
1811    # Check for configure.gnu first; this name is used for a wrapper for
1812    # Metaconfig's "Configure" on case-insensitive file systems.
1813    if test -f "$ac_srcdir/configure.gnu"; then
1814      echo &&
1815      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1816    elif test -f "$ac_srcdir/configure"; then
1817      echo &&
1818      $SHELL "$ac_srcdir/configure" --help=recursive
1819    else
1820      printf "%s\n" "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1821    fi || ac_status=$?
1822    cd "$ac_pwd" || { ac_status=$?; break; }
1823  done
1824fi
1825
1826test -n "$ac_init_help" && exit $ac_status
1827if $ac_init_version; then
1828  cat <<\_ACEOF
1829unbound configure 1.23.1
1830generated by GNU Autoconf 2.72
1831
1832Copyright (C) 2023 Free Software Foundation, Inc.
1833This configure script is free software; the Free Software Foundation
1834gives unlimited permission to copy, distribute and modify it.
1835_ACEOF
1836  exit
1837fi
1838
1839## ------------------------ ##
1840## Autoconf initialization. ##
1841## ------------------------ ##
1842
1843# ac_fn_c_try_compile LINENO
1844# --------------------------
1845# Try to compile conftest.$ac_ext, and return whether this succeeded.
1846ac_fn_c_try_compile ()
1847{
1848  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1849  rm -f conftest.$ac_objext conftest.beam
1850  if { { ac_try="$ac_compile"
1851case "(($ac_try" in
1852  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1853  *) ac_try_echo=$ac_try;;
1854esac
1855eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1856printf "%s\n" "$ac_try_echo"; } >&5
1857  (eval "$ac_compile") 2>conftest.err
1858  ac_status=$?
1859  if test -s conftest.err; then
1860    grep -v '^ *+' conftest.err >conftest.er1
1861    cat conftest.er1 >&5
1862    mv -f conftest.er1 conftest.err
1863  fi
1864  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1865  test $ac_status = 0; } && {
1866	 test -z "$ac_c_werror_flag" ||
1867	 test ! -s conftest.err
1868       } && test -s conftest.$ac_objext
1869then :
1870  ac_retval=0
1871else case e in #(
1872  e) printf "%s\n" "$as_me: failed program was:" >&5
1873sed 's/^/| /' conftest.$ac_ext >&5
1874
1875	ac_retval=1 ;;
1876esac
1877fi
1878  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1879  as_fn_set_status $ac_retval
1880
1881} # ac_fn_c_try_compile
1882
1883# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1884# -------------------------------------------------------
1885# Tests whether HEADER exists and can be compiled using the include files in
1886# INCLUDES, setting the cache variable VAR accordingly.
1887ac_fn_c_check_header_compile ()
1888{
1889  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1890  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1891printf %s "checking for $2... " >&6; }
1892if eval test \${$3+y}
1893then :
1894  printf %s "(cached) " >&6
1895else case e in #(
1896  e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1897/* end confdefs.h.  */
1898$4
1899#include <$2>
1900_ACEOF
1901if ac_fn_c_try_compile "$LINENO"
1902then :
1903  eval "$3=yes"
1904else case e in #(
1905  e) eval "$3=no" ;;
1906esac
1907fi
1908rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
1909esac
1910fi
1911eval ac_res=\$$3
1912	       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1913printf "%s\n" "$ac_res" >&6; }
1914  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1915
1916} # ac_fn_c_check_header_compile
1917
1918# ac_fn_c_try_link LINENO
1919# -----------------------
1920# Try to link conftest.$ac_ext, and return whether this succeeded.
1921ac_fn_c_try_link ()
1922{
1923  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1924  rm -f conftest.$ac_objext conftest.beam conftest$ac_exeext
1925  if { { ac_try="$ac_link"
1926case "(($ac_try" in
1927  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1928  *) ac_try_echo=$ac_try;;
1929esac
1930eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1931printf "%s\n" "$ac_try_echo"; } >&5
1932  (eval "$ac_link") 2>conftest.err
1933  ac_status=$?
1934  if test -s conftest.err; then
1935    grep -v '^ *+' conftest.err >conftest.er1
1936    cat conftest.er1 >&5
1937    mv -f conftest.er1 conftest.err
1938  fi
1939  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1940  test $ac_status = 0; } && {
1941	 test -z "$ac_c_werror_flag" ||
1942	 test ! -s conftest.err
1943       } && test -s conftest$ac_exeext && {
1944	 test "$cross_compiling" = yes ||
1945	 test -x conftest$ac_exeext
1946       }
1947then :
1948  ac_retval=0
1949else case e in #(
1950  e) printf "%s\n" "$as_me: failed program was:" >&5
1951sed 's/^/| /' conftest.$ac_ext >&5
1952
1953	ac_retval=1 ;;
1954esac
1955fi
1956  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1957  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1958  # interfere with the next link command; also delete a directory that is
1959  # left behind by Apple's compiler.  We do this before executing the actions.
1960  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1961  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1962  as_fn_set_status $ac_retval
1963
1964} # ac_fn_c_try_link
1965
1966# ac_fn_c_check_func LINENO FUNC VAR
1967# ----------------------------------
1968# Tests whether FUNC exists, setting the cache variable VAR accordingly
1969ac_fn_c_check_func ()
1970{
1971  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1972  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1973printf %s "checking for $2... " >&6; }
1974if eval test \${$3+y}
1975then :
1976  printf %s "(cached) " >&6
1977else case e in #(
1978  e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1979/* end confdefs.h.  */
1980/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
1981   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
1982#define $2 innocuous_$2
1983
1984/* System header to define __stub macros and hopefully few prototypes,
1985   which can conflict with char $2 (void); below.  */
1986
1987#include <limits.h>
1988#undef $2
1989
1990/* Override any GCC internal prototype to avoid an error.
1991   Use char because int might match the return type of a GCC
1992   builtin and then its argument prototype would still apply.  */
1993#ifdef __cplusplus
1994extern "C"
1995#endif
1996char $2 (void);
1997/* The GNU C library defines this for functions which it implements
1998    to always fail with ENOSYS.  Some functions are actually named
1999    something starting with __ and the normal name is an alias.  */
2000#if defined __stub_$2 || defined __stub___$2
2001choke me
2002#endif
2003
2004int
2005main (void)
2006{
2007return $2 ();
2008  ;
2009  return 0;
2010}
2011_ACEOF
2012if ac_fn_c_try_link "$LINENO"
2013then :
2014  eval "$3=yes"
2015else case e in #(
2016  e) eval "$3=no" ;;
2017esac
2018fi
2019rm -f core conftest.err conftest.$ac_objext conftest.beam \
2020    conftest$ac_exeext conftest.$ac_ext ;;
2021esac
2022fi
2023eval ac_res=\$$3
2024	       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2025printf "%s\n" "$ac_res" >&6; }
2026  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2027
2028} # ac_fn_c_check_func
2029
2030# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2031# -------------------------------------------
2032# Tests whether TYPE exists after having included INCLUDES, setting cache
2033# variable VAR accordingly.
2034ac_fn_c_check_type ()
2035{
2036  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2037  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2038printf %s "checking for $2... " >&6; }
2039if eval test \${$3+y}
2040then :
2041  printf %s "(cached) " >&6
2042else case e in #(
2043  e) eval "$3=no"
2044  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2045/* end confdefs.h.  */
2046$4
2047int
2048main (void)
2049{
2050if (sizeof ($2))
2051	 return 0;
2052  ;
2053  return 0;
2054}
2055_ACEOF
2056if ac_fn_c_try_compile "$LINENO"
2057then :
2058  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2059/* end confdefs.h.  */
2060$4
2061int
2062main (void)
2063{
2064if (sizeof (($2)))
2065	    return 0;
2066  ;
2067  return 0;
2068}
2069_ACEOF
2070if ac_fn_c_try_compile "$LINENO"
2071then :
2072
2073else case e in #(
2074  e) eval "$3=yes" ;;
2075esac
2076fi
2077rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
2078fi
2079rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
2080esac
2081fi
2082eval ac_res=\$$3
2083	       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2084printf "%s\n" "$ac_res" >&6; }
2085  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2086
2087} # ac_fn_c_check_type
2088
2089# ac_fn_c_try_run LINENO
2090# ----------------------
2091# Try to run conftest.$ac_ext, and return whether this succeeded. Assumes that
2092# executables *can* be run.
2093ac_fn_c_try_run ()
2094{
2095  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2096  if { { ac_try="$ac_link"
2097case "(($ac_try" in
2098  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2099  *) ac_try_echo=$ac_try;;
2100esac
2101eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2102printf "%s\n" "$ac_try_echo"; } >&5
2103  (eval "$ac_link") 2>&5
2104  ac_status=$?
2105  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2106  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2107  { { case "(($ac_try" in
2108  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2109  *) ac_try_echo=$ac_try;;
2110esac
2111eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2112printf "%s\n" "$ac_try_echo"; } >&5
2113  (eval "$ac_try") 2>&5
2114  ac_status=$?
2115  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2116  test $ac_status = 0; }; }
2117then :
2118  ac_retval=0
2119else case e in #(
2120  e) printf "%s\n" "$as_me: program exited with status $ac_status" >&5
2121       printf "%s\n" "$as_me: failed program was:" >&5
2122sed 's/^/| /' conftest.$ac_ext >&5
2123
2124       ac_retval=$ac_status ;;
2125esac
2126fi
2127  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2128  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2129  as_fn_set_status $ac_retval
2130
2131} # ac_fn_c_try_run
2132
2133# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2134# --------------------------------------------
2135# Tries to find the compile-time value of EXPR in a program that includes
2136# INCLUDES, setting VAR accordingly. Returns whether the value could be
2137# computed
2138ac_fn_c_compute_int ()
2139{
2140  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2141  if test "$cross_compiling" = yes; then
2142    # Depending upon the size, compute the lo and hi bounds.
2143cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2144/* end confdefs.h.  */
2145$4
2146int
2147main (void)
2148{
2149static int test_array [1 - 2 * !(($2) >= 0)];
2150test_array [0] = 0;
2151return test_array [0];
2152
2153  ;
2154  return 0;
2155}
2156_ACEOF
2157if ac_fn_c_try_compile "$LINENO"
2158then :
2159  ac_lo=0 ac_mid=0
2160  while :; do
2161    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2162/* end confdefs.h.  */
2163$4
2164int
2165main (void)
2166{
2167static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2168test_array [0] = 0;
2169return test_array [0];
2170
2171  ;
2172  return 0;
2173}
2174_ACEOF
2175if ac_fn_c_try_compile "$LINENO"
2176then :
2177  ac_hi=$ac_mid; break
2178else case e in #(
2179  e) as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2180			if test $ac_lo -le $ac_mid; then
2181			  ac_lo= ac_hi=
2182			  break
2183			fi
2184			as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val ;;
2185esac
2186fi
2187rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
2188  done
2189else case e in #(
2190  e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2191/* end confdefs.h.  */
2192$4
2193int
2194main (void)
2195{
2196static int test_array [1 - 2 * !(($2) < 0)];
2197test_array [0] = 0;
2198return test_array [0];
2199
2200  ;
2201  return 0;
2202}
2203_ACEOF
2204if ac_fn_c_try_compile "$LINENO"
2205then :
2206  ac_hi=-1 ac_mid=-1
2207  while :; do
2208    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2209/* end confdefs.h.  */
2210$4
2211int
2212main (void)
2213{
2214static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2215test_array [0] = 0;
2216return test_array [0];
2217
2218  ;
2219  return 0;
2220}
2221_ACEOF
2222if ac_fn_c_try_compile "$LINENO"
2223then :
2224  ac_lo=$ac_mid; break
2225else case e in #(
2226  e) as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2227			if test $ac_mid -le $ac_hi; then
2228			  ac_lo= ac_hi=
2229			  break
2230			fi
2231			as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val ;;
2232esac
2233fi
2234rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
2235  done
2236else case e in #(
2237  e) ac_lo= ac_hi= ;;
2238esac
2239fi
2240rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
2241esac
2242fi
2243rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
2244# Binary search between lo and hi bounds.
2245while test "x$ac_lo" != "x$ac_hi"; do
2246  as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2247  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2248/* end confdefs.h.  */
2249$4
2250int
2251main (void)
2252{
2253static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2254test_array [0] = 0;
2255return test_array [0];
2256
2257  ;
2258  return 0;
2259}
2260_ACEOF
2261if ac_fn_c_try_compile "$LINENO"
2262then :
2263  ac_hi=$ac_mid
2264else case e in #(
2265  e) as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val ;;
2266esac
2267fi
2268rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
2269done
2270case $ac_lo in #((
2271?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2272'') ac_retval=1 ;;
2273esac
2274  else
2275    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2276/* end confdefs.h.  */
2277$4
2278static long int longval (void) { return $2; }
2279static unsigned long int ulongval (void) { return $2; }
2280#include <stdio.h>
2281#include <stdlib.h>
2282int
2283main (void)
2284{
2285
2286  FILE *f = fopen ("conftest.val", "w");
2287  if (! f)
2288    return 1;
2289  if (($2) < 0)
2290    {
2291      long int i = longval ();
2292      if (i != ($2))
2293	return 1;
2294      fprintf (f, "%ld", i);
2295    }
2296  else
2297    {
2298      unsigned long int i = ulongval ();
2299      if (i != ($2))
2300	return 1;
2301      fprintf (f, "%lu", i);
2302    }
2303  /* Do not output a trailing newline, as this causes \r\n confusion
2304     on some platforms.  */
2305  return ferror (f) || fclose (f) != 0;
2306
2307  ;
2308  return 0;
2309}
2310_ACEOF
2311if ac_fn_c_try_run "$LINENO"
2312then :
2313  echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2314else case e in #(
2315  e) ac_retval=1 ;;
2316esac
2317fi
2318rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2319  conftest.$ac_objext conftest.beam conftest.$ac_ext
2320rm -f conftest.val
2321
2322  fi
2323  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2324  as_fn_set_status $ac_retval
2325
2326} # ac_fn_c_compute_int
2327
2328# ac_fn_c_try_cpp LINENO
2329# ----------------------
2330# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2331ac_fn_c_try_cpp ()
2332{
2333  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2334  if { { ac_try="$ac_cpp conftest.$ac_ext"
2335case "(($ac_try" in
2336  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2337  *) ac_try_echo=$ac_try;;
2338esac
2339eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2340printf "%s\n" "$ac_try_echo"; } >&5
2341  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2342  ac_status=$?
2343  if test -s conftest.err; then
2344    grep -v '^ *+' conftest.err >conftest.er1
2345    cat conftest.er1 >&5
2346    mv -f conftest.er1 conftest.err
2347  fi
2348  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2349  test $ac_status = 0; } > conftest.i && {
2350	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2351	 test ! -s conftest.err
2352       }
2353then :
2354  ac_retval=0
2355else case e in #(
2356  e) printf "%s\n" "$as_me: failed program was:" >&5
2357sed 's/^/| /' conftest.$ac_ext >&5
2358
2359    ac_retval=1 ;;
2360esac
2361fi
2362  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2363  as_fn_set_status $ac_retval
2364
2365} # ac_fn_c_try_cpp
2366
2367# ac_fn_check_decl LINENO SYMBOL VAR INCLUDES EXTRA-OPTIONS FLAG-VAR
2368# ------------------------------------------------------------------
2369# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2370# accordingly. Pass EXTRA-OPTIONS to the compiler, using FLAG-VAR.
2371ac_fn_check_decl ()
2372{
2373  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2374  as_decl_name=`echo $2|sed 's/ *(.*//'`
2375  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2376printf %s "checking whether $as_decl_name is declared... " >&6; }
2377if eval test \${$3+y}
2378then :
2379  printf %s "(cached) " >&6
2380else case e in #(
2381  e) as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2382  eval ac_save_FLAGS=\$$6
2383  as_fn_append $6 " $5"
2384  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2385/* end confdefs.h.  */
2386$4
2387int
2388main (void)
2389{
2390#ifndef $as_decl_name
2391#ifdef __cplusplus
2392  (void) $as_decl_use;
2393#else
2394  (void) $as_decl_name;
2395#endif
2396#endif
2397
2398  ;
2399  return 0;
2400}
2401_ACEOF
2402if ac_fn_c_try_compile "$LINENO"
2403then :
2404  eval "$3=yes"
2405else case e in #(
2406  e) eval "$3=no" ;;
2407esac
2408fi
2409rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
2410  eval $6=\$ac_save_FLAGS
2411 ;;
2412esac
2413fi
2414eval ac_res=\$$3
2415	       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2416printf "%s\n" "$ac_res" >&6; }
2417  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2418
2419} # ac_fn_check_decl
2420
2421# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2422# ----------------------------------------------------
2423# Tries to find if the field MEMBER exists in type AGGR, after including
2424# INCLUDES, setting cache variable VAR accordingly.
2425ac_fn_c_check_member ()
2426{
2427  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2428  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2429printf %s "checking for $2.$3... " >&6; }
2430if eval test \${$4+y}
2431then :
2432  printf %s "(cached) " >&6
2433else case e in #(
2434  e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2435/* end confdefs.h.  */
2436$5
2437int
2438main (void)
2439{
2440static $2 ac_aggr;
2441if (ac_aggr.$3)
2442return 0;
2443  ;
2444  return 0;
2445}
2446_ACEOF
2447if ac_fn_c_try_compile "$LINENO"
2448then :
2449  eval "$4=yes"
2450else case e in #(
2451  e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2452/* end confdefs.h.  */
2453$5
2454int
2455main (void)
2456{
2457static $2 ac_aggr;
2458if (sizeof ac_aggr.$3)
2459return 0;
2460  ;
2461  return 0;
2462}
2463_ACEOF
2464if ac_fn_c_try_compile "$LINENO"
2465then :
2466  eval "$4=yes"
2467else case e in #(
2468  e) eval "$4=no" ;;
2469esac
2470fi
2471rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
2472esac
2473fi
2474rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
2475esac
2476fi
2477eval ac_res=\$$4
2478	       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2479printf "%s\n" "$ac_res" >&6; }
2480  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2481
2482} # ac_fn_c_check_member
2483ac_configure_args_raw=
2484for ac_arg
2485do
2486  case $ac_arg in
2487  *\'*)
2488    ac_arg=`printf "%s\n" "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2489  esac
2490  as_fn_append ac_configure_args_raw " '$ac_arg'"
2491done
2492
2493case $ac_configure_args_raw in
2494  *$as_nl*)
2495    ac_safe_unquote= ;;
2496  *)
2497    ac_unsafe_z='|&;<>()$`\\"*?[ ''	' # This string ends in space, tab.
2498    ac_unsafe_a="$ac_unsafe_z#~"
2499    ac_safe_unquote="s/ '\\([^$ac_unsafe_a][^$ac_unsafe_z]*\\)'/ \\1/g"
2500    ac_configure_args_raw=`      printf "%s\n" "$ac_configure_args_raw" | sed "$ac_safe_unquote"`;;
2501esac
2502
2503cat >config.log <<_ACEOF
2504This file contains any messages produced by compilers while
2505running configure, to aid debugging if configure makes a mistake.
2506
2507It was created by unbound $as_me 1.23.1, which was
2508generated by GNU Autoconf 2.72.  Invocation command line was
2509
2510  $ $0$ac_configure_args_raw
2511
2512_ACEOF
2513exec 5>>config.log
2514{
2515cat <<_ASUNAME
2516## --------- ##
2517## Platform. ##
2518## --------- ##
2519
2520hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2521uname -m = `(uname -m) 2>/dev/null || echo unknown`
2522uname -r = `(uname -r) 2>/dev/null || echo unknown`
2523uname -s = `(uname -s) 2>/dev/null || echo unknown`
2524uname -v = `(uname -v) 2>/dev/null || echo unknown`
2525
2526/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2527/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2528
2529/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2530/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2531/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2532/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2533/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2534/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2535/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2536
2537_ASUNAME
2538
2539as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2540for as_dir in $PATH
2541do
2542  IFS=$as_save_IFS
2543  case $as_dir in #(((
2544    '') as_dir=./ ;;
2545    */) ;;
2546    *) as_dir=$as_dir/ ;;
2547  esac
2548    printf "%s\n" "PATH: $as_dir"
2549  done
2550IFS=$as_save_IFS
2551
2552} >&5
2553
2554cat >&5 <<_ACEOF
2555
2556
2557## ----------- ##
2558## Core tests. ##
2559## ----------- ##
2560
2561_ACEOF
2562
2563
2564# Keep a trace of the command line.
2565# Strip out --no-create and --no-recursion so they do not pile up.
2566# Strip out --silent because we don't want to record it for future runs.
2567# Also quote any args containing shell meta-characters.
2568# Make two passes to allow for proper duplicate-argument suppression.
2569ac_configure_args=
2570ac_configure_args0=
2571ac_configure_args1=
2572ac_must_keep_next=false
2573for ac_pass in 1 2
2574do
2575  for ac_arg
2576  do
2577    case $ac_arg in
2578    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2579    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2580    | -silent | --silent | --silen | --sile | --sil)
2581      continue ;;
2582    *\'*)
2583      ac_arg=`printf "%s\n" "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2584    esac
2585    case $ac_pass in
2586    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2587    2)
2588      as_fn_append ac_configure_args1 " '$ac_arg'"
2589      if test $ac_must_keep_next = true; then
2590	ac_must_keep_next=false # Got value, back to normal.
2591      else
2592	case $ac_arg in
2593	  *=* | --config-cache | -C | -disable-* | --disable-* \
2594	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2595	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2596	  | -with-* | --with-* | -without-* | --without-* | --x)
2597	    case "$ac_configure_args0 " in
2598	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2599	    esac
2600	    ;;
2601	  -* ) ac_must_keep_next=true ;;
2602	esac
2603      fi
2604      as_fn_append ac_configure_args " '$ac_arg'"
2605      ;;
2606    esac
2607  done
2608done
2609{ ac_configure_args0=; unset ac_configure_args0;}
2610{ ac_configure_args1=; unset ac_configure_args1;}
2611
2612# When interrupted or exit'd, cleanup temporary files, and complete
2613# config.log.  We remove comments because anyway the quotes in there
2614# would cause problems or look ugly.
2615# WARNING: Use '\'' to represent an apostrophe within the trap.
2616# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2617trap 'exit_status=$?
2618  # Sanitize IFS.
2619  IFS=" ""	$as_nl"
2620  # Save into config.log some information that might help in debugging.
2621  {
2622    echo
2623
2624    printf "%s\n" "## ---------------- ##
2625## Cache variables. ##
2626## ---------------- ##"
2627    echo
2628    # The following way of writing the cache mishandles newlines in values,
2629(
2630  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2631    eval ac_val=\$$ac_var
2632    case $ac_val in #(
2633    *${as_nl}*)
2634      case $ac_var in #(
2635      *_cv_*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2636printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2637      esac
2638      case $ac_var in #(
2639      _ | IFS | as_nl) ;; #(
2640      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2641      *) { eval $ac_var=; unset $ac_var;} ;;
2642      esac ;;
2643    esac
2644  done
2645  (set) 2>&1 |
2646    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2647    *${as_nl}ac_space=\ *)
2648      sed -n \
2649	"s/'\''/'\''\\\\'\'''\''/g;
2650	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2651      ;; #(
2652    *)
2653      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2654      ;;
2655    esac |
2656    sort
2657)
2658    echo
2659
2660    printf "%s\n" "## ----------------- ##
2661## Output variables. ##
2662## ----------------- ##"
2663    echo
2664    for ac_var in $ac_subst_vars
2665    do
2666      eval ac_val=\$$ac_var
2667      case $ac_val in
2668      *\'\''*) ac_val=`printf "%s\n" "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2669      esac
2670      printf "%s\n" "$ac_var='\''$ac_val'\''"
2671    done | sort
2672    echo
2673
2674    if test -n "$ac_subst_files"; then
2675      printf "%s\n" "## ------------------- ##
2676## File substitutions. ##
2677## ------------------- ##"
2678      echo
2679      for ac_var in $ac_subst_files
2680      do
2681	eval ac_val=\$$ac_var
2682	case $ac_val in
2683	*\'\''*) ac_val=`printf "%s\n" "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2684	esac
2685	printf "%s\n" "$ac_var='\''$ac_val'\''"
2686      done | sort
2687      echo
2688    fi
2689
2690    if test -s confdefs.h; then
2691      printf "%s\n" "## ----------- ##
2692## confdefs.h. ##
2693## ----------- ##"
2694      echo
2695      cat confdefs.h
2696      echo
2697    fi
2698    test "$ac_signal" != 0 &&
2699      printf "%s\n" "$as_me: caught signal $ac_signal"
2700    printf "%s\n" "$as_me: exit $exit_status"
2701  } >&5
2702  rm -f core *.core core.conftest.* &&
2703    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2704    exit $exit_status
2705' 0
2706for ac_signal in 1 2 13 15; do
2707  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2708done
2709ac_signal=0
2710
2711# confdefs.h avoids OS command line length limits that DEFS can exceed.
2712rm -f -r conftest* confdefs.h
2713
2714printf "%s\n" "/* confdefs.h */" > confdefs.h
2715
2716# Predefined preprocessor variables.
2717
2718printf "%s\n" "#define PACKAGE_NAME \"$PACKAGE_NAME\"" >>confdefs.h
2719
2720printf "%s\n" "#define PACKAGE_TARNAME \"$PACKAGE_TARNAME\"" >>confdefs.h
2721
2722printf "%s\n" "#define PACKAGE_VERSION \"$PACKAGE_VERSION\"" >>confdefs.h
2723
2724printf "%s\n" "#define PACKAGE_STRING \"$PACKAGE_STRING\"" >>confdefs.h
2725
2726printf "%s\n" "#define PACKAGE_BUGREPORT \"$PACKAGE_BUGREPORT\"" >>confdefs.h
2727
2728printf "%s\n" "#define PACKAGE_URL \"$PACKAGE_URL\"" >>confdefs.h
2729
2730
2731# Let the site file select an alternate cache file if it wants to.
2732# Prefer an explicitly selected file to automatically selected ones.
2733if test -n "$CONFIG_SITE"; then
2734  ac_site_files="$CONFIG_SITE"
2735elif test "x$prefix" != xNONE; then
2736  ac_site_files="$prefix/share/config.site $prefix/etc/config.site"
2737else
2738  ac_site_files="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
2739fi
2740
2741for ac_site_file in $ac_site_files
2742do
2743  case $ac_site_file in #(
2744  */*) :
2745     ;; #(
2746  *) :
2747    ac_site_file=./$ac_site_file ;;
2748esac
2749  if test -f "$ac_site_file" && test -r "$ac_site_file"; then
2750    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2751printf "%s\n" "$as_me: loading site script $ac_site_file" >&6;}
2752    sed 's/^/| /' "$ac_site_file" >&5
2753    . "$ac_site_file" \
2754      || { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
2755printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
2756as_fn_error $? "failed to load site script $ac_site_file
2757See 'config.log' for more details" "$LINENO" 5; }
2758  fi
2759done
2760
2761if test -r "$cache_file"; then
2762  # Some versions of bash will fail to source /dev/null (special files
2763  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
2764  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2765    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2766printf "%s\n" "$as_me: loading cache $cache_file" >&6;}
2767    case $cache_file in
2768      [\\/]* | ?:[\\/]* ) . "$cache_file";;
2769      *)                      . "./$cache_file";;
2770    esac
2771  fi
2772else
2773  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2774printf "%s\n" "$as_me: creating cache $cache_file" >&6;}
2775  >$cache_file
2776fi
2777
2778as_fn_append ac_header_c_list " stdio.h stdio_h HAVE_STDIO_H"
2779# Test code for whether the C compiler supports C89 (global declarations)
2780ac_c_conftest_c89_globals='
2781/* Does the compiler advertise C89 conformance?
2782   Do not test the value of __STDC__, because some compilers set it to 0
2783   while being otherwise adequately conformant. */
2784#if !defined __STDC__
2785# error "Compiler does not advertise C89 conformance"
2786#endif
2787
2788#include <stddef.h>
2789#include <stdarg.h>
2790struct stat;
2791/* Most of the following tests are stolen from RCS 5.7 src/conf.sh.  */
2792struct buf { int x; };
2793struct buf * (*rcsopen) (struct buf *, struct stat *, int);
2794static char *e (char **p, int i)
2795{
2796  return p[i];
2797}
2798static char *f (char * (*g) (char **, int), char **p, ...)
2799{
2800  char *s;
2801  va_list v;
2802  va_start (v,p);
2803  s = g (p, va_arg (v,int));
2804  va_end (v);
2805  return s;
2806}
2807
2808/* C89 style stringification. */
2809#define noexpand_stringify(a) #a
2810const char *stringified = noexpand_stringify(arbitrary+token=sequence);
2811
2812/* C89 style token pasting.  Exercises some of the corner cases that
2813   e.g. old MSVC gets wrong, but not very hard. */
2814#define noexpand_concat(a,b) a##b
2815#define expand_concat(a,b) noexpand_concat(a,b)
2816extern int vA;
2817extern int vbee;
2818#define aye A
2819#define bee B
2820int *pvA = &expand_concat(v,aye);
2821int *pvbee = &noexpand_concat(v,bee);
2822
2823/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
2824   function prototypes and stuff, but not \xHH hex character constants.
2825   These do not provoke an error unfortunately, instead are silently treated
2826   as an "x".  The following induces an error, until -std is added to get
2827   proper ANSI mode.  Curiously \x00 != x always comes out true, for an
2828   array size at least.  It is necessary to write \x00 == 0 to get something
2829   that is true only with -std.  */
2830int osf4_cc_array ['\''\x00'\'' == 0 ? 1 : -1];
2831
2832/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
2833   inside strings and character constants.  */
2834#define FOO(x) '\''x'\''
2835int xlc6_cc_array[FOO(a) == '\''x'\'' ? 1 : -1];
2836
2837int test (int i, double x);
2838struct s1 {int (*f) (int a);};
2839struct s2 {int (*f) (double a);};
2840int pairnames (int, char **, int *(*)(struct buf *, struct stat *, int),
2841               int, int);'
2842
2843# Test code for whether the C compiler supports C89 (body of main).
2844ac_c_conftest_c89_main='
2845ok |= (argc == 0 || f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]);
2846'
2847
2848# Test code for whether the C compiler supports C99 (global declarations)
2849ac_c_conftest_c99_globals='
2850/* Does the compiler advertise C99 conformance? */
2851#if !defined __STDC_VERSION__ || __STDC_VERSION__ < 199901L
2852# error "Compiler does not advertise C99 conformance"
2853#endif
2854
2855// See if C++-style comments work.
2856
2857#include <stdbool.h>
2858extern int puts (const char *);
2859extern int printf (const char *, ...);
2860extern int dprintf (int, const char *, ...);
2861extern void *malloc (size_t);
2862extern void free (void *);
2863
2864// Check varargs macros.  These examples are taken from C99 6.10.3.5.
2865// dprintf is used instead of fprintf to avoid needing to declare
2866// FILE and stderr.
2867#define debug(...) dprintf (2, __VA_ARGS__)
2868#define showlist(...) puts (#__VA_ARGS__)
2869#define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__))
2870static void
2871test_varargs_macros (void)
2872{
2873  int x = 1234;
2874  int y = 5678;
2875  debug ("Flag");
2876  debug ("X = %d\n", x);
2877  showlist (The first, second, and third items.);
2878  report (x>y, "x is %d but y is %d", x, y);
2879}
2880
2881// Check long long types.
2882#define BIG64 18446744073709551615ull
2883#define BIG32 4294967295ul
2884#define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0)
2885#if !BIG_OK
2886  #error "your preprocessor is broken"
2887#endif
2888#if BIG_OK
2889#else
2890  #error "your preprocessor is broken"
2891#endif
2892static long long int bignum = -9223372036854775807LL;
2893static unsigned long long int ubignum = BIG64;
2894
2895struct incomplete_array
2896{
2897  int datasize;
2898  double data[];
2899};
2900
2901struct named_init {
2902  int number;
2903  const wchar_t *name;
2904  double average;
2905};
2906
2907typedef const char *ccp;
2908
2909static inline int
2910test_restrict (ccp restrict text)
2911{
2912  // Iterate through items via the restricted pointer.
2913  // Also check for declarations in for loops.
2914  for (unsigned int i = 0; *(text+i) != '\''\0'\''; ++i)
2915    continue;
2916  return 0;
2917}
2918
2919// Check varargs and va_copy.
2920static bool
2921test_varargs (const char *format, ...)
2922{
2923  va_list args;
2924  va_start (args, format);
2925  va_list args_copy;
2926  va_copy (args_copy, args);
2927
2928  const char *str = "";
2929  int number = 0;
2930  float fnumber = 0;
2931
2932  while (*format)
2933    {
2934      switch (*format++)
2935	{
2936	case '\''s'\'': // string
2937	  str = va_arg (args_copy, const char *);
2938	  break;
2939	case '\''d'\'': // int
2940	  number = va_arg (args_copy, int);
2941	  break;
2942	case '\''f'\'': // float
2943	  fnumber = va_arg (args_copy, double);
2944	  break;
2945	default:
2946	  break;
2947	}
2948    }
2949  va_end (args_copy);
2950  va_end (args);
2951
2952  return *str && number && fnumber;
2953}
2954'
2955
2956# Test code for whether the C compiler supports C99 (body of main).
2957ac_c_conftest_c99_main='
2958  // Check bool.
2959  _Bool success = false;
2960  success |= (argc != 0);
2961
2962  // Check restrict.
2963  if (test_restrict ("String literal") == 0)
2964    success = true;
2965  char *restrict newvar = "Another string";
2966
2967  // Check varargs.
2968  success &= test_varargs ("s, d'\'' f .", "string", 65, 34.234);
2969  test_varargs_macros ();
2970
2971  // Check flexible array members.
2972  struct incomplete_array *ia =
2973    malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10));
2974  ia->datasize = 10;
2975  for (int i = 0; i < ia->datasize; ++i)
2976    ia->data[i] = i * 1.234;
2977  // Work around memory leak warnings.
2978  free (ia);
2979
2980  // Check named initializers.
2981  struct named_init ni = {
2982    .number = 34,
2983    .name = L"Test wide string",
2984    .average = 543.34343,
2985  };
2986
2987  ni.number = 58;
2988
2989  int dynamic_array[ni.number];
2990  dynamic_array[0] = argv[0][0];
2991  dynamic_array[ni.number - 1] = 543;
2992
2993  // work around unused variable warnings
2994  ok |= (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == '\''x'\''
2995	 || dynamic_array[ni.number - 1] != 543);
2996'
2997
2998# Test code for whether the C compiler supports C11 (global declarations)
2999ac_c_conftest_c11_globals='
3000/* Does the compiler advertise C11 conformance? */
3001#if !defined __STDC_VERSION__ || __STDC_VERSION__ < 201112L
3002# error "Compiler does not advertise C11 conformance"
3003#endif
3004
3005// Check _Alignas.
3006char _Alignas (double) aligned_as_double;
3007char _Alignas (0) no_special_alignment;
3008extern char aligned_as_int;
3009char _Alignas (0) _Alignas (int) aligned_as_int;
3010
3011// Check _Alignof.
3012enum
3013{
3014  int_alignment = _Alignof (int),
3015  int_array_alignment = _Alignof (int[100]),
3016  char_alignment = _Alignof (char)
3017};
3018_Static_assert (0 < -_Alignof (int), "_Alignof is signed");
3019
3020// Check _Noreturn.
3021int _Noreturn does_not_return (void) { for (;;) continue; }
3022
3023// Check _Static_assert.
3024struct test_static_assert
3025{
3026  int x;
3027  _Static_assert (sizeof (int) <= sizeof (long int),
3028                  "_Static_assert does not work in struct");
3029  long int y;
3030};
3031
3032// Check UTF-8 literals.
3033#define u8 syntax error!
3034char const utf8_literal[] = u8"happens to be ASCII" "another string";
3035
3036// Check duplicate typedefs.
3037typedef long *long_ptr;
3038typedef long int *long_ptr;
3039typedef long_ptr long_ptr;
3040
3041// Anonymous structures and unions -- taken from C11 6.7.2.1 Example 1.
3042struct anonymous
3043{
3044  union {
3045    struct { int i; int j; };
3046    struct { int k; long int l; } w;
3047  };
3048  int m;
3049} v1;
3050'
3051
3052# Test code for whether the C compiler supports C11 (body of main).
3053ac_c_conftest_c11_main='
3054  _Static_assert ((offsetof (struct anonymous, i)
3055		   == offsetof (struct anonymous, w.k)),
3056		  "Anonymous union alignment botch");
3057  v1.i = 2;
3058  v1.w.k = 5;
3059  ok |= v1.i != 5;
3060'
3061
3062# Test code for whether the C compiler supports C11 (complete).
3063ac_c_conftest_c11_program="${ac_c_conftest_c89_globals}
3064${ac_c_conftest_c99_globals}
3065${ac_c_conftest_c11_globals}
3066
3067int
3068main (int argc, char **argv)
3069{
3070  int ok = 0;
3071  ${ac_c_conftest_c89_main}
3072  ${ac_c_conftest_c99_main}
3073  ${ac_c_conftest_c11_main}
3074  return ok;
3075}
3076"
3077
3078# Test code for whether the C compiler supports C99 (complete).
3079ac_c_conftest_c99_program="${ac_c_conftest_c89_globals}
3080${ac_c_conftest_c99_globals}
3081
3082int
3083main (int argc, char **argv)
3084{
3085  int ok = 0;
3086  ${ac_c_conftest_c89_main}
3087  ${ac_c_conftest_c99_main}
3088  return ok;
3089}
3090"
3091
3092# Test code for whether the C compiler supports C89 (complete).
3093ac_c_conftest_c89_program="${ac_c_conftest_c89_globals}
3094
3095int
3096main (int argc, char **argv)
3097{
3098  int ok = 0;
3099  ${ac_c_conftest_c89_main}
3100  return ok;
3101}
3102"
3103
3104as_fn_append ac_header_c_list " stdlib.h stdlib_h HAVE_STDLIB_H"
3105as_fn_append ac_header_c_list " string.h string_h HAVE_STRING_H"
3106as_fn_append ac_header_c_list " inttypes.h inttypes_h HAVE_INTTYPES_H"
3107as_fn_append ac_header_c_list " stdint.h stdint_h HAVE_STDINT_H"
3108as_fn_append ac_header_c_list " strings.h strings_h HAVE_STRINGS_H"
3109as_fn_append ac_header_c_list " sys/stat.h sys_stat_h HAVE_SYS_STAT_H"
3110as_fn_append ac_header_c_list " sys/types.h sys_types_h HAVE_SYS_TYPES_H"
3111as_fn_append ac_header_c_list " unistd.h unistd_h HAVE_UNISTD_H"
3112as_fn_append ac_header_c_list " wchar.h wchar_h HAVE_WCHAR_H"
3113as_fn_append ac_header_c_list " minix/config.h minix_config_h HAVE_MINIX_CONFIG_H"
3114as_fn_append ac_header_c_list " vfork.h vfork_h HAVE_VFORK_H"
3115as_fn_append ac_func_c_list " fork HAVE_FORK"
3116as_fn_append ac_func_c_list " vfork HAVE_VFORK"
3117
3118# Auxiliary files required by this configure script.
3119ac_aux_files="ltmain.sh config.guess config.sub"
3120
3121# Locations in which to look for auxiliary files.
3122ac_aux_dir_candidates="${srcdir}${PATH_SEPARATOR}${srcdir}/..${PATH_SEPARATOR}${srcdir}/../.."
3123
3124# Search for a directory containing all of the required auxiliary files,
3125# $ac_aux_files, from the $PATH-style list $ac_aux_dir_candidates.
3126# If we don't find one directory that contains all the files we need,
3127# we report the set of missing files from the *first* directory in
3128# $ac_aux_dir_candidates and give up.
3129ac_missing_aux_files=""
3130ac_first_candidate=:
3131printf "%s\n" "$as_me:${as_lineno-$LINENO}: looking for aux files: $ac_aux_files" >&5
3132as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3133as_found=false
3134for as_dir in $ac_aux_dir_candidates
3135do
3136  IFS=$as_save_IFS
3137  case $as_dir in #(((
3138    '') as_dir=./ ;;
3139    */) ;;
3140    *) as_dir=$as_dir/ ;;
3141  esac
3142  as_found=:
3143
3144  printf "%s\n" "$as_me:${as_lineno-$LINENO}:  trying $as_dir" >&5
3145  ac_aux_dir_found=yes
3146  ac_install_sh=
3147  for ac_aux in $ac_aux_files
3148  do
3149    # As a special case, if "install-sh" is required, that requirement
3150    # can be satisfied by any of "install-sh", "install.sh", or "shtool",
3151    # and $ac_install_sh is set appropriately for whichever one is found.
3152    if test x"$ac_aux" = x"install-sh"
3153    then
3154      if test -f "${as_dir}install-sh"; then
3155        printf "%s\n" "$as_me:${as_lineno-$LINENO}:   ${as_dir}install-sh found" >&5
3156        ac_install_sh="${as_dir}install-sh -c"
3157      elif test -f "${as_dir}install.sh"; then
3158        printf "%s\n" "$as_me:${as_lineno-$LINENO}:   ${as_dir}install.sh found" >&5
3159        ac_install_sh="${as_dir}install.sh -c"
3160      elif test -f "${as_dir}shtool"; then
3161        printf "%s\n" "$as_me:${as_lineno-$LINENO}:   ${as_dir}shtool found" >&5
3162        ac_install_sh="${as_dir}shtool install -c"
3163      else
3164        ac_aux_dir_found=no
3165        if $ac_first_candidate; then
3166          ac_missing_aux_files="${ac_missing_aux_files} install-sh"
3167        else
3168          break
3169        fi
3170      fi
3171    else
3172      if test -f "${as_dir}${ac_aux}"; then
3173        printf "%s\n" "$as_me:${as_lineno-$LINENO}:   ${as_dir}${ac_aux} found" >&5
3174      else
3175        ac_aux_dir_found=no
3176        if $ac_first_candidate; then
3177          ac_missing_aux_files="${ac_missing_aux_files} ${ac_aux}"
3178        else
3179          break
3180        fi
3181      fi
3182    fi
3183  done
3184  if test "$ac_aux_dir_found" = yes; then
3185    ac_aux_dir="$as_dir"
3186    break
3187  fi
3188  ac_first_candidate=false
3189
3190  as_found=false
3191done
3192IFS=$as_save_IFS
3193if $as_found
3194then :
3195
3196else case e in #(
3197  e) as_fn_error $? "cannot find required auxiliary files:$ac_missing_aux_files" "$LINENO" 5 ;;
3198esac
3199fi
3200
3201
3202# These three variables are undocumented and unsupported,
3203# and are intended to be withdrawn in a future Autoconf release.
3204# They can cause serious problems if a builder's source tree is in a directory
3205# whose full name contains unusual characters.
3206if test -f "${ac_aux_dir}config.guess"; then
3207  ac_config_guess="$SHELL ${ac_aux_dir}config.guess"
3208fi
3209if test -f "${ac_aux_dir}config.sub"; then
3210  ac_config_sub="$SHELL ${ac_aux_dir}config.sub"
3211fi
3212if test -f "$ac_aux_dir/configure"; then
3213  ac_configure="$SHELL ${ac_aux_dir}configure"
3214fi
3215
3216# Check that the precious variables saved in the cache have kept the same
3217# value.
3218ac_cache_corrupted=false
3219for ac_var in $ac_precious_vars; do
3220  eval ac_old_set=\$ac_cv_env_${ac_var}_set
3221  eval ac_new_set=\$ac_env_${ac_var}_set
3222  eval ac_old_val=\$ac_cv_env_${ac_var}_value
3223  eval ac_new_val=\$ac_env_${ac_var}_value
3224  case $ac_old_set,$ac_new_set in
3225    set,)
3226      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: '$ac_var' was set to '$ac_old_val' in the previous run" >&5
3227printf "%s\n" "$as_me: error: '$ac_var' was set to '$ac_old_val' in the previous run" >&2;}
3228      ac_cache_corrupted=: ;;
3229    ,set)
3230      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: '$ac_var' was not set in the previous run" >&5
3231printf "%s\n" "$as_me: error: '$ac_var' was not set in the previous run" >&2;}
3232      ac_cache_corrupted=: ;;
3233    ,);;
3234    *)
3235      if test "x$ac_old_val" != "x$ac_new_val"; then
3236	# differences in whitespace do not lead to failure.
3237	ac_old_val_w=`echo x $ac_old_val`
3238	ac_new_val_w=`echo x $ac_new_val`
3239	if test "$ac_old_val_w" != "$ac_new_val_w"; then
3240	  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: '$ac_var' has changed since the previous run:" >&5
3241printf "%s\n" "$as_me: error: '$ac_var' has changed since the previous run:" >&2;}
3242	  ac_cache_corrupted=:
3243	else
3244	  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in '$ac_var' since the previous run:" >&5
3245printf "%s\n" "$as_me: warning: ignoring whitespace changes in '$ac_var' since the previous run:" >&2;}
3246	  eval $ac_var=\$ac_old_val
3247	fi
3248	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}:   former value:  '$ac_old_val'" >&5
3249printf "%s\n" "$as_me:   former value:  '$ac_old_val'" >&2;}
3250	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}:   current value: '$ac_new_val'" >&5
3251printf "%s\n" "$as_me:   current value: '$ac_new_val'" >&2;}
3252      fi;;
3253  esac
3254  # Pass precious variables to config.status.
3255  if test "$ac_new_set" = set; then
3256    case $ac_new_val in
3257    *\'*) ac_arg=$ac_var=`printf "%s\n" "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
3258    *) ac_arg=$ac_var=$ac_new_val ;;
3259    esac
3260    case " $ac_configure_args " in
3261      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
3262      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
3263    esac
3264  fi
3265done
3266if $ac_cache_corrupted; then
3267  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
3268printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
3269  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
3270printf "%s\n" "$as_me: error: changes in the environment can compromise the build" >&2;}
3271  as_fn_error $? "run '${MAKE-make} distclean' and/or 'rm $cache_file'
3272	    and start over" "$LINENO" 5
3273fi
3274## -------------------- ##
3275## Main body of script. ##
3276## -------------------- ##
3277
3278ac_ext=c
3279ac_cpp='$CPP $CPPFLAGS'
3280ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3281ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3282ac_compiler_gnu=$ac_cv_c_compiler_gnu
3283
3284
3285UNBOUND_VERSION_MAJOR=1
3286
3287UNBOUND_VERSION_MINOR=23
3288
3289UNBOUND_VERSION_MICRO=1
3290
3291
3292LIBUNBOUND_CURRENT=9
3293LIBUNBOUND_REVISION=32
3294LIBUNBOUND_AGE=1
3295# 1.0.0 had 0:12:0
3296# 1.0.1 had 0:13:0
3297# 1.0.2 had 0:14:0
3298# 1.1.0 had 0:15:0
3299# 1.1.1 had 0:16:0
3300# 1.2.0 had 0:17:0
3301# 1.2.1 had 0:18:0
3302# 1.3.0 had 1:0:0   # ub_cancel and -export-symbols.
3303# 1.3.1 had 1:1:0
3304# 1.3.2 had 1:2:0
3305# 1.3.3 had 1:3:0
3306# 1.3.4 had 1:4:0
3307# 1.4.0-snapshots had 1:5:0
3308# 1.4.0 had 1:5:0 (not 2:0:0)   # ub_result.why_bogus
3309# 1.4.1 had 2:1:0
3310# 1.4.2 had 2:2:0
3311# 1.4.3 had 2:3:0
3312# 1.4.4 had 2:4:0
3313# 1.4.5 had 2:5:0
3314# 1.4.6 had 2:6:0
3315# 1.4.7 had 2:7:0
3316# 1.4.8 had 2:8:0
3317# 1.4.9 had 2:9:0
3318# 1.4.10 had 2:10:0
3319# 1.4.11 had 2:11:0
3320# 1.4.12 had 2:12:0
3321# 1.4.13 had 2:13:0
3322# and 1.4.13p1 and 1.4.13.p2
3323# 1.4.14 had 2:14:0
3324# 1.4.15 had 3:0:1 # adds ub_version()
3325# 1.4.16 had 3:1:1
3326# 1.4.17 had 3:2:1
3327# 1.4.18 had 3:3:1
3328# 1.4.19 had 3:4:1
3329# 1.4.20 had 4:0:2 # adds libunbound.ttl # but shipped 3:5:1
3330# 1.4.21 had 4:1:2
3331# 1.4.22 had 4:1:2
3332# 1.5.0 had 5:3:3 # adds ub_ctx_add_ta_autr
3333# 1.5.1 had 5:3:3
3334# 1.5.2 had 5:5:3
3335# 1.5.3 had 5:6:3
3336# 1.5.4 had 5:7:3
3337# 1.5.5 had 5:8:3
3338# 1.5.6 had 5:9:3
3339# 1.5.7 had 5:10:3
3340# 1.5.8 had 6:0:4 # adds ub_ctx_set_stub
3341# 1.5.9 had 6:1:4
3342# 1.5.10 had 6:2:4
3343# 1.6.0 had 6:3:4
3344# 1.6.1 had 7:0:5 # ub_callback_t typedef renamed to ub_callback_type
3345# 1.6.2 had 7:1:5
3346# 1.6.3 had 7:2:5
3347# 1.6.4 had 7:3:5
3348# 1.6.5 had 7:4:5
3349# 1.6.6 had 7:5:5
3350# 1.6.7 had 7:6:5
3351# 1.6.8 had 7:7:5
3352# 1.7.0 had 7:8:5
3353# 1.7.1 had 7:9:5
3354# 1.7.2 had 7:10:5
3355# 1.7.3 had 7:11:5
3356# 1.8.0 had 8:0:0 # changes the event callback function signature
3357# 1.8.1 had 8:1:0
3358# 1.8.2 had 8:2:0
3359# 1.8.3 had 8:3:0
3360# 1.9.0 had 9:0:1 # add ub_ctx_set_tls
3361# 1.9.1 had 9:1:1
3362# 1.9.2 had 9:2:1
3363# 1.9.3 had 9:3:1
3364# 1.9.4 had 9:4:1
3365# 1.9.5 had 9:5:1
3366# 1.9.6 had 9:6:1
3367# 1.10.0 had 9:7:1
3368# 1.10.1 had 9:8:1
3369# 1.11.0 had 9:9:1
3370# 1.12.0 had 9:10:1
3371# 1.13.0 had 9:11:1
3372# 1.13.1 had 9:12:1
3373# 1.13.2 had 9:13:1
3374# 1.14.0 had 9:14:1
3375# 1.15.0 had 9:15:1
3376# 1.16.0 had 9:16:1
3377# 1.16.1 had 9:17:1
3378# 1.16.2 had 9:18:1
3379# 1.16.3 had 9:19:1
3380# 1.17.0 had 9:20:1
3381# 1.17.1 had 9:21:1
3382# 1.18.0 had 9:22:1
3383# 1.19.0 had 9:23:1
3384# 1.19.1 had 9:24:1
3385# 1.19.2 had 9:25:1
3386# 1.19.3 had 9:26:1
3387# 1.20.0 had 9:27:1
3388# 1.21.0 had 9:28:1
3389# 1.21.1 had 9:29:1
3390# 1.22.0 had 9:30:1
3391# 1.23.0 had 9:31:1
3392# 1.23.1 had 9:32:1
3393
3394#   Current  -- the number of the binary API that we're implementing
3395#   Revision -- which iteration of the implementation of the binary
3396#               API are we supplying?
3397#   Age      -- How many previous binary API versions do we also
3398#               support?
3399#
3400# If we release a new version that does not change the binary API,
3401# increment Revision.
3402#
3403# If we release a new version that changes the binary API, but does
3404# not break programs compiled against the old binary API, increment
3405# Current and Age.  Set Revision to 0, since this is the first
3406# implementation of the new API.
3407#
3408# Otherwise, we're changing the binary API and breaking backward
3409# compatibility with old binaries.  Increment Current.  Set Age to 0,
3410# since we're backward compatible with no previous APIs.  Set Revision
3411# to 0 too.
3412
3413
3414
3415
3416
3417cmdln="`echo $@ | sed -e 's/\\\\/\\\\\\\\/g' | sed -e 's/"/\\\\"/'g`"
3418
3419printf "%s\n" "#define CONFCMDLINE \"$cmdln\"" >>confdefs.h
3420
3421
3422CFLAGS="$CFLAGS"
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432ac_ext=c
3433ac_cpp='$CPP $CPPFLAGS'
3434ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3435ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3436ac_compiler_gnu=$ac_cv_c_compiler_gnu
3437if test -n "$ac_tool_prefix"; then
3438  # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3439set dummy ${ac_tool_prefix}gcc; ac_word=$2
3440{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3441printf %s "checking for $ac_word... " >&6; }
3442if test ${ac_cv_prog_CC+y}
3443then :
3444  printf %s "(cached) " >&6
3445else case e in #(
3446  e) if test -n "$CC"; then
3447  ac_cv_prog_CC="$CC" # Let the user override the test.
3448else
3449as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3450for as_dir in $PATH
3451do
3452  IFS=$as_save_IFS
3453  case $as_dir in #(((
3454    '') as_dir=./ ;;
3455    */) ;;
3456    *) as_dir=$as_dir/ ;;
3457  esac
3458    for ac_exec_ext in '' $ac_executable_extensions; do
3459  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
3460    ac_cv_prog_CC="${ac_tool_prefix}gcc"
3461    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
3462    break 2
3463  fi
3464done
3465  done
3466IFS=$as_save_IFS
3467
3468fi ;;
3469esac
3470fi
3471CC=$ac_cv_prog_CC
3472if test -n "$CC"; then
3473  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3474printf "%s\n" "$CC" >&6; }
3475else
3476  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
3477printf "%s\n" "no" >&6; }
3478fi
3479
3480
3481fi
3482if test -z "$ac_cv_prog_CC"; then
3483  ac_ct_CC=$CC
3484  # Extract the first word of "gcc", so it can be a program name with args.
3485set dummy gcc; ac_word=$2
3486{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3487printf %s "checking for $ac_word... " >&6; }
3488if test ${ac_cv_prog_ac_ct_CC+y}
3489then :
3490  printf %s "(cached) " >&6
3491else case e in #(
3492  e) if test -n "$ac_ct_CC"; then
3493  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3494else
3495as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3496for as_dir in $PATH
3497do
3498  IFS=$as_save_IFS
3499  case $as_dir in #(((
3500    '') as_dir=./ ;;
3501    */) ;;
3502    *) as_dir=$as_dir/ ;;
3503  esac
3504    for ac_exec_ext in '' $ac_executable_extensions; do
3505  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
3506    ac_cv_prog_ac_ct_CC="gcc"
3507    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
3508    break 2
3509  fi
3510done
3511  done
3512IFS=$as_save_IFS
3513
3514fi ;;
3515esac
3516fi
3517ac_ct_CC=$ac_cv_prog_ac_ct_CC
3518if test -n "$ac_ct_CC"; then
3519  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3520printf "%s\n" "$ac_ct_CC" >&6; }
3521else
3522  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
3523printf "%s\n" "no" >&6; }
3524fi
3525
3526  if test "x$ac_ct_CC" = x; then
3527    CC=""
3528  else
3529    case $cross_compiling:$ac_tool_warned in
3530yes:)
3531{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3532printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3533ac_tool_warned=yes ;;
3534esac
3535    CC=$ac_ct_CC
3536  fi
3537else
3538  CC="$ac_cv_prog_CC"
3539fi
3540
3541if test -z "$CC"; then
3542          if test -n "$ac_tool_prefix"; then
3543    # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
3544set dummy ${ac_tool_prefix}cc; ac_word=$2
3545{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3546printf %s "checking for $ac_word... " >&6; }
3547if test ${ac_cv_prog_CC+y}
3548then :
3549  printf %s "(cached) " >&6
3550else case e in #(
3551  e) if test -n "$CC"; then
3552  ac_cv_prog_CC="$CC" # Let the user override the test.
3553else
3554as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3555for as_dir in $PATH
3556do
3557  IFS=$as_save_IFS
3558  case $as_dir in #(((
3559    '') as_dir=./ ;;
3560    */) ;;
3561    *) as_dir=$as_dir/ ;;
3562  esac
3563    for ac_exec_ext in '' $ac_executable_extensions; do
3564  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
3565    ac_cv_prog_CC="${ac_tool_prefix}cc"
3566    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
3567    break 2
3568  fi
3569done
3570  done
3571IFS=$as_save_IFS
3572
3573fi ;;
3574esac
3575fi
3576CC=$ac_cv_prog_CC
3577if test -n "$CC"; then
3578  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3579printf "%s\n" "$CC" >&6; }
3580else
3581  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
3582printf "%s\n" "no" >&6; }
3583fi
3584
3585
3586  fi
3587fi
3588if test -z "$CC"; then
3589  # Extract the first word of "cc", so it can be a program name with args.
3590set dummy cc; ac_word=$2
3591{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3592printf %s "checking for $ac_word... " >&6; }
3593if test ${ac_cv_prog_CC+y}
3594then :
3595  printf %s "(cached) " >&6
3596else case e in #(
3597  e) if test -n "$CC"; then
3598  ac_cv_prog_CC="$CC" # Let the user override the test.
3599else
3600  ac_prog_rejected=no
3601as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3602for as_dir in $PATH
3603do
3604  IFS=$as_save_IFS
3605  case $as_dir in #(((
3606    '') as_dir=./ ;;
3607    */) ;;
3608    *) as_dir=$as_dir/ ;;
3609  esac
3610    for ac_exec_ext in '' $ac_executable_extensions; do
3611  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
3612    if test "$as_dir$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3613       ac_prog_rejected=yes
3614       continue
3615     fi
3616    ac_cv_prog_CC="cc"
3617    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
3618    break 2
3619  fi
3620done
3621  done
3622IFS=$as_save_IFS
3623
3624if test $ac_prog_rejected = yes; then
3625  # We found a bogon in the path, so make sure we never use it.
3626  set dummy $ac_cv_prog_CC
3627  shift
3628  if test $# != 0; then
3629    # We chose a different compiler from the bogus one.
3630    # However, it has the same basename, so the bogon will be chosen
3631    # first if we set CC to just the basename; use the full file name.
3632    shift
3633    ac_cv_prog_CC="$as_dir$ac_word${1+' '}$@"
3634  fi
3635fi
3636fi ;;
3637esac
3638fi
3639CC=$ac_cv_prog_CC
3640if test -n "$CC"; then
3641  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3642printf "%s\n" "$CC" >&6; }
3643else
3644  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
3645printf "%s\n" "no" >&6; }
3646fi
3647
3648
3649fi
3650if test -z "$CC"; then
3651  if test -n "$ac_tool_prefix"; then
3652  for ac_prog in cl.exe
3653  do
3654    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3655set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3656{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3657printf %s "checking for $ac_word... " >&6; }
3658if test ${ac_cv_prog_CC+y}
3659then :
3660  printf %s "(cached) " >&6
3661else case e in #(
3662  e) if test -n "$CC"; then
3663  ac_cv_prog_CC="$CC" # Let the user override the test.
3664else
3665as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3666for as_dir in $PATH
3667do
3668  IFS=$as_save_IFS
3669  case $as_dir in #(((
3670    '') as_dir=./ ;;
3671    */) ;;
3672    *) as_dir=$as_dir/ ;;
3673  esac
3674    for ac_exec_ext in '' $ac_executable_extensions; do
3675  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
3676    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
3677    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
3678    break 2
3679  fi
3680done
3681  done
3682IFS=$as_save_IFS
3683
3684fi ;;
3685esac
3686fi
3687CC=$ac_cv_prog_CC
3688if test -n "$CC"; then
3689  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3690printf "%s\n" "$CC" >&6; }
3691else
3692  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
3693printf "%s\n" "no" >&6; }
3694fi
3695
3696
3697    test -n "$CC" && break
3698  done
3699fi
3700if test -z "$CC"; then
3701  ac_ct_CC=$CC
3702  for ac_prog in cl.exe
3703do
3704  # Extract the first word of "$ac_prog", so it can be a program name with args.
3705set dummy $ac_prog; ac_word=$2
3706{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3707printf %s "checking for $ac_word... " >&6; }
3708if test ${ac_cv_prog_ac_ct_CC+y}
3709then :
3710  printf %s "(cached) " >&6
3711else case e in #(
3712  e) if test -n "$ac_ct_CC"; then
3713  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3714else
3715as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3716for as_dir in $PATH
3717do
3718  IFS=$as_save_IFS
3719  case $as_dir in #(((
3720    '') as_dir=./ ;;
3721    */) ;;
3722    *) as_dir=$as_dir/ ;;
3723  esac
3724    for ac_exec_ext in '' $ac_executable_extensions; do
3725  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
3726    ac_cv_prog_ac_ct_CC="$ac_prog"
3727    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
3728    break 2
3729  fi
3730done
3731  done
3732IFS=$as_save_IFS
3733
3734fi ;;
3735esac
3736fi
3737ac_ct_CC=$ac_cv_prog_ac_ct_CC
3738if test -n "$ac_ct_CC"; then
3739  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3740printf "%s\n" "$ac_ct_CC" >&6; }
3741else
3742  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
3743printf "%s\n" "no" >&6; }
3744fi
3745
3746
3747  test -n "$ac_ct_CC" && break
3748done
3749
3750  if test "x$ac_ct_CC" = x; then
3751    CC=""
3752  else
3753    case $cross_compiling:$ac_tool_warned in
3754yes:)
3755{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3756printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3757ac_tool_warned=yes ;;
3758esac
3759    CC=$ac_ct_CC
3760  fi
3761fi
3762
3763fi
3764if test -z "$CC"; then
3765  if test -n "$ac_tool_prefix"; then
3766  # Extract the first word of "${ac_tool_prefix}clang", so it can be a program name with args.
3767set dummy ${ac_tool_prefix}clang; ac_word=$2
3768{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3769printf %s "checking for $ac_word... " >&6; }
3770if test ${ac_cv_prog_CC+y}
3771then :
3772  printf %s "(cached) " >&6
3773else case e in #(
3774  e) if test -n "$CC"; then
3775  ac_cv_prog_CC="$CC" # Let the user override the test.
3776else
3777as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3778for as_dir in $PATH
3779do
3780  IFS=$as_save_IFS
3781  case $as_dir in #(((
3782    '') as_dir=./ ;;
3783    */) ;;
3784    *) as_dir=$as_dir/ ;;
3785  esac
3786    for ac_exec_ext in '' $ac_executable_extensions; do
3787  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
3788    ac_cv_prog_CC="${ac_tool_prefix}clang"
3789    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
3790    break 2
3791  fi
3792done
3793  done
3794IFS=$as_save_IFS
3795
3796fi ;;
3797esac
3798fi
3799CC=$ac_cv_prog_CC
3800if test -n "$CC"; then
3801  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3802printf "%s\n" "$CC" >&6; }
3803else
3804  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
3805printf "%s\n" "no" >&6; }
3806fi
3807
3808
3809fi
3810if test -z "$ac_cv_prog_CC"; then
3811  ac_ct_CC=$CC
3812  # Extract the first word of "clang", so it can be a program name with args.
3813set dummy clang; ac_word=$2
3814{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3815printf %s "checking for $ac_word... " >&6; }
3816if test ${ac_cv_prog_ac_ct_CC+y}
3817then :
3818  printf %s "(cached) " >&6
3819else case e in #(
3820  e) if test -n "$ac_ct_CC"; then
3821  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3822else
3823as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3824for as_dir in $PATH
3825do
3826  IFS=$as_save_IFS
3827  case $as_dir in #(((
3828    '') as_dir=./ ;;
3829    */) ;;
3830    *) as_dir=$as_dir/ ;;
3831  esac
3832    for ac_exec_ext in '' $ac_executable_extensions; do
3833  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
3834    ac_cv_prog_ac_ct_CC="clang"
3835    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
3836    break 2
3837  fi
3838done
3839  done
3840IFS=$as_save_IFS
3841
3842fi ;;
3843esac
3844fi
3845ac_ct_CC=$ac_cv_prog_ac_ct_CC
3846if test -n "$ac_ct_CC"; then
3847  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3848printf "%s\n" "$ac_ct_CC" >&6; }
3849else
3850  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
3851printf "%s\n" "no" >&6; }
3852fi
3853
3854  if test "x$ac_ct_CC" = x; then
3855    CC=""
3856  else
3857    case $cross_compiling:$ac_tool_warned in
3858yes:)
3859{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3860printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3861ac_tool_warned=yes ;;
3862esac
3863    CC=$ac_ct_CC
3864  fi
3865else
3866  CC="$ac_cv_prog_CC"
3867fi
3868
3869fi
3870
3871
3872test -z "$CC" && { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
3873printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
3874as_fn_error $? "no acceptable C compiler found in \$PATH
3875See 'config.log' for more details" "$LINENO" 5; }
3876
3877# Provide some information about the compiler.
3878printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3879set X $ac_compile
3880ac_compiler=$2
3881for ac_option in --version -v -V -qversion -version; do
3882  { { ac_try="$ac_compiler $ac_option >&5"
3883case "(($ac_try" in
3884  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3885  *) ac_try_echo=$ac_try;;
3886esac
3887eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3888printf "%s\n" "$ac_try_echo"; } >&5
3889  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
3890  ac_status=$?
3891  if test -s conftest.err; then
3892    sed '10a\
3893... rest of stderr output deleted ...
3894         10q' conftest.err >conftest.er1
3895    cat conftest.er1 >&5
3896  fi
3897  rm -f conftest.er1 conftest.err
3898  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3899  test $ac_status = 0; }
3900done
3901
3902cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3903/* end confdefs.h.  */
3904
3905int
3906main (void)
3907{
3908
3909  ;
3910  return 0;
3911}
3912_ACEOF
3913ac_clean_files_save=$ac_clean_files
3914ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
3915# Try to create an executable without -o first, disregard a.out.
3916# It will help us diagnose broken compilers, and finding out an intuition
3917# of exeext.
3918{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3919printf %s "checking whether the C compiler works... " >&6; }
3920ac_link_default=`printf "%s\n" "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3921
3922# The possible output files:
3923ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3924
3925ac_rmfiles=
3926for ac_file in $ac_files
3927do
3928  case $ac_file in
3929    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3930    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3931  esac
3932done
3933rm -f $ac_rmfiles
3934
3935if { { ac_try="$ac_link_default"
3936case "(($ac_try" in
3937  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3938  *) ac_try_echo=$ac_try;;
3939esac
3940eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3941printf "%s\n" "$ac_try_echo"; } >&5
3942  (eval "$ac_link_default") 2>&5
3943  ac_status=$?
3944  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3945  test $ac_status = 0; }
3946then :
3947  # Autoconf-2.13 could set the ac_cv_exeext variable to 'no'.
3948# So ignore a value of 'no', otherwise this would lead to 'EXEEXT = no'
3949# in a Makefile.  We should not override ac_cv_exeext if it was cached,
3950# so that the user can short-circuit this test for compilers unknown to
3951# Autoconf.
3952for ac_file in $ac_files ''
3953do
3954  test -f "$ac_file" || continue
3955  case $ac_file in
3956    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
3957	;;
3958    [ab].out )
3959	# We found the default executable, but exeext='' is most
3960	# certainly right.
3961	break;;
3962    *.* )
3963	if test ${ac_cv_exeext+y} && test "$ac_cv_exeext" != no;
3964	then :; else
3965	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3966	fi
3967	# We set ac_cv_exeext here because the later test for it is not
3968	# safe: cross compilers may not add the suffix if given an '-o'
3969	# argument, so we may need to know it at that point already.
3970	# Even if this section looks crufty: it has the advantage of
3971	# actually working.
3972	break;;
3973    * )
3974	break;;
3975  esac
3976done
3977test "$ac_cv_exeext" = no && ac_cv_exeext=
3978
3979else case e in #(
3980  e) ac_file='' ;;
3981esac
3982fi
3983if test -z "$ac_file"
3984then :
3985  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
3986printf "%s\n" "no" >&6; }
3987printf "%s\n" "$as_me: failed program was:" >&5
3988sed 's/^/| /' conftest.$ac_ext >&5
3989
3990{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
3991printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
3992as_fn_error 77 "C compiler cannot create executables
3993See 'config.log' for more details" "$LINENO" 5; }
3994else case e in #(
3995  e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3996printf "%s\n" "yes" >&6; } ;;
3997esac
3998fi
3999{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
4000printf %s "checking for C compiler default output file name... " >&6; }
4001{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
4002printf "%s\n" "$ac_file" >&6; }
4003ac_exeext=$ac_cv_exeext
4004
4005rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
4006ac_clean_files=$ac_clean_files_save
4007{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
4008printf %s "checking for suffix of executables... " >&6; }
4009if { { ac_try="$ac_link"
4010case "(($ac_try" in
4011  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4012  *) ac_try_echo=$ac_try;;
4013esac
4014eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4015printf "%s\n" "$ac_try_echo"; } >&5
4016  (eval "$ac_link") 2>&5
4017  ac_status=$?
4018  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4019  test $ac_status = 0; }
4020then :
4021  # If both 'conftest.exe' and 'conftest' are 'present' (well, observable)
4022# catch 'conftest.exe'.  For instance with Cygwin, 'ls conftest' will
4023# work properly (i.e., refer to 'conftest.exe'), while it won't with
4024# 'rm'.
4025for ac_file in conftest.exe conftest conftest.*; do
4026  test -f "$ac_file" || continue
4027  case $ac_file in
4028    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
4029    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4030	  break;;
4031    * ) break;;
4032  esac
4033done
4034else case e in #(
4035  e) { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
4036printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
4037as_fn_error $? "cannot compute suffix of executables: cannot compile and link
4038See 'config.log' for more details" "$LINENO" 5; } ;;
4039esac
4040fi
4041rm -f conftest conftest$ac_cv_exeext
4042{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
4043printf "%s\n" "$ac_cv_exeext" >&6; }
4044
4045rm -f conftest.$ac_ext
4046EXEEXT=$ac_cv_exeext
4047ac_exeext=$EXEEXT
4048cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4049/* end confdefs.h.  */
4050#include <stdio.h>
4051int
4052main (void)
4053{
4054FILE *f = fopen ("conftest.out", "w");
4055 if (!f)
4056  return 1;
4057 return ferror (f) || fclose (f) != 0;
4058
4059  ;
4060  return 0;
4061}
4062_ACEOF
4063ac_clean_files="$ac_clean_files conftest.out"
4064# Check that the compiler produces executables we can run.  If not, either
4065# the compiler is broken, or we cross compile.
4066{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4067printf %s "checking whether we are cross compiling... " >&6; }
4068if test "$cross_compiling" != yes; then
4069  { { ac_try="$ac_link"
4070case "(($ac_try" in
4071  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4072  *) ac_try_echo=$ac_try;;
4073esac
4074eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4075printf "%s\n" "$ac_try_echo"; } >&5
4076  (eval "$ac_link") 2>&5
4077  ac_status=$?
4078  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4079  test $ac_status = 0; }
4080  if { ac_try='./conftest$ac_cv_exeext'
4081  { { case "(($ac_try" in
4082  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4083  *) ac_try_echo=$ac_try;;
4084esac
4085eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4086printf "%s\n" "$ac_try_echo"; } >&5
4087  (eval "$ac_try") 2>&5
4088  ac_status=$?
4089  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4090  test $ac_status = 0; }; }; then
4091    cross_compiling=no
4092  else
4093    if test "$cross_compiling" = maybe; then
4094	cross_compiling=yes
4095    else
4096	{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
4097printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
4098as_fn_error 77 "cannot run C compiled programs.
4099If you meant to cross compile, use '--host'.
4100See 'config.log' for more details" "$LINENO" 5; }
4101    fi
4102  fi
4103fi
4104{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4105printf "%s\n" "$cross_compiling" >&6; }
4106
4107rm -f conftest.$ac_ext conftest$ac_cv_exeext \
4108  conftest.o conftest.obj conftest.out
4109ac_clean_files=$ac_clean_files_save
4110{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4111printf %s "checking for suffix of object files... " >&6; }
4112if test ${ac_cv_objext+y}
4113then :
4114  printf %s "(cached) " >&6
4115else case e in #(
4116  e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4117/* end confdefs.h.  */
4118
4119int
4120main (void)
4121{
4122
4123  ;
4124  return 0;
4125}
4126_ACEOF
4127rm -f conftest.o conftest.obj
4128if { { ac_try="$ac_compile"
4129case "(($ac_try" in
4130  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4131  *) ac_try_echo=$ac_try;;
4132esac
4133eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4134printf "%s\n" "$ac_try_echo"; } >&5
4135  (eval "$ac_compile") 2>&5
4136  ac_status=$?
4137  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4138  test $ac_status = 0; }
4139then :
4140  for ac_file in conftest.o conftest.obj conftest.*; do
4141  test -f "$ac_file" || continue;
4142  case $ac_file in
4143    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
4144    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4145       break;;
4146  esac
4147done
4148else case e in #(
4149  e) printf "%s\n" "$as_me: failed program was:" >&5
4150sed 's/^/| /' conftest.$ac_ext >&5
4151
4152{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
4153printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
4154as_fn_error $? "cannot compute suffix of object files: cannot compile
4155See 'config.log' for more details" "$LINENO" 5; } ;;
4156esac
4157fi
4158rm -f conftest.$ac_cv_objext conftest.$ac_ext ;;
4159esac
4160fi
4161{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4162printf "%s\n" "$ac_cv_objext" >&6; }
4163OBJEXT=$ac_cv_objext
4164ac_objext=$OBJEXT
4165{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports GNU C" >&5
4166printf %s "checking whether the compiler supports GNU C... " >&6; }
4167if test ${ac_cv_c_compiler_gnu+y}
4168then :
4169  printf %s "(cached) " >&6
4170else case e in #(
4171  e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4172/* end confdefs.h.  */
4173
4174int
4175main (void)
4176{
4177#ifndef __GNUC__
4178       choke me
4179#endif
4180
4181  ;
4182  return 0;
4183}
4184_ACEOF
4185if ac_fn_c_try_compile "$LINENO"
4186then :
4187  ac_compiler_gnu=yes
4188else case e in #(
4189  e) ac_compiler_gnu=no ;;
4190esac
4191fi
4192rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
4193ac_cv_c_compiler_gnu=$ac_compiler_gnu
4194 ;;
4195esac
4196fi
4197{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4198printf "%s\n" "$ac_cv_c_compiler_gnu" >&6; }
4199ac_compiler_gnu=$ac_cv_c_compiler_gnu
4200
4201if test $ac_compiler_gnu = yes; then
4202  GCC=yes
4203else
4204  GCC=
4205fi
4206ac_test_CFLAGS=${CFLAGS+y}
4207ac_save_CFLAGS=$CFLAGS
4208{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4209printf %s "checking whether $CC accepts -g... " >&6; }
4210if test ${ac_cv_prog_cc_g+y}
4211then :
4212  printf %s "(cached) " >&6
4213else case e in #(
4214  e) ac_save_c_werror_flag=$ac_c_werror_flag
4215   ac_c_werror_flag=yes
4216   ac_cv_prog_cc_g=no
4217   CFLAGS="-g"
4218   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4219/* end confdefs.h.  */
4220
4221int
4222main (void)
4223{
4224
4225  ;
4226  return 0;
4227}
4228_ACEOF
4229if ac_fn_c_try_compile "$LINENO"
4230then :
4231  ac_cv_prog_cc_g=yes
4232else case e in #(
4233  e) CFLAGS=""
4234      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4235/* end confdefs.h.  */
4236
4237int
4238main (void)
4239{
4240
4241  ;
4242  return 0;
4243}
4244_ACEOF
4245if ac_fn_c_try_compile "$LINENO"
4246then :
4247
4248else case e in #(
4249  e) ac_c_werror_flag=$ac_save_c_werror_flag
4250	 CFLAGS="-g"
4251	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4252/* end confdefs.h.  */
4253
4254int
4255main (void)
4256{
4257
4258  ;
4259  return 0;
4260}
4261_ACEOF
4262if ac_fn_c_try_compile "$LINENO"
4263then :
4264  ac_cv_prog_cc_g=yes
4265fi
4266rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
4267esac
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
4273   ac_c_werror_flag=$ac_save_c_werror_flag ;;
4274esac
4275fi
4276{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4277printf "%s\n" "$ac_cv_prog_cc_g" >&6; }
4278if test $ac_test_CFLAGS; then
4279  CFLAGS=$ac_save_CFLAGS
4280elif test $ac_cv_prog_cc_g = yes; then
4281  if test "$GCC" = yes; then
4282    CFLAGS="-g -O2"
4283  else
4284    CFLAGS="-g"
4285  fi
4286else
4287  if test "$GCC" = yes; then
4288    CFLAGS="-O2"
4289  else
4290    CFLAGS=
4291  fi
4292fi
4293ac_prog_cc_stdc=no
4294if test x$ac_prog_cc_stdc = xno
4295then :
4296  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C11 features" >&5
4297printf %s "checking for $CC option to enable C11 features... " >&6; }
4298if test ${ac_cv_prog_cc_c11+y}
4299then :
4300  printf %s "(cached) " >&6
4301else case e in #(
4302  e) ac_cv_prog_cc_c11=no
4303ac_save_CC=$CC
4304cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4305/* end confdefs.h.  */
4306$ac_c_conftest_c11_program
4307_ACEOF
4308for ac_arg in '' -std=gnu11
4309do
4310  CC="$ac_save_CC $ac_arg"
4311  if ac_fn_c_try_compile "$LINENO"
4312then :
4313  ac_cv_prog_cc_c11=$ac_arg
4314fi
4315rm -f core conftest.err conftest.$ac_objext conftest.beam
4316  test "x$ac_cv_prog_cc_c11" != "xno" && break
4317done
4318rm -f conftest.$ac_ext
4319CC=$ac_save_CC ;;
4320esac
4321fi
4322
4323if test "x$ac_cv_prog_cc_c11" = xno
4324then :
4325  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4326printf "%s\n" "unsupported" >&6; }
4327else case e in #(
4328  e) if test "x$ac_cv_prog_cc_c11" = x
4329then :
4330  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4331printf "%s\n" "none needed" >&6; }
4332else case e in #(
4333  e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c11" >&5
4334printf "%s\n" "$ac_cv_prog_cc_c11" >&6; }
4335     CC="$CC $ac_cv_prog_cc_c11" ;;
4336esac
4337fi
4338  ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c11
4339  ac_prog_cc_stdc=c11 ;;
4340esac
4341fi
4342fi
4343if test x$ac_prog_cc_stdc = xno
4344then :
4345  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C99 features" >&5
4346printf %s "checking for $CC option to enable C99 features... " >&6; }
4347if test ${ac_cv_prog_cc_c99+y}
4348then :
4349  printf %s "(cached) " >&6
4350else case e in #(
4351  e) ac_cv_prog_cc_c99=no
4352ac_save_CC=$CC
4353cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4354/* end confdefs.h.  */
4355$ac_c_conftest_c99_program
4356_ACEOF
4357for ac_arg in '' -std=gnu99 -std=c99 -c99 -qlanglvl=extc1x -qlanglvl=extc99 -AC99 -D_STDC_C99=
4358do
4359  CC="$ac_save_CC $ac_arg"
4360  if ac_fn_c_try_compile "$LINENO"
4361then :
4362  ac_cv_prog_cc_c99=$ac_arg
4363fi
4364rm -f core conftest.err conftest.$ac_objext conftest.beam
4365  test "x$ac_cv_prog_cc_c99" != "xno" && break
4366done
4367rm -f conftest.$ac_ext
4368CC=$ac_save_CC ;;
4369esac
4370fi
4371
4372if test "x$ac_cv_prog_cc_c99" = xno
4373then :
4374  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4375printf "%s\n" "unsupported" >&6; }
4376else case e in #(
4377  e) if test "x$ac_cv_prog_cc_c99" = x
4378then :
4379  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4380printf "%s\n" "none needed" >&6; }
4381else case e in #(
4382  e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5
4383printf "%s\n" "$ac_cv_prog_cc_c99" >&6; }
4384     CC="$CC $ac_cv_prog_cc_c99" ;;
4385esac
4386fi
4387  ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99
4388  ac_prog_cc_stdc=c99 ;;
4389esac
4390fi
4391fi
4392if test x$ac_prog_cc_stdc = xno
4393then :
4394  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C89 features" >&5
4395printf %s "checking for $CC option to enable C89 features... " >&6; }
4396if test ${ac_cv_prog_cc_c89+y}
4397then :
4398  printf %s "(cached) " >&6
4399else case e in #(
4400  e) ac_cv_prog_cc_c89=no
4401ac_save_CC=$CC
4402cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4403/* end confdefs.h.  */
4404$ac_c_conftest_c89_program
4405_ACEOF
4406for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
4407do
4408  CC="$ac_save_CC $ac_arg"
4409  if ac_fn_c_try_compile "$LINENO"
4410then :
4411  ac_cv_prog_cc_c89=$ac_arg
4412fi
4413rm -f core conftest.err conftest.$ac_objext conftest.beam
4414  test "x$ac_cv_prog_cc_c89" != "xno" && break
4415done
4416rm -f conftest.$ac_ext
4417CC=$ac_save_CC ;;
4418esac
4419fi
4420
4421if test "x$ac_cv_prog_cc_c89" = xno
4422then :
4423  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4424printf "%s\n" "unsupported" >&6; }
4425else case e in #(
4426  e) if test "x$ac_cv_prog_cc_c89" = x
4427then :
4428  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4429printf "%s\n" "none needed" >&6; }
4430else case e in #(
4431  e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4432printf "%s\n" "$ac_cv_prog_cc_c89" >&6; }
4433     CC="$CC $ac_cv_prog_cc_c89" ;;
4434esac
4435fi
4436  ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89
4437  ac_prog_cc_stdc=c89 ;;
4438esac
4439fi
4440fi
4441
4442ac_ext=c
4443ac_cpp='$CPP $CPPFLAGS'
4444ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4445ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4446ac_compiler_gnu=$ac_cv_c_compiler_gnu
4447
4448
4449ac_header= ac_cache=
4450for ac_item in $ac_header_c_list
4451do
4452  if test $ac_cache; then
4453    ac_fn_c_check_header_compile "$LINENO" $ac_header ac_cv_header_$ac_cache "$ac_includes_default"
4454    if eval test \"x\$ac_cv_header_$ac_cache\" = xyes; then
4455      printf "%s\n" "#define $ac_item 1" >> confdefs.h
4456    fi
4457    ac_header= ac_cache=
4458  elif test $ac_header; then
4459    ac_cache=$ac_item
4460  else
4461    ac_header=$ac_item
4462  fi
4463done
4464
4465
4466
4467
4468
4469
4470
4471
4472if test $ac_cv_header_stdlib_h = yes && test $ac_cv_header_string_h = yes
4473then :
4474
4475printf "%s\n" "#define STDC_HEADERS 1" >>confdefs.h
4476
4477fi
4478
4479
4480
4481
4482
4483
4484  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
4485printf %s "checking whether it is safe to define __EXTENSIONS__... " >&6; }
4486if test ${ac_cv_safe_to_define___extensions__+y}
4487then :
4488  printf %s "(cached) " >&6
4489else case e in #(
4490  e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4491/* end confdefs.h.  */
4492
4493#         define __EXTENSIONS__ 1
4494          $ac_includes_default
4495int
4496main (void)
4497{
4498
4499  ;
4500  return 0;
4501}
4502_ACEOF
4503if ac_fn_c_try_compile "$LINENO"
4504then :
4505  ac_cv_safe_to_define___extensions__=yes
4506else case e in #(
4507  e) ac_cv_safe_to_define___extensions__=no ;;
4508esac
4509fi
4510rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
4511esac
4512fi
4513{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
4514printf "%s\n" "$ac_cv_safe_to_define___extensions__" >&6; }
4515
4516  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether _XOPEN_SOURCE should be defined" >&5
4517printf %s "checking whether _XOPEN_SOURCE should be defined... " >&6; }
4518if test ${ac_cv_should_define__xopen_source+y}
4519then :
4520  printf %s "(cached) " >&6
4521else case e in #(
4522  e) ac_cv_should_define__xopen_source=no
4523    if test $ac_cv_header_wchar_h = yes
4524then :
4525  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4526/* end confdefs.h.  */
4527
4528          #include <wchar.h>
4529          mbstate_t x;
4530int
4531main (void)
4532{
4533
4534  ;
4535  return 0;
4536}
4537_ACEOF
4538if ac_fn_c_try_compile "$LINENO"
4539then :
4540
4541else case e in #(
4542  e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4543/* end confdefs.h.  */
4544
4545            #define _XOPEN_SOURCE 500
4546            #include <wchar.h>
4547            mbstate_t x;
4548int
4549main (void)
4550{
4551
4552  ;
4553  return 0;
4554}
4555_ACEOF
4556if ac_fn_c_try_compile "$LINENO"
4557then :
4558  ac_cv_should_define__xopen_source=yes
4559fi
4560rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
4561esac
4562fi
4563rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
4564fi ;;
4565esac
4566fi
4567{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_should_define__xopen_source" >&5
4568printf "%s\n" "$ac_cv_should_define__xopen_source" >&6; }
4569
4570  printf "%s\n" "#define _ALL_SOURCE 1" >>confdefs.h
4571
4572  printf "%s\n" "#define _DARWIN_C_SOURCE 1" >>confdefs.h
4573
4574  printf "%s\n" "#define _GNU_SOURCE 1" >>confdefs.h
4575
4576  printf "%s\n" "#define _HPUX_ALT_XOPEN_SOCKET_API 1" >>confdefs.h
4577
4578  printf "%s\n" "#define _NETBSD_SOURCE 1" >>confdefs.h
4579
4580  printf "%s\n" "#define _OPENBSD_SOURCE 1" >>confdefs.h
4581
4582  printf "%s\n" "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
4583
4584  printf "%s\n" "#define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1" >>confdefs.h
4585
4586  printf "%s\n" "#define __STDC_WANT_IEC_60559_BFP_EXT__ 1" >>confdefs.h
4587
4588  printf "%s\n" "#define __STDC_WANT_IEC_60559_DFP_EXT__ 1" >>confdefs.h
4589
4590  printf "%s\n" "#define __STDC_WANT_IEC_60559_EXT__ 1" >>confdefs.h
4591
4592  printf "%s\n" "#define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1" >>confdefs.h
4593
4594  printf "%s\n" "#define __STDC_WANT_IEC_60559_TYPES_EXT__ 1" >>confdefs.h
4595
4596  printf "%s\n" "#define __STDC_WANT_LIB_EXT2__ 1" >>confdefs.h
4597
4598  printf "%s\n" "#define __STDC_WANT_MATH_SPEC_FUNCS__ 1" >>confdefs.h
4599
4600  printf "%s\n" "#define _TANDEM_SOURCE 1" >>confdefs.h
4601
4602  if test $ac_cv_header_minix_config_h = yes
4603then :
4604  MINIX=yes
4605    printf "%s\n" "#define _MINIX 1" >>confdefs.h
4606
4607    printf "%s\n" "#define _POSIX_SOURCE 1" >>confdefs.h
4608
4609    printf "%s\n" "#define _POSIX_1_SOURCE 2" >>confdefs.h
4610
4611else case e in #(
4612  e) MINIX= ;;
4613esac
4614fi
4615  if test $ac_cv_safe_to_define___extensions__ = yes
4616then :
4617  printf "%s\n" "#define __EXTENSIONS__ 1" >>confdefs.h
4618
4619fi
4620  if test $ac_cv_should_define__xopen_source = yes
4621then :
4622  printf "%s\n" "#define _XOPEN_SOURCE 500" >>confdefs.h
4623
4624fi
4625
4626if test "$ac_cv_header_minix_config_h" = "yes"; then
4627
4628printf "%s\n" "#define _NETBSD_SOURCE 1" >>confdefs.h
4629
4630fi
4631
4632case "$prefix" in
4633        NONE)
4634		prefix="/usr/local"
4635        ;;
4636esac
4637case "$exec_prefix" in
4638        NONE)
4639		exec_prefix="$prefix"
4640        ;;
4641esac
4642
4643# are we on MinGW?
4644if uname -s 2>&1 | grep MINGW >/dev/null; then on_mingw="yes"
4645else
4646	if echo $host | grep mingw >/dev/null; then on_mingw="yes"
4647	else on_mingw="no"; fi
4648fi
4649
4650#
4651# Determine configuration file
4652# the eval is to evaluate shell expansion twice
4653UNBOUND_SBIN_DIR=`eval echo "${sbindir}"`
4654
4655UNBOUND_SYSCONF_DIR=`eval echo "${sysconfdir}"`
4656
4657UNBOUND_LOCALSTATE_DIR=`eval echo "${localstatedir}"`
4658
4659if test $on_mingw = "no"; then
4660  ub_conf_file=`eval echo "${sysconfdir}/unbound/unbound.conf"`
4661else
4662  ub_conf_file="C:\\Program Files\\Unbound\\service.conf"
4663fi
4664
4665# Check whether --with-conf_file was given.
4666if test ${with_conf_file+y}
4667then :
4668  withval=$with_conf_file; ub_conf_file="$withval"
4669fi
4670
4671
4672hdr_config="`echo $ub_conf_file | sed -e 's/\\\\/\\\\\\\\/g'`"
4673
4674
4675printf "%s\n" "#define CONFIGFILE \"$hdr_config\"" >>confdefs.h
4676
4677ub_conf_dir=`$as_dirname -- "$ub_conf_file" ||
4678$as_expr X"$ub_conf_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
4679	 X"$ub_conf_file" : 'X\(//\)[^/]' \| \
4680	 X"$ub_conf_file" : 'X\(//\)$' \| \
4681	 X"$ub_conf_file" : 'X\(/\)' \| . 2>/dev/null ||
4682printf "%s\n" X"$ub_conf_file" |
4683    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
4684	    s//\1/
4685	    q
4686	  }
4687	  /^X\(\/\/\)[^/].*/{
4688	    s//\1/
4689	    q
4690	  }
4691	  /^X\(\/\/\)$/{
4692	    s//\1/
4693	    q
4694	  }
4695	  /^X\(\/\).*/{
4696	    s//\1/
4697	    q
4698	  }
4699	  s/.*/./; q'`
4700
4701
4702# Determine run, chroot directory and pidfile locations
4703
4704# Check whether --with-run-dir was given.
4705if test ${with_run_dir+y}
4706then :
4707  withval=$with_run_dir; UNBOUND_RUN_DIR="$withval"
4708else case e in #(
4709  e) if test $on_mingw = no; then
4710    UNBOUND_RUN_DIR=`dirname "$ub_conf_file"`
4711else
4712    UNBOUND_RUN_DIR=""
4713fi
4714 ;;
4715esac
4716fi
4717
4718
4719hdr_run="`echo $UNBOUND_RUN_DIR | sed -e 's/\\\\/\\\\\\\\/g'`"
4720
4721
4722printf "%s\n" "#define RUN_DIR \"$hdr_run\"" >>confdefs.h
4723
4724
4725
4726# Check whether --with-chroot-dir was given.
4727if test ${with_chroot_dir+y}
4728then :
4729  withval=$with_chroot_dir; UNBOUND_CHROOT_DIR="$withval"
4730else case e in #(
4731  e) if test $on_mingw = no; then
4732    UNBOUND_CHROOT_DIR="$UNBOUND_RUN_DIR"
4733else
4734    UNBOUND_CHROOT_DIR=""
4735fi
4736 ;;
4737esac
4738fi
4739
4740
4741hdr_chroot="`echo $UNBOUND_CHROOT_DIR | sed -e 's/\\\\/\\\\\\\\/g'`"
4742
4743
4744printf "%s\n" "#define CHROOT_DIR \"$hdr_chroot\"" >>confdefs.h
4745
4746
4747
4748# Check whether --with-share-dir was given.
4749if test ${with_share_dir+y}
4750then :
4751  withval=$with_share_dir; UNBOUND_SHARE_DIR="$withval"
4752else case e in #(
4753  e) UNBOUND_SHARE_DIR="$UNBOUND_RUN_DIR" ;;
4754esac
4755fi
4756
4757
4758
4759printf "%s\n" "#define SHARE_DIR \"$UNBOUND_SHARE_DIR\"" >>confdefs.h
4760
4761
4762
4763# Check whether --with-pidfile was given.
4764if test ${with_pidfile+y}
4765then :
4766  withval=$with_pidfile; UNBOUND_PIDFILE="$withval"
4767else case e in #(
4768  e) if test $on_mingw = no; then
4769    UNBOUND_PIDFILE="$UNBOUND_RUN_DIR/unbound.pid"
4770else
4771    UNBOUND_PIDFILE=""
4772fi
4773 ;;
4774esac
4775fi
4776
4777
4778hdr_pid="`echo $UNBOUND_PIDFILE | sed -e 's/\\\\/\\\\\\\\/g'`"
4779
4780
4781printf "%s\n" "#define PIDFILE \"$hdr_pid\"" >>confdefs.h
4782
4783
4784
4785# Check whether --with-rootkey-file was given.
4786if test ${with_rootkey_file+y}
4787then :
4788  withval=$with_rootkey_file; UNBOUND_ROOTKEY_FILE="$withval"
4789else case e in #(
4790  e) if test $on_mingw = no; then
4791    UNBOUND_ROOTKEY_FILE="$UNBOUND_RUN_DIR/root.key"
4792else
4793    UNBOUND_ROOTKEY_FILE="C:\\Program Files\\Unbound\\root.key"
4794fi
4795 ;;
4796esac
4797fi
4798
4799
4800hdr_rkey="`echo $UNBOUND_ROOTKEY_FILE | sed -e 's/\\\\/\\\\\\\\/g'`"
4801
4802
4803printf "%s\n" "#define ROOT_ANCHOR_FILE \"$hdr_rkey\"" >>confdefs.h
4804
4805
4806
4807# Check whether --with-rootcert-file was given.
4808if test ${with_rootcert_file+y}
4809then :
4810  withval=$with_rootcert_file; UNBOUND_ROOTCERT_FILE="$withval"
4811else case e in #(
4812  e) if test $on_mingw = no; then
4813    UNBOUND_ROOTCERT_FILE="$UNBOUND_RUN_DIR/icannbundle.pem"
4814else
4815    UNBOUND_ROOTCERT_FILE="C:\\Program Files\\Unbound\\icannbundle.pem"
4816fi
4817 ;;
4818esac
4819fi
4820
4821
4822hdr_rpem="`echo $UNBOUND_ROOTCERT_FILE | sed -e 's/\\\\/\\\\\\\\/g'`"
4823
4824
4825printf "%s\n" "#define ROOT_CERT_FILE \"$hdr_rpem\"" >>confdefs.h
4826
4827
4828
4829# Check whether --with-username was given.
4830if test ${with_username+y}
4831then :
4832  withval=$with_username; UNBOUND_USERNAME="$withval"
4833else case e in #(
4834  e) UNBOUND_USERNAME="unbound" ;;
4835esac
4836fi
4837
4838
4839
4840printf "%s\n" "#define UB_USERNAME \"$UNBOUND_USERNAME\"" >>confdefs.h
4841
4842
4843
4844printf "%s\n" "#define WINVER 0x0502" >>confdefs.h
4845
4846wnvs=`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/' `
4847
4848
4849printf "%s\n" "#define RSRC_PACKAGE_VERSION $wnvs" >>confdefs.h
4850
4851
4852# Check for 'grep -e' program, here, since ACX_CHECK_FLTO needs that.
4853{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4854printf %s "checking for grep that handles long lines and -e... " >&6; }
4855if test ${ac_cv_path_GREP+y}
4856then :
4857  printf %s "(cached) " >&6
4858else case e in #(
4859  e) if test -z "$GREP"; then
4860  ac_path_GREP_found=false
4861  # Loop through the user's path and test for each of PROGNAME-LIST
4862  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4863for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4864do
4865  IFS=$as_save_IFS
4866  case $as_dir in #(((
4867    '') as_dir=./ ;;
4868    */) ;;
4869    *) as_dir=$as_dir/ ;;
4870  esac
4871    for ac_prog in grep ggrep
4872   do
4873    for ac_exec_ext in '' $ac_executable_extensions; do
4874      ac_path_GREP="$as_dir$ac_prog$ac_exec_ext"
4875      as_fn_executable_p "$ac_path_GREP" || continue
4876# Check for GNU ac_path_GREP and select it if it is found.
4877  # Check for GNU $ac_path_GREP
4878case `"$ac_path_GREP" --version 2>&1` in #(
4879*GNU*)
4880  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4881#(
4882*)
4883  ac_count=0
4884  printf %s 0123456789 >"conftest.in"
4885  while :
4886  do
4887    cat "conftest.in" "conftest.in" >"conftest.tmp"
4888    mv "conftest.tmp" "conftest.in"
4889    cp "conftest.in" "conftest.nl"
4890    printf "%s\n" 'GREP' >> "conftest.nl"
4891    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4892    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4893    as_fn_arith $ac_count + 1 && ac_count=$as_val
4894    if test $ac_count -gt ${ac_path_GREP_max-0}; then
4895      # Best one so far, save it but keep looking for a better one
4896      ac_cv_path_GREP="$ac_path_GREP"
4897      ac_path_GREP_max=$ac_count
4898    fi
4899    # 10*(2^10) chars as input seems more than enough
4900    test $ac_count -gt 10 && break
4901  done
4902  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4903esac
4904
4905      $ac_path_GREP_found && break 3
4906    done
4907  done
4908  done
4909IFS=$as_save_IFS
4910  if test -z "$ac_cv_path_GREP"; then
4911    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4912  fi
4913else
4914  ac_cv_path_GREP=$GREP
4915fi
4916 ;;
4917esac
4918fi
4919{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4920printf "%s\n" "$ac_cv_path_GREP" >&6; }
4921 GREP="$ac_cv_path_GREP"
4922
4923
4924
4925# Checks for typedefs, structures, and compiler characteristics.
4926{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
4927printf %s "checking for an ANSI C-conforming const... " >&6; }
4928if test ${ac_cv_c_const+y}
4929then :
4930  printf %s "(cached) " >&6
4931else case e in #(
4932  e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4933/* end confdefs.h.  */
4934
4935int
4936main (void)
4937{
4938
4939#ifndef __cplusplus
4940  /* Ultrix mips cc rejects this sort of thing.  */
4941  typedef int charset[2];
4942  const charset cs = { 0, 0 };
4943  /* SunOS 4.1.1 cc rejects this.  */
4944  char const *const *pcpcc;
4945  char **ppc;
4946  /* NEC SVR4.0.2 mips cc rejects this.  */
4947  struct point {int x, y;};
4948  static struct point const zero = {0,0};
4949  /* IBM XL C 1.02.0.0 rejects this.
4950     It does not let you subtract one const X* pointer from another in
4951     an arm of an if-expression whose if-part is not a constant
4952     expression */
4953  const char *g = "string";
4954  pcpcc = &g + (g ? g-g : 0);
4955  /* HPUX 7.0 cc rejects these. */
4956  ++pcpcc;
4957  ppc = (char**) pcpcc;
4958  pcpcc = (char const *const *) ppc;
4959  { /* SCO 3.2v4 cc rejects this sort of thing.  */
4960    char tx;
4961    char *t = &tx;
4962    char const *s = 0 ? (char *) 0 : (char const *) 0;
4963
4964    *t++ = 0;
4965    if (s) return 0;
4966  }
4967  { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
4968    int x[] = {25, 17};
4969    const int *foo = &x[0];
4970    ++foo;
4971  }
4972  { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
4973    typedef const int *iptr;
4974    iptr p = 0;
4975    ++p;
4976  }
4977  { /* IBM XL C 1.02.0.0 rejects this sort of thing, saying
4978       "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
4979    struct s { int j; const int *ap[3]; } bx;
4980    struct s *b = &bx; b->j = 5;
4981  }
4982  { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
4983    const int foo = 10;
4984    if (!foo) return 0;
4985  }
4986  return !cs[0] && !zero.x;
4987#endif
4988
4989  ;
4990  return 0;
4991}
4992_ACEOF
4993if ac_fn_c_try_compile "$LINENO"
4994then :
4995  ac_cv_c_const=yes
4996else case e in #(
4997  e) ac_cv_c_const=no ;;
4998esac
4999fi
5000rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
5001esac
5002fi
5003{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
5004printf "%s\n" "$ac_cv_c_const" >&6; }
5005if test $ac_cv_c_const = no; then
5006
5007printf "%s\n" "#define const /**/" >>confdefs.h
5008
5009fi
5010
5011ac_ext=c
5012ac_cpp='$CPP $CPPFLAGS'
5013ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5014ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5015ac_compiler_gnu=$ac_cv_c_compiler_gnu
5016
5017# allow user to override the -g -O2 flags.
5018default_cflags=no
5019if test "x$CFLAGS" = "x" ; then
5020
5021
5022{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -g" >&5
5023printf %s "checking whether $CC supports -g... " >&6; }
5024cache=`echo g | sed 'y%.=/+-%___p_%'`
5025if eval test \${cv_prog_cc_flag_$cache+y}
5026then :
5027  printf %s "(cached) " >&6
5028else case e in #(
5029  e)
5030echo 'void f(void){}' >conftest.c
5031if test -z "`$CC $CPPFLAGS $CFLAGS -g -c conftest.c 2>&1`"; then
5032eval "cv_prog_cc_flag_$cache=yes"
5033else
5034eval "cv_prog_cc_flag_$cache=no"
5035fi
5036rm -f conftest conftest.o conftest.c
5037 ;;
5038esac
5039fi
5040
5041if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
5042{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5043printf "%s\n" "yes" >&6; }
5044:
5045CFLAGS="$CFLAGS -g"
5046else
5047{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5048printf "%s\n" "no" >&6; }
5049:
5050
5051fi
5052
5053
5054
5055{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -O2" >&5
5056printf %s "checking whether $CC supports -O2... " >&6; }
5057cache=`echo O2 | sed 'y%.=/+-%___p_%'`
5058if eval test \${cv_prog_cc_flag_$cache+y}
5059then :
5060  printf %s "(cached) " >&6
5061else case e in #(
5062  e)
5063echo 'void f(void){}' >conftest.c
5064if test -z "`$CC $CPPFLAGS $CFLAGS -O2 -c conftest.c 2>&1`"; then
5065eval "cv_prog_cc_flag_$cache=yes"
5066else
5067eval "cv_prog_cc_flag_$cache=no"
5068fi
5069rm -f conftest conftest.o conftest.c
5070 ;;
5071esac
5072fi
5073
5074if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
5075{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5076printf "%s\n" "yes" >&6; }
5077:
5078CFLAGS="$CFLAGS -O2"
5079else
5080{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5081printf "%s\n" "no" >&6; }
5082:
5083
5084fi
5085
5086default_cflags=yes
5087fi
5088ac_ext=c
5089ac_cpp='$CPP $CPPFLAGS'
5090ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5091ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5092ac_compiler_gnu=$ac_cv_c_compiler_gnu
5093if test -n "$ac_tool_prefix"; then
5094  # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
5095set dummy ${ac_tool_prefix}gcc; ac_word=$2
5096{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5097printf %s "checking for $ac_word... " >&6; }
5098if test ${ac_cv_prog_CC+y}
5099then :
5100  printf %s "(cached) " >&6
5101else case e in #(
5102  e) if test -n "$CC"; then
5103  ac_cv_prog_CC="$CC" # Let the user override the test.
5104else
5105as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5106for as_dir in $PATH
5107do
5108  IFS=$as_save_IFS
5109  case $as_dir in #(((
5110    '') as_dir=./ ;;
5111    */) ;;
5112    *) as_dir=$as_dir/ ;;
5113  esac
5114    for ac_exec_ext in '' $ac_executable_extensions; do
5115  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
5116    ac_cv_prog_CC="${ac_tool_prefix}gcc"
5117    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
5118    break 2
5119  fi
5120done
5121  done
5122IFS=$as_save_IFS
5123
5124fi ;;
5125esac
5126fi
5127CC=$ac_cv_prog_CC
5128if test -n "$CC"; then
5129  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5130printf "%s\n" "$CC" >&6; }
5131else
5132  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5133printf "%s\n" "no" >&6; }
5134fi
5135
5136
5137fi
5138if test -z "$ac_cv_prog_CC"; then
5139  ac_ct_CC=$CC
5140  # Extract the first word of "gcc", so it can be a program name with args.
5141set dummy gcc; ac_word=$2
5142{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5143printf %s "checking for $ac_word... " >&6; }
5144if test ${ac_cv_prog_ac_ct_CC+y}
5145then :
5146  printf %s "(cached) " >&6
5147else case e in #(
5148  e) if test -n "$ac_ct_CC"; then
5149  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
5150else
5151as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5152for as_dir in $PATH
5153do
5154  IFS=$as_save_IFS
5155  case $as_dir in #(((
5156    '') as_dir=./ ;;
5157    */) ;;
5158    *) as_dir=$as_dir/ ;;
5159  esac
5160    for ac_exec_ext in '' $ac_executable_extensions; do
5161  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
5162    ac_cv_prog_ac_ct_CC="gcc"
5163    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
5164    break 2
5165  fi
5166done
5167  done
5168IFS=$as_save_IFS
5169
5170fi ;;
5171esac
5172fi
5173ac_ct_CC=$ac_cv_prog_ac_ct_CC
5174if test -n "$ac_ct_CC"; then
5175  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
5176printf "%s\n" "$ac_ct_CC" >&6; }
5177else
5178  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5179printf "%s\n" "no" >&6; }
5180fi
5181
5182  if test "x$ac_ct_CC" = x; then
5183    CC=""
5184  else
5185    case $cross_compiling:$ac_tool_warned in
5186yes:)
5187{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5188printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5189ac_tool_warned=yes ;;
5190esac
5191    CC=$ac_ct_CC
5192  fi
5193else
5194  CC="$ac_cv_prog_CC"
5195fi
5196
5197if test -z "$CC"; then
5198          if test -n "$ac_tool_prefix"; then
5199    # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
5200set dummy ${ac_tool_prefix}cc; ac_word=$2
5201{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5202printf %s "checking for $ac_word... " >&6; }
5203if test ${ac_cv_prog_CC+y}
5204then :
5205  printf %s "(cached) " >&6
5206else case e in #(
5207  e) if test -n "$CC"; then
5208  ac_cv_prog_CC="$CC" # Let the user override the test.
5209else
5210as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5211for as_dir in $PATH
5212do
5213  IFS=$as_save_IFS
5214  case $as_dir in #(((
5215    '') as_dir=./ ;;
5216    */) ;;
5217    *) as_dir=$as_dir/ ;;
5218  esac
5219    for ac_exec_ext in '' $ac_executable_extensions; do
5220  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
5221    ac_cv_prog_CC="${ac_tool_prefix}cc"
5222    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
5223    break 2
5224  fi
5225done
5226  done
5227IFS=$as_save_IFS
5228
5229fi ;;
5230esac
5231fi
5232CC=$ac_cv_prog_CC
5233if test -n "$CC"; then
5234  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5235printf "%s\n" "$CC" >&6; }
5236else
5237  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5238printf "%s\n" "no" >&6; }
5239fi
5240
5241
5242  fi
5243fi
5244if test -z "$CC"; then
5245  # Extract the first word of "cc", so it can be a program name with args.
5246set dummy cc; ac_word=$2
5247{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5248printf %s "checking for $ac_word... " >&6; }
5249if test ${ac_cv_prog_CC+y}
5250then :
5251  printf %s "(cached) " >&6
5252else case e in #(
5253  e) if test -n "$CC"; then
5254  ac_cv_prog_CC="$CC" # Let the user override the test.
5255else
5256  ac_prog_rejected=no
5257as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5258for as_dir in $PATH
5259do
5260  IFS=$as_save_IFS
5261  case $as_dir in #(((
5262    '') as_dir=./ ;;
5263    */) ;;
5264    *) as_dir=$as_dir/ ;;
5265  esac
5266    for ac_exec_ext in '' $ac_executable_extensions; do
5267  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
5268    if test "$as_dir$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
5269       ac_prog_rejected=yes
5270       continue
5271     fi
5272    ac_cv_prog_CC="cc"
5273    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
5274    break 2
5275  fi
5276done
5277  done
5278IFS=$as_save_IFS
5279
5280if test $ac_prog_rejected = yes; then
5281  # We found a bogon in the path, so make sure we never use it.
5282  set dummy $ac_cv_prog_CC
5283  shift
5284  if test $# != 0; then
5285    # We chose a different compiler from the bogus one.
5286    # However, it has the same basename, so the bogon will be chosen
5287    # first if we set CC to just the basename; use the full file name.
5288    shift
5289    ac_cv_prog_CC="$as_dir$ac_word${1+' '}$@"
5290  fi
5291fi
5292fi ;;
5293esac
5294fi
5295CC=$ac_cv_prog_CC
5296if test -n "$CC"; then
5297  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5298printf "%s\n" "$CC" >&6; }
5299else
5300  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5301printf "%s\n" "no" >&6; }
5302fi
5303
5304
5305fi
5306if test -z "$CC"; then
5307  if test -n "$ac_tool_prefix"; then
5308  for ac_prog in cl.exe
5309  do
5310    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5311set dummy $ac_tool_prefix$ac_prog; ac_word=$2
5312{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5313printf %s "checking for $ac_word... " >&6; }
5314if test ${ac_cv_prog_CC+y}
5315then :
5316  printf %s "(cached) " >&6
5317else case e in #(
5318  e) if test -n "$CC"; then
5319  ac_cv_prog_CC="$CC" # Let the user override the test.
5320else
5321as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5322for as_dir in $PATH
5323do
5324  IFS=$as_save_IFS
5325  case $as_dir in #(((
5326    '') as_dir=./ ;;
5327    */) ;;
5328    *) as_dir=$as_dir/ ;;
5329  esac
5330    for ac_exec_ext in '' $ac_executable_extensions; do
5331  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
5332    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
5333    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
5334    break 2
5335  fi
5336done
5337  done
5338IFS=$as_save_IFS
5339
5340fi ;;
5341esac
5342fi
5343CC=$ac_cv_prog_CC
5344if test -n "$CC"; then
5345  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5346printf "%s\n" "$CC" >&6; }
5347else
5348  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5349printf "%s\n" "no" >&6; }
5350fi
5351
5352
5353    test -n "$CC" && break
5354  done
5355fi
5356if test -z "$CC"; then
5357  ac_ct_CC=$CC
5358  for ac_prog in cl.exe
5359do
5360  # Extract the first word of "$ac_prog", so it can be a program name with args.
5361set dummy $ac_prog; ac_word=$2
5362{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5363printf %s "checking for $ac_word... " >&6; }
5364if test ${ac_cv_prog_ac_ct_CC+y}
5365then :
5366  printf %s "(cached) " >&6
5367else case e in #(
5368  e) if test -n "$ac_ct_CC"; then
5369  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
5370else
5371as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5372for as_dir in $PATH
5373do
5374  IFS=$as_save_IFS
5375  case $as_dir in #(((
5376    '') as_dir=./ ;;
5377    */) ;;
5378    *) as_dir=$as_dir/ ;;
5379  esac
5380    for ac_exec_ext in '' $ac_executable_extensions; do
5381  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
5382    ac_cv_prog_ac_ct_CC="$ac_prog"
5383    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
5384    break 2
5385  fi
5386done
5387  done
5388IFS=$as_save_IFS
5389
5390fi ;;
5391esac
5392fi
5393ac_ct_CC=$ac_cv_prog_ac_ct_CC
5394if test -n "$ac_ct_CC"; then
5395  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
5396printf "%s\n" "$ac_ct_CC" >&6; }
5397else
5398  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5399printf "%s\n" "no" >&6; }
5400fi
5401
5402
5403  test -n "$ac_ct_CC" && break
5404done
5405
5406  if test "x$ac_ct_CC" = x; then
5407    CC=""
5408  else
5409    case $cross_compiling:$ac_tool_warned in
5410yes:)
5411{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5412printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5413ac_tool_warned=yes ;;
5414esac
5415    CC=$ac_ct_CC
5416  fi
5417fi
5418
5419fi
5420if test -z "$CC"; then
5421  if test -n "$ac_tool_prefix"; then
5422  # Extract the first word of "${ac_tool_prefix}clang", so it can be a program name with args.
5423set dummy ${ac_tool_prefix}clang; ac_word=$2
5424{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5425printf %s "checking for $ac_word... " >&6; }
5426if test ${ac_cv_prog_CC+y}
5427then :
5428  printf %s "(cached) " >&6
5429else case e in #(
5430  e) if test -n "$CC"; then
5431  ac_cv_prog_CC="$CC" # Let the user override the test.
5432else
5433as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5434for as_dir in $PATH
5435do
5436  IFS=$as_save_IFS
5437  case $as_dir in #(((
5438    '') as_dir=./ ;;
5439    */) ;;
5440    *) as_dir=$as_dir/ ;;
5441  esac
5442    for ac_exec_ext in '' $ac_executable_extensions; do
5443  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
5444    ac_cv_prog_CC="${ac_tool_prefix}clang"
5445    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
5446    break 2
5447  fi
5448done
5449  done
5450IFS=$as_save_IFS
5451
5452fi ;;
5453esac
5454fi
5455CC=$ac_cv_prog_CC
5456if test -n "$CC"; then
5457  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5458printf "%s\n" "$CC" >&6; }
5459else
5460  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5461printf "%s\n" "no" >&6; }
5462fi
5463
5464
5465fi
5466if test -z "$ac_cv_prog_CC"; then
5467  ac_ct_CC=$CC
5468  # Extract the first word of "clang", so it can be a program name with args.
5469set dummy clang; ac_word=$2
5470{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5471printf %s "checking for $ac_word... " >&6; }
5472if test ${ac_cv_prog_ac_ct_CC+y}
5473then :
5474  printf %s "(cached) " >&6
5475else case e in #(
5476  e) if test -n "$ac_ct_CC"; then
5477  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
5478else
5479as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5480for as_dir in $PATH
5481do
5482  IFS=$as_save_IFS
5483  case $as_dir in #(((
5484    '') as_dir=./ ;;
5485    */) ;;
5486    *) as_dir=$as_dir/ ;;
5487  esac
5488    for ac_exec_ext in '' $ac_executable_extensions; do
5489  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
5490    ac_cv_prog_ac_ct_CC="clang"
5491    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
5492    break 2
5493  fi
5494done
5495  done
5496IFS=$as_save_IFS
5497
5498fi ;;
5499esac
5500fi
5501ac_ct_CC=$ac_cv_prog_ac_ct_CC
5502if test -n "$ac_ct_CC"; then
5503  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
5504printf "%s\n" "$ac_ct_CC" >&6; }
5505else
5506  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5507printf "%s\n" "no" >&6; }
5508fi
5509
5510  if test "x$ac_ct_CC" = x; then
5511    CC=""
5512  else
5513    case $cross_compiling:$ac_tool_warned in
5514yes:)
5515{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5516printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5517ac_tool_warned=yes ;;
5518esac
5519    CC=$ac_ct_CC
5520  fi
5521else
5522  CC="$ac_cv_prog_CC"
5523fi
5524
5525fi
5526
5527
5528test -z "$CC" && { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
5529printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
5530as_fn_error $? "no acceptable C compiler found in \$PATH
5531See 'config.log' for more details" "$LINENO" 5; }
5532
5533# Provide some information about the compiler.
5534printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
5535set X $ac_compile
5536ac_compiler=$2
5537for ac_option in --version -v -V -qversion -version; do
5538  { { ac_try="$ac_compiler $ac_option >&5"
5539case "(($ac_try" in
5540  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5541  *) ac_try_echo=$ac_try;;
5542esac
5543eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5544printf "%s\n" "$ac_try_echo"; } >&5
5545  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
5546  ac_status=$?
5547  if test -s conftest.err; then
5548    sed '10a\
5549... rest of stderr output deleted ...
5550         10q' conftest.err >conftest.er1
5551    cat conftest.er1 >&5
5552  fi
5553  rm -f conftest.er1 conftest.err
5554  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5555  test $ac_status = 0; }
5556done
5557
5558{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports GNU C" >&5
5559printf %s "checking whether the compiler supports GNU C... " >&6; }
5560if test ${ac_cv_c_compiler_gnu+y}
5561then :
5562  printf %s "(cached) " >&6
5563else case e in #(
5564  e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5565/* end confdefs.h.  */
5566
5567int
5568main (void)
5569{
5570#ifndef __GNUC__
5571       choke me
5572#endif
5573
5574  ;
5575  return 0;
5576}
5577_ACEOF
5578if ac_fn_c_try_compile "$LINENO"
5579then :
5580  ac_compiler_gnu=yes
5581else case e in #(
5582  e) ac_compiler_gnu=no ;;
5583esac
5584fi
5585rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
5586ac_cv_c_compiler_gnu=$ac_compiler_gnu
5587 ;;
5588esac
5589fi
5590{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
5591printf "%s\n" "$ac_cv_c_compiler_gnu" >&6; }
5592ac_compiler_gnu=$ac_cv_c_compiler_gnu
5593
5594if test $ac_compiler_gnu = yes; then
5595  GCC=yes
5596else
5597  GCC=
5598fi
5599ac_test_CFLAGS=${CFLAGS+y}
5600ac_save_CFLAGS=$CFLAGS
5601{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
5602printf %s "checking whether $CC accepts -g... " >&6; }
5603if test ${ac_cv_prog_cc_g+y}
5604then :
5605  printf %s "(cached) " >&6
5606else case e in #(
5607  e) ac_save_c_werror_flag=$ac_c_werror_flag
5608   ac_c_werror_flag=yes
5609   ac_cv_prog_cc_g=no
5610   CFLAGS="-g"
5611   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5612/* end confdefs.h.  */
5613
5614int
5615main (void)
5616{
5617
5618  ;
5619  return 0;
5620}
5621_ACEOF
5622if ac_fn_c_try_compile "$LINENO"
5623then :
5624  ac_cv_prog_cc_g=yes
5625else case e in #(
5626  e) CFLAGS=""
5627      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5628/* end confdefs.h.  */
5629
5630int
5631main (void)
5632{
5633
5634  ;
5635  return 0;
5636}
5637_ACEOF
5638if ac_fn_c_try_compile "$LINENO"
5639then :
5640
5641else case e in #(
5642  e) ac_c_werror_flag=$ac_save_c_werror_flag
5643	 CFLAGS="-g"
5644	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5645/* end confdefs.h.  */
5646
5647int
5648main (void)
5649{
5650
5651  ;
5652  return 0;
5653}
5654_ACEOF
5655if ac_fn_c_try_compile "$LINENO"
5656then :
5657  ac_cv_prog_cc_g=yes
5658fi
5659rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
5660esac
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
5666   ac_c_werror_flag=$ac_save_c_werror_flag ;;
5667esac
5668fi
5669{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
5670printf "%s\n" "$ac_cv_prog_cc_g" >&6; }
5671if test $ac_test_CFLAGS; then
5672  CFLAGS=$ac_save_CFLAGS
5673elif test $ac_cv_prog_cc_g = yes; then
5674  if test "$GCC" = yes; then
5675    CFLAGS="-g -O2"
5676  else
5677    CFLAGS="-g"
5678  fi
5679else
5680  if test "$GCC" = yes; then
5681    CFLAGS="-O2"
5682  else
5683    CFLAGS=
5684  fi
5685fi
5686ac_prog_cc_stdc=no
5687if test x$ac_prog_cc_stdc = xno
5688then :
5689  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C11 features" >&5
5690printf %s "checking for $CC option to enable C11 features... " >&6; }
5691if test ${ac_cv_prog_cc_c11+y}
5692then :
5693  printf %s "(cached) " >&6
5694else case e in #(
5695  e) ac_cv_prog_cc_c11=no
5696ac_save_CC=$CC
5697cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5698/* end confdefs.h.  */
5699$ac_c_conftest_c11_program
5700_ACEOF
5701for ac_arg in '' -std=gnu11
5702do
5703  CC="$ac_save_CC $ac_arg"
5704  if ac_fn_c_try_compile "$LINENO"
5705then :
5706  ac_cv_prog_cc_c11=$ac_arg
5707fi
5708rm -f core conftest.err conftest.$ac_objext conftest.beam
5709  test "x$ac_cv_prog_cc_c11" != "xno" && break
5710done
5711rm -f conftest.$ac_ext
5712CC=$ac_save_CC ;;
5713esac
5714fi
5715
5716if test "x$ac_cv_prog_cc_c11" = xno
5717then :
5718  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
5719printf "%s\n" "unsupported" >&6; }
5720else case e in #(
5721  e) if test "x$ac_cv_prog_cc_c11" = x
5722then :
5723  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
5724printf "%s\n" "none needed" >&6; }
5725else case e in #(
5726  e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c11" >&5
5727printf "%s\n" "$ac_cv_prog_cc_c11" >&6; }
5728     CC="$CC $ac_cv_prog_cc_c11" ;;
5729esac
5730fi
5731  ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c11
5732  ac_prog_cc_stdc=c11 ;;
5733esac
5734fi
5735fi
5736if test x$ac_prog_cc_stdc = xno
5737then :
5738  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C99 features" >&5
5739printf %s "checking for $CC option to enable C99 features... " >&6; }
5740if test ${ac_cv_prog_cc_c99+y}
5741then :
5742  printf %s "(cached) " >&6
5743else case e in #(
5744  e) ac_cv_prog_cc_c99=no
5745ac_save_CC=$CC
5746cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5747/* end confdefs.h.  */
5748$ac_c_conftest_c99_program
5749_ACEOF
5750for ac_arg in '' -std=gnu99 -std=c99 -c99 -qlanglvl=extc1x -qlanglvl=extc99 -AC99 -D_STDC_C99=
5751do
5752  CC="$ac_save_CC $ac_arg"
5753  if ac_fn_c_try_compile "$LINENO"
5754then :
5755  ac_cv_prog_cc_c99=$ac_arg
5756fi
5757rm -f core conftest.err conftest.$ac_objext conftest.beam
5758  test "x$ac_cv_prog_cc_c99" != "xno" && break
5759done
5760rm -f conftest.$ac_ext
5761CC=$ac_save_CC ;;
5762esac
5763fi
5764
5765if test "x$ac_cv_prog_cc_c99" = xno
5766then :
5767  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
5768printf "%s\n" "unsupported" >&6; }
5769else case e in #(
5770  e) if test "x$ac_cv_prog_cc_c99" = x
5771then :
5772  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
5773printf "%s\n" "none needed" >&6; }
5774else case e in #(
5775  e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5
5776printf "%s\n" "$ac_cv_prog_cc_c99" >&6; }
5777     CC="$CC $ac_cv_prog_cc_c99" ;;
5778esac
5779fi
5780  ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99
5781  ac_prog_cc_stdc=c99 ;;
5782esac
5783fi
5784fi
5785if test x$ac_prog_cc_stdc = xno
5786then :
5787  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C89 features" >&5
5788printf %s "checking for $CC option to enable C89 features... " >&6; }
5789if test ${ac_cv_prog_cc_c89+y}
5790then :
5791  printf %s "(cached) " >&6
5792else case e in #(
5793  e) ac_cv_prog_cc_c89=no
5794ac_save_CC=$CC
5795cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5796/* end confdefs.h.  */
5797$ac_c_conftest_c89_program
5798_ACEOF
5799for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
5800do
5801  CC="$ac_save_CC $ac_arg"
5802  if ac_fn_c_try_compile "$LINENO"
5803then :
5804  ac_cv_prog_cc_c89=$ac_arg
5805fi
5806rm -f core conftest.err conftest.$ac_objext conftest.beam
5807  test "x$ac_cv_prog_cc_c89" != "xno" && break
5808done
5809rm -f conftest.$ac_ext
5810CC=$ac_save_CC ;;
5811esac
5812fi
5813
5814if test "x$ac_cv_prog_cc_c89" = xno
5815then :
5816  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
5817printf "%s\n" "unsupported" >&6; }
5818else case e in #(
5819  e) if test "x$ac_cv_prog_cc_c89" = x
5820then :
5821  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
5822printf "%s\n" "none needed" >&6; }
5823else case e in #(
5824  e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
5825printf "%s\n" "$ac_cv_prog_cc_c89" >&6; }
5826     CC="$CC $ac_cv_prog_cc_c89" ;;
5827esac
5828fi
5829  ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89
5830  ac_prog_cc_stdc=c89 ;;
5831esac
5832fi
5833fi
5834
5835ac_ext=c
5836ac_cpp='$CPP $CPPFLAGS'
5837ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5838ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5839ac_compiler_gnu=$ac_cv_c_compiler_gnu
5840
5841
5842{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking $CC dependency flag" >&5
5843printf %s "checking $CC dependency flag... " >&6; }
5844echo 'void f(void){}' >conftest.c
5845if test "`$CC -MM conftest.c 2>&1`" = "conftest.o: conftest.c"; then
5846	DEPFLAG="-MM"
5847else
5848  if test "`$CC -xM1 conftest.c 2>&1`" = "conftest.o: conftest.c"; then
5849	DEPFLAG="-xM1"
5850  else
5851	DEPFLAG="-MM"  # dunno do something
5852  fi
5853fi
5854{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $DEPFLAG" >&5
5855printf "%s\n" "$DEPFLAG" >&6; }
5856rm -f conftest.c
5857
5858
5859
5860
5861
5862{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Werror" >&5
5863printf %s "checking whether $CC supports -Werror... " >&6; }
5864cache=`echo Werror | sed 'y%.=/+-%___p_%'`
5865if eval test \${cv_prog_cc_flag_$cache+y}
5866then :
5867  printf %s "(cached) " >&6
5868else case e in #(
5869  e)
5870echo 'void f(void){}' >conftest.c
5871if test -z "`$CC $CPPFLAGS $CFLAGS -Werror -c conftest.c 2>&1`"; then
5872eval "cv_prog_cc_flag_$cache=yes"
5873else
5874eval "cv_prog_cc_flag_$cache=no"
5875fi
5876rm -f conftest conftest.o conftest.c
5877 ;;
5878esac
5879fi
5880
5881if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
5882{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5883printf "%s\n" "yes" >&6; }
5884:
5885ERRFLAG="-Werror"
5886else
5887{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5888printf "%s\n" "no" >&6; }
5889:
5890ERRFLAG="-errwarn"
5891fi
5892
5893
5894
5895{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wall" >&5
5896printf %s "checking whether $CC supports -Wall... " >&6; }
5897cache=`echo Wall | sed 'y%.=/+-%___p_%'`
5898if eval test \${cv_prog_cc_flag_$cache+y}
5899then :
5900  printf %s "(cached) " >&6
5901else case e in #(
5902  e)
5903echo 'void f(void){}' >conftest.c
5904if test -z "`$CC $CPPFLAGS $CFLAGS -Wall -c conftest.c 2>&1`"; then
5905eval "cv_prog_cc_flag_$cache=yes"
5906else
5907eval "cv_prog_cc_flag_$cache=no"
5908fi
5909rm -f conftest conftest.o conftest.c
5910 ;;
5911esac
5912fi
5913
5914if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
5915{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5916printf "%s\n" "yes" >&6; }
5917:
5918ERRFLAG="$ERRFLAG -Wall"
5919else
5920{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5921printf "%s\n" "no" >&6; }
5922:
5923ERRFLAG="$ERRFLAG -errfmt"
5924fi
5925
5926
5927
5928
5929
5930{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -std=c99" >&5
5931printf %s "checking whether $CC supports -std=c99... " >&6; }
5932cache=`echo std=c99 | sed 'y%.=/+-%___p_%'`
5933if eval test \${cv_prog_cc_flag_$cache+y}
5934then :
5935  printf %s "(cached) " >&6
5936else case e in #(
5937  e)
5938echo 'void f(void){}' >conftest.c
5939if test -z "`$CC $CPPFLAGS $CFLAGS -std=c99 -c conftest.c 2>&1`"; then
5940eval "cv_prog_cc_flag_$cache=yes"
5941else
5942eval "cv_prog_cc_flag_$cache=no"
5943fi
5944rm -f conftest conftest.o conftest.c
5945 ;;
5946esac
5947fi
5948
5949if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
5950{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5951printf "%s\n" "yes" >&6; }
5952:
5953C99FLAG="-std=c99"
5954else
5955{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5956printf "%s\n" "no" >&6; }
5957:
5958
5959fi
5960
5961
5962
5963{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -xc99" >&5
5964printf %s "checking whether $CC supports -xc99... " >&6; }
5965cache=`echo xc99 | sed 'y%.=/+-%___p_%'`
5966if eval test \${cv_prog_cc_flag_$cache+y}
5967then :
5968  printf %s "(cached) " >&6
5969else case e in #(
5970  e)
5971echo 'void f(void){}' >conftest.c
5972if test -z "`$CC $CPPFLAGS $CFLAGS -xc99 -c conftest.c 2>&1`"; then
5973eval "cv_prog_cc_flag_$cache=yes"
5974else
5975eval "cv_prog_cc_flag_$cache=no"
5976fi
5977rm -f conftest conftest.o conftest.c
5978 ;;
5979esac
5980fi
5981
5982if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
5983{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5984printf "%s\n" "yes" >&6; }
5985:
5986C99FLAG="-xc99"
5987else
5988{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5989printf "%s\n" "no" >&6; }
5990:
5991
5992fi
5993
5994
5995ac_fn_c_check_header_compile "$LINENO" "getopt.h" "ac_cv_header_getopt_h" "$ac_includes_default
5996"
5997if test "x$ac_cv_header_getopt_h" = xyes
5998then :
5999  printf "%s\n" "#define HAVE_GETOPT_H 1" >>confdefs.h
6000
6001fi
6002ac_fn_c_check_header_compile "$LINENO" "time.h" "ac_cv_header_time_h" "$ac_includes_default
6003"
6004if test "x$ac_cv_header_time_h" = xyes
6005then :
6006  printf "%s\n" "#define HAVE_TIME_H 1" >>confdefs.h
6007
6008fi
6009
6010
6011
6012
6013
6014{ 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
6015printf %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; }
6016cache=`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"`
6017if eval test \${cv_prog_cc_flag_needed_$cache+y}
6018then :
6019  printf %s "(cached) " >&6
6020else case e in #(
6021  e)
6022echo '
6023#include "confdefs.h"
6024#include <stdlib.h>
6025#include <ctype.h>
6026#include <sys/time.h>
6027#ifdef HAVE_TIME_H
6028#include <time.h>
6029#endif
6030#include <unistd.h>
6031#include <netdb.h>
6032#ifdef HAVE_GETOPT_H
6033#include <getopt.h>
6034#endif
6035
6036int test(void) {
6037	int a;
6038	char **opts = NULL;
6039	struct timeval tv;
6040	char *t;
6041	time_t time = 0;
6042	char *buf = NULL;
6043	const char* str = NULL;
6044	struct msghdr msg;
6045	msg.msg_control = 0;
6046	t = ctime_r(&time, buf);
6047	tv.tv_usec = 10;
6048	srandom(32);
6049	a = getopt(2, opts, "a");
6050	a = isascii(32);
6051	str = gai_strerror(0);
6052	if(str && t && tv.tv_usec && msg.msg_control)
6053		a = 0;
6054	return a;
6055}
6056' > conftest.c
6057echo 'void f(void){}' >>conftest.c
6058if test -z "`$CC $CPPFLAGS $CFLAGS $ERRFLAG -c conftest.c 2>&1`"; then
6059eval "cv_prog_cc_flag_needed_$cache=no"
6060else
6061
6062if 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
6063eval "cv_prog_cc_flag_needed_$cache=yes"
6064else
6065eval "cv_prog_cc_flag_needed_$cache=fail"
6066#echo 'Test with flag fails too!'
6067#cat conftest.c
6068#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"
6069#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`
6070#exit 1
6071fi
6072
6073fi
6074rm -f conftest conftest.c conftest.o
6075 ;;
6076esac
6077fi
6078
6079if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = yes"; then
6080{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6081printf "%s\n" "yes" >&6; }
6082:
6083CFLAGS="$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"
6084else
6085if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = no"; then
6086{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6087printf "%s\n" "no" >&6; }
6088#echo 'Test with flag is no!'
6089#cat conftest.c
6090#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"
6091#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`
6092#exit 1
6093:
6094
6095else
6096{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: failed" >&5
6097printf "%s\n" "failed" >&6; }
6098:
6099
6100fi
6101fi
6102
6103
6104
6105
6106
6107{ 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
6108printf %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; }
6109cache=`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"`
6110if eval test \${cv_prog_cc_flag_needed_$cache+y}
6111then :
6112  printf %s "(cached) " >&6
6113else case e in #(
6114  e)
6115echo '
6116#include "confdefs.h"
6117#include <stdlib.h>
6118#include <ctype.h>
6119#include <sys/time.h>
6120#ifdef HAVE_TIME_H
6121#include <time.h>
6122#endif
6123#include <unistd.h>
6124#include <netdb.h>
6125#ifdef HAVE_GETOPT_H
6126#include <getopt.h>
6127#endif
6128
6129int test(void) {
6130	int a;
6131	char **opts = NULL;
6132	struct timeval tv;
6133	char *t;
6134	time_t time = 0;
6135	char *buf = NULL;
6136	const char* str = NULL;
6137	struct msghdr msg;
6138	msg.msg_control = 0;
6139	t = ctime_r(&time, buf);
6140	tv.tv_usec = 10;
6141	srandom(32);
6142	a = getopt(2, opts, "a");
6143	a = isascii(32);
6144	str = gai_strerror(0);
6145	if(str && t && tv.tv_usec && msg.msg_control)
6146		a = 0;
6147	return a;
6148}
6149' > conftest.c
6150echo 'void f(void){}' >>conftest.c
6151if test -z "`$CC $CPPFLAGS $CFLAGS $ERRFLAG -c conftest.c 2>&1`"; then
6152eval "cv_prog_cc_flag_needed_$cache=no"
6153else
6154
6155if 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
6156eval "cv_prog_cc_flag_needed_$cache=yes"
6157else
6158eval "cv_prog_cc_flag_needed_$cache=fail"
6159#echo 'Test with flag fails too!'
6160#cat conftest.c
6161#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"
6162#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`
6163#exit 1
6164fi
6165
6166fi
6167rm -f conftest conftest.c conftest.o
6168 ;;
6169esac
6170fi
6171
6172if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = yes"; then
6173{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6174printf "%s\n" "yes" >&6; }
6175:
6176CFLAGS="$CFLAGS $C99FLAG -D__EXTENSIONS__ -D_BSD_SOURCE -D_DEFAULT_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -D_ALL_SOURCE"
6177else
6178if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = no"; then
6179{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6180printf "%s\n" "no" >&6; }
6181#echo 'Test with flag is no!'
6182#cat conftest.c
6183#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"
6184#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`
6185#exit 1
6186:
6187
6188else
6189{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: failed" >&5
6190printf "%s\n" "failed" >&6; }
6191:
6192
6193fi
6194fi
6195
6196
6197
6198
6199
6200{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we need $C99FLAG as a flag for $CC" >&5
6201printf %s "checking whether we need $C99FLAG as a flag for $CC... " >&6; }
6202cache=`printf "%s\n" "$C99FLAG" | sed "$as_sed_sh"`
6203if eval test \${cv_prog_cc_flag_needed_$cache+y}
6204then :
6205  printf %s "(cached) " >&6
6206else case e in #(
6207  e)
6208echo '
6209#include <stdbool.h>
6210#include <ctype.h>
6211int test(void) {
6212        int a = 0;
6213        return a;
6214}
6215' > conftest.c
6216echo 'void f(void){}' >>conftest.c
6217if test -z "`$CC $CPPFLAGS $CFLAGS $ERRFLAG -c conftest.c 2>&1`"; then
6218eval "cv_prog_cc_flag_needed_$cache=no"
6219else
6220
6221if test -z "`$CC $CPPFLAGS $CFLAGS $C99FLAG $ERRFLAG -c conftest.c 2>&1`"; then
6222eval "cv_prog_cc_flag_needed_$cache=yes"
6223else
6224eval "cv_prog_cc_flag_needed_$cache=fail"
6225#echo 'Test with flag fails too!'
6226#cat conftest.c
6227#echo "$CC $CPPFLAGS $CFLAGS $C99FLAG $ERRFLAG -c conftest.c 2>&1"
6228#echo `$CC $CPPFLAGS $CFLAGS $C99FLAG $ERRFLAG -c conftest.c 2>&1`
6229#exit 1
6230fi
6231
6232fi
6233rm -f conftest conftest.c conftest.o
6234 ;;
6235esac
6236fi
6237
6238if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = yes"; then
6239{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6240printf "%s\n" "yes" >&6; }
6241:
6242CFLAGS="$CFLAGS $C99FLAG"
6243else
6244if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = no"; then
6245{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6246printf "%s\n" "no" >&6; }
6247#echo 'Test with flag is no!'
6248#cat conftest.c
6249#echo "$CC $CPPFLAGS $CFLAGS $C99FLAG $ERRFLAG -c conftest.c 2>&1"
6250#echo `$CC $CPPFLAGS $CFLAGS $C99FLAG $ERRFLAG -c conftest.c 2>&1`
6251#exit 1
6252:
6253
6254else
6255{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: failed" >&5
6256printf "%s\n" "failed" >&6; }
6257:
6258
6259fi
6260fi
6261
6262
6263
6264
6265
6266{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we need -D_BSD_SOURCE -D_DEFAULT_SOURCE as a flag for $CC" >&5
6267printf %s "checking whether we need -D_BSD_SOURCE -D_DEFAULT_SOURCE as a flag for $CC... " >&6; }
6268cache=_D_BSD_SOURCE__D_DEFAULT_SOURCE
6269if eval test \${cv_prog_cc_flag_needed_$cache+y}
6270then :
6271  printf %s "(cached) " >&6
6272else case e in #(
6273  e)
6274echo '
6275#include <ctype.h>
6276
6277int test(void) {
6278        int a;
6279        a = isascii(32);
6280        return a;
6281}
6282' > conftest.c
6283echo 'void f(void){}' >>conftest.c
6284if test -z "`$CC $CPPFLAGS $CFLAGS $ERRFLAG -c conftest.c 2>&1`"; then
6285eval "cv_prog_cc_flag_needed_$cache=no"
6286else
6287
6288if test -z "`$CC $CPPFLAGS $CFLAGS -D_BSD_SOURCE -D_DEFAULT_SOURCE $ERRFLAG -c conftest.c 2>&1`"; then
6289eval "cv_prog_cc_flag_needed_$cache=yes"
6290else
6291eval "cv_prog_cc_flag_needed_$cache=fail"
6292#echo 'Test with flag fails too!'
6293#cat conftest.c
6294#echo "$CC $CPPFLAGS $CFLAGS -D_BSD_SOURCE -D_DEFAULT_SOURCE $ERRFLAG -c conftest.c 2>&1"
6295#echo `$CC $CPPFLAGS $CFLAGS -D_BSD_SOURCE -D_DEFAULT_SOURCE $ERRFLAG -c conftest.c 2>&1`
6296#exit 1
6297fi
6298
6299fi
6300rm -f conftest conftest.c conftest.o
6301 ;;
6302esac
6303fi
6304
6305if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = yes"; then
6306{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6307printf "%s\n" "yes" >&6; }
6308:
6309CFLAGS="$CFLAGS -D_BSD_SOURCE -D_DEFAULT_SOURCE"
6310else
6311if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = no"; then
6312{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6313printf "%s\n" "no" >&6; }
6314#echo 'Test with flag is no!'
6315#cat conftest.c
6316#echo "$CC $CPPFLAGS $CFLAGS -D_BSD_SOURCE -D_DEFAULT_SOURCE $ERRFLAG -c conftest.c 2>&1"
6317#echo `$CC $CPPFLAGS $CFLAGS -D_BSD_SOURCE -D_DEFAULT_SOURCE $ERRFLAG -c conftest.c 2>&1`
6318#exit 1
6319:
6320
6321else
6322{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: failed" >&5
6323printf "%s\n" "failed" >&6; }
6324:
6325
6326fi
6327fi
6328
6329
6330
6331
6332
6333{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we need -D_GNU_SOURCE as a flag for $CC" >&5
6334printf %s "checking whether we need -D_GNU_SOURCE as a flag for $CC... " >&6; }
6335cache=_D_GNU_SOURCE
6336if eval test \${cv_prog_cc_flag_needed_$cache+y}
6337then :
6338  printf %s "(cached) " >&6
6339else case e in #(
6340  e)
6341echo '
6342#include <netinet/in.h>
6343
6344int test(void) {
6345        struct in6_pktinfo inf;
6346	int a = (int)sizeof(inf);
6347        return a;
6348}
6349' > conftest.c
6350echo 'void f(void){}' >>conftest.c
6351if test -z "`$CC $CPPFLAGS $CFLAGS $ERRFLAG -c conftest.c 2>&1`"; then
6352eval "cv_prog_cc_flag_needed_$cache=no"
6353else
6354
6355if test -z "`$CC $CPPFLAGS $CFLAGS -D_GNU_SOURCE $ERRFLAG -c conftest.c 2>&1`"; then
6356eval "cv_prog_cc_flag_needed_$cache=yes"
6357else
6358eval "cv_prog_cc_flag_needed_$cache=fail"
6359#echo 'Test with flag fails too!'
6360#cat conftest.c
6361#echo "$CC $CPPFLAGS $CFLAGS -D_GNU_SOURCE $ERRFLAG -c conftest.c 2>&1"
6362#echo `$CC $CPPFLAGS $CFLAGS -D_GNU_SOURCE $ERRFLAG -c conftest.c 2>&1`
6363#exit 1
6364fi
6365
6366fi
6367rm -f conftest conftest.c conftest.o
6368 ;;
6369esac
6370fi
6371
6372if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = yes"; then
6373{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6374printf "%s\n" "yes" >&6; }
6375:
6376CFLAGS="$CFLAGS -D_GNU_SOURCE"
6377else
6378if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = no"; then
6379{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6380printf "%s\n" "no" >&6; }
6381#echo 'Test with flag is no!'
6382#cat conftest.c
6383#echo "$CC $CPPFLAGS $CFLAGS -D_GNU_SOURCE $ERRFLAG -c conftest.c 2>&1"
6384#echo `$CC $CPPFLAGS $CFLAGS -D_GNU_SOURCE $ERRFLAG -c conftest.c 2>&1`
6385#exit 1
6386:
6387
6388else
6389{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: failed" >&5
6390printf "%s\n" "failed" >&6; }
6391:
6392
6393fi
6394fi
6395
6396
6397# check again for GNU_SOURCE for setresgid. May fail if setresgid
6398# is not available at all. -D_FRSRESGID is to make this check unique.
6399# otherwise we would get the previous cached result.
6400
6401
6402
6403{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we need -D_GNU_SOURCE -D_FRSRESGID as a flag for $CC" >&5
6404printf %s "checking whether we need -D_GNU_SOURCE -D_FRSRESGID as a flag for $CC... " >&6; }
6405cache=_D_GNU_SOURCE__D_FRSRESGID
6406if eval test \${cv_prog_cc_flag_needed_$cache+y}
6407then :
6408  printf %s "(cached) " >&6
6409else case e in #(
6410  e)
6411echo '
6412#include <unistd.h>
6413
6414int test(void) {
6415	int a = setresgid(0,0,0);
6416	a = setresuid(0,0,0);
6417        return a;
6418}
6419' > conftest.c
6420echo 'void f(void){}' >>conftest.c
6421if test -z "`$CC $CPPFLAGS $CFLAGS $ERRFLAG -c conftest.c 2>&1`"; then
6422eval "cv_prog_cc_flag_needed_$cache=no"
6423else
6424
6425if test -z "`$CC $CPPFLAGS $CFLAGS -D_GNU_SOURCE -D_FRSRESGID $ERRFLAG -c conftest.c 2>&1`"; then
6426eval "cv_prog_cc_flag_needed_$cache=yes"
6427else
6428eval "cv_prog_cc_flag_needed_$cache=fail"
6429#echo 'Test with flag fails too!'
6430#cat conftest.c
6431#echo "$CC $CPPFLAGS $CFLAGS -D_GNU_SOURCE -D_FRSRESGID $ERRFLAG -c conftest.c 2>&1"
6432#echo `$CC $CPPFLAGS $CFLAGS -D_GNU_SOURCE -D_FRSRESGID $ERRFLAG -c conftest.c 2>&1`
6433#exit 1
6434fi
6435
6436fi
6437rm -f conftest conftest.c conftest.o
6438 ;;
6439esac
6440fi
6441
6442if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = yes"; then
6443{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6444printf "%s\n" "yes" >&6; }
6445:
6446CFLAGS="$CFLAGS -D_GNU_SOURCE"
6447else
6448if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = no"; then
6449{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6450printf "%s\n" "no" >&6; }
6451#echo 'Test with flag is no!'
6452#cat conftest.c
6453#echo "$CC $CPPFLAGS $CFLAGS -D_GNU_SOURCE -D_FRSRESGID $ERRFLAG -c conftest.c 2>&1"
6454#echo `$CC $CPPFLAGS $CFLAGS -D_GNU_SOURCE -D_FRSRESGID $ERRFLAG -c conftest.c 2>&1`
6455#exit 1
6456:
6457
6458else
6459{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: failed" >&5
6460printf "%s\n" "failed" >&6; }
6461:
6462
6463fi
6464fi
6465
6466
6467
6468
6469
6470{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we need -D_POSIX_C_SOURCE=200112 as a flag for $CC" >&5
6471printf %s "checking whether we need -D_POSIX_C_SOURCE=200112 as a flag for $CC... " >&6; }
6472cache=_D_POSIX_C_SOURCE_200112
6473if eval test \${cv_prog_cc_flag_needed_$cache+y}
6474then :
6475  printf %s "(cached) " >&6
6476else case e in #(
6477  e)
6478echo '
6479#include "confdefs.h"
6480#ifdef HAVE_TIME_H
6481#include <time.h>
6482#endif
6483#include <netdb.h>
6484
6485int test(void) {
6486        int a = 0;
6487        char *t;
6488        time_t time = 0;
6489        char *buf = NULL;
6490	const char* str = NULL;
6491        t = ctime_r(&time, buf);
6492	str = gai_strerror(0);
6493	if(t && str)
6494		a = 0;
6495        return a;
6496}
6497' > conftest.c
6498echo 'void f(void){}' >>conftest.c
6499if test -z "`$CC $CPPFLAGS $CFLAGS $ERRFLAG -c conftest.c 2>&1`"; then
6500eval "cv_prog_cc_flag_needed_$cache=no"
6501else
6502
6503if test -z "`$CC $CPPFLAGS $CFLAGS -D_POSIX_C_SOURCE=200112 $ERRFLAG -c conftest.c 2>&1`"; then
6504eval "cv_prog_cc_flag_needed_$cache=yes"
6505else
6506eval "cv_prog_cc_flag_needed_$cache=fail"
6507#echo 'Test with flag fails too!'
6508#cat conftest.c
6509#echo "$CC $CPPFLAGS $CFLAGS -D_POSIX_C_SOURCE=200112 $ERRFLAG -c conftest.c 2>&1"
6510#echo `$CC $CPPFLAGS $CFLAGS -D_POSIX_C_SOURCE=200112 $ERRFLAG -c conftest.c 2>&1`
6511#exit 1
6512fi
6513
6514fi
6515rm -f conftest conftest.c conftest.o
6516 ;;
6517esac
6518fi
6519
6520if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = yes"; then
6521{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6522printf "%s\n" "yes" >&6; }
6523:
6524CFLAGS="$CFLAGS -D_POSIX_C_SOURCE=200112"
6525else
6526if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = no"; then
6527{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6528printf "%s\n" "no" >&6; }
6529#echo 'Test with flag is no!'
6530#cat conftest.c
6531#echo "$CC $CPPFLAGS $CFLAGS -D_POSIX_C_SOURCE=200112 $ERRFLAG -c conftest.c 2>&1"
6532#echo `$CC $CPPFLAGS $CFLAGS -D_POSIX_C_SOURCE=200112 $ERRFLAG -c conftest.c 2>&1`
6533#exit 1
6534:
6535
6536else
6537{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: failed" >&5
6538printf "%s\n" "failed" >&6; }
6539:
6540
6541fi
6542fi
6543
6544
6545
6546
6547
6548{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we need -D__EXTENSIONS__ as a flag for $CC" >&5
6549printf %s "checking whether we need -D__EXTENSIONS__ as a flag for $CC... " >&6; }
6550cache=_D__EXTENSIONS__
6551if eval test \${cv_prog_cc_flag_needed_$cache+y}
6552then :
6553  printf %s "(cached) " >&6
6554else case e in #(
6555  e)
6556echo '
6557#include "confdefs.h"
6558#include <stdlib.h>
6559#include <ctype.h>
6560#include <sys/time.h>
6561#ifdef HAVE_TIME_H
6562#include <time.h>
6563#endif
6564#include <unistd.h>
6565#ifdef HAVE_GETOPT_H
6566#include <getopt.h>
6567#endif
6568
6569int test(void) {
6570        int a;
6571        char **opts = NULL;
6572        struct timeval tv;
6573        tv.tv_usec = 10;
6574        srandom(32);
6575        a = getopt(2, opts, "a");
6576        a = isascii(32);
6577	if(tv.tv_usec)
6578		a = 0;
6579        return a;
6580}
6581' > conftest.c
6582echo 'void f(void){}' >>conftest.c
6583if test -z "`$CC $CPPFLAGS $CFLAGS $ERRFLAG -c conftest.c 2>&1`"; then
6584eval "cv_prog_cc_flag_needed_$cache=no"
6585else
6586
6587if test -z "`$CC $CPPFLAGS $CFLAGS -D__EXTENSIONS__ $ERRFLAG -c conftest.c 2>&1`"; then
6588eval "cv_prog_cc_flag_needed_$cache=yes"
6589else
6590eval "cv_prog_cc_flag_needed_$cache=fail"
6591#echo 'Test with flag fails too!'
6592#cat conftest.c
6593#echo "$CC $CPPFLAGS $CFLAGS -D__EXTENSIONS__ $ERRFLAG -c conftest.c 2>&1"
6594#echo `$CC $CPPFLAGS $CFLAGS -D__EXTENSIONS__ $ERRFLAG -c conftest.c 2>&1`
6595#exit 1
6596fi
6597
6598fi
6599rm -f conftest conftest.c conftest.o
6600 ;;
6601esac
6602fi
6603
6604if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = yes"; then
6605{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6606printf "%s\n" "yes" >&6; }
6607:
6608CFLAGS="$CFLAGS -D__EXTENSIONS__"
6609else
6610if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = no"; then
6611{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6612printf "%s\n" "no" >&6; }
6613#echo 'Test with flag is no!'
6614#cat conftest.c
6615#echo "$CC $CPPFLAGS $CFLAGS -D__EXTENSIONS__ $ERRFLAG -c conftest.c 2>&1"
6616#echo `$CC $CPPFLAGS $CFLAGS -D__EXTENSIONS__ $ERRFLAG -c conftest.c 2>&1`
6617#exit 1
6618:
6619
6620else
6621{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: failed" >&5
6622printf "%s\n" "failed" >&6; }
6623:
6624
6625fi
6626fi
6627
6628
6629
6630
6631# debug mode flags warnings
6632# Check whether --enable-checking was given.
6633if test ${enable_checking+y}
6634then :
6635  enableval=$enable_checking;
6636fi
6637
6638# Check whether --enable-debug was given.
6639if test ${enable_debug+y}
6640then :
6641  enableval=$enable_debug;
6642fi
6643
6644if test "$enable_debug" = "yes"; then debug_enabled="$enable_debug";
6645else debug_enabled="$enable_checking"; fi
6646
6647case "$debug_enabled" in
6648        yes)
6649
6650
6651{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -W" >&5
6652printf %s "checking whether $CC supports -W... " >&6; }
6653cache=`echo W | sed 'y%.=/+-%___p_%'`
6654if eval test \${cv_prog_cc_flag_$cache+y}
6655then :
6656  printf %s "(cached) " >&6
6657else case e in #(
6658  e)
6659echo 'void f(void){}' >conftest.c
6660if test -z "`$CC $CPPFLAGS $CFLAGS -W -c conftest.c 2>&1`"; then
6661eval "cv_prog_cc_flag_$cache=yes"
6662else
6663eval "cv_prog_cc_flag_$cache=no"
6664fi
6665rm -f conftest conftest.o conftest.c
6666 ;;
6667esac
6668fi
6669
6670if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
6671{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6672printf "%s\n" "yes" >&6; }
6673:
6674CFLAGS="$CFLAGS -W"
6675else
6676{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6677printf "%s\n" "no" >&6; }
6678:
6679
6680fi
6681
6682
6683
6684{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wall" >&5
6685printf %s "checking whether $CC supports -Wall... " >&6; }
6686cache=`echo Wall | sed 'y%.=/+-%___p_%'`
6687if eval test \${cv_prog_cc_flag_$cache+y}
6688then :
6689  printf %s "(cached) " >&6
6690else case e in #(
6691  e)
6692echo 'void f(void){}' >conftest.c
6693if test -z "`$CC $CPPFLAGS $CFLAGS -Wall -c conftest.c 2>&1`"; then
6694eval "cv_prog_cc_flag_$cache=yes"
6695else
6696eval "cv_prog_cc_flag_$cache=no"
6697fi
6698rm -f conftest conftest.o conftest.c
6699 ;;
6700esac
6701fi
6702
6703if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
6704{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6705printf "%s\n" "yes" >&6; }
6706:
6707CFLAGS="$CFLAGS -Wall"
6708else
6709{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6710printf "%s\n" "no" >&6; }
6711:
6712
6713fi
6714
6715
6716
6717{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wextra" >&5
6718printf %s "checking whether $CC supports -Wextra... " >&6; }
6719cache=`echo Wextra | sed 'y%.=/+-%___p_%'`
6720if eval test \${cv_prog_cc_flag_$cache+y}
6721then :
6722  printf %s "(cached) " >&6
6723else case e in #(
6724  e)
6725echo 'void f(void){}' >conftest.c
6726if test -z "`$CC $CPPFLAGS $CFLAGS -Wextra -c conftest.c 2>&1`"; then
6727eval "cv_prog_cc_flag_$cache=yes"
6728else
6729eval "cv_prog_cc_flag_$cache=no"
6730fi
6731rm -f conftest conftest.o conftest.c
6732 ;;
6733esac
6734fi
6735
6736if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
6737{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6738printf "%s\n" "yes" >&6; }
6739:
6740CFLAGS="$CFLAGS -Wextra"
6741else
6742{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6743printf "%s\n" "no" >&6; }
6744:
6745
6746fi
6747
6748
6749
6750{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wdeclaration-after-statement" >&5
6751printf %s "checking whether $CC supports -Wdeclaration-after-statement... " >&6; }
6752cache=`echo Wdeclaration-after-statement | sed 'y%.=/+-%___p_%'`
6753if eval test \${cv_prog_cc_flag_$cache+y}
6754then :
6755  printf %s "(cached) " >&6
6756else case e in #(
6757  e)
6758echo 'void f(void){}' >conftest.c
6759if test -z "`$CC $CPPFLAGS $CFLAGS -Wdeclaration-after-statement -c conftest.c 2>&1`"; then
6760eval "cv_prog_cc_flag_$cache=yes"
6761else
6762eval "cv_prog_cc_flag_$cache=no"
6763fi
6764rm -f conftest conftest.o conftest.c
6765 ;;
6766esac
6767fi
6768
6769if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
6770{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6771printf "%s\n" "yes" >&6; }
6772:
6773CFLAGS="$CFLAGS -Wdeclaration-after-statement"
6774else
6775{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6776printf "%s\n" "no" >&6; }
6777:
6778
6779fi
6780
6781
6782printf "%s\n" "#define UNBOUND_DEBUG /**/" >>confdefs.h
6783
6784		;;
6785	no|*)
6786		# nothing to do.
6787		;;
6788esac
6789if test "$default_cflags" = "yes"; then
6790	# only when CFLAGS was "" at the start, if the users wants to
6791	# override we shouldn't add default cflags, because they wouldn't
6792	# be able to turn off these options and set the CFLAGS wanted.
6793
6794    # Check whether --enable-flto was given.
6795if test ${enable_flto+y}
6796then :
6797  enableval=$enable_flto;
6798fi
6799
6800    if test "x$enable_flto" != "xno"
6801then :
6802
6803        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -flto" >&5
6804printf %s "checking if $CC supports -flto... " >&6; }
6805        BAKCFLAGS="$CFLAGS"
6806        CFLAGS="$CFLAGS -flto"
6807        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6808/* end confdefs.h.  */
6809
6810int
6811main (void)
6812{
6813
6814  ;
6815  return 0;
6816}
6817_ACEOF
6818if ac_fn_c_try_link "$LINENO"
6819then :
6820
6821            if $CC $CFLAGS -o conftest conftest.c 2>&1 | $GREP -e "warning: no debug symbols in executable" -e "warning: object" >/dev/null; then
6822                CFLAGS="$BAKCFLAGS"
6823                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6824printf "%s\n" "no" >&6; }
6825            else
6826                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6827printf "%s\n" "yes" >&6; }
6828            fi
6829            rm -f conftest conftest.c conftest.o
6830
6831else case e in #(
6832  e) CFLAGS="$BAKCFLAGS" ; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6833printf "%s\n" "no" >&6; } ;;
6834esac
6835fi
6836rm -f core conftest.err conftest.$ac_objext conftest.beam \
6837    conftest$ac_exeext conftest.$ac_ext
6838
6839fi
6840
6841
6842    # Check whether --enable-pie was given.
6843if test ${enable_pie+y}
6844then :
6845  enableval=$enable_pie;
6846fi
6847
6848    if test "x$enable_pie" = "xyes"
6849then :
6850
6851	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports PIE" >&5
6852printf %s "checking if $CC supports PIE... " >&6; }
6853	BAKLDFLAGS="$LDFLAGS"
6854	BAKCFLAGS="$CFLAGS"
6855	LDFLAGS="$LDFLAGS -pie"
6856	CFLAGS="$CFLAGS -fPIE"
6857	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6858/* end confdefs.h.  */
6859
6860int
6861main (void)
6862{
6863
6864  ;
6865  return 0;
6866}
6867_ACEOF
6868if ac_fn_c_try_link "$LINENO"
6869then :
6870
6871	    if $CC $CFLAGS $LDFLAGS -o conftest conftest.c 2>&1 | grep "warning: no debug symbols in executable" >/dev/null; then
6872		LDFLAGS="$BAKLDFLAGS"
6873		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6874printf "%s\n" "no" >&6; }
6875	    else
6876		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6877printf "%s\n" "yes" >&6; }
6878	    fi
6879	    rm -f conftest conftest.c conftest.o
6880
6881else case e in #(
6882  e) LDFLAGS="$BAKLDFLAGS" ; CFLAGS="$BAKCFLAGS" ; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6883printf "%s\n" "no" >&6; } ;;
6884esac
6885fi
6886rm -f core conftest.err conftest.$ac_objext conftest.beam \
6887    conftest$ac_exeext conftest.$ac_ext
6888
6889fi
6890
6891
6892    # Check whether --enable-relro_now was given.
6893if test ${enable_relro_now+y}
6894then :
6895  enableval=$enable_relro_now;
6896fi
6897
6898    if test "x$enable_relro_now" = "xyes"
6899then :
6900
6901	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wl,-z,relro,-z,now" >&5
6902printf %s "checking if $CC supports -Wl,-z,relro,-z,now... " >&6; }
6903	BAKLDFLAGS="$LDFLAGS"
6904	LDFLAGS="$LDFLAGS -Wl,-z,relro,-z,now"
6905	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6906/* end confdefs.h.  */
6907
6908int
6909main (void)
6910{
6911
6912  ;
6913  return 0;
6914}
6915_ACEOF
6916if ac_fn_c_try_link "$LINENO"
6917then :
6918
6919	    if $CC $CFLAGS $LDFLAGS -o conftest conftest.c 2>&1 | grep "warning: no debug symbols in executable" >/dev/null; then
6920		LDFLAGS="$BAKLDFLAGS"
6921		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6922printf "%s\n" "no" >&6; }
6923	    else
6924		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6925printf "%s\n" "yes" >&6; }
6926	    fi
6927	    rm -f conftest conftest.c conftest.o
6928
6929else case e in #(
6930  e) LDFLAGS="$BAKLDFLAGS" ; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6931printf "%s\n" "no" >&6; } ;;
6932esac
6933fi
6934rm -f core conftest.err conftest.$ac_objext conftest.beam \
6935    conftest$ac_exeext conftest.$ac_ext
6936
6937fi
6938
6939fi
6940
6941{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
6942printf %s "checking for inline... " >&6; }
6943if test ${ac_cv_c_inline+y}
6944then :
6945  printf %s "(cached) " >&6
6946else case e in #(
6947  e) ac_cv_c_inline=no
6948for ac_kw in inline __inline__ __inline; do
6949  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6950/* end confdefs.h.  */
6951#ifndef __cplusplus
6952typedef int foo_t;
6953static $ac_kw foo_t static_foo (void) {return 0; }
6954$ac_kw foo_t foo (void) {return 0; }
6955#endif
6956
6957_ACEOF
6958if ac_fn_c_try_compile "$LINENO"
6959then :
6960  ac_cv_c_inline=$ac_kw
6961fi
6962rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
6963  test "$ac_cv_c_inline" != no && break
6964done
6965 ;;
6966esac
6967fi
6968{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
6969printf "%s\n" "$ac_cv_c_inline" >&6; }
6970
6971case $ac_cv_c_inline in
6972  inline | yes) ;;
6973  *)
6974    case $ac_cv_c_inline in
6975      no) ac_val=;;
6976      *) ac_val=$ac_cv_c_inline;;
6977    esac
6978    cat >>confdefs.h <<_ACEOF
6979#ifndef __cplusplus
6980#define inline $ac_val
6981#endif
6982_ACEOF
6983    ;;
6984esac
6985
6986
6987{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler (${CC-cc}) accepts the \"format\" attribute" >&5
6988printf %s "checking whether the C compiler (${CC-cc}) accepts the \"format\" attribute... " >&6; }
6989if test ${ac_cv_c_format_attribute+y}
6990then :
6991  printf %s "(cached) " >&6
6992else case e in #(
6993  e) ac_cv_c_format_attribute=no
6994cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6995/* end confdefs.h.  */
6996#include <stdio.h>
6997void f (char *format, ...) __attribute__ ((format (printf, 1, 2)));
6998void (*pf) (char *format, ...) __attribute__ ((format (printf, 1, 2)));
6999
7000int
7001main (void)
7002{
7003
7004   f ("%s", "str");
7005
7006  ;
7007  return 0;
7008}
7009_ACEOF
7010if ac_fn_c_try_compile "$LINENO"
7011then :
7012  ac_cv_c_format_attribute="yes"
7013else case e in #(
7014  e) ac_cv_c_format_attribute="no" ;;
7015esac
7016fi
7017rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
7018 ;;
7019esac
7020fi
7021
7022
7023{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_format_attribute" >&5
7024printf "%s\n" "$ac_cv_c_format_attribute" >&6; }
7025if test $ac_cv_c_format_attribute = yes; then
7026
7027printf "%s\n" "#define HAVE_ATTR_FORMAT 1" >>confdefs.h
7028
7029fi
7030
7031
7032{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler (${CC-cc}) accepts the \"unused\" attribute" >&5
7033printf %s "checking whether the C compiler (${CC-cc}) accepts the \"unused\" attribute... " >&6; }
7034if test ${ac_cv_c_unused_attribute+y}
7035then :
7036  printf %s "(cached) " >&6
7037else case e in #(
7038  e) ac_cv_c_unused_attribute=no
7039cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7040/* end confdefs.h.  */
7041#include <stdio.h>
7042void f (char *u __attribute__((unused)));
7043
7044int
7045main (void)
7046{
7047
7048   f ("x");
7049
7050  ;
7051  return 0;
7052}
7053_ACEOF
7054if ac_fn_c_try_compile "$LINENO"
7055then :
7056  ac_cv_c_unused_attribute="yes"
7057else case e in #(
7058  e) ac_cv_c_unused_attribute="no" ;;
7059esac
7060fi
7061rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
7062 ;;
7063esac
7064fi
7065
7066
7067
7068
7069{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_unused_attribute" >&5
7070printf "%s\n" "$ac_cv_c_unused_attribute" >&6; }
7071if test $ac_cv_c_unused_attribute = yes; then
7072
7073printf "%s\n" "#define HAVE_ATTR_UNUSED 1" >>confdefs.h
7074
7075fi
7076
7077
7078
7079
7080{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler (${CC-cc}) accepts the \"weak\" attribute" >&5
7081printf %s "checking whether the C compiler (${CC-cc}) accepts the \"weak\" attribute... " >&6; }
7082if test ${ac_cv_c_weak_attribute+y}
7083then :
7084  printf %s "(cached) " >&6
7085else case e in #(
7086  e) ac_cv_c_weak_attribute=no
7087cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7088/* end confdefs.h.  */
7089 #include <stdio.h>
7090__attribute__((weak)) void f(int x) { printf("%d", x); }
7091
7092int
7093main (void)
7094{
7095
7096   f(1);
7097
7098  ;
7099  return 0;
7100}
7101_ACEOF
7102if ac_fn_c_try_compile "$LINENO"
7103then :
7104  ac_cv_c_weak_attribute="yes"
7105else case e in #(
7106  e) ac_cv_c_weak_attribute="no" ;;
7107esac
7108fi
7109rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
7110 ;;
7111esac
7112fi
7113
7114
7115{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_weak_attribute" >&5
7116printf "%s\n" "$ac_cv_c_weak_attribute" >&6; }
7117if test $ac_cv_c_weak_attribute = yes; then
7118
7119printf "%s\n" "#define HAVE_ATTR_WEAK 1" >>confdefs.h
7120
7121
7122printf "%s\n" "#define ATTR_WEAK __attribute__((weak))" >>confdefs.h
7123
7124else
7125
7126printf "%s\n" "#define ATTR_WEAK /**/" >>confdefs.h
7127
7128fi
7129
7130
7131
7132
7133{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler (${CC-cc}) accepts the \"noreturn\" attribute" >&5
7134printf %s "checking whether the C compiler (${CC-cc}) accepts the \"noreturn\" attribute... " >&6; }
7135if test ${ac_cv_c_noreturn_attribute+y}
7136then :
7137  printf %s "(cached) " >&6
7138else case e in #(
7139  e) ac_cv_c_noreturn_attribute=no
7140cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7141/* end confdefs.h.  */
7142 #include <stdio.h>
7143__attribute__((noreturn)) void f(int x) { printf("%d", x); }
7144
7145int
7146main (void)
7147{
7148
7149   f(1);
7150
7151  ;
7152  return 0;
7153}
7154_ACEOF
7155if ac_fn_c_try_compile "$LINENO"
7156then :
7157  ac_cv_c_noreturn_attribute="yes"
7158else case e in #(
7159  e) ac_cv_c_noreturn_attribute="no" ;;
7160esac
7161fi
7162rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
7163 ;;
7164esac
7165fi
7166
7167
7168{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_noreturn_attribute" >&5
7169printf "%s\n" "$ac_cv_c_noreturn_attribute" >&6; }
7170if test $ac_cv_c_noreturn_attribute = yes; then
7171
7172printf "%s\n" "#define HAVE_ATTR_NORETURN 1" >>confdefs.h
7173
7174
7175printf "%s\n" "#define ATTR_NORETURN __attribute__((__noreturn__))" >>confdefs.h
7176
7177else
7178
7179printf "%s\n" "#define ATTR_NORETURN /**/" >>confdefs.h
7180
7181fi
7182
7183
7184
7185
7186{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler (${CC-cc}) accepts the \"fallthrough\" attribute" >&5
7187printf %s "checking whether the C compiler (${CC-cc}) accepts the \"fallthrough\" attribute... " >&6; }
7188BAKCFLAGS="$CFLAGS"
7189CFLAGS="$CFLAGS -Werror"
7190if test ${ac_cv_c_fallthrough_attribute+y}
7191then :
7192  printf %s "(cached) " >&6
7193else case e in #(
7194  e) ac_cv_c_fallthrough_attribute=no
7195cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7196/* end confdefs.h.  */
7197 #include <stdio.h>
7198void f(int x) {
7199	int y = 0;
7200	switch(x) {
7201	case 1:
7202		y = 1;
7203		__attribute__((fallthrough));
7204		/* fallthrough */
7205	case 2:
7206		y++;
7207		break;
7208	case 3:
7209		y = 3;
7210		break;
7211	}
7212	printf("%d", y);
7213}
7214
7215int
7216main (void)
7217{
7218
7219   f(1);
7220
7221  ;
7222  return 0;
7223}
7224_ACEOF
7225if ac_fn_c_try_compile "$LINENO"
7226then :
7227  ac_cv_c_fallthrough_attribute="yes"
7228else case e in #(
7229  e) ac_cv_c_fallthrough_attribute="no" ;;
7230esac
7231fi
7232rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
7233 ;;
7234esac
7235fi
7236
7237CFLAGS="$BAKCFLAGS"
7238
7239{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_fallthrough_attribute" >&5
7240printf "%s\n" "$ac_cv_c_fallthrough_attribute" >&6; }
7241if test $ac_cv_c_fallthrough_attribute = yes; then
7242
7243printf "%s\n" "#define HAVE_ATTR_FALLTHROUGH 1" >>confdefs.h
7244
7245
7246printf "%s\n" "#define ATTR_FALLTHROUGH __attribute__((fallthrough));" >>confdefs.h
7247
7248else
7249
7250printf "%s\n" "#define ATTR_FALLTHROUGH /**/" >>confdefs.h
7251
7252fi
7253
7254
7255if test "$srcdir" != "."; then
7256	CPPFLAGS="$CPPFLAGS -I$srcdir"
7257fi
7258
7259
7260
7261
7262
7263for ac_prog in flex lex
7264do
7265  # Extract the first word of "$ac_prog", so it can be a program name with args.
7266set dummy $ac_prog; ac_word=$2
7267{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7268printf %s "checking for $ac_word... " >&6; }
7269if test ${ac_cv_prog_LEX+y}
7270then :
7271  printf %s "(cached) " >&6
7272else case e in #(
7273  e) if test -n "$LEX"; then
7274  ac_cv_prog_LEX="$LEX" # Let the user override the test.
7275else
7276as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7277for as_dir in $PATH
7278do
7279  IFS=$as_save_IFS
7280  case $as_dir in #(((
7281    '') as_dir=./ ;;
7282    */) ;;
7283    *) as_dir=$as_dir/ ;;
7284  esac
7285    for ac_exec_ext in '' $ac_executable_extensions; do
7286  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
7287    ac_cv_prog_LEX="$ac_prog"
7288    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
7289    break 2
7290  fi
7291done
7292  done
7293IFS=$as_save_IFS
7294
7295fi ;;
7296esac
7297fi
7298LEX=$ac_cv_prog_LEX
7299if test -n "$LEX"; then
7300  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LEX" >&5
7301printf "%s\n" "$LEX" >&6; }
7302else
7303  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7304printf "%s\n" "no" >&6; }
7305fi
7306
7307
7308  test -n "$LEX" && break
7309done
7310test -n "$LEX" || LEX=":"
7311
7312  if test "x$LEX" != "x:"; then
7313    cat >conftest.l <<_ACEOF
7314%{
7315#ifdef __cplusplus
7316extern "C"
7317#endif
7318int yywrap(void);
7319%}
7320%%
7321a { ECHO; }
7322b { REJECT; }
7323c { yymore (); }
7324d { yyless (1); }
7325e { /* IRIX 6.5 flex 2.5.4 underquotes its yyless argument.  */
7326#ifdef __cplusplus
7327    yyless ((yyinput () != 0));
7328#else
7329    yyless ((input () != 0));
7330#endif
7331  }
7332f { unput (yytext[0]); }
7333. { BEGIN INITIAL; }
7334%%
7335#ifdef YYTEXT_POINTER
7336extern char *yytext;
7337#endif
7338int
7339yywrap (void)
7340{
7341  return 1;
7342}
7343int
7344main (void)
7345{
7346  return ! yylex ();
7347}
7348_ACEOF
7349{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for lex output file root" >&5
7350printf %s "checking for lex output file root... " >&6; }
7351if test ${ac_cv_prog_lex_root+y}
7352then :
7353  printf %s "(cached) " >&6
7354else case e in #(
7355  e)
7356ac_cv_prog_lex_root=unknown
7357{ { ac_try="$LEX conftest.l"
7358case "(($ac_try" in
7359  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7360  *) ac_try_echo=$ac_try;;
7361esac
7362eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
7363printf "%s\n" "$ac_try_echo"; } >&5
7364  (eval "$LEX conftest.l") 2>&5
7365  ac_status=$?
7366  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7367  test $ac_status = 0; } &&
7368if test -f lex.yy.c; then
7369  ac_cv_prog_lex_root=lex.yy
7370elif test -f lexyy.c; then
7371  ac_cv_prog_lex_root=lexyy
7372fi ;;
7373esac
7374fi
7375{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_lex_root" >&5
7376printf "%s\n" "$ac_cv_prog_lex_root" >&6; }
7377if test "$ac_cv_prog_lex_root" = unknown
7378then :
7379  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cannot find output from $LEX; giving up on $LEX" >&5
7380printf "%s\n" "$as_me: WARNING: cannot find output from $LEX; giving up on $LEX" >&2;}
7381   LEX=: LEXLIB=
7382fi
7383LEX_OUTPUT_ROOT=$ac_cv_prog_lex_root
7384
7385if test ${LEXLIB+y}
7386then :
7387
7388else case e in #(
7389  e)
7390  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for lex library" >&5
7391printf %s "checking for lex library... " >&6; }
7392if test ${ac_cv_lib_lex+y}
7393then :
7394  printf %s "(cached) " >&6
7395else case e in #(
7396  e)
7397    ac_save_LIBS="$LIBS"
7398    ac_found=false
7399    for ac_cv_lib_lex in 'none needed' -lfl -ll 'not found'; do
7400      case $ac_cv_lib_lex in #(
7401  'none needed') :
7402     ;; #(
7403  'not found') :
7404    break ;; #(
7405  *) :
7406    LIBS="$ac_cv_lib_lex $ac_save_LIBS" ;; #(
7407  *) :
7408     ;;
7409esac
7410
7411      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7412/* end confdefs.h.  */
7413`cat $LEX_OUTPUT_ROOT.c`
7414_ACEOF
7415if ac_fn_c_try_link "$LINENO"
7416then :
7417  ac_found=:
7418fi
7419rm -f core conftest.err conftest.$ac_objext conftest.beam \
7420    conftest$ac_exeext conftest.$ac_ext
7421      if $ac_found; then
7422        break
7423      fi
7424    done
7425    LIBS="$ac_save_LIBS"
7426   ;;
7427esac
7428fi
7429{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_lex" >&5
7430printf "%s\n" "$ac_cv_lib_lex" >&6; }
7431  if test "$ac_cv_lib_lex" = 'not found'
7432then :
7433  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: required lex library not found; giving up on $LEX" >&5
7434printf "%s\n" "$as_me: WARNING: required lex library not found; giving up on $LEX" >&2;}
7435	 LEX=: LEXLIB=
7436elif test "$ac_cv_lib_lex" = 'none needed'
7437then :
7438  LEXLIB=''
7439else case e in #(
7440  e) LEXLIB=$ac_cv_lib_lex ;;
7441esac
7442fi
7443   ;;
7444esac
7445fi
7446
7447
7448if test "$LEX" != :
7449then :
7450
7451{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether yytext is a pointer" >&5
7452printf %s "checking whether yytext is a pointer... " >&6; }
7453if test ${ac_cv_prog_lex_yytext_pointer+y}
7454then :
7455  printf %s "(cached) " >&6
7456else case e in #(
7457  e) # POSIX says lex can declare yytext either as a pointer or an array; the
7458# default is implementation-dependent.  Figure out which it is, since
7459# not all implementations provide the %pointer and %array declarations.
7460ac_cv_prog_lex_yytext_pointer=no
7461cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7462/* end confdefs.h.  */
7463
7464  #define YYTEXT_POINTER 1
7465`cat $LEX_OUTPUT_ROOT.c`
7466_ACEOF
7467if ac_fn_c_try_compile "$LINENO"
7468then :
7469  ac_cv_prog_lex_yytext_pointer=yes
7470fi
7471rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
7472 ;;
7473esac
7474fi
7475{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_lex_yytext_pointer" >&5
7476printf "%s\n" "$ac_cv_prog_lex_yytext_pointer" >&6; }
7477if test $ac_cv_prog_lex_yytext_pointer = yes; then
7478
7479printf "%s\n" "#define YYTEXT_POINTER 1" >>confdefs.h
7480
7481fi
7482
7483fi
7484rm -f conftest.l $LEX_OUTPUT_ROOT.c
7485
7486fi
7487if test "$LEX" != "" -a "$LEX" != ":"; then
7488
7489	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for yylex_destroy" >&5
7490printf %s "checking for yylex_destroy... " >&6; }
7491	if echo %% | $LEX -t 2>&1 | grep yylex_destroy >/dev/null 2>&1; then
7492
7493printf "%s\n" "#define LEX_HAS_YYLEX_DESTROY 1" >>confdefs.h
7494
7495		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7496printf "%s\n" "yes" >&6; }
7497	else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7498printf "%s\n" "no" >&6; };
7499		LEX=":"
7500	fi
7501
7502fi
7503if test "$LEX" != "" -a "$LEX" != ":"; then
7504
7505	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for lex %option" >&5
7506printf %s "checking for lex %option... " >&6; }
7507	if cat <<EOF | $LEX -t 2>&1 | grep yy_delete_buffer >/dev/null 2>&1; then
7508%option nounput
7509%%
7510EOF
7511		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7512printf "%s\n" "yes" >&6; }
7513	else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7514printf "%s\n" "no" >&6; };
7515		LEX=":"
7516	fi
7517
7518fi
7519if test "$LEX" = "" -o "$LEX" = ":"; then
7520	if test ! -f util/configlexer.c; then
7521		as_fn_error $? "no lex and no util/configlexer.c: need flex and bison to compile from source repository." "$LINENO" 5
7522	fi
7523fi
7524for ac_prog in 'bison -y' byacc
7525do
7526  # Extract the first word of "$ac_prog", so it can be a program name with args.
7527set dummy $ac_prog; ac_word=$2
7528{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7529printf %s "checking for $ac_word... " >&6; }
7530if test ${ac_cv_prog_YACC+y}
7531then :
7532  printf %s "(cached) " >&6
7533else case e in #(
7534  e) if test -n "$YACC"; then
7535  ac_cv_prog_YACC="$YACC" # Let the user override the test.
7536else
7537as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7538for as_dir in $PATH
7539do
7540  IFS=$as_save_IFS
7541  case $as_dir in #(((
7542    '') as_dir=./ ;;
7543    */) ;;
7544    *) as_dir=$as_dir/ ;;
7545  esac
7546    for ac_exec_ext in '' $ac_executable_extensions; do
7547  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
7548    ac_cv_prog_YACC="$ac_prog"
7549    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
7550    break 2
7551  fi
7552done
7553  done
7554IFS=$as_save_IFS
7555
7556fi ;;
7557esac
7558fi
7559YACC=$ac_cv_prog_YACC
7560if test -n "$YACC"; then
7561  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $YACC" >&5
7562printf "%s\n" "$YACC" >&6; }
7563else
7564  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7565printf "%s\n" "no" >&6; }
7566fi
7567
7568
7569  test -n "$YACC" && break
7570done
7571test -n "$YACC" || YACC="yacc"
7572
7573if test "$YACC" = "" -o "$YACC" = ":"; then
7574	if test ! -f util/configparser.c; then
7575		as_fn_error $? "no yacc and no util/configparser.c: need flex and bison to compile from source repository." "$LINENO" 5
7576	fi
7577fi
7578# Extract the first word of "doxygen", so it can be a program name with args.
7579set dummy doxygen; ac_word=$2
7580{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7581printf %s "checking for $ac_word... " >&6; }
7582if test ${ac_cv_prog_doxygen+y}
7583then :
7584  printf %s "(cached) " >&6
7585else case e in #(
7586  e) if test -n "$doxygen"; then
7587  ac_cv_prog_doxygen="$doxygen" # Let the user override the test.
7588else
7589as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7590for as_dir in $PATH
7591do
7592  IFS=$as_save_IFS
7593  case $as_dir in #(((
7594    '') as_dir=./ ;;
7595    */) ;;
7596    *) as_dir=$as_dir/ ;;
7597  esac
7598    for ac_exec_ext in '' $ac_executable_extensions; do
7599  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
7600    ac_cv_prog_doxygen="doxygen"
7601    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
7602    break 2
7603  fi
7604done
7605  done
7606IFS=$as_save_IFS
7607
7608fi ;;
7609esac
7610fi
7611doxygen=$ac_cv_prog_doxygen
7612if test -n "$doxygen"; then
7613  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $doxygen" >&5
7614printf "%s\n" "$doxygen" >&6; }
7615else
7616  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7617printf "%s\n" "no" >&6; }
7618fi
7619
7620
7621if test -n "$ac_tool_prefix"; then
7622  # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
7623set dummy ${ac_tool_prefix}strip; ac_word=$2
7624{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7625printf %s "checking for $ac_word... " >&6; }
7626if test ${ac_cv_prog_STRIP+y}
7627then :
7628  printf %s "(cached) " >&6
7629else case e in #(
7630  e) if test -n "$STRIP"; then
7631  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
7632else
7633as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7634for as_dir in $PATH
7635do
7636  IFS=$as_save_IFS
7637  case $as_dir in #(((
7638    '') as_dir=./ ;;
7639    */) ;;
7640    *) as_dir=$as_dir/ ;;
7641  esac
7642    for ac_exec_ext in '' $ac_executable_extensions; do
7643  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
7644    ac_cv_prog_STRIP="${ac_tool_prefix}strip"
7645    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
7646    break 2
7647  fi
7648done
7649  done
7650IFS=$as_save_IFS
7651
7652fi ;;
7653esac
7654fi
7655STRIP=$ac_cv_prog_STRIP
7656if test -n "$STRIP"; then
7657  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
7658printf "%s\n" "$STRIP" >&6; }
7659else
7660  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7661printf "%s\n" "no" >&6; }
7662fi
7663
7664
7665fi
7666if test -z "$ac_cv_prog_STRIP"; then
7667  ac_ct_STRIP=$STRIP
7668  # Extract the first word of "strip", so it can be a program name with args.
7669set dummy strip; ac_word=$2
7670{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7671printf %s "checking for $ac_word... " >&6; }
7672if test ${ac_cv_prog_ac_ct_STRIP+y}
7673then :
7674  printf %s "(cached) " >&6
7675else case e in #(
7676  e) if test -n "$ac_ct_STRIP"; then
7677  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
7678else
7679as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7680for as_dir in $PATH
7681do
7682  IFS=$as_save_IFS
7683  case $as_dir in #(((
7684    '') as_dir=./ ;;
7685    */) ;;
7686    *) as_dir=$as_dir/ ;;
7687  esac
7688    for ac_exec_ext in '' $ac_executable_extensions; do
7689  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
7690    ac_cv_prog_ac_ct_STRIP="strip"
7691    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
7692    break 2
7693  fi
7694done
7695  done
7696IFS=$as_save_IFS
7697
7698fi ;;
7699esac
7700fi
7701ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
7702if test -n "$ac_ct_STRIP"; then
7703  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
7704printf "%s\n" "$ac_ct_STRIP" >&6; }
7705else
7706  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7707printf "%s\n" "no" >&6; }
7708fi
7709
7710  if test "x$ac_ct_STRIP" = x; then
7711    STRIP=""
7712  else
7713    case $cross_compiling:$ac_tool_warned in
7714yes:)
7715{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7716printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7717ac_tool_warned=yes ;;
7718esac
7719    STRIP=$ac_ct_STRIP
7720  fi
7721else
7722  STRIP="$ac_cv_prog_STRIP"
7723fi
7724
7725
7726
7727
7728  # Make sure we can run config.sub.
7729$SHELL "${ac_aux_dir}config.sub" sun4 >/dev/null 2>&1 ||
7730  as_fn_error $? "cannot run $SHELL ${ac_aux_dir}config.sub" "$LINENO" 5
7731
7732{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
7733printf %s "checking build system type... " >&6; }
7734if test ${ac_cv_build+y}
7735then :
7736  printf %s "(cached) " >&6
7737else case e in #(
7738  e) ac_build_alias=$build_alias
7739test "x$ac_build_alias" = x &&
7740  ac_build_alias=`$SHELL "${ac_aux_dir}config.guess"`
7741test "x$ac_build_alias" = x &&
7742  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
7743ac_cv_build=`$SHELL "${ac_aux_dir}config.sub" $ac_build_alias` ||
7744  as_fn_error $? "$SHELL ${ac_aux_dir}config.sub $ac_build_alias failed" "$LINENO" 5
7745 ;;
7746esac
7747fi
7748{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
7749printf "%s\n" "$ac_cv_build" >&6; }
7750case $ac_cv_build in
7751*-*-*) ;;
7752*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
7753esac
7754build=$ac_cv_build
7755ac_save_IFS=$IFS; IFS='-'
7756set x $ac_cv_build
7757shift
7758build_cpu=$1
7759build_vendor=$2
7760shift; shift
7761# Remember, the first character of IFS is used to create $*,
7762# except with old shells:
7763build_os=$*
7764IFS=$ac_save_IFS
7765case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
7766
7767
7768{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
7769printf %s "checking host system type... " >&6; }
7770if test ${ac_cv_host+y}
7771then :
7772  printf %s "(cached) " >&6
7773else case e in #(
7774  e) if test "x$host_alias" = x; then
7775  ac_cv_host=$ac_cv_build
7776else
7777  ac_cv_host=`$SHELL "${ac_aux_dir}config.sub" $host_alias` ||
7778    as_fn_error $? "$SHELL ${ac_aux_dir}config.sub $host_alias failed" "$LINENO" 5
7779fi
7780 ;;
7781esac
7782fi
7783{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
7784printf "%s\n" "$ac_cv_host" >&6; }
7785case $ac_cv_host in
7786*-*-*) ;;
7787*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
7788esac
7789host=$ac_cv_host
7790ac_save_IFS=$IFS; IFS='-'
7791set x $ac_cv_host
7792shift
7793host_cpu=$1
7794host_vendor=$2
7795shift; shift
7796# Remember, the first character of IFS is used to create $*,
7797# except with old shells:
7798host_os=$*
7799IFS=$ac_save_IFS
7800case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
7801
7802
7803
7804# skip these tests, we do not need them.
7805
7806
7807
7808
7809
7810
7811
7812
7813# always use ./libtool unless override from commandline (libtool=mylibtool)
7814if test -z "$libtool"; then
7815	libtool="./libtool"
7816fi
7817
7818# avoid libtool max commandline length test on systems that fork slowly.
7819
7820if echo "$host_os" | grep "sunos4" >/dev/null; then
7821	lt_cv_sys_max_cmd_len=32750;
7822fi
7823if test -n "$ac_tool_prefix"; then
7824  # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
7825set dummy ${ac_tool_prefix}ar; ac_word=$2
7826{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7827printf %s "checking for $ac_word... " >&6; }
7828if test ${ac_cv_path_AR+y}
7829then :
7830  printf %s "(cached) " >&6
7831else case e in #(
7832  e) case $AR in
7833  [\\/]* | ?:[\\/]*)
7834  ac_cv_path_AR="$AR" # Let the user override the test with a path.
7835  ;;
7836  *)
7837  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7838for as_dir in $PATH
7839do
7840  IFS=$as_save_IFS
7841  case $as_dir in #(((
7842    '') as_dir=./ ;;
7843    */) ;;
7844    *) as_dir=$as_dir/ ;;
7845  esac
7846    for ac_exec_ext in '' $ac_executable_extensions; do
7847  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
7848    ac_cv_path_AR="$as_dir$ac_word$ac_exec_ext"
7849    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
7850    break 2
7851  fi
7852done
7853  done
7854IFS=$as_save_IFS
7855
7856  ;;
7857esac ;;
7858esac
7859fi
7860AR=$ac_cv_path_AR
7861if test -n "$AR"; then
7862  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
7863printf "%s\n" "$AR" >&6; }
7864else
7865  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7866printf "%s\n" "no" >&6; }
7867fi
7868
7869
7870fi
7871if test -z "$ac_cv_path_AR"; then
7872  ac_pt_AR=$AR
7873  # Extract the first word of "ar", so it can be a program name with args.
7874set dummy ar; ac_word=$2
7875{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7876printf %s "checking for $ac_word... " >&6; }
7877if test ${ac_cv_path_ac_pt_AR+y}
7878then :
7879  printf %s "(cached) " >&6
7880else case e in #(
7881  e) case $ac_pt_AR in
7882  [\\/]* | ?:[\\/]*)
7883  ac_cv_path_ac_pt_AR="$ac_pt_AR" # Let the user override the test with a path.
7884  ;;
7885  *)
7886  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7887for as_dir in $PATH
7888do
7889  IFS=$as_save_IFS
7890  case $as_dir in #(((
7891    '') as_dir=./ ;;
7892    */) ;;
7893    *) as_dir=$as_dir/ ;;
7894  esac
7895    for ac_exec_ext in '' $ac_executable_extensions; do
7896  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
7897    ac_cv_path_ac_pt_AR="$as_dir$ac_word$ac_exec_ext"
7898    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
7899    break 2
7900  fi
7901done
7902  done
7903IFS=$as_save_IFS
7904
7905  ;;
7906esac ;;
7907esac
7908fi
7909ac_pt_AR=$ac_cv_path_ac_pt_AR
7910if test -n "$ac_pt_AR"; then
7911  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_pt_AR" >&5
7912printf "%s\n" "$ac_pt_AR" >&6; }
7913else
7914  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7915printf "%s\n" "no" >&6; }
7916fi
7917
7918  if test "x$ac_pt_AR" = x; then
7919    AR="false"
7920  else
7921    case $cross_compiling:$ac_tool_warned in
7922yes:)
7923{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7924printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7925ac_tool_warned=yes ;;
7926esac
7927    AR=$ac_pt_AR
7928  fi
7929else
7930  AR="$ac_cv_path_AR"
7931fi
7932
7933if test $AR = false; then
7934	as_fn_error $? "Cannot find 'ar', please extend PATH to include it" "$LINENO" 5
7935fi
7936
7937
7938case `pwd` in
7939  *\ * | *\	*)
7940    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5
7941printf "%s\n" "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;;
7942esac
7943
7944
7945
7946macro_version='2.4.6'
7947macro_revision='2.4.6'
7948
7949
7950
7951
7952
7953
7954
7955
7956
7957
7958
7959
7960
7961
7962ltmain=$ac_aux_dir/ltmain.sh
7963
7964# Backslashify metacharacters that are still active within
7965# double-quoted strings.
7966sed_quote_subst='s/\(["`$\\]\)/\\\1/g'
7967
7968# Same as above, but do not quote variable references.
7969double_quote_subst='s/\(["`\\]\)/\\\1/g'
7970
7971# Sed substitution to delay expansion of an escaped shell variable in a
7972# double_quote_subst'ed string.
7973delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
7974
7975# Sed substitution to delay expansion of an escaped single quote.
7976delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
7977
7978# Sed substitution to avoid accidental globbing in evaled expressions
7979no_glob_subst='s/\*/\\\*/g'
7980
7981ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
7982ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
7983ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
7984
7985{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5
7986printf %s "checking how to print strings... " >&6; }
7987# Test print first, because it will be a builtin if present.
7988if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \
7989   test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
7990  ECHO='print -r --'
7991elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
7992  ECHO='printf %s\n'
7993else
7994  # Use this function as a fallback that always works.
7995  func_fallback_echo ()
7996  {
7997    eval 'cat <<_LTECHO_EOF
7998$1
7999_LTECHO_EOF'
8000  }
8001  ECHO='func_fallback_echo'
8002fi
8003
8004# func_echo_all arg...
8005# Invoke $ECHO with all args, space-separated.
8006func_echo_all ()
8007{
8008    $ECHO ""
8009}
8010
8011case $ECHO in
8012  printf*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: printf" >&5
8013printf "%s\n" "printf" >&6; } ;;
8014  print*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: print -r" >&5
8015printf "%s\n" "print -r" >&6; } ;;
8016  *) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: cat" >&5
8017printf "%s\n" "cat" >&6; } ;;
8018esac
8019
8020
8021
8022
8023
8024
8025
8026
8027
8028
8029
8030
8031
8032
8033{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
8034printf %s "checking for a sed that does not truncate output... " >&6; }
8035if test ${ac_cv_path_SED+y}
8036then :
8037  printf %s "(cached) " >&6
8038else case e in #(
8039  e)           ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
8040     for ac_i in 1 2 3 4 5 6 7; do
8041       ac_script="$ac_script$as_nl$ac_script"
8042     done
8043     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
8044     { ac_script=; unset ac_script;}
8045     if test -z "$SED"; then
8046  ac_path_SED_found=false
8047  # Loop through the user's path and test for each of PROGNAME-LIST
8048  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8049for as_dir in $PATH
8050do
8051  IFS=$as_save_IFS
8052  case $as_dir in #(((
8053    '') as_dir=./ ;;
8054    */) ;;
8055    *) as_dir=$as_dir/ ;;
8056  esac
8057    for ac_prog in sed gsed
8058   do
8059    for ac_exec_ext in '' $ac_executable_extensions; do
8060      ac_path_SED="$as_dir$ac_prog$ac_exec_ext"
8061      as_fn_executable_p "$ac_path_SED" || continue
8062# Check for GNU ac_path_SED and select it if it is found.
8063  # Check for GNU $ac_path_SED
8064case `"$ac_path_SED" --version 2>&1` in #(
8065*GNU*)
8066  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
8067#(
8068*)
8069  ac_count=0
8070  printf %s 0123456789 >"conftest.in"
8071  while :
8072  do
8073    cat "conftest.in" "conftest.in" >"conftest.tmp"
8074    mv "conftest.tmp" "conftest.in"
8075    cp "conftest.in" "conftest.nl"
8076    printf "%s\n" '' >> "conftest.nl"
8077    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
8078    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
8079    as_fn_arith $ac_count + 1 && ac_count=$as_val
8080    if test $ac_count -gt ${ac_path_SED_max-0}; then
8081      # Best one so far, save it but keep looking for a better one
8082      ac_cv_path_SED="$ac_path_SED"
8083      ac_path_SED_max=$ac_count
8084    fi
8085    # 10*(2^10) chars as input seems more than enough
8086    test $ac_count -gt 10 && break
8087  done
8088  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
8089esac
8090
8091      $ac_path_SED_found && break 3
8092    done
8093  done
8094  done
8095IFS=$as_save_IFS
8096  if test -z "$ac_cv_path_SED"; then
8097    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
8098  fi
8099else
8100  ac_cv_path_SED=$SED
8101fi
8102 ;;
8103esac
8104fi
8105{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
8106printf "%s\n" "$ac_cv_path_SED" >&6; }
8107 SED="$ac_cv_path_SED"
8108  rm -f conftest.sed
8109
8110test -z "$SED" && SED=sed
8111Xsed="$SED -e 1s/^X//"
8112
8113
8114
8115
8116
8117
8118
8119
8120
8121
8122
8123{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
8124printf %s "checking for egrep... " >&6; }
8125if test ${ac_cv_path_EGREP+y}
8126then :
8127  printf %s "(cached) " >&6
8128else case e in #(
8129  e) if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
8130   then ac_cv_path_EGREP="$GREP -E"
8131   else
8132     if test -z "$EGREP"; then
8133  ac_path_EGREP_found=false
8134  # Loop through the user's path and test for each of PROGNAME-LIST
8135  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8136for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
8137do
8138  IFS=$as_save_IFS
8139  case $as_dir in #(((
8140    '') as_dir=./ ;;
8141    */) ;;
8142    *) as_dir=$as_dir/ ;;
8143  esac
8144    for ac_prog in egrep
8145   do
8146    for ac_exec_ext in '' $ac_executable_extensions; do
8147      ac_path_EGREP="$as_dir$ac_prog$ac_exec_ext"
8148      as_fn_executable_p "$ac_path_EGREP" || continue
8149# Check for GNU ac_path_EGREP and select it if it is found.
8150  # Check for GNU $ac_path_EGREP
8151case `"$ac_path_EGREP" --version 2>&1` in #(
8152*GNU*)
8153  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
8154#(
8155*)
8156  ac_count=0
8157  printf %s 0123456789 >"conftest.in"
8158  while :
8159  do
8160    cat "conftest.in" "conftest.in" >"conftest.tmp"
8161    mv "conftest.tmp" "conftest.in"
8162    cp "conftest.in" "conftest.nl"
8163    printf "%s\n" 'EGREP' >> "conftest.nl"
8164    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
8165    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
8166    as_fn_arith $ac_count + 1 && ac_count=$as_val
8167    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
8168      # Best one so far, save it but keep looking for a better one
8169      ac_cv_path_EGREP="$ac_path_EGREP"
8170      ac_path_EGREP_max=$ac_count
8171    fi
8172    # 10*(2^10) chars as input seems more than enough
8173    test $ac_count -gt 10 && break
8174  done
8175  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
8176esac
8177
8178      $ac_path_EGREP_found && break 3
8179    done
8180  done
8181  done
8182IFS=$as_save_IFS
8183  if test -z "$ac_cv_path_EGREP"; then
8184    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
8185  fi
8186else
8187  ac_cv_path_EGREP=$EGREP
8188fi
8189
8190   fi ;;
8191esac
8192fi
8193{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
8194printf "%s\n" "$ac_cv_path_EGREP" >&6; }
8195 EGREP="$ac_cv_path_EGREP"
8196
8197         EGREP_TRADITIONAL=$EGREP
8198 ac_cv_path_EGREP_TRADITIONAL=$EGREP
8199
8200{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
8201printf %s "checking for fgrep... " >&6; }
8202if test ${ac_cv_path_FGREP+y}
8203then :
8204  printf %s "(cached) " >&6
8205else case e in #(
8206  e) if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
8207   then ac_cv_path_FGREP="$GREP -F"
8208   else
8209     if test -z "$FGREP"; then
8210  ac_path_FGREP_found=false
8211  # Loop through the user's path and test for each of PROGNAME-LIST
8212  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8213for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
8214do
8215  IFS=$as_save_IFS
8216  case $as_dir in #(((
8217    '') as_dir=./ ;;
8218    */) ;;
8219    *) as_dir=$as_dir/ ;;
8220  esac
8221    for ac_prog in fgrep
8222   do
8223    for ac_exec_ext in '' $ac_executable_extensions; do
8224      ac_path_FGREP="$as_dir$ac_prog$ac_exec_ext"
8225      as_fn_executable_p "$ac_path_FGREP" || continue
8226# Check for GNU ac_path_FGREP and select it if it is found.
8227  # Check for GNU $ac_path_FGREP
8228case `"$ac_path_FGREP" --version 2>&1` in #(
8229*GNU*)
8230  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
8231#(
8232*)
8233  ac_count=0
8234  printf %s 0123456789 >"conftest.in"
8235  while :
8236  do
8237    cat "conftest.in" "conftest.in" >"conftest.tmp"
8238    mv "conftest.tmp" "conftest.in"
8239    cp "conftest.in" "conftest.nl"
8240    printf "%s\n" 'FGREP' >> "conftest.nl"
8241    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
8242    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
8243    as_fn_arith $ac_count + 1 && ac_count=$as_val
8244    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
8245      # Best one so far, save it but keep looking for a better one
8246      ac_cv_path_FGREP="$ac_path_FGREP"
8247      ac_path_FGREP_max=$ac_count
8248    fi
8249    # 10*(2^10) chars as input seems more than enough
8250    test $ac_count -gt 10 && break
8251  done
8252  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
8253esac
8254
8255      $ac_path_FGREP_found && break 3
8256    done
8257  done
8258  done
8259IFS=$as_save_IFS
8260  if test -z "$ac_cv_path_FGREP"; then
8261    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
8262  fi
8263else
8264  ac_cv_path_FGREP=$FGREP
8265fi
8266
8267   fi ;;
8268esac
8269fi
8270{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
8271printf "%s\n" "$ac_cv_path_FGREP" >&6; }
8272 FGREP="$ac_cv_path_FGREP"
8273
8274
8275test -z "$GREP" && GREP=grep
8276
8277
8278
8279
8280
8281
8282
8283
8284
8285
8286
8287
8288
8289
8290
8291
8292
8293
8294
8295# Check whether --with-gnu-ld was given.
8296if test ${with_gnu_ld+y}
8297then :
8298  withval=$with_gnu_ld; test no = "$withval" || with_gnu_ld=yes
8299else case e in #(
8300  e) with_gnu_ld=no ;;
8301esac
8302fi
8303
8304ac_prog=ld
8305if test yes = "$GCC"; then
8306  # Check if gcc -print-prog-name=ld gives a path.
8307  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5
8308printf %s "checking for ld used by $CC... " >&6; }
8309  case $host in
8310  *-*-mingw*)
8311    # gcc leaves a trailing carriage return, which upsets mingw
8312    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
8313  *)
8314    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
8315  esac
8316  case $ac_prog in
8317    # Accept absolute paths.
8318    [\\/]* | ?:[\\/]*)
8319      re_direlt='/[^/][^/]*/\.\./'
8320      # Canonicalize the pathname of ld
8321      ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
8322      while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
8323	ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
8324      done
8325      test -z "$LD" && LD=$ac_prog
8326      ;;
8327  "")
8328    # If it fails, then pretend we aren't using GCC.
8329    ac_prog=ld
8330    ;;
8331  *)
8332    # If it is relative, then search for the first ld in PATH.
8333    with_gnu_ld=unknown
8334    ;;
8335  esac
8336elif test yes = "$with_gnu_ld"; then
8337  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
8338printf %s "checking for GNU ld... " >&6; }
8339else
8340  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
8341printf %s "checking for non-GNU ld... " >&6; }
8342fi
8343if test ${lt_cv_path_LD+y}
8344then :
8345  printf %s "(cached) " >&6
8346else case e in #(
8347  e) if test -z "$LD"; then
8348  lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
8349  for ac_dir in $PATH; do
8350    IFS=$lt_save_ifs
8351    test -z "$ac_dir" && ac_dir=.
8352    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
8353      lt_cv_path_LD=$ac_dir/$ac_prog
8354      # Check to see if the program is GNU ld.  I'd rather use --version,
8355      # but apparently some variants of GNU ld only accept -v.
8356      # Break only if it was the GNU/non-GNU ld that we prefer.
8357      case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
8358      *GNU* | *'with BFD'*)
8359	test no != "$with_gnu_ld" && break
8360	;;
8361      *)
8362	test yes != "$with_gnu_ld" && break
8363	;;
8364      esac
8365    fi
8366  done
8367  IFS=$lt_save_ifs
8368else
8369  lt_cv_path_LD=$LD # Let the user override the test with a path.
8370fi ;;
8371esac
8372fi
8373
8374LD=$lt_cv_path_LD
8375if test -n "$LD"; then
8376  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
8377printf "%s\n" "$LD" >&6; }
8378else
8379  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
8380printf "%s\n" "no" >&6; }
8381fi
8382test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
8383{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
8384printf %s "checking if the linker ($LD) is GNU ld... " >&6; }
8385if test ${lt_cv_prog_gnu_ld+y}
8386then :
8387  printf %s "(cached) " >&6
8388else case e in #(
8389  e) # I'd rather use --version here, but apparently some GNU lds only accept -v.
8390case `$LD -v 2>&1 </dev/null` in
8391*GNU* | *'with BFD'*)
8392  lt_cv_prog_gnu_ld=yes
8393  ;;
8394*)
8395  lt_cv_prog_gnu_ld=no
8396  ;;
8397esac ;;
8398esac
8399fi
8400{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_gnu_ld" >&5
8401printf "%s\n" "$lt_cv_prog_gnu_ld" >&6; }
8402with_gnu_ld=$lt_cv_prog_gnu_ld
8403
8404
8405
8406
8407
8408
8409
8410
8411
8412{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)" >&5
8413printf %s "checking for BSD- or MS-compatible name lister (nm)... " >&6; }
8414if test ${lt_cv_path_NM+y}
8415then :
8416  printf %s "(cached) " >&6
8417else case e in #(
8418  e) if test -n "$NM"; then
8419  # Let the user override the test.
8420  lt_cv_path_NM=$NM
8421else
8422  lt_nm_to_check=${ac_tool_prefix}nm
8423  if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
8424    lt_nm_to_check="$lt_nm_to_check nm"
8425  fi
8426  for lt_tmp_nm in $lt_nm_to_check; do
8427    lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
8428    for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
8429      IFS=$lt_save_ifs
8430      test -z "$ac_dir" && ac_dir=.
8431      tmp_nm=$ac_dir/$lt_tmp_nm
8432      if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then
8433	# Check to see if the nm accepts a BSD-compat flag.
8434	# Adding the 'sed 1q' prevents false positives on HP-UX, which says:
8435	#   nm: unknown option "B" ignored
8436	# Tru64's nm complains that /dev/null is an invalid object file
8437	# MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty
8438	case $build_os in
8439	mingw*) lt_bad_file=conftest.nm/nofile ;;
8440	*) lt_bad_file=/dev/null ;;
8441	esac
8442	case `"$tmp_nm" -B $lt_bad_file 2>&1 | sed '1q'` in
8443	*$lt_bad_file* | *'Invalid file or object type'*)
8444	  lt_cv_path_NM="$tmp_nm -B"
8445	  break 2
8446	  ;;
8447	*)
8448	  case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
8449	  */dev/null*)
8450	    lt_cv_path_NM="$tmp_nm -p"
8451	    break 2
8452	    ;;
8453	  *)
8454	    lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
8455	    continue # so that we can try to find one that supports BSD flags
8456	    ;;
8457	  esac
8458	  ;;
8459	esac
8460      fi
8461    done
8462    IFS=$lt_save_ifs
8463  done
8464  : ${lt_cv_path_NM=no}
8465fi ;;
8466esac
8467fi
8468{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5
8469printf "%s\n" "$lt_cv_path_NM" >&6; }
8470if test no != "$lt_cv_path_NM"; then
8471  NM=$lt_cv_path_NM
8472else
8473  # Didn't find any BSD compatible name lister, look for dumpbin.
8474  if test -n "$DUMPBIN"; then :
8475    # Let the user override the test.
8476  else
8477    if test -n "$ac_tool_prefix"; then
8478  for ac_prog in dumpbin "link -dump"
8479  do
8480    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
8481set dummy $ac_tool_prefix$ac_prog; ac_word=$2
8482{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8483printf %s "checking for $ac_word... " >&6; }
8484if test ${ac_cv_prog_DUMPBIN+y}
8485then :
8486  printf %s "(cached) " >&6
8487else case e in #(
8488  e) if test -n "$DUMPBIN"; then
8489  ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
8490else
8491as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8492for as_dir in $PATH
8493do
8494  IFS=$as_save_IFS
8495  case $as_dir in #(((
8496    '') as_dir=./ ;;
8497    */) ;;
8498    *) as_dir=$as_dir/ ;;
8499  esac
8500    for ac_exec_ext in '' $ac_executable_extensions; do
8501  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
8502    ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog"
8503    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
8504    break 2
8505  fi
8506done
8507  done
8508IFS=$as_save_IFS
8509
8510fi ;;
8511esac
8512fi
8513DUMPBIN=$ac_cv_prog_DUMPBIN
8514if test -n "$DUMPBIN"; then
8515  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
8516printf "%s\n" "$DUMPBIN" >&6; }
8517else
8518  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
8519printf "%s\n" "no" >&6; }
8520fi
8521
8522
8523    test -n "$DUMPBIN" && break
8524  done
8525fi
8526if test -z "$DUMPBIN"; then
8527  ac_ct_DUMPBIN=$DUMPBIN
8528  for ac_prog in dumpbin "link -dump"
8529do
8530  # Extract the first word of "$ac_prog", so it can be a program name with args.
8531set dummy $ac_prog; ac_word=$2
8532{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8533printf %s "checking for $ac_word... " >&6; }
8534if test ${ac_cv_prog_ac_ct_DUMPBIN+y}
8535then :
8536  printf %s "(cached) " >&6
8537else case e in #(
8538  e) if test -n "$ac_ct_DUMPBIN"; then
8539  ac_cv_prog_ac_ct_DUMPBIN="$ac_ct_DUMPBIN" # Let the user override the test.
8540else
8541as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8542for as_dir in $PATH
8543do
8544  IFS=$as_save_IFS
8545  case $as_dir in #(((
8546    '') as_dir=./ ;;
8547    */) ;;
8548    *) as_dir=$as_dir/ ;;
8549  esac
8550    for ac_exec_ext in '' $ac_executable_extensions; do
8551  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
8552    ac_cv_prog_ac_ct_DUMPBIN="$ac_prog"
8553    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
8554    break 2
8555  fi
8556done
8557  done
8558IFS=$as_save_IFS
8559
8560fi ;;
8561esac
8562fi
8563ac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN
8564if test -n "$ac_ct_DUMPBIN"; then
8565  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DUMPBIN" >&5
8566printf "%s\n" "$ac_ct_DUMPBIN" >&6; }
8567else
8568  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
8569printf "%s\n" "no" >&6; }
8570fi
8571
8572
8573  test -n "$ac_ct_DUMPBIN" && break
8574done
8575
8576  if test "x$ac_ct_DUMPBIN" = x; then
8577    DUMPBIN=":"
8578  else
8579    case $cross_compiling:$ac_tool_warned in
8580yes:)
8581{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8582printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8583ac_tool_warned=yes ;;
8584esac
8585    DUMPBIN=$ac_ct_DUMPBIN
8586  fi
8587fi
8588
8589    case `$DUMPBIN -symbols -headers /dev/null 2>&1 | sed '1q'` in
8590    *COFF*)
8591      DUMPBIN="$DUMPBIN -symbols -headers"
8592      ;;
8593    *)
8594      DUMPBIN=:
8595      ;;
8596    esac
8597  fi
8598
8599  if test : != "$DUMPBIN"; then
8600    NM=$DUMPBIN
8601  fi
8602fi
8603test -z "$NM" && NM=nm
8604
8605
8606
8607
8608
8609
8610{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface" >&5
8611printf %s "checking the name lister ($NM) interface... " >&6; }
8612if test ${lt_cv_nm_interface+y}
8613then :
8614  printf %s "(cached) " >&6
8615else case e in #(
8616  e) lt_cv_nm_interface="BSD nm"
8617  echo "int some_variable = 0;" > conftest.$ac_ext
8618  (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&5)
8619  (eval "$ac_compile" 2>conftest.err)
8620  cat conftest.err >&5
8621  (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
8622  (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
8623  cat conftest.err >&5
8624  (eval echo "\"\$as_me:$LINENO: output\"" >&5)
8625  cat conftest.out >&5
8626  if $GREP 'External.*some_variable' conftest.out > /dev/null; then
8627    lt_cv_nm_interface="MS dumpbin"
8628  fi
8629  rm -f conftest* ;;
8630esac
8631fi
8632{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_nm_interface" >&5
8633printf "%s\n" "$lt_cv_nm_interface" >&6; }
8634
8635{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
8636printf %s "checking whether ln -s works... " >&6; }
8637LN_S=$as_ln_s
8638if test "$LN_S" = "ln -s"; then
8639  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8640printf "%s\n" "yes" >&6; }
8641else
8642  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
8643printf "%s\n" "no, using $LN_S" >&6; }
8644fi
8645
8646# find the maximum length of command line arguments
8647{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5
8648printf %s "checking the maximum length of command line arguments... " >&6; }
8649if test ${lt_cv_sys_max_cmd_len+y}
8650then :
8651  printf %s "(cached) " >&6
8652else case e in #(
8653  e)   i=0
8654  teststring=ABCD
8655
8656  case $build_os in
8657  msdosdjgpp*)
8658    # On DJGPP, this test can blow up pretty badly due to problems in libc
8659    # (any single argument exceeding 2000 bytes causes a buffer overrun
8660    # during glob expansion).  Even if it were fixed, the result of this
8661    # check would be larger than it should be.
8662    lt_cv_sys_max_cmd_len=12288;    # 12K is about right
8663    ;;
8664
8665  gnu*)
8666    # Under GNU Hurd, this test is not required because there is
8667    # no limit to the length of command line arguments.
8668    # Libtool will interpret -1 as no limit whatsoever
8669    lt_cv_sys_max_cmd_len=-1;
8670    ;;
8671
8672  cygwin* | mingw* | cegcc*)
8673    # On Win9x/ME, this test blows up -- it succeeds, but takes
8674    # about 5 minutes as the teststring grows exponentially.
8675    # Worse, since 9x/ME are not pre-emptively multitasking,
8676    # you end up with a "frozen" computer, even though with patience
8677    # the test eventually succeeds (with a max line length of 256k).
8678    # Instead, let's just punt: use the minimum linelength reported by
8679    # all of the supported platforms: 8192 (on NT/2K/XP).
8680    lt_cv_sys_max_cmd_len=8192;
8681    ;;
8682
8683  mint*)
8684    # On MiNT this can take a long time and run out of memory.
8685    lt_cv_sys_max_cmd_len=8192;
8686    ;;
8687
8688  amigaos*)
8689    # On AmigaOS with pdksh, this test takes hours, literally.
8690    # So we just punt and use a minimum line length of 8192.
8691    lt_cv_sys_max_cmd_len=8192;
8692    ;;
8693
8694  bitrig* | darwin* | dragonfly* | freebsd* | netbsd* | openbsd*)
8695    # This has been around since 386BSD, at least.  Likely further.
8696    if test -x /sbin/sysctl; then
8697      lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
8698    elif test -x /usr/sbin/sysctl; then
8699      lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
8700    else
8701      lt_cv_sys_max_cmd_len=65536	# usable default for all BSDs
8702    fi
8703    # And add a safety zone
8704    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
8705    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
8706    ;;
8707
8708  interix*)
8709    # We know the value 262144 and hardcode it with a safety zone (like BSD)
8710    lt_cv_sys_max_cmd_len=196608
8711    ;;
8712
8713  os2*)
8714    # The test takes a long time on OS/2.
8715    lt_cv_sys_max_cmd_len=8192
8716    ;;
8717
8718  osf*)
8719    # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
8720    # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
8721    # nice to cause kernel panics so lets avoid the loop below.
8722    # First set a reasonable default.
8723    lt_cv_sys_max_cmd_len=16384
8724    #
8725    if test -x /sbin/sysconfig; then
8726      case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
8727        *1*) lt_cv_sys_max_cmd_len=-1 ;;
8728      esac
8729    fi
8730    ;;
8731  sco3.2v5*)
8732    lt_cv_sys_max_cmd_len=102400
8733    ;;
8734  sysv5* | sco5v6* | sysv4.2uw2*)
8735    kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
8736    if test -n "$kargmax"; then
8737      lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[	 ]//'`
8738    else
8739      lt_cv_sys_max_cmd_len=32768
8740    fi
8741    ;;
8742  *)
8743    lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
8744    if test -n "$lt_cv_sys_max_cmd_len" && \
8745       test undefined != "$lt_cv_sys_max_cmd_len"; then
8746      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
8747      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
8748    else
8749      # Make teststring a little bigger before we do anything with it.
8750      # a 1K string should be a reasonable start.
8751      for i in 1 2 3 4 5 6 7 8; do
8752        teststring=$teststring$teststring
8753      done
8754      SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
8755      # If test is not a shell built-in, we'll probably end up computing a
8756      # maximum length that is only half of the actual maximum length, but
8757      # we can't tell.
8758      while { test X`env echo "$teststring$teststring" 2>/dev/null` \
8759	         = "X$teststring$teststring"; } >/dev/null 2>&1 &&
8760	      test 17 != "$i" # 1/2 MB should be enough
8761      do
8762        i=`expr $i + 1`
8763        teststring=$teststring$teststring
8764      done
8765      # Only check the string length outside the loop.
8766      lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
8767      teststring=
8768      # Add a significant safety factor because C++ compilers can tack on
8769      # massive amounts of additional arguments before passing them to the
8770      # linker.  It appears as though 1/2 is a usable value.
8771      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
8772    fi
8773    ;;
8774  esac
8775 ;;
8776esac
8777fi
8778
8779if test -n "$lt_cv_sys_max_cmd_len"; then
8780  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len" >&5
8781printf "%s\n" "$lt_cv_sys_max_cmd_len" >&6; }
8782else
8783  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none" >&5
8784printf "%s\n" "none" >&6; }
8785fi
8786max_cmd_len=$lt_cv_sys_max_cmd_len
8787
8788
8789
8790
8791
8792
8793: ${CP="cp -f"}
8794: ${MV="mv -f"}
8795: ${RM="rm -f"}
8796
8797if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
8798  lt_unset=unset
8799else
8800  lt_unset=false
8801fi
8802
8803
8804
8805
8806
8807# test EBCDIC or ASCII
8808case `echo X|tr X '\101'` in
8809 A) # ASCII based system
8810    # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
8811  lt_SP2NL='tr \040 \012'
8812  lt_NL2SP='tr \015\012 \040\040'
8813  ;;
8814 *) # EBCDIC based system
8815  lt_SP2NL='tr \100 \n'
8816  lt_NL2SP='tr \r\n \100\100'
8817  ;;
8818esac
8819
8820
8821
8822
8823
8824
8825
8826
8827
8828{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to $host format" >&5
8829printf %s "checking how to convert $build file names to $host format... " >&6; }
8830if test ${lt_cv_to_host_file_cmd+y}
8831then :
8832  printf %s "(cached) " >&6
8833else case e in #(
8834  e) case $host in
8835  *-*-mingw* )
8836    case $build in
8837      *-*-mingw* ) # actually msys
8838        lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32
8839        ;;
8840      *-*-cygwin* )
8841        lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32
8842        ;;
8843      * ) # otherwise, assume *nix
8844        lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32
8845        ;;
8846    esac
8847    ;;
8848  *-*-cygwin* )
8849    case $build in
8850      *-*-mingw* ) # actually msys
8851        lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin
8852        ;;
8853      *-*-cygwin* )
8854        lt_cv_to_host_file_cmd=func_convert_file_noop
8855        ;;
8856      * ) # otherwise, assume *nix
8857        lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin
8858        ;;
8859    esac
8860    ;;
8861  * ) # unhandled hosts (and "normal" native builds)
8862    lt_cv_to_host_file_cmd=func_convert_file_noop
8863    ;;
8864esac
8865 ;;
8866esac
8867fi
8868
8869to_host_file_cmd=$lt_cv_to_host_file_cmd
8870{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_host_file_cmd" >&5
8871printf "%s\n" "$lt_cv_to_host_file_cmd" >&6; }
8872
8873
8874
8875
8876
8877{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format" >&5
8878printf %s "checking how to convert $build file names to toolchain format... " >&6; }
8879if test ${lt_cv_to_tool_file_cmd+y}
8880then :
8881  printf %s "(cached) " >&6
8882else case e in #(
8883  e) #assume ordinary cross tools, or native build.
8884lt_cv_to_tool_file_cmd=func_convert_file_noop
8885case $host in
8886  *-*-mingw* )
8887    case $build in
8888      *-*-mingw* ) # actually msys
8889        lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32
8890        ;;
8891    esac
8892    ;;
8893esac
8894 ;;
8895esac
8896fi
8897
8898to_tool_file_cmd=$lt_cv_to_tool_file_cmd
8899{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_tool_file_cmd" >&5
8900printf "%s\n" "$lt_cv_to_tool_file_cmd" >&6; }
8901
8902
8903
8904
8905
8906{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5
8907printf %s "checking for $LD option to reload object files... " >&6; }
8908if test ${lt_cv_ld_reload_flag+y}
8909then :
8910  printf %s "(cached) " >&6
8911else case e in #(
8912  e) lt_cv_ld_reload_flag='-r' ;;
8913esac
8914fi
8915{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_reload_flag" >&5
8916printf "%s\n" "$lt_cv_ld_reload_flag" >&6; }
8917reload_flag=$lt_cv_ld_reload_flag
8918case $reload_flag in
8919"" | " "*) ;;
8920*) reload_flag=" $reload_flag" ;;
8921esac
8922reload_cmds='$LD$reload_flag -o $output$reload_objs'
8923case $host_os in
8924  cygwin* | mingw* | pw32* | cegcc*)
8925    if test yes != "$GCC"; then
8926      reload_cmds=false
8927    fi
8928    ;;
8929  darwin*)
8930    if test yes = "$GCC"; then
8931      reload_cmds='$LTCC $LTCFLAGS -nostdlib $wl-r -o $output$reload_objs'
8932    else
8933      reload_cmds='$LD$reload_flag -o $output$reload_objs'
8934    fi
8935    ;;
8936esac
8937
8938
8939
8940
8941
8942
8943
8944
8945
8946if test -n "$ac_tool_prefix"; then
8947  # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
8948set dummy ${ac_tool_prefix}objdump; ac_word=$2
8949{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8950printf %s "checking for $ac_word... " >&6; }
8951if test ${ac_cv_prog_OBJDUMP+y}
8952then :
8953  printf %s "(cached) " >&6
8954else case e in #(
8955  e) if test -n "$OBJDUMP"; then
8956  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
8957else
8958as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8959for as_dir in $PATH
8960do
8961  IFS=$as_save_IFS
8962  case $as_dir in #(((
8963    '') as_dir=./ ;;
8964    */) ;;
8965    *) as_dir=$as_dir/ ;;
8966  esac
8967    for ac_exec_ext in '' $ac_executable_extensions; do
8968  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
8969    ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
8970    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
8971    break 2
8972  fi
8973done
8974  done
8975IFS=$as_save_IFS
8976
8977fi ;;
8978esac
8979fi
8980OBJDUMP=$ac_cv_prog_OBJDUMP
8981if test -n "$OBJDUMP"; then
8982  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
8983printf "%s\n" "$OBJDUMP" >&6; }
8984else
8985  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
8986printf "%s\n" "no" >&6; }
8987fi
8988
8989
8990fi
8991if test -z "$ac_cv_prog_OBJDUMP"; then
8992  ac_ct_OBJDUMP=$OBJDUMP
8993  # Extract the first word of "objdump", so it can be a program name with args.
8994set dummy objdump; ac_word=$2
8995{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8996printf %s "checking for $ac_word... " >&6; }
8997if test ${ac_cv_prog_ac_ct_OBJDUMP+y}
8998then :
8999  printf %s "(cached) " >&6
9000else case e in #(
9001  e) if test -n "$ac_ct_OBJDUMP"; then
9002  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
9003else
9004as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9005for as_dir in $PATH
9006do
9007  IFS=$as_save_IFS
9008  case $as_dir in #(((
9009    '') as_dir=./ ;;
9010    */) ;;
9011    *) as_dir=$as_dir/ ;;
9012  esac
9013    for ac_exec_ext in '' $ac_executable_extensions; do
9014  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
9015    ac_cv_prog_ac_ct_OBJDUMP="objdump"
9016    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
9017    break 2
9018  fi
9019done
9020  done
9021IFS=$as_save_IFS
9022
9023fi ;;
9024esac
9025fi
9026ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
9027if test -n "$ac_ct_OBJDUMP"; then
9028  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
9029printf "%s\n" "$ac_ct_OBJDUMP" >&6; }
9030else
9031  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
9032printf "%s\n" "no" >&6; }
9033fi
9034
9035  if test "x$ac_ct_OBJDUMP" = x; then
9036    OBJDUMP="false"
9037  else
9038    case $cross_compiling:$ac_tool_warned in
9039yes:)
9040{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9041printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9042ac_tool_warned=yes ;;
9043esac
9044    OBJDUMP=$ac_ct_OBJDUMP
9045  fi
9046else
9047  OBJDUMP="$ac_cv_prog_OBJDUMP"
9048fi
9049
9050test -z "$OBJDUMP" && OBJDUMP=objdump
9051
9052
9053
9054
9055
9056
9057
9058
9059
9060{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries" >&5
9061printf %s "checking how to recognize dependent libraries... " >&6; }
9062if test ${lt_cv_deplibs_check_method+y}
9063then :
9064  printf %s "(cached) " >&6
9065else case e in #(
9066  e) lt_cv_file_magic_cmd='$MAGIC_CMD'
9067lt_cv_file_magic_test_file=
9068lt_cv_deplibs_check_method='unknown'
9069# Need to set the preceding variable on all platforms that support
9070# interlibrary dependencies.
9071# 'none' -- dependencies not supported.
9072# 'unknown' -- same as none, but documents that we really don't know.
9073# 'pass_all' -- all dependencies passed with no checks.
9074# 'test_compile' -- check by making test program.
9075# 'file_magic [[regex]]' -- check by looking for files in library path
9076# that responds to the $file_magic_cmd with a given extended regex.
9077# If you have 'file' or equivalent on your system and you're not sure
9078# whether 'pass_all' will *always* work, you probably want this one.
9079
9080case $host_os in
9081aix[4-9]*)
9082  lt_cv_deplibs_check_method=pass_all
9083  ;;
9084
9085beos*)
9086  lt_cv_deplibs_check_method=pass_all
9087  ;;
9088
9089bsdi[45]*)
9090  lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
9091  lt_cv_file_magic_cmd='/usr/bin/file -L'
9092  lt_cv_file_magic_test_file=/shlib/libc.so
9093  ;;
9094
9095cygwin*)
9096  # func_win32_libid is a shell function defined in ltmain.sh
9097  lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
9098  lt_cv_file_magic_cmd='func_win32_libid'
9099  ;;
9100
9101mingw* | pw32*)
9102  # Base MSYS/MinGW do not provide the 'file' command needed by
9103  # func_win32_libid shell function, so use a weaker test based on 'objdump',
9104  # unless we find 'file', for example because we are cross-compiling.
9105  if ( file / ) >/dev/null 2>&1; then
9106    lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
9107    lt_cv_file_magic_cmd='func_win32_libid'
9108  else
9109    # Keep this pattern in sync with the one in func_win32_libid.
9110    lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)'
9111    lt_cv_file_magic_cmd='$OBJDUMP -f'
9112  fi
9113  ;;
9114
9115cegcc*)
9116  # use the weaker test based on 'objdump'. See mingw*.
9117  lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
9118  lt_cv_file_magic_cmd='$OBJDUMP -f'
9119  ;;
9120
9121darwin* | rhapsody*)
9122  lt_cv_deplibs_check_method=pass_all
9123  ;;
9124
9125freebsd* | dragonfly*)
9126  if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
9127    case $host_cpu in
9128    i*86 )
9129      # Not sure whether the presence of OpenBSD here was a mistake.
9130      # Let's accept both of them until this is cleared up.
9131      lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library'
9132      lt_cv_file_magic_cmd=/usr/bin/file
9133      lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
9134      ;;
9135    esac
9136  else
9137    lt_cv_deplibs_check_method=pass_all
9138  fi
9139  ;;
9140
9141haiku*)
9142  lt_cv_deplibs_check_method=pass_all
9143  ;;
9144
9145hpux10.20* | hpux11*)
9146  lt_cv_file_magic_cmd=/usr/bin/file
9147  case $host_cpu in
9148  ia64*)
9149    lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64'
9150    lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
9151    ;;
9152  hppa*64*)
9153    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]'
9154    lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
9155    ;;
9156  *)
9157    lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9]\.[0-9]) shared library'
9158    lt_cv_file_magic_test_file=/usr/lib/libc.sl
9159    ;;
9160  esac
9161  ;;
9162
9163interix[3-9]*)
9164  # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
9165  lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$'
9166  ;;
9167
9168irix5* | irix6* | nonstopux*)
9169  case $LD in
9170  *-32|*"-32 ") libmagic=32-bit;;
9171  *-n32|*"-n32 ") libmagic=N32;;
9172  *-64|*"-64 ") libmagic=64-bit;;
9173  *) libmagic=never-match;;
9174  esac
9175  lt_cv_deplibs_check_method=pass_all
9176  ;;
9177
9178# This must be glibc/ELF.
9179linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
9180  lt_cv_deplibs_check_method=pass_all
9181  ;;
9182
9183netbsd*)
9184  if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
9185    lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
9186  else
9187    lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$'
9188  fi
9189  ;;
9190
9191newos6*)
9192  lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'
9193  lt_cv_file_magic_cmd=/usr/bin/file
9194  lt_cv_file_magic_test_file=/usr/lib/libnls.so
9195  ;;
9196
9197*nto* | *qnx*)
9198  lt_cv_deplibs_check_method=pass_all
9199  ;;
9200
9201openbsd* | bitrig*)
9202  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
9203    lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$'
9204  else
9205    lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
9206  fi
9207  ;;
9208
9209osf3* | osf4* | osf5*)
9210  lt_cv_deplibs_check_method=pass_all
9211  ;;
9212
9213rdos*)
9214  lt_cv_deplibs_check_method=pass_all
9215  ;;
9216
9217solaris*)
9218  lt_cv_deplibs_check_method=pass_all
9219  ;;
9220
9221sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
9222  lt_cv_deplibs_check_method=pass_all
9223  ;;
9224
9225sysv4 | sysv4.3*)
9226  case $host_vendor in
9227  motorola)
9228    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]'
9229    lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
9230    ;;
9231  ncr)
9232    lt_cv_deplibs_check_method=pass_all
9233    ;;
9234  sequent)
9235    lt_cv_file_magic_cmd='/bin/file'
9236    lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'
9237    ;;
9238  sni)
9239    lt_cv_file_magic_cmd='/bin/file'
9240    lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib"
9241    lt_cv_file_magic_test_file=/lib/libc.so
9242    ;;
9243  siemens)
9244    lt_cv_deplibs_check_method=pass_all
9245    ;;
9246  pc)
9247    lt_cv_deplibs_check_method=pass_all
9248    ;;
9249  esac
9250  ;;
9251
9252tpf*)
9253  lt_cv_deplibs_check_method=pass_all
9254  ;;
9255os2*)
9256  lt_cv_deplibs_check_method=pass_all
9257  ;;
9258esac
9259 ;;
9260esac
9261fi
9262{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5
9263printf "%s\n" "$lt_cv_deplibs_check_method" >&6; }
9264
9265file_magic_glob=
9266want_nocaseglob=no
9267if test "$build" = "$host"; then
9268  case $host_os in
9269  mingw* | pw32*)
9270    if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then
9271      want_nocaseglob=yes
9272    else
9273      file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[\1]\/[\1]\/g;/g"`
9274    fi
9275    ;;
9276  esac
9277fi
9278
9279file_magic_cmd=$lt_cv_file_magic_cmd
9280deplibs_check_method=$lt_cv_deplibs_check_method
9281test -z "$deplibs_check_method" && deplibs_check_method=unknown
9282
9283
9284
9285
9286
9287
9288
9289
9290
9291
9292
9293
9294
9295
9296
9297
9298
9299
9300
9301
9302
9303
9304if test -n "$ac_tool_prefix"; then
9305  # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
9306set dummy ${ac_tool_prefix}dlltool; ac_word=$2
9307{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9308printf %s "checking for $ac_word... " >&6; }
9309if test ${ac_cv_prog_DLLTOOL+y}
9310then :
9311  printf %s "(cached) " >&6
9312else case e in #(
9313  e) if test -n "$DLLTOOL"; then
9314  ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
9315else
9316as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9317for as_dir in $PATH
9318do
9319  IFS=$as_save_IFS
9320  case $as_dir in #(((
9321    '') as_dir=./ ;;
9322    */) ;;
9323    *) as_dir=$as_dir/ ;;
9324  esac
9325    for ac_exec_ext in '' $ac_executable_extensions; do
9326  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
9327    ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
9328    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
9329    break 2
9330  fi
9331done
9332  done
9333IFS=$as_save_IFS
9334
9335fi ;;
9336esac
9337fi
9338DLLTOOL=$ac_cv_prog_DLLTOOL
9339if test -n "$DLLTOOL"; then
9340  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5
9341printf "%s\n" "$DLLTOOL" >&6; }
9342else
9343  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
9344printf "%s\n" "no" >&6; }
9345fi
9346
9347
9348fi
9349if test -z "$ac_cv_prog_DLLTOOL"; then
9350  ac_ct_DLLTOOL=$DLLTOOL
9351  # Extract the first word of "dlltool", so it can be a program name with args.
9352set dummy dlltool; ac_word=$2
9353{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9354printf %s "checking for $ac_word... " >&6; }
9355if test ${ac_cv_prog_ac_ct_DLLTOOL+y}
9356then :
9357  printf %s "(cached) " >&6
9358else case e in #(
9359  e) if test -n "$ac_ct_DLLTOOL"; then
9360  ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
9361else
9362as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9363for as_dir in $PATH
9364do
9365  IFS=$as_save_IFS
9366  case $as_dir in #(((
9367    '') as_dir=./ ;;
9368    */) ;;
9369    *) as_dir=$as_dir/ ;;
9370  esac
9371    for ac_exec_ext in '' $ac_executable_extensions; do
9372  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
9373    ac_cv_prog_ac_ct_DLLTOOL="dlltool"
9374    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
9375    break 2
9376  fi
9377done
9378  done
9379IFS=$as_save_IFS
9380
9381fi ;;
9382esac
9383fi
9384ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
9385if test -n "$ac_ct_DLLTOOL"; then
9386  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5
9387printf "%s\n" "$ac_ct_DLLTOOL" >&6; }
9388else
9389  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
9390printf "%s\n" "no" >&6; }
9391fi
9392
9393  if test "x$ac_ct_DLLTOOL" = x; then
9394    DLLTOOL="false"
9395  else
9396    case $cross_compiling:$ac_tool_warned in
9397yes:)
9398{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9399printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9400ac_tool_warned=yes ;;
9401esac
9402    DLLTOOL=$ac_ct_DLLTOOL
9403  fi
9404else
9405  DLLTOOL="$ac_cv_prog_DLLTOOL"
9406fi
9407
9408test -z "$DLLTOOL" && DLLTOOL=dlltool
9409
9410
9411
9412
9413
9414
9415
9416
9417
9418
9419{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to associate runtime and link libraries" >&5
9420printf %s "checking how to associate runtime and link libraries... " >&6; }
9421if test ${lt_cv_sharedlib_from_linklib_cmd+y}
9422then :
9423  printf %s "(cached) " >&6
9424else case e in #(
9425  e) lt_cv_sharedlib_from_linklib_cmd='unknown'
9426
9427case $host_os in
9428cygwin* | mingw* | pw32* | cegcc*)
9429  # two different shell functions defined in ltmain.sh;
9430  # decide which one to use based on capabilities of $DLLTOOL
9431  case `$DLLTOOL --help 2>&1` in
9432  *--identify-strict*)
9433    lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib
9434    ;;
9435  *)
9436    lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback
9437    ;;
9438  esac
9439  ;;
9440*)
9441  # fallback: assume linklib IS sharedlib
9442  lt_cv_sharedlib_from_linklib_cmd=$ECHO
9443  ;;
9444esac
9445 ;;
9446esac
9447fi
9448{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sharedlib_from_linklib_cmd" >&5
9449printf "%s\n" "$lt_cv_sharedlib_from_linklib_cmd" >&6; }
9450sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd
9451test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO
9452
9453
9454
9455
9456
9457
9458
9459if test -n "$ac_tool_prefix"; then
9460  for ac_prog in ar
9461  do
9462    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
9463set dummy $ac_tool_prefix$ac_prog; ac_word=$2
9464{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9465printf %s "checking for $ac_word... " >&6; }
9466if test ${ac_cv_prog_AR+y}
9467then :
9468  printf %s "(cached) " >&6
9469else case e in #(
9470  e) if test -n "$AR"; then
9471  ac_cv_prog_AR="$AR" # Let the user override the test.
9472else
9473as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9474for as_dir in $PATH
9475do
9476  IFS=$as_save_IFS
9477  case $as_dir in #(((
9478    '') as_dir=./ ;;
9479    */) ;;
9480    *) as_dir=$as_dir/ ;;
9481  esac
9482    for ac_exec_ext in '' $ac_executable_extensions; do
9483  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
9484    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
9485    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
9486    break 2
9487  fi
9488done
9489  done
9490IFS=$as_save_IFS
9491
9492fi ;;
9493esac
9494fi
9495AR=$ac_cv_prog_AR
9496if test -n "$AR"; then
9497  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
9498printf "%s\n" "$AR" >&6; }
9499else
9500  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
9501printf "%s\n" "no" >&6; }
9502fi
9503
9504
9505    test -n "$AR" && break
9506  done
9507fi
9508if test -z "$AR"; then
9509  ac_ct_AR=$AR
9510  for ac_prog in ar
9511do
9512  # Extract the first word of "$ac_prog", so it can be a program name with args.
9513set dummy $ac_prog; ac_word=$2
9514{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9515printf %s "checking for $ac_word... " >&6; }
9516if test ${ac_cv_prog_ac_ct_AR+y}
9517then :
9518  printf %s "(cached) " >&6
9519else case e in #(
9520  e) if test -n "$ac_ct_AR"; then
9521  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
9522else
9523as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9524for as_dir in $PATH
9525do
9526  IFS=$as_save_IFS
9527  case $as_dir in #(((
9528    '') as_dir=./ ;;
9529    */) ;;
9530    *) as_dir=$as_dir/ ;;
9531  esac
9532    for ac_exec_ext in '' $ac_executable_extensions; do
9533  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
9534    ac_cv_prog_ac_ct_AR="$ac_prog"
9535    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
9536    break 2
9537  fi
9538done
9539  done
9540IFS=$as_save_IFS
9541
9542fi ;;
9543esac
9544fi
9545ac_ct_AR=$ac_cv_prog_ac_ct_AR
9546if test -n "$ac_ct_AR"; then
9547  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
9548printf "%s\n" "$ac_ct_AR" >&6; }
9549else
9550  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
9551printf "%s\n" "no" >&6; }
9552fi
9553
9554
9555  test -n "$ac_ct_AR" && break
9556done
9557
9558  if test "x$ac_ct_AR" = x; then
9559    AR="false"
9560  else
9561    case $cross_compiling:$ac_tool_warned in
9562yes:)
9563{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9564printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9565ac_tool_warned=yes ;;
9566esac
9567    AR=$ac_ct_AR
9568  fi
9569fi
9570
9571: ${AR=ar}
9572: ${AR_FLAGS=cru}
9573
9574
9575
9576
9577
9578
9579
9580
9581
9582
9583
9584{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support" >&5
9585printf %s "checking for archiver @FILE support... " >&6; }
9586if test ${lt_cv_ar_at_file+y}
9587then :
9588  printf %s "(cached) " >&6
9589else case e in #(
9590  e) lt_cv_ar_at_file=no
9591   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9592/* end confdefs.h.  */
9593
9594int
9595main (void)
9596{
9597
9598  ;
9599  return 0;
9600}
9601_ACEOF
9602if ac_fn_c_try_compile "$LINENO"
9603then :
9604  echo conftest.$ac_objext > conftest.lst
9605      lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&5'
9606      { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5
9607  (eval $lt_ar_try) 2>&5
9608  ac_status=$?
9609  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
9610  test $ac_status = 0; }
9611      if test 0 -eq "$ac_status"; then
9612	# Ensure the archiver fails upon bogus file names.
9613	rm -f conftest.$ac_objext libconftest.a
9614	{ { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5
9615  (eval $lt_ar_try) 2>&5
9616  ac_status=$?
9617  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
9618  test $ac_status = 0; }
9619	if test 0 -ne "$ac_status"; then
9620          lt_cv_ar_at_file=@
9621        fi
9622      fi
9623      rm -f conftest.* libconftest.a
9624
9625fi
9626rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
9627   ;;
9628esac
9629fi
9630{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5
9631printf "%s\n" "$lt_cv_ar_at_file" >&6; }
9632
9633if test no = "$lt_cv_ar_at_file"; then
9634  archiver_list_spec=
9635else
9636  archiver_list_spec=$lt_cv_ar_at_file
9637fi
9638
9639
9640
9641
9642
9643
9644
9645if test -n "$ac_tool_prefix"; then
9646  # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
9647set dummy ${ac_tool_prefix}strip; ac_word=$2
9648{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9649printf %s "checking for $ac_word... " >&6; }
9650if test ${ac_cv_prog_STRIP+y}
9651then :
9652  printf %s "(cached) " >&6
9653else case e in #(
9654  e) if test -n "$STRIP"; then
9655  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
9656else
9657as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9658for as_dir in $PATH
9659do
9660  IFS=$as_save_IFS
9661  case $as_dir in #(((
9662    '') as_dir=./ ;;
9663    */) ;;
9664    *) as_dir=$as_dir/ ;;
9665  esac
9666    for ac_exec_ext in '' $ac_executable_extensions; do
9667  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
9668    ac_cv_prog_STRIP="${ac_tool_prefix}strip"
9669    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
9670    break 2
9671  fi
9672done
9673  done
9674IFS=$as_save_IFS
9675
9676fi ;;
9677esac
9678fi
9679STRIP=$ac_cv_prog_STRIP
9680if test -n "$STRIP"; then
9681  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
9682printf "%s\n" "$STRIP" >&6; }
9683else
9684  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
9685printf "%s\n" "no" >&6; }
9686fi
9687
9688
9689fi
9690if test -z "$ac_cv_prog_STRIP"; then
9691  ac_ct_STRIP=$STRIP
9692  # Extract the first word of "strip", so it can be a program name with args.
9693set dummy strip; ac_word=$2
9694{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9695printf %s "checking for $ac_word... " >&6; }
9696if test ${ac_cv_prog_ac_ct_STRIP+y}
9697then :
9698  printf %s "(cached) " >&6
9699else case e in #(
9700  e) if test -n "$ac_ct_STRIP"; then
9701  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
9702else
9703as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9704for as_dir in $PATH
9705do
9706  IFS=$as_save_IFS
9707  case $as_dir in #(((
9708    '') as_dir=./ ;;
9709    */) ;;
9710    *) as_dir=$as_dir/ ;;
9711  esac
9712    for ac_exec_ext in '' $ac_executable_extensions; do
9713  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
9714    ac_cv_prog_ac_ct_STRIP="strip"
9715    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
9716    break 2
9717  fi
9718done
9719  done
9720IFS=$as_save_IFS
9721
9722fi ;;
9723esac
9724fi
9725ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
9726if test -n "$ac_ct_STRIP"; then
9727  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
9728printf "%s\n" "$ac_ct_STRIP" >&6; }
9729else
9730  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
9731printf "%s\n" "no" >&6; }
9732fi
9733
9734  if test "x$ac_ct_STRIP" = x; then
9735    STRIP=":"
9736  else
9737    case $cross_compiling:$ac_tool_warned in
9738yes:)
9739{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9740printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9741ac_tool_warned=yes ;;
9742esac
9743    STRIP=$ac_ct_STRIP
9744  fi
9745else
9746  STRIP="$ac_cv_prog_STRIP"
9747fi
9748
9749test -z "$STRIP" && STRIP=:
9750
9751
9752
9753
9754
9755
9756if test -n "$ac_tool_prefix"; then
9757  # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
9758set dummy ${ac_tool_prefix}ranlib; ac_word=$2
9759{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9760printf %s "checking for $ac_word... " >&6; }
9761if test ${ac_cv_prog_RANLIB+y}
9762then :
9763  printf %s "(cached) " >&6
9764else case e in #(
9765  e) if test -n "$RANLIB"; then
9766  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
9767else
9768as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9769for as_dir in $PATH
9770do
9771  IFS=$as_save_IFS
9772  case $as_dir in #(((
9773    '') as_dir=./ ;;
9774    */) ;;
9775    *) as_dir=$as_dir/ ;;
9776  esac
9777    for ac_exec_ext in '' $ac_executable_extensions; do
9778  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
9779    ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
9780    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
9781    break 2
9782  fi
9783done
9784  done
9785IFS=$as_save_IFS
9786
9787fi ;;
9788esac
9789fi
9790RANLIB=$ac_cv_prog_RANLIB
9791if test -n "$RANLIB"; then
9792  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
9793printf "%s\n" "$RANLIB" >&6; }
9794else
9795  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
9796printf "%s\n" "no" >&6; }
9797fi
9798
9799
9800fi
9801if test -z "$ac_cv_prog_RANLIB"; then
9802  ac_ct_RANLIB=$RANLIB
9803  # Extract the first word of "ranlib", so it can be a program name with args.
9804set dummy ranlib; ac_word=$2
9805{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9806printf %s "checking for $ac_word... " >&6; }
9807if test ${ac_cv_prog_ac_ct_RANLIB+y}
9808then :
9809  printf %s "(cached) " >&6
9810else case e in #(
9811  e) if test -n "$ac_ct_RANLIB"; then
9812  ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
9813else
9814as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9815for as_dir in $PATH
9816do
9817  IFS=$as_save_IFS
9818  case $as_dir in #(((
9819    '') as_dir=./ ;;
9820    */) ;;
9821    *) as_dir=$as_dir/ ;;
9822  esac
9823    for ac_exec_ext in '' $ac_executable_extensions; do
9824  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
9825    ac_cv_prog_ac_ct_RANLIB="ranlib"
9826    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
9827    break 2
9828  fi
9829done
9830  done
9831IFS=$as_save_IFS
9832
9833fi ;;
9834esac
9835fi
9836ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
9837if test -n "$ac_ct_RANLIB"; then
9838  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
9839printf "%s\n" "$ac_ct_RANLIB" >&6; }
9840else
9841  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
9842printf "%s\n" "no" >&6; }
9843fi
9844
9845  if test "x$ac_ct_RANLIB" = x; then
9846    RANLIB=":"
9847  else
9848    case $cross_compiling:$ac_tool_warned in
9849yes:)
9850{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9851printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9852ac_tool_warned=yes ;;
9853esac
9854    RANLIB=$ac_ct_RANLIB
9855  fi
9856else
9857  RANLIB="$ac_cv_prog_RANLIB"
9858fi
9859
9860test -z "$RANLIB" && RANLIB=:
9861
9862
9863
9864
9865
9866
9867# Determine commands to create old-style static archives.
9868old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
9869old_postinstall_cmds='chmod 644 $oldlib'
9870old_postuninstall_cmds=
9871
9872if test -n "$RANLIB"; then
9873  case $host_os in
9874  bitrig* | openbsd*)
9875    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib"
9876    ;;
9877  *)
9878    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib"
9879    ;;
9880  esac
9881  old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib"
9882fi
9883
9884case $host_os in
9885  darwin*)
9886    lock_old_archive_extraction=yes ;;
9887  *)
9888    lock_old_archive_extraction=no ;;
9889esac
9890
9891
9892
9893
9894
9895
9896
9897
9898
9899
9900
9901
9902
9903
9904
9905
9906
9907
9908
9909
9910
9911for ac_prog in gawk mawk nawk awk
9912do
9913  # Extract the first word of "$ac_prog", so it can be a program name with args.
9914set dummy $ac_prog; ac_word=$2
9915{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9916printf %s "checking for $ac_word... " >&6; }
9917if test ${ac_cv_prog_AWK+y}
9918then :
9919  printf %s "(cached) " >&6
9920else case e in #(
9921  e) if test -n "$AWK"; then
9922  ac_cv_prog_AWK="$AWK" # Let the user override the test.
9923else
9924as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9925for as_dir in $PATH
9926do
9927  IFS=$as_save_IFS
9928  case $as_dir in #(((
9929    '') as_dir=./ ;;
9930    */) ;;
9931    *) as_dir=$as_dir/ ;;
9932  esac
9933    for ac_exec_ext in '' $ac_executable_extensions; do
9934  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
9935    ac_cv_prog_AWK="$ac_prog"
9936    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
9937    break 2
9938  fi
9939done
9940  done
9941IFS=$as_save_IFS
9942
9943fi ;;
9944esac
9945fi
9946AWK=$ac_cv_prog_AWK
9947if test -n "$AWK"; then
9948  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
9949printf "%s\n" "$AWK" >&6; }
9950else
9951  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
9952printf "%s\n" "no" >&6; }
9953fi
9954
9955
9956  test -n "$AWK" && break
9957done
9958
9959
9960
9961
9962
9963
9964
9965
9966
9967
9968
9969
9970
9971
9972
9973
9974
9975
9976
9977# If no C compiler was specified, use CC.
9978LTCC=${LTCC-"$CC"}
9979
9980# If no C compiler flags were specified, use CFLAGS.
9981LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
9982
9983# Allow CC to be a program name with arguments.
9984compiler=$CC
9985
9986
9987# Check for command to grab the raw symbol name followed by C symbol from nm.
9988{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5
9989printf %s "checking command to parse $NM output from $compiler object... " >&6; }
9990if test ${lt_cv_sys_global_symbol_pipe+y}
9991then :
9992  printf %s "(cached) " >&6
9993else case e in #(
9994  e)
9995# These are sane defaults that work on at least a few old systems.
9996# [They come from Ultrix.  What could be older than Ultrix?!! ;)]
9997
9998# Character class describing NM global symbol codes.
9999symcode='[BCDEGRST]'
10000
10001# Regexp to match symbols that can be accessed directly from C.
10002sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
10003
10004# Define system-specific variables.
10005case $host_os in
10006aix*)
10007  symcode='[BCDT]'
10008  ;;
10009cygwin* | mingw* | pw32* | cegcc*)
10010  symcode='[ABCDGISTW]'
10011  ;;
10012hpux*)
10013  if test ia64 = "$host_cpu"; then
10014    symcode='[ABCDEGRST]'
10015  fi
10016  ;;
10017irix* | nonstopux*)
10018  symcode='[BCDEGRST]'
10019  ;;
10020osf*)
10021  symcode='[BCDEGQRST]'
10022  ;;
10023solaris*)
10024  symcode='[BDRT]'
10025  ;;
10026sco3.2v5*)
10027  symcode='[DT]'
10028  ;;
10029sysv4.2uw2*)
10030  symcode='[DT]'
10031  ;;
10032sysv5* | sco5v6* | unixware* | OpenUNIX*)
10033  symcode='[ABDT]'
10034  ;;
10035sysv4)
10036  symcode='[DFNSTU]'
10037  ;;
10038esac
10039
10040# If we're using GNU nm, then use its standard symbol codes.
10041case `$NM -V 2>&1` in
10042*GNU* | *'with BFD'*)
10043  symcode='[ABCDGIRSTW]' ;;
10044esac
10045
10046if test "$lt_cv_nm_interface" = "MS dumpbin"; then
10047  # Gets list of data symbols to import.
10048  lt_cv_sys_global_symbol_to_import="sed -n -e 's/^I .* \(.*\)$/\1/p'"
10049  # Adjust the below global symbol transforms to fixup imported variables.
10050  lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'"
10051  lt_c_name_hook=" -e 's/^I .* \(.*\)$/  {\"\1\", (void *) 0},/p'"
10052  lt_c_name_lib_hook="\
10053  -e 's/^I .* \(lib.*\)$/  {\"\1\", (void *) 0},/p'\
10054  -e 's/^I .* \(.*\)$/  {\"lib\1\", (void *) 0},/p'"
10055else
10056  # Disable hooks by default.
10057  lt_cv_sys_global_symbol_to_import=
10058  lt_cdecl_hook=
10059  lt_c_name_hook=
10060  lt_c_name_lib_hook=
10061fi
10062
10063# Transform an extracted symbol line into a proper C declaration.
10064# Some systems (esp. on ia64) link data and code symbols differently,
10065# so use this general approach.
10066lt_cv_sys_global_symbol_to_cdecl="sed -n"\
10067$lt_cdecl_hook\
10068" -e 's/^T .* \(.*\)$/extern int \1();/p'"\
10069" -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'"
10070
10071# Transform an extracted symbol line into symbol name and symbol address
10072lt_cv_sys_global_symbol_to_c_name_address="sed -n"\
10073$lt_c_name_hook\
10074" -e 's/^: \(.*\) .*$/  {\"\1\", (void *) 0},/p'"\
10075" -e 's/^$symcode$symcode* .* \(.*\)$/  {\"\1\", (void *) \&\1},/p'"
10076
10077# Transform an extracted symbol line into symbol name with lib prefix and
10078# symbol address.
10079lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n"\
10080$lt_c_name_lib_hook\
10081" -e 's/^: \(.*\) .*$/  {\"\1\", (void *) 0},/p'"\
10082" -e 's/^$symcode$symcode* .* \(lib.*\)$/  {\"\1\", (void *) \&\1},/p'"\
10083" -e 's/^$symcode$symcode* .* \(.*\)$/  {\"lib\1\", (void *) \&\1},/p'"
10084
10085# Handle CRLF in mingw tool chain
10086opt_cr=
10087case $build_os in
10088mingw*)
10089  opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
10090  ;;
10091esac
10092
10093# Try without a prefix underscore, then with it.
10094for ac_symprfx in "" "_"; do
10095
10096  # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
10097  symxfrm="\\1 $ac_symprfx\\2 \\2"
10098
10099  # Write the raw and C identifiers.
10100  if test "$lt_cv_nm_interface" = "MS dumpbin"; then
10101    # Fake it for dumpbin and say T for any non-static function,
10102    # D for any global variable and I for any imported variable.
10103    # Also find C++ and __fastcall symbols from MSVC++,
10104    # which start with @ or ?.
10105    lt_cv_sys_global_symbol_pipe="$AWK '"\
10106"     {last_section=section; section=\$ 3};"\
10107"     /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\
10108"     /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
10109"     /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\
10110"     /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\
10111"     /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\
10112"     \$ 0!~/External *\|/{next};"\
10113"     / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
10114"     {if(hide[section]) next};"\
10115"     {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\
10116"     {split(\$ 0,a,/\||\r/); split(a[2],s)};"\
10117"     s[1]~/^[@?]/{print f,s[1],s[1]; next};"\
10118"     s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\
10119"     ' prfx=^$ac_symprfx"
10120  else
10121    lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[	 ]\($symcode$symcode*\)[	 ][	 ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
10122  fi
10123  lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'"
10124
10125  # Check to see that the pipe works correctly.
10126  pipe_works=no
10127
10128  rm -f conftest*
10129  cat > conftest.$ac_ext <<_LT_EOF
10130#ifdef __cplusplus
10131extern "C" {
10132#endif
10133char nm_test_var;
10134void nm_test_func(void);
10135void nm_test_func(void){}
10136#ifdef __cplusplus
10137}
10138#endif
10139int main(){nm_test_var='a';nm_test_func();return(0);}
10140_LT_EOF
10141
10142  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
10143  (eval $ac_compile) 2>&5
10144  ac_status=$?
10145  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
10146  test $ac_status = 0; }; then
10147    # Now try to grab the symbols.
10148    nlist=conftest.nm
10149    if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist\""; } >&5
10150  (eval $NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) 2>&5
10151  ac_status=$?
10152  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
10153  test $ac_status = 0; } && test -s "$nlist"; then
10154      # Try sorting and uniquifying the output.
10155      if sort "$nlist" | uniq > "$nlist"T; then
10156	mv -f "$nlist"T "$nlist"
10157      else
10158	rm -f "$nlist"T
10159      fi
10160
10161      # Make sure that we snagged all the symbols we need.
10162      if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
10163	if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
10164	  cat <<_LT_EOF > conftest.$ac_ext
10165/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests.  */
10166#if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE
10167/* DATA imports from DLLs on WIN32 can't be const, because runtime
10168   relocations are performed -- see ld's documentation on pseudo-relocs.  */
10169# define LT_DLSYM_CONST
10170#elif defined __osf__
10171/* This system does not cope well with relocations in const data.  */
10172# define LT_DLSYM_CONST
10173#else
10174# define LT_DLSYM_CONST const
10175#endif
10176
10177#ifdef __cplusplus
10178extern "C" {
10179#endif
10180
10181_LT_EOF
10182	  # Now generate the symbol file.
10183	  eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
10184
10185	  cat <<_LT_EOF >> conftest.$ac_ext
10186
10187/* The mapping between symbol names and symbols.  */
10188LT_DLSYM_CONST struct {
10189  const char *name;
10190  void       *address;
10191}
10192lt__PROGRAM__LTX_preloaded_symbols[] =
10193{
10194  { "@PROGRAM@", (void *) 0 },
10195_LT_EOF
10196	  $SED "s/^$symcode$symcode* .* \(.*\)$/  {\"\1\", (void *) \&\1},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
10197	  cat <<\_LT_EOF >> conftest.$ac_ext
10198  {0, (void *) 0}
10199};
10200
10201/* This works around a problem in FreeBSD linker */
10202#ifdef FREEBSD_WORKAROUND
10203static const void *lt_preloaded_setup() {
10204  return lt__PROGRAM__LTX_preloaded_symbols;
10205}
10206#endif
10207
10208#ifdef __cplusplus
10209}
10210#endif
10211_LT_EOF
10212	  # Now try linking the two files.
10213	  mv conftest.$ac_objext conftstm.$ac_objext
10214	  lt_globsym_save_LIBS=$LIBS
10215	  lt_globsym_save_CFLAGS=$CFLAGS
10216	  LIBS=conftstm.$ac_objext
10217	  CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag"
10218	  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
10219  (eval $ac_link) 2>&5
10220  ac_status=$?
10221  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
10222  test $ac_status = 0; } && test -s conftest$ac_exeext; then
10223	    pipe_works=yes
10224	  fi
10225	  LIBS=$lt_globsym_save_LIBS
10226	  CFLAGS=$lt_globsym_save_CFLAGS
10227	else
10228	  echo "cannot find nm_test_func in $nlist" >&5
10229	fi
10230      else
10231	echo "cannot find nm_test_var in $nlist" >&5
10232      fi
10233    else
10234      echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5
10235    fi
10236  else
10237    echo "$progname: failed program was:" >&5
10238    cat conftest.$ac_ext >&5
10239  fi
10240  rm -rf conftest* conftst*
10241
10242  # Do not use the global_symbol_pipe unless it works.
10243  if test yes = "$pipe_works"; then
10244    break
10245  else
10246    lt_cv_sys_global_symbol_pipe=
10247  fi
10248done
10249 ;;
10250esac
10251fi
10252
10253if test -z "$lt_cv_sys_global_symbol_pipe"; then
10254  lt_cv_sys_global_symbol_to_cdecl=
10255fi
10256if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
10257  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: failed" >&5
10258printf "%s\n" "failed" >&6; }
10259else
10260  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ok" >&5
10261printf "%s\n" "ok" >&6; }
10262fi
10263
10264# Response file support.
10265if test "$lt_cv_nm_interface" = "MS dumpbin"; then
10266  nm_file_list_spec='@'
10267elif $NM --help 2>/dev/null | grep '[@]FILE' >/dev/null; then
10268  nm_file_list_spec='@'
10269fi
10270
10271
10272
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{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
10308printf %s "checking for sysroot... " >&6; }
10309
10310# Check whether --with-sysroot was given.
10311if test ${with_sysroot+y}
10312then :
10313  withval=$with_sysroot;
10314else case e in #(
10315  e) with_sysroot=no ;;
10316esac
10317fi
10318
10319
10320lt_sysroot=
10321case $with_sysroot in #(
10322 yes)
10323   if test yes = "$GCC"; then
10324     lt_sysroot=`$CC --print-sysroot 2>/dev/null`
10325   fi
10326   ;; #(
10327 /*)
10328   lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"`
10329   ;; #(
10330 no|'')
10331   ;; #(
10332 *)
10333   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $with_sysroot" >&5
10334printf "%s\n" "$with_sysroot" >&6; }
10335   as_fn_error $? "The sysroot must be an absolute path." "$LINENO" 5
10336   ;;
10337esac
10338
10339 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}" >&5
10340printf "%s\n" "${lt_sysroot:-no}" >&6; }
10341
10342
10343
10344
10345
10346{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a working dd" >&5
10347printf %s "checking for a working dd... " >&6; }
10348if test ${ac_cv_path_lt_DD+y}
10349then :
10350  printf %s "(cached) " >&6
10351else case e in #(
10352  e) printf 0123456789abcdef0123456789abcdef >conftest.i
10353cat conftest.i conftest.i >conftest2.i
10354: ${lt_DD:=$DD}
10355if test -z "$lt_DD"; then
10356  ac_path_lt_DD_found=false
10357  # Loop through the user's path and test for each of PROGNAME-LIST
10358  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10359for as_dir in $PATH
10360do
10361  IFS=$as_save_IFS
10362  case $as_dir in #(((
10363    '') as_dir=./ ;;
10364    */) ;;
10365    *) as_dir=$as_dir/ ;;
10366  esac
10367    for ac_prog in dd
10368   do
10369    for ac_exec_ext in '' $ac_executable_extensions; do
10370      ac_path_lt_DD="$as_dir$ac_prog$ac_exec_ext"
10371      as_fn_executable_p "$ac_path_lt_DD" || continue
10372if "$ac_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then
10373  cmp -s conftest.i conftest.out \
10374  && ac_cv_path_lt_DD="$ac_path_lt_DD" ac_path_lt_DD_found=:
10375fi
10376      $ac_path_lt_DD_found && break 3
10377    done
10378  done
10379  done
10380IFS=$as_save_IFS
10381  if test -z "$ac_cv_path_lt_DD"; then
10382    :
10383  fi
10384else
10385  ac_cv_path_lt_DD=$lt_DD
10386fi
10387
10388rm -f conftest.i conftest2.i conftest.out ;;
10389esac
10390fi
10391{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_lt_DD" >&5
10392printf "%s\n" "$ac_cv_path_lt_DD" >&6; }
10393
10394
10395{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to truncate binary pipes" >&5
10396printf %s "checking how to truncate binary pipes... " >&6; }
10397if test ${lt_cv_truncate_bin+y}
10398then :
10399  printf %s "(cached) " >&6
10400else case e in #(
10401  e) printf 0123456789abcdef0123456789abcdef >conftest.i
10402cat conftest.i conftest.i >conftest2.i
10403lt_cv_truncate_bin=
10404if "$ac_cv_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then
10405  cmp -s conftest.i conftest.out \
10406  && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1"
10407fi
10408rm -f conftest.i conftest2.i conftest.out
10409test -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q" ;;
10410esac
10411fi
10412{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_truncate_bin" >&5
10413printf "%s\n" "$lt_cv_truncate_bin" >&6; }
10414
10415
10416
10417
10418
10419
10420
10421# Calculate cc_basename.  Skip known compiler wrappers and cross-prefix.
10422func_cc_basename ()
10423{
10424    for cc_temp in $*""; do
10425      case $cc_temp in
10426        compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
10427        distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
10428        \-*) ;;
10429        *) break;;
10430      esac
10431    done
10432    func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
10433}
10434
10435# Check whether --enable-libtool-lock was given.
10436if test ${enable_libtool_lock+y}
10437then :
10438  enableval=$enable_libtool_lock;
10439fi
10440
10441test no = "$enable_libtool_lock" || enable_libtool_lock=yes
10442
10443# Some flags need to be propagated to the compiler or linker for good
10444# libtool support.
10445case $host in
10446ia64-*-hpux*)
10447  # Find out what ABI is being produced by ac_compile, and set mode
10448  # options accordingly.
10449  echo 'int i;' > conftest.$ac_ext
10450  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
10451  (eval $ac_compile) 2>&5
10452  ac_status=$?
10453  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
10454  test $ac_status = 0; }; then
10455    case `/usr/bin/file conftest.$ac_objext` in
10456      *ELF-32*)
10457	HPUX_IA64_MODE=32
10458	;;
10459      *ELF-64*)
10460	HPUX_IA64_MODE=64
10461	;;
10462    esac
10463  fi
10464  rm -rf conftest*
10465  ;;
10466*-*-irix6*)
10467  # Find out what ABI is being produced by ac_compile, and set linker
10468  # options accordingly.
10469  echo '#line '$LINENO' "configure"' > conftest.$ac_ext
10470  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
10471  (eval $ac_compile) 2>&5
10472  ac_status=$?
10473  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
10474  test $ac_status = 0; }; then
10475    if test yes = "$lt_cv_prog_gnu_ld"; then
10476      case `/usr/bin/file conftest.$ac_objext` in
10477	*32-bit*)
10478	  LD="${LD-ld} -melf32bsmip"
10479	  ;;
10480	*N32*)
10481	  LD="${LD-ld} -melf32bmipn32"
10482	  ;;
10483	*64-bit*)
10484	  LD="${LD-ld} -melf64bmip"
10485	;;
10486      esac
10487    else
10488      case `/usr/bin/file conftest.$ac_objext` in
10489	*32-bit*)
10490	  LD="${LD-ld} -32"
10491	  ;;
10492	*N32*)
10493	  LD="${LD-ld} -n32"
10494	  ;;
10495	*64-bit*)
10496	  LD="${LD-ld} -64"
10497	  ;;
10498      esac
10499    fi
10500  fi
10501  rm -rf conftest*
10502  ;;
10503
10504mips64*-*linux*)
10505  # Find out what ABI is being produced by ac_compile, and set linker
10506  # options accordingly.
10507  echo '#line '$LINENO' "configure"' > conftest.$ac_ext
10508  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
10509  (eval $ac_compile) 2>&5
10510  ac_status=$?
10511  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
10512  test $ac_status = 0; }; then
10513    emul=elf
10514    case `/usr/bin/file conftest.$ac_objext` in
10515      *32-bit*)
10516	emul="${emul}32"
10517	;;
10518      *64-bit*)
10519	emul="${emul}64"
10520	;;
10521    esac
10522    case `/usr/bin/file conftest.$ac_objext` in
10523      *MSB*)
10524	emul="${emul}btsmip"
10525	;;
10526      *LSB*)
10527	emul="${emul}ltsmip"
10528	;;
10529    esac
10530    case `/usr/bin/file conftest.$ac_objext` in
10531      *N32*)
10532	emul="${emul}n32"
10533	;;
10534    esac
10535    LD="${LD-ld} -m $emul"
10536  fi
10537  rm -rf conftest*
10538  ;;
10539
10540x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \
10541s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
10542  # Find out what ABI is being produced by ac_compile, and set linker
10543  # options accordingly.  Note that the listed cases only cover the
10544  # situations where additional linker options are needed (such as when
10545  # doing 32-bit compilation for a host where ld defaults to 64-bit, or
10546  # vice versa); the common cases where no linker options are needed do
10547  # not appear in the list.
10548  echo 'int i;' > conftest.$ac_ext
10549  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
10550  (eval $ac_compile) 2>&5
10551  ac_status=$?
10552  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
10553  test $ac_status = 0; }; then
10554    case `/usr/bin/file conftest.o` in
10555      *32-bit*)
10556	case $host in
10557	  x86_64-*kfreebsd*-gnu)
10558	    LD="${LD-ld} -m elf_i386_fbsd"
10559	    ;;
10560	  x86_64-*linux*)
10561	    case `/usr/bin/file conftest.o` in
10562	      *x86-64*)
10563		LD="${LD-ld} -m elf32_x86_64"
10564		;;
10565	      *)
10566		LD="${LD-ld} -m elf_i386"
10567		;;
10568	    esac
10569	    ;;
10570	  powerpc64le-*linux*)
10571	    LD="${LD-ld} -m elf32lppclinux"
10572	    ;;
10573	  powerpc64-*linux*)
10574	    LD="${LD-ld} -m elf32ppclinux"
10575	    ;;
10576	  s390x-*linux*)
10577	    LD="${LD-ld} -m elf_s390"
10578	    ;;
10579	  sparc64-*linux*)
10580	    LD="${LD-ld} -m elf32_sparc"
10581	    ;;
10582	esac
10583	;;
10584      *64-bit*)
10585	case $host in
10586	  x86_64-*kfreebsd*-gnu)
10587	    LD="${LD-ld} -m elf_x86_64_fbsd"
10588	    ;;
10589	  x86_64-*linux*)
10590	    LD="${LD-ld} -m elf_x86_64"
10591	    ;;
10592	  powerpcle-*linux*)
10593	    LD="${LD-ld} -m elf64lppc"
10594	    ;;
10595	  powerpc-*linux*)
10596	    LD="${LD-ld} -m elf64ppc"
10597	    ;;
10598	  s390*-*linux*|s390*-*tpf*)
10599	    LD="${LD-ld} -m elf64_s390"
10600	    ;;
10601	  sparc*-*linux*)
10602	    LD="${LD-ld} -m elf64_sparc"
10603	    ;;
10604	esac
10605	;;
10606    esac
10607  fi
10608  rm -rf conftest*
10609  ;;
10610
10611*-*-sco3.2v5*)
10612  # On SCO OpenServer 5, we need -belf to get full-featured binaries.
10613  SAVE_CFLAGS=$CFLAGS
10614  CFLAGS="$CFLAGS -belf"
10615  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5
10616printf %s "checking whether the C compiler needs -belf... " >&6; }
10617if test ${lt_cv_cc_needs_belf+y}
10618then :
10619  printf %s "(cached) " >&6
10620else case e in #(
10621  e) ac_ext=c
10622ac_cpp='$CPP $CPPFLAGS'
10623ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
10624ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
10625ac_compiler_gnu=$ac_cv_c_compiler_gnu
10626
10627     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10628/* end confdefs.h.  */
10629
10630int
10631main (void)
10632{
10633
10634  ;
10635  return 0;
10636}
10637_ACEOF
10638if ac_fn_c_try_link "$LINENO"
10639then :
10640  lt_cv_cc_needs_belf=yes
10641else case e in #(
10642  e) lt_cv_cc_needs_belf=no ;;
10643esac
10644fi
10645rm -f core conftest.err conftest.$ac_objext conftest.beam \
10646    conftest$ac_exeext conftest.$ac_ext
10647     ac_ext=c
10648ac_cpp='$CPP $CPPFLAGS'
10649ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
10650ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
10651ac_compiler_gnu=$ac_cv_c_compiler_gnu
10652 ;;
10653esac
10654fi
10655{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5
10656printf "%s\n" "$lt_cv_cc_needs_belf" >&6; }
10657  if test yes != "$lt_cv_cc_needs_belf"; then
10658    # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
10659    CFLAGS=$SAVE_CFLAGS
10660  fi
10661  ;;
10662*-*solaris*)
10663  # Find out what ABI is being produced by ac_compile, and set linker
10664  # options accordingly.
10665  echo 'int i;' > conftest.$ac_ext
10666  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
10667  (eval $ac_compile) 2>&5
10668  ac_status=$?
10669  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
10670  test $ac_status = 0; }; then
10671    case `/usr/bin/file conftest.o` in
10672    *64-bit*)
10673      case $lt_cv_prog_gnu_ld in
10674      yes*)
10675        case $host in
10676        i?86-*-solaris*|x86_64-*-solaris*)
10677          LD="${LD-ld} -m elf_x86_64"
10678          ;;
10679        sparc*-*-solaris*)
10680          LD="${LD-ld} -m elf64_sparc"
10681          ;;
10682        esac
10683        # GNU ld 2.21 introduced _sol2 emulations.  Use them if available.
10684        if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then
10685          LD=${LD-ld}_sol2
10686        fi
10687        ;;
10688      *)
10689	if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
10690	  LD="${LD-ld} -64"
10691	fi
10692	;;
10693      esac
10694      ;;
10695    esac
10696  fi
10697  rm -rf conftest*
10698  ;;
10699esac
10700
10701need_locks=$enable_libtool_lock
10702
10703if test -n "$ac_tool_prefix"; then
10704  # Extract the first word of "${ac_tool_prefix}mt", so it can be a program name with args.
10705set dummy ${ac_tool_prefix}mt; ac_word=$2
10706{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10707printf %s "checking for $ac_word... " >&6; }
10708if test ${ac_cv_prog_MANIFEST_TOOL+y}
10709then :
10710  printf %s "(cached) " >&6
10711else case e in #(
10712  e) if test -n "$MANIFEST_TOOL"; then
10713  ac_cv_prog_MANIFEST_TOOL="$MANIFEST_TOOL" # Let the user override the test.
10714else
10715as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10716for as_dir in $PATH
10717do
10718  IFS=$as_save_IFS
10719  case $as_dir in #(((
10720    '') as_dir=./ ;;
10721    */) ;;
10722    *) as_dir=$as_dir/ ;;
10723  esac
10724    for ac_exec_ext in '' $ac_executable_extensions; do
10725  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
10726    ac_cv_prog_MANIFEST_TOOL="${ac_tool_prefix}mt"
10727    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
10728    break 2
10729  fi
10730done
10731  done
10732IFS=$as_save_IFS
10733
10734fi ;;
10735esac
10736fi
10737MANIFEST_TOOL=$ac_cv_prog_MANIFEST_TOOL
10738if test -n "$MANIFEST_TOOL"; then
10739  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MANIFEST_TOOL" >&5
10740printf "%s\n" "$MANIFEST_TOOL" >&6; }
10741else
10742  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
10743printf "%s\n" "no" >&6; }
10744fi
10745
10746
10747fi
10748if test -z "$ac_cv_prog_MANIFEST_TOOL"; then
10749  ac_ct_MANIFEST_TOOL=$MANIFEST_TOOL
10750  # Extract the first word of "mt", so it can be a program name with args.
10751set dummy mt; ac_word=$2
10752{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10753printf %s "checking for $ac_word... " >&6; }
10754if test ${ac_cv_prog_ac_ct_MANIFEST_TOOL+y}
10755then :
10756  printf %s "(cached) " >&6
10757else case e in #(
10758  e) if test -n "$ac_ct_MANIFEST_TOOL"; then
10759  ac_cv_prog_ac_ct_MANIFEST_TOOL="$ac_ct_MANIFEST_TOOL" # Let the user override the test.
10760else
10761as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10762for as_dir in $PATH
10763do
10764  IFS=$as_save_IFS
10765  case $as_dir in #(((
10766    '') as_dir=./ ;;
10767    */) ;;
10768    *) as_dir=$as_dir/ ;;
10769  esac
10770    for ac_exec_ext in '' $ac_executable_extensions; do
10771  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
10772    ac_cv_prog_ac_ct_MANIFEST_TOOL="mt"
10773    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
10774    break 2
10775  fi
10776done
10777  done
10778IFS=$as_save_IFS
10779
10780fi ;;
10781esac
10782fi
10783ac_ct_MANIFEST_TOOL=$ac_cv_prog_ac_ct_MANIFEST_TOOL
10784if test -n "$ac_ct_MANIFEST_TOOL"; then
10785  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MANIFEST_TOOL" >&5
10786printf "%s\n" "$ac_ct_MANIFEST_TOOL" >&6; }
10787else
10788  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
10789printf "%s\n" "no" >&6; }
10790fi
10791
10792  if test "x$ac_ct_MANIFEST_TOOL" = x; then
10793    MANIFEST_TOOL=":"
10794  else
10795    case $cross_compiling:$ac_tool_warned in
10796yes:)
10797{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
10798printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
10799ac_tool_warned=yes ;;
10800esac
10801    MANIFEST_TOOL=$ac_ct_MANIFEST_TOOL
10802  fi
10803else
10804  MANIFEST_TOOL="$ac_cv_prog_MANIFEST_TOOL"
10805fi
10806
10807test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt
10808{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool" >&5
10809printf %s "checking if $MANIFEST_TOOL is a manifest tool... " >&6; }
10810if test ${lt_cv_path_mainfest_tool+y}
10811then :
10812  printf %s "(cached) " >&6
10813else case e in #(
10814  e) lt_cv_path_mainfest_tool=no
10815  echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&5
10816  $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out
10817  cat conftest.err >&5
10818  if $GREP 'Manifest Tool' conftest.out > /dev/null; then
10819    lt_cv_path_mainfest_tool=yes
10820  fi
10821  rm -f conftest* ;;
10822esac
10823fi
10824{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5
10825printf "%s\n" "$lt_cv_path_mainfest_tool" >&6; }
10826if test yes != "$lt_cv_path_mainfest_tool"; then
10827  MANIFEST_TOOL=:
10828fi
10829
10830
10831
10832
10833
10834
10835  case $host_os in
10836    rhapsody* | darwin*)
10837    if test -n "$ac_tool_prefix"; then
10838  # Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args.
10839set dummy ${ac_tool_prefix}dsymutil; ac_word=$2
10840{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10841printf %s "checking for $ac_word... " >&6; }
10842if test ${ac_cv_prog_DSYMUTIL+y}
10843then :
10844  printf %s "(cached) " >&6
10845else case e in #(
10846  e) if test -n "$DSYMUTIL"; then
10847  ac_cv_prog_DSYMUTIL="$DSYMUTIL" # Let the user override the test.
10848else
10849as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10850for as_dir in $PATH
10851do
10852  IFS=$as_save_IFS
10853  case $as_dir in #(((
10854    '') as_dir=./ ;;
10855    */) ;;
10856    *) as_dir=$as_dir/ ;;
10857  esac
10858    for ac_exec_ext in '' $ac_executable_extensions; do
10859  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
10860    ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil"
10861    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
10862    break 2
10863  fi
10864done
10865  done
10866IFS=$as_save_IFS
10867
10868fi ;;
10869esac
10870fi
10871DSYMUTIL=$ac_cv_prog_DSYMUTIL
10872if test -n "$DSYMUTIL"; then
10873  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
10874printf "%s\n" "$DSYMUTIL" >&6; }
10875else
10876  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
10877printf "%s\n" "no" >&6; }
10878fi
10879
10880
10881fi
10882if test -z "$ac_cv_prog_DSYMUTIL"; then
10883  ac_ct_DSYMUTIL=$DSYMUTIL
10884  # Extract the first word of "dsymutil", so it can be a program name with args.
10885set dummy dsymutil; ac_word=$2
10886{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10887printf %s "checking for $ac_word... " >&6; }
10888if test ${ac_cv_prog_ac_ct_DSYMUTIL+y}
10889then :
10890  printf %s "(cached) " >&6
10891else case e in #(
10892  e) if test -n "$ac_ct_DSYMUTIL"; then
10893  ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # Let the user override the test.
10894else
10895as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10896for as_dir in $PATH
10897do
10898  IFS=$as_save_IFS
10899  case $as_dir in #(((
10900    '') as_dir=./ ;;
10901    */) ;;
10902    *) as_dir=$as_dir/ ;;
10903  esac
10904    for ac_exec_ext in '' $ac_executable_extensions; do
10905  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
10906    ac_cv_prog_ac_ct_DSYMUTIL="dsymutil"
10907    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
10908    break 2
10909  fi
10910done
10911  done
10912IFS=$as_save_IFS
10913
10914fi ;;
10915esac
10916fi
10917ac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL
10918if test -n "$ac_ct_DSYMUTIL"; then
10919  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DSYMUTIL" >&5
10920printf "%s\n" "$ac_ct_DSYMUTIL" >&6; }
10921else
10922  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
10923printf "%s\n" "no" >&6; }
10924fi
10925
10926  if test "x$ac_ct_DSYMUTIL" = x; then
10927    DSYMUTIL=":"
10928  else
10929    case $cross_compiling:$ac_tool_warned in
10930yes:)
10931{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
10932printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
10933ac_tool_warned=yes ;;
10934esac
10935    DSYMUTIL=$ac_ct_DSYMUTIL
10936  fi
10937else
10938  DSYMUTIL="$ac_cv_prog_DSYMUTIL"
10939fi
10940
10941    if test -n "$ac_tool_prefix"; then
10942  # Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args.
10943set dummy ${ac_tool_prefix}nmedit; ac_word=$2
10944{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10945printf %s "checking for $ac_word... " >&6; }
10946if test ${ac_cv_prog_NMEDIT+y}
10947then :
10948  printf %s "(cached) " >&6
10949else case e in #(
10950  e) if test -n "$NMEDIT"; then
10951  ac_cv_prog_NMEDIT="$NMEDIT" # Let the user override the test.
10952else
10953as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10954for as_dir in $PATH
10955do
10956  IFS=$as_save_IFS
10957  case $as_dir in #(((
10958    '') as_dir=./ ;;
10959    */) ;;
10960    *) as_dir=$as_dir/ ;;
10961  esac
10962    for ac_exec_ext in '' $ac_executable_extensions; do
10963  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
10964    ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit"
10965    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
10966    break 2
10967  fi
10968done
10969  done
10970IFS=$as_save_IFS
10971
10972fi ;;
10973esac
10974fi
10975NMEDIT=$ac_cv_prog_NMEDIT
10976if test -n "$NMEDIT"; then
10977  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $NMEDIT" >&5
10978printf "%s\n" "$NMEDIT" >&6; }
10979else
10980  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
10981printf "%s\n" "no" >&6; }
10982fi
10983
10984
10985fi
10986if test -z "$ac_cv_prog_NMEDIT"; then
10987  ac_ct_NMEDIT=$NMEDIT
10988  # Extract the first word of "nmedit", so it can be a program name with args.
10989set dummy nmedit; ac_word=$2
10990{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10991printf %s "checking for $ac_word... " >&6; }
10992if test ${ac_cv_prog_ac_ct_NMEDIT+y}
10993then :
10994  printf %s "(cached) " >&6
10995else case e in #(
10996  e) if test -n "$ac_ct_NMEDIT"; then
10997  ac_cv_prog_ac_ct_NMEDIT="$ac_ct_NMEDIT" # Let the user override the test.
10998else
10999as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11000for as_dir in $PATH
11001do
11002  IFS=$as_save_IFS
11003  case $as_dir in #(((
11004    '') as_dir=./ ;;
11005    */) ;;
11006    *) as_dir=$as_dir/ ;;
11007  esac
11008    for ac_exec_ext in '' $ac_executable_extensions; do
11009  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
11010    ac_cv_prog_ac_ct_NMEDIT="nmedit"
11011    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
11012    break 2
11013  fi
11014done
11015  done
11016IFS=$as_save_IFS
11017
11018fi ;;
11019esac
11020fi
11021ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT
11022if test -n "$ac_ct_NMEDIT"; then
11023  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NMEDIT" >&5
11024printf "%s\n" "$ac_ct_NMEDIT" >&6; }
11025else
11026  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
11027printf "%s\n" "no" >&6; }
11028fi
11029
11030  if test "x$ac_ct_NMEDIT" = x; then
11031    NMEDIT=":"
11032  else
11033    case $cross_compiling:$ac_tool_warned in
11034yes:)
11035{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
11036printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
11037ac_tool_warned=yes ;;
11038esac
11039    NMEDIT=$ac_ct_NMEDIT
11040  fi
11041else
11042  NMEDIT="$ac_cv_prog_NMEDIT"
11043fi
11044
11045    if test -n "$ac_tool_prefix"; then
11046  # Extract the first word of "${ac_tool_prefix}lipo", so it can be a program name with args.
11047set dummy ${ac_tool_prefix}lipo; ac_word=$2
11048{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11049printf %s "checking for $ac_word... " >&6; }
11050if test ${ac_cv_prog_LIPO+y}
11051then :
11052  printf %s "(cached) " >&6
11053else case e in #(
11054  e) if test -n "$LIPO"; then
11055  ac_cv_prog_LIPO="$LIPO" # Let the user override the test.
11056else
11057as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11058for as_dir in $PATH
11059do
11060  IFS=$as_save_IFS
11061  case $as_dir in #(((
11062    '') as_dir=./ ;;
11063    */) ;;
11064    *) as_dir=$as_dir/ ;;
11065  esac
11066    for ac_exec_ext in '' $ac_executable_extensions; do
11067  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
11068    ac_cv_prog_LIPO="${ac_tool_prefix}lipo"
11069    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
11070    break 2
11071  fi
11072done
11073  done
11074IFS=$as_save_IFS
11075
11076fi ;;
11077esac
11078fi
11079LIPO=$ac_cv_prog_LIPO
11080if test -n "$LIPO"; then
11081  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
11082printf "%s\n" "$LIPO" >&6; }
11083else
11084  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
11085printf "%s\n" "no" >&6; }
11086fi
11087
11088
11089fi
11090if test -z "$ac_cv_prog_LIPO"; then
11091  ac_ct_LIPO=$LIPO
11092  # Extract the first word of "lipo", so it can be a program name with args.
11093set dummy lipo; ac_word=$2
11094{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11095printf %s "checking for $ac_word... " >&6; }
11096if test ${ac_cv_prog_ac_ct_LIPO+y}
11097then :
11098  printf %s "(cached) " >&6
11099else case e in #(
11100  e) if test -n "$ac_ct_LIPO"; then
11101  ac_cv_prog_ac_ct_LIPO="$ac_ct_LIPO" # Let the user override the test.
11102else
11103as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11104for as_dir in $PATH
11105do
11106  IFS=$as_save_IFS
11107  case $as_dir in #(((
11108    '') as_dir=./ ;;
11109    */) ;;
11110    *) as_dir=$as_dir/ ;;
11111  esac
11112    for ac_exec_ext in '' $ac_executable_extensions; do
11113  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
11114    ac_cv_prog_ac_ct_LIPO="lipo"
11115    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
11116    break 2
11117  fi
11118done
11119  done
11120IFS=$as_save_IFS
11121
11122fi ;;
11123esac
11124fi
11125ac_ct_LIPO=$ac_cv_prog_ac_ct_LIPO
11126if test -n "$ac_ct_LIPO"; then
11127  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LIPO" >&5
11128printf "%s\n" "$ac_ct_LIPO" >&6; }
11129else
11130  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
11131printf "%s\n" "no" >&6; }
11132fi
11133
11134  if test "x$ac_ct_LIPO" = x; then
11135    LIPO=":"
11136  else
11137    case $cross_compiling:$ac_tool_warned in
11138yes:)
11139{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
11140printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
11141ac_tool_warned=yes ;;
11142esac
11143    LIPO=$ac_ct_LIPO
11144  fi
11145else
11146  LIPO="$ac_cv_prog_LIPO"
11147fi
11148
11149    if test -n "$ac_tool_prefix"; then
11150  # Extract the first word of "${ac_tool_prefix}otool", so it can be a program name with args.
11151set dummy ${ac_tool_prefix}otool; ac_word=$2
11152{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11153printf %s "checking for $ac_word... " >&6; }
11154if test ${ac_cv_prog_OTOOL+y}
11155then :
11156  printf %s "(cached) " >&6
11157else case e in #(
11158  e) if test -n "$OTOOL"; then
11159  ac_cv_prog_OTOOL="$OTOOL" # Let the user override the test.
11160else
11161as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11162for as_dir in $PATH
11163do
11164  IFS=$as_save_IFS
11165  case $as_dir in #(((
11166    '') as_dir=./ ;;
11167    */) ;;
11168    *) as_dir=$as_dir/ ;;
11169  esac
11170    for ac_exec_ext in '' $ac_executable_extensions; do
11171  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
11172    ac_cv_prog_OTOOL="${ac_tool_prefix}otool"
11173    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
11174    break 2
11175  fi
11176done
11177  done
11178IFS=$as_save_IFS
11179
11180fi ;;
11181esac
11182fi
11183OTOOL=$ac_cv_prog_OTOOL
11184if test -n "$OTOOL"; then
11185  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
11186printf "%s\n" "$OTOOL" >&6; }
11187else
11188  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
11189printf "%s\n" "no" >&6; }
11190fi
11191
11192
11193fi
11194if test -z "$ac_cv_prog_OTOOL"; then
11195  ac_ct_OTOOL=$OTOOL
11196  # Extract the first word of "otool", so it can be a program name with args.
11197set dummy otool; ac_word=$2
11198{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11199printf %s "checking for $ac_word... " >&6; }
11200if test ${ac_cv_prog_ac_ct_OTOOL+y}
11201then :
11202  printf %s "(cached) " >&6
11203else case e in #(
11204  e) if test -n "$ac_ct_OTOOL"; then
11205  ac_cv_prog_ac_ct_OTOOL="$ac_ct_OTOOL" # Let the user override the test.
11206else
11207as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11208for as_dir in $PATH
11209do
11210  IFS=$as_save_IFS
11211  case $as_dir in #(((
11212    '') as_dir=./ ;;
11213    */) ;;
11214    *) as_dir=$as_dir/ ;;
11215  esac
11216    for ac_exec_ext in '' $ac_executable_extensions; do
11217  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
11218    ac_cv_prog_ac_ct_OTOOL="otool"
11219    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
11220    break 2
11221  fi
11222done
11223  done
11224IFS=$as_save_IFS
11225
11226fi ;;
11227esac
11228fi
11229ac_ct_OTOOL=$ac_cv_prog_ac_ct_OTOOL
11230if test -n "$ac_ct_OTOOL"; then
11231  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL" >&5
11232printf "%s\n" "$ac_ct_OTOOL" >&6; }
11233else
11234  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
11235printf "%s\n" "no" >&6; }
11236fi
11237
11238  if test "x$ac_ct_OTOOL" = x; then
11239    OTOOL=":"
11240  else
11241    case $cross_compiling:$ac_tool_warned in
11242yes:)
11243{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
11244printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
11245ac_tool_warned=yes ;;
11246esac
11247    OTOOL=$ac_ct_OTOOL
11248  fi
11249else
11250  OTOOL="$ac_cv_prog_OTOOL"
11251fi
11252
11253    if test -n "$ac_tool_prefix"; then
11254  # Extract the first word of "${ac_tool_prefix}otool64", so it can be a program name with args.
11255set dummy ${ac_tool_prefix}otool64; ac_word=$2
11256{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11257printf %s "checking for $ac_word... " >&6; }
11258if test ${ac_cv_prog_OTOOL64+y}
11259then :
11260  printf %s "(cached) " >&6
11261else case e in #(
11262  e) if test -n "$OTOOL64"; then
11263  ac_cv_prog_OTOOL64="$OTOOL64" # Let the user override the test.
11264else
11265as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11266for as_dir in $PATH
11267do
11268  IFS=$as_save_IFS
11269  case $as_dir in #(((
11270    '') as_dir=./ ;;
11271    */) ;;
11272    *) as_dir=$as_dir/ ;;
11273  esac
11274    for ac_exec_ext in '' $ac_executable_extensions; do
11275  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
11276    ac_cv_prog_OTOOL64="${ac_tool_prefix}otool64"
11277    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
11278    break 2
11279  fi
11280done
11281  done
11282IFS=$as_save_IFS
11283
11284fi ;;
11285esac
11286fi
11287OTOOL64=$ac_cv_prog_OTOOL64
11288if test -n "$OTOOL64"; then
11289  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $OTOOL64" >&5
11290printf "%s\n" "$OTOOL64" >&6; }
11291else
11292  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
11293printf "%s\n" "no" >&6; }
11294fi
11295
11296
11297fi
11298if test -z "$ac_cv_prog_OTOOL64"; then
11299  ac_ct_OTOOL64=$OTOOL64
11300  # Extract the first word of "otool64", so it can be a program name with args.
11301set dummy otool64; ac_word=$2
11302{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11303printf %s "checking for $ac_word... " >&6; }
11304if test ${ac_cv_prog_ac_ct_OTOOL64+y}
11305then :
11306  printf %s "(cached) " >&6
11307else case e in #(
11308  e) if test -n "$ac_ct_OTOOL64"; then
11309  ac_cv_prog_ac_ct_OTOOL64="$ac_ct_OTOOL64" # Let the user override the test.
11310else
11311as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11312for as_dir in $PATH
11313do
11314  IFS=$as_save_IFS
11315  case $as_dir in #(((
11316    '') as_dir=./ ;;
11317    */) ;;
11318    *) as_dir=$as_dir/ ;;
11319  esac
11320    for ac_exec_ext in '' $ac_executable_extensions; do
11321  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
11322    ac_cv_prog_ac_ct_OTOOL64="otool64"
11323    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
11324    break 2
11325  fi
11326done
11327  done
11328IFS=$as_save_IFS
11329
11330fi ;;
11331esac
11332fi
11333ac_ct_OTOOL64=$ac_cv_prog_ac_ct_OTOOL64
11334if test -n "$ac_ct_OTOOL64"; then
11335  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL64" >&5
11336printf "%s\n" "$ac_ct_OTOOL64" >&6; }
11337else
11338  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
11339printf "%s\n" "no" >&6; }
11340fi
11341
11342  if test "x$ac_ct_OTOOL64" = x; then
11343    OTOOL64=":"
11344  else
11345    case $cross_compiling:$ac_tool_warned in
11346yes:)
11347{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
11348printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
11349ac_tool_warned=yes ;;
11350esac
11351    OTOOL64=$ac_ct_OTOOL64
11352  fi
11353else
11354  OTOOL64="$ac_cv_prog_OTOOL64"
11355fi
11356
11357
11358
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    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for -single_module linker flag" >&5
11384printf %s "checking for -single_module linker flag... " >&6; }
11385if test ${lt_cv_apple_cc_single_mod+y}
11386then :
11387  printf %s "(cached) " >&6
11388else case e in #(
11389  e) lt_cv_apple_cc_single_mod=no
11390      if test -z "$LT_MULTI_MODULE"; then
11391	# By default we will add the -single_module flag. You can override
11392	# by either setting the environment variable LT_MULTI_MODULE
11393	# non-empty at configure time, or by adding -multi_module to the
11394	# link flags.
11395	rm -rf libconftest.dylib*
11396	echo "int foo(void){return 1;}" > conftest.c
11397	echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
11398-dynamiclib -Wl,-single_module conftest.c" >&5
11399	$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
11400	  -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
11401        _lt_result=$?
11402	# If there is a non-empty error log, and "single_module"
11403	# appears in it, assume the flag caused a linker warning
11404        if test -s conftest.err && $GREP single_module conftest.err; then
11405	  cat conftest.err >&5
11406	# Otherwise, if the output was created with a 0 exit code from
11407	# the compiler, it worked.
11408	elif test -f libconftest.dylib && test 0 = "$_lt_result"; then
11409	  lt_cv_apple_cc_single_mod=yes
11410	else
11411	  cat conftest.err >&5
11412	fi
11413	rm -rf libconftest.dylib*
11414	rm -f conftest.*
11415      fi ;;
11416esac
11417fi
11418{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5
11419printf "%s\n" "$lt_cv_apple_cc_single_mod" >&6; }
11420
11421    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5
11422printf %s "checking for -exported_symbols_list linker flag... " >&6; }
11423if test ${lt_cv_ld_exported_symbols_list+y}
11424then :
11425  printf %s "(cached) " >&6
11426else case e in #(
11427  e) lt_cv_ld_exported_symbols_list=no
11428      save_LDFLAGS=$LDFLAGS
11429      echo "_main" > conftest.sym
11430      LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
11431      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11432/* end confdefs.h.  */
11433
11434int
11435main (void)
11436{
11437
11438  ;
11439  return 0;
11440}
11441_ACEOF
11442if ac_fn_c_try_link "$LINENO"
11443then :
11444  lt_cv_ld_exported_symbols_list=yes
11445else case e in #(
11446  e) lt_cv_ld_exported_symbols_list=no ;;
11447esac
11448fi
11449rm -f core conftest.err conftest.$ac_objext conftest.beam \
11450    conftest$ac_exeext conftest.$ac_ext
11451	LDFLAGS=$save_LDFLAGS
11452     ;;
11453esac
11454fi
11455{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5
11456printf "%s\n" "$lt_cv_ld_exported_symbols_list" >&6; }
11457
11458    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for -force_load linker flag" >&5
11459printf %s "checking for -force_load linker flag... " >&6; }
11460if test ${lt_cv_ld_force_load+y}
11461then :
11462  printf %s "(cached) " >&6
11463else case e in #(
11464  e) lt_cv_ld_force_load=no
11465      cat > conftest.c << _LT_EOF
11466int forced_loaded() { return 2;}
11467_LT_EOF
11468      echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&5
11469      $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5
11470      echo "$AR cru libconftest.a conftest.o" >&5
11471      $AR cru libconftest.a conftest.o 2>&5
11472      echo "$RANLIB libconftest.a" >&5
11473      $RANLIB libconftest.a 2>&5
11474      cat > conftest.c << _LT_EOF
11475int main() { return 0;}
11476_LT_EOF
11477      echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&5
11478      $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err
11479      _lt_result=$?
11480      if test -s conftest.err && $GREP force_load conftest.err; then
11481	cat conftest.err >&5
11482      elif test -f conftest && test 0 = "$_lt_result" && $GREP forced_load conftest >/dev/null 2>&1; then
11483	lt_cv_ld_force_load=yes
11484      else
11485	cat conftest.err >&5
11486      fi
11487        rm -f conftest.err libconftest.a conftest conftest.c
11488        rm -rf conftest.dSYM
11489     ;;
11490esac
11491fi
11492{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_force_load" >&5
11493printf "%s\n" "$lt_cv_ld_force_load" >&6; }
11494    case $host_os in
11495    rhapsody* | darwin1.[012])
11496      _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;;
11497    darwin1.*)
11498      _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
11499    darwin*) # darwin 5.x on
11500      # if running on 10.5 or later, the deployment target defaults
11501      # to the OS version, if on x86, and 10.4, the deployment
11502      # target defaults to 10.4. Don't you love it?
11503      case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
11504	10.0,*86*-darwin8*|10.0,*-darwin[91]*)
11505	  _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
11506	10.[012][,.]*)
11507	  _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
11508	10.*)
11509	  _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
11510      esac
11511    ;;
11512  esac
11513    if test yes = "$lt_cv_apple_cc_single_mod"; then
11514      _lt_dar_single_mod='$single_module'
11515    fi
11516    if test yes = "$lt_cv_ld_exported_symbols_list"; then
11517      _lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym'
11518    else
11519      _lt_dar_export_syms='~$NMEDIT -s $output_objdir/$libname-symbols.expsym $lib'
11520    fi
11521    if test : != "$DSYMUTIL" && test no = "$lt_cv_ld_force_load"; then
11522      _lt_dsymutil='~$DSYMUTIL $lib || :'
11523    else
11524      _lt_dsymutil=
11525    fi
11526    ;;
11527  esac
11528
11529# func_munge_path_list VARIABLE PATH
11530# -----------------------------------
11531# VARIABLE is name of variable containing _space_ separated list of
11532# directories to be munged by the contents of PATH, which is string
11533# having a format:
11534# "DIR[:DIR]:"
11535#       string "DIR[ DIR]" will be prepended to VARIABLE
11536# ":DIR[:DIR]"
11537#       string "DIR[ DIR]" will be appended to VARIABLE
11538# "DIRP[:DIRP]::[DIRA:]DIRA"
11539#       string "DIRP[ DIRP]" will be prepended to VARIABLE and string
11540#       "DIRA[ DIRA]" will be appended to VARIABLE
11541# "DIR[:DIR]"
11542#       VARIABLE will be replaced by "DIR[ DIR]"
11543func_munge_path_list ()
11544{
11545    case x$2 in
11546    x)
11547        ;;
11548    *:)
11549        eval $1=\"`$ECHO $2 | $SED 's/:/ /g'` \$$1\"
11550        ;;
11551    x:*)
11552        eval $1=\"\$$1 `$ECHO $2 | $SED 's/:/ /g'`\"
11553        ;;
11554    *::*)
11555        eval $1=\"\$$1\ `$ECHO $2 | $SED -e 's/.*:://' -e 's/:/ /g'`\"
11556        eval $1=\"`$ECHO $2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \$$1\"
11557        ;;
11558    *)
11559        eval $1=\"`$ECHO $2 | $SED 's/:/ /g'`\"
11560        ;;
11561    esac
11562}
11563
11564ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default
11565"
11566if test "x$ac_cv_header_dlfcn_h" = xyes
11567then :
11568  printf "%s\n" "#define HAVE_DLFCN_H 1" >>confdefs.h
11569
11570fi
11571
11572
11573
11574
11575
11576
11577
11578# Set options
11579
11580
11581
11582        enable_dlopen=no
11583
11584
11585  enable_win32_dll=no
11586
11587
11588            # Check whether --enable-shared was given.
11589if test ${enable_shared+y}
11590then :
11591  enableval=$enable_shared; p=${PACKAGE-default}
11592    case $enableval in
11593    yes) enable_shared=yes ;;
11594    no) enable_shared=no ;;
11595    *)
11596      enable_shared=no
11597      # Look at the argument we got.  We use all the common list separators.
11598      lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
11599      for pkg in $enableval; do
11600	IFS=$lt_save_ifs
11601	if test "X$pkg" = "X$p"; then
11602	  enable_shared=yes
11603	fi
11604      done
11605      IFS=$lt_save_ifs
11606      ;;
11607    esac
11608else case e in #(
11609  e) enable_shared=yes ;;
11610esac
11611fi
11612
11613
11614
11615
11616
11617
11618
11619
11620
11621  # Check whether --enable-static was given.
11622if test ${enable_static+y}
11623then :
11624  enableval=$enable_static; p=${PACKAGE-default}
11625    case $enableval in
11626    yes) enable_static=yes ;;
11627    no) enable_static=no ;;
11628    *)
11629     enable_static=no
11630      # Look at the argument we got.  We use all the common list separators.
11631      lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
11632      for pkg in $enableval; do
11633	IFS=$lt_save_ifs
11634	if test "X$pkg" = "X$p"; then
11635	  enable_static=yes
11636	fi
11637      done
11638      IFS=$lt_save_ifs
11639      ;;
11640    esac
11641else case e in #(
11642  e) enable_static=yes ;;
11643esac
11644fi
11645
11646
11647
11648
11649
11650
11651
11652
11653
11654
11655# Check whether --with-pic was given.
11656if test ${with_pic+y}
11657then :
11658  withval=$with_pic; lt_p=${PACKAGE-default}
11659    case $withval in
11660    yes|no) pic_mode=$withval ;;
11661    *)
11662      pic_mode=default
11663      # Look at the argument we got.  We use all the common list separators.
11664      lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
11665      for lt_pkg in $withval; do
11666	IFS=$lt_save_ifs
11667	if test "X$lt_pkg" = "X$lt_p"; then
11668	  pic_mode=yes
11669	fi
11670      done
11671      IFS=$lt_save_ifs
11672      ;;
11673    esac
11674else case e in #(
11675  e) pic_mode=default ;;
11676esac
11677fi
11678
11679
11680
11681
11682
11683
11684
11685
11686  # Check whether --enable-fast-install was given.
11687if test ${enable_fast_install+y}
11688then :
11689  enableval=$enable_fast_install; p=${PACKAGE-default}
11690    case $enableval in
11691    yes) enable_fast_install=yes ;;
11692    no) enable_fast_install=no ;;
11693    *)
11694      enable_fast_install=no
11695      # Look at the argument we got.  We use all the common list separators.
11696      lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
11697      for pkg in $enableval; do
11698	IFS=$lt_save_ifs
11699	if test "X$pkg" = "X$p"; then
11700	  enable_fast_install=yes
11701	fi
11702      done
11703      IFS=$lt_save_ifs
11704      ;;
11705    esac
11706else case e in #(
11707  e) enable_fast_install=yes ;;
11708esac
11709fi
11710
11711
11712
11713
11714
11715
11716
11717
11718  shared_archive_member_spec=
11719case $host,$enable_shared in
11720power*-*-aix[5-9]*,yes)
11721  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking which variant of shared library versioning to provide" >&5
11722printf %s "checking which variant of shared library versioning to provide... " >&6; }
11723
11724# Check whether --with-aix-soname was given.
11725if test ${with_aix_soname+y}
11726then :
11727  withval=$with_aix_soname; case $withval in
11728    aix|svr4|both)
11729      ;;
11730    *)
11731      as_fn_error $? "Unknown argument to --with-aix-soname" "$LINENO" 5
11732      ;;
11733    esac
11734    lt_cv_with_aix_soname=$with_aix_soname
11735else case e in #(
11736  e) if test ${lt_cv_with_aix_soname+y}
11737then :
11738  printf %s "(cached) " >&6
11739else case e in #(
11740  e) lt_cv_with_aix_soname=aix ;;
11741esac
11742fi
11743
11744    with_aix_soname=$lt_cv_with_aix_soname ;;
11745esac
11746fi
11747
11748  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $with_aix_soname" >&5
11749printf "%s\n" "$with_aix_soname" >&6; }
11750  if test aix != "$with_aix_soname"; then
11751    # For the AIX way of multilib, we name the shared archive member
11752    # based on the bitwidth used, traditionally 'shr.o' or 'shr_64.o',
11753    # and 'shr.imp' or 'shr_64.imp', respectively, for the Import File.
11754    # Even when GNU compilers ignore OBJECT_MODE but need '-maix64' flag,
11755    # the AIX toolchain works better with OBJECT_MODE set (default 32).
11756    if test 64 = "${OBJECT_MODE-32}"; then
11757      shared_archive_member_spec=shr_64
11758    else
11759      shared_archive_member_spec=shr
11760    fi
11761  fi
11762  ;;
11763*)
11764  with_aix_soname=aix
11765  ;;
11766esac
11767
11768
11769
11770
11771
11772
11773
11774
11775
11776
11777# This can be used to rebuild libtool when needed
11778LIBTOOL_DEPS=$ltmain
11779
11780# Always use our own libtool.
11781LIBTOOL='$(SHELL) $(top_builddir)/libtool'
11782
11783
11784
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
11812test -z "$LN_S" && LN_S="ln -s"
11813
11814
11815
11816
11817
11818
11819
11820
11821
11822
11823
11824
11825
11826
11827if test -n "${ZSH_VERSION+set}"; then
11828   setopt NO_GLOB_SUBST
11829fi
11830
11831{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5
11832printf %s "checking for objdir... " >&6; }
11833if test ${lt_cv_objdir+y}
11834then :
11835  printf %s "(cached) " >&6
11836else case e in #(
11837  e) rm -f .libs 2>/dev/null
11838mkdir .libs 2>/dev/null
11839if test -d .libs; then
11840  lt_cv_objdir=.libs
11841else
11842  # MS-DOS does not allow filenames that begin with a dot.
11843  lt_cv_objdir=_libs
11844fi
11845rmdir .libs 2>/dev/null ;;
11846esac
11847fi
11848{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_objdir" >&5
11849printf "%s\n" "$lt_cv_objdir" >&6; }
11850objdir=$lt_cv_objdir
11851
11852
11853
11854
11855
11856printf "%s\n" "#define LT_OBJDIR \"$lt_cv_objdir/\"" >>confdefs.h
11857
11858
11859
11860
11861case $host_os in
11862aix3*)
11863  # AIX sometimes has problems with the GCC collect2 program.  For some
11864  # reason, if we set the COLLECT_NAMES environment variable, the problems
11865  # vanish in a puff of smoke.
11866  if test set != "${COLLECT_NAMES+set}"; then
11867    COLLECT_NAMES=
11868    export COLLECT_NAMES
11869  fi
11870  ;;
11871esac
11872
11873# Global variables:
11874ofile=libtool
11875can_build_shared=yes
11876
11877# All known linkers require a '.a' archive for static linking (except MSVC,
11878# which needs '.lib').
11879libext=a
11880
11881with_gnu_ld=$lt_cv_prog_gnu_ld
11882
11883old_CC=$CC
11884old_CFLAGS=$CFLAGS
11885
11886# Set sane defaults for various variables
11887test -z "$CC" && CC=cc
11888test -z "$LTCC" && LTCC=$CC
11889test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
11890test -z "$LD" && LD=ld
11891test -z "$ac_objext" && ac_objext=o
11892
11893func_cc_basename $compiler
11894cc_basename=$func_cc_basename_result
11895
11896
11897# Only perform the check for file, if the check method requires it
11898test -z "$MAGIC_CMD" && MAGIC_CMD=file
11899case $deplibs_check_method in
11900file_magic*)
11901  if test "$file_magic_cmd" = '$MAGIC_CMD'; then
11902    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5
11903printf %s "checking for ${ac_tool_prefix}file... " >&6; }
11904if test ${lt_cv_path_MAGIC_CMD+y}
11905then :
11906  printf %s "(cached) " >&6
11907else case e in #(
11908  e) case $MAGIC_CMD in
11909[\\/*] |  ?:[\\/]*)
11910  lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path.
11911  ;;
11912*)
11913  lt_save_MAGIC_CMD=$MAGIC_CMD
11914  lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
11915  ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
11916  for ac_dir in $ac_dummy; do
11917    IFS=$lt_save_ifs
11918    test -z "$ac_dir" && ac_dir=.
11919    if test -f "$ac_dir/${ac_tool_prefix}file"; then
11920      lt_cv_path_MAGIC_CMD=$ac_dir/"${ac_tool_prefix}file"
11921      if test -n "$file_magic_test_file"; then
11922	case $deplibs_check_method in
11923	"file_magic "*)
11924	  file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
11925	  MAGIC_CMD=$lt_cv_path_MAGIC_CMD
11926	  if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
11927	    $EGREP "$file_magic_regex" > /dev/null; then
11928	    :
11929	  else
11930	    cat <<_LT_EOF 1>&2
11931
11932*** Warning: the command libtool uses to detect shared libraries,
11933*** $file_magic_cmd, produces output that libtool cannot recognize.
11934*** The result is that libtool may fail to recognize shared libraries
11935*** as such.  This will affect the creation of libtool libraries that
11936*** depend on shared libraries, but programs linked with such libtool
11937*** libraries will work regardless of this problem.  Nevertheless, you
11938*** may want to report the problem to your system manager and/or to
11939*** bug-libtool@gnu.org
11940
11941_LT_EOF
11942	  fi ;;
11943	esac
11944      fi
11945      break
11946    fi
11947  done
11948  IFS=$lt_save_ifs
11949  MAGIC_CMD=$lt_save_MAGIC_CMD
11950  ;;
11951esac ;;
11952esac
11953fi
11954
11955MAGIC_CMD=$lt_cv_path_MAGIC_CMD
11956if test -n "$MAGIC_CMD"; then
11957  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5
11958printf "%s\n" "$MAGIC_CMD" >&6; }
11959else
11960  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
11961printf "%s\n" "no" >&6; }
11962fi
11963
11964
11965
11966
11967
11968if test -z "$lt_cv_path_MAGIC_CMD"; then
11969  if test -n "$ac_tool_prefix"; then
11970    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for file" >&5
11971printf %s "checking for file... " >&6; }
11972if test ${lt_cv_path_MAGIC_CMD+y}
11973then :
11974  printf %s "(cached) " >&6
11975else case e in #(
11976  e) case $MAGIC_CMD in
11977[\\/*] |  ?:[\\/]*)
11978  lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path.
11979  ;;
11980*)
11981  lt_save_MAGIC_CMD=$MAGIC_CMD
11982  lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
11983  ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
11984  for ac_dir in $ac_dummy; do
11985    IFS=$lt_save_ifs
11986    test -z "$ac_dir" && ac_dir=.
11987    if test -f "$ac_dir/file"; then
11988      lt_cv_path_MAGIC_CMD=$ac_dir/"file"
11989      if test -n "$file_magic_test_file"; then
11990	case $deplibs_check_method in
11991	"file_magic "*)
11992	  file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
11993	  MAGIC_CMD=$lt_cv_path_MAGIC_CMD
11994	  if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
11995	    $EGREP "$file_magic_regex" > /dev/null; then
11996	    :
11997	  else
11998	    cat <<_LT_EOF 1>&2
11999
12000*** Warning: the command libtool uses to detect shared libraries,
12001*** $file_magic_cmd, produces output that libtool cannot recognize.
12002*** The result is that libtool may fail to recognize shared libraries
12003*** as such.  This will affect the creation of libtool libraries that
12004*** depend on shared libraries, but programs linked with such libtool
12005*** libraries will work regardless of this problem.  Nevertheless, you
12006*** may want to report the problem to your system manager and/or to
12007*** bug-libtool@gnu.org
12008
12009_LT_EOF
12010	  fi ;;
12011	esac
12012      fi
12013      break
12014    fi
12015  done
12016  IFS=$lt_save_ifs
12017  MAGIC_CMD=$lt_save_MAGIC_CMD
12018  ;;
12019esac ;;
12020esac
12021fi
12022
12023MAGIC_CMD=$lt_cv_path_MAGIC_CMD
12024if test -n "$MAGIC_CMD"; then
12025  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5
12026printf "%s\n" "$MAGIC_CMD" >&6; }
12027else
12028  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
12029printf "%s\n" "no" >&6; }
12030fi
12031
12032
12033  else
12034    MAGIC_CMD=:
12035  fi
12036fi
12037
12038  fi
12039  ;;
12040esac
12041
12042# Use C for the default configuration in the libtool script
12043
12044lt_save_CC=$CC
12045ac_ext=c
12046ac_cpp='$CPP $CPPFLAGS'
12047ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
12048ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
12049ac_compiler_gnu=$ac_cv_c_compiler_gnu
12050
12051
12052# Source file extension for C test sources.
12053ac_ext=c
12054
12055# Object file extension for compiled C test sources.
12056objext=o
12057objext=$objext
12058
12059# Code to be used in simple compile tests
12060lt_simple_compile_test_code="int some_variable = 0;"
12061
12062# Code to be used in simple link tests
12063lt_simple_link_test_code='int main(){return(0);}'
12064
12065
12066
12067
12068
12069
12070
12071# If no C compiler was specified, use CC.
12072LTCC=${LTCC-"$CC"}
12073
12074# If no C compiler flags were specified, use CFLAGS.
12075LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
12076
12077# Allow CC to be a program name with arguments.
12078compiler=$CC
12079
12080# Save the default compiler, since it gets overwritten when the other
12081# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
12082compiler_DEFAULT=$CC
12083
12084# save warnings/boilerplate of simple test code
12085ac_outfile=conftest.$ac_objext
12086echo "$lt_simple_compile_test_code" >conftest.$ac_ext
12087eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
12088_lt_compiler_boilerplate=`cat conftest.err`
12089$RM conftest*
12090
12091ac_outfile=conftest.$ac_objext
12092echo "$lt_simple_link_test_code" >conftest.$ac_ext
12093eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
12094_lt_linker_boilerplate=`cat conftest.err`
12095$RM -r conftest*
12096
12097
12098if test -n "$compiler"; then
12099
12100lt_prog_compiler_no_builtin_flag=
12101
12102if test yes = "$GCC"; then
12103  case $cc_basename in
12104  nvcc*)
12105    lt_prog_compiler_no_builtin_flag=' -Xcompiler -fno-builtin' ;;
12106  *)
12107    lt_prog_compiler_no_builtin_flag=' -fno-builtin' ;;
12108  esac
12109
12110  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
12111printf %s "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; }
12112if test ${lt_cv_prog_compiler_rtti_exceptions+y}
12113then :
12114  printf %s "(cached) " >&6
12115else case e in #(
12116  e) lt_cv_prog_compiler_rtti_exceptions=no
12117   ac_outfile=conftest.$ac_objext
12118   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
12119   lt_compiler_flag="-fno-rtti -fno-exceptions"  ## exclude from sc_useless_quotes_in_assignment
12120   # Insert the option either (1) after the last *FLAGS variable, or
12121   # (2) before a word containing "conftest.", or (3) at the end.
12122   # Note that $ac_compile itself does not contain backslashes and begins
12123   # with a dollar sign (not a hyphen), so the echo should work correctly.
12124   # The option is referenced via a variable to avoid confusing sed.
12125   lt_compile=`echo "$ac_compile" | $SED \
12126   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
12127   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
12128   -e 's:$: $lt_compiler_flag:'`
12129   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
12130   (eval "$lt_compile" 2>conftest.err)
12131   ac_status=$?
12132   cat conftest.err >&5
12133   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12134   if (exit $ac_status) && test -s "$ac_outfile"; then
12135     # The compiler can only warn and ignore the option if not recognized
12136     # So say no if there are warnings other than the usual output.
12137     $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
12138     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
12139     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
12140       lt_cv_prog_compiler_rtti_exceptions=yes
12141     fi
12142   fi
12143   $RM conftest*
12144 ;;
12145esac
12146fi
12147{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5
12148printf "%s\n" "$lt_cv_prog_compiler_rtti_exceptions" >&6; }
12149
12150if test yes = "$lt_cv_prog_compiler_rtti_exceptions"; then
12151    lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions"
12152else
12153    :
12154fi
12155
12156fi
12157
12158
12159
12160
12161
12162
12163  lt_prog_compiler_wl=
12164lt_prog_compiler_pic=
12165lt_prog_compiler_static=
12166
12167
12168  if test yes = "$GCC"; then
12169    lt_prog_compiler_wl='-Wl,'
12170    lt_prog_compiler_static='-static'
12171
12172    case $host_os in
12173      aix*)
12174      # All AIX code is PIC.
12175      if test ia64 = "$host_cpu"; then
12176	# AIX 5 now supports IA64 processor
12177	lt_prog_compiler_static='-Bstatic'
12178      fi
12179      lt_prog_compiler_pic='-fPIC'
12180      ;;
12181
12182    amigaos*)
12183      case $host_cpu in
12184      powerpc)
12185            # see comment about AmigaOS4 .so support
12186            lt_prog_compiler_pic='-fPIC'
12187        ;;
12188      m68k)
12189            # FIXME: we need at least 68020 code to build shared libraries, but
12190            # adding the '-m68020' flag to GCC prevents building anything better,
12191            # like '-m68040'.
12192            lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4'
12193        ;;
12194      esac
12195      ;;
12196
12197    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
12198      # PIC is the default for these OSes.
12199      ;;
12200
12201    mingw* | cygwin* | pw32* | os2* | cegcc*)
12202      # This hack is so that the source file can tell whether it is being
12203      # built for inclusion in a dll (and should export symbols for example).
12204      # Although the cygwin gcc ignores -fPIC, still need this for old-style
12205      # (--disable-auto-import) libraries
12206      lt_prog_compiler_pic='-DDLL_EXPORT'
12207      case $host_os in
12208      os2*)
12209	lt_prog_compiler_static='$wl-static'
12210	;;
12211      esac
12212      ;;
12213
12214    darwin* | rhapsody*)
12215      # PIC is the default on this platform
12216      # Common symbols not allowed in MH_DYLIB files
12217      lt_prog_compiler_pic='-fno-common'
12218      ;;
12219
12220    haiku*)
12221      # PIC is the default for Haiku.
12222      # The "-static" flag exists, but is broken.
12223      lt_prog_compiler_static=
12224      ;;
12225
12226    hpux*)
12227      # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
12228      # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
12229      # sets the default TLS model and affects inlining.
12230      case $host_cpu in
12231      hppa*64*)
12232	# +Z the default
12233	;;
12234      *)
12235	lt_prog_compiler_pic='-fPIC'
12236	;;
12237      esac
12238      ;;
12239
12240    interix[3-9]*)
12241      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
12242      # Instead, we relocate shared libraries at runtime.
12243      ;;
12244
12245    msdosdjgpp*)
12246      # Just because we use GCC doesn't mean we suddenly get shared libraries
12247      # on systems that don't support them.
12248      lt_prog_compiler_can_build_shared=no
12249      enable_shared=no
12250      ;;
12251
12252    *nto* | *qnx*)
12253      # QNX uses GNU C++, but need to define -shared option too, otherwise
12254      # it will coredump.
12255      lt_prog_compiler_pic='-fPIC -shared'
12256      ;;
12257
12258    sysv4*MP*)
12259      if test -d /usr/nec; then
12260	lt_prog_compiler_pic=-Kconform_pic
12261      fi
12262      ;;
12263
12264    *)
12265      lt_prog_compiler_pic='-fPIC'
12266      ;;
12267    esac
12268
12269    case $cc_basename in
12270    nvcc*) # Cuda Compiler Driver 2.2
12271      lt_prog_compiler_wl='-Xlinker '
12272      if test -n "$lt_prog_compiler_pic"; then
12273        lt_prog_compiler_pic="-Xcompiler $lt_prog_compiler_pic"
12274      fi
12275      ;;
12276    esac
12277  else
12278    # PORTME Check for flag to pass linker flags through the system compiler.
12279    case $host_os in
12280    aix*)
12281      lt_prog_compiler_wl='-Wl,'
12282      if test ia64 = "$host_cpu"; then
12283	# AIX 5 now supports IA64 processor
12284	lt_prog_compiler_static='-Bstatic'
12285      else
12286	lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp'
12287      fi
12288      ;;
12289
12290    darwin* | rhapsody*)
12291      # PIC is the default on this platform
12292      # Common symbols not allowed in MH_DYLIB files
12293      lt_prog_compiler_pic='-fno-common'
12294      case $cc_basename in
12295      nagfor*)
12296        # NAG Fortran compiler
12297        lt_prog_compiler_wl='-Wl,-Wl,,'
12298        lt_prog_compiler_pic='-PIC'
12299        lt_prog_compiler_static='-Bstatic'
12300        ;;
12301      esac
12302      ;;
12303
12304    mingw* | cygwin* | pw32* | os2* | cegcc*)
12305      # This hack is so that the source file can tell whether it is being
12306      # built for inclusion in a dll (and should export symbols for example).
12307      lt_prog_compiler_pic='-DDLL_EXPORT'
12308      case $host_os in
12309      os2*)
12310	lt_prog_compiler_static='$wl-static'
12311	;;
12312      esac
12313      ;;
12314
12315    hpux9* | hpux10* | hpux11*)
12316      lt_prog_compiler_wl='-Wl,'
12317      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
12318      # not for PA HP-UX.
12319      case $host_cpu in
12320      hppa*64*|ia64*)
12321	# +Z the default
12322	;;
12323      *)
12324	lt_prog_compiler_pic='+Z'
12325	;;
12326      esac
12327      # Is there a better lt_prog_compiler_static that works with the bundled CC?
12328      lt_prog_compiler_static='$wl-a ${wl}archive'
12329      ;;
12330
12331    irix5* | irix6* | nonstopux*)
12332      lt_prog_compiler_wl='-Wl,'
12333      # PIC (with -KPIC) is the default.
12334      lt_prog_compiler_static='-non_shared'
12335      ;;
12336
12337    linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
12338      case $cc_basename in
12339      # old Intel for x86_64, which still supported -KPIC.
12340      ecc*)
12341	lt_prog_compiler_wl='-Wl,'
12342	lt_prog_compiler_pic='-KPIC'
12343	lt_prog_compiler_static='-static'
12344        ;;
12345      # icc used to be incompatible with GCC.
12346      # ICC 10 doesn't accept -KPIC any more.
12347      icc* | ifort*)
12348	lt_prog_compiler_wl='-Wl,'
12349	lt_prog_compiler_pic='-fPIC'
12350	lt_prog_compiler_static='-static'
12351        ;;
12352      # Lahey Fortran 8.1.
12353      lf95*)
12354	lt_prog_compiler_wl='-Wl,'
12355	lt_prog_compiler_pic='--shared'
12356	lt_prog_compiler_static='--static'
12357	;;
12358      nagfor*)
12359	# NAG Fortran compiler
12360	lt_prog_compiler_wl='-Wl,-Wl,,'
12361	lt_prog_compiler_pic='-PIC'
12362	lt_prog_compiler_static='-Bstatic'
12363	;;
12364      tcc*)
12365	# Fabrice Bellard et al's Tiny C Compiler
12366	lt_prog_compiler_wl='-Wl,'
12367	lt_prog_compiler_pic='-fPIC'
12368	lt_prog_compiler_static='-static'
12369	;;
12370      pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
12371        # Portland Group compilers (*not* the Pentium gcc compiler,
12372	# which looks to be a dead project)
12373	lt_prog_compiler_wl='-Wl,'
12374	lt_prog_compiler_pic='-fpic'
12375	lt_prog_compiler_static='-Bstatic'
12376        ;;
12377      ccc*)
12378        lt_prog_compiler_wl='-Wl,'
12379        # All Alpha code is PIC.
12380        lt_prog_compiler_static='-non_shared'
12381        ;;
12382      xl* | bgxl* | bgf* | mpixl*)
12383	# IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene
12384	lt_prog_compiler_wl='-Wl,'
12385	lt_prog_compiler_pic='-qpic'
12386	lt_prog_compiler_static='-qstaticlink'
12387	;;
12388      *)
12389	case `$CC -V 2>&1 | sed 5q` in
12390	*Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [1-7].* | *Sun*Fortran*\ 8.[0-3]*)
12391	  # Sun Fortran 8.3 passes all unrecognized flags to the linker
12392	  lt_prog_compiler_pic='-KPIC'
12393	  lt_prog_compiler_static='-Bstatic'
12394	  lt_prog_compiler_wl=''
12395	  ;;
12396	*Sun\ F* | *Sun*Fortran*)
12397	  lt_prog_compiler_pic='-KPIC'
12398	  lt_prog_compiler_static='-Bstatic'
12399	  lt_prog_compiler_wl='-Qoption ld '
12400	  ;;
12401	*Sun\ C*)
12402	  # Sun C 5.9
12403	  lt_prog_compiler_pic='-KPIC'
12404	  lt_prog_compiler_static='-Bstatic'
12405	  lt_prog_compiler_wl='-Wl,'
12406	  ;;
12407        *Intel*\ [CF]*Compiler*)
12408	  lt_prog_compiler_wl='-Wl,'
12409	  lt_prog_compiler_pic='-fPIC'
12410	  lt_prog_compiler_static='-static'
12411	  ;;
12412	*Portland\ Group*)
12413	  lt_prog_compiler_wl='-Wl,'
12414	  lt_prog_compiler_pic='-fpic'
12415	  lt_prog_compiler_static='-Bstatic'
12416	  ;;
12417	esac
12418	;;
12419      esac
12420      ;;
12421
12422    newsos6)
12423      lt_prog_compiler_pic='-KPIC'
12424      lt_prog_compiler_static='-Bstatic'
12425      ;;
12426
12427    *nto* | *qnx*)
12428      # QNX uses GNU C++, but need to define -shared option too, otherwise
12429      # it will coredump.
12430      lt_prog_compiler_pic='-fPIC -shared'
12431      ;;
12432
12433    osf3* | osf4* | osf5*)
12434      lt_prog_compiler_wl='-Wl,'
12435      # All OSF/1 code is PIC.
12436      lt_prog_compiler_static='-non_shared'
12437      ;;
12438
12439    rdos*)
12440      lt_prog_compiler_static='-non_shared'
12441      ;;
12442
12443    solaris*)
12444      lt_prog_compiler_pic='-KPIC'
12445      lt_prog_compiler_static='-Bstatic'
12446      case $cc_basename in
12447      f77* | f90* | f95* | sunf77* | sunf90* | sunf95*)
12448	lt_prog_compiler_wl='-Qoption ld ';;
12449      *)
12450	lt_prog_compiler_wl='-Wl,';;
12451      esac
12452      ;;
12453
12454    sunos4*)
12455      lt_prog_compiler_wl='-Qoption ld '
12456      lt_prog_compiler_pic='-PIC'
12457      lt_prog_compiler_static='-Bstatic'
12458      ;;
12459
12460    sysv4 | sysv4.2uw2* | sysv4.3*)
12461      lt_prog_compiler_wl='-Wl,'
12462      lt_prog_compiler_pic='-KPIC'
12463      lt_prog_compiler_static='-Bstatic'
12464      ;;
12465
12466    sysv4*MP*)
12467      if test -d /usr/nec; then
12468	lt_prog_compiler_pic='-Kconform_pic'
12469	lt_prog_compiler_static='-Bstatic'
12470      fi
12471      ;;
12472
12473    sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
12474      lt_prog_compiler_wl='-Wl,'
12475      lt_prog_compiler_pic='-KPIC'
12476      lt_prog_compiler_static='-Bstatic'
12477      ;;
12478
12479    unicos*)
12480      lt_prog_compiler_wl='-Wl,'
12481      lt_prog_compiler_can_build_shared=no
12482      ;;
12483
12484    uts4*)
12485      lt_prog_compiler_pic='-pic'
12486      lt_prog_compiler_static='-Bstatic'
12487      ;;
12488
12489    *)
12490      lt_prog_compiler_can_build_shared=no
12491      ;;
12492    esac
12493  fi
12494
12495case $host_os in
12496  # For platforms that do not support PIC, -DPIC is meaningless:
12497  *djgpp*)
12498    lt_prog_compiler_pic=
12499    ;;
12500  *)
12501    lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC"
12502    ;;
12503esac
12504
12505{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5
12506printf %s "checking for $compiler option to produce PIC... " >&6; }
12507if test ${lt_cv_prog_compiler_pic+y}
12508then :
12509  printf %s "(cached) " >&6
12510else case e in #(
12511  e) lt_cv_prog_compiler_pic=$lt_prog_compiler_pic ;;
12512esac
12513fi
12514{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic" >&5
12515printf "%s\n" "$lt_cv_prog_compiler_pic" >&6; }
12516lt_prog_compiler_pic=$lt_cv_prog_compiler_pic
12517
12518#
12519# Check to make sure the PIC flag actually works.
12520#
12521if test -n "$lt_prog_compiler_pic"; then
12522  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5
12523printf %s "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; }
12524if test ${lt_cv_prog_compiler_pic_works+y}
12525then :
12526  printf %s "(cached) " >&6
12527else case e in #(
12528  e) lt_cv_prog_compiler_pic_works=no
12529   ac_outfile=conftest.$ac_objext
12530   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
12531   lt_compiler_flag="$lt_prog_compiler_pic -DPIC"  ## exclude from sc_useless_quotes_in_assignment
12532   # Insert the option either (1) after the last *FLAGS variable, or
12533   # (2) before a word containing "conftest.", or (3) at the end.
12534   # Note that $ac_compile itself does not contain backslashes and begins
12535   # with a dollar sign (not a hyphen), so the echo should work correctly.
12536   # The option is referenced via a variable to avoid confusing sed.
12537   lt_compile=`echo "$ac_compile" | $SED \
12538   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
12539   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
12540   -e 's:$: $lt_compiler_flag:'`
12541   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
12542   (eval "$lt_compile" 2>conftest.err)
12543   ac_status=$?
12544   cat conftest.err >&5
12545   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12546   if (exit $ac_status) && test -s "$ac_outfile"; then
12547     # The compiler can only warn and ignore the option if not recognized
12548     # So say no if there are warnings other than the usual output.
12549     $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
12550     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
12551     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
12552       lt_cv_prog_compiler_pic_works=yes
12553     fi
12554   fi
12555   $RM conftest*
12556 ;;
12557esac
12558fi
12559{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5
12560printf "%s\n" "$lt_cv_prog_compiler_pic_works" >&6; }
12561
12562if test yes = "$lt_cv_prog_compiler_pic_works"; then
12563    case $lt_prog_compiler_pic in
12564     "" | " "*) ;;
12565     *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;;
12566     esac
12567else
12568    lt_prog_compiler_pic=
12569     lt_prog_compiler_can_build_shared=no
12570fi
12571
12572fi
12573
12574
12575
12576
12577
12578
12579
12580
12581
12582
12583
12584#
12585# Check to make sure the static flag actually works.
12586#
12587wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\"
12588{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5
12589printf %s "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; }
12590if test ${lt_cv_prog_compiler_static_works+y}
12591then :
12592  printf %s "(cached) " >&6
12593else case e in #(
12594  e) lt_cv_prog_compiler_static_works=no
12595   save_LDFLAGS=$LDFLAGS
12596   LDFLAGS="$LDFLAGS $lt_tmp_static_flag"
12597   echo "$lt_simple_link_test_code" > conftest.$ac_ext
12598   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
12599     # The linker can only warn and ignore the option if not recognized
12600     # So say no if there are warnings
12601     if test -s conftest.err; then
12602       # Append any errors to the config.log.
12603       cat conftest.err 1>&5
12604       $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
12605       $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
12606       if diff conftest.exp conftest.er2 >/dev/null; then
12607         lt_cv_prog_compiler_static_works=yes
12608       fi
12609     else
12610       lt_cv_prog_compiler_static_works=yes
12611     fi
12612   fi
12613   $RM -r conftest*
12614   LDFLAGS=$save_LDFLAGS
12615 ;;
12616esac
12617fi
12618{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5
12619printf "%s\n" "$lt_cv_prog_compiler_static_works" >&6; }
12620
12621if test yes = "$lt_cv_prog_compiler_static_works"; then
12622    :
12623else
12624    lt_prog_compiler_static=
12625fi
12626
12627
12628
12629
12630
12631
12632
12633  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
12634printf %s "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
12635if test ${lt_cv_prog_compiler_c_o+y}
12636then :
12637  printf %s "(cached) " >&6
12638else case e in #(
12639  e) lt_cv_prog_compiler_c_o=no
12640   $RM -r conftest 2>/dev/null
12641   mkdir conftest
12642   cd conftest
12643   mkdir out
12644   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
12645
12646   lt_compiler_flag="-o out/conftest2.$ac_objext"
12647   # Insert the option either (1) after the last *FLAGS variable, or
12648   # (2) before a word containing "conftest.", or (3) at the end.
12649   # Note that $ac_compile itself does not contain backslashes and begins
12650   # with a dollar sign (not a hyphen), so the echo should work correctly.
12651   lt_compile=`echo "$ac_compile" | $SED \
12652   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
12653   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
12654   -e 's:$: $lt_compiler_flag:'`
12655   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
12656   (eval "$lt_compile" 2>out/conftest.err)
12657   ac_status=$?
12658   cat out/conftest.err >&5
12659   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12660   if (exit $ac_status) && test -s out/conftest2.$ac_objext
12661   then
12662     # The compiler can only warn and ignore the option if not recognized
12663     # So say no if there are warnings
12664     $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
12665     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
12666     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
12667       lt_cv_prog_compiler_c_o=yes
12668     fi
12669   fi
12670   chmod u+w . 2>&5
12671   $RM conftest*
12672   # SGI C++ compiler will create directory out/ii_files/ for
12673   # template instantiation
12674   test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
12675   $RM out/* && rmdir out
12676   cd ..
12677   $RM -r conftest
12678   $RM conftest*
12679 ;;
12680esac
12681fi
12682{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5
12683printf "%s\n" "$lt_cv_prog_compiler_c_o" >&6; }
12684
12685
12686
12687
12688
12689
12690  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
12691printf %s "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
12692if test ${lt_cv_prog_compiler_c_o+y}
12693then :
12694  printf %s "(cached) " >&6
12695else case e in #(
12696  e) lt_cv_prog_compiler_c_o=no
12697   $RM -r conftest 2>/dev/null
12698   mkdir conftest
12699   cd conftest
12700   mkdir out
12701   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
12702
12703   lt_compiler_flag="-o out/conftest2.$ac_objext"
12704   # Insert the option either (1) after the last *FLAGS variable, or
12705   # (2) before a word containing "conftest.", or (3) at the end.
12706   # Note that $ac_compile itself does not contain backslashes and begins
12707   # with a dollar sign (not a hyphen), so the echo should work correctly.
12708   lt_compile=`echo "$ac_compile" | $SED \
12709   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
12710   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
12711   -e 's:$: $lt_compiler_flag:'`
12712   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
12713   (eval "$lt_compile" 2>out/conftest.err)
12714   ac_status=$?
12715   cat out/conftest.err >&5
12716   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12717   if (exit $ac_status) && test -s out/conftest2.$ac_objext
12718   then
12719     # The compiler can only warn and ignore the option if not recognized
12720     # So say no if there are warnings
12721     $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
12722     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
12723     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
12724       lt_cv_prog_compiler_c_o=yes
12725     fi
12726   fi
12727   chmod u+w . 2>&5
12728   $RM conftest*
12729   # SGI C++ compiler will create directory out/ii_files/ for
12730   # template instantiation
12731   test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
12732   $RM out/* && rmdir out
12733   cd ..
12734   $RM -r conftest
12735   $RM conftest*
12736 ;;
12737esac
12738fi
12739{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5
12740printf "%s\n" "$lt_cv_prog_compiler_c_o" >&6; }
12741
12742
12743
12744
12745hard_links=nottested
12746if test no = "$lt_cv_prog_compiler_c_o" && test no != "$need_locks"; then
12747  # do not overwrite the value of need_locks provided by the user
12748  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5
12749printf %s "checking if we can lock with hard links... " >&6; }
12750  hard_links=yes
12751  $RM conftest*
12752  ln conftest.a conftest.b 2>/dev/null && hard_links=no
12753  touch conftest.a
12754  ln conftest.a conftest.b 2>&5 || hard_links=no
12755  ln conftest.a conftest.b 2>/dev/null && hard_links=no
12756  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5
12757printf "%s\n" "$hard_links" >&6; }
12758  if test no = "$hard_links"; then
12759    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&5
12760printf "%s\n" "$as_me: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&2;}
12761    need_locks=warn
12762  fi
12763else
12764  need_locks=no
12765fi
12766
12767
12768
12769
12770
12771
12772  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5
12773printf %s "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; }
12774
12775  runpath_var=
12776  allow_undefined_flag=
12777  always_export_symbols=no
12778  archive_cmds=
12779  archive_expsym_cmds=
12780  compiler_needs_object=no
12781  enable_shared_with_static_runtimes=no
12782  export_dynamic_flag_spec=
12783  export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
12784  hardcode_automatic=no
12785  hardcode_direct=no
12786  hardcode_direct_absolute=no
12787  hardcode_libdir_flag_spec=
12788  hardcode_libdir_separator=
12789  hardcode_minus_L=no
12790  hardcode_shlibpath_var=unsupported
12791  inherit_rpath=no
12792  link_all_deplibs=unknown
12793  module_cmds=
12794  module_expsym_cmds=
12795  old_archive_from_new_cmds=
12796  old_archive_from_expsyms_cmds=
12797  thread_safe_flag_spec=
12798  whole_archive_flag_spec=
12799  # include_expsyms should be a list of space-separated symbols to be *always*
12800  # included in the symbol list
12801  include_expsyms=
12802  # exclude_expsyms can be an extended regexp of symbols to exclude
12803  # it will be wrapped by ' (' and ')$', so one must not match beginning or
12804  # end of line.  Example: 'a|bc|.*d.*' will exclude the symbols 'a' and 'bc',
12805  # as well as any symbol that contains 'd'.
12806  exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'
12807  # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
12808  # platforms (ab)use it in PIC code, but their linkers get confused if
12809  # the symbol is explicitly referenced.  Since portable code cannot
12810  # rely on this symbol name, it's probably fine to never include it in
12811  # preloaded symbol tables.
12812  # Exclude shared library initialization/finalization symbols.
12813  extract_expsyms_cmds=
12814
12815  case $host_os in
12816  cygwin* | mingw* | pw32* | cegcc*)
12817    # FIXME: the MSVC++ port hasn't been tested in a loooong time
12818    # When not using gcc, we currently assume that we are using
12819    # Microsoft Visual C++.
12820    if test yes != "$GCC"; then
12821      with_gnu_ld=no
12822    fi
12823    ;;
12824  interix*)
12825    # we just hope/assume this is gcc and not c89 (= MSVC++)
12826    with_gnu_ld=yes
12827    ;;
12828  openbsd* | bitrig*)
12829    with_gnu_ld=no
12830    ;;
12831  esac
12832
12833  ld_shlibs=yes
12834
12835  # On some targets, GNU ld is compatible enough with the native linker
12836  # that we're better off using the native interface for both.
12837  lt_use_gnu_ld_interface=no
12838  if test yes = "$with_gnu_ld"; then
12839    case $host_os in
12840      aix*)
12841	# The AIX port of GNU ld has always aspired to compatibility
12842	# with the native linker.  However, as the warning in the GNU ld
12843	# block says, versions before 2.19.5* couldn't really create working
12844	# shared libraries, regardless of the interface used.
12845	case `$LD -v 2>&1` in
12846	  *\ \(GNU\ Binutils\)\ 2.19.5*) ;;
12847	  *\ \(GNU\ Binutils\)\ 2.[2-9]*) ;;
12848	  *\ \(GNU\ Binutils\)\ [3-9]*) ;;
12849	  *)
12850	    lt_use_gnu_ld_interface=yes
12851	    ;;
12852	esac
12853	;;
12854      *)
12855	lt_use_gnu_ld_interface=yes
12856	;;
12857    esac
12858  fi
12859
12860  if test yes = "$lt_use_gnu_ld_interface"; then
12861    # If archive_cmds runs LD, not CC, wlarc should be empty
12862    wlarc='$wl'
12863
12864    # Set some defaults for GNU ld with shared library support. These
12865    # are reset later if shared libraries are not supported. Putting them
12866    # here allows them to be overridden if necessary.
12867    runpath_var=LD_RUN_PATH
12868    hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
12869    export_dynamic_flag_spec='$wl--export-dynamic'
12870    # ancient GNU ld didn't support --whole-archive et. al.
12871    if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
12872      whole_archive_flag_spec=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
12873    else
12874      whole_archive_flag_spec=
12875    fi
12876    supports_anon_versioning=no
12877    case `$LD -v | $SED -e 's/(^)\+)\s\+//' 2>&1` in
12878      *GNU\ gold*) supports_anon_versioning=yes ;;
12879      *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11
12880      *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
12881      *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
12882      *\ 2.11.*) ;; # other 2.11 versions
12883      *) supports_anon_versioning=yes ;;
12884    esac
12885
12886    # See if GNU ld supports shared libraries.
12887    case $host_os in
12888    aix[3-9]*)
12889      # On AIX/PPC, the GNU linker is very broken
12890      if test ia64 != "$host_cpu"; then
12891	ld_shlibs=no
12892	cat <<_LT_EOF 1>&2
12893
12894*** Warning: the GNU linker, at least up to release 2.19, is reported
12895*** to be unable to reliably create shared libraries on AIX.
12896*** Therefore, libtool is disabling shared libraries support.  If you
12897*** really care for shared libraries, you may want to install binutils
12898*** 2.20 or above, or modify your PATH so that a non-GNU linker is found.
12899*** You will then need to restart the configuration process.
12900
12901_LT_EOF
12902      fi
12903      ;;
12904
12905    amigaos*)
12906      case $host_cpu in
12907      powerpc)
12908            # see comment about AmigaOS4 .so support
12909            archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
12910            archive_expsym_cmds=''
12911        ;;
12912      m68k)
12913            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)'
12914            hardcode_libdir_flag_spec='-L$libdir'
12915            hardcode_minus_L=yes
12916        ;;
12917      esac
12918      ;;
12919
12920    beos*)
12921      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
12922	allow_undefined_flag=unsupported
12923	# Joseph Beckenbach <jrb3@best.com> says some releases of gcc
12924	# support --undefined.  This deserves some investigation.  FIXME
12925	archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
12926      else
12927	ld_shlibs=no
12928      fi
12929      ;;
12930
12931    cygwin* | mingw* | pw32* | cegcc*)
12932      # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless,
12933      # as there is no search path for DLLs.
12934      hardcode_libdir_flag_spec='-L$libdir'
12935      export_dynamic_flag_spec='$wl--export-all-symbols'
12936      allow_undefined_flag=unsupported
12937      always_export_symbols=no
12938      enable_shared_with_static_runtimes=yes
12939      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'
12940      exclude_expsyms='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'
12941
12942      if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
12943        archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
12944	# If the export-symbols file already is a .def file, use it as
12945	# is; otherwise, prepend EXPORTS...
12946	archive_expsym_cmds='if   test DEF = "`$SED -n     -e '\''s/^[	 ]*//'\''     -e '\''/^\(;.*\)*$/d'\''     -e '\''s/^\(EXPORTS\|LIBRARY\)\([	 ].*\)*$/DEF/p'\''     -e q     $export_symbols`" ; then
12947          cp $export_symbols $output_objdir/$soname.def;
12948        else
12949          echo EXPORTS > $output_objdir/$soname.def;
12950          cat $export_symbols >> $output_objdir/$soname.def;
12951        fi~
12952        $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
12953      else
12954	ld_shlibs=no
12955      fi
12956      ;;
12957
12958    haiku*)
12959      archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
12960      link_all_deplibs=yes
12961      ;;
12962
12963    os2*)
12964      hardcode_libdir_flag_spec='-L$libdir'
12965      hardcode_minus_L=yes
12966      allow_undefined_flag=unsupported
12967      shrext_cmds=.dll
12968      archive_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
12969	$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
12970	$ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
12971	$ECHO EXPORTS >> $output_objdir/$libname.def~
12972	emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
12973	$CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
12974	emximp -o $lib $output_objdir/$libname.def'
12975      archive_expsym_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
12976	$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
12977	$ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
12978	$ECHO EXPORTS >> $output_objdir/$libname.def~
12979	prefix_cmds="$SED"~
12980	if test EXPORTS = "`$SED 1q $export_symbols`"; then
12981	  prefix_cmds="$prefix_cmds -e 1d";
12982	fi~
12983	prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
12984	cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
12985	$CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
12986	emximp -o $lib $output_objdir/$libname.def'
12987      old_archive_From_new_cmds='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
12988      enable_shared_with_static_runtimes=yes
12989      ;;
12990
12991    interix[3-9]*)
12992      hardcode_direct=no
12993      hardcode_shlibpath_var=no
12994      hardcode_libdir_flag_spec='$wl-rpath,$libdir'
12995      export_dynamic_flag_spec='$wl-E'
12996      # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
12997      # Instead, shared libraries are loaded at an image base (0x10000000 by
12998      # default) and relocated if they conflict, which is a slow very memory
12999      # consuming and fragmenting process.  To avoid this, we pick a random,
13000      # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
13001      # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
13002      archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
13003      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'
13004      ;;
13005
13006    gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
13007      tmp_diet=no
13008      if test linux-dietlibc = "$host_os"; then
13009	case $cc_basename in
13010	  diet\ *) tmp_diet=yes;;	# linux-dietlibc with static linking (!diet-dyn)
13011	esac
13012      fi
13013      if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
13014	 && test no = "$tmp_diet"
13015      then
13016	tmp_addflag=' $pic_flag'
13017	tmp_sharedflag='-shared'
13018	case $cc_basename,$host_cpu in
13019        pgcc*)				# Portland Group C compiler
13020	  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'
13021	  tmp_addflag=' $pic_flag'
13022	  ;;
13023	pgf77* | pgf90* | pgf95* | pgfortran*)
13024					# Portland Group f77 and f90 compilers
13025	  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'
13026	  tmp_addflag=' $pic_flag -Mnomain' ;;
13027	ecc*,ia64* | icc*,ia64*)	# Intel C compiler on ia64
13028	  tmp_addflag=' -i_dynamic' ;;
13029	efc*,ia64* | ifort*,ia64*)	# Intel Fortran compiler on ia64
13030	  tmp_addflag=' -i_dynamic -nofor_main' ;;
13031	ifc* | ifort*)			# Intel Fortran compiler
13032	  tmp_addflag=' -nofor_main' ;;
13033	lf95*)				# Lahey Fortran 8.1
13034	  whole_archive_flag_spec=
13035	  tmp_sharedflag='--shared' ;;
13036        nagfor*)                        # NAGFOR 5.3
13037          tmp_sharedflag='-Wl,-shared' ;;
13038	xl[cC]* | bgxl[cC]* | mpixl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below)
13039	  tmp_sharedflag='-qmkshrobj'
13040	  tmp_addflag= ;;
13041	nvcc*)	# Cuda Compiler Driver 2.2
13042	  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'
13043	  compiler_needs_object=yes
13044	  ;;
13045	esac
13046	case `$CC -V 2>&1 | sed 5q` in
13047	*Sun\ C*)			# Sun C 5.9
13048	  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'
13049	  compiler_needs_object=yes
13050	  tmp_sharedflag='-G' ;;
13051	*Sun\ F*)			# Sun Fortran 8.3
13052	  tmp_sharedflag='-G' ;;
13053	esac
13054	archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
13055
13056        if test yes = "$supports_anon_versioning"; then
13057          archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~
13058            cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
13059            echo "local: *; };" >> $output_objdir/$libname.ver~
13060            $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib'
13061        fi
13062
13063	case $cc_basename in
13064	tcc*)
13065	  export_dynamic_flag_spec='-rdynamic'
13066	  ;;
13067	xlf* | bgf* | bgxlf* | mpixlf*)
13068	  # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
13069	  whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive'
13070	  hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
13071	  archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
13072	  if test yes = "$supports_anon_versioning"; then
13073	    archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~
13074              cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
13075              echo "local: *; };" >> $output_objdir/$libname.ver~
13076              $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
13077	  fi
13078	  ;;
13079	esac
13080      else
13081        ld_shlibs=no
13082      fi
13083      ;;
13084
13085    netbsd*)
13086      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
13087	archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
13088	wlarc=
13089      else
13090	archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
13091	archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
13092      fi
13093      ;;
13094
13095    solaris*)
13096      if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
13097	ld_shlibs=no
13098	cat <<_LT_EOF 1>&2
13099
13100*** Warning: The releases 2.8.* of the GNU linker cannot reliably
13101*** create shared libraries on Solaris systems.  Therefore, libtool
13102*** is disabling shared libraries support.  We urge you to upgrade GNU
13103*** binutils to release 2.9.1 or newer.  Another option is to modify
13104*** your PATH or compiler configuration so that the native linker is
13105*** used, and then restart.
13106
13107_LT_EOF
13108      elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
13109	archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
13110	archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
13111      else
13112	ld_shlibs=no
13113      fi
13114      ;;
13115
13116    sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
13117      case `$LD -v 2>&1` in
13118        *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*)
13119	ld_shlibs=no
13120	cat <<_LT_EOF 1>&2
13121
13122*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot
13123*** reliably create shared libraries on SCO systems.  Therefore, libtool
13124*** is disabling shared libraries support.  We urge you to upgrade GNU
13125*** binutils to release 2.16.91.0.3 or newer.  Another option is to modify
13126*** your PATH or compiler configuration so that the native linker is
13127*** used, and then restart.
13128
13129_LT_EOF
13130	;;
13131	*)
13132	  # For security reasons, it is highly recommended that you always
13133	  # use absolute paths for naming shared libraries, and exclude the
13134	  # DT_RUNPATH tag from executables and libraries.  But doing so
13135	  # requires that you compile everything twice, which is a pain.
13136	  if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
13137	    hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
13138	    archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
13139	    archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
13140	  else
13141	    ld_shlibs=no
13142	  fi
13143	;;
13144      esac
13145      ;;
13146
13147    sunos4*)
13148      archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
13149      wlarc=
13150      hardcode_direct=yes
13151      hardcode_shlibpath_var=no
13152      ;;
13153
13154    *)
13155      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
13156	archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
13157	archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
13158      else
13159	ld_shlibs=no
13160      fi
13161      ;;
13162    esac
13163
13164    if test no = "$ld_shlibs"; then
13165      runpath_var=
13166      hardcode_libdir_flag_spec=
13167      export_dynamic_flag_spec=
13168      whole_archive_flag_spec=
13169    fi
13170  else
13171    # PORTME fill in a description of your system's linker (not GNU ld)
13172    case $host_os in
13173    aix3*)
13174      allow_undefined_flag=unsupported
13175      always_export_symbols=yes
13176      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'
13177      # Note: this linker hardcodes the directories in LIBPATH if there
13178      # are no directories specified by -L.
13179      hardcode_minus_L=yes
13180      if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then
13181	# Neither direct hardcoding nor static linking is supported with a
13182	# broken collect2.
13183	hardcode_direct=unsupported
13184      fi
13185      ;;
13186
13187    aix[4-9]*)
13188      if test ia64 = "$host_cpu"; then
13189	# On IA64, the linker does run time linking by default, so we don't
13190	# have to do anything special.
13191	aix_use_runtimelinking=no
13192	exp_sym_flag='-Bexport'
13193	no_entry_flag=
13194      else
13195	# If we're using GNU nm, then we don't want the "-C" option.
13196	# -C means demangle to GNU nm, but means don't demangle to AIX nm.
13197	# Without the "-l" option, or with the "-B" option, AIX nm treats
13198	# weak defined symbols like other global defined symbols, whereas
13199	# GNU nm marks them as "W".
13200	# While the 'weak' keyword is ignored in the Export File, we need
13201	# it in the Import File for the 'aix-soname' feature, so we have
13202	# to replace the "-B" option with "-P" for AIX nm.
13203	if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
13204	  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'
13205	else
13206	  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'
13207	fi
13208	aix_use_runtimelinking=no
13209
13210	# Test if we are trying to use run time linking or normal
13211	# AIX style linking. If -brtl is somewhere in LDFLAGS, we
13212	# have runtime linking enabled, and use it for executables.
13213	# For shared libraries, we enable/disable runtime linking
13214	# depending on the kind of the shared library created -
13215	# when "with_aix_soname,aix_use_runtimelinking" is:
13216	# "aix,no"   lib.a(lib.so.V) shared, rtl:no,  for executables
13217	# "aix,yes"  lib.so          shared, rtl:yes, for executables
13218	#            lib.a           static archive
13219	# "both,no"  lib.so.V(shr.o) shared, rtl:yes
13220	#            lib.a(lib.so.V) shared, rtl:no,  for executables
13221	# "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables
13222	#            lib.a(lib.so.V) shared, rtl:no
13223	# "svr4,*"   lib.so.V(shr.o) shared, rtl:yes, for executables
13224	#            lib.a           static archive
13225	case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*)
13226	  for ld_flag in $LDFLAGS; do
13227	  if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then
13228	    aix_use_runtimelinking=yes
13229	    break
13230	  fi
13231	  done
13232	  if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then
13233	    # With aix-soname=svr4, we create the lib.so.V shared archives only,
13234	    # so we don't have lib.a shared libs to link our executables.
13235	    # We have to force runtime linking in this case.
13236	    aix_use_runtimelinking=yes
13237	    LDFLAGS="$LDFLAGS -Wl,-brtl"
13238	  fi
13239	  ;;
13240	esac
13241
13242	exp_sym_flag='-bexport'
13243	no_entry_flag='-bnoentry'
13244      fi
13245
13246      # When large executables or shared objects are built, AIX ld can
13247      # have problems creating the table of contents.  If linking a library
13248      # or program results in "error TOC overflow" add -mminimal-toc to
13249      # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
13250      # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
13251
13252      archive_cmds=''
13253      hardcode_direct=yes
13254      hardcode_direct_absolute=yes
13255      hardcode_libdir_separator=':'
13256      link_all_deplibs=yes
13257      file_list_spec='$wl-f,'
13258      case $with_aix_soname,$aix_use_runtimelinking in
13259      aix,*) ;; # traditional, no import file
13260      svr4,* | *,yes) # use import file
13261	# The Import File defines what to hardcode.
13262	hardcode_direct=no
13263	hardcode_direct_absolute=no
13264	;;
13265      esac
13266
13267      if test yes = "$GCC"; then
13268	case $host_os in aix4.[012]|aix4.[012].*)
13269	# We only want to do this on AIX 4.2 and lower, the check
13270	# below for broken collect2 doesn't work under 4.3+
13271	  collect2name=`$CC -print-prog-name=collect2`
13272	  if test -f "$collect2name" &&
13273	   strings "$collect2name" | $GREP resolve_lib_name >/dev/null
13274	  then
13275	  # We have reworked collect2
13276	  :
13277	  else
13278	  # We have old collect2
13279	  hardcode_direct=unsupported
13280	  # It fails to find uninstalled libraries when the uninstalled
13281	  # path is not listed in the libpath.  Setting hardcode_minus_L
13282	  # to unsupported forces relinking
13283	  hardcode_minus_L=yes
13284	  hardcode_libdir_flag_spec='-L$libdir'
13285	  hardcode_libdir_separator=
13286	  fi
13287	  ;;
13288	esac
13289	shared_flag='-shared'
13290	if test yes = "$aix_use_runtimelinking"; then
13291	  shared_flag="$shared_flag "'$wl-G'
13292	fi
13293	# Need to ensure runtime linking is disabled for the traditional
13294	# shared library, or the linker may eventually find shared libraries
13295	# /with/ Import File - we do not want to mix them.
13296	shared_flag_aix='-shared'
13297	shared_flag_svr4='-shared $wl-G'
13298      else
13299	# not using gcc
13300	if test ia64 = "$host_cpu"; then
13301	# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
13302	# chokes on -Wl,-G. The following line is correct:
13303	  shared_flag='-G'
13304	else
13305	  if test yes = "$aix_use_runtimelinking"; then
13306	    shared_flag='$wl-G'
13307	  else
13308	    shared_flag='$wl-bM:SRE'
13309	  fi
13310	  shared_flag_aix='$wl-bM:SRE'
13311	  shared_flag_svr4='$wl-G'
13312	fi
13313      fi
13314
13315      export_dynamic_flag_spec='$wl-bexpall'
13316      # It seems that -bexpall does not export symbols beginning with
13317      # underscore (_), so it is better to generate a list of symbols to export.
13318      always_export_symbols=yes
13319      if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then
13320	# Warning - without using the other runtime loading flags (-brtl),
13321	# -berok will link without error, but may produce a broken library.
13322	allow_undefined_flag='-berok'
13323        # Determine the default libpath from the value encoded in an
13324        # empty executable.
13325        if test set = "${lt_cv_aix_libpath+set}"; then
13326  aix_libpath=$lt_cv_aix_libpath
13327else
13328  if test ${lt_cv_aix_libpath_+y}
13329then :
13330  printf %s "(cached) " >&6
13331else case e in #(
13332  e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13333/* end confdefs.h.  */
13334
13335int
13336main (void)
13337{
13338
13339  ;
13340  return 0;
13341}
13342_ACEOF
13343if ac_fn_c_try_link "$LINENO"
13344then :
13345
13346  lt_aix_libpath_sed='
13347      /Import File Strings/,/^$/ {
13348	  /^0/ {
13349	      s/^0  *\([^ ]*\) *$/\1/
13350	      p
13351	  }
13352      }'
13353  lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
13354  # Check for a 64-bit object if we didn't find anything.
13355  if test -z "$lt_cv_aix_libpath_"; then
13356    lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
13357  fi
13358fi
13359rm -f core conftest.err conftest.$ac_objext conftest.beam \
13360    conftest$ac_exeext conftest.$ac_ext
13361  if test -z "$lt_cv_aix_libpath_"; then
13362    lt_cv_aix_libpath_=/usr/lib:/lib
13363  fi
13364   ;;
13365esac
13366fi
13367
13368  aix_libpath=$lt_cv_aix_libpath_
13369fi
13370
13371        hardcode_libdir_flag_spec='$wl-blibpath:$libdir:'"$aix_libpath"
13372        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
13373      else
13374	if test ia64 = "$host_cpu"; then
13375	  hardcode_libdir_flag_spec='$wl-R $libdir:/usr/lib:/lib'
13376	  allow_undefined_flag="-z nodefs"
13377	  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"
13378	else
13379	 # Determine the default libpath from the value encoded in an
13380	 # empty executable.
13381	 if test set = "${lt_cv_aix_libpath+set}"; then
13382  aix_libpath=$lt_cv_aix_libpath
13383else
13384  if test ${lt_cv_aix_libpath_+y}
13385then :
13386  printf %s "(cached) " >&6
13387else case e in #(
13388  e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13389/* end confdefs.h.  */
13390
13391int
13392main (void)
13393{
13394
13395  ;
13396  return 0;
13397}
13398_ACEOF
13399if ac_fn_c_try_link "$LINENO"
13400then :
13401
13402  lt_aix_libpath_sed='
13403      /Import File Strings/,/^$/ {
13404	  /^0/ {
13405	      s/^0  *\([^ ]*\) *$/\1/
13406	      p
13407	  }
13408      }'
13409  lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
13410  # Check for a 64-bit object if we didn't find anything.
13411  if test -z "$lt_cv_aix_libpath_"; then
13412    lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
13413  fi
13414fi
13415rm -f core conftest.err conftest.$ac_objext conftest.beam \
13416    conftest$ac_exeext conftest.$ac_ext
13417  if test -z "$lt_cv_aix_libpath_"; then
13418    lt_cv_aix_libpath_=/usr/lib:/lib
13419  fi
13420   ;;
13421esac
13422fi
13423
13424  aix_libpath=$lt_cv_aix_libpath_
13425fi
13426
13427	 hardcode_libdir_flag_spec='$wl-blibpath:$libdir:'"$aix_libpath"
13428	  # Warning - without using the other run time loading flags,
13429	  # -berok will link without error, but may produce a broken library.
13430	  no_undefined_flag=' $wl-bernotok'
13431	  allow_undefined_flag=' $wl-berok'
13432	  if test yes = "$with_gnu_ld"; then
13433	    # We only use this code for GNU lds that support --whole-archive.
13434	    whole_archive_flag_spec='$wl--whole-archive$convenience $wl--no-whole-archive'
13435	  else
13436	    # Exported symbols can be pulled into shared objects from archives
13437	    whole_archive_flag_spec='$convenience'
13438	  fi
13439	  archive_cmds_need_lc=yes
13440	  archive_expsym_cmds='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d'
13441	  # -brtl affects multiple linker settings, -berok does not and is overridden later
13442	  compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([, ]\\)%-berok\\1%g"`'
13443	  if test svr4 != "$with_aix_soname"; then
13444	    # This is similar to how AIX traditionally builds its shared libraries.
13445	    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'
13446	  fi
13447	  if test aix != "$with_aix_soname"; then
13448	    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'
13449	  else
13450	    # used by -dlpreopen to get the symbols
13451	    archive_expsym_cmds="$archive_expsym_cmds"'~$MV  $output_objdir/$realname.d/$soname $output_objdir'
13452	  fi
13453	  archive_expsym_cmds="$archive_expsym_cmds"'~$RM -r $output_objdir/$realname.d'
13454	fi
13455      fi
13456      ;;
13457
13458    amigaos*)
13459      case $host_cpu in
13460      powerpc)
13461            # see comment about AmigaOS4 .so support
13462            archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
13463            archive_expsym_cmds=''
13464        ;;
13465      m68k)
13466            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)'
13467            hardcode_libdir_flag_spec='-L$libdir'
13468            hardcode_minus_L=yes
13469        ;;
13470      esac
13471      ;;
13472
13473    bsdi[45]*)
13474      export_dynamic_flag_spec=-rdynamic
13475      ;;
13476
13477    cygwin* | mingw* | pw32* | cegcc*)
13478      # When not using gcc, we currently assume that we are using
13479      # Microsoft Visual C++.
13480      # hardcode_libdir_flag_spec is actually meaningless, as there is
13481      # no search path for DLLs.
13482      case $cc_basename in
13483      cl*)
13484	# Native MSVC
13485	hardcode_libdir_flag_spec=' '
13486	allow_undefined_flag=unsupported
13487	always_export_symbols=yes
13488	file_list_spec='@'
13489	# Tell ltmain to make .lib files, not .a files.
13490	libext=lib
13491	# Tell ltmain to make .dll files, not .so files.
13492	shrext_cmds=.dll
13493	# FIXME: Setting linknames here is a bad hack.
13494	archive_cmds='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames='
13495	archive_expsym_cmds='if   test DEF = "`$SED -n     -e '\''s/^[	 ]*//'\''     -e '\''/^\(;.*\)*$/d'\''     -e '\''s/^\(EXPORTS\|LIBRARY\)\([	 ].*\)*$/DEF/p'\''     -e q     $export_symbols`" ; then
13496            cp "$export_symbols" "$output_objdir/$soname.def";
13497            echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp";
13498          else
13499            $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp;
13500          fi~
13501          $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
13502          linknames='
13503	# The linker will not automatically build a static lib if we build a DLL.
13504	# _LT_TAGVAR(old_archive_from_new_cmds, )='true'
13505	enable_shared_with_static_runtimes=yes
13506	exclude_expsyms='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
13507	export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1,DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols'
13508	# Don't use ranlib
13509	old_postinstall_cmds='chmod 644 $oldlib'
13510	postlink_cmds='lt_outputfile="@OUTPUT@"~
13511          lt_tool_outputfile="@TOOL_OUTPUT@"~
13512          case $lt_outputfile in
13513            *.exe|*.EXE) ;;
13514            *)
13515              lt_outputfile=$lt_outputfile.exe
13516              lt_tool_outputfile=$lt_tool_outputfile.exe
13517              ;;
13518          esac~
13519          if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then
13520            $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
13521            $RM "$lt_outputfile.manifest";
13522          fi'
13523	;;
13524      *)
13525	# Assume MSVC wrapper
13526	hardcode_libdir_flag_spec=' '
13527	allow_undefined_flag=unsupported
13528	# Tell ltmain to make .lib files, not .a files.
13529	libext=lib
13530	# Tell ltmain to make .dll files, not .so files.
13531	shrext_cmds=.dll
13532	# FIXME: Setting linknames here is a bad hack.
13533	archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
13534	# The linker will automatically build a .lib file if we build a DLL.
13535	old_archive_from_new_cmds='true'
13536	# FIXME: Should let the user specify the lib program.
13537	old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs'
13538	enable_shared_with_static_runtimes=yes
13539	;;
13540      esac
13541      ;;
13542
13543    darwin* | rhapsody*)
13544
13545
13546  archive_cmds_need_lc=no
13547  hardcode_direct=no
13548  hardcode_automatic=yes
13549  hardcode_shlibpath_var=unsupported
13550  if test yes = "$lt_cv_ld_force_load"; then
13551    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\"`'
13552
13553  else
13554    whole_archive_flag_spec=''
13555  fi
13556  link_all_deplibs=yes
13557  allow_undefined_flag=$_lt_dar_allow_undefined
13558  case $cc_basename in
13559     ifort*|nagfor*) _lt_dar_can_shared=yes ;;
13560     *) _lt_dar_can_shared=$GCC ;;
13561  esac
13562  if test yes = "$_lt_dar_can_shared"; then
13563    output_verbose_link_cmd=func_echo_all
13564    archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dsymutil"
13565    module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil"
13566    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"
13567    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"
13568
13569  else
13570  ld_shlibs=no
13571  fi
13572
13573      ;;
13574
13575    dgux*)
13576      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
13577      hardcode_libdir_flag_spec='-L$libdir'
13578      hardcode_shlibpath_var=no
13579      ;;
13580
13581    # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
13582    # support.  Future versions do this automatically, but an explicit c++rt0.o
13583    # does not break anything, and helps significantly (at the cost of a little
13584    # extra space).
13585    freebsd2.2*)
13586      archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
13587      hardcode_libdir_flag_spec='-R$libdir'
13588      hardcode_direct=yes
13589      hardcode_shlibpath_var=no
13590      ;;
13591
13592    # Unfortunately, older versions of FreeBSD 2 do not have this feature.
13593    freebsd2.*)
13594      archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
13595      hardcode_direct=yes
13596      hardcode_minus_L=yes
13597      hardcode_shlibpath_var=no
13598      ;;
13599
13600    # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
13601    freebsd* | dragonfly*)
13602      archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
13603      hardcode_libdir_flag_spec='-R$libdir'
13604      hardcode_direct=yes
13605      hardcode_shlibpath_var=no
13606      ;;
13607
13608    hpux9*)
13609      if test yes = "$GCC"; then
13610	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'
13611      else
13612	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'
13613      fi
13614      hardcode_libdir_flag_spec='$wl+b $wl$libdir'
13615      hardcode_libdir_separator=:
13616      hardcode_direct=yes
13617
13618      # hardcode_minus_L: Not really in the search PATH,
13619      # but as the default location of the library.
13620      hardcode_minus_L=yes
13621      export_dynamic_flag_spec='$wl-E'
13622      ;;
13623
13624    hpux10*)
13625      if test yes,no = "$GCC,$with_gnu_ld"; then
13626	archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
13627      else
13628	archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
13629      fi
13630      if test no = "$with_gnu_ld"; then
13631	hardcode_libdir_flag_spec='$wl+b $wl$libdir'
13632	hardcode_libdir_separator=:
13633	hardcode_direct=yes
13634	hardcode_direct_absolute=yes
13635	export_dynamic_flag_spec='$wl-E'
13636	# hardcode_minus_L: Not really in the search PATH,
13637	# but as the default location of the library.
13638	hardcode_minus_L=yes
13639      fi
13640      ;;
13641
13642    hpux11*)
13643      if test yes,no = "$GCC,$with_gnu_ld"; then
13644	case $host_cpu in
13645	hppa*64*)
13646	  archive_cmds='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
13647	  ;;
13648	ia64*)
13649	  archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
13650	  ;;
13651	*)
13652	  archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
13653	  ;;
13654	esac
13655      else
13656	case $host_cpu in
13657	hppa*64*)
13658	  archive_cmds='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
13659	  ;;
13660	ia64*)
13661	  archive_cmds='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
13662	  ;;
13663	*)
13664
13665	  # Older versions of the 11.00 compiler do not understand -b yet
13666	  # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does)
13667	  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC understands -b" >&5
13668printf %s "checking if $CC understands -b... " >&6; }
13669if test ${lt_cv_prog_compiler__b+y}
13670then :
13671  printf %s "(cached) " >&6
13672else case e in #(
13673  e) lt_cv_prog_compiler__b=no
13674   save_LDFLAGS=$LDFLAGS
13675   LDFLAGS="$LDFLAGS -b"
13676   echo "$lt_simple_link_test_code" > conftest.$ac_ext
13677   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
13678     # The linker can only warn and ignore the option if not recognized
13679     # So say no if there are warnings
13680     if test -s conftest.err; then
13681       # Append any errors to the config.log.
13682       cat conftest.err 1>&5
13683       $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
13684       $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
13685       if diff conftest.exp conftest.er2 >/dev/null; then
13686         lt_cv_prog_compiler__b=yes
13687       fi
13688     else
13689       lt_cv_prog_compiler__b=yes
13690     fi
13691   fi
13692   $RM -r conftest*
13693   LDFLAGS=$save_LDFLAGS
13694 ;;
13695esac
13696fi
13697{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler__b" >&5
13698printf "%s\n" "$lt_cv_prog_compiler__b" >&6; }
13699
13700if test yes = "$lt_cv_prog_compiler__b"; then
13701    archive_cmds='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
13702else
13703    archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
13704fi
13705
13706	  ;;
13707	esac
13708      fi
13709      if test no = "$with_gnu_ld"; then
13710	hardcode_libdir_flag_spec='$wl+b $wl$libdir'
13711	hardcode_libdir_separator=:
13712
13713	case $host_cpu in
13714	hppa*64*|ia64*)
13715	  hardcode_direct=no
13716	  hardcode_shlibpath_var=no
13717	  ;;
13718	*)
13719	  hardcode_direct=yes
13720	  hardcode_direct_absolute=yes
13721	  export_dynamic_flag_spec='$wl-E'
13722
13723	  # hardcode_minus_L: Not really in the search PATH,
13724	  # but as the default location of the library.
13725	  hardcode_minus_L=yes
13726	  ;;
13727	esac
13728      fi
13729      ;;
13730
13731    irix5* | irix6* | nonstopux*)
13732      if test yes = "$GCC"; then
13733	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'
13734	# Try to use the -exported_symbol ld option, if it does not
13735	# work, assume that -exports_file does not work either and
13736	# implicitly export all symbols.
13737	# This should be the same for all languages, so no per-tag cache variable.
13738	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5
13739printf %s "checking whether the $host_os linker accepts -exported_symbol... " >&6; }
13740if test ${lt_cv_irix_exported_symbol+y}
13741then :
13742  printf %s "(cached) " >&6
13743else case e in #(
13744  e) save_LDFLAGS=$LDFLAGS
13745	   LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null"
13746	   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13747/* end confdefs.h.  */
13748int foo (void) { return 0; }
13749_ACEOF
13750if ac_fn_c_try_link "$LINENO"
13751then :
13752  lt_cv_irix_exported_symbol=yes
13753else case e in #(
13754  e) lt_cv_irix_exported_symbol=no ;;
13755esac
13756fi
13757rm -f core conftest.err conftest.$ac_objext conftest.beam \
13758    conftest$ac_exeext conftest.$ac_ext
13759           LDFLAGS=$save_LDFLAGS ;;
13760esac
13761fi
13762{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5
13763printf "%s\n" "$lt_cv_irix_exported_symbol" >&6; }
13764	if test yes = "$lt_cv_irix_exported_symbol"; then
13765          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'
13766	fi
13767      else
13768	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'
13769	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'
13770      fi
13771      archive_cmds_need_lc='no'
13772      hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
13773      hardcode_libdir_separator=:
13774      inherit_rpath=yes
13775      link_all_deplibs=yes
13776      ;;
13777
13778    linux*)
13779      case $cc_basename in
13780      tcc*)
13781	# Fabrice Bellard et al's Tiny C Compiler
13782	ld_shlibs=yes
13783	archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
13784	;;
13785      esac
13786      ;;
13787
13788    netbsd*)
13789      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
13790	archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
13791      else
13792	archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
13793      fi
13794      hardcode_libdir_flag_spec='-R$libdir'
13795      hardcode_direct=yes
13796      hardcode_shlibpath_var=no
13797      ;;
13798
13799    newsos6)
13800      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
13801      hardcode_direct=yes
13802      hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
13803      hardcode_libdir_separator=:
13804      hardcode_shlibpath_var=no
13805      ;;
13806
13807    *nto* | *qnx*)
13808      ;;
13809
13810    openbsd* | bitrig*)
13811      if test -f /usr/libexec/ld.so; then
13812	hardcode_direct=yes
13813	hardcode_shlibpath_var=no
13814	hardcode_direct_absolute=yes
13815	if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
13816	  archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
13817	  archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols'
13818	  hardcode_libdir_flag_spec='$wl-rpath,$libdir'
13819	  export_dynamic_flag_spec='$wl-E'
13820	else
13821	  archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
13822	  hardcode_libdir_flag_spec='$wl-rpath,$libdir'
13823	fi
13824      else
13825	ld_shlibs=no
13826      fi
13827      ;;
13828
13829    os2*)
13830      hardcode_libdir_flag_spec='-L$libdir'
13831      hardcode_minus_L=yes
13832      allow_undefined_flag=unsupported
13833      shrext_cmds=.dll
13834      archive_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
13835	$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
13836	$ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
13837	$ECHO EXPORTS >> $output_objdir/$libname.def~
13838	emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
13839	$CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
13840	emximp -o $lib $output_objdir/$libname.def'
13841      archive_expsym_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
13842	$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
13843	$ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
13844	$ECHO EXPORTS >> $output_objdir/$libname.def~
13845	prefix_cmds="$SED"~
13846	if test EXPORTS = "`$SED 1q $export_symbols`"; then
13847	  prefix_cmds="$prefix_cmds -e 1d";
13848	fi~
13849	prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
13850	cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
13851	$CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
13852	emximp -o $lib $output_objdir/$libname.def'
13853      old_archive_From_new_cmds='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
13854      enable_shared_with_static_runtimes=yes
13855      ;;
13856
13857    osf3*)
13858      if test yes = "$GCC"; then
13859	allow_undefined_flag=' $wl-expect_unresolved $wl\*'
13860	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'
13861      else
13862	allow_undefined_flag=' -expect_unresolved \*'
13863	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'
13864      fi
13865      archive_cmds_need_lc='no'
13866      hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
13867      hardcode_libdir_separator=:
13868      ;;
13869
13870    osf4* | osf5*)	# as osf3* with the addition of -msym flag
13871      if test yes = "$GCC"; then
13872	allow_undefined_flag=' $wl-expect_unresolved $wl\*'
13873	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'
13874	hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
13875      else
13876	allow_undefined_flag=' -expect_unresolved \*'
13877	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'
13878	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~
13879          $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'
13880
13881	# Both c and cxx compiler support -rpath directly
13882	hardcode_libdir_flag_spec='-rpath $libdir'
13883      fi
13884      archive_cmds_need_lc='no'
13885      hardcode_libdir_separator=:
13886      ;;
13887
13888    solaris*)
13889      no_undefined_flag=' -z defs'
13890      if test yes = "$GCC"; then
13891	wlarc='$wl'
13892	archive_cmds='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
13893	archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
13894          $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'
13895      else
13896	case `$CC -V 2>&1` in
13897	*"Compilers 5.0"*)
13898	  wlarc=''
13899	  archive_cmds='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags'
13900	  archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
13901            $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
13902	  ;;
13903	*)
13904	  wlarc='$wl'
13905	  archive_cmds='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags'
13906	  archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
13907            $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
13908	  ;;
13909	esac
13910      fi
13911      hardcode_libdir_flag_spec='-R$libdir'
13912      hardcode_shlibpath_var=no
13913      case $host_os in
13914      solaris2.[0-5] | solaris2.[0-5].*) ;;
13915      *)
13916	# The compiler driver will combine and reorder linker options,
13917	# but understands '-z linker_flag'.  GCC discards it without '$wl',
13918	# but is careful enough not to reorder.
13919	# Supported since Solaris 2.6 (maybe 2.5.1?)
13920	if test yes = "$GCC"; then
13921	  whole_archive_flag_spec='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract'
13922	else
13923	  whole_archive_flag_spec='-z allextract$convenience -z defaultextract'
13924	fi
13925	;;
13926      esac
13927      link_all_deplibs=yes
13928      ;;
13929
13930    sunos4*)
13931      if test sequent = "$host_vendor"; then
13932	# Use $CC to link under sequent, because it throws in some extra .o
13933	# files that make .init and .fini sections work.
13934	archive_cmds='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags'
13935      else
13936	archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
13937      fi
13938      hardcode_libdir_flag_spec='-L$libdir'
13939      hardcode_direct=yes
13940      hardcode_minus_L=yes
13941      hardcode_shlibpath_var=no
13942      ;;
13943
13944    sysv4)
13945      case $host_vendor in
13946	sni)
13947	  archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
13948	  hardcode_direct=yes # is this really true???
13949	;;
13950	siemens)
13951	  ## LD is ld it makes a PLAMLIB
13952	  ## CC just makes a GrossModule.
13953	  archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
13954	  reload_cmds='$CC -r -o $output$reload_objs'
13955	  hardcode_direct=no
13956        ;;
13957	motorola)
13958	  archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
13959	  hardcode_direct=no #Motorola manual says yes, but my tests say they lie
13960	;;
13961      esac
13962      runpath_var='LD_RUN_PATH'
13963      hardcode_shlibpath_var=no
13964      ;;
13965
13966    sysv4.3*)
13967      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
13968      hardcode_shlibpath_var=no
13969      export_dynamic_flag_spec='-Bexport'
13970      ;;
13971
13972    sysv4*MP*)
13973      if test -d /usr/nec; then
13974	archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
13975	hardcode_shlibpath_var=no
13976	runpath_var=LD_RUN_PATH
13977	hardcode_runpath_var=yes
13978	ld_shlibs=yes
13979      fi
13980      ;;
13981
13982    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*)
13983      no_undefined_flag='$wl-z,text'
13984      archive_cmds_need_lc=no
13985      hardcode_shlibpath_var=no
13986      runpath_var='LD_RUN_PATH'
13987
13988      if test yes = "$GCC"; then
13989	archive_cmds='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
13990	archive_expsym_cmds='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
13991      else
13992	archive_cmds='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
13993	archive_expsym_cmds='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
13994      fi
13995      ;;
13996
13997    sysv5* | sco3.2v5* | sco5v6*)
13998      # Note: We CANNOT use -z defs as we might desire, because we do not
13999      # link with -lc, and that would cause any symbols used from libc to
14000      # always be unresolved, which means just about no library would
14001      # ever link correctly.  If we're not using GNU ld we use -z text
14002      # though, which does catch some bad symbols but isn't as heavy-handed
14003      # as -z defs.
14004      no_undefined_flag='$wl-z,text'
14005      allow_undefined_flag='$wl-z,nodefs'
14006      archive_cmds_need_lc=no
14007      hardcode_shlibpath_var=no
14008      hardcode_libdir_flag_spec='$wl-R,$libdir'
14009      hardcode_libdir_separator=':'
14010      link_all_deplibs=yes
14011      export_dynamic_flag_spec='$wl-Bexport'
14012      runpath_var='LD_RUN_PATH'
14013
14014      if test yes = "$GCC"; then
14015	archive_cmds='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
14016	archive_expsym_cmds='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
14017      else
14018	archive_cmds='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
14019	archive_expsym_cmds='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
14020      fi
14021      ;;
14022
14023    uts4*)
14024      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
14025      hardcode_libdir_flag_spec='-L$libdir'
14026      hardcode_shlibpath_var=no
14027      ;;
14028
14029    *)
14030      ld_shlibs=no
14031      ;;
14032    esac
14033
14034    if test sni = "$host_vendor"; then
14035      case $host in
14036      sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
14037	export_dynamic_flag_spec='$wl-Blargedynsym'
14038	;;
14039      esac
14040    fi
14041  fi
14042
14043{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5
14044printf "%s\n" "$ld_shlibs" >&6; }
14045test no = "$ld_shlibs" && can_build_shared=no
14046
14047with_gnu_ld=$with_gnu_ld
14048
14049
14050
14051
14052
14053
14054
14055
14056
14057
14058
14059
14060
14061
14062
14063#
14064# Do we need to explicitly link libc?
14065#
14066case "x$archive_cmds_need_lc" in
14067x|xyes)
14068  # Assume -lc should be added
14069  archive_cmds_need_lc=yes
14070
14071  if test yes,yes = "$GCC,$enable_shared"; then
14072    case $archive_cmds in
14073    *'~'*)
14074      # FIXME: we may have to deal with multi-command sequences.
14075      ;;
14076    '$CC '*)
14077      # Test whether the compiler implicitly links with -lc since on some
14078      # systems, -lgcc has to come before -lc. If gcc already passes -lc
14079      # to ld, don't add -lc before -lgcc.
14080      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5
14081printf %s "checking whether -lc should be explicitly linked in... " >&6; }
14082if test ${lt_cv_archive_cmds_need_lc+y}
14083then :
14084  printf %s "(cached) " >&6
14085else case e in #(
14086  e) $RM conftest*
14087	echo "$lt_simple_compile_test_code" > conftest.$ac_ext
14088
14089	if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
14090  (eval $ac_compile) 2>&5
14091  ac_status=$?
14092  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
14093  test $ac_status = 0; } 2>conftest.err; then
14094	  soname=conftest
14095	  lib=conftest
14096	  libobjs=conftest.$ac_objext
14097	  deplibs=
14098	  wl=$lt_prog_compiler_wl
14099	  pic_flag=$lt_prog_compiler_pic
14100	  compiler_flags=-v
14101	  linker_flags=-v
14102	  verstring=
14103	  output_objdir=.
14104	  libname=conftest
14105	  lt_save_allow_undefined_flag=$allow_undefined_flag
14106	  allow_undefined_flag=
14107	  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5
14108  (eval $archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5
14109  ac_status=$?
14110  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
14111  test $ac_status = 0; }
14112	  then
14113	    lt_cv_archive_cmds_need_lc=no
14114	  else
14115	    lt_cv_archive_cmds_need_lc=yes
14116	  fi
14117	  allow_undefined_flag=$lt_save_allow_undefined_flag
14118	else
14119	  cat conftest.err 1>&5
14120	fi
14121	$RM conftest*
14122	 ;;
14123esac
14124fi
14125{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc" >&5
14126printf "%s\n" "$lt_cv_archive_cmds_need_lc" >&6; }
14127      archive_cmds_need_lc=$lt_cv_archive_cmds_need_lc
14128      ;;
14129    esac
14130  fi
14131  ;;
14132esac
14133
14134
14135
14136
14137
14138
14139
14140
14141
14142
14143
14144
14145
14146
14147
14148
14149
14150
14151
14152
14153
14154
14155
14156
14157
14158
14159
14160
14161
14162
14163
14164
14165
14166
14167
14168
14169
14170
14171
14172
14173
14174
14175
14176
14177
14178
14179
14180
14181
14182
14183
14184
14185
14186
14187
14188
14189
14190
14191
14192
14193
14194
14195
14196
14197
14198
14199
14200
14201
14202
14203
14204
14205
14206
14207
14208
14209
14210
14211
14212
14213
14214
14215
14216
14217
14218
14219
14220
14221
14222
14223
14224
14225
14226
14227
14228
14229
14230
14231
14232
14233
14234
14235
14236
14237
14238
14239
14240
14241
14242
14243
14244
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  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5
14286printf %s "checking dynamic linker characteristics... " >&6; }
14287
14288if test yes = "$GCC"; then
14289  case $host_os in
14290    darwin*) lt_awk_arg='/^libraries:/,/LR/' ;;
14291    *) lt_awk_arg='/^libraries:/' ;;
14292  esac
14293  case $host_os in
14294    mingw* | cegcc*) lt_sed_strip_eq='s|=\([A-Za-z]:\)|\1|g' ;;
14295    *) lt_sed_strip_eq='s|=/|/|g' ;;
14296  esac
14297  lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq`
14298  case $lt_search_path_spec in
14299  *\;*)
14300    # if the path contains ";" then we assume it to be the separator
14301    # otherwise default to the standard path separator (i.e. ":") - it is
14302    # assumed that no part of a normal pathname contains ";" but that should
14303    # okay in the real world where ";" in dirpaths is itself problematic.
14304    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'`
14305    ;;
14306  *)
14307    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"`
14308    ;;
14309  esac
14310  # Ok, now we have the path, separated by spaces, we can step through it
14311  # and add multilib dir if necessary...
14312  lt_tmp_lt_search_path_spec=
14313  lt_multi_os_dir=/`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
14314  # ...but if some path component already ends with the multilib dir we assume
14315  # that all is fine and trust -print-search-dirs as is (GCC 4.2? or newer).
14316  case "$lt_multi_os_dir; $lt_search_path_spec " in
14317  "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*)
14318    lt_multi_os_dir=
14319    ;;
14320  esac
14321  for lt_sys_path in $lt_search_path_spec; do
14322    if test -d "$lt_sys_path$lt_multi_os_dir"; then
14323      lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path$lt_multi_os_dir"
14324    elif test -n "$lt_multi_os_dir"; then
14325      test -d "$lt_sys_path" && \
14326	lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
14327    fi
14328  done
14329  lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk '
14330BEGIN {RS = " "; FS = "/|\n";} {
14331  lt_foo = "";
14332  lt_count = 0;
14333  for (lt_i = NF; lt_i > 0; lt_i--) {
14334    if ($lt_i != "" && $lt_i != ".") {
14335      if ($lt_i == "..") {
14336        lt_count++;
14337      } else {
14338        if (lt_count == 0) {
14339          lt_foo = "/" $lt_i lt_foo;
14340        } else {
14341          lt_count--;
14342        }
14343      }
14344    }
14345  }
14346  if (lt_foo != "") { lt_freq[lt_foo]++; }
14347  if (lt_freq[lt_foo] == 1) { print lt_foo; }
14348}'`
14349  # AWK program above erroneously prepends '/' to C:/dos/paths
14350  # for these hosts.
14351  case $host_os in
14352    mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\
14353      $SED 's|/\([A-Za-z]:\)|\1|g'` ;;
14354  esac
14355  sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP`
14356else
14357  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
14358fi
14359library_names_spec=
14360libname_spec='lib$name'
14361soname_spec=
14362shrext_cmds=.so
14363postinstall_cmds=
14364postuninstall_cmds=
14365finish_cmds=
14366finish_eval=
14367shlibpath_var=
14368shlibpath_overrides_runpath=unknown
14369version_type=none
14370dynamic_linker="$host_os ld.so"
14371sys_lib_dlsearch_path_spec="/lib /usr/lib"
14372need_lib_prefix=unknown
14373hardcode_into_libs=no
14374
14375# when you set need_version to no, make sure it does not cause -set_version
14376# flags to be left without arguments
14377need_version=unknown
14378
14379
14380
14381case $host_os in
14382aix3*)
14383  version_type=linux # correct to gnu/linux during the next big refactor
14384  library_names_spec='$libname$release$shared_ext$versuffix $libname.a'
14385  shlibpath_var=LIBPATH
14386
14387  # AIX 3 has no versioning support, so we append a major version to the name.
14388  soname_spec='$libname$release$shared_ext$major'
14389  ;;
14390
14391aix[4-9]*)
14392  version_type=linux # correct to gnu/linux during the next big refactor
14393  need_lib_prefix=no
14394  need_version=no
14395  hardcode_into_libs=yes
14396  if test ia64 = "$host_cpu"; then
14397    # AIX 5 supports IA64
14398    library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext'
14399    shlibpath_var=LD_LIBRARY_PATH
14400  else
14401    # With GCC up to 2.95.x, collect2 would create an import file
14402    # for dependence libraries.  The import file would start with
14403    # the line '#! .'.  This would cause the generated library to
14404    # depend on '.', always an invalid library.  This was fixed in
14405    # development snapshots of GCC prior to 3.0.
14406    case $host_os in
14407      aix4 | aix4.[01] | aix4.[01].*)
14408      if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
14409	   echo ' yes '
14410	   echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then
14411	:
14412      else
14413	can_build_shared=no
14414      fi
14415      ;;
14416    esac
14417    # Using Import Files as archive members, it is possible to support
14418    # filename-based versioning of shared library archives on AIX. While
14419    # this would work for both with and without runtime linking, it will
14420    # prevent static linking of such archives. So we do filename-based
14421    # shared library versioning with .so extension only, which is used
14422    # when both runtime linking and shared linking is enabled.
14423    # Unfortunately, runtime linking may impact performance, so we do
14424    # not want this to be the default eventually. Also, we use the
14425    # versioned .so libs for executables only if there is the -brtl
14426    # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only.
14427    # To allow for filename-based versioning support, we need to create
14428    # libNAME.so.V as an archive file, containing:
14429    # *) an Import File, referring to the versioned filename of the
14430    #    archive as well as the shared archive member, telling the
14431    #    bitwidth (32 or 64) of that shared object, and providing the
14432    #    list of exported symbols of that shared object, eventually
14433    #    decorated with the 'weak' keyword
14434    # *) the shared object with the F_LOADONLY flag set, to really avoid
14435    #    it being seen by the linker.
14436    # At run time we better use the real file rather than another symlink,
14437    # but for link time we create the symlink libNAME.so -> libNAME.so.V
14438
14439    case $with_aix_soname,$aix_use_runtimelinking in
14440    # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct
14441    # soname into executable. Probably we can add versioning support to
14442    # collect2, so additional links can be useful in future.
14443    aix,yes) # traditional libtool
14444      dynamic_linker='AIX unversionable lib.so'
14445      # If using run time linking (on AIX 4.2 or later) use lib<name>.so
14446      # instead of lib<name>.a to let people know that these are not
14447      # typical AIX shared libraries.
14448      library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
14449      ;;
14450    aix,no) # traditional AIX only
14451      dynamic_linker='AIX lib.a(lib.so.V)'
14452      # We preserve .a as extension for shared libraries through AIX4.2
14453      # and later when we are not doing run time linking.
14454      library_names_spec='$libname$release.a $libname.a'
14455      soname_spec='$libname$release$shared_ext$major'
14456      ;;
14457    svr4,*) # full svr4 only
14458      dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o)"
14459      library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
14460      # We do not specify a path in Import Files, so LIBPATH fires.
14461      shlibpath_overrides_runpath=yes
14462      ;;
14463    *,yes) # both, prefer svr4
14464      dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o), lib.a(lib.so.V)"
14465      library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
14466      # unpreferred sharedlib libNAME.a needs extra handling
14467      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"'
14468      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"'
14469      # We do not specify a path in Import Files, so LIBPATH fires.
14470      shlibpath_overrides_runpath=yes
14471      ;;
14472    *,no) # both, prefer aix
14473      dynamic_linker="AIX lib.a(lib.so.V), lib.so.V($shared_archive_member_spec.o)"
14474      library_names_spec='$libname$release.a $libname.a'
14475      soname_spec='$libname$release$shared_ext$major'
14476      # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling
14477      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)'
14478      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"'
14479      ;;
14480    esac
14481    shlibpath_var=LIBPATH
14482  fi
14483  ;;
14484
14485amigaos*)
14486  case $host_cpu in
14487  powerpc)
14488    # Since July 2007 AmigaOS4 officially supports .so libraries.
14489    # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
14490    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
14491    ;;
14492  m68k)
14493    library_names_spec='$libname.ixlibrary $libname.a'
14494    # Create ${libname}_ixlibrary.a entries in /sys/libs.
14495    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'
14496    ;;
14497  esac
14498  ;;
14499
14500beos*)
14501  library_names_spec='$libname$shared_ext'
14502  dynamic_linker="$host_os ld.so"
14503  shlibpath_var=LIBRARY_PATH
14504  ;;
14505
14506bsdi[45]*)
14507  version_type=linux # correct to gnu/linux during the next big refactor
14508  need_version=no
14509  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
14510  soname_spec='$libname$release$shared_ext$major'
14511  finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
14512  shlibpath_var=LD_LIBRARY_PATH
14513  sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
14514  sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
14515  # the default ld.so.conf also contains /usr/contrib/lib and
14516  # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
14517  # libtool to hard-code these into programs
14518  ;;
14519
14520cygwin* | mingw* | pw32* | cegcc*)
14521  version_type=windows
14522  shrext_cmds=.dll
14523  need_version=no
14524  need_lib_prefix=no
14525
14526  case $GCC,$cc_basename in
14527  yes,*)
14528    # gcc
14529    library_names_spec='$libname.dll.a'
14530    # DLL is installed to $(libdir)/../bin by postinstall_cmds
14531    postinstall_cmds='base_file=`basename \$file`~
14532      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
14533      dldir=$destdir/`dirname \$dlpath`~
14534      test -d \$dldir || mkdir -p \$dldir~
14535      $install_prog $dir/$dlname \$dldir/$dlname~
14536      chmod a+x \$dldir/$dlname~
14537      if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
14538        eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
14539      fi'
14540    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
14541      dlpath=$dir/\$dldll~
14542       $RM \$dlpath'
14543    shlibpath_overrides_runpath=yes
14544
14545    case $host_os in
14546    cygwin*)
14547      # Cygwin DLLs use 'cyg' prefix rather than 'lib'
14548      soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
14549
14550      sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"
14551      ;;
14552    mingw* | cegcc*)
14553      # MinGW DLLs use traditional 'lib' prefix
14554      soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
14555      ;;
14556    pw32*)
14557      # pw32 DLLs use 'pw' prefix rather than 'lib'
14558      library_names_spec='`echo $libname | sed -e 's/^lib/pw/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
14559      ;;
14560    esac
14561    dynamic_linker='Win32 ld.exe'
14562    ;;
14563
14564  *,cl*)
14565    # Native MSVC
14566    libname_spec='$name'
14567    soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
14568    library_names_spec='$libname.dll.lib'
14569
14570    case $build_os in
14571    mingw*)
14572      sys_lib_search_path_spec=
14573      lt_save_ifs=$IFS
14574      IFS=';'
14575      for lt_path in $LIB
14576      do
14577        IFS=$lt_save_ifs
14578        # Let DOS variable expansion print the short 8.3 style file name.
14579        lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"`
14580        sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path"
14581      done
14582      IFS=$lt_save_ifs
14583      # Convert to MSYS style.
14584      sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'`
14585      ;;
14586    cygwin*)
14587      # Convert to unix form, then to dos form, then back to unix form
14588      # but this time dos style (no spaces!) so that the unix form looks
14589      # like /cygdrive/c/PROGRA~1:/cygdr...
14590      sys_lib_search_path_spec=`cygpath --path --unix "$LIB"`
14591      sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null`
14592      sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
14593      ;;
14594    *)
14595      sys_lib_search_path_spec=$LIB
14596      if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then
14597        # It is most probably a Windows format PATH.
14598        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
14599      else
14600        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
14601      fi
14602      # FIXME: find the short name or the path components, as spaces are
14603      # common. (e.g. "Program Files" -> "PROGRA~1")
14604      ;;
14605    esac
14606
14607    # DLL is installed to $(libdir)/../bin by postinstall_cmds
14608    postinstall_cmds='base_file=`basename \$file`~
14609      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
14610      dldir=$destdir/`dirname \$dlpath`~
14611      test -d \$dldir || mkdir -p \$dldir~
14612      $install_prog $dir/$dlname \$dldir/$dlname'
14613    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
14614      dlpath=$dir/\$dldll~
14615       $RM \$dlpath'
14616    shlibpath_overrides_runpath=yes
14617    dynamic_linker='Win32 link.exe'
14618    ;;
14619
14620  *)
14621    # Assume MSVC wrapper
14622    library_names_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext $libname.lib'
14623    dynamic_linker='Win32 ld.exe'
14624    ;;
14625  esac
14626  # FIXME: first we should search . and the directory the executable is in
14627  shlibpath_var=PATH
14628  ;;
14629
14630darwin* | rhapsody*)
14631  dynamic_linker="$host_os dyld"
14632  version_type=darwin
14633  need_lib_prefix=no
14634  need_version=no
14635  library_names_spec='$libname$release$major$shared_ext $libname$shared_ext'
14636  soname_spec='$libname$release$major$shared_ext'
14637  shlibpath_overrides_runpath=yes
14638  shlibpath_var=DYLD_LIBRARY_PATH
14639  shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
14640
14641  sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"
14642  sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
14643  ;;
14644
14645dgux*)
14646  version_type=linux # correct to gnu/linux during the next big refactor
14647  need_lib_prefix=no
14648  need_version=no
14649  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
14650  soname_spec='$libname$release$shared_ext$major'
14651  shlibpath_var=LD_LIBRARY_PATH
14652  ;;
14653
14654freebsd* | dragonfly*)
14655  # DragonFly does not have aout.  When/if they implement a new
14656  # versioning mechanism, adjust this.
14657  if test -x /usr/bin/objformat; then
14658    objformat=`/usr/bin/objformat`
14659  else
14660    case $host_os in
14661    freebsd[23].*) objformat=aout ;;
14662    *) objformat=elf ;;
14663    esac
14664  fi
14665  version_type=freebsd-$objformat
14666  case $version_type in
14667    freebsd-elf*)
14668      library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
14669      soname_spec='$libname$release$shared_ext$major'
14670      need_version=no
14671      need_lib_prefix=no
14672      ;;
14673    freebsd-*)
14674      library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
14675      need_version=yes
14676      ;;
14677  esac
14678  shlibpath_var=LD_LIBRARY_PATH
14679  case $host_os in
14680  freebsd2.*)
14681    shlibpath_overrides_runpath=yes
14682    ;;
14683  freebsd3.[01]* | freebsdelf3.[01]*)
14684    shlibpath_overrides_runpath=yes
14685    hardcode_into_libs=yes
14686    ;;
14687  freebsd3.[2-9]* | freebsdelf3.[2-9]* | \
14688  freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1)
14689    shlibpath_overrides_runpath=no
14690    hardcode_into_libs=yes
14691    ;;
14692  *) # from 4.6 on, and DragonFly
14693    shlibpath_overrides_runpath=yes
14694    hardcode_into_libs=yes
14695    ;;
14696  esac
14697  ;;
14698
14699haiku*)
14700  version_type=linux # correct to gnu/linux during the next big refactor
14701  need_lib_prefix=no
14702  need_version=no
14703  dynamic_linker="$host_os runtime_loader"
14704  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
14705  soname_spec='$libname$release$shared_ext$major'
14706  shlibpath_var=LIBRARY_PATH
14707  shlibpath_overrides_runpath=no
14708  sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
14709  hardcode_into_libs=yes
14710  ;;
14711
14712hpux9* | hpux10* | hpux11*)
14713  # Give a soname corresponding to the major version so that dld.sl refuses to
14714  # link against other versions.
14715  version_type=sunos
14716  need_lib_prefix=no
14717  need_version=no
14718  case $host_cpu in
14719  ia64*)
14720    shrext_cmds='.so'
14721    hardcode_into_libs=yes
14722    dynamic_linker="$host_os dld.so"
14723    shlibpath_var=LD_LIBRARY_PATH
14724    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
14725    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
14726    soname_spec='$libname$release$shared_ext$major'
14727    if test 32 = "$HPUX_IA64_MODE"; then
14728      sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
14729      sys_lib_dlsearch_path_spec=/usr/lib/hpux32
14730    else
14731      sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
14732      sys_lib_dlsearch_path_spec=/usr/lib/hpux64
14733    fi
14734    ;;
14735  hppa*64*)
14736    shrext_cmds='.sl'
14737    hardcode_into_libs=yes
14738    dynamic_linker="$host_os dld.sl"
14739    shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
14740    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
14741    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
14742    soname_spec='$libname$release$shared_ext$major'
14743    sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
14744    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
14745    ;;
14746  *)
14747    shrext_cmds='.sl'
14748    dynamic_linker="$host_os dld.sl"
14749    shlibpath_var=SHLIB_PATH
14750    shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
14751    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
14752    soname_spec='$libname$release$shared_ext$major'
14753    ;;
14754  esac
14755  # HP-UX runs *really* slowly unless shared libraries are mode 555, ...
14756  postinstall_cmds='chmod 555 $lib'
14757  # or fails outright, so override atomically:
14758  install_override_mode=555
14759  ;;
14760
14761interix[3-9]*)
14762  version_type=linux # correct to gnu/linux during the next big refactor
14763  need_lib_prefix=no
14764  need_version=no
14765  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
14766  soname_spec='$libname$release$shared_ext$major'
14767  dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
14768  shlibpath_var=LD_LIBRARY_PATH
14769  shlibpath_overrides_runpath=no
14770  hardcode_into_libs=yes
14771  ;;
14772
14773irix5* | irix6* | nonstopux*)
14774  case $host_os in
14775    nonstopux*) version_type=nonstopux ;;
14776    *)
14777	if test yes = "$lt_cv_prog_gnu_ld"; then
14778		version_type=linux # correct to gnu/linux during the next big refactor
14779	else
14780		version_type=irix
14781	fi ;;
14782  esac
14783  need_lib_prefix=no
14784  need_version=no
14785  soname_spec='$libname$release$shared_ext$major'
14786  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext'
14787  case $host_os in
14788  irix5* | nonstopux*)
14789    libsuff= shlibsuff=
14790    ;;
14791  *)
14792    case $LD in # libtool.m4 will add one of these switches to LD
14793    *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
14794      libsuff= shlibsuff= libmagic=32-bit;;
14795    *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
14796      libsuff=32 shlibsuff=N32 libmagic=N32;;
14797    *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
14798      libsuff=64 shlibsuff=64 libmagic=64-bit;;
14799    *) libsuff= shlibsuff= libmagic=never-match;;
14800    esac
14801    ;;
14802  esac
14803  shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
14804  shlibpath_overrides_runpath=no
14805  sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff"
14806  sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff"
14807  hardcode_into_libs=yes
14808  ;;
14809
14810# No shared lib support for Linux oldld, aout, or coff.
14811linux*oldld* | linux*aout* | linux*coff*)
14812  dynamic_linker=no
14813  ;;
14814
14815linux*android*)
14816  version_type=none # Android doesn't support versioned libraries.
14817  need_lib_prefix=no
14818  need_version=no
14819  library_names_spec='$libname$release$shared_ext'
14820  soname_spec='$libname$release$shared_ext'
14821  finish_cmds=
14822  shlibpath_var=LD_LIBRARY_PATH
14823  shlibpath_overrides_runpath=yes
14824
14825  # This implies no fast_install, which is unacceptable.
14826  # Some rework will be needed to allow for fast_install
14827  # before this can be enabled.
14828  hardcode_into_libs=yes
14829
14830  dynamic_linker='Android linker'
14831  # Don't embed -rpath directories since the linker doesn't support them.
14832  hardcode_libdir_flag_spec='-L$libdir'
14833  ;;
14834
14835# This must be glibc/ELF.
14836linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
14837  version_type=linux # correct to gnu/linux during the next big refactor
14838  need_lib_prefix=no
14839  need_version=no
14840  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
14841  soname_spec='$libname$release$shared_ext$major'
14842  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
14843  shlibpath_var=LD_LIBRARY_PATH
14844  shlibpath_overrides_runpath=no
14845
14846  # Some binutils ld are patched to set DT_RUNPATH
14847  if test ${lt_cv_shlibpath_overrides_runpath+y}
14848then :
14849  printf %s "(cached) " >&6
14850else case e in #(
14851  e) lt_cv_shlibpath_overrides_runpath=no
14852    save_LDFLAGS=$LDFLAGS
14853    save_libdir=$libdir
14854    eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \
14855	 LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\""
14856    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14857/* end confdefs.h.  */
14858
14859int
14860main (void)
14861{
14862
14863  ;
14864  return 0;
14865}
14866_ACEOF
14867if ac_fn_c_try_link "$LINENO"
14868then :
14869  if  ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null
14870then :
14871  lt_cv_shlibpath_overrides_runpath=yes
14872fi
14873fi
14874rm -f core conftest.err conftest.$ac_objext conftest.beam \
14875    conftest$ac_exeext conftest.$ac_ext
14876    LDFLAGS=$save_LDFLAGS
14877    libdir=$save_libdir
14878     ;;
14879esac
14880fi
14881
14882  shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
14883
14884  # This implies no fast_install, which is unacceptable.
14885  # Some rework will be needed to allow for fast_install
14886  # before this can be enabled.
14887  hardcode_into_libs=yes
14888
14889  # Add ABI-specific directories to the system library path.
14890  sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib"
14891
14892  # Ideally, we could use ldconfig to report *all* directores which are
14893  # searched for libraries, however this is still not possible.  Aside from not
14894  # being certain /sbin/ldconfig is available, command
14895  # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64,
14896  # even though it is searched at run-time.  Try to do the best guess by
14897  # appending ld.so.conf contents (and includes) to the search path.
14898  if test -f /etc/ld.so.conf; then
14899    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' ' '`
14900    sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra"
14901  fi
14902
14903  # We used to test for /lib/ld.so.1 and disable shared libraries on
14904  # powerpc, because MkLinux only supported shared libraries with the
14905  # GNU dynamic linker.  Since this was broken with cross compilers,
14906  # most powerpc-linux boxes support dynamic linking these days and
14907  # people can always --disable-shared, the test was removed, and we
14908  # assume the GNU/Linux dynamic linker is in use.
14909  dynamic_linker='GNU/Linux ld.so'
14910  ;;
14911
14912netbsd*)
14913  version_type=sunos
14914  need_lib_prefix=no
14915  need_version=no
14916  if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
14917    library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
14918    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
14919    dynamic_linker='NetBSD (a.out) ld.so'
14920  else
14921    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
14922    soname_spec='$libname$release$shared_ext$major'
14923    dynamic_linker='NetBSD ld.elf_so'
14924  fi
14925  shlibpath_var=LD_LIBRARY_PATH
14926  shlibpath_overrides_runpath=yes
14927  hardcode_into_libs=yes
14928  ;;
14929
14930newsos6)
14931  version_type=linux # correct to gnu/linux during the next big refactor
14932  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
14933  shlibpath_var=LD_LIBRARY_PATH
14934  shlibpath_overrides_runpath=yes
14935  ;;
14936
14937*nto* | *qnx*)
14938  version_type=qnx
14939  need_lib_prefix=no
14940  need_version=no
14941  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
14942  soname_spec='$libname$release$shared_ext$major'
14943  shlibpath_var=LD_LIBRARY_PATH
14944  shlibpath_overrides_runpath=no
14945  hardcode_into_libs=yes
14946  dynamic_linker='ldqnx.so'
14947  ;;
14948
14949openbsd* | bitrig*)
14950  version_type=sunos
14951  sys_lib_dlsearch_path_spec=/usr/lib
14952  need_lib_prefix=no
14953  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
14954    need_version=no
14955  else
14956    need_version=yes
14957  fi
14958  library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
14959  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
14960  shlibpath_var=LD_LIBRARY_PATH
14961  shlibpath_overrides_runpath=yes
14962  ;;
14963
14964os2*)
14965  libname_spec='$name'
14966  version_type=windows
14967  shrext_cmds=.dll
14968  need_version=no
14969  need_lib_prefix=no
14970  # OS/2 can only load a DLL with a base name of 8 characters or less.
14971  soname_spec='`test -n "$os2dllname" && libname="$os2dllname";
14972    v=$($ECHO $release$versuffix | tr -d .-);
14973    n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _);
14974    $ECHO $n$v`$shared_ext'
14975  library_names_spec='${libname}_dll.$libext'
14976  dynamic_linker='OS/2 ld.exe'
14977  shlibpath_var=BEGINLIBPATH
14978  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
14979  sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
14980  postinstall_cmds='base_file=`basename \$file`~
14981    dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~
14982    dldir=$destdir/`dirname \$dlpath`~
14983    test -d \$dldir || mkdir -p \$dldir~
14984    $install_prog $dir/$dlname \$dldir/$dlname~
14985    chmod a+x \$dldir/$dlname~
14986    if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
14987      eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
14988    fi'
14989  postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~
14990    dlpath=$dir/\$dldll~
14991    $RM \$dlpath'
14992  ;;
14993
14994osf3* | osf4* | osf5*)
14995  version_type=osf
14996  need_lib_prefix=no
14997  need_version=no
14998  soname_spec='$libname$release$shared_ext$major'
14999  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
15000  shlibpath_var=LD_LIBRARY_PATH
15001  sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
15002  sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
15003  ;;
15004
15005rdos*)
15006  dynamic_linker=no
15007  ;;
15008
15009solaris*)
15010  version_type=linux # correct to gnu/linux during the next big refactor
15011  need_lib_prefix=no
15012  need_version=no
15013  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
15014  soname_spec='$libname$release$shared_ext$major'
15015  shlibpath_var=LD_LIBRARY_PATH
15016  shlibpath_overrides_runpath=yes
15017  hardcode_into_libs=yes
15018  # ldd complains unless libraries are executable
15019  postinstall_cmds='chmod +x $lib'
15020  ;;
15021
15022sunos4*)
15023  version_type=sunos
15024  library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
15025  finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
15026  shlibpath_var=LD_LIBRARY_PATH
15027  shlibpath_overrides_runpath=yes
15028  if test yes = "$with_gnu_ld"; then
15029    need_lib_prefix=no
15030  fi
15031  need_version=yes
15032  ;;
15033
15034sysv4 | sysv4.3*)
15035  version_type=linux # correct to gnu/linux during the next big refactor
15036  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
15037  soname_spec='$libname$release$shared_ext$major'
15038  shlibpath_var=LD_LIBRARY_PATH
15039  case $host_vendor in
15040    sni)
15041      shlibpath_overrides_runpath=no
15042      need_lib_prefix=no
15043      runpath_var=LD_RUN_PATH
15044      ;;
15045    siemens)
15046      need_lib_prefix=no
15047      ;;
15048    motorola)
15049      need_lib_prefix=no
15050      need_version=no
15051      shlibpath_overrides_runpath=no
15052      sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
15053      ;;
15054  esac
15055  ;;
15056
15057sysv4*MP*)
15058  if test -d /usr/nec; then
15059    version_type=linux # correct to gnu/linux during the next big refactor
15060    library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext'
15061    soname_spec='$libname$shared_ext.$major'
15062    shlibpath_var=LD_LIBRARY_PATH
15063  fi
15064  ;;
15065
15066sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
15067  version_type=sco
15068  need_lib_prefix=no
15069  need_version=no
15070  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext'
15071  soname_spec='$libname$release$shared_ext$major'
15072  shlibpath_var=LD_LIBRARY_PATH
15073  shlibpath_overrides_runpath=yes
15074  hardcode_into_libs=yes
15075  if test yes = "$with_gnu_ld"; then
15076    sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
15077  else
15078    sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
15079    case $host_os in
15080      sco3.2v5*)
15081        sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
15082	;;
15083    esac
15084  fi
15085  sys_lib_dlsearch_path_spec='/usr/lib'
15086  ;;
15087
15088tpf*)
15089  # TPF is a cross-target only.  Preferred cross-host = GNU/Linux.
15090  version_type=linux # correct to gnu/linux during the next big refactor
15091  need_lib_prefix=no
15092  need_version=no
15093  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
15094  shlibpath_var=LD_LIBRARY_PATH
15095  shlibpath_overrides_runpath=no
15096  hardcode_into_libs=yes
15097  ;;
15098
15099uts4*)
15100  version_type=linux # correct to gnu/linux during the next big refactor
15101  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
15102  soname_spec='$libname$release$shared_ext$major'
15103  shlibpath_var=LD_LIBRARY_PATH
15104  ;;
15105
15106*)
15107  dynamic_linker=no
15108  ;;
15109esac
15110{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5
15111printf "%s\n" "$dynamic_linker" >&6; }
15112test no = "$dynamic_linker" && can_build_shared=no
15113
15114variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
15115if test yes = "$GCC"; then
15116  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
15117fi
15118
15119if test set = "${lt_cv_sys_lib_search_path_spec+set}"; then
15120  sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec
15121fi
15122
15123if test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then
15124  sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec
15125fi
15126
15127# remember unaugmented sys_lib_dlsearch_path content for libtool script decls...
15128configure_time_dlsearch_path=$sys_lib_dlsearch_path_spec
15129
15130# ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code
15131func_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH"
15132
15133# to be used as default LT_SYS_LIBRARY_PATH value in generated libtool
15134configure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH
15135
15136
15137
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  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5
15233printf %s "checking how to hardcode library paths into programs... " >&6; }
15234hardcode_action=
15235if test -n "$hardcode_libdir_flag_spec" ||
15236   test -n "$runpath_var" ||
15237   test yes = "$hardcode_automatic"; then
15238
15239  # We can hardcode non-existent directories.
15240  if test no != "$hardcode_direct" &&
15241     # If the only mechanism to avoid hardcoding is shlibpath_var, we
15242     # have to relink, otherwise we might link with an installed library
15243     # when we should be linking with a yet-to-be-installed one
15244     ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, )" &&
15245     test no != "$hardcode_minus_L"; then
15246    # Linking always hardcodes the temporary library directory.
15247    hardcode_action=relink
15248  else
15249    # We can link without hardcoding, and we can hardcode nonexisting dirs.
15250    hardcode_action=immediate
15251  fi
15252else
15253  # We cannot hardcode anything, or else we can only hardcode existing
15254  # directories.
15255  hardcode_action=unsupported
15256fi
15257{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5
15258printf "%s\n" "$hardcode_action" >&6; }
15259
15260if test relink = "$hardcode_action" ||
15261   test yes = "$inherit_rpath"; then
15262  # Fast installation is not supported
15263  enable_fast_install=no
15264elif test yes = "$shlibpath_overrides_runpath" ||
15265     test no = "$enable_shared"; then
15266  # Fast installation is not necessary
15267  enable_fast_install=needless
15268fi
15269
15270
15271
15272
15273
15274
15275  if test yes != "$enable_dlopen"; then
15276  enable_dlopen=unknown
15277  enable_dlopen_self=unknown
15278  enable_dlopen_self_static=unknown
15279else
15280  lt_cv_dlopen=no
15281  lt_cv_dlopen_libs=
15282
15283  case $host_os in
15284  beos*)
15285    lt_cv_dlopen=load_add_on
15286    lt_cv_dlopen_libs=
15287    lt_cv_dlopen_self=yes
15288    ;;
15289
15290  mingw* | pw32* | cegcc*)
15291    lt_cv_dlopen=LoadLibrary
15292    lt_cv_dlopen_libs=
15293    ;;
15294
15295  cygwin*)
15296    lt_cv_dlopen=dlopen
15297    lt_cv_dlopen_libs=
15298    ;;
15299
15300  darwin*)
15301    # if libdl is installed we need to link against it
15302    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
15303printf %s "checking for dlopen in -ldl... " >&6; }
15304if test ${ac_cv_lib_dl_dlopen+y}
15305then :
15306  printf %s "(cached) " >&6
15307else case e in #(
15308  e) ac_check_lib_save_LIBS=$LIBS
15309LIBS="-ldl  $LIBS"
15310cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15311/* end confdefs.h.  */
15312
15313/* Override any GCC internal prototype to avoid an error.
15314   Use char because int might match the return type of a GCC
15315   builtin and then its argument prototype would still apply.
15316   The 'extern "C"' is for builds by C++ compilers;
15317   although this is not generally supported in C code supporting it here
15318   has little cost and some practical benefit (sr 110532).  */
15319#ifdef __cplusplus
15320extern "C"
15321#endif
15322char dlopen (void);
15323int
15324main (void)
15325{
15326return dlopen ();
15327  ;
15328  return 0;
15329}
15330_ACEOF
15331if ac_fn_c_try_link "$LINENO"
15332then :
15333  ac_cv_lib_dl_dlopen=yes
15334else case e in #(
15335  e) ac_cv_lib_dl_dlopen=no ;;
15336esac
15337fi
15338rm -f core conftest.err conftest.$ac_objext conftest.beam \
15339    conftest$ac_exeext conftest.$ac_ext
15340LIBS=$ac_check_lib_save_LIBS ;;
15341esac
15342fi
15343{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
15344printf "%s\n" "$ac_cv_lib_dl_dlopen" >&6; }
15345if test "x$ac_cv_lib_dl_dlopen" = xyes
15346then :
15347  lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl
15348else case e in #(
15349  e)
15350    lt_cv_dlopen=dyld
15351    lt_cv_dlopen_libs=
15352    lt_cv_dlopen_self=yes
15353     ;;
15354esac
15355fi
15356
15357    ;;
15358
15359  tpf*)
15360    # Don't try to run any link tests for TPF.  We know it's impossible
15361    # because TPF is a cross-compiler, and we know how we open DSOs.
15362    lt_cv_dlopen=dlopen
15363    lt_cv_dlopen_libs=
15364    lt_cv_dlopen_self=no
15365    ;;
15366
15367  *)
15368    ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load"
15369if test "x$ac_cv_func_shl_load" = xyes
15370then :
15371  lt_cv_dlopen=shl_load
15372else case e in #(
15373  e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
15374printf %s "checking for shl_load in -ldld... " >&6; }
15375if test ${ac_cv_lib_dld_shl_load+y}
15376then :
15377  printf %s "(cached) " >&6
15378else case e in #(
15379  e) ac_check_lib_save_LIBS=$LIBS
15380LIBS="-ldld  $LIBS"
15381cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15382/* end confdefs.h.  */
15383
15384/* Override any GCC internal prototype to avoid an error.
15385   Use char because int might match the return type of a GCC
15386   builtin and then its argument prototype would still apply.
15387   The 'extern "C"' is for builds by C++ compilers;
15388   although this is not generally supported in C code supporting it here
15389   has little cost and some practical benefit (sr 110532).  */
15390#ifdef __cplusplus
15391extern "C"
15392#endif
15393char shl_load (void);
15394int
15395main (void)
15396{
15397return shl_load ();
15398  ;
15399  return 0;
15400}
15401_ACEOF
15402if ac_fn_c_try_link "$LINENO"
15403then :
15404  ac_cv_lib_dld_shl_load=yes
15405else case e in #(
15406  e) ac_cv_lib_dld_shl_load=no ;;
15407esac
15408fi
15409rm -f core conftest.err conftest.$ac_objext conftest.beam \
15410    conftest$ac_exeext conftest.$ac_ext
15411LIBS=$ac_check_lib_save_LIBS ;;
15412esac
15413fi
15414{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
15415printf "%s\n" "$ac_cv_lib_dld_shl_load" >&6; }
15416if test "x$ac_cv_lib_dld_shl_load" = xyes
15417then :
15418  lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld
15419else case e in #(
15420  e) ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
15421if test "x$ac_cv_func_dlopen" = xyes
15422then :
15423  lt_cv_dlopen=dlopen
15424else case e in #(
15425  e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
15426printf %s "checking for dlopen in -ldl... " >&6; }
15427if test ${ac_cv_lib_dl_dlopen+y}
15428then :
15429  printf %s "(cached) " >&6
15430else case e in #(
15431  e) ac_check_lib_save_LIBS=$LIBS
15432LIBS="-ldl  $LIBS"
15433cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15434/* end confdefs.h.  */
15435
15436/* Override any GCC internal prototype to avoid an error.
15437   Use char because int might match the return type of a GCC
15438   builtin and then its argument prototype would still apply.
15439   The 'extern "C"' is for builds by C++ compilers;
15440   although this is not generally supported in C code supporting it here
15441   has little cost and some practical benefit (sr 110532).  */
15442#ifdef __cplusplus
15443extern "C"
15444#endif
15445char dlopen (void);
15446int
15447main (void)
15448{
15449return dlopen ();
15450  ;
15451  return 0;
15452}
15453_ACEOF
15454if ac_fn_c_try_link "$LINENO"
15455then :
15456  ac_cv_lib_dl_dlopen=yes
15457else case e in #(
15458  e) ac_cv_lib_dl_dlopen=no ;;
15459esac
15460fi
15461rm -f core conftest.err conftest.$ac_objext conftest.beam \
15462    conftest$ac_exeext conftest.$ac_ext
15463LIBS=$ac_check_lib_save_LIBS ;;
15464esac
15465fi
15466{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
15467printf "%s\n" "$ac_cv_lib_dl_dlopen" >&6; }
15468if test "x$ac_cv_lib_dl_dlopen" = xyes
15469then :
15470  lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl
15471else case e in #(
15472  e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5
15473printf %s "checking for dlopen in -lsvld... " >&6; }
15474if test ${ac_cv_lib_svld_dlopen+y}
15475then :
15476  printf %s "(cached) " >&6
15477else case e in #(
15478  e) ac_check_lib_save_LIBS=$LIBS
15479LIBS="-lsvld  $LIBS"
15480cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15481/* end confdefs.h.  */
15482
15483/* Override any GCC internal prototype to avoid an error.
15484   Use char because int might match the return type of a GCC
15485   builtin and then its argument prototype would still apply.
15486   The 'extern "C"' is for builds by C++ compilers;
15487   although this is not generally supported in C code supporting it here
15488   has little cost and some practical benefit (sr 110532).  */
15489#ifdef __cplusplus
15490extern "C"
15491#endif
15492char dlopen (void);
15493int
15494main (void)
15495{
15496return dlopen ();
15497  ;
15498  return 0;
15499}
15500_ACEOF
15501if ac_fn_c_try_link "$LINENO"
15502then :
15503  ac_cv_lib_svld_dlopen=yes
15504else case e in #(
15505  e) ac_cv_lib_svld_dlopen=no ;;
15506esac
15507fi
15508rm -f core conftest.err conftest.$ac_objext conftest.beam \
15509    conftest$ac_exeext conftest.$ac_ext
15510LIBS=$ac_check_lib_save_LIBS ;;
15511esac
15512fi
15513{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5
15514printf "%s\n" "$ac_cv_lib_svld_dlopen" >&6; }
15515if test "x$ac_cv_lib_svld_dlopen" = xyes
15516then :
15517  lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld
15518else case e in #(
15519  e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5
15520printf %s "checking for dld_link in -ldld... " >&6; }
15521if test ${ac_cv_lib_dld_dld_link+y}
15522then :
15523  printf %s "(cached) " >&6
15524else case e in #(
15525  e) ac_check_lib_save_LIBS=$LIBS
15526LIBS="-ldld  $LIBS"
15527cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15528/* end confdefs.h.  */
15529
15530/* Override any GCC internal prototype to avoid an error.
15531   Use char because int might match the return type of a GCC
15532   builtin and then its argument prototype would still apply.
15533   The 'extern "C"' is for builds by C++ compilers;
15534   although this is not generally supported in C code supporting it here
15535   has little cost and some practical benefit (sr 110532).  */
15536#ifdef __cplusplus
15537extern "C"
15538#endif
15539char dld_link (void);
15540int
15541main (void)
15542{
15543return dld_link ();
15544  ;
15545  return 0;
15546}
15547_ACEOF
15548if ac_fn_c_try_link "$LINENO"
15549then :
15550  ac_cv_lib_dld_dld_link=yes
15551else case e in #(
15552  e) ac_cv_lib_dld_dld_link=no ;;
15553esac
15554fi
15555rm -f core conftest.err conftest.$ac_objext conftest.beam \
15556    conftest$ac_exeext conftest.$ac_ext
15557LIBS=$ac_check_lib_save_LIBS ;;
15558esac
15559fi
15560{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5
15561printf "%s\n" "$ac_cv_lib_dld_dld_link" >&6; }
15562if test "x$ac_cv_lib_dld_dld_link" = xyes
15563then :
15564  lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld
15565fi
15566
15567	       ;;
15568esac
15569fi
15570
15571	     ;;
15572esac
15573fi
15574
15575	   ;;
15576esac
15577fi
15578
15579	 ;;
15580esac
15581fi
15582
15583       ;;
15584esac
15585fi
15586
15587    ;;
15588  esac
15589
15590  if test no = "$lt_cv_dlopen"; then
15591    enable_dlopen=no
15592  else
15593    enable_dlopen=yes
15594  fi
15595
15596  case $lt_cv_dlopen in
15597  dlopen)
15598    save_CPPFLAGS=$CPPFLAGS
15599    test yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
15600
15601    save_LDFLAGS=$LDFLAGS
15602    wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
15603
15604    save_LIBS=$LIBS
15605    LIBS="$lt_cv_dlopen_libs $LIBS"
15606
15607    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5
15608printf %s "checking whether a program can dlopen itself... " >&6; }
15609if test ${lt_cv_dlopen_self+y}
15610then :
15611  printf %s "(cached) " >&6
15612else case e in #(
15613  e) 	  if test yes = "$cross_compiling"; then :
15614  lt_cv_dlopen_self=cross
15615else
15616  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
15617  lt_status=$lt_dlunknown
15618  cat > conftest.$ac_ext <<_LT_EOF
15619#line $LINENO "configure"
15620#include "confdefs.h"
15621
15622#if HAVE_DLFCN_H
15623#include <dlfcn.h>
15624#endif
15625
15626#include <stdio.h>
15627
15628#ifdef RTLD_GLOBAL
15629#  define LT_DLGLOBAL		RTLD_GLOBAL
15630#else
15631#  ifdef DL_GLOBAL
15632#    define LT_DLGLOBAL		DL_GLOBAL
15633#  else
15634#    define LT_DLGLOBAL		0
15635#  endif
15636#endif
15637
15638/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
15639   find out it does not work in some platform. */
15640#ifndef LT_DLLAZY_OR_NOW
15641#  ifdef RTLD_LAZY
15642#    define LT_DLLAZY_OR_NOW		RTLD_LAZY
15643#  else
15644#    ifdef DL_LAZY
15645#      define LT_DLLAZY_OR_NOW		DL_LAZY
15646#    else
15647#      ifdef RTLD_NOW
15648#        define LT_DLLAZY_OR_NOW	RTLD_NOW
15649#      else
15650#        ifdef DL_NOW
15651#          define LT_DLLAZY_OR_NOW	DL_NOW
15652#        else
15653#          define LT_DLLAZY_OR_NOW	0
15654#        endif
15655#      endif
15656#    endif
15657#  endif
15658#endif
15659
15660/* When -fvisibility=hidden is used, assume the code has been annotated
15661   correspondingly for the symbols needed.  */
15662#if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
15663int fnord () __attribute__((visibility("default")));
15664#endif
15665
15666int fnord () { return 42; }
15667int main ()
15668{
15669  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
15670  int status = $lt_dlunknown;
15671
15672  if (self)
15673    {
15674      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
15675      else
15676        {
15677	  if (dlsym( self,"_fnord"))  status = $lt_dlneed_uscore;
15678          else puts (dlerror ());
15679	}
15680      /* dlclose (self); */
15681    }
15682  else
15683    puts (dlerror ());
15684
15685  return status;
15686}
15687_LT_EOF
15688  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
15689  (eval $ac_link) 2>&5
15690  ac_status=$?
15691  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
15692  test $ac_status = 0; } && test -s "conftest$ac_exeext" 2>/dev/null; then
15693    (./conftest; exit; ) >&5 2>/dev/null
15694    lt_status=$?
15695    case x$lt_status in
15696      x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;;
15697      x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;;
15698      x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;;
15699    esac
15700  else :
15701    # compilation failed
15702    lt_cv_dlopen_self=no
15703  fi
15704fi
15705rm -fr conftest*
15706
15707     ;;
15708esac
15709fi
15710{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5
15711printf "%s\n" "$lt_cv_dlopen_self" >&6; }
15712
15713    if test yes = "$lt_cv_dlopen_self"; then
15714      wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
15715      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5
15716printf %s "checking whether a statically linked program can dlopen itself... " >&6; }
15717if test ${lt_cv_dlopen_self_static+y}
15718then :
15719  printf %s "(cached) " >&6
15720else case e in #(
15721  e) 	  if test yes = "$cross_compiling"; then :
15722  lt_cv_dlopen_self_static=cross
15723else
15724  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
15725  lt_status=$lt_dlunknown
15726  cat > conftest.$ac_ext <<_LT_EOF
15727#line $LINENO "configure"
15728#include "confdefs.h"
15729
15730#if HAVE_DLFCN_H
15731#include <dlfcn.h>
15732#endif
15733
15734#include <stdio.h>
15735
15736#ifdef RTLD_GLOBAL
15737#  define LT_DLGLOBAL		RTLD_GLOBAL
15738#else
15739#  ifdef DL_GLOBAL
15740#    define LT_DLGLOBAL		DL_GLOBAL
15741#  else
15742#    define LT_DLGLOBAL		0
15743#  endif
15744#endif
15745
15746/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
15747   find out it does not work in some platform. */
15748#ifndef LT_DLLAZY_OR_NOW
15749#  ifdef RTLD_LAZY
15750#    define LT_DLLAZY_OR_NOW		RTLD_LAZY
15751#  else
15752#    ifdef DL_LAZY
15753#      define LT_DLLAZY_OR_NOW		DL_LAZY
15754#    else
15755#      ifdef RTLD_NOW
15756#        define LT_DLLAZY_OR_NOW	RTLD_NOW
15757#      else
15758#        ifdef DL_NOW
15759#          define LT_DLLAZY_OR_NOW	DL_NOW
15760#        else
15761#          define LT_DLLAZY_OR_NOW	0
15762#        endif
15763#      endif
15764#    endif
15765#  endif
15766#endif
15767
15768/* When -fvisibility=hidden is used, assume the code has been annotated
15769   correspondingly for the symbols needed.  */
15770#if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
15771int fnord () __attribute__((visibility("default")));
15772#endif
15773
15774int fnord () { return 42; }
15775int main ()
15776{
15777  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
15778  int status = $lt_dlunknown;
15779
15780  if (self)
15781    {
15782      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
15783      else
15784        {
15785	  if (dlsym( self,"_fnord"))  status = $lt_dlneed_uscore;
15786          else puts (dlerror ());
15787	}
15788      /* dlclose (self); */
15789    }
15790  else
15791    puts (dlerror ());
15792
15793  return status;
15794}
15795_LT_EOF
15796  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
15797  (eval $ac_link) 2>&5
15798  ac_status=$?
15799  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
15800  test $ac_status = 0; } && test -s "conftest$ac_exeext" 2>/dev/null; then
15801    (./conftest; exit; ) >&5 2>/dev/null
15802    lt_status=$?
15803    case x$lt_status in
15804      x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;;
15805      x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;;
15806      x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;;
15807    esac
15808  else :
15809    # compilation failed
15810    lt_cv_dlopen_self_static=no
15811  fi
15812fi
15813rm -fr conftest*
15814
15815       ;;
15816esac
15817fi
15818{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self_static" >&5
15819printf "%s\n" "$lt_cv_dlopen_self_static" >&6; }
15820    fi
15821
15822    CPPFLAGS=$save_CPPFLAGS
15823    LDFLAGS=$save_LDFLAGS
15824    LIBS=$save_LIBS
15825    ;;
15826  esac
15827
15828  case $lt_cv_dlopen_self in
15829  yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
15830  *) enable_dlopen_self=unknown ;;
15831  esac
15832
15833  case $lt_cv_dlopen_self_static in
15834  yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
15835  *) enable_dlopen_self_static=unknown ;;
15836  esac
15837fi
15838
15839
15840
15841
15842
15843
15844
15845
15846
15847
15848
15849
15850
15851
15852
15853
15854
15855striplib=
15856old_striplib=
15857{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5
15858printf %s "checking whether stripping libraries is possible... " >&6; }
15859if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
15860  test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
15861  test -z "$striplib" && striplib="$STRIP --strip-unneeded"
15862  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15863printf "%s\n" "yes" >&6; }
15864else
15865# FIXME - insert some real tests, host_os isn't really good enough
15866  case $host_os in
15867  darwin*)
15868    if test -n "$STRIP"; then
15869      striplib="$STRIP -x"
15870      old_striplib="$STRIP -S"
15871      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15872printf "%s\n" "yes" >&6; }
15873    else
15874      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
15875printf "%s\n" "no" >&6; }
15876    fi
15877    ;;
15878  *)
15879    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
15880printf "%s\n" "no" >&6; }
15881    ;;
15882  esac
15883fi
15884
15885
15886
15887
15888
15889
15890
15891
15892
15893
15894
15895
15896  # Report what library types will actually be built
15897  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5
15898printf %s "checking if libtool supports shared libraries... " >&6; }
15899  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5
15900printf "%s\n" "$can_build_shared" >&6; }
15901
15902  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5
15903printf %s "checking whether to build shared libraries... " >&6; }
15904  test no = "$can_build_shared" && enable_shared=no
15905
15906  # On AIX, shared libraries and static libraries use the same namespace, and
15907  # are all built from PIC.
15908  case $host_os in
15909  aix3*)
15910    test yes = "$enable_shared" && enable_static=no
15911    if test -n "$RANLIB"; then
15912      archive_cmds="$archive_cmds~\$RANLIB \$lib"
15913      postinstall_cmds='$RANLIB $lib'
15914    fi
15915    ;;
15916
15917  aix[4-9]*)
15918    if test ia64 != "$host_cpu"; then
15919      case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in
15920      yes,aix,yes) ;;			# shared object as lib.so file only
15921      yes,svr4,*) ;;			# shared object as lib.so archive member only
15922      yes,*) enable_static=no ;;	# shared object in lib.a archive as well
15923      esac
15924    fi
15925    ;;
15926  esac
15927  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
15928printf "%s\n" "$enable_shared" >&6; }
15929
15930  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5
15931printf %s "checking whether to build static libraries... " >&6; }
15932  # Make sure either enable_shared or enable_static is yes.
15933  test yes = "$enable_shared" || enable_static=yes
15934  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5
15935printf "%s\n" "$enable_static" >&6; }
15936
15937
15938
15939
15940fi
15941ac_ext=c
15942ac_cpp='$CPP $CPPFLAGS'
15943ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15944ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15945ac_compiler_gnu=$ac_cv_c_compiler_gnu
15946
15947CC=$lt_save_CC
15948
15949
15950
15951
15952
15953
15954
15955
15956
15957
15958
15959
15960
15961
15962
15963        ac_config_commands="$ac_config_commands libtool"
15964
15965
15966
15967
15968# Only expand once:
15969
15970
15971
15972
15973# pkg-config is only needed for these options, do not require it otherwise
15974if test "$enable_systemd" = "yes" -o "$enable_dnstap" = "yes" -o "$with_pyunbound" = "yes" -o "$with_pythonmod" = "yes"; then
15975
15976
15977
15978
15979
15980
15981
15982if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
15983	if test -n "$ac_tool_prefix"; then
15984  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
15985set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
15986{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15987printf %s "checking for $ac_word... " >&6; }
15988if test ${ac_cv_path_PKG_CONFIG+y}
15989then :
15990  printf %s "(cached) " >&6
15991else case e in #(
15992  e) case $PKG_CONFIG in
15993  [\\/]* | ?:[\\/]*)
15994  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
15995  ;;
15996  *)
15997  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15998for as_dir in $PATH
15999do
16000  IFS=$as_save_IFS
16001  case $as_dir in #(((
16002    '') as_dir=./ ;;
16003    */) ;;
16004    *) as_dir=$as_dir/ ;;
16005  esac
16006    for ac_exec_ext in '' $ac_executable_extensions; do
16007  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
16008    ac_cv_path_PKG_CONFIG="$as_dir$ac_word$ac_exec_ext"
16009    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
16010    break 2
16011  fi
16012done
16013  done
16014IFS=$as_save_IFS
16015
16016  ;;
16017esac ;;
16018esac
16019fi
16020PKG_CONFIG=$ac_cv_path_PKG_CONFIG
16021if test -n "$PKG_CONFIG"; then
16022  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
16023printf "%s\n" "$PKG_CONFIG" >&6; }
16024else
16025  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
16026printf "%s\n" "no" >&6; }
16027fi
16028
16029
16030fi
16031if test -z "$ac_cv_path_PKG_CONFIG"; then
16032  ac_pt_PKG_CONFIG=$PKG_CONFIG
16033  # Extract the first word of "pkg-config", so it can be a program name with args.
16034set dummy pkg-config; ac_word=$2
16035{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16036printf %s "checking for $ac_word... " >&6; }
16037if test ${ac_cv_path_ac_pt_PKG_CONFIG+y}
16038then :
16039  printf %s "(cached) " >&6
16040else case e in #(
16041  e) case $ac_pt_PKG_CONFIG in
16042  [\\/]* | ?:[\\/]*)
16043  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
16044  ;;
16045  *)
16046  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16047for as_dir in $PATH
16048do
16049  IFS=$as_save_IFS
16050  case $as_dir in #(((
16051    '') as_dir=./ ;;
16052    */) ;;
16053    *) as_dir=$as_dir/ ;;
16054  esac
16055    for ac_exec_ext in '' $ac_executable_extensions; do
16056  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
16057    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir$ac_word$ac_exec_ext"
16058    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
16059    break 2
16060  fi
16061done
16062  done
16063IFS=$as_save_IFS
16064
16065  ;;
16066esac ;;
16067esac
16068fi
16069ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
16070if test -n "$ac_pt_PKG_CONFIG"; then
16071  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
16072printf "%s\n" "$ac_pt_PKG_CONFIG" >&6; }
16073else
16074  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
16075printf "%s\n" "no" >&6; }
16076fi
16077
16078  if test "x$ac_pt_PKG_CONFIG" = x; then
16079    PKG_CONFIG=""
16080  else
16081    case $cross_compiling:$ac_tool_warned in
16082yes:)
16083{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
16084printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
16085ac_tool_warned=yes ;;
16086esac
16087    PKG_CONFIG=$ac_pt_PKG_CONFIG
16088  fi
16089else
16090  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
16091fi
16092
16093fi
16094if test -n "$PKG_CONFIG"; then
16095	_pkg_min_version=0.9.0
16096	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
16097printf %s "checking pkg-config is at least version $_pkg_min_version... " >&6; }
16098	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
16099		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16100printf "%s\n" "yes" >&6; }
16101	else
16102		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
16103printf "%s\n" "no" >&6; }
16104		PKG_CONFIG=""
16105	fi
16106fi
16107fi
16108
16109# Checks for header files.
16110ac_fn_c_check_header_compile "$LINENO" "stdarg.h" "ac_cv_header_stdarg_h" "$ac_includes_default
16111"
16112if test "x$ac_cv_header_stdarg_h" = xyes
16113then :
16114  printf "%s\n" "#define HAVE_STDARG_H 1" >>confdefs.h
16115
16116fi
16117ac_fn_c_check_header_compile "$LINENO" "stdbool.h" "ac_cv_header_stdbool_h" "$ac_includes_default
16118"
16119if test "x$ac_cv_header_stdbool_h" = xyes
16120then :
16121  printf "%s\n" "#define HAVE_STDBOOL_H 1" >>confdefs.h
16122
16123fi
16124ac_fn_c_check_header_compile "$LINENO" "netinet/in.h" "ac_cv_header_netinet_in_h" "$ac_includes_default
16125"
16126if test "x$ac_cv_header_netinet_in_h" = xyes
16127then :
16128  printf "%s\n" "#define HAVE_NETINET_IN_H 1" >>confdefs.h
16129
16130fi
16131ac_fn_c_check_header_compile "$LINENO" "netinet/tcp.h" "ac_cv_header_netinet_tcp_h" "$ac_includes_default
16132"
16133if test "x$ac_cv_header_netinet_tcp_h" = xyes
16134then :
16135  printf "%s\n" "#define HAVE_NETINET_TCP_H 1" >>confdefs.h
16136
16137fi
16138ac_fn_c_check_header_compile "$LINENO" "sys/param.h" "ac_cv_header_sys_param_h" "$ac_includes_default
16139"
16140if test "x$ac_cv_header_sys_param_h" = xyes
16141then :
16142  printf "%s\n" "#define HAVE_SYS_PARAM_H 1" >>confdefs.h
16143
16144fi
16145ac_fn_c_check_header_compile "$LINENO" "sys/select.h" "ac_cv_header_sys_select_h" "$ac_includes_default
16146"
16147if test "x$ac_cv_header_sys_select_h" = xyes
16148then :
16149  printf "%s\n" "#define HAVE_SYS_SELECT_H 1" >>confdefs.h
16150
16151fi
16152ac_fn_c_check_header_compile "$LINENO" "sys/socket.h" "ac_cv_header_sys_socket_h" "$ac_includes_default
16153"
16154if test "x$ac_cv_header_sys_socket_h" = xyes
16155then :
16156  printf "%s\n" "#define HAVE_SYS_SOCKET_H 1" >>confdefs.h
16157
16158fi
16159ac_fn_c_check_header_compile "$LINENO" "sys/un.h" "ac_cv_header_sys_un_h" "$ac_includes_default
16160"
16161if test "x$ac_cv_header_sys_un_h" = xyes
16162then :
16163  printf "%s\n" "#define HAVE_SYS_UN_H 1" >>confdefs.h
16164
16165fi
16166ac_fn_c_check_header_compile "$LINENO" "sys/uio.h" "ac_cv_header_sys_uio_h" "$ac_includes_default
16167"
16168if test "x$ac_cv_header_sys_uio_h" = xyes
16169then :
16170  printf "%s\n" "#define HAVE_SYS_UIO_H 1" >>confdefs.h
16171
16172fi
16173ac_fn_c_check_header_compile "$LINENO" "sys/resource.h" "ac_cv_header_sys_resource_h" "$ac_includes_default
16174"
16175if test "x$ac_cv_header_sys_resource_h" = xyes
16176then :
16177  printf "%s\n" "#define HAVE_SYS_RESOURCE_H 1" >>confdefs.h
16178
16179fi
16180ac_fn_c_check_header_compile "$LINENO" "arpa/inet.h" "ac_cv_header_arpa_inet_h" "$ac_includes_default
16181"
16182if test "x$ac_cv_header_arpa_inet_h" = xyes
16183then :
16184  printf "%s\n" "#define HAVE_ARPA_INET_H 1" >>confdefs.h
16185
16186fi
16187ac_fn_c_check_header_compile "$LINENO" "syslog.h" "ac_cv_header_syslog_h" "$ac_includes_default
16188"
16189if test "x$ac_cv_header_syslog_h" = xyes
16190then :
16191  printf "%s\n" "#define HAVE_SYSLOG_H 1" >>confdefs.h
16192
16193fi
16194ac_fn_c_check_header_compile "$LINENO" "netdb.h" "ac_cv_header_netdb_h" "$ac_includes_default
16195"
16196if test "x$ac_cv_header_netdb_h" = xyes
16197then :
16198  printf "%s\n" "#define HAVE_NETDB_H 1" >>confdefs.h
16199
16200fi
16201ac_fn_c_check_header_compile "$LINENO" "sys/wait.h" "ac_cv_header_sys_wait_h" "$ac_includes_default
16202"
16203if test "x$ac_cv_header_sys_wait_h" = xyes
16204then :
16205  printf "%s\n" "#define HAVE_SYS_WAIT_H 1" >>confdefs.h
16206
16207fi
16208ac_fn_c_check_header_compile "$LINENO" "pwd.h" "ac_cv_header_pwd_h" "$ac_includes_default
16209"
16210if test "x$ac_cv_header_pwd_h" = xyes
16211then :
16212  printf "%s\n" "#define HAVE_PWD_H 1" >>confdefs.h
16213
16214fi
16215ac_fn_c_check_header_compile "$LINENO" "glob.h" "ac_cv_header_glob_h" "$ac_includes_default
16216"
16217if test "x$ac_cv_header_glob_h" = xyes
16218then :
16219  printf "%s\n" "#define HAVE_GLOB_H 1" >>confdefs.h
16220
16221fi
16222ac_fn_c_check_header_compile "$LINENO" "grp.h" "ac_cv_header_grp_h" "$ac_includes_default
16223"
16224if test "x$ac_cv_header_grp_h" = xyes
16225then :
16226  printf "%s\n" "#define HAVE_GRP_H 1" >>confdefs.h
16227
16228fi
16229ac_fn_c_check_header_compile "$LINENO" "login_cap.h" "ac_cv_header_login_cap_h" "$ac_includes_default
16230"
16231if test "x$ac_cv_header_login_cap_h" = xyes
16232then :
16233  printf "%s\n" "#define HAVE_LOGIN_CAP_H 1" >>confdefs.h
16234
16235fi
16236ac_fn_c_check_header_compile "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default
16237"
16238if test "x$ac_cv_header_winsock2_h" = xyes
16239then :
16240  printf "%s\n" "#define HAVE_WINSOCK2_H 1" >>confdefs.h
16241
16242fi
16243ac_fn_c_check_header_compile "$LINENO" "ws2tcpip.h" "ac_cv_header_ws2tcpip_h" "$ac_includes_default
16244"
16245if test "x$ac_cv_header_ws2tcpip_h" = xyes
16246then :
16247  printf "%s\n" "#define HAVE_WS2TCPIP_H 1" >>confdefs.h
16248
16249fi
16250ac_fn_c_check_header_compile "$LINENO" "endian.h" "ac_cv_header_endian_h" "$ac_includes_default
16251"
16252if test "x$ac_cv_header_endian_h" = xyes
16253then :
16254  printf "%s\n" "#define HAVE_ENDIAN_H 1" >>confdefs.h
16255
16256fi
16257ac_fn_c_check_header_compile "$LINENO" "sys/endian.h" "ac_cv_header_sys_endian_h" "$ac_includes_default
16258"
16259if test "x$ac_cv_header_sys_endian_h" = xyes
16260then :
16261  printf "%s\n" "#define HAVE_SYS_ENDIAN_H 1" >>confdefs.h
16262
16263fi
16264ac_fn_c_check_header_compile "$LINENO" "libkern/OSByteOrder.h" "ac_cv_header_libkern_OSByteOrder_h" "$ac_includes_default
16265"
16266if test "x$ac_cv_header_libkern_OSByteOrder_h" = xyes
16267then :
16268  printf "%s\n" "#define HAVE_LIBKERN_OSBYTEORDER_H 1" >>confdefs.h
16269
16270fi
16271ac_fn_c_check_header_compile "$LINENO" "sys/ipc.h" "ac_cv_header_sys_ipc_h" "$ac_includes_default
16272"
16273if test "x$ac_cv_header_sys_ipc_h" = xyes
16274then :
16275  printf "%s\n" "#define HAVE_SYS_IPC_H 1" >>confdefs.h
16276
16277fi
16278ac_fn_c_check_header_compile "$LINENO" "sys/shm.h" "ac_cv_header_sys_shm_h" "$ac_includes_default
16279"
16280if test "x$ac_cv_header_sys_shm_h" = xyes
16281then :
16282  printf "%s\n" "#define HAVE_SYS_SHM_H 1" >>confdefs.h
16283
16284fi
16285ac_fn_c_check_header_compile "$LINENO" "ifaddrs.h" "ac_cv_header_ifaddrs_h" "$ac_includes_default
16286"
16287if test "x$ac_cv_header_ifaddrs_h" = xyes
16288then :
16289  printf "%s\n" "#define HAVE_IFADDRS_H 1" >>confdefs.h
16290
16291fi
16292ac_fn_c_check_header_compile "$LINENO" "poll.h" "ac_cv_header_poll_h" "$ac_includes_default
16293"
16294if test "x$ac_cv_header_poll_h" = xyes
16295then :
16296  printf "%s\n" "#define HAVE_POLL_H 1" >>confdefs.h
16297
16298fi
16299
16300# net/if.h portability for Darwin see:
16301# https://www.gnu.org/software/autoconf/manual/autoconf-2.69/html_node/Header-Portability.html
16302ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "
16303#include <stdio.h>
16304#ifdef STDC_HEADERS
16305# include <stdlib.h>
16306# include <stddef.h>
16307#else
16308# ifdef HAVE_STDLIB_H
16309#  include <stdlib.h>
16310# endif
16311#endif
16312#ifdef HAVE_SYS_SOCKET_H
16313# include <sys/socket.h>
16314#endif
16315
16316"
16317if test "x$ac_cv_header_net_if_h" = xyes
16318then :
16319  printf "%s\n" "#define HAVE_NET_IF_H 1" >>confdefs.h
16320
16321fi
16322
16323
16324# Check for Apple header. This uncovers TARGET_OS_IPHONE, TARGET_OS_TV or TARGET_OS_WATCH
16325ac_fn_c_check_header_compile "$LINENO" "TargetConditionals.h" "ac_cv_header_TargetConditionals_h" "$ac_includes_default
16326"
16327if test "x$ac_cv_header_TargetConditionals_h" = xyes
16328then :
16329  printf "%s\n" "#define HAVE_TARGETCONDITIONALS_H 1" >>confdefs.h
16330
16331fi
16332
16333ac_fn_c_check_header_compile "$LINENO" "netioapi.h" "ac_cv_header_netioapi_h" "$ac_includes_default
16334#if HAVE_SYS_PARAM_H
16335#include <sys/param.h>
16336#endif
16337
16338#ifdef HAVE_SYS_SOCKET_H
16339#include <sys/socket.h>
16340#endif
16341
16342#ifdef HAVE_SYS_UIO_H
16343#include <sys/uio.h>
16344#endif
16345
16346#ifdef HAVE_NETINET_IN_H
16347#include <netinet/in.h>
16348#endif
16349
16350#ifdef HAVE_NETINET_TCP_H
16351#include <netinet/tcp.h>
16352#endif
16353
16354#ifdef HAVE_ARPA_INET_H
16355#include <arpa/inet.h>
16356#endif
16357
16358#ifdef HAVE_WINSOCK2_H
16359#include <winsock2.h>
16360#endif
16361
16362#ifdef HAVE_WS2TCPIP_H
16363#include <ws2tcpip.h>
16364#endif
16365
16366"
16367if test "x$ac_cv_header_netioapi_h" = xyes
16368then :
16369  printf "%s\n" "#define HAVE_NETIOAPI_H 1" >>confdefs.h
16370
16371fi
16372
16373
16374# Check for Linux timestamping headers
16375ac_fn_c_check_header_compile "$LINENO" "linux/net_tstamp.h" "ac_cv_header_linux_net_tstamp_h" "$ac_includes_default
16376"
16377if test "x$ac_cv_header_linux_net_tstamp_h" = xyes
16378then :
16379  printf "%s\n" "#define HAVE_LINUX_NET_TSTAMP_H 1" >>confdefs.h
16380
16381fi
16382
16383ac_fn_c_check_header_compile "$LINENO" "stdatomic.h" "ac_cv_header_stdatomic_h" "$ac_includes_default
16384"
16385if test "x$ac_cv_header_stdatomic_h" = xyes
16386then :
16387  printf "%s\n" "#define HAVE_STDATOMIC_H 1" >>confdefs.h
16388
16389fi
16390
16391
16392# check for types.
16393# Using own tests for int64* because autoconf builtin only give 32bit.
16394ac_fn_c_check_type "$LINENO" "int8_t" "ac_cv_type_int8_t" "$ac_includes_default"
16395if test "x$ac_cv_type_int8_t" = xyes
16396then :
16397
16398else case e in #(
16399  e)
16400printf "%s\n" "#define int8_t signed char" >>confdefs.h
16401 ;;
16402esac
16403fi
16404
16405ac_fn_c_check_type "$LINENO" "int16_t" "ac_cv_type_int16_t" "$ac_includes_default"
16406if test "x$ac_cv_type_int16_t" = xyes
16407then :
16408
16409else case e in #(
16410  e)
16411printf "%s\n" "#define int16_t short" >>confdefs.h
16412 ;;
16413esac
16414fi
16415
16416ac_fn_c_check_type "$LINENO" "int32_t" "ac_cv_type_int32_t" "$ac_includes_default"
16417if test "x$ac_cv_type_int32_t" = xyes
16418then :
16419
16420else case e in #(
16421  e)
16422printf "%s\n" "#define int32_t int" >>confdefs.h
16423 ;;
16424esac
16425fi
16426
16427ac_fn_c_check_type "$LINENO" "int64_t" "ac_cv_type_int64_t" "$ac_includes_default"
16428if test "x$ac_cv_type_int64_t" = xyes
16429then :
16430
16431else case e in #(
16432  e)
16433printf "%s\n" "#define int64_t long long" >>confdefs.h
16434 ;;
16435esac
16436fi
16437
16438ac_fn_c_check_type "$LINENO" "uint8_t" "ac_cv_type_uint8_t" "$ac_includes_default"
16439if test "x$ac_cv_type_uint8_t" = xyes
16440then :
16441
16442else case e in #(
16443  e)
16444printf "%s\n" "#define uint8_t unsigned char" >>confdefs.h
16445 ;;
16446esac
16447fi
16448
16449ac_fn_c_check_type "$LINENO" "uint16_t" "ac_cv_type_uint16_t" "$ac_includes_default"
16450if test "x$ac_cv_type_uint16_t" = xyes
16451then :
16452
16453else case e in #(
16454  e)
16455printf "%s\n" "#define uint16_t unsigned short" >>confdefs.h
16456 ;;
16457esac
16458fi
16459
16460ac_fn_c_check_type "$LINENO" "uint32_t" "ac_cv_type_uint32_t" "$ac_includes_default"
16461if test "x$ac_cv_type_uint32_t" = xyes
16462then :
16463
16464else case e in #(
16465  e)
16466printf "%s\n" "#define uint32_t unsigned int" >>confdefs.h
16467 ;;
16468esac
16469fi
16470
16471ac_fn_c_check_type "$LINENO" "uint64_t" "ac_cv_type_uint64_t" "$ac_includes_default"
16472if test "x$ac_cv_type_uint64_t" = xyes
16473then :
16474
16475else case e in #(
16476  e)
16477printf "%s\n" "#define uint64_t unsigned long long" >>confdefs.h
16478 ;;
16479esac
16480fi
16481
16482ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
16483if test "x$ac_cv_type_size_t" = xyes
16484then :
16485
16486else case e in #(
16487  e)
16488printf "%s\n" "#define size_t unsigned int" >>confdefs.h
16489 ;;
16490esac
16491fi
16492
16493ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
16494if test "x$ac_cv_type_ssize_t" = xyes
16495then :
16496
16497else case e in #(
16498  e)
16499printf "%s\n" "#define ssize_t int" >>confdefs.h
16500 ;;
16501esac
16502fi
16503
16504ac_fn_c_check_type "$LINENO" "uid_t" "ac_cv_type_uid_t" "$ac_includes_default"
16505if test "x$ac_cv_type_uid_t" = xyes
16506then :
16507
16508else case e in #(
16509  e)
16510printf "%s\n" "#define uid_t int" >>confdefs.h
16511 ;;
16512esac
16513fi
16514
16515ac_fn_c_check_type "$LINENO" "gid_t" "ac_cv_type_gid_t" "$ac_includes_default"
16516if test "x$ac_cv_type_gid_t" = xyes
16517then :
16518
16519else case e in #(
16520  e)
16521printf "%s\n" "#define gid_t int" >>confdefs.h
16522 ;;
16523esac
16524fi
16525
16526
16527  ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default
16528"
16529if test "x$ac_cv_type_pid_t" = xyes
16530then :
16531
16532else case e in #(
16533  e)                                         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16534/* end confdefs.h.  */
16535
16536          #if defined _WIN64 && !defined __CYGWIN__
16537          LLP64
16538          #endif
16539
16540int
16541main (void)
16542{
16543
16544  ;
16545  return 0;
16546}
16547
16548_ACEOF
16549if ac_fn_c_try_compile "$LINENO"
16550then :
16551  ac_pid_type='int'
16552else case e in #(
16553  e) ac_pid_type='__int64' ;;
16554esac
16555fi
16556rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
16557
16558printf "%s\n" "#define pid_t $ac_pid_type" >>confdefs.h
16559
16560     ;;
16561esac
16562fi
16563
16564
16565ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
16566if test "x$ac_cv_type_off_t" = xyes
16567then :
16568
16569else case e in #(
16570  e)
16571printf "%s\n" "#define off_t long int" >>confdefs.h
16572 ;;
16573esac
16574fi
16575
16576ac_fn_c_check_type "$LINENO" "u_char" "ac_cv_type_u_char" "
16577$ac_includes_default
16578#ifdef HAVE_WINSOCK2_H
16579#  include <winsock2.h>
16580#endif
16581
16582"
16583if test "x$ac_cv_type_u_char" = xyes
16584then :
16585
16586else case e in #(
16587  e)
16588printf "%s\n" "#define u_char unsigned char" >>confdefs.h
16589 ;;
16590esac
16591fi
16592
16593ac_fn_c_check_type "$LINENO" "rlim_t" "ac_cv_type_rlim_t" "
16594$ac_includes_default
16595#ifdef HAVE_SYS_RESOURCE_H
16596#  include <sys/resource.h>
16597#endif
16598
16599"
16600if test "x$ac_cv_type_rlim_t" = xyes
16601then :
16602
16603else case e in #(
16604  e)
16605printf "%s\n" "#define rlim_t unsigned long" >>confdefs.h
16606 ;;
16607esac
16608fi
16609
16610
16611ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
16612$ac_includes_default
16613#ifdef HAVE_SYS_SOCKET_H
16614#  include <sys/socket.h>
16615#endif
16616#ifdef HAVE_WS2TCPIP_H
16617#  include <ws2tcpip.h>
16618#endif
16619
16620"
16621if test "x$ac_cv_type_socklen_t" = xyes
16622then :
16623
16624else case e in #(
16625  e)
16626printf "%s\n" "#define socklen_t int" >>confdefs.h
16627 ;;
16628esac
16629fi
16630
16631 ac_fn_c_check_type "$LINENO" "in_addr_t" "ac_cv_type_in_addr_t" "
16632$ac_includes_default
16633#ifdef HAVE_SYS_TYPES_H
16634# include <sys/types.h>
16635#endif
16636#ifdef HAVE_NETINET_IN_H
16637# include <netinet/in.h>
16638#endif
16639
16640"
16641if test "x$ac_cv_type_in_addr_t" = xyes
16642then :
16643
16644else case e in #(
16645  e)
16646printf "%s\n" "#define in_addr_t uint32_t" >>confdefs.h
16647 ;;
16648esac
16649fi
16650
16651 ac_fn_c_check_type "$LINENO" "in_port_t" "ac_cv_type_in_port_t" "
16652$ac_includes_default
16653#ifdef HAVE_SYS_TYPES_H
16654# include <sys/types.h>
16655#endif
16656#ifdef HAVE_NETINET_IN_H
16657# include <netinet/in.h>
16658#endif
16659
16660"
16661if test "x$ac_cv_type_in_port_t" = xyes
16662then :
16663
16664else case e in #(
16665  e)
16666printf "%s\n" "#define in_port_t uint16_t" >>confdefs.h
16667 ;;
16668esac
16669fi
16670
16671{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if memcmp compares unsigned" >&5
16672printf %s "checking if memcmp compares unsigned... " >&6; }
16673if test "$cross_compiling" = yes
16674then :
16675   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: cross-compile no" >&5
16676printf "%s\n" "cross-compile no" >&6; }
16677
16678printf "%s\n" "#define MEMCMP_IS_BROKEN 1" >>confdefs.h
16679
16680  case " $LIBOBJS " in
16681  *" memcmp.$ac_objext "* ) ;;
16682  *) LIBOBJS="$LIBOBJS memcmp.$ac_objext"
16683 ;;
16684esac
16685
16686
16687else case e in #(
16688  e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16689/* end confdefs.h.  */
16690
16691#include <stdio.h>
16692#include <stdlib.h>
16693#include <string.h>
16694int main(void)
16695{
16696	char a = 255, b = 0;
16697	if(memcmp(&a, &b, 1) < 0)
16698		return 1;
16699	return 0;
16700}
16701
16702_ACEOF
16703if ac_fn_c_try_run "$LINENO"
16704then :
16705  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16706printf "%s\n" "yes" >&6; }
16707else case e in #(
16708  e)  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
16709printf "%s\n" "no" >&6; }
16710
16711printf "%s\n" "#define MEMCMP_IS_BROKEN 1" >>confdefs.h
16712
16713  case " $LIBOBJS " in
16714  *" memcmp.$ac_objext "* ) ;;
16715  *) LIBOBJS="$LIBOBJS memcmp.$ac_objext"
16716 ;;
16717esac
16718
16719 ;;
16720esac
16721fi
16722rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16723  conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
16724esac
16725fi
16726
16727
16728# The cast to long int works around a bug in the HP C Compiler
16729# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
16730# declarations like 'int a3[[(sizeof (unsigned char)) >= 0]];'.
16731# This bug is HP SR number 8606223364.
16732{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
16733printf %s "checking size of time_t... " >&6; }
16734if test ${ac_cv_sizeof_time_t+y}
16735then :
16736  printf %s "(cached) " >&6
16737else case e in #(
16738  e) if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t"        "
16739$ac_includes_default
16740#ifdef TIME_WITH_SYS_TIME
16741# include <sys/time.h>
16742# include <time.h>
16743#else
16744# ifdef HAVE_SYS_TIME_H
16745#  include <sys/time.h>
16746# else
16747#  include <time.h>
16748# endif
16749#endif
16750
16751"
16752then :
16753
16754else case e in #(
16755  e) if test "$ac_cv_type_time_t" = yes; then
16756     { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
16757printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
16758as_fn_error 77 "cannot compute sizeof (time_t)
16759See 'config.log' for more details" "$LINENO" 5; }
16760   else
16761     ac_cv_sizeof_time_t=0
16762   fi ;;
16763esac
16764fi
16765 ;;
16766esac
16767fi
16768{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
16769printf "%s\n" "$ac_cv_sizeof_time_t" >&6; }
16770
16771
16772
16773printf "%s\n" "#define SIZEOF_TIME_T $ac_cv_sizeof_time_t" >>confdefs.h
16774
16775
16776# The cast to long int works around a bug in the HP C Compiler
16777# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
16778# declarations like 'int a3[[(sizeof (unsigned char)) >= 0]];'.
16779# This bug is HP SR number 8606223364.
16780{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
16781printf %s "checking size of size_t... " >&6; }
16782if test ${ac_cv_sizeof_size_t+y}
16783then :
16784  printf %s "(cached) " >&6
16785else case e in #(
16786  e) if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (size_t))" "ac_cv_sizeof_size_t"        "$ac_includes_default"
16787then :
16788
16789else case e in #(
16790  e) if test "$ac_cv_type_size_t" = yes; then
16791     { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
16792printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
16793as_fn_error 77 "cannot compute sizeof (size_t)
16794See 'config.log' for more details" "$LINENO" 5; }
16795   else
16796     ac_cv_sizeof_size_t=0
16797   fi ;;
16798esac
16799fi
16800 ;;
16801esac
16802fi
16803{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
16804printf "%s\n" "$ac_cv_sizeof_size_t" >&6; }
16805
16806
16807
16808printf "%s\n" "#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t" >>confdefs.h
16809
16810
16811
16812# add option to disable the evil rpath
16813
16814# Check whether --enable-rpath was given.
16815if test ${enable_rpath+y}
16816then :
16817  enableval=$enable_rpath; enable_rpath=$enableval
16818else case e in #(
16819  e) enable_rpath=yes ;;
16820esac
16821fi
16822
16823if test "x$enable_rpath" = xno; then
16824		ac_config_commands="$ac_config_commands disable-rpath"
16825
16826fi
16827
16828
16829
16830# check to see if libraries are needed for these functions.
16831{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing inet_pton" >&5
16832printf %s "checking for library containing inet_pton... " >&6; }
16833if test ${ac_cv_search_inet_pton+y}
16834then :
16835  printf %s "(cached) " >&6
16836else case e in #(
16837  e) ac_func_search_save_LIBS=$LIBS
16838cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16839/* end confdefs.h.  */
16840
16841/* Override any GCC internal prototype to avoid an error.
16842   Use char because int might match the return type of a GCC
16843   builtin and then its argument prototype would still apply.
16844   The 'extern "C"' is for builds by C++ compilers;
16845   although this is not generally supported in C code supporting it here
16846   has little cost and some practical benefit (sr 110532).  */
16847#ifdef __cplusplus
16848extern "C"
16849#endif
16850char inet_pton (void);
16851int
16852main (void)
16853{
16854return inet_pton ();
16855  ;
16856  return 0;
16857}
16858_ACEOF
16859for ac_lib in '' nsl
16860do
16861  if test -z "$ac_lib"; then
16862    ac_res="none required"
16863  else
16864    ac_res=-l$ac_lib
16865    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
16866  fi
16867  if ac_fn_c_try_link "$LINENO"
16868then :
16869  ac_cv_search_inet_pton=$ac_res
16870fi
16871rm -f core conftest.err conftest.$ac_objext conftest.beam \
16872    conftest$ac_exeext
16873  if test ${ac_cv_search_inet_pton+y}
16874then :
16875  break
16876fi
16877done
16878if test ${ac_cv_search_inet_pton+y}
16879then :
16880
16881else case e in #(
16882  e) ac_cv_search_inet_pton=no ;;
16883esac
16884fi
16885rm conftest.$ac_ext
16886LIBS=$ac_func_search_save_LIBS ;;
16887esac
16888fi
16889{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_inet_pton" >&5
16890printf "%s\n" "$ac_cv_search_inet_pton" >&6; }
16891ac_res=$ac_cv_search_inet_pton
16892if test "$ac_res" != no
16893then :
16894  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
16895
16896fi
16897
16898{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing socket" >&5
16899printf %s "checking for library containing socket... " >&6; }
16900if test ${ac_cv_search_socket+y}
16901then :
16902  printf %s "(cached) " >&6
16903else case e in #(
16904  e) ac_func_search_save_LIBS=$LIBS
16905cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16906/* end confdefs.h.  */
16907
16908/* Override any GCC internal prototype to avoid an error.
16909   Use char because int might match the return type of a GCC
16910   builtin and then its argument prototype would still apply.
16911   The 'extern "C"' is for builds by C++ compilers;
16912   although this is not generally supported in C code supporting it here
16913   has little cost and some practical benefit (sr 110532).  */
16914#ifdef __cplusplus
16915extern "C"
16916#endif
16917char socket (void);
16918int
16919main (void)
16920{
16921return socket ();
16922  ;
16923  return 0;
16924}
16925_ACEOF
16926for ac_lib in '' socket
16927do
16928  if test -z "$ac_lib"; then
16929    ac_res="none required"
16930  else
16931    ac_res=-l$ac_lib
16932    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
16933  fi
16934  if ac_fn_c_try_link "$LINENO"
16935then :
16936  ac_cv_search_socket=$ac_res
16937fi
16938rm -f core conftest.err conftest.$ac_objext conftest.beam \
16939    conftest$ac_exeext
16940  if test ${ac_cv_search_socket+y}
16941then :
16942  break
16943fi
16944done
16945if test ${ac_cv_search_socket+y}
16946then :
16947
16948else case e in #(
16949  e) ac_cv_search_socket=no ;;
16950esac
16951fi
16952rm conftest.$ac_ext
16953LIBS=$ac_func_search_save_LIBS ;;
16954esac
16955fi
16956{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socket" >&5
16957printf "%s\n" "$ac_cv_search_socket" >&6; }
16958ac_res=$ac_cv_search_socket
16959if test "$ac_res" != no
16960then :
16961  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
16962
16963fi
16964
16965
16966# check whether strptime also works
16967
16968# check some functions of the OS before linking libs (while still runnable).
16969{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working chown" >&5
16970printf %s "checking for working chown... " >&6; }
16971if test ${ac_cv_func_chown_works+y}
16972then :
16973  printf %s "(cached) " >&6
16974else case e in #(
16975  e) if test "$cross_compiling" = yes
16976then :
16977  case "$host_os" in # ((
16978			  # Guess yes on glibc systems.
16979		  *-gnu*) ac_cv_func_chown_works=yes ;;
16980			  # If we don't know, assume the worst.
16981		  *)      ac_cv_func_chown_works=no ;;
16982		esac
16983else case e in #(
16984  e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16985/* end confdefs.h.  */
16986$ac_includes_default
16987#include <fcntl.h>
16988
16989int
16990main (void)
16991{
16992  char *f = "conftest.chown";
16993  struct stat before, after;
16994
16995  if (creat (f, 0600) < 0)
16996    return 1;
16997  if (stat (f, &before) < 0)
16998    return 1;
16999  if (chown (f, (uid_t) -1, (gid_t) -1) == -1)
17000    return 1;
17001  if (stat (f, &after) < 0)
17002    return 1;
17003  return ! (before.st_uid == after.st_uid && before.st_gid == after.st_gid);
17004
17005  ;
17006  return 0;
17007}
17008_ACEOF
17009if ac_fn_c_try_run "$LINENO"
17010then :
17011  ac_cv_func_chown_works=yes
17012else case e in #(
17013  e) ac_cv_func_chown_works=no ;;
17014esac
17015fi
17016rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17017  conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
17018esac
17019fi
17020
17021rm -f conftest.chown
17022 ;;
17023esac
17024fi
17025{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_chown_works" >&5
17026printf "%s\n" "$ac_cv_func_chown_works" >&6; }
17027if test $ac_cv_func_chown_works = yes; then
17028
17029printf "%s\n" "#define HAVE_CHOWN 1" >>confdefs.h
17030
17031fi
17032
17033
17034ac_func=
17035for ac_item in $ac_func_c_list
17036do
17037  if test $ac_func; then
17038    ac_fn_c_check_func "$LINENO" $ac_func ac_cv_func_$ac_func
17039    if eval test \"x\$ac_cv_func_$ac_func\" = xyes; then
17040      echo "#define $ac_item 1" >> confdefs.h
17041    fi
17042    ac_func=
17043  else
17044    ac_func=$ac_item
17045  fi
17046done
17047
17048
17049
17050if test "x$ac_cv_func_fork" = xyes; then
17051  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5
17052printf %s "checking for working fork... " >&6; }
17053if test ${ac_cv_func_fork_works+y}
17054then :
17055  printf %s "(cached) " >&6
17056else case e in #(
17057  e) if test "$cross_compiling" = yes
17058then :
17059  ac_cv_func_fork_works=cross
17060else case e in #(
17061  e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17062/* end confdefs.h.  */
17063$ac_includes_default
17064int
17065main (void)
17066{
17067
17068	  /* By R. Kuhlmann. */
17069	  return fork () < 0;
17070
17071  ;
17072  return 0;
17073}
17074_ACEOF
17075if ac_fn_c_try_run "$LINENO"
17076then :
17077  ac_cv_func_fork_works=yes
17078else case e in #(
17079  e) ac_cv_func_fork_works=no ;;
17080esac
17081fi
17082rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17083  conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
17084esac
17085fi
17086 ;;
17087esac
17088fi
17089{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5
17090printf "%s\n" "$ac_cv_func_fork_works" >&6; }
17091
17092else
17093  ac_cv_func_fork_works=$ac_cv_func_fork
17094fi
17095if test "x$ac_cv_func_fork_works" = xcross; then
17096  case $host in
17097    *-*-amigaos* | *-*-msdosdjgpp*)
17098      # Override, as these systems have only a dummy fork() stub
17099      ac_cv_func_fork_works=no
17100      ;;
17101    *)
17102      ac_cv_func_fork_works=yes
17103      ;;
17104  esac
17105  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
17106printf "%s\n" "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
17107fi
17108ac_cv_func_vfork_works=$ac_cv_func_vfork
17109if test "x$ac_cv_func_vfork" = xyes; then
17110  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5
17111printf %s "checking for working vfork... " >&6; }
17112if test ${ac_cv_func_vfork_works+y}
17113then :
17114  printf %s "(cached) " >&6
17115else case e in #(
17116  e) if test "$cross_compiling" = yes
17117then :
17118  ac_cv_func_vfork_works=cross
17119else case e in #(
17120  e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17121/* end confdefs.h.  */
17122/* Thanks to Paul Eggert for this test.  */
17123$ac_includes_default
17124#include <signal.h>
17125#include <sys/wait.h>
17126#ifdef HAVE_VFORK_H
17127# include <vfork.h>
17128#endif
17129
17130static void
17131do_nothing (int sig)
17132{
17133  (void) sig;
17134}
17135
17136/* On some sparc systems, changes by the child to local and incoming
17137   argument registers are propagated back to the parent.  The compiler
17138   is told about this with #include <vfork.h>, but some compilers
17139   (e.g. gcc -O) don't grok <vfork.h>.  Test for this by using a
17140   static variable whose address is put into a register that is
17141   clobbered by the vfork.  */
17142static void
17143sparc_address_test (int arg)
17144{
17145  static pid_t child;
17146  if (!child) {
17147    child = vfork ();
17148    if (child < 0) {
17149      perror ("vfork");
17150      _exit(2);
17151    }
17152    if (!child) {
17153      arg = getpid();
17154      write(-1, "", 0);
17155      _exit (arg);
17156    }
17157  }
17158}
17159
17160int
17161main (void)
17162{
17163  pid_t parent = getpid ();
17164  pid_t child;
17165
17166  sparc_address_test (0);
17167
17168  /* On Solaris 2.4, changes by the child to the signal handler
17169     also munge signal handlers in the parent.  To detect this,
17170     start by putting the parent's handler in a known state.  */
17171  signal (SIGTERM, SIG_DFL);
17172
17173  child = vfork ();
17174
17175  if (child == 0) {
17176    /* Here is another test for sparc vfork register problems.  This
17177       test uses lots of local variables, at least as many local
17178       variables as main has allocated so far including compiler
17179       temporaries.  4 locals are enough for gcc 1.40.3 on a Solaris
17180       4.1.3 sparc, but we use 8 to be safe.  A buggy compiler should
17181       reuse the register of parent for one of the local variables,
17182       since it will think that parent can't possibly be used any more
17183       in this routine.  Assigning to the local variable will thus
17184       munge parent in the parent process.  */
17185    pid_t
17186      p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
17187      p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
17188    /* Convince the compiler that p..p7 are live; otherwise, it might
17189       use the same hardware register for all 8 local variables.  */
17190    if (p != p1 || p != p2 || p != p3 || p != p4
17191	|| p != p5 || p != p6 || p != p7)
17192      _exit(1);
17193
17194    /* Alter the child's signal handler.  */
17195    if (signal (SIGTERM, do_nothing) != SIG_DFL)
17196      _exit(1);
17197
17198    /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
17199       from child file descriptors.  If the child closes a descriptor
17200       before it execs or exits, this munges the parent's descriptor
17201       as well.  Test for this by closing stdout in the child.  */
17202    _exit(close(fileno(stdout)) != 0);
17203  } else {
17204    int status;
17205    struct stat st;
17206
17207    while (wait(&status) != child)
17208      ;
17209    return (
17210	 /* Was there some problem with vforking?  */
17211	 child < 0
17212
17213	 /* Did the child munge the parent's signal handler?  */
17214	 || signal (SIGTERM, SIG_DFL) != SIG_DFL
17215
17216	 /* Did the child fail?  (This shouldn't happen.)  */
17217	 || status
17218
17219	 /* Did the vfork/compiler bug occur?  */
17220	 || parent != getpid()
17221
17222	 /* Did the file descriptor bug occur?  */
17223	 || fstat(fileno(stdout), &st) != 0
17224	 );
17225  }
17226}
17227_ACEOF
17228if ac_fn_c_try_run "$LINENO"
17229then :
17230  ac_cv_func_vfork_works=yes
17231else case e in #(
17232  e) ac_cv_func_vfork_works=no ;;
17233esac
17234fi
17235rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17236  conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
17237esac
17238fi
17239 ;;
17240esac
17241fi
17242{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5
17243printf "%s\n" "$ac_cv_func_vfork_works" >&6; }
17244
17245fi;
17246if test "x$ac_cv_func_fork_works" = xcross; then
17247  ac_cv_func_vfork_works=$ac_cv_func_vfork
17248  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
17249printf "%s\n" "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
17250fi
17251
17252if test "x$ac_cv_func_vfork_works" = xyes; then
17253
17254printf "%s\n" "#define HAVE_WORKING_VFORK 1" >>confdefs.h
17255
17256else
17257
17258printf "%s\n" "#define vfork fork" >>confdefs.h
17259
17260fi
17261if test "x$ac_cv_func_fork_works" = xyes; then
17262
17263printf "%s\n" "#define HAVE_WORKING_FORK 1" >>confdefs.h
17264
17265fi
17266
17267
17268printf "%s\n" "#define RETSIGTYPE void" >>confdefs.h
17269
17270{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for declarations of fseeko and ftello" >&5
17271printf %s "checking for declarations of fseeko and ftello... " >&6; }
17272if test ${ac_cv_func_fseeko_ftello+y}
17273then :
17274  printf %s "(cached) " >&6
17275else case e in #(
17276  e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17277/* end confdefs.h.  */
17278
17279#if defined __hpux && !defined _LARGEFILE_SOURCE
17280# include <limits.h>
17281# if LONG_MAX >> 31 == 0
17282#  error "32-bit HP-UX 11/ia64 needs _LARGEFILE_SOURCE for fseeko in C++"
17283# endif
17284#endif
17285#include <sys/types.h> /* for off_t */
17286#include <stdio.h>
17287
17288int
17289main (void)
17290{
17291
17292  int (*fp1) (FILE *, off_t, int) = fseeko;
17293  off_t (*fp2) (FILE *) = ftello;
17294  return fseeko (stdin, 0, 0)
17295      && fp1 (stdin, 0, 0)
17296      && ftello (stdin) >= 0
17297      && fp2 (stdin) >= 0;
17298
17299  ;
17300  return 0;
17301}
17302_ACEOF
17303if ac_fn_c_try_compile "$LINENO"
17304then :
17305  ac_cv_func_fseeko_ftello=yes
17306else case e in #(
17307  e) ac_save_CPPFLAGS="$CPPFLAGS"
17308    CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE=1"
17309    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17310/* end confdefs.h.  */
17311
17312#if defined __hpux && !defined _LARGEFILE_SOURCE
17313# include <limits.h>
17314# if LONG_MAX >> 31 == 0
17315#  error "32-bit HP-UX 11/ia64 needs _LARGEFILE_SOURCE for fseeko in C++"
17316# endif
17317#endif
17318#include <sys/types.h> /* for off_t */
17319#include <stdio.h>
17320
17321int
17322main (void)
17323{
17324
17325  int (*fp1) (FILE *, off_t, int) = fseeko;
17326  off_t (*fp2) (FILE *) = ftello;
17327  return fseeko (stdin, 0, 0)
17328      && fp1 (stdin, 0, 0)
17329      && ftello (stdin) >= 0
17330      && fp2 (stdin) >= 0;
17331
17332  ;
17333  return 0;
17334}
17335_ACEOF
17336if ac_fn_c_try_compile "$LINENO"
17337then :
17338  ac_cv_func_fseeko_ftello="need _LARGEFILE_SOURCE"
17339else case e in #(
17340  e) ac_cv_func_fseeko_ftello=no ;;
17341esac
17342fi
17343rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
17344esac
17345fi
17346rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
17347esac
17348fi
17349{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fseeko_ftello" >&5
17350printf "%s\n" "$ac_cv_func_fseeko_ftello" >&6; }
17351if test "$ac_cv_func_fseeko_ftello" != no
17352then :
17353
17354printf "%s\n" "#define HAVE_FSEEKO 1" >>confdefs.h
17355
17356fi
17357if test "$ac_cv_func_fseeko_ftello" = "need _LARGEFILE_SOURCE"
17358then :
17359
17360printf "%s\n" "#define _LARGEFILE_SOURCE 1" >>confdefs.h
17361
17362fi
17363
17364
17365# Check whether --enable-largefile was given.
17366if test ${enable_largefile+y}
17367then :
17368  enableval=$enable_largefile;
17369fi
17370if test "$enable_largefile,$enable_year2038" != no,no
17371then :
17372  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable large file support" >&5
17373printf %s "checking for $CC option to enable large file support... " >&6; }
17374if test ${ac_cv_sys_largefile_opts+y}
17375then :
17376  printf %s "(cached) " >&6
17377else case e in #(
17378  e) ac_save_CC="$CC"
17379  ac_opt_found=no
17380  for ac_opt in "none needed" "-D_FILE_OFFSET_BITS=64" "-D_LARGE_FILES=1" "-n32"; do
17381    if test x"$ac_opt" != x"none needed"
17382then :
17383  CC="$ac_save_CC $ac_opt"
17384fi
17385    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17386/* end confdefs.h.  */
17387#include <sys/types.h>
17388#ifndef FTYPE
17389# define FTYPE off_t
17390#endif
17391 /* Check that FTYPE can represent 2**63 - 1 correctly.
17392    We can't simply define LARGE_FTYPE to be 9223372036854775807,
17393    since some C++ compilers masquerading as C compilers
17394    incorrectly reject 9223372036854775807.  */
17395#define LARGE_FTYPE (((FTYPE) 1 << 31 << 31) - 1 + ((FTYPE) 1 << 31 << 31))
17396  int FTYPE_is_large[(LARGE_FTYPE % 2147483629 == 721
17397		       && LARGE_FTYPE % 2147483647 == 1)
17398		      ? 1 : -1];
17399int
17400main (void)
17401{
17402
17403  ;
17404  return 0;
17405}
17406_ACEOF
17407if ac_fn_c_try_compile "$LINENO"
17408then :
17409  if test x"$ac_opt" = x"none needed"
17410then :
17411  # GNU/Linux s390x and alpha need _FILE_OFFSET_BITS=64 for wide ino_t.
17412	 CC="$CC -DFTYPE=ino_t"
17413	 if ac_fn_c_try_compile "$LINENO"
17414then :
17415
17416else case e in #(
17417  e) CC="$CC -D_FILE_OFFSET_BITS=64"
17418	    if ac_fn_c_try_compile "$LINENO"
17419then :
17420  ac_opt='-D_FILE_OFFSET_BITS=64'
17421fi
17422rm -f core conftest.err conftest.$ac_objext conftest.beam ;;
17423esac
17424fi
17425rm -f core conftest.err conftest.$ac_objext conftest.beam
17426fi
17427      ac_cv_sys_largefile_opts=$ac_opt
17428      ac_opt_found=yes
17429fi
17430rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
17431    test $ac_opt_found = no || break
17432  done
17433  CC="$ac_save_CC"
17434
17435  test $ac_opt_found = yes || ac_cv_sys_largefile_opts="support not detected" ;;
17436esac
17437fi
17438{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_opts" >&5
17439printf "%s\n" "$ac_cv_sys_largefile_opts" >&6; }
17440
17441ac_have_largefile=yes
17442case $ac_cv_sys_largefile_opts in #(
17443  "none needed") :
17444     ;; #(
17445  "supported through gnulib") :
17446     ;; #(
17447  "support not detected") :
17448    ac_have_largefile=no ;; #(
17449  "-D_FILE_OFFSET_BITS=64") :
17450
17451printf "%s\n" "#define _FILE_OFFSET_BITS 64" >>confdefs.h
17452 ;; #(
17453  "-D_LARGE_FILES=1") :
17454
17455printf "%s\n" "#define _LARGE_FILES 1" >>confdefs.h
17456 ;; #(
17457  "-n32") :
17458    CC="$CC -n32" ;; #(
17459  *) :
17460    as_fn_error $? "internal error: bad value for \$ac_cv_sys_largefile_opts" "$LINENO" 5 ;;
17461esac
17462
17463if test "$enable_year2038" != no
17464then :
17465  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option for timestamps after 2038" >&5
17466printf %s "checking for $CC option for timestamps after 2038... " >&6; }
17467if test ${ac_cv_sys_year2038_opts+y}
17468then :
17469  printf %s "(cached) " >&6
17470else case e in #(
17471  e) ac_save_CPPFLAGS="$CPPFLAGS"
17472  ac_opt_found=no
17473  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
17474    if test x"$ac_opt" != x"none needed"
17475then :
17476  CPPFLAGS="$ac_save_CPPFLAGS $ac_opt"
17477fi
17478    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17479/* end confdefs.h.  */
17480
17481  #include <time.h>
17482  /* Check that time_t can represent 2**32 - 1 correctly.  */
17483  #define LARGE_TIME_T \\
17484    ((time_t) (((time_t) 1 << 30) - 1 + 3 * ((time_t) 1 << 30)))
17485  int verify_time_t_range[(LARGE_TIME_T / 65537 == 65535
17486                           && LARGE_TIME_T % 65537 == 0)
17487                          ? 1 : -1];
17488
17489int
17490main (void)
17491{
17492
17493  ;
17494  return 0;
17495}
17496_ACEOF
17497if ac_fn_c_try_compile "$LINENO"
17498then :
17499  ac_cv_sys_year2038_opts="$ac_opt"
17500      ac_opt_found=yes
17501fi
17502rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
17503    test $ac_opt_found = no || break
17504  done
17505  CPPFLAGS="$ac_save_CPPFLAGS"
17506  test $ac_opt_found = yes || ac_cv_sys_year2038_opts="support not detected" ;;
17507esac
17508fi
17509{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_year2038_opts" >&5
17510printf "%s\n" "$ac_cv_sys_year2038_opts" >&6; }
17511
17512ac_have_year2038=yes
17513case $ac_cv_sys_year2038_opts in #(
17514  "none needed") :
17515     ;; #(
17516  "support not detected") :
17517    ac_have_year2038=no ;; #(
17518  "-D_TIME_BITS=64") :
17519
17520printf "%s\n" "#define _TIME_BITS 64" >>confdefs.h
17521 ;; #(
17522  "-D__MINGW_USE_VC2005_COMPAT") :
17523
17524printf "%s\n" "#define __MINGW_USE_VC2005_COMPAT 1" >>confdefs.h
17525 ;; #(
17526  "-U_USE_32_BIT_TIME_T"*) :
17527    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
17528printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
17529as_fn_error $? "the 'time_t' type is currently forced to be 32-bit. It
17530will stop working after mid-January 2038. Remove
17531_USE_32BIT_TIME_T from the compiler flags.
17532See 'config.log' for more details" "$LINENO" 5; } ;; #(
17533  *) :
17534    as_fn_error $? "internal error: bad value for \$ac_cv_sys_year2038_opts" "$LINENO" 5 ;;
17535esac
17536
17537fi
17538
17539fi
17540
17541
17542
17543{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we need -D_LARGEFILE_SOURCE=1 as a flag for $CC" >&5
17544printf %s "checking whether we need -D_LARGEFILE_SOURCE=1 as a flag for $CC... " >&6; }
17545cache=_D_LARGEFILE_SOURCE_1
17546if eval test \${cv_prog_cc_flag_needed_$cache+y}
17547then :
17548  printf %s "(cached) " >&6
17549else case e in #(
17550  e)
17551echo '
17552#include <stdio.h>
17553int test(void) {
17554        int a = fseeko(stdin, 0, 0);
17555        return a;
17556}
17557' > conftest.c
17558echo 'void f(void){}' >>conftest.c
17559if test -z "`$CC $CPPFLAGS $CFLAGS $ERRFLAG -c conftest.c 2>&1`"; then
17560eval "cv_prog_cc_flag_needed_$cache=no"
17561else
17562
17563if test -z "`$CC $CPPFLAGS $CFLAGS -D_LARGEFILE_SOURCE=1 $ERRFLAG -c conftest.c 2>&1`"; then
17564eval "cv_prog_cc_flag_needed_$cache=yes"
17565else
17566eval "cv_prog_cc_flag_needed_$cache=fail"
17567#echo 'Test with flag fails too!'
17568#cat conftest.c
17569#echo "$CC $CPPFLAGS $CFLAGS -D_LARGEFILE_SOURCE=1 $ERRFLAG -c conftest.c 2>&1"
17570#echo `$CC $CPPFLAGS $CFLAGS -D_LARGEFILE_SOURCE=1 $ERRFLAG -c conftest.c 2>&1`
17571#exit 1
17572fi
17573
17574fi
17575rm -f conftest conftest.c conftest.o
17576 ;;
17577esac
17578fi
17579
17580if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = yes"; then
17581{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17582printf "%s\n" "yes" >&6; }
17583:
17584CFLAGS="$CFLAGS -D_LARGEFILE_SOURCE=1"
17585else
17586if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = no"; then
17587{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
17588printf "%s\n" "no" >&6; }
17589#echo 'Test with flag is no!'
17590#cat conftest.c
17591#echo "$CC $CPPFLAGS $CFLAGS -D_LARGEFILE_SOURCE=1 $ERRFLAG -c conftest.c 2>&1"
17592#echo `$CC $CPPFLAGS $CFLAGS -D_LARGEFILE_SOURCE=1 $ERRFLAG -c conftest.c 2>&1`
17593#exit 1
17594:
17595
17596else
17597{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: failed" >&5
17598printf "%s\n" "failed" >&6; }
17599:
17600
17601fi
17602fi
17603
17604
17605
17606{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if nonblocking sockets work" >&5
17607printf %s "checking if nonblocking sockets work... " >&6; }
17608if echo $host | grep mingw >/dev/null; then
17609	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no (windows)" >&5
17610printf "%s\n" "no (windows)" >&6; }
17611
17612printf "%s\n" "#define NONBLOCKING_IS_BROKEN 1" >>confdefs.h
17613
17614else
17615if test "$cross_compiling" = yes
17616then :
17617
17618	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: crosscompile(yes)" >&5
17619printf "%s\n" "crosscompile(yes)" >&6; }
17620
17621else case e in #(
17622  e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17623/* end confdefs.h.  */
17624
17625
17626#include <stdio.h>
17627#include <string.h>
17628#include <stdlib.h>
17629#include <fcntl.h>
17630#include <errno.h>
17631#ifdef HAVE_SYS_TYPES_H
17632#include <sys/types.h>
17633#endif
17634#ifdef HAVE_SYS_SELECT_H
17635#include <sys/select.h>
17636#endif
17637#ifdef HAVE_SYS_SOCKET_H
17638#include <sys/socket.h>
17639#endif
17640#ifdef HAVE_NETINET_IN_H
17641#include <netinet/in.h>
17642#endif
17643#ifdef HAVE_ARPA_INET_H
17644#include <arpa/inet.h>
17645#endif
17646#ifdef HAVE_UNISTD_H
17647#include <unistd.h>
17648#endif
17649#ifdef HAVE_TIME_H
17650#include <time.h>
17651#endif
17652
17653int main(void)
17654{
17655	int port;
17656	int sfd, cfd;
17657	int num = 10;
17658	int i, p;
17659	struct sockaddr_in a;
17660	/* test if select and nonblocking reads work well together */
17661	/* open port.
17662	   fork child to send 10 messages.
17663	   select to read.
17664	   then try to nonblocking read the 10 messages
17665	   then, nonblocking read must give EAGAIN
17666	*/
17667
17668	port = 12345 + (time(0)%32);
17669	sfd = socket(PF_INET, SOCK_DGRAM, 0);
17670	if(sfd == -1) {
17671		perror("socket");
17672		return 1;
17673	}
17674	memset(&a, 0, sizeof(a));
17675	a.sin_family = AF_INET;
17676	a.sin_port = htons(port);
17677	a.sin_addr.s_addr = inet_addr("127.0.0.1");
17678	if(bind(sfd, (struct sockaddr*)&a, sizeof(a)) < 0) {
17679		perror("bind");
17680		return 1;
17681	}
17682	if(fcntl(sfd, F_SETFL, O_NONBLOCK) == -1) {
17683		perror("fcntl");
17684		return 1;
17685	}
17686
17687	cfd = socket(PF_INET, SOCK_DGRAM, 0);
17688	if(cfd == -1) {
17689		perror("client socket");
17690		return 1;
17691	}
17692	a.sin_port = 0;
17693	if(bind(cfd, (struct sockaddr*)&a, sizeof(a)) < 0) {
17694		perror("client bind");
17695		return 1;
17696	}
17697	a.sin_port = htons(port);
17698
17699	/* no handler, causes exit in 10 seconds */
17700	alarm(10);
17701
17702	/* send and receive on the socket */
17703	if((p=fork()) == 0) {
17704		for(i=0; i<num; i++) {
17705			if(sendto(cfd, &i, sizeof(i), 0,
17706				(struct sockaddr*)&a, sizeof(a)) < 0) {
17707				perror("sendto");
17708				return 1;
17709			}
17710		}
17711	} else {
17712		/* parent */
17713		fd_set rset;
17714		int x;
17715		if(p == -1) {
17716			perror("fork");
17717			return 1;
17718		}
17719		FD_ZERO(&rset);
17720		FD_SET(sfd, &rset);
17721		if(select(sfd+1, &rset, NULL, NULL, NULL) < 1) {
17722			perror("select");
17723			return 1;
17724		}
17725		i = 0;
17726		while(i < num) {
17727			if(recv(sfd, &x, sizeof(x), 0) != sizeof(x)) {
17728				if(errno == EAGAIN)
17729					continue;
17730				perror("recv");
17731				return 1;
17732			}
17733			i++;
17734		}
17735		/* now we want to get EAGAIN: nonblocking goodness */
17736		errno = 0;
17737		recv(sfd, &x, sizeof(x), 0);
17738		if(errno != EAGAIN) {
17739			perror("trying to recv again");
17740			return 1;
17741		}
17742		/* EAGAIN encountered */
17743	}
17744
17745	close(sfd);
17746	close(cfd);
17747	return 0;
17748}
17749
17750_ACEOF
17751if ac_fn_c_try_run "$LINENO"
17752then :
17753
17754	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17755printf "%s\n" "yes" >&6; }
17756
17757else case e in #(
17758  e)
17759	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
17760printf "%s\n" "no" >&6; }
17761
17762printf "%s\n" "#define NONBLOCKING_IS_BROKEN 1" >>confdefs.h
17763
17764 ;;
17765esac
17766fi
17767rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17768  conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
17769esac
17770fi
17771
17772fi
17773
17774
17775{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mkdir has one arg" >&5
17776printf %s "checking whether mkdir has one arg... " >&6; }
17777cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17778/* end confdefs.h.  */
17779
17780#include <stdio.h>
17781#include <unistd.h>
17782#ifdef HAVE_WINSOCK2_H
17783#include <winsock2.h>
17784#endif
17785#ifdef HAVE_SYS_STAT_H
17786#include <sys/stat.h>
17787#endif
17788
17789int
17790main (void)
17791{
17792
17793	(void)mkdir("directory");
17794
17795  ;
17796  return 0;
17797}
17798_ACEOF
17799if ac_fn_c_try_compile "$LINENO"
17800then :
17801  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17802printf "%s\n" "yes" >&6; }
17803
17804printf "%s\n" "#define MKDIR_HAS_ONE_ARG 1" >>confdefs.h
17805
17806
17807else case e in #(
17808  e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
17809printf "%s\n" "no" >&6; }
17810 ;;
17811esac
17812fi
17813rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
17814
17815
17816  for ac_func in strptime
17817do :
17818  ac_fn_c_check_func "$LINENO" "strptime" "ac_cv_func_strptime"
17819if test "x$ac_cv_func_strptime" = xyes
17820then :
17821  printf "%s\n" "#define HAVE_STRPTIME 1" >>confdefs.h
17822
17823{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether strptime works" >&5
17824printf %s "checking whether strptime works... " >&6; }
17825if test c${cross_compiling} = cno; then
17826if test "$cross_compiling" = yes
17827then :
17828  eval "ac_cv_c_strptime_works=maybe"
17829else case e in #(
17830  e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17831/* end confdefs.h.  */
17832
17833#define _XOPEN_SOURCE 600
17834#include <time.h>
17835int main(void) { struct tm tm; char *res;
17836res = 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);
17837if (!res) return 2;
17838res = strptime("20070207111842", "%Y%m%d%H%M%S", &tm);
17839if (!res) return 1; return 0; }
17840
17841_ACEOF
17842if ac_fn_c_try_run "$LINENO"
17843then :
17844  eval "ac_cv_c_strptime_works=yes"
17845else case e in #(
17846  e) eval "ac_cv_c_strptime_works=no" ;;
17847esac
17848fi
17849rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17850  conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
17851esac
17852fi
17853
17854else
17855eval "ac_cv_c_strptime_works=maybe"
17856fi
17857{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_strptime_works" >&5
17858printf "%s\n" "$ac_cv_c_strptime_works" >&6; }
17859if test $ac_cv_c_strptime_works = no; then
17860case " $LIBOBJS " in
17861  *" strptime.$ac_objext "* ) ;;
17862  *) LIBOBJS="$LIBOBJS strptime.$ac_objext"
17863 ;;
17864esac
17865
17866else
17867
17868printf "%s\n" "#define STRPTIME_WORKS 1" >>confdefs.h
17869
17870fi
17871
17872else case e in #(
17873  e) case " $LIBOBJS " in
17874  *" strptime.$ac_objext "* ) ;;
17875  *) LIBOBJS="$LIBOBJS strptime.$ac_objext"
17876 ;;
17877esac
17878 ;;
17879esac
17880fi
17881
17882done
17883
17884# check if we can use SO_REUSEPORT
17885reuseport_default=0
17886if echo "$host" | $GREP -i -e linux >/dev/null; then reuseport_default=1; fi
17887if echo "$host" | $GREP -i -e dragonfly >/dev/null; then reuseport_default=1; fi
17888if test "$reuseport_default" = 1; then
17889
17890printf "%s\n" "#define REUSEPORT_DEFAULT 1" >>confdefs.h
17891
17892else
17893
17894printf "%s\n" "#define REUSEPORT_DEFAULT 0" >>confdefs.h
17895
17896fi
17897
17898# Include systemd.m4 - begin
17899#   macros for configuring systemd
17900#   Copyright 2015, Sami Kerola, CloudFlare.
17901#   BSD licensed.
17902# Check whether --enable-systemd was given.
17903if test ${enable_systemd+y}
17904then :
17905  enableval=$enable_systemd;
17906else case e in #(
17907  e) enable_systemd=no ;;
17908esac
17909fi
17910
17911have_systemd=no
17912if test "x$enable_systemd" != xno
17913then :
17914
17915    if test -n "$PKG_CONFIG"; then
17916		have_systemd=no
17917
17918pkg_failed=no
17919{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for SYSTEMD" >&5
17920printf %s "checking for SYSTEMD... " >&6; }
17921
17922if test -n "$SYSTEMD_CFLAGS"; then
17923    pkg_cv_SYSTEMD_CFLAGS="$SYSTEMD_CFLAGS"
17924 elif test -n "$PKG_CONFIG"; then
17925    if test -n "$PKG_CONFIG" && \
17926    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libsystemd\""; } >&5
17927  ($PKG_CONFIG --exists --print-errors "libsystemd") 2>&5
17928  ac_status=$?
17929  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
17930  test $ac_status = 0; }; then
17931  pkg_cv_SYSTEMD_CFLAGS=`$PKG_CONFIG --cflags "libsystemd" 2>/dev/null`
17932		      test "x$?" != "x0" && pkg_failed=yes
17933else
17934  pkg_failed=yes
17935fi
17936 else
17937    pkg_failed=untried
17938fi
17939if test -n "$SYSTEMD_LIBS"; then
17940    pkg_cv_SYSTEMD_LIBS="$SYSTEMD_LIBS"
17941 elif test -n "$PKG_CONFIG"; then
17942    if test -n "$PKG_CONFIG" && \
17943    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libsystemd\""; } >&5
17944  ($PKG_CONFIG --exists --print-errors "libsystemd") 2>&5
17945  ac_status=$?
17946  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
17947  test $ac_status = 0; }; then
17948  pkg_cv_SYSTEMD_LIBS=`$PKG_CONFIG --libs "libsystemd" 2>/dev/null`
17949		      test "x$?" != "x0" && pkg_failed=yes
17950else
17951  pkg_failed=yes
17952fi
17953 else
17954    pkg_failed=untried
17955fi
17956
17957
17958
17959if test $pkg_failed = yes; then
17960   	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
17961printf "%s\n" "no" >&6; }
17962
17963if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
17964        _pkg_short_errors_supported=yes
17965else
17966        _pkg_short_errors_supported=no
17967fi
17968        if test $_pkg_short_errors_supported = yes; then
17969	        SYSTEMD_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libsystemd" 2>&1`
17970        else
17971	        SYSTEMD_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libsystemd" 2>&1`
17972        fi
17973	# Put the nasty error message in config.log where it belongs
17974	echo "$SYSTEMD_PKG_ERRORS" >&5
17975
17976	as_fn_error $? "Package requirements (libsystemd) were not met:
17977
17978$SYSTEMD_PKG_ERRORS
17979
17980Consider adjusting the PKG_CONFIG_PATH environment variable if you
17981installed software in a non-standard prefix.
17982
17983Alternatively, you may set the environment variables SYSTEMD_CFLAGS
17984and SYSTEMD_LIBS to avoid the need to call pkg-config.
17985See the pkg-config man page for more details." "$LINENO" 5
17986elif test $pkg_failed = untried; then
17987     	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
17988printf "%s\n" "no" >&6; }
17989	{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
17990printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
17991as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
17992is in your PATH or set the PKG_CONFIG environment variable to the full
17993path to pkg-config.
17994
17995Alternatively, you may set the environment variables SYSTEMD_CFLAGS
17996and SYSTEMD_LIBS to avoid the need to call pkg-config.
17997See the pkg-config man page for more details.
17998
17999To get pkg-config, see <http://pkg-config.freedesktop.org/>.
18000See 'config.log' for more details" "$LINENO" 5; }
18001else
18002	SYSTEMD_CFLAGS=$pkg_cv_SYSTEMD_CFLAGS
18003	SYSTEMD_LIBS=$pkg_cv_SYSTEMD_LIBS
18004        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
18005printf "%s\n" "yes" >&6; }
18006	have_systemd=yes
18007fi
18008		if test "x$have_systemd" != "xyes"
18009then :
18010
18011		have_systemd_daemon=no
18012
18013pkg_failed=no
18014{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for SYSTEMD_DAEMON" >&5
18015printf %s "checking for SYSTEMD_DAEMON... " >&6; }
18016
18017if test -n "$SYSTEMD_DAEMON_CFLAGS"; then
18018    pkg_cv_SYSTEMD_DAEMON_CFLAGS="$SYSTEMD_DAEMON_CFLAGS"
18019 elif test -n "$PKG_CONFIG"; then
18020    if test -n "$PKG_CONFIG" && \
18021    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libsystemd-daemon\""; } >&5
18022  ($PKG_CONFIG --exists --print-errors "libsystemd-daemon") 2>&5
18023  ac_status=$?
18024  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
18025  test $ac_status = 0; }; then
18026  pkg_cv_SYSTEMD_DAEMON_CFLAGS=`$PKG_CONFIG --cflags "libsystemd-daemon" 2>/dev/null`
18027		      test "x$?" != "x0" && pkg_failed=yes
18028else
18029  pkg_failed=yes
18030fi
18031 else
18032    pkg_failed=untried
18033fi
18034if test -n "$SYSTEMD_DAEMON_LIBS"; then
18035    pkg_cv_SYSTEMD_DAEMON_LIBS="$SYSTEMD_DAEMON_LIBS"
18036 elif test -n "$PKG_CONFIG"; then
18037    if test -n "$PKG_CONFIG" && \
18038    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libsystemd-daemon\""; } >&5
18039  ($PKG_CONFIG --exists --print-errors "libsystemd-daemon") 2>&5
18040  ac_status=$?
18041  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
18042  test $ac_status = 0; }; then
18043  pkg_cv_SYSTEMD_DAEMON_LIBS=`$PKG_CONFIG --libs "libsystemd-daemon" 2>/dev/null`
18044		      test "x$?" != "x0" && pkg_failed=yes
18045else
18046  pkg_failed=yes
18047fi
18048 else
18049    pkg_failed=untried
18050fi
18051
18052
18053
18054if test $pkg_failed = yes; then
18055   	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
18056printf "%s\n" "no" >&6; }
18057
18058if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
18059        _pkg_short_errors_supported=yes
18060else
18061        _pkg_short_errors_supported=no
18062fi
18063        if test $_pkg_short_errors_supported = yes; then
18064	        SYSTEMD_DAEMON_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libsystemd-daemon" 2>&1`
18065        else
18066	        SYSTEMD_DAEMON_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libsystemd-daemon" 2>&1`
18067        fi
18068	# Put the nasty error message in config.log where it belongs
18069	echo "$SYSTEMD_DAEMON_PKG_ERRORS" >&5
18070
18071	as_fn_error $? "Package requirements (libsystemd-daemon) were not met:
18072
18073$SYSTEMD_DAEMON_PKG_ERRORS
18074
18075Consider adjusting the PKG_CONFIG_PATH environment variable if you
18076installed software in a non-standard prefix.
18077
18078Alternatively, you may set the environment variables SYSTEMD_DAEMON_CFLAGS
18079and SYSTEMD_DAEMON_LIBS to avoid the need to call pkg-config.
18080See the pkg-config man page for more details." "$LINENO" 5
18081elif test $pkg_failed = untried; then
18082     	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
18083printf "%s\n" "no" >&6; }
18084	{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
18085printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
18086as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
18087is in your PATH or set the PKG_CONFIG environment variable to the full
18088path to pkg-config.
18089
18090Alternatively, you may set the environment variables SYSTEMD_DAEMON_CFLAGS
18091and SYSTEMD_DAEMON_LIBS to avoid the need to call pkg-config.
18092See the pkg-config man page for more details.
18093
18094To get pkg-config, see <http://pkg-config.freedesktop.org/>.
18095See 'config.log' for more details" "$LINENO" 5; }
18096else
18097	SYSTEMD_DAEMON_CFLAGS=$pkg_cv_SYSTEMD_DAEMON_CFLAGS
18098	SYSTEMD_DAEMON_LIBS=$pkg_cv_SYSTEMD_DAEMON_LIBS
18099        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
18100printf "%s\n" "yes" >&6; }
18101	have_systemd_daemon=yes
18102fi
18103		if test "x$have_systemd_daemon" = "xyes"
18104then :
18105  have_systemd=yes
18106fi
18107
18108fi
18109	case $enable_systemd:$have_systemd in #(
18110  yes:no) :
18111    as_fn_error $? "systemd enabled but libsystemd not found" "$LINENO" 5 ;; #(
18112  *:yes) :
18113
18114printf "%s\n" "#define HAVE_SYSTEMD 1" >>confdefs.h
18115
18116		LIBS="$LIBS $SYSTEMD_LIBS"
18117
18118	 ;; #(
18119  *) :
18120     ;;
18121esac
18122    else
18123    	as_fn_error $? "systemd enabled but need pkg-config to configure for it" "$LINENO" 5
18124    fi
18125
18126fi
18127 if test "x$have_systemd" = xyes; then
18128  USE_SYSTEMD_TRUE=
18129  USE_SYSTEMD_FALSE='#'
18130else
18131  USE_SYSTEMD_TRUE='#'
18132  USE_SYSTEMD_FALSE=
18133fi
18134
18135
18136# Include systemd.m4 - end
18137
18138# set memory allocation checking if requested
18139# Check whether --enable-alloc-checks was given.
18140if test ${enable_alloc_checks+y}
18141then :
18142  enableval=$enable_alloc_checks;
18143fi
18144
18145# Check whether --enable-alloc-lite was given.
18146if test ${enable_alloc_lite+y}
18147then :
18148  enableval=$enable_alloc_lite;
18149fi
18150
18151# Check whether --enable-alloc-nonregional was given.
18152if test ${enable_alloc_nonregional+y}
18153then :
18154  enableval=$enable_alloc_nonregional;
18155fi
18156
18157if test x_$enable_alloc_nonregional = x_yes; then
18158
18159printf "%s\n" "#define UNBOUND_ALLOC_NONREGIONAL 1" >>confdefs.h
18160
18161fi
18162if test x_$enable_alloc_checks = x_yes; then
18163
18164printf "%s\n" "#define UNBOUND_ALLOC_STATS 1" >>confdefs.h
18165
18166	SLDNS_ALLOCCHECK_EXTRA_OBJ="alloc.lo log.lo"
18167
18168	ASYNCLOOK_ALLOCCHECK_EXTRA_OBJ="alloc.lo"
18169
18170else
18171	if test x_$enable_alloc_lite = x_yes; then
18172
18173printf "%s\n" "#define UNBOUND_ALLOC_LITE 1" >>confdefs.h
18174
18175	else
18176
18177	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible malloc" >&5
18178printf %s "checking for GNU libc compatible malloc... " >&6; }
18179	if test "$cross_compiling" = yes
18180then :
18181  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no (crosscompile)" >&5
18182printf "%s\n" "no (crosscompile)" >&6; }
18183	case " $LIBOBJS " in
18184  *" malloc.$ac_objext "* ) ;;
18185  *) LIBOBJS="$LIBOBJS malloc.$ac_objext"
18186 ;;
18187esac
18188
18189
18190printf "%s\n" "#define malloc rpl_malloc_unbound" >>confdefs.h
18191
18192else case e in #(
18193  e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18194/* end confdefs.h.  */
18195#if defined STDC_HEADERS || defined HAVE_STDLIB_H
18196#include <stdlib.h>
18197#else
18198char *malloc ();
18199#endif
18200
18201int
18202main (void)
18203{
18204 if(malloc(0) != 0) return 1;
18205  ;
18206  return 0;
18207}
18208
18209_ACEOF
18210if ac_fn_c_try_run "$LINENO"
18211then :
18212  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
18213printf "%s\n" "no" >&6; }
18214	case " $LIBOBJS " in
18215  *" malloc.$ac_objext "* ) ;;
18216  *) LIBOBJS="$LIBOBJS malloc.$ac_objext"
18217 ;;
18218esac
18219
18220
18221printf "%s\n" "#define malloc rpl_malloc_unbound" >>confdefs.h
18222
18223else case e in #(
18224  e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
18225printf "%s\n" "yes" >&6; }
18226
18227printf "%s\n" "#define HAVE_MALLOC 1" >>confdefs.h
18228 ;;
18229esac
18230fi
18231rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18232  conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
18233esac
18234fi
18235
18236
18237	fi
18238fi
18239
18240# check windows threads (we use them, not pthreads, on windows).
18241if test "$on_mingw" = "yes"; then
18242# check windows threads
18243	ac_fn_c_check_header_compile "$LINENO" "windows.h" "ac_cv_header_windows_h" "$ac_includes_default
18244"
18245if test "x$ac_cv_header_windows_h" = xyes
18246then :
18247  printf "%s\n" "#define HAVE_WINDOWS_H 1" >>confdefs.h
18248
18249fi
18250
18251	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for CreateThread" >&5
18252printf %s "checking for CreateThread... " >&6; }
18253	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18254/* end confdefs.h.  */
18255
18256#ifdef HAVE_WINDOWS_H
18257#include <windows.h>
18258#endif
18259
18260int
18261main (void)
18262{
18263
18264	HANDLE t = CreateThread(NULL, 0, NULL, NULL, 0, NULL);
18265
18266  ;
18267  return 0;
18268}
18269_ACEOF
18270if ac_fn_c_try_compile "$LINENO"
18271then :
18272  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
18273printf "%s\n" "yes" >&6; }
18274
18275printf "%s\n" "#define HAVE_WINDOWS_THREADS 1" >>confdefs.h
18276
18277
18278else case e in #(
18279  e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
18280printf "%s\n" "no" >&6; }
18281 ;;
18282esac
18283fi
18284rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
18285
18286else
18287# not on mingw, check thread libraries.
18288
18289# check for thread library.
18290# check this first, so that the pthread lib does not get linked in via
18291# libssl or libpython, and thus distorts the tests, and we end up using
18292# the non-threadsafe C libraries.
18293
18294# Check whether --with-pthreads was given.
18295if test ${with_pthreads+y}
18296then :
18297  withval=$with_pthreads;
18298else case e in #(
18299  e)  withval="yes"  ;;
18300esac
18301fi
18302
18303ub_have_pthreads=no
18304if test x_$withval != x_no; then
18305	ac_ext=c
18306ac_cpp='$CPP $CPPFLAGS'
18307ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
18308ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
18309ac_compiler_gnu=$ac_cv_c_compiler_gnu
18310{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
18311printf %s "checking how to run the C preprocessor... " >&6; }
18312# On Suns, sometimes $CPP names a directory.
18313if test -n "$CPP" && test -d "$CPP"; then
18314  CPP=
18315fi
18316if test -z "$CPP"; then
18317  if test ${ac_cv_prog_CPP+y}
18318then :
18319  printf %s "(cached) " >&6
18320else case e in #(
18321  e)     # Double quotes because $CC needs to be expanded
18322    for CPP in "$CC -E" "$CC -E -traditional-cpp" cpp /lib/cpp
18323    do
18324      ac_preproc_ok=false
18325for ac_c_preproc_warn_flag in '' yes
18326do
18327  # Use a header file that comes with gcc, so configuring glibc
18328  # with a fresh cross-compiler works.
18329  # On the NeXT, cc -E runs the code through the compiler's parser,
18330  # not just through cpp. "Syntax error" is here to catch this case.
18331  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18332/* end confdefs.h.  */
18333#include <limits.h>
18334		     Syntax error
18335_ACEOF
18336if ac_fn_c_try_cpp "$LINENO"
18337then :
18338
18339else case e in #(
18340  e) # Broken: fails on valid input.
18341continue ;;
18342esac
18343fi
18344rm -f conftest.err conftest.i conftest.$ac_ext
18345
18346  # OK, works on sane cases.  Now check whether nonexistent headers
18347  # can be detected and how.
18348  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18349/* end confdefs.h.  */
18350#include <ac_nonexistent.h>
18351_ACEOF
18352if ac_fn_c_try_cpp "$LINENO"
18353then :
18354  # Broken: success on invalid input.
18355continue
18356else case e in #(
18357  e) # Passes both tests.
18358ac_preproc_ok=:
18359break ;;
18360esac
18361fi
18362rm -f conftest.err conftest.i conftest.$ac_ext
18363
18364done
18365# Because of 'break', _AC_PREPROC_IFELSE's cleaning code was skipped.
18366rm -f conftest.i conftest.err conftest.$ac_ext
18367if $ac_preproc_ok
18368then :
18369  break
18370fi
18371
18372    done
18373    ac_cv_prog_CPP=$CPP
18374   ;;
18375esac
18376fi
18377  CPP=$ac_cv_prog_CPP
18378else
18379  ac_cv_prog_CPP=$CPP
18380fi
18381{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
18382printf "%s\n" "$CPP" >&6; }
18383ac_preproc_ok=false
18384for ac_c_preproc_warn_flag in '' yes
18385do
18386  # Use a header file that comes with gcc, so configuring glibc
18387  # with a fresh cross-compiler works.
18388  # On the NeXT, cc -E runs the code through the compiler's parser,
18389  # not just through cpp. "Syntax error" is here to catch this case.
18390  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18391/* end confdefs.h.  */
18392#include <limits.h>
18393		     Syntax error
18394_ACEOF
18395if ac_fn_c_try_cpp "$LINENO"
18396then :
18397
18398else case e in #(
18399  e) # Broken: fails on valid input.
18400continue ;;
18401esac
18402fi
18403rm -f conftest.err conftest.i conftest.$ac_ext
18404
18405  # OK, works on sane cases.  Now check whether nonexistent headers
18406  # can be detected and how.
18407  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18408/* end confdefs.h.  */
18409#include <ac_nonexistent.h>
18410_ACEOF
18411if ac_fn_c_try_cpp "$LINENO"
18412then :
18413  # Broken: success on invalid input.
18414continue
18415else case e in #(
18416  e) # Passes both tests.
18417ac_preproc_ok=:
18418break ;;
18419esac
18420fi
18421rm -f conftest.err conftest.i conftest.$ac_ext
18422
18423done
18424# Because of 'break', _AC_PREPROC_IFELSE's cleaning code was skipped.
18425rm -f conftest.i conftest.err conftest.$ac_ext
18426if $ac_preproc_ok
18427then :
18428
18429else case e in #(
18430  e) { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
18431printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
18432as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
18433See 'config.log' for more details" "$LINENO" 5; } ;;
18434esac
18435fi
18436
18437ac_ext=c
18438ac_cpp='$CPP $CPPFLAGS'
18439ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
18440ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
18441ac_compiler_gnu=$ac_cv_c_compiler_gnu
18442
18443
18444{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for egrep -e" >&5
18445printf %s "checking for egrep -e... " >&6; }
18446if test ${ac_cv_path_EGREP_TRADITIONAL+y}
18447then :
18448  printf %s "(cached) " >&6
18449else case e in #(
18450  e) if test -z "$EGREP_TRADITIONAL"; then
18451  ac_path_EGREP_TRADITIONAL_found=false
18452  # Loop through the user's path and test for each of PROGNAME-LIST
18453  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18454for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
18455do
18456  IFS=$as_save_IFS
18457  case $as_dir in #(((
18458    '') as_dir=./ ;;
18459    */) ;;
18460    *) as_dir=$as_dir/ ;;
18461  esac
18462    for ac_prog in grep ggrep
18463   do
18464    for ac_exec_ext in '' $ac_executable_extensions; do
18465      ac_path_EGREP_TRADITIONAL="$as_dir$ac_prog$ac_exec_ext"
18466      as_fn_executable_p "$ac_path_EGREP_TRADITIONAL" || continue
18467# Check for GNU ac_path_EGREP_TRADITIONAL and select it if it is found.
18468  # Check for GNU $ac_path_EGREP_TRADITIONAL
18469case `"$ac_path_EGREP_TRADITIONAL" --version 2>&1` in #(
18470*GNU*)
18471  ac_cv_path_EGREP_TRADITIONAL="$ac_path_EGREP_TRADITIONAL" ac_path_EGREP_TRADITIONAL_found=:;;
18472#(
18473*)
18474  ac_count=0
18475  printf %s 0123456789 >"conftest.in"
18476  while :
18477  do
18478    cat "conftest.in" "conftest.in" >"conftest.tmp"
18479    mv "conftest.tmp" "conftest.in"
18480    cp "conftest.in" "conftest.nl"
18481    printf "%s\n" 'EGREP_TRADITIONAL' >> "conftest.nl"
18482    "$ac_path_EGREP_TRADITIONAL" -E 'EGR(EP|AC)_TRADITIONAL$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
18483    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
18484    as_fn_arith $ac_count + 1 && ac_count=$as_val
18485    if test $ac_count -gt ${ac_path_EGREP_TRADITIONAL_max-0}; then
18486      # Best one so far, save it but keep looking for a better one
18487      ac_cv_path_EGREP_TRADITIONAL="$ac_path_EGREP_TRADITIONAL"
18488      ac_path_EGREP_TRADITIONAL_max=$ac_count
18489    fi
18490    # 10*(2^10) chars as input seems more than enough
18491    test $ac_count -gt 10 && break
18492  done
18493  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
18494esac
18495
18496      $ac_path_EGREP_TRADITIONAL_found && break 3
18497    done
18498  done
18499  done
18500IFS=$as_save_IFS
18501  if test -z "$ac_cv_path_EGREP_TRADITIONAL"; then
18502    :
18503  fi
18504else
18505  ac_cv_path_EGREP_TRADITIONAL=$EGREP_TRADITIONAL
18506fi
18507
18508    if test "$ac_cv_path_EGREP_TRADITIONAL"
18509then :
18510  ac_cv_path_EGREP_TRADITIONAL="$ac_cv_path_EGREP_TRADITIONAL -E"
18511else case e in #(
18512  e) if test -z "$EGREP_TRADITIONAL"; then
18513  ac_path_EGREP_TRADITIONAL_found=false
18514  # Loop through the user's path and test for each of PROGNAME-LIST
18515  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18516for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
18517do
18518  IFS=$as_save_IFS
18519  case $as_dir in #(((
18520    '') as_dir=./ ;;
18521    */) ;;
18522    *) as_dir=$as_dir/ ;;
18523  esac
18524    for ac_prog in egrep
18525   do
18526    for ac_exec_ext in '' $ac_executable_extensions; do
18527      ac_path_EGREP_TRADITIONAL="$as_dir$ac_prog$ac_exec_ext"
18528      as_fn_executable_p "$ac_path_EGREP_TRADITIONAL" || continue
18529# Check for GNU ac_path_EGREP_TRADITIONAL and select it if it is found.
18530  # Check for GNU $ac_path_EGREP_TRADITIONAL
18531case `"$ac_path_EGREP_TRADITIONAL" --version 2>&1` in #(
18532*GNU*)
18533  ac_cv_path_EGREP_TRADITIONAL="$ac_path_EGREP_TRADITIONAL" ac_path_EGREP_TRADITIONAL_found=:;;
18534#(
18535*)
18536  ac_count=0
18537  printf %s 0123456789 >"conftest.in"
18538  while :
18539  do
18540    cat "conftest.in" "conftest.in" >"conftest.tmp"
18541    mv "conftest.tmp" "conftest.in"
18542    cp "conftest.in" "conftest.nl"
18543    printf "%s\n" 'EGREP_TRADITIONAL' >> "conftest.nl"
18544    "$ac_path_EGREP_TRADITIONAL" 'EGR(EP|AC)_TRADITIONAL$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
18545    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
18546    as_fn_arith $ac_count + 1 && ac_count=$as_val
18547    if test $ac_count -gt ${ac_path_EGREP_TRADITIONAL_max-0}; then
18548      # Best one so far, save it but keep looking for a better one
18549      ac_cv_path_EGREP_TRADITIONAL="$ac_path_EGREP_TRADITIONAL"
18550      ac_path_EGREP_TRADITIONAL_max=$ac_count
18551    fi
18552    # 10*(2^10) chars as input seems more than enough
18553    test $ac_count -gt 10 && break
18554  done
18555  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
18556esac
18557
18558      $ac_path_EGREP_TRADITIONAL_found && break 3
18559    done
18560  done
18561  done
18562IFS=$as_save_IFS
18563  if test -z "$ac_cv_path_EGREP_TRADITIONAL"; then
18564    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
18565  fi
18566else
18567  ac_cv_path_EGREP_TRADITIONAL=$EGREP_TRADITIONAL
18568fi
18569 ;;
18570esac
18571fi ;;
18572esac
18573fi
18574{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP_TRADITIONAL" >&5
18575printf "%s\n" "$ac_cv_path_EGREP_TRADITIONAL" >&6; }
18576 EGREP_TRADITIONAL=$ac_cv_path_EGREP_TRADITIONAL
18577
18578
18579
18580
18581
18582ac_ext=c
18583ac_cpp='$CPP $CPPFLAGS'
18584ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
18585ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
18586ac_compiler_gnu=$ac_cv_c_compiler_gnu
18587
18588ax_pthread_ok=no
18589
18590# We used to check for pthread.h first, but this fails if pthread.h
18591# requires special compiler flags (e.g. on Tru64 or Sequent).
18592# It gets checked for in the link test anyway.
18593
18594# First of all, check if the user has set any of the PTHREAD_LIBS,
18595# etcetera environment variables, and if threads linking works using
18596# them:
18597if test "x$PTHREAD_CFLAGS$PTHREAD_LIBS" != "x"; then
18598        ax_pthread_save_CC="$CC"
18599        ax_pthread_save_CFLAGS="$CFLAGS"
18600        ax_pthread_save_LIBS="$LIBS"
18601        if test "x$PTHREAD_CC" != "x"
18602then :
18603  CC="$PTHREAD_CC"
18604fi
18605        if test "x$PTHREAD_CXX" != "x"
18606then :
18607  CXX="$PTHREAD_CXX"
18608fi
18609        CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
18610        LIBS="$PTHREAD_LIBS $LIBS"
18611        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS" >&5
18612printf %s "checking for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS... " >&6; }
18613        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18614/* end confdefs.h.  */
18615
18616/* Override any GCC internal prototype to avoid an error.
18617   Use char because int might match the return type of a GCC
18618   builtin and then its argument prototype would still apply.
18619   The 'extern "C"' is for builds by C++ compilers;
18620   although this is not generally supported in C code supporting it here
18621   has little cost and some practical benefit (sr 110532).  */
18622#ifdef __cplusplus
18623extern "C"
18624#endif
18625char pthread_join (void);
18626int
18627main (void)
18628{
18629return pthread_join ();
18630  ;
18631  return 0;
18632}
18633_ACEOF
18634if ac_fn_c_try_link "$LINENO"
18635then :
18636  ax_pthread_ok=yes
18637fi
18638rm -f core conftest.err conftest.$ac_objext conftest.beam \
18639    conftest$ac_exeext conftest.$ac_ext
18640        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
18641printf "%s\n" "$ax_pthread_ok" >&6; }
18642        if test "x$ax_pthread_ok" = "xno"; then
18643                PTHREAD_LIBS=""
18644                PTHREAD_CFLAGS=""
18645        fi
18646        CC="$ax_pthread_save_CC"
18647        CFLAGS="$ax_pthread_save_CFLAGS"
18648        LIBS="$ax_pthread_save_LIBS"
18649fi
18650
18651# We must check for the threads library under a number of different
18652# names; the ordering is very important because some systems
18653# (e.g. DEC) have both -lpthread and -lpthreads, where one of the
18654# libraries is broken (non-POSIX).
18655
18656# Create a list of thread flags to try. Items with a "," contain both
18657# C compiler flags (before ",") and linker flags (after ","). Other items
18658# starting with a "-" are C compiler flags, and remaining items are
18659# library names, except for "none" which indicates that we try without
18660# any flags at all, and "pthread-config" which is a program returning
18661# the flags for the Pth emulation library.
18662
18663ax_pthread_flags="pthreads none -Kthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config"
18664
18665# The ordering *is* (sometimes) important.  Some notes on the
18666# individual items follow:
18667
18668# pthreads: AIX (must check this before -lpthread)
18669# none: in case threads are in libc; should be tried before -Kthread and
18670#       other compiler flags to prevent continual compiler warnings
18671# -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h)
18672# -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads), Tru64
18673#           (Note: HP C rejects this with "bad form for `-t' option")
18674# -pthreads: Solaris/gcc (Note: HP C also rejects)
18675# -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
18676#      doesn't hurt to check since this sometimes defines pthreads and
18677#      -D_REENTRANT too), HP C (must be checked before -lpthread, which
18678#      is present but should not be used directly; and before -mthreads,
18679#      because the compiler interprets this as "-mt" + "-hreads")
18680# -mthreads: Mingw32/gcc, Lynx/gcc
18681# pthread: Linux, etcetera
18682# --thread-safe: KAI C++
18683# pthread-config: use pthread-config program (for GNU Pth library)
18684
18685case $host_os in
18686
18687        freebsd*)
18688
18689        # -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
18690        # lthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
18691
18692        ax_pthread_flags="-kthread lthread $ax_pthread_flags"
18693        ;;
18694
18695        hpux*)
18696
18697        # From the cc(1) man page: "[-mt] Sets various -D flags to enable
18698        # multi-threading and also sets -lpthread."
18699
18700        ax_pthread_flags="-mt -pthread pthread $ax_pthread_flags"
18701        ;;
18702
18703        openedition*)
18704
18705        # IBM z/OS requires a feature-test macro to be defined in order to
18706        # enable POSIX threads at all, so give the user a hint if this is
18707        # not set. (We don't define these ourselves, as they can affect
18708        # other portions of the system API in unpredictable ways.)
18709
18710        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18711/* end confdefs.h.  */
18712
18713#            if !defined(_OPEN_THREADS) && !defined(_UNIX03_THREADS)
18714             AX_PTHREAD_ZOS_MISSING
18715#            endif
18716
18717_ACEOF
18718if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
18719  $EGREP_TRADITIONAL "AX_PTHREAD_ZOS_MISSING" >/dev/null 2>&1
18720then :
18721  { 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
18722printf "%s\n" "$as_me: WARNING: IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support." >&2;}
18723fi
18724rm -rf conftest*
18725
18726        ;;
18727
18728        solaris*)
18729
18730        # On Solaris (at least, for some versions), libc contains stubbed
18731        # (non-functional) versions of the pthreads routines, so link-based
18732        # tests will erroneously succeed. (N.B.: The stubs are missing
18733        # pthread_cleanup_push, or rather a function called by this macro,
18734        # so we could check for that, but who knows whether they'll stub
18735        # that too in a future libc.)  So we'll check first for the
18736        # standard Solaris way of linking pthreads (-mt -lpthread).
18737
18738        ax_pthread_flags="-mt,-lpthread pthread $ax_pthread_flags"
18739        ;;
18740esac
18741
18742# Are we compiling with Clang?
18743
18744{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC is Clang" >&5
18745printf %s "checking whether $CC is Clang... " >&6; }
18746if test ${ax_cv_PTHREAD_CLANG+y}
18747then :
18748  printf %s "(cached) " >&6
18749else case e in #(
18750  e) ax_cv_PTHREAD_CLANG=no
18751     # Note that Autoconf sets GCC=yes for Clang as well as GCC
18752     if test "x$GCC" = "xyes"; then
18753        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18754/* end confdefs.h.  */
18755/* Note: Clang 2.7 lacks __clang_[a-z]+__ */
18756#            if defined(__clang__) && defined(__llvm__)
18757             AX_PTHREAD_CC_IS_CLANG
18758#            endif
18759
18760_ACEOF
18761if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
18762  $EGREP_TRADITIONAL "AX_PTHREAD_CC_IS_CLANG" >/dev/null 2>&1
18763then :
18764  ax_cv_PTHREAD_CLANG=yes
18765fi
18766rm -rf conftest*
18767
18768     fi
18769     ;;
18770esac
18771fi
18772{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_CLANG" >&5
18773printf "%s\n" "$ax_cv_PTHREAD_CLANG" >&6; }
18774ax_pthread_clang="$ax_cv_PTHREAD_CLANG"
18775
18776
18777# GCC generally uses -pthread, or -pthreads on some platforms (e.g. SPARC)
18778
18779# Note that for GCC and Clang -pthread generally implies -lpthread,
18780# except when -nostdlib is passed.
18781# This is problematic using libtool to build C++ shared libraries with pthread:
18782# [1] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=25460
18783# [2] https://bugzilla.redhat.com/show_bug.cgi?id=661333
18784# [3] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=468555
18785# To solve this, first try -pthread together with -lpthread for GCC
18786
18787if test "x$GCC" = "xyes"
18788then :
18789  ax_pthread_flags="-pthread,-lpthread -pthread -pthreads $ax_pthread_flags"
18790fi
18791
18792# Clang takes -pthread (never supported any other flag), but we'll try with -lpthread first
18793
18794if test "x$ax_pthread_clang" = "xyes"
18795then :
18796  ax_pthread_flags="-pthread,-lpthread -pthread"
18797fi
18798
18799
18800# The presence of a feature test macro requesting re-entrant function
18801# definitions is, on some systems, a strong hint that pthreads support is
18802# correctly enabled
18803
18804case $host_os in
18805        darwin* | hpux* | linux* | osf* | solaris*)
18806        ax_pthread_check_macro="_REENTRANT"
18807        ;;
18808
18809        aix*)
18810        ax_pthread_check_macro="_THREAD_SAFE"
18811        ;;
18812
18813        *)
18814        ax_pthread_check_macro="--"
18815        ;;
18816esac
18817if test "x$ax_pthread_check_macro" = "x--"
18818then :
18819  ax_pthread_check_cond=0
18820else case e in #(
18821  e) ax_pthread_check_cond="!defined($ax_pthread_check_macro)" ;;
18822esac
18823fi
18824
18825
18826if test "x$ax_pthread_ok" = "xno"; then
18827for ax_pthread_try_flag in $ax_pthread_flags; do
18828
18829        case $ax_pthread_try_flag in
18830                none)
18831                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether pthreads work without any flags" >&5
18832printf %s "checking whether pthreads work without any flags... " >&6; }
18833                ;;
18834
18835                *,*)
18836                PTHREAD_CFLAGS=`echo $ax_pthread_try_flag | sed "s/^\(.*\),\(.*\)$/\1/"`
18837                PTHREAD_LIBS=`echo $ax_pthread_try_flag | sed "s/^\(.*\),\(.*\)$/\2/"`
18838                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with \"$PTHREAD_CFLAGS\" and \"$PTHREAD_LIBS\"" >&5
18839printf %s "checking whether pthreads work with \"$PTHREAD_CFLAGS\" and \"$PTHREAD_LIBS\"... " >&6; }
18840                ;;
18841
18842                -*)
18843                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with $ax_pthread_try_flag" >&5
18844printf %s "checking whether pthreads work with $ax_pthread_try_flag... " >&6; }
18845                PTHREAD_CFLAGS="$ax_pthread_try_flag"
18846                ;;
18847
18848                pthread-config)
18849                # Extract the first word of "pthread-config", so it can be a program name with args.
18850set dummy pthread-config; ac_word=$2
18851{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18852printf %s "checking for $ac_word... " >&6; }
18853if test ${ac_cv_prog_ax_pthread_config+y}
18854then :
18855  printf %s "(cached) " >&6
18856else case e in #(
18857  e) if test -n "$ax_pthread_config"; then
18858  ac_cv_prog_ax_pthread_config="$ax_pthread_config" # Let the user override the test.
18859else
18860as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18861for as_dir in $PATH
18862do
18863  IFS=$as_save_IFS
18864  case $as_dir in #(((
18865    '') as_dir=./ ;;
18866    */) ;;
18867    *) as_dir=$as_dir/ ;;
18868  esac
18869    for ac_exec_ext in '' $ac_executable_extensions; do
18870  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
18871    ac_cv_prog_ax_pthread_config="yes"
18872    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
18873    break 2
18874  fi
18875done
18876  done
18877IFS=$as_save_IFS
18878
18879  test -z "$ac_cv_prog_ax_pthread_config" && ac_cv_prog_ax_pthread_config="no"
18880fi ;;
18881esac
18882fi
18883ax_pthread_config=$ac_cv_prog_ax_pthread_config
18884if test -n "$ax_pthread_config"; then
18885  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_config" >&5
18886printf "%s\n" "$ax_pthread_config" >&6; }
18887else
18888  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
18889printf "%s\n" "no" >&6; }
18890fi
18891
18892
18893                if test "x$ax_pthread_config" = "xno"
18894then :
18895  continue
18896fi
18897                PTHREAD_CFLAGS="`pthread-config --cflags`"
18898                PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`"
18899                ;;
18900
18901                *)
18902                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for the pthreads library -l$ax_pthread_try_flag" >&5
18903printf %s "checking for the pthreads library -l$ax_pthread_try_flag... " >&6; }
18904                PTHREAD_LIBS="-l$ax_pthread_try_flag"
18905                ;;
18906        esac
18907
18908        ax_pthread_save_CFLAGS="$CFLAGS"
18909        ax_pthread_save_LIBS="$LIBS"
18910        CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
18911        LIBS="$PTHREAD_LIBS $LIBS"
18912
18913        # Check for various functions.  We must include pthread.h,
18914        # since some functions may be macros.  (On the Sequent, we
18915        # need a special flag -Kthread to make this header compile.)
18916        # We check for pthread_join because it is in -lpthread on IRIX
18917        # while pthread_create is in libc.  We check for pthread_attr_init
18918        # due to DEC craziness with -lpthreads.  We check for
18919        # pthread_cleanup_push because it is one of the few pthread
18920        # functions on Solaris that doesn't have a non-functional libc stub.
18921        # We try pthread_create on general principles.
18922
18923        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18924/* end confdefs.h.  */
18925#include <pthread.h>
18926#                       if $ax_pthread_check_cond
18927#                        error "$ax_pthread_check_macro must be defined"
18928#                       endif
18929                        static void *some_global = NULL;
18930                        static void routine(void *a)
18931                          {
18932                             /* To avoid any unused-parameter or
18933                                unused-but-set-parameter warning.  */
18934                             some_global = a;
18935                          }
18936                        static void *start_routine(void *a) { return a; }
18937int
18938main (void)
18939{
18940pthread_t th; pthread_attr_t attr;
18941                        pthread_create(&th, 0, start_routine, 0);
18942                        pthread_join(th, 0);
18943                        pthread_attr_init(&attr);
18944                        pthread_cleanup_push(routine, 0);
18945                        pthread_cleanup_pop(0) /* ; */
18946  ;
18947  return 0;
18948}
18949_ACEOF
18950if ac_fn_c_try_link "$LINENO"
18951then :
18952  ax_pthread_ok=yes
18953fi
18954rm -f core conftest.err conftest.$ac_objext conftest.beam \
18955    conftest$ac_exeext conftest.$ac_ext
18956
18957        CFLAGS="$ax_pthread_save_CFLAGS"
18958        LIBS="$ax_pthread_save_LIBS"
18959
18960        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
18961printf "%s\n" "$ax_pthread_ok" >&6; }
18962        if test "x$ax_pthread_ok" = "xyes"
18963then :
18964  break
18965fi
18966
18967        PTHREAD_LIBS=""
18968        PTHREAD_CFLAGS=""
18969done
18970fi
18971
18972
18973# Clang needs special handling, because older versions handle the -pthread
18974# option in a rather... idiosyncratic way
18975
18976if test "x$ax_pthread_clang" = "xyes"; then
18977
18978        # Clang takes -pthread; it has never supported any other flag
18979
18980        # (Note 1: This will need to be revisited if a system that Clang
18981        # supports has POSIX threads in a separate library.  This tends not
18982        # to be the way of modern systems, but it's conceivable.)
18983
18984        # (Note 2: On some systems, notably Darwin, -pthread is not needed
18985        # to get POSIX threads support; the API is always present and
18986        # active.  We could reasonably leave PTHREAD_CFLAGS empty.  But
18987        # -pthread does define _REENTRANT, and while the Darwin headers
18988        # ignore this macro, third-party headers might not.)
18989
18990        # However, older versions of Clang make a point of warning the user
18991        # that, in an invocation where only linking and no compilation is
18992        # taking place, the -pthread option has no effect ("argument unused
18993        # during compilation").  They expect -pthread to be passed in only
18994        # when source code is being compiled.
18995        #
18996        # Problem is, this is at odds with the way Automake and most other
18997        # C build frameworks function, which is that the same flags used in
18998        # compilation (CFLAGS) are also used in linking.  Many systems
18999        # supported by AX_PTHREAD require exactly this for POSIX threads
19000        # support, and in fact it is often not straightforward to specify a
19001        # flag that is used only in the compilation phase and not in
19002        # linking.  Such a scenario is extremely rare in practice.
19003        #
19004        # Even though use of the -pthread flag in linking would only print
19005        # a warning, this can be a nuisance for well-run software projects
19006        # that build with -Werror.  So if the active version of Clang has
19007        # this misfeature, we search for an option to squash it.
19008
19009        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether Clang needs flag to prevent \"argument unused\" warning when linking with -pthread" >&5
19010printf %s "checking whether Clang needs flag to prevent \"argument unused\" warning when linking with -pthread... " >&6; }
19011if test ${ax_cv_PTHREAD_CLANG_NO_WARN_FLAG+y}
19012then :
19013  printf %s "(cached) " >&6
19014else case e in #(
19015  e) ax_cv_PTHREAD_CLANG_NO_WARN_FLAG=unknown
19016             # Create an alternate version of $ac_link that compiles and
19017             # links in two steps (.c -> .o, .o -> exe) instead of one
19018             # (.c -> exe), because the warning occurs only in the second
19019             # step
19020             ax_pthread_save_ac_link="$ac_link"
19021             ax_pthread_sed='s/conftest\.\$ac_ext/conftest.$ac_objext/g'
19022             ax_pthread_link_step=`printf "%s\n" "$ac_link" | sed "$ax_pthread_sed"`
19023             ax_pthread_2step_ac_link="($ac_compile) && (echo ==== >&5) && ($ax_pthread_link_step)"
19024             ax_pthread_save_CFLAGS="$CFLAGS"
19025             for ax_pthread_try in '' -Qunused-arguments -Wno-unused-command-line-argument unknown; do
19026                if test "x$ax_pthread_try" = "xunknown"
19027then :
19028  break
19029fi
19030                CFLAGS="-Werror -Wunknown-warning-option $ax_pthread_try -pthread $ax_pthread_save_CFLAGS"
19031                ac_link="$ax_pthread_save_ac_link"
19032                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19033/* end confdefs.h.  */
19034int main(void){return 0;}
19035_ACEOF
19036if ac_fn_c_try_link "$LINENO"
19037then :
19038  ac_link="$ax_pthread_2step_ac_link"
19039                     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19040/* end confdefs.h.  */
19041int main(void){return 0;}
19042_ACEOF
19043if ac_fn_c_try_link "$LINENO"
19044then :
19045  break
19046fi
19047rm -f core conftest.err conftest.$ac_objext conftest.beam \
19048    conftest$ac_exeext conftest.$ac_ext
19049
19050fi
19051rm -f core conftest.err conftest.$ac_objext conftest.beam \
19052    conftest$ac_exeext conftest.$ac_ext
19053             done
19054             ac_link="$ax_pthread_save_ac_link"
19055             CFLAGS="$ax_pthread_save_CFLAGS"
19056             if test "x$ax_pthread_try" = "x"
19057then :
19058  ax_pthread_try=no
19059fi
19060             ax_cv_PTHREAD_CLANG_NO_WARN_FLAG="$ax_pthread_try"
19061             ;;
19062esac
19063fi
19064{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" >&5
19065printf "%s\n" "$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" >&6; }
19066
19067        case "$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" in
19068                no | unknown) ;;
19069                *) PTHREAD_CFLAGS="$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG $PTHREAD_CFLAGS" ;;
19070        esac
19071
19072fi # $ax_pthread_clang = yes
19073
19074
19075
19076# Various other checks:
19077if test "x$ax_pthread_ok" = "xyes"; then
19078        ax_pthread_save_CFLAGS="$CFLAGS"
19079        ax_pthread_save_LIBS="$LIBS"
19080        CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
19081        LIBS="$PTHREAD_LIBS $LIBS"
19082
19083        # Detect AIX lossage: JOINABLE attribute is called UNDETACHED.
19084        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for joinable pthread attribute" >&5
19085printf %s "checking for joinable pthread attribute... " >&6; }
19086if test ${ax_cv_PTHREAD_JOINABLE_ATTR+y}
19087then :
19088  printf %s "(cached) " >&6
19089else case e in #(
19090  e) ax_cv_PTHREAD_JOINABLE_ATTR=unknown
19091             for ax_pthread_attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do
19092                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19093/* end confdefs.h.  */
19094#include <pthread.h>
19095int
19096main (void)
19097{
19098int attr = $ax_pthread_attr; return attr /* ; */
19099  ;
19100  return 0;
19101}
19102_ACEOF
19103if ac_fn_c_try_link "$LINENO"
19104then :
19105  ax_cv_PTHREAD_JOINABLE_ATTR=$ax_pthread_attr; break
19106fi
19107rm -f core conftest.err conftest.$ac_objext conftest.beam \
19108    conftest$ac_exeext conftest.$ac_ext
19109             done
19110             ;;
19111esac
19112fi
19113{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_JOINABLE_ATTR" >&5
19114printf "%s\n" "$ax_cv_PTHREAD_JOINABLE_ATTR" >&6; }
19115        if test "x$ax_cv_PTHREAD_JOINABLE_ATTR" != "xunknown" && \
19116               test "x$ax_cv_PTHREAD_JOINABLE_ATTR" != "xPTHREAD_CREATE_JOINABLE" && \
19117               test "x$ax_pthread_joinable_attr_defined" != "xyes"
19118then :
19119
19120printf "%s\n" "#define PTHREAD_CREATE_JOINABLE $ax_cv_PTHREAD_JOINABLE_ATTR" >>confdefs.h
19121
19122               ax_pthread_joinable_attr_defined=yes
19123
19124fi
19125
19126        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether more special flags are required for pthreads" >&5
19127printf %s "checking whether more special flags are required for pthreads... " >&6; }
19128if test ${ax_cv_PTHREAD_SPECIAL_FLAGS+y}
19129then :
19130  printf %s "(cached) " >&6
19131else case e in #(
19132  e) ax_cv_PTHREAD_SPECIAL_FLAGS=no
19133             case $host_os in
19134             solaris*)
19135             ax_cv_PTHREAD_SPECIAL_FLAGS="-D_POSIX_PTHREAD_SEMANTICS"
19136             ;;
19137             esac
19138             ;;
19139esac
19140fi
19141{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_SPECIAL_FLAGS" >&5
19142printf "%s\n" "$ax_cv_PTHREAD_SPECIAL_FLAGS" >&6; }
19143        if test "x$ax_cv_PTHREAD_SPECIAL_FLAGS" != "xno" && \
19144               test "x$ax_pthread_special_flags_added" != "xyes"
19145then :
19146  PTHREAD_CFLAGS="$ax_cv_PTHREAD_SPECIAL_FLAGS $PTHREAD_CFLAGS"
19147               ax_pthread_special_flags_added=yes
19148fi
19149
19150        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for PTHREAD_PRIO_INHERIT" >&5
19151printf %s "checking for PTHREAD_PRIO_INHERIT... " >&6; }
19152if test ${ax_cv_PTHREAD_PRIO_INHERIT+y}
19153then :
19154  printf %s "(cached) " >&6
19155else case e in #(
19156  e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19157/* end confdefs.h.  */
19158#include <pthread.h>
19159int
19160main (void)
19161{
19162int i = PTHREAD_PRIO_INHERIT;
19163                                               return i;
19164  ;
19165  return 0;
19166}
19167_ACEOF
19168if ac_fn_c_try_link "$LINENO"
19169then :
19170  ax_cv_PTHREAD_PRIO_INHERIT=yes
19171else case e in #(
19172  e) ax_cv_PTHREAD_PRIO_INHERIT=no ;;
19173esac
19174fi
19175rm -f core conftest.err conftest.$ac_objext conftest.beam \
19176    conftest$ac_exeext conftest.$ac_ext
19177             ;;
19178esac
19179fi
19180{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_PRIO_INHERIT" >&5
19181printf "%s\n" "$ax_cv_PTHREAD_PRIO_INHERIT" >&6; }
19182        if test "x$ax_cv_PTHREAD_PRIO_INHERIT" = "xyes" && \
19183               test "x$ax_pthread_prio_inherit_defined" != "xyes"
19184then :
19185
19186printf "%s\n" "#define HAVE_PTHREAD_PRIO_INHERIT 1" >>confdefs.h
19187
19188               ax_pthread_prio_inherit_defined=yes
19189
19190fi
19191
19192        CFLAGS="$ax_pthread_save_CFLAGS"
19193        LIBS="$ax_pthread_save_LIBS"
19194
19195        # More AIX lossage: compile with *_r variant
19196        if test "x$GCC" != "xyes"; then
19197            case $host_os in
19198                aix*)
19199                case "x/$CC" in #(
19200  x*/c89|x*/c89_128|x*/c99|x*/c99_128|x*/cc|x*/cc128|x*/xlc|x*/xlc_v6|x*/xlc128|x*/xlc128_v6) :
19201    #handle absolute path differently from PATH based program lookup
19202                     case "x$CC" in #(
19203  x/*) :
19204
19205			   if as_fn_executable_p ${CC}_r
19206then :
19207  PTHREAD_CC="${CC}_r"
19208fi
19209			   if test "x${CXX}" != "x"
19210then :
19211  if as_fn_executable_p ${CXX}_r
19212then :
19213  PTHREAD_CXX="${CXX}_r"
19214fi
19215fi
19216			  ;; #(
19217  *) :
19218
19219			   for ac_prog in ${CC}_r
19220do
19221  # Extract the first word of "$ac_prog", so it can be a program name with args.
19222set dummy $ac_prog; ac_word=$2
19223{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19224printf %s "checking for $ac_word... " >&6; }
19225if test ${ac_cv_prog_PTHREAD_CC+y}
19226then :
19227  printf %s "(cached) " >&6
19228else case e in #(
19229  e) if test -n "$PTHREAD_CC"; then
19230  ac_cv_prog_PTHREAD_CC="$PTHREAD_CC" # Let the user override the test.
19231else
19232as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19233for as_dir in $PATH
19234do
19235  IFS=$as_save_IFS
19236  case $as_dir in #(((
19237    '') as_dir=./ ;;
19238    */) ;;
19239    *) as_dir=$as_dir/ ;;
19240  esac
19241    for ac_exec_ext in '' $ac_executable_extensions; do
19242  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
19243    ac_cv_prog_PTHREAD_CC="$ac_prog"
19244    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
19245    break 2
19246  fi
19247done
19248  done
19249IFS=$as_save_IFS
19250
19251fi ;;
19252esac
19253fi
19254PTHREAD_CC=$ac_cv_prog_PTHREAD_CC
19255if test -n "$PTHREAD_CC"; then
19256  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PTHREAD_CC" >&5
19257printf "%s\n" "$PTHREAD_CC" >&6; }
19258else
19259  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
19260printf "%s\n" "no" >&6; }
19261fi
19262
19263
19264  test -n "$PTHREAD_CC" && break
19265done
19266test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
19267
19268			   if test "x${CXX}" != "x"
19269then :
19270  for ac_prog in ${CXX}_r
19271do
19272  # Extract the first word of "$ac_prog", so it can be a program name with args.
19273set dummy $ac_prog; ac_word=$2
19274{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19275printf %s "checking for $ac_word... " >&6; }
19276if test ${ac_cv_prog_PTHREAD_CXX+y}
19277then :
19278  printf %s "(cached) " >&6
19279else case e in #(
19280  e) if test -n "$PTHREAD_CXX"; then
19281  ac_cv_prog_PTHREAD_CXX="$PTHREAD_CXX" # Let the user override the test.
19282else
19283as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19284for as_dir in $PATH
19285do
19286  IFS=$as_save_IFS
19287  case $as_dir in #(((
19288    '') as_dir=./ ;;
19289    */) ;;
19290    *) as_dir=$as_dir/ ;;
19291  esac
19292    for ac_exec_ext in '' $ac_executable_extensions; do
19293  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
19294    ac_cv_prog_PTHREAD_CXX="$ac_prog"
19295    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
19296    break 2
19297  fi
19298done
19299  done
19300IFS=$as_save_IFS
19301
19302fi ;;
19303esac
19304fi
19305PTHREAD_CXX=$ac_cv_prog_PTHREAD_CXX
19306if test -n "$PTHREAD_CXX"; then
19307  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PTHREAD_CXX" >&5
19308printf "%s\n" "$PTHREAD_CXX" >&6; }
19309else
19310  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
19311printf "%s\n" "no" >&6; }
19312fi
19313
19314
19315  test -n "$PTHREAD_CXX" && break
19316done
19317test -n "$PTHREAD_CXX" || PTHREAD_CXX="$CXX"
19318
19319fi
19320
19321                      ;;
19322esac
19323                     ;; #(
19324  *) :
19325     ;;
19326esac
19327                ;;
19328            esac
19329        fi
19330fi
19331
19332test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
19333test -n "$PTHREAD_CXX" || PTHREAD_CXX="$CXX"
19334
19335
19336
19337
19338
19339
19340# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
19341if test "x$ax_pthread_ok" = "xyes"; then
19342
19343
19344printf "%s\n" "#define HAVE_PTHREAD 1" >>confdefs.h
19345
19346		if test -n "$PTHREAD_LIBS"; then
19347		  LIBS="$PTHREAD_LIBS $LIBS"
19348		fi
19349		CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
19350		CC="$PTHREAD_CC"
19351		ub_have_pthreads=yes
19352		ac_fn_c_check_type "$LINENO" "pthread_spinlock_t" "ac_cv_type_pthread_spinlock_t" "#include <pthread.h>
19353"
19354if test "x$ac_cv_type_pthread_spinlock_t" = xyes
19355then :
19356
19357printf "%s\n" "#define HAVE_PTHREAD_SPINLOCK_T 1" >>confdefs.h
19358
19359
19360fi
19361ac_fn_c_check_type "$LINENO" "pthread_rwlock_t" "ac_cv_type_pthread_rwlock_t" "#include <pthread.h>
19362"
19363if test "x$ac_cv_type_pthread_rwlock_t" = xyes
19364then :
19365
19366printf "%s\n" "#define HAVE_PTHREAD_RWLOCK_T 1" >>confdefs.h
19367
19368
19369fi
19370
19371		# The cast to long int works around a bug in the HP C Compiler
19372# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
19373# declarations like 'int a3[[(sizeof (unsigned char)) >= 0]];'.
19374# This bug is HP SR number 8606223364.
19375{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of unsigned long" >&5
19376printf %s "checking size of unsigned long... " >&6; }
19377if test ${ac_cv_sizeof_unsigned_long+y}
19378then :
19379  printf %s "(cached) " >&6
19380else case e in #(
19381  e) if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned long))" "ac_cv_sizeof_unsigned_long"        "$ac_includes_default"
19382then :
19383
19384else case e in #(
19385  e) if test "$ac_cv_type_unsigned_long" = yes; then
19386     { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
19387printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
19388as_fn_error 77 "cannot compute sizeof (unsigned long)
19389See 'config.log' for more details" "$LINENO" 5; }
19390   else
19391     ac_cv_sizeof_unsigned_long=0
19392   fi ;;
19393esac
19394fi
19395 ;;
19396esac
19397fi
19398{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned_long" >&5
19399printf "%s\n" "$ac_cv_sizeof_unsigned_long" >&6; }
19400
19401
19402
19403printf "%s\n" "#define SIZEOF_UNSIGNED_LONG $ac_cv_sizeof_unsigned_long" >>confdefs.h
19404
19405
19406		# The cast to long int works around a bug in the HP C Compiler
19407# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
19408# declarations like 'int a3[[(sizeof (unsigned char)) >= 0]];'.
19409# This bug is HP SR number 8606223364.
19410{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
19411printf %s "checking size of pthread_t... " >&6; }
19412if test ${ac_cv_sizeof_pthread_t+y}
19413then :
19414  printf %s "(cached) " >&6
19415else case e in #(
19416  e) if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t"        "$ac_includes_default"
19417then :
19418
19419else case e in #(
19420  e) if test "$ac_cv_type_pthread_t" = yes; then
19421     { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
19422printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
19423as_fn_error 77 "cannot compute sizeof (pthread_t)
19424See 'config.log' for more details" "$LINENO" 5; }
19425   else
19426     ac_cv_sizeof_pthread_t=0
19427   fi ;;
19428esac
19429fi
19430 ;;
19431esac
19432fi
19433{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
19434printf "%s\n" "$ac_cv_sizeof_pthread_t" >&6; }
19435
19436
19437
19438printf "%s\n" "#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t" >>confdefs.h
19439
19440
19441
19442		if echo "$CFLAGS" | $GREP -e "-pthread" >/dev/null; then
19443		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if -pthread unused during linking" >&5
19444printf %s "checking if -pthread unused during linking... " >&6; }
19445		# catch clang warning 'argument unused during compilation'
19446		cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19447/* end confdefs.h.  */
19448$ac_includes_default
19449
19450int main(void) {return 0;}
19451
19452_ACEOF
19453		pthread_unused="yes"
19454		# first compile
19455		echo "$CC $CFLAGS -c conftest.c -o conftest.o" >&5
19456		$CC $CFLAGS -c conftest.c -o conftest.o 2>&5 >&5
19457		if test $? = 0; then
19458			# then link
19459			echo "$CC $CFLAGS -Werror $LDFLAGS $LIBS -o conftest contest.o" >&5
19460			$CC $CFLAGS -Werror $LDFLAGS $LIBS -o conftest conftest.o 2>&5 >&5
19461			if test $? -ne 0; then
19462				{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19463printf "%s\n" "yes" >&6; }
19464				CFLAGS=`echo "$CFLAGS" | sed -e 's/-pthread//'`
19465				PTHREAD_CFLAGS_ONLY="-pthread"
19466
19467			else
19468				{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
19469printf "%s\n" "no" >&6; }
19470			fi
19471		else
19472			{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
19473printf "%s\n" "no" >&6; }
19474		fi # endif cc successful
19475		rm -f conftest conftest.c conftest.o
19476		fi # endif -pthread in CFLAGS
19477
19478
19479        :
19480else
19481        ax_pthread_ok=no
19482
19483fi
19484ac_ext=c
19485ac_cpp='$CPP $CPPFLAGS'
19486ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
19487ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
19488ac_compiler_gnu=$ac_cv_c_compiler_gnu
19489
19490
19491fi
19492
19493# check solaris thread library
19494
19495# Check whether --with-solaris-threads was given.
19496if test ${with_solaris_threads+y}
19497then :
19498  withval=$with_solaris_threads;
19499else case e in #(
19500  e)  withval="no"  ;;
19501esac
19502fi
19503
19504ub_have_sol_threads=no
19505if test x_$withval != x_no; then
19506	if test x_$ub_have_pthreads != x_no; then
19507	    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Have pthreads already, ignoring --with-solaris-threads" >&5
19508printf "%s\n" "$as_me: WARNING: Have pthreads already, ignoring --with-solaris-threads" >&2;}
19509	else
19510	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing thr_create" >&5
19511printf %s "checking for library containing thr_create... " >&6; }
19512if test ${ac_cv_search_thr_create+y}
19513then :
19514  printf %s "(cached) " >&6
19515else case e in #(
19516  e) ac_func_search_save_LIBS=$LIBS
19517cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19518/* end confdefs.h.  */
19519
19520/* Override any GCC internal prototype to avoid an error.
19521   Use char because int might match the return type of a GCC
19522   builtin and then its argument prototype would still apply.
19523   The 'extern "C"' is for builds by C++ compilers;
19524   although this is not generally supported in C code supporting it here
19525   has little cost and some practical benefit (sr 110532).  */
19526#ifdef __cplusplus
19527extern "C"
19528#endif
19529char thr_create (void);
19530int
19531main (void)
19532{
19533return thr_create ();
19534  ;
19535  return 0;
19536}
19537_ACEOF
19538for ac_lib in '' thread
19539do
19540  if test -z "$ac_lib"; then
19541    ac_res="none required"
19542  else
19543    ac_res=-l$ac_lib
19544    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
19545  fi
19546  if ac_fn_c_try_link "$LINENO"
19547then :
19548  ac_cv_search_thr_create=$ac_res
19549fi
19550rm -f core conftest.err conftest.$ac_objext conftest.beam \
19551    conftest$ac_exeext
19552  if test ${ac_cv_search_thr_create+y}
19553then :
19554  break
19555fi
19556done
19557if test ${ac_cv_search_thr_create+y}
19558then :
19559
19560else case e in #(
19561  e) ac_cv_search_thr_create=no ;;
19562esac
19563fi
19564rm conftest.$ac_ext
19565LIBS=$ac_func_search_save_LIBS ;;
19566esac
19567fi
19568{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_thr_create" >&5
19569printf "%s\n" "$ac_cv_search_thr_create" >&6; }
19570ac_res=$ac_cv_search_thr_create
19571if test "$ac_res" != no
19572then :
19573  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
19574
19575
19576printf "%s\n" "#define HAVE_SOLARIS_THREADS 1" >>confdefs.h
19577
19578
19579
19580
19581{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -mt" >&5
19582printf %s "checking whether $CC supports -mt... " >&6; }
19583cache=`echo mt | sed 'y%.=/+-%___p_%'`
19584if eval test \${cv_prog_cc_flag_$cache+y}
19585then :
19586  printf %s "(cached) " >&6
19587else case e in #(
19588  e)
19589echo 'void f(void){}' >conftest.c
19590if test -z "`$CC $CPPFLAGS $CFLAGS -mt -c conftest.c 2>&1`"; then
19591eval "cv_prog_cc_flag_$cache=yes"
19592else
19593eval "cv_prog_cc_flag_$cache=no"
19594fi
19595rm -f conftest conftest.o conftest.c
19596 ;;
19597esac
19598fi
19599
19600if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
19601{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19602printf "%s\n" "yes" >&6; }
19603:
19604CFLAGS="$CFLAGS -mt"
19605else
19606{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
19607printf "%s\n" "no" >&6; }
19608:
19609CFLAGS="$CFLAGS -D_REENTRANT"
19610fi
19611
19612		ub_have_sol_threads=yes
19613
19614else case e in #(
19615  e)
19616		as_fn_error $? "no solaris threads found." "$LINENO" 5
19617	 ;;
19618esac
19619fi
19620
19621	fi
19622fi
19623
19624fi # end of non-mingw check of thread libraries
19625
19626# Check for SYSLOG_FACILITY
19627
19628# Check whether --with-syslog-facility was given.
19629if test ${with_syslog_facility+y}
19630then :
19631  withval=$with_syslog_facility;  UNBOUND_SYSLOG_FACILITY="$withval"
19632fi
19633
19634case "${UNBOUND_SYSLOG_FACILITY}" in
19635
19636  LOCAL[0-7]) UNBOUND_SYSLOG_FACILITY="LOG_${UNBOUND_SYSLOG_FACILITY}" ;;
19637
19638           *) UNBOUND_SYSLOG_FACILITY="LOG_DAEMON" ;;
19639
19640esac
19641
19642printf "%s\n" "#define UB_SYSLOG_FACILITY ${UNBOUND_SYSLOG_FACILITY}" >>confdefs.h
19643
19644
19645# Check for dynamic library module
19646
19647# Check whether --with-dynlibmodule was given.
19648if test ${with_dynlibmodule+y}
19649then :
19650  withval=$with_dynlibmodule;
19651else case e in #(
19652  e)  withval="no"  ;;
19653esac
19654fi
19655
19656
19657if test x_$withval != x_no; then
19658
19659printf "%s\n" "#define WITH_DYNLIBMODULE 1" >>confdefs.h
19660
19661  WITH_DYNLIBMODULE=yes
19662
19663  DYNLIBMOD_OBJ="dynlibmod.lo"
19664
19665  DYNLIBMOD_HEADER='$(srcdir)/dynlibmod/dynlibmod.h'
19666
19667  if test $on_mingw = "no"; then
19668    # link with -ldl if not already there, for all executables because
19669    # dlopen call is in the dynlib module.  For unbound executable, also
19670    # export symbols.
19671    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
19672printf %s "checking for library containing dlopen... " >&6; }
19673if test ${ac_cv_search_dlopen+y}
19674then :
19675  printf %s "(cached) " >&6
19676else case e in #(
19677  e) ac_func_search_save_LIBS=$LIBS
19678cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19679/* end confdefs.h.  */
19680
19681/* Override any GCC internal prototype to avoid an error.
19682   Use char because int might match the return type of a GCC
19683   builtin and then its argument prototype would still apply.
19684   The 'extern "C"' is for builds by C++ compilers;
19685   although this is not generally supported in C code supporting it here
19686   has little cost and some practical benefit (sr 110532).  */
19687#ifdef __cplusplus
19688extern "C"
19689#endif
19690char dlopen (void);
19691int
19692main (void)
19693{
19694return dlopen ();
19695  ;
19696  return 0;
19697}
19698_ACEOF
19699for ac_lib in '' dl
19700do
19701  if test -z "$ac_lib"; then
19702    ac_res="none required"
19703  else
19704    ac_res=-l$ac_lib
19705    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
19706  fi
19707  if ac_fn_c_try_link "$LINENO"
19708then :
19709  ac_cv_search_dlopen=$ac_res
19710fi
19711rm -f core conftest.err conftest.$ac_objext conftest.beam \
19712    conftest$ac_exeext
19713  if test ${ac_cv_search_dlopen+y}
19714then :
19715  break
19716fi
19717done
19718if test ${ac_cv_search_dlopen+y}
19719then :
19720
19721else case e in #(
19722  e) ac_cv_search_dlopen=no ;;
19723esac
19724fi
19725rm conftest.$ac_ext
19726LIBS=$ac_func_search_save_LIBS ;;
19727esac
19728fi
19729{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
19730printf "%s\n" "$ac_cv_search_dlopen" >&6; }
19731ac_res=$ac_cv_search_dlopen
19732if test "$ac_res" != no
19733then :
19734  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
19735
19736fi
19737
19738    DYNLIBMOD_EXTRALIBS="-export-dynamic"
19739  else
19740    DYNLIBMOD_EXTRALIBS="-Wl,--export-all-symbols,--out-implib,libunbound.dll.a"
19741  fi
19742
19743fi
19744
19745# Check for PyUnbound
19746
19747# Check whether --with-pyunbound was given.
19748if test ${with_pyunbound+y}
19749then :
19750  withval=$with_pyunbound;
19751else case e in #(
19752  e)  withval="no"  ;;
19753esac
19754fi
19755
19756
19757ub_test_python=no
19758ub_with_pyunbound=no
19759if test x_$withval != x_no; then
19760   ub_with_pyunbound=yes
19761   ub_test_python=yes
19762fi
19763
19764# Check for Python module
19765
19766# Check whether --with-pythonmodule was given.
19767if test ${with_pythonmodule+y}
19768then :
19769  withval=$with_pythonmodule;
19770else case e in #(
19771  e)  withval="no"  ;;
19772esac
19773fi
19774
19775
19776ub_with_pythonmod=no
19777if test x_$withval != x_no; then
19778   ub_with_pythonmod=yes
19779   ub_test_python=yes
19780fi
19781
19782# Check for Python & SWIG only on PyUnbound or PyModule
19783if test x_$ub_test_python != x_no; then
19784
19785   # Check for Python
19786   ub_have_python=no
19787   ac_save_LIBS="$LIBS"
19788        #
19789        # Allow the use of a (user set) custom python version
19790        #
19791
19792
19793        # Extract the first word of "python[$PYTHON_VERSION]", so it can be a program name with args.
19794set dummy python$PYTHON_VERSION; ac_word=$2
19795{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19796printf %s "checking for $ac_word... " >&6; }
19797if test ${ac_cv_path_PYTHON+y}
19798then :
19799  printf %s "(cached) " >&6
19800else case e in #(
19801  e) case $PYTHON in
19802  [\\/]* | ?:[\\/]*)
19803  ac_cv_path_PYTHON="$PYTHON" # Let the user override the test with a path.
19804  ;;
19805  *)
19806  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19807for as_dir in $PATH
19808do
19809  IFS=$as_save_IFS
19810  case $as_dir in #(((
19811    '') as_dir=./ ;;
19812    */) ;;
19813    *) as_dir=$as_dir/ ;;
19814  esac
19815    for ac_exec_ext in '' $ac_executable_extensions; do
19816  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
19817    ac_cv_path_PYTHON="$as_dir$ac_word$ac_exec_ext"
19818    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
19819    break 2
19820  fi
19821done
19822  done
19823IFS=$as_save_IFS
19824
19825  ;;
19826esac ;;
19827esac
19828fi
19829PYTHON=$ac_cv_path_PYTHON
19830if test -n "$PYTHON"; then
19831  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5
19832printf "%s\n" "$PYTHON" >&6; }
19833else
19834  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
19835printf "%s\n" "no" >&6; }
19836fi
19837
19838
19839        if test -z "$PYTHON"; then
19840           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
19841           PYTHON_VERSION=""
19842        fi
19843
19844        if test -z "$PYTHON_VERSION"; then
19845		PYTHON_VERSION=`$PYTHON -c "import sys; \
19846			print(sys.version.split()[0])"`
19847	fi
19848	# calculate the version number components.
19849
19850	v="$PYTHON_VERSION"
19851	PYTHON_VERSION_MAJOR=`echo $v | sed 's/[^0-9].*//'`
19852	if test -z "$PYTHON_VERSION_MAJOR"; then PYTHON_VERSION_MAJOR="0"; fi
19853	v=`echo $v | sed -e 's/^[0-9]*$//' -e 's/[0-9]*[^0-9]//'`
19854	PYTHON_VERSION_MINOR=`echo $v | sed 's/[^0-9].*//'`
19855	if test -z "$PYTHON_VERSION_MINOR"; then PYTHON_VERSION_MINOR="0"; fi
19856	v=`echo $v | sed -e 's/^[0-9]*$//' -e 's/[0-9]*[^0-9]//'`
19857	PYTHON_VERSION_PATCH=`echo $v | sed 's/[^0-9].*//'`
19858	if test -z "$PYTHON_VERSION_PATCH"; then PYTHON_VERSION_PATCH="0"; fi
19859
19860
19861	# For some systems, sysconfig exists, but has the wrong paths,
19862	# on Debian 10, for python 2.7 and 3.7. So, we check the version,
19863	# and for older versions try distutils.sysconfig first. For newer
19864	# versions>=3.10, where distutils.sysconfig is deprecated, use
19865	# sysconfig first and then attempt the other one.
19866	py_distutils_first="no"
19867	if test $PYTHON_VERSION_MAJOR -lt 3; then
19868		py_distutils_first="yes"
19869	fi
19870	if test $PYTHON_VERSION_MAJOR -eq 3 -a $PYTHON_VERSION_MINOR -lt 10; then
19871		py_distutils_first="yes"
19872	fi
19873
19874	# Check if you have the first module
19875	if test "$py_distutils_first" = "yes"; then m="distutils"; else m="sysconfig"; fi
19876	sysconfig_module=""
19877	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for the $m Python module" >&5
19878printf %s "checking for the $m Python module... " >&6; }
19879        if ac_modulecheck_result1=`$PYTHON -c "import $m" 2>&1`; then
19880                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19881printf "%s\n" "yes" >&6; }
19882		sysconfig_module="$m"
19883	else
19884                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
19885printf "%s\n" "no" >&6; }
19886	fi
19887
19888	# if not found, try the other one.
19889	if test -z "$sysconfig_module"; then
19890		if test "$py_distutils_first" = "yes"; then m2="sysconfig"; else m2="distutils"; fi
19891		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for the $m2 Python module" >&5
19892printf %s "checking for the $m2 Python module... " >&6; }
19893		if ac_modulecheck_result2=`$PYTHON -c "import $m2" 2>&1`; then
19894			{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19895printf "%s\n" "yes" >&6; }
19896			sysconfig_module="$m2"
19897		else
19898			{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
19899printf "%s\n" "no" >&6; }
19900			as_fn_error $? "cannot import Python module \"$m\", or \"$m2\".
19901	Please check your Python installation. The errors are:
19902	$m
19903	$ac_modulecheck_result1
19904	$m2
19905	$ac_modulecheck_result2" "$LINENO" 5
19906			PYTHON_VERSION=""
19907		fi
19908	fi
19909	if test "$sysconfig_module" = "distutils"; then sysconfig_module="distutils.sysconfig"; fi
19910
19911        #
19912        # Check for Python include path
19913        #
19914        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Python include path" >&5
19915printf %s "checking for Python include path... " >&6; }
19916        if test -z "$PYTHON_CPPFLAGS"; then
19917		if test "$sysconfig_module" = "sysconfig"; then
19918			python_path=`$PYTHON -c 'import sysconfig; \
19919				print(sysconfig.get_path("include"));'`
19920		else
19921			python_path=`$PYTHON -c "import distutils.sysconfig; \
19922				print(distutils.sysconfig.get_python_inc());"`
19923		fi
19924                if test -n "${python_path}"; then
19925                        python_path="-I$python_path"
19926                fi
19927                PYTHON_CPPFLAGS=$python_path
19928        fi
19929        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PYTHON_CPPFLAGS" >&5
19930printf "%s\n" "$PYTHON_CPPFLAGS" >&6; }
19931
19932
19933        #
19934        # Check for Python library path
19935        #
19936        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Python library path" >&5
19937printf %s "checking for Python library path... " >&6; }
19938        if test -z "$PYTHON_LDFLAGS"; then
19939                PYTHON_LDFLAGS=`$PYTHON -c "from $sysconfig_module import *; \
19940                        print('-L'+get_config_var('LIBDIR')+' -L'+get_config_var('LIBDEST')+' '+get_config_var('BLDLIBRARY'));"`
19941        fi
19942        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PYTHON_LDFLAGS" >&5
19943printf "%s\n" "$PYTHON_LDFLAGS" >&6; }
19944
19945
19946        if test -z "$PYTHON_LIBDIR"; then
19947                PYTHON_LIBDIR=`$PYTHON -c "from $sysconfig_module import *; \
19948                        print(get_config_var('LIBDIR'));"`
19949        fi
19950
19951        #
19952        # Check for site packages
19953        #
19954        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Python site-packages path" >&5
19955printf %s "checking for Python site-packages path... " >&6; }
19956        if test -z "$PYTHON_SITE_PKG"; then
19957		if test "$sysconfig_module" = "sysconfig"; then
19958			PYTHON_SITE_PKG=`$PYTHON -c 'import sysconfig; \
19959				print(sysconfig.get_path("platlib"));'`
19960		else
19961			PYTHON_SITE_PKG=`$PYTHON -c "import distutils.sysconfig; \
19962				print(distutils.sysconfig.get_python_lib(1,0));"`
19963		fi
19964        fi
19965        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PYTHON_SITE_PKG" >&5
19966printf "%s\n" "$PYTHON_SITE_PKG" >&6; }
19967
19968
19969        #
19970        # final check to see if everything compiles alright
19971        #
19972        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking consistency of all components of python development environment" >&5
19973printf %s "checking consistency of all components of python development environment... " >&6; }
19974        ac_ext=c
19975ac_cpp='$CPP $CPPFLAGS'
19976ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
19977ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
19978ac_compiler_gnu=$ac_cv_c_compiler_gnu
19979
19980        # save current global flags
19981        ac_save_LIBS="$LIBS"
19982        ac_save_CPPFLAGS="$CPPFLAGS"
19983
19984        LIBS="$LIBS $PYTHON_LDFLAGS"
19985        CPPFLAGS="$CPPFLAGS $PYTHON_CPPFLAGS"
19986        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19987/* end confdefs.h.  */
19988
19989                #include <Python.h>
19990
19991int
19992main (void)
19993{
19994
19995                Py_Initialize();
19996
19997  ;
19998  return 0;
19999}
20000_ACEOF
20001if ac_fn_c_try_link "$LINENO"
20002then :
20003  pythonexists=yes
20004else case e in #(
20005  e) pythonexists=no ;;
20006esac
20007fi
20008rm -f core conftest.err conftest.$ac_objext conftest.beam \
20009    conftest$ac_exeext conftest.$ac_ext
20010
20011        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $pythonexists" >&5
20012printf "%s\n" "$pythonexists" >&6; }
20013
20014        if test ! "$pythonexists" = "yes"; then
20015           as_fn_error $? "
20016  Could not link test program to Python. Maybe the main Python library has been
20017  installed in some non-standard library path. If so, pass it to configure,
20018  via the LDFLAGS environment variable.
20019  Example: ./configure LDFLAGS=\"-L/usr/non-standard-path/python/lib\"
20020  ============================================================================
20021   ERROR!
20022   You probably have to install the development version of the Python package
20023   for your distribution.  The exact name of this package varies among them.
20024  ============================================================================
20025           " "$LINENO" 5
20026          PYTHON_VERSION=""
20027        fi
20028        ac_ext=c
20029ac_cpp='$CPP $CPPFLAGS'
20030ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20031ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20032ac_compiler_gnu=$ac_cv_c_compiler_gnu
20033
20034        # turn back to default flags
20035        CPPFLAGS="$ac_save_CPPFLAGS"
20036        LIBS="$ac_save_LIBS"
20037
20038        #
20039        # all done!
20040        #
20041
20042   if test ! -z "$PYTHON_VERSION"; then
20043	badversion="no"
20044	if test "$PYTHON_VERSION_MAJOR" -lt 2; then
20045		badversion="yes"
20046	fi
20047	if test "$PYTHON_VERSION_MAJOR" -eq 2 -a "$PYTHON_VERSION_MINOR" -lt 4; then
20048		badversion="yes"
20049	fi
20050	if test "$badversion" = "yes"; then
20051		as_fn_error $? "Python version >= 2.4.0 is required" "$LINENO" 5
20052	fi
20053
20054      PY_MAJOR_VERSION="`$PYTHON -c \"import sys; print(sys.version_info[0])\"`"
20055
20056      # Have Python
20057
20058printf "%s\n" "#define HAVE_PYTHON 1" >>confdefs.h
20059
20060      if test x_$ub_with_pythonmod != x_no; then
20061        if test -n "$LIBS"; then
20062          LIBS="$PYTHON_LDFLAGS $LIBS"
20063        else
20064          LIBS="$PYTHON_LDFLAGS"
20065        fi
20066      fi
20067      PYTHON_LIBS="$PYTHON_LDFLAGS"
20068
20069      if test -n "$CPPFLAGS"; then
20070        CPPFLAGS="$CPPFLAGS $PYTHON_CPPFLAGS"
20071      else
20072        CPPFLAGS="$PYTHON_CPPFLAGS"
20073      fi
20074      if test "$PYTHON_LIBDIR" != "/usr/lib" -a "$PYTHON_LIBDIR" != "" -a "$PYTHON_LIBDIR" != "/usr/lib64"; then
20075
20076	if test "x$enable_rpath" = xyes; then
20077		if echo "$PYTHON_LIBDIR" | grep "^/" >/dev/null; then
20078			RUNTIME_PATH="$RUNTIME_PATH -R$PYTHON_LIBDIR"
20079		fi
20080	fi
20081
20082      fi
20083      ub_have_python=yes
20084      if test -n "$PKG_CONFIG" && \
20085    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\"python\${PY_MAJOR_VERSION}\"\""; } >&5
20086  ($PKG_CONFIG --exists --print-errors ""python${PY_MAJOR_VERSION}"") 2>&5
20087  ac_status=$?
20088  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20089  test $ac_status = 0; }; then
20090  PC_PY_DEPENDENCY="python${PY_MAJOR_VERSION}"
20091else
20092  PC_PY_DEPENDENCY="python"
20093fi
20094
20095
20096      # Check for SWIG
20097      ub_have_swig=no
20098      # Check whether --enable-swig-version-check was given.
20099if test ${enable_swig_version_check+y}
20100then :
20101  enableval=$enable_swig_version_check;
20102fi
20103
20104      if test "$enable_swig_version_check" = "yes"; then
20105
20106        # Find path to the "swig" executable.
20107        for ac_prog in swig swig3.0 swig2.0
20108do
20109  # Extract the first word of "$ac_prog", so it can be a program name with args.
20110set dummy $ac_prog; ac_word=$2
20111{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20112printf %s "checking for $ac_word... " >&6; }
20113if test ${ac_cv_path_SWIG+y}
20114then :
20115  printf %s "(cached) " >&6
20116else case e in #(
20117  e) case $SWIG in
20118  [\\/]* | ?:[\\/]*)
20119  ac_cv_path_SWIG="$SWIG" # Let the user override the test with a path.
20120  ;;
20121  *)
20122  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20123for as_dir in $PATH
20124do
20125  IFS=$as_save_IFS
20126  case $as_dir in #(((
20127    '') as_dir=./ ;;
20128    */) ;;
20129    *) as_dir=$as_dir/ ;;
20130  esac
20131    for ac_exec_ext in '' $ac_executable_extensions; do
20132  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
20133    ac_cv_path_SWIG="$as_dir$ac_word$ac_exec_ext"
20134    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
20135    break 2
20136  fi
20137done
20138  done
20139IFS=$as_save_IFS
20140
20141  ;;
20142esac ;;
20143esac
20144fi
20145SWIG=$ac_cv_path_SWIG
20146if test -n "$SWIG"; then
20147  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $SWIG" >&5
20148printf "%s\n" "$SWIG" >&6; }
20149else
20150  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
20151printf "%s\n" "no" >&6; }
20152fi
20153
20154
20155  test -n "$SWIG" && break
20156done
20157
20158        if test -z "$SWIG" ; then
20159                :
20160        elif test -z "2.0.1" ; then
20161                :
20162	else
20163                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking SWIG version" >&5
20164printf %s "checking SWIG version... " >&6; }
20165                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'`
20166                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $swig_version" >&5
20167printf "%s\n" "$swig_version" >&6; }
20168                if test -n "$swig_version" ; then
20169                        # Calculate the required version number components
20170                        required=2.0.1
20171                        required_major=`echo $required | sed 's/[^0-9].*//'`
20172                        if test -z "$required_major" ; then
20173                                required_major=0
20174                        fi
20175                        required=`echo $required. | sed 's/[0-9]*[^0-9]//'`
20176                        required_minor=`echo $required | sed 's/[^0-9].*//'`
20177                        if test -z "$required_minor" ; then
20178                                required_minor=0
20179                        fi
20180                        required=`echo $required. | sed 's/[0-9]*[^0-9]//'`
20181                        required_patch=`echo $required | sed 's/[^0-9].*//'`
20182                        if test -z "$required_patch" ; then
20183                                required_patch=0
20184                        fi
20185                        # Calculate the available version number components
20186                        available=$swig_version
20187                        available_major=`echo $available | sed 's/[^0-9].*//'`
20188                        if test -z "$available_major" ; then
20189                                available_major=0
20190                        fi
20191                        available=`echo $available | sed 's/[0-9]*[^0-9]//'`
20192                        available_minor=`echo $available | sed 's/[^0-9].*//'`
20193                        if test -z "$available_minor" ; then
20194                                available_minor=0
20195                        fi
20196                        available=`echo $available | sed 's/[0-9]*[^0-9]//'`
20197                        available_patch=`echo $available | sed 's/[^0-9].*//'`
20198                        if test -z "$available_patch" ; then
20199                                available_patch=0
20200                        fi
20201                        # Convert the version tuple into a single number for easier comparison.
20202                        # Using base 100 should be safe since SWIG internally uses BCD values
20203                        # to encode its version number.
20204                        required_swig_vernum=`expr $required_major \* 10000 \
20205                            \+ $required_minor \* 100 \+ $required_patch`
20206                        available_swig_vernum=`expr $available_major \* 10000 \
20207                            \+ $available_minor \* 100 \+ $available_patch`
20208
20209                        if test $available_swig_vernum -lt $required_swig_vernum; then
20210                                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: SWIG version >= 2.0.1 is required.  You have $swig_version." >&5
20211printf "%s\n" "$as_me: WARNING: SWIG version >= 2.0.1 is required.  You have $swig_version." >&2;}
20212                                SWIG=''
20213
20214                        else
20215                                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for SWIG library" >&5
20216printf %s "checking for SWIG library... " >&6; }
20217                                SWIG_LIB=`$SWIG -swiglib | tr '\r\n' '  '`
20218                                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $SWIG_LIB" >&5
20219printf "%s\n" "$SWIG_LIB" >&6; }
20220
20221                        fi
20222                else
20223                        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cannot determine SWIG version" >&5
20224printf "%s\n" "$as_me: WARNING: cannot determine SWIG version" >&2;}
20225                        SWIG=''
20226
20227                fi
20228        fi
20229
20230
20231      else
20232
20233        # Find path to the "swig" executable.
20234        for ac_prog in swig swig3.0 swig2.0
20235do
20236  # Extract the first word of "$ac_prog", so it can be a program name with args.
20237set dummy $ac_prog; ac_word=$2
20238{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20239printf %s "checking for $ac_word... " >&6; }
20240if test ${ac_cv_path_SWIG+y}
20241then :
20242  printf %s "(cached) " >&6
20243else case e in #(
20244  e) case $SWIG in
20245  [\\/]* | ?:[\\/]*)
20246  ac_cv_path_SWIG="$SWIG" # Let the user override the test with a path.
20247  ;;
20248  *)
20249  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20250for as_dir in $PATH
20251do
20252  IFS=$as_save_IFS
20253  case $as_dir in #(((
20254    '') as_dir=./ ;;
20255    */) ;;
20256    *) as_dir=$as_dir/ ;;
20257  esac
20258    for ac_exec_ext in '' $ac_executable_extensions; do
20259  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
20260    ac_cv_path_SWIG="$as_dir$ac_word$ac_exec_ext"
20261    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
20262    break 2
20263  fi
20264done
20265  done
20266IFS=$as_save_IFS
20267
20268  ;;
20269esac ;;
20270esac
20271fi
20272SWIG=$ac_cv_path_SWIG
20273if test -n "$SWIG"; then
20274  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $SWIG" >&5
20275printf "%s\n" "$SWIG" >&6; }
20276else
20277  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
20278printf "%s\n" "no" >&6; }
20279fi
20280
20281
20282  test -n "$SWIG" && break
20283done
20284
20285        if test -z "$SWIG" ; then
20286                :
20287        elif test -z "" ; then
20288                :
20289	else
20290                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking SWIG version" >&5
20291printf %s "checking SWIG version... " >&6; }
20292                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'`
20293                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $swig_version" >&5
20294printf "%s\n" "$swig_version" >&6; }
20295                if test -n "$swig_version" ; then
20296                        # Calculate the required version number components
20297                        required=
20298                        required_major=`echo $required | sed 's/[^0-9].*//'`
20299                        if test -z "$required_major" ; then
20300                                required_major=0
20301                        fi
20302                        required=`echo $required. | sed 's/[0-9]*[^0-9]//'`
20303                        required_minor=`echo $required | sed 's/[^0-9].*//'`
20304                        if test -z "$required_minor" ; then
20305                                required_minor=0
20306                        fi
20307                        required=`echo $required. | sed 's/[0-9]*[^0-9]//'`
20308                        required_patch=`echo $required | sed 's/[^0-9].*//'`
20309                        if test -z "$required_patch" ; then
20310                                required_patch=0
20311                        fi
20312                        # Calculate the available version number components
20313                        available=$swig_version
20314                        available_major=`echo $available | sed 's/[^0-9].*//'`
20315                        if test -z "$available_major" ; then
20316                                available_major=0
20317                        fi
20318                        available=`echo $available | sed 's/[0-9]*[^0-9]//'`
20319                        available_minor=`echo $available | sed 's/[^0-9].*//'`
20320                        if test -z "$available_minor" ; then
20321                                available_minor=0
20322                        fi
20323                        available=`echo $available | sed 's/[0-9]*[^0-9]//'`
20324                        available_patch=`echo $available | sed 's/[^0-9].*//'`
20325                        if test -z "$available_patch" ; then
20326                                available_patch=0
20327                        fi
20328                        # Convert the version tuple into a single number for easier comparison.
20329                        # Using base 100 should be safe since SWIG internally uses BCD values
20330                        # to encode its version number.
20331                        required_swig_vernum=`expr $required_major \* 10000 \
20332                            \+ $required_minor \* 100 \+ $required_patch`
20333                        available_swig_vernum=`expr $available_major \* 10000 \
20334                            \+ $available_minor \* 100 \+ $available_patch`
20335
20336                        if test $available_swig_vernum -lt $required_swig_vernum; then
20337                                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: SWIG version >=  is required.  You have $swig_version." >&5
20338printf "%s\n" "$as_me: WARNING: SWIG version >=  is required.  You have $swig_version." >&2;}
20339                                SWIG=''
20340
20341                        else
20342                                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for SWIG library" >&5
20343printf %s "checking for SWIG library... " >&6; }
20344                                SWIG_LIB=`$SWIG -swiglib | tr '\r\n' '  '`
20345                                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $SWIG_LIB" >&5
20346printf "%s\n" "$SWIG_LIB" >&6; }
20347
20348                        fi
20349                else
20350                        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cannot determine SWIG version" >&5
20351printf "%s\n" "$as_me: WARNING: cannot determine SWIG version" >&2;}
20352                        SWIG=''
20353
20354                fi
20355        fi
20356
20357
20358      fi
20359      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking SWIG" >&5
20360printf %s "checking SWIG... " >&6; }
20361      if test ! -x "$SWIG"; then
20362         as_fn_error $? "failed to find swig tool, install it, or do not build Python module and PyUnbound" "$LINENO" 5
20363      else
20364
20365printf "%s\n" "#define HAVE_SWIG 1" >>confdefs.h
20366
20367         swig="$SWIG"
20368
20369         { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: present" >&5
20370printf "%s\n" "present" >&6; }
20371
20372         # If have Python & SWIG
20373         # Declare PythonMod
20374         if test x_$ub_with_pythonmod != x_no; then
20375
20376printf "%s\n" "#define WITH_PYTHONMODULE 1" >>confdefs.h
20377
20378            WITH_PYTHONMODULE=yes
20379
20380	    PYTHONMOD_OBJ="pythonmod.lo pythonmod_utils.lo"
20381
20382	    PYTHONMOD_HEADER='$(srcdir)/pythonmod/pythonmod.h'
20383
20384	    PYTHONMOD_INSTALL=pythonmod-install
20385
20386	    PYTHONMOD_UNINSTALL=pythonmod-uninstall
20387
20388         fi
20389
20390         # Declare PyUnbound
20391         if test x_$ub_with_pyunbound != x_no; then
20392
20393printf "%s\n" "#define WITH_PYUNBOUND 1" >>confdefs.h
20394
20395            WITH_PYUNBOUND=yes
20396
20397	    PYUNBOUND_OBJ="libunbound_wrap.lo"
20398
20399	    PYUNBOUND_TARGET="_unbound.la"
20400
20401	    PYUNBOUND_INSTALL=pyunbound-install
20402
20403	    PYUNBOUND_UNINSTALL=pyunbound-uninstall
20404
20405         fi
20406      fi
20407   else
20408      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: *** Python libraries not found, won't build PythonMod or PyUnbound ***" >&5
20409printf "%s\n" "*** Python libraries not found, won't build PythonMod or PyUnbound ***" >&6; }
20410      ub_with_pyunbound=no
20411      ub_with_pythonmod=no
20412   fi
20413fi
20414
20415if test "`uname`" = "NetBSD"; then
20416	NETBSD_LINTFLAGS='"-D__RENAME(x)=" -D_NETINET_IN_H_'
20417
20418fi
20419
20420if test "`uname`" = "Linux"; then
20421	# splint cannot parse modern c99 header files
20422	GCC_DOCKER_LINTFLAGS='-syntax'
20423
20424fi
20425{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for build time" >&5
20426printf %s "checking for build time... " >&6; }
20427ax_date_fmt="%Y%m%d"
20428if test x"$SOURCE_DATE_EPOCH" = x
20429then :
20430  CONFIG_DATE=`date "+$ax_date_fmt"`
20431else case e in #(
20432  e) ax_build_date=`date -u -d "@$SOURCE_DATE_EPOCH" "+$ax_date_fmt" 2>/dev/null \
20433                 || date -u -r "$SOURCE_DATE_EPOCH" "+$ax_date_fmt" 2>/dev/null`
20434  if test x"$ax_build_date" = x
20435then :
20436  as_fn_error $? "malformed SOURCE_DATE_EPOCH" "$LINENO" 5
20437else case e in #(
20438  e) CONFIG_DATE=$ax_build_date ;;
20439esac
20440fi ;;
20441esac
20442fi
20443{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CONFIG_DATE" >&5
20444printf "%s\n" "$CONFIG_DATE" >&6; }
20445
20446
20447
20448
20449# Checks for libraries.
20450
20451# libnss
20452USE_NSS="no"
20453
20454# Check whether --with-nss was given.
20455if test ${with_nss+y}
20456then :
20457  withval=$with_nss;
20458	USE_NSS="yes"
20459
20460printf "%s\n" "#define HAVE_NSS 1" >>confdefs.h
20461
20462	if test "$withval" != "" -a "$withval" != "yes"; then
20463		CPPFLAGS="$CPPFLAGS -I$withval/include/nss3"
20464		LDFLAGS="$LDFLAGS -L$withval/lib"
20465
20466	if test "x$enable_rpath" = xyes; then
20467		if echo "$withval/lib" | grep "^/" >/dev/null; then
20468			RUNTIME_PATH="$RUNTIME_PATH -R$withval/lib"
20469		fi
20470	fi
20471
20472		CPPFLAGS="-I$withval/include/nspr4 $CPPFLAGS"
20473	else
20474		CPPFLAGS="$CPPFLAGS -I/usr/include/nss3"
20475		CPPFLAGS="-I/usr/include/nspr4 $CPPFLAGS"
20476	fi
20477        LIBS="$LIBS -lnss3 -lnspr4"
20478	SSLLIB=""
20479	PC_CRYPTO_DEPENDENCY="nss nspr"
20480
20481
20482
20483fi
20484
20485
20486# libnettle
20487USE_NETTLE="no"
20488
20489# Check whether --with-nettle was given.
20490if test ${with_nettle+y}
20491then :
20492  withval=$with_nettle;
20493	USE_NETTLE="yes"
20494
20495printf "%s\n" "#define HAVE_NETTLE 1" >>confdefs.h
20496
20497	ac_fn_c_check_header_compile "$LINENO" "nettle/dsa-compat.h" "ac_cv_header_nettle_dsa_compat_h" "$ac_includes_default
20498"
20499if test "x$ac_cv_header_nettle_dsa_compat_h" = xyes
20500then :
20501  printf "%s\n" "#define HAVE_NETTLE_DSA_COMPAT_H 1" >>confdefs.h
20502
20503fi
20504
20505	if test "$withval" != "" -a "$withval" != "yes"; then
20506		CPPFLAGS="$CPPFLAGS -I$withval/include/nettle"
20507		LDFLAGS="$LDFLAGS -L$withval/lib"
20508
20509	if test "x$enable_rpath" = xyes; then
20510		if echo "$withval/lib" | grep "^/" >/dev/null; then
20511			RUNTIME_PATH="$RUNTIME_PATH -R$withval/lib"
20512		fi
20513	fi
20514
20515	else
20516		CPPFLAGS="$CPPFLAGS -I/usr/include/nettle"
20517	fi
20518        LIBS="$LIBS -lhogweed -lnettle -lgmp"
20519	SSLLIB=""
20520	PC_CRYPTO_DEPENDENCY="hogweed nettle"
20521
20522
20523
20524fi
20525
20526
20527# openssl
20528if test $USE_NSS = "no" -a $USE_NETTLE = "no"; then
20529
20530
20531# Check whether --with-ssl was given.
20532if test ${with_ssl+y}
20533then :
20534  withval=$with_ssl;
20535
20536else case e in #(
20537  e)
20538            withval="yes"
20539         ;;
20540esac
20541fi
20542
20543    if test x_$withval = x_no; then
20544	as_fn_error $? "Need SSL library to do digital signature cryptography" "$LINENO" 5
20545    fi
20546
20547    withval=$withval
20548    if test x_$withval != x_no; then
20549        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for SSL" >&5
20550printf %s "checking for SSL... " >&6; }
20551	if test -n "$withval"; then
20552										if test ! -f "$withval/include/openssl/ssl.h" -a -f "$withval/openssl/ssl.h"; then
20553			ssldir="$withval"
20554			found_ssl="yes"
20555			withval=""
20556			ssldir_include="$ssldir"
20557						ssldir_lib=`echo $ssldir | sed -e 's/include/lib/'`
20558			if test -f "$ssldir_lib/libssl.a" -o -f "$ssldir_lib/libssl.so"; then
20559				: # found here
20560			else
20561				ssldir_lib=`echo $ssldir | sed -e 's/include/lib64/'`
20562				if test -f "$ssldir_lib/libssl.a" -o -f "$ssldir_lib/libssl.so"; then
20563					: # found here
20564				else
20565					as_fn_error $? "Could not find openssl lib file, $ssldir_lib/libssl.so,a, pass like \"/usr/local\" or \"/usr/include/openssl11\"" "$LINENO" 5
20566				fi
20567			fi
20568		fi
20569	fi
20570        if test x_$withval = x_ -o x_$withval = x_yes; then
20571            withval="/usr/local/ssl /usr/lib/ssl /usr/ssl /usr/pkg /usr/local /opt/local /usr/sfw /usr"
20572        fi
20573        for dir in $withval; do
20574            ssldir="$dir"
20575            if test -f "$dir/include/openssl/ssl.h"; then
20576                found_ssl="yes"
20577		ssldir_include="$ssldir/include"
20578		if test ! -d "$ssldir/lib" -a -d "$ssldir/lib64"; then
20579			ssldir_lib="$ssldir/lib64"
20580		else
20581			ssldir_lib="$ssldir/lib"
20582		fi
20583                break;
20584            fi
20585        done
20586        if test x_$found_ssl != x_yes; then
20587            as_fn_error $? "Cannot find the SSL libraries in $withval" "$LINENO" 5
20588        else
20589            { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: found in $ssldir" >&5
20590printf "%s\n" "found in $ssldir" >&6; }
20591
20592printf "%s\n" "#define HAVE_SSL /**/" >>confdefs.h
20593
20594            HAVE_SSL=yes
20595	                if test "$ssldir" != "/usr"; then
20596		    CPPFLAGS="$CPPFLAGS -I$ssldir_include"
20597		    LIBSSL_CPPFLAGS="$LIBSSL_CPPFLAGS -I$ssldir_include"
20598		    LDFLAGS="$LDFLAGS -L$ssldir_lib"
20599		    LIBSSL_LDFLAGS="$LIBSSL_LDFLAGS -L$ssldir_lib"
20600
20601	if test "x$enable_rpath" = xyes; then
20602		if echo "$ssldir_lib" | grep "^/" >/dev/null; then
20603			RUNTIME_PATH="$RUNTIME_PATH -R$ssldir_lib"
20604		fi
20605	fi
20606
20607	    fi
20608
20609            { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for EVP_sha256 in -lcrypto" >&5
20610printf %s "checking for EVP_sha256 in -lcrypto... " >&6; }
20611            LIBS="$LIBS -lcrypto"
20612            LIBSSL_LIBS="$LIBSSL_LIBS -lcrypto"
20613            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20614/* end confdefs.h.  */
20615
20616int
20617main (void)
20618{
20619
20620                int EVP_sha256(void);
20621                (void)EVP_sha256();
20622
20623  ;
20624  return 0;
20625}
20626_ACEOF
20627if ac_fn_c_try_link "$LINENO"
20628then :
20629
20630                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
20631printf "%s\n" "yes" >&6; }
20632
20633printf "%s\n" "#define HAVE_EVP_SHA256 1" >>confdefs.h
20634
20635
20636else case e in #(
20637  e)
20638                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
20639printf "%s\n" "no" >&6; }
20640                # check if -lwsock32 or -lgdi32 are needed.
20641                BAKLIBS="$LIBS"
20642                BAKSSLLIBS="$LIBSSL_LIBS"
20643		LIBS="$LIBS -lgdi32 -lws2_32"
20644		LIBSSL_LIBS="$LIBSSL_LIBS -lgdi32 -lws2_32"
20645                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if -lcrypto needs -lgdi32" >&5
20646printf %s "checking if -lcrypto needs -lgdi32... " >&6; }
20647                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20648/* end confdefs.h.  */
20649
20650int
20651main (void)
20652{
20653
20654                    int EVP_sha256(void);
20655                    (void)EVP_sha256();
20656
20657  ;
20658  return 0;
20659}
20660_ACEOF
20661if ac_fn_c_try_link "$LINENO"
20662then :
20663
20664
20665printf "%s\n" "#define HAVE_EVP_SHA256 1" >>confdefs.h
20666
20667                    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
20668printf "%s\n" "yes" >&6; }
20669
20670else case e in #(
20671  e)
20672                    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
20673printf "%s\n" "no" >&6; }
20674                    LIBS="$BAKLIBS"
20675                    LIBSSL_LIBS="$BAKSSLLIBS"
20676
20677		    LIBS="$LIBS -lgdi32 -lws2_32 -lcrypt32"
20678		    LIBSSL_LIBS="$LIBSSL_LIBS -lgdi32 -lws2_32 -lcrypt32"
20679                    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if -lcrypto needs -lgdi32 -lws2_32 -lcrypt32" >&5
20680printf %s "checking if -lcrypto needs -lgdi32 -lws2_32 -lcrypt32... " >&6; }
20681		    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20682/* end confdefs.h.  */
20683
20684int
20685main (void)
20686{
20687
20688			int EVP_sha256(void);
20689			(void)EVP_sha256();
20690
20691  ;
20692  return 0;
20693}
20694_ACEOF
20695if ac_fn_c_try_link "$LINENO"
20696then :
20697
20698
20699printf "%s\n" "#define HAVE_EVP_SHA256 1" >>confdefs.h
20700
20701			{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
20702printf "%s\n" "yes" >&6; }
20703
20704else case e in #(
20705  e)
20706			{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
20707printf "%s\n" "no" >&6; }
20708			LIBS="$BAKLIBS"
20709			LIBSSL_LIBS="$BAKSSLLIBS"
20710
20711			LIBS="$LIBS -lgdi32 -lws2_32 -lcrypt32 -l:libssp.a"
20712			LIBSSL_LIBS="$LIBSSL_LIBS -lgdi32 -lws2_32 -lcrypt32 -l:libssp.a"
20713			{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if -lcrypto needs -lgdi32 -lws2_32 -lcrypt32 -l:libssp.a" >&5
20714printf %s "checking if -lcrypto needs -lgdi32 -lws2_32 -lcrypt32 -l:libssp.a... " >&6; }
20715			cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20716/* end confdefs.h.  */
20717
20718int
20719main (void)
20720{
20721
20722			    int EVP_sha256(void);
20723			    (void)EVP_sha256();
20724
20725  ;
20726  return 0;
20727}
20728_ACEOF
20729if ac_fn_c_try_link "$LINENO"
20730then :
20731
20732
20733printf "%s\n" "#define HAVE_EVP_SHA256 1" >>confdefs.h
20734
20735			    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
20736printf "%s\n" "yes" >&6; }
20737
20738else case e in #(
20739  e)
20740			    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
20741printf "%s\n" "no" >&6; }
20742			    LIBS="$BAKLIBS"
20743			    LIBSSL_LIBS="$BAKSSLLIBS"
20744
20745			    LIBS="$LIBS -ldl"
20746			    LIBSSL_LIBS="$LIBSSL_LIBS -ldl"
20747			    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if -lcrypto needs -ldl" >&5
20748printf %s "checking if -lcrypto needs -ldl... " >&6; }
20749			    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20750/* end confdefs.h.  */
20751
20752int
20753main (void)
20754{
20755
20756				int EVP_sha256(void);
20757				(void)EVP_sha256();
20758
20759  ;
20760  return 0;
20761}
20762_ACEOF
20763if ac_fn_c_try_link "$LINENO"
20764then :
20765
20766
20767printf "%s\n" "#define HAVE_EVP_SHA256 1" >>confdefs.h
20768
20769				{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
20770printf "%s\n" "yes" >&6; }
20771
20772else case e in #(
20773  e)
20774				{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
20775printf "%s\n" "no" >&6; }
20776				LIBS="$BAKLIBS"
20777				LIBSSL_LIBS="$BAKSSLLIBS"
20778				LIBS="$LIBS -ldl -pthread"
20779				LIBSSL_LIBS="$LIBSSL_LIBS -ldl -pthread"
20780				{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if -lcrypto needs -ldl -pthread" >&5
20781printf %s "checking if -lcrypto needs -ldl -pthread... " >&6; }
20782				cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20783/* end confdefs.h.  */
20784
20785int
20786main (void)
20787{
20788
20789				    int EVP_sha256(void);
20790				    (void)EVP_sha256();
20791
20792  ;
20793  return 0;
20794}
20795_ACEOF
20796if ac_fn_c_try_link "$LINENO"
20797then :
20798
20799
20800printf "%s\n" "#define HAVE_EVP_SHA256 1" >>confdefs.h
20801
20802				    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
20803printf "%s\n" "yes" >&6; }
20804
20805else case e in #(
20806  e)
20807				    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
20808printf "%s\n" "no" >&6; }
20809				    as_fn_error $? "OpenSSL found in $ssldir, but version 0.9.7 or higher is required" "$LINENO" 5
20810				 ;;
20811esac
20812fi
20813rm -f core conftest.err conftest.$ac_objext conftest.beam \
20814    conftest$ac_exeext conftest.$ac_ext
20815			     ;;
20816esac
20817fi
20818rm -f core conftest.err conftest.$ac_objext conftest.beam \
20819    conftest$ac_exeext conftest.$ac_ext
20820			 ;;
20821esac
20822fi
20823rm -f core conftest.err conftest.$ac_objext conftest.beam \
20824    conftest$ac_exeext conftest.$ac_ext
20825		     ;;
20826esac
20827fi
20828rm -f core conftest.err conftest.$ac_objext conftest.beam \
20829    conftest$ac_exeext conftest.$ac_ext
20830                 ;;
20831esac
20832fi
20833rm -f core conftest.err conftest.$ac_objext conftest.beam \
20834    conftest$ac_exeext conftest.$ac_ext
20835             ;;
20836esac
20837fi
20838rm -f core conftest.err conftest.$ac_objext conftest.beam \
20839    conftest$ac_exeext conftest.$ac_ext
20840        fi
20841
20842
20843    fi
20844ac_fn_c_check_header_compile "$LINENO" "openssl/ssl.h" "ac_cv_header_openssl_ssl_h" "$ac_includes_default
20845"
20846if test "x$ac_cv_header_openssl_ssl_h" = xyes
20847then :
20848  printf "%s\n" "#define HAVE_OPENSSL_SSL_H 1" >>confdefs.h
20849
20850fi
20851
20852ac_fn_c_check_header_compile "$LINENO" "openssl/err.h" "ac_cv_header_openssl_err_h" "$ac_includes_default
20853"
20854if test "x$ac_cv_header_openssl_err_h" = xyes
20855then :
20856  printf "%s\n" "#define HAVE_OPENSSL_ERR_H 1" >>confdefs.h
20857
20858fi
20859
20860ac_fn_c_check_header_compile "$LINENO" "openssl/rand.h" "ac_cv_header_openssl_rand_h" "$ac_includes_default
20861"
20862if test "x$ac_cv_header_openssl_rand_h" = xyes
20863then :
20864  printf "%s\n" "#define HAVE_OPENSSL_RAND_H 1" >>confdefs.h
20865
20866fi
20867
20868
20869
20870
20871# check if libssl needs libdl
20872BAKLIBS="$LIBS"
20873LIBS="-lssl $LIBS"
20874{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if libssl needs libdl" >&5
20875printf %s "checking if libssl needs libdl... " >&6; }
20876cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20877/* end confdefs.h.  */
20878
20879/* Override any GCC internal prototype to avoid an error.
20880   Use char because int might match the return type of a GCC
20881   builtin and then its argument prototype would still apply.
20882   The 'extern "C"' is for builds by C++ compilers;
20883   although this is not generally supported in C code supporting it here
20884   has little cost and some practical benefit (sr 110532).  */
20885#ifdef __cplusplus
20886extern "C"
20887#endif
20888char SSL_CTX_new (void);
20889int
20890main (void)
20891{
20892return SSL_CTX_new ();
20893  ;
20894  return 0;
20895}
20896_ACEOF
20897if ac_fn_c_try_link "$LINENO"
20898then :
20899
20900	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
20901printf "%s\n" "no" >&6; }
20902	LIBS="$BAKLIBS"
20903
20904else case e in #(
20905  e)
20906	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
20907printf "%s\n" "yes" >&6; }
20908	LIBS="$BAKLIBS"
20909	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
20910printf %s "checking for library containing dlopen... " >&6; }
20911if test ${ac_cv_search_dlopen+y}
20912then :
20913  printf %s "(cached) " >&6
20914else case e in #(
20915  e) ac_func_search_save_LIBS=$LIBS
20916cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20917/* end confdefs.h.  */
20918
20919/* Override any GCC internal prototype to avoid an error.
20920   Use char because int might match the return type of a GCC
20921   builtin and then its argument prototype would still apply.
20922   The 'extern "C"' is for builds by C++ compilers;
20923   although this is not generally supported in C code supporting it here
20924   has little cost and some practical benefit (sr 110532).  */
20925#ifdef __cplusplus
20926extern "C"
20927#endif
20928char dlopen (void);
20929int
20930main (void)
20931{
20932return dlopen ();
20933  ;
20934  return 0;
20935}
20936_ACEOF
20937for ac_lib in '' dl
20938do
20939  if test -z "$ac_lib"; then
20940    ac_res="none required"
20941  else
20942    ac_res=-l$ac_lib
20943    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
20944  fi
20945  if ac_fn_c_try_link "$LINENO"
20946then :
20947  ac_cv_search_dlopen=$ac_res
20948fi
20949rm -f core conftest.err conftest.$ac_objext conftest.beam \
20950    conftest$ac_exeext
20951  if test ${ac_cv_search_dlopen+y}
20952then :
20953  break
20954fi
20955done
20956if test ${ac_cv_search_dlopen+y}
20957then :
20958
20959else case e in #(
20960  e) ac_cv_search_dlopen=no ;;
20961esac
20962fi
20963rm conftest.$ac_ext
20964LIBS=$ac_func_search_save_LIBS ;;
20965esac
20966fi
20967{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
20968printf "%s\n" "$ac_cv_search_dlopen" >&6; }
20969ac_res=$ac_cv_search_dlopen
20970if test "$ac_res" != no
20971then :
20972  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
20973
20974fi
20975
20976 ;;
20977esac
20978fi
20979rm -f core conftest.err conftest.$ac_objext conftest.beam \
20980    conftest$ac_exeext conftest.$ac_ext
20981SSLLIB="-lssl"
20982
20983PC_CRYPTO_DEPENDENCY=""
20984
20985
20986# check if -lcrypt32 is needed because CAPIENG needs that. (on windows)
20987BAKLIBS="$LIBS"
20988LIBS="-lssl $LIBS"
20989{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if libssl needs -lcrypt32" >&5
20990printf %s "checking if libssl needs -lcrypt32... " >&6; }
20991cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20992/* end confdefs.h.  */
20993
20994int
20995main (void)
20996{
20997
20998	int EVP_sha256(void);
20999	(void)EVP_sha256();
21000
21001  ;
21002  return 0;
21003}
21004_ACEOF
21005if ac_fn_c_try_link "$LINENO"
21006then :
21007
21008	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
21009printf "%s\n" "no" >&6; }
21010	LIBS="$BAKLIBS"
21011
21012else case e in #(
21013  e)
21014	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
21015printf "%s\n" "yes" >&6; }
21016	LIBS="$BAKLIBS"
21017	LIBS="$LIBS -lcrypt32"
21018 ;;
21019esac
21020fi
21021rm -f core conftest.err conftest.$ac_objext conftest.beam \
21022    conftest$ac_exeext conftest.$ac_ext
21023
21024{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for LibreSSL" >&5
21025printf %s "checking for LibreSSL... " >&6; }
21026if grep VERSION_TEXT $ssldir_include/openssl/opensslv.h | grep "LibreSSL" >/dev/null; then
21027	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
21028printf "%s\n" "yes" >&6; }
21029
21030printf "%s\n" "#define HAVE_LIBRESSL 1" >>confdefs.h
21031
21032	# libressl provides these compat functions, but they may also be
21033	# declared by the OS in libc.  See if they have been declared.
21034	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC options needed to detect all undeclared functions" >&5
21035printf %s "checking for $CC options needed to detect all undeclared functions... " >&6; }
21036if test ${ac_cv_c_undeclared_builtin_options+y}
21037then :
21038  printf %s "(cached) " >&6
21039else case e in #(
21040  e) ac_save_CFLAGS=$CFLAGS
21041   ac_cv_c_undeclared_builtin_options='cannot detect'
21042   for ac_arg in '' -fno-builtin; do
21043     CFLAGS="$ac_save_CFLAGS $ac_arg"
21044     # This test program should *not* compile successfully.
21045     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21046/* end confdefs.h.  */
21047
21048int
21049main (void)
21050{
21051(void) strchr;
21052  ;
21053  return 0;
21054}
21055_ACEOF
21056if ac_fn_c_try_compile "$LINENO"
21057then :
21058
21059else case e in #(
21060  e) # This test program should compile successfully.
21061        # No library function is consistently available on
21062        # freestanding implementations, so test against a dummy
21063        # declaration.  Include always-available headers on the
21064        # off chance that they somehow elicit warnings.
21065        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21066/* end confdefs.h.  */
21067#include <float.h>
21068#include <limits.h>
21069#include <stdarg.h>
21070#include <stddef.h>
21071extern void ac_decl (int, char *);
21072
21073int
21074main (void)
21075{
21076(void) ac_decl (0, (char *) 0);
21077  (void) ac_decl;
21078
21079  ;
21080  return 0;
21081}
21082_ACEOF
21083if ac_fn_c_try_compile "$LINENO"
21084then :
21085  if test x"$ac_arg" = x
21086then :
21087  ac_cv_c_undeclared_builtin_options='none needed'
21088else case e in #(
21089  e) ac_cv_c_undeclared_builtin_options=$ac_arg ;;
21090esac
21091fi
21092          break
21093fi
21094rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
21095esac
21096fi
21097rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
21098    done
21099    CFLAGS=$ac_save_CFLAGS
21100   ;;
21101esac
21102fi
21103{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_undeclared_builtin_options" >&5
21104printf "%s\n" "$ac_cv_c_undeclared_builtin_options" >&6; }
21105  case $ac_cv_c_undeclared_builtin_options in #(
21106  'cannot detect') :
21107    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
21108printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
21109as_fn_error $? "cannot make $CC report undeclared builtins
21110See 'config.log' for more details" "$LINENO" 5; } ;; #(
21111  'none needed') :
21112    ac_c_undeclared_builtin_options='' ;; #(
21113  *) :
21114    ac_c_undeclared_builtin_options=$ac_cv_c_undeclared_builtin_options ;;
21115esac
21116
21117ac_fn_check_decl "$LINENO" "strlcpy" "ac_cv_have_decl_strlcpy" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
21118if test "x$ac_cv_have_decl_strlcpy" = xyes
21119then :
21120  ac_have_decl=1
21121else case e in #(
21122  e) ac_have_decl=0 ;;
21123esac
21124fi
21125printf "%s\n" "#define HAVE_DECL_STRLCPY $ac_have_decl" >>confdefs.h
21126ac_fn_check_decl "$LINENO" "strlcat" "ac_cv_have_decl_strlcat" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
21127if test "x$ac_cv_have_decl_strlcat" = xyes
21128then :
21129  ac_have_decl=1
21130else case e in #(
21131  e) ac_have_decl=0 ;;
21132esac
21133fi
21134printf "%s\n" "#define HAVE_DECL_STRLCAT $ac_have_decl" >>confdefs.h
21135ac_fn_check_decl "$LINENO" "arc4random" "ac_cv_have_decl_arc4random" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
21136if test "x$ac_cv_have_decl_arc4random" = xyes
21137then :
21138  ac_have_decl=1
21139else case e in #(
21140  e) ac_have_decl=0 ;;
21141esac
21142fi
21143printf "%s\n" "#define HAVE_DECL_ARC4RANDOM $ac_have_decl" >>confdefs.h
21144ac_fn_check_decl "$LINENO" "arc4random_uniform" "ac_cv_have_decl_arc4random_uniform" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
21145if test "x$ac_cv_have_decl_arc4random_uniform" = xyes
21146then :
21147  ac_have_decl=1
21148else case e in #(
21149  e) ac_have_decl=0 ;;
21150esac
21151fi
21152printf "%s\n" "#define HAVE_DECL_ARC4RANDOM_UNIFORM $ac_have_decl" >>confdefs.h
21153
21154else
21155	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
21156printf "%s\n" "no" >&6; }
21157fi
21158ac_fn_c_check_header_compile "$LINENO" "openssl/conf.h" "ac_cv_header_openssl_conf_h" "$ac_includes_default
21159"
21160if test "x$ac_cv_header_openssl_conf_h" = xyes
21161then :
21162  printf "%s\n" "#define HAVE_OPENSSL_CONF_H 1" >>confdefs.h
21163
21164fi
21165ac_fn_c_check_header_compile "$LINENO" "openssl/engine.h" "ac_cv_header_openssl_engine_h" "$ac_includes_default
21166"
21167if test "x$ac_cv_header_openssl_engine_h" = xyes
21168then :
21169  printf "%s\n" "#define HAVE_OPENSSL_ENGINE_H 1" >>confdefs.h
21170
21171fi
21172ac_fn_c_check_header_compile "$LINENO" "openssl/bn.h" "ac_cv_header_openssl_bn_h" "$ac_includes_default
21173"
21174if test "x$ac_cv_header_openssl_bn_h" = xyes
21175then :
21176  printf "%s\n" "#define HAVE_OPENSSL_BN_H 1" >>confdefs.h
21177
21178fi
21179ac_fn_c_check_header_compile "$LINENO" "openssl/dh.h" "ac_cv_header_openssl_dh_h" "$ac_includes_default
21180"
21181if test "x$ac_cv_header_openssl_dh_h" = xyes
21182then :
21183  printf "%s\n" "#define HAVE_OPENSSL_DH_H 1" >>confdefs.h
21184
21185fi
21186ac_fn_c_check_header_compile "$LINENO" "openssl/dsa.h" "ac_cv_header_openssl_dsa_h" "$ac_includes_default
21187"
21188if test "x$ac_cv_header_openssl_dsa_h" = xyes
21189then :
21190  printf "%s\n" "#define HAVE_OPENSSL_DSA_H 1" >>confdefs.h
21191
21192fi
21193ac_fn_c_check_header_compile "$LINENO" "openssl/rsa.h" "ac_cv_header_openssl_rsa_h" "$ac_includes_default
21194"
21195if test "x$ac_cv_header_openssl_rsa_h" = xyes
21196then :
21197  printf "%s\n" "#define HAVE_OPENSSL_RSA_H 1" >>confdefs.h
21198
21199fi
21200ac_fn_c_check_header_compile "$LINENO" "openssl/core_names.h" "ac_cv_header_openssl_core_names_h" "$ac_includes_default
21201"
21202if test "x$ac_cv_header_openssl_core_names_h" = xyes
21203then :
21204  printf "%s\n" "#define HAVE_OPENSSL_CORE_NAMES_H 1" >>confdefs.h
21205
21206fi
21207ac_fn_c_check_header_compile "$LINENO" "openssl/param_build.h" "ac_cv_header_openssl_param_build_h" "$ac_includes_default
21208"
21209if test "x$ac_cv_header_openssl_param_build_h" = xyes
21210then :
21211  printf "%s\n" "#define HAVE_OPENSSL_PARAM_BUILD_H 1" >>confdefs.h
21212
21213fi
21214
21215ac_fn_c_check_func "$LINENO" "OPENSSL_config" "ac_cv_func_OPENSSL_config"
21216if test "x$ac_cv_func_OPENSSL_config" = xyes
21217then :
21218  printf "%s\n" "#define HAVE_OPENSSL_CONFIG 1" >>confdefs.h
21219
21220fi
21221ac_fn_c_check_func "$LINENO" "EVP_sha1" "ac_cv_func_EVP_sha1"
21222if test "x$ac_cv_func_EVP_sha1" = xyes
21223then :
21224  printf "%s\n" "#define HAVE_EVP_SHA1 1" >>confdefs.h
21225
21226fi
21227ac_fn_c_check_func "$LINENO" "EVP_sha256" "ac_cv_func_EVP_sha256"
21228if test "x$ac_cv_func_EVP_sha256" = xyes
21229then :
21230  printf "%s\n" "#define HAVE_EVP_SHA256 1" >>confdefs.h
21231
21232fi
21233ac_fn_c_check_func "$LINENO" "EVP_sha512" "ac_cv_func_EVP_sha512"
21234if test "x$ac_cv_func_EVP_sha512" = xyes
21235then :
21236  printf "%s\n" "#define HAVE_EVP_SHA512 1" >>confdefs.h
21237
21238fi
21239ac_fn_c_check_func "$LINENO" "FIPS_mode" "ac_cv_func_FIPS_mode"
21240if test "x$ac_cv_func_FIPS_mode" = xyes
21241then :
21242  printf "%s\n" "#define HAVE_FIPS_MODE 1" >>confdefs.h
21243
21244fi
21245ac_fn_c_check_func "$LINENO" "EVP_default_properties_is_fips_enabled" "ac_cv_func_EVP_default_properties_is_fips_enabled"
21246if test "x$ac_cv_func_EVP_default_properties_is_fips_enabled" = xyes
21247then :
21248  printf "%s\n" "#define HAVE_EVP_DEFAULT_PROPERTIES_IS_FIPS_ENABLED 1" >>confdefs.h
21249
21250fi
21251ac_fn_c_check_func "$LINENO" "EVP_MD_CTX_new" "ac_cv_func_EVP_MD_CTX_new"
21252if test "x$ac_cv_func_EVP_MD_CTX_new" = xyes
21253then :
21254  printf "%s\n" "#define HAVE_EVP_MD_CTX_NEW 1" >>confdefs.h
21255
21256fi
21257ac_fn_c_check_func "$LINENO" "OpenSSL_add_all_digests" "ac_cv_func_OpenSSL_add_all_digests"
21258if test "x$ac_cv_func_OpenSSL_add_all_digests" = xyes
21259then :
21260  printf "%s\n" "#define HAVE_OPENSSL_ADD_ALL_DIGESTS 1" >>confdefs.h
21261
21262fi
21263ac_fn_c_check_func "$LINENO" "OPENSSL_init_crypto" "ac_cv_func_OPENSSL_init_crypto"
21264if test "x$ac_cv_func_OPENSSL_init_crypto" = xyes
21265then :
21266  printf "%s\n" "#define HAVE_OPENSSL_INIT_CRYPTO 1" >>confdefs.h
21267
21268fi
21269ac_fn_c_check_func "$LINENO" "EVP_cleanup" "ac_cv_func_EVP_cleanup"
21270if test "x$ac_cv_func_EVP_cleanup" = xyes
21271then :
21272  printf "%s\n" "#define HAVE_EVP_CLEANUP 1" >>confdefs.h
21273
21274fi
21275ac_fn_c_check_func "$LINENO" "ENGINE_cleanup" "ac_cv_func_ENGINE_cleanup"
21276if test "x$ac_cv_func_ENGINE_cleanup" = xyes
21277then :
21278  printf "%s\n" "#define HAVE_ENGINE_CLEANUP 1" >>confdefs.h
21279
21280fi
21281ac_fn_c_check_func "$LINENO" "ERR_load_crypto_strings" "ac_cv_func_ERR_load_crypto_strings"
21282if test "x$ac_cv_func_ERR_load_crypto_strings" = xyes
21283then :
21284  printf "%s\n" "#define HAVE_ERR_LOAD_CRYPTO_STRINGS 1" >>confdefs.h
21285
21286fi
21287ac_fn_c_check_func "$LINENO" "CRYPTO_cleanup_all_ex_data" "ac_cv_func_CRYPTO_cleanup_all_ex_data"
21288if test "x$ac_cv_func_CRYPTO_cleanup_all_ex_data" = xyes
21289then :
21290  printf "%s\n" "#define HAVE_CRYPTO_CLEANUP_ALL_EX_DATA 1" >>confdefs.h
21291
21292fi
21293ac_fn_c_check_func "$LINENO" "ERR_free_strings" "ac_cv_func_ERR_free_strings"
21294if test "x$ac_cv_func_ERR_free_strings" = xyes
21295then :
21296  printf "%s\n" "#define HAVE_ERR_FREE_STRINGS 1" >>confdefs.h
21297
21298fi
21299ac_fn_c_check_func "$LINENO" "RAND_cleanup" "ac_cv_func_RAND_cleanup"
21300if test "x$ac_cv_func_RAND_cleanup" = xyes
21301then :
21302  printf "%s\n" "#define HAVE_RAND_CLEANUP 1" >>confdefs.h
21303
21304fi
21305ac_fn_c_check_func "$LINENO" "DSA_SIG_set0" "ac_cv_func_DSA_SIG_set0"
21306if test "x$ac_cv_func_DSA_SIG_set0" = xyes
21307then :
21308  printf "%s\n" "#define HAVE_DSA_SIG_SET0 1" >>confdefs.h
21309
21310fi
21311ac_fn_c_check_func "$LINENO" "EVP_dss1" "ac_cv_func_EVP_dss1"
21312if test "x$ac_cv_func_EVP_dss1" = xyes
21313then :
21314  printf "%s\n" "#define HAVE_EVP_DSS1 1" >>confdefs.h
21315
21316fi
21317ac_fn_c_check_func "$LINENO" "EVP_DigestVerify" "ac_cv_func_EVP_DigestVerify"
21318if test "x$ac_cv_func_EVP_DigestVerify" = xyes
21319then :
21320  printf "%s\n" "#define HAVE_EVP_DIGESTVERIFY 1" >>confdefs.h
21321
21322fi
21323ac_fn_c_check_func "$LINENO" "EVP_aes_256_cbc" "ac_cv_func_EVP_aes_256_cbc"
21324if test "x$ac_cv_func_EVP_aes_256_cbc" = xyes
21325then :
21326  printf "%s\n" "#define HAVE_EVP_AES_256_CBC 1" >>confdefs.h
21327
21328fi
21329ac_fn_c_check_func "$LINENO" "EVP_EncryptInit_ex" "ac_cv_func_EVP_EncryptInit_ex"
21330if test "x$ac_cv_func_EVP_EncryptInit_ex" = xyes
21331then :
21332  printf "%s\n" "#define HAVE_EVP_ENCRYPTINIT_EX 1" >>confdefs.h
21333
21334fi
21335ac_fn_c_check_func "$LINENO" "HMAC_Init_ex" "ac_cv_func_HMAC_Init_ex"
21336if test "x$ac_cv_func_HMAC_Init_ex" = xyes
21337then :
21338  printf "%s\n" "#define HAVE_HMAC_INIT_EX 1" >>confdefs.h
21339
21340fi
21341ac_fn_c_check_func "$LINENO" "CRYPTO_THREADID_set_callback" "ac_cv_func_CRYPTO_THREADID_set_callback"
21342if test "x$ac_cv_func_CRYPTO_THREADID_set_callback" = xyes
21343then :
21344  printf "%s\n" "#define HAVE_CRYPTO_THREADID_SET_CALLBACK 1" >>confdefs.h
21345
21346fi
21347ac_fn_c_check_func "$LINENO" "EVP_MAC_CTX_set_params" "ac_cv_func_EVP_MAC_CTX_set_params"
21348if test "x$ac_cv_func_EVP_MAC_CTX_set_params" = xyes
21349then :
21350  printf "%s\n" "#define HAVE_EVP_MAC_CTX_SET_PARAMS 1" >>confdefs.h
21351
21352fi
21353ac_fn_c_check_func "$LINENO" "OSSL_PARAM_BLD_new" "ac_cv_func_OSSL_PARAM_BLD_new"
21354if test "x$ac_cv_func_OSSL_PARAM_BLD_new" = xyes
21355then :
21356  printf "%s\n" "#define HAVE_OSSL_PARAM_BLD_NEW 1" >>confdefs.h
21357
21358fi
21359ac_fn_c_check_func "$LINENO" "BIO_set_callback_ex" "ac_cv_func_BIO_set_callback_ex"
21360if test "x$ac_cv_func_BIO_set_callback_ex" = xyes
21361then :
21362  printf "%s\n" "#define HAVE_BIO_SET_CALLBACK_EX 1" >>confdefs.h
21363
21364fi
21365ac_fn_c_check_func "$LINENO" "SSL_CTX_set_tmp_ecdh" "ac_cv_func_SSL_CTX_set_tmp_ecdh"
21366if test "x$ac_cv_func_SSL_CTX_set_tmp_ecdh" = xyes
21367then :
21368  printf "%s\n" "#define HAVE_SSL_CTX_SET_TMP_ECDH 1" >>confdefs.h
21369
21370fi
21371
21372
21373# these check_funcs need -lssl
21374BAKLIBS="$LIBS"
21375LIBS="-lssl $LIBS"
21376ac_fn_c_check_func "$LINENO" "OPENSSL_init_ssl" "ac_cv_func_OPENSSL_init_ssl"
21377if test "x$ac_cv_func_OPENSSL_init_ssl" = xyes
21378then :
21379  printf "%s\n" "#define HAVE_OPENSSL_INIT_SSL 1" >>confdefs.h
21380
21381fi
21382ac_fn_c_check_func "$LINENO" "SSL_CTX_set_security_level" "ac_cv_func_SSL_CTX_set_security_level"
21383if test "x$ac_cv_func_SSL_CTX_set_security_level" = xyes
21384then :
21385  printf "%s\n" "#define HAVE_SSL_CTX_SET_SECURITY_LEVEL 1" >>confdefs.h
21386
21387fi
21388ac_fn_c_check_func "$LINENO" "SSL_set1_host" "ac_cv_func_SSL_set1_host"
21389if test "x$ac_cv_func_SSL_set1_host" = xyes
21390then :
21391  printf "%s\n" "#define HAVE_SSL_SET1_HOST 1" >>confdefs.h
21392
21393fi
21394ac_fn_c_check_func "$LINENO" "SSL_get0_peername" "ac_cv_func_SSL_get0_peername"
21395if test "x$ac_cv_func_SSL_get0_peername" = xyes
21396then :
21397  printf "%s\n" "#define HAVE_SSL_GET0_PEERNAME 1" >>confdefs.h
21398
21399fi
21400ac_fn_c_check_func "$LINENO" "X509_VERIFY_PARAM_set1_host" "ac_cv_func_X509_VERIFY_PARAM_set1_host"
21401if test "x$ac_cv_func_X509_VERIFY_PARAM_set1_host" = xyes
21402then :
21403  printf "%s\n" "#define HAVE_X509_VERIFY_PARAM_SET1_HOST 1" >>confdefs.h
21404
21405fi
21406ac_fn_c_check_func "$LINENO" "SSL_CTX_set_ciphersuites" "ac_cv_func_SSL_CTX_set_ciphersuites"
21407if test "x$ac_cv_func_SSL_CTX_set_ciphersuites" = xyes
21408then :
21409  printf "%s\n" "#define HAVE_SSL_CTX_SET_CIPHERSUITES 1" >>confdefs.h
21410
21411fi
21412ac_fn_c_check_func "$LINENO" "SSL_CTX_set_tlsext_ticket_key_evp_cb" "ac_cv_func_SSL_CTX_set_tlsext_ticket_key_evp_cb"
21413if test "x$ac_cv_func_SSL_CTX_set_tlsext_ticket_key_evp_cb" = xyes
21414then :
21415  printf "%s\n" "#define HAVE_SSL_CTX_SET_TLSEXT_TICKET_KEY_EVP_CB 1" >>confdefs.h
21416
21417fi
21418ac_fn_c_check_func "$LINENO" "SSL_CTX_set_alpn_select_cb" "ac_cv_func_SSL_CTX_set_alpn_select_cb"
21419if test "x$ac_cv_func_SSL_CTX_set_alpn_select_cb" = xyes
21420then :
21421  printf "%s\n" "#define HAVE_SSL_CTX_SET_ALPN_SELECT_CB 1" >>confdefs.h
21422
21423fi
21424ac_fn_c_check_func "$LINENO" "SSL_get0_alpn_selected" "ac_cv_func_SSL_get0_alpn_selected"
21425if test "x$ac_cv_func_SSL_get0_alpn_selected" = xyes
21426then :
21427  printf "%s\n" "#define HAVE_SSL_GET0_ALPN_SELECTED 1" >>confdefs.h
21428
21429fi
21430ac_fn_c_check_func "$LINENO" "SSL_CTX_set_alpn_protos" "ac_cv_func_SSL_CTX_set_alpn_protos"
21431if test "x$ac_cv_func_SSL_CTX_set_alpn_protos" = xyes
21432then :
21433  printf "%s\n" "#define HAVE_SSL_CTX_SET_ALPN_PROTOS 1" >>confdefs.h
21434
21435fi
21436ac_fn_c_check_func "$LINENO" "SSL_get1_peer_certificate" "ac_cv_func_SSL_get1_peer_certificate"
21437if test "x$ac_cv_func_SSL_get1_peer_certificate" = xyes
21438then :
21439  printf "%s\n" "#define HAVE_SSL_GET1_PEER_CERTIFICATE 1" >>confdefs.h
21440
21441fi
21442
21443LIBS="$BAKLIBS"
21444
21445ac_fn_check_decl "$LINENO" "SSL_COMP_get_compression_methods" "ac_cv_have_decl_SSL_COMP_get_compression_methods" "
21446$ac_includes_default
21447#ifdef HAVE_OPENSSL_ERR_H
21448#include <openssl/err.h>
21449#endif
21450
21451#ifdef HAVE_OPENSSL_RAND_H
21452#include <openssl/rand.h>
21453#endif
21454
21455#ifdef HAVE_OPENSSL_CONF_H
21456#include <openssl/conf.h>
21457#endif
21458
21459#ifdef HAVE_OPENSSL_ENGINE_H
21460#include <openssl/engine.h>
21461#endif
21462#include <openssl/ssl.h>
21463#include <openssl/evp.h>
21464
21465" "$ac_c_undeclared_builtin_options" "CFLAGS"
21466if test "x$ac_cv_have_decl_SSL_COMP_get_compression_methods" = xyes
21467then :
21468  ac_have_decl=1
21469else case e in #(
21470  e) ac_have_decl=0 ;;
21471esac
21472fi
21473printf "%s\n" "#define HAVE_DECL_SSL_COMP_GET_COMPRESSION_METHODS $ac_have_decl" >>confdefs.h
21474ac_fn_check_decl "$LINENO" "sk_SSL_COMP_pop_free" "ac_cv_have_decl_sk_SSL_COMP_pop_free" "
21475$ac_includes_default
21476#ifdef HAVE_OPENSSL_ERR_H
21477#include <openssl/err.h>
21478#endif
21479
21480#ifdef HAVE_OPENSSL_RAND_H
21481#include <openssl/rand.h>
21482#endif
21483
21484#ifdef HAVE_OPENSSL_CONF_H
21485#include <openssl/conf.h>
21486#endif
21487
21488#ifdef HAVE_OPENSSL_ENGINE_H
21489#include <openssl/engine.h>
21490#endif
21491#include <openssl/ssl.h>
21492#include <openssl/evp.h>
21493
21494" "$ac_c_undeclared_builtin_options" "CFLAGS"
21495if test "x$ac_cv_have_decl_sk_SSL_COMP_pop_free" = xyes
21496then :
21497  ac_have_decl=1
21498else case e in #(
21499  e) ac_have_decl=0 ;;
21500esac
21501fi
21502printf "%s\n" "#define HAVE_DECL_SK_SSL_COMP_POP_FREE $ac_have_decl" >>confdefs.h
21503ac_fn_check_decl "$LINENO" "SSL_CTX_set_ecdh_auto" "ac_cv_have_decl_SSL_CTX_set_ecdh_auto" "
21504$ac_includes_default
21505#ifdef HAVE_OPENSSL_ERR_H
21506#include <openssl/err.h>
21507#endif
21508
21509#ifdef HAVE_OPENSSL_RAND_H
21510#include <openssl/rand.h>
21511#endif
21512
21513#ifdef HAVE_OPENSSL_CONF_H
21514#include <openssl/conf.h>
21515#endif
21516
21517#ifdef HAVE_OPENSSL_ENGINE_H
21518#include <openssl/engine.h>
21519#endif
21520#include <openssl/ssl.h>
21521#include <openssl/evp.h>
21522
21523" "$ac_c_undeclared_builtin_options" "CFLAGS"
21524if test "x$ac_cv_have_decl_SSL_CTX_set_ecdh_auto" = xyes
21525then :
21526  ac_have_decl=1
21527else case e in #(
21528  e) ac_have_decl=0 ;;
21529esac
21530fi
21531printf "%s\n" "#define HAVE_DECL_SSL_CTX_SET_ECDH_AUTO $ac_have_decl" >>confdefs.h
21532
21533
21534if test "$ac_cv_func_HMAC_Init_ex" = "yes"; then
21535# check function return type.
21536{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking the return type of HMAC_Init_ex" >&5
21537printf %s "checking the return type of HMAC_Init_ex... " >&6; }
21538cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21539/* end confdefs.h.  */
21540
21541#ifdef HAVE_OPENSSL_ERR_H
21542#include <openssl/err.h>
21543#endif
21544
21545#ifdef HAVE_OPENSSL_RAND_H
21546#include <openssl/rand.h>
21547#endif
21548
21549#ifdef HAVE_OPENSSL_CONF_H
21550#include <openssl/conf.h>
21551#endif
21552
21553#ifdef HAVE_OPENSSL_ENGINE_H
21554#include <openssl/engine.h>
21555#endif
21556#include <openssl/ssl.h>
21557#include <openssl/evp.h>
21558
21559int
21560main (void)
21561{
21562
21563	HMAC_CTX* hmac_ctx = NULL;
21564	void* hmac_key = NULL;
21565	const EVP_MD* digest = NULL;
21566	int x = HMAC_Init_ex(hmac_ctx, hmac_key, 32, digest, NULL);
21567	(void)x;
21568
21569  ;
21570  return 0;
21571}
21572_ACEOF
21573if ac_fn_c_try_compile "$LINENO"
21574then :
21575
21576	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: int" >&5
21577printf "%s\n" "int" >&6; }
21578
21579else case e in #(
21580  e)
21581	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: void" >&5
21582printf "%s\n" "void" >&6; }
21583
21584printf "%s\n" "#define HMAC_INIT_EX_RETURNS_VOID 1" >>confdefs.h
21585
21586 ;;
21587esac
21588fi
21589rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
21590fi
21591
21592fi
21593
21594
21595# libbsd
21596
21597# Check whether --with-libbsd was given.
21598if test ${with_libbsd+y}
21599then :
21600  withval=$with_libbsd;
21601	ac_fn_c_check_header_compile "$LINENO" "bsd/string.h" "ac_cv_header_bsd_string_h" "$ac_includes_default
21602"
21603if test "x$ac_cv_header_bsd_string_h" = xyes
21604then :
21605  printf "%s\n" "#define HAVE_BSD_STRING_H 1" >>confdefs.h
21606
21607fi
21608ac_fn_c_check_header_compile "$LINENO" "bsd/stdlib.h" "ac_cv_header_bsd_stdlib_h" "$ac_includes_default
21609"
21610if test "x$ac_cv_header_bsd_stdlib_h" = xyes
21611then :
21612  printf "%s\n" "#define HAVE_BSD_STDLIB_H 1" >>confdefs.h
21613
21614fi
21615
21616	if test "x$ac_cv_header_bsd_string_h" = xyes -a "x$ac_cv_header_bsd_stdlib_h" = xyes; then
21617		for func in strlcpy strlcat arc4random arc4random_uniform reallocarray; do
21618			as_ac_Search=`printf "%s\n" "ac_cv_search_$func" | sed "$as_sed_sh"`
21619{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing $func" >&5
21620printf %s "checking for library containing $func... " >&6; }
21621if eval test \${$as_ac_Search+y}
21622then :
21623  printf %s "(cached) " >&6
21624else case e in #(
21625  e) ac_func_search_save_LIBS=$LIBS
21626cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21627/* end confdefs.h.  */
21628
21629/* Override any GCC internal prototype to avoid an error.
21630   Use char because int might match the return type of a GCC
21631   builtin and then its argument prototype would still apply.
21632   The 'extern "C"' is for builds by C++ compilers;
21633   although this is not generally supported in C code supporting it here
21634   has little cost and some practical benefit (sr 110532).  */
21635#ifdef __cplusplus
21636extern "C"
21637#endif
21638char $func (void);
21639int
21640main (void)
21641{
21642return $func ();
21643  ;
21644  return 0;
21645}
21646_ACEOF
21647for ac_lib in '' bsd
21648do
21649  if test -z "$ac_lib"; then
21650    ac_res="none required"
21651  else
21652    ac_res=-l$ac_lib
21653    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
21654  fi
21655  if ac_fn_c_try_link "$LINENO"
21656then :
21657  eval "$as_ac_Search=\$ac_res"
21658fi
21659rm -f core conftest.err conftest.$ac_objext conftest.beam \
21660    conftest$ac_exeext
21661  if eval test \${$as_ac_Search+y}
21662then :
21663  break
21664fi
21665done
21666if eval test \${$as_ac_Search+y}
21667then :
21668
21669else case e in #(
21670  e) eval "$as_ac_Search=no" ;;
21671esac
21672fi
21673rm conftest.$ac_ext
21674LIBS=$ac_func_search_save_LIBS ;;
21675esac
21676fi
21677eval ac_res=\$$as_ac_Search
21678	       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
21679printf "%s\n" "$ac_res" >&6; }
21680eval ac_res=\$$as_ac_Search
21681if test "$ac_res" != no
21682then :
21683  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
21684
21685
21686printf "%s\n" "#define HAVE_LIBBSD 1" >>confdefs.h
21687
21688				PC_LIBBSD_DEPENDENCY=libbsd
21689
21690
21691fi
21692
21693		done
21694	fi
21695
21696fi
21697
21698
21699# Check whether --enable-sha1 was given.
21700if test ${enable_sha1+y}
21701then :
21702  enableval=$enable_sha1;
21703fi
21704
21705case "$enable_sha1" in
21706	no)
21707	;;
21708	yes|*)
21709
21710printf "%s\n" "#define USE_SHA1 1" >>confdefs.h
21711
21712	;;
21713esac
21714
21715
21716# Check whether --enable-sha2 was given.
21717if test ${enable_sha2+y}
21718then :
21719  enableval=$enable_sha2;
21720fi
21721
21722case "$enable_sha2" in
21723	no)
21724	;;
21725	yes|*)
21726
21727printf "%s\n" "#define USE_SHA2 1" >>confdefs.h
21728
21729	;;
21730esac
21731
21732# Check whether --enable-subnet was given.
21733if test ${enable_subnet+y}
21734then :
21735  enableval=$enable_subnet;
21736fi
21737
21738case "$enable_subnet" in
21739	yes)
21740
21741printf "%s\n" "#define CLIENT_SUBNET 1" >>confdefs.h
21742
21743	SUBNET_OBJ="edns-subnet.lo subnetmod.lo addrtree.lo subnet-whitelist.lo"
21744
21745	SUBNET_HEADER='$(srcdir)/edns-subnet/subnetmod.h $(srcdir)/edns-subnet/edns-subnet.h $(srcdir)/edns-subnet/subnet-whitelist.h $(srcdir)/edns-subnet/addrtree.h'
21746
21747	;;
21748	no|*)
21749	;;
21750esac
21751
21752# check whether gost also works
21753
21754# Check whether --enable-gost was given.
21755if test ${enable_gost+y}
21756then :
21757  enableval=$enable_gost;
21758fi
21759
21760use_gost="no"
21761if test $USE_NSS = "no" -a $USE_NETTLE = "no"; then
21762case "$enable_gost" in
21763	no)
21764	;;
21765	*)
21766	ac_fn_c_check_func "$LINENO" "EVP_PKEY_set_type_str" "ac_cv_func_EVP_PKEY_set_type_str"
21767if test "x$ac_cv_func_EVP_PKEY_set_type_str" = xyes
21768then :
21769  :
21770else case e in #(
21771  e) as_fn_error $? "OpenSSL 1.0.0 is needed for GOST support" "$LINENO" 5 ;;
21772esac
21773fi
21774
21775	ac_fn_c_check_func "$LINENO" "EC_KEY_new" "ac_cv_func_EC_KEY_new"
21776if test "x$ac_cv_func_EC_KEY_new" = xyes
21777then :
21778
21779else case e in #(
21780  e) as_fn_error $? "OpenSSL does not support ECC, needed for GOST support" "$LINENO" 5 ;;
21781esac
21782fi
21783
21784
21785{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if GOST works" >&5
21786printf %s "checking if GOST works... " >&6; }
21787if test c${cross_compiling} = cno; then
21788BAKCFLAGS="$CFLAGS"
21789if test -n "$ssldir"; then
21790	CFLAGS="$CFLAGS -Wl,-rpath,$ssldir_lib"
21791fi
21792if test "$cross_compiling" = yes
21793then :
21794  eval "ac_cv_c_gost_works=maybe"
21795else case e in #(
21796  e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21797/* end confdefs.h.  */
21798
21799#include <string.h>
21800#include <openssl/ssl.h>
21801#include <openssl/evp.h>
21802#include <openssl/engine.h>
21803#include <openssl/conf.h>
21804/* routine to load gost (from sldns) */
21805int load_gost_id(void)
21806{
21807	static int gost_id = 0;
21808	const EVP_PKEY_ASN1_METHOD* meth;
21809	ENGINE* e;
21810
21811	if(gost_id) return gost_id;
21812
21813	/* see if configuration loaded gost implementation from other engine*/
21814	meth = EVP_PKEY_asn1_find_str(NULL, "gost2001", -1);
21815	if(meth) {
21816		EVP_PKEY_asn1_get0_info(&gost_id, NULL, NULL, NULL, NULL, meth);
21817		return gost_id;
21818	}
21819
21820	/* see if engine can be loaded already */
21821	e = ENGINE_by_id("gost");
21822	if(!e) {
21823		/* load it ourself, in case statically linked */
21824		ENGINE_load_builtin_engines();
21825		ENGINE_load_dynamic();
21826		e = ENGINE_by_id("gost");
21827	}
21828	if(!e) {
21829		/* no gost engine in openssl */
21830		return 0;
21831	}
21832	if(!ENGINE_set_default(e, ENGINE_METHOD_ALL)) {
21833		ENGINE_finish(e);
21834		ENGINE_free(e);
21835		return 0;
21836	}
21837
21838	meth = EVP_PKEY_asn1_find_str(&e, "gost2001", -1);
21839	if(!meth) {
21840		/* algo not found */
21841		ENGINE_finish(e);
21842		ENGINE_free(e);
21843		return 0;
21844	}
21845	EVP_PKEY_asn1_get0_info(&gost_id, NULL, NULL, NULL, NULL, meth);
21846	return gost_id;
21847}
21848int main(void) {
21849	EVP_MD_CTX* ctx;
21850	const EVP_MD* md;
21851	unsigned char digest[64]; /* its a 256-bit digest, so uses 32 bytes */
21852	const char* str = "Hello world";
21853	const unsigned char check[] = {
21854		0x40 , 0xed , 0xf8 , 0x56 , 0x5a , 0xc5 , 0x36 , 0xe1 ,
21855		0x33 , 0x7c , 0x7e , 0x87 , 0x62 , 0x1c , 0x42 , 0xe0 ,
21856		0x17 , 0x1b , 0x5e , 0xce , 0xa8 , 0x46 , 0x65 , 0x4d ,
21857		0x8d , 0x3e , 0x22 , 0x9b , 0xe1 , 0x30 , 0x19 , 0x9d
21858	};
21859	OPENSSL_config(NULL);
21860	(void)load_gost_id();
21861	md = EVP_get_digestbyname("md_gost94");
21862	if(!md) return 1;
21863	memset(digest, 0, sizeof(digest));
21864	ctx = EVP_MD_CTX_create();
21865	if(!ctx) return 2;
21866	if(!EVP_DigestInit_ex(ctx, md, NULL)) return 3;
21867	if(!EVP_DigestUpdate(ctx, str, 10)) return 4;
21868	if(!EVP_DigestFinal_ex(ctx, digest, NULL)) return 5;
21869	/* uncomment to see the hash calculated.
21870		{int i;
21871		for(i=0; i<32; i++)
21872			printf(" %2.2x", (int)digest[i]);
21873		printf("\n");}
21874	*/
21875	if(memcmp(digest, check, sizeof(check)) != 0)
21876		return 6;
21877	return 0;
21878}
21879
21880_ACEOF
21881if ac_fn_c_try_run "$LINENO"
21882then :
21883  eval "ac_cv_c_gost_works=yes"
21884else case e in #(
21885  e) eval "ac_cv_c_gost_works=no" ;;
21886esac
21887fi
21888rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21889  conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
21890esac
21891fi
21892
21893CFLAGS="$BAKCFLAGS"
21894else
21895eval "ac_cv_c_gost_works=maybe"
21896fi
21897{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_gost_works" >&5
21898printf "%s\n" "$ac_cv_c_gost_works" >&6; }
21899
21900	if test "$ac_cv_c_gost_works" != no; then
21901		use_gost="yes"
21902
21903printf "%s\n" "#define USE_GOST 1" >>confdefs.h
21904
21905	fi
21906	;;
21907esac
21908fi
21909# Check whether --enable-ecdsa was given.
21910if test ${enable_ecdsa+y}
21911then :
21912  enableval=$enable_ecdsa;
21913fi
21914
21915use_ecdsa="no"
21916case "$enable_ecdsa" in
21917    no)
21918      ;;
21919    *)
21920      if test $USE_NSS = "no" -a $USE_NETTLE = "no"; then
21921	      ac_fn_c_check_func "$LINENO" "EVP_PKEY_fromdata" "ac_cv_func_EVP_PKEY_fromdata"
21922if test "x$ac_cv_func_EVP_PKEY_fromdata" = xyes
21923then :
21924
21925	          # with EVP_PKEY_fromdata, check if EC is not disabled
21926	          ac_fn_check_decl "$LINENO" "OPENSSL_NO_EC" "ac_cv_have_decl_OPENSSL_NO_EC" "$ac_includes_default
21927#include <openssl/evp.h>
21928
21929" "$ac_c_undeclared_builtin_options" "CFLAGS"
21930if test "x$ac_cv_have_decl_OPENSSL_NO_EC" = xyes
21931then :
21932  as_fn_error $? "OpenSSL does not support ECDSA: please upgrade or rerun with --disable-ecdsa" "$LINENO" 5
21933
21934fi
21935
21936else case e in #(
21937  e)
21938		  # without EVP_PKEY_fromdata, older openssl, check for support
21939		  ac_fn_c_check_func "$LINENO" "ECDSA_sign" "ac_cv_func_ECDSA_sign"
21940if test "x$ac_cv_func_ECDSA_sign" = xyes
21941then :
21942
21943else case e in #(
21944  e) as_fn_error $? "OpenSSL does not support ECDSA: please upgrade or rerun with --disable-ecdsa" "$LINENO" 5 ;;
21945esac
21946fi
21947
21948		  ac_fn_c_check_func "$LINENO" "SHA384_Init" "ac_cv_func_SHA384_Init"
21949if test "x$ac_cv_func_SHA384_Init" = xyes
21950then :
21951
21952else case e in #(
21953  e) as_fn_error $? "OpenSSL does not support SHA384: please upgrade or rerun with --disable-ecdsa" "$LINENO" 5 ;;
21954esac
21955fi
21956
21957		 ;;
21958esac
21959fi
21960
21961	      ac_fn_check_decl "$LINENO" "NID_X9_62_prime256v1" "ac_cv_have_decl_NID_X9_62_prime256v1" "$ac_includes_default
21962#include <openssl/evp.h>
21963
21964" "$ac_c_undeclared_builtin_options" "CFLAGS"
21965if test "x$ac_cv_have_decl_NID_X9_62_prime256v1" = xyes
21966then :
21967  ac_have_decl=1
21968else case e in #(
21969  e) ac_have_decl=0 ;;
21970esac
21971fi
21972printf "%s\n" "#define HAVE_DECL_NID_X9_62_PRIME256V1 $ac_have_decl" >>confdefs.h
21973if test $ac_have_decl = 1
21974then :
21975
21976else case e in #(
21977  e) as_fn_error $? "OpenSSL does not support the ECDSA curves: please upgrade or rerun with --disable-ecdsa" "$LINENO" 5 ;;
21978esac
21979fi
21980ac_fn_check_decl "$LINENO" "NID_secp384r1" "ac_cv_have_decl_NID_secp384r1" "$ac_includes_default
21981#include <openssl/evp.h>
21982
21983" "$ac_c_undeclared_builtin_options" "CFLAGS"
21984if test "x$ac_cv_have_decl_NID_secp384r1" = xyes
21985then :
21986  ac_have_decl=1
21987else case e in #(
21988  e) ac_have_decl=0 ;;
21989esac
21990fi
21991printf "%s\n" "#define HAVE_DECL_NID_SECP384R1 $ac_have_decl" >>confdefs.h
21992if test $ac_have_decl = 1
21993then :
21994
21995else case e in #(
21996  e) as_fn_error $? "OpenSSL does not support the ECDSA curves: please upgrade or rerun with --disable-ecdsa" "$LINENO" 5 ;;
21997esac
21998fi
21999
22000	      # see if OPENSSL 1.0.0 or later (has EVP MD and Verify independency)
22001	      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if openssl supports SHA2 and ECDSA with EVP" >&5
22002printf %s "checking if openssl supports SHA2 and ECDSA with EVP... " >&6; }
22003	      if grep OPENSSL_VERSION_TEXT $ssldir_include/openssl/opensslv.h | grep "OpenSSL" >/dev/null; then
22004		if grep OPENSSL_VERSION_NUMBER $ssldir_include/openssl/opensslv.h | grep 0x0 >/dev/null; then
22005		  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
22006printf "%s\n" "no" >&6; }
22007
22008printf "%s\n" "#define USE_ECDSA_EVP_WORKAROUND 1" >>confdefs.h
22009
22010		else
22011		  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
22012printf "%s\n" "yes" >&6; }
22013		fi
22014	      else
22015		# not OpenSSL, thus likely LibreSSL, which supports it
22016		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
22017printf "%s\n" "yes" >&6; }
22018	      fi
22019      fi
22020      # we now know we have ECDSA and the required curves.
22021
22022printf "%s\n" "#define USE_ECDSA 1" >>confdefs.h
22023
22024      use_ecdsa="yes"
22025      ;;
22026esac
22027
22028# Check whether --enable-dsa was given.
22029if test ${enable_dsa+y}
22030then :
22031  enableval=$enable_dsa;
22032fi
22033
22034use_dsa="no"
22035case "$enable_dsa" in
22036    yes)
22037      # detect if DSA is supported, and turn it off if not.
22038      if test $USE_NSS = "no" -a $USE_NETTLE = "no"; then
22039      ac_fn_c_check_func "$LINENO" "DSA_SIG_new" "ac_cv_func_DSA_SIG_new"
22040if test "x$ac_cv_func_DSA_SIG_new" = xyes
22041then :
22042
22043      as_ac_Type=`printf "%s\n" "ac_cv_type_DSA_SIG*" | sed "$as_sed_sh"`
22044ac_fn_c_check_type "$LINENO" "DSA_SIG*" "$as_ac_Type" "
22045$ac_includes_default
22046#ifdef HAVE_OPENSSL_ERR_H
22047#include <openssl/err.h>
22048#endif
22049
22050#ifdef HAVE_OPENSSL_RAND_H
22051#include <openssl/rand.h>
22052#endif
22053
22054#ifdef HAVE_OPENSSL_CONF_H
22055#include <openssl/conf.h>
22056#endif
22057
22058#ifdef HAVE_OPENSSL_ENGINE_H
22059#include <openssl/engine.h>
22060#endif
22061
22062"
22063if eval test \"x\$"$as_ac_Type"\" = x"yes"
22064then :
22065
22066
22067printf "%s\n" "#define USE_DSA 1" >>confdefs.h
22068
22069
22070else case e in #(
22071  e) if test "x$enable_dsa" = "xyes"; then as_fn_error $? "OpenSSL does not support DSA and you used --enable-dsa." "$LINENO" 5
22072               fi  ;;
22073esac
22074fi
22075
22076
22077else case e in #(
22078  e) if test "x$enable_dsa" = "xyes"; then as_fn_error $? "OpenSSL does not support DSA and you used --enable-dsa." "$LINENO" 5
22079               fi  ;;
22080esac
22081fi
22082
22083      else
22084
22085printf "%s\n" "#define USE_DSA 1" >>confdefs.h
22086
22087      fi
22088      ;;
22089    *)
22090      # disable dsa by default, RFC 8624 section 3.1, validators MUST NOT
22091      # support DSA for DNSSEC Validation.
22092      ;;
22093esac
22094
22095
22096# Check whether --with-deprecate-rsa-1024 was given.
22097if test ${with_deprecate_rsa_1024+y}
22098then :
22099  withval=$with_deprecate_rsa_1024;
22100fi
22101
22102if test "$with_deprecate_rsa_1024" = "yes"; then
22103
22104printf "%s\n" "#define DEPRECATE_RSA_1024 1" >>confdefs.h
22105
22106fi
22107
22108# Check whether --enable-ed25519 was given.
22109if test ${enable_ed25519+y}
22110then :
22111  enableval=$enable_ed25519;
22112fi
22113
22114use_ed25519="no"
22115case "$enable_ed25519" in
22116    no)
22117      ;;
22118    *)
22119      if test $USE_NSS = "no" -a $USE_NETTLE = "no"; then
22120	      ac_fn_check_decl "$LINENO" "NID_ED25519" "ac_cv_have_decl_NID_ED25519" "$ac_includes_default
22121#include <openssl/evp.h>
22122
22123" "$ac_c_undeclared_builtin_options" "CFLAGS"
22124if test "x$ac_cv_have_decl_NID_ED25519" = xyes
22125then :
22126  ac_have_decl=1
22127else case e in #(
22128  e) ac_have_decl=0 ;;
22129esac
22130fi
22131printf "%s\n" "#define HAVE_DECL_NID_ED25519 $ac_have_decl" >>confdefs.h
22132if test $ac_have_decl = 1
22133then :
22134
22135      		use_ed25519="yes"
22136
22137else case e in #(
22138  e)  if test "x$enable_ed25519" = "xyes"; then as_fn_error $? "OpenSSL does not support ED25519 and you used --enable-ed25519." "$LINENO" 5
22139	      	fi  ;;
22140esac
22141fi
22142
22143      fi
22144      if test $USE_NETTLE = "yes"; then
22145		       for ac_header in nettle/eddsa.h
22146do :
22147  ac_fn_c_check_header_compile "$LINENO" "nettle/eddsa.h" "ac_cv_header_nettle_eddsa_h" "$ac_includes_default
22148"
22149if test "x$ac_cv_header_nettle_eddsa_h" = xyes
22150then :
22151  printf "%s\n" "#define HAVE_NETTLE_EDDSA_H 1" >>confdefs.h
22152 use_ed25519="yes"
22153fi
22154
22155done
22156      fi
22157      if test $use_ed25519 = "yes"; then
22158
22159printf "%s\n" "#define USE_ED25519 1" >>confdefs.h
22160
22161      fi
22162      ;;
22163esac
22164
22165# Check whether --enable-ed448 was given.
22166if test ${enable_ed448+y}
22167then :
22168  enableval=$enable_ed448;
22169fi
22170
22171use_ed448="no"
22172case "$enable_ed448" in
22173    no)
22174      ;;
22175    *)
22176      if test $USE_NSS = "no" -a $USE_NETTLE = "no"; then
22177	      ac_fn_check_decl "$LINENO" "NID_ED448" "ac_cv_have_decl_NID_ED448" "$ac_includes_default
22178#include <openssl/evp.h>
22179
22180" "$ac_c_undeclared_builtin_options" "CFLAGS"
22181if test "x$ac_cv_have_decl_NID_ED448" = xyes
22182then :
22183  ac_have_decl=1
22184else case e in #(
22185  e) ac_have_decl=0 ;;
22186esac
22187fi
22188printf "%s\n" "#define HAVE_DECL_NID_ED448 $ac_have_decl" >>confdefs.h
22189if test $ac_have_decl = 1
22190then :
22191
22192      		use_ed448="yes"
22193
22194else case e in #(
22195  e)  if test "x$enable_ed448" = "xyes"; then as_fn_error $? "OpenSSL does not support ED448 and you used --enable-ed448." "$LINENO" 5
22196	      	fi  ;;
22197esac
22198fi
22199
22200      fi
22201      if test $use_ed448 = "yes"; then
22202
22203printf "%s\n" "#define USE_ED448 1" >>confdefs.h
22204
22205      fi
22206      ;;
22207esac
22208
22209# Check whether --enable-event-api was given.
22210if test ${enable_event_api+y}
22211then :
22212  enableval=$enable_event_api;
22213fi
22214
22215case "$enable_event_api" in
22216    yes)
22217      UNBOUND_EVENT_INSTALL=unbound-event-install
22218
22219      UNBOUND_EVENT_UNINSTALL=unbound-event-uninstall
22220
22221      ;;
22222    *)
22223      ;;
22224esac
22225
22226# Check whether --enable-tfo-client was given.
22227if test ${enable_tfo_client+y}
22228then :
22229  enableval=$enable_tfo_client;
22230fi
22231
22232case "$enable_tfo_client" in
22233	yes)
22234		case "$host_os" in
22235			linux*) ac_fn_check_decl "$LINENO" "MSG_FASTOPEN" "ac_cv_have_decl_MSG_FASTOPEN" "$ac_includes_default
22236#include <netinet/tcp.h>
22237
22238" "$ac_c_undeclared_builtin_options" "CFLAGS"
22239if test "x$ac_cv_have_decl_MSG_FASTOPEN" = xyes
22240then :
22241  { 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
22242printf "%s\n" "$as_me: WARNING: Check the platform specific TFO kernel parameters are correctly configured to support client mode TFO" >&2;}
22243else case e in #(
22244  e) as_fn_error $? "TCP Fast Open is not available for client mode: please rerun without --enable-tfo-client" "$LINENO" 5 ;;
22245esac
22246fi
22247
22248printf "%s\n" "#define USE_MSG_FASTOPEN 1" >>confdefs.h
22249
22250				;;
22251			darwin*) ac_fn_check_decl "$LINENO" "CONNECT_RESUME_ON_READ_WRITE" "ac_cv_have_decl_CONNECT_RESUME_ON_READ_WRITE" "$ac_includes_default
22252#include <sys/socket.h>
22253
22254" "$ac_c_undeclared_builtin_options" "CFLAGS"
22255if test "x$ac_cv_have_decl_CONNECT_RESUME_ON_READ_WRITE" = xyes
22256then :
22257  { 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
22258printf "%s\n" "$as_me: WARNING: Check the platform specific TFO kernel parameters are correctly configured to support client mode TFO" >&2;}
22259else case e in #(
22260  e) as_fn_error $? "TCP Fast Open is not available for client mode: please rerun without --enable-tfo-client" "$LINENO" 5 ;;
22261esac
22262fi
22263
22264printf "%s\n" "#define USE_OSX_MSG_FASTOPEN 1" >>confdefs.h
22265
22266				;;
22267		esac
22268		;;
22269	no|*)
22270		;;
22271esac
22272
22273# Check whether --enable-tfo-server was given.
22274if test ${enable_tfo_server+y}
22275then :
22276  enableval=$enable_tfo_server;
22277fi
22278
22279case "$enable_tfo_server" in
22280	yes)
22281	      ac_fn_check_decl "$LINENO" "TCP_FASTOPEN" "ac_cv_have_decl_TCP_FASTOPEN" "$ac_includes_default
22282#include <netinet/tcp.h>
22283
22284" "$ac_c_undeclared_builtin_options" "CFLAGS"
22285if test "x$ac_cv_have_decl_TCP_FASTOPEN" = xyes
22286then :
22287  { 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
22288printf "%s\n" "$as_me: WARNING: Check the platform specific TFO kernel parameters are correctly configured to support server mode TFO" >&2;}
22289else case e in #(
22290  e) as_fn_error $? "TCP Fast Open is not available for server mode: please rerun without --enable-tfo-server" "$LINENO" 5 ;;
22291esac
22292fi
22293
22294printf "%s\n" "#define USE_TCP_FASTOPEN 1" >>confdefs.h
22295
22296		;;
22297	no|*)
22298		;;
22299esac
22300
22301# check for libevent
22302
22303# Check whether --with-libevent was given.
22304if test ${with_libevent+y}
22305then :
22306  withval=$with_libevent;
22307else case e in #(
22308  e)  with_libevent="no"  ;;
22309esac
22310fi
22311
22312if test "x_$with_libevent" != x_no; then
22313
22314printf "%s\n" "#define USE_LIBEVENT 1" >>confdefs.h
22315
22316        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libevent" >&5
22317printf %s "checking for libevent... " >&6; }
22318        if test "x_$with_libevent" = x_ -o "x_$with_libevent" = x_yes; then
22319            with_libevent="/usr/local /opt/local /usr/lib /usr/pkg /usr/sfw /usr"
22320        fi
22321        for dir in $with_libevent; do
22322            thedir="$dir"
22323            if test -f "$dir/include/event.h" -o -f "$dir/include/event2/event.h"; then
22324                found_libevent="yes"
22325								if test "$thedir" != "/usr"; then
22326				    CPPFLAGS="$CPPFLAGS -I$thedir/include"
22327				fi
22328				break;
22329		    fi
22330        done
22331        if test x_$found_libevent != x_yes; then
22332		if test -f "$dir/event.h" -a \( -f "$dir/libevent.la" -o -f "$dir/libev.la" \) ; then
22333			# libevent source directory
22334			{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: found in $thedir" >&5
22335printf "%s\n" "found in $thedir" >&6; }
22336			CPPFLAGS="$CPPFLAGS -I$thedir -I$thedir/include"
22337			BAK_LDFLAGS_SET="1"
22338			BAK_LDFLAGS="$LDFLAGS"
22339			# remove evdns from linking
22340			mkdir build >/dev/null 2>&1
22341			mkdir build/libevent >/dev/null 2>&1
22342			mkdir build/libevent/.libs >/dev/null 2>&1
22343			ev_files_o=`ls $thedir/*.o | grep -v evdns\.o | grep -v bufferevent_openssl\.o`
22344			ev_files_lo=`ls $thedir/*.lo | grep -v evdns\.lo | grep -v bufferevent_openssl\.lo`
22345			ev_files_libso=`ls $thedir/.libs/*.o | grep -v evdns\.o | grep -v bufferevent_openssl\.o`
22346			cp $ev_files_o build/libevent
22347			cp $ev_files_lo build/libevent
22348			cp $ev_files_libso build/libevent/.libs
22349			LATE_LDFLAGS="build/libevent/*.lo -lm"
22350			LDFLAGS="build/libevent/*.o $LDFLAGS -lm"
22351		else
22352            as_fn_error $? "Cannot find the libevent library in $with_libevent
22353You can restart ./configure --with-libevent=no to use a builtin alternative.
22354Please note that this alternative is not as capable as libevent when using
22355large outgoing port ranges.  " "$LINENO" 5
22356		fi
22357        else
22358            { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: found in $thedir" >&5
22359printf "%s\n" "found in $thedir" >&6; }
22360	    	    if test ! -f $thedir/lib/libevent.a -a ! -f $thedir/lib/libevent.so -a -d "$thedir/lib/event2"; then
22361		    LDFLAGS="$LDFLAGS -L$thedir/lib/event2"
22362
22363	if test "x$enable_rpath" = xyes; then
22364		if echo "$thedir/lib/event2" | grep "^/" >/dev/null; then
22365			RUNTIME_PATH="$RUNTIME_PATH -R$thedir/lib/event2"
22366		fi
22367	fi
22368
22369	    else
22370		    		    if test "$thedir" != "/usr" -a "$thedir" != ""; then
22371			LDFLAGS="$LDFLAGS -L$thedir/lib"
22372
22373	if test "x$enable_rpath" = xyes; then
22374		if echo "$thedir/lib" | grep "^/" >/dev/null; then
22375			RUNTIME_PATH="$RUNTIME_PATH -R$thedir/lib"
22376		fi
22377	fi
22378
22379		    fi
22380	    fi
22381        fi
22382	# check for library used by libevent after 1.3c
22383	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5
22384printf %s "checking for library containing clock_gettime... " >&6; }
22385if test ${ac_cv_search_clock_gettime+y}
22386then :
22387  printf %s "(cached) " >&6
22388else case e in #(
22389  e) ac_func_search_save_LIBS=$LIBS
22390cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22391/* end confdefs.h.  */
22392
22393/* Override any GCC internal prototype to avoid an error.
22394   Use char because int might match the return type of a GCC
22395   builtin and then its argument prototype would still apply.
22396   The 'extern "C"' is for builds by C++ compilers;
22397   although this is not generally supported in C code supporting it here
22398   has little cost and some practical benefit (sr 110532).  */
22399#ifdef __cplusplus
22400extern "C"
22401#endif
22402char clock_gettime (void);
22403int
22404main (void)
22405{
22406return clock_gettime ();
22407  ;
22408  return 0;
22409}
22410_ACEOF
22411for ac_lib in '' rt
22412do
22413  if test -z "$ac_lib"; then
22414    ac_res="none required"
22415  else
22416    ac_res=-l$ac_lib
22417    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
22418  fi
22419  if ac_fn_c_try_link "$LINENO"
22420then :
22421  ac_cv_search_clock_gettime=$ac_res
22422fi
22423rm -f core conftest.err conftest.$ac_objext conftest.beam \
22424    conftest$ac_exeext
22425  if test ${ac_cv_search_clock_gettime+y}
22426then :
22427  break
22428fi
22429done
22430if test ${ac_cv_search_clock_gettime+y}
22431then :
22432
22433else case e in #(
22434  e) ac_cv_search_clock_gettime=no ;;
22435esac
22436fi
22437rm conftest.$ac_ext
22438LIBS=$ac_func_search_save_LIBS ;;
22439esac
22440fi
22441{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5
22442printf "%s\n" "$ac_cv_search_clock_gettime" >&6; }
22443ac_res=$ac_cv_search_clock_gettime
22444if test "$ac_res" != no
22445then :
22446  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
22447
22448fi
22449
22450
22451	# is the event.h header libev or libevent?
22452	ac_fn_c_check_header_compile "$LINENO" "event.h" "ac_cv_header_event_h" "$ac_includes_default
22453"
22454if test "x$ac_cv_header_event_h" = xyes
22455then :
22456  printf "%s\n" "#define HAVE_EVENT_H 1" >>confdefs.h
22457
22458fi
22459
22460	ac_fn_check_decl "$LINENO" "EV_VERSION_MAJOR" "ac_cv_have_decl_EV_VERSION_MAJOR" "$ac_includes_default
22461#include <event.h>
22462
22463" "$ac_c_undeclared_builtin_options" "CFLAGS"
22464if test "x$ac_cv_have_decl_EV_VERSION_MAJOR" = xyes
22465then :
22466
22467		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing event_set" >&5
22468printf %s "checking for library containing event_set... " >&6; }
22469if test ${ac_cv_search_event_set+y}
22470then :
22471  printf %s "(cached) " >&6
22472else case e in #(
22473  e) ac_func_search_save_LIBS=$LIBS
22474cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22475/* end confdefs.h.  */
22476
22477/* Override any GCC internal prototype to avoid an error.
22478   Use char because int might match the return type of a GCC
22479   builtin and then its argument prototype would still apply.
22480   The 'extern "C"' is for builds by C++ compilers;
22481   although this is not generally supported in C code supporting it here
22482   has little cost and some practical benefit (sr 110532).  */
22483#ifdef __cplusplus
22484extern "C"
22485#endif
22486char event_set (void);
22487int
22488main (void)
22489{
22490return event_set ();
22491  ;
22492  return 0;
22493}
22494_ACEOF
22495for ac_lib in '' ev
22496do
22497  if test -z "$ac_lib"; then
22498    ac_res="none required"
22499  else
22500    ac_res=-l$ac_lib
22501    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
22502  fi
22503  if ac_fn_c_try_link "$LINENO"
22504then :
22505  ac_cv_search_event_set=$ac_res
22506fi
22507rm -f core conftest.err conftest.$ac_objext conftest.beam \
22508    conftest$ac_exeext
22509  if test ${ac_cv_search_event_set+y}
22510then :
22511  break
22512fi
22513done
22514if test ${ac_cv_search_event_set+y}
22515then :
22516
22517else case e in #(
22518  e) ac_cv_search_event_set=no ;;
22519esac
22520fi
22521rm conftest.$ac_ext
22522LIBS=$ac_func_search_save_LIBS ;;
22523esac
22524fi
22525{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_event_set" >&5
22526printf "%s\n" "$ac_cv_search_event_set" >&6; }
22527ac_res=$ac_cv_search_event_set
22528if test "$ac_res" != no
22529then :
22530  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
22531
22532fi
22533
22534
22535else case e in #(
22536  e)
22537		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing event_set" >&5
22538printf %s "checking for library containing event_set... " >&6; }
22539if test ${ac_cv_search_event_set+y}
22540then :
22541  printf %s "(cached) " >&6
22542else case e in #(
22543  e) ac_func_search_save_LIBS=$LIBS
22544cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22545/* end confdefs.h.  */
22546
22547/* Override any GCC internal prototype to avoid an error.
22548   Use char because int might match the return type of a GCC
22549   builtin and then its argument prototype would still apply.
22550   The 'extern "C"' is for builds by C++ compilers;
22551   although this is not generally supported in C code supporting it here
22552   has little cost and some practical benefit (sr 110532).  */
22553#ifdef __cplusplus
22554extern "C"
22555#endif
22556char event_set (void);
22557int
22558main (void)
22559{
22560return event_set ();
22561  ;
22562  return 0;
22563}
22564_ACEOF
22565for ac_lib in '' event
22566do
22567  if test -z "$ac_lib"; then
22568    ac_res="none required"
22569  else
22570    ac_res=-l$ac_lib
22571    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
22572  fi
22573  if ac_fn_c_try_link "$LINENO"
22574then :
22575  ac_cv_search_event_set=$ac_res
22576fi
22577rm -f core conftest.err conftest.$ac_objext conftest.beam \
22578    conftest$ac_exeext
22579  if test ${ac_cv_search_event_set+y}
22580then :
22581  break
22582fi
22583done
22584if test ${ac_cv_search_event_set+y}
22585then :
22586
22587else case e in #(
22588  e) ac_cv_search_event_set=no ;;
22589esac
22590fi
22591rm conftest.$ac_ext
22592LIBS=$ac_func_search_save_LIBS ;;
22593esac
22594fi
22595{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_event_set" >&5
22596printf "%s\n" "$ac_cv_search_event_set" >&6; }
22597ac_res=$ac_cv_search_event_set
22598if test "$ac_res" != no
22599then :
22600  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
22601
22602fi
22603
22604	 ;;
22605esac
22606fi
22607	ac_fn_c_check_func "$LINENO" "event_base_free" "ac_cv_func_event_base_free"
22608if test "x$ac_cv_func_event_base_free" = xyes
22609then :
22610  printf "%s\n" "#define HAVE_EVENT_BASE_FREE 1" >>confdefs.h
22611
22612fi
22613 # only in libevent 1.2 and later
22614	ac_fn_c_check_func "$LINENO" "event_base_once" "ac_cv_func_event_base_once"
22615if test "x$ac_cv_func_event_base_once" = xyes
22616then :
22617  printf "%s\n" "#define HAVE_EVENT_BASE_ONCE 1" >>confdefs.h
22618
22619fi
22620 # only in libevent 1.4.1 and later
22621	ac_fn_c_check_func "$LINENO" "event_base_new" "ac_cv_func_event_base_new"
22622if test "x$ac_cv_func_event_base_new" = xyes
22623then :
22624  printf "%s\n" "#define HAVE_EVENT_BASE_NEW 1" >>confdefs.h
22625
22626fi
22627 # only in libevent 1.4.1 and later
22628	ac_fn_c_check_func "$LINENO" "event_base_get_method" "ac_cv_func_event_base_get_method"
22629if test "x$ac_cv_func_event_base_get_method" = xyes
22630then :
22631  printf "%s\n" "#define HAVE_EVENT_BASE_GET_METHOD 1" >>confdefs.h
22632
22633fi
22634 # only in libevent 1.4.3 and later
22635	ac_fn_c_check_func "$LINENO" "ev_loop" "ac_cv_func_ev_loop"
22636if test "x$ac_cv_func_ev_loop" = xyes
22637then :
22638  printf "%s\n" "#define HAVE_EV_LOOP 1" >>confdefs.h
22639
22640fi
22641 # only in libev. (tested on 3.51)
22642	ac_fn_c_check_func "$LINENO" "ev_default_loop" "ac_cv_func_ev_default_loop"
22643if test "x$ac_cv_func_ev_default_loop" = xyes
22644then :
22645  printf "%s\n" "#define HAVE_EV_DEFAULT_LOOP 1" >>confdefs.h
22646
22647fi
22648 # only in libev. (tested on 4.00)
22649	ac_fn_c_check_func "$LINENO" "event_assign" "ac_cv_func_event_assign"
22650if test "x$ac_cv_func_event_assign" = xyes
22651then :
22652  printf "%s\n" "#define HAVE_EVENT_ASSIGN 1" >>confdefs.h
22653
22654fi
22655 # in libevent, for thread-safety
22656	ac_fn_check_decl "$LINENO" "evsignal_assign" "ac_cv_have_decl_evsignal_assign" "$ac_includes_default
22657#ifdef HAVE_EVENT_H
22658#  include <event.h>
22659#else
22660#  include \"event2/event.h\"
22661#endif
22662
22663" "$ac_c_undeclared_builtin_options" "CFLAGS"
22664if test "x$ac_cv_have_decl_evsignal_assign" = xyes
22665then :
22666  ac_have_decl=1
22667else case e in #(
22668  e) ac_have_decl=0 ;;
22669esac
22670fi
22671printf "%s\n" "#define HAVE_DECL_EVSIGNAL_ASSIGN $ac_have_decl" >>confdefs.h
22672
22673        PC_LIBEVENT_DEPENDENCY="libevent"
22674
22675	if test -n "$BAK_LDFLAGS_SET"; then
22676		LDFLAGS="$BAK_LDFLAGS"
22677	fi
22678else
22679
22680printf "%s\n" "#define USE_MINI_EVENT 1" >>confdefs.h
22681
22682fi
22683
22684# check for libexpat
22685
22686# Check whether --with-libexpat was given.
22687if test ${with_libexpat+y}
22688then :
22689  withval=$with_libexpat;
22690else case e in #(
22691  e)  withval="/usr/local /opt/local /usr/lib /usr/pkg /usr/sfw /usr"  ;;
22692esac
22693fi
22694
22695{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libexpat" >&5
22696printf %s "checking for libexpat... " >&6; }
22697found_libexpat="no"
22698for dir in $withval ; do
22699            if test -f "$dir/include/expat.h"; then
22700		found_libexpat="yes"
22701				if test "$dir" != "/usr"; then
22702                    CPPFLAGS="$CPPFLAGS -I$dir/include"
22703		    LDFLAGS="$LDFLAGS -L$dir/lib"
22704		fi
22705            	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: found in $dir" >&5
22706printf "%s\n" "found in $dir" >&6; }
22707                break;
22708            fi
22709done
22710if test x_$found_libexpat != x_yes; then
22711	as_fn_error $? "Could not find libexpat, expat.h" "$LINENO" 5
22712fi
22713ac_fn_c_check_header_compile "$LINENO" "expat.h" "ac_cv_header_expat_h" "$ac_includes_default
22714"
22715if test "x$ac_cv_header_expat_h" = xyes
22716then :
22717  printf "%s\n" "#define HAVE_EXPAT_H 1" >>confdefs.h
22718
22719fi
22720
22721ac_fn_check_decl "$LINENO" "XML_StopParser" "ac_cv_have_decl_XML_StopParser" "$ac_includes_default
22722#include <expat.h>
22723
22724" "$ac_c_undeclared_builtin_options" "CFLAGS"
22725if test "x$ac_cv_have_decl_XML_StopParser" = xyes
22726then :
22727  ac_have_decl=1
22728else case e in #(
22729  e) ac_have_decl=0 ;;
22730esac
22731fi
22732printf "%s\n" "#define HAVE_DECL_XML_STOPPARSER $ac_have_decl" >>confdefs.h
22733
22734
22735# hiredis (redis C client for cachedb)
22736
22737# Check whether --with-libhiredis was given.
22738if test ${with_libhiredis+y}
22739then :
22740  withval=$with_libhiredis;
22741else case e in #(
22742  e)  withval="no"  ;;
22743esac
22744fi
22745
22746found_libhiredis="no"
22747if test x_$withval = x_yes -o x_$withval != x_no; then
22748   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libhiredis" >&5
22749printf %s "checking for libhiredis... " >&6; }
22750   if test x_$withval = x_ -o x_$withval = x_yes; then
22751            withval="/usr/local /opt/local /usr/lib /usr/pkg /usr/sfw /usr"
22752   fi
22753   for dir in $withval ; do
22754            if test -f "$dir/include/hiredis/hiredis.h"; then
22755		found_libhiredis="yes"
22756				if test "$dir" != "/usr"; then
22757                    CPPFLAGS="$CPPFLAGS -I$dir/include"
22758		    LDFLAGS="$LDFLAGS -L$dir/lib"
22759		fi
22760		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: found in $dir" >&5
22761printf "%s\n" "found in $dir" >&6; }
22762
22763printf "%s\n" "#define USE_REDIS 1" >>confdefs.h
22764
22765		LIBS="$LIBS -lhiredis"
22766                break;
22767            fi
22768    done
22769    if test x_$found_libhiredis != x_yes; then
22770	as_fn_error $? "Could not find libhiredis, hiredis.h" "$LINENO" 5
22771    fi
22772    ac_fn_c_check_header_compile "$LINENO" "hiredis/hiredis.h" "ac_cv_header_hiredis_hiredis_h" "$ac_includes_default
22773"
22774if test "x$ac_cv_header_hiredis_hiredis_h" = xyes
22775then :
22776  printf "%s\n" "#define HAVE_HIREDIS_HIREDIS_H 1" >>confdefs.h
22777
22778fi
22779
22780    ac_fn_check_decl "$LINENO" "redisConnect" "ac_cv_have_decl_redisConnect" "$ac_includes_default
22781    #include <hiredis/hiredis.h>
22782
22783" "$ac_c_undeclared_builtin_options" "CFLAGS"
22784if test "x$ac_cv_have_decl_redisConnect" = xyes
22785then :
22786  ac_have_decl=1
22787else case e in #(
22788  e) ac_have_decl=0 ;;
22789esac
22790fi
22791printf "%s\n" "#define HAVE_DECL_REDISCONNECT $ac_have_decl" >>confdefs.h
22792
22793fi
22794
22795# nghttp2
22796
22797# Check whether --with-libnghttp2 was given.
22798if test ${with_libnghttp2+y}
22799then :
22800  withval=$with_libnghttp2;
22801else case e in #(
22802  e)  withval="no"  ;;
22803esac
22804fi
22805
22806found_libnghttp2="no"
22807if test x_$withval = x_yes -o x_$withval != x_no; then
22808   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libnghttp2" >&5
22809printf %s "checking for libnghttp2... " >&6; }
22810   if test x_$withval = x_ -o x_$withval = x_yes; then
22811            withval="/usr/local /opt/local /usr/lib /usr/pkg /usr/sfw /usr"
22812   fi
22813   for dir in $withval ; do
22814            if test -f "$dir/include/nghttp2/nghttp2.h"; then
22815		found_libnghttp2="yes"
22816				if test "$dir" != "/usr"; then
22817                    CPPFLAGS="$CPPFLAGS -I$dir/include"
22818		    LDFLAGS="$LDFLAGS -L$dir/lib"
22819		fi
22820		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: found in $dir" >&5
22821printf "%s\n" "found in $dir" >&6; }
22822
22823printf "%s\n" "#define HAVE_NGHTTP2 1" >>confdefs.h
22824
22825		LIBS="$LIBS -lnghttp2"
22826                break;
22827            fi
22828    done
22829    if test x_$found_libnghttp2 != x_yes; then
22830	as_fn_error $? "Could not find libnghttp2, nghttp2.h" "$LINENO" 5
22831    fi
22832    ac_fn_c_check_header_compile "$LINENO" "nghttp2/nghttp2.h" "ac_cv_header_nghttp2_nghttp2_h" "$ac_includes_default
22833"
22834if test "x$ac_cv_header_nghttp2_nghttp2_h" = xyes
22835then :
22836  printf "%s\n" "#define HAVE_NGHTTP2_NGHTTP2_H 1" >>confdefs.h
22837
22838fi
22839
22840    ac_fn_check_decl "$LINENO" "nghttp2_session_server_new" "ac_cv_have_decl_nghttp2_session_server_new" "$ac_includes_default
22841    #include <nghttp2/nghttp2.h>
22842
22843" "$ac_c_undeclared_builtin_options" "CFLAGS"
22844if test "x$ac_cv_have_decl_nghttp2_session_server_new" = xyes
22845then :
22846  ac_have_decl=1
22847else case e in #(
22848  e) ac_have_decl=0 ;;
22849esac
22850fi
22851printf "%s\n" "#define HAVE_DECL_NGHTTP2_SESSION_SERVER_NEW $ac_have_decl" >>confdefs.h
22852
22853fi
22854
22855# ngtcp2
22856
22857# Check whether --with-libngtcp2 was given.
22858if test ${with_libngtcp2+y}
22859then :
22860  withval=$with_libngtcp2;
22861else case e in #(
22862  e)  withval="no"  ;;
22863esac
22864fi
22865
22866found_libngtcp2="no"
22867if test x_$withval = x_yes -o x_$withval != x_no; then
22868   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libngtcp2" >&5
22869printf %s "checking for libngtcp2... " >&6; }
22870   if test x_$withval = x_ -o x_$withval = x_yes; then
22871            withval="/usr/local /opt/local /usr/lib /usr/pkg /usr/sfw /usr"
22872   fi
22873   for dir in $withval ; do
22874            if test -f "$dir/include/ngtcp2/ngtcp2.h"; then
22875		found_libngtcp2="yes"
22876				if test "$dir" != "/usr"; then
22877                    CPPFLAGS="$CPPFLAGS -I$dir/include"
22878		    LDFLAGS="$LDFLAGS -L$dir/lib"
22879		fi
22880		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: found in $dir" >&5
22881printf "%s\n" "found in $dir" >&6; }
22882
22883printf "%s\n" "#define HAVE_NGTCP2 1" >>confdefs.h
22884
22885		LIBS="$LIBS -lngtcp2"
22886                break;
22887            fi
22888    done
22889    if test x_$found_libngtcp2 != x_yes; then
22890	as_fn_error $? "Could not find libngtcp2, ngtcp2.h" "$LINENO" 5
22891    fi
22892    ac_fn_c_check_header_compile "$LINENO" "ngtcp2/ngtcp2.h" "ac_cv_header_ngtcp2_ngtcp2_h" "$ac_includes_default
22893"
22894if test "x$ac_cv_header_ngtcp2_ngtcp2_h" = xyes
22895then :
22896  printf "%s\n" "#define HAVE_NGTCP2_NGTCP2_H 1" >>confdefs.h
22897
22898fi
22899ac_fn_c_check_header_compile "$LINENO" "ngtcp2/ngtcp2_crypto_openssl.h" "ac_cv_header_ngtcp2_ngtcp2_crypto_openssl_h" "$ac_includes_default
22900"
22901if test "x$ac_cv_header_ngtcp2_ngtcp2_crypto_openssl_h" = xyes
22902then :
22903  printf "%s\n" "#define HAVE_NGTCP2_NGTCP2_CRYPTO_OPENSSL_H 1" >>confdefs.h
22904
22905fi
22906ac_fn_c_check_header_compile "$LINENO" "ngtcp2/ngtcp2_crypto_quictls.h" "ac_cv_header_ngtcp2_ngtcp2_crypto_quictls_h" "$ac_includes_default
22907"
22908if test "x$ac_cv_header_ngtcp2_ngtcp2_crypto_quictls_h" = xyes
22909then :
22910  printf "%s\n" "#define HAVE_NGTCP2_NGTCP2_CRYPTO_QUICTLS_H 1" >>confdefs.h
22911
22912fi
22913
22914    ac_fn_check_decl "$LINENO" "ngtcp2_conn_server_new" "ac_cv_have_decl_ngtcp2_conn_server_new" "$ac_includes_default
22915    #include <ngtcp2/ngtcp2.h>
22916
22917" "$ac_c_undeclared_builtin_options" "CFLAGS"
22918if test "x$ac_cv_have_decl_ngtcp2_conn_server_new" = xyes
22919then :
22920  ac_have_decl=1
22921else case e in #(
22922  e) ac_have_decl=0 ;;
22923esac
22924fi
22925printf "%s\n" "#define HAVE_DECL_NGTCP2_CONN_SERVER_NEW $ac_have_decl" >>confdefs.h
22926
22927    ac_fn_check_decl "$LINENO" "ngtcp2_crypto_encrypt_cb" "ac_cv_have_decl_ngtcp2_crypto_encrypt_cb" "$ac_includes_default
22928    #include <ngtcp2/ngtcp2_crypto.h>
22929
22930" "$ac_c_undeclared_builtin_options" "CFLAGS"
22931if test "x$ac_cv_have_decl_ngtcp2_crypto_encrypt_cb" = xyes
22932then :
22933  ac_have_decl=1
22934else case e in #(
22935  e) ac_have_decl=0 ;;
22936esac
22937fi
22938printf "%s\n" "#define HAVE_DECL_NGTCP2_CRYPTO_ENCRYPT_CB $ac_have_decl" >>confdefs.h
22939
22940    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ngtcp2_crypto_encrypt_cb in -lngtcp2_crypto_openssl" >&5
22941printf %s "checking for ngtcp2_crypto_encrypt_cb in -lngtcp2_crypto_openssl... " >&6; }
22942if test ${ac_cv_lib_ngtcp2_crypto_openssl_ngtcp2_crypto_encrypt_cb+y}
22943then :
22944  printf %s "(cached) " >&6
22945else case e in #(
22946  e) ac_check_lib_save_LIBS=$LIBS
22947LIBS="-lngtcp2_crypto_openssl  $LIBS"
22948cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22949/* end confdefs.h.  */
22950
22951/* Override any GCC internal prototype to avoid an error.
22952   Use char because int might match the return type of a GCC
22953   builtin and then its argument prototype would still apply.
22954   The 'extern "C"' is for builds by C++ compilers;
22955   although this is not generally supported in C code supporting it here
22956   has little cost and some practical benefit (sr 110532).  */
22957#ifdef __cplusplus
22958extern "C"
22959#endif
22960char ngtcp2_crypto_encrypt_cb (void);
22961int
22962main (void)
22963{
22964return ngtcp2_crypto_encrypt_cb ();
22965  ;
22966  return 0;
22967}
22968_ACEOF
22969if ac_fn_c_try_link "$LINENO"
22970then :
22971  ac_cv_lib_ngtcp2_crypto_openssl_ngtcp2_crypto_encrypt_cb=yes
22972else case e in #(
22973  e) ac_cv_lib_ngtcp2_crypto_openssl_ngtcp2_crypto_encrypt_cb=no ;;
22974esac
22975fi
22976rm -f core conftest.err conftest.$ac_objext conftest.beam \
22977    conftest$ac_exeext conftest.$ac_ext
22978LIBS=$ac_check_lib_save_LIBS ;;
22979esac
22980fi
22981{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ngtcp2_crypto_openssl_ngtcp2_crypto_encrypt_cb" >&5
22982printf "%s\n" "$ac_cv_lib_ngtcp2_crypto_openssl_ngtcp2_crypto_encrypt_cb" >&6; }
22983if test "x$ac_cv_lib_ngtcp2_crypto_openssl_ngtcp2_crypto_encrypt_cb" = xyes
22984then :
22985   LIBS="$LIBS -lngtcp2_crypto_openssl"
22986fi
22987
22988    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ngtcp2_crypto_encrypt_cb in -lngtcp2_crypto_quictls" >&5
22989printf %s "checking for ngtcp2_crypto_encrypt_cb in -lngtcp2_crypto_quictls... " >&6; }
22990if test ${ac_cv_lib_ngtcp2_crypto_quictls_ngtcp2_crypto_encrypt_cb+y}
22991then :
22992  printf %s "(cached) " >&6
22993else case e in #(
22994  e) ac_check_lib_save_LIBS=$LIBS
22995LIBS="-lngtcp2_crypto_quictls  $LIBS"
22996cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22997/* end confdefs.h.  */
22998
22999/* Override any GCC internal prototype to avoid an error.
23000   Use char because int might match the return type of a GCC
23001   builtin and then its argument prototype would still apply.
23002   The 'extern "C"' is for builds by C++ compilers;
23003   although this is not generally supported in C code supporting it here
23004   has little cost and some practical benefit (sr 110532).  */
23005#ifdef __cplusplus
23006extern "C"
23007#endif
23008char ngtcp2_crypto_encrypt_cb (void);
23009int
23010main (void)
23011{
23012return ngtcp2_crypto_encrypt_cb ();
23013  ;
23014  return 0;
23015}
23016_ACEOF
23017if ac_fn_c_try_link "$LINENO"
23018then :
23019  ac_cv_lib_ngtcp2_crypto_quictls_ngtcp2_crypto_encrypt_cb=yes
23020else case e in #(
23021  e) ac_cv_lib_ngtcp2_crypto_quictls_ngtcp2_crypto_encrypt_cb=no ;;
23022esac
23023fi
23024rm -f core conftest.err conftest.$ac_objext conftest.beam \
23025    conftest$ac_exeext conftest.$ac_ext
23026LIBS=$ac_check_lib_save_LIBS ;;
23027esac
23028fi
23029{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ngtcp2_crypto_quictls_ngtcp2_crypto_encrypt_cb" >&5
23030printf "%s\n" "$ac_cv_lib_ngtcp2_crypto_quictls_ngtcp2_crypto_encrypt_cb" >&6; }
23031if test "x$ac_cv_lib_ngtcp2_crypto_quictls_ngtcp2_crypto_encrypt_cb" = xyes
23032then :
23033   LIBS="$LIBS -lngtcp2_crypto_quictls"
23034fi
23035
23036    ac_fn_c_check_func "$LINENO" "ngtcp2_crypto_encrypt_cb" "ac_cv_func_ngtcp2_crypto_encrypt_cb"
23037if test "x$ac_cv_func_ngtcp2_crypto_encrypt_cb" = xyes
23038then :
23039  printf "%s\n" "#define HAVE_NGTCP2_CRYPTO_ENCRYPT_CB 1" >>confdefs.h
23040
23041fi
23042ac_fn_c_check_func "$LINENO" "ngtcp2_ccerr_default" "ac_cv_func_ngtcp2_ccerr_default"
23043if test "x$ac_cv_func_ngtcp2_ccerr_default" = xyes
23044then :
23045  printf "%s\n" "#define HAVE_NGTCP2_CCERR_DEFAULT 1" >>confdefs.h
23046
23047fi
23048ac_fn_c_check_func "$LINENO" "ngtcp2_conn_in_closing_period" "ac_cv_func_ngtcp2_conn_in_closing_period"
23049if test "x$ac_cv_func_ngtcp2_conn_in_closing_period" = xyes
23050then :
23051  printf "%s\n" "#define HAVE_NGTCP2_CONN_IN_CLOSING_PERIOD 1" >>confdefs.h
23052
23053fi
23054ac_fn_c_check_func "$LINENO" "ngtcp2_conn_in_draining_period" "ac_cv_func_ngtcp2_conn_in_draining_period"
23055if test "x$ac_cv_func_ngtcp2_conn_in_draining_period" = xyes
23056then :
23057  printf "%s\n" "#define HAVE_NGTCP2_CONN_IN_DRAINING_PERIOD 1" >>confdefs.h
23058
23059fi
23060ac_fn_c_check_func "$LINENO" "ngtcp2_conn_get_max_local_streams_uni" "ac_cv_func_ngtcp2_conn_get_max_local_streams_uni"
23061if test "x$ac_cv_func_ngtcp2_conn_get_max_local_streams_uni" = xyes
23062then :
23063  printf "%s\n" "#define HAVE_NGTCP2_CONN_GET_MAX_LOCAL_STREAMS_UNI 1" >>confdefs.h
23064
23065fi
23066ac_fn_c_check_func "$LINENO" "ngtcp2_crypto_quictls_from_ossl_encryption_level" "ac_cv_func_ngtcp2_crypto_quictls_from_ossl_encryption_level"
23067if test "x$ac_cv_func_ngtcp2_crypto_quictls_from_ossl_encryption_level" = xyes
23068then :
23069  printf "%s\n" "#define HAVE_NGTCP2_CRYPTO_QUICTLS_FROM_OSSL_ENCRYPTION_LEVEL 1" >>confdefs.h
23070
23071fi
23072ac_fn_c_check_func "$LINENO" "ngtcp2_crypto_quictls_configure_server_context" "ac_cv_func_ngtcp2_crypto_quictls_configure_server_context"
23073if test "x$ac_cv_func_ngtcp2_crypto_quictls_configure_server_context" = xyes
23074then :
23075  printf "%s\n" "#define HAVE_NGTCP2_CRYPTO_QUICTLS_CONFIGURE_SERVER_CONTEXT 1" >>confdefs.h
23076
23077fi
23078ac_fn_c_check_func "$LINENO" "ngtcp2_crypto_quictls_configure_client_context" "ac_cv_func_ngtcp2_crypto_quictls_configure_client_context"
23079if test "x$ac_cv_func_ngtcp2_crypto_quictls_configure_client_context" = xyes
23080then :
23081  printf "%s\n" "#define HAVE_NGTCP2_CRYPTO_QUICTLS_CONFIGURE_CLIENT_CONTEXT 1" >>confdefs.h
23082
23083fi
23084ac_fn_c_check_func "$LINENO" "ngtcp2_conn_get_num_scid" "ac_cv_func_ngtcp2_conn_get_num_scid"
23085if test "x$ac_cv_func_ngtcp2_conn_get_num_scid" = xyes
23086then :
23087  printf "%s\n" "#define HAVE_NGTCP2_CONN_GET_NUM_SCID 1" >>confdefs.h
23088
23089fi
23090ac_fn_c_check_func "$LINENO" "ngtcp2_conn_tls_early_data_rejected" "ac_cv_func_ngtcp2_conn_tls_early_data_rejected"
23091if test "x$ac_cv_func_ngtcp2_conn_tls_early_data_rejected" = xyes
23092then :
23093  printf "%s\n" "#define HAVE_NGTCP2_CONN_TLS_EARLY_DATA_REJECTED 1" >>confdefs.h
23094
23095fi
23096ac_fn_c_check_func "$LINENO" "ngtcp2_conn_encode_0rtt_transport_params" "ac_cv_func_ngtcp2_conn_encode_0rtt_transport_params"
23097if test "x$ac_cv_func_ngtcp2_conn_encode_0rtt_transport_params" = xyes
23098then :
23099  printf "%s\n" "#define HAVE_NGTCP2_CONN_ENCODE_0RTT_TRANSPORT_PARAMS 1" >>confdefs.h
23100
23101fi
23102
23103
23104  for ac_func in SSL_is_quic
23105do :
23106  ac_fn_c_check_func "$LINENO" "SSL_is_quic" "ac_cv_func_SSL_is_quic"
23107if test "x$ac_cv_func_SSL_is_quic" = xyes
23108then :
23109  printf "%s\n" "#define HAVE_SSL_IS_QUIC 1" >>confdefs.h
23110
23111else case e in #(
23112  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 ;;
23113esac
23114fi
23115
23116done
23117    ac_fn_c_check_type "$LINENO" "struct ngtcp2_version_cid" "ac_cv_type_struct_ngtcp2_version_cid" "$ac_includes_default
23118    #include <ngtcp2/ngtcp2.h>
23119
23120"
23121if test "x$ac_cv_type_struct_ngtcp2_version_cid" = xyes
23122then :
23123
23124printf "%s\n" "#define HAVE_STRUCT_NGTCP2_VERSION_CID 1" >>confdefs.h
23125
23126
23127fi
23128ac_fn_c_check_type "$LINENO" "ngtcp2_encryption_level" "ac_cv_type_ngtcp2_encryption_level" "$ac_includes_default
23129    #include <ngtcp2/ngtcp2.h>
23130
23131"
23132if test "x$ac_cv_type_ngtcp2_encryption_level" = xyes
23133then :
23134
23135printf "%s\n" "#define HAVE_NGTCP2_ENCRYPTION_LEVEL 1" >>confdefs.h
23136
23137
23138fi
23139
23140    ac_fn_c_check_member "$LINENO" "struct ngtcp2_pkt_hd" "tokenlen" "ac_cv_member_struct_ngtcp2_pkt_hd_tokenlen" "$ac_includes_default
23141    #include <ngtcp2/ngtcp2.h>
23142
23143"
23144if test "x$ac_cv_member_struct_ngtcp2_pkt_hd_tokenlen" = xyes
23145then :
23146
23147printf "%s\n" "#define HAVE_STRUCT_NGTCP2_PKT_HD_TOKENLEN 1" >>confdefs.h
23148
23149
23150fi
23151ac_fn_c_check_member "$LINENO" "struct ngtcp2_settings" "tokenlen" "ac_cv_member_struct_ngtcp2_settings_tokenlen" "$ac_includes_default
23152    #include <ngtcp2/ngtcp2.h>
23153
23154"
23155if test "x$ac_cv_member_struct_ngtcp2_settings_tokenlen" = xyes
23156then :
23157
23158printf "%s\n" "#define HAVE_STRUCT_NGTCP2_SETTINGS_TOKENLEN 1" >>confdefs.h
23159
23160
23161fi
23162ac_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
23163    #include <ngtcp2/ngtcp2.h>
23164
23165"
23166if test "x$ac_cv_member_struct_ngtcp2_settings_max_tx_udp_payload_size" = xyes
23167then :
23168
23169printf "%s\n" "#define HAVE_STRUCT_NGTCP2_SETTINGS_MAX_TX_UDP_PAYLOAD_SIZE 1" >>confdefs.h
23170
23171
23172fi
23173ac_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
23174    #include <ngtcp2/ngtcp2.h>
23175
23176"
23177if test "x$ac_cv_member_struct_ngtcp2_transport_params_original_dcid_present" = xyes
23178then :
23179
23180printf "%s\n" "#define HAVE_STRUCT_NGTCP2_TRANSPORT_PARAMS_ORIGINAL_DCID_PRESENT 1" >>confdefs.h
23181
23182
23183fi
23184
23185
23186    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ngtcp2_conn_shutdown_stream has 4 arguments" >&5
23187printf %s "checking whether ngtcp2_conn_shutdown_stream has 4 arguments... " >&6; }
23188    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23189/* end confdefs.h.  */
23190$ac_includes_default
23191#include <ngtcp2/ngtcp2.h>
23192
23193int
23194main (void)
23195{
23196
23197	(void)ngtcp2_conn_shutdown_stream(NULL, 0, 0, 0);
23198
23199  ;
23200  return 0;
23201}
23202_ACEOF
23203if ac_fn_c_try_compile "$LINENO"
23204then :
23205
23206	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
23207printf "%s\n" "yes" >&6; }
23208
23209printf "%s\n" "#define HAVE_NGTCP2_CONN_SHUTDOWN_STREAM4 1" >>confdefs.h
23210
23211
23212else case e in #(
23213  e)
23214	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
23215printf "%s\n" "no" >&6; }
23216     ;;
23217esac
23218fi
23219rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
23220
23221fi
23222
23223# set static linking for uninstalled libraries if requested
23224
23225staticexe=""
23226# Check whether --enable-static-exe was given.
23227if test ${enable_static_exe+y}
23228then :
23229  enableval=$enable_static_exe;
23230fi
23231
23232if test x_$enable_static_exe = x_yes; then
23233	staticexe="-static"
23234	if test "$on_mingw" = yes; then
23235		staticexe="-all-static"
23236		# for static compile, include gdi32 and zlib here.
23237		if echo "$LIBS" | grep 'lgdi32' >/dev/null; then
23238			:
23239		else
23240			LIBS="$LIBS -lgdi32"
23241		fi
23242		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
23243printf %s "checking for compress in -lz... " >&6; }
23244if test ${ac_cv_lib_z_compress+y}
23245then :
23246  printf %s "(cached) " >&6
23247else case e in #(
23248  e) ac_check_lib_save_LIBS=$LIBS
23249LIBS="-lz  $LIBS"
23250cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23251/* end confdefs.h.  */
23252
23253/* Override any GCC internal prototype to avoid an error.
23254   Use char because int might match the return type of a GCC
23255   builtin and then its argument prototype would still apply.
23256   The 'extern "C"' is for builds by C++ compilers;
23257   although this is not generally supported in C code supporting it here
23258   has little cost and some practical benefit (sr 110532).  */
23259#ifdef __cplusplus
23260extern "C"
23261#endif
23262char compress (void);
23263int
23264main (void)
23265{
23266return compress ();
23267  ;
23268  return 0;
23269}
23270_ACEOF
23271if ac_fn_c_try_link "$LINENO"
23272then :
23273  ac_cv_lib_z_compress=yes
23274else case e in #(
23275  e) ac_cv_lib_z_compress=no ;;
23276esac
23277fi
23278rm -f core conftest.err conftest.$ac_objext conftest.beam \
23279    conftest$ac_exeext conftest.$ac_ext
23280LIBS=$ac_check_lib_save_LIBS ;;
23281esac
23282fi
23283{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
23284printf "%s\n" "$ac_cv_lib_z_compress" >&6; }
23285if test "x$ac_cv_lib_z_compress" = xyes
23286then :
23287   LIBS="$LIBS -lz"
23288fi
23289
23290		if echo "$LIBS" | grep -e "libssp.a" -e "lssp" >/dev/null; then
23291			:
23292		else
23293			LIBS="$LIBS -l:libssp.a"
23294		fi
23295	fi
23296fi
23297
23298# set full static linking if requested
23299# Check whether --enable-fully-static was given.
23300if test ${enable_fully_static+y}
23301then :
23302  enableval=$enable_fully_static;
23303fi
23304
23305if test x_$enable_fully_static = x_yes; then
23306	staticexe="-all-static"
23307	if test "$on_mingw" = yes; then
23308		# for static compile, include gdi32 and zlib here.
23309		if echo $LIBS | grep 'lgdi32' >/dev/null; then
23310			:
23311		else
23312			LIBS="$LIBS -lgdi32"
23313		fi
23314		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
23315printf %s "checking for compress in -lz... " >&6; }
23316if test ${ac_cv_lib_z_compress+y}
23317then :
23318  printf %s "(cached) " >&6
23319else case e in #(
23320  e) ac_check_lib_save_LIBS=$LIBS
23321LIBS="-lz  $LIBS"
23322cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23323/* end confdefs.h.  */
23324
23325/* Override any GCC internal prototype to avoid an error.
23326   Use char because int might match the return type of a GCC
23327   builtin and then its argument prototype would still apply.
23328   The 'extern "C"' is for builds by C++ compilers;
23329   although this is not generally supported in C code supporting it here
23330   has little cost and some practical benefit (sr 110532).  */
23331#ifdef __cplusplus
23332extern "C"
23333#endif
23334char compress (void);
23335int
23336main (void)
23337{
23338return compress ();
23339  ;
23340  return 0;
23341}
23342_ACEOF
23343if ac_fn_c_try_link "$LINENO"
23344then :
23345  ac_cv_lib_z_compress=yes
23346else case e in #(
23347  e) ac_cv_lib_z_compress=no ;;
23348esac
23349fi
23350rm -f core conftest.err conftest.$ac_objext conftest.beam \
23351    conftest$ac_exeext conftest.$ac_ext
23352LIBS=$ac_check_lib_save_LIBS ;;
23353esac
23354fi
23355{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
23356printf "%s\n" "$ac_cv_lib_z_compress" >&6; }
23357if test "x$ac_cv_lib_z_compress" = xyes
23358then :
23359   LIBS="$LIBS -lz"
23360fi
23361
23362		if echo "$LIBS" | grep -e "libssp.a" -e "lssp" >/dev/null; then
23363			:
23364		else
23365			LIBS="$LIBS -l:libssp.a"
23366		fi
23367	fi
23368fi
23369
23370# set lock checking if requested
23371# Check whether --enable-lock_checks was given.
23372if test ${enable_lock_checks+y}
23373then :
23374  enableval=$enable_lock_checks;
23375fi
23376
23377if test x_$enable_lock_checks = x_yes; then
23378
23379printf "%s\n" "#define ENABLE_LOCK_CHECKS 1" >>confdefs.h
23380
23381	CHECKLOCK_OBJ="checklocks.lo"
23382
23383fi
23384
23385
23386{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
23387printf %s "checking for getaddrinfo... " >&6; }
23388ac_cv_func_getaddrinfo=no
23389cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23390/* end confdefs.h.  */
23391
23392#ifdef __cplusplus
23393extern "C"
23394{
23395#endif
23396char* getaddrinfo();
23397char* (*f) () = getaddrinfo;
23398#ifdef __cplusplus
23399}
23400#endif
23401int main(void) {
23402        ;
23403        return 0;
23404}
23405
23406_ACEOF
23407if ac_fn_c_try_link "$LINENO"
23408then :
23409  ac_cv_func_getaddrinfo="yes"
23410if test "$ac_cv_header_windows_h" = "yes"; then
23411
23412printf "%s\n" "#define USE_WINSOCK 1" >>confdefs.h
23413
23414	USE_WINSOCK="1"
23415	if echo "$LIBS" | grep 'lws2_32' >/dev/null; then
23416		:
23417	else
23418		LIBS="$LIBS -lws2_32"
23419	fi
23420fi
23421
23422else case e in #(
23423  e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23424/* end confdefs.h.  */
23425
23426#ifdef HAVE_WS2TCPIP_H
23427#include <ws2tcpip.h>
23428#endif
23429
23430int
23431main (void)
23432{
23433
23434        (void)getaddrinfo(NULL, NULL, NULL, NULL);
23435
23436
23437  ;
23438  return 0;
23439}
23440_ACEOF
23441if ac_fn_c_try_link "$LINENO"
23442then :
23443
23444ac_cv_func_getaddrinfo="yes"
23445
23446printf "%s\n" "#define USE_WINSOCK 1" >>confdefs.h
23447
23448USE_WINSOCK="1"
23449
23450else case e in #(
23451  e) ORIGLIBS="$LIBS"
23452LIBS="$LIBS -lws2_32"
23453cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23454/* end confdefs.h.  */
23455
23456#ifdef HAVE_WS2TCPIP_H
23457#include <ws2tcpip.h>
23458#endif
23459
23460int
23461main (void)
23462{
23463
23464        (void)getaddrinfo(NULL, NULL, NULL, NULL);
23465
23466
23467  ;
23468  return 0;
23469}
23470_ACEOF
23471if ac_fn_c_try_link "$LINENO"
23472then :
23473
23474ac_cv_func_getaddrinfo="yes"
23475
23476printf "%s\n" "#define USE_WINSOCK 1" >>confdefs.h
23477
23478USE_WINSOCK="1"
23479
23480else case e in #(
23481  e)
23482ac_cv_func_getaddrinfo="no"
23483LIBS="$ORIGLIBS"
23484 ;;
23485esac
23486fi
23487rm -f core conftest.err conftest.$ac_objext conftest.beam \
23488    conftest$ac_exeext conftest.$ac_ext
23489 ;;
23490esac
23491fi
23492rm -f core conftest.err conftest.$ac_objext conftest.beam \
23493    conftest$ac_exeext conftest.$ac_ext
23494 ;;
23495esac
23496fi
23497rm -f core conftest.err conftest.$ac_objext conftest.beam \
23498    conftest$ac_exeext conftest.$ac_ext
23499
23500{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_getaddrinfo" >&5
23501printf "%s\n" "$ac_cv_func_getaddrinfo" >&6; }
23502if test $ac_cv_func_getaddrinfo = yes; then
23503
23504printf "%s\n" "#define HAVE_GETADDRINFO 1" >>confdefs.h
23505
23506fi
23507
23508if test "$USE_WINSOCK" = 1; then
23509
23510printf "%s\n" "#define UB_ON_WINDOWS 1" >>confdefs.h
23511
23512	ac_fn_c_check_header_compile "$LINENO" "iphlpapi.h" "ac_cv_header_iphlpapi_h" "$ac_includes_default
23513#include <windows.h>
23514
23515"
23516if test "x$ac_cv_header_iphlpapi_h" = xyes
23517then :
23518  printf "%s\n" "#define HAVE_IPHLPAPI_H 1" >>confdefs.h
23519
23520fi
23521
23522	if test -n "$ac_tool_prefix"; then
23523  # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
23524set dummy ${ac_tool_prefix}windres; ac_word=$2
23525{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23526printf %s "checking for $ac_word... " >&6; }
23527if test ${ac_cv_prog_WINDRES+y}
23528then :
23529  printf %s "(cached) " >&6
23530else case e in #(
23531  e) if test -n "$WINDRES"; then
23532  ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
23533else
23534as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23535for as_dir in $PATH
23536do
23537  IFS=$as_save_IFS
23538  case $as_dir in #(((
23539    '') as_dir=./ ;;
23540    */) ;;
23541    *) as_dir=$as_dir/ ;;
23542  esac
23543    for ac_exec_ext in '' $ac_executable_extensions; do
23544  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
23545    ac_cv_prog_WINDRES="${ac_tool_prefix}windres"
23546    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
23547    break 2
23548  fi
23549done
23550  done
23551IFS=$as_save_IFS
23552
23553fi ;;
23554esac
23555fi
23556WINDRES=$ac_cv_prog_WINDRES
23557if test -n "$WINDRES"; then
23558  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $WINDRES" >&5
23559printf "%s\n" "$WINDRES" >&6; }
23560else
23561  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
23562printf "%s\n" "no" >&6; }
23563fi
23564
23565
23566fi
23567if test -z "$ac_cv_prog_WINDRES"; then
23568  ac_ct_WINDRES=$WINDRES
23569  # Extract the first word of "windres", so it can be a program name with args.
23570set dummy windres; ac_word=$2
23571{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23572printf %s "checking for $ac_word... " >&6; }
23573if test ${ac_cv_prog_ac_ct_WINDRES+y}
23574then :
23575  printf %s "(cached) " >&6
23576else case e in #(
23577  e) if test -n "$ac_ct_WINDRES"; then
23578  ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # Let the user override the test.
23579else
23580as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23581for as_dir in $PATH
23582do
23583  IFS=$as_save_IFS
23584  case $as_dir in #(((
23585    '') as_dir=./ ;;
23586    */) ;;
23587    *) as_dir=$as_dir/ ;;
23588  esac
23589    for ac_exec_ext in '' $ac_executable_extensions; do
23590  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
23591    ac_cv_prog_ac_ct_WINDRES="windres"
23592    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
23593    break 2
23594  fi
23595done
23596  done
23597IFS=$as_save_IFS
23598
23599fi ;;
23600esac
23601fi
23602ac_ct_WINDRES=$ac_cv_prog_ac_ct_WINDRES
23603if test -n "$ac_ct_WINDRES"; then
23604  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_WINDRES" >&5
23605printf "%s\n" "$ac_ct_WINDRES" >&6; }
23606else
23607  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
23608printf "%s\n" "no" >&6; }
23609fi
23610
23611  if test "x$ac_ct_WINDRES" = x; then
23612    WINDRES=""
23613  else
23614    case $cross_compiling:$ac_tool_warned in
23615yes:)
23616{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
23617printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
23618ac_tool_warned=yes ;;
23619esac
23620    WINDRES=$ac_ct_WINDRES
23621  fi
23622else
23623  WINDRES="$ac_cv_prog_WINDRES"
23624fi
23625
23626	if echo "$LIBS" | grep crypt32 >/dev/null; then
23627		LIBS="$LIBS -liphlpapi"
23628	else
23629		LIBS="$LIBS -liphlpapi -lcrypt32"
23630	fi
23631	WINAPPS="unbound-service-install.exe unbound-service-remove.exe anchor-update.exe"
23632
23633	WIN_DAEMON_SRC="winrc/win_svc.c winrc/w_inst.c"
23634
23635	WIN_DAEMON_OBJ="win_svc.lo w_inst.lo"
23636
23637	WIN_DAEMON_OBJ_LINK="rsrc_unbound.o"
23638
23639	WIN_HOST_OBJ_LINK="rsrc_unbound_host.o"
23640
23641	WIN_UBANCHOR_OBJ_LINK="rsrc_unbound_anchor.o log.lo locks.lo"
23642
23643	WIN_CONTROL_OBJ_LINK="rsrc_unbound_control.o"
23644
23645	WIN_CHECKCONF_OBJ_LINK="rsrc_unbound_checkconf.o"
23646
23647
23648printf "%s\n" "#define __USE_MINGW_ANSI_STDIO 1" >>confdefs.h
23649
23650fi
23651if test $ac_cv_func_getaddrinfo = no; then
23652	case " $LIBOBJS " in
23653  *" fake-rfc2553.$ac_objext "* ) ;;
23654  *) LIBOBJS="$LIBOBJS fake-rfc2553.$ac_objext"
23655 ;;
23656esac
23657
23658fi
23659# check after getaddrinfo for its libraries
23660
23661# check ioctlsocket
23662{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ioctlsocket" >&5
23663printf %s "checking for ioctlsocket... " >&6; }
23664cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23665/* end confdefs.h.  */
23666
23667#ifdef HAVE_WINSOCK2_H
23668#include <winsock2.h>
23669#endif
23670
23671int
23672main (void)
23673{
23674
23675	(void)ioctlsocket(0, 0, NULL);
23676
23677  ;
23678  return 0;
23679}
23680_ACEOF
23681if ac_fn_c_try_link "$LINENO"
23682then :
23683
23684{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
23685printf "%s\n" "yes" >&6; }
23686
23687printf "%s\n" "#define HAVE_IOCTLSOCKET 1" >>confdefs.h
23688
23689
23690else case e in #(
23691  e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
23692printf "%s\n" "no" >&6; } ;;
23693esac
23694fi
23695rm -f core conftest.err conftest.$ac_objext conftest.beam \
23696    conftest$ac_exeext conftest.$ac_ext
23697
23698
23699# see if daemon(3) exists, and if it is deprecated.
23700ac_fn_c_check_func "$LINENO" "daemon" "ac_cv_func_daemon"
23701if test "x$ac_cv_func_daemon" = xyes
23702then :
23703  printf "%s\n" "#define HAVE_DAEMON 1" >>confdefs.h
23704
23705fi
23706
23707if test $ac_cv_func_daemon = yes; then
23708
23709
23710{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if daemon is deprecated" >&5
23711printf %s "checking if daemon is deprecated... " >&6; }
23712cache=`echo daemon | sed 'y%.=/+-%___p_%'`
23713if eval test \${cv_cc_deprecated_$cache+y}
23714then :
23715  printf %s "(cached) " >&6
23716else case e in #(
23717  e)
23718echo '
23719#include <stdlib.h>
23720#include <unistd.h>
23721' >conftest.c
23722echo 'void f(void){ (void)daemon(0, 0); }' >>conftest.c
23723if test -z "`$CC $CPPFLAGS $CFLAGS -c conftest.c 2>&1 | grep -e deprecated -e unavailable`"; then
23724eval "cv_cc_deprecated_$cache=no"
23725else
23726eval "cv_cc_deprecated_$cache=yes"
23727fi
23728rm -f conftest conftest.o conftest.c
23729 ;;
23730esac
23731fi
23732
23733if eval "test \"`echo '$cv_cc_deprecated_'$cache`\" = yes"; then
23734{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
23735printf "%s\n" "yes" >&6; }
23736
23737printf "%s\n" "#define DEPRECATED_DAEMON 1" >>confdefs.h
23738
23739:
23740
23741else
23742{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
23743printf "%s\n" "no" >&6; }
23744:
23745
23746fi
23747
23748fi
23749
23750ac_fn_c_check_member "$LINENO" "struct sockaddr_un" "sun_len" "ac_cv_member_struct_sockaddr_un_sun_len" "
23751$ac_includes_default
23752#ifdef HAVE_SYS_UN_H
23753#include <sys/un.h>
23754#endif
23755
23756"
23757if test "x$ac_cv_member_struct_sockaddr_un_sun_len" = xyes
23758then :
23759
23760printf "%s\n" "#define HAVE_STRUCT_SOCKADDR_UN_SUN_LEN 1" >>confdefs.h
23761
23762
23763fi
23764
23765ac_fn_c_check_member "$LINENO" "struct in_pktinfo" "ipi_spec_dst" "ac_cv_member_struct_in_pktinfo_ipi_spec_dst" "
23766$ac_includes_default
23767#if HAVE_SYS_PARAM_H
23768#include <sys/param.h>
23769#endif
23770
23771#ifdef HAVE_SYS_SOCKET_H
23772#include <sys/socket.h>
23773#endif
23774
23775#ifdef HAVE_SYS_UIO_H
23776#include <sys/uio.h>
23777#endif
23778
23779#ifdef HAVE_NETINET_IN_H
23780#include <netinet/in.h>
23781#endif
23782
23783#ifdef HAVE_NETINET_TCP_H
23784#include <netinet/tcp.h>
23785#endif
23786
23787#ifdef HAVE_ARPA_INET_H
23788#include <arpa/inet.h>
23789#endif
23790
23791#ifdef HAVE_WINSOCK2_H
23792#include <winsock2.h>
23793#endif
23794
23795#ifdef HAVE_WS2TCPIP_H
23796#include <ws2tcpip.h>
23797#endif
23798
23799"
23800if test "x$ac_cv_member_struct_in_pktinfo_ipi_spec_dst" = xyes
23801then :
23802
23803printf "%s\n" "#define HAVE_STRUCT_IN_PKTINFO_IPI_SPEC_DST 1" >>confdefs.h
23804
23805
23806fi
23807
23808
23809{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for htobe64" >&5
23810printf %s "checking for htobe64... " >&6; }
23811cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23812/* end confdefs.h.  */
23813
23814#include <stdio.h>
23815#ifdef HAVE_ENDIAN_H
23816#  include <endian.h>
23817#endif
23818#ifdef HAVE_SYS_ENDIAN_H
23819#  include <sys/endian.h>
23820#endif
23821
23822int
23823main (void)
23824{
23825unsigned long long x = htobe64(0); printf("%u", (unsigned)x);
23826  ;
23827  return 0;
23828}
23829_ACEOF
23830if ac_fn_c_try_link "$LINENO"
23831then :
23832  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
23833printf "%s\n" "yes" >&6; }
23834
23835printf "%s\n" "#define HAVE_HTOBE64 1" >>confdefs.h
23836
23837else case e in #(
23838  e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
23839printf "%s\n" "no" >&6; } ;;
23840esac
23841fi
23842rm -f core conftest.err conftest.$ac_objext conftest.beam \
23843    conftest$ac_exeext conftest.$ac_ext
23844
23845{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for be64toh" >&5
23846printf %s "checking for be64toh... " >&6; }
23847cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23848/* end confdefs.h.  */
23849
23850#include <stdio.h>
23851#ifdef HAVE_ENDIAN_H
23852#  include <endian.h>
23853#endif
23854#ifdef HAVE_SYS_ENDIAN_H
23855#  include <sys/endian.h>
23856#endif
23857
23858int
23859main (void)
23860{
23861unsigned long long x = be64toh(0); printf("%u", (unsigned)x);
23862  ;
23863  return 0;
23864}
23865_ACEOF
23866if ac_fn_c_try_link "$LINENO"
23867then :
23868  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
23869printf "%s\n" "yes" >&6; }
23870
23871printf "%s\n" "#define HAVE_BE64TOH 1" >>confdefs.h
23872
23873else case e in #(
23874  e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
23875printf "%s\n" "no" >&6; } ;;
23876esac
23877fi
23878rm -f core conftest.err conftest.$ac_objext conftest.beam \
23879    conftest$ac_exeext conftest.$ac_ext
23880
23881{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing setusercontext" >&5
23882printf %s "checking for library containing setusercontext... " >&6; }
23883if test ${ac_cv_search_setusercontext+y}
23884then :
23885  printf %s "(cached) " >&6
23886else case e in #(
23887  e) ac_func_search_save_LIBS=$LIBS
23888cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23889/* end confdefs.h.  */
23890
23891/* Override any GCC internal prototype to avoid an error.
23892   Use char because int might match the return type of a GCC
23893   builtin and then its argument prototype would still apply.
23894   The 'extern "C"' is for builds by C++ compilers;
23895   although this is not generally supported in C code supporting it here
23896   has little cost and some practical benefit (sr 110532).  */
23897#ifdef __cplusplus
23898extern "C"
23899#endif
23900char setusercontext (void);
23901int
23902main (void)
23903{
23904return setusercontext ();
23905  ;
23906  return 0;
23907}
23908_ACEOF
23909for ac_lib in '' util
23910do
23911  if test -z "$ac_lib"; then
23912    ac_res="none required"
23913  else
23914    ac_res=-l$ac_lib
23915    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
23916  fi
23917  if ac_fn_c_try_link "$LINENO"
23918then :
23919  ac_cv_search_setusercontext=$ac_res
23920fi
23921rm -f core conftest.err conftest.$ac_objext conftest.beam \
23922    conftest$ac_exeext
23923  if test ${ac_cv_search_setusercontext+y}
23924then :
23925  break
23926fi
23927done
23928if test ${ac_cv_search_setusercontext+y}
23929then :
23930
23931else case e in #(
23932  e) ac_cv_search_setusercontext=no ;;
23933esac
23934fi
23935rm conftest.$ac_ext
23936LIBS=$ac_func_search_save_LIBS ;;
23937esac
23938fi
23939{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_setusercontext" >&5
23940printf "%s\n" "$ac_cv_search_setusercontext" >&6; }
23941ac_res=$ac_cv_search_setusercontext
23942if test "$ac_res" != no
23943then :
23944  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
23945
23946fi
23947
23948ac_fn_c_check_func "$LINENO" "tzset" "ac_cv_func_tzset"
23949if test "x$ac_cv_func_tzset" = xyes
23950then :
23951  printf "%s\n" "#define HAVE_TZSET 1" >>confdefs.h
23952
23953fi
23954ac_fn_c_check_func "$LINENO" "sigprocmask" "ac_cv_func_sigprocmask"
23955if test "x$ac_cv_func_sigprocmask" = xyes
23956then :
23957  printf "%s\n" "#define HAVE_SIGPROCMASK 1" >>confdefs.h
23958
23959fi
23960ac_fn_c_check_func "$LINENO" "fcntl" "ac_cv_func_fcntl"
23961if test "x$ac_cv_func_fcntl" = xyes
23962then :
23963  printf "%s\n" "#define HAVE_FCNTL 1" >>confdefs.h
23964
23965fi
23966ac_fn_c_check_func "$LINENO" "getpwnam" "ac_cv_func_getpwnam"
23967if test "x$ac_cv_func_getpwnam" = xyes
23968then :
23969  printf "%s\n" "#define HAVE_GETPWNAM 1" >>confdefs.h
23970
23971fi
23972ac_fn_c_check_func "$LINENO" "endpwent" "ac_cv_func_endpwent"
23973if test "x$ac_cv_func_endpwent" = xyes
23974then :
23975  printf "%s\n" "#define HAVE_ENDPWENT 1" >>confdefs.h
23976
23977fi
23978ac_fn_c_check_func "$LINENO" "getrlimit" "ac_cv_func_getrlimit"
23979if test "x$ac_cv_func_getrlimit" = xyes
23980then :
23981  printf "%s\n" "#define HAVE_GETRLIMIT 1" >>confdefs.h
23982
23983fi
23984ac_fn_c_check_func "$LINENO" "setrlimit" "ac_cv_func_setrlimit"
23985if test "x$ac_cv_func_setrlimit" = xyes
23986then :
23987  printf "%s\n" "#define HAVE_SETRLIMIT 1" >>confdefs.h
23988
23989fi
23990ac_fn_c_check_func "$LINENO" "setsid" "ac_cv_func_setsid"
23991if test "x$ac_cv_func_setsid" = xyes
23992then :
23993  printf "%s\n" "#define HAVE_SETSID 1" >>confdefs.h
23994
23995fi
23996ac_fn_c_check_func "$LINENO" "chroot" "ac_cv_func_chroot"
23997if test "x$ac_cv_func_chroot" = xyes
23998then :
23999  printf "%s\n" "#define HAVE_CHROOT 1" >>confdefs.h
24000
24001fi
24002ac_fn_c_check_func "$LINENO" "kill" "ac_cv_func_kill"
24003if test "x$ac_cv_func_kill" = xyes
24004then :
24005  printf "%s\n" "#define HAVE_KILL 1" >>confdefs.h
24006
24007fi
24008ac_fn_c_check_func "$LINENO" "chown" "ac_cv_func_chown"
24009if test "x$ac_cv_func_chown" = xyes
24010then :
24011  printf "%s\n" "#define HAVE_CHOWN 1" >>confdefs.h
24012
24013fi
24014ac_fn_c_check_func "$LINENO" "sleep" "ac_cv_func_sleep"
24015if test "x$ac_cv_func_sleep" = xyes
24016then :
24017  printf "%s\n" "#define HAVE_SLEEP 1" >>confdefs.h
24018
24019fi
24020ac_fn_c_check_func "$LINENO" "usleep" "ac_cv_func_usleep"
24021if test "x$ac_cv_func_usleep" = xyes
24022then :
24023  printf "%s\n" "#define HAVE_USLEEP 1" >>confdefs.h
24024
24025fi
24026ac_fn_c_check_func "$LINENO" "random" "ac_cv_func_random"
24027if test "x$ac_cv_func_random" = xyes
24028then :
24029  printf "%s\n" "#define HAVE_RANDOM 1" >>confdefs.h
24030
24031fi
24032ac_fn_c_check_func "$LINENO" "srandom" "ac_cv_func_srandom"
24033if test "x$ac_cv_func_srandom" = xyes
24034then :
24035  printf "%s\n" "#define HAVE_SRANDOM 1" >>confdefs.h
24036
24037fi
24038ac_fn_c_check_func "$LINENO" "recvmsg" "ac_cv_func_recvmsg"
24039if test "x$ac_cv_func_recvmsg" = xyes
24040then :
24041  printf "%s\n" "#define HAVE_RECVMSG 1" >>confdefs.h
24042
24043fi
24044ac_fn_c_check_func "$LINENO" "sendmsg" "ac_cv_func_sendmsg"
24045if test "x$ac_cv_func_sendmsg" = xyes
24046then :
24047  printf "%s\n" "#define HAVE_SENDMSG 1" >>confdefs.h
24048
24049fi
24050ac_fn_c_check_func "$LINENO" "writev" "ac_cv_func_writev"
24051if test "x$ac_cv_func_writev" = xyes
24052then :
24053  printf "%s\n" "#define HAVE_WRITEV 1" >>confdefs.h
24054
24055fi
24056ac_fn_c_check_func "$LINENO" "socketpair" "ac_cv_func_socketpair"
24057if test "x$ac_cv_func_socketpair" = xyes
24058then :
24059  printf "%s\n" "#define HAVE_SOCKETPAIR 1" >>confdefs.h
24060
24061fi
24062ac_fn_c_check_func "$LINENO" "glob" "ac_cv_func_glob"
24063if test "x$ac_cv_func_glob" = xyes
24064then :
24065  printf "%s\n" "#define HAVE_GLOB 1" >>confdefs.h
24066
24067fi
24068ac_fn_c_check_func "$LINENO" "initgroups" "ac_cv_func_initgroups"
24069if test "x$ac_cv_func_initgroups" = xyes
24070then :
24071  printf "%s\n" "#define HAVE_INITGROUPS 1" >>confdefs.h
24072
24073fi
24074ac_fn_c_check_func "$LINENO" "strftime" "ac_cv_func_strftime"
24075if test "x$ac_cv_func_strftime" = xyes
24076then :
24077  printf "%s\n" "#define HAVE_STRFTIME 1" >>confdefs.h
24078
24079fi
24080ac_fn_c_check_func "$LINENO" "localtime_r" "ac_cv_func_localtime_r"
24081if test "x$ac_cv_func_localtime_r" = xyes
24082then :
24083  printf "%s\n" "#define HAVE_LOCALTIME_R 1" >>confdefs.h
24084
24085fi
24086ac_fn_c_check_func "$LINENO" "setusercontext" "ac_cv_func_setusercontext"
24087if test "x$ac_cv_func_setusercontext" = xyes
24088then :
24089  printf "%s\n" "#define HAVE_SETUSERCONTEXT 1" >>confdefs.h
24090
24091fi
24092ac_fn_c_check_func "$LINENO" "_beginthreadex" "ac_cv_func__beginthreadex"
24093if test "x$ac_cv_func__beginthreadex" = xyes
24094then :
24095  printf "%s\n" "#define HAVE__BEGINTHREADEX 1" >>confdefs.h
24096
24097fi
24098ac_fn_c_check_func "$LINENO" "endservent" "ac_cv_func_endservent"
24099if test "x$ac_cv_func_endservent" = xyes
24100then :
24101  printf "%s\n" "#define HAVE_ENDSERVENT 1" >>confdefs.h
24102
24103fi
24104ac_fn_c_check_func "$LINENO" "endprotoent" "ac_cv_func_endprotoent"
24105if test "x$ac_cv_func_endprotoent" = xyes
24106then :
24107  printf "%s\n" "#define HAVE_ENDPROTOENT 1" >>confdefs.h
24108
24109fi
24110ac_fn_c_check_func "$LINENO" "fsync" "ac_cv_func_fsync"
24111if test "x$ac_cv_func_fsync" = xyes
24112then :
24113  printf "%s\n" "#define HAVE_FSYNC 1" >>confdefs.h
24114
24115fi
24116ac_fn_c_check_func "$LINENO" "shmget" "ac_cv_func_shmget"
24117if test "x$ac_cv_func_shmget" = xyes
24118then :
24119  printf "%s\n" "#define HAVE_SHMGET 1" >>confdefs.h
24120
24121fi
24122ac_fn_c_check_func "$LINENO" "accept4" "ac_cv_func_accept4"
24123if test "x$ac_cv_func_accept4" = xyes
24124then :
24125  printf "%s\n" "#define HAVE_ACCEPT4 1" >>confdefs.h
24126
24127fi
24128ac_fn_c_check_func "$LINENO" "getifaddrs" "ac_cv_func_getifaddrs"
24129if test "x$ac_cv_func_getifaddrs" = xyes
24130then :
24131  printf "%s\n" "#define HAVE_GETIFADDRS 1" >>confdefs.h
24132
24133fi
24134ac_fn_c_check_func "$LINENO" "if_nametoindex" "ac_cv_func_if_nametoindex"
24135if test "x$ac_cv_func_if_nametoindex" = xyes
24136then :
24137  printf "%s\n" "#define HAVE_IF_NAMETOINDEX 1" >>confdefs.h
24138
24139fi
24140ac_fn_c_check_func "$LINENO" "poll" "ac_cv_func_poll"
24141if test "x$ac_cv_func_poll" = xyes
24142then :
24143  printf "%s\n" "#define HAVE_POLL 1" >>confdefs.h
24144
24145fi
24146ac_fn_c_check_func "$LINENO" "gettid" "ac_cv_func_gettid"
24147if test "x$ac_cv_func_gettid" = xyes
24148then :
24149  printf "%s\n" "#define HAVE_GETTID 1" >>confdefs.h
24150
24151fi
24152
24153
24154  for ac_func in setresuid
24155do :
24156  ac_fn_c_check_func "$LINENO" "setresuid" "ac_cv_func_setresuid"
24157if test "x$ac_cv_func_setresuid" = xyes
24158then :
24159  printf "%s\n" "#define HAVE_SETRESUID 1" >>confdefs.h
24160
24161else case e in #(
24162  e) ac_fn_c_check_func "$LINENO" "setreuid" "ac_cv_func_setreuid"
24163if test "x$ac_cv_func_setreuid" = xyes
24164then :
24165  printf "%s\n" "#define HAVE_SETREUID 1" >>confdefs.h
24166
24167fi
24168 ;;
24169esac
24170fi
24171
24172done
24173
24174  for ac_func in setresgid
24175do :
24176  ac_fn_c_check_func "$LINENO" "setresgid" "ac_cv_func_setresgid"
24177if test "x$ac_cv_func_setresgid" = xyes
24178then :
24179  printf "%s\n" "#define HAVE_SETRESGID 1" >>confdefs.h
24180
24181else case e in #(
24182  e) ac_fn_c_check_func "$LINENO" "setregid" "ac_cv_func_setregid"
24183if test "x$ac_cv_func_setregid" = xyes
24184then :
24185  printf "%s\n" "#define HAVE_SETREGID 1" >>confdefs.h
24186
24187fi
24188 ;;
24189esac
24190fi
24191
24192done
24193
24194# check if setreuid en setregid fail, on MacOSX10.4(darwin8).
24195if echo $host_os | grep darwin8 > /dev/null; then
24196
24197printf "%s\n" "#define DARWIN_BROKEN_SETREUID 1" >>confdefs.h
24198
24199fi
24200
24201{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for atomic_store" >&5
24202printf %s "checking for atomic_store... " >&6; }
24203cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24204/* end confdefs.h.  */
24205$ac_includes_default
24206#ifdef HAVE_STDATOMIC_H
24207#include <stdatomic.h>
24208#endif
24209
24210int
24211main (void)
24212{
24213
24214	int newvar = 5, var = 0;
24215	atomic_store((_Atomic int*)&var, newvar);
24216	newvar = 0;
24217	/* condition to use the variables. */
24218	if(var == newvar) return 1;
24219
24220  ;
24221  return 0;
24222}
24223_ACEOF
24224if ac_fn_c_try_link "$LINENO"
24225then :
24226
24227	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24228printf "%s\n" "yes" >&6; }
24229
24230printf "%s\n" "#define HAVE_LINK_ATOMIC_STORE 1" >>confdefs.h
24231
24232
24233else case e in #(
24234  e)
24235	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
24236printf "%s\n" "no" >&6; }
24237 ;;
24238esac
24239fi
24240rm -f core conftest.err conftest.$ac_objext conftest.beam \
24241    conftest$ac_exeext conftest.$ac_ext
24242
24243ac_fn_check_decl "$LINENO" "inet_pton" "ac_cv_have_decl_inet_pton" "
24244$ac_includes_default
24245#ifdef HAVE_NETINET_IN_H
24246#include <netinet/in.h>
24247#endif
24248
24249#ifdef HAVE_NETINET_TCP_H
24250#include <netinet/tcp.h>
24251#endif
24252
24253#ifdef HAVE_ARPA_INET_H
24254#include <arpa/inet.h>
24255#endif
24256
24257#ifdef HAVE_WINSOCK2_H
24258#include <winsock2.h>
24259#endif
24260
24261#ifdef HAVE_WS2TCPIP_H
24262#include <ws2tcpip.h>
24263#endif
24264
24265" "$ac_c_undeclared_builtin_options" "CFLAGS"
24266if test "x$ac_cv_have_decl_inet_pton" = xyes
24267then :
24268  ac_have_decl=1
24269else case e in #(
24270  e) ac_have_decl=0 ;;
24271esac
24272fi
24273printf "%s\n" "#define HAVE_DECL_INET_PTON $ac_have_decl" >>confdefs.h
24274ac_fn_check_decl "$LINENO" "inet_ntop" "ac_cv_have_decl_inet_ntop" "
24275$ac_includes_default
24276#ifdef HAVE_NETINET_IN_H
24277#include <netinet/in.h>
24278#endif
24279
24280#ifdef HAVE_NETINET_TCP_H
24281#include <netinet/tcp.h>
24282#endif
24283
24284#ifdef HAVE_ARPA_INET_H
24285#include <arpa/inet.h>
24286#endif
24287
24288#ifdef HAVE_WINSOCK2_H
24289#include <winsock2.h>
24290#endif
24291
24292#ifdef HAVE_WS2TCPIP_H
24293#include <ws2tcpip.h>
24294#endif
24295
24296" "$ac_c_undeclared_builtin_options" "CFLAGS"
24297if test "x$ac_cv_have_decl_inet_ntop" = xyes
24298then :
24299  ac_have_decl=1
24300else case e in #(
24301  e) ac_have_decl=0 ;;
24302esac
24303fi
24304printf "%s\n" "#define HAVE_DECL_INET_NTOP $ac_have_decl" >>confdefs.h
24305
24306ac_fn_c_check_func "$LINENO" "inet_aton" "ac_cv_func_inet_aton"
24307if test "x$ac_cv_func_inet_aton" = xyes
24308then :
24309  printf "%s\n" "#define HAVE_INET_ATON 1" >>confdefs.h
24310
24311else case e in #(
24312  e) case " $LIBOBJS " in
24313  *" inet_aton.$ac_objext "* ) ;;
24314  *) LIBOBJS="$LIBOBJS inet_aton.$ac_objext"
24315 ;;
24316esac
24317 ;;
24318esac
24319fi
24320
24321ac_fn_c_check_func "$LINENO" "inet_pton" "ac_cv_func_inet_pton"
24322if test "x$ac_cv_func_inet_pton" = xyes
24323then :
24324  printf "%s\n" "#define HAVE_INET_PTON 1" >>confdefs.h
24325
24326else case e in #(
24327  e) case " $LIBOBJS " in
24328  *" inet_pton.$ac_objext "* ) ;;
24329  *) LIBOBJS="$LIBOBJS inet_pton.$ac_objext"
24330 ;;
24331esac
24332 ;;
24333esac
24334fi
24335
24336ac_fn_c_check_func "$LINENO" "inet_ntop" "ac_cv_func_inet_ntop"
24337if test "x$ac_cv_func_inet_ntop" = xyes
24338then :
24339  printf "%s\n" "#define HAVE_INET_NTOP 1" >>confdefs.h
24340
24341else case e in #(
24342  e) case " $LIBOBJS " in
24343  *" inet_ntop.$ac_objext "* ) ;;
24344  *) LIBOBJS="$LIBOBJS inet_ntop.$ac_objext"
24345 ;;
24346esac
24347 ;;
24348esac
24349fi
24350
24351ac_fn_c_check_func "$LINENO" "snprintf" "ac_cv_func_snprintf"
24352if test "x$ac_cv_func_snprintf" = xyes
24353then :
24354  printf "%s\n" "#define HAVE_SNPRINTF 1" >>confdefs.h
24355
24356else case e in #(
24357  e) case " $LIBOBJS " in
24358  *" snprintf.$ac_objext "* ) ;;
24359  *) LIBOBJS="$LIBOBJS snprintf.$ac_objext"
24360 ;;
24361esac
24362 ;;
24363esac
24364fi
24365
24366# test if snprintf return the proper length
24367if test "x$ac_cv_func_snprintf" = xyes; then
24368    if test c${cross_compiling} = cno; then
24369	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for correct snprintf return value" >&5
24370printf %s "checking for correct snprintf return value... " >&6; }
24371	if test "$cross_compiling" = yes
24372then :
24373  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: maybe" >&5
24374printf "%s\n" "maybe" >&6; }
24375else case e in #(
24376  e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24377/* end confdefs.h.  */
24378$ac_includes_default
24379
24380int main(void) { return !(snprintf(NULL, 0, "test") == 4); }
24381
24382_ACEOF
24383if ac_fn_c_try_run "$LINENO"
24384then :
24385  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24386printf "%s\n" "yes" >&6; }
24387else case e in #(
24388  e)
24389		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
24390printf "%s\n" "no" >&6; }
24391
24392printf "%s\n" "#define SNPRINTF_RET_BROKEN /**/" >>confdefs.h
24393
24394		case " $LIBOBJS " in
24395  *" snprintf.$ac_objext "* ) ;;
24396  *) LIBOBJS="$LIBOBJS snprintf.$ac_objext"
24397 ;;
24398esac
24399
24400	   ;;
24401esac
24402fi
24403rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24404  conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
24405esac
24406fi
24407
24408    fi
24409fi
24410ac_fn_c_check_func "$LINENO" "strlcat" "ac_cv_func_strlcat"
24411if test "x$ac_cv_func_strlcat" = xyes
24412then :
24413  printf "%s\n" "#define HAVE_STRLCAT 1" >>confdefs.h
24414
24415else case e in #(
24416  e) case " $LIBOBJS " in
24417  *" strlcat.$ac_objext "* ) ;;
24418  *) LIBOBJS="$LIBOBJS strlcat.$ac_objext"
24419 ;;
24420esac
24421 ;;
24422esac
24423fi
24424
24425ac_fn_c_check_func "$LINENO" "strlcpy" "ac_cv_func_strlcpy"
24426if test "x$ac_cv_func_strlcpy" = xyes
24427then :
24428  printf "%s\n" "#define HAVE_STRLCPY 1" >>confdefs.h
24429
24430else case e in #(
24431  e) case " $LIBOBJS " in
24432  *" strlcpy.$ac_objext "* ) ;;
24433  *) LIBOBJS="$LIBOBJS strlcpy.$ac_objext"
24434 ;;
24435esac
24436 ;;
24437esac
24438fi
24439
24440ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove"
24441if test "x$ac_cv_func_memmove" = xyes
24442then :
24443  printf "%s\n" "#define HAVE_MEMMOVE 1" >>confdefs.h
24444
24445else case e in #(
24446  e) case " $LIBOBJS " in
24447  *" memmove.$ac_objext "* ) ;;
24448  *) LIBOBJS="$LIBOBJS memmove.$ac_objext"
24449 ;;
24450esac
24451 ;;
24452esac
24453fi
24454
24455ac_fn_c_check_func "$LINENO" "gmtime_r" "ac_cv_func_gmtime_r"
24456if test "x$ac_cv_func_gmtime_r" = xyes
24457then :
24458  printf "%s\n" "#define HAVE_GMTIME_R 1" >>confdefs.h
24459
24460else case e in #(
24461  e) case " $LIBOBJS " in
24462  *" gmtime_r.$ac_objext "* ) ;;
24463  *) LIBOBJS="$LIBOBJS gmtime_r.$ac_objext"
24464 ;;
24465esac
24466 ;;
24467esac
24468fi
24469
24470ac_fn_c_check_func "$LINENO" "isblank" "ac_cv_func_isblank"
24471if test "x$ac_cv_func_isblank" = xyes
24472then :
24473  printf "%s\n" "#define HAVE_ISBLANK 1" >>confdefs.h
24474
24475else case e in #(
24476  e) case " $LIBOBJS " in
24477  *" isblank.$ac_objext "* ) ;;
24478  *) LIBOBJS="$LIBOBJS isblank.$ac_objext"
24479 ;;
24480esac
24481 ;;
24482esac
24483fi
24484
24485ac_fn_c_check_func "$LINENO" "explicit_bzero" "ac_cv_func_explicit_bzero"
24486if test "x$ac_cv_func_explicit_bzero" = xyes
24487then :
24488  printf "%s\n" "#define HAVE_EXPLICIT_BZERO 1" >>confdefs.h
24489
24490else case e in #(
24491  e) case " $LIBOBJS " in
24492  *" explicit_bzero.$ac_objext "* ) ;;
24493  *) LIBOBJS="$LIBOBJS explicit_bzero.$ac_objext"
24494 ;;
24495esac
24496 ;;
24497esac
24498fi
24499
24500LIBOBJ_WITHOUT_CTIMEARC4="$LIBOBJS"
24501
24502{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for reallocarray" >&5
24503printf %s "checking for reallocarray... " >&6; }
24504cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24505/* end confdefs.h.  */
24506$ac_includes_default
24507
24508#ifndef _OPENBSD_SOURCE
24509#define _OPENBSD_SOURCE 1
24510#endif
24511#include <stdlib.h>
24512int main(void) {
24513	void* p = reallocarray(NULL, 10, 100);
24514	free(p);
24515	return 0;
24516}
24517
24518_ACEOF
24519if ac_fn_c_try_link "$LINENO"
24520then :
24521  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24522printf "%s\n" "yes" >&6; }
24523
24524printf "%s\n" "#define HAVE_REALLOCARRAY 1" >>confdefs.h
24525
24526
24527else case e in #(
24528  e)
24529	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
24530printf "%s\n" "no" >&6; }
24531	case " $LIBOBJS " in
24532  *" reallocarray.$ac_objext "* ) ;;
24533  *) LIBOBJS="$LIBOBJS reallocarray.$ac_objext"
24534 ;;
24535esac
24536
24537 ;;
24538esac
24539fi
24540rm -f core conftest.err conftest.$ac_objext conftest.beam \
24541    conftest$ac_exeext conftest.$ac_ext
24542ac_fn_check_decl "$LINENO" "reallocarray" "ac_cv_have_decl_reallocarray" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
24543if test "x$ac_cv_have_decl_reallocarray" = xyes
24544then :
24545  ac_have_decl=1
24546else case e in #(
24547  e) ac_have_decl=0 ;;
24548esac
24549fi
24550printf "%s\n" "#define HAVE_DECL_REALLOCARRAY $ac_have_decl" >>confdefs.h
24551
24552if test "$USE_NSS" = "no"; then
24553	ac_fn_c_check_func "$LINENO" "arc4random" "ac_cv_func_arc4random"
24554if test "x$ac_cv_func_arc4random" = xyes
24555then :
24556  printf "%s\n" "#define HAVE_ARC4RANDOM 1" >>confdefs.h
24557
24558else case e in #(
24559  e) case " $LIBOBJS " in
24560  *" arc4random.$ac_objext "* ) ;;
24561  *) LIBOBJS="$LIBOBJS arc4random.$ac_objext"
24562 ;;
24563esac
24564 ;;
24565esac
24566fi
24567
24568	ac_fn_c_check_func "$LINENO" "arc4random_uniform" "ac_cv_func_arc4random_uniform"
24569if test "x$ac_cv_func_arc4random_uniform" = xyes
24570then :
24571  printf "%s\n" "#define HAVE_ARC4RANDOM_UNIFORM 1" >>confdefs.h
24572
24573else case e in #(
24574  e) case " $LIBOBJS " in
24575  *" arc4random_uniform.$ac_objext "* ) ;;
24576  *) LIBOBJS="$LIBOBJS arc4random_uniform.$ac_objext"
24577 ;;
24578esac
24579 ;;
24580esac
24581fi
24582
24583	if test "$ac_cv_func_arc4random" = "no"; then
24584		case " $LIBOBJS " in
24585  *" arc4_lock.$ac_objext "* ) ;;
24586  *) LIBOBJS="$LIBOBJS arc4_lock.$ac_objext"
24587 ;;
24588esac
24589
24590
24591  for ac_func in getentropy
24592do :
24593  ac_fn_c_check_func "$LINENO" "getentropy" "ac_cv_func_getentropy"
24594if test "x$ac_cv_func_getentropy" = xyes
24595then :
24596  printf "%s\n" "#define HAVE_GETENTROPY 1" >>confdefs.h
24597
24598else case e in #(
24599  e)
24600		    if test "$USE_WINSOCK" = 1; then
24601			case " $LIBOBJS " in
24602  *" getentropy_win.$ac_objext "* ) ;;
24603  *) LIBOBJS="$LIBOBJS getentropy_win.$ac_objext"
24604 ;;
24605esac
24606
24607		    else
24608			case "$host" in
24609			Darwin|*darwin*)
24610				case " $LIBOBJS " in
24611  *" getentropy_osx.$ac_objext "* ) ;;
24612  *) LIBOBJS="$LIBOBJS getentropy_osx.$ac_objext"
24613 ;;
24614esac
24615
24616			;;
24617			*solaris*|*sunos*|SunOS)
24618				case " $LIBOBJS " in
24619  *" getentropy_solaris.$ac_objext "* ) ;;
24620  *) LIBOBJS="$LIBOBJS getentropy_solaris.$ac_objext"
24621 ;;
24622esac
24623
24624				       for ac_header in sys/sha2.h
24625do :
24626  ac_fn_c_check_header_compile "$LINENO" "sys/sha2.h" "ac_cv_header_sys_sha2_h" "$ac_includes_default
24627"
24628if test "x$ac_cv_header_sys_sha2_h" = xyes
24629then :
24630  printf "%s\n" "#define HAVE_SYS_SHA2_H 1" >>confdefs.h
24631
24632else case e in #(
24633  e)
24634
24635  for ac_func in SHA512_Update
24636do :
24637  ac_fn_c_check_func "$LINENO" "SHA512_Update" "ac_cv_func_SHA512_Update"
24638if test "x$ac_cv_func_SHA512_Update" = xyes
24639then :
24640  printf "%s\n" "#define HAVE_SHA512_UPDATE 1" >>confdefs.h
24641
24642else case e in #(
24643  e)
24644						case " $LIBOBJS " in
24645  *" sha512.$ac_objext "* ) ;;
24646  *) LIBOBJS="$LIBOBJS sha512.$ac_objext"
24647 ;;
24648esac
24649
24650					 ;;
24651esac
24652fi
24653
24654done
24655				 ;;
24656esac
24657fi
24658
24659done
24660				if test "$ac_cv_header_sys_sha2_h" = "yes"; then
24661					# this lib needed for sha2 on solaris
24662					LIBS="$LIBS -lmd"
24663				fi
24664				{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5
24665printf %s "checking for library containing clock_gettime... " >&6; }
24666if test ${ac_cv_search_clock_gettime+y}
24667then :
24668  printf %s "(cached) " >&6
24669else case e in #(
24670  e) ac_func_search_save_LIBS=$LIBS
24671cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24672/* end confdefs.h.  */
24673
24674/* Override any GCC internal prototype to avoid an error.
24675   Use char because int might match the return type of a GCC
24676   builtin and then its argument prototype would still apply.
24677   The 'extern "C"' is for builds by C++ compilers;
24678   although this is not generally supported in C code supporting it here
24679   has little cost and some practical benefit (sr 110532).  */
24680#ifdef __cplusplus
24681extern "C"
24682#endif
24683char clock_gettime (void);
24684int
24685main (void)
24686{
24687return clock_gettime ();
24688  ;
24689  return 0;
24690}
24691_ACEOF
24692for ac_lib in '' rt
24693do
24694  if test -z "$ac_lib"; then
24695    ac_res="none required"
24696  else
24697    ac_res=-l$ac_lib
24698    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
24699  fi
24700  if ac_fn_c_try_link "$LINENO"
24701then :
24702  ac_cv_search_clock_gettime=$ac_res
24703fi
24704rm -f core conftest.err conftest.$ac_objext conftest.beam \
24705    conftest$ac_exeext
24706  if test ${ac_cv_search_clock_gettime+y}
24707then :
24708  break
24709fi
24710done
24711if test ${ac_cv_search_clock_gettime+y}
24712then :
24713
24714else case e in #(
24715  e) ac_cv_search_clock_gettime=no ;;
24716esac
24717fi
24718rm conftest.$ac_ext
24719LIBS=$ac_func_search_save_LIBS ;;
24720esac
24721fi
24722{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5
24723printf "%s\n" "$ac_cv_search_clock_gettime" >&6; }
24724ac_res=$ac_cv_search_clock_gettime
24725if test "$ac_res" != no
24726then :
24727  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
24728
24729fi
24730
24731			;;
24732			*freebsd*|*FreeBSD)
24733				case " $LIBOBJS " in
24734  *" getentropy_freebsd.$ac_objext "* ) ;;
24735  *) LIBOBJS="$LIBOBJS getentropy_freebsd.$ac_objext"
24736 ;;
24737esac
24738
24739			;;
24740			*linux*|Linux|*)
24741				case " $LIBOBJS " in
24742  *" getentropy_linux.$ac_objext "* ) ;;
24743  *) LIBOBJS="$LIBOBJS getentropy_linux.$ac_objext"
24744 ;;
24745esac
24746
24747
24748  for ac_func in SHA512_Update
24749do :
24750  ac_fn_c_check_func "$LINENO" "SHA512_Update" "ac_cv_func_SHA512_Update"
24751if test "x$ac_cv_func_SHA512_Update" = xyes
24752then :
24753  printf "%s\n" "#define HAVE_SHA512_UPDATE 1" >>confdefs.h
24754
24755else case e in #(
24756  e)
24757
24758printf "%s\n" "#define COMPAT_SHA512 1" >>confdefs.h
24759
24760					case " $LIBOBJS " in
24761  *" sha512.$ac_objext "* ) ;;
24762  *) LIBOBJS="$LIBOBJS sha512.$ac_objext"
24763 ;;
24764esac
24765
24766				 ;;
24767esac
24768fi
24769
24770done
24771				ac_fn_c_check_header_compile "$LINENO" "sys/sysctl.h" "ac_cv_header_sys_sysctl_h" "$ac_includes_default
24772"
24773if test "x$ac_cv_header_sys_sysctl_h" = xyes
24774then :
24775  printf "%s\n" "#define HAVE_SYS_SYSCTL_H 1" >>confdefs.h
24776
24777fi
24778
24779				ac_fn_c_check_func "$LINENO" "getauxval" "ac_cv_func_getauxval"
24780if test "x$ac_cv_func_getauxval" = xyes
24781then :
24782  printf "%s\n" "#define HAVE_GETAUXVAL 1" >>confdefs.h
24783
24784fi
24785
24786				{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5
24787printf %s "checking for library containing clock_gettime... " >&6; }
24788if test ${ac_cv_search_clock_gettime+y}
24789then :
24790  printf %s "(cached) " >&6
24791else case e in #(
24792  e) ac_func_search_save_LIBS=$LIBS
24793cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24794/* end confdefs.h.  */
24795
24796/* Override any GCC internal prototype to avoid an error.
24797   Use char because int might match the return type of a GCC
24798   builtin and then its argument prototype would still apply.
24799   The 'extern "C"' is for builds by C++ compilers;
24800   although this is not generally supported in C code supporting it here
24801   has little cost and some practical benefit (sr 110532).  */
24802#ifdef __cplusplus
24803extern "C"
24804#endif
24805char clock_gettime (void);
24806int
24807main (void)
24808{
24809return clock_gettime ();
24810  ;
24811  return 0;
24812}
24813_ACEOF
24814for ac_lib in '' rt
24815do
24816  if test -z "$ac_lib"; then
24817    ac_res="none required"
24818  else
24819    ac_res=-l$ac_lib
24820    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
24821  fi
24822  if ac_fn_c_try_link "$LINENO"
24823then :
24824  ac_cv_search_clock_gettime=$ac_res
24825fi
24826rm -f core conftest.err conftest.$ac_objext conftest.beam \
24827    conftest$ac_exeext
24828  if test ${ac_cv_search_clock_gettime+y}
24829then :
24830  break
24831fi
24832done
24833if test ${ac_cv_search_clock_gettime+y}
24834then :
24835
24836else case e in #(
24837  e) ac_cv_search_clock_gettime=no ;;
24838esac
24839fi
24840rm conftest.$ac_ext
24841LIBS=$ac_func_search_save_LIBS ;;
24842esac
24843fi
24844{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5
24845printf "%s\n" "$ac_cv_search_clock_gettime" >&6; }
24846ac_res=$ac_cv_search_clock_gettime
24847if test "$ac_res" != no
24848then :
24849  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
24850
24851fi
24852
24853			;;
24854			esac
24855		    fi
24856		 ;;
24857esac
24858fi
24859
24860done
24861	fi
24862fi
24863LIBOBJ_WITHOUT_CTIME="$LIBOBJS"
24864
24865ac_fn_c_check_func "$LINENO" "ctime_r" "ac_cv_func_ctime_r"
24866if test "x$ac_cv_func_ctime_r" = xyes
24867then :
24868  printf "%s\n" "#define HAVE_CTIME_R 1" >>confdefs.h
24869
24870else case e in #(
24871  e) case " $LIBOBJS " in
24872  *" ctime_r.$ac_objext "* ) ;;
24873  *) LIBOBJS="$LIBOBJS ctime_r.$ac_objext"
24874 ;;
24875esac
24876 ;;
24877esac
24878fi
24879
24880ac_fn_c_check_func "$LINENO" "strsep" "ac_cv_func_strsep"
24881if test "x$ac_cv_func_strsep" = xyes
24882then :
24883  printf "%s\n" "#define HAVE_STRSEP 1" >>confdefs.h
24884
24885else case e in #(
24886  e) case " $LIBOBJS " in
24887  *" strsep.$ac_objext "* ) ;;
24888  *) LIBOBJS="$LIBOBJS strsep.$ac_objext"
24889 ;;
24890esac
24891 ;;
24892esac
24893fi
24894
24895
24896# Check whether --enable-allsymbols was given.
24897if test ${enable_allsymbols+y}
24898then :
24899  enableval=$enable_allsymbols;
24900fi
24901
24902case "$enable_allsymbols" in
24903	yes)
24904	COMMON_OBJ_ALL_SYMBOLS=""
24905	UBSYMS=""
24906	EXTRALINK="libunbound.la"
24907
24908printf "%s\n" "#define EXPORT_ALL_SYMBOLS 1" >>confdefs.h
24909
24910	;;
24911	no|*)
24912	COMMON_OBJ_ALL_SYMBOLS='$(COMMON_OBJ)'
24913	UBSYMS='-export-symbols $(srcdir)/libunbound/ubsyms.def'
24914	EXTRALINK=""
24915	;;
24916esac
24917
24918
24919
24920if test x_$enable_lock_checks = x_yes; then
24921	UBSYMS="-export-symbols clubsyms.def"
24922	cp ${srcdir}/libunbound/ubsyms.def clubsyms.def
24923	echo lock_protect >> clubsyms.def
24924	echo lock_protect_place >> clubsyms.def
24925	echo lock_unprotect >> clubsyms.def
24926	echo lock_get_mem >> clubsyms.def
24927	echo checklock_start >> clubsyms.def
24928	echo checklock_stop >> clubsyms.def
24929	echo checklock_set_output_name >> clubsyms.def
24930	echo checklock_lock >> clubsyms.def
24931	echo checklock_unlock >> clubsyms.def
24932	echo checklock_init >> clubsyms.def
24933	echo checklock_thrcreate >> clubsyms.def
24934	echo checklock_thrjoin >> clubsyms.def
24935fi
24936
24937# check for dnstap if requested
24938
24939    # Check whether --enable-dnstap was given.
24940if test ${enable_dnstap+y}
24941then :
24942  enableval=$enable_dnstap; opt_dnstap=$enableval
24943else case e in #(
24944  e) opt_dnstap=no ;;
24945esac
24946fi
24947
24948
24949
24950# Check whether --with-dnstap-socket-path was given.
24951if test ${with_dnstap_socket_path+y}
24952then :
24953  withval=$with_dnstap_socket_path; opt_dnstap_socket_path=$withval
24954else case e in #(
24955  e) opt_dnstap_socket_path="$UNBOUND_RUN_DIR/dnstap.sock" ;;
24956esac
24957fi
24958
24959
24960    if test "x$opt_dnstap" != "xno"; then
24961        # Extract the first word of "protoc-c", so it can be a program name with args.
24962set dummy protoc-c; ac_word=$2
24963{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24964printf %s "checking for $ac_word... " >&6; }
24965if test ${ac_cv_path_PROTOC_C+y}
24966then :
24967  printf %s "(cached) " >&6
24968else case e in #(
24969  e) case $PROTOC_C in
24970  [\\/]* | ?:[\\/]*)
24971  ac_cv_path_PROTOC_C="$PROTOC_C" # Let the user override the test with a path.
24972  ;;
24973  *)
24974  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24975for as_dir in $PATH
24976do
24977  IFS=$as_save_IFS
24978  case $as_dir in #(((
24979    '') as_dir=./ ;;
24980    */) ;;
24981    *) as_dir=$as_dir/ ;;
24982  esac
24983    for ac_exec_ext in '' $ac_executable_extensions; do
24984  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
24985    ac_cv_path_PROTOC_C="$as_dir$ac_word$ac_exec_ext"
24986    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
24987    break 2
24988  fi
24989done
24990  done
24991IFS=$as_save_IFS
24992
24993  ;;
24994esac ;;
24995esac
24996fi
24997PROTOC_C=$ac_cv_path_PROTOC_C
24998if test -n "$PROTOC_C"; then
24999  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PROTOC_C" >&5
25000printf "%s\n" "$PROTOC_C" >&6; }
25001else
25002  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
25003printf "%s\n" "no" >&6; }
25004fi
25005
25006
25007        if test -z "$PROTOC_C"; then
25008          as_fn_error $? "The protoc-c program was not found. Please install protobuf-c!" "$LINENO" 5
25009        fi
25010
25011# Check whether --with-protobuf-c was given.
25012if test ${with_protobuf_c+y}
25013then :
25014  withval=$with_protobuf_c;
25015                # workaround for protobuf-c includes at old dir before protobuf-c-1.0.0
25016                if test -f $withval/include/google/protobuf-c/protobuf-c.h; then
25017                    CFLAGS="$CFLAGS -I$withval/include/google"
25018                else
25019                    CFLAGS="$CFLAGS -I$withval/include"
25020                fi
25021                LDFLAGS="$LDFLAGS -L$withval/lib"
25022
25023else case e in #(
25024  e)
25025                if test -n "$PKG_CONFIG"; then
25026
25027pkg_failed=no
25028{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for PROTOBUFC" >&5
25029printf %s "checking for PROTOBUFC... " >&6; }
25030
25031if test -n "$PROTOBUFC_CFLAGS"; then
25032    pkg_cv_PROTOBUFC_CFLAGS="$PROTOBUFC_CFLAGS"
25033 elif test -n "$PKG_CONFIG"; then
25034    if test -n "$PKG_CONFIG" && \
25035    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libprotobuf-c\""; } >&5
25036  ($PKG_CONFIG --exists --print-errors "libprotobuf-c") 2>&5
25037  ac_status=$?
25038  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
25039  test $ac_status = 0; }; then
25040  pkg_cv_PROTOBUFC_CFLAGS=`$PKG_CONFIG --cflags "libprotobuf-c" 2>/dev/null`
25041		      test "x$?" != "x0" && pkg_failed=yes
25042else
25043  pkg_failed=yes
25044fi
25045 else
25046    pkg_failed=untried
25047fi
25048if test -n "$PROTOBUFC_LIBS"; then
25049    pkg_cv_PROTOBUFC_LIBS="$PROTOBUFC_LIBS"
25050 elif test -n "$PKG_CONFIG"; then
25051    if test -n "$PKG_CONFIG" && \
25052    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libprotobuf-c\""; } >&5
25053  ($PKG_CONFIG --exists --print-errors "libprotobuf-c") 2>&5
25054  ac_status=$?
25055  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
25056  test $ac_status = 0; }; then
25057  pkg_cv_PROTOBUFC_LIBS=`$PKG_CONFIG --libs "libprotobuf-c" 2>/dev/null`
25058		      test "x$?" != "x0" && pkg_failed=yes
25059else
25060  pkg_failed=yes
25061fi
25062 else
25063    pkg_failed=untried
25064fi
25065
25066
25067
25068if test $pkg_failed = yes; then
25069   	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
25070printf "%s\n" "no" >&6; }
25071
25072if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
25073        _pkg_short_errors_supported=yes
25074else
25075        _pkg_short_errors_supported=no
25076fi
25077        if test $_pkg_short_errors_supported = yes; then
25078	        PROTOBUFC_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libprotobuf-c" 2>&1`
25079        else
25080	        PROTOBUFC_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libprotobuf-c" 2>&1`
25081        fi
25082	# Put the nasty error message in config.log where it belongs
25083	echo "$PROTOBUFC_PKG_ERRORS" >&5
25084
25085
25086                            # pkg-config failed; try falling back to known values
25087                            # workaround for protobuf-c includes at old dir before protobuf-c-1.0.0
25088                            if test -f /usr/include/google/protobuf-c/protobuf-c.h; then
25089                                CFLAGS="$CFLAGS -I/usr/include/google"
25090                            else
25091                                if test -f /usr/local/include/google/protobuf-c/protobuf-c.h; then
25092                                    CFLAGS="$CFLAGS -I/usr/local/include/google"
25093                                    LDFLAGS="$LDFLAGS -L/usr/local/lib"
25094                                else
25095                                    as_fn_error $? "The protobuf-c package was not found with pkg-config. Please install protobuf-c!" "$LINENO" 5
25096                                fi
25097                            fi
25098
25099
25100elif test $pkg_failed = untried; then
25101     	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
25102printf "%s\n" "no" >&6; }
25103
25104                            # pkg-config failed; try falling back to known values
25105                            # workaround for protobuf-c includes at old dir before protobuf-c-1.0.0
25106                            if test -f /usr/include/google/protobuf-c/protobuf-c.h; then
25107                                CFLAGS="$CFLAGS -I/usr/include/google"
25108                            else
25109                                if test -f /usr/local/include/google/protobuf-c/protobuf-c.h; then
25110                                    CFLAGS="$CFLAGS -I/usr/local/include/google"
25111                                    LDFLAGS="$LDFLAGS -L/usr/local/lib"
25112                                else
25113                                    as_fn_error $? "The protobuf-c package was not found with pkg-config. Please install protobuf-c!" "$LINENO" 5
25114                                fi
25115                            fi
25116
25117
25118else
25119	PROTOBUFC_CFLAGS=$pkg_cv_PROTOBUFC_CFLAGS
25120	PROTOBUFC_LIBS=$pkg_cv_PROTOBUFC_LIBS
25121        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
25122printf "%s\n" "yes" >&6; }
25123
25124                            CFLAGS="$CFLAGS $PROTOBUFC_CFLAGS"
25125                            LIBS="$LIBS $PROTOBUFC_LIBS"
25126
25127fi
25128                else
25129                    # workaround for protobuf-c includes at old dir before protobuf-c-1.0.0
25130                    if test -f /usr/include/google/protobuf-c/protobuf-c.h; then
25131                        CFLAGS="$CFLAGS -I/usr/include/google"
25132                    else
25133                        if test -f /usr/local/include/google/protobuf-c/protobuf-c.h; then
25134                            CFLAGS="$CFLAGS -I/usr/local/include/google"
25135                            LDFLAGS="$LDFLAGS -L/usr/local/lib"
25136                        fi
25137                    fi
25138                fi
25139
25140         ;;
25141esac
25142fi
25143
25144        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing protobuf_c_message_pack" >&5
25145printf %s "checking for library containing protobuf_c_message_pack... " >&6; }
25146if test ${ac_cv_search_protobuf_c_message_pack+y}
25147then :
25148  printf %s "(cached) " >&6
25149else case e in #(
25150  e) ac_func_search_save_LIBS=$LIBS
25151cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25152/* end confdefs.h.  */
25153
25154/* Override any GCC internal prototype to avoid an error.
25155   Use char because int might match the return type of a GCC
25156   builtin and then its argument prototype would still apply.
25157   The 'extern "C"' is for builds by C++ compilers;
25158   although this is not generally supported in C code supporting it here
25159   has little cost and some practical benefit (sr 110532).  */
25160#ifdef __cplusplus
25161extern "C"
25162#endif
25163char protobuf_c_message_pack (void);
25164int
25165main (void)
25166{
25167return protobuf_c_message_pack ();
25168  ;
25169  return 0;
25170}
25171_ACEOF
25172for ac_lib in '' protobuf-c
25173do
25174  if test -z "$ac_lib"; then
25175    ac_res="none required"
25176  else
25177    ac_res=-l$ac_lib
25178    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
25179  fi
25180  if ac_fn_c_try_link "$LINENO"
25181then :
25182  ac_cv_search_protobuf_c_message_pack=$ac_res
25183fi
25184rm -f core conftest.err conftest.$ac_objext conftest.beam \
25185    conftest$ac_exeext
25186  if test ${ac_cv_search_protobuf_c_message_pack+y}
25187then :
25188  break
25189fi
25190done
25191if test ${ac_cv_search_protobuf_c_message_pack+y}
25192then :
25193
25194else case e in #(
25195  e) ac_cv_search_protobuf_c_message_pack=no ;;
25196esac
25197fi
25198rm conftest.$ac_ext
25199LIBS=$ac_func_search_save_LIBS ;;
25200esac
25201fi
25202{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_protobuf_c_message_pack" >&5
25203printf "%s\n" "$ac_cv_search_protobuf_c_message_pack" >&6; }
25204ac_res=$ac_cv_search_protobuf_c_message_pack
25205if test "$ac_res" != no
25206then :
25207  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
25208
25209else case e in #(
25210  e) as_fn_error $? "The protobuf-c library was not found. Please install the development libraries for protobuf-c!" "$LINENO" 5 ;;
25211esac
25212fi
25213
25214
25215
25216printf "%s\n" "#define USE_DNSTAP 1" >>confdefs.h
25217
25218        ENABLE_DNSTAP=1
25219
25220
25221
25222        hdr_dnstap_socket_path="`echo $opt_dnstap_socket_path | sed -e 's/\\\\/\\\\\\\\/g'`"
25223
25224
25225printf "%s\n" "#define DNSTAP_SOCKET_PATH \"$hdr_dnstap_socket_path\"" >>confdefs.h
25226
25227	DNSTAP_SOCKET_PATH="$hdr_dnstap_socket_path"
25228
25229	DNSTAP_SOCKET_TESTBIN='unbound-dnstap-socket$(EXEEXT)'
25230
25231        DNSTAP_SRC="dnstap/dnstap.c dnstap/dnstap.pb-c.c dnstap/dnstap_fstrm.c dnstap/dtstream.c"
25232
25233        DNSTAP_OBJ="dnstap.lo dnstap.pb-c.lo dnstap_fstrm.lo dtstream.lo"
25234
25235
25236    else
25237
25238        ENABLE_DNSTAP=0
25239
25240
25241
25242    fi
25243
25244
25245# check for dnscrypt if requested
25246
25247  # Check whether --enable-dnscrypt was given.
25248if test ${enable_dnscrypt+y}
25249then :
25250  enableval=$enable_dnscrypt; opt_dnscrypt=$enableval
25251else case e in #(
25252  e) opt_dnscrypt=no ;;
25253esac
25254fi
25255
25256
25257  if test "x$opt_dnscrypt" != "xno"; then
25258
25259# Check whether --with-libsodium was given.
25260if test ${with_libsodium+y}
25261then :
25262  withval=$with_libsodium;
25263	CFLAGS="$CFLAGS -I$withval/include"
25264	LDFLAGS="$LDFLAGS -L$withval/lib"
25265
25266fi
25267
25268    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing sodium_init" >&5
25269printf %s "checking for library containing sodium_init... " >&6; }
25270if test ${ac_cv_search_sodium_init+y}
25271then :
25272  printf %s "(cached) " >&6
25273else case e in #(
25274  e) ac_func_search_save_LIBS=$LIBS
25275cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25276/* end confdefs.h.  */
25277
25278/* Override any GCC internal prototype to avoid an error.
25279   Use char because int might match the return type of a GCC
25280   builtin and then its argument prototype would still apply.
25281   The 'extern "C"' is for builds by C++ compilers;
25282   although this is not generally supported in C code supporting it here
25283   has little cost and some practical benefit (sr 110532).  */
25284#ifdef __cplusplus
25285extern "C"
25286#endif
25287char sodium_init (void);
25288int
25289main (void)
25290{
25291return sodium_init ();
25292  ;
25293  return 0;
25294}
25295_ACEOF
25296for ac_lib in '' sodium
25297do
25298  if test -z "$ac_lib"; then
25299    ac_res="none required"
25300  else
25301    ac_res=-l$ac_lib
25302    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
25303  fi
25304  if ac_fn_c_try_link "$LINENO"
25305then :
25306  ac_cv_search_sodium_init=$ac_res
25307fi
25308rm -f core conftest.err conftest.$ac_objext conftest.beam \
25309    conftest$ac_exeext
25310  if test ${ac_cv_search_sodium_init+y}
25311then :
25312  break
25313fi
25314done
25315if test ${ac_cv_search_sodium_init+y}
25316then :
25317
25318else case e in #(
25319  e) ac_cv_search_sodium_init=no ;;
25320esac
25321fi
25322rm conftest.$ac_ext
25323LIBS=$ac_func_search_save_LIBS ;;
25324esac
25325fi
25326{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sodium_init" >&5
25327printf "%s\n" "$ac_cv_search_sodium_init" >&6; }
25328ac_res=$ac_cv_search_sodium_init
25329if test "$ac_res" != no
25330then :
25331  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
25332
25333else case e in #(
25334  e) as_fn_error $? "The sodium library was not found. Please install sodium!" "$LINENO" 5 ;;
25335esac
25336fi
25337
25338    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing crypto_box_curve25519xchacha20poly1305_beforenm" >&5
25339printf %s "checking for library containing crypto_box_curve25519xchacha20poly1305_beforenm... " >&6; }
25340if test ${ac_cv_search_crypto_box_curve25519xchacha20poly1305_beforenm+y}
25341then :
25342  printf %s "(cached) " >&6
25343else case e in #(
25344  e) ac_func_search_save_LIBS=$LIBS
25345cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25346/* end confdefs.h.  */
25347
25348/* Override any GCC internal prototype to avoid an error.
25349   Use char because int might match the return type of a GCC
25350   builtin and then its argument prototype would still apply.
25351   The 'extern "C"' is for builds by C++ compilers;
25352   although this is not generally supported in C code supporting it here
25353   has little cost and some practical benefit (sr 110532).  */
25354#ifdef __cplusplus
25355extern "C"
25356#endif
25357char crypto_box_curve25519xchacha20poly1305_beforenm (void);
25358int
25359main (void)
25360{
25361return crypto_box_curve25519xchacha20poly1305_beforenm ();
25362  ;
25363  return 0;
25364}
25365_ACEOF
25366for ac_lib in '' sodium
25367do
25368  if test -z "$ac_lib"; then
25369    ac_res="none required"
25370  else
25371    ac_res=-l$ac_lib
25372    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
25373  fi
25374  if ac_fn_c_try_link "$LINENO"
25375then :
25376  ac_cv_search_crypto_box_curve25519xchacha20poly1305_beforenm=$ac_res
25377fi
25378rm -f core conftest.err conftest.$ac_objext conftest.beam \
25379    conftest$ac_exeext
25380  if test ${ac_cv_search_crypto_box_curve25519xchacha20poly1305_beforenm+y}
25381then :
25382  break
25383fi
25384done
25385if test ${ac_cv_search_crypto_box_curve25519xchacha20poly1305_beforenm+y}
25386then :
25387
25388else case e in #(
25389  e) ac_cv_search_crypto_box_curve25519xchacha20poly1305_beforenm=no ;;
25390esac
25391fi
25392rm conftest.$ac_ext
25393LIBS=$ac_func_search_save_LIBS ;;
25394esac
25395fi
25396{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_crypto_box_curve25519xchacha20poly1305_beforenm" >&5
25397printf "%s\n" "$ac_cv_search_crypto_box_curve25519xchacha20poly1305_beforenm" >&6; }
25398ac_res=$ac_cv_search_crypto_box_curve25519xchacha20poly1305_beforenm
25399if test "$ac_res" != no
25400then :
25401  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
25402
25403            ENABLE_DNSCRYPT_XCHACHA20=1
25404
25405
25406printf "%s\n" "#define USE_DNSCRYPT_XCHACHA20 1" >>confdefs.h
25407
25408
25409else case e in #(
25410  e)
25411            ENABLE_DNSCRYPT_XCHACHA20=0
25412
25413         ;;
25414esac
25415fi
25416
25417    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing sodium_set_misuse_handler" >&5
25418printf %s "checking for library containing sodium_set_misuse_handler... " >&6; }
25419if test ${ac_cv_search_sodium_set_misuse_handler+y}
25420then :
25421  printf %s "(cached) " >&6
25422else case e in #(
25423  e) ac_func_search_save_LIBS=$LIBS
25424cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25425/* end confdefs.h.  */
25426
25427/* Override any GCC internal prototype to avoid an error.
25428   Use char because int might match the return type of a GCC
25429   builtin and then its argument prototype would still apply.
25430   The 'extern "C"' is for builds by C++ compilers;
25431   although this is not generally supported in C code supporting it here
25432   has little cost and some practical benefit (sr 110532).  */
25433#ifdef __cplusplus
25434extern "C"
25435#endif
25436char sodium_set_misuse_handler (void);
25437int
25438main (void)
25439{
25440return sodium_set_misuse_handler ();
25441  ;
25442  return 0;
25443}
25444_ACEOF
25445for ac_lib in '' sodium
25446do
25447  if test -z "$ac_lib"; then
25448    ac_res="none required"
25449  else
25450    ac_res=-l$ac_lib
25451    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
25452  fi
25453  if ac_fn_c_try_link "$LINENO"
25454then :
25455  ac_cv_search_sodium_set_misuse_handler=$ac_res
25456fi
25457rm -f core conftest.err conftest.$ac_objext conftest.beam \
25458    conftest$ac_exeext
25459  if test ${ac_cv_search_sodium_set_misuse_handler+y}
25460then :
25461  break
25462fi
25463done
25464if test ${ac_cv_search_sodium_set_misuse_handler+y}
25465then :
25466
25467else case e in #(
25468  e) ac_cv_search_sodium_set_misuse_handler=no ;;
25469esac
25470fi
25471rm conftest.$ac_ext
25472LIBS=$ac_func_search_save_LIBS ;;
25473esac
25474fi
25475{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sodium_set_misuse_handler" >&5
25476printf "%s\n" "$ac_cv_search_sodium_set_misuse_handler" >&6; }
25477ac_res=$ac_cv_search_sodium_set_misuse_handler
25478if test "$ac_res" != no
25479then :
25480  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
25481
25482
25483printf "%s\n" "#define SODIUM_MISUSE_HANDLER 1" >>confdefs.h
25484
25485
25486fi
25487
25488
25489
25490printf "%s\n" "#define USE_DNSCRYPT 1" >>confdefs.h
25491
25492        ENABLE_DNSCRYPT=1
25493
25494
25495        DNSCRYPT_SRC="dnscrypt/dnscrypt.c"
25496
25497        DNSCRYPT_OBJ="dnscrypt.lo"
25498
25499
25500  else
25501    ENABLE_DNSCRYPT_XCHACHA20=0
25502
25503
25504        ENABLE_DNSCRYPT=0
25505
25506
25507
25508  fi
25509
25510
25511# check for cachedb if requested
25512# Check whether --enable-cachedb was given.
25513if test ${enable_cachedb+y}
25514then :
25515  enableval=$enable_cachedb;
25516fi
25517
25518# turn on cachedb when hiredis support is enabled.
25519if test "$found_libhiredis" = "yes"; then enable_cachedb="yes"; fi
25520case "$enable_cachedb" in
25521    yes)
25522
25523printf "%s\n" "#define USE_CACHEDB 1" >>confdefs.h
25524
25525	CACHEDB_SRC="cachedb/cachedb.c cachedb/redis.c"
25526
25527	CACHEDB_OBJ="cachedb.lo redis.lo"
25528
25529    	;;
25530    no|*)
25531    	# nothing
25532    	;;
25533esac
25534
25535# check for ipsecmod if requested
25536# Check whether --enable-ipsecmod was given.
25537if test ${enable_ipsecmod+y}
25538then :
25539  enableval=$enable_ipsecmod;
25540fi
25541
25542case "$enable_ipsecmod" in
25543	yes)
25544
25545printf "%s\n" "#define USE_IPSECMOD 1" >>confdefs.h
25546
25547		IPSECMOD_OBJ="ipsecmod.lo ipsecmod-whitelist.lo"
25548
25549		IPSECMOD_HEADER='$(srcdir)/ipsecmod/ipsecmod.h $(srcdir)/ipsecmod/ipsecmod-whitelist.h'
25550
25551		;;
25552	no|*)
25553		# nothing
25554		;;
25555esac
25556
25557# check for ipset if requested
25558# Check whether --enable-ipset was given.
25559if test ${enable_ipset+y}
25560then :
25561  enableval=$enable_ipset;
25562fi
25563
25564case "$enable_ipset" in
25565    yes)
25566
25567printf "%s\n" "#define USE_IPSET 1" >>confdefs.h
25568
25569		IPSET_SRC="ipset/ipset.c"
25570
25571		IPSET_OBJ="ipset.lo"
25572
25573
25574		# BSD's pf
25575		       for ac_header in net/pfvar.h
25576do :
25577  ac_fn_c_check_header_compile "$LINENO" "net/pfvar.h" "ac_cv_header_net_pfvar_h" "
25578		  #include <netinet/in.h>
25579		  #include <net/if.h>
25580
25581"
25582if test "x$ac_cv_header_net_pfvar_h" = xyes
25583then :
25584  printf "%s\n" "#define HAVE_NET_PFVAR_H 1" >>confdefs.h
25585
25586else case e in #(
25587  e)
25588		    # mnl
25589
25590# Check whether --with-libmnl was given.
25591if test ${with_libmnl+y}
25592then :
25593  withval=$with_libmnl;
25594else case e in #(
25595  e)  withval="yes"  ;;
25596esac
25597fi
25598
25599		    found_libmnl="no"
25600		    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libmnl" >&5
25601printf %s "checking for libmnl... " >&6; }
25602		    if test x_$withval = x_ -o x_$withval = x_yes; then
25603			withval="/usr/local /opt/local /usr/lib /usr/pkg /usr/sfw /usr"
25604		    fi
25605		    for dir in $withval ; do
25606			if test -f "$dir/include/libmnl/libmnl.h" -o -f "$dir/include/libmnl/libmnl/libmnl.h"; then
25607				found_libmnl="yes"
25608								extralibmnl=""
25609				if test -f "$dir/include/libmnl/libmnl/libmnl.h"; then
25610					extralibmnl="/libmnl"
25611				fi
25612				if test "$dir" != "/usr" -o -n "$extralibmnl"; then
25613					CPPFLAGS="$CPPFLAGS -I$dir/include$extralibmnl"
25614				fi
25615				if test "$dir" != "/usr"; then
25616					LDFLAGS="$LDFLAGS -L$dir/lib"
25617				fi
25618				{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: found in $dir" >&5
25619printf "%s\n" "found in $dir" >&6; }
25620				LIBS="$LIBS -lmnl"
25621				break;
25622			fi
25623		    done
25624		    if test x_$found_libmnl != x_yes; then
25625			  as_fn_error $? "Could not find libmnl, libmnl.h" "$LINENO" 5
25626		    fi
25627		 ;;
25628esac
25629fi
25630
25631done
25632		;;
25633    no|*)
25634    	# nothing
25635		;;
25636esac
25637# Check whether --enable-explicit-port-randomisation was given.
25638if test ${enable_explicit_port_randomisation+y}
25639then :
25640  enableval=$enable_explicit_port_randomisation;
25641fi
25642
25643case "$enable_explicit_port_randomisation" in
25644	no)
25645
25646printf "%s\n" "#define DISABLE_EXPLICIT_PORT_RANDOMISATION 1" >>confdefs.h
25647
25648		;;
25649	yes|*)
25650		;;
25651esac
25652
25653if echo "$host" | $GREP -i -e linux >/dev/null; then
25654	# Check whether --enable-linux-ip-local-port-range was given.
25655if test ${enable_linux_ip_local_port_range+y}
25656then :
25657  enableval=$enable_linux_ip_local_port_range;
25658fi
25659
25660	case "$enable_linux_ip_local_port_range" in
25661		yes)
25662
25663printf "%s\n" "#define USE_LINUX_IP_LOCAL_PORT_RANGE 1" >>confdefs.h
25664
25665			;;
25666		no|*)
25667			;;
25668	esac
25669fi
25670
25671
25672{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if ${MAKE:-make} supports $< with implicit rule in scope" >&5
25673printf %s "checking if ${MAKE:-make} supports $< with implicit rule in scope... " >&6; }
25674# on openBSD, the implicit rule make $< work.
25675# on Solaris, it does not work ($? is changed sources, $^ lists dependencies).
25676# gmake works.
25677cat >conftest.make <<EOF
25678all:	conftest.lo
25679
25680conftest.lo foo.lo bla.lo:
25681	if test -f "\$<"; then touch \$@; fi
25682
25683.SUFFIXES: .lo
25684.c.lo:
25685	if test -f "\$<"; then touch \$@; fi
25686
25687conftest.lo:        conftest.dir/conftest.c
25688EOF
25689mkdir conftest.dir
25690touch conftest.dir/conftest.c
25691rm -f conftest.lo conftest.c
25692${MAKE:-make} -f conftest.make >/dev/null
25693rm -f conftest.make conftest.c conftest.dir/conftest.c
25694rm -rf conftest.dir
25695if test ! -f conftest.lo; then
25696	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
25697printf "%s\n" "no" >&6; }
25698	SOURCEDETERMINE='echo "$^" | awk "-F " "{print \$$1;}" > .source'
25699	SOURCEFILE='`cat .source`'
25700else
25701	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
25702printf "%s\n" "yes" >&6; }
25703	SOURCEDETERMINE=':'
25704	SOURCEFILE='$<'
25705fi
25706rm -f conftest.lo
25707
25708
25709
25710# see if we want to build the library or everything
25711ALLTARGET="alltargets"
25712INSTALLTARGET="install-all"
25713
25714# Check whether --with-libunbound-only was given.
25715if test ${with_libunbound_only+y}
25716then :
25717  withval=$with_libunbound_only;
25718	if test "$withval" = "yes"; then
25719		ALLTARGET="lib"
25720		INSTALLTARGET="install-lib"
25721	fi
25722
25723fi
25724
25725if test $ALLTARGET = "alltargets"; then
25726	if test $USE_NSS = "yes"; then
25727		as_fn_error $? "--with-nss can only be used in combination with --with-libunbound-only." "$LINENO" 5
25728	fi
25729	if test $USE_NETTLE = "yes"; then
25730		as_fn_error $? "--with-nettle can only be used in combination with --with-libunbound-only." "$LINENO" 5
25731	fi
25732fi
25733
25734
25735
25736
25737
25738  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Stripping extension flags..." >&5
25739printf "%s\n" "$as_me: Stripping extension flags..." >&6;}
25740
25741  if echo $CFLAGS | grep " -D_GNU_SOURCE" >/dev/null 2>&1; then
25742    CFLAGS="`echo $CFLAGS | sed -e 's/ -D_GNU_SOURCE//g'`"
25743
25744printf "%s\n" "#define OMITTED__D_GNU_SOURCE 1" >>confdefs.h
25745
25746  fi
25747
25748
25749  if echo $CFLAGS | grep " -D_BSD_SOURCE" >/dev/null 2>&1; then
25750    CFLAGS="`echo $CFLAGS | sed -e 's/ -D_BSD_SOURCE//g'`"
25751
25752printf "%s\n" "#define OMITTED__D_BSD_SOURCE 1" >>confdefs.h
25753
25754  fi
25755
25756
25757  if echo $CFLAGS | grep " -D_DEFAULT_SOURCE" >/dev/null 2>&1; then
25758    CFLAGS="`echo $CFLAGS | sed -e 's/ -D_DEFAULT_SOURCE//g'`"
25759
25760printf "%s\n" "#define OMITTED__D_DEFAULT_SOURCE 1" >>confdefs.h
25761
25762  fi
25763
25764
25765  if echo $CFLAGS | grep " -D__EXTENSIONS__" >/dev/null 2>&1; then
25766    CFLAGS="`echo $CFLAGS | sed -e 's/ -D__EXTENSIONS__//g'`"
25767
25768printf "%s\n" "#define OMITTED__D__EXTENSIONS__ 1" >>confdefs.h
25769
25770  fi
25771
25772
25773  if echo $CFLAGS | grep " -D_POSIX_C_SOURCE=200112" >/dev/null 2>&1; then
25774    CFLAGS="`echo $CFLAGS | sed -e 's/ -D_POSIX_C_SOURCE=200112//g'`"
25775
25776printf "%s\n" "#define OMITTED__D_POSIX_C_SOURCE_200112 1" >>confdefs.h
25777
25778  fi
25779
25780
25781  if echo $CFLAGS | grep " -D_XOPEN_SOURCE=600" >/dev/null 2>&1; then
25782    CFLAGS="`echo $CFLAGS | sed -e 's/ -D_XOPEN_SOURCE=600//g'`"
25783
25784printf "%s\n" "#define OMITTED__D_XOPEN_SOURCE_600 1" >>confdefs.h
25785
25786  fi
25787
25788
25789  if echo $CFLAGS | grep " -D_XOPEN_SOURCE_EXTENDED=1" >/dev/null 2>&1; then
25790    CFLAGS="`echo $CFLAGS | sed -e 's/ -D_XOPEN_SOURCE_EXTENDED=1//g'`"
25791
25792printf "%s\n" "#define OMITTED__D_XOPEN_SOURCE_EXTENDED_1 1" >>confdefs.h
25793
25794  fi
25795
25796
25797  if echo $CFLAGS | grep " -D_ALL_SOURCE" >/dev/null 2>&1; then
25798    CFLAGS="`echo $CFLAGS | sed -e 's/ -D_ALL_SOURCE//g'`"
25799
25800printf "%s\n" "#define OMITTED__D_ALL_SOURCE 1" >>confdefs.h
25801
25802  fi
25803
25804
25805  if echo $CFLAGS | grep " -D_LARGEFILE_SOURCE=1" >/dev/null 2>&1; then
25806    CFLAGS="`echo $CFLAGS | sed -e 's/ -D_LARGEFILE_SOURCE=1//g'`"
25807
25808printf "%s\n" "#define OMITTED__D_LARGEFILE_SOURCE_1 1" >>confdefs.h
25809
25810  fi
25811
25812
25813if test -n "$LATE_LDFLAGS"; then
25814  LDFLAGS="$LATE_LDFLAGS $LDFLAGS"
25815fi
25816# remove start spaces
25817LDFLAGS=`echo "$LDFLAGS"|sed -e 's/^ *//'`
25818LIBS=`echo "$LIBS"|sed -e 's/^ *//'`
25819
25820
25821printf "%s\n" "#define MAXSYSLOGMSGLEN 10240" >>confdefs.h
25822
25823
25824
25825
25826version=1.23.1
25827
25828{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for build time" >&5
25829printf %s "checking for build time... " >&6; }
25830ax_date_fmt="%b %e, %Y"
25831if test x"$SOURCE_DATE_EPOCH" = x
25832then :
25833  date=`date "+$ax_date_fmt"`
25834else case e in #(
25835  e) ax_build_date=`date -u -d "@$SOURCE_DATE_EPOCH" "+$ax_date_fmt" 2>/dev/null \
25836                 || date -u -r "$SOURCE_DATE_EPOCH" "+$ax_date_fmt" 2>/dev/null`
25837  if test x"$ax_build_date" = x
25838then :
25839  as_fn_error $? "malformed SOURCE_DATE_EPOCH" "$LINENO" 5
25840else case e in #(
25841  e) date=$ax_build_date ;;
25842esac
25843fi ;;
25844esac
25845fi
25846{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $date" >&5
25847printf "%s\n" "$date" >&6; }
25848
25849
25850
25851ac_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"
25852
25853ac_config_headers="$ac_config_headers config.h"
25854
25855cat >confcache <<\_ACEOF
25856# This file is a shell script that caches the results of configure
25857# tests run on this system so they can be shared between configure
25858# scripts and configure runs, see configure's option --config-cache.
25859# It is not useful on other systems.  If it contains results you don't
25860# want to keep, you may remove or edit it.
25861#
25862# config.status only pays attention to the cache file if you give it
25863# the --recheck option to rerun configure.
25864#
25865# 'ac_cv_env_foo' variables (set or unset) will be overridden when
25866# loading this file, other *unset* 'ac_cv_foo' will be assigned the
25867# following values.
25868
25869_ACEOF
25870
25871# The following way of writing the cache mishandles newlines in values,
25872# but we know of no workaround that is simple, portable, and efficient.
25873# So, we kill variables containing newlines.
25874# Ultrix sh set writes to stderr and can't be redirected directly,
25875# and sets the high bit in the cache file unless we assign to the vars.
25876(
25877  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
25878    eval ac_val=\$$ac_var
25879    case $ac_val in #(
25880    *${as_nl}*)
25881      case $ac_var in #(
25882      *_cv_*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
25883printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
25884      esac
25885      case $ac_var in #(
25886      _ | IFS | as_nl) ;; #(
25887      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
25888      *) { eval $ac_var=; unset $ac_var;} ;;
25889      esac ;;
25890    esac
25891  done
25892
25893  (set) 2>&1 |
25894    case $as_nl`(ac_space=' '; set) 2>&1` in #(
25895    *${as_nl}ac_space=\ *)
25896      # 'set' does not quote correctly, so add quotes: double-quote
25897      # substitution turns \\\\ into \\, and sed turns \\ into \.
25898      sed -n \
25899	"s/'/'\\\\''/g;
25900	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
25901      ;; #(
25902    *)
25903      # 'set' quotes correctly as required by POSIX, so do not add quotes.
25904      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
25905      ;;
25906    esac |
25907    sort
25908) |
25909  sed '
25910     /^ac_cv_env_/b end
25911     t clear
25912     :clear
25913     s/^\([^=]*\)=\(.*[{}].*\)$/test ${\1+y} || &/
25914     t end
25915     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
25916     :end' >>confcache
25917if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
25918  if test -w "$cache_file"; then
25919    if test "x$cache_file" != "x/dev/null"; then
25920      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
25921printf "%s\n" "$as_me: updating cache $cache_file" >&6;}
25922      if test ! -f "$cache_file" || test -h "$cache_file"; then
25923	cat confcache >"$cache_file"
25924      else
25925        case $cache_file in #(
25926        */* | ?:*)
25927	  mv -f confcache "$cache_file"$$ &&
25928	  mv -f "$cache_file"$$ "$cache_file" ;; #(
25929        *)
25930	  mv -f confcache "$cache_file" ;;
25931	esac
25932      fi
25933    fi
25934  else
25935    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
25936printf "%s\n" "$as_me: not updating unwritable cache $cache_file" >&6;}
25937  fi
25938fi
25939rm -f confcache
25940
25941test "x$prefix" = xNONE && prefix=$ac_default_prefix
25942# Let make expand exec_prefix.
25943test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
25944
25945DEFS=-DHAVE_CONFIG_H
25946
25947ac_libobjs=
25948ac_ltlibobjs=
25949U=
25950for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
25951  # 1. Remove the extension, and $U if already installed.
25952  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
25953  ac_i=`printf "%s\n" "$ac_i" | sed "$ac_script"`
25954  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
25955  #    will be set to the directory where LIBOBJS objects are built.
25956  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
25957  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
25958done
25959LIBOBJS=$ac_libobjs
25960
25961LTLIBOBJS=$ac_ltlibobjs
25962
25963
25964# Check whether --enable-year2038 was given.
25965if test ${enable_year2038+y}
25966then :
25967  enableval=$enable_year2038;
25968fi
25969
25970if test -z "${USE_SYSTEMD_TRUE}" && test -z "${USE_SYSTEMD_FALSE}"; then
25971  as_fn_error $? "conditional \"USE_SYSTEMD\" was never defined.
25972Usually this means the macro was only invoked conditionally." "$LINENO" 5
25973fi
25974
25975: "${CONFIG_STATUS=./config.status}"
25976ac_write_fail=0
25977ac_clean_files_save=$ac_clean_files
25978ac_clean_files="$ac_clean_files $CONFIG_STATUS"
25979{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
25980printf "%s\n" "$as_me: creating $CONFIG_STATUS" >&6;}
25981as_write_fail=0
25982cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
25983#! $SHELL
25984# Generated by $as_me.
25985# Run this file to recreate the current configuration.
25986# Compiler output produced by configure, useful for debugging
25987# configure, is in config.log if it exists.
25988
25989debug=false
25990ac_cs_recheck=false
25991ac_cs_silent=false
25992
25993SHELL=\${CONFIG_SHELL-$SHELL}
25994export SHELL
25995_ASEOF
25996cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
25997## -------------------- ##
25998## M4sh Initialization. ##
25999## -------------------- ##
26000
26001# Be more Bourne compatible
26002DUALCASE=1; export DUALCASE # for MKS sh
26003if test ${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1
26004then :
26005  emulate sh
26006  NULLCMD=:
26007  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
26008  # is contrary to our usage.  Disable this feature.
26009  alias -g '${1+"$@"}'='"$@"'
26010  setopt NO_GLOB_SUBST
26011else case e in #(
26012  e) case `(set -o) 2>/dev/null` in #(
26013  *posix*) :
26014    set -o posix ;; #(
26015  *) :
26016     ;;
26017esac ;;
26018esac
26019fi
26020
26021
26022
26023# Reset variables that may have inherited troublesome values from
26024# the environment.
26025
26026# IFS needs to be set, to space, tab, and newline, in precisely that order.
26027# (If _AS_PATH_WALK were called with IFS unset, it would have the
26028# side effect of setting IFS to empty, thus disabling word splitting.)
26029# Quoting is to prevent editors from complaining about space-tab.
26030as_nl='
26031'
26032export as_nl
26033IFS=" ""	$as_nl"
26034
26035PS1='$ '
26036PS2='> '
26037PS4='+ '
26038
26039# Ensure predictable behavior from utilities with locale-dependent output.
26040LC_ALL=C
26041export LC_ALL
26042LANGUAGE=C
26043export LANGUAGE
26044
26045# We cannot yet rely on "unset" to work, but we need these variables
26046# to be unset--not just set to an empty or harmless value--now, to
26047# avoid bugs in old shells (e.g. pre-3.0 UWIN ksh).  This construct
26048# also avoids known problems related to "unset" and subshell syntax
26049# in other old shells (e.g. bash 2.01 and pdksh 5.2.14).
26050for as_var in BASH_ENV ENV MAIL MAILPATH CDPATH
26051do eval test \${$as_var+y} \
26052  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
26053done
26054
26055# Ensure that fds 0, 1, and 2 are open.
26056if (exec 3>&0) 2>/dev/null; then :; else exec 0</dev/null; fi
26057if (exec 3>&1) 2>/dev/null; then :; else exec 1>/dev/null; fi
26058if (exec 3>&2)            ; then :; else exec 2>/dev/null; fi
26059
26060# The user is always right.
26061if ${PATH_SEPARATOR+false} :; then
26062  PATH_SEPARATOR=:
26063  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
26064    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
26065      PATH_SEPARATOR=';'
26066  }
26067fi
26068
26069
26070# Find who we are.  Look in the path if we contain no directory separator.
26071as_myself=
26072case $0 in #((
26073  *[\\/]* ) as_myself=$0 ;;
26074  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26075for as_dir in $PATH
26076do
26077  IFS=$as_save_IFS
26078  case $as_dir in #(((
26079    '') as_dir=./ ;;
26080    */) ;;
26081    *) as_dir=$as_dir/ ;;
26082  esac
26083    test -r "$as_dir$0" && as_myself=$as_dir$0 && break
26084  done
26085IFS=$as_save_IFS
26086
26087     ;;
26088esac
26089# We did not find ourselves, most probably we were run as 'sh COMMAND'
26090# in which case we are not to be found in the path.
26091if test "x$as_myself" = x; then
26092  as_myself=$0
26093fi
26094if test ! -f "$as_myself"; then
26095  printf "%s\n" "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
26096  exit 1
26097fi
26098
26099
26100
26101# as_fn_error STATUS ERROR [LINENO LOG_FD]
26102# ----------------------------------------
26103# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
26104# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
26105# script with STATUS, using 1 if that was 0.
26106as_fn_error ()
26107{
26108  as_status=$1; test $as_status -eq 0 && as_status=1
26109  if test "$4"; then
26110    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
26111    printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
26112  fi
26113  printf "%s\n" "$as_me: error: $2" >&2
26114  as_fn_exit $as_status
26115} # as_fn_error
26116
26117
26118# as_fn_set_status STATUS
26119# -----------------------
26120# Set $? to STATUS, without forking.
26121as_fn_set_status ()
26122{
26123  return $1
26124} # as_fn_set_status
26125
26126# as_fn_exit STATUS
26127# -----------------
26128# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
26129as_fn_exit ()
26130{
26131  set +e
26132  as_fn_set_status $1
26133  exit $1
26134} # as_fn_exit
26135
26136# as_fn_unset VAR
26137# ---------------
26138# Portably unset VAR.
26139as_fn_unset ()
26140{
26141  { eval $1=; unset $1;}
26142}
26143as_unset=as_fn_unset
26144
26145# as_fn_append VAR VALUE
26146# ----------------------
26147# Append the text in VALUE to the end of the definition contained in VAR. Take
26148# advantage of any shell optimizations that allow amortized linear growth over
26149# repeated appends, instead of the typical quadratic growth present in naive
26150# implementations.
26151if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null
26152then :
26153  eval 'as_fn_append ()
26154  {
26155    eval $1+=\$2
26156  }'
26157else case e in #(
26158  e) as_fn_append ()
26159  {
26160    eval $1=\$$1\$2
26161  } ;;
26162esac
26163fi # as_fn_append
26164
26165# as_fn_arith ARG...
26166# ------------------
26167# Perform arithmetic evaluation on the ARGs, and store the result in the
26168# global $as_val. Take advantage of shells that can avoid forks. The arguments
26169# must be portable across $(()) and expr.
26170if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null
26171then :
26172  eval 'as_fn_arith ()
26173  {
26174    as_val=$(( $* ))
26175  }'
26176else case e in #(
26177  e) as_fn_arith ()
26178  {
26179    as_val=`expr "$@" || test $? -eq 1`
26180  } ;;
26181esac
26182fi # as_fn_arith
26183
26184
26185if expr a : '\(a\)' >/dev/null 2>&1 &&
26186   test "X`expr 00001 : '.*\(...\)'`" = X001; then
26187  as_expr=expr
26188else
26189  as_expr=false
26190fi
26191
26192if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
26193  as_basename=basename
26194else
26195  as_basename=false
26196fi
26197
26198if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
26199  as_dirname=dirname
26200else
26201  as_dirname=false
26202fi
26203
26204as_me=`$as_basename -- "$0" ||
26205$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
26206	 X"$0" : 'X\(//\)$' \| \
26207	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
26208printf "%s\n" X/"$0" |
26209    sed '/^.*\/\([^/][^/]*\)\/*$/{
26210	    s//\1/
26211	    q
26212	  }
26213	  /^X\/\(\/\/\)$/{
26214	    s//\1/
26215	    q
26216	  }
26217	  /^X\/\(\/\).*/{
26218	    s//\1/
26219	    q
26220	  }
26221	  s/.*/./; q'`
26222
26223# Avoid depending upon Character Ranges.
26224as_cr_letters='abcdefghijklmnopqrstuvwxyz'
26225as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
26226as_cr_Letters=$as_cr_letters$as_cr_LETTERS
26227as_cr_digits='0123456789'
26228as_cr_alnum=$as_cr_Letters$as_cr_digits
26229
26230
26231# Determine whether it's possible to make 'echo' print without a newline.
26232# These variables are no longer used directly by Autoconf, but are AC_SUBSTed
26233# for compatibility with existing Makefiles.
26234ECHO_C= ECHO_N= ECHO_T=
26235case `echo -n x` in #(((((
26236-n*)
26237  case `echo 'xy\c'` in
26238  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
26239  xy)  ECHO_C='\c';;
26240  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
26241       ECHO_T='	';;
26242  esac;;
26243*)
26244  ECHO_N='-n';;
26245esac
26246
26247# For backward compatibility with old third-party macros, we provide
26248# the shell variables $as_echo and $as_echo_n.  New code should use
26249# AS_ECHO(["message"]) and AS_ECHO_N(["message"]), respectively.
26250as_echo='printf %s\n'
26251as_echo_n='printf %s'
26252
26253rm -f conf$$ conf$$.exe conf$$.file
26254if test -d conf$$.dir; then
26255  rm -f conf$$.dir/conf$$.file
26256else
26257  rm -f conf$$.dir
26258  mkdir conf$$.dir 2>/dev/null
26259fi
26260if (echo >conf$$.file) 2>/dev/null; then
26261  if ln -s conf$$.file conf$$ 2>/dev/null; then
26262    as_ln_s='ln -s'
26263    # ... but there are two gotchas:
26264    # 1) On MSYS, both 'ln -s file dir' and 'ln file dir' fail.
26265    # 2) DJGPP < 2.04 has no symlinks; 'ln -s' creates a wrapper executable.
26266    # In both cases, we have to default to 'cp -pR'.
26267    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
26268      as_ln_s='cp -pR'
26269  elif ln conf$$.file conf$$ 2>/dev/null; then
26270    as_ln_s=ln
26271  else
26272    as_ln_s='cp -pR'
26273  fi
26274else
26275  as_ln_s='cp -pR'
26276fi
26277rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
26278rmdir conf$$.dir 2>/dev/null
26279
26280
26281# as_fn_mkdir_p
26282# -------------
26283# Create "$as_dir" as a directory, including parents if necessary.
26284as_fn_mkdir_p ()
26285{
26286
26287  case $as_dir in #(
26288  -*) as_dir=./$as_dir;;
26289  esac
26290  test -d "$as_dir" || eval $as_mkdir_p || {
26291    as_dirs=
26292    while :; do
26293      case $as_dir in #(
26294      *\'*) as_qdir=`printf "%s\n" "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
26295      *) as_qdir=$as_dir;;
26296      esac
26297      as_dirs="'$as_qdir' $as_dirs"
26298      as_dir=`$as_dirname -- "$as_dir" ||
26299$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
26300	 X"$as_dir" : 'X\(//\)[^/]' \| \
26301	 X"$as_dir" : 'X\(//\)$' \| \
26302	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
26303printf "%s\n" X"$as_dir" |
26304    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
26305	    s//\1/
26306	    q
26307	  }
26308	  /^X\(\/\/\)[^/].*/{
26309	    s//\1/
26310	    q
26311	  }
26312	  /^X\(\/\/\)$/{
26313	    s//\1/
26314	    q
26315	  }
26316	  /^X\(\/\).*/{
26317	    s//\1/
26318	    q
26319	  }
26320	  s/.*/./; q'`
26321      test -d "$as_dir" && break
26322    done
26323    test -z "$as_dirs" || eval "mkdir $as_dirs"
26324  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
26325
26326
26327} # as_fn_mkdir_p
26328if mkdir -p . 2>/dev/null; then
26329  as_mkdir_p='mkdir -p "$as_dir"'
26330else
26331  test -d ./-p && rmdir ./-p
26332  as_mkdir_p=false
26333fi
26334
26335
26336# as_fn_executable_p FILE
26337# -----------------------
26338# Test if FILE is an executable regular file.
26339as_fn_executable_p ()
26340{
26341  test -f "$1" && test -x "$1"
26342} # as_fn_executable_p
26343as_test_x='test -x'
26344as_executable_p=as_fn_executable_p
26345
26346# Sed expression to map a string onto a valid CPP name.
26347as_sed_cpp="y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
26348as_tr_cpp="eval sed '$as_sed_cpp'" # deprecated
26349
26350# Sed expression to map a string onto a valid variable name.
26351as_sed_sh="y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
26352as_tr_sh="eval sed '$as_sed_sh'" # deprecated
26353
26354
26355exec 6>&1
26356## ----------------------------------- ##
26357## Main body of $CONFIG_STATUS script. ##
26358## ----------------------------------- ##
26359_ASEOF
26360test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
26361
26362cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
26363# Save the log message, to keep $0 and so on meaningful, and to
26364# report actual input values of CONFIG_FILES etc. instead of their
26365# values after options handling.
26366ac_log="
26367This file was extended by unbound $as_me 1.23.1, which was
26368generated by GNU Autoconf 2.72.  Invocation command line was
26369
26370  CONFIG_FILES    = $CONFIG_FILES
26371  CONFIG_HEADERS  = $CONFIG_HEADERS
26372  CONFIG_LINKS    = $CONFIG_LINKS
26373  CONFIG_COMMANDS = $CONFIG_COMMANDS
26374  $ $0 $@
26375
26376on `(hostname || uname -n) 2>/dev/null | sed 1q`
26377"
26378
26379_ACEOF
26380
26381case $ac_config_files in *"
26382"*) set x $ac_config_files; shift; ac_config_files=$*;;
26383esac
26384
26385case $ac_config_headers in *"
26386"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
26387esac
26388
26389
26390cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
26391# Files that config.status was made for.
26392config_files="$ac_config_files"
26393config_headers="$ac_config_headers"
26394config_commands="$ac_config_commands"
26395
26396_ACEOF
26397
26398cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
26399ac_cs_usage="\
26400'$as_me' instantiates files and other configuration actions
26401from templates according to the current configuration.  Unless the files
26402and actions are specified as TAGs, all are instantiated by default.
26403
26404Usage: $0 [OPTION]... [TAG]...
26405
26406  -h, --help       print this help, then exit
26407  -V, --version    print version number and configuration settings, then exit
26408      --config     print configuration, then exit
26409  -q, --quiet, --silent
26410                   do not print progress messages
26411  -d, --debug      don't remove temporary files
26412      --recheck    update $as_me by reconfiguring in the same conditions
26413      --file=FILE[:TEMPLATE]
26414                   instantiate the configuration file FILE
26415      --header=FILE[:TEMPLATE]
26416                   instantiate the configuration header FILE
26417
26418Configuration files:
26419$config_files
26420
26421Configuration headers:
26422$config_headers
26423
26424Configuration commands:
26425$config_commands
26426
26427Report bugs to <unbound-bugs@nlnetlabs.nl or https://github.com/NLnetLabs/unbound/issues>."
26428
26429_ACEOF
26430ac_cs_config=`printf "%s\n" "$ac_configure_args" | sed "$ac_safe_unquote"`
26431ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\''/g"`
26432cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
26433ac_cs_config='$ac_cs_config_escaped'
26434ac_cs_version="\\
26435unbound config.status 1.23.1
26436configured by $0, generated by GNU Autoconf 2.72,
26437  with options \\"\$ac_cs_config\\"
26438
26439Copyright (C) 2023 Free Software Foundation, Inc.
26440This config.status script is free software; the Free Software Foundation
26441gives unlimited permission to copy, distribute and modify it."
26442
26443ac_pwd='$ac_pwd'
26444srcdir='$srcdir'
26445AWK='$AWK'
26446test -n "\$AWK" || AWK=awk
26447_ACEOF
26448
26449cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
26450# The default lists apply if the user does not specify any file.
26451ac_need_defaults=:
26452while test $# != 0
26453do
26454  case $1 in
26455  --*=?*)
26456    ac_option=`expr "X$1" : 'X\([^=]*\)='`
26457    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
26458    ac_shift=:
26459    ;;
26460  --*=)
26461    ac_option=`expr "X$1" : 'X\([^=]*\)='`
26462    ac_optarg=
26463    ac_shift=:
26464    ;;
26465  *)
26466    ac_option=$1
26467    ac_optarg=$2
26468    ac_shift=shift
26469    ;;
26470  esac
26471
26472  case $ac_option in
26473  # Handling of the options.
26474  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
26475    ac_cs_recheck=: ;;
26476  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
26477    printf "%s\n" "$ac_cs_version"; exit ;;
26478  --config | --confi | --conf | --con | --co | --c )
26479    printf "%s\n" "$ac_cs_config"; exit ;;
26480  --debug | --debu | --deb | --de | --d | -d )
26481    debug=: ;;
26482  --file | --fil | --fi | --f )
26483    $ac_shift
26484    case $ac_optarg in
26485    *\'*) ac_optarg=`printf "%s\n" "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
26486    '') as_fn_error $? "missing file argument" ;;
26487    esac
26488    as_fn_append CONFIG_FILES " '$ac_optarg'"
26489    ac_need_defaults=false;;
26490  --header | --heade | --head | --hea )
26491    $ac_shift
26492    case $ac_optarg in
26493    *\'*) ac_optarg=`printf "%s\n" "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
26494    esac
26495    as_fn_append CONFIG_HEADERS " '$ac_optarg'"
26496    ac_need_defaults=false;;
26497  --he | --h)
26498    # Conflict between --help and --header
26499    as_fn_error $? "ambiguous option: '$1'
26500Try '$0 --help' for more information.";;
26501  --help | --hel | -h )
26502    printf "%s\n" "$ac_cs_usage"; exit ;;
26503  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
26504  | -silent | --silent | --silen | --sile | --sil | --si | --s)
26505    ac_cs_silent=: ;;
26506
26507  # This is an error.
26508  -*) as_fn_error $? "unrecognized option: '$1'
26509Try '$0 --help' for more information." ;;
26510
26511  *) as_fn_append ac_config_targets " $1"
26512     ac_need_defaults=false ;;
26513
26514  esac
26515  shift
26516done
26517
26518ac_configure_extra_args=
26519
26520if $ac_cs_silent; then
26521  exec 6>/dev/null
26522  ac_configure_extra_args="$ac_configure_extra_args --silent"
26523fi
26524
26525_ACEOF
26526cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
26527if \$ac_cs_recheck; then
26528  set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
26529  shift
26530  \printf "%s\n" "running CONFIG_SHELL=$SHELL \$*" >&6
26531  CONFIG_SHELL='$SHELL'
26532  export CONFIG_SHELL
26533  exec "\$@"
26534fi
26535
26536_ACEOF
26537cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
26538exec 5>>config.log
26539{
26540  echo
26541  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
26542## Running $as_me. ##
26543_ASBOX
26544  printf "%s\n" "$ac_log"
26545} >&5
26546
26547_ACEOF
26548cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
26549#
26550# INIT-COMMANDS
26551#
26552
26553
26554# The HP-UX ksh and POSIX shell print the target directory to stdout
26555# if CDPATH is set.
26556(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
26557
26558sed_quote_subst='$sed_quote_subst'
26559double_quote_subst='$double_quote_subst'
26560delay_variable_subst='$delay_variable_subst'
26561macro_version='`$ECHO "$macro_version" | $SED "$delay_single_quote_subst"`'
26562macro_revision='`$ECHO "$macro_revision" | $SED "$delay_single_quote_subst"`'
26563enable_shared='`$ECHO "$enable_shared" | $SED "$delay_single_quote_subst"`'
26564enable_static='`$ECHO "$enable_static" | $SED "$delay_single_quote_subst"`'
26565pic_mode='`$ECHO "$pic_mode" | $SED "$delay_single_quote_subst"`'
26566enable_fast_install='`$ECHO "$enable_fast_install" | $SED "$delay_single_quote_subst"`'
26567shared_archive_member_spec='`$ECHO "$shared_archive_member_spec" | $SED "$delay_single_quote_subst"`'
26568SHELL='`$ECHO "$SHELL" | $SED "$delay_single_quote_subst"`'
26569ECHO='`$ECHO "$ECHO" | $SED "$delay_single_quote_subst"`'
26570PATH_SEPARATOR='`$ECHO "$PATH_SEPARATOR" | $SED "$delay_single_quote_subst"`'
26571host_alias='`$ECHO "$host_alias" | $SED "$delay_single_quote_subst"`'
26572host='`$ECHO "$host" | $SED "$delay_single_quote_subst"`'
26573host_os='`$ECHO "$host_os" | $SED "$delay_single_quote_subst"`'
26574build_alias='`$ECHO "$build_alias" | $SED "$delay_single_quote_subst"`'
26575build='`$ECHO "$build" | $SED "$delay_single_quote_subst"`'
26576build_os='`$ECHO "$build_os" | $SED "$delay_single_quote_subst"`'
26577SED='`$ECHO "$SED" | $SED "$delay_single_quote_subst"`'
26578Xsed='`$ECHO "$Xsed" | $SED "$delay_single_quote_subst"`'
26579GREP='`$ECHO "$GREP" | $SED "$delay_single_quote_subst"`'
26580EGREP='`$ECHO "$EGREP" | $SED "$delay_single_quote_subst"`'
26581FGREP='`$ECHO "$FGREP" | $SED "$delay_single_quote_subst"`'
26582LD='`$ECHO "$LD" | $SED "$delay_single_quote_subst"`'
26583NM='`$ECHO "$NM" | $SED "$delay_single_quote_subst"`'
26584LN_S='`$ECHO "$LN_S" | $SED "$delay_single_quote_subst"`'
26585max_cmd_len='`$ECHO "$max_cmd_len" | $SED "$delay_single_quote_subst"`'
26586ac_objext='`$ECHO "$ac_objext" | $SED "$delay_single_quote_subst"`'
26587exeext='`$ECHO "$exeext" | $SED "$delay_single_quote_subst"`'
26588lt_unset='`$ECHO "$lt_unset" | $SED "$delay_single_quote_subst"`'
26589lt_SP2NL='`$ECHO "$lt_SP2NL" | $SED "$delay_single_quote_subst"`'
26590lt_NL2SP='`$ECHO "$lt_NL2SP" | $SED "$delay_single_quote_subst"`'
26591lt_cv_to_host_file_cmd='`$ECHO "$lt_cv_to_host_file_cmd" | $SED "$delay_single_quote_subst"`'
26592lt_cv_to_tool_file_cmd='`$ECHO "$lt_cv_to_tool_file_cmd" | $SED "$delay_single_quote_subst"`'
26593reload_flag='`$ECHO "$reload_flag" | $SED "$delay_single_quote_subst"`'
26594reload_cmds='`$ECHO "$reload_cmds" | $SED "$delay_single_quote_subst"`'
26595OBJDUMP='`$ECHO "$OBJDUMP" | $SED "$delay_single_quote_subst"`'
26596deplibs_check_method='`$ECHO "$deplibs_check_method" | $SED "$delay_single_quote_subst"`'
26597file_magic_cmd='`$ECHO "$file_magic_cmd" | $SED "$delay_single_quote_subst"`'
26598file_magic_glob='`$ECHO "$file_magic_glob" | $SED "$delay_single_quote_subst"`'
26599want_nocaseglob='`$ECHO "$want_nocaseglob" | $SED "$delay_single_quote_subst"`'
26600DLLTOOL='`$ECHO "$DLLTOOL" | $SED "$delay_single_quote_subst"`'
26601sharedlib_from_linklib_cmd='`$ECHO "$sharedlib_from_linklib_cmd" | $SED "$delay_single_quote_subst"`'
26602AR='`$ECHO "$AR" | $SED "$delay_single_quote_subst"`'
26603AR_FLAGS='`$ECHO "$AR_FLAGS" | $SED "$delay_single_quote_subst"`'
26604archiver_list_spec='`$ECHO "$archiver_list_spec" | $SED "$delay_single_quote_subst"`'
26605STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`'
26606RANLIB='`$ECHO "$RANLIB" | $SED "$delay_single_quote_subst"`'
26607old_postinstall_cmds='`$ECHO "$old_postinstall_cmds" | $SED "$delay_single_quote_subst"`'
26608old_postuninstall_cmds='`$ECHO "$old_postuninstall_cmds" | $SED "$delay_single_quote_subst"`'
26609old_archive_cmds='`$ECHO "$old_archive_cmds" | $SED "$delay_single_quote_subst"`'
26610lock_old_archive_extraction='`$ECHO "$lock_old_archive_extraction" | $SED "$delay_single_quote_subst"`'
26611CC='`$ECHO "$CC" | $SED "$delay_single_quote_subst"`'
26612CFLAGS='`$ECHO "$CFLAGS" | $SED "$delay_single_quote_subst"`'
26613compiler='`$ECHO "$compiler" | $SED "$delay_single_quote_subst"`'
26614GCC='`$ECHO "$GCC" | $SED "$delay_single_quote_subst"`'
26615lt_cv_sys_global_symbol_pipe='`$ECHO "$lt_cv_sys_global_symbol_pipe" | $SED "$delay_single_quote_subst"`'
26616lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`'
26617lt_cv_sys_global_symbol_to_import='`$ECHO "$lt_cv_sys_global_symbol_to_import" | $SED "$delay_single_quote_subst"`'
26618lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`'
26619lt_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"`'
26620lt_cv_nm_interface='`$ECHO "$lt_cv_nm_interface" | $SED "$delay_single_quote_subst"`'
26621nm_file_list_spec='`$ECHO "$nm_file_list_spec" | $SED "$delay_single_quote_subst"`'
26622lt_sysroot='`$ECHO "$lt_sysroot" | $SED "$delay_single_quote_subst"`'
26623lt_cv_truncate_bin='`$ECHO "$lt_cv_truncate_bin" | $SED "$delay_single_quote_subst"`'
26624objdir='`$ECHO "$objdir" | $SED "$delay_single_quote_subst"`'
26625MAGIC_CMD='`$ECHO "$MAGIC_CMD" | $SED "$delay_single_quote_subst"`'
26626lt_prog_compiler_no_builtin_flag='`$ECHO "$lt_prog_compiler_no_builtin_flag" | $SED "$delay_single_quote_subst"`'
26627lt_prog_compiler_pic='`$ECHO "$lt_prog_compiler_pic" | $SED "$delay_single_quote_subst"`'
26628lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`'
26629lt_prog_compiler_static='`$ECHO "$lt_prog_compiler_static" | $SED "$delay_single_quote_subst"`'
26630lt_cv_prog_compiler_c_o='`$ECHO "$lt_cv_prog_compiler_c_o" | $SED "$delay_single_quote_subst"`'
26631need_locks='`$ECHO "$need_locks" | $SED "$delay_single_quote_subst"`'
26632MANIFEST_TOOL='`$ECHO "$MANIFEST_TOOL" | $SED "$delay_single_quote_subst"`'
26633DSYMUTIL='`$ECHO "$DSYMUTIL" | $SED "$delay_single_quote_subst"`'
26634NMEDIT='`$ECHO "$NMEDIT" | $SED "$delay_single_quote_subst"`'
26635LIPO='`$ECHO "$LIPO" | $SED "$delay_single_quote_subst"`'
26636OTOOL='`$ECHO "$OTOOL" | $SED "$delay_single_quote_subst"`'
26637OTOOL64='`$ECHO "$OTOOL64" | $SED "$delay_single_quote_subst"`'
26638libext='`$ECHO "$libext" | $SED "$delay_single_quote_subst"`'
26639shrext_cmds='`$ECHO "$shrext_cmds" | $SED "$delay_single_quote_subst"`'
26640extract_expsyms_cmds='`$ECHO "$extract_expsyms_cmds" | $SED "$delay_single_quote_subst"`'
26641archive_cmds_need_lc='`$ECHO "$archive_cmds_need_lc" | $SED "$delay_single_quote_subst"`'
26642enable_shared_with_static_runtimes='`$ECHO "$enable_shared_with_static_runtimes" | $SED "$delay_single_quote_subst"`'
26643export_dynamic_flag_spec='`$ECHO "$export_dynamic_flag_spec" | $SED "$delay_single_quote_subst"`'
26644whole_archive_flag_spec='`$ECHO "$whole_archive_flag_spec" | $SED "$delay_single_quote_subst"`'
26645compiler_needs_object='`$ECHO "$compiler_needs_object" | $SED "$delay_single_quote_subst"`'
26646old_archive_from_new_cmds='`$ECHO "$old_archive_from_new_cmds" | $SED "$delay_single_quote_subst"`'
26647old_archive_from_expsyms_cmds='`$ECHO "$old_archive_from_expsyms_cmds" | $SED "$delay_single_quote_subst"`'
26648archive_cmds='`$ECHO "$archive_cmds" | $SED "$delay_single_quote_subst"`'
26649archive_expsym_cmds='`$ECHO "$archive_expsym_cmds" | $SED "$delay_single_quote_subst"`'
26650module_cmds='`$ECHO "$module_cmds" | $SED "$delay_single_quote_subst"`'
26651module_expsym_cmds='`$ECHO "$module_expsym_cmds" | $SED "$delay_single_quote_subst"`'
26652with_gnu_ld='`$ECHO "$with_gnu_ld" | $SED "$delay_single_quote_subst"`'
26653allow_undefined_flag='`$ECHO "$allow_undefined_flag" | $SED "$delay_single_quote_subst"`'
26654no_undefined_flag='`$ECHO "$no_undefined_flag" | $SED "$delay_single_quote_subst"`'
26655hardcode_libdir_flag_spec='`$ECHO "$hardcode_libdir_flag_spec" | $SED "$delay_single_quote_subst"`'
26656hardcode_libdir_separator='`$ECHO "$hardcode_libdir_separator" | $SED "$delay_single_quote_subst"`'
26657hardcode_direct='`$ECHO "$hardcode_direct" | $SED "$delay_single_quote_subst"`'
26658hardcode_direct_absolute='`$ECHO "$hardcode_direct_absolute" | $SED "$delay_single_quote_subst"`'
26659hardcode_minus_L='`$ECHO "$hardcode_minus_L" | $SED "$delay_single_quote_subst"`'
26660hardcode_shlibpath_var='`$ECHO "$hardcode_shlibpath_var" | $SED "$delay_single_quote_subst"`'
26661hardcode_automatic='`$ECHO "$hardcode_automatic" | $SED "$delay_single_quote_subst"`'
26662inherit_rpath='`$ECHO "$inherit_rpath" | $SED "$delay_single_quote_subst"`'
26663link_all_deplibs='`$ECHO "$link_all_deplibs" | $SED "$delay_single_quote_subst"`'
26664always_export_symbols='`$ECHO "$always_export_symbols" | $SED "$delay_single_quote_subst"`'
26665export_symbols_cmds='`$ECHO "$export_symbols_cmds" | $SED "$delay_single_quote_subst"`'
26666exclude_expsyms='`$ECHO "$exclude_expsyms" | $SED "$delay_single_quote_subst"`'
26667include_expsyms='`$ECHO "$include_expsyms" | $SED "$delay_single_quote_subst"`'
26668prelink_cmds='`$ECHO "$prelink_cmds" | $SED "$delay_single_quote_subst"`'
26669postlink_cmds='`$ECHO "$postlink_cmds" | $SED "$delay_single_quote_subst"`'
26670file_list_spec='`$ECHO "$file_list_spec" | $SED "$delay_single_quote_subst"`'
26671variables_saved_for_relink='`$ECHO "$variables_saved_for_relink" | $SED "$delay_single_quote_subst"`'
26672need_lib_prefix='`$ECHO "$need_lib_prefix" | $SED "$delay_single_quote_subst"`'
26673need_version='`$ECHO "$need_version" | $SED "$delay_single_quote_subst"`'
26674version_type='`$ECHO "$version_type" | $SED "$delay_single_quote_subst"`'
26675runpath_var='`$ECHO "$runpath_var" | $SED "$delay_single_quote_subst"`'
26676shlibpath_var='`$ECHO "$shlibpath_var" | $SED "$delay_single_quote_subst"`'
26677shlibpath_overrides_runpath='`$ECHO "$shlibpath_overrides_runpath" | $SED "$delay_single_quote_subst"`'
26678libname_spec='`$ECHO "$libname_spec" | $SED "$delay_single_quote_subst"`'
26679library_names_spec='`$ECHO "$library_names_spec" | $SED "$delay_single_quote_subst"`'
26680soname_spec='`$ECHO "$soname_spec" | $SED "$delay_single_quote_subst"`'
26681install_override_mode='`$ECHO "$install_override_mode" | $SED "$delay_single_quote_subst"`'
26682postinstall_cmds='`$ECHO "$postinstall_cmds" | $SED "$delay_single_quote_subst"`'
26683postuninstall_cmds='`$ECHO "$postuninstall_cmds" | $SED "$delay_single_quote_subst"`'
26684finish_cmds='`$ECHO "$finish_cmds" | $SED "$delay_single_quote_subst"`'
26685finish_eval='`$ECHO "$finish_eval" | $SED "$delay_single_quote_subst"`'
26686hardcode_into_libs='`$ECHO "$hardcode_into_libs" | $SED "$delay_single_quote_subst"`'
26687sys_lib_search_path_spec='`$ECHO "$sys_lib_search_path_spec" | $SED "$delay_single_quote_subst"`'
26688configure_time_dlsearch_path='`$ECHO "$configure_time_dlsearch_path" | $SED "$delay_single_quote_subst"`'
26689configure_time_lt_sys_library_path='`$ECHO "$configure_time_lt_sys_library_path" | $SED "$delay_single_quote_subst"`'
26690hardcode_action='`$ECHO "$hardcode_action" | $SED "$delay_single_quote_subst"`'
26691enable_dlopen='`$ECHO "$enable_dlopen" | $SED "$delay_single_quote_subst"`'
26692enable_dlopen_self='`$ECHO "$enable_dlopen_self" | $SED "$delay_single_quote_subst"`'
26693enable_dlopen_self_static='`$ECHO "$enable_dlopen_self_static" | $SED "$delay_single_quote_subst"`'
26694old_striplib='`$ECHO "$old_striplib" | $SED "$delay_single_quote_subst"`'
26695striplib='`$ECHO "$striplib" | $SED "$delay_single_quote_subst"`'
26696
26697LTCC='$LTCC'
26698LTCFLAGS='$LTCFLAGS'
26699compiler='$compiler_DEFAULT'
26700
26701# A function that is used when there is no print builtin or printf.
26702func_fallback_echo ()
26703{
26704  eval 'cat <<_LTECHO_EOF
26705\$1
26706_LTECHO_EOF'
26707}
26708
26709# Quote evaled strings.
26710for var in SHELL \
26711ECHO \
26712PATH_SEPARATOR \
26713SED \
26714GREP \
26715EGREP \
26716FGREP \
26717LD \
26718NM \
26719LN_S \
26720lt_SP2NL \
26721lt_NL2SP \
26722reload_flag \
26723OBJDUMP \
26724deplibs_check_method \
26725file_magic_cmd \
26726file_magic_glob \
26727want_nocaseglob \
26728DLLTOOL \
26729sharedlib_from_linklib_cmd \
26730AR \
26731AR_FLAGS \
26732archiver_list_spec \
26733STRIP \
26734RANLIB \
26735CC \
26736CFLAGS \
26737compiler \
26738lt_cv_sys_global_symbol_pipe \
26739lt_cv_sys_global_symbol_to_cdecl \
26740lt_cv_sys_global_symbol_to_import \
26741lt_cv_sys_global_symbol_to_c_name_address \
26742lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \
26743lt_cv_nm_interface \
26744nm_file_list_spec \
26745lt_cv_truncate_bin \
26746lt_prog_compiler_no_builtin_flag \
26747lt_prog_compiler_pic \
26748lt_prog_compiler_wl \
26749lt_prog_compiler_static \
26750lt_cv_prog_compiler_c_o \
26751need_locks \
26752MANIFEST_TOOL \
26753DSYMUTIL \
26754NMEDIT \
26755LIPO \
26756OTOOL \
26757OTOOL64 \
26758shrext_cmds \
26759export_dynamic_flag_spec \
26760whole_archive_flag_spec \
26761compiler_needs_object \
26762with_gnu_ld \
26763allow_undefined_flag \
26764no_undefined_flag \
26765hardcode_libdir_flag_spec \
26766hardcode_libdir_separator \
26767exclude_expsyms \
26768include_expsyms \
26769file_list_spec \
26770variables_saved_for_relink \
26771libname_spec \
26772library_names_spec \
26773soname_spec \
26774install_override_mode \
26775finish_eval \
26776old_striplib \
26777striplib; do
26778    case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
26779    *[\\\\\\\`\\"\\\$]*)
26780      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes
26781      ;;
26782    *)
26783      eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
26784      ;;
26785    esac
26786done
26787
26788# Double-quote double-evaled strings.
26789for var in reload_cmds \
26790old_postinstall_cmds \
26791old_postuninstall_cmds \
26792old_archive_cmds \
26793extract_expsyms_cmds \
26794old_archive_from_new_cmds \
26795old_archive_from_expsyms_cmds \
26796archive_cmds \
26797archive_expsym_cmds \
26798module_cmds \
26799module_expsym_cmds \
26800export_symbols_cmds \
26801prelink_cmds \
26802postlink_cmds \
26803postinstall_cmds \
26804postuninstall_cmds \
26805finish_cmds \
26806sys_lib_search_path_spec \
26807configure_time_dlsearch_path \
26808configure_time_lt_sys_library_path; do
26809    case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
26810    *[\\\\\\\`\\"\\\$]*)
26811      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes
26812      ;;
26813    *)
26814      eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
26815      ;;
26816    esac
26817done
26818
26819ac_aux_dir='$ac_aux_dir'
26820
26821# See if we are running on zsh, and set the options that allow our
26822# commands through without removal of \ escapes INIT.
26823if test -n "\${ZSH_VERSION+set}"; then
26824   setopt NO_GLOB_SUBST
26825fi
26826
26827
26828    PACKAGE='$PACKAGE'
26829    VERSION='$VERSION'
26830    RM='$RM'
26831    ofile='$ofile'
26832
26833
26834
26835
26836_ACEOF
26837
26838cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
26839
26840# Handling of arguments.
26841for ac_config_target in $ac_config_targets
26842do
26843  case $ac_config_target in
26844    "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;;
26845    "disable-rpath") CONFIG_COMMANDS="$CONFIG_COMMANDS disable-rpath" ;;
26846    "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
26847    "doc/example.conf") CONFIG_FILES="$CONFIG_FILES doc/example.conf" ;;
26848    "doc/libunbound.3") CONFIG_FILES="$CONFIG_FILES doc/libunbound.3" ;;
26849    "doc/unbound.8") CONFIG_FILES="$CONFIG_FILES doc/unbound.8" ;;
26850    "doc/unbound-anchor.8") CONFIG_FILES="$CONFIG_FILES doc/unbound-anchor.8" ;;
26851    "doc/unbound-checkconf.8") CONFIG_FILES="$CONFIG_FILES doc/unbound-checkconf.8" ;;
26852    "doc/unbound.conf.5") CONFIG_FILES="$CONFIG_FILES doc/unbound.conf.5" ;;
26853    "doc/unbound-control.8") CONFIG_FILES="$CONFIG_FILES doc/unbound-control.8" ;;
26854    "doc/unbound-host.1") CONFIG_FILES="$CONFIG_FILES doc/unbound-host.1" ;;
26855    "smallapp/unbound-control-setup.sh") CONFIG_FILES="$CONFIG_FILES smallapp/unbound-control-setup.sh" ;;
26856    "dnstap/dnstap_config.h") CONFIG_FILES="$CONFIG_FILES dnstap/dnstap_config.h" ;;
26857    "dnscrypt/dnscrypt_config.h") CONFIG_FILES="$CONFIG_FILES dnscrypt/dnscrypt_config.h" ;;
26858    "contrib/libunbound.pc") CONFIG_FILES="$CONFIG_FILES contrib/libunbound.pc" ;;
26859    "contrib/unbound.socket") CONFIG_FILES="$CONFIG_FILES contrib/unbound.socket" ;;
26860    "contrib/unbound.service") CONFIG_FILES="$CONFIG_FILES contrib/unbound.service" ;;
26861    "contrib/unbound_portable.service") CONFIG_FILES="$CONFIG_FILES contrib/unbound_portable.service" ;;
26862    "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
26863
26864  *) as_fn_error $? "invalid argument: '$ac_config_target'" "$LINENO" 5;;
26865  esac
26866done
26867
26868
26869# If the user did not use the arguments to specify the items to instantiate,
26870# then the envvar interface is used.  Set only those that are not.
26871# We use the long form for the default assignment because of an extremely
26872# bizarre bug on SunOS 4.1.3.
26873if $ac_need_defaults; then
26874  test ${CONFIG_FILES+y} || CONFIG_FILES=$config_files
26875  test ${CONFIG_HEADERS+y} || CONFIG_HEADERS=$config_headers
26876  test ${CONFIG_COMMANDS+y} || CONFIG_COMMANDS=$config_commands
26877fi
26878
26879# Have a temporary directory for convenience.  Make it in the build tree
26880# simply because there is no reason against having it here, and in addition,
26881# creating and moving files from /tmp can sometimes cause problems.
26882# Hook for its removal unless debugging.
26883# Note that there is a small window in which the directory will not be cleaned:
26884# after its creation but before its name has been assigned to '$tmp'.
26885$debug ||
26886{
26887  tmp= ac_tmp=
26888  trap 'exit_status=$?
26889  : "${ac_tmp:=$tmp}"
26890  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
26891' 0
26892  trap 'as_fn_exit 1' 1 2 13 15
26893}
26894# Create a (secure) tmp directory for tmp files.
26895
26896{
26897  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
26898  test -d "$tmp"
26899}  ||
26900{
26901  tmp=./conf$$-$RANDOM
26902  (umask 077 && mkdir "$tmp")
26903} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
26904ac_tmp=$tmp
26905
26906# Set up the scripts for CONFIG_FILES section.
26907# No need to generate them if there are no CONFIG_FILES.
26908# This happens for instance with './config.status config.h'.
26909if test -n "$CONFIG_FILES"; then
26910
26911
26912ac_cr=`echo X | tr X '\015'`
26913# On cygwin, bash can eat \r inside `` if the user requested igncr.
26914# But we know of no other shell where ac_cr would be empty at this
26915# point, so we can use a bashism as a fallback.
26916if test "x$ac_cr" = x; then
26917  eval ac_cr=\$\'\\r\'
26918fi
26919ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
26920if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
26921  ac_cs_awk_cr='\\r'
26922else
26923  ac_cs_awk_cr=$ac_cr
26924fi
26925
26926echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
26927_ACEOF
26928
26929
26930{
26931  echo "cat >conf$$subs.awk <<_ACEOF" &&
26932  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
26933  echo "_ACEOF"
26934} >conf$$subs.sh ||
26935  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
26936ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
26937ac_delim='%!_!# '
26938for ac_last_try in false false false false false :; do
26939  . ./conf$$subs.sh ||
26940    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
26941
26942  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
26943  if test $ac_delim_n = $ac_delim_num; then
26944    break
26945  elif $ac_last_try; then
26946    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
26947  else
26948    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
26949  fi
26950done
26951rm -f conf$$subs.sh
26952
26953cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
26954cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
26955_ACEOF
26956sed -n '
26957h
26958s/^/S["/; s/!.*/"]=/
26959p
26960g
26961s/^[^!]*!//
26962:repl
26963t repl
26964s/'"$ac_delim"'$//
26965t delim
26966:nl
26967h
26968s/\(.\{148\}\)..*/\1/
26969t more1
26970s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
26971p
26972n
26973b repl
26974:more1
26975s/["\\]/\\&/g; s/^/"/; s/$/"\\/
26976p
26977g
26978s/.\{148\}//
26979t nl
26980:delim
26981h
26982s/\(.\{148\}\)..*/\1/
26983t more2
26984s/["\\]/\\&/g; s/^/"/; s/$/"/
26985p
26986b
26987:more2
26988s/["\\]/\\&/g; s/^/"/; s/$/"\\/
26989p
26990g
26991s/.\{148\}//
26992t delim
26993' <conf$$subs.awk | sed '
26994/^[^""]/{
26995  N
26996  s/\n//
26997}
26998' >>$CONFIG_STATUS || ac_write_fail=1
26999rm -f conf$$subs.awk
27000cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
27001_ACAWK
27002cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
27003  for (key in S) S_is_set[key] = 1
27004  FS = ""
27005
27006}
27007{
27008  line = $ 0
27009  nfields = split(line, field, "@")
27010  substed = 0
27011  len = length(field[1])
27012  for (i = 2; i < nfields; i++) {
27013    key = field[i]
27014    keylen = length(key)
27015    if (S_is_set[key]) {
27016      value = S[key]
27017      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
27018      len += length(value) + length(field[++i])
27019      substed = 1
27020    } else
27021      len += 1 + keylen
27022  }
27023
27024  print line
27025}
27026
27027_ACAWK
27028_ACEOF
27029cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
27030if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
27031  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
27032else
27033  cat
27034fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
27035  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
27036_ACEOF
27037
27038# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
27039# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
27040# trailing colons and then remove the whole line if VPATH becomes empty
27041# (actually we leave an empty line to preserve line numbers).
27042if test "x$srcdir" = x.; then
27043  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
27044h
27045s///
27046s/^/:/
27047s/[	 ]*$/:/
27048s/:\$(srcdir):/:/g
27049s/:\${srcdir}:/:/g
27050s/:@srcdir@:/:/g
27051s/^:*//
27052s/:*$//
27053x
27054s/\(=[	 ]*\).*/\1/
27055G
27056s/\n//
27057s/^[^=]*=[	 ]*$//
27058}'
27059fi
27060
27061cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
27062fi # test -n "$CONFIG_FILES"
27063
27064# Set up the scripts for CONFIG_HEADERS section.
27065# No need to generate them if there are no CONFIG_HEADERS.
27066# This happens for instance with './config.status Makefile'.
27067if test -n "$CONFIG_HEADERS"; then
27068cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
27069BEGIN {
27070_ACEOF
27071
27072# Transform confdefs.h into an awk script 'defines.awk', embedded as
27073# here-document in config.status, that substitutes the proper values into
27074# config.h.in to produce config.h.
27075
27076# Create a delimiter string that does not exist in confdefs.h, to ease
27077# handling of long lines.
27078ac_delim='%!_!# '
27079for ac_last_try in false false :; do
27080  ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
27081  if test -z "$ac_tt"; then
27082    break
27083  elif $ac_last_try; then
27084    as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
27085  else
27086    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
27087  fi
27088done
27089
27090# For the awk script, D is an array of macro values keyed by name,
27091# likewise P contains macro parameters if any.  Preserve backslash
27092# newline sequences.
27093
27094ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
27095sed -n '
27096s/.\{148\}/&'"$ac_delim"'/g
27097t rset
27098:rset
27099s/^[	 ]*#[	 ]*define[	 ][	 ]*/ /
27100t def
27101d
27102:def
27103s/\\$//
27104t bsnl
27105s/["\\]/\\&/g
27106s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
27107D["\1"]=" \3"/p
27108s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2"/p
27109d
27110:bsnl
27111s/["\\]/\\&/g
27112s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
27113D["\1"]=" \3\\\\\\n"\\/p
27114t cont
27115s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
27116t cont
27117d
27118:cont
27119n
27120s/.\{148\}/&'"$ac_delim"'/g
27121t clear
27122:clear
27123s/\\$//
27124t bsnlc
27125s/["\\]/\\&/g; s/^/"/; s/$/"/p
27126d
27127:bsnlc
27128s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
27129b cont
27130' <confdefs.h | sed '
27131s/'"$ac_delim"'/"\\\
27132"/g' >>$CONFIG_STATUS || ac_write_fail=1
27133
27134cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
27135  for (key in D) D_is_set[key] = 1
27136  FS = ""
27137}
27138/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
27139  line = \$ 0
27140  split(line, arg, " ")
27141  if (arg[1] == "#") {
27142    defundef = arg[2]
27143    mac1 = arg[3]
27144  } else {
27145    defundef = substr(arg[1], 2)
27146    mac1 = arg[2]
27147  }
27148  split(mac1, mac2, "(") #)
27149  macro = mac2[1]
27150  prefix = substr(line, 1, index(line, defundef) - 1)
27151  if (D_is_set[macro]) {
27152    # Preserve the white space surrounding the "#".
27153    print prefix "define", macro P[macro] D[macro]
27154    next
27155  } else {
27156    # Replace #undef with comments.  This is necessary, for example,
27157    # in the case of _POSIX_SOURCE, which is predefined and required
27158    # on some systems where configure will not decide to define it.
27159    if (defundef == "undef") {
27160      print "/*", prefix defundef, macro, "*/"
27161      next
27162    }
27163  }
27164}
27165{ print }
27166_ACAWK
27167_ACEOF
27168cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
27169  as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
27170fi # test -n "$CONFIG_HEADERS"
27171
27172
27173eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS    :C $CONFIG_COMMANDS"
27174shift
27175for ac_tag
27176do
27177  case $ac_tag in
27178  :[FHLC]) ac_mode=$ac_tag; continue;;
27179  esac
27180  case $ac_mode$ac_tag in
27181  :[FHL]*:*);;
27182  :L* | :C*:*) as_fn_error $? "invalid tag '$ac_tag'" "$LINENO" 5;;
27183  :[FH]-) ac_tag=-:-;;
27184  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
27185  esac
27186  ac_save_IFS=$IFS
27187  IFS=:
27188  set x $ac_tag
27189  IFS=$ac_save_IFS
27190  shift
27191  ac_file=$1
27192  shift
27193
27194  case $ac_mode in
27195  :L) ac_source=$1;;
27196  :[FH])
27197    ac_file_inputs=
27198    for ac_f
27199    do
27200      case $ac_f in
27201      -) ac_f="$ac_tmp/stdin";;
27202      *) # Look for the file first in the build tree, then in the source tree
27203	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
27204	 # because $ac_f cannot contain ':'.
27205	 test -f "$ac_f" ||
27206	   case $ac_f in
27207	   [\\/$]*) false;;
27208	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
27209	   esac ||
27210	   as_fn_error 1 "cannot find input file: '$ac_f'" "$LINENO" 5;;
27211      esac
27212      case $ac_f in *\'*) ac_f=`printf "%s\n" "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
27213      as_fn_append ac_file_inputs " '$ac_f'"
27214    done
27215
27216    # Let's still pretend it is 'configure' which instantiates (i.e., don't
27217    # use $as_me), people would be surprised to read:
27218    #    /* config.h.  Generated by config.status.  */
27219    configure_input='Generated from '`
27220	  printf "%s\n" "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
27221	`' by configure.'
27222    if test x"$ac_file" != x-; then
27223      configure_input="$ac_file.  $configure_input"
27224      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
27225printf "%s\n" "$as_me: creating $ac_file" >&6;}
27226    fi
27227    # Neutralize special characters interpreted by sed in replacement strings.
27228    case $configure_input in #(
27229    *\&* | *\|* | *\\* )
27230       ac_sed_conf_input=`printf "%s\n" "$configure_input" |
27231       sed 's/[\\\\&|]/\\\\&/g'`;; #(
27232    *) ac_sed_conf_input=$configure_input;;
27233    esac
27234
27235    case $ac_tag in
27236    *:-:* | *:-) cat >"$ac_tmp/stdin" \
27237      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
27238    esac
27239    ;;
27240  esac
27241
27242  ac_dir=`$as_dirname -- "$ac_file" ||
27243$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
27244	 X"$ac_file" : 'X\(//\)[^/]' \| \
27245	 X"$ac_file" : 'X\(//\)$' \| \
27246	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
27247printf "%s\n" X"$ac_file" |
27248    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
27249	    s//\1/
27250	    q
27251	  }
27252	  /^X\(\/\/\)[^/].*/{
27253	    s//\1/
27254	    q
27255	  }
27256	  /^X\(\/\/\)$/{
27257	    s//\1/
27258	    q
27259	  }
27260	  /^X\(\/\).*/{
27261	    s//\1/
27262	    q
27263	  }
27264	  s/.*/./; q'`
27265  as_dir="$ac_dir"; as_fn_mkdir_p
27266  ac_builddir=.
27267
27268case "$ac_dir" in
27269.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
27270*)
27271  ac_dir_suffix=/`printf "%s\n" "$ac_dir" | sed 's|^\.[\\/]||'`
27272  # A ".." for each directory in $ac_dir_suffix.
27273  ac_top_builddir_sub=`printf "%s\n" "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
27274  case $ac_top_builddir_sub in
27275  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
27276  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
27277  esac ;;
27278esac
27279ac_abs_top_builddir=$ac_pwd
27280ac_abs_builddir=$ac_pwd$ac_dir_suffix
27281# for backward compatibility:
27282ac_top_builddir=$ac_top_build_prefix
27283
27284case $srcdir in
27285  .)  # We are building in place.
27286    ac_srcdir=.
27287    ac_top_srcdir=$ac_top_builddir_sub
27288    ac_abs_top_srcdir=$ac_pwd ;;
27289  [\\/]* | ?:[\\/]* )  # Absolute name.
27290    ac_srcdir=$srcdir$ac_dir_suffix;
27291    ac_top_srcdir=$srcdir
27292    ac_abs_top_srcdir=$srcdir ;;
27293  *) # Relative name.
27294    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
27295    ac_top_srcdir=$ac_top_build_prefix$srcdir
27296    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
27297esac
27298ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
27299
27300
27301  case $ac_mode in
27302  :F)
27303  #
27304  # CONFIG_FILE
27305  #
27306
27307_ACEOF
27308
27309cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
27310# If the template does not know about datarootdir, expand it.
27311# FIXME: This hack should be removed a few years after 2.60.
27312ac_datarootdir_hack=; ac_datarootdir_seen=
27313ac_sed_dataroot='
27314/datarootdir/ {
27315  p
27316  q
27317}
27318/@datadir@/p
27319/@docdir@/p
27320/@infodir@/p
27321/@localedir@/p
27322/@mandir@/p'
27323case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
27324*datarootdir*) ac_datarootdir_seen=yes;;
27325*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
27326  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
27327printf "%s\n" "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
27328_ACEOF
27329cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
27330  ac_datarootdir_hack='
27331  s&@datadir@&$datadir&g
27332  s&@docdir@&$docdir&g
27333  s&@infodir@&$infodir&g
27334  s&@localedir@&$localedir&g
27335  s&@mandir@&$mandir&g
27336  s&\\\${datarootdir}&$datarootdir&g' ;;
27337esac
27338_ACEOF
27339
27340# Neutralize VPATH when '$srcdir' = '.'.
27341# Shell code in configure.ac might set extrasub.
27342# FIXME: do we really want to maintain this feature?
27343cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
27344ac_sed_extra="$ac_vpsub
27345$extrasub
27346_ACEOF
27347cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
27348:t
27349/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
27350s|@configure_input@|$ac_sed_conf_input|;t t
27351s&@top_builddir@&$ac_top_builddir_sub&;t t
27352s&@top_build_prefix@&$ac_top_build_prefix&;t t
27353s&@srcdir@&$ac_srcdir&;t t
27354s&@abs_srcdir@&$ac_abs_srcdir&;t t
27355s&@top_srcdir@&$ac_top_srcdir&;t t
27356s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
27357s&@builddir@&$ac_builddir&;t t
27358s&@abs_builddir@&$ac_abs_builddir&;t t
27359s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
27360$ac_datarootdir_hack
27361"
27362eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
27363  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
27364
27365test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
27366  { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
27367  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' \
27368      "$ac_tmp/out"`; test -z "$ac_out"; } &&
27369  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable 'datarootdir'
27370which seems to be undefined.  Please make sure it is defined" >&5
27371printf "%s\n" "$as_me: WARNING: $ac_file contains a reference to the variable 'datarootdir'
27372which seems to be undefined.  Please make sure it is defined" >&2;}
27373
27374  rm -f "$ac_tmp/stdin"
27375  case $ac_file in
27376  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
27377  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
27378  esac \
27379  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
27380 ;;
27381  :H)
27382  #
27383  # CONFIG_HEADER
27384  #
27385  if test x"$ac_file" != x-; then
27386    {
27387      printf "%s\n" "/* $configure_input  */" >&1 \
27388      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
27389    } >"$ac_tmp/config.h" \
27390      || as_fn_error $? "could not create $ac_file" "$LINENO" 5
27391    if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
27392      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
27393printf "%s\n" "$as_me: $ac_file is unchanged" >&6;}
27394    else
27395      rm -f "$ac_file"
27396      mv "$ac_tmp/config.h" "$ac_file" \
27397	|| as_fn_error $? "could not create $ac_file" "$LINENO" 5
27398    fi
27399  else
27400    printf "%s\n" "/* $configure_input  */" >&1 \
27401      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
27402      || as_fn_error $? "could not create -" "$LINENO" 5
27403  fi
27404 ;;
27405
27406  :C)  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
27407printf "%s\n" "$as_me: executing $ac_file commands" >&6;}
27408 ;;
27409  esac
27410
27411
27412  case $ac_file$ac_mode in
27413    "libtool":C)
27414
27415    # See if we are running on zsh, and set the options that allow our
27416    # commands through without removal of \ escapes.
27417    if test -n "${ZSH_VERSION+set}"; then
27418      setopt NO_GLOB_SUBST
27419    fi
27420
27421    cfgfile=${ofile}T
27422    trap "$RM \"$cfgfile\"; exit 1" 1 2 15
27423    $RM "$cfgfile"
27424
27425    cat <<_LT_EOF >> "$cfgfile"
27426#! $SHELL
27427# Generated automatically by $as_me ($PACKAGE) $VERSION
27428# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
27429# NOTE: Changes made to this file will be lost: look at ltmain.sh.
27430
27431# Provide generalized library-building support services.
27432# Written by Gordon Matzigkeit, 1996
27433
27434# Copyright (C) 2014 Free Software Foundation, Inc.
27435# This is free software; see the source for copying conditions.  There is NO
27436# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
27437
27438# GNU Libtool is free software; you can redistribute it and/or modify
27439# it under the terms of the GNU General Public License as published by
27440# the Free Software Foundation; either version 2 of of the License, or
27441# (at your option) any later version.
27442#
27443# As a special exception to the GNU General Public License, if you
27444# distribute this file as part of a program or library that is built
27445# using GNU Libtool, you may include this file under the  same
27446# distribution terms that you use for the rest of that program.
27447#
27448# GNU Libtool is distributed in the hope that it will be useful, but
27449# WITHOUT ANY WARRANTY; without even the implied warranty of
27450# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
27451# GNU General Public License for more details.
27452#
27453# You should have received a copy of the GNU General Public License
27454# along with this program.  If not, see <http://www.gnu.org/licenses/>.
27455
27456
27457# The names of the tagged configurations supported by this script.
27458available_tags=''
27459
27460# Configured defaults for sys_lib_dlsearch_path munging.
27461: \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"}
27462
27463# ### BEGIN LIBTOOL CONFIG
27464
27465# Which release of libtool.m4 was used?
27466macro_version=$macro_version
27467macro_revision=$macro_revision
27468
27469# Whether or not to build shared libraries.
27470build_libtool_libs=$enable_shared
27471
27472# Whether or not to build static libraries.
27473build_old_libs=$enable_static
27474
27475# What type of objects to build.
27476pic_mode=$pic_mode
27477
27478# Whether or not to optimize for fast installation.
27479fast_install=$enable_fast_install
27480
27481# Shared archive member basename,for filename based shared library versioning on AIX.
27482shared_archive_member_spec=$shared_archive_member_spec
27483
27484# Shell to use when invoking shell scripts.
27485SHELL=$lt_SHELL
27486
27487# An echo program that protects backslashes.
27488ECHO=$lt_ECHO
27489
27490# The PATH separator for the build system.
27491PATH_SEPARATOR=$lt_PATH_SEPARATOR
27492
27493# The host system.
27494host_alias=$host_alias
27495host=$host
27496host_os=$host_os
27497
27498# The build system.
27499build_alias=$build_alias
27500build=$build
27501build_os=$build_os
27502
27503# A sed program that does not truncate output.
27504SED=$lt_SED
27505
27506# Sed that helps us avoid accidentally triggering echo(1) options like -n.
27507Xsed="\$SED -e 1s/^X//"
27508
27509# A grep program that handles long lines.
27510GREP=$lt_GREP
27511
27512# An ERE matcher.
27513EGREP=$lt_EGREP
27514
27515# A literal string matcher.
27516FGREP=$lt_FGREP
27517
27518# A BSD- or MS-compatible name lister.
27519NM=$lt_NM
27520
27521# Whether we need soft or hard links.
27522LN_S=$lt_LN_S
27523
27524# What is the maximum length of a command?
27525max_cmd_len=$max_cmd_len
27526
27527# Object file suffix (normally "o").
27528objext=$ac_objext
27529
27530# Executable file suffix (normally "").
27531exeext=$exeext
27532
27533# whether the shell understands "unset".
27534lt_unset=$lt_unset
27535
27536# turn spaces into newlines.
27537SP2NL=$lt_lt_SP2NL
27538
27539# turn newlines into spaces.
27540NL2SP=$lt_lt_NL2SP
27541
27542# convert \$build file names to \$host format.
27543to_host_file_cmd=$lt_cv_to_host_file_cmd
27544
27545# convert \$build files to toolchain format.
27546to_tool_file_cmd=$lt_cv_to_tool_file_cmd
27547
27548# An object symbol dumper.
27549OBJDUMP=$lt_OBJDUMP
27550
27551# Method to check whether dependent libraries are shared objects.
27552deplibs_check_method=$lt_deplibs_check_method
27553
27554# Command to use when deplibs_check_method = "file_magic".
27555file_magic_cmd=$lt_file_magic_cmd
27556
27557# How to find potential files when deplibs_check_method = "file_magic".
27558file_magic_glob=$lt_file_magic_glob
27559
27560# Find potential files using nocaseglob when deplibs_check_method = "file_magic".
27561want_nocaseglob=$lt_want_nocaseglob
27562
27563# DLL creation program.
27564DLLTOOL=$lt_DLLTOOL
27565
27566# Command to associate shared and link libraries.
27567sharedlib_from_linklib_cmd=$lt_sharedlib_from_linklib_cmd
27568
27569# The archiver.
27570AR=$lt_AR
27571
27572# Flags to create an archive.
27573AR_FLAGS=$lt_AR_FLAGS
27574
27575# How to feed a file listing to the archiver.
27576archiver_list_spec=$lt_archiver_list_spec
27577
27578# A symbol stripping program.
27579STRIP=$lt_STRIP
27580
27581# Commands used to install an old-style archive.
27582RANLIB=$lt_RANLIB
27583old_postinstall_cmds=$lt_old_postinstall_cmds
27584old_postuninstall_cmds=$lt_old_postuninstall_cmds
27585
27586# Whether to use a lock for old archive extraction.
27587lock_old_archive_extraction=$lock_old_archive_extraction
27588
27589# A C compiler.
27590LTCC=$lt_CC
27591
27592# LTCC compiler flags.
27593LTCFLAGS=$lt_CFLAGS
27594
27595# Take the output of nm and produce a listing of raw symbols and C names.
27596global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
27597
27598# Transform the output of nm in a proper C declaration.
27599global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
27600
27601# Transform the output of nm into a list of symbols to manually relocate.
27602global_symbol_to_import=$lt_lt_cv_sys_global_symbol_to_import
27603
27604# Transform the output of nm in a C name address pair.
27605global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
27606
27607# Transform the output of nm in a C name address pair when lib prefix is needed.
27608global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix
27609
27610# The name lister interface.
27611nm_interface=$lt_lt_cv_nm_interface
27612
27613# Specify filename containing input files for \$NM.
27614nm_file_list_spec=$lt_nm_file_list_spec
27615
27616# The root where to search for dependent libraries,and where our libraries should be installed.
27617lt_sysroot=$lt_sysroot
27618
27619# Command to truncate a binary pipe.
27620lt_truncate_bin=$lt_lt_cv_truncate_bin
27621
27622# The name of the directory that contains temporary libtool files.
27623objdir=$objdir
27624
27625# Used to examine libraries when file_magic_cmd begins with "file".
27626MAGIC_CMD=$MAGIC_CMD
27627
27628# Must we lock files when doing compilation?
27629need_locks=$lt_need_locks
27630
27631# Manifest tool.
27632MANIFEST_TOOL=$lt_MANIFEST_TOOL
27633
27634# Tool to manipulate archived DWARF debug symbol files on Mac OS X.
27635DSYMUTIL=$lt_DSYMUTIL
27636
27637# Tool to change global to local symbols on Mac OS X.
27638NMEDIT=$lt_NMEDIT
27639
27640# Tool to manipulate fat objects and archives on Mac OS X.
27641LIPO=$lt_LIPO
27642
27643# ldd/readelf like tool for Mach-O binaries on Mac OS X.
27644OTOOL=$lt_OTOOL
27645
27646# ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4.
27647OTOOL64=$lt_OTOOL64
27648
27649# Old archive suffix (normally "a").
27650libext=$libext
27651
27652# Shared library suffix (normally ".so").
27653shrext_cmds=$lt_shrext_cmds
27654
27655# The commands to extract the exported symbol list from a shared archive.
27656extract_expsyms_cmds=$lt_extract_expsyms_cmds
27657
27658# Variables whose values should be saved in libtool wrapper scripts and
27659# restored at link time.
27660variables_saved_for_relink=$lt_variables_saved_for_relink
27661
27662# Do we need the "lib" prefix for modules?
27663need_lib_prefix=$need_lib_prefix
27664
27665# Do we need a version for libraries?
27666need_version=$need_version
27667
27668# Library versioning type.
27669version_type=$version_type
27670
27671# Shared library runtime path variable.
27672runpath_var=$runpath_var
27673
27674# Shared library path variable.
27675shlibpath_var=$shlibpath_var
27676
27677# Is shlibpath searched before the hard-coded library search path?
27678shlibpath_overrides_runpath=$shlibpath_overrides_runpath
27679
27680# Format of library name prefix.
27681libname_spec=$lt_libname_spec
27682
27683# List of archive names.  First name is the real one, the rest are links.
27684# The last name is the one that the linker finds with -lNAME
27685library_names_spec=$lt_library_names_spec
27686
27687# The coded name of the library, if different from the real name.
27688soname_spec=$lt_soname_spec
27689
27690# Permission mode override for installation of shared libraries.
27691install_override_mode=$lt_install_override_mode
27692
27693# Command to use after installation of a shared archive.
27694postinstall_cmds=$lt_postinstall_cmds
27695
27696# Command to use after uninstallation of a shared archive.
27697postuninstall_cmds=$lt_postuninstall_cmds
27698
27699# Commands used to finish a libtool library installation in a directory.
27700finish_cmds=$lt_finish_cmds
27701
27702# As "finish_cmds", except a single script fragment to be evaled but
27703# not shown.
27704finish_eval=$lt_finish_eval
27705
27706# Whether we should hardcode library paths into libraries.
27707hardcode_into_libs=$hardcode_into_libs
27708
27709# Compile-time system search path for libraries.
27710sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
27711
27712# Detected run-time system search path for libraries.
27713sys_lib_dlsearch_path_spec=$lt_configure_time_dlsearch_path
27714
27715# Explicit LT_SYS_LIBRARY_PATH set during ./configure time.
27716configure_time_lt_sys_library_path=$lt_configure_time_lt_sys_library_path
27717
27718# Whether dlopen is supported.
27719dlopen_support=$enable_dlopen
27720
27721# Whether dlopen of programs is supported.
27722dlopen_self=$enable_dlopen_self
27723
27724# Whether dlopen of statically linked programs is supported.
27725dlopen_self_static=$enable_dlopen_self_static
27726
27727# Commands to strip libraries.
27728old_striplib=$lt_old_striplib
27729striplib=$lt_striplib
27730
27731
27732# The linker used to build libraries.
27733LD=$lt_LD
27734
27735# How to create reloadable object files.
27736reload_flag=$lt_reload_flag
27737reload_cmds=$lt_reload_cmds
27738
27739# Commands used to build an old-style archive.
27740old_archive_cmds=$lt_old_archive_cmds
27741
27742# A language specific compiler.
27743CC=$lt_compiler
27744
27745# Is the compiler the GNU compiler?
27746with_gcc=$GCC
27747
27748# Compiler flag to turn off builtin functions.
27749no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag
27750
27751# Additional compiler flags for building library objects.
27752pic_flag=$lt_lt_prog_compiler_pic
27753
27754# How to pass a linker flag through the compiler.
27755wl=$lt_lt_prog_compiler_wl
27756
27757# Compiler flag to prevent dynamic linking.
27758link_static_flag=$lt_lt_prog_compiler_static
27759
27760# Does compiler simultaneously support -c and -o options?
27761compiler_c_o=$lt_lt_cv_prog_compiler_c_o
27762
27763# Whether or not to add -lc for building shared libraries.
27764build_libtool_need_lc=$archive_cmds_need_lc
27765
27766# Whether or not to disallow shared libs when runtime libs are static.
27767allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes
27768
27769# Compiler flag to allow reflexive dlopens.
27770export_dynamic_flag_spec=$lt_export_dynamic_flag_spec
27771
27772# Compiler flag to generate shared objects directly from archives.
27773whole_archive_flag_spec=$lt_whole_archive_flag_spec
27774
27775# Whether the compiler copes with passing no objects directly.
27776compiler_needs_object=$lt_compiler_needs_object
27777
27778# Create an old-style archive from a shared archive.
27779old_archive_from_new_cmds=$lt_old_archive_from_new_cmds
27780
27781# Create a temporary old-style archive to link instead of a shared archive.
27782old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds
27783
27784# Commands used to build a shared archive.
27785archive_cmds=$lt_archive_cmds
27786archive_expsym_cmds=$lt_archive_expsym_cmds
27787
27788# Commands used to build a loadable module if different from building
27789# a shared archive.
27790module_cmds=$lt_module_cmds
27791module_expsym_cmds=$lt_module_expsym_cmds
27792
27793# Whether we are building with GNU ld or not.
27794with_gnu_ld=$lt_with_gnu_ld
27795
27796# Flag that allows shared libraries with undefined symbols to be built.
27797allow_undefined_flag=$lt_allow_undefined_flag
27798
27799# Flag that enforces no undefined symbols.
27800no_undefined_flag=$lt_no_undefined_flag
27801
27802# Flag to hardcode \$libdir into a binary during linking.
27803# This must work even if \$libdir does not exist
27804hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
27805
27806# Whether we need a single "-rpath" flag with a separated argument.
27807hardcode_libdir_separator=$lt_hardcode_libdir_separator
27808
27809# Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes
27810# DIR into the resulting binary.
27811hardcode_direct=$hardcode_direct
27812
27813# Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes
27814# DIR into the resulting binary and the resulting library dependency is
27815# "absolute",i.e impossible to change by setting \$shlibpath_var if the
27816# library is relocated.
27817hardcode_direct_absolute=$hardcode_direct_absolute
27818
27819# Set to "yes" if using the -LDIR flag during linking hardcodes DIR
27820# into the resulting binary.
27821hardcode_minus_L=$hardcode_minus_L
27822
27823# Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
27824# into the resulting binary.
27825hardcode_shlibpath_var=$hardcode_shlibpath_var
27826
27827# Set to "yes" if building a shared library automatically hardcodes DIR
27828# into the library and all subsequent libraries and executables linked
27829# against it.
27830hardcode_automatic=$hardcode_automatic
27831
27832# Set to yes if linker adds runtime paths of dependent libraries
27833# to runtime path list.
27834inherit_rpath=$inherit_rpath
27835
27836# Whether libtool must link a program against all its dependency libraries.
27837link_all_deplibs=$link_all_deplibs
27838
27839# Set to "yes" if exported symbols are required.
27840always_export_symbols=$always_export_symbols
27841
27842# The commands to list exported symbols.
27843export_symbols_cmds=$lt_export_symbols_cmds
27844
27845# Symbols that should not be listed in the preloaded symbols.
27846exclude_expsyms=$lt_exclude_expsyms
27847
27848# Symbols that must always be exported.
27849include_expsyms=$lt_include_expsyms
27850
27851# Commands necessary for linking programs (against libraries) with templates.
27852prelink_cmds=$lt_prelink_cmds
27853
27854# Commands necessary for finishing linking programs.
27855postlink_cmds=$lt_postlink_cmds
27856
27857# Specify filename containing input files.
27858file_list_spec=$lt_file_list_spec
27859
27860# How to hardcode a shared library path into an executable.
27861hardcode_action=$hardcode_action
27862
27863# ### END LIBTOOL CONFIG
27864
27865_LT_EOF
27866
27867    cat <<'_LT_EOF' >> "$cfgfile"
27868
27869# ### BEGIN FUNCTIONS SHARED WITH CONFIGURE
27870
27871# func_munge_path_list VARIABLE PATH
27872# -----------------------------------
27873# VARIABLE is name of variable containing _space_ separated list of
27874# directories to be munged by the contents of PATH, which is string
27875# having a format:
27876# "DIR[:DIR]:"
27877#       string "DIR[ DIR]" will be prepended to VARIABLE
27878# ":DIR[:DIR]"
27879#       string "DIR[ DIR]" will be appended to VARIABLE
27880# "DIRP[:DIRP]::[DIRA:]DIRA"
27881#       string "DIRP[ DIRP]" will be prepended to VARIABLE and string
27882#       "DIRA[ DIRA]" will be appended to VARIABLE
27883# "DIR[:DIR]"
27884#       VARIABLE will be replaced by "DIR[ DIR]"
27885func_munge_path_list ()
27886{
27887    case x$2 in
27888    x)
27889        ;;
27890    *:)
27891        eval $1=\"`$ECHO $2 | $SED 's/:/ /g'` \$$1\"
27892        ;;
27893    x:*)
27894        eval $1=\"\$$1 `$ECHO $2 | $SED 's/:/ /g'`\"
27895        ;;
27896    *::*)
27897        eval $1=\"\$$1\ `$ECHO $2 | $SED -e 's/.*:://' -e 's/:/ /g'`\"
27898        eval $1=\"`$ECHO $2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \$$1\"
27899        ;;
27900    *)
27901        eval $1=\"`$ECHO $2 | $SED 's/:/ /g'`\"
27902        ;;
27903    esac
27904}
27905
27906
27907# Calculate cc_basename.  Skip known compiler wrappers and cross-prefix.
27908func_cc_basename ()
27909{
27910    for cc_temp in $*""; do
27911      case $cc_temp in
27912        compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
27913        distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
27914        \-*) ;;
27915        *) break;;
27916      esac
27917    done
27918    func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
27919}
27920
27921
27922# ### END FUNCTIONS SHARED WITH CONFIGURE
27923
27924_LT_EOF
27925
27926  case $host_os in
27927  aix3*)
27928    cat <<\_LT_EOF >> "$cfgfile"
27929# AIX sometimes has problems with the GCC collect2 program.  For some
27930# reason, if we set the COLLECT_NAMES environment variable, the problems
27931# vanish in a puff of smoke.
27932if test set != "${COLLECT_NAMES+set}"; then
27933  COLLECT_NAMES=
27934  export COLLECT_NAMES
27935fi
27936_LT_EOF
27937    ;;
27938  esac
27939
27940
27941
27942ltmain=$ac_aux_dir/ltmain.sh
27943
27944
27945  # We use sed instead of cat because bash on DJGPP gets confused if
27946  # if finds mixed CR/LF and LF-only lines.  Since sed operates in
27947  # text mode, it properly converts lines to CR/LF.  This bash problem
27948  # is reportedly fixed, but why not run on old versions too?
27949  sed '$q' "$ltmain" >> "$cfgfile" \
27950     || (rm -f "$cfgfile"; exit 1)
27951
27952   mv -f "$cfgfile" "$ofile" ||
27953    (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
27954  chmod +x "$ofile"
27955
27956 ;;
27957    "disable-rpath":C)
27958	sed < libtool > libtool-2 \
27959	's/^hardcode_libdir_flag_spec.*$'/'hardcode_libdir_flag_spec=" -D__LIBTOOL_RPATH_SED__ "/'
27960	mv libtool-2 libtool
27961	chmod 755 libtool
27962	libtool="./libtool"
27963	 ;;
27964
27965  esac
27966done # for ac_tag
27967
27968
27969as_fn_exit 0
27970_ACEOF
27971ac_clean_files=$ac_clean_files_save
27972
27973test $ac_write_fail = 0 ||
27974  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
27975
27976
27977# configure is writing to config.log, and then calls config.status.
27978# config.status does its own redirection, appending to config.log.
27979# Unfortunately, on DOS this fails, as config.log is still kept open
27980# by configure, so config.status won't be able to write to it; its
27981# output is simply discarded.  So we exec the FD to /dev/null,
27982# effectively closing config.log, so it can be properly (re)opened and
27983# appended to by config.status.  When coming back to configure, we
27984# need to make the FD available again.
27985if test "$no_create" != yes; then
27986  ac_cs_success=:
27987  ac_config_status_args=
27988  test "$silent" = yes &&
27989    ac_config_status_args="$ac_config_status_args --quiet"
27990  exec 5>/dev/null
27991  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
27992  exec 5>>config.log
27993  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
27994  # would make configure fail if this is the last instruction.
27995  $ac_cs_success || as_fn_exit 1
27996fi
27997if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
27998  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
27999printf "%s\n" "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
28000fi
28001
28002
28003