1#! /bin/sh
2# Guess values for system-dependent variables and create Makefiles.
3# Generated by GNU Autoconf 2.71 for unbound 1.20.0.
4#
5# Report bugs to <unbound-bugs@nlnetlabs.nl or https://github.com/NLnetLabs/unbound/issues>.
6#
7#
8# Copyright (C) 1992-1996, 1998-2017, 2020-2021 Free Software Foundation,
9# Inc.
10#
11#
12# This configure script is free software; the Free Software Foundation
13# gives unlimited permission to copy, distribute and modify it.
14## -------------------- ##
15## M4sh Initialization. ##
16## -------------------- ##
17
18# Be more Bourne compatible
19DUALCASE=1; export DUALCASE # for MKS sh
20as_nop=:
21if test ${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1
22then :
23  emulate sh
24  NULLCMD=:
25  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
26  # is contrary to our usage.  Disable this feature.
27  alias -g '${1+"$@"}'='"$@"'
28  setopt NO_GLOB_SUBST
29else $as_nop
30  case `(set -o) 2>/dev/null` in #(
31  *posix*) :
32    set -o posix ;; #(
33  *) :
34     ;;
35esac
36fi
37
38
39
40# Reset variables that may have inherited troublesome values from
41# the environment.
42
43# IFS needs to be set, to space, tab, and newline, in precisely that order.
44# (If _AS_PATH_WALK were called with IFS unset, it would have the
45# side effect of setting IFS to empty, thus disabling word splitting.)
46# Quoting is to prevent editors from complaining about space-tab.
47as_nl='
48'
49export as_nl
50IFS=" ""	$as_nl"
51
52PS1='$ '
53PS2='> '
54PS4='+ '
55
56# Ensure predictable behavior from utilities with locale-dependent output.
57LC_ALL=C
58export LC_ALL
59LANGUAGE=C
60export LANGUAGE
61
62# We cannot yet rely on "unset" to work, but we need these variables
63# to be unset--not just set to an empty or harmless value--now, to
64# avoid bugs in old shells (e.g. pre-3.0 UWIN ksh).  This construct
65# also avoids known problems related to "unset" and subshell syntax
66# in other old shells (e.g. bash 2.01 and pdksh 5.2.14).
67for as_var in BASH_ENV ENV MAIL MAILPATH CDPATH
68do eval test \${$as_var+y} \
69  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
70done
71
72# Ensure that fds 0, 1, and 2 are open.
73if (exec 3>&0) 2>/dev/null; then :; else exec 0</dev/null; fi
74if (exec 3>&1) 2>/dev/null; then :; else exec 1>/dev/null; fi
75if (exec 3>&2)            ; then :; else exec 2>/dev/null; fi
76
77# The user is always right.
78if ${PATH_SEPARATOR+false} :; then
79  PATH_SEPARATOR=:
80  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
81    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
82      PATH_SEPARATOR=';'
83  }
84fi
85
86
87# Find who we are.  Look in the path if we contain no directory separator.
88as_myself=
89case $0 in #((
90  *[\\/]* ) as_myself=$0 ;;
91  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
92for as_dir in $PATH
93do
94  IFS=$as_save_IFS
95  case $as_dir in #(((
96    '') as_dir=./ ;;
97    */) ;;
98    *) as_dir=$as_dir/ ;;
99  esac
100    test -r "$as_dir$0" && as_myself=$as_dir$0 && break
101  done
102IFS=$as_save_IFS
103
104     ;;
105esac
106# We did not find ourselves, most probably we were run as `sh COMMAND'
107# in which case we are not to be found in the path.
108if test "x$as_myself" = x; then
109  as_myself=$0
110fi
111if test ! -f "$as_myself"; then
112  printf "%s\n" "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
113  exit 1
114fi
115
116
117# Use a proper internal environment variable to ensure we don't fall
118  # into an infinite loop, continuously re-executing ourselves.
119  if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
120    _as_can_reexec=no; export _as_can_reexec;
121    # We cannot yet assume a decent shell, so we have to provide a
122# neutralization value for shells without unset; and this also
123# works around shells that cannot unset nonexistent variables.
124# Preserve -v and -x to the replacement shell.
125BASH_ENV=/dev/null
126ENV=/dev/null
127(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
128case $- in # ((((
129  *v*x* | *x*v* ) as_opts=-vx ;;
130  *v* ) as_opts=-v ;;
131  *x* ) as_opts=-x ;;
132  * ) as_opts= ;;
133esac
134exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
135# Admittedly, this is quite paranoid, since all the known shells bail
136# out after a failed `exec'.
137printf "%s\n" "$0: could not re-execute with $CONFIG_SHELL" >&2
138exit 255
139  fi
140  # We don't want this to propagate to other subprocesses.
141          { _as_can_reexec=; unset _as_can_reexec;}
142if test "x$CONFIG_SHELL" = x; then
143  as_bourne_compatible="as_nop=:
144if test \${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1
145then :
146  emulate sh
147  NULLCMD=:
148  # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
149  # is contrary to our usage.  Disable this feature.
150  alias -g '\${1+\"\$@\"}'='\"\$@\"'
151  setopt NO_GLOB_SUBST
152else \$as_nop
153  case \`(set -o) 2>/dev/null\` in #(
154  *posix*) :
155    set -o posix ;; #(
156  *) :
157     ;;
158esac
159fi
160"
161  as_required="as_fn_return () { (exit \$1); }
162as_fn_success () { as_fn_return 0; }
163as_fn_failure () { as_fn_return 1; }
164as_fn_ret_success () { return 0; }
165as_fn_ret_failure () { return 1; }
166
167exitcode=0
168as_fn_success || { exitcode=1; echo as_fn_success failed.; }
169as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
170as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
171as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
172if ( set x; as_fn_ret_success y && test x = \"\$1\" )
173then :
174
175else \$as_nop
176  exitcode=1; echo positional parameters were not saved.
177fi
178test x\$exitcode = x0 || exit 1
179blah=\$(echo \$(echo blah))
180test x\"\$blah\" = xblah || exit 1
181test -x / || exit 1"
182  as_suggested="  as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
183  as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
184  eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
185  test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
186test \$(( 1 + 1 )) = 2 || exit 1
187
188  test -n \"\${ZSH_VERSION+set}\${BASH_VERSION+set}\" || (
189    ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
190    ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO
191    ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO
192    PATH=/empty FPATH=/empty; export PATH FPATH
193    test \"X\`printf %s \$ECHO\`\" = \"X\$ECHO\" \\
194      || test \"X\`print -r -- \$ECHO\`\" = \"X\$ECHO\" ) || exit 1"
195  if (eval "$as_required") 2>/dev/null
196then :
197  as_have_required=yes
198else $as_nop
199  as_have_required=no
200fi
201  if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null
202then :
203
204else $as_nop
205  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
206as_found=false
207for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
208do
209  IFS=$as_save_IFS
210  case $as_dir in #(((
211    '') as_dir=./ ;;
212    */) ;;
213    *) as_dir=$as_dir/ ;;
214  esac
215  as_found=:
216  case $as_dir in #(
217	 /*)
218	   for as_base in sh bash ksh sh5; do
219	     # Try only shells that exist, to save several forks.
220	     as_shell=$as_dir$as_base
221	     if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
222		    as_run=a "$as_shell" -c "$as_bourne_compatible""$as_required" 2>/dev/null
223then :
224  CONFIG_SHELL=$as_shell as_have_required=yes
225		   if as_run=a "$as_shell" -c "$as_bourne_compatible""$as_suggested" 2>/dev/null
226then :
227  break 2
228fi
229fi
230	   done;;
231       esac
232  as_found=false
233done
234IFS=$as_save_IFS
235if $as_found
236then :
237
238else $as_nop
239  if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
240	      as_run=a "$SHELL" -c "$as_bourne_compatible""$as_required" 2>/dev/null
241then :
242  CONFIG_SHELL=$SHELL as_have_required=yes
243fi
244fi
245
246
247      if test "x$CONFIG_SHELL" != x
248then :
249  export CONFIG_SHELL
250             # We cannot yet assume a decent shell, so we have to provide a
251# neutralization value for shells without unset; and this also
252# works around shells that cannot unset nonexistent variables.
253# Preserve -v and -x to the replacement shell.
254BASH_ENV=/dev/null
255ENV=/dev/null
256(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
257case $- in # ((((
258  *v*x* | *x*v* ) as_opts=-vx ;;
259  *v* ) as_opts=-v ;;
260  *x* ) as_opts=-x ;;
261  * ) as_opts= ;;
262esac
263exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
264# Admittedly, this is quite paranoid, since all the known shells bail
265# out after a failed `exec'.
266printf "%s\n" "$0: could not re-execute with $CONFIG_SHELL" >&2
267exit 255
268fi
269
270    if test x$as_have_required = xno
271then :
272  printf "%s\n" "$0: This script requires a shell more modern than all"
273  printf "%s\n" "$0: the shells that I found on your system."
274  if test ${ZSH_VERSION+y} ; then
275    printf "%s\n" "$0: In particular, zsh $ZSH_VERSION has bugs and should"
276    printf "%s\n" "$0: be upgraded to zsh 4.3.4 or later."
277  else
278    printf "%s\n" "$0: Please tell bug-autoconf@gnu.org and
279$0: unbound-bugs@nlnetlabs.nl or
280$0: https://github.com/NLnetLabs/unbound/issues about your
281$0: system, including any error possibly output before this
282$0: message. Then install a modern shell, or manually run
283$0: the script under such a shell if you do have one."
284  fi
285  exit 1
286fi
287fi
288fi
289SHELL=${CONFIG_SHELL-/bin/sh}
290export SHELL
291# Unset more variables known to interfere with behavior of common tools.
292CLICOLOR_FORCE= GREP_OPTIONS=
293unset CLICOLOR_FORCE GREP_OPTIONS
294
295## --------------------- ##
296## M4sh Shell Functions. ##
297## --------------------- ##
298# as_fn_unset VAR
299# ---------------
300# Portably unset VAR.
301as_fn_unset ()
302{
303  { eval $1=; unset $1;}
304}
305as_unset=as_fn_unset
306
307
308# as_fn_set_status STATUS
309# -----------------------
310# Set $? to STATUS, without forking.
311as_fn_set_status ()
312{
313  return $1
314} # as_fn_set_status
315
316# as_fn_exit STATUS
317# -----------------
318# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
319as_fn_exit ()
320{
321  set +e
322  as_fn_set_status $1
323  exit $1
324} # as_fn_exit
325# as_fn_nop
326# ---------
327# Do nothing but, unlike ":", preserve the value of $?.
328as_fn_nop ()
329{
330  return $?
331}
332as_nop=as_fn_nop
333
334# as_fn_mkdir_p
335# -------------
336# Create "$as_dir" as a directory, including parents if necessary.
337as_fn_mkdir_p ()
338{
339
340  case $as_dir in #(
341  -*) as_dir=./$as_dir;;
342  esac
343  test -d "$as_dir" || eval $as_mkdir_p || {
344    as_dirs=
345    while :; do
346      case $as_dir in #(
347      *\'*) as_qdir=`printf "%s\n" "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
348      *) as_qdir=$as_dir;;
349      esac
350      as_dirs="'$as_qdir' $as_dirs"
351      as_dir=`$as_dirname -- "$as_dir" ||
352$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
353	 X"$as_dir" : 'X\(//\)[^/]' \| \
354	 X"$as_dir" : 'X\(//\)$' \| \
355	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
356printf "%s\n" X"$as_dir" |
357    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
358	    s//\1/
359	    q
360	  }
361	  /^X\(\/\/\)[^/].*/{
362	    s//\1/
363	    q
364	  }
365	  /^X\(\/\/\)$/{
366	    s//\1/
367	    q
368	  }
369	  /^X\(\/\).*/{
370	    s//\1/
371	    q
372	  }
373	  s/.*/./; q'`
374      test -d "$as_dir" && break
375    done
376    test -z "$as_dirs" || eval "mkdir $as_dirs"
377  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
378
379
380} # as_fn_mkdir_p
381
382# as_fn_executable_p FILE
383# -----------------------
384# Test if FILE is an executable regular file.
385as_fn_executable_p ()
386{
387  test -f "$1" && test -x "$1"
388} # as_fn_executable_p
389# as_fn_append VAR VALUE
390# ----------------------
391# Append the text in VALUE to the end of the definition contained in VAR. Take
392# advantage of any shell optimizations that allow amortized linear growth over
393# repeated appends, instead of the typical quadratic growth present in naive
394# implementations.
395if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null
396then :
397  eval 'as_fn_append ()
398  {
399    eval $1+=\$2
400  }'
401else $as_nop
402  as_fn_append ()
403  {
404    eval $1=\$$1\$2
405  }
406fi # as_fn_append
407
408# as_fn_arith ARG...
409# ------------------
410# Perform arithmetic evaluation on the ARGs, and store the result in the
411# global $as_val. Take advantage of shells that can avoid forks. The arguments
412# must be portable across $(()) and expr.
413if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null
414then :
415  eval 'as_fn_arith ()
416  {
417    as_val=$(( $* ))
418  }'
419else $as_nop
420  as_fn_arith ()
421  {
422    as_val=`expr "$@" || test $? -eq 1`
423  }
424fi # as_fn_arith
425
426# as_fn_nop
427# ---------
428# Do nothing but, unlike ":", preserve the value of $?.
429as_fn_nop ()
430{
431  return $?
432}
433as_nop=as_fn_nop
434
435# as_fn_error STATUS ERROR [LINENO LOG_FD]
436# ----------------------------------------
437# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
438# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
439# script with STATUS, using 1 if that was 0.
440as_fn_error ()
441{
442  as_status=$1; test $as_status -eq 0 && as_status=1
443  if test "$4"; then
444    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
445    printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
446  fi
447  printf "%s\n" "$as_me: error: $2" >&2
448  as_fn_exit $as_status
449} # as_fn_error
450
451if expr a : '\(a\)' >/dev/null 2>&1 &&
452   test "X`expr 00001 : '.*\(...\)'`" = X001; then
453  as_expr=expr
454else
455  as_expr=false
456fi
457
458if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
459  as_basename=basename
460else
461  as_basename=false
462fi
463
464if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
465  as_dirname=dirname
466else
467  as_dirname=false
468fi
469
470as_me=`$as_basename -- "$0" ||
471$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
472	 X"$0" : 'X\(//\)$' \| \
473	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
474printf "%s\n" X/"$0" |
475    sed '/^.*\/\([^/][^/]*\)\/*$/{
476	    s//\1/
477	    q
478	  }
479	  /^X\/\(\/\/\)$/{
480	    s//\1/
481	    q
482	  }
483	  /^X\/\(\/\).*/{
484	    s//\1/
485	    q
486	  }
487	  s/.*/./; q'`
488
489# Avoid depending upon Character Ranges.
490as_cr_letters='abcdefghijklmnopqrstuvwxyz'
491as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
492as_cr_Letters=$as_cr_letters$as_cr_LETTERS
493as_cr_digits='0123456789'
494as_cr_alnum=$as_cr_Letters$as_cr_digits
495
496
497  as_lineno_1=$LINENO as_lineno_1a=$LINENO
498  as_lineno_2=$LINENO as_lineno_2a=$LINENO
499  eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
500  test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
501  # Blame Lee E. McMahon (1931-1989) for sed's syntax.  :-)
502  sed -n '
503    p
504    /[$]LINENO/=
505  ' <$as_myself |
506    sed '
507      s/[$]LINENO.*/&-/
508      t lineno
509      b
510      :lineno
511      N
512      :loop
513      s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
514      t loop
515      s/-\n.*//
516    ' >$as_me.lineno &&
517  chmod +x "$as_me.lineno" ||
518    { printf "%s\n" "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
519
520  # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
521  # already done that, so ensure we don't try to do so again and fall
522  # in an infinite loop.  This has already happened in practice.
523  _as_can_reexec=no; export _as_can_reexec
524  # Don't try to exec as it changes $[0], causing all sort of problems
525  # (the dirname of $[0] is not the place where we might find the
526  # original and so on.  Autoconf is especially sensitive to this).
527  . "./$as_me.lineno"
528  # Exit status is that of the last command.
529  exit
530}
531
532
533# Determine whether it's possible to make 'echo' print without a newline.
534# These variables are no longer used directly by Autoconf, but are AC_SUBSTed
535# for compatibility with existing Makefiles.
536ECHO_C= ECHO_N= ECHO_T=
537case `echo -n x` in #(((((
538-n*)
539  case `echo 'xy\c'` in
540  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
541  xy)  ECHO_C='\c';;
542  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
543       ECHO_T='	';;
544  esac;;
545*)
546  ECHO_N='-n';;
547esac
548
549# For backward compatibility with old third-party macros, we provide
550# the shell variables $as_echo and $as_echo_n.  New code should use
551# AS_ECHO(["message"]) and AS_ECHO_N(["message"]), respectively.
552as_echo='printf %s\n'
553as_echo_n='printf %s'
554
555
556rm -f conf$$ conf$$.exe conf$$.file
557if test -d conf$$.dir; then
558  rm -f conf$$.dir/conf$$.file
559else
560  rm -f conf$$.dir
561  mkdir conf$$.dir 2>/dev/null
562fi
563if (echo >conf$$.file) 2>/dev/null; then
564  if ln -s conf$$.file conf$$ 2>/dev/null; then
565    as_ln_s='ln -s'
566    # ... but there are two gotchas:
567    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
568    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
569    # In both cases, we have to default to `cp -pR'.
570    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
571      as_ln_s='cp -pR'
572  elif ln conf$$.file conf$$ 2>/dev/null; then
573    as_ln_s=ln
574  else
575    as_ln_s='cp -pR'
576  fi
577else
578  as_ln_s='cp -pR'
579fi
580rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
581rmdir conf$$.dir 2>/dev/null
582
583if mkdir -p . 2>/dev/null; then
584  as_mkdir_p='mkdir -p "$as_dir"'
585else
586  test -d ./-p && rmdir ./-p
587  as_mkdir_p=false
588fi
589
590as_test_x='test -x'
591as_executable_p=as_fn_executable_p
592
593# Sed expression to map a string onto a valid CPP name.
594as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
595
596# Sed expression to map a string onto a valid variable name.
597as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
598
599SHELL=${CONFIG_SHELL-/bin/sh}
600
601
602test -n "$DJDIR" || exec 7<&0 </dev/null
603exec 6>&1
604
605# Name of the host.
606# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
607# so uname gets run too.
608ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
609
610#
611# Initializations.
612#
613ac_default_prefix=/usr/local
614ac_clean_files=
615ac_config_libobj_dir=.
616LIBOBJS=
617cross_compiling=no
618subdirs=
619MFLAGS=
620MAKEFLAGS=
621
622# Identity of this package.
623PACKAGE_NAME='unbound'
624PACKAGE_TARNAME='unbound'
625PACKAGE_VERSION='1.20.0'
626PACKAGE_STRING='unbound 1.20.0'
627PACKAGE_BUGREPORT='unbound-bugs@nlnetlabs.nl or https://github.com/NLnetLabs/unbound/issues'
628PACKAGE_URL=''
629
630# Factoring default headers for most tests.
631ac_includes_default="\
632#include <stddef.h>
633#ifdef HAVE_STDIO_H
634# include <stdio.h>
635#endif
636#ifdef HAVE_STDLIB_H
637# include <stdlib.h>
638#endif
639#ifdef HAVE_STRING_H
640# include <string.h>
641#endif
642#ifdef HAVE_INTTYPES_H
643# include <inttypes.h>
644#endif
645#ifdef HAVE_STDINT_H
646# include <stdint.h>
647#endif
648#ifdef HAVE_STRINGS_H
649# include <strings.h>
650#endif
651#ifdef HAVE_SYS_TYPES_H
652# include <sys/types.h>
653#endif
654#ifdef HAVE_SYS_STAT_H
655# include <sys/stat.h>
656#endif
657#ifdef HAVE_UNISTD_H
658# include <unistd.h>
659#endif"
660
661ac_header_c_list=
662ac_func_c_list=
663ac_subst_vars='LTLIBOBJS
664date
665version
666INSTALLTARGET
667ALLTARGET
668SOURCEFILE
669SOURCEDETERMINE
670IPSET_OBJ
671IPSET_SRC
672IPSECMOD_HEADER
673IPSECMOD_OBJ
674CACHEDB_OBJ
675CACHEDB_SRC
676DNSCRYPT_OBJ
677DNSCRYPT_SRC
678ENABLE_DNSCRYPT
679ENABLE_DNSCRYPT_XCHACHA20
680DNSTAP_OBJ
681DNSTAP_SRC
682DNSTAP_SOCKET_TESTBIN
683DNSTAP_SOCKET_PATH
684opt_dnstap_socket_path
685ENABLE_DNSTAP
686PROTOBUFC_LIBS
687PROTOBUFC_CFLAGS
688PROTOC_C
689UBSYMS
690EXTRALINK
691COMMON_OBJ_ALL_SYMBOLS
692LIBOBJ_WITHOUT_CTIME
693LIBOBJ_WITHOUT_CTIMEARC4
694WIN_CHECKCONF_OBJ_LINK
695WIN_CONTROL_OBJ_LINK
696WIN_UBANCHOR_OBJ_LINK
697WIN_HOST_OBJ_LINK
698WIN_DAEMON_OBJ_LINK
699WIN_DAEMON_OBJ
700WIN_DAEMON_SRC
701WINAPPS
702WINDRES
703CHECKLOCK_OBJ
704staticexe
705PC_LIBEVENT_DEPENDENCY
706UNBOUND_EVENT_UNINSTALL
707UNBOUND_EVENT_INSTALL
708SUBNET_HEADER
709SUBNET_OBJ
710PC_LIBBSD_DEPENDENCY
711SSLLIB
712HAVE_SSL
713PC_CRYPTO_DEPENDENCY
714CONFIG_DATE
715GCC_DOCKER_LINTFLAGS
716NETBSD_LINTFLAGS
717PYUNBOUND_UNINSTALL
718PYUNBOUND_INSTALL
719PYUNBOUND_TARGET
720PYUNBOUND_OBJ
721WITH_PYUNBOUND
722PYTHONMOD_UNINSTALL
723PYTHONMOD_INSTALL
724PYTHONMOD_HEADER
725PYTHONMOD_OBJ
726WITH_PYTHONMODULE
727swig
728SWIG_LIB
729SWIG
730PC_PY_DEPENDENCY
731PYTHON_LIBS
732PY_MAJOR_VERSION
733PYTHON_SITE_PKG
734PYTHON_LDFLAGS
735PYTHON_CPPFLAGS
736PYTHON
737PYTHON_VERSION
738DYNLIBMOD_EXTRALIBS
739DYNLIBMOD_HEADER
740DYNLIBMOD_OBJ
741WITH_DYNLIBMODULE
742PTHREAD_CFLAGS_ONLY
743PTHREAD_CFLAGS
744PTHREAD_LIBS
745PTHREAD_CXX
746PTHREAD_CC
747ax_pthread_config
748ASYNCLOOK_ALLOCCHECK_EXTRA_OBJ
749SLDNS_ALLOCCHECK_EXTRA_OBJ
750USE_SYSTEMD_FALSE
751USE_SYSTEMD_TRUE
752SYSTEMD_DAEMON_LIBS
753SYSTEMD_DAEMON_CFLAGS
754SYSTEMD_LIBS
755SYSTEMD_CFLAGS
756RUNTIME_PATH
757LIBOBJS
758CPP
759PKG_CONFIG_LIBDIR
760PKG_CONFIG_PATH
761PKG_CONFIG
762LT_SYS_LIBRARY_PATH
763OTOOL64
764OTOOL
765LIPO
766NMEDIT
767DSYMUTIL
768MANIFEST_TOOL
769AWK
770RANLIB
771ac_ct_AR
772DLLTOOL
773OBJDUMP
774LN_S
775NM
776ac_ct_DUMPBIN
777DUMPBIN
778LD
779FGREP
780EGREP
781SED
782LIBTOOL
783AR
784host_os
785host_vendor
786host_cpu
787host
788build_os
789build_vendor
790build_cpu
791build
792libtool
793STRIP
794doxygen
795YFLAGS
796YACC
797LEXLIB
798LEX_OUTPUT_ROOT
799LEX
800debug_enabled
801DEPFLAG
802GREP
803UNBOUND_USERNAME
804UNBOUND_ROOTCERT_FILE
805UNBOUND_ROOTKEY_FILE
806UNBOUND_PIDFILE
807UNBOUND_SHARE_DIR
808UNBOUND_CHROOT_DIR
809UNBOUND_RUN_DIR
810ub_conf_dir
811ub_conf_file
812UNBOUND_LOCALSTATE_DIR
813UNBOUND_SYSCONF_DIR
814UNBOUND_SBIN_DIR
815OBJEXT
816EXEEXT
817ac_ct_CC
818CPPFLAGS
819LDFLAGS
820CFLAGS
821CC
822LIBUNBOUND_AGE
823LIBUNBOUND_REVISION
824LIBUNBOUND_CURRENT
825UNBOUND_VERSION_MICRO
826UNBOUND_VERSION_MINOR
827UNBOUND_VERSION_MAJOR
828target_alias
829host_alias
830build_alias
831LIBS
832ECHO_T
833ECHO_N
834ECHO_C
835DEFS
836mandir
837localedir
838libdir
839psdir
840pdfdir
841dvidir
842htmldir
843infodir
844docdir
845oldincludedir
846includedir
847runstatedir
848localstatedir
849sharedstatedir
850sysconfdir
851datadir
852datarootdir
853libexecdir
854sbindir
855bindir
856program_transform_name
857prefix
858exec_prefix
859PACKAGE_URL
860PACKAGE_BUGREPORT
861PACKAGE_STRING
862PACKAGE_VERSION
863PACKAGE_TARNAME
864PACKAGE_NAME
865PATH_SEPARATOR
866SHELL'
867ac_subst_files=''
868ac_user_opts='
869enable_option_checking
870with_conf_file
871with_run_dir
872with_chroot_dir
873with_share_dir
874with_pidfile
875with_rootkey_file
876with_rootcert_file
877with_username
878enable_checking
879enable_debug
880enable_flto
881enable_pie
882enable_relro_now
883enable_shared
884enable_static
885with_pic
886enable_fast_install
887with_aix_soname
888with_gnu_ld
889with_sysroot
890enable_libtool_lock
891enable_rpath
892enable_largefile
893enable_systemd
894enable_alloc_checks
895enable_alloc_lite
896enable_alloc_nonregional
897with_pthreads
898with_solaris_threads
899with_syslog_facility
900with_dynlibmodule
901with_pyunbound
902with_pythonmodule
903enable_swig_version_check
904with_nss
905with_nettle
906with_ssl
907with_libbsd
908enable_sha1
909enable_sha2
910enable_subnet
911enable_gost
912enable_ecdsa
913enable_dsa
914with_deprecate_rsa_1024
915enable_ed25519
916enable_ed448
917enable_event_api
918enable_tfo_client
919enable_tfo_server
920with_libevent
921with_libexpat
922with_libhiredis
923with_libnghttp2
924enable_static_exe
925enable_fully_static
926enable_lock_checks
927enable_allsymbols
928enable_dnstap
929with_dnstap_socket_path
930with_protobuf_c
931enable_dnscrypt
932with_libsodium
933enable_cachedb
934enable_ipsecmod
935enable_ipset
936with_libmnl
937enable_explicit_port_randomisation
938enable_linux_ip_local_port_range
939with_libunbound_only
940'
941      ac_precious_vars='build_alias
942host_alias
943target_alias
944CC
945CFLAGS
946LDFLAGS
947LIBS
948CPPFLAGS
949YACC
950YFLAGS
951LT_SYS_LIBRARY_PATH
952PKG_CONFIG
953PKG_CONFIG_PATH
954PKG_CONFIG_LIBDIR
955CPP
956SYSTEMD_CFLAGS
957SYSTEMD_LIBS
958SYSTEMD_DAEMON_CFLAGS
959SYSTEMD_DAEMON_LIBS
960PYTHON_VERSION
961PROTOBUFC_CFLAGS
962PROTOBUFC_LIBS'
963
964
965# Initialize some variables set by options.
966ac_init_help=
967ac_init_version=false
968ac_unrecognized_opts=
969ac_unrecognized_sep=
970# The variables have the same names as the options, with
971# dashes changed to underlines.
972cache_file=/dev/null
973exec_prefix=NONE
974no_create=
975no_recursion=
976prefix=NONE
977program_prefix=NONE
978program_suffix=NONE
979program_transform_name=s,x,x,
980silent=
981site=
982srcdir=
983verbose=
984x_includes=NONE
985x_libraries=NONE
986
987# Installation directory options.
988# These are left unexpanded so users can "make install exec_prefix=/foo"
989# and all the variables that are supposed to be based on exec_prefix
990# by default will actually change.
991# Use braces instead of parens because sh, perl, etc. also accept them.
992# (The list follows the same order as the GNU Coding Standards.)
993bindir='${exec_prefix}/bin'
994sbindir='${exec_prefix}/sbin'
995libexecdir='${exec_prefix}/libexec'
996datarootdir='${prefix}/share'
997datadir='${datarootdir}'
998sysconfdir='${prefix}/etc'
999sharedstatedir='${prefix}/com'
1000localstatedir='${prefix}/var'
1001runstatedir='${localstatedir}/run'
1002includedir='${prefix}/include'
1003oldincludedir='/usr/include'
1004docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1005infodir='${datarootdir}/info'
1006htmldir='${docdir}'
1007dvidir='${docdir}'
1008pdfdir='${docdir}'
1009psdir='${docdir}'
1010libdir='${exec_prefix}/lib'
1011localedir='${datarootdir}/locale'
1012mandir='${datarootdir}/man'
1013
1014ac_prev=
1015ac_dashdash=
1016for ac_option
1017do
1018  # If the previous option needs an argument, assign it.
1019  if test -n "$ac_prev"; then
1020    eval $ac_prev=\$ac_option
1021    ac_prev=
1022    continue
1023  fi
1024
1025  case $ac_option in
1026  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1027  *=)   ac_optarg= ;;
1028  *)    ac_optarg=yes ;;
1029  esac
1030
1031  case $ac_dashdash$ac_option in
1032  --)
1033    ac_dashdash=yes ;;
1034
1035  -bindir | --bindir | --bindi | --bind | --bin | --bi)
1036    ac_prev=bindir ;;
1037  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1038    bindir=$ac_optarg ;;
1039
1040  -build | --build | --buil | --bui | --bu)
1041    ac_prev=build_alias ;;
1042  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1043    build_alias=$ac_optarg ;;
1044
1045  -cache-file | --cache-file | --cache-fil | --cache-fi \
1046  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1047    ac_prev=cache_file ;;
1048  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1049  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1050    cache_file=$ac_optarg ;;
1051
1052  --config-cache | -C)
1053    cache_file=config.cache ;;
1054
1055  -datadir | --datadir | --datadi | --datad)
1056    ac_prev=datadir ;;
1057  -datadir=* | --datadir=* | --datadi=* | --datad=*)
1058    datadir=$ac_optarg ;;
1059
1060  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1061  | --dataroo | --dataro | --datar)
1062    ac_prev=datarootdir ;;
1063  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1064  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1065    datarootdir=$ac_optarg ;;
1066
1067  -disable-* | --disable-*)
1068    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1069    # Reject names that are not valid shell variable names.
1070    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1071      as_fn_error $? "invalid feature name: \`$ac_useropt'"
1072    ac_useropt_orig=$ac_useropt
1073    ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
1074    case $ac_user_opts in
1075      *"
1076"enable_$ac_useropt"
1077"*) ;;
1078      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1079	 ac_unrecognized_sep=', ';;
1080    esac
1081    eval enable_$ac_useropt=no ;;
1082
1083  -docdir | --docdir | --docdi | --doc | --do)
1084    ac_prev=docdir ;;
1085  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1086    docdir=$ac_optarg ;;
1087
1088  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1089    ac_prev=dvidir ;;
1090  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1091    dvidir=$ac_optarg ;;
1092
1093  -enable-* | --enable-*)
1094    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1095    # Reject names that are not valid shell variable names.
1096    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1097      as_fn_error $? "invalid feature name: \`$ac_useropt'"
1098    ac_useropt_orig=$ac_useropt
1099    ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
1100    case $ac_user_opts in
1101      *"
1102"enable_$ac_useropt"
1103"*) ;;
1104      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1105	 ac_unrecognized_sep=', ';;
1106    esac
1107    eval enable_$ac_useropt=\$ac_optarg ;;
1108
1109  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1110  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1111  | --exec | --exe | --ex)
1112    ac_prev=exec_prefix ;;
1113  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1114  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1115  | --exec=* | --exe=* | --ex=*)
1116    exec_prefix=$ac_optarg ;;
1117
1118  -gas | --gas | --ga | --g)
1119    # Obsolete; use --with-gas.
1120    with_gas=yes ;;
1121
1122  -help | --help | --hel | --he | -h)
1123    ac_init_help=long ;;
1124  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1125    ac_init_help=recursive ;;
1126  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1127    ac_init_help=short ;;
1128
1129  -host | --host | --hos | --ho)
1130    ac_prev=host_alias ;;
1131  -host=* | --host=* | --hos=* | --ho=*)
1132    host_alias=$ac_optarg ;;
1133
1134  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1135    ac_prev=htmldir ;;
1136  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1137  | --ht=*)
1138    htmldir=$ac_optarg ;;
1139
1140  -includedir | --includedir | --includedi | --included | --include \
1141  | --includ | --inclu | --incl | --inc)
1142    ac_prev=includedir ;;
1143  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1144  | --includ=* | --inclu=* | --incl=* | --inc=*)
1145    includedir=$ac_optarg ;;
1146
1147  -infodir | --infodir | --infodi | --infod | --info | --inf)
1148    ac_prev=infodir ;;
1149  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1150    infodir=$ac_optarg ;;
1151
1152  -libdir | --libdir | --libdi | --libd)
1153    ac_prev=libdir ;;
1154  -libdir=* | --libdir=* | --libdi=* | --libd=*)
1155    libdir=$ac_optarg ;;
1156
1157  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1158  | --libexe | --libex | --libe)
1159    ac_prev=libexecdir ;;
1160  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1161  | --libexe=* | --libex=* | --libe=*)
1162    libexecdir=$ac_optarg ;;
1163
1164  -localedir | --localedir | --localedi | --localed | --locale)
1165    ac_prev=localedir ;;
1166  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1167    localedir=$ac_optarg ;;
1168
1169  -localstatedir | --localstatedir | --localstatedi | --localstated \
1170  | --localstate | --localstat | --localsta | --localst | --locals)
1171    ac_prev=localstatedir ;;
1172  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1173  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1174    localstatedir=$ac_optarg ;;
1175
1176  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1177    ac_prev=mandir ;;
1178  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1179    mandir=$ac_optarg ;;
1180
1181  -nfp | --nfp | --nf)
1182    # Obsolete; use --without-fp.
1183    with_fp=no ;;
1184
1185  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1186  | --no-cr | --no-c | -n)
1187    no_create=yes ;;
1188
1189  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1190  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1191    no_recursion=yes ;;
1192
1193  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1194  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1195  | --oldin | --oldi | --old | --ol | --o)
1196    ac_prev=oldincludedir ;;
1197  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1198  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1199  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1200    oldincludedir=$ac_optarg ;;
1201
1202  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1203    ac_prev=prefix ;;
1204  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1205    prefix=$ac_optarg ;;
1206
1207  -program-prefix | --program-prefix | --program-prefi | --program-pref \
1208  | --program-pre | --program-pr | --program-p)
1209    ac_prev=program_prefix ;;
1210  -program-prefix=* | --program-prefix=* | --program-prefi=* \
1211  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1212    program_prefix=$ac_optarg ;;
1213
1214  -program-suffix | --program-suffix | --program-suffi | --program-suff \
1215  | --program-suf | --program-su | --program-s)
1216    ac_prev=program_suffix ;;
1217  -program-suffix=* | --program-suffix=* | --program-suffi=* \
1218  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1219    program_suffix=$ac_optarg ;;
1220
1221  -program-transform-name | --program-transform-name \
1222  | --program-transform-nam | --program-transform-na \
1223  | --program-transform-n | --program-transform- \
1224  | --program-transform | --program-transfor \
1225  | --program-transfo | --program-transf \
1226  | --program-trans | --program-tran \
1227  | --progr-tra | --program-tr | --program-t)
1228    ac_prev=program_transform_name ;;
1229  -program-transform-name=* | --program-transform-name=* \
1230  | --program-transform-nam=* | --program-transform-na=* \
1231  | --program-transform-n=* | --program-transform-=* \
1232  | --program-transform=* | --program-transfor=* \
1233  | --program-transfo=* | --program-transf=* \
1234  | --program-trans=* | --program-tran=* \
1235  | --progr-tra=* | --program-tr=* | --program-t=*)
1236    program_transform_name=$ac_optarg ;;
1237
1238  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1239    ac_prev=pdfdir ;;
1240  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1241    pdfdir=$ac_optarg ;;
1242
1243  -psdir | --psdir | --psdi | --psd | --ps)
1244    ac_prev=psdir ;;
1245  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1246    psdir=$ac_optarg ;;
1247
1248  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1249  | -silent | --silent | --silen | --sile | --sil)
1250    silent=yes ;;
1251
1252  -runstatedir | --runstatedir | --runstatedi | --runstated \
1253  | --runstate | --runstat | --runsta | --runst | --runs \
1254  | --run | --ru | --r)
1255    ac_prev=runstatedir ;;
1256  -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
1257  | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
1258  | --run=* | --ru=* | --r=*)
1259    runstatedir=$ac_optarg ;;
1260
1261  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1262    ac_prev=sbindir ;;
1263  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1264  | --sbi=* | --sb=*)
1265    sbindir=$ac_optarg ;;
1266
1267  -sharedstatedir | --sharedstatedir | --sharedstatedi \
1268  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1269  | --sharedst | --shareds | --shared | --share | --shar \
1270  | --sha | --sh)
1271    ac_prev=sharedstatedir ;;
1272  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1273  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1274  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1275  | --sha=* | --sh=*)
1276    sharedstatedir=$ac_optarg ;;
1277
1278  -site | --site | --sit)
1279    ac_prev=site ;;
1280  -site=* | --site=* | --sit=*)
1281    site=$ac_optarg ;;
1282
1283  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1284    ac_prev=srcdir ;;
1285  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1286    srcdir=$ac_optarg ;;
1287
1288  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1289  | --syscon | --sysco | --sysc | --sys | --sy)
1290    ac_prev=sysconfdir ;;
1291  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1292  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1293    sysconfdir=$ac_optarg ;;
1294
1295  -target | --target | --targe | --targ | --tar | --ta | --t)
1296    ac_prev=target_alias ;;
1297  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1298    target_alias=$ac_optarg ;;
1299
1300  -v | -verbose | --verbose | --verbos | --verbo | --verb)
1301    verbose=yes ;;
1302
1303  -version | --version | --versio | --versi | --vers | -V)
1304    ac_init_version=: ;;
1305
1306  -with-* | --with-*)
1307    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1308    # Reject names that are not valid shell variable names.
1309    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1310      as_fn_error $? "invalid package name: \`$ac_useropt'"
1311    ac_useropt_orig=$ac_useropt
1312    ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
1313    case $ac_user_opts in
1314      *"
1315"with_$ac_useropt"
1316"*) ;;
1317      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1318	 ac_unrecognized_sep=', ';;
1319    esac
1320    eval with_$ac_useropt=\$ac_optarg ;;
1321
1322  -without-* | --without-*)
1323    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1324    # Reject names that are not valid shell variable names.
1325    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1326      as_fn_error $? "invalid package name: \`$ac_useropt'"
1327    ac_useropt_orig=$ac_useropt
1328    ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
1329    case $ac_user_opts in
1330      *"
1331"with_$ac_useropt"
1332"*) ;;
1333      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1334	 ac_unrecognized_sep=', ';;
1335    esac
1336    eval with_$ac_useropt=no ;;
1337
1338  --x)
1339    # Obsolete; use --with-x.
1340    with_x=yes ;;
1341
1342  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1343  | --x-incl | --x-inc | --x-in | --x-i)
1344    ac_prev=x_includes ;;
1345  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1346  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1347    x_includes=$ac_optarg ;;
1348
1349  -x-libraries | --x-libraries | --x-librarie | --x-librari \
1350  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1351    ac_prev=x_libraries ;;
1352  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1353  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1354    x_libraries=$ac_optarg ;;
1355
1356  -*) as_fn_error $? "unrecognized option: \`$ac_option'
1357Try \`$0 --help' for more information"
1358    ;;
1359
1360  *=*)
1361    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1362    # Reject names that are not valid shell variable names.
1363    case $ac_envvar in #(
1364      '' | [0-9]* | *[!_$as_cr_alnum]* )
1365      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1366    esac
1367    eval $ac_envvar=\$ac_optarg
1368    export $ac_envvar ;;
1369
1370  *)
1371    # FIXME: should be removed in autoconf 3.0.
1372    printf "%s\n" "$as_me: WARNING: you should use --build, --host, --target" >&2
1373    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1374      printf "%s\n" "$as_me: WARNING: invalid host type: $ac_option" >&2
1375    : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1376    ;;
1377
1378  esac
1379done
1380
1381if test -n "$ac_prev"; then
1382  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1383  as_fn_error $? "missing argument to $ac_option"
1384fi
1385
1386if test -n "$ac_unrecognized_opts"; then
1387  case $enable_option_checking in
1388    no) ;;
1389    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1390    *)     printf "%s\n" "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1391  esac
1392fi
1393
1394# Check all directory arguments for consistency.
1395for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
1396		datadir sysconfdir sharedstatedir localstatedir includedir \
1397		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1398		libdir localedir mandir runstatedir
1399do
1400  eval ac_val=\$$ac_var
1401  # Remove trailing slashes.
1402  case $ac_val in
1403    */ )
1404      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1405      eval $ac_var=\$ac_val;;
1406  esac
1407  # Be sure to have absolute directory names.
1408  case $ac_val in
1409    [\\/$]* | ?:[\\/]* )  continue;;
1410    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1411  esac
1412  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1413done
1414
1415# There might be people who depend on the old broken behavior: `$host'
1416# used to hold the argument of --host etc.
1417# FIXME: To remove some day.
1418build=$build_alias
1419host=$host_alias
1420target=$target_alias
1421
1422# FIXME: To remove some day.
1423if test "x$host_alias" != x; then
1424  if test "x$build_alias" = x; then
1425    cross_compiling=maybe
1426  elif test "x$build_alias" != "x$host_alias"; then
1427    cross_compiling=yes
1428  fi
1429fi
1430
1431ac_tool_prefix=
1432test -n "$host_alias" && ac_tool_prefix=$host_alias-
1433
1434test "$silent" = yes && exec 6>/dev/null
1435
1436
1437ac_pwd=`pwd` && test -n "$ac_pwd" &&
1438ac_ls_di=`ls -di .` &&
1439ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1440  as_fn_error $? "working directory cannot be determined"
1441test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1442  as_fn_error $? "pwd does not report name of working directory"
1443
1444
1445# Find the source files, if location was not specified.
1446if test -z "$srcdir"; then
1447  ac_srcdir_defaulted=yes
1448  # Try the directory containing this script, then the parent directory.
1449  ac_confdir=`$as_dirname -- "$as_myself" ||
1450$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1451	 X"$as_myself" : 'X\(//\)[^/]' \| \
1452	 X"$as_myself" : 'X\(//\)$' \| \
1453	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1454printf "%s\n" X"$as_myself" |
1455    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1456	    s//\1/
1457	    q
1458	  }
1459	  /^X\(\/\/\)[^/].*/{
1460	    s//\1/
1461	    q
1462	  }
1463	  /^X\(\/\/\)$/{
1464	    s//\1/
1465	    q
1466	  }
1467	  /^X\(\/\).*/{
1468	    s//\1/
1469	    q
1470	  }
1471	  s/.*/./; q'`
1472  srcdir=$ac_confdir
1473  if test ! -r "$srcdir/$ac_unique_file"; then
1474    srcdir=..
1475  fi
1476else
1477  ac_srcdir_defaulted=no
1478fi
1479if test ! -r "$srcdir/$ac_unique_file"; then
1480  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1481  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1482fi
1483ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1484ac_abs_confdir=`(
1485	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1486	pwd)`
1487# When building in place, set srcdir=.
1488if test "$ac_abs_confdir" = "$ac_pwd"; then
1489  srcdir=.
1490fi
1491# Remove unnecessary trailing slashes from srcdir.
1492# Double slashes in file names in object file debugging info
1493# mess up M-x gdb in Emacs.
1494case $srcdir in
1495*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1496esac
1497for ac_var in $ac_precious_vars; do
1498  eval ac_env_${ac_var}_set=\${${ac_var}+set}
1499  eval ac_env_${ac_var}_value=\$${ac_var}
1500  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1501  eval ac_cv_env_${ac_var}_value=\$${ac_var}
1502done
1503
1504#
1505# Report the --help message.
1506#
1507if test "$ac_init_help" = "long"; then
1508  # Omit some internal or obsolete options to make the list less imposing.
1509  # This message is too long to be a string in the A/UX 3.1 sh.
1510  cat <<_ACEOF
1511\`configure' configures unbound 1.20.0 to adapt to many kinds of systems.
1512
1513Usage: $0 [OPTION]... [VAR=VALUE]...
1514
1515To assign environment variables (e.g., CC, CFLAGS...), specify them as
1516VAR=VALUE.  See below for descriptions of some of the useful variables.
1517
1518Defaults for the options are specified in brackets.
1519
1520Configuration:
1521  -h, --help              display this help and exit
1522      --help=short        display options specific to this package
1523      --help=recursive    display the short help of all the included packages
1524  -V, --version           display version information and exit
1525  -q, --quiet, --silent   do not print \`checking ...' messages
1526      --cache-file=FILE   cache test results in FILE [disabled]
1527  -C, --config-cache      alias for \`--cache-file=config.cache'
1528  -n, --no-create         do not create output files
1529      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1530
1531Installation directories:
1532  --prefix=PREFIX         install architecture-independent files in PREFIX
1533                          [$ac_default_prefix]
1534  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1535                          [PREFIX]
1536
1537By default, \`make install' will install all the files in
1538\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1539an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1540for instance \`--prefix=\$HOME'.
1541
1542For better control, use the options below.
1543
1544Fine tuning of the installation directories:
1545  --bindir=DIR            user executables [EPREFIX/bin]
1546  --sbindir=DIR           system admin executables [EPREFIX/sbin]
1547  --libexecdir=DIR        program executables [EPREFIX/libexec]
1548  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1549  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1550  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1551  --runstatedir=DIR       modifiable per-process data [LOCALSTATEDIR/run]
1552  --libdir=DIR            object code libraries [EPREFIX/lib]
1553  --includedir=DIR        C header files [PREFIX/include]
1554  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1555  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1556  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1557  --infodir=DIR           info documentation [DATAROOTDIR/info]
1558  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1559  --mandir=DIR            man documentation [DATAROOTDIR/man]
1560  --docdir=DIR            documentation root [DATAROOTDIR/doc/unbound]
1561  --htmldir=DIR           html documentation [DOCDIR]
1562  --dvidir=DIR            dvi documentation [DOCDIR]
1563  --pdfdir=DIR            pdf documentation [DOCDIR]
1564  --psdir=DIR             ps documentation [DOCDIR]
1565_ACEOF
1566
1567  cat <<\_ACEOF
1568
1569System types:
1570  --build=BUILD     configure for building on BUILD [guessed]
1571  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1572_ACEOF
1573fi
1574
1575if test -n "$ac_init_help"; then
1576  case $ac_init_help in
1577     short | recursive ) echo "Configuration of unbound 1.20.0:";;
1578   esac
1579  cat <<\_ACEOF
1580
1581Optional Features:
1582  --disable-option-checking  ignore unrecognized --enable/--with options
1583  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1584  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1585  --enable-checking       Enable warnings, asserts, makefile-dependencies
1586  --enable-debug          same as enable-checking
1587  --disable-flto          Disable link-time optimization (gcc specific option)
1588  --enable-pie            Enable Position-Independent Executable (eg. to fully
1589                          benefit from ASLR, small performance penalty)
1590  --enable-relro-now      Enable full relocation binding at load-time (RELRO
1591                          NOW, to protect GOT and .dtor areas)
1592  --enable-shared[=PKGS]  build shared libraries [default=yes]
1593  --enable-static[=PKGS]  build static libraries [default=yes]
1594  --enable-fast-install[=PKGS]
1595                          optimize for fast installation [default=yes]
1596  --disable-libtool-lock  avoid locking (might break parallel builds)
1597  --disable-rpath         disable hardcoded rpath (default=enabled)
1598  --disable-largefile     omit support for large files
1599  --enable-systemd        compile with systemd support
1600  --enable-alloc-checks   enable to memory allocation statistics, for debug
1601                          purposes
1602  --enable-alloc-lite     enable for lightweight alloc assertions, for debug
1603                          purposes
1604  --enable-alloc-nonregional
1605                          enable nonregional allocs, slow but exposes regional
1606                          allocations to other memory purifiers, for debug
1607                          purposes
1608  --disable-swig-version-check
1609                          Disable swig version check to build python modules
1610                          with older swig even though that is unreliable
1611  --disable-sha1          Disable SHA1 RRSIG support, does not disable nsec3
1612                          support
1613  --disable-sha2          Disable SHA256 and SHA512 RRSIG support
1614  --enable-subnet         Enable client subnet
1615  --disable-gost          Disable GOST support
1616  --disable-ecdsa         Disable ECDSA support
1617  --disable-dsa           Disable DSA support
1618  --disable-ed25519       Disable ED25519 support
1619  --disable-ed448         Disable ED448 support
1620  --enable-event-api      Enable (experimental) pluggable event base
1621                          libunbound API installed to unbound-event.h
1622  --enable-tfo-client     Enable TCP Fast Open for client mode
1623  --enable-tfo-server     Enable TCP Fast Open for server mode
1624  --enable-static-exe     enable to compile executables statically against
1625                          (event) uninstalled libs, for debug purposes
1626  --enable-fully-static   enable to compile fully static
1627  --enable-lock-checks    enable to check lock and unlock calls, for debug
1628                          purposes
1629  --enable-allsymbols     export all symbols from libunbound and link binaries
1630                          to it, smaller install size but libunbound export
1631                          table is polluted by internal symbols
1632  --enable-dnstap         Enable dnstap support (requires protobuf-c)
1633  --enable-dnscrypt       Enable dnscrypt support (requires libsodium)
1634  --enable-cachedb        enable cachedb module that can use external cache
1635                          storage
1636  --enable-ipsecmod       Enable ipsecmod module that facilitates
1637                          opportunistic IPsec
1638  --enable-ipset          enable ipset module
1639  --disable-explicit-port-randomisation
1640                          disable explicit source port randomisation and rely
1641                          on the kernel to provide random source ports
1642  --enable-linux-ip-local-port-range
1643                          Define this to enable use of
1644                          /proc/sys/net/ipv4/ip_local_port_range as a default
1645                          outgoing port range. This is only for the libunbound
1646                          on Linux and does not affect unbound resolving
1647                          daemon itself. This may severely limit the number of
1648                          available outgoing ports and thus decrease
1649                          randomness. Define this only when the target system
1650                          restricts (e.g. some of SELinux enabled
1651                          distributions) the use of non-ephemeral ports.
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-dnstap-socket-path=pathname
1712                          set default dnstap socket path
1713  --with-protobuf-c=path  Path where protobuf-c is installed, for dnstap
1714  --with-libsodium=path   Path where libsodium is installed, for dnscrypt
1715  --with-libmnl=path      specify explicit path for libmnl.
1716  --with-libunbound-only  do not build daemon and tool programs
1717
1718Some influential environment variables:
1719  CC          C compiler command
1720  CFLAGS      C compiler flags
1721  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
1722              nonstandard directory <lib dir>
1723  LIBS        libraries to pass to the linker, e.g. -l<library>
1724  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1725              you have headers in a nonstandard directory <include dir>
1726  YACC        The `Yet Another Compiler Compiler' implementation to use.
1727              Defaults to the first program found out of: `bison -y', `byacc',
1728              `yacc'.
1729  YFLAGS      The list of arguments that will be passed by default to $YACC.
1730              This script will default YFLAGS to the empty string to avoid a
1731              default value of `-d' given by some make applications.
1732  LT_SYS_LIBRARY_PATH
1733              User-defined run-time library search path.
1734  PKG_CONFIG  path to pkg-config utility
1735  PKG_CONFIG_PATH
1736              directories to add to pkg-config's search path
1737  PKG_CONFIG_LIBDIR
1738              path overriding pkg-config's built-in search path
1739  CPP         C preprocessor
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  PYTHON_VERSION
1749              The installed Python version to use, for example '2.3'. This
1750              string will be appended to the Python interpreter canonical
1751              name.
1752  PROTOBUFC_CFLAGS
1753              C compiler flags for PROTOBUFC, overriding pkg-config
1754  PROTOBUFC_LIBS
1755              linker flags for PROTOBUFC, overriding pkg-config
1756
1757Use these variables to override the choices made by `configure' or to help
1758it to find libraries and programs with nonstandard names/locations.
1759
1760Report bugs to <unbound-bugs@nlnetlabs.nl or https://github.com/NLnetLabs/unbound/issues>.
1761_ACEOF
1762ac_status=$?
1763fi
1764
1765if test "$ac_init_help" = "recursive"; then
1766  # If there are subdirs, report their specific --help.
1767  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1768    test -d "$ac_dir" ||
1769      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1770      continue
1771    ac_builddir=.
1772
1773case "$ac_dir" in
1774.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1775*)
1776  ac_dir_suffix=/`printf "%s\n" "$ac_dir" | sed 's|^\.[\\/]||'`
1777  # A ".." for each directory in $ac_dir_suffix.
1778  ac_top_builddir_sub=`printf "%s\n" "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1779  case $ac_top_builddir_sub in
1780  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1781  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1782  esac ;;
1783esac
1784ac_abs_top_builddir=$ac_pwd
1785ac_abs_builddir=$ac_pwd$ac_dir_suffix
1786# for backward compatibility:
1787ac_top_builddir=$ac_top_build_prefix
1788
1789case $srcdir in
1790  .)  # We are building in place.
1791    ac_srcdir=.
1792    ac_top_srcdir=$ac_top_builddir_sub
1793    ac_abs_top_srcdir=$ac_pwd ;;
1794  [\\/]* | ?:[\\/]* )  # Absolute name.
1795    ac_srcdir=$srcdir$ac_dir_suffix;
1796    ac_top_srcdir=$srcdir
1797    ac_abs_top_srcdir=$srcdir ;;
1798  *) # Relative name.
1799    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1800    ac_top_srcdir=$ac_top_build_prefix$srcdir
1801    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1802esac
1803ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1804
1805    cd "$ac_dir" || { ac_status=$?; continue; }
1806    # Check for configure.gnu first; this name is used for a wrapper for
1807    # Metaconfig's "Configure" on case-insensitive file systems.
1808    if test -f "$ac_srcdir/configure.gnu"; then
1809      echo &&
1810      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1811    elif test -f "$ac_srcdir/configure"; then
1812      echo &&
1813      $SHELL "$ac_srcdir/configure" --help=recursive
1814    else
1815      printf "%s\n" "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1816    fi || ac_status=$?
1817    cd "$ac_pwd" || { ac_status=$?; break; }
1818  done
1819fi
1820
1821test -n "$ac_init_help" && exit $ac_status
1822if $ac_init_version; then
1823  cat <<\_ACEOF
1824unbound configure 1.20.0
1825generated by GNU Autoconf 2.71
1826
1827Copyright (C) 2021 Free Software Foundation, Inc.
1828This configure script is free software; the Free Software Foundation
1829gives unlimited permission to copy, distribute and modify it.
1830_ACEOF
1831  exit
1832fi
1833
1834## ------------------------ ##
1835## Autoconf initialization. ##
1836## ------------------------ ##
1837
1838# ac_fn_c_try_compile LINENO
1839# --------------------------
1840# Try to compile conftest.$ac_ext, and return whether this succeeded.
1841ac_fn_c_try_compile ()
1842{
1843  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1844  rm -f conftest.$ac_objext conftest.beam
1845  if { { ac_try="$ac_compile"
1846case "(($ac_try" in
1847  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1848  *) ac_try_echo=$ac_try;;
1849esac
1850eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1851printf "%s\n" "$ac_try_echo"; } >&5
1852  (eval "$ac_compile") 2>conftest.err
1853  ac_status=$?
1854  if test -s conftest.err; then
1855    grep -v '^ *+' conftest.err >conftest.er1
1856    cat conftest.er1 >&5
1857    mv -f conftest.er1 conftest.err
1858  fi
1859  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1860  test $ac_status = 0; } && {
1861	 test -z "$ac_c_werror_flag" ||
1862	 test ! -s conftest.err
1863       } && test -s conftest.$ac_objext
1864then :
1865  ac_retval=0
1866else $as_nop
1867  printf "%s\n" "$as_me: failed program was:" >&5
1868sed 's/^/| /' conftest.$ac_ext >&5
1869
1870	ac_retval=1
1871fi
1872  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1873  as_fn_set_status $ac_retval
1874
1875} # ac_fn_c_try_compile
1876
1877# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1878# -------------------------------------------------------
1879# Tests whether HEADER exists and can be compiled using the include files in
1880# INCLUDES, setting the cache variable VAR accordingly.
1881ac_fn_c_check_header_compile ()
1882{
1883  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1884  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1885printf %s "checking for $2... " >&6; }
1886if eval test \${$3+y}
1887then :
1888  printf %s "(cached) " >&6
1889else $as_nop
1890  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1891/* end confdefs.h.  */
1892$4
1893#include <$2>
1894_ACEOF
1895if ac_fn_c_try_compile "$LINENO"
1896then :
1897  eval "$3=yes"
1898else $as_nop
1899  eval "$3=no"
1900fi
1901rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
1902fi
1903eval ac_res=\$$3
1904	       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1905printf "%s\n" "$ac_res" >&6; }
1906  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1907
1908} # ac_fn_c_check_header_compile
1909
1910# ac_fn_c_try_link LINENO
1911# -----------------------
1912# Try to link conftest.$ac_ext, and return whether this succeeded.
1913ac_fn_c_try_link ()
1914{
1915  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1916  rm -f conftest.$ac_objext conftest.beam conftest$ac_exeext
1917  if { { ac_try="$ac_link"
1918case "(($ac_try" in
1919  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1920  *) ac_try_echo=$ac_try;;
1921esac
1922eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1923printf "%s\n" "$ac_try_echo"; } >&5
1924  (eval "$ac_link") 2>conftest.err
1925  ac_status=$?
1926  if test -s conftest.err; then
1927    grep -v '^ *+' conftest.err >conftest.er1
1928    cat conftest.er1 >&5
1929    mv -f conftest.er1 conftest.err
1930  fi
1931  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1932  test $ac_status = 0; } && {
1933	 test -z "$ac_c_werror_flag" ||
1934	 test ! -s conftest.err
1935       } && test -s conftest$ac_exeext && {
1936	 test "$cross_compiling" = yes ||
1937	 test -x conftest$ac_exeext
1938       }
1939then :
1940  ac_retval=0
1941else $as_nop
1942  printf "%s\n" "$as_me: failed program was:" >&5
1943sed 's/^/| /' conftest.$ac_ext >&5
1944
1945	ac_retval=1
1946fi
1947  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1948  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1949  # interfere with the next link command; also delete a directory that is
1950  # left behind by Apple's compiler.  We do this before executing the actions.
1951  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1952  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1953  as_fn_set_status $ac_retval
1954
1955} # ac_fn_c_try_link
1956
1957# ac_fn_c_check_func LINENO FUNC VAR
1958# ----------------------------------
1959# Tests whether FUNC exists, setting the cache variable VAR accordingly
1960ac_fn_c_check_func ()
1961{
1962  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1963  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1964printf %s "checking for $2... " >&6; }
1965if eval test \${$3+y}
1966then :
1967  printf %s "(cached) " >&6
1968else $as_nop
1969  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1970/* end confdefs.h.  */
1971/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
1972   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
1973#define $2 innocuous_$2
1974
1975/* System header to define __stub macros and hopefully few prototypes,
1976   which can conflict with char $2 (); below.  */
1977
1978#include <limits.h>
1979#undef $2
1980
1981/* Override any GCC internal prototype to avoid an error.
1982   Use char because int might match the return type of a GCC
1983   builtin and then its argument prototype would still apply.  */
1984#ifdef __cplusplus
1985extern "C"
1986#endif
1987char $2 ();
1988/* The GNU C library defines this for functions which it implements
1989    to always fail with ENOSYS.  Some functions are actually named
1990    something starting with __ and the normal name is an alias.  */
1991#if defined __stub_$2 || defined __stub___$2
1992choke me
1993#endif
1994
1995int
1996main (void)
1997{
1998return $2 ();
1999  ;
2000  return 0;
2001}
2002_ACEOF
2003if ac_fn_c_try_link "$LINENO"
2004then :
2005  eval "$3=yes"
2006else $as_nop
2007  eval "$3=no"
2008fi
2009rm -f core conftest.err conftest.$ac_objext conftest.beam \
2010    conftest$ac_exeext conftest.$ac_ext
2011fi
2012eval ac_res=\$$3
2013	       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2014printf "%s\n" "$ac_res" >&6; }
2015  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2016
2017} # ac_fn_c_check_func
2018
2019# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2020# -------------------------------------------
2021# Tests whether TYPE exists after having included INCLUDES, setting cache
2022# variable VAR accordingly.
2023ac_fn_c_check_type ()
2024{
2025  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2026  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2027printf %s "checking for $2... " >&6; }
2028if eval test \${$3+y}
2029then :
2030  printf %s "(cached) " >&6
2031else $as_nop
2032  eval "$3=no"
2033  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2034/* end confdefs.h.  */
2035$4
2036int
2037main (void)
2038{
2039if (sizeof ($2))
2040	 return 0;
2041  ;
2042  return 0;
2043}
2044_ACEOF
2045if ac_fn_c_try_compile "$LINENO"
2046then :
2047  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2048/* end confdefs.h.  */
2049$4
2050int
2051main (void)
2052{
2053if (sizeof (($2)))
2054	    return 0;
2055  ;
2056  return 0;
2057}
2058_ACEOF
2059if ac_fn_c_try_compile "$LINENO"
2060then :
2061
2062else $as_nop
2063  eval "$3=yes"
2064fi
2065rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
2066fi
2067rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
2068fi
2069eval ac_res=\$$3
2070	       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2071printf "%s\n" "$ac_res" >&6; }
2072  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2073
2074} # ac_fn_c_check_type
2075
2076# ac_fn_c_try_cpp LINENO
2077# ----------------------
2078# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2079ac_fn_c_try_cpp ()
2080{
2081  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2082  if { { ac_try="$ac_cpp conftest.$ac_ext"
2083case "(($ac_try" in
2084  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2085  *) ac_try_echo=$ac_try;;
2086esac
2087eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2088printf "%s\n" "$ac_try_echo"; } >&5
2089  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2090  ac_status=$?
2091  if test -s conftest.err; then
2092    grep -v '^ *+' conftest.err >conftest.er1
2093    cat conftest.er1 >&5
2094    mv -f conftest.er1 conftest.err
2095  fi
2096  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2097  test $ac_status = 0; } > conftest.i && {
2098	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2099	 test ! -s conftest.err
2100       }
2101then :
2102  ac_retval=0
2103else $as_nop
2104  printf "%s\n" "$as_me: failed program was:" >&5
2105sed 's/^/| /' conftest.$ac_ext >&5
2106
2107    ac_retval=1
2108fi
2109  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2110  as_fn_set_status $ac_retval
2111
2112} # ac_fn_c_try_cpp
2113
2114# ac_fn_c_try_run LINENO
2115# ----------------------
2116# Try to run conftest.$ac_ext, and return whether this succeeded. Assumes that
2117# executables *can* be run.
2118ac_fn_c_try_run ()
2119{
2120  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2121  if { { ac_try="$ac_link"
2122case "(($ac_try" in
2123  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2124  *) ac_try_echo=$ac_try;;
2125esac
2126eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2127printf "%s\n" "$ac_try_echo"; } >&5
2128  (eval "$ac_link") 2>&5
2129  ac_status=$?
2130  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2131  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2132  { { case "(($ac_try" in
2133  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2134  *) ac_try_echo=$ac_try;;
2135esac
2136eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2137printf "%s\n" "$ac_try_echo"; } >&5
2138  (eval "$ac_try") 2>&5
2139  ac_status=$?
2140  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2141  test $ac_status = 0; }; }
2142then :
2143  ac_retval=0
2144else $as_nop
2145  printf "%s\n" "$as_me: program exited with status $ac_status" >&5
2146       printf "%s\n" "$as_me: failed program was:" >&5
2147sed 's/^/| /' conftest.$ac_ext >&5
2148
2149       ac_retval=$ac_status
2150fi
2151  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2152  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2153  as_fn_set_status $ac_retval
2154
2155} # ac_fn_c_try_run
2156
2157# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2158# --------------------------------------------
2159# Tries to find the compile-time value of EXPR in a program that includes
2160# INCLUDES, setting VAR accordingly. Returns whether the value could be
2161# computed
2162ac_fn_c_compute_int ()
2163{
2164  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2165  if test "$cross_compiling" = yes; then
2166    # Depending upon the size, compute the lo and hi bounds.
2167cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2168/* end confdefs.h.  */
2169$4
2170int
2171main (void)
2172{
2173static int test_array [1 - 2 * !(($2) >= 0)];
2174test_array [0] = 0;
2175return test_array [0];
2176
2177  ;
2178  return 0;
2179}
2180_ACEOF
2181if ac_fn_c_try_compile "$LINENO"
2182then :
2183  ac_lo=0 ac_mid=0
2184  while :; do
2185    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2186/* end confdefs.h.  */
2187$4
2188int
2189main (void)
2190{
2191static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2192test_array [0] = 0;
2193return test_array [0];
2194
2195  ;
2196  return 0;
2197}
2198_ACEOF
2199if ac_fn_c_try_compile "$LINENO"
2200then :
2201  ac_hi=$ac_mid; break
2202else $as_nop
2203  as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2204			if test $ac_lo -le $ac_mid; then
2205			  ac_lo= ac_hi=
2206			  break
2207			fi
2208			as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2209fi
2210rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
2211  done
2212else $as_nop
2213  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2214/* end confdefs.h.  */
2215$4
2216int
2217main (void)
2218{
2219static int test_array [1 - 2 * !(($2) < 0)];
2220test_array [0] = 0;
2221return test_array [0];
2222
2223  ;
2224  return 0;
2225}
2226_ACEOF
2227if ac_fn_c_try_compile "$LINENO"
2228then :
2229  ac_hi=-1 ac_mid=-1
2230  while :; do
2231    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2232/* end confdefs.h.  */
2233$4
2234int
2235main (void)
2236{
2237static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2238test_array [0] = 0;
2239return test_array [0];
2240
2241  ;
2242  return 0;
2243}
2244_ACEOF
2245if ac_fn_c_try_compile "$LINENO"
2246then :
2247  ac_lo=$ac_mid; break
2248else $as_nop
2249  as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2250			if test $ac_mid -le $ac_hi; then
2251			  ac_lo= ac_hi=
2252			  break
2253			fi
2254			as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2255fi
2256rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
2257  done
2258else $as_nop
2259  ac_lo= ac_hi=
2260fi
2261rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
2262fi
2263rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
2264# Binary search between lo and hi bounds.
2265while test "x$ac_lo" != "x$ac_hi"; do
2266  as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2267  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2268/* end confdefs.h.  */
2269$4
2270int
2271main (void)
2272{
2273static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2274test_array [0] = 0;
2275return test_array [0];
2276
2277  ;
2278  return 0;
2279}
2280_ACEOF
2281if ac_fn_c_try_compile "$LINENO"
2282then :
2283  ac_hi=$ac_mid
2284else $as_nop
2285  as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2286fi
2287rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
2288done
2289case $ac_lo in #((
2290?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2291'') ac_retval=1 ;;
2292esac
2293  else
2294    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2295/* end confdefs.h.  */
2296$4
2297static long int longval (void) { return $2; }
2298static unsigned long int ulongval (void) { return $2; }
2299#include <stdio.h>
2300#include <stdlib.h>
2301int
2302main (void)
2303{
2304
2305  FILE *f = fopen ("conftest.val", "w");
2306  if (! f)
2307    return 1;
2308  if (($2) < 0)
2309    {
2310      long int i = longval ();
2311      if (i != ($2))
2312	return 1;
2313      fprintf (f, "%ld", i);
2314    }
2315  else
2316    {
2317      unsigned long int i = ulongval ();
2318      if (i != ($2))
2319	return 1;
2320      fprintf (f, "%lu", i);
2321    }
2322  /* Do not output a trailing newline, as this causes \r\n confusion
2323     on some platforms.  */
2324  return ferror (f) || fclose (f) != 0;
2325
2326  ;
2327  return 0;
2328}
2329_ACEOF
2330if ac_fn_c_try_run "$LINENO"
2331then :
2332  echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2333else $as_nop
2334  ac_retval=1
2335fi
2336rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2337  conftest.$ac_objext conftest.beam conftest.$ac_ext
2338rm -f conftest.val
2339
2340  fi
2341  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2342  as_fn_set_status $ac_retval
2343
2344} # ac_fn_c_compute_int
2345
2346# ac_fn_check_decl LINENO SYMBOL VAR INCLUDES EXTRA-OPTIONS FLAG-VAR
2347# ------------------------------------------------------------------
2348# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2349# accordingly. Pass EXTRA-OPTIONS to the compiler, using FLAG-VAR.
2350ac_fn_check_decl ()
2351{
2352  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2353  as_decl_name=`echo $2|sed 's/ *(.*//'`
2354  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2355printf %s "checking whether $as_decl_name is declared... " >&6; }
2356if eval test \${$3+y}
2357then :
2358  printf %s "(cached) " >&6
2359else $as_nop
2360  as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2361  eval ac_save_FLAGS=\$$6
2362  as_fn_append $6 " $5"
2363  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2364/* end confdefs.h.  */
2365$4
2366int
2367main (void)
2368{
2369#ifndef $as_decl_name
2370#ifdef __cplusplus
2371  (void) $as_decl_use;
2372#else
2373  (void) $as_decl_name;
2374#endif
2375#endif
2376
2377  ;
2378  return 0;
2379}
2380_ACEOF
2381if ac_fn_c_try_compile "$LINENO"
2382then :
2383  eval "$3=yes"
2384else $as_nop
2385  eval "$3=no"
2386fi
2387rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
2388  eval $6=\$ac_save_FLAGS
2389
2390fi
2391eval ac_res=\$$3
2392	       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2393printf "%s\n" "$ac_res" >&6; }
2394  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2395
2396} # ac_fn_check_decl
2397
2398# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2399# ----------------------------------------------------
2400# Tries to find if the field MEMBER exists in type AGGR, after including
2401# INCLUDES, setting cache variable VAR accordingly.
2402ac_fn_c_check_member ()
2403{
2404  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2405  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2406printf %s "checking for $2.$3... " >&6; }
2407if eval test \${$4+y}
2408then :
2409  printf %s "(cached) " >&6
2410else $as_nop
2411  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2412/* end confdefs.h.  */
2413$5
2414int
2415main (void)
2416{
2417static $2 ac_aggr;
2418if (ac_aggr.$3)
2419return 0;
2420  ;
2421  return 0;
2422}
2423_ACEOF
2424if ac_fn_c_try_compile "$LINENO"
2425then :
2426  eval "$4=yes"
2427else $as_nop
2428  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2429/* end confdefs.h.  */
2430$5
2431int
2432main (void)
2433{
2434static $2 ac_aggr;
2435if (sizeof ac_aggr.$3)
2436return 0;
2437  ;
2438  return 0;
2439}
2440_ACEOF
2441if ac_fn_c_try_compile "$LINENO"
2442then :
2443  eval "$4=yes"
2444else $as_nop
2445  eval "$4=no"
2446fi
2447rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
2448fi
2449rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
2450fi
2451eval ac_res=\$$4
2452	       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2453printf "%s\n" "$ac_res" >&6; }
2454  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2455
2456} # ac_fn_c_check_member
2457ac_configure_args_raw=
2458for ac_arg
2459do
2460  case $ac_arg in
2461  *\'*)
2462    ac_arg=`printf "%s\n" "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2463  esac
2464  as_fn_append ac_configure_args_raw " '$ac_arg'"
2465done
2466
2467case $ac_configure_args_raw in
2468  *$as_nl*)
2469    ac_safe_unquote= ;;
2470  *)
2471    ac_unsafe_z='|&;<>()$`\\"*?[ ''	' # This string ends in space, tab.
2472    ac_unsafe_a="$ac_unsafe_z#~"
2473    ac_safe_unquote="s/ '\\([^$ac_unsafe_a][^$ac_unsafe_z]*\\)'/ \\1/g"
2474    ac_configure_args_raw=`      printf "%s\n" "$ac_configure_args_raw" | sed "$ac_safe_unquote"`;;
2475esac
2476
2477cat >config.log <<_ACEOF
2478This file contains any messages produced by compilers while
2479running configure, to aid debugging if configure makes a mistake.
2480
2481It was created by unbound $as_me 1.20.0, which was
2482generated by GNU Autoconf 2.71.  Invocation command line was
2483
2484  $ $0$ac_configure_args_raw
2485
2486_ACEOF
2487exec 5>>config.log
2488{
2489cat <<_ASUNAME
2490## --------- ##
2491## Platform. ##
2492## --------- ##
2493
2494hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2495uname -m = `(uname -m) 2>/dev/null || echo unknown`
2496uname -r = `(uname -r) 2>/dev/null || echo unknown`
2497uname -s = `(uname -s) 2>/dev/null || echo unknown`
2498uname -v = `(uname -v) 2>/dev/null || echo unknown`
2499
2500/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2501/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2502
2503/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2504/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2505/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2506/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2507/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2508/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2509/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2510
2511_ASUNAME
2512
2513as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2514for as_dir in $PATH
2515do
2516  IFS=$as_save_IFS
2517  case $as_dir in #(((
2518    '') as_dir=./ ;;
2519    */) ;;
2520    *) as_dir=$as_dir/ ;;
2521  esac
2522    printf "%s\n" "PATH: $as_dir"
2523  done
2524IFS=$as_save_IFS
2525
2526} >&5
2527
2528cat >&5 <<_ACEOF
2529
2530
2531## ----------- ##
2532## Core tests. ##
2533## ----------- ##
2534
2535_ACEOF
2536
2537
2538# Keep a trace of the command line.
2539# Strip out --no-create and --no-recursion so they do not pile up.
2540# Strip out --silent because we don't want to record it for future runs.
2541# Also quote any args containing shell meta-characters.
2542# Make two passes to allow for proper duplicate-argument suppression.
2543ac_configure_args=
2544ac_configure_args0=
2545ac_configure_args1=
2546ac_must_keep_next=false
2547for ac_pass in 1 2
2548do
2549  for ac_arg
2550  do
2551    case $ac_arg in
2552    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2553    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2554    | -silent | --silent | --silen | --sile | --sil)
2555      continue ;;
2556    *\'*)
2557      ac_arg=`printf "%s\n" "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2558    esac
2559    case $ac_pass in
2560    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2561    2)
2562      as_fn_append ac_configure_args1 " '$ac_arg'"
2563      if test $ac_must_keep_next = true; then
2564	ac_must_keep_next=false # Got value, back to normal.
2565      else
2566	case $ac_arg in
2567	  *=* | --config-cache | -C | -disable-* | --disable-* \
2568	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2569	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2570	  | -with-* | --with-* | -without-* | --without-* | --x)
2571	    case "$ac_configure_args0 " in
2572	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2573	    esac
2574	    ;;
2575	  -* ) ac_must_keep_next=true ;;
2576	esac
2577      fi
2578      as_fn_append ac_configure_args " '$ac_arg'"
2579      ;;
2580    esac
2581  done
2582done
2583{ ac_configure_args0=; unset ac_configure_args0;}
2584{ ac_configure_args1=; unset ac_configure_args1;}
2585
2586# When interrupted or exit'd, cleanup temporary files, and complete
2587# config.log.  We remove comments because anyway the quotes in there
2588# would cause problems or look ugly.
2589# WARNING: Use '\'' to represent an apostrophe within the trap.
2590# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2591trap 'exit_status=$?
2592  # Sanitize IFS.
2593  IFS=" ""	$as_nl"
2594  # Save into config.log some information that might help in debugging.
2595  {
2596    echo
2597
2598    printf "%s\n" "## ---------------- ##
2599## Cache variables. ##
2600## ---------------- ##"
2601    echo
2602    # The following way of writing the cache mishandles newlines in values,
2603(
2604  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2605    eval ac_val=\$$ac_var
2606    case $ac_val in #(
2607    *${as_nl}*)
2608      case $ac_var in #(
2609      *_cv_*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2610printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2611      esac
2612      case $ac_var in #(
2613      _ | IFS | as_nl) ;; #(
2614      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2615      *) { eval $ac_var=; unset $ac_var;} ;;
2616      esac ;;
2617    esac
2618  done
2619  (set) 2>&1 |
2620    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2621    *${as_nl}ac_space=\ *)
2622      sed -n \
2623	"s/'\''/'\''\\\\'\'''\''/g;
2624	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2625      ;; #(
2626    *)
2627      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2628      ;;
2629    esac |
2630    sort
2631)
2632    echo
2633
2634    printf "%s\n" "## ----------------- ##
2635## Output variables. ##
2636## ----------------- ##"
2637    echo
2638    for ac_var in $ac_subst_vars
2639    do
2640      eval ac_val=\$$ac_var
2641      case $ac_val in
2642      *\'\''*) ac_val=`printf "%s\n" "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2643      esac
2644      printf "%s\n" "$ac_var='\''$ac_val'\''"
2645    done | sort
2646    echo
2647
2648    if test -n "$ac_subst_files"; then
2649      printf "%s\n" "## ------------------- ##
2650## File substitutions. ##
2651## ------------------- ##"
2652      echo
2653      for ac_var in $ac_subst_files
2654      do
2655	eval ac_val=\$$ac_var
2656	case $ac_val in
2657	*\'\''*) ac_val=`printf "%s\n" "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2658	esac
2659	printf "%s\n" "$ac_var='\''$ac_val'\''"
2660      done | sort
2661      echo
2662    fi
2663
2664    if test -s confdefs.h; then
2665      printf "%s\n" "## ----------- ##
2666## confdefs.h. ##
2667## ----------- ##"
2668      echo
2669      cat confdefs.h
2670      echo
2671    fi
2672    test "$ac_signal" != 0 &&
2673      printf "%s\n" "$as_me: caught signal $ac_signal"
2674    printf "%s\n" "$as_me: exit $exit_status"
2675  } >&5
2676  rm -f core *.core core.conftest.* &&
2677    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2678    exit $exit_status
2679' 0
2680for ac_signal in 1 2 13 15; do
2681  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2682done
2683ac_signal=0
2684
2685# confdefs.h avoids OS command line length limits that DEFS can exceed.
2686rm -f -r conftest* confdefs.h
2687
2688printf "%s\n" "/* confdefs.h */" > confdefs.h
2689
2690# Predefined preprocessor variables.
2691
2692printf "%s\n" "#define PACKAGE_NAME \"$PACKAGE_NAME\"" >>confdefs.h
2693
2694printf "%s\n" "#define PACKAGE_TARNAME \"$PACKAGE_TARNAME\"" >>confdefs.h
2695
2696printf "%s\n" "#define PACKAGE_VERSION \"$PACKAGE_VERSION\"" >>confdefs.h
2697
2698printf "%s\n" "#define PACKAGE_STRING \"$PACKAGE_STRING\"" >>confdefs.h
2699
2700printf "%s\n" "#define PACKAGE_BUGREPORT \"$PACKAGE_BUGREPORT\"" >>confdefs.h
2701
2702printf "%s\n" "#define PACKAGE_URL \"$PACKAGE_URL\"" >>confdefs.h
2703
2704
2705# Let the site file select an alternate cache file if it wants to.
2706# Prefer an explicitly selected file to automatically selected ones.
2707if test -n "$CONFIG_SITE"; then
2708  ac_site_files="$CONFIG_SITE"
2709elif test "x$prefix" != xNONE; then
2710  ac_site_files="$prefix/share/config.site $prefix/etc/config.site"
2711else
2712  ac_site_files="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
2713fi
2714
2715for ac_site_file in $ac_site_files
2716do
2717  case $ac_site_file in #(
2718  */*) :
2719     ;; #(
2720  *) :
2721    ac_site_file=./$ac_site_file ;;
2722esac
2723  if test -f "$ac_site_file" && test -r "$ac_site_file"; then
2724    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2725printf "%s\n" "$as_me: loading site script $ac_site_file" >&6;}
2726    sed 's/^/| /' "$ac_site_file" >&5
2727    . "$ac_site_file" \
2728      || { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2729printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
2730as_fn_error $? "failed to load site script $ac_site_file
2731See \`config.log' for more details" "$LINENO" 5; }
2732  fi
2733done
2734
2735if test -r "$cache_file"; then
2736  # Some versions of bash will fail to source /dev/null (special files
2737  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
2738  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2739    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2740printf "%s\n" "$as_me: loading cache $cache_file" >&6;}
2741    case $cache_file in
2742      [\\/]* | ?:[\\/]* ) . "$cache_file";;
2743      *)                      . "./$cache_file";;
2744    esac
2745  fi
2746else
2747  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2748printf "%s\n" "$as_me: creating cache $cache_file" >&6;}
2749  >$cache_file
2750fi
2751
2752as_fn_append ac_header_c_list " stdio.h stdio_h HAVE_STDIO_H"
2753# Test code for whether the C compiler supports C89 (global declarations)
2754ac_c_conftest_c89_globals='
2755/* Does the compiler advertise C89 conformance?
2756   Do not test the value of __STDC__, because some compilers set it to 0
2757   while being otherwise adequately conformant. */
2758#if !defined __STDC__
2759# error "Compiler does not advertise C89 conformance"
2760#endif
2761
2762#include <stddef.h>
2763#include <stdarg.h>
2764struct stat;
2765/* Most of the following tests are stolen from RCS 5.7 src/conf.sh.  */
2766struct buf { int x; };
2767struct buf * (*rcsopen) (struct buf *, struct stat *, int);
2768static char *e (p, i)
2769     char **p;
2770     int i;
2771{
2772  return p[i];
2773}
2774static char *f (char * (*g) (char **, int), char **p, ...)
2775{
2776  char *s;
2777  va_list v;
2778  va_start (v,p);
2779  s = g (p, va_arg (v,int));
2780  va_end (v);
2781  return s;
2782}
2783
2784/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
2785   function prototypes and stuff, but not \xHH hex character constants.
2786   These do not provoke an error unfortunately, instead are silently treated
2787   as an "x".  The following induces an error, until -std is added to get
2788   proper ANSI mode.  Curiously \x00 != x always comes out true, for an
2789   array size at least.  It is necessary to write \x00 == 0 to get something
2790   that is true only with -std.  */
2791int osf4_cc_array ['\''\x00'\'' == 0 ? 1 : -1];
2792
2793/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
2794   inside strings and character constants.  */
2795#define FOO(x) '\''x'\''
2796int xlc6_cc_array[FOO(a) == '\''x'\'' ? 1 : -1];
2797
2798int test (int i, double x);
2799struct s1 {int (*f) (int a);};
2800struct s2 {int (*f) (double a);};
2801int pairnames (int, char **, int *(*)(struct buf *, struct stat *, int),
2802               int, int);'
2803
2804# Test code for whether the C compiler supports C89 (body of main).
2805ac_c_conftest_c89_main='
2806ok |= (argc == 0 || f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]);
2807'
2808
2809# Test code for whether the C compiler supports C99 (global declarations)
2810ac_c_conftest_c99_globals='
2811// Does the compiler advertise C99 conformance?
2812#if !defined __STDC_VERSION__ || __STDC_VERSION__ < 199901L
2813# error "Compiler does not advertise C99 conformance"
2814#endif
2815
2816#include <stdbool.h>
2817extern int puts (const char *);
2818extern int printf (const char *, ...);
2819extern int dprintf (int, const char *, ...);
2820extern void *malloc (size_t);
2821
2822// Check varargs macros.  These examples are taken from C99 6.10.3.5.
2823// dprintf is used instead of fprintf to avoid needing to declare
2824// FILE and stderr.
2825#define debug(...) dprintf (2, __VA_ARGS__)
2826#define showlist(...) puts (#__VA_ARGS__)
2827#define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__))
2828static void
2829test_varargs_macros (void)
2830{
2831  int x = 1234;
2832  int y = 5678;
2833  debug ("Flag");
2834  debug ("X = %d\n", x);
2835  showlist (The first, second, and third items.);
2836  report (x>y, "x is %d but y is %d", x, y);
2837}
2838
2839// Check long long types.
2840#define BIG64 18446744073709551615ull
2841#define BIG32 4294967295ul
2842#define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0)
2843#if !BIG_OK
2844  #error "your preprocessor is broken"
2845#endif
2846#if BIG_OK
2847#else
2848  #error "your preprocessor is broken"
2849#endif
2850static long long int bignum = -9223372036854775807LL;
2851static unsigned long long int ubignum = BIG64;
2852
2853struct incomplete_array
2854{
2855  int datasize;
2856  double data[];
2857};
2858
2859struct named_init {
2860  int number;
2861  const wchar_t *name;
2862  double average;
2863};
2864
2865typedef const char *ccp;
2866
2867static inline int
2868test_restrict (ccp restrict text)
2869{
2870  // See if C++-style comments work.
2871  // Iterate through items via the restricted pointer.
2872  // Also check for declarations in for loops.
2873  for (unsigned int i = 0; *(text+i) != '\''\0'\''; ++i)
2874    continue;
2875  return 0;
2876}
2877
2878// Check varargs and va_copy.
2879static bool
2880test_varargs (const char *format, ...)
2881{
2882  va_list args;
2883  va_start (args, format);
2884  va_list args_copy;
2885  va_copy (args_copy, args);
2886
2887  const char *str = "";
2888  int number = 0;
2889  float fnumber = 0;
2890
2891  while (*format)
2892    {
2893      switch (*format++)
2894	{
2895	case '\''s'\'': // string
2896	  str = va_arg (args_copy, const char *);
2897	  break;
2898	case '\''d'\'': // int
2899	  number = va_arg (args_copy, int);
2900	  break;
2901	case '\''f'\'': // float
2902	  fnumber = va_arg (args_copy, double);
2903	  break;
2904	default:
2905	  break;
2906	}
2907    }
2908  va_end (args_copy);
2909  va_end (args);
2910
2911  return *str && number && fnumber;
2912}
2913'
2914
2915# Test code for whether the C compiler supports C99 (body of main).
2916ac_c_conftest_c99_main='
2917  // Check bool.
2918  _Bool success = false;
2919  success |= (argc != 0);
2920
2921  // Check restrict.
2922  if (test_restrict ("String literal") == 0)
2923    success = true;
2924  char *restrict newvar = "Another string";
2925
2926  // Check varargs.
2927  success &= test_varargs ("s, d'\'' f .", "string", 65, 34.234);
2928  test_varargs_macros ();
2929
2930  // Check flexible array members.
2931  struct incomplete_array *ia =
2932    malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10));
2933  ia->datasize = 10;
2934  for (int i = 0; i < ia->datasize; ++i)
2935    ia->data[i] = i * 1.234;
2936
2937  // Check named initializers.
2938  struct named_init ni = {
2939    .number = 34,
2940    .name = L"Test wide string",
2941    .average = 543.34343,
2942  };
2943
2944  ni.number = 58;
2945
2946  int dynamic_array[ni.number];
2947  dynamic_array[0] = argv[0][0];
2948  dynamic_array[ni.number - 1] = 543;
2949
2950  // work around unused variable warnings
2951  ok |= (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == '\''x'\''
2952	 || dynamic_array[ni.number - 1] != 543);
2953'
2954
2955# Test code for whether the C compiler supports C11 (global declarations)
2956ac_c_conftest_c11_globals='
2957// Does the compiler advertise C11 conformance?
2958#if !defined __STDC_VERSION__ || __STDC_VERSION__ < 201112L
2959# error "Compiler does not advertise C11 conformance"
2960#endif
2961
2962// Check _Alignas.
2963char _Alignas (double) aligned_as_double;
2964char _Alignas (0) no_special_alignment;
2965extern char aligned_as_int;
2966char _Alignas (0) _Alignas (int) aligned_as_int;
2967
2968// Check _Alignof.
2969enum
2970{
2971  int_alignment = _Alignof (int),
2972  int_array_alignment = _Alignof (int[100]),
2973  char_alignment = _Alignof (char)
2974};
2975_Static_assert (0 < -_Alignof (int), "_Alignof is signed");
2976
2977// Check _Noreturn.
2978int _Noreturn does_not_return (void) { for (;;) continue; }
2979
2980// Check _Static_assert.
2981struct test_static_assert
2982{
2983  int x;
2984  _Static_assert (sizeof (int) <= sizeof (long int),
2985                  "_Static_assert does not work in struct");
2986  long int y;
2987};
2988
2989// Check UTF-8 literals.
2990#define u8 syntax error!
2991char const utf8_literal[] = u8"happens to be ASCII" "another string";
2992
2993// Check duplicate typedefs.
2994typedef long *long_ptr;
2995typedef long int *long_ptr;
2996typedef long_ptr long_ptr;
2997
2998// Anonymous structures and unions -- taken from C11 6.7.2.1 Example 1.
2999struct anonymous
3000{
3001  union {
3002    struct { int i; int j; };
3003    struct { int k; long int l; } w;
3004  };
3005  int m;
3006} v1;
3007'
3008
3009# Test code for whether the C compiler supports C11 (body of main).
3010ac_c_conftest_c11_main='
3011  _Static_assert ((offsetof (struct anonymous, i)
3012		   == offsetof (struct anonymous, w.k)),
3013		  "Anonymous union alignment botch");
3014  v1.i = 2;
3015  v1.w.k = 5;
3016  ok |= v1.i != 5;
3017'
3018
3019# Test code for whether the C compiler supports C11 (complete).
3020ac_c_conftest_c11_program="${ac_c_conftest_c89_globals}
3021${ac_c_conftest_c99_globals}
3022${ac_c_conftest_c11_globals}
3023
3024int
3025main (int argc, char **argv)
3026{
3027  int ok = 0;
3028  ${ac_c_conftest_c89_main}
3029  ${ac_c_conftest_c99_main}
3030  ${ac_c_conftest_c11_main}
3031  return ok;
3032}
3033"
3034
3035# Test code for whether the C compiler supports C99 (complete).
3036ac_c_conftest_c99_program="${ac_c_conftest_c89_globals}
3037${ac_c_conftest_c99_globals}
3038
3039int
3040main (int argc, char **argv)
3041{
3042  int ok = 0;
3043  ${ac_c_conftest_c89_main}
3044  ${ac_c_conftest_c99_main}
3045  return ok;
3046}
3047"
3048
3049# Test code for whether the C compiler supports C89 (complete).
3050ac_c_conftest_c89_program="${ac_c_conftest_c89_globals}
3051
3052int
3053main (int argc, char **argv)
3054{
3055  int ok = 0;
3056  ${ac_c_conftest_c89_main}
3057  return ok;
3058}
3059"
3060
3061as_fn_append ac_header_c_list " stdlib.h stdlib_h HAVE_STDLIB_H"
3062as_fn_append ac_header_c_list " string.h string_h HAVE_STRING_H"
3063as_fn_append ac_header_c_list " inttypes.h inttypes_h HAVE_INTTYPES_H"
3064as_fn_append ac_header_c_list " stdint.h stdint_h HAVE_STDINT_H"
3065as_fn_append ac_header_c_list " strings.h strings_h HAVE_STRINGS_H"
3066as_fn_append ac_header_c_list " sys/stat.h sys_stat_h HAVE_SYS_STAT_H"
3067as_fn_append ac_header_c_list " sys/types.h sys_types_h HAVE_SYS_TYPES_H"
3068as_fn_append ac_header_c_list " unistd.h unistd_h HAVE_UNISTD_H"
3069as_fn_append ac_header_c_list " wchar.h wchar_h HAVE_WCHAR_H"
3070as_fn_append ac_header_c_list " minix/config.h minix_config_h HAVE_MINIX_CONFIG_H"
3071as_fn_append ac_header_c_list " vfork.h vfork_h HAVE_VFORK_H"
3072as_fn_append ac_func_c_list " fork HAVE_FORK"
3073as_fn_append ac_func_c_list " vfork HAVE_VFORK"
3074
3075# Auxiliary files required by this configure script.
3076ac_aux_files="ltmain.sh config.guess config.sub"
3077
3078# Locations in which to look for auxiliary files.
3079ac_aux_dir_candidates="${srcdir}${PATH_SEPARATOR}${srcdir}/..${PATH_SEPARATOR}${srcdir}/../.."
3080
3081# Search for a directory containing all of the required auxiliary files,
3082# $ac_aux_files, from the $PATH-style list $ac_aux_dir_candidates.
3083# If we don't find one directory that contains all the files we need,
3084# we report the set of missing files from the *first* directory in
3085# $ac_aux_dir_candidates and give up.
3086ac_missing_aux_files=""
3087ac_first_candidate=:
3088printf "%s\n" "$as_me:${as_lineno-$LINENO}: looking for aux files: $ac_aux_files" >&5
3089as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3090as_found=false
3091for as_dir in $ac_aux_dir_candidates
3092do
3093  IFS=$as_save_IFS
3094  case $as_dir in #(((
3095    '') as_dir=./ ;;
3096    */) ;;
3097    *) as_dir=$as_dir/ ;;
3098  esac
3099  as_found=:
3100
3101  printf "%s\n" "$as_me:${as_lineno-$LINENO}:  trying $as_dir" >&5
3102  ac_aux_dir_found=yes
3103  ac_install_sh=
3104  for ac_aux in $ac_aux_files
3105  do
3106    # As a special case, if "install-sh" is required, that requirement
3107    # can be satisfied by any of "install-sh", "install.sh", or "shtool",
3108    # and $ac_install_sh is set appropriately for whichever one is found.
3109    if test x"$ac_aux" = x"install-sh"
3110    then
3111      if test -f "${as_dir}install-sh"; then
3112        printf "%s\n" "$as_me:${as_lineno-$LINENO}:   ${as_dir}install-sh found" >&5
3113        ac_install_sh="${as_dir}install-sh -c"
3114      elif test -f "${as_dir}install.sh"; then
3115        printf "%s\n" "$as_me:${as_lineno-$LINENO}:   ${as_dir}install.sh found" >&5
3116        ac_install_sh="${as_dir}install.sh -c"
3117      elif test -f "${as_dir}shtool"; then
3118        printf "%s\n" "$as_me:${as_lineno-$LINENO}:   ${as_dir}shtool found" >&5
3119        ac_install_sh="${as_dir}shtool install -c"
3120      else
3121        ac_aux_dir_found=no
3122        if $ac_first_candidate; then
3123          ac_missing_aux_files="${ac_missing_aux_files} install-sh"
3124        else
3125          break
3126        fi
3127      fi
3128    else
3129      if test -f "${as_dir}${ac_aux}"; then
3130        printf "%s\n" "$as_me:${as_lineno-$LINENO}:   ${as_dir}${ac_aux} found" >&5
3131      else
3132        ac_aux_dir_found=no
3133        if $ac_first_candidate; then
3134          ac_missing_aux_files="${ac_missing_aux_files} ${ac_aux}"
3135        else
3136          break
3137        fi
3138      fi
3139    fi
3140  done
3141  if test "$ac_aux_dir_found" = yes; then
3142    ac_aux_dir="$as_dir"
3143    break
3144  fi
3145  ac_first_candidate=false
3146
3147  as_found=false
3148done
3149IFS=$as_save_IFS
3150if $as_found
3151then :
3152
3153else $as_nop
3154  as_fn_error $? "cannot find required auxiliary files:$ac_missing_aux_files" "$LINENO" 5
3155fi
3156
3157
3158# These three variables are undocumented and unsupported,
3159# and are intended to be withdrawn in a future Autoconf release.
3160# They can cause serious problems if a builder's source tree is in a directory
3161# whose full name contains unusual characters.
3162if test -f "${ac_aux_dir}config.guess"; then
3163  ac_config_guess="$SHELL ${ac_aux_dir}config.guess"
3164fi
3165if test -f "${ac_aux_dir}config.sub"; then
3166  ac_config_sub="$SHELL ${ac_aux_dir}config.sub"
3167fi
3168if test -f "$ac_aux_dir/configure"; then
3169  ac_configure="$SHELL ${ac_aux_dir}configure"
3170fi
3171
3172# Check that the precious variables saved in the cache have kept the same
3173# value.
3174ac_cache_corrupted=false
3175for ac_var in $ac_precious_vars; do
3176  eval ac_old_set=\$ac_cv_env_${ac_var}_set
3177  eval ac_new_set=\$ac_env_${ac_var}_set
3178  eval ac_old_val=\$ac_cv_env_${ac_var}_value
3179  eval ac_new_val=\$ac_env_${ac_var}_value
3180  case $ac_old_set,$ac_new_set in
3181    set,)
3182      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
3183printf "%s\n" "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
3184      ac_cache_corrupted=: ;;
3185    ,set)
3186      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
3187printf "%s\n" "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
3188      ac_cache_corrupted=: ;;
3189    ,);;
3190    *)
3191      if test "x$ac_old_val" != "x$ac_new_val"; then
3192	# differences in whitespace do not lead to failure.
3193	ac_old_val_w=`echo x $ac_old_val`
3194	ac_new_val_w=`echo x $ac_new_val`
3195	if test "$ac_old_val_w" != "$ac_new_val_w"; then
3196	  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
3197printf "%s\n" "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
3198	  ac_cache_corrupted=:
3199	else
3200	  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
3201printf "%s\n" "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
3202	  eval $ac_var=\$ac_old_val
3203	fi
3204	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
3205printf "%s\n" "$as_me:   former value:  \`$ac_old_val'" >&2;}
3206	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
3207printf "%s\n" "$as_me:   current value: \`$ac_new_val'" >&2;}
3208      fi;;
3209  esac
3210  # Pass precious variables to config.status.
3211  if test "$ac_new_set" = set; then
3212    case $ac_new_val in
3213    *\'*) ac_arg=$ac_var=`printf "%s\n" "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
3214    *) ac_arg=$ac_var=$ac_new_val ;;
3215    esac
3216    case " $ac_configure_args " in
3217      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
3218      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
3219    esac
3220  fi
3221done
3222if $ac_cache_corrupted; then
3223  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3224printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
3225  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
3226printf "%s\n" "$as_me: error: changes in the environment can compromise the build" >&2;}
3227  as_fn_error $? "run \`${MAKE-make} distclean' and/or \`rm $cache_file'
3228	    and start over" "$LINENO" 5
3229fi
3230## -------------------- ##
3231## Main body of script. ##
3232## -------------------- ##
3233
3234ac_ext=c
3235ac_cpp='$CPP $CPPFLAGS'
3236ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3237ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3238ac_compiler_gnu=$ac_cv_c_compiler_gnu
3239
3240
3241UNBOUND_VERSION_MAJOR=1
3242
3243UNBOUND_VERSION_MINOR=20
3244
3245UNBOUND_VERSION_MICRO=0
3246
3247
3248LIBUNBOUND_CURRENT=9
3249LIBUNBOUND_REVISION=27
3250LIBUNBOUND_AGE=1
3251# 1.0.0 had 0:12:0
3252# 1.0.1 had 0:13:0
3253# 1.0.2 had 0:14:0
3254# 1.1.0 had 0:15:0
3255# 1.1.1 had 0:16:0
3256# 1.2.0 had 0:17:0
3257# 1.2.1 had 0:18:0
3258# 1.3.0 had 1:0:0   # ub_cancel and -export-symbols.
3259# 1.3.1 had 1:1:0
3260# 1.3.2 had 1:2:0
3261# 1.3.3 had 1:3:0
3262# 1.3.4 had 1:4:0
3263# 1.4.0-snapshots had 1:5:0
3264# 1.4.0 had 1:5:0 (not 2:0:0)   # ub_result.why_bogus
3265# 1.4.1 had 2:1:0
3266# 1.4.2 had 2:2:0
3267# 1.4.3 had 2:3:0
3268# 1.4.4 had 2:4:0
3269# 1.4.5 had 2:5:0
3270# 1.4.6 had 2:6:0
3271# 1.4.7 had 2:7:0
3272# 1.4.8 had 2:8:0
3273# 1.4.9 had 2:9:0
3274# 1.4.10 had 2:10:0
3275# 1.4.11 had 2:11:0
3276# 1.4.12 had 2:12:0
3277# 1.4.13 had 2:13:0
3278# and 1.4.13p1 and 1.4.13.p2
3279# 1.4.14 had 2:14:0
3280# 1.4.15 had 3:0:1 # adds ub_version()
3281# 1.4.16 had 3:1:1
3282# 1.4.17 had 3:2:1
3283# 1.4.18 had 3:3:1
3284# 1.4.19 had 3:4:1
3285# 1.4.20 had 4:0:2 # adds libunbound.ttl # but shipped 3:5:1
3286# 1.4.21 had 4:1:2
3287# 1.4.22 had 4:1:2
3288# 1.5.0 had 5:3:3 # adds ub_ctx_add_ta_autr
3289# 1.5.1 had 5:3:3
3290# 1.5.2 had 5:5:3
3291# 1.5.3 had 5:6:3
3292# 1.5.4 had 5:7:3
3293# 1.5.5 had 5:8:3
3294# 1.5.6 had 5:9:3
3295# 1.5.7 had 5:10:3
3296# 1.5.8 had 6:0:4 # adds ub_ctx_set_stub
3297# 1.5.9 had 6:1:4
3298# 1.5.10 had 6:2:4
3299# 1.6.0 had 6:3:4
3300# 1.6.1 had 7:0:5 # ub_callback_t typedef renamed to ub_callback_type
3301# 1.6.2 had 7:1:5
3302# 1.6.3 had 7:2:5
3303# 1.6.4 had 7:3:5
3304# 1.6.5 had 7:4:5
3305# 1.6.6 had 7:5:5
3306# 1.6.7 had 7:6:5
3307# 1.6.8 had 7:7:5
3308# 1.7.0 had 7:8:5
3309# 1.7.1 had 7:9:5
3310# 1.7.2 had 7:10:5
3311# 1.7.3 had 7:11:5
3312# 1.8.0 had 8:0:0 # changes the event callback function signature
3313# 1.8.1 had 8:1:0
3314# 1.8.2 had 8:2:0
3315# 1.8.3 had 8:3:0
3316# 1.9.0 had 9:0:1 # add ub_ctx_set_tls
3317# 1.9.1 had 9:1:1
3318# 1.9.2 had 9:2:1
3319# 1.9.3 had 9:3:1
3320# 1.9.4 had 9:4:1
3321# 1.9.5 had 9:5:1
3322# 1.9.6 had 9:6:1
3323# 1.10.0 had 9:7:1
3324# 1.10.1 had 9:8:1
3325# 1.11.0 had 9:9:1
3326# 1.12.0 had 9:10:1
3327# 1.13.0 had 9:11:1
3328# 1.13.1 had 9:12:1
3329# 1.13.2 had 9:13:1
3330# 1.14.0 had 9:14:1
3331# 1.15.0 had 9:15:1
3332# 1.16.0 had 9:16:1
3333# 1.16.1 had 9:17:1
3334# 1.16.2 had 9:18:1
3335# 1.16.3 had 9:19:1
3336# 1.17.0 had 9:20:1
3337# 1.17.1 had 9:21:1
3338# 1.18.0 had 9:22:1
3339# 1.19.0 had 9:23:1
3340# 1.19.1 had 9:24:1
3341# 1.19.2 had 9:25:1
3342# 1.19.3 had 9:26:1
3343# 1.20.0 had 9:27:1
3344
3345#   Current  -- the number of the binary API that we're implementing
3346#   Revision -- which iteration of the implementation of the binary
3347#               API are we supplying?
3348#   Age      -- How many previous binary API versions do we also
3349#               support?
3350#
3351# If we release a new version that does not change the binary API,
3352# increment Revision.
3353#
3354# If we release a new version that changes the binary API, but does
3355# not break programs compiled against the old binary API, increment
3356# Current and Age.  Set Revision to 0, since this is the first
3357# implementation of the new API.
3358#
3359# Otherwise, we're changing the binary API and breaking backward
3360# compatibility with old binaries.  Increment Current.  Set Age to 0,
3361# since we're backward compatible with no previous APIs.  Set Revision
3362# to 0 too.
3363
3364
3365
3366
3367
3368cmdln="`echo $@ | sed -e 's/\\\\/\\\\\\\\/g' | sed -e 's/"/\\\\"/'g`"
3369
3370printf "%s\n" "#define CONFCMDLINE \"$cmdln\"" >>confdefs.h
3371
3372
3373CFLAGS="$CFLAGS"
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383ac_ext=c
3384ac_cpp='$CPP $CPPFLAGS'
3385ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3386ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3387ac_compiler_gnu=$ac_cv_c_compiler_gnu
3388if test -n "$ac_tool_prefix"; then
3389  # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3390set dummy ${ac_tool_prefix}gcc; ac_word=$2
3391{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3392printf %s "checking for $ac_word... " >&6; }
3393if test ${ac_cv_prog_CC+y}
3394then :
3395  printf %s "(cached) " >&6
3396else $as_nop
3397  if test -n "$CC"; then
3398  ac_cv_prog_CC="$CC" # Let the user override the test.
3399else
3400as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3401for as_dir in $PATH
3402do
3403  IFS=$as_save_IFS
3404  case $as_dir in #(((
3405    '') as_dir=./ ;;
3406    */) ;;
3407    *) as_dir=$as_dir/ ;;
3408  esac
3409    for ac_exec_ext in '' $ac_executable_extensions; do
3410  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
3411    ac_cv_prog_CC="${ac_tool_prefix}gcc"
3412    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
3413    break 2
3414  fi
3415done
3416  done
3417IFS=$as_save_IFS
3418
3419fi
3420fi
3421CC=$ac_cv_prog_CC
3422if test -n "$CC"; then
3423  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3424printf "%s\n" "$CC" >&6; }
3425else
3426  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
3427printf "%s\n" "no" >&6; }
3428fi
3429
3430
3431fi
3432if test -z "$ac_cv_prog_CC"; then
3433  ac_ct_CC=$CC
3434  # Extract the first word of "gcc", so it can be a program name with args.
3435set dummy gcc; ac_word=$2
3436{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3437printf %s "checking for $ac_word... " >&6; }
3438if test ${ac_cv_prog_ac_ct_CC+y}
3439then :
3440  printf %s "(cached) " >&6
3441else $as_nop
3442  if test -n "$ac_ct_CC"; then
3443  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3444else
3445as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3446for as_dir in $PATH
3447do
3448  IFS=$as_save_IFS
3449  case $as_dir in #(((
3450    '') as_dir=./ ;;
3451    */) ;;
3452    *) as_dir=$as_dir/ ;;
3453  esac
3454    for ac_exec_ext in '' $ac_executable_extensions; do
3455  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
3456    ac_cv_prog_ac_ct_CC="gcc"
3457    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
3458    break 2
3459  fi
3460done
3461  done
3462IFS=$as_save_IFS
3463
3464fi
3465fi
3466ac_ct_CC=$ac_cv_prog_ac_ct_CC
3467if test -n "$ac_ct_CC"; then
3468  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3469printf "%s\n" "$ac_ct_CC" >&6; }
3470else
3471  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
3472printf "%s\n" "no" >&6; }
3473fi
3474
3475  if test "x$ac_ct_CC" = x; then
3476    CC=""
3477  else
3478    case $cross_compiling:$ac_tool_warned in
3479yes:)
3480{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3481printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3482ac_tool_warned=yes ;;
3483esac
3484    CC=$ac_ct_CC
3485  fi
3486else
3487  CC="$ac_cv_prog_CC"
3488fi
3489
3490if test -z "$CC"; then
3491          if test -n "$ac_tool_prefix"; then
3492    # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
3493set dummy ${ac_tool_prefix}cc; ac_word=$2
3494{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3495printf %s "checking for $ac_word... " >&6; }
3496if test ${ac_cv_prog_CC+y}
3497then :
3498  printf %s "(cached) " >&6
3499else $as_nop
3500  if test -n "$CC"; then
3501  ac_cv_prog_CC="$CC" # Let the user override the test.
3502else
3503as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3504for as_dir in $PATH
3505do
3506  IFS=$as_save_IFS
3507  case $as_dir in #(((
3508    '') as_dir=./ ;;
3509    */) ;;
3510    *) as_dir=$as_dir/ ;;
3511  esac
3512    for ac_exec_ext in '' $ac_executable_extensions; do
3513  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
3514    ac_cv_prog_CC="${ac_tool_prefix}cc"
3515    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
3516    break 2
3517  fi
3518done
3519  done
3520IFS=$as_save_IFS
3521
3522fi
3523fi
3524CC=$ac_cv_prog_CC
3525if test -n "$CC"; then
3526  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3527printf "%s\n" "$CC" >&6; }
3528else
3529  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
3530printf "%s\n" "no" >&6; }
3531fi
3532
3533
3534  fi
3535fi
3536if test -z "$CC"; then
3537  # Extract the first word of "cc", so it can be a program name with args.
3538set dummy cc; ac_word=$2
3539{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3540printf %s "checking for $ac_word... " >&6; }
3541if test ${ac_cv_prog_CC+y}
3542then :
3543  printf %s "(cached) " >&6
3544else $as_nop
3545  if test -n "$CC"; then
3546  ac_cv_prog_CC="$CC" # Let the user override the test.
3547else
3548  ac_prog_rejected=no
3549as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3550for as_dir in $PATH
3551do
3552  IFS=$as_save_IFS
3553  case $as_dir in #(((
3554    '') as_dir=./ ;;
3555    */) ;;
3556    *) as_dir=$as_dir/ ;;
3557  esac
3558    for ac_exec_ext in '' $ac_executable_extensions; do
3559  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
3560    if test "$as_dir$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3561       ac_prog_rejected=yes
3562       continue
3563     fi
3564    ac_cv_prog_CC="cc"
3565    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
3566    break 2
3567  fi
3568done
3569  done
3570IFS=$as_save_IFS
3571
3572if test $ac_prog_rejected = yes; then
3573  # We found a bogon in the path, so make sure we never use it.
3574  set dummy $ac_cv_prog_CC
3575  shift
3576  if test $# != 0; then
3577    # We chose a different compiler from the bogus one.
3578    # However, it has the same basename, so the bogon will be chosen
3579    # first if we set CC to just the basename; use the full file name.
3580    shift
3581    ac_cv_prog_CC="$as_dir$ac_word${1+' '}$@"
3582  fi
3583fi
3584fi
3585fi
3586CC=$ac_cv_prog_CC
3587if test -n "$CC"; then
3588  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3589printf "%s\n" "$CC" >&6; }
3590else
3591  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
3592printf "%s\n" "no" >&6; }
3593fi
3594
3595
3596fi
3597if test -z "$CC"; then
3598  if test -n "$ac_tool_prefix"; then
3599  for ac_prog in cl.exe
3600  do
3601    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3602set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3603{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3604printf %s "checking for $ac_word... " >&6; }
3605if test ${ac_cv_prog_CC+y}
3606then :
3607  printf %s "(cached) " >&6
3608else $as_nop
3609  if test -n "$CC"; then
3610  ac_cv_prog_CC="$CC" # Let the user override the test.
3611else
3612as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3613for as_dir in $PATH
3614do
3615  IFS=$as_save_IFS
3616  case $as_dir in #(((
3617    '') as_dir=./ ;;
3618    */) ;;
3619    *) as_dir=$as_dir/ ;;
3620  esac
3621    for ac_exec_ext in '' $ac_executable_extensions; do
3622  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
3623    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
3624    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
3625    break 2
3626  fi
3627done
3628  done
3629IFS=$as_save_IFS
3630
3631fi
3632fi
3633CC=$ac_cv_prog_CC
3634if test -n "$CC"; then
3635  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3636printf "%s\n" "$CC" >&6; }
3637else
3638  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
3639printf "%s\n" "no" >&6; }
3640fi
3641
3642
3643    test -n "$CC" && break
3644  done
3645fi
3646if test -z "$CC"; then
3647  ac_ct_CC=$CC
3648  for ac_prog in cl.exe
3649do
3650  # Extract the first word of "$ac_prog", so it can be a program name with args.
3651set dummy $ac_prog; ac_word=$2
3652{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3653printf %s "checking for $ac_word... " >&6; }
3654if test ${ac_cv_prog_ac_ct_CC+y}
3655then :
3656  printf %s "(cached) " >&6
3657else $as_nop
3658  if test -n "$ac_ct_CC"; then
3659  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3660else
3661as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3662for as_dir in $PATH
3663do
3664  IFS=$as_save_IFS
3665  case $as_dir in #(((
3666    '') as_dir=./ ;;
3667    */) ;;
3668    *) as_dir=$as_dir/ ;;
3669  esac
3670    for ac_exec_ext in '' $ac_executable_extensions; do
3671  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
3672    ac_cv_prog_ac_ct_CC="$ac_prog"
3673    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
3674    break 2
3675  fi
3676done
3677  done
3678IFS=$as_save_IFS
3679
3680fi
3681fi
3682ac_ct_CC=$ac_cv_prog_ac_ct_CC
3683if test -n "$ac_ct_CC"; then
3684  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3685printf "%s\n" "$ac_ct_CC" >&6; }
3686else
3687  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
3688printf "%s\n" "no" >&6; }
3689fi
3690
3691
3692  test -n "$ac_ct_CC" && break
3693done
3694
3695  if test "x$ac_ct_CC" = x; then
3696    CC=""
3697  else
3698    case $cross_compiling:$ac_tool_warned in
3699yes:)
3700{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3701printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3702ac_tool_warned=yes ;;
3703esac
3704    CC=$ac_ct_CC
3705  fi
3706fi
3707
3708fi
3709if test -z "$CC"; then
3710  if test -n "$ac_tool_prefix"; then
3711  # Extract the first word of "${ac_tool_prefix}clang", so it can be a program name with args.
3712set dummy ${ac_tool_prefix}clang; ac_word=$2
3713{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3714printf %s "checking for $ac_word... " >&6; }
3715if test ${ac_cv_prog_CC+y}
3716then :
3717  printf %s "(cached) " >&6
3718else $as_nop
3719  if test -n "$CC"; then
3720  ac_cv_prog_CC="$CC" # Let the user override the test.
3721else
3722as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3723for as_dir in $PATH
3724do
3725  IFS=$as_save_IFS
3726  case $as_dir in #(((
3727    '') as_dir=./ ;;
3728    */) ;;
3729    *) as_dir=$as_dir/ ;;
3730  esac
3731    for ac_exec_ext in '' $ac_executable_extensions; do
3732  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
3733    ac_cv_prog_CC="${ac_tool_prefix}clang"
3734    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
3735    break 2
3736  fi
3737done
3738  done
3739IFS=$as_save_IFS
3740
3741fi
3742fi
3743CC=$ac_cv_prog_CC
3744if test -n "$CC"; then
3745  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3746printf "%s\n" "$CC" >&6; }
3747else
3748  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
3749printf "%s\n" "no" >&6; }
3750fi
3751
3752
3753fi
3754if test -z "$ac_cv_prog_CC"; then
3755  ac_ct_CC=$CC
3756  # Extract the first word of "clang", so it can be a program name with args.
3757set dummy clang; ac_word=$2
3758{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3759printf %s "checking for $ac_word... " >&6; }
3760if test ${ac_cv_prog_ac_ct_CC+y}
3761then :
3762  printf %s "(cached) " >&6
3763else $as_nop
3764  if test -n "$ac_ct_CC"; then
3765  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3766else
3767as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3768for as_dir in $PATH
3769do
3770  IFS=$as_save_IFS
3771  case $as_dir in #(((
3772    '') as_dir=./ ;;
3773    */) ;;
3774    *) as_dir=$as_dir/ ;;
3775  esac
3776    for ac_exec_ext in '' $ac_executable_extensions; do
3777  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
3778    ac_cv_prog_ac_ct_CC="clang"
3779    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
3780    break 2
3781  fi
3782done
3783  done
3784IFS=$as_save_IFS
3785
3786fi
3787fi
3788ac_ct_CC=$ac_cv_prog_ac_ct_CC
3789if test -n "$ac_ct_CC"; then
3790  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3791printf "%s\n" "$ac_ct_CC" >&6; }
3792else
3793  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
3794printf "%s\n" "no" >&6; }
3795fi
3796
3797  if test "x$ac_ct_CC" = x; then
3798    CC=""
3799  else
3800    case $cross_compiling:$ac_tool_warned in
3801yes:)
3802{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3803printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3804ac_tool_warned=yes ;;
3805esac
3806    CC=$ac_ct_CC
3807  fi
3808else
3809  CC="$ac_cv_prog_CC"
3810fi
3811
3812fi
3813
3814
3815test -z "$CC" && { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3816printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
3817as_fn_error $? "no acceptable C compiler found in \$PATH
3818See \`config.log' for more details" "$LINENO" 5; }
3819
3820# Provide some information about the compiler.
3821printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3822set X $ac_compile
3823ac_compiler=$2
3824for ac_option in --version -v -V -qversion -version; do
3825  { { ac_try="$ac_compiler $ac_option >&5"
3826case "(($ac_try" in
3827  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3828  *) ac_try_echo=$ac_try;;
3829esac
3830eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3831printf "%s\n" "$ac_try_echo"; } >&5
3832  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
3833  ac_status=$?
3834  if test -s conftest.err; then
3835    sed '10a\
3836... rest of stderr output deleted ...
3837         10q' conftest.err >conftest.er1
3838    cat conftest.er1 >&5
3839  fi
3840  rm -f conftest.er1 conftest.err
3841  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3842  test $ac_status = 0; }
3843done
3844
3845cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3846/* end confdefs.h.  */
3847
3848int
3849main (void)
3850{
3851
3852  ;
3853  return 0;
3854}
3855_ACEOF
3856ac_clean_files_save=$ac_clean_files
3857ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
3858# Try to create an executable without -o first, disregard a.out.
3859# It will help us diagnose broken compilers, and finding out an intuition
3860# of exeext.
3861{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3862printf %s "checking whether the C compiler works... " >&6; }
3863ac_link_default=`printf "%s\n" "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3864
3865# The possible output files:
3866ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3867
3868ac_rmfiles=
3869for ac_file in $ac_files
3870do
3871  case $ac_file in
3872    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3873    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3874  esac
3875done
3876rm -f $ac_rmfiles
3877
3878if { { ac_try="$ac_link_default"
3879case "(($ac_try" in
3880  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3881  *) ac_try_echo=$ac_try;;
3882esac
3883eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3884printf "%s\n" "$ac_try_echo"; } >&5
3885  (eval "$ac_link_default") 2>&5
3886  ac_status=$?
3887  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3888  test $ac_status = 0; }
3889then :
3890  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3891# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3892# in a Makefile.  We should not override ac_cv_exeext if it was cached,
3893# so that the user can short-circuit this test for compilers unknown to
3894# Autoconf.
3895for ac_file in $ac_files ''
3896do
3897  test -f "$ac_file" || continue
3898  case $ac_file in
3899    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
3900	;;
3901    [ab].out )
3902	# We found the default executable, but exeext='' is most
3903	# certainly right.
3904	break;;
3905    *.* )
3906	if test ${ac_cv_exeext+y} && test "$ac_cv_exeext" != no;
3907	then :; else
3908	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3909	fi
3910	# We set ac_cv_exeext here because the later test for it is not
3911	# safe: cross compilers may not add the suffix if given an `-o'
3912	# argument, so we may need to know it at that point already.
3913	# Even if this section looks crufty: it has the advantage of
3914	# actually working.
3915	break;;
3916    * )
3917	break;;
3918  esac
3919done
3920test "$ac_cv_exeext" = no && ac_cv_exeext=
3921
3922else $as_nop
3923  ac_file=''
3924fi
3925if test -z "$ac_file"
3926then :
3927  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
3928printf "%s\n" "no" >&6; }
3929printf "%s\n" "$as_me: failed program was:" >&5
3930sed 's/^/| /' conftest.$ac_ext >&5
3931
3932{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3933printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
3934as_fn_error 77 "C compiler cannot create executables
3935See \`config.log' for more details" "$LINENO" 5; }
3936else $as_nop
3937  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3938printf "%s\n" "yes" >&6; }
3939fi
3940{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3941printf %s "checking for C compiler default output file name... " >&6; }
3942{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3943printf "%s\n" "$ac_file" >&6; }
3944ac_exeext=$ac_cv_exeext
3945
3946rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
3947ac_clean_files=$ac_clean_files_save
3948{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3949printf %s "checking for suffix of executables... " >&6; }
3950if { { ac_try="$ac_link"
3951case "(($ac_try" in
3952  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3953  *) ac_try_echo=$ac_try;;
3954esac
3955eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3956printf "%s\n" "$ac_try_echo"; } >&5
3957  (eval "$ac_link") 2>&5
3958  ac_status=$?
3959  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3960  test $ac_status = 0; }
3961then :
3962  # If both `conftest.exe' and `conftest' are `present' (well, observable)
3963# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
3964# work properly (i.e., refer to `conftest.exe'), while it won't with
3965# `rm'.
3966for ac_file in conftest.exe conftest conftest.*; do
3967  test -f "$ac_file" || continue
3968  case $ac_file in
3969    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3970    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3971	  break;;
3972    * ) break;;
3973  esac
3974done
3975else $as_nop
3976  { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3977printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
3978as_fn_error $? "cannot compute suffix of executables: cannot compile and link
3979See \`config.log' for more details" "$LINENO" 5; }
3980fi
3981rm -f conftest conftest$ac_cv_exeext
3982{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3983printf "%s\n" "$ac_cv_exeext" >&6; }
3984
3985rm -f conftest.$ac_ext
3986EXEEXT=$ac_cv_exeext
3987ac_exeext=$EXEEXT
3988cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3989/* end confdefs.h.  */
3990#include <stdio.h>
3991int
3992main (void)
3993{
3994FILE *f = fopen ("conftest.out", "w");
3995 return ferror (f) || fclose (f) != 0;
3996
3997  ;
3998  return 0;
3999}
4000_ACEOF
4001ac_clean_files="$ac_clean_files conftest.out"
4002# Check that the compiler produces executables we can run.  If not, either
4003# the compiler is broken, or we cross compile.
4004{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4005printf %s "checking whether we are cross compiling... " >&6; }
4006if test "$cross_compiling" != yes; then
4007  { { ac_try="$ac_link"
4008case "(($ac_try" in
4009  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4010  *) ac_try_echo=$ac_try;;
4011esac
4012eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4013printf "%s\n" "$ac_try_echo"; } >&5
4014  (eval "$ac_link") 2>&5
4015  ac_status=$?
4016  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4017  test $ac_status = 0; }
4018  if { ac_try='./conftest$ac_cv_exeext'
4019  { { case "(($ac_try" in
4020  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4021  *) ac_try_echo=$ac_try;;
4022esac
4023eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4024printf "%s\n" "$ac_try_echo"; } >&5
4025  (eval "$ac_try") 2>&5
4026  ac_status=$?
4027  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4028  test $ac_status = 0; }; }; then
4029    cross_compiling=no
4030  else
4031    if test "$cross_compiling" = maybe; then
4032	cross_compiling=yes
4033    else
4034	{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4035printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
4036as_fn_error 77 "cannot run C compiled programs.
4037If you meant to cross compile, use \`--host'.
4038See \`config.log' for more details" "$LINENO" 5; }
4039    fi
4040  fi
4041fi
4042{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4043printf "%s\n" "$cross_compiling" >&6; }
4044
4045rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4046ac_clean_files=$ac_clean_files_save
4047{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4048printf %s "checking for suffix of object files... " >&6; }
4049if test ${ac_cv_objext+y}
4050then :
4051  printf %s "(cached) " >&6
4052else $as_nop
4053  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4054/* end confdefs.h.  */
4055
4056int
4057main (void)
4058{
4059
4060  ;
4061  return 0;
4062}
4063_ACEOF
4064rm -f conftest.o conftest.obj
4065if { { ac_try="$ac_compile"
4066case "(($ac_try" in
4067  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4068  *) ac_try_echo=$ac_try;;
4069esac
4070eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4071printf "%s\n" "$ac_try_echo"; } >&5
4072  (eval "$ac_compile") 2>&5
4073  ac_status=$?
4074  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4075  test $ac_status = 0; }
4076then :
4077  for ac_file in conftest.o conftest.obj conftest.*; do
4078  test -f "$ac_file" || continue;
4079  case $ac_file in
4080    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
4081    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4082       break;;
4083  esac
4084done
4085else $as_nop
4086  printf "%s\n" "$as_me: failed program was:" >&5
4087sed 's/^/| /' conftest.$ac_ext >&5
4088
4089{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4090printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
4091as_fn_error $? "cannot compute suffix of object files: cannot compile
4092See \`config.log' for more details" "$LINENO" 5; }
4093fi
4094rm -f conftest.$ac_cv_objext conftest.$ac_ext
4095fi
4096{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4097printf "%s\n" "$ac_cv_objext" >&6; }
4098OBJEXT=$ac_cv_objext
4099ac_objext=$OBJEXT
4100{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports GNU C" >&5
4101printf %s "checking whether the compiler supports GNU C... " >&6; }
4102if test ${ac_cv_c_compiler_gnu+y}
4103then :
4104  printf %s "(cached) " >&6
4105else $as_nop
4106  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4107/* end confdefs.h.  */
4108
4109int
4110main (void)
4111{
4112#ifndef __GNUC__
4113       choke me
4114#endif
4115
4116  ;
4117  return 0;
4118}
4119_ACEOF
4120if ac_fn_c_try_compile "$LINENO"
4121then :
4122  ac_compiler_gnu=yes
4123else $as_nop
4124  ac_compiler_gnu=no
4125fi
4126rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
4127ac_cv_c_compiler_gnu=$ac_compiler_gnu
4128
4129fi
4130{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4131printf "%s\n" "$ac_cv_c_compiler_gnu" >&6; }
4132ac_compiler_gnu=$ac_cv_c_compiler_gnu
4133
4134if test $ac_compiler_gnu = yes; then
4135  GCC=yes
4136else
4137  GCC=
4138fi
4139ac_test_CFLAGS=${CFLAGS+y}
4140ac_save_CFLAGS=$CFLAGS
4141{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4142printf %s "checking whether $CC accepts -g... " >&6; }
4143if test ${ac_cv_prog_cc_g+y}
4144then :
4145  printf %s "(cached) " >&6
4146else $as_nop
4147  ac_save_c_werror_flag=$ac_c_werror_flag
4148   ac_c_werror_flag=yes
4149   ac_cv_prog_cc_g=no
4150   CFLAGS="-g"
4151   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4152/* end confdefs.h.  */
4153
4154int
4155main (void)
4156{
4157
4158  ;
4159  return 0;
4160}
4161_ACEOF
4162if ac_fn_c_try_compile "$LINENO"
4163then :
4164  ac_cv_prog_cc_g=yes
4165else $as_nop
4166  CFLAGS=""
4167      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4168/* end confdefs.h.  */
4169
4170int
4171main (void)
4172{
4173
4174  ;
4175  return 0;
4176}
4177_ACEOF
4178if ac_fn_c_try_compile "$LINENO"
4179then :
4180
4181else $as_nop
4182  ac_c_werror_flag=$ac_save_c_werror_flag
4183	 CFLAGS="-g"
4184	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4185/* end confdefs.h.  */
4186
4187int
4188main (void)
4189{
4190
4191  ;
4192  return 0;
4193}
4194_ACEOF
4195if ac_fn_c_try_compile "$LINENO"
4196then :
4197  ac_cv_prog_cc_g=yes
4198fi
4199rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
4200fi
4201rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
4202fi
4203rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
4204   ac_c_werror_flag=$ac_save_c_werror_flag
4205fi
4206{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4207printf "%s\n" "$ac_cv_prog_cc_g" >&6; }
4208if test $ac_test_CFLAGS; then
4209  CFLAGS=$ac_save_CFLAGS
4210elif test $ac_cv_prog_cc_g = yes; then
4211  if test "$GCC" = yes; then
4212    CFLAGS="-g -O2"
4213  else
4214    CFLAGS="-g"
4215  fi
4216else
4217  if test "$GCC" = yes; then
4218    CFLAGS="-O2"
4219  else
4220    CFLAGS=
4221  fi
4222fi
4223ac_prog_cc_stdc=no
4224if test x$ac_prog_cc_stdc = xno
4225then :
4226  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C11 features" >&5
4227printf %s "checking for $CC option to enable C11 features... " >&6; }
4228if test ${ac_cv_prog_cc_c11+y}
4229then :
4230  printf %s "(cached) " >&6
4231else $as_nop
4232  ac_cv_prog_cc_c11=no
4233ac_save_CC=$CC
4234cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4235/* end confdefs.h.  */
4236$ac_c_conftest_c11_program
4237_ACEOF
4238for ac_arg in '' -std=gnu11
4239do
4240  CC="$ac_save_CC $ac_arg"
4241  if ac_fn_c_try_compile "$LINENO"
4242then :
4243  ac_cv_prog_cc_c11=$ac_arg
4244fi
4245rm -f core conftest.err conftest.$ac_objext conftest.beam
4246  test "x$ac_cv_prog_cc_c11" != "xno" && break
4247done
4248rm -f conftest.$ac_ext
4249CC=$ac_save_CC
4250fi
4251
4252if test "x$ac_cv_prog_cc_c11" = xno
4253then :
4254  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4255printf "%s\n" "unsupported" >&6; }
4256else $as_nop
4257  if test "x$ac_cv_prog_cc_c11" = x
4258then :
4259  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4260printf "%s\n" "none needed" >&6; }
4261else $as_nop
4262  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c11" >&5
4263printf "%s\n" "$ac_cv_prog_cc_c11" >&6; }
4264     CC="$CC $ac_cv_prog_cc_c11"
4265fi
4266  ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c11
4267  ac_prog_cc_stdc=c11
4268fi
4269fi
4270if test x$ac_prog_cc_stdc = xno
4271then :
4272  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C99 features" >&5
4273printf %s "checking for $CC option to enable C99 features... " >&6; }
4274if test ${ac_cv_prog_cc_c99+y}
4275then :
4276  printf %s "(cached) " >&6
4277else $as_nop
4278  ac_cv_prog_cc_c99=no
4279ac_save_CC=$CC
4280cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4281/* end confdefs.h.  */
4282$ac_c_conftest_c99_program
4283_ACEOF
4284for ac_arg in '' -std=gnu99 -std=c99 -c99 -qlanglvl=extc1x -qlanglvl=extc99 -AC99 -D_STDC_C99=
4285do
4286  CC="$ac_save_CC $ac_arg"
4287  if ac_fn_c_try_compile "$LINENO"
4288then :
4289  ac_cv_prog_cc_c99=$ac_arg
4290fi
4291rm -f core conftest.err conftest.$ac_objext conftest.beam
4292  test "x$ac_cv_prog_cc_c99" != "xno" && break
4293done
4294rm -f conftest.$ac_ext
4295CC=$ac_save_CC
4296fi
4297
4298if test "x$ac_cv_prog_cc_c99" = xno
4299then :
4300  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4301printf "%s\n" "unsupported" >&6; }
4302else $as_nop
4303  if test "x$ac_cv_prog_cc_c99" = x
4304then :
4305  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4306printf "%s\n" "none needed" >&6; }
4307else $as_nop
4308  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5
4309printf "%s\n" "$ac_cv_prog_cc_c99" >&6; }
4310     CC="$CC $ac_cv_prog_cc_c99"
4311fi
4312  ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99
4313  ac_prog_cc_stdc=c99
4314fi
4315fi
4316if test x$ac_prog_cc_stdc = xno
4317then :
4318  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C89 features" >&5
4319printf %s "checking for $CC option to enable C89 features... " >&6; }
4320if test ${ac_cv_prog_cc_c89+y}
4321then :
4322  printf %s "(cached) " >&6
4323else $as_nop
4324  ac_cv_prog_cc_c89=no
4325ac_save_CC=$CC
4326cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4327/* end confdefs.h.  */
4328$ac_c_conftest_c89_program
4329_ACEOF
4330for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
4331do
4332  CC="$ac_save_CC $ac_arg"
4333  if ac_fn_c_try_compile "$LINENO"
4334then :
4335  ac_cv_prog_cc_c89=$ac_arg
4336fi
4337rm -f core conftest.err conftest.$ac_objext conftest.beam
4338  test "x$ac_cv_prog_cc_c89" != "xno" && break
4339done
4340rm -f conftest.$ac_ext
4341CC=$ac_save_CC
4342fi
4343
4344if test "x$ac_cv_prog_cc_c89" = xno
4345then :
4346  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4347printf "%s\n" "unsupported" >&6; }
4348else $as_nop
4349  if test "x$ac_cv_prog_cc_c89" = x
4350then :
4351  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4352printf "%s\n" "none needed" >&6; }
4353else $as_nop
4354  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4355printf "%s\n" "$ac_cv_prog_cc_c89" >&6; }
4356     CC="$CC $ac_cv_prog_cc_c89"
4357fi
4358  ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89
4359  ac_prog_cc_stdc=c89
4360fi
4361fi
4362
4363ac_ext=c
4364ac_cpp='$CPP $CPPFLAGS'
4365ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4366ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4367ac_compiler_gnu=$ac_cv_c_compiler_gnu
4368
4369
4370ac_header= ac_cache=
4371for ac_item in $ac_header_c_list
4372do
4373  if test $ac_cache; then
4374    ac_fn_c_check_header_compile "$LINENO" $ac_header ac_cv_header_$ac_cache "$ac_includes_default"
4375    if eval test \"x\$ac_cv_header_$ac_cache\" = xyes; then
4376      printf "%s\n" "#define $ac_item 1" >> confdefs.h
4377    fi
4378    ac_header= ac_cache=
4379  elif test $ac_header; then
4380    ac_cache=$ac_item
4381  else
4382    ac_header=$ac_item
4383  fi
4384done
4385
4386
4387
4388
4389
4390
4391
4392
4393if test $ac_cv_header_stdlib_h = yes && test $ac_cv_header_string_h = yes
4394then :
4395
4396printf "%s\n" "#define STDC_HEADERS 1" >>confdefs.h
4397
4398fi
4399
4400
4401
4402
4403
4404
4405  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
4406printf %s "checking whether it is safe to define __EXTENSIONS__... " >&6; }
4407if test ${ac_cv_safe_to_define___extensions__+y}
4408then :
4409  printf %s "(cached) " >&6
4410else $as_nop
4411  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4412/* end confdefs.h.  */
4413
4414#         define __EXTENSIONS__ 1
4415          $ac_includes_default
4416int
4417main (void)
4418{
4419
4420  ;
4421  return 0;
4422}
4423_ACEOF
4424if ac_fn_c_try_compile "$LINENO"
4425then :
4426  ac_cv_safe_to_define___extensions__=yes
4427else $as_nop
4428  ac_cv_safe_to_define___extensions__=no
4429fi
4430rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
4431fi
4432{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
4433printf "%s\n" "$ac_cv_safe_to_define___extensions__" >&6; }
4434
4435  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether _XOPEN_SOURCE should be defined" >&5
4436printf %s "checking whether _XOPEN_SOURCE should be defined... " >&6; }
4437if test ${ac_cv_should_define__xopen_source+y}
4438then :
4439  printf %s "(cached) " >&6
4440else $as_nop
4441  ac_cv_should_define__xopen_source=no
4442    if test $ac_cv_header_wchar_h = yes
4443then :
4444  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4445/* end confdefs.h.  */
4446
4447          #include <wchar.h>
4448          mbstate_t x;
4449int
4450main (void)
4451{
4452
4453  ;
4454  return 0;
4455}
4456_ACEOF
4457if ac_fn_c_try_compile "$LINENO"
4458then :
4459
4460else $as_nop
4461  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4462/* end confdefs.h.  */
4463
4464            #define _XOPEN_SOURCE 500
4465            #include <wchar.h>
4466            mbstate_t x;
4467int
4468main (void)
4469{
4470
4471  ;
4472  return 0;
4473}
4474_ACEOF
4475if ac_fn_c_try_compile "$LINENO"
4476then :
4477  ac_cv_should_define__xopen_source=yes
4478fi
4479rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
4480fi
4481rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
4482fi
4483fi
4484{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_should_define__xopen_source" >&5
4485printf "%s\n" "$ac_cv_should_define__xopen_source" >&6; }
4486
4487  printf "%s\n" "#define _ALL_SOURCE 1" >>confdefs.h
4488
4489  printf "%s\n" "#define _DARWIN_C_SOURCE 1" >>confdefs.h
4490
4491  printf "%s\n" "#define _GNU_SOURCE 1" >>confdefs.h
4492
4493  printf "%s\n" "#define _HPUX_ALT_XOPEN_SOCKET_API 1" >>confdefs.h
4494
4495  printf "%s\n" "#define _NETBSD_SOURCE 1" >>confdefs.h
4496
4497  printf "%s\n" "#define _OPENBSD_SOURCE 1" >>confdefs.h
4498
4499  printf "%s\n" "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
4500
4501  printf "%s\n" "#define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1" >>confdefs.h
4502
4503  printf "%s\n" "#define __STDC_WANT_IEC_60559_BFP_EXT__ 1" >>confdefs.h
4504
4505  printf "%s\n" "#define __STDC_WANT_IEC_60559_DFP_EXT__ 1" >>confdefs.h
4506
4507  printf "%s\n" "#define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1" >>confdefs.h
4508
4509  printf "%s\n" "#define __STDC_WANT_IEC_60559_TYPES_EXT__ 1" >>confdefs.h
4510
4511  printf "%s\n" "#define __STDC_WANT_LIB_EXT2__ 1" >>confdefs.h
4512
4513  printf "%s\n" "#define __STDC_WANT_MATH_SPEC_FUNCS__ 1" >>confdefs.h
4514
4515  printf "%s\n" "#define _TANDEM_SOURCE 1" >>confdefs.h
4516
4517  if test $ac_cv_header_minix_config_h = yes
4518then :
4519  MINIX=yes
4520    printf "%s\n" "#define _MINIX 1" >>confdefs.h
4521
4522    printf "%s\n" "#define _POSIX_SOURCE 1" >>confdefs.h
4523
4524    printf "%s\n" "#define _POSIX_1_SOURCE 2" >>confdefs.h
4525
4526else $as_nop
4527  MINIX=
4528fi
4529  if test $ac_cv_safe_to_define___extensions__ = yes
4530then :
4531  printf "%s\n" "#define __EXTENSIONS__ 1" >>confdefs.h
4532
4533fi
4534  if test $ac_cv_should_define__xopen_source = yes
4535then :
4536  printf "%s\n" "#define _XOPEN_SOURCE 500" >>confdefs.h
4537
4538fi
4539
4540if test "$ac_cv_header_minix_config_h" = "yes"; then
4541
4542printf "%s\n" "#define _NETBSD_SOURCE 1" >>confdefs.h
4543
4544fi
4545
4546case "$prefix" in
4547        NONE)
4548		prefix="/usr/local"
4549        ;;
4550esac
4551case "$exec_prefix" in
4552        NONE)
4553		exec_prefix="$prefix"
4554        ;;
4555esac
4556
4557# are we on MinGW?
4558if uname -s 2>&1 | grep MINGW >/dev/null; then on_mingw="yes"
4559else
4560	if echo $host | grep mingw >/dev/null; then on_mingw="yes"
4561	else on_mingw="no"; fi
4562fi
4563
4564#
4565# Determine configuration file
4566# the eval is to evaluate shell expansion twice
4567UNBOUND_SBIN_DIR=`eval echo "${sbindir}"`
4568
4569UNBOUND_SYSCONF_DIR=`eval echo "${sysconfdir}"`
4570
4571UNBOUND_LOCALSTATE_DIR=`eval echo "${localstatedir}"`
4572
4573if test $on_mingw = "no"; then
4574  ub_conf_file=`eval echo "${sysconfdir}/unbound/unbound.conf"`
4575else
4576  ub_conf_file="C:\\Program Files\\Unbound\\service.conf"
4577fi
4578
4579# Check whether --with-conf_file was given.
4580if test ${with_conf_file+y}
4581then :
4582  withval=$with_conf_file; ub_conf_file="$withval"
4583fi
4584
4585
4586hdr_config="`echo $ub_conf_file | sed -e 's/\\\\/\\\\\\\\/g'`"
4587
4588
4589printf "%s\n" "#define CONFIGFILE \"$hdr_config\"" >>confdefs.h
4590
4591ub_conf_dir=`$as_dirname -- "$ub_conf_file" ||
4592$as_expr X"$ub_conf_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
4593	 X"$ub_conf_file" : 'X\(//\)[^/]' \| \
4594	 X"$ub_conf_file" : 'X\(//\)$' \| \
4595	 X"$ub_conf_file" : 'X\(/\)' \| . 2>/dev/null ||
4596printf "%s\n" X"$ub_conf_file" |
4597    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
4598	    s//\1/
4599	    q
4600	  }
4601	  /^X\(\/\/\)[^/].*/{
4602	    s//\1/
4603	    q
4604	  }
4605	  /^X\(\/\/\)$/{
4606	    s//\1/
4607	    q
4608	  }
4609	  /^X\(\/\).*/{
4610	    s//\1/
4611	    q
4612	  }
4613	  s/.*/./; q'`
4614
4615
4616# Determine run, chroot directory and pidfile locations
4617
4618# Check whether --with-run-dir was given.
4619if test ${with_run_dir+y}
4620then :
4621  withval=$with_run_dir; UNBOUND_RUN_DIR="$withval"
4622else $as_nop
4623  if test $on_mingw = no; then
4624    UNBOUND_RUN_DIR=`dirname "$ub_conf_file"`
4625else
4626    UNBOUND_RUN_DIR=""
4627fi
4628
4629fi
4630
4631
4632hdr_run="`echo $UNBOUND_RUN_DIR | sed -e 's/\\\\/\\\\\\\\/g'`"
4633
4634
4635printf "%s\n" "#define RUN_DIR \"$hdr_run\"" >>confdefs.h
4636
4637
4638
4639# Check whether --with-chroot-dir was given.
4640if test ${with_chroot_dir+y}
4641then :
4642  withval=$with_chroot_dir; UNBOUND_CHROOT_DIR="$withval"
4643else $as_nop
4644  if test $on_mingw = no; then
4645    UNBOUND_CHROOT_DIR="$UNBOUND_RUN_DIR"
4646else
4647    UNBOUND_CHROOT_DIR=""
4648fi
4649
4650fi
4651
4652
4653hdr_chroot="`echo $UNBOUND_CHROOT_DIR | sed -e 's/\\\\/\\\\\\\\/g'`"
4654
4655
4656printf "%s\n" "#define CHROOT_DIR \"$hdr_chroot\"" >>confdefs.h
4657
4658
4659
4660# Check whether --with-share-dir was given.
4661if test ${with_share_dir+y}
4662then :
4663  withval=$with_share_dir; UNBOUND_SHARE_DIR="$withval"
4664else $as_nop
4665  UNBOUND_SHARE_DIR="$UNBOUND_RUN_DIR"
4666fi
4667
4668
4669
4670printf "%s\n" "#define SHARE_DIR \"$UNBOUND_SHARE_DIR\"" >>confdefs.h
4671
4672
4673
4674# Check whether --with-pidfile was given.
4675if test ${with_pidfile+y}
4676then :
4677  withval=$with_pidfile; UNBOUND_PIDFILE="$withval"
4678else $as_nop
4679  if test $on_mingw = no; then
4680    UNBOUND_PIDFILE="$UNBOUND_RUN_DIR/unbound.pid"
4681else
4682    UNBOUND_PIDFILE=""
4683fi
4684
4685fi
4686
4687
4688hdr_pid="`echo $UNBOUND_PIDFILE | sed -e 's/\\\\/\\\\\\\\/g'`"
4689
4690
4691printf "%s\n" "#define PIDFILE \"$hdr_pid\"" >>confdefs.h
4692
4693
4694
4695# Check whether --with-rootkey-file was given.
4696if test ${with_rootkey_file+y}
4697then :
4698  withval=$with_rootkey_file; UNBOUND_ROOTKEY_FILE="$withval"
4699else $as_nop
4700  if test $on_mingw = no; then
4701    UNBOUND_ROOTKEY_FILE="$UNBOUND_RUN_DIR/root.key"
4702else
4703    UNBOUND_ROOTKEY_FILE="C:\\Program Files\\Unbound\\root.key"
4704fi
4705
4706fi
4707
4708
4709hdr_rkey="`echo $UNBOUND_ROOTKEY_FILE | sed -e 's/\\\\/\\\\\\\\/g'`"
4710
4711
4712printf "%s\n" "#define ROOT_ANCHOR_FILE \"$hdr_rkey\"" >>confdefs.h
4713
4714
4715
4716# Check whether --with-rootcert-file was given.
4717if test ${with_rootcert_file+y}
4718then :
4719  withval=$with_rootcert_file; UNBOUND_ROOTCERT_FILE="$withval"
4720else $as_nop
4721  if test $on_mingw = no; then
4722    UNBOUND_ROOTCERT_FILE="$UNBOUND_RUN_DIR/icannbundle.pem"
4723else
4724    UNBOUND_ROOTCERT_FILE="C:\\Program Files\\Unbound\\icannbundle.pem"
4725fi
4726
4727fi
4728
4729
4730hdr_rpem="`echo $UNBOUND_ROOTCERT_FILE | sed -e 's/\\\\/\\\\\\\\/g'`"
4731
4732
4733printf "%s\n" "#define ROOT_CERT_FILE \"$hdr_rpem\"" >>confdefs.h
4734
4735
4736
4737# Check whether --with-username was given.
4738if test ${with_username+y}
4739then :
4740  withval=$with_username; UNBOUND_USERNAME="$withval"
4741else $as_nop
4742  UNBOUND_USERNAME="unbound"
4743fi
4744
4745
4746
4747printf "%s\n" "#define UB_USERNAME \"$UNBOUND_USERNAME\"" >>confdefs.h
4748
4749
4750
4751printf "%s\n" "#define WINVER 0x0502" >>confdefs.h
4752
4753wnvs=`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/' `
4754
4755
4756printf "%s\n" "#define RSRC_PACKAGE_VERSION $wnvs" >>confdefs.h
4757
4758
4759# Check for 'grep -e' program, here, since ACX_CHECK_FLTO needs that.
4760{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4761printf %s "checking for grep that handles long lines and -e... " >&6; }
4762if test ${ac_cv_path_GREP+y}
4763then :
4764  printf %s "(cached) " >&6
4765else $as_nop
4766  if test -z "$GREP"; then
4767  ac_path_GREP_found=false
4768  # Loop through the user's path and test for each of PROGNAME-LIST
4769  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4770for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4771do
4772  IFS=$as_save_IFS
4773  case $as_dir in #(((
4774    '') as_dir=./ ;;
4775    */) ;;
4776    *) as_dir=$as_dir/ ;;
4777  esac
4778    for ac_prog in grep ggrep
4779   do
4780    for ac_exec_ext in '' $ac_executable_extensions; do
4781      ac_path_GREP="$as_dir$ac_prog$ac_exec_ext"
4782      as_fn_executable_p "$ac_path_GREP" || continue
4783# Check for GNU ac_path_GREP and select it if it is found.
4784  # Check for GNU $ac_path_GREP
4785case `"$ac_path_GREP" --version 2>&1` in
4786*GNU*)
4787  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4788*)
4789  ac_count=0
4790  printf %s 0123456789 >"conftest.in"
4791  while :
4792  do
4793    cat "conftest.in" "conftest.in" >"conftest.tmp"
4794    mv "conftest.tmp" "conftest.in"
4795    cp "conftest.in" "conftest.nl"
4796    printf "%s\n" 'GREP' >> "conftest.nl"
4797    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4798    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4799    as_fn_arith $ac_count + 1 && ac_count=$as_val
4800    if test $ac_count -gt ${ac_path_GREP_max-0}; then
4801      # Best one so far, save it but keep looking for a better one
4802      ac_cv_path_GREP="$ac_path_GREP"
4803      ac_path_GREP_max=$ac_count
4804    fi
4805    # 10*(2^10) chars as input seems more than enough
4806    test $ac_count -gt 10 && break
4807  done
4808  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4809esac
4810
4811      $ac_path_GREP_found && break 3
4812    done
4813  done
4814  done
4815IFS=$as_save_IFS
4816  if test -z "$ac_cv_path_GREP"; then
4817    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4818  fi
4819else
4820  ac_cv_path_GREP=$GREP
4821fi
4822
4823fi
4824{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4825printf "%s\n" "$ac_cv_path_GREP" >&6; }
4826 GREP="$ac_cv_path_GREP"
4827
4828
4829
4830# Checks for typedefs, structures, and compiler characteristics.
4831{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
4832printf %s "checking for an ANSI C-conforming const... " >&6; }
4833if test ${ac_cv_c_const+y}
4834then :
4835  printf %s "(cached) " >&6
4836else $as_nop
4837  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4838/* end confdefs.h.  */
4839
4840int
4841main (void)
4842{
4843
4844#ifndef __cplusplus
4845  /* Ultrix mips cc rejects this sort of thing.  */
4846  typedef int charset[2];
4847  const charset cs = { 0, 0 };
4848  /* SunOS 4.1.1 cc rejects this.  */
4849  char const *const *pcpcc;
4850  char **ppc;
4851  /* NEC SVR4.0.2 mips cc rejects this.  */
4852  struct point {int x, y;};
4853  static struct point const zero = {0,0};
4854  /* IBM XL C 1.02.0.0 rejects this.
4855     It does not let you subtract one const X* pointer from another in
4856     an arm of an if-expression whose if-part is not a constant
4857     expression */
4858  const char *g = "string";
4859  pcpcc = &g + (g ? g-g : 0);
4860  /* HPUX 7.0 cc rejects these. */
4861  ++pcpcc;
4862  ppc = (char**) pcpcc;
4863  pcpcc = (char const *const *) ppc;
4864  { /* SCO 3.2v4 cc rejects this sort of thing.  */
4865    char tx;
4866    char *t = &tx;
4867    char const *s = 0 ? (char *) 0 : (char const *) 0;
4868
4869    *t++ = 0;
4870    if (s) return 0;
4871  }
4872  { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
4873    int x[] = {25, 17};
4874    const int *foo = &x[0];
4875    ++foo;
4876  }
4877  { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
4878    typedef const int *iptr;
4879    iptr p = 0;
4880    ++p;
4881  }
4882  { /* IBM XL C 1.02.0.0 rejects this sort of thing, saying
4883       "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
4884    struct s { int j; const int *ap[3]; } bx;
4885    struct s *b = &bx; b->j = 5;
4886  }
4887  { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
4888    const int foo = 10;
4889    if (!foo) return 0;
4890  }
4891  return !cs[0] && !zero.x;
4892#endif
4893
4894  ;
4895  return 0;
4896}
4897_ACEOF
4898if ac_fn_c_try_compile "$LINENO"
4899then :
4900  ac_cv_c_const=yes
4901else $as_nop
4902  ac_cv_c_const=no
4903fi
4904rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
4905fi
4906{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
4907printf "%s\n" "$ac_cv_c_const" >&6; }
4908if test $ac_cv_c_const = no; then
4909
4910printf "%s\n" "#define const /**/" >>confdefs.h
4911
4912fi
4913
4914ac_ext=c
4915ac_cpp='$CPP $CPPFLAGS'
4916ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4917ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4918ac_compiler_gnu=$ac_cv_c_compiler_gnu
4919
4920# allow user to override the -g -O2 flags.
4921default_cflags=no
4922if test "x$CFLAGS" = "x" ; then
4923
4924
4925{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -g" >&5
4926printf %s "checking whether $CC supports -g... " >&6; }
4927cache=`echo g | sed 'y%.=/+-%___p_%'`
4928if eval test \${cv_prog_cc_flag_$cache+y}
4929then :
4930  printf %s "(cached) " >&6
4931else $as_nop
4932
4933echo 'void f(void){}' >conftest.c
4934if test -z "`$CC $CPPFLAGS $CFLAGS -g -c conftest.c 2>&1`"; then
4935eval "cv_prog_cc_flag_$cache=yes"
4936else
4937eval "cv_prog_cc_flag_$cache=no"
4938fi
4939rm -f conftest conftest.o conftest.c
4940
4941fi
4942
4943if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
4944{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4945printf "%s\n" "yes" >&6; }
4946:
4947CFLAGS="$CFLAGS -g"
4948else
4949{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4950printf "%s\n" "no" >&6; }
4951:
4952
4953fi
4954
4955
4956
4957{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -O2" >&5
4958printf %s "checking whether $CC supports -O2... " >&6; }
4959cache=`echo O2 | sed 'y%.=/+-%___p_%'`
4960if eval test \${cv_prog_cc_flag_$cache+y}
4961then :
4962  printf %s "(cached) " >&6
4963else $as_nop
4964
4965echo 'void f(void){}' >conftest.c
4966if test -z "`$CC $CPPFLAGS $CFLAGS -O2 -c conftest.c 2>&1`"; then
4967eval "cv_prog_cc_flag_$cache=yes"
4968else
4969eval "cv_prog_cc_flag_$cache=no"
4970fi
4971rm -f conftest conftest.o conftest.c
4972
4973fi
4974
4975if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
4976{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4977printf "%s\n" "yes" >&6; }
4978:
4979CFLAGS="$CFLAGS -O2"
4980else
4981{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4982printf "%s\n" "no" >&6; }
4983:
4984
4985fi
4986
4987default_cflags=yes
4988fi
4989ac_ext=c
4990ac_cpp='$CPP $CPPFLAGS'
4991ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4992ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4993ac_compiler_gnu=$ac_cv_c_compiler_gnu
4994if test -n "$ac_tool_prefix"; then
4995  # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
4996set dummy ${ac_tool_prefix}gcc; ac_word=$2
4997{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4998printf %s "checking for $ac_word... " >&6; }
4999if test ${ac_cv_prog_CC+y}
5000then :
5001  printf %s "(cached) " >&6
5002else $as_nop
5003  if test -n "$CC"; then
5004  ac_cv_prog_CC="$CC" # Let the user override the test.
5005else
5006as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5007for as_dir in $PATH
5008do
5009  IFS=$as_save_IFS
5010  case $as_dir in #(((
5011    '') as_dir=./ ;;
5012    */) ;;
5013    *) as_dir=$as_dir/ ;;
5014  esac
5015    for ac_exec_ext in '' $ac_executable_extensions; do
5016  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
5017    ac_cv_prog_CC="${ac_tool_prefix}gcc"
5018    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
5019    break 2
5020  fi
5021done
5022  done
5023IFS=$as_save_IFS
5024
5025fi
5026fi
5027CC=$ac_cv_prog_CC
5028if test -n "$CC"; then
5029  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5030printf "%s\n" "$CC" >&6; }
5031else
5032  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5033printf "%s\n" "no" >&6; }
5034fi
5035
5036
5037fi
5038if test -z "$ac_cv_prog_CC"; then
5039  ac_ct_CC=$CC
5040  # Extract the first word of "gcc", so it can be a program name with args.
5041set dummy gcc; ac_word=$2
5042{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5043printf %s "checking for $ac_word... " >&6; }
5044if test ${ac_cv_prog_ac_ct_CC+y}
5045then :
5046  printf %s "(cached) " >&6
5047else $as_nop
5048  if test -n "$ac_ct_CC"; then
5049  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
5050else
5051as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5052for as_dir in $PATH
5053do
5054  IFS=$as_save_IFS
5055  case $as_dir in #(((
5056    '') as_dir=./ ;;
5057    */) ;;
5058    *) as_dir=$as_dir/ ;;
5059  esac
5060    for ac_exec_ext in '' $ac_executable_extensions; do
5061  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
5062    ac_cv_prog_ac_ct_CC="gcc"
5063    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
5064    break 2
5065  fi
5066done
5067  done
5068IFS=$as_save_IFS
5069
5070fi
5071fi
5072ac_ct_CC=$ac_cv_prog_ac_ct_CC
5073if test -n "$ac_ct_CC"; then
5074  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
5075printf "%s\n" "$ac_ct_CC" >&6; }
5076else
5077  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5078printf "%s\n" "no" >&6; }
5079fi
5080
5081  if test "x$ac_ct_CC" = x; then
5082    CC=""
5083  else
5084    case $cross_compiling:$ac_tool_warned in
5085yes:)
5086{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5087printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5088ac_tool_warned=yes ;;
5089esac
5090    CC=$ac_ct_CC
5091  fi
5092else
5093  CC="$ac_cv_prog_CC"
5094fi
5095
5096if test -z "$CC"; then
5097          if test -n "$ac_tool_prefix"; then
5098    # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
5099set dummy ${ac_tool_prefix}cc; ac_word=$2
5100{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5101printf %s "checking for $ac_word... " >&6; }
5102if test ${ac_cv_prog_CC+y}
5103then :
5104  printf %s "(cached) " >&6
5105else $as_nop
5106  if test -n "$CC"; then
5107  ac_cv_prog_CC="$CC" # Let the user override the test.
5108else
5109as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5110for as_dir in $PATH
5111do
5112  IFS=$as_save_IFS
5113  case $as_dir in #(((
5114    '') as_dir=./ ;;
5115    */) ;;
5116    *) as_dir=$as_dir/ ;;
5117  esac
5118    for ac_exec_ext in '' $ac_executable_extensions; do
5119  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
5120    ac_cv_prog_CC="${ac_tool_prefix}cc"
5121    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
5122    break 2
5123  fi
5124done
5125  done
5126IFS=$as_save_IFS
5127
5128fi
5129fi
5130CC=$ac_cv_prog_CC
5131if test -n "$CC"; then
5132  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5133printf "%s\n" "$CC" >&6; }
5134else
5135  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5136printf "%s\n" "no" >&6; }
5137fi
5138
5139
5140  fi
5141fi
5142if test -z "$CC"; then
5143  # Extract the first word of "cc", so it can be a program name with args.
5144set dummy cc; ac_word=$2
5145{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5146printf %s "checking for $ac_word... " >&6; }
5147if test ${ac_cv_prog_CC+y}
5148then :
5149  printf %s "(cached) " >&6
5150else $as_nop
5151  if test -n "$CC"; then
5152  ac_cv_prog_CC="$CC" # Let the user override the test.
5153else
5154  ac_prog_rejected=no
5155as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5156for as_dir in $PATH
5157do
5158  IFS=$as_save_IFS
5159  case $as_dir in #(((
5160    '') as_dir=./ ;;
5161    */) ;;
5162    *) as_dir=$as_dir/ ;;
5163  esac
5164    for ac_exec_ext in '' $ac_executable_extensions; do
5165  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
5166    if test "$as_dir$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
5167       ac_prog_rejected=yes
5168       continue
5169     fi
5170    ac_cv_prog_CC="cc"
5171    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
5172    break 2
5173  fi
5174done
5175  done
5176IFS=$as_save_IFS
5177
5178if test $ac_prog_rejected = yes; then
5179  # We found a bogon in the path, so make sure we never use it.
5180  set dummy $ac_cv_prog_CC
5181  shift
5182  if test $# != 0; then
5183    # We chose a different compiler from the bogus one.
5184    # However, it has the same basename, so the bogon will be chosen
5185    # first if we set CC to just the basename; use the full file name.
5186    shift
5187    ac_cv_prog_CC="$as_dir$ac_word${1+' '}$@"
5188  fi
5189fi
5190fi
5191fi
5192CC=$ac_cv_prog_CC
5193if test -n "$CC"; then
5194  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5195printf "%s\n" "$CC" >&6; }
5196else
5197  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5198printf "%s\n" "no" >&6; }
5199fi
5200
5201
5202fi
5203if test -z "$CC"; then
5204  if test -n "$ac_tool_prefix"; then
5205  for ac_prog in cl.exe
5206  do
5207    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5208set dummy $ac_tool_prefix$ac_prog; ac_word=$2
5209{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5210printf %s "checking for $ac_word... " >&6; }
5211if test ${ac_cv_prog_CC+y}
5212then :
5213  printf %s "(cached) " >&6
5214else $as_nop
5215  if test -n "$CC"; then
5216  ac_cv_prog_CC="$CC" # Let the user override the test.
5217else
5218as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5219for as_dir in $PATH
5220do
5221  IFS=$as_save_IFS
5222  case $as_dir in #(((
5223    '') as_dir=./ ;;
5224    */) ;;
5225    *) as_dir=$as_dir/ ;;
5226  esac
5227    for ac_exec_ext in '' $ac_executable_extensions; do
5228  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
5229    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
5230    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
5231    break 2
5232  fi
5233done
5234  done
5235IFS=$as_save_IFS
5236
5237fi
5238fi
5239CC=$ac_cv_prog_CC
5240if test -n "$CC"; then
5241  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5242printf "%s\n" "$CC" >&6; }
5243else
5244  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5245printf "%s\n" "no" >&6; }
5246fi
5247
5248
5249    test -n "$CC" && break
5250  done
5251fi
5252if test -z "$CC"; then
5253  ac_ct_CC=$CC
5254  for ac_prog in cl.exe
5255do
5256  # Extract the first word of "$ac_prog", so it can be a program name with args.
5257set dummy $ac_prog; ac_word=$2
5258{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5259printf %s "checking for $ac_word... " >&6; }
5260if test ${ac_cv_prog_ac_ct_CC+y}
5261then :
5262  printf %s "(cached) " >&6
5263else $as_nop
5264  if test -n "$ac_ct_CC"; then
5265  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
5266else
5267as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5268for as_dir in $PATH
5269do
5270  IFS=$as_save_IFS
5271  case $as_dir in #(((
5272    '') as_dir=./ ;;
5273    */) ;;
5274    *) as_dir=$as_dir/ ;;
5275  esac
5276    for ac_exec_ext in '' $ac_executable_extensions; do
5277  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
5278    ac_cv_prog_ac_ct_CC="$ac_prog"
5279    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
5280    break 2
5281  fi
5282done
5283  done
5284IFS=$as_save_IFS
5285
5286fi
5287fi
5288ac_ct_CC=$ac_cv_prog_ac_ct_CC
5289if test -n "$ac_ct_CC"; then
5290  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
5291printf "%s\n" "$ac_ct_CC" >&6; }
5292else
5293  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5294printf "%s\n" "no" >&6; }
5295fi
5296
5297
5298  test -n "$ac_ct_CC" && break
5299done
5300
5301  if test "x$ac_ct_CC" = x; then
5302    CC=""
5303  else
5304    case $cross_compiling:$ac_tool_warned in
5305yes:)
5306{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5307printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5308ac_tool_warned=yes ;;
5309esac
5310    CC=$ac_ct_CC
5311  fi
5312fi
5313
5314fi
5315if test -z "$CC"; then
5316  if test -n "$ac_tool_prefix"; then
5317  # Extract the first word of "${ac_tool_prefix}clang", so it can be a program name with args.
5318set dummy ${ac_tool_prefix}clang; ac_word=$2
5319{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5320printf %s "checking for $ac_word... " >&6; }
5321if test ${ac_cv_prog_CC+y}
5322then :
5323  printf %s "(cached) " >&6
5324else $as_nop
5325  if test -n "$CC"; then
5326  ac_cv_prog_CC="$CC" # Let the user override the test.
5327else
5328as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5329for as_dir in $PATH
5330do
5331  IFS=$as_save_IFS
5332  case $as_dir in #(((
5333    '') as_dir=./ ;;
5334    */) ;;
5335    *) as_dir=$as_dir/ ;;
5336  esac
5337    for ac_exec_ext in '' $ac_executable_extensions; do
5338  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
5339    ac_cv_prog_CC="${ac_tool_prefix}clang"
5340    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
5341    break 2
5342  fi
5343done
5344  done
5345IFS=$as_save_IFS
5346
5347fi
5348fi
5349CC=$ac_cv_prog_CC
5350if test -n "$CC"; then
5351  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5352printf "%s\n" "$CC" >&6; }
5353else
5354  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5355printf "%s\n" "no" >&6; }
5356fi
5357
5358
5359fi
5360if test -z "$ac_cv_prog_CC"; then
5361  ac_ct_CC=$CC
5362  # Extract the first word of "clang", so it can be a program name with args.
5363set dummy clang; ac_word=$2
5364{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5365printf %s "checking for $ac_word... " >&6; }
5366if test ${ac_cv_prog_ac_ct_CC+y}
5367then :
5368  printf %s "(cached) " >&6
5369else $as_nop
5370  if test -n "$ac_ct_CC"; then
5371  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
5372else
5373as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5374for as_dir in $PATH
5375do
5376  IFS=$as_save_IFS
5377  case $as_dir in #(((
5378    '') as_dir=./ ;;
5379    */) ;;
5380    *) as_dir=$as_dir/ ;;
5381  esac
5382    for ac_exec_ext in '' $ac_executable_extensions; do
5383  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
5384    ac_cv_prog_ac_ct_CC="clang"
5385    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
5386    break 2
5387  fi
5388done
5389  done
5390IFS=$as_save_IFS
5391
5392fi
5393fi
5394ac_ct_CC=$ac_cv_prog_ac_ct_CC
5395if test -n "$ac_ct_CC"; then
5396  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
5397printf "%s\n" "$ac_ct_CC" >&6; }
5398else
5399  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5400printf "%s\n" "no" >&6; }
5401fi
5402
5403  if test "x$ac_ct_CC" = x; then
5404    CC=""
5405  else
5406    case $cross_compiling:$ac_tool_warned in
5407yes:)
5408{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5409printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5410ac_tool_warned=yes ;;
5411esac
5412    CC=$ac_ct_CC
5413  fi
5414else
5415  CC="$ac_cv_prog_CC"
5416fi
5417
5418fi
5419
5420
5421test -z "$CC" && { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5422printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
5423as_fn_error $? "no acceptable C compiler found in \$PATH
5424See \`config.log' for more details" "$LINENO" 5; }
5425
5426# Provide some information about the compiler.
5427printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
5428set X $ac_compile
5429ac_compiler=$2
5430for ac_option in --version -v -V -qversion -version; do
5431  { { ac_try="$ac_compiler $ac_option >&5"
5432case "(($ac_try" in
5433  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5434  *) ac_try_echo=$ac_try;;
5435esac
5436eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5437printf "%s\n" "$ac_try_echo"; } >&5
5438  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
5439  ac_status=$?
5440  if test -s conftest.err; then
5441    sed '10a\
5442... rest of stderr output deleted ...
5443         10q' conftest.err >conftest.er1
5444    cat conftest.er1 >&5
5445  fi
5446  rm -f conftest.er1 conftest.err
5447  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5448  test $ac_status = 0; }
5449done
5450
5451{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports GNU C" >&5
5452printf %s "checking whether the compiler supports GNU C... " >&6; }
5453if test ${ac_cv_c_compiler_gnu+y}
5454then :
5455  printf %s "(cached) " >&6
5456else $as_nop
5457  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5458/* end confdefs.h.  */
5459
5460int
5461main (void)
5462{
5463#ifndef __GNUC__
5464       choke me
5465#endif
5466
5467  ;
5468  return 0;
5469}
5470_ACEOF
5471if ac_fn_c_try_compile "$LINENO"
5472then :
5473  ac_compiler_gnu=yes
5474else $as_nop
5475  ac_compiler_gnu=no
5476fi
5477rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
5478ac_cv_c_compiler_gnu=$ac_compiler_gnu
5479
5480fi
5481{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
5482printf "%s\n" "$ac_cv_c_compiler_gnu" >&6; }
5483ac_compiler_gnu=$ac_cv_c_compiler_gnu
5484
5485if test $ac_compiler_gnu = yes; then
5486  GCC=yes
5487else
5488  GCC=
5489fi
5490ac_test_CFLAGS=${CFLAGS+y}
5491ac_save_CFLAGS=$CFLAGS
5492{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
5493printf %s "checking whether $CC accepts -g... " >&6; }
5494if test ${ac_cv_prog_cc_g+y}
5495then :
5496  printf %s "(cached) " >&6
5497else $as_nop
5498  ac_save_c_werror_flag=$ac_c_werror_flag
5499   ac_c_werror_flag=yes
5500   ac_cv_prog_cc_g=no
5501   CFLAGS="-g"
5502   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5503/* end confdefs.h.  */
5504
5505int
5506main (void)
5507{
5508
5509  ;
5510  return 0;
5511}
5512_ACEOF
5513if ac_fn_c_try_compile "$LINENO"
5514then :
5515  ac_cv_prog_cc_g=yes
5516else $as_nop
5517  CFLAGS=""
5518      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5519/* end confdefs.h.  */
5520
5521int
5522main (void)
5523{
5524
5525  ;
5526  return 0;
5527}
5528_ACEOF
5529if ac_fn_c_try_compile "$LINENO"
5530then :
5531
5532else $as_nop
5533  ac_c_werror_flag=$ac_save_c_werror_flag
5534	 CFLAGS="-g"
5535	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5536/* end confdefs.h.  */
5537
5538int
5539main (void)
5540{
5541
5542  ;
5543  return 0;
5544}
5545_ACEOF
5546if ac_fn_c_try_compile "$LINENO"
5547then :
5548  ac_cv_prog_cc_g=yes
5549fi
5550rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
5551fi
5552rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
5553fi
5554rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
5555   ac_c_werror_flag=$ac_save_c_werror_flag
5556fi
5557{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
5558printf "%s\n" "$ac_cv_prog_cc_g" >&6; }
5559if test $ac_test_CFLAGS; then
5560  CFLAGS=$ac_save_CFLAGS
5561elif test $ac_cv_prog_cc_g = yes; then
5562  if test "$GCC" = yes; then
5563    CFLAGS="-g -O2"
5564  else
5565    CFLAGS="-g"
5566  fi
5567else
5568  if test "$GCC" = yes; then
5569    CFLAGS="-O2"
5570  else
5571    CFLAGS=
5572  fi
5573fi
5574ac_prog_cc_stdc=no
5575if test x$ac_prog_cc_stdc = xno
5576then :
5577  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C11 features" >&5
5578printf %s "checking for $CC option to enable C11 features... " >&6; }
5579if test ${ac_cv_prog_cc_c11+y}
5580then :
5581  printf %s "(cached) " >&6
5582else $as_nop
5583  ac_cv_prog_cc_c11=no
5584ac_save_CC=$CC
5585cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5586/* end confdefs.h.  */
5587$ac_c_conftest_c11_program
5588_ACEOF
5589for ac_arg in '' -std=gnu11
5590do
5591  CC="$ac_save_CC $ac_arg"
5592  if ac_fn_c_try_compile "$LINENO"
5593then :
5594  ac_cv_prog_cc_c11=$ac_arg
5595fi
5596rm -f core conftest.err conftest.$ac_objext conftest.beam
5597  test "x$ac_cv_prog_cc_c11" != "xno" && break
5598done
5599rm -f conftest.$ac_ext
5600CC=$ac_save_CC
5601fi
5602
5603if test "x$ac_cv_prog_cc_c11" = xno
5604then :
5605  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
5606printf "%s\n" "unsupported" >&6; }
5607else $as_nop
5608  if test "x$ac_cv_prog_cc_c11" = x
5609then :
5610  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
5611printf "%s\n" "none needed" >&6; }
5612else $as_nop
5613  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c11" >&5
5614printf "%s\n" "$ac_cv_prog_cc_c11" >&6; }
5615     CC="$CC $ac_cv_prog_cc_c11"
5616fi
5617  ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c11
5618  ac_prog_cc_stdc=c11
5619fi
5620fi
5621if test x$ac_prog_cc_stdc = xno
5622then :
5623  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C99 features" >&5
5624printf %s "checking for $CC option to enable C99 features... " >&6; }
5625if test ${ac_cv_prog_cc_c99+y}
5626then :
5627  printf %s "(cached) " >&6
5628else $as_nop
5629  ac_cv_prog_cc_c99=no
5630ac_save_CC=$CC
5631cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5632/* end confdefs.h.  */
5633$ac_c_conftest_c99_program
5634_ACEOF
5635for ac_arg in '' -std=gnu99 -std=c99 -c99 -qlanglvl=extc1x -qlanglvl=extc99 -AC99 -D_STDC_C99=
5636do
5637  CC="$ac_save_CC $ac_arg"
5638  if ac_fn_c_try_compile "$LINENO"
5639then :
5640  ac_cv_prog_cc_c99=$ac_arg
5641fi
5642rm -f core conftest.err conftest.$ac_objext conftest.beam
5643  test "x$ac_cv_prog_cc_c99" != "xno" && break
5644done
5645rm -f conftest.$ac_ext
5646CC=$ac_save_CC
5647fi
5648
5649if test "x$ac_cv_prog_cc_c99" = xno
5650then :
5651  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
5652printf "%s\n" "unsupported" >&6; }
5653else $as_nop
5654  if test "x$ac_cv_prog_cc_c99" = x
5655then :
5656  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
5657printf "%s\n" "none needed" >&6; }
5658else $as_nop
5659  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5
5660printf "%s\n" "$ac_cv_prog_cc_c99" >&6; }
5661     CC="$CC $ac_cv_prog_cc_c99"
5662fi
5663  ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99
5664  ac_prog_cc_stdc=c99
5665fi
5666fi
5667if test x$ac_prog_cc_stdc = xno
5668then :
5669  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C89 features" >&5
5670printf %s "checking for $CC option to enable C89 features... " >&6; }
5671if test ${ac_cv_prog_cc_c89+y}
5672then :
5673  printf %s "(cached) " >&6
5674else $as_nop
5675  ac_cv_prog_cc_c89=no
5676ac_save_CC=$CC
5677cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5678/* end confdefs.h.  */
5679$ac_c_conftest_c89_program
5680_ACEOF
5681for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
5682do
5683  CC="$ac_save_CC $ac_arg"
5684  if ac_fn_c_try_compile "$LINENO"
5685then :
5686  ac_cv_prog_cc_c89=$ac_arg
5687fi
5688rm -f core conftest.err conftest.$ac_objext conftest.beam
5689  test "x$ac_cv_prog_cc_c89" != "xno" && break
5690done
5691rm -f conftest.$ac_ext
5692CC=$ac_save_CC
5693fi
5694
5695if test "x$ac_cv_prog_cc_c89" = xno
5696then :
5697  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
5698printf "%s\n" "unsupported" >&6; }
5699else $as_nop
5700  if test "x$ac_cv_prog_cc_c89" = x
5701then :
5702  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
5703printf "%s\n" "none needed" >&6; }
5704else $as_nop
5705  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
5706printf "%s\n" "$ac_cv_prog_cc_c89" >&6; }
5707     CC="$CC $ac_cv_prog_cc_c89"
5708fi
5709  ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89
5710  ac_prog_cc_stdc=c89
5711fi
5712fi
5713
5714ac_ext=c
5715ac_cpp='$CPP $CPPFLAGS'
5716ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5717ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5718ac_compiler_gnu=$ac_cv_c_compiler_gnu
5719
5720
5721{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking $CC dependency flag" >&5
5722printf %s "checking $CC dependency flag... " >&6; }
5723echo 'void f(void){}' >conftest.c
5724if test "`$CC -MM conftest.c 2>&1`" = "conftest.o: conftest.c"; then
5725	DEPFLAG="-MM"
5726else
5727  if test "`$CC -xM1 conftest.c 2>&1`" = "conftest.o: conftest.c"; then
5728	DEPFLAG="-xM1"
5729  else
5730	DEPFLAG="-MM"  # dunno do something
5731  fi
5732fi
5733{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $DEPFLAG" >&5
5734printf "%s\n" "$DEPFLAG" >&6; }
5735rm -f conftest.c
5736
5737
5738
5739
5740
5741{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Werror" >&5
5742printf %s "checking whether $CC supports -Werror... " >&6; }
5743cache=`echo Werror | sed 'y%.=/+-%___p_%'`
5744if eval test \${cv_prog_cc_flag_$cache+y}
5745then :
5746  printf %s "(cached) " >&6
5747else $as_nop
5748
5749echo 'void f(void){}' >conftest.c
5750if test -z "`$CC $CPPFLAGS $CFLAGS -Werror -c conftest.c 2>&1`"; then
5751eval "cv_prog_cc_flag_$cache=yes"
5752else
5753eval "cv_prog_cc_flag_$cache=no"
5754fi
5755rm -f conftest conftest.o conftest.c
5756
5757fi
5758
5759if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
5760{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5761printf "%s\n" "yes" >&6; }
5762:
5763ERRFLAG="-Werror"
5764else
5765{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5766printf "%s\n" "no" >&6; }
5767:
5768ERRFLAG="-errwarn"
5769fi
5770
5771
5772
5773{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wall" >&5
5774printf %s "checking whether $CC supports -Wall... " >&6; }
5775cache=`echo Wall | sed 'y%.=/+-%___p_%'`
5776if eval test \${cv_prog_cc_flag_$cache+y}
5777then :
5778  printf %s "(cached) " >&6
5779else $as_nop
5780
5781echo 'void f(void){}' >conftest.c
5782if test -z "`$CC $CPPFLAGS $CFLAGS -Wall -c conftest.c 2>&1`"; then
5783eval "cv_prog_cc_flag_$cache=yes"
5784else
5785eval "cv_prog_cc_flag_$cache=no"
5786fi
5787rm -f conftest conftest.o conftest.c
5788
5789fi
5790
5791if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
5792{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5793printf "%s\n" "yes" >&6; }
5794:
5795ERRFLAG="$ERRFLAG -Wall"
5796else
5797{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5798printf "%s\n" "no" >&6; }
5799:
5800ERRFLAG="$ERRFLAG -errfmt"
5801fi
5802
5803
5804
5805
5806
5807{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -std=c99" >&5
5808printf %s "checking whether $CC supports -std=c99... " >&6; }
5809cache=`echo std=c99 | sed 'y%.=/+-%___p_%'`
5810if eval test \${cv_prog_cc_flag_$cache+y}
5811then :
5812  printf %s "(cached) " >&6
5813else $as_nop
5814
5815echo 'void f(void){}' >conftest.c
5816if test -z "`$CC $CPPFLAGS $CFLAGS -std=c99 -c conftest.c 2>&1`"; then
5817eval "cv_prog_cc_flag_$cache=yes"
5818else
5819eval "cv_prog_cc_flag_$cache=no"
5820fi
5821rm -f conftest conftest.o conftest.c
5822
5823fi
5824
5825if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
5826{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5827printf "%s\n" "yes" >&6; }
5828:
5829C99FLAG="-std=c99"
5830else
5831{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5832printf "%s\n" "no" >&6; }
5833:
5834
5835fi
5836
5837
5838
5839{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -xc99" >&5
5840printf %s "checking whether $CC supports -xc99... " >&6; }
5841cache=`echo xc99 | sed 'y%.=/+-%___p_%'`
5842if eval test \${cv_prog_cc_flag_$cache+y}
5843then :
5844  printf %s "(cached) " >&6
5845else $as_nop
5846
5847echo 'void f(void){}' >conftest.c
5848if test -z "`$CC $CPPFLAGS $CFLAGS -xc99 -c conftest.c 2>&1`"; then
5849eval "cv_prog_cc_flag_$cache=yes"
5850else
5851eval "cv_prog_cc_flag_$cache=no"
5852fi
5853rm -f conftest conftest.o conftest.c
5854
5855fi
5856
5857if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
5858{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5859printf "%s\n" "yes" >&6; }
5860:
5861C99FLAG="-xc99"
5862else
5863{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5864printf "%s\n" "no" >&6; }
5865:
5866
5867fi
5868
5869
5870ac_fn_c_check_header_compile "$LINENO" "getopt.h" "ac_cv_header_getopt_h" "$ac_includes_default
5871"
5872if test "x$ac_cv_header_getopt_h" = xyes
5873then :
5874  printf "%s\n" "#define HAVE_GETOPT_H 1" >>confdefs.h
5875
5876fi
5877ac_fn_c_check_header_compile "$LINENO" "time.h" "ac_cv_header_time_h" "$ac_includes_default
5878"
5879if test "x$ac_cv_header_time_h" = xyes
5880then :
5881  printf "%s\n" "#define HAVE_TIME_H 1" >>confdefs.h
5882
5883fi
5884
5885
5886
5887
5888
5889{ 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
5890printf %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; }
5891cache=`printf "%s\n" "$C99FLAG -D__EXTENSIONS__ -D_BSD_SOURCE -D_DEFAULT_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -D_XOPEN_SOURCE_EXTENDED=1 -D_ALL_SOURCE" | $as_tr_sh`
5892if eval test \${cv_prog_cc_flag_needed_$cache+y}
5893then :
5894  printf %s "(cached) " >&6
5895else $as_nop
5896
5897echo '
5898#include "confdefs.h"
5899#include <stdlib.h>
5900#include <ctype.h>
5901#include <sys/time.h>
5902#ifdef HAVE_TIME_H
5903#include <time.h>
5904#endif
5905#include <unistd.h>
5906#include <netdb.h>
5907#ifdef HAVE_GETOPT_H
5908#include <getopt.h>
5909#endif
5910
5911int test(void) {
5912	int a;
5913	char **opts = NULL;
5914	struct timeval tv;
5915	char *t;
5916	time_t time = 0;
5917	char *buf = NULL;
5918	const char* str = NULL;
5919	struct msghdr msg;
5920	msg.msg_control = 0;
5921	t = ctime_r(&time, buf);
5922	tv.tv_usec = 10;
5923	srandom(32);
5924	a = getopt(2, opts, "a");
5925	a = isascii(32);
5926	str = gai_strerror(0);
5927	if(str && t && tv.tv_usec && msg.msg_control)
5928		a = 0;
5929	return a;
5930}
5931' > conftest.c
5932echo 'void f(void){}' >>conftest.c
5933if test -z "`$CC $CPPFLAGS $CFLAGS $ERRFLAG -c conftest.c 2>&1`"; then
5934eval "cv_prog_cc_flag_needed_$cache=no"
5935else
5936
5937if 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
5938eval "cv_prog_cc_flag_needed_$cache=yes"
5939else
5940eval "cv_prog_cc_flag_needed_$cache=fail"
5941#echo 'Test with flag fails too!'
5942#cat conftest.c
5943#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"
5944#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`
5945#exit 1
5946fi
5947
5948fi
5949rm -f conftest conftest.c conftest.o
5950
5951fi
5952
5953if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = yes"; then
5954{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5955printf "%s\n" "yes" >&6; }
5956:
5957CFLAGS="$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"
5958else
5959if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = no"; then
5960{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5961printf "%s\n" "no" >&6; }
5962#echo 'Test with flag is no!'
5963#cat conftest.c
5964#echo "$CC $CPPFLAGS $CFLAGS $C99FLAG -D__EXTENSIONS__ -D_BSD_SOURCE -D_DEFAULT_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -D_XOPEN_SOURCE_EXTENDED=1 -D_ALL_SOURCE $ERRFLAG -c conftest.c 2>&1"
5965#echo `$CC $CPPFLAGS $CFLAGS $C99FLAG -D__EXTENSIONS__ -D_BSD_SOURCE -D_DEFAULT_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -D_XOPEN_SOURCE_EXTENDED=1 -D_ALL_SOURCE $ERRFLAG -c conftest.c 2>&1`
5966#exit 1
5967:
5968
5969else
5970{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: failed" >&5
5971printf "%s\n" "failed" >&6; }
5972:
5973
5974fi
5975fi
5976
5977
5978
5979
5980
5981{ 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
5982printf %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; }
5983cache=`printf "%s\n" "$C99FLAG -D__EXTENSIONS__ -D_BSD_SOURCE -D_DEFAULT_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -D_ALL_SOURCE" | $as_tr_sh`
5984if eval test \${cv_prog_cc_flag_needed_$cache+y}
5985then :
5986  printf %s "(cached) " >&6
5987else $as_nop
5988
5989echo '
5990#include "confdefs.h"
5991#include <stdlib.h>
5992#include <ctype.h>
5993#include <sys/time.h>
5994#ifdef HAVE_TIME_H
5995#include <time.h>
5996#endif
5997#include <unistd.h>
5998#include <netdb.h>
5999#ifdef HAVE_GETOPT_H
6000#include <getopt.h>
6001#endif
6002
6003int test(void) {
6004	int a;
6005	char **opts = NULL;
6006	struct timeval tv;
6007	char *t;
6008	time_t time = 0;
6009	char *buf = NULL;
6010	const char* str = NULL;
6011	struct msghdr msg;
6012	msg.msg_control = 0;
6013	t = ctime_r(&time, buf);
6014	tv.tv_usec = 10;
6015	srandom(32);
6016	a = getopt(2, opts, "a");
6017	a = isascii(32);
6018	str = gai_strerror(0);
6019	if(str && t && tv.tv_usec && msg.msg_control)
6020		a = 0;
6021	return a;
6022}
6023' > conftest.c
6024echo 'void f(void){}' >>conftest.c
6025if test -z "`$CC $CPPFLAGS $CFLAGS $ERRFLAG -c conftest.c 2>&1`"; then
6026eval "cv_prog_cc_flag_needed_$cache=no"
6027else
6028
6029if 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
6030eval "cv_prog_cc_flag_needed_$cache=yes"
6031else
6032eval "cv_prog_cc_flag_needed_$cache=fail"
6033#echo 'Test with flag fails too!'
6034#cat conftest.c
6035#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"
6036#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`
6037#exit 1
6038fi
6039
6040fi
6041rm -f conftest conftest.c conftest.o
6042
6043fi
6044
6045if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = yes"; then
6046{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6047printf "%s\n" "yes" >&6; }
6048:
6049CFLAGS="$CFLAGS $C99FLAG -D__EXTENSIONS__ -D_BSD_SOURCE -D_DEFAULT_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -D_ALL_SOURCE"
6050else
6051if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = no"; then
6052{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6053printf "%s\n" "no" >&6; }
6054#echo 'Test with flag is no!'
6055#cat conftest.c
6056#echo "$CC $CPPFLAGS $CFLAGS $C99FLAG -D__EXTENSIONS__ -D_BSD_SOURCE -D_DEFAULT_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -D_ALL_SOURCE $ERRFLAG -c conftest.c 2>&1"
6057#echo `$CC $CPPFLAGS $CFLAGS $C99FLAG -D__EXTENSIONS__ -D_BSD_SOURCE -D_DEFAULT_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -D_ALL_SOURCE $ERRFLAG -c conftest.c 2>&1`
6058#exit 1
6059:
6060
6061else
6062{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: failed" >&5
6063printf "%s\n" "failed" >&6; }
6064:
6065
6066fi
6067fi
6068
6069
6070
6071
6072
6073{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we need $C99FLAG as a flag for $CC" >&5
6074printf %s "checking whether we need $C99FLAG as a flag for $CC... " >&6; }
6075cache=`printf "%s\n" "$C99FLAG" | $as_tr_sh`
6076if eval test \${cv_prog_cc_flag_needed_$cache+y}
6077then :
6078  printf %s "(cached) " >&6
6079else $as_nop
6080
6081echo '
6082#include <stdbool.h>
6083#include <ctype.h>
6084int test(void) {
6085        int a = 0;
6086        return a;
6087}
6088' > conftest.c
6089echo 'void f(void){}' >>conftest.c
6090if test -z "`$CC $CPPFLAGS $CFLAGS $ERRFLAG -c conftest.c 2>&1`"; then
6091eval "cv_prog_cc_flag_needed_$cache=no"
6092else
6093
6094if test -z "`$CC $CPPFLAGS $CFLAGS $C99FLAG $ERRFLAG -c conftest.c 2>&1`"; then
6095eval "cv_prog_cc_flag_needed_$cache=yes"
6096else
6097eval "cv_prog_cc_flag_needed_$cache=fail"
6098#echo 'Test with flag fails too!'
6099#cat conftest.c
6100#echo "$CC $CPPFLAGS $CFLAGS $C99FLAG $ERRFLAG -c conftest.c 2>&1"
6101#echo `$CC $CPPFLAGS $CFLAGS $C99FLAG $ERRFLAG -c conftest.c 2>&1`
6102#exit 1
6103fi
6104
6105fi
6106rm -f conftest conftest.c conftest.o
6107
6108fi
6109
6110if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = yes"; then
6111{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6112printf "%s\n" "yes" >&6; }
6113:
6114CFLAGS="$CFLAGS $C99FLAG"
6115else
6116if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = no"; then
6117{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6118printf "%s\n" "no" >&6; }
6119#echo 'Test with flag is no!'
6120#cat conftest.c
6121#echo "$CC $CPPFLAGS $CFLAGS $C99FLAG $ERRFLAG -c conftest.c 2>&1"
6122#echo `$CC $CPPFLAGS $CFLAGS $C99FLAG $ERRFLAG -c conftest.c 2>&1`
6123#exit 1
6124:
6125
6126else
6127{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: failed" >&5
6128printf "%s\n" "failed" >&6; }
6129:
6130
6131fi
6132fi
6133
6134
6135
6136
6137
6138{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we need -D_BSD_SOURCE -D_DEFAULT_SOURCE as a flag for $CC" >&5
6139printf %s "checking whether we need -D_BSD_SOURCE -D_DEFAULT_SOURCE as a flag for $CC... " >&6; }
6140cache=_D_BSD_SOURCE__D_DEFAULT_SOURCE
6141if eval test \${cv_prog_cc_flag_needed_$cache+y}
6142then :
6143  printf %s "(cached) " >&6
6144else $as_nop
6145
6146echo '
6147#include <ctype.h>
6148
6149int test(void) {
6150        int a;
6151        a = isascii(32);
6152        return a;
6153}
6154' > conftest.c
6155echo 'void f(void){}' >>conftest.c
6156if test -z "`$CC $CPPFLAGS $CFLAGS $ERRFLAG -c conftest.c 2>&1`"; then
6157eval "cv_prog_cc_flag_needed_$cache=no"
6158else
6159
6160if test -z "`$CC $CPPFLAGS $CFLAGS -D_BSD_SOURCE -D_DEFAULT_SOURCE $ERRFLAG -c conftest.c 2>&1`"; then
6161eval "cv_prog_cc_flag_needed_$cache=yes"
6162else
6163eval "cv_prog_cc_flag_needed_$cache=fail"
6164#echo 'Test with flag fails too!'
6165#cat conftest.c
6166#echo "$CC $CPPFLAGS $CFLAGS -D_BSD_SOURCE -D_DEFAULT_SOURCE $ERRFLAG -c conftest.c 2>&1"
6167#echo `$CC $CPPFLAGS $CFLAGS -D_BSD_SOURCE -D_DEFAULT_SOURCE $ERRFLAG -c conftest.c 2>&1`
6168#exit 1
6169fi
6170
6171fi
6172rm -f conftest conftest.c conftest.o
6173
6174fi
6175
6176if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = yes"; then
6177{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6178printf "%s\n" "yes" >&6; }
6179:
6180CFLAGS="$CFLAGS -D_BSD_SOURCE -D_DEFAULT_SOURCE"
6181else
6182if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = no"; then
6183{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6184printf "%s\n" "no" >&6; }
6185#echo 'Test with flag is no!'
6186#cat conftest.c
6187#echo "$CC $CPPFLAGS $CFLAGS -D_BSD_SOURCE -D_DEFAULT_SOURCE $ERRFLAG -c conftest.c 2>&1"
6188#echo `$CC $CPPFLAGS $CFLAGS -D_BSD_SOURCE -D_DEFAULT_SOURCE $ERRFLAG -c conftest.c 2>&1`
6189#exit 1
6190:
6191
6192else
6193{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: failed" >&5
6194printf "%s\n" "failed" >&6; }
6195:
6196
6197fi
6198fi
6199
6200
6201
6202
6203
6204{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we need -D_GNU_SOURCE as a flag for $CC" >&5
6205printf %s "checking whether we need -D_GNU_SOURCE as a flag for $CC... " >&6; }
6206cache=_D_GNU_SOURCE
6207if eval test \${cv_prog_cc_flag_needed_$cache+y}
6208then :
6209  printf %s "(cached) " >&6
6210else $as_nop
6211
6212echo '
6213#include <netinet/in.h>
6214
6215int test(void) {
6216        struct in6_pktinfo inf;
6217	int a = (int)sizeof(inf);
6218        return a;
6219}
6220' > conftest.c
6221echo 'void f(void){}' >>conftest.c
6222if test -z "`$CC $CPPFLAGS $CFLAGS $ERRFLAG -c conftest.c 2>&1`"; then
6223eval "cv_prog_cc_flag_needed_$cache=no"
6224else
6225
6226if test -z "`$CC $CPPFLAGS $CFLAGS -D_GNU_SOURCE $ERRFLAG -c conftest.c 2>&1`"; then
6227eval "cv_prog_cc_flag_needed_$cache=yes"
6228else
6229eval "cv_prog_cc_flag_needed_$cache=fail"
6230#echo 'Test with flag fails too!'
6231#cat conftest.c
6232#echo "$CC $CPPFLAGS $CFLAGS -D_GNU_SOURCE $ERRFLAG -c conftest.c 2>&1"
6233#echo `$CC $CPPFLAGS $CFLAGS -D_GNU_SOURCE $ERRFLAG -c conftest.c 2>&1`
6234#exit 1
6235fi
6236
6237fi
6238rm -f conftest conftest.c conftest.o
6239
6240fi
6241
6242if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = yes"; then
6243{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6244printf "%s\n" "yes" >&6; }
6245:
6246CFLAGS="$CFLAGS -D_GNU_SOURCE"
6247else
6248if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = no"; then
6249{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6250printf "%s\n" "no" >&6; }
6251#echo 'Test with flag is no!'
6252#cat conftest.c
6253#echo "$CC $CPPFLAGS $CFLAGS -D_GNU_SOURCE $ERRFLAG -c conftest.c 2>&1"
6254#echo `$CC $CPPFLAGS $CFLAGS -D_GNU_SOURCE $ERRFLAG -c conftest.c 2>&1`
6255#exit 1
6256:
6257
6258else
6259{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: failed" >&5
6260printf "%s\n" "failed" >&6; }
6261:
6262
6263fi
6264fi
6265
6266
6267# check again for GNU_SOURCE for setresgid. May fail if setresgid
6268# is not available at all. -D_FRSRESGID is to make this check unique.
6269# otherwise we would get the previous cached result.
6270
6271
6272
6273{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we need -D_GNU_SOURCE -D_FRSRESGID as a flag for $CC" >&5
6274printf %s "checking whether we need -D_GNU_SOURCE -D_FRSRESGID as a flag for $CC... " >&6; }
6275cache=_D_GNU_SOURCE__D_FRSRESGID
6276if eval test \${cv_prog_cc_flag_needed_$cache+y}
6277then :
6278  printf %s "(cached) " >&6
6279else $as_nop
6280
6281echo '
6282#include <unistd.h>
6283
6284int test(void) {
6285	int a = setresgid(0,0,0);
6286	a = setresuid(0,0,0);
6287        return a;
6288}
6289' > conftest.c
6290echo 'void f(void){}' >>conftest.c
6291if test -z "`$CC $CPPFLAGS $CFLAGS $ERRFLAG -c conftest.c 2>&1`"; then
6292eval "cv_prog_cc_flag_needed_$cache=no"
6293else
6294
6295if test -z "`$CC $CPPFLAGS $CFLAGS -D_GNU_SOURCE -D_FRSRESGID $ERRFLAG -c conftest.c 2>&1`"; then
6296eval "cv_prog_cc_flag_needed_$cache=yes"
6297else
6298eval "cv_prog_cc_flag_needed_$cache=fail"
6299#echo 'Test with flag fails too!'
6300#cat conftest.c
6301#echo "$CC $CPPFLAGS $CFLAGS -D_GNU_SOURCE -D_FRSRESGID $ERRFLAG -c conftest.c 2>&1"
6302#echo `$CC $CPPFLAGS $CFLAGS -D_GNU_SOURCE -D_FRSRESGID $ERRFLAG -c conftest.c 2>&1`
6303#exit 1
6304fi
6305
6306fi
6307rm -f conftest conftest.c conftest.o
6308
6309fi
6310
6311if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = yes"; then
6312{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6313printf "%s\n" "yes" >&6; }
6314:
6315CFLAGS="$CFLAGS -D_GNU_SOURCE"
6316else
6317if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = no"; then
6318{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6319printf "%s\n" "no" >&6; }
6320#echo 'Test with flag is no!'
6321#cat conftest.c
6322#echo "$CC $CPPFLAGS $CFLAGS -D_GNU_SOURCE -D_FRSRESGID $ERRFLAG -c conftest.c 2>&1"
6323#echo `$CC $CPPFLAGS $CFLAGS -D_GNU_SOURCE -D_FRSRESGID $ERRFLAG -c conftest.c 2>&1`
6324#exit 1
6325:
6326
6327else
6328{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: failed" >&5
6329printf "%s\n" "failed" >&6; }
6330:
6331
6332fi
6333fi
6334
6335
6336
6337
6338
6339{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we need -D_POSIX_C_SOURCE=200112 as a flag for $CC" >&5
6340printf %s "checking whether we need -D_POSIX_C_SOURCE=200112 as a flag for $CC... " >&6; }
6341cache=_D_POSIX_C_SOURCE_200112
6342if eval test \${cv_prog_cc_flag_needed_$cache+y}
6343then :
6344  printf %s "(cached) " >&6
6345else $as_nop
6346
6347echo '
6348#include "confdefs.h"
6349#ifdef HAVE_TIME_H
6350#include <time.h>
6351#endif
6352#include <netdb.h>
6353
6354int test(void) {
6355        int a = 0;
6356        char *t;
6357        time_t time = 0;
6358        char *buf = NULL;
6359	const char* str = NULL;
6360        t = ctime_r(&time, buf);
6361	str = gai_strerror(0);
6362	if(t && str)
6363		a = 0;
6364        return a;
6365}
6366' > conftest.c
6367echo 'void f(void){}' >>conftest.c
6368if test -z "`$CC $CPPFLAGS $CFLAGS $ERRFLAG -c conftest.c 2>&1`"; then
6369eval "cv_prog_cc_flag_needed_$cache=no"
6370else
6371
6372if test -z "`$CC $CPPFLAGS $CFLAGS -D_POSIX_C_SOURCE=200112 $ERRFLAG -c conftest.c 2>&1`"; then
6373eval "cv_prog_cc_flag_needed_$cache=yes"
6374else
6375eval "cv_prog_cc_flag_needed_$cache=fail"
6376#echo 'Test with flag fails too!'
6377#cat conftest.c
6378#echo "$CC $CPPFLAGS $CFLAGS -D_POSIX_C_SOURCE=200112 $ERRFLAG -c conftest.c 2>&1"
6379#echo `$CC $CPPFLAGS $CFLAGS -D_POSIX_C_SOURCE=200112 $ERRFLAG -c conftest.c 2>&1`
6380#exit 1
6381fi
6382
6383fi
6384rm -f conftest conftest.c conftest.o
6385
6386fi
6387
6388if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = yes"; then
6389{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6390printf "%s\n" "yes" >&6; }
6391:
6392CFLAGS="$CFLAGS -D_POSIX_C_SOURCE=200112"
6393else
6394if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = no"; then
6395{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6396printf "%s\n" "no" >&6; }
6397#echo 'Test with flag is no!'
6398#cat conftest.c
6399#echo "$CC $CPPFLAGS $CFLAGS -D_POSIX_C_SOURCE=200112 $ERRFLAG -c conftest.c 2>&1"
6400#echo `$CC $CPPFLAGS $CFLAGS -D_POSIX_C_SOURCE=200112 $ERRFLAG -c conftest.c 2>&1`
6401#exit 1
6402:
6403
6404else
6405{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: failed" >&5
6406printf "%s\n" "failed" >&6; }
6407:
6408
6409fi
6410fi
6411
6412
6413
6414
6415
6416{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we need -D__EXTENSIONS__ as a flag for $CC" >&5
6417printf %s "checking whether we need -D__EXTENSIONS__ as a flag for $CC... " >&6; }
6418cache=_D__EXTENSIONS__
6419if eval test \${cv_prog_cc_flag_needed_$cache+y}
6420then :
6421  printf %s "(cached) " >&6
6422else $as_nop
6423
6424echo '
6425#include "confdefs.h"
6426#include <stdlib.h>
6427#include <ctype.h>
6428#include <sys/time.h>
6429#ifdef HAVE_TIME_H
6430#include <time.h>
6431#endif
6432#include <unistd.h>
6433#ifdef HAVE_GETOPT_H
6434#include <getopt.h>
6435#endif
6436
6437int test(void) {
6438        int a;
6439        char **opts = NULL;
6440        struct timeval tv;
6441        tv.tv_usec = 10;
6442        srandom(32);
6443        a = getopt(2, opts, "a");
6444        a = isascii(32);
6445	if(tv.tv_usec)
6446		a = 0;
6447        return a;
6448}
6449' > conftest.c
6450echo 'void f(void){}' >>conftest.c
6451if test -z "`$CC $CPPFLAGS $CFLAGS $ERRFLAG -c conftest.c 2>&1`"; then
6452eval "cv_prog_cc_flag_needed_$cache=no"
6453else
6454
6455if test -z "`$CC $CPPFLAGS $CFLAGS -D__EXTENSIONS__ $ERRFLAG -c conftest.c 2>&1`"; then
6456eval "cv_prog_cc_flag_needed_$cache=yes"
6457else
6458eval "cv_prog_cc_flag_needed_$cache=fail"
6459#echo 'Test with flag fails too!'
6460#cat conftest.c
6461#echo "$CC $CPPFLAGS $CFLAGS -D__EXTENSIONS__ $ERRFLAG -c conftest.c 2>&1"
6462#echo `$CC $CPPFLAGS $CFLAGS -D__EXTENSIONS__ $ERRFLAG -c conftest.c 2>&1`
6463#exit 1
6464fi
6465
6466fi
6467rm -f conftest conftest.c conftest.o
6468
6469fi
6470
6471if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = yes"; then
6472{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6473printf "%s\n" "yes" >&6; }
6474:
6475CFLAGS="$CFLAGS -D__EXTENSIONS__"
6476else
6477if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = no"; then
6478{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6479printf "%s\n" "no" >&6; }
6480#echo 'Test with flag is no!'
6481#cat conftest.c
6482#echo "$CC $CPPFLAGS $CFLAGS -D__EXTENSIONS__ $ERRFLAG -c conftest.c 2>&1"
6483#echo `$CC $CPPFLAGS $CFLAGS -D__EXTENSIONS__ $ERRFLAG -c conftest.c 2>&1`
6484#exit 1
6485:
6486
6487else
6488{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: failed" >&5
6489printf "%s\n" "failed" >&6; }
6490:
6491
6492fi
6493fi
6494
6495
6496
6497
6498# debug mode flags warnings
6499# Check whether --enable-checking was given.
6500if test ${enable_checking+y}
6501then :
6502  enableval=$enable_checking;
6503fi
6504
6505# Check whether --enable-debug was given.
6506if test ${enable_debug+y}
6507then :
6508  enableval=$enable_debug;
6509fi
6510
6511if test "$enable_debug" = "yes"; then debug_enabled="$enable_debug";
6512else debug_enabled="$enable_checking"; fi
6513
6514case "$debug_enabled" in
6515        yes)
6516
6517
6518{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -W" >&5
6519printf %s "checking whether $CC supports -W... " >&6; }
6520cache=`echo W | sed 'y%.=/+-%___p_%'`
6521if eval test \${cv_prog_cc_flag_$cache+y}
6522then :
6523  printf %s "(cached) " >&6
6524else $as_nop
6525
6526echo 'void f(void){}' >conftest.c
6527if test -z "`$CC $CPPFLAGS $CFLAGS -W -c conftest.c 2>&1`"; then
6528eval "cv_prog_cc_flag_$cache=yes"
6529else
6530eval "cv_prog_cc_flag_$cache=no"
6531fi
6532rm -f conftest conftest.o conftest.c
6533
6534fi
6535
6536if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
6537{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6538printf "%s\n" "yes" >&6; }
6539:
6540CFLAGS="$CFLAGS -W"
6541else
6542{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6543printf "%s\n" "no" >&6; }
6544:
6545
6546fi
6547
6548
6549
6550{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wall" >&5
6551printf %s "checking whether $CC supports -Wall... " >&6; }
6552cache=`echo Wall | sed 'y%.=/+-%___p_%'`
6553if eval test \${cv_prog_cc_flag_$cache+y}
6554then :
6555  printf %s "(cached) " >&6
6556else $as_nop
6557
6558echo 'void f(void){}' >conftest.c
6559if test -z "`$CC $CPPFLAGS $CFLAGS -Wall -c conftest.c 2>&1`"; then
6560eval "cv_prog_cc_flag_$cache=yes"
6561else
6562eval "cv_prog_cc_flag_$cache=no"
6563fi
6564rm -f conftest conftest.o conftest.c
6565
6566fi
6567
6568if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
6569{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6570printf "%s\n" "yes" >&6; }
6571:
6572CFLAGS="$CFLAGS -Wall"
6573else
6574{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6575printf "%s\n" "no" >&6; }
6576:
6577
6578fi
6579
6580
6581
6582{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wextra" >&5
6583printf %s "checking whether $CC supports -Wextra... " >&6; }
6584cache=`echo Wextra | sed 'y%.=/+-%___p_%'`
6585if eval test \${cv_prog_cc_flag_$cache+y}
6586then :
6587  printf %s "(cached) " >&6
6588else $as_nop
6589
6590echo 'void f(void){}' >conftest.c
6591if test -z "`$CC $CPPFLAGS $CFLAGS -Wextra -c conftest.c 2>&1`"; then
6592eval "cv_prog_cc_flag_$cache=yes"
6593else
6594eval "cv_prog_cc_flag_$cache=no"
6595fi
6596rm -f conftest conftest.o conftest.c
6597
6598fi
6599
6600if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
6601{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6602printf "%s\n" "yes" >&6; }
6603:
6604CFLAGS="$CFLAGS -Wextra"
6605else
6606{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6607printf "%s\n" "no" >&6; }
6608:
6609
6610fi
6611
6612
6613
6614{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wdeclaration-after-statement" >&5
6615printf %s "checking whether $CC supports -Wdeclaration-after-statement... " >&6; }
6616cache=`echo Wdeclaration-after-statement | sed 'y%.=/+-%___p_%'`
6617if eval test \${cv_prog_cc_flag_$cache+y}
6618then :
6619  printf %s "(cached) " >&6
6620else $as_nop
6621
6622echo 'void f(void){}' >conftest.c
6623if test -z "`$CC $CPPFLAGS $CFLAGS -Wdeclaration-after-statement -c conftest.c 2>&1`"; then
6624eval "cv_prog_cc_flag_$cache=yes"
6625else
6626eval "cv_prog_cc_flag_$cache=no"
6627fi
6628rm -f conftest conftest.o conftest.c
6629
6630fi
6631
6632if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
6633{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6634printf "%s\n" "yes" >&6; }
6635:
6636CFLAGS="$CFLAGS -Wdeclaration-after-statement"
6637else
6638{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6639printf "%s\n" "no" >&6; }
6640:
6641
6642fi
6643
6644
6645printf "%s\n" "#define UNBOUND_DEBUG /**/" >>confdefs.h
6646
6647		;;
6648	no|*)
6649		# nothing to do.
6650		;;
6651esac
6652if test "$default_cflags" = "yes"; then
6653	# only when CFLAGS was "" at the start, if the users wants to
6654	# override we shouldn't add default cflags, because they wouldn't
6655	# be able to turn off these options and set the CFLAGS wanted.
6656
6657    # Check whether --enable-flto was given.
6658if test ${enable_flto+y}
6659then :
6660  enableval=$enable_flto;
6661fi
6662
6663    if test "x$enable_flto" != "xno"
6664then :
6665
6666        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -flto" >&5
6667printf %s "checking if $CC supports -flto... " >&6; }
6668        BAKCFLAGS="$CFLAGS"
6669        CFLAGS="$CFLAGS -flto"
6670        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6671/* end confdefs.h.  */
6672
6673int
6674main (void)
6675{
6676
6677  ;
6678  return 0;
6679}
6680_ACEOF
6681if ac_fn_c_try_link "$LINENO"
6682then :
6683
6684            if $CC $CFLAGS -o conftest conftest.c 2>&1 | $GREP -e "warning: no debug symbols in executable" -e "warning: object" >/dev/null; then
6685                CFLAGS="$BAKCFLAGS"
6686                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6687printf "%s\n" "no" >&6; }
6688            else
6689                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6690printf "%s\n" "yes" >&6; }
6691            fi
6692            rm -f conftest conftest.c conftest.o
6693
6694else $as_nop
6695  CFLAGS="$BAKCFLAGS" ; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6696printf "%s\n" "no" >&6; }
6697fi
6698rm -f core conftest.err conftest.$ac_objext conftest.beam \
6699    conftest$ac_exeext conftest.$ac_ext
6700
6701fi
6702
6703
6704    # Check whether --enable-pie was given.
6705if test ${enable_pie+y}
6706then :
6707  enableval=$enable_pie;
6708fi
6709
6710    if test "x$enable_pie" = "xyes"
6711then :
6712
6713	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports PIE" >&5
6714printf %s "checking if $CC supports PIE... " >&6; }
6715	BAKLDFLAGS="$LDFLAGS"
6716	BAKCFLAGS="$CFLAGS"
6717	LDFLAGS="$LDFLAGS -pie"
6718	CFLAGS="$CFLAGS -fPIE"
6719	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6720/* end confdefs.h.  */
6721
6722int
6723main (void)
6724{
6725
6726  ;
6727  return 0;
6728}
6729_ACEOF
6730if ac_fn_c_try_link "$LINENO"
6731then :
6732
6733	    if $CC $CFLAGS $LDFLAGS -o conftest conftest.c 2>&1 | grep "warning: no debug symbols in executable" >/dev/null; then
6734		LDFLAGS="$BAKLDFLAGS"
6735		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6736printf "%s\n" "no" >&6; }
6737	    else
6738		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6739printf "%s\n" "yes" >&6; }
6740	    fi
6741	    rm -f conftest conftest.c conftest.o
6742
6743else $as_nop
6744  LDFLAGS="$BAKLDFLAGS" ; CFLAGS="$BAKCFLAGS" ; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6745printf "%s\n" "no" >&6; }
6746fi
6747rm -f core conftest.err conftest.$ac_objext conftest.beam \
6748    conftest$ac_exeext conftest.$ac_ext
6749
6750fi
6751
6752
6753    # Check whether --enable-relro_now was given.
6754if test ${enable_relro_now+y}
6755then :
6756  enableval=$enable_relro_now;
6757fi
6758
6759    if test "x$enable_relro_now" = "xyes"
6760then :
6761
6762	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wl,-z,relro,-z,now" >&5
6763printf %s "checking if $CC supports -Wl,-z,relro,-z,now... " >&6; }
6764	BAKLDFLAGS="$LDFLAGS"
6765	LDFLAGS="$LDFLAGS -Wl,-z,relro,-z,now"
6766	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6767/* end confdefs.h.  */
6768
6769int
6770main (void)
6771{
6772
6773  ;
6774  return 0;
6775}
6776_ACEOF
6777if ac_fn_c_try_link "$LINENO"
6778then :
6779
6780	    if $CC $CFLAGS $LDFLAGS -o conftest conftest.c 2>&1 | grep "warning: no debug symbols in executable" >/dev/null; then
6781		LDFLAGS="$BAKLDFLAGS"
6782		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6783printf "%s\n" "no" >&6; }
6784	    else
6785		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6786printf "%s\n" "yes" >&6; }
6787	    fi
6788	    rm -f conftest conftest.c conftest.o
6789
6790else $as_nop
6791  LDFLAGS="$BAKLDFLAGS" ; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6792printf "%s\n" "no" >&6; }
6793fi
6794rm -f core conftest.err conftest.$ac_objext conftest.beam \
6795    conftest$ac_exeext conftest.$ac_ext
6796
6797fi
6798
6799fi
6800
6801{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
6802printf %s "checking for inline... " >&6; }
6803if test ${ac_cv_c_inline+y}
6804then :
6805  printf %s "(cached) " >&6
6806else $as_nop
6807  ac_cv_c_inline=no
6808for ac_kw in inline __inline__ __inline; do
6809  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6810/* end confdefs.h.  */
6811#ifndef __cplusplus
6812typedef int foo_t;
6813static $ac_kw foo_t static_foo (void) {return 0; }
6814$ac_kw foo_t foo (void) {return 0; }
6815#endif
6816
6817_ACEOF
6818if ac_fn_c_try_compile "$LINENO"
6819then :
6820  ac_cv_c_inline=$ac_kw
6821fi
6822rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
6823  test "$ac_cv_c_inline" != no && break
6824done
6825
6826fi
6827{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
6828printf "%s\n" "$ac_cv_c_inline" >&6; }
6829
6830case $ac_cv_c_inline in
6831  inline | yes) ;;
6832  *)
6833    case $ac_cv_c_inline in
6834      no) ac_val=;;
6835      *) ac_val=$ac_cv_c_inline;;
6836    esac
6837    cat >>confdefs.h <<_ACEOF
6838#ifndef __cplusplus
6839#define inline $ac_val
6840#endif
6841_ACEOF
6842    ;;
6843esac
6844
6845
6846{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler (${CC-cc}) accepts the \"format\" attribute" >&5
6847printf %s "checking whether the C compiler (${CC-cc}) accepts the \"format\" attribute... " >&6; }
6848if test ${ac_cv_c_format_attribute+y}
6849then :
6850  printf %s "(cached) " >&6
6851else $as_nop
6852  ac_cv_c_format_attribute=no
6853cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6854/* end confdefs.h.  */
6855#include <stdio.h>
6856void f (char *format, ...) __attribute__ ((format (printf, 1, 2)));
6857void (*pf) (char *format, ...) __attribute__ ((format (printf, 1, 2)));
6858
6859int
6860main (void)
6861{
6862
6863   f ("%s", "str");
6864
6865  ;
6866  return 0;
6867}
6868_ACEOF
6869if ac_fn_c_try_compile "$LINENO"
6870then :
6871  ac_cv_c_format_attribute="yes"
6872else $as_nop
6873  ac_cv_c_format_attribute="no"
6874fi
6875rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
6876
6877fi
6878
6879
6880{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_format_attribute" >&5
6881printf "%s\n" "$ac_cv_c_format_attribute" >&6; }
6882if test $ac_cv_c_format_attribute = yes; then
6883
6884printf "%s\n" "#define HAVE_ATTR_FORMAT 1" >>confdefs.h
6885
6886fi
6887
6888
6889{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler (${CC-cc}) accepts the \"unused\" attribute" >&5
6890printf %s "checking whether the C compiler (${CC-cc}) accepts the \"unused\" attribute... " >&6; }
6891if test ${ac_cv_c_unused_attribute+y}
6892then :
6893  printf %s "(cached) " >&6
6894else $as_nop
6895  ac_cv_c_unused_attribute=no
6896cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6897/* end confdefs.h.  */
6898#include <stdio.h>
6899void f (char *u __attribute__((unused)));
6900
6901int
6902main (void)
6903{
6904
6905   f ("x");
6906
6907  ;
6908  return 0;
6909}
6910_ACEOF
6911if ac_fn_c_try_compile "$LINENO"
6912then :
6913  ac_cv_c_unused_attribute="yes"
6914else $as_nop
6915  ac_cv_c_unused_attribute="no"
6916fi
6917rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
6918
6919fi
6920
6921
6922
6923
6924{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_unused_attribute" >&5
6925printf "%s\n" "$ac_cv_c_unused_attribute" >&6; }
6926if test $ac_cv_c_unused_attribute = yes; then
6927
6928printf "%s\n" "#define HAVE_ATTR_UNUSED 1" >>confdefs.h
6929
6930fi
6931
6932
6933
6934
6935{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler (${CC-cc}) accepts the \"weak\" attribute" >&5
6936printf %s "checking whether the C compiler (${CC-cc}) accepts the \"weak\" attribute... " >&6; }
6937if test ${ac_cv_c_weak_attribute+y}
6938then :
6939  printf %s "(cached) " >&6
6940else $as_nop
6941  ac_cv_c_weak_attribute=no
6942cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6943/* end confdefs.h.  */
6944 #include <stdio.h>
6945__attribute__((weak)) void f(int x) { printf("%d", x); }
6946
6947int
6948main (void)
6949{
6950
6951   f(1);
6952
6953  ;
6954  return 0;
6955}
6956_ACEOF
6957if ac_fn_c_try_compile "$LINENO"
6958then :
6959  ac_cv_c_weak_attribute="yes"
6960else $as_nop
6961  ac_cv_c_weak_attribute="no"
6962fi
6963rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
6964
6965fi
6966
6967
6968{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_weak_attribute" >&5
6969printf "%s\n" "$ac_cv_c_weak_attribute" >&6; }
6970if test $ac_cv_c_weak_attribute = yes; then
6971
6972printf "%s\n" "#define HAVE_ATTR_WEAK 1" >>confdefs.h
6973
6974
6975printf "%s\n" "#define ATTR_WEAK __attribute__((weak))" >>confdefs.h
6976
6977fi
6978
6979
6980
6981
6982{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler (${CC-cc}) accepts the \"noreturn\" attribute" >&5
6983printf %s "checking whether the C compiler (${CC-cc}) accepts the \"noreturn\" attribute... " >&6; }
6984if test ${ac_cv_c_noreturn_attribute+y}
6985then :
6986  printf %s "(cached) " >&6
6987else $as_nop
6988  ac_cv_c_noreturn_attribute=no
6989cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6990/* end confdefs.h.  */
6991 #include <stdio.h>
6992__attribute__((noreturn)) void f(int x) { printf("%d", x); }
6993
6994int
6995main (void)
6996{
6997
6998   f(1);
6999
7000  ;
7001  return 0;
7002}
7003_ACEOF
7004if ac_fn_c_try_compile "$LINENO"
7005then :
7006  ac_cv_c_noreturn_attribute="yes"
7007else $as_nop
7008  ac_cv_c_noreturn_attribute="no"
7009fi
7010rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
7011
7012fi
7013
7014
7015{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_noreturn_attribute" >&5
7016printf "%s\n" "$ac_cv_c_noreturn_attribute" >&6; }
7017if test $ac_cv_c_noreturn_attribute = yes; then
7018
7019printf "%s\n" "#define HAVE_ATTR_NORETURN 1" >>confdefs.h
7020
7021
7022printf "%s\n" "#define ATTR_NORETURN __attribute__((__noreturn__))" >>confdefs.h
7023
7024fi
7025
7026
7027if test "$srcdir" != "."; then
7028	CPPFLAGS="$CPPFLAGS -I$srcdir"
7029fi
7030
7031
7032
7033
7034
7035for ac_prog in flex lex
7036do
7037  # Extract the first word of "$ac_prog", so it can be a program name with args.
7038set dummy $ac_prog; ac_word=$2
7039{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7040printf %s "checking for $ac_word... " >&6; }
7041if test ${ac_cv_prog_LEX+y}
7042then :
7043  printf %s "(cached) " >&6
7044else $as_nop
7045  if test -n "$LEX"; then
7046  ac_cv_prog_LEX="$LEX" # Let the user override the test.
7047else
7048as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7049for as_dir in $PATH
7050do
7051  IFS=$as_save_IFS
7052  case $as_dir in #(((
7053    '') as_dir=./ ;;
7054    */) ;;
7055    *) as_dir=$as_dir/ ;;
7056  esac
7057    for ac_exec_ext in '' $ac_executable_extensions; do
7058  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
7059    ac_cv_prog_LEX="$ac_prog"
7060    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
7061    break 2
7062  fi
7063done
7064  done
7065IFS=$as_save_IFS
7066
7067fi
7068fi
7069LEX=$ac_cv_prog_LEX
7070if test -n "$LEX"; then
7071  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LEX" >&5
7072printf "%s\n" "$LEX" >&6; }
7073else
7074  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7075printf "%s\n" "no" >&6; }
7076fi
7077
7078
7079  test -n "$LEX" && break
7080done
7081test -n "$LEX" || LEX=":"
7082
7083  if test "x$LEX" != "x:"; then
7084    cat >conftest.l <<_ACEOF
7085%{
7086#ifdef __cplusplus
7087extern "C"
7088#endif
7089int yywrap(void);
7090%}
7091%%
7092a { ECHO; }
7093b { REJECT; }
7094c { yymore (); }
7095d { yyless (1); }
7096e { /* IRIX 6.5 flex 2.5.4 underquotes its yyless argument.  */
7097#ifdef __cplusplus
7098    yyless ((yyinput () != 0));
7099#else
7100    yyless ((input () != 0));
7101#endif
7102  }
7103f { unput (yytext[0]); }
7104. { BEGIN INITIAL; }
7105%%
7106#ifdef YYTEXT_POINTER
7107extern char *yytext;
7108#endif
7109int
7110yywrap (void)
7111{
7112  return 1;
7113}
7114int
7115main (void)
7116{
7117  return ! yylex ();
7118}
7119_ACEOF
7120{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for lex output file root" >&5
7121printf %s "checking for lex output file root... " >&6; }
7122if test ${ac_cv_prog_lex_root+y}
7123then :
7124  printf %s "(cached) " >&6
7125else $as_nop
7126
7127ac_cv_prog_lex_root=unknown
7128{ { ac_try="$LEX conftest.l"
7129case "(($ac_try" in
7130  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7131  *) ac_try_echo=$ac_try;;
7132esac
7133eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
7134printf "%s\n" "$ac_try_echo"; } >&5
7135  (eval "$LEX conftest.l") 2>&5
7136  ac_status=$?
7137  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7138  test $ac_status = 0; } &&
7139if test -f lex.yy.c; then
7140  ac_cv_prog_lex_root=lex.yy
7141elif test -f lexyy.c; then
7142  ac_cv_prog_lex_root=lexyy
7143fi
7144fi
7145{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_lex_root" >&5
7146printf "%s\n" "$ac_cv_prog_lex_root" >&6; }
7147if test "$ac_cv_prog_lex_root" = unknown
7148then :
7149  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cannot find output from $LEX; giving up on $LEX" >&5
7150printf "%s\n" "$as_me: WARNING: cannot find output from $LEX; giving up on $LEX" >&2;}
7151   LEX=: LEXLIB=
7152fi
7153LEX_OUTPUT_ROOT=$ac_cv_prog_lex_root
7154
7155if test ${LEXLIB+y}
7156then :
7157
7158else $as_nop
7159
7160  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for lex library" >&5
7161printf %s "checking for lex library... " >&6; }
7162if test ${ac_cv_lib_lex+y}
7163then :
7164  printf %s "(cached) " >&6
7165else $as_nop
7166
7167    ac_save_LIBS="$LIBS"
7168    ac_found=false
7169    for ac_cv_lib_lex in 'none needed' -lfl -ll 'not found'; do
7170      case $ac_cv_lib_lex in #(
7171  'none needed') :
7172     ;; #(
7173  'not found') :
7174    break ;; #(
7175  *) :
7176    LIBS="$ac_cv_lib_lex $ac_save_LIBS" ;; #(
7177  *) :
7178     ;;
7179esac
7180
7181      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7182/* end confdefs.h.  */
7183`cat $LEX_OUTPUT_ROOT.c`
7184_ACEOF
7185if ac_fn_c_try_link "$LINENO"
7186then :
7187  ac_found=:
7188fi
7189rm -f core conftest.err conftest.$ac_objext conftest.beam \
7190    conftest$ac_exeext conftest.$ac_ext
7191      if $ac_found; then
7192        break
7193      fi
7194    done
7195    LIBS="$ac_save_LIBS"
7196
7197fi
7198{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_lex" >&5
7199printf "%s\n" "$ac_cv_lib_lex" >&6; }
7200  if test "$ac_cv_lib_lex" = 'not found'
7201then :
7202  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: required lex library not found; giving up on $LEX" >&5
7203printf "%s\n" "$as_me: WARNING: required lex library not found; giving up on $LEX" >&2;}
7204	 LEX=: LEXLIB=
7205elif test "$ac_cv_lib_lex" = 'none needed'
7206then :
7207  LEXLIB=''
7208else $as_nop
7209  LEXLIB=$ac_cv_lib_lex
7210fi
7211
7212fi
7213
7214
7215if test "$LEX" != :
7216then :
7217
7218{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether yytext is a pointer" >&5
7219printf %s "checking whether yytext is a pointer... " >&6; }
7220if test ${ac_cv_prog_lex_yytext_pointer+y}
7221then :
7222  printf %s "(cached) " >&6
7223else $as_nop
7224  # POSIX says lex can declare yytext either as a pointer or an array; the
7225# default is implementation-dependent.  Figure out which it is, since
7226# not all implementations provide the %pointer and %array declarations.
7227ac_cv_prog_lex_yytext_pointer=no
7228cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7229/* end confdefs.h.  */
7230
7231  #define YYTEXT_POINTER 1
7232`cat $LEX_OUTPUT_ROOT.c`
7233_ACEOF
7234if ac_fn_c_try_compile "$LINENO"
7235then :
7236  ac_cv_prog_lex_yytext_pointer=yes
7237fi
7238rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
7239
7240fi
7241{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_lex_yytext_pointer" >&5
7242printf "%s\n" "$ac_cv_prog_lex_yytext_pointer" >&6; }
7243if test $ac_cv_prog_lex_yytext_pointer = yes; then
7244
7245printf "%s\n" "#define YYTEXT_POINTER 1" >>confdefs.h
7246
7247fi
7248
7249fi
7250rm -f conftest.l $LEX_OUTPUT_ROOT.c
7251
7252fi
7253if test "$LEX" != "" -a "$LEX" != ":"; then
7254
7255	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for yylex_destroy" >&5
7256printf %s "checking for yylex_destroy... " >&6; }
7257	if echo %% | $LEX -t 2>&1 | grep yylex_destroy >/dev/null 2>&1; then
7258
7259printf "%s\n" "#define LEX_HAS_YYLEX_DESTROY 1" >>confdefs.h
7260
7261		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7262printf "%s\n" "yes" >&6; }
7263	else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7264printf "%s\n" "no" >&6; };
7265		LEX=":"
7266	fi
7267
7268fi
7269if test "$LEX" != "" -a "$LEX" != ":"; then
7270
7271	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for lex %option" >&5
7272printf %s "checking for lex %option... " >&6; }
7273	if cat <<EOF | $LEX -t 2>&1 | grep yy_delete_buffer >/dev/null 2>&1; then
7274%option nounput
7275%%
7276EOF
7277		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7278printf "%s\n" "yes" >&6; }
7279	else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7280printf "%s\n" "no" >&6; };
7281		LEX=":"
7282	fi
7283
7284fi
7285if test "$LEX" = "" -o "$LEX" = ":"; then
7286	if test ! -f util/configlexer.c; then
7287		as_fn_error $? "no lex and no util/configlexer.c: need flex and bison to compile from source repository." "$LINENO" 5
7288	fi
7289fi
7290for ac_prog in 'bison -y' byacc
7291do
7292  # Extract the first word of "$ac_prog", so it can be a program name with args.
7293set dummy $ac_prog; ac_word=$2
7294{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7295printf %s "checking for $ac_word... " >&6; }
7296if test ${ac_cv_prog_YACC+y}
7297then :
7298  printf %s "(cached) " >&6
7299else $as_nop
7300  if test -n "$YACC"; then
7301  ac_cv_prog_YACC="$YACC" # Let the user override the test.
7302else
7303as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7304for as_dir in $PATH
7305do
7306  IFS=$as_save_IFS
7307  case $as_dir in #(((
7308    '') as_dir=./ ;;
7309    */) ;;
7310    *) as_dir=$as_dir/ ;;
7311  esac
7312    for ac_exec_ext in '' $ac_executable_extensions; do
7313  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
7314    ac_cv_prog_YACC="$ac_prog"
7315    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
7316    break 2
7317  fi
7318done
7319  done
7320IFS=$as_save_IFS
7321
7322fi
7323fi
7324YACC=$ac_cv_prog_YACC
7325if test -n "$YACC"; then
7326  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $YACC" >&5
7327printf "%s\n" "$YACC" >&6; }
7328else
7329  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7330printf "%s\n" "no" >&6; }
7331fi
7332
7333
7334  test -n "$YACC" && break
7335done
7336test -n "$YACC" || YACC="yacc"
7337
7338if test "$YACC" = "" -o "$YACC" = ":"; then
7339	if test ! -f util/configparser.c; then
7340		as_fn_error $? "no yacc and no util/configparser.c: need flex and bison to compile from source repository." "$LINENO" 5
7341	fi
7342fi
7343# Extract the first word of "doxygen", so it can be a program name with args.
7344set dummy doxygen; ac_word=$2
7345{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7346printf %s "checking for $ac_word... " >&6; }
7347if test ${ac_cv_prog_doxygen+y}
7348then :
7349  printf %s "(cached) " >&6
7350else $as_nop
7351  if test -n "$doxygen"; then
7352  ac_cv_prog_doxygen="$doxygen" # Let the user override the test.
7353else
7354as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7355for as_dir in $PATH
7356do
7357  IFS=$as_save_IFS
7358  case $as_dir in #(((
7359    '') as_dir=./ ;;
7360    */) ;;
7361    *) as_dir=$as_dir/ ;;
7362  esac
7363    for ac_exec_ext in '' $ac_executable_extensions; do
7364  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
7365    ac_cv_prog_doxygen="doxygen"
7366    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
7367    break 2
7368  fi
7369done
7370  done
7371IFS=$as_save_IFS
7372
7373fi
7374fi
7375doxygen=$ac_cv_prog_doxygen
7376if test -n "$doxygen"; then
7377  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $doxygen" >&5
7378printf "%s\n" "$doxygen" >&6; }
7379else
7380  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7381printf "%s\n" "no" >&6; }
7382fi
7383
7384
7385if test -n "$ac_tool_prefix"; then
7386  # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
7387set dummy ${ac_tool_prefix}strip; ac_word=$2
7388{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7389printf %s "checking for $ac_word... " >&6; }
7390if test ${ac_cv_prog_STRIP+y}
7391then :
7392  printf %s "(cached) " >&6
7393else $as_nop
7394  if test -n "$STRIP"; then
7395  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
7396else
7397as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7398for as_dir in $PATH
7399do
7400  IFS=$as_save_IFS
7401  case $as_dir in #(((
7402    '') as_dir=./ ;;
7403    */) ;;
7404    *) as_dir=$as_dir/ ;;
7405  esac
7406    for ac_exec_ext in '' $ac_executable_extensions; do
7407  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
7408    ac_cv_prog_STRIP="${ac_tool_prefix}strip"
7409    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
7410    break 2
7411  fi
7412done
7413  done
7414IFS=$as_save_IFS
7415
7416fi
7417fi
7418STRIP=$ac_cv_prog_STRIP
7419if test -n "$STRIP"; then
7420  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
7421printf "%s\n" "$STRIP" >&6; }
7422else
7423  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7424printf "%s\n" "no" >&6; }
7425fi
7426
7427
7428fi
7429if test -z "$ac_cv_prog_STRIP"; then
7430  ac_ct_STRIP=$STRIP
7431  # Extract the first word of "strip", so it can be a program name with args.
7432set dummy strip; ac_word=$2
7433{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7434printf %s "checking for $ac_word... " >&6; }
7435if test ${ac_cv_prog_ac_ct_STRIP+y}
7436then :
7437  printf %s "(cached) " >&6
7438else $as_nop
7439  if test -n "$ac_ct_STRIP"; then
7440  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
7441else
7442as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7443for as_dir in $PATH
7444do
7445  IFS=$as_save_IFS
7446  case $as_dir in #(((
7447    '') as_dir=./ ;;
7448    */) ;;
7449    *) as_dir=$as_dir/ ;;
7450  esac
7451    for ac_exec_ext in '' $ac_executable_extensions; do
7452  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
7453    ac_cv_prog_ac_ct_STRIP="strip"
7454    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
7455    break 2
7456  fi
7457done
7458  done
7459IFS=$as_save_IFS
7460
7461fi
7462fi
7463ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
7464if test -n "$ac_ct_STRIP"; then
7465  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
7466printf "%s\n" "$ac_ct_STRIP" >&6; }
7467else
7468  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7469printf "%s\n" "no" >&6; }
7470fi
7471
7472  if test "x$ac_ct_STRIP" = x; then
7473    STRIP=""
7474  else
7475    case $cross_compiling:$ac_tool_warned in
7476yes:)
7477{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7478printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7479ac_tool_warned=yes ;;
7480esac
7481    STRIP=$ac_ct_STRIP
7482  fi
7483else
7484  STRIP="$ac_cv_prog_STRIP"
7485fi
7486
7487
7488
7489
7490  # Make sure we can run config.sub.
7491$SHELL "${ac_aux_dir}config.sub" sun4 >/dev/null 2>&1 ||
7492  as_fn_error $? "cannot run $SHELL ${ac_aux_dir}config.sub" "$LINENO" 5
7493
7494{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
7495printf %s "checking build system type... " >&6; }
7496if test ${ac_cv_build+y}
7497then :
7498  printf %s "(cached) " >&6
7499else $as_nop
7500  ac_build_alias=$build_alias
7501test "x$ac_build_alias" = x &&
7502  ac_build_alias=`$SHELL "${ac_aux_dir}config.guess"`
7503test "x$ac_build_alias" = x &&
7504  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
7505ac_cv_build=`$SHELL "${ac_aux_dir}config.sub" $ac_build_alias` ||
7506  as_fn_error $? "$SHELL ${ac_aux_dir}config.sub $ac_build_alias failed" "$LINENO" 5
7507
7508fi
7509{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
7510printf "%s\n" "$ac_cv_build" >&6; }
7511case $ac_cv_build in
7512*-*-*) ;;
7513*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
7514esac
7515build=$ac_cv_build
7516ac_save_IFS=$IFS; IFS='-'
7517set x $ac_cv_build
7518shift
7519build_cpu=$1
7520build_vendor=$2
7521shift; shift
7522# Remember, the first character of IFS is used to create $*,
7523# except with old shells:
7524build_os=$*
7525IFS=$ac_save_IFS
7526case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
7527
7528
7529{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
7530printf %s "checking host system type... " >&6; }
7531if test ${ac_cv_host+y}
7532then :
7533  printf %s "(cached) " >&6
7534else $as_nop
7535  if test "x$host_alias" = x; then
7536  ac_cv_host=$ac_cv_build
7537else
7538  ac_cv_host=`$SHELL "${ac_aux_dir}config.sub" $host_alias` ||
7539    as_fn_error $? "$SHELL ${ac_aux_dir}config.sub $host_alias failed" "$LINENO" 5
7540fi
7541
7542fi
7543{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
7544printf "%s\n" "$ac_cv_host" >&6; }
7545case $ac_cv_host in
7546*-*-*) ;;
7547*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
7548esac
7549host=$ac_cv_host
7550ac_save_IFS=$IFS; IFS='-'
7551set x $ac_cv_host
7552shift
7553host_cpu=$1
7554host_vendor=$2
7555shift; shift
7556# Remember, the first character of IFS is used to create $*,
7557# except with old shells:
7558host_os=$*
7559IFS=$ac_save_IFS
7560case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
7561
7562
7563
7564# skip these tests, we do not need them.
7565
7566
7567
7568
7569
7570
7571
7572
7573# always use ./libtool unless override from commandline (libtool=mylibtool)
7574if test -z "$libtool"; then
7575	libtool="./libtool"
7576fi
7577
7578# avoid libtool max commandline length test on systems that fork slowly.
7579
7580if echo "$host_os" | grep "sunos4" >/dev/null; then
7581	lt_cv_sys_max_cmd_len=32750;
7582fi
7583if test -n "$ac_tool_prefix"; then
7584  # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
7585set dummy ${ac_tool_prefix}ar; ac_word=$2
7586{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7587printf %s "checking for $ac_word... " >&6; }
7588if test ${ac_cv_path_AR+y}
7589then :
7590  printf %s "(cached) " >&6
7591else $as_nop
7592  case $AR in
7593  [\\/]* | ?:[\\/]*)
7594  ac_cv_path_AR="$AR" # Let the user override the test with a path.
7595  ;;
7596  *)
7597  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7598for as_dir in $PATH
7599do
7600  IFS=$as_save_IFS
7601  case $as_dir in #(((
7602    '') as_dir=./ ;;
7603    */) ;;
7604    *) as_dir=$as_dir/ ;;
7605  esac
7606    for ac_exec_ext in '' $ac_executable_extensions; do
7607  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
7608    ac_cv_path_AR="$as_dir$ac_word$ac_exec_ext"
7609    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
7610    break 2
7611  fi
7612done
7613  done
7614IFS=$as_save_IFS
7615
7616  ;;
7617esac
7618fi
7619AR=$ac_cv_path_AR
7620if test -n "$AR"; then
7621  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
7622printf "%s\n" "$AR" >&6; }
7623else
7624  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7625printf "%s\n" "no" >&6; }
7626fi
7627
7628
7629fi
7630if test -z "$ac_cv_path_AR"; then
7631  ac_pt_AR=$AR
7632  # Extract the first word of "ar", so it can be a program name with args.
7633set dummy ar; ac_word=$2
7634{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7635printf %s "checking for $ac_word... " >&6; }
7636if test ${ac_cv_path_ac_pt_AR+y}
7637then :
7638  printf %s "(cached) " >&6
7639else $as_nop
7640  case $ac_pt_AR in
7641  [\\/]* | ?:[\\/]*)
7642  ac_cv_path_ac_pt_AR="$ac_pt_AR" # Let the user override the test with a path.
7643  ;;
7644  *)
7645  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7646for as_dir in $PATH
7647do
7648  IFS=$as_save_IFS
7649  case $as_dir in #(((
7650    '') as_dir=./ ;;
7651    */) ;;
7652    *) as_dir=$as_dir/ ;;
7653  esac
7654    for ac_exec_ext in '' $ac_executable_extensions; do
7655  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
7656    ac_cv_path_ac_pt_AR="$as_dir$ac_word$ac_exec_ext"
7657    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
7658    break 2
7659  fi
7660done
7661  done
7662IFS=$as_save_IFS
7663
7664  ;;
7665esac
7666fi
7667ac_pt_AR=$ac_cv_path_ac_pt_AR
7668if test -n "$ac_pt_AR"; then
7669  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_pt_AR" >&5
7670printf "%s\n" "$ac_pt_AR" >&6; }
7671else
7672  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7673printf "%s\n" "no" >&6; }
7674fi
7675
7676  if test "x$ac_pt_AR" = x; then
7677    AR="false"
7678  else
7679    case $cross_compiling:$ac_tool_warned in
7680yes:)
7681{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7682printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7683ac_tool_warned=yes ;;
7684esac
7685    AR=$ac_pt_AR
7686  fi
7687else
7688  AR="$ac_cv_path_AR"
7689fi
7690
7691if test $AR = false; then
7692	as_fn_error $? "Cannot find 'ar', please extend PATH to include it" "$LINENO" 5
7693fi
7694
7695
7696case `pwd` in
7697  *\ * | *\	*)
7698    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5
7699printf "%s\n" "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;;
7700esac
7701
7702
7703
7704macro_version='2.4.6'
7705macro_revision='2.4.6'
7706
7707
7708
7709
7710
7711
7712
7713
7714
7715
7716
7717
7718
7719
7720ltmain=$ac_aux_dir/ltmain.sh
7721
7722# Backslashify metacharacters that are still active within
7723# double-quoted strings.
7724sed_quote_subst='s/\(["`$\\]\)/\\\1/g'
7725
7726# Same as above, but do not quote variable references.
7727double_quote_subst='s/\(["`\\]\)/\\\1/g'
7728
7729# Sed substitution to delay expansion of an escaped shell variable in a
7730# double_quote_subst'ed string.
7731delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
7732
7733# Sed substitution to delay expansion of an escaped single quote.
7734delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
7735
7736# Sed substitution to avoid accidental globbing in evaled expressions
7737no_glob_subst='s/\*/\\\*/g'
7738
7739ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
7740ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
7741ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
7742
7743{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5
7744printf %s "checking how to print strings... " >&6; }
7745# Test print first, because it will be a builtin if present.
7746if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \
7747   test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
7748  ECHO='print -r --'
7749elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
7750  ECHO='printf %s\n'
7751else
7752  # Use this function as a fallback that always works.
7753  func_fallback_echo ()
7754  {
7755    eval 'cat <<_LTECHO_EOF
7756$1
7757_LTECHO_EOF'
7758  }
7759  ECHO='func_fallback_echo'
7760fi
7761
7762# func_echo_all arg...
7763# Invoke $ECHO with all args, space-separated.
7764func_echo_all ()
7765{
7766    $ECHO ""
7767}
7768
7769case $ECHO in
7770  printf*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: printf" >&5
7771printf "%s\n" "printf" >&6; } ;;
7772  print*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: print -r" >&5
7773printf "%s\n" "print -r" >&6; } ;;
7774  *) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: cat" >&5
7775printf "%s\n" "cat" >&6; } ;;
7776esac
7777
7778
7779
7780
7781
7782
7783
7784
7785
7786
7787
7788
7789
7790
7791{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
7792printf %s "checking for a sed that does not truncate output... " >&6; }
7793if test ${ac_cv_path_SED+y}
7794then :
7795  printf %s "(cached) " >&6
7796else $as_nop
7797            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
7798     for ac_i in 1 2 3 4 5 6 7; do
7799       ac_script="$ac_script$as_nl$ac_script"
7800     done
7801     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
7802     { ac_script=; unset ac_script;}
7803     if test -z "$SED"; then
7804  ac_path_SED_found=false
7805  # Loop through the user's path and test for each of PROGNAME-LIST
7806  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7807for as_dir in $PATH
7808do
7809  IFS=$as_save_IFS
7810  case $as_dir in #(((
7811    '') as_dir=./ ;;
7812    */) ;;
7813    *) as_dir=$as_dir/ ;;
7814  esac
7815    for ac_prog in sed gsed
7816   do
7817    for ac_exec_ext in '' $ac_executable_extensions; do
7818      ac_path_SED="$as_dir$ac_prog$ac_exec_ext"
7819      as_fn_executable_p "$ac_path_SED" || continue
7820# Check for GNU ac_path_SED and select it if it is found.
7821  # Check for GNU $ac_path_SED
7822case `"$ac_path_SED" --version 2>&1` in
7823*GNU*)
7824  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
7825*)
7826  ac_count=0
7827  printf %s 0123456789 >"conftest.in"
7828  while :
7829  do
7830    cat "conftest.in" "conftest.in" >"conftest.tmp"
7831    mv "conftest.tmp" "conftest.in"
7832    cp "conftest.in" "conftest.nl"
7833    printf "%s\n" '' >> "conftest.nl"
7834    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
7835    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
7836    as_fn_arith $ac_count + 1 && ac_count=$as_val
7837    if test $ac_count -gt ${ac_path_SED_max-0}; then
7838      # Best one so far, save it but keep looking for a better one
7839      ac_cv_path_SED="$ac_path_SED"
7840      ac_path_SED_max=$ac_count
7841    fi
7842    # 10*(2^10) chars as input seems more than enough
7843    test $ac_count -gt 10 && break
7844  done
7845  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
7846esac
7847
7848      $ac_path_SED_found && break 3
7849    done
7850  done
7851  done
7852IFS=$as_save_IFS
7853  if test -z "$ac_cv_path_SED"; then
7854    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
7855  fi
7856else
7857  ac_cv_path_SED=$SED
7858fi
7859
7860fi
7861{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
7862printf "%s\n" "$ac_cv_path_SED" >&6; }
7863 SED="$ac_cv_path_SED"
7864  rm -f conftest.sed
7865
7866test -z "$SED" && SED=sed
7867Xsed="$SED -e 1s/^X//"
7868
7869
7870
7871
7872
7873
7874
7875
7876
7877
7878
7879{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
7880printf %s "checking for egrep... " >&6; }
7881if test ${ac_cv_path_EGREP+y}
7882then :
7883  printf %s "(cached) " >&6
7884else $as_nop
7885  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
7886   then ac_cv_path_EGREP="$GREP -E"
7887   else
7888     if test -z "$EGREP"; then
7889  ac_path_EGREP_found=false
7890  # Loop through the user's path and test for each of PROGNAME-LIST
7891  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7892for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
7893do
7894  IFS=$as_save_IFS
7895  case $as_dir in #(((
7896    '') as_dir=./ ;;
7897    */) ;;
7898    *) as_dir=$as_dir/ ;;
7899  esac
7900    for ac_prog in egrep
7901   do
7902    for ac_exec_ext in '' $ac_executable_extensions; do
7903      ac_path_EGREP="$as_dir$ac_prog$ac_exec_ext"
7904      as_fn_executable_p "$ac_path_EGREP" || continue
7905# Check for GNU ac_path_EGREP and select it if it is found.
7906  # Check for GNU $ac_path_EGREP
7907case `"$ac_path_EGREP" --version 2>&1` in
7908*GNU*)
7909  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
7910*)
7911  ac_count=0
7912  printf %s 0123456789 >"conftest.in"
7913  while :
7914  do
7915    cat "conftest.in" "conftest.in" >"conftest.tmp"
7916    mv "conftest.tmp" "conftest.in"
7917    cp "conftest.in" "conftest.nl"
7918    printf "%s\n" 'EGREP' >> "conftest.nl"
7919    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
7920    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
7921    as_fn_arith $ac_count + 1 && ac_count=$as_val
7922    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
7923      # Best one so far, save it but keep looking for a better one
7924      ac_cv_path_EGREP="$ac_path_EGREP"
7925      ac_path_EGREP_max=$ac_count
7926    fi
7927    # 10*(2^10) chars as input seems more than enough
7928    test $ac_count -gt 10 && break
7929  done
7930  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
7931esac
7932
7933      $ac_path_EGREP_found && break 3
7934    done
7935  done
7936  done
7937IFS=$as_save_IFS
7938  if test -z "$ac_cv_path_EGREP"; then
7939    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
7940  fi
7941else
7942  ac_cv_path_EGREP=$EGREP
7943fi
7944
7945   fi
7946fi
7947{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
7948printf "%s\n" "$ac_cv_path_EGREP" >&6; }
7949 EGREP="$ac_cv_path_EGREP"
7950
7951
7952{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
7953printf %s "checking for fgrep... " >&6; }
7954if test ${ac_cv_path_FGREP+y}
7955then :
7956  printf %s "(cached) " >&6
7957else $as_nop
7958  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
7959   then ac_cv_path_FGREP="$GREP -F"
7960   else
7961     if test -z "$FGREP"; then
7962  ac_path_FGREP_found=false
7963  # Loop through the user's path and test for each of PROGNAME-LIST
7964  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7965for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
7966do
7967  IFS=$as_save_IFS
7968  case $as_dir in #(((
7969    '') as_dir=./ ;;
7970    */) ;;
7971    *) as_dir=$as_dir/ ;;
7972  esac
7973    for ac_prog in fgrep
7974   do
7975    for ac_exec_ext in '' $ac_executable_extensions; do
7976      ac_path_FGREP="$as_dir$ac_prog$ac_exec_ext"
7977      as_fn_executable_p "$ac_path_FGREP" || continue
7978# Check for GNU ac_path_FGREP and select it if it is found.
7979  # Check for GNU $ac_path_FGREP
7980case `"$ac_path_FGREP" --version 2>&1` in
7981*GNU*)
7982  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
7983*)
7984  ac_count=0
7985  printf %s 0123456789 >"conftest.in"
7986  while :
7987  do
7988    cat "conftest.in" "conftest.in" >"conftest.tmp"
7989    mv "conftest.tmp" "conftest.in"
7990    cp "conftest.in" "conftest.nl"
7991    printf "%s\n" 'FGREP' >> "conftest.nl"
7992    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
7993    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
7994    as_fn_arith $ac_count + 1 && ac_count=$as_val
7995    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
7996      # Best one so far, save it but keep looking for a better one
7997      ac_cv_path_FGREP="$ac_path_FGREP"
7998      ac_path_FGREP_max=$ac_count
7999    fi
8000    # 10*(2^10) chars as input seems more than enough
8001    test $ac_count -gt 10 && break
8002  done
8003  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
8004esac
8005
8006      $ac_path_FGREP_found && break 3
8007    done
8008  done
8009  done
8010IFS=$as_save_IFS
8011  if test -z "$ac_cv_path_FGREP"; then
8012    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
8013  fi
8014else
8015  ac_cv_path_FGREP=$FGREP
8016fi
8017
8018   fi
8019fi
8020{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
8021printf "%s\n" "$ac_cv_path_FGREP" >&6; }
8022 FGREP="$ac_cv_path_FGREP"
8023
8024
8025test -z "$GREP" && GREP=grep
8026
8027
8028
8029
8030
8031
8032
8033
8034
8035
8036
8037
8038
8039
8040
8041
8042
8043
8044
8045# Check whether --with-gnu-ld was given.
8046if test ${with_gnu_ld+y}
8047then :
8048  withval=$with_gnu_ld; test no = "$withval" || with_gnu_ld=yes
8049else $as_nop
8050  with_gnu_ld=no
8051fi
8052
8053ac_prog=ld
8054if test yes = "$GCC"; then
8055  # Check if gcc -print-prog-name=ld gives a path.
8056  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5
8057printf %s "checking for ld used by $CC... " >&6; }
8058  case $host in
8059  *-*-mingw*)
8060    # gcc leaves a trailing carriage return, which upsets mingw
8061    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
8062  *)
8063    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
8064  esac
8065  case $ac_prog in
8066    # Accept absolute paths.
8067    [\\/]* | ?:[\\/]*)
8068      re_direlt='/[^/][^/]*/\.\./'
8069      # Canonicalize the pathname of ld
8070      ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
8071      while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
8072	ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
8073      done
8074      test -z "$LD" && LD=$ac_prog
8075      ;;
8076  "")
8077    # If it fails, then pretend we aren't using GCC.
8078    ac_prog=ld
8079    ;;
8080  *)
8081    # If it is relative, then search for the first ld in PATH.
8082    with_gnu_ld=unknown
8083    ;;
8084  esac
8085elif test yes = "$with_gnu_ld"; then
8086  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
8087printf %s "checking for GNU ld... " >&6; }
8088else
8089  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
8090printf %s "checking for non-GNU ld... " >&6; }
8091fi
8092if test ${lt_cv_path_LD+y}
8093then :
8094  printf %s "(cached) " >&6
8095else $as_nop
8096  if test -z "$LD"; then
8097  lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
8098  for ac_dir in $PATH; do
8099    IFS=$lt_save_ifs
8100    test -z "$ac_dir" && ac_dir=.
8101    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
8102      lt_cv_path_LD=$ac_dir/$ac_prog
8103      # Check to see if the program is GNU ld.  I'd rather use --version,
8104      # but apparently some variants of GNU ld only accept -v.
8105      # Break only if it was the GNU/non-GNU ld that we prefer.
8106      case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
8107      *GNU* | *'with BFD'*)
8108	test no != "$with_gnu_ld" && break
8109	;;
8110      *)
8111	test yes != "$with_gnu_ld" && break
8112	;;
8113      esac
8114    fi
8115  done
8116  IFS=$lt_save_ifs
8117else
8118  lt_cv_path_LD=$LD # Let the user override the test with a path.
8119fi
8120fi
8121
8122LD=$lt_cv_path_LD
8123if test -n "$LD"; then
8124  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
8125printf "%s\n" "$LD" >&6; }
8126else
8127  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
8128printf "%s\n" "no" >&6; }
8129fi
8130test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
8131{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
8132printf %s "checking if the linker ($LD) is GNU ld... " >&6; }
8133if test ${lt_cv_prog_gnu_ld+y}
8134then :
8135  printf %s "(cached) " >&6
8136else $as_nop
8137  # I'd rather use --version here, but apparently some GNU lds only accept -v.
8138case `$LD -v 2>&1 </dev/null` in
8139*GNU* | *'with BFD'*)
8140  lt_cv_prog_gnu_ld=yes
8141  ;;
8142*)
8143  lt_cv_prog_gnu_ld=no
8144  ;;
8145esac
8146fi
8147{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_gnu_ld" >&5
8148printf "%s\n" "$lt_cv_prog_gnu_ld" >&6; }
8149with_gnu_ld=$lt_cv_prog_gnu_ld
8150
8151
8152
8153
8154
8155
8156
8157
8158
8159{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)" >&5
8160printf %s "checking for BSD- or MS-compatible name lister (nm)... " >&6; }
8161if test ${lt_cv_path_NM+y}
8162then :
8163  printf %s "(cached) " >&6
8164else $as_nop
8165  if test -n "$NM"; then
8166  # Let the user override the test.
8167  lt_cv_path_NM=$NM
8168else
8169  lt_nm_to_check=${ac_tool_prefix}nm
8170  if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
8171    lt_nm_to_check="$lt_nm_to_check nm"
8172  fi
8173  for lt_tmp_nm in $lt_nm_to_check; do
8174    lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
8175    for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
8176      IFS=$lt_save_ifs
8177      test -z "$ac_dir" && ac_dir=.
8178      tmp_nm=$ac_dir/$lt_tmp_nm
8179      if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then
8180	# Check to see if the nm accepts a BSD-compat flag.
8181	# Adding the 'sed 1q' prevents false positives on HP-UX, which says:
8182	#   nm: unknown option "B" ignored
8183	# Tru64's nm complains that /dev/null is an invalid object file
8184	# MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty
8185	case $build_os in
8186	mingw*) lt_bad_file=conftest.nm/nofile ;;
8187	*) lt_bad_file=/dev/null ;;
8188	esac
8189	case `"$tmp_nm" -B $lt_bad_file 2>&1 | sed '1q'` in
8190	*$lt_bad_file* | *'Invalid file or object type'*)
8191	  lt_cv_path_NM="$tmp_nm -B"
8192	  break 2
8193	  ;;
8194	*)
8195	  case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
8196	  */dev/null*)
8197	    lt_cv_path_NM="$tmp_nm -p"
8198	    break 2
8199	    ;;
8200	  *)
8201	    lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
8202	    continue # so that we can try to find one that supports BSD flags
8203	    ;;
8204	  esac
8205	  ;;
8206	esac
8207      fi
8208    done
8209    IFS=$lt_save_ifs
8210  done
8211  : ${lt_cv_path_NM=no}
8212fi
8213fi
8214{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5
8215printf "%s\n" "$lt_cv_path_NM" >&6; }
8216if test no != "$lt_cv_path_NM"; then
8217  NM=$lt_cv_path_NM
8218else
8219  # Didn't find any BSD compatible name lister, look for dumpbin.
8220  if test -n "$DUMPBIN"; then :
8221    # Let the user override the test.
8222  else
8223    if test -n "$ac_tool_prefix"; then
8224  for ac_prog in dumpbin "link -dump"
8225  do
8226    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
8227set dummy $ac_tool_prefix$ac_prog; ac_word=$2
8228{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8229printf %s "checking for $ac_word... " >&6; }
8230if test ${ac_cv_prog_DUMPBIN+y}
8231then :
8232  printf %s "(cached) " >&6
8233else $as_nop
8234  if test -n "$DUMPBIN"; then
8235  ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
8236else
8237as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8238for as_dir in $PATH
8239do
8240  IFS=$as_save_IFS
8241  case $as_dir in #(((
8242    '') as_dir=./ ;;
8243    */) ;;
8244    *) as_dir=$as_dir/ ;;
8245  esac
8246    for ac_exec_ext in '' $ac_executable_extensions; do
8247  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
8248    ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog"
8249    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
8250    break 2
8251  fi
8252done
8253  done
8254IFS=$as_save_IFS
8255
8256fi
8257fi
8258DUMPBIN=$ac_cv_prog_DUMPBIN
8259if test -n "$DUMPBIN"; then
8260  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
8261printf "%s\n" "$DUMPBIN" >&6; }
8262else
8263  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
8264printf "%s\n" "no" >&6; }
8265fi
8266
8267
8268    test -n "$DUMPBIN" && break
8269  done
8270fi
8271if test -z "$DUMPBIN"; then
8272  ac_ct_DUMPBIN=$DUMPBIN
8273  for ac_prog in dumpbin "link -dump"
8274do
8275  # Extract the first word of "$ac_prog", so it can be a program name with args.
8276set dummy $ac_prog; ac_word=$2
8277{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8278printf %s "checking for $ac_word... " >&6; }
8279if test ${ac_cv_prog_ac_ct_DUMPBIN+y}
8280then :
8281  printf %s "(cached) " >&6
8282else $as_nop
8283  if test -n "$ac_ct_DUMPBIN"; then
8284  ac_cv_prog_ac_ct_DUMPBIN="$ac_ct_DUMPBIN" # Let the user override the test.
8285else
8286as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8287for as_dir in $PATH
8288do
8289  IFS=$as_save_IFS
8290  case $as_dir in #(((
8291    '') as_dir=./ ;;
8292    */) ;;
8293    *) as_dir=$as_dir/ ;;
8294  esac
8295    for ac_exec_ext in '' $ac_executable_extensions; do
8296  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
8297    ac_cv_prog_ac_ct_DUMPBIN="$ac_prog"
8298    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
8299    break 2
8300  fi
8301done
8302  done
8303IFS=$as_save_IFS
8304
8305fi
8306fi
8307ac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN
8308if test -n "$ac_ct_DUMPBIN"; then
8309  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DUMPBIN" >&5
8310printf "%s\n" "$ac_ct_DUMPBIN" >&6; }
8311else
8312  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
8313printf "%s\n" "no" >&6; }
8314fi
8315
8316
8317  test -n "$ac_ct_DUMPBIN" && break
8318done
8319
8320  if test "x$ac_ct_DUMPBIN" = x; then
8321    DUMPBIN=":"
8322  else
8323    case $cross_compiling:$ac_tool_warned in
8324yes:)
8325{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8326printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8327ac_tool_warned=yes ;;
8328esac
8329    DUMPBIN=$ac_ct_DUMPBIN
8330  fi
8331fi
8332
8333    case `$DUMPBIN -symbols -headers /dev/null 2>&1 | sed '1q'` in
8334    *COFF*)
8335      DUMPBIN="$DUMPBIN -symbols -headers"
8336      ;;
8337    *)
8338      DUMPBIN=:
8339      ;;
8340    esac
8341  fi
8342
8343  if test : != "$DUMPBIN"; then
8344    NM=$DUMPBIN
8345  fi
8346fi
8347test -z "$NM" && NM=nm
8348
8349
8350
8351
8352
8353
8354{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface" >&5
8355printf %s "checking the name lister ($NM) interface... " >&6; }
8356if test ${lt_cv_nm_interface+y}
8357then :
8358  printf %s "(cached) " >&6
8359else $as_nop
8360  lt_cv_nm_interface="BSD nm"
8361  echo "int some_variable = 0;" > conftest.$ac_ext
8362  (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&5)
8363  (eval "$ac_compile" 2>conftest.err)
8364  cat conftest.err >&5
8365  (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
8366  (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
8367  cat conftest.err >&5
8368  (eval echo "\"\$as_me:$LINENO: output\"" >&5)
8369  cat conftest.out >&5
8370  if $GREP 'External.*some_variable' conftest.out > /dev/null; then
8371    lt_cv_nm_interface="MS dumpbin"
8372  fi
8373  rm -f conftest*
8374fi
8375{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_nm_interface" >&5
8376printf "%s\n" "$lt_cv_nm_interface" >&6; }
8377
8378{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
8379printf %s "checking whether ln -s works... " >&6; }
8380LN_S=$as_ln_s
8381if test "$LN_S" = "ln -s"; then
8382  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8383printf "%s\n" "yes" >&6; }
8384else
8385  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
8386printf "%s\n" "no, using $LN_S" >&6; }
8387fi
8388
8389# find the maximum length of command line arguments
8390{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5
8391printf %s "checking the maximum length of command line arguments... " >&6; }
8392if test ${lt_cv_sys_max_cmd_len+y}
8393then :
8394  printf %s "(cached) " >&6
8395else $as_nop
8396    i=0
8397  teststring=ABCD
8398
8399  case $build_os in
8400  msdosdjgpp*)
8401    # On DJGPP, this test can blow up pretty badly due to problems in libc
8402    # (any single argument exceeding 2000 bytes causes a buffer overrun
8403    # during glob expansion).  Even if it were fixed, the result of this
8404    # check would be larger than it should be.
8405    lt_cv_sys_max_cmd_len=12288;    # 12K is about right
8406    ;;
8407
8408  gnu*)
8409    # Under GNU Hurd, this test is not required because there is
8410    # no limit to the length of command line arguments.
8411    # Libtool will interpret -1 as no limit whatsoever
8412    lt_cv_sys_max_cmd_len=-1;
8413    ;;
8414
8415  cygwin* | mingw* | cegcc*)
8416    # On Win9x/ME, this test blows up -- it succeeds, but takes
8417    # about 5 minutes as the teststring grows exponentially.
8418    # Worse, since 9x/ME are not pre-emptively multitasking,
8419    # you end up with a "frozen" computer, even though with patience
8420    # the test eventually succeeds (with a max line length of 256k).
8421    # Instead, let's just punt: use the minimum linelength reported by
8422    # all of the supported platforms: 8192 (on NT/2K/XP).
8423    lt_cv_sys_max_cmd_len=8192;
8424    ;;
8425
8426  mint*)
8427    # On MiNT this can take a long time and run out of memory.
8428    lt_cv_sys_max_cmd_len=8192;
8429    ;;
8430
8431  amigaos*)
8432    # On AmigaOS with pdksh, this test takes hours, literally.
8433    # So we just punt and use a minimum line length of 8192.
8434    lt_cv_sys_max_cmd_len=8192;
8435    ;;
8436
8437  bitrig* | darwin* | dragonfly* | freebsd* | netbsd* | openbsd*)
8438    # This has been around since 386BSD, at least.  Likely further.
8439    if test -x /sbin/sysctl; then
8440      lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
8441    elif test -x /usr/sbin/sysctl; then
8442      lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
8443    else
8444      lt_cv_sys_max_cmd_len=65536	# usable default for all BSDs
8445    fi
8446    # And add a safety zone
8447    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
8448    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
8449    ;;
8450
8451  interix*)
8452    # We know the value 262144 and hardcode it with a safety zone (like BSD)
8453    lt_cv_sys_max_cmd_len=196608
8454    ;;
8455
8456  os2*)
8457    # The test takes a long time on OS/2.
8458    lt_cv_sys_max_cmd_len=8192
8459    ;;
8460
8461  osf*)
8462    # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
8463    # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
8464    # nice to cause kernel panics so lets avoid the loop below.
8465    # First set a reasonable default.
8466    lt_cv_sys_max_cmd_len=16384
8467    #
8468    if test -x /sbin/sysconfig; then
8469      case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
8470        *1*) lt_cv_sys_max_cmd_len=-1 ;;
8471      esac
8472    fi
8473    ;;
8474  sco3.2v5*)
8475    lt_cv_sys_max_cmd_len=102400
8476    ;;
8477  sysv5* | sco5v6* | sysv4.2uw2*)
8478    kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
8479    if test -n "$kargmax"; then
8480      lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[	 ]//'`
8481    else
8482      lt_cv_sys_max_cmd_len=32768
8483    fi
8484    ;;
8485  *)
8486    lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
8487    if test -n "$lt_cv_sys_max_cmd_len" && \
8488       test undefined != "$lt_cv_sys_max_cmd_len"; then
8489      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
8490      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
8491    else
8492      # Make teststring a little bigger before we do anything with it.
8493      # a 1K string should be a reasonable start.
8494      for i in 1 2 3 4 5 6 7 8; do
8495        teststring=$teststring$teststring
8496      done
8497      SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
8498      # If test is not a shell built-in, we'll probably end up computing a
8499      # maximum length that is only half of the actual maximum length, but
8500      # we can't tell.
8501      while { test X`env echo "$teststring$teststring" 2>/dev/null` \
8502	         = "X$teststring$teststring"; } >/dev/null 2>&1 &&
8503	      test 17 != "$i" # 1/2 MB should be enough
8504      do
8505        i=`expr $i + 1`
8506        teststring=$teststring$teststring
8507      done
8508      # Only check the string length outside the loop.
8509      lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
8510      teststring=
8511      # Add a significant safety factor because C++ compilers can tack on
8512      # massive amounts of additional arguments before passing them to the
8513      # linker.  It appears as though 1/2 is a usable value.
8514      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
8515    fi
8516    ;;
8517  esac
8518
8519fi
8520
8521if test -n "$lt_cv_sys_max_cmd_len"; then
8522  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len" >&5
8523printf "%s\n" "$lt_cv_sys_max_cmd_len" >&6; }
8524else
8525  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none" >&5
8526printf "%s\n" "none" >&6; }
8527fi
8528max_cmd_len=$lt_cv_sys_max_cmd_len
8529
8530
8531
8532
8533
8534
8535: ${CP="cp -f"}
8536: ${MV="mv -f"}
8537: ${RM="rm -f"}
8538
8539if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
8540  lt_unset=unset
8541else
8542  lt_unset=false
8543fi
8544
8545
8546
8547
8548
8549# test EBCDIC or ASCII
8550case `echo X|tr X '\101'` in
8551 A) # ASCII based system
8552    # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
8553  lt_SP2NL='tr \040 \012'
8554  lt_NL2SP='tr \015\012 \040\040'
8555  ;;
8556 *) # EBCDIC based system
8557  lt_SP2NL='tr \100 \n'
8558  lt_NL2SP='tr \r\n \100\100'
8559  ;;
8560esac
8561
8562
8563
8564
8565
8566
8567
8568
8569
8570{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to $host format" >&5
8571printf %s "checking how to convert $build file names to $host format... " >&6; }
8572if test ${lt_cv_to_host_file_cmd+y}
8573then :
8574  printf %s "(cached) " >&6
8575else $as_nop
8576  case $host in
8577  *-*-mingw* )
8578    case $build in
8579      *-*-mingw* ) # actually msys
8580        lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32
8581        ;;
8582      *-*-cygwin* )
8583        lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32
8584        ;;
8585      * ) # otherwise, assume *nix
8586        lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32
8587        ;;
8588    esac
8589    ;;
8590  *-*-cygwin* )
8591    case $build in
8592      *-*-mingw* ) # actually msys
8593        lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin
8594        ;;
8595      *-*-cygwin* )
8596        lt_cv_to_host_file_cmd=func_convert_file_noop
8597        ;;
8598      * ) # otherwise, assume *nix
8599        lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin
8600        ;;
8601    esac
8602    ;;
8603  * ) # unhandled hosts (and "normal" native builds)
8604    lt_cv_to_host_file_cmd=func_convert_file_noop
8605    ;;
8606esac
8607
8608fi
8609
8610to_host_file_cmd=$lt_cv_to_host_file_cmd
8611{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_host_file_cmd" >&5
8612printf "%s\n" "$lt_cv_to_host_file_cmd" >&6; }
8613
8614
8615
8616
8617
8618{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format" >&5
8619printf %s "checking how to convert $build file names to toolchain format... " >&6; }
8620if test ${lt_cv_to_tool_file_cmd+y}
8621then :
8622  printf %s "(cached) " >&6
8623else $as_nop
8624  #assume ordinary cross tools, or native build.
8625lt_cv_to_tool_file_cmd=func_convert_file_noop
8626case $host in
8627  *-*-mingw* )
8628    case $build in
8629      *-*-mingw* ) # actually msys
8630        lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32
8631        ;;
8632    esac
8633    ;;
8634esac
8635
8636fi
8637
8638to_tool_file_cmd=$lt_cv_to_tool_file_cmd
8639{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_tool_file_cmd" >&5
8640printf "%s\n" "$lt_cv_to_tool_file_cmd" >&6; }
8641
8642
8643
8644
8645
8646{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5
8647printf %s "checking for $LD option to reload object files... " >&6; }
8648if test ${lt_cv_ld_reload_flag+y}
8649then :
8650  printf %s "(cached) " >&6
8651else $as_nop
8652  lt_cv_ld_reload_flag='-r'
8653fi
8654{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_reload_flag" >&5
8655printf "%s\n" "$lt_cv_ld_reload_flag" >&6; }
8656reload_flag=$lt_cv_ld_reload_flag
8657case $reload_flag in
8658"" | " "*) ;;
8659*) reload_flag=" $reload_flag" ;;
8660esac
8661reload_cmds='$LD$reload_flag -o $output$reload_objs'
8662case $host_os in
8663  cygwin* | mingw* | pw32* | cegcc*)
8664    if test yes != "$GCC"; then
8665      reload_cmds=false
8666    fi
8667    ;;
8668  darwin*)
8669    if test yes = "$GCC"; then
8670      reload_cmds='$LTCC $LTCFLAGS -nostdlib $wl-r -o $output$reload_objs'
8671    else
8672      reload_cmds='$LD$reload_flag -o $output$reload_objs'
8673    fi
8674    ;;
8675esac
8676
8677
8678
8679
8680
8681
8682
8683
8684
8685if test -n "$ac_tool_prefix"; then
8686  # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
8687set dummy ${ac_tool_prefix}objdump; ac_word=$2
8688{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8689printf %s "checking for $ac_word... " >&6; }
8690if test ${ac_cv_prog_OBJDUMP+y}
8691then :
8692  printf %s "(cached) " >&6
8693else $as_nop
8694  if test -n "$OBJDUMP"; then
8695  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
8696else
8697as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8698for as_dir in $PATH
8699do
8700  IFS=$as_save_IFS
8701  case $as_dir in #(((
8702    '') as_dir=./ ;;
8703    */) ;;
8704    *) as_dir=$as_dir/ ;;
8705  esac
8706    for ac_exec_ext in '' $ac_executable_extensions; do
8707  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
8708    ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
8709    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
8710    break 2
8711  fi
8712done
8713  done
8714IFS=$as_save_IFS
8715
8716fi
8717fi
8718OBJDUMP=$ac_cv_prog_OBJDUMP
8719if test -n "$OBJDUMP"; then
8720  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
8721printf "%s\n" "$OBJDUMP" >&6; }
8722else
8723  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
8724printf "%s\n" "no" >&6; }
8725fi
8726
8727
8728fi
8729if test -z "$ac_cv_prog_OBJDUMP"; then
8730  ac_ct_OBJDUMP=$OBJDUMP
8731  # Extract the first word of "objdump", so it can be a program name with args.
8732set dummy objdump; ac_word=$2
8733{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8734printf %s "checking for $ac_word... " >&6; }
8735if test ${ac_cv_prog_ac_ct_OBJDUMP+y}
8736then :
8737  printf %s "(cached) " >&6
8738else $as_nop
8739  if test -n "$ac_ct_OBJDUMP"; then
8740  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
8741else
8742as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8743for as_dir in $PATH
8744do
8745  IFS=$as_save_IFS
8746  case $as_dir in #(((
8747    '') as_dir=./ ;;
8748    */) ;;
8749    *) as_dir=$as_dir/ ;;
8750  esac
8751    for ac_exec_ext in '' $ac_executable_extensions; do
8752  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
8753    ac_cv_prog_ac_ct_OBJDUMP="objdump"
8754    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
8755    break 2
8756  fi
8757done
8758  done
8759IFS=$as_save_IFS
8760
8761fi
8762fi
8763ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
8764if test -n "$ac_ct_OBJDUMP"; then
8765  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
8766printf "%s\n" "$ac_ct_OBJDUMP" >&6; }
8767else
8768  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
8769printf "%s\n" "no" >&6; }
8770fi
8771
8772  if test "x$ac_ct_OBJDUMP" = x; then
8773    OBJDUMP="false"
8774  else
8775    case $cross_compiling:$ac_tool_warned in
8776yes:)
8777{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8778printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8779ac_tool_warned=yes ;;
8780esac
8781    OBJDUMP=$ac_ct_OBJDUMP
8782  fi
8783else
8784  OBJDUMP="$ac_cv_prog_OBJDUMP"
8785fi
8786
8787test -z "$OBJDUMP" && OBJDUMP=objdump
8788
8789
8790
8791
8792
8793
8794
8795
8796
8797{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries" >&5
8798printf %s "checking how to recognize dependent libraries... " >&6; }
8799if test ${lt_cv_deplibs_check_method+y}
8800then :
8801  printf %s "(cached) " >&6
8802else $as_nop
8803  lt_cv_file_magic_cmd='$MAGIC_CMD'
8804lt_cv_file_magic_test_file=
8805lt_cv_deplibs_check_method='unknown'
8806# Need to set the preceding variable on all platforms that support
8807# interlibrary dependencies.
8808# 'none' -- dependencies not supported.
8809# 'unknown' -- same as none, but documents that we really don't know.
8810# 'pass_all' -- all dependencies passed with no checks.
8811# 'test_compile' -- check by making test program.
8812# 'file_magic [[regex]]' -- check by looking for files in library path
8813# that responds to the $file_magic_cmd with a given extended regex.
8814# If you have 'file' or equivalent on your system and you're not sure
8815# whether 'pass_all' will *always* work, you probably want this one.
8816
8817case $host_os in
8818aix[4-9]*)
8819  lt_cv_deplibs_check_method=pass_all
8820  ;;
8821
8822beos*)
8823  lt_cv_deplibs_check_method=pass_all
8824  ;;
8825
8826bsdi[45]*)
8827  lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
8828  lt_cv_file_magic_cmd='/usr/bin/file -L'
8829  lt_cv_file_magic_test_file=/shlib/libc.so
8830  ;;
8831
8832cygwin*)
8833  # func_win32_libid is a shell function defined in ltmain.sh
8834  lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
8835  lt_cv_file_magic_cmd='func_win32_libid'
8836  ;;
8837
8838mingw* | pw32*)
8839  # Base MSYS/MinGW do not provide the 'file' command needed by
8840  # func_win32_libid shell function, so use a weaker test based on 'objdump',
8841  # unless we find 'file', for example because we are cross-compiling.
8842  if ( file / ) >/dev/null 2>&1; then
8843    lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
8844    lt_cv_file_magic_cmd='func_win32_libid'
8845  else
8846    # Keep this pattern in sync with the one in func_win32_libid.
8847    lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)'
8848    lt_cv_file_magic_cmd='$OBJDUMP -f'
8849  fi
8850  ;;
8851
8852cegcc*)
8853  # use the weaker test based on 'objdump'. See mingw*.
8854  lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
8855  lt_cv_file_magic_cmd='$OBJDUMP -f'
8856  ;;
8857
8858darwin* | rhapsody*)
8859  lt_cv_deplibs_check_method=pass_all
8860  ;;
8861
8862freebsd* | dragonfly*)
8863  if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
8864    case $host_cpu in
8865    i*86 )
8866      # Not sure whether the presence of OpenBSD here was a mistake.
8867      # Let's accept both of them until this is cleared up.
8868      lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library'
8869      lt_cv_file_magic_cmd=/usr/bin/file
8870      lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
8871      ;;
8872    esac
8873  else
8874    lt_cv_deplibs_check_method=pass_all
8875  fi
8876  ;;
8877
8878haiku*)
8879  lt_cv_deplibs_check_method=pass_all
8880  ;;
8881
8882hpux10.20* | hpux11*)
8883  lt_cv_file_magic_cmd=/usr/bin/file
8884  case $host_cpu in
8885  ia64*)
8886    lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64'
8887    lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
8888    ;;
8889  hppa*64*)
8890    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]'
8891    lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
8892    ;;
8893  *)
8894    lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9]\.[0-9]) shared library'
8895    lt_cv_file_magic_test_file=/usr/lib/libc.sl
8896    ;;
8897  esac
8898  ;;
8899
8900interix[3-9]*)
8901  # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
8902  lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$'
8903  ;;
8904
8905irix5* | irix6* | nonstopux*)
8906  case $LD in
8907  *-32|*"-32 ") libmagic=32-bit;;
8908  *-n32|*"-n32 ") libmagic=N32;;
8909  *-64|*"-64 ") libmagic=64-bit;;
8910  *) libmagic=never-match;;
8911  esac
8912  lt_cv_deplibs_check_method=pass_all
8913  ;;
8914
8915# This must be glibc/ELF.
8916linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
8917  lt_cv_deplibs_check_method=pass_all
8918  ;;
8919
8920netbsd*)
8921  if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
8922    lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
8923  else
8924    lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$'
8925  fi
8926  ;;
8927
8928newos6*)
8929  lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'
8930  lt_cv_file_magic_cmd=/usr/bin/file
8931  lt_cv_file_magic_test_file=/usr/lib/libnls.so
8932  ;;
8933
8934*nto* | *qnx*)
8935  lt_cv_deplibs_check_method=pass_all
8936  ;;
8937
8938openbsd* | bitrig*)
8939  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
8940    lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$'
8941  else
8942    lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
8943  fi
8944  ;;
8945
8946osf3* | osf4* | osf5*)
8947  lt_cv_deplibs_check_method=pass_all
8948  ;;
8949
8950rdos*)
8951  lt_cv_deplibs_check_method=pass_all
8952  ;;
8953
8954solaris*)
8955  lt_cv_deplibs_check_method=pass_all
8956  ;;
8957
8958sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
8959  lt_cv_deplibs_check_method=pass_all
8960  ;;
8961
8962sysv4 | sysv4.3*)
8963  case $host_vendor in
8964  motorola)
8965    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]'
8966    lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
8967    ;;
8968  ncr)
8969    lt_cv_deplibs_check_method=pass_all
8970    ;;
8971  sequent)
8972    lt_cv_file_magic_cmd='/bin/file'
8973    lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'
8974    ;;
8975  sni)
8976    lt_cv_file_magic_cmd='/bin/file'
8977    lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib"
8978    lt_cv_file_magic_test_file=/lib/libc.so
8979    ;;
8980  siemens)
8981    lt_cv_deplibs_check_method=pass_all
8982    ;;
8983  pc)
8984    lt_cv_deplibs_check_method=pass_all
8985    ;;
8986  esac
8987  ;;
8988
8989tpf*)
8990  lt_cv_deplibs_check_method=pass_all
8991  ;;
8992os2*)
8993  lt_cv_deplibs_check_method=pass_all
8994  ;;
8995esac
8996
8997fi
8998{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5
8999printf "%s\n" "$lt_cv_deplibs_check_method" >&6; }
9000
9001file_magic_glob=
9002want_nocaseglob=no
9003if test "$build" = "$host"; then
9004  case $host_os in
9005  mingw* | pw32*)
9006    if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then
9007      want_nocaseglob=yes
9008    else
9009      file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[\1]\/[\1]\/g;/g"`
9010    fi
9011    ;;
9012  esac
9013fi
9014
9015file_magic_cmd=$lt_cv_file_magic_cmd
9016deplibs_check_method=$lt_cv_deplibs_check_method
9017test -z "$deplibs_check_method" && deplibs_check_method=unknown
9018
9019
9020
9021
9022
9023
9024
9025
9026
9027
9028
9029
9030
9031
9032
9033
9034
9035
9036
9037
9038
9039
9040if test -n "$ac_tool_prefix"; then
9041  # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
9042set dummy ${ac_tool_prefix}dlltool; ac_word=$2
9043{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9044printf %s "checking for $ac_word... " >&6; }
9045if test ${ac_cv_prog_DLLTOOL+y}
9046then :
9047  printf %s "(cached) " >&6
9048else $as_nop
9049  if test -n "$DLLTOOL"; then
9050  ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
9051else
9052as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9053for as_dir in $PATH
9054do
9055  IFS=$as_save_IFS
9056  case $as_dir in #(((
9057    '') as_dir=./ ;;
9058    */) ;;
9059    *) as_dir=$as_dir/ ;;
9060  esac
9061    for ac_exec_ext in '' $ac_executable_extensions; do
9062  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
9063    ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
9064    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
9065    break 2
9066  fi
9067done
9068  done
9069IFS=$as_save_IFS
9070
9071fi
9072fi
9073DLLTOOL=$ac_cv_prog_DLLTOOL
9074if test -n "$DLLTOOL"; then
9075  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5
9076printf "%s\n" "$DLLTOOL" >&6; }
9077else
9078  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
9079printf "%s\n" "no" >&6; }
9080fi
9081
9082
9083fi
9084if test -z "$ac_cv_prog_DLLTOOL"; then
9085  ac_ct_DLLTOOL=$DLLTOOL
9086  # Extract the first word of "dlltool", so it can be a program name with args.
9087set dummy dlltool; ac_word=$2
9088{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9089printf %s "checking for $ac_word... " >&6; }
9090if test ${ac_cv_prog_ac_ct_DLLTOOL+y}
9091then :
9092  printf %s "(cached) " >&6
9093else $as_nop
9094  if test -n "$ac_ct_DLLTOOL"; then
9095  ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
9096else
9097as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9098for as_dir in $PATH
9099do
9100  IFS=$as_save_IFS
9101  case $as_dir in #(((
9102    '') as_dir=./ ;;
9103    */) ;;
9104    *) as_dir=$as_dir/ ;;
9105  esac
9106    for ac_exec_ext in '' $ac_executable_extensions; do
9107  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
9108    ac_cv_prog_ac_ct_DLLTOOL="dlltool"
9109    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
9110    break 2
9111  fi
9112done
9113  done
9114IFS=$as_save_IFS
9115
9116fi
9117fi
9118ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
9119if test -n "$ac_ct_DLLTOOL"; then
9120  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5
9121printf "%s\n" "$ac_ct_DLLTOOL" >&6; }
9122else
9123  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
9124printf "%s\n" "no" >&6; }
9125fi
9126
9127  if test "x$ac_ct_DLLTOOL" = x; then
9128    DLLTOOL="false"
9129  else
9130    case $cross_compiling:$ac_tool_warned in
9131yes:)
9132{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9133printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9134ac_tool_warned=yes ;;
9135esac
9136    DLLTOOL=$ac_ct_DLLTOOL
9137  fi
9138else
9139  DLLTOOL="$ac_cv_prog_DLLTOOL"
9140fi
9141
9142test -z "$DLLTOOL" && DLLTOOL=dlltool
9143
9144
9145
9146
9147
9148
9149
9150
9151
9152
9153{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to associate runtime and link libraries" >&5
9154printf %s "checking how to associate runtime and link libraries... " >&6; }
9155if test ${lt_cv_sharedlib_from_linklib_cmd+y}
9156then :
9157  printf %s "(cached) " >&6
9158else $as_nop
9159  lt_cv_sharedlib_from_linklib_cmd='unknown'
9160
9161case $host_os in
9162cygwin* | mingw* | pw32* | cegcc*)
9163  # two different shell functions defined in ltmain.sh;
9164  # decide which one to use based on capabilities of $DLLTOOL
9165  case `$DLLTOOL --help 2>&1` in
9166  *--identify-strict*)
9167    lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib
9168    ;;
9169  *)
9170    lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback
9171    ;;
9172  esac
9173  ;;
9174*)
9175  # fallback: assume linklib IS sharedlib
9176  lt_cv_sharedlib_from_linklib_cmd=$ECHO
9177  ;;
9178esac
9179
9180fi
9181{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sharedlib_from_linklib_cmd" >&5
9182printf "%s\n" "$lt_cv_sharedlib_from_linklib_cmd" >&6; }
9183sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd
9184test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO
9185
9186
9187
9188
9189
9190
9191
9192if test -n "$ac_tool_prefix"; then
9193  for ac_prog in ar
9194  do
9195    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
9196set dummy $ac_tool_prefix$ac_prog; ac_word=$2
9197{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9198printf %s "checking for $ac_word... " >&6; }
9199if test ${ac_cv_prog_AR+y}
9200then :
9201  printf %s "(cached) " >&6
9202else $as_nop
9203  if test -n "$AR"; then
9204  ac_cv_prog_AR="$AR" # Let the user override the test.
9205else
9206as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9207for as_dir in $PATH
9208do
9209  IFS=$as_save_IFS
9210  case $as_dir in #(((
9211    '') as_dir=./ ;;
9212    */) ;;
9213    *) as_dir=$as_dir/ ;;
9214  esac
9215    for ac_exec_ext in '' $ac_executable_extensions; do
9216  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
9217    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
9218    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
9219    break 2
9220  fi
9221done
9222  done
9223IFS=$as_save_IFS
9224
9225fi
9226fi
9227AR=$ac_cv_prog_AR
9228if test -n "$AR"; then
9229  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
9230printf "%s\n" "$AR" >&6; }
9231else
9232  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
9233printf "%s\n" "no" >&6; }
9234fi
9235
9236
9237    test -n "$AR" && break
9238  done
9239fi
9240if test -z "$AR"; then
9241  ac_ct_AR=$AR
9242  for ac_prog in ar
9243do
9244  # Extract the first word of "$ac_prog", so it can be a program name with args.
9245set dummy $ac_prog; ac_word=$2
9246{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9247printf %s "checking for $ac_word... " >&6; }
9248if test ${ac_cv_prog_ac_ct_AR+y}
9249then :
9250  printf %s "(cached) " >&6
9251else $as_nop
9252  if test -n "$ac_ct_AR"; then
9253  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
9254else
9255as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9256for as_dir in $PATH
9257do
9258  IFS=$as_save_IFS
9259  case $as_dir in #(((
9260    '') as_dir=./ ;;
9261    */) ;;
9262    *) as_dir=$as_dir/ ;;
9263  esac
9264    for ac_exec_ext in '' $ac_executable_extensions; do
9265  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
9266    ac_cv_prog_ac_ct_AR="$ac_prog"
9267    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
9268    break 2
9269  fi
9270done
9271  done
9272IFS=$as_save_IFS
9273
9274fi
9275fi
9276ac_ct_AR=$ac_cv_prog_ac_ct_AR
9277if test -n "$ac_ct_AR"; then
9278  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
9279printf "%s\n" "$ac_ct_AR" >&6; }
9280else
9281  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
9282printf "%s\n" "no" >&6; }
9283fi
9284
9285
9286  test -n "$ac_ct_AR" && break
9287done
9288
9289  if test "x$ac_ct_AR" = x; then
9290    AR="false"
9291  else
9292    case $cross_compiling:$ac_tool_warned in
9293yes:)
9294{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9295printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9296ac_tool_warned=yes ;;
9297esac
9298    AR=$ac_ct_AR
9299  fi
9300fi
9301
9302: ${AR=ar}
9303: ${AR_FLAGS=cru}
9304
9305
9306
9307
9308
9309
9310
9311
9312
9313
9314
9315{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support" >&5
9316printf %s "checking for archiver @FILE support... " >&6; }
9317if test ${lt_cv_ar_at_file+y}
9318then :
9319  printf %s "(cached) " >&6
9320else $as_nop
9321  lt_cv_ar_at_file=no
9322   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9323/* end confdefs.h.  */
9324
9325int
9326main (void)
9327{
9328
9329  ;
9330  return 0;
9331}
9332_ACEOF
9333if ac_fn_c_try_compile "$LINENO"
9334then :
9335  echo conftest.$ac_objext > conftest.lst
9336      lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&5'
9337      { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5
9338  (eval $lt_ar_try) 2>&5
9339  ac_status=$?
9340  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
9341  test $ac_status = 0; }
9342      if test 0 -eq "$ac_status"; then
9343	# Ensure the archiver fails upon bogus file names.
9344	rm -f conftest.$ac_objext libconftest.a
9345	{ { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5
9346  (eval $lt_ar_try) 2>&5
9347  ac_status=$?
9348  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
9349  test $ac_status = 0; }
9350	if test 0 -ne "$ac_status"; then
9351          lt_cv_ar_at_file=@
9352        fi
9353      fi
9354      rm -f conftest.* libconftest.a
9355
9356fi
9357rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
9358
9359fi
9360{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5
9361printf "%s\n" "$lt_cv_ar_at_file" >&6; }
9362
9363if test no = "$lt_cv_ar_at_file"; then
9364  archiver_list_spec=
9365else
9366  archiver_list_spec=$lt_cv_ar_at_file
9367fi
9368
9369
9370
9371
9372
9373
9374
9375if test -n "$ac_tool_prefix"; then
9376  # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
9377set dummy ${ac_tool_prefix}strip; ac_word=$2
9378{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9379printf %s "checking for $ac_word... " >&6; }
9380if test ${ac_cv_prog_STRIP+y}
9381then :
9382  printf %s "(cached) " >&6
9383else $as_nop
9384  if test -n "$STRIP"; then
9385  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
9386else
9387as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9388for as_dir in $PATH
9389do
9390  IFS=$as_save_IFS
9391  case $as_dir in #(((
9392    '') as_dir=./ ;;
9393    */) ;;
9394    *) as_dir=$as_dir/ ;;
9395  esac
9396    for ac_exec_ext in '' $ac_executable_extensions; do
9397  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
9398    ac_cv_prog_STRIP="${ac_tool_prefix}strip"
9399    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
9400    break 2
9401  fi
9402done
9403  done
9404IFS=$as_save_IFS
9405
9406fi
9407fi
9408STRIP=$ac_cv_prog_STRIP
9409if test -n "$STRIP"; then
9410  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
9411printf "%s\n" "$STRIP" >&6; }
9412else
9413  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
9414printf "%s\n" "no" >&6; }
9415fi
9416
9417
9418fi
9419if test -z "$ac_cv_prog_STRIP"; then
9420  ac_ct_STRIP=$STRIP
9421  # Extract the first word of "strip", so it can be a program name with args.
9422set dummy strip; ac_word=$2
9423{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9424printf %s "checking for $ac_word... " >&6; }
9425if test ${ac_cv_prog_ac_ct_STRIP+y}
9426then :
9427  printf %s "(cached) " >&6
9428else $as_nop
9429  if test -n "$ac_ct_STRIP"; then
9430  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
9431else
9432as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9433for as_dir in $PATH
9434do
9435  IFS=$as_save_IFS
9436  case $as_dir in #(((
9437    '') as_dir=./ ;;
9438    */) ;;
9439    *) as_dir=$as_dir/ ;;
9440  esac
9441    for ac_exec_ext in '' $ac_executable_extensions; do
9442  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
9443    ac_cv_prog_ac_ct_STRIP="strip"
9444    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
9445    break 2
9446  fi
9447done
9448  done
9449IFS=$as_save_IFS
9450
9451fi
9452fi
9453ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
9454if test -n "$ac_ct_STRIP"; then
9455  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
9456printf "%s\n" "$ac_ct_STRIP" >&6; }
9457else
9458  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
9459printf "%s\n" "no" >&6; }
9460fi
9461
9462  if test "x$ac_ct_STRIP" = x; then
9463    STRIP=":"
9464  else
9465    case $cross_compiling:$ac_tool_warned in
9466yes:)
9467{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9468printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9469ac_tool_warned=yes ;;
9470esac
9471    STRIP=$ac_ct_STRIP
9472  fi
9473else
9474  STRIP="$ac_cv_prog_STRIP"
9475fi
9476
9477test -z "$STRIP" && STRIP=:
9478
9479
9480
9481
9482
9483
9484if test -n "$ac_tool_prefix"; then
9485  # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
9486set dummy ${ac_tool_prefix}ranlib; ac_word=$2
9487{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9488printf %s "checking for $ac_word... " >&6; }
9489if test ${ac_cv_prog_RANLIB+y}
9490then :
9491  printf %s "(cached) " >&6
9492else $as_nop
9493  if test -n "$RANLIB"; then
9494  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
9495else
9496as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9497for as_dir in $PATH
9498do
9499  IFS=$as_save_IFS
9500  case $as_dir in #(((
9501    '') as_dir=./ ;;
9502    */) ;;
9503    *) as_dir=$as_dir/ ;;
9504  esac
9505    for ac_exec_ext in '' $ac_executable_extensions; do
9506  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
9507    ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
9508    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
9509    break 2
9510  fi
9511done
9512  done
9513IFS=$as_save_IFS
9514
9515fi
9516fi
9517RANLIB=$ac_cv_prog_RANLIB
9518if test -n "$RANLIB"; then
9519  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
9520printf "%s\n" "$RANLIB" >&6; }
9521else
9522  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
9523printf "%s\n" "no" >&6; }
9524fi
9525
9526
9527fi
9528if test -z "$ac_cv_prog_RANLIB"; then
9529  ac_ct_RANLIB=$RANLIB
9530  # Extract the first word of "ranlib", so it can be a program name with args.
9531set dummy ranlib; ac_word=$2
9532{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9533printf %s "checking for $ac_word... " >&6; }
9534if test ${ac_cv_prog_ac_ct_RANLIB+y}
9535then :
9536  printf %s "(cached) " >&6
9537else $as_nop
9538  if test -n "$ac_ct_RANLIB"; then
9539  ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
9540else
9541as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9542for as_dir in $PATH
9543do
9544  IFS=$as_save_IFS
9545  case $as_dir in #(((
9546    '') as_dir=./ ;;
9547    */) ;;
9548    *) as_dir=$as_dir/ ;;
9549  esac
9550    for ac_exec_ext in '' $ac_executable_extensions; do
9551  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
9552    ac_cv_prog_ac_ct_RANLIB="ranlib"
9553    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
9554    break 2
9555  fi
9556done
9557  done
9558IFS=$as_save_IFS
9559
9560fi
9561fi
9562ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
9563if test -n "$ac_ct_RANLIB"; then
9564  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
9565printf "%s\n" "$ac_ct_RANLIB" >&6; }
9566else
9567  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
9568printf "%s\n" "no" >&6; }
9569fi
9570
9571  if test "x$ac_ct_RANLIB" = x; then
9572    RANLIB=":"
9573  else
9574    case $cross_compiling:$ac_tool_warned in
9575yes:)
9576{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9577printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9578ac_tool_warned=yes ;;
9579esac
9580    RANLIB=$ac_ct_RANLIB
9581  fi
9582else
9583  RANLIB="$ac_cv_prog_RANLIB"
9584fi
9585
9586test -z "$RANLIB" && RANLIB=:
9587
9588
9589
9590
9591
9592
9593# Determine commands to create old-style static archives.
9594old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
9595old_postinstall_cmds='chmod 644 $oldlib'
9596old_postuninstall_cmds=
9597
9598if test -n "$RANLIB"; then
9599  case $host_os in
9600  bitrig* | openbsd*)
9601    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib"
9602    ;;
9603  *)
9604    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib"
9605    ;;
9606  esac
9607  old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib"
9608fi
9609
9610case $host_os in
9611  darwin*)
9612    lock_old_archive_extraction=yes ;;
9613  *)
9614    lock_old_archive_extraction=no ;;
9615esac
9616
9617
9618
9619
9620
9621
9622
9623
9624
9625
9626
9627
9628
9629
9630
9631
9632
9633
9634
9635
9636
9637for ac_prog in gawk mawk nawk awk
9638do
9639  # Extract the first word of "$ac_prog", so it can be a program name with args.
9640set dummy $ac_prog; ac_word=$2
9641{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9642printf %s "checking for $ac_word... " >&6; }
9643if test ${ac_cv_prog_AWK+y}
9644then :
9645  printf %s "(cached) " >&6
9646else $as_nop
9647  if test -n "$AWK"; then
9648  ac_cv_prog_AWK="$AWK" # Let the user override the test.
9649else
9650as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9651for as_dir in $PATH
9652do
9653  IFS=$as_save_IFS
9654  case $as_dir in #(((
9655    '') as_dir=./ ;;
9656    */) ;;
9657    *) as_dir=$as_dir/ ;;
9658  esac
9659    for ac_exec_ext in '' $ac_executable_extensions; do
9660  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
9661    ac_cv_prog_AWK="$ac_prog"
9662    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
9663    break 2
9664  fi
9665done
9666  done
9667IFS=$as_save_IFS
9668
9669fi
9670fi
9671AWK=$ac_cv_prog_AWK
9672if test -n "$AWK"; then
9673  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
9674printf "%s\n" "$AWK" >&6; }
9675else
9676  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
9677printf "%s\n" "no" >&6; }
9678fi
9679
9680
9681  test -n "$AWK" && break
9682done
9683
9684
9685
9686
9687
9688
9689
9690
9691
9692
9693
9694
9695
9696
9697
9698
9699
9700
9701
9702# If no C compiler was specified, use CC.
9703LTCC=${LTCC-"$CC"}
9704
9705# If no C compiler flags were specified, use CFLAGS.
9706LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
9707
9708# Allow CC to be a program name with arguments.
9709compiler=$CC
9710
9711
9712# Check for command to grab the raw symbol name followed by C symbol from nm.
9713{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5
9714printf %s "checking command to parse $NM output from $compiler object... " >&6; }
9715if test ${lt_cv_sys_global_symbol_pipe+y}
9716then :
9717  printf %s "(cached) " >&6
9718else $as_nop
9719
9720# These are sane defaults that work on at least a few old systems.
9721# [They come from Ultrix.  What could be older than Ultrix?!! ;)]
9722
9723# Character class describing NM global symbol codes.
9724symcode='[BCDEGRST]'
9725
9726# Regexp to match symbols that can be accessed directly from C.
9727sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
9728
9729# Define system-specific variables.
9730case $host_os in
9731aix*)
9732  symcode='[BCDT]'
9733  ;;
9734cygwin* | mingw* | pw32* | cegcc*)
9735  symcode='[ABCDGISTW]'
9736  ;;
9737hpux*)
9738  if test ia64 = "$host_cpu"; then
9739    symcode='[ABCDEGRST]'
9740  fi
9741  ;;
9742irix* | nonstopux*)
9743  symcode='[BCDEGRST]'
9744  ;;
9745osf*)
9746  symcode='[BCDEGQRST]'
9747  ;;
9748solaris*)
9749  symcode='[BDRT]'
9750  ;;
9751sco3.2v5*)
9752  symcode='[DT]'
9753  ;;
9754sysv4.2uw2*)
9755  symcode='[DT]'
9756  ;;
9757sysv5* | sco5v6* | unixware* | OpenUNIX*)
9758  symcode='[ABDT]'
9759  ;;
9760sysv4)
9761  symcode='[DFNSTU]'
9762  ;;
9763esac
9764
9765# If we're using GNU nm, then use its standard symbol codes.
9766case `$NM -V 2>&1` in
9767*GNU* | *'with BFD'*)
9768  symcode='[ABCDGIRSTW]' ;;
9769esac
9770
9771if test "$lt_cv_nm_interface" = "MS dumpbin"; then
9772  # Gets list of data symbols to import.
9773  lt_cv_sys_global_symbol_to_import="sed -n -e 's/^I .* \(.*\)$/\1/p'"
9774  # Adjust the below global symbol transforms to fixup imported variables.
9775  lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'"
9776  lt_c_name_hook=" -e 's/^I .* \(.*\)$/  {\"\1\", (void *) 0},/p'"
9777  lt_c_name_lib_hook="\
9778  -e 's/^I .* \(lib.*\)$/  {\"\1\", (void *) 0},/p'\
9779  -e 's/^I .* \(.*\)$/  {\"lib\1\", (void *) 0},/p'"
9780else
9781  # Disable hooks by default.
9782  lt_cv_sys_global_symbol_to_import=
9783  lt_cdecl_hook=
9784  lt_c_name_hook=
9785  lt_c_name_lib_hook=
9786fi
9787
9788# Transform an extracted symbol line into a proper C declaration.
9789# Some systems (esp. on ia64) link data and code symbols differently,
9790# so use this general approach.
9791lt_cv_sys_global_symbol_to_cdecl="sed -n"\
9792$lt_cdecl_hook\
9793" -e 's/^T .* \(.*\)$/extern int \1();/p'"\
9794" -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'"
9795
9796# Transform an extracted symbol line into symbol name and symbol address
9797lt_cv_sys_global_symbol_to_c_name_address="sed -n"\
9798$lt_c_name_hook\
9799" -e 's/^: \(.*\) .*$/  {\"\1\", (void *) 0},/p'"\
9800" -e 's/^$symcode$symcode* .* \(.*\)$/  {\"\1\", (void *) \&\1},/p'"
9801
9802# Transform an extracted symbol line into symbol name with lib prefix and
9803# symbol address.
9804lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n"\
9805$lt_c_name_lib_hook\
9806" -e 's/^: \(.*\) .*$/  {\"\1\", (void *) 0},/p'"\
9807" -e 's/^$symcode$symcode* .* \(lib.*\)$/  {\"\1\", (void *) \&\1},/p'"\
9808" -e 's/^$symcode$symcode* .* \(.*\)$/  {\"lib\1\", (void *) \&\1},/p'"
9809
9810# Handle CRLF in mingw tool chain
9811opt_cr=
9812case $build_os in
9813mingw*)
9814  opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
9815  ;;
9816esac
9817
9818# Try without a prefix underscore, then with it.
9819for ac_symprfx in "" "_"; do
9820
9821  # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
9822  symxfrm="\\1 $ac_symprfx\\2 \\2"
9823
9824  # Write the raw and C identifiers.
9825  if test "$lt_cv_nm_interface" = "MS dumpbin"; then
9826    # Fake it for dumpbin and say T for any non-static function,
9827    # D for any global variable and I for any imported variable.
9828    # Also find C++ and __fastcall symbols from MSVC++,
9829    # which start with @ or ?.
9830    lt_cv_sys_global_symbol_pipe="$AWK '"\
9831"     {last_section=section; section=\$ 3};"\
9832"     /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\
9833"     /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
9834"     /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\
9835"     /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\
9836"     /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\
9837"     \$ 0!~/External *\|/{next};"\
9838"     / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
9839"     {if(hide[section]) next};"\
9840"     {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\
9841"     {split(\$ 0,a,/\||\r/); split(a[2],s)};"\
9842"     s[1]~/^[@?]/{print f,s[1],s[1]; next};"\
9843"     s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\
9844"     ' prfx=^$ac_symprfx"
9845  else
9846    lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[	 ]\($symcode$symcode*\)[	 ][	 ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
9847  fi
9848  lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'"
9849
9850  # Check to see that the pipe works correctly.
9851  pipe_works=no
9852
9853  rm -f conftest*
9854  cat > conftest.$ac_ext <<_LT_EOF
9855#ifdef __cplusplus
9856extern "C" {
9857#endif
9858char nm_test_var;
9859void nm_test_func(void);
9860void nm_test_func(void){}
9861#ifdef __cplusplus
9862}
9863#endif
9864int main(){nm_test_var='a';nm_test_func();return(0);}
9865_LT_EOF
9866
9867  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
9868  (eval $ac_compile) 2>&5
9869  ac_status=$?
9870  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
9871  test $ac_status = 0; }; then
9872    # Now try to grab the symbols.
9873    nlist=conftest.nm
9874    if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist\""; } >&5
9875  (eval $NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) 2>&5
9876  ac_status=$?
9877  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
9878  test $ac_status = 0; } && test -s "$nlist"; then
9879      # Try sorting and uniquifying the output.
9880      if sort "$nlist" | uniq > "$nlist"T; then
9881	mv -f "$nlist"T "$nlist"
9882      else
9883	rm -f "$nlist"T
9884      fi
9885
9886      # Make sure that we snagged all the symbols we need.
9887      if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
9888	if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
9889	  cat <<_LT_EOF > conftest.$ac_ext
9890/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests.  */
9891#if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE
9892/* DATA imports from DLLs on WIN32 can't be const, because runtime
9893   relocations are performed -- see ld's documentation on pseudo-relocs.  */
9894# define LT_DLSYM_CONST
9895#elif defined __osf__
9896/* This system does not cope well with relocations in const data.  */
9897# define LT_DLSYM_CONST
9898#else
9899# define LT_DLSYM_CONST const
9900#endif
9901
9902#ifdef __cplusplus
9903extern "C" {
9904#endif
9905
9906_LT_EOF
9907	  # Now generate the symbol file.
9908	  eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
9909
9910	  cat <<_LT_EOF >> conftest.$ac_ext
9911
9912/* The mapping between symbol names and symbols.  */
9913LT_DLSYM_CONST struct {
9914  const char *name;
9915  void       *address;
9916}
9917lt__PROGRAM__LTX_preloaded_symbols[] =
9918{
9919  { "@PROGRAM@", (void *) 0 },
9920_LT_EOF
9921	  $SED "s/^$symcode$symcode* .* \(.*\)$/  {\"\1\", (void *) \&\1},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
9922	  cat <<\_LT_EOF >> conftest.$ac_ext
9923  {0, (void *) 0}
9924};
9925
9926/* This works around a problem in FreeBSD linker */
9927#ifdef FREEBSD_WORKAROUND
9928static const void *lt_preloaded_setup() {
9929  return lt__PROGRAM__LTX_preloaded_symbols;
9930}
9931#endif
9932
9933#ifdef __cplusplus
9934}
9935#endif
9936_LT_EOF
9937	  # Now try linking the two files.
9938	  mv conftest.$ac_objext conftstm.$ac_objext
9939	  lt_globsym_save_LIBS=$LIBS
9940	  lt_globsym_save_CFLAGS=$CFLAGS
9941	  LIBS=conftstm.$ac_objext
9942	  CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag"
9943	  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
9944  (eval $ac_link) 2>&5
9945  ac_status=$?
9946  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
9947  test $ac_status = 0; } && test -s conftest$ac_exeext; then
9948	    pipe_works=yes
9949	  fi
9950	  LIBS=$lt_globsym_save_LIBS
9951	  CFLAGS=$lt_globsym_save_CFLAGS
9952	else
9953	  echo "cannot find nm_test_func in $nlist" >&5
9954	fi
9955      else
9956	echo "cannot find nm_test_var in $nlist" >&5
9957      fi
9958    else
9959      echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5
9960    fi
9961  else
9962    echo "$progname: failed program was:" >&5
9963    cat conftest.$ac_ext >&5
9964  fi
9965  rm -rf conftest* conftst*
9966
9967  # Do not use the global_symbol_pipe unless it works.
9968  if test yes = "$pipe_works"; then
9969    break
9970  else
9971    lt_cv_sys_global_symbol_pipe=
9972  fi
9973done
9974
9975fi
9976
9977if test -z "$lt_cv_sys_global_symbol_pipe"; then
9978  lt_cv_sys_global_symbol_to_cdecl=
9979fi
9980if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
9981  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: failed" >&5
9982printf "%s\n" "failed" >&6; }
9983else
9984  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ok" >&5
9985printf "%s\n" "ok" >&6; }
9986fi
9987
9988# Response file support.
9989if test "$lt_cv_nm_interface" = "MS dumpbin"; then
9990  nm_file_list_spec='@'
9991elif $NM --help 2>/dev/null | grep '[@]FILE' >/dev/null; then
9992  nm_file_list_spec='@'
9993fi
9994
9995
9996
9997
9998
9999
10000
10001
10002
10003
10004
10005
10006
10007
10008
10009
10010
10011
10012
10013
10014
10015
10016
10017
10018
10019
10020
10021
10022
10023
10024
10025
10026
10027
10028
10029
10030
10031{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
10032printf %s "checking for sysroot... " >&6; }
10033
10034# Check whether --with-sysroot was given.
10035if test ${with_sysroot+y}
10036then :
10037  withval=$with_sysroot;
10038else $as_nop
10039  with_sysroot=no
10040fi
10041
10042
10043lt_sysroot=
10044case $with_sysroot in #(
10045 yes)
10046   if test yes = "$GCC"; then
10047     lt_sysroot=`$CC --print-sysroot 2>/dev/null`
10048   fi
10049   ;; #(
10050 /*)
10051   lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"`
10052   ;; #(
10053 no|'')
10054   ;; #(
10055 *)
10056   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $with_sysroot" >&5
10057printf "%s\n" "$with_sysroot" >&6; }
10058   as_fn_error $? "The sysroot must be an absolute path." "$LINENO" 5
10059   ;;
10060esac
10061
10062 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}" >&5
10063printf "%s\n" "${lt_sysroot:-no}" >&6; }
10064
10065
10066
10067
10068
10069{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a working dd" >&5
10070printf %s "checking for a working dd... " >&6; }
10071if test ${ac_cv_path_lt_DD+y}
10072then :
10073  printf %s "(cached) " >&6
10074else $as_nop
10075  printf 0123456789abcdef0123456789abcdef >conftest.i
10076cat conftest.i conftest.i >conftest2.i
10077: ${lt_DD:=$DD}
10078if test -z "$lt_DD"; then
10079  ac_path_lt_DD_found=false
10080  # Loop through the user's path and test for each of PROGNAME-LIST
10081  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10082for as_dir in $PATH
10083do
10084  IFS=$as_save_IFS
10085  case $as_dir in #(((
10086    '') as_dir=./ ;;
10087    */) ;;
10088    *) as_dir=$as_dir/ ;;
10089  esac
10090    for ac_prog in dd
10091   do
10092    for ac_exec_ext in '' $ac_executable_extensions; do
10093      ac_path_lt_DD="$as_dir$ac_prog$ac_exec_ext"
10094      as_fn_executable_p "$ac_path_lt_DD" || continue
10095if "$ac_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then
10096  cmp -s conftest.i conftest.out \
10097  && ac_cv_path_lt_DD="$ac_path_lt_DD" ac_path_lt_DD_found=:
10098fi
10099      $ac_path_lt_DD_found && break 3
10100    done
10101  done
10102  done
10103IFS=$as_save_IFS
10104  if test -z "$ac_cv_path_lt_DD"; then
10105    :
10106  fi
10107else
10108  ac_cv_path_lt_DD=$lt_DD
10109fi
10110
10111rm -f conftest.i conftest2.i conftest.out
10112fi
10113{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_lt_DD" >&5
10114printf "%s\n" "$ac_cv_path_lt_DD" >&6; }
10115
10116
10117{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to truncate binary pipes" >&5
10118printf %s "checking how to truncate binary pipes... " >&6; }
10119if test ${lt_cv_truncate_bin+y}
10120then :
10121  printf %s "(cached) " >&6
10122else $as_nop
10123  printf 0123456789abcdef0123456789abcdef >conftest.i
10124cat conftest.i conftest.i >conftest2.i
10125lt_cv_truncate_bin=
10126if "$ac_cv_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then
10127  cmp -s conftest.i conftest.out \
10128  && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1"
10129fi
10130rm -f conftest.i conftest2.i conftest.out
10131test -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q"
10132fi
10133{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_truncate_bin" >&5
10134printf "%s\n" "$lt_cv_truncate_bin" >&6; }
10135
10136
10137
10138
10139
10140
10141
10142# Calculate cc_basename.  Skip known compiler wrappers and cross-prefix.
10143func_cc_basename ()
10144{
10145    for cc_temp in $*""; do
10146      case $cc_temp in
10147        compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
10148        distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
10149        \-*) ;;
10150        *) break;;
10151      esac
10152    done
10153    func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
10154}
10155
10156# Check whether --enable-libtool-lock was given.
10157if test ${enable_libtool_lock+y}
10158then :
10159  enableval=$enable_libtool_lock;
10160fi
10161
10162test no = "$enable_libtool_lock" || enable_libtool_lock=yes
10163
10164# Some flags need to be propagated to the compiler or linker for good
10165# libtool support.
10166case $host in
10167ia64-*-hpux*)
10168  # Find out what ABI is being produced by ac_compile, and set mode
10169  # options accordingly.
10170  echo 'int i;' > conftest.$ac_ext
10171  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
10172  (eval $ac_compile) 2>&5
10173  ac_status=$?
10174  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
10175  test $ac_status = 0; }; then
10176    case `/usr/bin/file conftest.$ac_objext` in
10177      *ELF-32*)
10178	HPUX_IA64_MODE=32
10179	;;
10180      *ELF-64*)
10181	HPUX_IA64_MODE=64
10182	;;
10183    esac
10184  fi
10185  rm -rf conftest*
10186  ;;
10187*-*-irix6*)
10188  # Find out what ABI is being produced by ac_compile, and set linker
10189  # options accordingly.
10190  echo '#line '$LINENO' "configure"' > conftest.$ac_ext
10191  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
10192  (eval $ac_compile) 2>&5
10193  ac_status=$?
10194  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
10195  test $ac_status = 0; }; then
10196    if test yes = "$lt_cv_prog_gnu_ld"; then
10197      case `/usr/bin/file conftest.$ac_objext` in
10198	*32-bit*)
10199	  LD="${LD-ld} -melf32bsmip"
10200	  ;;
10201	*N32*)
10202	  LD="${LD-ld} -melf32bmipn32"
10203	  ;;
10204	*64-bit*)
10205	  LD="${LD-ld} -melf64bmip"
10206	;;
10207      esac
10208    else
10209      case `/usr/bin/file conftest.$ac_objext` in
10210	*32-bit*)
10211	  LD="${LD-ld} -32"
10212	  ;;
10213	*N32*)
10214	  LD="${LD-ld} -n32"
10215	  ;;
10216	*64-bit*)
10217	  LD="${LD-ld} -64"
10218	  ;;
10219      esac
10220    fi
10221  fi
10222  rm -rf conftest*
10223  ;;
10224
10225mips64*-*linux*)
10226  # Find out what ABI is being produced by ac_compile, and set linker
10227  # options accordingly.
10228  echo '#line '$LINENO' "configure"' > conftest.$ac_ext
10229  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
10230  (eval $ac_compile) 2>&5
10231  ac_status=$?
10232  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
10233  test $ac_status = 0; }; then
10234    emul=elf
10235    case `/usr/bin/file conftest.$ac_objext` in
10236      *32-bit*)
10237	emul="${emul}32"
10238	;;
10239      *64-bit*)
10240	emul="${emul}64"
10241	;;
10242    esac
10243    case `/usr/bin/file conftest.$ac_objext` in
10244      *MSB*)
10245	emul="${emul}btsmip"
10246	;;
10247      *LSB*)
10248	emul="${emul}ltsmip"
10249	;;
10250    esac
10251    case `/usr/bin/file conftest.$ac_objext` in
10252      *N32*)
10253	emul="${emul}n32"
10254	;;
10255    esac
10256    LD="${LD-ld} -m $emul"
10257  fi
10258  rm -rf conftest*
10259  ;;
10260
10261x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \
10262s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
10263  # Find out what ABI is being produced by ac_compile, and set linker
10264  # options accordingly.  Note that the listed cases only cover the
10265  # situations where additional linker options are needed (such as when
10266  # doing 32-bit compilation for a host where ld defaults to 64-bit, or
10267  # vice versa); the common cases where no linker options are needed do
10268  # not appear in the list.
10269  echo 'int i;' > conftest.$ac_ext
10270  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
10271  (eval $ac_compile) 2>&5
10272  ac_status=$?
10273  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
10274  test $ac_status = 0; }; then
10275    case `/usr/bin/file conftest.o` in
10276      *32-bit*)
10277	case $host in
10278	  x86_64-*kfreebsd*-gnu)
10279	    LD="${LD-ld} -m elf_i386_fbsd"
10280	    ;;
10281	  x86_64-*linux*)
10282	    case `/usr/bin/file conftest.o` in
10283	      *x86-64*)
10284		LD="${LD-ld} -m elf32_x86_64"
10285		;;
10286	      *)
10287		LD="${LD-ld} -m elf_i386"
10288		;;
10289	    esac
10290	    ;;
10291	  powerpc64le-*linux*)
10292	    LD="${LD-ld} -m elf32lppclinux"
10293	    ;;
10294	  powerpc64-*linux*)
10295	    LD="${LD-ld} -m elf32ppclinux"
10296	    ;;
10297	  s390x-*linux*)
10298	    LD="${LD-ld} -m elf_s390"
10299	    ;;
10300	  sparc64-*linux*)
10301	    LD="${LD-ld} -m elf32_sparc"
10302	    ;;
10303	esac
10304	;;
10305      *64-bit*)
10306	case $host in
10307	  x86_64-*kfreebsd*-gnu)
10308	    LD="${LD-ld} -m elf_x86_64_fbsd"
10309	    ;;
10310	  x86_64-*linux*)
10311	    LD="${LD-ld} -m elf_x86_64"
10312	    ;;
10313	  powerpcle-*linux*)
10314	    LD="${LD-ld} -m elf64lppc"
10315	    ;;
10316	  powerpc-*linux*)
10317	    LD="${LD-ld} -m elf64ppc"
10318	    ;;
10319	  s390*-*linux*|s390*-*tpf*)
10320	    LD="${LD-ld} -m elf64_s390"
10321	    ;;
10322	  sparc*-*linux*)
10323	    LD="${LD-ld} -m elf64_sparc"
10324	    ;;
10325	esac
10326	;;
10327    esac
10328  fi
10329  rm -rf conftest*
10330  ;;
10331
10332*-*-sco3.2v5*)
10333  # On SCO OpenServer 5, we need -belf to get full-featured binaries.
10334  SAVE_CFLAGS=$CFLAGS
10335  CFLAGS="$CFLAGS -belf"
10336  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5
10337printf %s "checking whether the C compiler needs -belf... " >&6; }
10338if test ${lt_cv_cc_needs_belf+y}
10339then :
10340  printf %s "(cached) " >&6
10341else $as_nop
10342  ac_ext=c
10343ac_cpp='$CPP $CPPFLAGS'
10344ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
10345ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
10346ac_compiler_gnu=$ac_cv_c_compiler_gnu
10347
10348     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10349/* end confdefs.h.  */
10350
10351int
10352main (void)
10353{
10354
10355  ;
10356  return 0;
10357}
10358_ACEOF
10359if ac_fn_c_try_link "$LINENO"
10360then :
10361  lt_cv_cc_needs_belf=yes
10362else $as_nop
10363  lt_cv_cc_needs_belf=no
10364fi
10365rm -f core conftest.err conftest.$ac_objext conftest.beam \
10366    conftest$ac_exeext conftest.$ac_ext
10367     ac_ext=c
10368ac_cpp='$CPP $CPPFLAGS'
10369ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
10370ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
10371ac_compiler_gnu=$ac_cv_c_compiler_gnu
10372
10373fi
10374{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5
10375printf "%s\n" "$lt_cv_cc_needs_belf" >&6; }
10376  if test yes != "$lt_cv_cc_needs_belf"; then
10377    # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
10378    CFLAGS=$SAVE_CFLAGS
10379  fi
10380  ;;
10381*-*solaris*)
10382  # Find out what ABI is being produced by ac_compile, and set linker
10383  # options accordingly.
10384  echo 'int i;' > conftest.$ac_ext
10385  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
10386  (eval $ac_compile) 2>&5
10387  ac_status=$?
10388  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
10389  test $ac_status = 0; }; then
10390    case `/usr/bin/file conftest.o` in
10391    *64-bit*)
10392      case $lt_cv_prog_gnu_ld in
10393      yes*)
10394        case $host in
10395        i?86-*-solaris*|x86_64-*-solaris*)
10396          LD="${LD-ld} -m elf_x86_64"
10397          ;;
10398        sparc*-*-solaris*)
10399          LD="${LD-ld} -m elf64_sparc"
10400          ;;
10401        esac
10402        # GNU ld 2.21 introduced _sol2 emulations.  Use them if available.
10403        if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then
10404          LD=${LD-ld}_sol2
10405        fi
10406        ;;
10407      *)
10408	if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
10409	  LD="${LD-ld} -64"
10410	fi
10411	;;
10412      esac
10413      ;;
10414    esac
10415  fi
10416  rm -rf conftest*
10417  ;;
10418esac
10419
10420need_locks=$enable_libtool_lock
10421
10422if test -n "$ac_tool_prefix"; then
10423  # Extract the first word of "${ac_tool_prefix}mt", so it can be a program name with args.
10424set dummy ${ac_tool_prefix}mt; ac_word=$2
10425{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10426printf %s "checking for $ac_word... " >&6; }
10427if test ${ac_cv_prog_MANIFEST_TOOL+y}
10428then :
10429  printf %s "(cached) " >&6
10430else $as_nop
10431  if test -n "$MANIFEST_TOOL"; then
10432  ac_cv_prog_MANIFEST_TOOL="$MANIFEST_TOOL" # Let the user override the test.
10433else
10434as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10435for as_dir in $PATH
10436do
10437  IFS=$as_save_IFS
10438  case $as_dir in #(((
10439    '') as_dir=./ ;;
10440    */) ;;
10441    *) as_dir=$as_dir/ ;;
10442  esac
10443    for ac_exec_ext in '' $ac_executable_extensions; do
10444  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
10445    ac_cv_prog_MANIFEST_TOOL="${ac_tool_prefix}mt"
10446    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
10447    break 2
10448  fi
10449done
10450  done
10451IFS=$as_save_IFS
10452
10453fi
10454fi
10455MANIFEST_TOOL=$ac_cv_prog_MANIFEST_TOOL
10456if test -n "$MANIFEST_TOOL"; then
10457  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MANIFEST_TOOL" >&5
10458printf "%s\n" "$MANIFEST_TOOL" >&6; }
10459else
10460  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
10461printf "%s\n" "no" >&6; }
10462fi
10463
10464
10465fi
10466if test -z "$ac_cv_prog_MANIFEST_TOOL"; then
10467  ac_ct_MANIFEST_TOOL=$MANIFEST_TOOL
10468  # Extract the first word of "mt", so it can be a program name with args.
10469set dummy mt; ac_word=$2
10470{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10471printf %s "checking for $ac_word... " >&6; }
10472if test ${ac_cv_prog_ac_ct_MANIFEST_TOOL+y}
10473then :
10474  printf %s "(cached) " >&6
10475else $as_nop
10476  if test -n "$ac_ct_MANIFEST_TOOL"; then
10477  ac_cv_prog_ac_ct_MANIFEST_TOOL="$ac_ct_MANIFEST_TOOL" # Let the user override the test.
10478else
10479as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10480for as_dir in $PATH
10481do
10482  IFS=$as_save_IFS
10483  case $as_dir in #(((
10484    '') as_dir=./ ;;
10485    */) ;;
10486    *) as_dir=$as_dir/ ;;
10487  esac
10488    for ac_exec_ext in '' $ac_executable_extensions; do
10489  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
10490    ac_cv_prog_ac_ct_MANIFEST_TOOL="mt"
10491    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
10492    break 2
10493  fi
10494done
10495  done
10496IFS=$as_save_IFS
10497
10498fi
10499fi
10500ac_ct_MANIFEST_TOOL=$ac_cv_prog_ac_ct_MANIFEST_TOOL
10501if test -n "$ac_ct_MANIFEST_TOOL"; then
10502  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MANIFEST_TOOL" >&5
10503printf "%s\n" "$ac_ct_MANIFEST_TOOL" >&6; }
10504else
10505  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
10506printf "%s\n" "no" >&6; }
10507fi
10508
10509  if test "x$ac_ct_MANIFEST_TOOL" = x; then
10510    MANIFEST_TOOL=":"
10511  else
10512    case $cross_compiling:$ac_tool_warned in
10513yes:)
10514{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
10515printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
10516ac_tool_warned=yes ;;
10517esac
10518    MANIFEST_TOOL=$ac_ct_MANIFEST_TOOL
10519  fi
10520else
10521  MANIFEST_TOOL="$ac_cv_prog_MANIFEST_TOOL"
10522fi
10523
10524test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt
10525{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool" >&5
10526printf %s "checking if $MANIFEST_TOOL is a manifest tool... " >&6; }
10527if test ${lt_cv_path_mainfest_tool+y}
10528then :
10529  printf %s "(cached) " >&6
10530else $as_nop
10531  lt_cv_path_mainfest_tool=no
10532  echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&5
10533  $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out
10534  cat conftest.err >&5
10535  if $GREP 'Manifest Tool' conftest.out > /dev/null; then
10536    lt_cv_path_mainfest_tool=yes
10537  fi
10538  rm -f conftest*
10539fi
10540{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5
10541printf "%s\n" "$lt_cv_path_mainfest_tool" >&6; }
10542if test yes != "$lt_cv_path_mainfest_tool"; then
10543  MANIFEST_TOOL=:
10544fi
10545
10546
10547
10548
10549
10550
10551  case $host_os in
10552    rhapsody* | darwin*)
10553    if test -n "$ac_tool_prefix"; then
10554  # Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args.
10555set dummy ${ac_tool_prefix}dsymutil; ac_word=$2
10556{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10557printf %s "checking for $ac_word... " >&6; }
10558if test ${ac_cv_prog_DSYMUTIL+y}
10559then :
10560  printf %s "(cached) " >&6
10561else $as_nop
10562  if test -n "$DSYMUTIL"; then
10563  ac_cv_prog_DSYMUTIL="$DSYMUTIL" # Let the user override the test.
10564else
10565as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10566for as_dir in $PATH
10567do
10568  IFS=$as_save_IFS
10569  case $as_dir in #(((
10570    '') as_dir=./ ;;
10571    */) ;;
10572    *) as_dir=$as_dir/ ;;
10573  esac
10574    for ac_exec_ext in '' $ac_executable_extensions; do
10575  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
10576    ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil"
10577    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
10578    break 2
10579  fi
10580done
10581  done
10582IFS=$as_save_IFS
10583
10584fi
10585fi
10586DSYMUTIL=$ac_cv_prog_DSYMUTIL
10587if test -n "$DSYMUTIL"; then
10588  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
10589printf "%s\n" "$DSYMUTIL" >&6; }
10590else
10591  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
10592printf "%s\n" "no" >&6; }
10593fi
10594
10595
10596fi
10597if test -z "$ac_cv_prog_DSYMUTIL"; then
10598  ac_ct_DSYMUTIL=$DSYMUTIL
10599  # Extract the first word of "dsymutil", so it can be a program name with args.
10600set dummy dsymutil; ac_word=$2
10601{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10602printf %s "checking for $ac_word... " >&6; }
10603if test ${ac_cv_prog_ac_ct_DSYMUTIL+y}
10604then :
10605  printf %s "(cached) " >&6
10606else $as_nop
10607  if test -n "$ac_ct_DSYMUTIL"; then
10608  ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # Let the user override the test.
10609else
10610as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10611for as_dir in $PATH
10612do
10613  IFS=$as_save_IFS
10614  case $as_dir in #(((
10615    '') as_dir=./ ;;
10616    */) ;;
10617    *) as_dir=$as_dir/ ;;
10618  esac
10619    for ac_exec_ext in '' $ac_executable_extensions; do
10620  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
10621    ac_cv_prog_ac_ct_DSYMUTIL="dsymutil"
10622    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
10623    break 2
10624  fi
10625done
10626  done
10627IFS=$as_save_IFS
10628
10629fi
10630fi
10631ac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL
10632if test -n "$ac_ct_DSYMUTIL"; then
10633  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DSYMUTIL" >&5
10634printf "%s\n" "$ac_ct_DSYMUTIL" >&6; }
10635else
10636  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
10637printf "%s\n" "no" >&6; }
10638fi
10639
10640  if test "x$ac_ct_DSYMUTIL" = x; then
10641    DSYMUTIL=":"
10642  else
10643    case $cross_compiling:$ac_tool_warned in
10644yes:)
10645{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
10646printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
10647ac_tool_warned=yes ;;
10648esac
10649    DSYMUTIL=$ac_ct_DSYMUTIL
10650  fi
10651else
10652  DSYMUTIL="$ac_cv_prog_DSYMUTIL"
10653fi
10654
10655    if test -n "$ac_tool_prefix"; then
10656  # Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args.
10657set dummy ${ac_tool_prefix}nmedit; ac_word=$2
10658{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10659printf %s "checking for $ac_word... " >&6; }
10660if test ${ac_cv_prog_NMEDIT+y}
10661then :
10662  printf %s "(cached) " >&6
10663else $as_nop
10664  if test -n "$NMEDIT"; then
10665  ac_cv_prog_NMEDIT="$NMEDIT" # Let the user override the test.
10666else
10667as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10668for as_dir in $PATH
10669do
10670  IFS=$as_save_IFS
10671  case $as_dir in #(((
10672    '') as_dir=./ ;;
10673    */) ;;
10674    *) as_dir=$as_dir/ ;;
10675  esac
10676    for ac_exec_ext in '' $ac_executable_extensions; do
10677  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
10678    ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit"
10679    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
10680    break 2
10681  fi
10682done
10683  done
10684IFS=$as_save_IFS
10685
10686fi
10687fi
10688NMEDIT=$ac_cv_prog_NMEDIT
10689if test -n "$NMEDIT"; then
10690  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $NMEDIT" >&5
10691printf "%s\n" "$NMEDIT" >&6; }
10692else
10693  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
10694printf "%s\n" "no" >&6; }
10695fi
10696
10697
10698fi
10699if test -z "$ac_cv_prog_NMEDIT"; then
10700  ac_ct_NMEDIT=$NMEDIT
10701  # Extract the first word of "nmedit", so it can be a program name with args.
10702set dummy nmedit; ac_word=$2
10703{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10704printf %s "checking for $ac_word... " >&6; }
10705if test ${ac_cv_prog_ac_ct_NMEDIT+y}
10706then :
10707  printf %s "(cached) " >&6
10708else $as_nop
10709  if test -n "$ac_ct_NMEDIT"; then
10710  ac_cv_prog_ac_ct_NMEDIT="$ac_ct_NMEDIT" # Let the user override the test.
10711else
10712as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10713for as_dir in $PATH
10714do
10715  IFS=$as_save_IFS
10716  case $as_dir in #(((
10717    '') as_dir=./ ;;
10718    */) ;;
10719    *) as_dir=$as_dir/ ;;
10720  esac
10721    for ac_exec_ext in '' $ac_executable_extensions; do
10722  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
10723    ac_cv_prog_ac_ct_NMEDIT="nmedit"
10724    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
10725    break 2
10726  fi
10727done
10728  done
10729IFS=$as_save_IFS
10730
10731fi
10732fi
10733ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT
10734if test -n "$ac_ct_NMEDIT"; then
10735  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NMEDIT" >&5
10736printf "%s\n" "$ac_ct_NMEDIT" >&6; }
10737else
10738  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
10739printf "%s\n" "no" >&6; }
10740fi
10741
10742  if test "x$ac_ct_NMEDIT" = x; then
10743    NMEDIT=":"
10744  else
10745    case $cross_compiling:$ac_tool_warned in
10746yes:)
10747{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
10748printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
10749ac_tool_warned=yes ;;
10750esac
10751    NMEDIT=$ac_ct_NMEDIT
10752  fi
10753else
10754  NMEDIT="$ac_cv_prog_NMEDIT"
10755fi
10756
10757    if test -n "$ac_tool_prefix"; then
10758  # Extract the first word of "${ac_tool_prefix}lipo", so it can be a program name with args.
10759set dummy ${ac_tool_prefix}lipo; ac_word=$2
10760{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10761printf %s "checking for $ac_word... " >&6; }
10762if test ${ac_cv_prog_LIPO+y}
10763then :
10764  printf %s "(cached) " >&6
10765else $as_nop
10766  if test -n "$LIPO"; then
10767  ac_cv_prog_LIPO="$LIPO" # Let the user override the test.
10768else
10769as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10770for as_dir in $PATH
10771do
10772  IFS=$as_save_IFS
10773  case $as_dir in #(((
10774    '') as_dir=./ ;;
10775    */) ;;
10776    *) as_dir=$as_dir/ ;;
10777  esac
10778    for ac_exec_ext in '' $ac_executable_extensions; do
10779  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
10780    ac_cv_prog_LIPO="${ac_tool_prefix}lipo"
10781    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
10782    break 2
10783  fi
10784done
10785  done
10786IFS=$as_save_IFS
10787
10788fi
10789fi
10790LIPO=$ac_cv_prog_LIPO
10791if test -n "$LIPO"; then
10792  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
10793printf "%s\n" "$LIPO" >&6; }
10794else
10795  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
10796printf "%s\n" "no" >&6; }
10797fi
10798
10799
10800fi
10801if test -z "$ac_cv_prog_LIPO"; then
10802  ac_ct_LIPO=$LIPO
10803  # Extract the first word of "lipo", so it can be a program name with args.
10804set dummy lipo; ac_word=$2
10805{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10806printf %s "checking for $ac_word... " >&6; }
10807if test ${ac_cv_prog_ac_ct_LIPO+y}
10808then :
10809  printf %s "(cached) " >&6
10810else $as_nop
10811  if test -n "$ac_ct_LIPO"; then
10812  ac_cv_prog_ac_ct_LIPO="$ac_ct_LIPO" # Let the user override the test.
10813else
10814as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10815for as_dir in $PATH
10816do
10817  IFS=$as_save_IFS
10818  case $as_dir in #(((
10819    '') as_dir=./ ;;
10820    */) ;;
10821    *) as_dir=$as_dir/ ;;
10822  esac
10823    for ac_exec_ext in '' $ac_executable_extensions; do
10824  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
10825    ac_cv_prog_ac_ct_LIPO="lipo"
10826    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
10827    break 2
10828  fi
10829done
10830  done
10831IFS=$as_save_IFS
10832
10833fi
10834fi
10835ac_ct_LIPO=$ac_cv_prog_ac_ct_LIPO
10836if test -n "$ac_ct_LIPO"; then
10837  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LIPO" >&5
10838printf "%s\n" "$ac_ct_LIPO" >&6; }
10839else
10840  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
10841printf "%s\n" "no" >&6; }
10842fi
10843
10844  if test "x$ac_ct_LIPO" = x; then
10845    LIPO=":"
10846  else
10847    case $cross_compiling:$ac_tool_warned in
10848yes:)
10849{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
10850printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
10851ac_tool_warned=yes ;;
10852esac
10853    LIPO=$ac_ct_LIPO
10854  fi
10855else
10856  LIPO="$ac_cv_prog_LIPO"
10857fi
10858
10859    if test -n "$ac_tool_prefix"; then
10860  # Extract the first word of "${ac_tool_prefix}otool", so it can be a program name with args.
10861set dummy ${ac_tool_prefix}otool; ac_word=$2
10862{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10863printf %s "checking for $ac_word... " >&6; }
10864if test ${ac_cv_prog_OTOOL+y}
10865then :
10866  printf %s "(cached) " >&6
10867else $as_nop
10868  if test -n "$OTOOL"; then
10869  ac_cv_prog_OTOOL="$OTOOL" # Let the user override the test.
10870else
10871as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10872for as_dir in $PATH
10873do
10874  IFS=$as_save_IFS
10875  case $as_dir in #(((
10876    '') as_dir=./ ;;
10877    */) ;;
10878    *) as_dir=$as_dir/ ;;
10879  esac
10880    for ac_exec_ext in '' $ac_executable_extensions; do
10881  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
10882    ac_cv_prog_OTOOL="${ac_tool_prefix}otool"
10883    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
10884    break 2
10885  fi
10886done
10887  done
10888IFS=$as_save_IFS
10889
10890fi
10891fi
10892OTOOL=$ac_cv_prog_OTOOL
10893if test -n "$OTOOL"; then
10894  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
10895printf "%s\n" "$OTOOL" >&6; }
10896else
10897  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
10898printf "%s\n" "no" >&6; }
10899fi
10900
10901
10902fi
10903if test -z "$ac_cv_prog_OTOOL"; then
10904  ac_ct_OTOOL=$OTOOL
10905  # Extract the first word of "otool", so it can be a program name with args.
10906set dummy otool; ac_word=$2
10907{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10908printf %s "checking for $ac_word... " >&6; }
10909if test ${ac_cv_prog_ac_ct_OTOOL+y}
10910then :
10911  printf %s "(cached) " >&6
10912else $as_nop
10913  if test -n "$ac_ct_OTOOL"; then
10914  ac_cv_prog_ac_ct_OTOOL="$ac_ct_OTOOL" # Let the user override the test.
10915else
10916as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10917for as_dir in $PATH
10918do
10919  IFS=$as_save_IFS
10920  case $as_dir in #(((
10921    '') as_dir=./ ;;
10922    */) ;;
10923    *) as_dir=$as_dir/ ;;
10924  esac
10925    for ac_exec_ext in '' $ac_executable_extensions; do
10926  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
10927    ac_cv_prog_ac_ct_OTOOL="otool"
10928    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
10929    break 2
10930  fi
10931done
10932  done
10933IFS=$as_save_IFS
10934
10935fi
10936fi
10937ac_ct_OTOOL=$ac_cv_prog_ac_ct_OTOOL
10938if test -n "$ac_ct_OTOOL"; then
10939  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL" >&5
10940printf "%s\n" "$ac_ct_OTOOL" >&6; }
10941else
10942  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
10943printf "%s\n" "no" >&6; }
10944fi
10945
10946  if test "x$ac_ct_OTOOL" = x; then
10947    OTOOL=":"
10948  else
10949    case $cross_compiling:$ac_tool_warned in
10950yes:)
10951{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
10952printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
10953ac_tool_warned=yes ;;
10954esac
10955    OTOOL=$ac_ct_OTOOL
10956  fi
10957else
10958  OTOOL="$ac_cv_prog_OTOOL"
10959fi
10960
10961    if test -n "$ac_tool_prefix"; then
10962  # Extract the first word of "${ac_tool_prefix}otool64", so it can be a program name with args.
10963set dummy ${ac_tool_prefix}otool64; ac_word=$2
10964{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10965printf %s "checking for $ac_word... " >&6; }
10966if test ${ac_cv_prog_OTOOL64+y}
10967then :
10968  printf %s "(cached) " >&6
10969else $as_nop
10970  if test -n "$OTOOL64"; then
10971  ac_cv_prog_OTOOL64="$OTOOL64" # Let the user override the test.
10972else
10973as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10974for as_dir in $PATH
10975do
10976  IFS=$as_save_IFS
10977  case $as_dir in #(((
10978    '') as_dir=./ ;;
10979    */) ;;
10980    *) as_dir=$as_dir/ ;;
10981  esac
10982    for ac_exec_ext in '' $ac_executable_extensions; do
10983  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
10984    ac_cv_prog_OTOOL64="${ac_tool_prefix}otool64"
10985    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
10986    break 2
10987  fi
10988done
10989  done
10990IFS=$as_save_IFS
10991
10992fi
10993fi
10994OTOOL64=$ac_cv_prog_OTOOL64
10995if test -n "$OTOOL64"; then
10996  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $OTOOL64" >&5
10997printf "%s\n" "$OTOOL64" >&6; }
10998else
10999  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
11000printf "%s\n" "no" >&6; }
11001fi
11002
11003
11004fi
11005if test -z "$ac_cv_prog_OTOOL64"; then
11006  ac_ct_OTOOL64=$OTOOL64
11007  # Extract the first word of "otool64", so it can be a program name with args.
11008set dummy otool64; ac_word=$2
11009{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11010printf %s "checking for $ac_word... " >&6; }
11011if test ${ac_cv_prog_ac_ct_OTOOL64+y}
11012then :
11013  printf %s "(cached) " >&6
11014else $as_nop
11015  if test -n "$ac_ct_OTOOL64"; then
11016  ac_cv_prog_ac_ct_OTOOL64="$ac_ct_OTOOL64" # Let the user override the test.
11017else
11018as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11019for as_dir in $PATH
11020do
11021  IFS=$as_save_IFS
11022  case $as_dir in #(((
11023    '') as_dir=./ ;;
11024    */) ;;
11025    *) as_dir=$as_dir/ ;;
11026  esac
11027    for ac_exec_ext in '' $ac_executable_extensions; do
11028  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
11029    ac_cv_prog_ac_ct_OTOOL64="otool64"
11030    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
11031    break 2
11032  fi
11033done
11034  done
11035IFS=$as_save_IFS
11036
11037fi
11038fi
11039ac_ct_OTOOL64=$ac_cv_prog_ac_ct_OTOOL64
11040if test -n "$ac_ct_OTOOL64"; then
11041  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL64" >&5
11042printf "%s\n" "$ac_ct_OTOOL64" >&6; }
11043else
11044  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
11045printf "%s\n" "no" >&6; }
11046fi
11047
11048  if test "x$ac_ct_OTOOL64" = x; then
11049    OTOOL64=":"
11050  else
11051    case $cross_compiling:$ac_tool_warned in
11052yes:)
11053{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
11054printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
11055ac_tool_warned=yes ;;
11056esac
11057    OTOOL64=$ac_ct_OTOOL64
11058  fi
11059else
11060  OTOOL64="$ac_cv_prog_OTOOL64"
11061fi
11062
11063
11064
11065
11066
11067
11068
11069
11070
11071
11072
11073
11074
11075
11076
11077
11078
11079
11080
11081
11082
11083
11084
11085
11086
11087
11088
11089    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for -single_module linker flag" >&5
11090printf %s "checking for -single_module linker flag... " >&6; }
11091if test ${lt_cv_apple_cc_single_mod+y}
11092then :
11093  printf %s "(cached) " >&6
11094else $as_nop
11095  lt_cv_apple_cc_single_mod=no
11096      if test -z "$LT_MULTI_MODULE"; then
11097	# By default we will add the -single_module flag. You can override
11098	# by either setting the environment variable LT_MULTI_MODULE
11099	# non-empty at configure time, or by adding -multi_module to the
11100	# link flags.
11101	rm -rf libconftest.dylib*
11102	echo "int foo(void){return 1;}" > conftest.c
11103	echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
11104-dynamiclib -Wl,-single_module conftest.c" >&5
11105	$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
11106	  -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
11107        _lt_result=$?
11108	# If there is a non-empty error log, and "single_module"
11109	# appears in it, assume the flag caused a linker warning
11110        if test -s conftest.err && $GREP single_module conftest.err; then
11111	  cat conftest.err >&5
11112	# Otherwise, if the output was created with a 0 exit code from
11113	# the compiler, it worked.
11114	elif test -f libconftest.dylib && test 0 = "$_lt_result"; then
11115	  lt_cv_apple_cc_single_mod=yes
11116	else
11117	  cat conftest.err >&5
11118	fi
11119	rm -rf libconftest.dylib*
11120	rm -f conftest.*
11121      fi
11122fi
11123{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5
11124printf "%s\n" "$lt_cv_apple_cc_single_mod" >&6; }
11125
11126    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5
11127printf %s "checking for -exported_symbols_list linker flag... " >&6; }
11128if test ${lt_cv_ld_exported_symbols_list+y}
11129then :
11130  printf %s "(cached) " >&6
11131else $as_nop
11132  lt_cv_ld_exported_symbols_list=no
11133      save_LDFLAGS=$LDFLAGS
11134      echo "_main" > conftest.sym
11135      LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
11136      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11137/* end confdefs.h.  */
11138
11139int
11140main (void)
11141{
11142
11143  ;
11144  return 0;
11145}
11146_ACEOF
11147if ac_fn_c_try_link "$LINENO"
11148then :
11149  lt_cv_ld_exported_symbols_list=yes
11150else $as_nop
11151  lt_cv_ld_exported_symbols_list=no
11152fi
11153rm -f core conftest.err conftest.$ac_objext conftest.beam \
11154    conftest$ac_exeext conftest.$ac_ext
11155	LDFLAGS=$save_LDFLAGS
11156
11157fi
11158{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5
11159printf "%s\n" "$lt_cv_ld_exported_symbols_list" >&6; }
11160
11161    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for -force_load linker flag" >&5
11162printf %s "checking for -force_load linker flag... " >&6; }
11163if test ${lt_cv_ld_force_load+y}
11164then :
11165  printf %s "(cached) " >&6
11166else $as_nop
11167  lt_cv_ld_force_load=no
11168      cat > conftest.c << _LT_EOF
11169int forced_loaded() { return 2;}
11170_LT_EOF
11171      echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&5
11172      $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5
11173      echo "$AR cru libconftest.a conftest.o" >&5
11174      $AR cru libconftest.a conftest.o 2>&5
11175      echo "$RANLIB libconftest.a" >&5
11176      $RANLIB libconftest.a 2>&5
11177      cat > conftest.c << _LT_EOF
11178int main() { return 0;}
11179_LT_EOF
11180      echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&5
11181      $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err
11182      _lt_result=$?
11183      if test -s conftest.err && $GREP force_load conftest.err; then
11184	cat conftest.err >&5
11185      elif test -f conftest && test 0 = "$_lt_result" && $GREP forced_load conftest >/dev/null 2>&1; then
11186	lt_cv_ld_force_load=yes
11187      else
11188	cat conftest.err >&5
11189      fi
11190        rm -f conftest.err libconftest.a conftest conftest.c
11191        rm -rf conftest.dSYM
11192
11193fi
11194{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_force_load" >&5
11195printf "%s\n" "$lt_cv_ld_force_load" >&6; }
11196    case $host_os in
11197    rhapsody* | darwin1.[012])
11198      _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;;
11199    darwin1.*)
11200      _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
11201    darwin*) # darwin 5.x on
11202      # if running on 10.5 or later, the deployment target defaults
11203      # to the OS version, if on x86, and 10.4, the deployment
11204      # target defaults to 10.4. Don't you love it?
11205      case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
11206	10.0,*86*-darwin8*|10.0,*-darwin[91]*)
11207	  _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
11208	10.[012][,.]*)
11209	  _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
11210	10.*)
11211	  _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
11212      esac
11213    ;;
11214  esac
11215    if test yes = "$lt_cv_apple_cc_single_mod"; then
11216      _lt_dar_single_mod='$single_module'
11217    fi
11218    if test yes = "$lt_cv_ld_exported_symbols_list"; then
11219      _lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym'
11220    else
11221      _lt_dar_export_syms='~$NMEDIT -s $output_objdir/$libname-symbols.expsym $lib'
11222    fi
11223    if test : != "$DSYMUTIL" && test no = "$lt_cv_ld_force_load"; then
11224      _lt_dsymutil='~$DSYMUTIL $lib || :'
11225    else
11226      _lt_dsymutil=
11227    fi
11228    ;;
11229  esac
11230
11231# func_munge_path_list VARIABLE PATH
11232# -----------------------------------
11233# VARIABLE is name of variable containing _space_ separated list of
11234# directories to be munged by the contents of PATH, which is string
11235# having a format:
11236# "DIR[:DIR]:"
11237#       string "DIR[ DIR]" will be prepended to VARIABLE
11238# ":DIR[:DIR]"
11239#       string "DIR[ DIR]" will be appended to VARIABLE
11240# "DIRP[:DIRP]::[DIRA:]DIRA"
11241#       string "DIRP[ DIRP]" will be prepended to VARIABLE and string
11242#       "DIRA[ DIRA]" will be appended to VARIABLE
11243# "DIR[:DIR]"
11244#       VARIABLE will be replaced by "DIR[ DIR]"
11245func_munge_path_list ()
11246{
11247    case x$2 in
11248    x)
11249        ;;
11250    *:)
11251        eval $1=\"`$ECHO $2 | $SED 's/:/ /g'` \$$1\"
11252        ;;
11253    x:*)
11254        eval $1=\"\$$1 `$ECHO $2 | $SED 's/:/ /g'`\"
11255        ;;
11256    *::*)
11257        eval $1=\"\$$1\ `$ECHO $2 | $SED -e 's/.*:://' -e 's/:/ /g'`\"
11258        eval $1=\"`$ECHO $2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \$$1\"
11259        ;;
11260    *)
11261        eval $1=\"`$ECHO $2 | $SED 's/:/ /g'`\"
11262        ;;
11263    esac
11264}
11265
11266ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default
11267"
11268if test "x$ac_cv_header_dlfcn_h" = xyes
11269then :
11270  printf "%s\n" "#define HAVE_DLFCN_H 1" >>confdefs.h
11271
11272fi
11273
11274
11275
11276
11277
11278
11279
11280# Set options
11281
11282
11283
11284        enable_dlopen=no
11285
11286
11287  enable_win32_dll=no
11288
11289
11290            # Check whether --enable-shared was given.
11291if test ${enable_shared+y}
11292then :
11293  enableval=$enable_shared; p=${PACKAGE-default}
11294    case $enableval in
11295    yes) enable_shared=yes ;;
11296    no) enable_shared=no ;;
11297    *)
11298      enable_shared=no
11299      # Look at the argument we got.  We use all the common list separators.
11300      lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
11301      for pkg in $enableval; do
11302	IFS=$lt_save_ifs
11303	if test "X$pkg" = "X$p"; then
11304	  enable_shared=yes
11305	fi
11306      done
11307      IFS=$lt_save_ifs
11308      ;;
11309    esac
11310else $as_nop
11311  enable_shared=yes
11312fi
11313
11314
11315
11316
11317
11318
11319
11320
11321
11322  # Check whether --enable-static was given.
11323if test ${enable_static+y}
11324then :
11325  enableval=$enable_static; p=${PACKAGE-default}
11326    case $enableval in
11327    yes) enable_static=yes ;;
11328    no) enable_static=no ;;
11329    *)
11330     enable_static=no
11331      # Look at the argument we got.  We use all the common list separators.
11332      lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
11333      for pkg in $enableval; do
11334	IFS=$lt_save_ifs
11335	if test "X$pkg" = "X$p"; then
11336	  enable_static=yes
11337	fi
11338      done
11339      IFS=$lt_save_ifs
11340      ;;
11341    esac
11342else $as_nop
11343  enable_static=yes
11344fi
11345
11346
11347
11348
11349
11350
11351
11352
11353
11354
11355# Check whether --with-pic was given.
11356if test ${with_pic+y}
11357then :
11358  withval=$with_pic; lt_p=${PACKAGE-default}
11359    case $withval in
11360    yes|no) pic_mode=$withval ;;
11361    *)
11362      pic_mode=default
11363      # Look at the argument we got.  We use all the common list separators.
11364      lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
11365      for lt_pkg in $withval; do
11366	IFS=$lt_save_ifs
11367	if test "X$lt_pkg" = "X$lt_p"; then
11368	  pic_mode=yes
11369	fi
11370      done
11371      IFS=$lt_save_ifs
11372      ;;
11373    esac
11374else $as_nop
11375  pic_mode=default
11376fi
11377
11378
11379
11380
11381
11382
11383
11384
11385  # Check whether --enable-fast-install was given.
11386if test ${enable_fast_install+y}
11387then :
11388  enableval=$enable_fast_install; p=${PACKAGE-default}
11389    case $enableval in
11390    yes) enable_fast_install=yes ;;
11391    no) enable_fast_install=no ;;
11392    *)
11393      enable_fast_install=no
11394      # Look at the argument we got.  We use all the common list separators.
11395      lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
11396      for pkg in $enableval; do
11397	IFS=$lt_save_ifs
11398	if test "X$pkg" = "X$p"; then
11399	  enable_fast_install=yes
11400	fi
11401      done
11402      IFS=$lt_save_ifs
11403      ;;
11404    esac
11405else $as_nop
11406  enable_fast_install=yes
11407fi
11408
11409
11410
11411
11412
11413
11414
11415
11416  shared_archive_member_spec=
11417case $host,$enable_shared in
11418power*-*-aix[5-9]*,yes)
11419  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking which variant of shared library versioning to provide" >&5
11420printf %s "checking which variant of shared library versioning to provide... " >&6; }
11421
11422# Check whether --with-aix-soname was given.
11423if test ${with_aix_soname+y}
11424then :
11425  withval=$with_aix_soname; case $withval in
11426    aix|svr4|both)
11427      ;;
11428    *)
11429      as_fn_error $? "Unknown argument to --with-aix-soname" "$LINENO" 5
11430      ;;
11431    esac
11432    lt_cv_with_aix_soname=$with_aix_soname
11433else $as_nop
11434  if test ${lt_cv_with_aix_soname+y}
11435then :
11436  printf %s "(cached) " >&6
11437else $as_nop
11438  lt_cv_with_aix_soname=aix
11439fi
11440
11441    with_aix_soname=$lt_cv_with_aix_soname
11442fi
11443
11444  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $with_aix_soname" >&5
11445printf "%s\n" "$with_aix_soname" >&6; }
11446  if test aix != "$with_aix_soname"; then
11447    # For the AIX way of multilib, we name the shared archive member
11448    # based on the bitwidth used, traditionally 'shr.o' or 'shr_64.o',
11449    # and 'shr.imp' or 'shr_64.imp', respectively, for the Import File.
11450    # Even when GNU compilers ignore OBJECT_MODE but need '-maix64' flag,
11451    # the AIX toolchain works better with OBJECT_MODE set (default 32).
11452    if test 64 = "${OBJECT_MODE-32}"; then
11453      shared_archive_member_spec=shr_64
11454    else
11455      shared_archive_member_spec=shr
11456    fi
11457  fi
11458  ;;
11459*)
11460  with_aix_soname=aix
11461  ;;
11462esac
11463
11464
11465
11466
11467
11468
11469
11470
11471
11472
11473# This can be used to rebuild libtool when needed
11474LIBTOOL_DEPS=$ltmain
11475
11476# Always use our own libtool.
11477LIBTOOL='$(SHELL) $(top_builddir)/libtool'
11478
11479
11480
11481
11482
11483
11484
11485
11486
11487
11488
11489
11490
11491
11492
11493
11494
11495
11496
11497
11498
11499
11500
11501
11502
11503
11504
11505
11506
11507
11508test -z "$LN_S" && LN_S="ln -s"
11509
11510
11511
11512
11513
11514
11515
11516
11517
11518
11519
11520
11521
11522
11523if test -n "${ZSH_VERSION+set}"; then
11524   setopt NO_GLOB_SUBST
11525fi
11526
11527{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5
11528printf %s "checking for objdir... " >&6; }
11529if test ${lt_cv_objdir+y}
11530then :
11531  printf %s "(cached) " >&6
11532else $as_nop
11533  rm -f .libs 2>/dev/null
11534mkdir .libs 2>/dev/null
11535if test -d .libs; then
11536  lt_cv_objdir=.libs
11537else
11538  # MS-DOS does not allow filenames that begin with a dot.
11539  lt_cv_objdir=_libs
11540fi
11541rmdir .libs 2>/dev/null
11542fi
11543{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_objdir" >&5
11544printf "%s\n" "$lt_cv_objdir" >&6; }
11545objdir=$lt_cv_objdir
11546
11547
11548
11549
11550
11551printf "%s\n" "#define LT_OBJDIR \"$lt_cv_objdir/\"" >>confdefs.h
11552
11553
11554
11555
11556case $host_os in
11557aix3*)
11558  # AIX sometimes has problems with the GCC collect2 program.  For some
11559  # reason, if we set the COLLECT_NAMES environment variable, the problems
11560  # vanish in a puff of smoke.
11561  if test set != "${COLLECT_NAMES+set}"; then
11562    COLLECT_NAMES=
11563    export COLLECT_NAMES
11564  fi
11565  ;;
11566esac
11567
11568# Global variables:
11569ofile=libtool
11570can_build_shared=yes
11571
11572# All known linkers require a '.a' archive for static linking (except MSVC,
11573# which needs '.lib').
11574libext=a
11575
11576with_gnu_ld=$lt_cv_prog_gnu_ld
11577
11578old_CC=$CC
11579old_CFLAGS=$CFLAGS
11580
11581# Set sane defaults for various variables
11582test -z "$CC" && CC=cc
11583test -z "$LTCC" && LTCC=$CC
11584test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
11585test -z "$LD" && LD=ld
11586test -z "$ac_objext" && ac_objext=o
11587
11588func_cc_basename $compiler
11589cc_basename=$func_cc_basename_result
11590
11591
11592# Only perform the check for file, if the check method requires it
11593test -z "$MAGIC_CMD" && MAGIC_CMD=file
11594case $deplibs_check_method in
11595file_magic*)
11596  if test "$file_magic_cmd" = '$MAGIC_CMD'; then
11597    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5
11598printf %s "checking for ${ac_tool_prefix}file... " >&6; }
11599if test ${lt_cv_path_MAGIC_CMD+y}
11600then :
11601  printf %s "(cached) " >&6
11602else $as_nop
11603  case $MAGIC_CMD in
11604[\\/*] |  ?:[\\/]*)
11605  lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path.
11606  ;;
11607*)
11608  lt_save_MAGIC_CMD=$MAGIC_CMD
11609  lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
11610  ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
11611  for ac_dir in $ac_dummy; do
11612    IFS=$lt_save_ifs
11613    test -z "$ac_dir" && ac_dir=.
11614    if test -f "$ac_dir/${ac_tool_prefix}file"; then
11615      lt_cv_path_MAGIC_CMD=$ac_dir/"${ac_tool_prefix}file"
11616      if test -n "$file_magic_test_file"; then
11617	case $deplibs_check_method in
11618	"file_magic "*)
11619	  file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
11620	  MAGIC_CMD=$lt_cv_path_MAGIC_CMD
11621	  if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
11622	    $EGREP "$file_magic_regex" > /dev/null; then
11623	    :
11624	  else
11625	    cat <<_LT_EOF 1>&2
11626
11627*** Warning: the command libtool uses to detect shared libraries,
11628*** $file_magic_cmd, produces output that libtool cannot recognize.
11629*** The result is that libtool may fail to recognize shared libraries
11630*** as such.  This will affect the creation of libtool libraries that
11631*** depend on shared libraries, but programs linked with such libtool
11632*** libraries will work regardless of this problem.  Nevertheless, you
11633*** may want to report the problem to your system manager and/or to
11634*** bug-libtool@gnu.org
11635
11636_LT_EOF
11637	  fi ;;
11638	esac
11639      fi
11640      break
11641    fi
11642  done
11643  IFS=$lt_save_ifs
11644  MAGIC_CMD=$lt_save_MAGIC_CMD
11645  ;;
11646esac
11647fi
11648
11649MAGIC_CMD=$lt_cv_path_MAGIC_CMD
11650if test -n "$MAGIC_CMD"; then
11651  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5
11652printf "%s\n" "$MAGIC_CMD" >&6; }
11653else
11654  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
11655printf "%s\n" "no" >&6; }
11656fi
11657
11658
11659
11660
11661
11662if test -z "$lt_cv_path_MAGIC_CMD"; then
11663  if test -n "$ac_tool_prefix"; then
11664    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for file" >&5
11665printf %s "checking for file... " >&6; }
11666if test ${lt_cv_path_MAGIC_CMD+y}
11667then :
11668  printf %s "(cached) " >&6
11669else $as_nop
11670  case $MAGIC_CMD in
11671[\\/*] |  ?:[\\/]*)
11672  lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path.
11673  ;;
11674*)
11675  lt_save_MAGIC_CMD=$MAGIC_CMD
11676  lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
11677  ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
11678  for ac_dir in $ac_dummy; do
11679    IFS=$lt_save_ifs
11680    test -z "$ac_dir" && ac_dir=.
11681    if test -f "$ac_dir/file"; then
11682      lt_cv_path_MAGIC_CMD=$ac_dir/"file"
11683      if test -n "$file_magic_test_file"; then
11684	case $deplibs_check_method in
11685	"file_magic "*)
11686	  file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
11687	  MAGIC_CMD=$lt_cv_path_MAGIC_CMD
11688	  if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
11689	    $EGREP "$file_magic_regex" > /dev/null; then
11690	    :
11691	  else
11692	    cat <<_LT_EOF 1>&2
11693
11694*** Warning: the command libtool uses to detect shared libraries,
11695*** $file_magic_cmd, produces output that libtool cannot recognize.
11696*** The result is that libtool may fail to recognize shared libraries
11697*** as such.  This will affect the creation of libtool libraries that
11698*** depend on shared libraries, but programs linked with such libtool
11699*** libraries will work regardless of this problem.  Nevertheless, you
11700*** may want to report the problem to your system manager and/or to
11701*** bug-libtool@gnu.org
11702
11703_LT_EOF
11704	  fi ;;
11705	esac
11706      fi
11707      break
11708    fi
11709  done
11710  IFS=$lt_save_ifs
11711  MAGIC_CMD=$lt_save_MAGIC_CMD
11712  ;;
11713esac
11714fi
11715
11716MAGIC_CMD=$lt_cv_path_MAGIC_CMD
11717if test -n "$MAGIC_CMD"; then
11718  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5
11719printf "%s\n" "$MAGIC_CMD" >&6; }
11720else
11721  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
11722printf "%s\n" "no" >&6; }
11723fi
11724
11725
11726  else
11727    MAGIC_CMD=:
11728  fi
11729fi
11730
11731  fi
11732  ;;
11733esac
11734
11735# Use C for the default configuration in the libtool script
11736
11737lt_save_CC=$CC
11738ac_ext=c
11739ac_cpp='$CPP $CPPFLAGS'
11740ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
11741ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
11742ac_compiler_gnu=$ac_cv_c_compiler_gnu
11743
11744
11745# Source file extension for C test sources.
11746ac_ext=c
11747
11748# Object file extension for compiled C test sources.
11749objext=o
11750objext=$objext
11751
11752# Code to be used in simple compile tests
11753lt_simple_compile_test_code="int some_variable = 0;"
11754
11755# Code to be used in simple link tests
11756lt_simple_link_test_code='int main(){return(0);}'
11757
11758
11759
11760
11761
11762
11763
11764# If no C compiler was specified, use CC.
11765LTCC=${LTCC-"$CC"}
11766
11767# If no C compiler flags were specified, use CFLAGS.
11768LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
11769
11770# Allow CC to be a program name with arguments.
11771compiler=$CC
11772
11773# Save the default compiler, since it gets overwritten when the other
11774# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
11775compiler_DEFAULT=$CC
11776
11777# save warnings/boilerplate of simple test code
11778ac_outfile=conftest.$ac_objext
11779echo "$lt_simple_compile_test_code" >conftest.$ac_ext
11780eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
11781_lt_compiler_boilerplate=`cat conftest.err`
11782$RM conftest*
11783
11784ac_outfile=conftest.$ac_objext
11785echo "$lt_simple_link_test_code" >conftest.$ac_ext
11786eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
11787_lt_linker_boilerplate=`cat conftest.err`
11788$RM -r conftest*
11789
11790
11791if test -n "$compiler"; then
11792
11793lt_prog_compiler_no_builtin_flag=
11794
11795if test yes = "$GCC"; then
11796  case $cc_basename in
11797  nvcc*)
11798    lt_prog_compiler_no_builtin_flag=' -Xcompiler -fno-builtin' ;;
11799  *)
11800    lt_prog_compiler_no_builtin_flag=' -fno-builtin' ;;
11801  esac
11802
11803  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
11804printf %s "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; }
11805if test ${lt_cv_prog_compiler_rtti_exceptions+y}
11806then :
11807  printf %s "(cached) " >&6
11808else $as_nop
11809  lt_cv_prog_compiler_rtti_exceptions=no
11810   ac_outfile=conftest.$ac_objext
11811   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
11812   lt_compiler_flag="-fno-rtti -fno-exceptions"  ## exclude from sc_useless_quotes_in_assignment
11813   # Insert the option either (1) after the last *FLAGS variable, or
11814   # (2) before a word containing "conftest.", or (3) at the end.
11815   # Note that $ac_compile itself does not contain backslashes and begins
11816   # with a dollar sign (not a hyphen), so the echo should work correctly.
11817   # The option is referenced via a variable to avoid confusing sed.
11818   lt_compile=`echo "$ac_compile" | $SED \
11819   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
11820   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
11821   -e 's:$: $lt_compiler_flag:'`
11822   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
11823   (eval "$lt_compile" 2>conftest.err)
11824   ac_status=$?
11825   cat conftest.err >&5
11826   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11827   if (exit $ac_status) && test -s "$ac_outfile"; then
11828     # The compiler can only warn and ignore the option if not recognized
11829     # So say no if there are warnings other than the usual output.
11830     $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
11831     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
11832     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
11833       lt_cv_prog_compiler_rtti_exceptions=yes
11834     fi
11835   fi
11836   $RM conftest*
11837
11838fi
11839{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5
11840printf "%s\n" "$lt_cv_prog_compiler_rtti_exceptions" >&6; }
11841
11842if test yes = "$lt_cv_prog_compiler_rtti_exceptions"; then
11843    lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions"
11844else
11845    :
11846fi
11847
11848fi
11849
11850
11851
11852
11853
11854
11855  lt_prog_compiler_wl=
11856lt_prog_compiler_pic=
11857lt_prog_compiler_static=
11858
11859
11860  if test yes = "$GCC"; then
11861    lt_prog_compiler_wl='-Wl,'
11862    lt_prog_compiler_static='-static'
11863
11864    case $host_os in
11865      aix*)
11866      # All AIX code is PIC.
11867      if test ia64 = "$host_cpu"; then
11868	# AIX 5 now supports IA64 processor
11869	lt_prog_compiler_static='-Bstatic'
11870      fi
11871      lt_prog_compiler_pic='-fPIC'
11872      ;;
11873
11874    amigaos*)
11875      case $host_cpu in
11876      powerpc)
11877            # see comment about AmigaOS4 .so support
11878            lt_prog_compiler_pic='-fPIC'
11879        ;;
11880      m68k)
11881            # FIXME: we need at least 68020 code to build shared libraries, but
11882            # adding the '-m68020' flag to GCC prevents building anything better,
11883            # like '-m68040'.
11884            lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4'
11885        ;;
11886      esac
11887      ;;
11888
11889    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
11890      # PIC is the default for these OSes.
11891      ;;
11892
11893    mingw* | cygwin* | pw32* | os2* | cegcc*)
11894      # This hack is so that the source file can tell whether it is being
11895      # built for inclusion in a dll (and should export symbols for example).
11896      # Although the cygwin gcc ignores -fPIC, still need this for old-style
11897      # (--disable-auto-import) libraries
11898      lt_prog_compiler_pic='-DDLL_EXPORT'
11899      case $host_os in
11900      os2*)
11901	lt_prog_compiler_static='$wl-static'
11902	;;
11903      esac
11904      ;;
11905
11906    darwin* | rhapsody*)
11907      # PIC is the default on this platform
11908      # Common symbols not allowed in MH_DYLIB files
11909      lt_prog_compiler_pic='-fno-common'
11910      ;;
11911
11912    haiku*)
11913      # PIC is the default for Haiku.
11914      # The "-static" flag exists, but is broken.
11915      lt_prog_compiler_static=
11916      ;;
11917
11918    hpux*)
11919      # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
11920      # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
11921      # sets the default TLS model and affects inlining.
11922      case $host_cpu in
11923      hppa*64*)
11924	# +Z the default
11925	;;
11926      *)
11927	lt_prog_compiler_pic='-fPIC'
11928	;;
11929      esac
11930      ;;
11931
11932    interix[3-9]*)
11933      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
11934      # Instead, we relocate shared libraries at runtime.
11935      ;;
11936
11937    msdosdjgpp*)
11938      # Just because we use GCC doesn't mean we suddenly get shared libraries
11939      # on systems that don't support them.
11940      lt_prog_compiler_can_build_shared=no
11941      enable_shared=no
11942      ;;
11943
11944    *nto* | *qnx*)
11945      # QNX uses GNU C++, but need to define -shared option too, otherwise
11946      # it will coredump.
11947      lt_prog_compiler_pic='-fPIC -shared'
11948      ;;
11949
11950    sysv4*MP*)
11951      if test -d /usr/nec; then
11952	lt_prog_compiler_pic=-Kconform_pic
11953      fi
11954      ;;
11955
11956    *)
11957      lt_prog_compiler_pic='-fPIC'
11958      ;;
11959    esac
11960
11961    case $cc_basename in
11962    nvcc*) # Cuda Compiler Driver 2.2
11963      lt_prog_compiler_wl='-Xlinker '
11964      if test -n "$lt_prog_compiler_pic"; then
11965        lt_prog_compiler_pic="-Xcompiler $lt_prog_compiler_pic"
11966      fi
11967      ;;
11968    esac
11969  else
11970    # PORTME Check for flag to pass linker flags through the system compiler.
11971    case $host_os in
11972    aix*)
11973      lt_prog_compiler_wl='-Wl,'
11974      if test ia64 = "$host_cpu"; then
11975	# AIX 5 now supports IA64 processor
11976	lt_prog_compiler_static='-Bstatic'
11977      else
11978	lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp'
11979      fi
11980      ;;
11981
11982    darwin* | rhapsody*)
11983      # PIC is the default on this platform
11984      # Common symbols not allowed in MH_DYLIB files
11985      lt_prog_compiler_pic='-fno-common'
11986      case $cc_basename in
11987      nagfor*)
11988        # NAG Fortran compiler
11989        lt_prog_compiler_wl='-Wl,-Wl,,'
11990        lt_prog_compiler_pic='-PIC'
11991        lt_prog_compiler_static='-Bstatic'
11992        ;;
11993      esac
11994      ;;
11995
11996    mingw* | cygwin* | pw32* | os2* | cegcc*)
11997      # This hack is so that the source file can tell whether it is being
11998      # built for inclusion in a dll (and should export symbols for example).
11999      lt_prog_compiler_pic='-DDLL_EXPORT'
12000      case $host_os in
12001      os2*)
12002	lt_prog_compiler_static='$wl-static'
12003	;;
12004      esac
12005      ;;
12006
12007    hpux9* | hpux10* | hpux11*)
12008      lt_prog_compiler_wl='-Wl,'
12009      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
12010      # not for PA HP-UX.
12011      case $host_cpu in
12012      hppa*64*|ia64*)
12013	# +Z the default
12014	;;
12015      *)
12016	lt_prog_compiler_pic='+Z'
12017	;;
12018      esac
12019      # Is there a better lt_prog_compiler_static that works with the bundled CC?
12020      lt_prog_compiler_static='$wl-a ${wl}archive'
12021      ;;
12022
12023    irix5* | irix6* | nonstopux*)
12024      lt_prog_compiler_wl='-Wl,'
12025      # PIC (with -KPIC) is the default.
12026      lt_prog_compiler_static='-non_shared'
12027      ;;
12028
12029    linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
12030      case $cc_basename in
12031      # old Intel for x86_64, which still supported -KPIC.
12032      ecc*)
12033	lt_prog_compiler_wl='-Wl,'
12034	lt_prog_compiler_pic='-KPIC'
12035	lt_prog_compiler_static='-static'
12036        ;;
12037      # icc used to be incompatible with GCC.
12038      # ICC 10 doesn't accept -KPIC any more.
12039      icc* | ifort*)
12040	lt_prog_compiler_wl='-Wl,'
12041	lt_prog_compiler_pic='-fPIC'
12042	lt_prog_compiler_static='-static'
12043        ;;
12044      # Lahey Fortran 8.1.
12045      lf95*)
12046	lt_prog_compiler_wl='-Wl,'
12047	lt_prog_compiler_pic='--shared'
12048	lt_prog_compiler_static='--static'
12049	;;
12050      nagfor*)
12051	# NAG Fortran compiler
12052	lt_prog_compiler_wl='-Wl,-Wl,,'
12053	lt_prog_compiler_pic='-PIC'
12054	lt_prog_compiler_static='-Bstatic'
12055	;;
12056      tcc*)
12057	# Fabrice Bellard et al's Tiny C Compiler
12058	lt_prog_compiler_wl='-Wl,'
12059	lt_prog_compiler_pic='-fPIC'
12060	lt_prog_compiler_static='-static'
12061	;;
12062      pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
12063        # Portland Group compilers (*not* the Pentium gcc compiler,
12064	# which looks to be a dead project)
12065	lt_prog_compiler_wl='-Wl,'
12066	lt_prog_compiler_pic='-fpic'
12067	lt_prog_compiler_static='-Bstatic'
12068        ;;
12069      ccc*)
12070        lt_prog_compiler_wl='-Wl,'
12071        # All Alpha code is PIC.
12072        lt_prog_compiler_static='-non_shared'
12073        ;;
12074      xl* | bgxl* | bgf* | mpixl*)
12075	# IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene
12076	lt_prog_compiler_wl='-Wl,'
12077	lt_prog_compiler_pic='-qpic'
12078	lt_prog_compiler_static='-qstaticlink'
12079	;;
12080      *)
12081	case `$CC -V 2>&1 | sed 5q` in
12082	*Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [1-7].* | *Sun*Fortran*\ 8.[0-3]*)
12083	  # Sun Fortran 8.3 passes all unrecognized flags to the linker
12084	  lt_prog_compiler_pic='-KPIC'
12085	  lt_prog_compiler_static='-Bstatic'
12086	  lt_prog_compiler_wl=''
12087	  ;;
12088	*Sun\ F* | *Sun*Fortran*)
12089	  lt_prog_compiler_pic='-KPIC'
12090	  lt_prog_compiler_static='-Bstatic'
12091	  lt_prog_compiler_wl='-Qoption ld '
12092	  ;;
12093	*Sun\ C*)
12094	  # Sun C 5.9
12095	  lt_prog_compiler_pic='-KPIC'
12096	  lt_prog_compiler_static='-Bstatic'
12097	  lt_prog_compiler_wl='-Wl,'
12098	  ;;
12099        *Intel*\ [CF]*Compiler*)
12100	  lt_prog_compiler_wl='-Wl,'
12101	  lt_prog_compiler_pic='-fPIC'
12102	  lt_prog_compiler_static='-static'
12103	  ;;
12104	*Portland\ Group*)
12105	  lt_prog_compiler_wl='-Wl,'
12106	  lt_prog_compiler_pic='-fpic'
12107	  lt_prog_compiler_static='-Bstatic'
12108	  ;;
12109	esac
12110	;;
12111      esac
12112      ;;
12113
12114    newsos6)
12115      lt_prog_compiler_pic='-KPIC'
12116      lt_prog_compiler_static='-Bstatic'
12117      ;;
12118
12119    *nto* | *qnx*)
12120      # QNX uses GNU C++, but need to define -shared option too, otherwise
12121      # it will coredump.
12122      lt_prog_compiler_pic='-fPIC -shared'
12123      ;;
12124
12125    osf3* | osf4* | osf5*)
12126      lt_prog_compiler_wl='-Wl,'
12127      # All OSF/1 code is PIC.
12128      lt_prog_compiler_static='-non_shared'
12129      ;;
12130
12131    rdos*)
12132      lt_prog_compiler_static='-non_shared'
12133      ;;
12134
12135    solaris*)
12136      lt_prog_compiler_pic='-KPIC'
12137      lt_prog_compiler_static='-Bstatic'
12138      case $cc_basename in
12139      f77* | f90* | f95* | sunf77* | sunf90* | sunf95*)
12140	lt_prog_compiler_wl='-Qoption ld ';;
12141      *)
12142	lt_prog_compiler_wl='-Wl,';;
12143      esac
12144      ;;
12145
12146    sunos4*)
12147      lt_prog_compiler_wl='-Qoption ld '
12148      lt_prog_compiler_pic='-PIC'
12149      lt_prog_compiler_static='-Bstatic'
12150      ;;
12151
12152    sysv4 | sysv4.2uw2* | sysv4.3*)
12153      lt_prog_compiler_wl='-Wl,'
12154      lt_prog_compiler_pic='-KPIC'
12155      lt_prog_compiler_static='-Bstatic'
12156      ;;
12157
12158    sysv4*MP*)
12159      if test -d /usr/nec; then
12160	lt_prog_compiler_pic='-Kconform_pic'
12161	lt_prog_compiler_static='-Bstatic'
12162      fi
12163      ;;
12164
12165    sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
12166      lt_prog_compiler_wl='-Wl,'
12167      lt_prog_compiler_pic='-KPIC'
12168      lt_prog_compiler_static='-Bstatic'
12169      ;;
12170
12171    unicos*)
12172      lt_prog_compiler_wl='-Wl,'
12173      lt_prog_compiler_can_build_shared=no
12174      ;;
12175
12176    uts4*)
12177      lt_prog_compiler_pic='-pic'
12178      lt_prog_compiler_static='-Bstatic'
12179      ;;
12180
12181    *)
12182      lt_prog_compiler_can_build_shared=no
12183      ;;
12184    esac
12185  fi
12186
12187case $host_os in
12188  # For platforms that do not support PIC, -DPIC is meaningless:
12189  *djgpp*)
12190    lt_prog_compiler_pic=
12191    ;;
12192  *)
12193    lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC"
12194    ;;
12195esac
12196
12197{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5
12198printf %s "checking for $compiler option to produce PIC... " >&6; }
12199if test ${lt_cv_prog_compiler_pic+y}
12200then :
12201  printf %s "(cached) " >&6
12202else $as_nop
12203  lt_cv_prog_compiler_pic=$lt_prog_compiler_pic
12204fi
12205{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic" >&5
12206printf "%s\n" "$lt_cv_prog_compiler_pic" >&6; }
12207lt_prog_compiler_pic=$lt_cv_prog_compiler_pic
12208
12209#
12210# Check to make sure the PIC flag actually works.
12211#
12212if test -n "$lt_prog_compiler_pic"; then
12213  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5
12214printf %s "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; }
12215if test ${lt_cv_prog_compiler_pic_works+y}
12216then :
12217  printf %s "(cached) " >&6
12218else $as_nop
12219  lt_cv_prog_compiler_pic_works=no
12220   ac_outfile=conftest.$ac_objext
12221   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
12222   lt_compiler_flag="$lt_prog_compiler_pic -DPIC"  ## exclude from sc_useless_quotes_in_assignment
12223   # Insert the option either (1) after the last *FLAGS variable, or
12224   # (2) before a word containing "conftest.", or (3) at the end.
12225   # Note that $ac_compile itself does not contain backslashes and begins
12226   # with a dollar sign (not a hyphen), so the echo should work correctly.
12227   # The option is referenced via a variable to avoid confusing sed.
12228   lt_compile=`echo "$ac_compile" | $SED \
12229   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
12230   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
12231   -e 's:$: $lt_compiler_flag:'`
12232   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
12233   (eval "$lt_compile" 2>conftest.err)
12234   ac_status=$?
12235   cat conftest.err >&5
12236   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12237   if (exit $ac_status) && test -s "$ac_outfile"; then
12238     # The compiler can only warn and ignore the option if not recognized
12239     # So say no if there are warnings other than the usual output.
12240     $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
12241     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
12242     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
12243       lt_cv_prog_compiler_pic_works=yes
12244     fi
12245   fi
12246   $RM conftest*
12247
12248fi
12249{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5
12250printf "%s\n" "$lt_cv_prog_compiler_pic_works" >&6; }
12251
12252if test yes = "$lt_cv_prog_compiler_pic_works"; then
12253    case $lt_prog_compiler_pic in
12254     "" | " "*) ;;
12255     *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;;
12256     esac
12257else
12258    lt_prog_compiler_pic=
12259     lt_prog_compiler_can_build_shared=no
12260fi
12261
12262fi
12263
12264
12265
12266
12267
12268
12269
12270
12271
12272
12273
12274#
12275# Check to make sure the static flag actually works.
12276#
12277wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\"
12278{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5
12279printf %s "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; }
12280if test ${lt_cv_prog_compiler_static_works+y}
12281then :
12282  printf %s "(cached) " >&6
12283else $as_nop
12284  lt_cv_prog_compiler_static_works=no
12285   save_LDFLAGS=$LDFLAGS
12286   LDFLAGS="$LDFLAGS $lt_tmp_static_flag"
12287   echo "$lt_simple_link_test_code" > conftest.$ac_ext
12288   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
12289     # The linker can only warn and ignore the option if not recognized
12290     # So say no if there are warnings
12291     if test -s conftest.err; then
12292       # Append any errors to the config.log.
12293       cat conftest.err 1>&5
12294       $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
12295       $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
12296       if diff conftest.exp conftest.er2 >/dev/null; then
12297         lt_cv_prog_compiler_static_works=yes
12298       fi
12299     else
12300       lt_cv_prog_compiler_static_works=yes
12301     fi
12302   fi
12303   $RM -r conftest*
12304   LDFLAGS=$save_LDFLAGS
12305
12306fi
12307{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5
12308printf "%s\n" "$lt_cv_prog_compiler_static_works" >&6; }
12309
12310if test yes = "$lt_cv_prog_compiler_static_works"; then
12311    :
12312else
12313    lt_prog_compiler_static=
12314fi
12315
12316
12317
12318
12319
12320
12321
12322  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
12323printf %s "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
12324if test ${lt_cv_prog_compiler_c_o+y}
12325then :
12326  printf %s "(cached) " >&6
12327else $as_nop
12328  lt_cv_prog_compiler_c_o=no
12329   $RM -r conftest 2>/dev/null
12330   mkdir conftest
12331   cd conftest
12332   mkdir out
12333   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
12334
12335   lt_compiler_flag="-o out/conftest2.$ac_objext"
12336   # Insert the option either (1) after the last *FLAGS variable, or
12337   # (2) before a word containing "conftest.", or (3) at the end.
12338   # Note that $ac_compile itself does not contain backslashes and begins
12339   # with a dollar sign (not a hyphen), so the echo should work correctly.
12340   lt_compile=`echo "$ac_compile" | $SED \
12341   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
12342   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
12343   -e 's:$: $lt_compiler_flag:'`
12344   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
12345   (eval "$lt_compile" 2>out/conftest.err)
12346   ac_status=$?
12347   cat out/conftest.err >&5
12348   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12349   if (exit $ac_status) && test -s out/conftest2.$ac_objext
12350   then
12351     # The compiler can only warn and ignore the option if not recognized
12352     # So say no if there are warnings
12353     $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
12354     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
12355     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
12356       lt_cv_prog_compiler_c_o=yes
12357     fi
12358   fi
12359   chmod u+w . 2>&5
12360   $RM conftest*
12361   # SGI C++ compiler will create directory out/ii_files/ for
12362   # template instantiation
12363   test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
12364   $RM out/* && rmdir out
12365   cd ..
12366   $RM -r conftest
12367   $RM conftest*
12368
12369fi
12370{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5
12371printf "%s\n" "$lt_cv_prog_compiler_c_o" >&6; }
12372
12373
12374
12375
12376
12377
12378  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
12379printf %s "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
12380if test ${lt_cv_prog_compiler_c_o+y}
12381then :
12382  printf %s "(cached) " >&6
12383else $as_nop
12384  lt_cv_prog_compiler_c_o=no
12385   $RM -r conftest 2>/dev/null
12386   mkdir conftest
12387   cd conftest
12388   mkdir out
12389   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
12390
12391   lt_compiler_flag="-o out/conftest2.$ac_objext"
12392   # Insert the option either (1) after the last *FLAGS variable, or
12393   # (2) before a word containing "conftest.", or (3) at the end.
12394   # Note that $ac_compile itself does not contain backslashes and begins
12395   # with a dollar sign (not a hyphen), so the echo should work correctly.
12396   lt_compile=`echo "$ac_compile" | $SED \
12397   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
12398   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
12399   -e 's:$: $lt_compiler_flag:'`
12400   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
12401   (eval "$lt_compile" 2>out/conftest.err)
12402   ac_status=$?
12403   cat out/conftest.err >&5
12404   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12405   if (exit $ac_status) && test -s out/conftest2.$ac_objext
12406   then
12407     # The compiler can only warn and ignore the option if not recognized
12408     # So say no if there are warnings
12409     $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
12410     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
12411     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
12412       lt_cv_prog_compiler_c_o=yes
12413     fi
12414   fi
12415   chmod u+w . 2>&5
12416   $RM conftest*
12417   # SGI C++ compiler will create directory out/ii_files/ for
12418   # template instantiation
12419   test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
12420   $RM out/* && rmdir out
12421   cd ..
12422   $RM -r conftest
12423   $RM conftest*
12424
12425fi
12426{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5
12427printf "%s\n" "$lt_cv_prog_compiler_c_o" >&6; }
12428
12429
12430
12431
12432hard_links=nottested
12433if test no = "$lt_cv_prog_compiler_c_o" && test no != "$need_locks"; then
12434  # do not overwrite the value of need_locks provided by the user
12435  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5
12436printf %s "checking if we can lock with hard links... " >&6; }
12437  hard_links=yes
12438  $RM conftest*
12439  ln conftest.a conftest.b 2>/dev/null && hard_links=no
12440  touch conftest.a
12441  ln conftest.a conftest.b 2>&5 || hard_links=no
12442  ln conftest.a conftest.b 2>/dev/null && hard_links=no
12443  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5
12444printf "%s\n" "$hard_links" >&6; }
12445  if test no = "$hard_links"; then
12446    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&5
12447printf "%s\n" "$as_me: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&2;}
12448    need_locks=warn
12449  fi
12450else
12451  need_locks=no
12452fi
12453
12454
12455
12456
12457
12458
12459  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5
12460printf %s "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; }
12461
12462  runpath_var=
12463  allow_undefined_flag=
12464  always_export_symbols=no
12465  archive_cmds=
12466  archive_expsym_cmds=
12467  compiler_needs_object=no
12468  enable_shared_with_static_runtimes=no
12469  export_dynamic_flag_spec=
12470  export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
12471  hardcode_automatic=no
12472  hardcode_direct=no
12473  hardcode_direct_absolute=no
12474  hardcode_libdir_flag_spec=
12475  hardcode_libdir_separator=
12476  hardcode_minus_L=no
12477  hardcode_shlibpath_var=unsupported
12478  inherit_rpath=no
12479  link_all_deplibs=unknown
12480  module_cmds=
12481  module_expsym_cmds=
12482  old_archive_from_new_cmds=
12483  old_archive_from_expsyms_cmds=
12484  thread_safe_flag_spec=
12485  whole_archive_flag_spec=
12486  # include_expsyms should be a list of space-separated symbols to be *always*
12487  # included in the symbol list
12488  include_expsyms=
12489  # exclude_expsyms can be an extended regexp of symbols to exclude
12490  # it will be wrapped by ' (' and ')$', so one must not match beginning or
12491  # end of line.  Example: 'a|bc|.*d.*' will exclude the symbols 'a' and 'bc',
12492  # as well as any symbol that contains 'd'.
12493  exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'
12494  # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
12495  # platforms (ab)use it in PIC code, but their linkers get confused if
12496  # the symbol is explicitly referenced.  Since portable code cannot
12497  # rely on this symbol name, it's probably fine to never include it in
12498  # preloaded symbol tables.
12499  # Exclude shared library initialization/finalization symbols.
12500  extract_expsyms_cmds=
12501
12502  case $host_os in
12503  cygwin* | mingw* | pw32* | cegcc*)
12504    # FIXME: the MSVC++ port hasn't been tested in a loooong time
12505    # When not using gcc, we currently assume that we are using
12506    # Microsoft Visual C++.
12507    if test yes != "$GCC"; then
12508      with_gnu_ld=no
12509    fi
12510    ;;
12511  interix*)
12512    # we just hope/assume this is gcc and not c89 (= MSVC++)
12513    with_gnu_ld=yes
12514    ;;
12515  openbsd* | bitrig*)
12516    with_gnu_ld=no
12517    ;;
12518  esac
12519
12520  ld_shlibs=yes
12521
12522  # On some targets, GNU ld is compatible enough with the native linker
12523  # that we're better off using the native interface for both.
12524  lt_use_gnu_ld_interface=no
12525  if test yes = "$with_gnu_ld"; then
12526    case $host_os in
12527      aix*)
12528	# The AIX port of GNU ld has always aspired to compatibility
12529	# with the native linker.  However, as the warning in the GNU ld
12530	# block says, versions before 2.19.5* couldn't really create working
12531	# shared libraries, regardless of the interface used.
12532	case `$LD -v 2>&1` in
12533	  *\ \(GNU\ Binutils\)\ 2.19.5*) ;;
12534	  *\ \(GNU\ Binutils\)\ 2.[2-9]*) ;;
12535	  *\ \(GNU\ Binutils\)\ [3-9]*) ;;
12536	  *)
12537	    lt_use_gnu_ld_interface=yes
12538	    ;;
12539	esac
12540	;;
12541      *)
12542	lt_use_gnu_ld_interface=yes
12543	;;
12544    esac
12545  fi
12546
12547  if test yes = "$lt_use_gnu_ld_interface"; then
12548    # If archive_cmds runs LD, not CC, wlarc should be empty
12549    wlarc='$wl'
12550
12551    # Set some defaults for GNU ld with shared library support. These
12552    # are reset later if shared libraries are not supported. Putting them
12553    # here allows them to be overridden if necessary.
12554    runpath_var=LD_RUN_PATH
12555    hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
12556    export_dynamic_flag_spec='$wl--export-dynamic'
12557    # ancient GNU ld didn't support --whole-archive et. al.
12558    if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
12559      whole_archive_flag_spec=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
12560    else
12561      whole_archive_flag_spec=
12562    fi
12563    supports_anon_versioning=no
12564    case `$LD -v | $SED -e 's/(^)\+)\s\+//' 2>&1` in
12565      *GNU\ gold*) supports_anon_versioning=yes ;;
12566      *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11
12567      *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
12568      *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
12569      *\ 2.11.*) ;; # other 2.11 versions
12570      *) supports_anon_versioning=yes ;;
12571    esac
12572
12573    # See if GNU ld supports shared libraries.
12574    case $host_os in
12575    aix[3-9]*)
12576      # On AIX/PPC, the GNU linker is very broken
12577      if test ia64 != "$host_cpu"; then
12578	ld_shlibs=no
12579	cat <<_LT_EOF 1>&2
12580
12581*** Warning: the GNU linker, at least up to release 2.19, is reported
12582*** to be unable to reliably create shared libraries on AIX.
12583*** Therefore, libtool is disabling shared libraries support.  If you
12584*** really care for shared libraries, you may want to install binutils
12585*** 2.20 or above, or modify your PATH so that a non-GNU linker is found.
12586*** You will then need to restart the configuration process.
12587
12588_LT_EOF
12589      fi
12590      ;;
12591
12592    amigaos*)
12593      case $host_cpu in
12594      powerpc)
12595            # see comment about AmigaOS4 .so support
12596            archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
12597            archive_expsym_cmds=''
12598        ;;
12599      m68k)
12600            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)'
12601            hardcode_libdir_flag_spec='-L$libdir'
12602            hardcode_minus_L=yes
12603        ;;
12604      esac
12605      ;;
12606
12607    beos*)
12608      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
12609	allow_undefined_flag=unsupported
12610	# Joseph Beckenbach <jrb3@best.com> says some releases of gcc
12611	# support --undefined.  This deserves some investigation.  FIXME
12612	archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
12613      else
12614	ld_shlibs=no
12615      fi
12616      ;;
12617
12618    cygwin* | mingw* | pw32* | cegcc*)
12619      # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless,
12620      # as there is no search path for DLLs.
12621      hardcode_libdir_flag_spec='-L$libdir'
12622      export_dynamic_flag_spec='$wl--export-all-symbols'
12623      allow_undefined_flag=unsupported
12624      always_export_symbols=no
12625      enable_shared_with_static_runtimes=yes
12626      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'
12627      exclude_expsyms='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'
12628
12629      if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
12630        archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
12631	# If the export-symbols file already is a .def file, use it as
12632	# is; otherwise, prepend EXPORTS...
12633	archive_expsym_cmds='if   test DEF = "`$SED -n     -e '\''s/^[	 ]*//'\''     -e '\''/^\(;.*\)*$/d'\''     -e '\''s/^\(EXPORTS\|LIBRARY\)\([	 ].*\)*$/DEF/p'\''     -e q     $export_symbols`" ; then
12634          cp $export_symbols $output_objdir/$soname.def;
12635        else
12636          echo EXPORTS > $output_objdir/$soname.def;
12637          cat $export_symbols >> $output_objdir/$soname.def;
12638        fi~
12639        $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
12640      else
12641	ld_shlibs=no
12642      fi
12643      ;;
12644
12645    haiku*)
12646      archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
12647      link_all_deplibs=yes
12648      ;;
12649
12650    os2*)
12651      hardcode_libdir_flag_spec='-L$libdir'
12652      hardcode_minus_L=yes
12653      allow_undefined_flag=unsupported
12654      shrext_cmds=.dll
12655      archive_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
12656	$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
12657	$ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
12658	$ECHO EXPORTS >> $output_objdir/$libname.def~
12659	emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
12660	$CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
12661	emximp -o $lib $output_objdir/$libname.def'
12662      archive_expsym_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
12663	$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
12664	$ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
12665	$ECHO EXPORTS >> $output_objdir/$libname.def~
12666	prefix_cmds="$SED"~
12667	if test EXPORTS = "`$SED 1q $export_symbols`"; then
12668	  prefix_cmds="$prefix_cmds -e 1d";
12669	fi~
12670	prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
12671	cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
12672	$CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
12673	emximp -o $lib $output_objdir/$libname.def'
12674      old_archive_From_new_cmds='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
12675      enable_shared_with_static_runtimes=yes
12676      ;;
12677
12678    interix[3-9]*)
12679      hardcode_direct=no
12680      hardcode_shlibpath_var=no
12681      hardcode_libdir_flag_spec='$wl-rpath,$libdir'
12682      export_dynamic_flag_spec='$wl-E'
12683      # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
12684      # Instead, shared libraries are loaded at an image base (0x10000000 by
12685      # default) and relocated if they conflict, which is a slow very memory
12686      # consuming and fragmenting process.  To avoid this, we pick a random,
12687      # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
12688      # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
12689      archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
12690      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'
12691      ;;
12692
12693    gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
12694      tmp_diet=no
12695      if test linux-dietlibc = "$host_os"; then
12696	case $cc_basename in
12697	  diet\ *) tmp_diet=yes;;	# linux-dietlibc with static linking (!diet-dyn)
12698	esac
12699      fi
12700      if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
12701	 && test no = "$tmp_diet"
12702      then
12703	tmp_addflag=' $pic_flag'
12704	tmp_sharedflag='-shared'
12705	case $cc_basename,$host_cpu in
12706        pgcc*)				# Portland Group C compiler
12707	  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'
12708	  tmp_addflag=' $pic_flag'
12709	  ;;
12710	pgf77* | pgf90* | pgf95* | pgfortran*)
12711					# Portland Group f77 and f90 compilers
12712	  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'
12713	  tmp_addflag=' $pic_flag -Mnomain' ;;
12714	ecc*,ia64* | icc*,ia64*)	# Intel C compiler on ia64
12715	  tmp_addflag=' -i_dynamic' ;;
12716	efc*,ia64* | ifort*,ia64*)	# Intel Fortran compiler on ia64
12717	  tmp_addflag=' -i_dynamic -nofor_main' ;;
12718	ifc* | ifort*)			# Intel Fortran compiler
12719	  tmp_addflag=' -nofor_main' ;;
12720	lf95*)				# Lahey Fortran 8.1
12721	  whole_archive_flag_spec=
12722	  tmp_sharedflag='--shared' ;;
12723        nagfor*)                        # NAGFOR 5.3
12724          tmp_sharedflag='-Wl,-shared' ;;
12725	xl[cC]* | bgxl[cC]* | mpixl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below)
12726	  tmp_sharedflag='-qmkshrobj'
12727	  tmp_addflag= ;;
12728	nvcc*)	# Cuda Compiler Driver 2.2
12729	  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'
12730	  compiler_needs_object=yes
12731	  ;;
12732	esac
12733	case `$CC -V 2>&1 | sed 5q` in
12734	*Sun\ C*)			# Sun C 5.9
12735	  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'
12736	  compiler_needs_object=yes
12737	  tmp_sharedflag='-G' ;;
12738	*Sun\ F*)			# Sun Fortran 8.3
12739	  tmp_sharedflag='-G' ;;
12740	esac
12741	archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
12742
12743        if test yes = "$supports_anon_versioning"; then
12744          archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~
12745            cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
12746            echo "local: *; };" >> $output_objdir/$libname.ver~
12747            $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib'
12748        fi
12749
12750	case $cc_basename in
12751	tcc*)
12752	  export_dynamic_flag_spec='-rdynamic'
12753	  ;;
12754	xlf* | bgf* | bgxlf* | mpixlf*)
12755	  # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
12756	  whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive'
12757	  hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
12758	  archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
12759	  if test yes = "$supports_anon_versioning"; then
12760	    archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~
12761              cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
12762              echo "local: *; };" >> $output_objdir/$libname.ver~
12763              $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
12764	  fi
12765	  ;;
12766	esac
12767      else
12768        ld_shlibs=no
12769      fi
12770      ;;
12771
12772    netbsd*)
12773      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
12774	archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
12775	wlarc=
12776      else
12777	archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
12778	archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
12779      fi
12780      ;;
12781
12782    solaris*)
12783      if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
12784	ld_shlibs=no
12785	cat <<_LT_EOF 1>&2
12786
12787*** Warning: The releases 2.8.* of the GNU linker cannot reliably
12788*** create shared libraries on Solaris systems.  Therefore, libtool
12789*** is disabling shared libraries support.  We urge you to upgrade GNU
12790*** binutils to release 2.9.1 or newer.  Another option is to modify
12791*** your PATH or compiler configuration so that the native linker is
12792*** used, and then restart.
12793
12794_LT_EOF
12795      elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
12796	archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
12797	archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
12798      else
12799	ld_shlibs=no
12800      fi
12801      ;;
12802
12803    sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
12804      case `$LD -v 2>&1` in
12805        *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*)
12806	ld_shlibs=no
12807	cat <<_LT_EOF 1>&2
12808
12809*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot
12810*** reliably create shared libraries on SCO systems.  Therefore, libtool
12811*** is disabling shared libraries support.  We urge you to upgrade GNU
12812*** binutils to release 2.16.91.0.3 or newer.  Another option is to modify
12813*** your PATH or compiler configuration so that the native linker is
12814*** used, and then restart.
12815
12816_LT_EOF
12817	;;
12818	*)
12819	  # For security reasons, it is highly recommended that you always
12820	  # use absolute paths for naming shared libraries, and exclude the
12821	  # DT_RUNPATH tag from executables and libraries.  But doing so
12822	  # requires that you compile everything twice, which is a pain.
12823	  if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
12824	    hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
12825	    archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
12826	    archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
12827	  else
12828	    ld_shlibs=no
12829	  fi
12830	;;
12831      esac
12832      ;;
12833
12834    sunos4*)
12835      archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
12836      wlarc=
12837      hardcode_direct=yes
12838      hardcode_shlibpath_var=no
12839      ;;
12840
12841    *)
12842      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
12843	archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
12844	archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
12845      else
12846	ld_shlibs=no
12847      fi
12848      ;;
12849    esac
12850
12851    if test no = "$ld_shlibs"; then
12852      runpath_var=
12853      hardcode_libdir_flag_spec=
12854      export_dynamic_flag_spec=
12855      whole_archive_flag_spec=
12856    fi
12857  else
12858    # PORTME fill in a description of your system's linker (not GNU ld)
12859    case $host_os in
12860    aix3*)
12861      allow_undefined_flag=unsupported
12862      always_export_symbols=yes
12863      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'
12864      # Note: this linker hardcodes the directories in LIBPATH if there
12865      # are no directories specified by -L.
12866      hardcode_minus_L=yes
12867      if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then
12868	# Neither direct hardcoding nor static linking is supported with a
12869	# broken collect2.
12870	hardcode_direct=unsupported
12871      fi
12872      ;;
12873
12874    aix[4-9]*)
12875      if test ia64 = "$host_cpu"; then
12876	# On IA64, the linker does run time linking by default, so we don't
12877	# have to do anything special.
12878	aix_use_runtimelinking=no
12879	exp_sym_flag='-Bexport'
12880	no_entry_flag=
12881      else
12882	# If we're using GNU nm, then we don't want the "-C" option.
12883	# -C means demangle to GNU nm, but means don't demangle to AIX nm.
12884	# Without the "-l" option, or with the "-B" option, AIX nm treats
12885	# weak defined symbols like other global defined symbols, whereas
12886	# GNU nm marks them as "W".
12887	# While the 'weak' keyword is ignored in the Export File, we need
12888	# it in the Import File for the 'aix-soname' feature, so we have
12889	# to replace the "-B" option with "-P" for AIX nm.
12890	if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
12891	  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'
12892	else
12893	  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'
12894	fi
12895	aix_use_runtimelinking=no
12896
12897	# Test if we are trying to use run time linking or normal
12898	# AIX style linking. If -brtl is somewhere in LDFLAGS, we
12899	# have runtime linking enabled, and use it for executables.
12900	# For shared libraries, we enable/disable runtime linking
12901	# depending on the kind of the shared library created -
12902	# when "with_aix_soname,aix_use_runtimelinking" is:
12903	# "aix,no"   lib.a(lib.so.V) shared, rtl:no,  for executables
12904	# "aix,yes"  lib.so          shared, rtl:yes, for executables
12905	#            lib.a           static archive
12906	# "both,no"  lib.so.V(shr.o) shared, rtl:yes
12907	#            lib.a(lib.so.V) shared, rtl:no,  for executables
12908	# "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables
12909	#            lib.a(lib.so.V) shared, rtl:no
12910	# "svr4,*"   lib.so.V(shr.o) shared, rtl:yes, for executables
12911	#            lib.a           static archive
12912	case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*)
12913	  for ld_flag in $LDFLAGS; do
12914	  if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then
12915	    aix_use_runtimelinking=yes
12916	    break
12917	  fi
12918	  done
12919	  if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then
12920	    # With aix-soname=svr4, we create the lib.so.V shared archives only,
12921	    # so we don't have lib.a shared libs to link our executables.
12922	    # We have to force runtime linking in this case.
12923	    aix_use_runtimelinking=yes
12924	    LDFLAGS="$LDFLAGS -Wl,-brtl"
12925	  fi
12926	  ;;
12927	esac
12928
12929	exp_sym_flag='-bexport'
12930	no_entry_flag='-bnoentry'
12931      fi
12932
12933      # When large executables or shared objects are built, AIX ld can
12934      # have problems creating the table of contents.  If linking a library
12935      # or program results in "error TOC overflow" add -mminimal-toc to
12936      # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
12937      # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
12938
12939      archive_cmds=''
12940      hardcode_direct=yes
12941      hardcode_direct_absolute=yes
12942      hardcode_libdir_separator=':'
12943      link_all_deplibs=yes
12944      file_list_spec='$wl-f,'
12945      case $with_aix_soname,$aix_use_runtimelinking in
12946      aix,*) ;; # traditional, no import file
12947      svr4,* | *,yes) # use import file
12948	# The Import File defines what to hardcode.
12949	hardcode_direct=no
12950	hardcode_direct_absolute=no
12951	;;
12952      esac
12953
12954      if test yes = "$GCC"; then
12955	case $host_os in aix4.[012]|aix4.[012].*)
12956	# We only want to do this on AIX 4.2 and lower, the check
12957	# below for broken collect2 doesn't work under 4.3+
12958	  collect2name=`$CC -print-prog-name=collect2`
12959	  if test -f "$collect2name" &&
12960	   strings "$collect2name" | $GREP resolve_lib_name >/dev/null
12961	  then
12962	  # We have reworked collect2
12963	  :
12964	  else
12965	  # We have old collect2
12966	  hardcode_direct=unsupported
12967	  # It fails to find uninstalled libraries when the uninstalled
12968	  # path is not listed in the libpath.  Setting hardcode_minus_L
12969	  # to unsupported forces relinking
12970	  hardcode_minus_L=yes
12971	  hardcode_libdir_flag_spec='-L$libdir'
12972	  hardcode_libdir_separator=
12973	  fi
12974	  ;;
12975	esac
12976	shared_flag='-shared'
12977	if test yes = "$aix_use_runtimelinking"; then
12978	  shared_flag="$shared_flag "'$wl-G'
12979	fi
12980	# Need to ensure runtime linking is disabled for the traditional
12981	# shared library, or the linker may eventually find shared libraries
12982	# /with/ Import File - we do not want to mix them.
12983	shared_flag_aix='-shared'
12984	shared_flag_svr4='-shared $wl-G'
12985      else
12986	# not using gcc
12987	if test ia64 = "$host_cpu"; then
12988	# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
12989	# chokes on -Wl,-G. The following line is correct:
12990	  shared_flag='-G'
12991	else
12992	  if test yes = "$aix_use_runtimelinking"; then
12993	    shared_flag='$wl-G'
12994	  else
12995	    shared_flag='$wl-bM:SRE'
12996	  fi
12997	  shared_flag_aix='$wl-bM:SRE'
12998	  shared_flag_svr4='$wl-G'
12999	fi
13000      fi
13001
13002      export_dynamic_flag_spec='$wl-bexpall'
13003      # It seems that -bexpall does not export symbols beginning with
13004      # underscore (_), so it is better to generate a list of symbols to export.
13005      always_export_symbols=yes
13006      if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then
13007	# Warning - without using the other runtime loading flags (-brtl),
13008	# -berok will link without error, but may produce a broken library.
13009	allow_undefined_flag='-berok'
13010        # Determine the default libpath from the value encoded in an
13011        # empty executable.
13012        if test set = "${lt_cv_aix_libpath+set}"; then
13013  aix_libpath=$lt_cv_aix_libpath
13014else
13015  if test ${lt_cv_aix_libpath_+y}
13016then :
13017  printf %s "(cached) " >&6
13018else $as_nop
13019  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13020/* end confdefs.h.  */
13021
13022int
13023main (void)
13024{
13025
13026  ;
13027  return 0;
13028}
13029_ACEOF
13030if ac_fn_c_try_link "$LINENO"
13031then :
13032
13033  lt_aix_libpath_sed='
13034      /Import File Strings/,/^$/ {
13035	  /^0/ {
13036	      s/^0  *\([^ ]*\) *$/\1/
13037	      p
13038	  }
13039      }'
13040  lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
13041  # Check for a 64-bit object if we didn't find anything.
13042  if test -z "$lt_cv_aix_libpath_"; then
13043    lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
13044  fi
13045fi
13046rm -f core conftest.err conftest.$ac_objext conftest.beam \
13047    conftest$ac_exeext conftest.$ac_ext
13048  if test -z "$lt_cv_aix_libpath_"; then
13049    lt_cv_aix_libpath_=/usr/lib:/lib
13050  fi
13051
13052fi
13053
13054  aix_libpath=$lt_cv_aix_libpath_
13055fi
13056
13057        hardcode_libdir_flag_spec='$wl-blibpath:$libdir:'"$aix_libpath"
13058        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
13059      else
13060	if test ia64 = "$host_cpu"; then
13061	  hardcode_libdir_flag_spec='$wl-R $libdir:/usr/lib:/lib'
13062	  allow_undefined_flag="-z nodefs"
13063	  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"
13064	else
13065	 # Determine the default libpath from the value encoded in an
13066	 # empty executable.
13067	 if test set = "${lt_cv_aix_libpath+set}"; then
13068  aix_libpath=$lt_cv_aix_libpath
13069else
13070  if test ${lt_cv_aix_libpath_+y}
13071then :
13072  printf %s "(cached) " >&6
13073else $as_nop
13074  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13075/* end confdefs.h.  */
13076
13077int
13078main (void)
13079{
13080
13081  ;
13082  return 0;
13083}
13084_ACEOF
13085if ac_fn_c_try_link "$LINENO"
13086then :
13087
13088  lt_aix_libpath_sed='
13089      /Import File Strings/,/^$/ {
13090	  /^0/ {
13091	      s/^0  *\([^ ]*\) *$/\1/
13092	      p
13093	  }
13094      }'
13095  lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
13096  # Check for a 64-bit object if we didn't find anything.
13097  if test -z "$lt_cv_aix_libpath_"; then
13098    lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
13099  fi
13100fi
13101rm -f core conftest.err conftest.$ac_objext conftest.beam \
13102    conftest$ac_exeext conftest.$ac_ext
13103  if test -z "$lt_cv_aix_libpath_"; then
13104    lt_cv_aix_libpath_=/usr/lib:/lib
13105  fi
13106
13107fi
13108
13109  aix_libpath=$lt_cv_aix_libpath_
13110fi
13111
13112	 hardcode_libdir_flag_spec='$wl-blibpath:$libdir:'"$aix_libpath"
13113	  # Warning - without using the other run time loading flags,
13114	  # -berok will link without error, but may produce a broken library.
13115	  no_undefined_flag=' $wl-bernotok'
13116	  allow_undefined_flag=' $wl-berok'
13117	  if test yes = "$with_gnu_ld"; then
13118	    # We only use this code for GNU lds that support --whole-archive.
13119	    whole_archive_flag_spec='$wl--whole-archive$convenience $wl--no-whole-archive'
13120	  else
13121	    # Exported symbols can be pulled into shared objects from archives
13122	    whole_archive_flag_spec='$convenience'
13123	  fi
13124	  archive_cmds_need_lc=yes
13125	  archive_expsym_cmds='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d'
13126	  # -brtl affects multiple linker settings, -berok does not and is overridden later
13127	  compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([, ]\\)%-berok\\1%g"`'
13128	  if test svr4 != "$with_aix_soname"; then
13129	    # This is similar to how AIX traditionally builds its shared libraries.
13130	    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'
13131	  fi
13132	  if test aix != "$with_aix_soname"; then
13133	    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'
13134	  else
13135	    # used by -dlpreopen to get the symbols
13136	    archive_expsym_cmds="$archive_expsym_cmds"'~$MV  $output_objdir/$realname.d/$soname $output_objdir'
13137	  fi
13138	  archive_expsym_cmds="$archive_expsym_cmds"'~$RM -r $output_objdir/$realname.d'
13139	fi
13140      fi
13141      ;;
13142
13143    amigaos*)
13144      case $host_cpu in
13145      powerpc)
13146            # see comment about AmigaOS4 .so support
13147            archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
13148            archive_expsym_cmds=''
13149        ;;
13150      m68k)
13151            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)'
13152            hardcode_libdir_flag_spec='-L$libdir'
13153            hardcode_minus_L=yes
13154        ;;
13155      esac
13156      ;;
13157
13158    bsdi[45]*)
13159      export_dynamic_flag_spec=-rdynamic
13160      ;;
13161
13162    cygwin* | mingw* | pw32* | cegcc*)
13163      # When not using gcc, we currently assume that we are using
13164      # Microsoft Visual C++.
13165      # hardcode_libdir_flag_spec is actually meaningless, as there is
13166      # no search path for DLLs.
13167      case $cc_basename in
13168      cl*)
13169	# Native MSVC
13170	hardcode_libdir_flag_spec=' '
13171	allow_undefined_flag=unsupported
13172	always_export_symbols=yes
13173	file_list_spec='@'
13174	# Tell ltmain to make .lib files, not .a files.
13175	libext=lib
13176	# Tell ltmain to make .dll files, not .so files.
13177	shrext_cmds=.dll
13178	# FIXME: Setting linknames here is a bad hack.
13179	archive_cmds='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames='
13180	archive_expsym_cmds='if   test DEF = "`$SED -n     -e '\''s/^[	 ]*//'\''     -e '\''/^\(;.*\)*$/d'\''     -e '\''s/^\(EXPORTS\|LIBRARY\)\([	 ].*\)*$/DEF/p'\''     -e q     $export_symbols`" ; then
13181            cp "$export_symbols" "$output_objdir/$soname.def";
13182            echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp";
13183          else
13184            $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp;
13185          fi~
13186          $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
13187          linknames='
13188	# The linker will not automatically build a static lib if we build a DLL.
13189	# _LT_TAGVAR(old_archive_from_new_cmds, )='true'
13190	enable_shared_with_static_runtimes=yes
13191	exclude_expsyms='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
13192	export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1,DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols'
13193	# Don't use ranlib
13194	old_postinstall_cmds='chmod 644 $oldlib'
13195	postlink_cmds='lt_outputfile="@OUTPUT@"~
13196          lt_tool_outputfile="@TOOL_OUTPUT@"~
13197          case $lt_outputfile in
13198            *.exe|*.EXE) ;;
13199            *)
13200              lt_outputfile=$lt_outputfile.exe
13201              lt_tool_outputfile=$lt_tool_outputfile.exe
13202              ;;
13203          esac~
13204          if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then
13205            $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
13206            $RM "$lt_outputfile.manifest";
13207          fi'
13208	;;
13209      *)
13210	# Assume MSVC wrapper
13211	hardcode_libdir_flag_spec=' '
13212	allow_undefined_flag=unsupported
13213	# Tell ltmain to make .lib files, not .a files.
13214	libext=lib
13215	# Tell ltmain to make .dll files, not .so files.
13216	shrext_cmds=.dll
13217	# FIXME: Setting linknames here is a bad hack.
13218	archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
13219	# The linker will automatically build a .lib file if we build a DLL.
13220	old_archive_from_new_cmds='true'
13221	# FIXME: Should let the user specify the lib program.
13222	old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs'
13223	enable_shared_with_static_runtimes=yes
13224	;;
13225      esac
13226      ;;
13227
13228    darwin* | rhapsody*)
13229
13230
13231  archive_cmds_need_lc=no
13232  hardcode_direct=no
13233  hardcode_automatic=yes
13234  hardcode_shlibpath_var=unsupported
13235  if test yes = "$lt_cv_ld_force_load"; then
13236    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\"`'
13237
13238  else
13239    whole_archive_flag_spec=''
13240  fi
13241  link_all_deplibs=yes
13242  allow_undefined_flag=$_lt_dar_allow_undefined
13243  case $cc_basename in
13244     ifort*|nagfor*) _lt_dar_can_shared=yes ;;
13245     *) _lt_dar_can_shared=$GCC ;;
13246  esac
13247  if test yes = "$_lt_dar_can_shared"; then
13248    output_verbose_link_cmd=func_echo_all
13249    archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dsymutil"
13250    module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil"
13251    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"
13252    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"
13253
13254  else
13255  ld_shlibs=no
13256  fi
13257
13258      ;;
13259
13260    dgux*)
13261      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
13262      hardcode_libdir_flag_spec='-L$libdir'
13263      hardcode_shlibpath_var=no
13264      ;;
13265
13266    # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
13267    # support.  Future versions do this automatically, but an explicit c++rt0.o
13268    # does not break anything, and helps significantly (at the cost of a little
13269    # extra space).
13270    freebsd2.2*)
13271      archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
13272      hardcode_libdir_flag_spec='-R$libdir'
13273      hardcode_direct=yes
13274      hardcode_shlibpath_var=no
13275      ;;
13276
13277    # Unfortunately, older versions of FreeBSD 2 do not have this feature.
13278    freebsd2.*)
13279      archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
13280      hardcode_direct=yes
13281      hardcode_minus_L=yes
13282      hardcode_shlibpath_var=no
13283      ;;
13284
13285    # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
13286    freebsd* | dragonfly*)
13287      archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
13288      hardcode_libdir_flag_spec='-R$libdir'
13289      hardcode_direct=yes
13290      hardcode_shlibpath_var=no
13291      ;;
13292
13293    hpux9*)
13294      if test yes = "$GCC"; then
13295	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'
13296      else
13297	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'
13298      fi
13299      hardcode_libdir_flag_spec='$wl+b $wl$libdir'
13300      hardcode_libdir_separator=:
13301      hardcode_direct=yes
13302
13303      # hardcode_minus_L: Not really in the search PATH,
13304      # but as the default location of the library.
13305      hardcode_minus_L=yes
13306      export_dynamic_flag_spec='$wl-E'
13307      ;;
13308
13309    hpux10*)
13310      if test yes,no = "$GCC,$with_gnu_ld"; then
13311	archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
13312      else
13313	archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
13314      fi
13315      if test no = "$with_gnu_ld"; then
13316	hardcode_libdir_flag_spec='$wl+b $wl$libdir'
13317	hardcode_libdir_separator=:
13318	hardcode_direct=yes
13319	hardcode_direct_absolute=yes
13320	export_dynamic_flag_spec='$wl-E'
13321	# hardcode_minus_L: Not really in the search PATH,
13322	# but as the default location of the library.
13323	hardcode_minus_L=yes
13324      fi
13325      ;;
13326
13327    hpux11*)
13328      if test yes,no = "$GCC,$with_gnu_ld"; then
13329	case $host_cpu in
13330	hppa*64*)
13331	  archive_cmds='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
13332	  ;;
13333	ia64*)
13334	  archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
13335	  ;;
13336	*)
13337	  archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
13338	  ;;
13339	esac
13340      else
13341	case $host_cpu in
13342	hppa*64*)
13343	  archive_cmds='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
13344	  ;;
13345	ia64*)
13346	  archive_cmds='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
13347	  ;;
13348	*)
13349
13350	  # Older versions of the 11.00 compiler do not understand -b yet
13351	  # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does)
13352	  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC understands -b" >&5
13353printf %s "checking if $CC understands -b... " >&6; }
13354if test ${lt_cv_prog_compiler__b+y}
13355then :
13356  printf %s "(cached) " >&6
13357else $as_nop
13358  lt_cv_prog_compiler__b=no
13359   save_LDFLAGS=$LDFLAGS
13360   LDFLAGS="$LDFLAGS -b"
13361   echo "$lt_simple_link_test_code" > conftest.$ac_ext
13362   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
13363     # The linker can only warn and ignore the option if not recognized
13364     # So say no if there are warnings
13365     if test -s conftest.err; then
13366       # Append any errors to the config.log.
13367       cat conftest.err 1>&5
13368       $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
13369       $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
13370       if diff conftest.exp conftest.er2 >/dev/null; then
13371         lt_cv_prog_compiler__b=yes
13372       fi
13373     else
13374       lt_cv_prog_compiler__b=yes
13375     fi
13376   fi
13377   $RM -r conftest*
13378   LDFLAGS=$save_LDFLAGS
13379
13380fi
13381{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler__b" >&5
13382printf "%s\n" "$lt_cv_prog_compiler__b" >&6; }
13383
13384if test yes = "$lt_cv_prog_compiler__b"; then
13385    archive_cmds='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
13386else
13387    archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
13388fi
13389
13390	  ;;
13391	esac
13392      fi
13393      if test no = "$with_gnu_ld"; then
13394	hardcode_libdir_flag_spec='$wl+b $wl$libdir'
13395	hardcode_libdir_separator=:
13396
13397	case $host_cpu in
13398	hppa*64*|ia64*)
13399	  hardcode_direct=no
13400	  hardcode_shlibpath_var=no
13401	  ;;
13402	*)
13403	  hardcode_direct=yes
13404	  hardcode_direct_absolute=yes
13405	  export_dynamic_flag_spec='$wl-E'
13406
13407	  # hardcode_minus_L: Not really in the search PATH,
13408	  # but as the default location of the library.
13409	  hardcode_minus_L=yes
13410	  ;;
13411	esac
13412      fi
13413      ;;
13414
13415    irix5* | irix6* | nonstopux*)
13416      if test yes = "$GCC"; then
13417	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'
13418	# Try to use the -exported_symbol ld option, if it does not
13419	# work, assume that -exports_file does not work either and
13420	# implicitly export all symbols.
13421	# This should be the same for all languages, so no per-tag cache variable.
13422	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5
13423printf %s "checking whether the $host_os linker accepts -exported_symbol... " >&6; }
13424if test ${lt_cv_irix_exported_symbol+y}
13425then :
13426  printf %s "(cached) " >&6
13427else $as_nop
13428  save_LDFLAGS=$LDFLAGS
13429	   LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null"
13430	   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13431/* end confdefs.h.  */
13432int foo (void) { return 0; }
13433_ACEOF
13434if ac_fn_c_try_link "$LINENO"
13435then :
13436  lt_cv_irix_exported_symbol=yes
13437else $as_nop
13438  lt_cv_irix_exported_symbol=no
13439fi
13440rm -f core conftest.err conftest.$ac_objext conftest.beam \
13441    conftest$ac_exeext conftest.$ac_ext
13442           LDFLAGS=$save_LDFLAGS
13443fi
13444{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5
13445printf "%s\n" "$lt_cv_irix_exported_symbol" >&6; }
13446	if test yes = "$lt_cv_irix_exported_symbol"; then
13447          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'
13448	fi
13449      else
13450	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'
13451	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'
13452      fi
13453      archive_cmds_need_lc='no'
13454      hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
13455      hardcode_libdir_separator=:
13456      inherit_rpath=yes
13457      link_all_deplibs=yes
13458      ;;
13459
13460    linux*)
13461      case $cc_basename in
13462      tcc*)
13463	# Fabrice Bellard et al's Tiny C Compiler
13464	ld_shlibs=yes
13465	archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
13466	;;
13467      esac
13468      ;;
13469
13470    netbsd*)
13471      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
13472	archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
13473      else
13474	archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
13475      fi
13476      hardcode_libdir_flag_spec='-R$libdir'
13477      hardcode_direct=yes
13478      hardcode_shlibpath_var=no
13479      ;;
13480
13481    newsos6)
13482      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
13483      hardcode_direct=yes
13484      hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
13485      hardcode_libdir_separator=:
13486      hardcode_shlibpath_var=no
13487      ;;
13488
13489    *nto* | *qnx*)
13490      ;;
13491
13492    openbsd* | bitrig*)
13493      if test -f /usr/libexec/ld.so; then
13494	hardcode_direct=yes
13495	hardcode_shlibpath_var=no
13496	hardcode_direct_absolute=yes
13497	if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
13498	  archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
13499	  archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols'
13500	  hardcode_libdir_flag_spec='$wl-rpath,$libdir'
13501	  export_dynamic_flag_spec='$wl-E'
13502	else
13503	  archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
13504	  hardcode_libdir_flag_spec='$wl-rpath,$libdir'
13505	fi
13506      else
13507	ld_shlibs=no
13508      fi
13509      ;;
13510
13511    os2*)
13512      hardcode_libdir_flag_spec='-L$libdir'
13513      hardcode_minus_L=yes
13514      allow_undefined_flag=unsupported
13515      shrext_cmds=.dll
13516      archive_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
13517	$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
13518	$ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
13519	$ECHO EXPORTS >> $output_objdir/$libname.def~
13520	emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
13521	$CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
13522	emximp -o $lib $output_objdir/$libname.def'
13523      archive_expsym_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
13524	$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
13525	$ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
13526	$ECHO EXPORTS >> $output_objdir/$libname.def~
13527	prefix_cmds="$SED"~
13528	if test EXPORTS = "`$SED 1q $export_symbols`"; then
13529	  prefix_cmds="$prefix_cmds -e 1d";
13530	fi~
13531	prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
13532	cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
13533	$CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
13534	emximp -o $lib $output_objdir/$libname.def'
13535      old_archive_From_new_cmds='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
13536      enable_shared_with_static_runtimes=yes
13537      ;;
13538
13539    osf3*)
13540      if test yes = "$GCC"; then
13541	allow_undefined_flag=' $wl-expect_unresolved $wl\*'
13542	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'
13543      else
13544	allow_undefined_flag=' -expect_unresolved \*'
13545	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'
13546      fi
13547      archive_cmds_need_lc='no'
13548      hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
13549      hardcode_libdir_separator=:
13550      ;;
13551
13552    osf4* | osf5*)	# as osf3* with the addition of -msym flag
13553      if test yes = "$GCC"; then
13554	allow_undefined_flag=' $wl-expect_unresolved $wl\*'
13555	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'
13556	hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
13557      else
13558	allow_undefined_flag=' -expect_unresolved \*'
13559	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'
13560	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~
13561          $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'
13562
13563	# Both c and cxx compiler support -rpath directly
13564	hardcode_libdir_flag_spec='-rpath $libdir'
13565      fi
13566      archive_cmds_need_lc='no'
13567      hardcode_libdir_separator=:
13568      ;;
13569
13570    solaris*)
13571      no_undefined_flag=' -z defs'
13572      if test yes = "$GCC"; then
13573	wlarc='$wl'
13574	archive_cmds='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
13575	archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
13576          $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'
13577      else
13578	case `$CC -V 2>&1` in
13579	*"Compilers 5.0"*)
13580	  wlarc=''
13581	  archive_cmds='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags'
13582	  archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
13583            $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
13584	  ;;
13585	*)
13586	  wlarc='$wl'
13587	  archive_cmds='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags'
13588	  archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
13589            $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
13590	  ;;
13591	esac
13592      fi
13593      hardcode_libdir_flag_spec='-R$libdir'
13594      hardcode_shlibpath_var=no
13595      case $host_os in
13596      solaris2.[0-5] | solaris2.[0-5].*) ;;
13597      *)
13598	# The compiler driver will combine and reorder linker options,
13599	# but understands '-z linker_flag'.  GCC discards it without '$wl',
13600	# but is careful enough not to reorder.
13601	# Supported since Solaris 2.6 (maybe 2.5.1?)
13602	if test yes = "$GCC"; then
13603	  whole_archive_flag_spec='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract'
13604	else
13605	  whole_archive_flag_spec='-z allextract$convenience -z defaultextract'
13606	fi
13607	;;
13608      esac
13609      link_all_deplibs=yes
13610      ;;
13611
13612    sunos4*)
13613      if test sequent = "$host_vendor"; then
13614	# Use $CC to link under sequent, because it throws in some extra .o
13615	# files that make .init and .fini sections work.
13616	archive_cmds='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags'
13617      else
13618	archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
13619      fi
13620      hardcode_libdir_flag_spec='-L$libdir'
13621      hardcode_direct=yes
13622      hardcode_minus_L=yes
13623      hardcode_shlibpath_var=no
13624      ;;
13625
13626    sysv4)
13627      case $host_vendor in
13628	sni)
13629	  archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
13630	  hardcode_direct=yes # is this really true???
13631	;;
13632	siemens)
13633	  ## LD is ld it makes a PLAMLIB
13634	  ## CC just makes a GrossModule.
13635	  archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
13636	  reload_cmds='$CC -r -o $output$reload_objs'
13637	  hardcode_direct=no
13638        ;;
13639	motorola)
13640	  archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
13641	  hardcode_direct=no #Motorola manual says yes, but my tests say they lie
13642	;;
13643      esac
13644      runpath_var='LD_RUN_PATH'
13645      hardcode_shlibpath_var=no
13646      ;;
13647
13648    sysv4.3*)
13649      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
13650      hardcode_shlibpath_var=no
13651      export_dynamic_flag_spec='-Bexport'
13652      ;;
13653
13654    sysv4*MP*)
13655      if test -d /usr/nec; then
13656	archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
13657	hardcode_shlibpath_var=no
13658	runpath_var=LD_RUN_PATH
13659	hardcode_runpath_var=yes
13660	ld_shlibs=yes
13661      fi
13662      ;;
13663
13664    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*)
13665      no_undefined_flag='$wl-z,text'
13666      archive_cmds_need_lc=no
13667      hardcode_shlibpath_var=no
13668      runpath_var='LD_RUN_PATH'
13669
13670      if test yes = "$GCC"; then
13671	archive_cmds='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
13672	archive_expsym_cmds='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
13673      else
13674	archive_cmds='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
13675	archive_expsym_cmds='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
13676      fi
13677      ;;
13678
13679    sysv5* | sco3.2v5* | sco5v6*)
13680      # Note: We CANNOT use -z defs as we might desire, because we do not
13681      # link with -lc, and that would cause any symbols used from libc to
13682      # always be unresolved, which means just about no library would
13683      # ever link correctly.  If we're not using GNU ld we use -z text
13684      # though, which does catch some bad symbols but isn't as heavy-handed
13685      # as -z defs.
13686      no_undefined_flag='$wl-z,text'
13687      allow_undefined_flag='$wl-z,nodefs'
13688      archive_cmds_need_lc=no
13689      hardcode_shlibpath_var=no
13690      hardcode_libdir_flag_spec='$wl-R,$libdir'
13691      hardcode_libdir_separator=':'
13692      link_all_deplibs=yes
13693      export_dynamic_flag_spec='$wl-Bexport'
13694      runpath_var='LD_RUN_PATH'
13695
13696      if test yes = "$GCC"; then
13697	archive_cmds='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
13698	archive_expsym_cmds='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
13699      else
13700	archive_cmds='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
13701	archive_expsym_cmds='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
13702      fi
13703      ;;
13704
13705    uts4*)
13706      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
13707      hardcode_libdir_flag_spec='-L$libdir'
13708      hardcode_shlibpath_var=no
13709      ;;
13710
13711    *)
13712      ld_shlibs=no
13713      ;;
13714    esac
13715
13716    if test sni = "$host_vendor"; then
13717      case $host in
13718      sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
13719	export_dynamic_flag_spec='$wl-Blargedynsym'
13720	;;
13721      esac
13722    fi
13723  fi
13724
13725{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5
13726printf "%s\n" "$ld_shlibs" >&6; }
13727test no = "$ld_shlibs" && can_build_shared=no
13728
13729with_gnu_ld=$with_gnu_ld
13730
13731
13732
13733
13734
13735
13736
13737
13738
13739
13740
13741
13742
13743
13744
13745#
13746# Do we need to explicitly link libc?
13747#
13748case "x$archive_cmds_need_lc" in
13749x|xyes)
13750  # Assume -lc should be added
13751  archive_cmds_need_lc=yes
13752
13753  if test yes,yes = "$GCC,$enable_shared"; then
13754    case $archive_cmds in
13755    *'~'*)
13756      # FIXME: we may have to deal with multi-command sequences.
13757      ;;
13758    '$CC '*)
13759      # Test whether the compiler implicitly links with -lc since on some
13760      # systems, -lgcc has to come before -lc. If gcc already passes -lc
13761      # to ld, don't add -lc before -lgcc.
13762      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5
13763printf %s "checking whether -lc should be explicitly linked in... " >&6; }
13764if test ${lt_cv_archive_cmds_need_lc+y}
13765then :
13766  printf %s "(cached) " >&6
13767else $as_nop
13768  $RM conftest*
13769	echo "$lt_simple_compile_test_code" > conftest.$ac_ext
13770
13771	if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
13772  (eval $ac_compile) 2>&5
13773  ac_status=$?
13774  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
13775  test $ac_status = 0; } 2>conftest.err; then
13776	  soname=conftest
13777	  lib=conftest
13778	  libobjs=conftest.$ac_objext
13779	  deplibs=
13780	  wl=$lt_prog_compiler_wl
13781	  pic_flag=$lt_prog_compiler_pic
13782	  compiler_flags=-v
13783	  linker_flags=-v
13784	  verstring=
13785	  output_objdir=.
13786	  libname=conftest
13787	  lt_save_allow_undefined_flag=$allow_undefined_flag
13788	  allow_undefined_flag=
13789	  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5
13790  (eval $archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5
13791  ac_status=$?
13792  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
13793  test $ac_status = 0; }
13794	  then
13795	    lt_cv_archive_cmds_need_lc=no
13796	  else
13797	    lt_cv_archive_cmds_need_lc=yes
13798	  fi
13799	  allow_undefined_flag=$lt_save_allow_undefined_flag
13800	else
13801	  cat conftest.err 1>&5
13802	fi
13803	$RM conftest*
13804
13805fi
13806{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc" >&5
13807printf "%s\n" "$lt_cv_archive_cmds_need_lc" >&6; }
13808      archive_cmds_need_lc=$lt_cv_archive_cmds_need_lc
13809      ;;
13810    esac
13811  fi
13812  ;;
13813esac
13814
13815
13816
13817
13818
13819
13820
13821
13822
13823
13824
13825
13826
13827
13828
13829
13830
13831
13832
13833
13834
13835
13836
13837
13838
13839
13840
13841
13842
13843
13844
13845
13846
13847
13848
13849
13850
13851
13852
13853
13854
13855
13856
13857
13858
13859
13860
13861
13862
13863
13864
13865
13866
13867
13868
13869
13870
13871
13872
13873
13874
13875
13876
13877
13878
13879
13880
13881
13882
13883
13884
13885
13886
13887
13888
13889
13890
13891
13892
13893
13894
13895
13896
13897
13898
13899
13900
13901
13902
13903
13904
13905
13906
13907
13908
13909
13910
13911
13912
13913
13914
13915
13916
13917
13918
13919
13920
13921
13922
13923
13924
13925
13926
13927
13928
13929
13930
13931
13932
13933
13934
13935
13936
13937
13938
13939
13940
13941
13942
13943
13944
13945
13946
13947
13948
13949
13950
13951
13952
13953
13954
13955
13956
13957
13958
13959
13960
13961
13962
13963
13964
13965
13966  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5
13967printf %s "checking dynamic linker characteristics... " >&6; }
13968
13969if test yes = "$GCC"; then
13970  case $host_os in
13971    darwin*) lt_awk_arg='/^libraries:/,/LR/' ;;
13972    *) lt_awk_arg='/^libraries:/' ;;
13973  esac
13974  case $host_os in
13975    mingw* | cegcc*) lt_sed_strip_eq='s|=\([A-Za-z]:\)|\1|g' ;;
13976    *) lt_sed_strip_eq='s|=/|/|g' ;;
13977  esac
13978  lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq`
13979  case $lt_search_path_spec in
13980  *\;*)
13981    # if the path contains ";" then we assume it to be the separator
13982    # otherwise default to the standard path separator (i.e. ":") - it is
13983    # assumed that no part of a normal pathname contains ";" but that should
13984    # okay in the real world where ";" in dirpaths is itself problematic.
13985    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'`
13986    ;;
13987  *)
13988    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"`
13989    ;;
13990  esac
13991  # Ok, now we have the path, separated by spaces, we can step through it
13992  # and add multilib dir if necessary...
13993  lt_tmp_lt_search_path_spec=
13994  lt_multi_os_dir=/`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
13995  # ...but if some path component already ends with the multilib dir we assume
13996  # that all is fine and trust -print-search-dirs as is (GCC 4.2? or newer).
13997  case "$lt_multi_os_dir; $lt_search_path_spec " in
13998  "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*)
13999    lt_multi_os_dir=
14000    ;;
14001  esac
14002  for lt_sys_path in $lt_search_path_spec; do
14003    if test -d "$lt_sys_path$lt_multi_os_dir"; then
14004      lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path$lt_multi_os_dir"
14005    elif test -n "$lt_multi_os_dir"; then
14006      test -d "$lt_sys_path" && \
14007	lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
14008    fi
14009  done
14010  lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk '
14011BEGIN {RS = " "; FS = "/|\n";} {
14012  lt_foo = "";
14013  lt_count = 0;
14014  for (lt_i = NF; lt_i > 0; lt_i--) {
14015    if ($lt_i != "" && $lt_i != ".") {
14016      if ($lt_i == "..") {
14017        lt_count++;
14018      } else {
14019        if (lt_count == 0) {
14020          lt_foo = "/" $lt_i lt_foo;
14021        } else {
14022          lt_count--;
14023        }
14024      }
14025    }
14026  }
14027  if (lt_foo != "") { lt_freq[lt_foo]++; }
14028  if (lt_freq[lt_foo] == 1) { print lt_foo; }
14029}'`
14030  # AWK program above erroneously prepends '/' to C:/dos/paths
14031  # for these hosts.
14032  case $host_os in
14033    mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\
14034      $SED 's|/\([A-Za-z]:\)|\1|g'` ;;
14035  esac
14036  sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP`
14037else
14038  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
14039fi
14040library_names_spec=
14041libname_spec='lib$name'
14042soname_spec=
14043shrext_cmds=.so
14044postinstall_cmds=
14045postuninstall_cmds=
14046finish_cmds=
14047finish_eval=
14048shlibpath_var=
14049shlibpath_overrides_runpath=unknown
14050version_type=none
14051dynamic_linker="$host_os ld.so"
14052sys_lib_dlsearch_path_spec="/lib /usr/lib"
14053need_lib_prefix=unknown
14054hardcode_into_libs=no
14055
14056# when you set need_version to no, make sure it does not cause -set_version
14057# flags to be left without arguments
14058need_version=unknown
14059
14060
14061
14062case $host_os in
14063aix3*)
14064  version_type=linux # correct to gnu/linux during the next big refactor
14065  library_names_spec='$libname$release$shared_ext$versuffix $libname.a'
14066  shlibpath_var=LIBPATH
14067
14068  # AIX 3 has no versioning support, so we append a major version to the name.
14069  soname_spec='$libname$release$shared_ext$major'
14070  ;;
14071
14072aix[4-9]*)
14073  version_type=linux # correct to gnu/linux during the next big refactor
14074  need_lib_prefix=no
14075  need_version=no
14076  hardcode_into_libs=yes
14077  if test ia64 = "$host_cpu"; then
14078    # AIX 5 supports IA64
14079    library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext'
14080    shlibpath_var=LD_LIBRARY_PATH
14081  else
14082    # With GCC up to 2.95.x, collect2 would create an import file
14083    # for dependence libraries.  The import file would start with
14084    # the line '#! .'.  This would cause the generated library to
14085    # depend on '.', always an invalid library.  This was fixed in
14086    # development snapshots of GCC prior to 3.0.
14087    case $host_os in
14088      aix4 | aix4.[01] | aix4.[01].*)
14089      if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
14090	   echo ' yes '
14091	   echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then
14092	:
14093      else
14094	can_build_shared=no
14095      fi
14096      ;;
14097    esac
14098    # Using Import Files as archive members, it is possible to support
14099    # filename-based versioning of shared library archives on AIX. While
14100    # this would work for both with and without runtime linking, it will
14101    # prevent static linking of such archives. So we do filename-based
14102    # shared library versioning with .so extension only, which is used
14103    # when both runtime linking and shared linking is enabled.
14104    # Unfortunately, runtime linking may impact performance, so we do
14105    # not want this to be the default eventually. Also, we use the
14106    # versioned .so libs for executables only if there is the -brtl
14107    # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only.
14108    # To allow for filename-based versioning support, we need to create
14109    # libNAME.so.V as an archive file, containing:
14110    # *) an Import File, referring to the versioned filename of the
14111    #    archive as well as the shared archive member, telling the
14112    #    bitwidth (32 or 64) of that shared object, and providing the
14113    #    list of exported symbols of that shared object, eventually
14114    #    decorated with the 'weak' keyword
14115    # *) the shared object with the F_LOADONLY flag set, to really avoid
14116    #    it being seen by the linker.
14117    # At run time we better use the real file rather than another symlink,
14118    # but for link time we create the symlink libNAME.so -> libNAME.so.V
14119
14120    case $with_aix_soname,$aix_use_runtimelinking in
14121    # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct
14122    # soname into executable. Probably we can add versioning support to
14123    # collect2, so additional links can be useful in future.
14124    aix,yes) # traditional libtool
14125      dynamic_linker='AIX unversionable lib.so'
14126      # If using run time linking (on AIX 4.2 or later) use lib<name>.so
14127      # instead of lib<name>.a to let people know that these are not
14128      # typical AIX shared libraries.
14129      library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
14130      ;;
14131    aix,no) # traditional AIX only
14132      dynamic_linker='AIX lib.a(lib.so.V)'
14133      # We preserve .a as extension for shared libraries through AIX4.2
14134      # and later when we are not doing run time linking.
14135      library_names_spec='$libname$release.a $libname.a'
14136      soname_spec='$libname$release$shared_ext$major'
14137      ;;
14138    svr4,*) # full svr4 only
14139      dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o)"
14140      library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
14141      # We do not specify a path in Import Files, so LIBPATH fires.
14142      shlibpath_overrides_runpath=yes
14143      ;;
14144    *,yes) # both, prefer svr4
14145      dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o), lib.a(lib.so.V)"
14146      library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
14147      # unpreferred sharedlib libNAME.a needs extra handling
14148      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"'
14149      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"'
14150      # We do not specify a path in Import Files, so LIBPATH fires.
14151      shlibpath_overrides_runpath=yes
14152      ;;
14153    *,no) # both, prefer aix
14154      dynamic_linker="AIX lib.a(lib.so.V), lib.so.V($shared_archive_member_spec.o)"
14155      library_names_spec='$libname$release.a $libname.a'
14156      soname_spec='$libname$release$shared_ext$major'
14157      # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling
14158      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)'
14159      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"'
14160      ;;
14161    esac
14162    shlibpath_var=LIBPATH
14163  fi
14164  ;;
14165
14166amigaos*)
14167  case $host_cpu in
14168  powerpc)
14169    # Since July 2007 AmigaOS4 officially supports .so libraries.
14170    # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
14171    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
14172    ;;
14173  m68k)
14174    library_names_spec='$libname.ixlibrary $libname.a'
14175    # Create ${libname}_ixlibrary.a entries in /sys/libs.
14176    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'
14177    ;;
14178  esac
14179  ;;
14180
14181beos*)
14182  library_names_spec='$libname$shared_ext'
14183  dynamic_linker="$host_os ld.so"
14184  shlibpath_var=LIBRARY_PATH
14185  ;;
14186
14187bsdi[45]*)
14188  version_type=linux # correct to gnu/linux during the next big refactor
14189  need_version=no
14190  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
14191  soname_spec='$libname$release$shared_ext$major'
14192  finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
14193  shlibpath_var=LD_LIBRARY_PATH
14194  sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
14195  sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
14196  # the default ld.so.conf also contains /usr/contrib/lib and
14197  # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
14198  # libtool to hard-code these into programs
14199  ;;
14200
14201cygwin* | mingw* | pw32* | cegcc*)
14202  version_type=windows
14203  shrext_cmds=.dll
14204  need_version=no
14205  need_lib_prefix=no
14206
14207  case $GCC,$cc_basename in
14208  yes,*)
14209    # gcc
14210    library_names_spec='$libname.dll.a'
14211    # DLL is installed to $(libdir)/../bin by postinstall_cmds
14212    postinstall_cmds='base_file=`basename \$file`~
14213      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
14214      dldir=$destdir/`dirname \$dlpath`~
14215      test -d \$dldir || mkdir -p \$dldir~
14216      $install_prog $dir/$dlname \$dldir/$dlname~
14217      chmod a+x \$dldir/$dlname~
14218      if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
14219        eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
14220      fi'
14221    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
14222      dlpath=$dir/\$dldll~
14223       $RM \$dlpath'
14224    shlibpath_overrides_runpath=yes
14225
14226    case $host_os in
14227    cygwin*)
14228      # Cygwin DLLs use 'cyg' prefix rather than 'lib'
14229      soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
14230
14231      sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"
14232      ;;
14233    mingw* | cegcc*)
14234      # MinGW DLLs use traditional 'lib' prefix
14235      soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
14236      ;;
14237    pw32*)
14238      # pw32 DLLs use 'pw' prefix rather than 'lib'
14239      library_names_spec='`echo $libname | sed -e 's/^lib/pw/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
14240      ;;
14241    esac
14242    dynamic_linker='Win32 ld.exe'
14243    ;;
14244
14245  *,cl*)
14246    # Native MSVC
14247    libname_spec='$name'
14248    soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
14249    library_names_spec='$libname.dll.lib'
14250
14251    case $build_os in
14252    mingw*)
14253      sys_lib_search_path_spec=
14254      lt_save_ifs=$IFS
14255      IFS=';'
14256      for lt_path in $LIB
14257      do
14258        IFS=$lt_save_ifs
14259        # Let DOS variable expansion print the short 8.3 style file name.
14260        lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"`
14261        sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path"
14262      done
14263      IFS=$lt_save_ifs
14264      # Convert to MSYS style.
14265      sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'`
14266      ;;
14267    cygwin*)
14268      # Convert to unix form, then to dos form, then back to unix form
14269      # but this time dos style (no spaces!) so that the unix form looks
14270      # like /cygdrive/c/PROGRA~1:/cygdr...
14271      sys_lib_search_path_spec=`cygpath --path --unix "$LIB"`
14272      sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null`
14273      sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
14274      ;;
14275    *)
14276      sys_lib_search_path_spec=$LIB
14277      if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then
14278        # It is most probably a Windows format PATH.
14279        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
14280      else
14281        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
14282      fi
14283      # FIXME: find the short name or the path components, as spaces are
14284      # common. (e.g. "Program Files" -> "PROGRA~1")
14285      ;;
14286    esac
14287
14288    # DLL is installed to $(libdir)/../bin by postinstall_cmds
14289    postinstall_cmds='base_file=`basename \$file`~
14290      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
14291      dldir=$destdir/`dirname \$dlpath`~
14292      test -d \$dldir || mkdir -p \$dldir~
14293      $install_prog $dir/$dlname \$dldir/$dlname'
14294    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
14295      dlpath=$dir/\$dldll~
14296       $RM \$dlpath'
14297    shlibpath_overrides_runpath=yes
14298    dynamic_linker='Win32 link.exe'
14299    ;;
14300
14301  *)
14302    # Assume MSVC wrapper
14303    library_names_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext $libname.lib'
14304    dynamic_linker='Win32 ld.exe'
14305    ;;
14306  esac
14307  # FIXME: first we should search . and the directory the executable is in
14308  shlibpath_var=PATH
14309  ;;
14310
14311darwin* | rhapsody*)
14312  dynamic_linker="$host_os dyld"
14313  version_type=darwin
14314  need_lib_prefix=no
14315  need_version=no
14316  library_names_spec='$libname$release$major$shared_ext $libname$shared_ext'
14317  soname_spec='$libname$release$major$shared_ext'
14318  shlibpath_overrides_runpath=yes
14319  shlibpath_var=DYLD_LIBRARY_PATH
14320  shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
14321
14322  sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"
14323  sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
14324  ;;
14325
14326dgux*)
14327  version_type=linux # correct to gnu/linux during the next big refactor
14328  need_lib_prefix=no
14329  need_version=no
14330  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
14331  soname_spec='$libname$release$shared_ext$major'
14332  shlibpath_var=LD_LIBRARY_PATH
14333  ;;
14334
14335freebsd* | dragonfly*)
14336  # DragonFly does not have aout.  When/if they implement a new
14337  # versioning mechanism, adjust this.
14338  if test -x /usr/bin/objformat; then
14339    objformat=`/usr/bin/objformat`
14340  else
14341    case $host_os in
14342    freebsd[23].*) objformat=aout ;;
14343    *) objformat=elf ;;
14344    esac
14345  fi
14346  version_type=freebsd-$objformat
14347  case $version_type in
14348    freebsd-elf*)
14349      library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
14350      soname_spec='$libname$release$shared_ext$major'
14351      need_version=no
14352      need_lib_prefix=no
14353      ;;
14354    freebsd-*)
14355      library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
14356      need_version=yes
14357      ;;
14358  esac
14359  shlibpath_var=LD_LIBRARY_PATH
14360  case $host_os in
14361  freebsd2.*)
14362    shlibpath_overrides_runpath=yes
14363    ;;
14364  freebsd3.[01]* | freebsdelf3.[01]*)
14365    shlibpath_overrides_runpath=yes
14366    hardcode_into_libs=yes
14367    ;;
14368  freebsd3.[2-9]* | freebsdelf3.[2-9]* | \
14369  freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1)
14370    shlibpath_overrides_runpath=no
14371    hardcode_into_libs=yes
14372    ;;
14373  *) # from 4.6 on, and DragonFly
14374    shlibpath_overrides_runpath=yes
14375    hardcode_into_libs=yes
14376    ;;
14377  esac
14378  ;;
14379
14380haiku*)
14381  version_type=linux # correct to gnu/linux during the next big refactor
14382  need_lib_prefix=no
14383  need_version=no
14384  dynamic_linker="$host_os runtime_loader"
14385  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
14386  soname_spec='$libname$release$shared_ext$major'
14387  shlibpath_var=LIBRARY_PATH
14388  shlibpath_overrides_runpath=no
14389  sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
14390  hardcode_into_libs=yes
14391  ;;
14392
14393hpux9* | hpux10* | hpux11*)
14394  # Give a soname corresponding to the major version so that dld.sl refuses to
14395  # link against other versions.
14396  version_type=sunos
14397  need_lib_prefix=no
14398  need_version=no
14399  case $host_cpu in
14400  ia64*)
14401    shrext_cmds='.so'
14402    hardcode_into_libs=yes
14403    dynamic_linker="$host_os dld.so"
14404    shlibpath_var=LD_LIBRARY_PATH
14405    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
14406    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
14407    soname_spec='$libname$release$shared_ext$major'
14408    if test 32 = "$HPUX_IA64_MODE"; then
14409      sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
14410      sys_lib_dlsearch_path_spec=/usr/lib/hpux32
14411    else
14412      sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
14413      sys_lib_dlsearch_path_spec=/usr/lib/hpux64
14414    fi
14415    ;;
14416  hppa*64*)
14417    shrext_cmds='.sl'
14418    hardcode_into_libs=yes
14419    dynamic_linker="$host_os dld.sl"
14420    shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
14421    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
14422    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
14423    soname_spec='$libname$release$shared_ext$major'
14424    sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
14425    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
14426    ;;
14427  *)
14428    shrext_cmds='.sl'
14429    dynamic_linker="$host_os dld.sl"
14430    shlibpath_var=SHLIB_PATH
14431    shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
14432    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
14433    soname_spec='$libname$release$shared_ext$major'
14434    ;;
14435  esac
14436  # HP-UX runs *really* slowly unless shared libraries are mode 555, ...
14437  postinstall_cmds='chmod 555 $lib'
14438  # or fails outright, so override atomically:
14439  install_override_mode=555
14440  ;;
14441
14442interix[3-9]*)
14443  version_type=linux # correct to gnu/linux during the next big refactor
14444  need_lib_prefix=no
14445  need_version=no
14446  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
14447  soname_spec='$libname$release$shared_ext$major'
14448  dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
14449  shlibpath_var=LD_LIBRARY_PATH
14450  shlibpath_overrides_runpath=no
14451  hardcode_into_libs=yes
14452  ;;
14453
14454irix5* | irix6* | nonstopux*)
14455  case $host_os in
14456    nonstopux*) version_type=nonstopux ;;
14457    *)
14458	if test yes = "$lt_cv_prog_gnu_ld"; then
14459		version_type=linux # correct to gnu/linux during the next big refactor
14460	else
14461		version_type=irix
14462	fi ;;
14463  esac
14464  need_lib_prefix=no
14465  need_version=no
14466  soname_spec='$libname$release$shared_ext$major'
14467  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext'
14468  case $host_os in
14469  irix5* | nonstopux*)
14470    libsuff= shlibsuff=
14471    ;;
14472  *)
14473    case $LD in # libtool.m4 will add one of these switches to LD
14474    *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
14475      libsuff= shlibsuff= libmagic=32-bit;;
14476    *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
14477      libsuff=32 shlibsuff=N32 libmagic=N32;;
14478    *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
14479      libsuff=64 shlibsuff=64 libmagic=64-bit;;
14480    *) libsuff= shlibsuff= libmagic=never-match;;
14481    esac
14482    ;;
14483  esac
14484  shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
14485  shlibpath_overrides_runpath=no
14486  sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff"
14487  sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff"
14488  hardcode_into_libs=yes
14489  ;;
14490
14491# No shared lib support for Linux oldld, aout, or coff.
14492linux*oldld* | linux*aout* | linux*coff*)
14493  dynamic_linker=no
14494  ;;
14495
14496linux*android*)
14497  version_type=none # Android doesn't support versioned libraries.
14498  need_lib_prefix=no
14499  need_version=no
14500  library_names_spec='$libname$release$shared_ext'
14501  soname_spec='$libname$release$shared_ext'
14502  finish_cmds=
14503  shlibpath_var=LD_LIBRARY_PATH
14504  shlibpath_overrides_runpath=yes
14505
14506  # This implies no fast_install, which is unacceptable.
14507  # Some rework will be needed to allow for fast_install
14508  # before this can be enabled.
14509  hardcode_into_libs=yes
14510
14511  dynamic_linker='Android linker'
14512  # Don't embed -rpath directories since the linker doesn't support them.
14513  hardcode_libdir_flag_spec='-L$libdir'
14514  ;;
14515
14516# This must be glibc/ELF.
14517linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
14518  version_type=linux # correct to gnu/linux during the next big refactor
14519  need_lib_prefix=no
14520  need_version=no
14521  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
14522  soname_spec='$libname$release$shared_ext$major'
14523  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
14524  shlibpath_var=LD_LIBRARY_PATH
14525  shlibpath_overrides_runpath=no
14526
14527  # Some binutils ld are patched to set DT_RUNPATH
14528  if test ${lt_cv_shlibpath_overrides_runpath+y}
14529then :
14530  printf %s "(cached) " >&6
14531else $as_nop
14532  lt_cv_shlibpath_overrides_runpath=no
14533    save_LDFLAGS=$LDFLAGS
14534    save_libdir=$libdir
14535    eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \
14536	 LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\""
14537    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14538/* end confdefs.h.  */
14539
14540int
14541main (void)
14542{
14543
14544  ;
14545  return 0;
14546}
14547_ACEOF
14548if ac_fn_c_try_link "$LINENO"
14549then :
14550  if  ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null
14551then :
14552  lt_cv_shlibpath_overrides_runpath=yes
14553fi
14554fi
14555rm -f core conftest.err conftest.$ac_objext conftest.beam \
14556    conftest$ac_exeext conftest.$ac_ext
14557    LDFLAGS=$save_LDFLAGS
14558    libdir=$save_libdir
14559
14560fi
14561
14562  shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
14563
14564  # This implies no fast_install, which is unacceptable.
14565  # Some rework will be needed to allow for fast_install
14566  # before this can be enabled.
14567  hardcode_into_libs=yes
14568
14569  # Add ABI-specific directories to the system library path.
14570  sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib"
14571
14572  # Ideally, we could use ldconfig to report *all* directores which are
14573  # searched for libraries, however this is still not possible.  Aside from not
14574  # being certain /sbin/ldconfig is available, command
14575  # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64,
14576  # even though it is searched at run-time.  Try to do the best guess by
14577  # appending ld.so.conf contents (and includes) to the search path.
14578  if test -f /etc/ld.so.conf; then
14579    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' ' '`
14580    sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra"
14581  fi
14582
14583  # We used to test for /lib/ld.so.1 and disable shared libraries on
14584  # powerpc, because MkLinux only supported shared libraries with the
14585  # GNU dynamic linker.  Since this was broken with cross compilers,
14586  # most powerpc-linux boxes support dynamic linking these days and
14587  # people can always --disable-shared, the test was removed, and we
14588  # assume the GNU/Linux dynamic linker is in use.
14589  dynamic_linker='GNU/Linux ld.so'
14590  ;;
14591
14592netbsd*)
14593  version_type=sunos
14594  need_lib_prefix=no
14595  need_version=no
14596  if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
14597    library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
14598    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
14599    dynamic_linker='NetBSD (a.out) ld.so'
14600  else
14601    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
14602    soname_spec='$libname$release$shared_ext$major'
14603    dynamic_linker='NetBSD ld.elf_so'
14604  fi
14605  shlibpath_var=LD_LIBRARY_PATH
14606  shlibpath_overrides_runpath=yes
14607  hardcode_into_libs=yes
14608  ;;
14609
14610newsos6)
14611  version_type=linux # correct to gnu/linux during the next big refactor
14612  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
14613  shlibpath_var=LD_LIBRARY_PATH
14614  shlibpath_overrides_runpath=yes
14615  ;;
14616
14617*nto* | *qnx*)
14618  version_type=qnx
14619  need_lib_prefix=no
14620  need_version=no
14621  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
14622  soname_spec='$libname$release$shared_ext$major'
14623  shlibpath_var=LD_LIBRARY_PATH
14624  shlibpath_overrides_runpath=no
14625  hardcode_into_libs=yes
14626  dynamic_linker='ldqnx.so'
14627  ;;
14628
14629openbsd* | bitrig*)
14630  version_type=sunos
14631  sys_lib_dlsearch_path_spec=/usr/lib
14632  need_lib_prefix=no
14633  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
14634    need_version=no
14635  else
14636    need_version=yes
14637  fi
14638  library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
14639  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
14640  shlibpath_var=LD_LIBRARY_PATH
14641  shlibpath_overrides_runpath=yes
14642  ;;
14643
14644os2*)
14645  libname_spec='$name'
14646  version_type=windows
14647  shrext_cmds=.dll
14648  need_version=no
14649  need_lib_prefix=no
14650  # OS/2 can only load a DLL with a base name of 8 characters or less.
14651  soname_spec='`test -n "$os2dllname" && libname="$os2dllname";
14652    v=$($ECHO $release$versuffix | tr -d .-);
14653    n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _);
14654    $ECHO $n$v`$shared_ext'
14655  library_names_spec='${libname}_dll.$libext'
14656  dynamic_linker='OS/2 ld.exe'
14657  shlibpath_var=BEGINLIBPATH
14658  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
14659  sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
14660  postinstall_cmds='base_file=`basename \$file`~
14661    dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~
14662    dldir=$destdir/`dirname \$dlpath`~
14663    test -d \$dldir || mkdir -p \$dldir~
14664    $install_prog $dir/$dlname \$dldir/$dlname~
14665    chmod a+x \$dldir/$dlname~
14666    if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
14667      eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
14668    fi'
14669  postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~
14670    dlpath=$dir/\$dldll~
14671    $RM \$dlpath'
14672  ;;
14673
14674osf3* | osf4* | osf5*)
14675  version_type=osf
14676  need_lib_prefix=no
14677  need_version=no
14678  soname_spec='$libname$release$shared_ext$major'
14679  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
14680  shlibpath_var=LD_LIBRARY_PATH
14681  sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
14682  sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
14683  ;;
14684
14685rdos*)
14686  dynamic_linker=no
14687  ;;
14688
14689solaris*)
14690  version_type=linux # correct to gnu/linux during the next big refactor
14691  need_lib_prefix=no
14692  need_version=no
14693  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
14694  soname_spec='$libname$release$shared_ext$major'
14695  shlibpath_var=LD_LIBRARY_PATH
14696  shlibpath_overrides_runpath=yes
14697  hardcode_into_libs=yes
14698  # ldd complains unless libraries are executable
14699  postinstall_cmds='chmod +x $lib'
14700  ;;
14701
14702sunos4*)
14703  version_type=sunos
14704  library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
14705  finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
14706  shlibpath_var=LD_LIBRARY_PATH
14707  shlibpath_overrides_runpath=yes
14708  if test yes = "$with_gnu_ld"; then
14709    need_lib_prefix=no
14710  fi
14711  need_version=yes
14712  ;;
14713
14714sysv4 | sysv4.3*)
14715  version_type=linux # correct to gnu/linux during the next big refactor
14716  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
14717  soname_spec='$libname$release$shared_ext$major'
14718  shlibpath_var=LD_LIBRARY_PATH
14719  case $host_vendor in
14720    sni)
14721      shlibpath_overrides_runpath=no
14722      need_lib_prefix=no
14723      runpath_var=LD_RUN_PATH
14724      ;;
14725    siemens)
14726      need_lib_prefix=no
14727      ;;
14728    motorola)
14729      need_lib_prefix=no
14730      need_version=no
14731      shlibpath_overrides_runpath=no
14732      sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
14733      ;;
14734  esac
14735  ;;
14736
14737sysv4*MP*)
14738  if test -d /usr/nec; then
14739    version_type=linux # correct to gnu/linux during the next big refactor
14740    library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext'
14741    soname_spec='$libname$shared_ext.$major'
14742    shlibpath_var=LD_LIBRARY_PATH
14743  fi
14744  ;;
14745
14746sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
14747  version_type=sco
14748  need_lib_prefix=no
14749  need_version=no
14750  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext'
14751  soname_spec='$libname$release$shared_ext$major'
14752  shlibpath_var=LD_LIBRARY_PATH
14753  shlibpath_overrides_runpath=yes
14754  hardcode_into_libs=yes
14755  if test yes = "$with_gnu_ld"; then
14756    sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
14757  else
14758    sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
14759    case $host_os in
14760      sco3.2v5*)
14761        sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
14762	;;
14763    esac
14764  fi
14765  sys_lib_dlsearch_path_spec='/usr/lib'
14766  ;;
14767
14768tpf*)
14769  # TPF is a cross-target only.  Preferred cross-host = GNU/Linux.
14770  version_type=linux # correct to gnu/linux during the next big refactor
14771  need_lib_prefix=no
14772  need_version=no
14773  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
14774  shlibpath_var=LD_LIBRARY_PATH
14775  shlibpath_overrides_runpath=no
14776  hardcode_into_libs=yes
14777  ;;
14778
14779uts4*)
14780  version_type=linux # correct to gnu/linux during the next big refactor
14781  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
14782  soname_spec='$libname$release$shared_ext$major'
14783  shlibpath_var=LD_LIBRARY_PATH
14784  ;;
14785
14786*)
14787  dynamic_linker=no
14788  ;;
14789esac
14790{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5
14791printf "%s\n" "$dynamic_linker" >&6; }
14792test no = "$dynamic_linker" && can_build_shared=no
14793
14794variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
14795if test yes = "$GCC"; then
14796  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
14797fi
14798
14799if test set = "${lt_cv_sys_lib_search_path_spec+set}"; then
14800  sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec
14801fi
14802
14803if test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then
14804  sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec
14805fi
14806
14807# remember unaugmented sys_lib_dlsearch_path content for libtool script decls...
14808configure_time_dlsearch_path=$sys_lib_dlsearch_path_spec
14809
14810# ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code
14811func_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH"
14812
14813# to be used as default LT_SYS_LIBRARY_PATH value in generated libtool
14814configure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH
14815
14816
14817
14818
14819
14820
14821
14822
14823
14824
14825
14826
14827
14828
14829
14830
14831
14832
14833
14834
14835
14836
14837
14838
14839
14840
14841
14842
14843
14844
14845
14846
14847
14848
14849
14850
14851
14852
14853
14854
14855
14856
14857
14858
14859
14860
14861
14862
14863
14864
14865
14866
14867
14868
14869
14870
14871
14872
14873
14874
14875
14876
14877
14878
14879
14880
14881
14882
14883
14884
14885
14886
14887
14888
14889
14890
14891
14892
14893
14894
14895
14896
14897
14898
14899
14900
14901
14902
14903
14904
14905
14906
14907
14908
14909
14910
14911
14912  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5
14913printf %s "checking how to hardcode library paths into programs... " >&6; }
14914hardcode_action=
14915if test -n "$hardcode_libdir_flag_spec" ||
14916   test -n "$runpath_var" ||
14917   test yes = "$hardcode_automatic"; then
14918
14919  # We can hardcode non-existent directories.
14920  if test no != "$hardcode_direct" &&
14921     # If the only mechanism to avoid hardcoding is shlibpath_var, we
14922     # have to relink, otherwise we might link with an installed library
14923     # when we should be linking with a yet-to-be-installed one
14924     ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, )" &&
14925     test no != "$hardcode_minus_L"; then
14926    # Linking always hardcodes the temporary library directory.
14927    hardcode_action=relink
14928  else
14929    # We can link without hardcoding, and we can hardcode nonexisting dirs.
14930    hardcode_action=immediate
14931  fi
14932else
14933  # We cannot hardcode anything, or else we can only hardcode existing
14934  # directories.
14935  hardcode_action=unsupported
14936fi
14937{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5
14938printf "%s\n" "$hardcode_action" >&6; }
14939
14940if test relink = "$hardcode_action" ||
14941   test yes = "$inherit_rpath"; then
14942  # Fast installation is not supported
14943  enable_fast_install=no
14944elif test yes = "$shlibpath_overrides_runpath" ||
14945     test no = "$enable_shared"; then
14946  # Fast installation is not necessary
14947  enable_fast_install=needless
14948fi
14949
14950
14951
14952
14953
14954
14955  if test yes != "$enable_dlopen"; then
14956  enable_dlopen=unknown
14957  enable_dlopen_self=unknown
14958  enable_dlopen_self_static=unknown
14959else
14960  lt_cv_dlopen=no
14961  lt_cv_dlopen_libs=
14962
14963  case $host_os in
14964  beos*)
14965    lt_cv_dlopen=load_add_on
14966    lt_cv_dlopen_libs=
14967    lt_cv_dlopen_self=yes
14968    ;;
14969
14970  mingw* | pw32* | cegcc*)
14971    lt_cv_dlopen=LoadLibrary
14972    lt_cv_dlopen_libs=
14973    ;;
14974
14975  cygwin*)
14976    lt_cv_dlopen=dlopen
14977    lt_cv_dlopen_libs=
14978    ;;
14979
14980  darwin*)
14981    # if libdl is installed we need to link against it
14982    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
14983printf %s "checking for dlopen in -ldl... " >&6; }
14984if test ${ac_cv_lib_dl_dlopen+y}
14985then :
14986  printf %s "(cached) " >&6
14987else $as_nop
14988  ac_check_lib_save_LIBS=$LIBS
14989LIBS="-ldl  $LIBS"
14990cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14991/* end confdefs.h.  */
14992
14993/* Override any GCC internal prototype to avoid an error.
14994   Use char because int might match the return type of a GCC
14995   builtin and then its argument prototype would still apply.  */
14996char dlopen ();
14997int
14998main (void)
14999{
15000return dlopen ();
15001  ;
15002  return 0;
15003}
15004_ACEOF
15005if ac_fn_c_try_link "$LINENO"
15006then :
15007  ac_cv_lib_dl_dlopen=yes
15008else $as_nop
15009  ac_cv_lib_dl_dlopen=no
15010fi
15011rm -f core conftest.err conftest.$ac_objext conftest.beam \
15012    conftest$ac_exeext conftest.$ac_ext
15013LIBS=$ac_check_lib_save_LIBS
15014fi
15015{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
15016printf "%s\n" "$ac_cv_lib_dl_dlopen" >&6; }
15017if test "x$ac_cv_lib_dl_dlopen" = xyes
15018then :
15019  lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl
15020else $as_nop
15021
15022    lt_cv_dlopen=dyld
15023    lt_cv_dlopen_libs=
15024    lt_cv_dlopen_self=yes
15025
15026fi
15027
15028    ;;
15029
15030  tpf*)
15031    # Don't try to run any link tests for TPF.  We know it's impossible
15032    # because TPF is a cross-compiler, and we know how we open DSOs.
15033    lt_cv_dlopen=dlopen
15034    lt_cv_dlopen_libs=
15035    lt_cv_dlopen_self=no
15036    ;;
15037
15038  *)
15039    ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load"
15040if test "x$ac_cv_func_shl_load" = xyes
15041then :
15042  lt_cv_dlopen=shl_load
15043else $as_nop
15044  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
15045printf %s "checking for shl_load in -ldld... " >&6; }
15046if test ${ac_cv_lib_dld_shl_load+y}
15047then :
15048  printf %s "(cached) " >&6
15049else $as_nop
15050  ac_check_lib_save_LIBS=$LIBS
15051LIBS="-ldld  $LIBS"
15052cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15053/* end confdefs.h.  */
15054
15055/* Override any GCC internal prototype to avoid an error.
15056   Use char because int might match the return type of a GCC
15057   builtin and then its argument prototype would still apply.  */
15058char shl_load ();
15059int
15060main (void)
15061{
15062return shl_load ();
15063  ;
15064  return 0;
15065}
15066_ACEOF
15067if ac_fn_c_try_link "$LINENO"
15068then :
15069  ac_cv_lib_dld_shl_load=yes
15070else $as_nop
15071  ac_cv_lib_dld_shl_load=no
15072fi
15073rm -f core conftest.err conftest.$ac_objext conftest.beam \
15074    conftest$ac_exeext conftest.$ac_ext
15075LIBS=$ac_check_lib_save_LIBS
15076fi
15077{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
15078printf "%s\n" "$ac_cv_lib_dld_shl_load" >&6; }
15079if test "x$ac_cv_lib_dld_shl_load" = xyes
15080then :
15081  lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld
15082else $as_nop
15083  ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
15084if test "x$ac_cv_func_dlopen" = xyes
15085then :
15086  lt_cv_dlopen=dlopen
15087else $as_nop
15088  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
15089printf %s "checking for dlopen in -ldl... " >&6; }
15090if test ${ac_cv_lib_dl_dlopen+y}
15091then :
15092  printf %s "(cached) " >&6
15093else $as_nop
15094  ac_check_lib_save_LIBS=$LIBS
15095LIBS="-ldl  $LIBS"
15096cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15097/* end confdefs.h.  */
15098
15099/* Override any GCC internal prototype to avoid an error.
15100   Use char because int might match the return type of a GCC
15101   builtin and then its argument prototype would still apply.  */
15102char dlopen ();
15103int
15104main (void)
15105{
15106return dlopen ();
15107  ;
15108  return 0;
15109}
15110_ACEOF
15111if ac_fn_c_try_link "$LINENO"
15112then :
15113  ac_cv_lib_dl_dlopen=yes
15114else $as_nop
15115  ac_cv_lib_dl_dlopen=no
15116fi
15117rm -f core conftest.err conftest.$ac_objext conftest.beam \
15118    conftest$ac_exeext conftest.$ac_ext
15119LIBS=$ac_check_lib_save_LIBS
15120fi
15121{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
15122printf "%s\n" "$ac_cv_lib_dl_dlopen" >&6; }
15123if test "x$ac_cv_lib_dl_dlopen" = xyes
15124then :
15125  lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl
15126else $as_nop
15127  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5
15128printf %s "checking for dlopen in -lsvld... " >&6; }
15129if test ${ac_cv_lib_svld_dlopen+y}
15130then :
15131  printf %s "(cached) " >&6
15132else $as_nop
15133  ac_check_lib_save_LIBS=$LIBS
15134LIBS="-lsvld  $LIBS"
15135cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15136/* end confdefs.h.  */
15137
15138/* Override any GCC internal prototype to avoid an error.
15139   Use char because int might match the return type of a GCC
15140   builtin and then its argument prototype would still apply.  */
15141char dlopen ();
15142int
15143main (void)
15144{
15145return dlopen ();
15146  ;
15147  return 0;
15148}
15149_ACEOF
15150if ac_fn_c_try_link "$LINENO"
15151then :
15152  ac_cv_lib_svld_dlopen=yes
15153else $as_nop
15154  ac_cv_lib_svld_dlopen=no
15155fi
15156rm -f core conftest.err conftest.$ac_objext conftest.beam \
15157    conftest$ac_exeext conftest.$ac_ext
15158LIBS=$ac_check_lib_save_LIBS
15159fi
15160{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5
15161printf "%s\n" "$ac_cv_lib_svld_dlopen" >&6; }
15162if test "x$ac_cv_lib_svld_dlopen" = xyes
15163then :
15164  lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld
15165else $as_nop
15166  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5
15167printf %s "checking for dld_link in -ldld... " >&6; }
15168if test ${ac_cv_lib_dld_dld_link+y}
15169then :
15170  printf %s "(cached) " >&6
15171else $as_nop
15172  ac_check_lib_save_LIBS=$LIBS
15173LIBS="-ldld  $LIBS"
15174cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15175/* end confdefs.h.  */
15176
15177/* Override any GCC internal prototype to avoid an error.
15178   Use char because int might match the return type of a GCC
15179   builtin and then its argument prototype would still apply.  */
15180char dld_link ();
15181int
15182main (void)
15183{
15184return dld_link ();
15185  ;
15186  return 0;
15187}
15188_ACEOF
15189if ac_fn_c_try_link "$LINENO"
15190then :
15191  ac_cv_lib_dld_dld_link=yes
15192else $as_nop
15193  ac_cv_lib_dld_dld_link=no
15194fi
15195rm -f core conftest.err conftest.$ac_objext conftest.beam \
15196    conftest$ac_exeext conftest.$ac_ext
15197LIBS=$ac_check_lib_save_LIBS
15198fi
15199{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5
15200printf "%s\n" "$ac_cv_lib_dld_dld_link" >&6; }
15201if test "x$ac_cv_lib_dld_dld_link" = xyes
15202then :
15203  lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld
15204fi
15205
15206
15207fi
15208
15209
15210fi
15211
15212
15213fi
15214
15215
15216fi
15217
15218
15219fi
15220
15221    ;;
15222  esac
15223
15224  if test no = "$lt_cv_dlopen"; then
15225    enable_dlopen=no
15226  else
15227    enable_dlopen=yes
15228  fi
15229
15230  case $lt_cv_dlopen in
15231  dlopen)
15232    save_CPPFLAGS=$CPPFLAGS
15233    test yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
15234
15235    save_LDFLAGS=$LDFLAGS
15236    wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
15237
15238    save_LIBS=$LIBS
15239    LIBS="$lt_cv_dlopen_libs $LIBS"
15240
15241    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5
15242printf %s "checking whether a program can dlopen itself... " >&6; }
15243if test ${lt_cv_dlopen_self+y}
15244then :
15245  printf %s "(cached) " >&6
15246else $as_nop
15247  	  if test yes = "$cross_compiling"; then :
15248  lt_cv_dlopen_self=cross
15249else
15250  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
15251  lt_status=$lt_dlunknown
15252  cat > conftest.$ac_ext <<_LT_EOF
15253#line $LINENO "configure"
15254#include "confdefs.h"
15255
15256#if HAVE_DLFCN_H
15257#include <dlfcn.h>
15258#endif
15259
15260#include <stdio.h>
15261
15262#ifdef RTLD_GLOBAL
15263#  define LT_DLGLOBAL		RTLD_GLOBAL
15264#else
15265#  ifdef DL_GLOBAL
15266#    define LT_DLGLOBAL		DL_GLOBAL
15267#  else
15268#    define LT_DLGLOBAL		0
15269#  endif
15270#endif
15271
15272/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
15273   find out it does not work in some platform. */
15274#ifndef LT_DLLAZY_OR_NOW
15275#  ifdef RTLD_LAZY
15276#    define LT_DLLAZY_OR_NOW		RTLD_LAZY
15277#  else
15278#    ifdef DL_LAZY
15279#      define LT_DLLAZY_OR_NOW		DL_LAZY
15280#    else
15281#      ifdef RTLD_NOW
15282#        define LT_DLLAZY_OR_NOW	RTLD_NOW
15283#      else
15284#        ifdef DL_NOW
15285#          define LT_DLLAZY_OR_NOW	DL_NOW
15286#        else
15287#          define LT_DLLAZY_OR_NOW	0
15288#        endif
15289#      endif
15290#    endif
15291#  endif
15292#endif
15293
15294/* When -fvisibility=hidden is used, assume the code has been annotated
15295   correspondingly for the symbols needed.  */
15296#if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
15297int fnord () __attribute__((visibility("default")));
15298#endif
15299
15300int fnord () { return 42; }
15301int main ()
15302{
15303  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
15304  int status = $lt_dlunknown;
15305
15306  if (self)
15307    {
15308      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
15309      else
15310        {
15311	  if (dlsym( self,"_fnord"))  status = $lt_dlneed_uscore;
15312          else puts (dlerror ());
15313	}
15314      /* dlclose (self); */
15315    }
15316  else
15317    puts (dlerror ());
15318
15319  return status;
15320}
15321_LT_EOF
15322  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
15323  (eval $ac_link) 2>&5
15324  ac_status=$?
15325  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
15326  test $ac_status = 0; } && test -s "conftest$ac_exeext" 2>/dev/null; then
15327    (./conftest; exit; ) >&5 2>/dev/null
15328    lt_status=$?
15329    case x$lt_status in
15330      x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;;
15331      x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;;
15332      x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;;
15333    esac
15334  else :
15335    # compilation failed
15336    lt_cv_dlopen_self=no
15337  fi
15338fi
15339rm -fr conftest*
15340
15341
15342fi
15343{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5
15344printf "%s\n" "$lt_cv_dlopen_self" >&6; }
15345
15346    if test yes = "$lt_cv_dlopen_self"; then
15347      wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
15348      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5
15349printf %s "checking whether a statically linked program can dlopen itself... " >&6; }
15350if test ${lt_cv_dlopen_self_static+y}
15351then :
15352  printf %s "(cached) " >&6
15353else $as_nop
15354  	  if test yes = "$cross_compiling"; then :
15355  lt_cv_dlopen_self_static=cross
15356else
15357  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
15358  lt_status=$lt_dlunknown
15359  cat > conftest.$ac_ext <<_LT_EOF
15360#line $LINENO "configure"
15361#include "confdefs.h"
15362
15363#if HAVE_DLFCN_H
15364#include <dlfcn.h>
15365#endif
15366
15367#include <stdio.h>
15368
15369#ifdef RTLD_GLOBAL
15370#  define LT_DLGLOBAL		RTLD_GLOBAL
15371#else
15372#  ifdef DL_GLOBAL
15373#    define LT_DLGLOBAL		DL_GLOBAL
15374#  else
15375#    define LT_DLGLOBAL		0
15376#  endif
15377#endif
15378
15379/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
15380   find out it does not work in some platform. */
15381#ifndef LT_DLLAZY_OR_NOW
15382#  ifdef RTLD_LAZY
15383#    define LT_DLLAZY_OR_NOW		RTLD_LAZY
15384#  else
15385#    ifdef DL_LAZY
15386#      define LT_DLLAZY_OR_NOW		DL_LAZY
15387#    else
15388#      ifdef RTLD_NOW
15389#        define LT_DLLAZY_OR_NOW	RTLD_NOW
15390#      else
15391#        ifdef DL_NOW
15392#          define LT_DLLAZY_OR_NOW	DL_NOW
15393#        else
15394#          define LT_DLLAZY_OR_NOW	0
15395#        endif
15396#      endif
15397#    endif
15398#  endif
15399#endif
15400
15401/* When -fvisibility=hidden is used, assume the code has been annotated
15402   correspondingly for the symbols needed.  */
15403#if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
15404int fnord () __attribute__((visibility("default")));
15405#endif
15406
15407int fnord () { return 42; }
15408int main ()
15409{
15410  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
15411  int status = $lt_dlunknown;
15412
15413  if (self)
15414    {
15415      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
15416      else
15417        {
15418	  if (dlsym( self,"_fnord"))  status = $lt_dlneed_uscore;
15419          else puts (dlerror ());
15420	}
15421      /* dlclose (self); */
15422    }
15423  else
15424    puts (dlerror ());
15425
15426  return status;
15427}
15428_LT_EOF
15429  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
15430  (eval $ac_link) 2>&5
15431  ac_status=$?
15432  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
15433  test $ac_status = 0; } && test -s "conftest$ac_exeext" 2>/dev/null; then
15434    (./conftest; exit; ) >&5 2>/dev/null
15435    lt_status=$?
15436    case x$lt_status in
15437      x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;;
15438      x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;;
15439      x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;;
15440    esac
15441  else :
15442    # compilation failed
15443    lt_cv_dlopen_self_static=no
15444  fi
15445fi
15446rm -fr conftest*
15447
15448
15449fi
15450{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self_static" >&5
15451printf "%s\n" "$lt_cv_dlopen_self_static" >&6; }
15452    fi
15453
15454    CPPFLAGS=$save_CPPFLAGS
15455    LDFLAGS=$save_LDFLAGS
15456    LIBS=$save_LIBS
15457    ;;
15458  esac
15459
15460  case $lt_cv_dlopen_self in
15461  yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
15462  *) enable_dlopen_self=unknown ;;
15463  esac
15464
15465  case $lt_cv_dlopen_self_static in
15466  yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
15467  *) enable_dlopen_self_static=unknown ;;
15468  esac
15469fi
15470
15471
15472
15473
15474
15475
15476
15477
15478
15479
15480
15481
15482
15483
15484
15485
15486
15487striplib=
15488old_striplib=
15489{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5
15490printf %s "checking whether stripping libraries is possible... " >&6; }
15491if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
15492  test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
15493  test -z "$striplib" && striplib="$STRIP --strip-unneeded"
15494  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15495printf "%s\n" "yes" >&6; }
15496else
15497# FIXME - insert some real tests, host_os isn't really good enough
15498  case $host_os in
15499  darwin*)
15500    if test -n "$STRIP"; then
15501      striplib="$STRIP -x"
15502      old_striplib="$STRIP -S"
15503      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15504printf "%s\n" "yes" >&6; }
15505    else
15506      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
15507printf "%s\n" "no" >&6; }
15508    fi
15509    ;;
15510  *)
15511    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
15512printf "%s\n" "no" >&6; }
15513    ;;
15514  esac
15515fi
15516
15517
15518
15519
15520
15521
15522
15523
15524
15525
15526
15527
15528  # Report what library types will actually be built
15529  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5
15530printf %s "checking if libtool supports shared libraries... " >&6; }
15531  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5
15532printf "%s\n" "$can_build_shared" >&6; }
15533
15534  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5
15535printf %s "checking whether to build shared libraries... " >&6; }
15536  test no = "$can_build_shared" && enable_shared=no
15537
15538  # On AIX, shared libraries and static libraries use the same namespace, and
15539  # are all built from PIC.
15540  case $host_os in
15541  aix3*)
15542    test yes = "$enable_shared" && enable_static=no
15543    if test -n "$RANLIB"; then
15544      archive_cmds="$archive_cmds~\$RANLIB \$lib"
15545      postinstall_cmds='$RANLIB $lib'
15546    fi
15547    ;;
15548
15549  aix[4-9]*)
15550    if test ia64 != "$host_cpu"; then
15551      case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in
15552      yes,aix,yes) ;;			# shared object as lib.so file only
15553      yes,svr4,*) ;;			# shared object as lib.so archive member only
15554      yes,*) enable_static=no ;;	# shared object in lib.a archive as well
15555      esac
15556    fi
15557    ;;
15558  esac
15559  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
15560printf "%s\n" "$enable_shared" >&6; }
15561
15562  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5
15563printf %s "checking whether to build static libraries... " >&6; }
15564  # Make sure either enable_shared or enable_static is yes.
15565  test yes = "$enable_shared" || enable_static=yes
15566  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5
15567printf "%s\n" "$enable_static" >&6; }
15568
15569
15570
15571
15572fi
15573ac_ext=c
15574ac_cpp='$CPP $CPPFLAGS'
15575ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15576ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15577ac_compiler_gnu=$ac_cv_c_compiler_gnu
15578
15579CC=$lt_save_CC
15580
15581
15582
15583
15584
15585
15586
15587
15588
15589
15590
15591
15592
15593
15594
15595        ac_config_commands="$ac_config_commands libtool"
15596
15597
15598
15599
15600# Only expand once:
15601
15602
15603
15604
15605# pkg-config is only needed for these options, do not require it otherwise
15606if test "$enable_systemd" = "yes" -o "$enable_dnstap" = "yes" -o "$with_pyunbound" = "yes" -o "$with_pythonmod" = "yes"; then
15607
15608
15609
15610
15611
15612
15613
15614if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
15615	if test -n "$ac_tool_prefix"; then
15616  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
15617set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
15618{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15619printf %s "checking for $ac_word... " >&6; }
15620if test ${ac_cv_path_PKG_CONFIG+y}
15621then :
15622  printf %s "(cached) " >&6
15623else $as_nop
15624  case $PKG_CONFIG in
15625  [\\/]* | ?:[\\/]*)
15626  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
15627  ;;
15628  *)
15629  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15630for as_dir in $PATH
15631do
15632  IFS=$as_save_IFS
15633  case $as_dir in #(((
15634    '') as_dir=./ ;;
15635    */) ;;
15636    *) as_dir=$as_dir/ ;;
15637  esac
15638    for ac_exec_ext in '' $ac_executable_extensions; do
15639  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
15640    ac_cv_path_PKG_CONFIG="$as_dir$ac_word$ac_exec_ext"
15641    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
15642    break 2
15643  fi
15644done
15645  done
15646IFS=$as_save_IFS
15647
15648  ;;
15649esac
15650fi
15651PKG_CONFIG=$ac_cv_path_PKG_CONFIG
15652if test -n "$PKG_CONFIG"; then
15653  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
15654printf "%s\n" "$PKG_CONFIG" >&6; }
15655else
15656  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
15657printf "%s\n" "no" >&6; }
15658fi
15659
15660
15661fi
15662if test -z "$ac_cv_path_PKG_CONFIG"; then
15663  ac_pt_PKG_CONFIG=$PKG_CONFIG
15664  # Extract the first word of "pkg-config", so it can be a program name with args.
15665set dummy pkg-config; ac_word=$2
15666{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15667printf %s "checking for $ac_word... " >&6; }
15668if test ${ac_cv_path_ac_pt_PKG_CONFIG+y}
15669then :
15670  printf %s "(cached) " >&6
15671else $as_nop
15672  case $ac_pt_PKG_CONFIG in
15673  [\\/]* | ?:[\\/]*)
15674  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
15675  ;;
15676  *)
15677  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15678for as_dir in $PATH
15679do
15680  IFS=$as_save_IFS
15681  case $as_dir in #(((
15682    '') as_dir=./ ;;
15683    */) ;;
15684    *) as_dir=$as_dir/ ;;
15685  esac
15686    for ac_exec_ext in '' $ac_executable_extensions; do
15687  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
15688    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir$ac_word$ac_exec_ext"
15689    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
15690    break 2
15691  fi
15692done
15693  done
15694IFS=$as_save_IFS
15695
15696  ;;
15697esac
15698fi
15699ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
15700if test -n "$ac_pt_PKG_CONFIG"; then
15701  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
15702printf "%s\n" "$ac_pt_PKG_CONFIG" >&6; }
15703else
15704  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
15705printf "%s\n" "no" >&6; }
15706fi
15707
15708  if test "x$ac_pt_PKG_CONFIG" = x; then
15709    PKG_CONFIG=""
15710  else
15711    case $cross_compiling:$ac_tool_warned in
15712yes:)
15713{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
15714printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
15715ac_tool_warned=yes ;;
15716esac
15717    PKG_CONFIG=$ac_pt_PKG_CONFIG
15718  fi
15719else
15720  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
15721fi
15722
15723fi
15724if test -n "$PKG_CONFIG"; then
15725	_pkg_min_version=0.9.0
15726	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
15727printf %s "checking pkg-config is at least version $_pkg_min_version... " >&6; }
15728	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
15729		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15730printf "%s\n" "yes" >&6; }
15731	else
15732		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
15733printf "%s\n" "no" >&6; }
15734		PKG_CONFIG=""
15735	fi
15736fi
15737fi
15738
15739# Checks for header files.
15740ac_fn_c_check_header_compile "$LINENO" "stdarg.h" "ac_cv_header_stdarg_h" "$ac_includes_default
15741"
15742if test "x$ac_cv_header_stdarg_h" = xyes
15743then :
15744  printf "%s\n" "#define HAVE_STDARG_H 1" >>confdefs.h
15745
15746fi
15747ac_fn_c_check_header_compile "$LINENO" "stdbool.h" "ac_cv_header_stdbool_h" "$ac_includes_default
15748"
15749if test "x$ac_cv_header_stdbool_h" = xyes
15750then :
15751  printf "%s\n" "#define HAVE_STDBOOL_H 1" >>confdefs.h
15752
15753fi
15754ac_fn_c_check_header_compile "$LINENO" "netinet/in.h" "ac_cv_header_netinet_in_h" "$ac_includes_default
15755"
15756if test "x$ac_cv_header_netinet_in_h" = xyes
15757then :
15758  printf "%s\n" "#define HAVE_NETINET_IN_H 1" >>confdefs.h
15759
15760fi
15761ac_fn_c_check_header_compile "$LINENO" "netinet/tcp.h" "ac_cv_header_netinet_tcp_h" "$ac_includes_default
15762"
15763if test "x$ac_cv_header_netinet_tcp_h" = xyes
15764then :
15765  printf "%s\n" "#define HAVE_NETINET_TCP_H 1" >>confdefs.h
15766
15767fi
15768ac_fn_c_check_header_compile "$LINENO" "sys/param.h" "ac_cv_header_sys_param_h" "$ac_includes_default
15769"
15770if test "x$ac_cv_header_sys_param_h" = xyes
15771then :
15772  printf "%s\n" "#define HAVE_SYS_PARAM_H 1" >>confdefs.h
15773
15774fi
15775ac_fn_c_check_header_compile "$LINENO" "sys/select.h" "ac_cv_header_sys_select_h" "$ac_includes_default
15776"
15777if test "x$ac_cv_header_sys_select_h" = xyes
15778then :
15779  printf "%s\n" "#define HAVE_SYS_SELECT_H 1" >>confdefs.h
15780
15781fi
15782ac_fn_c_check_header_compile "$LINENO" "sys/socket.h" "ac_cv_header_sys_socket_h" "$ac_includes_default
15783"
15784if test "x$ac_cv_header_sys_socket_h" = xyes
15785then :
15786  printf "%s\n" "#define HAVE_SYS_SOCKET_H 1" >>confdefs.h
15787
15788fi
15789ac_fn_c_check_header_compile "$LINENO" "sys/un.h" "ac_cv_header_sys_un_h" "$ac_includes_default
15790"
15791if test "x$ac_cv_header_sys_un_h" = xyes
15792then :
15793  printf "%s\n" "#define HAVE_SYS_UN_H 1" >>confdefs.h
15794
15795fi
15796ac_fn_c_check_header_compile "$LINENO" "sys/uio.h" "ac_cv_header_sys_uio_h" "$ac_includes_default
15797"
15798if test "x$ac_cv_header_sys_uio_h" = xyes
15799then :
15800  printf "%s\n" "#define HAVE_SYS_UIO_H 1" >>confdefs.h
15801
15802fi
15803ac_fn_c_check_header_compile "$LINENO" "sys/resource.h" "ac_cv_header_sys_resource_h" "$ac_includes_default
15804"
15805if test "x$ac_cv_header_sys_resource_h" = xyes
15806then :
15807  printf "%s\n" "#define HAVE_SYS_RESOURCE_H 1" >>confdefs.h
15808
15809fi
15810ac_fn_c_check_header_compile "$LINENO" "arpa/inet.h" "ac_cv_header_arpa_inet_h" "$ac_includes_default
15811"
15812if test "x$ac_cv_header_arpa_inet_h" = xyes
15813then :
15814  printf "%s\n" "#define HAVE_ARPA_INET_H 1" >>confdefs.h
15815
15816fi
15817ac_fn_c_check_header_compile "$LINENO" "syslog.h" "ac_cv_header_syslog_h" "$ac_includes_default
15818"
15819if test "x$ac_cv_header_syslog_h" = xyes
15820then :
15821  printf "%s\n" "#define HAVE_SYSLOG_H 1" >>confdefs.h
15822
15823fi
15824ac_fn_c_check_header_compile "$LINENO" "netdb.h" "ac_cv_header_netdb_h" "$ac_includes_default
15825"
15826if test "x$ac_cv_header_netdb_h" = xyes
15827then :
15828  printf "%s\n" "#define HAVE_NETDB_H 1" >>confdefs.h
15829
15830fi
15831ac_fn_c_check_header_compile "$LINENO" "sys/wait.h" "ac_cv_header_sys_wait_h" "$ac_includes_default
15832"
15833if test "x$ac_cv_header_sys_wait_h" = xyes
15834then :
15835  printf "%s\n" "#define HAVE_SYS_WAIT_H 1" >>confdefs.h
15836
15837fi
15838ac_fn_c_check_header_compile "$LINENO" "pwd.h" "ac_cv_header_pwd_h" "$ac_includes_default
15839"
15840if test "x$ac_cv_header_pwd_h" = xyes
15841then :
15842  printf "%s\n" "#define HAVE_PWD_H 1" >>confdefs.h
15843
15844fi
15845ac_fn_c_check_header_compile "$LINENO" "glob.h" "ac_cv_header_glob_h" "$ac_includes_default
15846"
15847if test "x$ac_cv_header_glob_h" = xyes
15848then :
15849  printf "%s\n" "#define HAVE_GLOB_H 1" >>confdefs.h
15850
15851fi
15852ac_fn_c_check_header_compile "$LINENO" "grp.h" "ac_cv_header_grp_h" "$ac_includes_default
15853"
15854if test "x$ac_cv_header_grp_h" = xyes
15855then :
15856  printf "%s\n" "#define HAVE_GRP_H 1" >>confdefs.h
15857
15858fi
15859ac_fn_c_check_header_compile "$LINENO" "login_cap.h" "ac_cv_header_login_cap_h" "$ac_includes_default
15860"
15861if test "x$ac_cv_header_login_cap_h" = xyes
15862then :
15863  printf "%s\n" "#define HAVE_LOGIN_CAP_H 1" >>confdefs.h
15864
15865fi
15866ac_fn_c_check_header_compile "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default
15867"
15868if test "x$ac_cv_header_winsock2_h" = xyes
15869then :
15870  printf "%s\n" "#define HAVE_WINSOCK2_H 1" >>confdefs.h
15871
15872fi
15873ac_fn_c_check_header_compile "$LINENO" "ws2tcpip.h" "ac_cv_header_ws2tcpip_h" "$ac_includes_default
15874"
15875if test "x$ac_cv_header_ws2tcpip_h" = xyes
15876then :
15877  printf "%s\n" "#define HAVE_WS2TCPIP_H 1" >>confdefs.h
15878
15879fi
15880ac_fn_c_check_header_compile "$LINENO" "endian.h" "ac_cv_header_endian_h" "$ac_includes_default
15881"
15882if test "x$ac_cv_header_endian_h" = xyes
15883then :
15884  printf "%s\n" "#define HAVE_ENDIAN_H 1" >>confdefs.h
15885
15886fi
15887ac_fn_c_check_header_compile "$LINENO" "sys/endian.h" "ac_cv_header_sys_endian_h" "$ac_includes_default
15888"
15889if test "x$ac_cv_header_sys_endian_h" = xyes
15890then :
15891  printf "%s\n" "#define HAVE_SYS_ENDIAN_H 1" >>confdefs.h
15892
15893fi
15894ac_fn_c_check_header_compile "$LINENO" "libkern/OSByteOrder.h" "ac_cv_header_libkern_OSByteOrder_h" "$ac_includes_default
15895"
15896if test "x$ac_cv_header_libkern_OSByteOrder_h" = xyes
15897then :
15898  printf "%s\n" "#define HAVE_LIBKERN_OSBYTEORDER_H 1" >>confdefs.h
15899
15900fi
15901ac_fn_c_check_header_compile "$LINENO" "sys/ipc.h" "ac_cv_header_sys_ipc_h" "$ac_includes_default
15902"
15903if test "x$ac_cv_header_sys_ipc_h" = xyes
15904then :
15905  printf "%s\n" "#define HAVE_SYS_IPC_H 1" >>confdefs.h
15906
15907fi
15908ac_fn_c_check_header_compile "$LINENO" "sys/shm.h" "ac_cv_header_sys_shm_h" "$ac_includes_default
15909"
15910if test "x$ac_cv_header_sys_shm_h" = xyes
15911then :
15912  printf "%s\n" "#define HAVE_SYS_SHM_H 1" >>confdefs.h
15913
15914fi
15915ac_fn_c_check_header_compile "$LINENO" "ifaddrs.h" "ac_cv_header_ifaddrs_h" "$ac_includes_default
15916"
15917if test "x$ac_cv_header_ifaddrs_h" = xyes
15918then :
15919  printf "%s\n" "#define HAVE_IFADDRS_H 1" >>confdefs.h
15920
15921fi
15922ac_fn_c_check_header_compile "$LINENO" "poll.h" "ac_cv_header_poll_h" "$ac_includes_default
15923"
15924if test "x$ac_cv_header_poll_h" = xyes
15925then :
15926  printf "%s\n" "#define HAVE_POLL_H 1" >>confdefs.h
15927
15928fi
15929
15930# net/if.h portability for Darwin see:
15931# https://www.gnu.org/software/autoconf/manual/autoconf-2.69/html_node/Header-Portability.html
15932ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "
15933#include <stdio.h>
15934#ifdef STDC_HEADERS
15935# include <stdlib.h>
15936# include <stddef.h>
15937#else
15938# ifdef HAVE_STDLIB_H
15939#  include <stdlib.h>
15940# endif
15941#endif
15942#ifdef HAVE_SYS_SOCKET_H
15943# include <sys/socket.h>
15944#endif
15945
15946"
15947if test "x$ac_cv_header_net_if_h" = xyes
15948then :
15949  printf "%s\n" "#define HAVE_NET_IF_H 1" >>confdefs.h
15950
15951fi
15952
15953
15954# Check for Apple header. This uncovers TARGET_OS_IPHONE, TARGET_OS_TV or TARGET_OS_WATCH
15955ac_fn_c_check_header_compile "$LINENO" "TargetConditionals.h" "ac_cv_header_TargetConditionals_h" "$ac_includes_default
15956"
15957if test "x$ac_cv_header_TargetConditionals_h" = xyes
15958then :
15959  printf "%s\n" "#define HAVE_TARGETCONDITIONALS_H 1" >>confdefs.h
15960
15961fi
15962
15963ac_fn_c_check_header_compile "$LINENO" "netioapi.h" "ac_cv_header_netioapi_h" "$ac_includes_default
15964#if HAVE_SYS_PARAM_H
15965#include <sys/param.h>
15966#endif
15967
15968#ifdef HAVE_SYS_SOCKET_H
15969#include <sys/socket.h>
15970#endif
15971
15972#ifdef HAVE_SYS_UIO_H
15973#include <sys/uio.h>
15974#endif
15975
15976#ifdef HAVE_NETINET_IN_H
15977#include <netinet/in.h>
15978#endif
15979
15980#ifdef HAVE_NETINET_TCP_H
15981#include <netinet/tcp.h>
15982#endif
15983
15984#ifdef HAVE_ARPA_INET_H
15985#include <arpa/inet.h>
15986#endif
15987
15988#ifdef HAVE_WINSOCK2_H
15989#include <winsock2.h>
15990#endif
15991
15992#ifdef HAVE_WS2TCPIP_H
15993#include <ws2tcpip.h>
15994#endif
15995
15996"
15997if test "x$ac_cv_header_netioapi_h" = xyes
15998then :
15999  printf "%s\n" "#define HAVE_NETIOAPI_H 1" >>confdefs.h
16000
16001fi
16002
16003
16004# Check for Linux timestamping headers
16005ac_fn_c_check_header_compile "$LINENO" "linux/net_tstamp.h" "ac_cv_header_linux_net_tstamp_h" "$ac_includes_default
16006"
16007if test "x$ac_cv_header_linux_net_tstamp_h" = xyes
16008then :
16009  printf "%s\n" "#define HAVE_LINUX_NET_TSTAMP_H 1" >>confdefs.h
16010
16011fi
16012
16013
16014# check for types.
16015# Using own tests for int64* because autoconf builtin only give 32bit.
16016ac_fn_c_check_type "$LINENO" "int8_t" "ac_cv_type_int8_t" "$ac_includes_default"
16017if test "x$ac_cv_type_int8_t" = xyes
16018then :
16019
16020else $as_nop
16021
16022printf "%s\n" "#define int8_t signed char" >>confdefs.h
16023
16024fi
16025
16026ac_fn_c_check_type "$LINENO" "int16_t" "ac_cv_type_int16_t" "$ac_includes_default"
16027if test "x$ac_cv_type_int16_t" = xyes
16028then :
16029
16030else $as_nop
16031
16032printf "%s\n" "#define int16_t short" >>confdefs.h
16033
16034fi
16035
16036ac_fn_c_check_type "$LINENO" "int32_t" "ac_cv_type_int32_t" "$ac_includes_default"
16037if test "x$ac_cv_type_int32_t" = xyes
16038then :
16039
16040else $as_nop
16041
16042printf "%s\n" "#define int32_t int" >>confdefs.h
16043
16044fi
16045
16046ac_fn_c_check_type "$LINENO" "int64_t" "ac_cv_type_int64_t" "$ac_includes_default"
16047if test "x$ac_cv_type_int64_t" = xyes
16048then :
16049
16050else $as_nop
16051
16052printf "%s\n" "#define int64_t long long" >>confdefs.h
16053
16054fi
16055
16056ac_fn_c_check_type "$LINENO" "uint8_t" "ac_cv_type_uint8_t" "$ac_includes_default"
16057if test "x$ac_cv_type_uint8_t" = xyes
16058then :
16059
16060else $as_nop
16061
16062printf "%s\n" "#define uint8_t unsigned char" >>confdefs.h
16063
16064fi
16065
16066ac_fn_c_check_type "$LINENO" "uint16_t" "ac_cv_type_uint16_t" "$ac_includes_default"
16067if test "x$ac_cv_type_uint16_t" = xyes
16068then :
16069
16070else $as_nop
16071
16072printf "%s\n" "#define uint16_t unsigned short" >>confdefs.h
16073
16074fi
16075
16076ac_fn_c_check_type "$LINENO" "uint32_t" "ac_cv_type_uint32_t" "$ac_includes_default"
16077if test "x$ac_cv_type_uint32_t" = xyes
16078then :
16079
16080else $as_nop
16081
16082printf "%s\n" "#define uint32_t unsigned int" >>confdefs.h
16083
16084fi
16085
16086ac_fn_c_check_type "$LINENO" "uint64_t" "ac_cv_type_uint64_t" "$ac_includes_default"
16087if test "x$ac_cv_type_uint64_t" = xyes
16088then :
16089
16090else $as_nop
16091
16092printf "%s\n" "#define uint64_t unsigned long long" >>confdefs.h
16093
16094fi
16095
16096ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
16097if test "x$ac_cv_type_size_t" = xyes
16098then :
16099
16100else $as_nop
16101
16102printf "%s\n" "#define size_t unsigned int" >>confdefs.h
16103
16104fi
16105
16106ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
16107if test "x$ac_cv_type_ssize_t" = xyes
16108then :
16109
16110else $as_nop
16111
16112printf "%s\n" "#define ssize_t int" >>confdefs.h
16113
16114fi
16115
16116ac_ext=c
16117ac_cpp='$CPP $CPPFLAGS'
16118ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16119ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16120ac_compiler_gnu=$ac_cv_c_compiler_gnu
16121{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
16122printf %s "checking how to run the C preprocessor... " >&6; }
16123# On Suns, sometimes $CPP names a directory.
16124if test -n "$CPP" && test -d "$CPP"; then
16125  CPP=
16126fi
16127if test -z "$CPP"; then
16128  if test ${ac_cv_prog_CPP+y}
16129then :
16130  printf %s "(cached) " >&6
16131else $as_nop
16132      # Double quotes because $CC needs to be expanded
16133    for CPP in "$CC -E" "$CC -E -traditional-cpp" cpp /lib/cpp
16134    do
16135      ac_preproc_ok=false
16136for ac_c_preproc_warn_flag in '' yes
16137do
16138  # Use a header file that comes with gcc, so configuring glibc
16139  # with a fresh cross-compiler works.
16140  # On the NeXT, cc -E runs the code through the compiler's parser,
16141  # not just through cpp. "Syntax error" is here to catch this case.
16142  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16143/* end confdefs.h.  */
16144#include <limits.h>
16145		     Syntax error
16146_ACEOF
16147if ac_fn_c_try_cpp "$LINENO"
16148then :
16149
16150else $as_nop
16151  # Broken: fails on valid input.
16152continue
16153fi
16154rm -f conftest.err conftest.i conftest.$ac_ext
16155
16156  # OK, works on sane cases.  Now check whether nonexistent headers
16157  # can be detected and how.
16158  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16159/* end confdefs.h.  */
16160#include <ac_nonexistent.h>
16161_ACEOF
16162if ac_fn_c_try_cpp "$LINENO"
16163then :
16164  # Broken: success on invalid input.
16165continue
16166else $as_nop
16167  # Passes both tests.
16168ac_preproc_ok=:
16169break
16170fi
16171rm -f conftest.err conftest.i conftest.$ac_ext
16172
16173done
16174# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
16175rm -f conftest.i conftest.err conftest.$ac_ext
16176if $ac_preproc_ok
16177then :
16178  break
16179fi
16180
16181    done
16182    ac_cv_prog_CPP=$CPP
16183
16184fi
16185  CPP=$ac_cv_prog_CPP
16186else
16187  ac_cv_prog_CPP=$CPP
16188fi
16189{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
16190printf "%s\n" "$CPP" >&6; }
16191ac_preproc_ok=false
16192for ac_c_preproc_warn_flag in '' yes
16193do
16194  # Use a header file that comes with gcc, so configuring glibc
16195  # with a fresh cross-compiler works.
16196  # On the NeXT, cc -E runs the code through the compiler's parser,
16197  # not just through cpp. "Syntax error" is here to catch this case.
16198  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16199/* end confdefs.h.  */
16200#include <limits.h>
16201		     Syntax error
16202_ACEOF
16203if ac_fn_c_try_cpp "$LINENO"
16204then :
16205
16206else $as_nop
16207  # Broken: fails on valid input.
16208continue
16209fi
16210rm -f conftest.err conftest.i conftest.$ac_ext
16211
16212  # OK, works on sane cases.  Now check whether nonexistent headers
16213  # can be detected and how.
16214  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16215/* end confdefs.h.  */
16216#include <ac_nonexistent.h>
16217_ACEOF
16218if ac_fn_c_try_cpp "$LINENO"
16219then :
16220  # Broken: success on invalid input.
16221continue
16222else $as_nop
16223  # Passes both tests.
16224ac_preproc_ok=:
16225break
16226fi
16227rm -f conftest.err conftest.i conftest.$ac_ext
16228
16229done
16230# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
16231rm -f conftest.i conftest.err conftest.$ac_ext
16232if $ac_preproc_ok
16233then :
16234
16235else $as_nop
16236  { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
16237printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
16238as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
16239See \`config.log' for more details" "$LINENO" 5; }
16240fi
16241
16242ac_ext=c
16243ac_cpp='$CPP $CPPFLAGS'
16244ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16245ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16246ac_compiler_gnu=$ac_cv_c_compiler_gnu
16247
16248
16249{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
16250printf %s "checking for uid_t in sys/types.h... " >&6; }
16251if test ${ac_cv_type_uid_t+y}
16252then :
16253  printf %s "(cached) " >&6
16254else $as_nop
16255  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16256/* end confdefs.h.  */
16257#include <sys/types.h>
16258
16259_ACEOF
16260if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16261  $EGREP "uid_t" >/dev/null 2>&1
16262then :
16263  ac_cv_type_uid_t=yes
16264else $as_nop
16265  ac_cv_type_uid_t=no
16266fi
16267rm -rf conftest*
16268
16269fi
16270{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
16271printf "%s\n" "$ac_cv_type_uid_t" >&6; }
16272if test $ac_cv_type_uid_t = no; then
16273
16274printf "%s\n" "#define uid_t int" >>confdefs.h
16275
16276
16277printf "%s\n" "#define gid_t int" >>confdefs.h
16278
16279fi
16280
16281
16282  ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default
16283"
16284if test "x$ac_cv_type_pid_t" = xyes
16285then :
16286
16287else $as_nop
16288                                          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16289/* end confdefs.h.  */
16290
16291          #if defined _WIN64 && !defined __CYGWIN__
16292          LLP64
16293          #endif
16294
16295int
16296main (void)
16297{
16298
16299  ;
16300  return 0;
16301}
16302
16303_ACEOF
16304if ac_fn_c_try_compile "$LINENO"
16305then :
16306  ac_pid_type='int'
16307else $as_nop
16308  ac_pid_type='__int64'
16309fi
16310rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
16311
16312printf "%s\n" "#define pid_t $ac_pid_type" >>confdefs.h
16313
16314
16315fi
16316
16317
16318ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
16319if test "x$ac_cv_type_off_t" = xyes
16320then :
16321
16322else $as_nop
16323
16324printf "%s\n" "#define off_t long int" >>confdefs.h
16325
16326fi
16327
16328ac_fn_c_check_type "$LINENO" "u_char" "ac_cv_type_u_char" "
16329$ac_includes_default
16330#ifdef HAVE_WINSOCK2_H
16331#  include <winsock2.h>
16332#endif
16333
16334"
16335if test "x$ac_cv_type_u_char" = xyes
16336then :
16337
16338else $as_nop
16339
16340printf "%s\n" "#define u_char unsigned char" >>confdefs.h
16341
16342fi
16343
16344ac_fn_c_check_type "$LINENO" "rlim_t" "ac_cv_type_rlim_t" "
16345$ac_includes_default
16346#ifdef HAVE_SYS_RESOURCE_H
16347#  include <sys/resource.h>
16348#endif
16349
16350"
16351if test "x$ac_cv_type_rlim_t" = xyes
16352then :
16353
16354else $as_nop
16355
16356printf "%s\n" "#define rlim_t unsigned long" >>confdefs.h
16357
16358fi
16359
16360
16361ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
16362$ac_includes_default
16363#ifdef HAVE_SYS_SOCKET_H
16364#  include <sys/socket.h>
16365#endif
16366#ifdef HAVE_WS2TCPIP_H
16367#  include <ws2tcpip.h>
16368#endif
16369
16370"
16371if test "x$ac_cv_type_socklen_t" = xyes
16372then :
16373
16374else $as_nop
16375
16376printf "%s\n" "#define socklen_t int" >>confdefs.h
16377
16378fi
16379
16380 ac_fn_c_check_type "$LINENO" "in_addr_t" "ac_cv_type_in_addr_t" "
16381$ac_includes_default
16382#ifdef HAVE_SYS_TYPES_H
16383# include <sys/types.h>
16384#endif
16385#ifdef HAVE_NETINET_IN_H
16386# include <netinet/in.h>
16387#endif
16388
16389"
16390if test "x$ac_cv_type_in_addr_t" = xyes
16391then :
16392
16393else $as_nop
16394
16395printf "%s\n" "#define in_addr_t uint32_t" >>confdefs.h
16396
16397fi
16398
16399 ac_fn_c_check_type "$LINENO" "in_port_t" "ac_cv_type_in_port_t" "
16400$ac_includes_default
16401#ifdef HAVE_SYS_TYPES_H
16402# include <sys/types.h>
16403#endif
16404#ifdef HAVE_NETINET_IN_H
16405# include <netinet/in.h>
16406#endif
16407
16408"
16409if test "x$ac_cv_type_in_port_t" = xyes
16410then :
16411
16412else $as_nop
16413
16414printf "%s\n" "#define in_port_t uint16_t" >>confdefs.h
16415
16416fi
16417
16418{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if memcmp compares unsigned" >&5
16419printf %s "checking if memcmp compares unsigned... " >&6; }
16420if test "$cross_compiling" = yes
16421then :
16422   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: cross-compile no" >&5
16423printf "%s\n" "cross-compile no" >&6; }
16424
16425printf "%s\n" "#define MEMCMP_IS_BROKEN 1" >>confdefs.h
16426
16427  case " $LIBOBJS " in
16428  *" memcmp.$ac_objext "* ) ;;
16429  *) LIBOBJS="$LIBOBJS memcmp.$ac_objext"
16430 ;;
16431esac
16432
16433
16434else $as_nop
16435  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16436/* end confdefs.h.  */
16437
16438#include <stdio.h>
16439#include <stdlib.h>
16440#include <string.h>
16441int main(void)
16442{
16443	char a = 255, b = 0;
16444	if(memcmp(&a, &b, 1) < 0)
16445		return 1;
16446	return 0;
16447}
16448
16449_ACEOF
16450if ac_fn_c_try_run "$LINENO"
16451then :
16452  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16453printf "%s\n" "yes" >&6; }
16454else $as_nop
16455   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
16456printf "%s\n" "no" >&6; }
16457
16458printf "%s\n" "#define MEMCMP_IS_BROKEN 1" >>confdefs.h
16459
16460  case " $LIBOBJS " in
16461  *" memcmp.$ac_objext "* ) ;;
16462  *) LIBOBJS="$LIBOBJS memcmp.$ac_objext"
16463 ;;
16464esac
16465
16466
16467fi
16468rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16469  conftest.$ac_objext conftest.beam conftest.$ac_ext
16470fi
16471
16472
16473# The cast to long int works around a bug in the HP C Compiler
16474# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
16475# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
16476# This bug is HP SR number 8606223364.
16477{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
16478printf %s "checking size of time_t... " >&6; }
16479if test ${ac_cv_sizeof_time_t+y}
16480then :
16481  printf %s "(cached) " >&6
16482else $as_nop
16483  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t"        "
16484$ac_includes_default
16485#ifdef TIME_WITH_SYS_TIME
16486# include <sys/time.h>
16487# include <time.h>
16488#else
16489# ifdef HAVE_SYS_TIME_H
16490#  include <sys/time.h>
16491# else
16492#  include <time.h>
16493# endif
16494#endif
16495
16496"
16497then :
16498
16499else $as_nop
16500  if test "$ac_cv_type_time_t" = yes; then
16501     { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
16502printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
16503as_fn_error 77 "cannot compute sizeof (time_t)
16504See \`config.log' for more details" "$LINENO" 5; }
16505   else
16506     ac_cv_sizeof_time_t=0
16507   fi
16508fi
16509
16510fi
16511{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
16512printf "%s\n" "$ac_cv_sizeof_time_t" >&6; }
16513
16514
16515
16516printf "%s\n" "#define SIZEOF_TIME_T $ac_cv_sizeof_time_t" >>confdefs.h
16517
16518
16519# The cast to long int works around a bug in the HP C Compiler
16520# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
16521# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
16522# This bug is HP SR number 8606223364.
16523{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
16524printf %s "checking size of size_t... " >&6; }
16525if test ${ac_cv_sizeof_size_t+y}
16526then :
16527  printf %s "(cached) " >&6
16528else $as_nop
16529  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (size_t))" "ac_cv_sizeof_size_t"        "$ac_includes_default"
16530then :
16531
16532else $as_nop
16533  if test "$ac_cv_type_size_t" = yes; then
16534     { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
16535printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
16536as_fn_error 77 "cannot compute sizeof (size_t)
16537See \`config.log' for more details" "$LINENO" 5; }
16538   else
16539     ac_cv_sizeof_size_t=0
16540   fi
16541fi
16542
16543fi
16544{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
16545printf "%s\n" "$ac_cv_sizeof_size_t" >&6; }
16546
16547
16548
16549printf "%s\n" "#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t" >>confdefs.h
16550
16551
16552
16553# add option to disable the evil rpath
16554
16555# Check whether --enable-rpath was given.
16556if test ${enable_rpath+y}
16557then :
16558  enableval=$enable_rpath; enable_rpath=$enableval
16559else $as_nop
16560  enable_rpath=yes
16561fi
16562
16563if test "x$enable_rpath" = xno; then
16564		ac_config_commands="$ac_config_commands disable-rpath"
16565
16566fi
16567
16568
16569
16570# check to see if libraries are needed for these functions.
16571{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing inet_pton" >&5
16572printf %s "checking for library containing inet_pton... " >&6; }
16573if test ${ac_cv_search_inet_pton+y}
16574then :
16575  printf %s "(cached) " >&6
16576else $as_nop
16577  ac_func_search_save_LIBS=$LIBS
16578cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16579/* end confdefs.h.  */
16580
16581/* Override any GCC internal prototype to avoid an error.
16582   Use char because int might match the return type of a GCC
16583   builtin and then its argument prototype would still apply.  */
16584char inet_pton ();
16585int
16586main (void)
16587{
16588return inet_pton ();
16589  ;
16590  return 0;
16591}
16592_ACEOF
16593for ac_lib in '' nsl
16594do
16595  if test -z "$ac_lib"; then
16596    ac_res="none required"
16597  else
16598    ac_res=-l$ac_lib
16599    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
16600  fi
16601  if ac_fn_c_try_link "$LINENO"
16602then :
16603  ac_cv_search_inet_pton=$ac_res
16604fi
16605rm -f core conftest.err conftest.$ac_objext conftest.beam \
16606    conftest$ac_exeext
16607  if test ${ac_cv_search_inet_pton+y}
16608then :
16609  break
16610fi
16611done
16612if test ${ac_cv_search_inet_pton+y}
16613then :
16614
16615else $as_nop
16616  ac_cv_search_inet_pton=no
16617fi
16618rm conftest.$ac_ext
16619LIBS=$ac_func_search_save_LIBS
16620fi
16621{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_inet_pton" >&5
16622printf "%s\n" "$ac_cv_search_inet_pton" >&6; }
16623ac_res=$ac_cv_search_inet_pton
16624if test "$ac_res" != no
16625then :
16626  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
16627
16628fi
16629
16630{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing socket" >&5
16631printf %s "checking for library containing socket... " >&6; }
16632if test ${ac_cv_search_socket+y}
16633then :
16634  printf %s "(cached) " >&6
16635else $as_nop
16636  ac_func_search_save_LIBS=$LIBS
16637cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16638/* end confdefs.h.  */
16639
16640/* Override any GCC internal prototype to avoid an error.
16641   Use char because int might match the return type of a GCC
16642   builtin and then its argument prototype would still apply.  */
16643char socket ();
16644int
16645main (void)
16646{
16647return socket ();
16648  ;
16649  return 0;
16650}
16651_ACEOF
16652for ac_lib in '' socket
16653do
16654  if test -z "$ac_lib"; then
16655    ac_res="none required"
16656  else
16657    ac_res=-l$ac_lib
16658    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
16659  fi
16660  if ac_fn_c_try_link "$LINENO"
16661then :
16662  ac_cv_search_socket=$ac_res
16663fi
16664rm -f core conftest.err conftest.$ac_objext conftest.beam \
16665    conftest$ac_exeext
16666  if test ${ac_cv_search_socket+y}
16667then :
16668  break
16669fi
16670done
16671if test ${ac_cv_search_socket+y}
16672then :
16673
16674else $as_nop
16675  ac_cv_search_socket=no
16676fi
16677rm conftest.$ac_ext
16678LIBS=$ac_func_search_save_LIBS
16679fi
16680{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socket" >&5
16681printf "%s\n" "$ac_cv_search_socket" >&6; }
16682ac_res=$ac_cv_search_socket
16683if test "$ac_res" != no
16684then :
16685  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
16686
16687fi
16688
16689
16690# check whether strptime also works
16691
16692# check some functions of the OS before linking libs (while still runnable).
16693{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working chown" >&5
16694printf %s "checking for working chown... " >&6; }
16695if test ${ac_cv_func_chown_works+y}
16696then :
16697  printf %s "(cached) " >&6
16698else $as_nop
16699  if test "$cross_compiling" = yes
16700then :
16701  case "$host_os" in # ((
16702			  # Guess yes on glibc systems.
16703		  *-gnu*) ac_cv_func_chown_works=yes ;;
16704			  # If we don't know, assume the worst.
16705		  *)      ac_cv_func_chown_works=no ;;
16706		esac
16707else $as_nop
16708  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16709/* end confdefs.h.  */
16710$ac_includes_default
16711#include <fcntl.h>
16712
16713int
16714main (void)
16715{
16716  char *f = "conftest.chown";
16717  struct stat before, after;
16718
16719  if (creat (f, 0600) < 0)
16720    return 1;
16721  if (stat (f, &before) < 0)
16722    return 1;
16723  if (chown (f, (uid_t) -1, (gid_t) -1) == -1)
16724    return 1;
16725  if (stat (f, &after) < 0)
16726    return 1;
16727  return ! (before.st_uid == after.st_uid && before.st_gid == after.st_gid);
16728
16729  ;
16730  return 0;
16731}
16732_ACEOF
16733if ac_fn_c_try_run "$LINENO"
16734then :
16735  ac_cv_func_chown_works=yes
16736else $as_nop
16737  ac_cv_func_chown_works=no
16738fi
16739rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16740  conftest.$ac_objext conftest.beam conftest.$ac_ext
16741fi
16742
16743rm -f conftest.chown
16744
16745fi
16746{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_chown_works" >&5
16747printf "%s\n" "$ac_cv_func_chown_works" >&6; }
16748if test $ac_cv_func_chown_works = yes; then
16749
16750printf "%s\n" "#define HAVE_CHOWN 1" >>confdefs.h
16751
16752fi
16753
16754
16755ac_func=
16756for ac_item in $ac_func_c_list
16757do
16758  if test $ac_func; then
16759    ac_fn_c_check_func "$LINENO" $ac_func ac_cv_func_$ac_func
16760    if eval test \"x\$ac_cv_func_$ac_func\" = xyes; then
16761      echo "#define $ac_item 1" >> confdefs.h
16762    fi
16763    ac_func=
16764  else
16765    ac_func=$ac_item
16766  fi
16767done
16768
16769
16770
16771if test "x$ac_cv_func_fork" = xyes; then
16772  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5
16773printf %s "checking for working fork... " >&6; }
16774if test ${ac_cv_func_fork_works+y}
16775then :
16776  printf %s "(cached) " >&6
16777else $as_nop
16778  if test "$cross_compiling" = yes
16779then :
16780  ac_cv_func_fork_works=cross
16781else $as_nop
16782  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16783/* end confdefs.h.  */
16784$ac_includes_default
16785int
16786main (void)
16787{
16788
16789	  /* By Ruediger Kuhlmann. */
16790	  return fork () < 0;
16791
16792  ;
16793  return 0;
16794}
16795_ACEOF
16796if ac_fn_c_try_run "$LINENO"
16797then :
16798  ac_cv_func_fork_works=yes
16799else $as_nop
16800  ac_cv_func_fork_works=no
16801fi
16802rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16803  conftest.$ac_objext conftest.beam conftest.$ac_ext
16804fi
16805
16806fi
16807{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5
16808printf "%s\n" "$ac_cv_func_fork_works" >&6; }
16809
16810else
16811  ac_cv_func_fork_works=$ac_cv_func_fork
16812fi
16813if test "x$ac_cv_func_fork_works" = xcross; then
16814  case $host in
16815    *-*-amigaos* | *-*-msdosdjgpp*)
16816      # Override, as these systems have only a dummy fork() stub
16817      ac_cv_func_fork_works=no
16818      ;;
16819    *)
16820      ac_cv_func_fork_works=yes
16821      ;;
16822  esac
16823  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
16824printf "%s\n" "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
16825fi
16826ac_cv_func_vfork_works=$ac_cv_func_vfork
16827if test "x$ac_cv_func_vfork" = xyes; then
16828  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5
16829printf %s "checking for working vfork... " >&6; }
16830if test ${ac_cv_func_vfork_works+y}
16831then :
16832  printf %s "(cached) " >&6
16833else $as_nop
16834  if test "$cross_compiling" = yes
16835then :
16836  ac_cv_func_vfork_works=cross
16837else $as_nop
16838  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16839/* end confdefs.h.  */
16840/* Thanks to Paul Eggert for this test.  */
16841$ac_includes_default
16842#include <signal.h>
16843#include <sys/wait.h>
16844#ifdef HAVE_VFORK_H
16845# include <vfork.h>
16846#endif
16847
16848static void
16849do_nothing (int sig)
16850{
16851  (void) sig;
16852}
16853
16854/* On some sparc systems, changes by the child to local and incoming
16855   argument registers are propagated back to the parent.  The compiler
16856   is told about this with #include <vfork.h>, but some compilers
16857   (e.g. gcc -O) don't grok <vfork.h>.  Test for this by using a
16858   static variable whose address is put into a register that is
16859   clobbered by the vfork.  */
16860static void
16861sparc_address_test (int arg)
16862{
16863  static pid_t child;
16864  if (!child) {
16865    child = vfork ();
16866    if (child < 0) {
16867      perror ("vfork");
16868      _exit(2);
16869    }
16870    if (!child) {
16871      arg = getpid();
16872      write(-1, "", 0);
16873      _exit (arg);
16874    }
16875  }
16876}
16877
16878int
16879main (void)
16880{
16881  pid_t parent = getpid ();
16882  pid_t child;
16883
16884  sparc_address_test (0);
16885
16886  /* On Solaris 2.4, changes by the child to the signal handler
16887     also munge signal handlers in the parent.  To detect this,
16888     start by putting the parent's handler in a known state.  */
16889  signal (SIGTERM, SIG_DFL);
16890
16891  child = vfork ();
16892
16893  if (child == 0) {
16894    /* Here is another test for sparc vfork register problems.  This
16895       test uses lots of local variables, at least as many local
16896       variables as main has allocated so far including compiler
16897       temporaries.  4 locals are enough for gcc 1.40.3 on a Solaris
16898       4.1.3 sparc, but we use 8 to be safe.  A buggy compiler should
16899       reuse the register of parent for one of the local variables,
16900       since it will think that parent can't possibly be used any more
16901       in this routine.  Assigning to the local variable will thus
16902       munge parent in the parent process.  */
16903    pid_t
16904      p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
16905      p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
16906    /* Convince the compiler that p..p7 are live; otherwise, it might
16907       use the same hardware register for all 8 local variables.  */
16908    if (p != p1 || p != p2 || p != p3 || p != p4
16909	|| p != p5 || p != p6 || p != p7)
16910      _exit(1);
16911
16912    /* Alter the child's signal handler.  */
16913    if (signal (SIGTERM, do_nothing) != SIG_DFL)
16914      _exit(1);
16915
16916    /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
16917       from child file descriptors.  If the child closes a descriptor
16918       before it execs or exits, this munges the parent's descriptor
16919       as well.  Test for this by closing stdout in the child.  */
16920    _exit(close(fileno(stdout)) != 0);
16921  } else {
16922    int status;
16923    struct stat st;
16924
16925    while (wait(&status) != child)
16926      ;
16927    return (
16928	 /* Was there some problem with vforking?  */
16929	 child < 0
16930
16931	 /* Did the child munge the parent's signal handler?  */
16932	 || signal (SIGTERM, SIG_DFL) != SIG_DFL
16933
16934	 /* Did the child fail?  (This shouldn't happen.)  */
16935	 || status
16936
16937	 /* Did the vfork/compiler bug occur?  */
16938	 || parent != getpid()
16939
16940	 /* Did the file descriptor bug occur?  */
16941	 || fstat(fileno(stdout), &st) != 0
16942	 );
16943  }
16944}
16945_ACEOF
16946if ac_fn_c_try_run "$LINENO"
16947then :
16948  ac_cv_func_vfork_works=yes
16949else $as_nop
16950  ac_cv_func_vfork_works=no
16951fi
16952rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16953  conftest.$ac_objext conftest.beam conftest.$ac_ext
16954fi
16955
16956fi
16957{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5
16958printf "%s\n" "$ac_cv_func_vfork_works" >&6; }
16959
16960fi;
16961if test "x$ac_cv_func_fork_works" = xcross; then
16962  ac_cv_func_vfork_works=$ac_cv_func_vfork
16963  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
16964printf "%s\n" "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
16965fi
16966
16967if test "x$ac_cv_func_vfork_works" = xyes; then
16968
16969printf "%s\n" "#define HAVE_WORKING_VFORK 1" >>confdefs.h
16970
16971else
16972
16973printf "%s\n" "#define vfork fork" >>confdefs.h
16974
16975fi
16976if test "x$ac_cv_func_fork_works" = xyes; then
16977
16978printf "%s\n" "#define HAVE_WORKING_FORK 1" >>confdefs.h
16979
16980fi
16981
16982
16983printf "%s\n" "#define RETSIGTYPE void" >>confdefs.h
16984
16985{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for _LARGEFILE_SOURCE value needed for large files" >&5
16986printf %s "checking for _LARGEFILE_SOURCE value needed for large files... " >&6; }
16987if test ${ac_cv_sys_largefile_source+y}
16988then :
16989  printf %s "(cached) " >&6
16990else $as_nop
16991  while :; do
16992  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16993/* end confdefs.h.  */
16994#include <sys/types.h> /* for off_t */
16995     #include <stdio.h>
16996int
16997main (void)
16998{
16999int (*fp) (FILE *, off_t, int) = fseeko;
17000     return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
17001  ;
17002  return 0;
17003}
17004_ACEOF
17005if ac_fn_c_try_link "$LINENO"
17006then :
17007  ac_cv_sys_largefile_source=no; break
17008fi
17009rm -f core conftest.err conftest.$ac_objext conftest.beam \
17010    conftest$ac_exeext conftest.$ac_ext
17011  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17012/* end confdefs.h.  */
17013#define _LARGEFILE_SOURCE 1
17014#include <sys/types.h> /* for off_t */
17015     #include <stdio.h>
17016int
17017main (void)
17018{
17019int (*fp) (FILE *, off_t, int) = fseeko;
17020     return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
17021  ;
17022  return 0;
17023}
17024_ACEOF
17025if ac_fn_c_try_link "$LINENO"
17026then :
17027  ac_cv_sys_largefile_source=1; break
17028fi
17029rm -f core conftest.err conftest.$ac_objext conftest.beam \
17030    conftest$ac_exeext conftest.$ac_ext
17031  ac_cv_sys_largefile_source=unknown
17032  break
17033done
17034fi
17035{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_source" >&5
17036printf "%s\n" "$ac_cv_sys_largefile_source" >&6; }
17037case $ac_cv_sys_largefile_source in #(
17038  no | unknown) ;;
17039  *)
17040printf "%s\n" "#define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source" >>confdefs.h
17041;;
17042esac
17043rm -rf conftest*
17044
17045# We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
17046# in glibc 2.1.3, but that breaks too many other things.
17047# If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
17048if test $ac_cv_sys_largefile_source != unknown; then
17049
17050printf "%s\n" "#define HAVE_FSEEKO 1" >>confdefs.h
17051
17052fi
17053
17054
17055# Check whether --enable-largefile was given.
17056if test ${enable_largefile+y}
17057then :
17058  enableval=$enable_largefile;
17059fi
17060
17061if test "$enable_largefile" != no; then
17062
17063  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
17064printf %s "checking for special C compiler options needed for large files... " >&6; }
17065if test ${ac_cv_sys_largefile_CC+y}
17066then :
17067  printf %s "(cached) " >&6
17068else $as_nop
17069  ac_cv_sys_largefile_CC=no
17070     if test "$GCC" != yes; then
17071       ac_save_CC=$CC
17072       while :; do
17073	 # IRIX 6.2 and later do not support large files by default,
17074	 # so use the C compiler's -n32 option if that helps.
17075	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17076/* end confdefs.h.  */
17077#include <sys/types.h>
17078 /* Check that off_t can represent 2**63 - 1 correctly.
17079    We can't simply define LARGE_OFF_T to be 9223372036854775807,
17080    since some C++ compilers masquerading as C compilers
17081    incorrectly reject 9223372036854775807.  */
17082#define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31))
17083  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
17084		       && LARGE_OFF_T % 2147483647 == 1)
17085		      ? 1 : -1];
17086int
17087main (void)
17088{
17089
17090  ;
17091  return 0;
17092}
17093_ACEOF
17094	 if ac_fn_c_try_compile "$LINENO"
17095then :
17096  break
17097fi
17098rm -f core conftest.err conftest.$ac_objext conftest.beam
17099	 CC="$CC -n32"
17100	 if ac_fn_c_try_compile "$LINENO"
17101then :
17102  ac_cv_sys_largefile_CC=' -n32'; break
17103fi
17104rm -f core conftest.err conftest.$ac_objext conftest.beam
17105	 break
17106       done
17107       CC=$ac_save_CC
17108       rm -f conftest.$ac_ext
17109    fi
17110fi
17111{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
17112printf "%s\n" "$ac_cv_sys_largefile_CC" >&6; }
17113  if test "$ac_cv_sys_largefile_CC" != no; then
17114    CC=$CC$ac_cv_sys_largefile_CC
17115  fi
17116
17117  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
17118printf %s "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
17119if test ${ac_cv_sys_file_offset_bits+y}
17120then :
17121  printf %s "(cached) " >&6
17122else $as_nop
17123  while :; do
17124  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17125/* end confdefs.h.  */
17126#include <sys/types.h>
17127 /* Check that off_t can represent 2**63 - 1 correctly.
17128    We can't simply define LARGE_OFF_T to be 9223372036854775807,
17129    since some C++ compilers masquerading as C compilers
17130    incorrectly reject 9223372036854775807.  */
17131#define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31))
17132  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
17133		       && LARGE_OFF_T % 2147483647 == 1)
17134		      ? 1 : -1];
17135int
17136main (void)
17137{
17138
17139  ;
17140  return 0;
17141}
17142_ACEOF
17143if ac_fn_c_try_compile "$LINENO"
17144then :
17145  ac_cv_sys_file_offset_bits=no; break
17146fi
17147rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
17148  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17149/* end confdefs.h.  */
17150#define _FILE_OFFSET_BITS 64
17151#include <sys/types.h>
17152 /* Check that off_t can represent 2**63 - 1 correctly.
17153    We can't simply define LARGE_OFF_T to be 9223372036854775807,
17154    since some C++ compilers masquerading as C compilers
17155    incorrectly reject 9223372036854775807.  */
17156#define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31))
17157  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
17158		       && LARGE_OFF_T % 2147483647 == 1)
17159		      ? 1 : -1];
17160int
17161main (void)
17162{
17163
17164  ;
17165  return 0;
17166}
17167_ACEOF
17168if ac_fn_c_try_compile "$LINENO"
17169then :
17170  ac_cv_sys_file_offset_bits=64; break
17171fi
17172rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
17173  ac_cv_sys_file_offset_bits=unknown
17174  break
17175done
17176fi
17177{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
17178printf "%s\n" "$ac_cv_sys_file_offset_bits" >&6; }
17179case $ac_cv_sys_file_offset_bits in #(
17180  no | unknown) ;;
17181  *)
17182printf "%s\n" "#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits" >>confdefs.h
17183;;
17184esac
17185rm -rf conftest*
17186  if test $ac_cv_sys_file_offset_bits = unknown; then
17187    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
17188printf %s "checking for _LARGE_FILES value needed for large files... " >&6; }
17189if test ${ac_cv_sys_large_files+y}
17190then :
17191  printf %s "(cached) " >&6
17192else $as_nop
17193  while :; do
17194  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17195/* end confdefs.h.  */
17196#include <sys/types.h>
17197 /* Check that off_t can represent 2**63 - 1 correctly.
17198    We can't simply define LARGE_OFF_T to be 9223372036854775807,
17199    since some C++ compilers masquerading as C compilers
17200    incorrectly reject 9223372036854775807.  */
17201#define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31))
17202  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
17203		       && LARGE_OFF_T % 2147483647 == 1)
17204		      ? 1 : -1];
17205int
17206main (void)
17207{
17208
17209  ;
17210  return 0;
17211}
17212_ACEOF
17213if ac_fn_c_try_compile "$LINENO"
17214then :
17215  ac_cv_sys_large_files=no; break
17216fi
17217rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
17218  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17219/* end confdefs.h.  */
17220#define _LARGE_FILES 1
17221#include <sys/types.h>
17222 /* Check that off_t can represent 2**63 - 1 correctly.
17223    We can't simply define LARGE_OFF_T to be 9223372036854775807,
17224    since some C++ compilers masquerading as C compilers
17225    incorrectly reject 9223372036854775807.  */
17226#define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31))
17227  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
17228		       && LARGE_OFF_T % 2147483647 == 1)
17229		      ? 1 : -1];
17230int
17231main (void)
17232{
17233
17234  ;
17235  return 0;
17236}
17237_ACEOF
17238if ac_fn_c_try_compile "$LINENO"
17239then :
17240  ac_cv_sys_large_files=1; break
17241fi
17242rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
17243  ac_cv_sys_large_files=unknown
17244  break
17245done
17246fi
17247{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
17248printf "%s\n" "$ac_cv_sys_large_files" >&6; }
17249case $ac_cv_sys_large_files in #(
17250  no | unknown) ;;
17251  *)
17252printf "%s\n" "#define _LARGE_FILES $ac_cv_sys_large_files" >>confdefs.h
17253;;
17254esac
17255rm -rf conftest*
17256  fi
17257fi
17258
17259
17260
17261
17262{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we need -D_LARGEFILE_SOURCE=1 as a flag for $CC" >&5
17263printf %s "checking whether we need -D_LARGEFILE_SOURCE=1 as a flag for $CC... " >&6; }
17264cache=_D_LARGEFILE_SOURCE_1
17265if eval test \${cv_prog_cc_flag_needed_$cache+y}
17266then :
17267  printf %s "(cached) " >&6
17268else $as_nop
17269
17270echo '
17271#include <stdio.h>
17272int test(void) {
17273        int a = fseeko(stdin, 0, 0);
17274        return a;
17275}
17276' > conftest.c
17277echo 'void f(void){}' >>conftest.c
17278if test -z "`$CC $CPPFLAGS $CFLAGS $ERRFLAG -c conftest.c 2>&1`"; then
17279eval "cv_prog_cc_flag_needed_$cache=no"
17280else
17281
17282if test -z "`$CC $CPPFLAGS $CFLAGS -D_LARGEFILE_SOURCE=1 $ERRFLAG -c conftest.c 2>&1`"; then
17283eval "cv_prog_cc_flag_needed_$cache=yes"
17284else
17285eval "cv_prog_cc_flag_needed_$cache=fail"
17286#echo 'Test with flag fails too!'
17287#cat conftest.c
17288#echo "$CC $CPPFLAGS $CFLAGS -D_LARGEFILE_SOURCE=1 $ERRFLAG -c conftest.c 2>&1"
17289#echo `$CC $CPPFLAGS $CFLAGS -D_LARGEFILE_SOURCE=1 $ERRFLAG -c conftest.c 2>&1`
17290#exit 1
17291fi
17292
17293fi
17294rm -f conftest conftest.c conftest.o
17295
17296fi
17297
17298if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = yes"; then
17299{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17300printf "%s\n" "yes" >&6; }
17301:
17302CFLAGS="$CFLAGS -D_LARGEFILE_SOURCE=1"
17303else
17304if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = no"; then
17305{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
17306printf "%s\n" "no" >&6; }
17307#echo 'Test with flag is no!'
17308#cat conftest.c
17309#echo "$CC $CPPFLAGS $CFLAGS -D_LARGEFILE_SOURCE=1 $ERRFLAG -c conftest.c 2>&1"
17310#echo `$CC $CPPFLAGS $CFLAGS -D_LARGEFILE_SOURCE=1 $ERRFLAG -c conftest.c 2>&1`
17311#exit 1
17312:
17313
17314else
17315{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: failed" >&5
17316printf "%s\n" "failed" >&6; }
17317:
17318
17319fi
17320fi
17321
17322
17323
17324{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if nonblocking sockets work" >&5
17325printf %s "checking if nonblocking sockets work... " >&6; }
17326if echo $host | grep mingw >/dev/null; then
17327	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no (windows)" >&5
17328printf "%s\n" "no (windows)" >&6; }
17329
17330printf "%s\n" "#define NONBLOCKING_IS_BROKEN 1" >>confdefs.h
17331
17332else
17333if test "$cross_compiling" = yes
17334then :
17335
17336	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: crosscompile(yes)" >&5
17337printf "%s\n" "crosscompile(yes)" >&6; }
17338
17339else $as_nop
17340  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17341/* end confdefs.h.  */
17342
17343
17344#include <stdio.h>
17345#include <string.h>
17346#include <stdlib.h>
17347#include <fcntl.h>
17348#include <errno.h>
17349#ifdef HAVE_SYS_TYPES_H
17350#include <sys/types.h>
17351#endif
17352#ifdef HAVE_SYS_SELECT_H
17353#include <sys/select.h>
17354#endif
17355#ifdef HAVE_SYS_SOCKET_H
17356#include <sys/socket.h>
17357#endif
17358#ifdef HAVE_NETINET_IN_H
17359#include <netinet/in.h>
17360#endif
17361#ifdef HAVE_ARPA_INET_H
17362#include <arpa/inet.h>
17363#endif
17364#ifdef HAVE_UNISTD_H
17365#include <unistd.h>
17366#endif
17367#ifdef HAVE_TIME_H
17368#include <time.h>
17369#endif
17370
17371int main(void)
17372{
17373	int port;
17374	int sfd, cfd;
17375	int num = 10;
17376	int i, p;
17377	struct sockaddr_in a;
17378	/* test if select and nonblocking reads work well together */
17379	/* open port.
17380	   fork child to send 10 messages.
17381	   select to read.
17382	   then try to nonblocking read the 10 messages
17383	   then, nonblocking read must give EAGAIN
17384	*/
17385
17386	port = 12345 + (time(0)%32);
17387	sfd = socket(PF_INET, SOCK_DGRAM, 0);
17388	if(sfd == -1) {
17389		perror("socket");
17390		return 1;
17391	}
17392	memset(&a, 0, sizeof(a));
17393	a.sin_family = AF_INET;
17394	a.sin_port = htons(port);
17395	a.sin_addr.s_addr = inet_addr("127.0.0.1");
17396	if(bind(sfd, (struct sockaddr*)&a, sizeof(a)) < 0) {
17397		perror("bind");
17398		return 1;
17399	}
17400	if(fcntl(sfd, F_SETFL, O_NONBLOCK) == -1) {
17401		perror("fcntl");
17402		return 1;
17403	}
17404
17405	cfd = socket(PF_INET, SOCK_DGRAM, 0);
17406	if(cfd == -1) {
17407		perror("client socket");
17408		return 1;
17409	}
17410	a.sin_port = 0;
17411	if(bind(cfd, (struct sockaddr*)&a, sizeof(a)) < 0) {
17412		perror("client bind");
17413		return 1;
17414	}
17415	a.sin_port = htons(port);
17416
17417	/* no handler, causes exit in 10 seconds */
17418	alarm(10);
17419
17420	/* send and receive on the socket */
17421	if((p=fork()) == 0) {
17422		for(i=0; i<num; i++) {
17423			if(sendto(cfd, &i, sizeof(i), 0,
17424				(struct sockaddr*)&a, sizeof(a)) < 0) {
17425				perror("sendto");
17426				return 1;
17427			}
17428		}
17429	} else {
17430		/* parent */
17431		fd_set rset;
17432		int x;
17433		if(p == -1) {
17434			perror("fork");
17435			return 1;
17436		}
17437		FD_ZERO(&rset);
17438		FD_SET(sfd, &rset);
17439		if(select(sfd+1, &rset, NULL, NULL, NULL) < 1) {
17440			perror("select");
17441			return 1;
17442		}
17443		i = 0;
17444		while(i < num) {
17445			if(recv(sfd, &x, sizeof(x), 0) != sizeof(x)) {
17446				if(errno == EAGAIN)
17447					continue;
17448				perror("recv");
17449				return 1;
17450			}
17451			i++;
17452		}
17453		/* now we want to get EAGAIN: nonblocking goodness */
17454		errno = 0;
17455		recv(sfd, &x, sizeof(x), 0);
17456		if(errno != EAGAIN) {
17457			perror("trying to recv again");
17458			return 1;
17459		}
17460		/* EAGAIN encountered */
17461	}
17462
17463	close(sfd);
17464	close(cfd);
17465	return 0;
17466}
17467
17468_ACEOF
17469if ac_fn_c_try_run "$LINENO"
17470then :
17471
17472	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17473printf "%s\n" "yes" >&6; }
17474
17475else $as_nop
17476
17477	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
17478printf "%s\n" "no" >&6; }
17479
17480printf "%s\n" "#define NONBLOCKING_IS_BROKEN 1" >>confdefs.h
17481
17482
17483fi
17484rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17485  conftest.$ac_objext conftest.beam conftest.$ac_ext
17486fi
17487
17488fi
17489
17490
17491{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mkdir has one arg" >&5
17492printf %s "checking whether mkdir has one arg... " >&6; }
17493cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17494/* end confdefs.h.  */
17495
17496#include <stdio.h>
17497#include <unistd.h>
17498#ifdef HAVE_WINSOCK2_H
17499#include <winsock2.h>
17500#endif
17501#ifdef HAVE_SYS_STAT_H
17502#include <sys/stat.h>
17503#endif
17504
17505int
17506main (void)
17507{
17508
17509	(void)mkdir("directory");
17510
17511  ;
17512  return 0;
17513}
17514_ACEOF
17515if ac_fn_c_try_compile "$LINENO"
17516then :
17517  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17518printf "%s\n" "yes" >&6; }
17519
17520printf "%s\n" "#define MKDIR_HAS_ONE_ARG 1" >>confdefs.h
17521
17522
17523else $as_nop
17524  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
17525printf "%s\n" "no" >&6; }
17526
17527fi
17528rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
17529
17530
17531  for ac_func in strptime
17532do :
17533  ac_fn_c_check_func "$LINENO" "strptime" "ac_cv_func_strptime"
17534if test "x$ac_cv_func_strptime" = xyes
17535then :
17536  printf "%s\n" "#define HAVE_STRPTIME 1" >>confdefs.h
17537
17538{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether strptime works" >&5
17539printf %s "checking whether strptime works... " >&6; }
17540if test c${cross_compiling} = cno; then
17541if test "$cross_compiling" = yes
17542then :
17543  eval "ac_cv_c_strptime_works=maybe"
17544else $as_nop
17545  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17546/* end confdefs.h.  */
17547
17548#define _XOPEN_SOURCE 600
17549#include <time.h>
17550int main(void) { struct tm tm; char *res;
17551res = 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);
17552if (!res) return 2;
17553res = strptime("20070207111842", "%Y%m%d%H%M%S", &tm);
17554if (!res) return 1; return 0; }
17555
17556_ACEOF
17557if ac_fn_c_try_run "$LINENO"
17558then :
17559  eval "ac_cv_c_strptime_works=yes"
17560else $as_nop
17561  eval "ac_cv_c_strptime_works=no"
17562fi
17563rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17564  conftest.$ac_objext conftest.beam conftest.$ac_ext
17565fi
17566
17567else
17568eval "ac_cv_c_strptime_works=maybe"
17569fi
17570{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_strptime_works" >&5
17571printf "%s\n" "$ac_cv_c_strptime_works" >&6; }
17572if test $ac_cv_c_strptime_works = no; then
17573case " $LIBOBJS " in
17574  *" strptime.$ac_objext "* ) ;;
17575  *) LIBOBJS="$LIBOBJS strptime.$ac_objext"
17576 ;;
17577esac
17578
17579else
17580
17581printf "%s\n" "#define STRPTIME_WORKS 1" >>confdefs.h
17582
17583fi
17584
17585else $as_nop
17586  case " $LIBOBJS " in
17587  *" strptime.$ac_objext "* ) ;;
17588  *) LIBOBJS="$LIBOBJS strptime.$ac_objext"
17589 ;;
17590esac
17591
17592fi
17593
17594done
17595
17596# check if we can use SO_REUSEPORT
17597reuseport_default=0
17598if echo "$host" | $GREP -i -e linux >/dev/null; then reuseport_default=1; fi
17599if echo "$host" | $GREP -i -e dragonfly >/dev/null; then reuseport_default=1; fi
17600if test "$reuseport_default" = 1; then
17601
17602printf "%s\n" "#define REUSEPORT_DEFAULT 1" >>confdefs.h
17603
17604else
17605
17606printf "%s\n" "#define REUSEPORT_DEFAULT 0" >>confdefs.h
17607
17608fi
17609
17610# Include systemd.m4 - begin
17611#   macros for configuring systemd
17612#   Copyright 2015, Sami Kerola, CloudFlare.
17613#   BSD licensed.
17614# Check whether --enable-systemd was given.
17615if test ${enable_systemd+y}
17616then :
17617  enableval=$enable_systemd;
17618else $as_nop
17619  enable_systemd=no
17620fi
17621
17622have_systemd=no
17623if test "x$enable_systemd" != xno
17624then :
17625
17626
17627
17628pkg_failed=no
17629{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for SYSTEMD" >&5
17630printf %s "checking for SYSTEMD... " >&6; }
17631
17632if test -n "$SYSTEMD_CFLAGS"; then
17633    pkg_cv_SYSTEMD_CFLAGS="$SYSTEMD_CFLAGS"
17634 elif test -n "$PKG_CONFIG"; then
17635    if test -n "$PKG_CONFIG" && \
17636    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libsystemd\""; } >&5
17637  ($PKG_CONFIG --exists --print-errors "libsystemd") 2>&5
17638  ac_status=$?
17639  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
17640  test $ac_status = 0; }; then
17641  pkg_cv_SYSTEMD_CFLAGS=`$PKG_CONFIG --cflags "libsystemd" 2>/dev/null`
17642		      test "x$?" != "x0" && pkg_failed=yes
17643else
17644  pkg_failed=yes
17645fi
17646 else
17647    pkg_failed=untried
17648fi
17649if test -n "$SYSTEMD_LIBS"; then
17650    pkg_cv_SYSTEMD_LIBS="$SYSTEMD_LIBS"
17651 elif test -n "$PKG_CONFIG"; then
17652    if test -n "$PKG_CONFIG" && \
17653    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libsystemd\""; } >&5
17654  ($PKG_CONFIG --exists --print-errors "libsystemd") 2>&5
17655  ac_status=$?
17656  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
17657  test $ac_status = 0; }; then
17658  pkg_cv_SYSTEMD_LIBS=`$PKG_CONFIG --libs "libsystemd" 2>/dev/null`
17659		      test "x$?" != "x0" && pkg_failed=yes
17660else
17661  pkg_failed=yes
17662fi
17663 else
17664    pkg_failed=untried
17665fi
17666
17667
17668
17669if test $pkg_failed = yes; then
17670   	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
17671printf "%s\n" "no" >&6; }
17672
17673if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
17674        _pkg_short_errors_supported=yes
17675else
17676        _pkg_short_errors_supported=no
17677fi
17678        if test $_pkg_short_errors_supported = yes; then
17679	        SYSTEMD_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libsystemd" 2>&1`
17680        else
17681	        SYSTEMD_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libsystemd" 2>&1`
17682        fi
17683	# Put the nasty error message in config.log where it belongs
17684	echo "$SYSTEMD_PKG_ERRORS" >&5
17685
17686	have_systemd=no
17687elif test $pkg_failed = untried; then
17688     	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
17689printf "%s\n" "no" >&6; }
17690	have_systemd=no
17691else
17692	SYSTEMD_CFLAGS=$pkg_cv_SYSTEMD_CFLAGS
17693	SYSTEMD_LIBS=$pkg_cv_SYSTEMD_LIBS
17694        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17695printf "%s\n" "yes" >&6; }
17696	have_systemd=yes
17697fi
17698		if test "x$have_systemd" != "xyes"
17699then :
17700
17701
17702pkg_failed=no
17703{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for SYSTEMD_DAEMON" >&5
17704printf %s "checking for SYSTEMD_DAEMON... " >&6; }
17705
17706if test -n "$SYSTEMD_DAEMON_CFLAGS"; then
17707    pkg_cv_SYSTEMD_DAEMON_CFLAGS="$SYSTEMD_DAEMON_CFLAGS"
17708 elif test -n "$PKG_CONFIG"; then
17709    if test -n "$PKG_CONFIG" && \
17710    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libsystemd-daemon\""; } >&5
17711  ($PKG_CONFIG --exists --print-errors "libsystemd-daemon") 2>&5
17712  ac_status=$?
17713  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
17714  test $ac_status = 0; }; then
17715  pkg_cv_SYSTEMD_DAEMON_CFLAGS=`$PKG_CONFIG --cflags "libsystemd-daemon" 2>/dev/null`
17716		      test "x$?" != "x0" && pkg_failed=yes
17717else
17718  pkg_failed=yes
17719fi
17720 else
17721    pkg_failed=untried
17722fi
17723if test -n "$SYSTEMD_DAEMON_LIBS"; then
17724    pkg_cv_SYSTEMD_DAEMON_LIBS="$SYSTEMD_DAEMON_LIBS"
17725 elif test -n "$PKG_CONFIG"; then
17726    if test -n "$PKG_CONFIG" && \
17727    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libsystemd-daemon\""; } >&5
17728  ($PKG_CONFIG --exists --print-errors "libsystemd-daemon") 2>&5
17729  ac_status=$?
17730  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
17731  test $ac_status = 0; }; then
17732  pkg_cv_SYSTEMD_DAEMON_LIBS=`$PKG_CONFIG --libs "libsystemd-daemon" 2>/dev/null`
17733		      test "x$?" != "x0" && pkg_failed=yes
17734else
17735  pkg_failed=yes
17736fi
17737 else
17738    pkg_failed=untried
17739fi
17740
17741
17742
17743if test $pkg_failed = yes; then
17744   	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
17745printf "%s\n" "no" >&6; }
17746
17747if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
17748        _pkg_short_errors_supported=yes
17749else
17750        _pkg_short_errors_supported=no
17751fi
17752        if test $_pkg_short_errors_supported = yes; then
17753	        SYSTEMD_DAEMON_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libsystemd-daemon" 2>&1`
17754        else
17755	        SYSTEMD_DAEMON_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libsystemd-daemon" 2>&1`
17756        fi
17757	# Put the nasty error message in config.log where it belongs
17758	echo "$SYSTEMD_DAEMON_PKG_ERRORS" >&5
17759
17760	have_systemd_daemon=no
17761elif test $pkg_failed = untried; then
17762     	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
17763printf "%s\n" "no" >&6; }
17764	have_systemd_daemon=no
17765else
17766	SYSTEMD_DAEMON_CFLAGS=$pkg_cv_SYSTEMD_DAEMON_CFLAGS
17767	SYSTEMD_DAEMON_LIBS=$pkg_cv_SYSTEMD_DAEMON_LIBS
17768        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17769printf "%s\n" "yes" >&6; }
17770	have_systemd_daemon=yes
17771fi
17772		if test "x$have_systemd_daemon" = "xyes"
17773then :
17774  have_systemd=yes
17775fi
17776
17777fi
17778	case $enable_systemd:$have_systemd in #(
17779  yes:no) :
17780    as_fn_error $? "systemd enabled but libsystemd not found" "$LINENO" 5 ;; #(
17781  *:yes) :
17782
17783printf "%s\n" "#define HAVE_SYSTEMD 1" >>confdefs.h
17784
17785		LIBS="$LIBS $SYSTEMD_LIBS"
17786
17787	 ;; #(
17788  *) :
17789     ;;
17790esac
17791
17792
17793fi
17794 if test "x$have_systemd" = xyes; then
17795  USE_SYSTEMD_TRUE=
17796  USE_SYSTEMD_FALSE='#'
17797else
17798  USE_SYSTEMD_TRUE='#'
17799  USE_SYSTEMD_FALSE=
17800fi
17801
17802
17803# Include systemd.m4 - end
17804
17805# set memory allocation checking if requested
17806# Check whether --enable-alloc-checks was given.
17807if test ${enable_alloc_checks+y}
17808then :
17809  enableval=$enable_alloc_checks;
17810fi
17811
17812# Check whether --enable-alloc-lite was given.
17813if test ${enable_alloc_lite+y}
17814then :
17815  enableval=$enable_alloc_lite;
17816fi
17817
17818# Check whether --enable-alloc-nonregional was given.
17819if test ${enable_alloc_nonregional+y}
17820then :
17821  enableval=$enable_alloc_nonregional;
17822fi
17823
17824if test x_$enable_alloc_nonregional = x_yes; then
17825
17826printf "%s\n" "#define UNBOUND_ALLOC_NONREGIONAL 1" >>confdefs.h
17827
17828fi
17829if test x_$enable_alloc_checks = x_yes; then
17830
17831printf "%s\n" "#define UNBOUND_ALLOC_STATS 1" >>confdefs.h
17832
17833	SLDNS_ALLOCCHECK_EXTRA_OBJ="alloc.lo log.lo"
17834
17835	ASYNCLOOK_ALLOCCHECK_EXTRA_OBJ="alloc.lo"
17836
17837else
17838	if test x_$enable_alloc_lite = x_yes; then
17839
17840printf "%s\n" "#define UNBOUND_ALLOC_LITE 1" >>confdefs.h
17841
17842	else
17843
17844	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible malloc" >&5
17845printf %s "checking for GNU libc compatible malloc... " >&6; }
17846	if test "$cross_compiling" = yes
17847then :
17848  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no (crosscompile)" >&5
17849printf "%s\n" "no (crosscompile)" >&6; }
17850	case " $LIBOBJS " in
17851  *" malloc.$ac_objext "* ) ;;
17852  *) LIBOBJS="$LIBOBJS malloc.$ac_objext"
17853 ;;
17854esac
17855
17856
17857printf "%s\n" "#define malloc rpl_malloc_unbound" >>confdefs.h
17858
17859else $as_nop
17860  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17861/* end confdefs.h.  */
17862#if defined STDC_HEADERS || defined HAVE_STDLIB_H
17863#include <stdlib.h>
17864#else
17865char *malloc ();
17866#endif
17867
17868int
17869main (void)
17870{
17871 if(malloc(0) != 0) return 1;
17872  ;
17873  return 0;
17874}
17875
17876_ACEOF
17877if ac_fn_c_try_run "$LINENO"
17878then :
17879  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
17880printf "%s\n" "no" >&6; }
17881	case " $LIBOBJS " in
17882  *" malloc.$ac_objext "* ) ;;
17883  *) LIBOBJS="$LIBOBJS malloc.$ac_objext"
17884 ;;
17885esac
17886
17887
17888printf "%s\n" "#define malloc rpl_malloc_unbound" >>confdefs.h
17889
17890else $as_nop
17891  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17892printf "%s\n" "yes" >&6; }
17893
17894printf "%s\n" "#define HAVE_MALLOC 1" >>confdefs.h
17895
17896fi
17897rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17898  conftest.$ac_objext conftest.beam conftest.$ac_ext
17899fi
17900
17901
17902	fi
17903fi
17904
17905# check windows threads (we use them, not pthreads, on windows).
17906if test "$on_mingw" = "yes"; then
17907# check windows threads
17908	ac_fn_c_check_header_compile "$LINENO" "windows.h" "ac_cv_header_windows_h" "$ac_includes_default
17909"
17910if test "x$ac_cv_header_windows_h" = xyes
17911then :
17912  printf "%s\n" "#define HAVE_WINDOWS_H 1" >>confdefs.h
17913
17914fi
17915
17916	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for CreateThread" >&5
17917printf %s "checking for CreateThread... " >&6; }
17918	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17919/* end confdefs.h.  */
17920
17921#ifdef HAVE_WINDOWS_H
17922#include <windows.h>
17923#endif
17924
17925int
17926main (void)
17927{
17928
17929	HANDLE t = CreateThread(NULL, 0, NULL, NULL, 0, NULL);
17930
17931  ;
17932  return 0;
17933}
17934_ACEOF
17935if ac_fn_c_try_compile "$LINENO"
17936then :
17937  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17938printf "%s\n" "yes" >&6; }
17939
17940printf "%s\n" "#define HAVE_WINDOWS_THREADS 1" >>confdefs.h
17941
17942
17943else $as_nop
17944  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
17945printf "%s\n" "no" >&6; }
17946
17947fi
17948rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
17949
17950else
17951# not on mingw, check thread libraries.
17952
17953# check for thread library.
17954# check this first, so that the pthread lib does not get linked in via
17955# libssl or libpython, and thus distorts the tests, and we end up using
17956# the non-threadsafe C libraries.
17957
17958# Check whether --with-pthreads was given.
17959if test ${with_pthreads+y}
17960then :
17961  withval=$with_pthreads;
17962else $as_nop
17963   withval="yes"
17964fi
17965
17966ub_have_pthreads=no
17967if test x_$withval != x_no; then
17968
17969
17970
17971
17972ac_ext=c
17973ac_cpp='$CPP $CPPFLAGS'
17974ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
17975ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
17976ac_compiler_gnu=$ac_cv_c_compiler_gnu
17977
17978ax_pthread_ok=no
17979
17980# We used to check for pthread.h first, but this fails if pthread.h
17981# requires special compiler flags (e.g. on Tru64 or Sequent).
17982# It gets checked for in the link test anyway.
17983
17984# First of all, check if the user has set any of the PTHREAD_LIBS,
17985# etcetera environment variables, and if threads linking works using
17986# them:
17987if test "x$PTHREAD_CFLAGS$PTHREAD_LIBS" != "x"; then
17988        ax_pthread_save_CC="$CC"
17989        ax_pthread_save_CFLAGS="$CFLAGS"
17990        ax_pthread_save_LIBS="$LIBS"
17991        if test "x$PTHREAD_CC" != "x"
17992then :
17993  CC="$PTHREAD_CC"
17994fi
17995        if test "x$PTHREAD_CXX" != "x"
17996then :
17997  CXX="$PTHREAD_CXX"
17998fi
17999        CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
18000        LIBS="$PTHREAD_LIBS $LIBS"
18001        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS" >&5
18002printf %s "checking for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS... " >&6; }
18003        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18004/* end confdefs.h.  */
18005
18006/* Override any GCC internal prototype to avoid an error.
18007   Use char because int might match the return type of a GCC
18008   builtin and then its argument prototype would still apply.  */
18009char pthread_join ();
18010int
18011main (void)
18012{
18013return pthread_join ();
18014  ;
18015  return 0;
18016}
18017_ACEOF
18018if ac_fn_c_try_link "$LINENO"
18019then :
18020  ax_pthread_ok=yes
18021fi
18022rm -f core conftest.err conftest.$ac_objext conftest.beam \
18023    conftest$ac_exeext conftest.$ac_ext
18024        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
18025printf "%s\n" "$ax_pthread_ok" >&6; }
18026        if test "x$ax_pthread_ok" = "xno"; then
18027                PTHREAD_LIBS=""
18028                PTHREAD_CFLAGS=""
18029        fi
18030        CC="$ax_pthread_save_CC"
18031        CFLAGS="$ax_pthread_save_CFLAGS"
18032        LIBS="$ax_pthread_save_LIBS"
18033fi
18034
18035# We must check for the threads library under a number of different
18036# names; the ordering is very important because some systems
18037# (e.g. DEC) have both -lpthread and -lpthreads, where one of the
18038# libraries is broken (non-POSIX).
18039
18040# Create a list of thread flags to try. Items with a "," contain both
18041# C compiler flags (before ",") and linker flags (after ","). Other items
18042# starting with a "-" are C compiler flags, and remaining items are
18043# library names, except for "none" which indicates that we try without
18044# any flags at all, and "pthread-config" which is a program returning
18045# the flags for the Pth emulation library.
18046
18047ax_pthread_flags="pthreads none -Kthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config"
18048
18049# The ordering *is* (sometimes) important.  Some notes on the
18050# individual items follow:
18051
18052# pthreads: AIX (must check this before -lpthread)
18053# none: in case threads are in libc; should be tried before -Kthread and
18054#       other compiler flags to prevent continual compiler warnings
18055# -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h)
18056# -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads), Tru64
18057#           (Note: HP C rejects this with "bad form for `-t' option")
18058# -pthreads: Solaris/gcc (Note: HP C also rejects)
18059# -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
18060#      doesn't hurt to check since this sometimes defines pthreads and
18061#      -D_REENTRANT too), HP C (must be checked before -lpthread, which
18062#      is present but should not be used directly; and before -mthreads,
18063#      because the compiler interprets this as "-mt" + "-hreads")
18064# -mthreads: Mingw32/gcc, Lynx/gcc
18065# pthread: Linux, etcetera
18066# --thread-safe: KAI C++
18067# pthread-config: use pthread-config program (for GNU Pth library)
18068
18069case $host_os in
18070
18071        freebsd*)
18072
18073        # -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
18074        # lthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
18075
18076        ax_pthread_flags="-kthread lthread $ax_pthread_flags"
18077        ;;
18078
18079        hpux*)
18080
18081        # From the cc(1) man page: "[-mt] Sets various -D flags to enable
18082        # multi-threading and also sets -lpthread."
18083
18084        ax_pthread_flags="-mt -pthread pthread $ax_pthread_flags"
18085        ;;
18086
18087        openedition*)
18088
18089        # IBM z/OS requires a feature-test macro to be defined in order to
18090        # enable POSIX threads at all, so give the user a hint if this is
18091        # not set. (We don't define these ourselves, as they can affect
18092        # other portions of the system API in unpredictable ways.)
18093
18094        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18095/* end confdefs.h.  */
18096
18097#            if !defined(_OPEN_THREADS) && !defined(_UNIX03_THREADS)
18098             AX_PTHREAD_ZOS_MISSING
18099#            endif
18100
18101_ACEOF
18102if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
18103  $EGREP "AX_PTHREAD_ZOS_MISSING" >/dev/null 2>&1
18104then :
18105  { 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
18106printf "%s\n" "$as_me: WARNING: IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support." >&2;}
18107fi
18108rm -rf conftest*
18109
18110        ;;
18111
18112        solaris*)
18113
18114        # On Solaris (at least, for some versions), libc contains stubbed
18115        # (non-functional) versions of the pthreads routines, so link-based
18116        # tests will erroneously succeed. (N.B.: The stubs are missing
18117        # pthread_cleanup_push, or rather a function called by this macro,
18118        # so we could check for that, but who knows whether they'll stub
18119        # that too in a future libc.)  So we'll check first for the
18120        # standard Solaris way of linking pthreads (-mt -lpthread).
18121
18122        ax_pthread_flags="-mt,-lpthread pthread $ax_pthread_flags"
18123        ;;
18124esac
18125
18126# Are we compiling with Clang?
18127
18128{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC is Clang" >&5
18129printf %s "checking whether $CC is Clang... " >&6; }
18130if test ${ax_cv_PTHREAD_CLANG+y}
18131then :
18132  printf %s "(cached) " >&6
18133else $as_nop
18134  ax_cv_PTHREAD_CLANG=no
18135     # Note that Autoconf sets GCC=yes for Clang as well as GCC
18136     if test "x$GCC" = "xyes"; then
18137        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18138/* end confdefs.h.  */
18139/* Note: Clang 2.7 lacks __clang_[a-z]+__ */
18140#            if defined(__clang__) && defined(__llvm__)
18141             AX_PTHREAD_CC_IS_CLANG
18142#            endif
18143
18144_ACEOF
18145if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
18146  $EGREP "AX_PTHREAD_CC_IS_CLANG" >/dev/null 2>&1
18147then :
18148  ax_cv_PTHREAD_CLANG=yes
18149fi
18150rm -rf conftest*
18151
18152     fi
18153
18154fi
18155{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_CLANG" >&5
18156printf "%s\n" "$ax_cv_PTHREAD_CLANG" >&6; }
18157ax_pthread_clang="$ax_cv_PTHREAD_CLANG"
18158
18159
18160# GCC generally uses -pthread, or -pthreads on some platforms (e.g. SPARC)
18161
18162# Note that for GCC and Clang -pthread generally implies -lpthread,
18163# except when -nostdlib is passed.
18164# This is problematic using libtool to build C++ shared libraries with pthread:
18165# [1] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=25460
18166# [2] https://bugzilla.redhat.com/show_bug.cgi?id=661333
18167# [3] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=468555
18168# To solve this, first try -pthread together with -lpthread for GCC
18169
18170if test "x$GCC" = "xyes"
18171then :
18172  ax_pthread_flags="-pthread,-lpthread -pthread -pthreads $ax_pthread_flags"
18173fi
18174
18175# Clang takes -pthread (never supported any other flag), but we'll try with -lpthread first
18176
18177if test "x$ax_pthread_clang" = "xyes"
18178then :
18179  ax_pthread_flags="-pthread,-lpthread -pthread"
18180fi
18181
18182
18183# The presence of a feature test macro requesting re-entrant function
18184# definitions is, on some systems, a strong hint that pthreads support is
18185# correctly enabled
18186
18187case $host_os in
18188        darwin* | hpux* | linux* | osf* | solaris*)
18189        ax_pthread_check_macro="_REENTRANT"
18190        ;;
18191
18192        aix*)
18193        ax_pthread_check_macro="_THREAD_SAFE"
18194        ;;
18195
18196        *)
18197        ax_pthread_check_macro="--"
18198        ;;
18199esac
18200if test "x$ax_pthread_check_macro" = "x--"
18201then :
18202  ax_pthread_check_cond=0
18203else $as_nop
18204  ax_pthread_check_cond="!defined($ax_pthread_check_macro)"
18205fi
18206
18207
18208if test "x$ax_pthread_ok" = "xno"; then
18209for ax_pthread_try_flag in $ax_pthread_flags; do
18210
18211        case $ax_pthread_try_flag in
18212                none)
18213                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether pthreads work without any flags" >&5
18214printf %s "checking whether pthreads work without any flags... " >&6; }
18215                ;;
18216
18217                *,*)
18218                PTHREAD_CFLAGS=`echo $ax_pthread_try_flag | sed "s/^\(.*\),\(.*\)$/\1/"`
18219                PTHREAD_LIBS=`echo $ax_pthread_try_flag | sed "s/^\(.*\),\(.*\)$/\2/"`
18220                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with \"$PTHREAD_CFLAGS\" and \"$PTHREAD_LIBS\"" >&5
18221printf %s "checking whether pthreads work with \"$PTHREAD_CFLAGS\" and \"$PTHREAD_LIBS\"... " >&6; }
18222                ;;
18223
18224                -*)
18225                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with $ax_pthread_try_flag" >&5
18226printf %s "checking whether pthreads work with $ax_pthread_try_flag... " >&6; }
18227                PTHREAD_CFLAGS="$ax_pthread_try_flag"
18228                ;;
18229
18230                pthread-config)
18231                # Extract the first word of "pthread-config", so it can be a program name with args.
18232set dummy pthread-config; ac_word=$2
18233{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18234printf %s "checking for $ac_word... " >&6; }
18235if test ${ac_cv_prog_ax_pthread_config+y}
18236then :
18237  printf %s "(cached) " >&6
18238else $as_nop
18239  if test -n "$ax_pthread_config"; then
18240  ac_cv_prog_ax_pthread_config="$ax_pthread_config" # Let the user override the test.
18241else
18242as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18243for as_dir in $PATH
18244do
18245  IFS=$as_save_IFS
18246  case $as_dir in #(((
18247    '') as_dir=./ ;;
18248    */) ;;
18249    *) as_dir=$as_dir/ ;;
18250  esac
18251    for ac_exec_ext in '' $ac_executable_extensions; do
18252  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
18253    ac_cv_prog_ax_pthread_config="yes"
18254    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
18255    break 2
18256  fi
18257done
18258  done
18259IFS=$as_save_IFS
18260
18261  test -z "$ac_cv_prog_ax_pthread_config" && ac_cv_prog_ax_pthread_config="no"
18262fi
18263fi
18264ax_pthread_config=$ac_cv_prog_ax_pthread_config
18265if test -n "$ax_pthread_config"; then
18266  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_config" >&5
18267printf "%s\n" "$ax_pthread_config" >&6; }
18268else
18269  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
18270printf "%s\n" "no" >&6; }
18271fi
18272
18273
18274                if test "x$ax_pthread_config" = "xno"
18275then :
18276  continue
18277fi
18278                PTHREAD_CFLAGS="`pthread-config --cflags`"
18279                PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`"
18280                ;;
18281
18282                *)
18283                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for the pthreads library -l$ax_pthread_try_flag" >&5
18284printf %s "checking for the pthreads library -l$ax_pthread_try_flag... " >&6; }
18285                PTHREAD_LIBS="-l$ax_pthread_try_flag"
18286                ;;
18287        esac
18288
18289        ax_pthread_save_CFLAGS="$CFLAGS"
18290        ax_pthread_save_LIBS="$LIBS"
18291        CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
18292        LIBS="$PTHREAD_LIBS $LIBS"
18293
18294        # Check for various functions.  We must include pthread.h,
18295        # since some functions may be macros.  (On the Sequent, we
18296        # need a special flag -Kthread to make this header compile.)
18297        # We check for pthread_join because it is in -lpthread on IRIX
18298        # while pthread_create is in libc.  We check for pthread_attr_init
18299        # due to DEC craziness with -lpthreads.  We check for
18300        # pthread_cleanup_push because it is one of the few pthread
18301        # functions on Solaris that doesn't have a non-functional libc stub.
18302        # We try pthread_create on general principles.
18303
18304        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18305/* end confdefs.h.  */
18306#include <pthread.h>
18307#                       if $ax_pthread_check_cond
18308#                        error "$ax_pthread_check_macro must be defined"
18309#                       endif
18310                        static void *some_global = NULL;
18311                        static void routine(void *a)
18312                          {
18313                             /* To avoid any unused-parameter or
18314                                unused-but-set-parameter warning.  */
18315                             some_global = a;
18316                          }
18317                        static void *start_routine(void *a) { return a; }
18318int
18319main (void)
18320{
18321pthread_t th; pthread_attr_t attr;
18322                        pthread_create(&th, 0, start_routine, 0);
18323                        pthread_join(th, 0);
18324                        pthread_attr_init(&attr);
18325                        pthread_cleanup_push(routine, 0);
18326                        pthread_cleanup_pop(0) /* ; */
18327  ;
18328  return 0;
18329}
18330_ACEOF
18331if ac_fn_c_try_link "$LINENO"
18332then :
18333  ax_pthread_ok=yes
18334fi
18335rm -f core conftest.err conftest.$ac_objext conftest.beam \
18336    conftest$ac_exeext conftest.$ac_ext
18337
18338        CFLAGS="$ax_pthread_save_CFLAGS"
18339        LIBS="$ax_pthread_save_LIBS"
18340
18341        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
18342printf "%s\n" "$ax_pthread_ok" >&6; }
18343        if test "x$ax_pthread_ok" = "xyes"
18344then :
18345  break
18346fi
18347
18348        PTHREAD_LIBS=""
18349        PTHREAD_CFLAGS=""
18350done
18351fi
18352
18353
18354# Clang needs special handling, because older versions handle the -pthread
18355# option in a rather... idiosyncratic way
18356
18357if test "x$ax_pthread_clang" = "xyes"; then
18358
18359        # Clang takes -pthread; it has never supported any other flag
18360
18361        # (Note 1: This will need to be revisited if a system that Clang
18362        # supports has POSIX threads in a separate library.  This tends not
18363        # to be the way of modern systems, but it's conceivable.)
18364
18365        # (Note 2: On some systems, notably Darwin, -pthread is not needed
18366        # to get POSIX threads support; the API is always present and
18367        # active.  We could reasonably leave PTHREAD_CFLAGS empty.  But
18368        # -pthread does define _REENTRANT, and while the Darwin headers
18369        # ignore this macro, third-party headers might not.)
18370
18371        # However, older versions of Clang make a point of warning the user
18372        # that, in an invocation where only linking and no compilation is
18373        # taking place, the -pthread option has no effect ("argument unused
18374        # during compilation").  They expect -pthread to be passed in only
18375        # when source code is being compiled.
18376        #
18377        # Problem is, this is at odds with the way Automake and most other
18378        # C build frameworks function, which is that the same flags used in
18379        # compilation (CFLAGS) are also used in linking.  Many systems
18380        # supported by AX_PTHREAD require exactly this for POSIX threads
18381        # support, and in fact it is often not straightforward to specify a
18382        # flag that is used only in the compilation phase and not in
18383        # linking.  Such a scenario is extremely rare in practice.
18384        #
18385        # Even though use of the -pthread flag in linking would only print
18386        # a warning, this can be a nuisance for well-run software projects
18387        # that build with -Werror.  So if the active version of Clang has
18388        # this misfeature, we search for an option to squash it.
18389
18390        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether Clang needs flag to prevent \"argument unused\" warning when linking with -pthread" >&5
18391printf %s "checking whether Clang needs flag to prevent \"argument unused\" warning when linking with -pthread... " >&6; }
18392if test ${ax_cv_PTHREAD_CLANG_NO_WARN_FLAG+y}
18393then :
18394  printf %s "(cached) " >&6
18395else $as_nop
18396  ax_cv_PTHREAD_CLANG_NO_WARN_FLAG=unknown
18397             # Create an alternate version of $ac_link that compiles and
18398             # links in two steps (.c -> .o, .o -> exe) instead of one
18399             # (.c -> exe), because the warning occurs only in the second
18400             # step
18401             ax_pthread_save_ac_link="$ac_link"
18402             ax_pthread_sed='s/conftest\.\$ac_ext/conftest.$ac_objext/g'
18403             ax_pthread_link_step=`printf "%s\n" "$ac_link" | sed "$ax_pthread_sed"`
18404             ax_pthread_2step_ac_link="($ac_compile) && (echo ==== >&5) && ($ax_pthread_link_step)"
18405             ax_pthread_save_CFLAGS="$CFLAGS"
18406             for ax_pthread_try in '' -Qunused-arguments -Wno-unused-command-line-argument unknown; do
18407                if test "x$ax_pthread_try" = "xunknown"
18408then :
18409  break
18410fi
18411                CFLAGS="-Werror -Wunknown-warning-option $ax_pthread_try -pthread $ax_pthread_save_CFLAGS"
18412                ac_link="$ax_pthread_save_ac_link"
18413                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18414/* end confdefs.h.  */
18415int main(void){return 0;}
18416_ACEOF
18417if ac_fn_c_try_link "$LINENO"
18418then :
18419  ac_link="$ax_pthread_2step_ac_link"
18420                     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18421/* end confdefs.h.  */
18422int main(void){return 0;}
18423_ACEOF
18424if ac_fn_c_try_link "$LINENO"
18425then :
18426  break
18427fi
18428rm -f core conftest.err conftest.$ac_objext conftest.beam \
18429    conftest$ac_exeext conftest.$ac_ext
18430
18431fi
18432rm -f core conftest.err conftest.$ac_objext conftest.beam \
18433    conftest$ac_exeext conftest.$ac_ext
18434             done
18435             ac_link="$ax_pthread_save_ac_link"
18436             CFLAGS="$ax_pthread_save_CFLAGS"
18437             if test "x$ax_pthread_try" = "x"
18438then :
18439  ax_pthread_try=no
18440fi
18441             ax_cv_PTHREAD_CLANG_NO_WARN_FLAG="$ax_pthread_try"
18442
18443fi
18444{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" >&5
18445printf "%s\n" "$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" >&6; }
18446
18447        case "$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" in
18448                no | unknown) ;;
18449                *) PTHREAD_CFLAGS="$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG $PTHREAD_CFLAGS" ;;
18450        esac
18451
18452fi # $ax_pthread_clang = yes
18453
18454
18455
18456# Various other checks:
18457if test "x$ax_pthread_ok" = "xyes"; then
18458        ax_pthread_save_CFLAGS="$CFLAGS"
18459        ax_pthread_save_LIBS="$LIBS"
18460        CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
18461        LIBS="$PTHREAD_LIBS $LIBS"
18462
18463        # Detect AIX lossage: JOINABLE attribute is called UNDETACHED.
18464        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for joinable pthread attribute" >&5
18465printf %s "checking for joinable pthread attribute... " >&6; }
18466if test ${ax_cv_PTHREAD_JOINABLE_ATTR+y}
18467then :
18468  printf %s "(cached) " >&6
18469else $as_nop
18470  ax_cv_PTHREAD_JOINABLE_ATTR=unknown
18471             for ax_pthread_attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do
18472                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18473/* end confdefs.h.  */
18474#include <pthread.h>
18475int
18476main (void)
18477{
18478int attr = $ax_pthread_attr; return attr /* ; */
18479  ;
18480  return 0;
18481}
18482_ACEOF
18483if ac_fn_c_try_link "$LINENO"
18484then :
18485  ax_cv_PTHREAD_JOINABLE_ATTR=$ax_pthread_attr; break
18486fi
18487rm -f core conftest.err conftest.$ac_objext conftest.beam \
18488    conftest$ac_exeext conftest.$ac_ext
18489             done
18490
18491fi
18492{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_JOINABLE_ATTR" >&5
18493printf "%s\n" "$ax_cv_PTHREAD_JOINABLE_ATTR" >&6; }
18494        if test "x$ax_cv_PTHREAD_JOINABLE_ATTR" != "xunknown" && \
18495               test "x$ax_cv_PTHREAD_JOINABLE_ATTR" != "xPTHREAD_CREATE_JOINABLE" && \
18496               test "x$ax_pthread_joinable_attr_defined" != "xyes"
18497then :
18498
18499printf "%s\n" "#define PTHREAD_CREATE_JOINABLE $ax_cv_PTHREAD_JOINABLE_ATTR" >>confdefs.h
18500
18501               ax_pthread_joinable_attr_defined=yes
18502
18503fi
18504
18505        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether more special flags are required for pthreads" >&5
18506printf %s "checking whether more special flags are required for pthreads... " >&6; }
18507if test ${ax_cv_PTHREAD_SPECIAL_FLAGS+y}
18508then :
18509  printf %s "(cached) " >&6
18510else $as_nop
18511  ax_cv_PTHREAD_SPECIAL_FLAGS=no
18512             case $host_os in
18513             solaris*)
18514             ax_cv_PTHREAD_SPECIAL_FLAGS="-D_POSIX_PTHREAD_SEMANTICS"
18515             ;;
18516             esac
18517
18518fi
18519{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_SPECIAL_FLAGS" >&5
18520printf "%s\n" "$ax_cv_PTHREAD_SPECIAL_FLAGS" >&6; }
18521        if test "x$ax_cv_PTHREAD_SPECIAL_FLAGS" != "xno" && \
18522               test "x$ax_pthread_special_flags_added" != "xyes"
18523then :
18524  PTHREAD_CFLAGS="$ax_cv_PTHREAD_SPECIAL_FLAGS $PTHREAD_CFLAGS"
18525               ax_pthread_special_flags_added=yes
18526fi
18527
18528        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for PTHREAD_PRIO_INHERIT" >&5
18529printf %s "checking for PTHREAD_PRIO_INHERIT... " >&6; }
18530if test ${ax_cv_PTHREAD_PRIO_INHERIT+y}
18531then :
18532  printf %s "(cached) " >&6
18533else $as_nop
18534  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18535/* end confdefs.h.  */
18536#include <pthread.h>
18537int
18538main (void)
18539{
18540int i = PTHREAD_PRIO_INHERIT;
18541                                               return i;
18542  ;
18543  return 0;
18544}
18545_ACEOF
18546if ac_fn_c_try_link "$LINENO"
18547then :
18548  ax_cv_PTHREAD_PRIO_INHERIT=yes
18549else $as_nop
18550  ax_cv_PTHREAD_PRIO_INHERIT=no
18551fi
18552rm -f core conftest.err conftest.$ac_objext conftest.beam \
18553    conftest$ac_exeext conftest.$ac_ext
18554
18555fi
18556{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_PRIO_INHERIT" >&5
18557printf "%s\n" "$ax_cv_PTHREAD_PRIO_INHERIT" >&6; }
18558        if test "x$ax_cv_PTHREAD_PRIO_INHERIT" = "xyes" && \
18559               test "x$ax_pthread_prio_inherit_defined" != "xyes"
18560then :
18561
18562printf "%s\n" "#define HAVE_PTHREAD_PRIO_INHERIT 1" >>confdefs.h
18563
18564               ax_pthread_prio_inherit_defined=yes
18565
18566fi
18567
18568        CFLAGS="$ax_pthread_save_CFLAGS"
18569        LIBS="$ax_pthread_save_LIBS"
18570
18571        # More AIX lossage: compile with *_r variant
18572        if test "x$GCC" != "xyes"; then
18573            case $host_os in
18574                aix*)
18575                case "x/$CC" in #(
18576  x*/c89|x*/c89_128|x*/c99|x*/c99_128|x*/cc|x*/cc128|x*/xlc|x*/xlc_v6|x*/xlc128|x*/xlc128_v6) :
18577    #handle absolute path differently from PATH based program lookup
18578                     case "x$CC" in #(
18579  x/*) :
18580
18581			   if as_fn_executable_p ${CC}_r
18582then :
18583  PTHREAD_CC="${CC}_r"
18584fi
18585			   if test "x${CXX}" != "x"
18586then :
18587  if as_fn_executable_p ${CXX}_r
18588then :
18589  PTHREAD_CXX="${CXX}_r"
18590fi
18591fi
18592			  ;; #(
18593  *) :
18594
18595			   for ac_prog in ${CC}_r
18596do
18597  # Extract the first word of "$ac_prog", so it can be a program name with args.
18598set dummy $ac_prog; ac_word=$2
18599{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18600printf %s "checking for $ac_word... " >&6; }
18601if test ${ac_cv_prog_PTHREAD_CC+y}
18602then :
18603  printf %s "(cached) " >&6
18604else $as_nop
18605  if test -n "$PTHREAD_CC"; then
18606  ac_cv_prog_PTHREAD_CC="$PTHREAD_CC" # Let the user override the test.
18607else
18608as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18609for as_dir in $PATH
18610do
18611  IFS=$as_save_IFS
18612  case $as_dir in #(((
18613    '') as_dir=./ ;;
18614    */) ;;
18615    *) as_dir=$as_dir/ ;;
18616  esac
18617    for ac_exec_ext in '' $ac_executable_extensions; do
18618  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
18619    ac_cv_prog_PTHREAD_CC="$ac_prog"
18620    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
18621    break 2
18622  fi
18623done
18624  done
18625IFS=$as_save_IFS
18626
18627fi
18628fi
18629PTHREAD_CC=$ac_cv_prog_PTHREAD_CC
18630if test -n "$PTHREAD_CC"; then
18631  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PTHREAD_CC" >&5
18632printf "%s\n" "$PTHREAD_CC" >&6; }
18633else
18634  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
18635printf "%s\n" "no" >&6; }
18636fi
18637
18638
18639  test -n "$PTHREAD_CC" && break
18640done
18641test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
18642
18643			   if test "x${CXX}" != "x"
18644then :
18645  for ac_prog in ${CXX}_r
18646do
18647  # Extract the first word of "$ac_prog", so it can be a program name with args.
18648set dummy $ac_prog; ac_word=$2
18649{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18650printf %s "checking for $ac_word... " >&6; }
18651if test ${ac_cv_prog_PTHREAD_CXX+y}
18652then :
18653  printf %s "(cached) " >&6
18654else $as_nop
18655  if test -n "$PTHREAD_CXX"; then
18656  ac_cv_prog_PTHREAD_CXX="$PTHREAD_CXX" # Let the user override the test.
18657else
18658as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18659for as_dir in $PATH
18660do
18661  IFS=$as_save_IFS
18662  case $as_dir in #(((
18663    '') as_dir=./ ;;
18664    */) ;;
18665    *) as_dir=$as_dir/ ;;
18666  esac
18667    for ac_exec_ext in '' $ac_executable_extensions; do
18668  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
18669    ac_cv_prog_PTHREAD_CXX="$ac_prog"
18670    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
18671    break 2
18672  fi
18673done
18674  done
18675IFS=$as_save_IFS
18676
18677fi
18678fi
18679PTHREAD_CXX=$ac_cv_prog_PTHREAD_CXX
18680if test -n "$PTHREAD_CXX"; then
18681  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PTHREAD_CXX" >&5
18682printf "%s\n" "$PTHREAD_CXX" >&6; }
18683else
18684  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
18685printf "%s\n" "no" >&6; }
18686fi
18687
18688
18689  test -n "$PTHREAD_CXX" && break
18690done
18691test -n "$PTHREAD_CXX" || PTHREAD_CXX="$CXX"
18692
18693fi
18694
18695                      ;;
18696esac
18697                     ;; #(
18698  *) :
18699     ;;
18700esac
18701                ;;
18702            esac
18703        fi
18704fi
18705
18706test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
18707test -n "$PTHREAD_CXX" || PTHREAD_CXX="$CXX"
18708
18709
18710
18711
18712
18713
18714# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
18715if test "x$ax_pthread_ok" = "xyes"; then
18716
18717
18718printf "%s\n" "#define HAVE_PTHREAD 1" >>confdefs.h
18719
18720		if test -n "$PTHREAD_LIBS"; then
18721		  LIBS="$PTHREAD_LIBS $LIBS"
18722		fi
18723		CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
18724		CC="$PTHREAD_CC"
18725		ub_have_pthreads=yes
18726		ac_fn_c_check_type "$LINENO" "pthread_spinlock_t" "ac_cv_type_pthread_spinlock_t" "#include <pthread.h>
18727"
18728if test "x$ac_cv_type_pthread_spinlock_t" = xyes
18729then :
18730
18731printf "%s\n" "#define HAVE_PTHREAD_SPINLOCK_T 1" >>confdefs.h
18732
18733
18734fi
18735ac_fn_c_check_type "$LINENO" "pthread_rwlock_t" "ac_cv_type_pthread_rwlock_t" "#include <pthread.h>
18736"
18737if test "x$ac_cv_type_pthread_rwlock_t" = xyes
18738then :
18739
18740printf "%s\n" "#define HAVE_PTHREAD_RWLOCK_T 1" >>confdefs.h
18741
18742
18743fi
18744
18745		# The cast to long int works around a bug in the HP C Compiler
18746# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
18747# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
18748# This bug is HP SR number 8606223364.
18749{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of unsigned long" >&5
18750printf %s "checking size of unsigned long... " >&6; }
18751if test ${ac_cv_sizeof_unsigned_long+y}
18752then :
18753  printf %s "(cached) " >&6
18754else $as_nop
18755  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned long))" "ac_cv_sizeof_unsigned_long"        "$ac_includes_default"
18756then :
18757
18758else $as_nop
18759  if test "$ac_cv_type_unsigned_long" = yes; then
18760     { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
18761printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
18762as_fn_error 77 "cannot compute sizeof (unsigned long)
18763See \`config.log' for more details" "$LINENO" 5; }
18764   else
18765     ac_cv_sizeof_unsigned_long=0
18766   fi
18767fi
18768
18769fi
18770{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned_long" >&5
18771printf "%s\n" "$ac_cv_sizeof_unsigned_long" >&6; }
18772
18773
18774
18775printf "%s\n" "#define SIZEOF_UNSIGNED_LONG $ac_cv_sizeof_unsigned_long" >>confdefs.h
18776
18777
18778		# The cast to long int works around a bug in the HP C Compiler
18779# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
18780# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
18781# This bug is HP SR number 8606223364.
18782{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
18783printf %s "checking size of pthread_t... " >&6; }
18784if test ${ac_cv_sizeof_pthread_t+y}
18785then :
18786  printf %s "(cached) " >&6
18787else $as_nop
18788  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t"        "$ac_includes_default"
18789then :
18790
18791else $as_nop
18792  if test "$ac_cv_type_pthread_t" = yes; then
18793     { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
18794printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
18795as_fn_error 77 "cannot compute sizeof (pthread_t)
18796See \`config.log' for more details" "$LINENO" 5; }
18797   else
18798     ac_cv_sizeof_pthread_t=0
18799   fi
18800fi
18801
18802fi
18803{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
18804printf "%s\n" "$ac_cv_sizeof_pthread_t" >&6; }
18805
18806
18807
18808printf "%s\n" "#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t" >>confdefs.h
18809
18810
18811
18812		if echo "$CFLAGS" | $GREP -e "-pthread" >/dev/null; then
18813		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if -pthread unused during linking" >&5
18814printf %s "checking if -pthread unused during linking... " >&6; }
18815		# catch clang warning 'argument unused during compilation'
18816		cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18817/* end confdefs.h.  */
18818$ac_includes_default
18819
18820int main(void) {return 0;}
18821
18822_ACEOF
18823		pthread_unused="yes"
18824		# first compile
18825		echo "$CC $CFLAGS -c conftest.c -o conftest.o" >&5
18826		$CC $CFLAGS -c conftest.c -o conftest.o 2>&5 >&5
18827		if test $? = 0; then
18828			# then link
18829			echo "$CC $CFLAGS -Werror $LDFLAGS $LIBS -o conftest contest.o" >&5
18830			$CC $CFLAGS -Werror $LDFLAGS $LIBS -o conftest conftest.o 2>&5 >&5
18831			if test $? -ne 0; then
18832				{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
18833printf "%s\n" "yes" >&6; }
18834				CFLAGS=`echo "$CFLAGS" | sed -e 's/-pthread//'`
18835				PTHREAD_CFLAGS_ONLY="-pthread"
18836
18837			else
18838				{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
18839printf "%s\n" "no" >&6; }
18840			fi
18841		else
18842			{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
18843printf "%s\n" "no" >&6; }
18844		fi # endif cc successful
18845		rm -f conftest conftest.c conftest.o
18846		fi # endif -pthread in CFLAGS
18847
18848
18849        :
18850else
18851        ax_pthread_ok=no
18852
18853fi
18854ac_ext=c
18855ac_cpp='$CPP $CPPFLAGS'
18856ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
18857ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
18858ac_compiler_gnu=$ac_cv_c_compiler_gnu
18859
18860
18861fi
18862
18863# check solaris thread library
18864
18865# Check whether --with-solaris-threads was given.
18866if test ${with_solaris_threads+y}
18867then :
18868  withval=$with_solaris_threads;
18869else $as_nop
18870   withval="no"
18871fi
18872
18873ub_have_sol_threads=no
18874if test x_$withval != x_no; then
18875	if test x_$ub_have_pthreads != x_no; then
18876	    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Have pthreads already, ignoring --with-solaris-threads" >&5
18877printf "%s\n" "$as_me: WARNING: Have pthreads already, ignoring --with-solaris-threads" >&2;}
18878	else
18879	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing thr_create" >&5
18880printf %s "checking for library containing thr_create... " >&6; }
18881if test ${ac_cv_search_thr_create+y}
18882then :
18883  printf %s "(cached) " >&6
18884else $as_nop
18885  ac_func_search_save_LIBS=$LIBS
18886cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18887/* end confdefs.h.  */
18888
18889/* Override any GCC internal prototype to avoid an error.
18890   Use char because int might match the return type of a GCC
18891   builtin and then its argument prototype would still apply.  */
18892char thr_create ();
18893int
18894main (void)
18895{
18896return thr_create ();
18897  ;
18898  return 0;
18899}
18900_ACEOF
18901for ac_lib in '' thread
18902do
18903  if test -z "$ac_lib"; then
18904    ac_res="none required"
18905  else
18906    ac_res=-l$ac_lib
18907    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
18908  fi
18909  if ac_fn_c_try_link "$LINENO"
18910then :
18911  ac_cv_search_thr_create=$ac_res
18912fi
18913rm -f core conftest.err conftest.$ac_objext conftest.beam \
18914    conftest$ac_exeext
18915  if test ${ac_cv_search_thr_create+y}
18916then :
18917  break
18918fi
18919done
18920if test ${ac_cv_search_thr_create+y}
18921then :
18922
18923else $as_nop
18924  ac_cv_search_thr_create=no
18925fi
18926rm conftest.$ac_ext
18927LIBS=$ac_func_search_save_LIBS
18928fi
18929{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_thr_create" >&5
18930printf "%s\n" "$ac_cv_search_thr_create" >&6; }
18931ac_res=$ac_cv_search_thr_create
18932if test "$ac_res" != no
18933then :
18934  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
18935
18936
18937printf "%s\n" "#define HAVE_SOLARIS_THREADS 1" >>confdefs.h
18938
18939
18940
18941
18942{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -mt" >&5
18943printf %s "checking whether $CC supports -mt... " >&6; }
18944cache=`echo mt | sed 'y%.=/+-%___p_%'`
18945if eval test \${cv_prog_cc_flag_$cache+y}
18946then :
18947  printf %s "(cached) " >&6
18948else $as_nop
18949
18950echo 'void f(void){}' >conftest.c
18951if test -z "`$CC $CPPFLAGS $CFLAGS -mt -c conftest.c 2>&1`"; then
18952eval "cv_prog_cc_flag_$cache=yes"
18953else
18954eval "cv_prog_cc_flag_$cache=no"
18955fi
18956rm -f conftest conftest.o conftest.c
18957
18958fi
18959
18960if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
18961{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
18962printf "%s\n" "yes" >&6; }
18963:
18964CFLAGS="$CFLAGS -mt"
18965else
18966{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
18967printf "%s\n" "no" >&6; }
18968:
18969CFLAGS="$CFLAGS -D_REENTRANT"
18970fi
18971
18972		ub_have_sol_threads=yes
18973
18974else $as_nop
18975
18976		as_fn_error $? "no solaris threads found." "$LINENO" 5
18977
18978fi
18979
18980	fi
18981fi
18982
18983fi # end of non-mingw check of thread libraries
18984
18985# Check for SYSLOG_FACILITY
18986
18987# Check whether --with-syslog-facility was given.
18988if test ${with_syslog_facility+y}
18989then :
18990  withval=$with_syslog_facility;  UNBOUND_SYSLOG_FACILITY="$withval"
18991fi
18992
18993case "${UNBOUND_SYSLOG_FACILITY}" in
18994
18995  LOCAL[0-7]) UNBOUND_SYSLOG_FACILITY="LOG_${UNBOUND_SYSLOG_FACILITY}" ;;
18996
18997           *) UNBOUND_SYSLOG_FACILITY="LOG_DAEMON" ;;
18998
18999esac
19000
19001printf "%s\n" "#define UB_SYSLOG_FACILITY ${UNBOUND_SYSLOG_FACILITY}" >>confdefs.h
19002
19003
19004# Check for dynamic library module
19005
19006# Check whether --with-dynlibmodule was given.
19007if test ${with_dynlibmodule+y}
19008then :
19009  withval=$with_dynlibmodule;
19010else $as_nop
19011   withval="no"
19012fi
19013
19014
19015if test x_$withval != x_no; then
19016
19017printf "%s\n" "#define WITH_DYNLIBMODULE 1" >>confdefs.h
19018
19019  WITH_DYNLIBMODULE=yes
19020
19021  DYNLIBMOD_OBJ="dynlibmod.lo"
19022
19023  DYNLIBMOD_HEADER='$(srcdir)/dynlibmod/dynlibmod.h'
19024
19025  if test $on_mingw = "no"; then
19026    # link with -ldl if not already there, for all executables because
19027    # dlopen call is in the dynlib module.  For unbound executable, also
19028    # export symbols.
19029    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
19030printf %s "checking for library containing dlopen... " >&6; }
19031if test ${ac_cv_search_dlopen+y}
19032then :
19033  printf %s "(cached) " >&6
19034else $as_nop
19035  ac_func_search_save_LIBS=$LIBS
19036cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19037/* end confdefs.h.  */
19038
19039/* Override any GCC internal prototype to avoid an error.
19040   Use char because int might match the return type of a GCC
19041   builtin and then its argument prototype would still apply.  */
19042char dlopen ();
19043int
19044main (void)
19045{
19046return dlopen ();
19047  ;
19048  return 0;
19049}
19050_ACEOF
19051for ac_lib in '' dl
19052do
19053  if test -z "$ac_lib"; then
19054    ac_res="none required"
19055  else
19056    ac_res=-l$ac_lib
19057    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
19058  fi
19059  if ac_fn_c_try_link "$LINENO"
19060then :
19061  ac_cv_search_dlopen=$ac_res
19062fi
19063rm -f core conftest.err conftest.$ac_objext conftest.beam \
19064    conftest$ac_exeext
19065  if test ${ac_cv_search_dlopen+y}
19066then :
19067  break
19068fi
19069done
19070if test ${ac_cv_search_dlopen+y}
19071then :
19072
19073else $as_nop
19074  ac_cv_search_dlopen=no
19075fi
19076rm conftest.$ac_ext
19077LIBS=$ac_func_search_save_LIBS
19078fi
19079{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
19080printf "%s\n" "$ac_cv_search_dlopen" >&6; }
19081ac_res=$ac_cv_search_dlopen
19082if test "$ac_res" != no
19083then :
19084  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
19085
19086fi
19087
19088    DYNLIBMOD_EXTRALIBS="-export-dynamic"
19089  else
19090    DYNLIBMOD_EXTRALIBS="-Wl,--export-all-symbols,--out-implib,libunbound.dll.a"
19091  fi
19092
19093fi
19094
19095# Check for PyUnbound
19096
19097# Check whether --with-pyunbound was given.
19098if test ${with_pyunbound+y}
19099then :
19100  withval=$with_pyunbound;
19101else $as_nop
19102   withval="no"
19103fi
19104
19105
19106ub_test_python=no
19107ub_with_pyunbound=no
19108if test x_$withval != x_no; then
19109   ub_with_pyunbound=yes
19110   ub_test_python=yes
19111fi
19112
19113# Check for Python module
19114
19115# Check whether --with-pythonmodule was given.
19116if test ${with_pythonmodule+y}
19117then :
19118  withval=$with_pythonmodule;
19119else $as_nop
19120   withval="no"
19121fi
19122
19123
19124ub_with_pythonmod=no
19125if test x_$withval != x_no; then
19126   ub_with_pythonmod=yes
19127   ub_test_python=yes
19128fi
19129
19130# Check for Python & SWIG only on PyUnbound or PyModule
19131if test x_$ub_test_python != x_no; then
19132
19133   # Check for Python
19134   ub_have_python=no
19135   ac_save_LIBS="$LIBS"
19136        #
19137        # Allow the use of a (user set) custom python version
19138        #
19139
19140
19141        # Extract the first word of "python[$PYTHON_VERSION]", so it can be a program name with args.
19142set dummy python$PYTHON_VERSION; ac_word=$2
19143{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19144printf %s "checking for $ac_word... " >&6; }
19145if test ${ac_cv_path_PYTHON+y}
19146then :
19147  printf %s "(cached) " >&6
19148else $as_nop
19149  case $PYTHON in
19150  [\\/]* | ?:[\\/]*)
19151  ac_cv_path_PYTHON="$PYTHON" # Let the user override the test with a path.
19152  ;;
19153  *)
19154  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19155for as_dir in $PATH
19156do
19157  IFS=$as_save_IFS
19158  case $as_dir in #(((
19159    '') as_dir=./ ;;
19160    */) ;;
19161    *) as_dir=$as_dir/ ;;
19162  esac
19163    for ac_exec_ext in '' $ac_executable_extensions; do
19164  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
19165    ac_cv_path_PYTHON="$as_dir$ac_word$ac_exec_ext"
19166    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
19167    break 2
19168  fi
19169done
19170  done
19171IFS=$as_save_IFS
19172
19173  ;;
19174esac
19175fi
19176PYTHON=$ac_cv_path_PYTHON
19177if test -n "$PYTHON"; then
19178  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5
19179printf "%s\n" "$PYTHON" >&6; }
19180else
19181  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
19182printf "%s\n" "no" >&6; }
19183fi
19184
19185
19186        if test -z "$PYTHON"; then
19187           as_fn_error $? "Cannot find python$PYTHON_VERSION in your system path" "$LINENO" 5
19188           PYTHON_VERSION=""
19189        fi
19190
19191        if test -z "$PYTHON_VERSION"; then
19192		PYTHON_VERSION=`$PYTHON -c "import sys; \
19193			print(sys.version.split()[0])"`
19194	fi
19195	# calculate the version number components.
19196
19197	v="$PYTHON_VERSION"
19198	PYTHON_VERSION_MAJOR=`echo $v | sed 's/[^0-9].*//'`
19199	if test -z "$PYTHON_VERSION_MAJOR"; then PYTHON_VERSION_MAJOR="0"; fi
19200	v=`echo $v | sed -e 's/^[0-9]*$//' -e 's/[0-9]*[^0-9]//'`
19201	PYTHON_VERSION_MINOR=`echo $v | sed 's/[^0-9].*//'`
19202	if test -z "$PYTHON_VERSION_MINOR"; then PYTHON_VERSION_MINOR="0"; fi
19203	v=`echo $v | sed -e 's/^[0-9]*$//' -e 's/[0-9]*[^0-9]//'`
19204	PYTHON_VERSION_PATCH=`echo $v | sed 's/[^0-9].*//'`
19205	if test -z "$PYTHON_VERSION_PATCH"; then PYTHON_VERSION_PATCH="0"; fi
19206
19207
19208	# For some systems, sysconfig exists, but has the wrong paths,
19209	# on Debian 10, for python 2.7 and 3.7. So, we check the version,
19210	# and for older versions try distutils.sysconfig first. For newer
19211	# versions>=3.10, where distutils.sysconfig is deprecated, use
19212	# sysconfig first and then attempt the other one.
19213	py_distutils_first="no"
19214	if test $PYTHON_VERSION_MAJOR -lt 3; then
19215		py_distutils_first="yes"
19216	fi
19217	if test $PYTHON_VERSION_MAJOR -eq 3 -a $PYTHON_VERSION_MINOR -lt 10; then
19218		py_distutils_first="yes"
19219	fi
19220
19221	# Check if you have the first module
19222	if test "$py_distutils_first" = "yes"; then m="distutils"; else m="sysconfig"; fi
19223	sysconfig_module=""
19224	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for the $m Python module" >&5
19225printf %s "checking for the $m Python module... " >&6; }
19226        if ac_modulecheck_result1=`$PYTHON -c "import $m" 2>&1`; then
19227                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19228printf "%s\n" "yes" >&6; }
19229		sysconfig_module="$m"
19230	else
19231                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
19232printf "%s\n" "no" >&6; }
19233	fi
19234
19235	# if not found, try the other one.
19236	if test -z "$sysconfig_module"; then
19237		if test "$py_distutils_first" = "yes"; then m2="sysconfig"; else m2="distutils"; fi
19238		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for the $m2 Python module" >&5
19239printf %s "checking for the $m2 Python module... " >&6; }
19240		if ac_modulecheck_result2=`$PYTHON -c "import $m2" 2>&1`; then
19241			{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19242printf "%s\n" "yes" >&6; }
19243			sysconfig_module="$m2"
19244		else
19245			{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
19246printf "%s\n" "no" >&6; }
19247			as_fn_error $? "cannot import Python module \"$m\", or \"$m2\".
19248	Please check your Python installation. The errors are:
19249	$m
19250	$ac_modulecheck_result1
19251	$m2
19252	$ac_modulecheck_result2" "$LINENO" 5
19253			PYTHON_VERSION=""
19254		fi
19255	fi
19256	if test "$sysconfig_module" = "distutils"; then sysconfig_module="distutils.sysconfig"; fi
19257
19258        #
19259        # Check for Python include path
19260        #
19261        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Python include path" >&5
19262printf %s "checking for Python include path... " >&6; }
19263        if test -z "$PYTHON_CPPFLAGS"; then
19264		if test "$sysconfig_module" = "sysconfig"; then
19265			python_path=`$PYTHON -c 'import sysconfig; \
19266				print(sysconfig.get_path("include"));'`
19267		else
19268			python_path=`$PYTHON -c "import distutils.sysconfig; \
19269				print(distutils.sysconfig.get_python_inc());"`
19270		fi
19271                if test -n "${python_path}"; then
19272                        python_path="-I$python_path"
19273                fi
19274                PYTHON_CPPFLAGS=$python_path
19275        fi
19276        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PYTHON_CPPFLAGS" >&5
19277printf "%s\n" "$PYTHON_CPPFLAGS" >&6; }
19278
19279
19280        #
19281        # Check for Python library path
19282        #
19283        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Python library path" >&5
19284printf %s "checking for Python library path... " >&6; }
19285        if test -z "$PYTHON_LDFLAGS"; then
19286                PYTHON_LDFLAGS=`$PYTHON -c "from $sysconfig_module import *; \
19287                        print('-L'+get_config_var('LIBDIR')+' -L'+get_config_var('LIBDEST')+' '+get_config_var('BLDLIBRARY'));"`
19288        fi
19289        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PYTHON_LDFLAGS" >&5
19290printf "%s\n" "$PYTHON_LDFLAGS" >&6; }
19291
19292
19293        if test -z "$PYTHON_LIBDIR"; then
19294                PYTHON_LIBDIR=`$PYTHON -c "from $sysconfig_module import *; \
19295                        print(get_config_var('LIBDIR'));"`
19296        fi
19297
19298        #
19299        # Check for site packages
19300        #
19301        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Python site-packages path" >&5
19302printf %s "checking for Python site-packages path... " >&6; }
19303        if test -z "$PYTHON_SITE_PKG"; then
19304		if test "$sysconfig_module" = "sysconfig"; then
19305			PYTHON_SITE_PKG=`$PYTHON -c 'import sysconfig; \
19306				print(sysconfig.get_path("platlib"));'`
19307		else
19308			PYTHON_SITE_PKG=`$PYTHON -c "import distutils.sysconfig; \
19309				print(distutils.sysconfig.get_python_lib(1,0));"`
19310		fi
19311        fi
19312        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PYTHON_SITE_PKG" >&5
19313printf "%s\n" "$PYTHON_SITE_PKG" >&6; }
19314
19315
19316        #
19317        # final check to see if everything compiles alright
19318        #
19319        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking consistency of all components of python development environment" >&5
19320printf %s "checking consistency of all components of python development environment... " >&6; }
19321        ac_ext=c
19322ac_cpp='$CPP $CPPFLAGS'
19323ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
19324ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
19325ac_compiler_gnu=$ac_cv_c_compiler_gnu
19326
19327        # save current global flags
19328        ac_save_LIBS="$LIBS"
19329        ac_save_CPPFLAGS="$CPPFLAGS"
19330
19331        LIBS="$LIBS $PYTHON_LDFLAGS"
19332        CPPFLAGS="$CPPFLAGS $PYTHON_CPPFLAGS"
19333        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19334/* end confdefs.h.  */
19335
19336                #include <Python.h>
19337
19338int
19339main (void)
19340{
19341
19342                Py_Initialize();
19343
19344  ;
19345  return 0;
19346}
19347_ACEOF
19348if ac_fn_c_try_link "$LINENO"
19349then :
19350  pythonexists=yes
19351else $as_nop
19352  pythonexists=no
19353fi
19354rm -f core conftest.err conftest.$ac_objext conftest.beam \
19355    conftest$ac_exeext conftest.$ac_ext
19356
19357        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $pythonexists" >&5
19358printf "%s\n" "$pythonexists" >&6; }
19359
19360        if test ! "$pythonexists" = "yes"; then
19361           as_fn_error $? "
19362  Could not link test program to Python. Maybe the main Python library has been
19363  installed in some non-standard library path. If so, pass it to configure,
19364  via the LDFLAGS environment variable.
19365  Example: ./configure LDFLAGS=\"-L/usr/non-standard-path/python/lib\"
19366  ============================================================================
19367   ERROR!
19368   You probably have to install the development version of the Python package
19369   for your distribution.  The exact name of this package varies among them.
19370  ============================================================================
19371           " "$LINENO" 5
19372          PYTHON_VERSION=""
19373        fi
19374        ac_ext=c
19375ac_cpp='$CPP $CPPFLAGS'
19376ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
19377ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
19378ac_compiler_gnu=$ac_cv_c_compiler_gnu
19379
19380        # turn back to default flags
19381        CPPFLAGS="$ac_save_CPPFLAGS"
19382        LIBS="$ac_save_LIBS"
19383
19384        #
19385        # all done!
19386        #
19387
19388   if test ! -z "$PYTHON_VERSION"; then
19389	badversion="no"
19390	if test "$PYTHON_VERSION_MAJOR" -lt 2; then
19391		badversion="yes"
19392	fi
19393	if test "$PYTHON_VERSION_MAJOR" -eq 2 -a "$PYTHON_VERSION_MINOR" -lt 4; then
19394		badversion="yes"
19395	fi
19396	if test "$badversion" = "yes"; then
19397		as_fn_error $? "Python version >= 2.4.0 is required" "$LINENO" 5
19398	fi
19399
19400      PY_MAJOR_VERSION="`$PYTHON -c \"import sys; print(sys.version_info[0])\"`"
19401
19402      # Have Python
19403
19404printf "%s\n" "#define HAVE_PYTHON 1" >>confdefs.h
19405
19406      if test x_$ub_with_pythonmod != x_no; then
19407        if test -n "$LIBS"; then
19408          LIBS="$PYTHON_LDFLAGS $LIBS"
19409        else
19410          LIBS="$PYTHON_LDFLAGS"
19411        fi
19412      fi
19413      PYTHON_LIBS="$PYTHON_LDFLAGS"
19414
19415      if test -n "$CPPFLAGS"; then
19416        CPPFLAGS="$CPPFLAGS $PYTHON_CPPFLAGS"
19417      else
19418        CPPFLAGS="$PYTHON_CPPFLAGS"
19419      fi
19420      if test "$PYTHON_LIBDIR" != "/usr/lib" -a "$PYTHON_LIBDIR" != "" -a "$PYTHON_LIBDIR" != "/usr/lib64"; then
19421
19422	if test "x$enable_rpath" = xyes; then
19423		if echo "$PYTHON_LIBDIR" | grep "^/" >/dev/null; then
19424			RUNTIME_PATH="$RUNTIME_PATH -R$PYTHON_LIBDIR"
19425		fi
19426	fi
19427
19428      fi
19429      ub_have_python=yes
19430      if test -n "$PKG_CONFIG" && \
19431    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\"python\${PY_MAJOR_VERSION}\"\""; } >&5
19432  ($PKG_CONFIG --exists --print-errors ""python${PY_MAJOR_VERSION}"") 2>&5
19433  ac_status=$?
19434  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19435  test $ac_status = 0; }; then
19436  PC_PY_DEPENDENCY="python${PY_MAJOR_VERSION}"
19437else
19438  PC_PY_DEPENDENCY="python"
19439fi
19440
19441
19442      # Check for SWIG
19443      ub_have_swig=no
19444      # Check whether --enable-swig-version-check was given.
19445if test ${enable_swig_version_check+y}
19446then :
19447  enableval=$enable_swig_version_check;
19448fi
19449
19450      if test "$enable_swig_version_check" = "yes"; then
19451
19452        # Find path to the "swig" executable.
19453        for ac_prog in swig swig3.0 swig2.0
19454do
19455  # Extract the first word of "$ac_prog", so it can be a program name with args.
19456set dummy $ac_prog; ac_word=$2
19457{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19458printf %s "checking for $ac_word... " >&6; }
19459if test ${ac_cv_path_SWIG+y}
19460then :
19461  printf %s "(cached) " >&6
19462else $as_nop
19463  case $SWIG in
19464  [\\/]* | ?:[\\/]*)
19465  ac_cv_path_SWIG="$SWIG" # Let the user override the test with a path.
19466  ;;
19467  *)
19468  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19469for as_dir in $PATH
19470do
19471  IFS=$as_save_IFS
19472  case $as_dir in #(((
19473    '') as_dir=./ ;;
19474    */) ;;
19475    *) as_dir=$as_dir/ ;;
19476  esac
19477    for ac_exec_ext in '' $ac_executable_extensions; do
19478  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
19479    ac_cv_path_SWIG="$as_dir$ac_word$ac_exec_ext"
19480    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
19481    break 2
19482  fi
19483done
19484  done
19485IFS=$as_save_IFS
19486
19487  ;;
19488esac
19489fi
19490SWIG=$ac_cv_path_SWIG
19491if test -n "$SWIG"; then
19492  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $SWIG" >&5
19493printf "%s\n" "$SWIG" >&6; }
19494else
19495  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
19496printf "%s\n" "no" >&6; }
19497fi
19498
19499
19500  test -n "$SWIG" && break
19501done
19502
19503        if test -z "$SWIG" ; then
19504                :
19505        elif test -z "2.0.1" ; then
19506                :
19507	else
19508                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking SWIG version" >&5
19509printf %s "checking SWIG version... " >&6; }
19510                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'`
19511                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $swig_version" >&5
19512printf "%s\n" "$swig_version" >&6; }
19513                if test -n "$swig_version" ; then
19514                        # Calculate the required version number components
19515                        required=2.0.1
19516                        required_major=`echo $required | sed 's/[^0-9].*//'`
19517                        if test -z "$required_major" ; then
19518                                required_major=0
19519                        fi
19520                        required=`echo $required. | sed 's/[0-9]*[^0-9]//'`
19521                        required_minor=`echo $required | sed 's/[^0-9].*//'`
19522                        if test -z "$required_minor" ; then
19523                                required_minor=0
19524                        fi
19525                        required=`echo $required. | sed 's/[0-9]*[^0-9]//'`
19526                        required_patch=`echo $required | sed 's/[^0-9].*//'`
19527                        if test -z "$required_patch" ; then
19528                                required_patch=0
19529                        fi
19530                        # Calculate the available version number components
19531                        available=$swig_version
19532                        available_major=`echo $available | sed 's/[^0-9].*//'`
19533                        if test -z "$available_major" ; then
19534                                available_major=0
19535                        fi
19536                        available=`echo $available | sed 's/[0-9]*[^0-9]//'`
19537                        available_minor=`echo $available | sed 's/[^0-9].*//'`
19538                        if test -z "$available_minor" ; then
19539                                available_minor=0
19540                        fi
19541                        available=`echo $available | sed 's/[0-9]*[^0-9]//'`
19542                        available_patch=`echo $available | sed 's/[^0-9].*//'`
19543                        if test -z "$available_patch" ; then
19544                                available_patch=0
19545                        fi
19546                        # Convert the version tuple into a single number for easier comparison.
19547                        # Using base 100 should be safe since SWIG internally uses BCD values
19548                        # to encode its version number.
19549                        required_swig_vernum=`expr $required_major \* 10000 \
19550                            \+ $required_minor \* 100 \+ $required_patch`
19551                        available_swig_vernum=`expr $available_major \* 10000 \
19552                            \+ $available_minor \* 100 \+ $available_patch`
19553
19554                        if test $available_swig_vernum -lt $required_swig_vernum; then
19555                                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: SWIG version >= 2.0.1 is required.  You have $swig_version." >&5
19556printf "%s\n" "$as_me: WARNING: SWIG version >= 2.0.1 is required.  You have $swig_version." >&2;}
19557                                SWIG=''
19558
19559                        else
19560                                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for SWIG library" >&5
19561printf %s "checking for SWIG library... " >&6; }
19562                                SWIG_LIB=`$SWIG -swiglib | tr '\r\n' '  '`
19563                                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $SWIG_LIB" >&5
19564printf "%s\n" "$SWIG_LIB" >&6; }
19565
19566                        fi
19567                else
19568                        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cannot determine SWIG version" >&5
19569printf "%s\n" "$as_me: WARNING: cannot determine SWIG version" >&2;}
19570                        SWIG=''
19571
19572                fi
19573        fi
19574
19575
19576      else
19577
19578        # Find path to the "swig" executable.
19579        for ac_prog in swig swig3.0 swig2.0
19580do
19581  # Extract the first word of "$ac_prog", so it can be a program name with args.
19582set dummy $ac_prog; ac_word=$2
19583{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19584printf %s "checking for $ac_word... " >&6; }
19585if test ${ac_cv_path_SWIG+y}
19586then :
19587  printf %s "(cached) " >&6
19588else $as_nop
19589  case $SWIG in
19590  [\\/]* | ?:[\\/]*)
19591  ac_cv_path_SWIG="$SWIG" # Let the user override the test with a path.
19592  ;;
19593  *)
19594  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19595for as_dir in $PATH
19596do
19597  IFS=$as_save_IFS
19598  case $as_dir in #(((
19599    '') as_dir=./ ;;
19600    */) ;;
19601    *) as_dir=$as_dir/ ;;
19602  esac
19603    for ac_exec_ext in '' $ac_executable_extensions; do
19604  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
19605    ac_cv_path_SWIG="$as_dir$ac_word$ac_exec_ext"
19606    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
19607    break 2
19608  fi
19609done
19610  done
19611IFS=$as_save_IFS
19612
19613  ;;
19614esac
19615fi
19616SWIG=$ac_cv_path_SWIG
19617if test -n "$SWIG"; then
19618  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $SWIG" >&5
19619printf "%s\n" "$SWIG" >&6; }
19620else
19621  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
19622printf "%s\n" "no" >&6; }
19623fi
19624
19625
19626  test -n "$SWIG" && break
19627done
19628
19629        if test -z "$SWIG" ; then
19630                :
19631        elif test -z "" ; then
19632                :
19633	else
19634                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking SWIG version" >&5
19635printf %s "checking SWIG version... " >&6; }
19636                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'`
19637                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $swig_version" >&5
19638printf "%s\n" "$swig_version" >&6; }
19639                if test -n "$swig_version" ; then
19640                        # Calculate the required version number components
19641                        required=
19642                        required_major=`echo $required | sed 's/[^0-9].*//'`
19643                        if test -z "$required_major" ; then
19644                                required_major=0
19645                        fi
19646                        required=`echo $required. | sed 's/[0-9]*[^0-9]//'`
19647                        required_minor=`echo $required | sed 's/[^0-9].*//'`
19648                        if test -z "$required_minor" ; then
19649                                required_minor=0
19650                        fi
19651                        required=`echo $required. | sed 's/[0-9]*[^0-9]//'`
19652                        required_patch=`echo $required | sed 's/[^0-9].*//'`
19653                        if test -z "$required_patch" ; then
19654                                required_patch=0
19655                        fi
19656                        # Calculate the available version number components
19657                        available=$swig_version
19658                        available_major=`echo $available | sed 's/[^0-9].*//'`
19659                        if test -z "$available_major" ; then
19660                                available_major=0
19661                        fi
19662                        available=`echo $available | sed 's/[0-9]*[^0-9]//'`
19663                        available_minor=`echo $available | sed 's/[^0-9].*//'`
19664                        if test -z "$available_minor" ; then
19665                                available_minor=0
19666                        fi
19667                        available=`echo $available | sed 's/[0-9]*[^0-9]//'`
19668                        available_patch=`echo $available | sed 's/[^0-9].*//'`
19669                        if test -z "$available_patch" ; then
19670                                available_patch=0
19671                        fi
19672                        # Convert the version tuple into a single number for easier comparison.
19673                        # Using base 100 should be safe since SWIG internally uses BCD values
19674                        # to encode its version number.
19675                        required_swig_vernum=`expr $required_major \* 10000 \
19676                            \+ $required_minor \* 100 \+ $required_patch`
19677                        available_swig_vernum=`expr $available_major \* 10000 \
19678                            \+ $available_minor \* 100 \+ $available_patch`
19679
19680                        if test $available_swig_vernum -lt $required_swig_vernum; then
19681                                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: SWIG version >=  is required.  You have $swig_version." >&5
19682printf "%s\n" "$as_me: WARNING: SWIG version >=  is required.  You have $swig_version." >&2;}
19683                                SWIG=''
19684
19685                        else
19686                                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for SWIG library" >&5
19687printf %s "checking for SWIG library... " >&6; }
19688                                SWIG_LIB=`$SWIG -swiglib | tr '\r\n' '  '`
19689                                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $SWIG_LIB" >&5
19690printf "%s\n" "$SWIG_LIB" >&6; }
19691
19692                        fi
19693                else
19694                        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cannot determine SWIG version" >&5
19695printf "%s\n" "$as_me: WARNING: cannot determine SWIG version" >&2;}
19696                        SWIG=''
19697
19698                fi
19699        fi
19700
19701
19702      fi
19703      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking SWIG" >&5
19704printf %s "checking SWIG... " >&6; }
19705      if test ! -x "$SWIG"; then
19706         as_fn_error $? "failed to find swig tool, install it, or do not build Python module and PyUnbound" "$LINENO" 5
19707      else
19708
19709printf "%s\n" "#define HAVE_SWIG 1" >>confdefs.h
19710
19711         swig="$SWIG"
19712
19713         { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: present" >&5
19714printf "%s\n" "present" >&6; }
19715
19716         # If have Python & SWIG
19717         # Declare PythonMod
19718         if test x_$ub_with_pythonmod != x_no; then
19719
19720printf "%s\n" "#define WITH_PYTHONMODULE 1" >>confdefs.h
19721
19722            WITH_PYTHONMODULE=yes
19723
19724	    PYTHONMOD_OBJ="pythonmod.lo pythonmod_utils.lo"
19725
19726	    PYTHONMOD_HEADER='$(srcdir)/pythonmod/pythonmod.h'
19727
19728	    PYTHONMOD_INSTALL=pythonmod-install
19729
19730	    PYTHONMOD_UNINSTALL=pythonmod-uninstall
19731
19732         fi
19733
19734         # Declare PyUnbound
19735         if test x_$ub_with_pyunbound != x_no; then
19736
19737printf "%s\n" "#define WITH_PYUNBOUND 1" >>confdefs.h
19738
19739            WITH_PYUNBOUND=yes
19740
19741	    PYUNBOUND_OBJ="libunbound_wrap.lo"
19742
19743	    PYUNBOUND_TARGET="_unbound.la"
19744
19745	    PYUNBOUND_INSTALL=pyunbound-install
19746
19747	    PYUNBOUND_UNINSTALL=pyunbound-uninstall
19748
19749         fi
19750      fi
19751   else
19752      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: *** Python libraries not found, won't build PythonMod or PyUnbound ***" >&5
19753printf "%s\n" "*** Python libraries not found, won't build PythonMod or PyUnbound ***" >&6; }
19754      ub_with_pyunbound=no
19755      ub_with_pythonmod=no
19756   fi
19757fi
19758
19759if test "`uname`" = "NetBSD"; then
19760	NETBSD_LINTFLAGS='"-D__RENAME(x)=" -D_NETINET_IN_H_'
19761
19762fi
19763
19764if test "`uname`" = "Linux"; then
19765	# splint cannot parse modern c99 header files
19766	GCC_DOCKER_LINTFLAGS='-syntax'
19767
19768fi
19769CONFIG_DATE=`date +%Y%m%d`
19770
19771
19772# Checks for libraries.
19773
19774# libnss
19775USE_NSS="no"
19776
19777# Check whether --with-nss was given.
19778if test ${with_nss+y}
19779then :
19780  withval=$with_nss;
19781	USE_NSS="yes"
19782
19783printf "%s\n" "#define HAVE_NSS 1" >>confdefs.h
19784
19785	if test "$withval" != "" -a "$withval" != "yes"; then
19786		CPPFLAGS="$CPPFLAGS -I$withval/include/nss3"
19787		LDFLAGS="$LDFLAGS -L$withval/lib"
19788
19789	if test "x$enable_rpath" = xyes; then
19790		if echo "$withval/lib" | grep "^/" >/dev/null; then
19791			RUNTIME_PATH="$RUNTIME_PATH -R$withval/lib"
19792		fi
19793	fi
19794
19795		CPPFLAGS="-I$withval/include/nspr4 $CPPFLAGS"
19796	else
19797		CPPFLAGS="$CPPFLAGS -I/usr/include/nss3"
19798		CPPFLAGS="-I/usr/include/nspr4 $CPPFLAGS"
19799	fi
19800        LIBS="$LIBS -lnss3 -lnspr4"
19801	SSLLIB=""
19802	PC_CRYPTO_DEPENDENCY="nss nspr"
19803
19804
19805
19806fi
19807
19808
19809# libnettle
19810USE_NETTLE="no"
19811
19812# Check whether --with-nettle was given.
19813if test ${with_nettle+y}
19814then :
19815  withval=$with_nettle;
19816	USE_NETTLE="yes"
19817
19818printf "%s\n" "#define HAVE_NETTLE 1" >>confdefs.h
19819
19820	ac_fn_c_check_header_compile "$LINENO" "nettle/dsa-compat.h" "ac_cv_header_nettle_dsa_compat_h" "$ac_includes_default
19821"
19822if test "x$ac_cv_header_nettle_dsa_compat_h" = xyes
19823then :
19824  printf "%s\n" "#define HAVE_NETTLE_DSA_COMPAT_H 1" >>confdefs.h
19825
19826fi
19827
19828	if test "$withval" != "" -a "$withval" != "yes"; then
19829		CPPFLAGS="$CPPFLAGS -I$withval/include/nettle"
19830		LDFLAGS="$LDFLAGS -L$withval/lib"
19831
19832	if test "x$enable_rpath" = xyes; then
19833		if echo "$withval/lib" | grep "^/" >/dev/null; then
19834			RUNTIME_PATH="$RUNTIME_PATH -R$withval/lib"
19835		fi
19836	fi
19837
19838	else
19839		CPPFLAGS="$CPPFLAGS -I/usr/include/nettle"
19840	fi
19841        LIBS="$LIBS -lhogweed -lnettle -lgmp"
19842	SSLLIB=""
19843	PC_CRYPTO_DEPENDENCY="hogweed nettle"
19844
19845
19846
19847fi
19848
19849
19850# openssl
19851if test $USE_NSS = "no" -a $USE_NETTLE = "no"; then
19852
19853
19854# Check whether --with-ssl was given.
19855if test ${with_ssl+y}
19856then :
19857  withval=$with_ssl;
19858
19859else $as_nop
19860
19861            withval="yes"
19862
19863fi
19864
19865    if test x_$withval = x_no; then
19866	as_fn_error $? "Need SSL library to do digital signature cryptography" "$LINENO" 5
19867    fi
19868
19869    withval=$withval
19870    if test x_$withval != x_no; then
19871        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for SSL" >&5
19872printf %s "checking for SSL... " >&6; }
19873	if test -n "$withval"; then
19874										if test ! -f "$withval/include/openssl/ssl.h" -a -f "$withval/openssl/ssl.h"; then
19875			ssldir="$withval"
19876			found_ssl="yes"
19877			withval=""
19878			ssldir_include="$ssldir"
19879						ssldir_lib=`echo $ssldir | sed -e 's/include/lib/'`
19880			if test -f "$ssldir_lib/libssl.a" -o -f "$ssldir_lib/libssl.so"; then
19881				: # found here
19882			else
19883				ssldir_lib=`echo $ssldir | sed -e 's/include/lib64/'`
19884				if test -f "$ssldir_lib/libssl.a" -o -f "$ssldir_lib/libssl.so"; then
19885					: # found here
19886				else
19887					as_fn_error $? "Could not find openssl lib file, $ssldir_lib/libssl.so,a, pass like \"/usr/local\" or \"/usr/include/openssl11\"" "$LINENO" 5
19888				fi
19889			fi
19890		fi
19891	fi
19892        if test x_$withval = x_ -o x_$withval = x_yes; then
19893            withval="/usr/local/ssl /usr/lib/ssl /usr/ssl /usr/pkg /usr/local /opt/local /usr/sfw /usr"
19894        fi
19895        for dir in $withval; do
19896            ssldir="$dir"
19897            if test -f "$dir/include/openssl/ssl.h"; then
19898                found_ssl="yes"
19899		ssldir_include="$ssldir/include"
19900		if test ! -d "$ssldir/lib" -a -d "$ssldir/lib64"; then
19901			ssldir_lib="$ssldir/lib64"
19902		else
19903			ssldir_lib="$ssldir/lib"
19904		fi
19905                break;
19906            fi
19907        done
19908        if test x_$found_ssl != x_yes; then
19909            as_fn_error $? "Cannot find the SSL libraries in $withval" "$LINENO" 5
19910        else
19911            { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: found in $ssldir" >&5
19912printf "%s\n" "found in $ssldir" >&6; }
19913
19914printf "%s\n" "#define HAVE_SSL /**/" >>confdefs.h
19915
19916            HAVE_SSL=yes
19917	                if test "$ssldir" != "/usr"; then
19918		    CPPFLAGS="$CPPFLAGS -I$ssldir_include"
19919		    LIBSSL_CPPFLAGS="$LIBSSL_CPPFLAGS -I$ssldir_include"
19920		    LDFLAGS="$LDFLAGS -L$ssldir_lib"
19921		    LIBSSL_LDFLAGS="$LIBSSL_LDFLAGS -L$ssldir_lib"
19922
19923	if test "x$enable_rpath" = xyes; then
19924		if echo "$ssldir_lib" | grep "^/" >/dev/null; then
19925			RUNTIME_PATH="$RUNTIME_PATH -R$ssldir_lib"
19926		fi
19927	fi
19928
19929	    fi
19930
19931            { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for EVP_sha256 in -lcrypto" >&5
19932printf %s "checking for EVP_sha256 in -lcrypto... " >&6; }
19933            LIBS="$LIBS -lcrypto"
19934            LIBSSL_LIBS="$LIBSSL_LIBS -lcrypto"
19935            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19936/* end confdefs.h.  */
19937
19938int
19939main (void)
19940{
19941
19942                int EVP_sha256(void);
19943                (void)EVP_sha256();
19944
19945  ;
19946  return 0;
19947}
19948_ACEOF
19949if ac_fn_c_try_link "$LINENO"
19950then :
19951
19952                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19953printf "%s\n" "yes" >&6; }
19954
19955printf "%s\n" "#define HAVE_EVP_SHA256 1" >>confdefs.h
19956
19957
19958else $as_nop
19959
19960                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
19961printf "%s\n" "no" >&6; }
19962                # check if -lwsock32 or -lgdi32 are needed.
19963                BAKLIBS="$LIBS"
19964                BAKSSLLIBS="$LIBSSL_LIBS"
19965		LIBS="$LIBS -lgdi32 -lws2_32"
19966		LIBSSL_LIBS="$LIBSSL_LIBS -lgdi32 -lws2_32"
19967                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if -lcrypto needs -lgdi32" >&5
19968printf %s "checking if -lcrypto needs -lgdi32... " >&6; }
19969                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19970/* end confdefs.h.  */
19971
19972int
19973main (void)
19974{
19975
19976                    int EVP_sha256(void);
19977                    (void)EVP_sha256();
19978
19979  ;
19980  return 0;
19981}
19982_ACEOF
19983if ac_fn_c_try_link "$LINENO"
19984then :
19985
19986
19987printf "%s\n" "#define HAVE_EVP_SHA256 1" >>confdefs.h
19988
19989                    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19990printf "%s\n" "yes" >&6; }
19991
19992else $as_nop
19993
19994                    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
19995printf "%s\n" "no" >&6; }
19996                    LIBS="$BAKLIBS"
19997                    LIBSSL_LIBS="$BAKSSLLIBS"
19998
19999		    LIBS="$LIBS -lgdi32 -lws2_32 -lcrypt32"
20000		    LIBSSL_LIBS="$LIBSSL_LIBS -lgdi32 -lws2_32 -lcrypt32"
20001                    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if -lcrypto needs -lgdi32 -lws2_32 -lcrypt32" >&5
20002printf %s "checking if -lcrypto needs -lgdi32 -lws2_32 -lcrypt32... " >&6; }
20003		    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20004/* end confdefs.h.  */
20005
20006int
20007main (void)
20008{
20009
20010			int EVP_sha256(void);
20011			(void)EVP_sha256();
20012
20013  ;
20014  return 0;
20015}
20016_ACEOF
20017if ac_fn_c_try_link "$LINENO"
20018then :
20019
20020
20021printf "%s\n" "#define HAVE_EVP_SHA256 1" >>confdefs.h
20022
20023			{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
20024printf "%s\n" "yes" >&6; }
20025
20026else $as_nop
20027
20028			{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
20029printf "%s\n" "no" >&6; }
20030			LIBS="$BAKLIBS"
20031			LIBSSL_LIBS="$BAKSSLLIBS"
20032
20033			LIBS="$LIBS -lgdi32 -lws2_32 -lcrypt32 -l:libssp.a"
20034			LIBSSL_LIBS="$LIBSSL_LIBS -lgdi32 -lws2_32 -lcrypt32 -l:libssp.a"
20035			{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if -lcrypto needs -lgdi32 -lws2_32 -lcrypt32 -l:libssp.a" >&5
20036printf %s "checking if -lcrypto needs -lgdi32 -lws2_32 -lcrypt32 -l:libssp.a... " >&6; }
20037			cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20038/* end confdefs.h.  */
20039
20040int
20041main (void)
20042{
20043
20044			    int EVP_sha256(void);
20045			    (void)EVP_sha256();
20046
20047  ;
20048  return 0;
20049}
20050_ACEOF
20051if ac_fn_c_try_link "$LINENO"
20052then :
20053
20054
20055printf "%s\n" "#define HAVE_EVP_SHA256 1" >>confdefs.h
20056
20057			    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
20058printf "%s\n" "yes" >&6; }
20059
20060else $as_nop
20061
20062			    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
20063printf "%s\n" "no" >&6; }
20064			    LIBS="$BAKLIBS"
20065			    LIBSSL_LIBS="$BAKSSLLIBS"
20066
20067			    LIBS="$LIBS -ldl"
20068			    LIBSSL_LIBS="$LIBSSL_LIBS -ldl"
20069			    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if -lcrypto needs -ldl" >&5
20070printf %s "checking if -lcrypto needs -ldl... " >&6; }
20071			    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20072/* end confdefs.h.  */
20073
20074int
20075main (void)
20076{
20077
20078				int EVP_sha256(void);
20079				(void)EVP_sha256();
20080
20081  ;
20082  return 0;
20083}
20084_ACEOF
20085if ac_fn_c_try_link "$LINENO"
20086then :
20087
20088
20089printf "%s\n" "#define HAVE_EVP_SHA256 1" >>confdefs.h
20090
20091				{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
20092printf "%s\n" "yes" >&6; }
20093
20094else $as_nop
20095
20096				{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
20097printf "%s\n" "no" >&6; }
20098				LIBS="$BAKLIBS"
20099				LIBSSL_LIBS="$BAKSSLLIBS"
20100				LIBS="$LIBS -ldl -pthread"
20101				LIBSSL_LIBS="$LIBSSL_LIBS -ldl -pthread"
20102				{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if -lcrypto needs -ldl -pthread" >&5
20103printf %s "checking if -lcrypto needs -ldl -pthread... " >&6; }
20104				cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20105/* end confdefs.h.  */
20106
20107int
20108main (void)
20109{
20110
20111				    int EVP_sha256(void);
20112				    (void)EVP_sha256();
20113
20114  ;
20115  return 0;
20116}
20117_ACEOF
20118if ac_fn_c_try_link "$LINENO"
20119then :
20120
20121
20122printf "%s\n" "#define HAVE_EVP_SHA256 1" >>confdefs.h
20123
20124				    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
20125printf "%s\n" "yes" >&6; }
20126
20127else $as_nop
20128
20129				    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
20130printf "%s\n" "no" >&6; }
20131				    as_fn_error $? "OpenSSL found in $ssldir, but version 0.9.7 or higher is required" "$LINENO" 5
20132
20133fi
20134rm -f core conftest.err conftest.$ac_objext conftest.beam \
20135    conftest$ac_exeext conftest.$ac_ext
20136
20137fi
20138rm -f core conftest.err conftest.$ac_objext conftest.beam \
20139    conftest$ac_exeext conftest.$ac_ext
20140
20141fi
20142rm -f core conftest.err conftest.$ac_objext conftest.beam \
20143    conftest$ac_exeext conftest.$ac_ext
20144
20145fi
20146rm -f core conftest.err conftest.$ac_objext conftest.beam \
20147    conftest$ac_exeext conftest.$ac_ext
20148
20149fi
20150rm -f core conftest.err conftest.$ac_objext conftest.beam \
20151    conftest$ac_exeext conftest.$ac_ext
20152
20153fi
20154rm -f core conftest.err conftest.$ac_objext conftest.beam \
20155    conftest$ac_exeext conftest.$ac_ext
20156        fi
20157
20158
20159    fi
20160ac_fn_c_check_header_compile "$LINENO" "openssl/ssl.h" "ac_cv_header_openssl_ssl_h" "$ac_includes_default
20161"
20162if test "x$ac_cv_header_openssl_ssl_h" = xyes
20163then :
20164  printf "%s\n" "#define HAVE_OPENSSL_SSL_H 1" >>confdefs.h
20165
20166fi
20167
20168ac_fn_c_check_header_compile "$LINENO" "openssl/err.h" "ac_cv_header_openssl_err_h" "$ac_includes_default
20169"
20170if test "x$ac_cv_header_openssl_err_h" = xyes
20171then :
20172  printf "%s\n" "#define HAVE_OPENSSL_ERR_H 1" >>confdefs.h
20173
20174fi
20175
20176ac_fn_c_check_header_compile "$LINENO" "openssl/rand.h" "ac_cv_header_openssl_rand_h" "$ac_includes_default
20177"
20178if test "x$ac_cv_header_openssl_rand_h" = xyes
20179then :
20180  printf "%s\n" "#define HAVE_OPENSSL_RAND_H 1" >>confdefs.h
20181
20182fi
20183
20184
20185
20186
20187# check if libssl needs libdl
20188BAKLIBS="$LIBS"
20189LIBS="-lssl $LIBS"
20190{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if libssl needs libdl" >&5
20191printf %s "checking if libssl needs libdl... " >&6; }
20192cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20193/* end confdefs.h.  */
20194
20195/* Override any GCC internal prototype to avoid an error.
20196   Use char because int might match the return type of a GCC
20197   builtin and then its argument prototype would still apply.  */
20198char SSL_CTX_new ();
20199int
20200main (void)
20201{
20202return SSL_CTX_new ();
20203  ;
20204  return 0;
20205}
20206_ACEOF
20207if ac_fn_c_try_link "$LINENO"
20208then :
20209
20210	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
20211printf "%s\n" "no" >&6; }
20212	LIBS="$BAKLIBS"
20213
20214else $as_nop
20215
20216	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
20217printf "%s\n" "yes" >&6; }
20218	LIBS="$BAKLIBS"
20219	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
20220printf %s "checking for library containing dlopen... " >&6; }
20221if test ${ac_cv_search_dlopen+y}
20222then :
20223  printf %s "(cached) " >&6
20224else $as_nop
20225  ac_func_search_save_LIBS=$LIBS
20226cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20227/* end confdefs.h.  */
20228
20229/* Override any GCC internal prototype to avoid an error.
20230   Use char because int might match the return type of a GCC
20231   builtin and then its argument prototype would still apply.  */
20232char dlopen ();
20233int
20234main (void)
20235{
20236return dlopen ();
20237  ;
20238  return 0;
20239}
20240_ACEOF
20241for ac_lib in '' dl
20242do
20243  if test -z "$ac_lib"; then
20244    ac_res="none required"
20245  else
20246    ac_res=-l$ac_lib
20247    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
20248  fi
20249  if ac_fn_c_try_link "$LINENO"
20250then :
20251  ac_cv_search_dlopen=$ac_res
20252fi
20253rm -f core conftest.err conftest.$ac_objext conftest.beam \
20254    conftest$ac_exeext
20255  if test ${ac_cv_search_dlopen+y}
20256then :
20257  break
20258fi
20259done
20260if test ${ac_cv_search_dlopen+y}
20261then :
20262
20263else $as_nop
20264  ac_cv_search_dlopen=no
20265fi
20266rm conftest.$ac_ext
20267LIBS=$ac_func_search_save_LIBS
20268fi
20269{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
20270printf "%s\n" "$ac_cv_search_dlopen" >&6; }
20271ac_res=$ac_cv_search_dlopen
20272if test "$ac_res" != no
20273then :
20274  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
20275
20276fi
20277
20278
20279fi
20280rm -f core conftest.err conftest.$ac_objext conftest.beam \
20281    conftest$ac_exeext conftest.$ac_ext
20282SSLLIB="-lssl"
20283
20284PC_CRYPTO_DEPENDENCY=""
20285
20286
20287# check if -lcrypt32 is needed because CAPIENG needs that. (on windows)
20288BAKLIBS="$LIBS"
20289LIBS="-lssl $LIBS"
20290{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if libssl needs -lcrypt32" >&5
20291printf %s "checking if libssl needs -lcrypt32... " >&6; }
20292cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20293/* end confdefs.h.  */
20294
20295int
20296main (void)
20297{
20298
20299	int EVP_sha256(void);
20300	(void)EVP_sha256();
20301
20302  ;
20303  return 0;
20304}
20305_ACEOF
20306if ac_fn_c_try_link "$LINENO"
20307then :
20308
20309	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
20310printf "%s\n" "no" >&6; }
20311	LIBS="$BAKLIBS"
20312
20313else $as_nop
20314
20315	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
20316printf "%s\n" "yes" >&6; }
20317	LIBS="$BAKLIBS"
20318	LIBS="$LIBS -lcrypt32"
20319
20320fi
20321rm -f core conftest.err conftest.$ac_objext conftest.beam \
20322    conftest$ac_exeext conftest.$ac_ext
20323
20324{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for LibreSSL" >&5
20325printf %s "checking for LibreSSL... " >&6; }
20326if grep VERSION_TEXT $ssldir_include/openssl/opensslv.h | grep "LibreSSL" >/dev/null; then
20327	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
20328printf "%s\n" "yes" >&6; }
20329
20330printf "%s\n" "#define HAVE_LIBRESSL 1" >>confdefs.h
20331
20332	# libressl provides these compat functions, but they may also be
20333	# declared by the OS in libc.  See if they have been declared.
20334	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC options needed to detect all undeclared functions" >&5
20335printf %s "checking for $CC options needed to detect all undeclared functions... " >&6; }
20336if test ${ac_cv_c_undeclared_builtin_options+y}
20337then :
20338  printf %s "(cached) " >&6
20339else $as_nop
20340  ac_save_CFLAGS=$CFLAGS
20341   ac_cv_c_undeclared_builtin_options='cannot detect'
20342   for ac_arg in '' -fno-builtin; do
20343     CFLAGS="$ac_save_CFLAGS $ac_arg"
20344     # This test program should *not* compile successfully.
20345     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20346/* end confdefs.h.  */
20347
20348int
20349main (void)
20350{
20351(void) strchr;
20352  ;
20353  return 0;
20354}
20355_ACEOF
20356if ac_fn_c_try_compile "$LINENO"
20357then :
20358
20359else $as_nop
20360  # This test program should compile successfully.
20361        # No library function is consistently available on
20362        # freestanding implementations, so test against a dummy
20363        # declaration.  Include always-available headers on the
20364        # off chance that they somehow elicit warnings.
20365        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20366/* end confdefs.h.  */
20367#include <float.h>
20368#include <limits.h>
20369#include <stdarg.h>
20370#include <stddef.h>
20371extern void ac_decl (int, char *);
20372
20373int
20374main (void)
20375{
20376(void) ac_decl (0, (char *) 0);
20377  (void) ac_decl;
20378
20379  ;
20380  return 0;
20381}
20382_ACEOF
20383if ac_fn_c_try_compile "$LINENO"
20384then :
20385  if test x"$ac_arg" = x
20386then :
20387  ac_cv_c_undeclared_builtin_options='none needed'
20388else $as_nop
20389  ac_cv_c_undeclared_builtin_options=$ac_arg
20390fi
20391          break
20392fi
20393rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
20394fi
20395rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
20396    done
20397    CFLAGS=$ac_save_CFLAGS
20398
20399fi
20400{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_undeclared_builtin_options" >&5
20401printf "%s\n" "$ac_cv_c_undeclared_builtin_options" >&6; }
20402  case $ac_cv_c_undeclared_builtin_options in #(
20403  'cannot detect') :
20404    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
20405printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
20406as_fn_error $? "cannot make $CC report undeclared builtins
20407See \`config.log' for more details" "$LINENO" 5; } ;; #(
20408  'none needed') :
20409    ac_c_undeclared_builtin_options='' ;; #(
20410  *) :
20411    ac_c_undeclared_builtin_options=$ac_cv_c_undeclared_builtin_options ;;
20412esac
20413
20414ac_fn_check_decl "$LINENO" "strlcpy" "ac_cv_have_decl_strlcpy" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
20415if test "x$ac_cv_have_decl_strlcpy" = xyes
20416then :
20417  ac_have_decl=1
20418else $as_nop
20419  ac_have_decl=0
20420fi
20421printf "%s\n" "#define HAVE_DECL_STRLCPY $ac_have_decl" >>confdefs.h
20422ac_fn_check_decl "$LINENO" "strlcat" "ac_cv_have_decl_strlcat" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
20423if test "x$ac_cv_have_decl_strlcat" = xyes
20424then :
20425  ac_have_decl=1
20426else $as_nop
20427  ac_have_decl=0
20428fi
20429printf "%s\n" "#define HAVE_DECL_STRLCAT $ac_have_decl" >>confdefs.h
20430ac_fn_check_decl "$LINENO" "arc4random" "ac_cv_have_decl_arc4random" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
20431if test "x$ac_cv_have_decl_arc4random" = xyes
20432then :
20433  ac_have_decl=1
20434else $as_nop
20435  ac_have_decl=0
20436fi
20437printf "%s\n" "#define HAVE_DECL_ARC4RANDOM $ac_have_decl" >>confdefs.h
20438ac_fn_check_decl "$LINENO" "arc4random_uniform" "ac_cv_have_decl_arc4random_uniform" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
20439if test "x$ac_cv_have_decl_arc4random_uniform" = xyes
20440then :
20441  ac_have_decl=1
20442else $as_nop
20443  ac_have_decl=0
20444fi
20445printf "%s\n" "#define HAVE_DECL_ARC4RANDOM_UNIFORM $ac_have_decl" >>confdefs.h
20446
20447else
20448	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
20449printf "%s\n" "no" >&6; }
20450fi
20451ac_fn_c_check_header_compile "$LINENO" "openssl/conf.h" "ac_cv_header_openssl_conf_h" "$ac_includes_default
20452"
20453if test "x$ac_cv_header_openssl_conf_h" = xyes
20454then :
20455  printf "%s\n" "#define HAVE_OPENSSL_CONF_H 1" >>confdefs.h
20456
20457fi
20458ac_fn_c_check_header_compile "$LINENO" "openssl/engine.h" "ac_cv_header_openssl_engine_h" "$ac_includes_default
20459"
20460if test "x$ac_cv_header_openssl_engine_h" = xyes
20461then :
20462  printf "%s\n" "#define HAVE_OPENSSL_ENGINE_H 1" >>confdefs.h
20463
20464fi
20465ac_fn_c_check_header_compile "$LINENO" "openssl/bn.h" "ac_cv_header_openssl_bn_h" "$ac_includes_default
20466"
20467if test "x$ac_cv_header_openssl_bn_h" = xyes
20468then :
20469  printf "%s\n" "#define HAVE_OPENSSL_BN_H 1" >>confdefs.h
20470
20471fi
20472ac_fn_c_check_header_compile "$LINENO" "openssl/dh.h" "ac_cv_header_openssl_dh_h" "$ac_includes_default
20473"
20474if test "x$ac_cv_header_openssl_dh_h" = xyes
20475then :
20476  printf "%s\n" "#define HAVE_OPENSSL_DH_H 1" >>confdefs.h
20477
20478fi
20479ac_fn_c_check_header_compile "$LINENO" "openssl/dsa.h" "ac_cv_header_openssl_dsa_h" "$ac_includes_default
20480"
20481if test "x$ac_cv_header_openssl_dsa_h" = xyes
20482then :
20483  printf "%s\n" "#define HAVE_OPENSSL_DSA_H 1" >>confdefs.h
20484
20485fi
20486ac_fn_c_check_header_compile "$LINENO" "openssl/rsa.h" "ac_cv_header_openssl_rsa_h" "$ac_includes_default
20487"
20488if test "x$ac_cv_header_openssl_rsa_h" = xyes
20489then :
20490  printf "%s\n" "#define HAVE_OPENSSL_RSA_H 1" >>confdefs.h
20491
20492fi
20493ac_fn_c_check_header_compile "$LINENO" "openssl/core_names.h" "ac_cv_header_openssl_core_names_h" "$ac_includes_default
20494"
20495if test "x$ac_cv_header_openssl_core_names_h" = xyes
20496then :
20497  printf "%s\n" "#define HAVE_OPENSSL_CORE_NAMES_H 1" >>confdefs.h
20498
20499fi
20500ac_fn_c_check_header_compile "$LINENO" "openssl/param_build.h" "ac_cv_header_openssl_param_build_h" "$ac_includes_default
20501"
20502if test "x$ac_cv_header_openssl_param_build_h" = xyes
20503then :
20504  printf "%s\n" "#define HAVE_OPENSSL_PARAM_BUILD_H 1" >>confdefs.h
20505
20506fi
20507
20508ac_fn_c_check_func "$LINENO" "OPENSSL_config" "ac_cv_func_OPENSSL_config"
20509if test "x$ac_cv_func_OPENSSL_config" = xyes
20510then :
20511  printf "%s\n" "#define HAVE_OPENSSL_CONFIG 1" >>confdefs.h
20512
20513fi
20514ac_fn_c_check_func "$LINENO" "EVP_sha1" "ac_cv_func_EVP_sha1"
20515if test "x$ac_cv_func_EVP_sha1" = xyes
20516then :
20517  printf "%s\n" "#define HAVE_EVP_SHA1 1" >>confdefs.h
20518
20519fi
20520ac_fn_c_check_func "$LINENO" "EVP_sha256" "ac_cv_func_EVP_sha256"
20521if test "x$ac_cv_func_EVP_sha256" = xyes
20522then :
20523  printf "%s\n" "#define HAVE_EVP_SHA256 1" >>confdefs.h
20524
20525fi
20526ac_fn_c_check_func "$LINENO" "EVP_sha512" "ac_cv_func_EVP_sha512"
20527if test "x$ac_cv_func_EVP_sha512" = xyes
20528then :
20529  printf "%s\n" "#define HAVE_EVP_SHA512 1" >>confdefs.h
20530
20531fi
20532ac_fn_c_check_func "$LINENO" "FIPS_mode" "ac_cv_func_FIPS_mode"
20533if test "x$ac_cv_func_FIPS_mode" = xyes
20534then :
20535  printf "%s\n" "#define HAVE_FIPS_MODE 1" >>confdefs.h
20536
20537fi
20538ac_fn_c_check_func "$LINENO" "EVP_default_properties_is_fips_enabled" "ac_cv_func_EVP_default_properties_is_fips_enabled"
20539if test "x$ac_cv_func_EVP_default_properties_is_fips_enabled" = xyes
20540then :
20541  printf "%s\n" "#define HAVE_EVP_DEFAULT_PROPERTIES_IS_FIPS_ENABLED 1" >>confdefs.h
20542
20543fi
20544ac_fn_c_check_func "$LINENO" "EVP_MD_CTX_new" "ac_cv_func_EVP_MD_CTX_new"
20545if test "x$ac_cv_func_EVP_MD_CTX_new" = xyes
20546then :
20547  printf "%s\n" "#define HAVE_EVP_MD_CTX_NEW 1" >>confdefs.h
20548
20549fi
20550ac_fn_c_check_func "$LINENO" "OpenSSL_add_all_digests" "ac_cv_func_OpenSSL_add_all_digests"
20551if test "x$ac_cv_func_OpenSSL_add_all_digests" = xyes
20552then :
20553  printf "%s\n" "#define HAVE_OPENSSL_ADD_ALL_DIGESTS 1" >>confdefs.h
20554
20555fi
20556ac_fn_c_check_func "$LINENO" "OPENSSL_init_crypto" "ac_cv_func_OPENSSL_init_crypto"
20557if test "x$ac_cv_func_OPENSSL_init_crypto" = xyes
20558then :
20559  printf "%s\n" "#define HAVE_OPENSSL_INIT_CRYPTO 1" >>confdefs.h
20560
20561fi
20562ac_fn_c_check_func "$LINENO" "EVP_cleanup" "ac_cv_func_EVP_cleanup"
20563if test "x$ac_cv_func_EVP_cleanup" = xyes
20564then :
20565  printf "%s\n" "#define HAVE_EVP_CLEANUP 1" >>confdefs.h
20566
20567fi
20568ac_fn_c_check_func "$LINENO" "ENGINE_cleanup" "ac_cv_func_ENGINE_cleanup"
20569if test "x$ac_cv_func_ENGINE_cleanup" = xyes
20570then :
20571  printf "%s\n" "#define HAVE_ENGINE_CLEANUP 1" >>confdefs.h
20572
20573fi
20574ac_fn_c_check_func "$LINENO" "ERR_load_crypto_strings" "ac_cv_func_ERR_load_crypto_strings"
20575if test "x$ac_cv_func_ERR_load_crypto_strings" = xyes
20576then :
20577  printf "%s\n" "#define HAVE_ERR_LOAD_CRYPTO_STRINGS 1" >>confdefs.h
20578
20579fi
20580ac_fn_c_check_func "$LINENO" "CRYPTO_cleanup_all_ex_data" "ac_cv_func_CRYPTO_cleanup_all_ex_data"
20581if test "x$ac_cv_func_CRYPTO_cleanup_all_ex_data" = xyes
20582then :
20583  printf "%s\n" "#define HAVE_CRYPTO_CLEANUP_ALL_EX_DATA 1" >>confdefs.h
20584
20585fi
20586ac_fn_c_check_func "$LINENO" "ERR_free_strings" "ac_cv_func_ERR_free_strings"
20587if test "x$ac_cv_func_ERR_free_strings" = xyes
20588then :
20589  printf "%s\n" "#define HAVE_ERR_FREE_STRINGS 1" >>confdefs.h
20590
20591fi
20592ac_fn_c_check_func "$LINENO" "RAND_cleanup" "ac_cv_func_RAND_cleanup"
20593if test "x$ac_cv_func_RAND_cleanup" = xyes
20594then :
20595  printf "%s\n" "#define HAVE_RAND_CLEANUP 1" >>confdefs.h
20596
20597fi
20598ac_fn_c_check_func "$LINENO" "DSA_SIG_set0" "ac_cv_func_DSA_SIG_set0"
20599if test "x$ac_cv_func_DSA_SIG_set0" = xyes
20600then :
20601  printf "%s\n" "#define HAVE_DSA_SIG_SET0 1" >>confdefs.h
20602
20603fi
20604ac_fn_c_check_func "$LINENO" "EVP_dss1" "ac_cv_func_EVP_dss1"
20605if test "x$ac_cv_func_EVP_dss1" = xyes
20606then :
20607  printf "%s\n" "#define HAVE_EVP_DSS1 1" >>confdefs.h
20608
20609fi
20610ac_fn_c_check_func "$LINENO" "EVP_DigestVerify" "ac_cv_func_EVP_DigestVerify"
20611if test "x$ac_cv_func_EVP_DigestVerify" = xyes
20612then :
20613  printf "%s\n" "#define HAVE_EVP_DIGESTVERIFY 1" >>confdefs.h
20614
20615fi
20616ac_fn_c_check_func "$LINENO" "EVP_aes_256_cbc" "ac_cv_func_EVP_aes_256_cbc"
20617if test "x$ac_cv_func_EVP_aes_256_cbc" = xyes
20618then :
20619  printf "%s\n" "#define HAVE_EVP_AES_256_CBC 1" >>confdefs.h
20620
20621fi
20622ac_fn_c_check_func "$LINENO" "EVP_EncryptInit_ex" "ac_cv_func_EVP_EncryptInit_ex"
20623if test "x$ac_cv_func_EVP_EncryptInit_ex" = xyes
20624then :
20625  printf "%s\n" "#define HAVE_EVP_ENCRYPTINIT_EX 1" >>confdefs.h
20626
20627fi
20628ac_fn_c_check_func "$LINENO" "HMAC_Init_ex" "ac_cv_func_HMAC_Init_ex"
20629if test "x$ac_cv_func_HMAC_Init_ex" = xyes
20630then :
20631  printf "%s\n" "#define HAVE_HMAC_INIT_EX 1" >>confdefs.h
20632
20633fi
20634ac_fn_c_check_func "$LINENO" "CRYPTO_THREADID_set_callback" "ac_cv_func_CRYPTO_THREADID_set_callback"
20635if test "x$ac_cv_func_CRYPTO_THREADID_set_callback" = xyes
20636then :
20637  printf "%s\n" "#define HAVE_CRYPTO_THREADID_SET_CALLBACK 1" >>confdefs.h
20638
20639fi
20640ac_fn_c_check_func "$LINENO" "EVP_MAC_CTX_set_params" "ac_cv_func_EVP_MAC_CTX_set_params"
20641if test "x$ac_cv_func_EVP_MAC_CTX_set_params" = xyes
20642then :
20643  printf "%s\n" "#define HAVE_EVP_MAC_CTX_SET_PARAMS 1" >>confdefs.h
20644
20645fi
20646ac_fn_c_check_func "$LINENO" "OSSL_PARAM_BLD_new" "ac_cv_func_OSSL_PARAM_BLD_new"
20647if test "x$ac_cv_func_OSSL_PARAM_BLD_new" = xyes
20648then :
20649  printf "%s\n" "#define HAVE_OSSL_PARAM_BLD_NEW 1" >>confdefs.h
20650
20651fi
20652ac_fn_c_check_func "$LINENO" "BIO_set_callback_ex" "ac_cv_func_BIO_set_callback_ex"
20653if test "x$ac_cv_func_BIO_set_callback_ex" = xyes
20654then :
20655  printf "%s\n" "#define HAVE_BIO_SET_CALLBACK_EX 1" >>confdefs.h
20656
20657fi
20658
20659
20660# these check_funcs need -lssl
20661BAKLIBS="$LIBS"
20662LIBS="-lssl $LIBS"
20663ac_fn_c_check_func "$LINENO" "OPENSSL_init_ssl" "ac_cv_func_OPENSSL_init_ssl"
20664if test "x$ac_cv_func_OPENSSL_init_ssl" = xyes
20665then :
20666  printf "%s\n" "#define HAVE_OPENSSL_INIT_SSL 1" >>confdefs.h
20667
20668fi
20669ac_fn_c_check_func "$LINENO" "SSL_CTX_set_security_level" "ac_cv_func_SSL_CTX_set_security_level"
20670if test "x$ac_cv_func_SSL_CTX_set_security_level" = xyes
20671then :
20672  printf "%s\n" "#define HAVE_SSL_CTX_SET_SECURITY_LEVEL 1" >>confdefs.h
20673
20674fi
20675ac_fn_c_check_func "$LINENO" "SSL_set1_host" "ac_cv_func_SSL_set1_host"
20676if test "x$ac_cv_func_SSL_set1_host" = xyes
20677then :
20678  printf "%s\n" "#define HAVE_SSL_SET1_HOST 1" >>confdefs.h
20679
20680fi
20681ac_fn_c_check_func "$LINENO" "SSL_get0_peername" "ac_cv_func_SSL_get0_peername"
20682if test "x$ac_cv_func_SSL_get0_peername" = xyes
20683then :
20684  printf "%s\n" "#define HAVE_SSL_GET0_PEERNAME 1" >>confdefs.h
20685
20686fi
20687ac_fn_c_check_func "$LINENO" "X509_VERIFY_PARAM_set1_host" "ac_cv_func_X509_VERIFY_PARAM_set1_host"
20688if test "x$ac_cv_func_X509_VERIFY_PARAM_set1_host" = xyes
20689then :
20690  printf "%s\n" "#define HAVE_X509_VERIFY_PARAM_SET1_HOST 1" >>confdefs.h
20691
20692fi
20693ac_fn_c_check_func "$LINENO" "SSL_CTX_set_ciphersuites" "ac_cv_func_SSL_CTX_set_ciphersuites"
20694if test "x$ac_cv_func_SSL_CTX_set_ciphersuites" = xyes
20695then :
20696  printf "%s\n" "#define HAVE_SSL_CTX_SET_CIPHERSUITES 1" >>confdefs.h
20697
20698fi
20699ac_fn_c_check_func "$LINENO" "SSL_CTX_set_tlsext_ticket_key_evp_cb" "ac_cv_func_SSL_CTX_set_tlsext_ticket_key_evp_cb"
20700if test "x$ac_cv_func_SSL_CTX_set_tlsext_ticket_key_evp_cb" = xyes
20701then :
20702  printf "%s\n" "#define HAVE_SSL_CTX_SET_TLSEXT_TICKET_KEY_EVP_CB 1" >>confdefs.h
20703
20704fi
20705ac_fn_c_check_func "$LINENO" "SSL_CTX_set_alpn_select_cb" "ac_cv_func_SSL_CTX_set_alpn_select_cb"
20706if test "x$ac_cv_func_SSL_CTX_set_alpn_select_cb" = xyes
20707then :
20708  printf "%s\n" "#define HAVE_SSL_CTX_SET_ALPN_SELECT_CB 1" >>confdefs.h
20709
20710fi
20711ac_fn_c_check_func "$LINENO" "SSL_get0_alpn_selected" "ac_cv_func_SSL_get0_alpn_selected"
20712if test "x$ac_cv_func_SSL_get0_alpn_selected" = xyes
20713then :
20714  printf "%s\n" "#define HAVE_SSL_GET0_ALPN_SELECTED 1" >>confdefs.h
20715
20716fi
20717ac_fn_c_check_func "$LINENO" "SSL_CTX_set_alpn_protos" "ac_cv_func_SSL_CTX_set_alpn_protos"
20718if test "x$ac_cv_func_SSL_CTX_set_alpn_protos" = xyes
20719then :
20720  printf "%s\n" "#define HAVE_SSL_CTX_SET_ALPN_PROTOS 1" >>confdefs.h
20721
20722fi
20723ac_fn_c_check_func "$LINENO" "SSL_get1_peer_certificate" "ac_cv_func_SSL_get1_peer_certificate"
20724if test "x$ac_cv_func_SSL_get1_peer_certificate" = xyes
20725then :
20726  printf "%s\n" "#define HAVE_SSL_GET1_PEER_CERTIFICATE 1" >>confdefs.h
20727
20728fi
20729
20730LIBS="$BAKLIBS"
20731
20732ac_fn_check_decl "$LINENO" "SSL_COMP_get_compression_methods" "ac_cv_have_decl_SSL_COMP_get_compression_methods" "
20733$ac_includes_default
20734#ifdef HAVE_OPENSSL_ERR_H
20735#include <openssl/err.h>
20736#endif
20737
20738#ifdef HAVE_OPENSSL_RAND_H
20739#include <openssl/rand.h>
20740#endif
20741
20742#ifdef HAVE_OPENSSL_CONF_H
20743#include <openssl/conf.h>
20744#endif
20745
20746#ifdef HAVE_OPENSSL_ENGINE_H
20747#include <openssl/engine.h>
20748#endif
20749#include <openssl/ssl.h>
20750#include <openssl/evp.h>
20751
20752" "$ac_c_undeclared_builtin_options" "CFLAGS"
20753if test "x$ac_cv_have_decl_SSL_COMP_get_compression_methods" = xyes
20754then :
20755  ac_have_decl=1
20756else $as_nop
20757  ac_have_decl=0
20758fi
20759printf "%s\n" "#define HAVE_DECL_SSL_COMP_GET_COMPRESSION_METHODS $ac_have_decl" >>confdefs.h
20760ac_fn_check_decl "$LINENO" "sk_SSL_COMP_pop_free" "ac_cv_have_decl_sk_SSL_COMP_pop_free" "
20761$ac_includes_default
20762#ifdef HAVE_OPENSSL_ERR_H
20763#include <openssl/err.h>
20764#endif
20765
20766#ifdef HAVE_OPENSSL_RAND_H
20767#include <openssl/rand.h>
20768#endif
20769
20770#ifdef HAVE_OPENSSL_CONF_H
20771#include <openssl/conf.h>
20772#endif
20773
20774#ifdef HAVE_OPENSSL_ENGINE_H
20775#include <openssl/engine.h>
20776#endif
20777#include <openssl/ssl.h>
20778#include <openssl/evp.h>
20779
20780" "$ac_c_undeclared_builtin_options" "CFLAGS"
20781if test "x$ac_cv_have_decl_sk_SSL_COMP_pop_free" = xyes
20782then :
20783  ac_have_decl=1
20784else $as_nop
20785  ac_have_decl=0
20786fi
20787printf "%s\n" "#define HAVE_DECL_SK_SSL_COMP_POP_FREE $ac_have_decl" >>confdefs.h
20788ac_fn_check_decl "$LINENO" "SSL_CTX_set_ecdh_auto" "ac_cv_have_decl_SSL_CTX_set_ecdh_auto" "
20789$ac_includes_default
20790#ifdef HAVE_OPENSSL_ERR_H
20791#include <openssl/err.h>
20792#endif
20793
20794#ifdef HAVE_OPENSSL_RAND_H
20795#include <openssl/rand.h>
20796#endif
20797
20798#ifdef HAVE_OPENSSL_CONF_H
20799#include <openssl/conf.h>
20800#endif
20801
20802#ifdef HAVE_OPENSSL_ENGINE_H
20803#include <openssl/engine.h>
20804#endif
20805#include <openssl/ssl.h>
20806#include <openssl/evp.h>
20807
20808" "$ac_c_undeclared_builtin_options" "CFLAGS"
20809if test "x$ac_cv_have_decl_SSL_CTX_set_ecdh_auto" = xyes
20810then :
20811  ac_have_decl=1
20812else $as_nop
20813  ac_have_decl=0
20814fi
20815printf "%s\n" "#define HAVE_DECL_SSL_CTX_SET_ECDH_AUTO $ac_have_decl" >>confdefs.h
20816
20817
20818if test "$ac_cv_func_HMAC_Init_ex" = "yes"; then
20819# check function return type.
20820{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking the return type of HMAC_Init_ex" >&5
20821printf %s "checking the return type of HMAC_Init_ex... " >&6; }
20822cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20823/* end confdefs.h.  */
20824
20825#ifdef HAVE_OPENSSL_ERR_H
20826#include <openssl/err.h>
20827#endif
20828
20829#ifdef HAVE_OPENSSL_RAND_H
20830#include <openssl/rand.h>
20831#endif
20832
20833#ifdef HAVE_OPENSSL_CONF_H
20834#include <openssl/conf.h>
20835#endif
20836
20837#ifdef HAVE_OPENSSL_ENGINE_H
20838#include <openssl/engine.h>
20839#endif
20840#include <openssl/ssl.h>
20841#include <openssl/evp.h>
20842
20843int
20844main (void)
20845{
20846
20847	HMAC_CTX* hmac_ctx = NULL;
20848	void* hmac_key = NULL;
20849	const EVP_MD* digest = NULL;
20850	int x = HMAC_Init_ex(hmac_ctx, hmac_key, 32, digest, NULL);
20851	(void)x;
20852
20853  ;
20854  return 0;
20855}
20856_ACEOF
20857if ac_fn_c_try_compile "$LINENO"
20858then :
20859
20860	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: int" >&5
20861printf "%s\n" "int" >&6; }
20862
20863else $as_nop
20864
20865	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: void" >&5
20866printf "%s\n" "void" >&6; }
20867
20868printf "%s\n" "#define HMAC_INIT_EX_RETURNS_VOID 1" >>confdefs.h
20869
20870
20871fi
20872rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
20873fi
20874
20875fi
20876
20877
20878# libbsd
20879
20880# Check whether --with-libbsd was given.
20881if test ${with_libbsd+y}
20882then :
20883  withval=$with_libbsd;
20884	ac_fn_c_check_header_compile "$LINENO" "bsd/string.h" "ac_cv_header_bsd_string_h" "$ac_includes_default
20885"
20886if test "x$ac_cv_header_bsd_string_h" = xyes
20887then :
20888  printf "%s\n" "#define HAVE_BSD_STRING_H 1" >>confdefs.h
20889
20890fi
20891ac_fn_c_check_header_compile "$LINENO" "bsd/stdlib.h" "ac_cv_header_bsd_stdlib_h" "$ac_includes_default
20892"
20893if test "x$ac_cv_header_bsd_stdlib_h" = xyes
20894then :
20895  printf "%s\n" "#define HAVE_BSD_STDLIB_H 1" >>confdefs.h
20896
20897fi
20898
20899	if test "x$ac_cv_header_bsd_string_h" = xyes -a "x$ac_cv_header_bsd_stdlib_h" = xyes; then
20900		for func in strlcpy strlcat arc4random arc4random_uniform reallocarray; do
20901			as_ac_Search=`printf "%s\n" "ac_cv_search_$func" | $as_tr_sh`
20902{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing $func" >&5
20903printf %s "checking for library containing $func... " >&6; }
20904if eval test \${$as_ac_Search+y}
20905then :
20906  printf %s "(cached) " >&6
20907else $as_nop
20908  ac_func_search_save_LIBS=$LIBS
20909cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20910/* end confdefs.h.  */
20911
20912/* Override any GCC internal prototype to avoid an error.
20913   Use char because int might match the return type of a GCC
20914   builtin and then its argument prototype would still apply.  */
20915char $func ();
20916int
20917main (void)
20918{
20919return $func ();
20920  ;
20921  return 0;
20922}
20923_ACEOF
20924for ac_lib in '' bsd
20925do
20926  if test -z "$ac_lib"; then
20927    ac_res="none required"
20928  else
20929    ac_res=-l$ac_lib
20930    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
20931  fi
20932  if ac_fn_c_try_link "$LINENO"
20933then :
20934  eval "$as_ac_Search=\$ac_res"
20935fi
20936rm -f core conftest.err conftest.$ac_objext conftest.beam \
20937    conftest$ac_exeext
20938  if eval test \${$as_ac_Search+y}
20939then :
20940  break
20941fi
20942done
20943if eval test \${$as_ac_Search+y}
20944then :
20945
20946else $as_nop
20947  eval "$as_ac_Search=no"
20948fi
20949rm conftest.$ac_ext
20950LIBS=$ac_func_search_save_LIBS
20951fi
20952eval ac_res=\$$as_ac_Search
20953	       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
20954printf "%s\n" "$ac_res" >&6; }
20955eval ac_res=\$$as_ac_Search
20956if test "$ac_res" != no
20957then :
20958  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
20959
20960
20961printf "%s\n" "#define HAVE_LIBBSD 1" >>confdefs.h
20962
20963				PC_LIBBSD_DEPENDENCY=libbsd
20964
20965
20966fi
20967
20968		done
20969	fi
20970
20971fi
20972
20973
20974# Check whether --enable-sha1 was given.
20975if test ${enable_sha1+y}
20976then :
20977  enableval=$enable_sha1;
20978fi
20979
20980case "$enable_sha1" in
20981	no)
20982	;;
20983	yes|*)
20984
20985printf "%s\n" "#define USE_SHA1 1" >>confdefs.h
20986
20987	;;
20988esac
20989
20990
20991# Check whether --enable-sha2 was given.
20992if test ${enable_sha2+y}
20993then :
20994  enableval=$enable_sha2;
20995fi
20996
20997case "$enable_sha2" in
20998	no)
20999	;;
21000	yes|*)
21001
21002printf "%s\n" "#define USE_SHA2 1" >>confdefs.h
21003
21004	;;
21005esac
21006
21007# Check whether --enable-subnet was given.
21008if test ${enable_subnet+y}
21009then :
21010  enableval=$enable_subnet;
21011fi
21012
21013case "$enable_subnet" in
21014	yes)
21015
21016printf "%s\n" "#define CLIENT_SUBNET 1" >>confdefs.h
21017
21018	SUBNET_OBJ="edns-subnet.lo subnetmod.lo addrtree.lo subnet-whitelist.lo"
21019
21020	SUBNET_HEADER='$(srcdir)/edns-subnet/subnetmod.h $(srcdir)/edns-subnet/edns-subnet.h $(srcdir)/edns-subnet/subnet-whitelist.h $(srcdir)/edns-subnet/addrtree.h'
21021
21022	;;
21023	no|*)
21024	;;
21025esac
21026
21027# check whether gost also works
21028
21029# Check whether --enable-gost was given.
21030if test ${enable_gost+y}
21031then :
21032  enableval=$enable_gost;
21033fi
21034
21035use_gost="no"
21036if test $USE_NSS = "no" -a $USE_NETTLE = "no"; then
21037case "$enable_gost" in
21038	no)
21039	;;
21040	*)
21041	ac_fn_c_check_func "$LINENO" "EVP_PKEY_set_type_str" "ac_cv_func_EVP_PKEY_set_type_str"
21042if test "x$ac_cv_func_EVP_PKEY_set_type_str" = xyes
21043then :
21044  :
21045else $as_nop
21046  as_fn_error $? "OpenSSL 1.0.0 is needed for GOST support" "$LINENO" 5
21047fi
21048
21049	ac_fn_c_check_func "$LINENO" "EC_KEY_new" "ac_cv_func_EC_KEY_new"
21050if test "x$ac_cv_func_EC_KEY_new" = xyes
21051then :
21052
21053else $as_nop
21054  as_fn_error $? "OpenSSL does not support ECC, needed for GOST support" "$LINENO" 5
21055fi
21056
21057
21058{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if GOST works" >&5
21059printf %s "checking if GOST works... " >&6; }
21060if test c${cross_compiling} = cno; then
21061BAKCFLAGS="$CFLAGS"
21062if test -n "$ssldir"; then
21063	CFLAGS="$CFLAGS -Wl,-rpath,$ssldir_lib"
21064fi
21065if test "$cross_compiling" = yes
21066then :
21067  eval "ac_cv_c_gost_works=maybe"
21068else $as_nop
21069  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21070/* end confdefs.h.  */
21071
21072#include <string.h>
21073#include <openssl/ssl.h>
21074#include <openssl/evp.h>
21075#include <openssl/engine.h>
21076#include <openssl/conf.h>
21077/* routine to load gost (from sldns) */
21078int load_gost_id(void)
21079{
21080	static int gost_id = 0;
21081	const EVP_PKEY_ASN1_METHOD* meth;
21082	ENGINE* e;
21083
21084	if(gost_id) return gost_id;
21085
21086	/* see if configuration loaded gost implementation from other engine*/
21087	meth = EVP_PKEY_asn1_find_str(NULL, "gost2001", -1);
21088	if(meth) {
21089		EVP_PKEY_asn1_get0_info(&gost_id, NULL, NULL, NULL, NULL, meth);
21090		return gost_id;
21091	}
21092
21093	/* see if engine can be loaded already */
21094	e = ENGINE_by_id("gost");
21095	if(!e) {
21096		/* load it ourself, in case statically linked */
21097		ENGINE_load_builtin_engines();
21098		ENGINE_load_dynamic();
21099		e = ENGINE_by_id("gost");
21100	}
21101	if(!e) {
21102		/* no gost engine in openssl */
21103		return 0;
21104	}
21105	if(!ENGINE_set_default(e, ENGINE_METHOD_ALL)) {
21106		ENGINE_finish(e);
21107		ENGINE_free(e);
21108		return 0;
21109	}
21110
21111	meth = EVP_PKEY_asn1_find_str(&e, "gost2001", -1);
21112	if(!meth) {
21113		/* algo not found */
21114		ENGINE_finish(e);
21115		ENGINE_free(e);
21116		return 0;
21117	}
21118	EVP_PKEY_asn1_get0_info(&gost_id, NULL, NULL, NULL, NULL, meth);
21119	return gost_id;
21120}
21121int main(void) {
21122	EVP_MD_CTX* ctx;
21123	const EVP_MD* md;
21124	unsigned char digest[64]; /* its a 256-bit digest, so uses 32 bytes */
21125	const char* str = "Hello world";
21126	const unsigned char check[] = {
21127		0x40 , 0xed , 0xf8 , 0x56 , 0x5a , 0xc5 , 0x36 , 0xe1 ,
21128		0x33 , 0x7c , 0x7e , 0x87 , 0x62 , 0x1c , 0x42 , 0xe0 ,
21129		0x17 , 0x1b , 0x5e , 0xce , 0xa8 , 0x46 , 0x65 , 0x4d ,
21130		0x8d , 0x3e , 0x22 , 0x9b , 0xe1 , 0x30 , 0x19 , 0x9d
21131	};
21132	OPENSSL_config(NULL);
21133	(void)load_gost_id();
21134	md = EVP_get_digestbyname("md_gost94");
21135	if(!md) return 1;
21136	memset(digest, 0, sizeof(digest));
21137	ctx = EVP_MD_CTX_create();
21138	if(!ctx) return 2;
21139	if(!EVP_DigestInit_ex(ctx, md, NULL)) return 3;
21140	if(!EVP_DigestUpdate(ctx, str, 10)) return 4;
21141	if(!EVP_DigestFinal_ex(ctx, digest, NULL)) return 5;
21142	/* uncomment to see the hash calculated.
21143		{int i;
21144		for(i=0; i<32; i++)
21145			printf(" %2.2x", (int)digest[i]);
21146		printf("\n");}
21147	*/
21148	if(memcmp(digest, check, sizeof(check)) != 0)
21149		return 6;
21150	return 0;
21151}
21152
21153_ACEOF
21154if ac_fn_c_try_run "$LINENO"
21155then :
21156  eval "ac_cv_c_gost_works=yes"
21157else $as_nop
21158  eval "ac_cv_c_gost_works=no"
21159fi
21160rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21161  conftest.$ac_objext conftest.beam conftest.$ac_ext
21162fi
21163
21164CFLAGS="$BAKCFLAGS"
21165else
21166eval "ac_cv_c_gost_works=maybe"
21167fi
21168{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_gost_works" >&5
21169printf "%s\n" "$ac_cv_c_gost_works" >&6; }
21170
21171	if test "$ac_cv_c_gost_works" != no; then
21172		use_gost="yes"
21173
21174printf "%s\n" "#define USE_GOST 1" >>confdefs.h
21175
21176	fi
21177	;;
21178esac
21179fi
21180# Check whether --enable-ecdsa was given.
21181if test ${enable_ecdsa+y}
21182then :
21183  enableval=$enable_ecdsa;
21184fi
21185
21186use_ecdsa="no"
21187case "$enable_ecdsa" in
21188    no)
21189      ;;
21190    *)
21191      if test $USE_NSS = "no" -a $USE_NETTLE = "no"; then
21192	      ac_fn_c_check_func "$LINENO" "ECDSA_sign" "ac_cv_func_ECDSA_sign"
21193if test "x$ac_cv_func_ECDSA_sign" = xyes
21194then :
21195
21196else $as_nop
21197  as_fn_error $? "OpenSSL does not support ECDSA: please upgrade or rerun with --disable-ecdsa" "$LINENO" 5
21198fi
21199
21200	      ac_fn_c_check_func "$LINENO" "SHA384_Init" "ac_cv_func_SHA384_Init"
21201if test "x$ac_cv_func_SHA384_Init" = xyes
21202then :
21203
21204else $as_nop
21205  as_fn_error $? "OpenSSL does not support SHA384: please upgrade or rerun with --disable-ecdsa" "$LINENO" 5
21206fi
21207
21208	      ac_fn_check_decl "$LINENO" "NID_X9_62_prime256v1" "ac_cv_have_decl_NID_X9_62_prime256v1" "$ac_includes_default
21209#include <openssl/evp.h>
21210
21211" "$ac_c_undeclared_builtin_options" "CFLAGS"
21212if test "x$ac_cv_have_decl_NID_X9_62_prime256v1" = xyes
21213then :
21214  ac_have_decl=1
21215else $as_nop
21216  ac_have_decl=0
21217fi
21218printf "%s\n" "#define HAVE_DECL_NID_X9_62_PRIME256V1 $ac_have_decl" >>confdefs.h
21219if test $ac_have_decl = 1
21220then :
21221
21222else $as_nop
21223  as_fn_error $? "OpenSSL does not support the ECDSA curves: please upgrade or rerun with --disable-ecdsa" "$LINENO" 5
21224fi
21225ac_fn_check_decl "$LINENO" "NID_secp384r1" "ac_cv_have_decl_NID_secp384r1" "$ac_includes_default
21226#include <openssl/evp.h>
21227
21228" "$ac_c_undeclared_builtin_options" "CFLAGS"
21229if test "x$ac_cv_have_decl_NID_secp384r1" = xyes
21230then :
21231  ac_have_decl=1
21232else $as_nop
21233  ac_have_decl=0
21234fi
21235printf "%s\n" "#define HAVE_DECL_NID_SECP384R1 $ac_have_decl" >>confdefs.h
21236if test $ac_have_decl = 1
21237then :
21238
21239else $as_nop
21240  as_fn_error $? "OpenSSL does not support the ECDSA curves: please upgrade or rerun with --disable-ecdsa" "$LINENO" 5
21241fi
21242
21243	      # see if OPENSSL 1.0.0 or later (has EVP MD and Verify independency)
21244	      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if openssl supports SHA2 and ECDSA with EVP" >&5
21245printf %s "checking if openssl supports SHA2 and ECDSA with EVP... " >&6; }
21246	      if grep OPENSSL_VERSION_TEXT $ssldir_include/openssl/opensslv.h | grep "OpenSSL" >/dev/null; then
21247		if grep OPENSSL_VERSION_NUMBER $ssldir_include/openssl/opensslv.h | grep 0x0 >/dev/null; then
21248		  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
21249printf "%s\n" "no" >&6; }
21250
21251printf "%s\n" "#define USE_ECDSA_EVP_WORKAROUND 1" >>confdefs.h
21252
21253		else
21254		  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
21255printf "%s\n" "yes" >&6; }
21256		fi
21257	      else
21258		# not OpenSSL, thus likely LibreSSL, which supports it
21259		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
21260printf "%s\n" "yes" >&6; }
21261	      fi
21262      fi
21263      # we now know we have ECDSA and the required curves.
21264
21265printf "%s\n" "#define USE_ECDSA 1" >>confdefs.h
21266
21267      use_ecdsa="yes"
21268      ;;
21269esac
21270
21271# Check whether --enable-dsa was given.
21272if test ${enable_dsa+y}
21273then :
21274  enableval=$enable_dsa;
21275fi
21276
21277use_dsa="no"
21278case "$enable_dsa" in
21279    yes)
21280      # detect if DSA is supported, and turn it off if not.
21281      if test $USE_NSS = "no" -a $USE_NETTLE = "no"; then
21282      ac_fn_c_check_func "$LINENO" "DSA_SIG_new" "ac_cv_func_DSA_SIG_new"
21283if test "x$ac_cv_func_DSA_SIG_new" = xyes
21284then :
21285
21286      as_ac_Type=`printf "%s\n" "ac_cv_type_DSA_SIG*" | $as_tr_sh`
21287ac_fn_c_check_type "$LINENO" "DSA_SIG*" "$as_ac_Type" "
21288$ac_includes_default
21289#ifdef HAVE_OPENSSL_ERR_H
21290#include <openssl/err.h>
21291#endif
21292
21293#ifdef HAVE_OPENSSL_RAND_H
21294#include <openssl/rand.h>
21295#endif
21296
21297#ifdef HAVE_OPENSSL_CONF_H
21298#include <openssl/conf.h>
21299#endif
21300
21301#ifdef HAVE_OPENSSL_ENGINE_H
21302#include <openssl/engine.h>
21303#endif
21304
21305"
21306if eval test \"x\$"$as_ac_Type"\" = x"yes"
21307then :
21308
21309
21310printf "%s\n" "#define USE_DSA 1" >>confdefs.h
21311
21312
21313else $as_nop
21314  if test "x$enable_dsa" = "xyes"; then as_fn_error $? "OpenSSL does not support DSA and you used --enable-dsa." "$LINENO" 5
21315               fi
21316fi
21317
21318
21319else $as_nop
21320  if test "x$enable_dsa" = "xyes"; then as_fn_error $? "OpenSSL does not support DSA and you used --enable-dsa." "$LINENO" 5
21321               fi
21322fi
21323
21324      else
21325
21326printf "%s\n" "#define USE_DSA 1" >>confdefs.h
21327
21328      fi
21329      ;;
21330    *)
21331      # disable dsa by default, RFC 8624 section 3.1, validators MUST NOT
21332      # support DSA for DNSSEC Validation.
21333      ;;
21334esac
21335
21336
21337# Check whether --with-deprecate-rsa-1024 was given.
21338if test ${with_deprecate_rsa_1024+y}
21339then :
21340  withval=$with_deprecate_rsa_1024;
21341fi
21342
21343if test "$with_deprecate_rsa_1024" = "yes"; then
21344
21345printf "%s\n" "#define DEPRECATE_RSA_1024 1" >>confdefs.h
21346
21347fi
21348
21349# Check whether --enable-ed25519 was given.
21350if test ${enable_ed25519+y}
21351then :
21352  enableval=$enable_ed25519;
21353fi
21354
21355use_ed25519="no"
21356case "$enable_ed25519" in
21357    no)
21358      ;;
21359    *)
21360      if test $USE_NSS = "no" -a $USE_NETTLE = "no"; then
21361	      ac_fn_check_decl "$LINENO" "NID_ED25519" "ac_cv_have_decl_NID_ED25519" "$ac_includes_default
21362#include <openssl/evp.h>
21363
21364" "$ac_c_undeclared_builtin_options" "CFLAGS"
21365if test "x$ac_cv_have_decl_NID_ED25519" = xyes
21366then :
21367  ac_have_decl=1
21368else $as_nop
21369  ac_have_decl=0
21370fi
21371printf "%s\n" "#define HAVE_DECL_NID_ED25519 $ac_have_decl" >>confdefs.h
21372if test $ac_have_decl = 1
21373then :
21374
21375      		use_ed25519="yes"
21376
21377else $as_nop
21378   if test "x$enable_ed25519" = "xyes"; then as_fn_error $? "OpenSSL does not support ED25519 and you used --enable-ed25519." "$LINENO" 5
21379	      	fi
21380fi
21381
21382      fi
21383      if test $USE_NETTLE = "yes"; then
21384		       for ac_header in nettle/eddsa.h
21385do :
21386  ac_fn_c_check_header_compile "$LINENO" "nettle/eddsa.h" "ac_cv_header_nettle_eddsa_h" "$ac_includes_default
21387"
21388if test "x$ac_cv_header_nettle_eddsa_h" = xyes
21389then :
21390  printf "%s\n" "#define HAVE_NETTLE_EDDSA_H 1" >>confdefs.h
21391 use_ed25519="yes"
21392fi
21393
21394done
21395      fi
21396      if test $use_ed25519 = "yes"; then
21397
21398printf "%s\n" "#define USE_ED25519 1" >>confdefs.h
21399
21400      fi
21401      ;;
21402esac
21403
21404# Check whether --enable-ed448 was given.
21405if test ${enable_ed448+y}
21406then :
21407  enableval=$enable_ed448;
21408fi
21409
21410use_ed448="no"
21411case "$enable_ed448" in
21412    no)
21413      ;;
21414    *)
21415      if test $USE_NSS = "no" -a $USE_NETTLE = "no"; then
21416	      ac_fn_check_decl "$LINENO" "NID_ED448" "ac_cv_have_decl_NID_ED448" "$ac_includes_default
21417#include <openssl/evp.h>
21418
21419" "$ac_c_undeclared_builtin_options" "CFLAGS"
21420if test "x$ac_cv_have_decl_NID_ED448" = xyes
21421then :
21422  ac_have_decl=1
21423else $as_nop
21424  ac_have_decl=0
21425fi
21426printf "%s\n" "#define HAVE_DECL_NID_ED448 $ac_have_decl" >>confdefs.h
21427if test $ac_have_decl = 1
21428then :
21429
21430      		use_ed448="yes"
21431
21432else $as_nop
21433   if test "x$enable_ed448" = "xyes"; then as_fn_error $? "OpenSSL does not support ED448 and you used --enable-ed448." "$LINENO" 5
21434	      	fi
21435fi
21436
21437      fi
21438      if test $use_ed448 = "yes"; then
21439
21440printf "%s\n" "#define USE_ED448 1" >>confdefs.h
21441
21442      fi
21443      ;;
21444esac
21445
21446# Check whether --enable-event-api was given.
21447if test ${enable_event_api+y}
21448then :
21449  enableval=$enable_event_api;
21450fi
21451
21452case "$enable_event_api" in
21453    yes)
21454      UNBOUND_EVENT_INSTALL=unbound-event-install
21455
21456      UNBOUND_EVENT_UNINSTALL=unbound-event-uninstall
21457
21458      ;;
21459    *)
21460      ;;
21461esac
21462
21463# Check whether --enable-tfo-client was given.
21464if test ${enable_tfo_client+y}
21465then :
21466  enableval=$enable_tfo_client;
21467fi
21468
21469case "$enable_tfo_client" in
21470	yes)
21471		case "$host_os" in
21472			linux*) ac_fn_check_decl "$LINENO" "MSG_FASTOPEN" "ac_cv_have_decl_MSG_FASTOPEN" "$ac_includes_default
21473#include <netinet/tcp.h>
21474
21475" "$ac_c_undeclared_builtin_options" "CFLAGS"
21476if test "x$ac_cv_have_decl_MSG_FASTOPEN" = xyes
21477then :
21478  { 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
21479printf "%s\n" "$as_me: WARNING: Check the platform specific TFO kernel parameters are correctly configured to support client mode TFO" >&2;}
21480else $as_nop
21481  as_fn_error $? "TCP Fast Open is not available for client mode: please rerun without --enable-tfo-client" "$LINENO" 5
21482fi
21483
21484printf "%s\n" "#define USE_MSG_FASTOPEN 1" >>confdefs.h
21485
21486				;;
21487			darwin*) ac_fn_check_decl "$LINENO" "CONNECT_RESUME_ON_READ_WRITE" "ac_cv_have_decl_CONNECT_RESUME_ON_READ_WRITE" "$ac_includes_default
21488#include <sys/socket.h>
21489
21490" "$ac_c_undeclared_builtin_options" "CFLAGS"
21491if test "x$ac_cv_have_decl_CONNECT_RESUME_ON_READ_WRITE" = xyes
21492then :
21493  { 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
21494printf "%s\n" "$as_me: WARNING: Check the platform specific TFO kernel parameters are correctly configured to support client mode TFO" >&2;}
21495else $as_nop
21496  as_fn_error $? "TCP Fast Open is not available for client mode: please rerun without --enable-tfo-client" "$LINENO" 5
21497fi
21498
21499printf "%s\n" "#define USE_OSX_MSG_FASTOPEN 1" >>confdefs.h
21500
21501				;;
21502		esac
21503		;;
21504	no|*)
21505		;;
21506esac
21507
21508# Check whether --enable-tfo-server was given.
21509if test ${enable_tfo_server+y}
21510then :
21511  enableval=$enable_tfo_server;
21512fi
21513
21514case "$enable_tfo_server" in
21515	yes)
21516	      ac_fn_check_decl "$LINENO" "TCP_FASTOPEN" "ac_cv_have_decl_TCP_FASTOPEN" "$ac_includes_default
21517#include <netinet/tcp.h>
21518
21519" "$ac_c_undeclared_builtin_options" "CFLAGS"
21520if test "x$ac_cv_have_decl_TCP_FASTOPEN" = xyes
21521then :
21522  { 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
21523printf "%s\n" "$as_me: WARNING: Check the platform specific TFO kernel parameters are correctly configured to support server mode TFO" >&2;}
21524else $as_nop
21525  as_fn_error $? "TCP Fast Open is not available for server mode: please rerun without --enable-tfo-server" "$LINENO" 5
21526fi
21527
21528printf "%s\n" "#define USE_TCP_FASTOPEN 1" >>confdefs.h
21529
21530		;;
21531	no|*)
21532		;;
21533esac
21534
21535# check for libevent
21536
21537# Check whether --with-libevent was given.
21538if test ${with_libevent+y}
21539then :
21540  withval=$with_libevent;
21541else $as_nop
21542   with_libevent="no"
21543fi
21544
21545if test "x_$with_libevent" != x_no; then
21546
21547printf "%s\n" "#define USE_LIBEVENT 1" >>confdefs.h
21548
21549        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libevent" >&5
21550printf %s "checking for libevent... " >&6; }
21551        if test "x_$with_libevent" = x_ -o "x_$with_libevent" = x_yes; then
21552            with_libevent="/usr/local /opt/local /usr/lib /usr/pkg /usr/sfw /usr"
21553        fi
21554        for dir in $with_libevent; do
21555            thedir="$dir"
21556            if test -f "$dir/include/event.h" -o -f "$dir/include/event2/event.h"; then
21557                found_libevent="yes"
21558								if test "$thedir" != "/usr"; then
21559				    CPPFLAGS="$CPPFLAGS -I$thedir/include"
21560				fi
21561				break;
21562		    fi
21563        done
21564        if test x_$found_libevent != x_yes; then
21565		if test -f "$dir/event.h" -a \( -f "$dir/libevent.la" -o -f "$dir/libev.la" \) ; then
21566			# libevent source directory
21567			{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: found in $thedir" >&5
21568printf "%s\n" "found in $thedir" >&6; }
21569			CPPFLAGS="$CPPFLAGS -I$thedir -I$thedir/include"
21570			BAK_LDFLAGS_SET="1"
21571			BAK_LDFLAGS="$LDFLAGS"
21572			# remove evdns from linking
21573			mkdir build >/dev/null 2>&1
21574			mkdir build/libevent >/dev/null 2>&1
21575			mkdir build/libevent/.libs >/dev/null 2>&1
21576			ev_files_o=`ls $thedir/*.o | grep -v evdns\.o | grep -v bufferevent_openssl\.o`
21577			ev_files_lo=`ls $thedir/*.lo | grep -v evdns\.lo | grep -v bufferevent_openssl\.lo`
21578			ev_files_libso=`ls $thedir/.libs/*.o | grep -v evdns\.o | grep -v bufferevent_openssl\.o`
21579			cp $ev_files_o build/libevent
21580			cp $ev_files_lo build/libevent
21581			cp $ev_files_libso build/libevent/.libs
21582			LATE_LDFLAGS="build/libevent/*.lo -lm"
21583			LDFLAGS="build/libevent/*.o $LDFLAGS -lm"
21584		else
21585            as_fn_error $? "Cannot find the libevent library in $with_libevent
21586You can restart ./configure --with-libevent=no to use a builtin alternative.
21587Please note that this alternative is not as capable as libevent when using
21588large outgoing port ranges.  " "$LINENO" 5
21589		fi
21590        else
21591            { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: found in $thedir" >&5
21592printf "%s\n" "found in $thedir" >&6; }
21593	    	    if test ! -f $thedir/lib/libevent.a -a ! -f $thedir/lib/libevent.so -a -d "$thedir/lib/event2"; then
21594		    LDFLAGS="$LDFLAGS -L$thedir/lib/event2"
21595
21596	if test "x$enable_rpath" = xyes; then
21597		if echo "$thedir/lib/event2" | grep "^/" >/dev/null; then
21598			RUNTIME_PATH="$RUNTIME_PATH -R$thedir/lib/event2"
21599		fi
21600	fi
21601
21602	    else
21603		    		    if test "$thedir" != "/usr" -a "$thedir" != ""; then
21604			LDFLAGS="$LDFLAGS -L$thedir/lib"
21605
21606	if test "x$enable_rpath" = xyes; then
21607		if echo "$thedir/lib" | grep "^/" >/dev/null; then
21608			RUNTIME_PATH="$RUNTIME_PATH -R$thedir/lib"
21609		fi
21610	fi
21611
21612		    fi
21613	    fi
21614        fi
21615	# check for library used by libevent after 1.3c
21616	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5
21617printf %s "checking for library containing clock_gettime... " >&6; }
21618if test ${ac_cv_search_clock_gettime+y}
21619then :
21620  printf %s "(cached) " >&6
21621else $as_nop
21622  ac_func_search_save_LIBS=$LIBS
21623cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21624/* end confdefs.h.  */
21625
21626/* Override any GCC internal prototype to avoid an error.
21627   Use char because int might match the return type of a GCC
21628   builtin and then its argument prototype would still apply.  */
21629char clock_gettime ();
21630int
21631main (void)
21632{
21633return clock_gettime ();
21634  ;
21635  return 0;
21636}
21637_ACEOF
21638for ac_lib in '' rt
21639do
21640  if test -z "$ac_lib"; then
21641    ac_res="none required"
21642  else
21643    ac_res=-l$ac_lib
21644    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
21645  fi
21646  if ac_fn_c_try_link "$LINENO"
21647then :
21648  ac_cv_search_clock_gettime=$ac_res
21649fi
21650rm -f core conftest.err conftest.$ac_objext conftest.beam \
21651    conftest$ac_exeext
21652  if test ${ac_cv_search_clock_gettime+y}
21653then :
21654  break
21655fi
21656done
21657if test ${ac_cv_search_clock_gettime+y}
21658then :
21659
21660else $as_nop
21661  ac_cv_search_clock_gettime=no
21662fi
21663rm conftest.$ac_ext
21664LIBS=$ac_func_search_save_LIBS
21665fi
21666{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5
21667printf "%s\n" "$ac_cv_search_clock_gettime" >&6; }
21668ac_res=$ac_cv_search_clock_gettime
21669if test "$ac_res" != no
21670then :
21671  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
21672
21673fi
21674
21675
21676	# is the event.h header libev or libevent?
21677	ac_fn_c_check_header_compile "$LINENO" "event.h" "ac_cv_header_event_h" "$ac_includes_default
21678"
21679if test "x$ac_cv_header_event_h" = xyes
21680then :
21681  printf "%s\n" "#define HAVE_EVENT_H 1" >>confdefs.h
21682
21683fi
21684
21685	ac_fn_check_decl "$LINENO" "EV_VERSION_MAJOR" "ac_cv_have_decl_EV_VERSION_MAJOR" "$ac_includes_default
21686#include <event.h>
21687
21688" "$ac_c_undeclared_builtin_options" "CFLAGS"
21689if test "x$ac_cv_have_decl_EV_VERSION_MAJOR" = xyes
21690then :
21691
21692		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing event_set" >&5
21693printf %s "checking for library containing event_set... " >&6; }
21694if test ${ac_cv_search_event_set+y}
21695then :
21696  printf %s "(cached) " >&6
21697else $as_nop
21698  ac_func_search_save_LIBS=$LIBS
21699cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21700/* end confdefs.h.  */
21701
21702/* Override any GCC internal prototype to avoid an error.
21703   Use char because int might match the return type of a GCC
21704   builtin and then its argument prototype would still apply.  */
21705char event_set ();
21706int
21707main (void)
21708{
21709return event_set ();
21710  ;
21711  return 0;
21712}
21713_ACEOF
21714for ac_lib in '' ev
21715do
21716  if test -z "$ac_lib"; then
21717    ac_res="none required"
21718  else
21719    ac_res=-l$ac_lib
21720    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
21721  fi
21722  if ac_fn_c_try_link "$LINENO"
21723then :
21724  ac_cv_search_event_set=$ac_res
21725fi
21726rm -f core conftest.err conftest.$ac_objext conftest.beam \
21727    conftest$ac_exeext
21728  if test ${ac_cv_search_event_set+y}
21729then :
21730  break
21731fi
21732done
21733if test ${ac_cv_search_event_set+y}
21734then :
21735
21736else $as_nop
21737  ac_cv_search_event_set=no
21738fi
21739rm conftest.$ac_ext
21740LIBS=$ac_func_search_save_LIBS
21741fi
21742{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_event_set" >&5
21743printf "%s\n" "$ac_cv_search_event_set" >&6; }
21744ac_res=$ac_cv_search_event_set
21745if test "$ac_res" != no
21746then :
21747  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
21748
21749fi
21750
21751
21752else $as_nop
21753
21754		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing event_set" >&5
21755printf %s "checking for library containing event_set... " >&6; }
21756if test ${ac_cv_search_event_set+y}
21757then :
21758  printf %s "(cached) " >&6
21759else $as_nop
21760  ac_func_search_save_LIBS=$LIBS
21761cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21762/* end confdefs.h.  */
21763
21764/* Override any GCC internal prototype to avoid an error.
21765   Use char because int might match the return type of a GCC
21766   builtin and then its argument prototype would still apply.  */
21767char event_set ();
21768int
21769main (void)
21770{
21771return event_set ();
21772  ;
21773  return 0;
21774}
21775_ACEOF
21776for ac_lib in '' event
21777do
21778  if test -z "$ac_lib"; then
21779    ac_res="none required"
21780  else
21781    ac_res=-l$ac_lib
21782    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
21783  fi
21784  if ac_fn_c_try_link "$LINENO"
21785then :
21786  ac_cv_search_event_set=$ac_res
21787fi
21788rm -f core conftest.err conftest.$ac_objext conftest.beam \
21789    conftest$ac_exeext
21790  if test ${ac_cv_search_event_set+y}
21791then :
21792  break
21793fi
21794done
21795if test ${ac_cv_search_event_set+y}
21796then :
21797
21798else $as_nop
21799  ac_cv_search_event_set=no
21800fi
21801rm conftest.$ac_ext
21802LIBS=$ac_func_search_save_LIBS
21803fi
21804{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_event_set" >&5
21805printf "%s\n" "$ac_cv_search_event_set" >&6; }
21806ac_res=$ac_cv_search_event_set
21807if test "$ac_res" != no
21808then :
21809  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
21810
21811fi
21812
21813
21814fi
21815	ac_fn_c_check_func "$LINENO" "event_base_free" "ac_cv_func_event_base_free"
21816if test "x$ac_cv_func_event_base_free" = xyes
21817then :
21818  printf "%s\n" "#define HAVE_EVENT_BASE_FREE 1" >>confdefs.h
21819
21820fi
21821 # only in libevent 1.2 and later
21822	ac_fn_c_check_func "$LINENO" "event_base_once" "ac_cv_func_event_base_once"
21823if test "x$ac_cv_func_event_base_once" = xyes
21824then :
21825  printf "%s\n" "#define HAVE_EVENT_BASE_ONCE 1" >>confdefs.h
21826
21827fi
21828 # only in libevent 1.4.1 and later
21829	ac_fn_c_check_func "$LINENO" "event_base_new" "ac_cv_func_event_base_new"
21830if test "x$ac_cv_func_event_base_new" = xyes
21831then :
21832  printf "%s\n" "#define HAVE_EVENT_BASE_NEW 1" >>confdefs.h
21833
21834fi
21835 # only in libevent 1.4.1 and later
21836	ac_fn_c_check_func "$LINENO" "event_base_get_method" "ac_cv_func_event_base_get_method"
21837if test "x$ac_cv_func_event_base_get_method" = xyes
21838then :
21839  printf "%s\n" "#define HAVE_EVENT_BASE_GET_METHOD 1" >>confdefs.h
21840
21841fi
21842 # only in libevent 1.4.3 and later
21843	ac_fn_c_check_func "$LINENO" "ev_loop" "ac_cv_func_ev_loop"
21844if test "x$ac_cv_func_ev_loop" = xyes
21845then :
21846  printf "%s\n" "#define HAVE_EV_LOOP 1" >>confdefs.h
21847
21848fi
21849 # only in libev. (tested on 3.51)
21850	ac_fn_c_check_func "$LINENO" "ev_default_loop" "ac_cv_func_ev_default_loop"
21851if test "x$ac_cv_func_ev_default_loop" = xyes
21852then :
21853  printf "%s\n" "#define HAVE_EV_DEFAULT_LOOP 1" >>confdefs.h
21854
21855fi
21856 # only in libev. (tested on 4.00)
21857	ac_fn_c_check_func "$LINENO" "event_assign" "ac_cv_func_event_assign"
21858if test "x$ac_cv_func_event_assign" = xyes
21859then :
21860  printf "%s\n" "#define HAVE_EVENT_ASSIGN 1" >>confdefs.h
21861
21862fi
21863 # in libevent, for thread-safety
21864	ac_fn_check_decl "$LINENO" "evsignal_assign" "ac_cv_have_decl_evsignal_assign" "$ac_includes_default
21865#ifdef HAVE_EVENT_H
21866#  include <event.h>
21867#else
21868#  include \"event2/event.h\"
21869#endif
21870
21871" "$ac_c_undeclared_builtin_options" "CFLAGS"
21872if test "x$ac_cv_have_decl_evsignal_assign" = xyes
21873then :
21874  ac_have_decl=1
21875else $as_nop
21876  ac_have_decl=0
21877fi
21878printf "%s\n" "#define HAVE_DECL_EVSIGNAL_ASSIGN $ac_have_decl" >>confdefs.h
21879
21880        PC_LIBEVENT_DEPENDENCY="libevent"
21881
21882	if test -n "$BAK_LDFLAGS_SET"; then
21883		LDFLAGS="$BAK_LDFLAGS"
21884	fi
21885else
21886
21887printf "%s\n" "#define USE_MINI_EVENT 1" >>confdefs.h
21888
21889fi
21890
21891# check for libexpat
21892
21893# Check whether --with-libexpat was given.
21894if test ${with_libexpat+y}
21895then :
21896  withval=$with_libexpat;
21897else $as_nop
21898   withval="/usr/local /opt/local /usr/lib /usr/pkg /usr/sfw /usr"
21899fi
21900
21901{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libexpat" >&5
21902printf %s "checking for libexpat... " >&6; }
21903found_libexpat="no"
21904for dir in $withval ; do
21905            if test -f "$dir/include/expat.h"; then
21906		found_libexpat="yes"
21907				if test "$dir" != "/usr"; then
21908                    CPPFLAGS="$CPPFLAGS -I$dir/include"
21909		    LDFLAGS="$LDFLAGS -L$dir/lib"
21910		fi
21911            	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: found in $dir" >&5
21912printf "%s\n" "found in $dir" >&6; }
21913                break;
21914            fi
21915done
21916if test x_$found_libexpat != x_yes; then
21917	as_fn_error $? "Could not find libexpat, expat.h" "$LINENO" 5
21918fi
21919ac_fn_c_check_header_compile "$LINENO" "expat.h" "ac_cv_header_expat_h" "$ac_includes_default
21920"
21921if test "x$ac_cv_header_expat_h" = xyes
21922then :
21923  printf "%s\n" "#define HAVE_EXPAT_H 1" >>confdefs.h
21924
21925fi
21926
21927ac_fn_check_decl "$LINENO" "XML_StopParser" "ac_cv_have_decl_XML_StopParser" "$ac_includes_default
21928#include <expat.h>
21929
21930" "$ac_c_undeclared_builtin_options" "CFLAGS"
21931if test "x$ac_cv_have_decl_XML_StopParser" = xyes
21932then :
21933  ac_have_decl=1
21934else $as_nop
21935  ac_have_decl=0
21936fi
21937printf "%s\n" "#define HAVE_DECL_XML_STOPPARSER $ac_have_decl" >>confdefs.h
21938
21939
21940# hiredis (redis C client for cachedb)
21941
21942# Check whether --with-libhiredis was given.
21943if test ${with_libhiredis+y}
21944then :
21945  withval=$with_libhiredis;
21946else $as_nop
21947   withval="no"
21948fi
21949
21950found_libhiredis="no"
21951if test x_$withval = x_yes -o x_$withval != x_no; then
21952   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libhiredis" >&5
21953printf %s "checking for libhiredis... " >&6; }
21954   if test x_$withval = x_ -o x_$withval = x_yes; then
21955            withval="/usr/local /opt/local /usr/lib /usr/pkg /usr/sfw /usr"
21956   fi
21957   for dir in $withval ; do
21958            if test -f "$dir/include/hiredis/hiredis.h"; then
21959		found_libhiredis="yes"
21960				if test "$dir" != "/usr"; then
21961                    CPPFLAGS="$CPPFLAGS -I$dir/include"
21962		    LDFLAGS="$LDFLAGS -L$dir/lib"
21963		fi
21964		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: found in $dir" >&5
21965printf "%s\n" "found in $dir" >&6; }
21966
21967printf "%s\n" "#define USE_REDIS 1" >>confdefs.h
21968
21969		LIBS="$LIBS -lhiredis"
21970                break;
21971            fi
21972    done
21973    if test x_$found_libhiredis != x_yes; then
21974	as_fn_error $? "Could not find libhiredis, hiredis.h" "$LINENO" 5
21975    fi
21976    ac_fn_c_check_header_compile "$LINENO" "hiredis/hiredis.h" "ac_cv_header_hiredis_hiredis_h" "$ac_includes_default
21977"
21978if test "x$ac_cv_header_hiredis_hiredis_h" = xyes
21979then :
21980  printf "%s\n" "#define HAVE_HIREDIS_HIREDIS_H 1" >>confdefs.h
21981
21982fi
21983
21984    ac_fn_check_decl "$LINENO" "redisConnect" "ac_cv_have_decl_redisConnect" "$ac_includes_default
21985    #include <hiredis/hiredis.h>
21986
21987" "$ac_c_undeclared_builtin_options" "CFLAGS"
21988if test "x$ac_cv_have_decl_redisConnect" = xyes
21989then :
21990  ac_have_decl=1
21991else $as_nop
21992  ac_have_decl=0
21993fi
21994printf "%s\n" "#define HAVE_DECL_REDISCONNECT $ac_have_decl" >>confdefs.h
21995
21996fi
21997
21998# nghttp2
21999
22000# Check whether --with-libnghttp2 was given.
22001if test ${with_libnghttp2+y}
22002then :
22003  withval=$with_libnghttp2;
22004else $as_nop
22005   withval="no"
22006fi
22007
22008found_libnghttp2="no"
22009if test x_$withval = x_yes -o x_$withval != x_no; then
22010   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libnghttp2" >&5
22011printf %s "checking for libnghttp2... " >&6; }
22012   if test x_$withval = x_ -o x_$withval = x_yes; then
22013            withval="/usr/local /opt/local /usr/lib /usr/pkg /usr/sfw /usr"
22014   fi
22015   for dir in $withval ; do
22016            if test -f "$dir/include/nghttp2/nghttp2.h"; then
22017		found_libnghttp2="yes"
22018				if test "$dir" != "/usr"; then
22019                    CPPFLAGS="$CPPFLAGS -I$dir/include"
22020		    LDFLAGS="$LDFLAGS -L$dir/lib"
22021		fi
22022		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: found in $dir" >&5
22023printf "%s\n" "found in $dir" >&6; }
22024
22025printf "%s\n" "#define HAVE_NGHTTP2 1" >>confdefs.h
22026
22027		LIBS="$LIBS -lnghttp2"
22028                break;
22029            fi
22030    done
22031    if test x_$found_libnghttp2 != x_yes; then
22032	as_fn_error $? "Could not find libnghttp2, nghttp2.h" "$LINENO" 5
22033    fi
22034    ac_fn_c_check_header_compile "$LINENO" "nghttp2/nghttp2.h" "ac_cv_header_nghttp2_nghttp2_h" "$ac_includes_default
22035"
22036if test "x$ac_cv_header_nghttp2_nghttp2_h" = xyes
22037then :
22038  printf "%s\n" "#define HAVE_NGHTTP2_NGHTTP2_H 1" >>confdefs.h
22039
22040fi
22041
22042    ac_fn_check_decl "$LINENO" "nghttp2_session_server_new" "ac_cv_have_decl_nghttp2_session_server_new" "$ac_includes_default
22043    #include <nghttp2/nghttp2.h>
22044
22045" "$ac_c_undeclared_builtin_options" "CFLAGS"
22046if test "x$ac_cv_have_decl_nghttp2_session_server_new" = xyes
22047then :
22048  ac_have_decl=1
22049else $as_nop
22050  ac_have_decl=0
22051fi
22052printf "%s\n" "#define HAVE_DECL_NGHTTP2_SESSION_SERVER_NEW $ac_have_decl" >>confdefs.h
22053
22054fi
22055
22056# set static linking for uninstalled libraries if requested
22057
22058staticexe=""
22059# Check whether --enable-static-exe was given.
22060if test ${enable_static_exe+y}
22061then :
22062  enableval=$enable_static_exe;
22063fi
22064
22065if test x_$enable_static_exe = x_yes; then
22066	staticexe="-static"
22067	if test "$on_mingw" = yes; then
22068		staticexe="-all-static"
22069		# for static compile, include gdi32 and zlib here.
22070		if echo "$LIBS" | grep 'lgdi32' >/dev/null; then
22071			:
22072		else
22073			LIBS="$LIBS -lgdi32"
22074		fi
22075		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
22076printf %s "checking for compress in -lz... " >&6; }
22077if test ${ac_cv_lib_z_compress+y}
22078then :
22079  printf %s "(cached) " >&6
22080else $as_nop
22081  ac_check_lib_save_LIBS=$LIBS
22082LIBS="-lz  $LIBS"
22083cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22084/* end confdefs.h.  */
22085
22086/* Override any GCC internal prototype to avoid an error.
22087   Use char because int might match the return type of a GCC
22088   builtin and then its argument prototype would still apply.  */
22089char compress ();
22090int
22091main (void)
22092{
22093return compress ();
22094  ;
22095  return 0;
22096}
22097_ACEOF
22098if ac_fn_c_try_link "$LINENO"
22099then :
22100  ac_cv_lib_z_compress=yes
22101else $as_nop
22102  ac_cv_lib_z_compress=no
22103fi
22104rm -f core conftest.err conftest.$ac_objext conftest.beam \
22105    conftest$ac_exeext conftest.$ac_ext
22106LIBS=$ac_check_lib_save_LIBS
22107fi
22108{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
22109printf "%s\n" "$ac_cv_lib_z_compress" >&6; }
22110if test "x$ac_cv_lib_z_compress" = xyes
22111then :
22112   LIBS="$LIBS -lz"
22113fi
22114
22115		if echo "$LIBS" | grep -e "libssp.a" -e "lssp" >/dev/null; then
22116			:
22117		else
22118			LIBS="$LIBS -l:libssp.a"
22119		fi
22120	fi
22121fi
22122
22123# set full static linking if requested
22124# Check whether --enable-fully-static was given.
22125if test ${enable_fully_static+y}
22126then :
22127  enableval=$enable_fully_static;
22128fi
22129
22130if test x_$enable_fully_static = x_yes; then
22131	staticexe="-all-static"
22132	if test "$on_mingw" = yes; then
22133		# for static compile, include gdi32 and zlib here.
22134		if echo $LIBS | grep 'lgdi32' >/dev/null; then
22135			:
22136		else
22137			LIBS="$LIBS -lgdi32"
22138		fi
22139		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
22140printf %s "checking for compress in -lz... " >&6; }
22141if test ${ac_cv_lib_z_compress+y}
22142then :
22143  printf %s "(cached) " >&6
22144else $as_nop
22145  ac_check_lib_save_LIBS=$LIBS
22146LIBS="-lz  $LIBS"
22147cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22148/* end confdefs.h.  */
22149
22150/* Override any GCC internal prototype to avoid an error.
22151   Use char because int might match the return type of a GCC
22152   builtin and then its argument prototype would still apply.  */
22153char compress ();
22154int
22155main (void)
22156{
22157return compress ();
22158  ;
22159  return 0;
22160}
22161_ACEOF
22162if ac_fn_c_try_link "$LINENO"
22163then :
22164  ac_cv_lib_z_compress=yes
22165else $as_nop
22166  ac_cv_lib_z_compress=no
22167fi
22168rm -f core conftest.err conftest.$ac_objext conftest.beam \
22169    conftest$ac_exeext conftest.$ac_ext
22170LIBS=$ac_check_lib_save_LIBS
22171fi
22172{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
22173printf "%s\n" "$ac_cv_lib_z_compress" >&6; }
22174if test "x$ac_cv_lib_z_compress" = xyes
22175then :
22176   LIBS="$LIBS -lz"
22177fi
22178
22179		if echo "$LIBS" | grep -e "libssp.a" -e "lssp" >/dev/null; then
22180			:
22181		else
22182			LIBS="$LIBS -l:libssp.a"
22183		fi
22184	fi
22185fi
22186
22187# set lock checking if requested
22188# Check whether --enable-lock_checks was given.
22189if test ${enable_lock_checks+y}
22190then :
22191  enableval=$enable_lock_checks;
22192fi
22193
22194if test x_$enable_lock_checks = x_yes; then
22195
22196printf "%s\n" "#define ENABLE_LOCK_CHECKS 1" >>confdefs.h
22197
22198	CHECKLOCK_OBJ="checklocks.lo"
22199
22200fi
22201
22202
22203{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
22204printf %s "checking for getaddrinfo... " >&6; }
22205ac_cv_func_getaddrinfo=no
22206cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22207/* end confdefs.h.  */
22208
22209#ifdef __cplusplus
22210extern "C"
22211{
22212#endif
22213char* getaddrinfo();
22214char* (*f) () = getaddrinfo;
22215#ifdef __cplusplus
22216}
22217#endif
22218int main(void) {
22219        ;
22220        return 0;
22221}
22222
22223_ACEOF
22224if ac_fn_c_try_link "$LINENO"
22225then :
22226  ac_cv_func_getaddrinfo="yes"
22227if test "$ac_cv_header_windows_h" = "yes"; then
22228
22229printf "%s\n" "#define USE_WINSOCK 1" >>confdefs.h
22230
22231	USE_WINSOCK="1"
22232	if echo "$LIBS" | grep 'lws2_32' >/dev/null; then
22233		:
22234	else
22235		LIBS="$LIBS -lws2_32"
22236	fi
22237fi
22238
22239else $as_nop
22240  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22241/* end confdefs.h.  */
22242
22243#ifdef HAVE_WS2TCPIP_H
22244#include <ws2tcpip.h>
22245#endif
22246
22247int
22248main (void)
22249{
22250
22251        (void)getaddrinfo(NULL, NULL, NULL, NULL);
22252
22253
22254  ;
22255  return 0;
22256}
22257_ACEOF
22258if ac_fn_c_try_link "$LINENO"
22259then :
22260
22261ac_cv_func_getaddrinfo="yes"
22262
22263printf "%s\n" "#define USE_WINSOCK 1" >>confdefs.h
22264
22265USE_WINSOCK="1"
22266
22267else $as_nop
22268  ORIGLIBS="$LIBS"
22269LIBS="$LIBS -lws2_32"
22270cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22271/* end confdefs.h.  */
22272
22273#ifdef HAVE_WS2TCPIP_H
22274#include <ws2tcpip.h>
22275#endif
22276
22277int
22278main (void)
22279{
22280
22281        (void)getaddrinfo(NULL, NULL, NULL, NULL);
22282
22283
22284  ;
22285  return 0;
22286}
22287_ACEOF
22288if ac_fn_c_try_link "$LINENO"
22289then :
22290
22291ac_cv_func_getaddrinfo="yes"
22292
22293printf "%s\n" "#define USE_WINSOCK 1" >>confdefs.h
22294
22295USE_WINSOCK="1"
22296
22297else $as_nop
22298
22299ac_cv_func_getaddrinfo="no"
22300LIBS="$ORIGLIBS"
22301
22302fi
22303rm -f core conftest.err conftest.$ac_objext conftest.beam \
22304    conftest$ac_exeext conftest.$ac_ext
22305
22306fi
22307rm -f core conftest.err conftest.$ac_objext conftest.beam \
22308    conftest$ac_exeext conftest.$ac_ext
22309
22310fi
22311rm -f core conftest.err conftest.$ac_objext conftest.beam \
22312    conftest$ac_exeext conftest.$ac_ext
22313
22314{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_getaddrinfo" >&5
22315printf "%s\n" "$ac_cv_func_getaddrinfo" >&6; }
22316if test $ac_cv_func_getaddrinfo = yes; then
22317
22318printf "%s\n" "#define HAVE_GETADDRINFO 1" >>confdefs.h
22319
22320fi
22321
22322if test "$USE_WINSOCK" = 1; then
22323
22324printf "%s\n" "#define UB_ON_WINDOWS 1" >>confdefs.h
22325
22326	ac_fn_c_check_header_compile "$LINENO" "iphlpapi.h" "ac_cv_header_iphlpapi_h" "$ac_includes_default
22327#include <windows.h>
22328
22329"
22330if test "x$ac_cv_header_iphlpapi_h" = xyes
22331then :
22332  printf "%s\n" "#define HAVE_IPHLPAPI_H 1" >>confdefs.h
22333
22334fi
22335
22336	if test -n "$ac_tool_prefix"; then
22337  # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
22338set dummy ${ac_tool_prefix}windres; ac_word=$2
22339{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22340printf %s "checking for $ac_word... " >&6; }
22341if test ${ac_cv_prog_WINDRES+y}
22342then :
22343  printf %s "(cached) " >&6
22344else $as_nop
22345  if test -n "$WINDRES"; then
22346  ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
22347else
22348as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22349for as_dir in $PATH
22350do
22351  IFS=$as_save_IFS
22352  case $as_dir in #(((
22353    '') as_dir=./ ;;
22354    */) ;;
22355    *) as_dir=$as_dir/ ;;
22356  esac
22357    for ac_exec_ext in '' $ac_executable_extensions; do
22358  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
22359    ac_cv_prog_WINDRES="${ac_tool_prefix}windres"
22360    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
22361    break 2
22362  fi
22363done
22364  done
22365IFS=$as_save_IFS
22366
22367fi
22368fi
22369WINDRES=$ac_cv_prog_WINDRES
22370if test -n "$WINDRES"; then
22371  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $WINDRES" >&5
22372printf "%s\n" "$WINDRES" >&6; }
22373else
22374  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
22375printf "%s\n" "no" >&6; }
22376fi
22377
22378
22379fi
22380if test -z "$ac_cv_prog_WINDRES"; then
22381  ac_ct_WINDRES=$WINDRES
22382  # Extract the first word of "windres", so it can be a program name with args.
22383set dummy windres; ac_word=$2
22384{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22385printf %s "checking for $ac_word... " >&6; }
22386if test ${ac_cv_prog_ac_ct_WINDRES+y}
22387then :
22388  printf %s "(cached) " >&6
22389else $as_nop
22390  if test -n "$ac_ct_WINDRES"; then
22391  ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # Let the user override the test.
22392else
22393as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22394for as_dir in $PATH
22395do
22396  IFS=$as_save_IFS
22397  case $as_dir in #(((
22398    '') as_dir=./ ;;
22399    */) ;;
22400    *) as_dir=$as_dir/ ;;
22401  esac
22402    for ac_exec_ext in '' $ac_executable_extensions; do
22403  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
22404    ac_cv_prog_ac_ct_WINDRES="windres"
22405    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
22406    break 2
22407  fi
22408done
22409  done
22410IFS=$as_save_IFS
22411
22412fi
22413fi
22414ac_ct_WINDRES=$ac_cv_prog_ac_ct_WINDRES
22415if test -n "$ac_ct_WINDRES"; then
22416  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_WINDRES" >&5
22417printf "%s\n" "$ac_ct_WINDRES" >&6; }
22418else
22419  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
22420printf "%s\n" "no" >&6; }
22421fi
22422
22423  if test "x$ac_ct_WINDRES" = x; then
22424    WINDRES=""
22425  else
22426    case $cross_compiling:$ac_tool_warned in
22427yes:)
22428{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
22429printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
22430ac_tool_warned=yes ;;
22431esac
22432    WINDRES=$ac_ct_WINDRES
22433  fi
22434else
22435  WINDRES="$ac_cv_prog_WINDRES"
22436fi
22437
22438	if echo "$LIBS" | grep crypt32 >/dev/null; then
22439		LIBS="$LIBS -liphlpapi"
22440	else
22441		LIBS="$LIBS -liphlpapi -lcrypt32"
22442	fi
22443	WINAPPS="unbound-service-install.exe unbound-service-remove.exe anchor-update.exe"
22444
22445	WIN_DAEMON_SRC="winrc/win_svc.c winrc/w_inst.c"
22446
22447	WIN_DAEMON_OBJ="win_svc.lo w_inst.lo"
22448
22449	WIN_DAEMON_OBJ_LINK="rsrc_unbound.o"
22450
22451	WIN_HOST_OBJ_LINK="rsrc_unbound_host.o"
22452
22453	WIN_UBANCHOR_OBJ_LINK="rsrc_unbound_anchor.o log.lo locks.lo"
22454
22455	WIN_CONTROL_OBJ_LINK="rsrc_unbound_control.o"
22456
22457	WIN_CHECKCONF_OBJ_LINK="rsrc_unbound_checkconf.o"
22458
22459
22460printf "%s\n" "#define __USE_MINGW_ANSI_STDIO 1" >>confdefs.h
22461
22462fi
22463if test $ac_cv_func_getaddrinfo = no; then
22464	case " $LIBOBJS " in
22465  *" fake-rfc2553.$ac_objext "* ) ;;
22466  *) LIBOBJS="$LIBOBJS fake-rfc2553.$ac_objext"
22467 ;;
22468esac
22469
22470fi
22471# check after getaddrinfo for its libraries
22472
22473# check ioctlsocket
22474{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ioctlsocket" >&5
22475printf %s "checking for ioctlsocket... " >&6; }
22476cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22477/* end confdefs.h.  */
22478
22479#ifdef HAVE_WINSOCK2_H
22480#include <winsock2.h>
22481#endif
22482
22483int
22484main (void)
22485{
22486
22487	(void)ioctlsocket(0, 0, NULL);
22488
22489  ;
22490  return 0;
22491}
22492_ACEOF
22493if ac_fn_c_try_link "$LINENO"
22494then :
22495
22496{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
22497printf "%s\n" "yes" >&6; }
22498
22499printf "%s\n" "#define HAVE_IOCTLSOCKET 1" >>confdefs.h
22500
22501
22502else $as_nop
22503  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
22504printf "%s\n" "no" >&6; }
22505fi
22506rm -f core conftest.err conftest.$ac_objext conftest.beam \
22507    conftest$ac_exeext conftest.$ac_ext
22508
22509
22510# see if daemon(3) exists, and if it is deprecated.
22511ac_fn_c_check_func "$LINENO" "daemon" "ac_cv_func_daemon"
22512if test "x$ac_cv_func_daemon" = xyes
22513then :
22514  printf "%s\n" "#define HAVE_DAEMON 1" >>confdefs.h
22515
22516fi
22517
22518if test $ac_cv_func_daemon = yes; then
22519
22520
22521{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if daemon is deprecated" >&5
22522printf %s "checking if daemon is deprecated... " >&6; }
22523cache=`echo daemon | sed 'y%.=/+-%___p_%'`
22524if eval test \${cv_cc_deprecated_$cache+y}
22525then :
22526  printf %s "(cached) " >&6
22527else $as_nop
22528
22529echo '
22530#include <stdlib.h>
22531#include <unistd.h>
22532' >conftest.c
22533echo 'void f(void){ (void)daemon(0, 0); }' >>conftest.c
22534if test -z "`$CC $CPPFLAGS $CFLAGS -c conftest.c 2>&1 | grep -e deprecated -e unavailable`"; then
22535eval "cv_cc_deprecated_$cache=no"
22536else
22537eval "cv_cc_deprecated_$cache=yes"
22538fi
22539rm -f conftest conftest.o conftest.c
22540
22541fi
22542
22543if eval "test \"`echo '$cv_cc_deprecated_'$cache`\" = yes"; then
22544{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
22545printf "%s\n" "yes" >&6; }
22546
22547printf "%s\n" "#define DEPRECATED_DAEMON 1" >>confdefs.h
22548
22549:
22550
22551else
22552{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
22553printf "%s\n" "no" >&6; }
22554:
22555
22556fi
22557
22558fi
22559
22560ac_fn_c_check_member "$LINENO" "struct sockaddr_un" "sun_len" "ac_cv_member_struct_sockaddr_un_sun_len" "
22561$ac_includes_default
22562#ifdef HAVE_SYS_UN_H
22563#include <sys/un.h>
22564#endif
22565
22566"
22567if test "x$ac_cv_member_struct_sockaddr_un_sun_len" = xyes
22568then :
22569
22570printf "%s\n" "#define HAVE_STRUCT_SOCKADDR_UN_SUN_LEN 1" >>confdefs.h
22571
22572
22573fi
22574
22575ac_fn_c_check_member "$LINENO" "struct in_pktinfo" "ipi_spec_dst" "ac_cv_member_struct_in_pktinfo_ipi_spec_dst" "
22576$ac_includes_default
22577#if HAVE_SYS_PARAM_H
22578#include <sys/param.h>
22579#endif
22580
22581#ifdef HAVE_SYS_SOCKET_H
22582#include <sys/socket.h>
22583#endif
22584
22585#ifdef HAVE_SYS_UIO_H
22586#include <sys/uio.h>
22587#endif
22588
22589#ifdef HAVE_NETINET_IN_H
22590#include <netinet/in.h>
22591#endif
22592
22593#ifdef HAVE_NETINET_TCP_H
22594#include <netinet/tcp.h>
22595#endif
22596
22597#ifdef HAVE_ARPA_INET_H
22598#include <arpa/inet.h>
22599#endif
22600
22601#ifdef HAVE_WINSOCK2_H
22602#include <winsock2.h>
22603#endif
22604
22605#ifdef HAVE_WS2TCPIP_H
22606#include <ws2tcpip.h>
22607#endif
22608
22609"
22610if test "x$ac_cv_member_struct_in_pktinfo_ipi_spec_dst" = xyes
22611then :
22612
22613printf "%s\n" "#define HAVE_STRUCT_IN_PKTINFO_IPI_SPEC_DST 1" >>confdefs.h
22614
22615
22616fi
22617
22618
22619{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for htobe64" >&5
22620printf %s "checking for htobe64... " >&6; }
22621cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22622/* end confdefs.h.  */
22623
22624#include <stdio.h>
22625#ifdef HAVE_ENDIAN_H
22626#  include <endian.h>
22627#endif
22628#ifdef HAVE_SYS_ENDIAN_H
22629#  include <sys/endian.h>
22630#endif
22631
22632int
22633main (void)
22634{
22635unsigned long long x = htobe64(0); printf("%u", (unsigned)x);
22636  ;
22637  return 0;
22638}
22639_ACEOF
22640if ac_fn_c_try_link "$LINENO"
22641then :
22642  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
22643printf "%s\n" "yes" >&6; }
22644
22645printf "%s\n" "#define HAVE_HTOBE64 1" >>confdefs.h
22646
22647else $as_nop
22648  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
22649printf "%s\n" "no" >&6; }
22650fi
22651rm -f core conftest.err conftest.$ac_objext conftest.beam \
22652    conftest$ac_exeext conftest.$ac_ext
22653
22654{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for be64toh" >&5
22655printf %s "checking for be64toh... " >&6; }
22656cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22657/* end confdefs.h.  */
22658
22659#include <stdio.h>
22660#ifdef HAVE_ENDIAN_H
22661#  include <endian.h>
22662#endif
22663#ifdef HAVE_SYS_ENDIAN_H
22664#  include <sys/endian.h>
22665#endif
22666
22667int
22668main (void)
22669{
22670unsigned long long x = be64toh(0); printf("%u", (unsigned)x);
22671  ;
22672  return 0;
22673}
22674_ACEOF
22675if ac_fn_c_try_link "$LINENO"
22676then :
22677  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
22678printf "%s\n" "yes" >&6; }
22679
22680printf "%s\n" "#define HAVE_BE64TOH 1" >>confdefs.h
22681
22682else $as_nop
22683  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
22684printf "%s\n" "no" >&6; }
22685fi
22686rm -f core conftest.err conftest.$ac_objext conftest.beam \
22687    conftest$ac_exeext conftest.$ac_ext
22688
22689{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing setusercontext" >&5
22690printf %s "checking for library containing setusercontext... " >&6; }
22691if test ${ac_cv_search_setusercontext+y}
22692then :
22693  printf %s "(cached) " >&6
22694else $as_nop
22695  ac_func_search_save_LIBS=$LIBS
22696cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22697/* end confdefs.h.  */
22698
22699/* Override any GCC internal prototype to avoid an error.
22700   Use char because int might match the return type of a GCC
22701   builtin and then its argument prototype would still apply.  */
22702char setusercontext ();
22703int
22704main (void)
22705{
22706return setusercontext ();
22707  ;
22708  return 0;
22709}
22710_ACEOF
22711for ac_lib in '' util
22712do
22713  if test -z "$ac_lib"; then
22714    ac_res="none required"
22715  else
22716    ac_res=-l$ac_lib
22717    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
22718  fi
22719  if ac_fn_c_try_link "$LINENO"
22720then :
22721  ac_cv_search_setusercontext=$ac_res
22722fi
22723rm -f core conftest.err conftest.$ac_objext conftest.beam \
22724    conftest$ac_exeext
22725  if test ${ac_cv_search_setusercontext+y}
22726then :
22727  break
22728fi
22729done
22730if test ${ac_cv_search_setusercontext+y}
22731then :
22732
22733else $as_nop
22734  ac_cv_search_setusercontext=no
22735fi
22736rm conftest.$ac_ext
22737LIBS=$ac_func_search_save_LIBS
22738fi
22739{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_setusercontext" >&5
22740printf "%s\n" "$ac_cv_search_setusercontext" >&6; }
22741ac_res=$ac_cv_search_setusercontext
22742if test "$ac_res" != no
22743then :
22744  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
22745
22746fi
22747
22748ac_fn_c_check_func "$LINENO" "tzset" "ac_cv_func_tzset"
22749if test "x$ac_cv_func_tzset" = xyes
22750then :
22751  printf "%s\n" "#define HAVE_TZSET 1" >>confdefs.h
22752
22753fi
22754ac_fn_c_check_func "$LINENO" "sigprocmask" "ac_cv_func_sigprocmask"
22755if test "x$ac_cv_func_sigprocmask" = xyes
22756then :
22757  printf "%s\n" "#define HAVE_SIGPROCMASK 1" >>confdefs.h
22758
22759fi
22760ac_fn_c_check_func "$LINENO" "fcntl" "ac_cv_func_fcntl"
22761if test "x$ac_cv_func_fcntl" = xyes
22762then :
22763  printf "%s\n" "#define HAVE_FCNTL 1" >>confdefs.h
22764
22765fi
22766ac_fn_c_check_func "$LINENO" "getpwnam" "ac_cv_func_getpwnam"
22767if test "x$ac_cv_func_getpwnam" = xyes
22768then :
22769  printf "%s\n" "#define HAVE_GETPWNAM 1" >>confdefs.h
22770
22771fi
22772ac_fn_c_check_func "$LINENO" "endpwent" "ac_cv_func_endpwent"
22773if test "x$ac_cv_func_endpwent" = xyes
22774then :
22775  printf "%s\n" "#define HAVE_ENDPWENT 1" >>confdefs.h
22776
22777fi
22778ac_fn_c_check_func "$LINENO" "getrlimit" "ac_cv_func_getrlimit"
22779if test "x$ac_cv_func_getrlimit" = xyes
22780then :
22781  printf "%s\n" "#define HAVE_GETRLIMIT 1" >>confdefs.h
22782
22783fi
22784ac_fn_c_check_func "$LINENO" "setrlimit" "ac_cv_func_setrlimit"
22785if test "x$ac_cv_func_setrlimit" = xyes
22786then :
22787  printf "%s\n" "#define HAVE_SETRLIMIT 1" >>confdefs.h
22788
22789fi
22790ac_fn_c_check_func "$LINENO" "setsid" "ac_cv_func_setsid"
22791if test "x$ac_cv_func_setsid" = xyes
22792then :
22793  printf "%s\n" "#define HAVE_SETSID 1" >>confdefs.h
22794
22795fi
22796ac_fn_c_check_func "$LINENO" "chroot" "ac_cv_func_chroot"
22797if test "x$ac_cv_func_chroot" = xyes
22798then :
22799  printf "%s\n" "#define HAVE_CHROOT 1" >>confdefs.h
22800
22801fi
22802ac_fn_c_check_func "$LINENO" "kill" "ac_cv_func_kill"
22803if test "x$ac_cv_func_kill" = xyes
22804then :
22805  printf "%s\n" "#define HAVE_KILL 1" >>confdefs.h
22806
22807fi
22808ac_fn_c_check_func "$LINENO" "chown" "ac_cv_func_chown"
22809if test "x$ac_cv_func_chown" = xyes
22810then :
22811  printf "%s\n" "#define HAVE_CHOWN 1" >>confdefs.h
22812
22813fi
22814ac_fn_c_check_func "$LINENO" "sleep" "ac_cv_func_sleep"
22815if test "x$ac_cv_func_sleep" = xyes
22816then :
22817  printf "%s\n" "#define HAVE_SLEEP 1" >>confdefs.h
22818
22819fi
22820ac_fn_c_check_func "$LINENO" "usleep" "ac_cv_func_usleep"
22821if test "x$ac_cv_func_usleep" = xyes
22822then :
22823  printf "%s\n" "#define HAVE_USLEEP 1" >>confdefs.h
22824
22825fi
22826ac_fn_c_check_func "$LINENO" "random" "ac_cv_func_random"
22827if test "x$ac_cv_func_random" = xyes
22828then :
22829  printf "%s\n" "#define HAVE_RANDOM 1" >>confdefs.h
22830
22831fi
22832ac_fn_c_check_func "$LINENO" "srandom" "ac_cv_func_srandom"
22833if test "x$ac_cv_func_srandom" = xyes
22834then :
22835  printf "%s\n" "#define HAVE_SRANDOM 1" >>confdefs.h
22836
22837fi
22838ac_fn_c_check_func "$LINENO" "recvmsg" "ac_cv_func_recvmsg"
22839if test "x$ac_cv_func_recvmsg" = xyes
22840then :
22841  printf "%s\n" "#define HAVE_RECVMSG 1" >>confdefs.h
22842
22843fi
22844ac_fn_c_check_func "$LINENO" "sendmsg" "ac_cv_func_sendmsg"
22845if test "x$ac_cv_func_sendmsg" = xyes
22846then :
22847  printf "%s\n" "#define HAVE_SENDMSG 1" >>confdefs.h
22848
22849fi
22850ac_fn_c_check_func "$LINENO" "writev" "ac_cv_func_writev"
22851if test "x$ac_cv_func_writev" = xyes
22852then :
22853  printf "%s\n" "#define HAVE_WRITEV 1" >>confdefs.h
22854
22855fi
22856ac_fn_c_check_func "$LINENO" "socketpair" "ac_cv_func_socketpair"
22857if test "x$ac_cv_func_socketpair" = xyes
22858then :
22859  printf "%s\n" "#define HAVE_SOCKETPAIR 1" >>confdefs.h
22860
22861fi
22862ac_fn_c_check_func "$LINENO" "glob" "ac_cv_func_glob"
22863if test "x$ac_cv_func_glob" = xyes
22864then :
22865  printf "%s\n" "#define HAVE_GLOB 1" >>confdefs.h
22866
22867fi
22868ac_fn_c_check_func "$LINENO" "initgroups" "ac_cv_func_initgroups"
22869if test "x$ac_cv_func_initgroups" = xyes
22870then :
22871  printf "%s\n" "#define HAVE_INITGROUPS 1" >>confdefs.h
22872
22873fi
22874ac_fn_c_check_func "$LINENO" "strftime" "ac_cv_func_strftime"
22875if test "x$ac_cv_func_strftime" = xyes
22876then :
22877  printf "%s\n" "#define HAVE_STRFTIME 1" >>confdefs.h
22878
22879fi
22880ac_fn_c_check_func "$LINENO" "localtime_r" "ac_cv_func_localtime_r"
22881if test "x$ac_cv_func_localtime_r" = xyes
22882then :
22883  printf "%s\n" "#define HAVE_LOCALTIME_R 1" >>confdefs.h
22884
22885fi
22886ac_fn_c_check_func "$LINENO" "setusercontext" "ac_cv_func_setusercontext"
22887if test "x$ac_cv_func_setusercontext" = xyes
22888then :
22889  printf "%s\n" "#define HAVE_SETUSERCONTEXT 1" >>confdefs.h
22890
22891fi
22892ac_fn_c_check_func "$LINENO" "_beginthreadex" "ac_cv_func__beginthreadex"
22893if test "x$ac_cv_func__beginthreadex" = xyes
22894then :
22895  printf "%s\n" "#define HAVE__BEGINTHREADEX 1" >>confdefs.h
22896
22897fi
22898ac_fn_c_check_func "$LINENO" "endservent" "ac_cv_func_endservent"
22899if test "x$ac_cv_func_endservent" = xyes
22900then :
22901  printf "%s\n" "#define HAVE_ENDSERVENT 1" >>confdefs.h
22902
22903fi
22904ac_fn_c_check_func "$LINENO" "endprotoent" "ac_cv_func_endprotoent"
22905if test "x$ac_cv_func_endprotoent" = xyes
22906then :
22907  printf "%s\n" "#define HAVE_ENDPROTOENT 1" >>confdefs.h
22908
22909fi
22910ac_fn_c_check_func "$LINENO" "fsync" "ac_cv_func_fsync"
22911if test "x$ac_cv_func_fsync" = xyes
22912then :
22913  printf "%s\n" "#define HAVE_FSYNC 1" >>confdefs.h
22914
22915fi
22916ac_fn_c_check_func "$LINENO" "shmget" "ac_cv_func_shmget"
22917if test "x$ac_cv_func_shmget" = xyes
22918then :
22919  printf "%s\n" "#define HAVE_SHMGET 1" >>confdefs.h
22920
22921fi
22922ac_fn_c_check_func "$LINENO" "accept4" "ac_cv_func_accept4"
22923if test "x$ac_cv_func_accept4" = xyes
22924then :
22925  printf "%s\n" "#define HAVE_ACCEPT4 1" >>confdefs.h
22926
22927fi
22928ac_fn_c_check_func "$LINENO" "getifaddrs" "ac_cv_func_getifaddrs"
22929if test "x$ac_cv_func_getifaddrs" = xyes
22930then :
22931  printf "%s\n" "#define HAVE_GETIFADDRS 1" >>confdefs.h
22932
22933fi
22934ac_fn_c_check_func "$LINENO" "if_nametoindex" "ac_cv_func_if_nametoindex"
22935if test "x$ac_cv_func_if_nametoindex" = xyes
22936then :
22937  printf "%s\n" "#define HAVE_IF_NAMETOINDEX 1" >>confdefs.h
22938
22939fi
22940ac_fn_c_check_func "$LINENO" "poll" "ac_cv_func_poll"
22941if test "x$ac_cv_func_poll" = xyes
22942then :
22943  printf "%s\n" "#define HAVE_POLL 1" >>confdefs.h
22944
22945fi
22946ac_fn_c_check_func "$LINENO" "gettid" "ac_cv_func_gettid"
22947if test "x$ac_cv_func_gettid" = xyes
22948then :
22949  printf "%s\n" "#define HAVE_GETTID 1" >>confdefs.h
22950
22951fi
22952
22953
22954  for ac_func in setresuid
22955do :
22956  ac_fn_c_check_func "$LINENO" "setresuid" "ac_cv_func_setresuid"
22957if test "x$ac_cv_func_setresuid" = xyes
22958then :
22959  printf "%s\n" "#define HAVE_SETRESUID 1" >>confdefs.h
22960
22961else $as_nop
22962  ac_fn_c_check_func "$LINENO" "setreuid" "ac_cv_func_setreuid"
22963if test "x$ac_cv_func_setreuid" = xyes
22964then :
22965  printf "%s\n" "#define HAVE_SETREUID 1" >>confdefs.h
22966
22967fi
22968
22969fi
22970
22971done
22972
22973  for ac_func in setresgid
22974do :
22975  ac_fn_c_check_func "$LINENO" "setresgid" "ac_cv_func_setresgid"
22976if test "x$ac_cv_func_setresgid" = xyes
22977then :
22978  printf "%s\n" "#define HAVE_SETRESGID 1" >>confdefs.h
22979
22980else $as_nop
22981  ac_fn_c_check_func "$LINENO" "setregid" "ac_cv_func_setregid"
22982if test "x$ac_cv_func_setregid" = xyes
22983then :
22984  printf "%s\n" "#define HAVE_SETREGID 1" >>confdefs.h
22985
22986fi
22987
22988fi
22989
22990done
22991
22992# check if setreuid en setregid fail, on MacOSX10.4(darwin8).
22993if echo $host_os | grep darwin8 > /dev/null; then
22994
22995printf "%s\n" "#define DARWIN_BROKEN_SETREUID 1" >>confdefs.h
22996
22997fi
22998ac_fn_check_decl "$LINENO" "inet_pton" "ac_cv_have_decl_inet_pton" "
22999$ac_includes_default
23000#ifdef HAVE_NETINET_IN_H
23001#include <netinet/in.h>
23002#endif
23003
23004#ifdef HAVE_NETINET_TCP_H
23005#include <netinet/tcp.h>
23006#endif
23007
23008#ifdef HAVE_ARPA_INET_H
23009#include <arpa/inet.h>
23010#endif
23011
23012#ifdef HAVE_WINSOCK2_H
23013#include <winsock2.h>
23014#endif
23015
23016#ifdef HAVE_WS2TCPIP_H
23017#include <ws2tcpip.h>
23018#endif
23019
23020" "$ac_c_undeclared_builtin_options" "CFLAGS"
23021if test "x$ac_cv_have_decl_inet_pton" = xyes
23022then :
23023  ac_have_decl=1
23024else $as_nop
23025  ac_have_decl=0
23026fi
23027printf "%s\n" "#define HAVE_DECL_INET_PTON $ac_have_decl" >>confdefs.h
23028ac_fn_check_decl "$LINENO" "inet_ntop" "ac_cv_have_decl_inet_ntop" "
23029$ac_includes_default
23030#ifdef HAVE_NETINET_IN_H
23031#include <netinet/in.h>
23032#endif
23033
23034#ifdef HAVE_NETINET_TCP_H
23035#include <netinet/tcp.h>
23036#endif
23037
23038#ifdef HAVE_ARPA_INET_H
23039#include <arpa/inet.h>
23040#endif
23041
23042#ifdef HAVE_WINSOCK2_H
23043#include <winsock2.h>
23044#endif
23045
23046#ifdef HAVE_WS2TCPIP_H
23047#include <ws2tcpip.h>
23048#endif
23049
23050" "$ac_c_undeclared_builtin_options" "CFLAGS"
23051if test "x$ac_cv_have_decl_inet_ntop" = xyes
23052then :
23053  ac_have_decl=1
23054else $as_nop
23055  ac_have_decl=0
23056fi
23057printf "%s\n" "#define HAVE_DECL_INET_NTOP $ac_have_decl" >>confdefs.h
23058
23059ac_fn_c_check_func "$LINENO" "inet_aton" "ac_cv_func_inet_aton"
23060if test "x$ac_cv_func_inet_aton" = xyes
23061then :
23062  printf "%s\n" "#define HAVE_INET_ATON 1" >>confdefs.h
23063
23064else $as_nop
23065  case " $LIBOBJS " in
23066  *" inet_aton.$ac_objext "* ) ;;
23067  *) LIBOBJS="$LIBOBJS inet_aton.$ac_objext"
23068 ;;
23069esac
23070
23071fi
23072
23073ac_fn_c_check_func "$LINENO" "inet_pton" "ac_cv_func_inet_pton"
23074if test "x$ac_cv_func_inet_pton" = xyes
23075then :
23076  printf "%s\n" "#define HAVE_INET_PTON 1" >>confdefs.h
23077
23078else $as_nop
23079  case " $LIBOBJS " in
23080  *" inet_pton.$ac_objext "* ) ;;
23081  *) LIBOBJS="$LIBOBJS inet_pton.$ac_objext"
23082 ;;
23083esac
23084
23085fi
23086
23087ac_fn_c_check_func "$LINENO" "inet_ntop" "ac_cv_func_inet_ntop"
23088if test "x$ac_cv_func_inet_ntop" = xyes
23089then :
23090  printf "%s\n" "#define HAVE_INET_NTOP 1" >>confdefs.h
23091
23092else $as_nop
23093  case " $LIBOBJS " in
23094  *" inet_ntop.$ac_objext "* ) ;;
23095  *) LIBOBJS="$LIBOBJS inet_ntop.$ac_objext"
23096 ;;
23097esac
23098
23099fi
23100
23101ac_fn_c_check_func "$LINENO" "snprintf" "ac_cv_func_snprintf"
23102if test "x$ac_cv_func_snprintf" = xyes
23103then :
23104  printf "%s\n" "#define HAVE_SNPRINTF 1" >>confdefs.h
23105
23106else $as_nop
23107  case " $LIBOBJS " in
23108  *" snprintf.$ac_objext "* ) ;;
23109  *) LIBOBJS="$LIBOBJS snprintf.$ac_objext"
23110 ;;
23111esac
23112
23113fi
23114
23115# test if snprintf return the proper length
23116if test "x$ac_cv_func_snprintf" = xyes; then
23117    if test c${cross_compiling} = cno; then
23118	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for correct snprintf return value" >&5
23119printf %s "checking for correct snprintf return value... " >&6; }
23120	if test "$cross_compiling" = yes
23121then :
23122  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: maybe" >&5
23123printf "%s\n" "maybe" >&6; }
23124else $as_nop
23125  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23126/* end confdefs.h.  */
23127$ac_includes_default
23128
23129int main(void) { return !(snprintf(NULL, 0, "test") == 4); }
23130
23131_ACEOF
23132if ac_fn_c_try_run "$LINENO"
23133then :
23134  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
23135printf "%s\n" "yes" >&6; }
23136else $as_nop
23137
23138		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
23139printf "%s\n" "no" >&6; }
23140
23141printf "%s\n" "#define SNPRINTF_RET_BROKEN /**/" >>confdefs.h
23142
23143		case " $LIBOBJS " in
23144  *" snprintf.$ac_objext "* ) ;;
23145  *) LIBOBJS="$LIBOBJS snprintf.$ac_objext"
23146 ;;
23147esac
23148
23149
23150fi
23151rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23152  conftest.$ac_objext conftest.beam conftest.$ac_ext
23153fi
23154
23155    fi
23156fi
23157ac_fn_c_check_func "$LINENO" "strlcat" "ac_cv_func_strlcat"
23158if test "x$ac_cv_func_strlcat" = xyes
23159then :
23160  printf "%s\n" "#define HAVE_STRLCAT 1" >>confdefs.h
23161
23162else $as_nop
23163  case " $LIBOBJS " in
23164  *" strlcat.$ac_objext "* ) ;;
23165  *) LIBOBJS="$LIBOBJS strlcat.$ac_objext"
23166 ;;
23167esac
23168
23169fi
23170
23171ac_fn_c_check_func "$LINENO" "strlcpy" "ac_cv_func_strlcpy"
23172if test "x$ac_cv_func_strlcpy" = xyes
23173then :
23174  printf "%s\n" "#define HAVE_STRLCPY 1" >>confdefs.h
23175
23176else $as_nop
23177  case " $LIBOBJS " in
23178  *" strlcpy.$ac_objext "* ) ;;
23179  *) LIBOBJS="$LIBOBJS strlcpy.$ac_objext"
23180 ;;
23181esac
23182
23183fi
23184
23185ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove"
23186if test "x$ac_cv_func_memmove" = xyes
23187then :
23188  printf "%s\n" "#define HAVE_MEMMOVE 1" >>confdefs.h
23189
23190else $as_nop
23191  case " $LIBOBJS " in
23192  *" memmove.$ac_objext "* ) ;;
23193  *) LIBOBJS="$LIBOBJS memmove.$ac_objext"
23194 ;;
23195esac
23196
23197fi
23198
23199ac_fn_c_check_func "$LINENO" "gmtime_r" "ac_cv_func_gmtime_r"
23200if test "x$ac_cv_func_gmtime_r" = xyes
23201then :
23202  printf "%s\n" "#define HAVE_GMTIME_R 1" >>confdefs.h
23203
23204else $as_nop
23205  case " $LIBOBJS " in
23206  *" gmtime_r.$ac_objext "* ) ;;
23207  *) LIBOBJS="$LIBOBJS gmtime_r.$ac_objext"
23208 ;;
23209esac
23210
23211fi
23212
23213ac_fn_c_check_func "$LINENO" "isblank" "ac_cv_func_isblank"
23214if test "x$ac_cv_func_isblank" = xyes
23215then :
23216  printf "%s\n" "#define HAVE_ISBLANK 1" >>confdefs.h
23217
23218else $as_nop
23219  case " $LIBOBJS " in
23220  *" isblank.$ac_objext "* ) ;;
23221  *) LIBOBJS="$LIBOBJS isblank.$ac_objext"
23222 ;;
23223esac
23224
23225fi
23226
23227ac_fn_c_check_func "$LINENO" "explicit_bzero" "ac_cv_func_explicit_bzero"
23228if test "x$ac_cv_func_explicit_bzero" = xyes
23229then :
23230  printf "%s\n" "#define HAVE_EXPLICIT_BZERO 1" >>confdefs.h
23231
23232else $as_nop
23233  case " $LIBOBJS " in
23234  *" explicit_bzero.$ac_objext "* ) ;;
23235  *) LIBOBJS="$LIBOBJS explicit_bzero.$ac_objext"
23236 ;;
23237esac
23238
23239fi
23240
23241LIBOBJ_WITHOUT_CTIMEARC4="$LIBOBJS"
23242
23243{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for reallocarray" >&5
23244printf %s "checking for reallocarray... " >&6; }
23245cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23246/* end confdefs.h.  */
23247$ac_includes_default
23248
23249#ifndef _OPENBSD_SOURCE
23250#define _OPENBSD_SOURCE 1
23251#endif
23252#include <stdlib.h>
23253int main(void) {
23254	void* p = reallocarray(NULL, 10, 100);
23255	free(p);
23256	return 0;
23257}
23258
23259_ACEOF
23260if ac_fn_c_try_link "$LINENO"
23261then :
23262  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
23263printf "%s\n" "yes" >&6; }
23264
23265printf "%s\n" "#define HAVE_REALLOCARRAY 1" >>confdefs.h
23266
23267
23268else $as_nop
23269
23270	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
23271printf "%s\n" "no" >&6; }
23272	case " $LIBOBJS " in
23273  *" reallocarray.$ac_objext "* ) ;;
23274  *) LIBOBJS="$LIBOBJS reallocarray.$ac_objext"
23275 ;;
23276esac
23277
23278
23279fi
23280rm -f core conftest.err conftest.$ac_objext conftest.beam \
23281    conftest$ac_exeext conftest.$ac_ext
23282ac_fn_check_decl "$LINENO" "reallocarray" "ac_cv_have_decl_reallocarray" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
23283if test "x$ac_cv_have_decl_reallocarray" = xyes
23284then :
23285  ac_have_decl=1
23286else $as_nop
23287  ac_have_decl=0
23288fi
23289printf "%s\n" "#define HAVE_DECL_REALLOCARRAY $ac_have_decl" >>confdefs.h
23290
23291if test "$USE_NSS" = "no"; then
23292	ac_fn_c_check_func "$LINENO" "arc4random" "ac_cv_func_arc4random"
23293if test "x$ac_cv_func_arc4random" = xyes
23294then :
23295  printf "%s\n" "#define HAVE_ARC4RANDOM 1" >>confdefs.h
23296
23297else $as_nop
23298  case " $LIBOBJS " in
23299  *" arc4random.$ac_objext "* ) ;;
23300  *) LIBOBJS="$LIBOBJS arc4random.$ac_objext"
23301 ;;
23302esac
23303
23304fi
23305
23306	ac_fn_c_check_func "$LINENO" "arc4random_uniform" "ac_cv_func_arc4random_uniform"
23307if test "x$ac_cv_func_arc4random_uniform" = xyes
23308then :
23309  printf "%s\n" "#define HAVE_ARC4RANDOM_UNIFORM 1" >>confdefs.h
23310
23311else $as_nop
23312  case " $LIBOBJS " in
23313  *" arc4random_uniform.$ac_objext "* ) ;;
23314  *) LIBOBJS="$LIBOBJS arc4random_uniform.$ac_objext"
23315 ;;
23316esac
23317
23318fi
23319
23320	if test "$ac_cv_func_arc4random" = "no"; then
23321		case " $LIBOBJS " in
23322  *" arc4_lock.$ac_objext "* ) ;;
23323  *) LIBOBJS="$LIBOBJS arc4_lock.$ac_objext"
23324 ;;
23325esac
23326
23327
23328  for ac_func in getentropy
23329do :
23330  ac_fn_c_check_func "$LINENO" "getentropy" "ac_cv_func_getentropy"
23331if test "x$ac_cv_func_getentropy" = xyes
23332then :
23333  printf "%s\n" "#define HAVE_GETENTROPY 1" >>confdefs.h
23334
23335else $as_nop
23336
23337		    if test "$USE_WINSOCK" = 1; then
23338			case " $LIBOBJS " in
23339  *" getentropy_win.$ac_objext "* ) ;;
23340  *) LIBOBJS="$LIBOBJS getentropy_win.$ac_objext"
23341 ;;
23342esac
23343
23344		    else
23345			case "$host" in
23346			Darwin|*darwin*)
23347				case " $LIBOBJS " in
23348  *" getentropy_osx.$ac_objext "* ) ;;
23349  *) LIBOBJS="$LIBOBJS getentropy_osx.$ac_objext"
23350 ;;
23351esac
23352
23353			;;
23354			*solaris*|*sunos*|SunOS)
23355				case " $LIBOBJS " in
23356  *" getentropy_solaris.$ac_objext "* ) ;;
23357  *) LIBOBJS="$LIBOBJS getentropy_solaris.$ac_objext"
23358 ;;
23359esac
23360
23361				       for ac_header in sys/sha2.h
23362do :
23363  ac_fn_c_check_header_compile "$LINENO" "sys/sha2.h" "ac_cv_header_sys_sha2_h" "$ac_includes_default
23364"
23365if test "x$ac_cv_header_sys_sha2_h" = xyes
23366then :
23367  printf "%s\n" "#define HAVE_SYS_SHA2_H 1" >>confdefs.h
23368
23369else $as_nop
23370
23371
23372  for ac_func in SHA512_Update
23373do :
23374  ac_fn_c_check_func "$LINENO" "SHA512_Update" "ac_cv_func_SHA512_Update"
23375if test "x$ac_cv_func_SHA512_Update" = xyes
23376then :
23377  printf "%s\n" "#define HAVE_SHA512_UPDATE 1" >>confdefs.h
23378
23379else $as_nop
23380
23381						case " $LIBOBJS " in
23382  *" sha512.$ac_objext "* ) ;;
23383  *) LIBOBJS="$LIBOBJS sha512.$ac_objext"
23384 ;;
23385esac
23386
23387
23388fi
23389
23390done
23391
23392fi
23393
23394done
23395				if test "$ac_cv_header_sys_sha2_h" = "yes"; then
23396					# this lib needed for sha2 on solaris
23397					LIBS="$LIBS -lmd"
23398				fi
23399				{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5
23400printf %s "checking for library containing clock_gettime... " >&6; }
23401if test ${ac_cv_search_clock_gettime+y}
23402then :
23403  printf %s "(cached) " >&6
23404else $as_nop
23405  ac_func_search_save_LIBS=$LIBS
23406cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23407/* end confdefs.h.  */
23408
23409/* Override any GCC internal prototype to avoid an error.
23410   Use char because int might match the return type of a GCC
23411   builtin and then its argument prototype would still apply.  */
23412char clock_gettime ();
23413int
23414main (void)
23415{
23416return clock_gettime ();
23417  ;
23418  return 0;
23419}
23420_ACEOF
23421for ac_lib in '' rt
23422do
23423  if test -z "$ac_lib"; then
23424    ac_res="none required"
23425  else
23426    ac_res=-l$ac_lib
23427    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
23428  fi
23429  if ac_fn_c_try_link "$LINENO"
23430then :
23431  ac_cv_search_clock_gettime=$ac_res
23432fi
23433rm -f core conftest.err conftest.$ac_objext conftest.beam \
23434    conftest$ac_exeext
23435  if test ${ac_cv_search_clock_gettime+y}
23436then :
23437  break
23438fi
23439done
23440if test ${ac_cv_search_clock_gettime+y}
23441then :
23442
23443else $as_nop
23444  ac_cv_search_clock_gettime=no
23445fi
23446rm conftest.$ac_ext
23447LIBS=$ac_func_search_save_LIBS
23448fi
23449{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5
23450printf "%s\n" "$ac_cv_search_clock_gettime" >&6; }
23451ac_res=$ac_cv_search_clock_gettime
23452if test "$ac_res" != no
23453then :
23454  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
23455
23456fi
23457
23458			;;
23459			*freebsd*|*FreeBSD)
23460				case " $LIBOBJS " in
23461  *" getentropy_freebsd.$ac_objext "* ) ;;
23462  *) LIBOBJS="$LIBOBJS getentropy_freebsd.$ac_objext"
23463 ;;
23464esac
23465
23466			;;
23467			*linux*|Linux|*)
23468				case " $LIBOBJS " in
23469  *" getentropy_linux.$ac_objext "* ) ;;
23470  *) LIBOBJS="$LIBOBJS getentropy_linux.$ac_objext"
23471 ;;
23472esac
23473
23474
23475  for ac_func in SHA512_Update
23476do :
23477  ac_fn_c_check_func "$LINENO" "SHA512_Update" "ac_cv_func_SHA512_Update"
23478if test "x$ac_cv_func_SHA512_Update" = xyes
23479then :
23480  printf "%s\n" "#define HAVE_SHA512_UPDATE 1" >>confdefs.h
23481
23482else $as_nop
23483
23484
23485printf "%s\n" "#define COMPAT_SHA512 1" >>confdefs.h
23486
23487					case " $LIBOBJS " in
23488  *" sha512.$ac_objext "* ) ;;
23489  *) LIBOBJS="$LIBOBJS sha512.$ac_objext"
23490 ;;
23491esac
23492
23493
23494fi
23495
23496done
23497				ac_fn_c_check_header_compile "$LINENO" "sys/sysctl.h" "ac_cv_header_sys_sysctl_h" "$ac_includes_default
23498"
23499if test "x$ac_cv_header_sys_sysctl_h" = xyes
23500then :
23501  printf "%s\n" "#define HAVE_SYS_SYSCTL_H 1" >>confdefs.h
23502
23503fi
23504
23505				ac_fn_c_check_func "$LINENO" "getauxval" "ac_cv_func_getauxval"
23506if test "x$ac_cv_func_getauxval" = xyes
23507then :
23508  printf "%s\n" "#define HAVE_GETAUXVAL 1" >>confdefs.h
23509
23510fi
23511
23512				{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5
23513printf %s "checking for library containing clock_gettime... " >&6; }
23514if test ${ac_cv_search_clock_gettime+y}
23515then :
23516  printf %s "(cached) " >&6
23517else $as_nop
23518  ac_func_search_save_LIBS=$LIBS
23519cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23520/* end confdefs.h.  */
23521
23522/* Override any GCC internal prototype to avoid an error.
23523   Use char because int might match the return type of a GCC
23524   builtin and then its argument prototype would still apply.  */
23525char clock_gettime ();
23526int
23527main (void)
23528{
23529return clock_gettime ();
23530  ;
23531  return 0;
23532}
23533_ACEOF
23534for ac_lib in '' rt
23535do
23536  if test -z "$ac_lib"; then
23537    ac_res="none required"
23538  else
23539    ac_res=-l$ac_lib
23540    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
23541  fi
23542  if ac_fn_c_try_link "$LINENO"
23543then :
23544  ac_cv_search_clock_gettime=$ac_res
23545fi
23546rm -f core conftest.err conftest.$ac_objext conftest.beam \
23547    conftest$ac_exeext
23548  if test ${ac_cv_search_clock_gettime+y}
23549then :
23550  break
23551fi
23552done
23553if test ${ac_cv_search_clock_gettime+y}
23554then :
23555
23556else $as_nop
23557  ac_cv_search_clock_gettime=no
23558fi
23559rm conftest.$ac_ext
23560LIBS=$ac_func_search_save_LIBS
23561fi
23562{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5
23563printf "%s\n" "$ac_cv_search_clock_gettime" >&6; }
23564ac_res=$ac_cv_search_clock_gettime
23565if test "$ac_res" != no
23566then :
23567  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
23568
23569fi
23570
23571			;;
23572			esac
23573		    fi
23574
23575fi
23576
23577done
23578	fi
23579fi
23580LIBOBJ_WITHOUT_CTIME="$LIBOBJS"
23581
23582ac_fn_c_check_func "$LINENO" "ctime_r" "ac_cv_func_ctime_r"
23583if test "x$ac_cv_func_ctime_r" = xyes
23584then :
23585  printf "%s\n" "#define HAVE_CTIME_R 1" >>confdefs.h
23586
23587else $as_nop
23588  case " $LIBOBJS " in
23589  *" ctime_r.$ac_objext "* ) ;;
23590  *) LIBOBJS="$LIBOBJS ctime_r.$ac_objext"
23591 ;;
23592esac
23593
23594fi
23595
23596ac_fn_c_check_func "$LINENO" "strsep" "ac_cv_func_strsep"
23597if test "x$ac_cv_func_strsep" = xyes
23598then :
23599  printf "%s\n" "#define HAVE_STRSEP 1" >>confdefs.h
23600
23601else $as_nop
23602  case " $LIBOBJS " in
23603  *" strsep.$ac_objext "* ) ;;
23604  *) LIBOBJS="$LIBOBJS strsep.$ac_objext"
23605 ;;
23606esac
23607
23608fi
23609
23610
23611# Check whether --enable-allsymbols was given.
23612if test ${enable_allsymbols+y}
23613then :
23614  enableval=$enable_allsymbols;
23615fi
23616
23617case "$enable_allsymbols" in
23618	yes)
23619	COMMON_OBJ_ALL_SYMBOLS=""
23620	UBSYMS=""
23621	EXTRALINK="libunbound.la"
23622
23623printf "%s\n" "#define EXPORT_ALL_SYMBOLS 1" >>confdefs.h
23624
23625	;;
23626	no|*)
23627	COMMON_OBJ_ALL_SYMBOLS='$(COMMON_OBJ)'
23628	UBSYMS='-export-symbols $(srcdir)/libunbound/ubsyms.def'
23629	EXTRALINK=""
23630	;;
23631esac
23632
23633
23634
23635if test x_$enable_lock_checks = x_yes; then
23636	UBSYMS="-export-symbols clubsyms.def"
23637	cp ${srcdir}/libunbound/ubsyms.def clubsyms.def
23638	echo lock_protect >> clubsyms.def
23639	echo lock_unprotect >> clubsyms.def
23640	echo lock_get_mem >> clubsyms.def
23641	echo checklock_start >> clubsyms.def
23642	echo checklock_stop >> clubsyms.def
23643	echo checklock_lock >> clubsyms.def
23644	echo checklock_unlock >> clubsyms.def
23645	echo checklock_init >> clubsyms.def
23646	echo checklock_thrcreate >> clubsyms.def
23647	echo checklock_thrjoin >> clubsyms.def
23648fi
23649
23650# check for dnstap if requested
23651
23652    # Check whether --enable-dnstap was given.
23653if test ${enable_dnstap+y}
23654then :
23655  enableval=$enable_dnstap; opt_dnstap=$enableval
23656else $as_nop
23657  opt_dnstap=no
23658fi
23659
23660
23661
23662# Check whether --with-dnstap-socket-path was given.
23663if test ${with_dnstap_socket_path+y}
23664then :
23665  withval=$with_dnstap_socket_path; opt_dnstap_socket_path=$withval
23666else $as_nop
23667  opt_dnstap_socket_path="$UNBOUND_RUN_DIR/dnstap.sock"
23668fi
23669
23670
23671    if test "x$opt_dnstap" != "xno"; then
23672        # Extract the first word of "protoc-c", so it can be a program name with args.
23673set dummy protoc-c; ac_word=$2
23674{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23675printf %s "checking for $ac_word... " >&6; }
23676if test ${ac_cv_path_PROTOC_C+y}
23677then :
23678  printf %s "(cached) " >&6
23679else $as_nop
23680  case $PROTOC_C in
23681  [\\/]* | ?:[\\/]*)
23682  ac_cv_path_PROTOC_C="$PROTOC_C" # Let the user override the test with a path.
23683  ;;
23684  *)
23685  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23686for as_dir in $PATH
23687do
23688  IFS=$as_save_IFS
23689  case $as_dir in #(((
23690    '') as_dir=./ ;;
23691    */) ;;
23692    *) as_dir=$as_dir/ ;;
23693  esac
23694    for ac_exec_ext in '' $ac_executable_extensions; do
23695  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
23696    ac_cv_path_PROTOC_C="$as_dir$ac_word$ac_exec_ext"
23697    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
23698    break 2
23699  fi
23700done
23701  done
23702IFS=$as_save_IFS
23703
23704  ;;
23705esac
23706fi
23707PROTOC_C=$ac_cv_path_PROTOC_C
23708if test -n "$PROTOC_C"; then
23709  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PROTOC_C" >&5
23710printf "%s\n" "$PROTOC_C" >&6; }
23711else
23712  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
23713printf "%s\n" "no" >&6; }
23714fi
23715
23716
23717        if test -z "$PROTOC_C"; then
23718          as_fn_error $? "The protoc-c program was not found. Please install protobuf-c!" "$LINENO" 5
23719        fi
23720
23721# Check whether --with-protobuf-c was given.
23722if test ${with_protobuf_c+y}
23723then :
23724  withval=$with_protobuf_c;
23725                # workaround for protobuf-c includes at old dir before protobuf-c-1.0.0
23726                if test -f $withval/include/google/protobuf-c/protobuf-c.h; then
23727                    CFLAGS="$CFLAGS -I$withval/include/google"
23728                else
23729                    CFLAGS="$CFLAGS -I$withval/include"
23730                fi
23731                LDFLAGS="$LDFLAGS -L$withval/lib"
23732
23733else $as_nop
23734
23735
23736
23737pkg_failed=no
23738{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for PROTOBUFC" >&5
23739printf %s "checking for PROTOBUFC... " >&6; }
23740
23741if test -n "$PROTOBUFC_CFLAGS"; then
23742    pkg_cv_PROTOBUFC_CFLAGS="$PROTOBUFC_CFLAGS"
23743 elif test -n "$PKG_CONFIG"; then
23744    if test -n "$PKG_CONFIG" && \
23745    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libprotobuf-c\""; } >&5
23746  ($PKG_CONFIG --exists --print-errors "libprotobuf-c") 2>&5
23747  ac_status=$?
23748  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
23749  test $ac_status = 0; }; then
23750  pkg_cv_PROTOBUFC_CFLAGS=`$PKG_CONFIG --cflags "libprotobuf-c" 2>/dev/null`
23751		      test "x$?" != "x0" && pkg_failed=yes
23752else
23753  pkg_failed=yes
23754fi
23755 else
23756    pkg_failed=untried
23757fi
23758if test -n "$PROTOBUFC_LIBS"; then
23759    pkg_cv_PROTOBUFC_LIBS="$PROTOBUFC_LIBS"
23760 elif test -n "$PKG_CONFIG"; then
23761    if test -n "$PKG_CONFIG" && \
23762    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libprotobuf-c\""; } >&5
23763  ($PKG_CONFIG --exists --print-errors "libprotobuf-c") 2>&5
23764  ac_status=$?
23765  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
23766  test $ac_status = 0; }; then
23767  pkg_cv_PROTOBUFC_LIBS=`$PKG_CONFIG --libs "libprotobuf-c" 2>/dev/null`
23768		      test "x$?" != "x0" && pkg_failed=yes
23769else
23770  pkg_failed=yes
23771fi
23772 else
23773    pkg_failed=untried
23774fi
23775
23776
23777
23778if test $pkg_failed = yes; then
23779   	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
23780printf "%s\n" "no" >&6; }
23781
23782if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
23783        _pkg_short_errors_supported=yes
23784else
23785        _pkg_short_errors_supported=no
23786fi
23787        if test $_pkg_short_errors_supported = yes; then
23788	        PROTOBUFC_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libprotobuf-c" 2>&1`
23789        else
23790	        PROTOBUFC_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libprotobuf-c" 2>&1`
23791        fi
23792	# Put the nasty error message in config.log where it belongs
23793	echo "$PROTOBUFC_PKG_ERRORS" >&5
23794
23795
23796                                # pkg-config failed; try falling back to known values
23797                                # workaround for protobuf-c includes at old dir before protobuf-c-1.0.0
23798                                if test -f /usr/include/google/protobuf-c/protobuf-c.h; then
23799                                    CFLAGS="$CFLAGS -I/usr/include/google"
23800                                else
23801                                    if test -f /usr/local/include/google/protobuf-c/protobuf-c.h; then
23802                                        CFLAGS="$CFLAGS -I/usr/local/include/google"
23803                                        LDFLAGS="$LDFLAGS -L/usr/local/lib"
23804                                    else
23805                                        as_fn_error $? "The protobuf-c package was not found with pkg-config. Please install protobuf-c!" "$LINENO" 5
23806                                    fi
23807                                fi
23808
23809
23810elif test $pkg_failed = untried; then
23811     	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
23812printf "%s\n" "no" >&6; }
23813
23814                                # pkg-config failed; try falling back to known values
23815                                # workaround for protobuf-c includes at old dir before protobuf-c-1.0.0
23816                                if test -f /usr/include/google/protobuf-c/protobuf-c.h; then
23817                                    CFLAGS="$CFLAGS -I/usr/include/google"
23818                                else
23819                                    if test -f /usr/local/include/google/protobuf-c/protobuf-c.h; then
23820                                        CFLAGS="$CFLAGS -I/usr/local/include/google"
23821                                        LDFLAGS="$LDFLAGS -L/usr/local/lib"
23822                                    else
23823                                        as_fn_error $? "The protobuf-c package was not found with pkg-config. Please install protobuf-c!" "$LINENO" 5
23824                                    fi
23825                                fi
23826
23827
23828else
23829	PROTOBUFC_CFLAGS=$pkg_cv_PROTOBUFC_CFLAGS
23830	PROTOBUFC_LIBS=$pkg_cv_PROTOBUFC_LIBS
23831        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
23832printf "%s\n" "yes" >&6; }
23833
23834                                CFLAGS="$CFLAGS $PROTOBUFC_CFLAGS"
23835                                LIBS="$LIBS $PROTOBUFC_LIBS"
23836
23837fi
23838
23839
23840
23841fi
23842
23843        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing protobuf_c_message_pack" >&5
23844printf %s "checking for library containing protobuf_c_message_pack... " >&6; }
23845if test ${ac_cv_search_protobuf_c_message_pack+y}
23846then :
23847  printf %s "(cached) " >&6
23848else $as_nop
23849  ac_func_search_save_LIBS=$LIBS
23850cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23851/* end confdefs.h.  */
23852
23853/* Override any GCC internal prototype to avoid an error.
23854   Use char because int might match the return type of a GCC
23855   builtin and then its argument prototype would still apply.  */
23856char protobuf_c_message_pack ();
23857int
23858main (void)
23859{
23860return protobuf_c_message_pack ();
23861  ;
23862  return 0;
23863}
23864_ACEOF
23865for ac_lib in '' protobuf-c
23866do
23867  if test -z "$ac_lib"; then
23868    ac_res="none required"
23869  else
23870    ac_res=-l$ac_lib
23871    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
23872  fi
23873  if ac_fn_c_try_link "$LINENO"
23874then :
23875  ac_cv_search_protobuf_c_message_pack=$ac_res
23876fi
23877rm -f core conftest.err conftest.$ac_objext conftest.beam \
23878    conftest$ac_exeext
23879  if test ${ac_cv_search_protobuf_c_message_pack+y}
23880then :
23881  break
23882fi
23883done
23884if test ${ac_cv_search_protobuf_c_message_pack+y}
23885then :
23886
23887else $as_nop
23888  ac_cv_search_protobuf_c_message_pack=no
23889fi
23890rm conftest.$ac_ext
23891LIBS=$ac_func_search_save_LIBS
23892fi
23893{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_protobuf_c_message_pack" >&5
23894printf "%s\n" "$ac_cv_search_protobuf_c_message_pack" >&6; }
23895ac_res=$ac_cv_search_protobuf_c_message_pack
23896if test "$ac_res" != no
23897then :
23898  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
23899
23900else $as_nop
23901  as_fn_error $? "The protobuf-c library was not found. Please install the development libraries for protobuf-c!" "$LINENO" 5
23902fi
23903
23904
23905
23906printf "%s\n" "#define USE_DNSTAP 1" >>confdefs.h
23907
23908        ENABLE_DNSTAP=1
23909
23910
23911
23912        hdr_dnstap_socket_path="`echo $opt_dnstap_socket_path | sed -e 's/\\\\/\\\\\\\\/g'`"
23913
23914
23915printf "%s\n" "#define DNSTAP_SOCKET_PATH \"$hdr_dnstap_socket_path\"" >>confdefs.h
23916
23917	DNSTAP_SOCKET_PATH="$hdr_dnstap_socket_path"
23918
23919	DNSTAP_SOCKET_TESTBIN='unbound-dnstap-socket$(EXEEXT)'
23920
23921        DNSTAP_SRC="dnstap/dnstap.c dnstap/dnstap.pb-c.c dnstap/dnstap_fstrm.c dnstap/dtstream.c"
23922
23923        DNSTAP_OBJ="dnstap.lo dnstap.pb-c.lo dnstap_fstrm.lo dtstream.lo"
23924
23925
23926    else
23927
23928        ENABLE_DNSTAP=0
23929
23930
23931
23932    fi
23933
23934
23935# check for dnscrypt if requested
23936
23937  # Check whether --enable-dnscrypt was given.
23938if test ${enable_dnscrypt+y}
23939then :
23940  enableval=$enable_dnscrypt; opt_dnscrypt=$enableval
23941else $as_nop
23942  opt_dnscrypt=no
23943fi
23944
23945
23946  if test "x$opt_dnscrypt" != "xno"; then
23947
23948# Check whether --with-libsodium was given.
23949if test ${with_libsodium+y}
23950then :
23951  withval=$with_libsodium;
23952	CFLAGS="$CFLAGS -I$withval/include"
23953	LDFLAGS="$LDFLAGS -L$withval/lib"
23954
23955fi
23956
23957    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing sodium_init" >&5
23958printf %s "checking for library containing sodium_init... " >&6; }
23959if test ${ac_cv_search_sodium_init+y}
23960then :
23961  printf %s "(cached) " >&6
23962else $as_nop
23963  ac_func_search_save_LIBS=$LIBS
23964cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23965/* end confdefs.h.  */
23966
23967/* Override any GCC internal prototype to avoid an error.
23968   Use char because int might match the return type of a GCC
23969   builtin and then its argument prototype would still apply.  */
23970char sodium_init ();
23971int
23972main (void)
23973{
23974return sodium_init ();
23975  ;
23976  return 0;
23977}
23978_ACEOF
23979for ac_lib in '' sodium
23980do
23981  if test -z "$ac_lib"; then
23982    ac_res="none required"
23983  else
23984    ac_res=-l$ac_lib
23985    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
23986  fi
23987  if ac_fn_c_try_link "$LINENO"
23988then :
23989  ac_cv_search_sodium_init=$ac_res
23990fi
23991rm -f core conftest.err conftest.$ac_objext conftest.beam \
23992    conftest$ac_exeext
23993  if test ${ac_cv_search_sodium_init+y}
23994then :
23995  break
23996fi
23997done
23998if test ${ac_cv_search_sodium_init+y}
23999then :
24000
24001else $as_nop
24002  ac_cv_search_sodium_init=no
24003fi
24004rm conftest.$ac_ext
24005LIBS=$ac_func_search_save_LIBS
24006fi
24007{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sodium_init" >&5
24008printf "%s\n" "$ac_cv_search_sodium_init" >&6; }
24009ac_res=$ac_cv_search_sodium_init
24010if test "$ac_res" != no
24011then :
24012  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
24013
24014else $as_nop
24015  as_fn_error $? "The sodium library was not found. Please install sodium!" "$LINENO" 5
24016fi
24017
24018    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing crypto_box_curve25519xchacha20poly1305_beforenm" >&5
24019printf %s "checking for library containing crypto_box_curve25519xchacha20poly1305_beforenm... " >&6; }
24020if test ${ac_cv_search_crypto_box_curve25519xchacha20poly1305_beforenm+y}
24021then :
24022  printf %s "(cached) " >&6
24023else $as_nop
24024  ac_func_search_save_LIBS=$LIBS
24025cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24026/* end confdefs.h.  */
24027
24028/* Override any GCC internal prototype to avoid an error.
24029   Use char because int might match the return type of a GCC
24030   builtin and then its argument prototype would still apply.  */
24031char crypto_box_curve25519xchacha20poly1305_beforenm ();
24032int
24033main (void)
24034{
24035return crypto_box_curve25519xchacha20poly1305_beforenm ();
24036  ;
24037  return 0;
24038}
24039_ACEOF
24040for ac_lib in '' sodium
24041do
24042  if test -z "$ac_lib"; then
24043    ac_res="none required"
24044  else
24045    ac_res=-l$ac_lib
24046    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
24047  fi
24048  if ac_fn_c_try_link "$LINENO"
24049then :
24050  ac_cv_search_crypto_box_curve25519xchacha20poly1305_beforenm=$ac_res
24051fi
24052rm -f core conftest.err conftest.$ac_objext conftest.beam \
24053    conftest$ac_exeext
24054  if test ${ac_cv_search_crypto_box_curve25519xchacha20poly1305_beforenm+y}
24055then :
24056  break
24057fi
24058done
24059if test ${ac_cv_search_crypto_box_curve25519xchacha20poly1305_beforenm+y}
24060then :
24061
24062else $as_nop
24063  ac_cv_search_crypto_box_curve25519xchacha20poly1305_beforenm=no
24064fi
24065rm conftest.$ac_ext
24066LIBS=$ac_func_search_save_LIBS
24067fi
24068{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_crypto_box_curve25519xchacha20poly1305_beforenm" >&5
24069printf "%s\n" "$ac_cv_search_crypto_box_curve25519xchacha20poly1305_beforenm" >&6; }
24070ac_res=$ac_cv_search_crypto_box_curve25519xchacha20poly1305_beforenm
24071if test "$ac_res" != no
24072then :
24073  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
24074
24075            ENABLE_DNSCRYPT_XCHACHA20=1
24076
24077
24078printf "%s\n" "#define USE_DNSCRYPT_XCHACHA20 1" >>confdefs.h
24079
24080
24081else $as_nop
24082
24083            ENABLE_DNSCRYPT_XCHACHA20=0
24084
24085
24086fi
24087
24088    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing sodium_set_misuse_handler" >&5
24089printf %s "checking for library containing sodium_set_misuse_handler... " >&6; }
24090if test ${ac_cv_search_sodium_set_misuse_handler+y}
24091then :
24092  printf %s "(cached) " >&6
24093else $as_nop
24094  ac_func_search_save_LIBS=$LIBS
24095cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24096/* end confdefs.h.  */
24097
24098/* Override any GCC internal prototype to avoid an error.
24099   Use char because int might match the return type of a GCC
24100   builtin and then its argument prototype would still apply.  */
24101char sodium_set_misuse_handler ();
24102int
24103main (void)
24104{
24105return sodium_set_misuse_handler ();
24106  ;
24107  return 0;
24108}
24109_ACEOF
24110for ac_lib in '' sodium
24111do
24112  if test -z "$ac_lib"; then
24113    ac_res="none required"
24114  else
24115    ac_res=-l$ac_lib
24116    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
24117  fi
24118  if ac_fn_c_try_link "$LINENO"
24119then :
24120  ac_cv_search_sodium_set_misuse_handler=$ac_res
24121fi
24122rm -f core conftest.err conftest.$ac_objext conftest.beam \
24123    conftest$ac_exeext
24124  if test ${ac_cv_search_sodium_set_misuse_handler+y}
24125then :
24126  break
24127fi
24128done
24129if test ${ac_cv_search_sodium_set_misuse_handler+y}
24130then :
24131
24132else $as_nop
24133  ac_cv_search_sodium_set_misuse_handler=no
24134fi
24135rm conftest.$ac_ext
24136LIBS=$ac_func_search_save_LIBS
24137fi
24138{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sodium_set_misuse_handler" >&5
24139printf "%s\n" "$ac_cv_search_sodium_set_misuse_handler" >&6; }
24140ac_res=$ac_cv_search_sodium_set_misuse_handler
24141if test "$ac_res" != no
24142then :
24143  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
24144
24145
24146printf "%s\n" "#define SODIUM_MISUSE_HANDLER 1" >>confdefs.h
24147
24148
24149fi
24150
24151
24152
24153printf "%s\n" "#define USE_DNSCRYPT 1" >>confdefs.h
24154
24155        ENABLE_DNSCRYPT=1
24156
24157
24158        DNSCRYPT_SRC="dnscrypt/dnscrypt.c"
24159
24160        DNSCRYPT_OBJ="dnscrypt.lo"
24161
24162
24163  else
24164    ENABLE_DNSCRYPT_XCHACHA20=0
24165
24166
24167        ENABLE_DNSCRYPT=0
24168
24169
24170
24171  fi
24172
24173
24174# check for cachedb if requested
24175# Check whether --enable-cachedb was given.
24176if test ${enable_cachedb+y}
24177then :
24178  enableval=$enable_cachedb;
24179fi
24180
24181# turn on cachedb when hiredis support is enabled.
24182if test "$found_libhiredis" = "yes"; then enable_cachedb="yes"; fi
24183case "$enable_cachedb" in
24184    yes)
24185
24186printf "%s\n" "#define USE_CACHEDB 1" >>confdefs.h
24187
24188	CACHEDB_SRC="cachedb/cachedb.c cachedb/redis.c"
24189
24190	CACHEDB_OBJ="cachedb.lo redis.lo"
24191
24192    	;;
24193    no|*)
24194    	# nothing
24195    	;;
24196esac
24197
24198# check for ipsecmod if requested
24199# Check whether --enable-ipsecmod was given.
24200if test ${enable_ipsecmod+y}
24201then :
24202  enableval=$enable_ipsecmod;
24203fi
24204
24205case "$enable_ipsecmod" in
24206	yes)
24207
24208printf "%s\n" "#define USE_IPSECMOD 1" >>confdefs.h
24209
24210		IPSECMOD_OBJ="ipsecmod.lo ipsecmod-whitelist.lo"
24211
24212		IPSECMOD_HEADER='$(srcdir)/ipsecmod/ipsecmod.h $(srcdir)/ipsecmod/ipsecmod-whitelist.h'
24213
24214		;;
24215	no|*)
24216		# nothing
24217		;;
24218esac
24219
24220# check for ipset if requested
24221# Check whether --enable-ipset was given.
24222if test ${enable_ipset+y}
24223then :
24224  enableval=$enable_ipset;
24225fi
24226
24227case "$enable_ipset" in
24228    yes)
24229
24230printf "%s\n" "#define USE_IPSET 1" >>confdefs.h
24231
24232		IPSET_SRC="ipset/ipset.c"
24233
24234		IPSET_OBJ="ipset.lo"
24235
24236
24237		# mnl
24238
24239# Check whether --with-libmnl was given.
24240if test ${with_libmnl+y}
24241then :
24242  withval=$with_libmnl;
24243else $as_nop
24244   withval="yes"
24245fi
24246
24247		found_libmnl="no"
24248		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libmnl" >&5
24249printf %s "checking for libmnl... " >&6; }
24250		if test x_$withval = x_ -o x_$withval = x_yes; then
24251			withval="/usr/local /opt/local /usr/lib /usr/pkg /usr/sfw /usr"
24252		fi
24253		for dir in $withval ; do
24254			if test -f "$dir/include/libmnl/libmnl.h" -o -f "$dir/include/libmnl/libmnl/libmnl.h"; then
24255				found_libmnl="yes"
24256								extralibmnl=""
24257				if test -f "$dir/include/libmnl/libmnl/libmnl.h"; then
24258					extralibmnl="/libmnl"
24259				fi
24260				if test "$dir" != "/usr" -o -n "$extralibmnl"; then
24261					CPPFLAGS="$CPPFLAGS -I$dir/include$extralibmnl"
24262				fi
24263				if test "$dir" != "/usr"; then
24264					LDFLAGS="$LDFLAGS -L$dir/lib"
24265				fi
24266				{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: found in $dir" >&5
24267printf "%s\n" "found in $dir" >&6; }
24268				LIBS="$LIBS -lmnl"
24269				break;
24270			fi
24271		done
24272		if test x_$found_libmnl != x_yes; then
24273			as_fn_error $? "Could not find libmnl, libmnl.h" "$LINENO" 5
24274		fi
24275		;;
24276    no|*)
24277    	# nothing
24278		;;
24279esac
24280# Check whether --enable-explicit-port-randomisation was given.
24281if test ${enable_explicit_port_randomisation+y}
24282then :
24283  enableval=$enable_explicit_port_randomisation;
24284fi
24285
24286case "$enable_explicit_port_randomisation" in
24287	no)
24288
24289printf "%s\n" "#define DISABLE_EXPLICIT_PORT_RANDOMISATION 1" >>confdefs.h
24290
24291		;;
24292	yes|*)
24293		;;
24294esac
24295
24296if echo "$host" | $GREP -i -e linux >/dev/null; then
24297	# Check whether --enable-linux-ip-local-port-range was given.
24298if test ${enable_linux_ip_local_port_range+y}
24299then :
24300  enableval=$enable_linux_ip_local_port_range;
24301fi
24302
24303	case "$enable_linux_ip_local_port_range" in
24304		yes)
24305
24306printf "%s\n" "#define USE_LINUX_IP_LOCAL_PORT_RANGE 1" >>confdefs.h
24307
24308			;;
24309		no|*)
24310			;;
24311	esac
24312fi
24313
24314
24315{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if ${MAKE:-make} supports $< with implicit rule in scope" >&5
24316printf %s "checking if ${MAKE:-make} supports $< with implicit rule in scope... " >&6; }
24317# on openBSD, the implicit rule make $< work.
24318# on Solaris, it does not work ($? is changed sources, $^ lists dependencies).
24319# gmake works.
24320cat >conftest.make <<EOF
24321all:	conftest.lo
24322
24323conftest.lo foo.lo bla.lo:
24324	if test -f "\$<"; then touch \$@; fi
24325
24326.SUFFIXES: .lo
24327.c.lo:
24328	if test -f "\$<"; then touch \$@; fi
24329
24330conftest.lo:        conftest.dir/conftest.c
24331EOF
24332mkdir conftest.dir
24333touch conftest.dir/conftest.c
24334rm -f conftest.lo conftest.c
24335${MAKE:-make} -f conftest.make >/dev/null
24336rm -f conftest.make conftest.c conftest.dir/conftest.c
24337rm -rf conftest.dir
24338if test ! -f conftest.lo; then
24339	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
24340printf "%s\n" "no" >&6; }
24341	SOURCEDETERMINE='echo "$^" | awk "-F " "{print \$$1;}" > .source'
24342	SOURCEFILE='`cat .source`'
24343else
24344	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24345printf "%s\n" "yes" >&6; }
24346	SOURCEDETERMINE=':'
24347	SOURCEFILE='$<'
24348fi
24349rm -f conftest.lo
24350
24351
24352
24353# see if we want to build the library or everything
24354ALLTARGET="alltargets"
24355INSTALLTARGET="install-all"
24356
24357# Check whether --with-libunbound-only was given.
24358if test ${with_libunbound_only+y}
24359then :
24360  withval=$with_libunbound_only;
24361	if test "$withval" = "yes"; then
24362		ALLTARGET="lib"
24363		INSTALLTARGET="install-lib"
24364	fi
24365
24366fi
24367
24368if test $ALLTARGET = "alltargets"; then
24369	if test $USE_NSS = "yes"; then
24370		as_fn_error $? "--with-nss can only be used in combination with --with-libunbound-only." "$LINENO" 5
24371	fi
24372	if test $USE_NETTLE = "yes"; then
24373		as_fn_error $? "--with-nettle can only be used in combination with --with-libunbound-only." "$LINENO" 5
24374	fi
24375fi
24376
24377
24378
24379
24380
24381  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Stripping extension flags..." >&5
24382printf "%s\n" "$as_me: Stripping extension flags..." >&6;}
24383
24384  if echo $CFLAGS | grep " -D_GNU_SOURCE" >/dev/null 2>&1; then
24385    CFLAGS="`echo $CFLAGS | sed -e 's/ -D_GNU_SOURCE//g'`"
24386
24387printf "%s\n" "#define OMITTED__D_GNU_SOURCE 1" >>confdefs.h
24388
24389  fi
24390
24391
24392  if echo $CFLAGS | grep " -D_BSD_SOURCE" >/dev/null 2>&1; then
24393    CFLAGS="`echo $CFLAGS | sed -e 's/ -D_BSD_SOURCE//g'`"
24394
24395printf "%s\n" "#define OMITTED__D_BSD_SOURCE 1" >>confdefs.h
24396
24397  fi
24398
24399
24400  if echo $CFLAGS | grep " -D_DEFAULT_SOURCE" >/dev/null 2>&1; then
24401    CFLAGS="`echo $CFLAGS | sed -e 's/ -D_DEFAULT_SOURCE//g'`"
24402
24403printf "%s\n" "#define OMITTED__D_DEFAULT_SOURCE 1" >>confdefs.h
24404
24405  fi
24406
24407
24408  if echo $CFLAGS | grep " -D__EXTENSIONS__" >/dev/null 2>&1; then
24409    CFLAGS="`echo $CFLAGS | sed -e 's/ -D__EXTENSIONS__//g'`"
24410
24411printf "%s\n" "#define OMITTED__D__EXTENSIONS__ 1" >>confdefs.h
24412
24413  fi
24414
24415
24416  if echo $CFLAGS | grep " -D_POSIX_C_SOURCE=200112" >/dev/null 2>&1; then
24417    CFLAGS="`echo $CFLAGS | sed -e 's/ -D_POSIX_C_SOURCE=200112//g'`"
24418
24419printf "%s\n" "#define OMITTED__D_POSIX_C_SOURCE_200112 1" >>confdefs.h
24420
24421  fi
24422
24423
24424  if echo $CFLAGS | grep " -D_XOPEN_SOURCE=600" >/dev/null 2>&1; then
24425    CFLAGS="`echo $CFLAGS | sed -e 's/ -D_XOPEN_SOURCE=600//g'`"
24426
24427printf "%s\n" "#define OMITTED__D_XOPEN_SOURCE_600 1" >>confdefs.h
24428
24429  fi
24430
24431
24432  if echo $CFLAGS | grep " -D_XOPEN_SOURCE_EXTENDED=1" >/dev/null 2>&1; then
24433    CFLAGS="`echo $CFLAGS | sed -e 's/ -D_XOPEN_SOURCE_EXTENDED=1//g'`"
24434
24435printf "%s\n" "#define OMITTED__D_XOPEN_SOURCE_EXTENDED_1 1" >>confdefs.h
24436
24437  fi
24438
24439
24440  if echo $CFLAGS | grep " -D_ALL_SOURCE" >/dev/null 2>&1; then
24441    CFLAGS="`echo $CFLAGS | sed -e 's/ -D_ALL_SOURCE//g'`"
24442
24443printf "%s\n" "#define OMITTED__D_ALL_SOURCE 1" >>confdefs.h
24444
24445  fi
24446
24447
24448  if echo $CFLAGS | grep " -D_LARGEFILE_SOURCE=1" >/dev/null 2>&1; then
24449    CFLAGS="`echo $CFLAGS | sed -e 's/ -D_LARGEFILE_SOURCE=1//g'`"
24450
24451printf "%s\n" "#define OMITTED__D_LARGEFILE_SOURCE_1 1" >>confdefs.h
24452
24453  fi
24454
24455
24456if test -n "$LATE_LDFLAGS"; then
24457  LDFLAGS="$LATE_LDFLAGS $LDFLAGS"
24458fi
24459# remove start spaces
24460LDFLAGS=`echo "$LDFLAGS"|sed -e 's/^ *//'`
24461LIBS=`echo "$LIBS"|sed -e 's/^ *//'`
24462
24463
24464printf "%s\n" "#define MAXSYSLOGMSGLEN 10240" >>confdefs.h
24465
24466
24467
24468
24469version=1.20.0
24470
24471date=`date +'%b %e, %Y'`
24472
24473
24474ac_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"
24475
24476ac_config_headers="$ac_config_headers config.h"
24477
24478cat >confcache <<\_ACEOF
24479# This file is a shell script that caches the results of configure
24480# tests run on this system so they can be shared between configure
24481# scripts and configure runs, see configure's option --config-cache.
24482# It is not useful on other systems.  If it contains results you don't
24483# want to keep, you may remove or edit it.
24484#
24485# config.status only pays attention to the cache file if you give it
24486# the --recheck option to rerun configure.
24487#
24488# `ac_cv_env_foo' variables (set or unset) will be overridden when
24489# loading this file, other *unset* `ac_cv_foo' will be assigned the
24490# following values.
24491
24492_ACEOF
24493
24494# The following way of writing the cache mishandles newlines in values,
24495# but we know of no workaround that is simple, portable, and efficient.
24496# So, we kill variables containing newlines.
24497# Ultrix sh set writes to stderr and can't be redirected directly,
24498# and sets the high bit in the cache file unless we assign to the vars.
24499(
24500  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
24501    eval ac_val=\$$ac_var
24502    case $ac_val in #(
24503    *${as_nl}*)
24504      case $ac_var in #(
24505      *_cv_*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
24506printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
24507      esac
24508      case $ac_var in #(
24509      _ | IFS | as_nl) ;; #(
24510      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
24511      *) { eval $ac_var=; unset $ac_var;} ;;
24512      esac ;;
24513    esac
24514  done
24515
24516  (set) 2>&1 |
24517    case $as_nl`(ac_space=' '; set) 2>&1` in #(
24518    *${as_nl}ac_space=\ *)
24519      # `set' does not quote correctly, so add quotes: double-quote
24520      # substitution turns \\\\ into \\, and sed turns \\ into \.
24521      sed -n \
24522	"s/'/'\\\\''/g;
24523	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
24524      ;; #(
24525    *)
24526      # `set' quotes correctly as required by POSIX, so do not add quotes.
24527      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
24528      ;;
24529    esac |
24530    sort
24531) |
24532  sed '
24533     /^ac_cv_env_/b end
24534     t clear
24535     :clear
24536     s/^\([^=]*\)=\(.*[{}].*\)$/test ${\1+y} || &/
24537     t end
24538     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
24539     :end' >>confcache
24540if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
24541  if test -w "$cache_file"; then
24542    if test "x$cache_file" != "x/dev/null"; then
24543      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
24544printf "%s\n" "$as_me: updating cache $cache_file" >&6;}
24545      if test ! -f "$cache_file" || test -h "$cache_file"; then
24546	cat confcache >"$cache_file"
24547      else
24548        case $cache_file in #(
24549        */* | ?:*)
24550	  mv -f confcache "$cache_file"$$ &&
24551	  mv -f "$cache_file"$$ "$cache_file" ;; #(
24552        *)
24553	  mv -f confcache "$cache_file" ;;
24554	esac
24555      fi
24556    fi
24557  else
24558    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
24559printf "%s\n" "$as_me: not updating unwritable cache $cache_file" >&6;}
24560  fi
24561fi
24562rm -f confcache
24563
24564test "x$prefix" = xNONE && prefix=$ac_default_prefix
24565# Let make expand exec_prefix.
24566test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
24567
24568DEFS=-DHAVE_CONFIG_H
24569
24570ac_libobjs=
24571ac_ltlibobjs=
24572U=
24573for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
24574  # 1. Remove the extension, and $U if already installed.
24575  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
24576  ac_i=`printf "%s\n" "$ac_i" | sed "$ac_script"`
24577  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
24578  #    will be set to the directory where LIBOBJS objects are built.
24579  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
24580  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
24581done
24582LIBOBJS=$ac_libobjs
24583
24584LTLIBOBJS=$ac_ltlibobjs
24585
24586
24587if test -z "${USE_SYSTEMD_TRUE}" && test -z "${USE_SYSTEMD_FALSE}"; then
24588  as_fn_error $? "conditional \"USE_SYSTEMD\" was never defined.
24589Usually this means the macro was only invoked conditionally." "$LINENO" 5
24590fi
24591
24592: "${CONFIG_STATUS=./config.status}"
24593ac_write_fail=0
24594ac_clean_files_save=$ac_clean_files
24595ac_clean_files="$ac_clean_files $CONFIG_STATUS"
24596{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
24597printf "%s\n" "$as_me: creating $CONFIG_STATUS" >&6;}
24598as_write_fail=0
24599cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
24600#! $SHELL
24601# Generated by $as_me.
24602# Run this file to recreate the current configuration.
24603# Compiler output produced by configure, useful for debugging
24604# configure, is in config.log if it exists.
24605
24606debug=false
24607ac_cs_recheck=false
24608ac_cs_silent=false
24609
24610SHELL=\${CONFIG_SHELL-$SHELL}
24611export SHELL
24612_ASEOF
24613cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
24614## -------------------- ##
24615## M4sh Initialization. ##
24616## -------------------- ##
24617
24618# Be more Bourne compatible
24619DUALCASE=1; export DUALCASE # for MKS sh
24620as_nop=:
24621if test ${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1
24622then :
24623  emulate sh
24624  NULLCMD=:
24625  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
24626  # is contrary to our usage.  Disable this feature.
24627  alias -g '${1+"$@"}'='"$@"'
24628  setopt NO_GLOB_SUBST
24629else $as_nop
24630  case `(set -o) 2>/dev/null` in #(
24631  *posix*) :
24632    set -o posix ;; #(
24633  *) :
24634     ;;
24635esac
24636fi
24637
24638
24639
24640# Reset variables that may have inherited troublesome values from
24641# the environment.
24642
24643# IFS needs to be set, to space, tab, and newline, in precisely that order.
24644# (If _AS_PATH_WALK were called with IFS unset, it would have the
24645# side effect of setting IFS to empty, thus disabling word splitting.)
24646# Quoting is to prevent editors from complaining about space-tab.
24647as_nl='
24648'
24649export as_nl
24650IFS=" ""	$as_nl"
24651
24652PS1='$ '
24653PS2='> '
24654PS4='+ '
24655
24656# Ensure predictable behavior from utilities with locale-dependent output.
24657LC_ALL=C
24658export LC_ALL
24659LANGUAGE=C
24660export LANGUAGE
24661
24662# We cannot yet rely on "unset" to work, but we need these variables
24663# to be unset--not just set to an empty or harmless value--now, to
24664# avoid bugs in old shells (e.g. pre-3.0 UWIN ksh).  This construct
24665# also avoids known problems related to "unset" and subshell syntax
24666# in other old shells (e.g. bash 2.01 and pdksh 5.2.14).
24667for as_var in BASH_ENV ENV MAIL MAILPATH CDPATH
24668do eval test \${$as_var+y} \
24669  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
24670done
24671
24672# Ensure that fds 0, 1, and 2 are open.
24673if (exec 3>&0) 2>/dev/null; then :; else exec 0</dev/null; fi
24674if (exec 3>&1) 2>/dev/null; then :; else exec 1>/dev/null; fi
24675if (exec 3>&2)            ; then :; else exec 2>/dev/null; fi
24676
24677# The user is always right.
24678if ${PATH_SEPARATOR+false} :; then
24679  PATH_SEPARATOR=:
24680  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
24681    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
24682      PATH_SEPARATOR=';'
24683  }
24684fi
24685
24686
24687# Find who we are.  Look in the path if we contain no directory separator.
24688as_myself=
24689case $0 in #((
24690  *[\\/]* ) as_myself=$0 ;;
24691  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24692for as_dir in $PATH
24693do
24694  IFS=$as_save_IFS
24695  case $as_dir in #(((
24696    '') as_dir=./ ;;
24697    */) ;;
24698    *) as_dir=$as_dir/ ;;
24699  esac
24700    test -r "$as_dir$0" && as_myself=$as_dir$0 && break
24701  done
24702IFS=$as_save_IFS
24703
24704     ;;
24705esac
24706# We did not find ourselves, most probably we were run as `sh COMMAND'
24707# in which case we are not to be found in the path.
24708if test "x$as_myself" = x; then
24709  as_myself=$0
24710fi
24711if test ! -f "$as_myself"; then
24712  printf "%s\n" "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
24713  exit 1
24714fi
24715
24716
24717
24718# as_fn_error STATUS ERROR [LINENO LOG_FD]
24719# ----------------------------------------
24720# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
24721# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
24722# script with STATUS, using 1 if that was 0.
24723as_fn_error ()
24724{
24725  as_status=$1; test $as_status -eq 0 && as_status=1
24726  if test "$4"; then
24727    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
24728    printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
24729  fi
24730  printf "%s\n" "$as_me: error: $2" >&2
24731  as_fn_exit $as_status
24732} # as_fn_error
24733
24734
24735
24736# as_fn_set_status STATUS
24737# -----------------------
24738# Set $? to STATUS, without forking.
24739as_fn_set_status ()
24740{
24741  return $1
24742} # as_fn_set_status
24743
24744# as_fn_exit STATUS
24745# -----------------
24746# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
24747as_fn_exit ()
24748{
24749  set +e
24750  as_fn_set_status $1
24751  exit $1
24752} # as_fn_exit
24753
24754# as_fn_unset VAR
24755# ---------------
24756# Portably unset VAR.
24757as_fn_unset ()
24758{
24759  { eval $1=; unset $1;}
24760}
24761as_unset=as_fn_unset
24762
24763# as_fn_append VAR VALUE
24764# ----------------------
24765# Append the text in VALUE to the end of the definition contained in VAR. Take
24766# advantage of any shell optimizations that allow amortized linear growth over
24767# repeated appends, instead of the typical quadratic growth present in naive
24768# implementations.
24769if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null
24770then :
24771  eval 'as_fn_append ()
24772  {
24773    eval $1+=\$2
24774  }'
24775else $as_nop
24776  as_fn_append ()
24777  {
24778    eval $1=\$$1\$2
24779  }
24780fi # as_fn_append
24781
24782# as_fn_arith ARG...
24783# ------------------
24784# Perform arithmetic evaluation on the ARGs, and store the result in the
24785# global $as_val. Take advantage of shells that can avoid forks. The arguments
24786# must be portable across $(()) and expr.
24787if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null
24788then :
24789  eval 'as_fn_arith ()
24790  {
24791    as_val=$(( $* ))
24792  }'
24793else $as_nop
24794  as_fn_arith ()
24795  {
24796    as_val=`expr "$@" || test $? -eq 1`
24797  }
24798fi # as_fn_arith
24799
24800
24801if expr a : '\(a\)' >/dev/null 2>&1 &&
24802   test "X`expr 00001 : '.*\(...\)'`" = X001; then
24803  as_expr=expr
24804else
24805  as_expr=false
24806fi
24807
24808if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
24809  as_basename=basename
24810else
24811  as_basename=false
24812fi
24813
24814if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
24815  as_dirname=dirname
24816else
24817  as_dirname=false
24818fi
24819
24820as_me=`$as_basename -- "$0" ||
24821$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
24822	 X"$0" : 'X\(//\)$' \| \
24823	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
24824printf "%s\n" X/"$0" |
24825    sed '/^.*\/\([^/][^/]*\)\/*$/{
24826	    s//\1/
24827	    q
24828	  }
24829	  /^X\/\(\/\/\)$/{
24830	    s//\1/
24831	    q
24832	  }
24833	  /^X\/\(\/\).*/{
24834	    s//\1/
24835	    q
24836	  }
24837	  s/.*/./; q'`
24838
24839# Avoid depending upon Character Ranges.
24840as_cr_letters='abcdefghijklmnopqrstuvwxyz'
24841as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
24842as_cr_Letters=$as_cr_letters$as_cr_LETTERS
24843as_cr_digits='0123456789'
24844as_cr_alnum=$as_cr_Letters$as_cr_digits
24845
24846
24847# Determine whether it's possible to make 'echo' print without a newline.
24848# These variables are no longer used directly by Autoconf, but are AC_SUBSTed
24849# for compatibility with existing Makefiles.
24850ECHO_C= ECHO_N= ECHO_T=
24851case `echo -n x` in #(((((
24852-n*)
24853  case `echo 'xy\c'` in
24854  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
24855  xy)  ECHO_C='\c';;
24856  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
24857       ECHO_T='	';;
24858  esac;;
24859*)
24860  ECHO_N='-n';;
24861esac
24862
24863# For backward compatibility with old third-party macros, we provide
24864# the shell variables $as_echo and $as_echo_n.  New code should use
24865# AS_ECHO(["message"]) and AS_ECHO_N(["message"]), respectively.
24866as_echo='printf %s\n'
24867as_echo_n='printf %s'
24868
24869rm -f conf$$ conf$$.exe conf$$.file
24870if test -d conf$$.dir; then
24871  rm -f conf$$.dir/conf$$.file
24872else
24873  rm -f conf$$.dir
24874  mkdir conf$$.dir 2>/dev/null
24875fi
24876if (echo >conf$$.file) 2>/dev/null; then
24877  if ln -s conf$$.file conf$$ 2>/dev/null; then
24878    as_ln_s='ln -s'
24879    # ... but there are two gotchas:
24880    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
24881    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
24882    # In both cases, we have to default to `cp -pR'.
24883    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
24884      as_ln_s='cp -pR'
24885  elif ln conf$$.file conf$$ 2>/dev/null; then
24886    as_ln_s=ln
24887  else
24888    as_ln_s='cp -pR'
24889  fi
24890else
24891  as_ln_s='cp -pR'
24892fi
24893rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
24894rmdir conf$$.dir 2>/dev/null
24895
24896
24897# as_fn_mkdir_p
24898# -------------
24899# Create "$as_dir" as a directory, including parents if necessary.
24900as_fn_mkdir_p ()
24901{
24902
24903  case $as_dir in #(
24904  -*) as_dir=./$as_dir;;
24905  esac
24906  test -d "$as_dir" || eval $as_mkdir_p || {
24907    as_dirs=
24908    while :; do
24909      case $as_dir in #(
24910      *\'*) as_qdir=`printf "%s\n" "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
24911      *) as_qdir=$as_dir;;
24912      esac
24913      as_dirs="'$as_qdir' $as_dirs"
24914      as_dir=`$as_dirname -- "$as_dir" ||
24915$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
24916	 X"$as_dir" : 'X\(//\)[^/]' \| \
24917	 X"$as_dir" : 'X\(//\)$' \| \
24918	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
24919printf "%s\n" X"$as_dir" |
24920    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
24921	    s//\1/
24922	    q
24923	  }
24924	  /^X\(\/\/\)[^/].*/{
24925	    s//\1/
24926	    q
24927	  }
24928	  /^X\(\/\/\)$/{
24929	    s//\1/
24930	    q
24931	  }
24932	  /^X\(\/\).*/{
24933	    s//\1/
24934	    q
24935	  }
24936	  s/.*/./; q'`
24937      test -d "$as_dir" && break
24938    done
24939    test -z "$as_dirs" || eval "mkdir $as_dirs"
24940  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
24941
24942
24943} # as_fn_mkdir_p
24944if mkdir -p . 2>/dev/null; then
24945  as_mkdir_p='mkdir -p "$as_dir"'
24946else
24947  test -d ./-p && rmdir ./-p
24948  as_mkdir_p=false
24949fi
24950
24951
24952# as_fn_executable_p FILE
24953# -----------------------
24954# Test if FILE is an executable regular file.
24955as_fn_executable_p ()
24956{
24957  test -f "$1" && test -x "$1"
24958} # as_fn_executable_p
24959as_test_x='test -x'
24960as_executable_p=as_fn_executable_p
24961
24962# Sed expression to map a string onto a valid CPP name.
24963as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
24964
24965# Sed expression to map a string onto a valid variable name.
24966as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
24967
24968
24969exec 6>&1
24970## ----------------------------------- ##
24971## Main body of $CONFIG_STATUS script. ##
24972## ----------------------------------- ##
24973_ASEOF
24974test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
24975
24976cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
24977# Save the log message, to keep $0 and so on meaningful, and to
24978# report actual input values of CONFIG_FILES etc. instead of their
24979# values after options handling.
24980ac_log="
24981This file was extended by unbound $as_me 1.20.0, which was
24982generated by GNU Autoconf 2.71.  Invocation command line was
24983
24984  CONFIG_FILES    = $CONFIG_FILES
24985  CONFIG_HEADERS  = $CONFIG_HEADERS
24986  CONFIG_LINKS    = $CONFIG_LINKS
24987  CONFIG_COMMANDS = $CONFIG_COMMANDS
24988  $ $0 $@
24989
24990on `(hostname || uname -n) 2>/dev/null | sed 1q`
24991"
24992
24993_ACEOF
24994
24995case $ac_config_files in *"
24996"*) set x $ac_config_files; shift; ac_config_files=$*;;
24997esac
24998
24999case $ac_config_headers in *"
25000"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
25001esac
25002
25003
25004cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
25005# Files that config.status was made for.
25006config_files="$ac_config_files"
25007config_headers="$ac_config_headers"
25008config_commands="$ac_config_commands"
25009
25010_ACEOF
25011
25012cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
25013ac_cs_usage="\
25014\`$as_me' instantiates files and other configuration actions
25015from templates according to the current configuration.  Unless the files
25016and actions are specified as TAGs, all are instantiated by default.
25017
25018Usage: $0 [OPTION]... [TAG]...
25019
25020  -h, --help       print this help, then exit
25021  -V, --version    print version number and configuration settings, then exit
25022      --config     print configuration, then exit
25023  -q, --quiet, --silent
25024                   do not print progress messages
25025  -d, --debug      don't remove temporary files
25026      --recheck    update $as_me by reconfiguring in the same conditions
25027      --file=FILE[:TEMPLATE]
25028                   instantiate the configuration file FILE
25029      --header=FILE[:TEMPLATE]
25030                   instantiate the configuration header FILE
25031
25032Configuration files:
25033$config_files
25034
25035Configuration headers:
25036$config_headers
25037
25038Configuration commands:
25039$config_commands
25040
25041Report bugs to <unbound-bugs@nlnetlabs.nl or https://github.com/NLnetLabs/unbound/issues>."
25042
25043_ACEOF
25044ac_cs_config=`printf "%s\n" "$ac_configure_args" | sed "$ac_safe_unquote"`
25045ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\''/g"`
25046cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
25047ac_cs_config='$ac_cs_config_escaped'
25048ac_cs_version="\\
25049unbound config.status 1.20.0
25050configured by $0, generated by GNU Autoconf 2.71,
25051  with options \\"\$ac_cs_config\\"
25052
25053Copyright (C) 2021 Free Software Foundation, Inc.
25054This config.status script is free software; the Free Software Foundation
25055gives unlimited permission to copy, distribute and modify it."
25056
25057ac_pwd='$ac_pwd'
25058srcdir='$srcdir'
25059AWK='$AWK'
25060test -n "\$AWK" || AWK=awk
25061_ACEOF
25062
25063cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
25064# The default lists apply if the user does not specify any file.
25065ac_need_defaults=:
25066while test $# != 0
25067do
25068  case $1 in
25069  --*=?*)
25070    ac_option=`expr "X$1" : 'X\([^=]*\)='`
25071    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
25072    ac_shift=:
25073    ;;
25074  --*=)
25075    ac_option=`expr "X$1" : 'X\([^=]*\)='`
25076    ac_optarg=
25077    ac_shift=:
25078    ;;
25079  *)
25080    ac_option=$1
25081    ac_optarg=$2
25082    ac_shift=shift
25083    ;;
25084  esac
25085
25086  case $ac_option in
25087  # Handling of the options.
25088  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
25089    ac_cs_recheck=: ;;
25090  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
25091    printf "%s\n" "$ac_cs_version"; exit ;;
25092  --config | --confi | --conf | --con | --co | --c )
25093    printf "%s\n" "$ac_cs_config"; exit ;;
25094  --debug | --debu | --deb | --de | --d | -d )
25095    debug=: ;;
25096  --file | --fil | --fi | --f )
25097    $ac_shift
25098    case $ac_optarg in
25099    *\'*) ac_optarg=`printf "%s\n" "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
25100    '') as_fn_error $? "missing file argument" ;;
25101    esac
25102    as_fn_append CONFIG_FILES " '$ac_optarg'"
25103    ac_need_defaults=false;;
25104  --header | --heade | --head | --hea )
25105    $ac_shift
25106    case $ac_optarg in
25107    *\'*) ac_optarg=`printf "%s\n" "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
25108    esac
25109    as_fn_append CONFIG_HEADERS " '$ac_optarg'"
25110    ac_need_defaults=false;;
25111  --he | --h)
25112    # Conflict between --help and --header
25113    as_fn_error $? "ambiguous option: \`$1'
25114Try \`$0 --help' for more information.";;
25115  --help | --hel | -h )
25116    printf "%s\n" "$ac_cs_usage"; exit ;;
25117  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
25118  | -silent | --silent | --silen | --sile | --sil | --si | --s)
25119    ac_cs_silent=: ;;
25120
25121  # This is an error.
25122  -*) as_fn_error $? "unrecognized option: \`$1'
25123Try \`$0 --help' for more information." ;;
25124
25125  *) as_fn_append ac_config_targets " $1"
25126     ac_need_defaults=false ;;
25127
25128  esac
25129  shift
25130done
25131
25132ac_configure_extra_args=
25133
25134if $ac_cs_silent; then
25135  exec 6>/dev/null
25136  ac_configure_extra_args="$ac_configure_extra_args --silent"
25137fi
25138
25139_ACEOF
25140cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
25141if \$ac_cs_recheck; then
25142  set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
25143  shift
25144  \printf "%s\n" "running CONFIG_SHELL=$SHELL \$*" >&6
25145  CONFIG_SHELL='$SHELL'
25146  export CONFIG_SHELL
25147  exec "\$@"
25148fi
25149
25150_ACEOF
25151cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
25152exec 5>>config.log
25153{
25154  echo
25155  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
25156## Running $as_me. ##
25157_ASBOX
25158  printf "%s\n" "$ac_log"
25159} >&5
25160
25161_ACEOF
25162cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
25163#
25164# INIT-COMMANDS
25165#
25166
25167
25168# The HP-UX ksh and POSIX shell print the target directory to stdout
25169# if CDPATH is set.
25170(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
25171
25172sed_quote_subst='$sed_quote_subst'
25173double_quote_subst='$double_quote_subst'
25174delay_variable_subst='$delay_variable_subst'
25175macro_version='`$ECHO "$macro_version" | $SED "$delay_single_quote_subst"`'
25176macro_revision='`$ECHO "$macro_revision" | $SED "$delay_single_quote_subst"`'
25177enable_shared='`$ECHO "$enable_shared" | $SED "$delay_single_quote_subst"`'
25178enable_static='`$ECHO "$enable_static" | $SED "$delay_single_quote_subst"`'
25179pic_mode='`$ECHO "$pic_mode" | $SED "$delay_single_quote_subst"`'
25180enable_fast_install='`$ECHO "$enable_fast_install" | $SED "$delay_single_quote_subst"`'
25181shared_archive_member_spec='`$ECHO "$shared_archive_member_spec" | $SED "$delay_single_quote_subst"`'
25182SHELL='`$ECHO "$SHELL" | $SED "$delay_single_quote_subst"`'
25183ECHO='`$ECHO "$ECHO" | $SED "$delay_single_quote_subst"`'
25184PATH_SEPARATOR='`$ECHO "$PATH_SEPARATOR" | $SED "$delay_single_quote_subst"`'
25185host_alias='`$ECHO "$host_alias" | $SED "$delay_single_quote_subst"`'
25186host='`$ECHO "$host" | $SED "$delay_single_quote_subst"`'
25187host_os='`$ECHO "$host_os" | $SED "$delay_single_quote_subst"`'
25188build_alias='`$ECHO "$build_alias" | $SED "$delay_single_quote_subst"`'
25189build='`$ECHO "$build" | $SED "$delay_single_quote_subst"`'
25190build_os='`$ECHO "$build_os" | $SED "$delay_single_quote_subst"`'
25191SED='`$ECHO "$SED" | $SED "$delay_single_quote_subst"`'
25192Xsed='`$ECHO "$Xsed" | $SED "$delay_single_quote_subst"`'
25193GREP='`$ECHO "$GREP" | $SED "$delay_single_quote_subst"`'
25194EGREP='`$ECHO "$EGREP" | $SED "$delay_single_quote_subst"`'
25195FGREP='`$ECHO "$FGREP" | $SED "$delay_single_quote_subst"`'
25196LD='`$ECHO "$LD" | $SED "$delay_single_quote_subst"`'
25197NM='`$ECHO "$NM" | $SED "$delay_single_quote_subst"`'
25198LN_S='`$ECHO "$LN_S" | $SED "$delay_single_quote_subst"`'
25199max_cmd_len='`$ECHO "$max_cmd_len" | $SED "$delay_single_quote_subst"`'
25200ac_objext='`$ECHO "$ac_objext" | $SED "$delay_single_quote_subst"`'
25201exeext='`$ECHO "$exeext" | $SED "$delay_single_quote_subst"`'
25202lt_unset='`$ECHO "$lt_unset" | $SED "$delay_single_quote_subst"`'
25203lt_SP2NL='`$ECHO "$lt_SP2NL" | $SED "$delay_single_quote_subst"`'
25204lt_NL2SP='`$ECHO "$lt_NL2SP" | $SED "$delay_single_quote_subst"`'
25205lt_cv_to_host_file_cmd='`$ECHO "$lt_cv_to_host_file_cmd" | $SED "$delay_single_quote_subst"`'
25206lt_cv_to_tool_file_cmd='`$ECHO "$lt_cv_to_tool_file_cmd" | $SED "$delay_single_quote_subst"`'
25207reload_flag='`$ECHO "$reload_flag" | $SED "$delay_single_quote_subst"`'
25208reload_cmds='`$ECHO "$reload_cmds" | $SED "$delay_single_quote_subst"`'
25209OBJDUMP='`$ECHO "$OBJDUMP" | $SED "$delay_single_quote_subst"`'
25210deplibs_check_method='`$ECHO "$deplibs_check_method" | $SED "$delay_single_quote_subst"`'
25211file_magic_cmd='`$ECHO "$file_magic_cmd" | $SED "$delay_single_quote_subst"`'
25212file_magic_glob='`$ECHO "$file_magic_glob" | $SED "$delay_single_quote_subst"`'
25213want_nocaseglob='`$ECHO "$want_nocaseglob" | $SED "$delay_single_quote_subst"`'
25214DLLTOOL='`$ECHO "$DLLTOOL" | $SED "$delay_single_quote_subst"`'
25215sharedlib_from_linklib_cmd='`$ECHO "$sharedlib_from_linklib_cmd" | $SED "$delay_single_quote_subst"`'
25216AR='`$ECHO "$AR" | $SED "$delay_single_quote_subst"`'
25217AR_FLAGS='`$ECHO "$AR_FLAGS" | $SED "$delay_single_quote_subst"`'
25218archiver_list_spec='`$ECHO "$archiver_list_spec" | $SED "$delay_single_quote_subst"`'
25219STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`'
25220RANLIB='`$ECHO "$RANLIB" | $SED "$delay_single_quote_subst"`'
25221old_postinstall_cmds='`$ECHO "$old_postinstall_cmds" | $SED "$delay_single_quote_subst"`'
25222old_postuninstall_cmds='`$ECHO "$old_postuninstall_cmds" | $SED "$delay_single_quote_subst"`'
25223old_archive_cmds='`$ECHO "$old_archive_cmds" | $SED "$delay_single_quote_subst"`'
25224lock_old_archive_extraction='`$ECHO "$lock_old_archive_extraction" | $SED "$delay_single_quote_subst"`'
25225CC='`$ECHO "$CC" | $SED "$delay_single_quote_subst"`'
25226CFLAGS='`$ECHO "$CFLAGS" | $SED "$delay_single_quote_subst"`'
25227compiler='`$ECHO "$compiler" | $SED "$delay_single_quote_subst"`'
25228GCC='`$ECHO "$GCC" | $SED "$delay_single_quote_subst"`'
25229lt_cv_sys_global_symbol_pipe='`$ECHO "$lt_cv_sys_global_symbol_pipe" | $SED "$delay_single_quote_subst"`'
25230lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`'
25231lt_cv_sys_global_symbol_to_import='`$ECHO "$lt_cv_sys_global_symbol_to_import" | $SED "$delay_single_quote_subst"`'
25232lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`'
25233lt_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"`'
25234lt_cv_nm_interface='`$ECHO "$lt_cv_nm_interface" | $SED "$delay_single_quote_subst"`'
25235nm_file_list_spec='`$ECHO "$nm_file_list_spec" | $SED "$delay_single_quote_subst"`'
25236lt_sysroot='`$ECHO "$lt_sysroot" | $SED "$delay_single_quote_subst"`'
25237lt_cv_truncate_bin='`$ECHO "$lt_cv_truncate_bin" | $SED "$delay_single_quote_subst"`'
25238objdir='`$ECHO "$objdir" | $SED "$delay_single_quote_subst"`'
25239MAGIC_CMD='`$ECHO "$MAGIC_CMD" | $SED "$delay_single_quote_subst"`'
25240lt_prog_compiler_no_builtin_flag='`$ECHO "$lt_prog_compiler_no_builtin_flag" | $SED "$delay_single_quote_subst"`'
25241lt_prog_compiler_pic='`$ECHO "$lt_prog_compiler_pic" | $SED "$delay_single_quote_subst"`'
25242lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`'
25243lt_prog_compiler_static='`$ECHO "$lt_prog_compiler_static" | $SED "$delay_single_quote_subst"`'
25244lt_cv_prog_compiler_c_o='`$ECHO "$lt_cv_prog_compiler_c_o" | $SED "$delay_single_quote_subst"`'
25245need_locks='`$ECHO "$need_locks" | $SED "$delay_single_quote_subst"`'
25246MANIFEST_TOOL='`$ECHO "$MANIFEST_TOOL" | $SED "$delay_single_quote_subst"`'
25247DSYMUTIL='`$ECHO "$DSYMUTIL" | $SED "$delay_single_quote_subst"`'
25248NMEDIT='`$ECHO "$NMEDIT" | $SED "$delay_single_quote_subst"`'
25249LIPO='`$ECHO "$LIPO" | $SED "$delay_single_quote_subst"`'
25250OTOOL='`$ECHO "$OTOOL" | $SED "$delay_single_quote_subst"`'
25251OTOOL64='`$ECHO "$OTOOL64" | $SED "$delay_single_quote_subst"`'
25252libext='`$ECHO "$libext" | $SED "$delay_single_quote_subst"`'
25253shrext_cmds='`$ECHO "$shrext_cmds" | $SED "$delay_single_quote_subst"`'
25254extract_expsyms_cmds='`$ECHO "$extract_expsyms_cmds" | $SED "$delay_single_quote_subst"`'
25255archive_cmds_need_lc='`$ECHO "$archive_cmds_need_lc" | $SED "$delay_single_quote_subst"`'
25256enable_shared_with_static_runtimes='`$ECHO "$enable_shared_with_static_runtimes" | $SED "$delay_single_quote_subst"`'
25257export_dynamic_flag_spec='`$ECHO "$export_dynamic_flag_spec" | $SED "$delay_single_quote_subst"`'
25258whole_archive_flag_spec='`$ECHO "$whole_archive_flag_spec" | $SED "$delay_single_quote_subst"`'
25259compiler_needs_object='`$ECHO "$compiler_needs_object" | $SED "$delay_single_quote_subst"`'
25260old_archive_from_new_cmds='`$ECHO "$old_archive_from_new_cmds" | $SED "$delay_single_quote_subst"`'
25261old_archive_from_expsyms_cmds='`$ECHO "$old_archive_from_expsyms_cmds" | $SED "$delay_single_quote_subst"`'
25262archive_cmds='`$ECHO "$archive_cmds" | $SED "$delay_single_quote_subst"`'
25263archive_expsym_cmds='`$ECHO "$archive_expsym_cmds" | $SED "$delay_single_quote_subst"`'
25264module_cmds='`$ECHO "$module_cmds" | $SED "$delay_single_quote_subst"`'
25265module_expsym_cmds='`$ECHO "$module_expsym_cmds" | $SED "$delay_single_quote_subst"`'
25266with_gnu_ld='`$ECHO "$with_gnu_ld" | $SED "$delay_single_quote_subst"`'
25267allow_undefined_flag='`$ECHO "$allow_undefined_flag" | $SED "$delay_single_quote_subst"`'
25268no_undefined_flag='`$ECHO "$no_undefined_flag" | $SED "$delay_single_quote_subst"`'
25269hardcode_libdir_flag_spec='`$ECHO "$hardcode_libdir_flag_spec" | $SED "$delay_single_quote_subst"`'
25270hardcode_libdir_separator='`$ECHO "$hardcode_libdir_separator" | $SED "$delay_single_quote_subst"`'
25271hardcode_direct='`$ECHO "$hardcode_direct" | $SED "$delay_single_quote_subst"`'
25272hardcode_direct_absolute='`$ECHO "$hardcode_direct_absolute" | $SED "$delay_single_quote_subst"`'
25273hardcode_minus_L='`$ECHO "$hardcode_minus_L" | $SED "$delay_single_quote_subst"`'
25274hardcode_shlibpath_var='`$ECHO "$hardcode_shlibpath_var" | $SED "$delay_single_quote_subst"`'
25275hardcode_automatic='`$ECHO "$hardcode_automatic" | $SED "$delay_single_quote_subst"`'
25276inherit_rpath='`$ECHO "$inherit_rpath" | $SED "$delay_single_quote_subst"`'
25277link_all_deplibs='`$ECHO "$link_all_deplibs" | $SED "$delay_single_quote_subst"`'
25278always_export_symbols='`$ECHO "$always_export_symbols" | $SED "$delay_single_quote_subst"`'
25279export_symbols_cmds='`$ECHO "$export_symbols_cmds" | $SED "$delay_single_quote_subst"`'
25280exclude_expsyms='`$ECHO "$exclude_expsyms" | $SED "$delay_single_quote_subst"`'
25281include_expsyms='`$ECHO "$include_expsyms" | $SED "$delay_single_quote_subst"`'
25282prelink_cmds='`$ECHO "$prelink_cmds" | $SED "$delay_single_quote_subst"`'
25283postlink_cmds='`$ECHO "$postlink_cmds" | $SED "$delay_single_quote_subst"`'
25284file_list_spec='`$ECHO "$file_list_spec" | $SED "$delay_single_quote_subst"`'
25285variables_saved_for_relink='`$ECHO "$variables_saved_for_relink" | $SED "$delay_single_quote_subst"`'
25286need_lib_prefix='`$ECHO "$need_lib_prefix" | $SED "$delay_single_quote_subst"`'
25287need_version='`$ECHO "$need_version" | $SED "$delay_single_quote_subst"`'
25288version_type='`$ECHO "$version_type" | $SED "$delay_single_quote_subst"`'
25289runpath_var='`$ECHO "$runpath_var" | $SED "$delay_single_quote_subst"`'
25290shlibpath_var='`$ECHO "$shlibpath_var" | $SED "$delay_single_quote_subst"`'
25291shlibpath_overrides_runpath='`$ECHO "$shlibpath_overrides_runpath" | $SED "$delay_single_quote_subst"`'
25292libname_spec='`$ECHO "$libname_spec" | $SED "$delay_single_quote_subst"`'
25293library_names_spec='`$ECHO "$library_names_spec" | $SED "$delay_single_quote_subst"`'
25294soname_spec='`$ECHO "$soname_spec" | $SED "$delay_single_quote_subst"`'
25295install_override_mode='`$ECHO "$install_override_mode" | $SED "$delay_single_quote_subst"`'
25296postinstall_cmds='`$ECHO "$postinstall_cmds" | $SED "$delay_single_quote_subst"`'
25297postuninstall_cmds='`$ECHO "$postuninstall_cmds" | $SED "$delay_single_quote_subst"`'
25298finish_cmds='`$ECHO "$finish_cmds" | $SED "$delay_single_quote_subst"`'
25299finish_eval='`$ECHO "$finish_eval" | $SED "$delay_single_quote_subst"`'
25300hardcode_into_libs='`$ECHO "$hardcode_into_libs" | $SED "$delay_single_quote_subst"`'
25301sys_lib_search_path_spec='`$ECHO "$sys_lib_search_path_spec" | $SED "$delay_single_quote_subst"`'
25302configure_time_dlsearch_path='`$ECHO "$configure_time_dlsearch_path" | $SED "$delay_single_quote_subst"`'
25303configure_time_lt_sys_library_path='`$ECHO "$configure_time_lt_sys_library_path" | $SED "$delay_single_quote_subst"`'
25304hardcode_action='`$ECHO "$hardcode_action" | $SED "$delay_single_quote_subst"`'
25305enable_dlopen='`$ECHO "$enable_dlopen" | $SED "$delay_single_quote_subst"`'
25306enable_dlopen_self='`$ECHO "$enable_dlopen_self" | $SED "$delay_single_quote_subst"`'
25307enable_dlopen_self_static='`$ECHO "$enable_dlopen_self_static" | $SED "$delay_single_quote_subst"`'
25308old_striplib='`$ECHO "$old_striplib" | $SED "$delay_single_quote_subst"`'
25309striplib='`$ECHO "$striplib" | $SED "$delay_single_quote_subst"`'
25310
25311LTCC='$LTCC'
25312LTCFLAGS='$LTCFLAGS'
25313compiler='$compiler_DEFAULT'
25314
25315# A function that is used when there is no print builtin or printf.
25316func_fallback_echo ()
25317{
25318  eval 'cat <<_LTECHO_EOF
25319\$1
25320_LTECHO_EOF'
25321}
25322
25323# Quote evaled strings.
25324for var in SHELL \
25325ECHO \
25326PATH_SEPARATOR \
25327SED \
25328GREP \
25329EGREP \
25330FGREP \
25331LD \
25332NM \
25333LN_S \
25334lt_SP2NL \
25335lt_NL2SP \
25336reload_flag \
25337OBJDUMP \
25338deplibs_check_method \
25339file_magic_cmd \
25340file_magic_glob \
25341want_nocaseglob \
25342DLLTOOL \
25343sharedlib_from_linklib_cmd \
25344AR \
25345AR_FLAGS \
25346archiver_list_spec \
25347STRIP \
25348RANLIB \
25349CC \
25350CFLAGS \
25351compiler \
25352lt_cv_sys_global_symbol_pipe \
25353lt_cv_sys_global_symbol_to_cdecl \
25354lt_cv_sys_global_symbol_to_import \
25355lt_cv_sys_global_symbol_to_c_name_address \
25356lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \
25357lt_cv_nm_interface \
25358nm_file_list_spec \
25359lt_cv_truncate_bin \
25360lt_prog_compiler_no_builtin_flag \
25361lt_prog_compiler_pic \
25362lt_prog_compiler_wl \
25363lt_prog_compiler_static \
25364lt_cv_prog_compiler_c_o \
25365need_locks \
25366MANIFEST_TOOL \
25367DSYMUTIL \
25368NMEDIT \
25369LIPO \
25370OTOOL \
25371OTOOL64 \
25372shrext_cmds \
25373export_dynamic_flag_spec \
25374whole_archive_flag_spec \
25375compiler_needs_object \
25376with_gnu_ld \
25377allow_undefined_flag \
25378no_undefined_flag \
25379hardcode_libdir_flag_spec \
25380hardcode_libdir_separator \
25381exclude_expsyms \
25382include_expsyms \
25383file_list_spec \
25384variables_saved_for_relink \
25385libname_spec \
25386library_names_spec \
25387soname_spec \
25388install_override_mode \
25389finish_eval \
25390old_striplib \
25391striplib; do
25392    case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
25393    *[\\\\\\\`\\"\\\$]*)
25394      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes
25395      ;;
25396    *)
25397      eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
25398      ;;
25399    esac
25400done
25401
25402# Double-quote double-evaled strings.
25403for var in reload_cmds \
25404old_postinstall_cmds \
25405old_postuninstall_cmds \
25406old_archive_cmds \
25407extract_expsyms_cmds \
25408old_archive_from_new_cmds \
25409old_archive_from_expsyms_cmds \
25410archive_cmds \
25411archive_expsym_cmds \
25412module_cmds \
25413module_expsym_cmds \
25414export_symbols_cmds \
25415prelink_cmds \
25416postlink_cmds \
25417postinstall_cmds \
25418postuninstall_cmds \
25419finish_cmds \
25420sys_lib_search_path_spec \
25421configure_time_dlsearch_path \
25422configure_time_lt_sys_library_path; do
25423    case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
25424    *[\\\\\\\`\\"\\\$]*)
25425      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes
25426      ;;
25427    *)
25428      eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
25429      ;;
25430    esac
25431done
25432
25433ac_aux_dir='$ac_aux_dir'
25434
25435# See if we are running on zsh, and set the options that allow our
25436# commands through without removal of \ escapes INIT.
25437if test -n "\${ZSH_VERSION+set}"; then
25438   setopt NO_GLOB_SUBST
25439fi
25440
25441
25442    PACKAGE='$PACKAGE'
25443    VERSION='$VERSION'
25444    RM='$RM'
25445    ofile='$ofile'
25446
25447
25448
25449
25450_ACEOF
25451
25452cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
25453
25454# Handling of arguments.
25455for ac_config_target in $ac_config_targets
25456do
25457  case $ac_config_target in
25458    "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;;
25459    "disable-rpath") CONFIG_COMMANDS="$CONFIG_COMMANDS disable-rpath" ;;
25460    "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
25461    "doc/example.conf") CONFIG_FILES="$CONFIG_FILES doc/example.conf" ;;
25462    "doc/libunbound.3") CONFIG_FILES="$CONFIG_FILES doc/libunbound.3" ;;
25463    "doc/unbound.8") CONFIG_FILES="$CONFIG_FILES doc/unbound.8" ;;
25464    "doc/unbound-anchor.8") CONFIG_FILES="$CONFIG_FILES doc/unbound-anchor.8" ;;
25465    "doc/unbound-checkconf.8") CONFIG_FILES="$CONFIG_FILES doc/unbound-checkconf.8" ;;
25466    "doc/unbound.conf.5") CONFIG_FILES="$CONFIG_FILES doc/unbound.conf.5" ;;
25467    "doc/unbound-control.8") CONFIG_FILES="$CONFIG_FILES doc/unbound-control.8" ;;
25468    "doc/unbound-host.1") CONFIG_FILES="$CONFIG_FILES doc/unbound-host.1" ;;
25469    "smallapp/unbound-control-setup.sh") CONFIG_FILES="$CONFIG_FILES smallapp/unbound-control-setup.sh" ;;
25470    "dnstap/dnstap_config.h") CONFIG_FILES="$CONFIG_FILES dnstap/dnstap_config.h" ;;
25471    "dnscrypt/dnscrypt_config.h") CONFIG_FILES="$CONFIG_FILES dnscrypt/dnscrypt_config.h" ;;
25472    "contrib/libunbound.pc") CONFIG_FILES="$CONFIG_FILES contrib/libunbound.pc" ;;
25473    "contrib/unbound.socket") CONFIG_FILES="$CONFIG_FILES contrib/unbound.socket" ;;
25474    "contrib/unbound.service") CONFIG_FILES="$CONFIG_FILES contrib/unbound.service" ;;
25475    "contrib/unbound_portable.service") CONFIG_FILES="$CONFIG_FILES contrib/unbound_portable.service" ;;
25476    "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
25477
25478  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
25479  esac
25480done
25481
25482
25483# If the user did not use the arguments to specify the items to instantiate,
25484# then the envvar interface is used.  Set only those that are not.
25485# We use the long form for the default assignment because of an extremely
25486# bizarre bug on SunOS 4.1.3.
25487if $ac_need_defaults; then
25488  test ${CONFIG_FILES+y} || CONFIG_FILES=$config_files
25489  test ${CONFIG_HEADERS+y} || CONFIG_HEADERS=$config_headers
25490  test ${CONFIG_COMMANDS+y} || CONFIG_COMMANDS=$config_commands
25491fi
25492
25493# Have a temporary directory for convenience.  Make it in the build tree
25494# simply because there is no reason against having it here, and in addition,
25495# creating and moving files from /tmp can sometimes cause problems.
25496# Hook for its removal unless debugging.
25497# Note that there is a small window in which the directory will not be cleaned:
25498# after its creation but before its name has been assigned to `$tmp'.
25499$debug ||
25500{
25501  tmp= ac_tmp=
25502  trap 'exit_status=$?
25503  : "${ac_tmp:=$tmp}"
25504  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
25505' 0
25506  trap 'as_fn_exit 1' 1 2 13 15
25507}
25508# Create a (secure) tmp directory for tmp files.
25509
25510{
25511  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
25512  test -d "$tmp"
25513}  ||
25514{
25515  tmp=./conf$$-$RANDOM
25516  (umask 077 && mkdir "$tmp")
25517} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
25518ac_tmp=$tmp
25519
25520# Set up the scripts for CONFIG_FILES section.
25521# No need to generate them if there are no CONFIG_FILES.
25522# This happens for instance with `./config.status config.h'.
25523if test -n "$CONFIG_FILES"; then
25524
25525
25526ac_cr=`echo X | tr X '\015'`
25527# On cygwin, bash can eat \r inside `` if the user requested igncr.
25528# But we know of no other shell where ac_cr would be empty at this
25529# point, so we can use a bashism as a fallback.
25530if test "x$ac_cr" = x; then
25531  eval ac_cr=\$\'\\r\'
25532fi
25533ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
25534if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
25535  ac_cs_awk_cr='\\r'
25536else
25537  ac_cs_awk_cr=$ac_cr
25538fi
25539
25540echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
25541_ACEOF
25542
25543
25544{
25545  echo "cat >conf$$subs.awk <<_ACEOF" &&
25546  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
25547  echo "_ACEOF"
25548} >conf$$subs.sh ||
25549  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
25550ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
25551ac_delim='%!_!# '
25552for ac_last_try in false false false false false :; do
25553  . ./conf$$subs.sh ||
25554    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
25555
25556  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
25557  if test $ac_delim_n = $ac_delim_num; then
25558    break
25559  elif $ac_last_try; then
25560    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
25561  else
25562    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
25563  fi
25564done
25565rm -f conf$$subs.sh
25566
25567cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
25568cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
25569_ACEOF
25570sed -n '
25571h
25572s/^/S["/; s/!.*/"]=/
25573p
25574g
25575s/^[^!]*!//
25576:repl
25577t repl
25578s/'"$ac_delim"'$//
25579t delim
25580:nl
25581h
25582s/\(.\{148\}\)..*/\1/
25583t more1
25584s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
25585p
25586n
25587b repl
25588:more1
25589s/["\\]/\\&/g; s/^/"/; s/$/"\\/
25590p
25591g
25592s/.\{148\}//
25593t nl
25594:delim
25595h
25596s/\(.\{148\}\)..*/\1/
25597t more2
25598s/["\\]/\\&/g; s/^/"/; s/$/"/
25599p
25600b
25601:more2
25602s/["\\]/\\&/g; s/^/"/; s/$/"\\/
25603p
25604g
25605s/.\{148\}//
25606t delim
25607' <conf$$subs.awk | sed '
25608/^[^""]/{
25609  N
25610  s/\n//
25611}
25612' >>$CONFIG_STATUS || ac_write_fail=1
25613rm -f conf$$subs.awk
25614cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
25615_ACAWK
25616cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
25617  for (key in S) S_is_set[key] = 1
25618  FS = ""
25619
25620}
25621{
25622  line = $ 0
25623  nfields = split(line, field, "@")
25624  substed = 0
25625  len = length(field[1])
25626  for (i = 2; i < nfields; i++) {
25627    key = field[i]
25628    keylen = length(key)
25629    if (S_is_set[key]) {
25630      value = S[key]
25631      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
25632      len += length(value) + length(field[++i])
25633      substed = 1
25634    } else
25635      len += 1 + keylen
25636  }
25637
25638  print line
25639}
25640
25641_ACAWK
25642_ACEOF
25643cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
25644if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
25645  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
25646else
25647  cat
25648fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
25649  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
25650_ACEOF
25651
25652# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
25653# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
25654# trailing colons and then remove the whole line if VPATH becomes empty
25655# (actually we leave an empty line to preserve line numbers).
25656if test "x$srcdir" = x.; then
25657  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
25658h
25659s///
25660s/^/:/
25661s/[	 ]*$/:/
25662s/:\$(srcdir):/:/g
25663s/:\${srcdir}:/:/g
25664s/:@srcdir@:/:/g
25665s/^:*//
25666s/:*$//
25667x
25668s/\(=[	 ]*\).*/\1/
25669G
25670s/\n//
25671s/^[^=]*=[	 ]*$//
25672}'
25673fi
25674
25675cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
25676fi # test -n "$CONFIG_FILES"
25677
25678# Set up the scripts for CONFIG_HEADERS section.
25679# No need to generate them if there are no CONFIG_HEADERS.
25680# This happens for instance with `./config.status Makefile'.
25681if test -n "$CONFIG_HEADERS"; then
25682cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
25683BEGIN {
25684_ACEOF
25685
25686# Transform confdefs.h into an awk script `defines.awk', embedded as
25687# here-document in config.status, that substitutes the proper values into
25688# config.h.in to produce config.h.
25689
25690# Create a delimiter string that does not exist in confdefs.h, to ease
25691# handling of long lines.
25692ac_delim='%!_!# '
25693for ac_last_try in false false :; do
25694  ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
25695  if test -z "$ac_tt"; then
25696    break
25697  elif $ac_last_try; then
25698    as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
25699  else
25700    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
25701  fi
25702done
25703
25704# For the awk script, D is an array of macro values keyed by name,
25705# likewise P contains macro parameters if any.  Preserve backslash
25706# newline sequences.
25707
25708ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
25709sed -n '
25710s/.\{148\}/&'"$ac_delim"'/g
25711t rset
25712:rset
25713s/^[	 ]*#[	 ]*define[	 ][	 ]*/ /
25714t def
25715d
25716:def
25717s/\\$//
25718t bsnl
25719s/["\\]/\\&/g
25720s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
25721D["\1"]=" \3"/p
25722s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2"/p
25723d
25724:bsnl
25725s/["\\]/\\&/g
25726s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
25727D["\1"]=" \3\\\\\\n"\\/p
25728t cont
25729s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
25730t cont
25731d
25732:cont
25733n
25734s/.\{148\}/&'"$ac_delim"'/g
25735t clear
25736:clear
25737s/\\$//
25738t bsnlc
25739s/["\\]/\\&/g; s/^/"/; s/$/"/p
25740d
25741:bsnlc
25742s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
25743b cont
25744' <confdefs.h | sed '
25745s/'"$ac_delim"'/"\\\
25746"/g' >>$CONFIG_STATUS || ac_write_fail=1
25747
25748cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
25749  for (key in D) D_is_set[key] = 1
25750  FS = ""
25751}
25752/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
25753  line = \$ 0
25754  split(line, arg, " ")
25755  if (arg[1] == "#") {
25756    defundef = arg[2]
25757    mac1 = arg[3]
25758  } else {
25759    defundef = substr(arg[1], 2)
25760    mac1 = arg[2]
25761  }
25762  split(mac1, mac2, "(") #)
25763  macro = mac2[1]
25764  prefix = substr(line, 1, index(line, defundef) - 1)
25765  if (D_is_set[macro]) {
25766    # Preserve the white space surrounding the "#".
25767    print prefix "define", macro P[macro] D[macro]
25768    next
25769  } else {
25770    # Replace #undef with comments.  This is necessary, for example,
25771    # in the case of _POSIX_SOURCE, which is predefined and required
25772    # on some systems where configure will not decide to define it.
25773    if (defundef == "undef") {
25774      print "/*", prefix defundef, macro, "*/"
25775      next
25776    }
25777  }
25778}
25779{ print }
25780_ACAWK
25781_ACEOF
25782cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
25783  as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
25784fi # test -n "$CONFIG_HEADERS"
25785
25786
25787eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS    :C $CONFIG_COMMANDS"
25788shift
25789for ac_tag
25790do
25791  case $ac_tag in
25792  :[FHLC]) ac_mode=$ac_tag; continue;;
25793  esac
25794  case $ac_mode$ac_tag in
25795  :[FHL]*:*);;
25796  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
25797  :[FH]-) ac_tag=-:-;;
25798  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
25799  esac
25800  ac_save_IFS=$IFS
25801  IFS=:
25802  set x $ac_tag
25803  IFS=$ac_save_IFS
25804  shift
25805  ac_file=$1
25806  shift
25807
25808  case $ac_mode in
25809  :L) ac_source=$1;;
25810  :[FH])
25811    ac_file_inputs=
25812    for ac_f
25813    do
25814      case $ac_f in
25815      -) ac_f="$ac_tmp/stdin";;
25816      *) # Look for the file first in the build tree, then in the source tree
25817	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
25818	 # because $ac_f cannot contain `:'.
25819	 test -f "$ac_f" ||
25820	   case $ac_f in
25821	   [\\/$]*) false;;
25822	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
25823	   esac ||
25824	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
25825      esac
25826      case $ac_f in *\'*) ac_f=`printf "%s\n" "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
25827      as_fn_append ac_file_inputs " '$ac_f'"
25828    done
25829
25830    # Let's still pretend it is `configure' which instantiates (i.e., don't
25831    # use $as_me), people would be surprised to read:
25832    #    /* config.h.  Generated by config.status.  */
25833    configure_input='Generated from '`
25834	  printf "%s\n" "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
25835	`' by configure.'
25836    if test x"$ac_file" != x-; then
25837      configure_input="$ac_file.  $configure_input"
25838      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
25839printf "%s\n" "$as_me: creating $ac_file" >&6;}
25840    fi
25841    # Neutralize special characters interpreted by sed in replacement strings.
25842    case $configure_input in #(
25843    *\&* | *\|* | *\\* )
25844       ac_sed_conf_input=`printf "%s\n" "$configure_input" |
25845       sed 's/[\\\\&|]/\\\\&/g'`;; #(
25846    *) ac_sed_conf_input=$configure_input;;
25847    esac
25848
25849    case $ac_tag in
25850    *:-:* | *:-) cat >"$ac_tmp/stdin" \
25851      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
25852    esac
25853    ;;
25854  esac
25855
25856  ac_dir=`$as_dirname -- "$ac_file" ||
25857$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
25858	 X"$ac_file" : 'X\(//\)[^/]' \| \
25859	 X"$ac_file" : 'X\(//\)$' \| \
25860	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
25861printf "%s\n" X"$ac_file" |
25862    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
25863	    s//\1/
25864	    q
25865	  }
25866	  /^X\(\/\/\)[^/].*/{
25867	    s//\1/
25868	    q
25869	  }
25870	  /^X\(\/\/\)$/{
25871	    s//\1/
25872	    q
25873	  }
25874	  /^X\(\/\).*/{
25875	    s//\1/
25876	    q
25877	  }
25878	  s/.*/./; q'`
25879  as_dir="$ac_dir"; as_fn_mkdir_p
25880  ac_builddir=.
25881
25882case "$ac_dir" in
25883.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
25884*)
25885  ac_dir_suffix=/`printf "%s\n" "$ac_dir" | sed 's|^\.[\\/]||'`
25886  # A ".." for each directory in $ac_dir_suffix.
25887  ac_top_builddir_sub=`printf "%s\n" "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
25888  case $ac_top_builddir_sub in
25889  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
25890  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
25891  esac ;;
25892esac
25893ac_abs_top_builddir=$ac_pwd
25894ac_abs_builddir=$ac_pwd$ac_dir_suffix
25895# for backward compatibility:
25896ac_top_builddir=$ac_top_build_prefix
25897
25898case $srcdir in
25899  .)  # We are building in place.
25900    ac_srcdir=.
25901    ac_top_srcdir=$ac_top_builddir_sub
25902    ac_abs_top_srcdir=$ac_pwd ;;
25903  [\\/]* | ?:[\\/]* )  # Absolute name.
25904    ac_srcdir=$srcdir$ac_dir_suffix;
25905    ac_top_srcdir=$srcdir
25906    ac_abs_top_srcdir=$srcdir ;;
25907  *) # Relative name.
25908    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
25909    ac_top_srcdir=$ac_top_build_prefix$srcdir
25910    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
25911esac
25912ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
25913
25914
25915  case $ac_mode in
25916  :F)
25917  #
25918  # CONFIG_FILE
25919  #
25920
25921_ACEOF
25922
25923cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
25924# If the template does not know about datarootdir, expand it.
25925# FIXME: This hack should be removed a few years after 2.60.
25926ac_datarootdir_hack=; ac_datarootdir_seen=
25927ac_sed_dataroot='
25928/datarootdir/ {
25929  p
25930  q
25931}
25932/@datadir@/p
25933/@docdir@/p
25934/@infodir@/p
25935/@localedir@/p
25936/@mandir@/p'
25937case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
25938*datarootdir*) ac_datarootdir_seen=yes;;
25939*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
25940  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
25941printf "%s\n" "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
25942_ACEOF
25943cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
25944  ac_datarootdir_hack='
25945  s&@datadir@&$datadir&g
25946  s&@docdir@&$docdir&g
25947  s&@infodir@&$infodir&g
25948  s&@localedir@&$localedir&g
25949  s&@mandir@&$mandir&g
25950  s&\\\${datarootdir}&$datarootdir&g' ;;
25951esac
25952_ACEOF
25953
25954# Neutralize VPATH when `$srcdir' = `.'.
25955# Shell code in configure.ac might set extrasub.
25956# FIXME: do we really want to maintain this feature?
25957cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
25958ac_sed_extra="$ac_vpsub
25959$extrasub
25960_ACEOF
25961cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
25962:t
25963/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
25964s|@configure_input@|$ac_sed_conf_input|;t t
25965s&@top_builddir@&$ac_top_builddir_sub&;t t
25966s&@top_build_prefix@&$ac_top_build_prefix&;t t
25967s&@srcdir@&$ac_srcdir&;t t
25968s&@abs_srcdir@&$ac_abs_srcdir&;t t
25969s&@top_srcdir@&$ac_top_srcdir&;t t
25970s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
25971s&@builddir@&$ac_builddir&;t t
25972s&@abs_builddir@&$ac_abs_builddir&;t t
25973s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
25974$ac_datarootdir_hack
25975"
25976eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
25977  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
25978
25979test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
25980  { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
25981  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' \
25982      "$ac_tmp/out"`; test -z "$ac_out"; } &&
25983  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
25984which seems to be undefined.  Please make sure it is defined" >&5
25985printf "%s\n" "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
25986which seems to be undefined.  Please make sure it is defined" >&2;}
25987
25988  rm -f "$ac_tmp/stdin"
25989  case $ac_file in
25990  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
25991  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
25992  esac \
25993  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
25994 ;;
25995  :H)
25996  #
25997  # CONFIG_HEADER
25998  #
25999  if test x"$ac_file" != x-; then
26000    {
26001      printf "%s\n" "/* $configure_input  */" >&1 \
26002      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
26003    } >"$ac_tmp/config.h" \
26004      || as_fn_error $? "could not create $ac_file" "$LINENO" 5
26005    if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
26006      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
26007printf "%s\n" "$as_me: $ac_file is unchanged" >&6;}
26008    else
26009      rm -f "$ac_file"
26010      mv "$ac_tmp/config.h" "$ac_file" \
26011	|| as_fn_error $? "could not create $ac_file" "$LINENO" 5
26012    fi
26013  else
26014    printf "%s\n" "/* $configure_input  */" >&1 \
26015      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
26016      || as_fn_error $? "could not create -" "$LINENO" 5
26017  fi
26018 ;;
26019
26020  :C)  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
26021printf "%s\n" "$as_me: executing $ac_file commands" >&6;}
26022 ;;
26023  esac
26024
26025
26026  case $ac_file$ac_mode in
26027    "libtool":C)
26028
26029    # See if we are running on zsh, and set the options that allow our
26030    # commands through without removal of \ escapes.
26031    if test -n "${ZSH_VERSION+set}"; then
26032      setopt NO_GLOB_SUBST
26033    fi
26034
26035    cfgfile=${ofile}T
26036    trap "$RM \"$cfgfile\"; exit 1" 1 2 15
26037    $RM "$cfgfile"
26038
26039    cat <<_LT_EOF >> "$cfgfile"
26040#! $SHELL
26041# Generated automatically by $as_me ($PACKAGE) $VERSION
26042# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
26043# NOTE: Changes made to this file will be lost: look at ltmain.sh.
26044
26045# Provide generalized library-building support services.
26046# Written by Gordon Matzigkeit, 1996
26047
26048# Copyright (C) 2014 Free Software Foundation, Inc.
26049# This is free software; see the source for copying conditions.  There is NO
26050# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
26051
26052# GNU Libtool is free software; you can redistribute it and/or modify
26053# it under the terms of the GNU General Public License as published by
26054# the Free Software Foundation; either version 2 of of the License, or
26055# (at your option) any later version.
26056#
26057# As a special exception to the GNU General Public License, if you
26058# distribute this file as part of a program or library that is built
26059# using GNU Libtool, you may include this file under the  same
26060# distribution terms that you use for the rest of that program.
26061#
26062# GNU Libtool is distributed in the hope that it will be useful, but
26063# WITHOUT ANY WARRANTY; without even the implied warranty of
26064# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
26065# GNU General Public License for more details.
26066#
26067# You should have received a copy of the GNU General Public License
26068# along with this program.  If not, see <http://www.gnu.org/licenses/>.
26069
26070
26071# The names of the tagged configurations supported by this script.
26072available_tags=''
26073
26074# Configured defaults for sys_lib_dlsearch_path munging.
26075: \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"}
26076
26077# ### BEGIN LIBTOOL CONFIG
26078
26079# Which release of libtool.m4 was used?
26080macro_version=$macro_version
26081macro_revision=$macro_revision
26082
26083# Whether or not to build shared libraries.
26084build_libtool_libs=$enable_shared
26085
26086# Whether or not to build static libraries.
26087build_old_libs=$enable_static
26088
26089# What type of objects to build.
26090pic_mode=$pic_mode
26091
26092# Whether or not to optimize for fast installation.
26093fast_install=$enable_fast_install
26094
26095# Shared archive member basename,for filename based shared library versioning on AIX.
26096shared_archive_member_spec=$shared_archive_member_spec
26097
26098# Shell to use when invoking shell scripts.
26099SHELL=$lt_SHELL
26100
26101# An echo program that protects backslashes.
26102ECHO=$lt_ECHO
26103
26104# The PATH separator for the build system.
26105PATH_SEPARATOR=$lt_PATH_SEPARATOR
26106
26107# The host system.
26108host_alias=$host_alias
26109host=$host
26110host_os=$host_os
26111
26112# The build system.
26113build_alias=$build_alias
26114build=$build
26115build_os=$build_os
26116
26117# A sed program that does not truncate output.
26118SED=$lt_SED
26119
26120# Sed that helps us avoid accidentally triggering echo(1) options like -n.
26121Xsed="\$SED -e 1s/^X//"
26122
26123# A grep program that handles long lines.
26124GREP=$lt_GREP
26125
26126# An ERE matcher.
26127EGREP=$lt_EGREP
26128
26129# A literal string matcher.
26130FGREP=$lt_FGREP
26131
26132# A BSD- or MS-compatible name lister.
26133NM=$lt_NM
26134
26135# Whether we need soft or hard links.
26136LN_S=$lt_LN_S
26137
26138# What is the maximum length of a command?
26139max_cmd_len=$max_cmd_len
26140
26141# Object file suffix (normally "o").
26142objext=$ac_objext
26143
26144# Executable file suffix (normally "").
26145exeext=$exeext
26146
26147# whether the shell understands "unset".
26148lt_unset=$lt_unset
26149
26150# turn spaces into newlines.
26151SP2NL=$lt_lt_SP2NL
26152
26153# turn newlines into spaces.
26154NL2SP=$lt_lt_NL2SP
26155
26156# convert \$build file names to \$host format.
26157to_host_file_cmd=$lt_cv_to_host_file_cmd
26158
26159# convert \$build files to toolchain format.
26160to_tool_file_cmd=$lt_cv_to_tool_file_cmd
26161
26162# An object symbol dumper.
26163OBJDUMP=$lt_OBJDUMP
26164
26165# Method to check whether dependent libraries are shared objects.
26166deplibs_check_method=$lt_deplibs_check_method
26167
26168# Command to use when deplibs_check_method = "file_magic".
26169file_magic_cmd=$lt_file_magic_cmd
26170
26171# How to find potential files when deplibs_check_method = "file_magic".
26172file_magic_glob=$lt_file_magic_glob
26173
26174# Find potential files using nocaseglob when deplibs_check_method = "file_magic".
26175want_nocaseglob=$lt_want_nocaseglob
26176
26177# DLL creation program.
26178DLLTOOL=$lt_DLLTOOL
26179
26180# Command to associate shared and link libraries.
26181sharedlib_from_linklib_cmd=$lt_sharedlib_from_linklib_cmd
26182
26183# The archiver.
26184AR=$lt_AR
26185
26186# Flags to create an archive.
26187AR_FLAGS=$lt_AR_FLAGS
26188
26189# How to feed a file listing to the archiver.
26190archiver_list_spec=$lt_archiver_list_spec
26191
26192# A symbol stripping program.
26193STRIP=$lt_STRIP
26194
26195# Commands used to install an old-style archive.
26196RANLIB=$lt_RANLIB
26197old_postinstall_cmds=$lt_old_postinstall_cmds
26198old_postuninstall_cmds=$lt_old_postuninstall_cmds
26199
26200# Whether to use a lock for old archive extraction.
26201lock_old_archive_extraction=$lock_old_archive_extraction
26202
26203# A C compiler.
26204LTCC=$lt_CC
26205
26206# LTCC compiler flags.
26207LTCFLAGS=$lt_CFLAGS
26208
26209# Take the output of nm and produce a listing of raw symbols and C names.
26210global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
26211
26212# Transform the output of nm in a proper C declaration.
26213global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
26214
26215# Transform the output of nm into a list of symbols to manually relocate.
26216global_symbol_to_import=$lt_lt_cv_sys_global_symbol_to_import
26217
26218# Transform the output of nm in a C name address pair.
26219global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
26220
26221# Transform the output of nm in a C name address pair when lib prefix is needed.
26222global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix
26223
26224# The name lister interface.
26225nm_interface=$lt_lt_cv_nm_interface
26226
26227# Specify filename containing input files for \$NM.
26228nm_file_list_spec=$lt_nm_file_list_spec
26229
26230# The root where to search for dependent libraries,and where our libraries should be installed.
26231lt_sysroot=$lt_sysroot
26232
26233# Command to truncate a binary pipe.
26234lt_truncate_bin=$lt_lt_cv_truncate_bin
26235
26236# The name of the directory that contains temporary libtool files.
26237objdir=$objdir
26238
26239# Used to examine libraries when file_magic_cmd begins with "file".
26240MAGIC_CMD=$MAGIC_CMD
26241
26242# Must we lock files when doing compilation?
26243need_locks=$lt_need_locks
26244
26245# Manifest tool.
26246MANIFEST_TOOL=$lt_MANIFEST_TOOL
26247
26248# Tool to manipulate archived DWARF debug symbol files on Mac OS X.
26249DSYMUTIL=$lt_DSYMUTIL
26250
26251# Tool to change global to local symbols on Mac OS X.
26252NMEDIT=$lt_NMEDIT
26253
26254# Tool to manipulate fat objects and archives on Mac OS X.
26255LIPO=$lt_LIPO
26256
26257# ldd/readelf like tool for Mach-O binaries on Mac OS X.
26258OTOOL=$lt_OTOOL
26259
26260# ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4.
26261OTOOL64=$lt_OTOOL64
26262
26263# Old archive suffix (normally "a").
26264libext=$libext
26265
26266# Shared library suffix (normally ".so").
26267shrext_cmds=$lt_shrext_cmds
26268
26269# The commands to extract the exported symbol list from a shared archive.
26270extract_expsyms_cmds=$lt_extract_expsyms_cmds
26271
26272# Variables whose values should be saved in libtool wrapper scripts and
26273# restored at link time.
26274variables_saved_for_relink=$lt_variables_saved_for_relink
26275
26276# Do we need the "lib" prefix for modules?
26277need_lib_prefix=$need_lib_prefix
26278
26279# Do we need a version for libraries?
26280need_version=$need_version
26281
26282# Library versioning type.
26283version_type=$version_type
26284
26285# Shared library runtime path variable.
26286runpath_var=$runpath_var
26287
26288# Shared library path variable.
26289shlibpath_var=$shlibpath_var
26290
26291# Is shlibpath searched before the hard-coded library search path?
26292shlibpath_overrides_runpath=$shlibpath_overrides_runpath
26293
26294# Format of library name prefix.
26295libname_spec=$lt_libname_spec
26296
26297# List of archive names.  First name is the real one, the rest are links.
26298# The last name is the one that the linker finds with -lNAME
26299library_names_spec=$lt_library_names_spec
26300
26301# The coded name of the library, if different from the real name.
26302soname_spec=$lt_soname_spec
26303
26304# Permission mode override for installation of shared libraries.
26305install_override_mode=$lt_install_override_mode
26306
26307# Command to use after installation of a shared archive.
26308postinstall_cmds=$lt_postinstall_cmds
26309
26310# Command to use after uninstallation of a shared archive.
26311postuninstall_cmds=$lt_postuninstall_cmds
26312
26313# Commands used to finish a libtool library installation in a directory.
26314finish_cmds=$lt_finish_cmds
26315
26316# As "finish_cmds", except a single script fragment to be evaled but
26317# not shown.
26318finish_eval=$lt_finish_eval
26319
26320# Whether we should hardcode library paths into libraries.
26321hardcode_into_libs=$hardcode_into_libs
26322
26323# Compile-time system search path for libraries.
26324sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
26325
26326# Detected run-time system search path for libraries.
26327sys_lib_dlsearch_path_spec=$lt_configure_time_dlsearch_path
26328
26329# Explicit LT_SYS_LIBRARY_PATH set during ./configure time.
26330configure_time_lt_sys_library_path=$lt_configure_time_lt_sys_library_path
26331
26332# Whether dlopen is supported.
26333dlopen_support=$enable_dlopen
26334
26335# Whether dlopen of programs is supported.
26336dlopen_self=$enable_dlopen_self
26337
26338# Whether dlopen of statically linked programs is supported.
26339dlopen_self_static=$enable_dlopen_self_static
26340
26341# Commands to strip libraries.
26342old_striplib=$lt_old_striplib
26343striplib=$lt_striplib
26344
26345
26346# The linker used to build libraries.
26347LD=$lt_LD
26348
26349# How to create reloadable object files.
26350reload_flag=$lt_reload_flag
26351reload_cmds=$lt_reload_cmds
26352
26353# Commands used to build an old-style archive.
26354old_archive_cmds=$lt_old_archive_cmds
26355
26356# A language specific compiler.
26357CC=$lt_compiler
26358
26359# Is the compiler the GNU compiler?
26360with_gcc=$GCC
26361
26362# Compiler flag to turn off builtin functions.
26363no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag
26364
26365# Additional compiler flags for building library objects.
26366pic_flag=$lt_lt_prog_compiler_pic
26367
26368# How to pass a linker flag through the compiler.
26369wl=$lt_lt_prog_compiler_wl
26370
26371# Compiler flag to prevent dynamic linking.
26372link_static_flag=$lt_lt_prog_compiler_static
26373
26374# Does compiler simultaneously support -c and -o options?
26375compiler_c_o=$lt_lt_cv_prog_compiler_c_o
26376
26377# Whether or not to add -lc for building shared libraries.
26378build_libtool_need_lc=$archive_cmds_need_lc
26379
26380# Whether or not to disallow shared libs when runtime libs are static.
26381allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes
26382
26383# Compiler flag to allow reflexive dlopens.
26384export_dynamic_flag_spec=$lt_export_dynamic_flag_spec
26385
26386# Compiler flag to generate shared objects directly from archives.
26387whole_archive_flag_spec=$lt_whole_archive_flag_spec
26388
26389# Whether the compiler copes with passing no objects directly.
26390compiler_needs_object=$lt_compiler_needs_object
26391
26392# Create an old-style archive from a shared archive.
26393old_archive_from_new_cmds=$lt_old_archive_from_new_cmds
26394
26395# Create a temporary old-style archive to link instead of a shared archive.
26396old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds
26397
26398# Commands used to build a shared archive.
26399archive_cmds=$lt_archive_cmds
26400archive_expsym_cmds=$lt_archive_expsym_cmds
26401
26402# Commands used to build a loadable module if different from building
26403# a shared archive.
26404module_cmds=$lt_module_cmds
26405module_expsym_cmds=$lt_module_expsym_cmds
26406
26407# Whether we are building with GNU ld or not.
26408with_gnu_ld=$lt_with_gnu_ld
26409
26410# Flag that allows shared libraries with undefined symbols to be built.
26411allow_undefined_flag=$lt_allow_undefined_flag
26412
26413# Flag that enforces no undefined symbols.
26414no_undefined_flag=$lt_no_undefined_flag
26415
26416# Flag to hardcode \$libdir into a binary during linking.
26417# This must work even if \$libdir does not exist
26418hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
26419
26420# Whether we need a single "-rpath" flag with a separated argument.
26421hardcode_libdir_separator=$lt_hardcode_libdir_separator
26422
26423# Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes
26424# DIR into the resulting binary.
26425hardcode_direct=$hardcode_direct
26426
26427# Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes
26428# DIR into the resulting binary and the resulting library dependency is
26429# "absolute",i.e impossible to change by setting \$shlibpath_var if the
26430# library is relocated.
26431hardcode_direct_absolute=$hardcode_direct_absolute
26432
26433# Set to "yes" if using the -LDIR flag during linking hardcodes DIR
26434# into the resulting binary.
26435hardcode_minus_L=$hardcode_minus_L
26436
26437# Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
26438# into the resulting binary.
26439hardcode_shlibpath_var=$hardcode_shlibpath_var
26440
26441# Set to "yes" if building a shared library automatically hardcodes DIR
26442# into the library and all subsequent libraries and executables linked
26443# against it.
26444hardcode_automatic=$hardcode_automatic
26445
26446# Set to yes if linker adds runtime paths of dependent libraries
26447# to runtime path list.
26448inherit_rpath=$inherit_rpath
26449
26450# Whether libtool must link a program against all its dependency libraries.
26451link_all_deplibs=$link_all_deplibs
26452
26453# Set to "yes" if exported symbols are required.
26454always_export_symbols=$always_export_symbols
26455
26456# The commands to list exported symbols.
26457export_symbols_cmds=$lt_export_symbols_cmds
26458
26459# Symbols that should not be listed in the preloaded symbols.
26460exclude_expsyms=$lt_exclude_expsyms
26461
26462# Symbols that must always be exported.
26463include_expsyms=$lt_include_expsyms
26464
26465# Commands necessary for linking programs (against libraries) with templates.
26466prelink_cmds=$lt_prelink_cmds
26467
26468# Commands necessary for finishing linking programs.
26469postlink_cmds=$lt_postlink_cmds
26470
26471# Specify filename containing input files.
26472file_list_spec=$lt_file_list_spec
26473
26474# How to hardcode a shared library path into an executable.
26475hardcode_action=$hardcode_action
26476
26477# ### END LIBTOOL CONFIG
26478
26479_LT_EOF
26480
26481    cat <<'_LT_EOF' >> "$cfgfile"
26482
26483# ### BEGIN FUNCTIONS SHARED WITH CONFIGURE
26484
26485# func_munge_path_list VARIABLE PATH
26486# -----------------------------------
26487# VARIABLE is name of variable containing _space_ separated list of
26488# directories to be munged by the contents of PATH, which is string
26489# having a format:
26490# "DIR[:DIR]:"
26491#       string "DIR[ DIR]" will be prepended to VARIABLE
26492# ":DIR[:DIR]"
26493#       string "DIR[ DIR]" will be appended to VARIABLE
26494# "DIRP[:DIRP]::[DIRA:]DIRA"
26495#       string "DIRP[ DIRP]" will be prepended to VARIABLE and string
26496#       "DIRA[ DIRA]" will be appended to VARIABLE
26497# "DIR[:DIR]"
26498#       VARIABLE will be replaced by "DIR[ DIR]"
26499func_munge_path_list ()
26500{
26501    case x$2 in
26502    x)
26503        ;;
26504    *:)
26505        eval $1=\"`$ECHO $2 | $SED 's/:/ /g'` \$$1\"
26506        ;;
26507    x:*)
26508        eval $1=\"\$$1 `$ECHO $2 | $SED 's/:/ /g'`\"
26509        ;;
26510    *::*)
26511        eval $1=\"\$$1\ `$ECHO $2 | $SED -e 's/.*:://' -e 's/:/ /g'`\"
26512        eval $1=\"`$ECHO $2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \$$1\"
26513        ;;
26514    *)
26515        eval $1=\"`$ECHO $2 | $SED 's/:/ /g'`\"
26516        ;;
26517    esac
26518}
26519
26520
26521# Calculate cc_basename.  Skip known compiler wrappers and cross-prefix.
26522func_cc_basename ()
26523{
26524    for cc_temp in $*""; do
26525      case $cc_temp in
26526        compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
26527        distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
26528        \-*) ;;
26529        *) break;;
26530      esac
26531    done
26532    func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
26533}
26534
26535
26536# ### END FUNCTIONS SHARED WITH CONFIGURE
26537
26538_LT_EOF
26539
26540  case $host_os in
26541  aix3*)
26542    cat <<\_LT_EOF >> "$cfgfile"
26543# AIX sometimes has problems with the GCC collect2 program.  For some
26544# reason, if we set the COLLECT_NAMES environment variable, the problems
26545# vanish in a puff of smoke.
26546if test set != "${COLLECT_NAMES+set}"; then
26547  COLLECT_NAMES=
26548  export COLLECT_NAMES
26549fi
26550_LT_EOF
26551    ;;
26552  esac
26553
26554
26555
26556ltmain=$ac_aux_dir/ltmain.sh
26557
26558
26559  # We use sed instead of cat because bash on DJGPP gets confused if
26560  # if finds mixed CR/LF and LF-only lines.  Since sed operates in
26561  # text mode, it properly converts lines to CR/LF.  This bash problem
26562  # is reportedly fixed, but why not run on old versions too?
26563  sed '$q' "$ltmain" >> "$cfgfile" \
26564     || (rm -f "$cfgfile"; exit 1)
26565
26566   mv -f "$cfgfile" "$ofile" ||
26567    (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
26568  chmod +x "$ofile"
26569
26570 ;;
26571    "disable-rpath":C)
26572	sed < libtool > libtool-2 \
26573	's/^hardcode_libdir_flag_spec.*$'/'hardcode_libdir_flag_spec=" -D__LIBTOOL_RPATH_SED__ "/'
26574	mv libtool-2 libtool
26575	chmod 755 libtool
26576	libtool="./libtool"
26577	 ;;
26578
26579  esac
26580done # for ac_tag
26581
26582
26583as_fn_exit 0
26584_ACEOF
26585ac_clean_files=$ac_clean_files_save
26586
26587test $ac_write_fail = 0 ||
26588  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
26589
26590
26591# configure is writing to config.log, and then calls config.status.
26592# config.status does its own redirection, appending to config.log.
26593# Unfortunately, on DOS this fails, as config.log is still kept open
26594# by configure, so config.status won't be able to write to it; its
26595# output is simply discarded.  So we exec the FD to /dev/null,
26596# effectively closing config.log, so it can be properly (re)opened and
26597# appended to by config.status.  When coming back to configure, we
26598# need to make the FD available again.
26599if test "$no_create" != yes; then
26600  ac_cs_success=:
26601  ac_config_status_args=
26602  test "$silent" = yes &&
26603    ac_config_status_args="$ac_config_status_args --quiet"
26604  exec 5>/dev/null
26605  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
26606  exec 5>>config.log
26607  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
26608  # would make configure fail if this is the last instruction.
26609  $ac_cs_success || as_fn_exit 1
26610fi
26611if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
26612  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
26613printf "%s\n" "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
26614fi
26615
26616
26617