xref: /freebsd/contrib/unbound/configure (revision be181ee2)
1#! /bin/sh
2# Guess values for system-dependent variables and create Makefiles.
3# Generated by GNU Autoconf 2.69 for unbound 1.16.3.
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.16.3'
595PACKAGE_STRING='unbound 1.16.3'
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
646CACHEDB_OBJ
647CACHEDB_SRC
648DNSCRYPT_OBJ
649DNSCRYPT_SRC
650ENABLE_DNSCRYPT
651ENABLE_DNSCRYPT_XCHACHA20
652DNSTAP_OBJ
653DNSTAP_SRC
654DNSTAP_SOCKET_TESTBIN
655DNSTAP_SOCKET_PATH
656opt_dnstap_socket_path
657ENABLE_DNSTAP
658PROTOC_C
659UBSYMS
660EXTRALINK
661COMMON_OBJ_ALL_SYMBOLS
662LIBOBJ_WITHOUT_CTIME
663LIBOBJ_WITHOUT_CTIMEARC4
664WIN_CHECKCONF_OBJ_LINK
665WIN_CONTROL_OBJ_LINK
666WIN_UBANCHOR_OBJ_LINK
667WIN_HOST_OBJ_LINK
668WIN_DAEMON_OBJ_LINK
669WIN_DAEMON_OBJ
670WIN_DAEMON_SRC
671WINAPPS
672WINDRES
673CHECKLOCK_OBJ
674staticexe
675PC_LIBEVENT_DEPENDENCY
676UNBOUND_EVENT_UNINSTALL
677UNBOUND_EVENT_INSTALL
678SUBNET_HEADER
679SUBNET_OBJ
680PC_LIBBSD_DEPENDENCY
681SSLLIB
682HAVE_SSL
683PC_CRYPTO_DEPENDENCY
684CONFIG_DATE
685GCC_DOCKER_LINTFLAGS
686NETBSD_LINTFLAGS
687PYUNBOUND_UNINSTALL
688PYUNBOUND_INSTALL
689PYUNBOUND_TARGET
690PYUNBOUND_OBJ
691WITH_PYUNBOUND
692PYTHONMOD_UNINSTALL
693PYTHONMOD_INSTALL
694PYTHONMOD_HEADER
695PYTHONMOD_OBJ
696WITH_PYTHONMODULE
697swig
698SWIG_LIB
699SWIG
700PC_PY_DEPENDENCY
701PYTHON_LIBS
702PY_MAJOR_VERSION
703PYTHON_SITE_PKG
704PYTHON_LDFLAGS
705PYTHON_CPPFLAGS
706PYTHON
707PYTHON_VERSION
708DYNLIBMOD_EXTRALIBS
709DYNLIBMOD_HEADER
710DYNLIBMOD_OBJ
711WITH_DYNLIBMODULE
712PTHREAD_CFLAGS_ONLY
713PTHREAD_CFLAGS
714PTHREAD_LIBS
715PTHREAD_CC
716ax_pthread_config
717ASYNCLOOK_ALLOCCHECK_EXTRA_OBJ
718SLDNS_ALLOCCHECK_EXTRA_OBJ
719USE_SYSTEMD_FALSE
720USE_SYSTEMD_TRUE
721SYSTEMD_DAEMON_LIBS
722SYSTEMD_DAEMON_CFLAGS
723SYSTEMD_LIBS
724SYSTEMD_CFLAGS
725RUNTIME_PATH
726LIBOBJS
727PKG_CONFIG_LIBDIR
728PKG_CONFIG_PATH
729PKG_CONFIG
730LT_SYS_LIBRARY_PATH
731OTOOL64
732OTOOL
733LIPO
734NMEDIT
735DSYMUTIL
736MANIFEST_TOOL
737AWK
738RANLIB
739ac_ct_AR
740DLLTOOL
741OBJDUMP
742LN_S
743NM
744ac_ct_DUMPBIN
745DUMPBIN
746LD
747FGREP
748SED
749LIBTOOL
750AR
751host_os
752host_vendor
753host_cpu
754host
755build_os
756build_vendor
757build_cpu
758build
759libtool
760STRIP
761doxygen
762YFLAGS
763YACC
764LEXLIB
765LEX_OUTPUT_ROOT
766LEX
767debug_enabled
768DEPFLAG
769UNBOUND_USERNAME
770UNBOUND_ROOTCERT_FILE
771UNBOUND_ROOTKEY_FILE
772UNBOUND_PIDFILE
773UNBOUND_SHARE_DIR
774UNBOUND_CHROOT_DIR
775UNBOUND_RUN_DIR
776ub_conf_dir
777ub_conf_file
778UNBOUND_LOCALSTATE_DIR
779UNBOUND_SYSCONF_DIR
780UNBOUND_SBIN_DIR
781EGREP
782GREP
783CPP
784OBJEXT
785EXEEXT
786ac_ct_CC
787CPPFLAGS
788LDFLAGS
789CFLAGS
790CC
791LIBUNBOUND_AGE
792LIBUNBOUND_REVISION
793LIBUNBOUND_CURRENT
794UNBOUND_VERSION_MICRO
795UNBOUND_VERSION_MINOR
796UNBOUND_VERSION_MAJOR
797target_alias
798host_alias
799build_alias
800LIBS
801ECHO_T
802ECHO_N
803ECHO_C
804DEFS
805mandir
806localedir
807libdir
808psdir
809pdfdir
810dvidir
811htmldir
812infodir
813docdir
814oldincludedir
815includedir
816runstatedir
817localstatedir
818sharedstatedir
819sysconfdir
820datadir
821datarootdir
822libexecdir
823sbindir
824bindir
825program_transform_name
826prefix
827exec_prefix
828PACKAGE_URL
829PACKAGE_BUGREPORT
830PACKAGE_STRING
831PACKAGE_VERSION
832PACKAGE_TARNAME
833PACKAGE_NAME
834PATH_SEPARATOR
835SHELL'
836ac_subst_files=''
837ac_user_opts='
838enable_option_checking
839with_conf_file
840with_run_dir
841with_chroot_dir
842with_share_dir
843with_pidfile
844with_rootkey_file
845with_rootcert_file
846with_username
847enable_checking
848enable_debug
849enable_flto
850enable_pie
851enable_relro_now
852enable_shared
853enable_static
854with_pic
855enable_fast_install
856with_aix_soname
857with_gnu_ld
858with_sysroot
859enable_libtool_lock
860enable_rpath
861enable_largefile
862enable_systemd
863enable_alloc_checks
864enable_alloc_lite
865enable_alloc_nonregional
866with_pthreads
867with_solaris_threads
868with_syslog_facility
869with_dynlibmodule
870with_pyunbound
871with_pythonmodule
872enable_swig_version_check
873with_nss
874with_nettle
875with_ssl
876with_libbsd
877enable_sha1
878enable_sha2
879enable_subnet
880enable_gost
881enable_ecdsa
882enable_dsa
883with_deprecate_rsa_1024
884enable_ed25519
885enable_ed448
886enable_event_api
887enable_tfo_client
888enable_tfo_server
889with_libevent
890with_libexpat
891with_libhiredis
892with_libnghttp2
893enable_static_exe
894enable_fully_static
895enable_lock_checks
896enable_allsymbols
897enable_dnstap
898with_dnstap_socket_path
899with_protobuf_c
900enable_dnscrypt
901with_libsodium
902enable_cachedb
903enable_ipsecmod
904enable_ipset
905with_libmnl
906enable_explicit_port_randomisation
907enable_linux_ip_local_port_range
908with_libunbound_only
909'
910      ac_precious_vars='build_alias
911host_alias
912target_alias
913CC
914CFLAGS
915LDFLAGS
916LIBS
917CPPFLAGS
918CPP
919YACC
920YFLAGS
921LT_SYS_LIBRARY_PATH
922PKG_CONFIG
923PKG_CONFIG_PATH
924PKG_CONFIG_LIBDIR
925SYSTEMD_CFLAGS
926SYSTEMD_LIBS
927SYSTEMD_DAEMON_CFLAGS
928SYSTEMD_DAEMON_LIBS
929PYTHON_VERSION'
930
931
932# Initialize some variables set by options.
933ac_init_help=
934ac_init_version=false
935ac_unrecognized_opts=
936ac_unrecognized_sep=
937# The variables have the same names as the options, with
938# dashes changed to underlines.
939cache_file=/dev/null
940exec_prefix=NONE
941no_create=
942no_recursion=
943prefix=NONE
944program_prefix=NONE
945program_suffix=NONE
946program_transform_name=s,x,x,
947silent=
948site=
949srcdir=
950verbose=
951x_includes=NONE
952x_libraries=NONE
953
954# Installation directory options.
955# These are left unexpanded so users can "make install exec_prefix=/foo"
956# and all the variables that are supposed to be based on exec_prefix
957# by default will actually change.
958# Use braces instead of parens because sh, perl, etc. also accept them.
959# (The list follows the same order as the GNU Coding Standards.)
960bindir='${exec_prefix}/bin'
961sbindir='${exec_prefix}/sbin'
962libexecdir='${exec_prefix}/libexec'
963datarootdir='${prefix}/share'
964datadir='${datarootdir}'
965sysconfdir='${prefix}/etc'
966sharedstatedir='${prefix}/com'
967localstatedir='${prefix}/var'
968runstatedir='${localstatedir}/run'
969includedir='${prefix}/include'
970oldincludedir='/usr/include'
971docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
972infodir='${datarootdir}/info'
973htmldir='${docdir}'
974dvidir='${docdir}'
975pdfdir='${docdir}'
976psdir='${docdir}'
977libdir='${exec_prefix}/lib'
978localedir='${datarootdir}/locale'
979mandir='${datarootdir}/man'
980
981ac_prev=
982ac_dashdash=
983for ac_option
984do
985  # If the previous option needs an argument, assign it.
986  if test -n "$ac_prev"; then
987    eval $ac_prev=\$ac_option
988    ac_prev=
989    continue
990  fi
991
992  case $ac_option in
993  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
994  *=)   ac_optarg= ;;
995  *)    ac_optarg=yes ;;
996  esac
997
998  # Accept the important Cygnus configure options, so we can diagnose typos.
999
1000  case $ac_dashdash$ac_option in
1001  --)
1002    ac_dashdash=yes ;;
1003
1004  -bindir | --bindir | --bindi | --bind | --bin | --bi)
1005    ac_prev=bindir ;;
1006  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1007    bindir=$ac_optarg ;;
1008
1009  -build | --build | --buil | --bui | --bu)
1010    ac_prev=build_alias ;;
1011  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1012    build_alias=$ac_optarg ;;
1013
1014  -cache-file | --cache-file | --cache-fil | --cache-fi \
1015  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1016    ac_prev=cache_file ;;
1017  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1018  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1019    cache_file=$ac_optarg ;;
1020
1021  --config-cache | -C)
1022    cache_file=config.cache ;;
1023
1024  -datadir | --datadir | --datadi | --datad)
1025    ac_prev=datadir ;;
1026  -datadir=* | --datadir=* | --datadi=* | --datad=*)
1027    datadir=$ac_optarg ;;
1028
1029  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1030  | --dataroo | --dataro | --datar)
1031    ac_prev=datarootdir ;;
1032  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1033  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1034    datarootdir=$ac_optarg ;;
1035
1036  -disable-* | --disable-*)
1037    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1038    # Reject names that are not valid shell variable names.
1039    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1040      as_fn_error $? "invalid feature name: $ac_useropt"
1041    ac_useropt_orig=$ac_useropt
1042    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1043    case $ac_user_opts in
1044      *"
1045"enable_$ac_useropt"
1046"*) ;;
1047      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1048	 ac_unrecognized_sep=', ';;
1049    esac
1050    eval enable_$ac_useropt=no ;;
1051
1052  -docdir | --docdir | --docdi | --doc | --do)
1053    ac_prev=docdir ;;
1054  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1055    docdir=$ac_optarg ;;
1056
1057  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1058    ac_prev=dvidir ;;
1059  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1060    dvidir=$ac_optarg ;;
1061
1062  -enable-* | --enable-*)
1063    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1064    # Reject names that are not valid shell variable names.
1065    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1066      as_fn_error $? "invalid feature name: $ac_useropt"
1067    ac_useropt_orig=$ac_useropt
1068    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1069    case $ac_user_opts in
1070      *"
1071"enable_$ac_useropt"
1072"*) ;;
1073      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1074	 ac_unrecognized_sep=', ';;
1075    esac
1076    eval enable_$ac_useropt=\$ac_optarg ;;
1077
1078  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1079  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1080  | --exec | --exe | --ex)
1081    ac_prev=exec_prefix ;;
1082  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1083  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1084  | --exec=* | --exe=* | --ex=*)
1085    exec_prefix=$ac_optarg ;;
1086
1087  -gas | --gas | --ga | --g)
1088    # Obsolete; use --with-gas.
1089    with_gas=yes ;;
1090
1091  -help | --help | --hel | --he | -h)
1092    ac_init_help=long ;;
1093  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1094    ac_init_help=recursive ;;
1095  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1096    ac_init_help=short ;;
1097
1098  -host | --host | --hos | --ho)
1099    ac_prev=host_alias ;;
1100  -host=* | --host=* | --hos=* | --ho=*)
1101    host_alias=$ac_optarg ;;
1102
1103  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1104    ac_prev=htmldir ;;
1105  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1106  | --ht=*)
1107    htmldir=$ac_optarg ;;
1108
1109  -includedir | --includedir | --includedi | --included | --include \
1110  | --includ | --inclu | --incl | --inc)
1111    ac_prev=includedir ;;
1112  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1113  | --includ=* | --inclu=* | --incl=* | --inc=*)
1114    includedir=$ac_optarg ;;
1115
1116  -infodir | --infodir | --infodi | --infod | --info | --inf)
1117    ac_prev=infodir ;;
1118  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1119    infodir=$ac_optarg ;;
1120
1121  -libdir | --libdir | --libdi | --libd)
1122    ac_prev=libdir ;;
1123  -libdir=* | --libdir=* | --libdi=* | --libd=*)
1124    libdir=$ac_optarg ;;
1125
1126  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1127  | --libexe | --libex | --libe)
1128    ac_prev=libexecdir ;;
1129  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1130  | --libexe=* | --libex=* | --libe=*)
1131    libexecdir=$ac_optarg ;;
1132
1133  -localedir | --localedir | --localedi | --localed | --locale)
1134    ac_prev=localedir ;;
1135  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1136    localedir=$ac_optarg ;;
1137
1138  -localstatedir | --localstatedir | --localstatedi | --localstated \
1139  | --localstate | --localstat | --localsta | --localst | --locals)
1140    ac_prev=localstatedir ;;
1141  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1142  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1143    localstatedir=$ac_optarg ;;
1144
1145  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1146    ac_prev=mandir ;;
1147  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1148    mandir=$ac_optarg ;;
1149
1150  -nfp | --nfp | --nf)
1151    # Obsolete; use --without-fp.
1152    with_fp=no ;;
1153
1154  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1155  | --no-cr | --no-c | -n)
1156    no_create=yes ;;
1157
1158  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1159  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1160    no_recursion=yes ;;
1161
1162  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1163  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1164  | --oldin | --oldi | --old | --ol | --o)
1165    ac_prev=oldincludedir ;;
1166  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1167  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1168  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1169    oldincludedir=$ac_optarg ;;
1170
1171  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1172    ac_prev=prefix ;;
1173  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1174    prefix=$ac_optarg ;;
1175
1176  -program-prefix | --program-prefix | --program-prefi | --program-pref \
1177  | --program-pre | --program-pr | --program-p)
1178    ac_prev=program_prefix ;;
1179  -program-prefix=* | --program-prefix=* | --program-prefi=* \
1180  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1181    program_prefix=$ac_optarg ;;
1182
1183  -program-suffix | --program-suffix | --program-suffi | --program-suff \
1184  | --program-suf | --program-su | --program-s)
1185    ac_prev=program_suffix ;;
1186  -program-suffix=* | --program-suffix=* | --program-suffi=* \
1187  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1188    program_suffix=$ac_optarg ;;
1189
1190  -program-transform-name | --program-transform-name \
1191  | --program-transform-nam | --program-transform-na \
1192  | --program-transform-n | --program-transform- \
1193  | --program-transform | --program-transfor \
1194  | --program-transfo | --program-transf \
1195  | --program-trans | --program-tran \
1196  | --progr-tra | --program-tr | --program-t)
1197    ac_prev=program_transform_name ;;
1198  -program-transform-name=* | --program-transform-name=* \
1199  | --program-transform-nam=* | --program-transform-na=* \
1200  | --program-transform-n=* | --program-transform-=* \
1201  | --program-transform=* | --program-transfor=* \
1202  | --program-transfo=* | --program-transf=* \
1203  | --program-trans=* | --program-tran=* \
1204  | --progr-tra=* | --program-tr=* | --program-t=*)
1205    program_transform_name=$ac_optarg ;;
1206
1207  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1208    ac_prev=pdfdir ;;
1209  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1210    pdfdir=$ac_optarg ;;
1211
1212  -psdir | --psdir | --psdi | --psd | --ps)
1213    ac_prev=psdir ;;
1214  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1215    psdir=$ac_optarg ;;
1216
1217  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1218  | -silent | --silent | --silen | --sile | --sil)
1219    silent=yes ;;
1220
1221  -runstatedir | --runstatedir | --runstatedi | --runstated \
1222  | --runstate | --runstat | --runsta | --runst | --runs \
1223  | --run | --ru | --r)
1224    ac_prev=runstatedir ;;
1225  -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
1226  | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
1227  | --run=* | --ru=* | --r=*)
1228    runstatedir=$ac_optarg ;;
1229
1230  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1231    ac_prev=sbindir ;;
1232  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1233  | --sbi=* | --sb=*)
1234    sbindir=$ac_optarg ;;
1235
1236  -sharedstatedir | --sharedstatedir | --sharedstatedi \
1237  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1238  | --sharedst | --shareds | --shared | --share | --shar \
1239  | --sha | --sh)
1240    ac_prev=sharedstatedir ;;
1241  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1242  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1243  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1244  | --sha=* | --sh=*)
1245    sharedstatedir=$ac_optarg ;;
1246
1247  -site | --site | --sit)
1248    ac_prev=site ;;
1249  -site=* | --site=* | --sit=*)
1250    site=$ac_optarg ;;
1251
1252  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1253    ac_prev=srcdir ;;
1254  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1255    srcdir=$ac_optarg ;;
1256
1257  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1258  | --syscon | --sysco | --sysc | --sys | --sy)
1259    ac_prev=sysconfdir ;;
1260  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1261  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1262    sysconfdir=$ac_optarg ;;
1263
1264  -target | --target | --targe | --targ | --tar | --ta | --t)
1265    ac_prev=target_alias ;;
1266  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1267    target_alias=$ac_optarg ;;
1268
1269  -v | -verbose | --verbose | --verbos | --verbo | --verb)
1270    verbose=yes ;;
1271
1272  -version | --version | --versio | --versi | --vers | -V)
1273    ac_init_version=: ;;
1274
1275  -with-* | --with-*)
1276    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1277    # Reject names that are not valid shell variable names.
1278    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1279      as_fn_error $? "invalid package name: $ac_useropt"
1280    ac_useropt_orig=$ac_useropt
1281    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1282    case $ac_user_opts in
1283      *"
1284"with_$ac_useropt"
1285"*) ;;
1286      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1287	 ac_unrecognized_sep=', ';;
1288    esac
1289    eval with_$ac_useropt=\$ac_optarg ;;
1290
1291  -without-* | --without-*)
1292    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1293    # Reject names that are not valid shell variable names.
1294    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1295      as_fn_error $? "invalid package name: $ac_useropt"
1296    ac_useropt_orig=$ac_useropt
1297    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1298    case $ac_user_opts in
1299      *"
1300"with_$ac_useropt"
1301"*) ;;
1302      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1303	 ac_unrecognized_sep=', ';;
1304    esac
1305    eval with_$ac_useropt=no ;;
1306
1307  --x)
1308    # Obsolete; use --with-x.
1309    with_x=yes ;;
1310
1311  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1312  | --x-incl | --x-inc | --x-in | --x-i)
1313    ac_prev=x_includes ;;
1314  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1315  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1316    x_includes=$ac_optarg ;;
1317
1318  -x-libraries | --x-libraries | --x-librarie | --x-librari \
1319  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1320    ac_prev=x_libraries ;;
1321  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1322  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1323    x_libraries=$ac_optarg ;;
1324
1325  -*) as_fn_error $? "unrecognized option: \`$ac_option'
1326Try \`$0 --help' for more information"
1327    ;;
1328
1329  *=*)
1330    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1331    # Reject names that are not valid shell variable names.
1332    case $ac_envvar in #(
1333      '' | [0-9]* | *[!_$as_cr_alnum]* )
1334      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1335    esac
1336    eval $ac_envvar=\$ac_optarg
1337    export $ac_envvar ;;
1338
1339  *)
1340    # FIXME: should be removed in autoconf 3.0.
1341    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1342    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1343      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1344    : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1345    ;;
1346
1347  esac
1348done
1349
1350if test -n "$ac_prev"; then
1351  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1352  as_fn_error $? "missing argument to $ac_option"
1353fi
1354
1355if test -n "$ac_unrecognized_opts"; then
1356  case $enable_option_checking in
1357    no) ;;
1358    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1359    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1360  esac
1361fi
1362
1363# Check all directory arguments for consistency.
1364for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
1365		datadir sysconfdir sharedstatedir localstatedir includedir \
1366		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1367		libdir localedir mandir runstatedir
1368do
1369  eval ac_val=\$$ac_var
1370  # Remove trailing slashes.
1371  case $ac_val in
1372    */ )
1373      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1374      eval $ac_var=\$ac_val;;
1375  esac
1376  # Be sure to have absolute directory names.
1377  case $ac_val in
1378    [\\/$]* | ?:[\\/]* )  continue;;
1379    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1380  esac
1381  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1382done
1383
1384# There might be people who depend on the old broken behavior: `$host'
1385# used to hold the argument of --host etc.
1386# FIXME: To remove some day.
1387build=$build_alias
1388host=$host_alias
1389target=$target_alias
1390
1391# FIXME: To remove some day.
1392if test "x$host_alias" != x; then
1393  if test "x$build_alias" = x; then
1394    cross_compiling=maybe
1395  elif test "x$build_alias" != "x$host_alias"; then
1396    cross_compiling=yes
1397  fi
1398fi
1399
1400ac_tool_prefix=
1401test -n "$host_alias" && ac_tool_prefix=$host_alias-
1402
1403test "$silent" = yes && exec 6>/dev/null
1404
1405
1406ac_pwd=`pwd` && test -n "$ac_pwd" &&
1407ac_ls_di=`ls -di .` &&
1408ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1409  as_fn_error $? "working directory cannot be determined"
1410test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1411  as_fn_error $? "pwd does not report name of working directory"
1412
1413
1414# Find the source files, if location was not specified.
1415if test -z "$srcdir"; then
1416  ac_srcdir_defaulted=yes
1417  # Try the directory containing this script, then the parent directory.
1418  ac_confdir=`$as_dirname -- "$as_myself" ||
1419$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1420	 X"$as_myself" : 'X\(//\)[^/]' \| \
1421	 X"$as_myself" : 'X\(//\)$' \| \
1422	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1423$as_echo X"$as_myself" |
1424    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1425	    s//\1/
1426	    q
1427	  }
1428	  /^X\(\/\/\)[^/].*/{
1429	    s//\1/
1430	    q
1431	  }
1432	  /^X\(\/\/\)$/{
1433	    s//\1/
1434	    q
1435	  }
1436	  /^X\(\/\).*/{
1437	    s//\1/
1438	    q
1439	  }
1440	  s/.*/./; q'`
1441  srcdir=$ac_confdir
1442  if test ! -r "$srcdir/$ac_unique_file"; then
1443    srcdir=..
1444  fi
1445else
1446  ac_srcdir_defaulted=no
1447fi
1448if test ! -r "$srcdir/$ac_unique_file"; then
1449  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1450  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1451fi
1452ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1453ac_abs_confdir=`(
1454	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1455	pwd)`
1456# When building in place, set srcdir=.
1457if test "$ac_abs_confdir" = "$ac_pwd"; then
1458  srcdir=.
1459fi
1460# Remove unnecessary trailing slashes from srcdir.
1461# Double slashes in file names in object file debugging info
1462# mess up M-x gdb in Emacs.
1463case $srcdir in
1464*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1465esac
1466for ac_var in $ac_precious_vars; do
1467  eval ac_env_${ac_var}_set=\${${ac_var}+set}
1468  eval ac_env_${ac_var}_value=\$${ac_var}
1469  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1470  eval ac_cv_env_${ac_var}_value=\$${ac_var}
1471done
1472
1473#
1474# Report the --help message.
1475#
1476if test "$ac_init_help" = "long"; then
1477  # Omit some internal or obsolete options to make the list less imposing.
1478  # This message is too long to be a string in the A/UX 3.1 sh.
1479  cat <<_ACEOF
1480\`configure' configures unbound 1.16.3 to adapt to many kinds of systems.
1481
1482Usage: $0 [OPTION]... [VAR=VALUE]...
1483
1484To assign environment variables (e.g., CC, CFLAGS...), specify them as
1485VAR=VALUE.  See below for descriptions of some of the useful variables.
1486
1487Defaults for the options are specified in brackets.
1488
1489Configuration:
1490  -h, --help              display this help and exit
1491      --help=short        display options specific to this package
1492      --help=recursive    display the short help of all the included packages
1493  -V, --version           display version information and exit
1494  -q, --quiet, --silent   do not print \`checking ...' messages
1495      --cache-file=FILE   cache test results in FILE [disabled]
1496  -C, --config-cache      alias for \`--cache-file=config.cache'
1497  -n, --no-create         do not create output files
1498      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1499
1500Installation directories:
1501  --prefix=PREFIX         install architecture-independent files in PREFIX
1502                          [$ac_default_prefix]
1503  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1504                          [PREFIX]
1505
1506By default, \`make install' will install all the files in
1507\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1508an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1509for instance \`--prefix=\$HOME'.
1510
1511For better control, use the options below.
1512
1513Fine tuning of the installation directories:
1514  --bindir=DIR            user executables [EPREFIX/bin]
1515  --sbindir=DIR           system admin executables [EPREFIX/sbin]
1516  --libexecdir=DIR        program executables [EPREFIX/libexec]
1517  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1518  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1519  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1520  --runstatedir=DIR       modifiable per-process data [LOCALSTATEDIR/run]
1521  --libdir=DIR            object code libraries [EPREFIX/lib]
1522  --includedir=DIR        C header files [PREFIX/include]
1523  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1524  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1525  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1526  --infodir=DIR           info documentation [DATAROOTDIR/info]
1527  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1528  --mandir=DIR            man documentation [DATAROOTDIR/man]
1529  --docdir=DIR            documentation root [DATAROOTDIR/doc/unbound]
1530  --htmldir=DIR           html documentation [DOCDIR]
1531  --dvidir=DIR            dvi documentation [DOCDIR]
1532  --pdfdir=DIR            pdf documentation [DOCDIR]
1533  --psdir=DIR             ps documentation [DOCDIR]
1534_ACEOF
1535
1536  cat <<\_ACEOF
1537
1538System types:
1539  --build=BUILD     configure for building on BUILD [guessed]
1540  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1541_ACEOF
1542fi
1543
1544if test -n "$ac_init_help"; then
1545  case $ac_init_help in
1546     short | recursive ) echo "Configuration of unbound 1.16.3:";;
1547   esac
1548  cat <<\_ACEOF
1549
1550Optional Features:
1551  --disable-option-checking  ignore unrecognized --enable/--with options
1552  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1553  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1554  --enable-checking       Enable warnings, asserts, makefile-dependencies
1555  --enable-debug          same as enable-checking
1556  --disable-flto          Disable link-time optimization (gcc specific option)
1557  --enable-pie            Enable Position-Independent Executable (eg. to fully
1558                          benefit from ASLR, small performance penalty)
1559  --enable-relro-now      Enable full relocation binding at load-time (RELRO
1560                          NOW, to protect GOT and .dtor areas)
1561  --enable-shared[=PKGS]  build shared libraries [default=yes]
1562  --enable-static[=PKGS]  build static libraries [default=yes]
1563  --enable-fast-install[=PKGS]
1564                          optimize for fast installation [default=yes]
1565  --disable-libtool-lock  avoid locking (might break parallel builds)
1566  --disable-rpath         disable hardcoded rpath (default=enabled)
1567  --disable-largefile     omit support for large files
1568  --enable-systemd        compile with systemd support
1569  --enable-alloc-checks   enable to memory allocation statistics, for debug
1570                          purposes
1571  --enable-alloc-lite     enable for lightweight alloc assertions, for debug
1572                          purposes
1573  --enable-alloc-nonregional
1574                          enable nonregional allocs, slow but exposes regional
1575                          allocations to other memory purifiers, for debug
1576                          purposes
1577  --disable-swig-version-check
1578                          Disable swig version check to build python modules
1579                          with older swig even though that is unreliable
1580  --disable-sha1          Disable SHA1 RRSIG support, does not disable nsec3
1581                          support
1582  --disable-sha2          Disable SHA256 and SHA512 RRSIG support
1583  --enable-subnet         Enable client subnet
1584  --disable-gost          Disable GOST support
1585  --disable-ecdsa         Disable ECDSA support
1586  --disable-dsa           Disable DSA support
1587  --disable-ed25519       Disable ED25519 support
1588  --disable-ed448         Disable ED448 support
1589  --enable-event-api      Enable (experimental) pluggable event base
1590                          libunbound API installed to unbound-event.h
1591  --enable-tfo-client     Enable TCP Fast Open for client mode
1592  --enable-tfo-server     Enable TCP Fast Open for server mode
1593  --enable-static-exe     enable to compile executables statically against
1594                          (event) uninstalled libs, for debug purposes
1595  --enable-fully-static   enable to compile fully static
1596  --enable-lock-checks    enable to check lock and unlock calls, for debug
1597                          purposes
1598  --enable-allsymbols     export all symbols from libunbound and link binaries
1599                          to it, smaller install size but libunbound export
1600                          table is polluted by internal symbols
1601  --enable-dnstap         Enable dnstap support (requires protobuf-c)
1602  --enable-dnscrypt       Enable dnscrypt support (requires libsodium)
1603  --enable-cachedb        enable cachedb module that can use external cache
1604                          storage
1605  --enable-ipsecmod       Enable ipsecmod module that facilitates
1606                          opportunistic IPsec
1607  --enable-ipset          enable ipset module
1608  --disable-explicit-port-randomisation
1609                          disable explicit source port randomisation and rely
1610                          on the kernel to provide random source ports
1611  --enable-linux-ip-local-port-range
1612                          Define this to enable use of
1613                          /proc/sys/net/ipv4/ip_local_port_range as a default
1614                          outgoing port range. This is only for the libunbound
1615                          on Linux and does not affect unbound resolving
1616                          daemon itself. This may severely limit the number of
1617                          available outgoing ports and thus decrease
1618                          randomness. Define this only when the target system
1619                          restricts (e.g. some of SELinux enabled
1620                          distributions) the use of non-ephemeral ports.
1621
1622Optional Packages:
1623  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1624  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1625  --with-conf-file=path   Pathname to the Unbound configuration file
1626  --with-run-dir=path     set default directory to chdir to (by default dir
1627                          part of cfg file)
1628  --with-chroot-dir=path  set default directory to chroot to (by default same
1629                          as run-dir)
1630  --with-share-dir=path   set default directory with shared data (by default
1631                          same as share/unbound)
1632  --with-pidfile=filename set default pathname to unbound pidfile (default
1633                          run-dir/unbound.pid)
1634  --with-rootkey-file=filename
1635                          set default pathname to root key file (default
1636                          run-dir/root.key). This file is read and written.
1637  --with-rootcert-file=filename
1638                          set default pathname to root update certificate file
1639                          (default run-dir/icannbundle.pem). This file need
1640                          not exist if you are content with the builtin.
1641  --with-username=user    set default user that unbound changes to (default
1642                          user is unbound)
1643  --with-pic[=PKGS]       try to use only PIC/non-PIC objects [default=use
1644                          both]
1645  --with-aix-soname=aix|svr4|both
1646                          shared library versioning (aka "SONAME") variant to
1647                          provide on AIX, [default=aix].
1648  --with-gnu-ld           assume the C compiler uses GNU ld [default=no]
1649  --with-sysroot[=DIR]    Search for dependent libraries within DIR (or the
1650                          compiler's sysroot if not specified).
1651  --with-pthreads         use pthreads library, or --without-pthreads to
1652                          disable threading support.
1653  --with-solaris-threads  use solaris native thread library.
1654  --with-syslog-facility=LOCAL0 - LOCAL7
1655                          set SYSLOG_FACILITY, default DAEMON
1656  --with-dynlibmodule     build dynamic library module, or
1657                          --without-dynlibmodule to disable it. (default=no)
1658  --with-pyunbound        build PyUnbound, or --without-pyunbound to skip it.
1659                          (default=no)
1660  --with-pythonmodule     build Python module, or --without-pythonmodule to
1661                          disable script engine. (default=no)
1662  --with-nss=path         use libnss instead of openssl, installed at path.
1663  --with-nettle=path      use libnettle as crypto library, installed at path.
1664  --with-ssl=pathname     enable SSL (will check /usr/local/ssl /usr/lib/ssl
1665                          /usr/ssl /usr/pkg /usr/local /opt/local /usr/sfw
1666                          /usr or specify like /usr/include/openssl11)
1667  --with-libbsd           Use portable libbsd functions
1668  --with-deprecate-rsa-1024
1669                          Deprecate RSA 1024 bit length, makes that an
1670                          unsupported key, for use when OpenSSL FIPS refuses
1671                          1024 bit verification
1672  --with-libevent=pathname
1673                          use libevent (will check /usr/local /opt/local
1674                          /usr/lib /usr/pkg /usr/sfw /usr or you can specify
1675                          an explicit path). Slower, but allows use of large
1676                          outgoing port ranges.
1677  --with-libexpat=path    specify explicit path for libexpat.
1678  --with-libhiredis=path  specify explicit path for libhiredis.
1679  --with-libnghttp2=path  specify explicit path for libnghttp2.
1680  --with-dnstap-socket-path=pathname
1681                          set default dnstap socket path
1682  --with-protobuf-c=path  Path where protobuf-c is installed, for dnstap
1683  --with-libsodium=path   Path where libsodium is installed, for dnscrypt
1684  --with-libmnl=path      specify explicit path for libmnl.
1685  --with-libunbound-only  do not build daemon and tool programs
1686
1687Some influential environment variables:
1688  CC          C compiler command
1689  CFLAGS      C compiler flags
1690  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
1691              nonstandard directory <lib dir>
1692  LIBS        libraries to pass to the linker, e.g. -l<library>
1693  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1694              you have headers in a nonstandard directory <include dir>
1695  CPP         C preprocessor
1696  YACC        The `Yet Another Compiler Compiler' implementation to use.
1697              Defaults to the first program found out of: `bison -y', `byacc',
1698              `yacc'.
1699  YFLAGS      The list of arguments that will be passed by default to $YACC.
1700              This script will default YFLAGS to the empty string to avoid a
1701              default value of `-d' given by some make applications.
1702  LT_SYS_LIBRARY_PATH
1703              User-defined run-time library search path.
1704  PKG_CONFIG  path to pkg-config utility
1705  PKG_CONFIG_PATH
1706              directories to add to pkg-config's search path
1707  PKG_CONFIG_LIBDIR
1708              path overriding pkg-config's built-in search path
1709  SYSTEMD_CFLAGS
1710              C compiler flags for SYSTEMD, overriding pkg-config
1711  SYSTEMD_LIBS
1712              linker flags for SYSTEMD, overriding pkg-config
1713  SYSTEMD_DAEMON_CFLAGS
1714              C compiler flags for SYSTEMD_DAEMON, overriding pkg-config
1715  SYSTEMD_DAEMON_LIBS
1716              linker flags for SYSTEMD_DAEMON, overriding pkg-config
1717  PYTHON_VERSION
1718              The installed Python version to use, for example '2.3'. This
1719              string will be appended to the Python interpreter canonical
1720              name.
1721
1722Use these variables to override the choices made by `configure' or to help
1723it to find libraries and programs with nonstandard names/locations.
1724
1725Report bugs to <unbound-bugs@nlnetlabs.nl or https://github.com/NLnetLabs/unbound/issues>.
1726_ACEOF
1727ac_status=$?
1728fi
1729
1730if test "$ac_init_help" = "recursive"; then
1731  # If there are subdirs, report their specific --help.
1732  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1733    test -d "$ac_dir" ||
1734      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1735      continue
1736    ac_builddir=.
1737
1738case "$ac_dir" in
1739.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1740*)
1741  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1742  # A ".." for each directory in $ac_dir_suffix.
1743  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1744  case $ac_top_builddir_sub in
1745  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1746  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1747  esac ;;
1748esac
1749ac_abs_top_builddir=$ac_pwd
1750ac_abs_builddir=$ac_pwd$ac_dir_suffix
1751# for backward compatibility:
1752ac_top_builddir=$ac_top_build_prefix
1753
1754case $srcdir in
1755  .)  # We are building in place.
1756    ac_srcdir=.
1757    ac_top_srcdir=$ac_top_builddir_sub
1758    ac_abs_top_srcdir=$ac_pwd ;;
1759  [\\/]* | ?:[\\/]* )  # Absolute name.
1760    ac_srcdir=$srcdir$ac_dir_suffix;
1761    ac_top_srcdir=$srcdir
1762    ac_abs_top_srcdir=$srcdir ;;
1763  *) # Relative name.
1764    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1765    ac_top_srcdir=$ac_top_build_prefix$srcdir
1766    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1767esac
1768ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1769
1770    cd "$ac_dir" || { ac_status=$?; continue; }
1771    # Check for guested configure.
1772    if test -f "$ac_srcdir/configure.gnu"; then
1773      echo &&
1774      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1775    elif test -f "$ac_srcdir/configure"; then
1776      echo &&
1777      $SHELL "$ac_srcdir/configure" --help=recursive
1778    else
1779      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1780    fi || ac_status=$?
1781    cd "$ac_pwd" || { ac_status=$?; break; }
1782  done
1783fi
1784
1785test -n "$ac_init_help" && exit $ac_status
1786if $ac_init_version; then
1787  cat <<\_ACEOF
1788unbound configure 1.16.3
1789generated by GNU Autoconf 2.69
1790
1791Copyright (C) 2012 Free Software Foundation, Inc.
1792This configure script is free software; the Free Software Foundation
1793gives unlimited permission to copy, distribute and modify it.
1794_ACEOF
1795  exit
1796fi
1797
1798## ------------------------ ##
1799## Autoconf initialization. ##
1800## ------------------------ ##
1801
1802# ac_fn_c_try_compile LINENO
1803# --------------------------
1804# Try to compile conftest.$ac_ext, and return whether this succeeded.
1805ac_fn_c_try_compile ()
1806{
1807  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1808  rm -f conftest.$ac_objext
1809  if { { ac_try="$ac_compile"
1810case "(($ac_try" in
1811  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1812  *) ac_try_echo=$ac_try;;
1813esac
1814eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1815$as_echo "$ac_try_echo"; } >&5
1816  (eval "$ac_compile") 2>conftest.err
1817  ac_status=$?
1818  if test -s conftest.err; then
1819    grep -v '^ *+' conftest.err >conftest.er1
1820    cat conftest.er1 >&5
1821    mv -f conftest.er1 conftest.err
1822  fi
1823  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1824  test $ac_status = 0; } && {
1825	 test -z "$ac_c_werror_flag" ||
1826	 test ! -s conftest.err
1827       } && test -s conftest.$ac_objext; then :
1828  ac_retval=0
1829else
1830  $as_echo "$as_me: failed program was:" >&5
1831sed 's/^/| /' conftest.$ac_ext >&5
1832
1833	ac_retval=1
1834fi
1835  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1836  as_fn_set_status $ac_retval
1837
1838} # ac_fn_c_try_compile
1839
1840# ac_fn_c_try_cpp LINENO
1841# ----------------------
1842# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1843ac_fn_c_try_cpp ()
1844{
1845  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1846  if { { ac_try="$ac_cpp conftest.$ac_ext"
1847case "(($ac_try" in
1848  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1849  *) ac_try_echo=$ac_try;;
1850esac
1851eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1852$as_echo "$ac_try_echo"; } >&5
1853  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1854  ac_status=$?
1855  if test -s conftest.err; then
1856    grep -v '^ *+' conftest.err >conftest.er1
1857    cat conftest.er1 >&5
1858    mv -f conftest.er1 conftest.err
1859  fi
1860  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1861  test $ac_status = 0; } > conftest.i && {
1862	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1863	 test ! -s conftest.err
1864       }; then :
1865  ac_retval=0
1866else
1867  $as_echo "$as_me: failed program was:" >&5
1868sed 's/^/| /' conftest.$ac_ext >&5
1869
1870    ac_retval=1
1871fi
1872  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1873  as_fn_set_status $ac_retval
1874
1875} # ac_fn_c_try_cpp
1876
1877# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1878# -------------------------------------------------------
1879# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1880# the include files in INCLUDES and setting the cache variable VAR
1881# accordingly.
1882ac_fn_c_check_header_mongrel ()
1883{
1884  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1885  if eval \${$3+:} false; then :
1886  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1887$as_echo_n "checking for $2... " >&6; }
1888if eval \${$3+:} false; then :
1889  $as_echo_n "(cached) " >&6
1890fi
1891eval ac_res=\$$3
1892	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1893$as_echo "$ac_res" >&6; }
1894else
1895  # Is the header compilable?
1896{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1897$as_echo_n "checking $2 usability... " >&6; }
1898cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1899/* end confdefs.h.  */
1900$4
1901#include <$2>
1902_ACEOF
1903if ac_fn_c_try_compile "$LINENO"; then :
1904  ac_header_compiler=yes
1905else
1906  ac_header_compiler=no
1907fi
1908rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1909{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1910$as_echo "$ac_header_compiler" >&6; }
1911
1912# Is the header present?
1913{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1914$as_echo_n "checking $2 presence... " >&6; }
1915cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1916/* end confdefs.h.  */
1917#include <$2>
1918_ACEOF
1919if ac_fn_c_try_cpp "$LINENO"; then :
1920  ac_header_preproc=yes
1921else
1922  ac_header_preproc=no
1923fi
1924rm -f conftest.err conftest.i conftest.$ac_ext
1925{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1926$as_echo "$ac_header_preproc" >&6; }
1927
1928# So?  What about this header?
1929case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1930  yes:no: )
1931    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1932$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1933    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1934$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1935    ;;
1936  no:yes:* )
1937    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1938$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1939    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
1940$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
1941    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1942$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1943    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
1944$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
1945    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1946$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1947( $as_echo "## --------------------------------------------------------------------------------------- ##
1948## Report this to unbound-bugs@nlnetlabs.nl or https://github.com/NLnetLabs/unbound/issues ##
1949## --------------------------------------------------------------------------------------- ##"
1950     ) | sed "s/^/$as_me: WARNING:     /" >&2
1951    ;;
1952esac
1953  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1954$as_echo_n "checking for $2... " >&6; }
1955if eval \${$3+:} false; then :
1956  $as_echo_n "(cached) " >&6
1957else
1958  eval "$3=\$ac_header_compiler"
1959fi
1960eval ac_res=\$$3
1961	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1962$as_echo "$ac_res" >&6; }
1963fi
1964  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1965
1966} # ac_fn_c_check_header_mongrel
1967
1968# ac_fn_c_try_run LINENO
1969# ----------------------
1970# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1971# that executables *can* be run.
1972ac_fn_c_try_run ()
1973{
1974  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1975  if { { ac_try="$ac_link"
1976case "(($ac_try" in
1977  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1978  *) ac_try_echo=$ac_try;;
1979esac
1980eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1981$as_echo "$ac_try_echo"; } >&5
1982  (eval "$ac_link") 2>&5
1983  ac_status=$?
1984  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1985  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1986  { { case "(($ac_try" in
1987  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1988  *) ac_try_echo=$ac_try;;
1989esac
1990eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1991$as_echo "$ac_try_echo"; } >&5
1992  (eval "$ac_try") 2>&5
1993  ac_status=$?
1994  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1995  test $ac_status = 0; }; }; then :
1996  ac_retval=0
1997else
1998  $as_echo "$as_me: program exited with status $ac_status" >&5
1999       $as_echo "$as_me: failed program was:" >&5
2000sed 's/^/| /' conftest.$ac_ext >&5
2001
2002       ac_retval=$ac_status
2003fi
2004  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2005  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2006  as_fn_set_status $ac_retval
2007
2008} # ac_fn_c_try_run
2009
2010# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2011# -------------------------------------------------------
2012# Tests whether HEADER exists and can be compiled using the include files in
2013# INCLUDES, setting the cache variable VAR accordingly.
2014ac_fn_c_check_header_compile ()
2015{
2016  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2017  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2018$as_echo_n "checking for $2... " >&6; }
2019if eval \${$3+:} false; then :
2020  $as_echo_n "(cached) " >&6
2021else
2022  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2023/* end confdefs.h.  */
2024$4
2025#include <$2>
2026_ACEOF
2027if ac_fn_c_try_compile "$LINENO"; then :
2028  eval "$3=yes"
2029else
2030  eval "$3=no"
2031fi
2032rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2033fi
2034eval ac_res=\$$3
2035	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2036$as_echo "$ac_res" >&6; }
2037  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2038
2039} # ac_fn_c_check_header_compile
2040
2041# ac_fn_c_try_link LINENO
2042# -----------------------
2043# Try to link conftest.$ac_ext, and return whether this succeeded.
2044ac_fn_c_try_link ()
2045{
2046  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2047  rm -f conftest.$ac_objext conftest$ac_exeext
2048  if { { ac_try="$ac_link"
2049case "(($ac_try" in
2050  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2051  *) ac_try_echo=$ac_try;;
2052esac
2053eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2054$as_echo "$ac_try_echo"; } >&5
2055  (eval "$ac_link") 2>conftest.err
2056  ac_status=$?
2057  if test -s conftest.err; then
2058    grep -v '^ *+' conftest.err >conftest.er1
2059    cat conftest.er1 >&5
2060    mv -f conftest.er1 conftest.err
2061  fi
2062  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2063  test $ac_status = 0; } && {
2064	 test -z "$ac_c_werror_flag" ||
2065	 test ! -s conftest.err
2066       } && test -s conftest$ac_exeext && {
2067	 test "$cross_compiling" = yes ||
2068	 test -x conftest$ac_exeext
2069       }; then :
2070  ac_retval=0
2071else
2072  $as_echo "$as_me: failed program was:" >&5
2073sed 's/^/| /' conftest.$ac_ext >&5
2074
2075	ac_retval=1
2076fi
2077  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2078  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2079  # interfere with the next link command; also delete a directory that is
2080  # left behind by Apple's compiler.  We do this before executing the actions.
2081  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2082  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2083  as_fn_set_status $ac_retval
2084
2085} # ac_fn_c_try_link
2086
2087# ac_fn_c_check_func LINENO FUNC VAR
2088# ----------------------------------
2089# Tests whether FUNC exists, setting the cache variable VAR accordingly
2090ac_fn_c_check_func ()
2091{
2092  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2093  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2094$as_echo_n "checking for $2... " >&6; }
2095if eval \${$3+:} false; then :
2096  $as_echo_n "(cached) " >&6
2097else
2098  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2099/* end confdefs.h.  */
2100/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2101   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2102#define $2 innocuous_$2
2103
2104/* System header to define __stub macros and hopefully few prototypes,
2105    which can conflict with char $2 (); below.
2106    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2107    <limits.h> exists even on freestanding compilers.  */
2108
2109#ifdef __STDC__
2110# include <limits.h>
2111#else
2112# include <assert.h>
2113#endif
2114
2115#undef $2
2116
2117/* Override any GCC internal prototype to avoid an error.
2118   Use char because int might match the return type of a GCC
2119   builtin and then its argument prototype would still apply.  */
2120#ifdef __cplusplus
2121extern "C"
2122#endif
2123char $2 ();
2124/* The GNU C library defines this for functions which it implements
2125    to always fail with ENOSYS.  Some functions are actually named
2126    something starting with __ and the normal name is an alias.  */
2127#if defined __stub_$2 || defined __stub___$2
2128choke me
2129#endif
2130
2131int
2132main ()
2133{
2134return $2 ();
2135  ;
2136  return 0;
2137}
2138_ACEOF
2139if ac_fn_c_try_link "$LINENO"; then :
2140  eval "$3=yes"
2141else
2142  eval "$3=no"
2143fi
2144rm -f core conftest.err conftest.$ac_objext \
2145    conftest$ac_exeext conftest.$ac_ext
2146fi
2147eval ac_res=\$$3
2148	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2149$as_echo "$ac_res" >&6; }
2150  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2151
2152} # ac_fn_c_check_func
2153
2154# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2155# -------------------------------------------
2156# Tests whether TYPE exists after having included INCLUDES, setting cache
2157# variable VAR accordingly.
2158ac_fn_c_check_type ()
2159{
2160  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2161  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2162$as_echo_n "checking for $2... " >&6; }
2163if eval \${$3+:} false; then :
2164  $as_echo_n "(cached) " >&6
2165else
2166  eval "$3=no"
2167  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2168/* end confdefs.h.  */
2169$4
2170int
2171main ()
2172{
2173if (sizeof ($2))
2174	 return 0;
2175  ;
2176  return 0;
2177}
2178_ACEOF
2179if ac_fn_c_try_compile "$LINENO"; then :
2180  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2181/* end confdefs.h.  */
2182$4
2183int
2184main ()
2185{
2186if (sizeof (($2)))
2187	    return 0;
2188  ;
2189  return 0;
2190}
2191_ACEOF
2192if ac_fn_c_try_compile "$LINENO"; then :
2193
2194else
2195  eval "$3=yes"
2196fi
2197rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2198fi
2199rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2200fi
2201eval ac_res=\$$3
2202	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2203$as_echo "$ac_res" >&6; }
2204  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2205
2206} # ac_fn_c_check_type
2207
2208# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2209# --------------------------------------------
2210# Tries to find the compile-time value of EXPR in a program that includes
2211# INCLUDES, setting VAR accordingly. Returns whether the value could be
2212# computed
2213ac_fn_c_compute_int ()
2214{
2215  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2216  if test "$cross_compiling" = yes; then
2217    # Depending upon the size, compute the lo and hi bounds.
2218cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2219/* end confdefs.h.  */
2220$4
2221int
2222main ()
2223{
2224static int test_array [1 - 2 * !(($2) >= 0)];
2225test_array [0] = 0;
2226return test_array [0];
2227
2228  ;
2229  return 0;
2230}
2231_ACEOF
2232if ac_fn_c_try_compile "$LINENO"; then :
2233  ac_lo=0 ac_mid=0
2234  while :; do
2235    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2236/* end confdefs.h.  */
2237$4
2238int
2239main ()
2240{
2241static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2242test_array [0] = 0;
2243return test_array [0];
2244
2245  ;
2246  return 0;
2247}
2248_ACEOF
2249if ac_fn_c_try_compile "$LINENO"; then :
2250  ac_hi=$ac_mid; break
2251else
2252  as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2253			if test $ac_lo -le $ac_mid; then
2254			  ac_lo= ac_hi=
2255			  break
2256			fi
2257			as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2258fi
2259rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2260  done
2261else
2262  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2263/* end confdefs.h.  */
2264$4
2265int
2266main ()
2267{
2268static int test_array [1 - 2 * !(($2) < 0)];
2269test_array [0] = 0;
2270return test_array [0];
2271
2272  ;
2273  return 0;
2274}
2275_ACEOF
2276if ac_fn_c_try_compile "$LINENO"; then :
2277  ac_hi=-1 ac_mid=-1
2278  while :; do
2279    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2280/* end confdefs.h.  */
2281$4
2282int
2283main ()
2284{
2285static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2286test_array [0] = 0;
2287return test_array [0];
2288
2289  ;
2290  return 0;
2291}
2292_ACEOF
2293if ac_fn_c_try_compile "$LINENO"; then :
2294  ac_lo=$ac_mid; break
2295else
2296  as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2297			if test $ac_mid -le $ac_hi; then
2298			  ac_lo= ac_hi=
2299			  break
2300			fi
2301			as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2302fi
2303rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2304  done
2305else
2306  ac_lo= ac_hi=
2307fi
2308rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2309fi
2310rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2311# Binary search between lo and hi bounds.
2312while test "x$ac_lo" != "x$ac_hi"; do
2313  as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2314  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2315/* end confdefs.h.  */
2316$4
2317int
2318main ()
2319{
2320static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2321test_array [0] = 0;
2322return test_array [0];
2323
2324  ;
2325  return 0;
2326}
2327_ACEOF
2328if ac_fn_c_try_compile "$LINENO"; then :
2329  ac_hi=$ac_mid
2330else
2331  as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2332fi
2333rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2334done
2335case $ac_lo in #((
2336?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2337'') ac_retval=1 ;;
2338esac
2339  else
2340    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2341/* end confdefs.h.  */
2342$4
2343static long int longval () { return $2; }
2344static unsigned long int ulongval () { return $2; }
2345#include <stdio.h>
2346#include <stdlib.h>
2347int
2348main ()
2349{
2350
2351  FILE *f = fopen ("conftest.val", "w");
2352  if (! f)
2353    return 1;
2354  if (($2) < 0)
2355    {
2356      long int i = longval ();
2357      if (i != ($2))
2358	return 1;
2359      fprintf (f, "%ld", i);
2360    }
2361  else
2362    {
2363      unsigned long int i = ulongval ();
2364      if (i != ($2))
2365	return 1;
2366      fprintf (f, "%lu", i);
2367    }
2368  /* Do not output a trailing newline, as this causes \r\n confusion
2369     on some platforms.  */
2370  return ferror (f) || fclose (f) != 0;
2371
2372  ;
2373  return 0;
2374}
2375_ACEOF
2376if ac_fn_c_try_run "$LINENO"; then :
2377  echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2378else
2379  ac_retval=1
2380fi
2381rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2382  conftest.$ac_objext conftest.beam conftest.$ac_ext
2383rm -f conftest.val
2384
2385  fi
2386  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2387  as_fn_set_status $ac_retval
2388
2389} # ac_fn_c_compute_int
2390
2391# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2392# ---------------------------------------------
2393# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2394# accordingly.
2395ac_fn_c_check_decl ()
2396{
2397  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2398  as_decl_name=`echo $2|sed 's/ *(.*//'`
2399  as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2400  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2401$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2402if eval \${$3+:} false; then :
2403  $as_echo_n "(cached) " >&6
2404else
2405  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2406/* end confdefs.h.  */
2407$4
2408int
2409main ()
2410{
2411#ifndef $as_decl_name
2412#ifdef __cplusplus
2413  (void) $as_decl_use;
2414#else
2415  (void) $as_decl_name;
2416#endif
2417#endif
2418
2419  ;
2420  return 0;
2421}
2422_ACEOF
2423if ac_fn_c_try_compile "$LINENO"; then :
2424  eval "$3=yes"
2425else
2426  eval "$3=no"
2427fi
2428rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2429fi
2430eval ac_res=\$$3
2431	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2432$as_echo "$ac_res" >&6; }
2433  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2434
2435} # ac_fn_c_check_decl
2436
2437# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2438# ----------------------------------------------------
2439# Tries to find if the field MEMBER exists in type AGGR, after including
2440# INCLUDES, setting cache variable VAR accordingly.
2441ac_fn_c_check_member ()
2442{
2443  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2444  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2445$as_echo_n "checking for $2.$3... " >&6; }
2446if eval \${$4+:} false; then :
2447  $as_echo_n "(cached) " >&6
2448else
2449  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2450/* end confdefs.h.  */
2451$5
2452int
2453main ()
2454{
2455static $2 ac_aggr;
2456if (ac_aggr.$3)
2457return 0;
2458  ;
2459  return 0;
2460}
2461_ACEOF
2462if ac_fn_c_try_compile "$LINENO"; then :
2463  eval "$4=yes"
2464else
2465  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2466/* end confdefs.h.  */
2467$5
2468int
2469main ()
2470{
2471static $2 ac_aggr;
2472if (sizeof ac_aggr.$3)
2473return 0;
2474  ;
2475  return 0;
2476}
2477_ACEOF
2478if ac_fn_c_try_compile "$LINENO"; then :
2479  eval "$4=yes"
2480else
2481  eval "$4=no"
2482fi
2483rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2484fi
2485rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2486fi
2487eval ac_res=\$$4
2488	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2489$as_echo "$ac_res" >&6; }
2490  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2491
2492} # ac_fn_c_check_member
2493cat >config.log <<_ACEOF
2494This file contains any messages produced by compilers while
2495running configure, to aid debugging if configure makes a mistake.
2496
2497It was created by unbound $as_me 1.16.3, which was
2498generated by GNU Autoconf 2.69.  Invocation command line was
2499
2500  $ $0 $@
2501
2502_ACEOF
2503exec 5>>config.log
2504{
2505cat <<_ASUNAME
2506## --------- ##
2507## Platform. ##
2508## --------- ##
2509
2510hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2511uname -m = `(uname -m) 2>/dev/null || echo unknown`
2512uname -r = `(uname -r) 2>/dev/null || echo unknown`
2513uname -s = `(uname -s) 2>/dev/null || echo unknown`
2514uname -v = `(uname -v) 2>/dev/null || echo unknown`
2515
2516/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2517/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2518
2519/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2520/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2521/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2522/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2523/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2524/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2525/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2526
2527_ASUNAME
2528
2529as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2530for as_dir in $PATH
2531do
2532  IFS=$as_save_IFS
2533  test -z "$as_dir" && as_dir=.
2534    $as_echo "PATH: $as_dir"
2535  done
2536IFS=$as_save_IFS
2537
2538} >&5
2539
2540cat >&5 <<_ACEOF
2541
2542
2543## ----------- ##
2544## Core tests. ##
2545## ----------- ##
2546
2547_ACEOF
2548
2549
2550# Keep a trace of the command line.
2551# Strip out --no-create and --no-recursion so they do not pile up.
2552# Strip out --silent because we don't want to record it for future runs.
2553# Also quote any args containing shell meta-characters.
2554# Make two passes to allow for proper duplicate-argument suppression.
2555ac_configure_args=
2556ac_configure_args0=
2557ac_configure_args1=
2558ac_must_keep_next=false
2559for ac_pass in 1 2
2560do
2561  for ac_arg
2562  do
2563    case $ac_arg in
2564    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2565    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2566    | -silent | --silent | --silen | --sile | --sil)
2567      continue ;;
2568    *\'*)
2569      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2570    esac
2571    case $ac_pass in
2572    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2573    2)
2574      as_fn_append ac_configure_args1 " '$ac_arg'"
2575      if test $ac_must_keep_next = true; then
2576	ac_must_keep_next=false # Got value, back to normal.
2577      else
2578	case $ac_arg in
2579	  *=* | --config-cache | -C | -disable-* | --disable-* \
2580	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2581	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2582	  | -with-* | --with-* | -without-* | --without-* | --x)
2583	    case "$ac_configure_args0 " in
2584	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2585	    esac
2586	    ;;
2587	  -* ) ac_must_keep_next=true ;;
2588	esac
2589      fi
2590      as_fn_append ac_configure_args " '$ac_arg'"
2591      ;;
2592    esac
2593  done
2594done
2595{ ac_configure_args0=; unset ac_configure_args0;}
2596{ ac_configure_args1=; unset ac_configure_args1;}
2597
2598# When interrupted or exit'd, cleanup temporary files, and complete
2599# config.log.  We remove comments because anyway the quotes in there
2600# would cause problems or look ugly.
2601# WARNING: Use '\'' to represent an apostrophe within the trap.
2602# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2603trap 'exit_status=$?
2604  # Save into config.log some information that might help in debugging.
2605  {
2606    echo
2607
2608    $as_echo "## ---------------- ##
2609## Cache variables. ##
2610## ---------------- ##"
2611    echo
2612    # The following way of writing the cache mishandles newlines in values,
2613(
2614  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2615    eval ac_val=\$$ac_var
2616    case $ac_val in #(
2617    *${as_nl}*)
2618      case $ac_var in #(
2619      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2620$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2621      esac
2622      case $ac_var in #(
2623      _ | IFS | as_nl) ;; #(
2624      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2625      *) { eval $ac_var=; unset $ac_var;} ;;
2626      esac ;;
2627    esac
2628  done
2629  (set) 2>&1 |
2630    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2631    *${as_nl}ac_space=\ *)
2632      sed -n \
2633	"s/'\''/'\''\\\\'\'''\''/g;
2634	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2635      ;; #(
2636    *)
2637      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2638      ;;
2639    esac |
2640    sort
2641)
2642    echo
2643
2644    $as_echo "## ----------------- ##
2645## Output variables. ##
2646## ----------------- ##"
2647    echo
2648    for ac_var in $ac_subst_vars
2649    do
2650      eval ac_val=\$$ac_var
2651      case $ac_val in
2652      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2653      esac
2654      $as_echo "$ac_var='\''$ac_val'\''"
2655    done | sort
2656    echo
2657
2658    if test -n "$ac_subst_files"; then
2659      $as_echo "## ------------------- ##
2660## File substitutions. ##
2661## ------------------- ##"
2662      echo
2663      for ac_var in $ac_subst_files
2664      do
2665	eval ac_val=\$$ac_var
2666	case $ac_val in
2667	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2668	esac
2669	$as_echo "$ac_var='\''$ac_val'\''"
2670      done | sort
2671      echo
2672    fi
2673
2674    if test -s confdefs.h; then
2675      $as_echo "## ----------- ##
2676## confdefs.h. ##
2677## ----------- ##"
2678      echo
2679      cat confdefs.h
2680      echo
2681    fi
2682    test "$ac_signal" != 0 &&
2683      $as_echo "$as_me: caught signal $ac_signal"
2684    $as_echo "$as_me: exit $exit_status"
2685  } >&5
2686  rm -f core *.core core.conftest.* &&
2687    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2688    exit $exit_status
2689' 0
2690for ac_signal in 1 2 13 15; do
2691  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2692done
2693ac_signal=0
2694
2695# confdefs.h avoids OS command line length limits that DEFS can exceed.
2696rm -f -r conftest* confdefs.h
2697
2698$as_echo "/* confdefs.h */" > confdefs.h
2699
2700# Predefined preprocessor variables.
2701
2702cat >>confdefs.h <<_ACEOF
2703#define PACKAGE_NAME "$PACKAGE_NAME"
2704_ACEOF
2705
2706cat >>confdefs.h <<_ACEOF
2707#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2708_ACEOF
2709
2710cat >>confdefs.h <<_ACEOF
2711#define PACKAGE_VERSION "$PACKAGE_VERSION"
2712_ACEOF
2713
2714cat >>confdefs.h <<_ACEOF
2715#define PACKAGE_STRING "$PACKAGE_STRING"
2716_ACEOF
2717
2718cat >>confdefs.h <<_ACEOF
2719#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2720_ACEOF
2721
2722cat >>confdefs.h <<_ACEOF
2723#define PACKAGE_URL "$PACKAGE_URL"
2724_ACEOF
2725
2726
2727# Let the site file select an alternate cache file if it wants to.
2728# Prefer an explicitly selected file to automatically selected ones.
2729ac_site_file1=NONE
2730ac_site_file2=NONE
2731if test -n "$CONFIG_SITE"; then
2732  # We do not want a PATH search for config.site.
2733  case $CONFIG_SITE in #((
2734    -*)  ac_site_file1=./$CONFIG_SITE;;
2735    */*) ac_site_file1=$CONFIG_SITE;;
2736    *)   ac_site_file1=./$CONFIG_SITE;;
2737  esac
2738elif test "x$prefix" != xNONE; then
2739  ac_site_file1=$prefix/share/config.site
2740  ac_site_file2=$prefix/etc/config.site
2741else
2742  ac_site_file1=$ac_default_prefix/share/config.site
2743  ac_site_file2=$ac_default_prefix/etc/config.site
2744fi
2745for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2746do
2747  test "x$ac_site_file" = xNONE && continue
2748  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2749    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2750$as_echo "$as_me: loading site script $ac_site_file" >&6;}
2751    sed 's/^/| /' "$ac_site_file" >&5
2752    . "$ac_site_file" \
2753      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2754$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2755as_fn_error $? "failed to load site script $ac_site_file
2756See \`config.log' for more details" "$LINENO" 5; }
2757  fi
2758done
2759
2760if test -r "$cache_file"; then
2761  # Some versions of bash will fail to source /dev/null (special files
2762  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
2763  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2764    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2765$as_echo "$as_me: loading cache $cache_file" >&6;}
2766    case $cache_file in
2767      [\\/]* | ?:[\\/]* ) . "$cache_file";;
2768      *)                      . "./$cache_file";;
2769    esac
2770  fi
2771else
2772  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2773$as_echo "$as_me: creating cache $cache_file" >&6;}
2774  >$cache_file
2775fi
2776
2777# Check that the precious variables saved in the cache have kept the same
2778# value.
2779ac_cache_corrupted=false
2780for ac_var in $ac_precious_vars; do
2781  eval ac_old_set=\$ac_cv_env_${ac_var}_set
2782  eval ac_new_set=\$ac_env_${ac_var}_set
2783  eval ac_old_val=\$ac_cv_env_${ac_var}_value
2784  eval ac_new_val=\$ac_env_${ac_var}_value
2785  case $ac_old_set,$ac_new_set in
2786    set,)
2787      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2788$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2789      ac_cache_corrupted=: ;;
2790    ,set)
2791      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2792$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2793      ac_cache_corrupted=: ;;
2794    ,);;
2795    *)
2796      if test "x$ac_old_val" != "x$ac_new_val"; then
2797	# differences in whitespace do not lead to failure.
2798	ac_old_val_w=`echo x $ac_old_val`
2799	ac_new_val_w=`echo x $ac_new_val`
2800	if test "$ac_old_val_w" != "$ac_new_val_w"; then
2801	  { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2802$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2803	  ac_cache_corrupted=:
2804	else
2805	  { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2806$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2807	  eval $ac_var=\$ac_old_val
2808	fi
2809	{ $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
2810$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
2811	{ $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
2812$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
2813      fi;;
2814  esac
2815  # Pass precious variables to config.status.
2816  if test "$ac_new_set" = set; then
2817    case $ac_new_val in
2818    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2819    *) ac_arg=$ac_var=$ac_new_val ;;
2820    esac
2821    case " $ac_configure_args " in
2822      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
2823      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2824    esac
2825  fi
2826done
2827if $ac_cache_corrupted; then
2828  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2829$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2830  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2831$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2832  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2833fi
2834## -------------------- ##
2835## Main body of script. ##
2836## -------------------- ##
2837
2838ac_ext=c
2839ac_cpp='$CPP $CPPFLAGS'
2840ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2841ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2842ac_compiler_gnu=$ac_cv_c_compiler_gnu
2843
2844
2845UNBOUND_VERSION_MAJOR=1
2846
2847UNBOUND_VERSION_MINOR=16
2848
2849UNBOUND_VERSION_MICRO=3
2850
2851
2852LIBUNBOUND_CURRENT=9
2853LIBUNBOUND_REVISION=19
2854LIBUNBOUND_AGE=1
2855# 1.0.0 had 0:12:0
2856# 1.0.1 had 0:13:0
2857# 1.0.2 had 0:14:0
2858# 1.1.0 had 0:15:0
2859# 1.1.1 had 0:16:0
2860# 1.2.0 had 0:17:0
2861# 1.2.1 had 0:18:0
2862# 1.3.0 had 1:0:0   # ub_cancel and -export-symbols.
2863# 1.3.1 had 1:1:0
2864# 1.3.2 had 1:2:0
2865# 1.3.3 had 1:3:0
2866# 1.3.4 had 1:4:0
2867# 1.4.0-snapshots had 1:5:0
2868# 1.4.0 had 1:5:0 (not 2:0:0)   # ub_result.why_bogus
2869# 1.4.1 had 2:1:0
2870# 1.4.2 had 2:2:0
2871# 1.4.3 had 2:3:0
2872# 1.4.4 had 2:4:0
2873# 1.4.5 had 2:5:0
2874# 1.4.6 had 2:6:0
2875# 1.4.7 had 2:7:0
2876# 1.4.8 had 2:8:0
2877# 1.4.9 had 2:9:0
2878# 1.4.10 had 2:10:0
2879# 1.4.11 had 2:11:0
2880# 1.4.12 had 2:12:0
2881# 1.4.13 had 2:13:0
2882# and 1.4.13p1 and 1.4.13.p2
2883# 1.4.14 had 2:14:0
2884# 1.4.15 had 3:0:1 # adds ub_version()
2885# 1.4.16 had 3:1:1
2886# 1.4.17 had 3:2:1
2887# 1.4.18 had 3:3:1
2888# 1.4.19 had 3:4:1
2889# 1.4.20 had 4:0:2 # adds libunbound.ttl # but shipped 3:5:1
2890# 1.4.21 had 4:1:2
2891# 1.4.22 had 4:1:2
2892# 1.5.0 had 5:3:3 # adds ub_ctx_add_ta_autr
2893# 1.5.1 had 5:3:3
2894# 1.5.2 had 5:5:3
2895# 1.5.3 had 5:6:3
2896# 1.5.4 had 5:7:3
2897# 1.5.5 had 5:8:3
2898# 1.5.6 had 5:9:3
2899# 1.5.7 had 5:10:3
2900# 1.5.8 had 6:0:4 # adds ub_ctx_set_stub
2901# 1.5.9 had 6:1:4
2902# 1.5.10 had 6:2:4
2903# 1.6.0 had 6:3:4
2904# 1.6.1 had 7:0:5 # ub_callback_t typedef renamed to ub_callback_type
2905# 1.6.2 had 7:1:5
2906# 1.6.3 had 7:2:5
2907# 1.6.4 had 7:3:5
2908# 1.6.5 had 7:4:5
2909# 1.6.6 had 7:5:5
2910# 1.6.7 had 7:6:5
2911# 1.6.8 had 7:7:5
2912# 1.7.0 had 7:8:5
2913# 1.7.1 had 7:9:5
2914# 1.7.2 had 7:10:5
2915# 1.7.3 had 7:11:5
2916# 1.8.0 had 8:0:0 # changes the event callback function signature
2917# 1.8.1 had 8:1:0
2918# 1.8.2 had 8:2:0
2919# 1.8.3 had 8:3:0
2920# 1.9.0 had 9:0:1 # add ub_ctx_set_tls
2921# 1.9.1 had 9:1:1
2922# 1.9.2 had 9:2:1
2923# 1.9.3 had 9:3:1
2924# 1.9.4 had 9:4:1
2925# 1.9.5 had 9:5:1
2926# 1.9.6 had 9:6:1
2927# 1.10.0 had 9:7:1
2928# 1.10.1 had 9:8:1
2929# 1.11.0 had 9:9:1
2930# 1.12.0 had 9:10:1
2931# 1.13.0 had 9:11:1
2932# 1.13.1 had 9:12:1
2933# 1.13.2 had 9:13:1
2934# 1.14.0 had 9:14:1
2935# 1.15.0 had 9:15:1
2936# 1.16.0 had 9:16:1
2937# 1.16.1 had 9:17:1
2938# 1.16.2 had 9:18:1
2939# 1.16.3 had 9:19:1
2940
2941#   Current  -- the number of the binary API that we're implementing
2942#   Revision -- which iteration of the implementation of the binary
2943#               API are we supplying?
2944#   Age      -- How many previous binary API versions do we also
2945#               support?
2946#
2947# If we release a new version that does not change the binary API,
2948# increment Revision.
2949#
2950# If we release a new version that changes the binary API, but does
2951# not break programs compiled against the old binary API, increment
2952# Current and Age.  Set Revision to 0, since this is the first
2953# implementation of the new API.
2954#
2955# Otherwise, we're changing the binary API and breaking backward
2956# compatibility with old binaries.  Increment Current.  Set Age to 0,
2957# since we're backward compatible with no previous APIs.  Set Revision
2958# to 0 too.
2959
2960
2961
2962
2963
2964cmdln="`echo $@ | sed -e 's/\\\\/\\\\\\\\/g' | sed -e 's/"/\\\\"/'g`"
2965
2966cat >>confdefs.h <<_ACEOF
2967#define CONFCMDLINE "$cmdln"
2968_ACEOF
2969
2970
2971CFLAGS="$CFLAGS"
2972ac_ext=c
2973ac_cpp='$CPP $CPPFLAGS'
2974ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2975ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2976ac_compiler_gnu=$ac_cv_c_compiler_gnu
2977if test -n "$ac_tool_prefix"; then
2978  # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2979set dummy ${ac_tool_prefix}gcc; ac_word=$2
2980{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2981$as_echo_n "checking for $ac_word... " >&6; }
2982if ${ac_cv_prog_CC+:} false; then :
2983  $as_echo_n "(cached) " >&6
2984else
2985  if test -n "$CC"; then
2986  ac_cv_prog_CC="$CC" # Let the user override the test.
2987else
2988as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2989for as_dir in $PATH
2990do
2991  IFS=$as_save_IFS
2992  test -z "$as_dir" && as_dir=.
2993    for ac_exec_ext in '' $ac_executable_extensions; do
2994  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2995    ac_cv_prog_CC="${ac_tool_prefix}gcc"
2996    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2997    break 2
2998  fi
2999done
3000  done
3001IFS=$as_save_IFS
3002
3003fi
3004fi
3005CC=$ac_cv_prog_CC
3006if test -n "$CC"; then
3007  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3008$as_echo "$CC" >&6; }
3009else
3010  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3011$as_echo "no" >&6; }
3012fi
3013
3014
3015fi
3016if test -z "$ac_cv_prog_CC"; then
3017  ac_ct_CC=$CC
3018  # Extract the first word of "gcc", so it can be a program name with args.
3019set dummy gcc; ac_word=$2
3020{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3021$as_echo_n "checking for $ac_word... " >&6; }
3022if ${ac_cv_prog_ac_ct_CC+:} false; then :
3023  $as_echo_n "(cached) " >&6
3024else
3025  if test -n "$ac_ct_CC"; then
3026  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3027else
3028as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3029for as_dir in $PATH
3030do
3031  IFS=$as_save_IFS
3032  test -z "$as_dir" && as_dir=.
3033    for ac_exec_ext in '' $ac_executable_extensions; do
3034  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3035    ac_cv_prog_ac_ct_CC="gcc"
3036    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3037    break 2
3038  fi
3039done
3040  done
3041IFS=$as_save_IFS
3042
3043fi
3044fi
3045ac_ct_CC=$ac_cv_prog_ac_ct_CC
3046if test -n "$ac_ct_CC"; then
3047  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3048$as_echo "$ac_ct_CC" >&6; }
3049else
3050  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3051$as_echo "no" >&6; }
3052fi
3053
3054  if test "x$ac_ct_CC" = x; then
3055    CC=""
3056  else
3057    case $cross_compiling:$ac_tool_warned in
3058yes:)
3059{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3060$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3061ac_tool_warned=yes ;;
3062esac
3063    CC=$ac_ct_CC
3064  fi
3065else
3066  CC="$ac_cv_prog_CC"
3067fi
3068
3069if test -z "$CC"; then
3070          if test -n "$ac_tool_prefix"; then
3071    # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
3072set dummy ${ac_tool_prefix}cc; ac_word=$2
3073{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3074$as_echo_n "checking for $ac_word... " >&6; }
3075if ${ac_cv_prog_CC+:} false; then :
3076  $as_echo_n "(cached) " >&6
3077else
3078  if test -n "$CC"; then
3079  ac_cv_prog_CC="$CC" # Let the user override the test.
3080else
3081as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3082for as_dir in $PATH
3083do
3084  IFS=$as_save_IFS
3085  test -z "$as_dir" && as_dir=.
3086    for ac_exec_ext in '' $ac_executable_extensions; do
3087  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3088    ac_cv_prog_CC="${ac_tool_prefix}cc"
3089    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3090    break 2
3091  fi
3092done
3093  done
3094IFS=$as_save_IFS
3095
3096fi
3097fi
3098CC=$ac_cv_prog_CC
3099if test -n "$CC"; then
3100  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3101$as_echo "$CC" >&6; }
3102else
3103  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3104$as_echo "no" >&6; }
3105fi
3106
3107
3108  fi
3109fi
3110if test -z "$CC"; then
3111  # Extract the first word of "cc", so it can be a program name with args.
3112set dummy cc; ac_word=$2
3113{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3114$as_echo_n "checking for $ac_word... " >&6; }
3115if ${ac_cv_prog_CC+:} false; then :
3116  $as_echo_n "(cached) " >&6
3117else
3118  if test -n "$CC"; then
3119  ac_cv_prog_CC="$CC" # Let the user override the test.
3120else
3121  ac_prog_rejected=no
3122as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3123for as_dir in $PATH
3124do
3125  IFS=$as_save_IFS
3126  test -z "$as_dir" && as_dir=.
3127    for ac_exec_ext in '' $ac_executable_extensions; do
3128  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3129    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3130       ac_prog_rejected=yes
3131       continue
3132     fi
3133    ac_cv_prog_CC="cc"
3134    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3135    break 2
3136  fi
3137done
3138  done
3139IFS=$as_save_IFS
3140
3141if test $ac_prog_rejected = yes; then
3142  # We found a bogon in the path, so make sure we never use it.
3143  set dummy $ac_cv_prog_CC
3144  shift
3145  if test $# != 0; then
3146    # We chose a different compiler from the bogus one.
3147    # However, it has the same basename, so the bogon will be chosen
3148    # first if we set CC to just the basename; use the full file name.
3149    shift
3150    ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
3151  fi
3152fi
3153fi
3154fi
3155CC=$ac_cv_prog_CC
3156if test -n "$CC"; then
3157  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3158$as_echo "$CC" >&6; }
3159else
3160  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3161$as_echo "no" >&6; }
3162fi
3163
3164
3165fi
3166if test -z "$CC"; then
3167  if test -n "$ac_tool_prefix"; then
3168  for ac_prog in cl.exe
3169  do
3170    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3171set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3172{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3173$as_echo_n "checking for $ac_word... " >&6; }
3174if ${ac_cv_prog_CC+:} false; then :
3175  $as_echo_n "(cached) " >&6
3176else
3177  if test -n "$CC"; then
3178  ac_cv_prog_CC="$CC" # Let the user override the test.
3179else
3180as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3181for as_dir in $PATH
3182do
3183  IFS=$as_save_IFS
3184  test -z "$as_dir" && as_dir=.
3185    for ac_exec_ext in '' $ac_executable_extensions; do
3186  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3187    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
3188    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3189    break 2
3190  fi
3191done
3192  done
3193IFS=$as_save_IFS
3194
3195fi
3196fi
3197CC=$ac_cv_prog_CC
3198if test -n "$CC"; then
3199  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3200$as_echo "$CC" >&6; }
3201else
3202  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3203$as_echo "no" >&6; }
3204fi
3205
3206
3207    test -n "$CC" && break
3208  done
3209fi
3210if test -z "$CC"; then
3211  ac_ct_CC=$CC
3212  for ac_prog in cl.exe
3213do
3214  # Extract the first word of "$ac_prog", so it can be a program name with args.
3215set dummy $ac_prog; ac_word=$2
3216{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3217$as_echo_n "checking for $ac_word... " >&6; }
3218if ${ac_cv_prog_ac_ct_CC+:} false; then :
3219  $as_echo_n "(cached) " >&6
3220else
3221  if test -n "$ac_ct_CC"; then
3222  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3223else
3224as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3225for as_dir in $PATH
3226do
3227  IFS=$as_save_IFS
3228  test -z "$as_dir" && as_dir=.
3229    for ac_exec_ext in '' $ac_executable_extensions; do
3230  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3231    ac_cv_prog_ac_ct_CC="$ac_prog"
3232    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3233    break 2
3234  fi
3235done
3236  done
3237IFS=$as_save_IFS
3238
3239fi
3240fi
3241ac_ct_CC=$ac_cv_prog_ac_ct_CC
3242if test -n "$ac_ct_CC"; then
3243  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3244$as_echo "$ac_ct_CC" >&6; }
3245else
3246  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3247$as_echo "no" >&6; }
3248fi
3249
3250
3251  test -n "$ac_ct_CC" && break
3252done
3253
3254  if test "x$ac_ct_CC" = x; then
3255    CC=""
3256  else
3257    case $cross_compiling:$ac_tool_warned in
3258yes:)
3259{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3260$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3261ac_tool_warned=yes ;;
3262esac
3263    CC=$ac_ct_CC
3264  fi
3265fi
3266
3267fi
3268
3269
3270test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3271$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3272as_fn_error $? "no acceptable C compiler found in \$PATH
3273See \`config.log' for more details" "$LINENO" 5; }
3274
3275# Provide some information about the compiler.
3276$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3277set X $ac_compile
3278ac_compiler=$2
3279for ac_option in --version -v -V -qversion; do
3280  { { ac_try="$ac_compiler $ac_option >&5"
3281case "(($ac_try" in
3282  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3283  *) ac_try_echo=$ac_try;;
3284esac
3285eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3286$as_echo "$ac_try_echo"; } >&5
3287  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
3288  ac_status=$?
3289  if test -s conftest.err; then
3290    sed '10a\
3291... rest of stderr output deleted ...
3292         10q' conftest.err >conftest.er1
3293    cat conftest.er1 >&5
3294  fi
3295  rm -f conftest.er1 conftest.err
3296  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3297  test $ac_status = 0; }
3298done
3299
3300cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3301/* end confdefs.h.  */
3302
3303int
3304main ()
3305{
3306
3307  ;
3308  return 0;
3309}
3310_ACEOF
3311ac_clean_files_save=$ac_clean_files
3312ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
3313# Try to create an executable without -o first, disregard a.out.
3314# It will help us diagnose broken compilers, and finding out an intuition
3315# of exeext.
3316{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3317$as_echo_n "checking whether the C compiler works... " >&6; }
3318ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3319
3320# The possible output files:
3321ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3322
3323ac_rmfiles=
3324for ac_file in $ac_files
3325do
3326  case $ac_file in
3327    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3328    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3329  esac
3330done
3331rm -f $ac_rmfiles
3332
3333if { { ac_try="$ac_link_default"
3334case "(($ac_try" in
3335  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3336  *) ac_try_echo=$ac_try;;
3337esac
3338eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3339$as_echo "$ac_try_echo"; } >&5
3340  (eval "$ac_link_default") 2>&5
3341  ac_status=$?
3342  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3343  test $ac_status = 0; }; then :
3344  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3345# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3346# in a Makefile.  We should not override ac_cv_exeext if it was cached,
3347# so that the user can short-circuit this test for compilers unknown to
3348# Autoconf.
3349for ac_file in $ac_files ''
3350do
3351  test -f "$ac_file" || continue
3352  case $ac_file in
3353    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
3354	;;
3355    [ab].out )
3356	# We found the default executable, but exeext='' is most
3357	# certainly right.
3358	break;;
3359    *.* )
3360	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
3361	then :; else
3362	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3363	fi
3364	# We set ac_cv_exeext here because the later test for it is not
3365	# safe: cross compilers may not add the suffix if given an `-o'
3366	# argument, so we may need to know it at that point already.
3367	# Even if this section looks crufty: it has the advantage of
3368	# actually working.
3369	break;;
3370    * )
3371	break;;
3372  esac
3373done
3374test "$ac_cv_exeext" = no && ac_cv_exeext=
3375
3376else
3377  ac_file=''
3378fi
3379if test -z "$ac_file"; then :
3380  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3381$as_echo "no" >&6; }
3382$as_echo "$as_me: failed program was:" >&5
3383sed 's/^/| /' conftest.$ac_ext >&5
3384
3385{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3386$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3387as_fn_error 77 "C compiler cannot create executables
3388See \`config.log' for more details" "$LINENO" 5; }
3389else
3390  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3391$as_echo "yes" >&6; }
3392fi
3393{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3394$as_echo_n "checking for C compiler default output file name... " >&6; }
3395{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3396$as_echo "$ac_file" >&6; }
3397ac_exeext=$ac_cv_exeext
3398
3399rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
3400ac_clean_files=$ac_clean_files_save
3401{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3402$as_echo_n "checking for suffix of executables... " >&6; }
3403if { { 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; }; then :
3414  # If both `conftest.exe' and `conftest' are `present' (well, observable)
3415# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
3416# work properly (i.e., refer to `conftest.exe'), while it won't with
3417# `rm'.
3418for ac_file in conftest.exe conftest conftest.*; do
3419  test -f "$ac_file" || continue
3420  case $ac_file in
3421    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3422    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3423	  break;;
3424    * ) break;;
3425  esac
3426done
3427else
3428  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3429$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3430as_fn_error $? "cannot compute suffix of executables: cannot compile and link
3431See \`config.log' for more details" "$LINENO" 5; }
3432fi
3433rm -f conftest conftest$ac_cv_exeext
3434{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3435$as_echo "$ac_cv_exeext" >&6; }
3436
3437rm -f conftest.$ac_ext
3438EXEEXT=$ac_cv_exeext
3439ac_exeext=$EXEEXT
3440cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3441/* end confdefs.h.  */
3442#include <stdio.h>
3443int
3444main ()
3445{
3446FILE *f = fopen ("conftest.out", "w");
3447 return ferror (f) || fclose (f) != 0;
3448
3449  ;
3450  return 0;
3451}
3452_ACEOF
3453ac_clean_files="$ac_clean_files conftest.out"
3454# Check that the compiler produces executables we can run.  If not, either
3455# the compiler is broken, or we cross compile.
3456{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3457$as_echo_n "checking whether we are cross compiling... " >&6; }
3458if test "$cross_compiling" != yes; then
3459  { { ac_try="$ac_link"
3460case "(($ac_try" in
3461  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3462  *) ac_try_echo=$ac_try;;
3463esac
3464eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3465$as_echo "$ac_try_echo"; } >&5
3466  (eval "$ac_link") 2>&5
3467  ac_status=$?
3468  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3469  test $ac_status = 0; }
3470  if { ac_try='./conftest$ac_cv_exeext'
3471  { { case "(($ac_try" in
3472  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3473  *) ac_try_echo=$ac_try;;
3474esac
3475eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3476$as_echo "$ac_try_echo"; } >&5
3477  (eval "$ac_try") 2>&5
3478  ac_status=$?
3479  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3480  test $ac_status = 0; }; }; then
3481    cross_compiling=no
3482  else
3483    if test "$cross_compiling" = maybe; then
3484	cross_compiling=yes
3485    else
3486	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3487$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3488as_fn_error $? "cannot run C compiled programs.
3489If you meant to cross compile, use \`--host'.
3490See \`config.log' for more details" "$LINENO" 5; }
3491    fi
3492  fi
3493fi
3494{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3495$as_echo "$cross_compiling" >&6; }
3496
3497rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
3498ac_clean_files=$ac_clean_files_save
3499{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3500$as_echo_n "checking for suffix of object files... " >&6; }
3501if ${ac_cv_objext+:} false; then :
3502  $as_echo_n "(cached) " >&6
3503else
3504  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3505/* end confdefs.h.  */
3506
3507int
3508main ()
3509{
3510
3511  ;
3512  return 0;
3513}
3514_ACEOF
3515rm -f conftest.o conftest.obj
3516if { { ac_try="$ac_compile"
3517case "(($ac_try" in
3518  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3519  *) ac_try_echo=$ac_try;;
3520esac
3521eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3522$as_echo "$ac_try_echo"; } >&5
3523  (eval "$ac_compile") 2>&5
3524  ac_status=$?
3525  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3526  test $ac_status = 0; }; then :
3527  for ac_file in conftest.o conftest.obj conftest.*; do
3528  test -f "$ac_file" || continue;
3529  case $ac_file in
3530    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
3531    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3532       break;;
3533  esac
3534done
3535else
3536  $as_echo "$as_me: failed program was:" >&5
3537sed 's/^/| /' conftest.$ac_ext >&5
3538
3539{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3540$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3541as_fn_error $? "cannot compute suffix of object files: cannot compile
3542See \`config.log' for more details" "$LINENO" 5; }
3543fi
3544rm -f conftest.$ac_cv_objext conftest.$ac_ext
3545fi
3546{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3547$as_echo "$ac_cv_objext" >&6; }
3548OBJEXT=$ac_cv_objext
3549ac_objext=$OBJEXT
3550{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
3551$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
3552if ${ac_cv_c_compiler_gnu+:} false; then :
3553  $as_echo_n "(cached) " >&6
3554else
3555  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3556/* end confdefs.h.  */
3557
3558int
3559main ()
3560{
3561#ifndef __GNUC__
3562       choke me
3563#endif
3564
3565  ;
3566  return 0;
3567}
3568_ACEOF
3569if ac_fn_c_try_compile "$LINENO"; then :
3570  ac_compiler_gnu=yes
3571else
3572  ac_compiler_gnu=no
3573fi
3574rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3575ac_cv_c_compiler_gnu=$ac_compiler_gnu
3576
3577fi
3578{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
3579$as_echo "$ac_cv_c_compiler_gnu" >&6; }
3580if test $ac_compiler_gnu = yes; then
3581  GCC=yes
3582else
3583  GCC=
3584fi
3585ac_test_CFLAGS=${CFLAGS+set}
3586ac_save_CFLAGS=$CFLAGS
3587{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
3588$as_echo_n "checking whether $CC accepts -g... " >&6; }
3589if ${ac_cv_prog_cc_g+:} false; then :
3590  $as_echo_n "(cached) " >&6
3591else
3592  ac_save_c_werror_flag=$ac_c_werror_flag
3593   ac_c_werror_flag=yes
3594   ac_cv_prog_cc_g=no
3595   CFLAGS="-g"
3596   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3597/* end confdefs.h.  */
3598
3599int
3600main ()
3601{
3602
3603  ;
3604  return 0;
3605}
3606_ACEOF
3607if ac_fn_c_try_compile "$LINENO"; then :
3608  ac_cv_prog_cc_g=yes
3609else
3610  CFLAGS=""
3611      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3612/* end confdefs.h.  */
3613
3614int
3615main ()
3616{
3617
3618  ;
3619  return 0;
3620}
3621_ACEOF
3622if ac_fn_c_try_compile "$LINENO"; then :
3623
3624else
3625  ac_c_werror_flag=$ac_save_c_werror_flag
3626	 CFLAGS="-g"
3627	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3628/* end confdefs.h.  */
3629
3630int
3631main ()
3632{
3633
3634  ;
3635  return 0;
3636}
3637_ACEOF
3638if ac_fn_c_try_compile "$LINENO"; then :
3639  ac_cv_prog_cc_g=yes
3640fi
3641rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3642fi
3643rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3644fi
3645rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3646   ac_c_werror_flag=$ac_save_c_werror_flag
3647fi
3648{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
3649$as_echo "$ac_cv_prog_cc_g" >&6; }
3650if test "$ac_test_CFLAGS" = set; then
3651  CFLAGS=$ac_save_CFLAGS
3652elif test $ac_cv_prog_cc_g = yes; then
3653  if test "$GCC" = yes; then
3654    CFLAGS="-g -O2"
3655  else
3656    CFLAGS="-g"
3657  fi
3658else
3659  if test "$GCC" = yes; then
3660    CFLAGS="-O2"
3661  else
3662    CFLAGS=
3663  fi
3664fi
3665{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
3666$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
3667if ${ac_cv_prog_cc_c89+:} false; then :
3668  $as_echo_n "(cached) " >&6
3669else
3670  ac_cv_prog_cc_c89=no
3671ac_save_CC=$CC
3672cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3673/* end confdefs.h.  */
3674#include <stdarg.h>
3675#include <stdio.h>
3676struct stat;
3677/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
3678struct buf { int x; };
3679FILE * (*rcsopen) (struct buf *, struct stat *, int);
3680static char *e (p, i)
3681     char **p;
3682     int i;
3683{
3684  return p[i];
3685}
3686static char *f (char * (*g) (char **, int), char **p, ...)
3687{
3688  char *s;
3689  va_list v;
3690  va_start (v,p);
3691  s = g (p, va_arg (v,int));
3692  va_end (v);
3693  return s;
3694}
3695
3696/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
3697   function prototypes and stuff, but not '\xHH' hex character constants.
3698   These don't provoke an error unfortunately, instead are silently treated
3699   as 'x'.  The following induces an error, until -std is added to get
3700   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
3701   array size at least.  It's necessary to write '\x00'==0 to get something
3702   that's true only with -std.  */
3703int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3704
3705/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3706   inside strings and character constants.  */
3707#define FOO(x) 'x'
3708int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3709
3710int test (int i, double x);
3711struct s1 {int (*f) (int a);};
3712struct s2 {int (*f) (double a);};
3713int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3714int argc;
3715char **argv;
3716int
3717main ()
3718{
3719return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
3720  ;
3721  return 0;
3722}
3723_ACEOF
3724for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3725	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
3726do
3727  CC="$ac_save_CC $ac_arg"
3728  if ac_fn_c_try_compile "$LINENO"; then :
3729  ac_cv_prog_cc_c89=$ac_arg
3730fi
3731rm -f core conftest.err conftest.$ac_objext
3732  test "x$ac_cv_prog_cc_c89" != "xno" && break
3733done
3734rm -f conftest.$ac_ext
3735CC=$ac_save_CC
3736
3737fi
3738# AC_CACHE_VAL
3739case "x$ac_cv_prog_cc_c89" in
3740  x)
3741    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
3742$as_echo "none needed" >&6; } ;;
3743  xno)
3744    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
3745$as_echo "unsupported" >&6; } ;;
3746  *)
3747    CC="$CC $ac_cv_prog_cc_c89"
3748    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
3749$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
3750esac
3751if test "x$ac_cv_prog_cc_c89" != xno; then :
3752
3753fi
3754
3755ac_ext=c
3756ac_cpp='$CPP $CPPFLAGS'
3757ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3758ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3759ac_compiler_gnu=$ac_cv_c_compiler_gnu
3760
3761
3762ac_ext=c
3763ac_cpp='$CPP $CPPFLAGS'
3764ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3765ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3766ac_compiler_gnu=$ac_cv_c_compiler_gnu
3767{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
3768$as_echo_n "checking how to run the C preprocessor... " >&6; }
3769# On Suns, sometimes $CPP names a directory.
3770if test -n "$CPP" && test -d "$CPP"; then
3771  CPP=
3772fi
3773if test -z "$CPP"; then
3774  if ${ac_cv_prog_CPP+:} false; then :
3775  $as_echo_n "(cached) " >&6
3776else
3777      # Double quotes because CPP needs to be expanded
3778    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3779    do
3780      ac_preproc_ok=false
3781for ac_c_preproc_warn_flag in '' yes
3782do
3783  # Use a header file that comes with gcc, so configuring glibc
3784  # with a fresh cross-compiler works.
3785  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3786  # <limits.h> exists even on freestanding compilers.
3787  # On the NeXT, cc -E runs the code through the compiler's parser,
3788  # not just through cpp. "Syntax error" is here to catch this case.
3789  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3790/* end confdefs.h.  */
3791#ifdef __STDC__
3792# include <limits.h>
3793#else
3794# include <assert.h>
3795#endif
3796		     Syntax error
3797_ACEOF
3798if ac_fn_c_try_cpp "$LINENO"; then :
3799
3800else
3801  # Broken: fails on valid input.
3802continue
3803fi
3804rm -f conftest.err conftest.i conftest.$ac_ext
3805
3806  # OK, works on sane cases.  Now check whether nonexistent headers
3807  # can be detected and how.
3808  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3809/* end confdefs.h.  */
3810#include <ac_nonexistent.h>
3811_ACEOF
3812if ac_fn_c_try_cpp "$LINENO"; then :
3813  # Broken: success on invalid input.
3814continue
3815else
3816  # Passes both tests.
3817ac_preproc_ok=:
3818break
3819fi
3820rm -f conftest.err conftest.i conftest.$ac_ext
3821
3822done
3823# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3824rm -f conftest.i conftest.err conftest.$ac_ext
3825if $ac_preproc_ok; then :
3826  break
3827fi
3828
3829    done
3830    ac_cv_prog_CPP=$CPP
3831
3832fi
3833  CPP=$ac_cv_prog_CPP
3834else
3835  ac_cv_prog_CPP=$CPP
3836fi
3837{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
3838$as_echo "$CPP" >&6; }
3839ac_preproc_ok=false
3840for ac_c_preproc_warn_flag in '' yes
3841do
3842  # Use a header file that comes with gcc, so configuring glibc
3843  # with a fresh cross-compiler works.
3844  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3845  # <limits.h> exists even on freestanding compilers.
3846  # On the NeXT, cc -E runs the code through the compiler's parser,
3847  # not just through cpp. "Syntax error" is here to catch this case.
3848  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3849/* end confdefs.h.  */
3850#ifdef __STDC__
3851# include <limits.h>
3852#else
3853# include <assert.h>
3854#endif
3855		     Syntax error
3856_ACEOF
3857if ac_fn_c_try_cpp "$LINENO"; then :
3858
3859else
3860  # Broken: fails on valid input.
3861continue
3862fi
3863rm -f conftest.err conftest.i conftest.$ac_ext
3864
3865  # OK, works on sane cases.  Now check whether nonexistent headers
3866  # can be detected and how.
3867  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3868/* end confdefs.h.  */
3869#include <ac_nonexistent.h>
3870_ACEOF
3871if ac_fn_c_try_cpp "$LINENO"; then :
3872  # Broken: success on invalid input.
3873continue
3874else
3875  # Passes both tests.
3876ac_preproc_ok=:
3877break
3878fi
3879rm -f conftest.err conftest.i conftest.$ac_ext
3880
3881done
3882# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3883rm -f conftest.i conftest.err conftest.$ac_ext
3884if $ac_preproc_ok; then :
3885
3886else
3887  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3888$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3889as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
3890See \`config.log' for more details" "$LINENO" 5; }
3891fi
3892
3893ac_ext=c
3894ac_cpp='$CPP $CPPFLAGS'
3895ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3896ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3897ac_compiler_gnu=$ac_cv_c_compiler_gnu
3898
3899
3900{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
3901$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
3902if ${ac_cv_path_GREP+:} false; then :
3903  $as_echo_n "(cached) " >&6
3904else
3905  if test -z "$GREP"; then
3906  ac_path_GREP_found=false
3907  # Loop through the user's path and test for each of PROGNAME-LIST
3908  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3909for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3910do
3911  IFS=$as_save_IFS
3912  test -z "$as_dir" && as_dir=.
3913    for ac_prog in grep ggrep; do
3914    for ac_exec_ext in '' $ac_executable_extensions; do
3915      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
3916      as_fn_executable_p "$ac_path_GREP" || continue
3917# Check for GNU ac_path_GREP and select it if it is found.
3918  # Check for GNU $ac_path_GREP
3919case `"$ac_path_GREP" --version 2>&1` in
3920*GNU*)
3921  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
3922*)
3923  ac_count=0
3924  $as_echo_n 0123456789 >"conftest.in"
3925  while :
3926  do
3927    cat "conftest.in" "conftest.in" >"conftest.tmp"
3928    mv "conftest.tmp" "conftest.in"
3929    cp "conftest.in" "conftest.nl"
3930    $as_echo 'GREP' >> "conftest.nl"
3931    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3932    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3933    as_fn_arith $ac_count + 1 && ac_count=$as_val
3934    if test $ac_count -gt ${ac_path_GREP_max-0}; then
3935      # Best one so far, save it but keep looking for a better one
3936      ac_cv_path_GREP="$ac_path_GREP"
3937      ac_path_GREP_max=$ac_count
3938    fi
3939    # 10*(2^10) chars as input seems more than enough
3940    test $ac_count -gt 10 && break
3941  done
3942  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3943esac
3944
3945      $ac_path_GREP_found && break 3
3946    done
3947  done
3948  done
3949IFS=$as_save_IFS
3950  if test -z "$ac_cv_path_GREP"; then
3951    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
3952  fi
3953else
3954  ac_cv_path_GREP=$GREP
3955fi
3956
3957fi
3958{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
3959$as_echo "$ac_cv_path_GREP" >&6; }
3960 GREP="$ac_cv_path_GREP"
3961
3962
3963{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
3964$as_echo_n "checking for egrep... " >&6; }
3965if ${ac_cv_path_EGREP+:} false; then :
3966  $as_echo_n "(cached) " >&6
3967else
3968  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
3969   then ac_cv_path_EGREP="$GREP -E"
3970   else
3971     if test -z "$EGREP"; then
3972  ac_path_EGREP_found=false
3973  # Loop through the user's path and test for each of PROGNAME-LIST
3974  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3975for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3976do
3977  IFS=$as_save_IFS
3978  test -z "$as_dir" && as_dir=.
3979    for ac_prog in egrep; do
3980    for ac_exec_ext in '' $ac_executable_extensions; do
3981      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
3982      as_fn_executable_p "$ac_path_EGREP" || continue
3983# Check for GNU ac_path_EGREP and select it if it is found.
3984  # Check for GNU $ac_path_EGREP
3985case `"$ac_path_EGREP" --version 2>&1` in
3986*GNU*)
3987  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
3988*)
3989  ac_count=0
3990  $as_echo_n 0123456789 >"conftest.in"
3991  while :
3992  do
3993    cat "conftest.in" "conftest.in" >"conftest.tmp"
3994    mv "conftest.tmp" "conftest.in"
3995    cp "conftest.in" "conftest.nl"
3996    $as_echo 'EGREP' >> "conftest.nl"
3997    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3998    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3999    as_fn_arith $ac_count + 1 && ac_count=$as_val
4000    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4001      # Best one so far, save it but keep looking for a better one
4002      ac_cv_path_EGREP="$ac_path_EGREP"
4003      ac_path_EGREP_max=$ac_count
4004    fi
4005    # 10*(2^10) chars as input seems more than enough
4006    test $ac_count -gt 10 && break
4007  done
4008  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4009esac
4010
4011      $ac_path_EGREP_found && break 3
4012    done
4013  done
4014  done
4015IFS=$as_save_IFS
4016  if test -z "$ac_cv_path_EGREP"; then
4017    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4018  fi
4019else
4020  ac_cv_path_EGREP=$EGREP
4021fi
4022
4023   fi
4024fi
4025{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
4026$as_echo "$ac_cv_path_EGREP" >&6; }
4027 EGREP="$ac_cv_path_EGREP"
4028
4029
4030{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
4031$as_echo_n "checking for ANSI C header files... " >&6; }
4032if ${ac_cv_header_stdc+:} false; then :
4033  $as_echo_n "(cached) " >&6
4034else
4035  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4036/* end confdefs.h.  */
4037#include <stdlib.h>
4038#include <stdarg.h>
4039#include <string.h>
4040#include <float.h>
4041
4042int
4043main ()
4044{
4045
4046  ;
4047  return 0;
4048}
4049_ACEOF
4050if ac_fn_c_try_compile "$LINENO"; then :
4051  ac_cv_header_stdc=yes
4052else
4053  ac_cv_header_stdc=no
4054fi
4055rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4056
4057if test $ac_cv_header_stdc = yes; then
4058  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4059  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4060/* end confdefs.h.  */
4061#include <string.h>
4062
4063_ACEOF
4064if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4065  $EGREP "memchr" >/dev/null 2>&1; then :
4066
4067else
4068  ac_cv_header_stdc=no
4069fi
4070rm -f conftest*
4071
4072fi
4073
4074if test $ac_cv_header_stdc = yes; then
4075  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4076  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4077/* end confdefs.h.  */
4078#include <stdlib.h>
4079
4080_ACEOF
4081if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4082  $EGREP "free" >/dev/null 2>&1; then :
4083
4084else
4085  ac_cv_header_stdc=no
4086fi
4087rm -f conftest*
4088
4089fi
4090
4091if test $ac_cv_header_stdc = yes; then
4092  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4093  if test "$cross_compiling" = yes; then :
4094  :
4095else
4096  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4097/* end confdefs.h.  */
4098#include <ctype.h>
4099#include <stdlib.h>
4100#if ((' ' & 0x0FF) == 0x020)
4101# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4102# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4103#else
4104# define ISLOWER(c) \
4105		   (('a' <= (c) && (c) <= 'i') \
4106		     || ('j' <= (c) && (c) <= 'r') \
4107		     || ('s' <= (c) && (c) <= 'z'))
4108# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4109#endif
4110
4111#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4112int
4113main ()
4114{
4115  int i;
4116  for (i = 0; i < 256; i++)
4117    if (XOR (islower (i), ISLOWER (i))
4118	|| toupper (i) != TOUPPER (i))
4119      return 2;
4120  return 0;
4121}
4122_ACEOF
4123if ac_fn_c_try_run "$LINENO"; then :
4124
4125else
4126  ac_cv_header_stdc=no
4127fi
4128rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4129  conftest.$ac_objext conftest.beam conftest.$ac_ext
4130fi
4131
4132fi
4133fi
4134{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
4135$as_echo "$ac_cv_header_stdc" >&6; }
4136if test $ac_cv_header_stdc = yes; then
4137
4138$as_echo "#define STDC_HEADERS 1" >>confdefs.h
4139
4140fi
4141
4142# On IRIX 5.3, sys/types and inttypes.h are conflicting.
4143for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4144		  inttypes.h stdint.h unistd.h
4145do :
4146  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4147ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
4148"
4149if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
4150  cat >>confdefs.h <<_ACEOF
4151#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
4152_ACEOF
4153
4154fi
4155
4156done
4157
4158
4159
4160  ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
4161if test "x$ac_cv_header_minix_config_h" = xyes; then :
4162  MINIX=yes
4163else
4164  MINIX=
4165fi
4166
4167
4168  if test "$MINIX" = yes; then
4169
4170$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
4171
4172
4173$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
4174
4175
4176$as_echo "#define _MINIX 1" >>confdefs.h
4177
4178  fi
4179
4180
4181  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
4182$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
4183if ${ac_cv_safe_to_define___extensions__+:} false; then :
4184  $as_echo_n "(cached) " >&6
4185else
4186  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4187/* end confdefs.h.  */
4188
4189#         define __EXTENSIONS__ 1
4190          $ac_includes_default
4191int
4192main ()
4193{
4194
4195  ;
4196  return 0;
4197}
4198_ACEOF
4199if ac_fn_c_try_compile "$LINENO"; then :
4200  ac_cv_safe_to_define___extensions__=yes
4201else
4202  ac_cv_safe_to_define___extensions__=no
4203fi
4204rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4205fi
4206{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
4207$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
4208  test $ac_cv_safe_to_define___extensions__ = yes &&
4209    $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
4210
4211  $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
4212
4213  $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
4214
4215  $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
4216
4217  $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
4218
4219
4220if test "$ac_cv_header_minix_config_h" = "yes"; then
4221
4222$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
4223
4224fi
4225
4226case "$prefix" in
4227        NONE)
4228		prefix="/usr/local"
4229        ;;
4230esac
4231case "$exec_prefix" in
4232        NONE)
4233		exec_prefix="$prefix"
4234        ;;
4235esac
4236
4237# are we on MinGW?
4238if uname -s 2>&1 | grep MINGW >/dev/null; then on_mingw="yes"
4239else
4240	if echo $host | grep mingw >/dev/null; then on_mingw="yes"
4241	else on_mingw="no"; fi
4242fi
4243
4244#
4245# Determine configuration file
4246# the eval is to evaluate shell expansion twice
4247UNBOUND_SBIN_DIR=`eval echo "${sbindir}"`
4248
4249UNBOUND_SYSCONF_DIR=`eval echo "${sysconfdir}"`
4250
4251UNBOUND_LOCALSTATE_DIR=`eval echo "${localstatedir}"`
4252
4253if test $on_mingw = "no"; then
4254  ub_conf_file=`eval echo "${sysconfdir}/unbound/unbound.conf"`
4255else
4256  ub_conf_file="C:\\Program Files\\Unbound\\service.conf"
4257fi
4258
4259# Check whether --with-conf_file was given.
4260if test "${with_conf_file+set}" = set; then :
4261  withval=$with_conf_file; ub_conf_file="$withval"
4262fi
4263
4264
4265hdr_config="`echo $ub_conf_file | sed -e 's/\\\\/\\\\\\\\/g'`"
4266
4267
4268cat >>confdefs.h <<_ACEOF
4269#define CONFIGFILE "$hdr_config"
4270_ACEOF
4271
4272ub_conf_dir=`$as_dirname -- "$ub_conf_file" ||
4273$as_expr X"$ub_conf_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
4274	 X"$ub_conf_file" : 'X\(//\)[^/]' \| \
4275	 X"$ub_conf_file" : 'X\(//\)$' \| \
4276	 X"$ub_conf_file" : 'X\(/\)' \| . 2>/dev/null ||
4277$as_echo X"$ub_conf_file" |
4278    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
4279	    s//\1/
4280	    q
4281	  }
4282	  /^X\(\/\/\)[^/].*/{
4283	    s//\1/
4284	    q
4285	  }
4286	  /^X\(\/\/\)$/{
4287	    s//\1/
4288	    q
4289	  }
4290	  /^X\(\/\).*/{
4291	    s//\1/
4292	    q
4293	  }
4294	  s/.*/./; q'`
4295
4296
4297# Determine run, chroot directory and pidfile locations
4298
4299# Check whether --with-run-dir was given.
4300if test "${with_run_dir+set}" = set; then :
4301  withval=$with_run_dir; UNBOUND_RUN_DIR="$withval"
4302else
4303  if test $on_mingw = no; then
4304    UNBOUND_RUN_DIR=`dirname "$ub_conf_file"`
4305else
4306    UNBOUND_RUN_DIR=""
4307fi
4308
4309fi
4310
4311
4312hdr_run="`echo $UNBOUND_RUN_DIR | sed -e 's/\\\\/\\\\\\\\/g'`"
4313
4314
4315cat >>confdefs.h <<_ACEOF
4316#define RUN_DIR "$hdr_run"
4317_ACEOF
4318
4319
4320
4321# Check whether --with-chroot-dir was given.
4322if test "${with_chroot_dir+set}" = set; then :
4323  withval=$with_chroot_dir; UNBOUND_CHROOT_DIR="$withval"
4324else
4325  if test $on_mingw = no; then
4326    UNBOUND_CHROOT_DIR="$UNBOUND_RUN_DIR"
4327else
4328    UNBOUND_CHROOT_DIR=""
4329fi
4330
4331fi
4332
4333
4334hdr_chroot="`echo $UNBOUND_CHROOT_DIR | sed -e 's/\\\\/\\\\\\\\/g'`"
4335
4336
4337cat >>confdefs.h <<_ACEOF
4338#define CHROOT_DIR "$hdr_chroot"
4339_ACEOF
4340
4341
4342
4343# Check whether --with-share-dir was given.
4344if test "${with_share_dir+set}" = set; then :
4345  withval=$with_share_dir; UNBOUND_SHARE_DIR="$withval"
4346else
4347  UNBOUND_SHARE_DIR="$UNBOUND_RUN_DIR"
4348fi
4349
4350
4351
4352cat >>confdefs.h <<_ACEOF
4353#define SHARE_DIR "$UNBOUND_SHARE_DIR"
4354_ACEOF
4355
4356
4357
4358# Check whether --with-pidfile was given.
4359if test "${with_pidfile+set}" = set; then :
4360  withval=$with_pidfile; UNBOUND_PIDFILE="$withval"
4361else
4362  if test $on_mingw = no; then
4363    UNBOUND_PIDFILE="$UNBOUND_RUN_DIR/unbound.pid"
4364else
4365    UNBOUND_PIDFILE=""
4366fi
4367
4368fi
4369
4370
4371hdr_pid="`echo $UNBOUND_PIDFILE | sed -e 's/\\\\/\\\\\\\\/g'`"
4372
4373
4374cat >>confdefs.h <<_ACEOF
4375#define PIDFILE "$hdr_pid"
4376_ACEOF
4377
4378
4379
4380# Check whether --with-rootkey-file was given.
4381if test "${with_rootkey_file+set}" = set; then :
4382  withval=$with_rootkey_file; UNBOUND_ROOTKEY_FILE="$withval"
4383else
4384  if test $on_mingw = no; then
4385    UNBOUND_ROOTKEY_FILE="$UNBOUND_RUN_DIR/root.key"
4386else
4387    UNBOUND_ROOTKEY_FILE="C:\\Program Files\\Unbound\\root.key"
4388fi
4389
4390fi
4391
4392
4393hdr_rkey="`echo $UNBOUND_ROOTKEY_FILE | sed -e 's/\\\\/\\\\\\\\/g'`"
4394
4395
4396cat >>confdefs.h <<_ACEOF
4397#define ROOT_ANCHOR_FILE "$hdr_rkey"
4398_ACEOF
4399
4400
4401
4402# Check whether --with-rootcert-file was given.
4403if test "${with_rootcert_file+set}" = set; then :
4404  withval=$with_rootcert_file; UNBOUND_ROOTCERT_FILE="$withval"
4405else
4406  if test $on_mingw = no; then
4407    UNBOUND_ROOTCERT_FILE="$UNBOUND_RUN_DIR/icannbundle.pem"
4408else
4409    UNBOUND_ROOTCERT_FILE="C:\\Program Files\\Unbound\\icannbundle.pem"
4410fi
4411
4412fi
4413
4414
4415hdr_rpem="`echo $UNBOUND_ROOTCERT_FILE | sed -e 's/\\\\/\\\\\\\\/g'`"
4416
4417
4418cat >>confdefs.h <<_ACEOF
4419#define ROOT_CERT_FILE "$hdr_rpem"
4420_ACEOF
4421
4422
4423
4424# Check whether --with-username was given.
4425if test "${with_username+set}" = set; then :
4426  withval=$with_username; UNBOUND_USERNAME="$withval"
4427else
4428  UNBOUND_USERNAME="unbound"
4429fi
4430
4431
4432
4433cat >>confdefs.h <<_ACEOF
4434#define UB_USERNAME "$UNBOUND_USERNAME"
4435_ACEOF
4436
4437
4438
4439$as_echo "#define WINVER 0x0502" >>confdefs.h
4440
4441wnvs=`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/' `
4442
4443
4444cat >>confdefs.h <<_ACEOF
4445#define RSRC_PACKAGE_VERSION $wnvs
4446_ACEOF
4447
4448
4449# Checks for typedefs, structures, and compiler characteristics.
4450{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
4451$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
4452if ${ac_cv_c_const+:} false; then :
4453  $as_echo_n "(cached) " >&6
4454else
4455  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4456/* end confdefs.h.  */
4457
4458int
4459main ()
4460{
4461
4462#ifndef __cplusplus
4463  /* Ultrix mips cc rejects this sort of thing.  */
4464  typedef int charset[2];
4465  const charset cs = { 0, 0 };
4466  /* SunOS 4.1.1 cc rejects this.  */
4467  char const *const *pcpcc;
4468  char **ppc;
4469  /* NEC SVR4.0.2 mips cc rejects this.  */
4470  struct point {int x, y;};
4471  static struct point const zero = {0,0};
4472  /* AIX XL C 1.02.0.0 rejects this.
4473     It does not let you subtract one const X* pointer from another in
4474     an arm of an if-expression whose if-part is not a constant
4475     expression */
4476  const char *g = "string";
4477  pcpcc = &g + (g ? g-g : 0);
4478  /* HPUX 7.0 cc rejects these. */
4479  ++pcpcc;
4480  ppc = (char**) pcpcc;
4481  pcpcc = (char const *const *) ppc;
4482  { /* SCO 3.2v4 cc rejects this sort of thing.  */
4483    char tx;
4484    char *t = &tx;
4485    char const *s = 0 ? (char *) 0 : (char const *) 0;
4486
4487    *t++ = 0;
4488    if (s) return 0;
4489  }
4490  { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
4491    int x[] = {25, 17};
4492    const int *foo = &x[0];
4493    ++foo;
4494  }
4495  { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
4496    typedef const int *iptr;
4497    iptr p = 0;
4498    ++p;
4499  }
4500  { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
4501       "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
4502    struct s { int j; const int *ap[3]; } bx;
4503    struct s *b = &bx; b->j = 5;
4504  }
4505  { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
4506    const int foo = 10;
4507    if (!foo) return 0;
4508  }
4509  return !cs[0] && !zero.x;
4510#endif
4511
4512  ;
4513  return 0;
4514}
4515_ACEOF
4516if ac_fn_c_try_compile "$LINENO"; then :
4517  ac_cv_c_const=yes
4518else
4519  ac_cv_c_const=no
4520fi
4521rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4522fi
4523{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
4524$as_echo "$ac_cv_c_const" >&6; }
4525if test $ac_cv_c_const = no; then
4526
4527$as_echo "#define const /**/" >>confdefs.h
4528
4529fi
4530
4531ac_ext=c
4532ac_cpp='$CPP $CPPFLAGS'
4533ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4534ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4535ac_compiler_gnu=$ac_cv_c_compiler_gnu
4536
4537# allow user to override the -g -O2 flags.
4538default_cflags=no
4539if test "x$CFLAGS" = "x" ; then
4540
4541
4542{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -g" >&5
4543$as_echo_n "checking whether $CC supports -g... " >&6; }
4544cache=`echo g | sed 'y%.=/+-%___p_%'`
4545if eval \${cv_prog_cc_flag_$cache+:} false; then :
4546  $as_echo_n "(cached) " >&6
4547else
4548
4549echo 'void f(void){}' >conftest.c
4550if test -z "`$CC $CPPFLAGS $CFLAGS -g -c conftest.c 2>&1`"; then
4551eval "cv_prog_cc_flag_$cache=yes"
4552else
4553eval "cv_prog_cc_flag_$cache=no"
4554fi
4555rm -f conftest conftest.o conftest.c
4556
4557fi
4558
4559if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
4560{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4561$as_echo "yes" >&6; }
4562:
4563CFLAGS="$CFLAGS -g"
4564else
4565{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4566$as_echo "no" >&6; }
4567:
4568
4569fi
4570
4571
4572
4573{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -O2" >&5
4574$as_echo_n "checking whether $CC supports -O2... " >&6; }
4575cache=`echo O2 | sed 'y%.=/+-%___p_%'`
4576if eval \${cv_prog_cc_flag_$cache+:} false; then :
4577  $as_echo_n "(cached) " >&6
4578else
4579
4580echo 'void f(void){}' >conftest.c
4581if test -z "`$CC $CPPFLAGS $CFLAGS -O2 -c conftest.c 2>&1`"; then
4582eval "cv_prog_cc_flag_$cache=yes"
4583else
4584eval "cv_prog_cc_flag_$cache=no"
4585fi
4586rm -f conftest conftest.o conftest.c
4587
4588fi
4589
4590if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
4591{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4592$as_echo "yes" >&6; }
4593:
4594CFLAGS="$CFLAGS -O2"
4595else
4596{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4597$as_echo "no" >&6; }
4598:
4599
4600fi
4601
4602default_cflags=yes
4603fi
4604ac_ext=c
4605ac_cpp='$CPP $CPPFLAGS'
4606ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4607ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4608ac_compiler_gnu=$ac_cv_c_compiler_gnu
4609if test -n "$ac_tool_prefix"; then
4610  # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
4611set dummy ${ac_tool_prefix}gcc; ac_word=$2
4612{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4613$as_echo_n "checking for $ac_word... " >&6; }
4614if ${ac_cv_prog_CC+:} false; then :
4615  $as_echo_n "(cached) " >&6
4616else
4617  if test -n "$CC"; then
4618  ac_cv_prog_CC="$CC" # Let the user override the test.
4619else
4620as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4621for as_dir in $PATH
4622do
4623  IFS=$as_save_IFS
4624  test -z "$as_dir" && as_dir=.
4625    for ac_exec_ext in '' $ac_executable_extensions; do
4626  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4627    ac_cv_prog_CC="${ac_tool_prefix}gcc"
4628    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4629    break 2
4630  fi
4631done
4632  done
4633IFS=$as_save_IFS
4634
4635fi
4636fi
4637CC=$ac_cv_prog_CC
4638if test -n "$CC"; then
4639  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4640$as_echo "$CC" >&6; }
4641else
4642  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4643$as_echo "no" >&6; }
4644fi
4645
4646
4647fi
4648if test -z "$ac_cv_prog_CC"; then
4649  ac_ct_CC=$CC
4650  # Extract the first word of "gcc", so it can be a program name with args.
4651set dummy gcc; ac_word=$2
4652{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4653$as_echo_n "checking for $ac_word... " >&6; }
4654if ${ac_cv_prog_ac_ct_CC+:} false; then :
4655  $as_echo_n "(cached) " >&6
4656else
4657  if test -n "$ac_ct_CC"; then
4658  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
4659else
4660as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4661for as_dir in $PATH
4662do
4663  IFS=$as_save_IFS
4664  test -z "$as_dir" && as_dir=.
4665    for ac_exec_ext in '' $ac_executable_extensions; do
4666  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4667    ac_cv_prog_ac_ct_CC="gcc"
4668    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4669    break 2
4670  fi
4671done
4672  done
4673IFS=$as_save_IFS
4674
4675fi
4676fi
4677ac_ct_CC=$ac_cv_prog_ac_ct_CC
4678if test -n "$ac_ct_CC"; then
4679  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
4680$as_echo "$ac_ct_CC" >&6; }
4681else
4682  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4683$as_echo "no" >&6; }
4684fi
4685
4686  if test "x$ac_ct_CC" = x; then
4687    CC=""
4688  else
4689    case $cross_compiling:$ac_tool_warned in
4690yes:)
4691{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4692$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4693ac_tool_warned=yes ;;
4694esac
4695    CC=$ac_ct_CC
4696  fi
4697else
4698  CC="$ac_cv_prog_CC"
4699fi
4700
4701if test -z "$CC"; then
4702          if test -n "$ac_tool_prefix"; then
4703    # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
4704set dummy ${ac_tool_prefix}cc; ac_word=$2
4705{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4706$as_echo_n "checking for $ac_word... " >&6; }
4707if ${ac_cv_prog_CC+:} false; then :
4708  $as_echo_n "(cached) " >&6
4709else
4710  if test -n "$CC"; then
4711  ac_cv_prog_CC="$CC" # Let the user override the test.
4712else
4713as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4714for as_dir in $PATH
4715do
4716  IFS=$as_save_IFS
4717  test -z "$as_dir" && as_dir=.
4718    for ac_exec_ext in '' $ac_executable_extensions; do
4719  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4720    ac_cv_prog_CC="${ac_tool_prefix}cc"
4721    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4722    break 2
4723  fi
4724done
4725  done
4726IFS=$as_save_IFS
4727
4728fi
4729fi
4730CC=$ac_cv_prog_CC
4731if test -n "$CC"; then
4732  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4733$as_echo "$CC" >&6; }
4734else
4735  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4736$as_echo "no" >&6; }
4737fi
4738
4739
4740  fi
4741fi
4742if test -z "$CC"; then
4743  # Extract the first word of "cc", so it can be a program name with args.
4744set dummy cc; ac_word=$2
4745{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4746$as_echo_n "checking for $ac_word... " >&6; }
4747if ${ac_cv_prog_CC+:} false; then :
4748  $as_echo_n "(cached) " >&6
4749else
4750  if test -n "$CC"; then
4751  ac_cv_prog_CC="$CC" # Let the user override the test.
4752else
4753  ac_prog_rejected=no
4754as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4755for as_dir in $PATH
4756do
4757  IFS=$as_save_IFS
4758  test -z "$as_dir" && as_dir=.
4759    for ac_exec_ext in '' $ac_executable_extensions; do
4760  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4761    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
4762       ac_prog_rejected=yes
4763       continue
4764     fi
4765    ac_cv_prog_CC="cc"
4766    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4767    break 2
4768  fi
4769done
4770  done
4771IFS=$as_save_IFS
4772
4773if test $ac_prog_rejected = yes; then
4774  # We found a bogon in the path, so make sure we never use it.
4775  set dummy $ac_cv_prog_CC
4776  shift
4777  if test $# != 0; then
4778    # We chose a different compiler from the bogus one.
4779    # However, it has the same basename, so the bogon will be chosen
4780    # first if we set CC to just the basename; use the full file name.
4781    shift
4782    ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
4783  fi
4784fi
4785fi
4786fi
4787CC=$ac_cv_prog_CC
4788if test -n "$CC"; then
4789  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4790$as_echo "$CC" >&6; }
4791else
4792  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4793$as_echo "no" >&6; }
4794fi
4795
4796
4797fi
4798if test -z "$CC"; then
4799  if test -n "$ac_tool_prefix"; then
4800  for ac_prog in cl.exe
4801  do
4802    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4803set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4804{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4805$as_echo_n "checking for $ac_word... " >&6; }
4806if ${ac_cv_prog_CC+:} false; then :
4807  $as_echo_n "(cached) " >&6
4808else
4809  if test -n "$CC"; then
4810  ac_cv_prog_CC="$CC" # Let the user override the test.
4811else
4812as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4813for as_dir in $PATH
4814do
4815  IFS=$as_save_IFS
4816  test -z "$as_dir" && as_dir=.
4817    for ac_exec_ext in '' $ac_executable_extensions; do
4818  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4819    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
4820    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4821    break 2
4822  fi
4823done
4824  done
4825IFS=$as_save_IFS
4826
4827fi
4828fi
4829CC=$ac_cv_prog_CC
4830if test -n "$CC"; then
4831  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4832$as_echo "$CC" >&6; }
4833else
4834  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4835$as_echo "no" >&6; }
4836fi
4837
4838
4839    test -n "$CC" && break
4840  done
4841fi
4842if test -z "$CC"; then
4843  ac_ct_CC=$CC
4844  for ac_prog in cl.exe
4845do
4846  # Extract the first word of "$ac_prog", so it can be a program name with args.
4847set dummy $ac_prog; ac_word=$2
4848{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4849$as_echo_n "checking for $ac_word... " >&6; }
4850if ${ac_cv_prog_ac_ct_CC+:} false; then :
4851  $as_echo_n "(cached) " >&6
4852else
4853  if test -n "$ac_ct_CC"; then
4854  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
4855else
4856as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4857for as_dir in $PATH
4858do
4859  IFS=$as_save_IFS
4860  test -z "$as_dir" && as_dir=.
4861    for ac_exec_ext in '' $ac_executable_extensions; do
4862  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4863    ac_cv_prog_ac_ct_CC="$ac_prog"
4864    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4865    break 2
4866  fi
4867done
4868  done
4869IFS=$as_save_IFS
4870
4871fi
4872fi
4873ac_ct_CC=$ac_cv_prog_ac_ct_CC
4874if test -n "$ac_ct_CC"; then
4875  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
4876$as_echo "$ac_ct_CC" >&6; }
4877else
4878  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4879$as_echo "no" >&6; }
4880fi
4881
4882
4883  test -n "$ac_ct_CC" && break
4884done
4885
4886  if test "x$ac_ct_CC" = x; then
4887    CC=""
4888  else
4889    case $cross_compiling:$ac_tool_warned in
4890yes:)
4891{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4892$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4893ac_tool_warned=yes ;;
4894esac
4895    CC=$ac_ct_CC
4896  fi
4897fi
4898
4899fi
4900
4901
4902test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4903$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4904as_fn_error $? "no acceptable C compiler found in \$PATH
4905See \`config.log' for more details" "$LINENO" 5; }
4906
4907# Provide some information about the compiler.
4908$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
4909set X $ac_compile
4910ac_compiler=$2
4911for ac_option in --version -v -V -qversion; do
4912  { { ac_try="$ac_compiler $ac_option >&5"
4913case "(($ac_try" in
4914  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4915  *) ac_try_echo=$ac_try;;
4916esac
4917eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4918$as_echo "$ac_try_echo"; } >&5
4919  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
4920  ac_status=$?
4921  if test -s conftest.err; then
4922    sed '10a\
4923... rest of stderr output deleted ...
4924         10q' conftest.err >conftest.er1
4925    cat conftest.er1 >&5
4926  fi
4927  rm -f conftest.er1 conftest.err
4928  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4929  test $ac_status = 0; }
4930done
4931
4932{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4933$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
4934if ${ac_cv_c_compiler_gnu+:} false; then :
4935  $as_echo_n "(cached) " >&6
4936else
4937  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4938/* end confdefs.h.  */
4939
4940int
4941main ()
4942{
4943#ifndef __GNUC__
4944       choke me
4945#endif
4946
4947  ;
4948  return 0;
4949}
4950_ACEOF
4951if ac_fn_c_try_compile "$LINENO"; then :
4952  ac_compiler_gnu=yes
4953else
4954  ac_compiler_gnu=no
4955fi
4956rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4957ac_cv_c_compiler_gnu=$ac_compiler_gnu
4958
4959fi
4960{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4961$as_echo "$ac_cv_c_compiler_gnu" >&6; }
4962if test $ac_compiler_gnu = yes; then
4963  GCC=yes
4964else
4965  GCC=
4966fi
4967ac_test_CFLAGS=${CFLAGS+set}
4968ac_save_CFLAGS=$CFLAGS
4969{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4970$as_echo_n "checking whether $CC accepts -g... " >&6; }
4971if ${ac_cv_prog_cc_g+:} false; then :
4972  $as_echo_n "(cached) " >&6
4973else
4974  ac_save_c_werror_flag=$ac_c_werror_flag
4975   ac_c_werror_flag=yes
4976   ac_cv_prog_cc_g=no
4977   CFLAGS="-g"
4978   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4979/* end confdefs.h.  */
4980
4981int
4982main ()
4983{
4984
4985  ;
4986  return 0;
4987}
4988_ACEOF
4989if ac_fn_c_try_compile "$LINENO"; then :
4990  ac_cv_prog_cc_g=yes
4991else
4992  CFLAGS=""
4993      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4994/* end confdefs.h.  */
4995
4996int
4997main ()
4998{
4999
5000  ;
5001  return 0;
5002}
5003_ACEOF
5004if ac_fn_c_try_compile "$LINENO"; then :
5005
5006else
5007  ac_c_werror_flag=$ac_save_c_werror_flag
5008	 CFLAGS="-g"
5009	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5010/* end confdefs.h.  */
5011
5012int
5013main ()
5014{
5015
5016  ;
5017  return 0;
5018}
5019_ACEOF
5020if ac_fn_c_try_compile "$LINENO"; then :
5021  ac_cv_prog_cc_g=yes
5022fi
5023rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5024fi
5025rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5026fi
5027rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5028   ac_c_werror_flag=$ac_save_c_werror_flag
5029fi
5030{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
5031$as_echo "$ac_cv_prog_cc_g" >&6; }
5032if test "$ac_test_CFLAGS" = set; then
5033  CFLAGS=$ac_save_CFLAGS
5034elif test $ac_cv_prog_cc_g = yes; then
5035  if test "$GCC" = yes; then
5036    CFLAGS="-g -O2"
5037  else
5038    CFLAGS="-g"
5039  fi
5040else
5041  if test "$GCC" = yes; then
5042    CFLAGS="-O2"
5043  else
5044    CFLAGS=
5045  fi
5046fi
5047{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
5048$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
5049if ${ac_cv_prog_cc_c89+:} false; then :
5050  $as_echo_n "(cached) " >&6
5051else
5052  ac_cv_prog_cc_c89=no
5053ac_save_CC=$CC
5054cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5055/* end confdefs.h.  */
5056#include <stdarg.h>
5057#include <stdio.h>
5058struct stat;
5059/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
5060struct buf { int x; };
5061FILE * (*rcsopen) (struct buf *, struct stat *, int);
5062static char *e (p, i)
5063     char **p;
5064     int i;
5065{
5066  return p[i];
5067}
5068static char *f (char * (*g) (char **, int), char **p, ...)
5069{
5070  char *s;
5071  va_list v;
5072  va_start (v,p);
5073  s = g (p, va_arg (v,int));
5074  va_end (v);
5075  return s;
5076}
5077
5078/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
5079   function prototypes and stuff, but not '\xHH' hex character constants.
5080   These don't provoke an error unfortunately, instead are silently treated
5081   as 'x'.  The following induces an error, until -std is added to get
5082   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
5083   array size at least.  It's necessary to write '\x00'==0 to get something
5084   that's true only with -std.  */
5085int osf4_cc_array ['\x00' == 0 ? 1 : -1];
5086
5087/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
5088   inside strings and character constants.  */
5089#define FOO(x) 'x'
5090int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
5091
5092int test (int i, double x);
5093struct s1 {int (*f) (int a);};
5094struct s2 {int (*f) (double a);};
5095int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
5096int argc;
5097char **argv;
5098int
5099main ()
5100{
5101return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
5102  ;
5103  return 0;
5104}
5105_ACEOF
5106for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
5107	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
5108do
5109  CC="$ac_save_CC $ac_arg"
5110  if ac_fn_c_try_compile "$LINENO"; then :
5111  ac_cv_prog_cc_c89=$ac_arg
5112fi
5113rm -f core conftest.err conftest.$ac_objext
5114  test "x$ac_cv_prog_cc_c89" != "xno" && break
5115done
5116rm -f conftest.$ac_ext
5117CC=$ac_save_CC
5118
5119fi
5120# AC_CACHE_VAL
5121case "x$ac_cv_prog_cc_c89" in
5122  x)
5123    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
5124$as_echo "none needed" >&6; } ;;
5125  xno)
5126    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
5127$as_echo "unsupported" >&6; } ;;
5128  *)
5129    CC="$CC $ac_cv_prog_cc_c89"
5130    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
5131$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
5132esac
5133if test "x$ac_cv_prog_cc_c89" != xno; then :
5134
5135fi
5136
5137ac_ext=c
5138ac_cpp='$CPP $CPPFLAGS'
5139ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5140ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5141ac_compiler_gnu=$ac_cv_c_compiler_gnu
5142
5143
5144{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $CC dependency flag" >&5
5145$as_echo_n "checking $CC dependency flag... " >&6; }
5146echo 'void f(){}' >conftest.c
5147if test "`$CC -MM conftest.c 2>&1`" = "conftest.o: conftest.c"; then
5148	DEPFLAG="-MM"
5149else
5150  if test "`$CC -xM1 conftest.c 2>&1`" = "conftest.o: conftest.c"; then
5151	DEPFLAG="-xM1"
5152  else
5153	DEPFLAG="-MM"  # dunno do something
5154  fi
5155fi
5156{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEPFLAG" >&5
5157$as_echo "$DEPFLAG" >&6; }
5158rm -f conftest.c
5159
5160
5161
5162
5163
5164{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Werror" >&5
5165$as_echo_n "checking whether $CC supports -Werror... " >&6; }
5166cache=`echo Werror | sed 'y%.=/+-%___p_%'`
5167if eval \${cv_prog_cc_flag_$cache+:} false; then :
5168  $as_echo_n "(cached) " >&6
5169else
5170
5171echo 'void f(void){}' >conftest.c
5172if test -z "`$CC $CPPFLAGS $CFLAGS -Werror -c conftest.c 2>&1`"; then
5173eval "cv_prog_cc_flag_$cache=yes"
5174else
5175eval "cv_prog_cc_flag_$cache=no"
5176fi
5177rm -f conftest conftest.o conftest.c
5178
5179fi
5180
5181if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
5182{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5183$as_echo "yes" >&6; }
5184:
5185ERRFLAG="-Werror"
5186else
5187{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5188$as_echo "no" >&6; }
5189:
5190ERRFLAG="-errwarn"
5191fi
5192
5193
5194
5195{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wall" >&5
5196$as_echo_n "checking whether $CC supports -Wall... " >&6; }
5197cache=`echo Wall | sed 'y%.=/+-%___p_%'`
5198if eval \${cv_prog_cc_flag_$cache+:} false; then :
5199  $as_echo_n "(cached) " >&6
5200else
5201
5202echo 'void f(void){}' >conftest.c
5203if test -z "`$CC $CPPFLAGS $CFLAGS -Wall -c conftest.c 2>&1`"; then
5204eval "cv_prog_cc_flag_$cache=yes"
5205else
5206eval "cv_prog_cc_flag_$cache=no"
5207fi
5208rm -f conftest conftest.o conftest.c
5209
5210fi
5211
5212if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
5213{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5214$as_echo "yes" >&6; }
5215:
5216ERRFLAG="$ERRFLAG -Wall"
5217else
5218{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5219$as_echo "no" >&6; }
5220:
5221ERRFLAG="$ERRFLAG -errfmt"
5222fi
5223
5224
5225
5226
5227
5228{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -std=c99" >&5
5229$as_echo_n "checking whether $CC supports -std=c99... " >&6; }
5230cache=`echo std=c99 | sed 'y%.=/+-%___p_%'`
5231if eval \${cv_prog_cc_flag_$cache+:} false; then :
5232  $as_echo_n "(cached) " >&6
5233else
5234
5235echo 'void f(void){}' >conftest.c
5236if test -z "`$CC $CPPFLAGS $CFLAGS -std=c99 -c conftest.c 2>&1`"; then
5237eval "cv_prog_cc_flag_$cache=yes"
5238else
5239eval "cv_prog_cc_flag_$cache=no"
5240fi
5241rm -f conftest conftest.o conftest.c
5242
5243fi
5244
5245if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
5246{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5247$as_echo "yes" >&6; }
5248:
5249C99FLAG="-std=c99"
5250else
5251{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5252$as_echo "no" >&6; }
5253:
5254
5255fi
5256
5257
5258
5259{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -xc99" >&5
5260$as_echo_n "checking whether $CC supports -xc99... " >&6; }
5261cache=`echo xc99 | sed 'y%.=/+-%___p_%'`
5262if eval \${cv_prog_cc_flag_$cache+:} false; then :
5263  $as_echo_n "(cached) " >&6
5264else
5265
5266echo 'void f(void){}' >conftest.c
5267if test -z "`$CC $CPPFLAGS $CFLAGS -xc99 -c conftest.c 2>&1`"; then
5268eval "cv_prog_cc_flag_$cache=yes"
5269else
5270eval "cv_prog_cc_flag_$cache=no"
5271fi
5272rm -f conftest conftest.o conftest.c
5273
5274fi
5275
5276if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
5277{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5278$as_echo "yes" >&6; }
5279:
5280C99FLAG="-xc99"
5281else
5282{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5283$as_echo "no" >&6; }
5284:
5285
5286fi
5287
5288
5289for ac_header in getopt.h time.h
5290do :
5291  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5292ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
5293"
5294if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
5295  cat >>confdefs.h <<_ACEOF
5296#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5297_ACEOF
5298
5299fi
5300
5301done
5302
5303
5304
5305
5306
5307{ $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
5308$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; }
5309cache=`$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`
5310if eval \${cv_prog_cc_flag_needed_$cache+:} false; then :
5311  $as_echo_n "(cached) " >&6
5312else
5313
5314echo '
5315#include "confdefs.h"
5316#include <stdlib.h>
5317#include <ctype.h>
5318#include <sys/time.h>
5319#ifdef HAVE_TIME_H
5320#include <time.h>
5321#endif
5322#include <unistd.h>
5323#include <netdb.h>
5324#ifdef HAVE_GETOPT_H
5325#include <getopt.h>
5326#endif
5327
5328int test() {
5329	int a;
5330	char **opts = NULL;
5331	struct timeval tv;
5332	char *t;
5333	time_t time = 0;
5334	char *buf = NULL;
5335	const char* str = NULL;
5336	struct msghdr msg;
5337	msg.msg_control = 0;
5338	t = ctime_r(&time, buf);
5339	tv.tv_usec = 10;
5340	srandom(32);
5341	a = getopt(2, opts, "a");
5342	a = isascii(32);
5343	str = gai_strerror(0);
5344	if(str && t && tv.tv_usec && msg.msg_control)
5345		a = 0;
5346	return a;
5347}
5348' > conftest.c
5349echo 'void f(){}' >>conftest.c
5350if test -z "`$CC $CPPFLAGS $CFLAGS $ERRFLAG -c conftest.c 2>&1`"; then
5351eval "cv_prog_cc_flag_needed_$cache=no"
5352else
5353
5354if 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
5355eval "cv_prog_cc_flag_needed_$cache=yes"
5356else
5357eval "cv_prog_cc_flag_needed_$cache=fail"
5358#echo 'Test with flag fails too!'
5359#cat conftest.c
5360#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"
5361#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`
5362#exit 1
5363fi
5364
5365fi
5366rm -f conftest conftest.c conftest.o
5367
5368fi
5369
5370if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = yes"; then
5371{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5372$as_echo "yes" >&6; }
5373:
5374CFLAGS="$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"
5375else
5376if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = no"; then
5377{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5378$as_echo "no" >&6; }
5379#echo 'Test with flag is no!'
5380#cat conftest.c
5381#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"
5382#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`
5383#exit 1
5384:
5385
5386else
5387{ $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
5388$as_echo "failed" >&6; }
5389:
5390
5391fi
5392fi
5393
5394
5395
5396
5397
5398{ $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
5399$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; }
5400cache=`$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`
5401if eval \${cv_prog_cc_flag_needed_$cache+:} false; then :
5402  $as_echo_n "(cached) " >&6
5403else
5404
5405echo '
5406#include "confdefs.h"
5407#include <stdlib.h>
5408#include <ctype.h>
5409#include <sys/time.h>
5410#ifdef HAVE_TIME_H
5411#include <time.h>
5412#endif
5413#include <unistd.h>
5414#include <netdb.h>
5415#ifdef HAVE_GETOPT_H
5416#include <getopt.h>
5417#endif
5418
5419int test() {
5420	int a;
5421	char **opts = NULL;
5422	struct timeval tv;
5423	char *t;
5424	time_t time = 0;
5425	char *buf = NULL;
5426	const char* str = NULL;
5427	struct msghdr msg;
5428	msg.msg_control = 0;
5429	t = ctime_r(&time, buf);
5430	tv.tv_usec = 10;
5431	srandom(32);
5432	a = getopt(2, opts, "a");
5433	a = isascii(32);
5434	str = gai_strerror(0);
5435	if(str && t && tv.tv_usec && msg.msg_control)
5436		a = 0;
5437	return a;
5438}
5439' > conftest.c
5440echo 'void f(){}' >>conftest.c
5441if test -z "`$CC $CPPFLAGS $CFLAGS $ERRFLAG -c conftest.c 2>&1`"; then
5442eval "cv_prog_cc_flag_needed_$cache=no"
5443else
5444
5445if 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
5446eval "cv_prog_cc_flag_needed_$cache=yes"
5447else
5448eval "cv_prog_cc_flag_needed_$cache=fail"
5449#echo 'Test with flag fails too!'
5450#cat conftest.c
5451#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"
5452#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`
5453#exit 1
5454fi
5455
5456fi
5457rm -f conftest conftest.c conftest.o
5458
5459fi
5460
5461if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = yes"; then
5462{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5463$as_echo "yes" >&6; }
5464:
5465CFLAGS="$CFLAGS $C99FLAG -D__EXTENSIONS__ -D_BSD_SOURCE -D_DEFAULT_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -D_ALL_SOURCE"
5466else
5467if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = no"; then
5468{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5469$as_echo "no" >&6; }
5470#echo 'Test with flag is no!'
5471#cat conftest.c
5472#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"
5473#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`
5474#exit 1
5475:
5476
5477else
5478{ $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
5479$as_echo "failed" >&6; }
5480:
5481
5482fi
5483fi
5484
5485
5486
5487
5488
5489{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we need $C99FLAG as a flag for $CC" >&5
5490$as_echo_n "checking whether we need $C99FLAG as a flag for $CC... " >&6; }
5491cache=`$as_echo "$C99FLAG" | $as_tr_sh`
5492if eval \${cv_prog_cc_flag_needed_$cache+:} false; then :
5493  $as_echo_n "(cached) " >&6
5494else
5495
5496echo '
5497#include <stdbool.h>
5498#include <ctype.h>
5499int test() {
5500        int a = 0;
5501        return a;
5502}
5503' > conftest.c
5504echo 'void f(){}' >>conftest.c
5505if test -z "`$CC $CPPFLAGS $CFLAGS $ERRFLAG -c conftest.c 2>&1`"; then
5506eval "cv_prog_cc_flag_needed_$cache=no"
5507else
5508
5509if test -z "`$CC $CPPFLAGS $CFLAGS $C99FLAG $ERRFLAG -c conftest.c 2>&1`"; then
5510eval "cv_prog_cc_flag_needed_$cache=yes"
5511else
5512eval "cv_prog_cc_flag_needed_$cache=fail"
5513#echo 'Test with flag fails too!'
5514#cat conftest.c
5515#echo "$CC $CPPFLAGS $CFLAGS $C99FLAG $ERRFLAG -c conftest.c 2>&1"
5516#echo `$CC $CPPFLAGS $CFLAGS $C99FLAG $ERRFLAG -c conftest.c 2>&1`
5517#exit 1
5518fi
5519
5520fi
5521rm -f conftest conftest.c conftest.o
5522
5523fi
5524
5525if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = yes"; then
5526{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5527$as_echo "yes" >&6; }
5528:
5529CFLAGS="$CFLAGS $C99FLAG"
5530else
5531if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = no"; then
5532{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5533$as_echo "no" >&6; }
5534#echo 'Test with flag is no!'
5535#cat conftest.c
5536#echo "$CC $CPPFLAGS $CFLAGS $C99FLAG $ERRFLAG -c conftest.c 2>&1"
5537#echo `$CC $CPPFLAGS $CFLAGS $C99FLAG $ERRFLAG -c conftest.c 2>&1`
5538#exit 1
5539:
5540
5541else
5542{ $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
5543$as_echo "failed" >&6; }
5544:
5545
5546fi
5547fi
5548
5549
5550
5551
5552
5553{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we need -D_BSD_SOURCE -D_DEFAULT_SOURCE as a flag for $CC" >&5
5554$as_echo_n "checking whether we need -D_BSD_SOURCE -D_DEFAULT_SOURCE as a flag for $CC... " >&6; }
5555cache=_D_BSD_SOURCE__D_DEFAULT_SOURCE
5556if eval \${cv_prog_cc_flag_needed_$cache+:} false; then :
5557  $as_echo_n "(cached) " >&6
5558else
5559
5560echo '
5561#include <ctype.h>
5562
5563int test() {
5564        int a;
5565        a = isascii(32);
5566        return a;
5567}
5568' > conftest.c
5569echo 'void f(){}' >>conftest.c
5570if test -z "`$CC $CPPFLAGS $CFLAGS $ERRFLAG -c conftest.c 2>&1`"; then
5571eval "cv_prog_cc_flag_needed_$cache=no"
5572else
5573
5574if test -z "`$CC $CPPFLAGS $CFLAGS -D_BSD_SOURCE -D_DEFAULT_SOURCE $ERRFLAG -c conftest.c 2>&1`"; then
5575eval "cv_prog_cc_flag_needed_$cache=yes"
5576else
5577eval "cv_prog_cc_flag_needed_$cache=fail"
5578#echo 'Test with flag fails too!'
5579#cat conftest.c
5580#echo "$CC $CPPFLAGS $CFLAGS -D_BSD_SOURCE -D_DEFAULT_SOURCE $ERRFLAG -c conftest.c 2>&1"
5581#echo `$CC $CPPFLAGS $CFLAGS -D_BSD_SOURCE -D_DEFAULT_SOURCE $ERRFLAG -c conftest.c 2>&1`
5582#exit 1
5583fi
5584
5585fi
5586rm -f conftest conftest.c conftest.o
5587
5588fi
5589
5590if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = yes"; then
5591{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5592$as_echo "yes" >&6; }
5593:
5594CFLAGS="$CFLAGS -D_BSD_SOURCE -D_DEFAULT_SOURCE"
5595else
5596if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = no"; then
5597{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5598$as_echo "no" >&6; }
5599#echo 'Test with flag is no!'
5600#cat conftest.c
5601#echo "$CC $CPPFLAGS $CFLAGS -D_BSD_SOURCE -D_DEFAULT_SOURCE $ERRFLAG -c conftest.c 2>&1"
5602#echo `$CC $CPPFLAGS $CFLAGS -D_BSD_SOURCE -D_DEFAULT_SOURCE $ERRFLAG -c conftest.c 2>&1`
5603#exit 1
5604:
5605
5606else
5607{ $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
5608$as_echo "failed" >&6; }
5609:
5610
5611fi
5612fi
5613
5614
5615
5616
5617
5618{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we need -D_GNU_SOURCE as a flag for $CC" >&5
5619$as_echo_n "checking whether we need -D_GNU_SOURCE as a flag for $CC... " >&6; }
5620cache=_D_GNU_SOURCE
5621if eval \${cv_prog_cc_flag_needed_$cache+:} false; then :
5622  $as_echo_n "(cached) " >&6
5623else
5624
5625echo '
5626#include <netinet/in.h>
5627
5628int test() {
5629        struct in6_pktinfo inf;
5630	int a = (int)sizeof(inf);
5631        return a;
5632}
5633' > conftest.c
5634echo 'void f(){}' >>conftest.c
5635if test -z "`$CC $CPPFLAGS $CFLAGS $ERRFLAG -c conftest.c 2>&1`"; then
5636eval "cv_prog_cc_flag_needed_$cache=no"
5637else
5638
5639if test -z "`$CC $CPPFLAGS $CFLAGS -D_GNU_SOURCE $ERRFLAG -c conftest.c 2>&1`"; then
5640eval "cv_prog_cc_flag_needed_$cache=yes"
5641else
5642eval "cv_prog_cc_flag_needed_$cache=fail"
5643#echo 'Test with flag fails too!'
5644#cat conftest.c
5645#echo "$CC $CPPFLAGS $CFLAGS -D_GNU_SOURCE $ERRFLAG -c conftest.c 2>&1"
5646#echo `$CC $CPPFLAGS $CFLAGS -D_GNU_SOURCE $ERRFLAG -c conftest.c 2>&1`
5647#exit 1
5648fi
5649
5650fi
5651rm -f conftest conftest.c conftest.o
5652
5653fi
5654
5655if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = yes"; then
5656{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5657$as_echo "yes" >&6; }
5658:
5659CFLAGS="$CFLAGS -D_GNU_SOURCE"
5660else
5661if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = no"; then
5662{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5663$as_echo "no" >&6; }
5664#echo 'Test with flag is no!'
5665#cat conftest.c
5666#echo "$CC $CPPFLAGS $CFLAGS -D_GNU_SOURCE $ERRFLAG -c conftest.c 2>&1"
5667#echo `$CC $CPPFLAGS $CFLAGS -D_GNU_SOURCE $ERRFLAG -c conftest.c 2>&1`
5668#exit 1
5669:
5670
5671else
5672{ $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
5673$as_echo "failed" >&6; }
5674:
5675
5676fi
5677fi
5678
5679
5680# check again for GNU_SOURCE for setresgid. May fail if setresgid
5681# is not available at all. -D_FRSRESGID is to make this check unique.
5682# otherwise we would get the previous cached result.
5683
5684
5685
5686{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we need -D_GNU_SOURCE -D_FRSRESGID as a flag for $CC" >&5
5687$as_echo_n "checking whether we need -D_GNU_SOURCE -D_FRSRESGID as a flag for $CC... " >&6; }
5688cache=_D_GNU_SOURCE__D_FRSRESGID
5689if eval \${cv_prog_cc_flag_needed_$cache+:} false; then :
5690  $as_echo_n "(cached) " >&6
5691else
5692
5693echo '
5694#include <unistd.h>
5695
5696int test() {
5697	int a = setresgid(0,0,0);
5698	a = setresuid(0,0,0);
5699        return a;
5700}
5701' > conftest.c
5702echo 'void f(){}' >>conftest.c
5703if test -z "`$CC $CPPFLAGS $CFLAGS $ERRFLAG -c conftest.c 2>&1`"; then
5704eval "cv_prog_cc_flag_needed_$cache=no"
5705else
5706
5707if test -z "`$CC $CPPFLAGS $CFLAGS -D_GNU_SOURCE -D_FRSRESGID $ERRFLAG -c conftest.c 2>&1`"; then
5708eval "cv_prog_cc_flag_needed_$cache=yes"
5709else
5710eval "cv_prog_cc_flag_needed_$cache=fail"
5711#echo 'Test with flag fails too!'
5712#cat conftest.c
5713#echo "$CC $CPPFLAGS $CFLAGS -D_GNU_SOURCE -D_FRSRESGID $ERRFLAG -c conftest.c 2>&1"
5714#echo `$CC $CPPFLAGS $CFLAGS -D_GNU_SOURCE -D_FRSRESGID $ERRFLAG -c conftest.c 2>&1`
5715#exit 1
5716fi
5717
5718fi
5719rm -f conftest conftest.c conftest.o
5720
5721fi
5722
5723if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = yes"; then
5724{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5725$as_echo "yes" >&6; }
5726:
5727CFLAGS="$CFLAGS -D_GNU_SOURCE"
5728else
5729if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = no"; then
5730{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5731$as_echo "no" >&6; }
5732#echo 'Test with flag is no!'
5733#cat conftest.c
5734#echo "$CC $CPPFLAGS $CFLAGS -D_GNU_SOURCE -D_FRSRESGID $ERRFLAG -c conftest.c 2>&1"
5735#echo `$CC $CPPFLAGS $CFLAGS -D_GNU_SOURCE -D_FRSRESGID $ERRFLAG -c conftest.c 2>&1`
5736#exit 1
5737:
5738
5739else
5740{ $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
5741$as_echo "failed" >&6; }
5742:
5743
5744fi
5745fi
5746
5747
5748
5749
5750
5751{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we need -D_POSIX_C_SOURCE=200112 as a flag for $CC" >&5
5752$as_echo_n "checking whether we need -D_POSIX_C_SOURCE=200112 as a flag for $CC... " >&6; }
5753cache=_D_POSIX_C_SOURCE_200112
5754if eval \${cv_prog_cc_flag_needed_$cache+:} false; then :
5755  $as_echo_n "(cached) " >&6
5756else
5757
5758echo '
5759#include "confdefs.h"
5760#ifdef HAVE_TIME_H
5761#include <time.h>
5762#endif
5763#include <netdb.h>
5764
5765int test() {
5766        int a = 0;
5767        char *t;
5768        time_t time = 0;
5769        char *buf = NULL;
5770	const char* str = NULL;
5771        t = ctime_r(&time, buf);
5772	str = gai_strerror(0);
5773	if(t && str)
5774		a = 0;
5775        return a;
5776}
5777' > conftest.c
5778echo 'void f(){}' >>conftest.c
5779if test -z "`$CC $CPPFLAGS $CFLAGS $ERRFLAG -c conftest.c 2>&1`"; then
5780eval "cv_prog_cc_flag_needed_$cache=no"
5781else
5782
5783if test -z "`$CC $CPPFLAGS $CFLAGS -D_POSIX_C_SOURCE=200112 $ERRFLAG -c conftest.c 2>&1`"; then
5784eval "cv_prog_cc_flag_needed_$cache=yes"
5785else
5786eval "cv_prog_cc_flag_needed_$cache=fail"
5787#echo 'Test with flag fails too!'
5788#cat conftest.c
5789#echo "$CC $CPPFLAGS $CFLAGS -D_POSIX_C_SOURCE=200112 $ERRFLAG -c conftest.c 2>&1"
5790#echo `$CC $CPPFLAGS $CFLAGS -D_POSIX_C_SOURCE=200112 $ERRFLAG -c conftest.c 2>&1`
5791#exit 1
5792fi
5793
5794fi
5795rm -f conftest conftest.c conftest.o
5796
5797fi
5798
5799if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = yes"; then
5800{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5801$as_echo "yes" >&6; }
5802:
5803CFLAGS="$CFLAGS -D_POSIX_C_SOURCE=200112"
5804else
5805if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = no"; then
5806{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5807$as_echo "no" >&6; }
5808#echo 'Test with flag is no!'
5809#cat conftest.c
5810#echo "$CC $CPPFLAGS $CFLAGS -D_POSIX_C_SOURCE=200112 $ERRFLAG -c conftest.c 2>&1"
5811#echo `$CC $CPPFLAGS $CFLAGS -D_POSIX_C_SOURCE=200112 $ERRFLAG -c conftest.c 2>&1`
5812#exit 1
5813:
5814
5815else
5816{ $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
5817$as_echo "failed" >&6; }
5818:
5819
5820fi
5821fi
5822
5823
5824
5825
5826
5827{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we need -D__EXTENSIONS__ as a flag for $CC" >&5
5828$as_echo_n "checking whether we need -D__EXTENSIONS__ as a flag for $CC... " >&6; }
5829cache=_D__EXTENSIONS__
5830if eval \${cv_prog_cc_flag_needed_$cache+:} false; then :
5831  $as_echo_n "(cached) " >&6
5832else
5833
5834echo '
5835#include "confdefs.h"
5836#include <stdlib.h>
5837#include <ctype.h>
5838#include <sys/time.h>
5839#ifdef HAVE_TIME_H
5840#include <time.h>
5841#endif
5842#include <unistd.h>
5843#ifdef HAVE_GETOPT_H
5844#include <getopt.h>
5845#endif
5846
5847int test() {
5848        int a;
5849        char **opts = NULL;
5850        struct timeval tv;
5851        tv.tv_usec = 10;
5852        srandom(32);
5853        a = getopt(2, opts, "a");
5854        a = isascii(32);
5855	if(tv.tv_usec)
5856		a = 0;
5857        return a;
5858}
5859' > conftest.c
5860echo 'void f(){}' >>conftest.c
5861if test -z "`$CC $CPPFLAGS $CFLAGS $ERRFLAG -c conftest.c 2>&1`"; then
5862eval "cv_prog_cc_flag_needed_$cache=no"
5863else
5864
5865if test -z "`$CC $CPPFLAGS $CFLAGS -D__EXTENSIONS__ $ERRFLAG -c conftest.c 2>&1`"; then
5866eval "cv_prog_cc_flag_needed_$cache=yes"
5867else
5868eval "cv_prog_cc_flag_needed_$cache=fail"
5869#echo 'Test with flag fails too!'
5870#cat conftest.c
5871#echo "$CC $CPPFLAGS $CFLAGS -D__EXTENSIONS__ $ERRFLAG -c conftest.c 2>&1"
5872#echo `$CC $CPPFLAGS $CFLAGS -D__EXTENSIONS__ $ERRFLAG -c conftest.c 2>&1`
5873#exit 1
5874fi
5875
5876fi
5877rm -f conftest conftest.c conftest.o
5878
5879fi
5880
5881if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = yes"; then
5882{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5883$as_echo "yes" >&6; }
5884:
5885CFLAGS="$CFLAGS -D__EXTENSIONS__"
5886else
5887if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = no"; then
5888{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5889$as_echo "no" >&6; }
5890#echo 'Test with flag is no!'
5891#cat conftest.c
5892#echo "$CC $CPPFLAGS $CFLAGS -D__EXTENSIONS__ $ERRFLAG -c conftest.c 2>&1"
5893#echo `$CC $CPPFLAGS $CFLAGS -D__EXTENSIONS__ $ERRFLAG -c conftest.c 2>&1`
5894#exit 1
5895:
5896
5897else
5898{ $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
5899$as_echo "failed" >&6; }
5900:
5901
5902fi
5903fi
5904
5905
5906
5907
5908# debug mode flags warnings
5909# Check whether --enable-checking was given.
5910if test "${enable_checking+set}" = set; then :
5911  enableval=$enable_checking;
5912fi
5913
5914# Check whether --enable-debug was given.
5915if test "${enable_debug+set}" = set; then :
5916  enableval=$enable_debug;
5917fi
5918
5919if test "$enable_debug" = "yes"; then debug_enabled="$enable_debug";
5920else debug_enabled="$enable_checking"; fi
5921
5922case "$debug_enabled" in
5923        yes)
5924
5925
5926{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -W" >&5
5927$as_echo_n "checking whether $CC supports -W... " >&6; }
5928cache=`echo W | sed 'y%.=/+-%___p_%'`
5929if eval \${cv_prog_cc_flag_$cache+:} false; then :
5930  $as_echo_n "(cached) " >&6
5931else
5932
5933echo 'void f(void){}' >conftest.c
5934if test -z "`$CC $CPPFLAGS $CFLAGS -W -c conftest.c 2>&1`"; then
5935eval "cv_prog_cc_flag_$cache=yes"
5936else
5937eval "cv_prog_cc_flag_$cache=no"
5938fi
5939rm -f conftest conftest.o conftest.c
5940
5941fi
5942
5943if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
5944{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5945$as_echo "yes" >&6; }
5946:
5947CFLAGS="$CFLAGS -W"
5948else
5949{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5950$as_echo "no" >&6; }
5951:
5952
5953fi
5954
5955
5956
5957{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wall" >&5
5958$as_echo_n "checking whether $CC supports -Wall... " >&6; }
5959cache=`echo Wall | sed 'y%.=/+-%___p_%'`
5960if eval \${cv_prog_cc_flag_$cache+:} false; then :
5961  $as_echo_n "(cached) " >&6
5962else
5963
5964echo 'void f(void){}' >conftest.c
5965if test -z "`$CC $CPPFLAGS $CFLAGS -Wall -c conftest.c 2>&1`"; then
5966eval "cv_prog_cc_flag_$cache=yes"
5967else
5968eval "cv_prog_cc_flag_$cache=no"
5969fi
5970rm -f conftest conftest.o conftest.c
5971
5972fi
5973
5974if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
5975{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5976$as_echo "yes" >&6; }
5977:
5978CFLAGS="$CFLAGS -Wall"
5979else
5980{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5981$as_echo "no" >&6; }
5982:
5983
5984fi
5985
5986
5987
5988{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wextra" >&5
5989$as_echo_n "checking whether $CC supports -Wextra... " >&6; }
5990cache=`echo Wextra | sed 'y%.=/+-%___p_%'`
5991if eval \${cv_prog_cc_flag_$cache+:} false; then :
5992  $as_echo_n "(cached) " >&6
5993else
5994
5995echo 'void f(void){}' >conftest.c
5996if test -z "`$CC $CPPFLAGS $CFLAGS -Wextra -c conftest.c 2>&1`"; then
5997eval "cv_prog_cc_flag_$cache=yes"
5998else
5999eval "cv_prog_cc_flag_$cache=no"
6000fi
6001rm -f conftest conftest.o conftest.c
6002
6003fi
6004
6005if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
6006{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6007$as_echo "yes" >&6; }
6008:
6009CFLAGS="$CFLAGS -Wextra"
6010else
6011{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6012$as_echo "no" >&6; }
6013:
6014
6015fi
6016
6017
6018
6019{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wdeclaration-after-statement" >&5
6020$as_echo_n "checking whether $CC supports -Wdeclaration-after-statement... " >&6; }
6021cache=`echo Wdeclaration-after-statement | sed 'y%.=/+-%___p_%'`
6022if eval \${cv_prog_cc_flag_$cache+:} false; then :
6023  $as_echo_n "(cached) " >&6
6024else
6025
6026echo 'void f(void){}' >conftest.c
6027if test -z "`$CC $CPPFLAGS $CFLAGS -Wdeclaration-after-statement -c conftest.c 2>&1`"; then
6028eval "cv_prog_cc_flag_$cache=yes"
6029else
6030eval "cv_prog_cc_flag_$cache=no"
6031fi
6032rm -f conftest conftest.o conftest.c
6033
6034fi
6035
6036if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
6037{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6038$as_echo "yes" >&6; }
6039:
6040CFLAGS="$CFLAGS -Wdeclaration-after-statement"
6041else
6042{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6043$as_echo "no" >&6; }
6044:
6045
6046fi
6047
6048
6049$as_echo "#define UNBOUND_DEBUG /**/" >>confdefs.h
6050
6051		;;
6052	no|*)
6053		# nothing to do.
6054		;;
6055esac
6056if test "$default_cflags" = "yes"; then
6057	# only when CFLAGS was "" at the start, if the users wants to
6058	# override we shouldn't add default cflags, because they wouldn't
6059	# be able to turn off these options and set the CFLAGS wanted.
6060
6061    # Check whether --enable-flto was given.
6062if test "${enable_flto+set}" = set; then :
6063  enableval=$enable_flto;
6064fi
6065
6066    if test "x$enable_flto" != "xno"; then :
6067
6068        { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -flto" >&5
6069$as_echo_n "checking if $CC supports -flto... " >&6; }
6070        BAKCFLAGS="$CFLAGS"
6071        CFLAGS="$CFLAGS -flto"
6072        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6073/* end confdefs.h.  */
6074
6075int
6076main ()
6077{
6078
6079  ;
6080  return 0;
6081}
6082_ACEOF
6083if ac_fn_c_try_link "$LINENO"; then :
6084
6085            if $CC $CFLAGS -o conftest conftest.c 2>&1 | $GREP -e "warning: no debug symbols in executable" -e "warning: object" >/dev/null; then
6086                CFLAGS="$BAKCFLAGS"
6087                { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6088$as_echo "no" >&6; }
6089            else
6090                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6091$as_echo "yes" >&6; }
6092            fi
6093            rm -f conftest conftest.c conftest.o
6094
6095else
6096  CFLAGS="$BAKCFLAGS" ; { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6097$as_echo "no" >&6; }
6098fi
6099rm -f core conftest.err conftest.$ac_objext \
6100    conftest$ac_exeext conftest.$ac_ext
6101
6102fi
6103
6104
6105    # Check whether --enable-pie was given.
6106if test "${enable_pie+set}" = set; then :
6107  enableval=$enable_pie;
6108fi
6109
6110    if test "x$enable_pie" = "xyes"; then :
6111
6112	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports PIE" >&5
6113$as_echo_n "checking if $CC supports PIE... " >&6; }
6114	BAKLDFLAGS="$LDFLAGS"
6115	BAKCFLAGS="$CFLAGS"
6116	LDFLAGS="$LDFLAGS -pie"
6117	CFLAGS="$CFLAGS -fPIE"
6118	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6119/* end confdefs.h.  */
6120
6121int
6122main ()
6123{
6124
6125  ;
6126  return 0;
6127}
6128_ACEOF
6129if ac_fn_c_try_link "$LINENO"; then :
6130
6131	    if $CC $CFLAGS $LDFLAGS -o conftest conftest.c 2>&1 | grep "warning: no debug symbols in executable" >/dev/null; then
6132		LDFLAGS="$BAKLDFLAGS"
6133		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6134$as_echo "no" >&6; }
6135	    else
6136		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6137$as_echo "yes" >&6; }
6138	    fi
6139	    rm -f conftest conftest.c conftest.o
6140
6141else
6142  LDFLAGS="$BAKLDFLAGS" ; CFLAGS="$BAKCFLAGS" ; { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6143$as_echo "no" >&6; }
6144fi
6145rm -f core conftest.err conftest.$ac_objext \
6146    conftest$ac_exeext conftest.$ac_ext
6147
6148fi
6149
6150
6151    # Check whether --enable-relro_now was given.
6152if test "${enable_relro_now+set}" = set; then :
6153  enableval=$enable_relro_now;
6154fi
6155
6156    if test "x$enable_relro_now" = "xyes"; then :
6157
6158	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wl,-z,relro,-z,now" >&5
6159$as_echo_n "checking if $CC supports -Wl,-z,relro,-z,now... " >&6; }
6160	BAKLDFLAGS="$LDFLAGS"
6161	LDFLAGS="$LDFLAGS -Wl,-z,relro,-z,now"
6162	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6163/* end confdefs.h.  */
6164
6165int
6166main ()
6167{
6168
6169  ;
6170  return 0;
6171}
6172_ACEOF
6173if ac_fn_c_try_link "$LINENO"; then :
6174
6175	    if $CC $CFLAGS $LDFLAGS -o conftest conftest.c 2>&1 | grep "warning: no debug symbols in executable" >/dev/null; then
6176		LDFLAGS="$BAKLDFLAGS"
6177		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6178$as_echo "no" >&6; }
6179	    else
6180		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6181$as_echo "yes" >&6; }
6182	    fi
6183	    rm -f conftest conftest.c conftest.o
6184
6185else
6186  LDFLAGS="$BAKLDFLAGS" ; { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6187$as_echo "no" >&6; }
6188fi
6189rm -f core conftest.err conftest.$ac_objext \
6190    conftest$ac_exeext conftest.$ac_ext
6191
6192fi
6193
6194fi
6195
6196{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
6197$as_echo_n "checking for inline... " >&6; }
6198if ${ac_cv_c_inline+:} false; then :
6199  $as_echo_n "(cached) " >&6
6200else
6201  ac_cv_c_inline=no
6202for ac_kw in inline __inline__ __inline; do
6203  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6204/* end confdefs.h.  */
6205#ifndef __cplusplus
6206typedef int foo_t;
6207static $ac_kw foo_t static_foo () {return 0; }
6208$ac_kw foo_t foo () {return 0; }
6209#endif
6210
6211_ACEOF
6212if ac_fn_c_try_compile "$LINENO"; then :
6213  ac_cv_c_inline=$ac_kw
6214fi
6215rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6216  test "$ac_cv_c_inline" != no && break
6217done
6218
6219fi
6220{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
6221$as_echo "$ac_cv_c_inline" >&6; }
6222
6223case $ac_cv_c_inline in
6224  inline | yes) ;;
6225  *)
6226    case $ac_cv_c_inline in
6227      no) ac_val=;;
6228      *) ac_val=$ac_cv_c_inline;;
6229    esac
6230    cat >>confdefs.h <<_ACEOF
6231#ifndef __cplusplus
6232#define inline $ac_val
6233#endif
6234_ACEOF
6235    ;;
6236esac
6237
6238
6239{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler (${CC-cc}) accepts the \"format\" attribute" >&5
6240$as_echo_n "checking whether the C compiler (${CC-cc}) accepts the \"format\" attribute... " >&6; }
6241if ${ac_cv_c_format_attribute+:} false; then :
6242  $as_echo_n "(cached) " >&6
6243else
6244  ac_cv_c_format_attribute=no
6245cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6246/* end confdefs.h.  */
6247#include <stdio.h>
6248void f (char *format, ...) __attribute__ ((format (printf, 1, 2)));
6249void (*pf) (char *format, ...) __attribute__ ((format (printf, 1, 2)));
6250
6251int
6252main ()
6253{
6254
6255   f ("%s", "str");
6256
6257  ;
6258  return 0;
6259}
6260_ACEOF
6261if ac_fn_c_try_compile "$LINENO"; then :
6262  ac_cv_c_format_attribute="yes"
6263else
6264  ac_cv_c_format_attribute="no"
6265fi
6266rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6267
6268fi
6269
6270
6271{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_format_attribute" >&5
6272$as_echo "$ac_cv_c_format_attribute" >&6; }
6273if test $ac_cv_c_format_attribute = yes; then
6274
6275$as_echo "#define HAVE_ATTR_FORMAT 1" >>confdefs.h
6276
6277fi
6278
6279
6280{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler (${CC-cc}) accepts the \"unused\" attribute" >&5
6281$as_echo_n "checking whether the C compiler (${CC-cc}) accepts the \"unused\" attribute... " >&6; }
6282if ${ac_cv_c_unused_attribute+:} false; then :
6283  $as_echo_n "(cached) " >&6
6284else
6285  ac_cv_c_unused_attribute=no
6286cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6287/* end confdefs.h.  */
6288#include <stdio.h>
6289void f (char *u __attribute__((unused)));
6290
6291int
6292main ()
6293{
6294
6295   f ("x");
6296
6297  ;
6298  return 0;
6299}
6300_ACEOF
6301if ac_fn_c_try_compile "$LINENO"; then :
6302  ac_cv_c_unused_attribute="yes"
6303else
6304  ac_cv_c_unused_attribute="no"
6305fi
6306rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6307
6308fi
6309
6310
6311
6312
6313{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_unused_attribute" >&5
6314$as_echo "$ac_cv_c_unused_attribute" >&6; }
6315if test $ac_cv_c_unused_attribute = yes; then
6316
6317$as_echo "#define HAVE_ATTR_UNUSED 1" >>confdefs.h
6318
6319fi
6320
6321
6322
6323
6324{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler (${CC-cc}) accepts the \"weak\" attribute" >&5
6325$as_echo_n "checking whether the C compiler (${CC-cc}) accepts the \"weak\" attribute... " >&6; }
6326if ${ac_cv_c_weak_attribute+:} false; then :
6327  $as_echo_n "(cached) " >&6
6328else
6329  ac_cv_c_weak_attribute=no
6330cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6331/* end confdefs.h.  */
6332 #include <stdio.h>
6333__attribute__((weak)) void f(int x) { printf("%d", x); }
6334
6335int
6336main ()
6337{
6338
6339   f(1);
6340
6341  ;
6342  return 0;
6343}
6344_ACEOF
6345if ac_fn_c_try_compile "$LINENO"; then :
6346  ac_cv_c_weak_attribute="yes"
6347else
6348  ac_cv_c_weak_attribute="no"
6349fi
6350rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6351
6352fi
6353
6354
6355{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_weak_attribute" >&5
6356$as_echo "$ac_cv_c_weak_attribute" >&6; }
6357if test $ac_cv_c_weak_attribute = yes; then
6358
6359$as_echo "#define HAVE_ATTR_WEAK 1" >>confdefs.h
6360
6361
6362$as_echo "#define ATTR_WEAK __attribute__((weak))" >>confdefs.h
6363
6364fi
6365
6366
6367
6368
6369{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler (${CC-cc}) accepts the \"noreturn\" attribute" >&5
6370$as_echo_n "checking whether the C compiler (${CC-cc}) accepts the \"noreturn\" attribute... " >&6; }
6371if ${ac_cv_c_noreturn_attribute+:} false; then :
6372  $as_echo_n "(cached) " >&6
6373else
6374  ac_cv_c_noreturn_attribute=no
6375cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6376/* end confdefs.h.  */
6377 #include <stdio.h>
6378__attribute__((noreturn)) void f(int x) { printf("%d", x); }
6379
6380int
6381main ()
6382{
6383
6384   f(1);
6385
6386  ;
6387  return 0;
6388}
6389_ACEOF
6390if ac_fn_c_try_compile "$LINENO"; then :
6391  ac_cv_c_noreturn_attribute="yes"
6392else
6393  ac_cv_c_noreturn_attribute="no"
6394fi
6395rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6396
6397fi
6398
6399
6400{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_noreturn_attribute" >&5
6401$as_echo "$ac_cv_c_noreturn_attribute" >&6; }
6402if test $ac_cv_c_noreturn_attribute = yes; then
6403
6404$as_echo "#define HAVE_ATTR_NORETURN 1" >>confdefs.h
6405
6406
6407$as_echo "#define ATTR_NORETURN __attribute__((__noreturn__))" >>confdefs.h
6408
6409fi
6410
6411
6412if test "$srcdir" != "."; then
6413	CPPFLAGS="$CPPFLAGS -I$srcdir"
6414fi
6415
6416
6417
6418
6419
6420for ac_prog in flex lex
6421do
6422  # Extract the first word of "$ac_prog", so it can be a program name with args.
6423set dummy $ac_prog; ac_word=$2
6424{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6425$as_echo_n "checking for $ac_word... " >&6; }
6426if ${ac_cv_prog_LEX+:} false; then :
6427  $as_echo_n "(cached) " >&6
6428else
6429  if test -n "$LEX"; then
6430  ac_cv_prog_LEX="$LEX" # Let the user override the test.
6431else
6432as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6433for as_dir in $PATH
6434do
6435  IFS=$as_save_IFS
6436  test -z "$as_dir" && as_dir=.
6437    for ac_exec_ext in '' $ac_executable_extensions; do
6438  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6439    ac_cv_prog_LEX="$ac_prog"
6440    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6441    break 2
6442  fi
6443done
6444  done
6445IFS=$as_save_IFS
6446
6447fi
6448fi
6449LEX=$ac_cv_prog_LEX
6450if test -n "$LEX"; then
6451  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LEX" >&5
6452$as_echo "$LEX" >&6; }
6453else
6454  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6455$as_echo "no" >&6; }
6456fi
6457
6458
6459  test -n "$LEX" && break
6460done
6461test -n "$LEX" || LEX=":"
6462
6463if test "x$LEX" != "x:"; then
6464  cat >conftest.l <<_ACEOF
6465%%
6466a { ECHO; }
6467b { REJECT; }
6468c { yymore (); }
6469d { yyless (1); }
6470e { /* IRIX 6.5 flex 2.5.4 underquotes its yyless argument.  */
6471    yyless ((input () != 0)); }
6472f { unput (yytext[0]); }
6473. { BEGIN INITIAL; }
6474%%
6475#ifdef YYTEXT_POINTER
6476extern char *yytext;
6477#endif
6478int
6479main (void)
6480{
6481  return ! yylex () + ! yywrap ();
6482}
6483_ACEOF
6484{ { ac_try="$LEX conftest.l"
6485case "(($ac_try" in
6486  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6487  *) ac_try_echo=$ac_try;;
6488esac
6489eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
6490$as_echo "$ac_try_echo"; } >&5
6491  (eval "$LEX conftest.l") 2>&5
6492  ac_status=$?
6493  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
6494  test $ac_status = 0; }
6495{ $as_echo "$as_me:${as_lineno-$LINENO}: checking lex output file root" >&5
6496$as_echo_n "checking lex output file root... " >&6; }
6497if ${ac_cv_prog_lex_root+:} false; then :
6498  $as_echo_n "(cached) " >&6
6499else
6500
6501if test -f lex.yy.c; then
6502  ac_cv_prog_lex_root=lex.yy
6503elif test -f lexyy.c; then
6504  ac_cv_prog_lex_root=lexyy
6505else
6506  as_fn_error $? "cannot find output from $LEX; giving up" "$LINENO" 5
6507fi
6508fi
6509{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_lex_root" >&5
6510$as_echo "$ac_cv_prog_lex_root" >&6; }
6511LEX_OUTPUT_ROOT=$ac_cv_prog_lex_root
6512
6513if test -z "${LEXLIB+set}"; then
6514  { $as_echo "$as_me:${as_lineno-$LINENO}: checking lex library" >&5
6515$as_echo_n "checking lex library... " >&6; }
6516if ${ac_cv_lib_lex+:} false; then :
6517  $as_echo_n "(cached) " >&6
6518else
6519
6520    ac_save_LIBS=$LIBS
6521    ac_cv_lib_lex='none needed'
6522    for ac_lib in '' -lfl -ll; do
6523      LIBS="$ac_lib $ac_save_LIBS"
6524      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6525/* end confdefs.h.  */
6526`cat $LEX_OUTPUT_ROOT.c`
6527_ACEOF
6528if ac_fn_c_try_link "$LINENO"; then :
6529  ac_cv_lib_lex=$ac_lib
6530fi
6531rm -f core conftest.err conftest.$ac_objext \
6532    conftest$ac_exeext conftest.$ac_ext
6533      test "$ac_cv_lib_lex" != 'none needed' && break
6534    done
6535    LIBS=$ac_save_LIBS
6536
6537fi
6538{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_lex" >&5
6539$as_echo "$ac_cv_lib_lex" >&6; }
6540  test "$ac_cv_lib_lex" != 'none needed' && LEXLIB=$ac_cv_lib_lex
6541fi
6542
6543
6544{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether yytext is a pointer" >&5
6545$as_echo_n "checking whether yytext is a pointer... " >&6; }
6546if ${ac_cv_prog_lex_yytext_pointer+:} false; then :
6547  $as_echo_n "(cached) " >&6
6548else
6549  # POSIX says lex can declare yytext either as a pointer or an array; the
6550# default is implementation-dependent.  Figure out which it is, since
6551# not all implementations provide the %pointer and %array declarations.
6552ac_cv_prog_lex_yytext_pointer=no
6553ac_save_LIBS=$LIBS
6554LIBS="$LEXLIB $ac_save_LIBS"
6555cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6556/* end confdefs.h.  */
6557
6558  #define YYTEXT_POINTER 1
6559`cat $LEX_OUTPUT_ROOT.c`
6560_ACEOF
6561if ac_fn_c_try_link "$LINENO"; then :
6562  ac_cv_prog_lex_yytext_pointer=yes
6563fi
6564rm -f core conftest.err conftest.$ac_objext \
6565    conftest$ac_exeext conftest.$ac_ext
6566LIBS=$ac_save_LIBS
6567
6568fi
6569{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_lex_yytext_pointer" >&5
6570$as_echo "$ac_cv_prog_lex_yytext_pointer" >&6; }
6571if test $ac_cv_prog_lex_yytext_pointer = yes; then
6572
6573$as_echo "#define YYTEXT_POINTER 1" >>confdefs.h
6574
6575fi
6576rm -f conftest.l $LEX_OUTPUT_ROOT.c
6577
6578fi
6579if test "$LEX" != "" -a "$LEX" != ":"; then
6580
6581	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for yylex_destroy" >&5
6582$as_echo_n "checking for yylex_destroy... " >&6; }
6583	if echo %% | $LEX -t 2>&1 | grep yylex_destroy >/dev/null 2>&1; then
6584
6585$as_echo "#define LEX_HAS_YYLEX_DESTROY 1" >>confdefs.h
6586
6587		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6588$as_echo "yes" >&6; }
6589	else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6590$as_echo "no" >&6; };
6591		LEX=":"
6592	fi
6593
6594fi
6595if test "$LEX" != "" -a "$LEX" != ":"; then
6596
6597	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lex %option" >&5
6598$as_echo_n "checking for lex %option... " >&6; }
6599	if cat <<EOF | $LEX -t 2>&1 | grep yy_delete_buffer >/dev/null 2>&1; then
6600%option nounput
6601%%
6602EOF
6603		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6604$as_echo "yes" >&6; }
6605	else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6606$as_echo "no" >&6; };
6607		LEX=":"
6608	fi
6609
6610fi
6611for ac_prog in 'bison -y' byacc
6612do
6613  # Extract the first word of "$ac_prog", so it can be a program name with args.
6614set dummy $ac_prog; ac_word=$2
6615{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6616$as_echo_n "checking for $ac_word... " >&6; }
6617if ${ac_cv_prog_YACC+:} false; then :
6618  $as_echo_n "(cached) " >&6
6619else
6620  if test -n "$YACC"; then
6621  ac_cv_prog_YACC="$YACC" # Let the user override the test.
6622else
6623as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6624for as_dir in $PATH
6625do
6626  IFS=$as_save_IFS
6627  test -z "$as_dir" && as_dir=.
6628    for ac_exec_ext in '' $ac_executable_extensions; do
6629  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6630    ac_cv_prog_YACC="$ac_prog"
6631    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6632    break 2
6633  fi
6634done
6635  done
6636IFS=$as_save_IFS
6637
6638fi
6639fi
6640YACC=$ac_cv_prog_YACC
6641if test -n "$YACC"; then
6642  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $YACC" >&5
6643$as_echo "$YACC" >&6; }
6644else
6645  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6646$as_echo "no" >&6; }
6647fi
6648
6649
6650  test -n "$YACC" && break
6651done
6652test -n "$YACC" || YACC="yacc"
6653
6654# Extract the first word of "doxygen", so it can be a program name with args.
6655set dummy doxygen; ac_word=$2
6656{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6657$as_echo_n "checking for $ac_word... " >&6; }
6658if ${ac_cv_prog_doxygen+:} false; then :
6659  $as_echo_n "(cached) " >&6
6660else
6661  if test -n "$doxygen"; then
6662  ac_cv_prog_doxygen="$doxygen" # Let the user override the test.
6663else
6664as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6665for as_dir in $PATH
6666do
6667  IFS=$as_save_IFS
6668  test -z "$as_dir" && as_dir=.
6669    for ac_exec_ext in '' $ac_executable_extensions; do
6670  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6671    ac_cv_prog_doxygen="doxygen"
6672    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6673    break 2
6674  fi
6675done
6676  done
6677IFS=$as_save_IFS
6678
6679fi
6680fi
6681doxygen=$ac_cv_prog_doxygen
6682if test -n "$doxygen"; then
6683  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $doxygen" >&5
6684$as_echo "$doxygen" >&6; }
6685else
6686  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6687$as_echo "no" >&6; }
6688fi
6689
6690
6691if test -n "$ac_tool_prefix"; then
6692  # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
6693set dummy ${ac_tool_prefix}strip; ac_word=$2
6694{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6695$as_echo_n "checking for $ac_word... " >&6; }
6696if ${ac_cv_prog_STRIP+:} false; then :
6697  $as_echo_n "(cached) " >&6
6698else
6699  if test -n "$STRIP"; then
6700  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
6701else
6702as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6703for as_dir in $PATH
6704do
6705  IFS=$as_save_IFS
6706  test -z "$as_dir" && as_dir=.
6707    for ac_exec_ext in '' $ac_executable_extensions; do
6708  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6709    ac_cv_prog_STRIP="${ac_tool_prefix}strip"
6710    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6711    break 2
6712  fi
6713done
6714  done
6715IFS=$as_save_IFS
6716
6717fi
6718fi
6719STRIP=$ac_cv_prog_STRIP
6720if test -n "$STRIP"; then
6721  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
6722$as_echo "$STRIP" >&6; }
6723else
6724  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6725$as_echo "no" >&6; }
6726fi
6727
6728
6729fi
6730if test -z "$ac_cv_prog_STRIP"; then
6731  ac_ct_STRIP=$STRIP
6732  # Extract the first word of "strip", so it can be a program name with args.
6733set dummy strip; ac_word=$2
6734{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6735$as_echo_n "checking for $ac_word... " >&6; }
6736if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
6737  $as_echo_n "(cached) " >&6
6738else
6739  if test -n "$ac_ct_STRIP"; then
6740  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
6741else
6742as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6743for as_dir in $PATH
6744do
6745  IFS=$as_save_IFS
6746  test -z "$as_dir" && as_dir=.
6747    for ac_exec_ext in '' $ac_executable_extensions; do
6748  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6749    ac_cv_prog_ac_ct_STRIP="strip"
6750    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6751    break 2
6752  fi
6753done
6754  done
6755IFS=$as_save_IFS
6756
6757fi
6758fi
6759ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
6760if test -n "$ac_ct_STRIP"; then
6761  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
6762$as_echo "$ac_ct_STRIP" >&6; }
6763else
6764  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6765$as_echo "no" >&6; }
6766fi
6767
6768  if test "x$ac_ct_STRIP" = x; then
6769    STRIP=""
6770  else
6771    case $cross_compiling:$ac_tool_warned in
6772yes:)
6773{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6774$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6775ac_tool_warned=yes ;;
6776esac
6777    STRIP=$ac_ct_STRIP
6778  fi
6779else
6780  STRIP="$ac_cv_prog_STRIP"
6781fi
6782
6783ac_aux_dir=
6784for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
6785  if test -f "$ac_dir/install-sh"; then
6786    ac_aux_dir=$ac_dir
6787    ac_install_sh="$ac_aux_dir/install-sh -c"
6788    break
6789  elif test -f "$ac_dir/install.sh"; then
6790    ac_aux_dir=$ac_dir
6791    ac_install_sh="$ac_aux_dir/install.sh -c"
6792    break
6793  elif test -f "$ac_dir/shtool"; then
6794    ac_aux_dir=$ac_dir
6795    ac_install_sh="$ac_aux_dir/shtool install -c"
6796    break
6797  fi
6798done
6799if test -z "$ac_aux_dir"; then
6800  as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
6801fi
6802
6803# These three variables are undocumented and unsupported,
6804# and are intended to be withdrawn in a future Autoconf release.
6805# They can cause serious problems if a builder's source tree is in a directory
6806# whose full name contains unusual characters.
6807ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
6808ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
6809ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
6810
6811
6812# Make sure we can run config.sub.
6813$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
6814  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
6815
6816{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
6817$as_echo_n "checking build system type... " >&6; }
6818if ${ac_cv_build+:} false; then :
6819  $as_echo_n "(cached) " >&6
6820else
6821  ac_build_alias=$build_alias
6822test "x$ac_build_alias" = x &&
6823  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
6824test "x$ac_build_alias" = x &&
6825  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
6826ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
6827  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
6828
6829fi
6830{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
6831$as_echo "$ac_cv_build" >&6; }
6832case $ac_cv_build in
6833*-*-*) ;;
6834*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
6835esac
6836build=$ac_cv_build
6837ac_save_IFS=$IFS; IFS='-'
6838set x $ac_cv_build
6839shift
6840build_cpu=$1
6841build_vendor=$2
6842shift; shift
6843# Remember, the first character of IFS is used to create $*,
6844# except with old shells:
6845build_os=$*
6846IFS=$ac_save_IFS
6847case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
6848
6849
6850{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
6851$as_echo_n "checking host system type... " >&6; }
6852if ${ac_cv_host+:} false; then :
6853  $as_echo_n "(cached) " >&6
6854else
6855  if test "x$host_alias" = x; then
6856  ac_cv_host=$ac_cv_build
6857else
6858  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
6859    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
6860fi
6861
6862fi
6863{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
6864$as_echo "$ac_cv_host" >&6; }
6865case $ac_cv_host in
6866*-*-*) ;;
6867*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
6868esac
6869host=$ac_cv_host
6870ac_save_IFS=$IFS; IFS='-'
6871set x $ac_cv_host
6872shift
6873host_cpu=$1
6874host_vendor=$2
6875shift; shift
6876# Remember, the first character of IFS is used to create $*,
6877# except with old shells:
6878host_os=$*
6879IFS=$ac_save_IFS
6880case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
6881
6882
6883
6884# skip these tests, we do not need them.
6885
6886
6887
6888
6889
6890
6891
6892
6893# always use ./libtool unless override from commandline (libtool=mylibtool)
6894if test -z "$libtool"; then
6895	libtool="./libtool"
6896fi
6897
6898# avoid libtool max commandline length test on systems that fork slowly.
6899
6900if echo "$host_os" | grep "sunos4" >/dev/null; then
6901	lt_cv_sys_max_cmd_len=32750;
6902fi
6903if test -n "$ac_tool_prefix"; then
6904  # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
6905set dummy ${ac_tool_prefix}ar; ac_word=$2
6906{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6907$as_echo_n "checking for $ac_word... " >&6; }
6908if ${ac_cv_path_AR+:} false; then :
6909  $as_echo_n "(cached) " >&6
6910else
6911  case $AR in
6912  [\\/]* | ?:[\\/]*)
6913  ac_cv_path_AR="$AR" # Let the user override the test with a path.
6914  ;;
6915  *)
6916  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6917for as_dir in $PATH
6918do
6919  IFS=$as_save_IFS
6920  test -z "$as_dir" && as_dir=.
6921    for ac_exec_ext in '' $ac_executable_extensions; do
6922  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6923    ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
6924    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6925    break 2
6926  fi
6927done
6928  done
6929IFS=$as_save_IFS
6930
6931  ;;
6932esac
6933fi
6934AR=$ac_cv_path_AR
6935if test -n "$AR"; then
6936  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
6937$as_echo "$AR" >&6; }
6938else
6939  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6940$as_echo "no" >&6; }
6941fi
6942
6943
6944fi
6945if test -z "$ac_cv_path_AR"; then
6946  ac_pt_AR=$AR
6947  # Extract the first word of "ar", so it can be a program name with args.
6948set dummy ar; ac_word=$2
6949{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6950$as_echo_n "checking for $ac_word... " >&6; }
6951if ${ac_cv_path_ac_pt_AR+:} false; then :
6952  $as_echo_n "(cached) " >&6
6953else
6954  case $ac_pt_AR in
6955  [\\/]* | ?:[\\/]*)
6956  ac_cv_path_ac_pt_AR="$ac_pt_AR" # Let the user override the test with a path.
6957  ;;
6958  *)
6959  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6960for as_dir in $PATH
6961do
6962  IFS=$as_save_IFS
6963  test -z "$as_dir" && as_dir=.
6964    for ac_exec_ext in '' $ac_executable_extensions; do
6965  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6966    ac_cv_path_ac_pt_AR="$as_dir/$ac_word$ac_exec_ext"
6967    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6968    break 2
6969  fi
6970done
6971  done
6972IFS=$as_save_IFS
6973
6974  ;;
6975esac
6976fi
6977ac_pt_AR=$ac_cv_path_ac_pt_AR
6978if test -n "$ac_pt_AR"; then
6979  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_AR" >&5
6980$as_echo "$ac_pt_AR" >&6; }
6981else
6982  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6983$as_echo "no" >&6; }
6984fi
6985
6986  if test "x$ac_pt_AR" = x; then
6987    AR="false"
6988  else
6989    case $cross_compiling:$ac_tool_warned in
6990yes:)
6991{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6992$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6993ac_tool_warned=yes ;;
6994esac
6995    AR=$ac_pt_AR
6996  fi
6997else
6998  AR="$ac_cv_path_AR"
6999fi
7000
7001if test $AR = false; then
7002	as_fn_error $? "Cannot find 'ar', please extend PATH to include it" "$LINENO" 5
7003fi
7004
7005case `pwd` in
7006  *\ * | *\	*)
7007    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5
7008$as_echo "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;;
7009esac
7010
7011
7012
7013macro_version='2.4.6'
7014macro_revision='2.4.6'
7015
7016
7017
7018
7019
7020
7021
7022
7023
7024
7025
7026
7027
7028ltmain=$ac_aux_dir/ltmain.sh
7029
7030# Backslashify metacharacters that are still active within
7031# double-quoted strings.
7032sed_quote_subst='s/\(["`$\\]\)/\\\1/g'
7033
7034# Same as above, but do not quote variable references.
7035double_quote_subst='s/\(["`\\]\)/\\\1/g'
7036
7037# Sed substitution to delay expansion of an escaped shell variable in a
7038# double_quote_subst'ed string.
7039delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
7040
7041# Sed substitution to delay expansion of an escaped single quote.
7042delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
7043
7044# Sed substitution to avoid accidental globbing in evaled expressions
7045no_glob_subst='s/\*/\\\*/g'
7046
7047ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
7048ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
7049ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
7050
7051{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5
7052$as_echo_n "checking how to print strings... " >&6; }
7053# Test print first, because it will be a builtin if present.
7054if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \
7055   test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
7056  ECHO='print -r --'
7057elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
7058  ECHO='printf %s\n'
7059else
7060  # Use this function as a fallback that always works.
7061  func_fallback_echo ()
7062  {
7063    eval 'cat <<_LTECHO_EOF
7064$1
7065_LTECHO_EOF'
7066  }
7067  ECHO='func_fallback_echo'
7068fi
7069
7070# func_echo_all arg...
7071# Invoke $ECHO with all args, space-separated.
7072func_echo_all ()
7073{
7074    $ECHO ""
7075}
7076
7077case $ECHO in
7078  printf*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: printf" >&5
7079$as_echo "printf" >&6; } ;;
7080  print*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: print -r" >&5
7081$as_echo "print -r" >&6; } ;;
7082  *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: cat" >&5
7083$as_echo "cat" >&6; } ;;
7084esac
7085
7086
7087
7088
7089
7090
7091
7092
7093
7094
7095
7096
7097
7098
7099{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
7100$as_echo_n "checking for a sed that does not truncate output... " >&6; }
7101if ${ac_cv_path_SED+:} false; then :
7102  $as_echo_n "(cached) " >&6
7103else
7104            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
7105     for ac_i in 1 2 3 4 5 6 7; do
7106       ac_script="$ac_script$as_nl$ac_script"
7107     done
7108     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
7109     { ac_script=; unset ac_script;}
7110     if test -z "$SED"; then
7111  ac_path_SED_found=false
7112  # Loop through the user's path and test for each of PROGNAME-LIST
7113  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7114for as_dir in $PATH
7115do
7116  IFS=$as_save_IFS
7117  test -z "$as_dir" && as_dir=.
7118    for ac_prog in sed gsed; do
7119    for ac_exec_ext in '' $ac_executable_extensions; do
7120      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
7121      as_fn_executable_p "$ac_path_SED" || continue
7122# Check for GNU ac_path_SED and select it if it is found.
7123  # Check for GNU $ac_path_SED
7124case `"$ac_path_SED" --version 2>&1` in
7125*GNU*)
7126  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
7127*)
7128  ac_count=0
7129  $as_echo_n 0123456789 >"conftest.in"
7130  while :
7131  do
7132    cat "conftest.in" "conftest.in" >"conftest.tmp"
7133    mv "conftest.tmp" "conftest.in"
7134    cp "conftest.in" "conftest.nl"
7135    $as_echo '' >> "conftest.nl"
7136    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
7137    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
7138    as_fn_arith $ac_count + 1 && ac_count=$as_val
7139    if test $ac_count -gt ${ac_path_SED_max-0}; then
7140      # Best one so far, save it but keep looking for a better one
7141      ac_cv_path_SED="$ac_path_SED"
7142      ac_path_SED_max=$ac_count
7143    fi
7144    # 10*(2^10) chars as input seems more than enough
7145    test $ac_count -gt 10 && break
7146  done
7147  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
7148esac
7149
7150      $ac_path_SED_found && break 3
7151    done
7152  done
7153  done
7154IFS=$as_save_IFS
7155  if test -z "$ac_cv_path_SED"; then
7156    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
7157  fi
7158else
7159  ac_cv_path_SED=$SED
7160fi
7161
7162fi
7163{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
7164$as_echo "$ac_cv_path_SED" >&6; }
7165 SED="$ac_cv_path_SED"
7166  rm -f conftest.sed
7167
7168test -z "$SED" && SED=sed
7169Xsed="$SED -e 1s/^X//"
7170
7171
7172
7173
7174
7175
7176
7177
7178
7179
7180
7181{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
7182$as_echo_n "checking for fgrep... " >&6; }
7183if ${ac_cv_path_FGREP+:} false; then :
7184  $as_echo_n "(cached) " >&6
7185else
7186  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
7187   then ac_cv_path_FGREP="$GREP -F"
7188   else
7189     if test -z "$FGREP"; then
7190  ac_path_FGREP_found=false
7191  # Loop through the user's path and test for each of PROGNAME-LIST
7192  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7193for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
7194do
7195  IFS=$as_save_IFS
7196  test -z "$as_dir" && as_dir=.
7197    for ac_prog in fgrep; do
7198    for ac_exec_ext in '' $ac_executable_extensions; do
7199      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
7200      as_fn_executable_p "$ac_path_FGREP" || continue
7201# Check for GNU ac_path_FGREP and select it if it is found.
7202  # Check for GNU $ac_path_FGREP
7203case `"$ac_path_FGREP" --version 2>&1` in
7204*GNU*)
7205  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
7206*)
7207  ac_count=0
7208  $as_echo_n 0123456789 >"conftest.in"
7209  while :
7210  do
7211    cat "conftest.in" "conftest.in" >"conftest.tmp"
7212    mv "conftest.tmp" "conftest.in"
7213    cp "conftest.in" "conftest.nl"
7214    $as_echo 'FGREP' >> "conftest.nl"
7215    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
7216    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
7217    as_fn_arith $ac_count + 1 && ac_count=$as_val
7218    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
7219      # Best one so far, save it but keep looking for a better one
7220      ac_cv_path_FGREP="$ac_path_FGREP"
7221      ac_path_FGREP_max=$ac_count
7222    fi
7223    # 10*(2^10) chars as input seems more than enough
7224    test $ac_count -gt 10 && break
7225  done
7226  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
7227esac
7228
7229      $ac_path_FGREP_found && break 3
7230    done
7231  done
7232  done
7233IFS=$as_save_IFS
7234  if test -z "$ac_cv_path_FGREP"; then
7235    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
7236  fi
7237else
7238  ac_cv_path_FGREP=$FGREP
7239fi
7240
7241   fi
7242fi
7243{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
7244$as_echo "$ac_cv_path_FGREP" >&6; }
7245 FGREP="$ac_cv_path_FGREP"
7246
7247
7248test -z "$GREP" && GREP=grep
7249
7250
7251
7252
7253
7254
7255
7256
7257
7258
7259
7260
7261
7262
7263
7264
7265
7266
7267
7268# Check whether --with-gnu-ld was given.
7269if test "${with_gnu_ld+set}" = set; then :
7270  withval=$with_gnu_ld; test no = "$withval" || with_gnu_ld=yes
7271else
7272  with_gnu_ld=no
7273fi
7274
7275ac_prog=ld
7276if test yes = "$GCC"; then
7277  # Check if gcc -print-prog-name=ld gives a path.
7278  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5
7279$as_echo_n "checking for ld used by $CC... " >&6; }
7280  case $host in
7281  *-*-mingw*)
7282    # gcc leaves a trailing carriage return, which upsets mingw
7283    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
7284  *)
7285    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
7286  esac
7287  case $ac_prog in
7288    # Accept absolute paths.
7289    [\\/]* | ?:[\\/]*)
7290      re_direlt='/[^/][^/]*/\.\./'
7291      # Canonicalize the pathname of ld
7292      ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
7293      while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
7294	ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
7295      done
7296      test -z "$LD" && LD=$ac_prog
7297      ;;
7298  "")
7299    # If it fails, then pretend we aren't using GCC.
7300    ac_prog=ld
7301    ;;
7302  *)
7303    # If it is relative, then search for the first ld in PATH.
7304    with_gnu_ld=unknown
7305    ;;
7306  esac
7307elif test yes = "$with_gnu_ld"; then
7308  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
7309$as_echo_n "checking for GNU ld... " >&6; }
7310else
7311  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
7312$as_echo_n "checking for non-GNU ld... " >&6; }
7313fi
7314if ${lt_cv_path_LD+:} false; then :
7315  $as_echo_n "(cached) " >&6
7316else
7317  if test -z "$LD"; then
7318  lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
7319  for ac_dir in $PATH; do
7320    IFS=$lt_save_ifs
7321    test -z "$ac_dir" && ac_dir=.
7322    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
7323      lt_cv_path_LD=$ac_dir/$ac_prog
7324      # Check to see if the program is GNU ld.  I'd rather use --version,
7325      # but apparently some variants of GNU ld only accept -v.
7326      # Break only if it was the GNU/non-GNU ld that we prefer.
7327      case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
7328      *GNU* | *'with BFD'*)
7329	test no != "$with_gnu_ld" && break
7330	;;
7331      *)
7332	test yes != "$with_gnu_ld" && break
7333	;;
7334      esac
7335    fi
7336  done
7337  IFS=$lt_save_ifs
7338else
7339  lt_cv_path_LD=$LD # Let the user override the test with a path.
7340fi
7341fi
7342
7343LD=$lt_cv_path_LD
7344if test -n "$LD"; then
7345  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
7346$as_echo "$LD" >&6; }
7347else
7348  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7349$as_echo "no" >&6; }
7350fi
7351test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
7352{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
7353$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
7354if ${lt_cv_prog_gnu_ld+:} false; then :
7355  $as_echo_n "(cached) " >&6
7356else
7357  # I'd rather use --version here, but apparently some GNU lds only accept -v.
7358case `$LD -v 2>&1 </dev/null` in
7359*GNU* | *'with BFD'*)
7360  lt_cv_prog_gnu_ld=yes
7361  ;;
7362*)
7363  lt_cv_prog_gnu_ld=no
7364  ;;
7365esac
7366fi
7367{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_gnu_ld" >&5
7368$as_echo "$lt_cv_prog_gnu_ld" >&6; }
7369with_gnu_ld=$lt_cv_prog_gnu_ld
7370
7371
7372
7373
7374
7375
7376
7377
7378
7379{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)" >&5
7380$as_echo_n "checking for BSD- or MS-compatible name lister (nm)... " >&6; }
7381if ${lt_cv_path_NM+:} false; then :
7382  $as_echo_n "(cached) " >&6
7383else
7384  if test -n "$NM"; then
7385  # Let the user override the test.
7386  lt_cv_path_NM=$NM
7387else
7388  lt_nm_to_check=${ac_tool_prefix}nm
7389  if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
7390    lt_nm_to_check="$lt_nm_to_check nm"
7391  fi
7392  for lt_tmp_nm in $lt_nm_to_check; do
7393    lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
7394    for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
7395      IFS=$lt_save_ifs
7396      test -z "$ac_dir" && ac_dir=.
7397      tmp_nm=$ac_dir/$lt_tmp_nm
7398      if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then
7399	# Check to see if the nm accepts a BSD-compat flag.
7400	# Adding the 'sed 1q' prevents false positives on HP-UX, which says:
7401	#   nm: unknown option "B" ignored
7402	# Tru64's nm complains that /dev/null is an invalid object file
7403	# MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty
7404	case $build_os in
7405	mingw*) lt_bad_file=conftest.nm/nofile ;;
7406	*) lt_bad_file=/dev/null ;;
7407	esac
7408	case `"$tmp_nm" -B $lt_bad_file 2>&1 | sed '1q'` in
7409	*$lt_bad_file* | *'Invalid file or object type'*)
7410	  lt_cv_path_NM="$tmp_nm -B"
7411	  break 2
7412	  ;;
7413	*)
7414	  case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
7415	  */dev/null*)
7416	    lt_cv_path_NM="$tmp_nm -p"
7417	    break 2
7418	    ;;
7419	  *)
7420	    lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
7421	    continue # so that we can try to find one that supports BSD flags
7422	    ;;
7423	  esac
7424	  ;;
7425	esac
7426      fi
7427    done
7428    IFS=$lt_save_ifs
7429  done
7430  : ${lt_cv_path_NM=no}
7431fi
7432fi
7433{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5
7434$as_echo "$lt_cv_path_NM" >&6; }
7435if test no != "$lt_cv_path_NM"; then
7436  NM=$lt_cv_path_NM
7437else
7438  # Didn't find any BSD compatible name lister, look for dumpbin.
7439  if test -n "$DUMPBIN"; then :
7440    # Let the user override the test.
7441  else
7442    if test -n "$ac_tool_prefix"; then
7443  for ac_prog in dumpbin "link -dump"
7444  do
7445    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
7446set dummy $ac_tool_prefix$ac_prog; ac_word=$2
7447{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7448$as_echo_n "checking for $ac_word... " >&6; }
7449if ${ac_cv_prog_DUMPBIN+:} false; then :
7450  $as_echo_n "(cached) " >&6
7451else
7452  if test -n "$DUMPBIN"; then
7453  ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
7454else
7455as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7456for as_dir in $PATH
7457do
7458  IFS=$as_save_IFS
7459  test -z "$as_dir" && as_dir=.
7460    for ac_exec_ext in '' $ac_executable_extensions; do
7461  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7462    ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog"
7463    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7464    break 2
7465  fi
7466done
7467  done
7468IFS=$as_save_IFS
7469
7470fi
7471fi
7472DUMPBIN=$ac_cv_prog_DUMPBIN
7473if test -n "$DUMPBIN"; then
7474  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
7475$as_echo "$DUMPBIN" >&6; }
7476else
7477  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7478$as_echo "no" >&6; }
7479fi
7480
7481
7482    test -n "$DUMPBIN" && break
7483  done
7484fi
7485if test -z "$DUMPBIN"; then
7486  ac_ct_DUMPBIN=$DUMPBIN
7487  for ac_prog in dumpbin "link -dump"
7488do
7489  # Extract the first word of "$ac_prog", so it can be a program name with args.
7490set dummy $ac_prog; ac_word=$2
7491{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7492$as_echo_n "checking for $ac_word... " >&6; }
7493if ${ac_cv_prog_ac_ct_DUMPBIN+:} false; then :
7494  $as_echo_n "(cached) " >&6
7495else
7496  if test -n "$ac_ct_DUMPBIN"; then
7497  ac_cv_prog_ac_ct_DUMPBIN="$ac_ct_DUMPBIN" # Let the user override the test.
7498else
7499as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7500for as_dir in $PATH
7501do
7502  IFS=$as_save_IFS
7503  test -z "$as_dir" && as_dir=.
7504    for ac_exec_ext in '' $ac_executable_extensions; do
7505  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7506    ac_cv_prog_ac_ct_DUMPBIN="$ac_prog"
7507    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7508    break 2
7509  fi
7510done
7511  done
7512IFS=$as_save_IFS
7513
7514fi
7515fi
7516ac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN
7517if test -n "$ac_ct_DUMPBIN"; then
7518  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DUMPBIN" >&5
7519$as_echo "$ac_ct_DUMPBIN" >&6; }
7520else
7521  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7522$as_echo "no" >&6; }
7523fi
7524
7525
7526  test -n "$ac_ct_DUMPBIN" && break
7527done
7528
7529  if test "x$ac_ct_DUMPBIN" = x; then
7530    DUMPBIN=":"
7531  else
7532    case $cross_compiling:$ac_tool_warned in
7533yes:)
7534{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7535$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7536ac_tool_warned=yes ;;
7537esac
7538    DUMPBIN=$ac_ct_DUMPBIN
7539  fi
7540fi
7541
7542    case `$DUMPBIN -symbols -headers /dev/null 2>&1 | sed '1q'` in
7543    *COFF*)
7544      DUMPBIN="$DUMPBIN -symbols -headers"
7545      ;;
7546    *)
7547      DUMPBIN=:
7548      ;;
7549    esac
7550  fi
7551
7552  if test : != "$DUMPBIN"; then
7553    NM=$DUMPBIN
7554  fi
7555fi
7556test -z "$NM" && NM=nm
7557
7558
7559
7560
7561
7562
7563{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface" >&5
7564$as_echo_n "checking the name lister ($NM) interface... " >&6; }
7565if ${lt_cv_nm_interface+:} false; then :
7566  $as_echo_n "(cached) " >&6
7567else
7568  lt_cv_nm_interface="BSD nm"
7569  echo "int some_variable = 0;" > conftest.$ac_ext
7570  (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&5)
7571  (eval "$ac_compile" 2>conftest.err)
7572  cat conftest.err >&5
7573  (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
7574  (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
7575  cat conftest.err >&5
7576  (eval echo "\"\$as_me:$LINENO: output\"" >&5)
7577  cat conftest.out >&5
7578  if $GREP 'External.*some_variable' conftest.out > /dev/null; then
7579    lt_cv_nm_interface="MS dumpbin"
7580  fi
7581  rm -f conftest*
7582fi
7583{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_nm_interface" >&5
7584$as_echo "$lt_cv_nm_interface" >&6; }
7585
7586{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
7587$as_echo_n "checking whether ln -s works... " >&6; }
7588LN_S=$as_ln_s
7589if test "$LN_S" = "ln -s"; then
7590  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7591$as_echo "yes" >&6; }
7592else
7593  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
7594$as_echo "no, using $LN_S" >&6; }
7595fi
7596
7597# find the maximum length of command line arguments
7598{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5
7599$as_echo_n "checking the maximum length of command line arguments... " >&6; }
7600if ${lt_cv_sys_max_cmd_len+:} false; then :
7601  $as_echo_n "(cached) " >&6
7602else
7603    i=0
7604  teststring=ABCD
7605
7606  case $build_os in
7607  msdosdjgpp*)
7608    # On DJGPP, this test can blow up pretty badly due to problems in libc
7609    # (any single argument exceeding 2000 bytes causes a buffer overrun
7610    # during glob expansion).  Even if it were fixed, the result of this
7611    # check would be larger than it should be.
7612    lt_cv_sys_max_cmd_len=12288;    # 12K is about right
7613    ;;
7614
7615  gnu*)
7616    # Under GNU Hurd, this test is not required because there is
7617    # no limit to the length of command line arguments.
7618    # Libtool will interpret -1 as no limit whatsoever
7619    lt_cv_sys_max_cmd_len=-1;
7620    ;;
7621
7622  cygwin* | mingw* | cegcc*)
7623    # On Win9x/ME, this test blows up -- it succeeds, but takes
7624    # about 5 minutes as the teststring grows exponentially.
7625    # Worse, since 9x/ME are not pre-emptively multitasking,
7626    # you end up with a "frozen" computer, even though with patience
7627    # the test eventually succeeds (with a max line length of 256k).
7628    # Instead, let's just punt: use the minimum linelength reported by
7629    # all of the supported platforms: 8192 (on NT/2K/XP).
7630    lt_cv_sys_max_cmd_len=8192;
7631    ;;
7632
7633  mint*)
7634    # On MiNT this can take a long time and run out of memory.
7635    lt_cv_sys_max_cmd_len=8192;
7636    ;;
7637
7638  amigaos*)
7639    # On AmigaOS with pdksh, this test takes hours, literally.
7640    # So we just punt and use a minimum line length of 8192.
7641    lt_cv_sys_max_cmd_len=8192;
7642    ;;
7643
7644  bitrig* | darwin* | dragonfly* | freebsd* | netbsd* | openbsd*)
7645    # This has been around since 386BSD, at least.  Likely further.
7646    if test -x /sbin/sysctl; then
7647      lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
7648    elif test -x /usr/sbin/sysctl; then
7649      lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
7650    else
7651      lt_cv_sys_max_cmd_len=65536	# usable default for all BSDs
7652    fi
7653    # And add a safety zone
7654    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
7655    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
7656    ;;
7657
7658  interix*)
7659    # We know the value 262144 and hardcode it with a safety zone (like BSD)
7660    lt_cv_sys_max_cmd_len=196608
7661    ;;
7662
7663  os2*)
7664    # The test takes a long time on OS/2.
7665    lt_cv_sys_max_cmd_len=8192
7666    ;;
7667
7668  osf*)
7669    # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
7670    # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
7671    # nice to cause kernel panics so lets avoid the loop below.
7672    # First set a reasonable default.
7673    lt_cv_sys_max_cmd_len=16384
7674    #
7675    if test -x /sbin/sysconfig; then
7676      case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
7677        *1*) lt_cv_sys_max_cmd_len=-1 ;;
7678      esac
7679    fi
7680    ;;
7681  sco3.2v5*)
7682    lt_cv_sys_max_cmd_len=102400
7683    ;;
7684  sysv5* | sco5v6* | sysv4.2uw2*)
7685    kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
7686    if test -n "$kargmax"; then
7687      lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[	 ]//'`
7688    else
7689      lt_cv_sys_max_cmd_len=32768
7690    fi
7691    ;;
7692  *)
7693    lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
7694    if test -n "$lt_cv_sys_max_cmd_len" && \
7695       test undefined != "$lt_cv_sys_max_cmd_len"; then
7696      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
7697      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
7698    else
7699      # Make teststring a little bigger before we do anything with it.
7700      # a 1K string should be a reasonable start.
7701      for i in 1 2 3 4 5 6 7 8; do
7702        teststring=$teststring$teststring
7703      done
7704      SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
7705      # If test is not a shell built-in, we'll probably end up computing a
7706      # maximum length that is only half of the actual maximum length, but
7707      # we can't tell.
7708      while { test X`env echo "$teststring$teststring" 2>/dev/null` \
7709	         = "X$teststring$teststring"; } >/dev/null 2>&1 &&
7710	      test 17 != "$i" # 1/2 MB should be enough
7711      do
7712        i=`expr $i + 1`
7713        teststring=$teststring$teststring
7714      done
7715      # Only check the string length outside the loop.
7716      lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
7717      teststring=
7718      # Add a significant safety factor because C++ compilers can tack on
7719      # massive amounts of additional arguments before passing them to the
7720      # linker.  It appears as though 1/2 is a usable value.
7721      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
7722    fi
7723    ;;
7724  esac
7725
7726fi
7727
7728if test -n "$lt_cv_sys_max_cmd_len"; then
7729  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len" >&5
7730$as_echo "$lt_cv_sys_max_cmd_len" >&6; }
7731else
7732  { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
7733$as_echo "none" >&6; }
7734fi
7735max_cmd_len=$lt_cv_sys_max_cmd_len
7736
7737
7738
7739
7740
7741
7742: ${CP="cp -f"}
7743: ${MV="mv -f"}
7744: ${RM="rm -f"}
7745
7746if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
7747  lt_unset=unset
7748else
7749  lt_unset=false
7750fi
7751
7752
7753
7754
7755
7756# test EBCDIC or ASCII
7757case `echo X|tr X '\101'` in
7758 A) # ASCII based system
7759    # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
7760  lt_SP2NL='tr \040 \012'
7761  lt_NL2SP='tr \015\012 \040\040'
7762  ;;
7763 *) # EBCDIC based system
7764  lt_SP2NL='tr \100 \n'
7765  lt_NL2SP='tr \r\n \100\100'
7766  ;;
7767esac
7768
7769
7770
7771
7772
7773
7774
7775
7776
7777{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to $host format" >&5
7778$as_echo_n "checking how to convert $build file names to $host format... " >&6; }
7779if ${lt_cv_to_host_file_cmd+:} false; then :
7780  $as_echo_n "(cached) " >&6
7781else
7782  case $host in
7783  *-*-mingw* )
7784    case $build in
7785      *-*-mingw* ) # actually msys
7786        lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32
7787        ;;
7788      *-*-cygwin* )
7789        lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32
7790        ;;
7791      * ) # otherwise, assume *nix
7792        lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32
7793        ;;
7794    esac
7795    ;;
7796  *-*-cygwin* )
7797    case $build in
7798      *-*-mingw* ) # actually msys
7799        lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin
7800        ;;
7801      *-*-cygwin* )
7802        lt_cv_to_host_file_cmd=func_convert_file_noop
7803        ;;
7804      * ) # otherwise, assume *nix
7805        lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin
7806        ;;
7807    esac
7808    ;;
7809  * ) # unhandled hosts (and "normal" native builds)
7810    lt_cv_to_host_file_cmd=func_convert_file_noop
7811    ;;
7812esac
7813
7814fi
7815
7816to_host_file_cmd=$lt_cv_to_host_file_cmd
7817{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_host_file_cmd" >&5
7818$as_echo "$lt_cv_to_host_file_cmd" >&6; }
7819
7820
7821
7822
7823
7824{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format" >&5
7825$as_echo_n "checking how to convert $build file names to toolchain format... " >&6; }
7826if ${lt_cv_to_tool_file_cmd+:} false; then :
7827  $as_echo_n "(cached) " >&6
7828else
7829  #assume ordinary cross tools, or native build.
7830lt_cv_to_tool_file_cmd=func_convert_file_noop
7831case $host in
7832  *-*-mingw* )
7833    case $build in
7834      *-*-mingw* ) # actually msys
7835        lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32
7836        ;;
7837    esac
7838    ;;
7839esac
7840
7841fi
7842
7843to_tool_file_cmd=$lt_cv_to_tool_file_cmd
7844{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_tool_file_cmd" >&5
7845$as_echo "$lt_cv_to_tool_file_cmd" >&6; }
7846
7847
7848
7849
7850
7851{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5
7852$as_echo_n "checking for $LD option to reload object files... " >&6; }
7853if ${lt_cv_ld_reload_flag+:} false; then :
7854  $as_echo_n "(cached) " >&6
7855else
7856  lt_cv_ld_reload_flag='-r'
7857fi
7858{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_reload_flag" >&5
7859$as_echo "$lt_cv_ld_reload_flag" >&6; }
7860reload_flag=$lt_cv_ld_reload_flag
7861case $reload_flag in
7862"" | " "*) ;;
7863*) reload_flag=" $reload_flag" ;;
7864esac
7865reload_cmds='$LD$reload_flag -o $output$reload_objs'
7866case $host_os in
7867  cygwin* | mingw* | pw32* | cegcc*)
7868    if test yes != "$GCC"; then
7869      reload_cmds=false
7870    fi
7871    ;;
7872  darwin*)
7873    if test yes = "$GCC"; then
7874      reload_cmds='$LTCC $LTCFLAGS -nostdlib $wl-r -o $output$reload_objs'
7875    else
7876      reload_cmds='$LD$reload_flag -o $output$reload_objs'
7877    fi
7878    ;;
7879esac
7880
7881
7882
7883
7884
7885
7886
7887
7888
7889if test -n "$ac_tool_prefix"; then
7890  # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
7891set dummy ${ac_tool_prefix}objdump; ac_word=$2
7892{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7893$as_echo_n "checking for $ac_word... " >&6; }
7894if ${ac_cv_prog_OBJDUMP+:} false; then :
7895  $as_echo_n "(cached) " >&6
7896else
7897  if test -n "$OBJDUMP"; then
7898  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
7899else
7900as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7901for as_dir in $PATH
7902do
7903  IFS=$as_save_IFS
7904  test -z "$as_dir" && as_dir=.
7905    for ac_exec_ext in '' $ac_executable_extensions; do
7906  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7907    ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
7908    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7909    break 2
7910  fi
7911done
7912  done
7913IFS=$as_save_IFS
7914
7915fi
7916fi
7917OBJDUMP=$ac_cv_prog_OBJDUMP
7918if test -n "$OBJDUMP"; then
7919  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
7920$as_echo "$OBJDUMP" >&6; }
7921else
7922  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7923$as_echo "no" >&6; }
7924fi
7925
7926
7927fi
7928if test -z "$ac_cv_prog_OBJDUMP"; then
7929  ac_ct_OBJDUMP=$OBJDUMP
7930  # Extract the first word of "objdump", so it can be a program name with args.
7931set dummy objdump; ac_word=$2
7932{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7933$as_echo_n "checking for $ac_word... " >&6; }
7934if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
7935  $as_echo_n "(cached) " >&6
7936else
7937  if test -n "$ac_ct_OBJDUMP"; then
7938  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
7939else
7940as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7941for as_dir in $PATH
7942do
7943  IFS=$as_save_IFS
7944  test -z "$as_dir" && as_dir=.
7945    for ac_exec_ext in '' $ac_executable_extensions; do
7946  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7947    ac_cv_prog_ac_ct_OBJDUMP="objdump"
7948    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7949    break 2
7950  fi
7951done
7952  done
7953IFS=$as_save_IFS
7954
7955fi
7956fi
7957ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
7958if test -n "$ac_ct_OBJDUMP"; then
7959  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
7960$as_echo "$ac_ct_OBJDUMP" >&6; }
7961else
7962  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7963$as_echo "no" >&6; }
7964fi
7965
7966  if test "x$ac_ct_OBJDUMP" = x; then
7967    OBJDUMP="false"
7968  else
7969    case $cross_compiling:$ac_tool_warned in
7970yes:)
7971{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7972$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7973ac_tool_warned=yes ;;
7974esac
7975    OBJDUMP=$ac_ct_OBJDUMP
7976  fi
7977else
7978  OBJDUMP="$ac_cv_prog_OBJDUMP"
7979fi
7980
7981test -z "$OBJDUMP" && OBJDUMP=objdump
7982
7983
7984
7985
7986
7987
7988
7989
7990
7991{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries" >&5
7992$as_echo_n "checking how to recognize dependent libraries... " >&6; }
7993if ${lt_cv_deplibs_check_method+:} false; then :
7994  $as_echo_n "(cached) " >&6
7995else
7996  lt_cv_file_magic_cmd='$MAGIC_CMD'
7997lt_cv_file_magic_test_file=
7998lt_cv_deplibs_check_method='unknown'
7999# Need to set the preceding variable on all platforms that support
8000# interlibrary dependencies.
8001# 'none' -- dependencies not supported.
8002# 'unknown' -- same as none, but documents that we really don't know.
8003# 'pass_all' -- all dependencies passed with no checks.
8004# 'test_compile' -- check by making test program.
8005# 'file_magic [[regex]]' -- check by looking for files in library path
8006# that responds to the $file_magic_cmd with a given extended regex.
8007# If you have 'file' or equivalent on your system and you're not sure
8008# whether 'pass_all' will *always* work, you probably want this one.
8009
8010case $host_os in
8011aix[4-9]*)
8012  lt_cv_deplibs_check_method=pass_all
8013  ;;
8014
8015beos*)
8016  lt_cv_deplibs_check_method=pass_all
8017  ;;
8018
8019bsdi[45]*)
8020  lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
8021  lt_cv_file_magic_cmd='/usr/bin/file -L'
8022  lt_cv_file_magic_test_file=/shlib/libc.so
8023  ;;
8024
8025cygwin*)
8026  # func_win32_libid is a shell function defined in ltmain.sh
8027  lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
8028  lt_cv_file_magic_cmd='func_win32_libid'
8029  ;;
8030
8031mingw* | pw32*)
8032  # Base MSYS/MinGW do not provide the 'file' command needed by
8033  # func_win32_libid shell function, so use a weaker test based on 'objdump',
8034  # unless we find 'file', for example because we are cross-compiling.
8035  if ( file / ) >/dev/null 2>&1; then
8036    lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
8037    lt_cv_file_magic_cmd='func_win32_libid'
8038  else
8039    # Keep this pattern in sync with the one in func_win32_libid.
8040    lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)'
8041    lt_cv_file_magic_cmd='$OBJDUMP -f'
8042  fi
8043  ;;
8044
8045cegcc*)
8046  # use the weaker test based on 'objdump'. See mingw*.
8047  lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
8048  lt_cv_file_magic_cmd='$OBJDUMP -f'
8049  ;;
8050
8051darwin* | rhapsody*)
8052  lt_cv_deplibs_check_method=pass_all
8053  ;;
8054
8055freebsd* | dragonfly*)
8056  if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
8057    case $host_cpu in
8058    i*86 )
8059      # Not sure whether the presence of OpenBSD here was a mistake.
8060      # Let's accept both of them until this is cleared up.
8061      lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library'
8062      lt_cv_file_magic_cmd=/usr/bin/file
8063      lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
8064      ;;
8065    esac
8066  else
8067    lt_cv_deplibs_check_method=pass_all
8068  fi
8069  ;;
8070
8071haiku*)
8072  lt_cv_deplibs_check_method=pass_all
8073  ;;
8074
8075hpux10.20* | hpux11*)
8076  lt_cv_file_magic_cmd=/usr/bin/file
8077  case $host_cpu in
8078  ia64*)
8079    lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64'
8080    lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
8081    ;;
8082  hppa*64*)
8083    lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]'
8084    lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
8085    ;;
8086  *)
8087    lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9]\.[0-9]) shared library'
8088    lt_cv_file_magic_test_file=/usr/lib/libc.sl
8089    ;;
8090  esac
8091  ;;
8092
8093interix[3-9]*)
8094  # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
8095  lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$'
8096  ;;
8097
8098irix5* | irix6* | nonstopux*)
8099  case $LD in
8100  *-32|*"-32 ") libmagic=32-bit;;
8101  *-n32|*"-n32 ") libmagic=N32;;
8102  *-64|*"-64 ") libmagic=64-bit;;
8103  *) libmagic=never-match;;
8104  esac
8105  lt_cv_deplibs_check_method=pass_all
8106  ;;
8107
8108# This must be glibc/ELF.
8109linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
8110  lt_cv_deplibs_check_method=pass_all
8111  ;;
8112
8113netbsd*)
8114  if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
8115    lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
8116  else
8117    lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$'
8118  fi
8119  ;;
8120
8121newos6*)
8122  lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'
8123  lt_cv_file_magic_cmd=/usr/bin/file
8124  lt_cv_file_magic_test_file=/usr/lib/libnls.so
8125  ;;
8126
8127*nto* | *qnx*)
8128  lt_cv_deplibs_check_method=pass_all
8129  ;;
8130
8131openbsd* | bitrig*)
8132  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
8133    lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$'
8134  else
8135    lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
8136  fi
8137  ;;
8138
8139osf3* | osf4* | osf5*)
8140  lt_cv_deplibs_check_method=pass_all
8141  ;;
8142
8143rdos*)
8144  lt_cv_deplibs_check_method=pass_all
8145  ;;
8146
8147solaris*)
8148  lt_cv_deplibs_check_method=pass_all
8149  ;;
8150
8151sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
8152  lt_cv_deplibs_check_method=pass_all
8153  ;;
8154
8155sysv4 | sysv4.3*)
8156  case $host_vendor in
8157  motorola)
8158    lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]'
8159    lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
8160    ;;
8161  ncr)
8162    lt_cv_deplibs_check_method=pass_all
8163    ;;
8164  sequent)
8165    lt_cv_file_magic_cmd='/bin/file'
8166    lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'
8167    ;;
8168  sni)
8169    lt_cv_file_magic_cmd='/bin/file'
8170    lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib"
8171    lt_cv_file_magic_test_file=/lib/libc.so
8172    ;;
8173  siemens)
8174    lt_cv_deplibs_check_method=pass_all
8175    ;;
8176  pc)
8177    lt_cv_deplibs_check_method=pass_all
8178    ;;
8179  esac
8180  ;;
8181
8182tpf*)
8183  lt_cv_deplibs_check_method=pass_all
8184  ;;
8185os2*)
8186  lt_cv_deplibs_check_method=pass_all
8187  ;;
8188esac
8189
8190fi
8191{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5
8192$as_echo "$lt_cv_deplibs_check_method" >&6; }
8193
8194file_magic_glob=
8195want_nocaseglob=no
8196if test "$build" = "$host"; then
8197  case $host_os in
8198  mingw* | pw32*)
8199    if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then
8200      want_nocaseglob=yes
8201    else
8202      file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[\1]\/[\1]\/g;/g"`
8203    fi
8204    ;;
8205  esac
8206fi
8207
8208file_magic_cmd=$lt_cv_file_magic_cmd
8209deplibs_check_method=$lt_cv_deplibs_check_method
8210test -z "$deplibs_check_method" && deplibs_check_method=unknown
8211
8212
8213
8214
8215
8216
8217
8218
8219
8220
8221
8222
8223
8224
8225
8226
8227
8228
8229
8230
8231
8232
8233if test -n "$ac_tool_prefix"; then
8234  # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
8235set dummy ${ac_tool_prefix}dlltool; ac_word=$2
8236{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8237$as_echo_n "checking for $ac_word... " >&6; }
8238if ${ac_cv_prog_DLLTOOL+:} false; then :
8239  $as_echo_n "(cached) " >&6
8240else
8241  if test -n "$DLLTOOL"; then
8242  ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
8243else
8244as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8245for as_dir in $PATH
8246do
8247  IFS=$as_save_IFS
8248  test -z "$as_dir" && as_dir=.
8249    for ac_exec_ext in '' $ac_executable_extensions; do
8250  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8251    ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
8252    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8253    break 2
8254  fi
8255done
8256  done
8257IFS=$as_save_IFS
8258
8259fi
8260fi
8261DLLTOOL=$ac_cv_prog_DLLTOOL
8262if test -n "$DLLTOOL"; then
8263  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5
8264$as_echo "$DLLTOOL" >&6; }
8265else
8266  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8267$as_echo "no" >&6; }
8268fi
8269
8270
8271fi
8272if test -z "$ac_cv_prog_DLLTOOL"; then
8273  ac_ct_DLLTOOL=$DLLTOOL
8274  # Extract the first word of "dlltool", so it can be a program name with args.
8275set dummy dlltool; ac_word=$2
8276{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8277$as_echo_n "checking for $ac_word... " >&6; }
8278if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then :
8279  $as_echo_n "(cached) " >&6
8280else
8281  if test -n "$ac_ct_DLLTOOL"; then
8282  ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
8283else
8284as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8285for as_dir in $PATH
8286do
8287  IFS=$as_save_IFS
8288  test -z "$as_dir" && as_dir=.
8289    for ac_exec_ext in '' $ac_executable_extensions; do
8290  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8291    ac_cv_prog_ac_ct_DLLTOOL="dlltool"
8292    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8293    break 2
8294  fi
8295done
8296  done
8297IFS=$as_save_IFS
8298
8299fi
8300fi
8301ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
8302if test -n "$ac_ct_DLLTOOL"; then
8303  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5
8304$as_echo "$ac_ct_DLLTOOL" >&6; }
8305else
8306  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8307$as_echo "no" >&6; }
8308fi
8309
8310  if test "x$ac_ct_DLLTOOL" = x; then
8311    DLLTOOL="false"
8312  else
8313    case $cross_compiling:$ac_tool_warned in
8314yes:)
8315{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8316$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8317ac_tool_warned=yes ;;
8318esac
8319    DLLTOOL=$ac_ct_DLLTOOL
8320  fi
8321else
8322  DLLTOOL="$ac_cv_prog_DLLTOOL"
8323fi
8324
8325test -z "$DLLTOOL" && DLLTOOL=dlltool
8326
8327
8328
8329
8330
8331
8332
8333
8334
8335
8336{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to associate runtime and link libraries" >&5
8337$as_echo_n "checking how to associate runtime and link libraries... " >&6; }
8338if ${lt_cv_sharedlib_from_linklib_cmd+:} false; then :
8339  $as_echo_n "(cached) " >&6
8340else
8341  lt_cv_sharedlib_from_linklib_cmd='unknown'
8342
8343case $host_os in
8344cygwin* | mingw* | pw32* | cegcc*)
8345  # two different shell functions defined in ltmain.sh;
8346  # decide which one to use based on capabilities of $DLLTOOL
8347  case `$DLLTOOL --help 2>&1` in
8348  *--identify-strict*)
8349    lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib
8350    ;;
8351  *)
8352    lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback
8353    ;;
8354  esac
8355  ;;
8356*)
8357  # fallback: assume linklib IS sharedlib
8358  lt_cv_sharedlib_from_linklib_cmd=$ECHO
8359  ;;
8360esac
8361
8362fi
8363{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sharedlib_from_linklib_cmd" >&5
8364$as_echo "$lt_cv_sharedlib_from_linklib_cmd" >&6; }
8365sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd
8366test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO
8367
8368
8369
8370
8371
8372
8373
8374if test -n "$ac_tool_prefix"; then
8375  for ac_prog in ar
8376  do
8377    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
8378set dummy $ac_tool_prefix$ac_prog; ac_word=$2
8379{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8380$as_echo_n "checking for $ac_word... " >&6; }
8381if ${ac_cv_prog_AR+:} false; then :
8382  $as_echo_n "(cached) " >&6
8383else
8384  if test -n "$AR"; then
8385  ac_cv_prog_AR="$AR" # Let the user override the test.
8386else
8387as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8388for as_dir in $PATH
8389do
8390  IFS=$as_save_IFS
8391  test -z "$as_dir" && as_dir=.
8392    for ac_exec_ext in '' $ac_executable_extensions; do
8393  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8394    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
8395    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8396    break 2
8397  fi
8398done
8399  done
8400IFS=$as_save_IFS
8401
8402fi
8403fi
8404AR=$ac_cv_prog_AR
8405if test -n "$AR"; then
8406  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
8407$as_echo "$AR" >&6; }
8408else
8409  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8410$as_echo "no" >&6; }
8411fi
8412
8413
8414    test -n "$AR" && break
8415  done
8416fi
8417if test -z "$AR"; then
8418  ac_ct_AR=$AR
8419  for ac_prog in ar
8420do
8421  # Extract the first word of "$ac_prog", so it can be a program name with args.
8422set dummy $ac_prog; ac_word=$2
8423{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8424$as_echo_n "checking for $ac_word... " >&6; }
8425if ${ac_cv_prog_ac_ct_AR+:} false; then :
8426  $as_echo_n "(cached) " >&6
8427else
8428  if test -n "$ac_ct_AR"; then
8429  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
8430else
8431as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8432for as_dir in $PATH
8433do
8434  IFS=$as_save_IFS
8435  test -z "$as_dir" && as_dir=.
8436    for ac_exec_ext in '' $ac_executable_extensions; do
8437  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8438    ac_cv_prog_ac_ct_AR="$ac_prog"
8439    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8440    break 2
8441  fi
8442done
8443  done
8444IFS=$as_save_IFS
8445
8446fi
8447fi
8448ac_ct_AR=$ac_cv_prog_ac_ct_AR
8449if test -n "$ac_ct_AR"; then
8450  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
8451$as_echo "$ac_ct_AR" >&6; }
8452else
8453  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8454$as_echo "no" >&6; }
8455fi
8456
8457
8458  test -n "$ac_ct_AR" && break
8459done
8460
8461  if test "x$ac_ct_AR" = x; then
8462    AR="false"
8463  else
8464    case $cross_compiling:$ac_tool_warned in
8465yes:)
8466{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8467$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8468ac_tool_warned=yes ;;
8469esac
8470    AR=$ac_ct_AR
8471  fi
8472fi
8473
8474: ${AR=ar}
8475: ${AR_FLAGS=cru}
8476
8477
8478
8479
8480
8481
8482
8483
8484
8485
8486
8487{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support" >&5
8488$as_echo_n "checking for archiver @FILE support... " >&6; }
8489if ${lt_cv_ar_at_file+:} false; then :
8490  $as_echo_n "(cached) " >&6
8491else
8492  lt_cv_ar_at_file=no
8493   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8494/* end confdefs.h.  */
8495
8496int
8497main ()
8498{
8499
8500  ;
8501  return 0;
8502}
8503_ACEOF
8504if ac_fn_c_try_compile "$LINENO"; then :
8505  echo conftest.$ac_objext > conftest.lst
8506      lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&5'
8507      { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5
8508  (eval $lt_ar_try) 2>&5
8509  ac_status=$?
8510  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8511  test $ac_status = 0; }
8512      if test 0 -eq "$ac_status"; then
8513	# Ensure the archiver fails upon bogus file names.
8514	rm -f conftest.$ac_objext libconftest.a
8515	{ { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5
8516  (eval $lt_ar_try) 2>&5
8517  ac_status=$?
8518  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8519  test $ac_status = 0; }
8520	if test 0 -ne "$ac_status"; then
8521          lt_cv_ar_at_file=@
8522        fi
8523      fi
8524      rm -f conftest.* libconftest.a
8525
8526fi
8527rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8528
8529fi
8530{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5
8531$as_echo "$lt_cv_ar_at_file" >&6; }
8532
8533if test no = "$lt_cv_ar_at_file"; then
8534  archiver_list_spec=
8535else
8536  archiver_list_spec=$lt_cv_ar_at_file
8537fi
8538
8539
8540
8541
8542
8543
8544
8545if test -n "$ac_tool_prefix"; then
8546  # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
8547set dummy ${ac_tool_prefix}strip; ac_word=$2
8548{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8549$as_echo_n "checking for $ac_word... " >&6; }
8550if ${ac_cv_prog_STRIP+:} false; then :
8551  $as_echo_n "(cached) " >&6
8552else
8553  if test -n "$STRIP"; then
8554  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
8555else
8556as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8557for as_dir in $PATH
8558do
8559  IFS=$as_save_IFS
8560  test -z "$as_dir" && as_dir=.
8561    for ac_exec_ext in '' $ac_executable_extensions; do
8562  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8563    ac_cv_prog_STRIP="${ac_tool_prefix}strip"
8564    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8565    break 2
8566  fi
8567done
8568  done
8569IFS=$as_save_IFS
8570
8571fi
8572fi
8573STRIP=$ac_cv_prog_STRIP
8574if test -n "$STRIP"; then
8575  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
8576$as_echo "$STRIP" >&6; }
8577else
8578  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8579$as_echo "no" >&6; }
8580fi
8581
8582
8583fi
8584if test -z "$ac_cv_prog_STRIP"; then
8585  ac_ct_STRIP=$STRIP
8586  # Extract the first word of "strip", so it can be a program name with args.
8587set dummy strip; ac_word=$2
8588{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8589$as_echo_n "checking for $ac_word... " >&6; }
8590if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
8591  $as_echo_n "(cached) " >&6
8592else
8593  if test -n "$ac_ct_STRIP"; then
8594  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
8595else
8596as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8597for as_dir in $PATH
8598do
8599  IFS=$as_save_IFS
8600  test -z "$as_dir" && as_dir=.
8601    for ac_exec_ext in '' $ac_executable_extensions; do
8602  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8603    ac_cv_prog_ac_ct_STRIP="strip"
8604    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8605    break 2
8606  fi
8607done
8608  done
8609IFS=$as_save_IFS
8610
8611fi
8612fi
8613ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
8614if test -n "$ac_ct_STRIP"; then
8615  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
8616$as_echo "$ac_ct_STRIP" >&6; }
8617else
8618  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8619$as_echo "no" >&6; }
8620fi
8621
8622  if test "x$ac_ct_STRIP" = x; then
8623    STRIP=":"
8624  else
8625    case $cross_compiling:$ac_tool_warned in
8626yes:)
8627{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8628$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8629ac_tool_warned=yes ;;
8630esac
8631    STRIP=$ac_ct_STRIP
8632  fi
8633else
8634  STRIP="$ac_cv_prog_STRIP"
8635fi
8636
8637test -z "$STRIP" && STRIP=:
8638
8639
8640
8641
8642
8643
8644if test -n "$ac_tool_prefix"; then
8645  # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
8646set dummy ${ac_tool_prefix}ranlib; ac_word=$2
8647{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8648$as_echo_n "checking for $ac_word... " >&6; }
8649if ${ac_cv_prog_RANLIB+:} false; then :
8650  $as_echo_n "(cached) " >&6
8651else
8652  if test -n "$RANLIB"; then
8653  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
8654else
8655as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8656for as_dir in $PATH
8657do
8658  IFS=$as_save_IFS
8659  test -z "$as_dir" && as_dir=.
8660    for ac_exec_ext in '' $ac_executable_extensions; do
8661  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8662    ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
8663    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8664    break 2
8665  fi
8666done
8667  done
8668IFS=$as_save_IFS
8669
8670fi
8671fi
8672RANLIB=$ac_cv_prog_RANLIB
8673if test -n "$RANLIB"; then
8674  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
8675$as_echo "$RANLIB" >&6; }
8676else
8677  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8678$as_echo "no" >&6; }
8679fi
8680
8681
8682fi
8683if test -z "$ac_cv_prog_RANLIB"; then
8684  ac_ct_RANLIB=$RANLIB
8685  # Extract the first word of "ranlib", so it can be a program name with args.
8686set dummy ranlib; ac_word=$2
8687{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8688$as_echo_n "checking for $ac_word... " >&6; }
8689if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
8690  $as_echo_n "(cached) " >&6
8691else
8692  if test -n "$ac_ct_RANLIB"; then
8693  ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
8694else
8695as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8696for as_dir in $PATH
8697do
8698  IFS=$as_save_IFS
8699  test -z "$as_dir" && as_dir=.
8700    for ac_exec_ext in '' $ac_executable_extensions; do
8701  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8702    ac_cv_prog_ac_ct_RANLIB="ranlib"
8703    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8704    break 2
8705  fi
8706done
8707  done
8708IFS=$as_save_IFS
8709
8710fi
8711fi
8712ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
8713if test -n "$ac_ct_RANLIB"; then
8714  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
8715$as_echo "$ac_ct_RANLIB" >&6; }
8716else
8717  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8718$as_echo "no" >&6; }
8719fi
8720
8721  if test "x$ac_ct_RANLIB" = x; then
8722    RANLIB=":"
8723  else
8724    case $cross_compiling:$ac_tool_warned in
8725yes:)
8726{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8727$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8728ac_tool_warned=yes ;;
8729esac
8730    RANLIB=$ac_ct_RANLIB
8731  fi
8732else
8733  RANLIB="$ac_cv_prog_RANLIB"
8734fi
8735
8736test -z "$RANLIB" && RANLIB=:
8737
8738
8739
8740
8741
8742
8743# Determine commands to create old-style static archives.
8744old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
8745old_postinstall_cmds='chmod 644 $oldlib'
8746old_postuninstall_cmds=
8747
8748if test -n "$RANLIB"; then
8749  case $host_os in
8750  bitrig* | openbsd*)
8751    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib"
8752    ;;
8753  *)
8754    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib"
8755    ;;
8756  esac
8757  old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib"
8758fi
8759
8760case $host_os in
8761  darwin*)
8762    lock_old_archive_extraction=yes ;;
8763  *)
8764    lock_old_archive_extraction=no ;;
8765esac
8766
8767
8768
8769
8770
8771
8772
8773
8774
8775
8776
8777
8778
8779
8780
8781
8782
8783
8784
8785
8786
8787for ac_prog in gawk mawk nawk awk
8788do
8789  # Extract the first word of "$ac_prog", so it can be a program name with args.
8790set dummy $ac_prog; ac_word=$2
8791{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8792$as_echo_n "checking for $ac_word... " >&6; }
8793if ${ac_cv_prog_AWK+:} false; then :
8794  $as_echo_n "(cached) " >&6
8795else
8796  if test -n "$AWK"; then
8797  ac_cv_prog_AWK="$AWK" # Let the user override the test.
8798else
8799as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8800for as_dir in $PATH
8801do
8802  IFS=$as_save_IFS
8803  test -z "$as_dir" && as_dir=.
8804    for ac_exec_ext in '' $ac_executable_extensions; do
8805  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8806    ac_cv_prog_AWK="$ac_prog"
8807    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8808    break 2
8809  fi
8810done
8811  done
8812IFS=$as_save_IFS
8813
8814fi
8815fi
8816AWK=$ac_cv_prog_AWK
8817if test -n "$AWK"; then
8818  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
8819$as_echo "$AWK" >&6; }
8820else
8821  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8822$as_echo "no" >&6; }
8823fi
8824
8825
8826  test -n "$AWK" && break
8827done
8828
8829
8830
8831
8832
8833
8834
8835
8836
8837
8838
8839
8840
8841
8842
8843
8844
8845
8846
8847# If no C compiler was specified, use CC.
8848LTCC=${LTCC-"$CC"}
8849
8850# If no C compiler flags were specified, use CFLAGS.
8851LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
8852
8853# Allow CC to be a program name with arguments.
8854compiler=$CC
8855
8856
8857# Check for command to grab the raw symbol name followed by C symbol from nm.
8858{ $as_echo "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5
8859$as_echo_n "checking command to parse $NM output from $compiler object... " >&6; }
8860if ${lt_cv_sys_global_symbol_pipe+:} false; then :
8861  $as_echo_n "(cached) " >&6
8862else
8863
8864# These are sane defaults that work on at least a few old systems.
8865# [They come from Ultrix.  What could be older than Ultrix?!! ;)]
8866
8867# Character class describing NM global symbol codes.
8868symcode='[BCDEGRST]'
8869
8870# Regexp to match symbols that can be accessed directly from C.
8871sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
8872
8873# Define system-specific variables.
8874case $host_os in
8875aix*)
8876  symcode='[BCDT]'
8877  ;;
8878cygwin* | mingw* | pw32* | cegcc*)
8879  symcode='[ABCDGISTW]'
8880  ;;
8881hpux*)
8882  if test ia64 = "$host_cpu"; then
8883    symcode='[ABCDEGRST]'
8884  fi
8885  ;;
8886irix* | nonstopux*)
8887  symcode='[BCDEGRST]'
8888  ;;
8889osf*)
8890  symcode='[BCDEGQRST]'
8891  ;;
8892solaris*)
8893  symcode='[BDRT]'
8894  ;;
8895sco3.2v5*)
8896  symcode='[DT]'
8897  ;;
8898sysv4.2uw2*)
8899  symcode='[DT]'
8900  ;;
8901sysv5* | sco5v6* | unixware* | OpenUNIX*)
8902  symcode='[ABDT]'
8903  ;;
8904sysv4)
8905  symcode='[DFNSTU]'
8906  ;;
8907esac
8908
8909# If we're using GNU nm, then use its standard symbol codes.
8910case `$NM -V 2>&1` in
8911*GNU* | *'with BFD'*)
8912  symcode='[ABCDGIRSTW]' ;;
8913esac
8914
8915if test "$lt_cv_nm_interface" = "MS dumpbin"; then
8916  # Gets list of data symbols to import.
8917  lt_cv_sys_global_symbol_to_import="sed -n -e 's/^I .* \(.*\)$/\1/p'"
8918  # Adjust the below global symbol transforms to fixup imported variables.
8919  lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'"
8920  lt_c_name_hook=" -e 's/^I .* \(.*\)$/  {\"\1\", (void *) 0},/p'"
8921  lt_c_name_lib_hook="\
8922  -e 's/^I .* \(lib.*\)$/  {\"\1\", (void *) 0},/p'\
8923  -e 's/^I .* \(.*\)$/  {\"lib\1\", (void *) 0},/p'"
8924else
8925  # Disable hooks by default.
8926  lt_cv_sys_global_symbol_to_import=
8927  lt_cdecl_hook=
8928  lt_c_name_hook=
8929  lt_c_name_lib_hook=
8930fi
8931
8932# Transform an extracted symbol line into a proper C declaration.
8933# Some systems (esp. on ia64) link data and code symbols differently,
8934# so use this general approach.
8935lt_cv_sys_global_symbol_to_cdecl="sed -n"\
8936$lt_cdecl_hook\
8937" -e 's/^T .* \(.*\)$/extern int \1();/p'"\
8938" -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'"
8939
8940# Transform an extracted symbol line into symbol name and symbol address
8941lt_cv_sys_global_symbol_to_c_name_address="sed -n"\
8942$lt_c_name_hook\
8943" -e 's/^: \(.*\) .*$/  {\"\1\", (void *) 0},/p'"\
8944" -e 's/^$symcode$symcode* .* \(.*\)$/  {\"\1\", (void *) \&\1},/p'"
8945
8946# Transform an extracted symbol line into symbol name with lib prefix and
8947# symbol address.
8948lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n"\
8949$lt_c_name_lib_hook\
8950" -e 's/^: \(.*\) .*$/  {\"\1\", (void *) 0},/p'"\
8951" -e 's/^$symcode$symcode* .* \(lib.*\)$/  {\"\1\", (void *) \&\1},/p'"\
8952" -e 's/^$symcode$symcode* .* \(.*\)$/  {\"lib\1\", (void *) \&\1},/p'"
8953
8954# Handle CRLF in mingw tool chain
8955opt_cr=
8956case $build_os in
8957mingw*)
8958  opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
8959  ;;
8960esac
8961
8962# Try without a prefix underscore, then with it.
8963for ac_symprfx in "" "_"; do
8964
8965  # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
8966  symxfrm="\\1 $ac_symprfx\\2 \\2"
8967
8968  # Write the raw and C identifiers.
8969  if test "$lt_cv_nm_interface" = "MS dumpbin"; then
8970    # Fake it for dumpbin and say T for any non-static function,
8971    # D for any global variable and I for any imported variable.
8972    # Also find C++ and __fastcall symbols from MSVC++,
8973    # which start with @ or ?.
8974    lt_cv_sys_global_symbol_pipe="$AWK '"\
8975"     {last_section=section; section=\$ 3};"\
8976"     /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\
8977"     /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
8978"     /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\
8979"     /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\
8980"     /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\
8981"     \$ 0!~/External *\|/{next};"\
8982"     / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
8983"     {if(hide[section]) next};"\
8984"     {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\
8985"     {split(\$ 0,a,/\||\r/); split(a[2],s)};"\
8986"     s[1]~/^[@?]/{print f,s[1],s[1]; next};"\
8987"     s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\
8988"     ' prfx=^$ac_symprfx"
8989  else
8990    lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[	 ]\($symcode$symcode*\)[	 ][	 ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
8991  fi
8992  lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'"
8993
8994  # Check to see that the pipe works correctly.
8995  pipe_works=no
8996
8997  rm -f conftest*
8998  cat > conftest.$ac_ext <<_LT_EOF
8999#ifdef __cplusplus
9000extern "C" {
9001#endif
9002char nm_test_var;
9003void nm_test_func(void);
9004void nm_test_func(void){}
9005#ifdef __cplusplus
9006}
9007#endif
9008int main(){nm_test_var='a';nm_test_func();return(0);}
9009_LT_EOF
9010
9011  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
9012  (eval $ac_compile) 2>&5
9013  ac_status=$?
9014  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
9015  test $ac_status = 0; }; then
9016    # Now try to grab the symbols.
9017    nlist=conftest.nm
9018    if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist\""; } >&5
9019  (eval $NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) 2>&5
9020  ac_status=$?
9021  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
9022  test $ac_status = 0; } && test -s "$nlist"; then
9023      # Try sorting and uniquifying the output.
9024      if sort "$nlist" | uniq > "$nlist"T; then
9025	mv -f "$nlist"T "$nlist"
9026      else
9027	rm -f "$nlist"T
9028      fi
9029
9030      # Make sure that we snagged all the symbols we need.
9031      if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
9032	if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
9033	  cat <<_LT_EOF > conftest.$ac_ext
9034/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests.  */
9035#if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE
9036/* DATA imports from DLLs on WIN32 can't be const, because runtime
9037   relocations are performed -- see ld's documentation on pseudo-relocs.  */
9038# define LT_DLSYM_CONST
9039#elif defined __osf__
9040/* This system does not cope well with relocations in const data.  */
9041# define LT_DLSYM_CONST
9042#else
9043# define LT_DLSYM_CONST const
9044#endif
9045
9046#ifdef __cplusplus
9047extern "C" {
9048#endif
9049
9050_LT_EOF
9051	  # Now generate the symbol file.
9052	  eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
9053
9054	  cat <<_LT_EOF >> conftest.$ac_ext
9055
9056/* The mapping between symbol names and symbols.  */
9057LT_DLSYM_CONST struct {
9058  const char *name;
9059  void       *address;
9060}
9061lt__PROGRAM__LTX_preloaded_symbols[] =
9062{
9063  { "@PROGRAM@", (void *) 0 },
9064_LT_EOF
9065	  $SED "s/^$symcode$symcode* .* \(.*\)$/  {\"\1\", (void *) \&\1},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
9066	  cat <<\_LT_EOF >> conftest.$ac_ext
9067  {0, (void *) 0}
9068};
9069
9070/* This works around a problem in FreeBSD linker */
9071#ifdef FREEBSD_WORKAROUND
9072static const void *lt_preloaded_setup() {
9073  return lt__PROGRAM__LTX_preloaded_symbols;
9074}
9075#endif
9076
9077#ifdef __cplusplus
9078}
9079#endif
9080_LT_EOF
9081	  # Now try linking the two files.
9082	  mv conftest.$ac_objext conftstm.$ac_objext
9083	  lt_globsym_save_LIBS=$LIBS
9084	  lt_globsym_save_CFLAGS=$CFLAGS
9085	  LIBS=conftstm.$ac_objext
9086	  CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag"
9087	  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
9088  (eval $ac_link) 2>&5
9089  ac_status=$?
9090  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
9091  test $ac_status = 0; } && test -s conftest$ac_exeext; then
9092	    pipe_works=yes
9093	  fi
9094	  LIBS=$lt_globsym_save_LIBS
9095	  CFLAGS=$lt_globsym_save_CFLAGS
9096	else
9097	  echo "cannot find nm_test_func in $nlist" >&5
9098	fi
9099      else
9100	echo "cannot find nm_test_var in $nlist" >&5
9101      fi
9102    else
9103      echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5
9104    fi
9105  else
9106    echo "$progname: failed program was:" >&5
9107    cat conftest.$ac_ext >&5
9108  fi
9109  rm -rf conftest* conftst*
9110
9111  # Do not use the global_symbol_pipe unless it works.
9112  if test yes = "$pipe_works"; then
9113    break
9114  else
9115    lt_cv_sys_global_symbol_pipe=
9116  fi
9117done
9118
9119fi
9120
9121if test -z "$lt_cv_sys_global_symbol_pipe"; then
9122  lt_cv_sys_global_symbol_to_cdecl=
9123fi
9124if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
9125  { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
9126$as_echo "failed" >&6; }
9127else
9128  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
9129$as_echo "ok" >&6; }
9130fi
9131
9132# Response file support.
9133if test "$lt_cv_nm_interface" = "MS dumpbin"; then
9134  nm_file_list_spec='@'
9135elif $NM --help 2>/dev/null | grep '[@]FILE' >/dev/null; then
9136  nm_file_list_spec='@'
9137fi
9138
9139
9140
9141
9142
9143
9144
9145
9146
9147
9148
9149
9150
9151
9152
9153
9154
9155
9156
9157
9158
9159
9160
9161
9162
9163
9164
9165
9166
9167
9168
9169
9170
9171
9172
9173
9174
9175{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
9176$as_echo_n "checking for sysroot... " >&6; }
9177
9178# Check whether --with-sysroot was given.
9179if test "${with_sysroot+set}" = set; then :
9180  withval=$with_sysroot;
9181else
9182  with_sysroot=no
9183fi
9184
9185
9186lt_sysroot=
9187case $with_sysroot in #(
9188 yes)
9189   if test yes = "$GCC"; then
9190     lt_sysroot=`$CC --print-sysroot 2>/dev/null`
9191   fi
9192   ;; #(
9193 /*)
9194   lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"`
9195   ;; #(
9196 no|'')
9197   ;; #(
9198 *)
9199   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_sysroot" >&5
9200$as_echo "$with_sysroot" >&6; }
9201   as_fn_error $? "The sysroot must be an absolute path." "$LINENO" 5
9202   ;;
9203esac
9204
9205 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}" >&5
9206$as_echo "${lt_sysroot:-no}" >&6; }
9207
9208
9209
9210
9211
9212{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a working dd" >&5
9213$as_echo_n "checking for a working dd... " >&6; }
9214if ${ac_cv_path_lt_DD+:} false; then :
9215  $as_echo_n "(cached) " >&6
9216else
9217  printf 0123456789abcdef0123456789abcdef >conftest.i
9218cat conftest.i conftest.i >conftest2.i
9219: ${lt_DD:=$DD}
9220if test -z "$lt_DD"; then
9221  ac_path_lt_DD_found=false
9222  # Loop through the user's path and test for each of PROGNAME-LIST
9223  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9224for as_dir in $PATH
9225do
9226  IFS=$as_save_IFS
9227  test -z "$as_dir" && as_dir=.
9228    for ac_prog in dd; do
9229    for ac_exec_ext in '' $ac_executable_extensions; do
9230      ac_path_lt_DD="$as_dir/$ac_prog$ac_exec_ext"
9231      as_fn_executable_p "$ac_path_lt_DD" || continue
9232if "$ac_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then
9233  cmp -s conftest.i conftest.out \
9234  && ac_cv_path_lt_DD="$ac_path_lt_DD" ac_path_lt_DD_found=:
9235fi
9236      $ac_path_lt_DD_found && break 3
9237    done
9238  done
9239  done
9240IFS=$as_save_IFS
9241  if test -z "$ac_cv_path_lt_DD"; then
9242    :
9243  fi
9244else
9245  ac_cv_path_lt_DD=$lt_DD
9246fi
9247
9248rm -f conftest.i conftest2.i conftest.out
9249fi
9250{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_lt_DD" >&5
9251$as_echo "$ac_cv_path_lt_DD" >&6; }
9252
9253
9254{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to truncate binary pipes" >&5
9255$as_echo_n "checking how to truncate binary pipes... " >&6; }
9256if ${lt_cv_truncate_bin+:} false; then :
9257  $as_echo_n "(cached) " >&6
9258else
9259  printf 0123456789abcdef0123456789abcdef >conftest.i
9260cat conftest.i conftest.i >conftest2.i
9261lt_cv_truncate_bin=
9262if "$ac_cv_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then
9263  cmp -s conftest.i conftest.out \
9264  && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1"
9265fi
9266rm -f conftest.i conftest2.i conftest.out
9267test -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q"
9268fi
9269{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_truncate_bin" >&5
9270$as_echo "$lt_cv_truncate_bin" >&6; }
9271
9272
9273
9274
9275
9276
9277
9278# Calculate cc_basename.  Skip known compiler wrappers and cross-prefix.
9279func_cc_basename ()
9280{
9281    for cc_temp in $*""; do
9282      case $cc_temp in
9283        compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
9284        distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
9285        \-*) ;;
9286        *) break;;
9287      esac
9288    done
9289    func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
9290}
9291
9292# Check whether --enable-libtool-lock was given.
9293if test "${enable_libtool_lock+set}" = set; then :
9294  enableval=$enable_libtool_lock;
9295fi
9296
9297test no = "$enable_libtool_lock" || enable_libtool_lock=yes
9298
9299# Some flags need to be propagated to the compiler or linker for good
9300# libtool support.
9301case $host in
9302ia64-*-hpux*)
9303  # Find out what ABI is being produced by ac_compile, and set mode
9304  # options accordingly.
9305  echo 'int i;' > conftest.$ac_ext
9306  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
9307  (eval $ac_compile) 2>&5
9308  ac_status=$?
9309  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
9310  test $ac_status = 0; }; then
9311    case `/usr/bin/file conftest.$ac_objext` in
9312      *ELF-32*)
9313	HPUX_IA64_MODE=32
9314	;;
9315      *ELF-64*)
9316	HPUX_IA64_MODE=64
9317	;;
9318    esac
9319  fi
9320  rm -rf conftest*
9321  ;;
9322*-*-irix6*)
9323  # Find out what ABI is being produced by ac_compile, and set linker
9324  # options accordingly.
9325  echo '#line '$LINENO' "configure"' > conftest.$ac_ext
9326  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
9327  (eval $ac_compile) 2>&5
9328  ac_status=$?
9329  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
9330  test $ac_status = 0; }; then
9331    if test yes = "$lt_cv_prog_gnu_ld"; then
9332      case `/usr/bin/file conftest.$ac_objext` in
9333	*32-bit*)
9334	  LD="${LD-ld} -melf32bsmip"
9335	  ;;
9336	*N32*)
9337	  LD="${LD-ld} -melf32bmipn32"
9338	  ;;
9339	*64-bit*)
9340	  LD="${LD-ld} -melf64bmip"
9341	;;
9342      esac
9343    else
9344      case `/usr/bin/file conftest.$ac_objext` in
9345	*32-bit*)
9346	  LD="${LD-ld} -32"
9347	  ;;
9348	*N32*)
9349	  LD="${LD-ld} -n32"
9350	  ;;
9351	*64-bit*)
9352	  LD="${LD-ld} -64"
9353	  ;;
9354      esac
9355    fi
9356  fi
9357  rm -rf conftest*
9358  ;;
9359
9360mips64*-*linux*)
9361  # Find out what ABI is being produced by ac_compile, and set linker
9362  # options accordingly.
9363  echo '#line '$LINENO' "configure"' > conftest.$ac_ext
9364  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
9365  (eval $ac_compile) 2>&5
9366  ac_status=$?
9367  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
9368  test $ac_status = 0; }; then
9369    emul=elf
9370    case `/usr/bin/file conftest.$ac_objext` in
9371      *32-bit*)
9372	emul="${emul}32"
9373	;;
9374      *64-bit*)
9375	emul="${emul}64"
9376	;;
9377    esac
9378    case `/usr/bin/file conftest.$ac_objext` in
9379      *MSB*)
9380	emul="${emul}btsmip"
9381	;;
9382      *LSB*)
9383	emul="${emul}ltsmip"
9384	;;
9385    esac
9386    case `/usr/bin/file conftest.$ac_objext` in
9387      *N32*)
9388	emul="${emul}n32"
9389	;;
9390    esac
9391    LD="${LD-ld} -m $emul"
9392  fi
9393  rm -rf conftest*
9394  ;;
9395
9396x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \
9397s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
9398  # Find out what ABI is being produced by ac_compile, and set linker
9399  # options accordingly.  Note that the listed cases only cover the
9400  # situations where additional linker options are needed (such as when
9401  # doing 32-bit compilation for a host where ld defaults to 64-bit, or
9402  # vice versa); the common cases where no linker options are needed do
9403  # not appear in the list.
9404  echo 'int i;' > conftest.$ac_ext
9405  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
9406  (eval $ac_compile) 2>&5
9407  ac_status=$?
9408  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
9409  test $ac_status = 0; }; then
9410    case `/usr/bin/file conftest.o` in
9411      *32-bit*)
9412	case $host in
9413	  x86_64-*kfreebsd*-gnu)
9414	    LD="${LD-ld} -m elf_i386_fbsd"
9415	    ;;
9416	  x86_64-*linux*)
9417	    case `/usr/bin/file conftest.o` in
9418	      *x86-64*)
9419		LD="${LD-ld} -m elf32_x86_64"
9420		;;
9421	      *)
9422		LD="${LD-ld} -m elf_i386"
9423		;;
9424	    esac
9425	    ;;
9426	  powerpc64le-*linux*)
9427	    LD="${LD-ld} -m elf32lppclinux"
9428	    ;;
9429	  powerpc64-*linux*)
9430	    LD="${LD-ld} -m elf32ppclinux"
9431	    ;;
9432	  s390x-*linux*)
9433	    LD="${LD-ld} -m elf_s390"
9434	    ;;
9435	  sparc64-*linux*)
9436	    LD="${LD-ld} -m elf32_sparc"
9437	    ;;
9438	esac
9439	;;
9440      *64-bit*)
9441	case $host in
9442	  x86_64-*kfreebsd*-gnu)
9443	    LD="${LD-ld} -m elf_x86_64_fbsd"
9444	    ;;
9445	  x86_64-*linux*)
9446	    LD="${LD-ld} -m elf_x86_64"
9447	    ;;
9448	  powerpcle-*linux*)
9449	    LD="${LD-ld} -m elf64lppc"
9450	    ;;
9451	  powerpc-*linux*)
9452	    LD="${LD-ld} -m elf64ppc"
9453	    ;;
9454	  s390*-*linux*|s390*-*tpf*)
9455	    LD="${LD-ld} -m elf64_s390"
9456	    ;;
9457	  sparc*-*linux*)
9458	    LD="${LD-ld} -m elf64_sparc"
9459	    ;;
9460	esac
9461	;;
9462    esac
9463  fi
9464  rm -rf conftest*
9465  ;;
9466
9467*-*-sco3.2v5*)
9468  # On SCO OpenServer 5, we need -belf to get full-featured binaries.
9469  SAVE_CFLAGS=$CFLAGS
9470  CFLAGS="$CFLAGS -belf"
9471  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5
9472$as_echo_n "checking whether the C compiler needs -belf... " >&6; }
9473if ${lt_cv_cc_needs_belf+:} false; then :
9474  $as_echo_n "(cached) " >&6
9475else
9476  ac_ext=c
9477ac_cpp='$CPP $CPPFLAGS'
9478ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
9479ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
9480ac_compiler_gnu=$ac_cv_c_compiler_gnu
9481
9482     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9483/* end confdefs.h.  */
9484
9485int
9486main ()
9487{
9488
9489  ;
9490  return 0;
9491}
9492_ACEOF
9493if ac_fn_c_try_link "$LINENO"; then :
9494  lt_cv_cc_needs_belf=yes
9495else
9496  lt_cv_cc_needs_belf=no
9497fi
9498rm -f core conftest.err conftest.$ac_objext \
9499    conftest$ac_exeext conftest.$ac_ext
9500     ac_ext=c
9501ac_cpp='$CPP $CPPFLAGS'
9502ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
9503ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
9504ac_compiler_gnu=$ac_cv_c_compiler_gnu
9505
9506fi
9507{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5
9508$as_echo "$lt_cv_cc_needs_belf" >&6; }
9509  if test yes != "$lt_cv_cc_needs_belf"; then
9510    # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
9511    CFLAGS=$SAVE_CFLAGS
9512  fi
9513  ;;
9514*-*solaris*)
9515  # Find out what ABI is being produced by ac_compile, and set linker
9516  # options accordingly.
9517  echo 'int i;' > conftest.$ac_ext
9518  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
9519  (eval $ac_compile) 2>&5
9520  ac_status=$?
9521  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
9522  test $ac_status = 0; }; then
9523    case `/usr/bin/file conftest.o` in
9524    *64-bit*)
9525      case $lt_cv_prog_gnu_ld in
9526      yes*)
9527        case $host in
9528        i?86-*-solaris*|x86_64-*-solaris*)
9529          LD="${LD-ld} -m elf_x86_64"
9530          ;;
9531        sparc*-*-solaris*)
9532          LD="${LD-ld} -m elf64_sparc"
9533          ;;
9534        esac
9535        # GNU ld 2.21 introduced _sol2 emulations.  Use them if available.
9536        if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then
9537          LD=${LD-ld}_sol2
9538        fi
9539        ;;
9540      *)
9541	if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
9542	  LD="${LD-ld} -64"
9543	fi
9544	;;
9545      esac
9546      ;;
9547    esac
9548  fi
9549  rm -rf conftest*
9550  ;;
9551esac
9552
9553need_locks=$enable_libtool_lock
9554
9555if test -n "$ac_tool_prefix"; then
9556  # Extract the first word of "${ac_tool_prefix}mt", so it can be a program name with args.
9557set dummy ${ac_tool_prefix}mt; ac_word=$2
9558{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9559$as_echo_n "checking for $ac_word... " >&6; }
9560if ${ac_cv_prog_MANIFEST_TOOL+:} false; then :
9561  $as_echo_n "(cached) " >&6
9562else
9563  if test -n "$MANIFEST_TOOL"; then
9564  ac_cv_prog_MANIFEST_TOOL="$MANIFEST_TOOL" # Let the user override the test.
9565else
9566as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9567for as_dir in $PATH
9568do
9569  IFS=$as_save_IFS
9570  test -z "$as_dir" && as_dir=.
9571    for ac_exec_ext in '' $ac_executable_extensions; do
9572  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9573    ac_cv_prog_MANIFEST_TOOL="${ac_tool_prefix}mt"
9574    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9575    break 2
9576  fi
9577done
9578  done
9579IFS=$as_save_IFS
9580
9581fi
9582fi
9583MANIFEST_TOOL=$ac_cv_prog_MANIFEST_TOOL
9584if test -n "$MANIFEST_TOOL"; then
9585  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MANIFEST_TOOL" >&5
9586$as_echo "$MANIFEST_TOOL" >&6; }
9587else
9588  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9589$as_echo "no" >&6; }
9590fi
9591
9592
9593fi
9594if test -z "$ac_cv_prog_MANIFEST_TOOL"; then
9595  ac_ct_MANIFEST_TOOL=$MANIFEST_TOOL
9596  # Extract the first word of "mt", so it can be a program name with args.
9597set dummy mt; ac_word=$2
9598{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9599$as_echo_n "checking for $ac_word... " >&6; }
9600if ${ac_cv_prog_ac_ct_MANIFEST_TOOL+:} false; then :
9601  $as_echo_n "(cached) " >&6
9602else
9603  if test -n "$ac_ct_MANIFEST_TOOL"; then
9604  ac_cv_prog_ac_ct_MANIFEST_TOOL="$ac_ct_MANIFEST_TOOL" # Let the user override the test.
9605else
9606as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9607for as_dir in $PATH
9608do
9609  IFS=$as_save_IFS
9610  test -z "$as_dir" && as_dir=.
9611    for ac_exec_ext in '' $ac_executable_extensions; do
9612  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9613    ac_cv_prog_ac_ct_MANIFEST_TOOL="mt"
9614    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9615    break 2
9616  fi
9617done
9618  done
9619IFS=$as_save_IFS
9620
9621fi
9622fi
9623ac_ct_MANIFEST_TOOL=$ac_cv_prog_ac_ct_MANIFEST_TOOL
9624if test -n "$ac_ct_MANIFEST_TOOL"; then
9625  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MANIFEST_TOOL" >&5
9626$as_echo "$ac_ct_MANIFEST_TOOL" >&6; }
9627else
9628  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9629$as_echo "no" >&6; }
9630fi
9631
9632  if test "x$ac_ct_MANIFEST_TOOL" = x; then
9633    MANIFEST_TOOL=":"
9634  else
9635    case $cross_compiling:$ac_tool_warned in
9636yes:)
9637{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9638$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9639ac_tool_warned=yes ;;
9640esac
9641    MANIFEST_TOOL=$ac_ct_MANIFEST_TOOL
9642  fi
9643else
9644  MANIFEST_TOOL="$ac_cv_prog_MANIFEST_TOOL"
9645fi
9646
9647test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt
9648{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool" >&5
9649$as_echo_n "checking if $MANIFEST_TOOL is a manifest tool... " >&6; }
9650if ${lt_cv_path_mainfest_tool+:} false; then :
9651  $as_echo_n "(cached) " >&6
9652else
9653  lt_cv_path_mainfest_tool=no
9654  echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&5
9655  $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out
9656  cat conftest.err >&5
9657  if $GREP 'Manifest Tool' conftest.out > /dev/null; then
9658    lt_cv_path_mainfest_tool=yes
9659  fi
9660  rm -f conftest*
9661fi
9662{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5
9663$as_echo "$lt_cv_path_mainfest_tool" >&6; }
9664if test yes != "$lt_cv_path_mainfest_tool"; then
9665  MANIFEST_TOOL=:
9666fi
9667
9668
9669
9670
9671
9672
9673  case $host_os in
9674    rhapsody* | darwin*)
9675    if test -n "$ac_tool_prefix"; then
9676  # Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args.
9677set dummy ${ac_tool_prefix}dsymutil; ac_word=$2
9678{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9679$as_echo_n "checking for $ac_word... " >&6; }
9680if ${ac_cv_prog_DSYMUTIL+:} false; then :
9681  $as_echo_n "(cached) " >&6
9682else
9683  if test -n "$DSYMUTIL"; then
9684  ac_cv_prog_DSYMUTIL="$DSYMUTIL" # Let the user override the test.
9685else
9686as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9687for as_dir in $PATH
9688do
9689  IFS=$as_save_IFS
9690  test -z "$as_dir" && as_dir=.
9691    for ac_exec_ext in '' $ac_executable_extensions; do
9692  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9693    ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil"
9694    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9695    break 2
9696  fi
9697done
9698  done
9699IFS=$as_save_IFS
9700
9701fi
9702fi
9703DSYMUTIL=$ac_cv_prog_DSYMUTIL
9704if test -n "$DSYMUTIL"; then
9705  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
9706$as_echo "$DSYMUTIL" >&6; }
9707else
9708  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9709$as_echo "no" >&6; }
9710fi
9711
9712
9713fi
9714if test -z "$ac_cv_prog_DSYMUTIL"; then
9715  ac_ct_DSYMUTIL=$DSYMUTIL
9716  # Extract the first word of "dsymutil", so it can be a program name with args.
9717set dummy dsymutil; ac_word=$2
9718{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9719$as_echo_n "checking for $ac_word... " >&6; }
9720if ${ac_cv_prog_ac_ct_DSYMUTIL+:} false; then :
9721  $as_echo_n "(cached) " >&6
9722else
9723  if test -n "$ac_ct_DSYMUTIL"; then
9724  ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # Let the user override the test.
9725else
9726as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9727for as_dir in $PATH
9728do
9729  IFS=$as_save_IFS
9730  test -z "$as_dir" && as_dir=.
9731    for ac_exec_ext in '' $ac_executable_extensions; do
9732  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9733    ac_cv_prog_ac_ct_DSYMUTIL="dsymutil"
9734    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9735    break 2
9736  fi
9737done
9738  done
9739IFS=$as_save_IFS
9740
9741fi
9742fi
9743ac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL
9744if test -n "$ac_ct_DSYMUTIL"; then
9745  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DSYMUTIL" >&5
9746$as_echo "$ac_ct_DSYMUTIL" >&6; }
9747else
9748  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9749$as_echo "no" >&6; }
9750fi
9751
9752  if test "x$ac_ct_DSYMUTIL" = x; then
9753    DSYMUTIL=":"
9754  else
9755    case $cross_compiling:$ac_tool_warned in
9756yes:)
9757{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9758$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9759ac_tool_warned=yes ;;
9760esac
9761    DSYMUTIL=$ac_ct_DSYMUTIL
9762  fi
9763else
9764  DSYMUTIL="$ac_cv_prog_DSYMUTIL"
9765fi
9766
9767    if test -n "$ac_tool_prefix"; then
9768  # Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args.
9769set dummy ${ac_tool_prefix}nmedit; ac_word=$2
9770{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9771$as_echo_n "checking for $ac_word... " >&6; }
9772if ${ac_cv_prog_NMEDIT+:} false; then :
9773  $as_echo_n "(cached) " >&6
9774else
9775  if test -n "$NMEDIT"; then
9776  ac_cv_prog_NMEDIT="$NMEDIT" # Let the user override the test.
9777else
9778as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9779for as_dir in $PATH
9780do
9781  IFS=$as_save_IFS
9782  test -z "$as_dir" && as_dir=.
9783    for ac_exec_ext in '' $ac_executable_extensions; do
9784  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9785    ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit"
9786    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9787    break 2
9788  fi
9789done
9790  done
9791IFS=$as_save_IFS
9792
9793fi
9794fi
9795NMEDIT=$ac_cv_prog_NMEDIT
9796if test -n "$NMEDIT"; then
9797  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NMEDIT" >&5
9798$as_echo "$NMEDIT" >&6; }
9799else
9800  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9801$as_echo "no" >&6; }
9802fi
9803
9804
9805fi
9806if test -z "$ac_cv_prog_NMEDIT"; then
9807  ac_ct_NMEDIT=$NMEDIT
9808  # Extract the first word of "nmedit", so it can be a program name with args.
9809set dummy nmedit; ac_word=$2
9810{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9811$as_echo_n "checking for $ac_word... " >&6; }
9812if ${ac_cv_prog_ac_ct_NMEDIT+:} false; then :
9813  $as_echo_n "(cached) " >&6
9814else
9815  if test -n "$ac_ct_NMEDIT"; then
9816  ac_cv_prog_ac_ct_NMEDIT="$ac_ct_NMEDIT" # Let the user override the test.
9817else
9818as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9819for as_dir in $PATH
9820do
9821  IFS=$as_save_IFS
9822  test -z "$as_dir" && as_dir=.
9823    for ac_exec_ext in '' $ac_executable_extensions; do
9824  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9825    ac_cv_prog_ac_ct_NMEDIT="nmedit"
9826    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9827    break 2
9828  fi
9829done
9830  done
9831IFS=$as_save_IFS
9832
9833fi
9834fi
9835ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT
9836if test -n "$ac_ct_NMEDIT"; then
9837  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NMEDIT" >&5
9838$as_echo "$ac_ct_NMEDIT" >&6; }
9839else
9840  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9841$as_echo "no" >&6; }
9842fi
9843
9844  if test "x$ac_ct_NMEDIT" = x; then
9845    NMEDIT=":"
9846  else
9847    case $cross_compiling:$ac_tool_warned in
9848yes:)
9849{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9850$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9851ac_tool_warned=yes ;;
9852esac
9853    NMEDIT=$ac_ct_NMEDIT
9854  fi
9855else
9856  NMEDIT="$ac_cv_prog_NMEDIT"
9857fi
9858
9859    if test -n "$ac_tool_prefix"; then
9860  # Extract the first word of "${ac_tool_prefix}lipo", so it can be a program name with args.
9861set dummy ${ac_tool_prefix}lipo; ac_word=$2
9862{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9863$as_echo_n "checking for $ac_word... " >&6; }
9864if ${ac_cv_prog_LIPO+:} false; then :
9865  $as_echo_n "(cached) " >&6
9866else
9867  if test -n "$LIPO"; then
9868  ac_cv_prog_LIPO="$LIPO" # Let the user override the test.
9869else
9870as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9871for as_dir in $PATH
9872do
9873  IFS=$as_save_IFS
9874  test -z "$as_dir" && as_dir=.
9875    for ac_exec_ext in '' $ac_executable_extensions; do
9876  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9877    ac_cv_prog_LIPO="${ac_tool_prefix}lipo"
9878    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9879    break 2
9880  fi
9881done
9882  done
9883IFS=$as_save_IFS
9884
9885fi
9886fi
9887LIPO=$ac_cv_prog_LIPO
9888if test -n "$LIPO"; then
9889  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
9890$as_echo "$LIPO" >&6; }
9891else
9892  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9893$as_echo "no" >&6; }
9894fi
9895
9896
9897fi
9898if test -z "$ac_cv_prog_LIPO"; then
9899  ac_ct_LIPO=$LIPO
9900  # Extract the first word of "lipo", so it can be a program name with args.
9901set dummy lipo; ac_word=$2
9902{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9903$as_echo_n "checking for $ac_word... " >&6; }
9904if ${ac_cv_prog_ac_ct_LIPO+:} false; then :
9905  $as_echo_n "(cached) " >&6
9906else
9907  if test -n "$ac_ct_LIPO"; then
9908  ac_cv_prog_ac_ct_LIPO="$ac_ct_LIPO" # Let the user override the test.
9909else
9910as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9911for as_dir in $PATH
9912do
9913  IFS=$as_save_IFS
9914  test -z "$as_dir" && as_dir=.
9915    for ac_exec_ext in '' $ac_executable_extensions; do
9916  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9917    ac_cv_prog_ac_ct_LIPO="lipo"
9918    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9919    break 2
9920  fi
9921done
9922  done
9923IFS=$as_save_IFS
9924
9925fi
9926fi
9927ac_ct_LIPO=$ac_cv_prog_ac_ct_LIPO
9928if test -n "$ac_ct_LIPO"; then
9929  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LIPO" >&5
9930$as_echo "$ac_ct_LIPO" >&6; }
9931else
9932  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9933$as_echo "no" >&6; }
9934fi
9935
9936  if test "x$ac_ct_LIPO" = x; then
9937    LIPO=":"
9938  else
9939    case $cross_compiling:$ac_tool_warned in
9940yes:)
9941{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9942$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9943ac_tool_warned=yes ;;
9944esac
9945    LIPO=$ac_ct_LIPO
9946  fi
9947else
9948  LIPO="$ac_cv_prog_LIPO"
9949fi
9950
9951    if test -n "$ac_tool_prefix"; then
9952  # Extract the first word of "${ac_tool_prefix}otool", so it can be a program name with args.
9953set dummy ${ac_tool_prefix}otool; ac_word=$2
9954{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9955$as_echo_n "checking for $ac_word... " >&6; }
9956if ${ac_cv_prog_OTOOL+:} false; then :
9957  $as_echo_n "(cached) " >&6
9958else
9959  if test -n "$OTOOL"; then
9960  ac_cv_prog_OTOOL="$OTOOL" # Let the user override the test.
9961else
9962as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9963for as_dir in $PATH
9964do
9965  IFS=$as_save_IFS
9966  test -z "$as_dir" && as_dir=.
9967    for ac_exec_ext in '' $ac_executable_extensions; do
9968  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9969    ac_cv_prog_OTOOL="${ac_tool_prefix}otool"
9970    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9971    break 2
9972  fi
9973done
9974  done
9975IFS=$as_save_IFS
9976
9977fi
9978fi
9979OTOOL=$ac_cv_prog_OTOOL
9980if test -n "$OTOOL"; then
9981  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
9982$as_echo "$OTOOL" >&6; }
9983else
9984  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9985$as_echo "no" >&6; }
9986fi
9987
9988
9989fi
9990if test -z "$ac_cv_prog_OTOOL"; then
9991  ac_ct_OTOOL=$OTOOL
9992  # Extract the first word of "otool", so it can be a program name with args.
9993set dummy otool; ac_word=$2
9994{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9995$as_echo_n "checking for $ac_word... " >&6; }
9996if ${ac_cv_prog_ac_ct_OTOOL+:} false; then :
9997  $as_echo_n "(cached) " >&6
9998else
9999  if test -n "$ac_ct_OTOOL"; then
10000  ac_cv_prog_ac_ct_OTOOL="$ac_ct_OTOOL" # Let the user override the test.
10001else
10002as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10003for as_dir in $PATH
10004do
10005  IFS=$as_save_IFS
10006  test -z "$as_dir" && as_dir=.
10007    for ac_exec_ext in '' $ac_executable_extensions; do
10008  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10009    ac_cv_prog_ac_ct_OTOOL="otool"
10010    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10011    break 2
10012  fi
10013done
10014  done
10015IFS=$as_save_IFS
10016
10017fi
10018fi
10019ac_ct_OTOOL=$ac_cv_prog_ac_ct_OTOOL
10020if test -n "$ac_ct_OTOOL"; then
10021  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL" >&5
10022$as_echo "$ac_ct_OTOOL" >&6; }
10023else
10024  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10025$as_echo "no" >&6; }
10026fi
10027
10028  if test "x$ac_ct_OTOOL" = x; then
10029    OTOOL=":"
10030  else
10031    case $cross_compiling:$ac_tool_warned in
10032yes:)
10033{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
10034$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
10035ac_tool_warned=yes ;;
10036esac
10037    OTOOL=$ac_ct_OTOOL
10038  fi
10039else
10040  OTOOL="$ac_cv_prog_OTOOL"
10041fi
10042
10043    if test -n "$ac_tool_prefix"; then
10044  # Extract the first word of "${ac_tool_prefix}otool64", so it can be a program name with args.
10045set dummy ${ac_tool_prefix}otool64; ac_word=$2
10046{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10047$as_echo_n "checking for $ac_word... " >&6; }
10048if ${ac_cv_prog_OTOOL64+:} false; then :
10049  $as_echo_n "(cached) " >&6
10050else
10051  if test -n "$OTOOL64"; then
10052  ac_cv_prog_OTOOL64="$OTOOL64" # Let the user override the test.
10053else
10054as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10055for as_dir in $PATH
10056do
10057  IFS=$as_save_IFS
10058  test -z "$as_dir" && as_dir=.
10059    for ac_exec_ext in '' $ac_executable_extensions; do
10060  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10061    ac_cv_prog_OTOOL64="${ac_tool_prefix}otool64"
10062    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10063    break 2
10064  fi
10065done
10066  done
10067IFS=$as_save_IFS
10068
10069fi
10070fi
10071OTOOL64=$ac_cv_prog_OTOOL64
10072if test -n "$OTOOL64"; then
10073  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL64" >&5
10074$as_echo "$OTOOL64" >&6; }
10075else
10076  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10077$as_echo "no" >&6; }
10078fi
10079
10080
10081fi
10082if test -z "$ac_cv_prog_OTOOL64"; then
10083  ac_ct_OTOOL64=$OTOOL64
10084  # Extract the first word of "otool64", so it can be a program name with args.
10085set dummy otool64; ac_word=$2
10086{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10087$as_echo_n "checking for $ac_word... " >&6; }
10088if ${ac_cv_prog_ac_ct_OTOOL64+:} false; then :
10089  $as_echo_n "(cached) " >&6
10090else
10091  if test -n "$ac_ct_OTOOL64"; then
10092  ac_cv_prog_ac_ct_OTOOL64="$ac_ct_OTOOL64" # Let the user override the test.
10093else
10094as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10095for as_dir in $PATH
10096do
10097  IFS=$as_save_IFS
10098  test -z "$as_dir" && as_dir=.
10099    for ac_exec_ext in '' $ac_executable_extensions; do
10100  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10101    ac_cv_prog_ac_ct_OTOOL64="otool64"
10102    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10103    break 2
10104  fi
10105done
10106  done
10107IFS=$as_save_IFS
10108
10109fi
10110fi
10111ac_ct_OTOOL64=$ac_cv_prog_ac_ct_OTOOL64
10112if test -n "$ac_ct_OTOOL64"; then
10113  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL64" >&5
10114$as_echo "$ac_ct_OTOOL64" >&6; }
10115else
10116  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10117$as_echo "no" >&6; }
10118fi
10119
10120  if test "x$ac_ct_OTOOL64" = x; then
10121    OTOOL64=":"
10122  else
10123    case $cross_compiling:$ac_tool_warned in
10124yes:)
10125{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
10126$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
10127ac_tool_warned=yes ;;
10128esac
10129    OTOOL64=$ac_ct_OTOOL64
10130  fi
10131else
10132  OTOOL64="$ac_cv_prog_OTOOL64"
10133fi
10134
10135
10136
10137
10138
10139
10140
10141
10142
10143
10144
10145
10146
10147
10148
10149
10150
10151
10152
10153
10154
10155
10156
10157
10158
10159
10160
10161    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -single_module linker flag" >&5
10162$as_echo_n "checking for -single_module linker flag... " >&6; }
10163if ${lt_cv_apple_cc_single_mod+:} false; then :
10164  $as_echo_n "(cached) " >&6
10165else
10166  lt_cv_apple_cc_single_mod=no
10167      if test -z "$LT_MULTI_MODULE"; then
10168	# By default we will add the -single_module flag. You can override
10169	# by either setting the environment variable LT_MULTI_MODULE
10170	# non-empty at configure time, or by adding -multi_module to the
10171	# link flags.
10172	rm -rf libconftest.dylib*
10173	echo "int foo(void){return 1;}" > conftest.c
10174	echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
10175-dynamiclib -Wl,-single_module conftest.c" >&5
10176	$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
10177	  -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
10178        _lt_result=$?
10179	# If there is a non-empty error log, and "single_module"
10180	# appears in it, assume the flag caused a linker warning
10181        if test -s conftest.err && $GREP single_module conftest.err; then
10182	  cat conftest.err >&5
10183	# Otherwise, if the output was created with a 0 exit code from
10184	# the compiler, it worked.
10185	elif test -f libconftest.dylib && test 0 = "$_lt_result"; then
10186	  lt_cv_apple_cc_single_mod=yes
10187	else
10188	  cat conftest.err >&5
10189	fi
10190	rm -rf libconftest.dylib*
10191	rm -f conftest.*
10192      fi
10193fi
10194{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5
10195$as_echo "$lt_cv_apple_cc_single_mod" >&6; }
10196
10197    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5
10198$as_echo_n "checking for -exported_symbols_list linker flag... " >&6; }
10199if ${lt_cv_ld_exported_symbols_list+:} false; then :
10200  $as_echo_n "(cached) " >&6
10201else
10202  lt_cv_ld_exported_symbols_list=no
10203      save_LDFLAGS=$LDFLAGS
10204      echo "_main" > conftest.sym
10205      LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
10206      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10207/* end confdefs.h.  */
10208
10209int
10210main ()
10211{
10212
10213  ;
10214  return 0;
10215}
10216_ACEOF
10217if ac_fn_c_try_link "$LINENO"; then :
10218  lt_cv_ld_exported_symbols_list=yes
10219else
10220  lt_cv_ld_exported_symbols_list=no
10221fi
10222rm -f core conftest.err conftest.$ac_objext \
10223    conftest$ac_exeext conftest.$ac_ext
10224	LDFLAGS=$save_LDFLAGS
10225
10226fi
10227{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5
10228$as_echo "$lt_cv_ld_exported_symbols_list" >&6; }
10229
10230    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -force_load linker flag" >&5
10231$as_echo_n "checking for -force_load linker flag... " >&6; }
10232if ${lt_cv_ld_force_load+:} false; then :
10233  $as_echo_n "(cached) " >&6
10234else
10235  lt_cv_ld_force_load=no
10236      cat > conftest.c << _LT_EOF
10237int forced_loaded() { return 2;}
10238_LT_EOF
10239      echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&5
10240      $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5
10241      echo "$AR cru libconftest.a conftest.o" >&5
10242      $AR cru libconftest.a conftest.o 2>&5
10243      echo "$RANLIB libconftest.a" >&5
10244      $RANLIB libconftest.a 2>&5
10245      cat > conftest.c << _LT_EOF
10246int main() { return 0;}
10247_LT_EOF
10248      echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&5
10249      $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err
10250      _lt_result=$?
10251      if test -s conftest.err && $GREP force_load conftest.err; then
10252	cat conftest.err >&5
10253      elif test -f conftest && test 0 = "$_lt_result" && $GREP forced_load conftest >/dev/null 2>&1; then
10254	lt_cv_ld_force_load=yes
10255      else
10256	cat conftest.err >&5
10257      fi
10258        rm -f conftest.err libconftest.a conftest conftest.c
10259        rm -rf conftest.dSYM
10260
10261fi
10262{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_force_load" >&5
10263$as_echo "$lt_cv_ld_force_load" >&6; }
10264    case $host_os in
10265    rhapsody* | darwin1.[012])
10266      _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;;
10267    darwin1.*)
10268      _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
10269    darwin*) # darwin 5.x on
10270      # if running on 10.5 or later, the deployment target defaults
10271      # to the OS version, if on x86, and 10.4, the deployment
10272      # target defaults to 10.4. Don't you love it?
10273      case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
10274	10.0,*86*-darwin8*|10.0,*-darwin[91]*)
10275	  _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
10276	10.[012][,.]*)
10277	  _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
10278	10.*)
10279	  _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
10280      esac
10281    ;;
10282  esac
10283    if test yes = "$lt_cv_apple_cc_single_mod"; then
10284      _lt_dar_single_mod='$single_module'
10285    fi
10286    if test yes = "$lt_cv_ld_exported_symbols_list"; then
10287      _lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym'
10288    else
10289      _lt_dar_export_syms='~$NMEDIT -s $output_objdir/$libname-symbols.expsym $lib'
10290    fi
10291    if test : != "$DSYMUTIL" && test no = "$lt_cv_ld_force_load"; then
10292      _lt_dsymutil='~$DSYMUTIL $lib || :'
10293    else
10294      _lt_dsymutil=
10295    fi
10296    ;;
10297  esac
10298
10299# func_munge_path_list VARIABLE PATH
10300# -----------------------------------
10301# VARIABLE is name of variable containing _space_ separated list of
10302# directories to be munged by the contents of PATH, which is string
10303# having a format:
10304# "DIR[:DIR]:"
10305#       string "DIR[ DIR]" will be prepended to VARIABLE
10306# ":DIR[:DIR]"
10307#       string "DIR[ DIR]" will be appended to VARIABLE
10308# "DIRP[:DIRP]::[DIRA:]DIRA"
10309#       string "DIRP[ DIRP]" will be prepended to VARIABLE and string
10310#       "DIRA[ DIRA]" will be appended to VARIABLE
10311# "DIR[:DIR]"
10312#       VARIABLE will be replaced by "DIR[ DIR]"
10313func_munge_path_list ()
10314{
10315    case x$2 in
10316    x)
10317        ;;
10318    *:)
10319        eval $1=\"`$ECHO $2 | $SED 's/:/ /g'` \$$1\"
10320        ;;
10321    x:*)
10322        eval $1=\"\$$1 `$ECHO $2 | $SED 's/:/ /g'`\"
10323        ;;
10324    *::*)
10325        eval $1=\"\$$1\ `$ECHO $2 | $SED -e 's/.*:://' -e 's/:/ /g'`\"
10326        eval $1=\"`$ECHO $2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \$$1\"
10327        ;;
10328    *)
10329        eval $1=\"`$ECHO $2 | $SED 's/:/ /g'`\"
10330        ;;
10331    esac
10332}
10333
10334for ac_header in dlfcn.h
10335do :
10336  ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default
10337"
10338if test "x$ac_cv_header_dlfcn_h" = xyes; then :
10339  cat >>confdefs.h <<_ACEOF
10340#define HAVE_DLFCN_H 1
10341_ACEOF
10342
10343fi
10344
10345done
10346
10347
10348
10349
10350
10351
10352
10353# Set options
10354
10355
10356
10357        enable_dlopen=no
10358
10359
10360  enable_win32_dll=no
10361
10362
10363            # Check whether --enable-shared was given.
10364if test "${enable_shared+set}" = set; then :
10365  enableval=$enable_shared; p=${PACKAGE-default}
10366    case $enableval in
10367    yes) enable_shared=yes ;;
10368    no) enable_shared=no ;;
10369    *)
10370      enable_shared=no
10371      # Look at the argument we got.  We use all the common list separators.
10372      lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
10373      for pkg in $enableval; do
10374	IFS=$lt_save_ifs
10375	if test "X$pkg" = "X$p"; then
10376	  enable_shared=yes
10377	fi
10378      done
10379      IFS=$lt_save_ifs
10380      ;;
10381    esac
10382else
10383  enable_shared=yes
10384fi
10385
10386
10387
10388
10389
10390
10391
10392
10393
10394  # Check whether --enable-static was given.
10395if test "${enable_static+set}" = set; then :
10396  enableval=$enable_static; p=${PACKAGE-default}
10397    case $enableval in
10398    yes) enable_static=yes ;;
10399    no) enable_static=no ;;
10400    *)
10401     enable_static=no
10402      # Look at the argument we got.  We use all the common list separators.
10403      lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
10404      for pkg in $enableval; do
10405	IFS=$lt_save_ifs
10406	if test "X$pkg" = "X$p"; then
10407	  enable_static=yes
10408	fi
10409      done
10410      IFS=$lt_save_ifs
10411      ;;
10412    esac
10413else
10414  enable_static=yes
10415fi
10416
10417
10418
10419
10420
10421
10422
10423
10424
10425
10426# Check whether --with-pic was given.
10427if test "${with_pic+set}" = set; then :
10428  withval=$with_pic; lt_p=${PACKAGE-default}
10429    case $withval in
10430    yes|no) pic_mode=$withval ;;
10431    *)
10432      pic_mode=default
10433      # Look at the argument we got.  We use all the common list separators.
10434      lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
10435      for lt_pkg in $withval; do
10436	IFS=$lt_save_ifs
10437	if test "X$lt_pkg" = "X$lt_p"; then
10438	  pic_mode=yes
10439	fi
10440      done
10441      IFS=$lt_save_ifs
10442      ;;
10443    esac
10444else
10445  pic_mode=default
10446fi
10447
10448
10449
10450
10451
10452
10453
10454
10455  # Check whether --enable-fast-install was given.
10456if test "${enable_fast_install+set}" = set; then :
10457  enableval=$enable_fast_install; p=${PACKAGE-default}
10458    case $enableval in
10459    yes) enable_fast_install=yes ;;
10460    no) enable_fast_install=no ;;
10461    *)
10462      enable_fast_install=no
10463      # Look at the argument we got.  We use all the common list separators.
10464      lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
10465      for pkg in $enableval; do
10466	IFS=$lt_save_ifs
10467	if test "X$pkg" = "X$p"; then
10468	  enable_fast_install=yes
10469	fi
10470      done
10471      IFS=$lt_save_ifs
10472      ;;
10473    esac
10474else
10475  enable_fast_install=yes
10476fi
10477
10478
10479
10480
10481
10482
10483
10484
10485  shared_archive_member_spec=
10486case $host,$enable_shared in
10487power*-*-aix[5-9]*,yes)
10488  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of shared library versioning to provide" >&5
10489$as_echo_n "checking which variant of shared library versioning to provide... " >&6; }
10490
10491# Check whether --with-aix-soname was given.
10492if test "${with_aix_soname+set}" = set; then :
10493  withval=$with_aix_soname; case $withval in
10494    aix|svr4|both)
10495      ;;
10496    *)
10497      as_fn_error $? "Unknown argument to --with-aix-soname" "$LINENO" 5
10498      ;;
10499    esac
10500    lt_cv_with_aix_soname=$with_aix_soname
10501else
10502  if ${lt_cv_with_aix_soname+:} false; then :
10503  $as_echo_n "(cached) " >&6
10504else
10505  lt_cv_with_aix_soname=aix
10506fi
10507
10508    with_aix_soname=$lt_cv_with_aix_soname
10509fi
10510
10511  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_aix_soname" >&5
10512$as_echo "$with_aix_soname" >&6; }
10513  if test aix != "$with_aix_soname"; then
10514    # For the AIX way of multilib, we name the shared archive member
10515    # based on the bitwidth used, traditionally 'shr.o' or 'shr_64.o',
10516    # and 'shr.imp' or 'shr_64.imp', respectively, for the Import File.
10517    # Even when GNU compilers ignore OBJECT_MODE but need '-maix64' flag,
10518    # the AIX toolchain works better with OBJECT_MODE set (default 32).
10519    if test 64 = "${OBJECT_MODE-32}"; then
10520      shared_archive_member_spec=shr_64
10521    else
10522      shared_archive_member_spec=shr
10523    fi
10524  fi
10525  ;;
10526*)
10527  with_aix_soname=aix
10528  ;;
10529esac
10530
10531
10532
10533
10534
10535
10536
10537
10538
10539
10540# This can be used to rebuild libtool when needed
10541LIBTOOL_DEPS=$ltmain
10542
10543# Always use our own libtool.
10544LIBTOOL='$(SHELL) $(top_builddir)/libtool'
10545
10546
10547
10548
10549
10550
10551
10552
10553
10554
10555
10556
10557
10558
10559
10560
10561
10562
10563
10564
10565
10566
10567
10568
10569
10570
10571
10572
10573
10574
10575test -z "$LN_S" && LN_S="ln -s"
10576
10577
10578
10579
10580
10581
10582
10583
10584
10585
10586
10587
10588
10589
10590if test -n "${ZSH_VERSION+set}"; then
10591   setopt NO_GLOB_SUBST
10592fi
10593
10594{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5
10595$as_echo_n "checking for objdir... " >&6; }
10596if ${lt_cv_objdir+:} false; then :
10597  $as_echo_n "(cached) " >&6
10598else
10599  rm -f .libs 2>/dev/null
10600mkdir .libs 2>/dev/null
10601if test -d .libs; then
10602  lt_cv_objdir=.libs
10603else
10604  # MS-DOS does not allow filenames that begin with a dot.
10605  lt_cv_objdir=_libs
10606fi
10607rmdir .libs 2>/dev/null
10608fi
10609{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_objdir" >&5
10610$as_echo "$lt_cv_objdir" >&6; }
10611objdir=$lt_cv_objdir
10612
10613
10614
10615
10616
10617cat >>confdefs.h <<_ACEOF
10618#define LT_OBJDIR "$lt_cv_objdir/"
10619_ACEOF
10620
10621
10622
10623
10624case $host_os in
10625aix3*)
10626  # AIX sometimes has problems with the GCC collect2 program.  For some
10627  # reason, if we set the COLLECT_NAMES environment variable, the problems
10628  # vanish in a puff of smoke.
10629  if test set != "${COLLECT_NAMES+set}"; then
10630    COLLECT_NAMES=
10631    export COLLECT_NAMES
10632  fi
10633  ;;
10634esac
10635
10636# Global variables:
10637ofile=libtool
10638can_build_shared=yes
10639
10640# All known linkers require a '.a' archive for static linking (except MSVC,
10641# which needs '.lib').
10642libext=a
10643
10644with_gnu_ld=$lt_cv_prog_gnu_ld
10645
10646old_CC=$CC
10647old_CFLAGS=$CFLAGS
10648
10649# Set sane defaults for various variables
10650test -z "$CC" && CC=cc
10651test -z "$LTCC" && LTCC=$CC
10652test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
10653test -z "$LD" && LD=ld
10654test -z "$ac_objext" && ac_objext=o
10655
10656func_cc_basename $compiler
10657cc_basename=$func_cc_basename_result
10658
10659
10660# Only perform the check for file, if the check method requires it
10661test -z "$MAGIC_CMD" && MAGIC_CMD=file
10662case $deplibs_check_method in
10663file_magic*)
10664  if test "$file_magic_cmd" = '$MAGIC_CMD'; then
10665    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5
10666$as_echo_n "checking for ${ac_tool_prefix}file... " >&6; }
10667if ${lt_cv_path_MAGIC_CMD+:} false; then :
10668  $as_echo_n "(cached) " >&6
10669else
10670  case $MAGIC_CMD in
10671[\\/*] |  ?:[\\/]*)
10672  lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path.
10673  ;;
10674*)
10675  lt_save_MAGIC_CMD=$MAGIC_CMD
10676  lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
10677  ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
10678  for ac_dir in $ac_dummy; do
10679    IFS=$lt_save_ifs
10680    test -z "$ac_dir" && ac_dir=.
10681    if test -f "$ac_dir/${ac_tool_prefix}file"; then
10682      lt_cv_path_MAGIC_CMD=$ac_dir/"${ac_tool_prefix}file"
10683      if test -n "$file_magic_test_file"; then
10684	case $deplibs_check_method in
10685	"file_magic "*)
10686	  file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
10687	  MAGIC_CMD=$lt_cv_path_MAGIC_CMD
10688	  if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
10689	    $EGREP "$file_magic_regex" > /dev/null; then
10690	    :
10691	  else
10692	    cat <<_LT_EOF 1>&2
10693
10694*** Warning: the command libtool uses to detect shared libraries,
10695*** $file_magic_cmd, produces output that libtool cannot recognize.
10696*** The result is that libtool may fail to recognize shared libraries
10697*** as such.  This will affect the creation of libtool libraries that
10698*** depend on shared libraries, but programs linked with such libtool
10699*** libraries will work regardless of this problem.  Nevertheless, you
10700*** may want to report the problem to your system manager and/or to
10701*** bug-libtool@gnu.org
10702
10703_LT_EOF
10704	  fi ;;
10705	esac
10706      fi
10707      break
10708    fi
10709  done
10710  IFS=$lt_save_ifs
10711  MAGIC_CMD=$lt_save_MAGIC_CMD
10712  ;;
10713esac
10714fi
10715
10716MAGIC_CMD=$lt_cv_path_MAGIC_CMD
10717if test -n "$MAGIC_CMD"; then
10718  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5
10719$as_echo "$MAGIC_CMD" >&6; }
10720else
10721  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10722$as_echo "no" >&6; }
10723fi
10724
10725
10726
10727
10728
10729if test -z "$lt_cv_path_MAGIC_CMD"; then
10730  if test -n "$ac_tool_prefix"; then
10731    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for file" >&5
10732$as_echo_n "checking for file... " >&6; }
10733if ${lt_cv_path_MAGIC_CMD+:} false; then :
10734  $as_echo_n "(cached) " >&6
10735else
10736  case $MAGIC_CMD in
10737[\\/*] |  ?:[\\/]*)
10738  lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path.
10739  ;;
10740*)
10741  lt_save_MAGIC_CMD=$MAGIC_CMD
10742  lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
10743  ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
10744  for ac_dir in $ac_dummy; do
10745    IFS=$lt_save_ifs
10746    test -z "$ac_dir" && ac_dir=.
10747    if test -f "$ac_dir/file"; then
10748      lt_cv_path_MAGIC_CMD=$ac_dir/"file"
10749      if test -n "$file_magic_test_file"; then
10750	case $deplibs_check_method in
10751	"file_magic "*)
10752	  file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
10753	  MAGIC_CMD=$lt_cv_path_MAGIC_CMD
10754	  if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
10755	    $EGREP "$file_magic_regex" > /dev/null; then
10756	    :
10757	  else
10758	    cat <<_LT_EOF 1>&2
10759
10760*** Warning: the command libtool uses to detect shared libraries,
10761*** $file_magic_cmd, produces output that libtool cannot recognize.
10762*** The result is that libtool may fail to recognize shared libraries
10763*** as such.  This will affect the creation of libtool libraries that
10764*** depend on shared libraries, but programs linked with such libtool
10765*** libraries will work regardless of this problem.  Nevertheless, you
10766*** may want to report the problem to your system manager and/or to
10767*** bug-libtool@gnu.org
10768
10769_LT_EOF
10770	  fi ;;
10771	esac
10772      fi
10773      break
10774    fi
10775  done
10776  IFS=$lt_save_ifs
10777  MAGIC_CMD=$lt_save_MAGIC_CMD
10778  ;;
10779esac
10780fi
10781
10782MAGIC_CMD=$lt_cv_path_MAGIC_CMD
10783if test -n "$MAGIC_CMD"; then
10784  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5
10785$as_echo "$MAGIC_CMD" >&6; }
10786else
10787  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10788$as_echo "no" >&6; }
10789fi
10790
10791
10792  else
10793    MAGIC_CMD=:
10794  fi
10795fi
10796
10797  fi
10798  ;;
10799esac
10800
10801# Use C for the default configuration in the libtool script
10802
10803lt_save_CC=$CC
10804ac_ext=c
10805ac_cpp='$CPP $CPPFLAGS'
10806ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
10807ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
10808ac_compiler_gnu=$ac_cv_c_compiler_gnu
10809
10810
10811# Source file extension for C test sources.
10812ac_ext=c
10813
10814# Object file extension for compiled C test sources.
10815objext=o
10816objext=$objext
10817
10818# Code to be used in simple compile tests
10819lt_simple_compile_test_code="int some_variable = 0;"
10820
10821# Code to be used in simple link tests
10822lt_simple_link_test_code='int main(){return(0);}'
10823
10824
10825
10826
10827
10828
10829
10830# If no C compiler was specified, use CC.
10831LTCC=${LTCC-"$CC"}
10832
10833# If no C compiler flags were specified, use CFLAGS.
10834LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
10835
10836# Allow CC to be a program name with arguments.
10837compiler=$CC
10838
10839# Save the default compiler, since it gets overwritten when the other
10840# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
10841compiler_DEFAULT=$CC
10842
10843# save warnings/boilerplate of simple test code
10844ac_outfile=conftest.$ac_objext
10845echo "$lt_simple_compile_test_code" >conftest.$ac_ext
10846eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
10847_lt_compiler_boilerplate=`cat conftest.err`
10848$RM conftest*
10849
10850ac_outfile=conftest.$ac_objext
10851echo "$lt_simple_link_test_code" >conftest.$ac_ext
10852eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
10853_lt_linker_boilerplate=`cat conftest.err`
10854$RM -r conftest*
10855
10856
10857if test -n "$compiler"; then
10858
10859lt_prog_compiler_no_builtin_flag=
10860
10861if test yes = "$GCC"; then
10862  case $cc_basename in
10863  nvcc*)
10864    lt_prog_compiler_no_builtin_flag=' -Xcompiler -fno-builtin' ;;
10865  *)
10866    lt_prog_compiler_no_builtin_flag=' -fno-builtin' ;;
10867  esac
10868
10869  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
10870$as_echo_n "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; }
10871if ${lt_cv_prog_compiler_rtti_exceptions+:} false; then :
10872  $as_echo_n "(cached) " >&6
10873else
10874  lt_cv_prog_compiler_rtti_exceptions=no
10875   ac_outfile=conftest.$ac_objext
10876   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
10877   lt_compiler_flag="-fno-rtti -fno-exceptions"  ## exclude from sc_useless_quotes_in_assignment
10878   # Insert the option either (1) after the last *FLAGS variable, or
10879   # (2) before a word containing "conftest.", or (3) at the end.
10880   # Note that $ac_compile itself does not contain backslashes and begins
10881   # with a dollar sign (not a hyphen), so the echo should work correctly.
10882   # The option is referenced via a variable to avoid confusing sed.
10883   lt_compile=`echo "$ac_compile" | $SED \
10884   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
10885   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
10886   -e 's:$: $lt_compiler_flag:'`
10887   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
10888   (eval "$lt_compile" 2>conftest.err)
10889   ac_status=$?
10890   cat conftest.err >&5
10891   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10892   if (exit $ac_status) && test -s "$ac_outfile"; then
10893     # The compiler can only warn and ignore the option if not recognized
10894     # So say no if there are warnings other than the usual output.
10895     $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
10896     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
10897     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
10898       lt_cv_prog_compiler_rtti_exceptions=yes
10899     fi
10900   fi
10901   $RM conftest*
10902
10903fi
10904{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5
10905$as_echo "$lt_cv_prog_compiler_rtti_exceptions" >&6; }
10906
10907if test yes = "$lt_cv_prog_compiler_rtti_exceptions"; then
10908    lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions"
10909else
10910    :
10911fi
10912
10913fi
10914
10915
10916
10917
10918
10919
10920  lt_prog_compiler_wl=
10921lt_prog_compiler_pic=
10922lt_prog_compiler_static=
10923
10924
10925  if test yes = "$GCC"; then
10926    lt_prog_compiler_wl='-Wl,'
10927    lt_prog_compiler_static='-static'
10928
10929    case $host_os in
10930      aix*)
10931      # All AIX code is PIC.
10932      if test ia64 = "$host_cpu"; then
10933	# AIX 5 now supports IA64 processor
10934	lt_prog_compiler_static='-Bstatic'
10935      fi
10936      lt_prog_compiler_pic='-fPIC'
10937      ;;
10938
10939    amigaos*)
10940      case $host_cpu in
10941      powerpc)
10942            # see comment about AmigaOS4 .so support
10943            lt_prog_compiler_pic='-fPIC'
10944        ;;
10945      m68k)
10946            # FIXME: we need at least 68020 code to build shared libraries, but
10947            # adding the '-m68020' flag to GCC prevents building anything better,
10948            # like '-m68040'.
10949            lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4'
10950        ;;
10951      esac
10952      ;;
10953
10954    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
10955      # PIC is the default for these OSes.
10956      ;;
10957
10958    mingw* | cygwin* | pw32* | os2* | cegcc*)
10959      # This hack is so that the source file can tell whether it is being
10960      # built for inclusion in a dll (and should export symbols for example).
10961      # Although the cygwin gcc ignores -fPIC, still need this for old-style
10962      # (--disable-auto-import) libraries
10963      lt_prog_compiler_pic='-DDLL_EXPORT'
10964      case $host_os in
10965      os2*)
10966	lt_prog_compiler_static='$wl-static'
10967	;;
10968      esac
10969      ;;
10970
10971    darwin* | rhapsody*)
10972      # PIC is the default on this platform
10973      # Common symbols not allowed in MH_DYLIB files
10974      lt_prog_compiler_pic='-fno-common'
10975      ;;
10976
10977    haiku*)
10978      # PIC is the default for Haiku.
10979      # The "-static" flag exists, but is broken.
10980      lt_prog_compiler_static=
10981      ;;
10982
10983    hpux*)
10984      # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
10985      # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
10986      # sets the default TLS model and affects inlining.
10987      case $host_cpu in
10988      hppa*64*)
10989	# +Z the default
10990	;;
10991      *)
10992	lt_prog_compiler_pic='-fPIC'
10993	;;
10994      esac
10995      ;;
10996
10997    interix[3-9]*)
10998      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
10999      # Instead, we relocate shared libraries at runtime.
11000      ;;
11001
11002    msdosdjgpp*)
11003      # Just because we use GCC doesn't mean we suddenly get shared libraries
11004      # on systems that don't support them.
11005      lt_prog_compiler_can_build_shared=no
11006      enable_shared=no
11007      ;;
11008
11009    *nto* | *qnx*)
11010      # QNX uses GNU C++, but need to define -shared option too, otherwise
11011      # it will coredump.
11012      lt_prog_compiler_pic='-fPIC -shared'
11013      ;;
11014
11015    sysv4*MP*)
11016      if test -d /usr/nec; then
11017	lt_prog_compiler_pic=-Kconform_pic
11018      fi
11019      ;;
11020
11021    *)
11022      lt_prog_compiler_pic='-fPIC'
11023      ;;
11024    esac
11025
11026    case $cc_basename in
11027    nvcc*) # Cuda Compiler Driver 2.2
11028      lt_prog_compiler_wl='-Xlinker '
11029      if test -n "$lt_prog_compiler_pic"; then
11030        lt_prog_compiler_pic="-Xcompiler $lt_prog_compiler_pic"
11031      fi
11032      ;;
11033    esac
11034  else
11035    # PORTME Check for flag to pass linker flags through the system compiler.
11036    case $host_os in
11037    aix*)
11038      lt_prog_compiler_wl='-Wl,'
11039      if test ia64 = "$host_cpu"; then
11040	# AIX 5 now supports IA64 processor
11041	lt_prog_compiler_static='-Bstatic'
11042      else
11043	lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp'
11044      fi
11045      ;;
11046
11047    darwin* | rhapsody*)
11048      # PIC is the default on this platform
11049      # Common symbols not allowed in MH_DYLIB files
11050      lt_prog_compiler_pic='-fno-common'
11051      case $cc_basename in
11052      nagfor*)
11053        # NAG Fortran compiler
11054        lt_prog_compiler_wl='-Wl,-Wl,,'
11055        lt_prog_compiler_pic='-PIC'
11056        lt_prog_compiler_static='-Bstatic'
11057        ;;
11058      esac
11059      ;;
11060
11061    mingw* | cygwin* | pw32* | os2* | cegcc*)
11062      # This hack is so that the source file can tell whether it is being
11063      # built for inclusion in a dll (and should export symbols for example).
11064      lt_prog_compiler_pic='-DDLL_EXPORT'
11065      case $host_os in
11066      os2*)
11067	lt_prog_compiler_static='$wl-static'
11068	;;
11069      esac
11070      ;;
11071
11072    hpux9* | hpux10* | hpux11*)
11073      lt_prog_compiler_wl='-Wl,'
11074      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
11075      # not for PA HP-UX.
11076      case $host_cpu in
11077      hppa*64*|ia64*)
11078	# +Z the default
11079	;;
11080      *)
11081	lt_prog_compiler_pic='+Z'
11082	;;
11083      esac
11084      # Is there a better lt_prog_compiler_static that works with the bundled CC?
11085      lt_prog_compiler_static='$wl-a ${wl}archive'
11086      ;;
11087
11088    irix5* | irix6* | nonstopux*)
11089      lt_prog_compiler_wl='-Wl,'
11090      # PIC (with -KPIC) is the default.
11091      lt_prog_compiler_static='-non_shared'
11092      ;;
11093
11094    linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
11095      case $cc_basename in
11096      # old Intel for x86_64, which still supported -KPIC.
11097      ecc*)
11098	lt_prog_compiler_wl='-Wl,'
11099	lt_prog_compiler_pic='-KPIC'
11100	lt_prog_compiler_static='-static'
11101        ;;
11102      # icc used to be incompatible with GCC.
11103      # ICC 10 doesn't accept -KPIC any more.
11104      icc* | ifort*)
11105	lt_prog_compiler_wl='-Wl,'
11106	lt_prog_compiler_pic='-fPIC'
11107	lt_prog_compiler_static='-static'
11108        ;;
11109      # Lahey Fortran 8.1.
11110      lf95*)
11111	lt_prog_compiler_wl='-Wl,'
11112	lt_prog_compiler_pic='--shared'
11113	lt_prog_compiler_static='--static'
11114	;;
11115      nagfor*)
11116	# NAG Fortran compiler
11117	lt_prog_compiler_wl='-Wl,-Wl,,'
11118	lt_prog_compiler_pic='-PIC'
11119	lt_prog_compiler_static='-Bstatic'
11120	;;
11121      tcc*)
11122	# Fabrice Bellard et al's Tiny C Compiler
11123	lt_prog_compiler_wl='-Wl,'
11124	lt_prog_compiler_pic='-fPIC'
11125	lt_prog_compiler_static='-static'
11126	;;
11127      pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
11128        # Portland Group compilers (*not* the Pentium gcc compiler,
11129	# which looks to be a dead project)
11130	lt_prog_compiler_wl='-Wl,'
11131	lt_prog_compiler_pic='-fpic'
11132	lt_prog_compiler_static='-Bstatic'
11133        ;;
11134      ccc*)
11135        lt_prog_compiler_wl='-Wl,'
11136        # All Alpha code is PIC.
11137        lt_prog_compiler_static='-non_shared'
11138        ;;
11139      xl* | bgxl* | bgf* | mpixl*)
11140	# IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene
11141	lt_prog_compiler_wl='-Wl,'
11142	lt_prog_compiler_pic='-qpic'
11143	lt_prog_compiler_static='-qstaticlink'
11144	;;
11145      *)
11146	case `$CC -V 2>&1 | sed 5q` in
11147	*Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [1-7].* | *Sun*Fortran*\ 8.[0-3]*)
11148	  # Sun Fortran 8.3 passes all unrecognized flags to the linker
11149	  lt_prog_compiler_pic='-KPIC'
11150	  lt_prog_compiler_static='-Bstatic'
11151	  lt_prog_compiler_wl=''
11152	  ;;
11153	*Sun\ F* | *Sun*Fortran*)
11154	  lt_prog_compiler_pic='-KPIC'
11155	  lt_prog_compiler_static='-Bstatic'
11156	  lt_prog_compiler_wl='-Qoption ld '
11157	  ;;
11158	*Sun\ C*)
11159	  # Sun C 5.9
11160	  lt_prog_compiler_pic='-KPIC'
11161	  lt_prog_compiler_static='-Bstatic'
11162	  lt_prog_compiler_wl='-Wl,'
11163	  ;;
11164        *Intel*\ [CF]*Compiler*)
11165	  lt_prog_compiler_wl='-Wl,'
11166	  lt_prog_compiler_pic='-fPIC'
11167	  lt_prog_compiler_static='-static'
11168	  ;;
11169	*Portland\ Group*)
11170	  lt_prog_compiler_wl='-Wl,'
11171	  lt_prog_compiler_pic='-fpic'
11172	  lt_prog_compiler_static='-Bstatic'
11173	  ;;
11174	esac
11175	;;
11176      esac
11177      ;;
11178
11179    newsos6)
11180      lt_prog_compiler_pic='-KPIC'
11181      lt_prog_compiler_static='-Bstatic'
11182      ;;
11183
11184    *nto* | *qnx*)
11185      # QNX uses GNU C++, but need to define -shared option too, otherwise
11186      # it will coredump.
11187      lt_prog_compiler_pic='-fPIC -shared'
11188      ;;
11189
11190    osf3* | osf4* | osf5*)
11191      lt_prog_compiler_wl='-Wl,'
11192      # All OSF/1 code is PIC.
11193      lt_prog_compiler_static='-non_shared'
11194      ;;
11195
11196    rdos*)
11197      lt_prog_compiler_static='-non_shared'
11198      ;;
11199
11200    solaris*)
11201      lt_prog_compiler_pic='-KPIC'
11202      lt_prog_compiler_static='-Bstatic'
11203      case $cc_basename in
11204      f77* | f90* | f95* | sunf77* | sunf90* | sunf95*)
11205	lt_prog_compiler_wl='-Qoption ld ';;
11206      *)
11207	lt_prog_compiler_wl='-Wl,';;
11208      esac
11209      ;;
11210
11211    sunos4*)
11212      lt_prog_compiler_wl='-Qoption ld '
11213      lt_prog_compiler_pic='-PIC'
11214      lt_prog_compiler_static='-Bstatic'
11215      ;;
11216
11217    sysv4 | sysv4.2uw2* | sysv4.3*)
11218      lt_prog_compiler_wl='-Wl,'
11219      lt_prog_compiler_pic='-KPIC'
11220      lt_prog_compiler_static='-Bstatic'
11221      ;;
11222
11223    sysv4*MP*)
11224      if test -d /usr/nec; then
11225	lt_prog_compiler_pic='-Kconform_pic'
11226	lt_prog_compiler_static='-Bstatic'
11227      fi
11228      ;;
11229
11230    sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
11231      lt_prog_compiler_wl='-Wl,'
11232      lt_prog_compiler_pic='-KPIC'
11233      lt_prog_compiler_static='-Bstatic'
11234      ;;
11235
11236    unicos*)
11237      lt_prog_compiler_wl='-Wl,'
11238      lt_prog_compiler_can_build_shared=no
11239      ;;
11240
11241    uts4*)
11242      lt_prog_compiler_pic='-pic'
11243      lt_prog_compiler_static='-Bstatic'
11244      ;;
11245
11246    *)
11247      lt_prog_compiler_can_build_shared=no
11248      ;;
11249    esac
11250  fi
11251
11252case $host_os in
11253  # For platforms that do not support PIC, -DPIC is meaningless:
11254  *djgpp*)
11255    lt_prog_compiler_pic=
11256    ;;
11257  *)
11258    lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC"
11259    ;;
11260esac
11261
11262{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5
11263$as_echo_n "checking for $compiler option to produce PIC... " >&6; }
11264if ${lt_cv_prog_compiler_pic+:} false; then :
11265  $as_echo_n "(cached) " >&6
11266else
11267  lt_cv_prog_compiler_pic=$lt_prog_compiler_pic
11268fi
11269{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic" >&5
11270$as_echo "$lt_cv_prog_compiler_pic" >&6; }
11271lt_prog_compiler_pic=$lt_cv_prog_compiler_pic
11272
11273#
11274# Check to make sure the PIC flag actually works.
11275#
11276if test -n "$lt_prog_compiler_pic"; then
11277  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5
11278$as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; }
11279if ${lt_cv_prog_compiler_pic_works+:} false; then :
11280  $as_echo_n "(cached) " >&6
11281else
11282  lt_cv_prog_compiler_pic_works=no
11283   ac_outfile=conftest.$ac_objext
11284   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
11285   lt_compiler_flag="$lt_prog_compiler_pic -DPIC"  ## exclude from sc_useless_quotes_in_assignment
11286   # Insert the option either (1) after the last *FLAGS variable, or
11287   # (2) before a word containing "conftest.", or (3) at the end.
11288   # Note that $ac_compile itself does not contain backslashes and begins
11289   # with a dollar sign (not a hyphen), so the echo should work correctly.
11290   # The option is referenced via a variable to avoid confusing sed.
11291   lt_compile=`echo "$ac_compile" | $SED \
11292   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
11293   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
11294   -e 's:$: $lt_compiler_flag:'`
11295   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
11296   (eval "$lt_compile" 2>conftest.err)
11297   ac_status=$?
11298   cat conftest.err >&5
11299   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11300   if (exit $ac_status) && test -s "$ac_outfile"; then
11301     # The compiler can only warn and ignore the option if not recognized
11302     # So say no if there are warnings other than the usual output.
11303     $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
11304     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
11305     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
11306       lt_cv_prog_compiler_pic_works=yes
11307     fi
11308   fi
11309   $RM conftest*
11310
11311fi
11312{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5
11313$as_echo "$lt_cv_prog_compiler_pic_works" >&6; }
11314
11315if test yes = "$lt_cv_prog_compiler_pic_works"; then
11316    case $lt_prog_compiler_pic in
11317     "" | " "*) ;;
11318     *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;;
11319     esac
11320else
11321    lt_prog_compiler_pic=
11322     lt_prog_compiler_can_build_shared=no
11323fi
11324
11325fi
11326
11327
11328
11329
11330
11331
11332
11333
11334
11335
11336
11337#
11338# Check to make sure the static flag actually works.
11339#
11340wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\"
11341{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5
11342$as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; }
11343if ${lt_cv_prog_compiler_static_works+:} false; then :
11344  $as_echo_n "(cached) " >&6
11345else
11346  lt_cv_prog_compiler_static_works=no
11347   save_LDFLAGS=$LDFLAGS
11348   LDFLAGS="$LDFLAGS $lt_tmp_static_flag"
11349   echo "$lt_simple_link_test_code" > conftest.$ac_ext
11350   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
11351     # The linker can only warn and ignore the option if not recognized
11352     # So say no if there are warnings
11353     if test -s conftest.err; then
11354       # Append any errors to the config.log.
11355       cat conftest.err 1>&5
11356       $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
11357       $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
11358       if diff conftest.exp conftest.er2 >/dev/null; then
11359         lt_cv_prog_compiler_static_works=yes
11360       fi
11361     else
11362       lt_cv_prog_compiler_static_works=yes
11363     fi
11364   fi
11365   $RM -r conftest*
11366   LDFLAGS=$save_LDFLAGS
11367
11368fi
11369{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5
11370$as_echo "$lt_cv_prog_compiler_static_works" >&6; }
11371
11372if test yes = "$lt_cv_prog_compiler_static_works"; then
11373    :
11374else
11375    lt_prog_compiler_static=
11376fi
11377
11378
11379
11380
11381
11382
11383
11384  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
11385$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
11386if ${lt_cv_prog_compiler_c_o+:} false; then :
11387  $as_echo_n "(cached) " >&6
11388else
11389  lt_cv_prog_compiler_c_o=no
11390   $RM -r conftest 2>/dev/null
11391   mkdir conftest
11392   cd conftest
11393   mkdir out
11394   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
11395
11396   lt_compiler_flag="-o out/conftest2.$ac_objext"
11397   # Insert the option either (1) after the last *FLAGS variable, or
11398   # (2) before a word containing "conftest.", or (3) at the end.
11399   # Note that $ac_compile itself does not contain backslashes and begins
11400   # with a dollar sign (not a hyphen), so the echo should work correctly.
11401   lt_compile=`echo "$ac_compile" | $SED \
11402   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
11403   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
11404   -e 's:$: $lt_compiler_flag:'`
11405   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
11406   (eval "$lt_compile" 2>out/conftest.err)
11407   ac_status=$?
11408   cat out/conftest.err >&5
11409   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11410   if (exit $ac_status) && test -s out/conftest2.$ac_objext
11411   then
11412     # The compiler can only warn and ignore the option if not recognized
11413     # So say no if there are warnings
11414     $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
11415     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
11416     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
11417       lt_cv_prog_compiler_c_o=yes
11418     fi
11419   fi
11420   chmod u+w . 2>&5
11421   $RM conftest*
11422   # SGI C++ compiler will create directory out/ii_files/ for
11423   # template instantiation
11424   test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
11425   $RM out/* && rmdir out
11426   cd ..
11427   $RM -r conftest
11428   $RM conftest*
11429
11430fi
11431{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5
11432$as_echo "$lt_cv_prog_compiler_c_o" >&6; }
11433
11434
11435
11436
11437
11438
11439  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
11440$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
11441if ${lt_cv_prog_compiler_c_o+:} false; then :
11442  $as_echo_n "(cached) " >&6
11443else
11444  lt_cv_prog_compiler_c_o=no
11445   $RM -r conftest 2>/dev/null
11446   mkdir conftest
11447   cd conftest
11448   mkdir out
11449   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
11450
11451   lt_compiler_flag="-o out/conftest2.$ac_objext"
11452   # Insert the option either (1) after the last *FLAGS variable, or
11453   # (2) before a word containing "conftest.", or (3) at the end.
11454   # Note that $ac_compile itself does not contain backslashes and begins
11455   # with a dollar sign (not a hyphen), so the echo should work correctly.
11456   lt_compile=`echo "$ac_compile" | $SED \
11457   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
11458   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
11459   -e 's:$: $lt_compiler_flag:'`
11460   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
11461   (eval "$lt_compile" 2>out/conftest.err)
11462   ac_status=$?
11463   cat out/conftest.err >&5
11464   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11465   if (exit $ac_status) && test -s out/conftest2.$ac_objext
11466   then
11467     # The compiler can only warn and ignore the option if not recognized
11468     # So say no if there are warnings
11469     $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
11470     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
11471     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
11472       lt_cv_prog_compiler_c_o=yes
11473     fi
11474   fi
11475   chmod u+w . 2>&5
11476   $RM conftest*
11477   # SGI C++ compiler will create directory out/ii_files/ for
11478   # template instantiation
11479   test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
11480   $RM out/* && rmdir out
11481   cd ..
11482   $RM -r conftest
11483   $RM conftest*
11484
11485fi
11486{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5
11487$as_echo "$lt_cv_prog_compiler_c_o" >&6; }
11488
11489
11490
11491
11492hard_links=nottested
11493if test no = "$lt_cv_prog_compiler_c_o" && test no != "$need_locks"; then
11494  # do not overwrite the value of need_locks provided by the user
11495  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5
11496$as_echo_n "checking if we can lock with hard links... " >&6; }
11497  hard_links=yes
11498  $RM conftest*
11499  ln conftest.a conftest.b 2>/dev/null && hard_links=no
11500  touch conftest.a
11501  ln conftest.a conftest.b 2>&5 || hard_links=no
11502  ln conftest.a conftest.b 2>/dev/null && hard_links=no
11503  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5
11504$as_echo "$hard_links" >&6; }
11505  if test no = "$hard_links"; then
11506    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&5
11507$as_echo "$as_me: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&2;}
11508    need_locks=warn
11509  fi
11510else
11511  need_locks=no
11512fi
11513
11514
11515
11516
11517
11518
11519  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5
11520$as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; }
11521
11522  runpath_var=
11523  allow_undefined_flag=
11524  always_export_symbols=no
11525  archive_cmds=
11526  archive_expsym_cmds=
11527  compiler_needs_object=no
11528  enable_shared_with_static_runtimes=no
11529  export_dynamic_flag_spec=
11530  export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
11531  hardcode_automatic=no
11532  hardcode_direct=no
11533  hardcode_direct_absolute=no
11534  hardcode_libdir_flag_spec=
11535  hardcode_libdir_separator=
11536  hardcode_minus_L=no
11537  hardcode_shlibpath_var=unsupported
11538  inherit_rpath=no
11539  link_all_deplibs=unknown
11540  module_cmds=
11541  module_expsym_cmds=
11542  old_archive_from_new_cmds=
11543  old_archive_from_expsyms_cmds=
11544  thread_safe_flag_spec=
11545  whole_archive_flag_spec=
11546  # include_expsyms should be a list of space-separated symbols to be *always*
11547  # included in the symbol list
11548  include_expsyms=
11549  # exclude_expsyms can be an extended regexp of symbols to exclude
11550  # it will be wrapped by ' (' and ')$', so one must not match beginning or
11551  # end of line.  Example: 'a|bc|.*d.*' will exclude the symbols 'a' and 'bc',
11552  # as well as any symbol that contains 'd'.
11553  exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'
11554  # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
11555  # platforms (ab)use it in PIC code, but their linkers get confused if
11556  # the symbol is explicitly referenced.  Since portable code cannot
11557  # rely on this symbol name, it's probably fine to never include it in
11558  # preloaded symbol tables.
11559  # Exclude shared library initialization/finalization symbols.
11560  extract_expsyms_cmds=
11561
11562  case $host_os in
11563  cygwin* | mingw* | pw32* | cegcc*)
11564    # FIXME: the MSVC++ port hasn't been tested in a loooong time
11565    # When not using gcc, we currently assume that we are using
11566    # Microsoft Visual C++.
11567    if test yes != "$GCC"; then
11568      with_gnu_ld=no
11569    fi
11570    ;;
11571  interix*)
11572    # we just hope/assume this is gcc and not c89 (= MSVC++)
11573    with_gnu_ld=yes
11574    ;;
11575  openbsd* | bitrig*)
11576    with_gnu_ld=no
11577    ;;
11578  esac
11579
11580  ld_shlibs=yes
11581
11582  # On some targets, GNU ld is compatible enough with the native linker
11583  # that we're better off using the native interface for both.
11584  lt_use_gnu_ld_interface=no
11585  if test yes = "$with_gnu_ld"; then
11586    case $host_os in
11587      aix*)
11588	# The AIX port of GNU ld has always aspired to compatibility
11589	# with the native linker.  However, as the warning in the GNU ld
11590	# block says, versions before 2.19.5* couldn't really create working
11591	# shared libraries, regardless of the interface used.
11592	case `$LD -v 2>&1` in
11593	  *\ \(GNU\ Binutils\)\ 2.19.5*) ;;
11594	  *\ \(GNU\ Binutils\)\ 2.[2-9]*) ;;
11595	  *\ \(GNU\ Binutils\)\ [3-9]*) ;;
11596	  *)
11597	    lt_use_gnu_ld_interface=yes
11598	    ;;
11599	esac
11600	;;
11601      *)
11602	lt_use_gnu_ld_interface=yes
11603	;;
11604    esac
11605  fi
11606
11607  if test yes = "$lt_use_gnu_ld_interface"; then
11608    # If archive_cmds runs LD, not CC, wlarc should be empty
11609    wlarc='$wl'
11610
11611    # Set some defaults for GNU ld with shared library support. These
11612    # are reset later if shared libraries are not supported. Putting them
11613    # here allows them to be overridden if necessary.
11614    runpath_var=LD_RUN_PATH
11615    hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
11616    export_dynamic_flag_spec='$wl--export-dynamic'
11617    # ancient GNU ld didn't support --whole-archive et. al.
11618    if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
11619      whole_archive_flag_spec=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
11620    else
11621      whole_archive_flag_spec=
11622    fi
11623    supports_anon_versioning=no
11624    case `$LD -v | $SED -e 's/(^)\+)\s\+//' 2>&1` in
11625      *GNU\ gold*) supports_anon_versioning=yes ;;
11626      *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11
11627      *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
11628      *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
11629      *\ 2.11.*) ;; # other 2.11 versions
11630      *) supports_anon_versioning=yes ;;
11631    esac
11632
11633    # See if GNU ld supports shared libraries.
11634    case $host_os in
11635    aix[3-9]*)
11636      # On AIX/PPC, the GNU linker is very broken
11637      if test ia64 != "$host_cpu"; then
11638	ld_shlibs=no
11639	cat <<_LT_EOF 1>&2
11640
11641*** Warning: the GNU linker, at least up to release 2.19, is reported
11642*** to be unable to reliably create shared libraries on AIX.
11643*** Therefore, libtool is disabling shared libraries support.  If you
11644*** really care for shared libraries, you may want to install binutils
11645*** 2.20 or above, or modify your PATH so that a non-GNU linker is found.
11646*** You will then need to restart the configuration process.
11647
11648_LT_EOF
11649      fi
11650      ;;
11651
11652    amigaos*)
11653      case $host_cpu in
11654      powerpc)
11655            # see comment about AmigaOS4 .so support
11656            archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
11657            archive_expsym_cmds=''
11658        ;;
11659      m68k)
11660            archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
11661            hardcode_libdir_flag_spec='-L$libdir'
11662            hardcode_minus_L=yes
11663        ;;
11664      esac
11665      ;;
11666
11667    beos*)
11668      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
11669	allow_undefined_flag=unsupported
11670	# Joseph Beckenbach <jrb3@best.com> says some releases of gcc
11671	# support --undefined.  This deserves some investigation.  FIXME
11672	archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
11673      else
11674	ld_shlibs=no
11675      fi
11676      ;;
11677
11678    cygwin* | mingw* | pw32* | cegcc*)
11679      # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless,
11680      # as there is no search path for DLLs.
11681      hardcode_libdir_flag_spec='-L$libdir'
11682      export_dynamic_flag_spec='$wl--export-all-symbols'
11683      allow_undefined_flag=unsupported
11684      always_export_symbols=no
11685      enable_shared_with_static_runtimes=yes
11686      export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols'
11687      exclude_expsyms='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'
11688
11689      if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
11690        archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
11691	# If the export-symbols file already is a .def file, use it as
11692	# is; otherwise, prepend EXPORTS...
11693	archive_expsym_cmds='if   test DEF = "`$SED -n     -e '\''s/^[	 ]*//'\''     -e '\''/^\(;.*\)*$/d'\''     -e '\''s/^\(EXPORTS\|LIBRARY\)\([	 ].*\)*$/DEF/p'\''     -e q     $export_symbols`" ; then
11694          cp $export_symbols $output_objdir/$soname.def;
11695        else
11696          echo EXPORTS > $output_objdir/$soname.def;
11697          cat $export_symbols >> $output_objdir/$soname.def;
11698        fi~
11699        $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
11700      else
11701	ld_shlibs=no
11702      fi
11703      ;;
11704
11705    haiku*)
11706      archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
11707      link_all_deplibs=yes
11708      ;;
11709
11710    os2*)
11711      hardcode_libdir_flag_spec='-L$libdir'
11712      hardcode_minus_L=yes
11713      allow_undefined_flag=unsupported
11714      shrext_cmds=.dll
11715      archive_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
11716	$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
11717	$ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
11718	$ECHO EXPORTS >> $output_objdir/$libname.def~
11719	emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
11720	$CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
11721	emximp -o $lib $output_objdir/$libname.def'
11722      archive_expsym_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
11723	$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
11724	$ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
11725	$ECHO EXPORTS >> $output_objdir/$libname.def~
11726	prefix_cmds="$SED"~
11727	if test EXPORTS = "`$SED 1q $export_symbols`"; then
11728	  prefix_cmds="$prefix_cmds -e 1d";
11729	fi~
11730	prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
11731	cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
11732	$CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
11733	emximp -o $lib $output_objdir/$libname.def'
11734      old_archive_From_new_cmds='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
11735      enable_shared_with_static_runtimes=yes
11736      ;;
11737
11738    interix[3-9]*)
11739      hardcode_direct=no
11740      hardcode_shlibpath_var=no
11741      hardcode_libdir_flag_spec='$wl-rpath,$libdir'
11742      export_dynamic_flag_spec='$wl-E'
11743      # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
11744      # Instead, shared libraries are loaded at an image base (0x10000000 by
11745      # default) and relocated if they conflict, which is a slow very memory
11746      # consuming and fragmenting process.  To avoid this, we pick a random,
11747      # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
11748      # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
11749      archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
11750      archive_expsym_cmds='sed "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
11751      ;;
11752
11753    gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
11754      tmp_diet=no
11755      if test linux-dietlibc = "$host_os"; then
11756	case $cc_basename in
11757	  diet\ *) tmp_diet=yes;;	# linux-dietlibc with static linking (!diet-dyn)
11758	esac
11759      fi
11760      if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
11761	 && test no = "$tmp_diet"
11762      then
11763	tmp_addflag=' $pic_flag'
11764	tmp_sharedflag='-shared'
11765	case $cc_basename,$host_cpu in
11766        pgcc*)				# Portland Group C compiler
11767	  whole_archive_flag_spec='$wl--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
11768	  tmp_addflag=' $pic_flag'
11769	  ;;
11770	pgf77* | pgf90* | pgf95* | pgfortran*)
11771					# Portland Group f77 and f90 compilers
11772	  whole_archive_flag_spec='$wl--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
11773	  tmp_addflag=' $pic_flag -Mnomain' ;;
11774	ecc*,ia64* | icc*,ia64*)	# Intel C compiler on ia64
11775	  tmp_addflag=' -i_dynamic' ;;
11776	efc*,ia64* | ifort*,ia64*)	# Intel Fortran compiler on ia64
11777	  tmp_addflag=' -i_dynamic -nofor_main' ;;
11778	ifc* | ifort*)			# Intel Fortran compiler
11779	  tmp_addflag=' -nofor_main' ;;
11780	lf95*)				# Lahey Fortran 8.1
11781	  whole_archive_flag_spec=
11782	  tmp_sharedflag='--shared' ;;
11783        nagfor*)                        # NAGFOR 5.3
11784          tmp_sharedflag='-Wl,-shared' ;;
11785	xl[cC]* | bgxl[cC]* | mpixl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below)
11786	  tmp_sharedflag='-qmkshrobj'
11787	  tmp_addflag= ;;
11788	nvcc*)	# Cuda Compiler Driver 2.2
11789	  whole_archive_flag_spec='$wl--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
11790	  compiler_needs_object=yes
11791	  ;;
11792	esac
11793	case `$CC -V 2>&1 | sed 5q` in
11794	*Sun\ C*)			# Sun C 5.9
11795	  whole_archive_flag_spec='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
11796	  compiler_needs_object=yes
11797	  tmp_sharedflag='-G' ;;
11798	*Sun\ F*)			# Sun Fortran 8.3
11799	  tmp_sharedflag='-G' ;;
11800	esac
11801	archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
11802
11803        if test yes = "$supports_anon_versioning"; then
11804          archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~
11805            cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
11806            echo "local: *; };" >> $output_objdir/$libname.ver~
11807            $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib'
11808        fi
11809
11810	case $cc_basename in
11811	tcc*)
11812	  export_dynamic_flag_spec='-rdynamic'
11813	  ;;
11814	xlf* | bgf* | bgxlf* | mpixlf*)
11815	  # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
11816	  whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive'
11817	  hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
11818	  archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
11819	  if test yes = "$supports_anon_versioning"; then
11820	    archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~
11821              cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
11822              echo "local: *; };" >> $output_objdir/$libname.ver~
11823              $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
11824	  fi
11825	  ;;
11826	esac
11827      else
11828        ld_shlibs=no
11829      fi
11830      ;;
11831
11832    netbsd*)
11833      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
11834	archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
11835	wlarc=
11836      else
11837	archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
11838	archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
11839      fi
11840      ;;
11841
11842    solaris*)
11843      if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
11844	ld_shlibs=no
11845	cat <<_LT_EOF 1>&2
11846
11847*** Warning: The releases 2.8.* of the GNU linker cannot reliably
11848*** create shared libraries on Solaris systems.  Therefore, libtool
11849*** is disabling shared libraries support.  We urge you to upgrade GNU
11850*** binutils to release 2.9.1 or newer.  Another option is to modify
11851*** your PATH or compiler configuration so that the native linker is
11852*** used, and then restart.
11853
11854_LT_EOF
11855      elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
11856	archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
11857	archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
11858      else
11859	ld_shlibs=no
11860      fi
11861      ;;
11862
11863    sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
11864      case `$LD -v 2>&1` in
11865        *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*)
11866	ld_shlibs=no
11867	cat <<_LT_EOF 1>&2
11868
11869*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot
11870*** reliably create shared libraries on SCO systems.  Therefore, libtool
11871*** is disabling shared libraries support.  We urge you to upgrade GNU
11872*** binutils to release 2.16.91.0.3 or newer.  Another option is to modify
11873*** your PATH or compiler configuration so that the native linker is
11874*** used, and then restart.
11875
11876_LT_EOF
11877	;;
11878	*)
11879	  # For security reasons, it is highly recommended that you always
11880	  # use absolute paths for naming shared libraries, and exclude the
11881	  # DT_RUNPATH tag from executables and libraries.  But doing so
11882	  # requires that you compile everything twice, which is a pain.
11883	  if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
11884	    hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
11885	    archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
11886	    archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
11887	  else
11888	    ld_shlibs=no
11889	  fi
11890	;;
11891      esac
11892      ;;
11893
11894    sunos4*)
11895      archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
11896      wlarc=
11897      hardcode_direct=yes
11898      hardcode_shlibpath_var=no
11899      ;;
11900
11901    *)
11902      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
11903	archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
11904	archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
11905      else
11906	ld_shlibs=no
11907      fi
11908      ;;
11909    esac
11910
11911    if test no = "$ld_shlibs"; then
11912      runpath_var=
11913      hardcode_libdir_flag_spec=
11914      export_dynamic_flag_spec=
11915      whole_archive_flag_spec=
11916    fi
11917  else
11918    # PORTME fill in a description of your system's linker (not GNU ld)
11919    case $host_os in
11920    aix3*)
11921      allow_undefined_flag=unsupported
11922      always_export_symbols=yes
11923      archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
11924      # Note: this linker hardcodes the directories in LIBPATH if there
11925      # are no directories specified by -L.
11926      hardcode_minus_L=yes
11927      if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then
11928	# Neither direct hardcoding nor static linking is supported with a
11929	# broken collect2.
11930	hardcode_direct=unsupported
11931      fi
11932      ;;
11933
11934    aix[4-9]*)
11935      if test ia64 = "$host_cpu"; then
11936	# On IA64, the linker does run time linking by default, so we don't
11937	# have to do anything special.
11938	aix_use_runtimelinking=no
11939	exp_sym_flag='-Bexport'
11940	no_entry_flag=
11941      else
11942	# If we're using GNU nm, then we don't want the "-C" option.
11943	# -C means demangle to GNU nm, but means don't demangle to AIX nm.
11944	# Without the "-l" option, or with the "-B" option, AIX nm treats
11945	# weak defined symbols like other global defined symbols, whereas
11946	# GNU nm marks them as "W".
11947	# While the 'weak' keyword is ignored in the Export File, we need
11948	# it in the Import File for the 'aix-soname' feature, so we have
11949	# to replace the "-B" option with "-P" for AIX nm.
11950	if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
11951	  export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols'
11952	else
11953	  export_symbols_cmds='`func_echo_all $NM | $SED -e '\''s/B\([^B]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && (substr(\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols'
11954	fi
11955	aix_use_runtimelinking=no
11956
11957	# Test if we are trying to use run time linking or normal
11958	# AIX style linking. If -brtl is somewhere in LDFLAGS, we
11959	# have runtime linking enabled, and use it for executables.
11960	# For shared libraries, we enable/disable runtime linking
11961	# depending on the kind of the shared library created -
11962	# when "with_aix_soname,aix_use_runtimelinking" is:
11963	# "aix,no"   lib.a(lib.so.V) shared, rtl:no,  for executables
11964	# "aix,yes"  lib.so          shared, rtl:yes, for executables
11965	#            lib.a           static archive
11966	# "both,no"  lib.so.V(shr.o) shared, rtl:yes
11967	#            lib.a(lib.so.V) shared, rtl:no,  for executables
11968	# "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables
11969	#            lib.a(lib.so.V) shared, rtl:no
11970	# "svr4,*"   lib.so.V(shr.o) shared, rtl:yes, for executables
11971	#            lib.a           static archive
11972	case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*)
11973	  for ld_flag in $LDFLAGS; do
11974	  if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then
11975	    aix_use_runtimelinking=yes
11976	    break
11977	  fi
11978	  done
11979	  if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then
11980	    # With aix-soname=svr4, we create the lib.so.V shared archives only,
11981	    # so we don't have lib.a shared libs to link our executables.
11982	    # We have to force runtime linking in this case.
11983	    aix_use_runtimelinking=yes
11984	    LDFLAGS="$LDFLAGS -Wl,-brtl"
11985	  fi
11986	  ;;
11987	esac
11988
11989	exp_sym_flag='-bexport'
11990	no_entry_flag='-bnoentry'
11991      fi
11992
11993      # When large executables or shared objects are built, AIX ld can
11994      # have problems creating the table of contents.  If linking a library
11995      # or program results in "error TOC overflow" add -mminimal-toc to
11996      # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
11997      # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
11998
11999      archive_cmds=''
12000      hardcode_direct=yes
12001      hardcode_direct_absolute=yes
12002      hardcode_libdir_separator=':'
12003      link_all_deplibs=yes
12004      file_list_spec='$wl-f,'
12005      case $with_aix_soname,$aix_use_runtimelinking in
12006      aix,*) ;; # traditional, no import file
12007      svr4,* | *,yes) # use import file
12008	# The Import File defines what to hardcode.
12009	hardcode_direct=no
12010	hardcode_direct_absolute=no
12011	;;
12012      esac
12013
12014      if test yes = "$GCC"; then
12015	case $host_os in aix4.[012]|aix4.[012].*)
12016	# We only want to do this on AIX 4.2 and lower, the check
12017	# below for broken collect2 doesn't work under 4.3+
12018	  collect2name=`$CC -print-prog-name=collect2`
12019	  if test -f "$collect2name" &&
12020	   strings "$collect2name" | $GREP resolve_lib_name >/dev/null
12021	  then
12022	  # We have reworked collect2
12023	  :
12024	  else
12025	  # We have old collect2
12026	  hardcode_direct=unsupported
12027	  # It fails to find uninstalled libraries when the uninstalled
12028	  # path is not listed in the libpath.  Setting hardcode_minus_L
12029	  # to unsupported forces relinking
12030	  hardcode_minus_L=yes
12031	  hardcode_libdir_flag_spec='-L$libdir'
12032	  hardcode_libdir_separator=
12033	  fi
12034	  ;;
12035	esac
12036	shared_flag='-shared'
12037	if test yes = "$aix_use_runtimelinking"; then
12038	  shared_flag="$shared_flag "'$wl-G'
12039	fi
12040	# Need to ensure runtime linking is disabled for the traditional
12041	# shared library, or the linker may eventually find shared libraries
12042	# /with/ Import File - we do not want to mix them.
12043	shared_flag_aix='-shared'
12044	shared_flag_svr4='-shared $wl-G'
12045      else
12046	# not using gcc
12047	if test ia64 = "$host_cpu"; then
12048	# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
12049	# chokes on -Wl,-G. The following line is correct:
12050	  shared_flag='-G'
12051	else
12052	  if test yes = "$aix_use_runtimelinking"; then
12053	    shared_flag='$wl-G'
12054	  else
12055	    shared_flag='$wl-bM:SRE'
12056	  fi
12057	  shared_flag_aix='$wl-bM:SRE'
12058	  shared_flag_svr4='$wl-G'
12059	fi
12060      fi
12061
12062      export_dynamic_flag_spec='$wl-bexpall'
12063      # It seems that -bexpall does not export symbols beginning with
12064      # underscore (_), so it is better to generate a list of symbols to export.
12065      always_export_symbols=yes
12066      if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then
12067	# Warning - without using the other runtime loading flags (-brtl),
12068	# -berok will link without error, but may produce a broken library.
12069	allow_undefined_flag='-berok'
12070        # Determine the default libpath from the value encoded in an
12071        # empty executable.
12072        if test set = "${lt_cv_aix_libpath+set}"; then
12073  aix_libpath=$lt_cv_aix_libpath
12074else
12075  if ${lt_cv_aix_libpath_+:} false; then :
12076  $as_echo_n "(cached) " >&6
12077else
12078  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12079/* end confdefs.h.  */
12080
12081int
12082main ()
12083{
12084
12085  ;
12086  return 0;
12087}
12088_ACEOF
12089if ac_fn_c_try_link "$LINENO"; then :
12090
12091  lt_aix_libpath_sed='
12092      /Import File Strings/,/^$/ {
12093	  /^0/ {
12094	      s/^0  *\([^ ]*\) *$/\1/
12095	      p
12096	  }
12097      }'
12098  lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
12099  # Check for a 64-bit object if we didn't find anything.
12100  if test -z "$lt_cv_aix_libpath_"; then
12101    lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
12102  fi
12103fi
12104rm -f core conftest.err conftest.$ac_objext \
12105    conftest$ac_exeext conftest.$ac_ext
12106  if test -z "$lt_cv_aix_libpath_"; then
12107    lt_cv_aix_libpath_=/usr/lib:/lib
12108  fi
12109
12110fi
12111
12112  aix_libpath=$lt_cv_aix_libpath_
12113fi
12114
12115        hardcode_libdir_flag_spec='$wl-blibpath:$libdir:'"$aix_libpath"
12116        archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag
12117      else
12118	if test ia64 = "$host_cpu"; then
12119	  hardcode_libdir_flag_spec='$wl-R $libdir:/usr/lib:/lib'
12120	  allow_undefined_flag="-z nodefs"
12121	  archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\$wl$no_entry_flag"' $compiler_flags $wl$allow_undefined_flag '"\$wl$exp_sym_flag:\$export_symbols"
12122	else
12123	 # Determine the default libpath from the value encoded in an
12124	 # empty executable.
12125	 if test set = "${lt_cv_aix_libpath+set}"; then
12126  aix_libpath=$lt_cv_aix_libpath
12127else
12128  if ${lt_cv_aix_libpath_+:} false; then :
12129  $as_echo_n "(cached) " >&6
12130else
12131  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12132/* end confdefs.h.  */
12133
12134int
12135main ()
12136{
12137
12138  ;
12139  return 0;
12140}
12141_ACEOF
12142if ac_fn_c_try_link "$LINENO"; then :
12143
12144  lt_aix_libpath_sed='
12145      /Import File Strings/,/^$/ {
12146	  /^0/ {
12147	      s/^0  *\([^ ]*\) *$/\1/
12148	      p
12149	  }
12150      }'
12151  lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
12152  # Check for a 64-bit object if we didn't find anything.
12153  if test -z "$lt_cv_aix_libpath_"; then
12154    lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
12155  fi
12156fi
12157rm -f core conftest.err conftest.$ac_objext \
12158    conftest$ac_exeext conftest.$ac_ext
12159  if test -z "$lt_cv_aix_libpath_"; then
12160    lt_cv_aix_libpath_=/usr/lib:/lib
12161  fi
12162
12163fi
12164
12165  aix_libpath=$lt_cv_aix_libpath_
12166fi
12167
12168	 hardcode_libdir_flag_spec='$wl-blibpath:$libdir:'"$aix_libpath"
12169	  # Warning - without using the other run time loading flags,
12170	  # -berok will link without error, but may produce a broken library.
12171	  no_undefined_flag=' $wl-bernotok'
12172	  allow_undefined_flag=' $wl-berok'
12173	  if test yes = "$with_gnu_ld"; then
12174	    # We only use this code for GNU lds that support --whole-archive.
12175	    whole_archive_flag_spec='$wl--whole-archive$convenience $wl--no-whole-archive'
12176	  else
12177	    # Exported symbols can be pulled into shared objects from archives
12178	    whole_archive_flag_spec='$convenience'
12179	  fi
12180	  archive_cmds_need_lc=yes
12181	  archive_expsym_cmds='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d'
12182	  # -brtl affects multiple linker settings, -berok does not and is overridden later
12183	  compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([, ]\\)%-berok\\1%g"`'
12184	  if test svr4 != "$with_aix_soname"; then
12185	    # This is similar to how AIX traditionally builds its shared libraries.
12186	    archive_expsym_cmds="$archive_expsym_cmds"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname'
12187	  fi
12188	  if test aix != "$with_aix_soname"; then
12189	    archive_expsym_cmds="$archive_expsym_cmds"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp'
12190	  else
12191	    # used by -dlpreopen to get the symbols
12192	    archive_expsym_cmds="$archive_expsym_cmds"'~$MV  $output_objdir/$realname.d/$soname $output_objdir'
12193	  fi
12194	  archive_expsym_cmds="$archive_expsym_cmds"'~$RM -r $output_objdir/$realname.d'
12195	fi
12196      fi
12197      ;;
12198
12199    amigaos*)
12200      case $host_cpu in
12201      powerpc)
12202            # see comment about AmigaOS4 .so support
12203            archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
12204            archive_expsym_cmds=''
12205        ;;
12206      m68k)
12207            archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
12208            hardcode_libdir_flag_spec='-L$libdir'
12209            hardcode_minus_L=yes
12210        ;;
12211      esac
12212      ;;
12213
12214    bsdi[45]*)
12215      export_dynamic_flag_spec=-rdynamic
12216      ;;
12217
12218    cygwin* | mingw* | pw32* | cegcc*)
12219      # When not using gcc, we currently assume that we are using
12220      # Microsoft Visual C++.
12221      # hardcode_libdir_flag_spec is actually meaningless, as there is
12222      # no search path for DLLs.
12223      case $cc_basename in
12224      cl*)
12225	# Native MSVC
12226	hardcode_libdir_flag_spec=' '
12227	allow_undefined_flag=unsupported
12228	always_export_symbols=yes
12229	file_list_spec='@'
12230	# Tell ltmain to make .lib files, not .a files.
12231	libext=lib
12232	# Tell ltmain to make .dll files, not .so files.
12233	shrext_cmds=.dll
12234	# FIXME: Setting linknames here is a bad hack.
12235	archive_cmds='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames='
12236	archive_expsym_cmds='if   test DEF = "`$SED -n     -e '\''s/^[	 ]*//'\''     -e '\''/^\(;.*\)*$/d'\''     -e '\''s/^\(EXPORTS\|LIBRARY\)\([	 ].*\)*$/DEF/p'\''     -e q     $export_symbols`" ; then
12237            cp "$export_symbols" "$output_objdir/$soname.def";
12238            echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp";
12239          else
12240            $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp;
12241          fi~
12242          $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
12243          linknames='
12244	# The linker will not automatically build a static lib if we build a DLL.
12245	# _LT_TAGVAR(old_archive_from_new_cmds, )='true'
12246	enable_shared_with_static_runtimes=yes
12247	exclude_expsyms='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
12248	export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1,DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols'
12249	# Don't use ranlib
12250	old_postinstall_cmds='chmod 644 $oldlib'
12251	postlink_cmds='lt_outputfile="@OUTPUT@"~
12252          lt_tool_outputfile="@TOOL_OUTPUT@"~
12253          case $lt_outputfile in
12254            *.exe|*.EXE) ;;
12255            *)
12256              lt_outputfile=$lt_outputfile.exe
12257              lt_tool_outputfile=$lt_tool_outputfile.exe
12258              ;;
12259          esac~
12260          if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then
12261            $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
12262            $RM "$lt_outputfile.manifest";
12263          fi'
12264	;;
12265      *)
12266	# Assume MSVC wrapper
12267	hardcode_libdir_flag_spec=' '
12268	allow_undefined_flag=unsupported
12269	# Tell ltmain to make .lib files, not .a files.
12270	libext=lib
12271	# Tell ltmain to make .dll files, not .so files.
12272	shrext_cmds=.dll
12273	# FIXME: Setting linknames here is a bad hack.
12274	archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
12275	# The linker will automatically build a .lib file if we build a DLL.
12276	old_archive_from_new_cmds='true'
12277	# FIXME: Should let the user specify the lib program.
12278	old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs'
12279	enable_shared_with_static_runtimes=yes
12280	;;
12281      esac
12282      ;;
12283
12284    darwin* | rhapsody*)
12285
12286
12287  archive_cmds_need_lc=no
12288  hardcode_direct=no
12289  hardcode_automatic=yes
12290  hardcode_shlibpath_var=unsupported
12291  if test yes = "$lt_cv_ld_force_load"; then
12292    whole_archive_flag_spec='`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience $wl-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`'
12293
12294  else
12295    whole_archive_flag_spec=''
12296  fi
12297  link_all_deplibs=yes
12298  allow_undefined_flag=$_lt_dar_allow_undefined
12299  case $cc_basename in
12300     ifort*|nagfor*) _lt_dar_can_shared=yes ;;
12301     *) _lt_dar_can_shared=$GCC ;;
12302  esac
12303  if test yes = "$_lt_dar_can_shared"; then
12304    output_verbose_link_cmd=func_echo_all
12305    archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dsymutil"
12306    module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil"
12307    archive_expsym_cmds="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dar_export_syms$_lt_dsymutil"
12308    module_expsym_cmds="sed -e 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dar_export_syms$_lt_dsymutil"
12309
12310  else
12311  ld_shlibs=no
12312  fi
12313
12314      ;;
12315
12316    dgux*)
12317      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
12318      hardcode_libdir_flag_spec='-L$libdir'
12319      hardcode_shlibpath_var=no
12320      ;;
12321
12322    # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
12323    # support.  Future versions do this automatically, but an explicit c++rt0.o
12324    # does not break anything, and helps significantly (at the cost of a little
12325    # extra space).
12326    freebsd2.2*)
12327      archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
12328      hardcode_libdir_flag_spec='-R$libdir'
12329      hardcode_direct=yes
12330      hardcode_shlibpath_var=no
12331      ;;
12332
12333    # Unfortunately, older versions of FreeBSD 2 do not have this feature.
12334    freebsd2.*)
12335      archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
12336      hardcode_direct=yes
12337      hardcode_minus_L=yes
12338      hardcode_shlibpath_var=no
12339      ;;
12340
12341    # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
12342    freebsd* | dragonfly*)
12343      archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
12344      hardcode_libdir_flag_spec='-R$libdir'
12345      hardcode_direct=yes
12346      hardcode_shlibpath_var=no
12347      ;;
12348
12349    hpux9*)
12350      if test yes = "$GCC"; then
12351	archive_cmds='$RM $output_objdir/$soname~$CC -shared $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib'
12352      else
12353	archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib'
12354      fi
12355      hardcode_libdir_flag_spec='$wl+b $wl$libdir'
12356      hardcode_libdir_separator=:
12357      hardcode_direct=yes
12358
12359      # hardcode_minus_L: Not really in the search PATH,
12360      # but as the default location of the library.
12361      hardcode_minus_L=yes
12362      export_dynamic_flag_spec='$wl-E'
12363      ;;
12364
12365    hpux10*)
12366      if test yes,no = "$GCC,$with_gnu_ld"; then
12367	archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
12368      else
12369	archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
12370      fi
12371      if test no = "$with_gnu_ld"; then
12372	hardcode_libdir_flag_spec='$wl+b $wl$libdir'
12373	hardcode_libdir_separator=:
12374	hardcode_direct=yes
12375	hardcode_direct_absolute=yes
12376	export_dynamic_flag_spec='$wl-E'
12377	# hardcode_minus_L: Not really in the search PATH,
12378	# but as the default location of the library.
12379	hardcode_minus_L=yes
12380      fi
12381      ;;
12382
12383    hpux11*)
12384      if test yes,no = "$GCC,$with_gnu_ld"; then
12385	case $host_cpu in
12386	hppa*64*)
12387	  archive_cmds='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
12388	  ;;
12389	ia64*)
12390	  archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
12391	  ;;
12392	*)
12393	  archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
12394	  ;;
12395	esac
12396      else
12397	case $host_cpu in
12398	hppa*64*)
12399	  archive_cmds='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
12400	  ;;
12401	ia64*)
12402	  archive_cmds='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
12403	  ;;
12404	*)
12405
12406	  # Older versions of the 11.00 compiler do not understand -b yet
12407	  # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does)
12408	  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC understands -b" >&5
12409$as_echo_n "checking if $CC understands -b... " >&6; }
12410if ${lt_cv_prog_compiler__b+:} false; then :
12411  $as_echo_n "(cached) " >&6
12412else
12413  lt_cv_prog_compiler__b=no
12414   save_LDFLAGS=$LDFLAGS
12415   LDFLAGS="$LDFLAGS -b"
12416   echo "$lt_simple_link_test_code" > conftest.$ac_ext
12417   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
12418     # The linker can only warn and ignore the option if not recognized
12419     # So say no if there are warnings
12420     if test -s conftest.err; then
12421       # Append any errors to the config.log.
12422       cat conftest.err 1>&5
12423       $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
12424       $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
12425       if diff conftest.exp conftest.er2 >/dev/null; then
12426         lt_cv_prog_compiler__b=yes
12427       fi
12428     else
12429       lt_cv_prog_compiler__b=yes
12430     fi
12431   fi
12432   $RM -r conftest*
12433   LDFLAGS=$save_LDFLAGS
12434
12435fi
12436{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler__b" >&5
12437$as_echo "$lt_cv_prog_compiler__b" >&6; }
12438
12439if test yes = "$lt_cv_prog_compiler__b"; then
12440    archive_cmds='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
12441else
12442    archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
12443fi
12444
12445	  ;;
12446	esac
12447      fi
12448      if test no = "$with_gnu_ld"; then
12449	hardcode_libdir_flag_spec='$wl+b $wl$libdir'
12450	hardcode_libdir_separator=:
12451
12452	case $host_cpu in
12453	hppa*64*|ia64*)
12454	  hardcode_direct=no
12455	  hardcode_shlibpath_var=no
12456	  ;;
12457	*)
12458	  hardcode_direct=yes
12459	  hardcode_direct_absolute=yes
12460	  export_dynamic_flag_spec='$wl-E'
12461
12462	  # hardcode_minus_L: Not really in the search PATH,
12463	  # but as the default location of the library.
12464	  hardcode_minus_L=yes
12465	  ;;
12466	esac
12467      fi
12468      ;;
12469
12470    irix5* | irix6* | nonstopux*)
12471      if test yes = "$GCC"; then
12472	archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
12473	# Try to use the -exported_symbol ld option, if it does not
12474	# work, assume that -exports_file does not work either and
12475	# implicitly export all symbols.
12476	# This should be the same for all languages, so no per-tag cache variable.
12477	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5
12478$as_echo_n "checking whether the $host_os linker accepts -exported_symbol... " >&6; }
12479if ${lt_cv_irix_exported_symbol+:} false; then :
12480  $as_echo_n "(cached) " >&6
12481else
12482  save_LDFLAGS=$LDFLAGS
12483	   LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null"
12484	   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12485/* end confdefs.h.  */
12486int foo (void) { return 0; }
12487_ACEOF
12488if ac_fn_c_try_link "$LINENO"; then :
12489  lt_cv_irix_exported_symbol=yes
12490else
12491  lt_cv_irix_exported_symbol=no
12492fi
12493rm -f core conftest.err conftest.$ac_objext \
12494    conftest$ac_exeext conftest.$ac_ext
12495           LDFLAGS=$save_LDFLAGS
12496fi
12497{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5
12498$as_echo "$lt_cv_irix_exported_symbol" >&6; }
12499	if test yes = "$lt_cv_irix_exported_symbol"; then
12500          archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations $wl-exports_file $wl$export_symbols -o $lib'
12501	fi
12502      else
12503	archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
12504	archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -exports_file $export_symbols -o $lib'
12505      fi
12506      archive_cmds_need_lc='no'
12507      hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
12508      hardcode_libdir_separator=:
12509      inherit_rpath=yes
12510      link_all_deplibs=yes
12511      ;;
12512
12513    linux*)
12514      case $cc_basename in
12515      tcc*)
12516	# Fabrice Bellard et al's Tiny C Compiler
12517	ld_shlibs=yes
12518	archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
12519	;;
12520      esac
12521      ;;
12522
12523    netbsd*)
12524      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
12525	archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
12526      else
12527	archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
12528      fi
12529      hardcode_libdir_flag_spec='-R$libdir'
12530      hardcode_direct=yes
12531      hardcode_shlibpath_var=no
12532      ;;
12533
12534    newsos6)
12535      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
12536      hardcode_direct=yes
12537      hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
12538      hardcode_libdir_separator=:
12539      hardcode_shlibpath_var=no
12540      ;;
12541
12542    *nto* | *qnx*)
12543      ;;
12544
12545    openbsd* | bitrig*)
12546      if test -f /usr/libexec/ld.so; then
12547	hardcode_direct=yes
12548	hardcode_shlibpath_var=no
12549	hardcode_direct_absolute=yes
12550	if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
12551	  archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
12552	  archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols'
12553	  hardcode_libdir_flag_spec='$wl-rpath,$libdir'
12554	  export_dynamic_flag_spec='$wl-E'
12555	else
12556	  archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
12557	  hardcode_libdir_flag_spec='$wl-rpath,$libdir'
12558	fi
12559      else
12560	ld_shlibs=no
12561      fi
12562      ;;
12563
12564    os2*)
12565      hardcode_libdir_flag_spec='-L$libdir'
12566      hardcode_minus_L=yes
12567      allow_undefined_flag=unsupported
12568      shrext_cmds=.dll
12569      archive_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
12570	$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
12571	$ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
12572	$ECHO EXPORTS >> $output_objdir/$libname.def~
12573	emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
12574	$CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
12575	emximp -o $lib $output_objdir/$libname.def'
12576      archive_expsym_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
12577	$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
12578	$ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
12579	$ECHO EXPORTS >> $output_objdir/$libname.def~
12580	prefix_cmds="$SED"~
12581	if test EXPORTS = "`$SED 1q $export_symbols`"; then
12582	  prefix_cmds="$prefix_cmds -e 1d";
12583	fi~
12584	prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
12585	cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
12586	$CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
12587	emximp -o $lib $output_objdir/$libname.def'
12588      old_archive_From_new_cmds='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
12589      enable_shared_with_static_runtimes=yes
12590      ;;
12591
12592    osf3*)
12593      if test yes = "$GCC"; then
12594	allow_undefined_flag=' $wl-expect_unresolved $wl\*'
12595	archive_cmds='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
12596      else
12597	allow_undefined_flag=' -expect_unresolved \*'
12598	archive_cmds='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
12599      fi
12600      archive_cmds_need_lc='no'
12601      hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
12602      hardcode_libdir_separator=:
12603      ;;
12604
12605    osf4* | osf5*)	# as osf3* with the addition of -msym flag
12606      if test yes = "$GCC"; then
12607	allow_undefined_flag=' $wl-expect_unresolved $wl\*'
12608	archive_cmds='$CC -shared$allow_undefined_flag $pic_flag $libobjs $deplibs $compiler_flags $wl-msym $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
12609	hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
12610      else
12611	allow_undefined_flag=' -expect_unresolved \*'
12612	archive_cmds='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
12613	archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~
12614          $CC -shared$allow_undefined_flag $wl-input $wl$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib~$RM $lib.exp'
12615
12616	# Both c and cxx compiler support -rpath directly
12617	hardcode_libdir_flag_spec='-rpath $libdir'
12618      fi
12619      archive_cmds_need_lc='no'
12620      hardcode_libdir_separator=:
12621      ;;
12622
12623    solaris*)
12624      no_undefined_flag=' -z defs'
12625      if test yes = "$GCC"; then
12626	wlarc='$wl'
12627	archive_cmds='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
12628	archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
12629          $CC -shared $pic_flag $wl-z ${wl}text $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
12630      else
12631	case `$CC -V 2>&1` in
12632	*"Compilers 5.0"*)
12633	  wlarc=''
12634	  archive_cmds='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags'
12635	  archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
12636            $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
12637	  ;;
12638	*)
12639	  wlarc='$wl'
12640	  archive_cmds='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags'
12641	  archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
12642            $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
12643	  ;;
12644	esac
12645      fi
12646      hardcode_libdir_flag_spec='-R$libdir'
12647      hardcode_shlibpath_var=no
12648      case $host_os in
12649      solaris2.[0-5] | solaris2.[0-5].*) ;;
12650      *)
12651	# The compiler driver will combine and reorder linker options,
12652	# but understands '-z linker_flag'.  GCC discards it without '$wl',
12653	# but is careful enough not to reorder.
12654	# Supported since Solaris 2.6 (maybe 2.5.1?)
12655	if test yes = "$GCC"; then
12656	  whole_archive_flag_spec='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract'
12657	else
12658	  whole_archive_flag_spec='-z allextract$convenience -z defaultextract'
12659	fi
12660	;;
12661      esac
12662      link_all_deplibs=yes
12663      ;;
12664
12665    sunos4*)
12666      if test sequent = "$host_vendor"; then
12667	# Use $CC to link under sequent, because it throws in some extra .o
12668	# files that make .init and .fini sections work.
12669	archive_cmds='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags'
12670      else
12671	archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
12672      fi
12673      hardcode_libdir_flag_spec='-L$libdir'
12674      hardcode_direct=yes
12675      hardcode_minus_L=yes
12676      hardcode_shlibpath_var=no
12677      ;;
12678
12679    sysv4)
12680      case $host_vendor in
12681	sni)
12682	  archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
12683	  hardcode_direct=yes # is this really true???
12684	;;
12685	siemens)
12686	  ## LD is ld it makes a PLAMLIB
12687	  ## CC just makes a GrossModule.
12688	  archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
12689	  reload_cmds='$CC -r -o $output$reload_objs'
12690	  hardcode_direct=no
12691        ;;
12692	motorola)
12693	  archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
12694	  hardcode_direct=no #Motorola manual says yes, but my tests say they lie
12695	;;
12696      esac
12697      runpath_var='LD_RUN_PATH'
12698      hardcode_shlibpath_var=no
12699      ;;
12700
12701    sysv4.3*)
12702      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
12703      hardcode_shlibpath_var=no
12704      export_dynamic_flag_spec='-Bexport'
12705      ;;
12706
12707    sysv4*MP*)
12708      if test -d /usr/nec; then
12709	archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
12710	hardcode_shlibpath_var=no
12711	runpath_var=LD_RUN_PATH
12712	hardcode_runpath_var=yes
12713	ld_shlibs=yes
12714      fi
12715      ;;
12716
12717    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*)
12718      no_undefined_flag='$wl-z,text'
12719      archive_cmds_need_lc=no
12720      hardcode_shlibpath_var=no
12721      runpath_var='LD_RUN_PATH'
12722
12723      if test yes = "$GCC"; then
12724	archive_cmds='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
12725	archive_expsym_cmds='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
12726      else
12727	archive_cmds='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
12728	archive_expsym_cmds='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
12729      fi
12730      ;;
12731
12732    sysv5* | sco3.2v5* | sco5v6*)
12733      # Note: We CANNOT use -z defs as we might desire, because we do not
12734      # link with -lc, and that would cause any symbols used from libc to
12735      # always be unresolved, which means just about no library would
12736      # ever link correctly.  If we're not using GNU ld we use -z text
12737      # though, which does catch some bad symbols but isn't as heavy-handed
12738      # as -z defs.
12739      no_undefined_flag='$wl-z,text'
12740      allow_undefined_flag='$wl-z,nodefs'
12741      archive_cmds_need_lc=no
12742      hardcode_shlibpath_var=no
12743      hardcode_libdir_flag_spec='$wl-R,$libdir'
12744      hardcode_libdir_separator=':'
12745      link_all_deplibs=yes
12746      export_dynamic_flag_spec='$wl-Bexport'
12747      runpath_var='LD_RUN_PATH'
12748
12749      if test yes = "$GCC"; then
12750	archive_cmds='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
12751	archive_expsym_cmds='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
12752      else
12753	archive_cmds='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
12754	archive_expsym_cmds='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
12755      fi
12756      ;;
12757
12758    uts4*)
12759      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
12760      hardcode_libdir_flag_spec='-L$libdir'
12761      hardcode_shlibpath_var=no
12762      ;;
12763
12764    *)
12765      ld_shlibs=no
12766      ;;
12767    esac
12768
12769    if test sni = "$host_vendor"; then
12770      case $host in
12771      sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
12772	export_dynamic_flag_spec='$wl-Blargedynsym'
12773	;;
12774      esac
12775    fi
12776  fi
12777
12778{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5
12779$as_echo "$ld_shlibs" >&6; }
12780test no = "$ld_shlibs" && can_build_shared=no
12781
12782with_gnu_ld=$with_gnu_ld
12783
12784
12785
12786
12787
12788
12789
12790
12791
12792
12793
12794
12795
12796
12797
12798#
12799# Do we need to explicitly link libc?
12800#
12801case "x$archive_cmds_need_lc" in
12802x|xyes)
12803  # Assume -lc should be added
12804  archive_cmds_need_lc=yes
12805
12806  if test yes,yes = "$GCC,$enable_shared"; then
12807    case $archive_cmds in
12808    *'~'*)
12809      # FIXME: we may have to deal with multi-command sequences.
12810      ;;
12811    '$CC '*)
12812      # Test whether the compiler implicitly links with -lc since on some
12813      # systems, -lgcc has to come before -lc. If gcc already passes -lc
12814      # to ld, don't add -lc before -lgcc.
12815      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5
12816$as_echo_n "checking whether -lc should be explicitly linked in... " >&6; }
12817if ${lt_cv_archive_cmds_need_lc+:} false; then :
12818  $as_echo_n "(cached) " >&6
12819else
12820  $RM conftest*
12821	echo "$lt_simple_compile_test_code" > conftest.$ac_ext
12822
12823	if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
12824  (eval $ac_compile) 2>&5
12825  ac_status=$?
12826  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
12827  test $ac_status = 0; } 2>conftest.err; then
12828	  soname=conftest
12829	  lib=conftest
12830	  libobjs=conftest.$ac_objext
12831	  deplibs=
12832	  wl=$lt_prog_compiler_wl
12833	  pic_flag=$lt_prog_compiler_pic
12834	  compiler_flags=-v
12835	  linker_flags=-v
12836	  verstring=
12837	  output_objdir=.
12838	  libname=conftest
12839	  lt_save_allow_undefined_flag=$allow_undefined_flag
12840	  allow_undefined_flag=
12841	  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5
12842  (eval $archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5
12843  ac_status=$?
12844  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
12845  test $ac_status = 0; }
12846	  then
12847	    lt_cv_archive_cmds_need_lc=no
12848	  else
12849	    lt_cv_archive_cmds_need_lc=yes
12850	  fi
12851	  allow_undefined_flag=$lt_save_allow_undefined_flag
12852	else
12853	  cat conftest.err 1>&5
12854	fi
12855	$RM conftest*
12856
12857fi
12858{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc" >&5
12859$as_echo "$lt_cv_archive_cmds_need_lc" >&6; }
12860      archive_cmds_need_lc=$lt_cv_archive_cmds_need_lc
12861      ;;
12862    esac
12863  fi
12864  ;;
12865esac
12866
12867
12868
12869
12870
12871
12872
12873
12874
12875
12876
12877
12878
12879
12880
12881
12882
12883
12884
12885
12886
12887
12888
12889
12890
12891
12892
12893
12894
12895
12896
12897
12898
12899
12900
12901
12902
12903
12904
12905
12906
12907
12908
12909
12910
12911
12912
12913
12914
12915
12916
12917
12918
12919
12920
12921
12922
12923
12924
12925
12926
12927
12928
12929
12930
12931
12932
12933
12934
12935
12936
12937
12938
12939
12940
12941
12942
12943
12944
12945
12946
12947
12948
12949
12950
12951
12952
12953
12954
12955
12956
12957
12958
12959
12960
12961
12962
12963
12964
12965
12966
12967
12968
12969
12970
12971
12972
12973
12974
12975
12976
12977
12978
12979
12980
12981
12982
12983
12984
12985
12986
12987
12988
12989
12990
12991
12992
12993
12994
12995
12996
12997
12998
12999
13000
13001
13002
13003
13004
13005
13006
13007
13008
13009
13010
13011
13012
13013
13014
13015
13016
13017
13018  { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5
13019$as_echo_n "checking dynamic linker characteristics... " >&6; }
13020
13021if test yes = "$GCC"; then
13022  case $host_os in
13023    darwin*) lt_awk_arg='/^libraries:/,/LR/' ;;
13024    *) lt_awk_arg='/^libraries:/' ;;
13025  esac
13026  case $host_os in
13027    mingw* | cegcc*) lt_sed_strip_eq='s|=\([A-Za-z]:\)|\1|g' ;;
13028    *) lt_sed_strip_eq='s|=/|/|g' ;;
13029  esac
13030  lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq`
13031  case $lt_search_path_spec in
13032  *\;*)
13033    # if the path contains ";" then we assume it to be the separator
13034    # otherwise default to the standard path separator (i.e. ":") - it is
13035    # assumed that no part of a normal pathname contains ";" but that should
13036    # okay in the real world where ";" in dirpaths is itself problematic.
13037    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'`
13038    ;;
13039  *)
13040    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"`
13041    ;;
13042  esac
13043  # Ok, now we have the path, separated by spaces, we can step through it
13044  # and add multilib dir if necessary...
13045  lt_tmp_lt_search_path_spec=
13046  lt_multi_os_dir=/`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
13047  # ...but if some path component already ends with the multilib dir we assume
13048  # that all is fine and trust -print-search-dirs as is (GCC 4.2? or newer).
13049  case "$lt_multi_os_dir; $lt_search_path_spec " in
13050  "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*)
13051    lt_multi_os_dir=
13052    ;;
13053  esac
13054  for lt_sys_path in $lt_search_path_spec; do
13055    if test -d "$lt_sys_path$lt_multi_os_dir"; then
13056      lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path$lt_multi_os_dir"
13057    elif test -n "$lt_multi_os_dir"; then
13058      test -d "$lt_sys_path" && \
13059	lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
13060    fi
13061  done
13062  lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk '
13063BEGIN {RS = " "; FS = "/|\n";} {
13064  lt_foo = "";
13065  lt_count = 0;
13066  for (lt_i = NF; lt_i > 0; lt_i--) {
13067    if ($lt_i != "" && $lt_i != ".") {
13068      if ($lt_i == "..") {
13069        lt_count++;
13070      } else {
13071        if (lt_count == 0) {
13072          lt_foo = "/" $lt_i lt_foo;
13073        } else {
13074          lt_count--;
13075        }
13076      }
13077    }
13078  }
13079  if (lt_foo != "") { lt_freq[lt_foo]++; }
13080  if (lt_freq[lt_foo] == 1) { print lt_foo; }
13081}'`
13082  # AWK program above erroneously prepends '/' to C:/dos/paths
13083  # for these hosts.
13084  case $host_os in
13085    mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\
13086      $SED 's|/\([A-Za-z]:\)|\1|g'` ;;
13087  esac
13088  sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP`
13089else
13090  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
13091fi
13092library_names_spec=
13093libname_spec='lib$name'
13094soname_spec=
13095shrext_cmds=.so
13096postinstall_cmds=
13097postuninstall_cmds=
13098finish_cmds=
13099finish_eval=
13100shlibpath_var=
13101shlibpath_overrides_runpath=unknown
13102version_type=none
13103dynamic_linker="$host_os ld.so"
13104sys_lib_dlsearch_path_spec="/lib /usr/lib"
13105need_lib_prefix=unknown
13106hardcode_into_libs=no
13107
13108# when you set need_version to no, make sure it does not cause -set_version
13109# flags to be left without arguments
13110need_version=unknown
13111
13112
13113
13114case $host_os in
13115aix3*)
13116  version_type=linux # correct to gnu/linux during the next big refactor
13117  library_names_spec='$libname$release$shared_ext$versuffix $libname.a'
13118  shlibpath_var=LIBPATH
13119
13120  # AIX 3 has no versioning support, so we append a major version to the name.
13121  soname_spec='$libname$release$shared_ext$major'
13122  ;;
13123
13124aix[4-9]*)
13125  version_type=linux # correct to gnu/linux during the next big refactor
13126  need_lib_prefix=no
13127  need_version=no
13128  hardcode_into_libs=yes
13129  if test ia64 = "$host_cpu"; then
13130    # AIX 5 supports IA64
13131    library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext'
13132    shlibpath_var=LD_LIBRARY_PATH
13133  else
13134    # With GCC up to 2.95.x, collect2 would create an import file
13135    # for dependence libraries.  The import file would start with
13136    # the line '#! .'.  This would cause the generated library to
13137    # depend on '.', always an invalid library.  This was fixed in
13138    # development snapshots of GCC prior to 3.0.
13139    case $host_os in
13140      aix4 | aix4.[01] | aix4.[01].*)
13141      if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
13142	   echo ' yes '
13143	   echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then
13144	:
13145      else
13146	can_build_shared=no
13147      fi
13148      ;;
13149    esac
13150    # Using Import Files as archive members, it is possible to support
13151    # filename-based versioning of shared library archives on AIX. While
13152    # this would work for both with and without runtime linking, it will
13153    # prevent static linking of such archives. So we do filename-based
13154    # shared library versioning with .so extension only, which is used
13155    # when both runtime linking and shared linking is enabled.
13156    # Unfortunately, runtime linking may impact performance, so we do
13157    # not want this to be the default eventually. Also, we use the
13158    # versioned .so libs for executables only if there is the -brtl
13159    # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only.
13160    # To allow for filename-based versioning support, we need to create
13161    # libNAME.so.V as an archive file, containing:
13162    # *) an Import File, referring to the versioned filename of the
13163    #    archive as well as the shared archive member, telling the
13164    #    bitwidth (32 or 64) of that shared object, and providing the
13165    #    list of exported symbols of that shared object, eventually
13166    #    decorated with the 'weak' keyword
13167    # *) the shared object with the F_LOADONLY flag set, to really avoid
13168    #    it being seen by the linker.
13169    # At run time we better use the real file rather than another symlink,
13170    # but for link time we create the symlink libNAME.so -> libNAME.so.V
13171
13172    case $with_aix_soname,$aix_use_runtimelinking in
13173    # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct
13174    # soname into executable. Probably we can add versioning support to
13175    # collect2, so additional links can be useful in future.
13176    aix,yes) # traditional libtool
13177      dynamic_linker='AIX unversionable lib.so'
13178      # If using run time linking (on AIX 4.2 or later) use lib<name>.so
13179      # instead of lib<name>.a to let people know that these are not
13180      # typical AIX shared libraries.
13181      library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13182      ;;
13183    aix,no) # traditional AIX only
13184      dynamic_linker='AIX lib.a(lib.so.V)'
13185      # We preserve .a as extension for shared libraries through AIX4.2
13186      # and later when we are not doing run time linking.
13187      library_names_spec='$libname$release.a $libname.a'
13188      soname_spec='$libname$release$shared_ext$major'
13189      ;;
13190    svr4,*) # full svr4 only
13191      dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o)"
13192      library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
13193      # We do not specify a path in Import Files, so LIBPATH fires.
13194      shlibpath_overrides_runpath=yes
13195      ;;
13196    *,yes) # both, prefer svr4
13197      dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o), lib.a(lib.so.V)"
13198      library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
13199      # unpreferred sharedlib libNAME.a needs extra handling
13200      postinstall_cmds='test -n "$linkname" || linkname="$realname"~func_stripname "" ".so" "$linkname"~$install_shared_prog "$dir/$func_stripname_result.$libext" "$destdir/$func_stripname_result.$libext"~test -z "$tstripme" || test -z "$striplib" || $striplib "$destdir/$func_stripname_result.$libext"'
13201      postuninstall_cmds='for n in $library_names $old_library; do :; done~func_stripname "" ".so" "$n"~test "$func_stripname_result" = "$n" || func_append rmfiles " $odir/$func_stripname_result.$libext"'
13202      # We do not specify a path in Import Files, so LIBPATH fires.
13203      shlibpath_overrides_runpath=yes
13204      ;;
13205    *,no) # both, prefer aix
13206      dynamic_linker="AIX lib.a(lib.so.V), lib.so.V($shared_archive_member_spec.o)"
13207      library_names_spec='$libname$release.a $libname.a'
13208      soname_spec='$libname$release$shared_ext$major'
13209      # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling
13210      postinstall_cmds='test -z "$dlname" || $install_shared_prog $dir/$dlname $destdir/$dlname~test -z "$tstripme" || test -z "$striplib" || $striplib $destdir/$dlname~test -n "$linkname" || linkname=$realname~func_stripname "" ".a" "$linkname"~(cd "$destdir" && $LN_S -f $dlname $func_stripname_result.so)'
13211      postuninstall_cmds='test -z "$dlname" || func_append rmfiles " $odir/$dlname"~for n in $old_library $library_names; do :; done~func_stripname "" ".a" "$n"~func_append rmfiles " $odir/$func_stripname_result.so"'
13212      ;;
13213    esac
13214    shlibpath_var=LIBPATH
13215  fi
13216  ;;
13217
13218amigaos*)
13219  case $host_cpu in
13220  powerpc)
13221    # Since July 2007 AmigaOS4 officially supports .so libraries.
13222    # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
13223    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13224    ;;
13225  m68k)
13226    library_names_spec='$libname.ixlibrary $libname.a'
13227    # Create ${libname}_ixlibrary.a entries in /sys/libs.
13228    finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
13229    ;;
13230  esac
13231  ;;
13232
13233beos*)
13234  library_names_spec='$libname$shared_ext'
13235  dynamic_linker="$host_os ld.so"
13236  shlibpath_var=LIBRARY_PATH
13237  ;;
13238
13239bsdi[45]*)
13240  version_type=linux # correct to gnu/linux during the next big refactor
13241  need_version=no
13242  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13243  soname_spec='$libname$release$shared_ext$major'
13244  finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
13245  shlibpath_var=LD_LIBRARY_PATH
13246  sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
13247  sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
13248  # the default ld.so.conf also contains /usr/contrib/lib and
13249  # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
13250  # libtool to hard-code these into programs
13251  ;;
13252
13253cygwin* | mingw* | pw32* | cegcc*)
13254  version_type=windows
13255  shrext_cmds=.dll
13256  need_version=no
13257  need_lib_prefix=no
13258
13259  case $GCC,$cc_basename in
13260  yes,*)
13261    # gcc
13262    library_names_spec='$libname.dll.a'
13263    # DLL is installed to $(libdir)/../bin by postinstall_cmds
13264    postinstall_cmds='base_file=`basename \$file`~
13265      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
13266      dldir=$destdir/`dirname \$dlpath`~
13267      test -d \$dldir || mkdir -p \$dldir~
13268      $install_prog $dir/$dlname \$dldir/$dlname~
13269      chmod a+x \$dldir/$dlname~
13270      if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
13271        eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
13272      fi'
13273    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
13274      dlpath=$dir/\$dldll~
13275       $RM \$dlpath'
13276    shlibpath_overrides_runpath=yes
13277
13278    case $host_os in
13279    cygwin*)
13280      # Cygwin DLLs use 'cyg' prefix rather than 'lib'
13281      soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
13282
13283      sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"
13284      ;;
13285    mingw* | cegcc*)
13286      # MinGW DLLs use traditional 'lib' prefix
13287      soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
13288      ;;
13289    pw32*)
13290      # pw32 DLLs use 'pw' prefix rather than 'lib'
13291      library_names_spec='`echo $libname | sed -e 's/^lib/pw/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
13292      ;;
13293    esac
13294    dynamic_linker='Win32 ld.exe'
13295    ;;
13296
13297  *,cl*)
13298    # Native MSVC
13299    libname_spec='$name'
13300    soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
13301    library_names_spec='$libname.dll.lib'
13302
13303    case $build_os in
13304    mingw*)
13305      sys_lib_search_path_spec=
13306      lt_save_ifs=$IFS
13307      IFS=';'
13308      for lt_path in $LIB
13309      do
13310        IFS=$lt_save_ifs
13311        # Let DOS variable expansion print the short 8.3 style file name.
13312        lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"`
13313        sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path"
13314      done
13315      IFS=$lt_save_ifs
13316      # Convert to MSYS style.
13317      sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'`
13318      ;;
13319    cygwin*)
13320      # Convert to unix form, then to dos form, then back to unix form
13321      # but this time dos style (no spaces!) so that the unix form looks
13322      # like /cygdrive/c/PROGRA~1:/cygdr...
13323      sys_lib_search_path_spec=`cygpath --path --unix "$LIB"`
13324      sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null`
13325      sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
13326      ;;
13327    *)
13328      sys_lib_search_path_spec=$LIB
13329      if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then
13330        # It is most probably a Windows format PATH.
13331        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
13332      else
13333        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
13334      fi
13335      # FIXME: find the short name or the path components, as spaces are
13336      # common. (e.g. "Program Files" -> "PROGRA~1")
13337      ;;
13338    esac
13339
13340    # DLL is installed to $(libdir)/../bin by postinstall_cmds
13341    postinstall_cmds='base_file=`basename \$file`~
13342      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
13343      dldir=$destdir/`dirname \$dlpath`~
13344      test -d \$dldir || mkdir -p \$dldir~
13345      $install_prog $dir/$dlname \$dldir/$dlname'
13346    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
13347      dlpath=$dir/\$dldll~
13348       $RM \$dlpath'
13349    shlibpath_overrides_runpath=yes
13350    dynamic_linker='Win32 link.exe'
13351    ;;
13352
13353  *)
13354    # Assume MSVC wrapper
13355    library_names_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext $libname.lib'
13356    dynamic_linker='Win32 ld.exe'
13357    ;;
13358  esac
13359  # FIXME: first we should search . and the directory the executable is in
13360  shlibpath_var=PATH
13361  ;;
13362
13363darwin* | rhapsody*)
13364  dynamic_linker="$host_os dyld"
13365  version_type=darwin
13366  need_lib_prefix=no
13367  need_version=no
13368  library_names_spec='$libname$release$major$shared_ext $libname$shared_ext'
13369  soname_spec='$libname$release$major$shared_ext'
13370  shlibpath_overrides_runpath=yes
13371  shlibpath_var=DYLD_LIBRARY_PATH
13372  shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
13373
13374  sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"
13375  sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
13376  ;;
13377
13378dgux*)
13379  version_type=linux # correct to gnu/linux during the next big refactor
13380  need_lib_prefix=no
13381  need_version=no
13382  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13383  soname_spec='$libname$release$shared_ext$major'
13384  shlibpath_var=LD_LIBRARY_PATH
13385  ;;
13386
13387freebsd* | dragonfly*)
13388  # DragonFly does not have aout.  When/if they implement a new
13389  # versioning mechanism, adjust this.
13390  if test -x /usr/bin/objformat; then
13391    objformat=`/usr/bin/objformat`
13392  else
13393    case $host_os in
13394    freebsd[23].*) objformat=aout ;;
13395    *) objformat=elf ;;
13396    esac
13397  fi
13398  version_type=freebsd-$objformat
13399  case $version_type in
13400    freebsd-elf*)
13401      library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13402      soname_spec='$libname$release$shared_ext$major'
13403      need_version=no
13404      need_lib_prefix=no
13405      ;;
13406    freebsd-*)
13407      library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
13408      need_version=yes
13409      ;;
13410  esac
13411  shlibpath_var=LD_LIBRARY_PATH
13412  case $host_os in
13413  freebsd2.*)
13414    shlibpath_overrides_runpath=yes
13415    ;;
13416  freebsd3.[01]* | freebsdelf3.[01]*)
13417    shlibpath_overrides_runpath=yes
13418    hardcode_into_libs=yes
13419    ;;
13420  freebsd3.[2-9]* | freebsdelf3.[2-9]* | \
13421  freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1)
13422    shlibpath_overrides_runpath=no
13423    hardcode_into_libs=yes
13424    ;;
13425  *) # from 4.6 on, and DragonFly
13426    shlibpath_overrides_runpath=yes
13427    hardcode_into_libs=yes
13428    ;;
13429  esac
13430  ;;
13431
13432haiku*)
13433  version_type=linux # correct to gnu/linux during the next big refactor
13434  need_lib_prefix=no
13435  need_version=no
13436  dynamic_linker="$host_os runtime_loader"
13437  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13438  soname_spec='$libname$release$shared_ext$major'
13439  shlibpath_var=LIBRARY_PATH
13440  shlibpath_overrides_runpath=no
13441  sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
13442  hardcode_into_libs=yes
13443  ;;
13444
13445hpux9* | hpux10* | hpux11*)
13446  # Give a soname corresponding to the major version so that dld.sl refuses to
13447  # link against other versions.
13448  version_type=sunos
13449  need_lib_prefix=no
13450  need_version=no
13451  case $host_cpu in
13452  ia64*)
13453    shrext_cmds='.so'
13454    hardcode_into_libs=yes
13455    dynamic_linker="$host_os dld.so"
13456    shlibpath_var=LD_LIBRARY_PATH
13457    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
13458    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13459    soname_spec='$libname$release$shared_ext$major'
13460    if test 32 = "$HPUX_IA64_MODE"; then
13461      sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
13462      sys_lib_dlsearch_path_spec=/usr/lib/hpux32
13463    else
13464      sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
13465      sys_lib_dlsearch_path_spec=/usr/lib/hpux64
13466    fi
13467    ;;
13468  hppa*64*)
13469    shrext_cmds='.sl'
13470    hardcode_into_libs=yes
13471    dynamic_linker="$host_os dld.sl"
13472    shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
13473    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
13474    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13475    soname_spec='$libname$release$shared_ext$major'
13476    sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
13477    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
13478    ;;
13479  *)
13480    shrext_cmds='.sl'
13481    dynamic_linker="$host_os dld.sl"
13482    shlibpath_var=SHLIB_PATH
13483    shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
13484    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13485    soname_spec='$libname$release$shared_ext$major'
13486    ;;
13487  esac
13488  # HP-UX runs *really* slowly unless shared libraries are mode 555, ...
13489  postinstall_cmds='chmod 555 $lib'
13490  # or fails outright, so override atomically:
13491  install_override_mode=555
13492  ;;
13493
13494interix[3-9]*)
13495  version_type=linux # correct to gnu/linux during the next big refactor
13496  need_lib_prefix=no
13497  need_version=no
13498  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13499  soname_spec='$libname$release$shared_ext$major'
13500  dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
13501  shlibpath_var=LD_LIBRARY_PATH
13502  shlibpath_overrides_runpath=no
13503  hardcode_into_libs=yes
13504  ;;
13505
13506irix5* | irix6* | nonstopux*)
13507  case $host_os in
13508    nonstopux*) version_type=nonstopux ;;
13509    *)
13510	if test yes = "$lt_cv_prog_gnu_ld"; then
13511		version_type=linux # correct to gnu/linux during the next big refactor
13512	else
13513		version_type=irix
13514	fi ;;
13515  esac
13516  need_lib_prefix=no
13517  need_version=no
13518  soname_spec='$libname$release$shared_ext$major'
13519  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext'
13520  case $host_os in
13521  irix5* | nonstopux*)
13522    libsuff= shlibsuff=
13523    ;;
13524  *)
13525    case $LD in # libtool.m4 will add one of these switches to LD
13526    *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
13527      libsuff= shlibsuff= libmagic=32-bit;;
13528    *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
13529      libsuff=32 shlibsuff=N32 libmagic=N32;;
13530    *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
13531      libsuff=64 shlibsuff=64 libmagic=64-bit;;
13532    *) libsuff= shlibsuff= libmagic=never-match;;
13533    esac
13534    ;;
13535  esac
13536  shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
13537  shlibpath_overrides_runpath=no
13538  sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff"
13539  sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff"
13540  hardcode_into_libs=yes
13541  ;;
13542
13543# No shared lib support for Linux oldld, aout, or coff.
13544linux*oldld* | linux*aout* | linux*coff*)
13545  dynamic_linker=no
13546  ;;
13547
13548linux*android*)
13549  version_type=none # Android doesn't support versioned libraries.
13550  need_lib_prefix=no
13551  need_version=no
13552  library_names_spec='$libname$release$shared_ext'
13553  soname_spec='$libname$release$shared_ext'
13554  finish_cmds=
13555  shlibpath_var=LD_LIBRARY_PATH
13556  shlibpath_overrides_runpath=yes
13557
13558  # This implies no fast_install, which is unacceptable.
13559  # Some rework will be needed to allow for fast_install
13560  # before this can be enabled.
13561  hardcode_into_libs=yes
13562
13563  dynamic_linker='Android linker'
13564  # Don't embed -rpath directories since the linker doesn't support them.
13565  hardcode_libdir_flag_spec='-L$libdir'
13566  ;;
13567
13568# This must be glibc/ELF.
13569linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
13570  version_type=linux # correct to gnu/linux during the next big refactor
13571  need_lib_prefix=no
13572  need_version=no
13573  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13574  soname_spec='$libname$release$shared_ext$major'
13575  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
13576  shlibpath_var=LD_LIBRARY_PATH
13577  shlibpath_overrides_runpath=no
13578
13579  # Some binutils ld are patched to set DT_RUNPATH
13580  if ${lt_cv_shlibpath_overrides_runpath+:} false; then :
13581  $as_echo_n "(cached) " >&6
13582else
13583  lt_cv_shlibpath_overrides_runpath=no
13584    save_LDFLAGS=$LDFLAGS
13585    save_libdir=$libdir
13586    eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \
13587	 LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\""
13588    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13589/* end confdefs.h.  */
13590
13591int
13592main ()
13593{
13594
13595  ;
13596  return 0;
13597}
13598_ACEOF
13599if ac_fn_c_try_link "$LINENO"; then :
13600  if  ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then :
13601  lt_cv_shlibpath_overrides_runpath=yes
13602fi
13603fi
13604rm -f core conftest.err conftest.$ac_objext \
13605    conftest$ac_exeext conftest.$ac_ext
13606    LDFLAGS=$save_LDFLAGS
13607    libdir=$save_libdir
13608
13609fi
13610
13611  shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
13612
13613  # This implies no fast_install, which is unacceptable.
13614  # Some rework will be needed to allow for fast_install
13615  # before this can be enabled.
13616  hardcode_into_libs=yes
13617
13618  # Add ABI-specific directories to the system library path.
13619  sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib"
13620
13621  # Ideally, we could use ldconfig to report *all* directores which are
13622  # searched for libraries, however this is still not possible.  Aside from not
13623  # being certain /sbin/ldconfig is available, command
13624  # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64,
13625  # even though it is searched at run-time.  Try to do the best guess by
13626  # appending ld.so.conf contents (and includes) to the search path.
13627  if test -f /etc/ld.so.conf; then
13628    lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[	 ]*hwcap[	 ]/d;s/[:,	]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '`
13629    sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra"
13630  fi
13631
13632  # We used to test for /lib/ld.so.1 and disable shared libraries on
13633  # powerpc, because MkLinux only supported shared libraries with the
13634  # GNU dynamic linker.  Since this was broken with cross compilers,
13635  # most powerpc-linux boxes support dynamic linking these days and
13636  # people can always --disable-shared, the test was removed, and we
13637  # assume the GNU/Linux dynamic linker is in use.
13638  dynamic_linker='GNU/Linux ld.so'
13639  ;;
13640
13641netbsd*)
13642  version_type=sunos
13643  need_lib_prefix=no
13644  need_version=no
13645  if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
13646    library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
13647    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
13648    dynamic_linker='NetBSD (a.out) ld.so'
13649  else
13650    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13651    soname_spec='$libname$release$shared_ext$major'
13652    dynamic_linker='NetBSD ld.elf_so'
13653  fi
13654  shlibpath_var=LD_LIBRARY_PATH
13655  shlibpath_overrides_runpath=yes
13656  hardcode_into_libs=yes
13657  ;;
13658
13659newsos6)
13660  version_type=linux # correct to gnu/linux during the next big refactor
13661  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13662  shlibpath_var=LD_LIBRARY_PATH
13663  shlibpath_overrides_runpath=yes
13664  ;;
13665
13666*nto* | *qnx*)
13667  version_type=qnx
13668  need_lib_prefix=no
13669  need_version=no
13670  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13671  soname_spec='$libname$release$shared_ext$major'
13672  shlibpath_var=LD_LIBRARY_PATH
13673  shlibpath_overrides_runpath=no
13674  hardcode_into_libs=yes
13675  dynamic_linker='ldqnx.so'
13676  ;;
13677
13678openbsd* | bitrig*)
13679  version_type=sunos
13680  sys_lib_dlsearch_path_spec=/usr/lib
13681  need_lib_prefix=no
13682  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
13683    need_version=no
13684  else
13685    need_version=yes
13686  fi
13687  library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
13688  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
13689  shlibpath_var=LD_LIBRARY_PATH
13690  shlibpath_overrides_runpath=yes
13691  ;;
13692
13693os2*)
13694  libname_spec='$name'
13695  version_type=windows
13696  shrext_cmds=.dll
13697  need_version=no
13698  need_lib_prefix=no
13699  # OS/2 can only load a DLL with a base name of 8 characters or less.
13700  soname_spec='`test -n "$os2dllname" && libname="$os2dllname";
13701    v=$($ECHO $release$versuffix | tr -d .-);
13702    n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _);
13703    $ECHO $n$v`$shared_ext'
13704  library_names_spec='${libname}_dll.$libext'
13705  dynamic_linker='OS/2 ld.exe'
13706  shlibpath_var=BEGINLIBPATH
13707  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
13708  sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
13709  postinstall_cmds='base_file=`basename \$file`~
13710    dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~
13711    dldir=$destdir/`dirname \$dlpath`~
13712    test -d \$dldir || mkdir -p \$dldir~
13713    $install_prog $dir/$dlname \$dldir/$dlname~
13714    chmod a+x \$dldir/$dlname~
13715    if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
13716      eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
13717    fi'
13718  postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~
13719    dlpath=$dir/\$dldll~
13720    $RM \$dlpath'
13721  ;;
13722
13723osf3* | osf4* | osf5*)
13724  version_type=osf
13725  need_lib_prefix=no
13726  need_version=no
13727  soname_spec='$libname$release$shared_ext$major'
13728  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13729  shlibpath_var=LD_LIBRARY_PATH
13730  sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
13731  sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
13732  ;;
13733
13734rdos*)
13735  dynamic_linker=no
13736  ;;
13737
13738solaris*)
13739  version_type=linux # correct to gnu/linux during the next big refactor
13740  need_lib_prefix=no
13741  need_version=no
13742  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13743  soname_spec='$libname$release$shared_ext$major'
13744  shlibpath_var=LD_LIBRARY_PATH
13745  shlibpath_overrides_runpath=yes
13746  hardcode_into_libs=yes
13747  # ldd complains unless libraries are executable
13748  postinstall_cmds='chmod +x $lib'
13749  ;;
13750
13751sunos4*)
13752  version_type=sunos
13753  library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
13754  finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
13755  shlibpath_var=LD_LIBRARY_PATH
13756  shlibpath_overrides_runpath=yes
13757  if test yes = "$with_gnu_ld"; then
13758    need_lib_prefix=no
13759  fi
13760  need_version=yes
13761  ;;
13762
13763sysv4 | sysv4.3*)
13764  version_type=linux # correct to gnu/linux during the next big refactor
13765  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13766  soname_spec='$libname$release$shared_ext$major'
13767  shlibpath_var=LD_LIBRARY_PATH
13768  case $host_vendor in
13769    sni)
13770      shlibpath_overrides_runpath=no
13771      need_lib_prefix=no
13772      runpath_var=LD_RUN_PATH
13773      ;;
13774    siemens)
13775      need_lib_prefix=no
13776      ;;
13777    motorola)
13778      need_lib_prefix=no
13779      need_version=no
13780      shlibpath_overrides_runpath=no
13781      sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
13782      ;;
13783  esac
13784  ;;
13785
13786sysv4*MP*)
13787  if test -d /usr/nec; then
13788    version_type=linux # correct to gnu/linux during the next big refactor
13789    library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext'
13790    soname_spec='$libname$shared_ext.$major'
13791    shlibpath_var=LD_LIBRARY_PATH
13792  fi
13793  ;;
13794
13795sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
13796  version_type=sco
13797  need_lib_prefix=no
13798  need_version=no
13799  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext'
13800  soname_spec='$libname$release$shared_ext$major'
13801  shlibpath_var=LD_LIBRARY_PATH
13802  shlibpath_overrides_runpath=yes
13803  hardcode_into_libs=yes
13804  if test yes = "$with_gnu_ld"; then
13805    sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
13806  else
13807    sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
13808    case $host_os in
13809      sco3.2v5*)
13810        sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
13811	;;
13812    esac
13813  fi
13814  sys_lib_dlsearch_path_spec='/usr/lib'
13815  ;;
13816
13817tpf*)
13818  # TPF is a cross-target only.  Preferred cross-host = GNU/Linux.
13819  version_type=linux # correct to gnu/linux during the next big refactor
13820  need_lib_prefix=no
13821  need_version=no
13822  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13823  shlibpath_var=LD_LIBRARY_PATH
13824  shlibpath_overrides_runpath=no
13825  hardcode_into_libs=yes
13826  ;;
13827
13828uts4*)
13829  version_type=linux # correct to gnu/linux during the next big refactor
13830  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13831  soname_spec='$libname$release$shared_ext$major'
13832  shlibpath_var=LD_LIBRARY_PATH
13833  ;;
13834
13835*)
13836  dynamic_linker=no
13837  ;;
13838esac
13839{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5
13840$as_echo "$dynamic_linker" >&6; }
13841test no = "$dynamic_linker" && can_build_shared=no
13842
13843variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
13844if test yes = "$GCC"; then
13845  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
13846fi
13847
13848if test set = "${lt_cv_sys_lib_search_path_spec+set}"; then
13849  sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec
13850fi
13851
13852if test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then
13853  sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec
13854fi
13855
13856# remember unaugmented sys_lib_dlsearch_path content for libtool script decls...
13857configure_time_dlsearch_path=$sys_lib_dlsearch_path_spec
13858
13859# ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code
13860func_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH"
13861
13862# to be used as default LT_SYS_LIBRARY_PATH value in generated libtool
13863configure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH
13864
13865
13866
13867
13868
13869
13870
13871
13872
13873
13874
13875
13876
13877
13878
13879
13880
13881
13882
13883
13884
13885
13886
13887
13888
13889
13890
13891
13892
13893
13894
13895
13896
13897
13898
13899
13900
13901
13902
13903
13904
13905
13906
13907
13908
13909
13910
13911
13912
13913
13914
13915
13916
13917
13918
13919
13920
13921
13922
13923
13924
13925
13926
13927
13928
13929
13930
13931
13932
13933
13934
13935
13936
13937
13938
13939
13940
13941
13942
13943
13944
13945
13946
13947
13948
13949
13950
13951
13952
13953
13954
13955
13956
13957
13958
13959
13960
13961  { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5
13962$as_echo_n "checking how to hardcode library paths into programs... " >&6; }
13963hardcode_action=
13964if test -n "$hardcode_libdir_flag_spec" ||
13965   test -n "$runpath_var" ||
13966   test yes = "$hardcode_automatic"; then
13967
13968  # We can hardcode non-existent directories.
13969  if test no != "$hardcode_direct" &&
13970     # If the only mechanism to avoid hardcoding is shlibpath_var, we
13971     # have to relink, otherwise we might link with an installed library
13972     # when we should be linking with a yet-to-be-installed one
13973     ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, )" &&
13974     test no != "$hardcode_minus_L"; then
13975    # Linking always hardcodes the temporary library directory.
13976    hardcode_action=relink
13977  else
13978    # We can link without hardcoding, and we can hardcode nonexisting dirs.
13979    hardcode_action=immediate
13980  fi
13981else
13982  # We cannot hardcode anything, or else we can only hardcode existing
13983  # directories.
13984  hardcode_action=unsupported
13985fi
13986{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5
13987$as_echo "$hardcode_action" >&6; }
13988
13989if test relink = "$hardcode_action" ||
13990   test yes = "$inherit_rpath"; then
13991  # Fast installation is not supported
13992  enable_fast_install=no
13993elif test yes = "$shlibpath_overrides_runpath" ||
13994     test no = "$enable_shared"; then
13995  # Fast installation is not necessary
13996  enable_fast_install=needless
13997fi
13998
13999
14000
14001
14002
14003
14004  if test yes != "$enable_dlopen"; then
14005  enable_dlopen=unknown
14006  enable_dlopen_self=unknown
14007  enable_dlopen_self_static=unknown
14008else
14009  lt_cv_dlopen=no
14010  lt_cv_dlopen_libs=
14011
14012  case $host_os in
14013  beos*)
14014    lt_cv_dlopen=load_add_on
14015    lt_cv_dlopen_libs=
14016    lt_cv_dlopen_self=yes
14017    ;;
14018
14019  mingw* | pw32* | cegcc*)
14020    lt_cv_dlopen=LoadLibrary
14021    lt_cv_dlopen_libs=
14022    ;;
14023
14024  cygwin*)
14025    lt_cv_dlopen=dlopen
14026    lt_cv_dlopen_libs=
14027    ;;
14028
14029  darwin*)
14030    # if libdl is installed we need to link against it
14031    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
14032$as_echo_n "checking for dlopen in -ldl... " >&6; }
14033if ${ac_cv_lib_dl_dlopen+:} false; then :
14034  $as_echo_n "(cached) " >&6
14035else
14036  ac_check_lib_save_LIBS=$LIBS
14037LIBS="-ldl  $LIBS"
14038cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14039/* end confdefs.h.  */
14040
14041/* Override any GCC internal prototype to avoid an error.
14042   Use char because int might match the return type of a GCC
14043   builtin and then its argument prototype would still apply.  */
14044#ifdef __cplusplus
14045extern "C"
14046#endif
14047char dlopen ();
14048int
14049main ()
14050{
14051return dlopen ();
14052  ;
14053  return 0;
14054}
14055_ACEOF
14056if ac_fn_c_try_link "$LINENO"; then :
14057  ac_cv_lib_dl_dlopen=yes
14058else
14059  ac_cv_lib_dl_dlopen=no
14060fi
14061rm -f core conftest.err conftest.$ac_objext \
14062    conftest$ac_exeext conftest.$ac_ext
14063LIBS=$ac_check_lib_save_LIBS
14064fi
14065{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
14066$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
14067if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
14068  lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl
14069else
14070
14071    lt_cv_dlopen=dyld
14072    lt_cv_dlopen_libs=
14073    lt_cv_dlopen_self=yes
14074
14075fi
14076
14077    ;;
14078
14079  tpf*)
14080    # Don't try to run any link tests for TPF.  We know it's impossible
14081    # because TPF is a cross-compiler, and we know how we open DSOs.
14082    lt_cv_dlopen=dlopen
14083    lt_cv_dlopen_libs=
14084    lt_cv_dlopen_self=no
14085    ;;
14086
14087  *)
14088    ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load"
14089if test "x$ac_cv_func_shl_load" = xyes; then :
14090  lt_cv_dlopen=shl_load
14091else
14092  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
14093$as_echo_n "checking for shl_load in -ldld... " >&6; }
14094if ${ac_cv_lib_dld_shl_load+:} false; then :
14095  $as_echo_n "(cached) " >&6
14096else
14097  ac_check_lib_save_LIBS=$LIBS
14098LIBS="-ldld  $LIBS"
14099cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14100/* end confdefs.h.  */
14101
14102/* Override any GCC internal prototype to avoid an error.
14103   Use char because int might match the return type of a GCC
14104   builtin and then its argument prototype would still apply.  */
14105#ifdef __cplusplus
14106extern "C"
14107#endif
14108char shl_load ();
14109int
14110main ()
14111{
14112return shl_load ();
14113  ;
14114  return 0;
14115}
14116_ACEOF
14117if ac_fn_c_try_link "$LINENO"; then :
14118  ac_cv_lib_dld_shl_load=yes
14119else
14120  ac_cv_lib_dld_shl_load=no
14121fi
14122rm -f core conftest.err conftest.$ac_objext \
14123    conftest$ac_exeext conftest.$ac_ext
14124LIBS=$ac_check_lib_save_LIBS
14125fi
14126{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
14127$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
14128if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
14129  lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld
14130else
14131  ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
14132if test "x$ac_cv_func_dlopen" = xyes; then :
14133  lt_cv_dlopen=dlopen
14134else
14135  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
14136$as_echo_n "checking for dlopen in -ldl... " >&6; }
14137if ${ac_cv_lib_dl_dlopen+:} false; then :
14138  $as_echo_n "(cached) " >&6
14139else
14140  ac_check_lib_save_LIBS=$LIBS
14141LIBS="-ldl  $LIBS"
14142cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14143/* end confdefs.h.  */
14144
14145/* Override any GCC internal prototype to avoid an error.
14146   Use char because int might match the return type of a GCC
14147   builtin and then its argument prototype would still apply.  */
14148#ifdef __cplusplus
14149extern "C"
14150#endif
14151char dlopen ();
14152int
14153main ()
14154{
14155return dlopen ();
14156  ;
14157  return 0;
14158}
14159_ACEOF
14160if ac_fn_c_try_link "$LINENO"; then :
14161  ac_cv_lib_dl_dlopen=yes
14162else
14163  ac_cv_lib_dl_dlopen=no
14164fi
14165rm -f core conftest.err conftest.$ac_objext \
14166    conftest$ac_exeext conftest.$ac_ext
14167LIBS=$ac_check_lib_save_LIBS
14168fi
14169{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
14170$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
14171if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
14172  lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl
14173else
14174  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5
14175$as_echo_n "checking for dlopen in -lsvld... " >&6; }
14176if ${ac_cv_lib_svld_dlopen+:} false; then :
14177  $as_echo_n "(cached) " >&6
14178else
14179  ac_check_lib_save_LIBS=$LIBS
14180LIBS="-lsvld  $LIBS"
14181cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14182/* end confdefs.h.  */
14183
14184/* Override any GCC internal prototype to avoid an error.
14185   Use char because int might match the return type of a GCC
14186   builtin and then its argument prototype would still apply.  */
14187#ifdef __cplusplus
14188extern "C"
14189#endif
14190char dlopen ();
14191int
14192main ()
14193{
14194return dlopen ();
14195  ;
14196  return 0;
14197}
14198_ACEOF
14199if ac_fn_c_try_link "$LINENO"; then :
14200  ac_cv_lib_svld_dlopen=yes
14201else
14202  ac_cv_lib_svld_dlopen=no
14203fi
14204rm -f core conftest.err conftest.$ac_objext \
14205    conftest$ac_exeext conftest.$ac_ext
14206LIBS=$ac_check_lib_save_LIBS
14207fi
14208{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5
14209$as_echo "$ac_cv_lib_svld_dlopen" >&6; }
14210if test "x$ac_cv_lib_svld_dlopen" = xyes; then :
14211  lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld
14212else
14213  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5
14214$as_echo_n "checking for dld_link in -ldld... " >&6; }
14215if ${ac_cv_lib_dld_dld_link+:} false; then :
14216  $as_echo_n "(cached) " >&6
14217else
14218  ac_check_lib_save_LIBS=$LIBS
14219LIBS="-ldld  $LIBS"
14220cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14221/* end confdefs.h.  */
14222
14223/* Override any GCC internal prototype to avoid an error.
14224   Use char because int might match the return type of a GCC
14225   builtin and then its argument prototype would still apply.  */
14226#ifdef __cplusplus
14227extern "C"
14228#endif
14229char dld_link ();
14230int
14231main ()
14232{
14233return dld_link ();
14234  ;
14235  return 0;
14236}
14237_ACEOF
14238if ac_fn_c_try_link "$LINENO"; then :
14239  ac_cv_lib_dld_dld_link=yes
14240else
14241  ac_cv_lib_dld_dld_link=no
14242fi
14243rm -f core conftest.err conftest.$ac_objext \
14244    conftest$ac_exeext conftest.$ac_ext
14245LIBS=$ac_check_lib_save_LIBS
14246fi
14247{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5
14248$as_echo "$ac_cv_lib_dld_dld_link" >&6; }
14249if test "x$ac_cv_lib_dld_dld_link" = xyes; then :
14250  lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld
14251fi
14252
14253
14254fi
14255
14256
14257fi
14258
14259
14260fi
14261
14262
14263fi
14264
14265
14266fi
14267
14268    ;;
14269  esac
14270
14271  if test no = "$lt_cv_dlopen"; then
14272    enable_dlopen=no
14273  else
14274    enable_dlopen=yes
14275  fi
14276
14277  case $lt_cv_dlopen in
14278  dlopen)
14279    save_CPPFLAGS=$CPPFLAGS
14280    test yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
14281
14282    save_LDFLAGS=$LDFLAGS
14283    wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
14284
14285    save_LIBS=$LIBS
14286    LIBS="$lt_cv_dlopen_libs $LIBS"
14287
14288    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5
14289$as_echo_n "checking whether a program can dlopen itself... " >&6; }
14290if ${lt_cv_dlopen_self+:} false; then :
14291  $as_echo_n "(cached) " >&6
14292else
14293  	  if test yes = "$cross_compiling"; then :
14294  lt_cv_dlopen_self=cross
14295else
14296  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
14297  lt_status=$lt_dlunknown
14298  cat > conftest.$ac_ext <<_LT_EOF
14299#line $LINENO "configure"
14300#include "confdefs.h"
14301
14302#if HAVE_DLFCN_H
14303#include <dlfcn.h>
14304#endif
14305
14306#include <stdio.h>
14307
14308#ifdef RTLD_GLOBAL
14309#  define LT_DLGLOBAL		RTLD_GLOBAL
14310#else
14311#  ifdef DL_GLOBAL
14312#    define LT_DLGLOBAL		DL_GLOBAL
14313#  else
14314#    define LT_DLGLOBAL		0
14315#  endif
14316#endif
14317
14318/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
14319   find out it does not work in some platform. */
14320#ifndef LT_DLLAZY_OR_NOW
14321#  ifdef RTLD_LAZY
14322#    define LT_DLLAZY_OR_NOW		RTLD_LAZY
14323#  else
14324#    ifdef DL_LAZY
14325#      define LT_DLLAZY_OR_NOW		DL_LAZY
14326#    else
14327#      ifdef RTLD_NOW
14328#        define LT_DLLAZY_OR_NOW	RTLD_NOW
14329#      else
14330#        ifdef DL_NOW
14331#          define LT_DLLAZY_OR_NOW	DL_NOW
14332#        else
14333#          define LT_DLLAZY_OR_NOW	0
14334#        endif
14335#      endif
14336#    endif
14337#  endif
14338#endif
14339
14340/* When -fvisibility=hidden is used, assume the code has been annotated
14341   correspondingly for the symbols needed.  */
14342#if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
14343int fnord () __attribute__((visibility("default")));
14344#endif
14345
14346int fnord () { return 42; }
14347int main ()
14348{
14349  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
14350  int status = $lt_dlunknown;
14351
14352  if (self)
14353    {
14354      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
14355      else
14356        {
14357	  if (dlsym( self,"_fnord"))  status = $lt_dlneed_uscore;
14358          else puts (dlerror ());
14359	}
14360      /* dlclose (self); */
14361    }
14362  else
14363    puts (dlerror ());
14364
14365  return status;
14366}
14367_LT_EOF
14368  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
14369  (eval $ac_link) 2>&5
14370  ac_status=$?
14371  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
14372  test $ac_status = 0; } && test -s "conftest$ac_exeext" 2>/dev/null; then
14373    (./conftest; exit; ) >&5 2>/dev/null
14374    lt_status=$?
14375    case x$lt_status in
14376      x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;;
14377      x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;;
14378      x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;;
14379    esac
14380  else :
14381    # compilation failed
14382    lt_cv_dlopen_self=no
14383  fi
14384fi
14385rm -fr conftest*
14386
14387
14388fi
14389{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5
14390$as_echo "$lt_cv_dlopen_self" >&6; }
14391
14392    if test yes = "$lt_cv_dlopen_self"; then
14393      wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
14394      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5
14395$as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; }
14396if ${lt_cv_dlopen_self_static+:} false; then :
14397  $as_echo_n "(cached) " >&6
14398else
14399  	  if test yes = "$cross_compiling"; then :
14400  lt_cv_dlopen_self_static=cross
14401else
14402  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
14403  lt_status=$lt_dlunknown
14404  cat > conftest.$ac_ext <<_LT_EOF
14405#line $LINENO "configure"
14406#include "confdefs.h"
14407
14408#if HAVE_DLFCN_H
14409#include <dlfcn.h>
14410#endif
14411
14412#include <stdio.h>
14413
14414#ifdef RTLD_GLOBAL
14415#  define LT_DLGLOBAL		RTLD_GLOBAL
14416#else
14417#  ifdef DL_GLOBAL
14418#    define LT_DLGLOBAL		DL_GLOBAL
14419#  else
14420#    define LT_DLGLOBAL		0
14421#  endif
14422#endif
14423
14424/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
14425   find out it does not work in some platform. */
14426#ifndef LT_DLLAZY_OR_NOW
14427#  ifdef RTLD_LAZY
14428#    define LT_DLLAZY_OR_NOW		RTLD_LAZY
14429#  else
14430#    ifdef DL_LAZY
14431#      define LT_DLLAZY_OR_NOW		DL_LAZY
14432#    else
14433#      ifdef RTLD_NOW
14434#        define LT_DLLAZY_OR_NOW	RTLD_NOW
14435#      else
14436#        ifdef DL_NOW
14437#          define LT_DLLAZY_OR_NOW	DL_NOW
14438#        else
14439#          define LT_DLLAZY_OR_NOW	0
14440#        endif
14441#      endif
14442#    endif
14443#  endif
14444#endif
14445
14446/* When -fvisibility=hidden is used, assume the code has been annotated
14447   correspondingly for the symbols needed.  */
14448#if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
14449int fnord () __attribute__((visibility("default")));
14450#endif
14451
14452int fnord () { return 42; }
14453int main ()
14454{
14455  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
14456  int status = $lt_dlunknown;
14457
14458  if (self)
14459    {
14460      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
14461      else
14462        {
14463	  if (dlsym( self,"_fnord"))  status = $lt_dlneed_uscore;
14464          else puts (dlerror ());
14465	}
14466      /* dlclose (self); */
14467    }
14468  else
14469    puts (dlerror ());
14470
14471  return status;
14472}
14473_LT_EOF
14474  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
14475  (eval $ac_link) 2>&5
14476  ac_status=$?
14477  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
14478  test $ac_status = 0; } && test -s "conftest$ac_exeext" 2>/dev/null; then
14479    (./conftest; exit; ) >&5 2>/dev/null
14480    lt_status=$?
14481    case x$lt_status in
14482      x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;;
14483      x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;;
14484      x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;;
14485    esac
14486  else :
14487    # compilation failed
14488    lt_cv_dlopen_self_static=no
14489  fi
14490fi
14491rm -fr conftest*
14492
14493
14494fi
14495{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self_static" >&5
14496$as_echo "$lt_cv_dlopen_self_static" >&6; }
14497    fi
14498
14499    CPPFLAGS=$save_CPPFLAGS
14500    LDFLAGS=$save_LDFLAGS
14501    LIBS=$save_LIBS
14502    ;;
14503  esac
14504
14505  case $lt_cv_dlopen_self in
14506  yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
14507  *) enable_dlopen_self=unknown ;;
14508  esac
14509
14510  case $lt_cv_dlopen_self_static in
14511  yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
14512  *) enable_dlopen_self_static=unknown ;;
14513  esac
14514fi
14515
14516
14517
14518
14519
14520
14521
14522
14523
14524
14525
14526
14527
14528
14529
14530
14531
14532striplib=
14533old_striplib=
14534{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5
14535$as_echo_n "checking whether stripping libraries is possible... " >&6; }
14536if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
14537  test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
14538  test -z "$striplib" && striplib="$STRIP --strip-unneeded"
14539  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14540$as_echo "yes" >&6; }
14541else
14542# FIXME - insert some real tests, host_os isn't really good enough
14543  case $host_os in
14544  darwin*)
14545    if test -n "$STRIP"; then
14546      striplib="$STRIP -x"
14547      old_striplib="$STRIP -S"
14548      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14549$as_echo "yes" >&6; }
14550    else
14551      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14552$as_echo "no" >&6; }
14553    fi
14554    ;;
14555  *)
14556    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14557$as_echo "no" >&6; }
14558    ;;
14559  esac
14560fi
14561
14562
14563
14564
14565
14566
14567
14568
14569
14570
14571
14572
14573  # Report what library types will actually be built
14574  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5
14575$as_echo_n "checking if libtool supports shared libraries... " >&6; }
14576  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5
14577$as_echo "$can_build_shared" >&6; }
14578
14579  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5
14580$as_echo_n "checking whether to build shared libraries... " >&6; }
14581  test no = "$can_build_shared" && enable_shared=no
14582
14583  # On AIX, shared libraries and static libraries use the same namespace, and
14584  # are all built from PIC.
14585  case $host_os in
14586  aix3*)
14587    test yes = "$enable_shared" && enable_static=no
14588    if test -n "$RANLIB"; then
14589      archive_cmds="$archive_cmds~\$RANLIB \$lib"
14590      postinstall_cmds='$RANLIB $lib'
14591    fi
14592    ;;
14593
14594  aix[4-9]*)
14595    if test ia64 != "$host_cpu"; then
14596      case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in
14597      yes,aix,yes) ;;			# shared object as lib.so file only
14598      yes,svr4,*) ;;			# shared object as lib.so archive member only
14599      yes,*) enable_static=no ;;	# shared object in lib.a archive as well
14600      esac
14601    fi
14602    ;;
14603  esac
14604  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
14605$as_echo "$enable_shared" >&6; }
14606
14607  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5
14608$as_echo_n "checking whether to build static libraries... " >&6; }
14609  # Make sure either enable_shared or enable_static is yes.
14610  test yes = "$enable_shared" || enable_static=yes
14611  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5
14612$as_echo "$enable_static" >&6; }
14613
14614
14615
14616
14617fi
14618ac_ext=c
14619ac_cpp='$CPP $CPPFLAGS'
14620ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
14621ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
14622ac_compiler_gnu=$ac_cv_c_compiler_gnu
14623
14624CC=$lt_save_CC
14625
14626
14627
14628
14629
14630
14631
14632
14633
14634
14635
14636
14637
14638
14639
14640        ac_config_commands="$ac_config_commands libtool"
14641
14642
14643
14644
14645# Only expand once:
14646
14647
14648
14649
14650# pkg-config is only needed for these options, do not require it otherwise
14651if test "$enable_systemd" = "yes" -o "$with_pyunbound" = "yes" -o "$with_pythonmod" = "yes"; then
14652
14653
14654
14655
14656
14657
14658
14659if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
14660	if test -n "$ac_tool_prefix"; then
14661  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
14662set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
14663{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14664$as_echo_n "checking for $ac_word... " >&6; }
14665if ${ac_cv_path_PKG_CONFIG+:} false; then :
14666  $as_echo_n "(cached) " >&6
14667else
14668  case $PKG_CONFIG in
14669  [\\/]* | ?:[\\/]*)
14670  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
14671  ;;
14672  *)
14673  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14674for as_dir in $PATH
14675do
14676  IFS=$as_save_IFS
14677  test -z "$as_dir" && as_dir=.
14678    for ac_exec_ext in '' $ac_executable_extensions; do
14679  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14680    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
14681    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14682    break 2
14683  fi
14684done
14685  done
14686IFS=$as_save_IFS
14687
14688  ;;
14689esac
14690fi
14691PKG_CONFIG=$ac_cv_path_PKG_CONFIG
14692if test -n "$PKG_CONFIG"; then
14693  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
14694$as_echo "$PKG_CONFIG" >&6; }
14695else
14696  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14697$as_echo "no" >&6; }
14698fi
14699
14700
14701fi
14702if test -z "$ac_cv_path_PKG_CONFIG"; then
14703  ac_pt_PKG_CONFIG=$PKG_CONFIG
14704  # Extract the first word of "pkg-config", so it can be a program name with args.
14705set dummy pkg-config; ac_word=$2
14706{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14707$as_echo_n "checking for $ac_word... " >&6; }
14708if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
14709  $as_echo_n "(cached) " >&6
14710else
14711  case $ac_pt_PKG_CONFIG in
14712  [\\/]* | ?:[\\/]*)
14713  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
14714  ;;
14715  *)
14716  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14717for as_dir in $PATH
14718do
14719  IFS=$as_save_IFS
14720  test -z "$as_dir" && as_dir=.
14721    for ac_exec_ext in '' $ac_executable_extensions; do
14722  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14723    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
14724    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14725    break 2
14726  fi
14727done
14728  done
14729IFS=$as_save_IFS
14730
14731  ;;
14732esac
14733fi
14734ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
14735if test -n "$ac_pt_PKG_CONFIG"; then
14736  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
14737$as_echo "$ac_pt_PKG_CONFIG" >&6; }
14738else
14739  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14740$as_echo "no" >&6; }
14741fi
14742
14743  if test "x$ac_pt_PKG_CONFIG" = x; then
14744    PKG_CONFIG=""
14745  else
14746    case $cross_compiling:$ac_tool_warned in
14747yes:)
14748{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
14749$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
14750ac_tool_warned=yes ;;
14751esac
14752    PKG_CONFIG=$ac_pt_PKG_CONFIG
14753  fi
14754else
14755  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
14756fi
14757
14758fi
14759if test -n "$PKG_CONFIG"; then
14760	_pkg_min_version=0.9.0
14761	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
14762$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
14763	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
14764		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14765$as_echo "yes" >&6; }
14766	else
14767		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14768$as_echo "no" >&6; }
14769		PKG_CONFIG=""
14770	fi
14771fi
14772fi
14773
14774# Checks for header files.
14775for ac_header in stdarg.h stdbool.h netinet/in.h netinet/tcp.h sys/param.h sys/select.h sys/socket.h sys/un.h sys/uio.h sys/resource.h arpa/inet.h syslog.h netdb.h sys/wait.h pwd.h glob.h grp.h login_cap.h winsock2.h ws2tcpip.h endian.h sys/endian.h libkern/OSByteOrder.h sys/ipc.h sys/shm.h ifaddrs.h
14776do :
14777  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
14778ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
14779"
14780if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
14781  cat >>confdefs.h <<_ACEOF
14782#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
14783_ACEOF
14784
14785fi
14786
14787done
14788
14789# net/if.h portability for Darwin see:
14790# https://www.gnu.org/software/autoconf/manual/autoconf-2.69/html_node/Header-Portability.html
14791for ac_header in net/if.h
14792do :
14793  ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "
14794#include <stdio.h>
14795#ifdef STDC_HEADERS
14796# include <stdlib.h>
14797# include <stddef.h>
14798#else
14799# ifdef HAVE_STDLIB_H
14800#  include <stdlib.h>
14801# endif
14802#endif
14803#ifdef HAVE_SYS_SOCKET_H
14804# include <sys/socket.h>
14805#endif
14806
14807"
14808if test "x$ac_cv_header_net_if_h" = xyes; then :
14809  cat >>confdefs.h <<_ACEOF
14810#define HAVE_NET_IF_H 1
14811_ACEOF
14812
14813fi
14814
14815done
14816
14817
14818# Check for Apple header. This uncovers TARGET_OS_IPHONE, TARGET_OS_TV or TARGET_OS_WATCH
14819for ac_header in TargetConditionals.h
14820do :
14821  ac_fn_c_check_header_compile "$LINENO" "TargetConditionals.h" "ac_cv_header_TargetConditionals_h" "$ac_includes_default
14822"
14823if test "x$ac_cv_header_TargetConditionals_h" = xyes; then :
14824  cat >>confdefs.h <<_ACEOF
14825#define HAVE_TARGETCONDITIONALS_H 1
14826_ACEOF
14827
14828fi
14829
14830done
14831
14832for ac_header in netioapi.h
14833do :
14834  ac_fn_c_check_header_compile "$LINENO" "netioapi.h" "ac_cv_header_netioapi_h" "$ac_includes_default
14835#if HAVE_SYS_PARAM_H
14836#include <sys/param.h>
14837#endif
14838
14839#ifdef HAVE_SYS_SOCKET_H
14840#include <sys/socket.h>
14841#endif
14842
14843#ifdef HAVE_SYS_UIO_H
14844#include <sys/uio.h>
14845#endif
14846
14847#ifdef HAVE_NETINET_IN_H
14848#include <netinet/in.h>
14849#endif
14850
14851#ifdef HAVE_NETINET_TCP_H
14852#include <netinet/tcp.h>
14853#endif
14854
14855#ifdef HAVE_ARPA_INET_H
14856#include <arpa/inet.h>
14857#endif
14858
14859#ifdef HAVE_WINSOCK2_H
14860#include <winsock2.h>
14861#endif
14862
14863#ifdef HAVE_WS2TCPIP_H
14864#include <ws2tcpip.h>
14865#endif
14866
14867"
14868if test "x$ac_cv_header_netioapi_h" = xyes; then :
14869  cat >>confdefs.h <<_ACEOF
14870#define HAVE_NETIOAPI_H 1
14871_ACEOF
14872
14873fi
14874
14875done
14876
14877
14878# check for types.
14879# Using own tests for int64* because autoconf builtin only give 32bit.
14880ac_fn_c_check_type "$LINENO" "int8_t" "ac_cv_type_int8_t" "$ac_includes_default"
14881if test "x$ac_cv_type_int8_t" = xyes; then :
14882
14883else
14884
14885cat >>confdefs.h <<_ACEOF
14886#define int8_t signed char
14887_ACEOF
14888
14889fi
14890
14891ac_fn_c_check_type "$LINENO" "int16_t" "ac_cv_type_int16_t" "$ac_includes_default"
14892if test "x$ac_cv_type_int16_t" = xyes; then :
14893
14894else
14895
14896cat >>confdefs.h <<_ACEOF
14897#define int16_t short
14898_ACEOF
14899
14900fi
14901
14902ac_fn_c_check_type "$LINENO" "int32_t" "ac_cv_type_int32_t" "$ac_includes_default"
14903if test "x$ac_cv_type_int32_t" = xyes; then :
14904
14905else
14906
14907cat >>confdefs.h <<_ACEOF
14908#define int32_t int
14909_ACEOF
14910
14911fi
14912
14913ac_fn_c_check_type "$LINENO" "int64_t" "ac_cv_type_int64_t" "$ac_includes_default"
14914if test "x$ac_cv_type_int64_t" = xyes; then :
14915
14916else
14917
14918cat >>confdefs.h <<_ACEOF
14919#define int64_t long long
14920_ACEOF
14921
14922fi
14923
14924ac_fn_c_check_type "$LINENO" "uint8_t" "ac_cv_type_uint8_t" "$ac_includes_default"
14925if test "x$ac_cv_type_uint8_t" = xyes; then :
14926
14927else
14928
14929cat >>confdefs.h <<_ACEOF
14930#define uint8_t unsigned char
14931_ACEOF
14932
14933fi
14934
14935ac_fn_c_check_type "$LINENO" "uint16_t" "ac_cv_type_uint16_t" "$ac_includes_default"
14936if test "x$ac_cv_type_uint16_t" = xyes; then :
14937
14938else
14939
14940cat >>confdefs.h <<_ACEOF
14941#define uint16_t unsigned short
14942_ACEOF
14943
14944fi
14945
14946ac_fn_c_check_type "$LINENO" "uint32_t" "ac_cv_type_uint32_t" "$ac_includes_default"
14947if test "x$ac_cv_type_uint32_t" = xyes; then :
14948
14949else
14950
14951cat >>confdefs.h <<_ACEOF
14952#define uint32_t unsigned int
14953_ACEOF
14954
14955fi
14956
14957ac_fn_c_check_type "$LINENO" "uint64_t" "ac_cv_type_uint64_t" "$ac_includes_default"
14958if test "x$ac_cv_type_uint64_t" = xyes; then :
14959
14960else
14961
14962cat >>confdefs.h <<_ACEOF
14963#define uint64_t unsigned long long
14964_ACEOF
14965
14966fi
14967
14968ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
14969if test "x$ac_cv_type_size_t" = xyes; then :
14970
14971else
14972
14973cat >>confdefs.h <<_ACEOF
14974#define size_t unsigned int
14975_ACEOF
14976
14977fi
14978
14979ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
14980if test "x$ac_cv_type_ssize_t" = xyes; then :
14981
14982else
14983
14984cat >>confdefs.h <<_ACEOF
14985#define ssize_t int
14986_ACEOF
14987
14988fi
14989
14990{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
14991$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
14992if ${ac_cv_type_uid_t+:} false; then :
14993  $as_echo_n "(cached) " >&6
14994else
14995  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14996/* end confdefs.h.  */
14997#include <sys/types.h>
14998
14999_ACEOF
15000if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15001  $EGREP "uid_t" >/dev/null 2>&1; then :
15002  ac_cv_type_uid_t=yes
15003else
15004  ac_cv_type_uid_t=no
15005fi
15006rm -f conftest*
15007
15008fi
15009{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
15010$as_echo "$ac_cv_type_uid_t" >&6; }
15011if test $ac_cv_type_uid_t = no; then
15012
15013$as_echo "#define uid_t int" >>confdefs.h
15014
15015
15016$as_echo "#define gid_t int" >>confdefs.h
15017
15018fi
15019
15020ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
15021if test "x$ac_cv_type_pid_t" = xyes; then :
15022
15023else
15024
15025cat >>confdefs.h <<_ACEOF
15026#define pid_t int
15027_ACEOF
15028
15029fi
15030
15031ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
15032if test "x$ac_cv_type_off_t" = xyes; then :
15033
15034else
15035
15036cat >>confdefs.h <<_ACEOF
15037#define off_t long int
15038_ACEOF
15039
15040fi
15041
15042ac_fn_c_check_type "$LINENO" "u_char" "ac_cv_type_u_char" "
15043$ac_includes_default
15044#ifdef HAVE_WINSOCK2_H
15045#  include <winsock2.h>
15046#endif
15047
15048"
15049if test "x$ac_cv_type_u_char" = xyes; then :
15050
15051else
15052
15053$as_echo "#define u_char unsigned char" >>confdefs.h
15054
15055fi
15056
15057ac_fn_c_check_type "$LINENO" "rlim_t" "ac_cv_type_rlim_t" "
15058$ac_includes_default
15059#ifdef HAVE_SYS_RESOURCE_H
15060#  include <sys/resource.h>
15061#endif
15062
15063"
15064if test "x$ac_cv_type_rlim_t" = xyes; then :
15065
15066else
15067
15068$as_echo "#define rlim_t unsigned long" >>confdefs.h
15069
15070fi
15071
15072
15073ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
15074$ac_includes_default
15075#ifdef HAVE_SYS_SOCKET_H
15076#  include <sys/socket.h>
15077#endif
15078#ifdef HAVE_WS2TCPIP_H
15079#  include <ws2tcpip.h>
15080#endif
15081
15082"
15083if test "x$ac_cv_type_socklen_t" = xyes; then :
15084
15085else
15086
15087$as_echo "#define socklen_t int" >>confdefs.h
15088
15089fi
15090
15091 ac_fn_c_check_type "$LINENO" "in_addr_t" "ac_cv_type_in_addr_t" "
15092$ac_includes_default
15093#ifdef HAVE_SYS_TYPES_H
15094# include <sys/types.h>
15095#endif
15096#ifdef HAVE_NETINET_IN_H
15097# include <netinet/in.h>
15098#endif
15099
15100"
15101if test "x$ac_cv_type_in_addr_t" = xyes; then :
15102
15103else
15104
15105$as_echo "#define in_addr_t uint32_t" >>confdefs.h
15106
15107fi
15108
15109 ac_fn_c_check_type "$LINENO" "in_port_t" "ac_cv_type_in_port_t" "
15110$ac_includes_default
15111#ifdef HAVE_SYS_TYPES_H
15112# include <sys/types.h>
15113#endif
15114#ifdef HAVE_NETINET_IN_H
15115# include <netinet/in.h>
15116#endif
15117
15118"
15119if test "x$ac_cv_type_in_port_t" = xyes; then :
15120
15121else
15122
15123$as_echo "#define in_port_t uint16_t" >>confdefs.h
15124
15125fi
15126
15127{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if memcmp compares unsigned" >&5
15128$as_echo_n "checking if memcmp compares unsigned... " >&6; }
15129if test "$cross_compiling" = yes; then :
15130   { $as_echo "$as_me:${as_lineno-$LINENO}: result: cross-compile no" >&5
15131$as_echo "cross-compile no" >&6; }
15132
15133$as_echo "#define MEMCMP_IS_BROKEN 1" >>confdefs.h
15134
15135  case " $LIBOBJS " in
15136  *" memcmp.$ac_objext "* ) ;;
15137  *) LIBOBJS="$LIBOBJS memcmp.$ac_objext"
15138 ;;
15139esac
15140
15141
15142else
15143  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15144/* end confdefs.h.  */
15145
15146#include <stdio.h>
15147#include <stdlib.h>
15148#include <string.h>
15149int main(void)
15150{
15151	char a = 255, b = 0;
15152	if(memcmp(&a, &b, 1) < 0)
15153		return 1;
15154	return 0;
15155}
15156
15157_ACEOF
15158if ac_fn_c_try_run "$LINENO"; then :
15159  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15160$as_echo "yes" >&6; }
15161else
15162   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15163$as_echo "no" >&6; }
15164
15165$as_echo "#define MEMCMP_IS_BROKEN 1" >>confdefs.h
15166
15167  case " $LIBOBJS " in
15168  *" memcmp.$ac_objext "* ) ;;
15169  *) LIBOBJS="$LIBOBJS memcmp.$ac_objext"
15170 ;;
15171esac
15172
15173
15174fi
15175rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15176  conftest.$ac_objext conftest.beam conftest.$ac_ext
15177fi
15178
15179
15180# The cast to long int works around a bug in the HP C Compiler
15181# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
15182# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
15183# This bug is HP SR number 8606223364.
15184{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
15185$as_echo_n "checking size of time_t... " >&6; }
15186if ${ac_cv_sizeof_time_t+:} false; then :
15187  $as_echo_n "(cached) " >&6
15188else
15189  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t"        "
15190$ac_includes_default
15191#ifdef TIME_WITH_SYS_TIME
15192# include <sys/time.h>
15193# include <time.h>
15194#else
15195# ifdef HAVE_SYS_TIME_H
15196#  include <sys/time.h>
15197# else
15198#  include <time.h>
15199# endif
15200#endif
15201
15202"; then :
15203
15204else
15205  if test "$ac_cv_type_time_t" = yes; then
15206     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
15207$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
15208as_fn_error 77 "cannot compute sizeof (time_t)
15209See \`config.log' for more details" "$LINENO" 5; }
15210   else
15211     ac_cv_sizeof_time_t=0
15212   fi
15213fi
15214
15215fi
15216{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
15217$as_echo "$ac_cv_sizeof_time_t" >&6; }
15218
15219
15220
15221cat >>confdefs.h <<_ACEOF
15222#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
15223_ACEOF
15224
15225
15226# The cast to long int works around a bug in the HP C Compiler
15227# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
15228# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
15229# This bug is HP SR number 8606223364.
15230{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
15231$as_echo_n "checking size of size_t... " >&6; }
15232if ${ac_cv_sizeof_size_t+:} false; then :
15233  $as_echo_n "(cached) " >&6
15234else
15235  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (size_t))" "ac_cv_sizeof_size_t"        "$ac_includes_default"; then :
15236
15237else
15238  if test "$ac_cv_type_size_t" = yes; then
15239     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
15240$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
15241as_fn_error 77 "cannot compute sizeof (size_t)
15242See \`config.log' for more details" "$LINENO" 5; }
15243   else
15244     ac_cv_sizeof_size_t=0
15245   fi
15246fi
15247
15248fi
15249{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
15250$as_echo "$ac_cv_sizeof_size_t" >&6; }
15251
15252
15253
15254cat >>confdefs.h <<_ACEOF
15255#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
15256_ACEOF
15257
15258
15259
15260# add option to disable the evil rpath
15261
15262# Check whether --enable-rpath was given.
15263if test "${enable_rpath+set}" = set; then :
15264  enableval=$enable_rpath; enable_rpath=$enableval
15265else
15266  enable_rpath=yes
15267fi
15268
15269if test "x$enable_rpath" = xno; then
15270		ac_config_commands="$ac_config_commands disable-rpath"
15271
15272fi
15273
15274
15275
15276# check to see if libraries are needed for these functions.
15277{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing inet_pton" >&5
15278$as_echo_n "checking for library containing inet_pton... " >&6; }
15279if ${ac_cv_search_inet_pton+:} false; then :
15280  $as_echo_n "(cached) " >&6
15281else
15282  ac_func_search_save_LIBS=$LIBS
15283cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15284/* end confdefs.h.  */
15285
15286/* Override any GCC internal prototype to avoid an error.
15287   Use char because int might match the return type of a GCC
15288   builtin and then its argument prototype would still apply.  */
15289#ifdef __cplusplus
15290extern "C"
15291#endif
15292char inet_pton ();
15293int
15294main ()
15295{
15296return inet_pton ();
15297  ;
15298  return 0;
15299}
15300_ACEOF
15301for ac_lib in '' nsl; do
15302  if test -z "$ac_lib"; then
15303    ac_res="none required"
15304  else
15305    ac_res=-l$ac_lib
15306    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
15307  fi
15308  if ac_fn_c_try_link "$LINENO"; then :
15309  ac_cv_search_inet_pton=$ac_res
15310fi
15311rm -f core conftest.err conftest.$ac_objext \
15312    conftest$ac_exeext
15313  if ${ac_cv_search_inet_pton+:} false; then :
15314  break
15315fi
15316done
15317if ${ac_cv_search_inet_pton+:} false; then :
15318
15319else
15320  ac_cv_search_inet_pton=no
15321fi
15322rm conftest.$ac_ext
15323LIBS=$ac_func_search_save_LIBS
15324fi
15325{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_inet_pton" >&5
15326$as_echo "$ac_cv_search_inet_pton" >&6; }
15327ac_res=$ac_cv_search_inet_pton
15328if test "$ac_res" != no; then :
15329  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
15330
15331fi
15332
15333{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing socket" >&5
15334$as_echo_n "checking for library containing socket... " >&6; }
15335if ${ac_cv_search_socket+:} false; then :
15336  $as_echo_n "(cached) " >&6
15337else
15338  ac_func_search_save_LIBS=$LIBS
15339cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15340/* end confdefs.h.  */
15341
15342/* Override any GCC internal prototype to avoid an error.
15343   Use char because int might match the return type of a GCC
15344   builtin and then its argument prototype would still apply.  */
15345#ifdef __cplusplus
15346extern "C"
15347#endif
15348char socket ();
15349int
15350main ()
15351{
15352return socket ();
15353  ;
15354  return 0;
15355}
15356_ACEOF
15357for ac_lib in '' socket; do
15358  if test -z "$ac_lib"; then
15359    ac_res="none required"
15360  else
15361    ac_res=-l$ac_lib
15362    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
15363  fi
15364  if ac_fn_c_try_link "$LINENO"; then :
15365  ac_cv_search_socket=$ac_res
15366fi
15367rm -f core conftest.err conftest.$ac_objext \
15368    conftest$ac_exeext
15369  if ${ac_cv_search_socket+:} false; then :
15370  break
15371fi
15372done
15373if ${ac_cv_search_socket+:} false; then :
15374
15375else
15376  ac_cv_search_socket=no
15377fi
15378rm conftest.$ac_ext
15379LIBS=$ac_func_search_save_LIBS
15380fi
15381{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socket" >&5
15382$as_echo "$ac_cv_search_socket" >&6; }
15383ac_res=$ac_cv_search_socket
15384if test "$ac_res" != no; then :
15385  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
15386
15387fi
15388
15389
15390# check whether strptime also works
15391
15392# check some functions of the OS before linking libs (while still runnable).
15393for ac_header in unistd.h
15394do :
15395  ac_fn_c_check_header_mongrel "$LINENO" "unistd.h" "ac_cv_header_unistd_h" "$ac_includes_default"
15396if test "x$ac_cv_header_unistd_h" = xyes; then :
15397  cat >>confdefs.h <<_ACEOF
15398#define HAVE_UNISTD_H 1
15399_ACEOF
15400
15401fi
15402
15403done
15404
15405{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working chown" >&5
15406$as_echo_n "checking for working chown... " >&6; }
15407if ${ac_cv_func_chown_works+:} false; then :
15408  $as_echo_n "(cached) " >&6
15409else
15410  if test "$cross_compiling" = yes; then :
15411  ac_cv_func_chown_works=no
15412else
15413  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15414/* end confdefs.h.  */
15415$ac_includes_default
15416#include <fcntl.h>
15417
15418int
15419main ()
15420{
15421  char *f = "conftest.chown";
15422  struct stat before, after;
15423
15424  if (creat (f, 0600) < 0)
15425    return 1;
15426  if (stat (f, &before) < 0)
15427    return 1;
15428  if (chown (f, (uid_t) -1, (gid_t) -1) == -1)
15429    return 1;
15430  if (stat (f, &after) < 0)
15431    return 1;
15432  return ! (before.st_uid == after.st_uid && before.st_gid == after.st_gid);
15433
15434  ;
15435  return 0;
15436}
15437_ACEOF
15438if ac_fn_c_try_run "$LINENO"; then :
15439  ac_cv_func_chown_works=yes
15440else
15441  ac_cv_func_chown_works=no
15442fi
15443rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15444  conftest.$ac_objext conftest.beam conftest.$ac_ext
15445fi
15446
15447rm -f conftest.chown
15448
15449fi
15450{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_chown_works" >&5
15451$as_echo "$ac_cv_func_chown_works" >&6; }
15452if test $ac_cv_func_chown_works = yes; then
15453
15454$as_echo "#define HAVE_CHOWN 1" >>confdefs.h
15455
15456fi
15457
15458for ac_header in vfork.h
15459do :
15460  ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default"
15461if test "x$ac_cv_header_vfork_h" = xyes; then :
15462  cat >>confdefs.h <<_ACEOF
15463#define HAVE_VFORK_H 1
15464_ACEOF
15465
15466fi
15467
15468done
15469
15470for ac_func in fork vfork
15471do :
15472  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
15473ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
15474if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
15475  cat >>confdefs.h <<_ACEOF
15476#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
15477_ACEOF
15478
15479fi
15480done
15481
15482if test "x$ac_cv_func_fork" = xyes; then
15483  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5
15484$as_echo_n "checking for working fork... " >&6; }
15485if ${ac_cv_func_fork_works+:} false; then :
15486  $as_echo_n "(cached) " >&6
15487else
15488  if test "$cross_compiling" = yes; then :
15489  ac_cv_func_fork_works=cross
15490else
15491  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15492/* end confdefs.h.  */
15493$ac_includes_default
15494int
15495main ()
15496{
15497
15498	  /* By Ruediger Kuhlmann. */
15499	  return fork () < 0;
15500
15501  ;
15502  return 0;
15503}
15504_ACEOF
15505if ac_fn_c_try_run "$LINENO"; then :
15506  ac_cv_func_fork_works=yes
15507else
15508  ac_cv_func_fork_works=no
15509fi
15510rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15511  conftest.$ac_objext conftest.beam conftest.$ac_ext
15512fi
15513
15514fi
15515{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5
15516$as_echo "$ac_cv_func_fork_works" >&6; }
15517
15518else
15519  ac_cv_func_fork_works=$ac_cv_func_fork
15520fi
15521if test "x$ac_cv_func_fork_works" = xcross; then
15522  case $host in
15523    *-*-amigaos* | *-*-msdosdjgpp*)
15524      # Override, as these systems have only a dummy fork() stub
15525      ac_cv_func_fork_works=no
15526      ;;
15527    *)
15528      ac_cv_func_fork_works=yes
15529      ;;
15530  esac
15531  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
15532$as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
15533fi
15534ac_cv_func_vfork_works=$ac_cv_func_vfork
15535if test "x$ac_cv_func_vfork" = xyes; then
15536  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5
15537$as_echo_n "checking for working vfork... " >&6; }
15538if ${ac_cv_func_vfork_works+:} false; then :
15539  $as_echo_n "(cached) " >&6
15540else
15541  if test "$cross_compiling" = yes; then :
15542  ac_cv_func_vfork_works=cross
15543else
15544  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15545/* end confdefs.h.  */
15546/* Thanks to Paul Eggert for this test.  */
15547$ac_includes_default
15548#include <sys/wait.h>
15549#ifdef HAVE_VFORK_H
15550# include <vfork.h>
15551#endif
15552/* On some sparc systems, changes by the child to local and incoming
15553   argument registers are propagated back to the parent.  The compiler
15554   is told about this with #include <vfork.h>, but some compilers
15555   (e.g. gcc -O) don't grok <vfork.h>.  Test for this by using a
15556   static variable whose address is put into a register that is
15557   clobbered by the vfork.  */
15558static void
15559#ifdef __cplusplus
15560sparc_address_test (int arg)
15561# else
15562sparc_address_test (arg) int arg;
15563#endif
15564{
15565  static pid_t child;
15566  if (!child) {
15567    child = vfork ();
15568    if (child < 0) {
15569      perror ("vfork");
15570      _exit(2);
15571    }
15572    if (!child) {
15573      arg = getpid();
15574      write(-1, "", 0);
15575      _exit (arg);
15576    }
15577  }
15578}
15579
15580int
15581main ()
15582{
15583  pid_t parent = getpid ();
15584  pid_t child;
15585
15586  sparc_address_test (0);
15587
15588  child = vfork ();
15589
15590  if (child == 0) {
15591    /* Here is another test for sparc vfork register problems.  This
15592       test uses lots of local variables, at least as many local
15593       variables as main has allocated so far including compiler
15594       temporaries.  4 locals are enough for gcc 1.40.3 on a Solaris
15595       4.1.3 sparc, but we use 8 to be safe.  A buggy compiler should
15596       reuse the register of parent for one of the local variables,
15597       since it will think that parent can't possibly be used any more
15598       in this routine.  Assigning to the local variable will thus
15599       munge parent in the parent process.  */
15600    pid_t
15601      p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
15602      p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
15603    /* Convince the compiler that p..p7 are live; otherwise, it might
15604       use the same hardware register for all 8 local variables.  */
15605    if (p != p1 || p != p2 || p != p3 || p != p4
15606	|| p != p5 || p != p6 || p != p7)
15607      _exit(1);
15608
15609    /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
15610       from child file descriptors.  If the child closes a descriptor
15611       before it execs or exits, this munges the parent's descriptor
15612       as well.  Test for this by closing stdout in the child.  */
15613    _exit(close(fileno(stdout)) != 0);
15614  } else {
15615    int status;
15616    struct stat st;
15617
15618    while (wait(&status) != child)
15619      ;
15620    return (
15621	 /* Was there some problem with vforking?  */
15622	 child < 0
15623
15624	 /* Did the child fail?  (This shouldn't happen.)  */
15625	 || status
15626
15627	 /* Did the vfork/compiler bug occur?  */
15628	 || parent != getpid()
15629
15630	 /* Did the file descriptor bug occur?  */
15631	 || fstat(fileno(stdout), &st) != 0
15632	 );
15633  }
15634}
15635_ACEOF
15636if ac_fn_c_try_run "$LINENO"; then :
15637  ac_cv_func_vfork_works=yes
15638else
15639  ac_cv_func_vfork_works=no
15640fi
15641rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15642  conftest.$ac_objext conftest.beam conftest.$ac_ext
15643fi
15644
15645fi
15646{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5
15647$as_echo "$ac_cv_func_vfork_works" >&6; }
15648
15649fi;
15650if test "x$ac_cv_func_fork_works" = xcross; then
15651  ac_cv_func_vfork_works=$ac_cv_func_vfork
15652  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
15653$as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
15654fi
15655
15656if test "x$ac_cv_func_vfork_works" = xyes; then
15657
15658$as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h
15659
15660else
15661
15662$as_echo "#define vfork fork" >>confdefs.h
15663
15664fi
15665if test "x$ac_cv_func_fork_works" = xyes; then
15666
15667$as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h
15668
15669fi
15670
15671
15672$as_echo "#define RETSIGTYPE void" >>confdefs.h
15673
15674{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGEFILE_SOURCE value needed for large files" >&5
15675$as_echo_n "checking for _LARGEFILE_SOURCE value needed for large files... " >&6; }
15676if ${ac_cv_sys_largefile_source+:} false; then :
15677  $as_echo_n "(cached) " >&6
15678else
15679  while :; do
15680  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15681/* end confdefs.h.  */
15682#include <sys/types.h> /* for off_t */
15683     #include <stdio.h>
15684int
15685main ()
15686{
15687int (*fp) (FILE *, off_t, int) = fseeko;
15688     return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
15689  ;
15690  return 0;
15691}
15692_ACEOF
15693if ac_fn_c_try_link "$LINENO"; then :
15694  ac_cv_sys_largefile_source=no; break
15695fi
15696rm -f core conftest.err conftest.$ac_objext \
15697    conftest$ac_exeext conftest.$ac_ext
15698  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15699/* end confdefs.h.  */
15700#define _LARGEFILE_SOURCE 1
15701#include <sys/types.h> /* for off_t */
15702     #include <stdio.h>
15703int
15704main ()
15705{
15706int (*fp) (FILE *, off_t, int) = fseeko;
15707     return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
15708  ;
15709  return 0;
15710}
15711_ACEOF
15712if ac_fn_c_try_link "$LINENO"; then :
15713  ac_cv_sys_largefile_source=1; break
15714fi
15715rm -f core conftest.err conftest.$ac_objext \
15716    conftest$ac_exeext conftest.$ac_ext
15717  ac_cv_sys_largefile_source=unknown
15718  break
15719done
15720fi
15721{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_source" >&5
15722$as_echo "$ac_cv_sys_largefile_source" >&6; }
15723case $ac_cv_sys_largefile_source in #(
15724  no | unknown) ;;
15725  *)
15726cat >>confdefs.h <<_ACEOF
15727#define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
15728_ACEOF
15729;;
15730esac
15731rm -rf conftest*
15732
15733# We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
15734# in glibc 2.1.3, but that breaks too many other things.
15735# If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
15736if test $ac_cv_sys_largefile_source != unknown; then
15737
15738$as_echo "#define HAVE_FSEEKO 1" >>confdefs.h
15739
15740fi
15741
15742
15743# Check whether --enable-largefile was given.
15744if test "${enable_largefile+set}" = set; then :
15745  enableval=$enable_largefile;
15746fi
15747
15748if test "$enable_largefile" != no; then
15749
15750  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
15751$as_echo_n "checking for special C compiler options needed for large files... " >&6; }
15752if ${ac_cv_sys_largefile_CC+:} false; then :
15753  $as_echo_n "(cached) " >&6
15754else
15755  ac_cv_sys_largefile_CC=no
15756     if test "$GCC" != yes; then
15757       ac_save_CC=$CC
15758       while :; do
15759	 # IRIX 6.2 and later do not support large files by default,
15760	 # so use the C compiler's -n32 option if that helps.
15761	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15762/* end confdefs.h.  */
15763#include <sys/types.h>
15764 /* Check that off_t can represent 2**63 - 1 correctly.
15765    We can't simply define LARGE_OFF_T to be 9223372036854775807,
15766    since some C++ compilers masquerading as C compilers
15767    incorrectly reject 9223372036854775807.  */
15768#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
15769  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
15770		       && LARGE_OFF_T % 2147483647 == 1)
15771		      ? 1 : -1];
15772int
15773main ()
15774{
15775
15776  ;
15777  return 0;
15778}
15779_ACEOF
15780	 if ac_fn_c_try_compile "$LINENO"; then :
15781  break
15782fi
15783rm -f core conftest.err conftest.$ac_objext
15784	 CC="$CC -n32"
15785	 if ac_fn_c_try_compile "$LINENO"; then :
15786  ac_cv_sys_largefile_CC=' -n32'; break
15787fi
15788rm -f core conftest.err conftest.$ac_objext
15789	 break
15790       done
15791       CC=$ac_save_CC
15792       rm -f conftest.$ac_ext
15793    fi
15794fi
15795{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
15796$as_echo "$ac_cv_sys_largefile_CC" >&6; }
15797  if test "$ac_cv_sys_largefile_CC" != no; then
15798    CC=$CC$ac_cv_sys_largefile_CC
15799  fi
15800
15801  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
15802$as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
15803if ${ac_cv_sys_file_offset_bits+:} false; then :
15804  $as_echo_n "(cached) " >&6
15805else
15806  while :; do
15807  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15808/* end confdefs.h.  */
15809#include <sys/types.h>
15810 /* Check that off_t can represent 2**63 - 1 correctly.
15811    We can't simply define LARGE_OFF_T to be 9223372036854775807,
15812    since some C++ compilers masquerading as C compilers
15813    incorrectly reject 9223372036854775807.  */
15814#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
15815  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
15816		       && LARGE_OFF_T % 2147483647 == 1)
15817		      ? 1 : -1];
15818int
15819main ()
15820{
15821
15822  ;
15823  return 0;
15824}
15825_ACEOF
15826if ac_fn_c_try_compile "$LINENO"; then :
15827  ac_cv_sys_file_offset_bits=no; break
15828fi
15829rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15830  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15831/* end confdefs.h.  */
15832#define _FILE_OFFSET_BITS 64
15833#include <sys/types.h>
15834 /* Check that off_t can represent 2**63 - 1 correctly.
15835    We can't simply define LARGE_OFF_T to be 9223372036854775807,
15836    since some C++ compilers masquerading as C compilers
15837    incorrectly reject 9223372036854775807.  */
15838#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
15839  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
15840		       && LARGE_OFF_T % 2147483647 == 1)
15841		      ? 1 : -1];
15842int
15843main ()
15844{
15845
15846  ;
15847  return 0;
15848}
15849_ACEOF
15850if ac_fn_c_try_compile "$LINENO"; then :
15851  ac_cv_sys_file_offset_bits=64; break
15852fi
15853rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15854  ac_cv_sys_file_offset_bits=unknown
15855  break
15856done
15857fi
15858{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
15859$as_echo "$ac_cv_sys_file_offset_bits" >&6; }
15860case $ac_cv_sys_file_offset_bits in #(
15861  no | unknown) ;;
15862  *)
15863cat >>confdefs.h <<_ACEOF
15864#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
15865_ACEOF
15866;;
15867esac
15868rm -rf conftest*
15869  if test $ac_cv_sys_file_offset_bits = unknown; then
15870    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
15871$as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
15872if ${ac_cv_sys_large_files+:} false; then :
15873  $as_echo_n "(cached) " >&6
15874else
15875  while :; do
15876  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15877/* end confdefs.h.  */
15878#include <sys/types.h>
15879 /* Check that off_t can represent 2**63 - 1 correctly.
15880    We can't simply define LARGE_OFF_T to be 9223372036854775807,
15881    since some C++ compilers masquerading as C compilers
15882    incorrectly reject 9223372036854775807.  */
15883#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
15884  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
15885		       && LARGE_OFF_T % 2147483647 == 1)
15886		      ? 1 : -1];
15887int
15888main ()
15889{
15890
15891  ;
15892  return 0;
15893}
15894_ACEOF
15895if ac_fn_c_try_compile "$LINENO"; then :
15896  ac_cv_sys_large_files=no; break
15897fi
15898rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15899  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15900/* end confdefs.h.  */
15901#define _LARGE_FILES 1
15902#include <sys/types.h>
15903 /* Check that off_t can represent 2**63 - 1 correctly.
15904    We can't simply define LARGE_OFF_T to be 9223372036854775807,
15905    since some C++ compilers masquerading as C compilers
15906    incorrectly reject 9223372036854775807.  */
15907#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
15908  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
15909		       && LARGE_OFF_T % 2147483647 == 1)
15910		      ? 1 : -1];
15911int
15912main ()
15913{
15914
15915  ;
15916  return 0;
15917}
15918_ACEOF
15919if ac_fn_c_try_compile "$LINENO"; then :
15920  ac_cv_sys_large_files=1; break
15921fi
15922rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15923  ac_cv_sys_large_files=unknown
15924  break
15925done
15926fi
15927{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
15928$as_echo "$ac_cv_sys_large_files" >&6; }
15929case $ac_cv_sys_large_files in #(
15930  no | unknown) ;;
15931  *)
15932cat >>confdefs.h <<_ACEOF
15933#define _LARGE_FILES $ac_cv_sys_large_files
15934_ACEOF
15935;;
15936esac
15937rm -rf conftest*
15938  fi
15939
15940
15941fi
15942
15943
15944
15945
15946{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we need -D_LARGEFILE_SOURCE=1 as a flag for $CC" >&5
15947$as_echo_n "checking whether we need -D_LARGEFILE_SOURCE=1 as a flag for $CC... " >&6; }
15948cache=_D_LARGEFILE_SOURCE_1
15949if eval \${cv_prog_cc_flag_needed_$cache+:} false; then :
15950  $as_echo_n "(cached) " >&6
15951else
15952
15953echo '
15954#include <stdio.h>
15955int test() {
15956        int a = fseeko(stdin, 0, 0);
15957        return a;
15958}
15959' > conftest.c
15960echo 'void f(){}' >>conftest.c
15961if test -z "`$CC $CPPFLAGS $CFLAGS $ERRFLAG -c conftest.c 2>&1`"; then
15962eval "cv_prog_cc_flag_needed_$cache=no"
15963else
15964
15965if test -z "`$CC $CPPFLAGS $CFLAGS -D_LARGEFILE_SOURCE=1 $ERRFLAG -c conftest.c 2>&1`"; then
15966eval "cv_prog_cc_flag_needed_$cache=yes"
15967else
15968eval "cv_prog_cc_flag_needed_$cache=fail"
15969#echo 'Test with flag fails too!'
15970#cat conftest.c
15971#echo "$CC $CPPFLAGS $CFLAGS -D_LARGEFILE_SOURCE=1 $ERRFLAG -c conftest.c 2>&1"
15972#echo `$CC $CPPFLAGS $CFLAGS -D_LARGEFILE_SOURCE=1 $ERRFLAG -c conftest.c 2>&1`
15973#exit 1
15974fi
15975
15976fi
15977rm -f conftest conftest.c conftest.o
15978
15979fi
15980
15981if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = yes"; then
15982{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15983$as_echo "yes" >&6; }
15984:
15985CFLAGS="$CFLAGS -D_LARGEFILE_SOURCE=1"
15986else
15987if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = no"; then
15988{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15989$as_echo "no" >&6; }
15990#echo 'Test with flag is no!'
15991#cat conftest.c
15992#echo "$CC $CPPFLAGS $CFLAGS -D_LARGEFILE_SOURCE=1 $ERRFLAG -c conftest.c 2>&1"
15993#echo `$CC $CPPFLAGS $CFLAGS -D_LARGEFILE_SOURCE=1 $ERRFLAG -c conftest.c 2>&1`
15994#exit 1
15995:
15996
15997else
15998{ $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
15999$as_echo "failed" >&6; }
16000:
16001
16002fi
16003fi
16004
16005
16006
16007{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if nonblocking sockets work" >&5
16008$as_echo_n "checking if nonblocking sockets work... " >&6; }
16009if echo $host | grep mingw >/dev/null; then
16010	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no (windows)" >&5
16011$as_echo "no (windows)" >&6; }
16012
16013$as_echo "#define NONBLOCKING_IS_BROKEN 1" >>confdefs.h
16014
16015else
16016if test "$cross_compiling" = yes; then :
16017
16018	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: crosscompile(yes)" >&5
16019$as_echo "crosscompile(yes)" >&6; }
16020
16021else
16022  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16023/* end confdefs.h.  */
16024
16025
16026#include <stdio.h>
16027#include <string.h>
16028#include <stdlib.h>
16029#include <fcntl.h>
16030#include <errno.h>
16031#ifdef HAVE_SYS_TYPES_H
16032#include <sys/types.h>
16033#endif
16034#ifdef HAVE_SYS_SOCKET_H
16035#include <sys/socket.h>
16036#endif
16037#ifdef HAVE_NETINET_IN_H
16038#include <netinet/in.h>
16039#endif
16040#ifdef HAVE_ARPA_INET_H
16041#include <arpa/inet.h>
16042#endif
16043#ifdef HAVE_UNISTD_H
16044#include <unistd.h>
16045#endif
16046#ifdef HAVE_TIME_H
16047#include <time.h>
16048#endif
16049
16050int main(void)
16051{
16052	int port;
16053	int sfd, cfd;
16054	int num = 10;
16055	int i, p;
16056	struct sockaddr_in a;
16057	/* test if select and nonblocking reads work well together */
16058	/* open port.
16059	   fork child to send 10 messages.
16060	   select to read.
16061	   then try to nonblocking read the 10 messages
16062	   then, nonblocking read must give EAGAIN
16063	*/
16064
16065	port = 12345 + (time(0)%32);
16066	sfd = socket(PF_INET, SOCK_DGRAM, 0);
16067	if(sfd == -1) {
16068		perror("socket");
16069		return 1;
16070	}
16071	memset(&a, 0, sizeof(a));
16072	a.sin_family = AF_INET;
16073	a.sin_port = htons(port);
16074	a.sin_addr.s_addr = inet_addr("127.0.0.1");
16075	if(bind(sfd, (struct sockaddr*)&a, sizeof(a)) < 0) {
16076		perror("bind");
16077		return 1;
16078	}
16079	if(fcntl(sfd, F_SETFL, O_NONBLOCK) == -1) {
16080		perror("fcntl");
16081		return 1;
16082	}
16083
16084	cfd = socket(PF_INET, SOCK_DGRAM, 0);
16085	if(cfd == -1) {
16086		perror("client socket");
16087		return 1;
16088	}
16089	a.sin_port = 0;
16090	if(bind(cfd, (struct sockaddr*)&a, sizeof(a)) < 0) {
16091		perror("client bind");
16092		return 1;
16093	}
16094	a.sin_port = htons(port);
16095
16096	/* no handler, causes exit in 10 seconds */
16097	alarm(10);
16098
16099	/* send and receive on the socket */
16100	if((p=fork()) == 0) {
16101		for(i=0; i<num; i++) {
16102			if(sendto(cfd, &i, sizeof(i), 0,
16103				(struct sockaddr*)&a, sizeof(a)) < 0) {
16104				perror("sendto");
16105				return 1;
16106			}
16107		}
16108	} else {
16109		/* parent */
16110		fd_set rset;
16111		int x;
16112		if(p == -1) {
16113			perror("fork");
16114			return 1;
16115		}
16116		FD_ZERO(&rset);
16117		FD_SET(sfd, &rset);
16118		if(select(sfd+1, &rset, NULL, NULL, NULL) < 1) {
16119			perror("select");
16120			return 1;
16121		}
16122		i = 0;
16123		while(i < num) {
16124			if(recv(sfd, &x, sizeof(x), 0) != sizeof(x)) {
16125				if(errno == EAGAIN)
16126					continue;
16127				perror("recv");
16128				return 1;
16129			}
16130			i++;
16131		}
16132		/* now we want to get EAGAIN: nonblocking goodness */
16133		errno = 0;
16134		recv(sfd, &x, sizeof(x), 0);
16135		if(errno != EAGAIN) {
16136			perror("trying to recv again");
16137			return 1;
16138		}
16139		/* EAGAIN encountered */
16140	}
16141
16142	close(sfd);
16143	close(cfd);
16144	return 0;
16145}
16146
16147_ACEOF
16148if ac_fn_c_try_run "$LINENO"; then :
16149
16150	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16151$as_echo "yes" >&6; }
16152
16153else
16154
16155	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16156$as_echo "no" >&6; }
16157
16158$as_echo "#define NONBLOCKING_IS_BROKEN 1" >>confdefs.h
16159
16160
16161fi
16162rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16163  conftest.$ac_objext conftest.beam conftest.$ac_ext
16164fi
16165
16166fi
16167
16168
16169{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mkdir has one arg" >&5
16170$as_echo_n "checking whether mkdir has one arg... " >&6; }
16171cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16172/* end confdefs.h.  */
16173
16174#include <stdio.h>
16175#include <unistd.h>
16176#ifdef HAVE_WINSOCK2_H
16177#include <winsock2.h>
16178#endif
16179#ifdef HAVE_SYS_STAT_H
16180#include <sys/stat.h>
16181#endif
16182
16183int
16184main ()
16185{
16186
16187	(void)mkdir("directory");
16188
16189  ;
16190  return 0;
16191}
16192_ACEOF
16193if ac_fn_c_try_compile "$LINENO"; then :
16194  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16195$as_echo "yes" >&6; }
16196
16197$as_echo "#define MKDIR_HAS_ONE_ARG 1" >>confdefs.h
16198
16199
16200else
16201  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16202$as_echo "no" >&6; }
16203
16204fi
16205rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16206
16207for ac_func in strptime
16208do :
16209  ac_fn_c_check_func "$LINENO" "strptime" "ac_cv_func_strptime"
16210if test "x$ac_cv_func_strptime" = xyes; then :
16211  cat >>confdefs.h <<_ACEOF
16212#define HAVE_STRPTIME 1
16213_ACEOF
16214
16215{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strptime works" >&5
16216$as_echo_n "checking whether strptime works... " >&6; }
16217if test c${cross_compiling} = cno; then
16218if test "$cross_compiling" = yes; then :
16219  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
16220$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
16221as_fn_error $? "cannot run test program while cross compiling
16222See \`config.log' for more details" "$LINENO" 5; }
16223else
16224  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16225/* end confdefs.h.  */
16226
16227#define _XOPEN_SOURCE 600
16228#include <time.h>
16229int main(void) { struct tm tm; char *res;
16230res = strptime("2010-07-15T00:00:00+00:00", "%t%Y%t-%t%m%t-%t%d%tT%t%H%t:%t%M%t:%t%S%t", &tm);
16231if (!res) return 2;
16232res = strptime("20070207111842", "%Y%m%d%H%M%S", &tm);
16233if (!res) return 1; return 0; }
16234
16235_ACEOF
16236if ac_fn_c_try_run "$LINENO"; then :
16237  eval "ac_cv_c_strptime_works=yes"
16238else
16239  eval "ac_cv_c_strptime_works=no"
16240fi
16241rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16242  conftest.$ac_objext conftest.beam conftest.$ac_ext
16243fi
16244
16245else
16246eval "ac_cv_c_strptime_works=maybe"
16247fi
16248{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_strptime_works" >&5
16249$as_echo "$ac_cv_c_strptime_works" >&6; }
16250if test $ac_cv_c_strptime_works = no; then
16251case " $LIBOBJS " in
16252  *" strptime.$ac_objext "* ) ;;
16253  *) LIBOBJS="$LIBOBJS strptime.$ac_objext"
16254 ;;
16255esac
16256
16257else
16258
16259cat >>confdefs.h <<_ACEOF
16260#define STRPTIME_WORKS 1
16261_ACEOF
16262
16263fi
16264
16265else
16266  case " $LIBOBJS " in
16267  *" strptime.$ac_objext "* ) ;;
16268  *) LIBOBJS="$LIBOBJS strptime.$ac_objext"
16269 ;;
16270esac
16271
16272fi
16273done
16274
16275
16276# check if we can use SO_REUSEPORT
16277reuseport_default=0
16278if echo "$host" | $GREP -i -e linux >/dev/null; then reuseport_default=1; fi
16279if echo "$host" | $GREP -i -e dragonfly >/dev/null; then reuseport_default=1; fi
16280if test "$reuseport_default" = 1; then
16281
16282$as_echo "#define REUSEPORT_DEFAULT 1" >>confdefs.h
16283
16284else
16285
16286$as_echo "#define REUSEPORT_DEFAULT 0" >>confdefs.h
16287
16288fi
16289
16290# Include systemd.m4 - begin
16291#   macros for configuring systemd
16292#   Copyright 2015, Sami Kerola, CloudFlare.
16293#   BSD licensed.
16294# Check whether --enable-systemd was given.
16295if test "${enable_systemd+set}" = set; then :
16296  enableval=$enable_systemd;
16297else
16298  enable_systemd=no
16299fi
16300
16301have_systemd=no
16302if test "x$enable_systemd" != xno; then :
16303
16304
16305
16306pkg_failed=no
16307{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for SYSTEMD" >&5
16308$as_echo_n "checking for SYSTEMD... " >&6; }
16309
16310if test -n "$SYSTEMD_CFLAGS"; then
16311    pkg_cv_SYSTEMD_CFLAGS="$SYSTEMD_CFLAGS"
16312 elif test -n "$PKG_CONFIG"; then
16313    if test -n "$PKG_CONFIG" && \
16314    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libsystemd\""; } >&5
16315  ($PKG_CONFIG --exists --print-errors "libsystemd") 2>&5
16316  ac_status=$?
16317  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
16318  test $ac_status = 0; }; then
16319  pkg_cv_SYSTEMD_CFLAGS=`$PKG_CONFIG --cflags "libsystemd" 2>/dev/null`
16320		      test "x$?" != "x0" && pkg_failed=yes
16321else
16322  pkg_failed=yes
16323fi
16324 else
16325    pkg_failed=untried
16326fi
16327if test -n "$SYSTEMD_LIBS"; then
16328    pkg_cv_SYSTEMD_LIBS="$SYSTEMD_LIBS"
16329 elif test -n "$PKG_CONFIG"; then
16330    if test -n "$PKG_CONFIG" && \
16331    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libsystemd\""; } >&5
16332  ($PKG_CONFIG --exists --print-errors "libsystemd") 2>&5
16333  ac_status=$?
16334  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
16335  test $ac_status = 0; }; then
16336  pkg_cv_SYSTEMD_LIBS=`$PKG_CONFIG --libs "libsystemd" 2>/dev/null`
16337		      test "x$?" != "x0" && pkg_failed=yes
16338else
16339  pkg_failed=yes
16340fi
16341 else
16342    pkg_failed=untried
16343fi
16344
16345
16346
16347if test $pkg_failed = yes; then
16348   	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16349$as_echo "no" >&6; }
16350
16351if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
16352        _pkg_short_errors_supported=yes
16353else
16354        _pkg_short_errors_supported=no
16355fi
16356        if test $_pkg_short_errors_supported = yes; then
16357	        SYSTEMD_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libsystemd" 2>&1`
16358        else
16359	        SYSTEMD_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libsystemd" 2>&1`
16360        fi
16361	# Put the nasty error message in config.log where it belongs
16362	echo "$SYSTEMD_PKG_ERRORS" >&5
16363
16364	have_systemd=no
16365elif test $pkg_failed = untried; then
16366     	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16367$as_echo "no" >&6; }
16368	have_systemd=no
16369else
16370	SYSTEMD_CFLAGS=$pkg_cv_SYSTEMD_CFLAGS
16371	SYSTEMD_LIBS=$pkg_cv_SYSTEMD_LIBS
16372        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16373$as_echo "yes" >&6; }
16374	have_systemd=yes
16375fi
16376		if test "x$have_systemd" != "xyes"; then :
16377
16378
16379pkg_failed=no
16380{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for SYSTEMD_DAEMON" >&5
16381$as_echo_n "checking for SYSTEMD_DAEMON... " >&6; }
16382
16383if test -n "$SYSTEMD_DAEMON_CFLAGS"; then
16384    pkg_cv_SYSTEMD_DAEMON_CFLAGS="$SYSTEMD_DAEMON_CFLAGS"
16385 elif test -n "$PKG_CONFIG"; then
16386    if test -n "$PKG_CONFIG" && \
16387    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libsystemd-daemon\""; } >&5
16388  ($PKG_CONFIG --exists --print-errors "libsystemd-daemon") 2>&5
16389  ac_status=$?
16390  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
16391  test $ac_status = 0; }; then
16392  pkg_cv_SYSTEMD_DAEMON_CFLAGS=`$PKG_CONFIG --cflags "libsystemd-daemon" 2>/dev/null`
16393		      test "x$?" != "x0" && pkg_failed=yes
16394else
16395  pkg_failed=yes
16396fi
16397 else
16398    pkg_failed=untried
16399fi
16400if test -n "$SYSTEMD_DAEMON_LIBS"; then
16401    pkg_cv_SYSTEMD_DAEMON_LIBS="$SYSTEMD_DAEMON_LIBS"
16402 elif test -n "$PKG_CONFIG"; then
16403    if test -n "$PKG_CONFIG" && \
16404    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libsystemd-daemon\""; } >&5
16405  ($PKG_CONFIG --exists --print-errors "libsystemd-daemon") 2>&5
16406  ac_status=$?
16407  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
16408  test $ac_status = 0; }; then
16409  pkg_cv_SYSTEMD_DAEMON_LIBS=`$PKG_CONFIG --libs "libsystemd-daemon" 2>/dev/null`
16410		      test "x$?" != "x0" && pkg_failed=yes
16411else
16412  pkg_failed=yes
16413fi
16414 else
16415    pkg_failed=untried
16416fi
16417
16418
16419
16420if test $pkg_failed = yes; then
16421   	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16422$as_echo "no" >&6; }
16423
16424if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
16425        _pkg_short_errors_supported=yes
16426else
16427        _pkg_short_errors_supported=no
16428fi
16429        if test $_pkg_short_errors_supported = yes; then
16430	        SYSTEMD_DAEMON_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libsystemd-daemon" 2>&1`
16431        else
16432	        SYSTEMD_DAEMON_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libsystemd-daemon" 2>&1`
16433        fi
16434	# Put the nasty error message in config.log where it belongs
16435	echo "$SYSTEMD_DAEMON_PKG_ERRORS" >&5
16436
16437	have_systemd_daemon=no
16438elif test $pkg_failed = untried; then
16439     	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16440$as_echo "no" >&6; }
16441	have_systemd_daemon=no
16442else
16443	SYSTEMD_DAEMON_CFLAGS=$pkg_cv_SYSTEMD_DAEMON_CFLAGS
16444	SYSTEMD_DAEMON_LIBS=$pkg_cv_SYSTEMD_DAEMON_LIBS
16445        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16446$as_echo "yes" >&6; }
16447	have_systemd_daemon=yes
16448fi
16449		if test "x$have_systemd_daemon" = "xyes"; then :
16450  have_systemd=yes
16451fi
16452
16453fi
16454	case $enable_systemd:$have_systemd in #(
16455  yes:no) :
16456    as_fn_error $? "systemd enabled but libsystemd not found" "$LINENO" 5 ;; #(
16457  *:yes) :
16458
16459$as_echo "#define HAVE_SYSTEMD 1" >>confdefs.h
16460
16461		LIBS="$LIBS $SYSTEMD_LIBS"
16462
16463	 ;; #(
16464  *) :
16465     ;;
16466esac
16467
16468
16469fi
16470 if test "x$have_systemd" = xyes; then
16471  USE_SYSTEMD_TRUE=
16472  USE_SYSTEMD_FALSE='#'
16473else
16474  USE_SYSTEMD_TRUE='#'
16475  USE_SYSTEMD_FALSE=
16476fi
16477
16478
16479# Include systemd.m4 - end
16480
16481# set memory allocation checking if requested
16482# Check whether --enable-alloc-checks was given.
16483if test "${enable_alloc_checks+set}" = set; then :
16484  enableval=$enable_alloc_checks;
16485fi
16486
16487# Check whether --enable-alloc-lite was given.
16488if test "${enable_alloc_lite+set}" = set; then :
16489  enableval=$enable_alloc_lite;
16490fi
16491
16492# Check whether --enable-alloc-nonregional was given.
16493if test "${enable_alloc_nonregional+set}" = set; then :
16494  enableval=$enable_alloc_nonregional;
16495fi
16496
16497if test x_$enable_alloc_nonregional = x_yes; then
16498
16499$as_echo "#define UNBOUND_ALLOC_NONREGIONAL 1" >>confdefs.h
16500
16501fi
16502if test x_$enable_alloc_checks = x_yes; then
16503
16504$as_echo "#define UNBOUND_ALLOC_STATS 1" >>confdefs.h
16505
16506	SLDNS_ALLOCCHECK_EXTRA_OBJ="alloc.lo log.lo"
16507
16508	ASYNCLOOK_ALLOCCHECK_EXTRA_OBJ="alloc.lo"
16509
16510else
16511	if test x_$enable_alloc_lite = x_yes; then
16512
16513$as_echo "#define UNBOUND_ALLOC_LITE 1" >>confdefs.h
16514
16515	else
16516
16517	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible malloc" >&5
16518$as_echo_n "checking for GNU libc compatible malloc... " >&6; }
16519	if test "$cross_compiling" = yes; then :
16520  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no (crosscompile)" >&5
16521$as_echo "no (crosscompile)" >&6; }
16522	case " $LIBOBJS " in
16523  *" malloc.$ac_objext "* ) ;;
16524  *) LIBOBJS="$LIBOBJS malloc.$ac_objext"
16525 ;;
16526esac
16527
16528
16529cat >>confdefs.h <<_ACEOF
16530#define malloc rpl_malloc_unbound
16531_ACEOF
16532
16533else
16534  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16535/* end confdefs.h.  */
16536#if defined STDC_HEADERS || defined HAVE_STDLIB_H
16537#include <stdlib.h>
16538#else
16539char *malloc ();
16540#endif
16541
16542int
16543main ()
16544{
16545 if(malloc(0) != 0) return 1;
16546  ;
16547  return 0;
16548}
16549
16550_ACEOF
16551if ac_fn_c_try_run "$LINENO"; then :
16552  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16553$as_echo "no" >&6; }
16554	case " $LIBOBJS " in
16555  *" malloc.$ac_objext "* ) ;;
16556  *) LIBOBJS="$LIBOBJS malloc.$ac_objext"
16557 ;;
16558esac
16559
16560
16561cat >>confdefs.h <<_ACEOF
16562#define malloc rpl_malloc_unbound
16563_ACEOF
16564
16565else
16566  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16567$as_echo "yes" >&6; }
16568
16569$as_echo "#define HAVE_MALLOC 1" >>confdefs.h
16570
16571fi
16572rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16573  conftest.$ac_objext conftest.beam conftest.$ac_ext
16574fi
16575
16576
16577	fi
16578fi
16579
16580# check windows threads (we use them, not pthreads, on windows).
16581if test "$on_mingw" = "yes"; then
16582# check windows threads
16583	for ac_header in windows.h
16584do :
16585  ac_fn_c_check_header_compile "$LINENO" "windows.h" "ac_cv_header_windows_h" "$ac_includes_default
16586"
16587if test "x$ac_cv_header_windows_h" = xyes; then :
16588  cat >>confdefs.h <<_ACEOF
16589#define HAVE_WINDOWS_H 1
16590_ACEOF
16591
16592fi
16593
16594done
16595
16596	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for CreateThread" >&5
16597$as_echo_n "checking for CreateThread... " >&6; }
16598	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16599/* end confdefs.h.  */
16600
16601#ifdef HAVE_WINDOWS_H
16602#include <windows.h>
16603#endif
16604
16605int
16606main ()
16607{
16608
16609	HANDLE t = CreateThread(NULL, 0, NULL, NULL, 0, NULL);
16610
16611  ;
16612  return 0;
16613}
16614_ACEOF
16615if ac_fn_c_try_compile "$LINENO"; then :
16616  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16617$as_echo "yes" >&6; }
16618
16619$as_echo "#define HAVE_WINDOWS_THREADS 1" >>confdefs.h
16620
16621
16622else
16623  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16624$as_echo "no" >&6; }
16625
16626fi
16627rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16628
16629else
16630# not on mingw, check thread libraries.
16631
16632# check for thread library.
16633# check this first, so that the pthread lib does not get linked in via
16634# libssl or libpython, and thus distorts the tests, and we end up using
16635# the non-threadsafe C libraries.
16636
16637# Check whether --with-pthreads was given.
16638if test "${with_pthreads+set}" = set; then :
16639  withval=$with_pthreads;
16640else
16641   withval="yes"
16642fi
16643
16644ub_have_pthreads=no
16645if test x_$withval != x_no; then
16646
16647
16648ac_ext=c
16649ac_cpp='$CPP $CPPFLAGS'
16650ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16651ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16652ac_compiler_gnu=$ac_cv_c_compiler_gnu
16653
16654ax_pthread_ok=no
16655
16656# We used to check for pthread.h first, but this fails if pthread.h
16657# requires special compiler flags (e.g. on True64 or Sequent).
16658# It gets checked for in the link test anyway.
16659
16660# First of all, check if the user has set any of the PTHREAD_LIBS,
16661# etcetera environment variables, and if threads linking works using
16662# them:
16663if test x"$PTHREAD_LIBS$PTHREAD_CFLAGS" != x; then
16664        save_CFLAGS="$CFLAGS"
16665        CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
16666        save_LIBS="$LIBS"
16667        LIBS="$PTHREAD_LIBS $LIBS"
16668        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS" >&5
16669$as_echo_n "checking for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS... " >&6; }
16670        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16671/* end confdefs.h.  */
16672
16673/* Override any GCC internal prototype to avoid an error.
16674   Use char because int might match the return type of a GCC
16675   builtin and then its argument prototype would still apply.  */
16676#ifdef __cplusplus
16677extern "C"
16678#endif
16679char pthread_join ();
16680int
16681main ()
16682{
16683return pthread_join ();
16684  ;
16685  return 0;
16686}
16687_ACEOF
16688if ac_fn_c_try_link "$LINENO"; then :
16689  ax_pthread_ok=yes
16690fi
16691rm -f core conftest.err conftest.$ac_objext \
16692    conftest$ac_exeext conftest.$ac_ext
16693        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
16694$as_echo "$ax_pthread_ok" >&6; }
16695        if test x"$ax_pthread_ok" = xno; then
16696                PTHREAD_LIBS=""
16697                PTHREAD_CFLAGS=""
16698        fi
16699        LIBS="$save_LIBS"
16700        CFLAGS="$save_CFLAGS"
16701fi
16702
16703# We must check for the threads library under a number of different
16704# names; the ordering is very important because some systems
16705# (e.g. DEC) have both -lpthread and -lpthreads, where one of the
16706# libraries is broken (non-POSIX).
16707
16708# Create a list of thread flags to try.  Items starting with a "-" are
16709# C compiler flags, and other items are library names, except for "none"
16710# which indicates that we try without any flags at all, and "pthread-config"
16711# which is a program returning the flags for the Pth emulation library.
16712
16713ax_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config"
16714
16715# The ordering *is* (sometimes) important.  Some notes on the
16716# individual items follow:
16717
16718# pthreads: AIX (must check this before -lpthread)
16719# none: in case threads are in libc; should be tried before -Kthread and
16720#       other compiler flags to prevent continual compiler warnings
16721# -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h)
16722# -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
16723# lthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
16724# -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads)
16725# -pthreads: Solaris/gcc
16726# -mthreads: Mingw32/gcc, Lynx/gcc
16727# -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
16728#      doesn't hurt to check since this sometimes defines pthreads too;
16729#      also defines -D_REENTRANT)
16730#      ... -mt is also the pthreads flag for HP/aCC
16731# pthread: Linux, etcetera
16732# --thread-safe: KAI C++
16733# pthread-config: use pthread-config program (for GNU Pth library)
16734
16735case ${host_os} in
16736        solaris*)
16737
16738        # On Solaris (at least, for some versions), libc contains stubbed
16739        # (non-functional) versions of the pthreads routines, so link-based
16740        # tests will erroneously succeed.  (We need to link with -pthreads/-mt/
16741        # -lpthread.)  (The stubs are missing pthread_cleanup_push, or rather
16742        # a function called by this macro, so we could check for that, but
16743        # who knows whether they'll stub that too in a future libc.)  So,
16744        # we'll just look for -pthreads and -lpthread first:
16745
16746        ax_pthread_flags="-pthreads pthread -mt -pthread $ax_pthread_flags"
16747        ;;
16748
16749        darwin*)
16750        ax_pthread_flags="-pthread $ax_pthread_flags"
16751        ;;
16752esac
16753
16754# Clang doesn't consider unrecognized options an error unless we specify
16755# -Werror. We throw in some extra Clang-specific options to ensure that
16756# this doesn't happen for GCC, which also accepts -Werror.
16757
16758{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler needs -Werror to reject unknown flags" >&5
16759$as_echo_n "checking if compiler needs -Werror to reject unknown flags... " >&6; }
16760save_CFLAGS="$CFLAGS"
16761ax_pthread_extra_flags="-Werror"
16762CFLAGS="$CFLAGS $ax_pthread_extra_flags -Wunknown-warning-option -Wsizeof-array-argument"
16763cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16764/* end confdefs.h.  */
16765int foo(void);
16766int
16767main ()
16768{
16769foo()
16770  ;
16771  return 0;
16772}
16773_ACEOF
16774if ac_fn_c_try_compile "$LINENO"; then :
16775  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16776$as_echo "yes" >&6; }
16777else
16778  ax_pthread_extra_flags=
16779                   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16780$as_echo "no" >&6; }
16781fi
16782rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16783CFLAGS="$save_CFLAGS"
16784
16785if test x"$ax_pthread_ok" = xno; then
16786for flag in $ax_pthread_flags; do
16787
16788        case $flag in
16789                none)
16790                { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work without any flags" >&5
16791$as_echo_n "checking whether pthreads work without any flags... " >&6; }
16792                ;;
16793
16794                -*)
16795                { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with $flag" >&5
16796$as_echo_n "checking whether pthreads work with $flag... " >&6; }
16797                PTHREAD_CFLAGS="$flag"
16798                ;;
16799
16800                pthread-config)
16801                # Extract the first word of "pthread-config", so it can be a program name with args.
16802set dummy pthread-config; ac_word=$2
16803{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16804$as_echo_n "checking for $ac_word... " >&6; }
16805if ${ac_cv_prog_ax_pthread_config+:} false; then :
16806  $as_echo_n "(cached) " >&6
16807else
16808  if test -n "$ax_pthread_config"; then
16809  ac_cv_prog_ax_pthread_config="$ax_pthread_config" # Let the user override the test.
16810else
16811as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16812for as_dir in $PATH
16813do
16814  IFS=$as_save_IFS
16815  test -z "$as_dir" && as_dir=.
16816    for ac_exec_ext in '' $ac_executable_extensions; do
16817  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16818    ac_cv_prog_ax_pthread_config="yes"
16819    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16820    break 2
16821  fi
16822done
16823  done
16824IFS=$as_save_IFS
16825
16826  test -z "$ac_cv_prog_ax_pthread_config" && ac_cv_prog_ax_pthread_config="no"
16827fi
16828fi
16829ax_pthread_config=$ac_cv_prog_ax_pthread_config
16830if test -n "$ax_pthread_config"; then
16831  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_config" >&5
16832$as_echo "$ax_pthread_config" >&6; }
16833else
16834  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16835$as_echo "no" >&6; }
16836fi
16837
16838
16839                if test x"$ax_pthread_config" = xno; then continue; fi
16840                PTHREAD_CFLAGS="`pthread-config --cflags`"
16841                PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`"
16842                ;;
16843
16844                *)
16845                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the pthreads library -l$flag" >&5
16846$as_echo_n "checking for the pthreads library -l$flag... " >&6; }
16847                PTHREAD_LIBS="-l$flag"
16848                ;;
16849        esac
16850
16851        save_LIBS="$LIBS"
16852        save_CFLAGS="$CFLAGS"
16853        LIBS="$PTHREAD_LIBS $LIBS"
16854        CFLAGS="$CFLAGS $PTHREAD_CFLAGS $ax_pthread_extra_flags"
16855
16856        # Check for various functions.  We must include pthread.h,
16857        # since some functions may be macros.  (On the Sequent, we
16858        # need a special flag -Kthread to make this header compile.)
16859        # We check for pthread_join because it is in -lpthread on IRIX
16860        # while pthread_create is in libc.  We check for pthread_attr_init
16861        # due to DEC craziness with -lpthreads.  We check for
16862        # pthread_cleanup_push because it is one of the few pthread
16863        # functions on Solaris that doesn't have a non-functional libc stub.
16864        # We try pthread_create on general principles.
16865        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16866/* end confdefs.h.  */
16867#include <pthread.h>
16868                        static void routine(void *a) { *((int*)a) = 0; }
16869                        static void *start_routine(void *a) { return a; }
16870int
16871main ()
16872{
16873pthread_t th; pthread_attr_t attr;
16874                        pthread_create(&th, 0, start_routine, 0);
16875                        pthread_join(th, 0);
16876                        pthread_attr_init(&attr);
16877                        pthread_cleanup_push(routine, 0);
16878                        pthread_cleanup_pop(0) /* ; */
16879  ;
16880  return 0;
16881}
16882_ACEOF
16883if ac_fn_c_try_link "$LINENO"; then :
16884  ax_pthread_ok=yes
16885fi
16886rm -f core conftest.err conftest.$ac_objext \
16887    conftest$ac_exeext conftest.$ac_ext
16888
16889        LIBS="$save_LIBS"
16890        CFLAGS="$save_CFLAGS"
16891
16892        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
16893$as_echo "$ax_pthread_ok" >&6; }
16894        if test "x$ax_pthread_ok" = xyes; then
16895                break;
16896        fi
16897
16898        PTHREAD_LIBS=""
16899        PTHREAD_CFLAGS=""
16900done
16901fi
16902
16903# Various other checks:
16904if test "x$ax_pthread_ok" = xyes; then
16905        save_LIBS="$LIBS"
16906        LIBS="$PTHREAD_LIBS $LIBS"
16907        save_CFLAGS="$CFLAGS"
16908        CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
16909
16910        # Detect AIX lossage: JOINABLE attribute is called UNDETACHED.
16911        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for joinable pthread attribute" >&5
16912$as_echo_n "checking for joinable pthread attribute... " >&6; }
16913        attr_name=unknown
16914        for attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do
16915            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16916/* end confdefs.h.  */
16917#include <pthread.h>
16918int
16919main ()
16920{
16921int attr = $attr; return attr /* ; */
16922  ;
16923  return 0;
16924}
16925_ACEOF
16926if ac_fn_c_try_link "$LINENO"; then :
16927  attr_name=$attr; break
16928fi
16929rm -f core conftest.err conftest.$ac_objext \
16930    conftest$ac_exeext conftest.$ac_ext
16931        done
16932        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $attr_name" >&5
16933$as_echo "$attr_name" >&6; }
16934        if test "$attr_name" != PTHREAD_CREATE_JOINABLE; then
16935
16936cat >>confdefs.h <<_ACEOF
16937#define PTHREAD_CREATE_JOINABLE $attr_name
16938_ACEOF
16939
16940        fi
16941
16942        { $as_echo "$as_me:${as_lineno-$LINENO}: checking if more special flags are required for pthreads" >&5
16943$as_echo_n "checking if more special flags are required for pthreads... " >&6; }
16944        flag=no
16945        case ${host_os} in
16946            aix* | freebsd* | darwin*) flag="-D_THREAD_SAFE";;
16947            osf* | hpux*) flag="-D_REENTRANT";;
16948            solaris*)
16949            if test "$GCC" = "yes"; then
16950                flag="-D_REENTRANT"
16951            else
16952                # TODO: What about Clang on Solaris?
16953                flag="-mt -D_REENTRANT"
16954            fi
16955            ;;
16956        esac
16957        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $flag" >&5
16958$as_echo "$flag" >&6; }
16959        if test "x$flag" != xno; then
16960            PTHREAD_CFLAGS="$flag $PTHREAD_CFLAGS"
16961        fi
16962
16963        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTHREAD_PRIO_INHERIT" >&5
16964$as_echo_n "checking for PTHREAD_PRIO_INHERIT... " >&6; }
16965if ${ax_cv_PTHREAD_PRIO_INHERIT+:} false; then :
16966  $as_echo_n "(cached) " >&6
16967else
16968
16969                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16970/* end confdefs.h.  */
16971#include <pthread.h>
16972int
16973main ()
16974{
16975int i = PTHREAD_PRIO_INHERIT;
16976  ;
16977  return 0;
16978}
16979_ACEOF
16980if ac_fn_c_try_link "$LINENO"; then :
16981  ax_cv_PTHREAD_PRIO_INHERIT=yes
16982else
16983  ax_cv_PTHREAD_PRIO_INHERIT=no
16984fi
16985rm -f core conftest.err conftest.$ac_objext \
16986    conftest$ac_exeext conftest.$ac_ext
16987
16988fi
16989{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_PRIO_INHERIT" >&5
16990$as_echo "$ax_cv_PTHREAD_PRIO_INHERIT" >&6; }
16991        if test "x$ax_cv_PTHREAD_PRIO_INHERIT" = "xyes"; then :
16992
16993$as_echo "#define HAVE_PTHREAD_PRIO_INHERIT 1" >>confdefs.h
16994
16995fi
16996
16997        LIBS="$save_LIBS"
16998        CFLAGS="$save_CFLAGS"
16999
17000        # More AIX lossage: compile with *_r variant
17001        if test "x$GCC" != xyes; then
17002            case $host_os in
17003                aix*)
17004                case "x/$CC" in #(
17005  x*/c89|x*/c89_128|x*/c99|x*/c99_128|x*/cc|x*/cc128|x*/xlc|x*/xlc_v6|x*/xlc128|x*/xlc128_v6) :
17006    #handle absolute path differently from PATH based program lookup
17007                   case "x$CC" in #(
17008  x/*) :
17009    if as_fn_executable_p ${CC}_r; then :
17010  PTHREAD_CC="${CC}_r"
17011fi ;; #(
17012  *) :
17013    for ac_prog in ${CC}_r
17014do
17015  # Extract the first word of "$ac_prog", so it can be a program name with args.
17016set dummy $ac_prog; ac_word=$2
17017{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17018$as_echo_n "checking for $ac_word... " >&6; }
17019if ${ac_cv_prog_PTHREAD_CC+:} false; then :
17020  $as_echo_n "(cached) " >&6
17021else
17022  if test -n "$PTHREAD_CC"; then
17023  ac_cv_prog_PTHREAD_CC="$PTHREAD_CC" # Let the user override the test.
17024else
17025as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17026for as_dir in $PATH
17027do
17028  IFS=$as_save_IFS
17029  test -z "$as_dir" && as_dir=.
17030    for ac_exec_ext in '' $ac_executable_extensions; do
17031  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17032    ac_cv_prog_PTHREAD_CC="$ac_prog"
17033    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17034    break 2
17035  fi
17036done
17037  done
17038IFS=$as_save_IFS
17039
17040fi
17041fi
17042PTHREAD_CC=$ac_cv_prog_PTHREAD_CC
17043if test -n "$PTHREAD_CC"; then
17044  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTHREAD_CC" >&5
17045$as_echo "$PTHREAD_CC" >&6; }
17046else
17047  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17048$as_echo "no" >&6; }
17049fi
17050
17051
17052  test -n "$PTHREAD_CC" && break
17053done
17054test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
17055 ;;
17056esac ;; #(
17057  *) :
17058     ;;
17059esac
17060                ;;
17061            esac
17062        fi
17063fi
17064
17065test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
17066
17067
17068
17069
17070
17071# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
17072if test x"$ax_pthread_ok" = xyes; then
17073
17074
17075$as_echo "#define HAVE_PTHREAD 1" >>confdefs.h
17076
17077		if test -n "$PTHREAD_LIBS"; then
17078		  LIBS="$PTHREAD_LIBS $LIBS"
17079		fi
17080		CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
17081		CC="$PTHREAD_CC"
17082		ub_have_pthreads=yes
17083		ac_fn_c_check_type "$LINENO" "pthread_spinlock_t" "ac_cv_type_pthread_spinlock_t" "#include <pthread.h>
17084"
17085if test "x$ac_cv_type_pthread_spinlock_t" = xyes; then :
17086
17087cat >>confdefs.h <<_ACEOF
17088#define HAVE_PTHREAD_SPINLOCK_T 1
17089_ACEOF
17090
17091
17092fi
17093ac_fn_c_check_type "$LINENO" "pthread_rwlock_t" "ac_cv_type_pthread_rwlock_t" "#include <pthread.h>
17094"
17095if test "x$ac_cv_type_pthread_rwlock_t" = xyes; then :
17096
17097cat >>confdefs.h <<_ACEOF
17098#define HAVE_PTHREAD_RWLOCK_T 1
17099_ACEOF
17100
17101
17102fi
17103
17104
17105		if echo "$CFLAGS" | $GREP -e "-pthread" >/dev/null; then
17106		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if -pthread unused during linking" >&5
17107$as_echo_n "checking if -pthread unused during linking... " >&6; }
17108		# catch clang warning 'argument unused during compilation'
17109		cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17110/* end confdefs.h.  */
17111$ac_includes_default
17112
17113int main(void) {return 0;}
17114
17115_ACEOF
17116		pthread_unused="yes"
17117		# first compile
17118		echo "$CC $CFLAGS -c conftest.c -o conftest.o" >&5
17119		$CC $CFLAGS -c conftest.c -o conftest.o 2>&5 >&5
17120		if test $? = 0; then
17121			# then link
17122			echo "$CC $CFLAGS -Werror $LDFLAGS $LIBS -o conftest contest.o" >&5
17123			$CC $CFLAGS -Werror $LDFLAGS $LIBS -o conftest conftest.o 2>&5 >&5
17124			if test $? -ne 0; then
17125				{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17126$as_echo "yes" >&6; }
17127				CFLAGS=`echo "$CFLAGS" | sed -e 's/-pthread//'`
17128				PTHREAD_CFLAGS_ONLY="-pthread"
17129
17130			else
17131				{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17132$as_echo "no" >&6; }
17133			fi
17134		else
17135			{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17136$as_echo "no" >&6; }
17137		fi # endif cc successful
17138		rm -f conftest conftest.c conftest.o
17139		fi # endif -pthread in CFLAGS
17140
17141
17142        :
17143else
17144        ax_pthread_ok=no
17145
17146fi
17147ac_ext=c
17148ac_cpp='$CPP $CPPFLAGS'
17149ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
17150ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
17151ac_compiler_gnu=$ac_cv_c_compiler_gnu
17152
17153
17154fi
17155
17156# check solaris thread library
17157
17158# Check whether --with-solaris-threads was given.
17159if test "${with_solaris_threads+set}" = set; then :
17160  withval=$with_solaris_threads;
17161else
17162   withval="no"
17163fi
17164
17165ub_have_sol_threads=no
17166if test x_$withval != x_no; then
17167	if test x_$ub_have_pthreads != x_no; then
17168	    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Have pthreads already, ignoring --with-solaris-threads" >&5
17169$as_echo "$as_me: WARNING: Have pthreads already, ignoring --with-solaris-threads" >&2;}
17170	else
17171	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing thr_create" >&5
17172$as_echo_n "checking for library containing thr_create... " >&6; }
17173if ${ac_cv_search_thr_create+:} false; then :
17174  $as_echo_n "(cached) " >&6
17175else
17176  ac_func_search_save_LIBS=$LIBS
17177cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17178/* end confdefs.h.  */
17179
17180/* Override any GCC internal prototype to avoid an error.
17181   Use char because int might match the return type of a GCC
17182   builtin and then its argument prototype would still apply.  */
17183#ifdef __cplusplus
17184extern "C"
17185#endif
17186char thr_create ();
17187int
17188main ()
17189{
17190return thr_create ();
17191  ;
17192  return 0;
17193}
17194_ACEOF
17195for ac_lib in '' thread; do
17196  if test -z "$ac_lib"; then
17197    ac_res="none required"
17198  else
17199    ac_res=-l$ac_lib
17200    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
17201  fi
17202  if ac_fn_c_try_link "$LINENO"; then :
17203  ac_cv_search_thr_create=$ac_res
17204fi
17205rm -f core conftest.err conftest.$ac_objext \
17206    conftest$ac_exeext
17207  if ${ac_cv_search_thr_create+:} false; then :
17208  break
17209fi
17210done
17211if ${ac_cv_search_thr_create+:} false; then :
17212
17213else
17214  ac_cv_search_thr_create=no
17215fi
17216rm conftest.$ac_ext
17217LIBS=$ac_func_search_save_LIBS
17218fi
17219{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_thr_create" >&5
17220$as_echo "$ac_cv_search_thr_create" >&6; }
17221ac_res=$ac_cv_search_thr_create
17222if test "$ac_res" != no; then :
17223  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
17224
17225
17226$as_echo "#define HAVE_SOLARIS_THREADS 1" >>confdefs.h
17227
17228
17229
17230
17231{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -mt" >&5
17232$as_echo_n "checking whether $CC supports -mt... " >&6; }
17233cache=`echo mt | sed 'y%.=/+-%___p_%'`
17234if eval \${cv_prog_cc_flag_$cache+:} false; then :
17235  $as_echo_n "(cached) " >&6
17236else
17237
17238echo 'void f(void){}' >conftest.c
17239if test -z "`$CC $CPPFLAGS $CFLAGS -mt -c conftest.c 2>&1`"; then
17240eval "cv_prog_cc_flag_$cache=yes"
17241else
17242eval "cv_prog_cc_flag_$cache=no"
17243fi
17244rm -f conftest conftest.o conftest.c
17245
17246fi
17247
17248if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
17249{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17250$as_echo "yes" >&6; }
17251:
17252CFLAGS="$CFLAGS -mt"
17253else
17254{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17255$as_echo "no" >&6; }
17256:
17257CFLAGS="$CFLAGS -D_REENTRANT"
17258fi
17259
17260		ub_have_sol_threads=yes
17261
17262else
17263
17264		as_fn_error $? "no solaris threads found." "$LINENO" 5
17265
17266fi
17267
17268	fi
17269fi
17270
17271fi # end of non-mingw check of thread libraries
17272
17273# Check for SYSLOG_FACILITY
17274
17275# Check whether --with-syslog-facility was given.
17276if test "${with_syslog_facility+set}" = set; then :
17277  withval=$with_syslog_facility;  UNBOUND_SYSLOG_FACILITY="$withval"
17278fi
17279
17280case "${UNBOUND_SYSLOG_FACILITY}" in
17281
17282  LOCAL[0-7]) UNBOUND_SYSLOG_FACILITY="LOG_${UNBOUND_SYSLOG_FACILITY}" ;;
17283
17284           *) UNBOUND_SYSLOG_FACILITY="LOG_DAEMON" ;;
17285
17286esac
17287
17288cat >>confdefs.h <<_ACEOF
17289#define UB_SYSLOG_FACILITY ${UNBOUND_SYSLOG_FACILITY}
17290_ACEOF
17291
17292
17293# Check for dynamic library module
17294
17295# Check whether --with-dynlibmodule was given.
17296if test "${with_dynlibmodule+set}" = set; then :
17297  withval=$with_dynlibmodule;
17298else
17299   withval="no"
17300fi
17301
17302
17303if test x_$withval != x_no; then
17304
17305$as_echo "#define WITH_DYNLIBMODULE 1" >>confdefs.h
17306
17307  WITH_DYNLIBMODULE=yes
17308
17309  DYNLIBMOD_OBJ="dynlibmod.lo"
17310
17311  DYNLIBMOD_HEADER='$(srcdir)/dynlibmod/dynlibmod.h'
17312
17313  if test $on_mingw = "no"; then
17314    # link with -ldl if not already there, for all executables because
17315    # dlopen call is in the dynlib module.  For unbound executable, also
17316    # export symbols.
17317    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
17318$as_echo_n "checking for library containing dlopen... " >&6; }
17319if ${ac_cv_search_dlopen+:} false; then :
17320  $as_echo_n "(cached) " >&6
17321else
17322  ac_func_search_save_LIBS=$LIBS
17323cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17324/* end confdefs.h.  */
17325
17326/* Override any GCC internal prototype to avoid an error.
17327   Use char because int might match the return type of a GCC
17328   builtin and then its argument prototype would still apply.  */
17329#ifdef __cplusplus
17330extern "C"
17331#endif
17332char dlopen ();
17333int
17334main ()
17335{
17336return dlopen ();
17337  ;
17338  return 0;
17339}
17340_ACEOF
17341for ac_lib in '' dl; do
17342  if test -z "$ac_lib"; then
17343    ac_res="none required"
17344  else
17345    ac_res=-l$ac_lib
17346    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
17347  fi
17348  if ac_fn_c_try_link "$LINENO"; then :
17349  ac_cv_search_dlopen=$ac_res
17350fi
17351rm -f core conftest.err conftest.$ac_objext \
17352    conftest$ac_exeext
17353  if ${ac_cv_search_dlopen+:} false; then :
17354  break
17355fi
17356done
17357if ${ac_cv_search_dlopen+:} false; then :
17358
17359else
17360  ac_cv_search_dlopen=no
17361fi
17362rm conftest.$ac_ext
17363LIBS=$ac_func_search_save_LIBS
17364fi
17365{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
17366$as_echo "$ac_cv_search_dlopen" >&6; }
17367ac_res=$ac_cv_search_dlopen
17368if test "$ac_res" != no; then :
17369  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
17370
17371fi
17372
17373    DYNLIBMOD_EXTRALIBS="-export-dynamic"
17374  else
17375    DYNLIBMOD_EXTRALIBS="-Wl,--export-all-symbols,--out-implib,libunbound.dll.a"
17376  fi
17377
17378fi
17379
17380# Check for PyUnbound
17381
17382# Check whether --with-pyunbound was given.
17383if test "${with_pyunbound+set}" = set; then :
17384  withval=$with_pyunbound;
17385else
17386   withval="no"
17387fi
17388
17389
17390ub_test_python=no
17391ub_with_pyunbound=no
17392if test x_$withval != x_no; then
17393   ub_with_pyunbound=yes
17394   ub_test_python=yes
17395fi
17396
17397# Check for Python module
17398
17399# Check whether --with-pythonmodule was given.
17400if test "${with_pythonmodule+set}" = set; then :
17401  withval=$with_pythonmodule;
17402else
17403   withval="no"
17404fi
17405
17406
17407ub_with_pythonmod=no
17408if test x_$withval != x_no; then
17409   ub_with_pythonmod=yes
17410   ub_test_python=yes
17411fi
17412
17413# Check for Python & SWIG only on PyUnbound or PyModule
17414if test x_$ub_test_python != x_no; then
17415
17416   # Check for Python
17417   ub_have_python=no
17418   ac_save_LIBS="$LIBS"
17419        #
17420        # Allow the use of a (user set) custom python version
17421        #
17422
17423
17424        # Extract the first word of "python[$PYTHON_VERSION]", so it can be a program name with args.
17425set dummy python$PYTHON_VERSION; ac_word=$2
17426{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17427$as_echo_n "checking for $ac_word... " >&6; }
17428if ${ac_cv_path_PYTHON+:} false; then :
17429  $as_echo_n "(cached) " >&6
17430else
17431  case $PYTHON in
17432  [\\/]* | ?:[\\/]*)
17433  ac_cv_path_PYTHON="$PYTHON" # Let the user override the test with a path.
17434  ;;
17435  *)
17436  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17437for as_dir in $PATH
17438do
17439  IFS=$as_save_IFS
17440  test -z "$as_dir" && as_dir=.
17441    for ac_exec_ext in '' $ac_executable_extensions; do
17442  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17443    ac_cv_path_PYTHON="$as_dir/$ac_word$ac_exec_ext"
17444    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17445    break 2
17446  fi
17447done
17448  done
17449IFS=$as_save_IFS
17450
17451  ;;
17452esac
17453fi
17454PYTHON=$ac_cv_path_PYTHON
17455if test -n "$PYTHON"; then
17456  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5
17457$as_echo "$PYTHON" >&6; }
17458else
17459  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17460$as_echo "no" >&6; }
17461fi
17462
17463
17464        if test -z "$PYTHON"; then
17465           as_fn_error $? "Cannot find python$PYTHON_VERSION in your system path" "$LINENO" 5
17466           PYTHON_VERSION=""
17467        fi
17468
17469        if test -z "$PYTHON_VERSION"; then
17470		PYTHON_VERSION=`$PYTHON -c "import sys; \
17471			print(sys.version.split()[0])"`
17472	fi
17473
17474	# Check if you have sysconfig
17475	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the sysconfig Python module" >&5
17476$as_echo_n "checking for the sysconfig Python module... " >&6; }
17477        if ac_sysconfig_result=`$PYTHON -c "import sysconfig" 2>&1`; then
17478                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17479$as_echo "yes" >&6; }
17480		sysconfig_module="sysconfig"
17481		# if yes, use sysconfig, because distutils is deprecated.
17482	else
17483                { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17484$as_echo "no" >&6; }
17485		# if no, try to use distutils
17486
17487		#
17488		# Check if you have distutils, else fail
17489		#
17490		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the distutils Python package" >&5
17491$as_echo_n "checking for the distutils Python package... " >&6; }
17492		if ac_distutils_result=`$PYTHON -c "import distutils" 2>&1`; then
17493			{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17494$as_echo "yes" >&6; }
17495		else
17496			{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17497$as_echo "no" >&6; }
17498			as_fn_error $? "cannot import Python module \"distutils\".
17499	Please check your Python installation. The error was:
17500	$ac_distutils_result" "$LINENO" 5
17501			PYTHON_VERSION=""
17502		fi
17503
17504		sysconfig_module="distutils.sysconfig"
17505	fi
17506
17507        #
17508        # Check for Python include path
17509        #
17510        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Python include path" >&5
17511$as_echo_n "checking for Python include path... " >&6; }
17512        if test -z "$PYTHON_CPPFLAGS"; then
17513		if test "$sysconfig_module" = "sysconfig"; then
17514			python_path=`$PYTHON -c 'import sysconfig; \
17515				print(sysconfig.get_path("include"));'`
17516		else
17517			python_path=`$PYTHON -c "import distutils.sysconfig; \
17518				print(distutils.sysconfig.get_python_inc());"`
17519		fi
17520                if test -n "${python_path}"; then
17521                        python_path="-I$python_path"
17522                fi
17523                PYTHON_CPPFLAGS=$python_path
17524        fi
17525        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON_CPPFLAGS" >&5
17526$as_echo "$PYTHON_CPPFLAGS" >&6; }
17527
17528
17529        #
17530        # Check for Python library path
17531        #
17532        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Python library path" >&5
17533$as_echo_n "checking for Python library path... " >&6; }
17534        if test -z "$PYTHON_LDFLAGS"; then
17535                PYTHON_LDFLAGS=`$PYTHON -c "from $sysconfig_module import *; \
17536                        print('-L'+get_config_var('LIBDIR')+' -L'+get_config_var('LIBDEST')+' '+get_config_var('BLDLIBRARY'));"`
17537        fi
17538        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON_LDFLAGS" >&5
17539$as_echo "$PYTHON_LDFLAGS" >&6; }
17540
17541
17542        if test -z "$PYTHON_LIBDIR"; then
17543                PYTHON_LIBDIR=`$PYTHON -c "from $sysconfig_module import *; \
17544                        print(get_config_var('LIBDIR'));"`
17545        fi
17546
17547        #
17548        # Check for site packages
17549        #
17550        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Python site-packages path" >&5
17551$as_echo_n "checking for Python site-packages path... " >&6; }
17552        if test -z "$PYTHON_SITE_PKG"; then
17553		if test "$sysconfig_module" = "sysconfig"; then
17554			PYTHON_SITE_PKG=`$PYTHON -c 'import sysconfig; \
17555				print(sysconfig.get_path("platlib"));'`
17556		else
17557			PYTHON_SITE_PKG=`$PYTHON -c "import distutils.sysconfig; \
17558				print(distutils.sysconfig.get_python_lib(1,0));"`
17559		fi
17560        fi
17561        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON_SITE_PKG" >&5
17562$as_echo "$PYTHON_SITE_PKG" >&6; }
17563
17564
17565        #
17566        # final check to see if everything compiles alright
17567        #
17568        { $as_echo "$as_me:${as_lineno-$LINENO}: checking consistency of all components of python development environment" >&5
17569$as_echo_n "checking consistency of all components of python development environment... " >&6; }
17570        ac_ext=c
17571ac_cpp='$CPP $CPPFLAGS'
17572ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
17573ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
17574ac_compiler_gnu=$ac_cv_c_compiler_gnu
17575
17576        # save current global flags
17577        ac_save_LIBS="$LIBS"
17578        ac_save_CPPFLAGS="$CPPFLAGS"
17579
17580        LIBS="$LIBS $PYTHON_LDFLAGS"
17581        CPPFLAGS="$CPPFLAGS $PYTHON_CPPFLAGS"
17582        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17583/* end confdefs.h.  */
17584
17585                #include <Python.h>
17586
17587int
17588main ()
17589{
17590
17591                Py_Initialize();
17592
17593  ;
17594  return 0;
17595}
17596_ACEOF
17597if ac_fn_c_try_link "$LINENO"; then :
17598  pythonexists=yes
17599else
17600  pythonexists=no
17601fi
17602rm -f core conftest.err conftest.$ac_objext \
17603    conftest$ac_exeext conftest.$ac_ext
17604
17605        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pythonexists" >&5
17606$as_echo "$pythonexists" >&6; }
17607
17608        if test ! "$pythonexists" = "yes"; then
17609           as_fn_error $? "
17610  Could not link test program to Python. Maybe the main Python library has been
17611  installed in some non-standard library path. If so, pass it to configure,
17612  via the LDFLAGS environment variable.
17613  Example: ./configure LDFLAGS=\"-L/usr/non-standard-path/python/lib\"
17614  ============================================================================
17615   ERROR!
17616   You probably have to install the development version of the Python package
17617   for your distribution.  The exact name of this package varies among them.
17618  ============================================================================
17619           " "$LINENO" 5
17620          PYTHON_VERSION=""
17621        fi
17622        ac_ext=c
17623ac_cpp='$CPP $CPPFLAGS'
17624ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
17625ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
17626ac_compiler_gnu=$ac_cv_c_compiler_gnu
17627
17628        # turn back to default flags
17629        CPPFLAGS="$ac_save_CPPFLAGS"
17630        LIBS="$ac_save_LIBS"
17631
17632        #
17633        # all done!
17634        #
17635
17636   if test ! -z "$PYTHON_VERSION"; then
17637	if test `$PYTHON -c "print('$PYTHON_VERSION' >= '2.4.0')"` = "False"; then
17638		as_fn_error $? "Python version >= 2.4.0 is required" "$LINENO" 5
17639	fi
17640
17641      PY_MAJOR_VERSION="`$PYTHON -c \"import sys; print(sys.version_info[0])\"`"
17642
17643      # Have Python
17644
17645$as_echo "#define HAVE_PYTHON 1" >>confdefs.h
17646
17647      if test x_$ub_with_pythonmod != x_no; then
17648        if test -n "$LIBS"; then
17649          LIBS="$PYTHON_LDFLAGS $LIBS"
17650        else
17651          LIBS="$PYTHON_LDFLAGS"
17652        fi
17653      fi
17654      PYTHON_LIBS="$PYTHON_LDFLAGS"
17655
17656      if test -n "$CPPFLAGS"; then
17657        CPPFLAGS="$CPPFLAGS $PYTHON_CPPFLAGS"
17658      else
17659        CPPFLAGS="$PYTHON_CPPFLAGS"
17660      fi
17661      if test "$PYTHON_LIBDIR" != "/usr/lib" -a "$PYTHON_LIBDIR" != "" -a "$PYTHON_LIBDIR" != "/usr/lib64"; then
17662
17663	if test "x$enable_rpath" = xyes; then
17664		if echo "$PYTHON_LIBDIR" | grep "^/" >/dev/null; then
17665			RUNTIME_PATH="$RUNTIME_PATH -R$PYTHON_LIBDIR"
17666		fi
17667	fi
17668
17669      fi
17670      ub_have_python=yes
17671      if test -n "$PKG_CONFIG" && \
17672    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\"python\${PY_MAJOR_VERSION}\"\""; } >&5
17673  ($PKG_CONFIG --exists --print-errors ""python${PY_MAJOR_VERSION}"") 2>&5
17674  ac_status=$?
17675  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
17676  test $ac_status = 0; }; then
17677  PC_PY_DEPENDENCY="python${PY_MAJOR_VERSION}"
17678else
17679  PC_PY_DEPENDENCY="python"
17680fi
17681
17682
17683      # Check for SWIG
17684      ub_have_swig=no
17685      # Check whether --enable-swig-version-check was given.
17686if test "${enable_swig_version_check+set}" = set; then :
17687  enableval=$enable_swig_version_check;
17688fi
17689
17690      if test "$enable_swig_version_check" = "yes"; then
17691
17692        # Extract the first word of "swig", so it can be a program name with args.
17693set dummy swig; ac_word=$2
17694{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17695$as_echo_n "checking for $ac_word... " >&6; }
17696if ${ac_cv_path_SWIG+:} false; then :
17697  $as_echo_n "(cached) " >&6
17698else
17699  case $SWIG in
17700  [\\/]* | ?:[\\/]*)
17701  ac_cv_path_SWIG="$SWIG" # Let the user override the test with a path.
17702  ;;
17703  *)
17704  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17705for as_dir in $PATH
17706do
17707  IFS=$as_save_IFS
17708  test -z "$as_dir" && as_dir=.
17709    for ac_exec_ext in '' $ac_executable_extensions; do
17710  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17711    ac_cv_path_SWIG="$as_dir/$ac_word$ac_exec_ext"
17712    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17713    break 2
17714  fi
17715done
17716  done
17717IFS=$as_save_IFS
17718
17719  ;;
17720esac
17721fi
17722SWIG=$ac_cv_path_SWIG
17723if test -n "$SWIG"; then
17724  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SWIG" >&5
17725$as_echo "$SWIG" >&6; }
17726else
17727  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17728$as_echo "no" >&6; }
17729fi
17730
17731
17732        if test -z "$SWIG" ; then
17733                { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot find 'swig' program. You should look at http://www.swig.org" >&5
17734$as_echo "$as_me: WARNING: cannot find 'swig' program. You should look at http://www.swig.org" >&2;}
17735                SWIG='echo "Error: SWIG is not installed. You should look at http://www.swig.org" ; false'
17736        elif test -n "2.0.1" ; then
17737                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SWIG version" >&5
17738$as_echo_n "checking for SWIG version... " >&6; }
17739                swig_version=`$SWIG -version 2>&1 | grep 'SWIG Version' | sed 's/.*\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\).*/\1/g'`
17740                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $swig_version" >&5
17741$as_echo "$swig_version" >&6; }
17742                if test -n "$swig_version" ; then
17743                        # Calculate the required version number components
17744                        required=2.0.1
17745                        required_major=`echo $required | sed 's/[^0-9].*//'`
17746                        if test -z "$required_major" ; then
17747                                required_major=0
17748                        fi
17749                        required=`echo $required | sed 's/[0-9]*[^0-9]//'`
17750                        required_minor=`echo $required | sed 's/[^0-9].*//'`
17751                        if test -z "$required_minor" ; then
17752                                required_minor=0
17753                        fi
17754                        required=`echo $required | sed 's/[0-9]*[^0-9]//'`
17755                        required_patch=`echo $required | sed 's/[^0-9].*//'`
17756                        if test -z "$required_patch" ; then
17757                                required_patch=0
17758                        fi
17759                        # Calculate the available version number components
17760                        available=$swig_version
17761                        available_major=`echo $available | sed 's/[^0-9].*//'`
17762                        if test -z "$available_major" ; then
17763                                available_major=0
17764                        fi
17765                        available=`echo $available | sed 's/[0-9]*[^0-9]//'`
17766                        available_minor=`echo $available | sed 's/[^0-9].*//'`
17767                        if test -z "$available_minor" ; then
17768                                available_minor=0
17769                        fi
17770                        available=`echo $available | sed 's/[0-9]*[^0-9]//'`
17771                        available_patch=`echo $available | sed 's/[^0-9].*//'`
17772                        if test -z "$available_patch" ; then
17773                                available_patch=0
17774                        fi
17775			badversion=0
17776			if test $available_major -lt $required_major ; then
17777				badversion=1
17778			fi
17779                        if test $available_major -eq $required_major \
17780                                -a $available_minor -lt $required_minor ; then
17781				badversion=1
17782			fi
17783                        if test $available_major -eq $required_major \
17784                                -a $available_minor -eq $required_minor \
17785                                -a $available_patch -lt $required_patch ; then
17786				badversion=1
17787			fi
17788			if test $badversion -eq 1 ; then
17789                                { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: SWIG version >= 2.0.1 is required.  You have $swig_version.  You should look at http://www.swig.org" >&5
17790$as_echo "$as_me: WARNING: SWIG version >= 2.0.1 is required.  You have $swig_version.  You should look at http://www.swig.org" >&2;}
17791                                SWIG='echo "Error: SWIG version >= 2.0.1 is required.  You have '"$swig_version"'.  You should look at http://www.swig.org" ; false'
17792                        else
17793                                { $as_echo "$as_me:${as_lineno-$LINENO}: SWIG executable is '$SWIG'" >&5
17794$as_echo "$as_me: SWIG executable is '$SWIG'" >&6;}
17795                                SWIG_LIB=`$SWIG -swiglib`
17796                                { $as_echo "$as_me:${as_lineno-$LINENO}: SWIG library directory is '$SWIG_LIB'" >&5
17797$as_echo "$as_me: SWIG library directory is '$SWIG_LIB'" >&6;}
17798                        fi
17799                else
17800                        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot determine SWIG version" >&5
17801$as_echo "$as_me: WARNING: cannot determine SWIG version" >&2;}
17802                        SWIG='echo "Error: Cannot determine SWIG version.  You should look at http://www.swig.org" ; false'
17803                fi
17804        fi
17805
17806
17807      else
17808
17809        # Extract the first word of "swig", so it can be a program name with args.
17810set dummy swig; ac_word=$2
17811{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17812$as_echo_n "checking for $ac_word... " >&6; }
17813if ${ac_cv_path_SWIG+:} false; then :
17814  $as_echo_n "(cached) " >&6
17815else
17816  case $SWIG in
17817  [\\/]* | ?:[\\/]*)
17818  ac_cv_path_SWIG="$SWIG" # Let the user override the test with a path.
17819  ;;
17820  *)
17821  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17822for as_dir in $PATH
17823do
17824  IFS=$as_save_IFS
17825  test -z "$as_dir" && as_dir=.
17826    for ac_exec_ext in '' $ac_executable_extensions; do
17827  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17828    ac_cv_path_SWIG="$as_dir/$ac_word$ac_exec_ext"
17829    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17830    break 2
17831  fi
17832done
17833  done
17834IFS=$as_save_IFS
17835
17836  ;;
17837esac
17838fi
17839SWIG=$ac_cv_path_SWIG
17840if test -n "$SWIG"; then
17841  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SWIG" >&5
17842$as_echo "$SWIG" >&6; }
17843else
17844  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17845$as_echo "no" >&6; }
17846fi
17847
17848
17849        if test -z "$SWIG" ; then
17850                { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot find 'swig' program. You should look at http://www.swig.org" >&5
17851$as_echo "$as_me: WARNING: cannot find 'swig' program. You should look at http://www.swig.org" >&2;}
17852                SWIG='echo "Error: SWIG is not installed. You should look at http://www.swig.org" ; false'
17853        elif test -n "" ; then
17854                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SWIG version" >&5
17855$as_echo_n "checking for SWIG version... " >&6; }
17856                swig_version=`$SWIG -version 2>&1 | grep 'SWIG Version' | sed 's/.*\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\).*/\1/g'`
17857                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $swig_version" >&5
17858$as_echo "$swig_version" >&6; }
17859                if test -n "$swig_version" ; then
17860                        # Calculate the required version number components
17861                        required=
17862                        required_major=`echo $required | sed 's/[^0-9].*//'`
17863                        if test -z "$required_major" ; then
17864                                required_major=0
17865                        fi
17866                        required=`echo $required | sed 's/[0-9]*[^0-9]//'`
17867                        required_minor=`echo $required | sed 's/[^0-9].*//'`
17868                        if test -z "$required_minor" ; then
17869                                required_minor=0
17870                        fi
17871                        required=`echo $required | sed 's/[0-9]*[^0-9]//'`
17872                        required_patch=`echo $required | sed 's/[^0-9].*//'`
17873                        if test -z "$required_patch" ; then
17874                                required_patch=0
17875                        fi
17876                        # Calculate the available version number components
17877                        available=$swig_version
17878                        available_major=`echo $available | sed 's/[^0-9].*//'`
17879                        if test -z "$available_major" ; then
17880                                available_major=0
17881                        fi
17882                        available=`echo $available | sed 's/[0-9]*[^0-9]//'`
17883                        available_minor=`echo $available | sed 's/[^0-9].*//'`
17884                        if test -z "$available_minor" ; then
17885                                available_minor=0
17886                        fi
17887                        available=`echo $available | sed 's/[0-9]*[^0-9]//'`
17888                        available_patch=`echo $available | sed 's/[^0-9].*//'`
17889                        if test -z "$available_patch" ; then
17890                                available_patch=0
17891                        fi
17892			badversion=0
17893			if test $available_major -lt $required_major ; then
17894				badversion=1
17895			fi
17896                        if test $available_major -eq $required_major \
17897                                -a $available_minor -lt $required_minor ; then
17898				badversion=1
17899			fi
17900                        if test $available_major -eq $required_major \
17901                                -a $available_minor -eq $required_minor \
17902                                -a $available_patch -lt $required_patch ; then
17903				badversion=1
17904			fi
17905			if test $badversion -eq 1 ; then
17906                                { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: SWIG version >=  is required.  You have $swig_version.  You should look at http://www.swig.org" >&5
17907$as_echo "$as_me: WARNING: SWIG version >=  is required.  You have $swig_version.  You should look at http://www.swig.org" >&2;}
17908                                SWIG='echo "Error: SWIG version >=  is required.  You have '"$swig_version"'.  You should look at http://www.swig.org" ; false'
17909                        else
17910                                { $as_echo "$as_me:${as_lineno-$LINENO}: SWIG executable is '$SWIG'" >&5
17911$as_echo "$as_me: SWIG executable is '$SWIG'" >&6;}
17912                                SWIG_LIB=`$SWIG -swiglib`
17913                                { $as_echo "$as_me:${as_lineno-$LINENO}: SWIG library directory is '$SWIG_LIB'" >&5
17914$as_echo "$as_me: SWIG library directory is '$SWIG_LIB'" >&6;}
17915                        fi
17916                else
17917                        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot determine SWIG version" >&5
17918$as_echo "$as_me: WARNING: cannot determine SWIG version" >&2;}
17919                        SWIG='echo "Error: Cannot determine SWIG version.  You should look at http://www.swig.org" ; false'
17920                fi
17921        fi
17922
17923
17924      fi
17925      { $as_echo "$as_me:${as_lineno-$LINENO}: checking SWIG" >&5
17926$as_echo_n "checking SWIG... " >&6; }
17927      if test ! -x "$SWIG"; then
17928         as_fn_error $? "failed to find swig tool, install it, or do not build Python module and PyUnbound" "$LINENO" 5
17929      else
17930
17931$as_echo "#define HAVE_SWIG 1" >>confdefs.h
17932
17933         swig="$SWIG"
17934
17935         { $as_echo "$as_me:${as_lineno-$LINENO}: result: present" >&5
17936$as_echo "present" >&6; }
17937
17938         # If have Python & SWIG
17939         # Declare PythonMod
17940         if test x_$ub_with_pythonmod != x_no; then
17941
17942$as_echo "#define WITH_PYTHONMODULE 1" >>confdefs.h
17943
17944            WITH_PYTHONMODULE=yes
17945
17946	    PYTHONMOD_OBJ="pythonmod.lo pythonmod_utils.lo"
17947
17948	    PYTHONMOD_HEADER='$(srcdir)/pythonmod/pythonmod.h'
17949
17950	    PYTHONMOD_INSTALL=pythonmod-install
17951
17952	    PYTHONMOD_UNINSTALL=pythonmod-uninstall
17953
17954         fi
17955
17956         # Declare PyUnbound
17957         if test x_$ub_with_pyunbound != x_no; then
17958
17959$as_echo "#define WITH_PYUNBOUND 1" >>confdefs.h
17960
17961            WITH_PYUNBOUND=yes
17962
17963	    PYUNBOUND_OBJ="libunbound_wrap.lo"
17964
17965	    PYUNBOUND_TARGET="_unbound.la"
17966
17967	    PYUNBOUND_INSTALL=pyunbound-install
17968
17969	    PYUNBOUND_UNINSTALL=pyunbound-uninstall
17970
17971         fi
17972      fi
17973   else
17974      { $as_echo "$as_me:${as_lineno-$LINENO}: result: *** Python libraries not found, won't build PythonMod or PyUnbound ***" >&5
17975$as_echo "*** Python libraries not found, won't build PythonMod or PyUnbound ***" >&6; }
17976      ub_with_pyunbound=no
17977      ub_with_pythonmod=no
17978   fi
17979fi
17980
17981if test "`uname`" = "NetBSD"; then
17982	NETBSD_LINTFLAGS='"-D__RENAME(x)=" -D_NETINET_IN_H_'
17983
17984fi
17985
17986if test "`uname`" = "Linux"; then
17987	# splint cannot parse modern c99 header files
17988	GCC_DOCKER_LINTFLAGS='-syntax'
17989
17990fi
17991CONFIG_DATE=`date +%Y%m%d`
17992
17993
17994# Checks for libraries.
17995
17996# libnss
17997USE_NSS="no"
17998
17999# Check whether --with-nss was given.
18000if test "${with_nss+set}" = set; then :
18001  withval=$with_nss;
18002	USE_NSS="yes"
18003
18004$as_echo "#define HAVE_NSS 1" >>confdefs.h
18005
18006	if test "$withval" != "" -a "$withval" != "yes"; then
18007		CPPFLAGS="$CPPFLAGS -I$withval/include/nss3"
18008		LDFLAGS="$LDFLAGS -L$withval/lib"
18009
18010	if test "x$enable_rpath" = xyes; then
18011		if echo "$withval/lib" | grep "^/" >/dev/null; then
18012			RUNTIME_PATH="$RUNTIME_PATH -R$withval/lib"
18013		fi
18014	fi
18015
18016		CPPFLAGS="-I$withval/include/nspr4 $CPPFLAGS"
18017	else
18018		CPPFLAGS="$CPPFLAGS -I/usr/include/nss3"
18019		CPPFLAGS="-I/usr/include/nspr4 $CPPFLAGS"
18020	fi
18021        LIBS="$LIBS -lnss3 -lnspr4"
18022	SSLLIB=""
18023	PC_CRYPTO_DEPENDENCY="nss nspr"
18024
18025
18026
18027fi
18028
18029
18030# libnettle
18031USE_NETTLE="no"
18032
18033# Check whether --with-nettle was given.
18034if test "${with_nettle+set}" = set; then :
18035  withval=$with_nettle;
18036	USE_NETTLE="yes"
18037
18038$as_echo "#define HAVE_NETTLE 1" >>confdefs.h
18039
18040	for ac_header in nettle/dsa-compat.h
18041do :
18042  ac_fn_c_check_header_compile "$LINENO" "nettle/dsa-compat.h" "ac_cv_header_nettle_dsa_compat_h" "$ac_includes_default
18043"
18044if test "x$ac_cv_header_nettle_dsa_compat_h" = xyes; then :
18045  cat >>confdefs.h <<_ACEOF
18046#define HAVE_NETTLE_DSA_COMPAT_H 1
18047_ACEOF
18048
18049fi
18050
18051done
18052
18053	if test "$withval" != "" -a "$withval" != "yes"; then
18054		CPPFLAGS="$CPPFLAGS -I$withval/include/nettle"
18055		LDFLAGS="$LDFLAGS -L$withval/lib"
18056
18057	if test "x$enable_rpath" = xyes; then
18058		if echo "$withval/lib" | grep "^/" >/dev/null; then
18059			RUNTIME_PATH="$RUNTIME_PATH -R$withval/lib"
18060		fi
18061	fi
18062
18063	else
18064		CPPFLAGS="$CPPFLAGS -I/usr/include/nettle"
18065	fi
18066        LIBS="$LIBS -lhogweed -lnettle -lgmp"
18067	SSLLIB=""
18068	PC_CRYPTO_DEPENDENCY="hogweed nettle"
18069
18070
18071
18072fi
18073
18074
18075# openssl
18076if test $USE_NSS = "no" -a $USE_NETTLE = "no"; then
18077
18078
18079# Check whether --with-ssl was given.
18080if test "${with_ssl+set}" = set; then :
18081  withval=$with_ssl;
18082
18083else
18084
18085            withval="yes"
18086
18087fi
18088
18089    if test x_$withval = x_no; then
18090	as_fn_error $? "Need SSL library to do digital signature cryptography" "$LINENO" 5
18091    fi
18092
18093    withval=$withval
18094    if test x_$withval != x_no; then
18095        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SSL" >&5
18096$as_echo_n "checking for SSL... " >&6; }
18097	if test -n "$withval"; then
18098										if test ! -f "$withval/include/openssl/ssl.h" -a -f "$withval/openssl/ssl.h"; then
18099			ssldir="$withval"
18100			found_ssl="yes"
18101			withval=""
18102			ssldir_include="$ssldir"
18103						ssldir_lib=`echo $ssldir | sed -e 's/include/lib/'`
18104			if test -f "$ssldir_lib/libssl.a" -o -f "$ssldir_lib/libssl.so"; then
18105				: # found here
18106			else
18107				ssldir_lib=`echo $ssldir | sed -e 's/include/lib64/'`
18108				if test -f "$ssldir_lib/libssl.a" -o -f "$ssldir_lib/libssl.so"; then
18109					: # found here
18110				else
18111					as_fn_error $? "Could not find openssl lib file, $ssldir_lib/libssl.so,a, pass like \"/usr/local\" or \"/usr/include/openssl11\"" "$LINENO" 5
18112				fi
18113			fi
18114		fi
18115	fi
18116        if test x_$withval = x_ -o x_$withval = x_yes; then
18117            withval="/usr/local/ssl /usr/lib/ssl /usr/ssl /usr/pkg /usr/local /opt/local /usr/sfw /usr"
18118        fi
18119        for dir in $withval; do
18120            ssldir="$dir"
18121            if test -f "$dir/include/openssl/ssl.h"; then
18122                found_ssl="yes"
18123		ssldir_include="$ssldir/include"
18124		if test ! -d "$ssldir/lib" -a -d "$ssldir/lib64"; then
18125			ssldir_lib="$ssldir/lib64"
18126		else
18127			ssldir_lib="$ssldir/lib"
18128		fi
18129                break;
18130            fi
18131        done
18132        if test x_$found_ssl != x_yes; then
18133            as_fn_error $? "Cannot find the SSL libraries in $withval" "$LINENO" 5
18134        else
18135            { $as_echo "$as_me:${as_lineno-$LINENO}: result: found in $ssldir" >&5
18136$as_echo "found in $ssldir" >&6; }
18137
18138cat >>confdefs.h <<_ACEOF
18139#define HAVE_SSL /**/
18140_ACEOF
18141
18142            HAVE_SSL=yes
18143	                if test "$ssldir" != "/usr"; then
18144		    CPPFLAGS="$CPPFLAGS -I$ssldir_include"
18145		    LIBSSL_CPPFLAGS="$LIBSSL_CPPFLAGS -I$ssldir_include"
18146		    LDFLAGS="$LDFLAGS -L$ssldir_lib"
18147		    LIBSSL_LDFLAGS="$LIBSSL_LDFLAGS -L$ssldir_lib"
18148
18149	if test "x$enable_rpath" = xyes; then
18150		if echo "$ssldir_lib" | grep "^/" >/dev/null; then
18151			RUNTIME_PATH="$RUNTIME_PATH -R$ssldir_lib"
18152		fi
18153	fi
18154
18155	    fi
18156
18157            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EVP_sha256 in -lcrypto" >&5
18158$as_echo_n "checking for EVP_sha256 in -lcrypto... " >&6; }
18159            LIBS="$LIBS -lcrypto"
18160            LIBSSL_LIBS="$LIBSSL_LIBS -lcrypto"
18161            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18162/* end confdefs.h.  */
18163
18164int
18165main ()
18166{
18167
18168                int EVP_sha256(void);
18169                (void)EVP_sha256();
18170
18171  ;
18172  return 0;
18173}
18174_ACEOF
18175if ac_fn_c_try_link "$LINENO"; then :
18176
18177                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
18178$as_echo "yes" >&6; }
18179
18180$as_echo "#define HAVE_EVP_SHA256 1" >>confdefs.h
18181
18182
18183else
18184
18185                { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18186$as_echo "no" >&6; }
18187                # check if -lwsock32 or -lgdi32 are needed.
18188                BAKLIBS="$LIBS"
18189                BAKSSLLIBS="$LIBSSL_LIBS"
18190		LIBS="$LIBS -lgdi32 -lws2_32"
18191		LIBSSL_LIBS="$LIBSSL_LIBS -lgdi32 -lws2_32"
18192                { $as_echo "$as_me:${as_lineno-$LINENO}: checking if -lcrypto needs -lgdi32" >&5
18193$as_echo_n "checking if -lcrypto needs -lgdi32... " >&6; }
18194                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18195/* end confdefs.h.  */
18196
18197int
18198main ()
18199{
18200
18201                    int EVP_sha256(void);
18202                    (void)EVP_sha256();
18203
18204  ;
18205  return 0;
18206}
18207_ACEOF
18208if ac_fn_c_try_link "$LINENO"; then :
18209
18210
18211$as_echo "#define HAVE_EVP_SHA256 1" >>confdefs.h
18212
18213                    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
18214$as_echo "yes" >&6; }
18215
18216else
18217
18218                    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18219$as_echo "no" >&6; }
18220                    LIBS="$BAKLIBS"
18221                    LIBSSL_LIBS="$BAKSSLLIBS"
18222                    LIBS="$LIBS -ldl"
18223                    LIBSSL_LIBS="$LIBSSL_LIBS -ldl"
18224                    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if -lcrypto needs -ldl" >&5
18225$as_echo_n "checking if -lcrypto needs -ldl... " >&6; }
18226                    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18227/* end confdefs.h.  */
18228
18229int
18230main ()
18231{
18232
18233                        int EVP_sha256(void);
18234                        (void)EVP_sha256();
18235
18236  ;
18237  return 0;
18238}
18239_ACEOF
18240if ac_fn_c_try_link "$LINENO"; then :
18241
18242
18243$as_echo "#define HAVE_EVP_SHA256 1" >>confdefs.h
18244
18245                        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
18246$as_echo "yes" >&6; }
18247
18248else
18249
18250                        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18251$as_echo "no" >&6; }
18252                        LIBS="$BAKLIBS"
18253                        LIBSSL_LIBS="$BAKSSLLIBS"
18254                        LIBS="$LIBS -ldl -pthread"
18255                        LIBSSL_LIBS="$LIBSSL_LIBS -ldl -pthread"
18256                        { $as_echo "$as_me:${as_lineno-$LINENO}: checking if -lcrypto needs -ldl -pthread" >&5
18257$as_echo_n "checking if -lcrypto needs -ldl -pthread... " >&6; }
18258                        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18259/* end confdefs.h.  */
18260
18261int
18262main ()
18263{
18264
18265                            int EVP_sha256(void);
18266                            (void)EVP_sha256();
18267
18268  ;
18269  return 0;
18270}
18271_ACEOF
18272if ac_fn_c_try_link "$LINENO"; then :
18273
18274
18275$as_echo "#define HAVE_EVP_SHA256 1" >>confdefs.h
18276
18277                            { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
18278$as_echo "yes" >&6; }
18279
18280else
18281
18282                            { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18283$as_echo "no" >&6; }
18284                            as_fn_error $? "OpenSSL found in $ssldir, but version 0.9.7 or higher is required" "$LINENO" 5
18285
18286fi
18287rm -f core conftest.err conftest.$ac_objext \
18288    conftest$ac_exeext conftest.$ac_ext
18289
18290fi
18291rm -f core conftest.err conftest.$ac_objext \
18292    conftest$ac_exeext conftest.$ac_ext
18293
18294fi
18295rm -f core conftest.err conftest.$ac_objext \
18296    conftest$ac_exeext conftest.$ac_ext
18297
18298fi
18299rm -f core conftest.err conftest.$ac_objext \
18300    conftest$ac_exeext conftest.$ac_ext
18301        fi
18302
18303
18304    fi
18305for ac_header in openssl/ssl.h
18306do :
18307  ac_fn_c_check_header_compile "$LINENO" "openssl/ssl.h" "ac_cv_header_openssl_ssl_h" "$ac_includes_default
18308"
18309if test "x$ac_cv_header_openssl_ssl_h" = xyes; then :
18310  cat >>confdefs.h <<_ACEOF
18311#define HAVE_OPENSSL_SSL_H 1
18312_ACEOF
18313
18314fi
18315
18316done
18317
18318for ac_header in openssl/err.h
18319do :
18320  ac_fn_c_check_header_compile "$LINENO" "openssl/err.h" "ac_cv_header_openssl_err_h" "$ac_includes_default
18321"
18322if test "x$ac_cv_header_openssl_err_h" = xyes; then :
18323  cat >>confdefs.h <<_ACEOF
18324#define HAVE_OPENSSL_ERR_H 1
18325_ACEOF
18326
18327fi
18328
18329done
18330
18331for ac_header in openssl/rand.h
18332do :
18333  ac_fn_c_check_header_compile "$LINENO" "openssl/rand.h" "ac_cv_header_openssl_rand_h" "$ac_includes_default
18334"
18335if test "x$ac_cv_header_openssl_rand_h" = xyes; then :
18336  cat >>confdefs.h <<_ACEOF
18337#define HAVE_OPENSSL_RAND_H 1
18338_ACEOF
18339
18340fi
18341
18342done
18343
18344
18345
18346
18347# check if libssl needs libdl
18348BAKLIBS="$LIBS"
18349LIBS="-lssl $LIBS"
18350{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if libssl needs libdl" >&5
18351$as_echo_n "checking if libssl needs libdl... " >&6; }
18352cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18353/* end confdefs.h.  */
18354
18355/* Override any GCC internal prototype to avoid an error.
18356   Use char because int might match the return type of a GCC
18357   builtin and then its argument prototype would still apply.  */
18358#ifdef __cplusplus
18359extern "C"
18360#endif
18361char SSL_CTX_new ();
18362int
18363main ()
18364{
18365return SSL_CTX_new ();
18366  ;
18367  return 0;
18368}
18369_ACEOF
18370if ac_fn_c_try_link "$LINENO"; then :
18371
18372	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18373$as_echo "no" >&6; }
18374	LIBS="$BAKLIBS"
18375
18376else
18377
18378	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
18379$as_echo "yes" >&6; }
18380	LIBS="$BAKLIBS"
18381	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
18382$as_echo_n "checking for library containing dlopen... " >&6; }
18383if ${ac_cv_search_dlopen+:} false; then :
18384  $as_echo_n "(cached) " >&6
18385else
18386  ac_func_search_save_LIBS=$LIBS
18387cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18388/* end confdefs.h.  */
18389
18390/* Override any GCC internal prototype to avoid an error.
18391   Use char because int might match the return type of a GCC
18392   builtin and then its argument prototype would still apply.  */
18393#ifdef __cplusplus
18394extern "C"
18395#endif
18396char dlopen ();
18397int
18398main ()
18399{
18400return dlopen ();
18401  ;
18402  return 0;
18403}
18404_ACEOF
18405for ac_lib in '' dl; do
18406  if test -z "$ac_lib"; then
18407    ac_res="none required"
18408  else
18409    ac_res=-l$ac_lib
18410    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
18411  fi
18412  if ac_fn_c_try_link "$LINENO"; then :
18413  ac_cv_search_dlopen=$ac_res
18414fi
18415rm -f core conftest.err conftest.$ac_objext \
18416    conftest$ac_exeext
18417  if ${ac_cv_search_dlopen+:} false; then :
18418  break
18419fi
18420done
18421if ${ac_cv_search_dlopen+:} false; then :
18422
18423else
18424  ac_cv_search_dlopen=no
18425fi
18426rm conftest.$ac_ext
18427LIBS=$ac_func_search_save_LIBS
18428fi
18429{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
18430$as_echo "$ac_cv_search_dlopen" >&6; }
18431ac_res=$ac_cv_search_dlopen
18432if test "$ac_res" != no; then :
18433  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
18434
18435fi
18436
18437
18438fi
18439rm -f core conftest.err conftest.$ac_objext \
18440    conftest$ac_exeext conftest.$ac_ext
18441SSLLIB="-lssl"
18442
18443PC_CRYPTO_DEPENDENCY=""
18444
18445
18446# check if -lcrypt32 is needed because CAPIENG needs that. (on windows)
18447BAKLIBS="$LIBS"
18448LIBS="-lssl $LIBS"
18449{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if libssl needs -lcrypt32" >&5
18450$as_echo_n "checking if libssl needs -lcrypt32... " >&6; }
18451cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18452/* end confdefs.h.  */
18453
18454int
18455main ()
18456{
18457
18458	int EVP_sha256(void);
18459	(void)EVP_sha256();
18460
18461  ;
18462  return 0;
18463}
18464_ACEOF
18465if ac_fn_c_try_link "$LINENO"; then :
18466
18467	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18468$as_echo "no" >&6; }
18469	LIBS="$BAKLIBS"
18470
18471else
18472
18473	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
18474$as_echo "yes" >&6; }
18475	LIBS="$BAKLIBS"
18476	LIBS="$LIBS -lcrypt32"
18477
18478fi
18479rm -f core conftest.err conftest.$ac_objext \
18480    conftest$ac_exeext conftest.$ac_ext
18481
18482{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LibreSSL" >&5
18483$as_echo_n "checking for LibreSSL... " >&6; }
18484if grep VERSION_TEXT $ssldir_include/openssl/opensslv.h | grep "LibreSSL" >/dev/null; then
18485	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
18486$as_echo "yes" >&6; }
18487
18488$as_echo "#define HAVE_LIBRESSL 1" >>confdefs.h
18489
18490	# libressl provides these compat functions, but they may also be
18491	# declared by the OS in libc.  See if they have been declared.
18492	ac_fn_c_check_decl "$LINENO" "strlcpy" "ac_cv_have_decl_strlcpy" "$ac_includes_default"
18493if test "x$ac_cv_have_decl_strlcpy" = xyes; then :
18494  ac_have_decl=1
18495else
18496  ac_have_decl=0
18497fi
18498
18499cat >>confdefs.h <<_ACEOF
18500#define HAVE_DECL_STRLCPY $ac_have_decl
18501_ACEOF
18502ac_fn_c_check_decl "$LINENO" "strlcat" "ac_cv_have_decl_strlcat" "$ac_includes_default"
18503if test "x$ac_cv_have_decl_strlcat" = xyes; then :
18504  ac_have_decl=1
18505else
18506  ac_have_decl=0
18507fi
18508
18509cat >>confdefs.h <<_ACEOF
18510#define HAVE_DECL_STRLCAT $ac_have_decl
18511_ACEOF
18512ac_fn_c_check_decl "$LINENO" "arc4random" "ac_cv_have_decl_arc4random" "$ac_includes_default"
18513if test "x$ac_cv_have_decl_arc4random" = xyes; then :
18514  ac_have_decl=1
18515else
18516  ac_have_decl=0
18517fi
18518
18519cat >>confdefs.h <<_ACEOF
18520#define HAVE_DECL_ARC4RANDOM $ac_have_decl
18521_ACEOF
18522ac_fn_c_check_decl "$LINENO" "arc4random_uniform" "ac_cv_have_decl_arc4random_uniform" "$ac_includes_default"
18523if test "x$ac_cv_have_decl_arc4random_uniform" = xyes; then :
18524  ac_have_decl=1
18525else
18526  ac_have_decl=0
18527fi
18528
18529cat >>confdefs.h <<_ACEOF
18530#define HAVE_DECL_ARC4RANDOM_UNIFORM $ac_have_decl
18531_ACEOF
18532
18533else
18534	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18535$as_echo "no" >&6; }
18536fi
18537for ac_header in openssl/conf.h openssl/engine.h openssl/bn.h openssl/dh.h openssl/dsa.h openssl/rsa.h openssl/core_names.h openssl/param_build.h
18538do :
18539  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
18540ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
18541"
18542if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
18543  cat >>confdefs.h <<_ACEOF
18544#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
18545_ACEOF
18546
18547fi
18548
18549done
18550
18551for ac_func in OPENSSL_config EVP_sha1 EVP_sha256 EVP_sha512 FIPS_mode EVP_default_properties_is_fips_enabled EVP_MD_CTX_new OpenSSL_add_all_digests OPENSSL_init_crypto EVP_cleanup ENGINE_cleanup ERR_load_crypto_strings CRYPTO_cleanup_all_ex_data ERR_free_strings RAND_cleanup DSA_SIG_set0 EVP_dss1 EVP_DigestVerify EVP_aes_256_cbc EVP_EncryptInit_ex HMAC_Init_ex CRYPTO_THREADID_set_callback EVP_MAC_CTX_set_params OSSL_PARAM_BLD_new BIO_set_callback_ex
18552do :
18553  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
18554ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
18555if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
18556  cat >>confdefs.h <<_ACEOF
18557#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
18558_ACEOF
18559
18560fi
18561done
18562
18563
18564# these check_funcs need -lssl
18565BAKLIBS="$LIBS"
18566LIBS="-lssl $LIBS"
18567for ac_func in OPENSSL_init_ssl SSL_CTX_set_security_level SSL_set1_host SSL_get0_peername X509_VERIFY_PARAM_set1_host SSL_CTX_set_ciphersuites SSL_CTX_set_tlsext_ticket_key_evp_cb SSL_CTX_set_alpn_select_cb SSL_get0_alpn_selected SSL_CTX_set_alpn_protos SSL_get1_peer_certificate
18568do :
18569  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
18570ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
18571if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
18572  cat >>confdefs.h <<_ACEOF
18573#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
18574_ACEOF
18575
18576fi
18577done
18578
18579LIBS="$BAKLIBS"
18580
18581ac_fn_c_check_decl "$LINENO" "SSL_COMP_get_compression_methods" "ac_cv_have_decl_SSL_COMP_get_compression_methods" "
18582$ac_includes_default
18583#ifdef HAVE_OPENSSL_ERR_H
18584#include <openssl/err.h>
18585#endif
18586
18587#ifdef HAVE_OPENSSL_RAND_H
18588#include <openssl/rand.h>
18589#endif
18590
18591#ifdef HAVE_OPENSSL_CONF_H
18592#include <openssl/conf.h>
18593#endif
18594
18595#ifdef HAVE_OPENSSL_ENGINE_H
18596#include <openssl/engine.h>
18597#endif
18598#include <openssl/ssl.h>
18599#include <openssl/evp.h>
18600
18601"
18602if test "x$ac_cv_have_decl_SSL_COMP_get_compression_methods" = xyes; then :
18603  ac_have_decl=1
18604else
18605  ac_have_decl=0
18606fi
18607
18608cat >>confdefs.h <<_ACEOF
18609#define HAVE_DECL_SSL_COMP_GET_COMPRESSION_METHODS $ac_have_decl
18610_ACEOF
18611ac_fn_c_check_decl "$LINENO" "sk_SSL_COMP_pop_free" "ac_cv_have_decl_sk_SSL_COMP_pop_free" "
18612$ac_includes_default
18613#ifdef HAVE_OPENSSL_ERR_H
18614#include <openssl/err.h>
18615#endif
18616
18617#ifdef HAVE_OPENSSL_RAND_H
18618#include <openssl/rand.h>
18619#endif
18620
18621#ifdef HAVE_OPENSSL_CONF_H
18622#include <openssl/conf.h>
18623#endif
18624
18625#ifdef HAVE_OPENSSL_ENGINE_H
18626#include <openssl/engine.h>
18627#endif
18628#include <openssl/ssl.h>
18629#include <openssl/evp.h>
18630
18631"
18632if test "x$ac_cv_have_decl_sk_SSL_COMP_pop_free" = xyes; then :
18633  ac_have_decl=1
18634else
18635  ac_have_decl=0
18636fi
18637
18638cat >>confdefs.h <<_ACEOF
18639#define HAVE_DECL_SK_SSL_COMP_POP_FREE $ac_have_decl
18640_ACEOF
18641ac_fn_c_check_decl "$LINENO" "SSL_CTX_set_ecdh_auto" "ac_cv_have_decl_SSL_CTX_set_ecdh_auto" "
18642$ac_includes_default
18643#ifdef HAVE_OPENSSL_ERR_H
18644#include <openssl/err.h>
18645#endif
18646
18647#ifdef HAVE_OPENSSL_RAND_H
18648#include <openssl/rand.h>
18649#endif
18650
18651#ifdef HAVE_OPENSSL_CONF_H
18652#include <openssl/conf.h>
18653#endif
18654
18655#ifdef HAVE_OPENSSL_ENGINE_H
18656#include <openssl/engine.h>
18657#endif
18658#include <openssl/ssl.h>
18659#include <openssl/evp.h>
18660
18661"
18662if test "x$ac_cv_have_decl_SSL_CTX_set_ecdh_auto" = xyes; then :
18663  ac_have_decl=1
18664else
18665  ac_have_decl=0
18666fi
18667
18668cat >>confdefs.h <<_ACEOF
18669#define HAVE_DECL_SSL_CTX_SET_ECDH_AUTO $ac_have_decl
18670_ACEOF
18671
18672
18673if test "$ac_cv_func_HMAC_Init_ex" = "yes"; then
18674# check function return type.
18675{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the return type of HMAC_Init_ex" >&5
18676$as_echo_n "checking the return type of HMAC_Init_ex... " >&6; }
18677cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18678/* end confdefs.h.  */
18679
18680#ifdef HAVE_OPENSSL_ERR_H
18681#include <openssl/err.h>
18682#endif
18683
18684#ifdef HAVE_OPENSSL_RAND_H
18685#include <openssl/rand.h>
18686#endif
18687
18688#ifdef HAVE_OPENSSL_CONF_H
18689#include <openssl/conf.h>
18690#endif
18691
18692#ifdef HAVE_OPENSSL_ENGINE_H
18693#include <openssl/engine.h>
18694#endif
18695#include <openssl/ssl.h>
18696#include <openssl/evp.h>
18697
18698int
18699main ()
18700{
18701
18702	HMAC_CTX* hmac_ctx = NULL;
18703	void* hmac_key = NULL;
18704	const EVP_MD* digest = NULL;
18705	int x = HMAC_Init_ex(hmac_ctx, hmac_key, 32, digest, NULL);
18706	(void)x;
18707
18708  ;
18709  return 0;
18710}
18711_ACEOF
18712if ac_fn_c_try_compile "$LINENO"; then :
18713
18714	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: int" >&5
18715$as_echo "int" >&6; }
18716
18717else
18718
18719	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: void" >&5
18720$as_echo "void" >&6; }
18721
18722$as_echo "#define HMAC_INIT_EX_RETURNS_VOID 1" >>confdefs.h
18723
18724
18725fi
18726rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18727fi
18728
18729fi
18730
18731
18732# libbsd
18733
18734# Check whether --with-libbsd was given.
18735if test "${with_libbsd+set}" = set; then :
18736  withval=$with_libbsd;
18737	for ac_header in bsd/string.h bsd/stdlib.h
18738do :
18739  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
18740ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
18741"
18742if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
18743  cat >>confdefs.h <<_ACEOF
18744#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
18745_ACEOF
18746
18747fi
18748
18749done
18750
18751	if test "x$ac_cv_header_bsd_string_h" = xyes -a "x$ac_cv_header_bsd_stdlib_h" = xyes; then
18752		for func in strlcpy strlcat arc4random arc4random_uniform reallocarray; do
18753			as_ac_Search=`$as_echo "ac_cv_search_$func" | $as_tr_sh`
18754{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing $func" >&5
18755$as_echo_n "checking for library containing $func... " >&6; }
18756if eval \${$as_ac_Search+:} false; then :
18757  $as_echo_n "(cached) " >&6
18758else
18759  ac_func_search_save_LIBS=$LIBS
18760cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18761/* end confdefs.h.  */
18762
18763/* Override any GCC internal prototype to avoid an error.
18764   Use char because int might match the return type of a GCC
18765   builtin and then its argument prototype would still apply.  */
18766#ifdef __cplusplus
18767extern "C"
18768#endif
18769char $func ();
18770int
18771main ()
18772{
18773return $func ();
18774  ;
18775  return 0;
18776}
18777_ACEOF
18778for ac_lib in '' bsd; do
18779  if test -z "$ac_lib"; then
18780    ac_res="none required"
18781  else
18782    ac_res=-l$ac_lib
18783    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
18784  fi
18785  if ac_fn_c_try_link "$LINENO"; then :
18786  eval "$as_ac_Search=\$ac_res"
18787fi
18788rm -f core conftest.err conftest.$ac_objext \
18789    conftest$ac_exeext
18790  if eval \${$as_ac_Search+:} false; then :
18791  break
18792fi
18793done
18794if eval \${$as_ac_Search+:} false; then :
18795
18796else
18797  eval "$as_ac_Search=no"
18798fi
18799rm conftest.$ac_ext
18800LIBS=$ac_func_search_save_LIBS
18801fi
18802eval ac_res=\$$as_ac_Search
18803	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
18804$as_echo "$ac_res" >&6; }
18805eval ac_res=\$$as_ac_Search
18806if test "$ac_res" != no; then :
18807  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
18808
18809
18810$as_echo "#define HAVE_LIBBSD 1" >>confdefs.h
18811
18812				PC_LIBBSD_DEPENDENCY=libbsd
18813
18814
18815fi
18816
18817		done
18818	fi
18819
18820fi
18821
18822
18823# Check whether --enable-sha1 was given.
18824if test "${enable_sha1+set}" = set; then :
18825  enableval=$enable_sha1;
18826fi
18827
18828case "$enable_sha1" in
18829	no)
18830	;;
18831	yes|*)
18832
18833$as_echo "#define USE_SHA1 1" >>confdefs.h
18834
18835	;;
18836esac
18837
18838
18839# Check whether --enable-sha2 was given.
18840if test "${enable_sha2+set}" = set; then :
18841  enableval=$enable_sha2;
18842fi
18843
18844case "$enable_sha2" in
18845	no)
18846	;;
18847	yes|*)
18848
18849$as_echo "#define USE_SHA2 1" >>confdefs.h
18850
18851	;;
18852esac
18853
18854# Check whether --enable-subnet was given.
18855if test "${enable_subnet+set}" = set; then :
18856  enableval=$enable_subnet;
18857fi
18858
18859case "$enable_subnet" in
18860	yes)
18861
18862$as_echo "#define CLIENT_SUBNET 1" >>confdefs.h
18863
18864	SUBNET_OBJ="edns-subnet.lo subnetmod.lo addrtree.lo subnet-whitelist.lo"
18865
18866	SUBNET_HEADER='$(srcdir)/edns-subnet/subnetmod.h $(srcdir)/edns-subnet/edns-subnet.h $(srcdir)/edns-subnet/subnet-whitelist.h $(srcdir)/edns-subnet/addrtree.h'
18867
18868	;;
18869	no|*)
18870	;;
18871esac
18872
18873# check whether gost also works
18874
18875# Check whether --enable-gost was given.
18876if test "${enable_gost+set}" = set; then :
18877  enableval=$enable_gost;
18878fi
18879
18880use_gost="no"
18881if test $USE_NSS = "no" -a $USE_NETTLE = "no"; then
18882case "$enable_gost" in
18883	no)
18884	;;
18885	*)
18886	ac_fn_c_check_func "$LINENO" "EVP_PKEY_set_type_str" "ac_cv_func_EVP_PKEY_set_type_str"
18887if test "x$ac_cv_func_EVP_PKEY_set_type_str" = xyes; then :
18888  :
18889else
18890  as_fn_error $? "OpenSSL 1.0.0 is needed for GOST support" "$LINENO" 5
18891fi
18892
18893	ac_fn_c_check_func "$LINENO" "EC_KEY_new" "ac_cv_func_EC_KEY_new"
18894if test "x$ac_cv_func_EC_KEY_new" = xyes; then :
18895
18896else
18897  as_fn_error $? "OpenSSL does not support ECC, needed for GOST support" "$LINENO" 5
18898fi
18899
18900
18901{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if GOST works" >&5
18902$as_echo_n "checking if GOST works... " >&6; }
18903if test c${cross_compiling} = cno; then
18904BAKCFLAGS="$CFLAGS"
18905if test -n "$ssldir"; then
18906	CFLAGS="$CFLAGS -Wl,-rpath,$ssldir_lib"
18907fi
18908if test "$cross_compiling" = yes; then :
18909  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
18910$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
18911as_fn_error $? "cannot run test program while cross compiling
18912See \`config.log' for more details" "$LINENO" 5; }
18913else
18914  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18915/* end confdefs.h.  */
18916
18917#include <string.h>
18918#include <openssl/ssl.h>
18919#include <openssl/evp.h>
18920#include <openssl/engine.h>
18921#include <openssl/conf.h>
18922/* routine to load gost (from sldns) */
18923int load_gost_id(void)
18924{
18925	static int gost_id = 0;
18926	const EVP_PKEY_ASN1_METHOD* meth;
18927	ENGINE* e;
18928
18929	if(gost_id) return gost_id;
18930
18931	/* see if configuration loaded gost implementation from other engine*/
18932	meth = EVP_PKEY_asn1_find_str(NULL, "gost2001", -1);
18933	if(meth) {
18934		EVP_PKEY_asn1_get0_info(&gost_id, NULL, NULL, NULL, NULL, meth);
18935		return gost_id;
18936	}
18937
18938	/* see if engine can be loaded already */
18939	e = ENGINE_by_id("gost");
18940	if(!e) {
18941		/* load it ourself, in case statically linked */
18942		ENGINE_load_builtin_engines();
18943		ENGINE_load_dynamic();
18944		e = ENGINE_by_id("gost");
18945	}
18946	if(!e) {
18947		/* no gost engine in openssl */
18948		return 0;
18949	}
18950	if(!ENGINE_set_default(e, ENGINE_METHOD_ALL)) {
18951		ENGINE_finish(e);
18952		ENGINE_free(e);
18953		return 0;
18954	}
18955
18956	meth = EVP_PKEY_asn1_find_str(&e, "gost2001", -1);
18957	if(!meth) {
18958		/* algo not found */
18959		ENGINE_finish(e);
18960		ENGINE_free(e);
18961		return 0;
18962	}
18963	EVP_PKEY_asn1_get0_info(&gost_id, NULL, NULL, NULL, NULL, meth);
18964	return gost_id;
18965}
18966int main(void) {
18967	EVP_MD_CTX* ctx;
18968	const EVP_MD* md;
18969	unsigned char digest[64]; /* its a 256-bit digest, so uses 32 bytes */
18970	const char* str = "Hello world";
18971	const unsigned char check[] = {
18972		0x40 , 0xed , 0xf8 , 0x56 , 0x5a , 0xc5 , 0x36 , 0xe1 ,
18973		0x33 , 0x7c , 0x7e , 0x87 , 0x62 , 0x1c , 0x42 , 0xe0 ,
18974		0x17 , 0x1b , 0x5e , 0xce , 0xa8 , 0x46 , 0x65 , 0x4d ,
18975		0x8d , 0x3e , 0x22 , 0x9b , 0xe1 , 0x30 , 0x19 , 0x9d
18976	};
18977	OPENSSL_config(NULL);
18978	(void)load_gost_id();
18979	md = EVP_get_digestbyname("md_gost94");
18980	if(!md) return 1;
18981	memset(digest, 0, sizeof(digest));
18982	ctx = EVP_MD_CTX_create();
18983	if(!ctx) return 2;
18984	if(!EVP_DigestInit_ex(ctx, md, NULL)) return 3;
18985	if(!EVP_DigestUpdate(ctx, str, 10)) return 4;
18986	if(!EVP_DigestFinal_ex(ctx, digest, NULL)) return 5;
18987	/* uncomment to see the hash calculated.
18988		{int i;
18989		for(i=0; i<32; i++)
18990			printf(" %2.2x", (int)digest[i]);
18991		printf("\n");}
18992	*/
18993	if(memcmp(digest, check, sizeof(check)) != 0)
18994		return 6;
18995	return 0;
18996}
18997
18998_ACEOF
18999if ac_fn_c_try_run "$LINENO"; then :
19000  eval "ac_cv_c_gost_works=yes"
19001else
19002  eval "ac_cv_c_gost_works=no"
19003fi
19004rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19005  conftest.$ac_objext conftest.beam conftest.$ac_ext
19006fi
19007
19008CFLAGS="$BAKCFLAGS"
19009else
19010eval "ac_cv_c_gost_works=maybe"
19011fi
19012{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_gost_works" >&5
19013$as_echo "$ac_cv_c_gost_works" >&6; }
19014
19015	if test "$ac_cv_c_gost_works" != no; then
19016		use_gost="yes"
19017
19018$as_echo "#define USE_GOST 1" >>confdefs.h
19019
19020	fi
19021	;;
19022esac
19023fi
19024# Check whether --enable-ecdsa was given.
19025if test "${enable_ecdsa+set}" = set; then :
19026  enableval=$enable_ecdsa;
19027fi
19028
19029use_ecdsa="no"
19030case "$enable_ecdsa" in
19031    no)
19032      ;;
19033    *)
19034      if test $USE_NSS = "no" -a $USE_NETTLE = "no"; then
19035	      ac_fn_c_check_func "$LINENO" "ECDSA_sign" "ac_cv_func_ECDSA_sign"
19036if test "x$ac_cv_func_ECDSA_sign" = xyes; then :
19037
19038else
19039  as_fn_error $? "OpenSSL does not support ECDSA: please upgrade or rerun with --disable-ecdsa" "$LINENO" 5
19040fi
19041
19042	      ac_fn_c_check_func "$LINENO" "SHA384_Init" "ac_cv_func_SHA384_Init"
19043if test "x$ac_cv_func_SHA384_Init" = xyes; then :
19044
19045else
19046  as_fn_error $? "OpenSSL does not support SHA384: please upgrade or rerun with --disable-ecdsa" "$LINENO" 5
19047fi
19048
19049	      ac_fn_c_check_decl "$LINENO" "NID_X9_62_prime256v1" "ac_cv_have_decl_NID_X9_62_prime256v1" "$ac_includes_default
19050#include <openssl/evp.h>
19051
19052"
19053if test "x$ac_cv_have_decl_NID_X9_62_prime256v1" = xyes; then :
19054  ac_have_decl=1
19055else
19056  ac_have_decl=0
19057fi
19058
19059cat >>confdefs.h <<_ACEOF
19060#define HAVE_DECL_NID_X9_62_PRIME256V1 $ac_have_decl
19061_ACEOF
19062if test $ac_have_decl = 1; then :
19063
19064else
19065  as_fn_error $? "OpenSSL does not support the ECDSA curves: please upgrade or rerun with --disable-ecdsa" "$LINENO" 5
19066fi
19067ac_fn_c_check_decl "$LINENO" "NID_secp384r1" "ac_cv_have_decl_NID_secp384r1" "$ac_includes_default
19068#include <openssl/evp.h>
19069
19070"
19071if test "x$ac_cv_have_decl_NID_secp384r1" = xyes; then :
19072  ac_have_decl=1
19073else
19074  ac_have_decl=0
19075fi
19076
19077cat >>confdefs.h <<_ACEOF
19078#define HAVE_DECL_NID_SECP384R1 $ac_have_decl
19079_ACEOF
19080if test $ac_have_decl = 1; then :
19081
19082else
19083  as_fn_error $? "OpenSSL does not support the ECDSA curves: please upgrade or rerun with --disable-ecdsa" "$LINENO" 5
19084fi
19085
19086	      # see if OPENSSL 1.0.0 or later (has EVP MD and Verify independency)
19087	      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if openssl supports SHA2 and ECDSA with EVP" >&5
19088$as_echo_n "checking if openssl supports SHA2 and ECDSA with EVP... " >&6; }
19089	      if grep OPENSSL_VERSION_TEXT $ssldir_include/openssl/opensslv.h | grep "OpenSSL" >/dev/null; then
19090		if grep OPENSSL_VERSION_NUMBER $ssldir_include/openssl/opensslv.h | grep 0x0 >/dev/null; then
19091		  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19092$as_echo "no" >&6; }
19093
19094cat >>confdefs.h <<_ACEOF
19095#define USE_ECDSA_EVP_WORKAROUND 1
19096_ACEOF
19097
19098		else
19099		  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19100$as_echo "yes" >&6; }
19101		fi
19102	      else
19103		# not OpenSSL, thus likely LibreSSL, which supports it
19104		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19105$as_echo "yes" >&6; }
19106	      fi
19107      fi
19108      # we now know we have ECDSA and the required curves.
19109
19110cat >>confdefs.h <<_ACEOF
19111#define USE_ECDSA 1
19112_ACEOF
19113
19114      use_ecdsa="yes"
19115      ;;
19116esac
19117
19118# Check whether --enable-dsa was given.
19119if test "${enable_dsa+set}" = set; then :
19120  enableval=$enable_dsa;
19121fi
19122
19123use_dsa="no"
19124case "$enable_dsa" in
19125    yes)
19126      # detect if DSA is supported, and turn it off if not.
19127      if test $USE_NSS = "no" -a $USE_NETTLE = "no"; then
19128      ac_fn_c_check_func "$LINENO" "DSA_SIG_new" "ac_cv_func_DSA_SIG_new"
19129if test "x$ac_cv_func_DSA_SIG_new" = xyes; then :
19130
19131      as_ac_Type=`$as_echo "ac_cv_type_DSA_SIG*" | $as_tr_sh`
19132ac_fn_c_check_type "$LINENO" "DSA_SIG*" "$as_ac_Type" "
19133$ac_includes_default
19134#ifdef HAVE_OPENSSL_ERR_H
19135#include <openssl/err.h>
19136#endif
19137
19138#ifdef HAVE_OPENSSL_RAND_H
19139#include <openssl/rand.h>
19140#endif
19141
19142#ifdef HAVE_OPENSSL_CONF_H
19143#include <openssl/conf.h>
19144#endif
19145
19146#ifdef HAVE_OPENSSL_ENGINE_H
19147#include <openssl/engine.h>
19148#endif
19149
19150"
19151if eval test \"x\$"$as_ac_Type"\" = x"yes"; then :
19152
19153
19154cat >>confdefs.h <<_ACEOF
19155#define USE_DSA 1
19156_ACEOF
19157
19158
19159else
19160  if test "x$enable_dsa" = "xyes"; then as_fn_error $? "OpenSSL does not support DSA and you used --enable-dsa." "$LINENO" 5
19161               fi
19162fi
19163
19164
19165else
19166  if test "x$enable_dsa" = "xyes"; then as_fn_error $? "OpenSSL does not support DSA and you used --enable-dsa." "$LINENO" 5
19167               fi
19168fi
19169
19170      else
19171
19172cat >>confdefs.h <<_ACEOF
19173#define USE_DSA 1
19174_ACEOF
19175
19176      fi
19177      ;;
19178    *)
19179      # disable dsa by default, RFC 8624 section 3.1, validators MUST NOT
19180      # support DSA for DNSSEC Validation.
19181      ;;
19182esac
19183
19184
19185# Check whether --with-deprecate-rsa-1024 was given.
19186if test "${with_deprecate_rsa_1024+set}" = set; then :
19187  withval=$with_deprecate_rsa_1024;
19188fi
19189
19190if test "$with_deprecate_rsa_1024" = "yes"; then
19191
19192$as_echo "#define DEPRECATE_RSA_1024 1" >>confdefs.h
19193
19194fi
19195
19196# Check whether --enable-ed25519 was given.
19197if test "${enable_ed25519+set}" = set; then :
19198  enableval=$enable_ed25519;
19199fi
19200
19201use_ed25519="no"
19202case "$enable_ed25519" in
19203    no)
19204      ;;
19205    *)
19206      if test $USE_NSS = "no" -a $USE_NETTLE = "no"; then
19207	      ac_fn_c_check_decl "$LINENO" "NID_ED25519" "ac_cv_have_decl_NID_ED25519" "$ac_includes_default
19208#include <openssl/evp.h>
19209
19210"
19211if test "x$ac_cv_have_decl_NID_ED25519" = xyes; then :
19212  ac_have_decl=1
19213else
19214  ac_have_decl=0
19215fi
19216
19217cat >>confdefs.h <<_ACEOF
19218#define HAVE_DECL_NID_ED25519 $ac_have_decl
19219_ACEOF
19220if test $ac_have_decl = 1; then :
19221
19222      		use_ed25519="yes"
19223
19224else
19225   if test "x$enable_ed25519" = "xyes"; then as_fn_error $? "OpenSSL does not support ED25519 and you used --enable-ed25519." "$LINENO" 5
19226	      	fi
19227fi
19228
19229      fi
19230      if test $USE_NETTLE = "yes"; then
19231		for ac_header in nettle/eddsa.h
19232do :
19233  ac_fn_c_check_header_compile "$LINENO" "nettle/eddsa.h" "ac_cv_header_nettle_eddsa_h" "$ac_includes_default
19234"
19235if test "x$ac_cv_header_nettle_eddsa_h" = xyes; then :
19236  cat >>confdefs.h <<_ACEOF
19237#define HAVE_NETTLE_EDDSA_H 1
19238_ACEOF
19239 use_ed25519="yes"
19240fi
19241
19242done
19243
19244      fi
19245      if test $use_ed25519 = "yes"; then
19246
19247cat >>confdefs.h <<_ACEOF
19248#define USE_ED25519 1
19249_ACEOF
19250
19251      fi
19252      ;;
19253esac
19254
19255# Check whether --enable-ed448 was given.
19256if test "${enable_ed448+set}" = set; then :
19257  enableval=$enable_ed448;
19258fi
19259
19260use_ed448="no"
19261case "$enable_ed448" in
19262    no)
19263      ;;
19264    *)
19265      if test $USE_NSS = "no" -a $USE_NETTLE = "no"; then
19266	      ac_fn_c_check_decl "$LINENO" "NID_ED448" "ac_cv_have_decl_NID_ED448" "$ac_includes_default
19267#include <openssl/evp.h>
19268
19269"
19270if test "x$ac_cv_have_decl_NID_ED448" = xyes; then :
19271  ac_have_decl=1
19272else
19273  ac_have_decl=0
19274fi
19275
19276cat >>confdefs.h <<_ACEOF
19277#define HAVE_DECL_NID_ED448 $ac_have_decl
19278_ACEOF
19279if test $ac_have_decl = 1; then :
19280
19281      		use_ed448="yes"
19282
19283else
19284   if test "x$enable_ed448" = "xyes"; then as_fn_error $? "OpenSSL does not support ED448 and you used --enable-ed448." "$LINENO" 5
19285	      	fi
19286fi
19287
19288      fi
19289      if test $use_ed448 = "yes"; then
19290
19291cat >>confdefs.h <<_ACEOF
19292#define USE_ED448 1
19293_ACEOF
19294
19295      fi
19296      ;;
19297esac
19298
19299# Check whether --enable-event-api was given.
19300if test "${enable_event_api+set}" = set; then :
19301  enableval=$enable_event_api;
19302fi
19303
19304case "$enable_event_api" in
19305    yes)
19306      UNBOUND_EVENT_INSTALL=unbound-event-install
19307
19308      UNBOUND_EVENT_UNINSTALL=unbound-event-uninstall
19309
19310      ;;
19311    *)
19312      ;;
19313esac
19314
19315# Check whether --enable-tfo-client was given.
19316if test "${enable_tfo_client+set}" = set; then :
19317  enableval=$enable_tfo_client;
19318fi
19319
19320case "$enable_tfo_client" in
19321	yes)
19322		case "$host_os" in
19323			linux*) ac_fn_c_check_decl "$LINENO" "MSG_FASTOPEN" "ac_cv_have_decl_MSG_FASTOPEN" "$ac_includes_default
19324#include <netinet/tcp.h>
19325
19326"
19327if test "x$ac_cv_have_decl_MSG_FASTOPEN" = xyes; then :
19328  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Check the platform specific TFO kernel parameters are correctly configured to support client mode TFO" >&5
19329$as_echo "$as_me: WARNING: Check the platform specific TFO kernel parameters are correctly configured to support client mode TFO" >&2;}
19330else
19331  as_fn_error $? "TCP Fast Open is not available for client mode: please rerun without --enable-tfo-client" "$LINENO" 5
19332fi
19333
19334
19335cat >>confdefs.h <<_ACEOF
19336#define USE_MSG_FASTOPEN 1
19337_ACEOF
19338
19339				;;
19340			darwin*) ac_fn_c_check_decl "$LINENO" "CONNECT_RESUME_ON_READ_WRITE" "ac_cv_have_decl_CONNECT_RESUME_ON_READ_WRITE" "$ac_includes_default
19341#include <sys/socket.h>
19342
19343"
19344if test "x$ac_cv_have_decl_CONNECT_RESUME_ON_READ_WRITE" = xyes; then :
19345  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Check the platform specific TFO kernel parameters are correctly configured to support client mode TFO" >&5
19346$as_echo "$as_me: WARNING: Check the platform specific TFO kernel parameters are correctly configured to support client mode TFO" >&2;}
19347else
19348  as_fn_error $? "TCP Fast Open is not available for client mode: please rerun without --enable-tfo-client" "$LINENO" 5
19349fi
19350
19351
19352cat >>confdefs.h <<_ACEOF
19353#define USE_OSX_MSG_FASTOPEN 1
19354_ACEOF
19355
19356				;;
19357		esac
19358		;;
19359	no|*)
19360		;;
19361esac
19362
19363# Check whether --enable-tfo-server was given.
19364if test "${enable_tfo_server+set}" = set; then :
19365  enableval=$enable_tfo_server;
19366fi
19367
19368case "$enable_tfo_server" in
19369	yes)
19370	      ac_fn_c_check_decl "$LINENO" "TCP_FASTOPEN" "ac_cv_have_decl_TCP_FASTOPEN" "$ac_includes_default
19371#include <netinet/tcp.h>
19372
19373"
19374if test "x$ac_cv_have_decl_TCP_FASTOPEN" = xyes; then :
19375  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Check the platform specific TFO kernel parameters are correctly configured to support server mode TFO" >&5
19376$as_echo "$as_me: WARNING: Check the platform specific TFO kernel parameters are correctly configured to support server mode TFO" >&2;}
19377else
19378  as_fn_error $? "TCP Fast Open is not available for server mode: please rerun without --enable-tfo-server" "$LINENO" 5
19379fi
19380
19381
19382cat >>confdefs.h <<_ACEOF
19383#define USE_TCP_FASTOPEN 1
19384_ACEOF
19385
19386		;;
19387	no|*)
19388		;;
19389esac
19390
19391# check for libevent
19392
19393# Check whether --with-libevent was given.
19394if test "${with_libevent+set}" = set; then :
19395  withval=$with_libevent;
19396else
19397   with_libevent="no"
19398fi
19399
19400if test "x_$with_libevent" != x_no; then
19401
19402$as_echo "#define USE_LIBEVENT 1" >>confdefs.h
19403
19404        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libevent" >&5
19405$as_echo_n "checking for libevent... " >&6; }
19406        if test "x_$with_libevent" = x_ -o "x_$with_libevent" = x_yes; then
19407            with_libevent="/usr/local /opt/local /usr/lib /usr/pkg /usr/sfw /usr"
19408        fi
19409        for dir in $with_libevent; do
19410            thedir="$dir"
19411            if test -f "$dir/include/event.h" -o -f "$dir/include/event2/event.h"; then
19412                found_libevent="yes"
19413								if test "$thedir" != "/usr"; then
19414				    CPPFLAGS="$CPPFLAGS -I$thedir/include"
19415				fi
19416				break;
19417		    fi
19418        done
19419        if test x_$found_libevent != x_yes; then
19420		if test -f "$dir/event.h" -a \( -f "$dir/libevent.la" -o -f "$dir/libev.la" \) ; then
19421			# libevent source directory
19422			{ $as_echo "$as_me:${as_lineno-$LINENO}: result: found in $thedir" >&5
19423$as_echo "found in $thedir" >&6; }
19424			CPPFLAGS="$CPPFLAGS -I$thedir -I$thedir/include"
19425			BAK_LDFLAGS_SET="1"
19426			BAK_LDFLAGS="$LDFLAGS"
19427			# remove evdns from linking
19428			mkdir build >/dev/null 2>&1
19429			mkdir build/libevent >/dev/null 2>&1
19430			mkdir build/libevent/.libs >/dev/null 2>&1
19431			ev_files_o=`ls $thedir/*.o | grep -v evdns\.o | grep -v bufferevent_openssl\.o`
19432			ev_files_lo=`ls $thedir/*.lo | grep -v evdns\.lo | grep -v bufferevent_openssl\.lo`
19433			ev_files_libso=`ls $thedir/.libs/*.o | grep -v evdns\.o | grep -v bufferevent_openssl\.o`
19434			cp $ev_files_o build/libevent
19435			cp $ev_files_lo build/libevent
19436			cp $ev_files_libso build/libevent/.libs
19437			LATE_LDFLAGS="build/libevent/*.lo -lm"
19438			LDFLAGS="build/libevent/*.o $LDFLAGS -lm"
19439		else
19440            as_fn_error $? "Cannot find the libevent library in $with_libevent
19441You can restart ./configure --with-libevent=no to use a builtin alternative.
19442Please note that this alternative is not as capable as libevent when using
19443large outgoing port ranges.  " "$LINENO" 5
19444		fi
19445        else
19446            { $as_echo "$as_me:${as_lineno-$LINENO}: result: found in $thedir" >&5
19447$as_echo "found in $thedir" >&6; }
19448	    	    if test ! -f $thedir/lib/libevent.a -a ! -f $thedir/lib/libevent.so -a -d "$thedir/lib/event2"; then
19449		    LDFLAGS="$LDFLAGS -L$thedir/lib/event2"
19450
19451	if test "x$enable_rpath" = xyes; then
19452		if echo "$thedir/lib/event2" | grep "^/" >/dev/null; then
19453			RUNTIME_PATH="$RUNTIME_PATH -R$thedir/lib/event2"
19454		fi
19455	fi
19456
19457	    else
19458		    		    if test "$thedir" != "/usr" -a "$thedir" != ""; then
19459			LDFLAGS="$LDFLAGS -L$thedir/lib"
19460
19461	if test "x$enable_rpath" = xyes; then
19462		if echo "$thedir/lib" | grep "^/" >/dev/null; then
19463			RUNTIME_PATH="$RUNTIME_PATH -R$thedir/lib"
19464		fi
19465	fi
19466
19467		    fi
19468	    fi
19469        fi
19470	# check for library used by libevent after 1.3c
19471	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5
19472$as_echo_n "checking for library containing clock_gettime... " >&6; }
19473if ${ac_cv_search_clock_gettime+:} false; then :
19474  $as_echo_n "(cached) " >&6
19475else
19476  ac_func_search_save_LIBS=$LIBS
19477cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19478/* end confdefs.h.  */
19479
19480/* Override any GCC internal prototype to avoid an error.
19481   Use char because int might match the return type of a GCC
19482   builtin and then its argument prototype would still apply.  */
19483#ifdef __cplusplus
19484extern "C"
19485#endif
19486char clock_gettime ();
19487int
19488main ()
19489{
19490return clock_gettime ();
19491  ;
19492  return 0;
19493}
19494_ACEOF
19495for ac_lib in '' rt; do
19496  if test -z "$ac_lib"; then
19497    ac_res="none required"
19498  else
19499    ac_res=-l$ac_lib
19500    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
19501  fi
19502  if ac_fn_c_try_link "$LINENO"; then :
19503  ac_cv_search_clock_gettime=$ac_res
19504fi
19505rm -f core conftest.err conftest.$ac_objext \
19506    conftest$ac_exeext
19507  if ${ac_cv_search_clock_gettime+:} false; then :
19508  break
19509fi
19510done
19511if ${ac_cv_search_clock_gettime+:} false; then :
19512
19513else
19514  ac_cv_search_clock_gettime=no
19515fi
19516rm conftest.$ac_ext
19517LIBS=$ac_func_search_save_LIBS
19518fi
19519{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5
19520$as_echo "$ac_cv_search_clock_gettime" >&6; }
19521ac_res=$ac_cv_search_clock_gettime
19522if test "$ac_res" != no; then :
19523  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
19524
19525fi
19526
19527
19528	# is the event.h header libev or libevent?
19529	for ac_header in event.h
19530do :
19531  ac_fn_c_check_header_compile "$LINENO" "event.h" "ac_cv_header_event_h" "$ac_includes_default
19532"
19533if test "x$ac_cv_header_event_h" = xyes; then :
19534  cat >>confdefs.h <<_ACEOF
19535#define HAVE_EVENT_H 1
19536_ACEOF
19537
19538fi
19539
19540done
19541
19542	ac_fn_c_check_decl "$LINENO" "EV_VERSION_MAJOR" "ac_cv_have_decl_EV_VERSION_MAJOR" "$ac_includes_default
19543#include <event.h>
19544
19545"
19546if test "x$ac_cv_have_decl_EV_VERSION_MAJOR" = xyes; then :
19547
19548		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing event_set" >&5
19549$as_echo_n "checking for library containing event_set... " >&6; }
19550if ${ac_cv_search_event_set+:} false; then :
19551  $as_echo_n "(cached) " >&6
19552else
19553  ac_func_search_save_LIBS=$LIBS
19554cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19555/* end confdefs.h.  */
19556
19557/* Override any GCC internal prototype to avoid an error.
19558   Use char because int might match the return type of a GCC
19559   builtin and then its argument prototype would still apply.  */
19560#ifdef __cplusplus
19561extern "C"
19562#endif
19563char event_set ();
19564int
19565main ()
19566{
19567return event_set ();
19568  ;
19569  return 0;
19570}
19571_ACEOF
19572for ac_lib in '' ev; do
19573  if test -z "$ac_lib"; then
19574    ac_res="none required"
19575  else
19576    ac_res=-l$ac_lib
19577    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
19578  fi
19579  if ac_fn_c_try_link "$LINENO"; then :
19580  ac_cv_search_event_set=$ac_res
19581fi
19582rm -f core conftest.err conftest.$ac_objext \
19583    conftest$ac_exeext
19584  if ${ac_cv_search_event_set+:} false; then :
19585  break
19586fi
19587done
19588if ${ac_cv_search_event_set+:} false; then :
19589
19590else
19591  ac_cv_search_event_set=no
19592fi
19593rm conftest.$ac_ext
19594LIBS=$ac_func_search_save_LIBS
19595fi
19596{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_event_set" >&5
19597$as_echo "$ac_cv_search_event_set" >&6; }
19598ac_res=$ac_cv_search_event_set
19599if test "$ac_res" != no; then :
19600  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
19601
19602fi
19603
19604
19605else
19606
19607		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing event_set" >&5
19608$as_echo_n "checking for library containing event_set... " >&6; }
19609if ${ac_cv_search_event_set+:} false; then :
19610  $as_echo_n "(cached) " >&6
19611else
19612  ac_func_search_save_LIBS=$LIBS
19613cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19614/* end confdefs.h.  */
19615
19616/* Override any GCC internal prototype to avoid an error.
19617   Use char because int might match the return type of a GCC
19618   builtin and then its argument prototype would still apply.  */
19619#ifdef __cplusplus
19620extern "C"
19621#endif
19622char event_set ();
19623int
19624main ()
19625{
19626return event_set ();
19627  ;
19628  return 0;
19629}
19630_ACEOF
19631for ac_lib in '' event; do
19632  if test -z "$ac_lib"; then
19633    ac_res="none required"
19634  else
19635    ac_res=-l$ac_lib
19636    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
19637  fi
19638  if ac_fn_c_try_link "$LINENO"; then :
19639  ac_cv_search_event_set=$ac_res
19640fi
19641rm -f core conftest.err conftest.$ac_objext \
19642    conftest$ac_exeext
19643  if ${ac_cv_search_event_set+:} false; then :
19644  break
19645fi
19646done
19647if ${ac_cv_search_event_set+:} false; then :
19648
19649else
19650  ac_cv_search_event_set=no
19651fi
19652rm conftest.$ac_ext
19653LIBS=$ac_func_search_save_LIBS
19654fi
19655{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_event_set" >&5
19656$as_echo "$ac_cv_search_event_set" >&6; }
19657ac_res=$ac_cv_search_event_set
19658if test "$ac_res" != no; then :
19659  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
19660
19661fi
19662
19663
19664fi
19665
19666	for ac_func in event_base_free
19667do :
19668  ac_fn_c_check_func "$LINENO" "event_base_free" "ac_cv_func_event_base_free"
19669if test "x$ac_cv_func_event_base_free" = xyes; then :
19670  cat >>confdefs.h <<_ACEOF
19671#define HAVE_EVENT_BASE_FREE 1
19672_ACEOF
19673
19674fi
19675done
19676 # only in libevent 1.2 and later
19677	for ac_func in event_base_once
19678do :
19679  ac_fn_c_check_func "$LINENO" "event_base_once" "ac_cv_func_event_base_once"
19680if test "x$ac_cv_func_event_base_once" = xyes; then :
19681  cat >>confdefs.h <<_ACEOF
19682#define HAVE_EVENT_BASE_ONCE 1
19683_ACEOF
19684
19685fi
19686done
19687 # only in libevent 1.4.1 and later
19688	for ac_func in event_base_new
19689do :
19690  ac_fn_c_check_func "$LINENO" "event_base_new" "ac_cv_func_event_base_new"
19691if test "x$ac_cv_func_event_base_new" = xyes; then :
19692  cat >>confdefs.h <<_ACEOF
19693#define HAVE_EVENT_BASE_NEW 1
19694_ACEOF
19695
19696fi
19697done
19698 # only in libevent 1.4.1 and later
19699	for ac_func in event_base_get_method
19700do :
19701  ac_fn_c_check_func "$LINENO" "event_base_get_method" "ac_cv_func_event_base_get_method"
19702if test "x$ac_cv_func_event_base_get_method" = xyes; then :
19703  cat >>confdefs.h <<_ACEOF
19704#define HAVE_EVENT_BASE_GET_METHOD 1
19705_ACEOF
19706
19707fi
19708done
19709 # only in libevent 1.4.3 and later
19710	for ac_func in ev_loop
19711do :
19712  ac_fn_c_check_func "$LINENO" "ev_loop" "ac_cv_func_ev_loop"
19713if test "x$ac_cv_func_ev_loop" = xyes; then :
19714  cat >>confdefs.h <<_ACEOF
19715#define HAVE_EV_LOOP 1
19716_ACEOF
19717
19718fi
19719done
19720 # only in libev. (tested on 3.51)
19721	for ac_func in ev_default_loop
19722do :
19723  ac_fn_c_check_func "$LINENO" "ev_default_loop" "ac_cv_func_ev_default_loop"
19724if test "x$ac_cv_func_ev_default_loop" = xyes; then :
19725  cat >>confdefs.h <<_ACEOF
19726#define HAVE_EV_DEFAULT_LOOP 1
19727_ACEOF
19728
19729fi
19730done
19731 # only in libev. (tested on 4.00)
19732	for ac_func in event_assign
19733do :
19734  ac_fn_c_check_func "$LINENO" "event_assign" "ac_cv_func_event_assign"
19735if test "x$ac_cv_func_event_assign" = xyes; then :
19736  cat >>confdefs.h <<_ACEOF
19737#define HAVE_EVENT_ASSIGN 1
19738_ACEOF
19739
19740fi
19741done
19742 # in libevent, for thread-safety
19743	ac_fn_c_check_decl "$LINENO" "evsignal_assign" "ac_cv_have_decl_evsignal_assign" "$ac_includes_default
19744#ifdef HAVE_EVENT_H
19745#  include <event.h>
19746#else
19747#  include \"event2/event.h\"
19748#endif
19749
19750"
19751if test "x$ac_cv_have_decl_evsignal_assign" = xyes; then :
19752  ac_have_decl=1
19753else
19754  ac_have_decl=0
19755fi
19756
19757cat >>confdefs.h <<_ACEOF
19758#define HAVE_DECL_EVSIGNAL_ASSIGN $ac_have_decl
19759_ACEOF
19760
19761        PC_LIBEVENT_DEPENDENCY="libevent"
19762
19763	if test -n "$BAK_LDFLAGS_SET"; then
19764		LDFLAGS="$BAK_LDFLAGS"
19765	fi
19766else
19767
19768$as_echo "#define USE_MINI_EVENT 1" >>confdefs.h
19769
19770fi
19771
19772# check for libexpat
19773
19774# Check whether --with-libexpat was given.
19775if test "${with_libexpat+set}" = set; then :
19776  withval=$with_libexpat;
19777else
19778   withval="/usr/local /opt/local /usr/lib /usr/pkg /usr/sfw /usr"
19779fi
19780
19781{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for libexpat" >&5
19782$as_echo_n "checking for libexpat... " >&6; }
19783found_libexpat="no"
19784for dir in $withval ; do
19785            if test -f "$dir/include/expat.h"; then
19786		found_libexpat="yes"
19787				if test "$dir" != "/usr"; then
19788                    CPPFLAGS="$CPPFLAGS -I$dir/include"
19789		    LDFLAGS="$LDFLAGS -L$dir/lib"
19790		fi
19791            	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: found in $dir" >&5
19792$as_echo "found in $dir" >&6; }
19793                break;
19794            fi
19795done
19796if test x_$found_libexpat != x_yes; then
19797	as_fn_error $? "Could not find libexpat, expat.h" "$LINENO" 5
19798fi
19799for ac_header in expat.h
19800do :
19801  ac_fn_c_check_header_compile "$LINENO" "expat.h" "ac_cv_header_expat_h" "$ac_includes_default
19802"
19803if test "x$ac_cv_header_expat_h" = xyes; then :
19804  cat >>confdefs.h <<_ACEOF
19805#define HAVE_EXPAT_H 1
19806_ACEOF
19807
19808fi
19809
19810done
19811
19812ac_fn_c_check_decl "$LINENO" "XML_StopParser" "ac_cv_have_decl_XML_StopParser" "$ac_includes_default
19813#include <expat.h>
19814
19815"
19816if test "x$ac_cv_have_decl_XML_StopParser" = xyes; then :
19817  ac_have_decl=1
19818else
19819  ac_have_decl=0
19820fi
19821
19822cat >>confdefs.h <<_ACEOF
19823#define HAVE_DECL_XML_STOPPARSER $ac_have_decl
19824_ACEOF
19825
19826
19827# hiredis (redis C client for cachedb)
19828
19829# Check whether --with-libhiredis was given.
19830if test "${with_libhiredis+set}" = set; then :
19831  withval=$with_libhiredis;
19832else
19833   withval="no"
19834fi
19835
19836found_libhiredis="no"
19837if test x_$withval = x_yes -o x_$withval != x_no; then
19838   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libhiredis" >&5
19839$as_echo_n "checking for libhiredis... " >&6; }
19840   if test x_$withval = x_ -o x_$withval = x_yes; then
19841            withval="/usr/local /opt/local /usr/lib /usr/pkg /usr/sfw /usr"
19842   fi
19843   for dir in $withval ; do
19844            if test -f "$dir/include/hiredis/hiredis.h"; then
19845		found_libhiredis="yes"
19846				if test "$dir" != "/usr"; then
19847                    CPPFLAGS="$CPPFLAGS -I$dir/include"
19848		    LDFLAGS="$LDFLAGS -L$dir/lib"
19849		fi
19850		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: found in $dir" >&5
19851$as_echo "found in $dir" >&6; }
19852
19853$as_echo "#define USE_REDIS 1" >>confdefs.h
19854
19855		LIBS="$LIBS -lhiredis"
19856                break;
19857            fi
19858    done
19859    if test x_$found_libhiredis != x_yes; then
19860	as_fn_error $? "Could not find libhiredis, hiredis.h" "$LINENO" 5
19861    fi
19862    for ac_header in hiredis/hiredis.h
19863do :
19864  ac_fn_c_check_header_compile "$LINENO" "hiredis/hiredis.h" "ac_cv_header_hiredis_hiredis_h" "$ac_includes_default
19865"
19866if test "x$ac_cv_header_hiredis_hiredis_h" = xyes; then :
19867  cat >>confdefs.h <<_ACEOF
19868#define HAVE_HIREDIS_HIREDIS_H 1
19869_ACEOF
19870
19871fi
19872
19873done
19874
19875    ac_fn_c_check_decl "$LINENO" "redisConnect" "ac_cv_have_decl_redisConnect" "$ac_includes_default
19876    #include <hiredis/hiredis.h>
19877
19878"
19879if test "x$ac_cv_have_decl_redisConnect" = xyes; then :
19880  ac_have_decl=1
19881else
19882  ac_have_decl=0
19883fi
19884
19885cat >>confdefs.h <<_ACEOF
19886#define HAVE_DECL_REDISCONNECT $ac_have_decl
19887_ACEOF
19888
19889fi
19890
19891# nghttp2
19892
19893# Check whether --with-libnghttp2 was given.
19894if test "${with_libnghttp2+set}" = set; then :
19895  withval=$with_libnghttp2;
19896else
19897   withval="no"
19898fi
19899
19900found_libnghttp2="no"
19901if test x_$withval = x_yes -o x_$withval != x_no; then
19902   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libnghttp2" >&5
19903$as_echo_n "checking for libnghttp2... " >&6; }
19904   if test x_$withval = x_ -o x_$withval = x_yes; then
19905            withval="/usr/local /opt/local /usr/lib /usr/pkg /usr/sfw /usr"
19906   fi
19907   for dir in $withval ; do
19908            if test -f "$dir/include/nghttp2/nghttp2.h"; then
19909		found_libnghttp2="yes"
19910				if test "$dir" != "/usr"; then
19911                    CPPFLAGS="$CPPFLAGS -I$dir/include"
19912		    LDFLAGS="$LDFLAGS -L$dir/lib"
19913		fi
19914		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: found in $dir" >&5
19915$as_echo "found in $dir" >&6; }
19916
19917$as_echo "#define HAVE_NGHTTP2 1" >>confdefs.h
19918
19919		LIBS="$LIBS -lnghttp2"
19920                break;
19921            fi
19922    done
19923    if test x_$found_libnghttp2 != x_yes; then
19924	as_fn_error $? "Could not find libnghttp2, nghttp2.h" "$LINENO" 5
19925    fi
19926    for ac_header in nghttp2/nghttp2.h
19927do :
19928  ac_fn_c_check_header_compile "$LINENO" "nghttp2/nghttp2.h" "ac_cv_header_nghttp2_nghttp2_h" "$ac_includes_default
19929"
19930if test "x$ac_cv_header_nghttp2_nghttp2_h" = xyes; then :
19931  cat >>confdefs.h <<_ACEOF
19932#define HAVE_NGHTTP2_NGHTTP2_H 1
19933_ACEOF
19934
19935fi
19936
19937done
19938
19939    ac_fn_c_check_decl "$LINENO" "nghttp2_session_server_new" "ac_cv_have_decl_nghttp2_session_server_new" "$ac_includes_default
19940    #include <nghttp2/nghttp2.h>
19941
19942"
19943if test "x$ac_cv_have_decl_nghttp2_session_server_new" = xyes; then :
19944  ac_have_decl=1
19945else
19946  ac_have_decl=0
19947fi
19948
19949cat >>confdefs.h <<_ACEOF
19950#define HAVE_DECL_NGHTTP2_SESSION_SERVER_NEW $ac_have_decl
19951_ACEOF
19952
19953fi
19954
19955# set static linking for uninstalled libraries if requested
19956
19957staticexe=""
19958# Check whether --enable-static-exe was given.
19959if test "${enable_static_exe+set}" = set; then :
19960  enableval=$enable_static_exe;
19961fi
19962
19963if test x_$enable_static_exe = x_yes; then
19964	staticexe="-static"
19965	if test "$on_mingw" = yes; then
19966		staticexe="-all-static"
19967		# for static compile, include gdi32 and zlib here.
19968		if echo $LIBS | grep 'lgdi32' >/dev/null; then
19969			:
19970		else
19971			LIBS="$LIBS -lgdi32"
19972		fi
19973		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
19974$as_echo_n "checking for compress in -lz... " >&6; }
19975if ${ac_cv_lib_z_compress+:} false; then :
19976  $as_echo_n "(cached) " >&6
19977else
19978  ac_check_lib_save_LIBS=$LIBS
19979LIBS="-lz  $LIBS"
19980cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19981/* end confdefs.h.  */
19982
19983/* Override any GCC internal prototype to avoid an error.
19984   Use char because int might match the return type of a GCC
19985   builtin and then its argument prototype would still apply.  */
19986#ifdef __cplusplus
19987extern "C"
19988#endif
19989char compress ();
19990int
19991main ()
19992{
19993return compress ();
19994  ;
19995  return 0;
19996}
19997_ACEOF
19998if ac_fn_c_try_link "$LINENO"; then :
19999  ac_cv_lib_z_compress=yes
20000else
20001  ac_cv_lib_z_compress=no
20002fi
20003rm -f core conftest.err conftest.$ac_objext \
20004    conftest$ac_exeext conftest.$ac_ext
20005LIBS=$ac_check_lib_save_LIBS
20006fi
20007{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
20008$as_echo "$ac_cv_lib_z_compress" >&6; }
20009if test "x$ac_cv_lib_z_compress" = xyes; then :
20010   LIBS="$LIBS -lz"
20011fi
20012
20013		LIBS="$LIBS -l:libssp.a"
20014	fi
20015fi
20016
20017# set full static linking if requested
20018# Check whether --enable-fully-static was given.
20019if test "${enable_fully_static+set}" = set; then :
20020  enableval=$enable_fully_static;
20021fi
20022
20023if test x_$enable_fully_static = x_yes; then
20024	staticexe="-all-static"
20025	if test "$on_mingw" = yes; then
20026		# for static compile, include gdi32 and zlib here.
20027		if echo $LIBS | grep 'lgdi32' >/dev/null; then
20028			:
20029		else
20030			LIBS="$LIBS -lgdi32"
20031		fi
20032		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
20033$as_echo_n "checking for compress in -lz... " >&6; }
20034if ${ac_cv_lib_z_compress+:} false; then :
20035  $as_echo_n "(cached) " >&6
20036else
20037  ac_check_lib_save_LIBS=$LIBS
20038LIBS="-lz  $LIBS"
20039cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20040/* end confdefs.h.  */
20041
20042/* Override any GCC internal prototype to avoid an error.
20043   Use char because int might match the return type of a GCC
20044   builtin and then its argument prototype would still apply.  */
20045#ifdef __cplusplus
20046extern "C"
20047#endif
20048char compress ();
20049int
20050main ()
20051{
20052return compress ();
20053  ;
20054  return 0;
20055}
20056_ACEOF
20057if ac_fn_c_try_link "$LINENO"; then :
20058  ac_cv_lib_z_compress=yes
20059else
20060  ac_cv_lib_z_compress=no
20061fi
20062rm -f core conftest.err conftest.$ac_objext \
20063    conftest$ac_exeext conftest.$ac_ext
20064LIBS=$ac_check_lib_save_LIBS
20065fi
20066{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
20067$as_echo "$ac_cv_lib_z_compress" >&6; }
20068if test "x$ac_cv_lib_z_compress" = xyes; then :
20069   LIBS="$LIBS -lz"
20070fi
20071
20072		LIBS="$LIBS -l:libssp.a"
20073	fi
20074fi
20075
20076# set lock checking if requested
20077# Check whether --enable-lock_checks was given.
20078if test "${enable_lock_checks+set}" = set; then :
20079  enableval=$enable_lock_checks;
20080fi
20081
20082if test x_$enable_lock_checks = x_yes; then
20083
20084$as_echo "#define ENABLE_LOCK_CHECKS 1" >>confdefs.h
20085
20086	CHECKLOCK_OBJ="checklocks.lo"
20087
20088fi
20089
20090
20091{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
20092$as_echo_n "checking for getaddrinfo... " >&6; }
20093ac_cv_func_getaddrinfo=no
20094cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20095/* end confdefs.h.  */
20096
20097#ifdef __cplusplus
20098extern "C"
20099{
20100#endif
20101char* getaddrinfo();
20102char* (*f) () = getaddrinfo;
20103#ifdef __cplusplus
20104}
20105#endif
20106int main() {
20107        ;
20108        return 0;
20109}
20110
20111_ACEOF
20112if ac_fn_c_try_link "$LINENO"; then :
20113  ac_cv_func_getaddrinfo="yes"
20114if test "$ac_cv_header_windows_h" = "yes"; then
20115
20116$as_echo "#define USE_WINSOCK 1" >>confdefs.h
20117
20118	USE_WINSOCK="1"
20119	if echo $LIBS | grep 'lws2_32' >/dev/null; then
20120		:
20121	else
20122		LIBS="$LIBS -lws2_32"
20123	fi
20124fi
20125
20126else
20127  ORIGLIBS="$LIBS"
20128LIBS="$LIBS -lws2_32"
20129cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20130/* end confdefs.h.  */
20131
20132#ifdef HAVE_WS2TCPIP_H
20133#include <ws2tcpip.h>
20134#endif
20135
20136int
20137main ()
20138{
20139
20140        (void)getaddrinfo(NULL, NULL, NULL, NULL);
20141
20142
20143  ;
20144  return 0;
20145}
20146_ACEOF
20147if ac_fn_c_try_link "$LINENO"; then :
20148
20149ac_cv_func_getaddrinfo="yes"
20150
20151$as_echo "#define USE_WINSOCK 1" >>confdefs.h
20152
20153USE_WINSOCK="1"
20154
20155else
20156
20157ac_cv_func_getaddrinfo="no"
20158LIBS="$ORIGLIBS"
20159
20160fi
20161rm -f core conftest.err conftest.$ac_objext \
20162    conftest$ac_exeext conftest.$ac_ext
20163
20164fi
20165rm -f core conftest.err conftest.$ac_objext \
20166    conftest$ac_exeext conftest.$ac_ext
20167
20168{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_getaddrinfo" >&5
20169$as_echo "$ac_cv_func_getaddrinfo" >&6; }
20170if test $ac_cv_func_getaddrinfo = yes; then
20171
20172$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
20173
20174fi
20175
20176if test "$USE_WINSOCK" = 1; then
20177
20178$as_echo "#define UB_ON_WINDOWS 1" >>confdefs.h
20179
20180	for ac_header in iphlpapi.h
20181do :
20182  ac_fn_c_check_header_compile "$LINENO" "iphlpapi.h" "ac_cv_header_iphlpapi_h" "$ac_includes_default
20183#include <windows.h>
20184
20185"
20186if test "x$ac_cv_header_iphlpapi_h" = xyes; then :
20187  cat >>confdefs.h <<_ACEOF
20188#define HAVE_IPHLPAPI_H 1
20189_ACEOF
20190
20191fi
20192
20193done
20194
20195	if test -n "$ac_tool_prefix"; then
20196  # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
20197set dummy ${ac_tool_prefix}windres; ac_word=$2
20198{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20199$as_echo_n "checking for $ac_word... " >&6; }
20200if ${ac_cv_prog_WINDRES+:} false; then :
20201  $as_echo_n "(cached) " >&6
20202else
20203  if test -n "$WINDRES"; then
20204  ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
20205else
20206as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20207for as_dir in $PATH
20208do
20209  IFS=$as_save_IFS
20210  test -z "$as_dir" && as_dir=.
20211    for ac_exec_ext in '' $ac_executable_extensions; do
20212  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20213    ac_cv_prog_WINDRES="${ac_tool_prefix}windres"
20214    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20215    break 2
20216  fi
20217done
20218  done
20219IFS=$as_save_IFS
20220
20221fi
20222fi
20223WINDRES=$ac_cv_prog_WINDRES
20224if test -n "$WINDRES"; then
20225  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINDRES" >&5
20226$as_echo "$WINDRES" >&6; }
20227else
20228  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20229$as_echo "no" >&6; }
20230fi
20231
20232
20233fi
20234if test -z "$ac_cv_prog_WINDRES"; then
20235  ac_ct_WINDRES=$WINDRES
20236  # Extract the first word of "windres", so it can be a program name with args.
20237set dummy windres; ac_word=$2
20238{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20239$as_echo_n "checking for $ac_word... " >&6; }
20240if ${ac_cv_prog_ac_ct_WINDRES+:} false; then :
20241  $as_echo_n "(cached) " >&6
20242else
20243  if test -n "$ac_ct_WINDRES"; then
20244  ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # Let the user override the test.
20245else
20246as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20247for as_dir in $PATH
20248do
20249  IFS=$as_save_IFS
20250  test -z "$as_dir" && as_dir=.
20251    for ac_exec_ext in '' $ac_executable_extensions; do
20252  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20253    ac_cv_prog_ac_ct_WINDRES="windres"
20254    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20255    break 2
20256  fi
20257done
20258  done
20259IFS=$as_save_IFS
20260
20261fi
20262fi
20263ac_ct_WINDRES=$ac_cv_prog_ac_ct_WINDRES
20264if test -n "$ac_ct_WINDRES"; then
20265  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_WINDRES" >&5
20266$as_echo "$ac_ct_WINDRES" >&6; }
20267else
20268  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20269$as_echo "no" >&6; }
20270fi
20271
20272  if test "x$ac_ct_WINDRES" = x; then
20273    WINDRES=""
20274  else
20275    case $cross_compiling:$ac_tool_warned in
20276yes:)
20277{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
20278$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
20279ac_tool_warned=yes ;;
20280esac
20281    WINDRES=$ac_ct_WINDRES
20282  fi
20283else
20284  WINDRES="$ac_cv_prog_WINDRES"
20285fi
20286
20287	LIBS="$LIBS -liphlpapi -lcrypt32"
20288	WINAPPS="unbound-service-install.exe unbound-service-remove.exe anchor-update.exe"
20289
20290	WIN_DAEMON_SRC="winrc/win_svc.c winrc/w_inst.c"
20291
20292	WIN_DAEMON_OBJ="win_svc.lo w_inst.lo"
20293
20294	WIN_DAEMON_OBJ_LINK="rsrc_unbound.o"
20295
20296	WIN_HOST_OBJ_LINK="rsrc_unbound_host.o"
20297
20298	WIN_UBANCHOR_OBJ_LINK="rsrc_unbound_anchor.o log.lo locks.lo"
20299
20300	WIN_CONTROL_OBJ_LINK="rsrc_unbound_control.o"
20301
20302	WIN_CHECKCONF_OBJ_LINK="rsrc_unbound_checkconf.o"
20303
20304
20305$as_echo "#define __USE_MINGW_ANSI_STDIO 1" >>confdefs.h
20306
20307fi
20308if test $ac_cv_func_getaddrinfo = no; then
20309	case " $LIBOBJS " in
20310  *" fake-rfc2553.$ac_objext "* ) ;;
20311  *) LIBOBJS="$LIBOBJS fake-rfc2553.$ac_objext"
20312 ;;
20313esac
20314
20315fi
20316# check after getaddrinfo for its libraries
20317
20318# check ioctlsocket
20319{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ioctlsocket" >&5
20320$as_echo_n "checking for ioctlsocket... " >&6; }
20321cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20322/* end confdefs.h.  */
20323
20324#ifdef HAVE_WINSOCK2_H
20325#include <winsock2.h>
20326#endif
20327
20328int
20329main ()
20330{
20331
20332	(void)ioctlsocket(0, 0, NULL);
20333
20334  ;
20335  return 0;
20336}
20337_ACEOF
20338if ac_fn_c_try_link "$LINENO"; then :
20339
20340{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
20341$as_echo "yes" >&6; }
20342
20343$as_echo "#define HAVE_IOCTLSOCKET 1" >>confdefs.h
20344
20345
20346else
20347  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20348$as_echo "no" >&6; }
20349fi
20350rm -f core conftest.err conftest.$ac_objext \
20351    conftest$ac_exeext conftest.$ac_ext
20352
20353
20354# see if daemon(3) exists, and if it is deprecated.
20355for ac_func in daemon
20356do :
20357  ac_fn_c_check_func "$LINENO" "daemon" "ac_cv_func_daemon"
20358if test "x$ac_cv_func_daemon" = xyes; then :
20359  cat >>confdefs.h <<_ACEOF
20360#define HAVE_DAEMON 1
20361_ACEOF
20362
20363fi
20364done
20365
20366if test $ac_cv_func_daemon = yes; then
20367
20368
20369{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if daemon is deprecated" >&5
20370$as_echo_n "checking if daemon is deprecated... " >&6; }
20371cache=`echo daemon | sed 'y%.=/+-%___p_%'`
20372if eval \${cv_cc_deprecated_$cache+:} false; then :
20373  $as_echo_n "(cached) " >&6
20374else
20375
20376echo '
20377#include <stdlib.h>
20378#include <unistd.h>
20379' >conftest.c
20380echo 'void f(){ (void)daemon(0, 0); }' >>conftest.c
20381if test -z "`$CC $CPPFLAGS $CFLAGS -c conftest.c 2>&1 | grep -e deprecated -e unavailable`"; then
20382eval "cv_cc_deprecated_$cache=no"
20383else
20384eval "cv_cc_deprecated_$cache=yes"
20385fi
20386rm -f conftest conftest.o conftest.c
20387
20388fi
20389
20390if eval "test \"`echo '$cv_cc_deprecated_'$cache`\" = yes"; then
20391{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
20392$as_echo "yes" >&6; }
20393
20394cat >>confdefs.h <<_ACEOF
20395#define DEPRECATED_DAEMON 1
20396_ACEOF
20397
20398:
20399
20400else
20401{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20402$as_echo "no" >&6; }
20403:
20404
20405fi
20406
20407fi
20408
20409ac_fn_c_check_member "$LINENO" "struct sockaddr_un" "sun_len" "ac_cv_member_struct_sockaddr_un_sun_len" "
20410$ac_includes_default
20411#ifdef HAVE_SYS_UN_H
20412#include <sys/un.h>
20413#endif
20414
20415"
20416if test "x$ac_cv_member_struct_sockaddr_un_sun_len" = xyes; then :
20417
20418cat >>confdefs.h <<_ACEOF
20419#define HAVE_STRUCT_SOCKADDR_UN_SUN_LEN 1
20420_ACEOF
20421
20422
20423fi
20424
20425ac_fn_c_check_member "$LINENO" "struct in_pktinfo" "ipi_spec_dst" "ac_cv_member_struct_in_pktinfo_ipi_spec_dst" "
20426$ac_includes_default
20427#if HAVE_SYS_PARAM_H
20428#include <sys/param.h>
20429#endif
20430
20431#ifdef HAVE_SYS_SOCKET_H
20432#include <sys/socket.h>
20433#endif
20434
20435#ifdef HAVE_SYS_UIO_H
20436#include <sys/uio.h>
20437#endif
20438
20439#ifdef HAVE_NETINET_IN_H
20440#include <netinet/in.h>
20441#endif
20442
20443#ifdef HAVE_NETINET_TCP_H
20444#include <netinet/tcp.h>
20445#endif
20446
20447#ifdef HAVE_ARPA_INET_H
20448#include <arpa/inet.h>
20449#endif
20450
20451#ifdef HAVE_WINSOCK2_H
20452#include <winsock2.h>
20453#endif
20454
20455#ifdef HAVE_WS2TCPIP_H
20456#include <ws2tcpip.h>
20457#endif
20458
20459"
20460if test "x$ac_cv_member_struct_in_pktinfo_ipi_spec_dst" = xyes; then :
20461
20462cat >>confdefs.h <<_ACEOF
20463#define HAVE_STRUCT_IN_PKTINFO_IPI_SPEC_DST 1
20464_ACEOF
20465
20466
20467fi
20468
20469
20470{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for htobe64" >&5
20471$as_echo_n "checking for htobe64... " >&6; }
20472cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20473/* end confdefs.h.  */
20474
20475#include <stdio.h>
20476#ifdef HAVE_ENDIAN_H
20477#  include <endian.h>
20478#endif
20479#ifdef HAVE_SYS_ENDIAN_H
20480#  include <sys/endian.h>
20481#endif
20482
20483int
20484main ()
20485{
20486unsigned long long x = htobe64(0); printf("%u", (unsigned)x);
20487  ;
20488  return 0;
20489}
20490_ACEOF
20491if ac_fn_c_try_link "$LINENO"; then :
20492  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
20493$as_echo "yes" >&6; }
20494
20495$as_echo "#define HAVE_HTOBE64 1" >>confdefs.h
20496
20497else
20498  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20499$as_echo "no" >&6; }
20500fi
20501rm -f core conftest.err conftest.$ac_objext \
20502    conftest$ac_exeext conftest.$ac_ext
20503
20504{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for be64toh" >&5
20505$as_echo_n "checking for be64toh... " >&6; }
20506cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20507/* end confdefs.h.  */
20508
20509#include <stdio.h>
20510#ifdef HAVE_ENDIAN_H
20511#  include <endian.h>
20512#endif
20513#ifdef HAVE_SYS_ENDIAN_H
20514#  include <sys/endian.h>
20515#endif
20516
20517int
20518main ()
20519{
20520unsigned long long x = be64toh(0); printf("%u", (unsigned)x);
20521  ;
20522  return 0;
20523}
20524_ACEOF
20525if ac_fn_c_try_link "$LINENO"; then :
20526  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
20527$as_echo "yes" >&6; }
20528
20529$as_echo "#define HAVE_BE64TOH 1" >>confdefs.h
20530
20531else
20532  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20533$as_echo "no" >&6; }
20534fi
20535rm -f core conftest.err conftest.$ac_objext \
20536    conftest$ac_exeext conftest.$ac_ext
20537
20538{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing setusercontext" >&5
20539$as_echo_n "checking for library containing setusercontext... " >&6; }
20540if ${ac_cv_search_setusercontext+:} false; then :
20541  $as_echo_n "(cached) " >&6
20542else
20543  ac_func_search_save_LIBS=$LIBS
20544cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20545/* end confdefs.h.  */
20546
20547/* Override any GCC internal prototype to avoid an error.
20548   Use char because int might match the return type of a GCC
20549   builtin and then its argument prototype would still apply.  */
20550#ifdef __cplusplus
20551extern "C"
20552#endif
20553char setusercontext ();
20554int
20555main ()
20556{
20557return setusercontext ();
20558  ;
20559  return 0;
20560}
20561_ACEOF
20562for ac_lib in '' util; do
20563  if test -z "$ac_lib"; then
20564    ac_res="none required"
20565  else
20566    ac_res=-l$ac_lib
20567    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
20568  fi
20569  if ac_fn_c_try_link "$LINENO"; then :
20570  ac_cv_search_setusercontext=$ac_res
20571fi
20572rm -f core conftest.err conftest.$ac_objext \
20573    conftest$ac_exeext
20574  if ${ac_cv_search_setusercontext+:} false; then :
20575  break
20576fi
20577done
20578if ${ac_cv_search_setusercontext+:} false; then :
20579
20580else
20581  ac_cv_search_setusercontext=no
20582fi
20583rm conftest.$ac_ext
20584LIBS=$ac_func_search_save_LIBS
20585fi
20586{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_setusercontext" >&5
20587$as_echo "$ac_cv_search_setusercontext" >&6; }
20588ac_res=$ac_cv_search_setusercontext
20589if test "$ac_res" != no; then :
20590  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
20591
20592fi
20593
20594for ac_func in tzset sigprocmask fcntl getpwnam endpwent getrlimit setrlimit setsid chroot kill chown sleep usleep random srandom recvmsg sendmsg writev socketpair glob initgroups strftime localtime_r setusercontext _beginthreadex endservent endprotoent fsync shmget accept4 getifaddrs if_nametoindex
20595do :
20596  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
20597ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
20598if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
20599  cat >>confdefs.h <<_ACEOF
20600#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
20601_ACEOF
20602
20603fi
20604done
20605
20606for ac_func in setresuid
20607do :
20608  ac_fn_c_check_func "$LINENO" "setresuid" "ac_cv_func_setresuid"
20609if test "x$ac_cv_func_setresuid" = xyes; then :
20610  cat >>confdefs.h <<_ACEOF
20611#define HAVE_SETRESUID 1
20612_ACEOF
20613
20614else
20615  for ac_func in setreuid
20616do :
20617  ac_fn_c_check_func "$LINENO" "setreuid" "ac_cv_func_setreuid"
20618if test "x$ac_cv_func_setreuid" = xyes; then :
20619  cat >>confdefs.h <<_ACEOF
20620#define HAVE_SETREUID 1
20621_ACEOF
20622
20623fi
20624done
20625
20626fi
20627done
20628
20629for ac_func in setresgid
20630do :
20631  ac_fn_c_check_func "$LINENO" "setresgid" "ac_cv_func_setresgid"
20632if test "x$ac_cv_func_setresgid" = xyes; then :
20633  cat >>confdefs.h <<_ACEOF
20634#define HAVE_SETRESGID 1
20635_ACEOF
20636
20637else
20638  for ac_func in setregid
20639do :
20640  ac_fn_c_check_func "$LINENO" "setregid" "ac_cv_func_setregid"
20641if test "x$ac_cv_func_setregid" = xyes; then :
20642  cat >>confdefs.h <<_ACEOF
20643#define HAVE_SETREGID 1
20644_ACEOF
20645
20646fi
20647done
20648
20649fi
20650done
20651
20652
20653# check if setreuid en setregid fail, on MacOSX10.4(darwin8).
20654if echo $host_os | grep darwin8 > /dev/null; then
20655
20656$as_echo "#define DARWIN_BROKEN_SETREUID 1" >>confdefs.h
20657
20658fi
20659ac_fn_c_check_decl "$LINENO" "inet_pton" "ac_cv_have_decl_inet_pton" "
20660$ac_includes_default
20661#ifdef HAVE_NETINET_IN_H
20662#include <netinet/in.h>
20663#endif
20664
20665#ifdef HAVE_NETINET_TCP_H
20666#include <netinet/tcp.h>
20667#endif
20668
20669#ifdef HAVE_ARPA_INET_H
20670#include <arpa/inet.h>
20671#endif
20672
20673#ifdef HAVE_WINSOCK2_H
20674#include <winsock2.h>
20675#endif
20676
20677#ifdef HAVE_WS2TCPIP_H
20678#include <ws2tcpip.h>
20679#endif
20680
20681"
20682if test "x$ac_cv_have_decl_inet_pton" = xyes; then :
20683  ac_have_decl=1
20684else
20685  ac_have_decl=0
20686fi
20687
20688cat >>confdefs.h <<_ACEOF
20689#define HAVE_DECL_INET_PTON $ac_have_decl
20690_ACEOF
20691ac_fn_c_check_decl "$LINENO" "inet_ntop" "ac_cv_have_decl_inet_ntop" "
20692$ac_includes_default
20693#ifdef HAVE_NETINET_IN_H
20694#include <netinet/in.h>
20695#endif
20696
20697#ifdef HAVE_NETINET_TCP_H
20698#include <netinet/tcp.h>
20699#endif
20700
20701#ifdef HAVE_ARPA_INET_H
20702#include <arpa/inet.h>
20703#endif
20704
20705#ifdef HAVE_WINSOCK2_H
20706#include <winsock2.h>
20707#endif
20708
20709#ifdef HAVE_WS2TCPIP_H
20710#include <ws2tcpip.h>
20711#endif
20712
20713"
20714if test "x$ac_cv_have_decl_inet_ntop" = xyes; then :
20715  ac_have_decl=1
20716else
20717  ac_have_decl=0
20718fi
20719
20720cat >>confdefs.h <<_ACEOF
20721#define HAVE_DECL_INET_NTOP $ac_have_decl
20722_ACEOF
20723
20724ac_fn_c_check_func "$LINENO" "inet_aton" "ac_cv_func_inet_aton"
20725if test "x$ac_cv_func_inet_aton" = xyes; then :
20726  $as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
20727
20728else
20729  case " $LIBOBJS " in
20730  *" inet_aton.$ac_objext "* ) ;;
20731  *) LIBOBJS="$LIBOBJS inet_aton.$ac_objext"
20732 ;;
20733esac
20734
20735fi
20736
20737
20738ac_fn_c_check_func "$LINENO" "inet_pton" "ac_cv_func_inet_pton"
20739if test "x$ac_cv_func_inet_pton" = xyes; then :
20740  $as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
20741
20742else
20743  case " $LIBOBJS " in
20744  *" inet_pton.$ac_objext "* ) ;;
20745  *) LIBOBJS="$LIBOBJS inet_pton.$ac_objext"
20746 ;;
20747esac
20748
20749fi
20750
20751
20752ac_fn_c_check_func "$LINENO" "inet_ntop" "ac_cv_func_inet_ntop"
20753if test "x$ac_cv_func_inet_ntop" = xyes; then :
20754  $as_echo "#define HAVE_INET_NTOP 1" >>confdefs.h
20755
20756else
20757  case " $LIBOBJS " in
20758  *" inet_ntop.$ac_objext "* ) ;;
20759  *) LIBOBJS="$LIBOBJS inet_ntop.$ac_objext"
20760 ;;
20761esac
20762
20763fi
20764
20765
20766ac_fn_c_check_func "$LINENO" "snprintf" "ac_cv_func_snprintf"
20767if test "x$ac_cv_func_snprintf" = xyes; then :
20768  $as_echo "#define HAVE_SNPRINTF 1" >>confdefs.h
20769
20770else
20771  case " $LIBOBJS " in
20772  *" snprintf.$ac_objext "* ) ;;
20773  *) LIBOBJS="$LIBOBJS snprintf.$ac_objext"
20774 ;;
20775esac
20776
20777fi
20778
20779
20780# test if snprintf return the proper length
20781if test "x$ac_cv_func_snprintf" = xyes; then
20782    if test c${cross_compiling} = cno; then
20783	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for correct snprintf return value" >&5
20784$as_echo_n "checking for correct snprintf return value... " >&6; }
20785	if test "$cross_compiling" = yes; then :
20786  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
20787$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
20788as_fn_error $? "cannot run test program while cross compiling
20789See \`config.log' for more details" "$LINENO" 5; }
20790else
20791  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20792/* end confdefs.h.  */
20793$ac_includes_default
20794
20795int main(void) { return !(snprintf(NULL, 0, "test") == 4); }
20796
20797_ACEOF
20798if ac_fn_c_try_run "$LINENO"; then :
20799  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
20800$as_echo "yes" >&6; }
20801else
20802
20803		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20804$as_echo "no" >&6; }
20805
20806$as_echo "#define SNPRINTF_RET_BROKEN /**/" >>confdefs.h
20807
20808		case " $LIBOBJS " in
20809  *" snprintf.$ac_objext "* ) ;;
20810  *) LIBOBJS="$LIBOBJS snprintf.$ac_objext"
20811 ;;
20812esac
20813
20814
20815fi
20816rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20817  conftest.$ac_objext conftest.beam conftest.$ac_ext
20818fi
20819
20820    fi
20821fi
20822ac_fn_c_check_func "$LINENO" "strlcat" "ac_cv_func_strlcat"
20823if test "x$ac_cv_func_strlcat" = xyes; then :
20824  $as_echo "#define HAVE_STRLCAT 1" >>confdefs.h
20825
20826else
20827  case " $LIBOBJS " in
20828  *" strlcat.$ac_objext "* ) ;;
20829  *) LIBOBJS="$LIBOBJS strlcat.$ac_objext"
20830 ;;
20831esac
20832
20833fi
20834
20835
20836ac_fn_c_check_func "$LINENO" "strlcpy" "ac_cv_func_strlcpy"
20837if test "x$ac_cv_func_strlcpy" = xyes; then :
20838  $as_echo "#define HAVE_STRLCPY 1" >>confdefs.h
20839
20840else
20841  case " $LIBOBJS " in
20842  *" strlcpy.$ac_objext "* ) ;;
20843  *) LIBOBJS="$LIBOBJS strlcpy.$ac_objext"
20844 ;;
20845esac
20846
20847fi
20848
20849
20850ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove"
20851if test "x$ac_cv_func_memmove" = xyes; then :
20852  $as_echo "#define HAVE_MEMMOVE 1" >>confdefs.h
20853
20854else
20855  case " $LIBOBJS " in
20856  *" memmove.$ac_objext "* ) ;;
20857  *) LIBOBJS="$LIBOBJS memmove.$ac_objext"
20858 ;;
20859esac
20860
20861fi
20862
20863
20864ac_fn_c_check_func "$LINENO" "gmtime_r" "ac_cv_func_gmtime_r"
20865if test "x$ac_cv_func_gmtime_r" = xyes; then :
20866  $as_echo "#define HAVE_GMTIME_R 1" >>confdefs.h
20867
20868else
20869  case " $LIBOBJS " in
20870  *" gmtime_r.$ac_objext "* ) ;;
20871  *) LIBOBJS="$LIBOBJS gmtime_r.$ac_objext"
20872 ;;
20873esac
20874
20875fi
20876
20877
20878ac_fn_c_check_func "$LINENO" "isblank" "ac_cv_func_isblank"
20879if test "x$ac_cv_func_isblank" = xyes; then :
20880  $as_echo "#define HAVE_ISBLANK 1" >>confdefs.h
20881
20882else
20883  case " $LIBOBJS " in
20884  *" isblank.$ac_objext "* ) ;;
20885  *) LIBOBJS="$LIBOBJS isblank.$ac_objext"
20886 ;;
20887esac
20888
20889fi
20890
20891
20892ac_fn_c_check_func "$LINENO" "explicit_bzero" "ac_cv_func_explicit_bzero"
20893if test "x$ac_cv_func_explicit_bzero" = xyes; then :
20894  $as_echo "#define HAVE_EXPLICIT_BZERO 1" >>confdefs.h
20895
20896else
20897  case " $LIBOBJS " in
20898  *" explicit_bzero.$ac_objext "* ) ;;
20899  *) LIBOBJS="$LIBOBJS explicit_bzero.$ac_objext"
20900 ;;
20901esac
20902
20903fi
20904
20905
20906LIBOBJ_WITHOUT_CTIMEARC4="$LIBOBJS"
20907
20908{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for reallocarray" >&5
20909$as_echo_n "checking for reallocarray... " >&6; }
20910cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20911/* end confdefs.h.  */
20912$ac_includes_default
20913
20914#ifndef _OPENBSD_SOURCE
20915#define _OPENBSD_SOURCE 1
20916#endif
20917#include <stdlib.h>
20918int main(void) {
20919	void* p = reallocarray(NULL, 10, 100);
20920	free(p);
20921	return 0;
20922}
20923
20924_ACEOF
20925if ac_fn_c_try_link "$LINENO"; then :
20926  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
20927$as_echo "yes" >&6; }
20928
20929$as_echo "#define HAVE_REALLOCARRAY 1" >>confdefs.h
20930
20931
20932else
20933
20934	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20935$as_echo "no" >&6; }
20936	case " $LIBOBJS " in
20937  *" reallocarray.$ac_objext "* ) ;;
20938  *) LIBOBJS="$LIBOBJS reallocarray.$ac_objext"
20939 ;;
20940esac
20941
20942
20943fi
20944rm -f core conftest.err conftest.$ac_objext \
20945    conftest$ac_exeext conftest.$ac_ext
20946ac_fn_c_check_decl "$LINENO" "reallocarray" "ac_cv_have_decl_reallocarray" "$ac_includes_default"
20947if test "x$ac_cv_have_decl_reallocarray" = xyes; then :
20948  ac_have_decl=1
20949else
20950  ac_have_decl=0
20951fi
20952
20953cat >>confdefs.h <<_ACEOF
20954#define HAVE_DECL_REALLOCARRAY $ac_have_decl
20955_ACEOF
20956
20957if test "$USE_NSS" = "no"; then
20958	ac_fn_c_check_func "$LINENO" "arc4random" "ac_cv_func_arc4random"
20959if test "x$ac_cv_func_arc4random" = xyes; then :
20960  $as_echo "#define HAVE_ARC4RANDOM 1" >>confdefs.h
20961
20962else
20963  case " $LIBOBJS " in
20964  *" arc4random.$ac_objext "* ) ;;
20965  *) LIBOBJS="$LIBOBJS arc4random.$ac_objext"
20966 ;;
20967esac
20968
20969fi
20970
20971
20972	ac_fn_c_check_func "$LINENO" "arc4random_uniform" "ac_cv_func_arc4random_uniform"
20973if test "x$ac_cv_func_arc4random_uniform" = xyes; then :
20974  $as_echo "#define HAVE_ARC4RANDOM_UNIFORM 1" >>confdefs.h
20975
20976else
20977  case " $LIBOBJS " in
20978  *" arc4random_uniform.$ac_objext "* ) ;;
20979  *) LIBOBJS="$LIBOBJS arc4random_uniform.$ac_objext"
20980 ;;
20981esac
20982
20983fi
20984
20985
20986	if test "$ac_cv_func_arc4random" = "no"; then
20987		case " $LIBOBJS " in
20988  *" arc4_lock.$ac_objext "* ) ;;
20989  *) LIBOBJS="$LIBOBJS arc4_lock.$ac_objext"
20990 ;;
20991esac
20992
20993		for ac_func in getentropy
20994do :
20995  ac_fn_c_check_func "$LINENO" "getentropy" "ac_cv_func_getentropy"
20996if test "x$ac_cv_func_getentropy" = xyes; then :
20997  cat >>confdefs.h <<_ACEOF
20998#define HAVE_GETENTROPY 1
20999_ACEOF
21000
21001else
21002
21003		    if test "$USE_WINSOCK" = 1; then
21004			case " $LIBOBJS " in
21005  *" getentropy_win.$ac_objext "* ) ;;
21006  *) LIBOBJS="$LIBOBJS getentropy_win.$ac_objext"
21007 ;;
21008esac
21009
21010		    else
21011			case "$host" in
21012			Darwin|*darwin*)
21013				case " $LIBOBJS " in
21014  *" getentropy_osx.$ac_objext "* ) ;;
21015  *) LIBOBJS="$LIBOBJS getentropy_osx.$ac_objext"
21016 ;;
21017esac
21018
21019			;;
21020			*solaris*|*sunos*|SunOS)
21021				case " $LIBOBJS " in
21022  *" getentropy_solaris.$ac_objext "* ) ;;
21023  *) LIBOBJS="$LIBOBJS getentropy_solaris.$ac_objext"
21024 ;;
21025esac
21026
21027				for ac_header in sys/sha2.h
21028do :
21029  ac_fn_c_check_header_compile "$LINENO" "sys/sha2.h" "ac_cv_header_sys_sha2_h" "$ac_includes_default
21030"
21031if test "x$ac_cv_header_sys_sha2_h" = xyes; then :
21032  cat >>confdefs.h <<_ACEOF
21033#define HAVE_SYS_SHA2_H 1
21034_ACEOF
21035
21036else
21037
21038					for ac_func in SHA512_Update
21039do :
21040  ac_fn_c_check_func "$LINENO" "SHA512_Update" "ac_cv_func_SHA512_Update"
21041if test "x$ac_cv_func_SHA512_Update" = xyes; then :
21042  cat >>confdefs.h <<_ACEOF
21043#define HAVE_SHA512_UPDATE 1
21044_ACEOF
21045
21046else
21047
21048						case " $LIBOBJS " in
21049  *" sha512.$ac_objext "* ) ;;
21050  *) LIBOBJS="$LIBOBJS sha512.$ac_objext"
21051 ;;
21052esac
21053
21054
21055fi
21056done
21057
21058
21059fi
21060
21061done
21062
21063				if test "$ac_cv_header_sys_sha2_h" = "yes"; then
21064					# this lib needed for sha2 on solaris
21065					LIBS="$LIBS -lmd"
21066				fi
21067				{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5
21068$as_echo_n "checking for library containing clock_gettime... " >&6; }
21069if ${ac_cv_search_clock_gettime+:} false; then :
21070  $as_echo_n "(cached) " >&6
21071else
21072  ac_func_search_save_LIBS=$LIBS
21073cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21074/* end confdefs.h.  */
21075
21076/* Override any GCC internal prototype to avoid an error.
21077   Use char because int might match the return type of a GCC
21078   builtin and then its argument prototype would still apply.  */
21079#ifdef __cplusplus
21080extern "C"
21081#endif
21082char clock_gettime ();
21083int
21084main ()
21085{
21086return clock_gettime ();
21087  ;
21088  return 0;
21089}
21090_ACEOF
21091for ac_lib in '' rt; do
21092  if test -z "$ac_lib"; then
21093    ac_res="none required"
21094  else
21095    ac_res=-l$ac_lib
21096    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
21097  fi
21098  if ac_fn_c_try_link "$LINENO"; then :
21099  ac_cv_search_clock_gettime=$ac_res
21100fi
21101rm -f core conftest.err conftest.$ac_objext \
21102    conftest$ac_exeext
21103  if ${ac_cv_search_clock_gettime+:} false; then :
21104  break
21105fi
21106done
21107if ${ac_cv_search_clock_gettime+:} false; then :
21108
21109else
21110  ac_cv_search_clock_gettime=no
21111fi
21112rm conftest.$ac_ext
21113LIBS=$ac_func_search_save_LIBS
21114fi
21115{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5
21116$as_echo "$ac_cv_search_clock_gettime" >&6; }
21117ac_res=$ac_cv_search_clock_gettime
21118if test "$ac_res" != no; then :
21119  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
21120
21121fi
21122
21123			;;
21124			*freebsd*|*FreeBSD)
21125				case " $LIBOBJS " in
21126  *" getentropy_freebsd.$ac_objext "* ) ;;
21127  *) LIBOBJS="$LIBOBJS getentropy_freebsd.$ac_objext"
21128 ;;
21129esac
21130
21131			;;
21132			*linux*|Linux|*)
21133				case " $LIBOBJS " in
21134  *" getentropy_linux.$ac_objext "* ) ;;
21135  *) LIBOBJS="$LIBOBJS getentropy_linux.$ac_objext"
21136 ;;
21137esac
21138
21139				for ac_func in SHA512_Update
21140do :
21141  ac_fn_c_check_func "$LINENO" "SHA512_Update" "ac_cv_func_SHA512_Update"
21142if test "x$ac_cv_func_SHA512_Update" = xyes; then :
21143  cat >>confdefs.h <<_ACEOF
21144#define HAVE_SHA512_UPDATE 1
21145_ACEOF
21146
21147else
21148
21149
21150$as_echo "#define COMPAT_SHA512 1" >>confdefs.h
21151
21152					case " $LIBOBJS " in
21153  *" sha512.$ac_objext "* ) ;;
21154  *) LIBOBJS="$LIBOBJS sha512.$ac_objext"
21155 ;;
21156esac
21157
21158
21159fi
21160done
21161
21162				for ac_header in sys/sysctl.h
21163do :
21164  ac_fn_c_check_header_compile "$LINENO" "sys/sysctl.h" "ac_cv_header_sys_sysctl_h" "$ac_includes_default
21165"
21166if test "x$ac_cv_header_sys_sysctl_h" = xyes; then :
21167  cat >>confdefs.h <<_ACEOF
21168#define HAVE_SYS_SYSCTL_H 1
21169_ACEOF
21170
21171fi
21172
21173done
21174
21175				for ac_func in getauxval
21176do :
21177  ac_fn_c_check_func "$LINENO" "getauxval" "ac_cv_func_getauxval"
21178if test "x$ac_cv_func_getauxval" = xyes; then :
21179  cat >>confdefs.h <<_ACEOF
21180#define HAVE_GETAUXVAL 1
21181_ACEOF
21182
21183fi
21184done
21185
21186				{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5
21187$as_echo_n "checking for library containing clock_gettime... " >&6; }
21188if ${ac_cv_search_clock_gettime+:} false; then :
21189  $as_echo_n "(cached) " >&6
21190else
21191  ac_func_search_save_LIBS=$LIBS
21192cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21193/* end confdefs.h.  */
21194
21195/* Override any GCC internal prototype to avoid an error.
21196   Use char because int might match the return type of a GCC
21197   builtin and then its argument prototype would still apply.  */
21198#ifdef __cplusplus
21199extern "C"
21200#endif
21201char clock_gettime ();
21202int
21203main ()
21204{
21205return clock_gettime ();
21206  ;
21207  return 0;
21208}
21209_ACEOF
21210for ac_lib in '' rt; do
21211  if test -z "$ac_lib"; then
21212    ac_res="none required"
21213  else
21214    ac_res=-l$ac_lib
21215    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
21216  fi
21217  if ac_fn_c_try_link "$LINENO"; then :
21218  ac_cv_search_clock_gettime=$ac_res
21219fi
21220rm -f core conftest.err conftest.$ac_objext \
21221    conftest$ac_exeext
21222  if ${ac_cv_search_clock_gettime+:} false; then :
21223  break
21224fi
21225done
21226if ${ac_cv_search_clock_gettime+:} false; then :
21227
21228else
21229  ac_cv_search_clock_gettime=no
21230fi
21231rm conftest.$ac_ext
21232LIBS=$ac_func_search_save_LIBS
21233fi
21234{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5
21235$as_echo "$ac_cv_search_clock_gettime" >&6; }
21236ac_res=$ac_cv_search_clock_gettime
21237if test "$ac_res" != no; then :
21238  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
21239
21240fi
21241
21242			;;
21243			esac
21244		    fi
21245
21246fi
21247done
21248
21249	fi
21250fi
21251LIBOBJ_WITHOUT_CTIME="$LIBOBJS"
21252
21253ac_fn_c_check_func "$LINENO" "ctime_r" "ac_cv_func_ctime_r"
21254if test "x$ac_cv_func_ctime_r" = xyes; then :
21255  $as_echo "#define HAVE_CTIME_R 1" >>confdefs.h
21256
21257else
21258  case " $LIBOBJS " in
21259  *" ctime_r.$ac_objext "* ) ;;
21260  *) LIBOBJS="$LIBOBJS ctime_r.$ac_objext"
21261 ;;
21262esac
21263
21264fi
21265
21266
21267ac_fn_c_check_func "$LINENO" "strsep" "ac_cv_func_strsep"
21268if test "x$ac_cv_func_strsep" = xyes; then :
21269  $as_echo "#define HAVE_STRSEP 1" >>confdefs.h
21270
21271else
21272  case " $LIBOBJS " in
21273  *" strsep.$ac_objext "* ) ;;
21274  *) LIBOBJS="$LIBOBJS strsep.$ac_objext"
21275 ;;
21276esac
21277
21278fi
21279
21280
21281
21282# Check whether --enable-allsymbols was given.
21283if test "${enable_allsymbols+set}" = set; then :
21284  enableval=$enable_allsymbols;
21285fi
21286
21287case "$enable_allsymbols" in
21288	yes)
21289	COMMON_OBJ_ALL_SYMBOLS=""
21290	UBSYMS=""
21291	EXTRALINK="libunbound.la"
21292
21293$as_echo "#define EXPORT_ALL_SYMBOLS 1" >>confdefs.h
21294
21295	;;
21296	no|*)
21297	COMMON_OBJ_ALL_SYMBOLS='$(COMMON_OBJ)'
21298	UBSYMS='-export-symbols $(srcdir)/libunbound/ubsyms.def'
21299	EXTRALINK=""
21300	;;
21301esac
21302
21303
21304
21305if test x_$enable_lock_checks = x_yes; then
21306	UBSYMS="-export-symbols clubsyms.def"
21307	cp ${srcdir}/libunbound/ubsyms.def clubsyms.def
21308	echo lock_protect >> clubsyms.def
21309	echo lock_unprotect >> clubsyms.def
21310	echo lock_get_mem >> clubsyms.def
21311	echo checklock_start >> clubsyms.def
21312	echo checklock_stop >> clubsyms.def
21313	echo checklock_lock >> clubsyms.def
21314	echo checklock_unlock >> clubsyms.def
21315	echo checklock_init >> clubsyms.def
21316	echo checklock_thrcreate >> clubsyms.def
21317	echo checklock_thrjoin >> clubsyms.def
21318fi
21319
21320# check for dnstap if requested
21321
21322  # Check whether --enable-dnstap was given.
21323if test "${enable_dnstap+set}" = set; then :
21324  enableval=$enable_dnstap; opt_dnstap=$enableval
21325else
21326  opt_dnstap=no
21327fi
21328
21329
21330
21331# Check whether --with-dnstap-socket-path was given.
21332if test "${with_dnstap_socket_path+set}" = set; then :
21333  withval=$with_dnstap_socket_path; opt_dnstap_socket_path=$withval
21334else
21335  opt_dnstap_socket_path="$UNBOUND_RUN_DIR/dnstap.sock"
21336fi
21337
21338
21339  if test "x$opt_dnstap" != "xno"; then
21340    # Extract the first word of "protoc-c", so it can be a program name with args.
21341set dummy protoc-c; ac_word=$2
21342{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21343$as_echo_n "checking for $ac_word... " >&6; }
21344if ${ac_cv_path_PROTOC_C+:} false; then :
21345  $as_echo_n "(cached) " >&6
21346else
21347  case $PROTOC_C in
21348  [\\/]* | ?:[\\/]*)
21349  ac_cv_path_PROTOC_C="$PROTOC_C" # Let the user override the test with a path.
21350  ;;
21351  *)
21352  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21353for as_dir in $PATH
21354do
21355  IFS=$as_save_IFS
21356  test -z "$as_dir" && as_dir=.
21357    for ac_exec_ext in '' $ac_executable_extensions; do
21358  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21359    ac_cv_path_PROTOC_C="$as_dir/$ac_word$ac_exec_ext"
21360    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21361    break 2
21362  fi
21363done
21364  done
21365IFS=$as_save_IFS
21366
21367  ;;
21368esac
21369fi
21370PROTOC_C=$ac_cv_path_PROTOC_C
21371if test -n "$PROTOC_C"; then
21372  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROTOC_C" >&5
21373$as_echo "$PROTOC_C" >&6; }
21374else
21375  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21376$as_echo "no" >&6; }
21377fi
21378
21379
21380    if test -z "$PROTOC_C"; then
21381      as_fn_error $? "The protoc-c program was not found. Please install protobuf-c!" "$LINENO" 5
21382    fi
21383
21384# Check whether --with-protobuf-c was given.
21385if test "${with_protobuf_c+set}" = set; then :
21386  withval=$with_protobuf_c;
21387	  # workaround for protobuf-c includes at old dir before protobuf-c-1.0.0
21388	  if test -f $withval/include/google/protobuf-c/protobuf-c.h; then
21389	    CFLAGS="$CFLAGS -I$withval/include/google"
21390	  else
21391	    CFLAGS="$CFLAGS -I$withval/include"
21392	  fi
21393	  LDFLAGS="$LDFLAGS -L$withval/lib"
21394
21395else
21396
21397	  # workaround for protobuf-c includes at old dir before protobuf-c-1.0.0
21398	  if test -f /usr/include/google/protobuf-c/protobuf-c.h; then
21399	    CFLAGS="$CFLAGS -I/usr/include/google"
21400	  else
21401	    if test -f /usr/local/include/google/protobuf-c/protobuf-c.h; then
21402	      CFLAGS="$CFLAGS -I/usr/local/include/google"
21403	      LDFLAGS="$LDFLAGS -L/usr/local/lib"
21404	    fi
21405	  fi
21406
21407fi
21408
21409    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing protobuf_c_message_pack" >&5
21410$as_echo_n "checking for library containing protobuf_c_message_pack... " >&6; }
21411if ${ac_cv_search_protobuf_c_message_pack+:} false; then :
21412  $as_echo_n "(cached) " >&6
21413else
21414  ac_func_search_save_LIBS=$LIBS
21415cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21416/* end confdefs.h.  */
21417
21418/* Override any GCC internal prototype to avoid an error.
21419   Use char because int might match the return type of a GCC
21420   builtin and then its argument prototype would still apply.  */
21421#ifdef __cplusplus
21422extern "C"
21423#endif
21424char protobuf_c_message_pack ();
21425int
21426main ()
21427{
21428return protobuf_c_message_pack ();
21429  ;
21430  return 0;
21431}
21432_ACEOF
21433for ac_lib in '' protobuf-c; do
21434  if test -z "$ac_lib"; then
21435    ac_res="none required"
21436  else
21437    ac_res=-l$ac_lib
21438    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
21439  fi
21440  if ac_fn_c_try_link "$LINENO"; then :
21441  ac_cv_search_protobuf_c_message_pack=$ac_res
21442fi
21443rm -f core conftest.err conftest.$ac_objext \
21444    conftest$ac_exeext
21445  if ${ac_cv_search_protobuf_c_message_pack+:} false; then :
21446  break
21447fi
21448done
21449if ${ac_cv_search_protobuf_c_message_pack+:} false; then :
21450
21451else
21452  ac_cv_search_protobuf_c_message_pack=no
21453fi
21454rm conftest.$ac_ext
21455LIBS=$ac_func_search_save_LIBS
21456fi
21457{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_protobuf_c_message_pack" >&5
21458$as_echo "$ac_cv_search_protobuf_c_message_pack" >&6; }
21459ac_res=$ac_cv_search_protobuf_c_message_pack
21460if test "$ac_res" != no; then :
21461  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
21462
21463else
21464  as_fn_error $? "The protobuf-c library was not found. Please install protobuf-c!" "$LINENO" 5
21465fi
21466
21467
21468
21469$as_echo "#define USE_DNSTAP 1" >>confdefs.h
21470
21471        ENABLE_DNSTAP=1
21472
21473
21474
21475        hdr_dnstap_socket_path="`echo $opt_dnstap_socket_path | sed -e 's/\\\\/\\\\\\\\/g'`"
21476
21477
21478cat >>confdefs.h <<_ACEOF
21479#define DNSTAP_SOCKET_PATH "$hdr_dnstap_socket_path"
21480_ACEOF
21481
21482	DNSTAP_SOCKET_PATH="$hdr_dnstap_socket_path"
21483
21484	DNSTAP_SOCKET_TESTBIN='unbound-dnstap-socket$(EXEEXT)'
21485
21486        DNSTAP_SRC="dnstap/dnstap.c dnstap/dnstap.pb-c.c dnstap/dnstap_fstrm.c dnstap/dtstream.c"
21487
21488        DNSTAP_OBJ="dnstap.lo dnstap.pb-c.lo dnstap_fstrm.lo dtstream.lo"
21489
21490
21491  else
21492
21493        ENABLE_DNSTAP=0
21494
21495
21496
21497  fi
21498
21499
21500# check for dnscrypt if requested
21501
21502  # Check whether --enable-dnscrypt was given.
21503if test "${enable_dnscrypt+set}" = set; then :
21504  enableval=$enable_dnscrypt; opt_dnscrypt=$enableval
21505else
21506  opt_dnscrypt=no
21507fi
21508
21509
21510  if test "x$opt_dnscrypt" != "xno"; then
21511
21512# Check whether --with-libsodium was given.
21513if test "${with_libsodium+set}" = set; then :
21514  withval=$with_libsodium;
21515	CFLAGS="$CFLAGS -I$withval/include"
21516	LDFLAGS="$LDFLAGS -L$withval/lib"
21517
21518fi
21519
21520    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sodium_init" >&5
21521$as_echo_n "checking for library containing sodium_init... " >&6; }
21522if ${ac_cv_search_sodium_init+:} false; then :
21523  $as_echo_n "(cached) " >&6
21524else
21525  ac_func_search_save_LIBS=$LIBS
21526cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21527/* end confdefs.h.  */
21528
21529/* Override any GCC internal prototype to avoid an error.
21530   Use char because int might match the return type of a GCC
21531   builtin and then its argument prototype would still apply.  */
21532#ifdef __cplusplus
21533extern "C"
21534#endif
21535char sodium_init ();
21536int
21537main ()
21538{
21539return sodium_init ();
21540  ;
21541  return 0;
21542}
21543_ACEOF
21544for ac_lib in '' sodium; do
21545  if test -z "$ac_lib"; then
21546    ac_res="none required"
21547  else
21548    ac_res=-l$ac_lib
21549    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
21550  fi
21551  if ac_fn_c_try_link "$LINENO"; then :
21552  ac_cv_search_sodium_init=$ac_res
21553fi
21554rm -f core conftest.err conftest.$ac_objext \
21555    conftest$ac_exeext
21556  if ${ac_cv_search_sodium_init+:} false; then :
21557  break
21558fi
21559done
21560if ${ac_cv_search_sodium_init+:} false; then :
21561
21562else
21563  ac_cv_search_sodium_init=no
21564fi
21565rm conftest.$ac_ext
21566LIBS=$ac_func_search_save_LIBS
21567fi
21568{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sodium_init" >&5
21569$as_echo "$ac_cv_search_sodium_init" >&6; }
21570ac_res=$ac_cv_search_sodium_init
21571if test "$ac_res" != no; then :
21572  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
21573
21574else
21575  as_fn_error $? "The sodium library was not found. Please install sodium!" "$LINENO" 5
21576fi
21577
21578    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing crypto_box_curve25519xchacha20poly1305_beforenm" >&5
21579$as_echo_n "checking for library containing crypto_box_curve25519xchacha20poly1305_beforenm... " >&6; }
21580if ${ac_cv_search_crypto_box_curve25519xchacha20poly1305_beforenm+:} false; then :
21581  $as_echo_n "(cached) " >&6
21582else
21583  ac_func_search_save_LIBS=$LIBS
21584cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21585/* end confdefs.h.  */
21586
21587/* Override any GCC internal prototype to avoid an error.
21588   Use char because int might match the return type of a GCC
21589   builtin and then its argument prototype would still apply.  */
21590#ifdef __cplusplus
21591extern "C"
21592#endif
21593char crypto_box_curve25519xchacha20poly1305_beforenm ();
21594int
21595main ()
21596{
21597return crypto_box_curve25519xchacha20poly1305_beforenm ();
21598  ;
21599  return 0;
21600}
21601_ACEOF
21602for ac_lib in '' sodium; do
21603  if test -z "$ac_lib"; then
21604    ac_res="none required"
21605  else
21606    ac_res=-l$ac_lib
21607    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
21608  fi
21609  if ac_fn_c_try_link "$LINENO"; then :
21610  ac_cv_search_crypto_box_curve25519xchacha20poly1305_beforenm=$ac_res
21611fi
21612rm -f core conftest.err conftest.$ac_objext \
21613    conftest$ac_exeext
21614  if ${ac_cv_search_crypto_box_curve25519xchacha20poly1305_beforenm+:} false; then :
21615  break
21616fi
21617done
21618if ${ac_cv_search_crypto_box_curve25519xchacha20poly1305_beforenm+:} false; then :
21619
21620else
21621  ac_cv_search_crypto_box_curve25519xchacha20poly1305_beforenm=no
21622fi
21623rm conftest.$ac_ext
21624LIBS=$ac_func_search_save_LIBS
21625fi
21626{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_crypto_box_curve25519xchacha20poly1305_beforenm" >&5
21627$as_echo "$ac_cv_search_crypto_box_curve25519xchacha20poly1305_beforenm" >&6; }
21628ac_res=$ac_cv_search_crypto_box_curve25519xchacha20poly1305_beforenm
21629if test "$ac_res" != no; then :
21630  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
21631
21632            ENABLE_DNSCRYPT_XCHACHA20=1
21633
21634
21635$as_echo "#define USE_DNSCRYPT_XCHACHA20 1" >>confdefs.h
21636
21637
21638else
21639
21640            ENABLE_DNSCRYPT_XCHACHA20=0
21641
21642
21643fi
21644
21645    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sodium_set_misuse_handler" >&5
21646$as_echo_n "checking for library containing sodium_set_misuse_handler... " >&6; }
21647if ${ac_cv_search_sodium_set_misuse_handler+:} false; then :
21648  $as_echo_n "(cached) " >&6
21649else
21650  ac_func_search_save_LIBS=$LIBS
21651cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21652/* end confdefs.h.  */
21653
21654/* Override any GCC internal prototype to avoid an error.
21655   Use char because int might match the return type of a GCC
21656   builtin and then its argument prototype would still apply.  */
21657#ifdef __cplusplus
21658extern "C"
21659#endif
21660char sodium_set_misuse_handler ();
21661int
21662main ()
21663{
21664return sodium_set_misuse_handler ();
21665  ;
21666  return 0;
21667}
21668_ACEOF
21669for ac_lib in '' sodium; do
21670  if test -z "$ac_lib"; then
21671    ac_res="none required"
21672  else
21673    ac_res=-l$ac_lib
21674    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
21675  fi
21676  if ac_fn_c_try_link "$LINENO"; then :
21677  ac_cv_search_sodium_set_misuse_handler=$ac_res
21678fi
21679rm -f core conftest.err conftest.$ac_objext \
21680    conftest$ac_exeext
21681  if ${ac_cv_search_sodium_set_misuse_handler+:} false; then :
21682  break
21683fi
21684done
21685if ${ac_cv_search_sodium_set_misuse_handler+:} false; then :
21686
21687else
21688  ac_cv_search_sodium_set_misuse_handler=no
21689fi
21690rm conftest.$ac_ext
21691LIBS=$ac_func_search_save_LIBS
21692fi
21693{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sodium_set_misuse_handler" >&5
21694$as_echo "$ac_cv_search_sodium_set_misuse_handler" >&6; }
21695ac_res=$ac_cv_search_sodium_set_misuse_handler
21696if test "$ac_res" != no; then :
21697  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
21698
21699
21700$as_echo "#define SODIUM_MISUSE_HANDLER 1" >>confdefs.h
21701
21702
21703fi
21704
21705
21706
21707$as_echo "#define USE_DNSCRYPT 1" >>confdefs.h
21708
21709        ENABLE_DNSCRYPT=1
21710
21711
21712        DNSCRYPT_SRC="dnscrypt/dnscrypt.c"
21713
21714        DNSCRYPT_OBJ="dnscrypt.lo"
21715
21716
21717  else
21718    ENABLE_DNSCRYPT_XCHACHA20=0
21719
21720
21721        ENABLE_DNSCRYPT=0
21722
21723
21724
21725  fi
21726
21727
21728# check for cachedb if requested
21729# Check whether --enable-cachedb was given.
21730if test "${enable_cachedb+set}" = set; then :
21731  enableval=$enable_cachedb;
21732fi
21733
21734# turn on cachedb when hiredis support is enabled.
21735if test "$found_libhiredis" = "yes"; then enable_cachedb="yes"; fi
21736case "$enable_cachedb" in
21737    yes)
21738
21739$as_echo "#define USE_CACHEDB 1" >>confdefs.h
21740
21741	CACHEDB_SRC="cachedb/cachedb.c cachedb/redis.c"
21742
21743	CACHEDB_OBJ="cachedb.lo redis.lo"
21744
21745    	;;
21746    no|*)
21747    	# nothing
21748    	;;
21749esac
21750
21751# check for ipsecmod if requested
21752# Check whether --enable-ipsecmod was given.
21753if test "${enable_ipsecmod+set}" = set; then :
21754  enableval=$enable_ipsecmod;
21755fi
21756
21757case "$enable_ipsecmod" in
21758	yes)
21759
21760$as_echo "#define USE_IPSECMOD 1" >>confdefs.h
21761
21762		IPSECMOD_OBJ="ipsecmod.lo ipsecmod-whitelist.lo"
21763
21764		IPSECMOD_HEADER='$(srcdir)/ipsecmod/ipsecmod.h $(srcdir)/ipsecmod/ipsecmod-whitelist.h'
21765
21766		;;
21767	no|*)
21768		# nothing
21769		;;
21770esac
21771
21772# check for ipset if requested
21773# Check whether --enable-ipset was given.
21774if test "${enable_ipset+set}" = set; then :
21775  enableval=$enable_ipset;
21776fi
21777
21778case "$enable_ipset" in
21779    yes)
21780
21781$as_echo "#define USE_IPSET 1" >>confdefs.h
21782
21783		IPSET_SRC="ipset/ipset.c"
21784
21785		IPSET_OBJ="ipset.lo"
21786
21787
21788		# mnl
21789
21790# Check whether --with-libmnl was given.
21791if test "${with_libmnl+set}" = set; then :
21792  withval=$with_libmnl;
21793else
21794   withval="yes"
21795fi
21796
21797		found_libmnl="no"
21798		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for libmnl" >&5
21799$as_echo_n "checking for libmnl... " >&6; }
21800		if test x_$withval = x_ -o x_$withval = x_yes; then
21801			withval="/usr/local /opt/local /usr/lib /usr/pkg /usr/sfw /usr"
21802		fi
21803		for dir in $withval ; do
21804			if test -f "$dir/include/libmnl/libmnl.h" -o -f "$dir/include/libmnl/libmnl/libmnl.h"; then
21805				found_libmnl="yes"
21806								extralibmnl=""
21807				if test -f "$dir/include/libmnl/libmnl/libmnl.h"; then
21808					extralibmnl="/libmnl"
21809				fi
21810				if test "$dir" != "/usr" -o -n "$extralibmnl"; then
21811					CPPFLAGS="$CPPFLAGS -I$dir/include$extralibmnl"
21812				fi
21813				if test "$dir" != "/usr"; then
21814					LDFLAGS="$LDFLAGS -L$dir/lib"
21815				fi
21816				{ $as_echo "$as_me:${as_lineno-$LINENO}: result: found in $dir" >&5
21817$as_echo "found in $dir" >&6; }
21818				LIBS="$LIBS -lmnl"
21819				break;
21820			fi
21821		done
21822		if test x_$found_libmnl != x_yes; then
21823			as_fn_error $? "Could not find libmnl, libmnl.h" "$LINENO" 5
21824		fi
21825		;;
21826    no|*)
21827    	# nothing
21828		;;
21829esac
21830# Check whether --enable-explicit-port-randomisation was given.
21831if test "${enable_explicit_port_randomisation+set}" = set; then :
21832  enableval=$enable_explicit_port_randomisation;
21833fi
21834
21835case "$enable_explicit_port_randomisation" in
21836	no)
21837
21838$as_echo "#define DISABLE_EXPLICIT_PORT_RANDOMISATION 1" >>confdefs.h
21839
21840		;;
21841	yes|*)
21842		;;
21843esac
21844
21845if echo "$host" | $GREP -i -e linux >/dev/null; then
21846	# Check whether --enable-linux-ip-local-port-range was given.
21847if test "${enable_linux_ip_local_port_range+set}" = set; then :
21848  enableval=$enable_linux_ip_local_port_range;
21849fi
21850
21851	case "$enable_linux_ip_local_port_range" in
21852		yes)
21853
21854$as_echo "#define USE_LINUX_IP_LOCAL_PORT_RANGE 1" >>confdefs.h
21855
21856			;;
21857		no|*)
21858			;;
21859	esac
21860fi
21861
21862
21863{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if ${MAKE:-make} supports $< with implicit rule in scope" >&5
21864$as_echo_n "checking if ${MAKE:-make} supports $< with implicit rule in scope... " >&6; }
21865# on openBSD, the implicit rule make $< work.
21866# on Solaris, it does not work ($? is changed sources, $^ lists dependencies).
21867# gmake works.
21868cat >conftest.make <<EOF
21869all:	conftest.lo
21870
21871conftest.lo foo.lo bla.lo:
21872	if test -f "\$<"; then touch \$@; fi
21873
21874.SUFFIXES: .lo
21875.c.lo:
21876	if test -f "\$<"; then touch \$@; fi
21877
21878conftest.lo:        conftest.dir/conftest.c
21879EOF
21880mkdir conftest.dir
21881touch conftest.dir/conftest.c
21882rm -f conftest.lo conftest.c
21883${MAKE:-make} -f conftest.make >/dev/null
21884rm -f conftest.make conftest.c conftest.dir/conftest.c
21885rm -rf conftest.dir
21886if test ! -f conftest.lo; then
21887	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21888$as_echo "no" >&6; }
21889	SOURCEDETERMINE='echo "$^" | awk "-F " "{print \$$1;}" > .source'
21890	SOURCEFILE='`cat .source`'
21891else
21892	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
21893$as_echo "yes" >&6; }
21894	SOURCEDETERMINE=':'
21895	SOURCEFILE='$<'
21896fi
21897rm -f conftest.lo
21898
21899
21900
21901# see if we want to build the library or everything
21902ALLTARGET="alltargets"
21903INSTALLTARGET="install-all"
21904
21905# Check whether --with-libunbound-only was given.
21906if test "${with_libunbound_only+set}" = set; then :
21907  withval=$with_libunbound_only;
21908	if test "$withval" = "yes"; then
21909		ALLTARGET="lib"
21910		INSTALLTARGET="install-lib"
21911	fi
21912
21913fi
21914
21915if test $ALLTARGET = "alltargets"; then
21916	if test $USE_NSS = "yes"; then
21917		as_fn_error $? "--with-nss can only be used in combination with --with-libunbound-only." "$LINENO" 5
21918	fi
21919	if test $USE_NETTLE = "yes"; then
21920		as_fn_error $? "--with-nettle can only be used in combination with --with-libunbound-only." "$LINENO" 5
21921	fi
21922fi
21923
21924
21925
21926
21927
21928  { $as_echo "$as_me:${as_lineno-$LINENO}: Stripping extension flags..." >&5
21929$as_echo "$as_me: Stripping extension flags..." >&6;}
21930
21931  if echo $CFLAGS | grep " -D_GNU_SOURCE" >/dev/null 2>&1; then
21932    CFLAGS="`echo $CFLAGS | sed -e 's/ -D_GNU_SOURCE//g'`"
21933
21934$as_echo "#define OMITTED__D_GNU_SOURCE 1" >>confdefs.h
21935
21936  fi
21937
21938
21939  if echo $CFLAGS | grep " -D_BSD_SOURCE" >/dev/null 2>&1; then
21940    CFLAGS="`echo $CFLAGS | sed -e 's/ -D_BSD_SOURCE//g'`"
21941
21942$as_echo "#define OMITTED__D_BSD_SOURCE 1" >>confdefs.h
21943
21944  fi
21945
21946
21947  if echo $CFLAGS | grep " -D_DEFAULT_SOURCE" >/dev/null 2>&1; then
21948    CFLAGS="`echo $CFLAGS | sed -e 's/ -D_DEFAULT_SOURCE//g'`"
21949
21950$as_echo "#define OMITTED__D_DEFAULT_SOURCE 1" >>confdefs.h
21951
21952  fi
21953
21954
21955  if echo $CFLAGS | grep " -D__EXTENSIONS__" >/dev/null 2>&1; then
21956    CFLAGS="`echo $CFLAGS | sed -e 's/ -D__EXTENSIONS__//g'`"
21957
21958$as_echo "#define OMITTED__D__EXTENSIONS__ 1" >>confdefs.h
21959
21960  fi
21961
21962
21963  if echo $CFLAGS | grep " -D_POSIX_C_SOURCE=200112" >/dev/null 2>&1; then
21964    CFLAGS="`echo $CFLAGS | sed -e 's/ -D_POSIX_C_SOURCE=200112//g'`"
21965
21966$as_echo "#define OMITTED__D_POSIX_C_SOURCE_200112 1" >>confdefs.h
21967
21968  fi
21969
21970
21971  if echo $CFLAGS | grep " -D_XOPEN_SOURCE=600" >/dev/null 2>&1; then
21972    CFLAGS="`echo $CFLAGS | sed -e 's/ -D_XOPEN_SOURCE=600//g'`"
21973
21974$as_echo "#define OMITTED__D_XOPEN_SOURCE_600 1" >>confdefs.h
21975
21976  fi
21977
21978
21979  if echo $CFLAGS | grep " -D_XOPEN_SOURCE_EXTENDED=1" >/dev/null 2>&1; then
21980    CFLAGS="`echo $CFLAGS | sed -e 's/ -D_XOPEN_SOURCE_EXTENDED=1//g'`"
21981
21982$as_echo "#define OMITTED__D_XOPEN_SOURCE_EXTENDED_1 1" >>confdefs.h
21983
21984  fi
21985
21986
21987  if echo $CFLAGS | grep " -D_ALL_SOURCE" >/dev/null 2>&1; then
21988    CFLAGS="`echo $CFLAGS | sed -e 's/ -D_ALL_SOURCE//g'`"
21989
21990$as_echo "#define OMITTED__D_ALL_SOURCE 1" >>confdefs.h
21991
21992  fi
21993
21994
21995  if echo $CFLAGS | grep " -D_LARGEFILE_SOURCE=1" >/dev/null 2>&1; then
21996    CFLAGS="`echo $CFLAGS | sed -e 's/ -D_LARGEFILE_SOURCE=1//g'`"
21997
21998$as_echo "#define OMITTED__D_LARGEFILE_SOURCE_1 1" >>confdefs.h
21999
22000  fi
22001
22002
22003if test -n "$LATE_LDFLAGS"; then
22004  LDFLAGS="$LATE_LDFLAGS $LDFLAGS"
22005fi
22006# remove start spaces
22007LDFLAGS=`echo "$LDFLAGS"|sed -e 's/^ *//'`
22008LIBS=`echo "$LIBS"|sed -e 's/^ *//'`
22009
22010
22011cat >>confdefs.h <<_ACEOF
22012#define MAXSYSLOGMSGLEN 10240
22013_ACEOF
22014
22015
22016
22017
22018version=1.16.3
22019
22020date=`date +'%b %e, %Y'`
22021
22022
22023ac_config_files="$ac_config_files Makefile doc/example.conf doc/libunbound.3 doc/unbound.8 doc/unbound-anchor.8 doc/unbound-checkconf.8 doc/unbound.conf.5 doc/unbound-control.8 doc/unbound-host.1 smallapp/unbound-control-setup.sh dnstap/dnstap_config.h dnscrypt/dnscrypt_config.h contrib/libunbound.pc contrib/unbound.socket contrib/unbound.service contrib/unbound_portable.service"
22024
22025ac_config_headers="$ac_config_headers config.h"
22026
22027cat >confcache <<\_ACEOF
22028# This file is a shell script that caches the results of configure
22029# tests run on this system so they can be shared between configure
22030# scripts and configure runs, see configure's option --config-cache.
22031# It is not useful on other systems.  If it contains results you don't
22032# want to keep, you may remove or edit it.
22033#
22034# config.status only pays attention to the cache file if you give it
22035# the --recheck option to rerun configure.
22036#
22037# `ac_cv_env_foo' variables (set or unset) will be overridden when
22038# loading this file, other *unset* `ac_cv_foo' will be assigned the
22039# following values.
22040
22041_ACEOF
22042
22043# The following way of writing the cache mishandles newlines in values,
22044# but we know of no workaround that is simple, portable, and efficient.
22045# So, we kill variables containing newlines.
22046# Ultrix sh set writes to stderr and can't be redirected directly,
22047# and sets the high bit in the cache file unless we assign to the vars.
22048(
22049  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
22050    eval ac_val=\$$ac_var
22051    case $ac_val in #(
22052    *${as_nl}*)
22053      case $ac_var in #(
22054      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
22055$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
22056      esac
22057      case $ac_var in #(
22058      _ | IFS | as_nl) ;; #(
22059      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
22060      *) { eval $ac_var=; unset $ac_var;} ;;
22061      esac ;;
22062    esac
22063  done
22064
22065  (set) 2>&1 |
22066    case $as_nl`(ac_space=' '; set) 2>&1` in #(
22067    *${as_nl}ac_space=\ *)
22068      # `set' does not quote correctly, so add quotes: double-quote
22069      # substitution turns \\\\ into \\, and sed turns \\ into \.
22070      sed -n \
22071	"s/'/'\\\\''/g;
22072	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
22073      ;; #(
22074    *)
22075      # `set' quotes correctly as required by POSIX, so do not add quotes.
22076      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
22077      ;;
22078    esac |
22079    sort
22080) |
22081  sed '
22082     /^ac_cv_env_/b end
22083     t clear
22084     :clear
22085     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
22086     t end
22087     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
22088     :end' >>confcache
22089if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
22090  if test -w "$cache_file"; then
22091    if test "x$cache_file" != "x/dev/null"; then
22092      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
22093$as_echo "$as_me: updating cache $cache_file" >&6;}
22094      if test ! -f "$cache_file" || test -h "$cache_file"; then
22095	cat confcache >"$cache_file"
22096      else
22097        case $cache_file in #(
22098        */* | ?:*)
22099	  mv -f confcache "$cache_file"$$ &&
22100	  mv -f "$cache_file"$$ "$cache_file" ;; #(
22101        *)
22102	  mv -f confcache "$cache_file" ;;
22103	esac
22104      fi
22105    fi
22106  else
22107    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
22108$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
22109  fi
22110fi
22111rm -f confcache
22112
22113test "x$prefix" = xNONE && prefix=$ac_default_prefix
22114# Let make expand exec_prefix.
22115test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
22116
22117DEFS=-DHAVE_CONFIG_H
22118
22119ac_libobjs=
22120ac_ltlibobjs=
22121U=
22122for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
22123  # 1. Remove the extension, and $U if already installed.
22124  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
22125  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
22126  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
22127  #    will be set to the directory where LIBOBJS objects are built.
22128  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
22129  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
22130done
22131LIBOBJS=$ac_libobjs
22132
22133LTLIBOBJS=$ac_ltlibobjs
22134
22135
22136if test -z "${USE_SYSTEMD_TRUE}" && test -z "${USE_SYSTEMD_FALSE}"; then
22137  as_fn_error $? "conditional \"USE_SYSTEMD\" was never defined.
22138Usually this means the macro was only invoked conditionally." "$LINENO" 5
22139fi
22140
22141: "${CONFIG_STATUS=./config.status}"
22142ac_write_fail=0
22143ac_clean_files_save=$ac_clean_files
22144ac_clean_files="$ac_clean_files $CONFIG_STATUS"
22145{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
22146$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
22147as_write_fail=0
22148cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
22149#! $SHELL
22150# Generated by $as_me.
22151# Run this file to recreate the current configuration.
22152# Compiler output produced by configure, useful for debugging
22153# configure, is in config.log if it exists.
22154
22155debug=false
22156ac_cs_recheck=false
22157ac_cs_silent=false
22158
22159SHELL=\${CONFIG_SHELL-$SHELL}
22160export SHELL
22161_ASEOF
22162cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
22163## -------------------- ##
22164## M4sh Initialization. ##
22165## -------------------- ##
22166
22167# Be more Bourne compatible
22168DUALCASE=1; export DUALCASE # for MKS sh
22169if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
22170  emulate sh
22171  NULLCMD=:
22172  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
22173  # is contrary to our usage.  Disable this feature.
22174  alias -g '${1+"$@"}'='"$@"'
22175  setopt NO_GLOB_SUBST
22176else
22177  case `(set -o) 2>/dev/null` in #(
22178  *posix*) :
22179    set -o posix ;; #(
22180  *) :
22181     ;;
22182esac
22183fi
22184
22185
22186as_nl='
22187'
22188export as_nl
22189# Printing a long string crashes Solaris 7 /usr/bin/printf.
22190as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
22191as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
22192as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
22193# Prefer a ksh shell builtin over an external printf program on Solaris,
22194# but without wasting forks for bash or zsh.
22195if test -z "$BASH_VERSION$ZSH_VERSION" \
22196    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
22197  as_echo='print -r --'
22198  as_echo_n='print -rn --'
22199elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
22200  as_echo='printf %s\n'
22201  as_echo_n='printf %s'
22202else
22203  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
22204    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
22205    as_echo_n='/usr/ucb/echo -n'
22206  else
22207    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
22208    as_echo_n_body='eval
22209      arg=$1;
22210      case $arg in #(
22211      *"$as_nl"*)
22212	expr "X$arg" : "X\\(.*\\)$as_nl";
22213	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
22214      esac;
22215      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
22216    '
22217    export as_echo_n_body
22218    as_echo_n='sh -c $as_echo_n_body as_echo'
22219  fi
22220  export as_echo_body
22221  as_echo='sh -c $as_echo_body as_echo'
22222fi
22223
22224# The user is always right.
22225if test "${PATH_SEPARATOR+set}" != set; then
22226  PATH_SEPARATOR=:
22227  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
22228    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
22229      PATH_SEPARATOR=';'
22230  }
22231fi
22232
22233
22234# IFS
22235# We need space, tab and new line, in precisely that order.  Quoting is
22236# there to prevent editors from complaining about space-tab.
22237# (If _AS_PATH_WALK were called with IFS unset, it would disable word
22238# splitting by setting IFS to empty value.)
22239IFS=" ""	$as_nl"
22240
22241# Find who we are.  Look in the path if we contain no directory separator.
22242as_myself=
22243case $0 in #((
22244  *[\\/]* ) as_myself=$0 ;;
22245  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22246for as_dir in $PATH
22247do
22248  IFS=$as_save_IFS
22249  test -z "$as_dir" && as_dir=.
22250    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
22251  done
22252IFS=$as_save_IFS
22253
22254     ;;
22255esac
22256# We did not find ourselves, most probably we were run as `sh COMMAND'
22257# in which case we are not to be found in the path.
22258if test "x$as_myself" = x; then
22259  as_myself=$0
22260fi
22261if test ! -f "$as_myself"; then
22262  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
22263  exit 1
22264fi
22265
22266# Unset variables that we do not need and which cause bugs (e.g. in
22267# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
22268# suppresses any "Segmentation fault" message there.  '((' could
22269# trigger a bug in pdksh 5.2.14.
22270for as_var in BASH_ENV ENV MAIL MAILPATH
22271do eval test x\${$as_var+set} = xset \
22272  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
22273done
22274PS1='$ '
22275PS2='> '
22276PS4='+ '
22277
22278# NLS nuisances.
22279LC_ALL=C
22280export LC_ALL
22281LANGUAGE=C
22282export LANGUAGE
22283
22284# CDPATH.
22285(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
22286
22287
22288# as_fn_error STATUS ERROR [LINENO LOG_FD]
22289# ----------------------------------------
22290# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
22291# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
22292# script with STATUS, using 1 if that was 0.
22293as_fn_error ()
22294{
22295  as_status=$1; test $as_status -eq 0 && as_status=1
22296  if test "$4"; then
22297    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
22298    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
22299  fi
22300  $as_echo "$as_me: error: $2" >&2
22301  as_fn_exit $as_status
22302} # as_fn_error
22303
22304
22305# as_fn_set_status STATUS
22306# -----------------------
22307# Set $? to STATUS, without forking.
22308as_fn_set_status ()
22309{
22310  return $1
22311} # as_fn_set_status
22312
22313# as_fn_exit STATUS
22314# -----------------
22315# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
22316as_fn_exit ()
22317{
22318  set +e
22319  as_fn_set_status $1
22320  exit $1
22321} # as_fn_exit
22322
22323# as_fn_unset VAR
22324# ---------------
22325# Portably unset VAR.
22326as_fn_unset ()
22327{
22328  { eval $1=; unset $1;}
22329}
22330as_unset=as_fn_unset
22331# as_fn_append VAR VALUE
22332# ----------------------
22333# Append the text in VALUE to the end of the definition contained in VAR. Take
22334# advantage of any shell optimizations that allow amortized linear growth over
22335# repeated appends, instead of the typical quadratic growth present in naive
22336# implementations.
22337if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
22338  eval 'as_fn_append ()
22339  {
22340    eval $1+=\$2
22341  }'
22342else
22343  as_fn_append ()
22344  {
22345    eval $1=\$$1\$2
22346  }
22347fi # as_fn_append
22348
22349# as_fn_arith ARG...
22350# ------------------
22351# Perform arithmetic evaluation on the ARGs, and store the result in the
22352# global $as_val. Take advantage of shells that can avoid forks. The arguments
22353# must be portable across $(()) and expr.
22354if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
22355  eval 'as_fn_arith ()
22356  {
22357    as_val=$(( $* ))
22358  }'
22359else
22360  as_fn_arith ()
22361  {
22362    as_val=`expr "$@" || test $? -eq 1`
22363  }
22364fi # as_fn_arith
22365
22366
22367if expr a : '\(a\)' >/dev/null 2>&1 &&
22368   test "X`expr 00001 : '.*\(...\)'`" = X001; then
22369  as_expr=expr
22370else
22371  as_expr=false
22372fi
22373
22374if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
22375  as_basename=basename
22376else
22377  as_basename=false
22378fi
22379
22380if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
22381  as_dirname=dirname
22382else
22383  as_dirname=false
22384fi
22385
22386as_me=`$as_basename -- "$0" ||
22387$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
22388	 X"$0" : 'X\(//\)$' \| \
22389	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
22390$as_echo X/"$0" |
22391    sed '/^.*\/\([^/][^/]*\)\/*$/{
22392	    s//\1/
22393	    q
22394	  }
22395	  /^X\/\(\/\/\)$/{
22396	    s//\1/
22397	    q
22398	  }
22399	  /^X\/\(\/\).*/{
22400	    s//\1/
22401	    q
22402	  }
22403	  s/.*/./; q'`
22404
22405# Avoid depending upon Character Ranges.
22406as_cr_letters='abcdefghijklmnopqrstuvwxyz'
22407as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
22408as_cr_Letters=$as_cr_letters$as_cr_LETTERS
22409as_cr_digits='0123456789'
22410as_cr_alnum=$as_cr_Letters$as_cr_digits
22411
22412ECHO_C= ECHO_N= ECHO_T=
22413case `echo -n x` in #(((((
22414-n*)
22415  case `echo 'xy\c'` in
22416  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
22417  xy)  ECHO_C='\c';;
22418  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
22419       ECHO_T='	';;
22420  esac;;
22421*)
22422  ECHO_N='-n';;
22423esac
22424
22425rm -f conf$$ conf$$.exe conf$$.file
22426if test -d conf$$.dir; then
22427  rm -f conf$$.dir/conf$$.file
22428else
22429  rm -f conf$$.dir
22430  mkdir conf$$.dir 2>/dev/null
22431fi
22432if (echo >conf$$.file) 2>/dev/null; then
22433  if ln -s conf$$.file conf$$ 2>/dev/null; then
22434    as_ln_s='ln -s'
22435    # ... but there are two gotchas:
22436    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
22437    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
22438    # In both cases, we have to default to `cp -pR'.
22439    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
22440      as_ln_s='cp -pR'
22441  elif ln conf$$.file conf$$ 2>/dev/null; then
22442    as_ln_s=ln
22443  else
22444    as_ln_s='cp -pR'
22445  fi
22446else
22447  as_ln_s='cp -pR'
22448fi
22449rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
22450rmdir conf$$.dir 2>/dev/null
22451
22452
22453# as_fn_mkdir_p
22454# -------------
22455# Create "$as_dir" as a directory, including parents if necessary.
22456as_fn_mkdir_p ()
22457{
22458
22459  case $as_dir in #(
22460  -*) as_dir=./$as_dir;;
22461  esac
22462  test -d "$as_dir" || eval $as_mkdir_p || {
22463    as_dirs=
22464    while :; do
22465      case $as_dir in #(
22466      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
22467      *) as_qdir=$as_dir;;
22468      esac
22469      as_dirs="'$as_qdir' $as_dirs"
22470      as_dir=`$as_dirname -- "$as_dir" ||
22471$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
22472	 X"$as_dir" : 'X\(//\)[^/]' \| \
22473	 X"$as_dir" : 'X\(//\)$' \| \
22474	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
22475$as_echo X"$as_dir" |
22476    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
22477	    s//\1/
22478	    q
22479	  }
22480	  /^X\(\/\/\)[^/].*/{
22481	    s//\1/
22482	    q
22483	  }
22484	  /^X\(\/\/\)$/{
22485	    s//\1/
22486	    q
22487	  }
22488	  /^X\(\/\).*/{
22489	    s//\1/
22490	    q
22491	  }
22492	  s/.*/./; q'`
22493      test -d "$as_dir" && break
22494    done
22495    test -z "$as_dirs" || eval "mkdir $as_dirs"
22496  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
22497
22498
22499} # as_fn_mkdir_p
22500if mkdir -p . 2>/dev/null; then
22501  as_mkdir_p='mkdir -p "$as_dir"'
22502else
22503  test -d ./-p && rmdir ./-p
22504  as_mkdir_p=false
22505fi
22506
22507
22508# as_fn_executable_p FILE
22509# -----------------------
22510# Test if FILE is an executable regular file.
22511as_fn_executable_p ()
22512{
22513  test -f "$1" && test -x "$1"
22514} # as_fn_executable_p
22515as_test_x='test -x'
22516as_executable_p=as_fn_executable_p
22517
22518# Sed expression to map a string onto a valid CPP name.
22519as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
22520
22521# Sed expression to map a string onto a valid variable name.
22522as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
22523
22524
22525exec 6>&1
22526## ----------------------------------- ##
22527## Main body of $CONFIG_STATUS script. ##
22528## ----------------------------------- ##
22529_ASEOF
22530test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
22531
22532cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
22533# Save the log message, to keep $0 and so on meaningful, and to
22534# report actual input values of CONFIG_FILES etc. instead of their
22535# values after options handling.
22536ac_log="
22537This file was extended by unbound $as_me 1.16.3, which was
22538generated by GNU Autoconf 2.69.  Invocation command line was
22539
22540  CONFIG_FILES    = $CONFIG_FILES
22541  CONFIG_HEADERS  = $CONFIG_HEADERS
22542  CONFIG_LINKS    = $CONFIG_LINKS
22543  CONFIG_COMMANDS = $CONFIG_COMMANDS
22544  $ $0 $@
22545
22546on `(hostname || uname -n) 2>/dev/null | sed 1q`
22547"
22548
22549_ACEOF
22550
22551case $ac_config_files in *"
22552"*) set x $ac_config_files; shift; ac_config_files=$*;;
22553esac
22554
22555case $ac_config_headers in *"
22556"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
22557esac
22558
22559
22560cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
22561# Files that config.status was made for.
22562config_files="$ac_config_files"
22563config_headers="$ac_config_headers"
22564config_commands="$ac_config_commands"
22565
22566_ACEOF
22567
22568cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
22569ac_cs_usage="\
22570\`$as_me' instantiates files and other configuration actions
22571from templates according to the current configuration.  Unless the files
22572and actions are specified as TAGs, all are instantiated by default.
22573
22574Usage: $0 [OPTION]... [TAG]...
22575
22576  -h, --help       print this help, then exit
22577  -V, --version    print version number and configuration settings, then exit
22578      --config     print configuration, then exit
22579  -q, --quiet, --silent
22580                   do not print progress messages
22581  -d, --debug      don't remove temporary files
22582      --recheck    update $as_me by reconfiguring in the same conditions
22583      --file=FILE[:TEMPLATE]
22584                   instantiate the configuration file FILE
22585      --header=FILE[:TEMPLATE]
22586                   instantiate the configuration header FILE
22587
22588Configuration files:
22589$config_files
22590
22591Configuration headers:
22592$config_headers
22593
22594Configuration commands:
22595$config_commands
22596
22597Report bugs to <unbound-bugs@nlnetlabs.nl or https://github.com/NLnetLabs/unbound/issues>."
22598
22599_ACEOF
22600cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
22601ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
22602ac_cs_version="\\
22603unbound config.status 1.16.3
22604configured by $0, generated by GNU Autoconf 2.69,
22605  with options \\"\$ac_cs_config\\"
22606
22607Copyright (C) 2012 Free Software Foundation, Inc.
22608This config.status script is free software; the Free Software Foundation
22609gives unlimited permission to copy, distribute and modify it."
22610
22611ac_pwd='$ac_pwd'
22612srcdir='$srcdir'
22613AWK='$AWK'
22614test -n "\$AWK" || AWK=awk
22615_ACEOF
22616
22617cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
22618# The default lists apply if the user does not specify any file.
22619ac_need_defaults=:
22620while test $# != 0
22621do
22622  case $1 in
22623  --*=?*)
22624    ac_option=`expr "X$1" : 'X\([^=]*\)='`
22625    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
22626    ac_shift=:
22627    ;;
22628  --*=)
22629    ac_option=`expr "X$1" : 'X\([^=]*\)='`
22630    ac_optarg=
22631    ac_shift=:
22632    ;;
22633  *)
22634    ac_option=$1
22635    ac_optarg=$2
22636    ac_shift=shift
22637    ;;
22638  esac
22639
22640  case $ac_option in
22641  # Handling of the options.
22642  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
22643    ac_cs_recheck=: ;;
22644  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
22645    $as_echo "$ac_cs_version"; exit ;;
22646  --config | --confi | --conf | --con | --co | --c )
22647    $as_echo "$ac_cs_config"; exit ;;
22648  --debug | --debu | --deb | --de | --d | -d )
22649    debug=: ;;
22650  --file | --fil | --fi | --f )
22651    $ac_shift
22652    case $ac_optarg in
22653    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
22654    '') as_fn_error $? "missing file argument" ;;
22655    esac
22656    as_fn_append CONFIG_FILES " '$ac_optarg'"
22657    ac_need_defaults=false;;
22658  --header | --heade | --head | --hea )
22659    $ac_shift
22660    case $ac_optarg in
22661    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
22662    esac
22663    as_fn_append CONFIG_HEADERS " '$ac_optarg'"
22664    ac_need_defaults=false;;
22665  --he | --h)
22666    # Conflict between --help and --header
22667    as_fn_error $? "ambiguous option: \`$1'
22668Try \`$0 --help' for more information.";;
22669  --help | --hel | -h )
22670    $as_echo "$ac_cs_usage"; exit ;;
22671  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
22672  | -silent | --silent | --silen | --sile | --sil | --si | --s)
22673    ac_cs_silent=: ;;
22674
22675  # This is an error.
22676  -*) as_fn_error $? "unrecognized option: \`$1'
22677Try \`$0 --help' for more information." ;;
22678
22679  *) as_fn_append ac_config_targets " $1"
22680     ac_need_defaults=false ;;
22681
22682  esac
22683  shift
22684done
22685
22686ac_configure_extra_args=
22687
22688if $ac_cs_silent; then
22689  exec 6>/dev/null
22690  ac_configure_extra_args="$ac_configure_extra_args --silent"
22691fi
22692
22693_ACEOF
22694cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
22695if \$ac_cs_recheck; then
22696  set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
22697  shift
22698  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
22699  CONFIG_SHELL='$SHELL'
22700  export CONFIG_SHELL
22701  exec "\$@"
22702fi
22703
22704_ACEOF
22705cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
22706exec 5>>config.log
22707{
22708  echo
22709  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
22710## Running $as_me. ##
22711_ASBOX
22712  $as_echo "$ac_log"
22713} >&5
22714
22715_ACEOF
22716cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
22717#
22718# INIT-COMMANDS
22719#
22720
22721
22722# The HP-UX ksh and POSIX shell print the target directory to stdout
22723# if CDPATH is set.
22724(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
22725
22726sed_quote_subst='$sed_quote_subst'
22727double_quote_subst='$double_quote_subst'
22728delay_variable_subst='$delay_variable_subst'
22729macro_version='`$ECHO "$macro_version" | $SED "$delay_single_quote_subst"`'
22730macro_revision='`$ECHO "$macro_revision" | $SED "$delay_single_quote_subst"`'
22731enable_shared='`$ECHO "$enable_shared" | $SED "$delay_single_quote_subst"`'
22732enable_static='`$ECHO "$enable_static" | $SED "$delay_single_quote_subst"`'
22733pic_mode='`$ECHO "$pic_mode" | $SED "$delay_single_quote_subst"`'
22734enable_fast_install='`$ECHO "$enable_fast_install" | $SED "$delay_single_quote_subst"`'
22735shared_archive_member_spec='`$ECHO "$shared_archive_member_spec" | $SED "$delay_single_quote_subst"`'
22736SHELL='`$ECHO "$SHELL" | $SED "$delay_single_quote_subst"`'
22737ECHO='`$ECHO "$ECHO" | $SED "$delay_single_quote_subst"`'
22738PATH_SEPARATOR='`$ECHO "$PATH_SEPARATOR" | $SED "$delay_single_quote_subst"`'
22739host_alias='`$ECHO "$host_alias" | $SED "$delay_single_quote_subst"`'
22740host='`$ECHO "$host" | $SED "$delay_single_quote_subst"`'
22741host_os='`$ECHO "$host_os" | $SED "$delay_single_quote_subst"`'
22742build_alias='`$ECHO "$build_alias" | $SED "$delay_single_quote_subst"`'
22743build='`$ECHO "$build" | $SED "$delay_single_quote_subst"`'
22744build_os='`$ECHO "$build_os" | $SED "$delay_single_quote_subst"`'
22745SED='`$ECHO "$SED" | $SED "$delay_single_quote_subst"`'
22746Xsed='`$ECHO "$Xsed" | $SED "$delay_single_quote_subst"`'
22747GREP='`$ECHO "$GREP" | $SED "$delay_single_quote_subst"`'
22748EGREP='`$ECHO "$EGREP" | $SED "$delay_single_quote_subst"`'
22749FGREP='`$ECHO "$FGREP" | $SED "$delay_single_quote_subst"`'
22750LD='`$ECHO "$LD" | $SED "$delay_single_quote_subst"`'
22751NM='`$ECHO "$NM" | $SED "$delay_single_quote_subst"`'
22752LN_S='`$ECHO "$LN_S" | $SED "$delay_single_quote_subst"`'
22753max_cmd_len='`$ECHO "$max_cmd_len" | $SED "$delay_single_quote_subst"`'
22754ac_objext='`$ECHO "$ac_objext" | $SED "$delay_single_quote_subst"`'
22755exeext='`$ECHO "$exeext" | $SED "$delay_single_quote_subst"`'
22756lt_unset='`$ECHO "$lt_unset" | $SED "$delay_single_quote_subst"`'
22757lt_SP2NL='`$ECHO "$lt_SP2NL" | $SED "$delay_single_quote_subst"`'
22758lt_NL2SP='`$ECHO "$lt_NL2SP" | $SED "$delay_single_quote_subst"`'
22759lt_cv_to_host_file_cmd='`$ECHO "$lt_cv_to_host_file_cmd" | $SED "$delay_single_quote_subst"`'
22760lt_cv_to_tool_file_cmd='`$ECHO "$lt_cv_to_tool_file_cmd" | $SED "$delay_single_quote_subst"`'
22761reload_flag='`$ECHO "$reload_flag" | $SED "$delay_single_quote_subst"`'
22762reload_cmds='`$ECHO "$reload_cmds" | $SED "$delay_single_quote_subst"`'
22763OBJDUMP='`$ECHO "$OBJDUMP" | $SED "$delay_single_quote_subst"`'
22764deplibs_check_method='`$ECHO "$deplibs_check_method" | $SED "$delay_single_quote_subst"`'
22765file_magic_cmd='`$ECHO "$file_magic_cmd" | $SED "$delay_single_quote_subst"`'
22766file_magic_glob='`$ECHO "$file_magic_glob" | $SED "$delay_single_quote_subst"`'
22767want_nocaseglob='`$ECHO "$want_nocaseglob" | $SED "$delay_single_quote_subst"`'
22768DLLTOOL='`$ECHO "$DLLTOOL" | $SED "$delay_single_quote_subst"`'
22769sharedlib_from_linklib_cmd='`$ECHO "$sharedlib_from_linklib_cmd" | $SED "$delay_single_quote_subst"`'
22770AR='`$ECHO "$AR" | $SED "$delay_single_quote_subst"`'
22771AR_FLAGS='`$ECHO "$AR_FLAGS" | $SED "$delay_single_quote_subst"`'
22772archiver_list_spec='`$ECHO "$archiver_list_spec" | $SED "$delay_single_quote_subst"`'
22773STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`'
22774RANLIB='`$ECHO "$RANLIB" | $SED "$delay_single_quote_subst"`'
22775old_postinstall_cmds='`$ECHO "$old_postinstall_cmds" | $SED "$delay_single_quote_subst"`'
22776old_postuninstall_cmds='`$ECHO "$old_postuninstall_cmds" | $SED "$delay_single_quote_subst"`'
22777old_archive_cmds='`$ECHO "$old_archive_cmds" | $SED "$delay_single_quote_subst"`'
22778lock_old_archive_extraction='`$ECHO "$lock_old_archive_extraction" | $SED "$delay_single_quote_subst"`'
22779CC='`$ECHO "$CC" | $SED "$delay_single_quote_subst"`'
22780CFLAGS='`$ECHO "$CFLAGS" | $SED "$delay_single_quote_subst"`'
22781compiler='`$ECHO "$compiler" | $SED "$delay_single_quote_subst"`'
22782GCC='`$ECHO "$GCC" | $SED "$delay_single_quote_subst"`'
22783lt_cv_sys_global_symbol_pipe='`$ECHO "$lt_cv_sys_global_symbol_pipe" | $SED "$delay_single_quote_subst"`'
22784lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`'
22785lt_cv_sys_global_symbol_to_import='`$ECHO "$lt_cv_sys_global_symbol_to_import" | $SED "$delay_single_quote_subst"`'
22786lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`'
22787lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $SED "$delay_single_quote_subst"`'
22788lt_cv_nm_interface='`$ECHO "$lt_cv_nm_interface" | $SED "$delay_single_quote_subst"`'
22789nm_file_list_spec='`$ECHO "$nm_file_list_spec" | $SED "$delay_single_quote_subst"`'
22790lt_sysroot='`$ECHO "$lt_sysroot" | $SED "$delay_single_quote_subst"`'
22791lt_cv_truncate_bin='`$ECHO "$lt_cv_truncate_bin" | $SED "$delay_single_quote_subst"`'
22792objdir='`$ECHO "$objdir" | $SED "$delay_single_quote_subst"`'
22793MAGIC_CMD='`$ECHO "$MAGIC_CMD" | $SED "$delay_single_quote_subst"`'
22794lt_prog_compiler_no_builtin_flag='`$ECHO "$lt_prog_compiler_no_builtin_flag" | $SED "$delay_single_quote_subst"`'
22795lt_prog_compiler_pic='`$ECHO "$lt_prog_compiler_pic" | $SED "$delay_single_quote_subst"`'
22796lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`'
22797lt_prog_compiler_static='`$ECHO "$lt_prog_compiler_static" | $SED "$delay_single_quote_subst"`'
22798lt_cv_prog_compiler_c_o='`$ECHO "$lt_cv_prog_compiler_c_o" | $SED "$delay_single_quote_subst"`'
22799need_locks='`$ECHO "$need_locks" | $SED "$delay_single_quote_subst"`'
22800MANIFEST_TOOL='`$ECHO "$MANIFEST_TOOL" | $SED "$delay_single_quote_subst"`'
22801DSYMUTIL='`$ECHO "$DSYMUTIL" | $SED "$delay_single_quote_subst"`'
22802NMEDIT='`$ECHO "$NMEDIT" | $SED "$delay_single_quote_subst"`'
22803LIPO='`$ECHO "$LIPO" | $SED "$delay_single_quote_subst"`'
22804OTOOL='`$ECHO "$OTOOL" | $SED "$delay_single_quote_subst"`'
22805OTOOL64='`$ECHO "$OTOOL64" | $SED "$delay_single_quote_subst"`'
22806libext='`$ECHO "$libext" | $SED "$delay_single_quote_subst"`'
22807shrext_cmds='`$ECHO "$shrext_cmds" | $SED "$delay_single_quote_subst"`'
22808extract_expsyms_cmds='`$ECHO "$extract_expsyms_cmds" | $SED "$delay_single_quote_subst"`'
22809archive_cmds_need_lc='`$ECHO "$archive_cmds_need_lc" | $SED "$delay_single_quote_subst"`'
22810enable_shared_with_static_runtimes='`$ECHO "$enable_shared_with_static_runtimes" | $SED "$delay_single_quote_subst"`'
22811export_dynamic_flag_spec='`$ECHO "$export_dynamic_flag_spec" | $SED "$delay_single_quote_subst"`'
22812whole_archive_flag_spec='`$ECHO "$whole_archive_flag_spec" | $SED "$delay_single_quote_subst"`'
22813compiler_needs_object='`$ECHO "$compiler_needs_object" | $SED "$delay_single_quote_subst"`'
22814old_archive_from_new_cmds='`$ECHO "$old_archive_from_new_cmds" | $SED "$delay_single_quote_subst"`'
22815old_archive_from_expsyms_cmds='`$ECHO "$old_archive_from_expsyms_cmds" | $SED "$delay_single_quote_subst"`'
22816archive_cmds='`$ECHO "$archive_cmds" | $SED "$delay_single_quote_subst"`'
22817archive_expsym_cmds='`$ECHO "$archive_expsym_cmds" | $SED "$delay_single_quote_subst"`'
22818module_cmds='`$ECHO "$module_cmds" | $SED "$delay_single_quote_subst"`'
22819module_expsym_cmds='`$ECHO "$module_expsym_cmds" | $SED "$delay_single_quote_subst"`'
22820with_gnu_ld='`$ECHO "$with_gnu_ld" | $SED "$delay_single_quote_subst"`'
22821allow_undefined_flag='`$ECHO "$allow_undefined_flag" | $SED "$delay_single_quote_subst"`'
22822no_undefined_flag='`$ECHO "$no_undefined_flag" | $SED "$delay_single_quote_subst"`'
22823hardcode_libdir_flag_spec='`$ECHO "$hardcode_libdir_flag_spec" | $SED "$delay_single_quote_subst"`'
22824hardcode_libdir_separator='`$ECHO "$hardcode_libdir_separator" | $SED "$delay_single_quote_subst"`'
22825hardcode_direct='`$ECHO "$hardcode_direct" | $SED "$delay_single_quote_subst"`'
22826hardcode_direct_absolute='`$ECHO "$hardcode_direct_absolute" | $SED "$delay_single_quote_subst"`'
22827hardcode_minus_L='`$ECHO "$hardcode_minus_L" | $SED "$delay_single_quote_subst"`'
22828hardcode_shlibpath_var='`$ECHO "$hardcode_shlibpath_var" | $SED "$delay_single_quote_subst"`'
22829hardcode_automatic='`$ECHO "$hardcode_automatic" | $SED "$delay_single_quote_subst"`'
22830inherit_rpath='`$ECHO "$inherit_rpath" | $SED "$delay_single_quote_subst"`'
22831link_all_deplibs='`$ECHO "$link_all_deplibs" | $SED "$delay_single_quote_subst"`'
22832always_export_symbols='`$ECHO "$always_export_symbols" | $SED "$delay_single_quote_subst"`'
22833export_symbols_cmds='`$ECHO "$export_symbols_cmds" | $SED "$delay_single_quote_subst"`'
22834exclude_expsyms='`$ECHO "$exclude_expsyms" | $SED "$delay_single_quote_subst"`'
22835include_expsyms='`$ECHO "$include_expsyms" | $SED "$delay_single_quote_subst"`'
22836prelink_cmds='`$ECHO "$prelink_cmds" | $SED "$delay_single_quote_subst"`'
22837postlink_cmds='`$ECHO "$postlink_cmds" | $SED "$delay_single_quote_subst"`'
22838file_list_spec='`$ECHO "$file_list_spec" | $SED "$delay_single_quote_subst"`'
22839variables_saved_for_relink='`$ECHO "$variables_saved_for_relink" | $SED "$delay_single_quote_subst"`'
22840need_lib_prefix='`$ECHO "$need_lib_prefix" | $SED "$delay_single_quote_subst"`'
22841need_version='`$ECHO "$need_version" | $SED "$delay_single_quote_subst"`'
22842version_type='`$ECHO "$version_type" | $SED "$delay_single_quote_subst"`'
22843runpath_var='`$ECHO "$runpath_var" | $SED "$delay_single_quote_subst"`'
22844shlibpath_var='`$ECHO "$shlibpath_var" | $SED "$delay_single_quote_subst"`'
22845shlibpath_overrides_runpath='`$ECHO "$shlibpath_overrides_runpath" | $SED "$delay_single_quote_subst"`'
22846libname_spec='`$ECHO "$libname_spec" | $SED "$delay_single_quote_subst"`'
22847library_names_spec='`$ECHO "$library_names_spec" | $SED "$delay_single_quote_subst"`'
22848soname_spec='`$ECHO "$soname_spec" | $SED "$delay_single_quote_subst"`'
22849install_override_mode='`$ECHO "$install_override_mode" | $SED "$delay_single_quote_subst"`'
22850postinstall_cmds='`$ECHO "$postinstall_cmds" | $SED "$delay_single_quote_subst"`'
22851postuninstall_cmds='`$ECHO "$postuninstall_cmds" | $SED "$delay_single_quote_subst"`'
22852finish_cmds='`$ECHO "$finish_cmds" | $SED "$delay_single_quote_subst"`'
22853finish_eval='`$ECHO "$finish_eval" | $SED "$delay_single_quote_subst"`'
22854hardcode_into_libs='`$ECHO "$hardcode_into_libs" | $SED "$delay_single_quote_subst"`'
22855sys_lib_search_path_spec='`$ECHO "$sys_lib_search_path_spec" | $SED "$delay_single_quote_subst"`'
22856configure_time_dlsearch_path='`$ECHO "$configure_time_dlsearch_path" | $SED "$delay_single_quote_subst"`'
22857configure_time_lt_sys_library_path='`$ECHO "$configure_time_lt_sys_library_path" | $SED "$delay_single_quote_subst"`'
22858hardcode_action='`$ECHO "$hardcode_action" | $SED "$delay_single_quote_subst"`'
22859enable_dlopen='`$ECHO "$enable_dlopen" | $SED "$delay_single_quote_subst"`'
22860enable_dlopen_self='`$ECHO "$enable_dlopen_self" | $SED "$delay_single_quote_subst"`'
22861enable_dlopen_self_static='`$ECHO "$enable_dlopen_self_static" | $SED "$delay_single_quote_subst"`'
22862old_striplib='`$ECHO "$old_striplib" | $SED "$delay_single_quote_subst"`'
22863striplib='`$ECHO "$striplib" | $SED "$delay_single_quote_subst"`'
22864
22865LTCC='$LTCC'
22866LTCFLAGS='$LTCFLAGS'
22867compiler='$compiler_DEFAULT'
22868
22869# A function that is used when there is no print builtin or printf.
22870func_fallback_echo ()
22871{
22872  eval 'cat <<_LTECHO_EOF
22873\$1
22874_LTECHO_EOF'
22875}
22876
22877# Quote evaled strings.
22878for var in SHELL \
22879ECHO \
22880PATH_SEPARATOR \
22881SED \
22882GREP \
22883EGREP \
22884FGREP \
22885LD \
22886NM \
22887LN_S \
22888lt_SP2NL \
22889lt_NL2SP \
22890reload_flag \
22891OBJDUMP \
22892deplibs_check_method \
22893file_magic_cmd \
22894file_magic_glob \
22895want_nocaseglob \
22896DLLTOOL \
22897sharedlib_from_linklib_cmd \
22898AR \
22899AR_FLAGS \
22900archiver_list_spec \
22901STRIP \
22902RANLIB \
22903CC \
22904CFLAGS \
22905compiler \
22906lt_cv_sys_global_symbol_pipe \
22907lt_cv_sys_global_symbol_to_cdecl \
22908lt_cv_sys_global_symbol_to_import \
22909lt_cv_sys_global_symbol_to_c_name_address \
22910lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \
22911lt_cv_nm_interface \
22912nm_file_list_spec \
22913lt_cv_truncate_bin \
22914lt_prog_compiler_no_builtin_flag \
22915lt_prog_compiler_pic \
22916lt_prog_compiler_wl \
22917lt_prog_compiler_static \
22918lt_cv_prog_compiler_c_o \
22919need_locks \
22920MANIFEST_TOOL \
22921DSYMUTIL \
22922NMEDIT \
22923LIPO \
22924OTOOL \
22925OTOOL64 \
22926shrext_cmds \
22927export_dynamic_flag_spec \
22928whole_archive_flag_spec \
22929compiler_needs_object \
22930with_gnu_ld \
22931allow_undefined_flag \
22932no_undefined_flag \
22933hardcode_libdir_flag_spec \
22934hardcode_libdir_separator \
22935exclude_expsyms \
22936include_expsyms \
22937file_list_spec \
22938variables_saved_for_relink \
22939libname_spec \
22940library_names_spec \
22941soname_spec \
22942install_override_mode \
22943finish_eval \
22944old_striplib \
22945striplib; do
22946    case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
22947    *[\\\\\\\`\\"\\\$]*)
22948      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes
22949      ;;
22950    *)
22951      eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
22952      ;;
22953    esac
22954done
22955
22956# Double-quote double-evaled strings.
22957for var in reload_cmds \
22958old_postinstall_cmds \
22959old_postuninstall_cmds \
22960old_archive_cmds \
22961extract_expsyms_cmds \
22962old_archive_from_new_cmds \
22963old_archive_from_expsyms_cmds \
22964archive_cmds \
22965archive_expsym_cmds \
22966module_cmds \
22967module_expsym_cmds \
22968export_symbols_cmds \
22969prelink_cmds \
22970postlink_cmds \
22971postinstall_cmds \
22972postuninstall_cmds \
22973finish_cmds \
22974sys_lib_search_path_spec \
22975configure_time_dlsearch_path \
22976configure_time_lt_sys_library_path; do
22977    case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
22978    *[\\\\\\\`\\"\\\$]*)
22979      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes
22980      ;;
22981    *)
22982      eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
22983      ;;
22984    esac
22985done
22986
22987ac_aux_dir='$ac_aux_dir'
22988
22989# See if we are running on zsh, and set the options that allow our
22990# commands through without removal of \ escapes INIT.
22991if test -n "\${ZSH_VERSION+set}"; then
22992   setopt NO_GLOB_SUBST
22993fi
22994
22995
22996    PACKAGE='$PACKAGE'
22997    VERSION='$VERSION'
22998    RM='$RM'
22999    ofile='$ofile'
23000
23001
23002
23003
23004_ACEOF
23005
23006cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
23007
23008# Handling of arguments.
23009for ac_config_target in $ac_config_targets
23010do
23011  case $ac_config_target in
23012    "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;;
23013    "disable-rpath") CONFIG_COMMANDS="$CONFIG_COMMANDS disable-rpath" ;;
23014    "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
23015    "doc/example.conf") CONFIG_FILES="$CONFIG_FILES doc/example.conf" ;;
23016    "doc/libunbound.3") CONFIG_FILES="$CONFIG_FILES doc/libunbound.3" ;;
23017    "doc/unbound.8") CONFIG_FILES="$CONFIG_FILES doc/unbound.8" ;;
23018    "doc/unbound-anchor.8") CONFIG_FILES="$CONFIG_FILES doc/unbound-anchor.8" ;;
23019    "doc/unbound-checkconf.8") CONFIG_FILES="$CONFIG_FILES doc/unbound-checkconf.8" ;;
23020    "doc/unbound.conf.5") CONFIG_FILES="$CONFIG_FILES doc/unbound.conf.5" ;;
23021    "doc/unbound-control.8") CONFIG_FILES="$CONFIG_FILES doc/unbound-control.8" ;;
23022    "doc/unbound-host.1") CONFIG_FILES="$CONFIG_FILES doc/unbound-host.1" ;;
23023    "smallapp/unbound-control-setup.sh") CONFIG_FILES="$CONFIG_FILES smallapp/unbound-control-setup.sh" ;;
23024    "dnstap/dnstap_config.h") CONFIG_FILES="$CONFIG_FILES dnstap/dnstap_config.h" ;;
23025    "dnscrypt/dnscrypt_config.h") CONFIG_FILES="$CONFIG_FILES dnscrypt/dnscrypt_config.h" ;;
23026    "contrib/libunbound.pc") CONFIG_FILES="$CONFIG_FILES contrib/libunbound.pc" ;;
23027    "contrib/unbound.socket") CONFIG_FILES="$CONFIG_FILES contrib/unbound.socket" ;;
23028    "contrib/unbound.service") CONFIG_FILES="$CONFIG_FILES contrib/unbound.service" ;;
23029    "contrib/unbound_portable.service") CONFIG_FILES="$CONFIG_FILES contrib/unbound_portable.service" ;;
23030    "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
23031
23032  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
23033  esac
23034done
23035
23036
23037# If the user did not use the arguments to specify the items to instantiate,
23038# then the envvar interface is used.  Set only those that are not.
23039# We use the long form for the default assignment because of an extremely
23040# bizarre bug on SunOS 4.1.3.
23041if $ac_need_defaults; then
23042  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
23043  test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
23044  test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
23045fi
23046
23047# Have a temporary directory for convenience.  Make it in the build tree
23048# simply because there is no reason against having it here, and in addition,
23049# creating and moving files from /tmp can sometimes cause problems.
23050# Hook for its removal unless debugging.
23051# Note that there is a small window in which the directory will not be cleaned:
23052# after its creation but before its name has been assigned to `$tmp'.
23053$debug ||
23054{
23055  tmp= ac_tmp=
23056  trap 'exit_status=$?
23057  : "${ac_tmp:=$tmp}"
23058  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
23059' 0
23060  trap 'as_fn_exit 1' 1 2 13 15
23061}
23062# Create a (secure) tmp directory for tmp files.
23063
23064{
23065  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
23066  test -d "$tmp"
23067}  ||
23068{
23069  tmp=./conf$$-$RANDOM
23070  (umask 077 && mkdir "$tmp")
23071} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
23072ac_tmp=$tmp
23073
23074# Set up the scripts for CONFIG_FILES section.
23075# No need to generate them if there are no CONFIG_FILES.
23076# This happens for instance with `./config.status config.h'.
23077if test -n "$CONFIG_FILES"; then
23078
23079
23080ac_cr=`echo X | tr X '\015'`
23081# On cygwin, bash can eat \r inside `` if the user requested igncr.
23082# But we know of no other shell where ac_cr would be empty at this
23083# point, so we can use a bashism as a fallback.
23084if test "x$ac_cr" = x; then
23085  eval ac_cr=\$\'\\r\'
23086fi
23087ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
23088if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
23089  ac_cs_awk_cr='\\r'
23090else
23091  ac_cs_awk_cr=$ac_cr
23092fi
23093
23094echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
23095_ACEOF
23096
23097
23098{
23099  echo "cat >conf$$subs.awk <<_ACEOF" &&
23100  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
23101  echo "_ACEOF"
23102} >conf$$subs.sh ||
23103  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
23104ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
23105ac_delim='%!_!# '
23106for ac_last_try in false false false false false :; do
23107  . ./conf$$subs.sh ||
23108    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
23109
23110  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
23111  if test $ac_delim_n = $ac_delim_num; then
23112    break
23113  elif $ac_last_try; then
23114    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
23115  else
23116    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
23117  fi
23118done
23119rm -f conf$$subs.sh
23120
23121cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
23122cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
23123_ACEOF
23124sed -n '
23125h
23126s/^/S["/; s/!.*/"]=/
23127p
23128g
23129s/^[^!]*!//
23130:repl
23131t repl
23132s/'"$ac_delim"'$//
23133t delim
23134:nl
23135h
23136s/\(.\{148\}\)..*/\1/
23137t more1
23138s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
23139p
23140n
23141b repl
23142:more1
23143s/["\\]/\\&/g; s/^/"/; s/$/"\\/
23144p
23145g
23146s/.\{148\}//
23147t nl
23148:delim
23149h
23150s/\(.\{148\}\)..*/\1/
23151t more2
23152s/["\\]/\\&/g; s/^/"/; s/$/"/
23153p
23154b
23155:more2
23156s/["\\]/\\&/g; s/^/"/; s/$/"\\/
23157p
23158g
23159s/.\{148\}//
23160t delim
23161' <conf$$subs.awk | sed '
23162/^[^""]/{
23163  N
23164  s/\n//
23165}
23166' >>$CONFIG_STATUS || ac_write_fail=1
23167rm -f conf$$subs.awk
23168cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
23169_ACAWK
23170cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
23171  for (key in S) S_is_set[key] = 1
23172  FS = ""
23173
23174}
23175{
23176  line = $ 0
23177  nfields = split(line, field, "@")
23178  substed = 0
23179  len = length(field[1])
23180  for (i = 2; i < nfields; i++) {
23181    key = field[i]
23182    keylen = length(key)
23183    if (S_is_set[key]) {
23184      value = S[key]
23185      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
23186      len += length(value) + length(field[++i])
23187      substed = 1
23188    } else
23189      len += 1 + keylen
23190  }
23191
23192  print line
23193}
23194
23195_ACAWK
23196_ACEOF
23197cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
23198if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
23199  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
23200else
23201  cat
23202fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
23203  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
23204_ACEOF
23205
23206# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
23207# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
23208# trailing colons and then remove the whole line if VPATH becomes empty
23209# (actually we leave an empty line to preserve line numbers).
23210if test "x$srcdir" = x.; then
23211  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
23212h
23213s///
23214s/^/:/
23215s/[	 ]*$/:/
23216s/:\$(srcdir):/:/g
23217s/:\${srcdir}:/:/g
23218s/:@srcdir@:/:/g
23219s/^:*//
23220s/:*$//
23221x
23222s/\(=[	 ]*\).*/\1/
23223G
23224s/\n//
23225s/^[^=]*=[	 ]*$//
23226}'
23227fi
23228
23229cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
23230fi # test -n "$CONFIG_FILES"
23231
23232# Set up the scripts for CONFIG_HEADERS section.
23233# No need to generate them if there are no CONFIG_HEADERS.
23234# This happens for instance with `./config.status Makefile'.
23235if test -n "$CONFIG_HEADERS"; then
23236cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
23237BEGIN {
23238_ACEOF
23239
23240# Transform confdefs.h into an awk script `defines.awk', embedded as
23241# here-document in config.status, that substitutes the proper values into
23242# config.h.in to produce config.h.
23243
23244# Create a delimiter string that does not exist in confdefs.h, to ease
23245# handling of long lines.
23246ac_delim='%!_!# '
23247for ac_last_try in false false :; do
23248  ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
23249  if test -z "$ac_tt"; then
23250    break
23251  elif $ac_last_try; then
23252    as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
23253  else
23254    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
23255  fi
23256done
23257
23258# For the awk script, D is an array of macro values keyed by name,
23259# likewise P contains macro parameters if any.  Preserve backslash
23260# newline sequences.
23261
23262ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
23263sed -n '
23264s/.\{148\}/&'"$ac_delim"'/g
23265t rset
23266:rset
23267s/^[	 ]*#[	 ]*define[	 ][	 ]*/ /
23268t def
23269d
23270:def
23271s/\\$//
23272t bsnl
23273s/["\\]/\\&/g
23274s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
23275D["\1"]=" \3"/p
23276s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2"/p
23277d
23278:bsnl
23279s/["\\]/\\&/g
23280s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
23281D["\1"]=" \3\\\\\\n"\\/p
23282t cont
23283s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
23284t cont
23285d
23286:cont
23287n
23288s/.\{148\}/&'"$ac_delim"'/g
23289t clear
23290:clear
23291s/\\$//
23292t bsnlc
23293s/["\\]/\\&/g; s/^/"/; s/$/"/p
23294d
23295:bsnlc
23296s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
23297b cont
23298' <confdefs.h | sed '
23299s/'"$ac_delim"'/"\\\
23300"/g' >>$CONFIG_STATUS || ac_write_fail=1
23301
23302cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
23303  for (key in D) D_is_set[key] = 1
23304  FS = ""
23305}
23306/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
23307  line = \$ 0
23308  split(line, arg, " ")
23309  if (arg[1] == "#") {
23310    defundef = arg[2]
23311    mac1 = arg[3]
23312  } else {
23313    defundef = substr(arg[1], 2)
23314    mac1 = arg[2]
23315  }
23316  split(mac1, mac2, "(") #)
23317  macro = mac2[1]
23318  prefix = substr(line, 1, index(line, defundef) - 1)
23319  if (D_is_set[macro]) {
23320    # Preserve the white space surrounding the "#".
23321    print prefix "define", macro P[macro] D[macro]
23322    next
23323  } else {
23324    # Replace #undef with comments.  This is necessary, for example,
23325    # in the case of _POSIX_SOURCE, which is predefined and required
23326    # on some systems where configure will not decide to define it.
23327    if (defundef == "undef") {
23328      print "/*", prefix defundef, macro, "*/"
23329      next
23330    }
23331  }
23332}
23333{ print }
23334_ACAWK
23335_ACEOF
23336cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
23337  as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
23338fi # test -n "$CONFIG_HEADERS"
23339
23340
23341eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS    :C $CONFIG_COMMANDS"
23342shift
23343for ac_tag
23344do
23345  case $ac_tag in
23346  :[FHLC]) ac_mode=$ac_tag; continue;;
23347  esac
23348  case $ac_mode$ac_tag in
23349  :[FHL]*:*);;
23350  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
23351  :[FH]-) ac_tag=-:-;;
23352  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
23353  esac
23354  ac_save_IFS=$IFS
23355  IFS=:
23356  set x $ac_tag
23357  IFS=$ac_save_IFS
23358  shift
23359  ac_file=$1
23360  shift
23361
23362  case $ac_mode in
23363  :L) ac_source=$1;;
23364  :[FH])
23365    ac_file_inputs=
23366    for ac_f
23367    do
23368      case $ac_f in
23369      -) ac_f="$ac_tmp/stdin";;
23370      *) # Look for the file first in the build tree, then in the source tree
23371	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
23372	 # because $ac_f cannot contain `:'.
23373	 test -f "$ac_f" ||
23374	   case $ac_f in
23375	   [\\/$]*) false;;
23376	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
23377	   esac ||
23378	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
23379      esac
23380      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
23381      as_fn_append ac_file_inputs " '$ac_f'"
23382    done
23383
23384    # Let's still pretend it is `configure' which instantiates (i.e., don't
23385    # use $as_me), people would be surprised to read:
23386    #    /* config.h.  Generated by config.status.  */
23387    configure_input='Generated from '`
23388	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
23389	`' by configure.'
23390    if test x"$ac_file" != x-; then
23391      configure_input="$ac_file.  $configure_input"
23392      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
23393$as_echo "$as_me: creating $ac_file" >&6;}
23394    fi
23395    # Neutralize special characters interpreted by sed in replacement strings.
23396    case $configure_input in #(
23397    *\&* | *\|* | *\\* )
23398       ac_sed_conf_input=`$as_echo "$configure_input" |
23399       sed 's/[\\\\&|]/\\\\&/g'`;; #(
23400    *) ac_sed_conf_input=$configure_input;;
23401    esac
23402
23403    case $ac_tag in
23404    *:-:* | *:-) cat >"$ac_tmp/stdin" \
23405      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
23406    esac
23407    ;;
23408  esac
23409
23410  ac_dir=`$as_dirname -- "$ac_file" ||
23411$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
23412	 X"$ac_file" : 'X\(//\)[^/]' \| \
23413	 X"$ac_file" : 'X\(//\)$' \| \
23414	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
23415$as_echo X"$ac_file" |
23416    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
23417	    s//\1/
23418	    q
23419	  }
23420	  /^X\(\/\/\)[^/].*/{
23421	    s//\1/
23422	    q
23423	  }
23424	  /^X\(\/\/\)$/{
23425	    s//\1/
23426	    q
23427	  }
23428	  /^X\(\/\).*/{
23429	    s//\1/
23430	    q
23431	  }
23432	  s/.*/./; q'`
23433  as_dir="$ac_dir"; as_fn_mkdir_p
23434  ac_builddir=.
23435
23436case "$ac_dir" in
23437.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
23438*)
23439  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
23440  # A ".." for each directory in $ac_dir_suffix.
23441  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
23442  case $ac_top_builddir_sub in
23443  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
23444  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
23445  esac ;;
23446esac
23447ac_abs_top_builddir=$ac_pwd
23448ac_abs_builddir=$ac_pwd$ac_dir_suffix
23449# for backward compatibility:
23450ac_top_builddir=$ac_top_build_prefix
23451
23452case $srcdir in
23453  .)  # We are building in place.
23454    ac_srcdir=.
23455    ac_top_srcdir=$ac_top_builddir_sub
23456    ac_abs_top_srcdir=$ac_pwd ;;
23457  [\\/]* | ?:[\\/]* )  # Absolute name.
23458    ac_srcdir=$srcdir$ac_dir_suffix;
23459    ac_top_srcdir=$srcdir
23460    ac_abs_top_srcdir=$srcdir ;;
23461  *) # Relative name.
23462    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
23463    ac_top_srcdir=$ac_top_build_prefix$srcdir
23464    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
23465esac
23466ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
23467
23468
23469  case $ac_mode in
23470  :F)
23471  #
23472  # CONFIG_FILE
23473  #
23474
23475_ACEOF
23476
23477cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
23478# If the template does not know about datarootdir, expand it.
23479# FIXME: This hack should be removed a few years after 2.60.
23480ac_datarootdir_hack=; ac_datarootdir_seen=
23481ac_sed_dataroot='
23482/datarootdir/ {
23483  p
23484  q
23485}
23486/@datadir@/p
23487/@docdir@/p
23488/@infodir@/p
23489/@localedir@/p
23490/@mandir@/p'
23491case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
23492*datarootdir*) ac_datarootdir_seen=yes;;
23493*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
23494  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
23495$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
23496_ACEOF
23497cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
23498  ac_datarootdir_hack='
23499  s&@datadir@&$datadir&g
23500  s&@docdir@&$docdir&g
23501  s&@infodir@&$infodir&g
23502  s&@localedir@&$localedir&g
23503  s&@mandir@&$mandir&g
23504  s&\\\${datarootdir}&$datarootdir&g' ;;
23505esac
23506_ACEOF
23507
23508# Neutralize VPATH when `$srcdir' = `.'.
23509# Shell code in configure.ac might set extrasub.
23510# FIXME: do we really want to maintain this feature?
23511cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
23512ac_sed_extra="$ac_vpsub
23513$extrasub
23514_ACEOF
23515cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
23516:t
23517/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
23518s|@configure_input@|$ac_sed_conf_input|;t t
23519s&@top_builddir@&$ac_top_builddir_sub&;t t
23520s&@top_build_prefix@&$ac_top_build_prefix&;t t
23521s&@srcdir@&$ac_srcdir&;t t
23522s&@abs_srcdir@&$ac_abs_srcdir&;t t
23523s&@top_srcdir@&$ac_top_srcdir&;t t
23524s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
23525s&@builddir@&$ac_builddir&;t t
23526s&@abs_builddir@&$ac_abs_builddir&;t t
23527s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
23528$ac_datarootdir_hack
23529"
23530eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
23531  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
23532
23533test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
23534  { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
23535  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' \
23536      "$ac_tmp/out"`; test -z "$ac_out"; } &&
23537  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
23538which seems to be undefined.  Please make sure it is defined" >&5
23539$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
23540which seems to be undefined.  Please make sure it is defined" >&2;}
23541
23542  rm -f "$ac_tmp/stdin"
23543  case $ac_file in
23544  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
23545  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
23546  esac \
23547  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
23548 ;;
23549  :H)
23550  #
23551  # CONFIG_HEADER
23552  #
23553  if test x"$ac_file" != x-; then
23554    {
23555      $as_echo "/* $configure_input  */" \
23556      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
23557    } >"$ac_tmp/config.h" \
23558      || as_fn_error $? "could not create $ac_file" "$LINENO" 5
23559    if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
23560      { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
23561$as_echo "$as_me: $ac_file is unchanged" >&6;}
23562    else
23563      rm -f "$ac_file"
23564      mv "$ac_tmp/config.h" "$ac_file" \
23565	|| as_fn_error $? "could not create $ac_file" "$LINENO" 5
23566    fi
23567  else
23568    $as_echo "/* $configure_input  */" \
23569      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
23570      || as_fn_error $? "could not create -" "$LINENO" 5
23571  fi
23572 ;;
23573
23574  :C)  { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
23575$as_echo "$as_me: executing $ac_file commands" >&6;}
23576 ;;
23577  esac
23578
23579
23580  case $ac_file$ac_mode in
23581    "libtool":C)
23582
23583    # See if we are running on zsh, and set the options that allow our
23584    # commands through without removal of \ escapes.
23585    if test -n "${ZSH_VERSION+set}"; then
23586      setopt NO_GLOB_SUBST
23587    fi
23588
23589    cfgfile=${ofile}T
23590    trap "$RM \"$cfgfile\"; exit 1" 1 2 15
23591    $RM "$cfgfile"
23592
23593    cat <<_LT_EOF >> "$cfgfile"
23594#! $SHELL
23595# Generated automatically by $as_me ($PACKAGE) $VERSION
23596# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
23597# NOTE: Changes made to this file will be lost: look at ltmain.sh.
23598
23599# Provide generalized library-building support services.
23600# Written by Gordon Matzigkeit, 1996
23601
23602# Copyright (C) 2014 Free Software Foundation, Inc.
23603# This is free software; see the source for copying conditions.  There is NO
23604# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
23605
23606# GNU Libtool is free software; you can redistribute it and/or modify
23607# it under the terms of the GNU General Public License as published by
23608# the Free Software Foundation; either version 2 of of the License, or
23609# (at your option) any later version.
23610#
23611# As a special exception to the GNU General Public License, if you
23612# distribute this file as part of a program or library that is built
23613# using GNU Libtool, you may include this file under the  same
23614# distribution terms that you use for the rest of that program.
23615#
23616# GNU Libtool is distributed in the hope that it will be useful, but
23617# WITHOUT ANY WARRANTY; without even the implied warranty of
23618# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
23619# GNU General Public License for more details.
23620#
23621# You should have received a copy of the GNU General Public License
23622# along with this program.  If not, see <http://www.gnu.org/licenses/>.
23623
23624
23625# The names of the tagged configurations supported by this script.
23626available_tags=''
23627
23628# Configured defaults for sys_lib_dlsearch_path munging.
23629: \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"}
23630
23631# ### BEGIN LIBTOOL CONFIG
23632
23633# Which release of libtool.m4 was used?
23634macro_version=$macro_version
23635macro_revision=$macro_revision
23636
23637# Whether or not to build shared libraries.
23638build_libtool_libs=$enable_shared
23639
23640# Whether or not to build static libraries.
23641build_old_libs=$enable_static
23642
23643# What type of objects to build.
23644pic_mode=$pic_mode
23645
23646# Whether or not to optimize for fast installation.
23647fast_install=$enable_fast_install
23648
23649# Shared archive member basename,for filename based shared library versioning on AIX.
23650shared_archive_member_spec=$shared_archive_member_spec
23651
23652# Shell to use when invoking shell scripts.
23653SHELL=$lt_SHELL
23654
23655# An echo program that protects backslashes.
23656ECHO=$lt_ECHO
23657
23658# The PATH separator for the build system.
23659PATH_SEPARATOR=$lt_PATH_SEPARATOR
23660
23661# The host system.
23662host_alias=$host_alias
23663host=$host
23664host_os=$host_os
23665
23666# The build system.
23667build_alias=$build_alias
23668build=$build
23669build_os=$build_os
23670
23671# A sed program that does not truncate output.
23672SED=$lt_SED
23673
23674# Sed that helps us avoid accidentally triggering echo(1) options like -n.
23675Xsed="\$SED -e 1s/^X//"
23676
23677# A grep program that handles long lines.
23678GREP=$lt_GREP
23679
23680# An ERE matcher.
23681EGREP=$lt_EGREP
23682
23683# A literal string matcher.
23684FGREP=$lt_FGREP
23685
23686# A BSD- or MS-compatible name lister.
23687NM=$lt_NM
23688
23689# Whether we need soft or hard links.
23690LN_S=$lt_LN_S
23691
23692# What is the maximum length of a command?
23693max_cmd_len=$max_cmd_len
23694
23695# Object file suffix (normally "o").
23696objext=$ac_objext
23697
23698# Executable file suffix (normally "").
23699exeext=$exeext
23700
23701# whether the shell understands "unset".
23702lt_unset=$lt_unset
23703
23704# turn spaces into newlines.
23705SP2NL=$lt_lt_SP2NL
23706
23707# turn newlines into spaces.
23708NL2SP=$lt_lt_NL2SP
23709
23710# convert \$build file names to \$host format.
23711to_host_file_cmd=$lt_cv_to_host_file_cmd
23712
23713# convert \$build files to toolchain format.
23714to_tool_file_cmd=$lt_cv_to_tool_file_cmd
23715
23716# An object symbol dumper.
23717OBJDUMP=$lt_OBJDUMP
23718
23719# Method to check whether dependent libraries are shared objects.
23720deplibs_check_method=$lt_deplibs_check_method
23721
23722# Command to use when deplibs_check_method = "file_magic".
23723file_magic_cmd=$lt_file_magic_cmd
23724
23725# How to find potential files when deplibs_check_method = "file_magic".
23726file_magic_glob=$lt_file_magic_glob
23727
23728# Find potential files using nocaseglob when deplibs_check_method = "file_magic".
23729want_nocaseglob=$lt_want_nocaseglob
23730
23731# DLL creation program.
23732DLLTOOL=$lt_DLLTOOL
23733
23734# Command to associate shared and link libraries.
23735sharedlib_from_linklib_cmd=$lt_sharedlib_from_linklib_cmd
23736
23737# The archiver.
23738AR=$lt_AR
23739
23740# Flags to create an archive.
23741AR_FLAGS=$lt_AR_FLAGS
23742
23743# How to feed a file listing to the archiver.
23744archiver_list_spec=$lt_archiver_list_spec
23745
23746# A symbol stripping program.
23747STRIP=$lt_STRIP
23748
23749# Commands used to install an old-style archive.
23750RANLIB=$lt_RANLIB
23751old_postinstall_cmds=$lt_old_postinstall_cmds
23752old_postuninstall_cmds=$lt_old_postuninstall_cmds
23753
23754# Whether to use a lock for old archive extraction.
23755lock_old_archive_extraction=$lock_old_archive_extraction
23756
23757# A C compiler.
23758LTCC=$lt_CC
23759
23760# LTCC compiler flags.
23761LTCFLAGS=$lt_CFLAGS
23762
23763# Take the output of nm and produce a listing of raw symbols and C names.
23764global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
23765
23766# Transform the output of nm in a proper C declaration.
23767global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
23768
23769# Transform the output of nm into a list of symbols to manually relocate.
23770global_symbol_to_import=$lt_lt_cv_sys_global_symbol_to_import
23771
23772# Transform the output of nm in a C name address pair.
23773global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
23774
23775# Transform the output of nm in a C name address pair when lib prefix is needed.
23776global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix
23777
23778# The name lister interface.
23779nm_interface=$lt_lt_cv_nm_interface
23780
23781# Specify filename containing input files for \$NM.
23782nm_file_list_spec=$lt_nm_file_list_spec
23783
23784# The root where to search for dependent libraries,and where our libraries should be installed.
23785lt_sysroot=$lt_sysroot
23786
23787# Command to truncate a binary pipe.
23788lt_truncate_bin=$lt_lt_cv_truncate_bin
23789
23790# The name of the directory that contains temporary libtool files.
23791objdir=$objdir
23792
23793# Used to examine libraries when file_magic_cmd begins with "file".
23794MAGIC_CMD=$MAGIC_CMD
23795
23796# Must we lock files when doing compilation?
23797need_locks=$lt_need_locks
23798
23799# Manifest tool.
23800MANIFEST_TOOL=$lt_MANIFEST_TOOL
23801
23802# Tool to manipulate archived DWARF debug symbol files on Mac OS X.
23803DSYMUTIL=$lt_DSYMUTIL
23804
23805# Tool to change global to local symbols on Mac OS X.
23806NMEDIT=$lt_NMEDIT
23807
23808# Tool to manipulate fat objects and archives on Mac OS X.
23809LIPO=$lt_LIPO
23810
23811# ldd/readelf like tool for Mach-O binaries on Mac OS X.
23812OTOOL=$lt_OTOOL
23813
23814# ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4.
23815OTOOL64=$lt_OTOOL64
23816
23817# Old archive suffix (normally "a").
23818libext=$libext
23819
23820# Shared library suffix (normally ".so").
23821shrext_cmds=$lt_shrext_cmds
23822
23823# The commands to extract the exported symbol list from a shared archive.
23824extract_expsyms_cmds=$lt_extract_expsyms_cmds
23825
23826# Variables whose values should be saved in libtool wrapper scripts and
23827# restored at link time.
23828variables_saved_for_relink=$lt_variables_saved_for_relink
23829
23830# Do we need the "lib" prefix for modules?
23831need_lib_prefix=$need_lib_prefix
23832
23833# Do we need a version for libraries?
23834need_version=$need_version
23835
23836# Library versioning type.
23837version_type=$version_type
23838
23839# Shared library runtime path variable.
23840runpath_var=$runpath_var
23841
23842# Shared library path variable.
23843shlibpath_var=$shlibpath_var
23844
23845# Is shlibpath searched before the hard-coded library search path?
23846shlibpath_overrides_runpath=$shlibpath_overrides_runpath
23847
23848# Format of library name prefix.
23849libname_spec=$lt_libname_spec
23850
23851# List of archive names.  First name is the real one, the rest are links.
23852# The last name is the one that the linker finds with -lNAME
23853library_names_spec=$lt_library_names_spec
23854
23855# The coded name of the library, if different from the real name.
23856soname_spec=$lt_soname_spec
23857
23858# Permission mode override for installation of shared libraries.
23859install_override_mode=$lt_install_override_mode
23860
23861# Command to use after installation of a shared archive.
23862postinstall_cmds=$lt_postinstall_cmds
23863
23864# Command to use after uninstallation of a shared archive.
23865postuninstall_cmds=$lt_postuninstall_cmds
23866
23867# Commands used to finish a libtool library installation in a directory.
23868finish_cmds=$lt_finish_cmds
23869
23870# As "finish_cmds", except a single script fragment to be evaled but
23871# not shown.
23872finish_eval=$lt_finish_eval
23873
23874# Whether we should hardcode library paths into libraries.
23875hardcode_into_libs=$hardcode_into_libs
23876
23877# Compile-time system search path for libraries.
23878sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
23879
23880# Detected run-time system search path for libraries.
23881sys_lib_dlsearch_path_spec=$lt_configure_time_dlsearch_path
23882
23883# Explicit LT_SYS_LIBRARY_PATH set during ./configure time.
23884configure_time_lt_sys_library_path=$lt_configure_time_lt_sys_library_path
23885
23886# Whether dlopen is supported.
23887dlopen_support=$enable_dlopen
23888
23889# Whether dlopen of programs is supported.
23890dlopen_self=$enable_dlopen_self
23891
23892# Whether dlopen of statically linked programs is supported.
23893dlopen_self_static=$enable_dlopen_self_static
23894
23895# Commands to strip libraries.
23896old_striplib=$lt_old_striplib
23897striplib=$lt_striplib
23898
23899
23900# The linker used to build libraries.
23901LD=$lt_LD
23902
23903# How to create reloadable object files.
23904reload_flag=$lt_reload_flag
23905reload_cmds=$lt_reload_cmds
23906
23907# Commands used to build an old-style archive.
23908old_archive_cmds=$lt_old_archive_cmds
23909
23910# A language specific compiler.
23911CC=$lt_compiler
23912
23913# Is the compiler the GNU compiler?
23914with_gcc=$GCC
23915
23916# Compiler flag to turn off builtin functions.
23917no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag
23918
23919# Additional compiler flags for building library objects.
23920pic_flag=$lt_lt_prog_compiler_pic
23921
23922# How to pass a linker flag through the compiler.
23923wl=$lt_lt_prog_compiler_wl
23924
23925# Compiler flag to prevent dynamic linking.
23926link_static_flag=$lt_lt_prog_compiler_static
23927
23928# Does compiler simultaneously support -c and -o options?
23929compiler_c_o=$lt_lt_cv_prog_compiler_c_o
23930
23931# Whether or not to add -lc for building shared libraries.
23932build_libtool_need_lc=$archive_cmds_need_lc
23933
23934# Whether or not to disallow shared libs when runtime libs are static.
23935allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes
23936
23937# Compiler flag to allow reflexive dlopens.
23938export_dynamic_flag_spec=$lt_export_dynamic_flag_spec
23939
23940# Compiler flag to generate shared objects directly from archives.
23941whole_archive_flag_spec=$lt_whole_archive_flag_spec
23942
23943# Whether the compiler copes with passing no objects directly.
23944compiler_needs_object=$lt_compiler_needs_object
23945
23946# Create an old-style archive from a shared archive.
23947old_archive_from_new_cmds=$lt_old_archive_from_new_cmds
23948
23949# Create a temporary old-style archive to link instead of a shared archive.
23950old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds
23951
23952# Commands used to build a shared archive.
23953archive_cmds=$lt_archive_cmds
23954archive_expsym_cmds=$lt_archive_expsym_cmds
23955
23956# Commands used to build a loadable module if different from building
23957# a shared archive.
23958module_cmds=$lt_module_cmds
23959module_expsym_cmds=$lt_module_expsym_cmds
23960
23961# Whether we are building with GNU ld or not.
23962with_gnu_ld=$lt_with_gnu_ld
23963
23964# Flag that allows shared libraries with undefined symbols to be built.
23965allow_undefined_flag=$lt_allow_undefined_flag
23966
23967# Flag that enforces no undefined symbols.
23968no_undefined_flag=$lt_no_undefined_flag
23969
23970# Flag to hardcode \$libdir into a binary during linking.
23971# This must work even if \$libdir does not exist
23972hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
23973
23974# Whether we need a single "-rpath" flag with a separated argument.
23975hardcode_libdir_separator=$lt_hardcode_libdir_separator
23976
23977# Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes
23978# DIR into the resulting binary.
23979hardcode_direct=$hardcode_direct
23980
23981# Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes
23982# DIR into the resulting binary and the resulting library dependency is
23983# "absolute",i.e impossible to change by setting \$shlibpath_var if the
23984# library is relocated.
23985hardcode_direct_absolute=$hardcode_direct_absolute
23986
23987# Set to "yes" if using the -LDIR flag during linking hardcodes DIR
23988# into the resulting binary.
23989hardcode_minus_L=$hardcode_minus_L
23990
23991# Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
23992# into the resulting binary.
23993hardcode_shlibpath_var=$hardcode_shlibpath_var
23994
23995# Set to "yes" if building a shared library automatically hardcodes DIR
23996# into the library and all subsequent libraries and executables linked
23997# against it.
23998hardcode_automatic=$hardcode_automatic
23999
24000# Set to yes if linker adds runtime paths of dependent libraries
24001# to runtime path list.
24002inherit_rpath=$inherit_rpath
24003
24004# Whether libtool must link a program against all its dependency libraries.
24005link_all_deplibs=$link_all_deplibs
24006
24007# Set to "yes" if exported symbols are required.
24008always_export_symbols=$always_export_symbols
24009
24010# The commands to list exported symbols.
24011export_symbols_cmds=$lt_export_symbols_cmds
24012
24013# Symbols that should not be listed in the preloaded symbols.
24014exclude_expsyms=$lt_exclude_expsyms
24015
24016# Symbols that must always be exported.
24017include_expsyms=$lt_include_expsyms
24018
24019# Commands necessary for linking programs (against libraries) with templates.
24020prelink_cmds=$lt_prelink_cmds
24021
24022# Commands necessary for finishing linking programs.
24023postlink_cmds=$lt_postlink_cmds
24024
24025# Specify filename containing input files.
24026file_list_spec=$lt_file_list_spec
24027
24028# How to hardcode a shared library path into an executable.
24029hardcode_action=$hardcode_action
24030
24031# ### END LIBTOOL CONFIG
24032
24033_LT_EOF
24034
24035    cat <<'_LT_EOF' >> "$cfgfile"
24036
24037# ### BEGIN FUNCTIONS SHARED WITH CONFIGURE
24038
24039# func_munge_path_list VARIABLE PATH
24040# -----------------------------------
24041# VARIABLE is name of variable containing _space_ separated list of
24042# directories to be munged by the contents of PATH, which is string
24043# having a format:
24044# "DIR[:DIR]:"
24045#       string "DIR[ DIR]" will be prepended to VARIABLE
24046# ":DIR[:DIR]"
24047#       string "DIR[ DIR]" will be appended to VARIABLE
24048# "DIRP[:DIRP]::[DIRA:]DIRA"
24049#       string "DIRP[ DIRP]" will be prepended to VARIABLE and string
24050#       "DIRA[ DIRA]" will be appended to VARIABLE
24051# "DIR[:DIR]"
24052#       VARIABLE will be replaced by "DIR[ DIR]"
24053func_munge_path_list ()
24054{
24055    case x$2 in
24056    x)
24057        ;;
24058    *:)
24059        eval $1=\"`$ECHO $2 | $SED 's/:/ /g'` \$$1\"
24060        ;;
24061    x:*)
24062        eval $1=\"\$$1 `$ECHO $2 | $SED 's/:/ /g'`\"
24063        ;;
24064    *::*)
24065        eval $1=\"\$$1\ `$ECHO $2 | $SED -e 's/.*:://' -e 's/:/ /g'`\"
24066        eval $1=\"`$ECHO $2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \$$1\"
24067        ;;
24068    *)
24069        eval $1=\"`$ECHO $2 | $SED 's/:/ /g'`\"
24070        ;;
24071    esac
24072}
24073
24074
24075# Calculate cc_basename.  Skip known compiler wrappers and cross-prefix.
24076func_cc_basename ()
24077{
24078    for cc_temp in $*""; do
24079      case $cc_temp in
24080        compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
24081        distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
24082        \-*) ;;
24083        *) break;;
24084      esac
24085    done
24086    func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
24087}
24088
24089
24090# ### END FUNCTIONS SHARED WITH CONFIGURE
24091
24092_LT_EOF
24093
24094  case $host_os in
24095  aix3*)
24096    cat <<\_LT_EOF >> "$cfgfile"
24097# AIX sometimes has problems with the GCC collect2 program.  For some
24098# reason, if we set the COLLECT_NAMES environment variable, the problems
24099# vanish in a puff of smoke.
24100if test set != "${COLLECT_NAMES+set}"; then
24101  COLLECT_NAMES=
24102  export COLLECT_NAMES
24103fi
24104_LT_EOF
24105    ;;
24106  esac
24107
24108
24109ltmain=$ac_aux_dir/ltmain.sh
24110
24111
24112  # We use sed instead of cat because bash on DJGPP gets confused if
24113  # if finds mixed CR/LF and LF-only lines.  Since sed operates in
24114  # text mode, it properly converts lines to CR/LF.  This bash problem
24115  # is reportedly fixed, but why not run on old versions too?
24116  sed '$q' "$ltmain" >> "$cfgfile" \
24117     || (rm -f "$cfgfile"; exit 1)
24118
24119   mv -f "$cfgfile" "$ofile" ||
24120    (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
24121  chmod +x "$ofile"
24122
24123 ;;
24124    "disable-rpath":C)
24125	sed < libtool > libtool-2 \
24126	's/^hardcode_libdir_flag_spec.*$'/'hardcode_libdir_flag_spec=" -D__LIBTOOL_RPATH_SED__ "/'
24127	mv libtool-2 libtool
24128	chmod 755 libtool
24129	libtool="./libtool"
24130	 ;;
24131
24132  esac
24133done # for ac_tag
24134
24135
24136as_fn_exit 0
24137_ACEOF
24138ac_clean_files=$ac_clean_files_save
24139
24140test $ac_write_fail = 0 ||
24141  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
24142
24143
24144# configure is writing to config.log, and then calls config.status.
24145# config.status does its own redirection, appending to config.log.
24146# Unfortunately, on DOS this fails, as config.log is still kept open
24147# by configure, so config.status won't be able to write to it; its
24148# output is simply discarded.  So we exec the FD to /dev/null,
24149# effectively closing config.log, so it can be properly (re)opened and
24150# appended to by config.status.  When coming back to configure, we
24151# need to make the FD available again.
24152if test "$no_create" != yes; then
24153  ac_cs_success=:
24154  ac_config_status_args=
24155  test "$silent" = yes &&
24156    ac_config_status_args="$ac_config_status_args --quiet"
24157  exec 5>/dev/null
24158  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
24159  exec 5>>config.log
24160  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
24161  # would make configure fail if this is the last instruction.
24162  $ac_cs_success || as_fn_exit 1
24163fi
24164if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
24165  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
24166$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
24167fi
24168
24169