xref: /freebsd/contrib/unbound/configure (revision 7899f917b1c0ea178f1d2be0cfb452086d079d23)
1#! /bin/sh
2# Guess values for system-dependent variables and create Makefiles.
3# Generated by GNU Autoconf 2.71 for unbound 1.21.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.21.0'
626PACKAGE_STRING='unbound 1.21.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.21.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.21.0:";;
1578   esac
1579  cat <<\_ACEOF
1580
1581Optional Features:
1582  --disable-option-checking  ignore unrecognized --enable/--with options
1583  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1584  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1585  --enable-checking       Enable warnings, asserts, makefile-dependencies
1586  --enable-debug          same as enable-checking
1587  --disable-flto          Disable link-time optimization (gcc specific option)
1588  --enable-pie            Enable Position-Independent Executable (eg. to fully
1589                          benefit from ASLR, small performance penalty)
1590  --enable-relro-now      Enable full relocation binding at load-time (RELRO
1591                          NOW, to protect GOT and .dtor areas)
1592  --enable-shared[=PKGS]  build shared libraries [default=yes]
1593  --enable-static[=PKGS]  build static libraries [default=yes]
1594  --enable-fast-install[=PKGS]
1595                          optimize for fast installation [default=yes]
1596  --disable-libtool-lock  avoid locking (might break parallel builds)
1597  --disable-rpath         disable hardcoded rpath (default=enabled)
1598  --disable-largefile     omit support for large files
1599  --enable-systemd        compile with systemd support (requires libsystemd,
1600                          pkg-config)
1601  --enable-alloc-checks   enable to memory allocation statistics, for debug
1602                          purposes
1603  --enable-alloc-lite     enable for lightweight alloc assertions, for debug
1604                          purposes
1605  --enable-alloc-nonregional
1606                          enable nonregional allocs, slow but exposes regional
1607                          allocations to other memory purifiers, for debug
1608                          purposes
1609  --disable-swig-version-check
1610                          Disable swig version check to build python modules
1611                          with older swig even though that is unreliable
1612  --disable-sha1          Disable SHA1 RRSIG support, does not disable nsec3
1613                          support
1614  --disable-sha2          Disable SHA256 and SHA512 RRSIG support
1615  --enable-subnet         Enable client subnet
1616  --disable-gost          Disable GOST support
1617  --disable-ecdsa         Disable ECDSA support
1618  --disable-dsa           Disable DSA support
1619  --disable-ed25519       Disable ED25519 support
1620  --disable-ed448         Disable ED448 support
1621  --enable-event-api      Enable (experimental) pluggable event base
1622                          libunbound API installed to unbound-event.h
1623  --enable-tfo-client     Enable TCP Fast Open for client mode
1624  --enable-tfo-server     Enable TCP Fast Open for server mode
1625  --enable-static-exe     enable to compile executables statically against
1626                          (event) uninstalled libs, for debug purposes
1627  --enable-fully-static   enable to compile fully static
1628  --enable-lock-checks    enable to check lock and unlock calls, for debug
1629                          purposes
1630  --enable-allsymbols     export all symbols from libunbound and link binaries
1631                          to it, smaller install size but libunbound export
1632                          table is polluted by internal symbols
1633  --enable-dnstap         Enable dnstap support (requires protobuf-c)
1634  --enable-dnscrypt       Enable dnscrypt support (requires libsodium)
1635  --enable-cachedb        enable cachedb module that can use external cache
1636                          storage
1637  --enable-ipsecmod       Enable ipsecmod module that facilitates
1638                          opportunistic IPsec
1639  --enable-ipset          enable ipset module
1640  --disable-explicit-port-randomisation
1641                          disable explicit source port randomisation and rely
1642                          on the kernel to provide random source ports
1643  --enable-linux-ip-local-port-range
1644                          Define this to enable use of
1645                          /proc/sys/net/ipv4/ip_local_port_range as a default
1646                          outgoing port range. This is only for the libunbound
1647                          on Linux and does not affect unbound resolving
1648                          daemon itself. This may severely limit the number of
1649                          available outgoing ports and thus decrease
1650                          randomness. Define this only when the target system
1651                          restricts (e.g. some of SELinux enabled
1652                          distributions) the use of non-ephemeral ports.
1653
1654Optional Packages:
1655  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1656  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1657  --with-conf-file=path   Pathname to the Unbound configuration file
1658  --with-run-dir=path     set default directory to chdir to (by default dir
1659                          part of cfg file)
1660  --with-chroot-dir=path  set default directory to chroot to (by default same
1661                          as run-dir)
1662  --with-share-dir=path   set default directory with shared data (by default
1663                          same as share/unbound)
1664  --with-pidfile=filename set default pathname to unbound pidfile (default
1665                          run-dir/unbound.pid)
1666  --with-rootkey-file=filename
1667                          set default pathname to root key file (default
1668                          run-dir/root.key). This file is read and written.
1669  --with-rootcert-file=filename
1670                          set default pathname to root update certificate file
1671                          (default run-dir/icannbundle.pem). This file need
1672                          not exist if you are content with the builtin.
1673  --with-username=user    set default user that unbound changes to (default
1674                          user is unbound)
1675  --with-pic[=PKGS]       try to use only PIC/non-PIC objects [default=use
1676                          both]
1677  --with-aix-soname=aix|svr4|both
1678                          shared library versioning (aka "SONAME") variant to
1679                          provide on AIX, [default=aix].
1680  --with-gnu-ld           assume the C compiler uses GNU ld [default=no]
1681  --with-sysroot[=DIR]    Search for dependent libraries within DIR (or the
1682                          compiler's sysroot if not specified).
1683  --with-pthreads         use pthreads library, or --without-pthreads to
1684                          disable threading support.
1685  --with-solaris-threads  use solaris native thread library.
1686  --with-syslog-facility=LOCAL0 - LOCAL7
1687                          set SYSLOG_FACILITY, default DAEMON
1688  --with-dynlibmodule     build dynamic library module, or
1689                          --without-dynlibmodule to disable it. (default=no)
1690  --with-pyunbound        build PyUnbound, or --without-pyunbound to skip it.
1691                          (default=no)
1692  --with-pythonmodule     build Python module, or --without-pythonmodule to
1693                          disable script engine. (default=no)
1694  --with-nss=path         use libnss instead of openssl, installed at path.
1695  --with-nettle=path      use libnettle as crypto library, installed at path.
1696  --with-ssl=pathname     enable SSL (will check /usr/local/ssl /usr/lib/ssl
1697                          /usr/ssl /usr/pkg /usr/local /opt/local /usr/sfw
1698                          /usr or specify like /usr/include/openssl11)
1699  --with-libbsd           Use portable libbsd functions
1700  --with-deprecate-rsa-1024
1701                          Deprecate RSA 1024 bit length, makes that an
1702                          unsupported key, for use when OpenSSL FIPS refuses
1703                          1024 bit verification
1704  --with-libevent=pathname
1705                          use libevent (will check /usr/local /opt/local
1706                          /usr/lib /usr/pkg /usr/sfw /usr or you can specify
1707                          an explicit path). Slower, but allows use of large
1708                          outgoing port ranges.
1709  --with-libexpat=path    specify explicit path for libexpat.
1710  --with-libhiredis=path  specify explicit path for libhiredis.
1711  --with-libnghttp2=path  specify explicit path for libnghttp2.
1712  --with-dnstap-socket-path=pathname
1713                          set default dnstap socket path
1714  --with-protobuf-c=path  Path where protobuf-c is installed, for dnstap
1715  --with-libsodium=path   Path where libsodium is installed, for dnscrypt
1716  --with-libmnl=path      specify explicit path for libmnl.
1717  --with-libunbound-only  do not build daemon and tool programs
1718
1719Some influential environment variables:
1720  CC          C compiler command
1721  CFLAGS      C compiler flags
1722  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
1723              nonstandard directory <lib dir>
1724  LIBS        libraries to pass to the linker, e.g. -l<library>
1725  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1726              you have headers in a nonstandard directory <include dir>
1727  YACC        The `Yet Another Compiler Compiler' implementation to use.
1728              Defaults to the first program found out of: `bison -y', `byacc',
1729              `yacc'.
1730  YFLAGS      The list of arguments that will be passed by default to $YACC.
1731              This script will default YFLAGS to the empty string to avoid a
1732              default value of `-d' given by some make applications.
1733  LT_SYS_LIBRARY_PATH
1734              User-defined run-time library search path.
1735  PKG_CONFIG  path to pkg-config utility
1736  PKG_CONFIG_PATH
1737              directories to add to pkg-config's search path
1738  PKG_CONFIG_LIBDIR
1739              path overriding pkg-config's built-in search path
1740  CPP         C preprocessor
1741  SYSTEMD_CFLAGS
1742              C compiler flags for SYSTEMD, overriding pkg-config
1743  SYSTEMD_LIBS
1744              linker flags for SYSTEMD, overriding pkg-config
1745  SYSTEMD_DAEMON_CFLAGS
1746              C compiler flags for SYSTEMD_DAEMON, overriding pkg-config
1747  SYSTEMD_DAEMON_LIBS
1748              linker flags for SYSTEMD_DAEMON, overriding pkg-config
1749  PYTHON_VERSION
1750              The installed Python version to use, for example '2.3'. This
1751              string will be appended to the Python interpreter canonical
1752              name.
1753  PROTOBUFC_CFLAGS
1754              C compiler flags for PROTOBUFC, overriding pkg-config
1755  PROTOBUFC_LIBS
1756              linker flags for PROTOBUFC, overriding pkg-config
1757
1758Use these variables to override the choices made by `configure' or to help
1759it to find libraries and programs with nonstandard names/locations.
1760
1761Report bugs to <unbound-bugs@nlnetlabs.nl or https://github.com/NLnetLabs/unbound/issues>.
1762_ACEOF
1763ac_status=$?
1764fi
1765
1766if test "$ac_init_help" = "recursive"; then
1767  # If there are subdirs, report their specific --help.
1768  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1769    test -d "$ac_dir" ||
1770      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1771      continue
1772    ac_builddir=.
1773
1774case "$ac_dir" in
1775.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1776*)
1777  ac_dir_suffix=/`printf "%s\n" "$ac_dir" | sed 's|^\.[\\/]||'`
1778  # A ".." for each directory in $ac_dir_suffix.
1779  ac_top_builddir_sub=`printf "%s\n" "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1780  case $ac_top_builddir_sub in
1781  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1782  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1783  esac ;;
1784esac
1785ac_abs_top_builddir=$ac_pwd
1786ac_abs_builddir=$ac_pwd$ac_dir_suffix
1787# for backward compatibility:
1788ac_top_builddir=$ac_top_build_prefix
1789
1790case $srcdir in
1791  .)  # We are building in place.
1792    ac_srcdir=.
1793    ac_top_srcdir=$ac_top_builddir_sub
1794    ac_abs_top_srcdir=$ac_pwd ;;
1795  [\\/]* | ?:[\\/]* )  # Absolute name.
1796    ac_srcdir=$srcdir$ac_dir_suffix;
1797    ac_top_srcdir=$srcdir
1798    ac_abs_top_srcdir=$srcdir ;;
1799  *) # Relative name.
1800    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1801    ac_top_srcdir=$ac_top_build_prefix$srcdir
1802    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1803esac
1804ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1805
1806    cd "$ac_dir" || { ac_status=$?; continue; }
1807    # Check for configure.gnu first; this name is used for a wrapper for
1808    # Metaconfig's "Configure" on case-insensitive file systems.
1809    if test -f "$ac_srcdir/configure.gnu"; then
1810      echo &&
1811      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1812    elif test -f "$ac_srcdir/configure"; then
1813      echo &&
1814      $SHELL "$ac_srcdir/configure" --help=recursive
1815    else
1816      printf "%s\n" "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1817    fi || ac_status=$?
1818    cd "$ac_pwd" || { ac_status=$?; break; }
1819  done
1820fi
1821
1822test -n "$ac_init_help" && exit $ac_status
1823if $ac_init_version; then
1824  cat <<\_ACEOF
1825unbound configure 1.21.0
1826generated by GNU Autoconf 2.71
1827
1828Copyright (C) 2021 Free Software Foundation, Inc.
1829This configure script is free software; the Free Software Foundation
1830gives unlimited permission to copy, distribute and modify it.
1831_ACEOF
1832  exit
1833fi
1834
1835## ------------------------ ##
1836## Autoconf initialization. ##
1837## ------------------------ ##
1838
1839# ac_fn_c_try_compile LINENO
1840# --------------------------
1841# Try to compile conftest.$ac_ext, and return whether this succeeded.
1842ac_fn_c_try_compile ()
1843{
1844  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1845  rm -f conftest.$ac_objext conftest.beam
1846  if { { ac_try="$ac_compile"
1847case "(($ac_try" in
1848  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1849  *) ac_try_echo=$ac_try;;
1850esac
1851eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1852printf "%s\n" "$ac_try_echo"; } >&5
1853  (eval "$ac_compile") 2>conftest.err
1854  ac_status=$?
1855  if test -s conftest.err; then
1856    grep -v '^ *+' conftest.err >conftest.er1
1857    cat conftest.er1 >&5
1858    mv -f conftest.er1 conftest.err
1859  fi
1860  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1861  test $ac_status = 0; } && {
1862	 test -z "$ac_c_werror_flag" ||
1863	 test ! -s conftest.err
1864       } && test -s conftest.$ac_objext
1865then :
1866  ac_retval=0
1867else $as_nop
1868  printf "%s\n" "$as_me: failed program was:" >&5
1869sed 's/^/| /' conftest.$ac_ext >&5
1870
1871	ac_retval=1
1872fi
1873  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1874  as_fn_set_status $ac_retval
1875
1876} # ac_fn_c_try_compile
1877
1878# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1879# -------------------------------------------------------
1880# Tests whether HEADER exists and can be compiled using the include files in
1881# INCLUDES, setting the cache variable VAR accordingly.
1882ac_fn_c_check_header_compile ()
1883{
1884  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1885  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1886printf %s "checking for $2... " >&6; }
1887if eval test \${$3+y}
1888then :
1889  printf %s "(cached) " >&6
1890else $as_nop
1891  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1892/* end confdefs.h.  */
1893$4
1894#include <$2>
1895_ACEOF
1896if ac_fn_c_try_compile "$LINENO"
1897then :
1898  eval "$3=yes"
1899else $as_nop
1900  eval "$3=no"
1901fi
1902rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
1903fi
1904eval ac_res=\$$3
1905	       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1906printf "%s\n" "$ac_res" >&6; }
1907  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1908
1909} # ac_fn_c_check_header_compile
1910
1911# ac_fn_c_try_link LINENO
1912# -----------------------
1913# Try to link conftest.$ac_ext, and return whether this succeeded.
1914ac_fn_c_try_link ()
1915{
1916  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1917  rm -f conftest.$ac_objext conftest.beam conftest$ac_exeext
1918  if { { ac_try="$ac_link"
1919case "(($ac_try" in
1920  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1921  *) ac_try_echo=$ac_try;;
1922esac
1923eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1924printf "%s\n" "$ac_try_echo"; } >&5
1925  (eval "$ac_link") 2>conftest.err
1926  ac_status=$?
1927  if test -s conftest.err; then
1928    grep -v '^ *+' conftest.err >conftest.er1
1929    cat conftest.er1 >&5
1930    mv -f conftest.er1 conftest.err
1931  fi
1932  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1933  test $ac_status = 0; } && {
1934	 test -z "$ac_c_werror_flag" ||
1935	 test ! -s conftest.err
1936       } && test -s conftest$ac_exeext && {
1937	 test "$cross_compiling" = yes ||
1938	 test -x conftest$ac_exeext
1939       }
1940then :
1941  ac_retval=0
1942else $as_nop
1943  printf "%s\n" "$as_me: failed program was:" >&5
1944sed 's/^/| /' conftest.$ac_ext >&5
1945
1946	ac_retval=1
1947fi
1948  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1949  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1950  # interfere with the next link command; also delete a directory that is
1951  # left behind by Apple's compiler.  We do this before executing the actions.
1952  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1953  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1954  as_fn_set_status $ac_retval
1955
1956} # ac_fn_c_try_link
1957
1958# ac_fn_c_check_func LINENO FUNC VAR
1959# ----------------------------------
1960# Tests whether FUNC exists, setting the cache variable VAR accordingly
1961ac_fn_c_check_func ()
1962{
1963  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1964  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1965printf %s "checking for $2... " >&6; }
1966if eval test \${$3+y}
1967then :
1968  printf %s "(cached) " >&6
1969else $as_nop
1970  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1971/* end confdefs.h.  */
1972/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
1973   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
1974#define $2 innocuous_$2
1975
1976/* System header to define __stub macros and hopefully few prototypes,
1977   which can conflict with char $2 (); below.  */
1978
1979#include <limits.h>
1980#undef $2
1981
1982/* Override any GCC internal prototype to avoid an error.
1983   Use char because int might match the return type of a GCC
1984   builtin and then its argument prototype would still apply.  */
1985#ifdef __cplusplus
1986extern "C"
1987#endif
1988char $2 ();
1989/* The GNU C library defines this for functions which it implements
1990    to always fail with ENOSYS.  Some functions are actually named
1991    something starting with __ and the normal name is an alias.  */
1992#if defined __stub_$2 || defined __stub___$2
1993choke me
1994#endif
1995
1996int
1997main (void)
1998{
1999return $2 ();
2000  ;
2001  return 0;
2002}
2003_ACEOF
2004if ac_fn_c_try_link "$LINENO"
2005then :
2006  eval "$3=yes"
2007else $as_nop
2008  eval "$3=no"
2009fi
2010rm -f core conftest.err conftest.$ac_objext conftest.beam \
2011    conftest$ac_exeext conftest.$ac_ext
2012fi
2013eval ac_res=\$$3
2014	       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2015printf "%s\n" "$ac_res" >&6; }
2016  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2017
2018} # ac_fn_c_check_func
2019
2020# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2021# -------------------------------------------
2022# Tests whether TYPE exists after having included INCLUDES, setting cache
2023# variable VAR accordingly.
2024ac_fn_c_check_type ()
2025{
2026  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2027  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2028printf %s "checking for $2... " >&6; }
2029if eval test \${$3+y}
2030then :
2031  printf %s "(cached) " >&6
2032else $as_nop
2033  eval "$3=no"
2034  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2035/* end confdefs.h.  */
2036$4
2037int
2038main (void)
2039{
2040if (sizeof ($2))
2041	 return 0;
2042  ;
2043  return 0;
2044}
2045_ACEOF
2046if ac_fn_c_try_compile "$LINENO"
2047then :
2048  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2049/* end confdefs.h.  */
2050$4
2051int
2052main (void)
2053{
2054if (sizeof (($2)))
2055	    return 0;
2056  ;
2057  return 0;
2058}
2059_ACEOF
2060if ac_fn_c_try_compile "$LINENO"
2061then :
2062
2063else $as_nop
2064  eval "$3=yes"
2065fi
2066rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
2067fi
2068rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
2069fi
2070eval ac_res=\$$3
2071	       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2072printf "%s\n" "$ac_res" >&6; }
2073  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2074
2075} # ac_fn_c_check_type
2076
2077# ac_fn_c_try_cpp LINENO
2078# ----------------------
2079# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2080ac_fn_c_try_cpp ()
2081{
2082  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2083  if { { ac_try="$ac_cpp conftest.$ac_ext"
2084case "(($ac_try" in
2085  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2086  *) ac_try_echo=$ac_try;;
2087esac
2088eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2089printf "%s\n" "$ac_try_echo"; } >&5
2090  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2091  ac_status=$?
2092  if test -s conftest.err; then
2093    grep -v '^ *+' conftest.err >conftest.er1
2094    cat conftest.er1 >&5
2095    mv -f conftest.er1 conftest.err
2096  fi
2097  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2098  test $ac_status = 0; } > conftest.i && {
2099	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2100	 test ! -s conftest.err
2101       }
2102then :
2103  ac_retval=0
2104else $as_nop
2105  printf "%s\n" "$as_me: failed program was:" >&5
2106sed 's/^/| /' conftest.$ac_ext >&5
2107
2108    ac_retval=1
2109fi
2110  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2111  as_fn_set_status $ac_retval
2112
2113} # ac_fn_c_try_cpp
2114
2115# ac_fn_c_try_run LINENO
2116# ----------------------
2117# Try to run conftest.$ac_ext, and return whether this succeeded. Assumes that
2118# executables *can* be run.
2119ac_fn_c_try_run ()
2120{
2121  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2122  if { { ac_try="$ac_link"
2123case "(($ac_try" in
2124  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2125  *) ac_try_echo=$ac_try;;
2126esac
2127eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2128printf "%s\n" "$ac_try_echo"; } >&5
2129  (eval "$ac_link") 2>&5
2130  ac_status=$?
2131  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2132  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2133  { { case "(($ac_try" in
2134  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2135  *) ac_try_echo=$ac_try;;
2136esac
2137eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2138printf "%s\n" "$ac_try_echo"; } >&5
2139  (eval "$ac_try") 2>&5
2140  ac_status=$?
2141  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2142  test $ac_status = 0; }; }
2143then :
2144  ac_retval=0
2145else $as_nop
2146  printf "%s\n" "$as_me: program exited with status $ac_status" >&5
2147       printf "%s\n" "$as_me: failed program was:" >&5
2148sed 's/^/| /' conftest.$ac_ext >&5
2149
2150       ac_retval=$ac_status
2151fi
2152  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2153  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2154  as_fn_set_status $ac_retval
2155
2156} # ac_fn_c_try_run
2157
2158# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2159# --------------------------------------------
2160# Tries to find the compile-time value of EXPR in a program that includes
2161# INCLUDES, setting VAR accordingly. Returns whether the value could be
2162# computed
2163ac_fn_c_compute_int ()
2164{
2165  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2166  if test "$cross_compiling" = yes; then
2167    # Depending upon the size, compute the lo and hi bounds.
2168cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2169/* end confdefs.h.  */
2170$4
2171int
2172main (void)
2173{
2174static int test_array [1 - 2 * !(($2) >= 0)];
2175test_array [0] = 0;
2176return test_array [0];
2177
2178  ;
2179  return 0;
2180}
2181_ACEOF
2182if ac_fn_c_try_compile "$LINENO"
2183then :
2184  ac_lo=0 ac_mid=0
2185  while :; do
2186    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2187/* end confdefs.h.  */
2188$4
2189int
2190main (void)
2191{
2192static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2193test_array [0] = 0;
2194return test_array [0];
2195
2196  ;
2197  return 0;
2198}
2199_ACEOF
2200if ac_fn_c_try_compile "$LINENO"
2201then :
2202  ac_hi=$ac_mid; break
2203else $as_nop
2204  as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2205			if test $ac_lo -le $ac_mid; then
2206			  ac_lo= ac_hi=
2207			  break
2208			fi
2209			as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2210fi
2211rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
2212  done
2213else $as_nop
2214  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2215/* end confdefs.h.  */
2216$4
2217int
2218main (void)
2219{
2220static int test_array [1 - 2 * !(($2) < 0)];
2221test_array [0] = 0;
2222return test_array [0];
2223
2224  ;
2225  return 0;
2226}
2227_ACEOF
2228if ac_fn_c_try_compile "$LINENO"
2229then :
2230  ac_hi=-1 ac_mid=-1
2231  while :; do
2232    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2233/* end confdefs.h.  */
2234$4
2235int
2236main (void)
2237{
2238static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2239test_array [0] = 0;
2240return test_array [0];
2241
2242  ;
2243  return 0;
2244}
2245_ACEOF
2246if ac_fn_c_try_compile "$LINENO"
2247then :
2248  ac_lo=$ac_mid; break
2249else $as_nop
2250  as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2251			if test $ac_mid -le $ac_hi; then
2252			  ac_lo= ac_hi=
2253			  break
2254			fi
2255			as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2256fi
2257rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
2258  done
2259else $as_nop
2260  ac_lo= ac_hi=
2261fi
2262rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
2263fi
2264rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
2265# Binary search between lo and hi bounds.
2266while test "x$ac_lo" != "x$ac_hi"; do
2267  as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2268  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2269/* end confdefs.h.  */
2270$4
2271int
2272main (void)
2273{
2274static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2275test_array [0] = 0;
2276return test_array [0];
2277
2278  ;
2279  return 0;
2280}
2281_ACEOF
2282if ac_fn_c_try_compile "$LINENO"
2283then :
2284  ac_hi=$ac_mid
2285else $as_nop
2286  as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2287fi
2288rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
2289done
2290case $ac_lo in #((
2291?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2292'') ac_retval=1 ;;
2293esac
2294  else
2295    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2296/* end confdefs.h.  */
2297$4
2298static long int longval (void) { return $2; }
2299static unsigned long int ulongval (void) { return $2; }
2300#include <stdio.h>
2301#include <stdlib.h>
2302int
2303main (void)
2304{
2305
2306  FILE *f = fopen ("conftest.val", "w");
2307  if (! f)
2308    return 1;
2309  if (($2) < 0)
2310    {
2311      long int i = longval ();
2312      if (i != ($2))
2313	return 1;
2314      fprintf (f, "%ld", i);
2315    }
2316  else
2317    {
2318      unsigned long int i = ulongval ();
2319      if (i != ($2))
2320	return 1;
2321      fprintf (f, "%lu", i);
2322    }
2323  /* Do not output a trailing newline, as this causes \r\n confusion
2324     on some platforms.  */
2325  return ferror (f) || fclose (f) != 0;
2326
2327  ;
2328  return 0;
2329}
2330_ACEOF
2331if ac_fn_c_try_run "$LINENO"
2332then :
2333  echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2334else $as_nop
2335  ac_retval=1
2336fi
2337rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2338  conftest.$ac_objext conftest.beam conftest.$ac_ext
2339rm -f conftest.val
2340
2341  fi
2342  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2343  as_fn_set_status $ac_retval
2344
2345} # ac_fn_c_compute_int
2346
2347# ac_fn_check_decl LINENO SYMBOL VAR INCLUDES EXTRA-OPTIONS FLAG-VAR
2348# ------------------------------------------------------------------
2349# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2350# accordingly. Pass EXTRA-OPTIONS to the compiler, using FLAG-VAR.
2351ac_fn_check_decl ()
2352{
2353  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2354  as_decl_name=`echo $2|sed 's/ *(.*//'`
2355  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2356printf %s "checking whether $as_decl_name is declared... " >&6; }
2357if eval test \${$3+y}
2358then :
2359  printf %s "(cached) " >&6
2360else $as_nop
2361  as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2362  eval ac_save_FLAGS=\$$6
2363  as_fn_append $6 " $5"
2364  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2365/* end confdefs.h.  */
2366$4
2367int
2368main (void)
2369{
2370#ifndef $as_decl_name
2371#ifdef __cplusplus
2372  (void) $as_decl_use;
2373#else
2374  (void) $as_decl_name;
2375#endif
2376#endif
2377
2378  ;
2379  return 0;
2380}
2381_ACEOF
2382if ac_fn_c_try_compile "$LINENO"
2383then :
2384  eval "$3=yes"
2385else $as_nop
2386  eval "$3=no"
2387fi
2388rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
2389  eval $6=\$ac_save_FLAGS
2390
2391fi
2392eval ac_res=\$$3
2393	       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2394printf "%s\n" "$ac_res" >&6; }
2395  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2396
2397} # ac_fn_check_decl
2398
2399# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2400# ----------------------------------------------------
2401# Tries to find if the field MEMBER exists in type AGGR, after including
2402# INCLUDES, setting cache variable VAR accordingly.
2403ac_fn_c_check_member ()
2404{
2405  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2406  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2407printf %s "checking for $2.$3... " >&6; }
2408if eval test \${$4+y}
2409then :
2410  printf %s "(cached) " >&6
2411else $as_nop
2412  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2413/* end confdefs.h.  */
2414$5
2415int
2416main (void)
2417{
2418static $2 ac_aggr;
2419if (ac_aggr.$3)
2420return 0;
2421  ;
2422  return 0;
2423}
2424_ACEOF
2425if ac_fn_c_try_compile "$LINENO"
2426then :
2427  eval "$4=yes"
2428else $as_nop
2429  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2430/* end confdefs.h.  */
2431$5
2432int
2433main (void)
2434{
2435static $2 ac_aggr;
2436if (sizeof ac_aggr.$3)
2437return 0;
2438  ;
2439  return 0;
2440}
2441_ACEOF
2442if ac_fn_c_try_compile "$LINENO"
2443then :
2444  eval "$4=yes"
2445else $as_nop
2446  eval "$4=no"
2447fi
2448rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
2449fi
2450rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
2451fi
2452eval ac_res=\$$4
2453	       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2454printf "%s\n" "$ac_res" >&6; }
2455  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2456
2457} # ac_fn_c_check_member
2458ac_configure_args_raw=
2459for ac_arg
2460do
2461  case $ac_arg in
2462  *\'*)
2463    ac_arg=`printf "%s\n" "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2464  esac
2465  as_fn_append ac_configure_args_raw " '$ac_arg'"
2466done
2467
2468case $ac_configure_args_raw in
2469  *$as_nl*)
2470    ac_safe_unquote= ;;
2471  *)
2472    ac_unsafe_z='|&;<>()$`\\"*?[ ''	' # This string ends in space, tab.
2473    ac_unsafe_a="$ac_unsafe_z#~"
2474    ac_safe_unquote="s/ '\\([^$ac_unsafe_a][^$ac_unsafe_z]*\\)'/ \\1/g"
2475    ac_configure_args_raw=`      printf "%s\n" "$ac_configure_args_raw" | sed "$ac_safe_unquote"`;;
2476esac
2477
2478cat >config.log <<_ACEOF
2479This file contains any messages produced by compilers while
2480running configure, to aid debugging if configure makes a mistake.
2481
2482It was created by unbound $as_me 1.21.0, which was
2483generated by GNU Autoconf 2.71.  Invocation command line was
2484
2485  $ $0$ac_configure_args_raw
2486
2487_ACEOF
2488exec 5>>config.log
2489{
2490cat <<_ASUNAME
2491## --------- ##
2492## Platform. ##
2493## --------- ##
2494
2495hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2496uname -m = `(uname -m) 2>/dev/null || echo unknown`
2497uname -r = `(uname -r) 2>/dev/null || echo unknown`
2498uname -s = `(uname -s) 2>/dev/null || echo unknown`
2499uname -v = `(uname -v) 2>/dev/null || echo unknown`
2500
2501/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2502/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2503
2504/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2505/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2506/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2507/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2508/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2509/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2510/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2511
2512_ASUNAME
2513
2514as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2515for as_dir in $PATH
2516do
2517  IFS=$as_save_IFS
2518  case $as_dir in #(((
2519    '') as_dir=./ ;;
2520    */) ;;
2521    *) as_dir=$as_dir/ ;;
2522  esac
2523    printf "%s\n" "PATH: $as_dir"
2524  done
2525IFS=$as_save_IFS
2526
2527} >&5
2528
2529cat >&5 <<_ACEOF
2530
2531
2532## ----------- ##
2533## Core tests. ##
2534## ----------- ##
2535
2536_ACEOF
2537
2538
2539# Keep a trace of the command line.
2540# Strip out --no-create and --no-recursion so they do not pile up.
2541# Strip out --silent because we don't want to record it for future runs.
2542# Also quote any args containing shell meta-characters.
2543# Make two passes to allow for proper duplicate-argument suppression.
2544ac_configure_args=
2545ac_configure_args0=
2546ac_configure_args1=
2547ac_must_keep_next=false
2548for ac_pass in 1 2
2549do
2550  for ac_arg
2551  do
2552    case $ac_arg in
2553    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2554    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2555    | -silent | --silent | --silen | --sile | --sil)
2556      continue ;;
2557    *\'*)
2558      ac_arg=`printf "%s\n" "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2559    esac
2560    case $ac_pass in
2561    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2562    2)
2563      as_fn_append ac_configure_args1 " '$ac_arg'"
2564      if test $ac_must_keep_next = true; then
2565	ac_must_keep_next=false # Got value, back to normal.
2566      else
2567	case $ac_arg in
2568	  *=* | --config-cache | -C | -disable-* | --disable-* \
2569	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2570	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2571	  | -with-* | --with-* | -without-* | --without-* | --x)
2572	    case "$ac_configure_args0 " in
2573	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2574	    esac
2575	    ;;
2576	  -* ) ac_must_keep_next=true ;;
2577	esac
2578      fi
2579      as_fn_append ac_configure_args " '$ac_arg'"
2580      ;;
2581    esac
2582  done
2583done
2584{ ac_configure_args0=; unset ac_configure_args0;}
2585{ ac_configure_args1=; unset ac_configure_args1;}
2586
2587# When interrupted or exit'd, cleanup temporary files, and complete
2588# config.log.  We remove comments because anyway the quotes in there
2589# would cause problems or look ugly.
2590# WARNING: Use '\'' to represent an apostrophe within the trap.
2591# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2592trap 'exit_status=$?
2593  # Sanitize IFS.
2594  IFS=" ""	$as_nl"
2595  # Save into config.log some information that might help in debugging.
2596  {
2597    echo
2598
2599    printf "%s\n" "## ---------------- ##
2600## Cache variables. ##
2601## ---------------- ##"
2602    echo
2603    # The following way of writing the cache mishandles newlines in values,
2604(
2605  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2606    eval ac_val=\$$ac_var
2607    case $ac_val in #(
2608    *${as_nl}*)
2609      case $ac_var in #(
2610      *_cv_*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2611printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2612      esac
2613      case $ac_var in #(
2614      _ | IFS | as_nl) ;; #(
2615      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2616      *) { eval $ac_var=; unset $ac_var;} ;;
2617      esac ;;
2618    esac
2619  done
2620  (set) 2>&1 |
2621    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2622    *${as_nl}ac_space=\ *)
2623      sed -n \
2624	"s/'\''/'\''\\\\'\'''\''/g;
2625	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2626      ;; #(
2627    *)
2628      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2629      ;;
2630    esac |
2631    sort
2632)
2633    echo
2634
2635    printf "%s\n" "## ----------------- ##
2636## Output variables. ##
2637## ----------------- ##"
2638    echo
2639    for ac_var in $ac_subst_vars
2640    do
2641      eval ac_val=\$$ac_var
2642      case $ac_val in
2643      *\'\''*) ac_val=`printf "%s\n" "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2644      esac
2645      printf "%s\n" "$ac_var='\''$ac_val'\''"
2646    done | sort
2647    echo
2648
2649    if test -n "$ac_subst_files"; then
2650      printf "%s\n" "## ------------------- ##
2651## File substitutions. ##
2652## ------------------- ##"
2653      echo
2654      for ac_var in $ac_subst_files
2655      do
2656	eval ac_val=\$$ac_var
2657	case $ac_val in
2658	*\'\''*) ac_val=`printf "%s\n" "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2659	esac
2660	printf "%s\n" "$ac_var='\''$ac_val'\''"
2661      done | sort
2662      echo
2663    fi
2664
2665    if test -s confdefs.h; then
2666      printf "%s\n" "## ----------- ##
2667## confdefs.h. ##
2668## ----------- ##"
2669      echo
2670      cat confdefs.h
2671      echo
2672    fi
2673    test "$ac_signal" != 0 &&
2674      printf "%s\n" "$as_me: caught signal $ac_signal"
2675    printf "%s\n" "$as_me: exit $exit_status"
2676  } >&5
2677  rm -f core *.core core.conftest.* &&
2678    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2679    exit $exit_status
2680' 0
2681for ac_signal in 1 2 13 15; do
2682  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2683done
2684ac_signal=0
2685
2686# confdefs.h avoids OS command line length limits that DEFS can exceed.
2687rm -f -r conftest* confdefs.h
2688
2689printf "%s\n" "/* confdefs.h */" > confdefs.h
2690
2691# Predefined preprocessor variables.
2692
2693printf "%s\n" "#define PACKAGE_NAME \"$PACKAGE_NAME\"" >>confdefs.h
2694
2695printf "%s\n" "#define PACKAGE_TARNAME \"$PACKAGE_TARNAME\"" >>confdefs.h
2696
2697printf "%s\n" "#define PACKAGE_VERSION \"$PACKAGE_VERSION\"" >>confdefs.h
2698
2699printf "%s\n" "#define PACKAGE_STRING \"$PACKAGE_STRING\"" >>confdefs.h
2700
2701printf "%s\n" "#define PACKAGE_BUGREPORT \"$PACKAGE_BUGREPORT\"" >>confdefs.h
2702
2703printf "%s\n" "#define PACKAGE_URL \"$PACKAGE_URL\"" >>confdefs.h
2704
2705
2706# Let the site file select an alternate cache file if it wants to.
2707# Prefer an explicitly selected file to automatically selected ones.
2708if test -n "$CONFIG_SITE"; then
2709  ac_site_files="$CONFIG_SITE"
2710elif test "x$prefix" != xNONE; then
2711  ac_site_files="$prefix/share/config.site $prefix/etc/config.site"
2712else
2713  ac_site_files="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
2714fi
2715
2716for ac_site_file in $ac_site_files
2717do
2718  case $ac_site_file in #(
2719  */*) :
2720     ;; #(
2721  *) :
2722    ac_site_file=./$ac_site_file ;;
2723esac
2724  if test -f "$ac_site_file" && test -r "$ac_site_file"; then
2725    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2726printf "%s\n" "$as_me: loading site script $ac_site_file" >&6;}
2727    sed 's/^/| /' "$ac_site_file" >&5
2728    . "$ac_site_file" \
2729      || { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2730printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
2731as_fn_error $? "failed to load site script $ac_site_file
2732See \`config.log' for more details" "$LINENO" 5; }
2733  fi
2734done
2735
2736if test -r "$cache_file"; then
2737  # Some versions of bash will fail to source /dev/null (special files
2738  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
2739  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2740    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2741printf "%s\n" "$as_me: loading cache $cache_file" >&6;}
2742    case $cache_file in
2743      [\\/]* | ?:[\\/]* ) . "$cache_file";;
2744      *)                      . "./$cache_file";;
2745    esac
2746  fi
2747else
2748  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2749printf "%s\n" "$as_me: creating cache $cache_file" >&6;}
2750  >$cache_file
2751fi
2752
2753as_fn_append ac_header_c_list " stdio.h stdio_h HAVE_STDIO_H"
2754# Test code for whether the C compiler supports C89 (global declarations)
2755ac_c_conftest_c89_globals='
2756/* Does the compiler advertise C89 conformance?
2757   Do not test the value of __STDC__, because some compilers set it to 0
2758   while being otherwise adequately conformant. */
2759#if !defined __STDC__
2760# error "Compiler does not advertise C89 conformance"
2761#endif
2762
2763#include <stddef.h>
2764#include <stdarg.h>
2765struct stat;
2766/* Most of the following tests are stolen from RCS 5.7 src/conf.sh.  */
2767struct buf { int x; };
2768struct buf * (*rcsopen) (struct buf *, struct stat *, int);
2769static char *e (p, i)
2770     char **p;
2771     int i;
2772{
2773  return p[i];
2774}
2775static char *f (char * (*g) (char **, int), char **p, ...)
2776{
2777  char *s;
2778  va_list v;
2779  va_start (v,p);
2780  s = g (p, va_arg (v,int));
2781  va_end (v);
2782  return s;
2783}
2784
2785/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
2786   function prototypes and stuff, but not \xHH hex character constants.
2787   These do not provoke an error unfortunately, instead are silently treated
2788   as an "x".  The following induces an error, until -std is added to get
2789   proper ANSI mode.  Curiously \x00 != x always comes out true, for an
2790   array size at least.  It is necessary to write \x00 == 0 to get something
2791   that is true only with -std.  */
2792int osf4_cc_array ['\''\x00'\'' == 0 ? 1 : -1];
2793
2794/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
2795   inside strings and character constants.  */
2796#define FOO(x) '\''x'\''
2797int xlc6_cc_array[FOO(a) == '\''x'\'' ? 1 : -1];
2798
2799int test (int i, double x);
2800struct s1 {int (*f) (int a);};
2801struct s2 {int (*f) (double a);};
2802int pairnames (int, char **, int *(*)(struct buf *, struct stat *, int),
2803               int, int);'
2804
2805# Test code for whether the C compiler supports C89 (body of main).
2806ac_c_conftest_c89_main='
2807ok |= (argc == 0 || f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]);
2808'
2809
2810# Test code for whether the C compiler supports C99 (global declarations)
2811ac_c_conftest_c99_globals='
2812// Does the compiler advertise C99 conformance?
2813#if !defined __STDC_VERSION__ || __STDC_VERSION__ < 199901L
2814# error "Compiler does not advertise C99 conformance"
2815#endif
2816
2817#include <stdbool.h>
2818extern int puts (const char *);
2819extern int printf (const char *, ...);
2820extern int dprintf (int, const char *, ...);
2821extern void *malloc (size_t);
2822
2823// Check varargs macros.  These examples are taken from C99 6.10.3.5.
2824// dprintf is used instead of fprintf to avoid needing to declare
2825// FILE and stderr.
2826#define debug(...) dprintf (2, __VA_ARGS__)
2827#define showlist(...) puts (#__VA_ARGS__)
2828#define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__))
2829static void
2830test_varargs_macros (void)
2831{
2832  int x = 1234;
2833  int y = 5678;
2834  debug ("Flag");
2835  debug ("X = %d\n", x);
2836  showlist (The first, second, and third items.);
2837  report (x>y, "x is %d but y is %d", x, y);
2838}
2839
2840// Check long long types.
2841#define BIG64 18446744073709551615ull
2842#define BIG32 4294967295ul
2843#define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0)
2844#if !BIG_OK
2845  #error "your preprocessor is broken"
2846#endif
2847#if BIG_OK
2848#else
2849  #error "your preprocessor is broken"
2850#endif
2851static long long int bignum = -9223372036854775807LL;
2852static unsigned long long int ubignum = BIG64;
2853
2854struct incomplete_array
2855{
2856  int datasize;
2857  double data[];
2858};
2859
2860struct named_init {
2861  int number;
2862  const wchar_t *name;
2863  double average;
2864};
2865
2866typedef const char *ccp;
2867
2868static inline int
2869test_restrict (ccp restrict text)
2870{
2871  // See if C++-style comments work.
2872  // Iterate through items via the restricted pointer.
2873  // Also check for declarations in for loops.
2874  for (unsigned int i = 0; *(text+i) != '\''\0'\''; ++i)
2875    continue;
2876  return 0;
2877}
2878
2879// Check varargs and va_copy.
2880static bool
2881test_varargs (const char *format, ...)
2882{
2883  va_list args;
2884  va_start (args, format);
2885  va_list args_copy;
2886  va_copy (args_copy, args);
2887
2888  const char *str = "";
2889  int number = 0;
2890  float fnumber = 0;
2891
2892  while (*format)
2893    {
2894      switch (*format++)
2895	{
2896	case '\''s'\'': // string
2897	  str = va_arg (args_copy, const char *);
2898	  break;
2899	case '\''d'\'': // int
2900	  number = va_arg (args_copy, int);
2901	  break;
2902	case '\''f'\'': // float
2903	  fnumber = va_arg (args_copy, double);
2904	  break;
2905	default:
2906	  break;
2907	}
2908    }
2909  va_end (args_copy);
2910  va_end (args);
2911
2912  return *str && number && fnumber;
2913}
2914'
2915
2916# Test code for whether the C compiler supports C99 (body of main).
2917ac_c_conftest_c99_main='
2918  // Check bool.
2919  _Bool success = false;
2920  success |= (argc != 0);
2921
2922  // Check restrict.
2923  if (test_restrict ("String literal") == 0)
2924    success = true;
2925  char *restrict newvar = "Another string";
2926
2927  // Check varargs.
2928  success &= test_varargs ("s, d'\'' f .", "string", 65, 34.234);
2929  test_varargs_macros ();
2930
2931  // Check flexible array members.
2932  struct incomplete_array *ia =
2933    malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10));
2934  ia->datasize = 10;
2935  for (int i = 0; i < ia->datasize; ++i)
2936    ia->data[i] = i * 1.234;
2937
2938  // Check named initializers.
2939  struct named_init ni = {
2940    .number = 34,
2941    .name = L"Test wide string",
2942    .average = 543.34343,
2943  };
2944
2945  ni.number = 58;
2946
2947  int dynamic_array[ni.number];
2948  dynamic_array[0] = argv[0][0];
2949  dynamic_array[ni.number - 1] = 543;
2950
2951  // work around unused variable warnings
2952  ok |= (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == '\''x'\''
2953	 || dynamic_array[ni.number - 1] != 543);
2954'
2955
2956# Test code for whether the C compiler supports C11 (global declarations)
2957ac_c_conftest_c11_globals='
2958// Does the compiler advertise C11 conformance?
2959#if !defined __STDC_VERSION__ || __STDC_VERSION__ < 201112L
2960# error "Compiler does not advertise C11 conformance"
2961#endif
2962
2963// Check _Alignas.
2964char _Alignas (double) aligned_as_double;
2965char _Alignas (0) no_special_alignment;
2966extern char aligned_as_int;
2967char _Alignas (0) _Alignas (int) aligned_as_int;
2968
2969// Check _Alignof.
2970enum
2971{
2972  int_alignment = _Alignof (int),
2973  int_array_alignment = _Alignof (int[100]),
2974  char_alignment = _Alignof (char)
2975};
2976_Static_assert (0 < -_Alignof (int), "_Alignof is signed");
2977
2978// Check _Noreturn.
2979int _Noreturn does_not_return (void) { for (;;) continue; }
2980
2981// Check _Static_assert.
2982struct test_static_assert
2983{
2984  int x;
2985  _Static_assert (sizeof (int) <= sizeof (long int),
2986                  "_Static_assert does not work in struct");
2987  long int y;
2988};
2989
2990// Check UTF-8 literals.
2991#define u8 syntax error!
2992char const utf8_literal[] = u8"happens to be ASCII" "another string";
2993
2994// Check duplicate typedefs.
2995typedef long *long_ptr;
2996typedef long int *long_ptr;
2997typedef long_ptr long_ptr;
2998
2999// Anonymous structures and unions -- taken from C11 6.7.2.1 Example 1.
3000struct anonymous
3001{
3002  union {
3003    struct { int i; int j; };
3004    struct { int k; long int l; } w;
3005  };
3006  int m;
3007} v1;
3008'
3009
3010# Test code for whether the C compiler supports C11 (body of main).
3011ac_c_conftest_c11_main='
3012  _Static_assert ((offsetof (struct anonymous, i)
3013		   == offsetof (struct anonymous, w.k)),
3014		  "Anonymous union alignment botch");
3015  v1.i = 2;
3016  v1.w.k = 5;
3017  ok |= v1.i != 5;
3018'
3019
3020# Test code for whether the C compiler supports C11 (complete).
3021ac_c_conftest_c11_program="${ac_c_conftest_c89_globals}
3022${ac_c_conftest_c99_globals}
3023${ac_c_conftest_c11_globals}
3024
3025int
3026main (int argc, char **argv)
3027{
3028  int ok = 0;
3029  ${ac_c_conftest_c89_main}
3030  ${ac_c_conftest_c99_main}
3031  ${ac_c_conftest_c11_main}
3032  return ok;
3033}
3034"
3035
3036# Test code for whether the C compiler supports C99 (complete).
3037ac_c_conftest_c99_program="${ac_c_conftest_c89_globals}
3038${ac_c_conftest_c99_globals}
3039
3040int
3041main (int argc, char **argv)
3042{
3043  int ok = 0;
3044  ${ac_c_conftest_c89_main}
3045  ${ac_c_conftest_c99_main}
3046  return ok;
3047}
3048"
3049
3050# Test code for whether the C compiler supports C89 (complete).
3051ac_c_conftest_c89_program="${ac_c_conftest_c89_globals}
3052
3053int
3054main (int argc, char **argv)
3055{
3056  int ok = 0;
3057  ${ac_c_conftest_c89_main}
3058  return ok;
3059}
3060"
3061
3062as_fn_append ac_header_c_list " stdlib.h stdlib_h HAVE_STDLIB_H"
3063as_fn_append ac_header_c_list " string.h string_h HAVE_STRING_H"
3064as_fn_append ac_header_c_list " inttypes.h inttypes_h HAVE_INTTYPES_H"
3065as_fn_append ac_header_c_list " stdint.h stdint_h HAVE_STDINT_H"
3066as_fn_append ac_header_c_list " strings.h strings_h HAVE_STRINGS_H"
3067as_fn_append ac_header_c_list " sys/stat.h sys_stat_h HAVE_SYS_STAT_H"
3068as_fn_append ac_header_c_list " sys/types.h sys_types_h HAVE_SYS_TYPES_H"
3069as_fn_append ac_header_c_list " unistd.h unistd_h HAVE_UNISTD_H"
3070as_fn_append ac_header_c_list " wchar.h wchar_h HAVE_WCHAR_H"
3071as_fn_append ac_header_c_list " minix/config.h minix_config_h HAVE_MINIX_CONFIG_H"
3072as_fn_append ac_header_c_list " vfork.h vfork_h HAVE_VFORK_H"
3073as_fn_append ac_func_c_list " fork HAVE_FORK"
3074as_fn_append ac_func_c_list " vfork HAVE_VFORK"
3075
3076# Auxiliary files required by this configure script.
3077ac_aux_files="ltmain.sh config.guess config.sub"
3078
3079# Locations in which to look for auxiliary files.
3080ac_aux_dir_candidates="${srcdir}${PATH_SEPARATOR}${srcdir}/..${PATH_SEPARATOR}${srcdir}/../.."
3081
3082# Search for a directory containing all of the required auxiliary files,
3083# $ac_aux_files, from the $PATH-style list $ac_aux_dir_candidates.
3084# If we don't find one directory that contains all the files we need,
3085# we report the set of missing files from the *first* directory in
3086# $ac_aux_dir_candidates and give up.
3087ac_missing_aux_files=""
3088ac_first_candidate=:
3089printf "%s\n" "$as_me:${as_lineno-$LINENO}: looking for aux files: $ac_aux_files" >&5
3090as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3091as_found=false
3092for as_dir in $ac_aux_dir_candidates
3093do
3094  IFS=$as_save_IFS
3095  case $as_dir in #(((
3096    '') as_dir=./ ;;
3097    */) ;;
3098    *) as_dir=$as_dir/ ;;
3099  esac
3100  as_found=:
3101
3102  printf "%s\n" "$as_me:${as_lineno-$LINENO}:  trying $as_dir" >&5
3103  ac_aux_dir_found=yes
3104  ac_install_sh=
3105  for ac_aux in $ac_aux_files
3106  do
3107    # As a special case, if "install-sh" is required, that requirement
3108    # can be satisfied by any of "install-sh", "install.sh", or "shtool",
3109    # and $ac_install_sh is set appropriately for whichever one is found.
3110    if test x"$ac_aux" = x"install-sh"
3111    then
3112      if test -f "${as_dir}install-sh"; then
3113        printf "%s\n" "$as_me:${as_lineno-$LINENO}:   ${as_dir}install-sh found" >&5
3114        ac_install_sh="${as_dir}install-sh -c"
3115      elif test -f "${as_dir}install.sh"; then
3116        printf "%s\n" "$as_me:${as_lineno-$LINENO}:   ${as_dir}install.sh found" >&5
3117        ac_install_sh="${as_dir}install.sh -c"
3118      elif test -f "${as_dir}shtool"; then
3119        printf "%s\n" "$as_me:${as_lineno-$LINENO}:   ${as_dir}shtool found" >&5
3120        ac_install_sh="${as_dir}shtool install -c"
3121      else
3122        ac_aux_dir_found=no
3123        if $ac_first_candidate; then
3124          ac_missing_aux_files="${ac_missing_aux_files} install-sh"
3125        else
3126          break
3127        fi
3128      fi
3129    else
3130      if test -f "${as_dir}${ac_aux}"; then
3131        printf "%s\n" "$as_me:${as_lineno-$LINENO}:   ${as_dir}${ac_aux} found" >&5
3132      else
3133        ac_aux_dir_found=no
3134        if $ac_first_candidate; then
3135          ac_missing_aux_files="${ac_missing_aux_files} ${ac_aux}"
3136        else
3137          break
3138        fi
3139      fi
3140    fi
3141  done
3142  if test "$ac_aux_dir_found" = yes; then
3143    ac_aux_dir="$as_dir"
3144    break
3145  fi
3146  ac_first_candidate=false
3147
3148  as_found=false
3149done
3150IFS=$as_save_IFS
3151if $as_found
3152then :
3153
3154else $as_nop
3155  as_fn_error $? "cannot find required auxiliary files:$ac_missing_aux_files" "$LINENO" 5
3156fi
3157
3158
3159# These three variables are undocumented and unsupported,
3160# and are intended to be withdrawn in a future Autoconf release.
3161# They can cause serious problems if a builder's source tree is in a directory
3162# whose full name contains unusual characters.
3163if test -f "${ac_aux_dir}config.guess"; then
3164  ac_config_guess="$SHELL ${ac_aux_dir}config.guess"
3165fi
3166if test -f "${ac_aux_dir}config.sub"; then
3167  ac_config_sub="$SHELL ${ac_aux_dir}config.sub"
3168fi
3169if test -f "$ac_aux_dir/configure"; then
3170  ac_configure="$SHELL ${ac_aux_dir}configure"
3171fi
3172
3173# Check that the precious variables saved in the cache have kept the same
3174# value.
3175ac_cache_corrupted=false
3176for ac_var in $ac_precious_vars; do
3177  eval ac_old_set=\$ac_cv_env_${ac_var}_set
3178  eval ac_new_set=\$ac_env_${ac_var}_set
3179  eval ac_old_val=\$ac_cv_env_${ac_var}_value
3180  eval ac_new_val=\$ac_env_${ac_var}_value
3181  case $ac_old_set,$ac_new_set in
3182    set,)
3183      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
3184printf "%s\n" "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
3185      ac_cache_corrupted=: ;;
3186    ,set)
3187      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
3188printf "%s\n" "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
3189      ac_cache_corrupted=: ;;
3190    ,);;
3191    *)
3192      if test "x$ac_old_val" != "x$ac_new_val"; then
3193	# differences in whitespace do not lead to failure.
3194	ac_old_val_w=`echo x $ac_old_val`
3195	ac_new_val_w=`echo x $ac_new_val`
3196	if test "$ac_old_val_w" != "$ac_new_val_w"; then
3197	  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
3198printf "%s\n" "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
3199	  ac_cache_corrupted=:
3200	else
3201	  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
3202printf "%s\n" "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
3203	  eval $ac_var=\$ac_old_val
3204	fi
3205	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
3206printf "%s\n" "$as_me:   former value:  \`$ac_old_val'" >&2;}
3207	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
3208printf "%s\n" "$as_me:   current value: \`$ac_new_val'" >&2;}
3209      fi;;
3210  esac
3211  # Pass precious variables to config.status.
3212  if test "$ac_new_set" = set; then
3213    case $ac_new_val in
3214    *\'*) ac_arg=$ac_var=`printf "%s\n" "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
3215    *) ac_arg=$ac_var=$ac_new_val ;;
3216    esac
3217    case " $ac_configure_args " in
3218      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
3219      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
3220    esac
3221  fi
3222done
3223if $ac_cache_corrupted; then
3224  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3225printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
3226  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
3227printf "%s\n" "$as_me: error: changes in the environment can compromise the build" >&2;}
3228  as_fn_error $? "run \`${MAKE-make} distclean' and/or \`rm $cache_file'
3229	    and start over" "$LINENO" 5
3230fi
3231## -------------------- ##
3232## Main body of script. ##
3233## -------------------- ##
3234
3235ac_ext=c
3236ac_cpp='$CPP $CPPFLAGS'
3237ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3238ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3239ac_compiler_gnu=$ac_cv_c_compiler_gnu
3240
3241
3242UNBOUND_VERSION_MAJOR=1
3243
3244UNBOUND_VERSION_MINOR=21
3245
3246UNBOUND_VERSION_MICRO=0
3247
3248
3249LIBUNBOUND_CURRENT=9
3250LIBUNBOUND_REVISION=28
3251LIBUNBOUND_AGE=1
3252# 1.0.0 had 0:12:0
3253# 1.0.1 had 0:13:0
3254# 1.0.2 had 0:14:0
3255# 1.1.0 had 0:15:0
3256# 1.1.1 had 0:16:0
3257# 1.2.0 had 0:17:0
3258# 1.2.1 had 0:18:0
3259# 1.3.0 had 1:0:0   # ub_cancel and -export-symbols.
3260# 1.3.1 had 1:1:0
3261# 1.3.2 had 1:2:0
3262# 1.3.3 had 1:3:0
3263# 1.3.4 had 1:4:0
3264# 1.4.0-snapshots had 1:5:0
3265# 1.4.0 had 1:5:0 (not 2:0:0)   # ub_result.why_bogus
3266# 1.4.1 had 2:1:0
3267# 1.4.2 had 2:2:0
3268# 1.4.3 had 2:3:0
3269# 1.4.4 had 2:4:0
3270# 1.4.5 had 2:5:0
3271# 1.4.6 had 2:6:0
3272# 1.4.7 had 2:7:0
3273# 1.4.8 had 2:8:0
3274# 1.4.9 had 2:9:0
3275# 1.4.10 had 2:10:0
3276# 1.4.11 had 2:11:0
3277# 1.4.12 had 2:12:0
3278# 1.4.13 had 2:13:0
3279# and 1.4.13p1 and 1.4.13.p2
3280# 1.4.14 had 2:14:0
3281# 1.4.15 had 3:0:1 # adds ub_version()
3282# 1.4.16 had 3:1:1
3283# 1.4.17 had 3:2:1
3284# 1.4.18 had 3:3:1
3285# 1.4.19 had 3:4:1
3286# 1.4.20 had 4:0:2 # adds libunbound.ttl # but shipped 3:5:1
3287# 1.4.21 had 4:1:2
3288# 1.4.22 had 4:1:2
3289# 1.5.0 had 5:3:3 # adds ub_ctx_add_ta_autr
3290# 1.5.1 had 5:3:3
3291# 1.5.2 had 5:5:3
3292# 1.5.3 had 5:6:3
3293# 1.5.4 had 5:7:3
3294# 1.5.5 had 5:8:3
3295# 1.5.6 had 5:9:3
3296# 1.5.7 had 5:10:3
3297# 1.5.8 had 6:0:4 # adds ub_ctx_set_stub
3298# 1.5.9 had 6:1:4
3299# 1.5.10 had 6:2:4
3300# 1.6.0 had 6:3:4
3301# 1.6.1 had 7:0:5 # ub_callback_t typedef renamed to ub_callback_type
3302# 1.6.2 had 7:1:5
3303# 1.6.3 had 7:2:5
3304# 1.6.4 had 7:3:5
3305# 1.6.5 had 7:4:5
3306# 1.6.6 had 7:5:5
3307# 1.6.7 had 7:6:5
3308# 1.6.8 had 7:7:5
3309# 1.7.0 had 7:8:5
3310# 1.7.1 had 7:9:5
3311# 1.7.2 had 7:10:5
3312# 1.7.3 had 7:11:5
3313# 1.8.0 had 8:0:0 # changes the event callback function signature
3314# 1.8.1 had 8:1:0
3315# 1.8.2 had 8:2:0
3316# 1.8.3 had 8:3:0
3317# 1.9.0 had 9:0:1 # add ub_ctx_set_tls
3318# 1.9.1 had 9:1:1
3319# 1.9.2 had 9:2:1
3320# 1.9.3 had 9:3:1
3321# 1.9.4 had 9:4:1
3322# 1.9.5 had 9:5:1
3323# 1.9.6 had 9:6:1
3324# 1.10.0 had 9:7:1
3325# 1.10.1 had 9:8:1
3326# 1.11.0 had 9:9:1
3327# 1.12.0 had 9:10:1
3328# 1.13.0 had 9:11:1
3329# 1.13.1 had 9:12:1
3330# 1.13.2 had 9:13:1
3331# 1.14.0 had 9:14:1
3332# 1.15.0 had 9:15:1
3333# 1.16.0 had 9:16:1
3334# 1.16.1 had 9:17:1
3335# 1.16.2 had 9:18:1
3336# 1.16.3 had 9:19:1
3337# 1.17.0 had 9:20:1
3338# 1.17.1 had 9:21:1
3339# 1.18.0 had 9:22:1
3340# 1.19.0 had 9:23:1
3341# 1.19.1 had 9:24:1
3342# 1.19.2 had 9:25:1
3343# 1.19.3 had 9:26:1
3344# 1.20.0 had 9:27:1
3345# 1.21.0 had 9:28:1
3346
3347#   Current  -- the number of the binary API that we're implementing
3348#   Revision -- which iteration of the implementation of the binary
3349#               API are we supplying?
3350#   Age      -- How many previous binary API versions do we also
3351#               support?
3352#
3353# If we release a new version that does not change the binary API,
3354# increment Revision.
3355#
3356# If we release a new version that changes the binary API, but does
3357# not break programs compiled against the old binary API, increment
3358# Current and Age.  Set Revision to 0, since this is the first
3359# implementation of the new API.
3360#
3361# Otherwise, we're changing the binary API and breaking backward
3362# compatibility with old binaries.  Increment Current.  Set Age to 0,
3363# since we're backward compatible with no previous APIs.  Set Revision
3364# to 0 too.
3365
3366
3367
3368
3369
3370cmdln="`echo $@ | sed -e 's/\\\\/\\\\\\\\/g' | sed -e 's/"/\\\\"/'g`"
3371
3372printf "%s\n" "#define CONFCMDLINE \"$cmdln\"" >>confdefs.h
3373
3374
3375CFLAGS="$CFLAGS"
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385ac_ext=c
3386ac_cpp='$CPP $CPPFLAGS'
3387ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3388ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3389ac_compiler_gnu=$ac_cv_c_compiler_gnu
3390if test -n "$ac_tool_prefix"; then
3391  # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3392set dummy ${ac_tool_prefix}gcc; ac_word=$2
3393{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3394printf %s "checking for $ac_word... " >&6; }
3395if test ${ac_cv_prog_CC+y}
3396then :
3397  printf %s "(cached) " >&6
3398else $as_nop
3399  if test -n "$CC"; then
3400  ac_cv_prog_CC="$CC" # Let the user override the test.
3401else
3402as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3403for as_dir in $PATH
3404do
3405  IFS=$as_save_IFS
3406  case $as_dir in #(((
3407    '') as_dir=./ ;;
3408    */) ;;
3409    *) as_dir=$as_dir/ ;;
3410  esac
3411    for ac_exec_ext in '' $ac_executable_extensions; do
3412  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
3413    ac_cv_prog_CC="${ac_tool_prefix}gcc"
3414    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
3415    break 2
3416  fi
3417done
3418  done
3419IFS=$as_save_IFS
3420
3421fi
3422fi
3423CC=$ac_cv_prog_CC
3424if test -n "$CC"; then
3425  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3426printf "%s\n" "$CC" >&6; }
3427else
3428  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
3429printf "%s\n" "no" >&6; }
3430fi
3431
3432
3433fi
3434if test -z "$ac_cv_prog_CC"; then
3435  ac_ct_CC=$CC
3436  # Extract the first word of "gcc", so it can be a program name with args.
3437set dummy gcc; ac_word=$2
3438{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3439printf %s "checking for $ac_word... " >&6; }
3440if test ${ac_cv_prog_ac_ct_CC+y}
3441then :
3442  printf %s "(cached) " >&6
3443else $as_nop
3444  if test -n "$ac_ct_CC"; then
3445  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3446else
3447as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3448for as_dir in $PATH
3449do
3450  IFS=$as_save_IFS
3451  case $as_dir in #(((
3452    '') as_dir=./ ;;
3453    */) ;;
3454    *) as_dir=$as_dir/ ;;
3455  esac
3456    for ac_exec_ext in '' $ac_executable_extensions; do
3457  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
3458    ac_cv_prog_ac_ct_CC="gcc"
3459    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
3460    break 2
3461  fi
3462done
3463  done
3464IFS=$as_save_IFS
3465
3466fi
3467fi
3468ac_ct_CC=$ac_cv_prog_ac_ct_CC
3469if test -n "$ac_ct_CC"; then
3470  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3471printf "%s\n" "$ac_ct_CC" >&6; }
3472else
3473  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
3474printf "%s\n" "no" >&6; }
3475fi
3476
3477  if test "x$ac_ct_CC" = x; then
3478    CC=""
3479  else
3480    case $cross_compiling:$ac_tool_warned in
3481yes:)
3482{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3483printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3484ac_tool_warned=yes ;;
3485esac
3486    CC=$ac_ct_CC
3487  fi
3488else
3489  CC="$ac_cv_prog_CC"
3490fi
3491
3492if test -z "$CC"; then
3493          if test -n "$ac_tool_prefix"; then
3494    # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
3495set dummy ${ac_tool_prefix}cc; ac_word=$2
3496{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3497printf %s "checking for $ac_word... " >&6; }
3498if test ${ac_cv_prog_CC+y}
3499then :
3500  printf %s "(cached) " >&6
3501else $as_nop
3502  if test -n "$CC"; then
3503  ac_cv_prog_CC="$CC" # Let the user override the test.
3504else
3505as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3506for as_dir in $PATH
3507do
3508  IFS=$as_save_IFS
3509  case $as_dir in #(((
3510    '') as_dir=./ ;;
3511    */) ;;
3512    *) as_dir=$as_dir/ ;;
3513  esac
3514    for ac_exec_ext in '' $ac_executable_extensions; do
3515  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
3516    ac_cv_prog_CC="${ac_tool_prefix}cc"
3517    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
3518    break 2
3519  fi
3520done
3521  done
3522IFS=$as_save_IFS
3523
3524fi
3525fi
3526CC=$ac_cv_prog_CC
3527if test -n "$CC"; then
3528  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3529printf "%s\n" "$CC" >&6; }
3530else
3531  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
3532printf "%s\n" "no" >&6; }
3533fi
3534
3535
3536  fi
3537fi
3538if test -z "$CC"; then
3539  # Extract the first word of "cc", so it can be a program name with args.
3540set dummy cc; ac_word=$2
3541{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3542printf %s "checking for $ac_word... " >&6; }
3543if test ${ac_cv_prog_CC+y}
3544then :
3545  printf %s "(cached) " >&6
3546else $as_nop
3547  if test -n "$CC"; then
3548  ac_cv_prog_CC="$CC" # Let the user override the test.
3549else
3550  ac_prog_rejected=no
3551as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3552for as_dir in $PATH
3553do
3554  IFS=$as_save_IFS
3555  case $as_dir in #(((
3556    '') as_dir=./ ;;
3557    */) ;;
3558    *) as_dir=$as_dir/ ;;
3559  esac
3560    for ac_exec_ext in '' $ac_executable_extensions; do
3561  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
3562    if test "$as_dir$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3563       ac_prog_rejected=yes
3564       continue
3565     fi
3566    ac_cv_prog_CC="cc"
3567    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
3568    break 2
3569  fi
3570done
3571  done
3572IFS=$as_save_IFS
3573
3574if test $ac_prog_rejected = yes; then
3575  # We found a bogon in the path, so make sure we never use it.
3576  set dummy $ac_cv_prog_CC
3577  shift
3578  if test $# != 0; then
3579    # We chose a different compiler from the bogus one.
3580    # However, it has the same basename, so the bogon will be chosen
3581    # first if we set CC to just the basename; use the full file name.
3582    shift
3583    ac_cv_prog_CC="$as_dir$ac_word${1+' '}$@"
3584  fi
3585fi
3586fi
3587fi
3588CC=$ac_cv_prog_CC
3589if test -n "$CC"; then
3590  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3591printf "%s\n" "$CC" >&6; }
3592else
3593  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
3594printf "%s\n" "no" >&6; }
3595fi
3596
3597
3598fi
3599if test -z "$CC"; then
3600  if test -n "$ac_tool_prefix"; then
3601  for ac_prog in cl.exe
3602  do
3603    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3604set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3605{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3606printf %s "checking for $ac_word... " >&6; }
3607if test ${ac_cv_prog_CC+y}
3608then :
3609  printf %s "(cached) " >&6
3610else $as_nop
3611  if test -n "$CC"; then
3612  ac_cv_prog_CC="$CC" # Let the user override the test.
3613else
3614as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3615for as_dir in $PATH
3616do
3617  IFS=$as_save_IFS
3618  case $as_dir in #(((
3619    '') as_dir=./ ;;
3620    */) ;;
3621    *) as_dir=$as_dir/ ;;
3622  esac
3623    for ac_exec_ext in '' $ac_executable_extensions; do
3624  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
3625    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
3626    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
3627    break 2
3628  fi
3629done
3630  done
3631IFS=$as_save_IFS
3632
3633fi
3634fi
3635CC=$ac_cv_prog_CC
3636if test -n "$CC"; then
3637  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3638printf "%s\n" "$CC" >&6; }
3639else
3640  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
3641printf "%s\n" "no" >&6; }
3642fi
3643
3644
3645    test -n "$CC" && break
3646  done
3647fi
3648if test -z "$CC"; then
3649  ac_ct_CC=$CC
3650  for ac_prog in cl.exe
3651do
3652  # Extract the first word of "$ac_prog", so it can be a program name with args.
3653set dummy $ac_prog; ac_word=$2
3654{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3655printf %s "checking for $ac_word... " >&6; }
3656if test ${ac_cv_prog_ac_ct_CC+y}
3657then :
3658  printf %s "(cached) " >&6
3659else $as_nop
3660  if test -n "$ac_ct_CC"; then
3661  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3662else
3663as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3664for as_dir in $PATH
3665do
3666  IFS=$as_save_IFS
3667  case $as_dir in #(((
3668    '') as_dir=./ ;;
3669    */) ;;
3670    *) as_dir=$as_dir/ ;;
3671  esac
3672    for ac_exec_ext in '' $ac_executable_extensions; do
3673  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
3674    ac_cv_prog_ac_ct_CC="$ac_prog"
3675    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
3676    break 2
3677  fi
3678done
3679  done
3680IFS=$as_save_IFS
3681
3682fi
3683fi
3684ac_ct_CC=$ac_cv_prog_ac_ct_CC
3685if test -n "$ac_ct_CC"; then
3686  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3687printf "%s\n" "$ac_ct_CC" >&6; }
3688else
3689  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
3690printf "%s\n" "no" >&6; }
3691fi
3692
3693
3694  test -n "$ac_ct_CC" && break
3695done
3696
3697  if test "x$ac_ct_CC" = x; then
3698    CC=""
3699  else
3700    case $cross_compiling:$ac_tool_warned in
3701yes:)
3702{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3703printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3704ac_tool_warned=yes ;;
3705esac
3706    CC=$ac_ct_CC
3707  fi
3708fi
3709
3710fi
3711if test -z "$CC"; then
3712  if test -n "$ac_tool_prefix"; then
3713  # Extract the first word of "${ac_tool_prefix}clang", so it can be a program name with args.
3714set dummy ${ac_tool_prefix}clang; ac_word=$2
3715{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3716printf %s "checking for $ac_word... " >&6; }
3717if test ${ac_cv_prog_CC+y}
3718then :
3719  printf %s "(cached) " >&6
3720else $as_nop
3721  if test -n "$CC"; then
3722  ac_cv_prog_CC="$CC" # Let the user override the test.
3723else
3724as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3725for as_dir in $PATH
3726do
3727  IFS=$as_save_IFS
3728  case $as_dir in #(((
3729    '') as_dir=./ ;;
3730    */) ;;
3731    *) as_dir=$as_dir/ ;;
3732  esac
3733    for ac_exec_ext in '' $ac_executable_extensions; do
3734  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
3735    ac_cv_prog_CC="${ac_tool_prefix}clang"
3736    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
3737    break 2
3738  fi
3739done
3740  done
3741IFS=$as_save_IFS
3742
3743fi
3744fi
3745CC=$ac_cv_prog_CC
3746if test -n "$CC"; then
3747  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3748printf "%s\n" "$CC" >&6; }
3749else
3750  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
3751printf "%s\n" "no" >&6; }
3752fi
3753
3754
3755fi
3756if test -z "$ac_cv_prog_CC"; then
3757  ac_ct_CC=$CC
3758  # Extract the first word of "clang", so it can be a program name with args.
3759set dummy clang; ac_word=$2
3760{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3761printf %s "checking for $ac_word... " >&6; }
3762if test ${ac_cv_prog_ac_ct_CC+y}
3763then :
3764  printf %s "(cached) " >&6
3765else $as_nop
3766  if test -n "$ac_ct_CC"; then
3767  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3768else
3769as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3770for as_dir in $PATH
3771do
3772  IFS=$as_save_IFS
3773  case $as_dir in #(((
3774    '') as_dir=./ ;;
3775    */) ;;
3776    *) as_dir=$as_dir/ ;;
3777  esac
3778    for ac_exec_ext in '' $ac_executable_extensions; do
3779  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
3780    ac_cv_prog_ac_ct_CC="clang"
3781    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
3782    break 2
3783  fi
3784done
3785  done
3786IFS=$as_save_IFS
3787
3788fi
3789fi
3790ac_ct_CC=$ac_cv_prog_ac_ct_CC
3791if test -n "$ac_ct_CC"; then
3792  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3793printf "%s\n" "$ac_ct_CC" >&6; }
3794else
3795  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
3796printf "%s\n" "no" >&6; }
3797fi
3798
3799  if test "x$ac_ct_CC" = x; then
3800    CC=""
3801  else
3802    case $cross_compiling:$ac_tool_warned in
3803yes:)
3804{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3805printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3806ac_tool_warned=yes ;;
3807esac
3808    CC=$ac_ct_CC
3809  fi
3810else
3811  CC="$ac_cv_prog_CC"
3812fi
3813
3814fi
3815
3816
3817test -z "$CC" && { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3818printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
3819as_fn_error $? "no acceptable C compiler found in \$PATH
3820See \`config.log' for more details" "$LINENO" 5; }
3821
3822# Provide some information about the compiler.
3823printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3824set X $ac_compile
3825ac_compiler=$2
3826for ac_option in --version -v -V -qversion -version; do
3827  { { ac_try="$ac_compiler $ac_option >&5"
3828case "(($ac_try" in
3829  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3830  *) ac_try_echo=$ac_try;;
3831esac
3832eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3833printf "%s\n" "$ac_try_echo"; } >&5
3834  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
3835  ac_status=$?
3836  if test -s conftest.err; then
3837    sed '10a\
3838... rest of stderr output deleted ...
3839         10q' conftest.err >conftest.er1
3840    cat conftest.er1 >&5
3841  fi
3842  rm -f conftest.er1 conftest.err
3843  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3844  test $ac_status = 0; }
3845done
3846
3847cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3848/* end confdefs.h.  */
3849
3850int
3851main (void)
3852{
3853
3854  ;
3855  return 0;
3856}
3857_ACEOF
3858ac_clean_files_save=$ac_clean_files
3859ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
3860# Try to create an executable without -o first, disregard a.out.
3861# It will help us diagnose broken compilers, and finding out an intuition
3862# of exeext.
3863{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3864printf %s "checking whether the C compiler works... " >&6; }
3865ac_link_default=`printf "%s\n" "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3866
3867# The possible output files:
3868ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3869
3870ac_rmfiles=
3871for ac_file in $ac_files
3872do
3873  case $ac_file in
3874    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3875    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3876  esac
3877done
3878rm -f $ac_rmfiles
3879
3880if { { ac_try="$ac_link_default"
3881case "(($ac_try" in
3882  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3883  *) ac_try_echo=$ac_try;;
3884esac
3885eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3886printf "%s\n" "$ac_try_echo"; } >&5
3887  (eval "$ac_link_default") 2>&5
3888  ac_status=$?
3889  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3890  test $ac_status = 0; }
3891then :
3892  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3893# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3894# in a Makefile.  We should not override ac_cv_exeext if it was cached,
3895# so that the user can short-circuit this test for compilers unknown to
3896# Autoconf.
3897for ac_file in $ac_files ''
3898do
3899  test -f "$ac_file" || continue
3900  case $ac_file in
3901    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
3902	;;
3903    [ab].out )
3904	# We found the default executable, but exeext='' is most
3905	# certainly right.
3906	break;;
3907    *.* )
3908	if test ${ac_cv_exeext+y} && test "$ac_cv_exeext" != no;
3909	then :; else
3910	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3911	fi
3912	# We set ac_cv_exeext here because the later test for it is not
3913	# safe: cross compilers may not add the suffix if given an `-o'
3914	# argument, so we may need to know it at that point already.
3915	# Even if this section looks crufty: it has the advantage of
3916	# actually working.
3917	break;;
3918    * )
3919	break;;
3920  esac
3921done
3922test "$ac_cv_exeext" = no && ac_cv_exeext=
3923
3924else $as_nop
3925  ac_file=''
3926fi
3927if test -z "$ac_file"
3928then :
3929  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
3930printf "%s\n" "no" >&6; }
3931printf "%s\n" "$as_me: failed program was:" >&5
3932sed 's/^/| /' conftest.$ac_ext >&5
3933
3934{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3935printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
3936as_fn_error 77 "C compiler cannot create executables
3937See \`config.log' for more details" "$LINENO" 5; }
3938else $as_nop
3939  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3940printf "%s\n" "yes" >&6; }
3941fi
3942{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3943printf %s "checking for C compiler default output file name... " >&6; }
3944{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3945printf "%s\n" "$ac_file" >&6; }
3946ac_exeext=$ac_cv_exeext
3947
3948rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
3949ac_clean_files=$ac_clean_files_save
3950{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3951printf %s "checking for suffix of executables... " >&6; }
3952if { { ac_try="$ac_link"
3953case "(($ac_try" in
3954  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3955  *) ac_try_echo=$ac_try;;
3956esac
3957eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3958printf "%s\n" "$ac_try_echo"; } >&5
3959  (eval "$ac_link") 2>&5
3960  ac_status=$?
3961  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3962  test $ac_status = 0; }
3963then :
3964  # If both `conftest.exe' and `conftest' are `present' (well, observable)
3965# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
3966# work properly (i.e., refer to `conftest.exe'), while it won't with
3967# `rm'.
3968for ac_file in conftest.exe conftest conftest.*; do
3969  test -f "$ac_file" || continue
3970  case $ac_file in
3971    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3972    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3973	  break;;
3974    * ) break;;
3975  esac
3976done
3977else $as_nop
3978  { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3979printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
3980as_fn_error $? "cannot compute suffix of executables: cannot compile and link
3981See \`config.log' for more details" "$LINENO" 5; }
3982fi
3983rm -f conftest conftest$ac_cv_exeext
3984{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3985printf "%s\n" "$ac_cv_exeext" >&6; }
3986
3987rm -f conftest.$ac_ext
3988EXEEXT=$ac_cv_exeext
3989ac_exeext=$EXEEXT
3990cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3991/* end confdefs.h.  */
3992#include <stdio.h>
3993int
3994main (void)
3995{
3996FILE *f = fopen ("conftest.out", "w");
3997 return ferror (f) || fclose (f) != 0;
3998
3999  ;
4000  return 0;
4001}
4002_ACEOF
4003ac_clean_files="$ac_clean_files conftest.out"
4004# Check that the compiler produces executables we can run.  If not, either
4005# the compiler is broken, or we cross compile.
4006{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4007printf %s "checking whether we are cross compiling... " >&6; }
4008if test "$cross_compiling" != yes; then
4009  { { ac_try="$ac_link"
4010case "(($ac_try" in
4011  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4012  *) ac_try_echo=$ac_try;;
4013esac
4014eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4015printf "%s\n" "$ac_try_echo"; } >&5
4016  (eval "$ac_link") 2>&5
4017  ac_status=$?
4018  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4019  test $ac_status = 0; }
4020  if { ac_try='./conftest$ac_cv_exeext'
4021  { { case "(($ac_try" in
4022  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4023  *) ac_try_echo=$ac_try;;
4024esac
4025eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4026printf "%s\n" "$ac_try_echo"; } >&5
4027  (eval "$ac_try") 2>&5
4028  ac_status=$?
4029  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4030  test $ac_status = 0; }; }; then
4031    cross_compiling=no
4032  else
4033    if test "$cross_compiling" = maybe; then
4034	cross_compiling=yes
4035    else
4036	{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4037printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
4038as_fn_error 77 "cannot run C compiled programs.
4039If you meant to cross compile, use \`--host'.
4040See \`config.log' for more details" "$LINENO" 5; }
4041    fi
4042  fi
4043fi
4044{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4045printf "%s\n" "$cross_compiling" >&6; }
4046
4047rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4048ac_clean_files=$ac_clean_files_save
4049{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4050printf %s "checking for suffix of object files... " >&6; }
4051if test ${ac_cv_objext+y}
4052then :
4053  printf %s "(cached) " >&6
4054else $as_nop
4055  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4056/* end confdefs.h.  */
4057
4058int
4059main (void)
4060{
4061
4062  ;
4063  return 0;
4064}
4065_ACEOF
4066rm -f conftest.o conftest.obj
4067if { { ac_try="$ac_compile"
4068case "(($ac_try" in
4069  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4070  *) ac_try_echo=$ac_try;;
4071esac
4072eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4073printf "%s\n" "$ac_try_echo"; } >&5
4074  (eval "$ac_compile") 2>&5
4075  ac_status=$?
4076  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4077  test $ac_status = 0; }
4078then :
4079  for ac_file in conftest.o conftest.obj conftest.*; do
4080  test -f "$ac_file" || continue;
4081  case $ac_file in
4082    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
4083    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4084       break;;
4085  esac
4086done
4087else $as_nop
4088  printf "%s\n" "$as_me: failed program was:" >&5
4089sed 's/^/| /' conftest.$ac_ext >&5
4090
4091{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4092printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
4093as_fn_error $? "cannot compute suffix of object files: cannot compile
4094See \`config.log' for more details" "$LINENO" 5; }
4095fi
4096rm -f conftest.$ac_cv_objext conftest.$ac_ext
4097fi
4098{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4099printf "%s\n" "$ac_cv_objext" >&6; }
4100OBJEXT=$ac_cv_objext
4101ac_objext=$OBJEXT
4102{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports GNU C" >&5
4103printf %s "checking whether the compiler supports GNU C... " >&6; }
4104if test ${ac_cv_c_compiler_gnu+y}
4105then :
4106  printf %s "(cached) " >&6
4107else $as_nop
4108  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4109/* end confdefs.h.  */
4110
4111int
4112main (void)
4113{
4114#ifndef __GNUC__
4115       choke me
4116#endif
4117
4118  ;
4119  return 0;
4120}
4121_ACEOF
4122if ac_fn_c_try_compile "$LINENO"
4123then :
4124  ac_compiler_gnu=yes
4125else $as_nop
4126  ac_compiler_gnu=no
4127fi
4128rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
4129ac_cv_c_compiler_gnu=$ac_compiler_gnu
4130
4131fi
4132{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4133printf "%s\n" "$ac_cv_c_compiler_gnu" >&6; }
4134ac_compiler_gnu=$ac_cv_c_compiler_gnu
4135
4136if test $ac_compiler_gnu = yes; then
4137  GCC=yes
4138else
4139  GCC=
4140fi
4141ac_test_CFLAGS=${CFLAGS+y}
4142ac_save_CFLAGS=$CFLAGS
4143{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4144printf %s "checking whether $CC accepts -g... " >&6; }
4145if test ${ac_cv_prog_cc_g+y}
4146then :
4147  printf %s "(cached) " >&6
4148else $as_nop
4149  ac_save_c_werror_flag=$ac_c_werror_flag
4150   ac_c_werror_flag=yes
4151   ac_cv_prog_cc_g=no
4152   CFLAGS="-g"
4153   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4154/* end confdefs.h.  */
4155
4156int
4157main (void)
4158{
4159
4160  ;
4161  return 0;
4162}
4163_ACEOF
4164if ac_fn_c_try_compile "$LINENO"
4165then :
4166  ac_cv_prog_cc_g=yes
4167else $as_nop
4168  CFLAGS=""
4169      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4170/* end confdefs.h.  */
4171
4172int
4173main (void)
4174{
4175
4176  ;
4177  return 0;
4178}
4179_ACEOF
4180if ac_fn_c_try_compile "$LINENO"
4181then :
4182
4183else $as_nop
4184  ac_c_werror_flag=$ac_save_c_werror_flag
4185	 CFLAGS="-g"
4186	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4187/* end confdefs.h.  */
4188
4189int
4190main (void)
4191{
4192
4193  ;
4194  return 0;
4195}
4196_ACEOF
4197if ac_fn_c_try_compile "$LINENO"
4198then :
4199  ac_cv_prog_cc_g=yes
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
4204fi
4205rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
4206   ac_c_werror_flag=$ac_save_c_werror_flag
4207fi
4208{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4209printf "%s\n" "$ac_cv_prog_cc_g" >&6; }
4210if test $ac_test_CFLAGS; then
4211  CFLAGS=$ac_save_CFLAGS
4212elif test $ac_cv_prog_cc_g = yes; then
4213  if test "$GCC" = yes; then
4214    CFLAGS="-g -O2"
4215  else
4216    CFLAGS="-g"
4217  fi
4218else
4219  if test "$GCC" = yes; then
4220    CFLAGS="-O2"
4221  else
4222    CFLAGS=
4223  fi
4224fi
4225ac_prog_cc_stdc=no
4226if test x$ac_prog_cc_stdc = xno
4227then :
4228  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C11 features" >&5
4229printf %s "checking for $CC option to enable C11 features... " >&6; }
4230if test ${ac_cv_prog_cc_c11+y}
4231then :
4232  printf %s "(cached) " >&6
4233else $as_nop
4234  ac_cv_prog_cc_c11=no
4235ac_save_CC=$CC
4236cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4237/* end confdefs.h.  */
4238$ac_c_conftest_c11_program
4239_ACEOF
4240for ac_arg in '' -std=gnu11
4241do
4242  CC="$ac_save_CC $ac_arg"
4243  if ac_fn_c_try_compile "$LINENO"
4244then :
4245  ac_cv_prog_cc_c11=$ac_arg
4246fi
4247rm -f core conftest.err conftest.$ac_objext conftest.beam
4248  test "x$ac_cv_prog_cc_c11" != "xno" && break
4249done
4250rm -f conftest.$ac_ext
4251CC=$ac_save_CC
4252fi
4253
4254if test "x$ac_cv_prog_cc_c11" = xno
4255then :
4256  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4257printf "%s\n" "unsupported" >&6; }
4258else $as_nop
4259  if test "x$ac_cv_prog_cc_c11" = x
4260then :
4261  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4262printf "%s\n" "none needed" >&6; }
4263else $as_nop
4264  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c11" >&5
4265printf "%s\n" "$ac_cv_prog_cc_c11" >&6; }
4266     CC="$CC $ac_cv_prog_cc_c11"
4267fi
4268  ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c11
4269  ac_prog_cc_stdc=c11
4270fi
4271fi
4272if test x$ac_prog_cc_stdc = xno
4273then :
4274  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C99 features" >&5
4275printf %s "checking for $CC option to enable C99 features... " >&6; }
4276if test ${ac_cv_prog_cc_c99+y}
4277then :
4278  printf %s "(cached) " >&6
4279else $as_nop
4280  ac_cv_prog_cc_c99=no
4281ac_save_CC=$CC
4282cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4283/* end confdefs.h.  */
4284$ac_c_conftest_c99_program
4285_ACEOF
4286for ac_arg in '' -std=gnu99 -std=c99 -c99 -qlanglvl=extc1x -qlanglvl=extc99 -AC99 -D_STDC_C99=
4287do
4288  CC="$ac_save_CC $ac_arg"
4289  if ac_fn_c_try_compile "$LINENO"
4290then :
4291  ac_cv_prog_cc_c99=$ac_arg
4292fi
4293rm -f core conftest.err conftest.$ac_objext conftest.beam
4294  test "x$ac_cv_prog_cc_c99" != "xno" && break
4295done
4296rm -f conftest.$ac_ext
4297CC=$ac_save_CC
4298fi
4299
4300if test "x$ac_cv_prog_cc_c99" = xno
4301then :
4302  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4303printf "%s\n" "unsupported" >&6; }
4304else $as_nop
4305  if test "x$ac_cv_prog_cc_c99" = x
4306then :
4307  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4308printf "%s\n" "none needed" >&6; }
4309else $as_nop
4310  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5
4311printf "%s\n" "$ac_cv_prog_cc_c99" >&6; }
4312     CC="$CC $ac_cv_prog_cc_c99"
4313fi
4314  ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99
4315  ac_prog_cc_stdc=c99
4316fi
4317fi
4318if test x$ac_prog_cc_stdc = xno
4319then :
4320  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C89 features" >&5
4321printf %s "checking for $CC option to enable C89 features... " >&6; }
4322if test ${ac_cv_prog_cc_c89+y}
4323then :
4324  printf %s "(cached) " >&6
4325else $as_nop
4326  ac_cv_prog_cc_c89=no
4327ac_save_CC=$CC
4328cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4329/* end confdefs.h.  */
4330$ac_c_conftest_c89_program
4331_ACEOF
4332for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
4333do
4334  CC="$ac_save_CC $ac_arg"
4335  if ac_fn_c_try_compile "$LINENO"
4336then :
4337  ac_cv_prog_cc_c89=$ac_arg
4338fi
4339rm -f core conftest.err conftest.$ac_objext conftest.beam
4340  test "x$ac_cv_prog_cc_c89" != "xno" && break
4341done
4342rm -f conftest.$ac_ext
4343CC=$ac_save_CC
4344fi
4345
4346if test "x$ac_cv_prog_cc_c89" = xno
4347then :
4348  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4349printf "%s\n" "unsupported" >&6; }
4350else $as_nop
4351  if test "x$ac_cv_prog_cc_c89" = x
4352then :
4353  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4354printf "%s\n" "none needed" >&6; }
4355else $as_nop
4356  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4357printf "%s\n" "$ac_cv_prog_cc_c89" >&6; }
4358     CC="$CC $ac_cv_prog_cc_c89"
4359fi
4360  ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89
4361  ac_prog_cc_stdc=c89
4362fi
4363fi
4364
4365ac_ext=c
4366ac_cpp='$CPP $CPPFLAGS'
4367ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4368ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4369ac_compiler_gnu=$ac_cv_c_compiler_gnu
4370
4371
4372ac_header= ac_cache=
4373for ac_item in $ac_header_c_list
4374do
4375  if test $ac_cache; then
4376    ac_fn_c_check_header_compile "$LINENO" $ac_header ac_cv_header_$ac_cache "$ac_includes_default"
4377    if eval test \"x\$ac_cv_header_$ac_cache\" = xyes; then
4378      printf "%s\n" "#define $ac_item 1" >> confdefs.h
4379    fi
4380    ac_header= ac_cache=
4381  elif test $ac_header; then
4382    ac_cache=$ac_item
4383  else
4384    ac_header=$ac_item
4385  fi
4386done
4387
4388
4389
4390
4391
4392
4393
4394
4395if test $ac_cv_header_stdlib_h = yes && test $ac_cv_header_string_h = yes
4396then :
4397
4398printf "%s\n" "#define STDC_HEADERS 1" >>confdefs.h
4399
4400fi
4401
4402
4403
4404
4405
4406
4407  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
4408printf %s "checking whether it is safe to define __EXTENSIONS__... " >&6; }
4409if test ${ac_cv_safe_to_define___extensions__+y}
4410then :
4411  printf %s "(cached) " >&6
4412else $as_nop
4413  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4414/* end confdefs.h.  */
4415
4416#         define __EXTENSIONS__ 1
4417          $ac_includes_default
4418int
4419main (void)
4420{
4421
4422  ;
4423  return 0;
4424}
4425_ACEOF
4426if ac_fn_c_try_compile "$LINENO"
4427then :
4428  ac_cv_safe_to_define___extensions__=yes
4429else $as_nop
4430  ac_cv_safe_to_define___extensions__=no
4431fi
4432rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
4433fi
4434{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
4435printf "%s\n" "$ac_cv_safe_to_define___extensions__" >&6; }
4436
4437  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether _XOPEN_SOURCE should be defined" >&5
4438printf %s "checking whether _XOPEN_SOURCE should be defined... " >&6; }
4439if test ${ac_cv_should_define__xopen_source+y}
4440then :
4441  printf %s "(cached) " >&6
4442else $as_nop
4443  ac_cv_should_define__xopen_source=no
4444    if test $ac_cv_header_wchar_h = yes
4445then :
4446  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4447/* end confdefs.h.  */
4448
4449          #include <wchar.h>
4450          mbstate_t x;
4451int
4452main (void)
4453{
4454
4455  ;
4456  return 0;
4457}
4458_ACEOF
4459if ac_fn_c_try_compile "$LINENO"
4460then :
4461
4462else $as_nop
4463  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4464/* end confdefs.h.  */
4465
4466            #define _XOPEN_SOURCE 500
4467            #include <wchar.h>
4468            mbstate_t x;
4469int
4470main (void)
4471{
4472
4473  ;
4474  return 0;
4475}
4476_ACEOF
4477if ac_fn_c_try_compile "$LINENO"
4478then :
4479  ac_cv_should_define__xopen_source=yes
4480fi
4481rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
4482fi
4483rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
4484fi
4485fi
4486{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_should_define__xopen_source" >&5
4487printf "%s\n" "$ac_cv_should_define__xopen_source" >&6; }
4488
4489  printf "%s\n" "#define _ALL_SOURCE 1" >>confdefs.h
4490
4491  printf "%s\n" "#define _DARWIN_C_SOURCE 1" >>confdefs.h
4492
4493  printf "%s\n" "#define _GNU_SOURCE 1" >>confdefs.h
4494
4495  printf "%s\n" "#define _HPUX_ALT_XOPEN_SOCKET_API 1" >>confdefs.h
4496
4497  printf "%s\n" "#define _NETBSD_SOURCE 1" >>confdefs.h
4498
4499  printf "%s\n" "#define _OPENBSD_SOURCE 1" >>confdefs.h
4500
4501  printf "%s\n" "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
4502
4503  printf "%s\n" "#define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1" >>confdefs.h
4504
4505  printf "%s\n" "#define __STDC_WANT_IEC_60559_BFP_EXT__ 1" >>confdefs.h
4506
4507  printf "%s\n" "#define __STDC_WANT_IEC_60559_DFP_EXT__ 1" >>confdefs.h
4508
4509  printf "%s\n" "#define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1" >>confdefs.h
4510
4511  printf "%s\n" "#define __STDC_WANT_IEC_60559_TYPES_EXT__ 1" >>confdefs.h
4512
4513  printf "%s\n" "#define __STDC_WANT_LIB_EXT2__ 1" >>confdefs.h
4514
4515  printf "%s\n" "#define __STDC_WANT_MATH_SPEC_FUNCS__ 1" >>confdefs.h
4516
4517  printf "%s\n" "#define _TANDEM_SOURCE 1" >>confdefs.h
4518
4519  if test $ac_cv_header_minix_config_h = yes
4520then :
4521  MINIX=yes
4522    printf "%s\n" "#define _MINIX 1" >>confdefs.h
4523
4524    printf "%s\n" "#define _POSIX_SOURCE 1" >>confdefs.h
4525
4526    printf "%s\n" "#define _POSIX_1_SOURCE 2" >>confdefs.h
4527
4528else $as_nop
4529  MINIX=
4530fi
4531  if test $ac_cv_safe_to_define___extensions__ = yes
4532then :
4533  printf "%s\n" "#define __EXTENSIONS__ 1" >>confdefs.h
4534
4535fi
4536  if test $ac_cv_should_define__xopen_source = yes
4537then :
4538  printf "%s\n" "#define _XOPEN_SOURCE 500" >>confdefs.h
4539
4540fi
4541
4542if test "$ac_cv_header_minix_config_h" = "yes"; then
4543
4544printf "%s\n" "#define _NETBSD_SOURCE 1" >>confdefs.h
4545
4546fi
4547
4548case "$prefix" in
4549        NONE)
4550		prefix="/usr/local"
4551        ;;
4552esac
4553case "$exec_prefix" in
4554        NONE)
4555		exec_prefix="$prefix"
4556        ;;
4557esac
4558
4559# are we on MinGW?
4560if uname -s 2>&1 | grep MINGW >/dev/null; then on_mingw="yes"
4561else
4562	if echo $host | grep mingw >/dev/null; then on_mingw="yes"
4563	else on_mingw="no"; fi
4564fi
4565
4566#
4567# Determine configuration file
4568# the eval is to evaluate shell expansion twice
4569UNBOUND_SBIN_DIR=`eval echo "${sbindir}"`
4570
4571UNBOUND_SYSCONF_DIR=`eval echo "${sysconfdir}"`
4572
4573UNBOUND_LOCALSTATE_DIR=`eval echo "${localstatedir}"`
4574
4575if test $on_mingw = "no"; then
4576  ub_conf_file=`eval echo "${sysconfdir}/unbound/unbound.conf"`
4577else
4578  ub_conf_file="C:\\Program Files\\Unbound\\service.conf"
4579fi
4580
4581# Check whether --with-conf_file was given.
4582if test ${with_conf_file+y}
4583then :
4584  withval=$with_conf_file; ub_conf_file="$withval"
4585fi
4586
4587
4588hdr_config="`echo $ub_conf_file | sed -e 's/\\\\/\\\\\\\\/g'`"
4589
4590
4591printf "%s\n" "#define CONFIGFILE \"$hdr_config\"" >>confdefs.h
4592
4593ub_conf_dir=`$as_dirname -- "$ub_conf_file" ||
4594$as_expr X"$ub_conf_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
4595	 X"$ub_conf_file" : 'X\(//\)[^/]' \| \
4596	 X"$ub_conf_file" : 'X\(//\)$' \| \
4597	 X"$ub_conf_file" : 'X\(/\)' \| . 2>/dev/null ||
4598printf "%s\n" X"$ub_conf_file" |
4599    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
4600	    s//\1/
4601	    q
4602	  }
4603	  /^X\(\/\/\)[^/].*/{
4604	    s//\1/
4605	    q
4606	  }
4607	  /^X\(\/\/\)$/{
4608	    s//\1/
4609	    q
4610	  }
4611	  /^X\(\/\).*/{
4612	    s//\1/
4613	    q
4614	  }
4615	  s/.*/./; q'`
4616
4617
4618# Determine run, chroot directory and pidfile locations
4619
4620# Check whether --with-run-dir was given.
4621if test ${with_run_dir+y}
4622then :
4623  withval=$with_run_dir; UNBOUND_RUN_DIR="$withval"
4624else $as_nop
4625  if test $on_mingw = no; then
4626    UNBOUND_RUN_DIR=`dirname "$ub_conf_file"`
4627else
4628    UNBOUND_RUN_DIR=""
4629fi
4630
4631fi
4632
4633
4634hdr_run="`echo $UNBOUND_RUN_DIR | sed -e 's/\\\\/\\\\\\\\/g'`"
4635
4636
4637printf "%s\n" "#define RUN_DIR \"$hdr_run\"" >>confdefs.h
4638
4639
4640
4641# Check whether --with-chroot-dir was given.
4642if test ${with_chroot_dir+y}
4643then :
4644  withval=$with_chroot_dir; UNBOUND_CHROOT_DIR="$withval"
4645else $as_nop
4646  if test $on_mingw = no; then
4647    UNBOUND_CHROOT_DIR="$UNBOUND_RUN_DIR"
4648else
4649    UNBOUND_CHROOT_DIR=""
4650fi
4651
4652fi
4653
4654
4655hdr_chroot="`echo $UNBOUND_CHROOT_DIR | sed -e 's/\\\\/\\\\\\\\/g'`"
4656
4657
4658printf "%s\n" "#define CHROOT_DIR \"$hdr_chroot\"" >>confdefs.h
4659
4660
4661
4662# Check whether --with-share-dir was given.
4663if test ${with_share_dir+y}
4664then :
4665  withval=$with_share_dir; UNBOUND_SHARE_DIR="$withval"
4666else $as_nop
4667  UNBOUND_SHARE_DIR="$UNBOUND_RUN_DIR"
4668fi
4669
4670
4671
4672printf "%s\n" "#define SHARE_DIR \"$UNBOUND_SHARE_DIR\"" >>confdefs.h
4673
4674
4675
4676# Check whether --with-pidfile was given.
4677if test ${with_pidfile+y}
4678then :
4679  withval=$with_pidfile; UNBOUND_PIDFILE="$withval"
4680else $as_nop
4681  if test $on_mingw = no; then
4682    UNBOUND_PIDFILE="$UNBOUND_RUN_DIR/unbound.pid"
4683else
4684    UNBOUND_PIDFILE=""
4685fi
4686
4687fi
4688
4689
4690hdr_pid="`echo $UNBOUND_PIDFILE | sed -e 's/\\\\/\\\\\\\\/g'`"
4691
4692
4693printf "%s\n" "#define PIDFILE \"$hdr_pid\"" >>confdefs.h
4694
4695
4696
4697# Check whether --with-rootkey-file was given.
4698if test ${with_rootkey_file+y}
4699then :
4700  withval=$with_rootkey_file; UNBOUND_ROOTKEY_FILE="$withval"
4701else $as_nop
4702  if test $on_mingw = no; then
4703    UNBOUND_ROOTKEY_FILE="$UNBOUND_RUN_DIR/root.key"
4704else
4705    UNBOUND_ROOTKEY_FILE="C:\\Program Files\\Unbound\\root.key"
4706fi
4707
4708fi
4709
4710
4711hdr_rkey="`echo $UNBOUND_ROOTKEY_FILE | sed -e 's/\\\\/\\\\\\\\/g'`"
4712
4713
4714printf "%s\n" "#define ROOT_ANCHOR_FILE \"$hdr_rkey\"" >>confdefs.h
4715
4716
4717
4718# Check whether --with-rootcert-file was given.
4719if test ${with_rootcert_file+y}
4720then :
4721  withval=$with_rootcert_file; UNBOUND_ROOTCERT_FILE="$withval"
4722else $as_nop
4723  if test $on_mingw = no; then
4724    UNBOUND_ROOTCERT_FILE="$UNBOUND_RUN_DIR/icannbundle.pem"
4725else
4726    UNBOUND_ROOTCERT_FILE="C:\\Program Files\\Unbound\\icannbundle.pem"
4727fi
4728
4729fi
4730
4731
4732hdr_rpem="`echo $UNBOUND_ROOTCERT_FILE | sed -e 's/\\\\/\\\\\\\\/g'`"
4733
4734
4735printf "%s\n" "#define ROOT_CERT_FILE \"$hdr_rpem\"" >>confdefs.h
4736
4737
4738
4739# Check whether --with-username was given.
4740if test ${with_username+y}
4741then :
4742  withval=$with_username; UNBOUND_USERNAME="$withval"
4743else $as_nop
4744  UNBOUND_USERNAME="unbound"
4745fi
4746
4747
4748
4749printf "%s\n" "#define UB_USERNAME \"$UNBOUND_USERNAME\"" >>confdefs.h
4750
4751
4752
4753printf "%s\n" "#define WINVER 0x0502" >>confdefs.h
4754
4755wnvs=`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/' `
4756
4757
4758printf "%s\n" "#define RSRC_PACKAGE_VERSION $wnvs" >>confdefs.h
4759
4760
4761# Check for 'grep -e' program, here, since ACX_CHECK_FLTO needs that.
4762{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4763printf %s "checking for grep that handles long lines and -e... " >&6; }
4764if test ${ac_cv_path_GREP+y}
4765then :
4766  printf %s "(cached) " >&6
4767else $as_nop
4768  if test -z "$GREP"; then
4769  ac_path_GREP_found=false
4770  # Loop through the user's path and test for each of PROGNAME-LIST
4771  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4772for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4773do
4774  IFS=$as_save_IFS
4775  case $as_dir in #(((
4776    '') as_dir=./ ;;
4777    */) ;;
4778    *) as_dir=$as_dir/ ;;
4779  esac
4780    for ac_prog in grep ggrep
4781   do
4782    for ac_exec_ext in '' $ac_executable_extensions; do
4783      ac_path_GREP="$as_dir$ac_prog$ac_exec_ext"
4784      as_fn_executable_p "$ac_path_GREP" || continue
4785# Check for GNU ac_path_GREP and select it if it is found.
4786  # Check for GNU $ac_path_GREP
4787case `"$ac_path_GREP" --version 2>&1` in
4788*GNU*)
4789  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4790*)
4791  ac_count=0
4792  printf %s 0123456789 >"conftest.in"
4793  while :
4794  do
4795    cat "conftest.in" "conftest.in" >"conftest.tmp"
4796    mv "conftest.tmp" "conftest.in"
4797    cp "conftest.in" "conftest.nl"
4798    printf "%s\n" 'GREP' >> "conftest.nl"
4799    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4800    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4801    as_fn_arith $ac_count + 1 && ac_count=$as_val
4802    if test $ac_count -gt ${ac_path_GREP_max-0}; then
4803      # Best one so far, save it but keep looking for a better one
4804      ac_cv_path_GREP="$ac_path_GREP"
4805      ac_path_GREP_max=$ac_count
4806    fi
4807    # 10*(2^10) chars as input seems more than enough
4808    test $ac_count -gt 10 && break
4809  done
4810  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4811esac
4812
4813      $ac_path_GREP_found && break 3
4814    done
4815  done
4816  done
4817IFS=$as_save_IFS
4818  if test -z "$ac_cv_path_GREP"; then
4819    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4820  fi
4821else
4822  ac_cv_path_GREP=$GREP
4823fi
4824
4825fi
4826{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4827printf "%s\n" "$ac_cv_path_GREP" >&6; }
4828 GREP="$ac_cv_path_GREP"
4829
4830
4831
4832# Checks for typedefs, structures, and compiler characteristics.
4833{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
4834printf %s "checking for an ANSI C-conforming const... " >&6; }
4835if test ${ac_cv_c_const+y}
4836then :
4837  printf %s "(cached) " >&6
4838else $as_nop
4839  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4840/* end confdefs.h.  */
4841
4842int
4843main (void)
4844{
4845
4846#ifndef __cplusplus
4847  /* Ultrix mips cc rejects this sort of thing.  */
4848  typedef int charset[2];
4849  const charset cs = { 0, 0 };
4850  /* SunOS 4.1.1 cc rejects this.  */
4851  char const *const *pcpcc;
4852  char **ppc;
4853  /* NEC SVR4.0.2 mips cc rejects this.  */
4854  struct point {int x, y;};
4855  static struct point const zero = {0,0};
4856  /* IBM XL C 1.02.0.0 rejects this.
4857     It does not let you subtract one const X* pointer from another in
4858     an arm of an if-expression whose if-part is not a constant
4859     expression */
4860  const char *g = "string";
4861  pcpcc = &g + (g ? g-g : 0);
4862  /* HPUX 7.0 cc rejects these. */
4863  ++pcpcc;
4864  ppc = (char**) pcpcc;
4865  pcpcc = (char const *const *) ppc;
4866  { /* SCO 3.2v4 cc rejects this sort of thing.  */
4867    char tx;
4868    char *t = &tx;
4869    char const *s = 0 ? (char *) 0 : (char const *) 0;
4870
4871    *t++ = 0;
4872    if (s) return 0;
4873  }
4874  { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
4875    int x[] = {25, 17};
4876    const int *foo = &x[0];
4877    ++foo;
4878  }
4879  { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
4880    typedef const int *iptr;
4881    iptr p = 0;
4882    ++p;
4883  }
4884  { /* IBM XL C 1.02.0.0 rejects this sort of thing, saying
4885       "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
4886    struct s { int j; const int *ap[3]; } bx;
4887    struct s *b = &bx; b->j = 5;
4888  }
4889  { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
4890    const int foo = 10;
4891    if (!foo) return 0;
4892  }
4893  return !cs[0] && !zero.x;
4894#endif
4895
4896  ;
4897  return 0;
4898}
4899_ACEOF
4900if ac_fn_c_try_compile "$LINENO"
4901then :
4902  ac_cv_c_const=yes
4903else $as_nop
4904  ac_cv_c_const=no
4905fi
4906rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
4907fi
4908{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
4909printf "%s\n" "$ac_cv_c_const" >&6; }
4910if test $ac_cv_c_const = no; then
4911
4912printf "%s\n" "#define const /**/" >>confdefs.h
4913
4914fi
4915
4916ac_ext=c
4917ac_cpp='$CPP $CPPFLAGS'
4918ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4919ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4920ac_compiler_gnu=$ac_cv_c_compiler_gnu
4921
4922# allow user to override the -g -O2 flags.
4923default_cflags=no
4924if test "x$CFLAGS" = "x" ; then
4925
4926
4927{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -g" >&5
4928printf %s "checking whether $CC supports -g... " >&6; }
4929cache=`echo g | sed 'y%.=/+-%___p_%'`
4930if eval test \${cv_prog_cc_flag_$cache+y}
4931then :
4932  printf %s "(cached) " >&6
4933else $as_nop
4934
4935echo 'void f(void){}' >conftest.c
4936if test -z "`$CC $CPPFLAGS $CFLAGS -g -c conftest.c 2>&1`"; then
4937eval "cv_prog_cc_flag_$cache=yes"
4938else
4939eval "cv_prog_cc_flag_$cache=no"
4940fi
4941rm -f conftest conftest.o conftest.c
4942
4943fi
4944
4945if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
4946{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4947printf "%s\n" "yes" >&6; }
4948:
4949CFLAGS="$CFLAGS -g"
4950else
4951{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4952printf "%s\n" "no" >&6; }
4953:
4954
4955fi
4956
4957
4958
4959{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -O2" >&5
4960printf %s "checking whether $CC supports -O2... " >&6; }
4961cache=`echo O2 | sed 'y%.=/+-%___p_%'`
4962if eval test \${cv_prog_cc_flag_$cache+y}
4963then :
4964  printf %s "(cached) " >&6
4965else $as_nop
4966
4967echo 'void f(void){}' >conftest.c
4968if test -z "`$CC $CPPFLAGS $CFLAGS -O2 -c conftest.c 2>&1`"; then
4969eval "cv_prog_cc_flag_$cache=yes"
4970else
4971eval "cv_prog_cc_flag_$cache=no"
4972fi
4973rm -f conftest conftest.o conftest.c
4974
4975fi
4976
4977if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
4978{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4979printf "%s\n" "yes" >&6; }
4980:
4981CFLAGS="$CFLAGS -O2"
4982else
4983{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4984printf "%s\n" "no" >&6; }
4985:
4986
4987fi
4988
4989default_cflags=yes
4990fi
4991ac_ext=c
4992ac_cpp='$CPP $CPPFLAGS'
4993ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4994ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4995ac_compiler_gnu=$ac_cv_c_compiler_gnu
4996if test -n "$ac_tool_prefix"; then
4997  # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
4998set dummy ${ac_tool_prefix}gcc; ac_word=$2
4999{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5000printf %s "checking for $ac_word... " >&6; }
5001if test ${ac_cv_prog_CC+y}
5002then :
5003  printf %s "(cached) " >&6
5004else $as_nop
5005  if test -n "$CC"; then
5006  ac_cv_prog_CC="$CC" # Let the user override the test.
5007else
5008as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5009for as_dir in $PATH
5010do
5011  IFS=$as_save_IFS
5012  case $as_dir in #(((
5013    '') as_dir=./ ;;
5014    */) ;;
5015    *) as_dir=$as_dir/ ;;
5016  esac
5017    for ac_exec_ext in '' $ac_executable_extensions; do
5018  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
5019    ac_cv_prog_CC="${ac_tool_prefix}gcc"
5020    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
5021    break 2
5022  fi
5023done
5024  done
5025IFS=$as_save_IFS
5026
5027fi
5028fi
5029CC=$ac_cv_prog_CC
5030if test -n "$CC"; then
5031  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5032printf "%s\n" "$CC" >&6; }
5033else
5034  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5035printf "%s\n" "no" >&6; }
5036fi
5037
5038
5039fi
5040if test -z "$ac_cv_prog_CC"; then
5041  ac_ct_CC=$CC
5042  # Extract the first word of "gcc", so it can be a program name with args.
5043set dummy gcc; ac_word=$2
5044{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5045printf %s "checking for $ac_word... " >&6; }
5046if test ${ac_cv_prog_ac_ct_CC+y}
5047then :
5048  printf %s "(cached) " >&6
5049else $as_nop
5050  if test -n "$ac_ct_CC"; then
5051  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
5052else
5053as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5054for as_dir in $PATH
5055do
5056  IFS=$as_save_IFS
5057  case $as_dir in #(((
5058    '') as_dir=./ ;;
5059    */) ;;
5060    *) as_dir=$as_dir/ ;;
5061  esac
5062    for ac_exec_ext in '' $ac_executable_extensions; do
5063  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
5064    ac_cv_prog_ac_ct_CC="gcc"
5065    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
5066    break 2
5067  fi
5068done
5069  done
5070IFS=$as_save_IFS
5071
5072fi
5073fi
5074ac_ct_CC=$ac_cv_prog_ac_ct_CC
5075if test -n "$ac_ct_CC"; then
5076  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
5077printf "%s\n" "$ac_ct_CC" >&6; }
5078else
5079  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5080printf "%s\n" "no" >&6; }
5081fi
5082
5083  if test "x$ac_ct_CC" = x; then
5084    CC=""
5085  else
5086    case $cross_compiling:$ac_tool_warned in
5087yes:)
5088{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5089printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5090ac_tool_warned=yes ;;
5091esac
5092    CC=$ac_ct_CC
5093  fi
5094else
5095  CC="$ac_cv_prog_CC"
5096fi
5097
5098if test -z "$CC"; then
5099          if test -n "$ac_tool_prefix"; then
5100    # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
5101set dummy ${ac_tool_prefix}cc; ac_word=$2
5102{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5103printf %s "checking for $ac_word... " >&6; }
5104if test ${ac_cv_prog_CC+y}
5105then :
5106  printf %s "(cached) " >&6
5107else $as_nop
5108  if test -n "$CC"; then
5109  ac_cv_prog_CC="$CC" # Let the user override the test.
5110else
5111as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5112for as_dir in $PATH
5113do
5114  IFS=$as_save_IFS
5115  case $as_dir in #(((
5116    '') as_dir=./ ;;
5117    */) ;;
5118    *) as_dir=$as_dir/ ;;
5119  esac
5120    for ac_exec_ext in '' $ac_executable_extensions; do
5121  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
5122    ac_cv_prog_CC="${ac_tool_prefix}cc"
5123    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
5124    break 2
5125  fi
5126done
5127  done
5128IFS=$as_save_IFS
5129
5130fi
5131fi
5132CC=$ac_cv_prog_CC
5133if test -n "$CC"; then
5134  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5135printf "%s\n" "$CC" >&6; }
5136else
5137  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5138printf "%s\n" "no" >&6; }
5139fi
5140
5141
5142  fi
5143fi
5144if test -z "$CC"; then
5145  # Extract the first word of "cc", so it can be a program name with args.
5146set dummy cc; ac_word=$2
5147{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5148printf %s "checking for $ac_word... " >&6; }
5149if test ${ac_cv_prog_CC+y}
5150then :
5151  printf %s "(cached) " >&6
5152else $as_nop
5153  if test -n "$CC"; then
5154  ac_cv_prog_CC="$CC" # Let the user override the test.
5155else
5156  ac_prog_rejected=no
5157as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5158for as_dir in $PATH
5159do
5160  IFS=$as_save_IFS
5161  case $as_dir in #(((
5162    '') as_dir=./ ;;
5163    */) ;;
5164    *) as_dir=$as_dir/ ;;
5165  esac
5166    for ac_exec_ext in '' $ac_executable_extensions; do
5167  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
5168    if test "$as_dir$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
5169       ac_prog_rejected=yes
5170       continue
5171     fi
5172    ac_cv_prog_CC="cc"
5173    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
5174    break 2
5175  fi
5176done
5177  done
5178IFS=$as_save_IFS
5179
5180if test $ac_prog_rejected = yes; then
5181  # We found a bogon in the path, so make sure we never use it.
5182  set dummy $ac_cv_prog_CC
5183  shift
5184  if test $# != 0; then
5185    # We chose a different compiler from the bogus one.
5186    # However, it has the same basename, so the bogon will be chosen
5187    # first if we set CC to just the basename; use the full file name.
5188    shift
5189    ac_cv_prog_CC="$as_dir$ac_word${1+' '}$@"
5190  fi
5191fi
5192fi
5193fi
5194CC=$ac_cv_prog_CC
5195if test -n "$CC"; then
5196  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5197printf "%s\n" "$CC" >&6; }
5198else
5199  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5200printf "%s\n" "no" >&6; }
5201fi
5202
5203
5204fi
5205if test -z "$CC"; then
5206  if test -n "$ac_tool_prefix"; then
5207  for ac_prog in cl.exe
5208  do
5209    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5210set dummy $ac_tool_prefix$ac_prog; ac_word=$2
5211{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5212printf %s "checking for $ac_word... " >&6; }
5213if test ${ac_cv_prog_CC+y}
5214then :
5215  printf %s "(cached) " >&6
5216else $as_nop
5217  if test -n "$CC"; then
5218  ac_cv_prog_CC="$CC" # Let the user override the test.
5219else
5220as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5221for as_dir in $PATH
5222do
5223  IFS=$as_save_IFS
5224  case $as_dir in #(((
5225    '') as_dir=./ ;;
5226    */) ;;
5227    *) as_dir=$as_dir/ ;;
5228  esac
5229    for ac_exec_ext in '' $ac_executable_extensions; do
5230  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
5231    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
5232    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
5233    break 2
5234  fi
5235done
5236  done
5237IFS=$as_save_IFS
5238
5239fi
5240fi
5241CC=$ac_cv_prog_CC
5242if test -n "$CC"; then
5243  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5244printf "%s\n" "$CC" >&6; }
5245else
5246  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5247printf "%s\n" "no" >&6; }
5248fi
5249
5250
5251    test -n "$CC" && break
5252  done
5253fi
5254if test -z "$CC"; then
5255  ac_ct_CC=$CC
5256  for ac_prog in cl.exe
5257do
5258  # Extract the first word of "$ac_prog", so it can be a program name with args.
5259set dummy $ac_prog; ac_word=$2
5260{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5261printf %s "checking for $ac_word... " >&6; }
5262if test ${ac_cv_prog_ac_ct_CC+y}
5263then :
5264  printf %s "(cached) " >&6
5265else $as_nop
5266  if test -n "$ac_ct_CC"; then
5267  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
5268else
5269as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5270for as_dir in $PATH
5271do
5272  IFS=$as_save_IFS
5273  case $as_dir in #(((
5274    '') as_dir=./ ;;
5275    */) ;;
5276    *) as_dir=$as_dir/ ;;
5277  esac
5278    for ac_exec_ext in '' $ac_executable_extensions; do
5279  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
5280    ac_cv_prog_ac_ct_CC="$ac_prog"
5281    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
5282    break 2
5283  fi
5284done
5285  done
5286IFS=$as_save_IFS
5287
5288fi
5289fi
5290ac_ct_CC=$ac_cv_prog_ac_ct_CC
5291if test -n "$ac_ct_CC"; then
5292  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
5293printf "%s\n" "$ac_ct_CC" >&6; }
5294else
5295  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5296printf "%s\n" "no" >&6; }
5297fi
5298
5299
5300  test -n "$ac_ct_CC" && break
5301done
5302
5303  if test "x$ac_ct_CC" = x; then
5304    CC=""
5305  else
5306    case $cross_compiling:$ac_tool_warned in
5307yes:)
5308{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5309printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5310ac_tool_warned=yes ;;
5311esac
5312    CC=$ac_ct_CC
5313  fi
5314fi
5315
5316fi
5317if test -z "$CC"; then
5318  if test -n "$ac_tool_prefix"; then
5319  # Extract the first word of "${ac_tool_prefix}clang", so it can be a program name with args.
5320set dummy ${ac_tool_prefix}clang; ac_word=$2
5321{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5322printf %s "checking for $ac_word... " >&6; }
5323if test ${ac_cv_prog_CC+y}
5324then :
5325  printf %s "(cached) " >&6
5326else $as_nop
5327  if test -n "$CC"; then
5328  ac_cv_prog_CC="$CC" # Let the user override the test.
5329else
5330as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5331for as_dir in $PATH
5332do
5333  IFS=$as_save_IFS
5334  case $as_dir in #(((
5335    '') as_dir=./ ;;
5336    */) ;;
5337    *) as_dir=$as_dir/ ;;
5338  esac
5339    for ac_exec_ext in '' $ac_executable_extensions; do
5340  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
5341    ac_cv_prog_CC="${ac_tool_prefix}clang"
5342    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
5343    break 2
5344  fi
5345done
5346  done
5347IFS=$as_save_IFS
5348
5349fi
5350fi
5351CC=$ac_cv_prog_CC
5352if test -n "$CC"; then
5353  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5354printf "%s\n" "$CC" >&6; }
5355else
5356  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5357printf "%s\n" "no" >&6; }
5358fi
5359
5360
5361fi
5362if test -z "$ac_cv_prog_CC"; then
5363  ac_ct_CC=$CC
5364  # Extract the first word of "clang", so it can be a program name with args.
5365set dummy clang; ac_word=$2
5366{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5367printf %s "checking for $ac_word... " >&6; }
5368if test ${ac_cv_prog_ac_ct_CC+y}
5369then :
5370  printf %s "(cached) " >&6
5371else $as_nop
5372  if test -n "$ac_ct_CC"; then
5373  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
5374else
5375as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5376for as_dir in $PATH
5377do
5378  IFS=$as_save_IFS
5379  case $as_dir in #(((
5380    '') as_dir=./ ;;
5381    */) ;;
5382    *) as_dir=$as_dir/ ;;
5383  esac
5384    for ac_exec_ext in '' $ac_executable_extensions; do
5385  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
5386    ac_cv_prog_ac_ct_CC="clang"
5387    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
5388    break 2
5389  fi
5390done
5391  done
5392IFS=$as_save_IFS
5393
5394fi
5395fi
5396ac_ct_CC=$ac_cv_prog_ac_ct_CC
5397if test -n "$ac_ct_CC"; then
5398  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
5399printf "%s\n" "$ac_ct_CC" >&6; }
5400else
5401  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5402printf "%s\n" "no" >&6; }
5403fi
5404
5405  if test "x$ac_ct_CC" = x; then
5406    CC=""
5407  else
5408    case $cross_compiling:$ac_tool_warned in
5409yes:)
5410{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5411printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5412ac_tool_warned=yes ;;
5413esac
5414    CC=$ac_ct_CC
5415  fi
5416else
5417  CC="$ac_cv_prog_CC"
5418fi
5419
5420fi
5421
5422
5423test -z "$CC" && { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5424printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
5425as_fn_error $? "no acceptable C compiler found in \$PATH
5426See \`config.log' for more details" "$LINENO" 5; }
5427
5428# Provide some information about the compiler.
5429printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
5430set X $ac_compile
5431ac_compiler=$2
5432for ac_option in --version -v -V -qversion -version; do
5433  { { ac_try="$ac_compiler $ac_option >&5"
5434case "(($ac_try" in
5435  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5436  *) ac_try_echo=$ac_try;;
5437esac
5438eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5439printf "%s\n" "$ac_try_echo"; } >&5
5440  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
5441  ac_status=$?
5442  if test -s conftest.err; then
5443    sed '10a\
5444... rest of stderr output deleted ...
5445         10q' conftest.err >conftest.er1
5446    cat conftest.er1 >&5
5447  fi
5448  rm -f conftest.er1 conftest.err
5449  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5450  test $ac_status = 0; }
5451done
5452
5453{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports GNU C" >&5
5454printf %s "checking whether the compiler supports GNU C... " >&6; }
5455if test ${ac_cv_c_compiler_gnu+y}
5456then :
5457  printf %s "(cached) " >&6
5458else $as_nop
5459  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5460/* end confdefs.h.  */
5461
5462int
5463main (void)
5464{
5465#ifndef __GNUC__
5466       choke me
5467#endif
5468
5469  ;
5470  return 0;
5471}
5472_ACEOF
5473if ac_fn_c_try_compile "$LINENO"
5474then :
5475  ac_compiler_gnu=yes
5476else $as_nop
5477  ac_compiler_gnu=no
5478fi
5479rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
5480ac_cv_c_compiler_gnu=$ac_compiler_gnu
5481
5482fi
5483{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
5484printf "%s\n" "$ac_cv_c_compiler_gnu" >&6; }
5485ac_compiler_gnu=$ac_cv_c_compiler_gnu
5486
5487if test $ac_compiler_gnu = yes; then
5488  GCC=yes
5489else
5490  GCC=
5491fi
5492ac_test_CFLAGS=${CFLAGS+y}
5493ac_save_CFLAGS=$CFLAGS
5494{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
5495printf %s "checking whether $CC accepts -g... " >&6; }
5496if test ${ac_cv_prog_cc_g+y}
5497then :
5498  printf %s "(cached) " >&6
5499else $as_nop
5500  ac_save_c_werror_flag=$ac_c_werror_flag
5501   ac_c_werror_flag=yes
5502   ac_cv_prog_cc_g=no
5503   CFLAGS="-g"
5504   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5505/* end confdefs.h.  */
5506
5507int
5508main (void)
5509{
5510
5511  ;
5512  return 0;
5513}
5514_ACEOF
5515if ac_fn_c_try_compile "$LINENO"
5516then :
5517  ac_cv_prog_cc_g=yes
5518else $as_nop
5519  CFLAGS=""
5520      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5521/* end confdefs.h.  */
5522
5523int
5524main (void)
5525{
5526
5527  ;
5528  return 0;
5529}
5530_ACEOF
5531if ac_fn_c_try_compile "$LINENO"
5532then :
5533
5534else $as_nop
5535  ac_c_werror_flag=$ac_save_c_werror_flag
5536	 CFLAGS="-g"
5537	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5538/* end confdefs.h.  */
5539
5540int
5541main (void)
5542{
5543
5544  ;
5545  return 0;
5546}
5547_ACEOF
5548if ac_fn_c_try_compile "$LINENO"
5549then :
5550  ac_cv_prog_cc_g=yes
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
5555fi
5556rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
5557   ac_c_werror_flag=$ac_save_c_werror_flag
5558fi
5559{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
5560printf "%s\n" "$ac_cv_prog_cc_g" >&6; }
5561if test $ac_test_CFLAGS; then
5562  CFLAGS=$ac_save_CFLAGS
5563elif test $ac_cv_prog_cc_g = yes; then
5564  if test "$GCC" = yes; then
5565    CFLAGS="-g -O2"
5566  else
5567    CFLAGS="-g"
5568  fi
5569else
5570  if test "$GCC" = yes; then
5571    CFLAGS="-O2"
5572  else
5573    CFLAGS=
5574  fi
5575fi
5576ac_prog_cc_stdc=no
5577if test x$ac_prog_cc_stdc = xno
5578then :
5579  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C11 features" >&5
5580printf %s "checking for $CC option to enable C11 features... " >&6; }
5581if test ${ac_cv_prog_cc_c11+y}
5582then :
5583  printf %s "(cached) " >&6
5584else $as_nop
5585  ac_cv_prog_cc_c11=no
5586ac_save_CC=$CC
5587cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5588/* end confdefs.h.  */
5589$ac_c_conftest_c11_program
5590_ACEOF
5591for ac_arg in '' -std=gnu11
5592do
5593  CC="$ac_save_CC $ac_arg"
5594  if ac_fn_c_try_compile "$LINENO"
5595then :
5596  ac_cv_prog_cc_c11=$ac_arg
5597fi
5598rm -f core conftest.err conftest.$ac_objext conftest.beam
5599  test "x$ac_cv_prog_cc_c11" != "xno" && break
5600done
5601rm -f conftest.$ac_ext
5602CC=$ac_save_CC
5603fi
5604
5605if test "x$ac_cv_prog_cc_c11" = xno
5606then :
5607  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
5608printf "%s\n" "unsupported" >&6; }
5609else $as_nop
5610  if test "x$ac_cv_prog_cc_c11" = x
5611then :
5612  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
5613printf "%s\n" "none needed" >&6; }
5614else $as_nop
5615  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c11" >&5
5616printf "%s\n" "$ac_cv_prog_cc_c11" >&6; }
5617     CC="$CC $ac_cv_prog_cc_c11"
5618fi
5619  ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c11
5620  ac_prog_cc_stdc=c11
5621fi
5622fi
5623if test x$ac_prog_cc_stdc = xno
5624then :
5625  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C99 features" >&5
5626printf %s "checking for $CC option to enable C99 features... " >&6; }
5627if test ${ac_cv_prog_cc_c99+y}
5628then :
5629  printf %s "(cached) " >&6
5630else $as_nop
5631  ac_cv_prog_cc_c99=no
5632ac_save_CC=$CC
5633cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5634/* end confdefs.h.  */
5635$ac_c_conftest_c99_program
5636_ACEOF
5637for ac_arg in '' -std=gnu99 -std=c99 -c99 -qlanglvl=extc1x -qlanglvl=extc99 -AC99 -D_STDC_C99=
5638do
5639  CC="$ac_save_CC $ac_arg"
5640  if ac_fn_c_try_compile "$LINENO"
5641then :
5642  ac_cv_prog_cc_c99=$ac_arg
5643fi
5644rm -f core conftest.err conftest.$ac_objext conftest.beam
5645  test "x$ac_cv_prog_cc_c99" != "xno" && break
5646done
5647rm -f conftest.$ac_ext
5648CC=$ac_save_CC
5649fi
5650
5651if test "x$ac_cv_prog_cc_c99" = xno
5652then :
5653  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
5654printf "%s\n" "unsupported" >&6; }
5655else $as_nop
5656  if test "x$ac_cv_prog_cc_c99" = x
5657then :
5658  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
5659printf "%s\n" "none needed" >&6; }
5660else $as_nop
5661  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5
5662printf "%s\n" "$ac_cv_prog_cc_c99" >&6; }
5663     CC="$CC $ac_cv_prog_cc_c99"
5664fi
5665  ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99
5666  ac_prog_cc_stdc=c99
5667fi
5668fi
5669if test x$ac_prog_cc_stdc = xno
5670then :
5671  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C89 features" >&5
5672printf %s "checking for $CC option to enable C89 features... " >&6; }
5673if test ${ac_cv_prog_cc_c89+y}
5674then :
5675  printf %s "(cached) " >&6
5676else $as_nop
5677  ac_cv_prog_cc_c89=no
5678ac_save_CC=$CC
5679cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5680/* end confdefs.h.  */
5681$ac_c_conftest_c89_program
5682_ACEOF
5683for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
5684do
5685  CC="$ac_save_CC $ac_arg"
5686  if ac_fn_c_try_compile "$LINENO"
5687then :
5688  ac_cv_prog_cc_c89=$ac_arg
5689fi
5690rm -f core conftest.err conftest.$ac_objext conftest.beam
5691  test "x$ac_cv_prog_cc_c89" != "xno" && break
5692done
5693rm -f conftest.$ac_ext
5694CC=$ac_save_CC
5695fi
5696
5697if test "x$ac_cv_prog_cc_c89" = xno
5698then :
5699  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
5700printf "%s\n" "unsupported" >&6; }
5701else $as_nop
5702  if test "x$ac_cv_prog_cc_c89" = x
5703then :
5704  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
5705printf "%s\n" "none needed" >&6; }
5706else $as_nop
5707  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
5708printf "%s\n" "$ac_cv_prog_cc_c89" >&6; }
5709     CC="$CC $ac_cv_prog_cc_c89"
5710fi
5711  ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89
5712  ac_prog_cc_stdc=c89
5713fi
5714fi
5715
5716ac_ext=c
5717ac_cpp='$CPP $CPPFLAGS'
5718ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5719ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5720ac_compiler_gnu=$ac_cv_c_compiler_gnu
5721
5722
5723{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking $CC dependency flag" >&5
5724printf %s "checking $CC dependency flag... " >&6; }
5725echo 'void f(void){}' >conftest.c
5726if test "`$CC -MM conftest.c 2>&1`" = "conftest.o: conftest.c"; then
5727	DEPFLAG="-MM"
5728else
5729  if test "`$CC -xM1 conftest.c 2>&1`" = "conftest.o: conftest.c"; then
5730	DEPFLAG="-xM1"
5731  else
5732	DEPFLAG="-MM"  # dunno do something
5733  fi
5734fi
5735{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $DEPFLAG" >&5
5736printf "%s\n" "$DEPFLAG" >&6; }
5737rm -f conftest.c
5738
5739
5740
5741
5742
5743{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Werror" >&5
5744printf %s "checking whether $CC supports -Werror... " >&6; }
5745cache=`echo Werror | sed 'y%.=/+-%___p_%'`
5746if eval test \${cv_prog_cc_flag_$cache+y}
5747then :
5748  printf %s "(cached) " >&6
5749else $as_nop
5750
5751echo 'void f(void){}' >conftest.c
5752if test -z "`$CC $CPPFLAGS $CFLAGS -Werror -c conftest.c 2>&1`"; then
5753eval "cv_prog_cc_flag_$cache=yes"
5754else
5755eval "cv_prog_cc_flag_$cache=no"
5756fi
5757rm -f conftest conftest.o conftest.c
5758
5759fi
5760
5761if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
5762{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5763printf "%s\n" "yes" >&6; }
5764:
5765ERRFLAG="-Werror"
5766else
5767{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5768printf "%s\n" "no" >&6; }
5769:
5770ERRFLAG="-errwarn"
5771fi
5772
5773
5774
5775{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wall" >&5
5776printf %s "checking whether $CC supports -Wall... " >&6; }
5777cache=`echo Wall | sed 'y%.=/+-%___p_%'`
5778if eval test \${cv_prog_cc_flag_$cache+y}
5779then :
5780  printf %s "(cached) " >&6
5781else $as_nop
5782
5783echo 'void f(void){}' >conftest.c
5784if test -z "`$CC $CPPFLAGS $CFLAGS -Wall -c conftest.c 2>&1`"; then
5785eval "cv_prog_cc_flag_$cache=yes"
5786else
5787eval "cv_prog_cc_flag_$cache=no"
5788fi
5789rm -f conftest conftest.o conftest.c
5790
5791fi
5792
5793if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
5794{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5795printf "%s\n" "yes" >&6; }
5796:
5797ERRFLAG="$ERRFLAG -Wall"
5798else
5799{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5800printf "%s\n" "no" >&6; }
5801:
5802ERRFLAG="$ERRFLAG -errfmt"
5803fi
5804
5805
5806
5807
5808
5809{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -std=c99" >&5
5810printf %s "checking whether $CC supports -std=c99... " >&6; }
5811cache=`echo std=c99 | sed 'y%.=/+-%___p_%'`
5812if eval test \${cv_prog_cc_flag_$cache+y}
5813then :
5814  printf %s "(cached) " >&6
5815else $as_nop
5816
5817echo 'void f(void){}' >conftest.c
5818if test -z "`$CC $CPPFLAGS $CFLAGS -std=c99 -c conftest.c 2>&1`"; then
5819eval "cv_prog_cc_flag_$cache=yes"
5820else
5821eval "cv_prog_cc_flag_$cache=no"
5822fi
5823rm -f conftest conftest.o conftest.c
5824
5825fi
5826
5827if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
5828{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5829printf "%s\n" "yes" >&6; }
5830:
5831C99FLAG="-std=c99"
5832else
5833{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5834printf "%s\n" "no" >&6; }
5835:
5836
5837fi
5838
5839
5840
5841{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -xc99" >&5
5842printf %s "checking whether $CC supports -xc99... " >&6; }
5843cache=`echo xc99 | sed 'y%.=/+-%___p_%'`
5844if eval test \${cv_prog_cc_flag_$cache+y}
5845then :
5846  printf %s "(cached) " >&6
5847else $as_nop
5848
5849echo 'void f(void){}' >conftest.c
5850if test -z "`$CC $CPPFLAGS $CFLAGS -xc99 -c conftest.c 2>&1`"; then
5851eval "cv_prog_cc_flag_$cache=yes"
5852else
5853eval "cv_prog_cc_flag_$cache=no"
5854fi
5855rm -f conftest conftest.o conftest.c
5856
5857fi
5858
5859if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
5860{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5861printf "%s\n" "yes" >&6; }
5862:
5863C99FLAG="-xc99"
5864else
5865{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5866printf "%s\n" "no" >&6; }
5867:
5868
5869fi
5870
5871
5872ac_fn_c_check_header_compile "$LINENO" "getopt.h" "ac_cv_header_getopt_h" "$ac_includes_default
5873"
5874if test "x$ac_cv_header_getopt_h" = xyes
5875then :
5876  printf "%s\n" "#define HAVE_GETOPT_H 1" >>confdefs.h
5877
5878fi
5879ac_fn_c_check_header_compile "$LINENO" "time.h" "ac_cv_header_time_h" "$ac_includes_default
5880"
5881if test "x$ac_cv_header_time_h" = xyes
5882then :
5883  printf "%s\n" "#define HAVE_TIME_H 1" >>confdefs.h
5884
5885fi
5886
5887
5888
5889
5890
5891{ 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
5892printf %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; }
5893cache=`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`
5894if eval test \${cv_prog_cc_flag_needed_$cache+y}
5895then :
5896  printf %s "(cached) " >&6
5897else $as_nop
5898
5899echo '
5900#include "confdefs.h"
5901#include <stdlib.h>
5902#include <ctype.h>
5903#include <sys/time.h>
5904#ifdef HAVE_TIME_H
5905#include <time.h>
5906#endif
5907#include <unistd.h>
5908#include <netdb.h>
5909#ifdef HAVE_GETOPT_H
5910#include <getopt.h>
5911#endif
5912
5913int test(void) {
5914	int a;
5915	char **opts = NULL;
5916	struct timeval tv;
5917	char *t;
5918	time_t time = 0;
5919	char *buf = NULL;
5920	const char* str = NULL;
5921	struct msghdr msg;
5922	msg.msg_control = 0;
5923	t = ctime_r(&time, buf);
5924	tv.tv_usec = 10;
5925	srandom(32);
5926	a = getopt(2, opts, "a");
5927	a = isascii(32);
5928	str = gai_strerror(0);
5929	if(str && t && tv.tv_usec && msg.msg_control)
5930		a = 0;
5931	return a;
5932}
5933' > conftest.c
5934echo 'void f(void){}' >>conftest.c
5935if test -z "`$CC $CPPFLAGS $CFLAGS $ERRFLAG -c conftest.c 2>&1`"; then
5936eval "cv_prog_cc_flag_needed_$cache=no"
5937else
5938
5939if 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
5940eval "cv_prog_cc_flag_needed_$cache=yes"
5941else
5942eval "cv_prog_cc_flag_needed_$cache=fail"
5943#echo 'Test with flag fails too!'
5944#cat conftest.c
5945#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"
5946#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`
5947#exit 1
5948fi
5949
5950fi
5951rm -f conftest conftest.c conftest.o
5952
5953fi
5954
5955if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = yes"; then
5956{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5957printf "%s\n" "yes" >&6; }
5958:
5959CFLAGS="$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"
5960else
5961if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = no"; then
5962{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5963printf "%s\n" "no" >&6; }
5964#echo 'Test with flag is no!'
5965#cat conftest.c
5966#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"
5967#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`
5968#exit 1
5969:
5970
5971else
5972{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: failed" >&5
5973printf "%s\n" "failed" >&6; }
5974:
5975
5976fi
5977fi
5978
5979
5980
5981
5982
5983{ 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
5984printf %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; }
5985cache=`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`
5986if eval test \${cv_prog_cc_flag_needed_$cache+y}
5987then :
5988  printf %s "(cached) " >&6
5989else $as_nop
5990
5991echo '
5992#include "confdefs.h"
5993#include <stdlib.h>
5994#include <ctype.h>
5995#include <sys/time.h>
5996#ifdef HAVE_TIME_H
5997#include <time.h>
5998#endif
5999#include <unistd.h>
6000#include <netdb.h>
6001#ifdef HAVE_GETOPT_H
6002#include <getopt.h>
6003#endif
6004
6005int test(void) {
6006	int a;
6007	char **opts = NULL;
6008	struct timeval tv;
6009	char *t;
6010	time_t time = 0;
6011	char *buf = NULL;
6012	const char* str = NULL;
6013	struct msghdr msg;
6014	msg.msg_control = 0;
6015	t = ctime_r(&time, buf);
6016	tv.tv_usec = 10;
6017	srandom(32);
6018	a = getopt(2, opts, "a");
6019	a = isascii(32);
6020	str = gai_strerror(0);
6021	if(str && t && tv.tv_usec && msg.msg_control)
6022		a = 0;
6023	return a;
6024}
6025' > conftest.c
6026echo 'void f(void){}' >>conftest.c
6027if test -z "`$CC $CPPFLAGS $CFLAGS $ERRFLAG -c conftest.c 2>&1`"; then
6028eval "cv_prog_cc_flag_needed_$cache=no"
6029else
6030
6031if 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
6032eval "cv_prog_cc_flag_needed_$cache=yes"
6033else
6034eval "cv_prog_cc_flag_needed_$cache=fail"
6035#echo 'Test with flag fails too!'
6036#cat conftest.c
6037#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"
6038#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`
6039#exit 1
6040fi
6041
6042fi
6043rm -f conftest conftest.c conftest.o
6044
6045fi
6046
6047if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = yes"; then
6048{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6049printf "%s\n" "yes" >&6; }
6050:
6051CFLAGS="$CFLAGS $C99FLAG -D__EXTENSIONS__ -D_BSD_SOURCE -D_DEFAULT_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -D_ALL_SOURCE"
6052else
6053if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = no"; then
6054{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6055printf "%s\n" "no" >&6; }
6056#echo 'Test with flag is no!'
6057#cat conftest.c
6058#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"
6059#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`
6060#exit 1
6061:
6062
6063else
6064{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: failed" >&5
6065printf "%s\n" "failed" >&6; }
6066:
6067
6068fi
6069fi
6070
6071
6072
6073
6074
6075{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we need $C99FLAG as a flag for $CC" >&5
6076printf %s "checking whether we need $C99FLAG as a flag for $CC... " >&6; }
6077cache=`printf "%s\n" "$C99FLAG" | $as_tr_sh`
6078if eval test \${cv_prog_cc_flag_needed_$cache+y}
6079then :
6080  printf %s "(cached) " >&6
6081else $as_nop
6082
6083echo '
6084#include <stdbool.h>
6085#include <ctype.h>
6086int test(void) {
6087        int a = 0;
6088        return a;
6089}
6090' > conftest.c
6091echo 'void f(void){}' >>conftest.c
6092if test -z "`$CC $CPPFLAGS $CFLAGS $ERRFLAG -c conftest.c 2>&1`"; then
6093eval "cv_prog_cc_flag_needed_$cache=no"
6094else
6095
6096if test -z "`$CC $CPPFLAGS $CFLAGS $C99FLAG $ERRFLAG -c conftest.c 2>&1`"; then
6097eval "cv_prog_cc_flag_needed_$cache=yes"
6098else
6099eval "cv_prog_cc_flag_needed_$cache=fail"
6100#echo 'Test with flag fails too!'
6101#cat conftest.c
6102#echo "$CC $CPPFLAGS $CFLAGS $C99FLAG $ERRFLAG -c conftest.c 2>&1"
6103#echo `$CC $CPPFLAGS $CFLAGS $C99FLAG $ERRFLAG -c conftest.c 2>&1`
6104#exit 1
6105fi
6106
6107fi
6108rm -f conftest conftest.c conftest.o
6109
6110fi
6111
6112if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = yes"; then
6113{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6114printf "%s\n" "yes" >&6; }
6115:
6116CFLAGS="$CFLAGS $C99FLAG"
6117else
6118if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = no"; then
6119{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6120printf "%s\n" "no" >&6; }
6121#echo 'Test with flag is no!'
6122#cat conftest.c
6123#echo "$CC $CPPFLAGS $CFLAGS $C99FLAG $ERRFLAG -c conftest.c 2>&1"
6124#echo `$CC $CPPFLAGS $CFLAGS $C99FLAG $ERRFLAG -c conftest.c 2>&1`
6125#exit 1
6126:
6127
6128else
6129{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: failed" >&5
6130printf "%s\n" "failed" >&6; }
6131:
6132
6133fi
6134fi
6135
6136
6137
6138
6139
6140{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we need -D_BSD_SOURCE -D_DEFAULT_SOURCE as a flag for $CC" >&5
6141printf %s "checking whether we need -D_BSD_SOURCE -D_DEFAULT_SOURCE as a flag for $CC... " >&6; }
6142cache=_D_BSD_SOURCE__D_DEFAULT_SOURCE
6143if eval test \${cv_prog_cc_flag_needed_$cache+y}
6144then :
6145  printf %s "(cached) " >&6
6146else $as_nop
6147
6148echo '
6149#include <ctype.h>
6150
6151int test(void) {
6152        int a;
6153        a = isascii(32);
6154        return a;
6155}
6156' > conftest.c
6157echo 'void f(void){}' >>conftest.c
6158if test -z "`$CC $CPPFLAGS $CFLAGS $ERRFLAG -c conftest.c 2>&1`"; then
6159eval "cv_prog_cc_flag_needed_$cache=no"
6160else
6161
6162if test -z "`$CC $CPPFLAGS $CFLAGS -D_BSD_SOURCE -D_DEFAULT_SOURCE $ERRFLAG -c conftest.c 2>&1`"; then
6163eval "cv_prog_cc_flag_needed_$cache=yes"
6164else
6165eval "cv_prog_cc_flag_needed_$cache=fail"
6166#echo 'Test with flag fails too!'
6167#cat conftest.c
6168#echo "$CC $CPPFLAGS $CFLAGS -D_BSD_SOURCE -D_DEFAULT_SOURCE $ERRFLAG -c conftest.c 2>&1"
6169#echo `$CC $CPPFLAGS $CFLAGS -D_BSD_SOURCE -D_DEFAULT_SOURCE $ERRFLAG -c conftest.c 2>&1`
6170#exit 1
6171fi
6172
6173fi
6174rm -f conftest conftest.c conftest.o
6175
6176fi
6177
6178if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = yes"; then
6179{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6180printf "%s\n" "yes" >&6; }
6181:
6182CFLAGS="$CFLAGS -D_BSD_SOURCE -D_DEFAULT_SOURCE"
6183else
6184if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = no"; then
6185{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6186printf "%s\n" "no" >&6; }
6187#echo 'Test with flag is no!'
6188#cat conftest.c
6189#echo "$CC $CPPFLAGS $CFLAGS -D_BSD_SOURCE -D_DEFAULT_SOURCE $ERRFLAG -c conftest.c 2>&1"
6190#echo `$CC $CPPFLAGS $CFLAGS -D_BSD_SOURCE -D_DEFAULT_SOURCE $ERRFLAG -c conftest.c 2>&1`
6191#exit 1
6192:
6193
6194else
6195{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: failed" >&5
6196printf "%s\n" "failed" >&6; }
6197:
6198
6199fi
6200fi
6201
6202
6203
6204
6205
6206{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we need -D_GNU_SOURCE as a flag for $CC" >&5
6207printf %s "checking whether we need -D_GNU_SOURCE as a flag for $CC... " >&6; }
6208cache=_D_GNU_SOURCE
6209if eval test \${cv_prog_cc_flag_needed_$cache+y}
6210then :
6211  printf %s "(cached) " >&6
6212else $as_nop
6213
6214echo '
6215#include <netinet/in.h>
6216
6217int test(void) {
6218        struct in6_pktinfo inf;
6219	int a = (int)sizeof(inf);
6220        return a;
6221}
6222' > conftest.c
6223echo 'void f(void){}' >>conftest.c
6224if test -z "`$CC $CPPFLAGS $CFLAGS $ERRFLAG -c conftest.c 2>&1`"; then
6225eval "cv_prog_cc_flag_needed_$cache=no"
6226else
6227
6228if test -z "`$CC $CPPFLAGS $CFLAGS -D_GNU_SOURCE $ERRFLAG -c conftest.c 2>&1`"; then
6229eval "cv_prog_cc_flag_needed_$cache=yes"
6230else
6231eval "cv_prog_cc_flag_needed_$cache=fail"
6232#echo 'Test with flag fails too!'
6233#cat conftest.c
6234#echo "$CC $CPPFLAGS $CFLAGS -D_GNU_SOURCE $ERRFLAG -c conftest.c 2>&1"
6235#echo `$CC $CPPFLAGS $CFLAGS -D_GNU_SOURCE $ERRFLAG -c conftest.c 2>&1`
6236#exit 1
6237fi
6238
6239fi
6240rm -f conftest conftest.c conftest.o
6241
6242fi
6243
6244if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = yes"; then
6245{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6246printf "%s\n" "yes" >&6; }
6247:
6248CFLAGS="$CFLAGS -D_GNU_SOURCE"
6249else
6250if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = no"; then
6251{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6252printf "%s\n" "no" >&6; }
6253#echo 'Test with flag is no!'
6254#cat conftest.c
6255#echo "$CC $CPPFLAGS $CFLAGS -D_GNU_SOURCE $ERRFLAG -c conftest.c 2>&1"
6256#echo `$CC $CPPFLAGS $CFLAGS -D_GNU_SOURCE $ERRFLAG -c conftest.c 2>&1`
6257#exit 1
6258:
6259
6260else
6261{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: failed" >&5
6262printf "%s\n" "failed" >&6; }
6263:
6264
6265fi
6266fi
6267
6268
6269# check again for GNU_SOURCE for setresgid. May fail if setresgid
6270# is not available at all. -D_FRSRESGID is to make this check unique.
6271# otherwise we would get the previous cached result.
6272
6273
6274
6275{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we need -D_GNU_SOURCE -D_FRSRESGID as a flag for $CC" >&5
6276printf %s "checking whether we need -D_GNU_SOURCE -D_FRSRESGID as a flag for $CC... " >&6; }
6277cache=_D_GNU_SOURCE__D_FRSRESGID
6278if eval test \${cv_prog_cc_flag_needed_$cache+y}
6279then :
6280  printf %s "(cached) " >&6
6281else $as_nop
6282
6283echo '
6284#include <unistd.h>
6285
6286int test(void) {
6287	int a = setresgid(0,0,0);
6288	a = setresuid(0,0,0);
6289        return a;
6290}
6291' > conftest.c
6292echo 'void f(void){}' >>conftest.c
6293if test -z "`$CC $CPPFLAGS $CFLAGS $ERRFLAG -c conftest.c 2>&1`"; then
6294eval "cv_prog_cc_flag_needed_$cache=no"
6295else
6296
6297if test -z "`$CC $CPPFLAGS $CFLAGS -D_GNU_SOURCE -D_FRSRESGID $ERRFLAG -c conftest.c 2>&1`"; then
6298eval "cv_prog_cc_flag_needed_$cache=yes"
6299else
6300eval "cv_prog_cc_flag_needed_$cache=fail"
6301#echo 'Test with flag fails too!'
6302#cat conftest.c
6303#echo "$CC $CPPFLAGS $CFLAGS -D_GNU_SOURCE -D_FRSRESGID $ERRFLAG -c conftest.c 2>&1"
6304#echo `$CC $CPPFLAGS $CFLAGS -D_GNU_SOURCE -D_FRSRESGID $ERRFLAG -c conftest.c 2>&1`
6305#exit 1
6306fi
6307
6308fi
6309rm -f conftest conftest.c conftest.o
6310
6311fi
6312
6313if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = yes"; then
6314{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6315printf "%s\n" "yes" >&6; }
6316:
6317CFLAGS="$CFLAGS -D_GNU_SOURCE"
6318else
6319if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = no"; then
6320{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6321printf "%s\n" "no" >&6; }
6322#echo 'Test with flag is no!'
6323#cat conftest.c
6324#echo "$CC $CPPFLAGS $CFLAGS -D_GNU_SOURCE -D_FRSRESGID $ERRFLAG -c conftest.c 2>&1"
6325#echo `$CC $CPPFLAGS $CFLAGS -D_GNU_SOURCE -D_FRSRESGID $ERRFLAG -c conftest.c 2>&1`
6326#exit 1
6327:
6328
6329else
6330{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: failed" >&5
6331printf "%s\n" "failed" >&6; }
6332:
6333
6334fi
6335fi
6336
6337
6338
6339
6340
6341{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we need -D_POSIX_C_SOURCE=200112 as a flag for $CC" >&5
6342printf %s "checking whether we need -D_POSIX_C_SOURCE=200112 as a flag for $CC... " >&6; }
6343cache=_D_POSIX_C_SOURCE_200112
6344if eval test \${cv_prog_cc_flag_needed_$cache+y}
6345then :
6346  printf %s "(cached) " >&6
6347else $as_nop
6348
6349echo '
6350#include "confdefs.h"
6351#ifdef HAVE_TIME_H
6352#include <time.h>
6353#endif
6354#include <netdb.h>
6355
6356int test(void) {
6357        int a = 0;
6358        char *t;
6359        time_t time = 0;
6360        char *buf = NULL;
6361	const char* str = NULL;
6362        t = ctime_r(&time, buf);
6363	str = gai_strerror(0);
6364	if(t && str)
6365		a = 0;
6366        return a;
6367}
6368' > conftest.c
6369echo 'void f(void){}' >>conftest.c
6370if test -z "`$CC $CPPFLAGS $CFLAGS $ERRFLAG -c conftest.c 2>&1`"; then
6371eval "cv_prog_cc_flag_needed_$cache=no"
6372else
6373
6374if test -z "`$CC $CPPFLAGS $CFLAGS -D_POSIX_C_SOURCE=200112 $ERRFLAG -c conftest.c 2>&1`"; then
6375eval "cv_prog_cc_flag_needed_$cache=yes"
6376else
6377eval "cv_prog_cc_flag_needed_$cache=fail"
6378#echo 'Test with flag fails too!'
6379#cat conftest.c
6380#echo "$CC $CPPFLAGS $CFLAGS -D_POSIX_C_SOURCE=200112 $ERRFLAG -c conftest.c 2>&1"
6381#echo `$CC $CPPFLAGS $CFLAGS -D_POSIX_C_SOURCE=200112 $ERRFLAG -c conftest.c 2>&1`
6382#exit 1
6383fi
6384
6385fi
6386rm -f conftest conftest.c conftest.o
6387
6388fi
6389
6390if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = yes"; then
6391{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6392printf "%s\n" "yes" >&6; }
6393:
6394CFLAGS="$CFLAGS -D_POSIX_C_SOURCE=200112"
6395else
6396if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = no"; then
6397{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6398printf "%s\n" "no" >&6; }
6399#echo 'Test with flag is no!'
6400#cat conftest.c
6401#echo "$CC $CPPFLAGS $CFLAGS -D_POSIX_C_SOURCE=200112 $ERRFLAG -c conftest.c 2>&1"
6402#echo `$CC $CPPFLAGS $CFLAGS -D_POSIX_C_SOURCE=200112 $ERRFLAG -c conftest.c 2>&1`
6403#exit 1
6404:
6405
6406else
6407{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: failed" >&5
6408printf "%s\n" "failed" >&6; }
6409:
6410
6411fi
6412fi
6413
6414
6415
6416
6417
6418{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we need -D__EXTENSIONS__ as a flag for $CC" >&5
6419printf %s "checking whether we need -D__EXTENSIONS__ as a flag for $CC... " >&6; }
6420cache=_D__EXTENSIONS__
6421if eval test \${cv_prog_cc_flag_needed_$cache+y}
6422then :
6423  printf %s "(cached) " >&6
6424else $as_nop
6425
6426echo '
6427#include "confdefs.h"
6428#include <stdlib.h>
6429#include <ctype.h>
6430#include <sys/time.h>
6431#ifdef HAVE_TIME_H
6432#include <time.h>
6433#endif
6434#include <unistd.h>
6435#ifdef HAVE_GETOPT_H
6436#include <getopt.h>
6437#endif
6438
6439int test(void) {
6440        int a;
6441        char **opts = NULL;
6442        struct timeval tv;
6443        tv.tv_usec = 10;
6444        srandom(32);
6445        a = getopt(2, opts, "a");
6446        a = isascii(32);
6447	if(tv.tv_usec)
6448		a = 0;
6449        return a;
6450}
6451' > conftest.c
6452echo 'void f(void){}' >>conftest.c
6453if test -z "`$CC $CPPFLAGS $CFLAGS $ERRFLAG -c conftest.c 2>&1`"; then
6454eval "cv_prog_cc_flag_needed_$cache=no"
6455else
6456
6457if test -z "`$CC $CPPFLAGS $CFLAGS -D__EXTENSIONS__ $ERRFLAG -c conftest.c 2>&1`"; then
6458eval "cv_prog_cc_flag_needed_$cache=yes"
6459else
6460eval "cv_prog_cc_flag_needed_$cache=fail"
6461#echo 'Test with flag fails too!'
6462#cat conftest.c
6463#echo "$CC $CPPFLAGS $CFLAGS -D__EXTENSIONS__ $ERRFLAG -c conftest.c 2>&1"
6464#echo `$CC $CPPFLAGS $CFLAGS -D__EXTENSIONS__ $ERRFLAG -c conftest.c 2>&1`
6465#exit 1
6466fi
6467
6468fi
6469rm -f conftest conftest.c conftest.o
6470
6471fi
6472
6473if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = yes"; then
6474{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6475printf "%s\n" "yes" >&6; }
6476:
6477CFLAGS="$CFLAGS -D__EXTENSIONS__"
6478else
6479if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = no"; then
6480{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6481printf "%s\n" "no" >&6; }
6482#echo 'Test with flag is no!'
6483#cat conftest.c
6484#echo "$CC $CPPFLAGS $CFLAGS -D__EXTENSIONS__ $ERRFLAG -c conftest.c 2>&1"
6485#echo `$CC $CPPFLAGS $CFLAGS -D__EXTENSIONS__ $ERRFLAG -c conftest.c 2>&1`
6486#exit 1
6487:
6488
6489else
6490{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: failed" >&5
6491printf "%s\n" "failed" >&6; }
6492:
6493
6494fi
6495fi
6496
6497
6498
6499
6500# debug mode flags warnings
6501# Check whether --enable-checking was given.
6502if test ${enable_checking+y}
6503then :
6504  enableval=$enable_checking;
6505fi
6506
6507# Check whether --enable-debug was given.
6508if test ${enable_debug+y}
6509then :
6510  enableval=$enable_debug;
6511fi
6512
6513if test "$enable_debug" = "yes"; then debug_enabled="$enable_debug";
6514else debug_enabled="$enable_checking"; fi
6515
6516case "$debug_enabled" in
6517        yes)
6518
6519
6520{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -W" >&5
6521printf %s "checking whether $CC supports -W... " >&6; }
6522cache=`echo W | sed 'y%.=/+-%___p_%'`
6523if eval test \${cv_prog_cc_flag_$cache+y}
6524then :
6525  printf %s "(cached) " >&6
6526else $as_nop
6527
6528echo 'void f(void){}' >conftest.c
6529if test -z "`$CC $CPPFLAGS $CFLAGS -W -c conftest.c 2>&1`"; then
6530eval "cv_prog_cc_flag_$cache=yes"
6531else
6532eval "cv_prog_cc_flag_$cache=no"
6533fi
6534rm -f conftest conftest.o conftest.c
6535
6536fi
6537
6538if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
6539{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6540printf "%s\n" "yes" >&6; }
6541:
6542CFLAGS="$CFLAGS -W"
6543else
6544{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6545printf "%s\n" "no" >&6; }
6546:
6547
6548fi
6549
6550
6551
6552{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wall" >&5
6553printf %s "checking whether $CC supports -Wall... " >&6; }
6554cache=`echo Wall | sed 'y%.=/+-%___p_%'`
6555if eval test \${cv_prog_cc_flag_$cache+y}
6556then :
6557  printf %s "(cached) " >&6
6558else $as_nop
6559
6560echo 'void f(void){}' >conftest.c
6561if test -z "`$CC $CPPFLAGS $CFLAGS -Wall -c conftest.c 2>&1`"; then
6562eval "cv_prog_cc_flag_$cache=yes"
6563else
6564eval "cv_prog_cc_flag_$cache=no"
6565fi
6566rm -f conftest conftest.o conftest.c
6567
6568fi
6569
6570if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
6571{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6572printf "%s\n" "yes" >&6; }
6573:
6574CFLAGS="$CFLAGS -Wall"
6575else
6576{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6577printf "%s\n" "no" >&6; }
6578:
6579
6580fi
6581
6582
6583
6584{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wextra" >&5
6585printf %s "checking whether $CC supports -Wextra... " >&6; }
6586cache=`echo Wextra | sed 'y%.=/+-%___p_%'`
6587if eval test \${cv_prog_cc_flag_$cache+y}
6588then :
6589  printf %s "(cached) " >&6
6590else $as_nop
6591
6592echo 'void f(void){}' >conftest.c
6593if test -z "`$CC $CPPFLAGS $CFLAGS -Wextra -c conftest.c 2>&1`"; then
6594eval "cv_prog_cc_flag_$cache=yes"
6595else
6596eval "cv_prog_cc_flag_$cache=no"
6597fi
6598rm -f conftest conftest.o conftest.c
6599
6600fi
6601
6602if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
6603{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6604printf "%s\n" "yes" >&6; }
6605:
6606CFLAGS="$CFLAGS -Wextra"
6607else
6608{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6609printf "%s\n" "no" >&6; }
6610:
6611
6612fi
6613
6614
6615
6616{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wdeclaration-after-statement" >&5
6617printf %s "checking whether $CC supports -Wdeclaration-after-statement... " >&6; }
6618cache=`echo Wdeclaration-after-statement | sed 'y%.=/+-%___p_%'`
6619if eval test \${cv_prog_cc_flag_$cache+y}
6620then :
6621  printf %s "(cached) " >&6
6622else $as_nop
6623
6624echo 'void f(void){}' >conftest.c
6625if test -z "`$CC $CPPFLAGS $CFLAGS -Wdeclaration-after-statement -c conftest.c 2>&1`"; then
6626eval "cv_prog_cc_flag_$cache=yes"
6627else
6628eval "cv_prog_cc_flag_$cache=no"
6629fi
6630rm -f conftest conftest.o conftest.c
6631
6632fi
6633
6634if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
6635{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6636printf "%s\n" "yes" >&6; }
6637:
6638CFLAGS="$CFLAGS -Wdeclaration-after-statement"
6639else
6640{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6641printf "%s\n" "no" >&6; }
6642:
6643
6644fi
6645
6646
6647printf "%s\n" "#define UNBOUND_DEBUG /**/" >>confdefs.h
6648
6649		;;
6650	no|*)
6651		# nothing to do.
6652		;;
6653esac
6654if test "$default_cflags" = "yes"; then
6655	# only when CFLAGS was "" at the start, if the users wants to
6656	# override we shouldn't add default cflags, because they wouldn't
6657	# be able to turn off these options and set the CFLAGS wanted.
6658
6659    # Check whether --enable-flto was given.
6660if test ${enable_flto+y}
6661then :
6662  enableval=$enable_flto;
6663fi
6664
6665    if test "x$enable_flto" != "xno"
6666then :
6667
6668        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -flto" >&5
6669printf %s "checking if $CC supports -flto... " >&6; }
6670        BAKCFLAGS="$CFLAGS"
6671        CFLAGS="$CFLAGS -flto"
6672        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6673/* end confdefs.h.  */
6674
6675int
6676main (void)
6677{
6678
6679  ;
6680  return 0;
6681}
6682_ACEOF
6683if ac_fn_c_try_link "$LINENO"
6684then :
6685
6686            if $CC $CFLAGS -o conftest conftest.c 2>&1 | $GREP -e "warning: no debug symbols in executable" -e "warning: object" >/dev/null; then
6687                CFLAGS="$BAKCFLAGS"
6688                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6689printf "%s\n" "no" >&6; }
6690            else
6691                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6692printf "%s\n" "yes" >&6; }
6693            fi
6694            rm -f conftest conftest.c conftest.o
6695
6696else $as_nop
6697  CFLAGS="$BAKCFLAGS" ; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6698printf "%s\n" "no" >&6; }
6699fi
6700rm -f core conftest.err conftest.$ac_objext conftest.beam \
6701    conftest$ac_exeext conftest.$ac_ext
6702
6703fi
6704
6705
6706    # Check whether --enable-pie was given.
6707if test ${enable_pie+y}
6708then :
6709  enableval=$enable_pie;
6710fi
6711
6712    if test "x$enable_pie" = "xyes"
6713then :
6714
6715	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports PIE" >&5
6716printf %s "checking if $CC supports PIE... " >&6; }
6717	BAKLDFLAGS="$LDFLAGS"
6718	BAKCFLAGS="$CFLAGS"
6719	LDFLAGS="$LDFLAGS -pie"
6720	CFLAGS="$CFLAGS -fPIE"
6721	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6722/* end confdefs.h.  */
6723
6724int
6725main (void)
6726{
6727
6728  ;
6729  return 0;
6730}
6731_ACEOF
6732if ac_fn_c_try_link "$LINENO"
6733then :
6734
6735	    if $CC $CFLAGS $LDFLAGS -o conftest conftest.c 2>&1 | grep "warning: no debug symbols in executable" >/dev/null; then
6736		LDFLAGS="$BAKLDFLAGS"
6737		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6738printf "%s\n" "no" >&6; }
6739	    else
6740		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6741printf "%s\n" "yes" >&6; }
6742	    fi
6743	    rm -f conftest conftest.c conftest.o
6744
6745else $as_nop
6746  LDFLAGS="$BAKLDFLAGS" ; CFLAGS="$BAKCFLAGS" ; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6747printf "%s\n" "no" >&6; }
6748fi
6749rm -f core conftest.err conftest.$ac_objext conftest.beam \
6750    conftest$ac_exeext conftest.$ac_ext
6751
6752fi
6753
6754
6755    # Check whether --enable-relro_now was given.
6756if test ${enable_relro_now+y}
6757then :
6758  enableval=$enable_relro_now;
6759fi
6760
6761    if test "x$enable_relro_now" = "xyes"
6762then :
6763
6764	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wl,-z,relro,-z,now" >&5
6765printf %s "checking if $CC supports -Wl,-z,relro,-z,now... " >&6; }
6766	BAKLDFLAGS="$LDFLAGS"
6767	LDFLAGS="$LDFLAGS -Wl,-z,relro,-z,now"
6768	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6769/* end confdefs.h.  */
6770
6771int
6772main (void)
6773{
6774
6775  ;
6776  return 0;
6777}
6778_ACEOF
6779if ac_fn_c_try_link "$LINENO"
6780then :
6781
6782	    if $CC $CFLAGS $LDFLAGS -o conftest conftest.c 2>&1 | grep "warning: no debug symbols in executable" >/dev/null; then
6783		LDFLAGS="$BAKLDFLAGS"
6784		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6785printf "%s\n" "no" >&6; }
6786	    else
6787		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6788printf "%s\n" "yes" >&6; }
6789	    fi
6790	    rm -f conftest conftest.c conftest.o
6791
6792else $as_nop
6793  LDFLAGS="$BAKLDFLAGS" ; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6794printf "%s\n" "no" >&6; }
6795fi
6796rm -f core conftest.err conftest.$ac_objext conftest.beam \
6797    conftest$ac_exeext conftest.$ac_ext
6798
6799fi
6800
6801fi
6802
6803{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
6804printf %s "checking for inline... " >&6; }
6805if test ${ac_cv_c_inline+y}
6806then :
6807  printf %s "(cached) " >&6
6808else $as_nop
6809  ac_cv_c_inline=no
6810for ac_kw in inline __inline__ __inline; do
6811  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6812/* end confdefs.h.  */
6813#ifndef __cplusplus
6814typedef int foo_t;
6815static $ac_kw foo_t static_foo (void) {return 0; }
6816$ac_kw foo_t foo (void) {return 0; }
6817#endif
6818
6819_ACEOF
6820if ac_fn_c_try_compile "$LINENO"
6821then :
6822  ac_cv_c_inline=$ac_kw
6823fi
6824rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
6825  test "$ac_cv_c_inline" != no && break
6826done
6827
6828fi
6829{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
6830printf "%s\n" "$ac_cv_c_inline" >&6; }
6831
6832case $ac_cv_c_inline in
6833  inline | yes) ;;
6834  *)
6835    case $ac_cv_c_inline in
6836      no) ac_val=;;
6837      *) ac_val=$ac_cv_c_inline;;
6838    esac
6839    cat >>confdefs.h <<_ACEOF
6840#ifndef __cplusplus
6841#define inline $ac_val
6842#endif
6843_ACEOF
6844    ;;
6845esac
6846
6847
6848{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler (${CC-cc}) accepts the \"format\" attribute" >&5
6849printf %s "checking whether the C compiler (${CC-cc}) accepts the \"format\" attribute... " >&6; }
6850if test ${ac_cv_c_format_attribute+y}
6851then :
6852  printf %s "(cached) " >&6
6853else $as_nop
6854  ac_cv_c_format_attribute=no
6855cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6856/* end confdefs.h.  */
6857#include <stdio.h>
6858void f (char *format, ...) __attribute__ ((format (printf, 1, 2)));
6859void (*pf) (char *format, ...) __attribute__ ((format (printf, 1, 2)));
6860
6861int
6862main (void)
6863{
6864
6865   f ("%s", "str");
6866
6867  ;
6868  return 0;
6869}
6870_ACEOF
6871if ac_fn_c_try_compile "$LINENO"
6872then :
6873  ac_cv_c_format_attribute="yes"
6874else $as_nop
6875  ac_cv_c_format_attribute="no"
6876fi
6877rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
6878
6879fi
6880
6881
6882{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_format_attribute" >&5
6883printf "%s\n" "$ac_cv_c_format_attribute" >&6; }
6884if test $ac_cv_c_format_attribute = yes; then
6885
6886printf "%s\n" "#define HAVE_ATTR_FORMAT 1" >>confdefs.h
6887
6888fi
6889
6890
6891{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler (${CC-cc}) accepts the \"unused\" attribute" >&5
6892printf %s "checking whether the C compiler (${CC-cc}) accepts the \"unused\" attribute... " >&6; }
6893if test ${ac_cv_c_unused_attribute+y}
6894then :
6895  printf %s "(cached) " >&6
6896else $as_nop
6897  ac_cv_c_unused_attribute=no
6898cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6899/* end confdefs.h.  */
6900#include <stdio.h>
6901void f (char *u __attribute__((unused)));
6902
6903int
6904main (void)
6905{
6906
6907   f ("x");
6908
6909  ;
6910  return 0;
6911}
6912_ACEOF
6913if ac_fn_c_try_compile "$LINENO"
6914then :
6915  ac_cv_c_unused_attribute="yes"
6916else $as_nop
6917  ac_cv_c_unused_attribute="no"
6918fi
6919rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
6920
6921fi
6922
6923
6924
6925
6926{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_unused_attribute" >&5
6927printf "%s\n" "$ac_cv_c_unused_attribute" >&6; }
6928if test $ac_cv_c_unused_attribute = yes; then
6929
6930printf "%s\n" "#define HAVE_ATTR_UNUSED 1" >>confdefs.h
6931
6932fi
6933
6934
6935
6936
6937{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler (${CC-cc}) accepts the \"weak\" attribute" >&5
6938printf %s "checking whether the C compiler (${CC-cc}) accepts the \"weak\" attribute... " >&6; }
6939if test ${ac_cv_c_weak_attribute+y}
6940then :
6941  printf %s "(cached) " >&6
6942else $as_nop
6943  ac_cv_c_weak_attribute=no
6944cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6945/* end confdefs.h.  */
6946 #include <stdio.h>
6947__attribute__((weak)) void f(int x) { printf("%d", x); }
6948
6949int
6950main (void)
6951{
6952
6953   f(1);
6954
6955  ;
6956  return 0;
6957}
6958_ACEOF
6959if ac_fn_c_try_compile "$LINENO"
6960then :
6961  ac_cv_c_weak_attribute="yes"
6962else $as_nop
6963  ac_cv_c_weak_attribute="no"
6964fi
6965rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
6966
6967fi
6968
6969
6970{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_weak_attribute" >&5
6971printf "%s\n" "$ac_cv_c_weak_attribute" >&6; }
6972if test $ac_cv_c_weak_attribute = yes; then
6973
6974printf "%s\n" "#define HAVE_ATTR_WEAK 1" >>confdefs.h
6975
6976
6977printf "%s\n" "#define ATTR_WEAK __attribute__((weak))" >>confdefs.h
6978
6979else
6980
6981printf "%s\n" "#define ATTR_WEAK /**/" >>confdefs.h
6982
6983fi
6984
6985
6986
6987
6988{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler (${CC-cc}) accepts the \"noreturn\" attribute" >&5
6989printf %s "checking whether the C compiler (${CC-cc}) accepts the \"noreturn\" attribute... " >&6; }
6990if test ${ac_cv_c_noreturn_attribute+y}
6991then :
6992  printf %s "(cached) " >&6
6993else $as_nop
6994  ac_cv_c_noreturn_attribute=no
6995cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6996/* end confdefs.h.  */
6997 #include <stdio.h>
6998__attribute__((noreturn)) void f(int x) { printf("%d", x); }
6999
7000int
7001main (void)
7002{
7003
7004   f(1);
7005
7006  ;
7007  return 0;
7008}
7009_ACEOF
7010if ac_fn_c_try_compile "$LINENO"
7011then :
7012  ac_cv_c_noreturn_attribute="yes"
7013else $as_nop
7014  ac_cv_c_noreturn_attribute="no"
7015fi
7016rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
7017
7018fi
7019
7020
7021{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_noreturn_attribute" >&5
7022printf "%s\n" "$ac_cv_c_noreturn_attribute" >&6; }
7023if test $ac_cv_c_noreturn_attribute = yes; then
7024
7025printf "%s\n" "#define HAVE_ATTR_NORETURN 1" >>confdefs.h
7026
7027
7028printf "%s\n" "#define ATTR_NORETURN __attribute__((__noreturn__))" >>confdefs.h
7029
7030else
7031
7032printf "%s\n" "#define ATTR_NORETURN /**/" >>confdefs.h
7033
7034fi
7035
7036
7037
7038
7039{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler (${CC-cc}) accepts the \"fallthrough\" attribute" >&5
7040printf %s "checking whether the C compiler (${CC-cc}) accepts the \"fallthrough\" attribute... " >&6; }
7041BAKCFLAGS="$CFLAGS"
7042CFLAGS="$CFLAGS -Werror"
7043if test ${ac_cv_c_fallthrough_attribute+y}
7044then :
7045  printf %s "(cached) " >&6
7046else $as_nop
7047  ac_cv_c_fallthrough_attribute=no
7048cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7049/* end confdefs.h.  */
7050 #include <stdio.h>
7051void f(int x) {
7052	int y = 0;
7053	switch(x) {
7054	case 1:
7055		y = 1;
7056		__attribute__((fallthrough));
7057		/* fallthrough */
7058	case 2:
7059		y++;
7060		break;
7061	case 3:
7062		y = 3;
7063		break;
7064	}
7065	printf("%d", y);
7066}
7067
7068int
7069main (void)
7070{
7071
7072   f(1);
7073
7074  ;
7075  return 0;
7076}
7077_ACEOF
7078if ac_fn_c_try_compile "$LINENO"
7079then :
7080  ac_cv_c_fallthrough_attribute="yes"
7081else $as_nop
7082  ac_cv_c_fallthrough_attribute="no"
7083fi
7084rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
7085
7086fi
7087
7088CFLAGS="$BAKCFLAGS"
7089
7090{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_fallthrough_attribute" >&5
7091printf "%s\n" "$ac_cv_c_fallthrough_attribute" >&6; }
7092if test $ac_cv_c_fallthrough_attribute = yes; then
7093
7094printf "%s\n" "#define HAVE_ATTR_FALLTHROUGH 1" >>confdefs.h
7095
7096
7097printf "%s\n" "#define ATTR_FALLTHROUGH __attribute__((fallthrough));" >>confdefs.h
7098
7099else
7100
7101printf "%s\n" "#define ATTR_FALLTHROUGH /**/" >>confdefs.h
7102
7103fi
7104
7105
7106if test "$srcdir" != "."; then
7107	CPPFLAGS="$CPPFLAGS -I$srcdir"
7108fi
7109
7110
7111
7112
7113
7114for ac_prog in flex lex
7115do
7116  # Extract the first word of "$ac_prog", so it can be a program name with args.
7117set dummy $ac_prog; ac_word=$2
7118{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7119printf %s "checking for $ac_word... " >&6; }
7120if test ${ac_cv_prog_LEX+y}
7121then :
7122  printf %s "(cached) " >&6
7123else $as_nop
7124  if test -n "$LEX"; then
7125  ac_cv_prog_LEX="$LEX" # Let the user override the test.
7126else
7127as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7128for as_dir in $PATH
7129do
7130  IFS=$as_save_IFS
7131  case $as_dir in #(((
7132    '') as_dir=./ ;;
7133    */) ;;
7134    *) as_dir=$as_dir/ ;;
7135  esac
7136    for ac_exec_ext in '' $ac_executable_extensions; do
7137  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
7138    ac_cv_prog_LEX="$ac_prog"
7139    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
7140    break 2
7141  fi
7142done
7143  done
7144IFS=$as_save_IFS
7145
7146fi
7147fi
7148LEX=$ac_cv_prog_LEX
7149if test -n "$LEX"; then
7150  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LEX" >&5
7151printf "%s\n" "$LEX" >&6; }
7152else
7153  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7154printf "%s\n" "no" >&6; }
7155fi
7156
7157
7158  test -n "$LEX" && break
7159done
7160test -n "$LEX" || LEX=":"
7161
7162  if test "x$LEX" != "x:"; then
7163    cat >conftest.l <<_ACEOF
7164%{
7165#ifdef __cplusplus
7166extern "C"
7167#endif
7168int yywrap(void);
7169%}
7170%%
7171a { ECHO; }
7172b { REJECT; }
7173c { yymore (); }
7174d { yyless (1); }
7175e { /* IRIX 6.5 flex 2.5.4 underquotes its yyless argument.  */
7176#ifdef __cplusplus
7177    yyless ((yyinput () != 0));
7178#else
7179    yyless ((input () != 0));
7180#endif
7181  }
7182f { unput (yytext[0]); }
7183. { BEGIN INITIAL; }
7184%%
7185#ifdef YYTEXT_POINTER
7186extern char *yytext;
7187#endif
7188int
7189yywrap (void)
7190{
7191  return 1;
7192}
7193int
7194main (void)
7195{
7196  return ! yylex ();
7197}
7198_ACEOF
7199{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for lex output file root" >&5
7200printf %s "checking for lex output file root... " >&6; }
7201if test ${ac_cv_prog_lex_root+y}
7202then :
7203  printf %s "(cached) " >&6
7204else $as_nop
7205
7206ac_cv_prog_lex_root=unknown
7207{ { ac_try="$LEX conftest.l"
7208case "(($ac_try" in
7209  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7210  *) ac_try_echo=$ac_try;;
7211esac
7212eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
7213printf "%s\n" "$ac_try_echo"; } >&5
7214  (eval "$LEX conftest.l") 2>&5
7215  ac_status=$?
7216  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7217  test $ac_status = 0; } &&
7218if test -f lex.yy.c; then
7219  ac_cv_prog_lex_root=lex.yy
7220elif test -f lexyy.c; then
7221  ac_cv_prog_lex_root=lexyy
7222fi
7223fi
7224{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_lex_root" >&5
7225printf "%s\n" "$ac_cv_prog_lex_root" >&6; }
7226if test "$ac_cv_prog_lex_root" = unknown
7227then :
7228  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cannot find output from $LEX; giving up on $LEX" >&5
7229printf "%s\n" "$as_me: WARNING: cannot find output from $LEX; giving up on $LEX" >&2;}
7230   LEX=: LEXLIB=
7231fi
7232LEX_OUTPUT_ROOT=$ac_cv_prog_lex_root
7233
7234if test ${LEXLIB+y}
7235then :
7236
7237else $as_nop
7238
7239  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for lex library" >&5
7240printf %s "checking for lex library... " >&6; }
7241if test ${ac_cv_lib_lex+y}
7242then :
7243  printf %s "(cached) " >&6
7244else $as_nop
7245
7246    ac_save_LIBS="$LIBS"
7247    ac_found=false
7248    for ac_cv_lib_lex in 'none needed' -lfl -ll 'not found'; do
7249      case $ac_cv_lib_lex in #(
7250  'none needed') :
7251     ;; #(
7252  'not found') :
7253    break ;; #(
7254  *) :
7255    LIBS="$ac_cv_lib_lex $ac_save_LIBS" ;; #(
7256  *) :
7257     ;;
7258esac
7259
7260      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7261/* end confdefs.h.  */
7262`cat $LEX_OUTPUT_ROOT.c`
7263_ACEOF
7264if ac_fn_c_try_link "$LINENO"
7265then :
7266  ac_found=:
7267fi
7268rm -f core conftest.err conftest.$ac_objext conftest.beam \
7269    conftest$ac_exeext conftest.$ac_ext
7270      if $ac_found; then
7271        break
7272      fi
7273    done
7274    LIBS="$ac_save_LIBS"
7275
7276fi
7277{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_lex" >&5
7278printf "%s\n" "$ac_cv_lib_lex" >&6; }
7279  if test "$ac_cv_lib_lex" = 'not found'
7280then :
7281  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: required lex library not found; giving up on $LEX" >&5
7282printf "%s\n" "$as_me: WARNING: required lex library not found; giving up on $LEX" >&2;}
7283	 LEX=: LEXLIB=
7284elif test "$ac_cv_lib_lex" = 'none needed'
7285then :
7286  LEXLIB=''
7287else $as_nop
7288  LEXLIB=$ac_cv_lib_lex
7289fi
7290
7291fi
7292
7293
7294if test "$LEX" != :
7295then :
7296
7297{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether yytext is a pointer" >&5
7298printf %s "checking whether yytext is a pointer... " >&6; }
7299if test ${ac_cv_prog_lex_yytext_pointer+y}
7300then :
7301  printf %s "(cached) " >&6
7302else $as_nop
7303  # POSIX says lex can declare yytext either as a pointer or an array; the
7304# default is implementation-dependent.  Figure out which it is, since
7305# not all implementations provide the %pointer and %array declarations.
7306ac_cv_prog_lex_yytext_pointer=no
7307cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7308/* end confdefs.h.  */
7309
7310  #define YYTEXT_POINTER 1
7311`cat $LEX_OUTPUT_ROOT.c`
7312_ACEOF
7313if ac_fn_c_try_compile "$LINENO"
7314then :
7315  ac_cv_prog_lex_yytext_pointer=yes
7316fi
7317rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
7318
7319fi
7320{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_lex_yytext_pointer" >&5
7321printf "%s\n" "$ac_cv_prog_lex_yytext_pointer" >&6; }
7322if test $ac_cv_prog_lex_yytext_pointer = yes; then
7323
7324printf "%s\n" "#define YYTEXT_POINTER 1" >>confdefs.h
7325
7326fi
7327
7328fi
7329rm -f conftest.l $LEX_OUTPUT_ROOT.c
7330
7331fi
7332if test "$LEX" != "" -a "$LEX" != ":"; then
7333
7334	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for yylex_destroy" >&5
7335printf %s "checking for yylex_destroy... " >&6; }
7336	if echo %% | $LEX -t 2>&1 | grep yylex_destroy >/dev/null 2>&1; then
7337
7338printf "%s\n" "#define LEX_HAS_YYLEX_DESTROY 1" >>confdefs.h
7339
7340		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7341printf "%s\n" "yes" >&6; }
7342	else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7343printf "%s\n" "no" >&6; };
7344		LEX=":"
7345	fi
7346
7347fi
7348if test "$LEX" != "" -a "$LEX" != ":"; then
7349
7350	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for lex %option" >&5
7351printf %s "checking for lex %option... " >&6; }
7352	if cat <<EOF | $LEX -t 2>&1 | grep yy_delete_buffer >/dev/null 2>&1; then
7353%option nounput
7354%%
7355EOF
7356		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7357printf "%s\n" "yes" >&6; }
7358	else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7359printf "%s\n" "no" >&6; };
7360		LEX=":"
7361	fi
7362
7363fi
7364if test "$LEX" = "" -o "$LEX" = ":"; then
7365	if test ! -f util/configlexer.c; then
7366		as_fn_error $? "no lex and no util/configlexer.c: need flex and bison to compile from source repository." "$LINENO" 5
7367	fi
7368fi
7369for ac_prog in 'bison -y' byacc
7370do
7371  # Extract the first word of "$ac_prog", so it can be a program name with args.
7372set dummy $ac_prog; ac_word=$2
7373{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7374printf %s "checking for $ac_word... " >&6; }
7375if test ${ac_cv_prog_YACC+y}
7376then :
7377  printf %s "(cached) " >&6
7378else $as_nop
7379  if test -n "$YACC"; then
7380  ac_cv_prog_YACC="$YACC" # Let the user override the test.
7381else
7382as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7383for as_dir in $PATH
7384do
7385  IFS=$as_save_IFS
7386  case $as_dir in #(((
7387    '') as_dir=./ ;;
7388    */) ;;
7389    *) as_dir=$as_dir/ ;;
7390  esac
7391    for ac_exec_ext in '' $ac_executable_extensions; do
7392  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
7393    ac_cv_prog_YACC="$ac_prog"
7394    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
7395    break 2
7396  fi
7397done
7398  done
7399IFS=$as_save_IFS
7400
7401fi
7402fi
7403YACC=$ac_cv_prog_YACC
7404if test -n "$YACC"; then
7405  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $YACC" >&5
7406printf "%s\n" "$YACC" >&6; }
7407else
7408  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7409printf "%s\n" "no" >&6; }
7410fi
7411
7412
7413  test -n "$YACC" && break
7414done
7415test -n "$YACC" || YACC="yacc"
7416
7417if test "$YACC" = "" -o "$YACC" = ":"; then
7418	if test ! -f util/configparser.c; then
7419		as_fn_error $? "no yacc and no util/configparser.c: need flex and bison to compile from source repository." "$LINENO" 5
7420	fi
7421fi
7422# Extract the first word of "doxygen", so it can be a program name with args.
7423set dummy doxygen; ac_word=$2
7424{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7425printf %s "checking for $ac_word... " >&6; }
7426if test ${ac_cv_prog_doxygen+y}
7427then :
7428  printf %s "(cached) " >&6
7429else $as_nop
7430  if test -n "$doxygen"; then
7431  ac_cv_prog_doxygen="$doxygen" # Let the user override the test.
7432else
7433as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7434for as_dir in $PATH
7435do
7436  IFS=$as_save_IFS
7437  case $as_dir in #(((
7438    '') as_dir=./ ;;
7439    */) ;;
7440    *) as_dir=$as_dir/ ;;
7441  esac
7442    for ac_exec_ext in '' $ac_executable_extensions; do
7443  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
7444    ac_cv_prog_doxygen="doxygen"
7445    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
7446    break 2
7447  fi
7448done
7449  done
7450IFS=$as_save_IFS
7451
7452fi
7453fi
7454doxygen=$ac_cv_prog_doxygen
7455if test -n "$doxygen"; then
7456  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $doxygen" >&5
7457printf "%s\n" "$doxygen" >&6; }
7458else
7459  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7460printf "%s\n" "no" >&6; }
7461fi
7462
7463
7464if test -n "$ac_tool_prefix"; then
7465  # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
7466set dummy ${ac_tool_prefix}strip; ac_word=$2
7467{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7468printf %s "checking for $ac_word... " >&6; }
7469if test ${ac_cv_prog_STRIP+y}
7470then :
7471  printf %s "(cached) " >&6
7472else $as_nop
7473  if test -n "$STRIP"; then
7474  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
7475else
7476as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7477for as_dir in $PATH
7478do
7479  IFS=$as_save_IFS
7480  case $as_dir in #(((
7481    '') as_dir=./ ;;
7482    */) ;;
7483    *) as_dir=$as_dir/ ;;
7484  esac
7485    for ac_exec_ext in '' $ac_executable_extensions; do
7486  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
7487    ac_cv_prog_STRIP="${ac_tool_prefix}strip"
7488    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
7489    break 2
7490  fi
7491done
7492  done
7493IFS=$as_save_IFS
7494
7495fi
7496fi
7497STRIP=$ac_cv_prog_STRIP
7498if test -n "$STRIP"; then
7499  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
7500printf "%s\n" "$STRIP" >&6; }
7501else
7502  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7503printf "%s\n" "no" >&6; }
7504fi
7505
7506
7507fi
7508if test -z "$ac_cv_prog_STRIP"; then
7509  ac_ct_STRIP=$STRIP
7510  # Extract the first word of "strip", so it can be a program name with args.
7511set dummy strip; ac_word=$2
7512{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7513printf %s "checking for $ac_word... " >&6; }
7514if test ${ac_cv_prog_ac_ct_STRIP+y}
7515then :
7516  printf %s "(cached) " >&6
7517else $as_nop
7518  if test -n "$ac_ct_STRIP"; then
7519  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
7520else
7521as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7522for as_dir in $PATH
7523do
7524  IFS=$as_save_IFS
7525  case $as_dir in #(((
7526    '') as_dir=./ ;;
7527    */) ;;
7528    *) as_dir=$as_dir/ ;;
7529  esac
7530    for ac_exec_ext in '' $ac_executable_extensions; do
7531  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
7532    ac_cv_prog_ac_ct_STRIP="strip"
7533    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
7534    break 2
7535  fi
7536done
7537  done
7538IFS=$as_save_IFS
7539
7540fi
7541fi
7542ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
7543if test -n "$ac_ct_STRIP"; then
7544  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
7545printf "%s\n" "$ac_ct_STRIP" >&6; }
7546else
7547  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7548printf "%s\n" "no" >&6; }
7549fi
7550
7551  if test "x$ac_ct_STRIP" = x; then
7552    STRIP=""
7553  else
7554    case $cross_compiling:$ac_tool_warned in
7555yes:)
7556{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7557printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7558ac_tool_warned=yes ;;
7559esac
7560    STRIP=$ac_ct_STRIP
7561  fi
7562else
7563  STRIP="$ac_cv_prog_STRIP"
7564fi
7565
7566
7567
7568
7569  # Make sure we can run config.sub.
7570$SHELL "${ac_aux_dir}config.sub" sun4 >/dev/null 2>&1 ||
7571  as_fn_error $? "cannot run $SHELL ${ac_aux_dir}config.sub" "$LINENO" 5
7572
7573{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
7574printf %s "checking build system type... " >&6; }
7575if test ${ac_cv_build+y}
7576then :
7577  printf %s "(cached) " >&6
7578else $as_nop
7579  ac_build_alias=$build_alias
7580test "x$ac_build_alias" = x &&
7581  ac_build_alias=`$SHELL "${ac_aux_dir}config.guess"`
7582test "x$ac_build_alias" = x &&
7583  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
7584ac_cv_build=`$SHELL "${ac_aux_dir}config.sub" $ac_build_alias` ||
7585  as_fn_error $? "$SHELL ${ac_aux_dir}config.sub $ac_build_alias failed" "$LINENO" 5
7586
7587fi
7588{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
7589printf "%s\n" "$ac_cv_build" >&6; }
7590case $ac_cv_build in
7591*-*-*) ;;
7592*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
7593esac
7594build=$ac_cv_build
7595ac_save_IFS=$IFS; IFS='-'
7596set x $ac_cv_build
7597shift
7598build_cpu=$1
7599build_vendor=$2
7600shift; shift
7601# Remember, the first character of IFS is used to create $*,
7602# except with old shells:
7603build_os=$*
7604IFS=$ac_save_IFS
7605case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
7606
7607
7608{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
7609printf %s "checking host system type... " >&6; }
7610if test ${ac_cv_host+y}
7611then :
7612  printf %s "(cached) " >&6
7613else $as_nop
7614  if test "x$host_alias" = x; then
7615  ac_cv_host=$ac_cv_build
7616else
7617  ac_cv_host=`$SHELL "${ac_aux_dir}config.sub" $host_alias` ||
7618    as_fn_error $? "$SHELL ${ac_aux_dir}config.sub $host_alias failed" "$LINENO" 5
7619fi
7620
7621fi
7622{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
7623printf "%s\n" "$ac_cv_host" >&6; }
7624case $ac_cv_host in
7625*-*-*) ;;
7626*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
7627esac
7628host=$ac_cv_host
7629ac_save_IFS=$IFS; IFS='-'
7630set x $ac_cv_host
7631shift
7632host_cpu=$1
7633host_vendor=$2
7634shift; shift
7635# Remember, the first character of IFS is used to create $*,
7636# except with old shells:
7637host_os=$*
7638IFS=$ac_save_IFS
7639case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
7640
7641
7642
7643# skip these tests, we do not need them.
7644
7645
7646
7647
7648
7649
7650
7651
7652# always use ./libtool unless override from commandline (libtool=mylibtool)
7653if test -z "$libtool"; then
7654	libtool="./libtool"
7655fi
7656
7657# avoid libtool max commandline length test on systems that fork slowly.
7658
7659if echo "$host_os" | grep "sunos4" >/dev/null; then
7660	lt_cv_sys_max_cmd_len=32750;
7661fi
7662if test -n "$ac_tool_prefix"; then
7663  # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
7664set dummy ${ac_tool_prefix}ar; ac_word=$2
7665{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7666printf %s "checking for $ac_word... " >&6; }
7667if test ${ac_cv_path_AR+y}
7668then :
7669  printf %s "(cached) " >&6
7670else $as_nop
7671  case $AR in
7672  [\\/]* | ?:[\\/]*)
7673  ac_cv_path_AR="$AR" # Let the user override the test with a path.
7674  ;;
7675  *)
7676  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7677for as_dir in $PATH
7678do
7679  IFS=$as_save_IFS
7680  case $as_dir in #(((
7681    '') as_dir=./ ;;
7682    */) ;;
7683    *) as_dir=$as_dir/ ;;
7684  esac
7685    for ac_exec_ext in '' $ac_executable_extensions; do
7686  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
7687    ac_cv_path_AR="$as_dir$ac_word$ac_exec_ext"
7688    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
7689    break 2
7690  fi
7691done
7692  done
7693IFS=$as_save_IFS
7694
7695  ;;
7696esac
7697fi
7698AR=$ac_cv_path_AR
7699if test -n "$AR"; then
7700  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
7701printf "%s\n" "$AR" >&6; }
7702else
7703  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7704printf "%s\n" "no" >&6; }
7705fi
7706
7707
7708fi
7709if test -z "$ac_cv_path_AR"; then
7710  ac_pt_AR=$AR
7711  # Extract the first word of "ar", so it can be a program name with args.
7712set dummy ar; ac_word=$2
7713{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7714printf %s "checking for $ac_word... " >&6; }
7715if test ${ac_cv_path_ac_pt_AR+y}
7716then :
7717  printf %s "(cached) " >&6
7718else $as_nop
7719  case $ac_pt_AR in
7720  [\\/]* | ?:[\\/]*)
7721  ac_cv_path_ac_pt_AR="$ac_pt_AR" # Let the user override the test with a path.
7722  ;;
7723  *)
7724  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7725for as_dir in $PATH
7726do
7727  IFS=$as_save_IFS
7728  case $as_dir in #(((
7729    '') as_dir=./ ;;
7730    */) ;;
7731    *) as_dir=$as_dir/ ;;
7732  esac
7733    for ac_exec_ext in '' $ac_executable_extensions; do
7734  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
7735    ac_cv_path_ac_pt_AR="$as_dir$ac_word$ac_exec_ext"
7736    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
7737    break 2
7738  fi
7739done
7740  done
7741IFS=$as_save_IFS
7742
7743  ;;
7744esac
7745fi
7746ac_pt_AR=$ac_cv_path_ac_pt_AR
7747if test -n "$ac_pt_AR"; then
7748  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_pt_AR" >&5
7749printf "%s\n" "$ac_pt_AR" >&6; }
7750else
7751  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7752printf "%s\n" "no" >&6; }
7753fi
7754
7755  if test "x$ac_pt_AR" = x; then
7756    AR="false"
7757  else
7758    case $cross_compiling:$ac_tool_warned in
7759yes:)
7760{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7761printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7762ac_tool_warned=yes ;;
7763esac
7764    AR=$ac_pt_AR
7765  fi
7766else
7767  AR="$ac_cv_path_AR"
7768fi
7769
7770if test $AR = false; then
7771	as_fn_error $? "Cannot find 'ar', please extend PATH to include it" "$LINENO" 5
7772fi
7773
7774
7775case `pwd` in
7776  *\ * | *\	*)
7777    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5
7778printf "%s\n" "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;;
7779esac
7780
7781
7782
7783macro_version='2.4.6'
7784macro_revision='2.4.6'
7785
7786
7787
7788
7789
7790
7791
7792
7793
7794
7795
7796
7797
7798
7799ltmain=$ac_aux_dir/ltmain.sh
7800
7801# Backslashify metacharacters that are still active within
7802# double-quoted strings.
7803sed_quote_subst='s/\(["`$\\]\)/\\\1/g'
7804
7805# Same as above, but do not quote variable references.
7806double_quote_subst='s/\(["`\\]\)/\\\1/g'
7807
7808# Sed substitution to delay expansion of an escaped shell variable in a
7809# double_quote_subst'ed string.
7810delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
7811
7812# Sed substitution to delay expansion of an escaped single quote.
7813delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
7814
7815# Sed substitution to avoid accidental globbing in evaled expressions
7816no_glob_subst='s/\*/\\\*/g'
7817
7818ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
7819ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
7820ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
7821
7822{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5
7823printf %s "checking how to print strings... " >&6; }
7824# Test print first, because it will be a builtin if present.
7825if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \
7826   test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
7827  ECHO='print -r --'
7828elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
7829  ECHO='printf %s\n'
7830else
7831  # Use this function as a fallback that always works.
7832  func_fallback_echo ()
7833  {
7834    eval 'cat <<_LTECHO_EOF
7835$1
7836_LTECHO_EOF'
7837  }
7838  ECHO='func_fallback_echo'
7839fi
7840
7841# func_echo_all arg...
7842# Invoke $ECHO with all args, space-separated.
7843func_echo_all ()
7844{
7845    $ECHO ""
7846}
7847
7848case $ECHO in
7849  printf*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: printf" >&5
7850printf "%s\n" "printf" >&6; } ;;
7851  print*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: print -r" >&5
7852printf "%s\n" "print -r" >&6; } ;;
7853  *) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: cat" >&5
7854printf "%s\n" "cat" >&6; } ;;
7855esac
7856
7857
7858
7859
7860
7861
7862
7863
7864
7865
7866
7867
7868
7869
7870{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
7871printf %s "checking for a sed that does not truncate output... " >&6; }
7872if test ${ac_cv_path_SED+y}
7873then :
7874  printf %s "(cached) " >&6
7875else $as_nop
7876            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
7877     for ac_i in 1 2 3 4 5 6 7; do
7878       ac_script="$ac_script$as_nl$ac_script"
7879     done
7880     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
7881     { ac_script=; unset ac_script;}
7882     if test -z "$SED"; then
7883  ac_path_SED_found=false
7884  # Loop through the user's path and test for each of PROGNAME-LIST
7885  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7886for as_dir in $PATH
7887do
7888  IFS=$as_save_IFS
7889  case $as_dir in #(((
7890    '') as_dir=./ ;;
7891    */) ;;
7892    *) as_dir=$as_dir/ ;;
7893  esac
7894    for ac_prog in sed gsed
7895   do
7896    for ac_exec_ext in '' $ac_executable_extensions; do
7897      ac_path_SED="$as_dir$ac_prog$ac_exec_ext"
7898      as_fn_executable_p "$ac_path_SED" || continue
7899# Check for GNU ac_path_SED and select it if it is found.
7900  # Check for GNU $ac_path_SED
7901case `"$ac_path_SED" --version 2>&1` in
7902*GNU*)
7903  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
7904*)
7905  ac_count=0
7906  printf %s 0123456789 >"conftest.in"
7907  while :
7908  do
7909    cat "conftest.in" "conftest.in" >"conftest.tmp"
7910    mv "conftest.tmp" "conftest.in"
7911    cp "conftest.in" "conftest.nl"
7912    printf "%s\n" '' >> "conftest.nl"
7913    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
7914    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
7915    as_fn_arith $ac_count + 1 && ac_count=$as_val
7916    if test $ac_count -gt ${ac_path_SED_max-0}; then
7917      # Best one so far, save it but keep looking for a better one
7918      ac_cv_path_SED="$ac_path_SED"
7919      ac_path_SED_max=$ac_count
7920    fi
7921    # 10*(2^10) chars as input seems more than enough
7922    test $ac_count -gt 10 && break
7923  done
7924  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
7925esac
7926
7927      $ac_path_SED_found && break 3
7928    done
7929  done
7930  done
7931IFS=$as_save_IFS
7932  if test -z "$ac_cv_path_SED"; then
7933    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
7934  fi
7935else
7936  ac_cv_path_SED=$SED
7937fi
7938
7939fi
7940{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
7941printf "%s\n" "$ac_cv_path_SED" >&6; }
7942 SED="$ac_cv_path_SED"
7943  rm -f conftest.sed
7944
7945test -z "$SED" && SED=sed
7946Xsed="$SED -e 1s/^X//"
7947
7948
7949
7950
7951
7952
7953
7954
7955
7956
7957
7958{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
7959printf %s "checking for egrep... " >&6; }
7960if test ${ac_cv_path_EGREP+y}
7961then :
7962  printf %s "(cached) " >&6
7963else $as_nop
7964  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
7965   then ac_cv_path_EGREP="$GREP -E"
7966   else
7967     if test -z "$EGREP"; then
7968  ac_path_EGREP_found=false
7969  # Loop through the user's path and test for each of PROGNAME-LIST
7970  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7971for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
7972do
7973  IFS=$as_save_IFS
7974  case $as_dir in #(((
7975    '') as_dir=./ ;;
7976    */) ;;
7977    *) as_dir=$as_dir/ ;;
7978  esac
7979    for ac_prog in egrep
7980   do
7981    for ac_exec_ext in '' $ac_executable_extensions; do
7982      ac_path_EGREP="$as_dir$ac_prog$ac_exec_ext"
7983      as_fn_executable_p "$ac_path_EGREP" || continue
7984# Check for GNU ac_path_EGREP and select it if it is found.
7985  # Check for GNU $ac_path_EGREP
7986case `"$ac_path_EGREP" --version 2>&1` in
7987*GNU*)
7988  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
7989*)
7990  ac_count=0
7991  printf %s 0123456789 >"conftest.in"
7992  while :
7993  do
7994    cat "conftest.in" "conftest.in" >"conftest.tmp"
7995    mv "conftest.tmp" "conftest.in"
7996    cp "conftest.in" "conftest.nl"
7997    printf "%s\n" 'EGREP' >> "conftest.nl"
7998    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
7999    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
8000    as_fn_arith $ac_count + 1 && ac_count=$as_val
8001    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
8002      # Best one so far, save it but keep looking for a better one
8003      ac_cv_path_EGREP="$ac_path_EGREP"
8004      ac_path_EGREP_max=$ac_count
8005    fi
8006    # 10*(2^10) chars as input seems more than enough
8007    test $ac_count -gt 10 && break
8008  done
8009  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
8010esac
8011
8012      $ac_path_EGREP_found && break 3
8013    done
8014  done
8015  done
8016IFS=$as_save_IFS
8017  if test -z "$ac_cv_path_EGREP"; then
8018    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
8019  fi
8020else
8021  ac_cv_path_EGREP=$EGREP
8022fi
8023
8024   fi
8025fi
8026{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
8027printf "%s\n" "$ac_cv_path_EGREP" >&6; }
8028 EGREP="$ac_cv_path_EGREP"
8029
8030
8031{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
8032printf %s "checking for fgrep... " >&6; }
8033if test ${ac_cv_path_FGREP+y}
8034then :
8035  printf %s "(cached) " >&6
8036else $as_nop
8037  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
8038   then ac_cv_path_FGREP="$GREP -F"
8039   else
8040     if test -z "$FGREP"; then
8041  ac_path_FGREP_found=false
8042  # Loop through the user's path and test for each of PROGNAME-LIST
8043  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8044for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
8045do
8046  IFS=$as_save_IFS
8047  case $as_dir in #(((
8048    '') as_dir=./ ;;
8049    */) ;;
8050    *) as_dir=$as_dir/ ;;
8051  esac
8052    for ac_prog in fgrep
8053   do
8054    for ac_exec_ext in '' $ac_executable_extensions; do
8055      ac_path_FGREP="$as_dir$ac_prog$ac_exec_ext"
8056      as_fn_executable_p "$ac_path_FGREP" || continue
8057# Check for GNU ac_path_FGREP and select it if it is found.
8058  # Check for GNU $ac_path_FGREP
8059case `"$ac_path_FGREP" --version 2>&1` in
8060*GNU*)
8061  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
8062*)
8063  ac_count=0
8064  printf %s 0123456789 >"conftest.in"
8065  while :
8066  do
8067    cat "conftest.in" "conftest.in" >"conftest.tmp"
8068    mv "conftest.tmp" "conftest.in"
8069    cp "conftest.in" "conftest.nl"
8070    printf "%s\n" 'FGREP' >> "conftest.nl"
8071    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
8072    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
8073    as_fn_arith $ac_count + 1 && ac_count=$as_val
8074    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
8075      # Best one so far, save it but keep looking for a better one
8076      ac_cv_path_FGREP="$ac_path_FGREP"
8077      ac_path_FGREP_max=$ac_count
8078    fi
8079    # 10*(2^10) chars as input seems more than enough
8080    test $ac_count -gt 10 && break
8081  done
8082  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
8083esac
8084
8085      $ac_path_FGREP_found && break 3
8086    done
8087  done
8088  done
8089IFS=$as_save_IFS
8090  if test -z "$ac_cv_path_FGREP"; then
8091    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
8092  fi
8093else
8094  ac_cv_path_FGREP=$FGREP
8095fi
8096
8097   fi
8098fi
8099{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
8100printf "%s\n" "$ac_cv_path_FGREP" >&6; }
8101 FGREP="$ac_cv_path_FGREP"
8102
8103
8104test -z "$GREP" && GREP=grep
8105
8106
8107
8108
8109
8110
8111
8112
8113
8114
8115
8116
8117
8118
8119
8120
8121
8122
8123
8124# Check whether --with-gnu-ld was given.
8125if test ${with_gnu_ld+y}
8126then :
8127  withval=$with_gnu_ld; test no = "$withval" || with_gnu_ld=yes
8128else $as_nop
8129  with_gnu_ld=no
8130fi
8131
8132ac_prog=ld
8133if test yes = "$GCC"; then
8134  # Check if gcc -print-prog-name=ld gives a path.
8135  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5
8136printf %s "checking for ld used by $CC... " >&6; }
8137  case $host in
8138  *-*-mingw*)
8139    # gcc leaves a trailing carriage return, which upsets mingw
8140    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
8141  *)
8142    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
8143  esac
8144  case $ac_prog in
8145    # Accept absolute paths.
8146    [\\/]* | ?:[\\/]*)
8147      re_direlt='/[^/][^/]*/\.\./'
8148      # Canonicalize the pathname of ld
8149      ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
8150      while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
8151	ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
8152      done
8153      test -z "$LD" && LD=$ac_prog
8154      ;;
8155  "")
8156    # If it fails, then pretend we aren't using GCC.
8157    ac_prog=ld
8158    ;;
8159  *)
8160    # If it is relative, then search for the first ld in PATH.
8161    with_gnu_ld=unknown
8162    ;;
8163  esac
8164elif test yes = "$with_gnu_ld"; then
8165  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
8166printf %s "checking for GNU ld... " >&6; }
8167else
8168  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
8169printf %s "checking for non-GNU ld... " >&6; }
8170fi
8171if test ${lt_cv_path_LD+y}
8172then :
8173  printf %s "(cached) " >&6
8174else $as_nop
8175  if test -z "$LD"; then
8176  lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
8177  for ac_dir in $PATH; do
8178    IFS=$lt_save_ifs
8179    test -z "$ac_dir" && ac_dir=.
8180    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
8181      lt_cv_path_LD=$ac_dir/$ac_prog
8182      # Check to see if the program is GNU ld.  I'd rather use --version,
8183      # but apparently some variants of GNU ld only accept -v.
8184      # Break only if it was the GNU/non-GNU ld that we prefer.
8185      case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
8186      *GNU* | *'with BFD'*)
8187	test no != "$with_gnu_ld" && break
8188	;;
8189      *)
8190	test yes != "$with_gnu_ld" && break
8191	;;
8192      esac
8193    fi
8194  done
8195  IFS=$lt_save_ifs
8196else
8197  lt_cv_path_LD=$LD # Let the user override the test with a path.
8198fi
8199fi
8200
8201LD=$lt_cv_path_LD
8202if test -n "$LD"; then
8203  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
8204printf "%s\n" "$LD" >&6; }
8205else
8206  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
8207printf "%s\n" "no" >&6; }
8208fi
8209test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
8210{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
8211printf %s "checking if the linker ($LD) is GNU ld... " >&6; }
8212if test ${lt_cv_prog_gnu_ld+y}
8213then :
8214  printf %s "(cached) " >&6
8215else $as_nop
8216  # I'd rather use --version here, but apparently some GNU lds only accept -v.
8217case `$LD -v 2>&1 </dev/null` in
8218*GNU* | *'with BFD'*)
8219  lt_cv_prog_gnu_ld=yes
8220  ;;
8221*)
8222  lt_cv_prog_gnu_ld=no
8223  ;;
8224esac
8225fi
8226{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_gnu_ld" >&5
8227printf "%s\n" "$lt_cv_prog_gnu_ld" >&6; }
8228with_gnu_ld=$lt_cv_prog_gnu_ld
8229
8230
8231
8232
8233
8234
8235
8236
8237
8238{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)" >&5
8239printf %s "checking for BSD- or MS-compatible name lister (nm)... " >&6; }
8240if test ${lt_cv_path_NM+y}
8241then :
8242  printf %s "(cached) " >&6
8243else $as_nop
8244  if test -n "$NM"; then
8245  # Let the user override the test.
8246  lt_cv_path_NM=$NM
8247else
8248  lt_nm_to_check=${ac_tool_prefix}nm
8249  if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
8250    lt_nm_to_check="$lt_nm_to_check nm"
8251  fi
8252  for lt_tmp_nm in $lt_nm_to_check; do
8253    lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
8254    for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
8255      IFS=$lt_save_ifs
8256      test -z "$ac_dir" && ac_dir=.
8257      tmp_nm=$ac_dir/$lt_tmp_nm
8258      if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then
8259	# Check to see if the nm accepts a BSD-compat flag.
8260	# Adding the 'sed 1q' prevents false positives on HP-UX, which says:
8261	#   nm: unknown option "B" ignored
8262	# Tru64's nm complains that /dev/null is an invalid object file
8263	# MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty
8264	case $build_os in
8265	mingw*) lt_bad_file=conftest.nm/nofile ;;
8266	*) lt_bad_file=/dev/null ;;
8267	esac
8268	case `"$tmp_nm" -B $lt_bad_file 2>&1 | sed '1q'` in
8269	*$lt_bad_file* | *'Invalid file or object type'*)
8270	  lt_cv_path_NM="$tmp_nm -B"
8271	  break 2
8272	  ;;
8273	*)
8274	  case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
8275	  */dev/null*)
8276	    lt_cv_path_NM="$tmp_nm -p"
8277	    break 2
8278	    ;;
8279	  *)
8280	    lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
8281	    continue # so that we can try to find one that supports BSD flags
8282	    ;;
8283	  esac
8284	  ;;
8285	esac
8286      fi
8287    done
8288    IFS=$lt_save_ifs
8289  done
8290  : ${lt_cv_path_NM=no}
8291fi
8292fi
8293{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5
8294printf "%s\n" "$lt_cv_path_NM" >&6; }
8295if test no != "$lt_cv_path_NM"; then
8296  NM=$lt_cv_path_NM
8297else
8298  # Didn't find any BSD compatible name lister, look for dumpbin.
8299  if test -n "$DUMPBIN"; then :
8300    # Let the user override the test.
8301  else
8302    if test -n "$ac_tool_prefix"; then
8303  for ac_prog in dumpbin "link -dump"
8304  do
8305    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
8306set dummy $ac_tool_prefix$ac_prog; ac_word=$2
8307{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8308printf %s "checking for $ac_word... " >&6; }
8309if test ${ac_cv_prog_DUMPBIN+y}
8310then :
8311  printf %s "(cached) " >&6
8312else $as_nop
8313  if test -n "$DUMPBIN"; then
8314  ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
8315else
8316as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8317for as_dir in $PATH
8318do
8319  IFS=$as_save_IFS
8320  case $as_dir in #(((
8321    '') as_dir=./ ;;
8322    */) ;;
8323    *) as_dir=$as_dir/ ;;
8324  esac
8325    for ac_exec_ext in '' $ac_executable_extensions; do
8326  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
8327    ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog"
8328    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
8329    break 2
8330  fi
8331done
8332  done
8333IFS=$as_save_IFS
8334
8335fi
8336fi
8337DUMPBIN=$ac_cv_prog_DUMPBIN
8338if test -n "$DUMPBIN"; then
8339  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
8340printf "%s\n" "$DUMPBIN" >&6; }
8341else
8342  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
8343printf "%s\n" "no" >&6; }
8344fi
8345
8346
8347    test -n "$DUMPBIN" && break
8348  done
8349fi
8350if test -z "$DUMPBIN"; then
8351  ac_ct_DUMPBIN=$DUMPBIN
8352  for ac_prog in dumpbin "link -dump"
8353do
8354  # Extract the first word of "$ac_prog", so it can be a program name with args.
8355set dummy $ac_prog; ac_word=$2
8356{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8357printf %s "checking for $ac_word... " >&6; }
8358if test ${ac_cv_prog_ac_ct_DUMPBIN+y}
8359then :
8360  printf %s "(cached) " >&6
8361else $as_nop
8362  if test -n "$ac_ct_DUMPBIN"; then
8363  ac_cv_prog_ac_ct_DUMPBIN="$ac_ct_DUMPBIN" # Let the user override the test.
8364else
8365as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8366for as_dir in $PATH
8367do
8368  IFS=$as_save_IFS
8369  case $as_dir in #(((
8370    '') as_dir=./ ;;
8371    */) ;;
8372    *) as_dir=$as_dir/ ;;
8373  esac
8374    for ac_exec_ext in '' $ac_executable_extensions; do
8375  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
8376    ac_cv_prog_ac_ct_DUMPBIN="$ac_prog"
8377    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
8378    break 2
8379  fi
8380done
8381  done
8382IFS=$as_save_IFS
8383
8384fi
8385fi
8386ac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN
8387if test -n "$ac_ct_DUMPBIN"; then
8388  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DUMPBIN" >&5
8389printf "%s\n" "$ac_ct_DUMPBIN" >&6; }
8390else
8391  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
8392printf "%s\n" "no" >&6; }
8393fi
8394
8395
8396  test -n "$ac_ct_DUMPBIN" && break
8397done
8398
8399  if test "x$ac_ct_DUMPBIN" = x; then
8400    DUMPBIN=":"
8401  else
8402    case $cross_compiling:$ac_tool_warned in
8403yes:)
8404{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8405printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8406ac_tool_warned=yes ;;
8407esac
8408    DUMPBIN=$ac_ct_DUMPBIN
8409  fi
8410fi
8411
8412    case `$DUMPBIN -symbols -headers /dev/null 2>&1 | sed '1q'` in
8413    *COFF*)
8414      DUMPBIN="$DUMPBIN -symbols -headers"
8415      ;;
8416    *)
8417      DUMPBIN=:
8418      ;;
8419    esac
8420  fi
8421
8422  if test : != "$DUMPBIN"; then
8423    NM=$DUMPBIN
8424  fi
8425fi
8426test -z "$NM" && NM=nm
8427
8428
8429
8430
8431
8432
8433{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface" >&5
8434printf %s "checking the name lister ($NM) interface... " >&6; }
8435if test ${lt_cv_nm_interface+y}
8436then :
8437  printf %s "(cached) " >&6
8438else $as_nop
8439  lt_cv_nm_interface="BSD nm"
8440  echo "int some_variable = 0;" > conftest.$ac_ext
8441  (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&5)
8442  (eval "$ac_compile" 2>conftest.err)
8443  cat conftest.err >&5
8444  (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
8445  (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
8446  cat conftest.err >&5
8447  (eval echo "\"\$as_me:$LINENO: output\"" >&5)
8448  cat conftest.out >&5
8449  if $GREP 'External.*some_variable' conftest.out > /dev/null; then
8450    lt_cv_nm_interface="MS dumpbin"
8451  fi
8452  rm -f conftest*
8453fi
8454{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_nm_interface" >&5
8455printf "%s\n" "$lt_cv_nm_interface" >&6; }
8456
8457{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
8458printf %s "checking whether ln -s works... " >&6; }
8459LN_S=$as_ln_s
8460if test "$LN_S" = "ln -s"; then
8461  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8462printf "%s\n" "yes" >&6; }
8463else
8464  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
8465printf "%s\n" "no, using $LN_S" >&6; }
8466fi
8467
8468# find the maximum length of command line arguments
8469{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5
8470printf %s "checking the maximum length of command line arguments... " >&6; }
8471if test ${lt_cv_sys_max_cmd_len+y}
8472then :
8473  printf %s "(cached) " >&6
8474else $as_nop
8475    i=0
8476  teststring=ABCD
8477
8478  case $build_os in
8479  msdosdjgpp*)
8480    # On DJGPP, this test can blow up pretty badly due to problems in libc
8481    # (any single argument exceeding 2000 bytes causes a buffer overrun
8482    # during glob expansion).  Even if it were fixed, the result of this
8483    # check would be larger than it should be.
8484    lt_cv_sys_max_cmd_len=12288;    # 12K is about right
8485    ;;
8486
8487  gnu*)
8488    # Under GNU Hurd, this test is not required because there is
8489    # no limit to the length of command line arguments.
8490    # Libtool will interpret -1 as no limit whatsoever
8491    lt_cv_sys_max_cmd_len=-1;
8492    ;;
8493
8494  cygwin* | mingw* | cegcc*)
8495    # On Win9x/ME, this test blows up -- it succeeds, but takes
8496    # about 5 minutes as the teststring grows exponentially.
8497    # Worse, since 9x/ME are not pre-emptively multitasking,
8498    # you end up with a "frozen" computer, even though with patience
8499    # the test eventually succeeds (with a max line length of 256k).
8500    # Instead, let's just punt: use the minimum linelength reported by
8501    # all of the supported platforms: 8192 (on NT/2K/XP).
8502    lt_cv_sys_max_cmd_len=8192;
8503    ;;
8504
8505  mint*)
8506    # On MiNT this can take a long time and run out of memory.
8507    lt_cv_sys_max_cmd_len=8192;
8508    ;;
8509
8510  amigaos*)
8511    # On AmigaOS with pdksh, this test takes hours, literally.
8512    # So we just punt and use a minimum line length of 8192.
8513    lt_cv_sys_max_cmd_len=8192;
8514    ;;
8515
8516  bitrig* | darwin* | dragonfly* | freebsd* | netbsd* | openbsd*)
8517    # This has been around since 386BSD, at least.  Likely further.
8518    if test -x /sbin/sysctl; then
8519      lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
8520    elif test -x /usr/sbin/sysctl; then
8521      lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
8522    else
8523      lt_cv_sys_max_cmd_len=65536	# usable default for all BSDs
8524    fi
8525    # And add a safety zone
8526    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
8527    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
8528    ;;
8529
8530  interix*)
8531    # We know the value 262144 and hardcode it with a safety zone (like BSD)
8532    lt_cv_sys_max_cmd_len=196608
8533    ;;
8534
8535  os2*)
8536    # The test takes a long time on OS/2.
8537    lt_cv_sys_max_cmd_len=8192
8538    ;;
8539
8540  osf*)
8541    # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
8542    # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
8543    # nice to cause kernel panics so lets avoid the loop below.
8544    # First set a reasonable default.
8545    lt_cv_sys_max_cmd_len=16384
8546    #
8547    if test -x /sbin/sysconfig; then
8548      case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
8549        *1*) lt_cv_sys_max_cmd_len=-1 ;;
8550      esac
8551    fi
8552    ;;
8553  sco3.2v5*)
8554    lt_cv_sys_max_cmd_len=102400
8555    ;;
8556  sysv5* | sco5v6* | sysv4.2uw2*)
8557    kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
8558    if test -n "$kargmax"; then
8559      lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[	 ]//'`
8560    else
8561      lt_cv_sys_max_cmd_len=32768
8562    fi
8563    ;;
8564  *)
8565    lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
8566    if test -n "$lt_cv_sys_max_cmd_len" && \
8567       test undefined != "$lt_cv_sys_max_cmd_len"; then
8568      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
8569      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
8570    else
8571      # Make teststring a little bigger before we do anything with it.
8572      # a 1K string should be a reasonable start.
8573      for i in 1 2 3 4 5 6 7 8; do
8574        teststring=$teststring$teststring
8575      done
8576      SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
8577      # If test is not a shell built-in, we'll probably end up computing a
8578      # maximum length that is only half of the actual maximum length, but
8579      # we can't tell.
8580      while { test X`env echo "$teststring$teststring" 2>/dev/null` \
8581	         = "X$teststring$teststring"; } >/dev/null 2>&1 &&
8582	      test 17 != "$i" # 1/2 MB should be enough
8583      do
8584        i=`expr $i + 1`
8585        teststring=$teststring$teststring
8586      done
8587      # Only check the string length outside the loop.
8588      lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
8589      teststring=
8590      # Add a significant safety factor because C++ compilers can tack on
8591      # massive amounts of additional arguments before passing them to the
8592      # linker.  It appears as though 1/2 is a usable value.
8593      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
8594    fi
8595    ;;
8596  esac
8597
8598fi
8599
8600if test -n "$lt_cv_sys_max_cmd_len"; then
8601  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len" >&5
8602printf "%s\n" "$lt_cv_sys_max_cmd_len" >&6; }
8603else
8604  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none" >&5
8605printf "%s\n" "none" >&6; }
8606fi
8607max_cmd_len=$lt_cv_sys_max_cmd_len
8608
8609
8610
8611
8612
8613
8614: ${CP="cp -f"}
8615: ${MV="mv -f"}
8616: ${RM="rm -f"}
8617
8618if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
8619  lt_unset=unset
8620else
8621  lt_unset=false
8622fi
8623
8624
8625
8626
8627
8628# test EBCDIC or ASCII
8629case `echo X|tr X '\101'` in
8630 A) # ASCII based system
8631    # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
8632  lt_SP2NL='tr \040 \012'
8633  lt_NL2SP='tr \015\012 \040\040'
8634  ;;
8635 *) # EBCDIC based system
8636  lt_SP2NL='tr \100 \n'
8637  lt_NL2SP='tr \r\n \100\100'
8638  ;;
8639esac
8640
8641
8642
8643
8644
8645
8646
8647
8648
8649{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to $host format" >&5
8650printf %s "checking how to convert $build file names to $host format... " >&6; }
8651if test ${lt_cv_to_host_file_cmd+y}
8652then :
8653  printf %s "(cached) " >&6
8654else $as_nop
8655  case $host in
8656  *-*-mingw* )
8657    case $build in
8658      *-*-mingw* ) # actually msys
8659        lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32
8660        ;;
8661      *-*-cygwin* )
8662        lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32
8663        ;;
8664      * ) # otherwise, assume *nix
8665        lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32
8666        ;;
8667    esac
8668    ;;
8669  *-*-cygwin* )
8670    case $build in
8671      *-*-mingw* ) # actually msys
8672        lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin
8673        ;;
8674      *-*-cygwin* )
8675        lt_cv_to_host_file_cmd=func_convert_file_noop
8676        ;;
8677      * ) # otherwise, assume *nix
8678        lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin
8679        ;;
8680    esac
8681    ;;
8682  * ) # unhandled hosts (and "normal" native builds)
8683    lt_cv_to_host_file_cmd=func_convert_file_noop
8684    ;;
8685esac
8686
8687fi
8688
8689to_host_file_cmd=$lt_cv_to_host_file_cmd
8690{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_host_file_cmd" >&5
8691printf "%s\n" "$lt_cv_to_host_file_cmd" >&6; }
8692
8693
8694
8695
8696
8697{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format" >&5
8698printf %s "checking how to convert $build file names to toolchain format... " >&6; }
8699if test ${lt_cv_to_tool_file_cmd+y}
8700then :
8701  printf %s "(cached) " >&6
8702else $as_nop
8703  #assume ordinary cross tools, or native build.
8704lt_cv_to_tool_file_cmd=func_convert_file_noop
8705case $host in
8706  *-*-mingw* )
8707    case $build in
8708      *-*-mingw* ) # actually msys
8709        lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32
8710        ;;
8711    esac
8712    ;;
8713esac
8714
8715fi
8716
8717to_tool_file_cmd=$lt_cv_to_tool_file_cmd
8718{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_tool_file_cmd" >&5
8719printf "%s\n" "$lt_cv_to_tool_file_cmd" >&6; }
8720
8721
8722
8723
8724
8725{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5
8726printf %s "checking for $LD option to reload object files... " >&6; }
8727if test ${lt_cv_ld_reload_flag+y}
8728then :
8729  printf %s "(cached) " >&6
8730else $as_nop
8731  lt_cv_ld_reload_flag='-r'
8732fi
8733{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_reload_flag" >&5
8734printf "%s\n" "$lt_cv_ld_reload_flag" >&6; }
8735reload_flag=$lt_cv_ld_reload_flag
8736case $reload_flag in
8737"" | " "*) ;;
8738*) reload_flag=" $reload_flag" ;;
8739esac
8740reload_cmds='$LD$reload_flag -o $output$reload_objs'
8741case $host_os in
8742  cygwin* | mingw* | pw32* | cegcc*)
8743    if test yes != "$GCC"; then
8744      reload_cmds=false
8745    fi
8746    ;;
8747  darwin*)
8748    if test yes = "$GCC"; then
8749      reload_cmds='$LTCC $LTCFLAGS -nostdlib $wl-r -o $output$reload_objs'
8750    else
8751      reload_cmds='$LD$reload_flag -o $output$reload_objs'
8752    fi
8753    ;;
8754esac
8755
8756
8757
8758
8759
8760
8761
8762
8763
8764if test -n "$ac_tool_prefix"; then
8765  # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
8766set dummy ${ac_tool_prefix}objdump; ac_word=$2
8767{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8768printf %s "checking for $ac_word... " >&6; }
8769if test ${ac_cv_prog_OBJDUMP+y}
8770then :
8771  printf %s "(cached) " >&6
8772else $as_nop
8773  if test -n "$OBJDUMP"; then
8774  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
8775else
8776as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8777for as_dir in $PATH
8778do
8779  IFS=$as_save_IFS
8780  case $as_dir in #(((
8781    '') as_dir=./ ;;
8782    */) ;;
8783    *) as_dir=$as_dir/ ;;
8784  esac
8785    for ac_exec_ext in '' $ac_executable_extensions; do
8786  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
8787    ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
8788    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
8789    break 2
8790  fi
8791done
8792  done
8793IFS=$as_save_IFS
8794
8795fi
8796fi
8797OBJDUMP=$ac_cv_prog_OBJDUMP
8798if test -n "$OBJDUMP"; then
8799  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
8800printf "%s\n" "$OBJDUMP" >&6; }
8801else
8802  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
8803printf "%s\n" "no" >&6; }
8804fi
8805
8806
8807fi
8808if test -z "$ac_cv_prog_OBJDUMP"; then
8809  ac_ct_OBJDUMP=$OBJDUMP
8810  # Extract the first word of "objdump", so it can be a program name with args.
8811set dummy objdump; ac_word=$2
8812{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8813printf %s "checking for $ac_word... " >&6; }
8814if test ${ac_cv_prog_ac_ct_OBJDUMP+y}
8815then :
8816  printf %s "(cached) " >&6
8817else $as_nop
8818  if test -n "$ac_ct_OBJDUMP"; then
8819  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
8820else
8821as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8822for as_dir in $PATH
8823do
8824  IFS=$as_save_IFS
8825  case $as_dir in #(((
8826    '') as_dir=./ ;;
8827    */) ;;
8828    *) as_dir=$as_dir/ ;;
8829  esac
8830    for ac_exec_ext in '' $ac_executable_extensions; do
8831  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
8832    ac_cv_prog_ac_ct_OBJDUMP="objdump"
8833    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
8834    break 2
8835  fi
8836done
8837  done
8838IFS=$as_save_IFS
8839
8840fi
8841fi
8842ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
8843if test -n "$ac_ct_OBJDUMP"; then
8844  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
8845printf "%s\n" "$ac_ct_OBJDUMP" >&6; }
8846else
8847  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
8848printf "%s\n" "no" >&6; }
8849fi
8850
8851  if test "x$ac_ct_OBJDUMP" = x; then
8852    OBJDUMP="false"
8853  else
8854    case $cross_compiling:$ac_tool_warned in
8855yes:)
8856{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8857printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8858ac_tool_warned=yes ;;
8859esac
8860    OBJDUMP=$ac_ct_OBJDUMP
8861  fi
8862else
8863  OBJDUMP="$ac_cv_prog_OBJDUMP"
8864fi
8865
8866test -z "$OBJDUMP" && OBJDUMP=objdump
8867
8868
8869
8870
8871
8872
8873
8874
8875
8876{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries" >&5
8877printf %s "checking how to recognize dependent libraries... " >&6; }
8878if test ${lt_cv_deplibs_check_method+y}
8879then :
8880  printf %s "(cached) " >&6
8881else $as_nop
8882  lt_cv_file_magic_cmd='$MAGIC_CMD'
8883lt_cv_file_magic_test_file=
8884lt_cv_deplibs_check_method='unknown'
8885# Need to set the preceding variable on all platforms that support
8886# interlibrary dependencies.
8887# 'none' -- dependencies not supported.
8888# 'unknown' -- same as none, but documents that we really don't know.
8889# 'pass_all' -- all dependencies passed with no checks.
8890# 'test_compile' -- check by making test program.
8891# 'file_magic [[regex]]' -- check by looking for files in library path
8892# that responds to the $file_magic_cmd with a given extended regex.
8893# If you have 'file' or equivalent on your system and you're not sure
8894# whether 'pass_all' will *always* work, you probably want this one.
8895
8896case $host_os in
8897aix[4-9]*)
8898  lt_cv_deplibs_check_method=pass_all
8899  ;;
8900
8901beos*)
8902  lt_cv_deplibs_check_method=pass_all
8903  ;;
8904
8905bsdi[45]*)
8906  lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
8907  lt_cv_file_magic_cmd='/usr/bin/file -L'
8908  lt_cv_file_magic_test_file=/shlib/libc.so
8909  ;;
8910
8911cygwin*)
8912  # func_win32_libid is a shell function defined in ltmain.sh
8913  lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
8914  lt_cv_file_magic_cmd='func_win32_libid'
8915  ;;
8916
8917mingw* | pw32*)
8918  # Base MSYS/MinGW do not provide the 'file' command needed by
8919  # func_win32_libid shell function, so use a weaker test based on 'objdump',
8920  # unless we find 'file', for example because we are cross-compiling.
8921  if ( file / ) >/dev/null 2>&1; then
8922    lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
8923    lt_cv_file_magic_cmd='func_win32_libid'
8924  else
8925    # Keep this pattern in sync with the one in func_win32_libid.
8926    lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)'
8927    lt_cv_file_magic_cmd='$OBJDUMP -f'
8928  fi
8929  ;;
8930
8931cegcc*)
8932  # use the weaker test based on 'objdump'. See mingw*.
8933  lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
8934  lt_cv_file_magic_cmd='$OBJDUMP -f'
8935  ;;
8936
8937darwin* | rhapsody*)
8938  lt_cv_deplibs_check_method=pass_all
8939  ;;
8940
8941freebsd* | dragonfly*)
8942  if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
8943    case $host_cpu in
8944    i*86 )
8945      # Not sure whether the presence of OpenBSD here was a mistake.
8946      # Let's accept both of them until this is cleared up.
8947      lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library'
8948      lt_cv_file_magic_cmd=/usr/bin/file
8949      lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
8950      ;;
8951    esac
8952  else
8953    lt_cv_deplibs_check_method=pass_all
8954  fi
8955  ;;
8956
8957haiku*)
8958  lt_cv_deplibs_check_method=pass_all
8959  ;;
8960
8961hpux10.20* | hpux11*)
8962  lt_cv_file_magic_cmd=/usr/bin/file
8963  case $host_cpu in
8964  ia64*)
8965    lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64'
8966    lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
8967    ;;
8968  hppa*64*)
8969    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]'
8970    lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
8971    ;;
8972  *)
8973    lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9]\.[0-9]) shared library'
8974    lt_cv_file_magic_test_file=/usr/lib/libc.sl
8975    ;;
8976  esac
8977  ;;
8978
8979interix[3-9]*)
8980  # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
8981  lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$'
8982  ;;
8983
8984irix5* | irix6* | nonstopux*)
8985  case $LD in
8986  *-32|*"-32 ") libmagic=32-bit;;
8987  *-n32|*"-n32 ") libmagic=N32;;
8988  *-64|*"-64 ") libmagic=64-bit;;
8989  *) libmagic=never-match;;
8990  esac
8991  lt_cv_deplibs_check_method=pass_all
8992  ;;
8993
8994# This must be glibc/ELF.
8995linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
8996  lt_cv_deplibs_check_method=pass_all
8997  ;;
8998
8999netbsd*)
9000  if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
9001    lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
9002  else
9003    lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$'
9004  fi
9005  ;;
9006
9007newos6*)
9008  lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'
9009  lt_cv_file_magic_cmd=/usr/bin/file
9010  lt_cv_file_magic_test_file=/usr/lib/libnls.so
9011  ;;
9012
9013*nto* | *qnx*)
9014  lt_cv_deplibs_check_method=pass_all
9015  ;;
9016
9017openbsd* | bitrig*)
9018  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
9019    lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$'
9020  else
9021    lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
9022  fi
9023  ;;
9024
9025osf3* | osf4* | osf5*)
9026  lt_cv_deplibs_check_method=pass_all
9027  ;;
9028
9029rdos*)
9030  lt_cv_deplibs_check_method=pass_all
9031  ;;
9032
9033solaris*)
9034  lt_cv_deplibs_check_method=pass_all
9035  ;;
9036
9037sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
9038  lt_cv_deplibs_check_method=pass_all
9039  ;;
9040
9041sysv4 | sysv4.3*)
9042  case $host_vendor in
9043  motorola)
9044    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]'
9045    lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
9046    ;;
9047  ncr)
9048    lt_cv_deplibs_check_method=pass_all
9049    ;;
9050  sequent)
9051    lt_cv_file_magic_cmd='/bin/file'
9052    lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'
9053    ;;
9054  sni)
9055    lt_cv_file_magic_cmd='/bin/file'
9056    lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib"
9057    lt_cv_file_magic_test_file=/lib/libc.so
9058    ;;
9059  siemens)
9060    lt_cv_deplibs_check_method=pass_all
9061    ;;
9062  pc)
9063    lt_cv_deplibs_check_method=pass_all
9064    ;;
9065  esac
9066  ;;
9067
9068tpf*)
9069  lt_cv_deplibs_check_method=pass_all
9070  ;;
9071os2*)
9072  lt_cv_deplibs_check_method=pass_all
9073  ;;
9074esac
9075
9076fi
9077{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5
9078printf "%s\n" "$lt_cv_deplibs_check_method" >&6; }
9079
9080file_magic_glob=
9081want_nocaseglob=no
9082if test "$build" = "$host"; then
9083  case $host_os in
9084  mingw* | pw32*)
9085    if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then
9086      want_nocaseglob=yes
9087    else
9088      file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[\1]\/[\1]\/g;/g"`
9089    fi
9090    ;;
9091  esac
9092fi
9093
9094file_magic_cmd=$lt_cv_file_magic_cmd
9095deplibs_check_method=$lt_cv_deplibs_check_method
9096test -z "$deplibs_check_method" && deplibs_check_method=unknown
9097
9098
9099
9100
9101
9102
9103
9104
9105
9106
9107
9108
9109
9110
9111
9112
9113
9114
9115
9116
9117
9118
9119if test -n "$ac_tool_prefix"; then
9120  # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
9121set dummy ${ac_tool_prefix}dlltool; ac_word=$2
9122{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9123printf %s "checking for $ac_word... " >&6; }
9124if test ${ac_cv_prog_DLLTOOL+y}
9125then :
9126  printf %s "(cached) " >&6
9127else $as_nop
9128  if test -n "$DLLTOOL"; then
9129  ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
9130else
9131as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9132for as_dir in $PATH
9133do
9134  IFS=$as_save_IFS
9135  case $as_dir in #(((
9136    '') as_dir=./ ;;
9137    */) ;;
9138    *) as_dir=$as_dir/ ;;
9139  esac
9140    for ac_exec_ext in '' $ac_executable_extensions; do
9141  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
9142    ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
9143    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
9144    break 2
9145  fi
9146done
9147  done
9148IFS=$as_save_IFS
9149
9150fi
9151fi
9152DLLTOOL=$ac_cv_prog_DLLTOOL
9153if test -n "$DLLTOOL"; then
9154  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5
9155printf "%s\n" "$DLLTOOL" >&6; }
9156else
9157  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
9158printf "%s\n" "no" >&6; }
9159fi
9160
9161
9162fi
9163if test -z "$ac_cv_prog_DLLTOOL"; then
9164  ac_ct_DLLTOOL=$DLLTOOL
9165  # Extract the first word of "dlltool", so it can be a program name with args.
9166set dummy dlltool; ac_word=$2
9167{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9168printf %s "checking for $ac_word... " >&6; }
9169if test ${ac_cv_prog_ac_ct_DLLTOOL+y}
9170then :
9171  printf %s "(cached) " >&6
9172else $as_nop
9173  if test -n "$ac_ct_DLLTOOL"; then
9174  ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
9175else
9176as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9177for as_dir in $PATH
9178do
9179  IFS=$as_save_IFS
9180  case $as_dir in #(((
9181    '') as_dir=./ ;;
9182    */) ;;
9183    *) as_dir=$as_dir/ ;;
9184  esac
9185    for ac_exec_ext in '' $ac_executable_extensions; do
9186  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
9187    ac_cv_prog_ac_ct_DLLTOOL="dlltool"
9188    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
9189    break 2
9190  fi
9191done
9192  done
9193IFS=$as_save_IFS
9194
9195fi
9196fi
9197ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
9198if test -n "$ac_ct_DLLTOOL"; then
9199  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5
9200printf "%s\n" "$ac_ct_DLLTOOL" >&6; }
9201else
9202  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
9203printf "%s\n" "no" >&6; }
9204fi
9205
9206  if test "x$ac_ct_DLLTOOL" = x; then
9207    DLLTOOL="false"
9208  else
9209    case $cross_compiling:$ac_tool_warned in
9210yes:)
9211{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9212printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9213ac_tool_warned=yes ;;
9214esac
9215    DLLTOOL=$ac_ct_DLLTOOL
9216  fi
9217else
9218  DLLTOOL="$ac_cv_prog_DLLTOOL"
9219fi
9220
9221test -z "$DLLTOOL" && DLLTOOL=dlltool
9222
9223
9224
9225
9226
9227
9228
9229
9230
9231
9232{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to associate runtime and link libraries" >&5
9233printf %s "checking how to associate runtime and link libraries... " >&6; }
9234if test ${lt_cv_sharedlib_from_linklib_cmd+y}
9235then :
9236  printf %s "(cached) " >&6
9237else $as_nop
9238  lt_cv_sharedlib_from_linklib_cmd='unknown'
9239
9240case $host_os in
9241cygwin* | mingw* | pw32* | cegcc*)
9242  # two different shell functions defined in ltmain.sh;
9243  # decide which one to use based on capabilities of $DLLTOOL
9244  case `$DLLTOOL --help 2>&1` in
9245  *--identify-strict*)
9246    lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib
9247    ;;
9248  *)
9249    lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback
9250    ;;
9251  esac
9252  ;;
9253*)
9254  # fallback: assume linklib IS sharedlib
9255  lt_cv_sharedlib_from_linklib_cmd=$ECHO
9256  ;;
9257esac
9258
9259fi
9260{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sharedlib_from_linklib_cmd" >&5
9261printf "%s\n" "$lt_cv_sharedlib_from_linklib_cmd" >&6; }
9262sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd
9263test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO
9264
9265
9266
9267
9268
9269
9270
9271if test -n "$ac_tool_prefix"; then
9272  for ac_prog in ar
9273  do
9274    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
9275set dummy $ac_tool_prefix$ac_prog; ac_word=$2
9276{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9277printf %s "checking for $ac_word... " >&6; }
9278if test ${ac_cv_prog_AR+y}
9279then :
9280  printf %s "(cached) " >&6
9281else $as_nop
9282  if test -n "$AR"; then
9283  ac_cv_prog_AR="$AR" # Let the user override the test.
9284else
9285as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9286for as_dir in $PATH
9287do
9288  IFS=$as_save_IFS
9289  case $as_dir in #(((
9290    '') as_dir=./ ;;
9291    */) ;;
9292    *) as_dir=$as_dir/ ;;
9293  esac
9294    for ac_exec_ext in '' $ac_executable_extensions; do
9295  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
9296    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
9297    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
9298    break 2
9299  fi
9300done
9301  done
9302IFS=$as_save_IFS
9303
9304fi
9305fi
9306AR=$ac_cv_prog_AR
9307if test -n "$AR"; then
9308  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
9309printf "%s\n" "$AR" >&6; }
9310else
9311  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
9312printf "%s\n" "no" >&6; }
9313fi
9314
9315
9316    test -n "$AR" && break
9317  done
9318fi
9319if test -z "$AR"; then
9320  ac_ct_AR=$AR
9321  for ac_prog in ar
9322do
9323  # Extract the first word of "$ac_prog", so it can be a program name with args.
9324set dummy $ac_prog; ac_word=$2
9325{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9326printf %s "checking for $ac_word... " >&6; }
9327if test ${ac_cv_prog_ac_ct_AR+y}
9328then :
9329  printf %s "(cached) " >&6
9330else $as_nop
9331  if test -n "$ac_ct_AR"; then
9332  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
9333else
9334as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9335for as_dir in $PATH
9336do
9337  IFS=$as_save_IFS
9338  case $as_dir in #(((
9339    '') as_dir=./ ;;
9340    */) ;;
9341    *) as_dir=$as_dir/ ;;
9342  esac
9343    for ac_exec_ext in '' $ac_executable_extensions; do
9344  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
9345    ac_cv_prog_ac_ct_AR="$ac_prog"
9346    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
9347    break 2
9348  fi
9349done
9350  done
9351IFS=$as_save_IFS
9352
9353fi
9354fi
9355ac_ct_AR=$ac_cv_prog_ac_ct_AR
9356if test -n "$ac_ct_AR"; then
9357  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
9358printf "%s\n" "$ac_ct_AR" >&6; }
9359else
9360  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
9361printf "%s\n" "no" >&6; }
9362fi
9363
9364
9365  test -n "$ac_ct_AR" && break
9366done
9367
9368  if test "x$ac_ct_AR" = x; then
9369    AR="false"
9370  else
9371    case $cross_compiling:$ac_tool_warned in
9372yes:)
9373{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9374printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9375ac_tool_warned=yes ;;
9376esac
9377    AR=$ac_ct_AR
9378  fi
9379fi
9380
9381: ${AR=ar}
9382: ${AR_FLAGS=cru}
9383
9384
9385
9386
9387
9388
9389
9390
9391
9392
9393
9394{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support" >&5
9395printf %s "checking for archiver @FILE support... " >&6; }
9396if test ${lt_cv_ar_at_file+y}
9397then :
9398  printf %s "(cached) " >&6
9399else $as_nop
9400  lt_cv_ar_at_file=no
9401   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9402/* end confdefs.h.  */
9403
9404int
9405main (void)
9406{
9407
9408  ;
9409  return 0;
9410}
9411_ACEOF
9412if ac_fn_c_try_compile "$LINENO"
9413then :
9414  echo conftest.$ac_objext > conftest.lst
9415      lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&5'
9416      { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5
9417  (eval $lt_ar_try) 2>&5
9418  ac_status=$?
9419  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
9420  test $ac_status = 0; }
9421      if test 0 -eq "$ac_status"; then
9422	# Ensure the archiver fails upon bogus file names.
9423	rm -f conftest.$ac_objext libconftest.a
9424	{ { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5
9425  (eval $lt_ar_try) 2>&5
9426  ac_status=$?
9427  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
9428  test $ac_status = 0; }
9429	if test 0 -ne "$ac_status"; then
9430          lt_cv_ar_at_file=@
9431        fi
9432      fi
9433      rm -f conftest.* libconftest.a
9434
9435fi
9436rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
9437
9438fi
9439{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5
9440printf "%s\n" "$lt_cv_ar_at_file" >&6; }
9441
9442if test no = "$lt_cv_ar_at_file"; then
9443  archiver_list_spec=
9444else
9445  archiver_list_spec=$lt_cv_ar_at_file
9446fi
9447
9448
9449
9450
9451
9452
9453
9454if test -n "$ac_tool_prefix"; then
9455  # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
9456set dummy ${ac_tool_prefix}strip; ac_word=$2
9457{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9458printf %s "checking for $ac_word... " >&6; }
9459if test ${ac_cv_prog_STRIP+y}
9460then :
9461  printf %s "(cached) " >&6
9462else $as_nop
9463  if test -n "$STRIP"; then
9464  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
9465else
9466as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9467for as_dir in $PATH
9468do
9469  IFS=$as_save_IFS
9470  case $as_dir in #(((
9471    '') as_dir=./ ;;
9472    */) ;;
9473    *) as_dir=$as_dir/ ;;
9474  esac
9475    for ac_exec_ext in '' $ac_executable_extensions; do
9476  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
9477    ac_cv_prog_STRIP="${ac_tool_prefix}strip"
9478    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
9479    break 2
9480  fi
9481done
9482  done
9483IFS=$as_save_IFS
9484
9485fi
9486fi
9487STRIP=$ac_cv_prog_STRIP
9488if test -n "$STRIP"; then
9489  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
9490printf "%s\n" "$STRIP" >&6; }
9491else
9492  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
9493printf "%s\n" "no" >&6; }
9494fi
9495
9496
9497fi
9498if test -z "$ac_cv_prog_STRIP"; then
9499  ac_ct_STRIP=$STRIP
9500  # Extract the first word of "strip", so it can be a program name with args.
9501set dummy strip; ac_word=$2
9502{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9503printf %s "checking for $ac_word... " >&6; }
9504if test ${ac_cv_prog_ac_ct_STRIP+y}
9505then :
9506  printf %s "(cached) " >&6
9507else $as_nop
9508  if test -n "$ac_ct_STRIP"; then
9509  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
9510else
9511as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9512for as_dir in $PATH
9513do
9514  IFS=$as_save_IFS
9515  case $as_dir in #(((
9516    '') as_dir=./ ;;
9517    */) ;;
9518    *) as_dir=$as_dir/ ;;
9519  esac
9520    for ac_exec_ext in '' $ac_executable_extensions; do
9521  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
9522    ac_cv_prog_ac_ct_STRIP="strip"
9523    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
9524    break 2
9525  fi
9526done
9527  done
9528IFS=$as_save_IFS
9529
9530fi
9531fi
9532ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
9533if test -n "$ac_ct_STRIP"; then
9534  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
9535printf "%s\n" "$ac_ct_STRIP" >&6; }
9536else
9537  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
9538printf "%s\n" "no" >&6; }
9539fi
9540
9541  if test "x$ac_ct_STRIP" = x; then
9542    STRIP=":"
9543  else
9544    case $cross_compiling:$ac_tool_warned in
9545yes:)
9546{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9547printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9548ac_tool_warned=yes ;;
9549esac
9550    STRIP=$ac_ct_STRIP
9551  fi
9552else
9553  STRIP="$ac_cv_prog_STRIP"
9554fi
9555
9556test -z "$STRIP" && STRIP=:
9557
9558
9559
9560
9561
9562
9563if test -n "$ac_tool_prefix"; then
9564  # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
9565set dummy ${ac_tool_prefix}ranlib; ac_word=$2
9566{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9567printf %s "checking for $ac_word... " >&6; }
9568if test ${ac_cv_prog_RANLIB+y}
9569then :
9570  printf %s "(cached) " >&6
9571else $as_nop
9572  if test -n "$RANLIB"; then
9573  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
9574else
9575as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9576for as_dir in $PATH
9577do
9578  IFS=$as_save_IFS
9579  case $as_dir in #(((
9580    '') as_dir=./ ;;
9581    */) ;;
9582    *) as_dir=$as_dir/ ;;
9583  esac
9584    for ac_exec_ext in '' $ac_executable_extensions; do
9585  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
9586    ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
9587    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
9588    break 2
9589  fi
9590done
9591  done
9592IFS=$as_save_IFS
9593
9594fi
9595fi
9596RANLIB=$ac_cv_prog_RANLIB
9597if test -n "$RANLIB"; then
9598  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
9599printf "%s\n" "$RANLIB" >&6; }
9600else
9601  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
9602printf "%s\n" "no" >&6; }
9603fi
9604
9605
9606fi
9607if test -z "$ac_cv_prog_RANLIB"; then
9608  ac_ct_RANLIB=$RANLIB
9609  # Extract the first word of "ranlib", so it can be a program name with args.
9610set dummy ranlib; ac_word=$2
9611{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9612printf %s "checking for $ac_word... " >&6; }
9613if test ${ac_cv_prog_ac_ct_RANLIB+y}
9614then :
9615  printf %s "(cached) " >&6
9616else $as_nop
9617  if test -n "$ac_ct_RANLIB"; then
9618  ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
9619else
9620as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9621for as_dir in $PATH
9622do
9623  IFS=$as_save_IFS
9624  case $as_dir in #(((
9625    '') as_dir=./ ;;
9626    */) ;;
9627    *) as_dir=$as_dir/ ;;
9628  esac
9629    for ac_exec_ext in '' $ac_executable_extensions; do
9630  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
9631    ac_cv_prog_ac_ct_RANLIB="ranlib"
9632    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
9633    break 2
9634  fi
9635done
9636  done
9637IFS=$as_save_IFS
9638
9639fi
9640fi
9641ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
9642if test -n "$ac_ct_RANLIB"; then
9643  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
9644printf "%s\n" "$ac_ct_RANLIB" >&6; }
9645else
9646  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
9647printf "%s\n" "no" >&6; }
9648fi
9649
9650  if test "x$ac_ct_RANLIB" = x; then
9651    RANLIB=":"
9652  else
9653    case $cross_compiling:$ac_tool_warned in
9654yes:)
9655{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9656printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9657ac_tool_warned=yes ;;
9658esac
9659    RANLIB=$ac_ct_RANLIB
9660  fi
9661else
9662  RANLIB="$ac_cv_prog_RANLIB"
9663fi
9664
9665test -z "$RANLIB" && RANLIB=:
9666
9667
9668
9669
9670
9671
9672# Determine commands to create old-style static archives.
9673old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
9674old_postinstall_cmds='chmod 644 $oldlib'
9675old_postuninstall_cmds=
9676
9677if test -n "$RANLIB"; then
9678  case $host_os in
9679  bitrig* | openbsd*)
9680    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib"
9681    ;;
9682  *)
9683    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib"
9684    ;;
9685  esac
9686  old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib"
9687fi
9688
9689case $host_os in
9690  darwin*)
9691    lock_old_archive_extraction=yes ;;
9692  *)
9693    lock_old_archive_extraction=no ;;
9694esac
9695
9696
9697
9698
9699
9700
9701
9702
9703
9704
9705
9706
9707
9708
9709
9710
9711
9712
9713
9714
9715
9716for ac_prog in gawk mawk nawk awk
9717do
9718  # Extract the first word of "$ac_prog", so it can be a program name with args.
9719set dummy $ac_prog; ac_word=$2
9720{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9721printf %s "checking for $ac_word... " >&6; }
9722if test ${ac_cv_prog_AWK+y}
9723then :
9724  printf %s "(cached) " >&6
9725else $as_nop
9726  if test -n "$AWK"; then
9727  ac_cv_prog_AWK="$AWK" # Let the user override the test.
9728else
9729as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9730for as_dir in $PATH
9731do
9732  IFS=$as_save_IFS
9733  case $as_dir in #(((
9734    '') as_dir=./ ;;
9735    */) ;;
9736    *) as_dir=$as_dir/ ;;
9737  esac
9738    for ac_exec_ext in '' $ac_executable_extensions; do
9739  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
9740    ac_cv_prog_AWK="$ac_prog"
9741    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
9742    break 2
9743  fi
9744done
9745  done
9746IFS=$as_save_IFS
9747
9748fi
9749fi
9750AWK=$ac_cv_prog_AWK
9751if test -n "$AWK"; then
9752  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
9753printf "%s\n" "$AWK" >&6; }
9754else
9755  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
9756printf "%s\n" "no" >&6; }
9757fi
9758
9759
9760  test -n "$AWK" && break
9761done
9762
9763
9764
9765
9766
9767
9768
9769
9770
9771
9772
9773
9774
9775
9776
9777
9778
9779
9780
9781# If no C compiler was specified, use CC.
9782LTCC=${LTCC-"$CC"}
9783
9784# If no C compiler flags were specified, use CFLAGS.
9785LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
9786
9787# Allow CC to be a program name with arguments.
9788compiler=$CC
9789
9790
9791# Check for command to grab the raw symbol name followed by C symbol from nm.
9792{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5
9793printf %s "checking command to parse $NM output from $compiler object... " >&6; }
9794if test ${lt_cv_sys_global_symbol_pipe+y}
9795then :
9796  printf %s "(cached) " >&6
9797else $as_nop
9798
9799# These are sane defaults that work on at least a few old systems.
9800# [They come from Ultrix.  What could be older than Ultrix?!! ;)]
9801
9802# Character class describing NM global symbol codes.
9803symcode='[BCDEGRST]'
9804
9805# Regexp to match symbols that can be accessed directly from C.
9806sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
9807
9808# Define system-specific variables.
9809case $host_os in
9810aix*)
9811  symcode='[BCDT]'
9812  ;;
9813cygwin* | mingw* | pw32* | cegcc*)
9814  symcode='[ABCDGISTW]'
9815  ;;
9816hpux*)
9817  if test ia64 = "$host_cpu"; then
9818    symcode='[ABCDEGRST]'
9819  fi
9820  ;;
9821irix* | nonstopux*)
9822  symcode='[BCDEGRST]'
9823  ;;
9824osf*)
9825  symcode='[BCDEGQRST]'
9826  ;;
9827solaris*)
9828  symcode='[BDRT]'
9829  ;;
9830sco3.2v5*)
9831  symcode='[DT]'
9832  ;;
9833sysv4.2uw2*)
9834  symcode='[DT]'
9835  ;;
9836sysv5* | sco5v6* | unixware* | OpenUNIX*)
9837  symcode='[ABDT]'
9838  ;;
9839sysv4)
9840  symcode='[DFNSTU]'
9841  ;;
9842esac
9843
9844# If we're using GNU nm, then use its standard symbol codes.
9845case `$NM -V 2>&1` in
9846*GNU* | *'with BFD'*)
9847  symcode='[ABCDGIRSTW]' ;;
9848esac
9849
9850if test "$lt_cv_nm_interface" = "MS dumpbin"; then
9851  # Gets list of data symbols to import.
9852  lt_cv_sys_global_symbol_to_import="sed -n -e 's/^I .* \(.*\)$/\1/p'"
9853  # Adjust the below global symbol transforms to fixup imported variables.
9854  lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'"
9855  lt_c_name_hook=" -e 's/^I .* \(.*\)$/  {\"\1\", (void *) 0},/p'"
9856  lt_c_name_lib_hook="\
9857  -e 's/^I .* \(lib.*\)$/  {\"\1\", (void *) 0},/p'\
9858  -e 's/^I .* \(.*\)$/  {\"lib\1\", (void *) 0},/p'"
9859else
9860  # Disable hooks by default.
9861  lt_cv_sys_global_symbol_to_import=
9862  lt_cdecl_hook=
9863  lt_c_name_hook=
9864  lt_c_name_lib_hook=
9865fi
9866
9867# Transform an extracted symbol line into a proper C declaration.
9868# Some systems (esp. on ia64) link data and code symbols differently,
9869# so use this general approach.
9870lt_cv_sys_global_symbol_to_cdecl="sed -n"\
9871$lt_cdecl_hook\
9872" -e 's/^T .* \(.*\)$/extern int \1();/p'"\
9873" -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'"
9874
9875# Transform an extracted symbol line into symbol name and symbol address
9876lt_cv_sys_global_symbol_to_c_name_address="sed -n"\
9877$lt_c_name_hook\
9878" -e 's/^: \(.*\) .*$/  {\"\1\", (void *) 0},/p'"\
9879" -e 's/^$symcode$symcode* .* \(.*\)$/  {\"\1\", (void *) \&\1},/p'"
9880
9881# Transform an extracted symbol line into symbol name with lib prefix and
9882# symbol address.
9883lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n"\
9884$lt_c_name_lib_hook\
9885" -e 's/^: \(.*\) .*$/  {\"\1\", (void *) 0},/p'"\
9886" -e 's/^$symcode$symcode* .* \(lib.*\)$/  {\"\1\", (void *) \&\1},/p'"\
9887" -e 's/^$symcode$symcode* .* \(.*\)$/  {\"lib\1\", (void *) \&\1},/p'"
9888
9889# Handle CRLF in mingw tool chain
9890opt_cr=
9891case $build_os in
9892mingw*)
9893  opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
9894  ;;
9895esac
9896
9897# Try without a prefix underscore, then with it.
9898for ac_symprfx in "" "_"; do
9899
9900  # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
9901  symxfrm="\\1 $ac_symprfx\\2 \\2"
9902
9903  # Write the raw and C identifiers.
9904  if test "$lt_cv_nm_interface" = "MS dumpbin"; then
9905    # Fake it for dumpbin and say T for any non-static function,
9906    # D for any global variable and I for any imported variable.
9907    # Also find C++ and __fastcall symbols from MSVC++,
9908    # which start with @ or ?.
9909    lt_cv_sys_global_symbol_pipe="$AWK '"\
9910"     {last_section=section; section=\$ 3};"\
9911"     /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\
9912"     /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
9913"     /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\
9914"     /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\
9915"     /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\
9916"     \$ 0!~/External *\|/{next};"\
9917"     / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
9918"     {if(hide[section]) next};"\
9919"     {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\
9920"     {split(\$ 0,a,/\||\r/); split(a[2],s)};"\
9921"     s[1]~/^[@?]/{print f,s[1],s[1]; next};"\
9922"     s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\
9923"     ' prfx=^$ac_symprfx"
9924  else
9925    lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[	 ]\($symcode$symcode*\)[	 ][	 ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
9926  fi
9927  lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'"
9928
9929  # Check to see that the pipe works correctly.
9930  pipe_works=no
9931
9932  rm -f conftest*
9933  cat > conftest.$ac_ext <<_LT_EOF
9934#ifdef __cplusplus
9935extern "C" {
9936#endif
9937char nm_test_var;
9938void nm_test_func(void);
9939void nm_test_func(void){}
9940#ifdef __cplusplus
9941}
9942#endif
9943int main(){nm_test_var='a';nm_test_func();return(0);}
9944_LT_EOF
9945
9946  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
9947  (eval $ac_compile) 2>&5
9948  ac_status=$?
9949  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
9950  test $ac_status = 0; }; then
9951    # Now try to grab the symbols.
9952    nlist=conftest.nm
9953    if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist\""; } >&5
9954  (eval $NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) 2>&5
9955  ac_status=$?
9956  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
9957  test $ac_status = 0; } && test -s "$nlist"; then
9958      # Try sorting and uniquifying the output.
9959      if sort "$nlist" | uniq > "$nlist"T; then
9960	mv -f "$nlist"T "$nlist"
9961      else
9962	rm -f "$nlist"T
9963      fi
9964
9965      # Make sure that we snagged all the symbols we need.
9966      if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
9967	if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
9968	  cat <<_LT_EOF > conftest.$ac_ext
9969/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests.  */
9970#if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE
9971/* DATA imports from DLLs on WIN32 can't be const, because runtime
9972   relocations are performed -- see ld's documentation on pseudo-relocs.  */
9973# define LT_DLSYM_CONST
9974#elif defined __osf__
9975/* This system does not cope well with relocations in const data.  */
9976# define LT_DLSYM_CONST
9977#else
9978# define LT_DLSYM_CONST const
9979#endif
9980
9981#ifdef __cplusplus
9982extern "C" {
9983#endif
9984
9985_LT_EOF
9986	  # Now generate the symbol file.
9987	  eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
9988
9989	  cat <<_LT_EOF >> conftest.$ac_ext
9990
9991/* The mapping between symbol names and symbols.  */
9992LT_DLSYM_CONST struct {
9993  const char *name;
9994  void       *address;
9995}
9996lt__PROGRAM__LTX_preloaded_symbols[] =
9997{
9998  { "@PROGRAM@", (void *) 0 },
9999_LT_EOF
10000	  $SED "s/^$symcode$symcode* .* \(.*\)$/  {\"\1\", (void *) \&\1},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
10001	  cat <<\_LT_EOF >> conftest.$ac_ext
10002  {0, (void *) 0}
10003};
10004
10005/* This works around a problem in FreeBSD linker */
10006#ifdef FREEBSD_WORKAROUND
10007static const void *lt_preloaded_setup() {
10008  return lt__PROGRAM__LTX_preloaded_symbols;
10009}
10010#endif
10011
10012#ifdef __cplusplus
10013}
10014#endif
10015_LT_EOF
10016	  # Now try linking the two files.
10017	  mv conftest.$ac_objext conftstm.$ac_objext
10018	  lt_globsym_save_LIBS=$LIBS
10019	  lt_globsym_save_CFLAGS=$CFLAGS
10020	  LIBS=conftstm.$ac_objext
10021	  CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag"
10022	  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
10023  (eval $ac_link) 2>&5
10024  ac_status=$?
10025  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
10026  test $ac_status = 0; } && test -s conftest$ac_exeext; then
10027	    pipe_works=yes
10028	  fi
10029	  LIBS=$lt_globsym_save_LIBS
10030	  CFLAGS=$lt_globsym_save_CFLAGS
10031	else
10032	  echo "cannot find nm_test_func in $nlist" >&5
10033	fi
10034      else
10035	echo "cannot find nm_test_var in $nlist" >&5
10036      fi
10037    else
10038      echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5
10039    fi
10040  else
10041    echo "$progname: failed program was:" >&5
10042    cat conftest.$ac_ext >&5
10043  fi
10044  rm -rf conftest* conftst*
10045
10046  # Do not use the global_symbol_pipe unless it works.
10047  if test yes = "$pipe_works"; then
10048    break
10049  else
10050    lt_cv_sys_global_symbol_pipe=
10051  fi
10052done
10053
10054fi
10055
10056if test -z "$lt_cv_sys_global_symbol_pipe"; then
10057  lt_cv_sys_global_symbol_to_cdecl=
10058fi
10059if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
10060  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: failed" >&5
10061printf "%s\n" "failed" >&6; }
10062else
10063  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ok" >&5
10064printf "%s\n" "ok" >&6; }
10065fi
10066
10067# Response file support.
10068if test "$lt_cv_nm_interface" = "MS dumpbin"; then
10069  nm_file_list_spec='@'
10070elif $NM --help 2>/dev/null | grep '[@]FILE' >/dev/null; then
10071  nm_file_list_spec='@'
10072fi
10073
10074
10075
10076
10077
10078
10079
10080
10081
10082
10083
10084
10085
10086
10087
10088
10089
10090
10091
10092
10093
10094
10095
10096
10097
10098
10099
10100
10101
10102
10103
10104
10105
10106
10107
10108
10109
10110{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
10111printf %s "checking for sysroot... " >&6; }
10112
10113# Check whether --with-sysroot was given.
10114if test ${with_sysroot+y}
10115then :
10116  withval=$with_sysroot;
10117else $as_nop
10118  with_sysroot=no
10119fi
10120
10121
10122lt_sysroot=
10123case $with_sysroot in #(
10124 yes)
10125   if test yes = "$GCC"; then
10126     lt_sysroot=`$CC --print-sysroot 2>/dev/null`
10127   fi
10128   ;; #(
10129 /*)
10130   lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"`
10131   ;; #(
10132 no|'')
10133   ;; #(
10134 *)
10135   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $with_sysroot" >&5
10136printf "%s\n" "$with_sysroot" >&6; }
10137   as_fn_error $? "The sysroot must be an absolute path." "$LINENO" 5
10138   ;;
10139esac
10140
10141 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}" >&5
10142printf "%s\n" "${lt_sysroot:-no}" >&6; }
10143
10144
10145
10146
10147
10148{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a working dd" >&5
10149printf %s "checking for a working dd... " >&6; }
10150if test ${ac_cv_path_lt_DD+y}
10151then :
10152  printf %s "(cached) " >&6
10153else $as_nop
10154  printf 0123456789abcdef0123456789abcdef >conftest.i
10155cat conftest.i conftest.i >conftest2.i
10156: ${lt_DD:=$DD}
10157if test -z "$lt_DD"; then
10158  ac_path_lt_DD_found=false
10159  # Loop through the user's path and test for each of PROGNAME-LIST
10160  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10161for as_dir in $PATH
10162do
10163  IFS=$as_save_IFS
10164  case $as_dir in #(((
10165    '') as_dir=./ ;;
10166    */) ;;
10167    *) as_dir=$as_dir/ ;;
10168  esac
10169    for ac_prog in dd
10170   do
10171    for ac_exec_ext in '' $ac_executable_extensions; do
10172      ac_path_lt_DD="$as_dir$ac_prog$ac_exec_ext"
10173      as_fn_executable_p "$ac_path_lt_DD" || continue
10174if "$ac_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then
10175  cmp -s conftest.i conftest.out \
10176  && ac_cv_path_lt_DD="$ac_path_lt_DD" ac_path_lt_DD_found=:
10177fi
10178      $ac_path_lt_DD_found && break 3
10179    done
10180  done
10181  done
10182IFS=$as_save_IFS
10183  if test -z "$ac_cv_path_lt_DD"; then
10184    :
10185  fi
10186else
10187  ac_cv_path_lt_DD=$lt_DD
10188fi
10189
10190rm -f conftest.i conftest2.i conftest.out
10191fi
10192{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_lt_DD" >&5
10193printf "%s\n" "$ac_cv_path_lt_DD" >&6; }
10194
10195
10196{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to truncate binary pipes" >&5
10197printf %s "checking how to truncate binary pipes... " >&6; }
10198if test ${lt_cv_truncate_bin+y}
10199then :
10200  printf %s "(cached) " >&6
10201else $as_nop
10202  printf 0123456789abcdef0123456789abcdef >conftest.i
10203cat conftest.i conftest.i >conftest2.i
10204lt_cv_truncate_bin=
10205if "$ac_cv_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then
10206  cmp -s conftest.i conftest.out \
10207  && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1"
10208fi
10209rm -f conftest.i conftest2.i conftest.out
10210test -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q"
10211fi
10212{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_truncate_bin" >&5
10213printf "%s\n" "$lt_cv_truncate_bin" >&6; }
10214
10215
10216
10217
10218
10219
10220
10221# Calculate cc_basename.  Skip known compiler wrappers and cross-prefix.
10222func_cc_basename ()
10223{
10224    for cc_temp in $*""; do
10225      case $cc_temp in
10226        compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
10227        distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
10228        \-*) ;;
10229        *) break;;
10230      esac
10231    done
10232    func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
10233}
10234
10235# Check whether --enable-libtool-lock was given.
10236if test ${enable_libtool_lock+y}
10237then :
10238  enableval=$enable_libtool_lock;
10239fi
10240
10241test no = "$enable_libtool_lock" || enable_libtool_lock=yes
10242
10243# Some flags need to be propagated to the compiler or linker for good
10244# libtool support.
10245case $host in
10246ia64-*-hpux*)
10247  # Find out what ABI is being produced by ac_compile, and set mode
10248  # options accordingly.
10249  echo 'int i;' > conftest.$ac_ext
10250  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
10251  (eval $ac_compile) 2>&5
10252  ac_status=$?
10253  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
10254  test $ac_status = 0; }; then
10255    case `/usr/bin/file conftest.$ac_objext` in
10256      *ELF-32*)
10257	HPUX_IA64_MODE=32
10258	;;
10259      *ELF-64*)
10260	HPUX_IA64_MODE=64
10261	;;
10262    esac
10263  fi
10264  rm -rf conftest*
10265  ;;
10266*-*-irix6*)
10267  # Find out what ABI is being produced by ac_compile, and set linker
10268  # options accordingly.
10269  echo '#line '$LINENO' "configure"' > 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    if test yes = "$lt_cv_prog_gnu_ld"; then
10276      case `/usr/bin/file conftest.$ac_objext` in
10277	*32-bit*)
10278	  LD="${LD-ld} -melf32bsmip"
10279	  ;;
10280	*N32*)
10281	  LD="${LD-ld} -melf32bmipn32"
10282	  ;;
10283	*64-bit*)
10284	  LD="${LD-ld} -melf64bmip"
10285	;;
10286      esac
10287    else
10288      case `/usr/bin/file conftest.$ac_objext` in
10289	*32-bit*)
10290	  LD="${LD-ld} -32"
10291	  ;;
10292	*N32*)
10293	  LD="${LD-ld} -n32"
10294	  ;;
10295	*64-bit*)
10296	  LD="${LD-ld} -64"
10297	  ;;
10298      esac
10299    fi
10300  fi
10301  rm -rf conftest*
10302  ;;
10303
10304mips64*-*linux*)
10305  # Find out what ABI is being produced by ac_compile, and set linker
10306  # options accordingly.
10307  echo '#line '$LINENO' "configure"' > conftest.$ac_ext
10308  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
10309  (eval $ac_compile) 2>&5
10310  ac_status=$?
10311  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
10312  test $ac_status = 0; }; then
10313    emul=elf
10314    case `/usr/bin/file conftest.$ac_objext` in
10315      *32-bit*)
10316	emul="${emul}32"
10317	;;
10318      *64-bit*)
10319	emul="${emul}64"
10320	;;
10321    esac
10322    case `/usr/bin/file conftest.$ac_objext` in
10323      *MSB*)
10324	emul="${emul}btsmip"
10325	;;
10326      *LSB*)
10327	emul="${emul}ltsmip"
10328	;;
10329    esac
10330    case `/usr/bin/file conftest.$ac_objext` in
10331      *N32*)
10332	emul="${emul}n32"
10333	;;
10334    esac
10335    LD="${LD-ld} -m $emul"
10336  fi
10337  rm -rf conftest*
10338  ;;
10339
10340x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \
10341s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
10342  # Find out what ABI is being produced by ac_compile, and set linker
10343  # options accordingly.  Note that the listed cases only cover the
10344  # situations where additional linker options are needed (such as when
10345  # doing 32-bit compilation for a host where ld defaults to 64-bit, or
10346  # vice versa); the common cases where no linker options are needed do
10347  # not appear in the list.
10348  echo 'int i;' > conftest.$ac_ext
10349  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
10350  (eval $ac_compile) 2>&5
10351  ac_status=$?
10352  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
10353  test $ac_status = 0; }; then
10354    case `/usr/bin/file conftest.o` in
10355      *32-bit*)
10356	case $host in
10357	  x86_64-*kfreebsd*-gnu)
10358	    LD="${LD-ld} -m elf_i386_fbsd"
10359	    ;;
10360	  x86_64-*linux*)
10361	    case `/usr/bin/file conftest.o` in
10362	      *x86-64*)
10363		LD="${LD-ld} -m elf32_x86_64"
10364		;;
10365	      *)
10366		LD="${LD-ld} -m elf_i386"
10367		;;
10368	    esac
10369	    ;;
10370	  powerpc64le-*linux*)
10371	    LD="${LD-ld} -m elf32lppclinux"
10372	    ;;
10373	  powerpc64-*linux*)
10374	    LD="${LD-ld} -m elf32ppclinux"
10375	    ;;
10376	  s390x-*linux*)
10377	    LD="${LD-ld} -m elf_s390"
10378	    ;;
10379	  sparc64-*linux*)
10380	    LD="${LD-ld} -m elf32_sparc"
10381	    ;;
10382	esac
10383	;;
10384      *64-bit*)
10385	case $host in
10386	  x86_64-*kfreebsd*-gnu)
10387	    LD="${LD-ld} -m elf_x86_64_fbsd"
10388	    ;;
10389	  x86_64-*linux*)
10390	    LD="${LD-ld} -m elf_x86_64"
10391	    ;;
10392	  powerpcle-*linux*)
10393	    LD="${LD-ld} -m elf64lppc"
10394	    ;;
10395	  powerpc-*linux*)
10396	    LD="${LD-ld} -m elf64ppc"
10397	    ;;
10398	  s390*-*linux*|s390*-*tpf*)
10399	    LD="${LD-ld} -m elf64_s390"
10400	    ;;
10401	  sparc*-*linux*)
10402	    LD="${LD-ld} -m elf64_sparc"
10403	    ;;
10404	esac
10405	;;
10406    esac
10407  fi
10408  rm -rf conftest*
10409  ;;
10410
10411*-*-sco3.2v5*)
10412  # On SCO OpenServer 5, we need -belf to get full-featured binaries.
10413  SAVE_CFLAGS=$CFLAGS
10414  CFLAGS="$CFLAGS -belf"
10415  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5
10416printf %s "checking whether the C compiler needs -belf... " >&6; }
10417if test ${lt_cv_cc_needs_belf+y}
10418then :
10419  printf %s "(cached) " >&6
10420else $as_nop
10421  ac_ext=c
10422ac_cpp='$CPP $CPPFLAGS'
10423ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
10424ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
10425ac_compiler_gnu=$ac_cv_c_compiler_gnu
10426
10427     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10428/* end confdefs.h.  */
10429
10430int
10431main (void)
10432{
10433
10434  ;
10435  return 0;
10436}
10437_ACEOF
10438if ac_fn_c_try_link "$LINENO"
10439then :
10440  lt_cv_cc_needs_belf=yes
10441else $as_nop
10442  lt_cv_cc_needs_belf=no
10443fi
10444rm -f core conftest.err conftest.$ac_objext conftest.beam \
10445    conftest$ac_exeext conftest.$ac_ext
10446     ac_ext=c
10447ac_cpp='$CPP $CPPFLAGS'
10448ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
10449ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
10450ac_compiler_gnu=$ac_cv_c_compiler_gnu
10451
10452fi
10453{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5
10454printf "%s\n" "$lt_cv_cc_needs_belf" >&6; }
10455  if test yes != "$lt_cv_cc_needs_belf"; then
10456    # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
10457    CFLAGS=$SAVE_CFLAGS
10458  fi
10459  ;;
10460*-*solaris*)
10461  # Find out what ABI is being produced by ac_compile, and set linker
10462  # options accordingly.
10463  echo 'int i;' > conftest.$ac_ext
10464  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
10465  (eval $ac_compile) 2>&5
10466  ac_status=$?
10467  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
10468  test $ac_status = 0; }; then
10469    case `/usr/bin/file conftest.o` in
10470    *64-bit*)
10471      case $lt_cv_prog_gnu_ld in
10472      yes*)
10473        case $host in
10474        i?86-*-solaris*|x86_64-*-solaris*)
10475          LD="${LD-ld} -m elf_x86_64"
10476          ;;
10477        sparc*-*-solaris*)
10478          LD="${LD-ld} -m elf64_sparc"
10479          ;;
10480        esac
10481        # GNU ld 2.21 introduced _sol2 emulations.  Use them if available.
10482        if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then
10483          LD=${LD-ld}_sol2
10484        fi
10485        ;;
10486      *)
10487	if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
10488	  LD="${LD-ld} -64"
10489	fi
10490	;;
10491      esac
10492      ;;
10493    esac
10494  fi
10495  rm -rf conftest*
10496  ;;
10497esac
10498
10499need_locks=$enable_libtool_lock
10500
10501if test -n "$ac_tool_prefix"; then
10502  # Extract the first word of "${ac_tool_prefix}mt", so it can be a program name with args.
10503set dummy ${ac_tool_prefix}mt; ac_word=$2
10504{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10505printf %s "checking for $ac_word... " >&6; }
10506if test ${ac_cv_prog_MANIFEST_TOOL+y}
10507then :
10508  printf %s "(cached) " >&6
10509else $as_nop
10510  if test -n "$MANIFEST_TOOL"; then
10511  ac_cv_prog_MANIFEST_TOOL="$MANIFEST_TOOL" # Let the user override the test.
10512else
10513as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10514for as_dir in $PATH
10515do
10516  IFS=$as_save_IFS
10517  case $as_dir in #(((
10518    '') as_dir=./ ;;
10519    */) ;;
10520    *) as_dir=$as_dir/ ;;
10521  esac
10522    for ac_exec_ext in '' $ac_executable_extensions; do
10523  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
10524    ac_cv_prog_MANIFEST_TOOL="${ac_tool_prefix}mt"
10525    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
10526    break 2
10527  fi
10528done
10529  done
10530IFS=$as_save_IFS
10531
10532fi
10533fi
10534MANIFEST_TOOL=$ac_cv_prog_MANIFEST_TOOL
10535if test -n "$MANIFEST_TOOL"; then
10536  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MANIFEST_TOOL" >&5
10537printf "%s\n" "$MANIFEST_TOOL" >&6; }
10538else
10539  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
10540printf "%s\n" "no" >&6; }
10541fi
10542
10543
10544fi
10545if test -z "$ac_cv_prog_MANIFEST_TOOL"; then
10546  ac_ct_MANIFEST_TOOL=$MANIFEST_TOOL
10547  # Extract the first word of "mt", so it can be a program name with args.
10548set dummy mt; ac_word=$2
10549{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10550printf %s "checking for $ac_word... " >&6; }
10551if test ${ac_cv_prog_ac_ct_MANIFEST_TOOL+y}
10552then :
10553  printf %s "(cached) " >&6
10554else $as_nop
10555  if test -n "$ac_ct_MANIFEST_TOOL"; then
10556  ac_cv_prog_ac_ct_MANIFEST_TOOL="$ac_ct_MANIFEST_TOOL" # Let the user override the test.
10557else
10558as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10559for as_dir in $PATH
10560do
10561  IFS=$as_save_IFS
10562  case $as_dir in #(((
10563    '') as_dir=./ ;;
10564    */) ;;
10565    *) as_dir=$as_dir/ ;;
10566  esac
10567    for ac_exec_ext in '' $ac_executable_extensions; do
10568  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
10569    ac_cv_prog_ac_ct_MANIFEST_TOOL="mt"
10570    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
10571    break 2
10572  fi
10573done
10574  done
10575IFS=$as_save_IFS
10576
10577fi
10578fi
10579ac_ct_MANIFEST_TOOL=$ac_cv_prog_ac_ct_MANIFEST_TOOL
10580if test -n "$ac_ct_MANIFEST_TOOL"; then
10581  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MANIFEST_TOOL" >&5
10582printf "%s\n" "$ac_ct_MANIFEST_TOOL" >&6; }
10583else
10584  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
10585printf "%s\n" "no" >&6; }
10586fi
10587
10588  if test "x$ac_ct_MANIFEST_TOOL" = x; then
10589    MANIFEST_TOOL=":"
10590  else
10591    case $cross_compiling:$ac_tool_warned in
10592yes:)
10593{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
10594printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
10595ac_tool_warned=yes ;;
10596esac
10597    MANIFEST_TOOL=$ac_ct_MANIFEST_TOOL
10598  fi
10599else
10600  MANIFEST_TOOL="$ac_cv_prog_MANIFEST_TOOL"
10601fi
10602
10603test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt
10604{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool" >&5
10605printf %s "checking if $MANIFEST_TOOL is a manifest tool... " >&6; }
10606if test ${lt_cv_path_mainfest_tool+y}
10607then :
10608  printf %s "(cached) " >&6
10609else $as_nop
10610  lt_cv_path_mainfest_tool=no
10611  echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&5
10612  $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out
10613  cat conftest.err >&5
10614  if $GREP 'Manifest Tool' conftest.out > /dev/null; then
10615    lt_cv_path_mainfest_tool=yes
10616  fi
10617  rm -f conftest*
10618fi
10619{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5
10620printf "%s\n" "$lt_cv_path_mainfest_tool" >&6; }
10621if test yes != "$lt_cv_path_mainfest_tool"; then
10622  MANIFEST_TOOL=:
10623fi
10624
10625
10626
10627
10628
10629
10630  case $host_os in
10631    rhapsody* | darwin*)
10632    if test -n "$ac_tool_prefix"; then
10633  # Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args.
10634set dummy ${ac_tool_prefix}dsymutil; ac_word=$2
10635{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10636printf %s "checking for $ac_word... " >&6; }
10637if test ${ac_cv_prog_DSYMUTIL+y}
10638then :
10639  printf %s "(cached) " >&6
10640else $as_nop
10641  if test -n "$DSYMUTIL"; then
10642  ac_cv_prog_DSYMUTIL="$DSYMUTIL" # Let the user override the test.
10643else
10644as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10645for as_dir in $PATH
10646do
10647  IFS=$as_save_IFS
10648  case $as_dir in #(((
10649    '') as_dir=./ ;;
10650    */) ;;
10651    *) as_dir=$as_dir/ ;;
10652  esac
10653    for ac_exec_ext in '' $ac_executable_extensions; do
10654  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
10655    ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil"
10656    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
10657    break 2
10658  fi
10659done
10660  done
10661IFS=$as_save_IFS
10662
10663fi
10664fi
10665DSYMUTIL=$ac_cv_prog_DSYMUTIL
10666if test -n "$DSYMUTIL"; then
10667  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
10668printf "%s\n" "$DSYMUTIL" >&6; }
10669else
10670  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
10671printf "%s\n" "no" >&6; }
10672fi
10673
10674
10675fi
10676if test -z "$ac_cv_prog_DSYMUTIL"; then
10677  ac_ct_DSYMUTIL=$DSYMUTIL
10678  # Extract the first word of "dsymutil", so it can be a program name with args.
10679set dummy dsymutil; ac_word=$2
10680{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10681printf %s "checking for $ac_word... " >&6; }
10682if test ${ac_cv_prog_ac_ct_DSYMUTIL+y}
10683then :
10684  printf %s "(cached) " >&6
10685else $as_nop
10686  if test -n "$ac_ct_DSYMUTIL"; then
10687  ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # Let the user override the test.
10688else
10689as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10690for as_dir in $PATH
10691do
10692  IFS=$as_save_IFS
10693  case $as_dir in #(((
10694    '') as_dir=./ ;;
10695    */) ;;
10696    *) as_dir=$as_dir/ ;;
10697  esac
10698    for ac_exec_ext in '' $ac_executable_extensions; do
10699  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
10700    ac_cv_prog_ac_ct_DSYMUTIL="dsymutil"
10701    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
10702    break 2
10703  fi
10704done
10705  done
10706IFS=$as_save_IFS
10707
10708fi
10709fi
10710ac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL
10711if test -n "$ac_ct_DSYMUTIL"; then
10712  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DSYMUTIL" >&5
10713printf "%s\n" "$ac_ct_DSYMUTIL" >&6; }
10714else
10715  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
10716printf "%s\n" "no" >&6; }
10717fi
10718
10719  if test "x$ac_ct_DSYMUTIL" = x; then
10720    DSYMUTIL=":"
10721  else
10722    case $cross_compiling:$ac_tool_warned in
10723yes:)
10724{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
10725printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
10726ac_tool_warned=yes ;;
10727esac
10728    DSYMUTIL=$ac_ct_DSYMUTIL
10729  fi
10730else
10731  DSYMUTIL="$ac_cv_prog_DSYMUTIL"
10732fi
10733
10734    if test -n "$ac_tool_prefix"; then
10735  # Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args.
10736set dummy ${ac_tool_prefix}nmedit; ac_word=$2
10737{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10738printf %s "checking for $ac_word... " >&6; }
10739if test ${ac_cv_prog_NMEDIT+y}
10740then :
10741  printf %s "(cached) " >&6
10742else $as_nop
10743  if test -n "$NMEDIT"; then
10744  ac_cv_prog_NMEDIT="$NMEDIT" # Let the user override the test.
10745else
10746as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10747for as_dir in $PATH
10748do
10749  IFS=$as_save_IFS
10750  case $as_dir in #(((
10751    '') as_dir=./ ;;
10752    */) ;;
10753    *) as_dir=$as_dir/ ;;
10754  esac
10755    for ac_exec_ext in '' $ac_executable_extensions; do
10756  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
10757    ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit"
10758    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
10759    break 2
10760  fi
10761done
10762  done
10763IFS=$as_save_IFS
10764
10765fi
10766fi
10767NMEDIT=$ac_cv_prog_NMEDIT
10768if test -n "$NMEDIT"; then
10769  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $NMEDIT" >&5
10770printf "%s\n" "$NMEDIT" >&6; }
10771else
10772  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
10773printf "%s\n" "no" >&6; }
10774fi
10775
10776
10777fi
10778if test -z "$ac_cv_prog_NMEDIT"; then
10779  ac_ct_NMEDIT=$NMEDIT
10780  # Extract the first word of "nmedit", so it can be a program name with args.
10781set dummy nmedit; ac_word=$2
10782{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10783printf %s "checking for $ac_word... " >&6; }
10784if test ${ac_cv_prog_ac_ct_NMEDIT+y}
10785then :
10786  printf %s "(cached) " >&6
10787else $as_nop
10788  if test -n "$ac_ct_NMEDIT"; then
10789  ac_cv_prog_ac_ct_NMEDIT="$ac_ct_NMEDIT" # Let the user override the test.
10790else
10791as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10792for as_dir in $PATH
10793do
10794  IFS=$as_save_IFS
10795  case $as_dir in #(((
10796    '') as_dir=./ ;;
10797    */) ;;
10798    *) as_dir=$as_dir/ ;;
10799  esac
10800    for ac_exec_ext in '' $ac_executable_extensions; do
10801  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
10802    ac_cv_prog_ac_ct_NMEDIT="nmedit"
10803    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
10804    break 2
10805  fi
10806done
10807  done
10808IFS=$as_save_IFS
10809
10810fi
10811fi
10812ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT
10813if test -n "$ac_ct_NMEDIT"; then
10814  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NMEDIT" >&5
10815printf "%s\n" "$ac_ct_NMEDIT" >&6; }
10816else
10817  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
10818printf "%s\n" "no" >&6; }
10819fi
10820
10821  if test "x$ac_ct_NMEDIT" = x; then
10822    NMEDIT=":"
10823  else
10824    case $cross_compiling:$ac_tool_warned in
10825yes:)
10826{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
10827printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
10828ac_tool_warned=yes ;;
10829esac
10830    NMEDIT=$ac_ct_NMEDIT
10831  fi
10832else
10833  NMEDIT="$ac_cv_prog_NMEDIT"
10834fi
10835
10836    if test -n "$ac_tool_prefix"; then
10837  # Extract the first word of "${ac_tool_prefix}lipo", so it can be a program name with args.
10838set dummy ${ac_tool_prefix}lipo; ac_word=$2
10839{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10840printf %s "checking for $ac_word... " >&6; }
10841if test ${ac_cv_prog_LIPO+y}
10842then :
10843  printf %s "(cached) " >&6
10844else $as_nop
10845  if test -n "$LIPO"; then
10846  ac_cv_prog_LIPO="$LIPO" # Let the user override the test.
10847else
10848as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10849for as_dir in $PATH
10850do
10851  IFS=$as_save_IFS
10852  case $as_dir in #(((
10853    '') as_dir=./ ;;
10854    */) ;;
10855    *) as_dir=$as_dir/ ;;
10856  esac
10857    for ac_exec_ext in '' $ac_executable_extensions; do
10858  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
10859    ac_cv_prog_LIPO="${ac_tool_prefix}lipo"
10860    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
10861    break 2
10862  fi
10863done
10864  done
10865IFS=$as_save_IFS
10866
10867fi
10868fi
10869LIPO=$ac_cv_prog_LIPO
10870if test -n "$LIPO"; then
10871  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
10872printf "%s\n" "$LIPO" >&6; }
10873else
10874  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
10875printf "%s\n" "no" >&6; }
10876fi
10877
10878
10879fi
10880if test -z "$ac_cv_prog_LIPO"; then
10881  ac_ct_LIPO=$LIPO
10882  # Extract the first word of "lipo", so it can be a program name with args.
10883set dummy lipo; ac_word=$2
10884{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10885printf %s "checking for $ac_word... " >&6; }
10886if test ${ac_cv_prog_ac_ct_LIPO+y}
10887then :
10888  printf %s "(cached) " >&6
10889else $as_nop
10890  if test -n "$ac_ct_LIPO"; then
10891  ac_cv_prog_ac_ct_LIPO="$ac_ct_LIPO" # Let the user override the test.
10892else
10893as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10894for as_dir in $PATH
10895do
10896  IFS=$as_save_IFS
10897  case $as_dir in #(((
10898    '') as_dir=./ ;;
10899    */) ;;
10900    *) as_dir=$as_dir/ ;;
10901  esac
10902    for ac_exec_ext in '' $ac_executable_extensions; do
10903  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
10904    ac_cv_prog_ac_ct_LIPO="lipo"
10905    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
10906    break 2
10907  fi
10908done
10909  done
10910IFS=$as_save_IFS
10911
10912fi
10913fi
10914ac_ct_LIPO=$ac_cv_prog_ac_ct_LIPO
10915if test -n "$ac_ct_LIPO"; then
10916  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LIPO" >&5
10917printf "%s\n" "$ac_ct_LIPO" >&6; }
10918else
10919  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
10920printf "%s\n" "no" >&6; }
10921fi
10922
10923  if test "x$ac_ct_LIPO" = x; then
10924    LIPO=":"
10925  else
10926    case $cross_compiling:$ac_tool_warned in
10927yes:)
10928{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
10929printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
10930ac_tool_warned=yes ;;
10931esac
10932    LIPO=$ac_ct_LIPO
10933  fi
10934else
10935  LIPO="$ac_cv_prog_LIPO"
10936fi
10937
10938    if test -n "$ac_tool_prefix"; then
10939  # Extract the first word of "${ac_tool_prefix}otool", so it can be a program name with args.
10940set dummy ${ac_tool_prefix}otool; ac_word=$2
10941{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10942printf %s "checking for $ac_word... " >&6; }
10943if test ${ac_cv_prog_OTOOL+y}
10944then :
10945  printf %s "(cached) " >&6
10946else $as_nop
10947  if test -n "$OTOOL"; then
10948  ac_cv_prog_OTOOL="$OTOOL" # Let the user override the test.
10949else
10950as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10951for as_dir in $PATH
10952do
10953  IFS=$as_save_IFS
10954  case $as_dir in #(((
10955    '') as_dir=./ ;;
10956    */) ;;
10957    *) as_dir=$as_dir/ ;;
10958  esac
10959    for ac_exec_ext in '' $ac_executable_extensions; do
10960  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
10961    ac_cv_prog_OTOOL="${ac_tool_prefix}otool"
10962    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
10963    break 2
10964  fi
10965done
10966  done
10967IFS=$as_save_IFS
10968
10969fi
10970fi
10971OTOOL=$ac_cv_prog_OTOOL
10972if test -n "$OTOOL"; then
10973  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
10974printf "%s\n" "$OTOOL" >&6; }
10975else
10976  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
10977printf "%s\n" "no" >&6; }
10978fi
10979
10980
10981fi
10982if test -z "$ac_cv_prog_OTOOL"; then
10983  ac_ct_OTOOL=$OTOOL
10984  # Extract the first word of "otool", so it can be a program name with args.
10985set dummy otool; ac_word=$2
10986{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10987printf %s "checking for $ac_word... " >&6; }
10988if test ${ac_cv_prog_ac_ct_OTOOL+y}
10989then :
10990  printf %s "(cached) " >&6
10991else $as_nop
10992  if test -n "$ac_ct_OTOOL"; then
10993  ac_cv_prog_ac_ct_OTOOL="$ac_ct_OTOOL" # Let the user override the test.
10994else
10995as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10996for as_dir in $PATH
10997do
10998  IFS=$as_save_IFS
10999  case $as_dir in #(((
11000    '') as_dir=./ ;;
11001    */) ;;
11002    *) as_dir=$as_dir/ ;;
11003  esac
11004    for ac_exec_ext in '' $ac_executable_extensions; do
11005  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
11006    ac_cv_prog_ac_ct_OTOOL="otool"
11007    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
11008    break 2
11009  fi
11010done
11011  done
11012IFS=$as_save_IFS
11013
11014fi
11015fi
11016ac_ct_OTOOL=$ac_cv_prog_ac_ct_OTOOL
11017if test -n "$ac_ct_OTOOL"; then
11018  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL" >&5
11019printf "%s\n" "$ac_ct_OTOOL" >&6; }
11020else
11021  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
11022printf "%s\n" "no" >&6; }
11023fi
11024
11025  if test "x$ac_ct_OTOOL" = x; then
11026    OTOOL=":"
11027  else
11028    case $cross_compiling:$ac_tool_warned in
11029yes:)
11030{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
11031printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
11032ac_tool_warned=yes ;;
11033esac
11034    OTOOL=$ac_ct_OTOOL
11035  fi
11036else
11037  OTOOL="$ac_cv_prog_OTOOL"
11038fi
11039
11040    if test -n "$ac_tool_prefix"; then
11041  # Extract the first word of "${ac_tool_prefix}otool64", so it can be a program name with args.
11042set dummy ${ac_tool_prefix}otool64; ac_word=$2
11043{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11044printf %s "checking for $ac_word... " >&6; }
11045if test ${ac_cv_prog_OTOOL64+y}
11046then :
11047  printf %s "(cached) " >&6
11048else $as_nop
11049  if test -n "$OTOOL64"; then
11050  ac_cv_prog_OTOOL64="$OTOOL64" # Let the user override the test.
11051else
11052as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11053for as_dir in $PATH
11054do
11055  IFS=$as_save_IFS
11056  case $as_dir in #(((
11057    '') as_dir=./ ;;
11058    */) ;;
11059    *) as_dir=$as_dir/ ;;
11060  esac
11061    for ac_exec_ext in '' $ac_executable_extensions; do
11062  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
11063    ac_cv_prog_OTOOL64="${ac_tool_prefix}otool64"
11064    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
11065    break 2
11066  fi
11067done
11068  done
11069IFS=$as_save_IFS
11070
11071fi
11072fi
11073OTOOL64=$ac_cv_prog_OTOOL64
11074if test -n "$OTOOL64"; then
11075  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $OTOOL64" >&5
11076printf "%s\n" "$OTOOL64" >&6; }
11077else
11078  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
11079printf "%s\n" "no" >&6; }
11080fi
11081
11082
11083fi
11084if test -z "$ac_cv_prog_OTOOL64"; then
11085  ac_ct_OTOOL64=$OTOOL64
11086  # Extract the first word of "otool64", so it can be a program name with args.
11087set dummy otool64; ac_word=$2
11088{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11089printf %s "checking for $ac_word... " >&6; }
11090if test ${ac_cv_prog_ac_ct_OTOOL64+y}
11091then :
11092  printf %s "(cached) " >&6
11093else $as_nop
11094  if test -n "$ac_ct_OTOOL64"; then
11095  ac_cv_prog_ac_ct_OTOOL64="$ac_ct_OTOOL64" # Let the user override the test.
11096else
11097as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11098for as_dir in $PATH
11099do
11100  IFS=$as_save_IFS
11101  case $as_dir in #(((
11102    '') as_dir=./ ;;
11103    */) ;;
11104    *) as_dir=$as_dir/ ;;
11105  esac
11106    for ac_exec_ext in '' $ac_executable_extensions; do
11107  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
11108    ac_cv_prog_ac_ct_OTOOL64="otool64"
11109    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
11110    break 2
11111  fi
11112done
11113  done
11114IFS=$as_save_IFS
11115
11116fi
11117fi
11118ac_ct_OTOOL64=$ac_cv_prog_ac_ct_OTOOL64
11119if test -n "$ac_ct_OTOOL64"; then
11120  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL64" >&5
11121printf "%s\n" "$ac_ct_OTOOL64" >&6; }
11122else
11123  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
11124printf "%s\n" "no" >&6; }
11125fi
11126
11127  if test "x$ac_ct_OTOOL64" = x; then
11128    OTOOL64=":"
11129  else
11130    case $cross_compiling:$ac_tool_warned in
11131yes:)
11132{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
11133printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
11134ac_tool_warned=yes ;;
11135esac
11136    OTOOL64=$ac_ct_OTOOL64
11137  fi
11138else
11139  OTOOL64="$ac_cv_prog_OTOOL64"
11140fi
11141
11142
11143
11144
11145
11146
11147
11148
11149
11150
11151
11152
11153
11154
11155
11156
11157
11158
11159
11160
11161
11162
11163
11164
11165
11166
11167
11168    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for -single_module linker flag" >&5
11169printf %s "checking for -single_module linker flag... " >&6; }
11170if test ${lt_cv_apple_cc_single_mod+y}
11171then :
11172  printf %s "(cached) " >&6
11173else $as_nop
11174  lt_cv_apple_cc_single_mod=no
11175      if test -z "$LT_MULTI_MODULE"; then
11176	# By default we will add the -single_module flag. You can override
11177	# by either setting the environment variable LT_MULTI_MODULE
11178	# non-empty at configure time, or by adding -multi_module to the
11179	# link flags.
11180	rm -rf libconftest.dylib*
11181	echo "int foo(void){return 1;}" > conftest.c
11182	echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
11183-dynamiclib -Wl,-single_module conftest.c" >&5
11184	$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
11185	  -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
11186        _lt_result=$?
11187	# If there is a non-empty error log, and "single_module"
11188	# appears in it, assume the flag caused a linker warning
11189        if test -s conftest.err && $GREP single_module conftest.err; then
11190	  cat conftest.err >&5
11191	# Otherwise, if the output was created with a 0 exit code from
11192	# the compiler, it worked.
11193	elif test -f libconftest.dylib && test 0 = "$_lt_result"; then
11194	  lt_cv_apple_cc_single_mod=yes
11195	else
11196	  cat conftest.err >&5
11197	fi
11198	rm -rf libconftest.dylib*
11199	rm -f conftest.*
11200      fi
11201fi
11202{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5
11203printf "%s\n" "$lt_cv_apple_cc_single_mod" >&6; }
11204
11205    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5
11206printf %s "checking for -exported_symbols_list linker flag... " >&6; }
11207if test ${lt_cv_ld_exported_symbols_list+y}
11208then :
11209  printf %s "(cached) " >&6
11210else $as_nop
11211  lt_cv_ld_exported_symbols_list=no
11212      save_LDFLAGS=$LDFLAGS
11213      echo "_main" > conftest.sym
11214      LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
11215      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11216/* end confdefs.h.  */
11217
11218int
11219main (void)
11220{
11221
11222  ;
11223  return 0;
11224}
11225_ACEOF
11226if ac_fn_c_try_link "$LINENO"
11227then :
11228  lt_cv_ld_exported_symbols_list=yes
11229else $as_nop
11230  lt_cv_ld_exported_symbols_list=no
11231fi
11232rm -f core conftest.err conftest.$ac_objext conftest.beam \
11233    conftest$ac_exeext conftest.$ac_ext
11234	LDFLAGS=$save_LDFLAGS
11235
11236fi
11237{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5
11238printf "%s\n" "$lt_cv_ld_exported_symbols_list" >&6; }
11239
11240    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for -force_load linker flag" >&5
11241printf %s "checking for -force_load linker flag... " >&6; }
11242if test ${lt_cv_ld_force_load+y}
11243then :
11244  printf %s "(cached) " >&6
11245else $as_nop
11246  lt_cv_ld_force_load=no
11247      cat > conftest.c << _LT_EOF
11248int forced_loaded() { return 2;}
11249_LT_EOF
11250      echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&5
11251      $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5
11252      echo "$AR cru libconftest.a conftest.o" >&5
11253      $AR cru libconftest.a conftest.o 2>&5
11254      echo "$RANLIB libconftest.a" >&5
11255      $RANLIB libconftest.a 2>&5
11256      cat > conftest.c << _LT_EOF
11257int main() { return 0;}
11258_LT_EOF
11259      echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&5
11260      $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err
11261      _lt_result=$?
11262      if test -s conftest.err && $GREP force_load conftest.err; then
11263	cat conftest.err >&5
11264      elif test -f conftest && test 0 = "$_lt_result" && $GREP forced_load conftest >/dev/null 2>&1; then
11265	lt_cv_ld_force_load=yes
11266      else
11267	cat conftest.err >&5
11268      fi
11269        rm -f conftest.err libconftest.a conftest conftest.c
11270        rm -rf conftest.dSYM
11271
11272fi
11273{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_force_load" >&5
11274printf "%s\n" "$lt_cv_ld_force_load" >&6; }
11275    case $host_os in
11276    rhapsody* | darwin1.[012])
11277      _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;;
11278    darwin1.*)
11279      _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
11280    darwin*) # darwin 5.x on
11281      # if running on 10.5 or later, the deployment target defaults
11282      # to the OS version, if on x86, and 10.4, the deployment
11283      # target defaults to 10.4. Don't you love it?
11284      case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
11285	10.0,*86*-darwin8*|10.0,*-darwin[91]*)
11286	  _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
11287	10.[012][,.]*)
11288	  _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
11289	10.*)
11290	  _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
11291      esac
11292    ;;
11293  esac
11294    if test yes = "$lt_cv_apple_cc_single_mod"; then
11295      _lt_dar_single_mod='$single_module'
11296    fi
11297    if test yes = "$lt_cv_ld_exported_symbols_list"; then
11298      _lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym'
11299    else
11300      _lt_dar_export_syms='~$NMEDIT -s $output_objdir/$libname-symbols.expsym $lib'
11301    fi
11302    if test : != "$DSYMUTIL" && test no = "$lt_cv_ld_force_load"; then
11303      _lt_dsymutil='~$DSYMUTIL $lib || :'
11304    else
11305      _lt_dsymutil=
11306    fi
11307    ;;
11308  esac
11309
11310# func_munge_path_list VARIABLE PATH
11311# -----------------------------------
11312# VARIABLE is name of variable containing _space_ separated list of
11313# directories to be munged by the contents of PATH, which is string
11314# having a format:
11315# "DIR[:DIR]:"
11316#       string "DIR[ DIR]" will be prepended to VARIABLE
11317# ":DIR[:DIR]"
11318#       string "DIR[ DIR]" will be appended to VARIABLE
11319# "DIRP[:DIRP]::[DIRA:]DIRA"
11320#       string "DIRP[ DIRP]" will be prepended to VARIABLE and string
11321#       "DIRA[ DIRA]" will be appended to VARIABLE
11322# "DIR[:DIR]"
11323#       VARIABLE will be replaced by "DIR[ DIR]"
11324func_munge_path_list ()
11325{
11326    case x$2 in
11327    x)
11328        ;;
11329    *:)
11330        eval $1=\"`$ECHO $2 | $SED 's/:/ /g'` \$$1\"
11331        ;;
11332    x:*)
11333        eval $1=\"\$$1 `$ECHO $2 | $SED 's/:/ /g'`\"
11334        ;;
11335    *::*)
11336        eval $1=\"\$$1\ `$ECHO $2 | $SED -e 's/.*:://' -e 's/:/ /g'`\"
11337        eval $1=\"`$ECHO $2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \$$1\"
11338        ;;
11339    *)
11340        eval $1=\"`$ECHO $2 | $SED 's/:/ /g'`\"
11341        ;;
11342    esac
11343}
11344
11345ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default
11346"
11347if test "x$ac_cv_header_dlfcn_h" = xyes
11348then :
11349  printf "%s\n" "#define HAVE_DLFCN_H 1" >>confdefs.h
11350
11351fi
11352
11353
11354
11355
11356
11357
11358
11359# Set options
11360
11361
11362
11363        enable_dlopen=no
11364
11365
11366  enable_win32_dll=no
11367
11368
11369            # Check whether --enable-shared was given.
11370if test ${enable_shared+y}
11371then :
11372  enableval=$enable_shared; p=${PACKAGE-default}
11373    case $enableval in
11374    yes) enable_shared=yes ;;
11375    no) enable_shared=no ;;
11376    *)
11377      enable_shared=no
11378      # Look at the argument we got.  We use all the common list separators.
11379      lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
11380      for pkg in $enableval; do
11381	IFS=$lt_save_ifs
11382	if test "X$pkg" = "X$p"; then
11383	  enable_shared=yes
11384	fi
11385      done
11386      IFS=$lt_save_ifs
11387      ;;
11388    esac
11389else $as_nop
11390  enable_shared=yes
11391fi
11392
11393
11394
11395
11396
11397
11398
11399
11400
11401  # Check whether --enable-static was given.
11402if test ${enable_static+y}
11403then :
11404  enableval=$enable_static; p=${PACKAGE-default}
11405    case $enableval in
11406    yes) enable_static=yes ;;
11407    no) enable_static=no ;;
11408    *)
11409     enable_static=no
11410      # Look at the argument we got.  We use all the common list separators.
11411      lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
11412      for pkg in $enableval; do
11413	IFS=$lt_save_ifs
11414	if test "X$pkg" = "X$p"; then
11415	  enable_static=yes
11416	fi
11417      done
11418      IFS=$lt_save_ifs
11419      ;;
11420    esac
11421else $as_nop
11422  enable_static=yes
11423fi
11424
11425
11426
11427
11428
11429
11430
11431
11432
11433
11434# Check whether --with-pic was given.
11435if test ${with_pic+y}
11436then :
11437  withval=$with_pic; lt_p=${PACKAGE-default}
11438    case $withval in
11439    yes|no) pic_mode=$withval ;;
11440    *)
11441      pic_mode=default
11442      # Look at the argument we got.  We use all the common list separators.
11443      lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
11444      for lt_pkg in $withval; do
11445	IFS=$lt_save_ifs
11446	if test "X$lt_pkg" = "X$lt_p"; then
11447	  pic_mode=yes
11448	fi
11449      done
11450      IFS=$lt_save_ifs
11451      ;;
11452    esac
11453else $as_nop
11454  pic_mode=default
11455fi
11456
11457
11458
11459
11460
11461
11462
11463
11464  # Check whether --enable-fast-install was given.
11465if test ${enable_fast_install+y}
11466then :
11467  enableval=$enable_fast_install; p=${PACKAGE-default}
11468    case $enableval in
11469    yes) enable_fast_install=yes ;;
11470    no) enable_fast_install=no ;;
11471    *)
11472      enable_fast_install=no
11473      # Look at the argument we got.  We use all the common list separators.
11474      lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
11475      for pkg in $enableval; do
11476	IFS=$lt_save_ifs
11477	if test "X$pkg" = "X$p"; then
11478	  enable_fast_install=yes
11479	fi
11480      done
11481      IFS=$lt_save_ifs
11482      ;;
11483    esac
11484else $as_nop
11485  enable_fast_install=yes
11486fi
11487
11488
11489
11490
11491
11492
11493
11494
11495  shared_archive_member_spec=
11496case $host,$enable_shared in
11497power*-*-aix[5-9]*,yes)
11498  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking which variant of shared library versioning to provide" >&5
11499printf %s "checking which variant of shared library versioning to provide... " >&6; }
11500
11501# Check whether --with-aix-soname was given.
11502if test ${with_aix_soname+y}
11503then :
11504  withval=$with_aix_soname; case $withval in
11505    aix|svr4|both)
11506      ;;
11507    *)
11508      as_fn_error $? "Unknown argument to --with-aix-soname" "$LINENO" 5
11509      ;;
11510    esac
11511    lt_cv_with_aix_soname=$with_aix_soname
11512else $as_nop
11513  if test ${lt_cv_with_aix_soname+y}
11514then :
11515  printf %s "(cached) " >&6
11516else $as_nop
11517  lt_cv_with_aix_soname=aix
11518fi
11519
11520    with_aix_soname=$lt_cv_with_aix_soname
11521fi
11522
11523  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $with_aix_soname" >&5
11524printf "%s\n" "$with_aix_soname" >&6; }
11525  if test aix != "$with_aix_soname"; then
11526    # For the AIX way of multilib, we name the shared archive member
11527    # based on the bitwidth used, traditionally 'shr.o' or 'shr_64.o',
11528    # and 'shr.imp' or 'shr_64.imp', respectively, for the Import File.
11529    # Even when GNU compilers ignore OBJECT_MODE but need '-maix64' flag,
11530    # the AIX toolchain works better with OBJECT_MODE set (default 32).
11531    if test 64 = "${OBJECT_MODE-32}"; then
11532      shared_archive_member_spec=shr_64
11533    else
11534      shared_archive_member_spec=shr
11535    fi
11536  fi
11537  ;;
11538*)
11539  with_aix_soname=aix
11540  ;;
11541esac
11542
11543
11544
11545
11546
11547
11548
11549
11550
11551
11552# This can be used to rebuild libtool when needed
11553LIBTOOL_DEPS=$ltmain
11554
11555# Always use our own libtool.
11556LIBTOOL='$(SHELL) $(top_builddir)/libtool'
11557
11558
11559
11560
11561
11562
11563
11564
11565
11566
11567
11568
11569
11570
11571
11572
11573
11574
11575
11576
11577
11578
11579
11580
11581
11582
11583
11584
11585
11586
11587test -z "$LN_S" && LN_S="ln -s"
11588
11589
11590
11591
11592
11593
11594
11595
11596
11597
11598
11599
11600
11601
11602if test -n "${ZSH_VERSION+set}"; then
11603   setopt NO_GLOB_SUBST
11604fi
11605
11606{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5
11607printf %s "checking for objdir... " >&6; }
11608if test ${lt_cv_objdir+y}
11609then :
11610  printf %s "(cached) " >&6
11611else $as_nop
11612  rm -f .libs 2>/dev/null
11613mkdir .libs 2>/dev/null
11614if test -d .libs; then
11615  lt_cv_objdir=.libs
11616else
11617  # MS-DOS does not allow filenames that begin with a dot.
11618  lt_cv_objdir=_libs
11619fi
11620rmdir .libs 2>/dev/null
11621fi
11622{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_objdir" >&5
11623printf "%s\n" "$lt_cv_objdir" >&6; }
11624objdir=$lt_cv_objdir
11625
11626
11627
11628
11629
11630printf "%s\n" "#define LT_OBJDIR \"$lt_cv_objdir/\"" >>confdefs.h
11631
11632
11633
11634
11635case $host_os in
11636aix3*)
11637  # AIX sometimes has problems with the GCC collect2 program.  For some
11638  # reason, if we set the COLLECT_NAMES environment variable, the problems
11639  # vanish in a puff of smoke.
11640  if test set != "${COLLECT_NAMES+set}"; then
11641    COLLECT_NAMES=
11642    export COLLECT_NAMES
11643  fi
11644  ;;
11645esac
11646
11647# Global variables:
11648ofile=libtool
11649can_build_shared=yes
11650
11651# All known linkers require a '.a' archive for static linking (except MSVC,
11652# which needs '.lib').
11653libext=a
11654
11655with_gnu_ld=$lt_cv_prog_gnu_ld
11656
11657old_CC=$CC
11658old_CFLAGS=$CFLAGS
11659
11660# Set sane defaults for various variables
11661test -z "$CC" && CC=cc
11662test -z "$LTCC" && LTCC=$CC
11663test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
11664test -z "$LD" && LD=ld
11665test -z "$ac_objext" && ac_objext=o
11666
11667func_cc_basename $compiler
11668cc_basename=$func_cc_basename_result
11669
11670
11671# Only perform the check for file, if the check method requires it
11672test -z "$MAGIC_CMD" && MAGIC_CMD=file
11673case $deplibs_check_method in
11674file_magic*)
11675  if test "$file_magic_cmd" = '$MAGIC_CMD'; then
11676    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5
11677printf %s "checking for ${ac_tool_prefix}file... " >&6; }
11678if test ${lt_cv_path_MAGIC_CMD+y}
11679then :
11680  printf %s "(cached) " >&6
11681else $as_nop
11682  case $MAGIC_CMD in
11683[\\/*] |  ?:[\\/]*)
11684  lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path.
11685  ;;
11686*)
11687  lt_save_MAGIC_CMD=$MAGIC_CMD
11688  lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
11689  ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
11690  for ac_dir in $ac_dummy; do
11691    IFS=$lt_save_ifs
11692    test -z "$ac_dir" && ac_dir=.
11693    if test -f "$ac_dir/${ac_tool_prefix}file"; then
11694      lt_cv_path_MAGIC_CMD=$ac_dir/"${ac_tool_prefix}file"
11695      if test -n "$file_magic_test_file"; then
11696	case $deplibs_check_method in
11697	"file_magic "*)
11698	  file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
11699	  MAGIC_CMD=$lt_cv_path_MAGIC_CMD
11700	  if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
11701	    $EGREP "$file_magic_regex" > /dev/null; then
11702	    :
11703	  else
11704	    cat <<_LT_EOF 1>&2
11705
11706*** Warning: the command libtool uses to detect shared libraries,
11707*** $file_magic_cmd, produces output that libtool cannot recognize.
11708*** The result is that libtool may fail to recognize shared libraries
11709*** as such.  This will affect the creation of libtool libraries that
11710*** depend on shared libraries, but programs linked with such libtool
11711*** libraries will work regardless of this problem.  Nevertheless, you
11712*** may want to report the problem to your system manager and/or to
11713*** bug-libtool@gnu.org
11714
11715_LT_EOF
11716	  fi ;;
11717	esac
11718      fi
11719      break
11720    fi
11721  done
11722  IFS=$lt_save_ifs
11723  MAGIC_CMD=$lt_save_MAGIC_CMD
11724  ;;
11725esac
11726fi
11727
11728MAGIC_CMD=$lt_cv_path_MAGIC_CMD
11729if test -n "$MAGIC_CMD"; then
11730  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5
11731printf "%s\n" "$MAGIC_CMD" >&6; }
11732else
11733  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
11734printf "%s\n" "no" >&6; }
11735fi
11736
11737
11738
11739
11740
11741if test -z "$lt_cv_path_MAGIC_CMD"; then
11742  if test -n "$ac_tool_prefix"; then
11743    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for file" >&5
11744printf %s "checking for file... " >&6; }
11745if test ${lt_cv_path_MAGIC_CMD+y}
11746then :
11747  printf %s "(cached) " >&6
11748else $as_nop
11749  case $MAGIC_CMD in
11750[\\/*] |  ?:[\\/]*)
11751  lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path.
11752  ;;
11753*)
11754  lt_save_MAGIC_CMD=$MAGIC_CMD
11755  lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
11756  ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
11757  for ac_dir in $ac_dummy; do
11758    IFS=$lt_save_ifs
11759    test -z "$ac_dir" && ac_dir=.
11760    if test -f "$ac_dir/file"; then
11761      lt_cv_path_MAGIC_CMD=$ac_dir/"file"
11762      if test -n "$file_magic_test_file"; then
11763	case $deplibs_check_method in
11764	"file_magic "*)
11765	  file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
11766	  MAGIC_CMD=$lt_cv_path_MAGIC_CMD
11767	  if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
11768	    $EGREP "$file_magic_regex" > /dev/null; then
11769	    :
11770	  else
11771	    cat <<_LT_EOF 1>&2
11772
11773*** Warning: the command libtool uses to detect shared libraries,
11774*** $file_magic_cmd, produces output that libtool cannot recognize.
11775*** The result is that libtool may fail to recognize shared libraries
11776*** as such.  This will affect the creation of libtool libraries that
11777*** depend on shared libraries, but programs linked with such libtool
11778*** libraries will work regardless of this problem.  Nevertheless, you
11779*** may want to report the problem to your system manager and/or to
11780*** bug-libtool@gnu.org
11781
11782_LT_EOF
11783	  fi ;;
11784	esac
11785      fi
11786      break
11787    fi
11788  done
11789  IFS=$lt_save_ifs
11790  MAGIC_CMD=$lt_save_MAGIC_CMD
11791  ;;
11792esac
11793fi
11794
11795MAGIC_CMD=$lt_cv_path_MAGIC_CMD
11796if test -n "$MAGIC_CMD"; then
11797  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5
11798printf "%s\n" "$MAGIC_CMD" >&6; }
11799else
11800  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
11801printf "%s\n" "no" >&6; }
11802fi
11803
11804
11805  else
11806    MAGIC_CMD=:
11807  fi
11808fi
11809
11810  fi
11811  ;;
11812esac
11813
11814# Use C for the default configuration in the libtool script
11815
11816lt_save_CC=$CC
11817ac_ext=c
11818ac_cpp='$CPP $CPPFLAGS'
11819ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
11820ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
11821ac_compiler_gnu=$ac_cv_c_compiler_gnu
11822
11823
11824# Source file extension for C test sources.
11825ac_ext=c
11826
11827# Object file extension for compiled C test sources.
11828objext=o
11829objext=$objext
11830
11831# Code to be used in simple compile tests
11832lt_simple_compile_test_code="int some_variable = 0;"
11833
11834# Code to be used in simple link tests
11835lt_simple_link_test_code='int main(){return(0);}'
11836
11837
11838
11839
11840
11841
11842
11843# If no C compiler was specified, use CC.
11844LTCC=${LTCC-"$CC"}
11845
11846# If no C compiler flags were specified, use CFLAGS.
11847LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
11848
11849# Allow CC to be a program name with arguments.
11850compiler=$CC
11851
11852# Save the default compiler, since it gets overwritten when the other
11853# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
11854compiler_DEFAULT=$CC
11855
11856# save warnings/boilerplate of simple test code
11857ac_outfile=conftest.$ac_objext
11858echo "$lt_simple_compile_test_code" >conftest.$ac_ext
11859eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
11860_lt_compiler_boilerplate=`cat conftest.err`
11861$RM conftest*
11862
11863ac_outfile=conftest.$ac_objext
11864echo "$lt_simple_link_test_code" >conftest.$ac_ext
11865eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
11866_lt_linker_boilerplate=`cat conftest.err`
11867$RM -r conftest*
11868
11869
11870if test -n "$compiler"; then
11871
11872lt_prog_compiler_no_builtin_flag=
11873
11874if test yes = "$GCC"; then
11875  case $cc_basename in
11876  nvcc*)
11877    lt_prog_compiler_no_builtin_flag=' -Xcompiler -fno-builtin' ;;
11878  *)
11879    lt_prog_compiler_no_builtin_flag=' -fno-builtin' ;;
11880  esac
11881
11882  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
11883printf %s "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; }
11884if test ${lt_cv_prog_compiler_rtti_exceptions+y}
11885then :
11886  printf %s "(cached) " >&6
11887else $as_nop
11888  lt_cv_prog_compiler_rtti_exceptions=no
11889   ac_outfile=conftest.$ac_objext
11890   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
11891   lt_compiler_flag="-fno-rtti -fno-exceptions"  ## exclude from sc_useless_quotes_in_assignment
11892   # Insert the option either (1) after the last *FLAGS variable, or
11893   # (2) before a word containing "conftest.", or (3) at the end.
11894   # Note that $ac_compile itself does not contain backslashes and begins
11895   # with a dollar sign (not a hyphen), so the echo should work correctly.
11896   # The option is referenced via a variable to avoid confusing sed.
11897   lt_compile=`echo "$ac_compile" | $SED \
11898   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
11899   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
11900   -e 's:$: $lt_compiler_flag:'`
11901   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
11902   (eval "$lt_compile" 2>conftest.err)
11903   ac_status=$?
11904   cat conftest.err >&5
11905   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11906   if (exit $ac_status) && test -s "$ac_outfile"; then
11907     # The compiler can only warn and ignore the option if not recognized
11908     # So say no if there are warnings other than the usual output.
11909     $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
11910     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
11911     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
11912       lt_cv_prog_compiler_rtti_exceptions=yes
11913     fi
11914   fi
11915   $RM conftest*
11916
11917fi
11918{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5
11919printf "%s\n" "$lt_cv_prog_compiler_rtti_exceptions" >&6; }
11920
11921if test yes = "$lt_cv_prog_compiler_rtti_exceptions"; then
11922    lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions"
11923else
11924    :
11925fi
11926
11927fi
11928
11929
11930
11931
11932
11933
11934  lt_prog_compiler_wl=
11935lt_prog_compiler_pic=
11936lt_prog_compiler_static=
11937
11938
11939  if test yes = "$GCC"; then
11940    lt_prog_compiler_wl='-Wl,'
11941    lt_prog_compiler_static='-static'
11942
11943    case $host_os in
11944      aix*)
11945      # All AIX code is PIC.
11946      if test ia64 = "$host_cpu"; then
11947	# AIX 5 now supports IA64 processor
11948	lt_prog_compiler_static='-Bstatic'
11949      fi
11950      lt_prog_compiler_pic='-fPIC'
11951      ;;
11952
11953    amigaos*)
11954      case $host_cpu in
11955      powerpc)
11956            # see comment about AmigaOS4 .so support
11957            lt_prog_compiler_pic='-fPIC'
11958        ;;
11959      m68k)
11960            # FIXME: we need at least 68020 code to build shared libraries, but
11961            # adding the '-m68020' flag to GCC prevents building anything better,
11962            # like '-m68040'.
11963            lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4'
11964        ;;
11965      esac
11966      ;;
11967
11968    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
11969      # PIC is the default for these OSes.
11970      ;;
11971
11972    mingw* | cygwin* | pw32* | os2* | cegcc*)
11973      # This hack is so that the source file can tell whether it is being
11974      # built for inclusion in a dll (and should export symbols for example).
11975      # Although the cygwin gcc ignores -fPIC, still need this for old-style
11976      # (--disable-auto-import) libraries
11977      lt_prog_compiler_pic='-DDLL_EXPORT'
11978      case $host_os in
11979      os2*)
11980	lt_prog_compiler_static='$wl-static'
11981	;;
11982      esac
11983      ;;
11984
11985    darwin* | rhapsody*)
11986      # PIC is the default on this platform
11987      # Common symbols not allowed in MH_DYLIB files
11988      lt_prog_compiler_pic='-fno-common'
11989      ;;
11990
11991    haiku*)
11992      # PIC is the default for Haiku.
11993      # The "-static" flag exists, but is broken.
11994      lt_prog_compiler_static=
11995      ;;
11996
11997    hpux*)
11998      # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
11999      # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
12000      # sets the default TLS model and affects inlining.
12001      case $host_cpu in
12002      hppa*64*)
12003	# +Z the default
12004	;;
12005      *)
12006	lt_prog_compiler_pic='-fPIC'
12007	;;
12008      esac
12009      ;;
12010
12011    interix[3-9]*)
12012      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
12013      # Instead, we relocate shared libraries at runtime.
12014      ;;
12015
12016    msdosdjgpp*)
12017      # Just because we use GCC doesn't mean we suddenly get shared libraries
12018      # on systems that don't support them.
12019      lt_prog_compiler_can_build_shared=no
12020      enable_shared=no
12021      ;;
12022
12023    *nto* | *qnx*)
12024      # QNX uses GNU C++, but need to define -shared option too, otherwise
12025      # it will coredump.
12026      lt_prog_compiler_pic='-fPIC -shared'
12027      ;;
12028
12029    sysv4*MP*)
12030      if test -d /usr/nec; then
12031	lt_prog_compiler_pic=-Kconform_pic
12032      fi
12033      ;;
12034
12035    *)
12036      lt_prog_compiler_pic='-fPIC'
12037      ;;
12038    esac
12039
12040    case $cc_basename in
12041    nvcc*) # Cuda Compiler Driver 2.2
12042      lt_prog_compiler_wl='-Xlinker '
12043      if test -n "$lt_prog_compiler_pic"; then
12044        lt_prog_compiler_pic="-Xcompiler $lt_prog_compiler_pic"
12045      fi
12046      ;;
12047    esac
12048  else
12049    # PORTME Check for flag to pass linker flags through the system compiler.
12050    case $host_os in
12051    aix*)
12052      lt_prog_compiler_wl='-Wl,'
12053      if test ia64 = "$host_cpu"; then
12054	# AIX 5 now supports IA64 processor
12055	lt_prog_compiler_static='-Bstatic'
12056      else
12057	lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp'
12058      fi
12059      ;;
12060
12061    darwin* | rhapsody*)
12062      # PIC is the default on this platform
12063      # Common symbols not allowed in MH_DYLIB files
12064      lt_prog_compiler_pic='-fno-common'
12065      case $cc_basename in
12066      nagfor*)
12067        # NAG Fortran compiler
12068        lt_prog_compiler_wl='-Wl,-Wl,,'
12069        lt_prog_compiler_pic='-PIC'
12070        lt_prog_compiler_static='-Bstatic'
12071        ;;
12072      esac
12073      ;;
12074
12075    mingw* | cygwin* | pw32* | os2* | cegcc*)
12076      # This hack is so that the source file can tell whether it is being
12077      # built for inclusion in a dll (and should export symbols for example).
12078      lt_prog_compiler_pic='-DDLL_EXPORT'
12079      case $host_os in
12080      os2*)
12081	lt_prog_compiler_static='$wl-static'
12082	;;
12083      esac
12084      ;;
12085
12086    hpux9* | hpux10* | hpux11*)
12087      lt_prog_compiler_wl='-Wl,'
12088      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
12089      # not for PA HP-UX.
12090      case $host_cpu in
12091      hppa*64*|ia64*)
12092	# +Z the default
12093	;;
12094      *)
12095	lt_prog_compiler_pic='+Z'
12096	;;
12097      esac
12098      # Is there a better lt_prog_compiler_static that works with the bundled CC?
12099      lt_prog_compiler_static='$wl-a ${wl}archive'
12100      ;;
12101
12102    irix5* | irix6* | nonstopux*)
12103      lt_prog_compiler_wl='-Wl,'
12104      # PIC (with -KPIC) is the default.
12105      lt_prog_compiler_static='-non_shared'
12106      ;;
12107
12108    linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
12109      case $cc_basename in
12110      # old Intel for x86_64, which still supported -KPIC.
12111      ecc*)
12112	lt_prog_compiler_wl='-Wl,'
12113	lt_prog_compiler_pic='-KPIC'
12114	lt_prog_compiler_static='-static'
12115        ;;
12116      # icc used to be incompatible with GCC.
12117      # ICC 10 doesn't accept -KPIC any more.
12118      icc* | ifort*)
12119	lt_prog_compiler_wl='-Wl,'
12120	lt_prog_compiler_pic='-fPIC'
12121	lt_prog_compiler_static='-static'
12122        ;;
12123      # Lahey Fortran 8.1.
12124      lf95*)
12125	lt_prog_compiler_wl='-Wl,'
12126	lt_prog_compiler_pic='--shared'
12127	lt_prog_compiler_static='--static'
12128	;;
12129      nagfor*)
12130	# NAG Fortran compiler
12131	lt_prog_compiler_wl='-Wl,-Wl,,'
12132	lt_prog_compiler_pic='-PIC'
12133	lt_prog_compiler_static='-Bstatic'
12134	;;
12135      tcc*)
12136	# Fabrice Bellard et al's Tiny C Compiler
12137	lt_prog_compiler_wl='-Wl,'
12138	lt_prog_compiler_pic='-fPIC'
12139	lt_prog_compiler_static='-static'
12140	;;
12141      pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
12142        # Portland Group compilers (*not* the Pentium gcc compiler,
12143	# which looks to be a dead project)
12144	lt_prog_compiler_wl='-Wl,'
12145	lt_prog_compiler_pic='-fpic'
12146	lt_prog_compiler_static='-Bstatic'
12147        ;;
12148      ccc*)
12149        lt_prog_compiler_wl='-Wl,'
12150        # All Alpha code is PIC.
12151        lt_prog_compiler_static='-non_shared'
12152        ;;
12153      xl* | bgxl* | bgf* | mpixl*)
12154	# IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene
12155	lt_prog_compiler_wl='-Wl,'
12156	lt_prog_compiler_pic='-qpic'
12157	lt_prog_compiler_static='-qstaticlink'
12158	;;
12159      *)
12160	case `$CC -V 2>&1 | sed 5q` in
12161	*Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [1-7].* | *Sun*Fortran*\ 8.[0-3]*)
12162	  # Sun Fortran 8.3 passes all unrecognized flags to the linker
12163	  lt_prog_compiler_pic='-KPIC'
12164	  lt_prog_compiler_static='-Bstatic'
12165	  lt_prog_compiler_wl=''
12166	  ;;
12167	*Sun\ F* | *Sun*Fortran*)
12168	  lt_prog_compiler_pic='-KPIC'
12169	  lt_prog_compiler_static='-Bstatic'
12170	  lt_prog_compiler_wl='-Qoption ld '
12171	  ;;
12172	*Sun\ C*)
12173	  # Sun C 5.9
12174	  lt_prog_compiler_pic='-KPIC'
12175	  lt_prog_compiler_static='-Bstatic'
12176	  lt_prog_compiler_wl='-Wl,'
12177	  ;;
12178        *Intel*\ [CF]*Compiler*)
12179	  lt_prog_compiler_wl='-Wl,'
12180	  lt_prog_compiler_pic='-fPIC'
12181	  lt_prog_compiler_static='-static'
12182	  ;;
12183	*Portland\ Group*)
12184	  lt_prog_compiler_wl='-Wl,'
12185	  lt_prog_compiler_pic='-fpic'
12186	  lt_prog_compiler_static='-Bstatic'
12187	  ;;
12188	esac
12189	;;
12190      esac
12191      ;;
12192
12193    newsos6)
12194      lt_prog_compiler_pic='-KPIC'
12195      lt_prog_compiler_static='-Bstatic'
12196      ;;
12197
12198    *nto* | *qnx*)
12199      # QNX uses GNU C++, but need to define -shared option too, otherwise
12200      # it will coredump.
12201      lt_prog_compiler_pic='-fPIC -shared'
12202      ;;
12203
12204    osf3* | osf4* | osf5*)
12205      lt_prog_compiler_wl='-Wl,'
12206      # All OSF/1 code is PIC.
12207      lt_prog_compiler_static='-non_shared'
12208      ;;
12209
12210    rdos*)
12211      lt_prog_compiler_static='-non_shared'
12212      ;;
12213
12214    solaris*)
12215      lt_prog_compiler_pic='-KPIC'
12216      lt_prog_compiler_static='-Bstatic'
12217      case $cc_basename in
12218      f77* | f90* | f95* | sunf77* | sunf90* | sunf95*)
12219	lt_prog_compiler_wl='-Qoption ld ';;
12220      *)
12221	lt_prog_compiler_wl='-Wl,';;
12222      esac
12223      ;;
12224
12225    sunos4*)
12226      lt_prog_compiler_wl='-Qoption ld '
12227      lt_prog_compiler_pic='-PIC'
12228      lt_prog_compiler_static='-Bstatic'
12229      ;;
12230
12231    sysv4 | sysv4.2uw2* | sysv4.3*)
12232      lt_prog_compiler_wl='-Wl,'
12233      lt_prog_compiler_pic='-KPIC'
12234      lt_prog_compiler_static='-Bstatic'
12235      ;;
12236
12237    sysv4*MP*)
12238      if test -d /usr/nec; then
12239	lt_prog_compiler_pic='-Kconform_pic'
12240	lt_prog_compiler_static='-Bstatic'
12241      fi
12242      ;;
12243
12244    sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
12245      lt_prog_compiler_wl='-Wl,'
12246      lt_prog_compiler_pic='-KPIC'
12247      lt_prog_compiler_static='-Bstatic'
12248      ;;
12249
12250    unicos*)
12251      lt_prog_compiler_wl='-Wl,'
12252      lt_prog_compiler_can_build_shared=no
12253      ;;
12254
12255    uts4*)
12256      lt_prog_compiler_pic='-pic'
12257      lt_prog_compiler_static='-Bstatic'
12258      ;;
12259
12260    *)
12261      lt_prog_compiler_can_build_shared=no
12262      ;;
12263    esac
12264  fi
12265
12266case $host_os in
12267  # For platforms that do not support PIC, -DPIC is meaningless:
12268  *djgpp*)
12269    lt_prog_compiler_pic=
12270    ;;
12271  *)
12272    lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC"
12273    ;;
12274esac
12275
12276{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5
12277printf %s "checking for $compiler option to produce PIC... " >&6; }
12278if test ${lt_cv_prog_compiler_pic+y}
12279then :
12280  printf %s "(cached) " >&6
12281else $as_nop
12282  lt_cv_prog_compiler_pic=$lt_prog_compiler_pic
12283fi
12284{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic" >&5
12285printf "%s\n" "$lt_cv_prog_compiler_pic" >&6; }
12286lt_prog_compiler_pic=$lt_cv_prog_compiler_pic
12287
12288#
12289# Check to make sure the PIC flag actually works.
12290#
12291if test -n "$lt_prog_compiler_pic"; then
12292  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5
12293printf %s "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; }
12294if test ${lt_cv_prog_compiler_pic_works+y}
12295then :
12296  printf %s "(cached) " >&6
12297else $as_nop
12298  lt_cv_prog_compiler_pic_works=no
12299   ac_outfile=conftest.$ac_objext
12300   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
12301   lt_compiler_flag="$lt_prog_compiler_pic -DPIC"  ## exclude from sc_useless_quotes_in_assignment
12302   # Insert the option either (1) after the last *FLAGS variable, or
12303   # (2) before a word containing "conftest.", or (3) at the end.
12304   # Note that $ac_compile itself does not contain backslashes and begins
12305   # with a dollar sign (not a hyphen), so the echo should work correctly.
12306   # The option is referenced via a variable to avoid confusing sed.
12307   lt_compile=`echo "$ac_compile" | $SED \
12308   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
12309   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
12310   -e 's:$: $lt_compiler_flag:'`
12311   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
12312   (eval "$lt_compile" 2>conftest.err)
12313   ac_status=$?
12314   cat conftest.err >&5
12315   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12316   if (exit $ac_status) && test -s "$ac_outfile"; then
12317     # The compiler can only warn and ignore the option if not recognized
12318     # So say no if there are warnings other than the usual output.
12319     $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
12320     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
12321     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
12322       lt_cv_prog_compiler_pic_works=yes
12323     fi
12324   fi
12325   $RM conftest*
12326
12327fi
12328{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5
12329printf "%s\n" "$lt_cv_prog_compiler_pic_works" >&6; }
12330
12331if test yes = "$lt_cv_prog_compiler_pic_works"; then
12332    case $lt_prog_compiler_pic in
12333     "" | " "*) ;;
12334     *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;;
12335     esac
12336else
12337    lt_prog_compiler_pic=
12338     lt_prog_compiler_can_build_shared=no
12339fi
12340
12341fi
12342
12343
12344
12345
12346
12347
12348
12349
12350
12351
12352
12353#
12354# Check to make sure the static flag actually works.
12355#
12356wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\"
12357{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5
12358printf %s "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; }
12359if test ${lt_cv_prog_compiler_static_works+y}
12360then :
12361  printf %s "(cached) " >&6
12362else $as_nop
12363  lt_cv_prog_compiler_static_works=no
12364   save_LDFLAGS=$LDFLAGS
12365   LDFLAGS="$LDFLAGS $lt_tmp_static_flag"
12366   echo "$lt_simple_link_test_code" > conftest.$ac_ext
12367   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
12368     # The linker can only warn and ignore the option if not recognized
12369     # So say no if there are warnings
12370     if test -s conftest.err; then
12371       # Append any errors to the config.log.
12372       cat conftest.err 1>&5
12373       $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
12374       $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
12375       if diff conftest.exp conftest.er2 >/dev/null; then
12376         lt_cv_prog_compiler_static_works=yes
12377       fi
12378     else
12379       lt_cv_prog_compiler_static_works=yes
12380     fi
12381   fi
12382   $RM -r conftest*
12383   LDFLAGS=$save_LDFLAGS
12384
12385fi
12386{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5
12387printf "%s\n" "$lt_cv_prog_compiler_static_works" >&6; }
12388
12389if test yes = "$lt_cv_prog_compiler_static_works"; then
12390    :
12391else
12392    lt_prog_compiler_static=
12393fi
12394
12395
12396
12397
12398
12399
12400
12401  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
12402printf %s "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
12403if test ${lt_cv_prog_compiler_c_o+y}
12404then :
12405  printf %s "(cached) " >&6
12406else $as_nop
12407  lt_cv_prog_compiler_c_o=no
12408   $RM -r conftest 2>/dev/null
12409   mkdir conftest
12410   cd conftest
12411   mkdir out
12412   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
12413
12414   lt_compiler_flag="-o out/conftest2.$ac_objext"
12415   # Insert the option either (1) after the last *FLAGS variable, or
12416   # (2) before a word containing "conftest.", or (3) at the end.
12417   # Note that $ac_compile itself does not contain backslashes and begins
12418   # with a dollar sign (not a hyphen), so the echo should work correctly.
12419   lt_compile=`echo "$ac_compile" | $SED \
12420   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
12421   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
12422   -e 's:$: $lt_compiler_flag:'`
12423   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
12424   (eval "$lt_compile" 2>out/conftest.err)
12425   ac_status=$?
12426   cat out/conftest.err >&5
12427   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12428   if (exit $ac_status) && test -s out/conftest2.$ac_objext
12429   then
12430     # The compiler can only warn and ignore the option if not recognized
12431     # So say no if there are warnings
12432     $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
12433     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
12434     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
12435       lt_cv_prog_compiler_c_o=yes
12436     fi
12437   fi
12438   chmod u+w . 2>&5
12439   $RM conftest*
12440   # SGI C++ compiler will create directory out/ii_files/ for
12441   # template instantiation
12442   test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
12443   $RM out/* && rmdir out
12444   cd ..
12445   $RM -r conftest
12446   $RM conftest*
12447
12448fi
12449{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5
12450printf "%s\n" "$lt_cv_prog_compiler_c_o" >&6; }
12451
12452
12453
12454
12455
12456
12457  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
12458printf %s "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
12459if test ${lt_cv_prog_compiler_c_o+y}
12460then :
12461  printf %s "(cached) " >&6
12462else $as_nop
12463  lt_cv_prog_compiler_c_o=no
12464   $RM -r conftest 2>/dev/null
12465   mkdir conftest
12466   cd conftest
12467   mkdir out
12468   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
12469
12470   lt_compiler_flag="-o out/conftest2.$ac_objext"
12471   # Insert the option either (1) after the last *FLAGS variable, or
12472   # (2) before a word containing "conftest.", or (3) at the end.
12473   # Note that $ac_compile itself does not contain backslashes and begins
12474   # with a dollar sign (not a hyphen), so the echo should work correctly.
12475   lt_compile=`echo "$ac_compile" | $SED \
12476   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
12477   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
12478   -e 's:$: $lt_compiler_flag:'`
12479   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
12480   (eval "$lt_compile" 2>out/conftest.err)
12481   ac_status=$?
12482   cat out/conftest.err >&5
12483   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12484   if (exit $ac_status) && test -s out/conftest2.$ac_objext
12485   then
12486     # The compiler can only warn and ignore the option if not recognized
12487     # So say no if there are warnings
12488     $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
12489     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
12490     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
12491       lt_cv_prog_compiler_c_o=yes
12492     fi
12493   fi
12494   chmod u+w . 2>&5
12495   $RM conftest*
12496   # SGI C++ compiler will create directory out/ii_files/ for
12497   # template instantiation
12498   test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
12499   $RM out/* && rmdir out
12500   cd ..
12501   $RM -r conftest
12502   $RM conftest*
12503
12504fi
12505{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5
12506printf "%s\n" "$lt_cv_prog_compiler_c_o" >&6; }
12507
12508
12509
12510
12511hard_links=nottested
12512if test no = "$lt_cv_prog_compiler_c_o" && test no != "$need_locks"; then
12513  # do not overwrite the value of need_locks provided by the user
12514  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5
12515printf %s "checking if we can lock with hard links... " >&6; }
12516  hard_links=yes
12517  $RM conftest*
12518  ln conftest.a conftest.b 2>/dev/null && hard_links=no
12519  touch conftest.a
12520  ln conftest.a conftest.b 2>&5 || hard_links=no
12521  ln conftest.a conftest.b 2>/dev/null && hard_links=no
12522  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5
12523printf "%s\n" "$hard_links" >&6; }
12524  if test no = "$hard_links"; then
12525    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&5
12526printf "%s\n" "$as_me: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&2;}
12527    need_locks=warn
12528  fi
12529else
12530  need_locks=no
12531fi
12532
12533
12534
12535
12536
12537
12538  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5
12539printf %s "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; }
12540
12541  runpath_var=
12542  allow_undefined_flag=
12543  always_export_symbols=no
12544  archive_cmds=
12545  archive_expsym_cmds=
12546  compiler_needs_object=no
12547  enable_shared_with_static_runtimes=no
12548  export_dynamic_flag_spec=
12549  export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
12550  hardcode_automatic=no
12551  hardcode_direct=no
12552  hardcode_direct_absolute=no
12553  hardcode_libdir_flag_spec=
12554  hardcode_libdir_separator=
12555  hardcode_minus_L=no
12556  hardcode_shlibpath_var=unsupported
12557  inherit_rpath=no
12558  link_all_deplibs=unknown
12559  module_cmds=
12560  module_expsym_cmds=
12561  old_archive_from_new_cmds=
12562  old_archive_from_expsyms_cmds=
12563  thread_safe_flag_spec=
12564  whole_archive_flag_spec=
12565  # include_expsyms should be a list of space-separated symbols to be *always*
12566  # included in the symbol list
12567  include_expsyms=
12568  # exclude_expsyms can be an extended regexp of symbols to exclude
12569  # it will be wrapped by ' (' and ')$', so one must not match beginning or
12570  # end of line.  Example: 'a|bc|.*d.*' will exclude the symbols 'a' and 'bc',
12571  # as well as any symbol that contains 'd'.
12572  exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'
12573  # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
12574  # platforms (ab)use it in PIC code, but their linkers get confused if
12575  # the symbol is explicitly referenced.  Since portable code cannot
12576  # rely on this symbol name, it's probably fine to never include it in
12577  # preloaded symbol tables.
12578  # Exclude shared library initialization/finalization symbols.
12579  extract_expsyms_cmds=
12580
12581  case $host_os in
12582  cygwin* | mingw* | pw32* | cegcc*)
12583    # FIXME: the MSVC++ port hasn't been tested in a loooong time
12584    # When not using gcc, we currently assume that we are using
12585    # Microsoft Visual C++.
12586    if test yes != "$GCC"; then
12587      with_gnu_ld=no
12588    fi
12589    ;;
12590  interix*)
12591    # we just hope/assume this is gcc and not c89 (= MSVC++)
12592    with_gnu_ld=yes
12593    ;;
12594  openbsd* | bitrig*)
12595    with_gnu_ld=no
12596    ;;
12597  esac
12598
12599  ld_shlibs=yes
12600
12601  # On some targets, GNU ld is compatible enough with the native linker
12602  # that we're better off using the native interface for both.
12603  lt_use_gnu_ld_interface=no
12604  if test yes = "$with_gnu_ld"; then
12605    case $host_os in
12606      aix*)
12607	# The AIX port of GNU ld has always aspired to compatibility
12608	# with the native linker.  However, as the warning in the GNU ld
12609	# block says, versions before 2.19.5* couldn't really create working
12610	# shared libraries, regardless of the interface used.
12611	case `$LD -v 2>&1` in
12612	  *\ \(GNU\ Binutils\)\ 2.19.5*) ;;
12613	  *\ \(GNU\ Binutils\)\ 2.[2-9]*) ;;
12614	  *\ \(GNU\ Binutils\)\ [3-9]*) ;;
12615	  *)
12616	    lt_use_gnu_ld_interface=yes
12617	    ;;
12618	esac
12619	;;
12620      *)
12621	lt_use_gnu_ld_interface=yes
12622	;;
12623    esac
12624  fi
12625
12626  if test yes = "$lt_use_gnu_ld_interface"; then
12627    # If archive_cmds runs LD, not CC, wlarc should be empty
12628    wlarc='$wl'
12629
12630    # Set some defaults for GNU ld with shared library support. These
12631    # are reset later if shared libraries are not supported. Putting them
12632    # here allows them to be overridden if necessary.
12633    runpath_var=LD_RUN_PATH
12634    hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
12635    export_dynamic_flag_spec='$wl--export-dynamic'
12636    # ancient GNU ld didn't support --whole-archive et. al.
12637    if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
12638      whole_archive_flag_spec=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
12639    else
12640      whole_archive_flag_spec=
12641    fi
12642    supports_anon_versioning=no
12643    case `$LD -v | $SED -e 's/(^)\+)\s\+//' 2>&1` in
12644      *GNU\ gold*) supports_anon_versioning=yes ;;
12645      *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11
12646      *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
12647      *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
12648      *\ 2.11.*) ;; # other 2.11 versions
12649      *) supports_anon_versioning=yes ;;
12650    esac
12651
12652    # See if GNU ld supports shared libraries.
12653    case $host_os in
12654    aix[3-9]*)
12655      # On AIX/PPC, the GNU linker is very broken
12656      if test ia64 != "$host_cpu"; then
12657	ld_shlibs=no
12658	cat <<_LT_EOF 1>&2
12659
12660*** Warning: the GNU linker, at least up to release 2.19, is reported
12661*** to be unable to reliably create shared libraries on AIX.
12662*** Therefore, libtool is disabling shared libraries support.  If you
12663*** really care for shared libraries, you may want to install binutils
12664*** 2.20 or above, or modify your PATH so that a non-GNU linker is found.
12665*** You will then need to restart the configuration process.
12666
12667_LT_EOF
12668      fi
12669      ;;
12670
12671    amigaos*)
12672      case $host_cpu in
12673      powerpc)
12674            # see comment about AmigaOS4 .so support
12675            archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
12676            archive_expsym_cmds=''
12677        ;;
12678      m68k)
12679            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)'
12680            hardcode_libdir_flag_spec='-L$libdir'
12681            hardcode_minus_L=yes
12682        ;;
12683      esac
12684      ;;
12685
12686    beos*)
12687      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
12688	allow_undefined_flag=unsupported
12689	# Joseph Beckenbach <jrb3@best.com> says some releases of gcc
12690	# support --undefined.  This deserves some investigation.  FIXME
12691	archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
12692      else
12693	ld_shlibs=no
12694      fi
12695      ;;
12696
12697    cygwin* | mingw* | pw32* | cegcc*)
12698      # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless,
12699      # as there is no search path for DLLs.
12700      hardcode_libdir_flag_spec='-L$libdir'
12701      export_dynamic_flag_spec='$wl--export-all-symbols'
12702      allow_undefined_flag=unsupported
12703      always_export_symbols=no
12704      enable_shared_with_static_runtimes=yes
12705      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'
12706      exclude_expsyms='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'
12707
12708      if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
12709        archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
12710	# If the export-symbols file already is a .def file, use it as
12711	# is; otherwise, prepend EXPORTS...
12712	archive_expsym_cmds='if   test DEF = "`$SED -n     -e '\''s/^[	 ]*//'\''     -e '\''/^\(;.*\)*$/d'\''     -e '\''s/^\(EXPORTS\|LIBRARY\)\([	 ].*\)*$/DEF/p'\''     -e q     $export_symbols`" ; then
12713          cp $export_symbols $output_objdir/$soname.def;
12714        else
12715          echo EXPORTS > $output_objdir/$soname.def;
12716          cat $export_symbols >> $output_objdir/$soname.def;
12717        fi~
12718        $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
12719      else
12720	ld_shlibs=no
12721      fi
12722      ;;
12723
12724    haiku*)
12725      archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
12726      link_all_deplibs=yes
12727      ;;
12728
12729    os2*)
12730      hardcode_libdir_flag_spec='-L$libdir'
12731      hardcode_minus_L=yes
12732      allow_undefined_flag=unsupported
12733      shrext_cmds=.dll
12734      archive_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
12735	$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
12736	$ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
12737	$ECHO EXPORTS >> $output_objdir/$libname.def~
12738	emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
12739	$CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
12740	emximp -o $lib $output_objdir/$libname.def'
12741      archive_expsym_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
12742	$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
12743	$ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
12744	$ECHO EXPORTS >> $output_objdir/$libname.def~
12745	prefix_cmds="$SED"~
12746	if test EXPORTS = "`$SED 1q $export_symbols`"; then
12747	  prefix_cmds="$prefix_cmds -e 1d";
12748	fi~
12749	prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
12750	cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
12751	$CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
12752	emximp -o $lib $output_objdir/$libname.def'
12753      old_archive_From_new_cmds='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
12754      enable_shared_with_static_runtimes=yes
12755      ;;
12756
12757    interix[3-9]*)
12758      hardcode_direct=no
12759      hardcode_shlibpath_var=no
12760      hardcode_libdir_flag_spec='$wl-rpath,$libdir'
12761      export_dynamic_flag_spec='$wl-E'
12762      # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
12763      # Instead, shared libraries are loaded at an image base (0x10000000 by
12764      # default) and relocated if they conflict, which is a slow very memory
12765      # consuming and fragmenting process.  To avoid this, we pick a random,
12766      # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
12767      # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
12768      archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
12769      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'
12770      ;;
12771
12772    gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
12773      tmp_diet=no
12774      if test linux-dietlibc = "$host_os"; then
12775	case $cc_basename in
12776	  diet\ *) tmp_diet=yes;;	# linux-dietlibc with static linking (!diet-dyn)
12777	esac
12778      fi
12779      if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
12780	 && test no = "$tmp_diet"
12781      then
12782	tmp_addflag=' $pic_flag'
12783	tmp_sharedflag='-shared'
12784	case $cc_basename,$host_cpu in
12785        pgcc*)				# Portland Group C compiler
12786	  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'
12787	  tmp_addflag=' $pic_flag'
12788	  ;;
12789	pgf77* | pgf90* | pgf95* | pgfortran*)
12790					# Portland Group f77 and f90 compilers
12791	  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'
12792	  tmp_addflag=' $pic_flag -Mnomain' ;;
12793	ecc*,ia64* | icc*,ia64*)	# Intel C compiler on ia64
12794	  tmp_addflag=' -i_dynamic' ;;
12795	efc*,ia64* | ifort*,ia64*)	# Intel Fortran compiler on ia64
12796	  tmp_addflag=' -i_dynamic -nofor_main' ;;
12797	ifc* | ifort*)			# Intel Fortran compiler
12798	  tmp_addflag=' -nofor_main' ;;
12799	lf95*)				# Lahey Fortran 8.1
12800	  whole_archive_flag_spec=
12801	  tmp_sharedflag='--shared' ;;
12802        nagfor*)                        # NAGFOR 5.3
12803          tmp_sharedflag='-Wl,-shared' ;;
12804	xl[cC]* | bgxl[cC]* | mpixl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below)
12805	  tmp_sharedflag='-qmkshrobj'
12806	  tmp_addflag= ;;
12807	nvcc*)	# Cuda Compiler Driver 2.2
12808	  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'
12809	  compiler_needs_object=yes
12810	  ;;
12811	esac
12812	case `$CC -V 2>&1 | sed 5q` in
12813	*Sun\ C*)			# Sun C 5.9
12814	  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'
12815	  compiler_needs_object=yes
12816	  tmp_sharedflag='-G' ;;
12817	*Sun\ F*)			# Sun Fortran 8.3
12818	  tmp_sharedflag='-G' ;;
12819	esac
12820	archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
12821
12822        if test yes = "$supports_anon_versioning"; then
12823          archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~
12824            cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
12825            echo "local: *; };" >> $output_objdir/$libname.ver~
12826            $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib'
12827        fi
12828
12829	case $cc_basename in
12830	tcc*)
12831	  export_dynamic_flag_spec='-rdynamic'
12832	  ;;
12833	xlf* | bgf* | bgxlf* | mpixlf*)
12834	  # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
12835	  whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive'
12836	  hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
12837	  archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
12838	  if test yes = "$supports_anon_versioning"; then
12839	    archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~
12840              cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
12841              echo "local: *; };" >> $output_objdir/$libname.ver~
12842              $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
12843	  fi
12844	  ;;
12845	esac
12846      else
12847        ld_shlibs=no
12848      fi
12849      ;;
12850
12851    netbsd*)
12852      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
12853	archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
12854	wlarc=
12855      else
12856	archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
12857	archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
12858      fi
12859      ;;
12860
12861    solaris*)
12862      if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
12863	ld_shlibs=no
12864	cat <<_LT_EOF 1>&2
12865
12866*** Warning: The releases 2.8.* of the GNU linker cannot reliably
12867*** create shared libraries on Solaris systems.  Therefore, libtool
12868*** is disabling shared libraries support.  We urge you to upgrade GNU
12869*** binutils to release 2.9.1 or newer.  Another option is to modify
12870*** your PATH or compiler configuration so that the native linker is
12871*** used, and then restart.
12872
12873_LT_EOF
12874      elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
12875	archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
12876	archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
12877      else
12878	ld_shlibs=no
12879      fi
12880      ;;
12881
12882    sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
12883      case `$LD -v 2>&1` in
12884        *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*)
12885	ld_shlibs=no
12886	cat <<_LT_EOF 1>&2
12887
12888*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot
12889*** reliably create shared libraries on SCO systems.  Therefore, libtool
12890*** is disabling shared libraries support.  We urge you to upgrade GNU
12891*** binutils to release 2.16.91.0.3 or newer.  Another option is to modify
12892*** your PATH or compiler configuration so that the native linker is
12893*** used, and then restart.
12894
12895_LT_EOF
12896	;;
12897	*)
12898	  # For security reasons, it is highly recommended that you always
12899	  # use absolute paths for naming shared libraries, and exclude the
12900	  # DT_RUNPATH tag from executables and libraries.  But doing so
12901	  # requires that you compile everything twice, which is a pain.
12902	  if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
12903	    hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
12904	    archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
12905	    archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
12906	  else
12907	    ld_shlibs=no
12908	  fi
12909	;;
12910      esac
12911      ;;
12912
12913    sunos4*)
12914      archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
12915      wlarc=
12916      hardcode_direct=yes
12917      hardcode_shlibpath_var=no
12918      ;;
12919
12920    *)
12921      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
12922	archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
12923	archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
12924      else
12925	ld_shlibs=no
12926      fi
12927      ;;
12928    esac
12929
12930    if test no = "$ld_shlibs"; then
12931      runpath_var=
12932      hardcode_libdir_flag_spec=
12933      export_dynamic_flag_spec=
12934      whole_archive_flag_spec=
12935    fi
12936  else
12937    # PORTME fill in a description of your system's linker (not GNU ld)
12938    case $host_os in
12939    aix3*)
12940      allow_undefined_flag=unsupported
12941      always_export_symbols=yes
12942      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'
12943      # Note: this linker hardcodes the directories in LIBPATH if there
12944      # are no directories specified by -L.
12945      hardcode_minus_L=yes
12946      if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then
12947	# Neither direct hardcoding nor static linking is supported with a
12948	# broken collect2.
12949	hardcode_direct=unsupported
12950      fi
12951      ;;
12952
12953    aix[4-9]*)
12954      if test ia64 = "$host_cpu"; then
12955	# On IA64, the linker does run time linking by default, so we don't
12956	# have to do anything special.
12957	aix_use_runtimelinking=no
12958	exp_sym_flag='-Bexport'
12959	no_entry_flag=
12960      else
12961	# If we're using GNU nm, then we don't want the "-C" option.
12962	# -C means demangle to GNU nm, but means don't demangle to AIX nm.
12963	# Without the "-l" option, or with the "-B" option, AIX nm treats
12964	# weak defined symbols like other global defined symbols, whereas
12965	# GNU nm marks them as "W".
12966	# While the 'weak' keyword is ignored in the Export File, we need
12967	# it in the Import File for the 'aix-soname' feature, so we have
12968	# to replace the "-B" option with "-P" for AIX nm.
12969	if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
12970	  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'
12971	else
12972	  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'
12973	fi
12974	aix_use_runtimelinking=no
12975
12976	# Test if we are trying to use run time linking or normal
12977	# AIX style linking. If -brtl is somewhere in LDFLAGS, we
12978	# have runtime linking enabled, and use it for executables.
12979	# For shared libraries, we enable/disable runtime linking
12980	# depending on the kind of the shared library created -
12981	# when "with_aix_soname,aix_use_runtimelinking" is:
12982	# "aix,no"   lib.a(lib.so.V) shared, rtl:no,  for executables
12983	# "aix,yes"  lib.so          shared, rtl:yes, for executables
12984	#            lib.a           static archive
12985	# "both,no"  lib.so.V(shr.o) shared, rtl:yes
12986	#            lib.a(lib.so.V) shared, rtl:no,  for executables
12987	# "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables
12988	#            lib.a(lib.so.V) shared, rtl:no
12989	# "svr4,*"   lib.so.V(shr.o) shared, rtl:yes, for executables
12990	#            lib.a           static archive
12991	case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*)
12992	  for ld_flag in $LDFLAGS; do
12993	  if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then
12994	    aix_use_runtimelinking=yes
12995	    break
12996	  fi
12997	  done
12998	  if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then
12999	    # With aix-soname=svr4, we create the lib.so.V shared archives only,
13000	    # so we don't have lib.a shared libs to link our executables.
13001	    # We have to force runtime linking in this case.
13002	    aix_use_runtimelinking=yes
13003	    LDFLAGS="$LDFLAGS -Wl,-brtl"
13004	  fi
13005	  ;;
13006	esac
13007
13008	exp_sym_flag='-bexport'
13009	no_entry_flag='-bnoentry'
13010      fi
13011
13012      # When large executables or shared objects are built, AIX ld can
13013      # have problems creating the table of contents.  If linking a library
13014      # or program results in "error TOC overflow" add -mminimal-toc to
13015      # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
13016      # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
13017
13018      archive_cmds=''
13019      hardcode_direct=yes
13020      hardcode_direct_absolute=yes
13021      hardcode_libdir_separator=':'
13022      link_all_deplibs=yes
13023      file_list_spec='$wl-f,'
13024      case $with_aix_soname,$aix_use_runtimelinking in
13025      aix,*) ;; # traditional, no import file
13026      svr4,* | *,yes) # use import file
13027	# The Import File defines what to hardcode.
13028	hardcode_direct=no
13029	hardcode_direct_absolute=no
13030	;;
13031      esac
13032
13033      if test yes = "$GCC"; then
13034	case $host_os in aix4.[012]|aix4.[012].*)
13035	# We only want to do this on AIX 4.2 and lower, the check
13036	# below for broken collect2 doesn't work under 4.3+
13037	  collect2name=`$CC -print-prog-name=collect2`
13038	  if test -f "$collect2name" &&
13039	   strings "$collect2name" | $GREP resolve_lib_name >/dev/null
13040	  then
13041	  # We have reworked collect2
13042	  :
13043	  else
13044	  # We have old collect2
13045	  hardcode_direct=unsupported
13046	  # It fails to find uninstalled libraries when the uninstalled
13047	  # path is not listed in the libpath.  Setting hardcode_minus_L
13048	  # to unsupported forces relinking
13049	  hardcode_minus_L=yes
13050	  hardcode_libdir_flag_spec='-L$libdir'
13051	  hardcode_libdir_separator=
13052	  fi
13053	  ;;
13054	esac
13055	shared_flag='-shared'
13056	if test yes = "$aix_use_runtimelinking"; then
13057	  shared_flag="$shared_flag "'$wl-G'
13058	fi
13059	# Need to ensure runtime linking is disabled for the traditional
13060	# shared library, or the linker may eventually find shared libraries
13061	# /with/ Import File - we do not want to mix them.
13062	shared_flag_aix='-shared'
13063	shared_flag_svr4='-shared $wl-G'
13064      else
13065	# not using gcc
13066	if test ia64 = "$host_cpu"; then
13067	# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
13068	# chokes on -Wl,-G. The following line is correct:
13069	  shared_flag='-G'
13070	else
13071	  if test yes = "$aix_use_runtimelinking"; then
13072	    shared_flag='$wl-G'
13073	  else
13074	    shared_flag='$wl-bM:SRE'
13075	  fi
13076	  shared_flag_aix='$wl-bM:SRE'
13077	  shared_flag_svr4='$wl-G'
13078	fi
13079      fi
13080
13081      export_dynamic_flag_spec='$wl-bexpall'
13082      # It seems that -bexpall does not export symbols beginning with
13083      # underscore (_), so it is better to generate a list of symbols to export.
13084      always_export_symbols=yes
13085      if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then
13086	# Warning - without using the other runtime loading flags (-brtl),
13087	# -berok will link without error, but may produce a broken library.
13088	allow_undefined_flag='-berok'
13089        # Determine the default libpath from the value encoded in an
13090        # empty executable.
13091        if test set = "${lt_cv_aix_libpath+set}"; then
13092  aix_libpath=$lt_cv_aix_libpath
13093else
13094  if test ${lt_cv_aix_libpath_+y}
13095then :
13096  printf %s "(cached) " >&6
13097else $as_nop
13098  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13099/* end confdefs.h.  */
13100
13101int
13102main (void)
13103{
13104
13105  ;
13106  return 0;
13107}
13108_ACEOF
13109if ac_fn_c_try_link "$LINENO"
13110then :
13111
13112  lt_aix_libpath_sed='
13113      /Import File Strings/,/^$/ {
13114	  /^0/ {
13115	      s/^0  *\([^ ]*\) *$/\1/
13116	      p
13117	  }
13118      }'
13119  lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
13120  # Check for a 64-bit object if we didn't find anything.
13121  if test -z "$lt_cv_aix_libpath_"; then
13122    lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
13123  fi
13124fi
13125rm -f core conftest.err conftest.$ac_objext conftest.beam \
13126    conftest$ac_exeext conftest.$ac_ext
13127  if test -z "$lt_cv_aix_libpath_"; then
13128    lt_cv_aix_libpath_=/usr/lib:/lib
13129  fi
13130
13131fi
13132
13133  aix_libpath=$lt_cv_aix_libpath_
13134fi
13135
13136        hardcode_libdir_flag_spec='$wl-blibpath:$libdir:'"$aix_libpath"
13137        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
13138      else
13139	if test ia64 = "$host_cpu"; then
13140	  hardcode_libdir_flag_spec='$wl-R $libdir:/usr/lib:/lib'
13141	  allow_undefined_flag="-z nodefs"
13142	  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"
13143	else
13144	 # Determine the default libpath from the value encoded in an
13145	 # empty executable.
13146	 if test set = "${lt_cv_aix_libpath+set}"; then
13147  aix_libpath=$lt_cv_aix_libpath
13148else
13149  if test ${lt_cv_aix_libpath_+y}
13150then :
13151  printf %s "(cached) " >&6
13152else $as_nop
13153  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13154/* end confdefs.h.  */
13155
13156int
13157main (void)
13158{
13159
13160  ;
13161  return 0;
13162}
13163_ACEOF
13164if ac_fn_c_try_link "$LINENO"
13165then :
13166
13167  lt_aix_libpath_sed='
13168      /Import File Strings/,/^$/ {
13169	  /^0/ {
13170	      s/^0  *\([^ ]*\) *$/\1/
13171	      p
13172	  }
13173      }'
13174  lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
13175  # Check for a 64-bit object if we didn't find anything.
13176  if test -z "$lt_cv_aix_libpath_"; then
13177    lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
13178  fi
13179fi
13180rm -f core conftest.err conftest.$ac_objext conftest.beam \
13181    conftest$ac_exeext conftest.$ac_ext
13182  if test -z "$lt_cv_aix_libpath_"; then
13183    lt_cv_aix_libpath_=/usr/lib:/lib
13184  fi
13185
13186fi
13187
13188  aix_libpath=$lt_cv_aix_libpath_
13189fi
13190
13191	 hardcode_libdir_flag_spec='$wl-blibpath:$libdir:'"$aix_libpath"
13192	  # Warning - without using the other run time loading flags,
13193	  # -berok will link without error, but may produce a broken library.
13194	  no_undefined_flag=' $wl-bernotok'
13195	  allow_undefined_flag=' $wl-berok'
13196	  if test yes = "$with_gnu_ld"; then
13197	    # We only use this code for GNU lds that support --whole-archive.
13198	    whole_archive_flag_spec='$wl--whole-archive$convenience $wl--no-whole-archive'
13199	  else
13200	    # Exported symbols can be pulled into shared objects from archives
13201	    whole_archive_flag_spec='$convenience'
13202	  fi
13203	  archive_cmds_need_lc=yes
13204	  archive_expsym_cmds='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d'
13205	  # -brtl affects multiple linker settings, -berok does not and is overridden later
13206	  compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([, ]\\)%-berok\\1%g"`'
13207	  if test svr4 != "$with_aix_soname"; then
13208	    # This is similar to how AIX traditionally builds its shared libraries.
13209	    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'
13210	  fi
13211	  if test aix != "$with_aix_soname"; then
13212	    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'
13213	  else
13214	    # used by -dlpreopen to get the symbols
13215	    archive_expsym_cmds="$archive_expsym_cmds"'~$MV  $output_objdir/$realname.d/$soname $output_objdir'
13216	  fi
13217	  archive_expsym_cmds="$archive_expsym_cmds"'~$RM -r $output_objdir/$realname.d'
13218	fi
13219      fi
13220      ;;
13221
13222    amigaos*)
13223      case $host_cpu in
13224      powerpc)
13225            # see comment about AmigaOS4 .so support
13226            archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
13227            archive_expsym_cmds=''
13228        ;;
13229      m68k)
13230            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)'
13231            hardcode_libdir_flag_spec='-L$libdir'
13232            hardcode_minus_L=yes
13233        ;;
13234      esac
13235      ;;
13236
13237    bsdi[45]*)
13238      export_dynamic_flag_spec=-rdynamic
13239      ;;
13240
13241    cygwin* | mingw* | pw32* | cegcc*)
13242      # When not using gcc, we currently assume that we are using
13243      # Microsoft Visual C++.
13244      # hardcode_libdir_flag_spec is actually meaningless, as there is
13245      # no search path for DLLs.
13246      case $cc_basename in
13247      cl*)
13248	# Native MSVC
13249	hardcode_libdir_flag_spec=' '
13250	allow_undefined_flag=unsupported
13251	always_export_symbols=yes
13252	file_list_spec='@'
13253	# Tell ltmain to make .lib files, not .a files.
13254	libext=lib
13255	# Tell ltmain to make .dll files, not .so files.
13256	shrext_cmds=.dll
13257	# FIXME: Setting linknames here is a bad hack.
13258	archive_cmds='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames='
13259	archive_expsym_cmds='if   test DEF = "`$SED -n     -e '\''s/^[	 ]*//'\''     -e '\''/^\(;.*\)*$/d'\''     -e '\''s/^\(EXPORTS\|LIBRARY\)\([	 ].*\)*$/DEF/p'\''     -e q     $export_symbols`" ; then
13260            cp "$export_symbols" "$output_objdir/$soname.def";
13261            echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp";
13262          else
13263            $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp;
13264          fi~
13265          $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
13266          linknames='
13267	# The linker will not automatically build a static lib if we build a DLL.
13268	# _LT_TAGVAR(old_archive_from_new_cmds, )='true'
13269	enable_shared_with_static_runtimes=yes
13270	exclude_expsyms='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
13271	export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1,DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols'
13272	# Don't use ranlib
13273	old_postinstall_cmds='chmod 644 $oldlib'
13274	postlink_cmds='lt_outputfile="@OUTPUT@"~
13275          lt_tool_outputfile="@TOOL_OUTPUT@"~
13276          case $lt_outputfile in
13277            *.exe|*.EXE) ;;
13278            *)
13279              lt_outputfile=$lt_outputfile.exe
13280              lt_tool_outputfile=$lt_tool_outputfile.exe
13281              ;;
13282          esac~
13283          if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then
13284            $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
13285            $RM "$lt_outputfile.manifest";
13286          fi'
13287	;;
13288      *)
13289	# Assume MSVC wrapper
13290	hardcode_libdir_flag_spec=' '
13291	allow_undefined_flag=unsupported
13292	# Tell ltmain to make .lib files, not .a files.
13293	libext=lib
13294	# Tell ltmain to make .dll files, not .so files.
13295	shrext_cmds=.dll
13296	# FIXME: Setting linknames here is a bad hack.
13297	archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
13298	# The linker will automatically build a .lib file if we build a DLL.
13299	old_archive_from_new_cmds='true'
13300	# FIXME: Should let the user specify the lib program.
13301	old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs'
13302	enable_shared_with_static_runtimes=yes
13303	;;
13304      esac
13305      ;;
13306
13307    darwin* | rhapsody*)
13308
13309
13310  archive_cmds_need_lc=no
13311  hardcode_direct=no
13312  hardcode_automatic=yes
13313  hardcode_shlibpath_var=unsupported
13314  if test yes = "$lt_cv_ld_force_load"; then
13315    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\"`'
13316
13317  else
13318    whole_archive_flag_spec=''
13319  fi
13320  link_all_deplibs=yes
13321  allow_undefined_flag=$_lt_dar_allow_undefined
13322  case $cc_basename in
13323     ifort*|nagfor*) _lt_dar_can_shared=yes ;;
13324     *) _lt_dar_can_shared=$GCC ;;
13325  esac
13326  if test yes = "$_lt_dar_can_shared"; then
13327    output_verbose_link_cmd=func_echo_all
13328    archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dsymutil"
13329    module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil"
13330    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"
13331    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"
13332
13333  else
13334  ld_shlibs=no
13335  fi
13336
13337      ;;
13338
13339    dgux*)
13340      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
13341      hardcode_libdir_flag_spec='-L$libdir'
13342      hardcode_shlibpath_var=no
13343      ;;
13344
13345    # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
13346    # support.  Future versions do this automatically, but an explicit c++rt0.o
13347    # does not break anything, and helps significantly (at the cost of a little
13348    # extra space).
13349    freebsd2.2*)
13350      archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
13351      hardcode_libdir_flag_spec='-R$libdir'
13352      hardcode_direct=yes
13353      hardcode_shlibpath_var=no
13354      ;;
13355
13356    # Unfortunately, older versions of FreeBSD 2 do not have this feature.
13357    freebsd2.*)
13358      archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
13359      hardcode_direct=yes
13360      hardcode_minus_L=yes
13361      hardcode_shlibpath_var=no
13362      ;;
13363
13364    # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
13365    freebsd* | dragonfly*)
13366      archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
13367      hardcode_libdir_flag_spec='-R$libdir'
13368      hardcode_direct=yes
13369      hardcode_shlibpath_var=no
13370      ;;
13371
13372    hpux9*)
13373      if test yes = "$GCC"; then
13374	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'
13375      else
13376	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'
13377      fi
13378      hardcode_libdir_flag_spec='$wl+b $wl$libdir'
13379      hardcode_libdir_separator=:
13380      hardcode_direct=yes
13381
13382      # hardcode_minus_L: Not really in the search PATH,
13383      # but as the default location of the library.
13384      hardcode_minus_L=yes
13385      export_dynamic_flag_spec='$wl-E'
13386      ;;
13387
13388    hpux10*)
13389      if test yes,no = "$GCC,$with_gnu_ld"; then
13390	archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
13391      else
13392	archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
13393      fi
13394      if test no = "$with_gnu_ld"; then
13395	hardcode_libdir_flag_spec='$wl+b $wl$libdir'
13396	hardcode_libdir_separator=:
13397	hardcode_direct=yes
13398	hardcode_direct_absolute=yes
13399	export_dynamic_flag_spec='$wl-E'
13400	# hardcode_minus_L: Not really in the search PATH,
13401	# but as the default location of the library.
13402	hardcode_minus_L=yes
13403      fi
13404      ;;
13405
13406    hpux11*)
13407      if test yes,no = "$GCC,$with_gnu_ld"; then
13408	case $host_cpu in
13409	hppa*64*)
13410	  archive_cmds='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
13411	  ;;
13412	ia64*)
13413	  archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
13414	  ;;
13415	*)
13416	  archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
13417	  ;;
13418	esac
13419      else
13420	case $host_cpu in
13421	hppa*64*)
13422	  archive_cmds='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
13423	  ;;
13424	ia64*)
13425	  archive_cmds='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
13426	  ;;
13427	*)
13428
13429	  # Older versions of the 11.00 compiler do not understand -b yet
13430	  # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does)
13431	  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC understands -b" >&5
13432printf %s "checking if $CC understands -b... " >&6; }
13433if test ${lt_cv_prog_compiler__b+y}
13434then :
13435  printf %s "(cached) " >&6
13436else $as_nop
13437  lt_cv_prog_compiler__b=no
13438   save_LDFLAGS=$LDFLAGS
13439   LDFLAGS="$LDFLAGS -b"
13440   echo "$lt_simple_link_test_code" > conftest.$ac_ext
13441   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
13442     # The linker can only warn and ignore the option if not recognized
13443     # So say no if there are warnings
13444     if test -s conftest.err; then
13445       # Append any errors to the config.log.
13446       cat conftest.err 1>&5
13447       $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
13448       $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
13449       if diff conftest.exp conftest.er2 >/dev/null; then
13450         lt_cv_prog_compiler__b=yes
13451       fi
13452     else
13453       lt_cv_prog_compiler__b=yes
13454     fi
13455   fi
13456   $RM -r conftest*
13457   LDFLAGS=$save_LDFLAGS
13458
13459fi
13460{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler__b" >&5
13461printf "%s\n" "$lt_cv_prog_compiler__b" >&6; }
13462
13463if test yes = "$lt_cv_prog_compiler__b"; then
13464    archive_cmds='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
13465else
13466    archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
13467fi
13468
13469	  ;;
13470	esac
13471      fi
13472      if test no = "$with_gnu_ld"; then
13473	hardcode_libdir_flag_spec='$wl+b $wl$libdir'
13474	hardcode_libdir_separator=:
13475
13476	case $host_cpu in
13477	hppa*64*|ia64*)
13478	  hardcode_direct=no
13479	  hardcode_shlibpath_var=no
13480	  ;;
13481	*)
13482	  hardcode_direct=yes
13483	  hardcode_direct_absolute=yes
13484	  export_dynamic_flag_spec='$wl-E'
13485
13486	  # hardcode_minus_L: Not really in the search PATH,
13487	  # but as the default location of the library.
13488	  hardcode_minus_L=yes
13489	  ;;
13490	esac
13491      fi
13492      ;;
13493
13494    irix5* | irix6* | nonstopux*)
13495      if test yes = "$GCC"; then
13496	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'
13497	# Try to use the -exported_symbol ld option, if it does not
13498	# work, assume that -exports_file does not work either and
13499	# implicitly export all symbols.
13500	# This should be the same for all languages, so no per-tag cache variable.
13501	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5
13502printf %s "checking whether the $host_os linker accepts -exported_symbol... " >&6; }
13503if test ${lt_cv_irix_exported_symbol+y}
13504then :
13505  printf %s "(cached) " >&6
13506else $as_nop
13507  save_LDFLAGS=$LDFLAGS
13508	   LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null"
13509	   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13510/* end confdefs.h.  */
13511int foo (void) { return 0; }
13512_ACEOF
13513if ac_fn_c_try_link "$LINENO"
13514then :
13515  lt_cv_irix_exported_symbol=yes
13516else $as_nop
13517  lt_cv_irix_exported_symbol=no
13518fi
13519rm -f core conftest.err conftest.$ac_objext conftest.beam \
13520    conftest$ac_exeext conftest.$ac_ext
13521           LDFLAGS=$save_LDFLAGS
13522fi
13523{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5
13524printf "%s\n" "$lt_cv_irix_exported_symbol" >&6; }
13525	if test yes = "$lt_cv_irix_exported_symbol"; then
13526          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'
13527	fi
13528      else
13529	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'
13530	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'
13531      fi
13532      archive_cmds_need_lc='no'
13533      hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
13534      hardcode_libdir_separator=:
13535      inherit_rpath=yes
13536      link_all_deplibs=yes
13537      ;;
13538
13539    linux*)
13540      case $cc_basename in
13541      tcc*)
13542	# Fabrice Bellard et al's Tiny C Compiler
13543	ld_shlibs=yes
13544	archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
13545	;;
13546      esac
13547      ;;
13548
13549    netbsd*)
13550      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
13551	archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
13552      else
13553	archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
13554      fi
13555      hardcode_libdir_flag_spec='-R$libdir'
13556      hardcode_direct=yes
13557      hardcode_shlibpath_var=no
13558      ;;
13559
13560    newsos6)
13561      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
13562      hardcode_direct=yes
13563      hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
13564      hardcode_libdir_separator=:
13565      hardcode_shlibpath_var=no
13566      ;;
13567
13568    *nto* | *qnx*)
13569      ;;
13570
13571    openbsd* | bitrig*)
13572      if test -f /usr/libexec/ld.so; then
13573	hardcode_direct=yes
13574	hardcode_shlibpath_var=no
13575	hardcode_direct_absolute=yes
13576	if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
13577	  archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
13578	  archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols'
13579	  hardcode_libdir_flag_spec='$wl-rpath,$libdir'
13580	  export_dynamic_flag_spec='$wl-E'
13581	else
13582	  archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
13583	  hardcode_libdir_flag_spec='$wl-rpath,$libdir'
13584	fi
13585      else
13586	ld_shlibs=no
13587      fi
13588      ;;
13589
13590    os2*)
13591      hardcode_libdir_flag_spec='-L$libdir'
13592      hardcode_minus_L=yes
13593      allow_undefined_flag=unsupported
13594      shrext_cmds=.dll
13595      archive_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
13596	$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
13597	$ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
13598	$ECHO EXPORTS >> $output_objdir/$libname.def~
13599	emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
13600	$CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
13601	emximp -o $lib $output_objdir/$libname.def'
13602      archive_expsym_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
13603	$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
13604	$ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
13605	$ECHO EXPORTS >> $output_objdir/$libname.def~
13606	prefix_cmds="$SED"~
13607	if test EXPORTS = "`$SED 1q $export_symbols`"; then
13608	  prefix_cmds="$prefix_cmds -e 1d";
13609	fi~
13610	prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
13611	cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
13612	$CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
13613	emximp -o $lib $output_objdir/$libname.def'
13614      old_archive_From_new_cmds='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
13615      enable_shared_with_static_runtimes=yes
13616      ;;
13617
13618    osf3*)
13619      if test yes = "$GCC"; then
13620	allow_undefined_flag=' $wl-expect_unresolved $wl\*'
13621	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'
13622      else
13623	allow_undefined_flag=' -expect_unresolved \*'
13624	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'
13625      fi
13626      archive_cmds_need_lc='no'
13627      hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
13628      hardcode_libdir_separator=:
13629      ;;
13630
13631    osf4* | osf5*)	# as osf3* with the addition of -msym flag
13632      if test yes = "$GCC"; then
13633	allow_undefined_flag=' $wl-expect_unresolved $wl\*'
13634	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'
13635	hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
13636      else
13637	allow_undefined_flag=' -expect_unresolved \*'
13638	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'
13639	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~
13640          $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'
13641
13642	# Both c and cxx compiler support -rpath directly
13643	hardcode_libdir_flag_spec='-rpath $libdir'
13644      fi
13645      archive_cmds_need_lc='no'
13646      hardcode_libdir_separator=:
13647      ;;
13648
13649    solaris*)
13650      no_undefined_flag=' -z defs'
13651      if test yes = "$GCC"; then
13652	wlarc='$wl'
13653	archive_cmds='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
13654	archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
13655          $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'
13656      else
13657	case `$CC -V 2>&1` in
13658	*"Compilers 5.0"*)
13659	  wlarc=''
13660	  archive_cmds='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags'
13661	  archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
13662            $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
13663	  ;;
13664	*)
13665	  wlarc='$wl'
13666	  archive_cmds='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags'
13667	  archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
13668            $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
13669	  ;;
13670	esac
13671      fi
13672      hardcode_libdir_flag_spec='-R$libdir'
13673      hardcode_shlibpath_var=no
13674      case $host_os in
13675      solaris2.[0-5] | solaris2.[0-5].*) ;;
13676      *)
13677	# The compiler driver will combine and reorder linker options,
13678	# but understands '-z linker_flag'.  GCC discards it without '$wl',
13679	# but is careful enough not to reorder.
13680	# Supported since Solaris 2.6 (maybe 2.5.1?)
13681	if test yes = "$GCC"; then
13682	  whole_archive_flag_spec='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract'
13683	else
13684	  whole_archive_flag_spec='-z allextract$convenience -z defaultextract'
13685	fi
13686	;;
13687      esac
13688      link_all_deplibs=yes
13689      ;;
13690
13691    sunos4*)
13692      if test sequent = "$host_vendor"; then
13693	# Use $CC to link under sequent, because it throws in some extra .o
13694	# files that make .init and .fini sections work.
13695	archive_cmds='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags'
13696      else
13697	archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
13698      fi
13699      hardcode_libdir_flag_spec='-L$libdir'
13700      hardcode_direct=yes
13701      hardcode_minus_L=yes
13702      hardcode_shlibpath_var=no
13703      ;;
13704
13705    sysv4)
13706      case $host_vendor in
13707	sni)
13708	  archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
13709	  hardcode_direct=yes # is this really true???
13710	;;
13711	siemens)
13712	  ## LD is ld it makes a PLAMLIB
13713	  ## CC just makes a GrossModule.
13714	  archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
13715	  reload_cmds='$CC -r -o $output$reload_objs'
13716	  hardcode_direct=no
13717        ;;
13718	motorola)
13719	  archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
13720	  hardcode_direct=no #Motorola manual says yes, but my tests say they lie
13721	;;
13722      esac
13723      runpath_var='LD_RUN_PATH'
13724      hardcode_shlibpath_var=no
13725      ;;
13726
13727    sysv4.3*)
13728      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
13729      hardcode_shlibpath_var=no
13730      export_dynamic_flag_spec='-Bexport'
13731      ;;
13732
13733    sysv4*MP*)
13734      if test -d /usr/nec; then
13735	archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
13736	hardcode_shlibpath_var=no
13737	runpath_var=LD_RUN_PATH
13738	hardcode_runpath_var=yes
13739	ld_shlibs=yes
13740      fi
13741      ;;
13742
13743    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*)
13744      no_undefined_flag='$wl-z,text'
13745      archive_cmds_need_lc=no
13746      hardcode_shlibpath_var=no
13747      runpath_var='LD_RUN_PATH'
13748
13749      if test yes = "$GCC"; then
13750	archive_cmds='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
13751	archive_expsym_cmds='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
13752      else
13753	archive_cmds='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
13754	archive_expsym_cmds='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
13755      fi
13756      ;;
13757
13758    sysv5* | sco3.2v5* | sco5v6*)
13759      # Note: We CANNOT use -z defs as we might desire, because we do not
13760      # link with -lc, and that would cause any symbols used from libc to
13761      # always be unresolved, which means just about no library would
13762      # ever link correctly.  If we're not using GNU ld we use -z text
13763      # though, which does catch some bad symbols but isn't as heavy-handed
13764      # as -z defs.
13765      no_undefined_flag='$wl-z,text'
13766      allow_undefined_flag='$wl-z,nodefs'
13767      archive_cmds_need_lc=no
13768      hardcode_shlibpath_var=no
13769      hardcode_libdir_flag_spec='$wl-R,$libdir'
13770      hardcode_libdir_separator=':'
13771      link_all_deplibs=yes
13772      export_dynamic_flag_spec='$wl-Bexport'
13773      runpath_var='LD_RUN_PATH'
13774
13775      if test yes = "$GCC"; then
13776	archive_cmds='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
13777	archive_expsym_cmds='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
13778      else
13779	archive_cmds='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
13780	archive_expsym_cmds='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
13781      fi
13782      ;;
13783
13784    uts4*)
13785      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
13786      hardcode_libdir_flag_spec='-L$libdir'
13787      hardcode_shlibpath_var=no
13788      ;;
13789
13790    *)
13791      ld_shlibs=no
13792      ;;
13793    esac
13794
13795    if test sni = "$host_vendor"; then
13796      case $host in
13797      sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
13798	export_dynamic_flag_spec='$wl-Blargedynsym'
13799	;;
13800      esac
13801    fi
13802  fi
13803
13804{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5
13805printf "%s\n" "$ld_shlibs" >&6; }
13806test no = "$ld_shlibs" && can_build_shared=no
13807
13808with_gnu_ld=$with_gnu_ld
13809
13810
13811
13812
13813
13814
13815
13816
13817
13818
13819
13820
13821
13822
13823
13824#
13825# Do we need to explicitly link libc?
13826#
13827case "x$archive_cmds_need_lc" in
13828x|xyes)
13829  # Assume -lc should be added
13830  archive_cmds_need_lc=yes
13831
13832  if test yes,yes = "$GCC,$enable_shared"; then
13833    case $archive_cmds in
13834    *'~'*)
13835      # FIXME: we may have to deal with multi-command sequences.
13836      ;;
13837    '$CC '*)
13838      # Test whether the compiler implicitly links with -lc since on some
13839      # systems, -lgcc has to come before -lc. If gcc already passes -lc
13840      # to ld, don't add -lc before -lgcc.
13841      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5
13842printf %s "checking whether -lc should be explicitly linked in... " >&6; }
13843if test ${lt_cv_archive_cmds_need_lc+y}
13844then :
13845  printf %s "(cached) " >&6
13846else $as_nop
13847  $RM conftest*
13848	echo "$lt_simple_compile_test_code" > conftest.$ac_ext
13849
13850	if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
13851  (eval $ac_compile) 2>&5
13852  ac_status=$?
13853  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
13854  test $ac_status = 0; } 2>conftest.err; then
13855	  soname=conftest
13856	  lib=conftest
13857	  libobjs=conftest.$ac_objext
13858	  deplibs=
13859	  wl=$lt_prog_compiler_wl
13860	  pic_flag=$lt_prog_compiler_pic
13861	  compiler_flags=-v
13862	  linker_flags=-v
13863	  verstring=
13864	  output_objdir=.
13865	  libname=conftest
13866	  lt_save_allow_undefined_flag=$allow_undefined_flag
13867	  allow_undefined_flag=
13868	  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5
13869  (eval $archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5
13870  ac_status=$?
13871  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
13872  test $ac_status = 0; }
13873	  then
13874	    lt_cv_archive_cmds_need_lc=no
13875	  else
13876	    lt_cv_archive_cmds_need_lc=yes
13877	  fi
13878	  allow_undefined_flag=$lt_save_allow_undefined_flag
13879	else
13880	  cat conftest.err 1>&5
13881	fi
13882	$RM conftest*
13883
13884fi
13885{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc" >&5
13886printf "%s\n" "$lt_cv_archive_cmds_need_lc" >&6; }
13887      archive_cmds_need_lc=$lt_cv_archive_cmds_need_lc
13888      ;;
13889    esac
13890  fi
13891  ;;
13892esac
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
13967
13968
13969
13970
13971
13972
13973
13974
13975
13976
13977
13978
13979
13980
13981
13982
13983
13984
13985
13986
13987
13988
13989
13990
13991
13992
13993
13994
13995
13996
13997
13998
13999
14000
14001
14002
14003
14004
14005
14006
14007
14008
14009
14010
14011
14012
14013
14014
14015
14016
14017
14018
14019
14020
14021
14022
14023
14024
14025
14026
14027
14028
14029
14030
14031
14032
14033
14034
14035
14036
14037
14038
14039
14040
14041
14042
14043
14044
14045  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5
14046printf %s "checking dynamic linker characteristics... " >&6; }
14047
14048if test yes = "$GCC"; then
14049  case $host_os in
14050    darwin*) lt_awk_arg='/^libraries:/,/LR/' ;;
14051    *) lt_awk_arg='/^libraries:/' ;;
14052  esac
14053  case $host_os in
14054    mingw* | cegcc*) lt_sed_strip_eq='s|=\([A-Za-z]:\)|\1|g' ;;
14055    *) lt_sed_strip_eq='s|=/|/|g' ;;
14056  esac
14057  lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq`
14058  case $lt_search_path_spec in
14059  *\;*)
14060    # if the path contains ";" then we assume it to be the separator
14061    # otherwise default to the standard path separator (i.e. ":") - it is
14062    # assumed that no part of a normal pathname contains ";" but that should
14063    # okay in the real world where ";" in dirpaths is itself problematic.
14064    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'`
14065    ;;
14066  *)
14067    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"`
14068    ;;
14069  esac
14070  # Ok, now we have the path, separated by spaces, we can step through it
14071  # and add multilib dir if necessary...
14072  lt_tmp_lt_search_path_spec=
14073  lt_multi_os_dir=/`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
14074  # ...but if some path component already ends with the multilib dir we assume
14075  # that all is fine and trust -print-search-dirs as is (GCC 4.2? or newer).
14076  case "$lt_multi_os_dir; $lt_search_path_spec " in
14077  "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*)
14078    lt_multi_os_dir=
14079    ;;
14080  esac
14081  for lt_sys_path in $lt_search_path_spec; do
14082    if test -d "$lt_sys_path$lt_multi_os_dir"; then
14083      lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path$lt_multi_os_dir"
14084    elif test -n "$lt_multi_os_dir"; then
14085      test -d "$lt_sys_path" && \
14086	lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
14087    fi
14088  done
14089  lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk '
14090BEGIN {RS = " "; FS = "/|\n";} {
14091  lt_foo = "";
14092  lt_count = 0;
14093  for (lt_i = NF; lt_i > 0; lt_i--) {
14094    if ($lt_i != "" && $lt_i != ".") {
14095      if ($lt_i == "..") {
14096        lt_count++;
14097      } else {
14098        if (lt_count == 0) {
14099          lt_foo = "/" $lt_i lt_foo;
14100        } else {
14101          lt_count--;
14102        }
14103      }
14104    }
14105  }
14106  if (lt_foo != "") { lt_freq[lt_foo]++; }
14107  if (lt_freq[lt_foo] == 1) { print lt_foo; }
14108}'`
14109  # AWK program above erroneously prepends '/' to C:/dos/paths
14110  # for these hosts.
14111  case $host_os in
14112    mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\
14113      $SED 's|/\([A-Za-z]:\)|\1|g'` ;;
14114  esac
14115  sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP`
14116else
14117  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
14118fi
14119library_names_spec=
14120libname_spec='lib$name'
14121soname_spec=
14122shrext_cmds=.so
14123postinstall_cmds=
14124postuninstall_cmds=
14125finish_cmds=
14126finish_eval=
14127shlibpath_var=
14128shlibpath_overrides_runpath=unknown
14129version_type=none
14130dynamic_linker="$host_os ld.so"
14131sys_lib_dlsearch_path_spec="/lib /usr/lib"
14132need_lib_prefix=unknown
14133hardcode_into_libs=no
14134
14135# when you set need_version to no, make sure it does not cause -set_version
14136# flags to be left without arguments
14137need_version=unknown
14138
14139
14140
14141case $host_os in
14142aix3*)
14143  version_type=linux # correct to gnu/linux during the next big refactor
14144  library_names_spec='$libname$release$shared_ext$versuffix $libname.a'
14145  shlibpath_var=LIBPATH
14146
14147  # AIX 3 has no versioning support, so we append a major version to the name.
14148  soname_spec='$libname$release$shared_ext$major'
14149  ;;
14150
14151aix[4-9]*)
14152  version_type=linux # correct to gnu/linux during the next big refactor
14153  need_lib_prefix=no
14154  need_version=no
14155  hardcode_into_libs=yes
14156  if test ia64 = "$host_cpu"; then
14157    # AIX 5 supports IA64
14158    library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext'
14159    shlibpath_var=LD_LIBRARY_PATH
14160  else
14161    # With GCC up to 2.95.x, collect2 would create an import file
14162    # for dependence libraries.  The import file would start with
14163    # the line '#! .'.  This would cause the generated library to
14164    # depend on '.', always an invalid library.  This was fixed in
14165    # development snapshots of GCC prior to 3.0.
14166    case $host_os in
14167      aix4 | aix4.[01] | aix4.[01].*)
14168      if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
14169	   echo ' yes '
14170	   echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then
14171	:
14172      else
14173	can_build_shared=no
14174      fi
14175      ;;
14176    esac
14177    # Using Import Files as archive members, it is possible to support
14178    # filename-based versioning of shared library archives on AIX. While
14179    # this would work for both with and without runtime linking, it will
14180    # prevent static linking of such archives. So we do filename-based
14181    # shared library versioning with .so extension only, which is used
14182    # when both runtime linking and shared linking is enabled.
14183    # Unfortunately, runtime linking may impact performance, so we do
14184    # not want this to be the default eventually. Also, we use the
14185    # versioned .so libs for executables only if there is the -brtl
14186    # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only.
14187    # To allow for filename-based versioning support, we need to create
14188    # libNAME.so.V as an archive file, containing:
14189    # *) an Import File, referring to the versioned filename of the
14190    #    archive as well as the shared archive member, telling the
14191    #    bitwidth (32 or 64) of that shared object, and providing the
14192    #    list of exported symbols of that shared object, eventually
14193    #    decorated with the 'weak' keyword
14194    # *) the shared object with the F_LOADONLY flag set, to really avoid
14195    #    it being seen by the linker.
14196    # At run time we better use the real file rather than another symlink,
14197    # but for link time we create the symlink libNAME.so -> libNAME.so.V
14198
14199    case $with_aix_soname,$aix_use_runtimelinking in
14200    # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct
14201    # soname into executable. Probably we can add versioning support to
14202    # collect2, so additional links can be useful in future.
14203    aix,yes) # traditional libtool
14204      dynamic_linker='AIX unversionable lib.so'
14205      # If using run time linking (on AIX 4.2 or later) use lib<name>.so
14206      # instead of lib<name>.a to let people know that these are not
14207      # typical AIX shared libraries.
14208      library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
14209      ;;
14210    aix,no) # traditional AIX only
14211      dynamic_linker='AIX lib.a(lib.so.V)'
14212      # We preserve .a as extension for shared libraries through AIX4.2
14213      # and later when we are not doing run time linking.
14214      library_names_spec='$libname$release.a $libname.a'
14215      soname_spec='$libname$release$shared_ext$major'
14216      ;;
14217    svr4,*) # full svr4 only
14218      dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o)"
14219      library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
14220      # We do not specify a path in Import Files, so LIBPATH fires.
14221      shlibpath_overrides_runpath=yes
14222      ;;
14223    *,yes) # both, prefer svr4
14224      dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o), lib.a(lib.so.V)"
14225      library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
14226      # unpreferred sharedlib libNAME.a needs extra handling
14227      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"'
14228      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"'
14229      # We do not specify a path in Import Files, so LIBPATH fires.
14230      shlibpath_overrides_runpath=yes
14231      ;;
14232    *,no) # both, prefer aix
14233      dynamic_linker="AIX lib.a(lib.so.V), lib.so.V($shared_archive_member_spec.o)"
14234      library_names_spec='$libname$release.a $libname.a'
14235      soname_spec='$libname$release$shared_ext$major'
14236      # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling
14237      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)'
14238      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"'
14239      ;;
14240    esac
14241    shlibpath_var=LIBPATH
14242  fi
14243  ;;
14244
14245amigaos*)
14246  case $host_cpu in
14247  powerpc)
14248    # Since July 2007 AmigaOS4 officially supports .so libraries.
14249    # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
14250    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
14251    ;;
14252  m68k)
14253    library_names_spec='$libname.ixlibrary $libname.a'
14254    # Create ${libname}_ixlibrary.a entries in /sys/libs.
14255    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'
14256    ;;
14257  esac
14258  ;;
14259
14260beos*)
14261  library_names_spec='$libname$shared_ext'
14262  dynamic_linker="$host_os ld.so"
14263  shlibpath_var=LIBRARY_PATH
14264  ;;
14265
14266bsdi[45]*)
14267  version_type=linux # correct to gnu/linux during the next big refactor
14268  need_version=no
14269  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
14270  soname_spec='$libname$release$shared_ext$major'
14271  finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
14272  shlibpath_var=LD_LIBRARY_PATH
14273  sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
14274  sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
14275  # the default ld.so.conf also contains /usr/contrib/lib and
14276  # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
14277  # libtool to hard-code these into programs
14278  ;;
14279
14280cygwin* | mingw* | pw32* | cegcc*)
14281  version_type=windows
14282  shrext_cmds=.dll
14283  need_version=no
14284  need_lib_prefix=no
14285
14286  case $GCC,$cc_basename in
14287  yes,*)
14288    # gcc
14289    library_names_spec='$libname.dll.a'
14290    # DLL is installed to $(libdir)/../bin by postinstall_cmds
14291    postinstall_cmds='base_file=`basename \$file`~
14292      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
14293      dldir=$destdir/`dirname \$dlpath`~
14294      test -d \$dldir || mkdir -p \$dldir~
14295      $install_prog $dir/$dlname \$dldir/$dlname~
14296      chmod a+x \$dldir/$dlname~
14297      if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
14298        eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
14299      fi'
14300    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
14301      dlpath=$dir/\$dldll~
14302       $RM \$dlpath'
14303    shlibpath_overrides_runpath=yes
14304
14305    case $host_os in
14306    cygwin*)
14307      # Cygwin DLLs use 'cyg' prefix rather than 'lib'
14308      soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
14309
14310      sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"
14311      ;;
14312    mingw* | cegcc*)
14313      # MinGW DLLs use traditional 'lib' prefix
14314      soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
14315      ;;
14316    pw32*)
14317      # pw32 DLLs use 'pw' prefix rather than 'lib'
14318      library_names_spec='`echo $libname | sed -e 's/^lib/pw/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
14319      ;;
14320    esac
14321    dynamic_linker='Win32 ld.exe'
14322    ;;
14323
14324  *,cl*)
14325    # Native MSVC
14326    libname_spec='$name'
14327    soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
14328    library_names_spec='$libname.dll.lib'
14329
14330    case $build_os in
14331    mingw*)
14332      sys_lib_search_path_spec=
14333      lt_save_ifs=$IFS
14334      IFS=';'
14335      for lt_path in $LIB
14336      do
14337        IFS=$lt_save_ifs
14338        # Let DOS variable expansion print the short 8.3 style file name.
14339        lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"`
14340        sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path"
14341      done
14342      IFS=$lt_save_ifs
14343      # Convert to MSYS style.
14344      sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'`
14345      ;;
14346    cygwin*)
14347      # Convert to unix form, then to dos form, then back to unix form
14348      # but this time dos style (no spaces!) so that the unix form looks
14349      # like /cygdrive/c/PROGRA~1:/cygdr...
14350      sys_lib_search_path_spec=`cygpath --path --unix "$LIB"`
14351      sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null`
14352      sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
14353      ;;
14354    *)
14355      sys_lib_search_path_spec=$LIB
14356      if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then
14357        # It is most probably a Windows format PATH.
14358        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
14359      else
14360        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
14361      fi
14362      # FIXME: find the short name or the path components, as spaces are
14363      # common. (e.g. "Program Files" -> "PROGRA~1")
14364      ;;
14365    esac
14366
14367    # DLL is installed to $(libdir)/../bin by postinstall_cmds
14368    postinstall_cmds='base_file=`basename \$file`~
14369      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
14370      dldir=$destdir/`dirname \$dlpath`~
14371      test -d \$dldir || mkdir -p \$dldir~
14372      $install_prog $dir/$dlname \$dldir/$dlname'
14373    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
14374      dlpath=$dir/\$dldll~
14375       $RM \$dlpath'
14376    shlibpath_overrides_runpath=yes
14377    dynamic_linker='Win32 link.exe'
14378    ;;
14379
14380  *)
14381    # Assume MSVC wrapper
14382    library_names_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext $libname.lib'
14383    dynamic_linker='Win32 ld.exe'
14384    ;;
14385  esac
14386  # FIXME: first we should search . and the directory the executable is in
14387  shlibpath_var=PATH
14388  ;;
14389
14390darwin* | rhapsody*)
14391  dynamic_linker="$host_os dyld"
14392  version_type=darwin
14393  need_lib_prefix=no
14394  need_version=no
14395  library_names_spec='$libname$release$major$shared_ext $libname$shared_ext'
14396  soname_spec='$libname$release$major$shared_ext'
14397  shlibpath_overrides_runpath=yes
14398  shlibpath_var=DYLD_LIBRARY_PATH
14399  shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
14400
14401  sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"
14402  sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
14403  ;;
14404
14405dgux*)
14406  version_type=linux # correct to gnu/linux during the next big refactor
14407  need_lib_prefix=no
14408  need_version=no
14409  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
14410  soname_spec='$libname$release$shared_ext$major'
14411  shlibpath_var=LD_LIBRARY_PATH
14412  ;;
14413
14414freebsd* | dragonfly*)
14415  # DragonFly does not have aout.  When/if they implement a new
14416  # versioning mechanism, adjust this.
14417  if test -x /usr/bin/objformat; then
14418    objformat=`/usr/bin/objformat`
14419  else
14420    case $host_os in
14421    freebsd[23].*) objformat=aout ;;
14422    *) objformat=elf ;;
14423    esac
14424  fi
14425  version_type=freebsd-$objformat
14426  case $version_type in
14427    freebsd-elf*)
14428      library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
14429      soname_spec='$libname$release$shared_ext$major'
14430      need_version=no
14431      need_lib_prefix=no
14432      ;;
14433    freebsd-*)
14434      library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
14435      need_version=yes
14436      ;;
14437  esac
14438  shlibpath_var=LD_LIBRARY_PATH
14439  case $host_os in
14440  freebsd2.*)
14441    shlibpath_overrides_runpath=yes
14442    ;;
14443  freebsd3.[01]* | freebsdelf3.[01]*)
14444    shlibpath_overrides_runpath=yes
14445    hardcode_into_libs=yes
14446    ;;
14447  freebsd3.[2-9]* | freebsdelf3.[2-9]* | \
14448  freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1)
14449    shlibpath_overrides_runpath=no
14450    hardcode_into_libs=yes
14451    ;;
14452  *) # from 4.6 on, and DragonFly
14453    shlibpath_overrides_runpath=yes
14454    hardcode_into_libs=yes
14455    ;;
14456  esac
14457  ;;
14458
14459haiku*)
14460  version_type=linux # correct to gnu/linux during the next big refactor
14461  need_lib_prefix=no
14462  need_version=no
14463  dynamic_linker="$host_os runtime_loader"
14464  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
14465  soname_spec='$libname$release$shared_ext$major'
14466  shlibpath_var=LIBRARY_PATH
14467  shlibpath_overrides_runpath=no
14468  sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
14469  hardcode_into_libs=yes
14470  ;;
14471
14472hpux9* | hpux10* | hpux11*)
14473  # Give a soname corresponding to the major version so that dld.sl refuses to
14474  # link against other versions.
14475  version_type=sunos
14476  need_lib_prefix=no
14477  need_version=no
14478  case $host_cpu in
14479  ia64*)
14480    shrext_cmds='.so'
14481    hardcode_into_libs=yes
14482    dynamic_linker="$host_os dld.so"
14483    shlibpath_var=LD_LIBRARY_PATH
14484    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
14485    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
14486    soname_spec='$libname$release$shared_ext$major'
14487    if test 32 = "$HPUX_IA64_MODE"; then
14488      sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
14489      sys_lib_dlsearch_path_spec=/usr/lib/hpux32
14490    else
14491      sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
14492      sys_lib_dlsearch_path_spec=/usr/lib/hpux64
14493    fi
14494    ;;
14495  hppa*64*)
14496    shrext_cmds='.sl'
14497    hardcode_into_libs=yes
14498    dynamic_linker="$host_os dld.sl"
14499    shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
14500    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
14501    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
14502    soname_spec='$libname$release$shared_ext$major'
14503    sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
14504    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
14505    ;;
14506  *)
14507    shrext_cmds='.sl'
14508    dynamic_linker="$host_os dld.sl"
14509    shlibpath_var=SHLIB_PATH
14510    shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
14511    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
14512    soname_spec='$libname$release$shared_ext$major'
14513    ;;
14514  esac
14515  # HP-UX runs *really* slowly unless shared libraries are mode 555, ...
14516  postinstall_cmds='chmod 555 $lib'
14517  # or fails outright, so override atomically:
14518  install_override_mode=555
14519  ;;
14520
14521interix[3-9]*)
14522  version_type=linux # correct to gnu/linux during the next big refactor
14523  need_lib_prefix=no
14524  need_version=no
14525  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
14526  soname_spec='$libname$release$shared_ext$major'
14527  dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
14528  shlibpath_var=LD_LIBRARY_PATH
14529  shlibpath_overrides_runpath=no
14530  hardcode_into_libs=yes
14531  ;;
14532
14533irix5* | irix6* | nonstopux*)
14534  case $host_os in
14535    nonstopux*) version_type=nonstopux ;;
14536    *)
14537	if test yes = "$lt_cv_prog_gnu_ld"; then
14538		version_type=linux # correct to gnu/linux during the next big refactor
14539	else
14540		version_type=irix
14541	fi ;;
14542  esac
14543  need_lib_prefix=no
14544  need_version=no
14545  soname_spec='$libname$release$shared_ext$major'
14546  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext'
14547  case $host_os in
14548  irix5* | nonstopux*)
14549    libsuff= shlibsuff=
14550    ;;
14551  *)
14552    case $LD in # libtool.m4 will add one of these switches to LD
14553    *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
14554      libsuff= shlibsuff= libmagic=32-bit;;
14555    *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
14556      libsuff=32 shlibsuff=N32 libmagic=N32;;
14557    *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
14558      libsuff=64 shlibsuff=64 libmagic=64-bit;;
14559    *) libsuff= shlibsuff= libmagic=never-match;;
14560    esac
14561    ;;
14562  esac
14563  shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
14564  shlibpath_overrides_runpath=no
14565  sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff"
14566  sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff"
14567  hardcode_into_libs=yes
14568  ;;
14569
14570# No shared lib support for Linux oldld, aout, or coff.
14571linux*oldld* | linux*aout* | linux*coff*)
14572  dynamic_linker=no
14573  ;;
14574
14575linux*android*)
14576  version_type=none # Android doesn't support versioned libraries.
14577  need_lib_prefix=no
14578  need_version=no
14579  library_names_spec='$libname$release$shared_ext'
14580  soname_spec='$libname$release$shared_ext'
14581  finish_cmds=
14582  shlibpath_var=LD_LIBRARY_PATH
14583  shlibpath_overrides_runpath=yes
14584
14585  # This implies no fast_install, which is unacceptable.
14586  # Some rework will be needed to allow for fast_install
14587  # before this can be enabled.
14588  hardcode_into_libs=yes
14589
14590  dynamic_linker='Android linker'
14591  # Don't embed -rpath directories since the linker doesn't support them.
14592  hardcode_libdir_flag_spec='-L$libdir'
14593  ;;
14594
14595# This must be glibc/ELF.
14596linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
14597  version_type=linux # correct to gnu/linux during the next big refactor
14598  need_lib_prefix=no
14599  need_version=no
14600  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
14601  soname_spec='$libname$release$shared_ext$major'
14602  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
14603  shlibpath_var=LD_LIBRARY_PATH
14604  shlibpath_overrides_runpath=no
14605
14606  # Some binutils ld are patched to set DT_RUNPATH
14607  if test ${lt_cv_shlibpath_overrides_runpath+y}
14608then :
14609  printf %s "(cached) " >&6
14610else $as_nop
14611  lt_cv_shlibpath_overrides_runpath=no
14612    save_LDFLAGS=$LDFLAGS
14613    save_libdir=$libdir
14614    eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \
14615	 LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\""
14616    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14617/* end confdefs.h.  */
14618
14619int
14620main (void)
14621{
14622
14623  ;
14624  return 0;
14625}
14626_ACEOF
14627if ac_fn_c_try_link "$LINENO"
14628then :
14629  if  ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null
14630then :
14631  lt_cv_shlibpath_overrides_runpath=yes
14632fi
14633fi
14634rm -f core conftest.err conftest.$ac_objext conftest.beam \
14635    conftest$ac_exeext conftest.$ac_ext
14636    LDFLAGS=$save_LDFLAGS
14637    libdir=$save_libdir
14638
14639fi
14640
14641  shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
14642
14643  # This implies no fast_install, which is unacceptable.
14644  # Some rework will be needed to allow for fast_install
14645  # before this can be enabled.
14646  hardcode_into_libs=yes
14647
14648  # Add ABI-specific directories to the system library path.
14649  sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib"
14650
14651  # Ideally, we could use ldconfig to report *all* directores which are
14652  # searched for libraries, however this is still not possible.  Aside from not
14653  # being certain /sbin/ldconfig is available, command
14654  # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64,
14655  # even though it is searched at run-time.  Try to do the best guess by
14656  # appending ld.so.conf contents (and includes) to the search path.
14657  if test -f /etc/ld.so.conf; then
14658    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' ' '`
14659    sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra"
14660  fi
14661
14662  # We used to test for /lib/ld.so.1 and disable shared libraries on
14663  # powerpc, because MkLinux only supported shared libraries with the
14664  # GNU dynamic linker.  Since this was broken with cross compilers,
14665  # most powerpc-linux boxes support dynamic linking these days and
14666  # people can always --disable-shared, the test was removed, and we
14667  # assume the GNU/Linux dynamic linker is in use.
14668  dynamic_linker='GNU/Linux ld.so'
14669  ;;
14670
14671netbsd*)
14672  version_type=sunos
14673  need_lib_prefix=no
14674  need_version=no
14675  if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
14676    library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
14677    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
14678    dynamic_linker='NetBSD (a.out) ld.so'
14679  else
14680    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
14681    soname_spec='$libname$release$shared_ext$major'
14682    dynamic_linker='NetBSD ld.elf_so'
14683  fi
14684  shlibpath_var=LD_LIBRARY_PATH
14685  shlibpath_overrides_runpath=yes
14686  hardcode_into_libs=yes
14687  ;;
14688
14689newsos6)
14690  version_type=linux # correct to gnu/linux during the next big refactor
14691  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
14692  shlibpath_var=LD_LIBRARY_PATH
14693  shlibpath_overrides_runpath=yes
14694  ;;
14695
14696*nto* | *qnx*)
14697  version_type=qnx
14698  need_lib_prefix=no
14699  need_version=no
14700  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
14701  soname_spec='$libname$release$shared_ext$major'
14702  shlibpath_var=LD_LIBRARY_PATH
14703  shlibpath_overrides_runpath=no
14704  hardcode_into_libs=yes
14705  dynamic_linker='ldqnx.so'
14706  ;;
14707
14708openbsd* | bitrig*)
14709  version_type=sunos
14710  sys_lib_dlsearch_path_spec=/usr/lib
14711  need_lib_prefix=no
14712  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
14713    need_version=no
14714  else
14715    need_version=yes
14716  fi
14717  library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
14718  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
14719  shlibpath_var=LD_LIBRARY_PATH
14720  shlibpath_overrides_runpath=yes
14721  ;;
14722
14723os2*)
14724  libname_spec='$name'
14725  version_type=windows
14726  shrext_cmds=.dll
14727  need_version=no
14728  need_lib_prefix=no
14729  # OS/2 can only load a DLL with a base name of 8 characters or less.
14730  soname_spec='`test -n "$os2dllname" && libname="$os2dllname";
14731    v=$($ECHO $release$versuffix | tr -d .-);
14732    n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _);
14733    $ECHO $n$v`$shared_ext'
14734  library_names_spec='${libname}_dll.$libext'
14735  dynamic_linker='OS/2 ld.exe'
14736  shlibpath_var=BEGINLIBPATH
14737  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
14738  sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
14739  postinstall_cmds='base_file=`basename \$file`~
14740    dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~
14741    dldir=$destdir/`dirname \$dlpath`~
14742    test -d \$dldir || mkdir -p \$dldir~
14743    $install_prog $dir/$dlname \$dldir/$dlname~
14744    chmod a+x \$dldir/$dlname~
14745    if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
14746      eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
14747    fi'
14748  postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~
14749    dlpath=$dir/\$dldll~
14750    $RM \$dlpath'
14751  ;;
14752
14753osf3* | osf4* | osf5*)
14754  version_type=osf
14755  need_lib_prefix=no
14756  need_version=no
14757  soname_spec='$libname$release$shared_ext$major'
14758  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
14759  shlibpath_var=LD_LIBRARY_PATH
14760  sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
14761  sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
14762  ;;
14763
14764rdos*)
14765  dynamic_linker=no
14766  ;;
14767
14768solaris*)
14769  version_type=linux # correct to gnu/linux during the next big refactor
14770  need_lib_prefix=no
14771  need_version=no
14772  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
14773  soname_spec='$libname$release$shared_ext$major'
14774  shlibpath_var=LD_LIBRARY_PATH
14775  shlibpath_overrides_runpath=yes
14776  hardcode_into_libs=yes
14777  # ldd complains unless libraries are executable
14778  postinstall_cmds='chmod +x $lib'
14779  ;;
14780
14781sunos4*)
14782  version_type=sunos
14783  library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
14784  finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
14785  shlibpath_var=LD_LIBRARY_PATH
14786  shlibpath_overrides_runpath=yes
14787  if test yes = "$with_gnu_ld"; then
14788    need_lib_prefix=no
14789  fi
14790  need_version=yes
14791  ;;
14792
14793sysv4 | sysv4.3*)
14794  version_type=linux # correct to gnu/linux during the next big refactor
14795  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
14796  soname_spec='$libname$release$shared_ext$major'
14797  shlibpath_var=LD_LIBRARY_PATH
14798  case $host_vendor in
14799    sni)
14800      shlibpath_overrides_runpath=no
14801      need_lib_prefix=no
14802      runpath_var=LD_RUN_PATH
14803      ;;
14804    siemens)
14805      need_lib_prefix=no
14806      ;;
14807    motorola)
14808      need_lib_prefix=no
14809      need_version=no
14810      shlibpath_overrides_runpath=no
14811      sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
14812      ;;
14813  esac
14814  ;;
14815
14816sysv4*MP*)
14817  if test -d /usr/nec; then
14818    version_type=linux # correct to gnu/linux during the next big refactor
14819    library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext'
14820    soname_spec='$libname$shared_ext.$major'
14821    shlibpath_var=LD_LIBRARY_PATH
14822  fi
14823  ;;
14824
14825sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
14826  version_type=sco
14827  need_lib_prefix=no
14828  need_version=no
14829  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext'
14830  soname_spec='$libname$release$shared_ext$major'
14831  shlibpath_var=LD_LIBRARY_PATH
14832  shlibpath_overrides_runpath=yes
14833  hardcode_into_libs=yes
14834  if test yes = "$with_gnu_ld"; then
14835    sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
14836  else
14837    sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
14838    case $host_os in
14839      sco3.2v5*)
14840        sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
14841	;;
14842    esac
14843  fi
14844  sys_lib_dlsearch_path_spec='/usr/lib'
14845  ;;
14846
14847tpf*)
14848  # TPF is a cross-target only.  Preferred cross-host = GNU/Linux.
14849  version_type=linux # correct to gnu/linux during the next big refactor
14850  need_lib_prefix=no
14851  need_version=no
14852  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
14853  shlibpath_var=LD_LIBRARY_PATH
14854  shlibpath_overrides_runpath=no
14855  hardcode_into_libs=yes
14856  ;;
14857
14858uts4*)
14859  version_type=linux # correct to gnu/linux during the next big refactor
14860  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
14861  soname_spec='$libname$release$shared_ext$major'
14862  shlibpath_var=LD_LIBRARY_PATH
14863  ;;
14864
14865*)
14866  dynamic_linker=no
14867  ;;
14868esac
14869{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5
14870printf "%s\n" "$dynamic_linker" >&6; }
14871test no = "$dynamic_linker" && can_build_shared=no
14872
14873variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
14874if test yes = "$GCC"; then
14875  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
14876fi
14877
14878if test set = "${lt_cv_sys_lib_search_path_spec+set}"; then
14879  sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec
14880fi
14881
14882if test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then
14883  sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec
14884fi
14885
14886# remember unaugmented sys_lib_dlsearch_path content for libtool script decls...
14887configure_time_dlsearch_path=$sys_lib_dlsearch_path_spec
14888
14889# ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code
14890func_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH"
14891
14892# to be used as default LT_SYS_LIBRARY_PATH value in generated libtool
14893configure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH
14894
14895
14896
14897
14898
14899
14900
14901
14902
14903
14904
14905
14906
14907
14908
14909
14910
14911
14912
14913
14914
14915
14916
14917
14918
14919
14920
14921
14922
14923
14924
14925
14926
14927
14928
14929
14930
14931
14932
14933
14934
14935
14936
14937
14938
14939
14940
14941
14942
14943
14944
14945
14946
14947
14948
14949
14950
14951
14952
14953
14954
14955
14956
14957
14958
14959
14960
14961
14962
14963
14964
14965
14966
14967
14968
14969
14970
14971
14972
14973
14974
14975
14976
14977
14978
14979
14980
14981
14982
14983
14984
14985
14986
14987
14988
14989
14990
14991  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5
14992printf %s "checking how to hardcode library paths into programs... " >&6; }
14993hardcode_action=
14994if test -n "$hardcode_libdir_flag_spec" ||
14995   test -n "$runpath_var" ||
14996   test yes = "$hardcode_automatic"; then
14997
14998  # We can hardcode non-existent directories.
14999  if test no != "$hardcode_direct" &&
15000     # If the only mechanism to avoid hardcoding is shlibpath_var, we
15001     # have to relink, otherwise we might link with an installed library
15002     # when we should be linking with a yet-to-be-installed one
15003     ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, )" &&
15004     test no != "$hardcode_minus_L"; then
15005    # Linking always hardcodes the temporary library directory.
15006    hardcode_action=relink
15007  else
15008    # We can link without hardcoding, and we can hardcode nonexisting dirs.
15009    hardcode_action=immediate
15010  fi
15011else
15012  # We cannot hardcode anything, or else we can only hardcode existing
15013  # directories.
15014  hardcode_action=unsupported
15015fi
15016{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5
15017printf "%s\n" "$hardcode_action" >&6; }
15018
15019if test relink = "$hardcode_action" ||
15020   test yes = "$inherit_rpath"; then
15021  # Fast installation is not supported
15022  enable_fast_install=no
15023elif test yes = "$shlibpath_overrides_runpath" ||
15024     test no = "$enable_shared"; then
15025  # Fast installation is not necessary
15026  enable_fast_install=needless
15027fi
15028
15029
15030
15031
15032
15033
15034  if test yes != "$enable_dlopen"; then
15035  enable_dlopen=unknown
15036  enable_dlopen_self=unknown
15037  enable_dlopen_self_static=unknown
15038else
15039  lt_cv_dlopen=no
15040  lt_cv_dlopen_libs=
15041
15042  case $host_os in
15043  beos*)
15044    lt_cv_dlopen=load_add_on
15045    lt_cv_dlopen_libs=
15046    lt_cv_dlopen_self=yes
15047    ;;
15048
15049  mingw* | pw32* | cegcc*)
15050    lt_cv_dlopen=LoadLibrary
15051    lt_cv_dlopen_libs=
15052    ;;
15053
15054  cygwin*)
15055    lt_cv_dlopen=dlopen
15056    lt_cv_dlopen_libs=
15057    ;;
15058
15059  darwin*)
15060    # if libdl is installed we need to link against it
15061    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
15062printf %s "checking for dlopen in -ldl... " >&6; }
15063if test ${ac_cv_lib_dl_dlopen+y}
15064then :
15065  printf %s "(cached) " >&6
15066else $as_nop
15067  ac_check_lib_save_LIBS=$LIBS
15068LIBS="-ldl  $LIBS"
15069cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15070/* end confdefs.h.  */
15071
15072/* Override any GCC internal prototype to avoid an error.
15073   Use char because int might match the return type of a GCC
15074   builtin and then its argument prototype would still apply.  */
15075char dlopen ();
15076int
15077main (void)
15078{
15079return dlopen ();
15080  ;
15081  return 0;
15082}
15083_ACEOF
15084if ac_fn_c_try_link "$LINENO"
15085then :
15086  ac_cv_lib_dl_dlopen=yes
15087else $as_nop
15088  ac_cv_lib_dl_dlopen=no
15089fi
15090rm -f core conftest.err conftest.$ac_objext conftest.beam \
15091    conftest$ac_exeext conftest.$ac_ext
15092LIBS=$ac_check_lib_save_LIBS
15093fi
15094{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
15095printf "%s\n" "$ac_cv_lib_dl_dlopen" >&6; }
15096if test "x$ac_cv_lib_dl_dlopen" = xyes
15097then :
15098  lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl
15099else $as_nop
15100
15101    lt_cv_dlopen=dyld
15102    lt_cv_dlopen_libs=
15103    lt_cv_dlopen_self=yes
15104
15105fi
15106
15107    ;;
15108
15109  tpf*)
15110    # Don't try to run any link tests for TPF.  We know it's impossible
15111    # because TPF is a cross-compiler, and we know how we open DSOs.
15112    lt_cv_dlopen=dlopen
15113    lt_cv_dlopen_libs=
15114    lt_cv_dlopen_self=no
15115    ;;
15116
15117  *)
15118    ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load"
15119if test "x$ac_cv_func_shl_load" = xyes
15120then :
15121  lt_cv_dlopen=shl_load
15122else $as_nop
15123  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
15124printf %s "checking for shl_load in -ldld... " >&6; }
15125if test ${ac_cv_lib_dld_shl_load+y}
15126then :
15127  printf %s "(cached) " >&6
15128else $as_nop
15129  ac_check_lib_save_LIBS=$LIBS
15130LIBS="-ldld  $LIBS"
15131cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15132/* end confdefs.h.  */
15133
15134/* Override any GCC internal prototype to avoid an error.
15135   Use char because int might match the return type of a GCC
15136   builtin and then its argument prototype would still apply.  */
15137char shl_load ();
15138int
15139main (void)
15140{
15141return shl_load ();
15142  ;
15143  return 0;
15144}
15145_ACEOF
15146if ac_fn_c_try_link "$LINENO"
15147then :
15148  ac_cv_lib_dld_shl_load=yes
15149else $as_nop
15150  ac_cv_lib_dld_shl_load=no
15151fi
15152rm -f core conftest.err conftest.$ac_objext conftest.beam \
15153    conftest$ac_exeext conftest.$ac_ext
15154LIBS=$ac_check_lib_save_LIBS
15155fi
15156{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
15157printf "%s\n" "$ac_cv_lib_dld_shl_load" >&6; }
15158if test "x$ac_cv_lib_dld_shl_load" = xyes
15159then :
15160  lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld
15161else $as_nop
15162  ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
15163if test "x$ac_cv_func_dlopen" = xyes
15164then :
15165  lt_cv_dlopen=dlopen
15166else $as_nop
15167  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
15168printf %s "checking for dlopen in -ldl... " >&6; }
15169if test ${ac_cv_lib_dl_dlopen+y}
15170then :
15171  printf %s "(cached) " >&6
15172else $as_nop
15173  ac_check_lib_save_LIBS=$LIBS
15174LIBS="-ldl  $LIBS"
15175cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15176/* end confdefs.h.  */
15177
15178/* Override any GCC internal prototype to avoid an error.
15179   Use char because int might match the return type of a GCC
15180   builtin and then its argument prototype would still apply.  */
15181char dlopen ();
15182int
15183main (void)
15184{
15185return dlopen ();
15186  ;
15187  return 0;
15188}
15189_ACEOF
15190if ac_fn_c_try_link "$LINENO"
15191then :
15192  ac_cv_lib_dl_dlopen=yes
15193else $as_nop
15194  ac_cv_lib_dl_dlopen=no
15195fi
15196rm -f core conftest.err conftest.$ac_objext conftest.beam \
15197    conftest$ac_exeext conftest.$ac_ext
15198LIBS=$ac_check_lib_save_LIBS
15199fi
15200{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
15201printf "%s\n" "$ac_cv_lib_dl_dlopen" >&6; }
15202if test "x$ac_cv_lib_dl_dlopen" = xyes
15203then :
15204  lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl
15205else $as_nop
15206  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5
15207printf %s "checking for dlopen in -lsvld... " >&6; }
15208if test ${ac_cv_lib_svld_dlopen+y}
15209then :
15210  printf %s "(cached) " >&6
15211else $as_nop
15212  ac_check_lib_save_LIBS=$LIBS
15213LIBS="-lsvld  $LIBS"
15214cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15215/* end confdefs.h.  */
15216
15217/* Override any GCC internal prototype to avoid an error.
15218   Use char because int might match the return type of a GCC
15219   builtin and then its argument prototype would still apply.  */
15220char dlopen ();
15221int
15222main (void)
15223{
15224return dlopen ();
15225  ;
15226  return 0;
15227}
15228_ACEOF
15229if ac_fn_c_try_link "$LINENO"
15230then :
15231  ac_cv_lib_svld_dlopen=yes
15232else $as_nop
15233  ac_cv_lib_svld_dlopen=no
15234fi
15235rm -f core conftest.err conftest.$ac_objext conftest.beam \
15236    conftest$ac_exeext conftest.$ac_ext
15237LIBS=$ac_check_lib_save_LIBS
15238fi
15239{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5
15240printf "%s\n" "$ac_cv_lib_svld_dlopen" >&6; }
15241if test "x$ac_cv_lib_svld_dlopen" = xyes
15242then :
15243  lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld
15244else $as_nop
15245  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5
15246printf %s "checking for dld_link in -ldld... " >&6; }
15247if test ${ac_cv_lib_dld_dld_link+y}
15248then :
15249  printf %s "(cached) " >&6
15250else $as_nop
15251  ac_check_lib_save_LIBS=$LIBS
15252LIBS="-ldld  $LIBS"
15253cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15254/* end confdefs.h.  */
15255
15256/* Override any GCC internal prototype to avoid an error.
15257   Use char because int might match the return type of a GCC
15258   builtin and then its argument prototype would still apply.  */
15259char dld_link ();
15260int
15261main (void)
15262{
15263return dld_link ();
15264  ;
15265  return 0;
15266}
15267_ACEOF
15268if ac_fn_c_try_link "$LINENO"
15269then :
15270  ac_cv_lib_dld_dld_link=yes
15271else $as_nop
15272  ac_cv_lib_dld_dld_link=no
15273fi
15274rm -f core conftest.err conftest.$ac_objext conftest.beam \
15275    conftest$ac_exeext conftest.$ac_ext
15276LIBS=$ac_check_lib_save_LIBS
15277fi
15278{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5
15279printf "%s\n" "$ac_cv_lib_dld_dld_link" >&6; }
15280if test "x$ac_cv_lib_dld_dld_link" = xyes
15281then :
15282  lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld
15283fi
15284
15285
15286fi
15287
15288
15289fi
15290
15291
15292fi
15293
15294
15295fi
15296
15297
15298fi
15299
15300    ;;
15301  esac
15302
15303  if test no = "$lt_cv_dlopen"; then
15304    enable_dlopen=no
15305  else
15306    enable_dlopen=yes
15307  fi
15308
15309  case $lt_cv_dlopen in
15310  dlopen)
15311    save_CPPFLAGS=$CPPFLAGS
15312    test yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
15313
15314    save_LDFLAGS=$LDFLAGS
15315    wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
15316
15317    save_LIBS=$LIBS
15318    LIBS="$lt_cv_dlopen_libs $LIBS"
15319
15320    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5
15321printf %s "checking whether a program can dlopen itself... " >&6; }
15322if test ${lt_cv_dlopen_self+y}
15323then :
15324  printf %s "(cached) " >&6
15325else $as_nop
15326  	  if test yes = "$cross_compiling"; then :
15327  lt_cv_dlopen_self=cross
15328else
15329  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
15330  lt_status=$lt_dlunknown
15331  cat > conftest.$ac_ext <<_LT_EOF
15332#line $LINENO "configure"
15333#include "confdefs.h"
15334
15335#if HAVE_DLFCN_H
15336#include <dlfcn.h>
15337#endif
15338
15339#include <stdio.h>
15340
15341#ifdef RTLD_GLOBAL
15342#  define LT_DLGLOBAL		RTLD_GLOBAL
15343#else
15344#  ifdef DL_GLOBAL
15345#    define LT_DLGLOBAL		DL_GLOBAL
15346#  else
15347#    define LT_DLGLOBAL		0
15348#  endif
15349#endif
15350
15351/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
15352   find out it does not work in some platform. */
15353#ifndef LT_DLLAZY_OR_NOW
15354#  ifdef RTLD_LAZY
15355#    define LT_DLLAZY_OR_NOW		RTLD_LAZY
15356#  else
15357#    ifdef DL_LAZY
15358#      define LT_DLLAZY_OR_NOW		DL_LAZY
15359#    else
15360#      ifdef RTLD_NOW
15361#        define LT_DLLAZY_OR_NOW	RTLD_NOW
15362#      else
15363#        ifdef DL_NOW
15364#          define LT_DLLAZY_OR_NOW	DL_NOW
15365#        else
15366#          define LT_DLLAZY_OR_NOW	0
15367#        endif
15368#      endif
15369#    endif
15370#  endif
15371#endif
15372
15373/* When -fvisibility=hidden is used, assume the code has been annotated
15374   correspondingly for the symbols needed.  */
15375#if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
15376int fnord () __attribute__((visibility("default")));
15377#endif
15378
15379int fnord () { return 42; }
15380int main ()
15381{
15382  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
15383  int status = $lt_dlunknown;
15384
15385  if (self)
15386    {
15387      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
15388      else
15389        {
15390	  if (dlsym( self,"_fnord"))  status = $lt_dlneed_uscore;
15391          else puts (dlerror ());
15392	}
15393      /* dlclose (self); */
15394    }
15395  else
15396    puts (dlerror ());
15397
15398  return status;
15399}
15400_LT_EOF
15401  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
15402  (eval $ac_link) 2>&5
15403  ac_status=$?
15404  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
15405  test $ac_status = 0; } && test -s "conftest$ac_exeext" 2>/dev/null; then
15406    (./conftest; exit; ) >&5 2>/dev/null
15407    lt_status=$?
15408    case x$lt_status in
15409      x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;;
15410      x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;;
15411      x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;;
15412    esac
15413  else :
15414    # compilation failed
15415    lt_cv_dlopen_self=no
15416  fi
15417fi
15418rm -fr conftest*
15419
15420
15421fi
15422{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5
15423printf "%s\n" "$lt_cv_dlopen_self" >&6; }
15424
15425    if test yes = "$lt_cv_dlopen_self"; then
15426      wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
15427      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5
15428printf %s "checking whether a statically linked program can dlopen itself... " >&6; }
15429if test ${lt_cv_dlopen_self_static+y}
15430then :
15431  printf %s "(cached) " >&6
15432else $as_nop
15433  	  if test yes = "$cross_compiling"; then :
15434  lt_cv_dlopen_self_static=cross
15435else
15436  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
15437  lt_status=$lt_dlunknown
15438  cat > conftest.$ac_ext <<_LT_EOF
15439#line $LINENO "configure"
15440#include "confdefs.h"
15441
15442#if HAVE_DLFCN_H
15443#include <dlfcn.h>
15444#endif
15445
15446#include <stdio.h>
15447
15448#ifdef RTLD_GLOBAL
15449#  define LT_DLGLOBAL		RTLD_GLOBAL
15450#else
15451#  ifdef DL_GLOBAL
15452#    define LT_DLGLOBAL		DL_GLOBAL
15453#  else
15454#    define LT_DLGLOBAL		0
15455#  endif
15456#endif
15457
15458/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
15459   find out it does not work in some platform. */
15460#ifndef LT_DLLAZY_OR_NOW
15461#  ifdef RTLD_LAZY
15462#    define LT_DLLAZY_OR_NOW		RTLD_LAZY
15463#  else
15464#    ifdef DL_LAZY
15465#      define LT_DLLAZY_OR_NOW		DL_LAZY
15466#    else
15467#      ifdef RTLD_NOW
15468#        define LT_DLLAZY_OR_NOW	RTLD_NOW
15469#      else
15470#        ifdef DL_NOW
15471#          define LT_DLLAZY_OR_NOW	DL_NOW
15472#        else
15473#          define LT_DLLAZY_OR_NOW	0
15474#        endif
15475#      endif
15476#    endif
15477#  endif
15478#endif
15479
15480/* When -fvisibility=hidden is used, assume the code has been annotated
15481   correspondingly for the symbols needed.  */
15482#if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
15483int fnord () __attribute__((visibility("default")));
15484#endif
15485
15486int fnord () { return 42; }
15487int main ()
15488{
15489  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
15490  int status = $lt_dlunknown;
15491
15492  if (self)
15493    {
15494      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
15495      else
15496        {
15497	  if (dlsym( self,"_fnord"))  status = $lt_dlneed_uscore;
15498          else puts (dlerror ());
15499	}
15500      /* dlclose (self); */
15501    }
15502  else
15503    puts (dlerror ());
15504
15505  return status;
15506}
15507_LT_EOF
15508  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
15509  (eval $ac_link) 2>&5
15510  ac_status=$?
15511  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
15512  test $ac_status = 0; } && test -s "conftest$ac_exeext" 2>/dev/null; then
15513    (./conftest; exit; ) >&5 2>/dev/null
15514    lt_status=$?
15515    case x$lt_status in
15516      x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;;
15517      x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;;
15518      x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;;
15519    esac
15520  else :
15521    # compilation failed
15522    lt_cv_dlopen_self_static=no
15523  fi
15524fi
15525rm -fr conftest*
15526
15527
15528fi
15529{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self_static" >&5
15530printf "%s\n" "$lt_cv_dlopen_self_static" >&6; }
15531    fi
15532
15533    CPPFLAGS=$save_CPPFLAGS
15534    LDFLAGS=$save_LDFLAGS
15535    LIBS=$save_LIBS
15536    ;;
15537  esac
15538
15539  case $lt_cv_dlopen_self in
15540  yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
15541  *) enable_dlopen_self=unknown ;;
15542  esac
15543
15544  case $lt_cv_dlopen_self_static in
15545  yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
15546  *) enable_dlopen_self_static=unknown ;;
15547  esac
15548fi
15549
15550
15551
15552
15553
15554
15555
15556
15557
15558
15559
15560
15561
15562
15563
15564
15565
15566striplib=
15567old_striplib=
15568{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5
15569printf %s "checking whether stripping libraries is possible... " >&6; }
15570if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
15571  test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
15572  test -z "$striplib" && striplib="$STRIP --strip-unneeded"
15573  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15574printf "%s\n" "yes" >&6; }
15575else
15576# FIXME - insert some real tests, host_os isn't really good enough
15577  case $host_os in
15578  darwin*)
15579    if test -n "$STRIP"; then
15580      striplib="$STRIP -x"
15581      old_striplib="$STRIP -S"
15582      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15583printf "%s\n" "yes" >&6; }
15584    else
15585      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
15586printf "%s\n" "no" >&6; }
15587    fi
15588    ;;
15589  *)
15590    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
15591printf "%s\n" "no" >&6; }
15592    ;;
15593  esac
15594fi
15595
15596
15597
15598
15599
15600
15601
15602
15603
15604
15605
15606
15607  # Report what library types will actually be built
15608  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5
15609printf %s "checking if libtool supports shared libraries... " >&6; }
15610  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5
15611printf "%s\n" "$can_build_shared" >&6; }
15612
15613  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5
15614printf %s "checking whether to build shared libraries... " >&6; }
15615  test no = "$can_build_shared" && enable_shared=no
15616
15617  # On AIX, shared libraries and static libraries use the same namespace, and
15618  # are all built from PIC.
15619  case $host_os in
15620  aix3*)
15621    test yes = "$enable_shared" && enable_static=no
15622    if test -n "$RANLIB"; then
15623      archive_cmds="$archive_cmds~\$RANLIB \$lib"
15624      postinstall_cmds='$RANLIB $lib'
15625    fi
15626    ;;
15627
15628  aix[4-9]*)
15629    if test ia64 != "$host_cpu"; then
15630      case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in
15631      yes,aix,yes) ;;			# shared object as lib.so file only
15632      yes,svr4,*) ;;			# shared object as lib.so archive member only
15633      yes,*) enable_static=no ;;	# shared object in lib.a archive as well
15634      esac
15635    fi
15636    ;;
15637  esac
15638  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
15639printf "%s\n" "$enable_shared" >&6; }
15640
15641  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5
15642printf %s "checking whether to build static libraries... " >&6; }
15643  # Make sure either enable_shared or enable_static is yes.
15644  test yes = "$enable_shared" || enable_static=yes
15645  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5
15646printf "%s\n" "$enable_static" >&6; }
15647
15648
15649
15650
15651fi
15652ac_ext=c
15653ac_cpp='$CPP $CPPFLAGS'
15654ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15655ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15656ac_compiler_gnu=$ac_cv_c_compiler_gnu
15657
15658CC=$lt_save_CC
15659
15660
15661
15662
15663
15664
15665
15666
15667
15668
15669
15670
15671
15672
15673
15674        ac_config_commands="$ac_config_commands libtool"
15675
15676
15677
15678
15679# Only expand once:
15680
15681
15682
15683
15684# pkg-config is only needed for these options, do not require it otherwise
15685if test "$enable_systemd" = "yes" -o "$enable_dnstap" = "yes" -o "$with_pyunbound" = "yes" -o "$with_pythonmod" = "yes"; then
15686
15687
15688
15689
15690
15691
15692
15693if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
15694	if test -n "$ac_tool_prefix"; then
15695  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
15696set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
15697{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15698printf %s "checking for $ac_word... " >&6; }
15699if test ${ac_cv_path_PKG_CONFIG+y}
15700then :
15701  printf %s "(cached) " >&6
15702else $as_nop
15703  case $PKG_CONFIG in
15704  [\\/]* | ?:[\\/]*)
15705  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
15706  ;;
15707  *)
15708  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15709for as_dir in $PATH
15710do
15711  IFS=$as_save_IFS
15712  case $as_dir in #(((
15713    '') as_dir=./ ;;
15714    */) ;;
15715    *) as_dir=$as_dir/ ;;
15716  esac
15717    for ac_exec_ext in '' $ac_executable_extensions; do
15718  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
15719    ac_cv_path_PKG_CONFIG="$as_dir$ac_word$ac_exec_ext"
15720    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
15721    break 2
15722  fi
15723done
15724  done
15725IFS=$as_save_IFS
15726
15727  ;;
15728esac
15729fi
15730PKG_CONFIG=$ac_cv_path_PKG_CONFIG
15731if test -n "$PKG_CONFIG"; then
15732  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
15733printf "%s\n" "$PKG_CONFIG" >&6; }
15734else
15735  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
15736printf "%s\n" "no" >&6; }
15737fi
15738
15739
15740fi
15741if test -z "$ac_cv_path_PKG_CONFIG"; then
15742  ac_pt_PKG_CONFIG=$PKG_CONFIG
15743  # Extract the first word of "pkg-config", so it can be a program name with args.
15744set dummy pkg-config; ac_word=$2
15745{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15746printf %s "checking for $ac_word... " >&6; }
15747if test ${ac_cv_path_ac_pt_PKG_CONFIG+y}
15748then :
15749  printf %s "(cached) " >&6
15750else $as_nop
15751  case $ac_pt_PKG_CONFIG in
15752  [\\/]* | ?:[\\/]*)
15753  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
15754  ;;
15755  *)
15756  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15757for as_dir in $PATH
15758do
15759  IFS=$as_save_IFS
15760  case $as_dir in #(((
15761    '') as_dir=./ ;;
15762    */) ;;
15763    *) as_dir=$as_dir/ ;;
15764  esac
15765    for ac_exec_ext in '' $ac_executable_extensions; do
15766  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
15767    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir$ac_word$ac_exec_ext"
15768    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
15769    break 2
15770  fi
15771done
15772  done
15773IFS=$as_save_IFS
15774
15775  ;;
15776esac
15777fi
15778ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
15779if test -n "$ac_pt_PKG_CONFIG"; then
15780  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
15781printf "%s\n" "$ac_pt_PKG_CONFIG" >&6; }
15782else
15783  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
15784printf "%s\n" "no" >&6; }
15785fi
15786
15787  if test "x$ac_pt_PKG_CONFIG" = x; then
15788    PKG_CONFIG=""
15789  else
15790    case $cross_compiling:$ac_tool_warned in
15791yes:)
15792{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
15793printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
15794ac_tool_warned=yes ;;
15795esac
15796    PKG_CONFIG=$ac_pt_PKG_CONFIG
15797  fi
15798else
15799  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
15800fi
15801
15802fi
15803if test -n "$PKG_CONFIG"; then
15804	_pkg_min_version=0.9.0
15805	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
15806printf %s "checking pkg-config is at least version $_pkg_min_version... " >&6; }
15807	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
15808		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15809printf "%s\n" "yes" >&6; }
15810	else
15811		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
15812printf "%s\n" "no" >&6; }
15813		PKG_CONFIG=""
15814	fi
15815fi
15816fi
15817
15818# Checks for header files.
15819ac_fn_c_check_header_compile "$LINENO" "stdarg.h" "ac_cv_header_stdarg_h" "$ac_includes_default
15820"
15821if test "x$ac_cv_header_stdarg_h" = xyes
15822then :
15823  printf "%s\n" "#define HAVE_STDARG_H 1" >>confdefs.h
15824
15825fi
15826ac_fn_c_check_header_compile "$LINENO" "stdbool.h" "ac_cv_header_stdbool_h" "$ac_includes_default
15827"
15828if test "x$ac_cv_header_stdbool_h" = xyes
15829then :
15830  printf "%s\n" "#define HAVE_STDBOOL_H 1" >>confdefs.h
15831
15832fi
15833ac_fn_c_check_header_compile "$LINENO" "netinet/in.h" "ac_cv_header_netinet_in_h" "$ac_includes_default
15834"
15835if test "x$ac_cv_header_netinet_in_h" = xyes
15836then :
15837  printf "%s\n" "#define HAVE_NETINET_IN_H 1" >>confdefs.h
15838
15839fi
15840ac_fn_c_check_header_compile "$LINENO" "netinet/tcp.h" "ac_cv_header_netinet_tcp_h" "$ac_includes_default
15841"
15842if test "x$ac_cv_header_netinet_tcp_h" = xyes
15843then :
15844  printf "%s\n" "#define HAVE_NETINET_TCP_H 1" >>confdefs.h
15845
15846fi
15847ac_fn_c_check_header_compile "$LINENO" "sys/param.h" "ac_cv_header_sys_param_h" "$ac_includes_default
15848"
15849if test "x$ac_cv_header_sys_param_h" = xyes
15850then :
15851  printf "%s\n" "#define HAVE_SYS_PARAM_H 1" >>confdefs.h
15852
15853fi
15854ac_fn_c_check_header_compile "$LINENO" "sys/select.h" "ac_cv_header_sys_select_h" "$ac_includes_default
15855"
15856if test "x$ac_cv_header_sys_select_h" = xyes
15857then :
15858  printf "%s\n" "#define HAVE_SYS_SELECT_H 1" >>confdefs.h
15859
15860fi
15861ac_fn_c_check_header_compile "$LINENO" "sys/socket.h" "ac_cv_header_sys_socket_h" "$ac_includes_default
15862"
15863if test "x$ac_cv_header_sys_socket_h" = xyes
15864then :
15865  printf "%s\n" "#define HAVE_SYS_SOCKET_H 1" >>confdefs.h
15866
15867fi
15868ac_fn_c_check_header_compile "$LINENO" "sys/un.h" "ac_cv_header_sys_un_h" "$ac_includes_default
15869"
15870if test "x$ac_cv_header_sys_un_h" = xyes
15871then :
15872  printf "%s\n" "#define HAVE_SYS_UN_H 1" >>confdefs.h
15873
15874fi
15875ac_fn_c_check_header_compile "$LINENO" "sys/uio.h" "ac_cv_header_sys_uio_h" "$ac_includes_default
15876"
15877if test "x$ac_cv_header_sys_uio_h" = xyes
15878then :
15879  printf "%s\n" "#define HAVE_SYS_UIO_H 1" >>confdefs.h
15880
15881fi
15882ac_fn_c_check_header_compile "$LINENO" "sys/resource.h" "ac_cv_header_sys_resource_h" "$ac_includes_default
15883"
15884if test "x$ac_cv_header_sys_resource_h" = xyes
15885then :
15886  printf "%s\n" "#define HAVE_SYS_RESOURCE_H 1" >>confdefs.h
15887
15888fi
15889ac_fn_c_check_header_compile "$LINENO" "arpa/inet.h" "ac_cv_header_arpa_inet_h" "$ac_includes_default
15890"
15891if test "x$ac_cv_header_arpa_inet_h" = xyes
15892then :
15893  printf "%s\n" "#define HAVE_ARPA_INET_H 1" >>confdefs.h
15894
15895fi
15896ac_fn_c_check_header_compile "$LINENO" "syslog.h" "ac_cv_header_syslog_h" "$ac_includes_default
15897"
15898if test "x$ac_cv_header_syslog_h" = xyes
15899then :
15900  printf "%s\n" "#define HAVE_SYSLOG_H 1" >>confdefs.h
15901
15902fi
15903ac_fn_c_check_header_compile "$LINENO" "netdb.h" "ac_cv_header_netdb_h" "$ac_includes_default
15904"
15905if test "x$ac_cv_header_netdb_h" = xyes
15906then :
15907  printf "%s\n" "#define HAVE_NETDB_H 1" >>confdefs.h
15908
15909fi
15910ac_fn_c_check_header_compile "$LINENO" "sys/wait.h" "ac_cv_header_sys_wait_h" "$ac_includes_default
15911"
15912if test "x$ac_cv_header_sys_wait_h" = xyes
15913then :
15914  printf "%s\n" "#define HAVE_SYS_WAIT_H 1" >>confdefs.h
15915
15916fi
15917ac_fn_c_check_header_compile "$LINENO" "pwd.h" "ac_cv_header_pwd_h" "$ac_includes_default
15918"
15919if test "x$ac_cv_header_pwd_h" = xyes
15920then :
15921  printf "%s\n" "#define HAVE_PWD_H 1" >>confdefs.h
15922
15923fi
15924ac_fn_c_check_header_compile "$LINENO" "glob.h" "ac_cv_header_glob_h" "$ac_includes_default
15925"
15926if test "x$ac_cv_header_glob_h" = xyes
15927then :
15928  printf "%s\n" "#define HAVE_GLOB_H 1" >>confdefs.h
15929
15930fi
15931ac_fn_c_check_header_compile "$LINENO" "grp.h" "ac_cv_header_grp_h" "$ac_includes_default
15932"
15933if test "x$ac_cv_header_grp_h" = xyes
15934then :
15935  printf "%s\n" "#define HAVE_GRP_H 1" >>confdefs.h
15936
15937fi
15938ac_fn_c_check_header_compile "$LINENO" "login_cap.h" "ac_cv_header_login_cap_h" "$ac_includes_default
15939"
15940if test "x$ac_cv_header_login_cap_h" = xyes
15941then :
15942  printf "%s\n" "#define HAVE_LOGIN_CAP_H 1" >>confdefs.h
15943
15944fi
15945ac_fn_c_check_header_compile "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default
15946"
15947if test "x$ac_cv_header_winsock2_h" = xyes
15948then :
15949  printf "%s\n" "#define HAVE_WINSOCK2_H 1" >>confdefs.h
15950
15951fi
15952ac_fn_c_check_header_compile "$LINENO" "ws2tcpip.h" "ac_cv_header_ws2tcpip_h" "$ac_includes_default
15953"
15954if test "x$ac_cv_header_ws2tcpip_h" = xyes
15955then :
15956  printf "%s\n" "#define HAVE_WS2TCPIP_H 1" >>confdefs.h
15957
15958fi
15959ac_fn_c_check_header_compile "$LINENO" "endian.h" "ac_cv_header_endian_h" "$ac_includes_default
15960"
15961if test "x$ac_cv_header_endian_h" = xyes
15962then :
15963  printf "%s\n" "#define HAVE_ENDIAN_H 1" >>confdefs.h
15964
15965fi
15966ac_fn_c_check_header_compile "$LINENO" "sys/endian.h" "ac_cv_header_sys_endian_h" "$ac_includes_default
15967"
15968if test "x$ac_cv_header_sys_endian_h" = xyes
15969then :
15970  printf "%s\n" "#define HAVE_SYS_ENDIAN_H 1" >>confdefs.h
15971
15972fi
15973ac_fn_c_check_header_compile "$LINENO" "libkern/OSByteOrder.h" "ac_cv_header_libkern_OSByteOrder_h" "$ac_includes_default
15974"
15975if test "x$ac_cv_header_libkern_OSByteOrder_h" = xyes
15976then :
15977  printf "%s\n" "#define HAVE_LIBKERN_OSBYTEORDER_H 1" >>confdefs.h
15978
15979fi
15980ac_fn_c_check_header_compile "$LINENO" "sys/ipc.h" "ac_cv_header_sys_ipc_h" "$ac_includes_default
15981"
15982if test "x$ac_cv_header_sys_ipc_h" = xyes
15983then :
15984  printf "%s\n" "#define HAVE_SYS_IPC_H 1" >>confdefs.h
15985
15986fi
15987ac_fn_c_check_header_compile "$LINENO" "sys/shm.h" "ac_cv_header_sys_shm_h" "$ac_includes_default
15988"
15989if test "x$ac_cv_header_sys_shm_h" = xyes
15990then :
15991  printf "%s\n" "#define HAVE_SYS_SHM_H 1" >>confdefs.h
15992
15993fi
15994ac_fn_c_check_header_compile "$LINENO" "ifaddrs.h" "ac_cv_header_ifaddrs_h" "$ac_includes_default
15995"
15996if test "x$ac_cv_header_ifaddrs_h" = xyes
15997then :
15998  printf "%s\n" "#define HAVE_IFADDRS_H 1" >>confdefs.h
15999
16000fi
16001ac_fn_c_check_header_compile "$LINENO" "poll.h" "ac_cv_header_poll_h" "$ac_includes_default
16002"
16003if test "x$ac_cv_header_poll_h" = xyes
16004then :
16005  printf "%s\n" "#define HAVE_POLL_H 1" >>confdefs.h
16006
16007fi
16008
16009# net/if.h portability for Darwin see:
16010# https://www.gnu.org/software/autoconf/manual/autoconf-2.69/html_node/Header-Portability.html
16011ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "
16012#include <stdio.h>
16013#ifdef STDC_HEADERS
16014# include <stdlib.h>
16015# include <stddef.h>
16016#else
16017# ifdef HAVE_STDLIB_H
16018#  include <stdlib.h>
16019# endif
16020#endif
16021#ifdef HAVE_SYS_SOCKET_H
16022# include <sys/socket.h>
16023#endif
16024
16025"
16026if test "x$ac_cv_header_net_if_h" = xyes
16027then :
16028  printf "%s\n" "#define HAVE_NET_IF_H 1" >>confdefs.h
16029
16030fi
16031
16032
16033# Check for Apple header. This uncovers TARGET_OS_IPHONE, TARGET_OS_TV or TARGET_OS_WATCH
16034ac_fn_c_check_header_compile "$LINENO" "TargetConditionals.h" "ac_cv_header_TargetConditionals_h" "$ac_includes_default
16035"
16036if test "x$ac_cv_header_TargetConditionals_h" = xyes
16037then :
16038  printf "%s\n" "#define HAVE_TARGETCONDITIONALS_H 1" >>confdefs.h
16039
16040fi
16041
16042ac_fn_c_check_header_compile "$LINENO" "netioapi.h" "ac_cv_header_netioapi_h" "$ac_includes_default
16043#if HAVE_SYS_PARAM_H
16044#include <sys/param.h>
16045#endif
16046
16047#ifdef HAVE_SYS_SOCKET_H
16048#include <sys/socket.h>
16049#endif
16050
16051#ifdef HAVE_SYS_UIO_H
16052#include <sys/uio.h>
16053#endif
16054
16055#ifdef HAVE_NETINET_IN_H
16056#include <netinet/in.h>
16057#endif
16058
16059#ifdef HAVE_NETINET_TCP_H
16060#include <netinet/tcp.h>
16061#endif
16062
16063#ifdef HAVE_ARPA_INET_H
16064#include <arpa/inet.h>
16065#endif
16066
16067#ifdef HAVE_WINSOCK2_H
16068#include <winsock2.h>
16069#endif
16070
16071#ifdef HAVE_WS2TCPIP_H
16072#include <ws2tcpip.h>
16073#endif
16074
16075"
16076if test "x$ac_cv_header_netioapi_h" = xyes
16077then :
16078  printf "%s\n" "#define HAVE_NETIOAPI_H 1" >>confdefs.h
16079
16080fi
16081
16082
16083# Check for Linux timestamping headers
16084ac_fn_c_check_header_compile "$LINENO" "linux/net_tstamp.h" "ac_cv_header_linux_net_tstamp_h" "$ac_includes_default
16085"
16086if test "x$ac_cv_header_linux_net_tstamp_h" = xyes
16087then :
16088  printf "%s\n" "#define HAVE_LINUX_NET_TSTAMP_H 1" >>confdefs.h
16089
16090fi
16091
16092
16093# check for types.
16094# Using own tests for int64* because autoconf builtin only give 32bit.
16095ac_fn_c_check_type "$LINENO" "int8_t" "ac_cv_type_int8_t" "$ac_includes_default"
16096if test "x$ac_cv_type_int8_t" = xyes
16097then :
16098
16099else $as_nop
16100
16101printf "%s\n" "#define int8_t signed char" >>confdefs.h
16102
16103fi
16104
16105ac_fn_c_check_type "$LINENO" "int16_t" "ac_cv_type_int16_t" "$ac_includes_default"
16106if test "x$ac_cv_type_int16_t" = xyes
16107then :
16108
16109else $as_nop
16110
16111printf "%s\n" "#define int16_t short" >>confdefs.h
16112
16113fi
16114
16115ac_fn_c_check_type "$LINENO" "int32_t" "ac_cv_type_int32_t" "$ac_includes_default"
16116if test "x$ac_cv_type_int32_t" = xyes
16117then :
16118
16119else $as_nop
16120
16121printf "%s\n" "#define int32_t int" >>confdefs.h
16122
16123fi
16124
16125ac_fn_c_check_type "$LINENO" "int64_t" "ac_cv_type_int64_t" "$ac_includes_default"
16126if test "x$ac_cv_type_int64_t" = xyes
16127then :
16128
16129else $as_nop
16130
16131printf "%s\n" "#define int64_t long long" >>confdefs.h
16132
16133fi
16134
16135ac_fn_c_check_type "$LINENO" "uint8_t" "ac_cv_type_uint8_t" "$ac_includes_default"
16136if test "x$ac_cv_type_uint8_t" = xyes
16137then :
16138
16139else $as_nop
16140
16141printf "%s\n" "#define uint8_t unsigned char" >>confdefs.h
16142
16143fi
16144
16145ac_fn_c_check_type "$LINENO" "uint16_t" "ac_cv_type_uint16_t" "$ac_includes_default"
16146if test "x$ac_cv_type_uint16_t" = xyes
16147then :
16148
16149else $as_nop
16150
16151printf "%s\n" "#define uint16_t unsigned short" >>confdefs.h
16152
16153fi
16154
16155ac_fn_c_check_type "$LINENO" "uint32_t" "ac_cv_type_uint32_t" "$ac_includes_default"
16156if test "x$ac_cv_type_uint32_t" = xyes
16157then :
16158
16159else $as_nop
16160
16161printf "%s\n" "#define uint32_t unsigned int" >>confdefs.h
16162
16163fi
16164
16165ac_fn_c_check_type "$LINENO" "uint64_t" "ac_cv_type_uint64_t" "$ac_includes_default"
16166if test "x$ac_cv_type_uint64_t" = xyes
16167then :
16168
16169else $as_nop
16170
16171printf "%s\n" "#define uint64_t unsigned long long" >>confdefs.h
16172
16173fi
16174
16175ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
16176if test "x$ac_cv_type_size_t" = xyes
16177then :
16178
16179else $as_nop
16180
16181printf "%s\n" "#define size_t unsigned int" >>confdefs.h
16182
16183fi
16184
16185ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
16186if test "x$ac_cv_type_ssize_t" = xyes
16187then :
16188
16189else $as_nop
16190
16191printf "%s\n" "#define ssize_t int" >>confdefs.h
16192
16193fi
16194
16195ac_ext=c
16196ac_cpp='$CPP $CPPFLAGS'
16197ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16198ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16199ac_compiler_gnu=$ac_cv_c_compiler_gnu
16200{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
16201printf %s "checking how to run the C preprocessor... " >&6; }
16202# On Suns, sometimes $CPP names a directory.
16203if test -n "$CPP" && test -d "$CPP"; then
16204  CPP=
16205fi
16206if test -z "$CPP"; then
16207  if test ${ac_cv_prog_CPP+y}
16208then :
16209  printf %s "(cached) " >&6
16210else $as_nop
16211      # Double quotes because $CC needs to be expanded
16212    for CPP in "$CC -E" "$CC -E -traditional-cpp" cpp /lib/cpp
16213    do
16214      ac_preproc_ok=false
16215for ac_c_preproc_warn_flag in '' yes
16216do
16217  # Use a header file that comes with gcc, so configuring glibc
16218  # with a fresh cross-compiler works.
16219  # On the NeXT, cc -E runs the code through the compiler's parser,
16220  # not just through cpp. "Syntax error" is here to catch this case.
16221  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16222/* end confdefs.h.  */
16223#include <limits.h>
16224		     Syntax error
16225_ACEOF
16226if ac_fn_c_try_cpp "$LINENO"
16227then :
16228
16229else $as_nop
16230  # Broken: fails on valid input.
16231continue
16232fi
16233rm -f conftest.err conftest.i conftest.$ac_ext
16234
16235  # OK, works on sane cases.  Now check whether nonexistent headers
16236  # can be detected and how.
16237  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16238/* end confdefs.h.  */
16239#include <ac_nonexistent.h>
16240_ACEOF
16241if ac_fn_c_try_cpp "$LINENO"
16242then :
16243  # Broken: success on invalid input.
16244continue
16245else $as_nop
16246  # Passes both tests.
16247ac_preproc_ok=:
16248break
16249fi
16250rm -f conftest.err conftest.i conftest.$ac_ext
16251
16252done
16253# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
16254rm -f conftest.i conftest.err conftest.$ac_ext
16255if $ac_preproc_ok
16256then :
16257  break
16258fi
16259
16260    done
16261    ac_cv_prog_CPP=$CPP
16262
16263fi
16264  CPP=$ac_cv_prog_CPP
16265else
16266  ac_cv_prog_CPP=$CPP
16267fi
16268{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
16269printf "%s\n" "$CPP" >&6; }
16270ac_preproc_ok=false
16271for ac_c_preproc_warn_flag in '' yes
16272do
16273  # Use a header file that comes with gcc, so configuring glibc
16274  # with a fresh cross-compiler works.
16275  # On the NeXT, cc -E runs the code through the compiler's parser,
16276  # not just through cpp. "Syntax error" is here to catch this case.
16277  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16278/* end confdefs.h.  */
16279#include <limits.h>
16280		     Syntax error
16281_ACEOF
16282if ac_fn_c_try_cpp "$LINENO"
16283then :
16284
16285else $as_nop
16286  # Broken: fails on valid input.
16287continue
16288fi
16289rm -f conftest.err conftest.i conftest.$ac_ext
16290
16291  # OK, works on sane cases.  Now check whether nonexistent headers
16292  # can be detected and how.
16293  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16294/* end confdefs.h.  */
16295#include <ac_nonexistent.h>
16296_ACEOF
16297if ac_fn_c_try_cpp "$LINENO"
16298then :
16299  # Broken: success on invalid input.
16300continue
16301else $as_nop
16302  # Passes both tests.
16303ac_preproc_ok=:
16304break
16305fi
16306rm -f conftest.err conftest.i conftest.$ac_ext
16307
16308done
16309# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
16310rm -f conftest.i conftest.err conftest.$ac_ext
16311if $ac_preproc_ok
16312then :
16313
16314else $as_nop
16315  { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
16316printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
16317as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
16318See \`config.log' for more details" "$LINENO" 5; }
16319fi
16320
16321ac_ext=c
16322ac_cpp='$CPP $CPPFLAGS'
16323ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16324ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16325ac_compiler_gnu=$ac_cv_c_compiler_gnu
16326
16327
16328{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
16329printf %s "checking for uid_t in sys/types.h... " >&6; }
16330if test ${ac_cv_type_uid_t+y}
16331then :
16332  printf %s "(cached) " >&6
16333else $as_nop
16334  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16335/* end confdefs.h.  */
16336#include <sys/types.h>
16337
16338_ACEOF
16339if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16340  $EGREP "uid_t" >/dev/null 2>&1
16341then :
16342  ac_cv_type_uid_t=yes
16343else $as_nop
16344  ac_cv_type_uid_t=no
16345fi
16346rm -rf conftest*
16347
16348fi
16349{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
16350printf "%s\n" "$ac_cv_type_uid_t" >&6; }
16351if test $ac_cv_type_uid_t = no; then
16352
16353printf "%s\n" "#define uid_t int" >>confdefs.h
16354
16355
16356printf "%s\n" "#define gid_t int" >>confdefs.h
16357
16358fi
16359
16360
16361  ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default
16362"
16363if test "x$ac_cv_type_pid_t" = xyes
16364then :
16365
16366else $as_nop
16367                                          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16368/* end confdefs.h.  */
16369
16370          #if defined _WIN64 && !defined __CYGWIN__
16371          LLP64
16372          #endif
16373
16374int
16375main (void)
16376{
16377
16378  ;
16379  return 0;
16380}
16381
16382_ACEOF
16383if ac_fn_c_try_compile "$LINENO"
16384then :
16385  ac_pid_type='int'
16386else $as_nop
16387  ac_pid_type='__int64'
16388fi
16389rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
16390
16391printf "%s\n" "#define pid_t $ac_pid_type" >>confdefs.h
16392
16393
16394fi
16395
16396
16397ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
16398if test "x$ac_cv_type_off_t" = xyes
16399then :
16400
16401else $as_nop
16402
16403printf "%s\n" "#define off_t long int" >>confdefs.h
16404
16405fi
16406
16407ac_fn_c_check_type "$LINENO" "u_char" "ac_cv_type_u_char" "
16408$ac_includes_default
16409#ifdef HAVE_WINSOCK2_H
16410#  include <winsock2.h>
16411#endif
16412
16413"
16414if test "x$ac_cv_type_u_char" = xyes
16415then :
16416
16417else $as_nop
16418
16419printf "%s\n" "#define u_char unsigned char" >>confdefs.h
16420
16421fi
16422
16423ac_fn_c_check_type "$LINENO" "rlim_t" "ac_cv_type_rlim_t" "
16424$ac_includes_default
16425#ifdef HAVE_SYS_RESOURCE_H
16426#  include <sys/resource.h>
16427#endif
16428
16429"
16430if test "x$ac_cv_type_rlim_t" = xyes
16431then :
16432
16433else $as_nop
16434
16435printf "%s\n" "#define rlim_t unsigned long" >>confdefs.h
16436
16437fi
16438
16439
16440ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
16441$ac_includes_default
16442#ifdef HAVE_SYS_SOCKET_H
16443#  include <sys/socket.h>
16444#endif
16445#ifdef HAVE_WS2TCPIP_H
16446#  include <ws2tcpip.h>
16447#endif
16448
16449"
16450if test "x$ac_cv_type_socklen_t" = xyes
16451then :
16452
16453else $as_nop
16454
16455printf "%s\n" "#define socklen_t int" >>confdefs.h
16456
16457fi
16458
16459 ac_fn_c_check_type "$LINENO" "in_addr_t" "ac_cv_type_in_addr_t" "
16460$ac_includes_default
16461#ifdef HAVE_SYS_TYPES_H
16462# include <sys/types.h>
16463#endif
16464#ifdef HAVE_NETINET_IN_H
16465# include <netinet/in.h>
16466#endif
16467
16468"
16469if test "x$ac_cv_type_in_addr_t" = xyes
16470then :
16471
16472else $as_nop
16473
16474printf "%s\n" "#define in_addr_t uint32_t" >>confdefs.h
16475
16476fi
16477
16478 ac_fn_c_check_type "$LINENO" "in_port_t" "ac_cv_type_in_port_t" "
16479$ac_includes_default
16480#ifdef HAVE_SYS_TYPES_H
16481# include <sys/types.h>
16482#endif
16483#ifdef HAVE_NETINET_IN_H
16484# include <netinet/in.h>
16485#endif
16486
16487"
16488if test "x$ac_cv_type_in_port_t" = xyes
16489then :
16490
16491else $as_nop
16492
16493printf "%s\n" "#define in_port_t uint16_t" >>confdefs.h
16494
16495fi
16496
16497{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if memcmp compares unsigned" >&5
16498printf %s "checking if memcmp compares unsigned... " >&6; }
16499if test "$cross_compiling" = yes
16500then :
16501   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: cross-compile no" >&5
16502printf "%s\n" "cross-compile no" >&6; }
16503
16504printf "%s\n" "#define MEMCMP_IS_BROKEN 1" >>confdefs.h
16505
16506  case " $LIBOBJS " in
16507  *" memcmp.$ac_objext "* ) ;;
16508  *) LIBOBJS="$LIBOBJS memcmp.$ac_objext"
16509 ;;
16510esac
16511
16512
16513else $as_nop
16514  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16515/* end confdefs.h.  */
16516
16517#include <stdio.h>
16518#include <stdlib.h>
16519#include <string.h>
16520int main(void)
16521{
16522	char a = 255, b = 0;
16523	if(memcmp(&a, &b, 1) < 0)
16524		return 1;
16525	return 0;
16526}
16527
16528_ACEOF
16529if ac_fn_c_try_run "$LINENO"
16530then :
16531  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16532printf "%s\n" "yes" >&6; }
16533else $as_nop
16534   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
16535printf "%s\n" "no" >&6; }
16536
16537printf "%s\n" "#define MEMCMP_IS_BROKEN 1" >>confdefs.h
16538
16539  case " $LIBOBJS " in
16540  *" memcmp.$ac_objext "* ) ;;
16541  *) LIBOBJS="$LIBOBJS memcmp.$ac_objext"
16542 ;;
16543esac
16544
16545
16546fi
16547rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16548  conftest.$ac_objext conftest.beam conftest.$ac_ext
16549fi
16550
16551
16552# The cast to long int works around a bug in the HP C Compiler
16553# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
16554# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
16555# This bug is HP SR number 8606223364.
16556{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
16557printf %s "checking size of time_t... " >&6; }
16558if test ${ac_cv_sizeof_time_t+y}
16559then :
16560  printf %s "(cached) " >&6
16561else $as_nop
16562  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t"        "
16563$ac_includes_default
16564#ifdef TIME_WITH_SYS_TIME
16565# include <sys/time.h>
16566# include <time.h>
16567#else
16568# ifdef HAVE_SYS_TIME_H
16569#  include <sys/time.h>
16570# else
16571#  include <time.h>
16572# endif
16573#endif
16574
16575"
16576then :
16577
16578else $as_nop
16579  if test "$ac_cv_type_time_t" = yes; then
16580     { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
16581printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
16582as_fn_error 77 "cannot compute sizeof (time_t)
16583See \`config.log' for more details" "$LINENO" 5; }
16584   else
16585     ac_cv_sizeof_time_t=0
16586   fi
16587fi
16588
16589fi
16590{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
16591printf "%s\n" "$ac_cv_sizeof_time_t" >&6; }
16592
16593
16594
16595printf "%s\n" "#define SIZEOF_TIME_T $ac_cv_sizeof_time_t" >>confdefs.h
16596
16597
16598# The cast to long int works around a bug in the HP C Compiler
16599# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
16600# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
16601# This bug is HP SR number 8606223364.
16602{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
16603printf %s "checking size of size_t... " >&6; }
16604if test ${ac_cv_sizeof_size_t+y}
16605then :
16606  printf %s "(cached) " >&6
16607else $as_nop
16608  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (size_t))" "ac_cv_sizeof_size_t"        "$ac_includes_default"
16609then :
16610
16611else $as_nop
16612  if test "$ac_cv_type_size_t" = yes; then
16613     { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
16614printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
16615as_fn_error 77 "cannot compute sizeof (size_t)
16616See \`config.log' for more details" "$LINENO" 5; }
16617   else
16618     ac_cv_sizeof_size_t=0
16619   fi
16620fi
16621
16622fi
16623{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
16624printf "%s\n" "$ac_cv_sizeof_size_t" >&6; }
16625
16626
16627
16628printf "%s\n" "#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t" >>confdefs.h
16629
16630
16631
16632# add option to disable the evil rpath
16633
16634# Check whether --enable-rpath was given.
16635if test ${enable_rpath+y}
16636then :
16637  enableval=$enable_rpath; enable_rpath=$enableval
16638else $as_nop
16639  enable_rpath=yes
16640fi
16641
16642if test "x$enable_rpath" = xno; then
16643		ac_config_commands="$ac_config_commands disable-rpath"
16644
16645fi
16646
16647
16648
16649# check to see if libraries are needed for these functions.
16650{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing inet_pton" >&5
16651printf %s "checking for library containing inet_pton... " >&6; }
16652if test ${ac_cv_search_inet_pton+y}
16653then :
16654  printf %s "(cached) " >&6
16655else $as_nop
16656  ac_func_search_save_LIBS=$LIBS
16657cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16658/* end confdefs.h.  */
16659
16660/* Override any GCC internal prototype to avoid an error.
16661   Use char because int might match the return type of a GCC
16662   builtin and then its argument prototype would still apply.  */
16663char inet_pton ();
16664int
16665main (void)
16666{
16667return inet_pton ();
16668  ;
16669  return 0;
16670}
16671_ACEOF
16672for ac_lib in '' nsl
16673do
16674  if test -z "$ac_lib"; then
16675    ac_res="none required"
16676  else
16677    ac_res=-l$ac_lib
16678    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
16679  fi
16680  if ac_fn_c_try_link "$LINENO"
16681then :
16682  ac_cv_search_inet_pton=$ac_res
16683fi
16684rm -f core conftest.err conftest.$ac_objext conftest.beam \
16685    conftest$ac_exeext
16686  if test ${ac_cv_search_inet_pton+y}
16687then :
16688  break
16689fi
16690done
16691if test ${ac_cv_search_inet_pton+y}
16692then :
16693
16694else $as_nop
16695  ac_cv_search_inet_pton=no
16696fi
16697rm conftest.$ac_ext
16698LIBS=$ac_func_search_save_LIBS
16699fi
16700{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_inet_pton" >&5
16701printf "%s\n" "$ac_cv_search_inet_pton" >&6; }
16702ac_res=$ac_cv_search_inet_pton
16703if test "$ac_res" != no
16704then :
16705  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
16706
16707fi
16708
16709{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing socket" >&5
16710printf %s "checking for library containing socket... " >&6; }
16711if test ${ac_cv_search_socket+y}
16712then :
16713  printf %s "(cached) " >&6
16714else $as_nop
16715  ac_func_search_save_LIBS=$LIBS
16716cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16717/* end confdefs.h.  */
16718
16719/* Override any GCC internal prototype to avoid an error.
16720   Use char because int might match the return type of a GCC
16721   builtin and then its argument prototype would still apply.  */
16722char socket ();
16723int
16724main (void)
16725{
16726return socket ();
16727  ;
16728  return 0;
16729}
16730_ACEOF
16731for ac_lib in '' socket
16732do
16733  if test -z "$ac_lib"; then
16734    ac_res="none required"
16735  else
16736    ac_res=-l$ac_lib
16737    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
16738  fi
16739  if ac_fn_c_try_link "$LINENO"
16740then :
16741  ac_cv_search_socket=$ac_res
16742fi
16743rm -f core conftest.err conftest.$ac_objext conftest.beam \
16744    conftest$ac_exeext
16745  if test ${ac_cv_search_socket+y}
16746then :
16747  break
16748fi
16749done
16750if test ${ac_cv_search_socket+y}
16751then :
16752
16753else $as_nop
16754  ac_cv_search_socket=no
16755fi
16756rm conftest.$ac_ext
16757LIBS=$ac_func_search_save_LIBS
16758fi
16759{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socket" >&5
16760printf "%s\n" "$ac_cv_search_socket" >&6; }
16761ac_res=$ac_cv_search_socket
16762if test "$ac_res" != no
16763then :
16764  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
16765
16766fi
16767
16768
16769# check whether strptime also works
16770
16771# check some functions of the OS before linking libs (while still runnable).
16772{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working chown" >&5
16773printf %s "checking for working chown... " >&6; }
16774if test ${ac_cv_func_chown_works+y}
16775then :
16776  printf %s "(cached) " >&6
16777else $as_nop
16778  if test "$cross_compiling" = yes
16779then :
16780  case "$host_os" in # ((
16781			  # Guess yes on glibc systems.
16782		  *-gnu*) ac_cv_func_chown_works=yes ;;
16783			  # If we don't know, assume the worst.
16784		  *)      ac_cv_func_chown_works=no ;;
16785		esac
16786else $as_nop
16787  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16788/* end confdefs.h.  */
16789$ac_includes_default
16790#include <fcntl.h>
16791
16792int
16793main (void)
16794{
16795  char *f = "conftest.chown";
16796  struct stat before, after;
16797
16798  if (creat (f, 0600) < 0)
16799    return 1;
16800  if (stat (f, &before) < 0)
16801    return 1;
16802  if (chown (f, (uid_t) -1, (gid_t) -1) == -1)
16803    return 1;
16804  if (stat (f, &after) < 0)
16805    return 1;
16806  return ! (before.st_uid == after.st_uid && before.st_gid == after.st_gid);
16807
16808  ;
16809  return 0;
16810}
16811_ACEOF
16812if ac_fn_c_try_run "$LINENO"
16813then :
16814  ac_cv_func_chown_works=yes
16815else $as_nop
16816  ac_cv_func_chown_works=no
16817fi
16818rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16819  conftest.$ac_objext conftest.beam conftest.$ac_ext
16820fi
16821
16822rm -f conftest.chown
16823
16824fi
16825{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_chown_works" >&5
16826printf "%s\n" "$ac_cv_func_chown_works" >&6; }
16827if test $ac_cv_func_chown_works = yes; then
16828
16829printf "%s\n" "#define HAVE_CHOWN 1" >>confdefs.h
16830
16831fi
16832
16833
16834ac_func=
16835for ac_item in $ac_func_c_list
16836do
16837  if test $ac_func; then
16838    ac_fn_c_check_func "$LINENO" $ac_func ac_cv_func_$ac_func
16839    if eval test \"x\$ac_cv_func_$ac_func\" = xyes; then
16840      echo "#define $ac_item 1" >> confdefs.h
16841    fi
16842    ac_func=
16843  else
16844    ac_func=$ac_item
16845  fi
16846done
16847
16848
16849
16850if test "x$ac_cv_func_fork" = xyes; then
16851  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5
16852printf %s "checking for working fork... " >&6; }
16853if test ${ac_cv_func_fork_works+y}
16854then :
16855  printf %s "(cached) " >&6
16856else $as_nop
16857  if test "$cross_compiling" = yes
16858then :
16859  ac_cv_func_fork_works=cross
16860else $as_nop
16861  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16862/* end confdefs.h.  */
16863$ac_includes_default
16864int
16865main (void)
16866{
16867
16868	  /* By Ruediger Kuhlmann. */
16869	  return fork () < 0;
16870
16871  ;
16872  return 0;
16873}
16874_ACEOF
16875if ac_fn_c_try_run "$LINENO"
16876then :
16877  ac_cv_func_fork_works=yes
16878else $as_nop
16879  ac_cv_func_fork_works=no
16880fi
16881rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16882  conftest.$ac_objext conftest.beam conftest.$ac_ext
16883fi
16884
16885fi
16886{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5
16887printf "%s\n" "$ac_cv_func_fork_works" >&6; }
16888
16889else
16890  ac_cv_func_fork_works=$ac_cv_func_fork
16891fi
16892if test "x$ac_cv_func_fork_works" = xcross; then
16893  case $host in
16894    *-*-amigaos* | *-*-msdosdjgpp*)
16895      # Override, as these systems have only a dummy fork() stub
16896      ac_cv_func_fork_works=no
16897      ;;
16898    *)
16899      ac_cv_func_fork_works=yes
16900      ;;
16901  esac
16902  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
16903printf "%s\n" "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
16904fi
16905ac_cv_func_vfork_works=$ac_cv_func_vfork
16906if test "x$ac_cv_func_vfork" = xyes; then
16907  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5
16908printf %s "checking for working vfork... " >&6; }
16909if test ${ac_cv_func_vfork_works+y}
16910then :
16911  printf %s "(cached) " >&6
16912else $as_nop
16913  if test "$cross_compiling" = yes
16914then :
16915  ac_cv_func_vfork_works=cross
16916else $as_nop
16917  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16918/* end confdefs.h.  */
16919/* Thanks to Paul Eggert for this test.  */
16920$ac_includes_default
16921#include <signal.h>
16922#include <sys/wait.h>
16923#ifdef HAVE_VFORK_H
16924# include <vfork.h>
16925#endif
16926
16927static void
16928do_nothing (int sig)
16929{
16930  (void) sig;
16931}
16932
16933/* On some sparc systems, changes by the child to local and incoming
16934   argument registers are propagated back to the parent.  The compiler
16935   is told about this with #include <vfork.h>, but some compilers
16936   (e.g. gcc -O) don't grok <vfork.h>.  Test for this by using a
16937   static variable whose address is put into a register that is
16938   clobbered by the vfork.  */
16939static void
16940sparc_address_test (int arg)
16941{
16942  static pid_t child;
16943  if (!child) {
16944    child = vfork ();
16945    if (child < 0) {
16946      perror ("vfork");
16947      _exit(2);
16948    }
16949    if (!child) {
16950      arg = getpid();
16951      write(-1, "", 0);
16952      _exit (arg);
16953    }
16954  }
16955}
16956
16957int
16958main (void)
16959{
16960  pid_t parent = getpid ();
16961  pid_t child;
16962
16963  sparc_address_test (0);
16964
16965  /* On Solaris 2.4, changes by the child to the signal handler
16966     also munge signal handlers in the parent.  To detect this,
16967     start by putting the parent's handler in a known state.  */
16968  signal (SIGTERM, SIG_DFL);
16969
16970  child = vfork ();
16971
16972  if (child == 0) {
16973    /* Here is another test for sparc vfork register problems.  This
16974       test uses lots of local variables, at least as many local
16975       variables as main has allocated so far including compiler
16976       temporaries.  4 locals are enough for gcc 1.40.3 on a Solaris
16977       4.1.3 sparc, but we use 8 to be safe.  A buggy compiler should
16978       reuse the register of parent for one of the local variables,
16979       since it will think that parent can't possibly be used any more
16980       in this routine.  Assigning to the local variable will thus
16981       munge parent in the parent process.  */
16982    pid_t
16983      p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
16984      p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
16985    /* Convince the compiler that p..p7 are live; otherwise, it might
16986       use the same hardware register for all 8 local variables.  */
16987    if (p != p1 || p != p2 || p != p3 || p != p4
16988	|| p != p5 || p != p6 || p != p7)
16989      _exit(1);
16990
16991    /* Alter the child's signal handler.  */
16992    if (signal (SIGTERM, do_nothing) != SIG_DFL)
16993      _exit(1);
16994
16995    /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
16996       from child file descriptors.  If the child closes a descriptor
16997       before it execs or exits, this munges the parent's descriptor
16998       as well.  Test for this by closing stdout in the child.  */
16999    _exit(close(fileno(stdout)) != 0);
17000  } else {
17001    int status;
17002    struct stat st;
17003
17004    while (wait(&status) != child)
17005      ;
17006    return (
17007	 /* Was there some problem with vforking?  */
17008	 child < 0
17009
17010	 /* Did the child munge the parent's signal handler?  */
17011	 || signal (SIGTERM, SIG_DFL) != SIG_DFL
17012
17013	 /* Did the child fail?  (This shouldn't happen.)  */
17014	 || status
17015
17016	 /* Did the vfork/compiler bug occur?  */
17017	 || parent != getpid()
17018
17019	 /* Did the file descriptor bug occur?  */
17020	 || fstat(fileno(stdout), &st) != 0
17021	 );
17022  }
17023}
17024_ACEOF
17025if ac_fn_c_try_run "$LINENO"
17026then :
17027  ac_cv_func_vfork_works=yes
17028else $as_nop
17029  ac_cv_func_vfork_works=no
17030fi
17031rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17032  conftest.$ac_objext conftest.beam conftest.$ac_ext
17033fi
17034
17035fi
17036{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5
17037printf "%s\n" "$ac_cv_func_vfork_works" >&6; }
17038
17039fi;
17040if test "x$ac_cv_func_fork_works" = xcross; then
17041  ac_cv_func_vfork_works=$ac_cv_func_vfork
17042  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
17043printf "%s\n" "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
17044fi
17045
17046if test "x$ac_cv_func_vfork_works" = xyes; then
17047
17048printf "%s\n" "#define HAVE_WORKING_VFORK 1" >>confdefs.h
17049
17050else
17051
17052printf "%s\n" "#define vfork fork" >>confdefs.h
17053
17054fi
17055if test "x$ac_cv_func_fork_works" = xyes; then
17056
17057printf "%s\n" "#define HAVE_WORKING_FORK 1" >>confdefs.h
17058
17059fi
17060
17061
17062printf "%s\n" "#define RETSIGTYPE void" >>confdefs.h
17063
17064{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for _LARGEFILE_SOURCE value needed for large files" >&5
17065printf %s "checking for _LARGEFILE_SOURCE value needed for large files... " >&6; }
17066if test ${ac_cv_sys_largefile_source+y}
17067then :
17068  printf %s "(cached) " >&6
17069else $as_nop
17070  while :; do
17071  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17072/* end confdefs.h.  */
17073#include <sys/types.h> /* for off_t */
17074     #include <stdio.h>
17075int
17076main (void)
17077{
17078int (*fp) (FILE *, off_t, int) = fseeko;
17079     return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
17080  ;
17081  return 0;
17082}
17083_ACEOF
17084if ac_fn_c_try_link "$LINENO"
17085then :
17086  ac_cv_sys_largefile_source=no; break
17087fi
17088rm -f core conftest.err conftest.$ac_objext conftest.beam \
17089    conftest$ac_exeext conftest.$ac_ext
17090  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17091/* end confdefs.h.  */
17092#define _LARGEFILE_SOURCE 1
17093#include <sys/types.h> /* for off_t */
17094     #include <stdio.h>
17095int
17096main (void)
17097{
17098int (*fp) (FILE *, off_t, int) = fseeko;
17099     return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
17100  ;
17101  return 0;
17102}
17103_ACEOF
17104if ac_fn_c_try_link "$LINENO"
17105then :
17106  ac_cv_sys_largefile_source=1; break
17107fi
17108rm -f core conftest.err conftest.$ac_objext conftest.beam \
17109    conftest$ac_exeext conftest.$ac_ext
17110  ac_cv_sys_largefile_source=unknown
17111  break
17112done
17113fi
17114{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_source" >&5
17115printf "%s\n" "$ac_cv_sys_largefile_source" >&6; }
17116case $ac_cv_sys_largefile_source in #(
17117  no | unknown) ;;
17118  *)
17119printf "%s\n" "#define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source" >>confdefs.h
17120;;
17121esac
17122rm -rf conftest*
17123
17124# We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
17125# in glibc 2.1.3, but that breaks too many other things.
17126# If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
17127if test $ac_cv_sys_largefile_source != unknown; then
17128
17129printf "%s\n" "#define HAVE_FSEEKO 1" >>confdefs.h
17130
17131fi
17132
17133
17134# Check whether --enable-largefile was given.
17135if test ${enable_largefile+y}
17136then :
17137  enableval=$enable_largefile;
17138fi
17139
17140if test "$enable_largefile" != no; then
17141
17142  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
17143printf %s "checking for special C compiler options needed for large files... " >&6; }
17144if test ${ac_cv_sys_largefile_CC+y}
17145then :
17146  printf %s "(cached) " >&6
17147else $as_nop
17148  ac_cv_sys_largefile_CC=no
17149     if test "$GCC" != yes; then
17150       ac_save_CC=$CC
17151       while :; do
17152	 # IRIX 6.2 and later do not support large files by default,
17153	 # so use the C compiler's -n32 option if that helps.
17154	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17155/* end confdefs.h.  */
17156#include <sys/types.h>
17157 /* Check that off_t can represent 2**63 - 1 correctly.
17158    We can't simply define LARGE_OFF_T to be 9223372036854775807,
17159    since some C++ compilers masquerading as C compilers
17160    incorrectly reject 9223372036854775807.  */
17161#define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31))
17162  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
17163		       && LARGE_OFF_T % 2147483647 == 1)
17164		      ? 1 : -1];
17165int
17166main (void)
17167{
17168
17169  ;
17170  return 0;
17171}
17172_ACEOF
17173	 if ac_fn_c_try_compile "$LINENO"
17174then :
17175  break
17176fi
17177rm -f core conftest.err conftest.$ac_objext conftest.beam
17178	 CC="$CC -n32"
17179	 if ac_fn_c_try_compile "$LINENO"
17180then :
17181  ac_cv_sys_largefile_CC=' -n32'; break
17182fi
17183rm -f core conftest.err conftest.$ac_objext conftest.beam
17184	 break
17185       done
17186       CC=$ac_save_CC
17187       rm -f conftest.$ac_ext
17188    fi
17189fi
17190{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
17191printf "%s\n" "$ac_cv_sys_largefile_CC" >&6; }
17192  if test "$ac_cv_sys_largefile_CC" != no; then
17193    CC=$CC$ac_cv_sys_largefile_CC
17194  fi
17195
17196  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
17197printf %s "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
17198if test ${ac_cv_sys_file_offset_bits+y}
17199then :
17200  printf %s "(cached) " >&6
17201else $as_nop
17202  while :; do
17203  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17204/* end confdefs.h.  */
17205#include <sys/types.h>
17206 /* Check that off_t can represent 2**63 - 1 correctly.
17207    We can't simply define LARGE_OFF_T to be 9223372036854775807,
17208    since some C++ compilers masquerading as C compilers
17209    incorrectly reject 9223372036854775807.  */
17210#define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31))
17211  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
17212		       && LARGE_OFF_T % 2147483647 == 1)
17213		      ? 1 : -1];
17214int
17215main (void)
17216{
17217
17218  ;
17219  return 0;
17220}
17221_ACEOF
17222if ac_fn_c_try_compile "$LINENO"
17223then :
17224  ac_cv_sys_file_offset_bits=no; break
17225fi
17226rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
17227  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17228/* end confdefs.h.  */
17229#define _FILE_OFFSET_BITS 64
17230#include <sys/types.h>
17231 /* Check that off_t can represent 2**63 - 1 correctly.
17232    We can't simply define LARGE_OFF_T to be 9223372036854775807,
17233    since some C++ compilers masquerading as C compilers
17234    incorrectly reject 9223372036854775807.  */
17235#define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31))
17236  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
17237		       && LARGE_OFF_T % 2147483647 == 1)
17238		      ? 1 : -1];
17239int
17240main (void)
17241{
17242
17243  ;
17244  return 0;
17245}
17246_ACEOF
17247if ac_fn_c_try_compile "$LINENO"
17248then :
17249  ac_cv_sys_file_offset_bits=64; break
17250fi
17251rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
17252  ac_cv_sys_file_offset_bits=unknown
17253  break
17254done
17255fi
17256{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
17257printf "%s\n" "$ac_cv_sys_file_offset_bits" >&6; }
17258case $ac_cv_sys_file_offset_bits in #(
17259  no | unknown) ;;
17260  *)
17261printf "%s\n" "#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits" >>confdefs.h
17262;;
17263esac
17264rm -rf conftest*
17265  if test $ac_cv_sys_file_offset_bits = unknown; then
17266    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
17267printf %s "checking for _LARGE_FILES value needed for large files... " >&6; }
17268if test ${ac_cv_sys_large_files+y}
17269then :
17270  printf %s "(cached) " >&6
17271else $as_nop
17272  while :; do
17273  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17274/* end confdefs.h.  */
17275#include <sys/types.h>
17276 /* Check that off_t can represent 2**63 - 1 correctly.
17277    We can't simply define LARGE_OFF_T to be 9223372036854775807,
17278    since some C++ compilers masquerading as C compilers
17279    incorrectly reject 9223372036854775807.  */
17280#define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31))
17281  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
17282		       && LARGE_OFF_T % 2147483647 == 1)
17283		      ? 1 : -1];
17284int
17285main (void)
17286{
17287
17288  ;
17289  return 0;
17290}
17291_ACEOF
17292if ac_fn_c_try_compile "$LINENO"
17293then :
17294  ac_cv_sys_large_files=no; break
17295fi
17296rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
17297  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17298/* end confdefs.h.  */
17299#define _LARGE_FILES 1
17300#include <sys/types.h>
17301 /* Check that off_t can represent 2**63 - 1 correctly.
17302    We can't simply define LARGE_OFF_T to be 9223372036854775807,
17303    since some C++ compilers masquerading as C compilers
17304    incorrectly reject 9223372036854775807.  */
17305#define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31))
17306  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
17307		       && LARGE_OFF_T % 2147483647 == 1)
17308		      ? 1 : -1];
17309int
17310main (void)
17311{
17312
17313  ;
17314  return 0;
17315}
17316_ACEOF
17317if ac_fn_c_try_compile "$LINENO"
17318then :
17319  ac_cv_sys_large_files=1; break
17320fi
17321rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
17322  ac_cv_sys_large_files=unknown
17323  break
17324done
17325fi
17326{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
17327printf "%s\n" "$ac_cv_sys_large_files" >&6; }
17328case $ac_cv_sys_large_files in #(
17329  no | unknown) ;;
17330  *)
17331printf "%s\n" "#define _LARGE_FILES $ac_cv_sys_large_files" >>confdefs.h
17332;;
17333esac
17334rm -rf conftest*
17335  fi
17336fi
17337
17338
17339
17340
17341{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we need -D_LARGEFILE_SOURCE=1 as a flag for $CC" >&5
17342printf %s "checking whether we need -D_LARGEFILE_SOURCE=1 as a flag for $CC... " >&6; }
17343cache=_D_LARGEFILE_SOURCE_1
17344if eval test \${cv_prog_cc_flag_needed_$cache+y}
17345then :
17346  printf %s "(cached) " >&6
17347else $as_nop
17348
17349echo '
17350#include <stdio.h>
17351int test(void) {
17352        int a = fseeko(stdin, 0, 0);
17353        return a;
17354}
17355' > conftest.c
17356echo 'void f(void){}' >>conftest.c
17357if test -z "`$CC $CPPFLAGS $CFLAGS $ERRFLAG -c conftest.c 2>&1`"; then
17358eval "cv_prog_cc_flag_needed_$cache=no"
17359else
17360
17361if test -z "`$CC $CPPFLAGS $CFLAGS -D_LARGEFILE_SOURCE=1 $ERRFLAG -c conftest.c 2>&1`"; then
17362eval "cv_prog_cc_flag_needed_$cache=yes"
17363else
17364eval "cv_prog_cc_flag_needed_$cache=fail"
17365#echo 'Test with flag fails too!'
17366#cat conftest.c
17367#echo "$CC $CPPFLAGS $CFLAGS -D_LARGEFILE_SOURCE=1 $ERRFLAG -c conftest.c 2>&1"
17368#echo `$CC $CPPFLAGS $CFLAGS -D_LARGEFILE_SOURCE=1 $ERRFLAG -c conftest.c 2>&1`
17369#exit 1
17370fi
17371
17372fi
17373rm -f conftest conftest.c conftest.o
17374
17375fi
17376
17377if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = yes"; then
17378{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17379printf "%s\n" "yes" >&6; }
17380:
17381CFLAGS="$CFLAGS -D_LARGEFILE_SOURCE=1"
17382else
17383if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = no"; then
17384{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
17385printf "%s\n" "no" >&6; }
17386#echo 'Test with flag is no!'
17387#cat conftest.c
17388#echo "$CC $CPPFLAGS $CFLAGS -D_LARGEFILE_SOURCE=1 $ERRFLAG -c conftest.c 2>&1"
17389#echo `$CC $CPPFLAGS $CFLAGS -D_LARGEFILE_SOURCE=1 $ERRFLAG -c conftest.c 2>&1`
17390#exit 1
17391:
17392
17393else
17394{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: failed" >&5
17395printf "%s\n" "failed" >&6; }
17396:
17397
17398fi
17399fi
17400
17401
17402
17403{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if nonblocking sockets work" >&5
17404printf %s "checking if nonblocking sockets work... " >&6; }
17405if echo $host | grep mingw >/dev/null; then
17406	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no (windows)" >&5
17407printf "%s\n" "no (windows)" >&6; }
17408
17409printf "%s\n" "#define NONBLOCKING_IS_BROKEN 1" >>confdefs.h
17410
17411else
17412if test "$cross_compiling" = yes
17413then :
17414
17415	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: crosscompile(yes)" >&5
17416printf "%s\n" "crosscompile(yes)" >&6; }
17417
17418else $as_nop
17419  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17420/* end confdefs.h.  */
17421
17422
17423#include <stdio.h>
17424#include <string.h>
17425#include <stdlib.h>
17426#include <fcntl.h>
17427#include <errno.h>
17428#ifdef HAVE_SYS_TYPES_H
17429#include <sys/types.h>
17430#endif
17431#ifdef HAVE_SYS_SELECT_H
17432#include <sys/select.h>
17433#endif
17434#ifdef HAVE_SYS_SOCKET_H
17435#include <sys/socket.h>
17436#endif
17437#ifdef HAVE_NETINET_IN_H
17438#include <netinet/in.h>
17439#endif
17440#ifdef HAVE_ARPA_INET_H
17441#include <arpa/inet.h>
17442#endif
17443#ifdef HAVE_UNISTD_H
17444#include <unistd.h>
17445#endif
17446#ifdef HAVE_TIME_H
17447#include <time.h>
17448#endif
17449
17450int main(void)
17451{
17452	int port;
17453	int sfd, cfd;
17454	int num = 10;
17455	int i, p;
17456	struct sockaddr_in a;
17457	/* test if select and nonblocking reads work well together */
17458	/* open port.
17459	   fork child to send 10 messages.
17460	   select to read.
17461	   then try to nonblocking read the 10 messages
17462	   then, nonblocking read must give EAGAIN
17463	*/
17464
17465	port = 12345 + (time(0)%32);
17466	sfd = socket(PF_INET, SOCK_DGRAM, 0);
17467	if(sfd == -1) {
17468		perror("socket");
17469		return 1;
17470	}
17471	memset(&a, 0, sizeof(a));
17472	a.sin_family = AF_INET;
17473	a.sin_port = htons(port);
17474	a.sin_addr.s_addr = inet_addr("127.0.0.1");
17475	if(bind(sfd, (struct sockaddr*)&a, sizeof(a)) < 0) {
17476		perror("bind");
17477		return 1;
17478	}
17479	if(fcntl(sfd, F_SETFL, O_NONBLOCK) == -1) {
17480		perror("fcntl");
17481		return 1;
17482	}
17483
17484	cfd = socket(PF_INET, SOCK_DGRAM, 0);
17485	if(cfd == -1) {
17486		perror("client socket");
17487		return 1;
17488	}
17489	a.sin_port = 0;
17490	if(bind(cfd, (struct sockaddr*)&a, sizeof(a)) < 0) {
17491		perror("client bind");
17492		return 1;
17493	}
17494	a.sin_port = htons(port);
17495
17496	/* no handler, causes exit in 10 seconds */
17497	alarm(10);
17498
17499	/* send and receive on the socket */
17500	if((p=fork()) == 0) {
17501		for(i=0; i<num; i++) {
17502			if(sendto(cfd, &i, sizeof(i), 0,
17503				(struct sockaddr*)&a, sizeof(a)) < 0) {
17504				perror("sendto");
17505				return 1;
17506			}
17507		}
17508	} else {
17509		/* parent */
17510		fd_set rset;
17511		int x;
17512		if(p == -1) {
17513			perror("fork");
17514			return 1;
17515		}
17516		FD_ZERO(&rset);
17517		FD_SET(sfd, &rset);
17518		if(select(sfd+1, &rset, NULL, NULL, NULL) < 1) {
17519			perror("select");
17520			return 1;
17521		}
17522		i = 0;
17523		while(i < num) {
17524			if(recv(sfd, &x, sizeof(x), 0) != sizeof(x)) {
17525				if(errno == EAGAIN)
17526					continue;
17527				perror("recv");
17528				return 1;
17529			}
17530			i++;
17531		}
17532		/* now we want to get EAGAIN: nonblocking goodness */
17533		errno = 0;
17534		recv(sfd, &x, sizeof(x), 0);
17535		if(errno != EAGAIN) {
17536			perror("trying to recv again");
17537			return 1;
17538		}
17539		/* EAGAIN encountered */
17540	}
17541
17542	close(sfd);
17543	close(cfd);
17544	return 0;
17545}
17546
17547_ACEOF
17548if ac_fn_c_try_run "$LINENO"
17549then :
17550
17551	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17552printf "%s\n" "yes" >&6; }
17553
17554else $as_nop
17555
17556	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
17557printf "%s\n" "no" >&6; }
17558
17559printf "%s\n" "#define NONBLOCKING_IS_BROKEN 1" >>confdefs.h
17560
17561
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
17567fi
17568
17569
17570{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mkdir has one arg" >&5
17571printf %s "checking whether mkdir has one arg... " >&6; }
17572cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17573/* end confdefs.h.  */
17574
17575#include <stdio.h>
17576#include <unistd.h>
17577#ifdef HAVE_WINSOCK2_H
17578#include <winsock2.h>
17579#endif
17580#ifdef HAVE_SYS_STAT_H
17581#include <sys/stat.h>
17582#endif
17583
17584int
17585main (void)
17586{
17587
17588	(void)mkdir("directory");
17589
17590  ;
17591  return 0;
17592}
17593_ACEOF
17594if ac_fn_c_try_compile "$LINENO"
17595then :
17596  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17597printf "%s\n" "yes" >&6; }
17598
17599printf "%s\n" "#define MKDIR_HAS_ONE_ARG 1" >>confdefs.h
17600
17601
17602else $as_nop
17603  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
17604printf "%s\n" "no" >&6; }
17605
17606fi
17607rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
17608
17609
17610  for ac_func in strptime
17611do :
17612  ac_fn_c_check_func "$LINENO" "strptime" "ac_cv_func_strptime"
17613if test "x$ac_cv_func_strptime" = xyes
17614then :
17615  printf "%s\n" "#define HAVE_STRPTIME 1" >>confdefs.h
17616
17617{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether strptime works" >&5
17618printf %s "checking whether strptime works... " >&6; }
17619if test c${cross_compiling} = cno; then
17620if test "$cross_compiling" = yes
17621then :
17622  eval "ac_cv_c_strptime_works=maybe"
17623else $as_nop
17624  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17625/* end confdefs.h.  */
17626
17627#define _XOPEN_SOURCE 600
17628#include <time.h>
17629int main(void) { struct tm tm; char *res;
17630res = 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);
17631if (!res) return 2;
17632res = strptime("20070207111842", "%Y%m%d%H%M%S", &tm);
17633if (!res) return 1; return 0; }
17634
17635_ACEOF
17636if ac_fn_c_try_run "$LINENO"
17637then :
17638  eval "ac_cv_c_strptime_works=yes"
17639else $as_nop
17640  eval "ac_cv_c_strptime_works=no"
17641fi
17642rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17643  conftest.$ac_objext conftest.beam conftest.$ac_ext
17644fi
17645
17646else
17647eval "ac_cv_c_strptime_works=maybe"
17648fi
17649{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_strptime_works" >&5
17650printf "%s\n" "$ac_cv_c_strptime_works" >&6; }
17651if test $ac_cv_c_strptime_works = no; then
17652case " $LIBOBJS " in
17653  *" strptime.$ac_objext "* ) ;;
17654  *) LIBOBJS="$LIBOBJS strptime.$ac_objext"
17655 ;;
17656esac
17657
17658else
17659
17660printf "%s\n" "#define STRPTIME_WORKS 1" >>confdefs.h
17661
17662fi
17663
17664else $as_nop
17665  case " $LIBOBJS " in
17666  *" strptime.$ac_objext "* ) ;;
17667  *) LIBOBJS="$LIBOBJS strptime.$ac_objext"
17668 ;;
17669esac
17670
17671fi
17672
17673done
17674
17675# check if we can use SO_REUSEPORT
17676reuseport_default=0
17677if echo "$host" | $GREP -i -e linux >/dev/null; then reuseport_default=1; fi
17678if echo "$host" | $GREP -i -e dragonfly >/dev/null; then reuseport_default=1; fi
17679if test "$reuseport_default" = 1; then
17680
17681printf "%s\n" "#define REUSEPORT_DEFAULT 1" >>confdefs.h
17682
17683else
17684
17685printf "%s\n" "#define REUSEPORT_DEFAULT 0" >>confdefs.h
17686
17687fi
17688
17689# Include systemd.m4 - begin
17690#   macros for configuring systemd
17691#   Copyright 2015, Sami Kerola, CloudFlare.
17692#   BSD licensed.
17693# Check whether --enable-systemd was given.
17694if test ${enable_systemd+y}
17695then :
17696  enableval=$enable_systemd;
17697else $as_nop
17698  enable_systemd=no
17699fi
17700
17701have_systemd=no
17702if test "x$enable_systemd" != xno
17703then :
17704
17705    if test -n "$PKG_CONFIG"; then
17706		have_systemd=no
17707
17708pkg_failed=no
17709{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for SYSTEMD" >&5
17710printf %s "checking for SYSTEMD... " >&6; }
17711
17712if test -n "$SYSTEMD_CFLAGS"; then
17713    pkg_cv_SYSTEMD_CFLAGS="$SYSTEMD_CFLAGS"
17714 elif test -n "$PKG_CONFIG"; then
17715    if test -n "$PKG_CONFIG" && \
17716    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libsystemd\""; } >&5
17717  ($PKG_CONFIG --exists --print-errors "libsystemd") 2>&5
17718  ac_status=$?
17719  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
17720  test $ac_status = 0; }; then
17721  pkg_cv_SYSTEMD_CFLAGS=`$PKG_CONFIG --cflags "libsystemd" 2>/dev/null`
17722		      test "x$?" != "x0" && pkg_failed=yes
17723else
17724  pkg_failed=yes
17725fi
17726 else
17727    pkg_failed=untried
17728fi
17729if test -n "$SYSTEMD_LIBS"; then
17730    pkg_cv_SYSTEMD_LIBS="$SYSTEMD_LIBS"
17731 elif test -n "$PKG_CONFIG"; then
17732    if test -n "$PKG_CONFIG" && \
17733    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libsystemd\""; } >&5
17734  ($PKG_CONFIG --exists --print-errors "libsystemd") 2>&5
17735  ac_status=$?
17736  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
17737  test $ac_status = 0; }; then
17738  pkg_cv_SYSTEMD_LIBS=`$PKG_CONFIG --libs "libsystemd" 2>/dev/null`
17739		      test "x$?" != "x0" && pkg_failed=yes
17740else
17741  pkg_failed=yes
17742fi
17743 else
17744    pkg_failed=untried
17745fi
17746
17747
17748
17749if test $pkg_failed = yes; then
17750   	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
17751printf "%s\n" "no" >&6; }
17752
17753if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
17754        _pkg_short_errors_supported=yes
17755else
17756        _pkg_short_errors_supported=no
17757fi
17758        if test $_pkg_short_errors_supported = yes; then
17759	        SYSTEMD_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libsystemd" 2>&1`
17760        else
17761	        SYSTEMD_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libsystemd" 2>&1`
17762        fi
17763	# Put the nasty error message in config.log where it belongs
17764	echo "$SYSTEMD_PKG_ERRORS" >&5
17765
17766	as_fn_error $? "Package requirements (libsystemd) were not met:
17767
17768$SYSTEMD_PKG_ERRORS
17769
17770Consider adjusting the PKG_CONFIG_PATH environment variable if you
17771installed software in a non-standard prefix.
17772
17773Alternatively, you may set the environment variables SYSTEMD_CFLAGS
17774and SYSTEMD_LIBS to avoid the need to call pkg-config.
17775See the pkg-config man page for more details." "$LINENO" 5
17776elif test $pkg_failed = untried; then
17777     	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
17778printf "%s\n" "no" >&6; }
17779	{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
17780printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
17781as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
17782is in your PATH or set the PKG_CONFIG environment variable to the full
17783path to pkg-config.
17784
17785Alternatively, you may set the environment variables SYSTEMD_CFLAGS
17786and SYSTEMD_LIBS to avoid the need to call pkg-config.
17787See the pkg-config man page for more details.
17788
17789To get pkg-config, see <http://pkg-config.freedesktop.org/>.
17790See \`config.log' for more details" "$LINENO" 5; }
17791else
17792	SYSTEMD_CFLAGS=$pkg_cv_SYSTEMD_CFLAGS
17793	SYSTEMD_LIBS=$pkg_cv_SYSTEMD_LIBS
17794        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17795printf "%s\n" "yes" >&6; }
17796	have_systemd=yes
17797fi
17798		if test "x$have_systemd" != "xyes"
17799then :
17800
17801		have_systemd_daemon=no
17802
17803pkg_failed=no
17804{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for SYSTEMD_DAEMON" >&5
17805printf %s "checking for SYSTEMD_DAEMON... " >&6; }
17806
17807if test -n "$SYSTEMD_DAEMON_CFLAGS"; then
17808    pkg_cv_SYSTEMD_DAEMON_CFLAGS="$SYSTEMD_DAEMON_CFLAGS"
17809 elif test -n "$PKG_CONFIG"; then
17810    if test -n "$PKG_CONFIG" && \
17811    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libsystemd-daemon\""; } >&5
17812  ($PKG_CONFIG --exists --print-errors "libsystemd-daemon") 2>&5
17813  ac_status=$?
17814  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
17815  test $ac_status = 0; }; then
17816  pkg_cv_SYSTEMD_DAEMON_CFLAGS=`$PKG_CONFIG --cflags "libsystemd-daemon" 2>/dev/null`
17817		      test "x$?" != "x0" && pkg_failed=yes
17818else
17819  pkg_failed=yes
17820fi
17821 else
17822    pkg_failed=untried
17823fi
17824if test -n "$SYSTEMD_DAEMON_LIBS"; then
17825    pkg_cv_SYSTEMD_DAEMON_LIBS="$SYSTEMD_DAEMON_LIBS"
17826 elif test -n "$PKG_CONFIG"; then
17827    if test -n "$PKG_CONFIG" && \
17828    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libsystemd-daemon\""; } >&5
17829  ($PKG_CONFIG --exists --print-errors "libsystemd-daemon") 2>&5
17830  ac_status=$?
17831  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
17832  test $ac_status = 0; }; then
17833  pkg_cv_SYSTEMD_DAEMON_LIBS=`$PKG_CONFIG --libs "libsystemd-daemon" 2>/dev/null`
17834		      test "x$?" != "x0" && pkg_failed=yes
17835else
17836  pkg_failed=yes
17837fi
17838 else
17839    pkg_failed=untried
17840fi
17841
17842
17843
17844if test $pkg_failed = yes; then
17845   	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
17846printf "%s\n" "no" >&6; }
17847
17848if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
17849        _pkg_short_errors_supported=yes
17850else
17851        _pkg_short_errors_supported=no
17852fi
17853        if test $_pkg_short_errors_supported = yes; then
17854	        SYSTEMD_DAEMON_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libsystemd-daemon" 2>&1`
17855        else
17856	        SYSTEMD_DAEMON_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libsystemd-daemon" 2>&1`
17857        fi
17858	# Put the nasty error message in config.log where it belongs
17859	echo "$SYSTEMD_DAEMON_PKG_ERRORS" >&5
17860
17861	as_fn_error $? "Package requirements (libsystemd-daemon) were not met:
17862
17863$SYSTEMD_DAEMON_PKG_ERRORS
17864
17865Consider adjusting the PKG_CONFIG_PATH environment variable if you
17866installed software in a non-standard prefix.
17867
17868Alternatively, you may set the environment variables SYSTEMD_DAEMON_CFLAGS
17869and SYSTEMD_DAEMON_LIBS to avoid the need to call pkg-config.
17870See the pkg-config man page for more details." "$LINENO" 5
17871elif test $pkg_failed = untried; then
17872     	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
17873printf "%s\n" "no" >&6; }
17874	{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
17875printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
17876as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
17877is in your PATH or set the PKG_CONFIG environment variable to the full
17878path to pkg-config.
17879
17880Alternatively, you may set the environment variables SYSTEMD_DAEMON_CFLAGS
17881and SYSTEMD_DAEMON_LIBS to avoid the need to call pkg-config.
17882See the pkg-config man page for more details.
17883
17884To get pkg-config, see <http://pkg-config.freedesktop.org/>.
17885See \`config.log' for more details" "$LINENO" 5; }
17886else
17887	SYSTEMD_DAEMON_CFLAGS=$pkg_cv_SYSTEMD_DAEMON_CFLAGS
17888	SYSTEMD_DAEMON_LIBS=$pkg_cv_SYSTEMD_DAEMON_LIBS
17889        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17890printf "%s\n" "yes" >&6; }
17891	have_systemd_daemon=yes
17892fi
17893		if test "x$have_systemd_daemon" = "xyes"
17894then :
17895  have_systemd=yes
17896fi
17897
17898fi
17899	case $enable_systemd:$have_systemd in #(
17900  yes:no) :
17901    as_fn_error $? "systemd enabled but libsystemd not found" "$LINENO" 5 ;; #(
17902  *:yes) :
17903
17904printf "%s\n" "#define HAVE_SYSTEMD 1" >>confdefs.h
17905
17906		LIBS="$LIBS $SYSTEMD_LIBS"
17907
17908	 ;; #(
17909  *) :
17910     ;;
17911esac
17912    else
17913    	as_fn_error $? "systemd enabled but need pkg-config to configure for it" "$LINENO" 5
17914    fi
17915
17916fi
17917 if test "x$have_systemd" = xyes; then
17918  USE_SYSTEMD_TRUE=
17919  USE_SYSTEMD_FALSE='#'
17920else
17921  USE_SYSTEMD_TRUE='#'
17922  USE_SYSTEMD_FALSE=
17923fi
17924
17925
17926# Include systemd.m4 - end
17927
17928# set memory allocation checking if requested
17929# Check whether --enable-alloc-checks was given.
17930if test ${enable_alloc_checks+y}
17931then :
17932  enableval=$enable_alloc_checks;
17933fi
17934
17935# Check whether --enable-alloc-lite was given.
17936if test ${enable_alloc_lite+y}
17937then :
17938  enableval=$enable_alloc_lite;
17939fi
17940
17941# Check whether --enable-alloc-nonregional was given.
17942if test ${enable_alloc_nonregional+y}
17943then :
17944  enableval=$enable_alloc_nonregional;
17945fi
17946
17947if test x_$enable_alloc_nonregional = x_yes; then
17948
17949printf "%s\n" "#define UNBOUND_ALLOC_NONREGIONAL 1" >>confdefs.h
17950
17951fi
17952if test x_$enable_alloc_checks = x_yes; then
17953
17954printf "%s\n" "#define UNBOUND_ALLOC_STATS 1" >>confdefs.h
17955
17956	SLDNS_ALLOCCHECK_EXTRA_OBJ="alloc.lo log.lo"
17957
17958	ASYNCLOOK_ALLOCCHECK_EXTRA_OBJ="alloc.lo"
17959
17960else
17961	if test x_$enable_alloc_lite = x_yes; then
17962
17963printf "%s\n" "#define UNBOUND_ALLOC_LITE 1" >>confdefs.h
17964
17965	else
17966
17967	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible malloc" >&5
17968printf %s "checking for GNU libc compatible malloc... " >&6; }
17969	if test "$cross_compiling" = yes
17970then :
17971  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no (crosscompile)" >&5
17972printf "%s\n" "no (crosscompile)" >&6; }
17973	case " $LIBOBJS " in
17974  *" malloc.$ac_objext "* ) ;;
17975  *) LIBOBJS="$LIBOBJS malloc.$ac_objext"
17976 ;;
17977esac
17978
17979
17980printf "%s\n" "#define malloc rpl_malloc_unbound" >>confdefs.h
17981
17982else $as_nop
17983  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17984/* end confdefs.h.  */
17985#if defined STDC_HEADERS || defined HAVE_STDLIB_H
17986#include <stdlib.h>
17987#else
17988char *malloc ();
17989#endif
17990
17991int
17992main (void)
17993{
17994 if(malloc(0) != 0) return 1;
17995  ;
17996  return 0;
17997}
17998
17999_ACEOF
18000if ac_fn_c_try_run "$LINENO"
18001then :
18002  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
18003printf "%s\n" "no" >&6; }
18004	case " $LIBOBJS " in
18005  *" malloc.$ac_objext "* ) ;;
18006  *) LIBOBJS="$LIBOBJS malloc.$ac_objext"
18007 ;;
18008esac
18009
18010
18011printf "%s\n" "#define malloc rpl_malloc_unbound" >>confdefs.h
18012
18013else $as_nop
18014  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
18015printf "%s\n" "yes" >&6; }
18016
18017printf "%s\n" "#define HAVE_MALLOC 1" >>confdefs.h
18018
18019fi
18020rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18021  conftest.$ac_objext conftest.beam conftest.$ac_ext
18022fi
18023
18024
18025	fi
18026fi
18027
18028# check windows threads (we use them, not pthreads, on windows).
18029if test "$on_mingw" = "yes"; then
18030# check windows threads
18031	ac_fn_c_check_header_compile "$LINENO" "windows.h" "ac_cv_header_windows_h" "$ac_includes_default
18032"
18033if test "x$ac_cv_header_windows_h" = xyes
18034then :
18035  printf "%s\n" "#define HAVE_WINDOWS_H 1" >>confdefs.h
18036
18037fi
18038
18039	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for CreateThread" >&5
18040printf %s "checking for CreateThread... " >&6; }
18041	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18042/* end confdefs.h.  */
18043
18044#ifdef HAVE_WINDOWS_H
18045#include <windows.h>
18046#endif
18047
18048int
18049main (void)
18050{
18051
18052	HANDLE t = CreateThread(NULL, 0, NULL, NULL, 0, NULL);
18053
18054  ;
18055  return 0;
18056}
18057_ACEOF
18058if ac_fn_c_try_compile "$LINENO"
18059then :
18060  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
18061printf "%s\n" "yes" >&6; }
18062
18063printf "%s\n" "#define HAVE_WINDOWS_THREADS 1" >>confdefs.h
18064
18065
18066else $as_nop
18067  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
18068printf "%s\n" "no" >&6; }
18069
18070fi
18071rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
18072
18073else
18074# not on mingw, check thread libraries.
18075
18076# check for thread library.
18077# check this first, so that the pthread lib does not get linked in via
18078# libssl or libpython, and thus distorts the tests, and we end up using
18079# the non-threadsafe C libraries.
18080
18081# Check whether --with-pthreads was given.
18082if test ${with_pthreads+y}
18083then :
18084  withval=$with_pthreads;
18085else $as_nop
18086   withval="yes"
18087fi
18088
18089ub_have_pthreads=no
18090if test x_$withval != x_no; then
18091
18092
18093
18094
18095ac_ext=c
18096ac_cpp='$CPP $CPPFLAGS'
18097ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
18098ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
18099ac_compiler_gnu=$ac_cv_c_compiler_gnu
18100
18101ax_pthread_ok=no
18102
18103# We used to check for pthread.h first, but this fails if pthread.h
18104# requires special compiler flags (e.g. on Tru64 or Sequent).
18105# It gets checked for in the link test anyway.
18106
18107# First of all, check if the user has set any of the PTHREAD_LIBS,
18108# etcetera environment variables, and if threads linking works using
18109# them:
18110if test "x$PTHREAD_CFLAGS$PTHREAD_LIBS" != "x"; then
18111        ax_pthread_save_CC="$CC"
18112        ax_pthread_save_CFLAGS="$CFLAGS"
18113        ax_pthread_save_LIBS="$LIBS"
18114        if test "x$PTHREAD_CC" != "x"
18115then :
18116  CC="$PTHREAD_CC"
18117fi
18118        if test "x$PTHREAD_CXX" != "x"
18119then :
18120  CXX="$PTHREAD_CXX"
18121fi
18122        CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
18123        LIBS="$PTHREAD_LIBS $LIBS"
18124        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS" >&5
18125printf %s "checking for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS... " >&6; }
18126        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18127/* end confdefs.h.  */
18128
18129/* Override any GCC internal prototype to avoid an error.
18130   Use char because int might match the return type of a GCC
18131   builtin and then its argument prototype would still apply.  */
18132char pthread_join ();
18133int
18134main (void)
18135{
18136return pthread_join ();
18137  ;
18138  return 0;
18139}
18140_ACEOF
18141if ac_fn_c_try_link "$LINENO"
18142then :
18143  ax_pthread_ok=yes
18144fi
18145rm -f core conftest.err conftest.$ac_objext conftest.beam \
18146    conftest$ac_exeext conftest.$ac_ext
18147        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
18148printf "%s\n" "$ax_pthread_ok" >&6; }
18149        if test "x$ax_pthread_ok" = "xno"; then
18150                PTHREAD_LIBS=""
18151                PTHREAD_CFLAGS=""
18152        fi
18153        CC="$ax_pthread_save_CC"
18154        CFLAGS="$ax_pthread_save_CFLAGS"
18155        LIBS="$ax_pthread_save_LIBS"
18156fi
18157
18158# We must check for the threads library under a number of different
18159# names; the ordering is very important because some systems
18160# (e.g. DEC) have both -lpthread and -lpthreads, where one of the
18161# libraries is broken (non-POSIX).
18162
18163# Create a list of thread flags to try. Items with a "," contain both
18164# C compiler flags (before ",") and linker flags (after ","). Other items
18165# starting with a "-" are C compiler flags, and remaining items are
18166# library names, except for "none" which indicates that we try without
18167# any flags at all, and "pthread-config" which is a program returning
18168# the flags for the Pth emulation library.
18169
18170ax_pthread_flags="pthreads none -Kthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config"
18171
18172# The ordering *is* (sometimes) important.  Some notes on the
18173# individual items follow:
18174
18175# pthreads: AIX (must check this before -lpthread)
18176# none: in case threads are in libc; should be tried before -Kthread and
18177#       other compiler flags to prevent continual compiler warnings
18178# -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h)
18179# -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads), Tru64
18180#           (Note: HP C rejects this with "bad form for `-t' option")
18181# -pthreads: Solaris/gcc (Note: HP C also rejects)
18182# -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
18183#      doesn't hurt to check since this sometimes defines pthreads and
18184#      -D_REENTRANT too), HP C (must be checked before -lpthread, which
18185#      is present but should not be used directly; and before -mthreads,
18186#      because the compiler interprets this as "-mt" + "-hreads")
18187# -mthreads: Mingw32/gcc, Lynx/gcc
18188# pthread: Linux, etcetera
18189# --thread-safe: KAI C++
18190# pthread-config: use pthread-config program (for GNU Pth library)
18191
18192case $host_os in
18193
18194        freebsd*)
18195
18196        # -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
18197        # lthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
18198
18199        ax_pthread_flags="-kthread lthread $ax_pthread_flags"
18200        ;;
18201
18202        hpux*)
18203
18204        # From the cc(1) man page: "[-mt] Sets various -D flags to enable
18205        # multi-threading and also sets -lpthread."
18206
18207        ax_pthread_flags="-mt -pthread pthread $ax_pthread_flags"
18208        ;;
18209
18210        openedition*)
18211
18212        # IBM z/OS requires a feature-test macro to be defined in order to
18213        # enable POSIX threads at all, so give the user a hint if this is
18214        # not set. (We don't define these ourselves, as they can affect
18215        # other portions of the system API in unpredictable ways.)
18216
18217        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18218/* end confdefs.h.  */
18219
18220#            if !defined(_OPEN_THREADS) && !defined(_UNIX03_THREADS)
18221             AX_PTHREAD_ZOS_MISSING
18222#            endif
18223
18224_ACEOF
18225if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
18226  $EGREP "AX_PTHREAD_ZOS_MISSING" >/dev/null 2>&1
18227then :
18228  { 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
18229printf "%s\n" "$as_me: WARNING: IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support." >&2;}
18230fi
18231rm -rf conftest*
18232
18233        ;;
18234
18235        solaris*)
18236
18237        # On Solaris (at least, for some versions), libc contains stubbed
18238        # (non-functional) versions of the pthreads routines, so link-based
18239        # tests will erroneously succeed. (N.B.: The stubs are missing
18240        # pthread_cleanup_push, or rather a function called by this macro,
18241        # so we could check for that, but who knows whether they'll stub
18242        # that too in a future libc.)  So we'll check first for the
18243        # standard Solaris way of linking pthreads (-mt -lpthread).
18244
18245        ax_pthread_flags="-mt,-lpthread pthread $ax_pthread_flags"
18246        ;;
18247esac
18248
18249# Are we compiling with Clang?
18250
18251{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC is Clang" >&5
18252printf %s "checking whether $CC is Clang... " >&6; }
18253if test ${ax_cv_PTHREAD_CLANG+y}
18254then :
18255  printf %s "(cached) " >&6
18256else $as_nop
18257  ax_cv_PTHREAD_CLANG=no
18258     # Note that Autoconf sets GCC=yes for Clang as well as GCC
18259     if test "x$GCC" = "xyes"; then
18260        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18261/* end confdefs.h.  */
18262/* Note: Clang 2.7 lacks __clang_[a-z]+__ */
18263#            if defined(__clang__) && defined(__llvm__)
18264             AX_PTHREAD_CC_IS_CLANG
18265#            endif
18266
18267_ACEOF
18268if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
18269  $EGREP "AX_PTHREAD_CC_IS_CLANG" >/dev/null 2>&1
18270then :
18271  ax_cv_PTHREAD_CLANG=yes
18272fi
18273rm -rf conftest*
18274
18275     fi
18276
18277fi
18278{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_CLANG" >&5
18279printf "%s\n" "$ax_cv_PTHREAD_CLANG" >&6; }
18280ax_pthread_clang="$ax_cv_PTHREAD_CLANG"
18281
18282
18283# GCC generally uses -pthread, or -pthreads on some platforms (e.g. SPARC)
18284
18285# Note that for GCC and Clang -pthread generally implies -lpthread,
18286# except when -nostdlib is passed.
18287# This is problematic using libtool to build C++ shared libraries with pthread:
18288# [1] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=25460
18289# [2] https://bugzilla.redhat.com/show_bug.cgi?id=661333
18290# [3] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=468555
18291# To solve this, first try -pthread together with -lpthread for GCC
18292
18293if test "x$GCC" = "xyes"
18294then :
18295  ax_pthread_flags="-pthread,-lpthread -pthread -pthreads $ax_pthread_flags"
18296fi
18297
18298# Clang takes -pthread (never supported any other flag), but we'll try with -lpthread first
18299
18300if test "x$ax_pthread_clang" = "xyes"
18301then :
18302  ax_pthread_flags="-pthread,-lpthread -pthread"
18303fi
18304
18305
18306# The presence of a feature test macro requesting re-entrant function
18307# definitions is, on some systems, a strong hint that pthreads support is
18308# correctly enabled
18309
18310case $host_os in
18311        darwin* | hpux* | linux* | osf* | solaris*)
18312        ax_pthread_check_macro="_REENTRANT"
18313        ;;
18314
18315        aix*)
18316        ax_pthread_check_macro="_THREAD_SAFE"
18317        ;;
18318
18319        *)
18320        ax_pthread_check_macro="--"
18321        ;;
18322esac
18323if test "x$ax_pthread_check_macro" = "x--"
18324then :
18325  ax_pthread_check_cond=0
18326else $as_nop
18327  ax_pthread_check_cond="!defined($ax_pthread_check_macro)"
18328fi
18329
18330
18331if test "x$ax_pthread_ok" = "xno"; then
18332for ax_pthread_try_flag in $ax_pthread_flags; do
18333
18334        case $ax_pthread_try_flag in
18335                none)
18336                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether pthreads work without any flags" >&5
18337printf %s "checking whether pthreads work without any flags... " >&6; }
18338                ;;
18339
18340                *,*)
18341                PTHREAD_CFLAGS=`echo $ax_pthread_try_flag | sed "s/^\(.*\),\(.*\)$/\1/"`
18342                PTHREAD_LIBS=`echo $ax_pthread_try_flag | sed "s/^\(.*\),\(.*\)$/\2/"`
18343                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with \"$PTHREAD_CFLAGS\" and \"$PTHREAD_LIBS\"" >&5
18344printf %s "checking whether pthreads work with \"$PTHREAD_CFLAGS\" and \"$PTHREAD_LIBS\"... " >&6; }
18345                ;;
18346
18347                -*)
18348                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with $ax_pthread_try_flag" >&5
18349printf %s "checking whether pthreads work with $ax_pthread_try_flag... " >&6; }
18350                PTHREAD_CFLAGS="$ax_pthread_try_flag"
18351                ;;
18352
18353                pthread-config)
18354                # Extract the first word of "pthread-config", so it can be a program name with args.
18355set dummy pthread-config; ac_word=$2
18356{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18357printf %s "checking for $ac_word... " >&6; }
18358if test ${ac_cv_prog_ax_pthread_config+y}
18359then :
18360  printf %s "(cached) " >&6
18361else $as_nop
18362  if test -n "$ax_pthread_config"; then
18363  ac_cv_prog_ax_pthread_config="$ax_pthread_config" # Let the user override the test.
18364else
18365as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18366for as_dir in $PATH
18367do
18368  IFS=$as_save_IFS
18369  case $as_dir in #(((
18370    '') as_dir=./ ;;
18371    */) ;;
18372    *) as_dir=$as_dir/ ;;
18373  esac
18374    for ac_exec_ext in '' $ac_executable_extensions; do
18375  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
18376    ac_cv_prog_ax_pthread_config="yes"
18377    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
18378    break 2
18379  fi
18380done
18381  done
18382IFS=$as_save_IFS
18383
18384  test -z "$ac_cv_prog_ax_pthread_config" && ac_cv_prog_ax_pthread_config="no"
18385fi
18386fi
18387ax_pthread_config=$ac_cv_prog_ax_pthread_config
18388if test -n "$ax_pthread_config"; then
18389  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_config" >&5
18390printf "%s\n" "$ax_pthread_config" >&6; }
18391else
18392  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
18393printf "%s\n" "no" >&6; }
18394fi
18395
18396
18397                if test "x$ax_pthread_config" = "xno"
18398then :
18399  continue
18400fi
18401                PTHREAD_CFLAGS="`pthread-config --cflags`"
18402                PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`"
18403                ;;
18404
18405                *)
18406                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for the pthreads library -l$ax_pthread_try_flag" >&5
18407printf %s "checking for the pthreads library -l$ax_pthread_try_flag... " >&6; }
18408                PTHREAD_LIBS="-l$ax_pthread_try_flag"
18409                ;;
18410        esac
18411
18412        ax_pthread_save_CFLAGS="$CFLAGS"
18413        ax_pthread_save_LIBS="$LIBS"
18414        CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
18415        LIBS="$PTHREAD_LIBS $LIBS"
18416
18417        # Check for various functions.  We must include pthread.h,
18418        # since some functions may be macros.  (On the Sequent, we
18419        # need a special flag -Kthread to make this header compile.)
18420        # We check for pthread_join because it is in -lpthread on IRIX
18421        # while pthread_create is in libc.  We check for pthread_attr_init
18422        # due to DEC craziness with -lpthreads.  We check for
18423        # pthread_cleanup_push because it is one of the few pthread
18424        # functions on Solaris that doesn't have a non-functional libc stub.
18425        # We try pthread_create on general principles.
18426
18427        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18428/* end confdefs.h.  */
18429#include <pthread.h>
18430#                       if $ax_pthread_check_cond
18431#                        error "$ax_pthread_check_macro must be defined"
18432#                       endif
18433                        static void *some_global = NULL;
18434                        static void routine(void *a)
18435                          {
18436                             /* To avoid any unused-parameter or
18437                                unused-but-set-parameter warning.  */
18438                             some_global = a;
18439                          }
18440                        static void *start_routine(void *a) { return a; }
18441int
18442main (void)
18443{
18444pthread_t th; pthread_attr_t attr;
18445                        pthread_create(&th, 0, start_routine, 0);
18446                        pthread_join(th, 0);
18447                        pthread_attr_init(&attr);
18448                        pthread_cleanup_push(routine, 0);
18449                        pthread_cleanup_pop(0) /* ; */
18450  ;
18451  return 0;
18452}
18453_ACEOF
18454if ac_fn_c_try_link "$LINENO"
18455then :
18456  ax_pthread_ok=yes
18457fi
18458rm -f core conftest.err conftest.$ac_objext conftest.beam \
18459    conftest$ac_exeext conftest.$ac_ext
18460
18461        CFLAGS="$ax_pthread_save_CFLAGS"
18462        LIBS="$ax_pthread_save_LIBS"
18463
18464        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
18465printf "%s\n" "$ax_pthread_ok" >&6; }
18466        if test "x$ax_pthread_ok" = "xyes"
18467then :
18468  break
18469fi
18470
18471        PTHREAD_LIBS=""
18472        PTHREAD_CFLAGS=""
18473done
18474fi
18475
18476
18477# Clang needs special handling, because older versions handle the -pthread
18478# option in a rather... idiosyncratic way
18479
18480if test "x$ax_pthread_clang" = "xyes"; then
18481
18482        # Clang takes -pthread; it has never supported any other flag
18483
18484        # (Note 1: This will need to be revisited if a system that Clang
18485        # supports has POSIX threads in a separate library.  This tends not
18486        # to be the way of modern systems, but it's conceivable.)
18487
18488        # (Note 2: On some systems, notably Darwin, -pthread is not needed
18489        # to get POSIX threads support; the API is always present and
18490        # active.  We could reasonably leave PTHREAD_CFLAGS empty.  But
18491        # -pthread does define _REENTRANT, and while the Darwin headers
18492        # ignore this macro, third-party headers might not.)
18493
18494        # However, older versions of Clang make a point of warning the user
18495        # that, in an invocation where only linking and no compilation is
18496        # taking place, the -pthread option has no effect ("argument unused
18497        # during compilation").  They expect -pthread to be passed in only
18498        # when source code is being compiled.
18499        #
18500        # Problem is, this is at odds with the way Automake and most other
18501        # C build frameworks function, which is that the same flags used in
18502        # compilation (CFLAGS) are also used in linking.  Many systems
18503        # supported by AX_PTHREAD require exactly this for POSIX threads
18504        # support, and in fact it is often not straightforward to specify a
18505        # flag that is used only in the compilation phase and not in
18506        # linking.  Such a scenario is extremely rare in practice.
18507        #
18508        # Even though use of the -pthread flag in linking would only print
18509        # a warning, this can be a nuisance for well-run software projects
18510        # that build with -Werror.  So if the active version of Clang has
18511        # this misfeature, we search for an option to squash it.
18512
18513        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether Clang needs flag to prevent \"argument unused\" warning when linking with -pthread" >&5
18514printf %s "checking whether Clang needs flag to prevent \"argument unused\" warning when linking with -pthread... " >&6; }
18515if test ${ax_cv_PTHREAD_CLANG_NO_WARN_FLAG+y}
18516then :
18517  printf %s "(cached) " >&6
18518else $as_nop
18519  ax_cv_PTHREAD_CLANG_NO_WARN_FLAG=unknown
18520             # Create an alternate version of $ac_link that compiles and
18521             # links in two steps (.c -> .o, .o -> exe) instead of one
18522             # (.c -> exe), because the warning occurs only in the second
18523             # step
18524             ax_pthread_save_ac_link="$ac_link"
18525             ax_pthread_sed='s/conftest\.\$ac_ext/conftest.$ac_objext/g'
18526             ax_pthread_link_step=`printf "%s\n" "$ac_link" | sed "$ax_pthread_sed"`
18527             ax_pthread_2step_ac_link="($ac_compile) && (echo ==== >&5) && ($ax_pthread_link_step)"
18528             ax_pthread_save_CFLAGS="$CFLAGS"
18529             for ax_pthread_try in '' -Qunused-arguments -Wno-unused-command-line-argument unknown; do
18530                if test "x$ax_pthread_try" = "xunknown"
18531then :
18532  break
18533fi
18534                CFLAGS="-Werror -Wunknown-warning-option $ax_pthread_try -pthread $ax_pthread_save_CFLAGS"
18535                ac_link="$ax_pthread_save_ac_link"
18536                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18537/* end confdefs.h.  */
18538int main(void){return 0;}
18539_ACEOF
18540if ac_fn_c_try_link "$LINENO"
18541then :
18542  ac_link="$ax_pthread_2step_ac_link"
18543                     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18544/* end confdefs.h.  */
18545int main(void){return 0;}
18546_ACEOF
18547if ac_fn_c_try_link "$LINENO"
18548then :
18549  break
18550fi
18551rm -f core conftest.err conftest.$ac_objext conftest.beam \
18552    conftest$ac_exeext conftest.$ac_ext
18553
18554fi
18555rm -f core conftest.err conftest.$ac_objext conftest.beam \
18556    conftest$ac_exeext conftest.$ac_ext
18557             done
18558             ac_link="$ax_pthread_save_ac_link"
18559             CFLAGS="$ax_pthread_save_CFLAGS"
18560             if test "x$ax_pthread_try" = "x"
18561then :
18562  ax_pthread_try=no
18563fi
18564             ax_cv_PTHREAD_CLANG_NO_WARN_FLAG="$ax_pthread_try"
18565
18566fi
18567{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" >&5
18568printf "%s\n" "$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" >&6; }
18569
18570        case "$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" in
18571                no | unknown) ;;
18572                *) PTHREAD_CFLAGS="$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG $PTHREAD_CFLAGS" ;;
18573        esac
18574
18575fi # $ax_pthread_clang = yes
18576
18577
18578
18579# Various other checks:
18580if test "x$ax_pthread_ok" = "xyes"; then
18581        ax_pthread_save_CFLAGS="$CFLAGS"
18582        ax_pthread_save_LIBS="$LIBS"
18583        CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
18584        LIBS="$PTHREAD_LIBS $LIBS"
18585
18586        # Detect AIX lossage: JOINABLE attribute is called UNDETACHED.
18587        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for joinable pthread attribute" >&5
18588printf %s "checking for joinable pthread attribute... " >&6; }
18589if test ${ax_cv_PTHREAD_JOINABLE_ATTR+y}
18590then :
18591  printf %s "(cached) " >&6
18592else $as_nop
18593  ax_cv_PTHREAD_JOINABLE_ATTR=unknown
18594             for ax_pthread_attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do
18595                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18596/* end confdefs.h.  */
18597#include <pthread.h>
18598int
18599main (void)
18600{
18601int attr = $ax_pthread_attr; return attr /* ; */
18602  ;
18603  return 0;
18604}
18605_ACEOF
18606if ac_fn_c_try_link "$LINENO"
18607then :
18608  ax_cv_PTHREAD_JOINABLE_ATTR=$ax_pthread_attr; break
18609fi
18610rm -f core conftest.err conftest.$ac_objext conftest.beam \
18611    conftest$ac_exeext conftest.$ac_ext
18612             done
18613
18614fi
18615{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_JOINABLE_ATTR" >&5
18616printf "%s\n" "$ax_cv_PTHREAD_JOINABLE_ATTR" >&6; }
18617        if test "x$ax_cv_PTHREAD_JOINABLE_ATTR" != "xunknown" && \
18618               test "x$ax_cv_PTHREAD_JOINABLE_ATTR" != "xPTHREAD_CREATE_JOINABLE" && \
18619               test "x$ax_pthread_joinable_attr_defined" != "xyes"
18620then :
18621
18622printf "%s\n" "#define PTHREAD_CREATE_JOINABLE $ax_cv_PTHREAD_JOINABLE_ATTR" >>confdefs.h
18623
18624               ax_pthread_joinable_attr_defined=yes
18625
18626fi
18627
18628        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether more special flags are required for pthreads" >&5
18629printf %s "checking whether more special flags are required for pthreads... " >&6; }
18630if test ${ax_cv_PTHREAD_SPECIAL_FLAGS+y}
18631then :
18632  printf %s "(cached) " >&6
18633else $as_nop
18634  ax_cv_PTHREAD_SPECIAL_FLAGS=no
18635             case $host_os in
18636             solaris*)
18637             ax_cv_PTHREAD_SPECIAL_FLAGS="-D_POSIX_PTHREAD_SEMANTICS"
18638             ;;
18639             esac
18640
18641fi
18642{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_SPECIAL_FLAGS" >&5
18643printf "%s\n" "$ax_cv_PTHREAD_SPECIAL_FLAGS" >&6; }
18644        if test "x$ax_cv_PTHREAD_SPECIAL_FLAGS" != "xno" && \
18645               test "x$ax_pthread_special_flags_added" != "xyes"
18646then :
18647  PTHREAD_CFLAGS="$ax_cv_PTHREAD_SPECIAL_FLAGS $PTHREAD_CFLAGS"
18648               ax_pthread_special_flags_added=yes
18649fi
18650
18651        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for PTHREAD_PRIO_INHERIT" >&5
18652printf %s "checking for PTHREAD_PRIO_INHERIT... " >&6; }
18653if test ${ax_cv_PTHREAD_PRIO_INHERIT+y}
18654then :
18655  printf %s "(cached) " >&6
18656else $as_nop
18657  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18658/* end confdefs.h.  */
18659#include <pthread.h>
18660int
18661main (void)
18662{
18663int i = PTHREAD_PRIO_INHERIT;
18664                                               return i;
18665  ;
18666  return 0;
18667}
18668_ACEOF
18669if ac_fn_c_try_link "$LINENO"
18670then :
18671  ax_cv_PTHREAD_PRIO_INHERIT=yes
18672else $as_nop
18673  ax_cv_PTHREAD_PRIO_INHERIT=no
18674fi
18675rm -f core conftest.err conftest.$ac_objext conftest.beam \
18676    conftest$ac_exeext conftest.$ac_ext
18677
18678fi
18679{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_PRIO_INHERIT" >&5
18680printf "%s\n" "$ax_cv_PTHREAD_PRIO_INHERIT" >&6; }
18681        if test "x$ax_cv_PTHREAD_PRIO_INHERIT" = "xyes" && \
18682               test "x$ax_pthread_prio_inherit_defined" != "xyes"
18683then :
18684
18685printf "%s\n" "#define HAVE_PTHREAD_PRIO_INHERIT 1" >>confdefs.h
18686
18687               ax_pthread_prio_inherit_defined=yes
18688
18689fi
18690
18691        CFLAGS="$ax_pthread_save_CFLAGS"
18692        LIBS="$ax_pthread_save_LIBS"
18693
18694        # More AIX lossage: compile with *_r variant
18695        if test "x$GCC" != "xyes"; then
18696            case $host_os in
18697                aix*)
18698                case "x/$CC" in #(
18699  x*/c89|x*/c89_128|x*/c99|x*/c99_128|x*/cc|x*/cc128|x*/xlc|x*/xlc_v6|x*/xlc128|x*/xlc128_v6) :
18700    #handle absolute path differently from PATH based program lookup
18701                     case "x$CC" in #(
18702  x/*) :
18703
18704			   if as_fn_executable_p ${CC}_r
18705then :
18706  PTHREAD_CC="${CC}_r"
18707fi
18708			   if test "x${CXX}" != "x"
18709then :
18710  if as_fn_executable_p ${CXX}_r
18711then :
18712  PTHREAD_CXX="${CXX}_r"
18713fi
18714fi
18715			  ;; #(
18716  *) :
18717
18718			   for ac_prog in ${CC}_r
18719do
18720  # Extract the first word of "$ac_prog", so it can be a program name with args.
18721set dummy $ac_prog; ac_word=$2
18722{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18723printf %s "checking for $ac_word... " >&6; }
18724if test ${ac_cv_prog_PTHREAD_CC+y}
18725then :
18726  printf %s "(cached) " >&6
18727else $as_nop
18728  if test -n "$PTHREAD_CC"; then
18729  ac_cv_prog_PTHREAD_CC="$PTHREAD_CC" # Let the user override the test.
18730else
18731as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18732for as_dir in $PATH
18733do
18734  IFS=$as_save_IFS
18735  case $as_dir in #(((
18736    '') as_dir=./ ;;
18737    */) ;;
18738    *) as_dir=$as_dir/ ;;
18739  esac
18740    for ac_exec_ext in '' $ac_executable_extensions; do
18741  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
18742    ac_cv_prog_PTHREAD_CC="$ac_prog"
18743    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
18744    break 2
18745  fi
18746done
18747  done
18748IFS=$as_save_IFS
18749
18750fi
18751fi
18752PTHREAD_CC=$ac_cv_prog_PTHREAD_CC
18753if test -n "$PTHREAD_CC"; then
18754  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PTHREAD_CC" >&5
18755printf "%s\n" "$PTHREAD_CC" >&6; }
18756else
18757  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
18758printf "%s\n" "no" >&6; }
18759fi
18760
18761
18762  test -n "$PTHREAD_CC" && break
18763done
18764test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
18765
18766			   if test "x${CXX}" != "x"
18767then :
18768  for ac_prog in ${CXX}_r
18769do
18770  # Extract the first word of "$ac_prog", so it can be a program name with args.
18771set dummy $ac_prog; ac_word=$2
18772{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18773printf %s "checking for $ac_word... " >&6; }
18774if test ${ac_cv_prog_PTHREAD_CXX+y}
18775then :
18776  printf %s "(cached) " >&6
18777else $as_nop
18778  if test -n "$PTHREAD_CXX"; then
18779  ac_cv_prog_PTHREAD_CXX="$PTHREAD_CXX" # Let the user override the test.
18780else
18781as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18782for as_dir in $PATH
18783do
18784  IFS=$as_save_IFS
18785  case $as_dir in #(((
18786    '') as_dir=./ ;;
18787    */) ;;
18788    *) as_dir=$as_dir/ ;;
18789  esac
18790    for ac_exec_ext in '' $ac_executable_extensions; do
18791  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
18792    ac_cv_prog_PTHREAD_CXX="$ac_prog"
18793    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
18794    break 2
18795  fi
18796done
18797  done
18798IFS=$as_save_IFS
18799
18800fi
18801fi
18802PTHREAD_CXX=$ac_cv_prog_PTHREAD_CXX
18803if test -n "$PTHREAD_CXX"; then
18804  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PTHREAD_CXX" >&5
18805printf "%s\n" "$PTHREAD_CXX" >&6; }
18806else
18807  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
18808printf "%s\n" "no" >&6; }
18809fi
18810
18811
18812  test -n "$PTHREAD_CXX" && break
18813done
18814test -n "$PTHREAD_CXX" || PTHREAD_CXX="$CXX"
18815
18816fi
18817
18818                      ;;
18819esac
18820                     ;; #(
18821  *) :
18822     ;;
18823esac
18824                ;;
18825            esac
18826        fi
18827fi
18828
18829test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
18830test -n "$PTHREAD_CXX" || PTHREAD_CXX="$CXX"
18831
18832
18833
18834
18835
18836
18837# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
18838if test "x$ax_pthread_ok" = "xyes"; then
18839
18840
18841printf "%s\n" "#define HAVE_PTHREAD 1" >>confdefs.h
18842
18843		if test -n "$PTHREAD_LIBS"; then
18844		  LIBS="$PTHREAD_LIBS $LIBS"
18845		fi
18846		CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
18847		CC="$PTHREAD_CC"
18848		ub_have_pthreads=yes
18849		ac_fn_c_check_type "$LINENO" "pthread_spinlock_t" "ac_cv_type_pthread_spinlock_t" "#include <pthread.h>
18850"
18851if test "x$ac_cv_type_pthread_spinlock_t" = xyes
18852then :
18853
18854printf "%s\n" "#define HAVE_PTHREAD_SPINLOCK_T 1" >>confdefs.h
18855
18856
18857fi
18858ac_fn_c_check_type "$LINENO" "pthread_rwlock_t" "ac_cv_type_pthread_rwlock_t" "#include <pthread.h>
18859"
18860if test "x$ac_cv_type_pthread_rwlock_t" = xyes
18861then :
18862
18863printf "%s\n" "#define HAVE_PTHREAD_RWLOCK_T 1" >>confdefs.h
18864
18865
18866fi
18867
18868		# The cast to long int works around a bug in the HP C Compiler
18869# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
18870# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
18871# This bug is HP SR number 8606223364.
18872{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of unsigned long" >&5
18873printf %s "checking size of unsigned long... " >&6; }
18874if test ${ac_cv_sizeof_unsigned_long+y}
18875then :
18876  printf %s "(cached) " >&6
18877else $as_nop
18878  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned long))" "ac_cv_sizeof_unsigned_long"        "$ac_includes_default"
18879then :
18880
18881else $as_nop
18882  if test "$ac_cv_type_unsigned_long" = yes; then
18883     { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
18884printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
18885as_fn_error 77 "cannot compute sizeof (unsigned long)
18886See \`config.log' for more details" "$LINENO" 5; }
18887   else
18888     ac_cv_sizeof_unsigned_long=0
18889   fi
18890fi
18891
18892fi
18893{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned_long" >&5
18894printf "%s\n" "$ac_cv_sizeof_unsigned_long" >&6; }
18895
18896
18897
18898printf "%s\n" "#define SIZEOF_UNSIGNED_LONG $ac_cv_sizeof_unsigned_long" >>confdefs.h
18899
18900
18901		# The cast to long int works around a bug in the HP C Compiler
18902# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
18903# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
18904# This bug is HP SR number 8606223364.
18905{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
18906printf %s "checking size of pthread_t... " >&6; }
18907if test ${ac_cv_sizeof_pthread_t+y}
18908then :
18909  printf %s "(cached) " >&6
18910else $as_nop
18911  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t"        "$ac_includes_default"
18912then :
18913
18914else $as_nop
18915  if test "$ac_cv_type_pthread_t" = yes; then
18916     { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
18917printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
18918as_fn_error 77 "cannot compute sizeof (pthread_t)
18919See \`config.log' for more details" "$LINENO" 5; }
18920   else
18921     ac_cv_sizeof_pthread_t=0
18922   fi
18923fi
18924
18925fi
18926{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
18927printf "%s\n" "$ac_cv_sizeof_pthread_t" >&6; }
18928
18929
18930
18931printf "%s\n" "#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t" >>confdefs.h
18932
18933
18934
18935		if echo "$CFLAGS" | $GREP -e "-pthread" >/dev/null; then
18936		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if -pthread unused during linking" >&5
18937printf %s "checking if -pthread unused during linking... " >&6; }
18938		# catch clang warning 'argument unused during compilation'
18939		cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18940/* end confdefs.h.  */
18941$ac_includes_default
18942
18943int main(void) {return 0;}
18944
18945_ACEOF
18946		pthread_unused="yes"
18947		# first compile
18948		echo "$CC $CFLAGS -c conftest.c -o conftest.o" >&5
18949		$CC $CFLAGS -c conftest.c -o conftest.o 2>&5 >&5
18950		if test $? = 0; then
18951			# then link
18952			echo "$CC $CFLAGS -Werror $LDFLAGS $LIBS -o conftest contest.o" >&5
18953			$CC $CFLAGS -Werror $LDFLAGS $LIBS -o conftest conftest.o 2>&5 >&5
18954			if test $? -ne 0; then
18955				{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
18956printf "%s\n" "yes" >&6; }
18957				CFLAGS=`echo "$CFLAGS" | sed -e 's/-pthread//'`
18958				PTHREAD_CFLAGS_ONLY="-pthread"
18959
18960			else
18961				{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
18962printf "%s\n" "no" >&6; }
18963			fi
18964		else
18965			{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
18966printf "%s\n" "no" >&6; }
18967		fi # endif cc successful
18968		rm -f conftest conftest.c conftest.o
18969		fi # endif -pthread in CFLAGS
18970
18971
18972        :
18973else
18974        ax_pthread_ok=no
18975
18976fi
18977ac_ext=c
18978ac_cpp='$CPP $CPPFLAGS'
18979ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
18980ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
18981ac_compiler_gnu=$ac_cv_c_compiler_gnu
18982
18983
18984fi
18985
18986# check solaris thread library
18987
18988# Check whether --with-solaris-threads was given.
18989if test ${with_solaris_threads+y}
18990then :
18991  withval=$with_solaris_threads;
18992else $as_nop
18993   withval="no"
18994fi
18995
18996ub_have_sol_threads=no
18997if test x_$withval != x_no; then
18998	if test x_$ub_have_pthreads != x_no; then
18999	    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Have pthreads already, ignoring --with-solaris-threads" >&5
19000printf "%s\n" "$as_me: WARNING: Have pthreads already, ignoring --with-solaris-threads" >&2;}
19001	else
19002	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing thr_create" >&5
19003printf %s "checking for library containing thr_create... " >&6; }
19004if test ${ac_cv_search_thr_create+y}
19005then :
19006  printf %s "(cached) " >&6
19007else $as_nop
19008  ac_func_search_save_LIBS=$LIBS
19009cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19010/* end confdefs.h.  */
19011
19012/* Override any GCC internal prototype to avoid an error.
19013   Use char because int might match the return type of a GCC
19014   builtin and then its argument prototype would still apply.  */
19015char thr_create ();
19016int
19017main (void)
19018{
19019return thr_create ();
19020  ;
19021  return 0;
19022}
19023_ACEOF
19024for ac_lib in '' thread
19025do
19026  if test -z "$ac_lib"; then
19027    ac_res="none required"
19028  else
19029    ac_res=-l$ac_lib
19030    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
19031  fi
19032  if ac_fn_c_try_link "$LINENO"
19033then :
19034  ac_cv_search_thr_create=$ac_res
19035fi
19036rm -f core conftest.err conftest.$ac_objext conftest.beam \
19037    conftest$ac_exeext
19038  if test ${ac_cv_search_thr_create+y}
19039then :
19040  break
19041fi
19042done
19043if test ${ac_cv_search_thr_create+y}
19044then :
19045
19046else $as_nop
19047  ac_cv_search_thr_create=no
19048fi
19049rm conftest.$ac_ext
19050LIBS=$ac_func_search_save_LIBS
19051fi
19052{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_thr_create" >&5
19053printf "%s\n" "$ac_cv_search_thr_create" >&6; }
19054ac_res=$ac_cv_search_thr_create
19055if test "$ac_res" != no
19056then :
19057  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
19058
19059
19060printf "%s\n" "#define HAVE_SOLARIS_THREADS 1" >>confdefs.h
19061
19062
19063
19064
19065{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -mt" >&5
19066printf %s "checking whether $CC supports -mt... " >&6; }
19067cache=`echo mt | sed 'y%.=/+-%___p_%'`
19068if eval test \${cv_prog_cc_flag_$cache+y}
19069then :
19070  printf %s "(cached) " >&6
19071else $as_nop
19072
19073echo 'void f(void){}' >conftest.c
19074if test -z "`$CC $CPPFLAGS $CFLAGS -mt -c conftest.c 2>&1`"; then
19075eval "cv_prog_cc_flag_$cache=yes"
19076else
19077eval "cv_prog_cc_flag_$cache=no"
19078fi
19079rm -f conftest conftest.o conftest.c
19080
19081fi
19082
19083if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
19084{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19085printf "%s\n" "yes" >&6; }
19086:
19087CFLAGS="$CFLAGS -mt"
19088else
19089{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
19090printf "%s\n" "no" >&6; }
19091:
19092CFLAGS="$CFLAGS -D_REENTRANT"
19093fi
19094
19095		ub_have_sol_threads=yes
19096
19097else $as_nop
19098
19099		as_fn_error $? "no solaris threads found." "$LINENO" 5
19100
19101fi
19102
19103	fi
19104fi
19105
19106fi # end of non-mingw check of thread libraries
19107
19108# Check for SYSLOG_FACILITY
19109
19110# Check whether --with-syslog-facility was given.
19111if test ${with_syslog_facility+y}
19112then :
19113  withval=$with_syslog_facility;  UNBOUND_SYSLOG_FACILITY="$withval"
19114fi
19115
19116case "${UNBOUND_SYSLOG_FACILITY}" in
19117
19118  LOCAL[0-7]) UNBOUND_SYSLOG_FACILITY="LOG_${UNBOUND_SYSLOG_FACILITY}" ;;
19119
19120           *) UNBOUND_SYSLOG_FACILITY="LOG_DAEMON" ;;
19121
19122esac
19123
19124printf "%s\n" "#define UB_SYSLOG_FACILITY ${UNBOUND_SYSLOG_FACILITY}" >>confdefs.h
19125
19126
19127# Check for dynamic library module
19128
19129# Check whether --with-dynlibmodule was given.
19130if test ${with_dynlibmodule+y}
19131then :
19132  withval=$with_dynlibmodule;
19133else $as_nop
19134   withval="no"
19135fi
19136
19137
19138if test x_$withval != x_no; then
19139
19140printf "%s\n" "#define WITH_DYNLIBMODULE 1" >>confdefs.h
19141
19142  WITH_DYNLIBMODULE=yes
19143
19144  DYNLIBMOD_OBJ="dynlibmod.lo"
19145
19146  DYNLIBMOD_HEADER='$(srcdir)/dynlibmod/dynlibmod.h'
19147
19148  if test $on_mingw = "no"; then
19149    # link with -ldl if not already there, for all executables because
19150    # dlopen call is in the dynlib module.  For unbound executable, also
19151    # export symbols.
19152    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
19153printf %s "checking for library containing dlopen... " >&6; }
19154if test ${ac_cv_search_dlopen+y}
19155then :
19156  printf %s "(cached) " >&6
19157else $as_nop
19158  ac_func_search_save_LIBS=$LIBS
19159cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19160/* end confdefs.h.  */
19161
19162/* Override any GCC internal prototype to avoid an error.
19163   Use char because int might match the return type of a GCC
19164   builtin and then its argument prototype would still apply.  */
19165char dlopen ();
19166int
19167main (void)
19168{
19169return dlopen ();
19170  ;
19171  return 0;
19172}
19173_ACEOF
19174for ac_lib in '' dl
19175do
19176  if test -z "$ac_lib"; then
19177    ac_res="none required"
19178  else
19179    ac_res=-l$ac_lib
19180    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
19181  fi
19182  if ac_fn_c_try_link "$LINENO"
19183then :
19184  ac_cv_search_dlopen=$ac_res
19185fi
19186rm -f core conftest.err conftest.$ac_objext conftest.beam \
19187    conftest$ac_exeext
19188  if test ${ac_cv_search_dlopen+y}
19189then :
19190  break
19191fi
19192done
19193if test ${ac_cv_search_dlopen+y}
19194then :
19195
19196else $as_nop
19197  ac_cv_search_dlopen=no
19198fi
19199rm conftest.$ac_ext
19200LIBS=$ac_func_search_save_LIBS
19201fi
19202{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
19203printf "%s\n" "$ac_cv_search_dlopen" >&6; }
19204ac_res=$ac_cv_search_dlopen
19205if test "$ac_res" != no
19206then :
19207  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
19208
19209fi
19210
19211    DYNLIBMOD_EXTRALIBS="-export-dynamic"
19212  else
19213    DYNLIBMOD_EXTRALIBS="-Wl,--export-all-symbols,--out-implib,libunbound.dll.a"
19214  fi
19215
19216fi
19217
19218# Check for PyUnbound
19219
19220# Check whether --with-pyunbound was given.
19221if test ${with_pyunbound+y}
19222then :
19223  withval=$with_pyunbound;
19224else $as_nop
19225   withval="no"
19226fi
19227
19228
19229ub_test_python=no
19230ub_with_pyunbound=no
19231if test x_$withval != x_no; then
19232   ub_with_pyunbound=yes
19233   ub_test_python=yes
19234fi
19235
19236# Check for Python module
19237
19238# Check whether --with-pythonmodule was given.
19239if test ${with_pythonmodule+y}
19240then :
19241  withval=$with_pythonmodule;
19242else $as_nop
19243   withval="no"
19244fi
19245
19246
19247ub_with_pythonmod=no
19248if test x_$withval != x_no; then
19249   ub_with_pythonmod=yes
19250   ub_test_python=yes
19251fi
19252
19253# Check for Python & SWIG only on PyUnbound or PyModule
19254if test x_$ub_test_python != x_no; then
19255
19256   # Check for Python
19257   ub_have_python=no
19258   ac_save_LIBS="$LIBS"
19259        #
19260        # Allow the use of a (user set) custom python version
19261        #
19262
19263
19264        # Extract the first word of "python[$PYTHON_VERSION]", so it can be a program name with args.
19265set dummy python$PYTHON_VERSION; ac_word=$2
19266{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19267printf %s "checking for $ac_word... " >&6; }
19268if test ${ac_cv_path_PYTHON+y}
19269then :
19270  printf %s "(cached) " >&6
19271else $as_nop
19272  case $PYTHON in
19273  [\\/]* | ?:[\\/]*)
19274  ac_cv_path_PYTHON="$PYTHON" # Let the user override the test with a path.
19275  ;;
19276  *)
19277  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19278for as_dir in $PATH
19279do
19280  IFS=$as_save_IFS
19281  case $as_dir in #(((
19282    '') as_dir=./ ;;
19283    */) ;;
19284    *) as_dir=$as_dir/ ;;
19285  esac
19286    for ac_exec_ext in '' $ac_executable_extensions; do
19287  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
19288    ac_cv_path_PYTHON="$as_dir$ac_word$ac_exec_ext"
19289    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
19290    break 2
19291  fi
19292done
19293  done
19294IFS=$as_save_IFS
19295
19296  ;;
19297esac
19298fi
19299PYTHON=$ac_cv_path_PYTHON
19300if test -n "$PYTHON"; then
19301  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5
19302printf "%s\n" "$PYTHON" >&6; }
19303else
19304  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
19305printf "%s\n" "no" >&6; }
19306fi
19307
19308
19309        if test -z "$PYTHON"; then
19310           as_fn_error $? "Cannot find 'python$PYTHON_VERSION' in your system path. You can use the environment variable 'PYTHON_VERSION=version_number' for an explicit version." "$LINENO" 5
19311           PYTHON_VERSION=""
19312        fi
19313
19314        if test -z "$PYTHON_VERSION"; then
19315		PYTHON_VERSION=`$PYTHON -c "import sys; \
19316			print(sys.version.split()[0])"`
19317	fi
19318	# calculate the version number components.
19319
19320	v="$PYTHON_VERSION"
19321	PYTHON_VERSION_MAJOR=`echo $v | sed 's/[^0-9].*//'`
19322	if test -z "$PYTHON_VERSION_MAJOR"; then PYTHON_VERSION_MAJOR="0"; fi
19323	v=`echo $v | sed -e 's/^[0-9]*$//' -e 's/[0-9]*[^0-9]//'`
19324	PYTHON_VERSION_MINOR=`echo $v | sed 's/[^0-9].*//'`
19325	if test -z "$PYTHON_VERSION_MINOR"; then PYTHON_VERSION_MINOR="0"; fi
19326	v=`echo $v | sed -e 's/^[0-9]*$//' -e 's/[0-9]*[^0-9]//'`
19327	PYTHON_VERSION_PATCH=`echo $v | sed 's/[^0-9].*//'`
19328	if test -z "$PYTHON_VERSION_PATCH"; then PYTHON_VERSION_PATCH="0"; fi
19329
19330
19331	# For some systems, sysconfig exists, but has the wrong paths,
19332	# on Debian 10, for python 2.7 and 3.7. So, we check the version,
19333	# and for older versions try distutils.sysconfig first. For newer
19334	# versions>=3.10, where distutils.sysconfig is deprecated, use
19335	# sysconfig first and then attempt the other one.
19336	py_distutils_first="no"
19337	if test $PYTHON_VERSION_MAJOR -lt 3; then
19338		py_distutils_first="yes"
19339	fi
19340	if test $PYTHON_VERSION_MAJOR -eq 3 -a $PYTHON_VERSION_MINOR -lt 10; then
19341		py_distutils_first="yes"
19342	fi
19343
19344	# Check if you have the first module
19345	if test "$py_distutils_first" = "yes"; then m="distutils"; else m="sysconfig"; fi
19346	sysconfig_module=""
19347	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for the $m Python module" >&5
19348printf %s "checking for the $m Python module... " >&6; }
19349        if ac_modulecheck_result1=`$PYTHON -c "import $m" 2>&1`; then
19350                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19351printf "%s\n" "yes" >&6; }
19352		sysconfig_module="$m"
19353	else
19354                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
19355printf "%s\n" "no" >&6; }
19356	fi
19357
19358	# if not found, try the other one.
19359	if test -z "$sysconfig_module"; then
19360		if test "$py_distutils_first" = "yes"; then m2="sysconfig"; else m2="distutils"; fi
19361		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for the $m2 Python module" >&5
19362printf %s "checking for the $m2 Python module... " >&6; }
19363		if ac_modulecheck_result2=`$PYTHON -c "import $m2" 2>&1`; then
19364			{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19365printf "%s\n" "yes" >&6; }
19366			sysconfig_module="$m2"
19367		else
19368			{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
19369printf "%s\n" "no" >&6; }
19370			as_fn_error $? "cannot import Python module \"$m\", or \"$m2\".
19371	Please check your Python installation. The errors are:
19372	$m
19373	$ac_modulecheck_result1
19374	$m2
19375	$ac_modulecheck_result2" "$LINENO" 5
19376			PYTHON_VERSION=""
19377		fi
19378	fi
19379	if test "$sysconfig_module" = "distutils"; then sysconfig_module="distutils.sysconfig"; fi
19380
19381        #
19382        # Check for Python include path
19383        #
19384        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Python include path" >&5
19385printf %s "checking for Python include path... " >&6; }
19386        if test -z "$PYTHON_CPPFLAGS"; then
19387		if test "$sysconfig_module" = "sysconfig"; then
19388			python_path=`$PYTHON -c 'import sysconfig; \
19389				print(sysconfig.get_path("include"));'`
19390		else
19391			python_path=`$PYTHON -c "import distutils.sysconfig; \
19392				print(distutils.sysconfig.get_python_inc());"`
19393		fi
19394                if test -n "${python_path}"; then
19395                        python_path="-I$python_path"
19396                fi
19397                PYTHON_CPPFLAGS=$python_path
19398        fi
19399        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PYTHON_CPPFLAGS" >&5
19400printf "%s\n" "$PYTHON_CPPFLAGS" >&6; }
19401
19402
19403        #
19404        # Check for Python library path
19405        #
19406        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Python library path" >&5
19407printf %s "checking for Python library path... " >&6; }
19408        if test -z "$PYTHON_LDFLAGS"; then
19409                PYTHON_LDFLAGS=`$PYTHON -c "from $sysconfig_module import *; \
19410                        print('-L'+get_config_var('LIBDIR')+' -L'+get_config_var('LIBDEST')+' '+get_config_var('BLDLIBRARY'));"`
19411        fi
19412        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PYTHON_LDFLAGS" >&5
19413printf "%s\n" "$PYTHON_LDFLAGS" >&6; }
19414
19415
19416        if test -z "$PYTHON_LIBDIR"; then
19417                PYTHON_LIBDIR=`$PYTHON -c "from $sysconfig_module import *; \
19418                        print(get_config_var('LIBDIR'));"`
19419        fi
19420
19421        #
19422        # Check for site packages
19423        #
19424        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Python site-packages path" >&5
19425printf %s "checking for Python site-packages path... " >&6; }
19426        if test -z "$PYTHON_SITE_PKG"; then
19427		if test "$sysconfig_module" = "sysconfig"; then
19428			PYTHON_SITE_PKG=`$PYTHON -c 'import sysconfig; \
19429				print(sysconfig.get_path("platlib"));'`
19430		else
19431			PYTHON_SITE_PKG=`$PYTHON -c "import distutils.sysconfig; \
19432				print(distutils.sysconfig.get_python_lib(1,0));"`
19433		fi
19434        fi
19435        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PYTHON_SITE_PKG" >&5
19436printf "%s\n" "$PYTHON_SITE_PKG" >&6; }
19437
19438
19439        #
19440        # final check to see if everything compiles alright
19441        #
19442        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking consistency of all components of python development environment" >&5
19443printf %s "checking consistency of all components of python development environment... " >&6; }
19444        ac_ext=c
19445ac_cpp='$CPP $CPPFLAGS'
19446ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
19447ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
19448ac_compiler_gnu=$ac_cv_c_compiler_gnu
19449
19450        # save current global flags
19451        ac_save_LIBS="$LIBS"
19452        ac_save_CPPFLAGS="$CPPFLAGS"
19453
19454        LIBS="$LIBS $PYTHON_LDFLAGS"
19455        CPPFLAGS="$CPPFLAGS $PYTHON_CPPFLAGS"
19456        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19457/* end confdefs.h.  */
19458
19459                #include <Python.h>
19460
19461int
19462main (void)
19463{
19464
19465                Py_Initialize();
19466
19467  ;
19468  return 0;
19469}
19470_ACEOF
19471if ac_fn_c_try_link "$LINENO"
19472then :
19473  pythonexists=yes
19474else $as_nop
19475  pythonexists=no
19476fi
19477rm -f core conftest.err conftest.$ac_objext conftest.beam \
19478    conftest$ac_exeext conftest.$ac_ext
19479
19480        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $pythonexists" >&5
19481printf "%s\n" "$pythonexists" >&6; }
19482
19483        if test ! "$pythonexists" = "yes"; then
19484           as_fn_error $? "
19485  Could not link test program to Python. Maybe the main Python library has been
19486  installed in some non-standard library path. If so, pass it to configure,
19487  via the LDFLAGS environment variable.
19488  Example: ./configure LDFLAGS=\"-L/usr/non-standard-path/python/lib\"
19489  ============================================================================
19490   ERROR!
19491   You probably have to install the development version of the Python package
19492   for your distribution.  The exact name of this package varies among them.
19493  ============================================================================
19494           " "$LINENO" 5
19495          PYTHON_VERSION=""
19496        fi
19497        ac_ext=c
19498ac_cpp='$CPP $CPPFLAGS'
19499ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
19500ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
19501ac_compiler_gnu=$ac_cv_c_compiler_gnu
19502
19503        # turn back to default flags
19504        CPPFLAGS="$ac_save_CPPFLAGS"
19505        LIBS="$ac_save_LIBS"
19506
19507        #
19508        # all done!
19509        #
19510
19511   if test ! -z "$PYTHON_VERSION"; then
19512	badversion="no"
19513	if test "$PYTHON_VERSION_MAJOR" -lt 2; then
19514		badversion="yes"
19515	fi
19516	if test "$PYTHON_VERSION_MAJOR" -eq 2 -a "$PYTHON_VERSION_MINOR" -lt 4; then
19517		badversion="yes"
19518	fi
19519	if test "$badversion" = "yes"; then
19520		as_fn_error $? "Python version >= 2.4.0 is required" "$LINENO" 5
19521	fi
19522
19523      PY_MAJOR_VERSION="`$PYTHON -c \"import sys; print(sys.version_info[0])\"`"
19524
19525      # Have Python
19526
19527printf "%s\n" "#define HAVE_PYTHON 1" >>confdefs.h
19528
19529      if test x_$ub_with_pythonmod != x_no; then
19530        if test -n "$LIBS"; then
19531          LIBS="$PYTHON_LDFLAGS $LIBS"
19532        else
19533          LIBS="$PYTHON_LDFLAGS"
19534        fi
19535      fi
19536      PYTHON_LIBS="$PYTHON_LDFLAGS"
19537
19538      if test -n "$CPPFLAGS"; then
19539        CPPFLAGS="$CPPFLAGS $PYTHON_CPPFLAGS"
19540      else
19541        CPPFLAGS="$PYTHON_CPPFLAGS"
19542      fi
19543      if test "$PYTHON_LIBDIR" != "/usr/lib" -a "$PYTHON_LIBDIR" != "" -a "$PYTHON_LIBDIR" != "/usr/lib64"; then
19544
19545	if test "x$enable_rpath" = xyes; then
19546		if echo "$PYTHON_LIBDIR" | grep "^/" >/dev/null; then
19547			RUNTIME_PATH="$RUNTIME_PATH -R$PYTHON_LIBDIR"
19548		fi
19549	fi
19550
19551      fi
19552      ub_have_python=yes
19553      if test -n "$PKG_CONFIG" && \
19554    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\"python\${PY_MAJOR_VERSION}\"\""; } >&5
19555  ($PKG_CONFIG --exists --print-errors ""python${PY_MAJOR_VERSION}"") 2>&5
19556  ac_status=$?
19557  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19558  test $ac_status = 0; }; then
19559  PC_PY_DEPENDENCY="python${PY_MAJOR_VERSION}"
19560else
19561  PC_PY_DEPENDENCY="python"
19562fi
19563
19564
19565      # Check for SWIG
19566      ub_have_swig=no
19567      # Check whether --enable-swig-version-check was given.
19568if test ${enable_swig_version_check+y}
19569then :
19570  enableval=$enable_swig_version_check;
19571fi
19572
19573      if test "$enable_swig_version_check" = "yes"; then
19574
19575        # Find path to the "swig" executable.
19576        for ac_prog in swig swig3.0 swig2.0
19577do
19578  # Extract the first word of "$ac_prog", so it can be a program name with args.
19579set dummy $ac_prog; ac_word=$2
19580{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19581printf %s "checking for $ac_word... " >&6; }
19582if test ${ac_cv_path_SWIG+y}
19583then :
19584  printf %s "(cached) " >&6
19585else $as_nop
19586  case $SWIG in
19587  [\\/]* | ?:[\\/]*)
19588  ac_cv_path_SWIG="$SWIG" # Let the user override the test with a path.
19589  ;;
19590  *)
19591  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19592for as_dir in $PATH
19593do
19594  IFS=$as_save_IFS
19595  case $as_dir in #(((
19596    '') as_dir=./ ;;
19597    */) ;;
19598    *) as_dir=$as_dir/ ;;
19599  esac
19600    for ac_exec_ext in '' $ac_executable_extensions; do
19601  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
19602    ac_cv_path_SWIG="$as_dir$ac_word$ac_exec_ext"
19603    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
19604    break 2
19605  fi
19606done
19607  done
19608IFS=$as_save_IFS
19609
19610  ;;
19611esac
19612fi
19613SWIG=$ac_cv_path_SWIG
19614if test -n "$SWIG"; then
19615  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $SWIG" >&5
19616printf "%s\n" "$SWIG" >&6; }
19617else
19618  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
19619printf "%s\n" "no" >&6; }
19620fi
19621
19622
19623  test -n "$SWIG" && break
19624done
19625
19626        if test -z "$SWIG" ; then
19627                :
19628        elif test -z "2.0.1" ; then
19629                :
19630	else
19631                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking SWIG version" >&5
19632printf %s "checking SWIG version... " >&6; }
19633                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'`
19634                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $swig_version" >&5
19635printf "%s\n" "$swig_version" >&6; }
19636                if test -n "$swig_version" ; then
19637                        # Calculate the required version number components
19638                        required=2.0.1
19639                        required_major=`echo $required | sed 's/[^0-9].*//'`
19640                        if test -z "$required_major" ; then
19641                                required_major=0
19642                        fi
19643                        required=`echo $required. | sed 's/[0-9]*[^0-9]//'`
19644                        required_minor=`echo $required | sed 's/[^0-9].*//'`
19645                        if test -z "$required_minor" ; then
19646                                required_minor=0
19647                        fi
19648                        required=`echo $required. | sed 's/[0-9]*[^0-9]//'`
19649                        required_patch=`echo $required | sed 's/[^0-9].*//'`
19650                        if test -z "$required_patch" ; then
19651                                required_patch=0
19652                        fi
19653                        # Calculate the available version number components
19654                        available=$swig_version
19655                        available_major=`echo $available | sed 's/[^0-9].*//'`
19656                        if test -z "$available_major" ; then
19657                                available_major=0
19658                        fi
19659                        available=`echo $available | sed 's/[0-9]*[^0-9]//'`
19660                        available_minor=`echo $available | sed 's/[^0-9].*//'`
19661                        if test -z "$available_minor" ; then
19662                                available_minor=0
19663                        fi
19664                        available=`echo $available | sed 's/[0-9]*[^0-9]//'`
19665                        available_patch=`echo $available | sed 's/[^0-9].*//'`
19666                        if test -z "$available_patch" ; then
19667                                available_patch=0
19668                        fi
19669                        # Convert the version tuple into a single number for easier comparison.
19670                        # Using base 100 should be safe since SWIG internally uses BCD values
19671                        # to encode its version number.
19672                        required_swig_vernum=`expr $required_major \* 10000 \
19673                            \+ $required_minor \* 100 \+ $required_patch`
19674                        available_swig_vernum=`expr $available_major \* 10000 \
19675                            \+ $available_minor \* 100 \+ $available_patch`
19676
19677                        if test $available_swig_vernum -lt $required_swig_vernum; then
19678                                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: SWIG version >= 2.0.1 is required.  You have $swig_version." >&5
19679printf "%s\n" "$as_me: WARNING: SWIG version >= 2.0.1 is required.  You have $swig_version." >&2;}
19680                                SWIG=''
19681
19682                        else
19683                                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for SWIG library" >&5
19684printf %s "checking for SWIG library... " >&6; }
19685                                SWIG_LIB=`$SWIG -swiglib | tr '\r\n' '  '`
19686                                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $SWIG_LIB" >&5
19687printf "%s\n" "$SWIG_LIB" >&6; }
19688
19689                        fi
19690                else
19691                        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cannot determine SWIG version" >&5
19692printf "%s\n" "$as_me: WARNING: cannot determine SWIG version" >&2;}
19693                        SWIG=''
19694
19695                fi
19696        fi
19697
19698
19699      else
19700
19701        # Find path to the "swig" executable.
19702        for ac_prog in swig swig3.0 swig2.0
19703do
19704  # Extract the first word of "$ac_prog", so it can be a program name with args.
19705set dummy $ac_prog; ac_word=$2
19706{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19707printf %s "checking for $ac_word... " >&6; }
19708if test ${ac_cv_path_SWIG+y}
19709then :
19710  printf %s "(cached) " >&6
19711else $as_nop
19712  case $SWIG in
19713  [\\/]* | ?:[\\/]*)
19714  ac_cv_path_SWIG="$SWIG" # Let the user override the test with a path.
19715  ;;
19716  *)
19717  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19718for as_dir in $PATH
19719do
19720  IFS=$as_save_IFS
19721  case $as_dir in #(((
19722    '') as_dir=./ ;;
19723    */) ;;
19724    *) as_dir=$as_dir/ ;;
19725  esac
19726    for ac_exec_ext in '' $ac_executable_extensions; do
19727  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
19728    ac_cv_path_SWIG="$as_dir$ac_word$ac_exec_ext"
19729    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
19730    break 2
19731  fi
19732done
19733  done
19734IFS=$as_save_IFS
19735
19736  ;;
19737esac
19738fi
19739SWIG=$ac_cv_path_SWIG
19740if test -n "$SWIG"; then
19741  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $SWIG" >&5
19742printf "%s\n" "$SWIG" >&6; }
19743else
19744  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
19745printf "%s\n" "no" >&6; }
19746fi
19747
19748
19749  test -n "$SWIG" && break
19750done
19751
19752        if test -z "$SWIG" ; then
19753                :
19754        elif test -z "" ; then
19755                :
19756	else
19757                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking SWIG version" >&5
19758printf %s "checking SWIG version... " >&6; }
19759                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'`
19760                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $swig_version" >&5
19761printf "%s\n" "$swig_version" >&6; }
19762                if test -n "$swig_version" ; then
19763                        # Calculate the required version number components
19764                        required=
19765                        required_major=`echo $required | sed 's/[^0-9].*//'`
19766                        if test -z "$required_major" ; then
19767                                required_major=0
19768                        fi
19769                        required=`echo $required. | sed 's/[0-9]*[^0-9]//'`
19770                        required_minor=`echo $required | sed 's/[^0-9].*//'`
19771                        if test -z "$required_minor" ; then
19772                                required_minor=0
19773                        fi
19774                        required=`echo $required. | sed 's/[0-9]*[^0-9]//'`
19775                        required_patch=`echo $required | sed 's/[^0-9].*//'`
19776                        if test -z "$required_patch" ; then
19777                                required_patch=0
19778                        fi
19779                        # Calculate the available version number components
19780                        available=$swig_version
19781                        available_major=`echo $available | sed 's/[^0-9].*//'`
19782                        if test -z "$available_major" ; then
19783                                available_major=0
19784                        fi
19785                        available=`echo $available | sed 's/[0-9]*[^0-9]//'`
19786                        available_minor=`echo $available | sed 's/[^0-9].*//'`
19787                        if test -z "$available_minor" ; then
19788                                available_minor=0
19789                        fi
19790                        available=`echo $available | sed 's/[0-9]*[^0-9]//'`
19791                        available_patch=`echo $available | sed 's/[^0-9].*//'`
19792                        if test -z "$available_patch" ; then
19793                                available_patch=0
19794                        fi
19795                        # Convert the version tuple into a single number for easier comparison.
19796                        # Using base 100 should be safe since SWIG internally uses BCD values
19797                        # to encode its version number.
19798                        required_swig_vernum=`expr $required_major \* 10000 \
19799                            \+ $required_minor \* 100 \+ $required_patch`
19800                        available_swig_vernum=`expr $available_major \* 10000 \
19801                            \+ $available_minor \* 100 \+ $available_patch`
19802
19803                        if test $available_swig_vernum -lt $required_swig_vernum; then
19804                                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: SWIG version >=  is required.  You have $swig_version." >&5
19805printf "%s\n" "$as_me: WARNING: SWIG version >=  is required.  You have $swig_version." >&2;}
19806                                SWIG=''
19807
19808                        else
19809                                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for SWIG library" >&5
19810printf %s "checking for SWIG library... " >&6; }
19811                                SWIG_LIB=`$SWIG -swiglib | tr '\r\n' '  '`
19812                                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $SWIG_LIB" >&5
19813printf "%s\n" "$SWIG_LIB" >&6; }
19814
19815                        fi
19816                else
19817                        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cannot determine SWIG version" >&5
19818printf "%s\n" "$as_me: WARNING: cannot determine SWIG version" >&2;}
19819                        SWIG=''
19820
19821                fi
19822        fi
19823
19824
19825      fi
19826      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking SWIG" >&5
19827printf %s "checking SWIG... " >&6; }
19828      if test ! -x "$SWIG"; then
19829         as_fn_error $? "failed to find swig tool, install it, or do not build Python module and PyUnbound" "$LINENO" 5
19830      else
19831
19832printf "%s\n" "#define HAVE_SWIG 1" >>confdefs.h
19833
19834         swig="$SWIG"
19835
19836         { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: present" >&5
19837printf "%s\n" "present" >&6; }
19838
19839         # If have Python & SWIG
19840         # Declare PythonMod
19841         if test x_$ub_with_pythonmod != x_no; then
19842
19843printf "%s\n" "#define WITH_PYTHONMODULE 1" >>confdefs.h
19844
19845            WITH_PYTHONMODULE=yes
19846
19847	    PYTHONMOD_OBJ="pythonmod.lo pythonmod_utils.lo"
19848
19849	    PYTHONMOD_HEADER='$(srcdir)/pythonmod/pythonmod.h'
19850
19851	    PYTHONMOD_INSTALL=pythonmod-install
19852
19853	    PYTHONMOD_UNINSTALL=pythonmod-uninstall
19854
19855         fi
19856
19857         # Declare PyUnbound
19858         if test x_$ub_with_pyunbound != x_no; then
19859
19860printf "%s\n" "#define WITH_PYUNBOUND 1" >>confdefs.h
19861
19862            WITH_PYUNBOUND=yes
19863
19864	    PYUNBOUND_OBJ="libunbound_wrap.lo"
19865
19866	    PYUNBOUND_TARGET="_unbound.la"
19867
19868	    PYUNBOUND_INSTALL=pyunbound-install
19869
19870	    PYUNBOUND_UNINSTALL=pyunbound-uninstall
19871
19872         fi
19873      fi
19874   else
19875      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: *** Python libraries not found, won't build PythonMod or PyUnbound ***" >&5
19876printf "%s\n" "*** Python libraries not found, won't build PythonMod or PyUnbound ***" >&6; }
19877      ub_with_pyunbound=no
19878      ub_with_pythonmod=no
19879   fi
19880fi
19881
19882if test "`uname`" = "NetBSD"; then
19883	NETBSD_LINTFLAGS='"-D__RENAME(x)=" -D_NETINET_IN_H_'
19884
19885fi
19886
19887if test "`uname`" = "Linux"; then
19888	# splint cannot parse modern c99 header files
19889	GCC_DOCKER_LINTFLAGS='-syntax'
19890
19891fi
19892CONFIG_DATE=`date +%Y%m%d`
19893
19894
19895# Checks for libraries.
19896
19897# libnss
19898USE_NSS="no"
19899
19900# Check whether --with-nss was given.
19901if test ${with_nss+y}
19902then :
19903  withval=$with_nss;
19904	USE_NSS="yes"
19905
19906printf "%s\n" "#define HAVE_NSS 1" >>confdefs.h
19907
19908	if test "$withval" != "" -a "$withval" != "yes"; then
19909		CPPFLAGS="$CPPFLAGS -I$withval/include/nss3"
19910		LDFLAGS="$LDFLAGS -L$withval/lib"
19911
19912	if test "x$enable_rpath" = xyes; then
19913		if echo "$withval/lib" | grep "^/" >/dev/null; then
19914			RUNTIME_PATH="$RUNTIME_PATH -R$withval/lib"
19915		fi
19916	fi
19917
19918		CPPFLAGS="-I$withval/include/nspr4 $CPPFLAGS"
19919	else
19920		CPPFLAGS="$CPPFLAGS -I/usr/include/nss3"
19921		CPPFLAGS="-I/usr/include/nspr4 $CPPFLAGS"
19922	fi
19923        LIBS="$LIBS -lnss3 -lnspr4"
19924	SSLLIB=""
19925	PC_CRYPTO_DEPENDENCY="nss nspr"
19926
19927
19928
19929fi
19930
19931
19932# libnettle
19933USE_NETTLE="no"
19934
19935# Check whether --with-nettle was given.
19936if test ${with_nettle+y}
19937then :
19938  withval=$with_nettle;
19939	USE_NETTLE="yes"
19940
19941printf "%s\n" "#define HAVE_NETTLE 1" >>confdefs.h
19942
19943	ac_fn_c_check_header_compile "$LINENO" "nettle/dsa-compat.h" "ac_cv_header_nettle_dsa_compat_h" "$ac_includes_default
19944"
19945if test "x$ac_cv_header_nettle_dsa_compat_h" = xyes
19946then :
19947  printf "%s\n" "#define HAVE_NETTLE_DSA_COMPAT_H 1" >>confdefs.h
19948
19949fi
19950
19951	if test "$withval" != "" -a "$withval" != "yes"; then
19952		CPPFLAGS="$CPPFLAGS -I$withval/include/nettle"
19953		LDFLAGS="$LDFLAGS -L$withval/lib"
19954
19955	if test "x$enable_rpath" = xyes; then
19956		if echo "$withval/lib" | grep "^/" >/dev/null; then
19957			RUNTIME_PATH="$RUNTIME_PATH -R$withval/lib"
19958		fi
19959	fi
19960
19961	else
19962		CPPFLAGS="$CPPFLAGS -I/usr/include/nettle"
19963	fi
19964        LIBS="$LIBS -lhogweed -lnettle -lgmp"
19965	SSLLIB=""
19966	PC_CRYPTO_DEPENDENCY="hogweed nettle"
19967
19968
19969
19970fi
19971
19972
19973# openssl
19974if test $USE_NSS = "no" -a $USE_NETTLE = "no"; then
19975
19976
19977# Check whether --with-ssl was given.
19978if test ${with_ssl+y}
19979then :
19980  withval=$with_ssl;
19981
19982else $as_nop
19983
19984            withval="yes"
19985
19986fi
19987
19988    if test x_$withval = x_no; then
19989	as_fn_error $? "Need SSL library to do digital signature cryptography" "$LINENO" 5
19990    fi
19991
19992    withval=$withval
19993    if test x_$withval != x_no; then
19994        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for SSL" >&5
19995printf %s "checking for SSL... " >&6; }
19996	if test -n "$withval"; then
19997										if test ! -f "$withval/include/openssl/ssl.h" -a -f "$withval/openssl/ssl.h"; then
19998			ssldir="$withval"
19999			found_ssl="yes"
20000			withval=""
20001			ssldir_include="$ssldir"
20002						ssldir_lib=`echo $ssldir | sed -e 's/include/lib/'`
20003			if test -f "$ssldir_lib/libssl.a" -o -f "$ssldir_lib/libssl.so"; then
20004				: # found here
20005			else
20006				ssldir_lib=`echo $ssldir | sed -e 's/include/lib64/'`
20007				if test -f "$ssldir_lib/libssl.a" -o -f "$ssldir_lib/libssl.so"; then
20008					: # found here
20009				else
20010					as_fn_error $? "Could not find openssl lib file, $ssldir_lib/libssl.so,a, pass like \"/usr/local\" or \"/usr/include/openssl11\"" "$LINENO" 5
20011				fi
20012			fi
20013		fi
20014	fi
20015        if test x_$withval = x_ -o x_$withval = x_yes; then
20016            withval="/usr/local/ssl /usr/lib/ssl /usr/ssl /usr/pkg /usr/local /opt/local /usr/sfw /usr"
20017        fi
20018        for dir in $withval; do
20019            ssldir="$dir"
20020            if test -f "$dir/include/openssl/ssl.h"; then
20021                found_ssl="yes"
20022		ssldir_include="$ssldir/include"
20023		if test ! -d "$ssldir/lib" -a -d "$ssldir/lib64"; then
20024			ssldir_lib="$ssldir/lib64"
20025		else
20026			ssldir_lib="$ssldir/lib"
20027		fi
20028                break;
20029            fi
20030        done
20031        if test x_$found_ssl != x_yes; then
20032            as_fn_error $? "Cannot find the SSL libraries in $withval" "$LINENO" 5
20033        else
20034            { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: found in $ssldir" >&5
20035printf "%s\n" "found in $ssldir" >&6; }
20036
20037printf "%s\n" "#define HAVE_SSL /**/" >>confdefs.h
20038
20039            HAVE_SSL=yes
20040	                if test "$ssldir" != "/usr"; then
20041		    CPPFLAGS="$CPPFLAGS -I$ssldir_include"
20042		    LIBSSL_CPPFLAGS="$LIBSSL_CPPFLAGS -I$ssldir_include"
20043		    LDFLAGS="$LDFLAGS -L$ssldir_lib"
20044		    LIBSSL_LDFLAGS="$LIBSSL_LDFLAGS -L$ssldir_lib"
20045
20046	if test "x$enable_rpath" = xyes; then
20047		if echo "$ssldir_lib" | grep "^/" >/dev/null; then
20048			RUNTIME_PATH="$RUNTIME_PATH -R$ssldir_lib"
20049		fi
20050	fi
20051
20052	    fi
20053
20054            { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for EVP_sha256 in -lcrypto" >&5
20055printf %s "checking for EVP_sha256 in -lcrypto... " >&6; }
20056            LIBS="$LIBS -lcrypto"
20057            LIBSSL_LIBS="$LIBSSL_LIBS -lcrypto"
20058            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20059/* end confdefs.h.  */
20060
20061int
20062main (void)
20063{
20064
20065                int EVP_sha256(void);
20066                (void)EVP_sha256();
20067
20068  ;
20069  return 0;
20070}
20071_ACEOF
20072if ac_fn_c_try_link "$LINENO"
20073then :
20074
20075                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
20076printf "%s\n" "yes" >&6; }
20077
20078printf "%s\n" "#define HAVE_EVP_SHA256 1" >>confdefs.h
20079
20080
20081else $as_nop
20082
20083                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
20084printf "%s\n" "no" >&6; }
20085                # check if -lwsock32 or -lgdi32 are needed.
20086                BAKLIBS="$LIBS"
20087                BAKSSLLIBS="$LIBSSL_LIBS"
20088		LIBS="$LIBS -lgdi32 -lws2_32"
20089		LIBSSL_LIBS="$LIBSSL_LIBS -lgdi32 -lws2_32"
20090                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if -lcrypto needs -lgdi32" >&5
20091printf %s "checking if -lcrypto needs -lgdi32... " >&6; }
20092                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20093/* end confdefs.h.  */
20094
20095int
20096main (void)
20097{
20098
20099                    int EVP_sha256(void);
20100                    (void)EVP_sha256();
20101
20102  ;
20103  return 0;
20104}
20105_ACEOF
20106if ac_fn_c_try_link "$LINENO"
20107then :
20108
20109
20110printf "%s\n" "#define HAVE_EVP_SHA256 1" >>confdefs.h
20111
20112                    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
20113printf "%s\n" "yes" >&6; }
20114
20115else $as_nop
20116
20117                    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
20118printf "%s\n" "no" >&6; }
20119                    LIBS="$BAKLIBS"
20120                    LIBSSL_LIBS="$BAKSSLLIBS"
20121
20122		    LIBS="$LIBS -lgdi32 -lws2_32 -lcrypt32"
20123		    LIBSSL_LIBS="$LIBSSL_LIBS -lgdi32 -lws2_32 -lcrypt32"
20124                    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if -lcrypto needs -lgdi32 -lws2_32 -lcrypt32" >&5
20125printf %s "checking if -lcrypto needs -lgdi32 -lws2_32 -lcrypt32... " >&6; }
20126		    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20127/* end confdefs.h.  */
20128
20129int
20130main (void)
20131{
20132
20133			int EVP_sha256(void);
20134			(void)EVP_sha256();
20135
20136  ;
20137  return 0;
20138}
20139_ACEOF
20140if ac_fn_c_try_link "$LINENO"
20141then :
20142
20143
20144printf "%s\n" "#define HAVE_EVP_SHA256 1" >>confdefs.h
20145
20146			{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
20147printf "%s\n" "yes" >&6; }
20148
20149else $as_nop
20150
20151			{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
20152printf "%s\n" "no" >&6; }
20153			LIBS="$BAKLIBS"
20154			LIBSSL_LIBS="$BAKSSLLIBS"
20155
20156			LIBS="$LIBS -lgdi32 -lws2_32 -lcrypt32 -l:libssp.a"
20157			LIBSSL_LIBS="$LIBSSL_LIBS -lgdi32 -lws2_32 -lcrypt32 -l:libssp.a"
20158			{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if -lcrypto needs -lgdi32 -lws2_32 -lcrypt32 -l:libssp.a" >&5
20159printf %s "checking if -lcrypto needs -lgdi32 -lws2_32 -lcrypt32 -l:libssp.a... " >&6; }
20160			cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20161/* end confdefs.h.  */
20162
20163int
20164main (void)
20165{
20166
20167			    int EVP_sha256(void);
20168			    (void)EVP_sha256();
20169
20170  ;
20171  return 0;
20172}
20173_ACEOF
20174if ac_fn_c_try_link "$LINENO"
20175then :
20176
20177
20178printf "%s\n" "#define HAVE_EVP_SHA256 1" >>confdefs.h
20179
20180			    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
20181printf "%s\n" "yes" >&6; }
20182
20183else $as_nop
20184
20185			    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
20186printf "%s\n" "no" >&6; }
20187			    LIBS="$BAKLIBS"
20188			    LIBSSL_LIBS="$BAKSSLLIBS"
20189
20190			    LIBS="$LIBS -ldl"
20191			    LIBSSL_LIBS="$LIBSSL_LIBS -ldl"
20192			    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if -lcrypto needs -ldl" >&5
20193printf %s "checking if -lcrypto needs -ldl... " >&6; }
20194			    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20195/* end confdefs.h.  */
20196
20197int
20198main (void)
20199{
20200
20201				int EVP_sha256(void);
20202				(void)EVP_sha256();
20203
20204  ;
20205  return 0;
20206}
20207_ACEOF
20208if ac_fn_c_try_link "$LINENO"
20209then :
20210
20211
20212printf "%s\n" "#define HAVE_EVP_SHA256 1" >>confdefs.h
20213
20214				{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
20215printf "%s\n" "yes" >&6; }
20216
20217else $as_nop
20218
20219				{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
20220printf "%s\n" "no" >&6; }
20221				LIBS="$BAKLIBS"
20222				LIBSSL_LIBS="$BAKSSLLIBS"
20223				LIBS="$LIBS -ldl -pthread"
20224				LIBSSL_LIBS="$LIBSSL_LIBS -ldl -pthread"
20225				{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if -lcrypto needs -ldl -pthread" >&5
20226printf %s "checking if -lcrypto needs -ldl -pthread... " >&6; }
20227				cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20228/* end confdefs.h.  */
20229
20230int
20231main (void)
20232{
20233
20234				    int EVP_sha256(void);
20235				    (void)EVP_sha256();
20236
20237  ;
20238  return 0;
20239}
20240_ACEOF
20241if ac_fn_c_try_link "$LINENO"
20242then :
20243
20244
20245printf "%s\n" "#define HAVE_EVP_SHA256 1" >>confdefs.h
20246
20247				    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
20248printf "%s\n" "yes" >&6; }
20249
20250else $as_nop
20251
20252				    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
20253printf "%s\n" "no" >&6; }
20254				    as_fn_error $? "OpenSSL found in $ssldir, but version 0.9.7 or higher is required" "$LINENO" 5
20255
20256fi
20257rm -f core conftest.err conftest.$ac_objext conftest.beam \
20258    conftest$ac_exeext conftest.$ac_ext
20259
20260fi
20261rm -f core conftest.err conftest.$ac_objext conftest.beam \
20262    conftest$ac_exeext conftest.$ac_ext
20263
20264fi
20265rm -f core conftest.err conftest.$ac_objext conftest.beam \
20266    conftest$ac_exeext conftest.$ac_ext
20267
20268fi
20269rm -f core conftest.err conftest.$ac_objext conftest.beam \
20270    conftest$ac_exeext conftest.$ac_ext
20271
20272fi
20273rm -f core conftest.err conftest.$ac_objext conftest.beam \
20274    conftest$ac_exeext conftest.$ac_ext
20275
20276fi
20277rm -f core conftest.err conftest.$ac_objext conftest.beam \
20278    conftest$ac_exeext conftest.$ac_ext
20279        fi
20280
20281
20282    fi
20283ac_fn_c_check_header_compile "$LINENO" "openssl/ssl.h" "ac_cv_header_openssl_ssl_h" "$ac_includes_default
20284"
20285if test "x$ac_cv_header_openssl_ssl_h" = xyes
20286then :
20287  printf "%s\n" "#define HAVE_OPENSSL_SSL_H 1" >>confdefs.h
20288
20289fi
20290
20291ac_fn_c_check_header_compile "$LINENO" "openssl/err.h" "ac_cv_header_openssl_err_h" "$ac_includes_default
20292"
20293if test "x$ac_cv_header_openssl_err_h" = xyes
20294then :
20295  printf "%s\n" "#define HAVE_OPENSSL_ERR_H 1" >>confdefs.h
20296
20297fi
20298
20299ac_fn_c_check_header_compile "$LINENO" "openssl/rand.h" "ac_cv_header_openssl_rand_h" "$ac_includes_default
20300"
20301if test "x$ac_cv_header_openssl_rand_h" = xyes
20302then :
20303  printf "%s\n" "#define HAVE_OPENSSL_RAND_H 1" >>confdefs.h
20304
20305fi
20306
20307
20308
20309
20310# check if libssl needs libdl
20311BAKLIBS="$LIBS"
20312LIBS="-lssl $LIBS"
20313{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if libssl needs libdl" >&5
20314printf %s "checking if libssl needs libdl... " >&6; }
20315cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20316/* end confdefs.h.  */
20317
20318/* Override any GCC internal prototype to avoid an error.
20319   Use char because int might match the return type of a GCC
20320   builtin and then its argument prototype would still apply.  */
20321char SSL_CTX_new ();
20322int
20323main (void)
20324{
20325return SSL_CTX_new ();
20326  ;
20327  return 0;
20328}
20329_ACEOF
20330if ac_fn_c_try_link "$LINENO"
20331then :
20332
20333	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
20334printf "%s\n" "no" >&6; }
20335	LIBS="$BAKLIBS"
20336
20337else $as_nop
20338
20339	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
20340printf "%s\n" "yes" >&6; }
20341	LIBS="$BAKLIBS"
20342	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
20343printf %s "checking for library containing dlopen... " >&6; }
20344if test ${ac_cv_search_dlopen+y}
20345then :
20346  printf %s "(cached) " >&6
20347else $as_nop
20348  ac_func_search_save_LIBS=$LIBS
20349cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20350/* end confdefs.h.  */
20351
20352/* Override any GCC internal prototype to avoid an error.
20353   Use char because int might match the return type of a GCC
20354   builtin and then its argument prototype would still apply.  */
20355char dlopen ();
20356int
20357main (void)
20358{
20359return dlopen ();
20360  ;
20361  return 0;
20362}
20363_ACEOF
20364for ac_lib in '' dl
20365do
20366  if test -z "$ac_lib"; then
20367    ac_res="none required"
20368  else
20369    ac_res=-l$ac_lib
20370    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
20371  fi
20372  if ac_fn_c_try_link "$LINENO"
20373then :
20374  ac_cv_search_dlopen=$ac_res
20375fi
20376rm -f core conftest.err conftest.$ac_objext conftest.beam \
20377    conftest$ac_exeext
20378  if test ${ac_cv_search_dlopen+y}
20379then :
20380  break
20381fi
20382done
20383if test ${ac_cv_search_dlopen+y}
20384then :
20385
20386else $as_nop
20387  ac_cv_search_dlopen=no
20388fi
20389rm conftest.$ac_ext
20390LIBS=$ac_func_search_save_LIBS
20391fi
20392{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
20393printf "%s\n" "$ac_cv_search_dlopen" >&6; }
20394ac_res=$ac_cv_search_dlopen
20395if test "$ac_res" != no
20396then :
20397  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
20398
20399fi
20400
20401
20402fi
20403rm -f core conftest.err conftest.$ac_objext conftest.beam \
20404    conftest$ac_exeext conftest.$ac_ext
20405SSLLIB="-lssl"
20406
20407PC_CRYPTO_DEPENDENCY=""
20408
20409
20410# check if -lcrypt32 is needed because CAPIENG needs that. (on windows)
20411BAKLIBS="$LIBS"
20412LIBS="-lssl $LIBS"
20413{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if libssl needs -lcrypt32" >&5
20414printf %s "checking if libssl needs -lcrypt32... " >&6; }
20415cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20416/* end confdefs.h.  */
20417
20418int
20419main (void)
20420{
20421
20422	int EVP_sha256(void);
20423	(void)EVP_sha256();
20424
20425  ;
20426  return 0;
20427}
20428_ACEOF
20429if ac_fn_c_try_link "$LINENO"
20430then :
20431
20432	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
20433printf "%s\n" "no" >&6; }
20434	LIBS="$BAKLIBS"
20435
20436else $as_nop
20437
20438	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
20439printf "%s\n" "yes" >&6; }
20440	LIBS="$BAKLIBS"
20441	LIBS="$LIBS -lcrypt32"
20442
20443fi
20444rm -f core conftest.err conftest.$ac_objext conftest.beam \
20445    conftest$ac_exeext conftest.$ac_ext
20446
20447{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for LibreSSL" >&5
20448printf %s "checking for LibreSSL... " >&6; }
20449if grep VERSION_TEXT $ssldir_include/openssl/opensslv.h | grep "LibreSSL" >/dev/null; then
20450	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
20451printf "%s\n" "yes" >&6; }
20452
20453printf "%s\n" "#define HAVE_LIBRESSL 1" >>confdefs.h
20454
20455	# libressl provides these compat functions, but they may also be
20456	# declared by the OS in libc.  See if they have been declared.
20457	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC options needed to detect all undeclared functions" >&5
20458printf %s "checking for $CC options needed to detect all undeclared functions... " >&6; }
20459if test ${ac_cv_c_undeclared_builtin_options+y}
20460then :
20461  printf %s "(cached) " >&6
20462else $as_nop
20463  ac_save_CFLAGS=$CFLAGS
20464   ac_cv_c_undeclared_builtin_options='cannot detect'
20465   for ac_arg in '' -fno-builtin; do
20466     CFLAGS="$ac_save_CFLAGS $ac_arg"
20467     # This test program should *not* compile successfully.
20468     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20469/* end confdefs.h.  */
20470
20471int
20472main (void)
20473{
20474(void) strchr;
20475  ;
20476  return 0;
20477}
20478_ACEOF
20479if ac_fn_c_try_compile "$LINENO"
20480then :
20481
20482else $as_nop
20483  # This test program should compile successfully.
20484        # No library function is consistently available on
20485        # freestanding implementations, so test against a dummy
20486        # declaration.  Include always-available headers on the
20487        # off chance that they somehow elicit warnings.
20488        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20489/* end confdefs.h.  */
20490#include <float.h>
20491#include <limits.h>
20492#include <stdarg.h>
20493#include <stddef.h>
20494extern void ac_decl (int, char *);
20495
20496int
20497main (void)
20498{
20499(void) ac_decl (0, (char *) 0);
20500  (void) ac_decl;
20501
20502  ;
20503  return 0;
20504}
20505_ACEOF
20506if ac_fn_c_try_compile "$LINENO"
20507then :
20508  if test x"$ac_arg" = x
20509then :
20510  ac_cv_c_undeclared_builtin_options='none needed'
20511else $as_nop
20512  ac_cv_c_undeclared_builtin_options=$ac_arg
20513fi
20514          break
20515fi
20516rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
20517fi
20518rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
20519    done
20520    CFLAGS=$ac_save_CFLAGS
20521
20522fi
20523{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_undeclared_builtin_options" >&5
20524printf "%s\n" "$ac_cv_c_undeclared_builtin_options" >&6; }
20525  case $ac_cv_c_undeclared_builtin_options in #(
20526  'cannot detect') :
20527    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
20528printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
20529as_fn_error $? "cannot make $CC report undeclared builtins
20530See \`config.log' for more details" "$LINENO" 5; } ;; #(
20531  'none needed') :
20532    ac_c_undeclared_builtin_options='' ;; #(
20533  *) :
20534    ac_c_undeclared_builtin_options=$ac_cv_c_undeclared_builtin_options ;;
20535esac
20536
20537ac_fn_check_decl "$LINENO" "strlcpy" "ac_cv_have_decl_strlcpy" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
20538if test "x$ac_cv_have_decl_strlcpy" = xyes
20539then :
20540  ac_have_decl=1
20541else $as_nop
20542  ac_have_decl=0
20543fi
20544printf "%s\n" "#define HAVE_DECL_STRLCPY $ac_have_decl" >>confdefs.h
20545ac_fn_check_decl "$LINENO" "strlcat" "ac_cv_have_decl_strlcat" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
20546if test "x$ac_cv_have_decl_strlcat" = xyes
20547then :
20548  ac_have_decl=1
20549else $as_nop
20550  ac_have_decl=0
20551fi
20552printf "%s\n" "#define HAVE_DECL_STRLCAT $ac_have_decl" >>confdefs.h
20553ac_fn_check_decl "$LINENO" "arc4random" "ac_cv_have_decl_arc4random" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
20554if test "x$ac_cv_have_decl_arc4random" = xyes
20555then :
20556  ac_have_decl=1
20557else $as_nop
20558  ac_have_decl=0
20559fi
20560printf "%s\n" "#define HAVE_DECL_ARC4RANDOM $ac_have_decl" >>confdefs.h
20561ac_fn_check_decl "$LINENO" "arc4random_uniform" "ac_cv_have_decl_arc4random_uniform" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
20562if test "x$ac_cv_have_decl_arc4random_uniform" = xyes
20563then :
20564  ac_have_decl=1
20565else $as_nop
20566  ac_have_decl=0
20567fi
20568printf "%s\n" "#define HAVE_DECL_ARC4RANDOM_UNIFORM $ac_have_decl" >>confdefs.h
20569
20570else
20571	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
20572printf "%s\n" "no" >&6; }
20573fi
20574ac_fn_c_check_header_compile "$LINENO" "openssl/conf.h" "ac_cv_header_openssl_conf_h" "$ac_includes_default
20575"
20576if test "x$ac_cv_header_openssl_conf_h" = xyes
20577then :
20578  printf "%s\n" "#define HAVE_OPENSSL_CONF_H 1" >>confdefs.h
20579
20580fi
20581ac_fn_c_check_header_compile "$LINENO" "openssl/engine.h" "ac_cv_header_openssl_engine_h" "$ac_includes_default
20582"
20583if test "x$ac_cv_header_openssl_engine_h" = xyes
20584then :
20585  printf "%s\n" "#define HAVE_OPENSSL_ENGINE_H 1" >>confdefs.h
20586
20587fi
20588ac_fn_c_check_header_compile "$LINENO" "openssl/bn.h" "ac_cv_header_openssl_bn_h" "$ac_includes_default
20589"
20590if test "x$ac_cv_header_openssl_bn_h" = xyes
20591then :
20592  printf "%s\n" "#define HAVE_OPENSSL_BN_H 1" >>confdefs.h
20593
20594fi
20595ac_fn_c_check_header_compile "$LINENO" "openssl/dh.h" "ac_cv_header_openssl_dh_h" "$ac_includes_default
20596"
20597if test "x$ac_cv_header_openssl_dh_h" = xyes
20598then :
20599  printf "%s\n" "#define HAVE_OPENSSL_DH_H 1" >>confdefs.h
20600
20601fi
20602ac_fn_c_check_header_compile "$LINENO" "openssl/dsa.h" "ac_cv_header_openssl_dsa_h" "$ac_includes_default
20603"
20604if test "x$ac_cv_header_openssl_dsa_h" = xyes
20605then :
20606  printf "%s\n" "#define HAVE_OPENSSL_DSA_H 1" >>confdefs.h
20607
20608fi
20609ac_fn_c_check_header_compile "$LINENO" "openssl/rsa.h" "ac_cv_header_openssl_rsa_h" "$ac_includes_default
20610"
20611if test "x$ac_cv_header_openssl_rsa_h" = xyes
20612then :
20613  printf "%s\n" "#define HAVE_OPENSSL_RSA_H 1" >>confdefs.h
20614
20615fi
20616ac_fn_c_check_header_compile "$LINENO" "openssl/core_names.h" "ac_cv_header_openssl_core_names_h" "$ac_includes_default
20617"
20618if test "x$ac_cv_header_openssl_core_names_h" = xyes
20619then :
20620  printf "%s\n" "#define HAVE_OPENSSL_CORE_NAMES_H 1" >>confdefs.h
20621
20622fi
20623ac_fn_c_check_header_compile "$LINENO" "openssl/param_build.h" "ac_cv_header_openssl_param_build_h" "$ac_includes_default
20624"
20625if test "x$ac_cv_header_openssl_param_build_h" = xyes
20626then :
20627  printf "%s\n" "#define HAVE_OPENSSL_PARAM_BUILD_H 1" >>confdefs.h
20628
20629fi
20630
20631ac_fn_c_check_func "$LINENO" "OPENSSL_config" "ac_cv_func_OPENSSL_config"
20632if test "x$ac_cv_func_OPENSSL_config" = xyes
20633then :
20634  printf "%s\n" "#define HAVE_OPENSSL_CONFIG 1" >>confdefs.h
20635
20636fi
20637ac_fn_c_check_func "$LINENO" "EVP_sha1" "ac_cv_func_EVP_sha1"
20638if test "x$ac_cv_func_EVP_sha1" = xyes
20639then :
20640  printf "%s\n" "#define HAVE_EVP_SHA1 1" >>confdefs.h
20641
20642fi
20643ac_fn_c_check_func "$LINENO" "EVP_sha256" "ac_cv_func_EVP_sha256"
20644if test "x$ac_cv_func_EVP_sha256" = xyes
20645then :
20646  printf "%s\n" "#define HAVE_EVP_SHA256 1" >>confdefs.h
20647
20648fi
20649ac_fn_c_check_func "$LINENO" "EVP_sha512" "ac_cv_func_EVP_sha512"
20650if test "x$ac_cv_func_EVP_sha512" = xyes
20651then :
20652  printf "%s\n" "#define HAVE_EVP_SHA512 1" >>confdefs.h
20653
20654fi
20655ac_fn_c_check_func "$LINENO" "FIPS_mode" "ac_cv_func_FIPS_mode"
20656if test "x$ac_cv_func_FIPS_mode" = xyes
20657then :
20658  printf "%s\n" "#define HAVE_FIPS_MODE 1" >>confdefs.h
20659
20660fi
20661ac_fn_c_check_func "$LINENO" "EVP_default_properties_is_fips_enabled" "ac_cv_func_EVP_default_properties_is_fips_enabled"
20662if test "x$ac_cv_func_EVP_default_properties_is_fips_enabled" = xyes
20663then :
20664  printf "%s\n" "#define HAVE_EVP_DEFAULT_PROPERTIES_IS_FIPS_ENABLED 1" >>confdefs.h
20665
20666fi
20667ac_fn_c_check_func "$LINENO" "EVP_MD_CTX_new" "ac_cv_func_EVP_MD_CTX_new"
20668if test "x$ac_cv_func_EVP_MD_CTX_new" = xyes
20669then :
20670  printf "%s\n" "#define HAVE_EVP_MD_CTX_NEW 1" >>confdefs.h
20671
20672fi
20673ac_fn_c_check_func "$LINENO" "OpenSSL_add_all_digests" "ac_cv_func_OpenSSL_add_all_digests"
20674if test "x$ac_cv_func_OpenSSL_add_all_digests" = xyes
20675then :
20676  printf "%s\n" "#define HAVE_OPENSSL_ADD_ALL_DIGESTS 1" >>confdefs.h
20677
20678fi
20679ac_fn_c_check_func "$LINENO" "OPENSSL_init_crypto" "ac_cv_func_OPENSSL_init_crypto"
20680if test "x$ac_cv_func_OPENSSL_init_crypto" = xyes
20681then :
20682  printf "%s\n" "#define HAVE_OPENSSL_INIT_CRYPTO 1" >>confdefs.h
20683
20684fi
20685ac_fn_c_check_func "$LINENO" "EVP_cleanup" "ac_cv_func_EVP_cleanup"
20686if test "x$ac_cv_func_EVP_cleanup" = xyes
20687then :
20688  printf "%s\n" "#define HAVE_EVP_CLEANUP 1" >>confdefs.h
20689
20690fi
20691ac_fn_c_check_func "$LINENO" "ENGINE_cleanup" "ac_cv_func_ENGINE_cleanup"
20692if test "x$ac_cv_func_ENGINE_cleanup" = xyes
20693then :
20694  printf "%s\n" "#define HAVE_ENGINE_CLEANUP 1" >>confdefs.h
20695
20696fi
20697ac_fn_c_check_func "$LINENO" "ERR_load_crypto_strings" "ac_cv_func_ERR_load_crypto_strings"
20698if test "x$ac_cv_func_ERR_load_crypto_strings" = xyes
20699then :
20700  printf "%s\n" "#define HAVE_ERR_LOAD_CRYPTO_STRINGS 1" >>confdefs.h
20701
20702fi
20703ac_fn_c_check_func "$LINENO" "CRYPTO_cleanup_all_ex_data" "ac_cv_func_CRYPTO_cleanup_all_ex_data"
20704if test "x$ac_cv_func_CRYPTO_cleanup_all_ex_data" = xyes
20705then :
20706  printf "%s\n" "#define HAVE_CRYPTO_CLEANUP_ALL_EX_DATA 1" >>confdefs.h
20707
20708fi
20709ac_fn_c_check_func "$LINENO" "ERR_free_strings" "ac_cv_func_ERR_free_strings"
20710if test "x$ac_cv_func_ERR_free_strings" = xyes
20711then :
20712  printf "%s\n" "#define HAVE_ERR_FREE_STRINGS 1" >>confdefs.h
20713
20714fi
20715ac_fn_c_check_func "$LINENO" "RAND_cleanup" "ac_cv_func_RAND_cleanup"
20716if test "x$ac_cv_func_RAND_cleanup" = xyes
20717then :
20718  printf "%s\n" "#define HAVE_RAND_CLEANUP 1" >>confdefs.h
20719
20720fi
20721ac_fn_c_check_func "$LINENO" "DSA_SIG_set0" "ac_cv_func_DSA_SIG_set0"
20722if test "x$ac_cv_func_DSA_SIG_set0" = xyes
20723then :
20724  printf "%s\n" "#define HAVE_DSA_SIG_SET0 1" >>confdefs.h
20725
20726fi
20727ac_fn_c_check_func "$LINENO" "EVP_dss1" "ac_cv_func_EVP_dss1"
20728if test "x$ac_cv_func_EVP_dss1" = xyes
20729then :
20730  printf "%s\n" "#define HAVE_EVP_DSS1 1" >>confdefs.h
20731
20732fi
20733ac_fn_c_check_func "$LINENO" "EVP_DigestVerify" "ac_cv_func_EVP_DigestVerify"
20734if test "x$ac_cv_func_EVP_DigestVerify" = xyes
20735then :
20736  printf "%s\n" "#define HAVE_EVP_DIGESTVERIFY 1" >>confdefs.h
20737
20738fi
20739ac_fn_c_check_func "$LINENO" "EVP_aes_256_cbc" "ac_cv_func_EVP_aes_256_cbc"
20740if test "x$ac_cv_func_EVP_aes_256_cbc" = xyes
20741then :
20742  printf "%s\n" "#define HAVE_EVP_AES_256_CBC 1" >>confdefs.h
20743
20744fi
20745ac_fn_c_check_func "$LINENO" "EVP_EncryptInit_ex" "ac_cv_func_EVP_EncryptInit_ex"
20746if test "x$ac_cv_func_EVP_EncryptInit_ex" = xyes
20747then :
20748  printf "%s\n" "#define HAVE_EVP_ENCRYPTINIT_EX 1" >>confdefs.h
20749
20750fi
20751ac_fn_c_check_func "$LINENO" "HMAC_Init_ex" "ac_cv_func_HMAC_Init_ex"
20752if test "x$ac_cv_func_HMAC_Init_ex" = xyes
20753then :
20754  printf "%s\n" "#define HAVE_HMAC_INIT_EX 1" >>confdefs.h
20755
20756fi
20757ac_fn_c_check_func "$LINENO" "CRYPTO_THREADID_set_callback" "ac_cv_func_CRYPTO_THREADID_set_callback"
20758if test "x$ac_cv_func_CRYPTO_THREADID_set_callback" = xyes
20759then :
20760  printf "%s\n" "#define HAVE_CRYPTO_THREADID_SET_CALLBACK 1" >>confdefs.h
20761
20762fi
20763ac_fn_c_check_func "$LINENO" "EVP_MAC_CTX_set_params" "ac_cv_func_EVP_MAC_CTX_set_params"
20764if test "x$ac_cv_func_EVP_MAC_CTX_set_params" = xyes
20765then :
20766  printf "%s\n" "#define HAVE_EVP_MAC_CTX_SET_PARAMS 1" >>confdefs.h
20767
20768fi
20769ac_fn_c_check_func "$LINENO" "OSSL_PARAM_BLD_new" "ac_cv_func_OSSL_PARAM_BLD_new"
20770if test "x$ac_cv_func_OSSL_PARAM_BLD_new" = xyes
20771then :
20772  printf "%s\n" "#define HAVE_OSSL_PARAM_BLD_NEW 1" >>confdefs.h
20773
20774fi
20775ac_fn_c_check_func "$LINENO" "BIO_set_callback_ex" "ac_cv_func_BIO_set_callback_ex"
20776if test "x$ac_cv_func_BIO_set_callback_ex" = xyes
20777then :
20778  printf "%s\n" "#define HAVE_BIO_SET_CALLBACK_EX 1" >>confdefs.h
20779
20780fi
20781ac_fn_c_check_func "$LINENO" "SSL_CTX_set_tmp_ecdh" "ac_cv_func_SSL_CTX_set_tmp_ecdh"
20782if test "x$ac_cv_func_SSL_CTX_set_tmp_ecdh" = xyes
20783then :
20784  printf "%s\n" "#define HAVE_SSL_CTX_SET_TMP_ECDH 1" >>confdefs.h
20785
20786fi
20787
20788
20789# these check_funcs need -lssl
20790BAKLIBS="$LIBS"
20791LIBS="-lssl $LIBS"
20792ac_fn_c_check_func "$LINENO" "OPENSSL_init_ssl" "ac_cv_func_OPENSSL_init_ssl"
20793if test "x$ac_cv_func_OPENSSL_init_ssl" = xyes
20794then :
20795  printf "%s\n" "#define HAVE_OPENSSL_INIT_SSL 1" >>confdefs.h
20796
20797fi
20798ac_fn_c_check_func "$LINENO" "SSL_CTX_set_security_level" "ac_cv_func_SSL_CTX_set_security_level"
20799if test "x$ac_cv_func_SSL_CTX_set_security_level" = xyes
20800then :
20801  printf "%s\n" "#define HAVE_SSL_CTX_SET_SECURITY_LEVEL 1" >>confdefs.h
20802
20803fi
20804ac_fn_c_check_func "$LINENO" "SSL_set1_host" "ac_cv_func_SSL_set1_host"
20805if test "x$ac_cv_func_SSL_set1_host" = xyes
20806then :
20807  printf "%s\n" "#define HAVE_SSL_SET1_HOST 1" >>confdefs.h
20808
20809fi
20810ac_fn_c_check_func "$LINENO" "SSL_get0_peername" "ac_cv_func_SSL_get0_peername"
20811if test "x$ac_cv_func_SSL_get0_peername" = xyes
20812then :
20813  printf "%s\n" "#define HAVE_SSL_GET0_PEERNAME 1" >>confdefs.h
20814
20815fi
20816ac_fn_c_check_func "$LINENO" "X509_VERIFY_PARAM_set1_host" "ac_cv_func_X509_VERIFY_PARAM_set1_host"
20817if test "x$ac_cv_func_X509_VERIFY_PARAM_set1_host" = xyes
20818then :
20819  printf "%s\n" "#define HAVE_X509_VERIFY_PARAM_SET1_HOST 1" >>confdefs.h
20820
20821fi
20822ac_fn_c_check_func "$LINENO" "SSL_CTX_set_ciphersuites" "ac_cv_func_SSL_CTX_set_ciphersuites"
20823if test "x$ac_cv_func_SSL_CTX_set_ciphersuites" = xyes
20824then :
20825  printf "%s\n" "#define HAVE_SSL_CTX_SET_CIPHERSUITES 1" >>confdefs.h
20826
20827fi
20828ac_fn_c_check_func "$LINENO" "SSL_CTX_set_tlsext_ticket_key_evp_cb" "ac_cv_func_SSL_CTX_set_tlsext_ticket_key_evp_cb"
20829if test "x$ac_cv_func_SSL_CTX_set_tlsext_ticket_key_evp_cb" = xyes
20830then :
20831  printf "%s\n" "#define HAVE_SSL_CTX_SET_TLSEXT_TICKET_KEY_EVP_CB 1" >>confdefs.h
20832
20833fi
20834ac_fn_c_check_func "$LINENO" "SSL_CTX_set_alpn_select_cb" "ac_cv_func_SSL_CTX_set_alpn_select_cb"
20835if test "x$ac_cv_func_SSL_CTX_set_alpn_select_cb" = xyes
20836then :
20837  printf "%s\n" "#define HAVE_SSL_CTX_SET_ALPN_SELECT_CB 1" >>confdefs.h
20838
20839fi
20840ac_fn_c_check_func "$LINENO" "SSL_get0_alpn_selected" "ac_cv_func_SSL_get0_alpn_selected"
20841if test "x$ac_cv_func_SSL_get0_alpn_selected" = xyes
20842then :
20843  printf "%s\n" "#define HAVE_SSL_GET0_ALPN_SELECTED 1" >>confdefs.h
20844
20845fi
20846ac_fn_c_check_func "$LINENO" "SSL_CTX_set_alpn_protos" "ac_cv_func_SSL_CTX_set_alpn_protos"
20847if test "x$ac_cv_func_SSL_CTX_set_alpn_protos" = xyes
20848then :
20849  printf "%s\n" "#define HAVE_SSL_CTX_SET_ALPN_PROTOS 1" >>confdefs.h
20850
20851fi
20852ac_fn_c_check_func "$LINENO" "SSL_get1_peer_certificate" "ac_cv_func_SSL_get1_peer_certificate"
20853if test "x$ac_cv_func_SSL_get1_peer_certificate" = xyes
20854then :
20855  printf "%s\n" "#define HAVE_SSL_GET1_PEER_CERTIFICATE 1" >>confdefs.h
20856
20857fi
20858
20859LIBS="$BAKLIBS"
20860
20861ac_fn_check_decl "$LINENO" "SSL_COMP_get_compression_methods" "ac_cv_have_decl_SSL_COMP_get_compression_methods" "
20862$ac_includes_default
20863#ifdef HAVE_OPENSSL_ERR_H
20864#include <openssl/err.h>
20865#endif
20866
20867#ifdef HAVE_OPENSSL_RAND_H
20868#include <openssl/rand.h>
20869#endif
20870
20871#ifdef HAVE_OPENSSL_CONF_H
20872#include <openssl/conf.h>
20873#endif
20874
20875#ifdef HAVE_OPENSSL_ENGINE_H
20876#include <openssl/engine.h>
20877#endif
20878#include <openssl/ssl.h>
20879#include <openssl/evp.h>
20880
20881" "$ac_c_undeclared_builtin_options" "CFLAGS"
20882if test "x$ac_cv_have_decl_SSL_COMP_get_compression_methods" = xyes
20883then :
20884  ac_have_decl=1
20885else $as_nop
20886  ac_have_decl=0
20887fi
20888printf "%s\n" "#define HAVE_DECL_SSL_COMP_GET_COMPRESSION_METHODS $ac_have_decl" >>confdefs.h
20889ac_fn_check_decl "$LINENO" "sk_SSL_COMP_pop_free" "ac_cv_have_decl_sk_SSL_COMP_pop_free" "
20890$ac_includes_default
20891#ifdef HAVE_OPENSSL_ERR_H
20892#include <openssl/err.h>
20893#endif
20894
20895#ifdef HAVE_OPENSSL_RAND_H
20896#include <openssl/rand.h>
20897#endif
20898
20899#ifdef HAVE_OPENSSL_CONF_H
20900#include <openssl/conf.h>
20901#endif
20902
20903#ifdef HAVE_OPENSSL_ENGINE_H
20904#include <openssl/engine.h>
20905#endif
20906#include <openssl/ssl.h>
20907#include <openssl/evp.h>
20908
20909" "$ac_c_undeclared_builtin_options" "CFLAGS"
20910if test "x$ac_cv_have_decl_sk_SSL_COMP_pop_free" = xyes
20911then :
20912  ac_have_decl=1
20913else $as_nop
20914  ac_have_decl=0
20915fi
20916printf "%s\n" "#define HAVE_DECL_SK_SSL_COMP_POP_FREE $ac_have_decl" >>confdefs.h
20917ac_fn_check_decl "$LINENO" "SSL_CTX_set_ecdh_auto" "ac_cv_have_decl_SSL_CTX_set_ecdh_auto" "
20918$ac_includes_default
20919#ifdef HAVE_OPENSSL_ERR_H
20920#include <openssl/err.h>
20921#endif
20922
20923#ifdef HAVE_OPENSSL_RAND_H
20924#include <openssl/rand.h>
20925#endif
20926
20927#ifdef HAVE_OPENSSL_CONF_H
20928#include <openssl/conf.h>
20929#endif
20930
20931#ifdef HAVE_OPENSSL_ENGINE_H
20932#include <openssl/engine.h>
20933#endif
20934#include <openssl/ssl.h>
20935#include <openssl/evp.h>
20936
20937" "$ac_c_undeclared_builtin_options" "CFLAGS"
20938if test "x$ac_cv_have_decl_SSL_CTX_set_ecdh_auto" = xyes
20939then :
20940  ac_have_decl=1
20941else $as_nop
20942  ac_have_decl=0
20943fi
20944printf "%s\n" "#define HAVE_DECL_SSL_CTX_SET_ECDH_AUTO $ac_have_decl" >>confdefs.h
20945
20946
20947if test "$ac_cv_func_HMAC_Init_ex" = "yes"; then
20948# check function return type.
20949{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking the return type of HMAC_Init_ex" >&5
20950printf %s "checking the return type of HMAC_Init_ex... " >&6; }
20951cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20952/* end confdefs.h.  */
20953
20954#ifdef HAVE_OPENSSL_ERR_H
20955#include <openssl/err.h>
20956#endif
20957
20958#ifdef HAVE_OPENSSL_RAND_H
20959#include <openssl/rand.h>
20960#endif
20961
20962#ifdef HAVE_OPENSSL_CONF_H
20963#include <openssl/conf.h>
20964#endif
20965
20966#ifdef HAVE_OPENSSL_ENGINE_H
20967#include <openssl/engine.h>
20968#endif
20969#include <openssl/ssl.h>
20970#include <openssl/evp.h>
20971
20972int
20973main (void)
20974{
20975
20976	HMAC_CTX* hmac_ctx = NULL;
20977	void* hmac_key = NULL;
20978	const EVP_MD* digest = NULL;
20979	int x = HMAC_Init_ex(hmac_ctx, hmac_key, 32, digest, NULL);
20980	(void)x;
20981
20982  ;
20983  return 0;
20984}
20985_ACEOF
20986if ac_fn_c_try_compile "$LINENO"
20987then :
20988
20989	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: int" >&5
20990printf "%s\n" "int" >&6; }
20991
20992else $as_nop
20993
20994	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: void" >&5
20995printf "%s\n" "void" >&6; }
20996
20997printf "%s\n" "#define HMAC_INIT_EX_RETURNS_VOID 1" >>confdefs.h
20998
20999
21000fi
21001rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
21002fi
21003
21004fi
21005
21006
21007# libbsd
21008
21009# Check whether --with-libbsd was given.
21010if test ${with_libbsd+y}
21011then :
21012  withval=$with_libbsd;
21013	ac_fn_c_check_header_compile "$LINENO" "bsd/string.h" "ac_cv_header_bsd_string_h" "$ac_includes_default
21014"
21015if test "x$ac_cv_header_bsd_string_h" = xyes
21016then :
21017  printf "%s\n" "#define HAVE_BSD_STRING_H 1" >>confdefs.h
21018
21019fi
21020ac_fn_c_check_header_compile "$LINENO" "bsd/stdlib.h" "ac_cv_header_bsd_stdlib_h" "$ac_includes_default
21021"
21022if test "x$ac_cv_header_bsd_stdlib_h" = xyes
21023then :
21024  printf "%s\n" "#define HAVE_BSD_STDLIB_H 1" >>confdefs.h
21025
21026fi
21027
21028	if test "x$ac_cv_header_bsd_string_h" = xyes -a "x$ac_cv_header_bsd_stdlib_h" = xyes; then
21029		for func in strlcpy strlcat arc4random arc4random_uniform reallocarray; do
21030			as_ac_Search=`printf "%s\n" "ac_cv_search_$func" | $as_tr_sh`
21031{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing $func" >&5
21032printf %s "checking for library containing $func... " >&6; }
21033if eval test \${$as_ac_Search+y}
21034then :
21035  printf %s "(cached) " >&6
21036else $as_nop
21037  ac_func_search_save_LIBS=$LIBS
21038cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21039/* end confdefs.h.  */
21040
21041/* Override any GCC internal prototype to avoid an error.
21042   Use char because int might match the return type of a GCC
21043   builtin and then its argument prototype would still apply.  */
21044char $func ();
21045int
21046main (void)
21047{
21048return $func ();
21049  ;
21050  return 0;
21051}
21052_ACEOF
21053for ac_lib in '' bsd
21054do
21055  if test -z "$ac_lib"; then
21056    ac_res="none required"
21057  else
21058    ac_res=-l$ac_lib
21059    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
21060  fi
21061  if ac_fn_c_try_link "$LINENO"
21062then :
21063  eval "$as_ac_Search=\$ac_res"
21064fi
21065rm -f core conftest.err conftest.$ac_objext conftest.beam \
21066    conftest$ac_exeext
21067  if eval test \${$as_ac_Search+y}
21068then :
21069  break
21070fi
21071done
21072if eval test \${$as_ac_Search+y}
21073then :
21074
21075else $as_nop
21076  eval "$as_ac_Search=no"
21077fi
21078rm conftest.$ac_ext
21079LIBS=$ac_func_search_save_LIBS
21080fi
21081eval ac_res=\$$as_ac_Search
21082	       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
21083printf "%s\n" "$ac_res" >&6; }
21084eval ac_res=\$$as_ac_Search
21085if test "$ac_res" != no
21086then :
21087  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
21088
21089
21090printf "%s\n" "#define HAVE_LIBBSD 1" >>confdefs.h
21091
21092				PC_LIBBSD_DEPENDENCY=libbsd
21093
21094
21095fi
21096
21097		done
21098	fi
21099
21100fi
21101
21102
21103# Check whether --enable-sha1 was given.
21104if test ${enable_sha1+y}
21105then :
21106  enableval=$enable_sha1;
21107fi
21108
21109case "$enable_sha1" in
21110	no)
21111	;;
21112	yes|*)
21113
21114printf "%s\n" "#define USE_SHA1 1" >>confdefs.h
21115
21116	;;
21117esac
21118
21119
21120# Check whether --enable-sha2 was given.
21121if test ${enable_sha2+y}
21122then :
21123  enableval=$enable_sha2;
21124fi
21125
21126case "$enable_sha2" in
21127	no)
21128	;;
21129	yes|*)
21130
21131printf "%s\n" "#define USE_SHA2 1" >>confdefs.h
21132
21133	;;
21134esac
21135
21136# Check whether --enable-subnet was given.
21137if test ${enable_subnet+y}
21138then :
21139  enableval=$enable_subnet;
21140fi
21141
21142case "$enable_subnet" in
21143	yes)
21144
21145printf "%s\n" "#define CLIENT_SUBNET 1" >>confdefs.h
21146
21147	SUBNET_OBJ="edns-subnet.lo subnetmod.lo addrtree.lo subnet-whitelist.lo"
21148
21149	SUBNET_HEADER='$(srcdir)/edns-subnet/subnetmod.h $(srcdir)/edns-subnet/edns-subnet.h $(srcdir)/edns-subnet/subnet-whitelist.h $(srcdir)/edns-subnet/addrtree.h'
21150
21151	;;
21152	no|*)
21153	;;
21154esac
21155
21156# check whether gost also works
21157
21158# Check whether --enable-gost was given.
21159if test ${enable_gost+y}
21160then :
21161  enableval=$enable_gost;
21162fi
21163
21164use_gost="no"
21165if test $USE_NSS = "no" -a $USE_NETTLE = "no"; then
21166case "$enable_gost" in
21167	no)
21168	;;
21169	*)
21170	ac_fn_c_check_func "$LINENO" "EVP_PKEY_set_type_str" "ac_cv_func_EVP_PKEY_set_type_str"
21171if test "x$ac_cv_func_EVP_PKEY_set_type_str" = xyes
21172then :
21173  :
21174else $as_nop
21175  as_fn_error $? "OpenSSL 1.0.0 is needed for GOST support" "$LINENO" 5
21176fi
21177
21178	ac_fn_c_check_func "$LINENO" "EC_KEY_new" "ac_cv_func_EC_KEY_new"
21179if test "x$ac_cv_func_EC_KEY_new" = xyes
21180then :
21181
21182else $as_nop
21183  as_fn_error $? "OpenSSL does not support ECC, needed for GOST support" "$LINENO" 5
21184fi
21185
21186
21187{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if GOST works" >&5
21188printf %s "checking if GOST works... " >&6; }
21189if test c${cross_compiling} = cno; then
21190BAKCFLAGS="$CFLAGS"
21191if test -n "$ssldir"; then
21192	CFLAGS="$CFLAGS -Wl,-rpath,$ssldir_lib"
21193fi
21194if test "$cross_compiling" = yes
21195then :
21196  eval "ac_cv_c_gost_works=maybe"
21197else $as_nop
21198  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21199/* end confdefs.h.  */
21200
21201#include <string.h>
21202#include <openssl/ssl.h>
21203#include <openssl/evp.h>
21204#include <openssl/engine.h>
21205#include <openssl/conf.h>
21206/* routine to load gost (from sldns) */
21207int load_gost_id(void)
21208{
21209	static int gost_id = 0;
21210	const EVP_PKEY_ASN1_METHOD* meth;
21211	ENGINE* e;
21212
21213	if(gost_id) return gost_id;
21214
21215	/* see if configuration loaded gost implementation from other engine*/
21216	meth = EVP_PKEY_asn1_find_str(NULL, "gost2001", -1);
21217	if(meth) {
21218		EVP_PKEY_asn1_get0_info(&gost_id, NULL, NULL, NULL, NULL, meth);
21219		return gost_id;
21220	}
21221
21222	/* see if engine can be loaded already */
21223	e = ENGINE_by_id("gost");
21224	if(!e) {
21225		/* load it ourself, in case statically linked */
21226		ENGINE_load_builtin_engines();
21227		ENGINE_load_dynamic();
21228		e = ENGINE_by_id("gost");
21229	}
21230	if(!e) {
21231		/* no gost engine in openssl */
21232		return 0;
21233	}
21234	if(!ENGINE_set_default(e, ENGINE_METHOD_ALL)) {
21235		ENGINE_finish(e);
21236		ENGINE_free(e);
21237		return 0;
21238	}
21239
21240	meth = EVP_PKEY_asn1_find_str(&e, "gost2001", -1);
21241	if(!meth) {
21242		/* algo not found */
21243		ENGINE_finish(e);
21244		ENGINE_free(e);
21245		return 0;
21246	}
21247	EVP_PKEY_asn1_get0_info(&gost_id, NULL, NULL, NULL, NULL, meth);
21248	return gost_id;
21249}
21250int main(void) {
21251	EVP_MD_CTX* ctx;
21252	const EVP_MD* md;
21253	unsigned char digest[64]; /* its a 256-bit digest, so uses 32 bytes */
21254	const char* str = "Hello world";
21255	const unsigned char check[] = {
21256		0x40 , 0xed , 0xf8 , 0x56 , 0x5a , 0xc5 , 0x36 , 0xe1 ,
21257		0x33 , 0x7c , 0x7e , 0x87 , 0x62 , 0x1c , 0x42 , 0xe0 ,
21258		0x17 , 0x1b , 0x5e , 0xce , 0xa8 , 0x46 , 0x65 , 0x4d ,
21259		0x8d , 0x3e , 0x22 , 0x9b , 0xe1 , 0x30 , 0x19 , 0x9d
21260	};
21261	OPENSSL_config(NULL);
21262	(void)load_gost_id();
21263	md = EVP_get_digestbyname("md_gost94");
21264	if(!md) return 1;
21265	memset(digest, 0, sizeof(digest));
21266	ctx = EVP_MD_CTX_create();
21267	if(!ctx) return 2;
21268	if(!EVP_DigestInit_ex(ctx, md, NULL)) return 3;
21269	if(!EVP_DigestUpdate(ctx, str, 10)) return 4;
21270	if(!EVP_DigestFinal_ex(ctx, digest, NULL)) return 5;
21271	/* uncomment to see the hash calculated.
21272		{int i;
21273		for(i=0; i<32; i++)
21274			printf(" %2.2x", (int)digest[i]);
21275		printf("\n");}
21276	*/
21277	if(memcmp(digest, check, sizeof(check)) != 0)
21278		return 6;
21279	return 0;
21280}
21281
21282_ACEOF
21283if ac_fn_c_try_run "$LINENO"
21284then :
21285  eval "ac_cv_c_gost_works=yes"
21286else $as_nop
21287  eval "ac_cv_c_gost_works=no"
21288fi
21289rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21290  conftest.$ac_objext conftest.beam conftest.$ac_ext
21291fi
21292
21293CFLAGS="$BAKCFLAGS"
21294else
21295eval "ac_cv_c_gost_works=maybe"
21296fi
21297{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_gost_works" >&5
21298printf "%s\n" "$ac_cv_c_gost_works" >&6; }
21299
21300	if test "$ac_cv_c_gost_works" != no; then
21301		use_gost="yes"
21302
21303printf "%s\n" "#define USE_GOST 1" >>confdefs.h
21304
21305	fi
21306	;;
21307esac
21308fi
21309# Check whether --enable-ecdsa was given.
21310if test ${enable_ecdsa+y}
21311then :
21312  enableval=$enable_ecdsa;
21313fi
21314
21315use_ecdsa="no"
21316case "$enable_ecdsa" in
21317    no)
21318      ;;
21319    *)
21320      if test $USE_NSS = "no" -a $USE_NETTLE = "no"; then
21321	      ac_fn_c_check_func "$LINENO" "EVP_PKEY_fromdata" "ac_cv_func_EVP_PKEY_fromdata"
21322if test "x$ac_cv_func_EVP_PKEY_fromdata" = xyes
21323then :
21324
21325	          # with EVP_PKEY_fromdata, check if EC is not disabled
21326	          ac_fn_check_decl "$LINENO" "OPENSSL_NO_EC" "ac_cv_have_decl_OPENSSL_NO_EC" "$ac_includes_default
21327#include <openssl/evp.h>
21328
21329" "$ac_c_undeclared_builtin_options" "CFLAGS"
21330if test "x$ac_cv_have_decl_OPENSSL_NO_EC" = xyes
21331then :
21332  as_fn_error $? "OpenSSL does not support ECDSA: please upgrade or rerun with --disable-ecdsa" "$LINENO" 5
21333
21334fi
21335
21336else $as_nop
21337
21338		  # without EVP_PKEY_fromdata, older openssl, check for support
21339		  ac_fn_c_check_func "$LINENO" "ECDSA_sign" "ac_cv_func_ECDSA_sign"
21340if test "x$ac_cv_func_ECDSA_sign" = xyes
21341then :
21342
21343else $as_nop
21344  as_fn_error $? "OpenSSL does not support ECDSA: please upgrade or rerun with --disable-ecdsa" "$LINENO" 5
21345fi
21346
21347		  ac_fn_c_check_func "$LINENO" "SHA384_Init" "ac_cv_func_SHA384_Init"
21348if test "x$ac_cv_func_SHA384_Init" = xyes
21349then :
21350
21351else $as_nop
21352  as_fn_error $? "OpenSSL does not support SHA384: please upgrade or rerun with --disable-ecdsa" "$LINENO" 5
21353fi
21354
21355
21356fi
21357
21358	      ac_fn_check_decl "$LINENO" "NID_X9_62_prime256v1" "ac_cv_have_decl_NID_X9_62_prime256v1" "$ac_includes_default
21359#include <openssl/evp.h>
21360
21361" "$ac_c_undeclared_builtin_options" "CFLAGS"
21362if test "x$ac_cv_have_decl_NID_X9_62_prime256v1" = xyes
21363then :
21364  ac_have_decl=1
21365else $as_nop
21366  ac_have_decl=0
21367fi
21368printf "%s\n" "#define HAVE_DECL_NID_X9_62_PRIME256V1 $ac_have_decl" >>confdefs.h
21369if test $ac_have_decl = 1
21370then :
21371
21372else $as_nop
21373  as_fn_error $? "OpenSSL does not support the ECDSA curves: please upgrade or rerun with --disable-ecdsa" "$LINENO" 5
21374fi
21375ac_fn_check_decl "$LINENO" "NID_secp384r1" "ac_cv_have_decl_NID_secp384r1" "$ac_includes_default
21376#include <openssl/evp.h>
21377
21378" "$ac_c_undeclared_builtin_options" "CFLAGS"
21379if test "x$ac_cv_have_decl_NID_secp384r1" = xyes
21380then :
21381  ac_have_decl=1
21382else $as_nop
21383  ac_have_decl=0
21384fi
21385printf "%s\n" "#define HAVE_DECL_NID_SECP384R1 $ac_have_decl" >>confdefs.h
21386if test $ac_have_decl = 1
21387then :
21388
21389else $as_nop
21390  as_fn_error $? "OpenSSL does not support the ECDSA curves: please upgrade or rerun with --disable-ecdsa" "$LINENO" 5
21391fi
21392
21393	      # see if OPENSSL 1.0.0 or later (has EVP MD and Verify independency)
21394	      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if openssl supports SHA2 and ECDSA with EVP" >&5
21395printf %s "checking if openssl supports SHA2 and ECDSA with EVP... " >&6; }
21396	      if grep OPENSSL_VERSION_TEXT $ssldir_include/openssl/opensslv.h | grep "OpenSSL" >/dev/null; then
21397		if grep OPENSSL_VERSION_NUMBER $ssldir_include/openssl/opensslv.h | grep 0x0 >/dev/null; then
21398		  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
21399printf "%s\n" "no" >&6; }
21400
21401printf "%s\n" "#define USE_ECDSA_EVP_WORKAROUND 1" >>confdefs.h
21402
21403		else
21404		  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
21405printf "%s\n" "yes" >&6; }
21406		fi
21407	      else
21408		# not OpenSSL, thus likely LibreSSL, which supports it
21409		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
21410printf "%s\n" "yes" >&6; }
21411	      fi
21412      fi
21413      # we now know we have ECDSA and the required curves.
21414
21415printf "%s\n" "#define USE_ECDSA 1" >>confdefs.h
21416
21417      use_ecdsa="yes"
21418      ;;
21419esac
21420
21421# Check whether --enable-dsa was given.
21422if test ${enable_dsa+y}
21423then :
21424  enableval=$enable_dsa;
21425fi
21426
21427use_dsa="no"
21428case "$enable_dsa" in
21429    yes)
21430      # detect if DSA is supported, and turn it off if not.
21431      if test $USE_NSS = "no" -a $USE_NETTLE = "no"; then
21432      ac_fn_c_check_func "$LINENO" "DSA_SIG_new" "ac_cv_func_DSA_SIG_new"
21433if test "x$ac_cv_func_DSA_SIG_new" = xyes
21434then :
21435
21436      as_ac_Type=`printf "%s\n" "ac_cv_type_DSA_SIG*" | $as_tr_sh`
21437ac_fn_c_check_type "$LINENO" "DSA_SIG*" "$as_ac_Type" "
21438$ac_includes_default
21439#ifdef HAVE_OPENSSL_ERR_H
21440#include <openssl/err.h>
21441#endif
21442
21443#ifdef HAVE_OPENSSL_RAND_H
21444#include <openssl/rand.h>
21445#endif
21446
21447#ifdef HAVE_OPENSSL_CONF_H
21448#include <openssl/conf.h>
21449#endif
21450
21451#ifdef HAVE_OPENSSL_ENGINE_H
21452#include <openssl/engine.h>
21453#endif
21454
21455"
21456if eval test \"x\$"$as_ac_Type"\" = x"yes"
21457then :
21458
21459
21460printf "%s\n" "#define USE_DSA 1" >>confdefs.h
21461
21462
21463else $as_nop
21464  if test "x$enable_dsa" = "xyes"; then as_fn_error $? "OpenSSL does not support DSA and you used --enable-dsa." "$LINENO" 5
21465               fi
21466fi
21467
21468
21469else $as_nop
21470  if test "x$enable_dsa" = "xyes"; then as_fn_error $? "OpenSSL does not support DSA and you used --enable-dsa." "$LINENO" 5
21471               fi
21472fi
21473
21474      else
21475
21476printf "%s\n" "#define USE_DSA 1" >>confdefs.h
21477
21478      fi
21479      ;;
21480    *)
21481      # disable dsa by default, RFC 8624 section 3.1, validators MUST NOT
21482      # support DSA for DNSSEC Validation.
21483      ;;
21484esac
21485
21486
21487# Check whether --with-deprecate-rsa-1024 was given.
21488if test ${with_deprecate_rsa_1024+y}
21489then :
21490  withval=$with_deprecate_rsa_1024;
21491fi
21492
21493if test "$with_deprecate_rsa_1024" = "yes"; then
21494
21495printf "%s\n" "#define DEPRECATE_RSA_1024 1" >>confdefs.h
21496
21497fi
21498
21499# Check whether --enable-ed25519 was given.
21500if test ${enable_ed25519+y}
21501then :
21502  enableval=$enable_ed25519;
21503fi
21504
21505use_ed25519="no"
21506case "$enable_ed25519" in
21507    no)
21508      ;;
21509    *)
21510      if test $USE_NSS = "no" -a $USE_NETTLE = "no"; then
21511	      ac_fn_check_decl "$LINENO" "NID_ED25519" "ac_cv_have_decl_NID_ED25519" "$ac_includes_default
21512#include <openssl/evp.h>
21513
21514" "$ac_c_undeclared_builtin_options" "CFLAGS"
21515if test "x$ac_cv_have_decl_NID_ED25519" = xyes
21516then :
21517  ac_have_decl=1
21518else $as_nop
21519  ac_have_decl=0
21520fi
21521printf "%s\n" "#define HAVE_DECL_NID_ED25519 $ac_have_decl" >>confdefs.h
21522if test $ac_have_decl = 1
21523then :
21524
21525      		use_ed25519="yes"
21526
21527else $as_nop
21528   if test "x$enable_ed25519" = "xyes"; then as_fn_error $? "OpenSSL does not support ED25519 and you used --enable-ed25519." "$LINENO" 5
21529	      	fi
21530fi
21531
21532      fi
21533      if test $USE_NETTLE = "yes"; then
21534		       for ac_header in nettle/eddsa.h
21535do :
21536  ac_fn_c_check_header_compile "$LINENO" "nettle/eddsa.h" "ac_cv_header_nettle_eddsa_h" "$ac_includes_default
21537"
21538if test "x$ac_cv_header_nettle_eddsa_h" = xyes
21539then :
21540  printf "%s\n" "#define HAVE_NETTLE_EDDSA_H 1" >>confdefs.h
21541 use_ed25519="yes"
21542fi
21543
21544done
21545      fi
21546      if test $use_ed25519 = "yes"; then
21547
21548printf "%s\n" "#define USE_ED25519 1" >>confdefs.h
21549
21550      fi
21551      ;;
21552esac
21553
21554# Check whether --enable-ed448 was given.
21555if test ${enable_ed448+y}
21556then :
21557  enableval=$enable_ed448;
21558fi
21559
21560use_ed448="no"
21561case "$enable_ed448" in
21562    no)
21563      ;;
21564    *)
21565      if test $USE_NSS = "no" -a $USE_NETTLE = "no"; then
21566	      ac_fn_check_decl "$LINENO" "NID_ED448" "ac_cv_have_decl_NID_ED448" "$ac_includes_default
21567#include <openssl/evp.h>
21568
21569" "$ac_c_undeclared_builtin_options" "CFLAGS"
21570if test "x$ac_cv_have_decl_NID_ED448" = xyes
21571then :
21572  ac_have_decl=1
21573else $as_nop
21574  ac_have_decl=0
21575fi
21576printf "%s\n" "#define HAVE_DECL_NID_ED448 $ac_have_decl" >>confdefs.h
21577if test $ac_have_decl = 1
21578then :
21579
21580      		use_ed448="yes"
21581
21582else $as_nop
21583   if test "x$enable_ed448" = "xyes"; then as_fn_error $? "OpenSSL does not support ED448 and you used --enable-ed448." "$LINENO" 5
21584	      	fi
21585fi
21586
21587      fi
21588      if test $use_ed448 = "yes"; then
21589
21590printf "%s\n" "#define USE_ED448 1" >>confdefs.h
21591
21592      fi
21593      ;;
21594esac
21595
21596# Check whether --enable-event-api was given.
21597if test ${enable_event_api+y}
21598then :
21599  enableval=$enable_event_api;
21600fi
21601
21602case "$enable_event_api" in
21603    yes)
21604      UNBOUND_EVENT_INSTALL=unbound-event-install
21605
21606      UNBOUND_EVENT_UNINSTALL=unbound-event-uninstall
21607
21608      ;;
21609    *)
21610      ;;
21611esac
21612
21613# Check whether --enable-tfo-client was given.
21614if test ${enable_tfo_client+y}
21615then :
21616  enableval=$enable_tfo_client;
21617fi
21618
21619case "$enable_tfo_client" in
21620	yes)
21621		case "$host_os" in
21622			linux*) ac_fn_check_decl "$LINENO" "MSG_FASTOPEN" "ac_cv_have_decl_MSG_FASTOPEN" "$ac_includes_default
21623#include <netinet/tcp.h>
21624
21625" "$ac_c_undeclared_builtin_options" "CFLAGS"
21626if test "x$ac_cv_have_decl_MSG_FASTOPEN" = xyes
21627then :
21628  { 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
21629printf "%s\n" "$as_me: WARNING: Check the platform specific TFO kernel parameters are correctly configured to support client mode TFO" >&2;}
21630else $as_nop
21631  as_fn_error $? "TCP Fast Open is not available for client mode: please rerun without --enable-tfo-client" "$LINENO" 5
21632fi
21633
21634printf "%s\n" "#define USE_MSG_FASTOPEN 1" >>confdefs.h
21635
21636				;;
21637			darwin*) ac_fn_check_decl "$LINENO" "CONNECT_RESUME_ON_READ_WRITE" "ac_cv_have_decl_CONNECT_RESUME_ON_READ_WRITE" "$ac_includes_default
21638#include <sys/socket.h>
21639
21640" "$ac_c_undeclared_builtin_options" "CFLAGS"
21641if test "x$ac_cv_have_decl_CONNECT_RESUME_ON_READ_WRITE" = xyes
21642then :
21643  { 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
21644printf "%s\n" "$as_me: WARNING: Check the platform specific TFO kernel parameters are correctly configured to support client mode TFO" >&2;}
21645else $as_nop
21646  as_fn_error $? "TCP Fast Open is not available for client mode: please rerun without --enable-tfo-client" "$LINENO" 5
21647fi
21648
21649printf "%s\n" "#define USE_OSX_MSG_FASTOPEN 1" >>confdefs.h
21650
21651				;;
21652		esac
21653		;;
21654	no|*)
21655		;;
21656esac
21657
21658# Check whether --enable-tfo-server was given.
21659if test ${enable_tfo_server+y}
21660then :
21661  enableval=$enable_tfo_server;
21662fi
21663
21664case "$enable_tfo_server" in
21665	yes)
21666	      ac_fn_check_decl "$LINENO" "TCP_FASTOPEN" "ac_cv_have_decl_TCP_FASTOPEN" "$ac_includes_default
21667#include <netinet/tcp.h>
21668
21669" "$ac_c_undeclared_builtin_options" "CFLAGS"
21670if test "x$ac_cv_have_decl_TCP_FASTOPEN" = xyes
21671then :
21672  { 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
21673printf "%s\n" "$as_me: WARNING: Check the platform specific TFO kernel parameters are correctly configured to support server mode TFO" >&2;}
21674else $as_nop
21675  as_fn_error $? "TCP Fast Open is not available for server mode: please rerun without --enable-tfo-server" "$LINENO" 5
21676fi
21677
21678printf "%s\n" "#define USE_TCP_FASTOPEN 1" >>confdefs.h
21679
21680		;;
21681	no|*)
21682		;;
21683esac
21684
21685# check for libevent
21686
21687# Check whether --with-libevent was given.
21688if test ${with_libevent+y}
21689then :
21690  withval=$with_libevent;
21691else $as_nop
21692   with_libevent="no"
21693fi
21694
21695if test "x_$with_libevent" != x_no; then
21696
21697printf "%s\n" "#define USE_LIBEVENT 1" >>confdefs.h
21698
21699        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libevent" >&5
21700printf %s "checking for libevent... " >&6; }
21701        if test "x_$with_libevent" = x_ -o "x_$with_libevent" = x_yes; then
21702            with_libevent="/usr/local /opt/local /usr/lib /usr/pkg /usr/sfw /usr"
21703        fi
21704        for dir in $with_libevent; do
21705            thedir="$dir"
21706            if test -f "$dir/include/event.h" -o -f "$dir/include/event2/event.h"; then
21707                found_libevent="yes"
21708								if test "$thedir" != "/usr"; then
21709				    CPPFLAGS="$CPPFLAGS -I$thedir/include"
21710				fi
21711				break;
21712		    fi
21713        done
21714        if test x_$found_libevent != x_yes; then
21715		if test -f "$dir/event.h" -a \( -f "$dir/libevent.la" -o -f "$dir/libev.la" \) ; then
21716			# libevent source directory
21717			{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: found in $thedir" >&5
21718printf "%s\n" "found in $thedir" >&6; }
21719			CPPFLAGS="$CPPFLAGS -I$thedir -I$thedir/include"
21720			BAK_LDFLAGS_SET="1"
21721			BAK_LDFLAGS="$LDFLAGS"
21722			# remove evdns from linking
21723			mkdir build >/dev/null 2>&1
21724			mkdir build/libevent >/dev/null 2>&1
21725			mkdir build/libevent/.libs >/dev/null 2>&1
21726			ev_files_o=`ls $thedir/*.o | grep -v evdns\.o | grep -v bufferevent_openssl\.o`
21727			ev_files_lo=`ls $thedir/*.lo | grep -v evdns\.lo | grep -v bufferevent_openssl\.lo`
21728			ev_files_libso=`ls $thedir/.libs/*.o | grep -v evdns\.o | grep -v bufferevent_openssl\.o`
21729			cp $ev_files_o build/libevent
21730			cp $ev_files_lo build/libevent
21731			cp $ev_files_libso build/libevent/.libs
21732			LATE_LDFLAGS="build/libevent/*.lo -lm"
21733			LDFLAGS="build/libevent/*.o $LDFLAGS -lm"
21734		else
21735            as_fn_error $? "Cannot find the libevent library in $with_libevent
21736You can restart ./configure --with-libevent=no to use a builtin alternative.
21737Please note that this alternative is not as capable as libevent when using
21738large outgoing port ranges.  " "$LINENO" 5
21739		fi
21740        else
21741            { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: found in $thedir" >&5
21742printf "%s\n" "found in $thedir" >&6; }
21743	    	    if test ! -f $thedir/lib/libevent.a -a ! -f $thedir/lib/libevent.so -a -d "$thedir/lib/event2"; then
21744		    LDFLAGS="$LDFLAGS -L$thedir/lib/event2"
21745
21746	if test "x$enable_rpath" = xyes; then
21747		if echo "$thedir/lib/event2" | grep "^/" >/dev/null; then
21748			RUNTIME_PATH="$RUNTIME_PATH -R$thedir/lib/event2"
21749		fi
21750	fi
21751
21752	    else
21753		    		    if test "$thedir" != "/usr" -a "$thedir" != ""; then
21754			LDFLAGS="$LDFLAGS -L$thedir/lib"
21755
21756	if test "x$enable_rpath" = xyes; then
21757		if echo "$thedir/lib" | grep "^/" >/dev/null; then
21758			RUNTIME_PATH="$RUNTIME_PATH -R$thedir/lib"
21759		fi
21760	fi
21761
21762		    fi
21763	    fi
21764        fi
21765	# check for library used by libevent after 1.3c
21766	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5
21767printf %s "checking for library containing clock_gettime... " >&6; }
21768if test ${ac_cv_search_clock_gettime+y}
21769then :
21770  printf %s "(cached) " >&6
21771else $as_nop
21772  ac_func_search_save_LIBS=$LIBS
21773cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21774/* end confdefs.h.  */
21775
21776/* Override any GCC internal prototype to avoid an error.
21777   Use char because int might match the return type of a GCC
21778   builtin and then its argument prototype would still apply.  */
21779char clock_gettime ();
21780int
21781main (void)
21782{
21783return clock_gettime ();
21784  ;
21785  return 0;
21786}
21787_ACEOF
21788for ac_lib in '' rt
21789do
21790  if test -z "$ac_lib"; then
21791    ac_res="none required"
21792  else
21793    ac_res=-l$ac_lib
21794    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
21795  fi
21796  if ac_fn_c_try_link "$LINENO"
21797then :
21798  ac_cv_search_clock_gettime=$ac_res
21799fi
21800rm -f core conftest.err conftest.$ac_objext conftest.beam \
21801    conftest$ac_exeext
21802  if test ${ac_cv_search_clock_gettime+y}
21803then :
21804  break
21805fi
21806done
21807if test ${ac_cv_search_clock_gettime+y}
21808then :
21809
21810else $as_nop
21811  ac_cv_search_clock_gettime=no
21812fi
21813rm conftest.$ac_ext
21814LIBS=$ac_func_search_save_LIBS
21815fi
21816{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5
21817printf "%s\n" "$ac_cv_search_clock_gettime" >&6; }
21818ac_res=$ac_cv_search_clock_gettime
21819if test "$ac_res" != no
21820then :
21821  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
21822
21823fi
21824
21825
21826	# is the event.h header libev or libevent?
21827	ac_fn_c_check_header_compile "$LINENO" "event.h" "ac_cv_header_event_h" "$ac_includes_default
21828"
21829if test "x$ac_cv_header_event_h" = xyes
21830then :
21831  printf "%s\n" "#define HAVE_EVENT_H 1" >>confdefs.h
21832
21833fi
21834
21835	ac_fn_check_decl "$LINENO" "EV_VERSION_MAJOR" "ac_cv_have_decl_EV_VERSION_MAJOR" "$ac_includes_default
21836#include <event.h>
21837
21838" "$ac_c_undeclared_builtin_options" "CFLAGS"
21839if test "x$ac_cv_have_decl_EV_VERSION_MAJOR" = xyes
21840then :
21841
21842		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing event_set" >&5
21843printf %s "checking for library containing event_set... " >&6; }
21844if test ${ac_cv_search_event_set+y}
21845then :
21846  printf %s "(cached) " >&6
21847else $as_nop
21848  ac_func_search_save_LIBS=$LIBS
21849cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21850/* end confdefs.h.  */
21851
21852/* Override any GCC internal prototype to avoid an error.
21853   Use char because int might match the return type of a GCC
21854   builtin and then its argument prototype would still apply.  */
21855char event_set ();
21856int
21857main (void)
21858{
21859return event_set ();
21860  ;
21861  return 0;
21862}
21863_ACEOF
21864for ac_lib in '' ev
21865do
21866  if test -z "$ac_lib"; then
21867    ac_res="none required"
21868  else
21869    ac_res=-l$ac_lib
21870    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
21871  fi
21872  if ac_fn_c_try_link "$LINENO"
21873then :
21874  ac_cv_search_event_set=$ac_res
21875fi
21876rm -f core conftest.err conftest.$ac_objext conftest.beam \
21877    conftest$ac_exeext
21878  if test ${ac_cv_search_event_set+y}
21879then :
21880  break
21881fi
21882done
21883if test ${ac_cv_search_event_set+y}
21884then :
21885
21886else $as_nop
21887  ac_cv_search_event_set=no
21888fi
21889rm conftest.$ac_ext
21890LIBS=$ac_func_search_save_LIBS
21891fi
21892{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_event_set" >&5
21893printf "%s\n" "$ac_cv_search_event_set" >&6; }
21894ac_res=$ac_cv_search_event_set
21895if test "$ac_res" != no
21896then :
21897  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
21898
21899fi
21900
21901
21902else $as_nop
21903
21904		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing event_set" >&5
21905printf %s "checking for library containing event_set... " >&6; }
21906if test ${ac_cv_search_event_set+y}
21907then :
21908  printf %s "(cached) " >&6
21909else $as_nop
21910  ac_func_search_save_LIBS=$LIBS
21911cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21912/* end confdefs.h.  */
21913
21914/* Override any GCC internal prototype to avoid an error.
21915   Use char because int might match the return type of a GCC
21916   builtin and then its argument prototype would still apply.  */
21917char event_set ();
21918int
21919main (void)
21920{
21921return event_set ();
21922  ;
21923  return 0;
21924}
21925_ACEOF
21926for ac_lib in '' event
21927do
21928  if test -z "$ac_lib"; then
21929    ac_res="none required"
21930  else
21931    ac_res=-l$ac_lib
21932    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
21933  fi
21934  if ac_fn_c_try_link "$LINENO"
21935then :
21936  ac_cv_search_event_set=$ac_res
21937fi
21938rm -f core conftest.err conftest.$ac_objext conftest.beam \
21939    conftest$ac_exeext
21940  if test ${ac_cv_search_event_set+y}
21941then :
21942  break
21943fi
21944done
21945if test ${ac_cv_search_event_set+y}
21946then :
21947
21948else $as_nop
21949  ac_cv_search_event_set=no
21950fi
21951rm conftest.$ac_ext
21952LIBS=$ac_func_search_save_LIBS
21953fi
21954{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_event_set" >&5
21955printf "%s\n" "$ac_cv_search_event_set" >&6; }
21956ac_res=$ac_cv_search_event_set
21957if test "$ac_res" != no
21958then :
21959  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
21960
21961fi
21962
21963
21964fi
21965	ac_fn_c_check_func "$LINENO" "event_base_free" "ac_cv_func_event_base_free"
21966if test "x$ac_cv_func_event_base_free" = xyes
21967then :
21968  printf "%s\n" "#define HAVE_EVENT_BASE_FREE 1" >>confdefs.h
21969
21970fi
21971 # only in libevent 1.2 and later
21972	ac_fn_c_check_func "$LINENO" "event_base_once" "ac_cv_func_event_base_once"
21973if test "x$ac_cv_func_event_base_once" = xyes
21974then :
21975  printf "%s\n" "#define HAVE_EVENT_BASE_ONCE 1" >>confdefs.h
21976
21977fi
21978 # only in libevent 1.4.1 and later
21979	ac_fn_c_check_func "$LINENO" "event_base_new" "ac_cv_func_event_base_new"
21980if test "x$ac_cv_func_event_base_new" = xyes
21981then :
21982  printf "%s\n" "#define HAVE_EVENT_BASE_NEW 1" >>confdefs.h
21983
21984fi
21985 # only in libevent 1.4.1 and later
21986	ac_fn_c_check_func "$LINENO" "event_base_get_method" "ac_cv_func_event_base_get_method"
21987if test "x$ac_cv_func_event_base_get_method" = xyes
21988then :
21989  printf "%s\n" "#define HAVE_EVENT_BASE_GET_METHOD 1" >>confdefs.h
21990
21991fi
21992 # only in libevent 1.4.3 and later
21993	ac_fn_c_check_func "$LINENO" "ev_loop" "ac_cv_func_ev_loop"
21994if test "x$ac_cv_func_ev_loop" = xyes
21995then :
21996  printf "%s\n" "#define HAVE_EV_LOOP 1" >>confdefs.h
21997
21998fi
21999 # only in libev. (tested on 3.51)
22000	ac_fn_c_check_func "$LINENO" "ev_default_loop" "ac_cv_func_ev_default_loop"
22001if test "x$ac_cv_func_ev_default_loop" = xyes
22002then :
22003  printf "%s\n" "#define HAVE_EV_DEFAULT_LOOP 1" >>confdefs.h
22004
22005fi
22006 # only in libev. (tested on 4.00)
22007	ac_fn_c_check_func "$LINENO" "event_assign" "ac_cv_func_event_assign"
22008if test "x$ac_cv_func_event_assign" = xyes
22009then :
22010  printf "%s\n" "#define HAVE_EVENT_ASSIGN 1" >>confdefs.h
22011
22012fi
22013 # in libevent, for thread-safety
22014	ac_fn_check_decl "$LINENO" "evsignal_assign" "ac_cv_have_decl_evsignal_assign" "$ac_includes_default
22015#ifdef HAVE_EVENT_H
22016#  include <event.h>
22017#else
22018#  include \"event2/event.h\"
22019#endif
22020
22021" "$ac_c_undeclared_builtin_options" "CFLAGS"
22022if test "x$ac_cv_have_decl_evsignal_assign" = xyes
22023then :
22024  ac_have_decl=1
22025else $as_nop
22026  ac_have_decl=0
22027fi
22028printf "%s\n" "#define HAVE_DECL_EVSIGNAL_ASSIGN $ac_have_decl" >>confdefs.h
22029
22030        PC_LIBEVENT_DEPENDENCY="libevent"
22031
22032	if test -n "$BAK_LDFLAGS_SET"; then
22033		LDFLAGS="$BAK_LDFLAGS"
22034	fi
22035else
22036
22037printf "%s\n" "#define USE_MINI_EVENT 1" >>confdefs.h
22038
22039fi
22040
22041# check for libexpat
22042
22043# Check whether --with-libexpat was given.
22044if test ${with_libexpat+y}
22045then :
22046  withval=$with_libexpat;
22047else $as_nop
22048   withval="/usr/local /opt/local /usr/lib /usr/pkg /usr/sfw /usr"
22049fi
22050
22051{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libexpat" >&5
22052printf %s "checking for libexpat... " >&6; }
22053found_libexpat="no"
22054for dir in $withval ; do
22055            if test -f "$dir/include/expat.h"; then
22056		found_libexpat="yes"
22057				if test "$dir" != "/usr"; then
22058                    CPPFLAGS="$CPPFLAGS -I$dir/include"
22059		    LDFLAGS="$LDFLAGS -L$dir/lib"
22060		fi
22061            	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: found in $dir" >&5
22062printf "%s\n" "found in $dir" >&6; }
22063                break;
22064            fi
22065done
22066if test x_$found_libexpat != x_yes; then
22067	as_fn_error $? "Could not find libexpat, expat.h" "$LINENO" 5
22068fi
22069ac_fn_c_check_header_compile "$LINENO" "expat.h" "ac_cv_header_expat_h" "$ac_includes_default
22070"
22071if test "x$ac_cv_header_expat_h" = xyes
22072then :
22073  printf "%s\n" "#define HAVE_EXPAT_H 1" >>confdefs.h
22074
22075fi
22076
22077ac_fn_check_decl "$LINENO" "XML_StopParser" "ac_cv_have_decl_XML_StopParser" "$ac_includes_default
22078#include <expat.h>
22079
22080" "$ac_c_undeclared_builtin_options" "CFLAGS"
22081if test "x$ac_cv_have_decl_XML_StopParser" = xyes
22082then :
22083  ac_have_decl=1
22084else $as_nop
22085  ac_have_decl=0
22086fi
22087printf "%s\n" "#define HAVE_DECL_XML_STOPPARSER $ac_have_decl" >>confdefs.h
22088
22089
22090# hiredis (redis C client for cachedb)
22091
22092# Check whether --with-libhiredis was given.
22093if test ${with_libhiredis+y}
22094then :
22095  withval=$with_libhiredis;
22096else $as_nop
22097   withval="no"
22098fi
22099
22100found_libhiredis="no"
22101if test x_$withval = x_yes -o x_$withval != x_no; then
22102   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libhiredis" >&5
22103printf %s "checking for libhiredis... " >&6; }
22104   if test x_$withval = x_ -o x_$withval = x_yes; then
22105            withval="/usr/local /opt/local /usr/lib /usr/pkg /usr/sfw /usr"
22106   fi
22107   for dir in $withval ; do
22108            if test -f "$dir/include/hiredis/hiredis.h"; then
22109		found_libhiredis="yes"
22110				if test "$dir" != "/usr"; then
22111                    CPPFLAGS="$CPPFLAGS -I$dir/include"
22112		    LDFLAGS="$LDFLAGS -L$dir/lib"
22113		fi
22114		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: found in $dir" >&5
22115printf "%s\n" "found in $dir" >&6; }
22116
22117printf "%s\n" "#define USE_REDIS 1" >>confdefs.h
22118
22119		LIBS="$LIBS -lhiredis"
22120                break;
22121            fi
22122    done
22123    if test x_$found_libhiredis != x_yes; then
22124	as_fn_error $? "Could not find libhiredis, hiredis.h" "$LINENO" 5
22125    fi
22126    ac_fn_c_check_header_compile "$LINENO" "hiredis/hiredis.h" "ac_cv_header_hiredis_hiredis_h" "$ac_includes_default
22127"
22128if test "x$ac_cv_header_hiredis_hiredis_h" = xyes
22129then :
22130  printf "%s\n" "#define HAVE_HIREDIS_HIREDIS_H 1" >>confdefs.h
22131
22132fi
22133
22134    ac_fn_check_decl "$LINENO" "redisConnect" "ac_cv_have_decl_redisConnect" "$ac_includes_default
22135    #include <hiredis/hiredis.h>
22136
22137" "$ac_c_undeclared_builtin_options" "CFLAGS"
22138if test "x$ac_cv_have_decl_redisConnect" = xyes
22139then :
22140  ac_have_decl=1
22141else $as_nop
22142  ac_have_decl=0
22143fi
22144printf "%s\n" "#define HAVE_DECL_REDISCONNECT $ac_have_decl" >>confdefs.h
22145
22146fi
22147
22148# nghttp2
22149
22150# Check whether --with-libnghttp2 was given.
22151if test ${with_libnghttp2+y}
22152then :
22153  withval=$with_libnghttp2;
22154else $as_nop
22155   withval="no"
22156fi
22157
22158found_libnghttp2="no"
22159if test x_$withval = x_yes -o x_$withval != x_no; then
22160   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libnghttp2" >&5
22161printf %s "checking for libnghttp2... " >&6; }
22162   if test x_$withval = x_ -o x_$withval = x_yes; then
22163            withval="/usr/local /opt/local /usr/lib /usr/pkg /usr/sfw /usr"
22164   fi
22165   for dir in $withval ; do
22166            if test -f "$dir/include/nghttp2/nghttp2.h"; then
22167		found_libnghttp2="yes"
22168				if test "$dir" != "/usr"; then
22169                    CPPFLAGS="$CPPFLAGS -I$dir/include"
22170		    LDFLAGS="$LDFLAGS -L$dir/lib"
22171		fi
22172		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: found in $dir" >&5
22173printf "%s\n" "found in $dir" >&6; }
22174
22175printf "%s\n" "#define HAVE_NGHTTP2 1" >>confdefs.h
22176
22177		LIBS="$LIBS -lnghttp2"
22178                break;
22179            fi
22180    done
22181    if test x_$found_libnghttp2 != x_yes; then
22182	as_fn_error $? "Could not find libnghttp2, nghttp2.h" "$LINENO" 5
22183    fi
22184    ac_fn_c_check_header_compile "$LINENO" "nghttp2/nghttp2.h" "ac_cv_header_nghttp2_nghttp2_h" "$ac_includes_default
22185"
22186if test "x$ac_cv_header_nghttp2_nghttp2_h" = xyes
22187then :
22188  printf "%s\n" "#define HAVE_NGHTTP2_NGHTTP2_H 1" >>confdefs.h
22189
22190fi
22191
22192    ac_fn_check_decl "$LINENO" "nghttp2_session_server_new" "ac_cv_have_decl_nghttp2_session_server_new" "$ac_includes_default
22193    #include <nghttp2/nghttp2.h>
22194
22195" "$ac_c_undeclared_builtin_options" "CFLAGS"
22196if test "x$ac_cv_have_decl_nghttp2_session_server_new" = xyes
22197then :
22198  ac_have_decl=1
22199else $as_nop
22200  ac_have_decl=0
22201fi
22202printf "%s\n" "#define HAVE_DECL_NGHTTP2_SESSION_SERVER_NEW $ac_have_decl" >>confdefs.h
22203
22204fi
22205
22206# set static linking for uninstalled libraries if requested
22207
22208staticexe=""
22209# Check whether --enable-static-exe was given.
22210if test ${enable_static_exe+y}
22211then :
22212  enableval=$enable_static_exe;
22213fi
22214
22215if test x_$enable_static_exe = x_yes; then
22216	staticexe="-static"
22217	if test "$on_mingw" = yes; then
22218		staticexe="-all-static"
22219		# for static compile, include gdi32 and zlib here.
22220		if echo "$LIBS" | grep 'lgdi32' >/dev/null; then
22221			:
22222		else
22223			LIBS="$LIBS -lgdi32"
22224		fi
22225		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
22226printf %s "checking for compress in -lz... " >&6; }
22227if test ${ac_cv_lib_z_compress+y}
22228then :
22229  printf %s "(cached) " >&6
22230else $as_nop
22231  ac_check_lib_save_LIBS=$LIBS
22232LIBS="-lz  $LIBS"
22233cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22234/* end confdefs.h.  */
22235
22236/* Override any GCC internal prototype to avoid an error.
22237   Use char because int might match the return type of a GCC
22238   builtin and then its argument prototype would still apply.  */
22239char compress ();
22240int
22241main (void)
22242{
22243return compress ();
22244  ;
22245  return 0;
22246}
22247_ACEOF
22248if ac_fn_c_try_link "$LINENO"
22249then :
22250  ac_cv_lib_z_compress=yes
22251else $as_nop
22252  ac_cv_lib_z_compress=no
22253fi
22254rm -f core conftest.err conftest.$ac_objext conftest.beam \
22255    conftest$ac_exeext conftest.$ac_ext
22256LIBS=$ac_check_lib_save_LIBS
22257fi
22258{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
22259printf "%s\n" "$ac_cv_lib_z_compress" >&6; }
22260if test "x$ac_cv_lib_z_compress" = xyes
22261then :
22262   LIBS="$LIBS -lz"
22263fi
22264
22265		if echo "$LIBS" | grep -e "libssp.a" -e "lssp" >/dev/null; then
22266			:
22267		else
22268			LIBS="$LIBS -l:libssp.a"
22269		fi
22270	fi
22271fi
22272
22273# set full static linking if requested
22274# Check whether --enable-fully-static was given.
22275if test ${enable_fully_static+y}
22276then :
22277  enableval=$enable_fully_static;
22278fi
22279
22280if test x_$enable_fully_static = x_yes; then
22281	staticexe="-all-static"
22282	if test "$on_mingw" = yes; then
22283		# for static compile, include gdi32 and zlib here.
22284		if echo $LIBS | grep 'lgdi32' >/dev/null; then
22285			:
22286		else
22287			LIBS="$LIBS -lgdi32"
22288		fi
22289		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
22290printf %s "checking for compress in -lz... " >&6; }
22291if test ${ac_cv_lib_z_compress+y}
22292then :
22293  printf %s "(cached) " >&6
22294else $as_nop
22295  ac_check_lib_save_LIBS=$LIBS
22296LIBS="-lz  $LIBS"
22297cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22298/* end confdefs.h.  */
22299
22300/* Override any GCC internal prototype to avoid an error.
22301   Use char because int might match the return type of a GCC
22302   builtin and then its argument prototype would still apply.  */
22303char compress ();
22304int
22305main (void)
22306{
22307return compress ();
22308  ;
22309  return 0;
22310}
22311_ACEOF
22312if ac_fn_c_try_link "$LINENO"
22313then :
22314  ac_cv_lib_z_compress=yes
22315else $as_nop
22316  ac_cv_lib_z_compress=no
22317fi
22318rm -f core conftest.err conftest.$ac_objext conftest.beam \
22319    conftest$ac_exeext conftest.$ac_ext
22320LIBS=$ac_check_lib_save_LIBS
22321fi
22322{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
22323printf "%s\n" "$ac_cv_lib_z_compress" >&6; }
22324if test "x$ac_cv_lib_z_compress" = xyes
22325then :
22326   LIBS="$LIBS -lz"
22327fi
22328
22329		if echo "$LIBS" | grep -e "libssp.a" -e "lssp" >/dev/null; then
22330			:
22331		else
22332			LIBS="$LIBS -l:libssp.a"
22333		fi
22334	fi
22335fi
22336
22337# set lock checking if requested
22338# Check whether --enable-lock_checks was given.
22339if test ${enable_lock_checks+y}
22340then :
22341  enableval=$enable_lock_checks;
22342fi
22343
22344if test x_$enable_lock_checks = x_yes; then
22345
22346printf "%s\n" "#define ENABLE_LOCK_CHECKS 1" >>confdefs.h
22347
22348	CHECKLOCK_OBJ="checklocks.lo"
22349
22350fi
22351
22352
22353{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
22354printf %s "checking for getaddrinfo... " >&6; }
22355ac_cv_func_getaddrinfo=no
22356cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22357/* end confdefs.h.  */
22358
22359#ifdef __cplusplus
22360extern "C"
22361{
22362#endif
22363char* getaddrinfo();
22364char* (*f) () = getaddrinfo;
22365#ifdef __cplusplus
22366}
22367#endif
22368int main(void) {
22369        ;
22370        return 0;
22371}
22372
22373_ACEOF
22374if ac_fn_c_try_link "$LINENO"
22375then :
22376  ac_cv_func_getaddrinfo="yes"
22377if test "$ac_cv_header_windows_h" = "yes"; then
22378
22379printf "%s\n" "#define USE_WINSOCK 1" >>confdefs.h
22380
22381	USE_WINSOCK="1"
22382	if echo "$LIBS" | grep 'lws2_32' >/dev/null; then
22383		:
22384	else
22385		LIBS="$LIBS -lws2_32"
22386	fi
22387fi
22388
22389else $as_nop
22390  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22391/* end confdefs.h.  */
22392
22393#ifdef HAVE_WS2TCPIP_H
22394#include <ws2tcpip.h>
22395#endif
22396
22397int
22398main (void)
22399{
22400
22401        (void)getaddrinfo(NULL, NULL, NULL, NULL);
22402
22403
22404  ;
22405  return 0;
22406}
22407_ACEOF
22408if ac_fn_c_try_link "$LINENO"
22409then :
22410
22411ac_cv_func_getaddrinfo="yes"
22412
22413printf "%s\n" "#define USE_WINSOCK 1" >>confdefs.h
22414
22415USE_WINSOCK="1"
22416
22417else $as_nop
22418  ORIGLIBS="$LIBS"
22419LIBS="$LIBS -lws2_32"
22420cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22421/* end confdefs.h.  */
22422
22423#ifdef HAVE_WS2TCPIP_H
22424#include <ws2tcpip.h>
22425#endif
22426
22427int
22428main (void)
22429{
22430
22431        (void)getaddrinfo(NULL, NULL, NULL, NULL);
22432
22433
22434  ;
22435  return 0;
22436}
22437_ACEOF
22438if ac_fn_c_try_link "$LINENO"
22439then :
22440
22441ac_cv_func_getaddrinfo="yes"
22442
22443printf "%s\n" "#define USE_WINSOCK 1" >>confdefs.h
22444
22445USE_WINSOCK="1"
22446
22447else $as_nop
22448
22449ac_cv_func_getaddrinfo="no"
22450LIBS="$ORIGLIBS"
22451
22452fi
22453rm -f core conftest.err conftest.$ac_objext conftest.beam \
22454    conftest$ac_exeext conftest.$ac_ext
22455
22456fi
22457rm -f core conftest.err conftest.$ac_objext conftest.beam \
22458    conftest$ac_exeext conftest.$ac_ext
22459
22460fi
22461rm -f core conftest.err conftest.$ac_objext conftest.beam \
22462    conftest$ac_exeext conftest.$ac_ext
22463
22464{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_getaddrinfo" >&5
22465printf "%s\n" "$ac_cv_func_getaddrinfo" >&6; }
22466if test $ac_cv_func_getaddrinfo = yes; then
22467
22468printf "%s\n" "#define HAVE_GETADDRINFO 1" >>confdefs.h
22469
22470fi
22471
22472if test "$USE_WINSOCK" = 1; then
22473
22474printf "%s\n" "#define UB_ON_WINDOWS 1" >>confdefs.h
22475
22476	ac_fn_c_check_header_compile "$LINENO" "iphlpapi.h" "ac_cv_header_iphlpapi_h" "$ac_includes_default
22477#include <windows.h>
22478
22479"
22480if test "x$ac_cv_header_iphlpapi_h" = xyes
22481then :
22482  printf "%s\n" "#define HAVE_IPHLPAPI_H 1" >>confdefs.h
22483
22484fi
22485
22486	if test -n "$ac_tool_prefix"; then
22487  # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
22488set dummy ${ac_tool_prefix}windres; ac_word=$2
22489{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22490printf %s "checking for $ac_word... " >&6; }
22491if test ${ac_cv_prog_WINDRES+y}
22492then :
22493  printf %s "(cached) " >&6
22494else $as_nop
22495  if test -n "$WINDRES"; then
22496  ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
22497else
22498as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22499for as_dir in $PATH
22500do
22501  IFS=$as_save_IFS
22502  case $as_dir in #(((
22503    '') as_dir=./ ;;
22504    */) ;;
22505    *) as_dir=$as_dir/ ;;
22506  esac
22507    for ac_exec_ext in '' $ac_executable_extensions; do
22508  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
22509    ac_cv_prog_WINDRES="${ac_tool_prefix}windres"
22510    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
22511    break 2
22512  fi
22513done
22514  done
22515IFS=$as_save_IFS
22516
22517fi
22518fi
22519WINDRES=$ac_cv_prog_WINDRES
22520if test -n "$WINDRES"; then
22521  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $WINDRES" >&5
22522printf "%s\n" "$WINDRES" >&6; }
22523else
22524  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
22525printf "%s\n" "no" >&6; }
22526fi
22527
22528
22529fi
22530if test -z "$ac_cv_prog_WINDRES"; then
22531  ac_ct_WINDRES=$WINDRES
22532  # Extract the first word of "windres", so it can be a program name with args.
22533set dummy windres; ac_word=$2
22534{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22535printf %s "checking for $ac_word... " >&6; }
22536if test ${ac_cv_prog_ac_ct_WINDRES+y}
22537then :
22538  printf %s "(cached) " >&6
22539else $as_nop
22540  if test -n "$ac_ct_WINDRES"; then
22541  ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # Let the user override the test.
22542else
22543as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22544for as_dir in $PATH
22545do
22546  IFS=$as_save_IFS
22547  case $as_dir in #(((
22548    '') as_dir=./ ;;
22549    */) ;;
22550    *) as_dir=$as_dir/ ;;
22551  esac
22552    for ac_exec_ext in '' $ac_executable_extensions; do
22553  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
22554    ac_cv_prog_ac_ct_WINDRES="windres"
22555    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
22556    break 2
22557  fi
22558done
22559  done
22560IFS=$as_save_IFS
22561
22562fi
22563fi
22564ac_ct_WINDRES=$ac_cv_prog_ac_ct_WINDRES
22565if test -n "$ac_ct_WINDRES"; then
22566  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_WINDRES" >&5
22567printf "%s\n" "$ac_ct_WINDRES" >&6; }
22568else
22569  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
22570printf "%s\n" "no" >&6; }
22571fi
22572
22573  if test "x$ac_ct_WINDRES" = x; then
22574    WINDRES=""
22575  else
22576    case $cross_compiling:$ac_tool_warned in
22577yes:)
22578{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
22579printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
22580ac_tool_warned=yes ;;
22581esac
22582    WINDRES=$ac_ct_WINDRES
22583  fi
22584else
22585  WINDRES="$ac_cv_prog_WINDRES"
22586fi
22587
22588	if echo "$LIBS" | grep crypt32 >/dev/null; then
22589		LIBS="$LIBS -liphlpapi"
22590	else
22591		LIBS="$LIBS -liphlpapi -lcrypt32"
22592	fi
22593	WINAPPS="unbound-service-install.exe unbound-service-remove.exe anchor-update.exe"
22594
22595	WIN_DAEMON_SRC="winrc/win_svc.c winrc/w_inst.c"
22596
22597	WIN_DAEMON_OBJ="win_svc.lo w_inst.lo"
22598
22599	WIN_DAEMON_OBJ_LINK="rsrc_unbound.o"
22600
22601	WIN_HOST_OBJ_LINK="rsrc_unbound_host.o"
22602
22603	WIN_UBANCHOR_OBJ_LINK="rsrc_unbound_anchor.o log.lo locks.lo"
22604
22605	WIN_CONTROL_OBJ_LINK="rsrc_unbound_control.o"
22606
22607	WIN_CHECKCONF_OBJ_LINK="rsrc_unbound_checkconf.o"
22608
22609
22610printf "%s\n" "#define __USE_MINGW_ANSI_STDIO 1" >>confdefs.h
22611
22612fi
22613if test $ac_cv_func_getaddrinfo = no; then
22614	case " $LIBOBJS " in
22615  *" fake-rfc2553.$ac_objext "* ) ;;
22616  *) LIBOBJS="$LIBOBJS fake-rfc2553.$ac_objext"
22617 ;;
22618esac
22619
22620fi
22621# check after getaddrinfo for its libraries
22622
22623# check ioctlsocket
22624{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ioctlsocket" >&5
22625printf %s "checking for ioctlsocket... " >&6; }
22626cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22627/* end confdefs.h.  */
22628
22629#ifdef HAVE_WINSOCK2_H
22630#include <winsock2.h>
22631#endif
22632
22633int
22634main (void)
22635{
22636
22637	(void)ioctlsocket(0, 0, NULL);
22638
22639  ;
22640  return 0;
22641}
22642_ACEOF
22643if ac_fn_c_try_link "$LINENO"
22644then :
22645
22646{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
22647printf "%s\n" "yes" >&6; }
22648
22649printf "%s\n" "#define HAVE_IOCTLSOCKET 1" >>confdefs.h
22650
22651
22652else $as_nop
22653  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
22654printf "%s\n" "no" >&6; }
22655fi
22656rm -f core conftest.err conftest.$ac_objext conftest.beam \
22657    conftest$ac_exeext conftest.$ac_ext
22658
22659
22660# see if daemon(3) exists, and if it is deprecated.
22661ac_fn_c_check_func "$LINENO" "daemon" "ac_cv_func_daemon"
22662if test "x$ac_cv_func_daemon" = xyes
22663then :
22664  printf "%s\n" "#define HAVE_DAEMON 1" >>confdefs.h
22665
22666fi
22667
22668if test $ac_cv_func_daemon = yes; then
22669
22670
22671{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if daemon is deprecated" >&5
22672printf %s "checking if daemon is deprecated... " >&6; }
22673cache=`echo daemon | sed 'y%.=/+-%___p_%'`
22674if eval test \${cv_cc_deprecated_$cache+y}
22675then :
22676  printf %s "(cached) " >&6
22677else $as_nop
22678
22679echo '
22680#include <stdlib.h>
22681#include <unistd.h>
22682' >conftest.c
22683echo 'void f(void){ (void)daemon(0, 0); }' >>conftest.c
22684if test -z "`$CC $CPPFLAGS $CFLAGS -c conftest.c 2>&1 | grep -e deprecated -e unavailable`"; then
22685eval "cv_cc_deprecated_$cache=no"
22686else
22687eval "cv_cc_deprecated_$cache=yes"
22688fi
22689rm -f conftest conftest.o conftest.c
22690
22691fi
22692
22693if eval "test \"`echo '$cv_cc_deprecated_'$cache`\" = yes"; then
22694{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
22695printf "%s\n" "yes" >&6; }
22696
22697printf "%s\n" "#define DEPRECATED_DAEMON 1" >>confdefs.h
22698
22699:
22700
22701else
22702{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
22703printf "%s\n" "no" >&6; }
22704:
22705
22706fi
22707
22708fi
22709
22710ac_fn_c_check_member "$LINENO" "struct sockaddr_un" "sun_len" "ac_cv_member_struct_sockaddr_un_sun_len" "
22711$ac_includes_default
22712#ifdef HAVE_SYS_UN_H
22713#include <sys/un.h>
22714#endif
22715
22716"
22717if test "x$ac_cv_member_struct_sockaddr_un_sun_len" = xyes
22718then :
22719
22720printf "%s\n" "#define HAVE_STRUCT_SOCKADDR_UN_SUN_LEN 1" >>confdefs.h
22721
22722
22723fi
22724
22725ac_fn_c_check_member "$LINENO" "struct in_pktinfo" "ipi_spec_dst" "ac_cv_member_struct_in_pktinfo_ipi_spec_dst" "
22726$ac_includes_default
22727#if HAVE_SYS_PARAM_H
22728#include <sys/param.h>
22729#endif
22730
22731#ifdef HAVE_SYS_SOCKET_H
22732#include <sys/socket.h>
22733#endif
22734
22735#ifdef HAVE_SYS_UIO_H
22736#include <sys/uio.h>
22737#endif
22738
22739#ifdef HAVE_NETINET_IN_H
22740#include <netinet/in.h>
22741#endif
22742
22743#ifdef HAVE_NETINET_TCP_H
22744#include <netinet/tcp.h>
22745#endif
22746
22747#ifdef HAVE_ARPA_INET_H
22748#include <arpa/inet.h>
22749#endif
22750
22751#ifdef HAVE_WINSOCK2_H
22752#include <winsock2.h>
22753#endif
22754
22755#ifdef HAVE_WS2TCPIP_H
22756#include <ws2tcpip.h>
22757#endif
22758
22759"
22760if test "x$ac_cv_member_struct_in_pktinfo_ipi_spec_dst" = xyes
22761then :
22762
22763printf "%s\n" "#define HAVE_STRUCT_IN_PKTINFO_IPI_SPEC_DST 1" >>confdefs.h
22764
22765
22766fi
22767
22768
22769{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for htobe64" >&5
22770printf %s "checking for htobe64... " >&6; }
22771cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22772/* end confdefs.h.  */
22773
22774#include <stdio.h>
22775#ifdef HAVE_ENDIAN_H
22776#  include <endian.h>
22777#endif
22778#ifdef HAVE_SYS_ENDIAN_H
22779#  include <sys/endian.h>
22780#endif
22781
22782int
22783main (void)
22784{
22785unsigned long long x = htobe64(0); printf("%u", (unsigned)x);
22786  ;
22787  return 0;
22788}
22789_ACEOF
22790if ac_fn_c_try_link "$LINENO"
22791then :
22792  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
22793printf "%s\n" "yes" >&6; }
22794
22795printf "%s\n" "#define HAVE_HTOBE64 1" >>confdefs.h
22796
22797else $as_nop
22798  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
22799printf "%s\n" "no" >&6; }
22800fi
22801rm -f core conftest.err conftest.$ac_objext conftest.beam \
22802    conftest$ac_exeext conftest.$ac_ext
22803
22804{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for be64toh" >&5
22805printf %s "checking for be64toh... " >&6; }
22806cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22807/* end confdefs.h.  */
22808
22809#include <stdio.h>
22810#ifdef HAVE_ENDIAN_H
22811#  include <endian.h>
22812#endif
22813#ifdef HAVE_SYS_ENDIAN_H
22814#  include <sys/endian.h>
22815#endif
22816
22817int
22818main (void)
22819{
22820unsigned long long x = be64toh(0); printf("%u", (unsigned)x);
22821  ;
22822  return 0;
22823}
22824_ACEOF
22825if ac_fn_c_try_link "$LINENO"
22826then :
22827  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
22828printf "%s\n" "yes" >&6; }
22829
22830printf "%s\n" "#define HAVE_BE64TOH 1" >>confdefs.h
22831
22832else $as_nop
22833  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
22834printf "%s\n" "no" >&6; }
22835fi
22836rm -f core conftest.err conftest.$ac_objext conftest.beam \
22837    conftest$ac_exeext conftest.$ac_ext
22838
22839{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing setusercontext" >&5
22840printf %s "checking for library containing setusercontext... " >&6; }
22841if test ${ac_cv_search_setusercontext+y}
22842then :
22843  printf %s "(cached) " >&6
22844else $as_nop
22845  ac_func_search_save_LIBS=$LIBS
22846cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22847/* end confdefs.h.  */
22848
22849/* Override any GCC internal prototype to avoid an error.
22850   Use char because int might match the return type of a GCC
22851   builtin and then its argument prototype would still apply.  */
22852char setusercontext ();
22853int
22854main (void)
22855{
22856return setusercontext ();
22857  ;
22858  return 0;
22859}
22860_ACEOF
22861for ac_lib in '' util
22862do
22863  if test -z "$ac_lib"; then
22864    ac_res="none required"
22865  else
22866    ac_res=-l$ac_lib
22867    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
22868  fi
22869  if ac_fn_c_try_link "$LINENO"
22870then :
22871  ac_cv_search_setusercontext=$ac_res
22872fi
22873rm -f core conftest.err conftest.$ac_objext conftest.beam \
22874    conftest$ac_exeext
22875  if test ${ac_cv_search_setusercontext+y}
22876then :
22877  break
22878fi
22879done
22880if test ${ac_cv_search_setusercontext+y}
22881then :
22882
22883else $as_nop
22884  ac_cv_search_setusercontext=no
22885fi
22886rm conftest.$ac_ext
22887LIBS=$ac_func_search_save_LIBS
22888fi
22889{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_setusercontext" >&5
22890printf "%s\n" "$ac_cv_search_setusercontext" >&6; }
22891ac_res=$ac_cv_search_setusercontext
22892if test "$ac_res" != no
22893then :
22894  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
22895
22896fi
22897
22898ac_fn_c_check_func "$LINENO" "tzset" "ac_cv_func_tzset"
22899if test "x$ac_cv_func_tzset" = xyes
22900then :
22901  printf "%s\n" "#define HAVE_TZSET 1" >>confdefs.h
22902
22903fi
22904ac_fn_c_check_func "$LINENO" "sigprocmask" "ac_cv_func_sigprocmask"
22905if test "x$ac_cv_func_sigprocmask" = xyes
22906then :
22907  printf "%s\n" "#define HAVE_SIGPROCMASK 1" >>confdefs.h
22908
22909fi
22910ac_fn_c_check_func "$LINENO" "fcntl" "ac_cv_func_fcntl"
22911if test "x$ac_cv_func_fcntl" = xyes
22912then :
22913  printf "%s\n" "#define HAVE_FCNTL 1" >>confdefs.h
22914
22915fi
22916ac_fn_c_check_func "$LINENO" "getpwnam" "ac_cv_func_getpwnam"
22917if test "x$ac_cv_func_getpwnam" = xyes
22918then :
22919  printf "%s\n" "#define HAVE_GETPWNAM 1" >>confdefs.h
22920
22921fi
22922ac_fn_c_check_func "$LINENO" "endpwent" "ac_cv_func_endpwent"
22923if test "x$ac_cv_func_endpwent" = xyes
22924then :
22925  printf "%s\n" "#define HAVE_ENDPWENT 1" >>confdefs.h
22926
22927fi
22928ac_fn_c_check_func "$LINENO" "getrlimit" "ac_cv_func_getrlimit"
22929if test "x$ac_cv_func_getrlimit" = xyes
22930then :
22931  printf "%s\n" "#define HAVE_GETRLIMIT 1" >>confdefs.h
22932
22933fi
22934ac_fn_c_check_func "$LINENO" "setrlimit" "ac_cv_func_setrlimit"
22935if test "x$ac_cv_func_setrlimit" = xyes
22936then :
22937  printf "%s\n" "#define HAVE_SETRLIMIT 1" >>confdefs.h
22938
22939fi
22940ac_fn_c_check_func "$LINENO" "setsid" "ac_cv_func_setsid"
22941if test "x$ac_cv_func_setsid" = xyes
22942then :
22943  printf "%s\n" "#define HAVE_SETSID 1" >>confdefs.h
22944
22945fi
22946ac_fn_c_check_func "$LINENO" "chroot" "ac_cv_func_chroot"
22947if test "x$ac_cv_func_chroot" = xyes
22948then :
22949  printf "%s\n" "#define HAVE_CHROOT 1" >>confdefs.h
22950
22951fi
22952ac_fn_c_check_func "$LINENO" "kill" "ac_cv_func_kill"
22953if test "x$ac_cv_func_kill" = xyes
22954then :
22955  printf "%s\n" "#define HAVE_KILL 1" >>confdefs.h
22956
22957fi
22958ac_fn_c_check_func "$LINENO" "chown" "ac_cv_func_chown"
22959if test "x$ac_cv_func_chown" = xyes
22960then :
22961  printf "%s\n" "#define HAVE_CHOWN 1" >>confdefs.h
22962
22963fi
22964ac_fn_c_check_func "$LINENO" "sleep" "ac_cv_func_sleep"
22965if test "x$ac_cv_func_sleep" = xyes
22966then :
22967  printf "%s\n" "#define HAVE_SLEEP 1" >>confdefs.h
22968
22969fi
22970ac_fn_c_check_func "$LINENO" "usleep" "ac_cv_func_usleep"
22971if test "x$ac_cv_func_usleep" = xyes
22972then :
22973  printf "%s\n" "#define HAVE_USLEEP 1" >>confdefs.h
22974
22975fi
22976ac_fn_c_check_func "$LINENO" "random" "ac_cv_func_random"
22977if test "x$ac_cv_func_random" = xyes
22978then :
22979  printf "%s\n" "#define HAVE_RANDOM 1" >>confdefs.h
22980
22981fi
22982ac_fn_c_check_func "$LINENO" "srandom" "ac_cv_func_srandom"
22983if test "x$ac_cv_func_srandom" = xyes
22984then :
22985  printf "%s\n" "#define HAVE_SRANDOM 1" >>confdefs.h
22986
22987fi
22988ac_fn_c_check_func "$LINENO" "recvmsg" "ac_cv_func_recvmsg"
22989if test "x$ac_cv_func_recvmsg" = xyes
22990then :
22991  printf "%s\n" "#define HAVE_RECVMSG 1" >>confdefs.h
22992
22993fi
22994ac_fn_c_check_func "$LINENO" "sendmsg" "ac_cv_func_sendmsg"
22995if test "x$ac_cv_func_sendmsg" = xyes
22996then :
22997  printf "%s\n" "#define HAVE_SENDMSG 1" >>confdefs.h
22998
22999fi
23000ac_fn_c_check_func "$LINENO" "writev" "ac_cv_func_writev"
23001if test "x$ac_cv_func_writev" = xyes
23002then :
23003  printf "%s\n" "#define HAVE_WRITEV 1" >>confdefs.h
23004
23005fi
23006ac_fn_c_check_func "$LINENO" "socketpair" "ac_cv_func_socketpair"
23007if test "x$ac_cv_func_socketpair" = xyes
23008then :
23009  printf "%s\n" "#define HAVE_SOCKETPAIR 1" >>confdefs.h
23010
23011fi
23012ac_fn_c_check_func "$LINENO" "glob" "ac_cv_func_glob"
23013if test "x$ac_cv_func_glob" = xyes
23014then :
23015  printf "%s\n" "#define HAVE_GLOB 1" >>confdefs.h
23016
23017fi
23018ac_fn_c_check_func "$LINENO" "initgroups" "ac_cv_func_initgroups"
23019if test "x$ac_cv_func_initgroups" = xyes
23020then :
23021  printf "%s\n" "#define HAVE_INITGROUPS 1" >>confdefs.h
23022
23023fi
23024ac_fn_c_check_func "$LINENO" "strftime" "ac_cv_func_strftime"
23025if test "x$ac_cv_func_strftime" = xyes
23026then :
23027  printf "%s\n" "#define HAVE_STRFTIME 1" >>confdefs.h
23028
23029fi
23030ac_fn_c_check_func "$LINENO" "localtime_r" "ac_cv_func_localtime_r"
23031if test "x$ac_cv_func_localtime_r" = xyes
23032then :
23033  printf "%s\n" "#define HAVE_LOCALTIME_R 1" >>confdefs.h
23034
23035fi
23036ac_fn_c_check_func "$LINENO" "setusercontext" "ac_cv_func_setusercontext"
23037if test "x$ac_cv_func_setusercontext" = xyes
23038then :
23039  printf "%s\n" "#define HAVE_SETUSERCONTEXT 1" >>confdefs.h
23040
23041fi
23042ac_fn_c_check_func "$LINENO" "_beginthreadex" "ac_cv_func__beginthreadex"
23043if test "x$ac_cv_func__beginthreadex" = xyes
23044then :
23045  printf "%s\n" "#define HAVE__BEGINTHREADEX 1" >>confdefs.h
23046
23047fi
23048ac_fn_c_check_func "$LINENO" "endservent" "ac_cv_func_endservent"
23049if test "x$ac_cv_func_endservent" = xyes
23050then :
23051  printf "%s\n" "#define HAVE_ENDSERVENT 1" >>confdefs.h
23052
23053fi
23054ac_fn_c_check_func "$LINENO" "endprotoent" "ac_cv_func_endprotoent"
23055if test "x$ac_cv_func_endprotoent" = xyes
23056then :
23057  printf "%s\n" "#define HAVE_ENDPROTOENT 1" >>confdefs.h
23058
23059fi
23060ac_fn_c_check_func "$LINENO" "fsync" "ac_cv_func_fsync"
23061if test "x$ac_cv_func_fsync" = xyes
23062then :
23063  printf "%s\n" "#define HAVE_FSYNC 1" >>confdefs.h
23064
23065fi
23066ac_fn_c_check_func "$LINENO" "shmget" "ac_cv_func_shmget"
23067if test "x$ac_cv_func_shmget" = xyes
23068then :
23069  printf "%s\n" "#define HAVE_SHMGET 1" >>confdefs.h
23070
23071fi
23072ac_fn_c_check_func "$LINENO" "accept4" "ac_cv_func_accept4"
23073if test "x$ac_cv_func_accept4" = xyes
23074then :
23075  printf "%s\n" "#define HAVE_ACCEPT4 1" >>confdefs.h
23076
23077fi
23078ac_fn_c_check_func "$LINENO" "getifaddrs" "ac_cv_func_getifaddrs"
23079if test "x$ac_cv_func_getifaddrs" = xyes
23080then :
23081  printf "%s\n" "#define HAVE_GETIFADDRS 1" >>confdefs.h
23082
23083fi
23084ac_fn_c_check_func "$LINENO" "if_nametoindex" "ac_cv_func_if_nametoindex"
23085if test "x$ac_cv_func_if_nametoindex" = xyes
23086then :
23087  printf "%s\n" "#define HAVE_IF_NAMETOINDEX 1" >>confdefs.h
23088
23089fi
23090ac_fn_c_check_func "$LINENO" "poll" "ac_cv_func_poll"
23091if test "x$ac_cv_func_poll" = xyes
23092then :
23093  printf "%s\n" "#define HAVE_POLL 1" >>confdefs.h
23094
23095fi
23096ac_fn_c_check_func "$LINENO" "gettid" "ac_cv_func_gettid"
23097if test "x$ac_cv_func_gettid" = xyes
23098then :
23099  printf "%s\n" "#define HAVE_GETTID 1" >>confdefs.h
23100
23101fi
23102
23103
23104  for ac_func in setresuid
23105do :
23106  ac_fn_c_check_func "$LINENO" "setresuid" "ac_cv_func_setresuid"
23107if test "x$ac_cv_func_setresuid" = xyes
23108then :
23109  printf "%s\n" "#define HAVE_SETRESUID 1" >>confdefs.h
23110
23111else $as_nop
23112  ac_fn_c_check_func "$LINENO" "setreuid" "ac_cv_func_setreuid"
23113if test "x$ac_cv_func_setreuid" = xyes
23114then :
23115  printf "%s\n" "#define HAVE_SETREUID 1" >>confdefs.h
23116
23117fi
23118
23119fi
23120
23121done
23122
23123  for ac_func in setresgid
23124do :
23125  ac_fn_c_check_func "$LINENO" "setresgid" "ac_cv_func_setresgid"
23126if test "x$ac_cv_func_setresgid" = xyes
23127then :
23128  printf "%s\n" "#define HAVE_SETRESGID 1" >>confdefs.h
23129
23130else $as_nop
23131  ac_fn_c_check_func "$LINENO" "setregid" "ac_cv_func_setregid"
23132if test "x$ac_cv_func_setregid" = xyes
23133then :
23134  printf "%s\n" "#define HAVE_SETREGID 1" >>confdefs.h
23135
23136fi
23137
23138fi
23139
23140done
23141
23142# check if setreuid en setregid fail, on MacOSX10.4(darwin8).
23143if echo $host_os | grep darwin8 > /dev/null; then
23144
23145printf "%s\n" "#define DARWIN_BROKEN_SETREUID 1" >>confdefs.h
23146
23147fi
23148ac_fn_check_decl "$LINENO" "inet_pton" "ac_cv_have_decl_inet_pton" "
23149$ac_includes_default
23150#ifdef HAVE_NETINET_IN_H
23151#include <netinet/in.h>
23152#endif
23153
23154#ifdef HAVE_NETINET_TCP_H
23155#include <netinet/tcp.h>
23156#endif
23157
23158#ifdef HAVE_ARPA_INET_H
23159#include <arpa/inet.h>
23160#endif
23161
23162#ifdef HAVE_WINSOCK2_H
23163#include <winsock2.h>
23164#endif
23165
23166#ifdef HAVE_WS2TCPIP_H
23167#include <ws2tcpip.h>
23168#endif
23169
23170" "$ac_c_undeclared_builtin_options" "CFLAGS"
23171if test "x$ac_cv_have_decl_inet_pton" = xyes
23172then :
23173  ac_have_decl=1
23174else $as_nop
23175  ac_have_decl=0
23176fi
23177printf "%s\n" "#define HAVE_DECL_INET_PTON $ac_have_decl" >>confdefs.h
23178ac_fn_check_decl "$LINENO" "inet_ntop" "ac_cv_have_decl_inet_ntop" "
23179$ac_includes_default
23180#ifdef HAVE_NETINET_IN_H
23181#include <netinet/in.h>
23182#endif
23183
23184#ifdef HAVE_NETINET_TCP_H
23185#include <netinet/tcp.h>
23186#endif
23187
23188#ifdef HAVE_ARPA_INET_H
23189#include <arpa/inet.h>
23190#endif
23191
23192#ifdef HAVE_WINSOCK2_H
23193#include <winsock2.h>
23194#endif
23195
23196#ifdef HAVE_WS2TCPIP_H
23197#include <ws2tcpip.h>
23198#endif
23199
23200" "$ac_c_undeclared_builtin_options" "CFLAGS"
23201if test "x$ac_cv_have_decl_inet_ntop" = xyes
23202then :
23203  ac_have_decl=1
23204else $as_nop
23205  ac_have_decl=0
23206fi
23207printf "%s\n" "#define HAVE_DECL_INET_NTOP $ac_have_decl" >>confdefs.h
23208
23209ac_fn_c_check_func "$LINENO" "inet_aton" "ac_cv_func_inet_aton"
23210if test "x$ac_cv_func_inet_aton" = xyes
23211then :
23212  printf "%s\n" "#define HAVE_INET_ATON 1" >>confdefs.h
23213
23214else $as_nop
23215  case " $LIBOBJS " in
23216  *" inet_aton.$ac_objext "* ) ;;
23217  *) LIBOBJS="$LIBOBJS inet_aton.$ac_objext"
23218 ;;
23219esac
23220
23221fi
23222
23223ac_fn_c_check_func "$LINENO" "inet_pton" "ac_cv_func_inet_pton"
23224if test "x$ac_cv_func_inet_pton" = xyes
23225then :
23226  printf "%s\n" "#define HAVE_INET_PTON 1" >>confdefs.h
23227
23228else $as_nop
23229  case " $LIBOBJS " in
23230  *" inet_pton.$ac_objext "* ) ;;
23231  *) LIBOBJS="$LIBOBJS inet_pton.$ac_objext"
23232 ;;
23233esac
23234
23235fi
23236
23237ac_fn_c_check_func "$LINENO" "inet_ntop" "ac_cv_func_inet_ntop"
23238if test "x$ac_cv_func_inet_ntop" = xyes
23239then :
23240  printf "%s\n" "#define HAVE_INET_NTOP 1" >>confdefs.h
23241
23242else $as_nop
23243  case " $LIBOBJS " in
23244  *" inet_ntop.$ac_objext "* ) ;;
23245  *) LIBOBJS="$LIBOBJS inet_ntop.$ac_objext"
23246 ;;
23247esac
23248
23249fi
23250
23251ac_fn_c_check_func "$LINENO" "snprintf" "ac_cv_func_snprintf"
23252if test "x$ac_cv_func_snprintf" = xyes
23253then :
23254  printf "%s\n" "#define HAVE_SNPRINTF 1" >>confdefs.h
23255
23256else $as_nop
23257  case " $LIBOBJS " in
23258  *" snprintf.$ac_objext "* ) ;;
23259  *) LIBOBJS="$LIBOBJS snprintf.$ac_objext"
23260 ;;
23261esac
23262
23263fi
23264
23265# test if snprintf return the proper length
23266if test "x$ac_cv_func_snprintf" = xyes; then
23267    if test c${cross_compiling} = cno; then
23268	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for correct snprintf return value" >&5
23269printf %s "checking for correct snprintf return value... " >&6; }
23270	if test "$cross_compiling" = yes
23271then :
23272  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: maybe" >&5
23273printf "%s\n" "maybe" >&6; }
23274else $as_nop
23275  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23276/* end confdefs.h.  */
23277$ac_includes_default
23278
23279int main(void) { return !(snprintf(NULL, 0, "test") == 4); }
23280
23281_ACEOF
23282if ac_fn_c_try_run "$LINENO"
23283then :
23284  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
23285printf "%s\n" "yes" >&6; }
23286else $as_nop
23287
23288		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
23289printf "%s\n" "no" >&6; }
23290
23291printf "%s\n" "#define SNPRINTF_RET_BROKEN /**/" >>confdefs.h
23292
23293		case " $LIBOBJS " in
23294  *" snprintf.$ac_objext "* ) ;;
23295  *) LIBOBJS="$LIBOBJS snprintf.$ac_objext"
23296 ;;
23297esac
23298
23299
23300fi
23301rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23302  conftest.$ac_objext conftest.beam conftest.$ac_ext
23303fi
23304
23305    fi
23306fi
23307ac_fn_c_check_func "$LINENO" "strlcat" "ac_cv_func_strlcat"
23308if test "x$ac_cv_func_strlcat" = xyes
23309then :
23310  printf "%s\n" "#define HAVE_STRLCAT 1" >>confdefs.h
23311
23312else $as_nop
23313  case " $LIBOBJS " in
23314  *" strlcat.$ac_objext "* ) ;;
23315  *) LIBOBJS="$LIBOBJS strlcat.$ac_objext"
23316 ;;
23317esac
23318
23319fi
23320
23321ac_fn_c_check_func "$LINENO" "strlcpy" "ac_cv_func_strlcpy"
23322if test "x$ac_cv_func_strlcpy" = xyes
23323then :
23324  printf "%s\n" "#define HAVE_STRLCPY 1" >>confdefs.h
23325
23326else $as_nop
23327  case " $LIBOBJS " in
23328  *" strlcpy.$ac_objext "* ) ;;
23329  *) LIBOBJS="$LIBOBJS strlcpy.$ac_objext"
23330 ;;
23331esac
23332
23333fi
23334
23335ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove"
23336if test "x$ac_cv_func_memmove" = xyes
23337then :
23338  printf "%s\n" "#define HAVE_MEMMOVE 1" >>confdefs.h
23339
23340else $as_nop
23341  case " $LIBOBJS " in
23342  *" memmove.$ac_objext "* ) ;;
23343  *) LIBOBJS="$LIBOBJS memmove.$ac_objext"
23344 ;;
23345esac
23346
23347fi
23348
23349ac_fn_c_check_func "$LINENO" "gmtime_r" "ac_cv_func_gmtime_r"
23350if test "x$ac_cv_func_gmtime_r" = xyes
23351then :
23352  printf "%s\n" "#define HAVE_GMTIME_R 1" >>confdefs.h
23353
23354else $as_nop
23355  case " $LIBOBJS " in
23356  *" gmtime_r.$ac_objext "* ) ;;
23357  *) LIBOBJS="$LIBOBJS gmtime_r.$ac_objext"
23358 ;;
23359esac
23360
23361fi
23362
23363ac_fn_c_check_func "$LINENO" "isblank" "ac_cv_func_isblank"
23364if test "x$ac_cv_func_isblank" = xyes
23365then :
23366  printf "%s\n" "#define HAVE_ISBLANK 1" >>confdefs.h
23367
23368else $as_nop
23369  case " $LIBOBJS " in
23370  *" isblank.$ac_objext "* ) ;;
23371  *) LIBOBJS="$LIBOBJS isblank.$ac_objext"
23372 ;;
23373esac
23374
23375fi
23376
23377ac_fn_c_check_func "$LINENO" "explicit_bzero" "ac_cv_func_explicit_bzero"
23378if test "x$ac_cv_func_explicit_bzero" = xyes
23379then :
23380  printf "%s\n" "#define HAVE_EXPLICIT_BZERO 1" >>confdefs.h
23381
23382else $as_nop
23383  case " $LIBOBJS " in
23384  *" explicit_bzero.$ac_objext "* ) ;;
23385  *) LIBOBJS="$LIBOBJS explicit_bzero.$ac_objext"
23386 ;;
23387esac
23388
23389fi
23390
23391LIBOBJ_WITHOUT_CTIMEARC4="$LIBOBJS"
23392
23393{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for reallocarray" >&5
23394printf %s "checking for reallocarray... " >&6; }
23395cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23396/* end confdefs.h.  */
23397$ac_includes_default
23398
23399#ifndef _OPENBSD_SOURCE
23400#define _OPENBSD_SOURCE 1
23401#endif
23402#include <stdlib.h>
23403int main(void) {
23404	void* p = reallocarray(NULL, 10, 100);
23405	free(p);
23406	return 0;
23407}
23408
23409_ACEOF
23410if ac_fn_c_try_link "$LINENO"
23411then :
23412  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
23413printf "%s\n" "yes" >&6; }
23414
23415printf "%s\n" "#define HAVE_REALLOCARRAY 1" >>confdefs.h
23416
23417
23418else $as_nop
23419
23420	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
23421printf "%s\n" "no" >&6; }
23422	case " $LIBOBJS " in
23423  *" reallocarray.$ac_objext "* ) ;;
23424  *) LIBOBJS="$LIBOBJS reallocarray.$ac_objext"
23425 ;;
23426esac
23427
23428
23429fi
23430rm -f core conftest.err conftest.$ac_objext conftest.beam \
23431    conftest$ac_exeext conftest.$ac_ext
23432ac_fn_check_decl "$LINENO" "reallocarray" "ac_cv_have_decl_reallocarray" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
23433if test "x$ac_cv_have_decl_reallocarray" = xyes
23434then :
23435  ac_have_decl=1
23436else $as_nop
23437  ac_have_decl=0
23438fi
23439printf "%s\n" "#define HAVE_DECL_REALLOCARRAY $ac_have_decl" >>confdefs.h
23440
23441if test "$USE_NSS" = "no"; then
23442	ac_fn_c_check_func "$LINENO" "arc4random" "ac_cv_func_arc4random"
23443if test "x$ac_cv_func_arc4random" = xyes
23444then :
23445  printf "%s\n" "#define HAVE_ARC4RANDOM 1" >>confdefs.h
23446
23447else $as_nop
23448  case " $LIBOBJS " in
23449  *" arc4random.$ac_objext "* ) ;;
23450  *) LIBOBJS="$LIBOBJS arc4random.$ac_objext"
23451 ;;
23452esac
23453
23454fi
23455
23456	ac_fn_c_check_func "$LINENO" "arc4random_uniform" "ac_cv_func_arc4random_uniform"
23457if test "x$ac_cv_func_arc4random_uniform" = xyes
23458then :
23459  printf "%s\n" "#define HAVE_ARC4RANDOM_UNIFORM 1" >>confdefs.h
23460
23461else $as_nop
23462  case " $LIBOBJS " in
23463  *" arc4random_uniform.$ac_objext "* ) ;;
23464  *) LIBOBJS="$LIBOBJS arc4random_uniform.$ac_objext"
23465 ;;
23466esac
23467
23468fi
23469
23470	if test "$ac_cv_func_arc4random" = "no"; then
23471		case " $LIBOBJS " in
23472  *" arc4_lock.$ac_objext "* ) ;;
23473  *) LIBOBJS="$LIBOBJS arc4_lock.$ac_objext"
23474 ;;
23475esac
23476
23477
23478  for ac_func in getentropy
23479do :
23480  ac_fn_c_check_func "$LINENO" "getentropy" "ac_cv_func_getentropy"
23481if test "x$ac_cv_func_getentropy" = xyes
23482then :
23483  printf "%s\n" "#define HAVE_GETENTROPY 1" >>confdefs.h
23484
23485else $as_nop
23486
23487		    if test "$USE_WINSOCK" = 1; then
23488			case " $LIBOBJS " in
23489  *" getentropy_win.$ac_objext "* ) ;;
23490  *) LIBOBJS="$LIBOBJS getentropy_win.$ac_objext"
23491 ;;
23492esac
23493
23494		    else
23495			case "$host" in
23496			Darwin|*darwin*)
23497				case " $LIBOBJS " in
23498  *" getentropy_osx.$ac_objext "* ) ;;
23499  *) LIBOBJS="$LIBOBJS getentropy_osx.$ac_objext"
23500 ;;
23501esac
23502
23503			;;
23504			*solaris*|*sunos*|SunOS)
23505				case " $LIBOBJS " in
23506  *" getentropy_solaris.$ac_objext "* ) ;;
23507  *) LIBOBJS="$LIBOBJS getentropy_solaris.$ac_objext"
23508 ;;
23509esac
23510
23511				       for ac_header in sys/sha2.h
23512do :
23513  ac_fn_c_check_header_compile "$LINENO" "sys/sha2.h" "ac_cv_header_sys_sha2_h" "$ac_includes_default
23514"
23515if test "x$ac_cv_header_sys_sha2_h" = xyes
23516then :
23517  printf "%s\n" "#define HAVE_SYS_SHA2_H 1" >>confdefs.h
23518
23519else $as_nop
23520
23521
23522  for ac_func in SHA512_Update
23523do :
23524  ac_fn_c_check_func "$LINENO" "SHA512_Update" "ac_cv_func_SHA512_Update"
23525if test "x$ac_cv_func_SHA512_Update" = xyes
23526then :
23527  printf "%s\n" "#define HAVE_SHA512_UPDATE 1" >>confdefs.h
23528
23529else $as_nop
23530
23531						case " $LIBOBJS " in
23532  *" sha512.$ac_objext "* ) ;;
23533  *) LIBOBJS="$LIBOBJS sha512.$ac_objext"
23534 ;;
23535esac
23536
23537
23538fi
23539
23540done
23541
23542fi
23543
23544done
23545				if test "$ac_cv_header_sys_sha2_h" = "yes"; then
23546					# this lib needed for sha2 on solaris
23547					LIBS="$LIBS -lmd"
23548				fi
23549				{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5
23550printf %s "checking for library containing clock_gettime... " >&6; }
23551if test ${ac_cv_search_clock_gettime+y}
23552then :
23553  printf %s "(cached) " >&6
23554else $as_nop
23555  ac_func_search_save_LIBS=$LIBS
23556cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23557/* end confdefs.h.  */
23558
23559/* Override any GCC internal prototype to avoid an error.
23560   Use char because int might match the return type of a GCC
23561   builtin and then its argument prototype would still apply.  */
23562char clock_gettime ();
23563int
23564main (void)
23565{
23566return clock_gettime ();
23567  ;
23568  return 0;
23569}
23570_ACEOF
23571for ac_lib in '' rt
23572do
23573  if test -z "$ac_lib"; then
23574    ac_res="none required"
23575  else
23576    ac_res=-l$ac_lib
23577    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
23578  fi
23579  if ac_fn_c_try_link "$LINENO"
23580then :
23581  ac_cv_search_clock_gettime=$ac_res
23582fi
23583rm -f core conftest.err conftest.$ac_objext conftest.beam \
23584    conftest$ac_exeext
23585  if test ${ac_cv_search_clock_gettime+y}
23586then :
23587  break
23588fi
23589done
23590if test ${ac_cv_search_clock_gettime+y}
23591then :
23592
23593else $as_nop
23594  ac_cv_search_clock_gettime=no
23595fi
23596rm conftest.$ac_ext
23597LIBS=$ac_func_search_save_LIBS
23598fi
23599{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5
23600printf "%s\n" "$ac_cv_search_clock_gettime" >&6; }
23601ac_res=$ac_cv_search_clock_gettime
23602if test "$ac_res" != no
23603then :
23604  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
23605
23606fi
23607
23608			;;
23609			*freebsd*|*FreeBSD)
23610				case " $LIBOBJS " in
23611  *" getentropy_freebsd.$ac_objext "* ) ;;
23612  *) LIBOBJS="$LIBOBJS getentropy_freebsd.$ac_objext"
23613 ;;
23614esac
23615
23616			;;
23617			*linux*|Linux|*)
23618				case " $LIBOBJS " in
23619  *" getentropy_linux.$ac_objext "* ) ;;
23620  *) LIBOBJS="$LIBOBJS getentropy_linux.$ac_objext"
23621 ;;
23622esac
23623
23624
23625  for ac_func in SHA512_Update
23626do :
23627  ac_fn_c_check_func "$LINENO" "SHA512_Update" "ac_cv_func_SHA512_Update"
23628if test "x$ac_cv_func_SHA512_Update" = xyes
23629then :
23630  printf "%s\n" "#define HAVE_SHA512_UPDATE 1" >>confdefs.h
23631
23632else $as_nop
23633
23634
23635printf "%s\n" "#define COMPAT_SHA512 1" >>confdefs.h
23636
23637					case " $LIBOBJS " in
23638  *" sha512.$ac_objext "* ) ;;
23639  *) LIBOBJS="$LIBOBJS sha512.$ac_objext"
23640 ;;
23641esac
23642
23643
23644fi
23645
23646done
23647				ac_fn_c_check_header_compile "$LINENO" "sys/sysctl.h" "ac_cv_header_sys_sysctl_h" "$ac_includes_default
23648"
23649if test "x$ac_cv_header_sys_sysctl_h" = xyes
23650then :
23651  printf "%s\n" "#define HAVE_SYS_SYSCTL_H 1" >>confdefs.h
23652
23653fi
23654
23655				ac_fn_c_check_func "$LINENO" "getauxval" "ac_cv_func_getauxval"
23656if test "x$ac_cv_func_getauxval" = xyes
23657then :
23658  printf "%s\n" "#define HAVE_GETAUXVAL 1" >>confdefs.h
23659
23660fi
23661
23662				{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5
23663printf %s "checking for library containing clock_gettime... " >&6; }
23664if test ${ac_cv_search_clock_gettime+y}
23665then :
23666  printf %s "(cached) " >&6
23667else $as_nop
23668  ac_func_search_save_LIBS=$LIBS
23669cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23670/* end confdefs.h.  */
23671
23672/* Override any GCC internal prototype to avoid an error.
23673   Use char because int might match the return type of a GCC
23674   builtin and then its argument prototype would still apply.  */
23675char clock_gettime ();
23676int
23677main (void)
23678{
23679return clock_gettime ();
23680  ;
23681  return 0;
23682}
23683_ACEOF
23684for ac_lib in '' rt
23685do
23686  if test -z "$ac_lib"; then
23687    ac_res="none required"
23688  else
23689    ac_res=-l$ac_lib
23690    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
23691  fi
23692  if ac_fn_c_try_link "$LINENO"
23693then :
23694  ac_cv_search_clock_gettime=$ac_res
23695fi
23696rm -f core conftest.err conftest.$ac_objext conftest.beam \
23697    conftest$ac_exeext
23698  if test ${ac_cv_search_clock_gettime+y}
23699then :
23700  break
23701fi
23702done
23703if test ${ac_cv_search_clock_gettime+y}
23704then :
23705
23706else $as_nop
23707  ac_cv_search_clock_gettime=no
23708fi
23709rm conftest.$ac_ext
23710LIBS=$ac_func_search_save_LIBS
23711fi
23712{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5
23713printf "%s\n" "$ac_cv_search_clock_gettime" >&6; }
23714ac_res=$ac_cv_search_clock_gettime
23715if test "$ac_res" != no
23716then :
23717  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
23718
23719fi
23720
23721			;;
23722			esac
23723		    fi
23724
23725fi
23726
23727done
23728	fi
23729fi
23730LIBOBJ_WITHOUT_CTIME="$LIBOBJS"
23731
23732ac_fn_c_check_func "$LINENO" "ctime_r" "ac_cv_func_ctime_r"
23733if test "x$ac_cv_func_ctime_r" = xyes
23734then :
23735  printf "%s\n" "#define HAVE_CTIME_R 1" >>confdefs.h
23736
23737else $as_nop
23738  case " $LIBOBJS " in
23739  *" ctime_r.$ac_objext "* ) ;;
23740  *) LIBOBJS="$LIBOBJS ctime_r.$ac_objext"
23741 ;;
23742esac
23743
23744fi
23745
23746ac_fn_c_check_func "$LINENO" "strsep" "ac_cv_func_strsep"
23747if test "x$ac_cv_func_strsep" = xyes
23748then :
23749  printf "%s\n" "#define HAVE_STRSEP 1" >>confdefs.h
23750
23751else $as_nop
23752  case " $LIBOBJS " in
23753  *" strsep.$ac_objext "* ) ;;
23754  *) LIBOBJS="$LIBOBJS strsep.$ac_objext"
23755 ;;
23756esac
23757
23758fi
23759
23760
23761# Check whether --enable-allsymbols was given.
23762if test ${enable_allsymbols+y}
23763then :
23764  enableval=$enable_allsymbols;
23765fi
23766
23767case "$enable_allsymbols" in
23768	yes)
23769	COMMON_OBJ_ALL_SYMBOLS=""
23770	UBSYMS=""
23771	EXTRALINK="libunbound.la"
23772
23773printf "%s\n" "#define EXPORT_ALL_SYMBOLS 1" >>confdefs.h
23774
23775	;;
23776	no|*)
23777	COMMON_OBJ_ALL_SYMBOLS='$(COMMON_OBJ)'
23778	UBSYMS='-export-symbols $(srcdir)/libunbound/ubsyms.def'
23779	EXTRALINK=""
23780	;;
23781esac
23782
23783
23784
23785if test x_$enable_lock_checks = x_yes; then
23786	UBSYMS="-export-symbols clubsyms.def"
23787	cp ${srcdir}/libunbound/ubsyms.def clubsyms.def
23788	echo lock_protect >> clubsyms.def
23789	echo lock_unprotect >> clubsyms.def
23790	echo lock_get_mem >> clubsyms.def
23791	echo checklock_start >> clubsyms.def
23792	echo checklock_stop >> clubsyms.def
23793	echo checklock_lock >> clubsyms.def
23794	echo checklock_unlock >> clubsyms.def
23795	echo checklock_init >> clubsyms.def
23796	echo checklock_thrcreate >> clubsyms.def
23797	echo checklock_thrjoin >> clubsyms.def
23798fi
23799
23800# check for dnstap if requested
23801
23802    # Check whether --enable-dnstap was given.
23803if test ${enable_dnstap+y}
23804then :
23805  enableval=$enable_dnstap; opt_dnstap=$enableval
23806else $as_nop
23807  opt_dnstap=no
23808fi
23809
23810
23811
23812# Check whether --with-dnstap-socket-path was given.
23813if test ${with_dnstap_socket_path+y}
23814then :
23815  withval=$with_dnstap_socket_path; opt_dnstap_socket_path=$withval
23816else $as_nop
23817  opt_dnstap_socket_path="$UNBOUND_RUN_DIR/dnstap.sock"
23818fi
23819
23820
23821    if test "x$opt_dnstap" != "xno"; then
23822        # Extract the first word of "protoc-c", so it can be a program name with args.
23823set dummy protoc-c; ac_word=$2
23824{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23825printf %s "checking for $ac_word... " >&6; }
23826if test ${ac_cv_path_PROTOC_C+y}
23827then :
23828  printf %s "(cached) " >&6
23829else $as_nop
23830  case $PROTOC_C in
23831  [\\/]* | ?:[\\/]*)
23832  ac_cv_path_PROTOC_C="$PROTOC_C" # Let the user override the test with a path.
23833  ;;
23834  *)
23835  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23836for as_dir in $PATH
23837do
23838  IFS=$as_save_IFS
23839  case $as_dir in #(((
23840    '') as_dir=./ ;;
23841    */) ;;
23842    *) as_dir=$as_dir/ ;;
23843  esac
23844    for ac_exec_ext in '' $ac_executable_extensions; do
23845  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
23846    ac_cv_path_PROTOC_C="$as_dir$ac_word$ac_exec_ext"
23847    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
23848    break 2
23849  fi
23850done
23851  done
23852IFS=$as_save_IFS
23853
23854  ;;
23855esac
23856fi
23857PROTOC_C=$ac_cv_path_PROTOC_C
23858if test -n "$PROTOC_C"; then
23859  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PROTOC_C" >&5
23860printf "%s\n" "$PROTOC_C" >&6; }
23861else
23862  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
23863printf "%s\n" "no" >&6; }
23864fi
23865
23866
23867        if test -z "$PROTOC_C"; then
23868          as_fn_error $? "The protoc-c program was not found. Please install protobuf-c!" "$LINENO" 5
23869        fi
23870
23871# Check whether --with-protobuf-c was given.
23872if test ${with_protobuf_c+y}
23873then :
23874  withval=$with_protobuf_c;
23875                # workaround for protobuf-c includes at old dir before protobuf-c-1.0.0
23876                if test -f $withval/include/google/protobuf-c/protobuf-c.h; then
23877                    CFLAGS="$CFLAGS -I$withval/include/google"
23878                else
23879                    CFLAGS="$CFLAGS -I$withval/include"
23880                fi
23881                LDFLAGS="$LDFLAGS -L$withval/lib"
23882
23883else $as_nop
23884
23885                if test -n "$PKG_CONFIG"; then
23886
23887pkg_failed=no
23888{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for PROTOBUFC" >&5
23889printf %s "checking for PROTOBUFC... " >&6; }
23890
23891if test -n "$PROTOBUFC_CFLAGS"; then
23892    pkg_cv_PROTOBUFC_CFLAGS="$PROTOBUFC_CFLAGS"
23893 elif test -n "$PKG_CONFIG"; then
23894    if test -n "$PKG_CONFIG" && \
23895    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libprotobuf-c\""; } >&5
23896  ($PKG_CONFIG --exists --print-errors "libprotobuf-c") 2>&5
23897  ac_status=$?
23898  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
23899  test $ac_status = 0; }; then
23900  pkg_cv_PROTOBUFC_CFLAGS=`$PKG_CONFIG --cflags "libprotobuf-c" 2>/dev/null`
23901		      test "x$?" != "x0" && pkg_failed=yes
23902else
23903  pkg_failed=yes
23904fi
23905 else
23906    pkg_failed=untried
23907fi
23908if test -n "$PROTOBUFC_LIBS"; then
23909    pkg_cv_PROTOBUFC_LIBS="$PROTOBUFC_LIBS"
23910 elif test -n "$PKG_CONFIG"; then
23911    if test -n "$PKG_CONFIG" && \
23912    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libprotobuf-c\""; } >&5
23913  ($PKG_CONFIG --exists --print-errors "libprotobuf-c") 2>&5
23914  ac_status=$?
23915  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
23916  test $ac_status = 0; }; then
23917  pkg_cv_PROTOBUFC_LIBS=`$PKG_CONFIG --libs "libprotobuf-c" 2>/dev/null`
23918		      test "x$?" != "x0" && pkg_failed=yes
23919else
23920  pkg_failed=yes
23921fi
23922 else
23923    pkg_failed=untried
23924fi
23925
23926
23927
23928if test $pkg_failed = yes; then
23929   	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
23930printf "%s\n" "no" >&6; }
23931
23932if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
23933        _pkg_short_errors_supported=yes
23934else
23935        _pkg_short_errors_supported=no
23936fi
23937        if test $_pkg_short_errors_supported = yes; then
23938	        PROTOBUFC_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libprotobuf-c" 2>&1`
23939        else
23940	        PROTOBUFC_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libprotobuf-c" 2>&1`
23941        fi
23942	# Put the nasty error message in config.log where it belongs
23943	echo "$PROTOBUFC_PKG_ERRORS" >&5
23944
23945
23946                            # pkg-config failed; try falling back to known values
23947                            # workaround for protobuf-c includes at old dir before protobuf-c-1.0.0
23948                            if test -f /usr/include/google/protobuf-c/protobuf-c.h; then
23949                                CFLAGS="$CFLAGS -I/usr/include/google"
23950                            else
23951                                if test -f /usr/local/include/google/protobuf-c/protobuf-c.h; then
23952                                    CFLAGS="$CFLAGS -I/usr/local/include/google"
23953                                    LDFLAGS="$LDFLAGS -L/usr/local/lib"
23954                                else
23955                                    as_fn_error $? "The protobuf-c package was not found with pkg-config. Please install protobuf-c!" "$LINENO" 5
23956                                fi
23957                            fi
23958
23959
23960elif test $pkg_failed = untried; then
23961     	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
23962printf "%s\n" "no" >&6; }
23963
23964                            # pkg-config failed; try falling back to known values
23965                            # workaround for protobuf-c includes at old dir before protobuf-c-1.0.0
23966                            if test -f /usr/include/google/protobuf-c/protobuf-c.h; then
23967                                CFLAGS="$CFLAGS -I/usr/include/google"
23968                            else
23969                                if test -f /usr/local/include/google/protobuf-c/protobuf-c.h; then
23970                                    CFLAGS="$CFLAGS -I/usr/local/include/google"
23971                                    LDFLAGS="$LDFLAGS -L/usr/local/lib"
23972                                else
23973                                    as_fn_error $? "The protobuf-c package was not found with pkg-config. Please install protobuf-c!" "$LINENO" 5
23974                                fi
23975                            fi
23976
23977
23978else
23979	PROTOBUFC_CFLAGS=$pkg_cv_PROTOBUFC_CFLAGS
23980	PROTOBUFC_LIBS=$pkg_cv_PROTOBUFC_LIBS
23981        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
23982printf "%s\n" "yes" >&6; }
23983
23984                            CFLAGS="$CFLAGS $PROTOBUFC_CFLAGS"
23985                            LIBS="$LIBS $PROTOBUFC_LIBS"
23986
23987fi
23988                else
23989                    # workaround for protobuf-c includes at old dir before protobuf-c-1.0.0
23990                    if test -f /usr/include/google/protobuf-c/protobuf-c.h; then
23991                        CFLAGS="$CFLAGS -I/usr/include/google"
23992                    else
23993                        if test -f /usr/local/include/google/protobuf-c/protobuf-c.h; then
23994                            CFLAGS="$CFLAGS -I/usr/local/include/google"
23995                            LDFLAGS="$LDFLAGS -L/usr/local/lib"
23996                        fi
23997                    fi
23998                fi
23999
24000
24001fi
24002
24003        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing protobuf_c_message_pack" >&5
24004printf %s "checking for library containing protobuf_c_message_pack... " >&6; }
24005if test ${ac_cv_search_protobuf_c_message_pack+y}
24006then :
24007  printf %s "(cached) " >&6
24008else $as_nop
24009  ac_func_search_save_LIBS=$LIBS
24010cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24011/* end confdefs.h.  */
24012
24013/* Override any GCC internal prototype to avoid an error.
24014   Use char because int might match the return type of a GCC
24015   builtin and then its argument prototype would still apply.  */
24016char protobuf_c_message_pack ();
24017int
24018main (void)
24019{
24020return protobuf_c_message_pack ();
24021  ;
24022  return 0;
24023}
24024_ACEOF
24025for ac_lib in '' protobuf-c
24026do
24027  if test -z "$ac_lib"; then
24028    ac_res="none required"
24029  else
24030    ac_res=-l$ac_lib
24031    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
24032  fi
24033  if ac_fn_c_try_link "$LINENO"
24034then :
24035  ac_cv_search_protobuf_c_message_pack=$ac_res
24036fi
24037rm -f core conftest.err conftest.$ac_objext conftest.beam \
24038    conftest$ac_exeext
24039  if test ${ac_cv_search_protobuf_c_message_pack+y}
24040then :
24041  break
24042fi
24043done
24044if test ${ac_cv_search_protobuf_c_message_pack+y}
24045then :
24046
24047else $as_nop
24048  ac_cv_search_protobuf_c_message_pack=no
24049fi
24050rm conftest.$ac_ext
24051LIBS=$ac_func_search_save_LIBS
24052fi
24053{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_protobuf_c_message_pack" >&5
24054printf "%s\n" "$ac_cv_search_protobuf_c_message_pack" >&6; }
24055ac_res=$ac_cv_search_protobuf_c_message_pack
24056if test "$ac_res" != no
24057then :
24058  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
24059
24060else $as_nop
24061  as_fn_error $? "The protobuf-c library was not found. Please install the development libraries for protobuf-c!" "$LINENO" 5
24062fi
24063
24064
24065
24066printf "%s\n" "#define USE_DNSTAP 1" >>confdefs.h
24067
24068        ENABLE_DNSTAP=1
24069
24070
24071
24072        hdr_dnstap_socket_path="`echo $opt_dnstap_socket_path | sed -e 's/\\\\/\\\\\\\\/g'`"
24073
24074
24075printf "%s\n" "#define DNSTAP_SOCKET_PATH \"$hdr_dnstap_socket_path\"" >>confdefs.h
24076
24077	DNSTAP_SOCKET_PATH="$hdr_dnstap_socket_path"
24078
24079	DNSTAP_SOCKET_TESTBIN='unbound-dnstap-socket$(EXEEXT)'
24080
24081        DNSTAP_SRC="dnstap/dnstap.c dnstap/dnstap.pb-c.c dnstap/dnstap_fstrm.c dnstap/dtstream.c"
24082
24083        DNSTAP_OBJ="dnstap.lo dnstap.pb-c.lo dnstap_fstrm.lo dtstream.lo"
24084
24085
24086    else
24087
24088        ENABLE_DNSTAP=0
24089
24090
24091
24092    fi
24093
24094
24095# check for dnscrypt if requested
24096
24097  # Check whether --enable-dnscrypt was given.
24098if test ${enable_dnscrypt+y}
24099then :
24100  enableval=$enable_dnscrypt; opt_dnscrypt=$enableval
24101else $as_nop
24102  opt_dnscrypt=no
24103fi
24104
24105
24106  if test "x$opt_dnscrypt" != "xno"; then
24107
24108# Check whether --with-libsodium was given.
24109if test ${with_libsodium+y}
24110then :
24111  withval=$with_libsodium;
24112	CFLAGS="$CFLAGS -I$withval/include"
24113	LDFLAGS="$LDFLAGS -L$withval/lib"
24114
24115fi
24116
24117    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing sodium_init" >&5
24118printf %s "checking for library containing sodium_init... " >&6; }
24119if test ${ac_cv_search_sodium_init+y}
24120then :
24121  printf %s "(cached) " >&6
24122else $as_nop
24123  ac_func_search_save_LIBS=$LIBS
24124cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24125/* end confdefs.h.  */
24126
24127/* Override any GCC internal prototype to avoid an error.
24128   Use char because int might match the return type of a GCC
24129   builtin and then its argument prototype would still apply.  */
24130char sodium_init ();
24131int
24132main (void)
24133{
24134return sodium_init ();
24135  ;
24136  return 0;
24137}
24138_ACEOF
24139for ac_lib in '' sodium
24140do
24141  if test -z "$ac_lib"; then
24142    ac_res="none required"
24143  else
24144    ac_res=-l$ac_lib
24145    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
24146  fi
24147  if ac_fn_c_try_link "$LINENO"
24148then :
24149  ac_cv_search_sodium_init=$ac_res
24150fi
24151rm -f core conftest.err conftest.$ac_objext conftest.beam \
24152    conftest$ac_exeext
24153  if test ${ac_cv_search_sodium_init+y}
24154then :
24155  break
24156fi
24157done
24158if test ${ac_cv_search_sodium_init+y}
24159then :
24160
24161else $as_nop
24162  ac_cv_search_sodium_init=no
24163fi
24164rm conftest.$ac_ext
24165LIBS=$ac_func_search_save_LIBS
24166fi
24167{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sodium_init" >&5
24168printf "%s\n" "$ac_cv_search_sodium_init" >&6; }
24169ac_res=$ac_cv_search_sodium_init
24170if test "$ac_res" != no
24171then :
24172  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
24173
24174else $as_nop
24175  as_fn_error $? "The sodium library was not found. Please install sodium!" "$LINENO" 5
24176fi
24177
24178    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing crypto_box_curve25519xchacha20poly1305_beforenm" >&5
24179printf %s "checking for library containing crypto_box_curve25519xchacha20poly1305_beforenm... " >&6; }
24180if test ${ac_cv_search_crypto_box_curve25519xchacha20poly1305_beforenm+y}
24181then :
24182  printf %s "(cached) " >&6
24183else $as_nop
24184  ac_func_search_save_LIBS=$LIBS
24185cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24186/* end confdefs.h.  */
24187
24188/* Override any GCC internal prototype to avoid an error.
24189   Use char because int might match the return type of a GCC
24190   builtin and then its argument prototype would still apply.  */
24191char crypto_box_curve25519xchacha20poly1305_beforenm ();
24192int
24193main (void)
24194{
24195return crypto_box_curve25519xchacha20poly1305_beforenm ();
24196  ;
24197  return 0;
24198}
24199_ACEOF
24200for ac_lib in '' sodium
24201do
24202  if test -z "$ac_lib"; then
24203    ac_res="none required"
24204  else
24205    ac_res=-l$ac_lib
24206    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
24207  fi
24208  if ac_fn_c_try_link "$LINENO"
24209then :
24210  ac_cv_search_crypto_box_curve25519xchacha20poly1305_beforenm=$ac_res
24211fi
24212rm -f core conftest.err conftest.$ac_objext conftest.beam \
24213    conftest$ac_exeext
24214  if test ${ac_cv_search_crypto_box_curve25519xchacha20poly1305_beforenm+y}
24215then :
24216  break
24217fi
24218done
24219if test ${ac_cv_search_crypto_box_curve25519xchacha20poly1305_beforenm+y}
24220then :
24221
24222else $as_nop
24223  ac_cv_search_crypto_box_curve25519xchacha20poly1305_beforenm=no
24224fi
24225rm conftest.$ac_ext
24226LIBS=$ac_func_search_save_LIBS
24227fi
24228{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_crypto_box_curve25519xchacha20poly1305_beforenm" >&5
24229printf "%s\n" "$ac_cv_search_crypto_box_curve25519xchacha20poly1305_beforenm" >&6; }
24230ac_res=$ac_cv_search_crypto_box_curve25519xchacha20poly1305_beforenm
24231if test "$ac_res" != no
24232then :
24233  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
24234
24235            ENABLE_DNSCRYPT_XCHACHA20=1
24236
24237
24238printf "%s\n" "#define USE_DNSCRYPT_XCHACHA20 1" >>confdefs.h
24239
24240
24241else $as_nop
24242
24243            ENABLE_DNSCRYPT_XCHACHA20=0
24244
24245
24246fi
24247
24248    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing sodium_set_misuse_handler" >&5
24249printf %s "checking for library containing sodium_set_misuse_handler... " >&6; }
24250if test ${ac_cv_search_sodium_set_misuse_handler+y}
24251then :
24252  printf %s "(cached) " >&6
24253else $as_nop
24254  ac_func_search_save_LIBS=$LIBS
24255cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24256/* end confdefs.h.  */
24257
24258/* Override any GCC internal prototype to avoid an error.
24259   Use char because int might match the return type of a GCC
24260   builtin and then its argument prototype would still apply.  */
24261char sodium_set_misuse_handler ();
24262int
24263main (void)
24264{
24265return sodium_set_misuse_handler ();
24266  ;
24267  return 0;
24268}
24269_ACEOF
24270for ac_lib in '' sodium
24271do
24272  if test -z "$ac_lib"; then
24273    ac_res="none required"
24274  else
24275    ac_res=-l$ac_lib
24276    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
24277  fi
24278  if ac_fn_c_try_link "$LINENO"
24279then :
24280  ac_cv_search_sodium_set_misuse_handler=$ac_res
24281fi
24282rm -f core conftest.err conftest.$ac_objext conftest.beam \
24283    conftest$ac_exeext
24284  if test ${ac_cv_search_sodium_set_misuse_handler+y}
24285then :
24286  break
24287fi
24288done
24289if test ${ac_cv_search_sodium_set_misuse_handler+y}
24290then :
24291
24292else $as_nop
24293  ac_cv_search_sodium_set_misuse_handler=no
24294fi
24295rm conftest.$ac_ext
24296LIBS=$ac_func_search_save_LIBS
24297fi
24298{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sodium_set_misuse_handler" >&5
24299printf "%s\n" "$ac_cv_search_sodium_set_misuse_handler" >&6; }
24300ac_res=$ac_cv_search_sodium_set_misuse_handler
24301if test "$ac_res" != no
24302then :
24303  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
24304
24305
24306printf "%s\n" "#define SODIUM_MISUSE_HANDLER 1" >>confdefs.h
24307
24308
24309fi
24310
24311
24312
24313printf "%s\n" "#define USE_DNSCRYPT 1" >>confdefs.h
24314
24315        ENABLE_DNSCRYPT=1
24316
24317
24318        DNSCRYPT_SRC="dnscrypt/dnscrypt.c"
24319
24320        DNSCRYPT_OBJ="dnscrypt.lo"
24321
24322
24323  else
24324    ENABLE_DNSCRYPT_XCHACHA20=0
24325
24326
24327        ENABLE_DNSCRYPT=0
24328
24329
24330
24331  fi
24332
24333
24334# check for cachedb if requested
24335# Check whether --enable-cachedb was given.
24336if test ${enable_cachedb+y}
24337then :
24338  enableval=$enable_cachedb;
24339fi
24340
24341# turn on cachedb when hiredis support is enabled.
24342if test "$found_libhiredis" = "yes"; then enable_cachedb="yes"; fi
24343case "$enable_cachedb" in
24344    yes)
24345
24346printf "%s\n" "#define USE_CACHEDB 1" >>confdefs.h
24347
24348	CACHEDB_SRC="cachedb/cachedb.c cachedb/redis.c"
24349
24350	CACHEDB_OBJ="cachedb.lo redis.lo"
24351
24352    	;;
24353    no|*)
24354    	# nothing
24355    	;;
24356esac
24357
24358# check for ipsecmod if requested
24359# Check whether --enable-ipsecmod was given.
24360if test ${enable_ipsecmod+y}
24361then :
24362  enableval=$enable_ipsecmod;
24363fi
24364
24365case "$enable_ipsecmod" in
24366	yes)
24367
24368printf "%s\n" "#define USE_IPSECMOD 1" >>confdefs.h
24369
24370		IPSECMOD_OBJ="ipsecmod.lo ipsecmod-whitelist.lo"
24371
24372		IPSECMOD_HEADER='$(srcdir)/ipsecmod/ipsecmod.h $(srcdir)/ipsecmod/ipsecmod-whitelist.h'
24373
24374		;;
24375	no|*)
24376		# nothing
24377		;;
24378esac
24379
24380# check for ipset if requested
24381# Check whether --enable-ipset was given.
24382if test ${enable_ipset+y}
24383then :
24384  enableval=$enable_ipset;
24385fi
24386
24387case "$enable_ipset" in
24388    yes)
24389
24390printf "%s\n" "#define USE_IPSET 1" >>confdefs.h
24391
24392		IPSET_SRC="ipset/ipset.c"
24393
24394		IPSET_OBJ="ipset.lo"
24395
24396
24397		# BSD's pf
24398		       for ac_header in net/pfvar.h
24399do :
24400  ac_fn_c_check_header_compile "$LINENO" "net/pfvar.h" "ac_cv_header_net_pfvar_h" "
24401		  #include <netinet/in.h>
24402		  #include <net/if.h>
24403
24404"
24405if test "x$ac_cv_header_net_pfvar_h" = xyes
24406then :
24407  printf "%s\n" "#define HAVE_NET_PFVAR_H 1" >>confdefs.h
24408
24409else $as_nop
24410
24411		    # mnl
24412
24413# Check whether --with-libmnl was given.
24414if test ${with_libmnl+y}
24415then :
24416  withval=$with_libmnl;
24417else $as_nop
24418   withval="yes"
24419fi
24420
24421		    found_libmnl="no"
24422		    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libmnl" >&5
24423printf %s "checking for libmnl... " >&6; }
24424		    if test x_$withval = x_ -o x_$withval = x_yes; then
24425			withval="/usr/local /opt/local /usr/lib /usr/pkg /usr/sfw /usr"
24426		    fi
24427		    for dir in $withval ; do
24428			if test -f "$dir/include/libmnl/libmnl.h" -o -f "$dir/include/libmnl/libmnl/libmnl.h"; then
24429				found_libmnl="yes"
24430								extralibmnl=""
24431				if test -f "$dir/include/libmnl/libmnl/libmnl.h"; then
24432					extralibmnl="/libmnl"
24433				fi
24434				if test "$dir" != "/usr" -o -n "$extralibmnl"; then
24435					CPPFLAGS="$CPPFLAGS -I$dir/include$extralibmnl"
24436				fi
24437				if test "$dir" != "/usr"; then
24438					LDFLAGS="$LDFLAGS -L$dir/lib"
24439				fi
24440				{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: found in $dir" >&5
24441printf "%s\n" "found in $dir" >&6; }
24442				LIBS="$LIBS -lmnl"
24443				break;
24444			fi
24445		    done
24446		    if test x_$found_libmnl != x_yes; then
24447			  as_fn_error $? "Could not find libmnl, libmnl.h" "$LINENO" 5
24448		    fi
24449
24450fi
24451
24452done
24453		;;
24454    no|*)
24455    	# nothing
24456		;;
24457esac
24458# Check whether --enable-explicit-port-randomisation was given.
24459if test ${enable_explicit_port_randomisation+y}
24460then :
24461  enableval=$enable_explicit_port_randomisation;
24462fi
24463
24464case "$enable_explicit_port_randomisation" in
24465	no)
24466
24467printf "%s\n" "#define DISABLE_EXPLICIT_PORT_RANDOMISATION 1" >>confdefs.h
24468
24469		;;
24470	yes|*)
24471		;;
24472esac
24473
24474if echo "$host" | $GREP -i -e linux >/dev/null; then
24475	# Check whether --enable-linux-ip-local-port-range was given.
24476if test ${enable_linux_ip_local_port_range+y}
24477then :
24478  enableval=$enable_linux_ip_local_port_range;
24479fi
24480
24481	case "$enable_linux_ip_local_port_range" in
24482		yes)
24483
24484printf "%s\n" "#define USE_LINUX_IP_LOCAL_PORT_RANGE 1" >>confdefs.h
24485
24486			;;
24487		no|*)
24488			;;
24489	esac
24490fi
24491
24492
24493{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if ${MAKE:-make} supports $< with implicit rule in scope" >&5
24494printf %s "checking if ${MAKE:-make} supports $< with implicit rule in scope... " >&6; }
24495# on openBSD, the implicit rule make $< work.
24496# on Solaris, it does not work ($? is changed sources, $^ lists dependencies).
24497# gmake works.
24498cat >conftest.make <<EOF
24499all:	conftest.lo
24500
24501conftest.lo foo.lo bla.lo:
24502	if test -f "\$<"; then touch \$@; fi
24503
24504.SUFFIXES: .lo
24505.c.lo:
24506	if test -f "\$<"; then touch \$@; fi
24507
24508conftest.lo:        conftest.dir/conftest.c
24509EOF
24510mkdir conftest.dir
24511touch conftest.dir/conftest.c
24512rm -f conftest.lo conftest.c
24513${MAKE:-make} -f conftest.make >/dev/null
24514rm -f conftest.make conftest.c conftest.dir/conftest.c
24515rm -rf conftest.dir
24516if test ! -f conftest.lo; then
24517	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
24518printf "%s\n" "no" >&6; }
24519	SOURCEDETERMINE='echo "$^" | awk "-F " "{print \$$1;}" > .source'
24520	SOURCEFILE='`cat .source`'
24521else
24522	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24523printf "%s\n" "yes" >&6; }
24524	SOURCEDETERMINE=':'
24525	SOURCEFILE='$<'
24526fi
24527rm -f conftest.lo
24528
24529
24530
24531# see if we want to build the library or everything
24532ALLTARGET="alltargets"
24533INSTALLTARGET="install-all"
24534
24535# Check whether --with-libunbound-only was given.
24536if test ${with_libunbound_only+y}
24537then :
24538  withval=$with_libunbound_only;
24539	if test "$withval" = "yes"; then
24540		ALLTARGET="lib"
24541		INSTALLTARGET="install-lib"
24542	fi
24543
24544fi
24545
24546if test $ALLTARGET = "alltargets"; then
24547	if test $USE_NSS = "yes"; then
24548		as_fn_error $? "--with-nss can only be used in combination with --with-libunbound-only." "$LINENO" 5
24549	fi
24550	if test $USE_NETTLE = "yes"; then
24551		as_fn_error $? "--with-nettle can only be used in combination with --with-libunbound-only." "$LINENO" 5
24552	fi
24553fi
24554
24555
24556
24557
24558
24559  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Stripping extension flags..." >&5
24560printf "%s\n" "$as_me: Stripping extension flags..." >&6;}
24561
24562  if echo $CFLAGS | grep " -D_GNU_SOURCE" >/dev/null 2>&1; then
24563    CFLAGS="`echo $CFLAGS | sed -e 's/ -D_GNU_SOURCE//g'`"
24564
24565printf "%s\n" "#define OMITTED__D_GNU_SOURCE 1" >>confdefs.h
24566
24567  fi
24568
24569
24570  if echo $CFLAGS | grep " -D_BSD_SOURCE" >/dev/null 2>&1; then
24571    CFLAGS="`echo $CFLAGS | sed -e 's/ -D_BSD_SOURCE//g'`"
24572
24573printf "%s\n" "#define OMITTED__D_BSD_SOURCE 1" >>confdefs.h
24574
24575  fi
24576
24577
24578  if echo $CFLAGS | grep " -D_DEFAULT_SOURCE" >/dev/null 2>&1; then
24579    CFLAGS="`echo $CFLAGS | sed -e 's/ -D_DEFAULT_SOURCE//g'`"
24580
24581printf "%s\n" "#define OMITTED__D_DEFAULT_SOURCE 1" >>confdefs.h
24582
24583  fi
24584
24585
24586  if echo $CFLAGS | grep " -D__EXTENSIONS__" >/dev/null 2>&1; then
24587    CFLAGS="`echo $CFLAGS | sed -e 's/ -D__EXTENSIONS__//g'`"
24588
24589printf "%s\n" "#define OMITTED__D__EXTENSIONS__ 1" >>confdefs.h
24590
24591  fi
24592
24593
24594  if echo $CFLAGS | grep " -D_POSIX_C_SOURCE=200112" >/dev/null 2>&1; then
24595    CFLAGS="`echo $CFLAGS | sed -e 's/ -D_POSIX_C_SOURCE=200112//g'`"
24596
24597printf "%s\n" "#define OMITTED__D_POSIX_C_SOURCE_200112 1" >>confdefs.h
24598
24599  fi
24600
24601
24602  if echo $CFLAGS | grep " -D_XOPEN_SOURCE=600" >/dev/null 2>&1; then
24603    CFLAGS="`echo $CFLAGS | sed -e 's/ -D_XOPEN_SOURCE=600//g'`"
24604
24605printf "%s\n" "#define OMITTED__D_XOPEN_SOURCE_600 1" >>confdefs.h
24606
24607  fi
24608
24609
24610  if echo $CFLAGS | grep " -D_XOPEN_SOURCE_EXTENDED=1" >/dev/null 2>&1; then
24611    CFLAGS="`echo $CFLAGS | sed -e 's/ -D_XOPEN_SOURCE_EXTENDED=1//g'`"
24612
24613printf "%s\n" "#define OMITTED__D_XOPEN_SOURCE_EXTENDED_1 1" >>confdefs.h
24614
24615  fi
24616
24617
24618  if echo $CFLAGS | grep " -D_ALL_SOURCE" >/dev/null 2>&1; then
24619    CFLAGS="`echo $CFLAGS | sed -e 's/ -D_ALL_SOURCE//g'`"
24620
24621printf "%s\n" "#define OMITTED__D_ALL_SOURCE 1" >>confdefs.h
24622
24623  fi
24624
24625
24626  if echo $CFLAGS | grep " -D_LARGEFILE_SOURCE=1" >/dev/null 2>&1; then
24627    CFLAGS="`echo $CFLAGS | sed -e 's/ -D_LARGEFILE_SOURCE=1//g'`"
24628
24629printf "%s\n" "#define OMITTED__D_LARGEFILE_SOURCE_1 1" >>confdefs.h
24630
24631  fi
24632
24633
24634if test -n "$LATE_LDFLAGS"; then
24635  LDFLAGS="$LATE_LDFLAGS $LDFLAGS"
24636fi
24637# remove start spaces
24638LDFLAGS=`echo "$LDFLAGS"|sed -e 's/^ *//'`
24639LIBS=`echo "$LIBS"|sed -e 's/^ *//'`
24640
24641
24642printf "%s\n" "#define MAXSYSLOGMSGLEN 10240" >>confdefs.h
24643
24644
24645
24646
24647version=1.21.0
24648
24649date=`date +'%b %e, %Y'`
24650
24651
24652ac_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"
24653
24654ac_config_headers="$ac_config_headers config.h"
24655
24656cat >confcache <<\_ACEOF
24657# This file is a shell script that caches the results of configure
24658# tests run on this system so they can be shared between configure
24659# scripts and configure runs, see configure's option --config-cache.
24660# It is not useful on other systems.  If it contains results you don't
24661# want to keep, you may remove or edit it.
24662#
24663# config.status only pays attention to the cache file if you give it
24664# the --recheck option to rerun configure.
24665#
24666# `ac_cv_env_foo' variables (set or unset) will be overridden when
24667# loading this file, other *unset* `ac_cv_foo' will be assigned the
24668# following values.
24669
24670_ACEOF
24671
24672# The following way of writing the cache mishandles newlines in values,
24673# but we know of no workaround that is simple, portable, and efficient.
24674# So, we kill variables containing newlines.
24675# Ultrix sh set writes to stderr and can't be redirected directly,
24676# and sets the high bit in the cache file unless we assign to the vars.
24677(
24678  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
24679    eval ac_val=\$$ac_var
24680    case $ac_val in #(
24681    *${as_nl}*)
24682      case $ac_var in #(
24683      *_cv_*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
24684printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
24685      esac
24686      case $ac_var in #(
24687      _ | IFS | as_nl) ;; #(
24688      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
24689      *) { eval $ac_var=; unset $ac_var;} ;;
24690      esac ;;
24691    esac
24692  done
24693
24694  (set) 2>&1 |
24695    case $as_nl`(ac_space=' '; set) 2>&1` in #(
24696    *${as_nl}ac_space=\ *)
24697      # `set' does not quote correctly, so add quotes: double-quote
24698      # substitution turns \\\\ into \\, and sed turns \\ into \.
24699      sed -n \
24700	"s/'/'\\\\''/g;
24701	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
24702      ;; #(
24703    *)
24704      # `set' quotes correctly as required by POSIX, so do not add quotes.
24705      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
24706      ;;
24707    esac |
24708    sort
24709) |
24710  sed '
24711     /^ac_cv_env_/b end
24712     t clear
24713     :clear
24714     s/^\([^=]*\)=\(.*[{}].*\)$/test ${\1+y} || &/
24715     t end
24716     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
24717     :end' >>confcache
24718if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
24719  if test -w "$cache_file"; then
24720    if test "x$cache_file" != "x/dev/null"; then
24721      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
24722printf "%s\n" "$as_me: updating cache $cache_file" >&6;}
24723      if test ! -f "$cache_file" || test -h "$cache_file"; then
24724	cat confcache >"$cache_file"
24725      else
24726        case $cache_file in #(
24727        */* | ?:*)
24728	  mv -f confcache "$cache_file"$$ &&
24729	  mv -f "$cache_file"$$ "$cache_file" ;; #(
24730        *)
24731	  mv -f confcache "$cache_file" ;;
24732	esac
24733      fi
24734    fi
24735  else
24736    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
24737printf "%s\n" "$as_me: not updating unwritable cache $cache_file" >&6;}
24738  fi
24739fi
24740rm -f confcache
24741
24742test "x$prefix" = xNONE && prefix=$ac_default_prefix
24743# Let make expand exec_prefix.
24744test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
24745
24746DEFS=-DHAVE_CONFIG_H
24747
24748ac_libobjs=
24749ac_ltlibobjs=
24750U=
24751for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
24752  # 1. Remove the extension, and $U if already installed.
24753  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
24754  ac_i=`printf "%s\n" "$ac_i" | sed "$ac_script"`
24755  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
24756  #    will be set to the directory where LIBOBJS objects are built.
24757  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
24758  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
24759done
24760LIBOBJS=$ac_libobjs
24761
24762LTLIBOBJS=$ac_ltlibobjs
24763
24764
24765if test -z "${USE_SYSTEMD_TRUE}" && test -z "${USE_SYSTEMD_FALSE}"; then
24766  as_fn_error $? "conditional \"USE_SYSTEMD\" was never defined.
24767Usually this means the macro was only invoked conditionally." "$LINENO" 5
24768fi
24769
24770: "${CONFIG_STATUS=./config.status}"
24771ac_write_fail=0
24772ac_clean_files_save=$ac_clean_files
24773ac_clean_files="$ac_clean_files $CONFIG_STATUS"
24774{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
24775printf "%s\n" "$as_me: creating $CONFIG_STATUS" >&6;}
24776as_write_fail=0
24777cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
24778#! $SHELL
24779# Generated by $as_me.
24780# Run this file to recreate the current configuration.
24781# Compiler output produced by configure, useful for debugging
24782# configure, is in config.log if it exists.
24783
24784debug=false
24785ac_cs_recheck=false
24786ac_cs_silent=false
24787
24788SHELL=\${CONFIG_SHELL-$SHELL}
24789export SHELL
24790_ASEOF
24791cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
24792## -------------------- ##
24793## M4sh Initialization. ##
24794## -------------------- ##
24795
24796# Be more Bourne compatible
24797DUALCASE=1; export DUALCASE # for MKS sh
24798as_nop=:
24799if test ${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1
24800then :
24801  emulate sh
24802  NULLCMD=:
24803  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
24804  # is contrary to our usage.  Disable this feature.
24805  alias -g '${1+"$@"}'='"$@"'
24806  setopt NO_GLOB_SUBST
24807else $as_nop
24808  case `(set -o) 2>/dev/null` in #(
24809  *posix*) :
24810    set -o posix ;; #(
24811  *) :
24812     ;;
24813esac
24814fi
24815
24816
24817
24818# Reset variables that may have inherited troublesome values from
24819# the environment.
24820
24821# IFS needs to be set, to space, tab, and newline, in precisely that order.
24822# (If _AS_PATH_WALK were called with IFS unset, it would have the
24823# side effect of setting IFS to empty, thus disabling word splitting.)
24824# Quoting is to prevent editors from complaining about space-tab.
24825as_nl='
24826'
24827export as_nl
24828IFS=" ""	$as_nl"
24829
24830PS1='$ '
24831PS2='> '
24832PS4='+ '
24833
24834# Ensure predictable behavior from utilities with locale-dependent output.
24835LC_ALL=C
24836export LC_ALL
24837LANGUAGE=C
24838export LANGUAGE
24839
24840# We cannot yet rely on "unset" to work, but we need these variables
24841# to be unset--not just set to an empty or harmless value--now, to
24842# avoid bugs in old shells (e.g. pre-3.0 UWIN ksh).  This construct
24843# also avoids known problems related to "unset" and subshell syntax
24844# in other old shells (e.g. bash 2.01 and pdksh 5.2.14).
24845for as_var in BASH_ENV ENV MAIL MAILPATH CDPATH
24846do eval test \${$as_var+y} \
24847  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
24848done
24849
24850# Ensure that fds 0, 1, and 2 are open.
24851if (exec 3>&0) 2>/dev/null; then :; else exec 0</dev/null; fi
24852if (exec 3>&1) 2>/dev/null; then :; else exec 1>/dev/null; fi
24853if (exec 3>&2)            ; then :; else exec 2>/dev/null; fi
24854
24855# The user is always right.
24856if ${PATH_SEPARATOR+false} :; then
24857  PATH_SEPARATOR=:
24858  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
24859    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
24860      PATH_SEPARATOR=';'
24861  }
24862fi
24863
24864
24865# Find who we are.  Look in the path if we contain no directory separator.
24866as_myself=
24867case $0 in #((
24868  *[\\/]* ) as_myself=$0 ;;
24869  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24870for as_dir in $PATH
24871do
24872  IFS=$as_save_IFS
24873  case $as_dir in #(((
24874    '') as_dir=./ ;;
24875    */) ;;
24876    *) as_dir=$as_dir/ ;;
24877  esac
24878    test -r "$as_dir$0" && as_myself=$as_dir$0 && break
24879  done
24880IFS=$as_save_IFS
24881
24882     ;;
24883esac
24884# We did not find ourselves, most probably we were run as `sh COMMAND'
24885# in which case we are not to be found in the path.
24886if test "x$as_myself" = x; then
24887  as_myself=$0
24888fi
24889if test ! -f "$as_myself"; then
24890  printf "%s\n" "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
24891  exit 1
24892fi
24893
24894
24895
24896# as_fn_error STATUS ERROR [LINENO LOG_FD]
24897# ----------------------------------------
24898# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
24899# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
24900# script with STATUS, using 1 if that was 0.
24901as_fn_error ()
24902{
24903  as_status=$1; test $as_status -eq 0 && as_status=1
24904  if test "$4"; then
24905    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
24906    printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
24907  fi
24908  printf "%s\n" "$as_me: error: $2" >&2
24909  as_fn_exit $as_status
24910} # as_fn_error
24911
24912
24913
24914# as_fn_set_status STATUS
24915# -----------------------
24916# Set $? to STATUS, without forking.
24917as_fn_set_status ()
24918{
24919  return $1
24920} # as_fn_set_status
24921
24922# as_fn_exit STATUS
24923# -----------------
24924# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
24925as_fn_exit ()
24926{
24927  set +e
24928  as_fn_set_status $1
24929  exit $1
24930} # as_fn_exit
24931
24932# as_fn_unset VAR
24933# ---------------
24934# Portably unset VAR.
24935as_fn_unset ()
24936{
24937  { eval $1=; unset $1;}
24938}
24939as_unset=as_fn_unset
24940
24941# as_fn_append VAR VALUE
24942# ----------------------
24943# Append the text in VALUE to the end of the definition contained in VAR. Take
24944# advantage of any shell optimizations that allow amortized linear growth over
24945# repeated appends, instead of the typical quadratic growth present in naive
24946# implementations.
24947if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null
24948then :
24949  eval 'as_fn_append ()
24950  {
24951    eval $1+=\$2
24952  }'
24953else $as_nop
24954  as_fn_append ()
24955  {
24956    eval $1=\$$1\$2
24957  }
24958fi # as_fn_append
24959
24960# as_fn_arith ARG...
24961# ------------------
24962# Perform arithmetic evaluation on the ARGs, and store the result in the
24963# global $as_val. Take advantage of shells that can avoid forks. The arguments
24964# must be portable across $(()) and expr.
24965if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null
24966then :
24967  eval 'as_fn_arith ()
24968  {
24969    as_val=$(( $* ))
24970  }'
24971else $as_nop
24972  as_fn_arith ()
24973  {
24974    as_val=`expr "$@" || test $? -eq 1`
24975  }
24976fi # as_fn_arith
24977
24978
24979if expr a : '\(a\)' >/dev/null 2>&1 &&
24980   test "X`expr 00001 : '.*\(...\)'`" = X001; then
24981  as_expr=expr
24982else
24983  as_expr=false
24984fi
24985
24986if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
24987  as_basename=basename
24988else
24989  as_basename=false
24990fi
24991
24992if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
24993  as_dirname=dirname
24994else
24995  as_dirname=false
24996fi
24997
24998as_me=`$as_basename -- "$0" ||
24999$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
25000	 X"$0" : 'X\(//\)$' \| \
25001	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
25002printf "%s\n" X/"$0" |
25003    sed '/^.*\/\([^/][^/]*\)\/*$/{
25004	    s//\1/
25005	    q
25006	  }
25007	  /^X\/\(\/\/\)$/{
25008	    s//\1/
25009	    q
25010	  }
25011	  /^X\/\(\/\).*/{
25012	    s//\1/
25013	    q
25014	  }
25015	  s/.*/./; q'`
25016
25017# Avoid depending upon Character Ranges.
25018as_cr_letters='abcdefghijklmnopqrstuvwxyz'
25019as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
25020as_cr_Letters=$as_cr_letters$as_cr_LETTERS
25021as_cr_digits='0123456789'
25022as_cr_alnum=$as_cr_Letters$as_cr_digits
25023
25024
25025# Determine whether it's possible to make 'echo' print without a newline.
25026# These variables are no longer used directly by Autoconf, but are AC_SUBSTed
25027# for compatibility with existing Makefiles.
25028ECHO_C= ECHO_N= ECHO_T=
25029case `echo -n x` in #(((((
25030-n*)
25031  case `echo 'xy\c'` in
25032  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
25033  xy)  ECHO_C='\c';;
25034  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
25035       ECHO_T='	';;
25036  esac;;
25037*)
25038  ECHO_N='-n';;
25039esac
25040
25041# For backward compatibility with old third-party macros, we provide
25042# the shell variables $as_echo and $as_echo_n.  New code should use
25043# AS_ECHO(["message"]) and AS_ECHO_N(["message"]), respectively.
25044as_echo='printf %s\n'
25045as_echo_n='printf %s'
25046
25047rm -f conf$$ conf$$.exe conf$$.file
25048if test -d conf$$.dir; then
25049  rm -f conf$$.dir/conf$$.file
25050else
25051  rm -f conf$$.dir
25052  mkdir conf$$.dir 2>/dev/null
25053fi
25054if (echo >conf$$.file) 2>/dev/null; then
25055  if ln -s conf$$.file conf$$ 2>/dev/null; then
25056    as_ln_s='ln -s'
25057    # ... but there are two gotchas:
25058    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
25059    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
25060    # In both cases, we have to default to `cp -pR'.
25061    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
25062      as_ln_s='cp -pR'
25063  elif ln conf$$.file conf$$ 2>/dev/null; then
25064    as_ln_s=ln
25065  else
25066    as_ln_s='cp -pR'
25067  fi
25068else
25069  as_ln_s='cp -pR'
25070fi
25071rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
25072rmdir conf$$.dir 2>/dev/null
25073
25074
25075# as_fn_mkdir_p
25076# -------------
25077# Create "$as_dir" as a directory, including parents if necessary.
25078as_fn_mkdir_p ()
25079{
25080
25081  case $as_dir in #(
25082  -*) as_dir=./$as_dir;;
25083  esac
25084  test -d "$as_dir" || eval $as_mkdir_p || {
25085    as_dirs=
25086    while :; do
25087      case $as_dir in #(
25088      *\'*) as_qdir=`printf "%s\n" "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
25089      *) as_qdir=$as_dir;;
25090      esac
25091      as_dirs="'$as_qdir' $as_dirs"
25092      as_dir=`$as_dirname -- "$as_dir" ||
25093$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
25094	 X"$as_dir" : 'X\(//\)[^/]' \| \
25095	 X"$as_dir" : 'X\(//\)$' \| \
25096	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
25097printf "%s\n" X"$as_dir" |
25098    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
25099	    s//\1/
25100	    q
25101	  }
25102	  /^X\(\/\/\)[^/].*/{
25103	    s//\1/
25104	    q
25105	  }
25106	  /^X\(\/\/\)$/{
25107	    s//\1/
25108	    q
25109	  }
25110	  /^X\(\/\).*/{
25111	    s//\1/
25112	    q
25113	  }
25114	  s/.*/./; q'`
25115      test -d "$as_dir" && break
25116    done
25117    test -z "$as_dirs" || eval "mkdir $as_dirs"
25118  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
25119
25120
25121} # as_fn_mkdir_p
25122if mkdir -p . 2>/dev/null; then
25123  as_mkdir_p='mkdir -p "$as_dir"'
25124else
25125  test -d ./-p && rmdir ./-p
25126  as_mkdir_p=false
25127fi
25128
25129
25130# as_fn_executable_p FILE
25131# -----------------------
25132# Test if FILE is an executable regular file.
25133as_fn_executable_p ()
25134{
25135  test -f "$1" && test -x "$1"
25136} # as_fn_executable_p
25137as_test_x='test -x'
25138as_executable_p=as_fn_executable_p
25139
25140# Sed expression to map a string onto a valid CPP name.
25141as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
25142
25143# Sed expression to map a string onto a valid variable name.
25144as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
25145
25146
25147exec 6>&1
25148## ----------------------------------- ##
25149## Main body of $CONFIG_STATUS script. ##
25150## ----------------------------------- ##
25151_ASEOF
25152test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
25153
25154cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
25155# Save the log message, to keep $0 and so on meaningful, and to
25156# report actual input values of CONFIG_FILES etc. instead of their
25157# values after options handling.
25158ac_log="
25159This file was extended by unbound $as_me 1.21.0, which was
25160generated by GNU Autoconf 2.71.  Invocation command line was
25161
25162  CONFIG_FILES    = $CONFIG_FILES
25163  CONFIG_HEADERS  = $CONFIG_HEADERS
25164  CONFIG_LINKS    = $CONFIG_LINKS
25165  CONFIG_COMMANDS = $CONFIG_COMMANDS
25166  $ $0 $@
25167
25168on `(hostname || uname -n) 2>/dev/null | sed 1q`
25169"
25170
25171_ACEOF
25172
25173case $ac_config_files in *"
25174"*) set x $ac_config_files; shift; ac_config_files=$*;;
25175esac
25176
25177case $ac_config_headers in *"
25178"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
25179esac
25180
25181
25182cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
25183# Files that config.status was made for.
25184config_files="$ac_config_files"
25185config_headers="$ac_config_headers"
25186config_commands="$ac_config_commands"
25187
25188_ACEOF
25189
25190cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
25191ac_cs_usage="\
25192\`$as_me' instantiates files and other configuration actions
25193from templates according to the current configuration.  Unless the files
25194and actions are specified as TAGs, all are instantiated by default.
25195
25196Usage: $0 [OPTION]... [TAG]...
25197
25198  -h, --help       print this help, then exit
25199  -V, --version    print version number and configuration settings, then exit
25200      --config     print configuration, then exit
25201  -q, --quiet, --silent
25202                   do not print progress messages
25203  -d, --debug      don't remove temporary files
25204      --recheck    update $as_me by reconfiguring in the same conditions
25205      --file=FILE[:TEMPLATE]
25206                   instantiate the configuration file FILE
25207      --header=FILE[:TEMPLATE]
25208                   instantiate the configuration header FILE
25209
25210Configuration files:
25211$config_files
25212
25213Configuration headers:
25214$config_headers
25215
25216Configuration commands:
25217$config_commands
25218
25219Report bugs to <unbound-bugs@nlnetlabs.nl or https://github.com/NLnetLabs/unbound/issues>."
25220
25221_ACEOF
25222ac_cs_config=`printf "%s\n" "$ac_configure_args" | sed "$ac_safe_unquote"`
25223ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\''/g"`
25224cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
25225ac_cs_config='$ac_cs_config_escaped'
25226ac_cs_version="\\
25227unbound config.status 1.21.0
25228configured by $0, generated by GNU Autoconf 2.71,
25229  with options \\"\$ac_cs_config\\"
25230
25231Copyright (C) 2021 Free Software Foundation, Inc.
25232This config.status script is free software; the Free Software Foundation
25233gives unlimited permission to copy, distribute and modify it."
25234
25235ac_pwd='$ac_pwd'
25236srcdir='$srcdir'
25237AWK='$AWK'
25238test -n "\$AWK" || AWK=awk
25239_ACEOF
25240
25241cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
25242# The default lists apply if the user does not specify any file.
25243ac_need_defaults=:
25244while test $# != 0
25245do
25246  case $1 in
25247  --*=?*)
25248    ac_option=`expr "X$1" : 'X\([^=]*\)='`
25249    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
25250    ac_shift=:
25251    ;;
25252  --*=)
25253    ac_option=`expr "X$1" : 'X\([^=]*\)='`
25254    ac_optarg=
25255    ac_shift=:
25256    ;;
25257  *)
25258    ac_option=$1
25259    ac_optarg=$2
25260    ac_shift=shift
25261    ;;
25262  esac
25263
25264  case $ac_option in
25265  # Handling of the options.
25266  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
25267    ac_cs_recheck=: ;;
25268  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
25269    printf "%s\n" "$ac_cs_version"; exit ;;
25270  --config | --confi | --conf | --con | --co | --c )
25271    printf "%s\n" "$ac_cs_config"; exit ;;
25272  --debug | --debu | --deb | --de | --d | -d )
25273    debug=: ;;
25274  --file | --fil | --fi | --f )
25275    $ac_shift
25276    case $ac_optarg in
25277    *\'*) ac_optarg=`printf "%s\n" "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
25278    '') as_fn_error $? "missing file argument" ;;
25279    esac
25280    as_fn_append CONFIG_FILES " '$ac_optarg'"
25281    ac_need_defaults=false;;
25282  --header | --heade | --head | --hea )
25283    $ac_shift
25284    case $ac_optarg in
25285    *\'*) ac_optarg=`printf "%s\n" "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
25286    esac
25287    as_fn_append CONFIG_HEADERS " '$ac_optarg'"
25288    ac_need_defaults=false;;
25289  --he | --h)
25290    # Conflict between --help and --header
25291    as_fn_error $? "ambiguous option: \`$1'
25292Try \`$0 --help' for more information.";;
25293  --help | --hel | -h )
25294    printf "%s\n" "$ac_cs_usage"; exit ;;
25295  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
25296  | -silent | --silent | --silen | --sile | --sil | --si | --s)
25297    ac_cs_silent=: ;;
25298
25299  # This is an error.
25300  -*) as_fn_error $? "unrecognized option: \`$1'
25301Try \`$0 --help' for more information." ;;
25302
25303  *) as_fn_append ac_config_targets " $1"
25304     ac_need_defaults=false ;;
25305
25306  esac
25307  shift
25308done
25309
25310ac_configure_extra_args=
25311
25312if $ac_cs_silent; then
25313  exec 6>/dev/null
25314  ac_configure_extra_args="$ac_configure_extra_args --silent"
25315fi
25316
25317_ACEOF
25318cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
25319if \$ac_cs_recheck; then
25320  set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
25321  shift
25322  \printf "%s\n" "running CONFIG_SHELL=$SHELL \$*" >&6
25323  CONFIG_SHELL='$SHELL'
25324  export CONFIG_SHELL
25325  exec "\$@"
25326fi
25327
25328_ACEOF
25329cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
25330exec 5>>config.log
25331{
25332  echo
25333  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
25334## Running $as_me. ##
25335_ASBOX
25336  printf "%s\n" "$ac_log"
25337} >&5
25338
25339_ACEOF
25340cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
25341#
25342# INIT-COMMANDS
25343#
25344
25345
25346# The HP-UX ksh and POSIX shell print the target directory to stdout
25347# if CDPATH is set.
25348(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
25349
25350sed_quote_subst='$sed_quote_subst'
25351double_quote_subst='$double_quote_subst'
25352delay_variable_subst='$delay_variable_subst'
25353macro_version='`$ECHO "$macro_version" | $SED "$delay_single_quote_subst"`'
25354macro_revision='`$ECHO "$macro_revision" | $SED "$delay_single_quote_subst"`'
25355enable_shared='`$ECHO "$enable_shared" | $SED "$delay_single_quote_subst"`'
25356enable_static='`$ECHO "$enable_static" | $SED "$delay_single_quote_subst"`'
25357pic_mode='`$ECHO "$pic_mode" | $SED "$delay_single_quote_subst"`'
25358enable_fast_install='`$ECHO "$enable_fast_install" | $SED "$delay_single_quote_subst"`'
25359shared_archive_member_spec='`$ECHO "$shared_archive_member_spec" | $SED "$delay_single_quote_subst"`'
25360SHELL='`$ECHO "$SHELL" | $SED "$delay_single_quote_subst"`'
25361ECHO='`$ECHO "$ECHO" | $SED "$delay_single_quote_subst"`'
25362PATH_SEPARATOR='`$ECHO "$PATH_SEPARATOR" | $SED "$delay_single_quote_subst"`'
25363host_alias='`$ECHO "$host_alias" | $SED "$delay_single_quote_subst"`'
25364host='`$ECHO "$host" | $SED "$delay_single_quote_subst"`'
25365host_os='`$ECHO "$host_os" | $SED "$delay_single_quote_subst"`'
25366build_alias='`$ECHO "$build_alias" | $SED "$delay_single_quote_subst"`'
25367build='`$ECHO "$build" | $SED "$delay_single_quote_subst"`'
25368build_os='`$ECHO "$build_os" | $SED "$delay_single_quote_subst"`'
25369SED='`$ECHO "$SED" | $SED "$delay_single_quote_subst"`'
25370Xsed='`$ECHO "$Xsed" | $SED "$delay_single_quote_subst"`'
25371GREP='`$ECHO "$GREP" | $SED "$delay_single_quote_subst"`'
25372EGREP='`$ECHO "$EGREP" | $SED "$delay_single_quote_subst"`'
25373FGREP='`$ECHO "$FGREP" | $SED "$delay_single_quote_subst"`'
25374LD='`$ECHO "$LD" | $SED "$delay_single_quote_subst"`'
25375NM='`$ECHO "$NM" | $SED "$delay_single_quote_subst"`'
25376LN_S='`$ECHO "$LN_S" | $SED "$delay_single_quote_subst"`'
25377max_cmd_len='`$ECHO "$max_cmd_len" | $SED "$delay_single_quote_subst"`'
25378ac_objext='`$ECHO "$ac_objext" | $SED "$delay_single_quote_subst"`'
25379exeext='`$ECHO "$exeext" | $SED "$delay_single_quote_subst"`'
25380lt_unset='`$ECHO "$lt_unset" | $SED "$delay_single_quote_subst"`'
25381lt_SP2NL='`$ECHO "$lt_SP2NL" | $SED "$delay_single_quote_subst"`'
25382lt_NL2SP='`$ECHO "$lt_NL2SP" | $SED "$delay_single_quote_subst"`'
25383lt_cv_to_host_file_cmd='`$ECHO "$lt_cv_to_host_file_cmd" | $SED "$delay_single_quote_subst"`'
25384lt_cv_to_tool_file_cmd='`$ECHO "$lt_cv_to_tool_file_cmd" | $SED "$delay_single_quote_subst"`'
25385reload_flag='`$ECHO "$reload_flag" | $SED "$delay_single_quote_subst"`'
25386reload_cmds='`$ECHO "$reload_cmds" | $SED "$delay_single_quote_subst"`'
25387OBJDUMP='`$ECHO "$OBJDUMP" | $SED "$delay_single_quote_subst"`'
25388deplibs_check_method='`$ECHO "$deplibs_check_method" | $SED "$delay_single_quote_subst"`'
25389file_magic_cmd='`$ECHO "$file_magic_cmd" | $SED "$delay_single_quote_subst"`'
25390file_magic_glob='`$ECHO "$file_magic_glob" | $SED "$delay_single_quote_subst"`'
25391want_nocaseglob='`$ECHO "$want_nocaseglob" | $SED "$delay_single_quote_subst"`'
25392DLLTOOL='`$ECHO "$DLLTOOL" | $SED "$delay_single_quote_subst"`'
25393sharedlib_from_linklib_cmd='`$ECHO "$sharedlib_from_linklib_cmd" | $SED "$delay_single_quote_subst"`'
25394AR='`$ECHO "$AR" | $SED "$delay_single_quote_subst"`'
25395AR_FLAGS='`$ECHO "$AR_FLAGS" | $SED "$delay_single_quote_subst"`'
25396archiver_list_spec='`$ECHO "$archiver_list_spec" | $SED "$delay_single_quote_subst"`'
25397STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`'
25398RANLIB='`$ECHO "$RANLIB" | $SED "$delay_single_quote_subst"`'
25399old_postinstall_cmds='`$ECHO "$old_postinstall_cmds" | $SED "$delay_single_quote_subst"`'
25400old_postuninstall_cmds='`$ECHO "$old_postuninstall_cmds" | $SED "$delay_single_quote_subst"`'
25401old_archive_cmds='`$ECHO "$old_archive_cmds" | $SED "$delay_single_quote_subst"`'
25402lock_old_archive_extraction='`$ECHO "$lock_old_archive_extraction" | $SED "$delay_single_quote_subst"`'
25403CC='`$ECHO "$CC" | $SED "$delay_single_quote_subst"`'
25404CFLAGS='`$ECHO "$CFLAGS" | $SED "$delay_single_quote_subst"`'
25405compiler='`$ECHO "$compiler" | $SED "$delay_single_quote_subst"`'
25406GCC='`$ECHO "$GCC" | $SED "$delay_single_quote_subst"`'
25407lt_cv_sys_global_symbol_pipe='`$ECHO "$lt_cv_sys_global_symbol_pipe" | $SED "$delay_single_quote_subst"`'
25408lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`'
25409lt_cv_sys_global_symbol_to_import='`$ECHO "$lt_cv_sys_global_symbol_to_import" | $SED "$delay_single_quote_subst"`'
25410lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`'
25411lt_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"`'
25412lt_cv_nm_interface='`$ECHO "$lt_cv_nm_interface" | $SED "$delay_single_quote_subst"`'
25413nm_file_list_spec='`$ECHO "$nm_file_list_spec" | $SED "$delay_single_quote_subst"`'
25414lt_sysroot='`$ECHO "$lt_sysroot" | $SED "$delay_single_quote_subst"`'
25415lt_cv_truncate_bin='`$ECHO "$lt_cv_truncate_bin" | $SED "$delay_single_quote_subst"`'
25416objdir='`$ECHO "$objdir" | $SED "$delay_single_quote_subst"`'
25417MAGIC_CMD='`$ECHO "$MAGIC_CMD" | $SED "$delay_single_quote_subst"`'
25418lt_prog_compiler_no_builtin_flag='`$ECHO "$lt_prog_compiler_no_builtin_flag" | $SED "$delay_single_quote_subst"`'
25419lt_prog_compiler_pic='`$ECHO "$lt_prog_compiler_pic" | $SED "$delay_single_quote_subst"`'
25420lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`'
25421lt_prog_compiler_static='`$ECHO "$lt_prog_compiler_static" | $SED "$delay_single_quote_subst"`'
25422lt_cv_prog_compiler_c_o='`$ECHO "$lt_cv_prog_compiler_c_o" | $SED "$delay_single_quote_subst"`'
25423need_locks='`$ECHO "$need_locks" | $SED "$delay_single_quote_subst"`'
25424MANIFEST_TOOL='`$ECHO "$MANIFEST_TOOL" | $SED "$delay_single_quote_subst"`'
25425DSYMUTIL='`$ECHO "$DSYMUTIL" | $SED "$delay_single_quote_subst"`'
25426NMEDIT='`$ECHO "$NMEDIT" | $SED "$delay_single_quote_subst"`'
25427LIPO='`$ECHO "$LIPO" | $SED "$delay_single_quote_subst"`'
25428OTOOL='`$ECHO "$OTOOL" | $SED "$delay_single_quote_subst"`'
25429OTOOL64='`$ECHO "$OTOOL64" | $SED "$delay_single_quote_subst"`'
25430libext='`$ECHO "$libext" | $SED "$delay_single_quote_subst"`'
25431shrext_cmds='`$ECHO "$shrext_cmds" | $SED "$delay_single_quote_subst"`'
25432extract_expsyms_cmds='`$ECHO "$extract_expsyms_cmds" | $SED "$delay_single_quote_subst"`'
25433archive_cmds_need_lc='`$ECHO "$archive_cmds_need_lc" | $SED "$delay_single_quote_subst"`'
25434enable_shared_with_static_runtimes='`$ECHO "$enable_shared_with_static_runtimes" | $SED "$delay_single_quote_subst"`'
25435export_dynamic_flag_spec='`$ECHO "$export_dynamic_flag_spec" | $SED "$delay_single_quote_subst"`'
25436whole_archive_flag_spec='`$ECHO "$whole_archive_flag_spec" | $SED "$delay_single_quote_subst"`'
25437compiler_needs_object='`$ECHO "$compiler_needs_object" | $SED "$delay_single_quote_subst"`'
25438old_archive_from_new_cmds='`$ECHO "$old_archive_from_new_cmds" | $SED "$delay_single_quote_subst"`'
25439old_archive_from_expsyms_cmds='`$ECHO "$old_archive_from_expsyms_cmds" | $SED "$delay_single_quote_subst"`'
25440archive_cmds='`$ECHO "$archive_cmds" | $SED "$delay_single_quote_subst"`'
25441archive_expsym_cmds='`$ECHO "$archive_expsym_cmds" | $SED "$delay_single_quote_subst"`'
25442module_cmds='`$ECHO "$module_cmds" | $SED "$delay_single_quote_subst"`'
25443module_expsym_cmds='`$ECHO "$module_expsym_cmds" | $SED "$delay_single_quote_subst"`'
25444with_gnu_ld='`$ECHO "$with_gnu_ld" | $SED "$delay_single_quote_subst"`'
25445allow_undefined_flag='`$ECHO "$allow_undefined_flag" | $SED "$delay_single_quote_subst"`'
25446no_undefined_flag='`$ECHO "$no_undefined_flag" | $SED "$delay_single_quote_subst"`'
25447hardcode_libdir_flag_spec='`$ECHO "$hardcode_libdir_flag_spec" | $SED "$delay_single_quote_subst"`'
25448hardcode_libdir_separator='`$ECHO "$hardcode_libdir_separator" | $SED "$delay_single_quote_subst"`'
25449hardcode_direct='`$ECHO "$hardcode_direct" | $SED "$delay_single_quote_subst"`'
25450hardcode_direct_absolute='`$ECHO "$hardcode_direct_absolute" | $SED "$delay_single_quote_subst"`'
25451hardcode_minus_L='`$ECHO "$hardcode_minus_L" | $SED "$delay_single_quote_subst"`'
25452hardcode_shlibpath_var='`$ECHO "$hardcode_shlibpath_var" | $SED "$delay_single_quote_subst"`'
25453hardcode_automatic='`$ECHO "$hardcode_automatic" | $SED "$delay_single_quote_subst"`'
25454inherit_rpath='`$ECHO "$inherit_rpath" | $SED "$delay_single_quote_subst"`'
25455link_all_deplibs='`$ECHO "$link_all_deplibs" | $SED "$delay_single_quote_subst"`'
25456always_export_symbols='`$ECHO "$always_export_symbols" | $SED "$delay_single_quote_subst"`'
25457export_symbols_cmds='`$ECHO "$export_symbols_cmds" | $SED "$delay_single_quote_subst"`'
25458exclude_expsyms='`$ECHO "$exclude_expsyms" | $SED "$delay_single_quote_subst"`'
25459include_expsyms='`$ECHO "$include_expsyms" | $SED "$delay_single_quote_subst"`'
25460prelink_cmds='`$ECHO "$prelink_cmds" | $SED "$delay_single_quote_subst"`'
25461postlink_cmds='`$ECHO "$postlink_cmds" | $SED "$delay_single_quote_subst"`'
25462file_list_spec='`$ECHO "$file_list_spec" | $SED "$delay_single_quote_subst"`'
25463variables_saved_for_relink='`$ECHO "$variables_saved_for_relink" | $SED "$delay_single_quote_subst"`'
25464need_lib_prefix='`$ECHO "$need_lib_prefix" | $SED "$delay_single_quote_subst"`'
25465need_version='`$ECHO "$need_version" | $SED "$delay_single_quote_subst"`'
25466version_type='`$ECHO "$version_type" | $SED "$delay_single_quote_subst"`'
25467runpath_var='`$ECHO "$runpath_var" | $SED "$delay_single_quote_subst"`'
25468shlibpath_var='`$ECHO "$shlibpath_var" | $SED "$delay_single_quote_subst"`'
25469shlibpath_overrides_runpath='`$ECHO "$shlibpath_overrides_runpath" | $SED "$delay_single_quote_subst"`'
25470libname_spec='`$ECHO "$libname_spec" | $SED "$delay_single_quote_subst"`'
25471library_names_spec='`$ECHO "$library_names_spec" | $SED "$delay_single_quote_subst"`'
25472soname_spec='`$ECHO "$soname_spec" | $SED "$delay_single_quote_subst"`'
25473install_override_mode='`$ECHO "$install_override_mode" | $SED "$delay_single_quote_subst"`'
25474postinstall_cmds='`$ECHO "$postinstall_cmds" | $SED "$delay_single_quote_subst"`'
25475postuninstall_cmds='`$ECHO "$postuninstall_cmds" | $SED "$delay_single_quote_subst"`'
25476finish_cmds='`$ECHO "$finish_cmds" | $SED "$delay_single_quote_subst"`'
25477finish_eval='`$ECHO "$finish_eval" | $SED "$delay_single_quote_subst"`'
25478hardcode_into_libs='`$ECHO "$hardcode_into_libs" | $SED "$delay_single_quote_subst"`'
25479sys_lib_search_path_spec='`$ECHO "$sys_lib_search_path_spec" | $SED "$delay_single_quote_subst"`'
25480configure_time_dlsearch_path='`$ECHO "$configure_time_dlsearch_path" | $SED "$delay_single_quote_subst"`'
25481configure_time_lt_sys_library_path='`$ECHO "$configure_time_lt_sys_library_path" | $SED "$delay_single_quote_subst"`'
25482hardcode_action='`$ECHO "$hardcode_action" | $SED "$delay_single_quote_subst"`'
25483enable_dlopen='`$ECHO "$enable_dlopen" | $SED "$delay_single_quote_subst"`'
25484enable_dlopen_self='`$ECHO "$enable_dlopen_self" | $SED "$delay_single_quote_subst"`'
25485enable_dlopen_self_static='`$ECHO "$enable_dlopen_self_static" | $SED "$delay_single_quote_subst"`'
25486old_striplib='`$ECHO "$old_striplib" | $SED "$delay_single_quote_subst"`'
25487striplib='`$ECHO "$striplib" | $SED "$delay_single_quote_subst"`'
25488
25489LTCC='$LTCC'
25490LTCFLAGS='$LTCFLAGS'
25491compiler='$compiler_DEFAULT'
25492
25493# A function that is used when there is no print builtin or printf.
25494func_fallback_echo ()
25495{
25496  eval 'cat <<_LTECHO_EOF
25497\$1
25498_LTECHO_EOF'
25499}
25500
25501# Quote evaled strings.
25502for var in SHELL \
25503ECHO \
25504PATH_SEPARATOR \
25505SED \
25506GREP \
25507EGREP \
25508FGREP \
25509LD \
25510NM \
25511LN_S \
25512lt_SP2NL \
25513lt_NL2SP \
25514reload_flag \
25515OBJDUMP \
25516deplibs_check_method \
25517file_magic_cmd \
25518file_magic_glob \
25519want_nocaseglob \
25520DLLTOOL \
25521sharedlib_from_linklib_cmd \
25522AR \
25523AR_FLAGS \
25524archiver_list_spec \
25525STRIP \
25526RANLIB \
25527CC \
25528CFLAGS \
25529compiler \
25530lt_cv_sys_global_symbol_pipe \
25531lt_cv_sys_global_symbol_to_cdecl \
25532lt_cv_sys_global_symbol_to_import \
25533lt_cv_sys_global_symbol_to_c_name_address \
25534lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \
25535lt_cv_nm_interface \
25536nm_file_list_spec \
25537lt_cv_truncate_bin \
25538lt_prog_compiler_no_builtin_flag \
25539lt_prog_compiler_pic \
25540lt_prog_compiler_wl \
25541lt_prog_compiler_static \
25542lt_cv_prog_compiler_c_o \
25543need_locks \
25544MANIFEST_TOOL \
25545DSYMUTIL \
25546NMEDIT \
25547LIPO \
25548OTOOL \
25549OTOOL64 \
25550shrext_cmds \
25551export_dynamic_flag_spec \
25552whole_archive_flag_spec \
25553compiler_needs_object \
25554with_gnu_ld \
25555allow_undefined_flag \
25556no_undefined_flag \
25557hardcode_libdir_flag_spec \
25558hardcode_libdir_separator \
25559exclude_expsyms \
25560include_expsyms \
25561file_list_spec \
25562variables_saved_for_relink \
25563libname_spec \
25564library_names_spec \
25565soname_spec \
25566install_override_mode \
25567finish_eval \
25568old_striplib \
25569striplib; do
25570    case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
25571    *[\\\\\\\`\\"\\\$]*)
25572      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes
25573      ;;
25574    *)
25575      eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
25576      ;;
25577    esac
25578done
25579
25580# Double-quote double-evaled strings.
25581for var in reload_cmds \
25582old_postinstall_cmds \
25583old_postuninstall_cmds \
25584old_archive_cmds \
25585extract_expsyms_cmds \
25586old_archive_from_new_cmds \
25587old_archive_from_expsyms_cmds \
25588archive_cmds \
25589archive_expsym_cmds \
25590module_cmds \
25591module_expsym_cmds \
25592export_symbols_cmds \
25593prelink_cmds \
25594postlink_cmds \
25595postinstall_cmds \
25596postuninstall_cmds \
25597finish_cmds \
25598sys_lib_search_path_spec \
25599configure_time_dlsearch_path \
25600configure_time_lt_sys_library_path; do
25601    case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
25602    *[\\\\\\\`\\"\\\$]*)
25603      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes
25604      ;;
25605    *)
25606      eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
25607      ;;
25608    esac
25609done
25610
25611ac_aux_dir='$ac_aux_dir'
25612
25613# See if we are running on zsh, and set the options that allow our
25614# commands through without removal of \ escapes INIT.
25615if test -n "\${ZSH_VERSION+set}"; then
25616   setopt NO_GLOB_SUBST
25617fi
25618
25619
25620    PACKAGE='$PACKAGE'
25621    VERSION='$VERSION'
25622    RM='$RM'
25623    ofile='$ofile'
25624
25625
25626
25627
25628_ACEOF
25629
25630cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
25631
25632# Handling of arguments.
25633for ac_config_target in $ac_config_targets
25634do
25635  case $ac_config_target in
25636    "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;;
25637    "disable-rpath") CONFIG_COMMANDS="$CONFIG_COMMANDS disable-rpath" ;;
25638    "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
25639    "doc/example.conf") CONFIG_FILES="$CONFIG_FILES doc/example.conf" ;;
25640    "doc/libunbound.3") CONFIG_FILES="$CONFIG_FILES doc/libunbound.3" ;;
25641    "doc/unbound.8") CONFIG_FILES="$CONFIG_FILES doc/unbound.8" ;;
25642    "doc/unbound-anchor.8") CONFIG_FILES="$CONFIG_FILES doc/unbound-anchor.8" ;;
25643    "doc/unbound-checkconf.8") CONFIG_FILES="$CONFIG_FILES doc/unbound-checkconf.8" ;;
25644    "doc/unbound.conf.5") CONFIG_FILES="$CONFIG_FILES doc/unbound.conf.5" ;;
25645    "doc/unbound-control.8") CONFIG_FILES="$CONFIG_FILES doc/unbound-control.8" ;;
25646    "doc/unbound-host.1") CONFIG_FILES="$CONFIG_FILES doc/unbound-host.1" ;;
25647    "smallapp/unbound-control-setup.sh") CONFIG_FILES="$CONFIG_FILES smallapp/unbound-control-setup.sh" ;;
25648    "dnstap/dnstap_config.h") CONFIG_FILES="$CONFIG_FILES dnstap/dnstap_config.h" ;;
25649    "dnscrypt/dnscrypt_config.h") CONFIG_FILES="$CONFIG_FILES dnscrypt/dnscrypt_config.h" ;;
25650    "contrib/libunbound.pc") CONFIG_FILES="$CONFIG_FILES contrib/libunbound.pc" ;;
25651    "contrib/unbound.socket") CONFIG_FILES="$CONFIG_FILES contrib/unbound.socket" ;;
25652    "contrib/unbound.service") CONFIG_FILES="$CONFIG_FILES contrib/unbound.service" ;;
25653    "contrib/unbound_portable.service") CONFIG_FILES="$CONFIG_FILES contrib/unbound_portable.service" ;;
25654    "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
25655
25656  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
25657  esac
25658done
25659
25660
25661# If the user did not use the arguments to specify the items to instantiate,
25662# then the envvar interface is used.  Set only those that are not.
25663# We use the long form for the default assignment because of an extremely
25664# bizarre bug on SunOS 4.1.3.
25665if $ac_need_defaults; then
25666  test ${CONFIG_FILES+y} || CONFIG_FILES=$config_files
25667  test ${CONFIG_HEADERS+y} || CONFIG_HEADERS=$config_headers
25668  test ${CONFIG_COMMANDS+y} || CONFIG_COMMANDS=$config_commands
25669fi
25670
25671# Have a temporary directory for convenience.  Make it in the build tree
25672# simply because there is no reason against having it here, and in addition,
25673# creating and moving files from /tmp can sometimes cause problems.
25674# Hook for its removal unless debugging.
25675# Note that there is a small window in which the directory will not be cleaned:
25676# after its creation but before its name has been assigned to `$tmp'.
25677$debug ||
25678{
25679  tmp= ac_tmp=
25680  trap 'exit_status=$?
25681  : "${ac_tmp:=$tmp}"
25682  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
25683' 0
25684  trap 'as_fn_exit 1' 1 2 13 15
25685}
25686# Create a (secure) tmp directory for tmp files.
25687
25688{
25689  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
25690  test -d "$tmp"
25691}  ||
25692{
25693  tmp=./conf$$-$RANDOM
25694  (umask 077 && mkdir "$tmp")
25695} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
25696ac_tmp=$tmp
25697
25698# Set up the scripts for CONFIG_FILES section.
25699# No need to generate them if there are no CONFIG_FILES.
25700# This happens for instance with `./config.status config.h'.
25701if test -n "$CONFIG_FILES"; then
25702
25703
25704ac_cr=`echo X | tr X '\015'`
25705# On cygwin, bash can eat \r inside `` if the user requested igncr.
25706# But we know of no other shell where ac_cr would be empty at this
25707# point, so we can use a bashism as a fallback.
25708if test "x$ac_cr" = x; then
25709  eval ac_cr=\$\'\\r\'
25710fi
25711ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
25712if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
25713  ac_cs_awk_cr='\\r'
25714else
25715  ac_cs_awk_cr=$ac_cr
25716fi
25717
25718echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
25719_ACEOF
25720
25721
25722{
25723  echo "cat >conf$$subs.awk <<_ACEOF" &&
25724  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
25725  echo "_ACEOF"
25726} >conf$$subs.sh ||
25727  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
25728ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
25729ac_delim='%!_!# '
25730for ac_last_try in false false false false false :; do
25731  . ./conf$$subs.sh ||
25732    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
25733
25734  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
25735  if test $ac_delim_n = $ac_delim_num; then
25736    break
25737  elif $ac_last_try; then
25738    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
25739  else
25740    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
25741  fi
25742done
25743rm -f conf$$subs.sh
25744
25745cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
25746cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
25747_ACEOF
25748sed -n '
25749h
25750s/^/S["/; s/!.*/"]=/
25751p
25752g
25753s/^[^!]*!//
25754:repl
25755t repl
25756s/'"$ac_delim"'$//
25757t delim
25758:nl
25759h
25760s/\(.\{148\}\)..*/\1/
25761t more1
25762s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
25763p
25764n
25765b repl
25766:more1
25767s/["\\]/\\&/g; s/^/"/; s/$/"\\/
25768p
25769g
25770s/.\{148\}//
25771t nl
25772:delim
25773h
25774s/\(.\{148\}\)..*/\1/
25775t more2
25776s/["\\]/\\&/g; s/^/"/; s/$/"/
25777p
25778b
25779:more2
25780s/["\\]/\\&/g; s/^/"/; s/$/"\\/
25781p
25782g
25783s/.\{148\}//
25784t delim
25785' <conf$$subs.awk | sed '
25786/^[^""]/{
25787  N
25788  s/\n//
25789}
25790' >>$CONFIG_STATUS || ac_write_fail=1
25791rm -f conf$$subs.awk
25792cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
25793_ACAWK
25794cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
25795  for (key in S) S_is_set[key] = 1
25796  FS = ""
25797
25798}
25799{
25800  line = $ 0
25801  nfields = split(line, field, "@")
25802  substed = 0
25803  len = length(field[1])
25804  for (i = 2; i < nfields; i++) {
25805    key = field[i]
25806    keylen = length(key)
25807    if (S_is_set[key]) {
25808      value = S[key]
25809      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
25810      len += length(value) + length(field[++i])
25811      substed = 1
25812    } else
25813      len += 1 + keylen
25814  }
25815
25816  print line
25817}
25818
25819_ACAWK
25820_ACEOF
25821cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
25822if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
25823  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
25824else
25825  cat
25826fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
25827  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
25828_ACEOF
25829
25830# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
25831# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
25832# trailing colons and then remove the whole line if VPATH becomes empty
25833# (actually we leave an empty line to preserve line numbers).
25834if test "x$srcdir" = x.; then
25835  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
25836h
25837s///
25838s/^/:/
25839s/[	 ]*$/:/
25840s/:\$(srcdir):/:/g
25841s/:\${srcdir}:/:/g
25842s/:@srcdir@:/:/g
25843s/^:*//
25844s/:*$//
25845x
25846s/\(=[	 ]*\).*/\1/
25847G
25848s/\n//
25849s/^[^=]*=[	 ]*$//
25850}'
25851fi
25852
25853cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
25854fi # test -n "$CONFIG_FILES"
25855
25856# Set up the scripts for CONFIG_HEADERS section.
25857# No need to generate them if there are no CONFIG_HEADERS.
25858# This happens for instance with `./config.status Makefile'.
25859if test -n "$CONFIG_HEADERS"; then
25860cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
25861BEGIN {
25862_ACEOF
25863
25864# Transform confdefs.h into an awk script `defines.awk', embedded as
25865# here-document in config.status, that substitutes the proper values into
25866# config.h.in to produce config.h.
25867
25868# Create a delimiter string that does not exist in confdefs.h, to ease
25869# handling of long lines.
25870ac_delim='%!_!# '
25871for ac_last_try in false false :; do
25872  ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
25873  if test -z "$ac_tt"; then
25874    break
25875  elif $ac_last_try; then
25876    as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
25877  else
25878    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
25879  fi
25880done
25881
25882# For the awk script, D is an array of macro values keyed by name,
25883# likewise P contains macro parameters if any.  Preserve backslash
25884# newline sequences.
25885
25886ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
25887sed -n '
25888s/.\{148\}/&'"$ac_delim"'/g
25889t rset
25890:rset
25891s/^[	 ]*#[	 ]*define[	 ][	 ]*/ /
25892t def
25893d
25894:def
25895s/\\$//
25896t bsnl
25897s/["\\]/\\&/g
25898s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
25899D["\1"]=" \3"/p
25900s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2"/p
25901d
25902:bsnl
25903s/["\\]/\\&/g
25904s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
25905D["\1"]=" \3\\\\\\n"\\/p
25906t cont
25907s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
25908t cont
25909d
25910:cont
25911n
25912s/.\{148\}/&'"$ac_delim"'/g
25913t clear
25914:clear
25915s/\\$//
25916t bsnlc
25917s/["\\]/\\&/g; s/^/"/; s/$/"/p
25918d
25919:bsnlc
25920s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
25921b cont
25922' <confdefs.h | sed '
25923s/'"$ac_delim"'/"\\\
25924"/g' >>$CONFIG_STATUS || ac_write_fail=1
25925
25926cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
25927  for (key in D) D_is_set[key] = 1
25928  FS = ""
25929}
25930/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
25931  line = \$ 0
25932  split(line, arg, " ")
25933  if (arg[1] == "#") {
25934    defundef = arg[2]
25935    mac1 = arg[3]
25936  } else {
25937    defundef = substr(arg[1], 2)
25938    mac1 = arg[2]
25939  }
25940  split(mac1, mac2, "(") #)
25941  macro = mac2[1]
25942  prefix = substr(line, 1, index(line, defundef) - 1)
25943  if (D_is_set[macro]) {
25944    # Preserve the white space surrounding the "#".
25945    print prefix "define", macro P[macro] D[macro]
25946    next
25947  } else {
25948    # Replace #undef with comments.  This is necessary, for example,
25949    # in the case of _POSIX_SOURCE, which is predefined and required
25950    # on some systems where configure will not decide to define it.
25951    if (defundef == "undef") {
25952      print "/*", prefix defundef, macro, "*/"
25953      next
25954    }
25955  }
25956}
25957{ print }
25958_ACAWK
25959_ACEOF
25960cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
25961  as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
25962fi # test -n "$CONFIG_HEADERS"
25963
25964
25965eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS    :C $CONFIG_COMMANDS"
25966shift
25967for ac_tag
25968do
25969  case $ac_tag in
25970  :[FHLC]) ac_mode=$ac_tag; continue;;
25971  esac
25972  case $ac_mode$ac_tag in
25973  :[FHL]*:*);;
25974  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
25975  :[FH]-) ac_tag=-:-;;
25976  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
25977  esac
25978  ac_save_IFS=$IFS
25979  IFS=:
25980  set x $ac_tag
25981  IFS=$ac_save_IFS
25982  shift
25983  ac_file=$1
25984  shift
25985
25986  case $ac_mode in
25987  :L) ac_source=$1;;
25988  :[FH])
25989    ac_file_inputs=
25990    for ac_f
25991    do
25992      case $ac_f in
25993      -) ac_f="$ac_tmp/stdin";;
25994      *) # Look for the file first in the build tree, then in the source tree
25995	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
25996	 # because $ac_f cannot contain `:'.
25997	 test -f "$ac_f" ||
25998	   case $ac_f in
25999	   [\\/$]*) false;;
26000	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
26001	   esac ||
26002	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
26003      esac
26004      case $ac_f in *\'*) ac_f=`printf "%s\n" "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
26005      as_fn_append ac_file_inputs " '$ac_f'"
26006    done
26007
26008    # Let's still pretend it is `configure' which instantiates (i.e., don't
26009    # use $as_me), people would be surprised to read:
26010    #    /* config.h.  Generated by config.status.  */
26011    configure_input='Generated from '`
26012	  printf "%s\n" "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
26013	`' by configure.'
26014    if test x"$ac_file" != x-; then
26015      configure_input="$ac_file.  $configure_input"
26016      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
26017printf "%s\n" "$as_me: creating $ac_file" >&6;}
26018    fi
26019    # Neutralize special characters interpreted by sed in replacement strings.
26020    case $configure_input in #(
26021    *\&* | *\|* | *\\* )
26022       ac_sed_conf_input=`printf "%s\n" "$configure_input" |
26023       sed 's/[\\\\&|]/\\\\&/g'`;; #(
26024    *) ac_sed_conf_input=$configure_input;;
26025    esac
26026
26027    case $ac_tag in
26028    *:-:* | *:-) cat >"$ac_tmp/stdin" \
26029      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
26030    esac
26031    ;;
26032  esac
26033
26034  ac_dir=`$as_dirname -- "$ac_file" ||
26035$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
26036	 X"$ac_file" : 'X\(//\)[^/]' \| \
26037	 X"$ac_file" : 'X\(//\)$' \| \
26038	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
26039printf "%s\n" X"$ac_file" |
26040    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
26041	    s//\1/
26042	    q
26043	  }
26044	  /^X\(\/\/\)[^/].*/{
26045	    s//\1/
26046	    q
26047	  }
26048	  /^X\(\/\/\)$/{
26049	    s//\1/
26050	    q
26051	  }
26052	  /^X\(\/\).*/{
26053	    s//\1/
26054	    q
26055	  }
26056	  s/.*/./; q'`
26057  as_dir="$ac_dir"; as_fn_mkdir_p
26058  ac_builddir=.
26059
26060case "$ac_dir" in
26061.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
26062*)
26063  ac_dir_suffix=/`printf "%s\n" "$ac_dir" | sed 's|^\.[\\/]||'`
26064  # A ".." for each directory in $ac_dir_suffix.
26065  ac_top_builddir_sub=`printf "%s\n" "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
26066  case $ac_top_builddir_sub in
26067  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
26068  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
26069  esac ;;
26070esac
26071ac_abs_top_builddir=$ac_pwd
26072ac_abs_builddir=$ac_pwd$ac_dir_suffix
26073# for backward compatibility:
26074ac_top_builddir=$ac_top_build_prefix
26075
26076case $srcdir in
26077  .)  # We are building in place.
26078    ac_srcdir=.
26079    ac_top_srcdir=$ac_top_builddir_sub
26080    ac_abs_top_srcdir=$ac_pwd ;;
26081  [\\/]* | ?:[\\/]* )  # Absolute name.
26082    ac_srcdir=$srcdir$ac_dir_suffix;
26083    ac_top_srcdir=$srcdir
26084    ac_abs_top_srcdir=$srcdir ;;
26085  *) # Relative name.
26086    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
26087    ac_top_srcdir=$ac_top_build_prefix$srcdir
26088    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
26089esac
26090ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
26091
26092
26093  case $ac_mode in
26094  :F)
26095  #
26096  # CONFIG_FILE
26097  #
26098
26099_ACEOF
26100
26101cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
26102# If the template does not know about datarootdir, expand it.
26103# FIXME: This hack should be removed a few years after 2.60.
26104ac_datarootdir_hack=; ac_datarootdir_seen=
26105ac_sed_dataroot='
26106/datarootdir/ {
26107  p
26108  q
26109}
26110/@datadir@/p
26111/@docdir@/p
26112/@infodir@/p
26113/@localedir@/p
26114/@mandir@/p'
26115case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
26116*datarootdir*) ac_datarootdir_seen=yes;;
26117*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
26118  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
26119printf "%s\n" "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
26120_ACEOF
26121cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
26122  ac_datarootdir_hack='
26123  s&@datadir@&$datadir&g
26124  s&@docdir@&$docdir&g
26125  s&@infodir@&$infodir&g
26126  s&@localedir@&$localedir&g
26127  s&@mandir@&$mandir&g
26128  s&\\\${datarootdir}&$datarootdir&g' ;;
26129esac
26130_ACEOF
26131
26132# Neutralize VPATH when `$srcdir' = `.'.
26133# Shell code in configure.ac might set extrasub.
26134# FIXME: do we really want to maintain this feature?
26135cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
26136ac_sed_extra="$ac_vpsub
26137$extrasub
26138_ACEOF
26139cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
26140:t
26141/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
26142s|@configure_input@|$ac_sed_conf_input|;t t
26143s&@top_builddir@&$ac_top_builddir_sub&;t t
26144s&@top_build_prefix@&$ac_top_build_prefix&;t t
26145s&@srcdir@&$ac_srcdir&;t t
26146s&@abs_srcdir@&$ac_abs_srcdir&;t t
26147s&@top_srcdir@&$ac_top_srcdir&;t t
26148s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
26149s&@builddir@&$ac_builddir&;t t
26150s&@abs_builddir@&$ac_abs_builddir&;t t
26151s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
26152$ac_datarootdir_hack
26153"
26154eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
26155  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
26156
26157test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
26158  { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
26159  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' \
26160      "$ac_tmp/out"`; test -z "$ac_out"; } &&
26161  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
26162which seems to be undefined.  Please make sure it is defined" >&5
26163printf "%s\n" "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
26164which seems to be undefined.  Please make sure it is defined" >&2;}
26165
26166  rm -f "$ac_tmp/stdin"
26167  case $ac_file in
26168  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
26169  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
26170  esac \
26171  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
26172 ;;
26173  :H)
26174  #
26175  # CONFIG_HEADER
26176  #
26177  if test x"$ac_file" != x-; then
26178    {
26179      printf "%s\n" "/* $configure_input  */" >&1 \
26180      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
26181    } >"$ac_tmp/config.h" \
26182      || as_fn_error $? "could not create $ac_file" "$LINENO" 5
26183    if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
26184      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
26185printf "%s\n" "$as_me: $ac_file is unchanged" >&6;}
26186    else
26187      rm -f "$ac_file"
26188      mv "$ac_tmp/config.h" "$ac_file" \
26189	|| as_fn_error $? "could not create $ac_file" "$LINENO" 5
26190    fi
26191  else
26192    printf "%s\n" "/* $configure_input  */" >&1 \
26193      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
26194      || as_fn_error $? "could not create -" "$LINENO" 5
26195  fi
26196 ;;
26197
26198  :C)  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
26199printf "%s\n" "$as_me: executing $ac_file commands" >&6;}
26200 ;;
26201  esac
26202
26203
26204  case $ac_file$ac_mode in
26205    "libtool":C)
26206
26207    # See if we are running on zsh, and set the options that allow our
26208    # commands through without removal of \ escapes.
26209    if test -n "${ZSH_VERSION+set}"; then
26210      setopt NO_GLOB_SUBST
26211    fi
26212
26213    cfgfile=${ofile}T
26214    trap "$RM \"$cfgfile\"; exit 1" 1 2 15
26215    $RM "$cfgfile"
26216
26217    cat <<_LT_EOF >> "$cfgfile"
26218#! $SHELL
26219# Generated automatically by $as_me ($PACKAGE) $VERSION
26220# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
26221# NOTE: Changes made to this file will be lost: look at ltmain.sh.
26222
26223# Provide generalized library-building support services.
26224# Written by Gordon Matzigkeit, 1996
26225
26226# Copyright (C) 2014 Free Software Foundation, Inc.
26227# This is free software; see the source for copying conditions.  There is NO
26228# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
26229
26230# GNU Libtool is free software; you can redistribute it and/or modify
26231# it under the terms of the GNU General Public License as published by
26232# the Free Software Foundation; either version 2 of of the License, or
26233# (at your option) any later version.
26234#
26235# As a special exception to the GNU General Public License, if you
26236# distribute this file as part of a program or library that is built
26237# using GNU Libtool, you may include this file under the  same
26238# distribution terms that you use for the rest of that program.
26239#
26240# GNU Libtool is distributed in the hope that it will be useful, but
26241# WITHOUT ANY WARRANTY; without even the implied warranty of
26242# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
26243# GNU General Public License for more details.
26244#
26245# You should have received a copy of the GNU General Public License
26246# along with this program.  If not, see <http://www.gnu.org/licenses/>.
26247
26248
26249# The names of the tagged configurations supported by this script.
26250available_tags=''
26251
26252# Configured defaults for sys_lib_dlsearch_path munging.
26253: \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"}
26254
26255# ### BEGIN LIBTOOL CONFIG
26256
26257# Which release of libtool.m4 was used?
26258macro_version=$macro_version
26259macro_revision=$macro_revision
26260
26261# Whether or not to build shared libraries.
26262build_libtool_libs=$enable_shared
26263
26264# Whether or not to build static libraries.
26265build_old_libs=$enable_static
26266
26267# What type of objects to build.
26268pic_mode=$pic_mode
26269
26270# Whether or not to optimize for fast installation.
26271fast_install=$enable_fast_install
26272
26273# Shared archive member basename,for filename based shared library versioning on AIX.
26274shared_archive_member_spec=$shared_archive_member_spec
26275
26276# Shell to use when invoking shell scripts.
26277SHELL=$lt_SHELL
26278
26279# An echo program that protects backslashes.
26280ECHO=$lt_ECHO
26281
26282# The PATH separator for the build system.
26283PATH_SEPARATOR=$lt_PATH_SEPARATOR
26284
26285# The host system.
26286host_alias=$host_alias
26287host=$host
26288host_os=$host_os
26289
26290# The build system.
26291build_alias=$build_alias
26292build=$build
26293build_os=$build_os
26294
26295# A sed program that does not truncate output.
26296SED=$lt_SED
26297
26298# Sed that helps us avoid accidentally triggering echo(1) options like -n.
26299Xsed="\$SED -e 1s/^X//"
26300
26301# A grep program that handles long lines.
26302GREP=$lt_GREP
26303
26304# An ERE matcher.
26305EGREP=$lt_EGREP
26306
26307# A literal string matcher.
26308FGREP=$lt_FGREP
26309
26310# A BSD- or MS-compatible name lister.
26311NM=$lt_NM
26312
26313# Whether we need soft or hard links.
26314LN_S=$lt_LN_S
26315
26316# What is the maximum length of a command?
26317max_cmd_len=$max_cmd_len
26318
26319# Object file suffix (normally "o").
26320objext=$ac_objext
26321
26322# Executable file suffix (normally "").
26323exeext=$exeext
26324
26325# whether the shell understands "unset".
26326lt_unset=$lt_unset
26327
26328# turn spaces into newlines.
26329SP2NL=$lt_lt_SP2NL
26330
26331# turn newlines into spaces.
26332NL2SP=$lt_lt_NL2SP
26333
26334# convert \$build file names to \$host format.
26335to_host_file_cmd=$lt_cv_to_host_file_cmd
26336
26337# convert \$build files to toolchain format.
26338to_tool_file_cmd=$lt_cv_to_tool_file_cmd
26339
26340# An object symbol dumper.
26341OBJDUMP=$lt_OBJDUMP
26342
26343# Method to check whether dependent libraries are shared objects.
26344deplibs_check_method=$lt_deplibs_check_method
26345
26346# Command to use when deplibs_check_method = "file_magic".
26347file_magic_cmd=$lt_file_magic_cmd
26348
26349# How to find potential files when deplibs_check_method = "file_magic".
26350file_magic_glob=$lt_file_magic_glob
26351
26352# Find potential files using nocaseglob when deplibs_check_method = "file_magic".
26353want_nocaseglob=$lt_want_nocaseglob
26354
26355# DLL creation program.
26356DLLTOOL=$lt_DLLTOOL
26357
26358# Command to associate shared and link libraries.
26359sharedlib_from_linklib_cmd=$lt_sharedlib_from_linklib_cmd
26360
26361# The archiver.
26362AR=$lt_AR
26363
26364# Flags to create an archive.
26365AR_FLAGS=$lt_AR_FLAGS
26366
26367# How to feed a file listing to the archiver.
26368archiver_list_spec=$lt_archiver_list_spec
26369
26370# A symbol stripping program.
26371STRIP=$lt_STRIP
26372
26373# Commands used to install an old-style archive.
26374RANLIB=$lt_RANLIB
26375old_postinstall_cmds=$lt_old_postinstall_cmds
26376old_postuninstall_cmds=$lt_old_postuninstall_cmds
26377
26378# Whether to use a lock for old archive extraction.
26379lock_old_archive_extraction=$lock_old_archive_extraction
26380
26381# A C compiler.
26382LTCC=$lt_CC
26383
26384# LTCC compiler flags.
26385LTCFLAGS=$lt_CFLAGS
26386
26387# Take the output of nm and produce a listing of raw symbols and C names.
26388global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
26389
26390# Transform the output of nm in a proper C declaration.
26391global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
26392
26393# Transform the output of nm into a list of symbols to manually relocate.
26394global_symbol_to_import=$lt_lt_cv_sys_global_symbol_to_import
26395
26396# Transform the output of nm in a C name address pair.
26397global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
26398
26399# Transform the output of nm in a C name address pair when lib prefix is needed.
26400global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix
26401
26402# The name lister interface.
26403nm_interface=$lt_lt_cv_nm_interface
26404
26405# Specify filename containing input files for \$NM.
26406nm_file_list_spec=$lt_nm_file_list_spec
26407
26408# The root where to search for dependent libraries,and where our libraries should be installed.
26409lt_sysroot=$lt_sysroot
26410
26411# Command to truncate a binary pipe.
26412lt_truncate_bin=$lt_lt_cv_truncate_bin
26413
26414# The name of the directory that contains temporary libtool files.
26415objdir=$objdir
26416
26417# Used to examine libraries when file_magic_cmd begins with "file".
26418MAGIC_CMD=$MAGIC_CMD
26419
26420# Must we lock files when doing compilation?
26421need_locks=$lt_need_locks
26422
26423# Manifest tool.
26424MANIFEST_TOOL=$lt_MANIFEST_TOOL
26425
26426# Tool to manipulate archived DWARF debug symbol files on Mac OS X.
26427DSYMUTIL=$lt_DSYMUTIL
26428
26429# Tool to change global to local symbols on Mac OS X.
26430NMEDIT=$lt_NMEDIT
26431
26432# Tool to manipulate fat objects and archives on Mac OS X.
26433LIPO=$lt_LIPO
26434
26435# ldd/readelf like tool for Mach-O binaries on Mac OS X.
26436OTOOL=$lt_OTOOL
26437
26438# ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4.
26439OTOOL64=$lt_OTOOL64
26440
26441# Old archive suffix (normally "a").
26442libext=$libext
26443
26444# Shared library suffix (normally ".so").
26445shrext_cmds=$lt_shrext_cmds
26446
26447# The commands to extract the exported symbol list from a shared archive.
26448extract_expsyms_cmds=$lt_extract_expsyms_cmds
26449
26450# Variables whose values should be saved in libtool wrapper scripts and
26451# restored at link time.
26452variables_saved_for_relink=$lt_variables_saved_for_relink
26453
26454# Do we need the "lib" prefix for modules?
26455need_lib_prefix=$need_lib_prefix
26456
26457# Do we need a version for libraries?
26458need_version=$need_version
26459
26460# Library versioning type.
26461version_type=$version_type
26462
26463# Shared library runtime path variable.
26464runpath_var=$runpath_var
26465
26466# Shared library path variable.
26467shlibpath_var=$shlibpath_var
26468
26469# Is shlibpath searched before the hard-coded library search path?
26470shlibpath_overrides_runpath=$shlibpath_overrides_runpath
26471
26472# Format of library name prefix.
26473libname_spec=$lt_libname_spec
26474
26475# List of archive names.  First name is the real one, the rest are links.
26476# The last name is the one that the linker finds with -lNAME
26477library_names_spec=$lt_library_names_spec
26478
26479# The coded name of the library, if different from the real name.
26480soname_spec=$lt_soname_spec
26481
26482# Permission mode override for installation of shared libraries.
26483install_override_mode=$lt_install_override_mode
26484
26485# Command to use after installation of a shared archive.
26486postinstall_cmds=$lt_postinstall_cmds
26487
26488# Command to use after uninstallation of a shared archive.
26489postuninstall_cmds=$lt_postuninstall_cmds
26490
26491# Commands used to finish a libtool library installation in a directory.
26492finish_cmds=$lt_finish_cmds
26493
26494# As "finish_cmds", except a single script fragment to be evaled but
26495# not shown.
26496finish_eval=$lt_finish_eval
26497
26498# Whether we should hardcode library paths into libraries.
26499hardcode_into_libs=$hardcode_into_libs
26500
26501# Compile-time system search path for libraries.
26502sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
26503
26504# Detected run-time system search path for libraries.
26505sys_lib_dlsearch_path_spec=$lt_configure_time_dlsearch_path
26506
26507# Explicit LT_SYS_LIBRARY_PATH set during ./configure time.
26508configure_time_lt_sys_library_path=$lt_configure_time_lt_sys_library_path
26509
26510# Whether dlopen is supported.
26511dlopen_support=$enable_dlopen
26512
26513# Whether dlopen of programs is supported.
26514dlopen_self=$enable_dlopen_self
26515
26516# Whether dlopen of statically linked programs is supported.
26517dlopen_self_static=$enable_dlopen_self_static
26518
26519# Commands to strip libraries.
26520old_striplib=$lt_old_striplib
26521striplib=$lt_striplib
26522
26523
26524# The linker used to build libraries.
26525LD=$lt_LD
26526
26527# How to create reloadable object files.
26528reload_flag=$lt_reload_flag
26529reload_cmds=$lt_reload_cmds
26530
26531# Commands used to build an old-style archive.
26532old_archive_cmds=$lt_old_archive_cmds
26533
26534# A language specific compiler.
26535CC=$lt_compiler
26536
26537# Is the compiler the GNU compiler?
26538with_gcc=$GCC
26539
26540# Compiler flag to turn off builtin functions.
26541no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag
26542
26543# Additional compiler flags for building library objects.
26544pic_flag=$lt_lt_prog_compiler_pic
26545
26546# How to pass a linker flag through the compiler.
26547wl=$lt_lt_prog_compiler_wl
26548
26549# Compiler flag to prevent dynamic linking.
26550link_static_flag=$lt_lt_prog_compiler_static
26551
26552# Does compiler simultaneously support -c and -o options?
26553compiler_c_o=$lt_lt_cv_prog_compiler_c_o
26554
26555# Whether or not to add -lc for building shared libraries.
26556build_libtool_need_lc=$archive_cmds_need_lc
26557
26558# Whether or not to disallow shared libs when runtime libs are static.
26559allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes
26560
26561# Compiler flag to allow reflexive dlopens.
26562export_dynamic_flag_spec=$lt_export_dynamic_flag_spec
26563
26564# Compiler flag to generate shared objects directly from archives.
26565whole_archive_flag_spec=$lt_whole_archive_flag_spec
26566
26567# Whether the compiler copes with passing no objects directly.
26568compiler_needs_object=$lt_compiler_needs_object
26569
26570# Create an old-style archive from a shared archive.
26571old_archive_from_new_cmds=$lt_old_archive_from_new_cmds
26572
26573# Create a temporary old-style archive to link instead of a shared archive.
26574old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds
26575
26576# Commands used to build a shared archive.
26577archive_cmds=$lt_archive_cmds
26578archive_expsym_cmds=$lt_archive_expsym_cmds
26579
26580# Commands used to build a loadable module if different from building
26581# a shared archive.
26582module_cmds=$lt_module_cmds
26583module_expsym_cmds=$lt_module_expsym_cmds
26584
26585# Whether we are building with GNU ld or not.
26586with_gnu_ld=$lt_with_gnu_ld
26587
26588# Flag that allows shared libraries with undefined symbols to be built.
26589allow_undefined_flag=$lt_allow_undefined_flag
26590
26591# Flag that enforces no undefined symbols.
26592no_undefined_flag=$lt_no_undefined_flag
26593
26594# Flag to hardcode \$libdir into a binary during linking.
26595# This must work even if \$libdir does not exist
26596hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
26597
26598# Whether we need a single "-rpath" flag with a separated argument.
26599hardcode_libdir_separator=$lt_hardcode_libdir_separator
26600
26601# Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes
26602# DIR into the resulting binary.
26603hardcode_direct=$hardcode_direct
26604
26605# Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes
26606# DIR into the resulting binary and the resulting library dependency is
26607# "absolute",i.e impossible to change by setting \$shlibpath_var if the
26608# library is relocated.
26609hardcode_direct_absolute=$hardcode_direct_absolute
26610
26611# Set to "yes" if using the -LDIR flag during linking hardcodes DIR
26612# into the resulting binary.
26613hardcode_minus_L=$hardcode_minus_L
26614
26615# Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
26616# into the resulting binary.
26617hardcode_shlibpath_var=$hardcode_shlibpath_var
26618
26619# Set to "yes" if building a shared library automatically hardcodes DIR
26620# into the library and all subsequent libraries and executables linked
26621# against it.
26622hardcode_automatic=$hardcode_automatic
26623
26624# Set to yes if linker adds runtime paths of dependent libraries
26625# to runtime path list.
26626inherit_rpath=$inherit_rpath
26627
26628# Whether libtool must link a program against all its dependency libraries.
26629link_all_deplibs=$link_all_deplibs
26630
26631# Set to "yes" if exported symbols are required.
26632always_export_symbols=$always_export_symbols
26633
26634# The commands to list exported symbols.
26635export_symbols_cmds=$lt_export_symbols_cmds
26636
26637# Symbols that should not be listed in the preloaded symbols.
26638exclude_expsyms=$lt_exclude_expsyms
26639
26640# Symbols that must always be exported.
26641include_expsyms=$lt_include_expsyms
26642
26643# Commands necessary for linking programs (against libraries) with templates.
26644prelink_cmds=$lt_prelink_cmds
26645
26646# Commands necessary for finishing linking programs.
26647postlink_cmds=$lt_postlink_cmds
26648
26649# Specify filename containing input files.
26650file_list_spec=$lt_file_list_spec
26651
26652# How to hardcode a shared library path into an executable.
26653hardcode_action=$hardcode_action
26654
26655# ### END LIBTOOL CONFIG
26656
26657_LT_EOF
26658
26659    cat <<'_LT_EOF' >> "$cfgfile"
26660
26661# ### BEGIN FUNCTIONS SHARED WITH CONFIGURE
26662
26663# func_munge_path_list VARIABLE PATH
26664# -----------------------------------
26665# VARIABLE is name of variable containing _space_ separated list of
26666# directories to be munged by the contents of PATH, which is string
26667# having a format:
26668# "DIR[:DIR]:"
26669#       string "DIR[ DIR]" will be prepended to VARIABLE
26670# ":DIR[:DIR]"
26671#       string "DIR[ DIR]" will be appended to VARIABLE
26672# "DIRP[:DIRP]::[DIRA:]DIRA"
26673#       string "DIRP[ DIRP]" will be prepended to VARIABLE and string
26674#       "DIRA[ DIRA]" will be appended to VARIABLE
26675# "DIR[:DIR]"
26676#       VARIABLE will be replaced by "DIR[ DIR]"
26677func_munge_path_list ()
26678{
26679    case x$2 in
26680    x)
26681        ;;
26682    *:)
26683        eval $1=\"`$ECHO $2 | $SED 's/:/ /g'` \$$1\"
26684        ;;
26685    x:*)
26686        eval $1=\"\$$1 `$ECHO $2 | $SED 's/:/ /g'`\"
26687        ;;
26688    *::*)
26689        eval $1=\"\$$1\ `$ECHO $2 | $SED -e 's/.*:://' -e 's/:/ /g'`\"
26690        eval $1=\"`$ECHO $2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \$$1\"
26691        ;;
26692    *)
26693        eval $1=\"`$ECHO $2 | $SED 's/:/ /g'`\"
26694        ;;
26695    esac
26696}
26697
26698
26699# Calculate cc_basename.  Skip known compiler wrappers and cross-prefix.
26700func_cc_basename ()
26701{
26702    for cc_temp in $*""; do
26703      case $cc_temp in
26704        compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
26705        distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
26706        \-*) ;;
26707        *) break;;
26708      esac
26709    done
26710    func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
26711}
26712
26713
26714# ### END FUNCTIONS SHARED WITH CONFIGURE
26715
26716_LT_EOF
26717
26718  case $host_os in
26719  aix3*)
26720    cat <<\_LT_EOF >> "$cfgfile"
26721# AIX sometimes has problems with the GCC collect2 program.  For some
26722# reason, if we set the COLLECT_NAMES environment variable, the problems
26723# vanish in a puff of smoke.
26724if test set != "${COLLECT_NAMES+set}"; then
26725  COLLECT_NAMES=
26726  export COLLECT_NAMES
26727fi
26728_LT_EOF
26729    ;;
26730  esac
26731
26732
26733
26734ltmain=$ac_aux_dir/ltmain.sh
26735
26736
26737  # We use sed instead of cat because bash on DJGPP gets confused if
26738  # if finds mixed CR/LF and LF-only lines.  Since sed operates in
26739  # text mode, it properly converts lines to CR/LF.  This bash problem
26740  # is reportedly fixed, but why not run on old versions too?
26741  sed '$q' "$ltmain" >> "$cfgfile" \
26742     || (rm -f "$cfgfile"; exit 1)
26743
26744   mv -f "$cfgfile" "$ofile" ||
26745    (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
26746  chmod +x "$ofile"
26747
26748 ;;
26749    "disable-rpath":C)
26750	sed < libtool > libtool-2 \
26751	's/^hardcode_libdir_flag_spec.*$'/'hardcode_libdir_flag_spec=" -D__LIBTOOL_RPATH_SED__ "/'
26752	mv libtool-2 libtool
26753	chmod 755 libtool
26754	libtool="./libtool"
26755	 ;;
26756
26757  esac
26758done # for ac_tag
26759
26760
26761as_fn_exit 0
26762_ACEOF
26763ac_clean_files=$ac_clean_files_save
26764
26765test $ac_write_fail = 0 ||
26766  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
26767
26768
26769# configure is writing to config.log, and then calls config.status.
26770# config.status does its own redirection, appending to config.log.
26771# Unfortunately, on DOS this fails, as config.log is still kept open
26772# by configure, so config.status won't be able to write to it; its
26773# output is simply discarded.  So we exec the FD to /dev/null,
26774# effectively closing config.log, so it can be properly (re)opened and
26775# appended to by config.status.  When coming back to configure, we
26776# need to make the FD available again.
26777if test "$no_create" != yes; then
26778  ac_cs_success=:
26779  ac_config_status_args=
26780  test "$silent" = yes &&
26781    ac_config_status_args="$ac_config_status_args --quiet"
26782  exec 5>/dev/null
26783  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
26784  exec 5>>config.log
26785  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
26786  # would make configure fail if this is the last instruction.
26787  $ac_cs_success || as_fn_exit 1
26788fi
26789if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
26790  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
26791printf "%s\n" "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
26792fi
26793
26794
26795