1#! /bin/sh
2# Guess values for system-dependent variables and create Makefiles.
3# Generated by GNU Autoconf 2.69 for unbound 1.10.1.
4#
5# Report bugs to <unbound-bugs@nlnetlabs.nl or https://github.com/NLnetLabs/unbound/issues>.
6#
7#
8# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
9#
10#
11# This configure script is free software; the Free Software Foundation
12# gives unlimited permission to copy, distribute and modify it.
13## -------------------- ##
14## M4sh Initialization. ##
15## -------------------- ##
16
17# Be more Bourne compatible
18DUALCASE=1; export DUALCASE # for MKS sh
19if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
20  emulate sh
21  NULLCMD=:
22  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
23  # is contrary to our usage.  Disable this feature.
24  alias -g '${1+"$@"}'='"$@"'
25  setopt NO_GLOB_SUBST
26else
27  case `(set -o) 2>/dev/null` in #(
28  *posix*) :
29    set -o posix ;; #(
30  *) :
31     ;;
32esac
33fi
34
35
36as_nl='
37'
38export as_nl
39# Printing a long string crashes Solaris 7 /usr/bin/printf.
40as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
41as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
42as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
43# Prefer a ksh shell builtin over an external printf program on Solaris,
44# but without wasting forks for bash or zsh.
45if test -z "$BASH_VERSION$ZSH_VERSION" \
46    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
47  as_echo='print -r --'
48  as_echo_n='print -rn --'
49elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
50  as_echo='printf %s\n'
51  as_echo_n='printf %s'
52else
53  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
54    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
55    as_echo_n='/usr/ucb/echo -n'
56  else
57    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
58    as_echo_n_body='eval
59      arg=$1;
60      case $arg in #(
61      *"$as_nl"*)
62	expr "X$arg" : "X\\(.*\\)$as_nl";
63	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
64      esac;
65      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
66    '
67    export as_echo_n_body
68    as_echo_n='sh -c $as_echo_n_body as_echo'
69  fi
70  export as_echo_body
71  as_echo='sh -c $as_echo_body as_echo'
72fi
73
74# The user is always right.
75if test "${PATH_SEPARATOR+set}" != set; then
76  PATH_SEPARATOR=:
77  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
78    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
79      PATH_SEPARATOR=';'
80  }
81fi
82
83
84# IFS
85# We need space, tab and new line, in precisely that order.  Quoting is
86# there to prevent editors from complaining about space-tab.
87# (If _AS_PATH_WALK were called with IFS unset, it would disable word
88# splitting by setting IFS to empty value.)
89IFS=" ""	$as_nl"
90
91# Find who we are.  Look in the path if we contain no directory separator.
92as_myself=
93case $0 in #((
94  *[\\/]* ) as_myself=$0 ;;
95  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
96for as_dir in $PATH
97do
98  IFS=$as_save_IFS
99  test -z "$as_dir" && as_dir=.
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  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
113  exit 1
114fi
115
116# Unset variables that we do not need and which cause bugs (e.g. in
117# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
118# suppresses any "Segmentation fault" message there.  '((' could
119# trigger a bug in pdksh 5.2.14.
120for as_var in BASH_ENV ENV MAIL MAILPATH
121do eval test x\${$as_var+set} = xset \
122  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
123done
124PS1='$ '
125PS2='> '
126PS4='+ '
127
128# NLS nuisances.
129LC_ALL=C
130export LC_ALL
131LANGUAGE=C
132export LANGUAGE
133
134# CDPATH.
135(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
136
137# Use a proper internal environment variable to ensure we don't fall
138  # into an infinite loop, continuously re-executing ourselves.
139  if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
140    _as_can_reexec=no; export _as_can_reexec;
141    # We cannot yet assume a decent shell, so we have to provide a
142# neutralization value for shells without unset; and this also
143# works around shells that cannot unset nonexistent variables.
144# Preserve -v and -x to the replacement shell.
145BASH_ENV=/dev/null
146ENV=/dev/null
147(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
148case $- in # ((((
149  *v*x* | *x*v* ) as_opts=-vx ;;
150  *v* ) as_opts=-v ;;
151  *x* ) as_opts=-x ;;
152  * ) as_opts= ;;
153esac
154exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
155# Admittedly, this is quite paranoid, since all the known shells bail
156# out after a failed `exec'.
157$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
158as_fn_exit 255
159  fi
160  # We don't want this to propagate to other subprocesses.
161          { _as_can_reexec=; unset _as_can_reexec;}
162if test "x$CONFIG_SHELL" = x; then
163  as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
164  emulate sh
165  NULLCMD=:
166  # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
167  # is contrary to our usage.  Disable this feature.
168  alias -g '\${1+\"\$@\"}'='\"\$@\"'
169  setopt NO_GLOB_SUBST
170else
171  case \`(set -o) 2>/dev/null\` in #(
172  *posix*) :
173    set -o posix ;; #(
174  *) :
175     ;;
176esac
177fi
178"
179  as_required="as_fn_return () { (exit \$1); }
180as_fn_success () { as_fn_return 0; }
181as_fn_failure () { as_fn_return 1; }
182as_fn_ret_success () { return 0; }
183as_fn_ret_failure () { return 1; }
184
185exitcode=0
186as_fn_success || { exitcode=1; echo as_fn_success failed.; }
187as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
188as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
189as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
190if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
191
192else
193  exitcode=1; echo positional parameters were not saved.
194fi
195test x\$exitcode = x0 || exit 1
196test -x / || exit 1"
197  as_suggested="  as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
198  as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
199  eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
200  test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
201test \$(( 1 + 1 )) = 2 || exit 1
202
203  test -n \"\${ZSH_VERSION+set}\${BASH_VERSION+set}\" || (
204    ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
205    ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO
206    ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO
207    PATH=/empty FPATH=/empty; export PATH FPATH
208    test \"X\`printf %s \$ECHO\`\" = \"X\$ECHO\" \\
209      || test \"X\`print -r -- \$ECHO\`\" = \"X\$ECHO\" ) || exit 1"
210  if (eval "$as_required") 2>/dev/null; then :
211  as_have_required=yes
212else
213  as_have_required=no
214fi
215  if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
216
217else
218  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
219as_found=false
220for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
221do
222  IFS=$as_save_IFS
223  test -z "$as_dir" && as_dir=.
224  as_found=:
225  case $as_dir in #(
226	 /*)
227	   for as_base in sh bash ksh sh5; do
228	     # Try only shells that exist, to save several forks.
229	     as_shell=$as_dir/$as_base
230	     if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
231		    { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
232  CONFIG_SHELL=$as_shell as_have_required=yes
233		   if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
234  break 2
235fi
236fi
237	   done;;
238       esac
239  as_found=false
240done
241$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
242	      { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
243  CONFIG_SHELL=$SHELL as_have_required=yes
244fi; }
245IFS=$as_save_IFS
246
247
248      if test "x$CONFIG_SHELL" != x; then :
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'.
266$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
267exit 255
268fi
269
270    if test x$as_have_required = xno; then :
271  $as_echo "$0: This script requires a shell more modern than all"
272  $as_echo "$0: the shells that I found on your system."
273  if test x${ZSH_VERSION+set} = xset ; then
274    $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
275    $as_echo "$0: be upgraded to zsh 4.3.4 or later."
276  else
277    $as_echo "$0: Please tell bug-autoconf@gnu.org and
278$0: unbound-bugs@nlnetlabs.nl or
279$0: https://github.com/NLnetLabs/unbound/issues about your
280$0: system, including any error possibly output before this
281$0: message. Then install a modern shell, or manually run
282$0: the script under such a shell if you do have one."
283  fi
284  exit 1
285fi
286fi
287fi
288SHELL=${CONFIG_SHELL-/bin/sh}
289export SHELL
290# Unset more variables known to interfere with behavior of common tools.
291CLICOLOR_FORCE= GREP_OPTIONS=
292unset CLICOLOR_FORCE GREP_OPTIONS
293
294## --------------------- ##
295## M4sh Shell Functions. ##
296## --------------------- ##
297# as_fn_unset VAR
298# ---------------
299# Portably unset VAR.
300as_fn_unset ()
301{
302  { eval $1=; unset $1;}
303}
304as_unset=as_fn_unset
305
306# as_fn_set_status STATUS
307# -----------------------
308# Set $? to STATUS, without forking.
309as_fn_set_status ()
310{
311  return $1
312} # as_fn_set_status
313
314# as_fn_exit STATUS
315# -----------------
316# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
317as_fn_exit ()
318{
319  set +e
320  as_fn_set_status $1
321  exit $1
322} # as_fn_exit
323
324# as_fn_mkdir_p
325# -------------
326# Create "$as_dir" as a directory, including parents if necessary.
327as_fn_mkdir_p ()
328{
329
330  case $as_dir in #(
331  -*) as_dir=./$as_dir;;
332  esac
333  test -d "$as_dir" || eval $as_mkdir_p || {
334    as_dirs=
335    while :; do
336      case $as_dir in #(
337      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
338      *) as_qdir=$as_dir;;
339      esac
340      as_dirs="'$as_qdir' $as_dirs"
341      as_dir=`$as_dirname -- "$as_dir" ||
342$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
343	 X"$as_dir" : 'X\(//\)[^/]' \| \
344	 X"$as_dir" : 'X\(//\)$' \| \
345	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
346$as_echo X"$as_dir" |
347    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
348	    s//\1/
349	    q
350	  }
351	  /^X\(\/\/\)[^/].*/{
352	    s//\1/
353	    q
354	  }
355	  /^X\(\/\/\)$/{
356	    s//\1/
357	    q
358	  }
359	  /^X\(\/\).*/{
360	    s//\1/
361	    q
362	  }
363	  s/.*/./; q'`
364      test -d "$as_dir" && break
365    done
366    test -z "$as_dirs" || eval "mkdir $as_dirs"
367  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
368
369
370} # as_fn_mkdir_p
371
372# as_fn_executable_p FILE
373# -----------------------
374# Test if FILE is an executable regular file.
375as_fn_executable_p ()
376{
377  test -f "$1" && test -x "$1"
378} # as_fn_executable_p
379# as_fn_append VAR VALUE
380# ----------------------
381# Append the text in VALUE to the end of the definition contained in VAR. Take
382# advantage of any shell optimizations that allow amortized linear growth over
383# repeated appends, instead of the typical quadratic growth present in naive
384# implementations.
385if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
386  eval 'as_fn_append ()
387  {
388    eval $1+=\$2
389  }'
390else
391  as_fn_append ()
392  {
393    eval $1=\$$1\$2
394  }
395fi # as_fn_append
396
397# as_fn_arith ARG...
398# ------------------
399# Perform arithmetic evaluation on the ARGs, and store the result in the
400# global $as_val. Take advantage of shells that can avoid forks. The arguments
401# must be portable across $(()) and expr.
402if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
403  eval 'as_fn_arith ()
404  {
405    as_val=$(( $* ))
406  }'
407else
408  as_fn_arith ()
409  {
410    as_val=`expr "$@" || test $? -eq 1`
411  }
412fi # as_fn_arith
413
414
415# as_fn_error STATUS ERROR [LINENO LOG_FD]
416# ----------------------------------------
417# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
418# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
419# script with STATUS, using 1 if that was 0.
420as_fn_error ()
421{
422  as_status=$1; test $as_status -eq 0 && as_status=1
423  if test "$4"; then
424    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
425    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
426  fi
427  $as_echo "$as_me: error: $2" >&2
428  as_fn_exit $as_status
429} # as_fn_error
430
431if expr a : '\(a\)' >/dev/null 2>&1 &&
432   test "X`expr 00001 : '.*\(...\)'`" = X001; then
433  as_expr=expr
434else
435  as_expr=false
436fi
437
438if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
439  as_basename=basename
440else
441  as_basename=false
442fi
443
444if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
445  as_dirname=dirname
446else
447  as_dirname=false
448fi
449
450as_me=`$as_basename -- "$0" ||
451$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
452	 X"$0" : 'X\(//\)$' \| \
453	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
454$as_echo X/"$0" |
455    sed '/^.*\/\([^/][^/]*\)\/*$/{
456	    s//\1/
457	    q
458	  }
459	  /^X\/\(\/\/\)$/{
460	    s//\1/
461	    q
462	  }
463	  /^X\/\(\/\).*/{
464	    s//\1/
465	    q
466	  }
467	  s/.*/./; q'`
468
469# Avoid depending upon Character Ranges.
470as_cr_letters='abcdefghijklmnopqrstuvwxyz'
471as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
472as_cr_Letters=$as_cr_letters$as_cr_LETTERS
473as_cr_digits='0123456789'
474as_cr_alnum=$as_cr_Letters$as_cr_digits
475
476
477  as_lineno_1=$LINENO as_lineno_1a=$LINENO
478  as_lineno_2=$LINENO as_lineno_2a=$LINENO
479  eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
480  test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
481  # Blame Lee E. McMahon (1931-1989) for sed's syntax.  :-)
482  sed -n '
483    p
484    /[$]LINENO/=
485  ' <$as_myself |
486    sed '
487      s/[$]LINENO.*/&-/
488      t lineno
489      b
490      :lineno
491      N
492      :loop
493      s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
494      t loop
495      s/-\n.*//
496    ' >$as_me.lineno &&
497  chmod +x "$as_me.lineno" ||
498    { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
499
500  # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
501  # already done that, so ensure we don't try to do so again and fall
502  # in an infinite loop.  This has already happened in practice.
503  _as_can_reexec=no; export _as_can_reexec
504  # Don't try to exec as it changes $[0], causing all sort of problems
505  # (the dirname of $[0] is not the place where we might find the
506  # original and so on.  Autoconf is especially sensitive to this).
507  . "./$as_me.lineno"
508  # Exit status is that of the last command.
509  exit
510}
511
512ECHO_C= ECHO_N= ECHO_T=
513case `echo -n x` in #(((((
514-n*)
515  case `echo 'xy\c'` in
516  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
517  xy)  ECHO_C='\c';;
518  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
519       ECHO_T='	';;
520  esac;;
521*)
522  ECHO_N='-n';;
523esac
524
525rm -f conf$$ conf$$.exe conf$$.file
526if test -d conf$$.dir; then
527  rm -f conf$$.dir/conf$$.file
528else
529  rm -f conf$$.dir
530  mkdir conf$$.dir 2>/dev/null
531fi
532if (echo >conf$$.file) 2>/dev/null; then
533  if ln -s conf$$.file conf$$ 2>/dev/null; then
534    as_ln_s='ln -s'
535    # ... but there are two gotchas:
536    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
537    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
538    # In both cases, we have to default to `cp -pR'.
539    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
540      as_ln_s='cp -pR'
541  elif ln conf$$.file conf$$ 2>/dev/null; then
542    as_ln_s=ln
543  else
544    as_ln_s='cp -pR'
545  fi
546else
547  as_ln_s='cp -pR'
548fi
549rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
550rmdir conf$$.dir 2>/dev/null
551
552if mkdir -p . 2>/dev/null; then
553  as_mkdir_p='mkdir -p "$as_dir"'
554else
555  test -d ./-p && rmdir ./-p
556  as_mkdir_p=false
557fi
558
559as_test_x='test -x'
560as_executable_p=as_fn_executable_p
561
562# Sed expression to map a string onto a valid CPP name.
563as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
564
565# Sed expression to map a string onto a valid variable name.
566as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
567
568SHELL=${CONFIG_SHELL-/bin/sh}
569
570
571test -n "$DJDIR" || exec 7<&0 </dev/null
572exec 6>&1
573
574# Name of the host.
575# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
576# so uname gets run too.
577ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
578
579#
580# Initializations.
581#
582ac_default_prefix=/usr/local
583ac_clean_files=
584ac_config_libobj_dir=.
585LIBOBJS=
586cross_compiling=no
587subdirs=
588MFLAGS=
589MAKEFLAGS=
590
591# Identity of this package.
592PACKAGE_NAME='unbound'
593PACKAGE_TARNAME='unbound'
594PACKAGE_VERSION='1.10.1'
595PACKAGE_STRING='unbound 1.10.1'
596PACKAGE_BUGREPORT='unbound-bugs@nlnetlabs.nl or https://github.com/NLnetLabs/unbound/issues'
597PACKAGE_URL=''
598
599# Factoring default headers for most tests.
600ac_includes_default="\
601#include <stdio.h>
602#ifdef HAVE_SYS_TYPES_H
603# include <sys/types.h>
604#endif
605#ifdef HAVE_SYS_STAT_H
606# include <sys/stat.h>
607#endif
608#ifdef STDC_HEADERS
609# include <stdlib.h>
610# include <stddef.h>
611#else
612# ifdef HAVE_STDLIB_H
613#  include <stdlib.h>
614# endif
615#endif
616#ifdef HAVE_STRING_H
617# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
618#  include <memory.h>
619# endif
620# include <string.h>
621#endif
622#ifdef HAVE_STRINGS_H
623# include <strings.h>
624#endif
625#ifdef HAVE_INTTYPES_H
626# include <inttypes.h>
627#endif
628#ifdef HAVE_STDINT_H
629# include <stdint.h>
630#endif
631#ifdef HAVE_UNISTD_H
632# include <unistd.h>
633#endif"
634
635ac_subst_vars='LTLIBOBJS
636date
637version
638INSTALLTARGET
639ALLTARGET
640SOURCEFILE
641SOURCEDETERMINE
642IPSET_OBJ
643IPSET_SRC
644IPSECMOD_HEADER
645IPSECMOD_OBJ
646DNSCRYPT_OBJ
647DNSCRYPT_SRC
648ENABLE_DNSCRYPT
649ENABLE_DNSCRYPT_XCHACHA20
650DNSTAP_OBJ
651DNSTAP_SRC
652opt_dnstap_socket_path
653ENABLE_DNSTAP
654PROTOC_C
655UBSYMS
656EXTRALINK
657COMMON_OBJ_ALL_SYMBOLS
658LIBOBJ_WITHOUT_CTIME
659LIBOBJ_WITHOUT_CTIMEARC4
660WIN_CHECKCONF_OBJ_LINK
661WIN_CONTROL_OBJ_LINK
662WIN_UBANCHOR_OBJ_LINK
663WIN_HOST_OBJ_LINK
664WIN_DAEMON_OBJ_LINK
665WIN_DAEMON_OBJ
666WIN_DAEMON_SRC
667WINAPPS
668WINDRES
669CHECKLOCK_OBJ
670staticexe
671PC_LIBEVENT_DEPENDENCY
672UNBOUND_EVENT_UNINSTALL
673UNBOUND_EVENT_INSTALL
674SUBNET_HEADER
675SUBNET_OBJ
676PC_LIBBSD_DEPENDENCY
677SSLLIB
678HAVE_SSL
679PC_CRYPTO_DEPENDENCY
680CONFIG_DATE
681NETBSD_LINTFLAGS
682PYUNBOUND_UNINSTALL
683PYUNBOUND_INSTALL
684PYUNBOUND_TARGET
685PYUNBOUND_OBJ
686WITH_PYUNBOUND
687PYTHONMOD_UNINSTALL
688PYTHONMOD_INSTALL
689PYTHONMOD_HEADER
690PYTHONMOD_OBJ
691WITH_PYTHONMODULE
692swig
693SWIG_LIB
694SWIG
695PC_PY_DEPENDENCY
696PY_MAJOR_VERSION
697PYTHON_SITE_PKG
698PYTHON_LDFLAGS
699PYTHON_CPPFLAGS
700PYTHON
701PYTHON_VERSION
702PTHREAD_CFLAGS_ONLY
703PTHREAD_CFLAGS
704PTHREAD_LIBS
705PTHREAD_CC
706ax_pthread_config
707ASYNCLOOK_ALLOCCHECK_EXTRA_OBJ
708SLDNS_ALLOCCHECK_EXTRA_OBJ
709USE_SYSTEMD_FALSE
710USE_SYSTEMD_TRUE
711SYSTEMD_DAEMON_LIBS
712SYSTEMD_DAEMON_CFLAGS
713SYSTEMD_LIBS
714SYSTEMD_CFLAGS
715RUNTIME_PATH
716LIBOBJS
717PKG_CONFIG_LIBDIR
718PKG_CONFIG_PATH
719PKG_CONFIG
720LT_SYS_LIBRARY_PATH
721OTOOL64
722OTOOL
723LIPO
724NMEDIT
725DSYMUTIL
726MANIFEST_TOOL
727AWK
728RANLIB
729ac_ct_AR
730DLLTOOL
731OBJDUMP
732LN_S
733NM
734ac_ct_DUMPBIN
735DUMPBIN
736LD
737FGREP
738SED
739LIBTOOL
740AR
741host_os
742host_vendor
743host_cpu
744host
745build_os
746build_vendor
747build_cpu
748build
749libtool
750STRIP
751doxygen
752YFLAGS
753YACC
754LEXLIB
755LEX_OUTPUT_ROOT
756LEX
757debug_enabled
758DEPFLAG
759UNBOUND_USERNAME
760UNBOUND_ROOTCERT_FILE
761UNBOUND_ROOTKEY_FILE
762UNBOUND_PIDFILE
763UNBOUND_SHARE_DIR
764UNBOUND_CHROOT_DIR
765UNBOUND_RUN_DIR
766ub_conf_dir
767ub_conf_file
768UNBOUND_LOCALSTATE_DIR
769UNBOUND_SYSCONF_DIR
770UNBOUND_SBIN_DIR
771EGREP
772GREP
773CPP
774OBJEXT
775EXEEXT
776ac_ct_CC
777CPPFLAGS
778LDFLAGS
779CFLAGS
780CC
781LIBUNBOUND_AGE
782LIBUNBOUND_REVISION
783LIBUNBOUND_CURRENT
784UNBOUND_VERSION_MICRO
785UNBOUND_VERSION_MINOR
786UNBOUND_VERSION_MAJOR
787target_alias
788host_alias
789build_alias
790LIBS
791ECHO_T
792ECHO_N
793ECHO_C
794DEFS
795mandir
796localedir
797libdir
798psdir
799pdfdir
800dvidir
801htmldir
802infodir
803docdir
804oldincludedir
805includedir
806localstatedir
807sharedstatedir
808sysconfdir
809datadir
810datarootdir
811libexecdir
812sbindir
813bindir
814program_transform_name
815prefix
816exec_prefix
817PACKAGE_URL
818PACKAGE_BUGREPORT
819PACKAGE_STRING
820PACKAGE_VERSION
821PACKAGE_TARNAME
822PACKAGE_NAME
823PATH_SEPARATOR
824SHELL'
825ac_subst_files=''
826ac_user_opts='
827enable_option_checking
828with_conf_file
829with_run_dir
830with_chroot_dir
831with_share_dir
832with_pidfile
833with_rootkey_file
834with_rootcert_file
835with_username
836enable_checking
837enable_debug
838enable_flto
839enable_pie
840enable_relro_now
841enable_shared
842enable_static
843with_pic
844enable_fast_install
845with_aix_soname
846with_gnu_ld
847with_sysroot
848enable_libtool_lock
849enable_rpath
850enable_largefile
851enable_systemd
852enable_alloc_checks
853enable_alloc_lite
854enable_alloc_nonregional
855with_pthreads
856with_solaris_threads
857with_syslog_facility
858with_pyunbound
859with_pythonmodule
860enable_swig_version_check
861with_nss
862with_nettle
863with_ssl
864with_libbsd
865enable_sha1
866enable_sha2
867enable_subnet
868enable_gost
869enable_ecdsa
870enable_dsa
871enable_ed25519
872enable_ed448
873enable_event_api
874enable_tfo_client
875enable_tfo_server
876with_libevent
877with_libexpat
878with_libhiredis
879enable_static_exe
880enable_fully_static
881enable_lock_checks
882enable_allsymbols
883enable_dnstap
884with_dnstap_socket_path
885with_protobuf_c
886with_libfstrm
887enable_dnscrypt
888with_libsodium
889enable_cachedb
890enable_ipsecmod
891enable_ipset
892with_libmnl
893with_libunbound_only
894'
895      ac_precious_vars='build_alias
896host_alias
897target_alias
898CC
899CFLAGS
900LDFLAGS
901LIBS
902CPPFLAGS
903CPP
904YACC
905YFLAGS
906LT_SYS_LIBRARY_PATH
907PKG_CONFIG
908PKG_CONFIG_PATH
909PKG_CONFIG_LIBDIR
910SYSTEMD_CFLAGS
911SYSTEMD_LIBS
912SYSTEMD_DAEMON_CFLAGS
913SYSTEMD_DAEMON_LIBS
914PYTHON_VERSION'
915
916
917# Initialize some variables set by options.
918ac_init_help=
919ac_init_version=false
920ac_unrecognized_opts=
921ac_unrecognized_sep=
922# The variables have the same names as the options, with
923# dashes changed to underlines.
924cache_file=/dev/null
925exec_prefix=NONE
926no_create=
927no_recursion=
928prefix=NONE
929program_prefix=NONE
930program_suffix=NONE
931program_transform_name=s,x,x,
932silent=
933site=
934srcdir=
935verbose=
936x_includes=NONE
937x_libraries=NONE
938
939# Installation directory options.
940# These are left unexpanded so users can "make install exec_prefix=/foo"
941# and all the variables that are supposed to be based on exec_prefix
942# by default will actually change.
943# Use braces instead of parens because sh, perl, etc. also accept them.
944# (The list follows the same order as the GNU Coding Standards.)
945bindir='${exec_prefix}/bin'
946sbindir='${exec_prefix}/sbin'
947libexecdir='${exec_prefix}/libexec'
948datarootdir='${prefix}/share'
949datadir='${datarootdir}'
950sysconfdir='${prefix}/etc'
951sharedstatedir='${prefix}/com'
952localstatedir='${prefix}/var'
953includedir='${prefix}/include'
954oldincludedir='/usr/include'
955docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
956infodir='${datarootdir}/info'
957htmldir='${docdir}'
958dvidir='${docdir}'
959pdfdir='${docdir}'
960psdir='${docdir}'
961libdir='${exec_prefix}/lib'
962localedir='${datarootdir}/locale'
963mandir='${datarootdir}/man'
964
965ac_prev=
966ac_dashdash=
967for ac_option
968do
969  # If the previous option needs an argument, assign it.
970  if test -n "$ac_prev"; then
971    eval $ac_prev=\$ac_option
972    ac_prev=
973    continue
974  fi
975
976  case $ac_option in
977  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
978  *=)   ac_optarg= ;;
979  *)    ac_optarg=yes ;;
980  esac
981
982  # Accept the important Cygnus configure options, so we can diagnose typos.
983
984  case $ac_dashdash$ac_option in
985  --)
986    ac_dashdash=yes ;;
987
988  -bindir | --bindir | --bindi | --bind | --bin | --bi)
989    ac_prev=bindir ;;
990  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
991    bindir=$ac_optarg ;;
992
993  -build | --build | --buil | --bui | --bu)
994    ac_prev=build_alias ;;
995  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
996    build_alias=$ac_optarg ;;
997
998  -cache-file | --cache-file | --cache-fil | --cache-fi \
999  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1000    ac_prev=cache_file ;;
1001  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1002  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1003    cache_file=$ac_optarg ;;
1004
1005  --config-cache | -C)
1006    cache_file=config.cache ;;
1007
1008  -datadir | --datadir | --datadi | --datad)
1009    ac_prev=datadir ;;
1010  -datadir=* | --datadir=* | --datadi=* | --datad=*)
1011    datadir=$ac_optarg ;;
1012
1013  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1014  | --dataroo | --dataro | --datar)
1015    ac_prev=datarootdir ;;
1016  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1017  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1018    datarootdir=$ac_optarg ;;
1019
1020  -disable-* | --disable-*)
1021    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1022    # Reject names that are not valid shell variable names.
1023    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1024      as_fn_error $? "invalid feature name: $ac_useropt"
1025    ac_useropt_orig=$ac_useropt
1026    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1027    case $ac_user_opts in
1028      *"
1029"enable_$ac_useropt"
1030"*) ;;
1031      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1032	 ac_unrecognized_sep=', ';;
1033    esac
1034    eval enable_$ac_useropt=no ;;
1035
1036  -docdir | --docdir | --docdi | --doc | --do)
1037    ac_prev=docdir ;;
1038  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1039    docdir=$ac_optarg ;;
1040
1041  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1042    ac_prev=dvidir ;;
1043  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1044    dvidir=$ac_optarg ;;
1045
1046  -enable-* | --enable-*)
1047    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1048    # Reject names that are not valid shell variable names.
1049    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1050      as_fn_error $? "invalid feature name: $ac_useropt"
1051    ac_useropt_orig=$ac_useropt
1052    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1053    case $ac_user_opts in
1054      *"
1055"enable_$ac_useropt"
1056"*) ;;
1057      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1058	 ac_unrecognized_sep=', ';;
1059    esac
1060    eval enable_$ac_useropt=\$ac_optarg ;;
1061
1062  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1063  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1064  | --exec | --exe | --ex)
1065    ac_prev=exec_prefix ;;
1066  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1067  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1068  | --exec=* | --exe=* | --ex=*)
1069    exec_prefix=$ac_optarg ;;
1070
1071  -gas | --gas | --ga | --g)
1072    # Obsolete; use --with-gas.
1073    with_gas=yes ;;
1074
1075  -help | --help | --hel | --he | -h)
1076    ac_init_help=long ;;
1077  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1078    ac_init_help=recursive ;;
1079  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1080    ac_init_help=short ;;
1081
1082  -host | --host | --hos | --ho)
1083    ac_prev=host_alias ;;
1084  -host=* | --host=* | --hos=* | --ho=*)
1085    host_alias=$ac_optarg ;;
1086
1087  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1088    ac_prev=htmldir ;;
1089  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1090  | --ht=*)
1091    htmldir=$ac_optarg ;;
1092
1093  -includedir | --includedir | --includedi | --included | --include \
1094  | --includ | --inclu | --incl | --inc)
1095    ac_prev=includedir ;;
1096  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1097  | --includ=* | --inclu=* | --incl=* | --inc=*)
1098    includedir=$ac_optarg ;;
1099
1100  -infodir | --infodir | --infodi | --infod | --info | --inf)
1101    ac_prev=infodir ;;
1102  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1103    infodir=$ac_optarg ;;
1104
1105  -libdir | --libdir | --libdi | --libd)
1106    ac_prev=libdir ;;
1107  -libdir=* | --libdir=* | --libdi=* | --libd=*)
1108    libdir=$ac_optarg ;;
1109
1110  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1111  | --libexe | --libex | --libe)
1112    ac_prev=libexecdir ;;
1113  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1114  | --libexe=* | --libex=* | --libe=*)
1115    libexecdir=$ac_optarg ;;
1116
1117  -localedir | --localedir | --localedi | --localed | --locale)
1118    ac_prev=localedir ;;
1119  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1120    localedir=$ac_optarg ;;
1121
1122  -localstatedir | --localstatedir | --localstatedi | --localstated \
1123  | --localstate | --localstat | --localsta | --localst | --locals)
1124    ac_prev=localstatedir ;;
1125  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1126  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1127    localstatedir=$ac_optarg ;;
1128
1129  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1130    ac_prev=mandir ;;
1131  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1132    mandir=$ac_optarg ;;
1133
1134  -nfp | --nfp | --nf)
1135    # Obsolete; use --without-fp.
1136    with_fp=no ;;
1137
1138  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1139  | --no-cr | --no-c | -n)
1140    no_create=yes ;;
1141
1142  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1143  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1144    no_recursion=yes ;;
1145
1146  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1147  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1148  | --oldin | --oldi | --old | --ol | --o)
1149    ac_prev=oldincludedir ;;
1150  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1151  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1152  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1153    oldincludedir=$ac_optarg ;;
1154
1155  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1156    ac_prev=prefix ;;
1157  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1158    prefix=$ac_optarg ;;
1159
1160  -program-prefix | --program-prefix | --program-prefi | --program-pref \
1161  | --program-pre | --program-pr | --program-p)
1162    ac_prev=program_prefix ;;
1163  -program-prefix=* | --program-prefix=* | --program-prefi=* \
1164  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1165    program_prefix=$ac_optarg ;;
1166
1167  -program-suffix | --program-suffix | --program-suffi | --program-suff \
1168  | --program-suf | --program-su | --program-s)
1169    ac_prev=program_suffix ;;
1170  -program-suffix=* | --program-suffix=* | --program-suffi=* \
1171  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1172    program_suffix=$ac_optarg ;;
1173
1174  -program-transform-name | --program-transform-name \
1175  | --program-transform-nam | --program-transform-na \
1176  | --program-transform-n | --program-transform- \
1177  | --program-transform | --program-transfor \
1178  | --program-transfo | --program-transf \
1179  | --program-trans | --program-tran \
1180  | --progr-tra | --program-tr | --program-t)
1181    ac_prev=program_transform_name ;;
1182  -program-transform-name=* | --program-transform-name=* \
1183  | --program-transform-nam=* | --program-transform-na=* \
1184  | --program-transform-n=* | --program-transform-=* \
1185  | --program-transform=* | --program-transfor=* \
1186  | --program-transfo=* | --program-transf=* \
1187  | --program-trans=* | --program-tran=* \
1188  | --progr-tra=* | --program-tr=* | --program-t=*)
1189    program_transform_name=$ac_optarg ;;
1190
1191  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1192    ac_prev=pdfdir ;;
1193  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1194    pdfdir=$ac_optarg ;;
1195
1196  -psdir | --psdir | --psdi | --psd | --ps)
1197    ac_prev=psdir ;;
1198  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1199    psdir=$ac_optarg ;;
1200
1201  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1202  | -silent | --silent | --silen | --sile | --sil)
1203    silent=yes ;;
1204
1205  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1206    ac_prev=sbindir ;;
1207  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1208  | --sbi=* | --sb=*)
1209    sbindir=$ac_optarg ;;
1210
1211  -sharedstatedir | --sharedstatedir | --sharedstatedi \
1212  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1213  | --sharedst | --shareds | --shared | --share | --shar \
1214  | --sha | --sh)
1215    ac_prev=sharedstatedir ;;
1216  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1217  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1218  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1219  | --sha=* | --sh=*)
1220    sharedstatedir=$ac_optarg ;;
1221
1222  -site | --site | --sit)
1223    ac_prev=site ;;
1224  -site=* | --site=* | --sit=*)
1225    site=$ac_optarg ;;
1226
1227  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1228    ac_prev=srcdir ;;
1229  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1230    srcdir=$ac_optarg ;;
1231
1232  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1233  | --syscon | --sysco | --sysc | --sys | --sy)
1234    ac_prev=sysconfdir ;;
1235  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1236  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1237    sysconfdir=$ac_optarg ;;
1238
1239  -target | --target | --targe | --targ | --tar | --ta | --t)
1240    ac_prev=target_alias ;;
1241  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1242    target_alias=$ac_optarg ;;
1243
1244  -v | -verbose | --verbose | --verbos | --verbo | --verb)
1245    verbose=yes ;;
1246
1247  -version | --version | --versio | --versi | --vers | -V)
1248    ac_init_version=: ;;
1249
1250  -with-* | --with-*)
1251    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1252    # Reject names that are not valid shell variable names.
1253    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1254      as_fn_error $? "invalid package name: $ac_useropt"
1255    ac_useropt_orig=$ac_useropt
1256    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1257    case $ac_user_opts in
1258      *"
1259"with_$ac_useropt"
1260"*) ;;
1261      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1262	 ac_unrecognized_sep=', ';;
1263    esac
1264    eval with_$ac_useropt=\$ac_optarg ;;
1265
1266  -without-* | --without-*)
1267    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1268    # Reject names that are not valid shell variable names.
1269    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1270      as_fn_error $? "invalid package name: $ac_useropt"
1271    ac_useropt_orig=$ac_useropt
1272    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1273    case $ac_user_opts in
1274      *"
1275"with_$ac_useropt"
1276"*) ;;
1277      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1278	 ac_unrecognized_sep=', ';;
1279    esac
1280    eval with_$ac_useropt=no ;;
1281
1282  --x)
1283    # Obsolete; use --with-x.
1284    with_x=yes ;;
1285
1286  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1287  | --x-incl | --x-inc | --x-in | --x-i)
1288    ac_prev=x_includes ;;
1289  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1290  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1291    x_includes=$ac_optarg ;;
1292
1293  -x-libraries | --x-libraries | --x-librarie | --x-librari \
1294  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1295    ac_prev=x_libraries ;;
1296  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1297  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1298    x_libraries=$ac_optarg ;;
1299
1300  -*) as_fn_error $? "unrecognized option: \`$ac_option'
1301Try \`$0 --help' for more information"
1302    ;;
1303
1304  *=*)
1305    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1306    # Reject names that are not valid shell variable names.
1307    case $ac_envvar in #(
1308      '' | [0-9]* | *[!_$as_cr_alnum]* )
1309      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1310    esac
1311    eval $ac_envvar=\$ac_optarg
1312    export $ac_envvar ;;
1313
1314  *)
1315    # FIXME: should be removed in autoconf 3.0.
1316    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1317    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1318      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1319    : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1320    ;;
1321
1322  esac
1323done
1324
1325if test -n "$ac_prev"; then
1326  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1327  as_fn_error $? "missing argument to $ac_option"
1328fi
1329
1330if test -n "$ac_unrecognized_opts"; then
1331  case $enable_option_checking in
1332    no) ;;
1333    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1334    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1335  esac
1336fi
1337
1338# Check all directory arguments for consistency.
1339for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
1340		datadir sysconfdir sharedstatedir localstatedir includedir \
1341		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1342		libdir localedir mandir
1343do
1344  eval ac_val=\$$ac_var
1345  # Remove trailing slashes.
1346  case $ac_val in
1347    */ )
1348      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1349      eval $ac_var=\$ac_val;;
1350  esac
1351  # Be sure to have absolute directory names.
1352  case $ac_val in
1353    [\\/$]* | ?:[\\/]* )  continue;;
1354    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1355  esac
1356  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1357done
1358
1359# There might be people who depend on the old broken behavior: `$host'
1360# used to hold the argument of --host etc.
1361# FIXME: To remove some day.
1362build=$build_alias
1363host=$host_alias
1364target=$target_alias
1365
1366# FIXME: To remove some day.
1367if test "x$host_alias" != x; then
1368  if test "x$build_alias" = x; then
1369    cross_compiling=maybe
1370  elif test "x$build_alias" != "x$host_alias"; then
1371    cross_compiling=yes
1372  fi
1373fi
1374
1375ac_tool_prefix=
1376test -n "$host_alias" && ac_tool_prefix=$host_alias-
1377
1378test "$silent" = yes && exec 6>/dev/null
1379
1380
1381ac_pwd=`pwd` && test -n "$ac_pwd" &&
1382ac_ls_di=`ls -di .` &&
1383ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1384  as_fn_error $? "working directory cannot be determined"
1385test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1386  as_fn_error $? "pwd does not report name of working directory"
1387
1388
1389# Find the source files, if location was not specified.
1390if test -z "$srcdir"; then
1391  ac_srcdir_defaulted=yes
1392  # Try the directory containing this script, then the parent directory.
1393  ac_confdir=`$as_dirname -- "$as_myself" ||
1394$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1395	 X"$as_myself" : 'X\(//\)[^/]' \| \
1396	 X"$as_myself" : 'X\(//\)$' \| \
1397	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1398$as_echo X"$as_myself" |
1399    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1400	    s//\1/
1401	    q
1402	  }
1403	  /^X\(\/\/\)[^/].*/{
1404	    s//\1/
1405	    q
1406	  }
1407	  /^X\(\/\/\)$/{
1408	    s//\1/
1409	    q
1410	  }
1411	  /^X\(\/\).*/{
1412	    s//\1/
1413	    q
1414	  }
1415	  s/.*/./; q'`
1416  srcdir=$ac_confdir
1417  if test ! -r "$srcdir/$ac_unique_file"; then
1418    srcdir=..
1419  fi
1420else
1421  ac_srcdir_defaulted=no
1422fi
1423if test ! -r "$srcdir/$ac_unique_file"; then
1424  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1425  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1426fi
1427ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1428ac_abs_confdir=`(
1429	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1430	pwd)`
1431# When building in place, set srcdir=.
1432if test "$ac_abs_confdir" = "$ac_pwd"; then
1433  srcdir=.
1434fi
1435# Remove unnecessary trailing slashes from srcdir.
1436# Double slashes in file names in object file debugging info
1437# mess up M-x gdb in Emacs.
1438case $srcdir in
1439*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1440esac
1441for ac_var in $ac_precious_vars; do
1442  eval ac_env_${ac_var}_set=\${${ac_var}+set}
1443  eval ac_env_${ac_var}_value=\$${ac_var}
1444  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1445  eval ac_cv_env_${ac_var}_value=\$${ac_var}
1446done
1447
1448#
1449# Report the --help message.
1450#
1451if test "$ac_init_help" = "long"; then
1452  # Omit some internal or obsolete options to make the list less imposing.
1453  # This message is too long to be a string in the A/UX 3.1 sh.
1454  cat <<_ACEOF
1455\`configure' configures unbound 1.10.1 to adapt to many kinds of systems.
1456
1457Usage: $0 [OPTION]... [VAR=VALUE]...
1458
1459To assign environment variables (e.g., CC, CFLAGS...), specify them as
1460VAR=VALUE.  See below for descriptions of some of the useful variables.
1461
1462Defaults for the options are specified in brackets.
1463
1464Configuration:
1465  -h, --help              display this help and exit
1466      --help=short        display options specific to this package
1467      --help=recursive    display the short help of all the included packages
1468  -V, --version           display version information and exit
1469  -q, --quiet, --silent   do not print \`checking ...' messages
1470      --cache-file=FILE   cache test results in FILE [disabled]
1471  -C, --config-cache      alias for \`--cache-file=config.cache'
1472  -n, --no-create         do not create output files
1473      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1474
1475Installation directories:
1476  --prefix=PREFIX         install architecture-independent files in PREFIX
1477                          [$ac_default_prefix]
1478  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1479                          [PREFIX]
1480
1481By default, \`make install' will install all the files in
1482\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1483an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1484for instance \`--prefix=\$HOME'.
1485
1486For better control, use the options below.
1487
1488Fine tuning of the installation directories:
1489  --bindir=DIR            user executables [EPREFIX/bin]
1490  --sbindir=DIR           system admin executables [EPREFIX/sbin]
1491  --libexecdir=DIR        program executables [EPREFIX/libexec]
1492  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1493  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1494  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1495  --libdir=DIR            object code libraries [EPREFIX/lib]
1496  --includedir=DIR        C header files [PREFIX/include]
1497  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1498  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1499  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1500  --infodir=DIR           info documentation [DATAROOTDIR/info]
1501  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1502  --mandir=DIR            man documentation [DATAROOTDIR/man]
1503  --docdir=DIR            documentation root [DATAROOTDIR/doc/unbound]
1504  --htmldir=DIR           html documentation [DOCDIR]
1505  --dvidir=DIR            dvi documentation [DOCDIR]
1506  --pdfdir=DIR            pdf documentation [DOCDIR]
1507  --psdir=DIR             ps documentation [DOCDIR]
1508_ACEOF
1509
1510  cat <<\_ACEOF
1511
1512System types:
1513  --build=BUILD     configure for building on BUILD [guessed]
1514  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1515_ACEOF
1516fi
1517
1518if test -n "$ac_init_help"; then
1519  case $ac_init_help in
1520     short | recursive ) echo "Configuration of unbound 1.10.1:";;
1521   esac
1522  cat <<\_ACEOF
1523
1524Optional Features:
1525  --disable-option-checking  ignore unrecognized --enable/--with options
1526  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1527  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1528  --enable-checking       Enable warnings, asserts, makefile-dependencies
1529  --enable-debug          same as enable-checking
1530  --disable-flto          Disable link-time optimization (gcc specific option)
1531  --enable-pie            Enable Position-Independent Executable (eg. to fully
1532                          benefit from ASLR, small performance penalty)
1533  --enable-relro-now      Enable full relocation binding at load-time (RELRO
1534                          NOW, to protect GOT and .dtor areas)
1535  --enable-shared[=PKGS]  build shared libraries [default=yes]
1536  --enable-static[=PKGS]  build static libraries [default=yes]
1537  --enable-fast-install[=PKGS]
1538                          optimize for fast installation [default=yes]
1539  --disable-libtool-lock  avoid locking (might break parallel builds)
1540  --disable-rpath         disable hardcoded rpath (default=enabled)
1541  --disable-largefile     omit support for large files
1542  --enable-systemd        compile with systemd support
1543  --enable-alloc-checks   enable to memory allocation statistics, for debug
1544                          purposes
1545  --enable-alloc-lite     enable for lightweight alloc assertions, for debug
1546                          purposes
1547  --enable-alloc-nonregional
1548                          enable nonregional allocs, slow but exposes regional
1549                          allocations to other memory purifiers, for debug
1550                          purposes
1551  --disable-swig-version-check
1552                          Disable swig version check to build python modules
1553                          with older swig even though that is unreliable
1554  --disable-sha1          Disable SHA1 RRSIG support, does not disable nsec3
1555                          support
1556  --disable-sha2          Disable SHA256 and SHA512 RRSIG support
1557  --enable-subnet         Enable client subnet
1558  --disable-gost          Disable GOST support
1559  --disable-ecdsa         Disable ECDSA support
1560  --disable-dsa           Disable DSA support
1561  --disable-ed25519       Disable ED25519 support
1562  --disable-ed448         Disable ED448 support
1563  --enable-event-api      Enable (experimental) pluggable event base
1564                          libunbound API installed to unbound-event.h
1565  --enable-tfo-client     Enable TCP Fast Open for client mode
1566  --enable-tfo-server     Enable TCP Fast Open for server mode
1567  --enable-static-exe     enable to compile executables statically against
1568                          (event) uninstalled libs, for debug purposes
1569  --enable-fully-static   enable to compile fully static
1570  --enable-lock-checks    enable to check lock and unlock calls, for debug
1571                          purposes
1572  --enable-allsymbols     export all symbols from libunbound and link binaries
1573                          to it, smaller install size but libunbound export
1574                          table is polluted by internal symbols
1575  --enable-dnstap         Enable dnstap support (requires fstrm, protobuf-c)
1576  --enable-dnscrypt       Enable dnscrypt support (requires libsodium)
1577  --enable-cachedb        enable cachedb module that can use external cache
1578                          storage
1579  --enable-ipsecmod       Enable ipsecmod module that facilitates
1580                          opportunistic IPsec
1581  --enable-ipset          enable ipset module
1582
1583Optional Packages:
1584  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1585  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1586  --with-conf-file=path   Pathname to the Unbound configuration file
1587  --with-run-dir=path     set default directory to chdir to (by default dir
1588                          part of cfg file)
1589  --with-chroot-dir=path  set default directory to chroot to (by default same
1590                          as run-dir)
1591  --with-share-dir=path   set default directory with shared data (by default
1592                          same as share/unbound)
1593  --with-pidfile=filename set default pathname to unbound pidfile (default
1594                          run-dir/unbound.pid)
1595  --with-rootkey-file=filename
1596                          set default pathname to root key file (default
1597                          run-dir/root.key). This file is read and written.
1598  --with-rootcert-file=filename
1599                          set default pathname to root update certificate file
1600                          (default run-dir/icannbundle.pem). This file need
1601                          not exist if you are content with the builtin.
1602  --with-username=user    set default user that unbound changes to (default
1603                          user is unbound)
1604  --with-pic[=PKGS]       try to use only PIC/non-PIC objects [default=use
1605                          both]
1606  --with-aix-soname=aix|svr4|both
1607                          shared library versioning (aka "SONAME") variant to
1608                          provide on AIX, [default=aix].
1609  --with-gnu-ld           assume the C compiler uses GNU ld [default=no]
1610  --with-sysroot[=DIR]    Search for dependent libraries within DIR (or the
1611                          compiler's sysroot if not specified).
1612  --with-pthreads         use pthreads library, or --without-pthreads to
1613                          disable threading support.
1614  --with-solaris-threads  use solaris native thread library.
1615  --with-syslog-facility=LOCAL0 - LOCAL7
1616                          set SYSLOG_FACILITY, default DAEMON
1617  --with-pyunbound        build PyUnbound, or --without-pyunbound to skip it.
1618                          (default=no)
1619  --with-pythonmodule     build Python module, or --without-pythonmodule to
1620                          disable script engine. (default=no)
1621  --with-nss=path         use libnss instead of openssl, installed at path.
1622  --with-nettle=path      use libnettle as crypto library, installed at path.
1623  --with-ssl=pathname     enable SSL (will check /usr/local/ssl /usr/lib/ssl
1624                          /usr/ssl /usr/pkg /usr/local /opt/local /usr/sfw
1625                          /usr)
1626  --with-libbsd           Use portable libbsd functions
1627  --with-libevent=pathname
1628                          use libevent (will check /usr/local /opt/local
1629                          /usr/lib /usr/pkg /usr/sfw /usr or you can specify
1630                          an explicit path). Slower, but allows use of large
1631                          outgoing port ranges.
1632  --with-libexpat=path    specify explicit path for libexpat.
1633  --with-libhiredis=path  specify explicit path for libhiredis.
1634  --with-dnstap-socket-path=pathname
1635                          set default dnstap socket path
1636  --with-protobuf-c=path  Path where protobuf-c is installed, for dnstap
1637  --with-libfstrm=path    Path where libfstrm is installed, for dnstap
1638  --with-libsodium=path   Path where libsodium is installed, for dnscrypt
1639  --with-libmnl=path      specify explicit path for libmnl.
1640  --with-libunbound-only  do not build daemon and tool programs
1641
1642Some influential environment variables:
1643  CC          C compiler command
1644  CFLAGS      C compiler flags
1645  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
1646              nonstandard directory <lib dir>
1647  LIBS        libraries to pass to the linker, e.g. -l<library>
1648  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1649              you have headers in a nonstandard directory <include dir>
1650  CPP         C preprocessor
1651  YACC        The `Yet Another Compiler Compiler' implementation to use.
1652              Defaults to the first program found out of: `bison -y', `byacc',
1653              `yacc'.
1654  YFLAGS      The list of arguments that will be passed by default to $YACC.
1655              This script will default YFLAGS to the empty string to avoid a
1656              default value of `-d' given by some make applications.
1657  LT_SYS_LIBRARY_PATH
1658              User-defined run-time library search path.
1659  PKG_CONFIG  path to pkg-config utility
1660  PKG_CONFIG_PATH
1661              directories to add to pkg-config's search path
1662  PKG_CONFIG_LIBDIR
1663              path overriding pkg-config's built-in search path
1664  SYSTEMD_CFLAGS
1665              C compiler flags for SYSTEMD, overriding pkg-config
1666  SYSTEMD_LIBS
1667              linker flags for SYSTEMD, overriding pkg-config
1668  SYSTEMD_DAEMON_CFLAGS
1669              C compiler flags for SYSTEMD_DAEMON, overriding pkg-config
1670  SYSTEMD_DAEMON_LIBS
1671              linker flags for SYSTEMD_DAEMON, overriding pkg-config
1672  PYTHON_VERSION
1673              The installed Python version to use, for example '2.3'. This
1674              string will be appended to the Python interpreter canonical
1675              name.
1676
1677Use these variables to override the choices made by `configure' or to help
1678it to find libraries and programs with nonstandard names/locations.
1679
1680Report bugs to <unbound-bugs@nlnetlabs.nl or https://github.com/NLnetLabs/unbound/issues>.
1681_ACEOF
1682ac_status=$?
1683fi
1684
1685if test "$ac_init_help" = "recursive"; then
1686  # If there are subdirs, report their specific --help.
1687  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1688    test -d "$ac_dir" ||
1689      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1690      continue
1691    ac_builddir=.
1692
1693case "$ac_dir" in
1694.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1695*)
1696  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1697  # A ".." for each directory in $ac_dir_suffix.
1698  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1699  case $ac_top_builddir_sub in
1700  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1701  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1702  esac ;;
1703esac
1704ac_abs_top_builddir=$ac_pwd
1705ac_abs_builddir=$ac_pwd$ac_dir_suffix
1706# for backward compatibility:
1707ac_top_builddir=$ac_top_build_prefix
1708
1709case $srcdir in
1710  .)  # We are building in place.
1711    ac_srcdir=.
1712    ac_top_srcdir=$ac_top_builddir_sub
1713    ac_abs_top_srcdir=$ac_pwd ;;
1714  [\\/]* | ?:[\\/]* )  # Absolute name.
1715    ac_srcdir=$srcdir$ac_dir_suffix;
1716    ac_top_srcdir=$srcdir
1717    ac_abs_top_srcdir=$srcdir ;;
1718  *) # Relative name.
1719    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1720    ac_top_srcdir=$ac_top_build_prefix$srcdir
1721    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1722esac
1723ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1724
1725    cd "$ac_dir" || { ac_status=$?; continue; }
1726    # Check for guested configure.
1727    if test -f "$ac_srcdir/configure.gnu"; then
1728      echo &&
1729      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1730    elif test -f "$ac_srcdir/configure"; then
1731      echo &&
1732      $SHELL "$ac_srcdir/configure" --help=recursive
1733    else
1734      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1735    fi || ac_status=$?
1736    cd "$ac_pwd" || { ac_status=$?; break; }
1737  done
1738fi
1739
1740test -n "$ac_init_help" && exit $ac_status
1741if $ac_init_version; then
1742  cat <<\_ACEOF
1743unbound configure 1.10.1
1744generated by GNU Autoconf 2.69
1745
1746Copyright (C) 2012 Free Software Foundation, Inc.
1747This configure script is free software; the Free Software Foundation
1748gives unlimited permission to copy, distribute and modify it.
1749_ACEOF
1750  exit
1751fi
1752
1753## ------------------------ ##
1754## Autoconf initialization. ##
1755## ------------------------ ##
1756
1757# ac_fn_c_try_compile LINENO
1758# --------------------------
1759# Try to compile conftest.$ac_ext, and return whether this succeeded.
1760ac_fn_c_try_compile ()
1761{
1762  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1763  rm -f conftest.$ac_objext
1764  if { { ac_try="$ac_compile"
1765case "(($ac_try" in
1766  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1767  *) ac_try_echo=$ac_try;;
1768esac
1769eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1770$as_echo "$ac_try_echo"; } >&5
1771  (eval "$ac_compile") 2>conftest.err
1772  ac_status=$?
1773  if test -s conftest.err; then
1774    grep -v '^ *+' conftest.err >conftest.er1
1775    cat conftest.er1 >&5
1776    mv -f conftest.er1 conftest.err
1777  fi
1778  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1779  test $ac_status = 0; } && {
1780	 test -z "$ac_c_werror_flag" ||
1781	 test ! -s conftest.err
1782       } && test -s conftest.$ac_objext; then :
1783  ac_retval=0
1784else
1785  $as_echo "$as_me: failed program was:" >&5
1786sed 's/^/| /' conftest.$ac_ext >&5
1787
1788	ac_retval=1
1789fi
1790  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1791  as_fn_set_status $ac_retval
1792
1793} # ac_fn_c_try_compile
1794
1795# ac_fn_c_try_cpp LINENO
1796# ----------------------
1797# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1798ac_fn_c_try_cpp ()
1799{
1800  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1801  if { { ac_try="$ac_cpp conftest.$ac_ext"
1802case "(($ac_try" in
1803  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1804  *) ac_try_echo=$ac_try;;
1805esac
1806eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1807$as_echo "$ac_try_echo"; } >&5
1808  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1809  ac_status=$?
1810  if test -s conftest.err; then
1811    grep -v '^ *+' conftest.err >conftest.er1
1812    cat conftest.er1 >&5
1813    mv -f conftest.er1 conftest.err
1814  fi
1815  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1816  test $ac_status = 0; } > conftest.i && {
1817	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1818	 test ! -s conftest.err
1819       }; then :
1820  ac_retval=0
1821else
1822  $as_echo "$as_me: failed program was:" >&5
1823sed 's/^/| /' conftest.$ac_ext >&5
1824
1825    ac_retval=1
1826fi
1827  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1828  as_fn_set_status $ac_retval
1829
1830} # ac_fn_c_try_cpp
1831
1832# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1833# -------------------------------------------------------
1834# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1835# the include files in INCLUDES and setting the cache variable VAR
1836# accordingly.
1837ac_fn_c_check_header_mongrel ()
1838{
1839  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1840  if eval \${$3+:} false; then :
1841  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1842$as_echo_n "checking for $2... " >&6; }
1843if eval \${$3+:} false; then :
1844  $as_echo_n "(cached) " >&6
1845fi
1846eval ac_res=\$$3
1847	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1848$as_echo "$ac_res" >&6; }
1849else
1850  # Is the header compilable?
1851{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1852$as_echo_n "checking $2 usability... " >&6; }
1853cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1854/* end confdefs.h.  */
1855$4
1856#include <$2>
1857_ACEOF
1858if ac_fn_c_try_compile "$LINENO"; then :
1859  ac_header_compiler=yes
1860else
1861  ac_header_compiler=no
1862fi
1863rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1864{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1865$as_echo "$ac_header_compiler" >&6; }
1866
1867# Is the header present?
1868{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1869$as_echo_n "checking $2 presence... " >&6; }
1870cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1871/* end confdefs.h.  */
1872#include <$2>
1873_ACEOF
1874if ac_fn_c_try_cpp "$LINENO"; then :
1875  ac_header_preproc=yes
1876else
1877  ac_header_preproc=no
1878fi
1879rm -f conftest.err conftest.i conftest.$ac_ext
1880{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1881$as_echo "$ac_header_preproc" >&6; }
1882
1883# So?  What about this header?
1884case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1885  yes:no: )
1886    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1887$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1888    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1889$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1890    ;;
1891  no:yes:* )
1892    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1893$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1894    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
1895$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
1896    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1897$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1898    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
1899$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
1900    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1901$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1902( $as_echo "## --------------------------------------------------------------------------------------- ##
1903## Report this to unbound-bugs@nlnetlabs.nl or https://github.com/NLnetLabs/unbound/issues ##
1904## --------------------------------------------------------------------------------------- ##"
1905     ) | sed "s/^/$as_me: WARNING:     /" >&2
1906    ;;
1907esac
1908  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1909$as_echo_n "checking for $2... " >&6; }
1910if eval \${$3+:} false; then :
1911  $as_echo_n "(cached) " >&6
1912else
1913  eval "$3=\$ac_header_compiler"
1914fi
1915eval ac_res=\$$3
1916	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1917$as_echo "$ac_res" >&6; }
1918fi
1919  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1920
1921} # ac_fn_c_check_header_mongrel
1922
1923# ac_fn_c_try_run LINENO
1924# ----------------------
1925# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1926# that executables *can* be run.
1927ac_fn_c_try_run ()
1928{
1929  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1930  if { { ac_try="$ac_link"
1931case "(($ac_try" in
1932  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1933  *) ac_try_echo=$ac_try;;
1934esac
1935eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1936$as_echo "$ac_try_echo"; } >&5
1937  (eval "$ac_link") 2>&5
1938  ac_status=$?
1939  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1940  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1941  { { case "(($ac_try" in
1942  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1943  *) ac_try_echo=$ac_try;;
1944esac
1945eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1946$as_echo "$ac_try_echo"; } >&5
1947  (eval "$ac_try") 2>&5
1948  ac_status=$?
1949  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1950  test $ac_status = 0; }; }; then :
1951  ac_retval=0
1952else
1953  $as_echo "$as_me: program exited with status $ac_status" >&5
1954       $as_echo "$as_me: failed program was:" >&5
1955sed 's/^/| /' conftest.$ac_ext >&5
1956
1957       ac_retval=$ac_status
1958fi
1959  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1960  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1961  as_fn_set_status $ac_retval
1962
1963} # ac_fn_c_try_run
1964
1965# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1966# -------------------------------------------------------
1967# Tests whether HEADER exists and can be compiled using the include files in
1968# INCLUDES, setting the cache variable VAR accordingly.
1969ac_fn_c_check_header_compile ()
1970{
1971  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1972  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1973$as_echo_n "checking for $2... " >&6; }
1974if eval \${$3+:} false; then :
1975  $as_echo_n "(cached) " >&6
1976else
1977  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1978/* end confdefs.h.  */
1979$4
1980#include <$2>
1981_ACEOF
1982if ac_fn_c_try_compile "$LINENO"; then :
1983  eval "$3=yes"
1984else
1985  eval "$3=no"
1986fi
1987rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1988fi
1989eval ac_res=\$$3
1990	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1991$as_echo "$ac_res" >&6; }
1992  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1993
1994} # ac_fn_c_check_header_compile
1995
1996# ac_fn_c_try_link LINENO
1997# -----------------------
1998# Try to link conftest.$ac_ext, and return whether this succeeded.
1999ac_fn_c_try_link ()
2000{
2001  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2002  rm -f conftest.$ac_objext conftest$ac_exeext
2003  if { { ac_try="$ac_link"
2004case "(($ac_try" in
2005  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2006  *) ac_try_echo=$ac_try;;
2007esac
2008eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2009$as_echo "$ac_try_echo"; } >&5
2010  (eval "$ac_link") 2>conftest.err
2011  ac_status=$?
2012  if test -s conftest.err; then
2013    grep -v '^ *+' conftest.err >conftest.er1
2014    cat conftest.er1 >&5
2015    mv -f conftest.er1 conftest.err
2016  fi
2017  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2018  test $ac_status = 0; } && {
2019	 test -z "$ac_c_werror_flag" ||
2020	 test ! -s conftest.err
2021       } && test -s conftest$ac_exeext && {
2022	 test "$cross_compiling" = yes ||
2023	 test -x conftest$ac_exeext
2024       }; then :
2025  ac_retval=0
2026else
2027  $as_echo "$as_me: failed program was:" >&5
2028sed 's/^/| /' conftest.$ac_ext >&5
2029
2030	ac_retval=1
2031fi
2032  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2033  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2034  # interfere with the next link command; also delete a directory that is
2035  # left behind by Apple's compiler.  We do this before executing the actions.
2036  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2037  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2038  as_fn_set_status $ac_retval
2039
2040} # ac_fn_c_try_link
2041
2042# ac_fn_c_check_func LINENO FUNC VAR
2043# ----------------------------------
2044# Tests whether FUNC exists, setting the cache variable VAR accordingly
2045ac_fn_c_check_func ()
2046{
2047  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2048  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2049$as_echo_n "checking for $2... " >&6; }
2050if eval \${$3+:} false; then :
2051  $as_echo_n "(cached) " >&6
2052else
2053  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2054/* end confdefs.h.  */
2055/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2056   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2057#define $2 innocuous_$2
2058
2059/* System header to define __stub macros and hopefully few prototypes,
2060    which can conflict with char $2 (); below.
2061    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2062    <limits.h> exists even on freestanding compilers.  */
2063
2064#ifdef __STDC__
2065# include <limits.h>
2066#else
2067# include <assert.h>
2068#endif
2069
2070#undef $2
2071
2072/* Override any GCC internal prototype to avoid an error.
2073   Use char because int might match the return type of a GCC
2074   builtin and then its argument prototype would still apply.  */
2075#ifdef __cplusplus
2076extern "C"
2077#endif
2078char $2 ();
2079/* The GNU C library defines this for functions which it implements
2080    to always fail with ENOSYS.  Some functions are actually named
2081    something starting with __ and the normal name is an alias.  */
2082#if defined __stub_$2 || defined __stub___$2
2083choke me
2084#endif
2085
2086int
2087main ()
2088{
2089return $2 ();
2090  ;
2091  return 0;
2092}
2093_ACEOF
2094if ac_fn_c_try_link "$LINENO"; then :
2095  eval "$3=yes"
2096else
2097  eval "$3=no"
2098fi
2099rm -f core conftest.err conftest.$ac_objext \
2100    conftest$ac_exeext conftest.$ac_ext
2101fi
2102eval ac_res=\$$3
2103	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2104$as_echo "$ac_res" >&6; }
2105  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2106
2107} # ac_fn_c_check_func
2108
2109# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2110# -------------------------------------------
2111# Tests whether TYPE exists after having included INCLUDES, setting cache
2112# variable VAR accordingly.
2113ac_fn_c_check_type ()
2114{
2115  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2116  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2117$as_echo_n "checking for $2... " >&6; }
2118if eval \${$3+:} false; then :
2119  $as_echo_n "(cached) " >&6
2120else
2121  eval "$3=no"
2122  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2123/* end confdefs.h.  */
2124$4
2125int
2126main ()
2127{
2128if (sizeof ($2))
2129	 return 0;
2130  ;
2131  return 0;
2132}
2133_ACEOF
2134if ac_fn_c_try_compile "$LINENO"; then :
2135  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2136/* end confdefs.h.  */
2137$4
2138int
2139main ()
2140{
2141if (sizeof (($2)))
2142	    return 0;
2143  ;
2144  return 0;
2145}
2146_ACEOF
2147if ac_fn_c_try_compile "$LINENO"; then :
2148
2149else
2150  eval "$3=yes"
2151fi
2152rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2153fi
2154rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2155fi
2156eval ac_res=\$$3
2157	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2158$as_echo "$ac_res" >&6; }
2159  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2160
2161} # ac_fn_c_check_type
2162
2163# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2164# --------------------------------------------
2165# Tries to find the compile-time value of EXPR in a program that includes
2166# INCLUDES, setting VAR accordingly. Returns whether the value could be
2167# computed
2168ac_fn_c_compute_int ()
2169{
2170  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2171  if test "$cross_compiling" = yes; then
2172    # Depending upon the size, compute the lo and hi bounds.
2173cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2174/* end confdefs.h.  */
2175$4
2176int
2177main ()
2178{
2179static int test_array [1 - 2 * !(($2) >= 0)];
2180test_array [0] = 0;
2181return test_array [0];
2182
2183  ;
2184  return 0;
2185}
2186_ACEOF
2187if ac_fn_c_try_compile "$LINENO"; then :
2188  ac_lo=0 ac_mid=0
2189  while :; do
2190    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2191/* end confdefs.h.  */
2192$4
2193int
2194main ()
2195{
2196static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2197test_array [0] = 0;
2198return test_array [0];
2199
2200  ;
2201  return 0;
2202}
2203_ACEOF
2204if ac_fn_c_try_compile "$LINENO"; then :
2205  ac_hi=$ac_mid; break
2206else
2207  as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2208			if test $ac_lo -le $ac_mid; then
2209			  ac_lo= ac_hi=
2210			  break
2211			fi
2212			as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2213fi
2214rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2215  done
2216else
2217  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2218/* end confdefs.h.  */
2219$4
2220int
2221main ()
2222{
2223static int test_array [1 - 2 * !(($2) < 0)];
2224test_array [0] = 0;
2225return test_array [0];
2226
2227  ;
2228  return 0;
2229}
2230_ACEOF
2231if ac_fn_c_try_compile "$LINENO"; then :
2232  ac_hi=-1 ac_mid=-1
2233  while :; do
2234    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2235/* end confdefs.h.  */
2236$4
2237int
2238main ()
2239{
2240static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2241test_array [0] = 0;
2242return test_array [0];
2243
2244  ;
2245  return 0;
2246}
2247_ACEOF
2248if ac_fn_c_try_compile "$LINENO"; then :
2249  ac_lo=$ac_mid; break
2250else
2251  as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2252			if test $ac_mid -le $ac_hi; then
2253			  ac_lo= ac_hi=
2254			  break
2255			fi
2256			as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2257fi
2258rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2259  done
2260else
2261  ac_lo= ac_hi=
2262fi
2263rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2264fi
2265rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2266# Binary search between lo and hi bounds.
2267while test "x$ac_lo" != "x$ac_hi"; do
2268  as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2269  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2270/* end confdefs.h.  */
2271$4
2272int
2273main ()
2274{
2275static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2276test_array [0] = 0;
2277return test_array [0];
2278
2279  ;
2280  return 0;
2281}
2282_ACEOF
2283if ac_fn_c_try_compile "$LINENO"; then :
2284  ac_hi=$ac_mid
2285else
2286  as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2287fi
2288rm -f core conftest.err conftest.$ac_objext 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 () { return $2; }
2299static unsigned long int ulongval () { return $2; }
2300#include <stdio.h>
2301#include <stdlib.h>
2302int
2303main ()
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"; then :
2332  echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2333else
2334  ac_retval=1
2335fi
2336rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2337  conftest.$ac_objext conftest.beam conftest.$ac_ext
2338rm -f conftest.val
2339
2340  fi
2341  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2342  as_fn_set_status $ac_retval
2343
2344} # ac_fn_c_compute_int
2345
2346# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2347# ---------------------------------------------
2348# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2349# accordingly.
2350ac_fn_c_check_decl ()
2351{
2352  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2353  as_decl_name=`echo $2|sed 's/ *(.*//'`
2354  as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2355  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2356$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2357if eval \${$3+:} false; then :
2358  $as_echo_n "(cached) " >&6
2359else
2360  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2361/* end confdefs.h.  */
2362$4
2363int
2364main ()
2365{
2366#ifndef $as_decl_name
2367#ifdef __cplusplus
2368  (void) $as_decl_use;
2369#else
2370  (void) $as_decl_name;
2371#endif
2372#endif
2373
2374  ;
2375  return 0;
2376}
2377_ACEOF
2378if ac_fn_c_try_compile "$LINENO"; then :
2379  eval "$3=yes"
2380else
2381  eval "$3=no"
2382fi
2383rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2384fi
2385eval ac_res=\$$3
2386	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2387$as_echo "$ac_res" >&6; }
2388  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2389
2390} # ac_fn_c_check_decl
2391
2392# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2393# ----------------------------------------------------
2394# Tries to find if the field MEMBER exists in type AGGR, after including
2395# INCLUDES, setting cache variable VAR accordingly.
2396ac_fn_c_check_member ()
2397{
2398  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2399  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2400$as_echo_n "checking for $2.$3... " >&6; }
2401if eval \${$4+:} false; then :
2402  $as_echo_n "(cached) " >&6
2403else
2404  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2405/* end confdefs.h.  */
2406$5
2407int
2408main ()
2409{
2410static $2 ac_aggr;
2411if (ac_aggr.$3)
2412return 0;
2413  ;
2414  return 0;
2415}
2416_ACEOF
2417if ac_fn_c_try_compile "$LINENO"; then :
2418  eval "$4=yes"
2419else
2420  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2421/* end confdefs.h.  */
2422$5
2423int
2424main ()
2425{
2426static $2 ac_aggr;
2427if (sizeof ac_aggr.$3)
2428return 0;
2429  ;
2430  return 0;
2431}
2432_ACEOF
2433if ac_fn_c_try_compile "$LINENO"; then :
2434  eval "$4=yes"
2435else
2436  eval "$4=no"
2437fi
2438rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2439fi
2440rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2441fi
2442eval ac_res=\$$4
2443	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2444$as_echo "$ac_res" >&6; }
2445  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2446
2447} # ac_fn_c_check_member
2448cat >config.log <<_ACEOF
2449This file contains any messages produced by compilers while
2450running configure, to aid debugging if configure makes a mistake.
2451
2452It was created by unbound $as_me 1.10.1, which was
2453generated by GNU Autoconf 2.69.  Invocation command line was
2454
2455  $ $0 $@
2456
2457_ACEOF
2458exec 5>>config.log
2459{
2460cat <<_ASUNAME
2461## --------- ##
2462## Platform. ##
2463## --------- ##
2464
2465hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2466uname -m = `(uname -m) 2>/dev/null || echo unknown`
2467uname -r = `(uname -r) 2>/dev/null || echo unknown`
2468uname -s = `(uname -s) 2>/dev/null || echo unknown`
2469uname -v = `(uname -v) 2>/dev/null || echo unknown`
2470
2471/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2472/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2473
2474/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2475/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2476/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2477/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2478/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2479/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2480/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2481
2482_ASUNAME
2483
2484as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2485for as_dir in $PATH
2486do
2487  IFS=$as_save_IFS
2488  test -z "$as_dir" && as_dir=.
2489    $as_echo "PATH: $as_dir"
2490  done
2491IFS=$as_save_IFS
2492
2493} >&5
2494
2495cat >&5 <<_ACEOF
2496
2497
2498## ----------- ##
2499## Core tests. ##
2500## ----------- ##
2501
2502_ACEOF
2503
2504
2505# Keep a trace of the command line.
2506# Strip out --no-create and --no-recursion so they do not pile up.
2507# Strip out --silent because we don't want to record it for future runs.
2508# Also quote any args containing shell meta-characters.
2509# Make two passes to allow for proper duplicate-argument suppression.
2510ac_configure_args=
2511ac_configure_args0=
2512ac_configure_args1=
2513ac_must_keep_next=false
2514for ac_pass in 1 2
2515do
2516  for ac_arg
2517  do
2518    case $ac_arg in
2519    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2520    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2521    | -silent | --silent | --silen | --sile | --sil)
2522      continue ;;
2523    *\'*)
2524      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2525    esac
2526    case $ac_pass in
2527    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2528    2)
2529      as_fn_append ac_configure_args1 " '$ac_arg'"
2530      if test $ac_must_keep_next = true; then
2531	ac_must_keep_next=false # Got value, back to normal.
2532      else
2533	case $ac_arg in
2534	  *=* | --config-cache | -C | -disable-* | --disable-* \
2535	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2536	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2537	  | -with-* | --with-* | -without-* | --without-* | --x)
2538	    case "$ac_configure_args0 " in
2539	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2540	    esac
2541	    ;;
2542	  -* ) ac_must_keep_next=true ;;
2543	esac
2544      fi
2545      as_fn_append ac_configure_args " '$ac_arg'"
2546      ;;
2547    esac
2548  done
2549done
2550{ ac_configure_args0=; unset ac_configure_args0;}
2551{ ac_configure_args1=; unset ac_configure_args1;}
2552
2553# When interrupted or exit'd, cleanup temporary files, and complete
2554# config.log.  We remove comments because anyway the quotes in there
2555# would cause problems or look ugly.
2556# WARNING: Use '\'' to represent an apostrophe within the trap.
2557# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2558trap 'exit_status=$?
2559  # Save into config.log some information that might help in debugging.
2560  {
2561    echo
2562
2563    $as_echo "## ---------------- ##
2564## Cache variables. ##
2565## ---------------- ##"
2566    echo
2567    # The following way of writing the cache mishandles newlines in values,
2568(
2569  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2570    eval ac_val=\$$ac_var
2571    case $ac_val in #(
2572    *${as_nl}*)
2573      case $ac_var in #(
2574      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2575$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2576      esac
2577      case $ac_var in #(
2578      _ | IFS | as_nl) ;; #(
2579      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2580      *) { eval $ac_var=; unset $ac_var;} ;;
2581      esac ;;
2582    esac
2583  done
2584  (set) 2>&1 |
2585    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2586    *${as_nl}ac_space=\ *)
2587      sed -n \
2588	"s/'\''/'\''\\\\'\'''\''/g;
2589	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2590      ;; #(
2591    *)
2592      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2593      ;;
2594    esac |
2595    sort
2596)
2597    echo
2598
2599    $as_echo "## ----------------- ##
2600## Output variables. ##
2601## ----------------- ##"
2602    echo
2603    for ac_var in $ac_subst_vars
2604    do
2605      eval ac_val=\$$ac_var
2606      case $ac_val in
2607      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2608      esac
2609      $as_echo "$ac_var='\''$ac_val'\''"
2610    done | sort
2611    echo
2612
2613    if test -n "$ac_subst_files"; then
2614      $as_echo "## ------------------- ##
2615## File substitutions. ##
2616## ------------------- ##"
2617      echo
2618      for ac_var in $ac_subst_files
2619      do
2620	eval ac_val=\$$ac_var
2621	case $ac_val in
2622	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2623	esac
2624	$as_echo "$ac_var='\''$ac_val'\''"
2625      done | sort
2626      echo
2627    fi
2628
2629    if test -s confdefs.h; then
2630      $as_echo "## ----------- ##
2631## confdefs.h. ##
2632## ----------- ##"
2633      echo
2634      cat confdefs.h
2635      echo
2636    fi
2637    test "$ac_signal" != 0 &&
2638      $as_echo "$as_me: caught signal $ac_signal"
2639    $as_echo "$as_me: exit $exit_status"
2640  } >&5
2641  rm -f core *.core core.conftest.* &&
2642    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2643    exit $exit_status
2644' 0
2645for ac_signal in 1 2 13 15; do
2646  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2647done
2648ac_signal=0
2649
2650# confdefs.h avoids OS command line length limits that DEFS can exceed.
2651rm -f -r conftest* confdefs.h
2652
2653$as_echo "/* confdefs.h */" > confdefs.h
2654
2655# Predefined preprocessor variables.
2656
2657cat >>confdefs.h <<_ACEOF
2658#define PACKAGE_NAME "$PACKAGE_NAME"
2659_ACEOF
2660
2661cat >>confdefs.h <<_ACEOF
2662#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2663_ACEOF
2664
2665cat >>confdefs.h <<_ACEOF
2666#define PACKAGE_VERSION "$PACKAGE_VERSION"
2667_ACEOF
2668
2669cat >>confdefs.h <<_ACEOF
2670#define PACKAGE_STRING "$PACKAGE_STRING"
2671_ACEOF
2672
2673cat >>confdefs.h <<_ACEOF
2674#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2675_ACEOF
2676
2677cat >>confdefs.h <<_ACEOF
2678#define PACKAGE_URL "$PACKAGE_URL"
2679_ACEOF
2680
2681
2682# Let the site file select an alternate cache file if it wants to.
2683# Prefer an explicitly selected file to automatically selected ones.
2684ac_site_file1=NONE
2685ac_site_file2=NONE
2686if test -n "$CONFIG_SITE"; then
2687  # We do not want a PATH search for config.site.
2688  case $CONFIG_SITE in #((
2689    -*)  ac_site_file1=./$CONFIG_SITE;;
2690    */*) ac_site_file1=$CONFIG_SITE;;
2691    *)   ac_site_file1=./$CONFIG_SITE;;
2692  esac
2693elif test "x$prefix" != xNONE; then
2694  ac_site_file1=$prefix/share/config.site
2695  ac_site_file2=$prefix/etc/config.site
2696else
2697  ac_site_file1=$ac_default_prefix/share/config.site
2698  ac_site_file2=$ac_default_prefix/etc/config.site
2699fi
2700for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2701do
2702  test "x$ac_site_file" = xNONE && continue
2703  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2704    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2705$as_echo "$as_me: loading site script $ac_site_file" >&6;}
2706    sed 's/^/| /' "$ac_site_file" >&5
2707    . "$ac_site_file" \
2708      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2709$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2710as_fn_error $? "failed to load site script $ac_site_file
2711See \`config.log' for more details" "$LINENO" 5; }
2712  fi
2713done
2714
2715if test -r "$cache_file"; then
2716  # Some versions of bash will fail to source /dev/null (special files
2717  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
2718  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2719    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2720$as_echo "$as_me: loading cache $cache_file" >&6;}
2721    case $cache_file in
2722      [\\/]* | ?:[\\/]* ) . "$cache_file";;
2723      *)                      . "./$cache_file";;
2724    esac
2725  fi
2726else
2727  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2728$as_echo "$as_me: creating cache $cache_file" >&6;}
2729  >$cache_file
2730fi
2731
2732# Check that the precious variables saved in the cache have kept the same
2733# value.
2734ac_cache_corrupted=false
2735for ac_var in $ac_precious_vars; do
2736  eval ac_old_set=\$ac_cv_env_${ac_var}_set
2737  eval ac_new_set=\$ac_env_${ac_var}_set
2738  eval ac_old_val=\$ac_cv_env_${ac_var}_value
2739  eval ac_new_val=\$ac_env_${ac_var}_value
2740  case $ac_old_set,$ac_new_set in
2741    set,)
2742      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2743$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2744      ac_cache_corrupted=: ;;
2745    ,set)
2746      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2747$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2748      ac_cache_corrupted=: ;;
2749    ,);;
2750    *)
2751      if test "x$ac_old_val" != "x$ac_new_val"; then
2752	# differences in whitespace do not lead to failure.
2753	ac_old_val_w=`echo x $ac_old_val`
2754	ac_new_val_w=`echo x $ac_new_val`
2755	if test "$ac_old_val_w" != "$ac_new_val_w"; then
2756	  { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2757$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2758	  ac_cache_corrupted=:
2759	else
2760	  { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2761$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2762	  eval $ac_var=\$ac_old_val
2763	fi
2764	{ $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
2765$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
2766	{ $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
2767$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
2768      fi;;
2769  esac
2770  # Pass precious variables to config.status.
2771  if test "$ac_new_set" = set; then
2772    case $ac_new_val in
2773    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2774    *) ac_arg=$ac_var=$ac_new_val ;;
2775    esac
2776    case " $ac_configure_args " in
2777      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
2778      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2779    esac
2780  fi
2781done
2782if $ac_cache_corrupted; then
2783  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2784$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2785  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2786$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2787  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2788fi
2789## -------------------- ##
2790## Main body of script. ##
2791## -------------------- ##
2792
2793ac_ext=c
2794ac_cpp='$CPP $CPPFLAGS'
2795ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2796ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2797ac_compiler_gnu=$ac_cv_c_compiler_gnu
2798
2799
2800UNBOUND_VERSION_MAJOR=1
2801
2802UNBOUND_VERSION_MINOR=10
2803
2804UNBOUND_VERSION_MICRO=1
2805
2806
2807LIBUNBOUND_CURRENT=9
2808LIBUNBOUND_REVISION=8
2809LIBUNBOUND_AGE=1
2810# 1.0.0 had 0:12:0
2811# 1.0.1 had 0:13:0
2812# 1.0.2 had 0:14:0
2813# 1.1.0 had 0:15:0
2814# 1.1.1 had 0:16:0
2815# 1.2.0 had 0:17:0
2816# 1.2.1 had 0:18:0
2817# 1.3.0 had 1:0:0   # ub_cancel and -export-symbols.
2818# 1.3.1 had 1:1:0
2819# 1.3.2 had 1:2:0
2820# 1.3.3 had 1:3:0
2821# 1.3.4 had 1:4:0
2822# 1.4.0-snapshots had 1:5:0
2823# 1.4.0 had 1:5:0 (not 2:0:0)   # ub_result.why_bogus
2824# 1.4.1 had 2:1:0
2825# 1.4.2 had 2:2:0
2826# 1.4.3 had 2:3:0
2827# 1.4.4 had 2:4:0
2828# 1.4.5 had 2:5:0
2829# 1.4.6 had 2:6:0
2830# 1.4.7 had 2:7:0
2831# 1.4.8 had 2:8:0
2832# 1.4.9 had 2:9:0
2833# 1.4.10 had 2:10:0
2834# 1.4.11 had 2:11:0
2835# 1.4.12 had 2:12:0
2836# 1.4.13 had 2:13:0
2837# and 1.4.13p1 and 1.4.13.p2
2838# 1.4.14 had 2:14:0
2839# 1.4.15 had 3:0:1 # adds ub_version()
2840# 1.4.16 had 3:1:1
2841# 1.4.17 had 3:2:1
2842# 1.4.18 had 3:3:1
2843# 1.4.19 had 3:4:1
2844# 1.4.20 had 4:0:2 # adds libunbound.ttl # but shipped 3:5:1
2845# 1.4.21 had 4:1:2
2846# 1.4.22 had 4:1:2
2847# 1.5.0 had 5:3:3 # adds ub_ctx_add_ta_autr
2848# 1.5.1 had 5:3:3
2849# 1.5.2 had 5:5:3
2850# 1.5.3 had 5:6:3
2851# 1.5.4 had 5:7:3
2852# 1.5.5 had 5:8:3
2853# 1.5.6 had 5:9:3
2854# 1.5.7 had 5:10:3
2855# 1.5.8 had 6:0:4 # adds ub_ctx_set_stub
2856# 1.5.9 had 6:1:4
2857# 1.5.10 had 6:2:4
2858# 1.6.0 had 6:3:4
2859# 1.6.1 had 7:0:5 # ub_callback_t typedef renamed to ub_callback_type
2860# 1.6.2 had 7:1:5
2861# 1.6.3 had 7:2:5
2862# 1.6.4 had 7:3:5
2863# 1.6.5 had 7:4:5
2864# 1.6.6 had 7:5:5
2865# 1.6.7 had 7:6:5
2866# 1.6.8 had 7:7:5
2867# 1.7.0 had 7:8:5
2868# 1.7.1 had 7:9:5
2869# 1.7.2 had 7:10:5
2870# 1.7.3 had 7:11:5
2871# 1.8.0 had 8:0:0 # changes the event callback function signature
2872# 1.8.1 had 8:1:0
2873# 1.8.2 had 8:2:0
2874# 1.8.3 had 8:3:0
2875# 1.9.0 had 9:0:1 # add ub_ctx_set_tls
2876# 1.9.1 had 9:1:1
2877# 1.9.2 had 9:2:1
2878# 1.9.3 had 9:3:1
2879# 1.9.4 had 9:4:1
2880# 1.9.5 had 9:5:1
2881# 1.9.6 had 9:6:1
2882# 1.10.0 had 9:7:1
2883# 1.10.1 had 9:8:1
2884
2885#   Current  -- the number of the binary API that we're implementing
2886#   Revision -- which iteration of the implementation of the binary
2887#               API are we supplying?
2888#   Age      -- How many previous binary API versions do we also
2889#               support?
2890#
2891# If we release a new version that does not change the binary API,
2892# increment Revision.
2893#
2894# If we release a new version that changes the binary API, but does
2895# not break programs compiled against the old binary API, increment
2896# Current and Age.  Set Revision to 0, since this is the first
2897# implementation of the new API.
2898#
2899# Otherwise, we're changing the binary API and breaking backward
2900# compatibility with old binaries.  Increment Current.  Set Age to 0,
2901# since we're backward compatible with no previous APIs.  Set Revision
2902# to 0 too.
2903
2904
2905
2906
2907
2908cmdln="`echo $@ | sed -e 's/\\\\/\\\\\\\\/g' | sed -e 's/"/\\\\"/'g`"
2909
2910cat >>confdefs.h <<_ACEOF
2911#define CONFCMDLINE "$cmdln"
2912_ACEOF
2913
2914
2915CFLAGS="$CFLAGS"
2916ac_ext=c
2917ac_cpp='$CPP $CPPFLAGS'
2918ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2919ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2920ac_compiler_gnu=$ac_cv_c_compiler_gnu
2921if test -n "$ac_tool_prefix"; then
2922  # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2923set dummy ${ac_tool_prefix}gcc; ac_word=$2
2924{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2925$as_echo_n "checking for $ac_word... " >&6; }
2926if ${ac_cv_prog_CC+:} false; then :
2927  $as_echo_n "(cached) " >&6
2928else
2929  if test -n "$CC"; then
2930  ac_cv_prog_CC="$CC" # Let the user override the test.
2931else
2932as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2933for as_dir in $PATH
2934do
2935  IFS=$as_save_IFS
2936  test -z "$as_dir" && as_dir=.
2937    for ac_exec_ext in '' $ac_executable_extensions; do
2938  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2939    ac_cv_prog_CC="${ac_tool_prefix}gcc"
2940    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2941    break 2
2942  fi
2943done
2944  done
2945IFS=$as_save_IFS
2946
2947fi
2948fi
2949CC=$ac_cv_prog_CC
2950if test -n "$CC"; then
2951  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2952$as_echo "$CC" >&6; }
2953else
2954  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2955$as_echo "no" >&6; }
2956fi
2957
2958
2959fi
2960if test -z "$ac_cv_prog_CC"; then
2961  ac_ct_CC=$CC
2962  # Extract the first word of "gcc", so it can be a program name with args.
2963set dummy gcc; ac_word=$2
2964{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2965$as_echo_n "checking for $ac_word... " >&6; }
2966if ${ac_cv_prog_ac_ct_CC+:} false; then :
2967  $as_echo_n "(cached) " >&6
2968else
2969  if test -n "$ac_ct_CC"; then
2970  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2971else
2972as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2973for as_dir in $PATH
2974do
2975  IFS=$as_save_IFS
2976  test -z "$as_dir" && as_dir=.
2977    for ac_exec_ext in '' $ac_executable_extensions; do
2978  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2979    ac_cv_prog_ac_ct_CC="gcc"
2980    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2981    break 2
2982  fi
2983done
2984  done
2985IFS=$as_save_IFS
2986
2987fi
2988fi
2989ac_ct_CC=$ac_cv_prog_ac_ct_CC
2990if test -n "$ac_ct_CC"; then
2991  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
2992$as_echo "$ac_ct_CC" >&6; }
2993else
2994  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2995$as_echo "no" >&6; }
2996fi
2997
2998  if test "x$ac_ct_CC" = x; then
2999    CC=""
3000  else
3001    case $cross_compiling:$ac_tool_warned in
3002yes:)
3003{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3004$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3005ac_tool_warned=yes ;;
3006esac
3007    CC=$ac_ct_CC
3008  fi
3009else
3010  CC="$ac_cv_prog_CC"
3011fi
3012
3013if test -z "$CC"; then
3014          if test -n "$ac_tool_prefix"; then
3015    # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
3016set dummy ${ac_tool_prefix}cc; ac_word=$2
3017{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3018$as_echo_n "checking for $ac_word... " >&6; }
3019if ${ac_cv_prog_CC+:} false; then :
3020  $as_echo_n "(cached) " >&6
3021else
3022  if test -n "$CC"; then
3023  ac_cv_prog_CC="$CC" # Let the user override the test.
3024else
3025as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3026for as_dir in $PATH
3027do
3028  IFS=$as_save_IFS
3029  test -z "$as_dir" && as_dir=.
3030    for ac_exec_ext in '' $ac_executable_extensions; do
3031  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3032    ac_cv_prog_CC="${ac_tool_prefix}cc"
3033    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3034    break 2
3035  fi
3036done
3037  done
3038IFS=$as_save_IFS
3039
3040fi
3041fi
3042CC=$ac_cv_prog_CC
3043if test -n "$CC"; then
3044  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3045$as_echo "$CC" >&6; }
3046else
3047  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3048$as_echo "no" >&6; }
3049fi
3050
3051
3052  fi
3053fi
3054if test -z "$CC"; then
3055  # Extract the first word of "cc", so it can be a program name with args.
3056set dummy cc; ac_word=$2
3057{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3058$as_echo_n "checking for $ac_word... " >&6; }
3059if ${ac_cv_prog_CC+:} false; then :
3060  $as_echo_n "(cached) " >&6
3061else
3062  if test -n "$CC"; then
3063  ac_cv_prog_CC="$CC" # Let the user override the test.
3064else
3065  ac_prog_rejected=no
3066as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3067for as_dir in $PATH
3068do
3069  IFS=$as_save_IFS
3070  test -z "$as_dir" && as_dir=.
3071    for ac_exec_ext in '' $ac_executable_extensions; do
3072  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3073    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3074       ac_prog_rejected=yes
3075       continue
3076     fi
3077    ac_cv_prog_CC="cc"
3078    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3079    break 2
3080  fi
3081done
3082  done
3083IFS=$as_save_IFS
3084
3085if test $ac_prog_rejected = yes; then
3086  # We found a bogon in the path, so make sure we never use it.
3087  set dummy $ac_cv_prog_CC
3088  shift
3089  if test $# != 0; then
3090    # We chose a different compiler from the bogus one.
3091    # However, it has the same basename, so the bogon will be chosen
3092    # first if we set CC to just the basename; use the full file name.
3093    shift
3094    ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
3095  fi
3096fi
3097fi
3098fi
3099CC=$ac_cv_prog_CC
3100if test -n "$CC"; then
3101  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3102$as_echo "$CC" >&6; }
3103else
3104  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3105$as_echo "no" >&6; }
3106fi
3107
3108
3109fi
3110if test -z "$CC"; then
3111  if test -n "$ac_tool_prefix"; then
3112  for ac_prog in cl.exe
3113  do
3114    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3115set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3116{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3117$as_echo_n "checking for $ac_word... " >&6; }
3118if ${ac_cv_prog_CC+:} false; then :
3119  $as_echo_n "(cached) " >&6
3120else
3121  if test -n "$CC"; then
3122  ac_cv_prog_CC="$CC" # Let the user override the test.
3123else
3124as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3125for as_dir in $PATH
3126do
3127  IFS=$as_save_IFS
3128  test -z "$as_dir" && as_dir=.
3129    for ac_exec_ext in '' $ac_executable_extensions; do
3130  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3131    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
3132    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3133    break 2
3134  fi
3135done
3136  done
3137IFS=$as_save_IFS
3138
3139fi
3140fi
3141CC=$ac_cv_prog_CC
3142if test -n "$CC"; then
3143  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3144$as_echo "$CC" >&6; }
3145else
3146  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3147$as_echo "no" >&6; }
3148fi
3149
3150
3151    test -n "$CC" && break
3152  done
3153fi
3154if test -z "$CC"; then
3155  ac_ct_CC=$CC
3156  for ac_prog in cl.exe
3157do
3158  # Extract the first word of "$ac_prog", so it can be a program name with args.
3159set dummy $ac_prog; ac_word=$2
3160{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3161$as_echo_n "checking for $ac_word... " >&6; }
3162if ${ac_cv_prog_ac_ct_CC+:} false; then :
3163  $as_echo_n "(cached) " >&6
3164else
3165  if test -n "$ac_ct_CC"; then
3166  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3167else
3168as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3169for as_dir in $PATH
3170do
3171  IFS=$as_save_IFS
3172  test -z "$as_dir" && as_dir=.
3173    for ac_exec_ext in '' $ac_executable_extensions; do
3174  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3175    ac_cv_prog_ac_ct_CC="$ac_prog"
3176    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3177    break 2
3178  fi
3179done
3180  done
3181IFS=$as_save_IFS
3182
3183fi
3184fi
3185ac_ct_CC=$ac_cv_prog_ac_ct_CC
3186if test -n "$ac_ct_CC"; then
3187  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3188$as_echo "$ac_ct_CC" >&6; }
3189else
3190  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3191$as_echo "no" >&6; }
3192fi
3193
3194
3195  test -n "$ac_ct_CC" && break
3196done
3197
3198  if test "x$ac_ct_CC" = x; then
3199    CC=""
3200  else
3201    case $cross_compiling:$ac_tool_warned in
3202yes:)
3203{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3204$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3205ac_tool_warned=yes ;;
3206esac
3207    CC=$ac_ct_CC
3208  fi
3209fi
3210
3211fi
3212
3213
3214test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3215$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3216as_fn_error $? "no acceptable C compiler found in \$PATH
3217See \`config.log' for more details" "$LINENO" 5; }
3218
3219# Provide some information about the compiler.
3220$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3221set X $ac_compile
3222ac_compiler=$2
3223for ac_option in --version -v -V -qversion; do
3224  { { ac_try="$ac_compiler $ac_option >&5"
3225case "(($ac_try" in
3226  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3227  *) ac_try_echo=$ac_try;;
3228esac
3229eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3230$as_echo "$ac_try_echo"; } >&5
3231  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
3232  ac_status=$?
3233  if test -s conftest.err; then
3234    sed '10a\
3235... rest of stderr output deleted ...
3236         10q' conftest.err >conftest.er1
3237    cat conftest.er1 >&5
3238  fi
3239  rm -f conftest.er1 conftest.err
3240  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3241  test $ac_status = 0; }
3242done
3243
3244cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3245/* end confdefs.h.  */
3246
3247int
3248main ()
3249{
3250
3251  ;
3252  return 0;
3253}
3254_ACEOF
3255ac_clean_files_save=$ac_clean_files
3256ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
3257# Try to create an executable without -o first, disregard a.out.
3258# It will help us diagnose broken compilers, and finding out an intuition
3259# of exeext.
3260{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3261$as_echo_n "checking whether the C compiler works... " >&6; }
3262ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3263
3264# The possible output files:
3265ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3266
3267ac_rmfiles=
3268for ac_file in $ac_files
3269do
3270  case $ac_file in
3271    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3272    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3273  esac
3274done
3275rm -f $ac_rmfiles
3276
3277if { { ac_try="$ac_link_default"
3278case "(($ac_try" in
3279  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3280  *) ac_try_echo=$ac_try;;
3281esac
3282eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3283$as_echo "$ac_try_echo"; } >&5
3284  (eval "$ac_link_default") 2>&5
3285  ac_status=$?
3286  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3287  test $ac_status = 0; }; then :
3288  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3289# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3290# in a Makefile.  We should not override ac_cv_exeext if it was cached,
3291# so that the user can short-circuit this test for compilers unknown to
3292# Autoconf.
3293for ac_file in $ac_files ''
3294do
3295  test -f "$ac_file" || continue
3296  case $ac_file in
3297    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
3298	;;
3299    [ab].out )
3300	# We found the default executable, but exeext='' is most
3301	# certainly right.
3302	break;;
3303    *.* )
3304	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
3305	then :; else
3306	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3307	fi
3308	# We set ac_cv_exeext here because the later test for it is not
3309	# safe: cross compilers may not add the suffix if given an `-o'
3310	# argument, so we may need to know it at that point already.
3311	# Even if this section looks crufty: it has the advantage of
3312	# actually working.
3313	break;;
3314    * )
3315	break;;
3316  esac
3317done
3318test "$ac_cv_exeext" = no && ac_cv_exeext=
3319
3320else
3321  ac_file=''
3322fi
3323if test -z "$ac_file"; then :
3324  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3325$as_echo "no" >&6; }
3326$as_echo "$as_me: failed program was:" >&5
3327sed 's/^/| /' conftest.$ac_ext >&5
3328
3329{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3330$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3331as_fn_error 77 "C compiler cannot create executables
3332See \`config.log' for more details" "$LINENO" 5; }
3333else
3334  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3335$as_echo "yes" >&6; }
3336fi
3337{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3338$as_echo_n "checking for C compiler default output file name... " >&6; }
3339{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3340$as_echo "$ac_file" >&6; }
3341ac_exeext=$ac_cv_exeext
3342
3343rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
3344ac_clean_files=$ac_clean_files_save
3345{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3346$as_echo_n "checking for suffix of executables... " >&6; }
3347if { { ac_try="$ac_link"
3348case "(($ac_try" in
3349  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3350  *) ac_try_echo=$ac_try;;
3351esac
3352eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3353$as_echo "$ac_try_echo"; } >&5
3354  (eval "$ac_link") 2>&5
3355  ac_status=$?
3356  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3357  test $ac_status = 0; }; then :
3358  # If both `conftest.exe' and `conftest' are `present' (well, observable)
3359# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
3360# work properly (i.e., refer to `conftest.exe'), while it won't with
3361# `rm'.
3362for ac_file in conftest.exe conftest conftest.*; do
3363  test -f "$ac_file" || continue
3364  case $ac_file in
3365    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3366    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3367	  break;;
3368    * ) break;;
3369  esac
3370done
3371else
3372  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3373$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3374as_fn_error $? "cannot compute suffix of executables: cannot compile and link
3375See \`config.log' for more details" "$LINENO" 5; }
3376fi
3377rm -f conftest conftest$ac_cv_exeext
3378{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3379$as_echo "$ac_cv_exeext" >&6; }
3380
3381rm -f conftest.$ac_ext
3382EXEEXT=$ac_cv_exeext
3383ac_exeext=$EXEEXT
3384cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3385/* end confdefs.h.  */
3386#include <stdio.h>
3387int
3388main ()
3389{
3390FILE *f = fopen ("conftest.out", "w");
3391 return ferror (f) || fclose (f) != 0;
3392
3393  ;
3394  return 0;
3395}
3396_ACEOF
3397ac_clean_files="$ac_clean_files conftest.out"
3398# Check that the compiler produces executables we can run.  If not, either
3399# the compiler is broken, or we cross compile.
3400{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3401$as_echo_n "checking whether we are cross compiling... " >&6; }
3402if test "$cross_compiling" != yes; then
3403  { { ac_try="$ac_link"
3404case "(($ac_try" in
3405  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3406  *) ac_try_echo=$ac_try;;
3407esac
3408eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3409$as_echo "$ac_try_echo"; } >&5
3410  (eval "$ac_link") 2>&5
3411  ac_status=$?
3412  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3413  test $ac_status = 0; }
3414  if { ac_try='./conftest$ac_cv_exeext'
3415  { { case "(($ac_try" in
3416  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3417  *) ac_try_echo=$ac_try;;
3418esac
3419eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3420$as_echo "$ac_try_echo"; } >&5
3421  (eval "$ac_try") 2>&5
3422  ac_status=$?
3423  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3424  test $ac_status = 0; }; }; then
3425    cross_compiling=no
3426  else
3427    if test "$cross_compiling" = maybe; then
3428	cross_compiling=yes
3429    else
3430	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3431$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3432as_fn_error $? "cannot run C compiled programs.
3433If you meant to cross compile, use \`--host'.
3434See \`config.log' for more details" "$LINENO" 5; }
3435    fi
3436  fi
3437fi
3438{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3439$as_echo "$cross_compiling" >&6; }
3440
3441rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
3442ac_clean_files=$ac_clean_files_save
3443{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3444$as_echo_n "checking for suffix of object files... " >&6; }
3445if ${ac_cv_objext+:} false; then :
3446  $as_echo_n "(cached) " >&6
3447else
3448  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3449/* end confdefs.h.  */
3450
3451int
3452main ()
3453{
3454
3455  ;
3456  return 0;
3457}
3458_ACEOF
3459rm -f conftest.o conftest.obj
3460if { { ac_try="$ac_compile"
3461case "(($ac_try" in
3462  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3463  *) ac_try_echo=$ac_try;;
3464esac
3465eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3466$as_echo "$ac_try_echo"; } >&5
3467  (eval "$ac_compile") 2>&5
3468  ac_status=$?
3469  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3470  test $ac_status = 0; }; then :
3471  for ac_file in conftest.o conftest.obj conftest.*; do
3472  test -f "$ac_file" || continue;
3473  case $ac_file in
3474    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
3475    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3476       break;;
3477  esac
3478done
3479else
3480  $as_echo "$as_me: failed program was:" >&5
3481sed 's/^/| /' conftest.$ac_ext >&5
3482
3483{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3484$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3485as_fn_error $? "cannot compute suffix of object files: cannot compile
3486See \`config.log' for more details" "$LINENO" 5; }
3487fi
3488rm -f conftest.$ac_cv_objext conftest.$ac_ext
3489fi
3490{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3491$as_echo "$ac_cv_objext" >&6; }
3492OBJEXT=$ac_cv_objext
3493ac_objext=$OBJEXT
3494{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
3495$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
3496if ${ac_cv_c_compiler_gnu+:} false; then :
3497  $as_echo_n "(cached) " >&6
3498else
3499  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3500/* end confdefs.h.  */
3501
3502int
3503main ()
3504{
3505#ifndef __GNUC__
3506       choke me
3507#endif
3508
3509  ;
3510  return 0;
3511}
3512_ACEOF
3513if ac_fn_c_try_compile "$LINENO"; then :
3514  ac_compiler_gnu=yes
3515else
3516  ac_compiler_gnu=no
3517fi
3518rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3519ac_cv_c_compiler_gnu=$ac_compiler_gnu
3520
3521fi
3522{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
3523$as_echo "$ac_cv_c_compiler_gnu" >&6; }
3524if test $ac_compiler_gnu = yes; then
3525  GCC=yes
3526else
3527  GCC=
3528fi
3529ac_test_CFLAGS=${CFLAGS+set}
3530ac_save_CFLAGS=$CFLAGS
3531{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
3532$as_echo_n "checking whether $CC accepts -g... " >&6; }
3533if ${ac_cv_prog_cc_g+:} false; then :
3534  $as_echo_n "(cached) " >&6
3535else
3536  ac_save_c_werror_flag=$ac_c_werror_flag
3537   ac_c_werror_flag=yes
3538   ac_cv_prog_cc_g=no
3539   CFLAGS="-g"
3540   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3541/* end confdefs.h.  */
3542
3543int
3544main ()
3545{
3546
3547  ;
3548  return 0;
3549}
3550_ACEOF
3551if ac_fn_c_try_compile "$LINENO"; then :
3552  ac_cv_prog_cc_g=yes
3553else
3554  CFLAGS=""
3555      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3556/* end confdefs.h.  */
3557
3558int
3559main ()
3560{
3561
3562  ;
3563  return 0;
3564}
3565_ACEOF
3566if ac_fn_c_try_compile "$LINENO"; then :
3567
3568else
3569  ac_c_werror_flag=$ac_save_c_werror_flag
3570	 CFLAGS="-g"
3571	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3572/* end confdefs.h.  */
3573
3574int
3575main ()
3576{
3577
3578  ;
3579  return 0;
3580}
3581_ACEOF
3582if ac_fn_c_try_compile "$LINENO"; then :
3583  ac_cv_prog_cc_g=yes
3584fi
3585rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3586fi
3587rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3588fi
3589rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3590   ac_c_werror_flag=$ac_save_c_werror_flag
3591fi
3592{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
3593$as_echo "$ac_cv_prog_cc_g" >&6; }
3594if test "$ac_test_CFLAGS" = set; then
3595  CFLAGS=$ac_save_CFLAGS
3596elif test $ac_cv_prog_cc_g = yes; then
3597  if test "$GCC" = yes; then
3598    CFLAGS="-g -O2"
3599  else
3600    CFLAGS="-g"
3601  fi
3602else
3603  if test "$GCC" = yes; then
3604    CFLAGS="-O2"
3605  else
3606    CFLAGS=
3607  fi
3608fi
3609{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
3610$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
3611if ${ac_cv_prog_cc_c89+:} false; then :
3612  $as_echo_n "(cached) " >&6
3613else
3614  ac_cv_prog_cc_c89=no
3615ac_save_CC=$CC
3616cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3617/* end confdefs.h.  */
3618#include <stdarg.h>
3619#include <stdio.h>
3620struct stat;
3621/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
3622struct buf { int x; };
3623FILE * (*rcsopen) (struct buf *, struct stat *, int);
3624static char *e (p, i)
3625     char **p;
3626     int i;
3627{
3628  return p[i];
3629}
3630static char *f (char * (*g) (char **, int), char **p, ...)
3631{
3632  char *s;
3633  va_list v;
3634  va_start (v,p);
3635  s = g (p, va_arg (v,int));
3636  va_end (v);
3637  return s;
3638}
3639
3640/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
3641   function prototypes and stuff, but not '\xHH' hex character constants.
3642   These don't provoke an error unfortunately, instead are silently treated
3643   as 'x'.  The following induces an error, until -std is added to get
3644   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
3645   array size at least.  It's necessary to write '\x00'==0 to get something
3646   that's true only with -std.  */
3647int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3648
3649/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3650   inside strings and character constants.  */
3651#define FOO(x) 'x'
3652int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3653
3654int test (int i, double x);
3655struct s1 {int (*f) (int a);};
3656struct s2 {int (*f) (double a);};
3657int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3658int argc;
3659char **argv;
3660int
3661main ()
3662{
3663return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
3664  ;
3665  return 0;
3666}
3667_ACEOF
3668for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3669	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
3670do
3671  CC="$ac_save_CC $ac_arg"
3672  if ac_fn_c_try_compile "$LINENO"; then :
3673  ac_cv_prog_cc_c89=$ac_arg
3674fi
3675rm -f core conftest.err conftest.$ac_objext
3676  test "x$ac_cv_prog_cc_c89" != "xno" && break
3677done
3678rm -f conftest.$ac_ext
3679CC=$ac_save_CC
3680
3681fi
3682# AC_CACHE_VAL
3683case "x$ac_cv_prog_cc_c89" in
3684  x)
3685    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
3686$as_echo "none needed" >&6; } ;;
3687  xno)
3688    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
3689$as_echo "unsupported" >&6; } ;;
3690  *)
3691    CC="$CC $ac_cv_prog_cc_c89"
3692    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
3693$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
3694esac
3695if test "x$ac_cv_prog_cc_c89" != xno; then :
3696
3697fi
3698
3699ac_ext=c
3700ac_cpp='$CPP $CPPFLAGS'
3701ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3702ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3703ac_compiler_gnu=$ac_cv_c_compiler_gnu
3704
3705
3706ac_ext=c
3707ac_cpp='$CPP $CPPFLAGS'
3708ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3709ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3710ac_compiler_gnu=$ac_cv_c_compiler_gnu
3711{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
3712$as_echo_n "checking how to run the C preprocessor... " >&6; }
3713# On Suns, sometimes $CPP names a directory.
3714if test -n "$CPP" && test -d "$CPP"; then
3715  CPP=
3716fi
3717if test -z "$CPP"; then
3718  if ${ac_cv_prog_CPP+:} false; then :
3719  $as_echo_n "(cached) " >&6
3720else
3721      # Double quotes because CPP needs to be expanded
3722    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3723    do
3724      ac_preproc_ok=false
3725for ac_c_preproc_warn_flag in '' yes
3726do
3727  # Use a header file that comes with gcc, so configuring glibc
3728  # with a fresh cross-compiler works.
3729  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3730  # <limits.h> exists even on freestanding compilers.
3731  # On the NeXT, cc -E runs the code through the compiler's parser,
3732  # not just through cpp. "Syntax error" is here to catch this case.
3733  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3734/* end confdefs.h.  */
3735#ifdef __STDC__
3736# include <limits.h>
3737#else
3738# include <assert.h>
3739#endif
3740		     Syntax error
3741_ACEOF
3742if ac_fn_c_try_cpp "$LINENO"; then :
3743
3744else
3745  # Broken: fails on valid input.
3746continue
3747fi
3748rm -f conftest.err conftest.i conftest.$ac_ext
3749
3750  # OK, works on sane cases.  Now check whether nonexistent headers
3751  # can be detected and how.
3752  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3753/* end confdefs.h.  */
3754#include <ac_nonexistent.h>
3755_ACEOF
3756if ac_fn_c_try_cpp "$LINENO"; then :
3757  # Broken: success on invalid input.
3758continue
3759else
3760  # Passes both tests.
3761ac_preproc_ok=:
3762break
3763fi
3764rm -f conftest.err conftest.i conftest.$ac_ext
3765
3766done
3767# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3768rm -f conftest.i conftest.err conftest.$ac_ext
3769if $ac_preproc_ok; then :
3770  break
3771fi
3772
3773    done
3774    ac_cv_prog_CPP=$CPP
3775
3776fi
3777  CPP=$ac_cv_prog_CPP
3778else
3779  ac_cv_prog_CPP=$CPP
3780fi
3781{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
3782$as_echo "$CPP" >&6; }
3783ac_preproc_ok=false
3784for ac_c_preproc_warn_flag in '' yes
3785do
3786  # Use a header file that comes with gcc, so configuring glibc
3787  # with a fresh cross-compiler works.
3788  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3789  # <limits.h> exists even on freestanding compilers.
3790  # On the NeXT, cc -E runs the code through the compiler's parser,
3791  # not just through cpp. "Syntax error" is here to catch this case.
3792  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3793/* end confdefs.h.  */
3794#ifdef __STDC__
3795# include <limits.h>
3796#else
3797# include <assert.h>
3798#endif
3799		     Syntax error
3800_ACEOF
3801if ac_fn_c_try_cpp "$LINENO"; then :
3802
3803else
3804  # Broken: fails on valid input.
3805continue
3806fi
3807rm -f conftest.err conftest.i conftest.$ac_ext
3808
3809  # OK, works on sane cases.  Now check whether nonexistent headers
3810  # can be detected and how.
3811  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3812/* end confdefs.h.  */
3813#include <ac_nonexistent.h>
3814_ACEOF
3815if ac_fn_c_try_cpp "$LINENO"; then :
3816  # Broken: success on invalid input.
3817continue
3818else
3819  # Passes both tests.
3820ac_preproc_ok=:
3821break
3822fi
3823rm -f conftest.err conftest.i conftest.$ac_ext
3824
3825done
3826# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3827rm -f conftest.i conftest.err conftest.$ac_ext
3828if $ac_preproc_ok; then :
3829
3830else
3831  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3832$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3833as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
3834See \`config.log' for more details" "$LINENO" 5; }
3835fi
3836
3837ac_ext=c
3838ac_cpp='$CPP $CPPFLAGS'
3839ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3840ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3841ac_compiler_gnu=$ac_cv_c_compiler_gnu
3842
3843
3844{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
3845$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
3846if ${ac_cv_path_GREP+:} false; then :
3847  $as_echo_n "(cached) " >&6
3848else
3849  if test -z "$GREP"; then
3850  ac_path_GREP_found=false
3851  # Loop through the user's path and test for each of PROGNAME-LIST
3852  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3853for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3854do
3855  IFS=$as_save_IFS
3856  test -z "$as_dir" && as_dir=.
3857    for ac_prog in grep ggrep; do
3858    for ac_exec_ext in '' $ac_executable_extensions; do
3859      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
3860      as_fn_executable_p "$ac_path_GREP" || continue
3861# Check for GNU ac_path_GREP and select it if it is found.
3862  # Check for GNU $ac_path_GREP
3863case `"$ac_path_GREP" --version 2>&1` in
3864*GNU*)
3865  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
3866*)
3867  ac_count=0
3868  $as_echo_n 0123456789 >"conftest.in"
3869  while :
3870  do
3871    cat "conftest.in" "conftest.in" >"conftest.tmp"
3872    mv "conftest.tmp" "conftest.in"
3873    cp "conftest.in" "conftest.nl"
3874    $as_echo 'GREP' >> "conftest.nl"
3875    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3876    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3877    as_fn_arith $ac_count + 1 && ac_count=$as_val
3878    if test $ac_count -gt ${ac_path_GREP_max-0}; then
3879      # Best one so far, save it but keep looking for a better one
3880      ac_cv_path_GREP="$ac_path_GREP"
3881      ac_path_GREP_max=$ac_count
3882    fi
3883    # 10*(2^10) chars as input seems more than enough
3884    test $ac_count -gt 10 && break
3885  done
3886  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3887esac
3888
3889      $ac_path_GREP_found && break 3
3890    done
3891  done
3892  done
3893IFS=$as_save_IFS
3894  if test -z "$ac_cv_path_GREP"; then
3895    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
3896  fi
3897else
3898  ac_cv_path_GREP=$GREP
3899fi
3900
3901fi
3902{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
3903$as_echo "$ac_cv_path_GREP" >&6; }
3904 GREP="$ac_cv_path_GREP"
3905
3906
3907{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
3908$as_echo_n "checking for egrep... " >&6; }
3909if ${ac_cv_path_EGREP+:} false; then :
3910  $as_echo_n "(cached) " >&6
3911else
3912  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
3913   then ac_cv_path_EGREP="$GREP -E"
3914   else
3915     if test -z "$EGREP"; then
3916  ac_path_EGREP_found=false
3917  # Loop through the user's path and test for each of PROGNAME-LIST
3918  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3919for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3920do
3921  IFS=$as_save_IFS
3922  test -z "$as_dir" && as_dir=.
3923    for ac_prog in egrep; do
3924    for ac_exec_ext in '' $ac_executable_extensions; do
3925      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
3926      as_fn_executable_p "$ac_path_EGREP" || continue
3927# Check for GNU ac_path_EGREP and select it if it is found.
3928  # Check for GNU $ac_path_EGREP
3929case `"$ac_path_EGREP" --version 2>&1` in
3930*GNU*)
3931  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
3932*)
3933  ac_count=0
3934  $as_echo_n 0123456789 >"conftest.in"
3935  while :
3936  do
3937    cat "conftest.in" "conftest.in" >"conftest.tmp"
3938    mv "conftest.tmp" "conftest.in"
3939    cp "conftest.in" "conftest.nl"
3940    $as_echo 'EGREP' >> "conftest.nl"
3941    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3942    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3943    as_fn_arith $ac_count + 1 && ac_count=$as_val
3944    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
3945      # Best one so far, save it but keep looking for a better one
3946      ac_cv_path_EGREP="$ac_path_EGREP"
3947      ac_path_EGREP_max=$ac_count
3948    fi
3949    # 10*(2^10) chars as input seems more than enough
3950    test $ac_count -gt 10 && break
3951  done
3952  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3953esac
3954
3955      $ac_path_EGREP_found && break 3
3956    done
3957  done
3958  done
3959IFS=$as_save_IFS
3960  if test -z "$ac_cv_path_EGREP"; then
3961    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
3962  fi
3963else
3964  ac_cv_path_EGREP=$EGREP
3965fi
3966
3967   fi
3968fi
3969{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
3970$as_echo "$ac_cv_path_EGREP" >&6; }
3971 EGREP="$ac_cv_path_EGREP"
3972
3973
3974{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
3975$as_echo_n "checking for ANSI C header files... " >&6; }
3976if ${ac_cv_header_stdc+:} false; then :
3977  $as_echo_n "(cached) " >&6
3978else
3979  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3980/* end confdefs.h.  */
3981#include <stdlib.h>
3982#include <stdarg.h>
3983#include <string.h>
3984#include <float.h>
3985
3986int
3987main ()
3988{
3989
3990  ;
3991  return 0;
3992}
3993_ACEOF
3994if ac_fn_c_try_compile "$LINENO"; then :
3995  ac_cv_header_stdc=yes
3996else
3997  ac_cv_header_stdc=no
3998fi
3999rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4000
4001if test $ac_cv_header_stdc = yes; then
4002  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4003  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4004/* end confdefs.h.  */
4005#include <string.h>
4006
4007_ACEOF
4008if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4009  $EGREP "memchr" >/dev/null 2>&1; then :
4010
4011else
4012  ac_cv_header_stdc=no
4013fi
4014rm -f conftest*
4015
4016fi
4017
4018if test $ac_cv_header_stdc = yes; then
4019  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4020  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4021/* end confdefs.h.  */
4022#include <stdlib.h>
4023
4024_ACEOF
4025if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4026  $EGREP "free" >/dev/null 2>&1; then :
4027
4028else
4029  ac_cv_header_stdc=no
4030fi
4031rm -f conftest*
4032
4033fi
4034
4035if test $ac_cv_header_stdc = yes; then
4036  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4037  if test "$cross_compiling" = yes; then :
4038  :
4039else
4040  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4041/* end confdefs.h.  */
4042#include <ctype.h>
4043#include <stdlib.h>
4044#if ((' ' & 0x0FF) == 0x020)
4045# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4046# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4047#else
4048# define ISLOWER(c) \
4049		   (('a' <= (c) && (c) <= 'i') \
4050		     || ('j' <= (c) && (c) <= 'r') \
4051		     || ('s' <= (c) && (c) <= 'z'))
4052# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4053#endif
4054
4055#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4056int
4057main ()
4058{
4059  int i;
4060  for (i = 0; i < 256; i++)
4061    if (XOR (islower (i), ISLOWER (i))
4062	|| toupper (i) != TOUPPER (i))
4063      return 2;
4064  return 0;
4065}
4066_ACEOF
4067if ac_fn_c_try_run "$LINENO"; then :
4068
4069else
4070  ac_cv_header_stdc=no
4071fi
4072rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4073  conftest.$ac_objext conftest.beam conftest.$ac_ext
4074fi
4075
4076fi
4077fi
4078{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
4079$as_echo "$ac_cv_header_stdc" >&6; }
4080if test $ac_cv_header_stdc = yes; then
4081
4082$as_echo "#define STDC_HEADERS 1" >>confdefs.h
4083
4084fi
4085
4086# On IRIX 5.3, sys/types and inttypes.h are conflicting.
4087for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4088		  inttypes.h stdint.h unistd.h
4089do :
4090  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4091ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
4092"
4093if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
4094  cat >>confdefs.h <<_ACEOF
4095#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
4096_ACEOF
4097
4098fi
4099
4100done
4101
4102
4103
4104  ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
4105if test "x$ac_cv_header_minix_config_h" = xyes; then :
4106  MINIX=yes
4107else
4108  MINIX=
4109fi
4110
4111
4112  if test "$MINIX" = yes; then
4113
4114$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
4115
4116
4117$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
4118
4119
4120$as_echo "#define _MINIX 1" >>confdefs.h
4121
4122  fi
4123
4124
4125  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
4126$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
4127if ${ac_cv_safe_to_define___extensions__+:} false; then :
4128  $as_echo_n "(cached) " >&6
4129else
4130  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4131/* end confdefs.h.  */
4132
4133#         define __EXTENSIONS__ 1
4134          $ac_includes_default
4135int
4136main ()
4137{
4138
4139  ;
4140  return 0;
4141}
4142_ACEOF
4143if ac_fn_c_try_compile "$LINENO"; then :
4144  ac_cv_safe_to_define___extensions__=yes
4145else
4146  ac_cv_safe_to_define___extensions__=no
4147fi
4148rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4149fi
4150{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
4151$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
4152  test $ac_cv_safe_to_define___extensions__ = yes &&
4153    $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
4154
4155  $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
4156
4157  $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
4158
4159  $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
4160
4161  $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
4162
4163
4164
4165if test "$ac_cv_header_minix_config_h" = "yes"; then
4166
4167$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
4168
4169fi
4170
4171case "$prefix" in
4172        NONE)
4173		prefix="/usr/local"
4174        ;;
4175esac
4176case "$exec_prefix" in
4177        NONE)
4178		exec_prefix="$prefix"
4179        ;;
4180esac
4181
4182# are we on MinGW?
4183if uname -s 2>&1 | grep MINGW32 >/dev/null; then on_mingw="yes"
4184else
4185	if echo $host $target | grep mingw32 >/dev/null; then on_mingw="yes"
4186	else on_mingw="no"; fi
4187fi
4188
4189#
4190# Determine configuration file
4191# the eval is to evaluate shell expansion twice
4192UNBOUND_SBIN_DIR=`eval echo "${sbindir}"`
4193
4194UNBOUND_SYSCONF_DIR=`eval echo "${sysconfdir}"`
4195
4196UNBOUND_LOCALSTATE_DIR=`eval echo "${localstatedir}"`
4197
4198if test $on_mingw = "no"; then
4199  ub_conf_file=`eval echo "${sysconfdir}/unbound/unbound.conf"`
4200else
4201  ub_conf_file="C:\\Program Files\\Unbound\\service.conf"
4202fi
4203
4204# Check whether --with-conf_file was given.
4205if test "${with_conf_file+set}" = set; then :
4206  withval=$with_conf_file; ub_conf_file="$withval"
4207fi
4208
4209
4210hdr_config="`echo $ub_conf_file | sed -e 's/\\\\/\\\\\\\\/g'`"
4211
4212
4213cat >>confdefs.h <<_ACEOF
4214#define CONFIGFILE "$hdr_config"
4215_ACEOF
4216
4217ub_conf_dir=`$as_dirname -- "$ub_conf_file" ||
4218$as_expr X"$ub_conf_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
4219	 X"$ub_conf_file" : 'X\(//\)[^/]' \| \
4220	 X"$ub_conf_file" : 'X\(//\)$' \| \
4221	 X"$ub_conf_file" : 'X\(/\)' \| . 2>/dev/null ||
4222$as_echo X"$ub_conf_file" |
4223    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
4224	    s//\1/
4225	    q
4226	  }
4227	  /^X\(\/\/\)[^/].*/{
4228	    s//\1/
4229	    q
4230	  }
4231	  /^X\(\/\/\)$/{
4232	    s//\1/
4233	    q
4234	  }
4235	  /^X\(\/\).*/{
4236	    s//\1/
4237	    q
4238	  }
4239	  s/.*/./; q'`
4240
4241
4242# Determine run, chroot directory and pidfile locations
4243
4244# Check whether --with-run-dir was given.
4245if test "${with_run_dir+set}" = set; then :
4246  withval=$with_run_dir; UNBOUND_RUN_DIR="$withval"
4247else
4248  if test $on_mingw = no; then
4249    UNBOUND_RUN_DIR=`dirname "$ub_conf_file"`
4250else
4251    UNBOUND_RUN_DIR=""
4252fi
4253
4254fi
4255
4256
4257hdr_run="`echo $UNBOUND_RUN_DIR | sed -e 's/\\\\/\\\\\\\\/g'`"
4258
4259
4260cat >>confdefs.h <<_ACEOF
4261#define RUN_DIR "$hdr_run"
4262_ACEOF
4263
4264
4265
4266# Check whether --with-chroot-dir was given.
4267if test "${with_chroot_dir+set}" = set; then :
4268  withval=$with_chroot_dir; UNBOUND_CHROOT_DIR="$withval"
4269else
4270  if test $on_mingw = no; then
4271    UNBOUND_CHROOT_DIR="$UNBOUND_RUN_DIR"
4272else
4273    UNBOUND_CHROOT_DIR=""
4274fi
4275
4276fi
4277
4278
4279hdr_chroot="`echo $UNBOUND_CHROOT_DIR | sed -e 's/\\\\/\\\\\\\\/g'`"
4280
4281
4282cat >>confdefs.h <<_ACEOF
4283#define CHROOT_DIR "$hdr_chroot"
4284_ACEOF
4285
4286
4287
4288# Check whether --with-share-dir was given.
4289if test "${with_share_dir+set}" = set; then :
4290  withval=$with_share_dir; UNBOUND_SHARE_DIR="$withval"
4291else
4292  UNBOUND_SHARE_DIR="$UNBOUND_RUN_DIR"
4293fi
4294
4295
4296
4297cat >>confdefs.h <<_ACEOF
4298#define SHARE_DIR "$UNBOUND_SHARE_DIR"
4299_ACEOF
4300
4301
4302
4303# Check whether --with-pidfile was given.
4304if test "${with_pidfile+set}" = set; then :
4305  withval=$with_pidfile; UNBOUND_PIDFILE="$withval"
4306else
4307  if test $on_mingw = no; then
4308    UNBOUND_PIDFILE="$UNBOUND_RUN_DIR/unbound.pid"
4309else
4310    UNBOUND_PIDFILE=""
4311fi
4312
4313fi
4314
4315
4316hdr_pid="`echo $UNBOUND_PIDFILE | sed -e 's/\\\\/\\\\\\\\/g'`"
4317
4318
4319cat >>confdefs.h <<_ACEOF
4320#define PIDFILE "$hdr_pid"
4321_ACEOF
4322
4323
4324
4325# Check whether --with-rootkey-file was given.
4326if test "${with_rootkey_file+set}" = set; then :
4327  withval=$with_rootkey_file; UNBOUND_ROOTKEY_FILE="$withval"
4328else
4329  if test $on_mingw = no; then
4330    UNBOUND_ROOTKEY_FILE="$UNBOUND_RUN_DIR/root.key"
4331else
4332    UNBOUND_ROOTKEY_FILE="C:\\Program Files\\Unbound\\root.key"
4333fi
4334
4335fi
4336
4337
4338hdr_rkey="`echo $UNBOUND_ROOTKEY_FILE | sed -e 's/\\\\/\\\\\\\\/g'`"
4339
4340
4341cat >>confdefs.h <<_ACEOF
4342#define ROOT_ANCHOR_FILE "$hdr_rkey"
4343_ACEOF
4344
4345
4346
4347# Check whether --with-rootcert-file was given.
4348if test "${with_rootcert_file+set}" = set; then :
4349  withval=$with_rootcert_file; UNBOUND_ROOTCERT_FILE="$withval"
4350else
4351  if test $on_mingw = no; then
4352    UNBOUND_ROOTCERT_FILE="$UNBOUND_RUN_DIR/icannbundle.pem"
4353else
4354    UNBOUND_ROOTCERT_FILE="C:\\Program Files\\Unbound\\icannbundle.pem"
4355fi
4356
4357fi
4358
4359
4360hdr_rpem="`echo $UNBOUND_ROOTCERT_FILE | sed -e 's/\\\\/\\\\\\\\/g'`"
4361
4362
4363cat >>confdefs.h <<_ACEOF
4364#define ROOT_CERT_FILE "$hdr_rpem"
4365_ACEOF
4366
4367
4368
4369# Check whether --with-username was given.
4370if test "${with_username+set}" = set; then :
4371  withval=$with_username; UNBOUND_USERNAME="$withval"
4372else
4373  UNBOUND_USERNAME="unbound"
4374fi
4375
4376
4377
4378cat >>confdefs.h <<_ACEOF
4379#define UB_USERNAME "$UNBOUND_USERNAME"
4380_ACEOF
4381
4382
4383
4384$as_echo "#define WINVER 0x0502" >>confdefs.h
4385
4386wnvs=`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/' `
4387
4388
4389cat >>confdefs.h <<_ACEOF
4390#define RSRC_PACKAGE_VERSION $wnvs
4391_ACEOF
4392
4393
4394# Checks for typedefs, structures, and compiler characteristics.
4395{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
4396$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
4397if ${ac_cv_c_const+:} false; then :
4398  $as_echo_n "(cached) " >&6
4399else
4400  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4401/* end confdefs.h.  */
4402
4403int
4404main ()
4405{
4406
4407#ifndef __cplusplus
4408  /* Ultrix mips cc rejects this sort of thing.  */
4409  typedef int charset[2];
4410  const charset cs = { 0, 0 };
4411  /* SunOS 4.1.1 cc rejects this.  */
4412  char const *const *pcpcc;
4413  char **ppc;
4414  /* NEC SVR4.0.2 mips cc rejects this.  */
4415  struct point {int x, y;};
4416  static struct point const zero = {0,0};
4417  /* AIX XL C 1.02.0.0 rejects this.
4418     It does not let you subtract one const X* pointer from another in
4419     an arm of an if-expression whose if-part is not a constant
4420     expression */
4421  const char *g = "string";
4422  pcpcc = &g + (g ? g-g : 0);
4423  /* HPUX 7.0 cc rejects these. */
4424  ++pcpcc;
4425  ppc = (char**) pcpcc;
4426  pcpcc = (char const *const *) ppc;
4427  { /* SCO 3.2v4 cc rejects this sort of thing.  */
4428    char tx;
4429    char *t = &tx;
4430    char const *s = 0 ? (char *) 0 : (char const *) 0;
4431
4432    *t++ = 0;
4433    if (s) return 0;
4434  }
4435  { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
4436    int x[] = {25, 17};
4437    const int *foo = &x[0];
4438    ++foo;
4439  }
4440  { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
4441    typedef const int *iptr;
4442    iptr p = 0;
4443    ++p;
4444  }
4445  { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
4446       "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
4447    struct s { int j; const int *ap[3]; } bx;
4448    struct s *b = &bx; b->j = 5;
4449  }
4450  { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
4451    const int foo = 10;
4452    if (!foo) return 0;
4453  }
4454  return !cs[0] && !zero.x;
4455#endif
4456
4457  ;
4458  return 0;
4459}
4460_ACEOF
4461if ac_fn_c_try_compile "$LINENO"; then :
4462  ac_cv_c_const=yes
4463else
4464  ac_cv_c_const=no
4465fi
4466rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4467fi
4468{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
4469$as_echo "$ac_cv_c_const" >&6; }
4470if test $ac_cv_c_const = no; then
4471
4472$as_echo "#define const /**/" >>confdefs.h
4473
4474fi
4475
4476ac_ext=c
4477ac_cpp='$CPP $CPPFLAGS'
4478ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4479ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4480ac_compiler_gnu=$ac_cv_c_compiler_gnu
4481
4482# allow user to override the -g -O2 flags.
4483default_cflags=no
4484if test "x$CFLAGS" = "x" ; then
4485
4486
4487{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -g" >&5
4488$as_echo_n "checking whether $CC supports -g... " >&6; }
4489cache=`echo g | sed 'y%.=/+-%___p_%'`
4490if eval \${cv_prog_cc_flag_$cache+:} false; then :
4491  $as_echo_n "(cached) " >&6
4492else
4493
4494echo 'void f(void){}' >conftest.c
4495if test -z "`$CC $CPPFLAGS $CFLAGS -g -c conftest.c 2>&1`"; then
4496eval "cv_prog_cc_flag_$cache=yes"
4497else
4498eval "cv_prog_cc_flag_$cache=no"
4499fi
4500rm -f conftest conftest.o conftest.c
4501
4502fi
4503
4504if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
4505{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4506$as_echo "yes" >&6; }
4507:
4508CFLAGS="$CFLAGS -g"
4509else
4510{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4511$as_echo "no" >&6; }
4512:
4513
4514fi
4515
4516
4517
4518{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -O2" >&5
4519$as_echo_n "checking whether $CC supports -O2... " >&6; }
4520cache=`echo O2 | sed 'y%.=/+-%___p_%'`
4521if eval \${cv_prog_cc_flag_$cache+:} false; then :
4522  $as_echo_n "(cached) " >&6
4523else
4524
4525echo 'void f(void){}' >conftest.c
4526if test -z "`$CC $CPPFLAGS $CFLAGS -O2 -c conftest.c 2>&1`"; then
4527eval "cv_prog_cc_flag_$cache=yes"
4528else
4529eval "cv_prog_cc_flag_$cache=no"
4530fi
4531rm -f conftest conftest.o conftest.c
4532
4533fi
4534
4535if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
4536{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4537$as_echo "yes" >&6; }
4538:
4539CFLAGS="$CFLAGS -O2"
4540else
4541{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4542$as_echo "no" >&6; }
4543:
4544
4545fi
4546
4547default_cflags=yes
4548fi
4549ac_ext=c
4550ac_cpp='$CPP $CPPFLAGS'
4551ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4552ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4553ac_compiler_gnu=$ac_cv_c_compiler_gnu
4554if test -n "$ac_tool_prefix"; then
4555  # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
4556set dummy ${ac_tool_prefix}gcc; ac_word=$2
4557{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4558$as_echo_n "checking for $ac_word... " >&6; }
4559if ${ac_cv_prog_CC+:} false; then :
4560  $as_echo_n "(cached) " >&6
4561else
4562  if test -n "$CC"; then
4563  ac_cv_prog_CC="$CC" # Let the user override the test.
4564else
4565as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4566for as_dir in $PATH
4567do
4568  IFS=$as_save_IFS
4569  test -z "$as_dir" && as_dir=.
4570    for ac_exec_ext in '' $ac_executable_extensions; do
4571  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4572    ac_cv_prog_CC="${ac_tool_prefix}gcc"
4573    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4574    break 2
4575  fi
4576done
4577  done
4578IFS=$as_save_IFS
4579
4580fi
4581fi
4582CC=$ac_cv_prog_CC
4583if test -n "$CC"; then
4584  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4585$as_echo "$CC" >&6; }
4586else
4587  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4588$as_echo "no" >&6; }
4589fi
4590
4591
4592fi
4593if test -z "$ac_cv_prog_CC"; then
4594  ac_ct_CC=$CC
4595  # Extract the first word of "gcc", so it can be a program name with args.
4596set dummy gcc; ac_word=$2
4597{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4598$as_echo_n "checking for $ac_word... " >&6; }
4599if ${ac_cv_prog_ac_ct_CC+:} false; then :
4600  $as_echo_n "(cached) " >&6
4601else
4602  if test -n "$ac_ct_CC"; then
4603  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
4604else
4605as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4606for as_dir in $PATH
4607do
4608  IFS=$as_save_IFS
4609  test -z "$as_dir" && as_dir=.
4610    for ac_exec_ext in '' $ac_executable_extensions; do
4611  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4612    ac_cv_prog_ac_ct_CC="gcc"
4613    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4614    break 2
4615  fi
4616done
4617  done
4618IFS=$as_save_IFS
4619
4620fi
4621fi
4622ac_ct_CC=$ac_cv_prog_ac_ct_CC
4623if test -n "$ac_ct_CC"; then
4624  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
4625$as_echo "$ac_ct_CC" >&6; }
4626else
4627  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4628$as_echo "no" >&6; }
4629fi
4630
4631  if test "x$ac_ct_CC" = x; then
4632    CC=""
4633  else
4634    case $cross_compiling:$ac_tool_warned in
4635yes:)
4636{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4637$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4638ac_tool_warned=yes ;;
4639esac
4640    CC=$ac_ct_CC
4641  fi
4642else
4643  CC="$ac_cv_prog_CC"
4644fi
4645
4646if test -z "$CC"; then
4647          if test -n "$ac_tool_prefix"; then
4648    # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
4649set dummy ${ac_tool_prefix}cc; ac_word=$2
4650{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4651$as_echo_n "checking for $ac_word... " >&6; }
4652if ${ac_cv_prog_CC+:} false; then :
4653  $as_echo_n "(cached) " >&6
4654else
4655  if test -n "$CC"; then
4656  ac_cv_prog_CC="$CC" # Let the user override the test.
4657else
4658as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4659for as_dir in $PATH
4660do
4661  IFS=$as_save_IFS
4662  test -z "$as_dir" && as_dir=.
4663    for ac_exec_ext in '' $ac_executable_extensions; do
4664  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4665    ac_cv_prog_CC="${ac_tool_prefix}cc"
4666    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4667    break 2
4668  fi
4669done
4670  done
4671IFS=$as_save_IFS
4672
4673fi
4674fi
4675CC=$ac_cv_prog_CC
4676if test -n "$CC"; then
4677  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4678$as_echo "$CC" >&6; }
4679else
4680  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4681$as_echo "no" >&6; }
4682fi
4683
4684
4685  fi
4686fi
4687if test -z "$CC"; then
4688  # Extract the first word of "cc", so it can be a program name with args.
4689set dummy cc; ac_word=$2
4690{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4691$as_echo_n "checking for $ac_word... " >&6; }
4692if ${ac_cv_prog_CC+:} false; then :
4693  $as_echo_n "(cached) " >&6
4694else
4695  if test -n "$CC"; then
4696  ac_cv_prog_CC="$CC" # Let the user override the test.
4697else
4698  ac_prog_rejected=no
4699as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4700for as_dir in $PATH
4701do
4702  IFS=$as_save_IFS
4703  test -z "$as_dir" && as_dir=.
4704    for ac_exec_ext in '' $ac_executable_extensions; do
4705  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4706    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
4707       ac_prog_rejected=yes
4708       continue
4709     fi
4710    ac_cv_prog_CC="cc"
4711    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4712    break 2
4713  fi
4714done
4715  done
4716IFS=$as_save_IFS
4717
4718if test $ac_prog_rejected = yes; then
4719  # We found a bogon in the path, so make sure we never use it.
4720  set dummy $ac_cv_prog_CC
4721  shift
4722  if test $# != 0; then
4723    # We chose a different compiler from the bogus one.
4724    # However, it has the same basename, so the bogon will be chosen
4725    # first if we set CC to just the basename; use the full file name.
4726    shift
4727    ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
4728  fi
4729fi
4730fi
4731fi
4732CC=$ac_cv_prog_CC
4733if test -n "$CC"; then
4734  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4735$as_echo "$CC" >&6; }
4736else
4737  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4738$as_echo "no" >&6; }
4739fi
4740
4741
4742fi
4743if test -z "$CC"; then
4744  if test -n "$ac_tool_prefix"; then
4745  for ac_prog in cl.exe
4746  do
4747    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4748set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4749{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4750$as_echo_n "checking for $ac_word... " >&6; }
4751if ${ac_cv_prog_CC+:} false; then :
4752  $as_echo_n "(cached) " >&6
4753else
4754  if test -n "$CC"; then
4755  ac_cv_prog_CC="$CC" # Let the user override the test.
4756else
4757as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4758for as_dir in $PATH
4759do
4760  IFS=$as_save_IFS
4761  test -z "$as_dir" && as_dir=.
4762    for ac_exec_ext in '' $ac_executable_extensions; do
4763  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4764    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
4765    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4766    break 2
4767  fi
4768done
4769  done
4770IFS=$as_save_IFS
4771
4772fi
4773fi
4774CC=$ac_cv_prog_CC
4775if test -n "$CC"; then
4776  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4777$as_echo "$CC" >&6; }
4778else
4779  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4780$as_echo "no" >&6; }
4781fi
4782
4783
4784    test -n "$CC" && break
4785  done
4786fi
4787if test -z "$CC"; then
4788  ac_ct_CC=$CC
4789  for ac_prog in cl.exe
4790do
4791  # Extract the first word of "$ac_prog", so it can be a program name with args.
4792set dummy $ac_prog; ac_word=$2
4793{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4794$as_echo_n "checking for $ac_word... " >&6; }
4795if ${ac_cv_prog_ac_ct_CC+:} false; then :
4796  $as_echo_n "(cached) " >&6
4797else
4798  if test -n "$ac_ct_CC"; then
4799  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
4800else
4801as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4802for as_dir in $PATH
4803do
4804  IFS=$as_save_IFS
4805  test -z "$as_dir" && as_dir=.
4806    for ac_exec_ext in '' $ac_executable_extensions; do
4807  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4808    ac_cv_prog_ac_ct_CC="$ac_prog"
4809    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4810    break 2
4811  fi
4812done
4813  done
4814IFS=$as_save_IFS
4815
4816fi
4817fi
4818ac_ct_CC=$ac_cv_prog_ac_ct_CC
4819if test -n "$ac_ct_CC"; then
4820  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
4821$as_echo "$ac_ct_CC" >&6; }
4822else
4823  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4824$as_echo "no" >&6; }
4825fi
4826
4827
4828  test -n "$ac_ct_CC" && break
4829done
4830
4831  if test "x$ac_ct_CC" = x; then
4832    CC=""
4833  else
4834    case $cross_compiling:$ac_tool_warned in
4835yes:)
4836{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4837$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4838ac_tool_warned=yes ;;
4839esac
4840    CC=$ac_ct_CC
4841  fi
4842fi
4843
4844fi
4845
4846
4847test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4848$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4849as_fn_error $? "no acceptable C compiler found in \$PATH
4850See \`config.log' for more details" "$LINENO" 5; }
4851
4852# Provide some information about the compiler.
4853$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
4854set X $ac_compile
4855ac_compiler=$2
4856for ac_option in --version -v -V -qversion; do
4857  { { ac_try="$ac_compiler $ac_option >&5"
4858case "(($ac_try" in
4859  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4860  *) ac_try_echo=$ac_try;;
4861esac
4862eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4863$as_echo "$ac_try_echo"; } >&5
4864  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
4865  ac_status=$?
4866  if test -s conftest.err; then
4867    sed '10a\
4868... rest of stderr output deleted ...
4869         10q' conftest.err >conftest.er1
4870    cat conftest.er1 >&5
4871  fi
4872  rm -f conftest.er1 conftest.err
4873  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4874  test $ac_status = 0; }
4875done
4876
4877{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4878$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
4879if ${ac_cv_c_compiler_gnu+:} false; then :
4880  $as_echo_n "(cached) " >&6
4881else
4882  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4883/* end confdefs.h.  */
4884
4885int
4886main ()
4887{
4888#ifndef __GNUC__
4889       choke me
4890#endif
4891
4892  ;
4893  return 0;
4894}
4895_ACEOF
4896if ac_fn_c_try_compile "$LINENO"; then :
4897  ac_compiler_gnu=yes
4898else
4899  ac_compiler_gnu=no
4900fi
4901rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4902ac_cv_c_compiler_gnu=$ac_compiler_gnu
4903
4904fi
4905{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4906$as_echo "$ac_cv_c_compiler_gnu" >&6; }
4907if test $ac_compiler_gnu = yes; then
4908  GCC=yes
4909else
4910  GCC=
4911fi
4912ac_test_CFLAGS=${CFLAGS+set}
4913ac_save_CFLAGS=$CFLAGS
4914{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4915$as_echo_n "checking whether $CC accepts -g... " >&6; }
4916if ${ac_cv_prog_cc_g+:} false; then :
4917  $as_echo_n "(cached) " >&6
4918else
4919  ac_save_c_werror_flag=$ac_c_werror_flag
4920   ac_c_werror_flag=yes
4921   ac_cv_prog_cc_g=no
4922   CFLAGS="-g"
4923   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4924/* end confdefs.h.  */
4925
4926int
4927main ()
4928{
4929
4930  ;
4931  return 0;
4932}
4933_ACEOF
4934if ac_fn_c_try_compile "$LINENO"; then :
4935  ac_cv_prog_cc_g=yes
4936else
4937  CFLAGS=""
4938      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4939/* end confdefs.h.  */
4940
4941int
4942main ()
4943{
4944
4945  ;
4946  return 0;
4947}
4948_ACEOF
4949if ac_fn_c_try_compile "$LINENO"; then :
4950
4951else
4952  ac_c_werror_flag=$ac_save_c_werror_flag
4953	 CFLAGS="-g"
4954	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4955/* end confdefs.h.  */
4956
4957int
4958main ()
4959{
4960
4961  ;
4962  return 0;
4963}
4964_ACEOF
4965if ac_fn_c_try_compile "$LINENO"; then :
4966  ac_cv_prog_cc_g=yes
4967fi
4968rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4969fi
4970rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4971fi
4972rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4973   ac_c_werror_flag=$ac_save_c_werror_flag
4974fi
4975{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4976$as_echo "$ac_cv_prog_cc_g" >&6; }
4977if test "$ac_test_CFLAGS" = set; then
4978  CFLAGS=$ac_save_CFLAGS
4979elif test $ac_cv_prog_cc_g = yes; then
4980  if test "$GCC" = yes; then
4981    CFLAGS="-g -O2"
4982  else
4983    CFLAGS="-g"
4984  fi
4985else
4986  if test "$GCC" = yes; then
4987    CFLAGS="-O2"
4988  else
4989    CFLAGS=
4990  fi
4991fi
4992{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4993$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
4994if ${ac_cv_prog_cc_c89+:} false; then :
4995  $as_echo_n "(cached) " >&6
4996else
4997  ac_cv_prog_cc_c89=no
4998ac_save_CC=$CC
4999cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5000/* end confdefs.h.  */
5001#include <stdarg.h>
5002#include <stdio.h>
5003struct stat;
5004/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
5005struct buf { int x; };
5006FILE * (*rcsopen) (struct buf *, struct stat *, int);
5007static char *e (p, i)
5008     char **p;
5009     int i;
5010{
5011  return p[i];
5012}
5013static char *f (char * (*g) (char **, int), char **p, ...)
5014{
5015  char *s;
5016  va_list v;
5017  va_start (v,p);
5018  s = g (p, va_arg (v,int));
5019  va_end (v);
5020  return s;
5021}
5022
5023/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
5024   function prototypes and stuff, but not '\xHH' hex character constants.
5025   These don't provoke an error unfortunately, instead are silently treated
5026   as 'x'.  The following induces an error, until -std is added to get
5027   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
5028   array size at least.  It's necessary to write '\x00'==0 to get something
5029   that's true only with -std.  */
5030int osf4_cc_array ['\x00' == 0 ? 1 : -1];
5031
5032/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
5033   inside strings and character constants.  */
5034#define FOO(x) 'x'
5035int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
5036
5037int test (int i, double x);
5038struct s1 {int (*f) (int a);};
5039struct s2 {int (*f) (double a);};
5040int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
5041int argc;
5042char **argv;
5043int
5044main ()
5045{
5046return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
5047  ;
5048  return 0;
5049}
5050_ACEOF
5051for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
5052	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
5053do
5054  CC="$ac_save_CC $ac_arg"
5055  if ac_fn_c_try_compile "$LINENO"; then :
5056  ac_cv_prog_cc_c89=$ac_arg
5057fi
5058rm -f core conftest.err conftest.$ac_objext
5059  test "x$ac_cv_prog_cc_c89" != "xno" && break
5060done
5061rm -f conftest.$ac_ext
5062CC=$ac_save_CC
5063
5064fi
5065# AC_CACHE_VAL
5066case "x$ac_cv_prog_cc_c89" in
5067  x)
5068    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
5069$as_echo "none needed" >&6; } ;;
5070  xno)
5071    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
5072$as_echo "unsupported" >&6; } ;;
5073  *)
5074    CC="$CC $ac_cv_prog_cc_c89"
5075    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
5076$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
5077esac
5078if test "x$ac_cv_prog_cc_c89" != xno; then :
5079
5080fi
5081
5082ac_ext=c
5083ac_cpp='$CPP $CPPFLAGS'
5084ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5085ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5086ac_compiler_gnu=$ac_cv_c_compiler_gnu
5087
5088
5089{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $CC dependency flag" >&5
5090$as_echo_n "checking $CC dependency flag... " >&6; }
5091echo 'void f(){}' >conftest.c
5092if test "`$CC -MM conftest.c 2>&1`" = "conftest.o: conftest.c"; then
5093	DEPFLAG="-MM"
5094else
5095  if test "`$CC -xM1 conftest.c 2>&1`" = "conftest.o: conftest.c"; then
5096	DEPFLAG="-xM1"
5097  else
5098	DEPFLAG="-MM"  # dunno do something
5099  fi
5100fi
5101{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEPFLAG" >&5
5102$as_echo "$DEPFLAG" >&6; }
5103rm -f conftest.c
5104
5105
5106
5107
5108
5109{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Werror" >&5
5110$as_echo_n "checking whether $CC supports -Werror... " >&6; }
5111cache=`echo Werror | sed 'y%.=/+-%___p_%'`
5112if eval \${cv_prog_cc_flag_$cache+:} false; then :
5113  $as_echo_n "(cached) " >&6
5114else
5115
5116echo 'void f(void){}' >conftest.c
5117if test -z "`$CC $CPPFLAGS $CFLAGS -Werror -c conftest.c 2>&1`"; then
5118eval "cv_prog_cc_flag_$cache=yes"
5119else
5120eval "cv_prog_cc_flag_$cache=no"
5121fi
5122rm -f conftest conftest.o conftest.c
5123
5124fi
5125
5126if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
5127{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5128$as_echo "yes" >&6; }
5129:
5130ERRFLAG="-Werror"
5131else
5132{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5133$as_echo "no" >&6; }
5134:
5135ERRFLAG="-errwarn"
5136fi
5137
5138
5139
5140{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wall" >&5
5141$as_echo_n "checking whether $CC supports -Wall... " >&6; }
5142cache=`echo Wall | sed 'y%.=/+-%___p_%'`
5143if eval \${cv_prog_cc_flag_$cache+:} false; then :
5144  $as_echo_n "(cached) " >&6
5145else
5146
5147echo 'void f(void){}' >conftest.c
5148if test -z "`$CC $CPPFLAGS $CFLAGS -Wall -c conftest.c 2>&1`"; then
5149eval "cv_prog_cc_flag_$cache=yes"
5150else
5151eval "cv_prog_cc_flag_$cache=no"
5152fi
5153rm -f conftest conftest.o conftest.c
5154
5155fi
5156
5157if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
5158{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5159$as_echo "yes" >&6; }
5160:
5161ERRFLAG="$ERRFLAG -Wall"
5162else
5163{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5164$as_echo "no" >&6; }
5165:
5166ERRFLAG="$ERRFLAG -errfmt"
5167fi
5168
5169
5170
5171
5172
5173{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -std=c99" >&5
5174$as_echo_n "checking whether $CC supports -std=c99... " >&6; }
5175cache=`echo std=c99 | sed 'y%.=/+-%___p_%'`
5176if eval \${cv_prog_cc_flag_$cache+:} false; then :
5177  $as_echo_n "(cached) " >&6
5178else
5179
5180echo 'void f(void){}' >conftest.c
5181if test -z "`$CC $CPPFLAGS $CFLAGS -std=c99 -c conftest.c 2>&1`"; then
5182eval "cv_prog_cc_flag_$cache=yes"
5183else
5184eval "cv_prog_cc_flag_$cache=no"
5185fi
5186rm -f conftest conftest.o conftest.c
5187
5188fi
5189
5190if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
5191{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5192$as_echo "yes" >&6; }
5193:
5194C99FLAG="-std=c99"
5195else
5196{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5197$as_echo "no" >&6; }
5198:
5199
5200fi
5201
5202
5203
5204{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -xc99" >&5
5205$as_echo_n "checking whether $CC supports -xc99... " >&6; }
5206cache=`echo xc99 | sed 'y%.=/+-%___p_%'`
5207if eval \${cv_prog_cc_flag_$cache+:} false; then :
5208  $as_echo_n "(cached) " >&6
5209else
5210
5211echo 'void f(void){}' >conftest.c
5212if test -z "`$CC $CPPFLAGS $CFLAGS -xc99 -c conftest.c 2>&1`"; then
5213eval "cv_prog_cc_flag_$cache=yes"
5214else
5215eval "cv_prog_cc_flag_$cache=no"
5216fi
5217rm -f conftest conftest.o conftest.c
5218
5219fi
5220
5221if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
5222{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5223$as_echo "yes" >&6; }
5224:
5225C99FLAG="-xc99"
5226else
5227{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5228$as_echo "no" >&6; }
5229:
5230
5231fi
5232
5233
5234for ac_header in getopt.h time.h
5235do :
5236  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5237ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
5238"
5239if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
5240  cat >>confdefs.h <<_ACEOF
5241#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5242_ACEOF
5243
5244fi
5245
5246done
5247
5248
5249
5250
5251
5252{ $as_echo "$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
5253$as_echo_n "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; }
5254cache=`$as_echo "$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`
5255if eval \${cv_prog_cc_flag_needed_$cache+:} false; then :
5256  $as_echo_n "(cached) " >&6
5257else
5258
5259echo '
5260#include "confdefs.h"
5261#include <stdlib.h>
5262#include <ctype.h>
5263#include <sys/time.h>
5264#ifdef HAVE_TIME_H
5265#include <time.h>
5266#endif
5267#include <unistd.h>
5268#include <netdb.h>
5269#ifdef HAVE_GETOPT_H
5270#include <getopt.h>
5271#endif
5272
5273int test() {
5274	int a;
5275	char **opts = NULL;
5276	struct timeval tv;
5277	char *t;
5278	time_t time = 0;
5279	char *buf = NULL;
5280	const char* str = NULL;
5281	struct msghdr msg;
5282	msg.msg_control = 0;
5283	t = ctime_r(&time, buf);
5284	tv.tv_usec = 10;
5285	srandom(32);
5286	a = getopt(2, opts, "a");
5287	a = isascii(32);
5288	str = gai_strerror(0);
5289	if(str && t && tv.tv_usec && msg.msg_control)
5290		a = 0;
5291	return a;
5292}
5293' > conftest.c
5294echo 'void f(){}' >>conftest.c
5295if test -z "`$CC $CPPFLAGS $CFLAGS $ERRFLAG -c conftest.c 2>&1`"; then
5296eval "cv_prog_cc_flag_needed_$cache=no"
5297else
5298
5299if 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
5300eval "cv_prog_cc_flag_needed_$cache=yes"
5301else
5302eval "cv_prog_cc_flag_needed_$cache=fail"
5303#echo 'Test with flag fails too!'
5304#cat conftest.c
5305#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"
5306#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`
5307#exit 1
5308fi
5309
5310fi
5311rm -f conftest conftest.c conftest.o
5312
5313fi
5314
5315if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = yes"; then
5316{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5317$as_echo "yes" >&6; }
5318:
5319CFLAGS="$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"
5320else
5321if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = no"; then
5322{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5323$as_echo "no" >&6; }
5324#echo 'Test with flag is no!'
5325#cat conftest.c
5326#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"
5327#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`
5328#exit 1
5329:
5330
5331else
5332{ $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
5333$as_echo "failed" >&6; }
5334:
5335
5336fi
5337fi
5338
5339
5340
5341
5342
5343{ $as_echo "$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
5344$as_echo_n "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; }
5345cache=`$as_echo "$C99FLAG -D__EXTENSIONS__ -D_BSD_SOURCE -D_DEFAULT_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -D_ALL_SOURCE" | $as_tr_sh`
5346if eval \${cv_prog_cc_flag_needed_$cache+:} false; then :
5347  $as_echo_n "(cached) " >&6
5348else
5349
5350echo '
5351#include "confdefs.h"
5352#include <stdlib.h>
5353#include <ctype.h>
5354#include <sys/time.h>
5355#ifdef HAVE_TIME_H
5356#include <time.h>
5357#endif
5358#include <unistd.h>
5359#include <netdb.h>
5360#ifdef HAVE_GETOPT_H
5361#include <getopt.h>
5362#endif
5363
5364int test() {
5365	int a;
5366	char **opts = NULL;
5367	struct timeval tv;
5368	char *t;
5369	time_t time = 0;
5370	char *buf = NULL;
5371	const char* str = NULL;
5372	struct msghdr msg;
5373	msg.msg_control = 0;
5374	t = ctime_r(&time, buf);
5375	tv.tv_usec = 10;
5376	srandom(32);
5377	a = getopt(2, opts, "a");
5378	a = isascii(32);
5379	str = gai_strerror(0);
5380	if(str && t && tv.tv_usec && msg.msg_control)
5381		a = 0;
5382	return a;
5383}
5384' > conftest.c
5385echo 'void f(){}' >>conftest.c
5386if test -z "`$CC $CPPFLAGS $CFLAGS $ERRFLAG -c conftest.c 2>&1`"; then
5387eval "cv_prog_cc_flag_needed_$cache=no"
5388else
5389
5390if 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
5391eval "cv_prog_cc_flag_needed_$cache=yes"
5392else
5393eval "cv_prog_cc_flag_needed_$cache=fail"
5394#echo 'Test with flag fails too!'
5395#cat conftest.c
5396#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"
5397#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`
5398#exit 1
5399fi
5400
5401fi
5402rm -f conftest conftest.c conftest.o
5403
5404fi
5405
5406if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = yes"; then
5407{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5408$as_echo "yes" >&6; }
5409:
5410CFLAGS="$CFLAGS $C99FLAG -D__EXTENSIONS__ -D_BSD_SOURCE -D_DEFAULT_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -D_ALL_SOURCE"
5411else
5412if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = no"; then
5413{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5414$as_echo "no" >&6; }
5415#echo 'Test with flag is no!'
5416#cat conftest.c
5417#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"
5418#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`
5419#exit 1
5420:
5421
5422else
5423{ $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
5424$as_echo "failed" >&6; }
5425:
5426
5427fi
5428fi
5429
5430
5431
5432
5433
5434{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we need $C99FLAG as a flag for $CC" >&5
5435$as_echo_n "checking whether we need $C99FLAG as a flag for $CC... " >&6; }
5436cache=`$as_echo "$C99FLAG" | $as_tr_sh`
5437if eval \${cv_prog_cc_flag_needed_$cache+:} false; then :
5438  $as_echo_n "(cached) " >&6
5439else
5440
5441echo '
5442#include <stdbool.h>
5443#include <ctype.h>
5444int test() {
5445        int a = 0;
5446        return a;
5447}
5448' > conftest.c
5449echo 'void f(){}' >>conftest.c
5450if test -z "`$CC $CPPFLAGS $CFLAGS $ERRFLAG -c conftest.c 2>&1`"; then
5451eval "cv_prog_cc_flag_needed_$cache=no"
5452else
5453
5454if test -z "`$CC $CPPFLAGS $CFLAGS $C99FLAG $ERRFLAG -c conftest.c 2>&1`"; then
5455eval "cv_prog_cc_flag_needed_$cache=yes"
5456else
5457eval "cv_prog_cc_flag_needed_$cache=fail"
5458#echo 'Test with flag fails too!'
5459#cat conftest.c
5460#echo "$CC $CPPFLAGS $CFLAGS $C99FLAG $ERRFLAG -c conftest.c 2>&1"
5461#echo `$CC $CPPFLAGS $CFLAGS $C99FLAG $ERRFLAG -c conftest.c 2>&1`
5462#exit 1
5463fi
5464
5465fi
5466rm -f conftest conftest.c conftest.o
5467
5468fi
5469
5470if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = yes"; then
5471{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5472$as_echo "yes" >&6; }
5473:
5474CFLAGS="$CFLAGS $C99FLAG"
5475else
5476if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = no"; then
5477{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5478$as_echo "no" >&6; }
5479#echo 'Test with flag is no!'
5480#cat conftest.c
5481#echo "$CC $CPPFLAGS $CFLAGS $C99FLAG $ERRFLAG -c conftest.c 2>&1"
5482#echo `$CC $CPPFLAGS $CFLAGS $C99FLAG $ERRFLAG -c conftest.c 2>&1`
5483#exit 1
5484:
5485
5486else
5487{ $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
5488$as_echo "failed" >&6; }
5489:
5490
5491fi
5492fi
5493
5494
5495
5496
5497
5498{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we need -D_BSD_SOURCE -D_DEFAULT_SOURCE as a flag for $CC" >&5
5499$as_echo_n "checking whether we need -D_BSD_SOURCE -D_DEFAULT_SOURCE as a flag for $CC... " >&6; }
5500cache=_D_BSD_SOURCE__D_DEFAULT_SOURCE
5501if eval \${cv_prog_cc_flag_needed_$cache+:} false; then :
5502  $as_echo_n "(cached) " >&6
5503else
5504
5505echo '
5506#include <ctype.h>
5507
5508int test() {
5509        int a;
5510        a = isascii(32);
5511        return a;
5512}
5513' > conftest.c
5514echo 'void f(){}' >>conftest.c
5515if test -z "`$CC $CPPFLAGS $CFLAGS $ERRFLAG -c conftest.c 2>&1`"; then
5516eval "cv_prog_cc_flag_needed_$cache=no"
5517else
5518
5519if test -z "`$CC $CPPFLAGS $CFLAGS -D_BSD_SOURCE -D_DEFAULT_SOURCE $ERRFLAG -c conftest.c 2>&1`"; then
5520eval "cv_prog_cc_flag_needed_$cache=yes"
5521else
5522eval "cv_prog_cc_flag_needed_$cache=fail"
5523#echo 'Test with flag fails too!'
5524#cat conftest.c
5525#echo "$CC $CPPFLAGS $CFLAGS -D_BSD_SOURCE -D_DEFAULT_SOURCE $ERRFLAG -c conftest.c 2>&1"
5526#echo `$CC $CPPFLAGS $CFLAGS -D_BSD_SOURCE -D_DEFAULT_SOURCE $ERRFLAG -c conftest.c 2>&1`
5527#exit 1
5528fi
5529
5530fi
5531rm -f conftest conftest.c conftest.o
5532
5533fi
5534
5535if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = yes"; then
5536{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5537$as_echo "yes" >&6; }
5538:
5539CFLAGS="$CFLAGS -D_BSD_SOURCE -D_DEFAULT_SOURCE"
5540else
5541if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = no"; then
5542{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5543$as_echo "no" >&6; }
5544#echo 'Test with flag is no!'
5545#cat conftest.c
5546#echo "$CC $CPPFLAGS $CFLAGS -D_BSD_SOURCE -D_DEFAULT_SOURCE $ERRFLAG -c conftest.c 2>&1"
5547#echo `$CC $CPPFLAGS $CFLAGS -D_BSD_SOURCE -D_DEFAULT_SOURCE $ERRFLAG -c conftest.c 2>&1`
5548#exit 1
5549:
5550
5551else
5552{ $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
5553$as_echo "failed" >&6; }
5554:
5555
5556fi
5557fi
5558
5559
5560
5561
5562
5563{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we need -D_GNU_SOURCE as a flag for $CC" >&5
5564$as_echo_n "checking whether we need -D_GNU_SOURCE as a flag for $CC... " >&6; }
5565cache=_D_GNU_SOURCE
5566if eval \${cv_prog_cc_flag_needed_$cache+:} false; then :
5567  $as_echo_n "(cached) " >&6
5568else
5569
5570echo '
5571#include <netinet/in.h>
5572
5573int test() {
5574        struct in6_pktinfo inf;
5575	int a = (int)sizeof(inf);
5576        return a;
5577}
5578' > conftest.c
5579echo 'void f(){}' >>conftest.c
5580if test -z "`$CC $CPPFLAGS $CFLAGS $ERRFLAG -c conftest.c 2>&1`"; then
5581eval "cv_prog_cc_flag_needed_$cache=no"
5582else
5583
5584if test -z "`$CC $CPPFLAGS $CFLAGS -D_GNU_SOURCE $ERRFLAG -c conftest.c 2>&1`"; then
5585eval "cv_prog_cc_flag_needed_$cache=yes"
5586else
5587eval "cv_prog_cc_flag_needed_$cache=fail"
5588#echo 'Test with flag fails too!'
5589#cat conftest.c
5590#echo "$CC $CPPFLAGS $CFLAGS -D_GNU_SOURCE $ERRFLAG -c conftest.c 2>&1"
5591#echo `$CC $CPPFLAGS $CFLAGS -D_GNU_SOURCE $ERRFLAG -c conftest.c 2>&1`
5592#exit 1
5593fi
5594
5595fi
5596rm -f conftest conftest.c conftest.o
5597
5598fi
5599
5600if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = yes"; then
5601{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5602$as_echo "yes" >&6; }
5603:
5604CFLAGS="$CFLAGS -D_GNU_SOURCE"
5605else
5606if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = no"; then
5607{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5608$as_echo "no" >&6; }
5609#echo 'Test with flag is no!'
5610#cat conftest.c
5611#echo "$CC $CPPFLAGS $CFLAGS -D_GNU_SOURCE $ERRFLAG -c conftest.c 2>&1"
5612#echo `$CC $CPPFLAGS $CFLAGS -D_GNU_SOURCE $ERRFLAG -c conftest.c 2>&1`
5613#exit 1
5614:
5615
5616else
5617{ $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
5618$as_echo "failed" >&6; }
5619:
5620
5621fi
5622fi
5623
5624
5625# check again for GNU_SOURCE for setresgid. May fail if setresgid
5626# is not available at all. -D_FRSRESGID is to make this check unique.
5627# otherwise we would get the previous cached result.
5628
5629
5630
5631{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we need -D_GNU_SOURCE -D_FRSRESGID as a flag for $CC" >&5
5632$as_echo_n "checking whether we need -D_GNU_SOURCE -D_FRSRESGID as a flag for $CC... " >&6; }
5633cache=_D_GNU_SOURCE__D_FRSRESGID
5634if eval \${cv_prog_cc_flag_needed_$cache+:} false; then :
5635  $as_echo_n "(cached) " >&6
5636else
5637
5638echo '
5639#include <unistd.h>
5640
5641int test() {
5642	int a = setresgid(0,0,0);
5643	a = setresuid(0,0,0);
5644        return a;
5645}
5646' > conftest.c
5647echo 'void f(){}' >>conftest.c
5648if test -z "`$CC $CPPFLAGS $CFLAGS $ERRFLAG -c conftest.c 2>&1`"; then
5649eval "cv_prog_cc_flag_needed_$cache=no"
5650else
5651
5652if test -z "`$CC $CPPFLAGS $CFLAGS -D_GNU_SOURCE -D_FRSRESGID $ERRFLAG -c conftest.c 2>&1`"; then
5653eval "cv_prog_cc_flag_needed_$cache=yes"
5654else
5655eval "cv_prog_cc_flag_needed_$cache=fail"
5656#echo 'Test with flag fails too!'
5657#cat conftest.c
5658#echo "$CC $CPPFLAGS $CFLAGS -D_GNU_SOURCE -D_FRSRESGID $ERRFLAG -c conftest.c 2>&1"
5659#echo `$CC $CPPFLAGS $CFLAGS -D_GNU_SOURCE -D_FRSRESGID $ERRFLAG -c conftest.c 2>&1`
5660#exit 1
5661fi
5662
5663fi
5664rm -f conftest conftest.c conftest.o
5665
5666fi
5667
5668if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = yes"; then
5669{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5670$as_echo "yes" >&6; }
5671:
5672CFLAGS="$CFLAGS -D_GNU_SOURCE"
5673else
5674if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = no"; then
5675{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5676$as_echo "no" >&6; }
5677#echo 'Test with flag is no!'
5678#cat conftest.c
5679#echo "$CC $CPPFLAGS $CFLAGS -D_GNU_SOURCE -D_FRSRESGID $ERRFLAG -c conftest.c 2>&1"
5680#echo `$CC $CPPFLAGS $CFLAGS -D_GNU_SOURCE -D_FRSRESGID $ERRFLAG -c conftest.c 2>&1`
5681#exit 1
5682:
5683
5684else
5685{ $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
5686$as_echo "failed" >&6; }
5687:
5688
5689fi
5690fi
5691
5692
5693
5694
5695
5696{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we need -D_POSIX_C_SOURCE=200112 as a flag for $CC" >&5
5697$as_echo_n "checking whether we need -D_POSIX_C_SOURCE=200112 as a flag for $CC... " >&6; }
5698cache=_D_POSIX_C_SOURCE_200112
5699if eval \${cv_prog_cc_flag_needed_$cache+:} false; then :
5700  $as_echo_n "(cached) " >&6
5701else
5702
5703echo '
5704#include "confdefs.h"
5705#ifdef HAVE_TIME_H
5706#include <time.h>
5707#endif
5708#include <netdb.h>
5709
5710int test() {
5711        int a = 0;
5712        char *t;
5713        time_t time = 0;
5714        char *buf = NULL;
5715	const char* str = NULL;
5716        t = ctime_r(&time, buf);
5717	str = gai_strerror(0);
5718	if(t && str)
5719		a = 0;
5720        return a;
5721}
5722' > conftest.c
5723echo 'void f(){}' >>conftest.c
5724if test -z "`$CC $CPPFLAGS $CFLAGS $ERRFLAG -c conftest.c 2>&1`"; then
5725eval "cv_prog_cc_flag_needed_$cache=no"
5726else
5727
5728if test -z "`$CC $CPPFLAGS $CFLAGS -D_POSIX_C_SOURCE=200112 $ERRFLAG -c conftest.c 2>&1`"; then
5729eval "cv_prog_cc_flag_needed_$cache=yes"
5730else
5731eval "cv_prog_cc_flag_needed_$cache=fail"
5732#echo 'Test with flag fails too!'
5733#cat conftest.c
5734#echo "$CC $CPPFLAGS $CFLAGS -D_POSIX_C_SOURCE=200112 $ERRFLAG -c conftest.c 2>&1"
5735#echo `$CC $CPPFLAGS $CFLAGS -D_POSIX_C_SOURCE=200112 $ERRFLAG -c conftest.c 2>&1`
5736#exit 1
5737fi
5738
5739fi
5740rm -f conftest conftest.c conftest.o
5741
5742fi
5743
5744if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = yes"; then
5745{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5746$as_echo "yes" >&6; }
5747:
5748CFLAGS="$CFLAGS -D_POSIX_C_SOURCE=200112"
5749else
5750if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = no"; then
5751{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5752$as_echo "no" >&6; }
5753#echo 'Test with flag is no!'
5754#cat conftest.c
5755#echo "$CC $CPPFLAGS $CFLAGS -D_POSIX_C_SOURCE=200112 $ERRFLAG -c conftest.c 2>&1"
5756#echo `$CC $CPPFLAGS $CFLAGS -D_POSIX_C_SOURCE=200112 $ERRFLAG -c conftest.c 2>&1`
5757#exit 1
5758:
5759
5760else
5761{ $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
5762$as_echo "failed" >&6; }
5763:
5764
5765fi
5766fi
5767
5768
5769
5770
5771
5772{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we need -D__EXTENSIONS__ as a flag for $CC" >&5
5773$as_echo_n "checking whether we need -D__EXTENSIONS__ as a flag for $CC... " >&6; }
5774cache=_D__EXTENSIONS__
5775if eval \${cv_prog_cc_flag_needed_$cache+:} false; then :
5776  $as_echo_n "(cached) " >&6
5777else
5778
5779echo '
5780#include "confdefs.h"
5781#include <stdlib.h>
5782#include <ctype.h>
5783#include <sys/time.h>
5784#ifdef HAVE_TIME_H
5785#include <time.h>
5786#endif
5787#include <unistd.h>
5788#ifdef HAVE_GETOPT_H
5789#include <getopt.h>
5790#endif
5791
5792int test() {
5793        int a;
5794        char **opts = NULL;
5795        struct timeval tv;
5796        tv.tv_usec = 10;
5797        srandom(32);
5798        a = getopt(2, opts, "a");
5799        a = isascii(32);
5800	if(tv.tv_usec)
5801		a = 0;
5802        return a;
5803}
5804' > conftest.c
5805echo 'void f(){}' >>conftest.c
5806if test -z "`$CC $CPPFLAGS $CFLAGS $ERRFLAG -c conftest.c 2>&1`"; then
5807eval "cv_prog_cc_flag_needed_$cache=no"
5808else
5809
5810if test -z "`$CC $CPPFLAGS $CFLAGS -D__EXTENSIONS__ $ERRFLAG -c conftest.c 2>&1`"; then
5811eval "cv_prog_cc_flag_needed_$cache=yes"
5812else
5813eval "cv_prog_cc_flag_needed_$cache=fail"
5814#echo 'Test with flag fails too!'
5815#cat conftest.c
5816#echo "$CC $CPPFLAGS $CFLAGS -D__EXTENSIONS__ $ERRFLAG -c conftest.c 2>&1"
5817#echo `$CC $CPPFLAGS $CFLAGS -D__EXTENSIONS__ $ERRFLAG -c conftest.c 2>&1`
5818#exit 1
5819fi
5820
5821fi
5822rm -f conftest conftest.c conftest.o
5823
5824fi
5825
5826if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = yes"; then
5827{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5828$as_echo "yes" >&6; }
5829:
5830CFLAGS="$CFLAGS -D__EXTENSIONS__"
5831else
5832if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = no"; then
5833{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5834$as_echo "no" >&6; }
5835#echo 'Test with flag is no!'
5836#cat conftest.c
5837#echo "$CC $CPPFLAGS $CFLAGS -D__EXTENSIONS__ $ERRFLAG -c conftest.c 2>&1"
5838#echo `$CC $CPPFLAGS $CFLAGS -D__EXTENSIONS__ $ERRFLAG -c conftest.c 2>&1`
5839#exit 1
5840:
5841
5842else
5843{ $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
5844$as_echo "failed" >&6; }
5845:
5846
5847fi
5848fi
5849
5850
5851
5852
5853# debug mode flags warnings
5854# Check whether --enable-checking was given.
5855if test "${enable_checking+set}" = set; then :
5856  enableval=$enable_checking;
5857fi
5858
5859# Check whether --enable-debug was given.
5860if test "${enable_debug+set}" = set; then :
5861  enableval=$enable_debug;
5862fi
5863
5864if test "$enable_debug" = "yes"; then debug_enabled="$enable_debug";
5865else debug_enabled="$enable_checking"; fi
5866
5867case "$debug_enabled" in
5868        yes)
5869
5870
5871{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -W" >&5
5872$as_echo_n "checking whether $CC supports -W... " >&6; }
5873cache=`echo W | sed 'y%.=/+-%___p_%'`
5874if eval \${cv_prog_cc_flag_$cache+:} false; then :
5875  $as_echo_n "(cached) " >&6
5876else
5877
5878echo 'void f(void){}' >conftest.c
5879if test -z "`$CC $CPPFLAGS $CFLAGS -W -c conftest.c 2>&1`"; then
5880eval "cv_prog_cc_flag_$cache=yes"
5881else
5882eval "cv_prog_cc_flag_$cache=no"
5883fi
5884rm -f conftest conftest.o conftest.c
5885
5886fi
5887
5888if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
5889{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5890$as_echo "yes" >&6; }
5891:
5892CFLAGS="$CFLAGS -W"
5893else
5894{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5895$as_echo "no" >&6; }
5896:
5897
5898fi
5899
5900
5901
5902{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wall" >&5
5903$as_echo_n "checking whether $CC supports -Wall... " >&6; }
5904cache=`echo Wall | sed 'y%.=/+-%___p_%'`
5905if eval \${cv_prog_cc_flag_$cache+:} false; then :
5906  $as_echo_n "(cached) " >&6
5907else
5908
5909echo 'void f(void){}' >conftest.c
5910if test -z "`$CC $CPPFLAGS $CFLAGS -Wall -c conftest.c 2>&1`"; then
5911eval "cv_prog_cc_flag_$cache=yes"
5912else
5913eval "cv_prog_cc_flag_$cache=no"
5914fi
5915rm -f conftest conftest.o conftest.c
5916
5917fi
5918
5919if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
5920{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5921$as_echo "yes" >&6; }
5922:
5923CFLAGS="$CFLAGS -Wall"
5924else
5925{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5926$as_echo "no" >&6; }
5927:
5928
5929fi
5930
5931
5932
5933{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wextra" >&5
5934$as_echo_n "checking whether $CC supports -Wextra... " >&6; }
5935cache=`echo Wextra | sed 'y%.=/+-%___p_%'`
5936if eval \${cv_prog_cc_flag_$cache+:} false; then :
5937  $as_echo_n "(cached) " >&6
5938else
5939
5940echo 'void f(void){}' >conftest.c
5941if test -z "`$CC $CPPFLAGS $CFLAGS -Wextra -c conftest.c 2>&1`"; then
5942eval "cv_prog_cc_flag_$cache=yes"
5943else
5944eval "cv_prog_cc_flag_$cache=no"
5945fi
5946rm -f conftest conftest.o conftest.c
5947
5948fi
5949
5950if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
5951{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5952$as_echo "yes" >&6; }
5953:
5954CFLAGS="$CFLAGS -Wextra"
5955else
5956{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5957$as_echo "no" >&6; }
5958:
5959
5960fi
5961
5962
5963
5964{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wdeclaration-after-statement" >&5
5965$as_echo_n "checking whether $CC supports -Wdeclaration-after-statement... " >&6; }
5966cache=`echo Wdeclaration-after-statement | sed 'y%.=/+-%___p_%'`
5967if eval \${cv_prog_cc_flag_$cache+:} false; then :
5968  $as_echo_n "(cached) " >&6
5969else
5970
5971echo 'void f(void){}' >conftest.c
5972if test -z "`$CC $CPPFLAGS $CFLAGS -Wdeclaration-after-statement -c conftest.c 2>&1`"; then
5973eval "cv_prog_cc_flag_$cache=yes"
5974else
5975eval "cv_prog_cc_flag_$cache=no"
5976fi
5977rm -f conftest conftest.o conftest.c
5978
5979fi
5980
5981if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
5982{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5983$as_echo "yes" >&6; }
5984:
5985CFLAGS="$CFLAGS -Wdeclaration-after-statement"
5986else
5987{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5988$as_echo "no" >&6; }
5989:
5990
5991fi
5992
5993
5994$as_echo "#define UNBOUND_DEBUG /**/" >>confdefs.h
5995
5996		;;
5997	no|*)
5998		# nothing to do.
5999		;;
6000esac
6001if test "$default_cflags" = "yes"; then
6002	# only when CFLAGS was "" at the start, if the users wants to
6003	# override we shouldn't add default cflags, because they wouldn't
6004	# be able to turn off these options and set the CFLAGS wanted.
6005
6006    # Check whether --enable-flto was given.
6007if test "${enable_flto+set}" = set; then :
6008  enableval=$enable_flto;
6009fi
6010
6011    if test "x$enable_flto" != "xno"; then :
6012
6013        { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -flto" >&5
6014$as_echo_n "checking if $CC supports -flto... " >&6; }
6015        BAKCFLAGS="$CFLAGS"
6016        CFLAGS="$CFLAGS -flto"
6017        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6018/* end confdefs.h.  */
6019
6020int
6021main ()
6022{
6023
6024  ;
6025  return 0;
6026}
6027_ACEOF
6028if ac_fn_c_try_link "$LINENO"; then :
6029
6030            if $CC $CFLAGS -o conftest conftest.c 2>&1 | $GREP -e "warning: no debug symbols in executable" -e "warning: object" >/dev/null; then
6031                CFLAGS="$BAKCFLAGS"
6032                { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6033$as_echo "no" >&6; }
6034            else
6035                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6036$as_echo "yes" >&6; }
6037            fi
6038            rm -f conftest conftest.c conftest.o
6039
6040else
6041  CFLAGS="$BAKCFLAGS" ; { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6042$as_echo "no" >&6; }
6043fi
6044rm -f core conftest.err conftest.$ac_objext \
6045    conftest$ac_exeext conftest.$ac_ext
6046
6047fi
6048
6049
6050    # Check whether --enable-pie was given.
6051if test "${enable_pie+set}" = set; then :
6052  enableval=$enable_pie;
6053fi
6054
6055    if test "x$enable_pie" = "xyes"; then :
6056
6057	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports PIE" >&5
6058$as_echo_n "checking if $CC supports PIE... " >&6; }
6059	BAKLDFLAGS="$LDFLAGS"
6060	BAKCFLAGS="$CFLAGS"
6061	LDFLAGS="$LDFLAGS -pie"
6062	CFLAGS="$CFLAGS -fPIE"
6063	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6064/* end confdefs.h.  */
6065
6066int
6067main ()
6068{
6069
6070  ;
6071  return 0;
6072}
6073_ACEOF
6074if ac_fn_c_try_link "$LINENO"; then :
6075
6076	    if $CC $CFLAGS $LDFLAGS -o conftest conftest.c 2>&1 | grep "warning: no debug symbols in executable" >/dev/null; then
6077		LDFLAGS="$BAKLDFLAGS"
6078		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6079$as_echo "no" >&6; }
6080	    else
6081		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6082$as_echo "yes" >&6; }
6083	    fi
6084	    rm -f conftest conftest.c conftest.o
6085
6086else
6087  LDFLAGS="$BAKLDFLAGS" ; CFLAGS="$BAKCFLAGS" ; { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6088$as_echo "no" >&6; }
6089fi
6090rm -f core conftest.err conftest.$ac_objext \
6091    conftest$ac_exeext conftest.$ac_ext
6092
6093fi
6094
6095
6096    # Check whether --enable-relro_now was given.
6097if test "${enable_relro_now+set}" = set; then :
6098  enableval=$enable_relro_now;
6099fi
6100
6101    if test "x$enable_relro_now" = "xyes"; then :
6102
6103	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wl,-z,relro,-z,now" >&5
6104$as_echo_n "checking if $CC supports -Wl,-z,relro,-z,now... " >&6; }
6105	BAKLDFLAGS="$LDFLAGS"
6106	LDFLAGS="$LDFLAGS -Wl,-z,relro,-z,now"
6107	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6108/* end confdefs.h.  */
6109
6110int
6111main ()
6112{
6113
6114  ;
6115  return 0;
6116}
6117_ACEOF
6118if ac_fn_c_try_link "$LINENO"; then :
6119
6120	    if $CC $CFLAGS $LDFLAGS -o conftest conftest.c 2>&1 | grep "warning: no debug symbols in executable" >/dev/null; then
6121		LDFLAGS="$BAKLDFLAGS"
6122		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6123$as_echo "no" >&6; }
6124	    else
6125		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6126$as_echo "yes" >&6; }
6127	    fi
6128	    rm -f conftest conftest.c conftest.o
6129
6130else
6131  LDFLAGS="$BAKLDFLAGS" ; { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6132$as_echo "no" >&6; }
6133fi
6134rm -f core conftest.err conftest.$ac_objext \
6135    conftest$ac_exeext conftest.$ac_ext
6136
6137fi
6138
6139fi
6140
6141{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
6142$as_echo_n "checking for inline... " >&6; }
6143if ${ac_cv_c_inline+:} false; then :
6144  $as_echo_n "(cached) " >&6
6145else
6146  ac_cv_c_inline=no
6147for ac_kw in inline __inline__ __inline; do
6148  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6149/* end confdefs.h.  */
6150#ifndef __cplusplus
6151typedef int foo_t;
6152static $ac_kw foo_t static_foo () {return 0; }
6153$ac_kw foo_t foo () {return 0; }
6154#endif
6155
6156_ACEOF
6157if ac_fn_c_try_compile "$LINENO"; then :
6158  ac_cv_c_inline=$ac_kw
6159fi
6160rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6161  test "$ac_cv_c_inline" != no && break
6162done
6163
6164fi
6165{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
6166$as_echo "$ac_cv_c_inline" >&6; }
6167
6168case $ac_cv_c_inline in
6169  inline | yes) ;;
6170  *)
6171    case $ac_cv_c_inline in
6172      no) ac_val=;;
6173      *) ac_val=$ac_cv_c_inline;;
6174    esac
6175    cat >>confdefs.h <<_ACEOF
6176#ifndef __cplusplus
6177#define inline $ac_val
6178#endif
6179_ACEOF
6180    ;;
6181esac
6182
6183
6184{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler (${CC-cc}) accepts the \"format\" attribute" >&5
6185$as_echo_n "checking whether the C compiler (${CC-cc}) accepts the \"format\" attribute... " >&6; }
6186if ${ac_cv_c_format_attribute+:} false; then :
6187  $as_echo_n "(cached) " >&6
6188else
6189  ac_cv_c_format_attribute=no
6190cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6191/* end confdefs.h.  */
6192#include <stdio.h>
6193void f (char *format, ...) __attribute__ ((format (printf, 1, 2)));
6194void (*pf) (char *format, ...) __attribute__ ((format (printf, 1, 2)));
6195
6196int
6197main ()
6198{
6199
6200   f ("%s", "str");
6201
6202  ;
6203  return 0;
6204}
6205_ACEOF
6206if ac_fn_c_try_compile "$LINENO"; then :
6207  ac_cv_c_format_attribute="yes"
6208else
6209  ac_cv_c_format_attribute="no"
6210fi
6211rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6212
6213fi
6214
6215
6216{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_format_attribute" >&5
6217$as_echo "$ac_cv_c_format_attribute" >&6; }
6218if test $ac_cv_c_format_attribute = yes; then
6219
6220$as_echo "#define HAVE_ATTR_FORMAT 1" >>confdefs.h
6221
6222fi
6223
6224
6225{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler (${CC-cc}) accepts the \"unused\" attribute" >&5
6226$as_echo_n "checking whether the C compiler (${CC-cc}) accepts the \"unused\" attribute... " >&6; }
6227if ${ac_cv_c_unused_attribute+:} false; then :
6228  $as_echo_n "(cached) " >&6
6229else
6230  ac_cv_c_unused_attribute=no
6231cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6232/* end confdefs.h.  */
6233#include <stdio.h>
6234void f (char *u __attribute__((unused)));
6235
6236int
6237main ()
6238{
6239
6240   f ("x");
6241
6242  ;
6243  return 0;
6244}
6245_ACEOF
6246if ac_fn_c_try_compile "$LINENO"; then :
6247  ac_cv_c_unused_attribute="yes"
6248else
6249  ac_cv_c_unused_attribute="no"
6250fi
6251rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6252
6253fi
6254
6255
6256
6257
6258{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_unused_attribute" >&5
6259$as_echo "$ac_cv_c_unused_attribute" >&6; }
6260if test $ac_cv_c_unused_attribute = yes; then
6261
6262$as_echo "#define HAVE_ATTR_UNUSED 1" >>confdefs.h
6263
6264fi
6265
6266
6267
6268
6269{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler (${CC-cc}) accepts the \"weak\" attribute" >&5
6270$as_echo_n "checking whether the C compiler (${CC-cc}) accepts the \"weak\" attribute... " >&6; }
6271if ${ac_cv_c_weak_attribute+:} false; then :
6272  $as_echo_n "(cached) " >&6
6273else
6274  ac_cv_c_weak_attribute=no
6275cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6276/* end confdefs.h.  */
6277 #include <stdio.h>
6278__attribute__((weak)) void f(int x) { printf("%d", x); }
6279
6280int
6281main ()
6282{
6283
6284   f(1);
6285
6286  ;
6287  return 0;
6288}
6289_ACEOF
6290if ac_fn_c_try_compile "$LINENO"; then :
6291  ac_cv_c_weak_attribute="yes"
6292else
6293  ac_cv_c_weak_attribute="no"
6294fi
6295rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6296
6297fi
6298
6299
6300{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_weak_attribute" >&5
6301$as_echo "$ac_cv_c_weak_attribute" >&6; }
6302if test $ac_cv_c_weak_attribute = yes; then
6303
6304$as_echo "#define HAVE_ATTR_WEAK 1" >>confdefs.h
6305
6306
6307$as_echo "#define ATTR_WEAK __attribute__((weak))" >>confdefs.h
6308
6309fi
6310
6311
6312
6313
6314{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler (${CC-cc}) accepts the \"noreturn\" attribute" >&5
6315$as_echo_n "checking whether the C compiler (${CC-cc}) accepts the \"noreturn\" attribute... " >&6; }
6316if ${ac_cv_c_noreturn_attribute+:} false; then :
6317  $as_echo_n "(cached) " >&6
6318else
6319  ac_cv_c_noreturn_attribute=no
6320cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6321/* end confdefs.h.  */
6322 #include <stdio.h>
6323__attribute__((noreturn)) void f(int x) { printf("%d", x); }
6324
6325int
6326main ()
6327{
6328
6329   f(1);
6330
6331  ;
6332  return 0;
6333}
6334_ACEOF
6335if ac_fn_c_try_compile "$LINENO"; then :
6336  ac_cv_c_noreturn_attribute="yes"
6337else
6338  ac_cv_c_noreturn_attribute="no"
6339fi
6340rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6341
6342fi
6343
6344
6345{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_noreturn_attribute" >&5
6346$as_echo "$ac_cv_c_noreturn_attribute" >&6; }
6347if test $ac_cv_c_noreturn_attribute = yes; then
6348
6349$as_echo "#define HAVE_ATTR_NORETURN 1" >>confdefs.h
6350
6351
6352$as_echo "#define ATTR_NORETURN __attribute__((__noreturn__))" >>confdefs.h
6353
6354fi
6355
6356
6357if test "$srcdir" != "."; then
6358	CPPFLAGS="$CPPFLAGS -I$srcdir"
6359fi
6360
6361
6362
6363
6364
6365for ac_prog in flex lex
6366do
6367  # Extract the first word of "$ac_prog", so it can be a program name with args.
6368set dummy $ac_prog; ac_word=$2
6369{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6370$as_echo_n "checking for $ac_word... " >&6; }
6371if ${ac_cv_prog_LEX+:} false; then :
6372  $as_echo_n "(cached) " >&6
6373else
6374  if test -n "$LEX"; then
6375  ac_cv_prog_LEX="$LEX" # Let the user override the test.
6376else
6377as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6378for as_dir in $PATH
6379do
6380  IFS=$as_save_IFS
6381  test -z "$as_dir" && as_dir=.
6382    for ac_exec_ext in '' $ac_executable_extensions; do
6383  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6384    ac_cv_prog_LEX="$ac_prog"
6385    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6386    break 2
6387  fi
6388done
6389  done
6390IFS=$as_save_IFS
6391
6392fi
6393fi
6394LEX=$ac_cv_prog_LEX
6395if test -n "$LEX"; then
6396  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LEX" >&5
6397$as_echo "$LEX" >&6; }
6398else
6399  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6400$as_echo "no" >&6; }
6401fi
6402
6403
6404  test -n "$LEX" && break
6405done
6406test -n "$LEX" || LEX=":"
6407
6408if test "x$LEX" != "x:"; then
6409  cat >conftest.l <<_ACEOF
6410%%
6411a { ECHO; }
6412b { REJECT; }
6413c { yymore (); }
6414d { yyless (1); }
6415e { /* IRIX 6.5 flex 2.5.4 underquotes its yyless argument.  */
6416    yyless ((input () != 0)); }
6417f { unput (yytext[0]); }
6418. { BEGIN INITIAL; }
6419%%
6420#ifdef YYTEXT_POINTER
6421extern char *yytext;
6422#endif
6423int
6424main (void)
6425{
6426  return ! yylex () + ! yywrap ();
6427}
6428_ACEOF
6429{ { ac_try="$LEX conftest.l"
6430case "(($ac_try" in
6431  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6432  *) ac_try_echo=$ac_try;;
6433esac
6434eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
6435$as_echo "$ac_try_echo"; } >&5
6436  (eval "$LEX conftest.l") 2>&5
6437  ac_status=$?
6438  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
6439  test $ac_status = 0; }
6440{ $as_echo "$as_me:${as_lineno-$LINENO}: checking lex output file root" >&5
6441$as_echo_n "checking lex output file root... " >&6; }
6442if ${ac_cv_prog_lex_root+:} false; then :
6443  $as_echo_n "(cached) " >&6
6444else
6445
6446if test -f lex.yy.c; then
6447  ac_cv_prog_lex_root=lex.yy
6448elif test -f lexyy.c; then
6449  ac_cv_prog_lex_root=lexyy
6450else
6451  as_fn_error $? "cannot find output from $LEX; giving up" "$LINENO" 5
6452fi
6453fi
6454{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_lex_root" >&5
6455$as_echo "$ac_cv_prog_lex_root" >&6; }
6456LEX_OUTPUT_ROOT=$ac_cv_prog_lex_root
6457
6458if test -z "${LEXLIB+set}"; then
6459  { $as_echo "$as_me:${as_lineno-$LINENO}: checking lex library" >&5
6460$as_echo_n "checking lex library... " >&6; }
6461if ${ac_cv_lib_lex+:} false; then :
6462  $as_echo_n "(cached) " >&6
6463else
6464
6465    ac_save_LIBS=$LIBS
6466    ac_cv_lib_lex='none needed'
6467    for ac_lib in '' -lfl -ll; do
6468      LIBS="$ac_lib $ac_save_LIBS"
6469      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6470/* end confdefs.h.  */
6471`cat $LEX_OUTPUT_ROOT.c`
6472_ACEOF
6473if ac_fn_c_try_link "$LINENO"; then :
6474  ac_cv_lib_lex=$ac_lib
6475fi
6476rm -f core conftest.err conftest.$ac_objext \
6477    conftest$ac_exeext conftest.$ac_ext
6478      test "$ac_cv_lib_lex" != 'none needed' && break
6479    done
6480    LIBS=$ac_save_LIBS
6481
6482fi
6483{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_lex" >&5
6484$as_echo "$ac_cv_lib_lex" >&6; }
6485  test "$ac_cv_lib_lex" != 'none needed' && LEXLIB=$ac_cv_lib_lex
6486fi
6487
6488
6489{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether yytext is a pointer" >&5
6490$as_echo_n "checking whether yytext is a pointer... " >&6; }
6491if ${ac_cv_prog_lex_yytext_pointer+:} false; then :
6492  $as_echo_n "(cached) " >&6
6493else
6494  # POSIX says lex can declare yytext either as a pointer or an array; the
6495# default is implementation-dependent.  Figure out which it is, since
6496# not all implementations provide the %pointer and %array declarations.
6497ac_cv_prog_lex_yytext_pointer=no
6498ac_save_LIBS=$LIBS
6499LIBS="$LEXLIB $ac_save_LIBS"
6500cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6501/* end confdefs.h.  */
6502
6503  #define YYTEXT_POINTER 1
6504`cat $LEX_OUTPUT_ROOT.c`
6505_ACEOF
6506if ac_fn_c_try_link "$LINENO"; then :
6507  ac_cv_prog_lex_yytext_pointer=yes
6508fi
6509rm -f core conftest.err conftest.$ac_objext \
6510    conftest$ac_exeext conftest.$ac_ext
6511LIBS=$ac_save_LIBS
6512
6513fi
6514{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_lex_yytext_pointer" >&5
6515$as_echo "$ac_cv_prog_lex_yytext_pointer" >&6; }
6516if test $ac_cv_prog_lex_yytext_pointer = yes; then
6517
6518$as_echo "#define YYTEXT_POINTER 1" >>confdefs.h
6519
6520fi
6521rm -f conftest.l $LEX_OUTPUT_ROOT.c
6522
6523fi
6524if test "$LEX" != "" -a "$LEX" != ":"; then
6525
6526	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for yylex_destroy" >&5
6527$as_echo_n "checking for yylex_destroy... " >&6; }
6528	if echo %% | $LEX -t 2>&1 | grep yylex_destroy >/dev/null 2>&1; then
6529
6530$as_echo "#define LEX_HAS_YYLEX_DESTROY 1" >>confdefs.h
6531
6532		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6533$as_echo "yes" >&6; }
6534	else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6535$as_echo "no" >&6; };
6536		LEX=":"
6537	fi
6538
6539fi
6540if test "$LEX" != "" -a "$LEX" != ":"; then
6541
6542	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lex %option" >&5
6543$as_echo_n "checking for lex %option... " >&6; }
6544	if cat <<EOF | $LEX -t 2>&1 | grep yy_delete_buffer >/dev/null 2>&1; then
6545%option nounput
6546%%
6547EOF
6548		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6549$as_echo "yes" >&6; }
6550	else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6551$as_echo "no" >&6; };
6552		LEX=":"
6553	fi
6554
6555fi
6556for ac_prog in 'bison -y' byacc
6557do
6558  # Extract the first word of "$ac_prog", so it can be a program name with args.
6559set dummy $ac_prog; ac_word=$2
6560{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6561$as_echo_n "checking for $ac_word... " >&6; }
6562if ${ac_cv_prog_YACC+:} false; then :
6563  $as_echo_n "(cached) " >&6
6564else
6565  if test -n "$YACC"; then
6566  ac_cv_prog_YACC="$YACC" # Let the user override the test.
6567else
6568as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6569for as_dir in $PATH
6570do
6571  IFS=$as_save_IFS
6572  test -z "$as_dir" && as_dir=.
6573    for ac_exec_ext in '' $ac_executable_extensions; do
6574  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6575    ac_cv_prog_YACC="$ac_prog"
6576    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6577    break 2
6578  fi
6579done
6580  done
6581IFS=$as_save_IFS
6582
6583fi
6584fi
6585YACC=$ac_cv_prog_YACC
6586if test -n "$YACC"; then
6587  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $YACC" >&5
6588$as_echo "$YACC" >&6; }
6589else
6590  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6591$as_echo "no" >&6; }
6592fi
6593
6594
6595  test -n "$YACC" && break
6596done
6597test -n "$YACC" || YACC="yacc"
6598
6599# Extract the first word of "doxygen", so it can be a program name with args.
6600set dummy doxygen; ac_word=$2
6601{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6602$as_echo_n "checking for $ac_word... " >&6; }
6603if ${ac_cv_prog_doxygen+:} false; then :
6604  $as_echo_n "(cached) " >&6
6605else
6606  if test -n "$doxygen"; then
6607  ac_cv_prog_doxygen="$doxygen" # Let the user override the test.
6608else
6609as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6610for as_dir in $PATH
6611do
6612  IFS=$as_save_IFS
6613  test -z "$as_dir" && as_dir=.
6614    for ac_exec_ext in '' $ac_executable_extensions; do
6615  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6616    ac_cv_prog_doxygen="doxygen"
6617    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6618    break 2
6619  fi
6620done
6621  done
6622IFS=$as_save_IFS
6623
6624fi