xref: /freebsd/contrib/unbound/configure (revision c03c5b1c)
1#! /bin/sh
2# Guess values for system-dependent variables and create Makefiles.
3# Generated by GNU Autoconf 2.69 for unbound 1.15.0.
4#
5# Report bugs to <unbound-bugs@nlnetlabs.nl or https://github.com/NLnetLabs/unbound/issues>.
6#
7#
8# Copyright (C) 1992-1996, 1998-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.15.0'
595PACKAGE_STRING='unbound 1.15.0'
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
816localstatedir
817sharedstatedir
818sysconfdir
819datadir
820datarootdir
821libexecdir
822sbindir
823bindir
824program_transform_name
825prefix
826exec_prefix
827PACKAGE_URL
828PACKAGE_BUGREPORT
829PACKAGE_STRING
830PACKAGE_VERSION
831PACKAGE_TARNAME
832PACKAGE_NAME
833PATH_SEPARATOR
834SHELL'
835ac_subst_files=''
836ac_user_opts='
837enable_option_checking
838with_conf_file
839with_run_dir
840with_chroot_dir
841with_share_dir
842with_pidfile
843with_rootkey_file
844with_rootcert_file
845with_username
846enable_checking
847enable_debug
848enable_flto
849enable_pie
850enable_relro_now
851enable_shared
852enable_static
853with_pic
854enable_fast_install
855with_aix_soname
856with_gnu_ld
857with_sysroot
858enable_libtool_lock
859enable_rpath
860enable_largefile
861enable_systemd
862enable_alloc_checks
863enable_alloc_lite
864enable_alloc_nonregional
865with_pthreads
866with_solaris_threads
867with_syslog_facility
868with_dynlibmodule
869with_pyunbound
870with_pythonmodule
871enable_swig_version_check
872with_nss
873with_nettle
874with_ssl
875with_libbsd
876enable_sha1
877enable_sha2
878enable_subnet
879enable_gost
880enable_ecdsa
881enable_dsa
882with_deprecate_rsa_1024
883enable_ed25519
884enable_ed448
885enable_event_api
886enable_tfo_client
887enable_tfo_server
888with_libevent
889with_libexpat
890with_libhiredis
891with_libnghttp2
892enable_static_exe
893enable_fully_static
894enable_lock_checks
895enable_allsymbols
896enable_dnstap
897with_dnstap_socket_path
898with_protobuf_c
899enable_dnscrypt
900with_libsodium
901enable_cachedb
902enable_ipsecmod
903enable_ipset
904with_libmnl
905enable_explicit_port_randomisation
906enable_linux_ip_local_port_range
907with_libunbound_only
908'
909      ac_precious_vars='build_alias
910host_alias
911target_alias
912CC
913CFLAGS
914LDFLAGS
915LIBS
916CPPFLAGS
917CPP
918YACC
919YFLAGS
920LT_SYS_LIBRARY_PATH
921PKG_CONFIG
922PKG_CONFIG_PATH
923PKG_CONFIG_LIBDIR
924SYSTEMD_CFLAGS
925SYSTEMD_LIBS
926SYSTEMD_DAEMON_CFLAGS
927SYSTEMD_DAEMON_LIBS
928PYTHON_VERSION'
929
930
931# Initialize some variables set by options.
932ac_init_help=
933ac_init_version=false
934ac_unrecognized_opts=
935ac_unrecognized_sep=
936# The variables have the same names as the options, with
937# dashes changed to underlines.
938cache_file=/dev/null
939exec_prefix=NONE
940no_create=
941no_recursion=
942prefix=NONE
943program_prefix=NONE
944program_suffix=NONE
945program_transform_name=s,x,x,
946silent=
947site=
948srcdir=
949verbose=
950x_includes=NONE
951x_libraries=NONE
952
953# Installation directory options.
954# These are left unexpanded so users can "make install exec_prefix=/foo"
955# and all the variables that are supposed to be based on exec_prefix
956# by default will actually change.
957# Use braces instead of parens because sh, perl, etc. also accept them.
958# (The list follows the same order as the GNU Coding Standards.)
959bindir='${exec_prefix}/bin'
960sbindir='${exec_prefix}/sbin'
961libexecdir='${exec_prefix}/libexec'
962datarootdir='${prefix}/share'
963datadir='${datarootdir}'
964sysconfdir='${prefix}/etc'
965sharedstatedir='${prefix}/com'
966localstatedir='${prefix}/var'
967includedir='${prefix}/include'
968oldincludedir='/usr/include'
969docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
970infodir='${datarootdir}/info'
971htmldir='${docdir}'
972dvidir='${docdir}'
973pdfdir='${docdir}'
974psdir='${docdir}'
975libdir='${exec_prefix}/lib'
976localedir='${datarootdir}/locale'
977mandir='${datarootdir}/man'
978
979ac_prev=
980ac_dashdash=
981for ac_option
982do
983  # If the previous option needs an argument, assign it.
984  if test -n "$ac_prev"; then
985    eval $ac_prev=\$ac_option
986    ac_prev=
987    continue
988  fi
989
990  case $ac_option in
991  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
992  *=)   ac_optarg= ;;
993  *)    ac_optarg=yes ;;
994  esac
995
996  # Accept the important Cygnus configure options, so we can diagnose typos.
997
998  case $ac_dashdash$ac_option in
999  --)
1000    ac_dashdash=yes ;;
1001
1002  -bindir | --bindir | --bindi | --bind | --bin | --bi)
1003    ac_prev=bindir ;;
1004  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1005    bindir=$ac_optarg ;;
1006
1007  -build | --build | --buil | --bui | --bu)
1008    ac_prev=build_alias ;;
1009  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1010    build_alias=$ac_optarg ;;
1011
1012  -cache-file | --cache-file | --cache-fil | --cache-fi \
1013  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1014    ac_prev=cache_file ;;
1015  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1016  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1017    cache_file=$ac_optarg ;;
1018
1019  --config-cache | -C)
1020    cache_file=config.cache ;;
1021
1022  -datadir | --datadir | --datadi | --datad)
1023    ac_prev=datadir ;;
1024  -datadir=* | --datadir=* | --datadi=* | --datad=*)
1025    datadir=$ac_optarg ;;
1026
1027  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1028  | --dataroo | --dataro | --datar)
1029    ac_prev=datarootdir ;;
1030  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1031  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1032    datarootdir=$ac_optarg ;;
1033
1034  -disable-* | --disable-*)
1035    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1036    # Reject names that are not valid shell variable names.
1037    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1038      as_fn_error $? "invalid feature name: $ac_useropt"
1039    ac_useropt_orig=$ac_useropt
1040    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1041    case $ac_user_opts in
1042      *"
1043"enable_$ac_useropt"
1044"*) ;;
1045      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1046	 ac_unrecognized_sep=', ';;
1047    esac
1048    eval enable_$ac_useropt=no ;;
1049
1050  -docdir | --docdir | --docdi | --doc | --do)
1051    ac_prev=docdir ;;
1052  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1053    docdir=$ac_optarg ;;
1054
1055  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1056    ac_prev=dvidir ;;
1057  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1058    dvidir=$ac_optarg ;;
1059
1060  -enable-* | --enable-*)
1061    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1062    # Reject names that are not valid shell variable names.
1063    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1064      as_fn_error $? "invalid feature name: $ac_useropt"
1065    ac_useropt_orig=$ac_useropt
1066    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1067    case $ac_user_opts in
1068      *"
1069"enable_$ac_useropt"
1070"*) ;;
1071      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1072	 ac_unrecognized_sep=', ';;
1073    esac
1074    eval enable_$ac_useropt=\$ac_optarg ;;
1075
1076  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1077  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1078  | --exec | --exe | --ex)
1079    ac_prev=exec_prefix ;;
1080  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1081  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1082  | --exec=* | --exe=* | --ex=*)
1083    exec_prefix=$ac_optarg ;;
1084
1085  -gas | --gas | --ga | --g)
1086    # Obsolete; use --with-gas.
1087    with_gas=yes ;;
1088
1089  -help | --help | --hel | --he | -h)
1090    ac_init_help=long ;;
1091  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1092    ac_init_help=recursive ;;
1093  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1094    ac_init_help=short ;;
1095
1096  -host | --host | --hos | --ho)
1097    ac_prev=host_alias ;;
1098  -host=* | --host=* | --hos=* | --ho=*)
1099    host_alias=$ac_optarg ;;
1100
1101  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1102    ac_prev=htmldir ;;
1103  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1104  | --ht=*)
1105    htmldir=$ac_optarg ;;
1106
1107  -includedir | --includedir | --includedi | --included | --include \
1108  | --includ | --inclu | --incl | --inc)
1109    ac_prev=includedir ;;
1110  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1111  | --includ=* | --inclu=* | --incl=* | --inc=*)
1112    includedir=$ac_optarg ;;
1113
1114  -infodir | --infodir | --infodi | --infod | --info | --inf)
1115    ac_prev=infodir ;;
1116  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1117    infodir=$ac_optarg ;;
1118
1119  -libdir | --libdir | --libdi | --libd)
1120    ac_prev=libdir ;;
1121  -libdir=* | --libdir=* | --libdi=* | --libd=*)
1122    libdir=$ac_optarg ;;
1123
1124  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1125  | --libexe | --libex | --libe)
1126    ac_prev=libexecdir ;;
1127  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1128  | --libexe=* | --libex=* | --libe=*)
1129    libexecdir=$ac_optarg ;;
1130
1131  -localedir | --localedir | --localedi | --localed | --locale)
1132    ac_prev=localedir ;;
1133  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1134    localedir=$ac_optarg ;;
1135
1136  -localstatedir | --localstatedir | --localstatedi | --localstated \
1137  | --localstate | --localstat | --localsta | --localst | --locals)
1138    ac_prev=localstatedir ;;
1139  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1140  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1141    localstatedir=$ac_optarg ;;
1142
1143  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1144    ac_prev=mandir ;;
1145  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1146    mandir=$ac_optarg ;;
1147
1148  -nfp | --nfp | --nf)
1149    # Obsolete; use --without-fp.
1150    with_fp=no ;;
1151
1152  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1153  | --no-cr | --no-c | -n)
1154    no_create=yes ;;
1155
1156  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1157  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1158    no_recursion=yes ;;
1159
1160  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1161  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1162  | --oldin | --oldi | --old | --ol | --o)
1163    ac_prev=oldincludedir ;;
1164  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1165  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1166  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1167    oldincludedir=$ac_optarg ;;
1168
1169  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1170    ac_prev=prefix ;;
1171  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1172    prefix=$ac_optarg ;;
1173
1174  -program-prefix | --program-prefix | --program-prefi | --program-pref \
1175  | --program-pre | --program-pr | --program-p)
1176    ac_prev=program_prefix ;;
1177  -program-prefix=* | --program-prefix=* | --program-prefi=* \
1178  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1179    program_prefix=$ac_optarg ;;
1180
1181  -program-suffix | --program-suffix | --program-suffi | --program-suff \
1182  | --program-suf | --program-su | --program-s)
1183    ac_prev=program_suffix ;;
1184  -program-suffix=* | --program-suffix=* | --program-suffi=* \
1185  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1186    program_suffix=$ac_optarg ;;
1187
1188  -program-transform-name | --program-transform-name \
1189  | --program-transform-nam | --program-transform-na \
1190  | --program-transform-n | --program-transform- \
1191  | --program-transform | --program-transfor \
1192  | --program-transfo | --program-transf \
1193  | --program-trans | --program-tran \
1194  | --progr-tra | --program-tr | --program-t)
1195    ac_prev=program_transform_name ;;
1196  -program-transform-name=* | --program-transform-name=* \
1197  | --program-transform-nam=* | --program-transform-na=* \
1198  | --program-transform-n=* | --program-transform-=* \
1199  | --program-transform=* | --program-transfor=* \
1200  | --program-transfo=* | --program-transf=* \
1201  | --program-trans=* | --program-tran=* \
1202  | --progr-tra=* | --program-tr=* | --program-t=*)
1203    program_transform_name=$ac_optarg ;;
1204
1205  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1206    ac_prev=pdfdir ;;
1207  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1208    pdfdir=$ac_optarg ;;
1209
1210  -psdir | --psdir | --psdi | --psd | --ps)
1211    ac_prev=psdir ;;
1212  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1213    psdir=$ac_optarg ;;
1214
1215  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1216  | -silent | --silent | --silen | --sile | --sil)
1217    silent=yes ;;
1218
1219  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1220    ac_prev=sbindir ;;
1221  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1222  | --sbi=* | --sb=*)
1223    sbindir=$ac_optarg ;;
1224
1225  -sharedstatedir | --sharedstatedir | --sharedstatedi \
1226  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1227  | --sharedst | --shareds | --shared | --share | --shar \
1228  | --sha | --sh)
1229    ac_prev=sharedstatedir ;;
1230  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1231  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1232  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1233  | --sha=* | --sh=*)
1234    sharedstatedir=$ac_optarg ;;
1235
1236  -site | --site | --sit)
1237    ac_prev=site ;;
1238  -site=* | --site=* | --sit=*)
1239    site=$ac_optarg ;;
1240
1241  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1242    ac_prev=srcdir ;;
1243  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1244    srcdir=$ac_optarg ;;
1245
1246  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1247  | --syscon | --sysco | --sysc | --sys | --sy)
1248    ac_prev=sysconfdir ;;
1249  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1250  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1251    sysconfdir=$ac_optarg ;;
1252
1253  -target | --target | --targe | --targ | --tar | --ta | --t)
1254    ac_prev=target_alias ;;
1255  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1256    target_alias=$ac_optarg ;;
1257
1258  -v | -verbose | --verbose | --verbos | --verbo | --verb)
1259    verbose=yes ;;
1260
1261  -version | --version | --versio | --versi | --vers | -V)
1262    ac_init_version=: ;;
1263
1264  -with-* | --with-*)
1265    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1266    # Reject names that are not valid shell variable names.
1267    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1268      as_fn_error $? "invalid package name: $ac_useropt"
1269    ac_useropt_orig=$ac_useropt
1270    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1271    case $ac_user_opts in
1272      *"
1273"with_$ac_useropt"
1274"*) ;;
1275      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1276	 ac_unrecognized_sep=', ';;
1277    esac
1278    eval with_$ac_useropt=\$ac_optarg ;;
1279
1280  -without-* | --without-*)
1281    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1282    # Reject names that are not valid shell variable names.
1283    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1284      as_fn_error $? "invalid package name: $ac_useropt"
1285    ac_useropt_orig=$ac_useropt
1286    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1287    case $ac_user_opts in
1288      *"
1289"with_$ac_useropt"
1290"*) ;;
1291      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1292	 ac_unrecognized_sep=', ';;
1293    esac
1294    eval with_$ac_useropt=no ;;
1295
1296  --x)
1297    # Obsolete; use --with-x.
1298    with_x=yes ;;
1299
1300  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1301  | --x-incl | --x-inc | --x-in | --x-i)
1302    ac_prev=x_includes ;;
1303  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1304  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1305    x_includes=$ac_optarg ;;
1306
1307  -x-libraries | --x-libraries | --x-librarie | --x-librari \
1308  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1309    ac_prev=x_libraries ;;
1310  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1311  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1312    x_libraries=$ac_optarg ;;
1313
1314  -*) as_fn_error $? "unrecognized option: \`$ac_option'
1315Try \`$0 --help' for more information"
1316    ;;
1317
1318  *=*)
1319    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1320    # Reject names that are not valid shell variable names.
1321    case $ac_envvar in #(
1322      '' | [0-9]* | *[!_$as_cr_alnum]* )
1323      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1324    esac
1325    eval $ac_envvar=\$ac_optarg
1326    export $ac_envvar ;;
1327
1328  *)
1329    # FIXME: should be removed in autoconf 3.0.
1330    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1331    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1332      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1333    : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1334    ;;
1335
1336  esac
1337done
1338
1339if test -n "$ac_prev"; then
1340  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1341  as_fn_error $? "missing argument to $ac_option"
1342fi
1343
1344if test -n "$ac_unrecognized_opts"; then
1345  case $enable_option_checking in
1346    no) ;;
1347    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1348    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1349  esac
1350fi
1351
1352# Check all directory arguments for consistency.
1353for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
1354		datadir sysconfdir sharedstatedir localstatedir includedir \
1355		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1356		libdir localedir mandir
1357do
1358  eval ac_val=\$$ac_var
1359  # Remove trailing slashes.
1360  case $ac_val in
1361    */ )
1362      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1363      eval $ac_var=\$ac_val;;
1364  esac
1365  # Be sure to have absolute directory names.
1366  case $ac_val in
1367    [\\/$]* | ?:[\\/]* )  continue;;
1368    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1369  esac
1370  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1371done
1372
1373# There might be people who depend on the old broken behavior: `$host'
1374# used to hold the argument of --host etc.
1375# FIXME: To remove some day.
1376build=$build_alias
1377host=$host_alias
1378target=$target_alias
1379
1380# FIXME: To remove some day.
1381if test "x$host_alias" != x; then
1382  if test "x$build_alias" = x; then
1383    cross_compiling=maybe
1384  elif test "x$build_alias" != "x$host_alias"; then
1385    cross_compiling=yes
1386  fi
1387fi
1388
1389ac_tool_prefix=
1390test -n "$host_alias" && ac_tool_prefix=$host_alias-
1391
1392test "$silent" = yes && exec 6>/dev/null
1393
1394
1395ac_pwd=`pwd` && test -n "$ac_pwd" &&
1396ac_ls_di=`ls -di .` &&
1397ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1398  as_fn_error $? "working directory cannot be determined"
1399test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1400  as_fn_error $? "pwd does not report name of working directory"
1401
1402
1403# Find the source files, if location was not specified.
1404if test -z "$srcdir"; then
1405  ac_srcdir_defaulted=yes
1406  # Try the directory containing this script, then the parent directory.
1407  ac_confdir=`$as_dirname -- "$as_myself" ||
1408$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1409	 X"$as_myself" : 'X\(//\)[^/]' \| \
1410	 X"$as_myself" : 'X\(//\)$' \| \
1411	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1412$as_echo X"$as_myself" |
1413    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1414	    s//\1/
1415	    q
1416	  }
1417	  /^X\(\/\/\)[^/].*/{
1418	    s//\1/
1419	    q
1420	  }
1421	  /^X\(\/\/\)$/{
1422	    s//\1/
1423	    q
1424	  }
1425	  /^X\(\/\).*/{
1426	    s//\1/
1427	    q
1428	  }
1429	  s/.*/./; q'`
1430  srcdir=$ac_confdir
1431  if test ! -r "$srcdir/$ac_unique_file"; then
1432    srcdir=..
1433  fi
1434else
1435  ac_srcdir_defaulted=no
1436fi
1437if test ! -r "$srcdir/$ac_unique_file"; then
1438  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1439  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1440fi
1441ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1442ac_abs_confdir=`(
1443	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1444	pwd)`
1445# When building in place, set srcdir=.
1446if test "$ac_abs_confdir" = "$ac_pwd"; then
1447  srcdir=.
1448fi
1449# Remove unnecessary trailing slashes from srcdir.
1450# Double slashes in file names in object file debugging info
1451# mess up M-x gdb in Emacs.
1452case $srcdir in
1453*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1454esac
1455for ac_var in $ac_precious_vars; do
1456  eval ac_env_${ac_var}_set=\${${ac_var}+set}
1457  eval ac_env_${ac_var}_value=\$${ac_var}
1458  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1459  eval ac_cv_env_${ac_var}_value=\$${ac_var}
1460done
1461
1462#
1463# Report the --help message.
1464#
1465if test "$ac_init_help" = "long"; then
1466  # Omit some internal or obsolete options to make the list less imposing.
1467  # This message is too long to be a string in the A/UX 3.1 sh.
1468  cat <<_ACEOF
1469\`configure' configures unbound 1.15.0 to adapt to many kinds of systems.
1470
1471Usage: $0 [OPTION]... [VAR=VALUE]...
1472
1473To assign environment variables (e.g., CC, CFLAGS...), specify them as
1474VAR=VALUE.  See below for descriptions of some of the useful variables.
1475
1476Defaults for the options are specified in brackets.
1477
1478Configuration:
1479  -h, --help              display this help and exit
1480      --help=short        display options specific to this package
1481      --help=recursive    display the short help of all the included packages
1482  -V, --version           display version information and exit
1483  -q, --quiet, --silent   do not print \`checking ...' messages
1484      --cache-file=FILE   cache test results in FILE [disabled]
1485  -C, --config-cache      alias for \`--cache-file=config.cache'
1486  -n, --no-create         do not create output files
1487      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1488
1489Installation directories:
1490  --prefix=PREFIX         install architecture-independent files in PREFIX
1491                          [$ac_default_prefix]
1492  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1493                          [PREFIX]
1494
1495By default, \`make install' will install all the files in
1496\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1497an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1498for instance \`--prefix=\$HOME'.
1499
1500For better control, use the options below.
1501
1502Fine tuning of the installation directories:
1503  --bindir=DIR            user executables [EPREFIX/bin]
1504  --sbindir=DIR           system admin executables [EPREFIX/sbin]
1505  --libexecdir=DIR        program executables [EPREFIX/libexec]
1506  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1507  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1508  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1509  --libdir=DIR            object code libraries [EPREFIX/lib]
1510  --includedir=DIR        C header files [PREFIX/include]
1511  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1512  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1513  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1514  --infodir=DIR           info documentation [DATAROOTDIR/info]
1515  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1516  --mandir=DIR            man documentation [DATAROOTDIR/man]
1517  --docdir=DIR            documentation root [DATAROOTDIR/doc/unbound]
1518  --htmldir=DIR           html documentation [DOCDIR]
1519  --dvidir=DIR            dvi documentation [DOCDIR]
1520  --pdfdir=DIR            pdf documentation [DOCDIR]
1521  --psdir=DIR             ps documentation [DOCDIR]
1522_ACEOF
1523
1524  cat <<\_ACEOF
1525
1526System types:
1527  --build=BUILD     configure for building on BUILD [guessed]
1528  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1529_ACEOF
1530fi
1531
1532if test -n "$ac_init_help"; then
1533  case $ac_init_help in
1534     short | recursive ) echo "Configuration of unbound 1.15.0:";;
1535   esac
1536  cat <<\_ACEOF
1537
1538Optional Features:
1539  --disable-option-checking  ignore unrecognized --enable/--with options
1540  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1541  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1542  --enable-checking       Enable warnings, asserts, makefile-dependencies
1543  --enable-debug          same as enable-checking
1544  --disable-flto          Disable link-time optimization (gcc specific option)
1545  --enable-pie            Enable Position-Independent Executable (eg. to fully
1546                          benefit from ASLR, small performance penalty)
1547  --enable-relro-now      Enable full relocation binding at load-time (RELRO
1548                          NOW, to protect GOT and .dtor areas)
1549  --enable-shared[=PKGS]  build shared libraries [default=yes]
1550  --enable-static[=PKGS]  build static libraries [default=yes]
1551  --enable-fast-install[=PKGS]
1552                          optimize for fast installation [default=yes]
1553  --disable-libtool-lock  avoid locking (might break parallel builds)
1554  --disable-rpath         disable hardcoded rpath (default=enabled)
1555  --disable-largefile     omit support for large files
1556  --enable-systemd        compile with systemd support
1557  --enable-alloc-checks   enable to memory allocation statistics, for debug
1558                          purposes
1559  --enable-alloc-lite     enable for lightweight alloc assertions, for debug
1560                          purposes
1561  --enable-alloc-nonregional
1562                          enable nonregional allocs, slow but exposes regional
1563                          allocations to other memory purifiers, for debug
1564                          purposes
1565  --disable-swig-version-check
1566                          Disable swig version check to build python modules
1567                          with older swig even though that is unreliable
1568  --disable-sha1          Disable SHA1 RRSIG support, does not disable nsec3
1569                          support
1570  --disable-sha2          Disable SHA256 and SHA512 RRSIG support
1571  --enable-subnet         Enable client subnet
1572  --disable-gost          Disable GOST support
1573  --disable-ecdsa         Disable ECDSA support
1574  --disable-dsa           Disable DSA support
1575  --disable-ed25519       Disable ED25519 support
1576  --disable-ed448         Disable ED448 support
1577  --enable-event-api      Enable (experimental) pluggable event base
1578                          libunbound API installed to unbound-event.h
1579  --enable-tfo-client     Enable TCP Fast Open for client mode
1580  --enable-tfo-server     Enable TCP Fast Open for server mode
1581  --enable-static-exe     enable to compile executables statically against
1582                          (event) uninstalled libs, for debug purposes
1583  --enable-fully-static   enable to compile fully static
1584  --enable-lock-checks    enable to check lock and unlock calls, for debug
1585                          purposes
1586  --enable-allsymbols     export all symbols from libunbound and link binaries
1587                          to it, smaller install size but libunbound export
1588                          table is polluted by internal symbols
1589  --enable-dnstap         Enable dnstap support (requires protobuf-c)
1590  --enable-dnscrypt       Enable dnscrypt support (requires libsodium)
1591  --enable-cachedb        enable cachedb module that can use external cache
1592                          storage
1593  --enable-ipsecmod       Enable ipsecmod module that facilitates
1594                          opportunistic IPsec
1595  --enable-ipset          enable ipset module
1596  --disable-explicit-port-randomisation
1597                          disable explicit source port randomisation and rely
1598                          on the kernel to provide random source ports
1599  --enable-linux-ip-local-port-range
1600                          Define this to enable use of
1601                          /proc/sys/net/ipv4/ip_local_port_range as a default
1602                          outgoing port range. This is only for the libunbound
1603                          on Linux and does not affect unbound resolving
1604                          daemon itself. This may severely limit the number of
1605                          available outgoing ports and thus decrease
1606                          randomness. Define this only when the target system
1607                          restricts (e.g. some of SELinux enabled
1608                          distributions) the use of non-ephemeral ports.
1609
1610Optional Packages:
1611  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1612  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1613  --with-conf-file=path   Pathname to the Unbound configuration file
1614  --with-run-dir=path     set default directory to chdir to (by default dir
1615                          part of cfg file)
1616  --with-chroot-dir=path  set default directory to chroot to (by default same
1617                          as run-dir)
1618  --with-share-dir=path   set default directory with shared data (by default
1619                          same as share/unbound)
1620  --with-pidfile=filename set default pathname to unbound pidfile (default
1621                          run-dir/unbound.pid)
1622  --with-rootkey-file=filename
1623                          set default pathname to root key file (default
1624                          run-dir/root.key). This file is read and written.
1625  --with-rootcert-file=filename
1626                          set default pathname to root update certificate file
1627                          (default run-dir/icannbundle.pem). This file need
1628                          not exist if you are content with the builtin.
1629  --with-username=user    set default user that unbound changes to (default
1630                          user is unbound)
1631  --with-pic[=PKGS]       try to use only PIC/non-PIC objects [default=use
1632                          both]
1633  --with-aix-soname=aix|svr4|both
1634                          shared library versioning (aka "SONAME") variant to
1635                          provide on AIX, [default=aix].
1636  --with-gnu-ld           assume the C compiler uses GNU ld [default=no]
1637  --with-sysroot[=DIR]    Search for dependent libraries within DIR (or the
1638                          compiler's sysroot if not specified).
1639  --with-pthreads         use pthreads library, or --without-pthreads to
1640                          disable threading support.
1641  --with-solaris-threads  use solaris native thread library.
1642  --with-syslog-facility=LOCAL0 - LOCAL7
1643                          set SYSLOG_FACILITY, default DAEMON
1644  --with-dynlibmodule     build dynamic library module, or
1645                          --without-dynlibmodule to disable it. (default=no)
1646  --with-pyunbound        build PyUnbound, or --without-pyunbound to skip it.
1647                          (default=no)
1648  --with-pythonmodule     build Python module, or --without-pythonmodule to
1649                          disable script engine. (default=no)
1650  --with-nss=path         use libnss instead of openssl, installed at path.
1651  --with-nettle=path      use libnettle as crypto library, installed at path.
1652  --with-ssl=pathname     enable SSL (will check /usr/local/ssl /usr/lib/ssl
1653                          /usr/ssl /usr/pkg /usr/local /opt/local /usr/sfw
1654                          /usr or specify like /usr/include/openssl11)
1655  --with-libbsd           Use portable libbsd functions
1656  --with-deprecate-rsa-1024
1657                          Deprecate RSA 1024 bit length, makes that an
1658                          unsupported key, for use when OpenSSL FIPS refuses
1659                          1024 bit verification
1660  --with-libevent=pathname
1661                          use libevent (will check /usr/local /opt/local
1662                          /usr/lib /usr/pkg /usr/sfw /usr or you can specify
1663                          an explicit path). Slower, but allows use of large
1664                          outgoing port ranges.
1665  --with-libexpat=path    specify explicit path for libexpat.
1666  --with-libhiredis=path  specify explicit path for libhiredis.
1667  --with-libnghttp2=path  specify explicit path for libnghttp2.
1668  --with-dnstap-socket-path=pathname
1669                          set default dnstap socket path
1670  --with-protobuf-c=path  Path where protobuf-c is installed, for dnstap
1671  --with-libsodium=path   Path where libsodium is installed, for dnscrypt
1672  --with-libmnl=path      specify explicit path for libmnl.
1673  --with-libunbound-only  do not build daemon and tool programs
1674
1675Some influential environment variables:
1676  CC          C compiler command
1677  CFLAGS      C compiler flags
1678  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
1679              nonstandard directory <lib dir>
1680  LIBS        libraries to pass to the linker, e.g. -l<library>
1681  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1682              you have headers in a nonstandard directory <include dir>
1683  CPP         C preprocessor
1684  YACC        The `Yet Another Compiler Compiler' implementation to use.
1685              Defaults to the first program found out of: `bison -y', `byacc',
1686              `yacc'.
1687  YFLAGS      The list of arguments that will be passed by default to $YACC.
1688              This script will default YFLAGS to the empty string to avoid a
1689              default value of `-d' given by some make applications.
1690  LT_SYS_LIBRARY_PATH
1691              User-defined run-time library search path.
1692  PKG_CONFIG  path to pkg-config utility
1693  PKG_CONFIG_PATH
1694              directories to add to pkg-config's search path
1695  PKG_CONFIG_LIBDIR
1696              path overriding pkg-config's built-in search path
1697  SYSTEMD_CFLAGS
1698              C compiler flags for SYSTEMD, overriding pkg-config
1699  SYSTEMD_LIBS
1700              linker flags for SYSTEMD, overriding pkg-config
1701  SYSTEMD_DAEMON_CFLAGS
1702              C compiler flags for SYSTEMD_DAEMON, overriding pkg-config
1703  SYSTEMD_DAEMON_LIBS
1704              linker flags for SYSTEMD_DAEMON, overriding pkg-config
1705  PYTHON_VERSION
1706              The installed Python version to use, for example '2.3'. This
1707              string will be appended to the Python interpreter canonical
1708              name.
1709
1710Use these variables to override the choices made by `configure' or to help
1711it to find libraries and programs with nonstandard names/locations.
1712
1713Report bugs to <unbound-bugs@nlnetlabs.nl or https://github.com/NLnetLabs/unbound/issues>.
1714_ACEOF
1715ac_status=$?
1716fi
1717
1718if test "$ac_init_help" = "recursive"; then
1719  # If there are subdirs, report their specific --help.
1720  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1721    test -d "$ac_dir" ||
1722      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1723      continue
1724    ac_builddir=.
1725
1726case "$ac_dir" in
1727.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1728*)
1729  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1730  # A ".." for each directory in $ac_dir_suffix.
1731  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1732  case $ac_top_builddir_sub in
1733  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1734  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1735  esac ;;
1736esac
1737ac_abs_top_builddir=$ac_pwd
1738ac_abs_builddir=$ac_pwd$ac_dir_suffix
1739# for backward compatibility:
1740ac_top_builddir=$ac_top_build_prefix
1741
1742case $srcdir in
1743  .)  # We are building in place.
1744    ac_srcdir=.
1745    ac_top_srcdir=$ac_top_builddir_sub
1746    ac_abs_top_srcdir=$ac_pwd ;;
1747  [\\/]* | ?:[\\/]* )  # Absolute name.
1748    ac_srcdir=$srcdir$ac_dir_suffix;
1749    ac_top_srcdir=$srcdir
1750    ac_abs_top_srcdir=$srcdir ;;
1751  *) # Relative name.
1752    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1753    ac_top_srcdir=$ac_top_build_prefix$srcdir
1754    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1755esac
1756ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1757
1758    cd "$ac_dir" || { ac_status=$?; continue; }
1759    # Check for guested configure.
1760    if test -f "$ac_srcdir/configure.gnu"; then
1761      echo &&
1762      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1763    elif test -f "$ac_srcdir/configure"; then
1764      echo &&
1765      $SHELL "$ac_srcdir/configure" --help=recursive
1766    else
1767      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1768    fi || ac_status=$?
1769    cd "$ac_pwd" || { ac_status=$?; break; }
1770  done
1771fi
1772
1773test -n "$ac_init_help" && exit $ac_status
1774if $ac_init_version; then
1775  cat <<\_ACEOF
1776unbound configure 1.15.0
1777generated by GNU Autoconf 2.69
1778
1779Copyright (C) 2012 Free Software Foundation, Inc.
1780This configure script is free software; the Free Software Foundation
1781gives unlimited permission to copy, distribute and modify it.
1782_ACEOF
1783  exit
1784fi
1785
1786## ------------------------ ##
1787## Autoconf initialization. ##
1788## ------------------------ ##
1789
1790# ac_fn_c_try_compile LINENO
1791# --------------------------
1792# Try to compile conftest.$ac_ext, and return whether this succeeded.
1793ac_fn_c_try_compile ()
1794{
1795  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1796  rm -f conftest.$ac_objext
1797  if { { ac_try="$ac_compile"
1798case "(($ac_try" in
1799  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1800  *) ac_try_echo=$ac_try;;
1801esac
1802eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1803$as_echo "$ac_try_echo"; } >&5
1804  (eval "$ac_compile") 2>conftest.err
1805  ac_status=$?
1806  if test -s conftest.err; then
1807    grep -v '^ *+' conftest.err >conftest.er1
1808    cat conftest.er1 >&5
1809    mv -f conftest.er1 conftest.err
1810  fi
1811  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1812  test $ac_status = 0; } && {
1813	 test -z "$ac_c_werror_flag" ||
1814	 test ! -s conftest.err
1815       } && test -s conftest.$ac_objext; then :
1816  ac_retval=0
1817else
1818  $as_echo "$as_me: failed program was:" >&5
1819sed 's/^/| /' conftest.$ac_ext >&5
1820
1821	ac_retval=1
1822fi
1823  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1824  as_fn_set_status $ac_retval
1825
1826} # ac_fn_c_try_compile
1827
1828# ac_fn_c_try_cpp LINENO
1829# ----------------------
1830# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1831ac_fn_c_try_cpp ()
1832{
1833  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1834  if { { ac_try="$ac_cpp conftest.$ac_ext"
1835case "(($ac_try" in
1836  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1837  *) ac_try_echo=$ac_try;;
1838esac
1839eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1840$as_echo "$ac_try_echo"; } >&5
1841  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1842  ac_status=$?
1843  if test -s conftest.err; then
1844    grep -v '^ *+' conftest.err >conftest.er1
1845    cat conftest.er1 >&5
1846    mv -f conftest.er1 conftest.err
1847  fi
1848  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1849  test $ac_status = 0; } > conftest.i && {
1850	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1851	 test ! -s conftest.err
1852       }; then :
1853  ac_retval=0
1854else
1855  $as_echo "$as_me: failed program was:" >&5
1856sed 's/^/| /' conftest.$ac_ext >&5
1857
1858    ac_retval=1
1859fi
1860  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1861  as_fn_set_status $ac_retval
1862
1863} # ac_fn_c_try_cpp
1864
1865# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1866# -------------------------------------------------------
1867# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1868# the include files in INCLUDES and setting the cache variable VAR
1869# accordingly.
1870ac_fn_c_check_header_mongrel ()
1871{
1872  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1873  if eval \${$3+:} false; then :
1874  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1875$as_echo_n "checking for $2... " >&6; }
1876if eval \${$3+:} false; then :
1877  $as_echo_n "(cached) " >&6
1878fi
1879eval ac_res=\$$3
1880	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1881$as_echo "$ac_res" >&6; }
1882else
1883  # Is the header compilable?
1884{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1885$as_echo_n "checking $2 usability... " >&6; }
1886cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1887/* end confdefs.h.  */
1888$4
1889#include <$2>
1890_ACEOF
1891if ac_fn_c_try_compile "$LINENO"; then :
1892  ac_header_compiler=yes
1893else
1894  ac_header_compiler=no
1895fi
1896rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1897{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1898$as_echo "$ac_header_compiler" >&6; }
1899
1900# Is the header present?
1901{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1902$as_echo_n "checking $2 presence... " >&6; }
1903cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1904/* end confdefs.h.  */
1905#include <$2>
1906_ACEOF
1907if ac_fn_c_try_cpp "$LINENO"; then :
1908  ac_header_preproc=yes
1909else
1910  ac_header_preproc=no
1911fi
1912rm -f conftest.err conftest.i conftest.$ac_ext
1913{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1914$as_echo "$ac_header_preproc" >&6; }
1915
1916# So?  What about this header?
1917case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1918  yes:no: )
1919    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1920$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1921    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1922$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1923    ;;
1924  no:yes:* )
1925    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1926$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1927    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
1928$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
1929    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1930$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1931    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
1932$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&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( $as_echo "## --------------------------------------------------------------------------------------- ##
1936## Report this to unbound-bugs@nlnetlabs.nl or https://github.com/NLnetLabs/unbound/issues ##
1937## --------------------------------------------------------------------------------------- ##"
1938     ) | sed "s/^/$as_me: WARNING:     /" >&2
1939    ;;
1940esac
1941  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1942$as_echo_n "checking for $2... " >&6; }
1943if eval \${$3+:} false; then :
1944  $as_echo_n "(cached) " >&6
1945else
1946  eval "$3=\$ac_header_compiler"
1947fi
1948eval ac_res=\$$3
1949	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1950$as_echo "$ac_res" >&6; }
1951fi
1952  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1953
1954} # ac_fn_c_check_header_mongrel
1955
1956# ac_fn_c_try_run LINENO
1957# ----------------------
1958# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1959# that executables *can* be run.
1960ac_fn_c_try_run ()
1961{
1962  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1963  if { { ac_try="$ac_link"
1964case "(($ac_try" in
1965  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1966  *) ac_try_echo=$ac_try;;
1967esac
1968eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1969$as_echo "$ac_try_echo"; } >&5
1970  (eval "$ac_link") 2>&5
1971  ac_status=$?
1972  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1973  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1974  { { case "(($ac_try" in
1975  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1976  *) ac_try_echo=$ac_try;;
1977esac
1978eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1979$as_echo "$ac_try_echo"; } >&5
1980  (eval "$ac_try") 2>&5
1981  ac_status=$?
1982  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1983  test $ac_status = 0; }; }; then :
1984  ac_retval=0
1985else
1986  $as_echo "$as_me: program exited with status $ac_status" >&5
1987       $as_echo "$as_me: failed program was:" >&5
1988sed 's/^/| /' conftest.$ac_ext >&5
1989
1990       ac_retval=$ac_status
1991fi
1992  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1993  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1994  as_fn_set_status $ac_retval
1995
1996} # ac_fn_c_try_run
1997
1998# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1999# -------------------------------------------------------
2000# Tests whether HEADER exists and can be compiled using the include files in
2001# INCLUDES, setting the cache variable VAR accordingly.
2002ac_fn_c_check_header_compile ()
2003{
2004  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2005  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2006$as_echo_n "checking for $2... " >&6; }
2007if eval \${$3+:} false; then :
2008  $as_echo_n "(cached) " >&6
2009else
2010  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2011/* end confdefs.h.  */
2012$4
2013#include <$2>
2014_ACEOF
2015if ac_fn_c_try_compile "$LINENO"; then :
2016  eval "$3=yes"
2017else
2018  eval "$3=no"
2019fi
2020rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2021fi
2022eval ac_res=\$$3
2023	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2024$as_echo "$ac_res" >&6; }
2025  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2026
2027} # ac_fn_c_check_header_compile
2028
2029# ac_fn_c_try_link LINENO
2030# -----------------------
2031# Try to link conftest.$ac_ext, and return whether this succeeded.
2032ac_fn_c_try_link ()
2033{
2034  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2035  rm -f conftest.$ac_objext conftest$ac_exeext
2036  if { { ac_try="$ac_link"
2037case "(($ac_try" in
2038  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2039  *) ac_try_echo=$ac_try;;
2040esac
2041eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2042$as_echo "$ac_try_echo"; } >&5
2043  (eval "$ac_link") 2>conftest.err
2044  ac_status=$?
2045  if test -s conftest.err; then
2046    grep -v '^ *+' conftest.err >conftest.er1
2047    cat conftest.er1 >&5
2048    mv -f conftest.er1 conftest.err
2049  fi
2050  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2051  test $ac_status = 0; } && {
2052	 test -z "$ac_c_werror_flag" ||
2053	 test ! -s conftest.err
2054       } && test -s conftest$ac_exeext && {
2055	 test "$cross_compiling" = yes ||
2056	 test -x conftest$ac_exeext
2057       }; then :
2058  ac_retval=0
2059else
2060  $as_echo "$as_me: failed program was:" >&5
2061sed 's/^/| /' conftest.$ac_ext >&5
2062
2063	ac_retval=1
2064fi
2065  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2066  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2067  # interfere with the next link command; also delete a directory that is
2068  # left behind by Apple's compiler.  We do this before executing the actions.
2069  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2070  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2071  as_fn_set_status $ac_retval
2072
2073} # ac_fn_c_try_link
2074
2075# ac_fn_c_check_func LINENO FUNC VAR
2076# ----------------------------------
2077# Tests whether FUNC exists, setting the cache variable VAR accordingly
2078ac_fn_c_check_func ()
2079{
2080  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2081  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2082$as_echo_n "checking for $2... " >&6; }
2083if eval \${$3+:} false; then :
2084  $as_echo_n "(cached) " >&6
2085else
2086  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2087/* end confdefs.h.  */
2088/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2089   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2090#define $2 innocuous_$2
2091
2092/* System header to define __stub macros and hopefully few prototypes,
2093    which can conflict with char $2 (); below.
2094    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2095    <limits.h> exists even on freestanding compilers.  */
2096
2097#ifdef __STDC__
2098# include <limits.h>
2099#else
2100# include <assert.h>
2101#endif
2102
2103#undef $2
2104
2105/* Override any GCC internal prototype to avoid an error.
2106   Use char because int might match the return type of a GCC
2107   builtin and then its argument prototype would still apply.  */
2108#ifdef __cplusplus
2109extern "C"
2110#endif
2111char $2 ();
2112/* The GNU C library defines this for functions which it implements
2113    to always fail with ENOSYS.  Some functions are actually named
2114    something starting with __ and the normal name is an alias.  */
2115#if defined __stub_$2 || defined __stub___$2
2116choke me
2117#endif
2118
2119int
2120main ()
2121{
2122return $2 ();
2123  ;
2124  return 0;
2125}
2126_ACEOF
2127if ac_fn_c_try_link "$LINENO"; then :
2128  eval "$3=yes"
2129else
2130  eval "$3=no"
2131fi
2132rm -f core conftest.err conftest.$ac_objext \
2133    conftest$ac_exeext conftest.$ac_ext
2134fi
2135eval ac_res=\$$3
2136	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2137$as_echo "$ac_res" >&6; }
2138  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2139
2140} # ac_fn_c_check_func
2141
2142# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2143# -------------------------------------------
2144# Tests whether TYPE exists after having included INCLUDES, setting cache
2145# variable VAR accordingly.
2146ac_fn_c_check_type ()
2147{
2148  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2149  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2150$as_echo_n "checking for $2... " >&6; }
2151if eval \${$3+:} false; then :
2152  $as_echo_n "(cached) " >&6
2153else
2154  eval "$3=no"
2155  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2156/* end confdefs.h.  */
2157$4
2158int
2159main ()
2160{
2161if (sizeof ($2))
2162	 return 0;
2163  ;
2164  return 0;
2165}
2166_ACEOF
2167if ac_fn_c_try_compile "$LINENO"; then :
2168  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2169/* end confdefs.h.  */
2170$4
2171int
2172main ()
2173{
2174if (sizeof (($2)))
2175	    return 0;
2176  ;
2177  return 0;
2178}
2179_ACEOF
2180if ac_fn_c_try_compile "$LINENO"; then :
2181
2182else
2183  eval "$3=yes"
2184fi
2185rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2186fi
2187rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2188fi
2189eval ac_res=\$$3
2190	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2191$as_echo "$ac_res" >&6; }
2192  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2193
2194} # ac_fn_c_check_type
2195
2196# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2197# --------------------------------------------
2198# Tries to find the compile-time value of EXPR in a program that includes
2199# INCLUDES, setting VAR accordingly. Returns whether the value could be
2200# computed
2201ac_fn_c_compute_int ()
2202{
2203  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2204  if test "$cross_compiling" = yes; then
2205    # Depending upon the size, compute the lo and hi bounds.
2206cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2207/* end confdefs.h.  */
2208$4
2209int
2210main ()
2211{
2212static int test_array [1 - 2 * !(($2) >= 0)];
2213test_array [0] = 0;
2214return test_array [0];
2215
2216  ;
2217  return 0;
2218}
2219_ACEOF
2220if ac_fn_c_try_compile "$LINENO"; then :
2221  ac_lo=0 ac_mid=0
2222  while :; do
2223    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2224/* end confdefs.h.  */
2225$4
2226int
2227main ()
2228{
2229static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2230test_array [0] = 0;
2231return test_array [0];
2232
2233  ;
2234  return 0;
2235}
2236_ACEOF
2237if ac_fn_c_try_compile "$LINENO"; then :
2238  ac_hi=$ac_mid; break
2239else
2240  as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2241			if test $ac_lo -le $ac_mid; then
2242			  ac_lo= ac_hi=
2243			  break
2244			fi
2245			as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2246fi
2247rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2248  done
2249else
2250  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2251/* end confdefs.h.  */
2252$4
2253int
2254main ()
2255{
2256static int test_array [1 - 2 * !(($2) < 0)];
2257test_array [0] = 0;
2258return test_array [0];
2259
2260  ;
2261  return 0;
2262}
2263_ACEOF
2264if ac_fn_c_try_compile "$LINENO"; then :
2265  ac_hi=-1 ac_mid=-1
2266  while :; do
2267    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2268/* end confdefs.h.  */
2269$4
2270int
2271main ()
2272{
2273static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2274test_array [0] = 0;
2275return test_array [0];
2276
2277  ;
2278  return 0;
2279}
2280_ACEOF
2281if ac_fn_c_try_compile "$LINENO"; then :
2282  ac_lo=$ac_mid; break
2283else
2284  as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2285			if test $ac_mid -le $ac_hi; then
2286			  ac_lo= ac_hi=
2287			  break
2288			fi
2289			as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2290fi
2291rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2292  done
2293else
2294  ac_lo= ac_hi=
2295fi
2296rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2297fi
2298rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2299# Binary search between lo and hi bounds.
2300while test "x$ac_lo" != "x$ac_hi"; do
2301  as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2302  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2303/* end confdefs.h.  */
2304$4
2305int
2306main ()
2307{
2308static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2309test_array [0] = 0;
2310return test_array [0];
2311
2312  ;
2313  return 0;
2314}
2315_ACEOF
2316if ac_fn_c_try_compile "$LINENO"; then :
2317  ac_hi=$ac_mid
2318else
2319  as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2320fi
2321rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2322done
2323case $ac_lo in #((
2324?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2325'') ac_retval=1 ;;
2326esac
2327  else
2328    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2329/* end confdefs.h.  */
2330$4
2331static long int longval () { return $2; }
2332static unsigned long int ulongval () { return $2; }
2333#include <stdio.h>
2334#include <stdlib.h>
2335int
2336main ()
2337{
2338
2339  FILE *f = fopen ("conftest.val", "w");
2340  if (! f)
2341    return 1;
2342  if (($2) < 0)
2343    {
2344      long int i = longval ();
2345      if (i != ($2))
2346	return 1;
2347      fprintf (f, "%ld", i);
2348    }
2349  else
2350    {
2351      unsigned long int i = ulongval ();
2352      if (i != ($2))
2353	return 1;
2354      fprintf (f, "%lu", i);
2355    }
2356  /* Do not output a trailing newline, as this causes \r\n confusion
2357     on some platforms.  */
2358  return ferror (f) || fclose (f) != 0;
2359
2360  ;
2361  return 0;
2362}
2363_ACEOF
2364if ac_fn_c_try_run "$LINENO"; then :
2365  echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2366else
2367  ac_retval=1
2368fi
2369rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2370  conftest.$ac_objext conftest.beam conftest.$ac_ext
2371rm -f conftest.val
2372
2373  fi
2374  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2375  as_fn_set_status $ac_retval
2376
2377} # ac_fn_c_compute_int
2378
2379# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2380# ---------------------------------------------
2381# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2382# accordingly.
2383ac_fn_c_check_decl ()
2384{
2385  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2386  as_decl_name=`echo $2|sed 's/ *(.*//'`
2387  as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2388  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2389$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2390if eval \${$3+:} false; then :
2391  $as_echo_n "(cached) " >&6
2392else
2393  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2394/* end confdefs.h.  */
2395$4
2396int
2397main ()
2398{
2399#ifndef $as_decl_name
2400#ifdef __cplusplus
2401  (void) $as_decl_use;
2402#else
2403  (void) $as_decl_name;
2404#endif
2405#endif
2406
2407  ;
2408  return 0;
2409}
2410_ACEOF
2411if ac_fn_c_try_compile "$LINENO"; then :
2412  eval "$3=yes"
2413else
2414  eval "$3=no"
2415fi
2416rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2417fi
2418eval ac_res=\$$3
2419	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2420$as_echo "$ac_res" >&6; }
2421  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2422
2423} # ac_fn_c_check_decl
2424
2425# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2426# ----------------------------------------------------
2427# Tries to find if the field MEMBER exists in type AGGR, after including
2428# INCLUDES, setting cache variable VAR accordingly.
2429ac_fn_c_check_member ()
2430{
2431  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2432  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2433$as_echo_n "checking for $2.$3... " >&6; }
2434if eval \${$4+:} false; then :
2435  $as_echo_n "(cached) " >&6
2436else
2437  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2438/* end confdefs.h.  */
2439$5
2440int
2441main ()
2442{
2443static $2 ac_aggr;
2444if (ac_aggr.$3)
2445return 0;
2446  ;
2447  return 0;
2448}
2449_ACEOF
2450if ac_fn_c_try_compile "$LINENO"; then :
2451  eval "$4=yes"
2452else
2453  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2454/* end confdefs.h.  */
2455$5
2456int
2457main ()
2458{
2459static $2 ac_aggr;
2460if (sizeof ac_aggr.$3)
2461return 0;
2462  ;
2463  return 0;
2464}
2465_ACEOF
2466if ac_fn_c_try_compile "$LINENO"; then :
2467  eval "$4=yes"
2468else
2469  eval "$4=no"
2470fi
2471rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2472fi
2473rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2474fi
2475eval ac_res=\$$4
2476	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2477$as_echo "$ac_res" >&6; }
2478  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2479
2480} # ac_fn_c_check_member
2481cat >config.log <<_ACEOF
2482This file contains any messages produced by compilers while
2483running configure, to aid debugging if configure makes a mistake.
2484
2485It was created by unbound $as_me 1.15.0, which was
2486generated by GNU Autoconf 2.69.  Invocation command line was
2487
2488  $ $0 $@
2489
2490_ACEOF
2491exec 5>>config.log
2492{
2493cat <<_ASUNAME
2494## --------- ##
2495## Platform. ##
2496## --------- ##
2497
2498hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2499uname -m = `(uname -m) 2>/dev/null || echo unknown`
2500uname -r = `(uname -r) 2>/dev/null || echo unknown`
2501uname -s = `(uname -s) 2>/dev/null || echo unknown`
2502uname -v = `(uname -v) 2>/dev/null || echo unknown`
2503
2504/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2505/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2506
2507/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2508/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2509/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2510/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2511/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2512/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2513/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2514
2515_ASUNAME
2516
2517as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2518for as_dir in $PATH
2519do
2520  IFS=$as_save_IFS
2521  test -z "$as_dir" && as_dir=.
2522    $as_echo "PATH: $as_dir"
2523  done
2524IFS=$as_save_IFS
2525
2526} >&5
2527
2528cat >&5 <<_ACEOF
2529
2530
2531## ----------- ##
2532## Core tests. ##
2533## ----------- ##
2534
2535_ACEOF
2536
2537
2538# Keep a trace of the command line.
2539# Strip out --no-create and --no-recursion so they do not pile up.
2540# Strip out --silent because we don't want to record it for future runs.
2541# Also quote any args containing shell meta-characters.
2542# Make two passes to allow for proper duplicate-argument suppression.
2543ac_configure_args=
2544ac_configure_args0=
2545ac_configure_args1=
2546ac_must_keep_next=false
2547for ac_pass in 1 2
2548do
2549  for ac_arg
2550  do
2551    case $ac_arg in
2552    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2553    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2554    | -silent | --silent | --silen | --sile | --sil)
2555      continue ;;
2556    *\'*)
2557      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2558    esac
2559    case $ac_pass in
2560    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2561    2)
2562      as_fn_append ac_configure_args1 " '$ac_arg'"
2563      if test $ac_must_keep_next = true; then
2564	ac_must_keep_next=false # Got value, back to normal.
2565      else
2566	case $ac_arg in
2567	  *=* | --config-cache | -C | -disable-* | --disable-* \
2568	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2569	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2570	  | -with-* | --with-* | -without-* | --without-* | --x)
2571	    case "$ac_configure_args0 " in
2572	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2573	    esac
2574	    ;;
2575	  -* ) ac_must_keep_next=true ;;
2576	esac
2577      fi
2578      as_fn_append ac_configure_args " '$ac_arg'"
2579      ;;
2580    esac
2581  done
2582done
2583{ ac_configure_args0=; unset ac_configure_args0;}
2584{ ac_configure_args1=; unset ac_configure_args1;}
2585
2586# When interrupted or exit'd, cleanup temporary files, and complete
2587# config.log.  We remove comments because anyway the quotes in there
2588# would cause problems or look ugly.
2589# WARNING: Use '\'' to represent an apostrophe within the trap.
2590# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2591trap 'exit_status=$?
2592  # Save into config.log some information that might help in debugging.
2593  {
2594    echo
2595
2596    $as_echo "## ---------------- ##
2597## Cache variables. ##
2598## ---------------- ##"
2599    echo
2600    # The following way of writing the cache mishandles newlines in values,
2601(
2602  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2603    eval ac_val=\$$ac_var
2604    case $ac_val in #(
2605    *${as_nl}*)
2606      case $ac_var in #(
2607      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2608$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2609      esac
2610      case $ac_var in #(
2611      _ | IFS | as_nl) ;; #(
2612      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2613      *) { eval $ac_var=; unset $ac_var;} ;;
2614      esac ;;
2615    esac
2616  done
2617  (set) 2>&1 |
2618    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2619    *${as_nl}ac_space=\ *)
2620      sed -n \
2621	"s/'\''/'\''\\\\'\'''\''/g;
2622	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2623      ;; #(
2624    *)
2625      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2626      ;;
2627    esac |
2628    sort
2629)
2630    echo
2631
2632    $as_echo "## ----------------- ##
2633## Output variables. ##
2634## ----------------- ##"
2635    echo
2636    for ac_var in $ac_subst_vars
2637    do
2638      eval ac_val=\$$ac_var
2639      case $ac_val in
2640      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2641      esac
2642      $as_echo "$ac_var='\''$ac_val'\''"
2643    done | sort
2644    echo
2645
2646    if test -n "$ac_subst_files"; then
2647      $as_echo "## ------------------- ##
2648## File substitutions. ##
2649## ------------------- ##"
2650      echo
2651      for ac_var in $ac_subst_files
2652      do
2653	eval ac_val=\$$ac_var
2654	case $ac_val in
2655	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2656	esac
2657	$as_echo "$ac_var='\''$ac_val'\''"
2658      done | sort
2659      echo
2660    fi
2661
2662    if test -s confdefs.h; then
2663      $as_echo "## ----------- ##
2664## confdefs.h. ##
2665## ----------- ##"
2666      echo
2667      cat confdefs.h
2668      echo
2669    fi
2670    test "$ac_signal" != 0 &&
2671      $as_echo "$as_me: caught signal $ac_signal"
2672    $as_echo "$as_me: exit $exit_status"
2673  } >&5
2674  rm -f core *.core core.conftest.* &&
2675    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2676    exit $exit_status
2677' 0
2678for ac_signal in 1 2 13 15; do
2679  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2680done
2681ac_signal=0
2682
2683# confdefs.h avoids OS command line length limits that DEFS can exceed.
2684rm -f -r conftest* confdefs.h
2685
2686$as_echo "/* confdefs.h */" > confdefs.h
2687
2688# Predefined preprocessor variables.
2689
2690cat >>confdefs.h <<_ACEOF
2691#define PACKAGE_NAME "$PACKAGE_NAME"
2692_ACEOF
2693
2694cat >>confdefs.h <<_ACEOF
2695#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2696_ACEOF
2697
2698cat >>confdefs.h <<_ACEOF
2699#define PACKAGE_VERSION "$PACKAGE_VERSION"
2700_ACEOF
2701
2702cat >>confdefs.h <<_ACEOF
2703#define PACKAGE_STRING "$PACKAGE_STRING"
2704_ACEOF
2705
2706cat >>confdefs.h <<_ACEOF
2707#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2708_ACEOF
2709
2710cat >>confdefs.h <<_ACEOF
2711#define PACKAGE_URL "$PACKAGE_URL"
2712_ACEOF
2713
2714
2715# Let the site file select an alternate cache file if it wants to.
2716# Prefer an explicitly selected file to automatically selected ones.
2717ac_site_file1=NONE
2718ac_site_file2=NONE
2719if test -n "$CONFIG_SITE"; then
2720  # We do not want a PATH search for config.site.
2721  case $CONFIG_SITE in #((
2722    -*)  ac_site_file1=./$CONFIG_SITE;;
2723    */*) ac_site_file1=$CONFIG_SITE;;
2724    *)   ac_site_file1=./$CONFIG_SITE;;
2725  esac
2726elif test "x$prefix" != xNONE; then
2727  ac_site_file1=$prefix/share/config.site
2728  ac_site_file2=$prefix/etc/config.site
2729else
2730  ac_site_file1=$ac_default_prefix/share/config.site
2731  ac_site_file2=$ac_default_prefix/etc/config.site
2732fi
2733for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2734do
2735  test "x$ac_site_file" = xNONE && continue
2736  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2737    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2738$as_echo "$as_me: loading site script $ac_site_file" >&6;}
2739    sed 's/^/| /' "$ac_site_file" >&5
2740    . "$ac_site_file" \
2741      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2742$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2743as_fn_error $? "failed to load site script $ac_site_file
2744See \`config.log' for more details" "$LINENO" 5; }
2745  fi
2746done
2747
2748if test -r "$cache_file"; then
2749  # Some versions of bash will fail to source /dev/null (special files
2750  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
2751  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2752    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2753$as_echo "$as_me: loading cache $cache_file" >&6;}
2754    case $cache_file in
2755      [\\/]* | ?:[\\/]* ) . "$cache_file";;
2756      *)                      . "./$cache_file";;
2757    esac
2758  fi
2759else
2760  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2761$as_echo "$as_me: creating cache $cache_file" >&6;}
2762  >$cache_file
2763fi
2764
2765# Check that the precious variables saved in the cache have kept the same
2766# value.
2767ac_cache_corrupted=false
2768for ac_var in $ac_precious_vars; do
2769  eval ac_old_set=\$ac_cv_env_${ac_var}_set
2770  eval ac_new_set=\$ac_env_${ac_var}_set
2771  eval ac_old_val=\$ac_cv_env_${ac_var}_value
2772  eval ac_new_val=\$ac_env_${ac_var}_value
2773  case $ac_old_set,$ac_new_set in
2774    set,)
2775      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2776$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2777      ac_cache_corrupted=: ;;
2778    ,set)
2779      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2780$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2781      ac_cache_corrupted=: ;;
2782    ,);;
2783    *)
2784      if test "x$ac_old_val" != "x$ac_new_val"; then
2785	# differences in whitespace do not lead to failure.
2786	ac_old_val_w=`echo x $ac_old_val`
2787	ac_new_val_w=`echo x $ac_new_val`
2788	if test "$ac_old_val_w" != "$ac_new_val_w"; then
2789	  { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2790$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2791	  ac_cache_corrupted=:
2792	else
2793	  { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2794$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2795	  eval $ac_var=\$ac_old_val
2796	fi
2797	{ $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
2798$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
2799	{ $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
2800$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
2801      fi;;
2802  esac
2803  # Pass precious variables to config.status.
2804  if test "$ac_new_set" = set; then
2805    case $ac_new_val in
2806    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2807    *) ac_arg=$ac_var=$ac_new_val ;;
2808    esac
2809    case " $ac_configure_args " in
2810      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
2811      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2812    esac
2813  fi
2814done
2815if $ac_cache_corrupted; then
2816  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2817$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2818  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2819$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2820  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2821fi
2822## -------------------- ##
2823## Main body of script. ##
2824## -------------------- ##
2825
2826ac_ext=c
2827ac_cpp='$CPP $CPPFLAGS'
2828ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2829ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2830ac_compiler_gnu=$ac_cv_c_compiler_gnu
2831
2832
2833UNBOUND_VERSION_MAJOR=1
2834
2835UNBOUND_VERSION_MINOR=15
2836
2837UNBOUND_VERSION_MICRO=0
2838
2839
2840LIBUNBOUND_CURRENT=9
2841LIBUNBOUND_REVISION=15
2842LIBUNBOUND_AGE=1
2843# 1.0.0 had 0:12:0
2844# 1.0.1 had 0:13:0
2845# 1.0.2 had 0:14:0
2846# 1.1.0 had 0:15:0
2847# 1.1.1 had 0:16:0
2848# 1.2.0 had 0:17:0
2849# 1.2.1 had 0:18:0
2850# 1.3.0 had 1:0:0   # ub_cancel and -export-symbols.
2851# 1.3.1 had 1:1:0
2852# 1.3.2 had 1:2:0
2853# 1.3.3 had 1:3:0
2854# 1.3.4 had 1:4:0
2855# 1.4.0-snapshots had 1:5:0
2856# 1.4.0 had 1:5:0 (not 2:0:0)   # ub_result.why_bogus
2857# 1.4.1 had 2:1:0
2858# 1.4.2 had 2:2:0
2859# 1.4.3 had 2:3:0
2860# 1.4.4 had 2:4:0
2861# 1.4.5 had 2:5:0
2862# 1.4.6 had 2:6:0
2863# 1.4.7 had 2:7:0
2864# 1.4.8 had 2:8:0
2865# 1.4.9 had 2:9:0
2866# 1.4.10 had 2:10:0
2867# 1.4.11 had 2:11:0
2868# 1.4.12 had 2:12:0
2869# 1.4.13 had 2:13:0
2870# and 1.4.13p1 and 1.4.13.p2
2871# 1.4.14 had 2:14:0
2872# 1.4.15 had 3:0:1 # adds ub_version()
2873# 1.4.16 had 3:1:1
2874# 1.4.17 had 3:2:1
2875# 1.4.18 had 3:3:1
2876# 1.4.19 had 3:4:1
2877# 1.4.20 had 4:0:2 # adds libunbound.ttl # but shipped 3:5:1
2878# 1.4.21 had 4:1:2
2879# 1.4.22 had 4:1:2
2880# 1.5.0 had 5:3:3 # adds ub_ctx_add_ta_autr
2881# 1.5.1 had 5:3:3
2882# 1.5.2 had 5:5:3
2883# 1.5.3 had 5:6:3
2884# 1.5.4 had 5:7:3
2885# 1.5.5 had 5:8:3
2886# 1.5.6 had 5:9:3
2887# 1.5.7 had 5:10:3
2888# 1.5.8 had 6:0:4 # adds ub_ctx_set_stub
2889# 1.5.9 had 6:1:4
2890# 1.5.10 had 6:2:4
2891# 1.6.0 had 6:3:4
2892# 1.6.1 had 7:0:5 # ub_callback_t typedef renamed to ub_callback_type
2893# 1.6.2 had 7:1:5
2894# 1.6.3 had 7:2:5
2895# 1.6.4 had 7:3:5
2896# 1.6.5 had 7:4:5
2897# 1.6.6 had 7:5:5
2898# 1.6.7 had 7:6:5
2899# 1.6.8 had 7:7:5
2900# 1.7.0 had 7:8:5
2901# 1.7.1 had 7:9:5
2902# 1.7.2 had 7:10:5
2903# 1.7.3 had 7:11:5
2904# 1.8.0 had 8:0:0 # changes the event callback function signature
2905# 1.8.1 had 8:1:0
2906# 1.8.2 had 8:2:0
2907# 1.8.3 had 8:3:0
2908# 1.9.0 had 9:0:1 # add ub_ctx_set_tls
2909# 1.9.1 had 9:1:1
2910# 1.9.2 had 9:2:1
2911# 1.9.3 had 9:3:1
2912# 1.9.4 had 9:4:1
2913# 1.9.5 had 9:5:1
2914# 1.9.6 had 9:6:1
2915# 1.10.0 had 9:7:1
2916# 1.10.1 had 9:8:1
2917# 1.11.0 had 9:9:1
2918# 1.12.0 had 9:10:1
2919# 1.13.0 had 9:11:1
2920# 1.13.1 had 9:12:1
2921# 1.13.2 had 9:13:1
2922# 1.14.0 had 9:14:1
2923# 1.15.0 had 9:15:1
2924
2925#   Current  -- the number of the binary API that we're implementing
2926#   Revision -- which iteration of the implementation of the binary
2927#               API are we supplying?
2928#   Age      -- How many previous binary API versions do we also
2929#               support?
2930#
2931# If we release a new version that does not change the binary API,
2932# increment Revision.
2933#
2934# If we release a new version that changes the binary API, but does
2935# not break programs compiled against the old binary API, increment
2936# Current and Age.  Set Revision to 0, since this is the first
2937# implementation of the new API.
2938#
2939# Otherwise, we're changing the binary API and breaking backward
2940# compatibility with old binaries.  Increment Current.  Set Age to 0,
2941# since we're backward compatible with no previous APIs.  Set Revision
2942# to 0 too.
2943
2944
2945
2946
2947
2948cmdln="`echo $@ | sed -e 's/\\\\/\\\\\\\\/g' | sed -e 's/"/\\\\"/'g`"
2949
2950cat >>confdefs.h <<_ACEOF
2951#define CONFCMDLINE "$cmdln"
2952_ACEOF
2953
2954
2955CFLAGS="$CFLAGS"
2956ac_ext=c
2957ac_cpp='$CPP $CPPFLAGS'
2958ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2959ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2960ac_compiler_gnu=$ac_cv_c_compiler_gnu
2961if test -n "$ac_tool_prefix"; then
2962  # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2963set dummy ${ac_tool_prefix}gcc; ac_word=$2
2964{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2965$as_echo_n "checking for $ac_word... " >&6; }
2966if ${ac_cv_prog_CC+:} false; then :
2967  $as_echo_n "(cached) " >&6
2968else
2969  if test -n "$CC"; then
2970  ac_cv_prog_CC="$CC" # Let the user override the test.
2971else
2972as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2973for as_dir in $PATH
2974do
2975  IFS=$as_save_IFS
2976  test -z "$as_dir" && as_dir=.
2977    for ac_exec_ext in '' $ac_executable_extensions; do
2978  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2979    ac_cv_prog_CC="${ac_tool_prefix}gcc"
2980    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2981    break 2
2982  fi
2983done
2984  done
2985IFS=$as_save_IFS
2986
2987fi
2988fi
2989CC=$ac_cv_prog_CC
2990if test -n "$CC"; then
2991  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2992$as_echo "$CC" >&6; }
2993else
2994  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2995$as_echo "no" >&6; }
2996fi
2997
2998
2999fi
3000if test -z "$ac_cv_prog_CC"; then
3001  ac_ct_CC=$CC
3002  # Extract the first word of "gcc", so it can be a program name with args.
3003set dummy gcc; ac_word=$2
3004{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3005$as_echo_n "checking for $ac_word... " >&6; }
3006if ${ac_cv_prog_ac_ct_CC+:} false; then :
3007  $as_echo_n "(cached) " >&6
3008else
3009  if test -n "$ac_ct_CC"; then
3010  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3011else
3012as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3013for as_dir in $PATH
3014do
3015  IFS=$as_save_IFS
3016  test -z "$as_dir" && as_dir=.
3017    for ac_exec_ext in '' $ac_executable_extensions; do
3018  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3019    ac_cv_prog_ac_ct_CC="gcc"
3020    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3021    break 2
3022  fi
3023done
3024  done
3025IFS=$as_save_IFS
3026
3027fi
3028fi
3029ac_ct_CC=$ac_cv_prog_ac_ct_CC
3030if test -n "$ac_ct_CC"; then
3031  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3032$as_echo "$ac_ct_CC" >&6; }
3033else
3034  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3035$as_echo "no" >&6; }
3036fi
3037
3038  if test "x$ac_ct_CC" = x; then
3039    CC=""
3040  else
3041    case $cross_compiling:$ac_tool_warned in
3042yes:)
3043{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3044$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3045ac_tool_warned=yes ;;
3046esac
3047    CC=$ac_ct_CC
3048  fi
3049else
3050  CC="$ac_cv_prog_CC"
3051fi
3052
3053if test -z "$CC"; then
3054          if test -n "$ac_tool_prefix"; then
3055    # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
3056set dummy ${ac_tool_prefix}cc; ac_word=$2
3057{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3058$as_echo_n "checking for $ac_word... " >&6; }
3059if ${ac_cv_prog_CC+:} false; then :
3060  $as_echo_n "(cached) " >&6
3061else
3062  if test -n "$CC"; then
3063  ac_cv_prog_CC="$CC" # Let the user override the test.
3064else
3065as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3066for as_dir in $PATH
3067do
3068  IFS=$as_save_IFS
3069  test -z "$as_dir" && as_dir=.
3070    for ac_exec_ext in '' $ac_executable_extensions; do
3071  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3072    ac_cv_prog_CC="${ac_tool_prefix}cc"
3073    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3074    break 2
3075  fi
3076done
3077  done
3078IFS=$as_save_IFS
3079
3080fi
3081fi
3082CC=$ac_cv_prog_CC
3083if test -n "$CC"; then
3084  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3085$as_echo "$CC" >&6; }
3086else
3087  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3088$as_echo "no" >&6; }
3089fi
3090
3091
3092  fi
3093fi
3094if test -z "$CC"; then
3095  # Extract the first word of "cc", so it can be a program name with args.
3096set dummy cc; ac_word=$2
3097{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3098$as_echo_n "checking for $ac_word... " >&6; }
3099if ${ac_cv_prog_CC+:} false; then :
3100  $as_echo_n "(cached) " >&6
3101else
3102  if test -n "$CC"; then
3103  ac_cv_prog_CC="$CC" # Let the user override the test.
3104else
3105  ac_prog_rejected=no
3106as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3107for as_dir in $PATH
3108do
3109  IFS=$as_save_IFS
3110  test -z "$as_dir" && as_dir=.
3111    for ac_exec_ext in '' $ac_executable_extensions; do
3112  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3113    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3114       ac_prog_rejected=yes
3115       continue
3116     fi
3117    ac_cv_prog_CC="cc"
3118    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3119    break 2
3120  fi
3121done
3122  done
3123IFS=$as_save_IFS
3124
3125if test $ac_prog_rejected = yes; then
3126  # We found a bogon in the path, so make sure we never use it.
3127  set dummy $ac_cv_prog_CC
3128  shift
3129  if test $# != 0; then
3130    # We chose a different compiler from the bogus one.
3131    # However, it has the same basename, so the bogon will be chosen
3132    # first if we set CC to just the basename; use the full file name.
3133    shift
3134    ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
3135  fi
3136fi
3137fi
3138fi
3139CC=$ac_cv_prog_CC
3140if test -n "$CC"; then
3141  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3142$as_echo "$CC" >&6; }
3143else
3144  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3145$as_echo "no" >&6; }
3146fi
3147
3148
3149fi
3150if test -z "$CC"; then
3151  if test -n "$ac_tool_prefix"; then
3152  for ac_prog in cl.exe
3153  do
3154    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3155set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3156{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3157$as_echo_n "checking for $ac_word... " >&6; }
3158if ${ac_cv_prog_CC+:} false; then :
3159  $as_echo_n "(cached) " >&6
3160else
3161  if test -n "$CC"; then
3162  ac_cv_prog_CC="$CC" # Let the user override the test.
3163else
3164as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3165for as_dir in $PATH
3166do
3167  IFS=$as_save_IFS
3168  test -z "$as_dir" && as_dir=.
3169    for ac_exec_ext in '' $ac_executable_extensions; do
3170  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3171    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
3172    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3173    break 2
3174  fi
3175done
3176  done
3177IFS=$as_save_IFS
3178
3179fi
3180fi
3181CC=$ac_cv_prog_CC
3182if test -n "$CC"; then
3183  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3184$as_echo "$CC" >&6; }
3185else
3186  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3187$as_echo "no" >&6; }
3188fi
3189
3190
3191    test -n "$CC" && break
3192  done
3193fi
3194if test -z "$CC"; then
3195  ac_ct_CC=$CC
3196  for ac_prog in cl.exe
3197do
3198  # Extract the first word of "$ac_prog", so it can be a program name with args.
3199set dummy $ac_prog; ac_word=$2
3200{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3201$as_echo_n "checking for $ac_word... " >&6; }
3202if ${ac_cv_prog_ac_ct_CC+:} false; then :
3203  $as_echo_n "(cached) " >&6
3204else
3205  if test -n "$ac_ct_CC"; then
3206  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3207else
3208as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3209for as_dir in $PATH
3210do
3211  IFS=$as_save_IFS
3212  test -z "$as_dir" && as_dir=.
3213    for ac_exec_ext in '' $ac_executable_extensions; do
3214  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3215    ac_cv_prog_ac_ct_CC="$ac_prog"
3216    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3217    break 2
3218  fi
3219done
3220  done
3221IFS=$as_save_IFS
3222
3223fi
3224fi
3225ac_ct_CC=$ac_cv_prog_ac_ct_CC
3226if test -n "$ac_ct_CC"; then
3227  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3228$as_echo "$ac_ct_CC" >&6; }
3229else
3230  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3231$as_echo "no" >&6; }
3232fi
3233
3234
3235  test -n "$ac_ct_CC" && break
3236done
3237
3238  if test "x$ac_ct_CC" = x; then
3239    CC=""
3240  else
3241    case $cross_compiling:$ac_tool_warned in
3242yes:)
3243{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3244$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3245ac_tool_warned=yes ;;
3246esac
3247    CC=$ac_ct_CC
3248  fi
3249fi
3250
3251fi
3252
3253
3254test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3255$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3256as_fn_error $? "no acceptable C compiler found in \$PATH
3257See \`config.log' for more details" "$LINENO" 5; }
3258
3259# Provide some information about the compiler.
3260$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3261set X $ac_compile
3262ac_compiler=$2
3263for ac_option in --version -v -V -qversion; do
3264  { { ac_try="$ac_compiler $ac_option >&5"
3265case "(($ac_try" in
3266  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3267  *) ac_try_echo=$ac_try;;
3268esac
3269eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3270$as_echo "$ac_try_echo"; } >&5
3271  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
3272  ac_status=$?
3273  if test -s conftest.err; then
3274    sed '10a\
3275... rest of stderr output deleted ...
3276         10q' conftest.err >conftest.er1
3277    cat conftest.er1 >&5
3278  fi
3279  rm -f conftest.er1 conftest.err
3280  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3281  test $ac_status = 0; }
3282done
3283
3284cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3285/* end confdefs.h.  */
3286
3287int
3288main ()
3289{
3290
3291  ;
3292  return 0;
3293}
3294_ACEOF
3295ac_clean_files_save=$ac_clean_files
3296ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
3297# Try to create an executable without -o first, disregard a.out.
3298# It will help us diagnose broken compilers, and finding out an intuition
3299# of exeext.
3300{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3301$as_echo_n "checking whether the C compiler works... " >&6; }
3302ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3303
3304# The possible output files:
3305ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3306
3307ac_rmfiles=
3308for ac_file in $ac_files
3309do
3310  case $ac_file in
3311    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3312    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3313  esac
3314done
3315rm -f $ac_rmfiles
3316
3317if { { ac_try="$ac_link_default"
3318case "(($ac_try" in
3319  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3320  *) ac_try_echo=$ac_try;;
3321esac
3322eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3323$as_echo "$ac_try_echo"; } >&5
3324  (eval "$ac_link_default") 2>&5
3325  ac_status=$?
3326  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3327  test $ac_status = 0; }; then :
3328  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3329# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3330# in a Makefile.  We should not override ac_cv_exeext if it was cached,
3331# so that the user can short-circuit this test for compilers unknown to
3332# Autoconf.
3333for ac_file in $ac_files ''
3334do
3335  test -f "$ac_file" || continue
3336  case $ac_file in
3337    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
3338	;;
3339    [ab].out )
3340	# We found the default executable, but exeext='' is most
3341	# certainly right.
3342	break;;
3343    *.* )
3344	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
3345	then :; else
3346	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3347	fi
3348	# We set ac_cv_exeext here because the later test for it is not
3349	# safe: cross compilers may not add the suffix if given an `-o'
3350	# argument, so we may need to know it at that point already.
3351	# Even if this section looks crufty: it has the advantage of
3352	# actually working.
3353	break;;
3354    * )
3355	break;;
3356  esac
3357done
3358test "$ac_cv_exeext" = no && ac_cv_exeext=
3359
3360else
3361  ac_file=''
3362fi
3363if test -z "$ac_file"; then :
3364  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3365$as_echo "no" >&6; }
3366$as_echo "$as_me: failed program was:" >&5
3367sed 's/^/| /' conftest.$ac_ext >&5
3368
3369{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3370$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3371as_fn_error 77 "C compiler cannot create executables
3372See \`config.log' for more details" "$LINENO" 5; }
3373else
3374  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3375$as_echo "yes" >&6; }
3376fi
3377{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3378$as_echo_n "checking for C compiler default output file name... " >&6; }
3379{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3380$as_echo "$ac_file" >&6; }
3381ac_exeext=$ac_cv_exeext
3382
3383rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
3384ac_clean_files=$ac_clean_files_save
3385{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3386$as_echo_n "checking for suffix of executables... " >&6; }
3387if { { ac_try="$ac_link"
3388case "(($ac_try" in
3389  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3390  *) ac_try_echo=$ac_try;;
3391esac
3392eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3393$as_echo "$ac_try_echo"; } >&5
3394  (eval "$ac_link") 2>&5
3395  ac_status=$?
3396  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3397  test $ac_status = 0; }; then :
3398  # If both `conftest.exe' and `conftest' are `present' (well, observable)
3399# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
3400# work properly (i.e., refer to `conftest.exe'), while it won't with
3401# `rm'.
3402for ac_file in conftest.exe conftest conftest.*; do
3403  test -f "$ac_file" || continue
3404  case $ac_file in
3405    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3406    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3407	  break;;
3408    * ) break;;
3409  esac
3410done
3411else
3412  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3413$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3414as_fn_error $? "cannot compute suffix of executables: cannot compile and link
3415See \`config.log' for more details" "$LINENO" 5; }
3416fi
3417rm -f conftest conftest$ac_cv_exeext
3418{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3419$as_echo "$ac_cv_exeext" >&6; }
3420
3421rm -f conftest.$ac_ext
3422EXEEXT=$ac_cv_exeext
3423ac_exeext=$EXEEXT
3424cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3425/* end confdefs.h.  */
3426#include <stdio.h>
3427int
3428main ()
3429{
3430FILE *f = fopen ("conftest.out", "w");
3431 return ferror (f) || fclose (f) != 0;
3432
3433  ;
3434  return 0;
3435}
3436_ACEOF
3437ac_clean_files="$ac_clean_files conftest.out"
3438# Check that the compiler produces executables we can run.  If not, either
3439# the compiler is broken, or we cross compile.
3440{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3441$as_echo_n "checking whether we are cross compiling... " >&6; }
3442if test "$cross_compiling" != yes; then
3443  { { ac_try="$ac_link"
3444case "(($ac_try" in
3445  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3446  *) ac_try_echo=$ac_try;;
3447esac
3448eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3449$as_echo "$ac_try_echo"; } >&5
3450  (eval "$ac_link") 2>&5
3451  ac_status=$?
3452  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3453  test $ac_status = 0; }
3454  if { ac_try='./conftest$ac_cv_exeext'
3455  { { case "(($ac_try" in
3456  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3457  *) ac_try_echo=$ac_try;;
3458esac
3459eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3460$as_echo "$ac_try_echo"; } >&5
3461  (eval "$ac_try") 2>&5
3462  ac_status=$?
3463  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3464  test $ac_status = 0; }; }; then
3465    cross_compiling=no
3466  else
3467    if test "$cross_compiling" = maybe; then
3468	cross_compiling=yes
3469    else
3470	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3471$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3472as_fn_error $? "cannot run C compiled programs.
3473If you meant to cross compile, use \`--host'.
3474See \`config.log' for more details" "$LINENO" 5; }
3475    fi
3476  fi
3477fi
3478{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3479$as_echo "$cross_compiling" >&6; }
3480
3481rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
3482ac_clean_files=$ac_clean_files_save
3483{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3484$as_echo_n "checking for suffix of object files... " >&6; }
3485if ${ac_cv_objext+:} false; then :
3486  $as_echo_n "(cached) " >&6
3487else
3488  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3489/* end confdefs.h.  */
3490
3491int
3492main ()
3493{
3494
3495  ;
3496  return 0;
3497}
3498_ACEOF
3499rm -f conftest.o conftest.obj
3500if { { ac_try="$ac_compile"
3501case "(($ac_try" in
3502  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3503  *) ac_try_echo=$ac_try;;
3504esac
3505eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3506$as_echo "$ac_try_echo"; } >&5
3507  (eval "$ac_compile") 2>&5
3508  ac_status=$?
3509  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3510  test $ac_status = 0; }; then :
3511  for ac_file in conftest.o conftest.obj conftest.*; do
3512  test -f "$ac_file" || continue;
3513  case $ac_file in
3514    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
3515    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3516       break;;
3517  esac
3518done
3519else
3520  $as_echo "$as_me: failed program was:" >&5
3521sed 's/^/| /' conftest.$ac_ext >&5
3522
3523{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3524$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3525as_fn_error $? "cannot compute suffix of object files: cannot compile
3526See \`config.log' for more details" "$LINENO" 5; }
3527fi
3528rm -f conftest.$ac_cv_objext conftest.$ac_ext
3529fi
3530{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3531$as_echo "$ac_cv_objext" >&6; }
3532OBJEXT=$ac_cv_objext
3533ac_objext=$OBJEXT
3534{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
3535$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
3536if ${ac_cv_c_compiler_gnu+:} false; then :
3537  $as_echo_n "(cached) " >&6
3538else
3539  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3540/* end confdefs.h.  */
3541
3542int
3543main ()
3544{
3545#ifndef __GNUC__
3546       choke me
3547#endif
3548
3549  ;
3550  return 0;
3551}
3552_ACEOF
3553if ac_fn_c_try_compile "$LINENO"; then :
3554  ac_compiler_gnu=yes
3555else
3556  ac_compiler_gnu=no
3557fi
3558rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3559ac_cv_c_compiler_gnu=$ac_compiler_gnu
3560
3561fi
3562{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
3563$as_echo "$ac_cv_c_compiler_gnu" >&6; }
3564if test $ac_compiler_gnu = yes; then
3565  GCC=yes
3566else
3567  GCC=
3568fi
3569ac_test_CFLAGS=${CFLAGS+set}
3570ac_save_CFLAGS=$CFLAGS
3571{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
3572$as_echo_n "checking whether $CC accepts -g... " >&6; }
3573if ${ac_cv_prog_cc_g+:} false; then :
3574  $as_echo_n "(cached) " >&6
3575else
3576  ac_save_c_werror_flag=$ac_c_werror_flag
3577   ac_c_werror_flag=yes
3578   ac_cv_prog_cc_g=no
3579   CFLAGS="-g"
3580   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3581/* end confdefs.h.  */
3582
3583int
3584main ()
3585{
3586
3587  ;
3588  return 0;
3589}
3590_ACEOF
3591if ac_fn_c_try_compile "$LINENO"; then :
3592  ac_cv_prog_cc_g=yes
3593else
3594  CFLAGS=""
3595      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3596/* end confdefs.h.  */
3597
3598int
3599main ()
3600{
3601
3602  ;
3603  return 0;
3604}
3605_ACEOF
3606if ac_fn_c_try_compile "$LINENO"; then :
3607
3608else
3609  ac_c_werror_flag=$ac_save_c_werror_flag
3610	 CFLAGS="-g"
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  ac_cv_prog_cc_g=yes
3624fi
3625rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3626fi
3627rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3628fi
3629rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3630   ac_c_werror_flag=$ac_save_c_werror_flag
3631fi
3632{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
3633$as_echo "$ac_cv_prog_cc_g" >&6; }
3634if test "$ac_test_CFLAGS" = set; then
3635  CFLAGS=$ac_save_CFLAGS
3636elif test $ac_cv_prog_cc_g = yes; then
3637  if test "$GCC" = yes; then
3638    CFLAGS="-g -O2"
3639  else
3640    CFLAGS="-g"
3641  fi
3642else
3643  if test "$GCC" = yes; then
3644    CFLAGS="-O2"
3645  else
3646    CFLAGS=
3647  fi
3648fi
3649{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
3650$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
3651if ${ac_cv_prog_cc_c89+:} false; then :
3652  $as_echo_n "(cached) " >&6
3653else
3654  ac_cv_prog_cc_c89=no
3655ac_save_CC=$CC
3656cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3657/* end confdefs.h.  */
3658#include <stdarg.h>
3659#include <stdio.h>
3660struct stat;
3661/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
3662struct buf { int x; };
3663FILE * (*rcsopen) (struct buf *, struct stat *, int);
3664static char *e (p, i)
3665     char **p;
3666     int i;
3667{
3668  return p[i];
3669}
3670static char *f (char * (*g) (char **, int), char **p, ...)
3671{
3672  char *s;
3673  va_list v;
3674  va_start (v,p);
3675  s = g (p, va_arg (v,int));
3676  va_end (v);
3677  return s;
3678}
3679
3680/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
3681   function prototypes and stuff, but not '\xHH' hex character constants.
3682   These don't provoke an error unfortunately, instead are silently treated
3683   as 'x'.  The following induces an error, until -std is added to get
3684   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
3685   array size at least.  It's necessary to write '\x00'==0 to get something
3686   that's true only with -std.  */
3687int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3688
3689/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3690   inside strings and character constants.  */
3691#define FOO(x) 'x'
3692int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3693
3694int test (int i, double x);
3695struct s1 {int (*f) (int a);};
3696struct s2 {int (*f) (double a);};
3697int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3698int argc;
3699char **argv;
3700int
3701main ()
3702{
3703return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
3704  ;
3705  return 0;
3706}
3707_ACEOF
3708for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3709	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
3710do
3711  CC="$ac_save_CC $ac_arg"
3712  if ac_fn_c_try_compile "$LINENO"; then :
3713  ac_cv_prog_cc_c89=$ac_arg
3714fi
3715rm -f core conftest.err conftest.$ac_objext
3716  test "x$ac_cv_prog_cc_c89" != "xno" && break
3717done
3718rm -f conftest.$ac_ext
3719CC=$ac_save_CC
3720
3721fi
3722# AC_CACHE_VAL
3723case "x$ac_cv_prog_cc_c89" in
3724  x)
3725    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
3726$as_echo "none needed" >&6; } ;;
3727  xno)
3728    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
3729$as_echo "unsupported" >&6; } ;;
3730  *)
3731    CC="$CC $ac_cv_prog_cc_c89"
3732    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
3733$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
3734esac
3735if test "x$ac_cv_prog_cc_c89" != xno; then :
3736
3737fi
3738
3739ac_ext=c
3740ac_cpp='$CPP $CPPFLAGS'
3741ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3742ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3743ac_compiler_gnu=$ac_cv_c_compiler_gnu
3744
3745
3746ac_ext=c
3747ac_cpp='$CPP $CPPFLAGS'
3748ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3749ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3750ac_compiler_gnu=$ac_cv_c_compiler_gnu
3751{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
3752$as_echo_n "checking how to run the C preprocessor... " >&6; }
3753# On Suns, sometimes $CPP names a directory.
3754if test -n "$CPP" && test -d "$CPP"; then
3755  CPP=
3756fi
3757if test -z "$CPP"; then
3758  if ${ac_cv_prog_CPP+:} false; then :
3759  $as_echo_n "(cached) " >&6
3760else
3761      # Double quotes because CPP needs to be expanded
3762    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3763    do
3764      ac_preproc_ok=false
3765for ac_c_preproc_warn_flag in '' yes
3766do
3767  # Use a header file that comes with gcc, so configuring glibc
3768  # with a fresh cross-compiler works.
3769  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3770  # <limits.h> exists even on freestanding compilers.
3771  # On the NeXT, cc -E runs the code through the compiler's parser,
3772  # not just through cpp. "Syntax error" is here to catch this case.
3773  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3774/* end confdefs.h.  */
3775#ifdef __STDC__
3776# include <limits.h>
3777#else
3778# include <assert.h>
3779#endif
3780		     Syntax error
3781_ACEOF
3782if ac_fn_c_try_cpp "$LINENO"; then :
3783
3784else
3785  # Broken: fails on valid input.
3786continue
3787fi
3788rm -f conftest.err conftest.i conftest.$ac_ext
3789
3790  # OK, works on sane cases.  Now check whether nonexistent headers
3791  # can be detected and how.
3792  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3793/* end confdefs.h.  */
3794#include <ac_nonexistent.h>
3795_ACEOF
3796if ac_fn_c_try_cpp "$LINENO"; then :
3797  # Broken: success on invalid input.
3798continue
3799else
3800  # Passes both tests.
3801ac_preproc_ok=:
3802break
3803fi
3804rm -f conftest.err conftest.i conftest.$ac_ext
3805
3806done
3807# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3808rm -f conftest.i conftest.err conftest.$ac_ext
3809if $ac_preproc_ok; then :
3810  break
3811fi
3812
3813    done
3814    ac_cv_prog_CPP=$CPP
3815
3816fi
3817  CPP=$ac_cv_prog_CPP
3818else
3819  ac_cv_prog_CPP=$CPP
3820fi
3821{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
3822$as_echo "$CPP" >&6; }
3823ac_preproc_ok=false
3824for ac_c_preproc_warn_flag in '' yes
3825do
3826  # Use a header file that comes with gcc, so configuring glibc
3827  # with a fresh cross-compiler works.
3828  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3829  # <limits.h> exists even on freestanding compilers.
3830  # On the NeXT, cc -E runs the code through the compiler's parser,
3831  # not just through cpp. "Syntax error" is here to catch this case.
3832  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3833/* end confdefs.h.  */
3834#ifdef __STDC__
3835# include <limits.h>
3836#else
3837# include <assert.h>
3838#endif
3839		     Syntax error
3840_ACEOF
3841if ac_fn_c_try_cpp "$LINENO"; then :
3842
3843else
3844  # Broken: fails on valid input.
3845continue
3846fi
3847rm -f conftest.err conftest.i conftest.$ac_ext
3848
3849  # OK, works on sane cases.  Now check whether nonexistent headers
3850  # can be detected and how.
3851  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3852/* end confdefs.h.  */
3853#include <ac_nonexistent.h>
3854_ACEOF
3855if ac_fn_c_try_cpp "$LINENO"; then :
3856  # Broken: success on invalid input.
3857continue
3858else
3859  # Passes both tests.
3860ac_preproc_ok=:
3861break
3862fi
3863rm -f conftest.err conftest.i conftest.$ac_ext
3864
3865done
3866# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3867rm -f conftest.i conftest.err conftest.$ac_ext
3868if $ac_preproc_ok; then :
3869
3870else
3871  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3872$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3873as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
3874See \`config.log' for more details" "$LINENO" 5; }
3875fi
3876
3877ac_ext=c
3878ac_cpp='$CPP $CPPFLAGS'
3879ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3880ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3881ac_compiler_gnu=$ac_cv_c_compiler_gnu
3882
3883
3884{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
3885$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
3886if ${ac_cv_path_GREP+:} false; then :
3887  $as_echo_n "(cached) " >&6
3888else
3889  if test -z "$GREP"; then
3890  ac_path_GREP_found=false
3891  # Loop through the user's path and test for each of PROGNAME-LIST
3892  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3893for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3894do
3895  IFS=$as_save_IFS
3896  test -z "$as_dir" && as_dir=.
3897    for ac_prog in grep ggrep; do
3898    for ac_exec_ext in '' $ac_executable_extensions; do
3899      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
3900      as_fn_executable_p "$ac_path_GREP" || continue
3901# Check for GNU ac_path_GREP and select it if it is found.
3902  # Check for GNU $ac_path_GREP
3903case `"$ac_path_GREP" --version 2>&1` in
3904*GNU*)
3905  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
3906*)
3907  ac_count=0
3908  $as_echo_n 0123456789 >"conftest.in"
3909  while :
3910  do
3911    cat "conftest.in" "conftest.in" >"conftest.tmp"
3912    mv "conftest.tmp" "conftest.in"
3913    cp "conftest.in" "conftest.nl"
3914    $as_echo 'GREP' >> "conftest.nl"
3915    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3916    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3917    as_fn_arith $ac_count + 1 && ac_count=$as_val
3918    if test $ac_count -gt ${ac_path_GREP_max-0}; then
3919      # Best one so far, save it but keep looking for a better one
3920      ac_cv_path_GREP="$ac_path_GREP"
3921      ac_path_GREP_max=$ac_count
3922    fi
3923    # 10*(2^10) chars as input seems more than enough
3924    test $ac_count -gt 10 && break
3925  done
3926  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3927esac
3928
3929      $ac_path_GREP_found && break 3
3930    done
3931  done
3932  done
3933IFS=$as_save_IFS
3934  if test -z "$ac_cv_path_GREP"; then
3935    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
3936  fi
3937else
3938  ac_cv_path_GREP=$GREP
3939fi
3940
3941fi
3942{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
3943$as_echo "$ac_cv_path_GREP" >&6; }
3944 GREP="$ac_cv_path_GREP"
3945
3946
3947{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
3948$as_echo_n "checking for egrep... " >&6; }
3949if ${ac_cv_path_EGREP+:} false; then :
3950  $as_echo_n "(cached) " >&6
3951else
3952  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
3953   then ac_cv_path_EGREP="$GREP -E"
3954   else
3955     if test -z "$EGREP"; then
3956  ac_path_EGREP_found=false
3957  # Loop through the user's path and test for each of PROGNAME-LIST
3958  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3959for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3960do
3961  IFS=$as_save_IFS
3962  test -z "$as_dir" && as_dir=.
3963    for ac_prog in egrep; do
3964    for ac_exec_ext in '' $ac_executable_extensions; do
3965      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
3966      as_fn_executable_p "$ac_path_EGREP" || continue
3967# Check for GNU ac_path_EGREP and select it if it is found.
3968  # Check for GNU $ac_path_EGREP
3969case `"$ac_path_EGREP" --version 2>&1` in
3970*GNU*)
3971  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
3972*)
3973  ac_count=0
3974  $as_echo_n 0123456789 >"conftest.in"
3975  while :
3976  do
3977    cat "conftest.in" "conftest.in" >"conftest.tmp"
3978    mv "conftest.tmp" "conftest.in"
3979    cp "conftest.in" "conftest.nl"
3980    $as_echo 'EGREP' >> "conftest.nl"
3981    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3982    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3983    as_fn_arith $ac_count + 1 && ac_count=$as_val
3984    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
3985      # Best one so far, save it but keep looking for a better one
3986      ac_cv_path_EGREP="$ac_path_EGREP"
3987      ac_path_EGREP_max=$ac_count
3988    fi
3989    # 10*(2^10) chars as input seems more than enough
3990    test $ac_count -gt 10 && break
3991  done
3992  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3993esac
3994
3995      $ac_path_EGREP_found && break 3
3996    done
3997  done
3998  done
3999IFS=$as_save_IFS
4000  if test -z "$ac_cv_path_EGREP"; then
4001    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4002  fi
4003else
4004  ac_cv_path_EGREP=$EGREP
4005fi
4006
4007   fi
4008fi
4009{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
4010$as_echo "$ac_cv_path_EGREP" >&6; }
4011 EGREP="$ac_cv_path_EGREP"
4012
4013
4014{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
4015$as_echo_n "checking for ANSI C header files... " >&6; }
4016if ${ac_cv_header_stdc+:} false; then :
4017  $as_echo_n "(cached) " >&6
4018else
4019  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4020/* end confdefs.h.  */
4021#include <stdlib.h>
4022#include <stdarg.h>
4023#include <string.h>
4024#include <float.h>
4025
4026int
4027main ()
4028{
4029
4030  ;
4031  return 0;
4032}
4033_ACEOF
4034if ac_fn_c_try_compile "$LINENO"; then :
4035  ac_cv_header_stdc=yes
4036else
4037  ac_cv_header_stdc=no
4038fi
4039rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4040
4041if test $ac_cv_header_stdc = yes; then
4042  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4043  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4044/* end confdefs.h.  */
4045#include <string.h>
4046
4047_ACEOF
4048if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4049  $EGREP "memchr" >/dev/null 2>&1; then :
4050
4051else
4052  ac_cv_header_stdc=no
4053fi
4054rm -f conftest*
4055
4056fi
4057
4058if test $ac_cv_header_stdc = yes; then
4059  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4060  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4061/* end confdefs.h.  */
4062#include <stdlib.h>
4063
4064_ACEOF
4065if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4066  $EGREP "free" >/dev/null 2>&1; then :
4067
4068else
4069  ac_cv_header_stdc=no
4070fi
4071rm -f conftest*
4072
4073fi
4074
4075if test $ac_cv_header_stdc = yes; then
4076  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4077  if test "$cross_compiling" = yes; then :
4078  :
4079else
4080  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4081/* end confdefs.h.  */
4082#include <ctype.h>
4083#include <stdlib.h>
4084#if ((' ' & 0x0FF) == 0x020)
4085# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4086# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4087#else
4088# define ISLOWER(c) \
4089		   (('a' <= (c) && (c) <= 'i') \
4090		     || ('j' <= (c) && (c) <= 'r') \
4091		     || ('s' <= (c) && (c) <= 'z'))
4092# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4093#endif
4094
4095#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4096int
4097main ()
4098{
4099  int i;
4100  for (i = 0; i < 256; i++)
4101    if (XOR (islower (i), ISLOWER (i))
4102	|| toupper (i) != TOUPPER (i))
4103      return 2;
4104  return 0;
4105}
4106_ACEOF
4107if ac_fn_c_try_run "$LINENO"; then :
4108
4109else
4110  ac_cv_header_stdc=no
4111fi
4112rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4113  conftest.$ac_objext conftest.beam conftest.$ac_ext
4114fi
4115
4116fi
4117fi
4118{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
4119$as_echo "$ac_cv_header_stdc" >&6; }
4120if test $ac_cv_header_stdc = yes; then
4121
4122$as_echo "#define STDC_HEADERS 1" >>confdefs.h
4123
4124fi
4125
4126# On IRIX 5.3, sys/types and inttypes.h are conflicting.
4127for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4128		  inttypes.h stdint.h unistd.h
4129do :
4130  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4131ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
4132"
4133if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
4134  cat >>confdefs.h <<_ACEOF
4135#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
4136_ACEOF
4137
4138fi
4139
4140done
4141
4142
4143
4144  ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
4145if test "x$ac_cv_header_minix_config_h" = xyes; then :
4146  MINIX=yes
4147else
4148  MINIX=
4149fi
4150
4151
4152  if test "$MINIX" = yes; then
4153
4154$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
4155
4156
4157$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
4158
4159
4160$as_echo "#define _MINIX 1" >>confdefs.h
4161
4162  fi
4163
4164
4165  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
4166$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
4167if ${ac_cv_safe_to_define___extensions__+:} false; then :
4168  $as_echo_n "(cached) " >&6
4169else
4170  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4171/* end confdefs.h.  */
4172
4173#         define __EXTENSIONS__ 1
4174          $ac_includes_default
4175int
4176main ()
4177{
4178
4179  ;
4180  return 0;
4181}
4182_ACEOF
4183if ac_fn_c_try_compile "$LINENO"; then :
4184  ac_cv_safe_to_define___extensions__=yes
4185else
4186  ac_cv_safe_to_define___extensions__=no
4187fi
4188rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4189fi
4190{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
4191$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
4192  test $ac_cv_safe_to_define___extensions__ = yes &&
4193    $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
4194
4195  $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
4196
4197  $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
4198
4199  $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
4200
4201  $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
4202
4203
4204if test "$ac_cv_header_minix_config_h" = "yes"; then
4205
4206$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
4207
4208fi
4209
4210case "$prefix" in
4211        NONE)
4212		prefix="/usr/local"
4213        ;;
4214esac
4215case "$exec_prefix" in
4216        NONE)
4217		exec_prefix="$prefix"
4218        ;;
4219esac
4220
4221# are we on MinGW?
4222if uname -s 2>&1 | grep MINGW >/dev/null; then on_mingw="yes"
4223else
4224	if echo $host | grep mingw >/dev/null; then on_mingw="yes"
4225	else on_mingw="no"; fi
4226fi
4227
4228#
4229# Determine configuration file
4230# the eval is to evaluate shell expansion twice
4231UNBOUND_SBIN_DIR=`eval echo "${sbindir}"`
4232
4233UNBOUND_SYSCONF_DIR=`eval echo "${sysconfdir}"`
4234
4235UNBOUND_LOCALSTATE_DIR=`eval echo "${localstatedir}"`
4236
4237if test $on_mingw = "no"; then
4238  ub_conf_file=`eval echo "${sysconfdir}/unbound/unbound.conf"`
4239else
4240  ub_conf_file="C:\\Program Files\\Unbound\\service.conf"
4241fi
4242
4243# Check whether --with-conf_file was given.
4244if test "${with_conf_file+set}" = set; then :
4245  withval=$with_conf_file; ub_conf_file="$withval"
4246fi
4247
4248
4249hdr_config="`echo $ub_conf_file | sed -e 's/\\\\/\\\\\\\\/g'`"
4250
4251
4252cat >>confdefs.h <<_ACEOF
4253#define CONFIGFILE "$hdr_config"
4254_ACEOF
4255
4256ub_conf_dir=`$as_dirname -- "$ub_conf_file" ||
4257$as_expr X"$ub_conf_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
4258	 X"$ub_conf_file" : 'X\(//\)[^/]' \| \
4259	 X"$ub_conf_file" : 'X\(//\)$' \| \
4260	 X"$ub_conf_file" : 'X\(/\)' \| . 2>/dev/null ||
4261$as_echo X"$ub_conf_file" |
4262    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
4263	    s//\1/
4264	    q
4265	  }
4266	  /^X\(\/\/\)[^/].*/{
4267	    s//\1/
4268	    q
4269	  }
4270	  /^X\(\/\/\)$/{
4271	    s//\1/
4272	    q
4273	  }
4274	  /^X\(\/\).*/{
4275	    s//\1/
4276	    q
4277	  }
4278	  s/.*/./; q'`
4279
4280
4281# Determine run, chroot directory and pidfile locations
4282
4283# Check whether --with-run-dir was given.
4284if test "${with_run_dir+set}" = set; then :
4285  withval=$with_run_dir; UNBOUND_RUN_DIR="$withval"
4286else
4287  if test $on_mingw = no; then
4288    UNBOUND_RUN_DIR=`dirname "$ub_conf_file"`
4289else
4290    UNBOUND_RUN_DIR=""
4291fi
4292
4293fi
4294
4295
4296hdr_run="`echo $UNBOUND_RUN_DIR | sed -e 's/\\\\/\\\\\\\\/g'`"
4297
4298
4299cat >>confdefs.h <<_ACEOF
4300#define RUN_DIR "$hdr_run"
4301_ACEOF
4302
4303
4304
4305# Check whether --with-chroot-dir was given.
4306if test "${with_chroot_dir+set}" = set; then :
4307  withval=$with_chroot_dir; UNBOUND_CHROOT_DIR="$withval"
4308else
4309  if test $on_mingw = no; then
4310    UNBOUND_CHROOT_DIR="$UNBOUND_RUN_DIR"
4311else
4312    UNBOUND_CHROOT_DIR=""
4313fi
4314
4315fi
4316
4317
4318hdr_chroot="`echo $UNBOUND_CHROOT_DIR | sed -e 's/\\\\/\\\\\\\\/g'`"
4319
4320
4321cat >>confdefs.h <<_ACEOF
4322#define CHROOT_DIR "$hdr_chroot"
4323_ACEOF
4324
4325
4326
4327# Check whether --with-share-dir was given.
4328if test "${with_share_dir+set}" = set; then :
4329  withval=$with_share_dir; UNBOUND_SHARE_DIR="$withval"
4330else
4331  UNBOUND_SHARE_DIR="$UNBOUND_RUN_DIR"
4332fi
4333
4334
4335
4336cat >>confdefs.h <<_ACEOF
4337#define SHARE_DIR "$UNBOUND_SHARE_DIR"
4338_ACEOF
4339
4340
4341
4342# Check whether --with-pidfile was given.
4343if test "${with_pidfile+set}" = set; then :
4344  withval=$with_pidfile; UNBOUND_PIDFILE="$withval"
4345else
4346  if test $on_mingw = no; then
4347    UNBOUND_PIDFILE="$UNBOUND_RUN_DIR/unbound.pid"
4348else
4349    UNBOUND_PIDFILE=""
4350fi
4351
4352fi
4353
4354
4355hdr_pid="`echo $UNBOUND_PIDFILE | sed -e 's/\\\\/\\\\\\\\/g'`"
4356
4357
4358cat >>confdefs.h <<_ACEOF
4359#define PIDFILE "$hdr_pid"
4360_ACEOF
4361
4362
4363
4364# Check whether --with-rootkey-file was given.
4365if test "${with_rootkey_file+set}" = set; then :
4366  withval=$with_rootkey_file; UNBOUND_ROOTKEY_FILE="$withval"
4367else
4368  if test $on_mingw = no; then
4369    UNBOUND_ROOTKEY_FILE="$UNBOUND_RUN_DIR/root.key"
4370else
4371    UNBOUND_ROOTKEY_FILE="C:\\Program Files\\Unbound\\root.key"
4372fi
4373
4374fi
4375
4376
4377hdr_rkey="`echo $UNBOUND_ROOTKEY_FILE | sed -e 's/\\\\/\\\\\\\\/g'`"
4378
4379
4380cat >>confdefs.h <<_ACEOF
4381#define ROOT_ANCHOR_FILE "$hdr_rkey"
4382_ACEOF
4383
4384
4385
4386# Check whether --with-rootcert-file was given.
4387if test "${with_rootcert_file+set}" = set; then :
4388  withval=$with_rootcert_file; UNBOUND_ROOTCERT_FILE="$withval"
4389else
4390  if test $on_mingw = no; then
4391    UNBOUND_ROOTCERT_FILE="$UNBOUND_RUN_DIR/icannbundle.pem"
4392else
4393    UNBOUND_ROOTCERT_FILE="C:\\Program Files\\Unbound\\icannbundle.pem"
4394fi
4395
4396fi
4397
4398
4399hdr_rpem="`echo $UNBOUND_ROOTCERT_FILE | sed -e 's/\\\\/\\\\\\\\/g'`"
4400
4401
4402cat >>confdefs.h <<_ACEOF
4403#define ROOT_CERT_FILE "$hdr_rpem"
4404_ACEOF
4405
4406
4407
4408# Check whether --with-username was given.
4409if test "${with_username+set}" = set; then :
4410  withval=$with_username; UNBOUND_USERNAME="$withval"
4411else
4412  UNBOUND_USERNAME="unbound"
4413fi
4414
4415
4416
4417cat >>confdefs.h <<_ACEOF
4418#define UB_USERNAME "$UNBOUND_USERNAME"
4419_ACEOF
4420
4421
4422
4423$as_echo "#define WINVER 0x0502" >>confdefs.h
4424
4425wnvs=`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/' `
4426
4427
4428cat >>confdefs.h <<_ACEOF
4429#define RSRC_PACKAGE_VERSION $wnvs
4430_ACEOF
4431
4432
4433# Checks for typedefs, structures, and compiler characteristics.
4434{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
4435$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
4436if ${ac_cv_c_const+:} false; then :
4437  $as_echo_n "(cached) " >&6
4438else
4439  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4440/* end confdefs.h.  */
4441
4442int
4443main ()
4444{
4445
4446#ifndef __cplusplus
4447  /* Ultrix mips cc rejects this sort of thing.  */
4448  typedef int charset[2];
4449  const charset cs = { 0, 0 };
4450  /* SunOS 4.1.1 cc rejects this.  */
4451  char const *const *pcpcc;
4452  char **ppc;
4453  /* NEC SVR4.0.2 mips cc rejects this.  */
4454  struct point {int x, y;};
4455  static struct point const zero = {0,0};
4456  /* AIX XL C 1.02.0.0 rejects this.
4457     It does not let you subtract one const X* pointer from another in
4458     an arm of an if-expression whose if-part is not a constant
4459     expression */
4460  const char *g = "string";
4461  pcpcc = &g + (g ? g-g : 0);
4462  /* HPUX 7.0 cc rejects these. */
4463  ++pcpcc;
4464  ppc = (char**) pcpcc;
4465  pcpcc = (char const *const *) ppc;
4466  { /* SCO 3.2v4 cc rejects this sort of thing.  */
4467    char tx;
4468    char *t = &tx;
4469    char const *s = 0 ? (char *) 0 : (char const *) 0;
4470
4471    *t++ = 0;
4472    if (s) return 0;
4473  }
4474  { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
4475    int x[] = {25, 17};
4476    const int *foo = &x[0];
4477    ++foo;
4478  }
4479  { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
4480    typedef const int *iptr;
4481    iptr p = 0;
4482    ++p;
4483  }
4484  { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
4485       "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
4486    struct s { int j; const int *ap[3]; } bx;
4487    struct s *b = &bx; b->j = 5;
4488  }
4489  { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
4490    const int foo = 10;
4491    if (!foo) return 0;
4492  }
4493  return !cs[0] && !zero.x;
4494#endif
4495
4496  ;
4497  return 0;
4498}
4499_ACEOF
4500if ac_fn_c_try_compile "$LINENO"; then :
4501  ac_cv_c_const=yes
4502else
4503  ac_cv_c_const=no
4504fi
4505rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4506fi
4507{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
4508$as_echo "$ac_cv_c_const" >&6; }
4509if test $ac_cv_c_const = no; then
4510
4511$as_echo "#define const /**/" >>confdefs.h
4512
4513fi
4514
4515ac_ext=c
4516ac_cpp='$CPP $CPPFLAGS'
4517ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4518ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4519ac_compiler_gnu=$ac_cv_c_compiler_gnu
4520
4521# allow user to override the -g -O2 flags.
4522default_cflags=no
4523if test "x$CFLAGS" = "x" ; then
4524
4525
4526{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -g" >&5
4527$as_echo_n "checking whether $CC supports -g... " >&6; }
4528cache=`echo g | sed 'y%.=/+-%___p_%'`
4529if eval \${cv_prog_cc_flag_$cache+:} false; then :
4530  $as_echo_n "(cached) " >&6
4531else
4532
4533echo 'void f(void){}' >conftest.c
4534if test -z "`$CC $CPPFLAGS $CFLAGS -g -c conftest.c 2>&1`"; then
4535eval "cv_prog_cc_flag_$cache=yes"
4536else
4537eval "cv_prog_cc_flag_$cache=no"
4538fi
4539rm -f conftest conftest.o conftest.c
4540
4541fi
4542
4543if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
4544{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4545$as_echo "yes" >&6; }
4546:
4547CFLAGS="$CFLAGS -g"
4548else
4549{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4550$as_echo "no" >&6; }
4551:
4552
4553fi
4554
4555
4556
4557{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -O2" >&5
4558$as_echo_n "checking whether $CC supports -O2... " >&6; }
4559cache=`echo O2 | sed 'y%.=/+-%___p_%'`
4560if eval \${cv_prog_cc_flag_$cache+:} false; then :
4561  $as_echo_n "(cached) " >&6
4562else
4563
4564echo 'void f(void){}' >conftest.c
4565if test -z "`$CC $CPPFLAGS $CFLAGS -O2 -c conftest.c 2>&1`"; then
4566eval "cv_prog_cc_flag_$cache=yes"
4567else
4568eval "cv_prog_cc_flag_$cache=no"
4569fi
4570rm -f conftest conftest.o conftest.c
4571
4572fi
4573
4574if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
4575{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4576$as_echo "yes" >&6; }
4577:
4578CFLAGS="$CFLAGS -O2"
4579else
4580{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4581$as_echo "no" >&6; }
4582:
4583
4584fi
4585
4586default_cflags=yes
4587fi
4588ac_ext=c
4589ac_cpp='$CPP $CPPFLAGS'
4590ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4591ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4592ac_compiler_gnu=$ac_cv_c_compiler_gnu
4593if test -n "$ac_tool_prefix"; then
4594  # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
4595set dummy ${ac_tool_prefix}gcc; ac_word=$2
4596{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4597$as_echo_n "checking for $ac_word... " >&6; }
4598if ${ac_cv_prog_CC+:} false; then :
4599  $as_echo_n "(cached) " >&6
4600else
4601  if test -n "$CC"; then
4602  ac_cv_prog_CC="$CC" # Let the user override the test.
4603else
4604as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4605for as_dir in $PATH
4606do
4607  IFS=$as_save_IFS
4608  test -z "$as_dir" && as_dir=.
4609    for ac_exec_ext in '' $ac_executable_extensions; do
4610  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4611    ac_cv_prog_CC="${ac_tool_prefix}gcc"
4612    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4613    break 2
4614  fi
4615done
4616  done
4617IFS=$as_save_IFS
4618
4619fi
4620fi
4621CC=$ac_cv_prog_CC
4622if test -n "$CC"; then
4623  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4624$as_echo "$CC" >&6; }
4625else
4626  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4627$as_echo "no" >&6; }
4628fi
4629
4630
4631fi
4632if test -z "$ac_cv_prog_CC"; then
4633  ac_ct_CC=$CC
4634  # Extract the first word of "gcc", so it can be a program name with args.
4635set dummy gcc; ac_word=$2
4636{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4637$as_echo_n "checking for $ac_word... " >&6; }
4638if ${ac_cv_prog_ac_ct_CC+:} false; then :
4639  $as_echo_n "(cached) " >&6
4640else
4641  if test -n "$ac_ct_CC"; then
4642  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
4643else
4644as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4645for as_dir in $PATH
4646do
4647  IFS=$as_save_IFS
4648  test -z "$as_dir" && as_dir=.
4649    for ac_exec_ext in '' $ac_executable_extensions; do
4650  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4651    ac_cv_prog_ac_ct_CC="gcc"
4652    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4653    break 2
4654  fi
4655done
4656  done
4657IFS=$as_save_IFS
4658
4659fi
4660fi
4661ac_ct_CC=$ac_cv_prog_ac_ct_CC
4662if test -n "$ac_ct_CC"; then
4663  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
4664$as_echo "$ac_ct_CC" >&6; }
4665else
4666  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4667$as_echo "no" >&6; }
4668fi
4669
4670  if test "x$ac_ct_CC" = x; then
4671    CC=""
4672  else
4673    case $cross_compiling:$ac_tool_warned in
4674yes:)
4675{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4676$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4677ac_tool_warned=yes ;;
4678esac
4679    CC=$ac_ct_CC
4680  fi
4681else
4682  CC="$ac_cv_prog_CC"
4683fi
4684
4685if test -z "$CC"; then
4686          if test -n "$ac_tool_prefix"; then
4687    # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
4688set dummy ${ac_tool_prefix}cc; ac_word=$2
4689{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4690$as_echo_n "checking for $ac_word... " >&6; }
4691if ${ac_cv_prog_CC+:} false; then :
4692  $as_echo_n "(cached) " >&6
4693else
4694  if test -n "$CC"; then
4695  ac_cv_prog_CC="$CC" # Let the user override the test.
4696else
4697as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4698for as_dir in $PATH
4699do
4700  IFS=$as_save_IFS
4701  test -z "$as_dir" && as_dir=.
4702    for ac_exec_ext in '' $ac_executable_extensions; do
4703  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4704    ac_cv_prog_CC="${ac_tool_prefix}cc"
4705    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4706    break 2
4707  fi
4708done
4709  done
4710IFS=$as_save_IFS
4711
4712fi
4713fi
4714CC=$ac_cv_prog_CC
4715if test -n "$CC"; then
4716  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4717$as_echo "$CC" >&6; }
4718else
4719  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4720$as_echo "no" >&6; }
4721fi
4722
4723
4724  fi
4725fi
4726if test -z "$CC"; then
4727  # Extract the first word of "cc", so it can be a program name with args.
4728set dummy cc; ac_word=$2
4729{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4730$as_echo_n "checking for $ac_word... " >&6; }
4731if ${ac_cv_prog_CC+:} false; then :
4732  $as_echo_n "(cached) " >&6
4733else
4734  if test -n "$CC"; then
4735  ac_cv_prog_CC="$CC" # Let the user override the test.
4736else
4737  ac_prog_rejected=no
4738as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4739for as_dir in $PATH
4740do
4741  IFS=$as_save_IFS
4742  test -z "$as_dir" && as_dir=.
4743    for ac_exec_ext in '' $ac_executable_extensions; do
4744  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4745    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
4746       ac_prog_rejected=yes
4747       continue
4748     fi
4749    ac_cv_prog_CC="cc"
4750    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4751    break 2
4752  fi
4753done
4754  done
4755IFS=$as_save_IFS
4756
4757if test $ac_prog_rejected = yes; then
4758  # We found a bogon in the path, so make sure we never use it.
4759  set dummy $ac_cv_prog_CC
4760  shift
4761  if test $# != 0; then
4762    # We chose a different compiler from the bogus one.
4763    # However, it has the same basename, so the bogon will be chosen
4764    # first if we set CC to just the basename; use the full file name.
4765    shift
4766    ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
4767  fi
4768fi
4769fi
4770fi
4771CC=$ac_cv_prog_CC
4772if test -n "$CC"; then
4773  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4774$as_echo "$CC" >&6; }
4775else
4776  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4777$as_echo "no" >&6; }
4778fi
4779
4780
4781fi
4782if test -z "$CC"; then
4783  if test -n "$ac_tool_prefix"; then
4784  for ac_prog in cl.exe
4785  do
4786    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4787set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4788{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4789$as_echo_n "checking for $ac_word... " >&6; }
4790if ${ac_cv_prog_CC+:} false; then :
4791  $as_echo_n "(cached) " >&6
4792else
4793  if test -n "$CC"; then
4794  ac_cv_prog_CC="$CC" # Let the user override the test.
4795else
4796as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4797for as_dir in $PATH
4798do
4799  IFS=$as_save_IFS
4800  test -z "$as_dir" && as_dir=.
4801    for ac_exec_ext in '' $ac_executable_extensions; do
4802  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4803    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
4804    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4805    break 2
4806  fi
4807done
4808  done
4809IFS=$as_save_IFS
4810
4811fi
4812fi
4813CC=$ac_cv_prog_CC
4814if test -n "$CC"; then
4815  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4816$as_echo "$CC" >&6; }
4817else
4818  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4819$as_echo "no" >&6; }
4820fi
4821
4822
4823    test -n "$CC" && break
4824  done
4825fi
4826if test -z "$CC"; then
4827  ac_ct_CC=$CC
4828  for ac_prog in cl.exe
4829do
4830  # Extract the first word of "$ac_prog", so it can be a program name with args.
4831set dummy $ac_prog; ac_word=$2
4832{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4833$as_echo_n "checking for $ac_word... " >&6; }
4834if ${ac_cv_prog_ac_ct_CC+:} false; then :
4835  $as_echo_n "(cached) " >&6
4836else
4837  if test -n "$ac_ct_CC"; then
4838  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
4839else
4840as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4841for as_dir in $PATH
4842do
4843  IFS=$as_save_IFS
4844  test -z "$as_dir" && as_dir=.
4845    for ac_exec_ext in '' $ac_executable_extensions; do
4846  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4847    ac_cv_prog_ac_ct_CC="$ac_prog"
4848    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4849    break 2
4850  fi
4851done
4852  done
4853IFS=$as_save_IFS
4854
4855fi
4856fi
4857ac_ct_CC=$ac_cv_prog_ac_ct_CC
4858if test -n "$ac_ct_CC"; then
4859  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
4860$as_echo "$ac_ct_CC" >&6; }
4861else
4862  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4863$as_echo "no" >&6; }
4864fi
4865
4866
4867  test -n "$ac_ct_CC" && break
4868done
4869
4870  if test "x$ac_ct_CC" = x; then
4871    CC=""
4872  else
4873    case $cross_compiling:$ac_tool_warned in
4874yes:)
4875{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4876$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4877ac_tool_warned=yes ;;
4878esac
4879    CC=$ac_ct_CC
4880  fi
4881fi
4882
4883fi
4884
4885
4886test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4887$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4888as_fn_error $? "no acceptable C compiler found in \$PATH
4889See \`config.log' for more details" "$LINENO" 5; }
4890
4891# Provide some information about the compiler.
4892$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
4893set X $ac_compile
4894ac_compiler=$2
4895for ac_option in --version -v -V -qversion; do
4896  { { ac_try="$ac_compiler $ac_option >&5"
4897case "(($ac_try" in
4898  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4899  *) ac_try_echo=$ac_try;;
4900esac
4901eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4902$as_echo "$ac_try_echo"; } >&5
4903  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
4904  ac_status=$?
4905  if test -s conftest.err; then
4906    sed '10a\
4907... rest of stderr output deleted ...
4908         10q' conftest.err >conftest.er1
4909    cat conftest.er1 >&5
4910  fi
4911  rm -f conftest.er1 conftest.err
4912  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4913  test $ac_status = 0; }
4914done
4915
4916{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4917$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
4918if ${ac_cv_c_compiler_gnu+:} false; then :
4919  $as_echo_n "(cached) " >&6
4920else
4921  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4922/* end confdefs.h.  */
4923
4924int
4925main ()
4926{
4927#ifndef __GNUC__
4928       choke me
4929#endif
4930
4931  ;
4932  return 0;
4933}
4934_ACEOF
4935if ac_fn_c_try_compile "$LINENO"; then :
4936  ac_compiler_gnu=yes
4937else
4938  ac_compiler_gnu=no
4939fi
4940rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4941ac_cv_c_compiler_gnu=$ac_compiler_gnu
4942
4943fi
4944{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4945$as_echo "$ac_cv_c_compiler_gnu" >&6; }
4946if test $ac_compiler_gnu = yes; then
4947  GCC=yes
4948else
4949  GCC=
4950fi
4951ac_test_CFLAGS=${CFLAGS+set}
4952ac_save_CFLAGS=$CFLAGS
4953{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4954$as_echo_n "checking whether $CC accepts -g... " >&6; }
4955if ${ac_cv_prog_cc_g+:} false; then :
4956  $as_echo_n "(cached) " >&6
4957else
4958  ac_save_c_werror_flag=$ac_c_werror_flag
4959   ac_c_werror_flag=yes
4960   ac_cv_prog_cc_g=no
4961   CFLAGS="-g"
4962   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4963/* end confdefs.h.  */
4964
4965int
4966main ()
4967{
4968
4969  ;
4970  return 0;
4971}
4972_ACEOF
4973if ac_fn_c_try_compile "$LINENO"; then :
4974  ac_cv_prog_cc_g=yes
4975else
4976  CFLAGS=""
4977      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4978/* end confdefs.h.  */
4979
4980int
4981main ()
4982{
4983
4984  ;
4985  return 0;
4986}
4987_ACEOF
4988if ac_fn_c_try_compile "$LINENO"; then :
4989
4990else
4991  ac_c_werror_flag=$ac_save_c_werror_flag
4992	 CFLAGS="-g"
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  ac_cv_prog_cc_g=yes
5006fi
5007rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5008fi
5009rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5010fi
5011rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5012   ac_c_werror_flag=$ac_save_c_werror_flag
5013fi
5014{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
5015$as_echo "$ac_cv_prog_cc_g" >&6; }
5016if test "$ac_test_CFLAGS" = set; then
5017  CFLAGS=$ac_save_CFLAGS
5018elif test $ac_cv_prog_cc_g = yes; then
5019  if test "$GCC" = yes; then
5020    CFLAGS="-g -O2"
5021  else
5022    CFLAGS="-g"
5023  fi
5024else
5025  if test "$GCC" = yes; then
5026    CFLAGS="-O2"
5027  else
5028    CFLAGS=
5029  fi
5030fi
5031{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
5032$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
5033if ${ac_cv_prog_cc_c89+:} false; then :
5034  $as_echo_n "(cached) " >&6
5035else
5036  ac_cv_prog_cc_c89=no
5037ac_save_CC=$CC
5038cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5039/* end confdefs.h.  */
5040#include <stdarg.h>
5041#include <stdio.h>
5042struct stat;
5043/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
5044struct buf { int x; };
5045FILE * (*rcsopen) (struct buf *, struct stat *, int);
5046static char *e (p, i)
5047     char **p;
5048     int i;
5049{
5050  return p[i];
5051}
5052static char *f (char * (*g) (char **, int), char **p, ...)
5053{
5054  char *s;
5055  va_list v;
5056  va_start (v,p);
5057  s = g (p, va_arg (v,int));
5058  va_end (v);
5059  return s;
5060}
5061
5062/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
5063   function prototypes and stuff, but not '\xHH' hex character constants.
5064   These don't provoke an error unfortunately, instead are silently treated
5065   as 'x'.  The following induces an error, until -std is added to get
5066   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
5067   array size at least.  It's necessary to write '\x00'==0 to get something
5068   that's true only with -std.  */
5069int osf4_cc_array ['\x00' == 0 ? 1 : -1];
5070
5071/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
5072   inside strings and character constants.  */
5073#define FOO(x) 'x'
5074int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
5075
5076int test (int i, double x);
5077struct s1 {int (*f) (int a);};
5078struct s2 {int (*f) (double a);};
5079int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
5080int argc;
5081char **argv;
5082int
5083main ()
5084{
5085return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
5086  ;
5087  return 0;
5088}
5089_ACEOF
5090for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
5091	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
5092do
5093  CC="$ac_save_CC $ac_arg"
5094  if ac_fn_c_try_compile "$LINENO"; then :
5095  ac_cv_prog_cc_c89=$ac_arg
5096fi
5097rm -f core conftest.err conftest.$ac_objext
5098  test "x$ac_cv_prog_cc_c89" != "xno" && break
5099done
5100rm -f conftest.$ac_ext
5101CC=$ac_save_CC
5102
5103fi
5104# AC_CACHE_VAL
5105case "x$ac_cv_prog_cc_c89" in
5106  x)
5107    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
5108$as_echo "none needed" >&6; } ;;
5109  xno)
5110    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
5111$as_echo "unsupported" >&6; } ;;
5112  *)
5113    CC="$CC $ac_cv_prog_cc_c89"
5114    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
5115$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
5116esac
5117if test "x$ac_cv_prog_cc_c89" != xno; then :
5118
5119fi
5120
5121ac_ext=c
5122ac_cpp='$CPP $CPPFLAGS'
5123ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5124ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5125ac_compiler_gnu=$ac_cv_c_compiler_gnu
5126
5127
5128{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $CC dependency flag" >&5
5129$as_echo_n "checking $CC dependency flag... " >&6; }
5130echo 'void f(){}' >conftest.c
5131if test "`$CC -MM conftest.c 2>&1`" = "conftest.o: conftest.c"; then
5132	DEPFLAG="-MM"
5133else
5134  if test "`$CC -xM1 conftest.c 2>&1`" = "conftest.o: conftest.c"; then
5135	DEPFLAG="-xM1"
5136  else
5137	DEPFLAG="-MM"  # dunno do something
5138  fi
5139fi
5140{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEPFLAG" >&5
5141$as_echo "$DEPFLAG" >&6; }
5142rm -f conftest.c
5143
5144
5145
5146
5147
5148{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Werror" >&5
5149$as_echo_n "checking whether $CC supports -Werror... " >&6; }
5150cache=`echo Werror | sed 'y%.=/+-%___p_%'`
5151if eval \${cv_prog_cc_flag_$cache+:} false; then :
5152  $as_echo_n "(cached) " >&6
5153else
5154
5155echo 'void f(void){}' >conftest.c
5156if test -z "`$CC $CPPFLAGS $CFLAGS -Werror -c conftest.c 2>&1`"; then
5157eval "cv_prog_cc_flag_$cache=yes"
5158else
5159eval "cv_prog_cc_flag_$cache=no"
5160fi
5161rm -f conftest conftest.o conftest.c
5162
5163fi
5164
5165if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
5166{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5167$as_echo "yes" >&6; }
5168:
5169ERRFLAG="-Werror"
5170else
5171{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5172$as_echo "no" >&6; }
5173:
5174ERRFLAG="-errwarn"
5175fi
5176
5177
5178
5179{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wall" >&5
5180$as_echo_n "checking whether $CC supports -Wall... " >&6; }
5181cache=`echo Wall | sed 'y%.=/+-%___p_%'`
5182if eval \${cv_prog_cc_flag_$cache+:} false; then :
5183  $as_echo_n "(cached) " >&6
5184else
5185
5186echo 'void f(void){}' >conftest.c
5187if test -z "`$CC $CPPFLAGS $CFLAGS -Wall -c conftest.c 2>&1`"; then
5188eval "cv_prog_cc_flag_$cache=yes"
5189else
5190eval "cv_prog_cc_flag_$cache=no"
5191fi
5192rm -f conftest conftest.o conftest.c
5193
5194fi
5195
5196if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
5197{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5198$as_echo "yes" >&6; }
5199:
5200ERRFLAG="$ERRFLAG -Wall"
5201else
5202{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5203$as_echo "no" >&6; }
5204:
5205ERRFLAG="$ERRFLAG -errfmt"
5206fi
5207
5208
5209
5210
5211
5212{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -std=c99" >&5
5213$as_echo_n "checking whether $CC supports -std=c99... " >&6; }
5214cache=`echo std=c99 | sed 'y%.=/+-%___p_%'`
5215if eval \${cv_prog_cc_flag_$cache+:} false; then :
5216  $as_echo_n "(cached) " >&6
5217else
5218
5219echo 'void f(void){}' >conftest.c
5220if test -z "`$CC $CPPFLAGS $CFLAGS -std=c99 -c conftest.c 2>&1`"; then
5221eval "cv_prog_cc_flag_$cache=yes"
5222else
5223eval "cv_prog_cc_flag_$cache=no"
5224fi
5225rm -f conftest conftest.o conftest.c
5226
5227fi
5228
5229if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
5230{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5231$as_echo "yes" >&6; }
5232:
5233C99FLAG="-std=c99"
5234else
5235{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5236$as_echo "no" >&6; }
5237:
5238
5239fi
5240
5241
5242
5243{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -xc99" >&5
5244$as_echo_n "checking whether $CC supports -xc99... " >&6; }
5245cache=`echo xc99 | sed 'y%.=/+-%___p_%'`
5246if eval \${cv_prog_cc_flag_$cache+:} false; then :
5247  $as_echo_n "(cached) " >&6
5248else
5249
5250echo 'void f(void){}' >conftest.c
5251if test -z "`$CC $CPPFLAGS $CFLAGS -xc99 -c conftest.c 2>&1`"; then
5252eval "cv_prog_cc_flag_$cache=yes"
5253else
5254eval "cv_prog_cc_flag_$cache=no"
5255fi
5256rm -f conftest conftest.o conftest.c
5257
5258fi
5259
5260if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
5261{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5262$as_echo "yes" >&6; }
5263:
5264C99FLAG="-xc99"
5265else
5266{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5267$as_echo "no" >&6; }
5268:
5269
5270fi
5271
5272
5273for ac_header in getopt.h time.h
5274do :
5275  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5276ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
5277"
5278if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
5279  cat >>confdefs.h <<_ACEOF
5280#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5281_ACEOF
5282
5283fi
5284
5285done
5286
5287
5288
5289
5290
5291{ $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
5292$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; }
5293cache=`$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`
5294if eval \${cv_prog_cc_flag_needed_$cache+:} false; then :
5295  $as_echo_n "(cached) " >&6
5296else
5297
5298echo '
5299#include "confdefs.h"
5300#include <stdlib.h>
5301#include <ctype.h>
5302#include <sys/time.h>
5303#ifdef HAVE_TIME_H
5304#include <time.h>
5305#endif
5306#include <unistd.h>
5307#include <netdb.h>
5308#ifdef HAVE_GETOPT_H
5309#include <getopt.h>
5310#endif
5311
5312int test() {
5313	int a;
5314	char **opts = NULL;
5315	struct timeval tv;
5316	char *t;
5317	time_t time = 0;
5318	char *buf = NULL;
5319	const char* str = NULL;
5320	struct msghdr msg;
5321	msg.msg_control = 0;
5322	t = ctime_r(&time, buf);
5323	tv.tv_usec = 10;
5324	srandom(32);
5325	a = getopt(2, opts, "a");
5326	a = isascii(32);
5327	str = gai_strerror(0);
5328	if(str && t && tv.tv_usec && msg.msg_control)
5329		a = 0;
5330	return a;
5331}
5332' > conftest.c
5333echo 'void f(){}' >>conftest.c
5334if test -z "`$CC $CPPFLAGS $CFLAGS $ERRFLAG -c conftest.c 2>&1`"; then
5335eval "cv_prog_cc_flag_needed_$cache=no"
5336else
5337
5338if 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
5339eval "cv_prog_cc_flag_needed_$cache=yes"
5340else
5341eval "cv_prog_cc_flag_needed_$cache=fail"
5342#echo 'Test with flag fails too!'
5343#cat conftest.c
5344#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"
5345#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`
5346#exit 1
5347fi
5348
5349fi
5350rm -f conftest conftest.c conftest.o
5351
5352fi
5353
5354if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = yes"; then
5355{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5356$as_echo "yes" >&6; }
5357:
5358CFLAGS="$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"
5359else
5360if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = no"; then
5361{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5362$as_echo "no" >&6; }
5363#echo 'Test with flag is no!'
5364#cat conftest.c
5365#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"
5366#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`
5367#exit 1
5368:
5369
5370else
5371{ $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
5372$as_echo "failed" >&6; }
5373:
5374
5375fi
5376fi
5377
5378
5379
5380
5381
5382{ $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
5383$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; }
5384cache=`$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`
5385if eval \${cv_prog_cc_flag_needed_$cache+:} false; then :
5386  $as_echo_n "(cached) " >&6
5387else
5388
5389echo '
5390#include "confdefs.h"
5391#include <stdlib.h>
5392#include <ctype.h>
5393#include <sys/time.h>
5394#ifdef HAVE_TIME_H
5395#include <time.h>
5396#endif
5397#include <unistd.h>
5398#include <netdb.h>
5399#ifdef HAVE_GETOPT_H
5400#include <getopt.h>
5401#endif
5402
5403int test() {
5404	int a;
5405	char **opts = NULL;
5406	struct timeval tv;
5407	char *t;
5408	time_t time = 0;
5409	char *buf = NULL;
5410	const char* str = NULL;
5411	struct msghdr msg;
5412	msg.msg_control = 0;
5413	t = ctime_r(&time, buf);
5414	tv.tv_usec = 10;
5415	srandom(32);
5416	a = getopt(2, opts, "a");
5417	a = isascii(32);
5418	str = gai_strerror(0);
5419	if(str && t && tv.tv_usec && msg.msg_control)
5420		a = 0;
5421	return a;
5422}
5423' > conftest.c
5424echo 'void f(){}' >>conftest.c
5425if test -z "`$CC $CPPFLAGS $CFLAGS $ERRFLAG -c conftest.c 2>&1`"; then
5426eval "cv_prog_cc_flag_needed_$cache=no"
5427else
5428
5429if 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
5430eval "cv_prog_cc_flag_needed_$cache=yes"
5431else
5432eval "cv_prog_cc_flag_needed_$cache=fail"
5433#echo 'Test with flag fails too!'
5434#cat conftest.c
5435#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"
5436#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`
5437#exit 1
5438fi
5439
5440fi
5441rm -f conftest conftest.c conftest.o
5442
5443fi
5444
5445if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = yes"; then
5446{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5447$as_echo "yes" >&6; }
5448:
5449CFLAGS="$CFLAGS $C99FLAG -D__EXTENSIONS__ -D_BSD_SOURCE -D_DEFAULT_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -D_ALL_SOURCE"
5450else
5451if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = no"; then
5452{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5453$as_echo "no" >&6; }
5454#echo 'Test with flag is no!'
5455#cat conftest.c
5456#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"
5457#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`
5458#exit 1
5459:
5460
5461else
5462{ $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
5463$as_echo "failed" >&6; }
5464:
5465
5466fi
5467fi
5468
5469
5470
5471
5472
5473{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we need $C99FLAG as a flag for $CC" >&5
5474$as_echo_n "checking whether we need $C99FLAG as a flag for $CC... " >&6; }
5475cache=`$as_echo "$C99FLAG" | $as_tr_sh`
5476if eval \${cv_prog_cc_flag_needed_$cache+:} false; then :
5477  $as_echo_n "(cached) " >&6
5478else
5479
5480echo '
5481#include <stdbool.h>
5482#include <ctype.h>
5483int test() {
5484        int a = 0;
5485        return a;
5486}
5487' > conftest.c
5488echo 'void f(){}' >>conftest.c
5489if test -z "`$CC $CPPFLAGS $CFLAGS $ERRFLAG -c conftest.c 2>&1`"; then
5490eval "cv_prog_cc_flag_needed_$cache=no"
5491else
5492
5493if test -z "`$CC $CPPFLAGS $CFLAGS $C99FLAG $ERRFLAG -c conftest.c 2>&1`"; then
5494eval "cv_prog_cc_flag_needed_$cache=yes"
5495else
5496eval "cv_prog_cc_flag_needed_$cache=fail"
5497#echo 'Test with flag fails too!'
5498#cat conftest.c
5499#echo "$CC $CPPFLAGS $CFLAGS $C99FLAG $ERRFLAG -c conftest.c 2>&1"
5500#echo `$CC $CPPFLAGS $CFLAGS $C99FLAG $ERRFLAG -c conftest.c 2>&1`
5501#exit 1
5502fi
5503
5504fi
5505rm -f conftest conftest.c conftest.o
5506
5507fi
5508
5509if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = yes"; then
5510{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5511$as_echo "yes" >&6; }
5512:
5513CFLAGS="$CFLAGS $C99FLAG"
5514else
5515if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = no"; then
5516{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5517$as_echo "no" >&6; }
5518#echo 'Test with flag is no!'
5519#cat conftest.c
5520#echo "$CC $CPPFLAGS $CFLAGS $C99FLAG $ERRFLAG -c conftest.c 2>&1"
5521#echo `$CC $CPPFLAGS $CFLAGS $C99FLAG $ERRFLAG -c conftest.c 2>&1`
5522#exit 1
5523:
5524
5525else
5526{ $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
5527$as_echo "failed" >&6; }
5528:
5529
5530fi
5531fi
5532
5533
5534
5535
5536
5537{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we need -D_BSD_SOURCE -D_DEFAULT_SOURCE as a flag for $CC" >&5
5538$as_echo_n "checking whether we need -D_BSD_SOURCE -D_DEFAULT_SOURCE as a flag for $CC... " >&6; }
5539cache=_D_BSD_SOURCE__D_DEFAULT_SOURCE
5540if eval \${cv_prog_cc_flag_needed_$cache+:} false; then :
5541  $as_echo_n "(cached) " >&6
5542else
5543
5544echo '
5545#include <ctype.h>
5546
5547int test() {
5548        int a;
5549        a = isascii(32);
5550        return a;
5551}
5552' > conftest.c
5553echo 'void f(){}' >>conftest.c
5554if test -z "`$CC $CPPFLAGS $CFLAGS $ERRFLAG -c conftest.c 2>&1`"; then
5555eval "cv_prog_cc_flag_needed_$cache=no"
5556else
5557
5558if test -z "`$CC $CPPFLAGS $CFLAGS -D_BSD_SOURCE -D_DEFAULT_SOURCE $ERRFLAG -c conftest.c 2>&1`"; then
5559eval "cv_prog_cc_flag_needed_$cache=yes"
5560else
5561eval "cv_prog_cc_flag_needed_$cache=fail"
5562#echo 'Test with flag fails too!'
5563#cat conftest.c
5564#echo "$CC $CPPFLAGS $CFLAGS -D_BSD_SOURCE -D_DEFAULT_SOURCE $ERRFLAG -c conftest.c 2>&1"
5565#echo `$CC $CPPFLAGS $CFLAGS -D_BSD_SOURCE -D_DEFAULT_SOURCE $ERRFLAG -c conftest.c 2>&1`
5566#exit 1
5567fi
5568
5569fi
5570rm -f conftest conftest.c conftest.o
5571
5572fi
5573
5574if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = yes"; then
5575{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5576$as_echo "yes" >&6; }
5577:
5578CFLAGS="$CFLAGS -D_BSD_SOURCE -D_DEFAULT_SOURCE"
5579else
5580if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = no"; then
5581{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5582$as_echo "no" >&6; }
5583#echo 'Test with flag is no!'
5584#cat conftest.c
5585#echo "$CC $CPPFLAGS $CFLAGS -D_BSD_SOURCE -D_DEFAULT_SOURCE $ERRFLAG -c conftest.c 2>&1"
5586#echo `$CC $CPPFLAGS $CFLAGS -D_BSD_SOURCE -D_DEFAULT_SOURCE $ERRFLAG -c conftest.c 2>&1`
5587#exit 1
5588:
5589
5590else
5591{ $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
5592$as_echo "failed" >&6; }
5593:
5594
5595fi
5596fi
5597
5598
5599
5600
5601
5602{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we need -D_GNU_SOURCE as a flag for $CC" >&5
5603$as_echo_n "checking whether we need -D_GNU_SOURCE as a flag for $CC... " >&6; }
5604cache=_D_GNU_SOURCE
5605if eval \${cv_prog_cc_flag_needed_$cache+:} false; then :
5606  $as_echo_n "(cached) " >&6
5607else
5608
5609echo '
5610#include <netinet/in.h>
5611
5612int test() {
5613        struct in6_pktinfo inf;
5614	int a = (int)sizeof(inf);
5615        return a;
5616}
5617' > conftest.c
5618echo 'void f(){}' >>conftest.c
5619if test -z "`$CC $CPPFLAGS $CFLAGS $ERRFLAG -c conftest.c 2>&1`"; then
5620eval "cv_prog_cc_flag_needed_$cache=no"
5621else
5622
5623if test -z "`$CC $CPPFLAGS $CFLAGS -D_GNU_SOURCE $ERRFLAG -c conftest.c 2>&1`"; then
5624eval "cv_prog_cc_flag_needed_$cache=yes"
5625else
5626eval "cv_prog_cc_flag_needed_$cache=fail"
5627#echo 'Test with flag fails too!'
5628#cat conftest.c
5629#echo "$CC $CPPFLAGS $CFLAGS -D_GNU_SOURCE $ERRFLAG -c conftest.c 2>&1"
5630#echo `$CC $CPPFLAGS $CFLAGS -D_GNU_SOURCE $ERRFLAG -c conftest.c 2>&1`
5631#exit 1
5632fi
5633
5634fi
5635rm -f conftest conftest.c conftest.o
5636
5637fi
5638
5639if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = yes"; then
5640{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5641$as_echo "yes" >&6; }
5642:
5643CFLAGS="$CFLAGS -D_GNU_SOURCE"
5644else
5645if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = no"; then
5646{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5647$as_echo "no" >&6; }
5648#echo 'Test with flag is no!'
5649#cat conftest.c
5650#echo "$CC $CPPFLAGS $CFLAGS -D_GNU_SOURCE $ERRFLAG -c conftest.c 2>&1"
5651#echo `$CC $CPPFLAGS $CFLAGS -D_GNU_SOURCE $ERRFLAG -c conftest.c 2>&1`
5652#exit 1
5653:
5654
5655else
5656{ $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
5657$as_echo "failed" >&6; }
5658:
5659
5660fi
5661fi
5662
5663
5664# check again for GNU_SOURCE for setresgid. May fail if setresgid
5665# is not available at all. -D_FRSRESGID is to make this check unique.
5666# otherwise we would get the previous cached result.
5667
5668
5669
5670{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we need -D_GNU_SOURCE -D_FRSRESGID as a flag for $CC" >&5
5671$as_echo_n "checking whether we need -D_GNU_SOURCE -D_FRSRESGID as a flag for $CC... " >&6; }
5672cache=_D_GNU_SOURCE__D_FRSRESGID
5673if eval \${cv_prog_cc_flag_needed_$cache+:} false; then :
5674  $as_echo_n "(cached) " >&6
5675else
5676
5677echo '
5678#include <unistd.h>
5679
5680int test() {
5681	int a = setresgid(0,0,0);
5682	a = setresuid(0,0,0);
5683        return a;
5684}
5685' > conftest.c
5686echo 'void f(){}' >>conftest.c
5687if test -z "`$CC $CPPFLAGS $CFLAGS $ERRFLAG -c conftest.c 2>&1`"; then
5688eval "cv_prog_cc_flag_needed_$cache=no"
5689else
5690
5691if test -z "`$CC $CPPFLAGS $CFLAGS -D_GNU_SOURCE -D_FRSRESGID $ERRFLAG -c conftest.c 2>&1`"; then
5692eval "cv_prog_cc_flag_needed_$cache=yes"
5693else
5694eval "cv_prog_cc_flag_needed_$cache=fail"
5695#echo 'Test with flag fails too!'
5696#cat conftest.c
5697#echo "$CC $CPPFLAGS $CFLAGS -D_GNU_SOURCE -D_FRSRESGID $ERRFLAG -c conftest.c 2>&1"
5698#echo `$CC $CPPFLAGS $CFLAGS -D_GNU_SOURCE -D_FRSRESGID $ERRFLAG -c conftest.c 2>&1`
5699#exit 1
5700fi
5701
5702fi
5703rm -f conftest conftest.c conftest.o
5704
5705fi
5706
5707if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = yes"; then
5708{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5709$as_echo "yes" >&6; }
5710:
5711CFLAGS="$CFLAGS -D_GNU_SOURCE"
5712else
5713if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = no"; then
5714{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5715$as_echo "no" >&6; }
5716#echo 'Test with flag is no!'
5717#cat conftest.c
5718#echo "$CC $CPPFLAGS $CFLAGS -D_GNU_SOURCE -D_FRSRESGID $ERRFLAG -c conftest.c 2>&1"
5719#echo `$CC $CPPFLAGS $CFLAGS -D_GNU_SOURCE -D_FRSRESGID $ERRFLAG -c conftest.c 2>&1`
5720#exit 1
5721:
5722
5723else
5724{ $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
5725$as_echo "failed" >&6; }
5726:
5727
5728fi
5729fi
5730
5731
5732
5733
5734
5735{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we need -D_POSIX_C_SOURCE=200112 as a flag for $CC" >&5
5736$as_echo_n "checking whether we need -D_POSIX_C_SOURCE=200112 as a flag for $CC... " >&6; }
5737cache=_D_POSIX_C_SOURCE_200112
5738if eval \${cv_prog_cc_flag_needed_$cache+:} false; then :
5739  $as_echo_n "(cached) " >&6
5740else
5741
5742echo '
5743#include "confdefs.h"
5744#ifdef HAVE_TIME_H
5745#include <time.h>
5746#endif
5747#include <netdb.h>
5748
5749int test() {
5750        int a = 0;
5751        char *t;
5752        time_t time = 0;
5753        char *buf = NULL;
5754	const char* str = NULL;
5755        t = ctime_r(&time, buf);
5756	str = gai_strerror(0);
5757	if(t && str)
5758		a = 0;
5759        return a;
5760}
5761' > conftest.c
5762echo 'void f(){}' >>conftest.c
5763if test -z "`$CC $CPPFLAGS $CFLAGS $ERRFLAG -c conftest.c 2>&1`"; then
5764eval "cv_prog_cc_flag_needed_$cache=no"
5765else
5766
5767if test -z "`$CC $CPPFLAGS $CFLAGS -D_POSIX_C_SOURCE=200112 $ERRFLAG -c conftest.c 2>&1`"; then
5768eval "cv_prog_cc_flag_needed_$cache=yes"
5769else
5770eval "cv_prog_cc_flag_needed_$cache=fail"
5771#echo 'Test with flag fails too!'
5772#cat conftest.c
5773#echo "$CC $CPPFLAGS $CFLAGS -D_POSIX_C_SOURCE=200112 $ERRFLAG -c conftest.c 2>&1"
5774#echo `$CC $CPPFLAGS $CFLAGS -D_POSIX_C_SOURCE=200112 $ERRFLAG -c conftest.c 2>&1`
5775#exit 1
5776fi
5777
5778fi
5779rm -f conftest conftest.c conftest.o
5780
5781fi
5782
5783if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = yes"; then
5784{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5785$as_echo "yes" >&6; }
5786:
5787CFLAGS="$CFLAGS -D_POSIX_C_SOURCE=200112"
5788else
5789if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = no"; then
5790{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5791$as_echo "no" >&6; }
5792#echo 'Test with flag is no!'
5793#cat conftest.c
5794#echo "$CC $CPPFLAGS $CFLAGS -D_POSIX_C_SOURCE=200112 $ERRFLAG -c conftest.c 2>&1"
5795#echo `$CC $CPPFLAGS $CFLAGS -D_POSIX_C_SOURCE=200112 $ERRFLAG -c conftest.c 2>&1`
5796#exit 1
5797:
5798
5799else
5800{ $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
5801$as_echo "failed" >&6; }
5802:
5803
5804fi
5805fi
5806
5807
5808
5809
5810
5811{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we need -D__EXTENSIONS__ as a flag for $CC" >&5
5812$as_echo_n "checking whether we need -D__EXTENSIONS__ as a flag for $CC... " >&6; }
5813cache=_D__EXTENSIONS__
5814if eval \${cv_prog_cc_flag_needed_$cache+:} false; then :
5815  $as_echo_n "(cached) " >&6
5816else
5817
5818echo '
5819#include "confdefs.h"
5820#include <stdlib.h>
5821#include <ctype.h>
5822#include <sys/time.h>
5823#ifdef HAVE_TIME_H
5824#include <time.h>
5825#endif
5826#include <unistd.h>
5827#ifdef HAVE_GETOPT_H
5828#include <getopt.h>
5829#endif
5830
5831int test() {
5832        int a;
5833        char **opts = NULL;
5834        struct timeval tv;
5835        tv.tv_usec = 10;
5836        srandom(32);
5837        a = getopt(2, opts, "a");
5838        a = isascii(32);
5839	if(tv.tv_usec)
5840		a = 0;
5841        return a;
5842}
5843' > conftest.c
5844echo 'void f(){}' >>conftest.c
5845if test -z "`$CC $CPPFLAGS $CFLAGS $ERRFLAG -c conftest.c 2>&1`"; then
5846eval "cv_prog_cc_flag_needed_$cache=no"
5847else
5848
5849if test -z "`$CC $CPPFLAGS $CFLAGS -D__EXTENSIONS__ $ERRFLAG -c conftest.c 2>&1`"; then
5850eval "cv_prog_cc_flag_needed_$cache=yes"
5851else
5852eval "cv_prog_cc_flag_needed_$cache=fail"
5853#echo 'Test with flag fails too!'
5854#cat conftest.c
5855#echo "$CC $CPPFLAGS $CFLAGS -D__EXTENSIONS__ $ERRFLAG -c conftest.c 2>&1"
5856#echo `$CC $CPPFLAGS $CFLAGS -D__EXTENSIONS__ $ERRFLAG -c conftest.c 2>&1`
5857#exit 1
5858fi
5859
5860fi
5861rm -f conftest conftest.c conftest.o
5862
5863fi
5864
5865if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = yes"; then
5866{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5867$as_echo "yes" >&6; }
5868:
5869CFLAGS="$CFLAGS -D__EXTENSIONS__"
5870else
5871if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = no"; then
5872{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5873$as_echo "no" >&6; }
5874#echo 'Test with flag is no!'
5875#cat conftest.c
5876#echo "$CC $CPPFLAGS $CFLAGS -D__EXTENSIONS__ $ERRFLAG -c conftest.c 2>&1"
5877#echo `$CC $CPPFLAGS $CFLAGS -D__EXTENSIONS__ $ERRFLAG -c conftest.c 2>&1`
5878#exit 1
5879:
5880
5881else
5882{ $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
5883$as_echo "failed" >&6; }
5884:
5885
5886fi
5887fi
5888
5889
5890
5891
5892# debug mode flags warnings
5893# Check whether --enable-checking was given.
5894if test "${enable_checking+set}" = set; then :
5895  enableval=$enable_checking;
5896fi
5897
5898# Check whether --enable-debug was given.
5899if test "${enable_debug+set}" = set; then :
5900  enableval=$enable_debug;
5901fi
5902
5903if test "$enable_debug" = "yes"; then debug_enabled="$enable_debug";
5904else debug_enabled="$enable_checking"; fi
5905
5906case "$debug_enabled" in
5907        yes)
5908
5909
5910{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -W" >&5
5911$as_echo_n "checking whether $CC supports -W... " >&6; }
5912cache=`echo W | sed 'y%.=/+-%___p_%'`
5913if eval \${cv_prog_cc_flag_$cache+:} false; then :
5914  $as_echo_n "(cached) " >&6
5915else
5916
5917echo 'void f(void){}' >conftest.c
5918if test -z "`$CC $CPPFLAGS $CFLAGS -W -c conftest.c 2>&1`"; then
5919eval "cv_prog_cc_flag_$cache=yes"
5920else
5921eval "cv_prog_cc_flag_$cache=no"
5922fi
5923rm -f conftest conftest.o conftest.c
5924
5925fi
5926
5927if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
5928{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5929$as_echo "yes" >&6; }
5930:
5931CFLAGS="$CFLAGS -W"
5932else
5933{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5934$as_echo "no" >&6; }
5935:
5936
5937fi
5938
5939
5940
5941{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wall" >&5
5942$as_echo_n "checking whether $CC supports -Wall... " >&6; }
5943cache=`echo Wall | sed 'y%.=/+-%___p_%'`
5944if eval \${cv_prog_cc_flag_$cache+:} false; then :
5945  $as_echo_n "(cached) " >&6
5946else
5947
5948echo 'void f(void){}' >conftest.c
5949if test -z "`$CC $CPPFLAGS $CFLAGS -Wall -c conftest.c 2>&1`"; then
5950eval "cv_prog_cc_flag_$cache=yes"
5951else
5952eval "cv_prog_cc_flag_$cache=no"
5953fi
5954rm -f conftest conftest.o conftest.c
5955
5956fi
5957
5958if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
5959{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5960$as_echo "yes" >&6; }
5961:
5962CFLAGS="$CFLAGS -Wall"
5963else
5964{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5965$as_echo "no" >&6; }
5966:
5967
5968fi
5969
5970
5971
5972{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wextra" >&5
5973$as_echo_n "checking whether $CC supports -Wextra... " >&6; }
5974cache=`echo Wextra | sed 'y%.=/+-%___p_%'`
5975if eval \${cv_prog_cc_flag_$cache+:} false; then :
5976  $as_echo_n "(cached) " >&6
5977else
5978
5979echo 'void f(void){}' >conftest.c
5980if test -z "`$CC $CPPFLAGS $CFLAGS -Wextra -c conftest.c 2>&1`"; then
5981eval "cv_prog_cc_flag_$cache=yes"
5982else
5983eval "cv_prog_cc_flag_$cache=no"
5984fi
5985rm -f conftest conftest.o conftest.c
5986
5987fi
5988
5989if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
5990{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5991$as_echo "yes" >&6; }
5992:
5993CFLAGS="$CFLAGS -Wextra"
5994else
5995{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5996$as_echo "no" >&6; }
5997:
5998
5999fi
6000
6001
6002
6003{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wdeclaration-after-statement" >&5
6004$as_echo_n "checking whether $CC supports -Wdeclaration-after-statement... " >&6; }
6005cache=`echo Wdeclaration-after-statement | sed 'y%.=/+-%___p_%'`
6006if eval \${cv_prog_cc_flag_$cache+:} false; then :
6007  $as_echo_n "(cached) " >&6
6008else
6009
6010echo 'void f(void){}' >conftest.c
6011if test -z "`$CC $CPPFLAGS $CFLAGS -Wdeclaration-after-statement -c conftest.c 2>&1`"; then
6012eval "cv_prog_cc_flag_$cache=yes"
6013else
6014eval "cv_prog_cc_flag_$cache=no"
6015fi
6016rm -f conftest conftest.o conftest.c
6017
6018fi
6019
6020if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
6021{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6022$as_echo "yes" >&6; }
6023:
6024CFLAGS="$CFLAGS -Wdeclaration-after-statement"
6025else
6026{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6027$as_echo "no" >&6; }
6028:
6029
6030fi
6031
6032
6033$as_echo "#define UNBOUND_DEBUG /**/" >>confdefs.h
6034
6035		;;
6036	no|*)
6037		# nothing to do.
6038		;;
6039esac
6040if test "$default_cflags" = "yes"; then
6041	# only when CFLAGS was "" at the start, if the users wants to
6042	# override we shouldn't add default cflags, because they wouldn't
6043	# be able to turn off these options and set the CFLAGS wanted.
6044
6045    # Check whether --enable-flto was given.
6046if test "${enable_flto+set}" = set; then :
6047  enableval=$enable_flto;
6048fi
6049
6050    if test "x$enable_flto" != "xno"; then :
6051
6052        { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -flto" >&5
6053$as_echo_n "checking if $CC supports -flto... " >&6; }
6054        BAKCFLAGS="$CFLAGS"
6055        CFLAGS="$CFLAGS -flto"
6056        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6057/* end confdefs.h.  */
6058
6059int
6060main ()
6061{
6062
6063  ;
6064  return 0;
6065}
6066_ACEOF
6067if ac_fn_c_try_link "$LINENO"; then :
6068
6069            if $CC $CFLAGS -o conftest conftest.c 2>&1 | $GREP -e "warning: no debug symbols in executable" -e "warning: object" >/dev/null; then
6070                CFLAGS="$BAKCFLAGS"
6071                { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6072$as_echo "no" >&6; }
6073            else
6074                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6075$as_echo "yes" >&6; }
6076            fi
6077            rm -f conftest conftest.c conftest.o
6078
6079else
6080  CFLAGS="$BAKCFLAGS" ; { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6081$as_echo "no" >&6; }
6082fi
6083rm -f core conftest.err conftest.$ac_objext \
6084    conftest$ac_exeext conftest.$ac_ext
6085
6086fi
6087
6088
6089    # Check whether --enable-pie was given.
6090if test "${enable_pie+set}" = set; then :
6091  enableval=$enable_pie;
6092fi
6093
6094    if test "x$enable_pie" = "xyes"; then :
6095
6096	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports PIE" >&5
6097$as_echo_n "checking if $CC supports PIE... " >&6; }
6098	BAKLDFLAGS="$LDFLAGS"
6099	BAKCFLAGS="$CFLAGS"
6100	LDFLAGS="$LDFLAGS -pie"
6101	CFLAGS="$CFLAGS -fPIE"
6102	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6103/* end confdefs.h.  */
6104
6105int
6106main ()
6107{
6108
6109  ;
6110  return 0;
6111}
6112_ACEOF
6113if ac_fn_c_try_link "$LINENO"; then :
6114
6115	    if $CC $CFLAGS $LDFLAGS -o conftest conftest.c 2>&1 | grep "warning: no debug symbols in executable" >/dev/null; then
6116		LDFLAGS="$BAKLDFLAGS"
6117		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6118$as_echo "no" >&6; }
6119	    else
6120		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6121$as_echo "yes" >&6; }
6122	    fi
6123	    rm -f conftest conftest.c conftest.o
6124
6125else
6126  LDFLAGS="$BAKLDFLAGS" ; CFLAGS="$BAKCFLAGS" ; { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6127$as_echo "no" >&6; }
6128fi
6129rm -f core conftest.err conftest.$ac_objext \
6130    conftest$ac_exeext conftest.$ac_ext
6131
6132fi
6133
6134
6135    # Check whether --enable-relro_now was given.
6136if test "${enable_relro_now+set}" = set; then :
6137  enableval=$enable_relro_now;
6138fi
6139
6140    if test "x$enable_relro_now" = "xyes"; then :
6141
6142	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wl,-z,relro,-z,now" >&5
6143$as_echo_n "checking if $CC supports -Wl,-z,relro,-z,now... " >&6; }
6144	BAKLDFLAGS="$LDFLAGS"
6145	LDFLAGS="$LDFLAGS -Wl,-z,relro,-z,now"
6146	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6147/* end confdefs.h.  */
6148
6149int
6150main ()
6151{
6152
6153  ;
6154  return 0;
6155}
6156_ACEOF
6157if ac_fn_c_try_link "$LINENO"; then :
6158
6159	    if $CC $CFLAGS $LDFLAGS -o conftest conftest.c 2>&1 | grep "warning: no debug symbols in executable" >/dev/null; then
6160		LDFLAGS="$BAKLDFLAGS"
6161		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6162$as_echo "no" >&6; }
6163	    else
6164		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6165$as_echo "yes" >&6; }
6166	    fi
6167	    rm -f conftest conftest.c conftest.o
6168
6169else
6170  LDFLAGS="$BAKLDFLAGS" ; { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6171$as_echo "no" >&6; }
6172fi
6173rm -f core conftest.err conftest.$ac_objext \
6174    conftest$ac_exeext conftest.$ac_ext
6175
6176fi
6177
6178fi
6179
6180{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
6181$as_echo_n "checking for inline... " >&6; }
6182if ${ac_cv_c_inline+:} false; then :
6183  $as_echo_n "(cached) " >&6
6184else
6185  ac_cv_c_inline=no
6186for ac_kw in inline __inline__ __inline; do
6187  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6188/* end confdefs.h.  */
6189#ifndef __cplusplus
6190typedef int foo_t;
6191static $ac_kw foo_t static_foo () {return 0; }
6192$ac_kw foo_t foo () {return 0; }
6193#endif
6194
6195_ACEOF
6196if ac_fn_c_try_compile "$LINENO"; then :
6197  ac_cv_c_inline=$ac_kw
6198fi
6199rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6200  test "$ac_cv_c_inline" != no && break
6201done
6202
6203fi
6204{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
6205$as_echo "$ac_cv_c_inline" >&6; }
6206
6207case $ac_cv_c_inline in
6208  inline | yes) ;;
6209  *)
6210    case $ac_cv_c_inline in
6211      no) ac_val=;;
6212      *) ac_val=$ac_cv_c_inline;;
6213    esac
6214    cat >>confdefs.h <<_ACEOF
6215#ifndef __cplusplus
6216#define inline $ac_val
6217#endif
6218_ACEOF
6219    ;;
6220esac
6221
6222
6223{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler (${CC-cc}) accepts the \"format\" attribute" >&5
6224$as_echo_n "checking whether the C compiler (${CC-cc}) accepts the \"format\" attribute... " >&6; }
6225if ${ac_cv_c_format_attribute+:} false; then :
6226  $as_echo_n "(cached) " >&6
6227else
6228  ac_cv_c_format_attribute=no
6229cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6230/* end confdefs.h.  */
6231#include <stdio.h>
6232void f (char *format, ...) __attribute__ ((format (printf, 1, 2)));
6233void (*pf) (char *format, ...) __attribute__ ((format (printf, 1, 2)));
6234
6235int
6236main ()
6237{
6238
6239   f ("%s", "str");
6240
6241  ;
6242  return 0;
6243}
6244_ACEOF
6245if ac_fn_c_try_compile "$LINENO"; then :
6246  ac_cv_c_format_attribute="yes"
6247else
6248  ac_cv_c_format_attribute="no"
6249fi
6250rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6251
6252fi
6253
6254
6255{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_format_attribute" >&5
6256$as_echo "$ac_cv_c_format_attribute" >&6; }
6257if test $ac_cv_c_format_attribute = yes; then
6258
6259$as_echo "#define HAVE_ATTR_FORMAT 1" >>confdefs.h
6260
6261fi
6262
6263
6264{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler (${CC-cc}) accepts the \"unused\" attribute" >&5
6265$as_echo_n "checking whether the C compiler (${CC-cc}) accepts the \"unused\" attribute... " >&6; }
6266if ${ac_cv_c_unused_attribute+:} false; then :
6267  $as_echo_n "(cached) " >&6
6268else
6269  ac_cv_c_unused_attribute=no
6270cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6271/* end confdefs.h.  */
6272#include <stdio.h>
6273void f (char *u __attribute__((unused)));
6274
6275int
6276main ()
6277{
6278
6279   f ("x");
6280
6281  ;
6282  return 0;
6283}
6284_ACEOF
6285if ac_fn_c_try_compile "$LINENO"; then :
6286  ac_cv_c_unused_attribute="yes"
6287else
6288  ac_cv_c_unused_attribute="no"
6289fi
6290rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6291
6292fi
6293
6294
6295
6296
6297{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_unused_attribute" >&5
6298$as_echo "$ac_cv_c_unused_attribute" >&6; }
6299if test $ac_cv_c_unused_attribute = yes; then
6300
6301$as_echo "#define HAVE_ATTR_UNUSED 1" >>confdefs.h
6302
6303fi
6304
6305
6306
6307
6308{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler (${CC-cc}) accepts the \"weak\" attribute" >&5
6309$as_echo_n "checking whether the C compiler (${CC-cc}) accepts the \"weak\" attribute... " >&6; }
6310if ${ac_cv_c_weak_attribute+:} false; then :
6311  $as_echo_n "(cached) " >&6
6312else
6313  ac_cv_c_weak_attribute=no
6314cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6315/* end confdefs.h.  */
6316 #include <stdio.h>
6317__attribute__((weak)) void f(int x) { printf("%d", x); }
6318
6319int
6320main ()
6321{
6322
6323   f(1);
6324
6325  ;
6326  return 0;
6327}
6328_ACEOF
6329if ac_fn_c_try_compile "$LINENO"; then :
6330  ac_cv_c_weak_attribute="yes"
6331else
6332  ac_cv_c_weak_attribute="no"
6333fi
6334rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6335
6336fi
6337
6338
6339{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_weak_attribute" >&5
6340$as_echo "$ac_cv_c_weak_attribute" >&6; }
6341if test $ac_cv_c_weak_attribute = yes; then
6342
6343$as_echo "#define HAVE_ATTR_WEAK 1" >>confdefs.h
6344
6345
6346$as_echo "#define ATTR_WEAK __attribute__((weak))" >>confdefs.h
6347
6348fi
6349
6350
6351
6352
6353{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler (${CC-cc}) accepts the \"noreturn\" attribute" >&5
6354$as_echo_n "checking whether the C compiler (${CC-cc}) accepts the \"noreturn\" attribute... " >&6; }
6355if ${ac_cv_c_noreturn_attribute+:} false; then :
6356  $as_echo_n "(cached) " >&6
6357else
6358  ac_cv_c_noreturn_attribute=no
6359cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6360/* end confdefs.h.  */
6361 #include <stdio.h>
6362__attribute__((noreturn)) void f(int x) { printf("%d", x); }
6363
6364int
6365main ()
6366{
6367
6368   f(1);
6369
6370  ;
6371  return 0;
6372}
6373_ACEOF
6374if ac_fn_c_try_compile "$LINENO"; then :
6375  ac_cv_c_noreturn_attribute="yes"
6376else
6377  ac_cv_c_noreturn_attribute="no"
6378fi
6379rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6380
6381fi
6382
6383
6384{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_noreturn_attribute" >&5
6385$as_echo "$ac_cv_c_noreturn_attribute" >&6; }
6386if test $ac_cv_c_noreturn_attribute = yes; then
6387
6388$as_echo "#define HAVE_ATTR_NORETURN 1" >>confdefs.h
6389
6390
6391$as_echo "#define ATTR_NORETURN __attribute__((__noreturn__))" >>confdefs.h
6392
6393fi
6394
6395
6396if test "$srcdir" != "."; then
6397	CPPFLAGS="$CPPFLAGS -I$srcdir"
6398fi
6399
6400
6401
6402
6403
6404for ac_prog in flex lex
6405do
6406  # Extract the first word of "$ac_prog", so it can be a program name with args.
6407set dummy $ac_prog; ac_word=$2
6408{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6409$as_echo_n "checking for $ac_word... " >&6; }
6410if ${ac_cv_prog_LEX+:} false; then :
6411  $as_echo_n "(cached) " >&6
6412else
6413  if test -n "$LEX"; then
6414  ac_cv_prog_LEX="$LEX" # Let the user override the test.
6415else
6416as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6417for as_dir in $PATH
6418do
6419  IFS=$as_save_IFS
6420  test -z "$as_dir" && as_dir=.
6421    for ac_exec_ext in '' $ac_executable_extensions; do
6422  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6423    ac_cv_prog_LEX="$ac_prog"
6424    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6425    break 2
6426  fi
6427done
6428  done
6429IFS=$as_save_IFS
6430
6431fi
6432fi
6433LEX=$ac_cv_prog_LEX
6434if test -n "$LEX"; then
6435  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LEX" >&5
6436$as_echo "$LEX" >&6; }
6437else
6438  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6439$as_echo "no" >&6; }
6440fi
6441
6442
6443  test -n "$LEX" && break
6444done
6445test -n "$LEX" || LEX=":"
6446
6447if test "x$LEX" != "x:"; then
6448  cat >conftest.l <<_ACEOF
6449%%
6450a { ECHO; }
6451b { REJECT; }
6452c { yymore (); }
6453d { yyless (1); }
6454e { /* IRIX 6.5 flex 2.5.4 underquotes its yyless argument.  */
6455    yyless ((input () != 0)); }
6456f { unput (yytext[0]); }
6457. { BEGIN INITIAL; }
6458%%
6459#ifdef YYTEXT_POINTER
6460extern char *yytext;
6461#endif
6462int
6463main (void)
6464{
6465  return ! yylex () + ! yywrap ();
6466}
6467_ACEOF
6468{ { ac_try="$LEX conftest.l"
6469case "(($ac_try" in
6470  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6471  *) ac_try_echo=$ac_try;;
6472esac
6473eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
6474$as_echo "$ac_try_echo"; } >&5
6475  (eval "$LEX conftest.l") 2>&5
6476  ac_status=$?
6477  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
6478  test $ac_status = 0; }
6479{ $as_echo "$as_me:${as_lineno-$LINENO}: checking lex output file root" >&5
6480$as_echo_n "checking lex output file root... " >&6; }
6481if ${ac_cv_prog_lex_root+:} false; then :
6482  $as_echo_n "(cached) " >&6
6483else
6484
6485if test -f lex.yy.c; then
6486  ac_cv_prog_lex_root=lex.yy
6487elif test -f lexyy.c; then
6488  ac_cv_prog_lex_root=lexyy
6489else
6490  as_fn_error $? "cannot find output from $LEX; giving up" "$LINENO" 5
6491fi
6492fi
6493{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_lex_root" >&5
6494$as_echo "$ac_cv_prog_lex_root" >&6; }
6495LEX_OUTPUT_ROOT=$ac_cv_prog_lex_root
6496
6497if test -z "${LEXLIB+set}"; then
6498  { $as_echo "$as_me:${as_lineno-$LINENO}: checking lex library" >&5
6499$as_echo_n "checking lex library... " >&6; }
6500if ${ac_cv_lib_lex+:} false; then :
6501  $as_echo_n "(cached) " >&6
6502else
6503
6504    ac_save_LIBS=$LIBS
6505    ac_cv_lib_lex='none needed'
6506    for ac_lib in '' -lfl -ll; do
6507      LIBS="$ac_lib $ac_save_LIBS"
6508      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6509/* end confdefs.h.  */
6510`cat $LEX_OUTPUT_ROOT.c`
6511_ACEOF
6512if ac_fn_c_try_link "$LINENO"; then :
6513  ac_cv_lib_lex=$ac_lib
6514fi
6515rm -f core conftest.err conftest.$ac_objext \
6516    conftest$ac_exeext conftest.$ac_ext
6517      test "$ac_cv_lib_lex" != 'none needed' && break
6518    done
6519    LIBS=$ac_save_LIBS
6520
6521fi
6522{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_lex" >&5
6523$as_echo "$ac_cv_lib_lex" >&6; }
6524  test "$ac_cv_lib_lex" != 'none needed' && LEXLIB=$ac_cv_lib_lex
6525fi
6526
6527
6528{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether yytext is a pointer" >&5
6529$as_echo_n "checking whether yytext is a pointer... " >&6; }
6530if ${ac_cv_prog_lex_yytext_pointer+:} false; then :
6531  $as_echo_n "(cached) " >&6
6532else
6533  # POSIX says lex can declare yytext either as a pointer or an array; the
6534# default is implementation-dependent.  Figure out which it is, since
6535# not all implementations provide the %pointer and %array declarations.
6536ac_cv_prog_lex_yytext_pointer=no
6537ac_save_LIBS=$LIBS
6538LIBS="$LEXLIB $ac_save_LIBS"
6539cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6540/* end confdefs.h.  */
6541
6542  #define YYTEXT_POINTER 1
6543`cat $LEX_OUTPUT_ROOT.c`
6544_ACEOF
6545if ac_fn_c_try_link "$LINENO"; then :
6546  ac_cv_prog_lex_yytext_pointer=yes
6547fi
6548rm -f core conftest.err conftest.$ac_objext \
6549    conftest$ac_exeext conftest.$ac_ext
6550LIBS=$ac_save_LIBS
6551
6552fi
6553{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_lex_yytext_pointer" >&5
6554$as_echo "$ac_cv_prog_lex_yytext_pointer" >&6; }
6555if test $ac_cv_prog_lex_yytext_pointer = yes; then
6556
6557$as_echo "#define YYTEXT_POINTER 1" >>confdefs.h
6558
6559fi
6560rm -f conftest.l $LEX_OUTPUT_ROOT.c
6561
6562fi
6563if test "$LEX" != "" -a "$LEX" != ":"; then
6564
6565	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for yylex_destroy" >&5
6566$as_echo_n "checking for yylex_destroy... " >&6; }
6567	if echo %% | $LEX -t 2>&1 | grep yylex_destroy >/dev/null 2>&1; then
6568
6569$as_echo "#define LEX_HAS_YYLEX_DESTROY 1" >>confdefs.h
6570
6571		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6572$as_echo "yes" >&6; }
6573	else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6574$as_echo "no" >&6; };
6575		LEX=":"
6576	fi
6577
6578fi
6579if test "$LEX" != "" -a "$LEX" != ":"; then
6580
6581	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lex %option" >&5
6582$as_echo_n "checking for lex %option... " >&6; }
6583	if cat <<EOF | $LEX -t 2>&1 | grep yy_delete_buffer >/dev/null 2>&1; then
6584%option nounput
6585%%
6586EOF
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
6595for ac_prog in 'bison -y' byacc
6596do
6597  # Extract the first word of "$ac_prog", so it can be a program name with args.
6598set dummy $ac_prog; ac_word=$2
6599{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6600$as_echo_n "checking for $ac_word... " >&6; }
6601if ${ac_cv_prog_YACC+:} false; then :
6602  $as_echo_n "(cached) " >&6
6603else
6604  if test -n "$YACC"; then
6605  ac_cv_prog_YACC="$YACC" # Let the user override the test.
6606else
6607as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6608for as_dir in $PATH
6609do
6610  IFS=$as_save_IFS
6611  test -z "$as_dir" && as_dir=.
6612    for ac_exec_ext in '' $ac_executable_extensions; do
6613  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6614    ac_cv_prog_YACC="$ac_prog"
6615    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6616    break 2
6617  fi
6618done
6619  done
6620IFS=$as_save_IFS
6621
6622fi
6623fi
6624YACC=$ac_cv_prog_YACC
6625if test -n "$YACC"; then
6626  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $YACC" >&5
6627$as_echo "$YACC" >&6; }
6628else
6629  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6630$as_echo "no" >&6; }
6631fi
6632
6633
6634  test -n "$YACC" && break
6635done
6636test -n "$YACC" || YACC="yacc"
6637
6638# Extract the first word of "doxygen", so it can be a program name with args.
6639set dummy doxygen; ac_word=$2
6640{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6641$as_echo_n "checking for $ac_word... " >&6; }
6642if ${ac_cv_prog_doxygen+:} false; then :
6643  $as_echo_n "(cached) " >&6
6644else
6645  if test -n "$doxygen"; then
6646  ac_cv_prog_doxygen="$doxygen" # Let the user override the test.
6647else
6648as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6649for as_dir in $PATH
6650do
6651  IFS=$as_save_IFS
6652  test -z "$as_dir" && as_dir=.
6653    for ac_exec_ext in '' $ac_executable_extensions; do
6654  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6655    ac_cv_prog_doxygen="doxygen"
6656    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6657    break 2
6658  fi
6659done
6660  done
6661IFS=$as_save_IFS
6662
6663fi
6664fi
6665doxygen=$ac_cv_prog_doxygen
6666if test -n "$doxygen"; then
6667  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $doxygen" >&5
6668$as_echo "$doxygen" >&6; }
6669else
6670  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6671$as_echo "no" >&6; }
6672fi
6673
6674
6675if test -n "$ac_tool_prefix"; then
6676  # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
6677set dummy ${ac_tool_prefix}strip; ac_word=$2
6678{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6679$as_echo_n "checking for $ac_word... " >&6; }
6680if ${ac_cv_prog_STRIP+:} false; then :
6681  $as_echo_n "(cached) " >&6
6682else
6683  if test -n "$STRIP"; then
6684  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
6685else
6686as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6687for as_dir in $PATH
6688do
6689  IFS=$as_save_IFS
6690  test -z "$as_dir" && as_dir=.
6691    for ac_exec_ext in '' $ac_executable_extensions; do
6692  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6693    ac_cv_prog_STRIP="${ac_tool_prefix}strip"
6694    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6695    break 2
6696  fi
6697done
6698  done
6699IFS=$as_save_IFS
6700
6701fi
6702fi
6703STRIP=$ac_cv_prog_STRIP
6704if test -n "$STRIP"; then
6705  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
6706$as_echo "$STRIP" >&6; }
6707else
6708  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6709$as_echo "no" >&6; }
6710fi
6711
6712
6713fi
6714if test -z "$ac_cv_prog_STRIP"; then
6715  ac_ct_STRIP=$STRIP
6716  # Extract the first word of "strip", so it can be a program name with args.
6717set dummy strip; ac_word=$2
6718{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6719$as_echo_n "checking for $ac_word... " >&6; }
6720if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
6721  $as_echo_n "(cached) " >&6
6722else
6723  if test -n "$ac_ct_STRIP"; then
6724  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
6725else
6726as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6727for as_dir in $PATH
6728do
6729  IFS=$as_save_IFS
6730  test -z "$as_dir" && as_dir=.
6731    for ac_exec_ext in '' $ac_executable_extensions; do
6732  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6733    ac_cv_prog_ac_ct_STRIP="strip"
6734    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6735    break 2
6736  fi
6737done
6738  done
6739IFS=$as_save_IFS
6740
6741fi
6742fi
6743ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
6744if test -n "$ac_ct_STRIP"; then
6745  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
6746$as_echo "$ac_ct_STRIP" >&6; }
6747else
6748  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6749$as_echo "no" >&6; }
6750fi
6751
6752  if test "x$ac_ct_STRIP" = x; then
6753    STRIP=""
6754  else
6755    case $cross_compiling:$ac_tool_warned in
6756yes:)
6757{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6758$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6759ac_tool_warned=yes ;;
6760esac
6761    STRIP=$ac_ct_STRIP
6762  fi
6763else
6764  STRIP="$ac_cv_prog_STRIP"
6765fi
6766
6767ac_aux_dir=
6768for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
6769  if test -f "$ac_dir/install-sh"; then
6770    ac_aux_dir=$ac_dir
6771    ac_install_sh="$ac_aux_dir/install-sh -c"
6772    break
6773  elif test -f "$ac_dir/install.sh"; then
6774    ac_aux_dir=$ac_dir
6775    ac_install_sh="$ac_aux_dir/install.sh -c"
6776    break
6777  elif test -f "$ac_dir/shtool"; then
6778    ac_aux_dir=$ac_dir
6779    ac_install_sh="$ac_aux_dir/shtool install -c"
6780    break
6781  fi
6782done
6783if test -z "$ac_aux_dir"; then
6784  as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
6785fi
6786
6787# These three variables are undocumented and unsupported,
6788# and are intended to be withdrawn in a future Autoconf release.
6789# They can cause serious problems if a builder's source tree is in a directory
6790# whose full name contains unusual characters.
6791ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
6792ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
6793ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
6794
6795
6796# Make sure we can run config.sub.
6797$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
6798  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
6799
6800{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
6801$as_echo_n "checking build system type... " >&6; }
6802if ${ac_cv_build+:} false; then :
6803  $as_echo_n "(cached) " >&6
6804else
6805  ac_build_alias=$build_alias
6806test "x$ac_build_alias" = x &&
6807  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
6808test "x$ac_build_alias" = x &&
6809  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
6810ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
6811  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
6812
6813fi
6814{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
6815$as_echo "$ac_cv_build" >&6; }
6816case $ac_cv_build in
6817*-*-*) ;;
6818*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
6819esac
6820build=$ac_cv_build
6821ac_save_IFS=$IFS; IFS='-'
6822set x $ac_cv_build
6823shift
6824build_cpu=$1
6825build_vendor=$2
6826shift; shift
6827# Remember, the first character of IFS is used to create $*,
6828# except with old shells:
6829build_os=$*
6830IFS=$ac_save_IFS
6831case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
6832
6833
6834{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
6835$as_echo_n "checking host system type... " >&6; }
6836if ${ac_cv_host+:} false; then :
6837  $as_echo_n "(cached) " >&6
6838else
6839  if test "x$host_alias" = x; then
6840  ac_cv_host=$ac_cv_build
6841else
6842  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
6843    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
6844fi
6845
6846fi
6847{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
6848$as_echo "$ac_cv_host" >&6; }
6849case $ac_cv_host in
6850*-*-*) ;;
6851*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
6852esac
6853host=$ac_cv_host
6854ac_save_IFS=$IFS; IFS='-'
6855set x $ac_cv_host
6856shift
6857host_cpu=$1
6858host_vendor=$2
6859shift; shift
6860# Remember, the first character of IFS is used to create $*,
6861# except with old shells:
6862host_os=$*
6863IFS=$ac_save_IFS
6864case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
6865
6866
6867
6868# skip these tests, we do not need them.
6869
6870
6871
6872
6873
6874
6875
6876
6877# always use ./libtool unless override from commandline (libtool=mylibtool)
6878if test -z "$libtool"; then
6879	libtool="./libtool"
6880fi
6881
6882# avoid libtool max commandline length test on systems that fork slowly.
6883
6884if echo "$host_os" | grep "sunos4" >/dev/null; then
6885	lt_cv_sys_max_cmd_len=32750;
6886fi
6887if test -n "$ac_tool_prefix"; then
6888  # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
6889set dummy ${ac_tool_prefix}ar; ac_word=$2
6890{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6891$as_echo_n "checking for $ac_word... " >&6; }
6892if ${ac_cv_path_AR+:} false; then :
6893  $as_echo_n "(cached) " >&6
6894else
6895  case $AR in
6896  [\\/]* | ?:[\\/]*)
6897  ac_cv_path_AR="$AR" # Let the user override the test with a path.
6898  ;;
6899  *)
6900  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6901for as_dir in $PATH
6902do
6903  IFS=$as_save_IFS
6904  test -z "$as_dir" && as_dir=.
6905    for ac_exec_ext in '' $ac_executable_extensions; do
6906  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6907    ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
6908    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6909    break 2
6910  fi
6911done
6912  done
6913IFS=$as_save_IFS
6914
6915  ;;
6916esac
6917fi
6918AR=$ac_cv_path_AR
6919if test -n "$AR"; then
6920  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
6921$as_echo "$AR" >&6; }
6922else
6923  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6924$as_echo "no" >&6; }
6925fi
6926
6927
6928fi
6929if test -z "$ac_cv_path_AR"; then
6930  ac_pt_AR=$AR
6931  # Extract the first word of "ar", so it can be a program name with args.
6932set dummy ar; ac_word=$2
6933{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6934$as_echo_n "checking for $ac_word... " >&6; }
6935if ${ac_cv_path_ac_pt_AR+:} false; then :
6936  $as_echo_n "(cached) " >&6
6937else
6938  case $ac_pt_AR in
6939  [\\/]* | ?:[\\/]*)
6940  ac_cv_path_ac_pt_AR="$ac_pt_AR" # Let the user override the test with a path.
6941  ;;
6942  *)
6943  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6944for as_dir in $PATH
6945do
6946  IFS=$as_save_IFS
6947  test -z "$as_dir" && as_dir=.
6948    for ac_exec_ext in '' $ac_executable_extensions; do
6949  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6950    ac_cv_path_ac_pt_AR="$as_dir/$ac_word$ac_exec_ext"
6951    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6952    break 2
6953  fi
6954done
6955  done
6956IFS=$as_save_IFS
6957
6958  ;;
6959esac
6960fi
6961ac_pt_AR=$ac_cv_path_ac_pt_AR
6962if test -n "$ac_pt_AR"; then
6963  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_AR" >&5
6964$as_echo "$ac_pt_AR" >&6; }
6965else
6966  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6967$as_echo "no" >&6; }
6968fi
6969
6970  if test "x$ac_pt_AR" = x; then
6971    AR="false"
6972  else
6973    case $cross_compiling:$ac_tool_warned in
6974yes:)
6975{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6976$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6977ac_tool_warned=yes ;;
6978esac
6979    AR=$ac_pt_AR
6980  fi
6981else
6982  AR="$ac_cv_path_AR"
6983fi
6984
6985if test $AR = false; then
6986	as_fn_error $? "Cannot find 'ar', please extend PATH to include it" "$LINENO" 5
6987fi
6988
6989case `pwd` in
6990  *\ * | *\	*)
6991    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5
6992$as_echo "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;;
6993esac
6994
6995
6996
6997macro_version='2.4.6'
6998macro_revision='2.4.6'
6999
7000
7001
7002
7003
7004
7005
7006
7007
7008
7009
7010
7011
7012ltmain=$ac_aux_dir/ltmain.sh
7013
7014# Backslashify metacharacters that are still active within
7015# double-quoted strings.
7016sed_quote_subst='s/\(["`$\\]\)/\\\1/g'
7017
7018# Same as above, but do not quote variable references.
7019double_quote_subst='s/\(["`\\]\)/\\\1/g'
7020
7021# Sed substitution to delay expansion of an escaped shell variable in a
7022# double_quote_subst'ed string.
7023delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
7024
7025# Sed substitution to delay expansion of an escaped single quote.
7026delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
7027
7028# Sed substitution to avoid accidental globbing in evaled expressions
7029no_glob_subst='s/\*/\\\*/g'
7030
7031ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
7032ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
7033ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
7034
7035{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5
7036$as_echo_n "checking how to print strings... " >&6; }
7037# Test print first, because it will be a builtin if present.
7038if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \
7039   test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
7040  ECHO='print -r --'
7041elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
7042  ECHO='printf %s\n'
7043else
7044  # Use this function as a fallback that always works.
7045  func_fallback_echo ()
7046  {
7047    eval 'cat <<_LTECHO_EOF
7048$1
7049_LTECHO_EOF'
7050  }
7051  ECHO='func_fallback_echo'
7052fi
7053
7054# func_echo_all arg...
7055# Invoke $ECHO with all args, space-separated.
7056func_echo_all ()
7057{
7058    $ECHO ""
7059}
7060
7061case $ECHO in
7062  printf*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: printf" >&5
7063$as_echo "printf" >&6; } ;;
7064  print*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: print -r" >&5
7065$as_echo "print -r" >&6; } ;;
7066  *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: cat" >&5
7067$as_echo "cat" >&6; } ;;
7068esac
7069
7070
7071
7072
7073
7074
7075
7076
7077
7078
7079
7080
7081
7082
7083{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
7084$as_echo_n "checking for a sed that does not truncate output... " >&6; }
7085if ${ac_cv_path_SED+:} false; then :
7086  $as_echo_n "(cached) " >&6
7087else
7088            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
7089     for ac_i in 1 2 3 4 5 6 7; do
7090       ac_script="$ac_script$as_nl$ac_script"
7091     done
7092     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
7093     { ac_script=; unset ac_script;}
7094     if test -z "$SED"; then
7095  ac_path_SED_found=false
7096  # Loop through the user's path and test for each of PROGNAME-LIST
7097  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7098for as_dir in $PATH
7099do
7100  IFS=$as_save_IFS
7101  test -z "$as_dir" && as_dir=.
7102    for ac_prog in sed gsed; do
7103    for ac_exec_ext in '' $ac_executable_extensions; do
7104      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
7105      as_fn_executable_p "$ac_path_SED" || continue
7106# Check for GNU ac_path_SED and select it if it is found.
7107  # Check for GNU $ac_path_SED
7108case `"$ac_path_SED" --version 2>&1` in
7109*GNU*)
7110  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
7111*)
7112  ac_count=0
7113  $as_echo_n 0123456789 >"conftest.in"
7114  while :
7115  do
7116    cat "conftest.in" "conftest.in" >"conftest.tmp"
7117    mv "conftest.tmp" "conftest.in"
7118    cp "conftest.in" "conftest.nl"
7119    $as_echo '' >> "conftest.nl"
7120    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
7121    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
7122    as_fn_arith $ac_count + 1 && ac_count=$as_val
7123    if test $ac_count -gt ${ac_path_SED_max-0}; then
7124      # Best one so far, save it but keep looking for a better one
7125      ac_cv_path_SED="$ac_path_SED"
7126      ac_path_SED_max=$ac_count
7127    fi
7128    # 10*(2^10) chars as input seems more than enough
7129    test $ac_count -gt 10 && break
7130  done
7131  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
7132esac
7133
7134      $ac_path_SED_found && break 3
7135    done
7136  done
7137  done
7138IFS=$as_save_IFS
7139  if test -z "$ac_cv_path_SED"; then
7140    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
7141  fi
7142else
7143  ac_cv_path_SED=$SED
7144fi
7145
7146fi
7147{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
7148$as_echo "$ac_cv_path_SED" >&6; }
7149 SED="$ac_cv_path_SED"
7150  rm -f conftest.sed
7151
7152test -z "$SED" && SED=sed
7153Xsed="$SED -e 1s/^X//"
7154
7155
7156
7157
7158
7159
7160
7161
7162
7163
7164
7165{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
7166$as_echo_n "checking for fgrep... " >&6; }
7167if ${ac_cv_path_FGREP+:} false; then :
7168  $as_echo_n "(cached) " >&6
7169else
7170  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
7171   then ac_cv_path_FGREP="$GREP -F"
7172   else
7173     if test -z "$FGREP"; then
7174  ac_path_FGREP_found=false
7175  # Loop through the user's path and test for each of PROGNAME-LIST
7176  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7177for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
7178do
7179  IFS=$as_save_IFS
7180  test -z "$as_dir" && as_dir=.
7181    for ac_prog in fgrep; do
7182    for ac_exec_ext in '' $ac_executable_extensions; do
7183      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
7184      as_fn_executable_p "$ac_path_FGREP" || continue
7185# Check for GNU ac_path_FGREP and select it if it is found.
7186  # Check for GNU $ac_path_FGREP
7187case `"$ac_path_FGREP" --version 2>&1` in
7188*GNU*)
7189  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
7190*)
7191  ac_count=0
7192  $as_echo_n 0123456789 >"conftest.in"
7193  while :
7194  do
7195    cat "conftest.in" "conftest.in" >"conftest.tmp"
7196    mv "conftest.tmp" "conftest.in"
7197    cp "conftest.in" "conftest.nl"
7198    $as_echo 'FGREP' >> "conftest.nl"
7199    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
7200    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
7201    as_fn_arith $ac_count + 1 && ac_count=$as_val
7202    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
7203      # Best one so far, save it but keep looking for a better one
7204      ac_cv_path_FGREP="$ac_path_FGREP"
7205      ac_path_FGREP_max=$ac_count
7206    fi
7207    # 10*(2^10) chars as input seems more than enough
7208    test $ac_count -gt 10 && break
7209  done
7210  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
7211esac
7212
7213      $ac_path_FGREP_found && break 3
7214    done
7215  done
7216  done
7217IFS=$as_save_IFS
7218  if test -z "$ac_cv_path_FGREP"; then
7219    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
7220  fi
7221else
7222  ac_cv_path_FGREP=$FGREP
7223fi
7224
7225   fi
7226fi
7227{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
7228$as_echo "$ac_cv_path_FGREP" >&6; }
7229 FGREP="$ac_cv_path_FGREP"
7230
7231
7232test -z "$GREP" && GREP=grep
7233
7234
7235
7236
7237
7238
7239
7240
7241
7242
7243
7244
7245
7246
7247
7248
7249
7250
7251
7252# Check whether --with-gnu-ld was given.
7253if test "${with_gnu_ld+set}" = set; then :
7254  withval=$with_gnu_ld; test no = "$withval" || with_gnu_ld=yes
7255else
7256  with_gnu_ld=no
7257fi
7258
7259ac_prog=ld
7260if test yes = "$GCC"; then
7261  # Check if gcc -print-prog-name=ld gives a path.
7262  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5
7263$as_echo_n "checking for ld used by $CC... " >&6; }
7264  case $host in
7265  *-*-mingw*)
7266    # gcc leaves a trailing carriage return, which upsets mingw
7267    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
7268  *)
7269    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
7270  esac
7271  case $ac_prog in
7272    # Accept absolute paths.
7273    [\\/]* | ?:[\\/]*)
7274      re_direlt='/[^/][^/]*/\.\./'
7275      # Canonicalize the pathname of ld
7276      ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
7277      while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
7278	ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
7279      done
7280      test -z "$LD" && LD=$ac_prog
7281      ;;
7282  "")
7283    # If it fails, then pretend we aren't using GCC.
7284    ac_prog=ld
7285    ;;
7286  *)
7287    # If it is relative, then search for the first ld in PATH.
7288    with_gnu_ld=unknown
7289    ;;
7290  esac
7291elif test yes = "$with_gnu_ld"; then
7292  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
7293$as_echo_n "checking for GNU ld... " >&6; }
7294else
7295  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
7296$as_echo_n "checking for non-GNU ld... " >&6; }
7297fi
7298if ${lt_cv_path_LD+:} false; then :
7299  $as_echo_n "(cached) " >&6
7300else
7301  if test -z "$LD"; then
7302  lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
7303  for ac_dir in $PATH; do
7304    IFS=$lt_save_ifs
7305    test -z "$ac_dir" && ac_dir=.
7306    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
7307      lt_cv_path_LD=$ac_dir/$ac_prog
7308      # Check to see if the program is GNU ld.  I'd rather use --version,
7309      # but apparently some variants of GNU ld only accept -v.
7310      # Break only if it was the GNU/non-GNU ld that we prefer.
7311      case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
7312      *GNU* | *'with BFD'*)
7313	test no != "$with_gnu_ld" && break
7314	;;
7315      *)
7316	test yes != "$with_gnu_ld" && break
7317	;;
7318      esac
7319    fi
7320  done
7321  IFS=$lt_save_ifs
7322else
7323  lt_cv_path_LD=$LD # Let the user override the test with a path.
7324fi
7325fi
7326
7327LD=$lt_cv_path_LD
7328if test -n "$LD"; then
7329  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
7330$as_echo "$LD" >&6; }
7331else
7332  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7333$as_echo "no" >&6; }
7334fi
7335test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
7336{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
7337$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
7338if ${lt_cv_prog_gnu_ld+:} false; then :
7339  $as_echo_n "(cached) " >&6
7340else
7341  # I'd rather use --version here, but apparently some GNU lds only accept -v.
7342case `$LD -v 2>&1 </dev/null` in
7343*GNU* | *'with BFD'*)
7344  lt_cv_prog_gnu_ld=yes
7345  ;;
7346*)
7347  lt_cv_prog_gnu_ld=no
7348  ;;
7349esac
7350fi
7351{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_gnu_ld" >&5
7352$as_echo "$lt_cv_prog_gnu_ld" >&6; }
7353with_gnu_ld=$lt_cv_prog_gnu_ld
7354
7355
7356
7357
7358
7359
7360
7361
7362
7363{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)" >&5
7364$as_echo_n "checking for BSD- or MS-compatible name lister (nm)... " >&6; }
7365if ${lt_cv_path_NM+:} false; then :
7366  $as_echo_n "(cached) " >&6
7367else
7368  if test -n "$NM"; then
7369  # Let the user override the test.
7370  lt_cv_path_NM=$NM
7371else
7372  lt_nm_to_check=${ac_tool_prefix}nm
7373  if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
7374    lt_nm_to_check="$lt_nm_to_check nm"
7375  fi
7376  for lt_tmp_nm in $lt_nm_to_check; do
7377    lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
7378    for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
7379      IFS=$lt_save_ifs
7380      test -z "$ac_dir" && ac_dir=.
7381      tmp_nm=$ac_dir/$lt_tmp_nm
7382      if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then
7383	# Check to see if the nm accepts a BSD-compat flag.
7384	# Adding the 'sed 1q' prevents false positives on HP-UX, which says:
7385	#   nm: unknown option "B" ignored
7386	# Tru64's nm complains that /dev/null is an invalid object file
7387	# MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty
7388	case $build_os in
7389	mingw*) lt_bad_file=conftest.nm/nofile ;;
7390	*) lt_bad_file=/dev/null ;;
7391	esac
7392	case `"$tmp_nm" -B $lt_bad_file 2>&1 | sed '1q'` in
7393	*$lt_bad_file* | *'Invalid file or object type'*)
7394	  lt_cv_path_NM="$tmp_nm -B"
7395	  break 2
7396	  ;;
7397	*)
7398	  case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
7399	  */dev/null*)
7400	    lt_cv_path_NM="$tmp_nm -p"
7401	    break 2
7402	    ;;
7403	  *)
7404	    lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
7405	    continue # so that we can try to find one that supports BSD flags
7406	    ;;
7407	  esac
7408	  ;;
7409	esac
7410      fi
7411    done
7412    IFS=$lt_save_ifs
7413  done
7414  : ${lt_cv_path_NM=no}
7415fi
7416fi
7417{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5
7418$as_echo "$lt_cv_path_NM" >&6; }
7419if test no != "$lt_cv_path_NM"; then
7420  NM=$lt_cv_path_NM
7421else
7422  # Didn't find any BSD compatible name lister, look for dumpbin.
7423  if test -n "$DUMPBIN"; then :
7424    # Let the user override the test.
7425  else
7426    if test -n "$ac_tool_prefix"; then
7427  for ac_prog in dumpbin "link -dump"
7428  do
7429    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
7430set dummy $ac_tool_prefix$ac_prog; ac_word=$2
7431{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7432$as_echo_n "checking for $ac_word... " >&6; }
7433if ${ac_cv_prog_DUMPBIN+:} false; then :
7434  $as_echo_n "(cached) " >&6
7435else
7436  if test -n "$DUMPBIN"; then
7437  ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
7438else
7439as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7440for as_dir in $PATH
7441do
7442  IFS=$as_save_IFS
7443  test -z "$as_dir" && as_dir=.
7444    for ac_exec_ext in '' $ac_executable_extensions; do
7445  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7446    ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog"
7447    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7448    break 2
7449  fi
7450done
7451  done
7452IFS=$as_save_IFS
7453
7454fi
7455fi
7456DUMPBIN=$ac_cv_prog_DUMPBIN
7457if test -n "$DUMPBIN"; then
7458  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
7459$as_echo "$DUMPBIN" >&6; }
7460else
7461  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7462$as_echo "no" >&6; }
7463fi
7464
7465
7466    test -n "$DUMPBIN" && break
7467  done
7468fi
7469if test -z "$DUMPBIN"; then
7470  ac_ct_DUMPBIN=$DUMPBIN
7471  for ac_prog in dumpbin "link -dump"
7472do
7473  # Extract the first word of "$ac_prog", so it can be a program name with args.
7474set dummy $ac_prog; ac_word=$2
7475{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7476$as_echo_n "checking for $ac_word... " >&6; }
7477if ${ac_cv_prog_ac_ct_DUMPBIN+:} false; then :
7478  $as_echo_n "(cached) " >&6
7479else
7480  if test -n "$ac_ct_DUMPBIN"; then
7481  ac_cv_prog_ac_ct_DUMPBIN="$ac_ct_DUMPBIN" # Let the user override the test.
7482else
7483as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7484for as_dir in $PATH
7485do
7486  IFS=$as_save_IFS
7487  test -z "$as_dir" && as_dir=.
7488    for ac_exec_ext in '' $ac_executable_extensions; do
7489  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7490    ac_cv_prog_ac_ct_DUMPBIN="$ac_prog"
7491    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7492    break 2
7493  fi
7494done
7495  done
7496IFS=$as_save_IFS
7497
7498fi
7499fi
7500ac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN
7501if test -n "$ac_ct_DUMPBIN"; then
7502  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DUMPBIN" >&5
7503$as_echo "$ac_ct_DUMPBIN" >&6; }
7504else
7505  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7506$as_echo "no" >&6; }
7507fi
7508
7509
7510  test -n "$ac_ct_DUMPBIN" && break
7511done
7512
7513  if test "x$ac_ct_DUMPBIN" = x; then
7514    DUMPBIN=":"
7515  else
7516    case $cross_compiling:$ac_tool_warned in
7517yes:)
7518{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7519$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7520ac_tool_warned=yes ;;
7521esac
7522    DUMPBIN=$ac_ct_DUMPBIN
7523  fi
7524fi
7525
7526    case `$DUMPBIN -symbols -headers /dev/null 2>&1 | sed '1q'` in
7527    *COFF*)
7528      DUMPBIN="$DUMPBIN -symbols -headers"
7529      ;;
7530    *)
7531      DUMPBIN=:
7532      ;;
7533    esac
7534  fi
7535
7536  if test : != "$DUMPBIN"; then
7537    NM=$DUMPBIN
7538  fi
7539fi
7540test -z "$NM" && NM=nm
7541
7542
7543
7544
7545
7546
7547{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface" >&5
7548$as_echo_n "checking the name lister ($NM) interface... " >&6; }
7549if ${lt_cv_nm_interface+:} false; then :
7550  $as_echo_n "(cached) " >&6
7551else
7552  lt_cv_nm_interface="BSD nm"
7553  echo "int some_variable = 0;" > conftest.$ac_ext
7554  (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&5)
7555  (eval "$ac_compile" 2>conftest.err)
7556  cat conftest.err >&5
7557  (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
7558  (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
7559  cat conftest.err >&5
7560  (eval echo "\"\$as_me:$LINENO: output\"" >&5)
7561  cat conftest.out >&5
7562  if $GREP 'External.*some_variable' conftest.out > /dev/null; then
7563    lt_cv_nm_interface="MS dumpbin"
7564  fi
7565  rm -f conftest*
7566fi
7567{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_nm_interface" >&5
7568$as_echo "$lt_cv_nm_interface" >&6; }
7569
7570{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
7571$as_echo_n "checking whether ln -s works... " >&6; }
7572LN_S=$as_ln_s
7573if test "$LN_S" = "ln -s"; then
7574  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7575$as_echo "yes" >&6; }
7576else
7577  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
7578$as_echo "no, using $LN_S" >&6; }
7579fi
7580
7581# find the maximum length of command line arguments
7582{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5
7583$as_echo_n "checking the maximum length of command line arguments... " >&6; }
7584if ${lt_cv_sys_max_cmd_len+:} false; then :
7585  $as_echo_n "(cached) " >&6
7586else
7587    i=0
7588  teststring=ABCD
7589
7590  case $build_os in
7591  msdosdjgpp*)
7592    # On DJGPP, this test can blow up pretty badly due to problems in libc
7593    # (any single argument exceeding 2000 bytes causes a buffer overrun
7594    # during glob expansion).  Even if it were fixed, the result of this
7595    # check would be larger than it should be.
7596    lt_cv_sys_max_cmd_len=12288;    # 12K is about right
7597    ;;
7598
7599  gnu*)
7600    # Under GNU Hurd, this test is not required because there is
7601    # no limit to the length of command line arguments.
7602    # Libtool will interpret -1 as no limit whatsoever
7603    lt_cv_sys_max_cmd_len=-1;
7604    ;;
7605
7606  cygwin* | mingw* | cegcc*)
7607    # On Win9x/ME, this test blows up -- it succeeds, but takes
7608    # about 5 minutes as the teststring grows exponentially.
7609    # Worse, since 9x/ME are not pre-emptively multitasking,
7610    # you end up with a "frozen" computer, even though with patience
7611    # the test eventually succeeds (with a max line length of 256k).
7612    # Instead, let's just punt: use the minimum linelength reported by
7613    # all of the supported platforms: 8192 (on NT/2K/XP).
7614    lt_cv_sys_max_cmd_len=8192;
7615    ;;
7616
7617  mint*)
7618    # On MiNT this can take a long time and run out of memory.
7619    lt_cv_sys_max_cmd_len=8192;
7620    ;;
7621
7622  amigaos*)
7623    # On AmigaOS with pdksh, this test takes hours, literally.
7624    # So we just punt and use a minimum line length of 8192.
7625    lt_cv_sys_max_cmd_len=8192;
7626    ;;
7627
7628  bitrig* | darwin* | dragonfly* | freebsd* | netbsd* | openbsd*)
7629    # This has been around since 386BSD, at least.  Likely further.
7630    if test -x /sbin/sysctl; then
7631      lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
7632    elif test -x /usr/sbin/sysctl; then
7633      lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
7634    else
7635      lt_cv_sys_max_cmd_len=65536	# usable default for all BSDs
7636    fi
7637    # And add a safety zone
7638    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
7639    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
7640    ;;
7641
7642  interix*)
7643    # We know the value 262144 and hardcode it with a safety zone (like BSD)
7644    lt_cv_sys_max_cmd_len=196608
7645    ;;
7646
7647  os2*)
7648    # The test takes a long time on OS/2.
7649    lt_cv_sys_max_cmd_len=8192
7650    ;;
7651
7652  osf*)
7653    # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
7654    # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
7655    # nice to cause kernel panics so lets avoid the loop below.
7656    # First set a reasonable default.
7657    lt_cv_sys_max_cmd_len=16384
7658    #
7659    if test -x /sbin/sysconfig; then
7660      case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
7661        *1*) lt_cv_sys_max_cmd_len=-1 ;;
7662      esac
7663    fi
7664    ;;
7665  sco3.2v5*)
7666    lt_cv_sys_max_cmd_len=102400
7667    ;;
7668  sysv5* | sco5v6* | sysv4.2uw2*)
7669    kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
7670    if test -n "$kargmax"; then
7671      lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[	 ]//'`
7672    else
7673      lt_cv_sys_max_cmd_len=32768
7674    fi
7675    ;;
7676  *)
7677    lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
7678    if test -n "$lt_cv_sys_max_cmd_len" && \
7679       test undefined != "$lt_cv_sys_max_cmd_len"; then
7680      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
7681      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
7682    else
7683      # Make teststring a little bigger before we do anything with it.
7684      # a 1K string should be a reasonable start.
7685      for i in 1 2 3 4 5 6 7 8; do
7686        teststring=$teststring$teststring
7687      done
7688      SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
7689      # If test is not a shell built-in, we'll probably end up computing a
7690      # maximum length that is only half of the actual maximum length, but
7691      # we can't tell.
7692      while { test X`env echo "$teststring$teststring" 2>/dev/null` \
7693	         = "X$teststring$teststring"; } >/dev/null 2>&1 &&
7694	      test 17 != "$i" # 1/2 MB should be enough
7695      do
7696        i=`expr $i + 1`
7697        teststring=$teststring$teststring
7698      done
7699      # Only check the string length outside the loop.
7700      lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
7701      teststring=
7702      # Add a significant safety factor because C++ compilers can tack on
7703      # massive amounts of additional arguments before passing them to the
7704      # linker.  It appears as though 1/2 is a usable value.
7705      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
7706    fi
7707    ;;
7708  esac
7709
7710fi
7711
7712if test -n "$lt_cv_sys_max_cmd_len"; then
7713  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len" >&5
7714$as_echo "$lt_cv_sys_max_cmd_len" >&6; }
7715else
7716  { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
7717$as_echo "none" >&6; }
7718fi
7719max_cmd_len=$lt_cv_sys_max_cmd_len
7720
7721
7722
7723
7724
7725
7726: ${CP="cp -f"}
7727: ${MV="mv -f"}
7728: ${RM="rm -f"}
7729
7730if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
7731  lt_unset=unset
7732else
7733  lt_unset=false
7734fi
7735
7736
7737
7738
7739
7740# test EBCDIC or ASCII
7741case `echo X|tr X '\101'` in
7742 A) # ASCII based system
7743    # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
7744  lt_SP2NL='tr \040 \012'
7745  lt_NL2SP='tr \015\012 \040\040'
7746  ;;
7747 *) # EBCDIC based system
7748  lt_SP2NL='tr \100 \n'
7749  lt_NL2SP='tr \r\n \100\100'
7750  ;;
7751esac
7752
7753
7754
7755
7756
7757
7758
7759
7760
7761{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to $host format" >&5
7762$as_echo_n "checking how to convert $build file names to $host format... " >&6; }
7763if ${lt_cv_to_host_file_cmd+:} false; then :
7764  $as_echo_n "(cached) " >&6
7765else
7766  case $host in
7767  *-*-mingw* )
7768    case $build in
7769      *-*-mingw* ) # actually msys
7770        lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32
7771        ;;
7772      *-*-cygwin* )
7773        lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32
7774        ;;
7775      * ) # otherwise, assume *nix
7776        lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32
7777        ;;
7778    esac
7779    ;;
7780  *-*-cygwin* )
7781    case $build in
7782      *-*-mingw* ) # actually msys
7783        lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin
7784        ;;
7785      *-*-cygwin* )
7786        lt_cv_to_host_file_cmd=func_convert_file_noop
7787        ;;
7788      * ) # otherwise, assume *nix
7789        lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin
7790        ;;
7791    esac
7792    ;;
7793  * ) # unhandled hosts (and "normal" native builds)
7794    lt_cv_to_host_file_cmd=func_convert_file_noop
7795    ;;
7796esac
7797
7798fi
7799
7800to_host_file_cmd=$lt_cv_to_host_file_cmd
7801{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_host_file_cmd" >&5
7802$as_echo "$lt_cv_to_host_file_cmd" >&6; }
7803
7804
7805
7806
7807
7808{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format" >&5
7809$as_echo_n "checking how to convert $build file names to toolchain format... " >&6; }
7810if ${lt_cv_to_tool_file_cmd+:} false; then :
7811  $as_echo_n "(cached) " >&6
7812else
7813  #assume ordinary cross tools, or native build.
7814lt_cv_to_tool_file_cmd=func_convert_file_noop
7815case $host in
7816  *-*-mingw* )
7817    case $build in
7818      *-*-mingw* ) # actually msys
7819        lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32
7820        ;;
7821    esac
7822    ;;
7823esac
7824
7825fi
7826
7827to_tool_file_cmd=$lt_cv_to_tool_file_cmd
7828{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_tool_file_cmd" >&5
7829$as_echo "$lt_cv_to_tool_file_cmd" >&6; }
7830
7831
7832
7833
7834
7835{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5
7836$as_echo_n "checking for $LD option to reload object files... " >&6; }
7837if ${lt_cv_ld_reload_flag+:} false; then :
7838  $as_echo_n "(cached) " >&6
7839else
7840  lt_cv_ld_reload_flag='-r'
7841fi
7842{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_reload_flag" >&5
7843$as_echo "$lt_cv_ld_reload_flag" >&6; }
7844reload_flag=$lt_cv_ld_reload_flag
7845case $reload_flag in
7846"" | " "*) ;;
7847*) reload_flag=" $reload_flag" ;;
7848esac
7849reload_cmds='$LD$reload_flag -o $output$reload_objs'
7850case $host_os in
7851  cygwin* | mingw* | pw32* | cegcc*)
7852    if test yes != "$GCC"; then
7853      reload_cmds=false
7854    fi
7855    ;;
7856  darwin*)
7857    if test yes = "$GCC"; then
7858      reload_cmds='$LTCC $LTCFLAGS -nostdlib $wl-r -o $output$reload_objs'
7859    else
7860      reload_cmds='$LD$reload_flag -o $output$reload_objs'
7861    fi
7862    ;;
7863esac
7864
7865
7866
7867
7868
7869
7870
7871
7872
7873if test -n "$ac_tool_prefix"; then
7874  # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
7875set dummy ${ac_tool_prefix}objdump; ac_word=$2
7876{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7877$as_echo_n "checking for $ac_word... " >&6; }
7878if ${ac_cv_prog_OBJDUMP+:} false; then :
7879  $as_echo_n "(cached) " >&6
7880else
7881  if test -n "$OBJDUMP"; then
7882  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
7883else
7884as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7885for as_dir in $PATH
7886do
7887  IFS=$as_save_IFS
7888  test -z "$as_dir" && as_dir=.
7889    for ac_exec_ext in '' $ac_executable_extensions; do
7890  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7891    ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
7892    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7893    break 2
7894  fi
7895done
7896  done
7897IFS=$as_save_IFS
7898
7899fi
7900fi
7901OBJDUMP=$ac_cv_prog_OBJDUMP
7902if test -n "$OBJDUMP"; then
7903  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
7904$as_echo "$OBJDUMP" >&6; }
7905else
7906  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7907$as_echo "no" >&6; }
7908fi
7909
7910
7911fi
7912if test -z "$ac_cv_prog_OBJDUMP"; then
7913  ac_ct_OBJDUMP=$OBJDUMP
7914  # Extract the first word of "objdump", so it can be a program name with args.
7915set dummy objdump; ac_word=$2
7916{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7917$as_echo_n "checking for $ac_word... " >&6; }
7918if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
7919  $as_echo_n "(cached) " >&6
7920else
7921  if test -n "$ac_ct_OBJDUMP"; then
7922  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
7923else
7924as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7925for as_dir in $PATH
7926do
7927  IFS=$as_save_IFS
7928  test -z "$as_dir" && as_dir=.
7929    for ac_exec_ext in '' $ac_executable_extensions; do
7930  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7931    ac_cv_prog_ac_ct_OBJDUMP="objdump"
7932    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7933    break 2
7934  fi
7935done
7936  done
7937IFS=$as_save_IFS
7938
7939fi
7940fi
7941ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
7942if test -n "$ac_ct_OBJDUMP"; then
7943  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
7944$as_echo "$ac_ct_OBJDUMP" >&6; }
7945else
7946  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7947$as_echo "no" >&6; }
7948fi
7949
7950  if test "x$ac_ct_OBJDUMP" = x; then
7951    OBJDUMP="false"
7952  else
7953    case $cross_compiling:$ac_tool_warned in
7954yes:)
7955{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7956$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7957ac_tool_warned=yes ;;
7958esac
7959    OBJDUMP=$ac_ct_OBJDUMP
7960  fi
7961else
7962  OBJDUMP="$ac_cv_prog_OBJDUMP"
7963fi
7964
7965test -z "$OBJDUMP" && OBJDUMP=objdump
7966
7967
7968
7969
7970
7971
7972
7973
7974
7975{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries" >&5
7976$as_echo_n "checking how to recognize dependent libraries... " >&6; }
7977if ${lt_cv_deplibs_check_method+:} false; then :
7978  $as_echo_n "(cached) " >&6
7979else
7980  lt_cv_file_magic_cmd='$MAGIC_CMD'
7981lt_cv_file_magic_test_file=
7982lt_cv_deplibs_check_method='unknown'
7983# Need to set the preceding variable on all platforms that support
7984# interlibrary dependencies.
7985# 'none' -- dependencies not supported.
7986# 'unknown' -- same as none, but documents that we really don't know.
7987# 'pass_all' -- all dependencies passed with no checks.
7988# 'test_compile' -- check by making test program.
7989# 'file_magic [[regex]]' -- check by looking for files in library path
7990# that responds to the $file_magic_cmd with a given extended regex.
7991# If you have 'file' or equivalent on your system and you're not sure
7992# whether 'pass_all' will *always* work, you probably want this one.
7993
7994case $host_os in
7995aix[4-9]*)
7996  lt_cv_deplibs_check_method=pass_all
7997  ;;
7998
7999beos*)
8000  lt_cv_deplibs_check_method=pass_all
8001  ;;
8002
8003bsdi[45]*)
8004  lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
8005  lt_cv_file_magic_cmd='/usr/bin/file -L'
8006  lt_cv_file_magic_test_file=/shlib/libc.so
8007  ;;
8008
8009cygwin*)
8010  # func_win32_libid is a shell function defined in ltmain.sh
8011  lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
8012  lt_cv_file_magic_cmd='func_win32_libid'
8013  ;;
8014
8015mingw* | pw32*)
8016  # Base MSYS/MinGW do not provide the 'file' command needed by
8017  # func_win32_libid shell function, so use a weaker test based on 'objdump',
8018  # unless we find 'file', for example because we are cross-compiling.
8019  if ( file / ) >/dev/null 2>&1; then
8020    lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
8021    lt_cv_file_magic_cmd='func_win32_libid'
8022  else
8023    # Keep this pattern in sync with the one in func_win32_libid.
8024    lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)'
8025    lt_cv_file_magic_cmd='$OBJDUMP -f'
8026  fi
8027  ;;
8028
8029cegcc*)
8030  # use the weaker test based on 'objdump'. See mingw*.
8031  lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
8032  lt_cv_file_magic_cmd='$OBJDUMP -f'
8033  ;;
8034
8035darwin* | rhapsody*)
8036  lt_cv_deplibs_check_method=pass_all
8037  ;;
8038
8039freebsd* | dragonfly*)
8040  if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
8041    case $host_cpu in
8042    i*86 )
8043      # Not sure whether the presence of OpenBSD here was a mistake.
8044      # Let's accept both of them until this is cleared up.
8045      lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library'
8046      lt_cv_file_magic_cmd=/usr/bin/file
8047      lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
8048      ;;
8049    esac
8050  else
8051    lt_cv_deplibs_check_method=pass_all
8052  fi
8053  ;;
8054
8055haiku*)
8056  lt_cv_deplibs_check_method=pass_all
8057  ;;
8058
8059hpux10.20* | hpux11*)
8060  lt_cv_file_magic_cmd=/usr/bin/file
8061  case $host_cpu in
8062  ia64*)
8063    lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64'
8064    lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
8065    ;;
8066  hppa*64*)
8067    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]'
8068    lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
8069    ;;
8070  *)
8071    lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9]\.[0-9]) shared library'
8072    lt_cv_file_magic_test_file=/usr/lib/libc.sl
8073    ;;
8074  esac
8075  ;;
8076
8077interix[3-9]*)
8078  # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
8079  lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$'
8080  ;;
8081
8082irix5* | irix6* | nonstopux*)
8083  case $LD in
8084  *-32|*"-32 ") libmagic=32-bit;;
8085  *-n32|*"-n32 ") libmagic=N32;;
8086  *-64|*"-64 ") libmagic=64-bit;;
8087  *) libmagic=never-match;;
8088  esac
8089  lt_cv_deplibs_check_method=pass_all
8090  ;;
8091
8092# This must be glibc/ELF.
8093linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
8094  lt_cv_deplibs_check_method=pass_all
8095  ;;
8096
8097netbsd*)
8098  if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
8099    lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
8100  else
8101    lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$'
8102  fi
8103  ;;
8104
8105newos6*)
8106  lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'
8107  lt_cv_file_magic_cmd=/usr/bin/file
8108  lt_cv_file_magic_test_file=/usr/lib/libnls.so
8109  ;;
8110
8111*nto* | *qnx*)
8112  lt_cv_deplibs_check_method=pass_all
8113  ;;
8114
8115openbsd* | bitrig*)
8116  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
8117    lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$'
8118  else
8119    lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
8120  fi
8121  ;;
8122
8123osf3* | osf4* | osf5*)
8124  lt_cv_deplibs_check_method=pass_all
8125  ;;
8126
8127rdos*)
8128  lt_cv_deplibs_check_method=pass_all
8129  ;;
8130
8131solaris*)
8132  lt_cv_deplibs_check_method=pass_all
8133  ;;
8134
8135sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
8136  lt_cv_deplibs_check_method=pass_all
8137  ;;
8138
8139sysv4 | sysv4.3*)
8140  case $host_vendor in
8141  motorola)
8142    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]'
8143    lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
8144    ;;
8145  ncr)
8146    lt_cv_deplibs_check_method=pass_all
8147    ;;
8148  sequent)
8149    lt_cv_file_magic_cmd='/bin/file'
8150    lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'
8151    ;;
8152  sni)
8153    lt_cv_file_magic_cmd='/bin/file'
8154    lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib"
8155    lt_cv_file_magic_test_file=/lib/libc.so
8156    ;;
8157  siemens)
8158    lt_cv_deplibs_check_method=pass_all
8159    ;;
8160  pc)
8161    lt_cv_deplibs_check_method=pass_all
8162    ;;
8163  esac
8164  ;;
8165
8166tpf*)
8167  lt_cv_deplibs_check_method=pass_all
8168  ;;
8169os2*)
8170  lt_cv_deplibs_check_method=pass_all
8171  ;;
8172esac
8173
8174fi
8175{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5
8176$as_echo "$lt_cv_deplibs_check_method" >&6; }
8177
8178file_magic_glob=
8179want_nocaseglob=no
8180if test "$build" = "$host"; then
8181  case $host_os in
8182  mingw* | pw32*)
8183    if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then
8184      want_nocaseglob=yes
8185    else
8186      file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[\1]\/[\1]\/g;/g"`
8187    fi
8188    ;;
8189  esac
8190fi
8191
8192file_magic_cmd=$lt_cv_file_magic_cmd
8193deplibs_check_method=$lt_cv_deplibs_check_method
8194test -z "$deplibs_check_method" && deplibs_check_method=unknown
8195
8196
8197
8198
8199
8200
8201
8202
8203
8204
8205
8206
8207
8208
8209
8210
8211
8212
8213
8214
8215
8216
8217if test -n "$ac_tool_prefix"; then
8218  # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
8219set dummy ${ac_tool_prefix}dlltool; ac_word=$2
8220{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8221$as_echo_n "checking for $ac_word... " >&6; }
8222if ${ac_cv_prog_DLLTOOL+:} false; then :
8223  $as_echo_n "(cached) " >&6
8224else
8225  if test -n "$DLLTOOL"; then
8226  ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
8227else
8228as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8229for as_dir in $PATH
8230do
8231  IFS=$as_save_IFS
8232  test -z "$as_dir" && as_dir=.
8233    for ac_exec_ext in '' $ac_executable_extensions; do
8234  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8235    ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
8236    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8237    break 2
8238  fi
8239done
8240  done
8241IFS=$as_save_IFS
8242
8243fi
8244fi
8245DLLTOOL=$ac_cv_prog_DLLTOOL
8246if test -n "$DLLTOOL"; then
8247  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5
8248$as_echo "$DLLTOOL" >&6; }
8249else
8250  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8251$as_echo "no" >&6; }
8252fi
8253
8254
8255fi
8256if test -z "$ac_cv_prog_DLLTOOL"; then
8257  ac_ct_DLLTOOL=$DLLTOOL
8258  # Extract the first word of "dlltool", so it can be a program name with args.
8259set dummy dlltool; ac_word=$2
8260{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8261$as_echo_n "checking for $ac_word... " >&6; }
8262if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then :
8263  $as_echo_n "(cached) " >&6
8264else
8265  if test -n "$ac_ct_DLLTOOL"; then
8266  ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
8267else
8268as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8269for as_dir in $PATH
8270do
8271  IFS=$as_save_IFS
8272  test -z "$as_dir" && as_dir=.
8273    for ac_exec_ext in '' $ac_executable_extensions; do
8274  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8275    ac_cv_prog_ac_ct_DLLTOOL="dlltool"
8276    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8277    break 2
8278  fi
8279done
8280  done
8281IFS=$as_save_IFS
8282
8283fi
8284fi
8285ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
8286if test -n "$ac_ct_DLLTOOL"; then
8287  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5
8288$as_echo "$ac_ct_DLLTOOL" >&6; }
8289else
8290  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8291$as_echo "no" >&6; }
8292fi
8293
8294  if test "x$ac_ct_DLLTOOL" = x; then
8295    DLLTOOL="false"
8296  else
8297    case $cross_compiling:$ac_tool_warned in
8298yes:)
8299{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8300$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8301ac_tool_warned=yes ;;
8302esac
8303    DLLTOOL=$ac_ct_DLLTOOL
8304  fi
8305else
8306  DLLTOOL="$ac_cv_prog_DLLTOOL"
8307fi
8308
8309test -z "$DLLTOOL" && DLLTOOL=dlltool
8310
8311
8312
8313
8314
8315
8316
8317
8318
8319
8320{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to associate runtime and link libraries" >&5
8321$as_echo_n "checking how to associate runtime and link libraries... " >&6; }
8322if ${lt_cv_sharedlib_from_linklib_cmd+:} false; then :
8323  $as_echo_n "(cached) " >&6
8324else
8325  lt_cv_sharedlib_from_linklib_cmd='unknown'
8326
8327case $host_os in
8328cygwin* | mingw* | pw32* | cegcc*)
8329  # two different shell functions defined in ltmain.sh;
8330  # decide which one to use based on capabilities of $DLLTOOL
8331  case `$DLLTOOL --help 2>&1` in
8332  *--identify-strict*)
8333    lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib
8334    ;;
8335  *)
8336    lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback
8337    ;;
8338  esac
8339  ;;
8340*)
8341  # fallback: assume linklib IS sharedlib
8342  lt_cv_sharedlib_from_linklib_cmd=$ECHO
8343  ;;
8344esac
8345
8346fi
8347{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sharedlib_from_linklib_cmd" >&5
8348$as_echo "$lt_cv_sharedlib_from_linklib_cmd" >&6; }
8349sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd
8350test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO
8351
8352
8353
8354
8355
8356
8357
8358if test -n "$ac_tool_prefix"; then
8359  for ac_prog in ar
8360  do
8361    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
8362set dummy $ac_tool_prefix$ac_prog; ac_word=$2
8363{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8364$as_echo_n "checking for $ac_word... " >&6; }
8365if ${ac_cv_prog_AR+:} false; then :
8366  $as_echo_n "(cached) " >&6
8367else
8368  if test -n "$AR"; then
8369  ac_cv_prog_AR="$AR" # Let the user override the test.
8370else
8371as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8372for as_dir in $PATH
8373do
8374  IFS=$as_save_IFS
8375  test -z "$as_dir" && as_dir=.
8376    for ac_exec_ext in '' $ac_executable_extensions; do
8377  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8378    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
8379    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8380    break 2
8381  fi
8382done
8383  done
8384IFS=$as_save_IFS
8385
8386fi
8387fi
8388AR=$ac_cv_prog_AR
8389if test -n "$AR"; then
8390  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
8391$as_echo "$AR" >&6; }
8392else
8393  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8394$as_echo "no" >&6; }
8395fi
8396
8397
8398    test -n "$AR" && break
8399  done
8400fi
8401if test -z "$AR"; then
8402  ac_ct_AR=$AR
8403  for ac_prog in ar
8404do
8405  # Extract the first word of "$ac_prog", so it can be a program name with args.
8406set dummy $ac_prog; ac_word=$2
8407{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8408$as_echo_n "checking for $ac_word... " >&6; }
8409if ${ac_cv_prog_ac_ct_AR+:} false; then :
8410  $as_echo_n "(cached) " >&6
8411else
8412  if test -n "$ac_ct_AR"; then
8413  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
8414else
8415as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8416for as_dir in $PATH
8417do
8418  IFS=$as_save_IFS
8419  test -z "$as_dir" && as_dir=.
8420    for ac_exec_ext in '' $ac_executable_extensions; do
8421  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8422    ac_cv_prog_ac_ct_AR="$ac_prog"
8423    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8424    break 2
8425  fi
8426done
8427  done
8428IFS=$as_save_IFS
8429
8430fi
8431fi
8432ac_ct_AR=$ac_cv_prog_ac_ct_AR
8433if test -n "$ac_ct_AR"; then
8434  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
8435$as_echo "$ac_ct_AR" >&6; }
8436else
8437  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8438$as_echo "no" >&6; }
8439fi
8440
8441
8442  test -n "$ac_ct_AR" && break
8443done
8444
8445  if test "x$ac_ct_AR" = x; then
8446    AR="false"
8447  else
8448    case $cross_compiling:$ac_tool_warned in
8449yes:)
8450{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8451$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8452ac_tool_warned=yes ;;
8453esac
8454    AR=$ac_ct_AR
8455  fi
8456fi
8457
8458: ${AR=ar}
8459: ${AR_FLAGS=cru}
8460
8461
8462
8463
8464
8465
8466
8467
8468
8469
8470
8471{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support" >&5
8472$as_echo_n "checking for archiver @FILE support... " >&6; }
8473if ${lt_cv_ar_at_file+:} false; then :
8474  $as_echo_n "(cached) " >&6
8475else
8476  lt_cv_ar_at_file=no
8477   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8478/* end confdefs.h.  */
8479
8480int
8481main ()
8482{
8483
8484  ;
8485  return 0;
8486}
8487_ACEOF
8488if ac_fn_c_try_compile "$LINENO"; then :
8489  echo conftest.$ac_objext > conftest.lst
8490      lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&5'
8491      { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5
8492  (eval $lt_ar_try) 2>&5
8493  ac_status=$?
8494  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8495  test $ac_status = 0; }
8496      if test 0 -eq "$ac_status"; then
8497	# Ensure the archiver fails upon bogus file names.
8498	rm -f conftest.$ac_objext libconftest.a
8499	{ { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5
8500  (eval $lt_ar_try) 2>&5
8501  ac_status=$?
8502  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8503  test $ac_status = 0; }
8504	if test 0 -ne "$ac_status"; then
8505          lt_cv_ar_at_file=@
8506        fi
8507      fi
8508      rm -f conftest.* libconftest.a
8509
8510fi
8511rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8512
8513fi
8514{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5
8515$as_echo "$lt_cv_ar_at_file" >&6; }
8516
8517if test no = "$lt_cv_ar_at_file"; then
8518  archiver_list_spec=
8519else
8520  archiver_list_spec=$lt_cv_ar_at_file
8521fi
8522
8523
8524
8525
8526
8527
8528
8529if test -n "$ac_tool_prefix"; then
8530  # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
8531set dummy ${ac_tool_prefix}strip; ac_word=$2
8532{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8533$as_echo_n "checking for $ac_word... " >&6; }
8534if ${ac_cv_prog_STRIP+:} false; then :
8535  $as_echo_n "(cached) " >&6
8536else
8537  if test -n "$STRIP"; then
8538  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
8539else
8540as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8541for as_dir in $PATH
8542do
8543  IFS=$as_save_IFS
8544  test -z "$as_dir" && as_dir=.
8545    for ac_exec_ext in '' $ac_executable_extensions; do
8546  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8547    ac_cv_prog_STRIP="${ac_tool_prefix}strip"
8548    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8549    break 2
8550  fi
8551done
8552  done
8553IFS=$as_save_IFS
8554
8555fi
8556fi
8557STRIP=$ac_cv_prog_STRIP
8558if test -n "$STRIP"; then
8559  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
8560$as_echo "$STRIP" >&6; }
8561else
8562  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8563$as_echo "no" >&6; }
8564fi
8565
8566
8567fi
8568if test -z "$ac_cv_prog_STRIP"; then
8569  ac_ct_STRIP=$STRIP
8570  # Extract the first word of "strip", so it can be a program name with args.
8571set dummy strip; ac_word=$2
8572{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8573$as_echo_n "checking for $ac_word... " >&6; }
8574if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
8575  $as_echo_n "(cached) " >&6
8576else
8577  if test -n "$ac_ct_STRIP"; then
8578  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
8579else
8580as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8581for as_dir in $PATH
8582do
8583  IFS=$as_save_IFS
8584  test -z "$as_dir" && as_dir=.
8585    for ac_exec_ext in '' $ac_executable_extensions; do
8586  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8587    ac_cv_prog_ac_ct_STRIP="strip"
8588    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8589    break 2
8590  fi
8591done
8592  done
8593IFS=$as_save_IFS
8594
8595fi
8596fi
8597ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
8598if test -n "$ac_ct_STRIP"; then
8599  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
8600$as_echo "$ac_ct_STRIP" >&6; }
8601else
8602  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8603$as_echo "no" >&6; }
8604fi
8605
8606  if test "x$ac_ct_STRIP" = x; then
8607    STRIP=":"
8608  else
8609    case $cross_compiling:$ac_tool_warned in
8610yes:)
8611{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8612$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8613ac_tool_warned=yes ;;
8614esac
8615    STRIP=$ac_ct_STRIP
8616  fi
8617else
8618  STRIP="$ac_cv_prog_STRIP"
8619fi
8620
8621test -z "$STRIP" && STRIP=:
8622
8623
8624
8625
8626
8627
8628if test -n "$ac_tool_prefix"; then
8629  # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
8630set dummy ${ac_tool_prefix}ranlib; ac_word=$2
8631{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8632$as_echo_n "checking for $ac_word... " >&6; }
8633if ${ac_cv_prog_RANLIB+:} false; then :
8634  $as_echo_n "(cached) " >&6
8635else
8636  if test -n "$RANLIB"; then
8637  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
8638else
8639as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8640for as_dir in $PATH
8641do
8642  IFS=$as_save_IFS
8643  test -z "$as_dir" && as_dir=.
8644    for ac_exec_ext in '' $ac_executable_extensions; do
8645  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8646    ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
8647    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8648    break 2
8649  fi
8650done
8651  done
8652IFS=$as_save_IFS
8653
8654fi
8655fi
8656RANLIB=$ac_cv_prog_RANLIB
8657if test -n "$RANLIB"; then
8658  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
8659$as_echo "$RANLIB" >&6; }
8660else
8661  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8662$as_echo "no" >&6; }
8663fi
8664
8665
8666fi
8667if test -z "$ac_cv_prog_RANLIB"; then
8668  ac_ct_RANLIB=$RANLIB
8669  # Extract the first word of "ranlib", so it can be a program name with args.
8670set dummy ranlib; ac_word=$2
8671{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8672$as_echo_n "checking for $ac_word... " >&6; }
8673if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
8674  $as_echo_n "(cached) " >&6
8675else
8676  if test -n "$ac_ct_RANLIB"; then
8677  ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
8678else
8679as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8680for as_dir in $PATH
8681do
8682  IFS=$as_save_IFS
8683  test -z "$as_dir" && as_dir=.
8684    for ac_exec_ext in '' $ac_executable_extensions; do
8685  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8686    ac_cv_prog_ac_ct_RANLIB="ranlib"
8687    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8688    break 2
8689  fi
8690done
8691  done
8692IFS=$as_save_IFS
8693
8694fi
8695fi
8696ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
8697if test -n "$ac_ct_RANLIB"; then
8698  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
8699$as_echo "$ac_ct_RANLIB" >&6; }
8700else
8701  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8702$as_echo "no" >&6; }
8703fi
8704
8705  if test "x$ac_ct_RANLIB" = x; then
8706    RANLIB=":"
8707  else
8708    case $cross_compiling:$ac_tool_warned in
8709yes:)
8710{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8711$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8712ac_tool_warned=yes ;;
8713esac
8714    RANLIB=$ac_ct_RANLIB
8715  fi
8716else
8717  RANLIB="$ac_cv_prog_RANLIB"
8718fi
8719
8720test -z "$RANLIB" && RANLIB=:
8721
8722
8723
8724
8725
8726
8727# Determine commands to create old-style static archives.
8728old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
8729old_postinstall_cmds='chmod 644 $oldlib'
8730old_postuninstall_cmds=
8731
8732if test -n "$RANLIB"; then
8733  case $host_os in
8734  bitrig* | openbsd*)
8735    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib"
8736    ;;
8737  *)
8738    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib"
8739    ;;
8740  esac
8741  old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib"
8742fi
8743
8744case $host_os in
8745  darwin*)
8746    lock_old_archive_extraction=yes ;;
8747  *)
8748    lock_old_archive_extraction=no ;;
8749esac
8750
8751
8752
8753
8754
8755
8756
8757
8758
8759
8760
8761
8762
8763
8764
8765
8766
8767
8768
8769
8770
8771for ac_prog in gawk mawk nawk awk
8772do
8773  # Extract the first word of "$ac_prog", so it can be a program name with args.
8774set dummy $ac_prog; ac_word=$2
8775{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8776$as_echo_n "checking for $ac_word... " >&6; }
8777if ${ac_cv_prog_AWK+:} false; then :
8778  $as_echo_n "(cached) " >&6
8779else
8780  if test -n "$AWK"; then
8781  ac_cv_prog_AWK="$AWK" # Let the user override the test.
8782else
8783as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8784for as_dir in $PATH
8785do
8786  IFS=$as_save_IFS
8787  test -z "$as_dir" && as_dir=.
8788    for ac_exec_ext in '' $ac_executable_extensions; do
8789  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8790    ac_cv_prog_AWK="$ac_prog"
8791    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8792    break 2
8793  fi
8794done
8795  done
8796IFS=$as_save_IFS
8797
8798fi
8799fi
8800AWK=$ac_cv_prog_AWK
8801if test -n "$AWK"; then
8802  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
8803$as_echo "$AWK" >&6; }
8804else
8805  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8806$as_echo "no" >&6; }
8807fi
8808
8809
8810  test -n "$AWK" && break
8811done
8812
8813
8814
8815
8816
8817
8818
8819
8820
8821
8822
8823
8824
8825
8826
8827
8828
8829
8830
8831# If no C compiler was specified, use CC.
8832LTCC=${LTCC-"$CC"}
8833
8834# If no C compiler flags were specified, use CFLAGS.
8835LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
8836
8837# Allow CC to be a program name with arguments.
8838compiler=$CC
8839
8840
8841# Check for command to grab the raw symbol name followed by C symbol from nm.
8842{ $as_echo "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5
8843$as_echo_n "checking command to parse $NM output from $compiler object... " >&6; }
8844if ${lt_cv_sys_global_symbol_pipe+:} false; then :
8845  $as_echo_n "(cached) " >&6
8846else
8847
8848# These are sane defaults that work on at least a few old systems.
8849# [They come from Ultrix.  What could be older than Ultrix?!! ;)]
8850
8851# Character class describing NM global symbol codes.
8852symcode='[BCDEGRST]'
8853
8854# Regexp to match symbols that can be accessed directly from C.
8855sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
8856
8857# Define system-specific variables.
8858case $host_os in
8859aix*)
8860  symcode='[BCDT]'
8861  ;;
8862cygwin* | mingw* | pw32* | cegcc*)
8863  symcode='[ABCDGISTW]'
8864  ;;
8865hpux*)
8866  if test ia64 = "$host_cpu"; then
8867    symcode='[ABCDEGRST]'
8868  fi
8869  ;;
8870irix* | nonstopux*)
8871  symcode='[BCDEGRST]'
8872  ;;
8873osf*)
8874  symcode='[BCDEGQRST]'
8875  ;;
8876solaris*)
8877  symcode='[BDRT]'
8878  ;;
8879sco3.2v5*)
8880  symcode='[DT]'
8881  ;;
8882sysv4.2uw2*)
8883  symcode='[DT]'
8884  ;;
8885sysv5* | sco5v6* | unixware* | OpenUNIX*)
8886  symcode='[ABDT]'
8887  ;;
8888sysv4)
8889  symcode='[DFNSTU]'
8890  ;;
8891esac
8892
8893# If we're using GNU nm, then use its standard symbol codes.
8894case `$NM -V 2>&1` in
8895*GNU* | *'with BFD'*)
8896  symcode='[ABCDGIRSTW]' ;;
8897esac
8898
8899if test "$lt_cv_nm_interface" = "MS dumpbin"; then
8900  # Gets list of data symbols to import.
8901  lt_cv_sys_global_symbol_to_import="sed -n -e 's/^I .* \(.*\)$/\1/p'"
8902  # Adjust the below global symbol transforms to fixup imported variables.
8903  lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'"
8904  lt_c_name_hook=" -e 's/^I .* \(.*\)$/  {\"\1\", (void *) 0},/p'"
8905  lt_c_name_lib_hook="\
8906  -e 's/^I .* \(lib.*\)$/  {\"\1\", (void *) 0},/p'\
8907  -e 's/^I .* \(.*\)$/  {\"lib\1\", (void *) 0},/p'"
8908else
8909  # Disable hooks by default.
8910  lt_cv_sys_global_symbol_to_import=
8911  lt_cdecl_hook=
8912  lt_c_name_hook=
8913  lt_c_name_lib_hook=
8914fi
8915
8916# Transform an extracted symbol line into a proper C declaration.
8917# Some systems (esp. on ia64) link data and code symbols differently,
8918# so use this general approach.
8919lt_cv_sys_global_symbol_to_cdecl="sed -n"\
8920$lt_cdecl_hook\
8921" -e 's/^T .* \(.*\)$/extern int \1();/p'"\
8922" -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'"
8923
8924# Transform an extracted symbol line into symbol name and symbol address
8925lt_cv_sys_global_symbol_to_c_name_address="sed -n"\
8926$lt_c_name_hook\
8927" -e 's/^: \(.*\) .*$/  {\"\1\", (void *) 0},/p'"\
8928" -e 's/^$symcode$symcode* .* \(.*\)$/  {\"\1\", (void *) \&\1},/p'"
8929
8930# Transform an extracted symbol line into symbol name with lib prefix and
8931# symbol address.
8932lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n"\
8933$lt_c_name_lib_hook\
8934" -e 's/^: \(.*\) .*$/  {\"\1\", (void *) 0},/p'"\
8935" -e 's/^$symcode$symcode* .* \(lib.*\)$/  {\"\1\", (void *) \&\1},/p'"\
8936" -e 's/^$symcode$symcode* .* \(.*\)$/  {\"lib\1\", (void *) \&\1},/p'"
8937
8938# Handle CRLF in mingw tool chain
8939opt_cr=
8940case $build_os in
8941mingw*)
8942  opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
8943  ;;
8944esac
8945
8946# Try without a prefix underscore, then with it.
8947for ac_symprfx in "" "_"; do
8948
8949  # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
8950  symxfrm="\\1 $ac_symprfx\\2 \\2"
8951
8952  # Write the raw and C identifiers.
8953  if test "$lt_cv_nm_interface" = "MS dumpbin"; then
8954    # Fake it for dumpbin and say T for any non-static function,
8955    # D for any global variable and I for any imported variable.
8956    # Also find C++ and __fastcall symbols from MSVC++,
8957    # which start with @ or ?.
8958    lt_cv_sys_global_symbol_pipe="$AWK '"\
8959"     {last_section=section; section=\$ 3};"\
8960"     /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\
8961"     /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
8962"     /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\
8963"     /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\
8964"     /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\
8965"     \$ 0!~/External *\|/{next};"\
8966"     / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
8967"     {if(hide[section]) next};"\
8968"     {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\
8969"     {split(\$ 0,a,/\||\r/); split(a[2],s)};"\
8970"     s[1]~/^[@?]/{print f,s[1],s[1]; next};"\
8971"     s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\
8972"     ' prfx=^$ac_symprfx"
8973  else
8974    lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[	 ]\($symcode$symcode*\)[	 ][	 ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
8975  fi
8976  lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'"
8977
8978  # Check to see that the pipe works correctly.
8979  pipe_works=no
8980
8981  rm -f conftest*
8982  cat > conftest.$ac_ext <<_LT_EOF
8983#ifdef __cplusplus
8984extern "C" {
8985#endif
8986char nm_test_var;
8987void nm_test_func(void);
8988void nm_test_func(void){}
8989#ifdef __cplusplus
8990}
8991#endif
8992int main(){nm_test_var='a';nm_test_func();return(0);}
8993_LT_EOF
8994
8995  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
8996  (eval $ac_compile) 2>&5
8997  ac_status=$?
8998  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8999  test $ac_status = 0; }; then
9000    # Now try to grab the symbols.
9001    nlist=conftest.nm
9002    if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist\""; } >&5
9003  (eval $NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) 2>&5
9004  ac_status=$?
9005  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
9006  test $ac_status = 0; } && test -s "$nlist"; then
9007      # Try sorting and uniquifying the output.
9008      if sort "$nlist" | uniq > "$nlist"T; then
9009	mv -f "$nlist"T "$nlist"
9010      else
9011	rm -f "$nlist"T
9012      fi
9013
9014      # Make sure that we snagged all the symbols we need.
9015      if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
9016	if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
9017	  cat <<_LT_EOF > conftest.$ac_ext
9018/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests.  */
9019#if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE
9020/* DATA imports from DLLs on WIN32 can't be const, because runtime
9021   relocations are performed -- see ld's documentation on pseudo-relocs.  */
9022# define LT_DLSYM_CONST
9023#elif defined __osf__
9024/* This system does not cope well with relocations in const data.  */
9025# define LT_DLSYM_CONST
9026#else
9027# define LT_DLSYM_CONST const
9028#endif
9029
9030#ifdef __cplusplus
9031extern "C" {
9032#endif
9033
9034_LT_EOF
9035	  # Now generate the symbol file.
9036	  eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
9037
9038	  cat <<_LT_EOF >> conftest.$ac_ext
9039
9040/* The mapping between symbol names and symbols.  */
9041LT_DLSYM_CONST struct {
9042  const char *name;
9043  void       *address;
9044}
9045lt__PROGRAM__LTX_preloaded_symbols[] =
9046{
9047  { "@PROGRAM@", (void *) 0 },
9048_LT_EOF
9049	  $SED "s/^$symcode$symcode* .* \(.*\)$/  {\"\1\", (void *) \&\1},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
9050	  cat <<\_LT_EOF >> conftest.$ac_ext
9051  {0, (void *) 0}
9052};
9053
9054/* This works around a problem in FreeBSD linker */
9055#ifdef FREEBSD_WORKAROUND
9056static const void *lt_preloaded_setup() {
9057  return lt__PROGRAM__LTX_preloaded_symbols;
9058}
9059#endif
9060
9061#ifdef __cplusplus
9062}
9063#endif
9064_LT_EOF
9065	  # Now try linking the two files.
9066	  mv conftest.$ac_objext conftstm.$ac_objext
9067	  lt_globsym_save_LIBS=$LIBS
9068	  lt_globsym_save_CFLAGS=$CFLAGS
9069	  LIBS=conftstm.$ac_objext
9070	  CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag"
9071	  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
9072  (eval $ac_link) 2>&5
9073  ac_status=$?
9074  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
9075  test $ac_status = 0; } && test -s conftest$ac_exeext; then
9076	    pipe_works=yes
9077	  fi
9078	  LIBS=$lt_globsym_save_LIBS
9079	  CFLAGS=$lt_globsym_save_CFLAGS
9080	else
9081	  echo "cannot find nm_test_func in $nlist" >&5
9082	fi
9083      else
9084	echo "cannot find nm_test_var in $nlist" >&5
9085      fi
9086    else
9087      echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5
9088    fi
9089  else
9090    echo "$progname: failed program was:" >&5
9091    cat conftest.$ac_ext >&5
9092  fi
9093  rm -rf conftest* conftst*
9094
9095  # Do not use the global_symbol_pipe unless it works.
9096  if test yes = "$pipe_works"; then
9097    break
9098  else
9099    lt_cv_sys_global_symbol_pipe=
9100  fi
9101done
9102
9103fi
9104
9105if test -z "$lt_cv_sys_global_symbol_pipe"; then
9106  lt_cv_sys_global_symbol_to_cdecl=
9107fi
9108if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
9109  { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
9110$as_echo "failed" >&6; }
9111else
9112  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
9113$as_echo "ok" >&6; }
9114fi
9115
9116# Response file support.
9117if test "$lt_cv_nm_interface" = "MS dumpbin"; then
9118  nm_file_list_spec='@'
9119elif $NM --help 2>/dev/null | grep '[@]FILE' >/dev/null; then
9120  nm_file_list_spec='@'
9121fi
9122
9123
9124
9125
9126
9127
9128
9129
9130
9131
9132
9133
9134
9135
9136
9137
9138
9139
9140
9141
9142
9143
9144
9145
9146
9147
9148
9149
9150
9151
9152
9153
9154
9155
9156
9157
9158
9159{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
9160$as_echo_n "checking for sysroot... " >&6; }
9161
9162# Check whether --with-sysroot was given.
9163if test "${with_sysroot+set}" = set; then :
9164  withval=$with_sysroot;
9165else
9166  with_sysroot=no
9167fi
9168
9169
9170lt_sysroot=
9171case $with_sysroot in #(
9172 yes)
9173   if test yes = "$GCC"; then
9174     lt_sysroot=`$CC --print-sysroot 2>/dev/null`
9175   fi
9176   ;; #(
9177 /*)
9178   lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"`
9179   ;; #(
9180 no|'')
9181   ;; #(
9182 *)
9183   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_sysroot" >&5
9184$as_echo "$with_sysroot" >&6; }
9185   as_fn_error $? "The sysroot must be an absolute path." "$LINENO" 5
9186   ;;
9187esac
9188
9189 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}" >&5
9190$as_echo "${lt_sysroot:-no}" >&6; }
9191
9192
9193
9194
9195
9196{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a working dd" >&5
9197$as_echo_n "checking for a working dd... " >&6; }
9198if ${ac_cv_path_lt_DD+:} false; then :
9199  $as_echo_n "(cached) " >&6
9200else
9201  printf 0123456789abcdef0123456789abcdef >conftest.i
9202cat conftest.i conftest.i >conftest2.i
9203: ${lt_DD:=$DD}
9204if test -z "$lt_DD"; then
9205  ac_path_lt_DD_found=false
9206  # Loop through the user's path and test for each of PROGNAME-LIST
9207  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9208for as_dir in $PATH
9209do
9210  IFS=$as_save_IFS
9211  test -z "$as_dir" && as_dir=.
9212    for ac_prog in dd; do
9213    for ac_exec_ext in '' $ac_executable_extensions; do
9214      ac_path_lt_DD="$as_dir/$ac_prog$ac_exec_ext"
9215      as_fn_executable_p "$ac_path_lt_DD" || continue
9216if "$ac_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then
9217  cmp -s conftest.i conftest.out \
9218  && ac_cv_path_lt_DD="$ac_path_lt_DD" ac_path_lt_DD_found=:
9219fi
9220      $ac_path_lt_DD_found && break 3
9221    done
9222  done
9223  done
9224IFS=$as_save_IFS
9225  if test -z "$ac_cv_path_lt_DD"; then
9226    :
9227  fi
9228else
9229  ac_cv_path_lt_DD=$lt_DD
9230fi
9231
9232rm -f conftest.i conftest2.i conftest.out
9233fi
9234{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_lt_DD" >&5
9235$as_echo "$ac_cv_path_lt_DD" >&6; }
9236
9237
9238{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to truncate binary pipes" >&5
9239$as_echo_n "checking how to truncate binary pipes... " >&6; }
9240if ${lt_cv_truncate_bin+:} false; then :
9241  $as_echo_n "(cached) " >&6
9242else
9243  printf 0123456789abcdef0123456789abcdef >conftest.i
9244cat conftest.i conftest.i >conftest2.i
9245lt_cv_truncate_bin=
9246if "$ac_cv_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then
9247  cmp -s conftest.i conftest.out \
9248  && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1"
9249fi
9250rm -f conftest.i conftest2.i conftest.out
9251test -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q"
9252fi
9253{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_truncate_bin" >&5
9254$as_echo "$lt_cv_truncate_bin" >&6; }
9255
9256
9257
9258
9259
9260
9261
9262# Calculate cc_basename.  Skip known compiler wrappers and cross-prefix.
9263func_cc_basename ()
9264{
9265    for cc_temp in $*""; do
9266      case $cc_temp in
9267        compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
9268        distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
9269        \-*) ;;
9270        *) break;;
9271      esac
9272    done
9273    func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
9274}
9275
9276# Check whether --enable-libtool-lock was given.
9277if test "${enable_libtool_lock+set}" = set; then :
9278  enableval=$enable_libtool_lock;
9279fi
9280
9281test no = "$enable_libtool_lock" || enable_libtool_lock=yes
9282
9283# Some flags need to be propagated to the compiler or linker for good
9284# libtool support.
9285case $host in
9286ia64-*-hpux*)
9287  # Find out what ABI is being produced by ac_compile, and set mode
9288  # options accordingly.
9289  echo 'int i;' > conftest.$ac_ext
9290  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
9291  (eval $ac_compile) 2>&5
9292  ac_status=$?
9293  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
9294  test $ac_status = 0; }; then
9295    case `/usr/bin/file conftest.$ac_objext` in
9296      *ELF-32*)
9297	HPUX_IA64_MODE=32
9298	;;
9299      *ELF-64*)
9300	HPUX_IA64_MODE=64
9301	;;
9302    esac
9303  fi
9304  rm -rf conftest*
9305  ;;
9306*-*-irix6*)
9307  # Find out what ABI is being produced by ac_compile, and set linker
9308  # options accordingly.
9309  echo '#line '$LINENO' "configure"' > conftest.$ac_ext
9310  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
9311  (eval $ac_compile) 2>&5
9312  ac_status=$?
9313  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
9314  test $ac_status = 0; }; then
9315    if test yes = "$lt_cv_prog_gnu_ld"; then
9316      case `/usr/bin/file conftest.$ac_objext` in
9317	*32-bit*)
9318	  LD="${LD-ld} -melf32bsmip"
9319	  ;;
9320	*N32*)
9321	  LD="${LD-ld} -melf32bmipn32"
9322	  ;;
9323	*64-bit*)
9324	  LD="${LD-ld} -melf64bmip"
9325	;;
9326      esac
9327    else
9328      case `/usr/bin/file conftest.$ac_objext` in
9329	*32-bit*)
9330	  LD="${LD-ld} -32"
9331	  ;;
9332	*N32*)
9333	  LD="${LD-ld} -n32"
9334	  ;;
9335	*64-bit*)
9336	  LD="${LD-ld} -64"
9337	  ;;
9338      esac
9339    fi
9340  fi
9341  rm -rf conftest*
9342  ;;
9343
9344mips64*-*linux*)
9345  # Find out what ABI is being produced by ac_compile, and set linker
9346  # options accordingly.
9347  echo '#line '$LINENO' "configure"' > conftest.$ac_ext
9348  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
9349  (eval $ac_compile) 2>&5
9350  ac_status=$?
9351  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
9352  test $ac_status = 0; }; then
9353    emul=elf
9354    case `/usr/bin/file conftest.$ac_objext` in
9355      *32-bit*)
9356	emul="${emul}32"
9357	;;
9358      *64-bit*)
9359	emul="${emul}64"
9360	;;
9361    esac
9362    case `/usr/bin/file conftest.$ac_objext` in
9363      *MSB*)
9364	emul="${emul}btsmip"
9365	;;
9366      *LSB*)
9367	emul="${emul}ltsmip"
9368	;;
9369    esac
9370    case `/usr/bin/file conftest.$ac_objext` in
9371      *N32*)
9372	emul="${emul}n32"
9373	;;
9374    esac
9375    LD="${LD-ld} -m $emul"
9376  fi
9377  rm -rf conftest*
9378  ;;
9379
9380x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \
9381s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
9382  # Find out what ABI is being produced by ac_compile, and set linker
9383  # options accordingly.  Note that the listed cases only cover the
9384  # situations where additional linker options are needed (such as when
9385  # doing 32-bit compilation for a host where ld defaults to 64-bit, or
9386  # vice versa); the common cases where no linker options are needed do
9387  # not appear in the list.
9388  echo 'int i;' > conftest.$ac_ext
9389  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
9390  (eval $ac_compile) 2>&5
9391  ac_status=$?
9392  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
9393  test $ac_status = 0; }; then
9394    case `/usr/bin/file conftest.o` in
9395      *32-bit*)
9396	case $host in
9397	  x86_64-*kfreebsd*-gnu)
9398	    LD="${LD-ld} -m elf_i386_fbsd"
9399	    ;;
9400	  x86_64-*linux*)
9401	    case `/usr/bin/file conftest.o` in
9402	      *x86-64*)
9403		LD="${LD-ld} -m elf32_x86_64"
9404		;;
9405	      *)
9406		LD="${LD-ld} -m elf_i386"
9407		;;
9408	    esac
9409	    ;;
9410	  powerpc64le-*linux*)
9411	    LD="${LD-ld} -m elf32lppclinux"
9412	    ;;
9413	  powerpc64-*linux*)
9414	    LD="${LD-ld} -m elf32ppclinux"
9415	    ;;
9416	  s390x-*linux*)
9417	    LD="${LD-ld} -m elf_s390"
9418	    ;;
9419	  sparc64-*linux*)
9420	    LD="${LD-ld} -m elf32_sparc"
9421	    ;;
9422	esac
9423	;;
9424      *64-bit*)
9425	case $host in
9426	  x86_64-*kfreebsd*-gnu)
9427	    LD="${LD-ld} -m elf_x86_64_fbsd"
9428	    ;;
9429	  x86_64-*linux*)
9430	    LD="${LD-ld} -m elf_x86_64"
9431	    ;;
9432	  powerpcle-*linux*)
9433	    LD="${LD-ld} -m elf64lppc"
9434	    ;;
9435	  powerpc-*linux*)
9436	    LD="${LD-ld} -m elf64ppc"
9437	    ;;
9438	  s390*-*linux*|s390*-*tpf*)
9439	    LD="${LD-ld} -m elf64_s390"
9440	    ;;
9441	  sparc*-*linux*)
9442	    LD="${LD-ld} -m elf64_sparc"
9443	    ;;
9444	esac
9445	;;
9446    esac
9447  fi
9448  rm -rf conftest*
9449  ;;
9450
9451*-*-sco3.2v5*)
9452  # On SCO OpenServer 5, we need -belf to get full-featured binaries.
9453  SAVE_CFLAGS=$CFLAGS
9454  CFLAGS="$CFLAGS -belf"
9455  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5
9456$as_echo_n "checking whether the C compiler needs -belf... " >&6; }
9457if ${lt_cv_cc_needs_belf+:} false; then :
9458  $as_echo_n "(cached) " >&6
9459else
9460  ac_ext=c
9461ac_cpp='$CPP $CPPFLAGS'
9462ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
9463ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
9464ac_compiler_gnu=$ac_cv_c_compiler_gnu
9465
9466     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9467/* end confdefs.h.  */
9468
9469int
9470main ()
9471{
9472
9473  ;
9474  return 0;
9475}
9476_ACEOF
9477if ac_fn_c_try_link "$LINENO"; then :
9478  lt_cv_cc_needs_belf=yes
9479else
9480  lt_cv_cc_needs_belf=no
9481fi
9482rm -f core conftest.err conftest.$ac_objext \
9483    conftest$ac_exeext conftest.$ac_ext
9484     ac_ext=c
9485ac_cpp='$CPP $CPPFLAGS'
9486ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
9487ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
9488ac_compiler_gnu=$ac_cv_c_compiler_gnu
9489
9490fi
9491{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5
9492$as_echo "$lt_cv_cc_needs_belf" >&6; }
9493  if test yes != "$lt_cv_cc_needs_belf"; then
9494    # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
9495    CFLAGS=$SAVE_CFLAGS
9496  fi
9497  ;;
9498*-*solaris*)
9499  # Find out what ABI is being produced by ac_compile, and set linker
9500  # options accordingly.
9501  echo 'int i;' > conftest.$ac_ext
9502  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
9503  (eval $ac_compile) 2>&5
9504  ac_status=$?
9505  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
9506  test $ac_status = 0; }; then
9507    case `/usr/bin/file conftest.o` in
9508    *64-bit*)
9509      case $lt_cv_prog_gnu_ld in
9510      yes*)
9511        case $host in
9512        i?86-*-solaris*|x86_64-*-solaris*)
9513          LD="${LD-ld} -m elf_x86_64"
9514          ;;
9515        sparc*-*-solaris*)
9516          LD="${LD-ld} -m elf64_sparc"
9517          ;;
9518        esac
9519        # GNU ld 2.21 introduced _sol2 emulations.  Use them if available.
9520        if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then
9521          LD=${LD-ld}_sol2
9522        fi
9523        ;;
9524      *)
9525	if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
9526	  LD="${LD-ld} -64"
9527	fi
9528	;;
9529      esac
9530      ;;
9531    esac
9532  fi
9533  rm -rf conftest*
9534  ;;
9535esac
9536
9537need_locks=$enable_libtool_lock
9538
9539if test -n "$ac_tool_prefix"; then
9540  # Extract the first word of "${ac_tool_prefix}mt", so it can be a program name with args.
9541set dummy ${ac_tool_prefix}mt; ac_word=$2
9542{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9543$as_echo_n "checking for $ac_word... " >&6; }
9544if ${ac_cv_prog_MANIFEST_TOOL+:} false; then :
9545  $as_echo_n "(cached) " >&6
9546else
9547  if test -n "$MANIFEST_TOOL"; then
9548  ac_cv_prog_MANIFEST_TOOL="$MANIFEST_TOOL" # Let the user override the test.
9549else
9550as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9551for as_dir in $PATH
9552do
9553  IFS=$as_save_IFS
9554  test -z "$as_dir" && as_dir=.
9555    for ac_exec_ext in '' $ac_executable_extensions; do
9556  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9557    ac_cv_prog_MANIFEST_TOOL="${ac_tool_prefix}mt"
9558    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9559    break 2
9560  fi
9561done
9562  done
9563IFS=$as_save_IFS
9564
9565fi
9566fi
9567MANIFEST_TOOL=$ac_cv_prog_MANIFEST_TOOL
9568if test -n "$MANIFEST_TOOL"; then
9569  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MANIFEST_TOOL" >&5
9570$as_echo "$MANIFEST_TOOL" >&6; }
9571else
9572  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9573$as_echo "no" >&6; }
9574fi
9575
9576
9577fi
9578if test -z "$ac_cv_prog_MANIFEST_TOOL"; then
9579  ac_ct_MANIFEST_TOOL=$MANIFEST_TOOL
9580  # Extract the first word of "mt", so it can be a program name with args.
9581set dummy mt; ac_word=$2
9582{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9583$as_echo_n "checking for $ac_word... " >&6; }
9584if ${ac_cv_prog_ac_ct_MANIFEST_TOOL+:} false; then :
9585  $as_echo_n "(cached) " >&6
9586else
9587  if test -n "$ac_ct_MANIFEST_TOOL"; then
9588  ac_cv_prog_ac_ct_MANIFEST_TOOL="$ac_ct_MANIFEST_TOOL" # Let the user override the test.
9589else
9590as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9591for as_dir in $PATH
9592do
9593  IFS=$as_save_IFS
9594  test -z "$as_dir" && as_dir=.
9595    for ac_exec_ext in '' $ac_executable_extensions; do
9596  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9597    ac_cv_prog_ac_ct_MANIFEST_TOOL="mt"
9598    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9599    break 2
9600  fi
9601done
9602  done
9603IFS=$as_save_IFS
9604
9605fi
9606fi
9607ac_ct_MANIFEST_TOOL=$ac_cv_prog_ac_ct_MANIFEST_TOOL
9608if test -n "$ac_ct_MANIFEST_TOOL"; then
9609  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MANIFEST_TOOL" >&5
9610$as_echo "$ac_ct_MANIFEST_TOOL" >&6; }
9611else
9612  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9613$as_echo "no" >&6; }
9614fi
9615
9616  if test "x$ac_ct_MANIFEST_TOOL" = x; then
9617    MANIFEST_TOOL=":"
9618  else
9619    case $cross_compiling:$ac_tool_warned in
9620yes:)
9621{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9622$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9623ac_tool_warned=yes ;;
9624esac
9625    MANIFEST_TOOL=$ac_ct_MANIFEST_TOOL
9626  fi
9627else
9628  MANIFEST_TOOL="$ac_cv_prog_MANIFEST_TOOL"
9629fi
9630
9631test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt
9632{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool" >&5
9633$as_echo_n "checking if $MANIFEST_TOOL is a manifest tool... " >&6; }
9634if ${lt_cv_path_mainfest_tool+:} false; then :
9635  $as_echo_n "(cached) " >&6
9636else
9637  lt_cv_path_mainfest_tool=no
9638  echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&5
9639  $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out
9640  cat conftest.err >&5
9641  if $GREP 'Manifest Tool' conftest.out > /dev/null; then
9642    lt_cv_path_mainfest_tool=yes
9643  fi
9644  rm -f conftest*
9645fi
9646{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5
9647$as_echo "$lt_cv_path_mainfest_tool" >&6; }
9648if test yes != "$lt_cv_path_mainfest_tool"; then
9649  MANIFEST_TOOL=:
9650fi
9651
9652
9653
9654
9655
9656
9657  case $host_os in
9658    rhapsody* | darwin*)
9659    if test -n "$ac_tool_prefix"; then
9660  # Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args.
9661set dummy ${ac_tool_prefix}dsymutil; ac_word=$2
9662{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9663$as_echo_n "checking for $ac_word... " >&6; }
9664if ${ac_cv_prog_DSYMUTIL+:} false; then :
9665  $as_echo_n "(cached) " >&6
9666else
9667  if test -n "$DSYMUTIL"; then
9668  ac_cv_prog_DSYMUTIL="$DSYMUTIL" # Let the user override the test.
9669else
9670as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9671for as_dir in $PATH
9672do
9673  IFS=$as_save_IFS
9674  test -z "$as_dir" && as_dir=.
9675    for ac_exec_ext in '' $ac_executable_extensions; do
9676  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9677    ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil"
9678    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9679    break 2
9680  fi
9681done
9682  done
9683IFS=$as_save_IFS
9684
9685fi
9686fi
9687DSYMUTIL=$ac_cv_prog_DSYMUTIL
9688if test -n "$DSYMUTIL"; then
9689  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
9690$as_echo "$DSYMUTIL" >&6; }
9691else
9692  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9693$as_echo "no" >&6; }
9694fi
9695
9696
9697fi
9698if test -z "$ac_cv_prog_DSYMUTIL"; then
9699  ac_ct_DSYMUTIL=$DSYMUTIL
9700  # Extract the first word of "dsymutil", so it can be a program name with args.
9701set dummy dsymutil; ac_word=$2
9702{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9703$as_echo_n "checking for $ac_word... " >&6; }
9704if ${ac_cv_prog_ac_ct_DSYMUTIL+:} false; then :
9705  $as_echo_n "(cached) " >&6
9706else
9707  if test -n "$ac_ct_DSYMUTIL"; then
9708  ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # Let the user override the test.
9709else
9710as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9711for as_dir in $PATH
9712do
9713  IFS=$as_save_IFS
9714  test -z "$as_dir" && as_dir=.
9715    for ac_exec_ext in '' $ac_executable_extensions; do
9716  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9717    ac_cv_prog_ac_ct_DSYMUTIL="dsymutil"
9718    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9719    break 2
9720  fi
9721done
9722  done
9723IFS=$as_save_IFS
9724
9725fi
9726fi
9727ac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL
9728if test -n "$ac_ct_DSYMUTIL"; then
9729  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DSYMUTIL" >&5
9730$as_echo "$ac_ct_DSYMUTIL" >&6; }
9731else
9732  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9733$as_echo "no" >&6; }
9734fi
9735
9736  if test "x$ac_ct_DSYMUTIL" = x; then
9737    DSYMUTIL=":"
9738  else
9739    case $cross_compiling:$ac_tool_warned in
9740yes:)
9741{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9742$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9743ac_tool_warned=yes ;;
9744esac
9745    DSYMUTIL=$ac_ct_DSYMUTIL
9746  fi
9747else
9748  DSYMUTIL="$ac_cv_prog_DSYMUTIL"
9749fi
9750
9751    if test -n "$ac_tool_prefix"; then
9752  # Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args.
9753set dummy ${ac_tool_prefix}nmedit; ac_word=$2
9754{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9755$as_echo_n "checking for $ac_word... " >&6; }
9756if ${ac_cv_prog_NMEDIT+:} false; then :
9757  $as_echo_n "(cached) " >&6
9758else
9759  if test -n "$NMEDIT"; then
9760  ac_cv_prog_NMEDIT="$NMEDIT" # Let the user override the test.
9761else
9762as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9763for as_dir in $PATH
9764do
9765  IFS=$as_save_IFS
9766  test -z "$as_dir" && as_dir=.
9767    for ac_exec_ext in '' $ac_executable_extensions; do
9768  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9769    ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit"
9770    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9771    break 2
9772  fi
9773done
9774  done
9775IFS=$as_save_IFS
9776
9777fi
9778fi
9779NMEDIT=$ac_cv_prog_NMEDIT
9780if test -n "$NMEDIT"; then
9781  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NMEDIT" >&5
9782$as_echo "$NMEDIT" >&6; }
9783else
9784  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9785$as_echo "no" >&6; }
9786fi
9787
9788
9789fi
9790if test -z "$ac_cv_prog_NMEDIT"; then
9791  ac_ct_NMEDIT=$NMEDIT
9792  # Extract the first word of "nmedit", so it can be a program name with args.
9793set dummy nmedit; ac_word=$2
9794{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9795$as_echo_n "checking for $ac_word... " >&6; }
9796if ${ac_cv_prog_ac_ct_NMEDIT+:} false; then :
9797  $as_echo_n "(cached) " >&6
9798else
9799  if test -n "$ac_ct_NMEDIT"; then
9800  ac_cv_prog_ac_ct_NMEDIT="$ac_ct_NMEDIT" # Let the user override the test.
9801else
9802as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9803for as_dir in $PATH
9804do
9805  IFS=$as_save_IFS
9806  test -z "$as_dir" && as_dir=.
9807    for ac_exec_ext in '' $ac_executable_extensions; do
9808  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9809    ac_cv_prog_ac_ct_NMEDIT="nmedit"
9810    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9811    break 2
9812  fi
9813done
9814  done
9815IFS=$as_save_IFS
9816
9817fi
9818fi
9819ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT
9820if test -n "$ac_ct_NMEDIT"; then
9821  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NMEDIT" >&5
9822$as_echo "$ac_ct_NMEDIT" >&6; }
9823else
9824  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9825$as_echo "no" >&6; }
9826fi
9827
9828  if test "x$ac_ct_NMEDIT" = x; then
9829    NMEDIT=":"
9830  else
9831    case $cross_compiling:$ac_tool_warned in
9832yes:)
9833{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9834$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9835ac_tool_warned=yes ;;
9836esac
9837    NMEDIT=$ac_ct_NMEDIT
9838  fi
9839else
9840  NMEDIT="$ac_cv_prog_NMEDIT"
9841fi
9842
9843    if test -n "$ac_tool_prefix"; then
9844  # Extract the first word of "${ac_tool_prefix}lipo", so it can be a program name with args.
9845set dummy ${ac_tool_prefix}lipo; ac_word=$2
9846{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9847$as_echo_n "checking for $ac_word... " >&6; }
9848if ${ac_cv_prog_LIPO+:} false; then :
9849  $as_echo_n "(cached) " >&6
9850else
9851  if test -n "$LIPO"; then
9852  ac_cv_prog_LIPO="$LIPO" # Let the user override the test.
9853else
9854as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9855for as_dir in $PATH
9856do
9857  IFS=$as_save_IFS
9858  test -z "$as_dir" && as_dir=.
9859    for ac_exec_ext in '' $ac_executable_extensions; do
9860  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9861    ac_cv_prog_LIPO="${ac_tool_prefix}lipo"
9862    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9863    break 2
9864  fi
9865done
9866  done
9867IFS=$as_save_IFS
9868
9869fi
9870fi
9871LIPO=$ac_cv_prog_LIPO
9872if test -n "$LIPO"; then
9873  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
9874$as_echo "$LIPO" >&6; }
9875else
9876  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9877$as_echo "no" >&6; }
9878fi
9879
9880
9881fi
9882if test -z "$ac_cv_prog_LIPO"; then
9883  ac_ct_LIPO=$LIPO
9884  # Extract the first word of "lipo", so it can be a program name with args.
9885set dummy lipo; ac_word=$2
9886{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9887$as_echo_n "checking for $ac_word... " >&6; }
9888if ${ac_cv_prog_ac_ct_LIPO+:} false; then :
9889  $as_echo_n "(cached) " >&6
9890else
9891  if test -n "$ac_ct_LIPO"; then
9892  ac_cv_prog_ac_ct_LIPO="$ac_ct_LIPO" # Let the user override the test.
9893else
9894as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9895for as_dir in $PATH
9896do
9897  IFS=$as_save_IFS
9898  test -z "$as_dir" && as_dir=.
9899    for ac_exec_ext in '' $ac_executable_extensions; do
9900  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9901    ac_cv_prog_ac_ct_LIPO="lipo"
9902    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9903    break 2
9904  fi
9905done
9906  done
9907IFS=$as_save_IFS
9908
9909fi
9910fi
9911ac_ct_LIPO=$ac_cv_prog_ac_ct_LIPO
9912if test -n "$ac_ct_LIPO"; then
9913  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LIPO" >&5
9914$as_echo "$ac_ct_LIPO" >&6; }
9915else
9916  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9917$as_echo "no" >&6; }
9918fi
9919
9920  if test "x$ac_ct_LIPO" = x; then
9921    LIPO=":"
9922  else
9923    case $cross_compiling:$ac_tool_warned in
9924yes:)
9925{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9926$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9927ac_tool_warned=yes ;;
9928esac
9929    LIPO=$ac_ct_LIPO
9930  fi
9931else
9932  LIPO="$ac_cv_prog_LIPO"
9933fi
9934
9935    if test -n "$ac_tool_prefix"; then
9936  # Extract the first word of "${ac_tool_prefix}otool", so it can be a program name with args.
9937set dummy ${ac_tool_prefix}otool; ac_word=$2
9938{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9939$as_echo_n "checking for $ac_word... " >&6; }
9940if ${ac_cv_prog_OTOOL+:} false; then :
9941  $as_echo_n "(cached) " >&6
9942else
9943  if test -n "$OTOOL"; then
9944  ac_cv_prog_OTOOL="$OTOOL" # Let the user override the test.
9945else
9946as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9947for as_dir in $PATH
9948do
9949  IFS=$as_save_IFS
9950  test -z "$as_dir" && as_dir=.
9951    for ac_exec_ext in '' $ac_executable_extensions; do
9952  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9953    ac_cv_prog_OTOOL="${ac_tool_prefix}otool"
9954    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9955    break 2
9956  fi
9957done
9958  done
9959IFS=$as_save_IFS
9960
9961fi
9962fi
9963OTOOL=$ac_cv_prog_OTOOL
9964if test -n "$OTOOL"; then
9965  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
9966$as_echo "$OTOOL" >&6; }
9967else
9968  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9969$as_echo "no" >&6; }
9970fi
9971
9972
9973fi
9974if test -z "$ac_cv_prog_OTOOL"; then
9975  ac_ct_OTOOL=$OTOOL
9976  # Extract the first word of "otool", so it can be a program name with args.
9977set dummy otool; ac_word=$2
9978{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9979$as_echo_n "checking for $ac_word... " >&6; }
9980if ${ac_cv_prog_ac_ct_OTOOL+:} false; then :
9981  $as_echo_n "(cached) " >&6
9982else
9983  if test -n "$ac_ct_OTOOL"; then
9984  ac_cv_prog_ac_ct_OTOOL="$ac_ct_OTOOL" # Let the user override the test.
9985else
9986as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9987for as_dir in $PATH
9988do
9989  IFS=$as_save_IFS
9990  test -z "$as_dir" && as_dir=.
9991    for ac_exec_ext in '' $ac_executable_extensions; do
9992  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9993    ac_cv_prog_ac_ct_OTOOL="otool"
9994    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9995    break 2
9996  fi
9997done
9998  done
9999IFS=$as_save_IFS
10000
10001fi
10002fi
10003ac_ct_OTOOL=$ac_cv_prog_ac_ct_OTOOL
10004if test -n "$ac_ct_OTOOL"; then
10005  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL" >&5
10006$as_echo "$ac_ct_OTOOL" >&6; }
10007else
10008  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10009$as_echo "no" >&6; }
10010fi
10011
10012  if test "x$ac_ct_OTOOL" = x; then
10013    OTOOL=":"
10014  else
10015    case $cross_compiling:$ac_tool_warned in
10016yes:)
10017{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
10018$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
10019ac_tool_warned=yes ;;
10020esac
10021    OTOOL=$ac_ct_OTOOL
10022  fi
10023else
10024  OTOOL="$ac_cv_prog_OTOOL"
10025fi
10026
10027    if test -n "$ac_tool_prefix"; then
10028  # Extract the first word of "${ac_tool_prefix}otool64", so it can be a program name with args.
10029set dummy ${ac_tool_prefix}otool64; ac_word=$2
10030{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10031$as_echo_n "checking for $ac_word... " >&6; }
10032if ${ac_cv_prog_OTOOL64+:} false; then :
10033  $as_echo_n "(cached) " >&6
10034else
10035  if test -n "$OTOOL64"; then
10036  ac_cv_prog_OTOOL64="$OTOOL64" # Let the user override the test.
10037else
10038as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10039for as_dir in $PATH
10040do
10041  IFS=$as_save_IFS
10042  test -z "$as_dir" && as_dir=.
10043    for ac_exec_ext in '' $ac_executable_extensions; do
10044  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10045    ac_cv_prog_OTOOL64="${ac_tool_prefix}otool64"
10046    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10047    break 2
10048  fi
10049done
10050  done
10051IFS=$as_save_IFS
10052
10053fi
10054fi
10055OTOOL64=$ac_cv_prog_OTOOL64
10056if test -n "$OTOOL64"; then
10057  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL64" >&5
10058$as_echo "$OTOOL64" >&6; }
10059else
10060  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10061$as_echo "no" >&6; }
10062fi
10063
10064
10065fi
10066if test -z "$ac_cv_prog_OTOOL64"; then
10067  ac_ct_OTOOL64=$OTOOL64
10068  # Extract the first word of "otool64", so it can be a program name with args.
10069set dummy otool64; ac_word=$2
10070{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10071$as_echo_n "checking for $ac_word... " >&6; }
10072if ${ac_cv_prog_ac_ct_OTOOL64+:} false; then :
10073  $as_echo_n "(cached) " >&6
10074else
10075  if test -n "$ac_ct_OTOOL64"; then
10076  ac_cv_prog_ac_ct_OTOOL64="$ac_ct_OTOOL64" # Let the user override the test.
10077else
10078as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10079for as_dir in $PATH
10080do
10081  IFS=$as_save_IFS
10082  test -z "$as_dir" && as_dir=.
10083    for ac_exec_ext in '' $ac_executable_extensions; do
10084  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10085    ac_cv_prog_ac_ct_OTOOL64="otool64"
10086    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10087    break 2
10088  fi
10089done
10090  done
10091IFS=$as_save_IFS
10092
10093fi
10094fi
10095ac_ct_OTOOL64=$ac_cv_prog_ac_ct_OTOOL64
10096if test -n "$ac_ct_OTOOL64"; then
10097  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL64" >&5
10098$as_echo "$ac_ct_OTOOL64" >&6; }
10099else
10100  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10101$as_echo "no" >&6; }
10102fi
10103
10104  if test "x$ac_ct_OTOOL64" = x; then
10105    OTOOL64=":"
10106  else
10107    case $cross_compiling:$ac_tool_warned in
10108yes:)
10109{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
10110$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
10111ac_tool_warned=yes ;;
10112esac
10113    OTOOL64=$ac_ct_OTOOL64
10114  fi
10115else
10116  OTOOL64="$ac_cv_prog_OTOOL64"
10117fi
10118
10119
10120
10121
10122
10123
10124
10125
10126
10127
10128
10129
10130
10131
10132
10133
10134
10135
10136
10137
10138
10139
10140
10141
10142
10143
10144
10145    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -single_module linker flag" >&5
10146$as_echo_n "checking for -single_module linker flag... " >&6; }
10147if ${lt_cv_apple_cc_single_mod+:} false; then :
10148  $as_echo_n "(cached) " >&6
10149else
10150  lt_cv_apple_cc_single_mod=no
10151      if test -z "$LT_MULTI_MODULE"; then
10152	# By default we will add the -single_module flag. You can override
10153	# by either setting the environment variable LT_MULTI_MODULE
10154	# non-empty at configure time, or by adding -multi_module to the
10155	# link flags.
10156	rm -rf libconftest.dylib*
10157	echo "int foo(void){return 1;}" > conftest.c
10158	echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
10159-dynamiclib -Wl,-single_module conftest.c" >&5
10160	$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
10161	  -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
10162        _lt_result=$?
10163	# If there is a non-empty error log, and "single_module"
10164	# appears in it, assume the flag caused a linker warning
10165        if test -s conftest.err && $GREP single_module conftest.err; then
10166	  cat conftest.err >&5
10167	# Otherwise, if the output was created with a 0 exit code from
10168	# the compiler, it worked.
10169	elif test -f libconftest.dylib && test 0 = "$_lt_result"; then
10170	  lt_cv_apple_cc_single_mod=yes
10171	else
10172	  cat conftest.err >&5
10173	fi
10174	rm -rf libconftest.dylib*
10175	rm -f conftest.*
10176      fi
10177fi
10178{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5
10179$as_echo "$lt_cv_apple_cc_single_mod" >&6; }
10180
10181    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5
10182$as_echo_n "checking for -exported_symbols_list linker flag... " >&6; }
10183if ${lt_cv_ld_exported_symbols_list+:} false; then :
10184  $as_echo_n "(cached) " >&6
10185else
10186  lt_cv_ld_exported_symbols_list=no
10187      save_LDFLAGS=$LDFLAGS
10188      echo "_main" > conftest.sym
10189      LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
10190      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10191/* end confdefs.h.  */
10192
10193int
10194main ()
10195{
10196
10197  ;
10198  return 0;
10199}
10200_ACEOF
10201if ac_fn_c_try_link "$LINENO"; then :
10202  lt_cv_ld_exported_symbols_list=yes
10203else
10204  lt_cv_ld_exported_symbols_list=no
10205fi
10206rm -f core conftest.err conftest.$ac_objext \
10207    conftest$ac_exeext conftest.$ac_ext
10208	LDFLAGS=$save_LDFLAGS
10209
10210fi
10211{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5
10212$as_echo "$lt_cv_ld_exported_symbols_list" >&6; }
10213
10214    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -force_load linker flag" >&5
10215$as_echo_n "checking for -force_load linker flag... " >&6; }
10216if ${lt_cv_ld_force_load+:} false; then :
10217  $as_echo_n "(cached) " >&6
10218else
10219  lt_cv_ld_force_load=no
10220      cat > conftest.c << _LT_EOF
10221int forced_loaded() { return 2;}
10222_LT_EOF
10223      echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&5
10224      $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5
10225      echo "$AR cru libconftest.a conftest.o" >&5
10226      $AR cru libconftest.a conftest.o 2>&5
10227      echo "$RANLIB libconftest.a" >&5
10228      $RANLIB libconftest.a 2>&5
10229      cat > conftest.c << _LT_EOF
10230int main() { return 0;}
10231_LT_EOF
10232      echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&5
10233      $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err
10234      _lt_result=$?
10235      if test -s conftest.err && $GREP force_load conftest.err; then
10236	cat conftest.err >&5
10237      elif test -f conftest && test 0 = "$_lt_result" && $GREP forced_load conftest >/dev/null 2>&1; then
10238	lt_cv_ld_force_load=yes
10239      else
10240	cat conftest.err >&5
10241      fi
10242        rm -f conftest.err libconftest.a conftest conftest.c
10243        rm -rf conftest.dSYM
10244
10245fi
10246{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_force_load" >&5
10247$as_echo "$lt_cv_ld_force_load" >&6; }
10248    case $host_os in
10249    rhapsody* | darwin1.[012])
10250      _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;;
10251    darwin1.*)
10252      _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
10253    darwin*) # darwin 5.x on
10254      # if running on 10.5 or later, the deployment target defaults
10255      # to the OS version, if on x86, and 10.4, the deployment
10256      # target defaults to 10.4. Don't you love it?
10257      case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
10258	10.0,*86*-darwin8*|10.0,*-darwin[91]*)
10259	  _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
10260	10.[012][,.]*)
10261	  _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
10262	10.*)
10263	  _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
10264      esac
10265    ;;
10266  esac
10267    if test yes = "$lt_cv_apple_cc_single_mod"; then
10268      _lt_dar_single_mod='$single_module'
10269    fi
10270    if test yes = "$lt_cv_ld_exported_symbols_list"; then
10271      _lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym'
10272    else
10273      _lt_dar_export_syms='~$NMEDIT -s $output_objdir/$libname-symbols.expsym $lib'
10274    fi
10275    if test : != "$DSYMUTIL" && test no = "$lt_cv_ld_force_load"; then
10276      _lt_dsymutil='~$DSYMUTIL $lib || :'
10277    else
10278      _lt_dsymutil=
10279    fi
10280    ;;
10281  esac
10282
10283# func_munge_path_list VARIABLE PATH
10284# -----------------------------------
10285# VARIABLE is name of variable containing _space_ separated list of
10286# directories to be munged by the contents of PATH, which is string
10287# having a format:
10288# "DIR[:DIR]:"
10289#       string "DIR[ DIR]" will be prepended to VARIABLE
10290# ":DIR[:DIR]"
10291#       string "DIR[ DIR]" will be appended to VARIABLE
10292# "DIRP[:DIRP]::[DIRA:]DIRA"
10293#       string "DIRP[ DIRP]" will be prepended to VARIABLE and string
10294#       "DIRA[ DIRA]" will be appended to VARIABLE
10295# "DIR[:DIR]"
10296#       VARIABLE will be replaced by "DIR[ DIR]"
10297func_munge_path_list ()
10298{
10299    case x$2 in
10300    x)
10301        ;;
10302    *:)
10303        eval $1=\"`$ECHO $2 | $SED 's/:/ /g'` \$$1\"
10304        ;;
10305    x:*)
10306        eval $1=\"\$$1 `$ECHO $2 | $SED 's/:/ /g'`\"
10307        ;;
10308    *::*)
10309        eval $1=\"\$$1\ `$ECHO $2 | $SED -e 's/.*:://' -e 's/:/ /g'`\"
10310        eval $1=\"`$ECHO $2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \$$1\"
10311        ;;
10312    *)
10313        eval $1=\"`$ECHO $2 | $SED 's/:/ /g'`\"
10314        ;;
10315    esac
10316}
10317
10318for ac_header in dlfcn.h
10319do :
10320  ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default
10321"
10322if test "x$ac_cv_header_dlfcn_h" = xyes; then :
10323  cat >>confdefs.h <<_ACEOF
10324#define HAVE_DLFCN_H 1
10325_ACEOF
10326
10327fi
10328
10329done
10330
10331
10332
10333
10334
10335
10336
10337# Set options
10338
10339
10340
10341        enable_dlopen=no
10342
10343
10344  enable_win32_dll=no
10345
10346
10347            # Check whether --enable-shared was given.
10348if test "${enable_shared+set}" = set; then :
10349  enableval=$enable_shared; p=${PACKAGE-default}
10350    case $enableval in
10351    yes) enable_shared=yes ;;
10352    no) enable_shared=no ;;
10353    *)
10354      enable_shared=no
10355      # Look at the argument we got.  We use all the common list separators.
10356      lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
10357      for pkg in $enableval; do
10358	IFS=$lt_save_ifs
10359	if test "X$pkg" = "X$p"; then
10360	  enable_shared=yes
10361	fi
10362      done
10363      IFS=$lt_save_ifs
10364      ;;
10365    esac
10366else
10367  enable_shared=yes
10368fi
10369
10370
10371
10372
10373
10374
10375
10376
10377
10378  # Check whether --enable-static was given.
10379if test "${enable_static+set}" = set; then :
10380  enableval=$enable_static; p=${PACKAGE-default}
10381    case $enableval in
10382    yes) enable_static=yes ;;
10383    no) enable_static=no ;;
10384    *)
10385     enable_static=no
10386      # Look at the argument we got.  We use all the common list separators.
10387      lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
10388      for pkg in $enableval; do
10389	IFS=$lt_save_ifs
10390	if test "X$pkg" = "X$p"; then
10391	  enable_static=yes
10392	fi
10393      done
10394      IFS=$lt_save_ifs
10395      ;;
10396    esac
10397else
10398  enable_static=yes
10399fi
10400
10401
10402
10403
10404
10405
10406
10407
10408
10409
10410# Check whether --with-pic was given.
10411if test "${with_pic+set}" = set; then :
10412  withval=$with_pic; lt_p=${PACKAGE-default}
10413    case $withval in
10414    yes|no) pic_mode=$withval ;;
10415    *)
10416      pic_mode=default
10417      # Look at the argument we got.  We use all the common list separators.
10418      lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
10419      for lt_pkg in $withval; do
10420	IFS=$lt_save_ifs
10421	if test "X$lt_pkg" = "X$lt_p"; then
10422	  pic_mode=yes
10423	fi
10424      done
10425      IFS=$lt_save_ifs
10426      ;;
10427    esac
10428else
10429  pic_mode=default
10430fi
10431
10432
10433
10434
10435
10436
10437
10438
10439  # Check whether --enable-fast-install was given.
10440if test "${enable_fast_install+set}" = set; then :
10441  enableval=$enable_fast_install; p=${PACKAGE-default}
10442    case $enableval in
10443    yes) enable_fast_install=yes ;;
10444    no) enable_fast_install=no ;;
10445    *)
10446      enable_fast_install=no
10447      # Look at the argument we got.  We use all the common list separators.
10448      lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
10449      for pkg in $enableval; do
10450	IFS=$lt_save_ifs
10451	if test "X$pkg" = "X$p"; then
10452	  enable_fast_install=yes
10453	fi
10454      done
10455      IFS=$lt_save_ifs
10456      ;;
10457    esac
10458else
10459  enable_fast_install=yes
10460fi
10461
10462
10463
10464
10465
10466
10467
10468
10469  shared_archive_member_spec=
10470case $host,$enable_shared in
10471power*-*-aix[5-9]*,yes)
10472  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of shared library versioning to provide" >&5
10473$as_echo_n "checking which variant of shared library versioning to provide... " >&6; }
10474
10475# Check whether --with-aix-soname was given.
10476if test "${with_aix_soname+set}" = set; then :
10477  withval=$with_aix_soname; case $withval in
10478    aix|svr4|both)
10479      ;;
10480    *)
10481      as_fn_error $? "Unknown argument to --with-aix-soname" "$LINENO" 5
10482      ;;
10483    esac
10484    lt_cv_with_aix_soname=$with_aix_soname
10485else
10486  if ${lt_cv_with_aix_soname+:} false; then :
10487  $as_echo_n "(cached) " >&6
10488else
10489  lt_cv_with_aix_soname=aix
10490fi
10491
10492    with_aix_soname=$lt_cv_with_aix_soname
10493fi
10494
10495  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_aix_soname" >&5
10496$as_echo "$with_aix_soname" >&6; }
10497  if test aix != "$with_aix_soname"; then
10498    # For the AIX way of multilib, we name the shared archive member
10499    # based on the bitwidth used, traditionally 'shr.o' or 'shr_64.o',
10500    # and 'shr.imp' or 'shr_64.imp', respectively, for the Import File.
10501    # Even when GNU compilers ignore OBJECT_MODE but need '-maix64' flag,
10502    # the AIX toolchain works better with OBJECT_MODE set (default 32).
10503    if test 64 = "${OBJECT_MODE-32}"; then
10504      shared_archive_member_spec=shr_64
10505    else
10506      shared_archive_member_spec=shr
10507    fi
10508  fi
10509  ;;
10510*)
10511  with_aix_soname=aix
10512  ;;
10513esac
10514
10515
10516
10517
10518
10519
10520
10521
10522
10523
10524# This can be used to rebuild libtool when needed
10525LIBTOOL_DEPS=$ltmain
10526
10527# Always use our own libtool.
10528LIBTOOL='$(SHELL) $(top_builddir)/libtool'
10529
10530
10531
10532
10533
10534
10535
10536
10537
10538
10539
10540
10541
10542
10543
10544
10545
10546
10547
10548
10549
10550
10551
10552
10553
10554
10555
10556
10557
10558
10559test -z "$LN_S" && LN_S="ln -s"
10560
10561
10562
10563
10564
10565
10566
10567
10568
10569
10570
10571
10572
10573
10574if test -n "${ZSH_VERSION+set}"; then
10575   setopt NO_GLOB_SUBST
10576fi
10577
10578{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5
10579$as_echo_n "checking for objdir... " >&6; }
10580if ${lt_cv_objdir+:} false; then :
10581  $as_echo_n "(cached) " >&6
10582else
10583  rm -f .libs 2>/dev/null
10584mkdir .libs 2>/dev/null
10585if test -d .libs; then
10586  lt_cv_objdir=.libs
10587else
10588  # MS-DOS does not allow filenames that begin with a dot.
10589  lt_cv_objdir=_libs
10590fi
10591rmdir .libs 2>/dev/null
10592fi
10593{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_objdir" >&5
10594$as_echo "$lt_cv_objdir" >&6; }
10595objdir=$lt_cv_objdir
10596
10597
10598
10599
10600
10601cat >>confdefs.h <<_ACEOF
10602#define LT_OBJDIR "$lt_cv_objdir/"
10603_ACEOF
10604
10605
10606
10607
10608case $host_os in
10609aix3*)
10610  # AIX sometimes has problems with the GCC collect2 program.  For some
10611  # reason, if we set the COLLECT_NAMES environment variable, the problems
10612  # vanish in a puff of smoke.
10613  if test set != "${COLLECT_NAMES+set}"; then
10614    COLLECT_NAMES=
10615    export COLLECT_NAMES
10616  fi
10617  ;;
10618esac
10619
10620# Global variables:
10621ofile=libtool
10622can_build_shared=yes
10623
10624# All known linkers require a '.a' archive for static linking (except MSVC,
10625# which needs '.lib').
10626libext=a
10627
10628with_gnu_ld=$lt_cv_prog_gnu_ld
10629
10630old_CC=$CC
10631old_CFLAGS=$CFLAGS
10632
10633# Set sane defaults for various variables
10634test -z "$CC" && CC=cc
10635test -z "$LTCC" && LTCC=$CC
10636test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
10637test -z "$LD" && LD=ld
10638test -z "$ac_objext" && ac_objext=o
10639
10640func_cc_basename $compiler
10641cc_basename=$func_cc_basename_result
10642
10643
10644# Only perform the check for file, if the check method requires it
10645test -z "$MAGIC_CMD" && MAGIC_CMD=file
10646case $deplibs_check_method in
10647file_magic*)
10648  if test "$file_magic_cmd" = '$MAGIC_CMD'; then
10649    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5
10650$as_echo_n "checking for ${ac_tool_prefix}file... " >&6; }
10651if ${lt_cv_path_MAGIC_CMD+:} false; then :
10652  $as_echo_n "(cached) " >&6
10653else
10654  case $MAGIC_CMD in
10655[\\/*] |  ?:[\\/]*)
10656  lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path.
10657  ;;
10658*)
10659  lt_save_MAGIC_CMD=$MAGIC_CMD
10660  lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
10661  ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
10662  for ac_dir in $ac_dummy; do
10663    IFS=$lt_save_ifs
10664    test -z "$ac_dir" && ac_dir=.
10665    if test -f "$ac_dir/${ac_tool_prefix}file"; then
10666      lt_cv_path_MAGIC_CMD=$ac_dir/"${ac_tool_prefix}file"
10667      if test -n "$file_magic_test_file"; then
10668	case $deplibs_check_method in
10669	"file_magic "*)
10670	  file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
10671	  MAGIC_CMD=$lt_cv_path_MAGIC_CMD
10672	  if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
10673	    $EGREP "$file_magic_regex" > /dev/null; then
10674	    :
10675	  else
10676	    cat <<_LT_EOF 1>&2
10677
10678*** Warning: the command libtool uses to detect shared libraries,
10679*** $file_magic_cmd, produces output that libtool cannot recognize.
10680*** The result is that libtool may fail to recognize shared libraries
10681*** as such.  This will affect the creation of libtool libraries that
10682*** depend on shared libraries, but programs linked with such libtool
10683*** libraries will work regardless of this problem.  Nevertheless, you
10684*** may want to report the problem to your system manager and/or to
10685*** bug-libtool@gnu.org
10686
10687_LT_EOF
10688	  fi ;;
10689	esac
10690      fi
10691      break
10692    fi
10693  done
10694  IFS=$lt_save_ifs
10695  MAGIC_CMD=$lt_save_MAGIC_CMD
10696  ;;
10697esac
10698fi
10699
10700MAGIC_CMD=$lt_cv_path_MAGIC_CMD
10701if test -n "$MAGIC_CMD"; then
10702  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5
10703$as_echo "$MAGIC_CMD" >&6; }
10704else
10705  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10706$as_echo "no" >&6; }
10707fi
10708
10709
10710
10711
10712
10713if test -z "$lt_cv_path_MAGIC_CMD"; then
10714  if test -n "$ac_tool_prefix"; then
10715    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for file" >&5
10716$as_echo_n "checking for file... " >&6; }
10717if ${lt_cv_path_MAGIC_CMD+:} false; then :
10718  $as_echo_n "(cached) " >&6
10719else
10720  case $MAGIC_CMD in
10721[\\/*] |  ?:[\\/]*)
10722  lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path.
10723  ;;
10724*)
10725  lt_save_MAGIC_CMD=$MAGIC_CMD
10726  lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
10727  ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
10728  for ac_dir in $ac_dummy; do
10729    IFS=$lt_save_ifs
10730    test -z "$ac_dir" && ac_dir=.
10731    if test -f "$ac_dir/file"; then
10732      lt_cv_path_MAGIC_CMD=$ac_dir/"file"
10733      if test -n "$file_magic_test_file"; then
10734	case $deplibs_check_method in
10735	"file_magic "*)
10736	  file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
10737	  MAGIC_CMD=$lt_cv_path_MAGIC_CMD
10738	  if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
10739	    $EGREP "$file_magic_regex" > /dev/null; then
10740	    :
10741	  else
10742	    cat <<_LT_EOF 1>&2
10743
10744*** Warning: the command libtool uses to detect shared libraries,
10745*** $file_magic_cmd, produces output that libtool cannot recognize.
10746*** The result is that libtool may fail to recognize shared libraries
10747*** as such.  This will affect the creation of libtool libraries that
10748*** depend on shared libraries, but programs linked with such libtool
10749*** libraries will work regardless of this problem.  Nevertheless, you
10750*** may want to report the problem to your system manager and/or to
10751*** bug-libtool@gnu.org
10752
10753_LT_EOF
10754	  fi ;;
10755	esac
10756      fi
10757      break
10758    fi
10759  done
10760  IFS=$lt_save_ifs
10761  MAGIC_CMD=$lt_save_MAGIC_CMD
10762  ;;
10763esac
10764fi
10765
10766MAGIC_CMD=$lt_cv_path_MAGIC_CMD
10767if test -n "$MAGIC_CMD"; then
10768  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5
10769$as_echo "$MAGIC_CMD" >&6; }
10770else
10771  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10772$as_echo "no" >&6; }
10773fi
10774
10775
10776  else
10777    MAGIC_CMD=:
10778  fi
10779fi
10780
10781  fi
10782  ;;
10783esac
10784
10785# Use C for the default configuration in the libtool script
10786
10787lt_save_CC=$CC
10788ac_ext=c
10789ac_cpp='$CPP $CPPFLAGS'
10790ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
10791ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
10792ac_compiler_gnu=$ac_cv_c_compiler_gnu
10793
10794
10795# Source file extension for C test sources.
10796ac_ext=c
10797
10798# Object file extension for compiled C test sources.
10799objext=o
10800objext=$objext
10801
10802# Code to be used in simple compile tests
10803lt_simple_compile_test_code="int some_variable = 0;"
10804
10805# Code to be used in simple link tests
10806lt_simple_link_test_code='int main(){return(0);}'
10807
10808
10809
10810
10811
10812
10813
10814# If no C compiler was specified, use CC.
10815LTCC=${LTCC-"$CC"}
10816
10817# If no C compiler flags were specified, use CFLAGS.
10818LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
10819
10820# Allow CC to be a program name with arguments.
10821compiler=$CC
10822
10823# Save the default compiler, since it gets overwritten when the other
10824# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
10825compiler_DEFAULT=$CC
10826
10827# save warnings/boilerplate of simple test code
10828ac_outfile=conftest.$ac_objext
10829echo "$lt_simple_compile_test_code" >conftest.$ac_ext
10830eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
10831_lt_compiler_boilerplate=`cat conftest.err`
10832$RM conftest*
10833
10834ac_outfile=conftest.$ac_objext
10835echo "$lt_simple_link_test_code" >conftest.$ac_ext
10836eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
10837_lt_linker_boilerplate=`cat conftest.err`
10838$RM -r conftest*
10839
10840
10841if test -n "$compiler"; then
10842
10843lt_prog_compiler_no_builtin_flag=
10844
10845if test yes = "$GCC"; then
10846  case $cc_basename in
10847  nvcc*)
10848    lt_prog_compiler_no_builtin_flag=' -Xcompiler -fno-builtin' ;;
10849  *)
10850    lt_prog_compiler_no_builtin_flag=' -fno-builtin' ;;
10851  esac
10852
10853  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
10854$as_echo_n "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; }
10855if ${lt_cv_prog_compiler_rtti_exceptions+:} false; then :
10856  $as_echo_n "(cached) " >&6
10857else
10858  lt_cv_prog_compiler_rtti_exceptions=no
10859   ac_outfile=conftest.$ac_objext
10860   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
10861   lt_compiler_flag="-fno-rtti -fno-exceptions"  ## exclude from sc_useless_quotes_in_assignment
10862   # Insert the option either (1) after the last *FLAGS variable, or
10863   # (2) before a word containing "conftest.", or (3) at the end.
10864   # Note that $ac_compile itself does not contain backslashes and begins
10865   # with a dollar sign (not a hyphen), so the echo should work correctly.
10866   # The option is referenced via a variable to avoid confusing sed.
10867   lt_compile=`echo "$ac_compile" | $SED \
10868   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
10869   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
10870   -e 's:$: $lt_compiler_flag:'`
10871   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
10872   (eval "$lt_compile" 2>conftest.err)
10873   ac_status=$?
10874   cat conftest.err >&5
10875   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10876   if (exit $ac_status) && test -s "$ac_outfile"; then
10877     # The compiler can only warn and ignore the option if not recognized
10878     # So say no if there are warnings other than the usual output.
10879     $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
10880     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
10881     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
10882       lt_cv_prog_compiler_rtti_exceptions=yes
10883     fi
10884   fi
10885   $RM conftest*
10886
10887fi
10888{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5
10889$as_echo "$lt_cv_prog_compiler_rtti_exceptions" >&6; }
10890
10891if test yes = "$lt_cv_prog_compiler_rtti_exceptions"; then
10892    lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions"
10893else
10894    :
10895fi
10896
10897fi
10898
10899
10900
10901
10902
10903
10904  lt_prog_compiler_wl=
10905lt_prog_compiler_pic=
10906lt_prog_compiler_static=
10907
10908
10909  if test yes = "$GCC"; then
10910    lt_prog_compiler_wl='-Wl,'
10911    lt_prog_compiler_static='-static'
10912
10913    case $host_os in
10914      aix*)
10915      # All AIX code is PIC.
10916      if test ia64 = "$host_cpu"; then
10917	# AIX 5 now supports IA64 processor
10918	lt_prog_compiler_static='-Bstatic'
10919      fi
10920      lt_prog_compiler_pic='-fPIC'
10921      ;;
10922
10923    amigaos*)
10924      case $host_cpu in
10925      powerpc)
10926            # see comment about AmigaOS4 .so support
10927            lt_prog_compiler_pic='-fPIC'
10928        ;;
10929      m68k)
10930            # FIXME: we need at least 68020 code to build shared libraries, but
10931            # adding the '-m68020' flag to GCC prevents building anything better,
10932            # like '-m68040'.
10933            lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4'
10934        ;;
10935      esac
10936      ;;
10937
10938    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
10939      # PIC is the default for these OSes.
10940      ;;
10941
10942    mingw* | cygwin* | pw32* | os2* | cegcc*)
10943      # This hack is so that the source file can tell whether it is being
10944      # built for inclusion in a dll (and should export symbols for example).
10945      # Although the cygwin gcc ignores -fPIC, still need this for old-style
10946      # (--disable-auto-import) libraries
10947      lt_prog_compiler_pic='-DDLL_EXPORT'
10948      case $host_os in
10949      os2*)
10950	lt_prog_compiler_static='$wl-static'
10951	;;
10952      esac
10953      ;;
10954
10955    darwin* | rhapsody*)
10956      # PIC is the default on this platform
10957      # Common symbols not allowed in MH_DYLIB files
10958      lt_prog_compiler_pic='-fno-common'
10959      ;;
10960
10961    haiku*)
10962      # PIC is the default for Haiku.
10963      # The "-static" flag exists, but is broken.
10964      lt_prog_compiler_static=
10965      ;;
10966
10967    hpux*)
10968      # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
10969      # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
10970      # sets the default TLS model and affects inlining.
10971      case $host_cpu in
10972      hppa*64*)
10973	# +Z the default
10974	;;
10975      *)
10976	lt_prog_compiler_pic='-fPIC'
10977	;;
10978      esac
10979      ;;
10980
10981    interix[3-9]*)
10982      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
10983      # Instead, we relocate shared libraries at runtime.
10984      ;;
10985
10986    msdosdjgpp*)
10987      # Just because we use GCC doesn't mean we suddenly get shared libraries
10988      # on systems that don't support them.
10989      lt_prog_compiler_can_build_shared=no
10990      enable_shared=no
10991      ;;
10992
10993    *nto* | *qnx*)
10994      # QNX uses GNU C++, but need to define -shared option too, otherwise
10995      # it will coredump.
10996      lt_prog_compiler_pic='-fPIC -shared'
10997      ;;
10998
10999    sysv4*MP*)
11000      if test -d /usr/nec; then
11001	lt_prog_compiler_pic=-Kconform_pic
11002      fi
11003      ;;
11004
11005    *)
11006      lt_prog_compiler_pic='-fPIC'
11007      ;;
11008    esac
11009
11010    case $cc_basename in
11011    nvcc*) # Cuda Compiler Driver 2.2
11012      lt_prog_compiler_wl='-Xlinker '
11013      if test -n "$lt_prog_compiler_pic"; then
11014        lt_prog_compiler_pic="-Xcompiler $lt_prog_compiler_pic"
11015      fi
11016      ;;
11017    esac
11018  else
11019    # PORTME Check for flag to pass linker flags through the system compiler.
11020    case $host_os in
11021    aix*)
11022      lt_prog_compiler_wl='-Wl,'
11023      if test ia64 = "$host_cpu"; then
11024	# AIX 5 now supports IA64 processor
11025	lt_prog_compiler_static='-Bstatic'
11026      else
11027	lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp'
11028      fi
11029      ;;
11030
11031    darwin* | rhapsody*)
11032      # PIC is the default on this platform
11033      # Common symbols not allowed in MH_DYLIB files
11034      lt_prog_compiler_pic='-fno-common'
11035      case $cc_basename in
11036      nagfor*)
11037        # NAG Fortran compiler
11038        lt_prog_compiler_wl='-Wl,-Wl,,'
11039        lt_prog_compiler_pic='-PIC'
11040        lt_prog_compiler_static='-Bstatic'
11041        ;;
11042      esac
11043      ;;
11044
11045    mingw* | cygwin* | pw32* | os2* | cegcc*)
11046      # This hack is so that the source file can tell whether it is being
11047      # built for inclusion in a dll (and should export symbols for example).
11048      lt_prog_compiler_pic='-DDLL_EXPORT'
11049      case $host_os in
11050      os2*)
11051	lt_prog_compiler_static='$wl-static'
11052	;;
11053      esac
11054      ;;
11055
11056    hpux9* | hpux10* | hpux11*)
11057      lt_prog_compiler_wl='-Wl,'
11058      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
11059      # not for PA HP-UX.
11060      case $host_cpu in
11061      hppa*64*|ia64*)
11062	# +Z the default
11063	;;
11064      *)
11065	lt_prog_compiler_pic='+Z'
11066	;;
11067      esac
11068      # Is there a better lt_prog_compiler_static that works with the bundled CC?
11069      lt_prog_compiler_static='$wl-a ${wl}archive'
11070      ;;
11071
11072    irix5* | irix6* | nonstopux*)
11073      lt_prog_compiler_wl='-Wl,'
11074      # PIC (with -KPIC) is the default.
11075      lt_prog_compiler_static='-non_shared'
11076      ;;
11077
11078    linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
11079      case $cc_basename in
11080      # old Intel for x86_64, which still supported -KPIC.
11081      ecc*)
11082	lt_prog_compiler_wl='-Wl,'
11083	lt_prog_compiler_pic='-KPIC'
11084	lt_prog_compiler_static='-static'
11085        ;;
11086      # icc used to be incompatible with GCC.
11087      # ICC 10 doesn't accept -KPIC any more.
11088      icc* | ifort*)
11089	lt_prog_compiler_wl='-Wl,'
11090	lt_prog_compiler_pic='-fPIC'
11091	lt_prog_compiler_static='-static'
11092        ;;
11093      # Lahey Fortran 8.1.
11094      lf95*)
11095	lt_prog_compiler_wl='-Wl,'
11096	lt_prog_compiler_pic='--shared'
11097	lt_prog_compiler_static='--static'
11098	;;
11099      nagfor*)
11100	# NAG Fortran compiler
11101	lt_prog_compiler_wl='-Wl,-Wl,,'
11102	lt_prog_compiler_pic='-PIC'
11103	lt_prog_compiler_static='-Bstatic'
11104	;;
11105      tcc*)
11106	# Fabrice Bellard et al's Tiny C Compiler
11107	lt_prog_compiler_wl='-Wl,'
11108	lt_prog_compiler_pic='-fPIC'
11109	lt_prog_compiler_static='-static'
11110	;;
11111      pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
11112        # Portland Group compilers (*not* the Pentium gcc compiler,
11113	# which looks to be a dead project)
11114	lt_prog_compiler_wl='-Wl,'
11115	lt_prog_compiler_pic='-fpic'
11116	lt_prog_compiler_static='-Bstatic'
11117        ;;
11118      ccc*)
11119        lt_prog_compiler_wl='-Wl,'
11120        # All Alpha code is PIC.
11121        lt_prog_compiler_static='-non_shared'
11122        ;;
11123      xl* | bgxl* | bgf* | mpixl*)
11124	# IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene
11125	lt_prog_compiler_wl='-Wl,'
11126	lt_prog_compiler_pic='-qpic'
11127	lt_prog_compiler_static='-qstaticlink'
11128	;;
11129      *)
11130	case `$CC -V 2>&1 | sed 5q` in
11131	*Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [1-7].* | *Sun*Fortran*\ 8.[0-3]*)
11132	  # Sun Fortran 8.3 passes all unrecognized flags to the linker
11133	  lt_prog_compiler_pic='-KPIC'
11134	  lt_prog_compiler_static='-Bstatic'
11135	  lt_prog_compiler_wl=''
11136	  ;;
11137	*Sun\ F* | *Sun*Fortran*)
11138	  lt_prog_compiler_pic='-KPIC'
11139	  lt_prog_compiler_static='-Bstatic'
11140	  lt_prog_compiler_wl='-Qoption ld '
11141	  ;;
11142	*Sun\ C*)
11143	  # Sun C 5.9
11144	  lt_prog_compiler_pic='-KPIC'
11145	  lt_prog_compiler_static='-Bstatic'
11146	  lt_prog_compiler_wl='-Wl,'
11147	  ;;
11148        *Intel*\ [CF]*Compiler*)
11149	  lt_prog_compiler_wl='-Wl,'
11150	  lt_prog_compiler_pic='-fPIC'
11151	  lt_prog_compiler_static='-static'
11152	  ;;
11153	*Portland\ Group*)
11154	  lt_prog_compiler_wl='-Wl,'
11155	  lt_prog_compiler_pic='-fpic'
11156	  lt_prog_compiler_static='-Bstatic'
11157	  ;;
11158	esac
11159	;;
11160      esac
11161      ;;
11162
11163    newsos6)
11164      lt_prog_compiler_pic='-KPIC'
11165      lt_prog_compiler_static='-Bstatic'
11166      ;;
11167
11168    *nto* | *qnx*)
11169      # QNX uses GNU C++, but need to define -shared option too, otherwise
11170      # it will coredump.
11171      lt_prog_compiler_pic='-fPIC -shared'
11172      ;;
11173
11174    osf3* | osf4* | osf5*)
11175      lt_prog_compiler_wl='-Wl,'
11176      # All OSF/1 code is PIC.
11177      lt_prog_compiler_static='-non_shared'
11178      ;;
11179
11180    rdos*)
11181      lt_prog_compiler_static='-non_shared'
11182      ;;
11183
11184    solaris*)
11185      lt_prog_compiler_pic='-KPIC'
11186      lt_prog_compiler_static='-Bstatic'
11187      case $cc_basename in
11188      f77* | f90* | f95* | sunf77* | sunf90* | sunf95*)
11189	lt_prog_compiler_wl='-Qoption ld ';;
11190      *)
11191	lt_prog_compiler_wl='-Wl,';;
11192      esac
11193      ;;
11194
11195    sunos4*)
11196      lt_prog_compiler_wl='-Qoption ld '
11197      lt_prog_compiler_pic='-PIC'
11198      lt_prog_compiler_static='-Bstatic'
11199      ;;
11200
11201    sysv4 | sysv4.2uw2* | sysv4.3*)
11202      lt_prog_compiler_wl='-Wl,'
11203      lt_prog_compiler_pic='-KPIC'
11204      lt_prog_compiler_static='-Bstatic'
11205      ;;
11206
11207    sysv4*MP*)
11208      if test -d /usr/nec; then
11209	lt_prog_compiler_pic='-Kconform_pic'
11210	lt_prog_compiler_static='-Bstatic'
11211      fi
11212      ;;
11213
11214    sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
11215      lt_prog_compiler_wl='-Wl,'
11216      lt_prog_compiler_pic='-KPIC'
11217      lt_prog_compiler_static='-Bstatic'
11218      ;;
11219
11220    unicos*)
11221      lt_prog_compiler_wl='-Wl,'
11222      lt_prog_compiler_can_build_shared=no
11223      ;;
11224
11225    uts4*)
11226      lt_prog_compiler_pic='-pic'
11227      lt_prog_compiler_static='-Bstatic'
11228      ;;
11229
11230    *)
11231      lt_prog_compiler_can_build_shared=no
11232      ;;
11233    esac
11234  fi
11235
11236case $host_os in
11237  # For platforms that do not support PIC, -DPIC is meaningless:
11238  *djgpp*)
11239    lt_prog_compiler_pic=
11240    ;;
11241  *)
11242    lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC"
11243    ;;
11244esac
11245
11246{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5
11247$as_echo_n "checking for $compiler option to produce PIC... " >&6; }
11248if ${lt_cv_prog_compiler_pic+:} false; then :
11249  $as_echo_n "(cached) " >&6
11250else
11251  lt_cv_prog_compiler_pic=$lt_prog_compiler_pic
11252fi
11253{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic" >&5
11254$as_echo "$lt_cv_prog_compiler_pic" >&6; }
11255lt_prog_compiler_pic=$lt_cv_prog_compiler_pic
11256
11257#
11258# Check to make sure the PIC flag actually works.
11259#
11260if test -n "$lt_prog_compiler_pic"; then
11261  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5
11262$as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; }
11263if ${lt_cv_prog_compiler_pic_works+:} false; then :
11264  $as_echo_n "(cached) " >&6
11265else
11266  lt_cv_prog_compiler_pic_works=no
11267   ac_outfile=conftest.$ac_objext
11268   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
11269   lt_compiler_flag="$lt_prog_compiler_pic -DPIC"  ## exclude from sc_useless_quotes_in_assignment
11270   # Insert the option either (1) after the last *FLAGS variable, or
11271   # (2) before a word containing "conftest.", or (3) at the end.
11272   # Note that $ac_compile itself does not contain backslashes and begins
11273   # with a dollar sign (not a hyphen), so the echo should work correctly.
11274   # The option is referenced via a variable to avoid confusing sed.
11275   lt_compile=`echo "$ac_compile" | $SED \
11276   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
11277   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
11278   -e 's:$: $lt_compiler_flag:'`
11279   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
11280   (eval "$lt_compile" 2>conftest.err)
11281   ac_status=$?
11282   cat conftest.err >&5
11283   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11284   if (exit $ac_status) && test -s "$ac_outfile"; then
11285     # The compiler can only warn and ignore the option if not recognized
11286     # So say no if there are warnings other than the usual output.
11287     $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
11288     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
11289     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
11290       lt_cv_prog_compiler_pic_works=yes
11291     fi
11292   fi
11293   $RM conftest*
11294
11295fi
11296{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5
11297$as_echo "$lt_cv_prog_compiler_pic_works" >&6; }
11298
11299if test yes = "$lt_cv_prog_compiler_pic_works"; then
11300    case $lt_prog_compiler_pic in
11301     "" | " "*) ;;
11302     *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;;
11303     esac
11304else
11305    lt_prog_compiler_pic=
11306     lt_prog_compiler_can_build_shared=no
11307fi
11308
11309fi
11310
11311
11312
11313
11314
11315
11316
11317
11318
11319
11320
11321#
11322# Check to make sure the static flag actually works.
11323#
11324wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\"
11325{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5
11326$as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; }
11327if ${lt_cv_prog_compiler_static_works+:} false; then :
11328  $as_echo_n "(cached) " >&6
11329else
11330  lt_cv_prog_compiler_static_works=no
11331   save_LDFLAGS=$LDFLAGS
11332   LDFLAGS="$LDFLAGS $lt_tmp_static_flag"
11333   echo "$lt_simple_link_test_code" > conftest.$ac_ext
11334   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
11335     # The linker can only warn and ignore the option if not recognized
11336     # So say no if there are warnings
11337     if test -s conftest.err; then
11338       # Append any errors to the config.log.
11339       cat conftest.err 1>&5
11340       $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
11341       $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
11342       if diff conftest.exp conftest.er2 >/dev/null; then
11343         lt_cv_prog_compiler_static_works=yes
11344       fi
11345     else
11346       lt_cv_prog_compiler_static_works=yes
11347     fi
11348   fi
11349   $RM -r conftest*
11350   LDFLAGS=$save_LDFLAGS
11351
11352fi
11353{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5
11354$as_echo "$lt_cv_prog_compiler_static_works" >&6; }
11355
11356if test yes = "$lt_cv_prog_compiler_static_works"; then
11357    :
11358else
11359    lt_prog_compiler_static=
11360fi
11361
11362
11363
11364
11365
11366
11367
11368  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
11369$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
11370if ${lt_cv_prog_compiler_c_o+:} false; then :
11371  $as_echo_n "(cached) " >&6
11372else
11373  lt_cv_prog_compiler_c_o=no
11374   $RM -r conftest 2>/dev/null
11375   mkdir conftest
11376   cd conftest
11377   mkdir out
11378   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
11379
11380   lt_compiler_flag="-o out/conftest2.$ac_objext"
11381   # Insert the option either (1) after the last *FLAGS variable, or
11382   # (2) before a word containing "conftest.", or (3) at the end.
11383   # Note that $ac_compile itself does not contain backslashes and begins
11384   # with a dollar sign (not a hyphen), so the echo should work correctly.
11385   lt_compile=`echo "$ac_compile" | $SED \
11386   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
11387   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
11388   -e 's:$: $lt_compiler_flag:'`
11389   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
11390   (eval "$lt_compile" 2>out/conftest.err)
11391   ac_status=$?
11392   cat out/conftest.err >&5
11393   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11394   if (exit $ac_status) && test -s out/conftest2.$ac_objext
11395   then
11396     # The compiler can only warn and ignore the option if not recognized
11397     # So say no if there are warnings
11398     $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
11399     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
11400     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
11401       lt_cv_prog_compiler_c_o=yes
11402     fi
11403   fi
11404   chmod u+w . 2>&5
11405   $RM conftest*
11406   # SGI C++ compiler will create directory out/ii_files/ for
11407   # template instantiation
11408   test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
11409   $RM out/* && rmdir out
11410   cd ..
11411   $RM -r conftest
11412   $RM conftest*
11413
11414fi
11415{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5
11416$as_echo "$lt_cv_prog_compiler_c_o" >&6; }
11417
11418
11419
11420
11421
11422
11423  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
11424$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
11425if ${lt_cv_prog_compiler_c_o+:} false; then :
11426  $as_echo_n "(cached) " >&6
11427else
11428  lt_cv_prog_compiler_c_o=no
11429   $RM -r conftest 2>/dev/null
11430   mkdir conftest
11431   cd conftest
11432   mkdir out
11433   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
11434
11435   lt_compiler_flag="-o out/conftest2.$ac_objext"
11436   # Insert the option either (1) after the last *FLAGS variable, or
11437   # (2) before a word containing "conftest.", or (3) at the end.
11438   # Note that $ac_compile itself does not contain backslashes and begins
11439   # with a dollar sign (not a hyphen), so the echo should work correctly.
11440   lt_compile=`echo "$ac_compile" | $SED \
11441   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
11442   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
11443   -e 's:$: $lt_compiler_flag:'`
11444   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
11445   (eval "$lt_compile" 2>out/conftest.err)
11446   ac_status=$?
11447   cat out/conftest.err >&5
11448   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11449   if (exit $ac_status) && test -s out/conftest2.$ac_objext
11450   then
11451     # The compiler can only warn and ignore the option if not recognized
11452     # So say no if there are warnings
11453     $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
11454     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
11455     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
11456       lt_cv_prog_compiler_c_o=yes
11457     fi
11458   fi
11459   chmod u+w . 2>&5
11460   $RM conftest*
11461   # SGI C++ compiler will create directory out/ii_files/ for
11462   # template instantiation
11463   test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
11464   $RM out/* && rmdir out
11465   cd ..
11466   $RM -r conftest
11467   $RM conftest*
11468
11469fi
11470{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5
11471$as_echo "$lt_cv_prog_compiler_c_o" >&6; }
11472
11473
11474
11475
11476hard_links=nottested
11477if test no = "$lt_cv_prog_compiler_c_o" && test no != "$need_locks"; then
11478  # do not overwrite the value of need_locks provided by the user
11479  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5
11480$as_echo_n "checking if we can lock with hard links... " >&6; }
11481  hard_links=yes
11482  $RM conftest*
11483  ln conftest.a conftest.b 2>/dev/null && hard_links=no
11484  touch conftest.a
11485  ln conftest.a conftest.b 2>&5 || hard_links=no
11486  ln conftest.a conftest.b 2>/dev/null && hard_links=no
11487  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5
11488$as_echo "$hard_links" >&6; }
11489  if test no = "$hard_links"; then
11490    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&5
11491$as_echo "$as_me: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&2;}
11492    need_locks=warn
11493  fi
11494else
11495  need_locks=no
11496fi
11497
11498
11499
11500
11501
11502
11503  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5
11504$as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; }
11505
11506  runpath_var=
11507  allow_undefined_flag=
11508  always_export_symbols=no
11509  archive_cmds=
11510  archive_expsym_cmds=
11511  compiler_needs_object=no
11512  enable_shared_with_static_runtimes=no
11513  export_dynamic_flag_spec=
11514  export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
11515  hardcode_automatic=no
11516  hardcode_direct=no
11517  hardcode_direct_absolute=no
11518  hardcode_libdir_flag_spec=
11519  hardcode_libdir_separator=
11520  hardcode_minus_L=no
11521  hardcode_shlibpath_var=unsupported
11522  inherit_rpath=no
11523  link_all_deplibs=unknown
11524  module_cmds=
11525  module_expsym_cmds=
11526  old_archive_from_new_cmds=
11527  old_archive_from_expsyms_cmds=
11528  thread_safe_flag_spec=
11529  whole_archive_flag_spec=
11530  # include_expsyms should be a list of space-separated symbols to be *always*
11531  # included in the symbol list
11532  include_expsyms=
11533  # exclude_expsyms can be an extended regexp of symbols to exclude
11534  # it will be wrapped by ' (' and ')$', so one must not match beginning or
11535  # end of line.  Example: 'a|bc|.*d.*' will exclude the symbols 'a' and 'bc',
11536  # as well as any symbol that contains 'd'.
11537  exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'
11538  # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
11539  # platforms (ab)use it in PIC code, but their linkers get confused if
11540  # the symbol is explicitly referenced.  Since portable code cannot
11541  # rely on this symbol name, it's probably fine to never include it in
11542  # preloaded symbol tables.
11543  # Exclude shared library initialization/finalization symbols.
11544  extract_expsyms_cmds=
11545
11546  case $host_os in
11547  cygwin* | mingw* | pw32* | cegcc*)
11548    # FIXME: the MSVC++ port hasn't been tested in a loooong time
11549    # When not using gcc, we currently assume that we are using
11550    # Microsoft Visual C++.
11551    if test yes != "$GCC"; then
11552      with_gnu_ld=no
11553    fi
11554    ;;
11555  interix*)
11556    # we just hope/assume this is gcc and not c89 (= MSVC++)
11557    with_gnu_ld=yes
11558    ;;
11559  openbsd* | bitrig*)
11560    with_gnu_ld=no
11561    ;;
11562  esac
11563
11564  ld_shlibs=yes
11565
11566  # On some targets, GNU ld is compatible enough with the native linker
11567  # that we're better off using the native interface for both.
11568  lt_use_gnu_ld_interface=no
11569  if test yes = "$with_gnu_ld"; then
11570    case $host_os in
11571      aix*)
11572	# The AIX port of GNU ld has always aspired to compatibility
11573	# with the native linker.  However, as the warning in the GNU ld
11574	# block says, versions before 2.19.5* couldn't really create working
11575	# shared libraries, regardless of the interface used.
11576	case `$LD -v 2>&1` in
11577	  *\ \(GNU\ Binutils\)\ 2.19.5*) ;;
11578	  *\ \(GNU\ Binutils\)\ 2.[2-9]*) ;;
11579	  *\ \(GNU\ Binutils\)\ [3-9]*) ;;
11580	  *)
11581	    lt_use_gnu_ld_interface=yes
11582	    ;;
11583	esac
11584	;;
11585      *)
11586	lt_use_gnu_ld_interface=yes
11587	;;
11588    esac
11589  fi
11590
11591  if test yes = "$lt_use_gnu_ld_interface"; then
11592    # If archive_cmds runs LD, not CC, wlarc should be empty
11593    wlarc='$wl'
11594
11595    # Set some defaults for GNU ld with shared library support. These
11596    # are reset later if shared libraries are not supported. Putting them
11597    # here allows them to be overridden if necessary.
11598    runpath_var=LD_RUN_PATH
11599    hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
11600    export_dynamic_flag_spec='$wl--export-dynamic'
11601    # ancient GNU ld didn't support --whole-archive et. al.
11602    if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
11603      whole_archive_flag_spec=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
11604    else
11605      whole_archive_flag_spec=
11606    fi
11607    supports_anon_versioning=no
11608    case `$LD -v | $SED -e 's/(^)\+)\s\+//' 2>&1` in
11609      *GNU\ gold*) supports_anon_versioning=yes ;;
11610      *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11
11611      *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
11612      *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
11613      *\ 2.11.*) ;; # other 2.11 versions
11614      *) supports_anon_versioning=yes ;;
11615    esac
11616
11617    # See if GNU ld supports shared libraries.
11618    case $host_os in
11619    aix[3-9]*)
11620      # On AIX/PPC, the GNU linker is very broken
11621      if test ia64 != "$host_cpu"; then
11622	ld_shlibs=no
11623	cat <<_LT_EOF 1>&2
11624
11625*** Warning: the GNU linker, at least up to release 2.19, is reported
11626*** to be unable to reliably create shared libraries on AIX.
11627*** Therefore, libtool is disabling shared libraries support.  If you
11628*** really care for shared libraries, you may want to install binutils
11629*** 2.20 or above, or modify your PATH so that a non-GNU linker is found.
11630*** You will then need to restart the configuration process.
11631
11632_LT_EOF
11633      fi
11634      ;;
11635
11636    amigaos*)
11637      case $host_cpu in
11638      powerpc)
11639            # see comment about AmigaOS4 .so support
11640            archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
11641            archive_expsym_cmds=''
11642        ;;
11643      m68k)
11644            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)'
11645            hardcode_libdir_flag_spec='-L$libdir'
11646            hardcode_minus_L=yes
11647        ;;
11648      esac
11649      ;;
11650
11651    beos*)
11652      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
11653	allow_undefined_flag=unsupported
11654	# Joseph Beckenbach <jrb3@best.com> says some releases of gcc
11655	# support --undefined.  This deserves some investigation.  FIXME
11656	archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
11657      else
11658	ld_shlibs=no
11659      fi
11660      ;;
11661
11662    cygwin* | mingw* | pw32* | cegcc*)
11663      # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless,
11664      # as there is no search path for DLLs.
11665      hardcode_libdir_flag_spec='-L$libdir'
11666      export_dynamic_flag_spec='$wl--export-all-symbols'
11667      allow_undefined_flag=unsupported
11668      always_export_symbols=no
11669      enable_shared_with_static_runtimes=yes
11670      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'
11671      exclude_expsyms='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'
11672
11673      if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
11674        archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
11675	# If the export-symbols file already is a .def file, use it as
11676	# is; otherwise, prepend EXPORTS...
11677	archive_expsym_cmds='if   test DEF = "`$SED -n     -e '\''s/^[	 ]*//'\''     -e '\''/^\(;.*\)*$/d'\''     -e '\''s/^\(EXPORTS\|LIBRARY\)\([	 ].*\)*$/DEF/p'\''     -e q     $export_symbols`" ; then
11678          cp $export_symbols $output_objdir/$soname.def;
11679        else
11680          echo EXPORTS > $output_objdir/$soname.def;
11681          cat $export_symbols >> $output_objdir/$soname.def;
11682        fi~
11683        $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
11684      else
11685	ld_shlibs=no
11686      fi
11687      ;;
11688
11689    haiku*)
11690      archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
11691      link_all_deplibs=yes
11692      ;;
11693
11694    os2*)
11695      hardcode_libdir_flag_spec='-L$libdir'
11696      hardcode_minus_L=yes
11697      allow_undefined_flag=unsupported
11698      shrext_cmds=.dll
11699      archive_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
11700	$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
11701	$ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
11702	$ECHO EXPORTS >> $output_objdir/$libname.def~
11703	emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
11704	$CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
11705	emximp -o $lib $output_objdir/$libname.def'
11706      archive_expsym_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
11707	$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
11708	$ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
11709	$ECHO EXPORTS >> $output_objdir/$libname.def~
11710	prefix_cmds="$SED"~
11711	if test EXPORTS = "`$SED 1q $export_symbols`"; then
11712	  prefix_cmds="$prefix_cmds -e 1d";
11713	fi~
11714	prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
11715	cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
11716	$CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
11717	emximp -o $lib $output_objdir/$libname.def'
11718      old_archive_From_new_cmds='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
11719      enable_shared_with_static_runtimes=yes
11720      ;;
11721
11722    interix[3-9]*)
11723      hardcode_direct=no
11724      hardcode_shlibpath_var=no
11725      hardcode_libdir_flag_spec='$wl-rpath,$libdir'
11726      export_dynamic_flag_spec='$wl-E'
11727      # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
11728      # Instead, shared libraries are loaded at an image base (0x10000000 by
11729      # default) and relocated if they conflict, which is a slow very memory
11730      # consuming and fragmenting process.  To avoid this, we pick a random,
11731      # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
11732      # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
11733      archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
11734      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'
11735      ;;
11736
11737    gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
11738      tmp_diet=no
11739      if test linux-dietlibc = "$host_os"; then
11740	case $cc_basename in
11741	  diet\ *) tmp_diet=yes;;	# linux-dietlibc with static linking (!diet-dyn)
11742	esac
11743      fi
11744      if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
11745	 && test no = "$tmp_diet"
11746      then
11747	tmp_addflag=' $pic_flag'
11748	tmp_sharedflag='-shared'
11749	case $cc_basename,$host_cpu in
11750        pgcc*)				# Portland Group C compiler
11751	  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'
11752	  tmp_addflag=' $pic_flag'
11753	  ;;
11754	pgf77* | pgf90* | pgf95* | pgfortran*)
11755					# Portland Group f77 and f90 compilers
11756	  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'
11757	  tmp_addflag=' $pic_flag -Mnomain' ;;
11758	ecc*,ia64* | icc*,ia64*)	# Intel C compiler on ia64
11759	  tmp_addflag=' -i_dynamic' ;;
11760	efc*,ia64* | ifort*,ia64*)	# Intel Fortran compiler on ia64
11761	  tmp_addflag=' -i_dynamic -nofor_main' ;;
11762	ifc* | ifort*)			# Intel Fortran compiler
11763	  tmp_addflag=' -nofor_main' ;;
11764	lf95*)				# Lahey Fortran 8.1
11765	  whole_archive_flag_spec=
11766	  tmp_sharedflag='--shared' ;;
11767        nagfor*)                        # NAGFOR 5.3
11768          tmp_sharedflag='-Wl,-shared' ;;
11769	xl[cC]* | bgxl[cC]* | mpixl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below)
11770	  tmp_sharedflag='-qmkshrobj'
11771	  tmp_addflag= ;;
11772	nvcc*)	# Cuda Compiler Driver 2.2
11773	  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'
11774	  compiler_needs_object=yes
11775	  ;;
11776	esac
11777	case `$CC -V 2>&1 | sed 5q` in
11778	*Sun\ C*)			# Sun C 5.9
11779	  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'
11780	  compiler_needs_object=yes
11781	  tmp_sharedflag='-G' ;;
11782	*Sun\ F*)			# Sun Fortran 8.3
11783	  tmp_sharedflag='-G' ;;
11784	esac
11785	archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
11786
11787        if test yes = "$supports_anon_versioning"; then
11788          archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~
11789            cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
11790            echo "local: *; };" >> $output_objdir/$libname.ver~
11791            $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib'
11792        fi
11793
11794	case $cc_basename in
11795	tcc*)
11796	  export_dynamic_flag_spec='-rdynamic'
11797	  ;;
11798	xlf* | bgf* | bgxlf* | mpixlf*)
11799	  # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
11800	  whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive'
11801	  hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
11802	  archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
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              $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
11808	  fi
11809	  ;;
11810	esac
11811      else
11812        ld_shlibs=no
11813      fi
11814      ;;
11815
11816    netbsd*)
11817      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
11818	archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
11819	wlarc=
11820      else
11821	archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
11822	archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
11823      fi
11824      ;;
11825
11826    solaris*)
11827      if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
11828	ld_shlibs=no
11829	cat <<_LT_EOF 1>&2
11830
11831*** Warning: The releases 2.8.* of the GNU linker cannot reliably
11832*** create shared libraries on Solaris systems.  Therefore, libtool
11833*** is disabling shared libraries support.  We urge you to upgrade GNU
11834*** binutils to release 2.9.1 or newer.  Another option is to modify
11835*** your PATH or compiler configuration so that the native linker is
11836*** used, and then restart.
11837
11838_LT_EOF
11839      elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
11840	archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
11841	archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
11842      else
11843	ld_shlibs=no
11844      fi
11845      ;;
11846
11847    sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
11848      case `$LD -v 2>&1` in
11849        *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*)
11850	ld_shlibs=no
11851	cat <<_LT_EOF 1>&2
11852
11853*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot
11854*** reliably create shared libraries on SCO systems.  Therefore, libtool
11855*** is disabling shared libraries support.  We urge you to upgrade GNU
11856*** binutils to release 2.16.91.0.3 or newer.  Another option is to modify
11857*** your PATH or compiler configuration so that the native linker is
11858*** used, and then restart.
11859
11860_LT_EOF
11861	;;
11862	*)
11863	  # For security reasons, it is highly recommended that you always
11864	  # use absolute paths for naming shared libraries, and exclude the
11865	  # DT_RUNPATH tag from executables and libraries.  But doing so
11866	  # requires that you compile everything twice, which is a pain.
11867	  if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
11868	    hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
11869	    archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
11870	    archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
11871	  else
11872	    ld_shlibs=no
11873	  fi
11874	;;
11875      esac
11876      ;;
11877
11878    sunos4*)
11879      archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
11880      wlarc=
11881      hardcode_direct=yes
11882      hardcode_shlibpath_var=no
11883      ;;
11884
11885    *)
11886      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
11887	archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
11888	archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
11889      else
11890	ld_shlibs=no
11891      fi
11892      ;;
11893    esac
11894
11895    if test no = "$ld_shlibs"; then
11896      runpath_var=
11897      hardcode_libdir_flag_spec=
11898      export_dynamic_flag_spec=
11899      whole_archive_flag_spec=
11900    fi
11901  else
11902    # PORTME fill in a description of your system's linker (not GNU ld)
11903    case $host_os in
11904    aix3*)
11905      allow_undefined_flag=unsupported
11906      always_export_symbols=yes
11907      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'
11908      # Note: this linker hardcodes the directories in LIBPATH if there
11909      # are no directories specified by -L.
11910      hardcode_minus_L=yes
11911      if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then
11912	# Neither direct hardcoding nor static linking is supported with a
11913	# broken collect2.
11914	hardcode_direct=unsupported
11915      fi
11916      ;;
11917
11918    aix[4-9]*)
11919      if test ia64 = "$host_cpu"; then
11920	# On IA64, the linker does run time linking by default, so we don't
11921	# have to do anything special.
11922	aix_use_runtimelinking=no
11923	exp_sym_flag='-Bexport'
11924	no_entry_flag=
11925      else
11926	# If we're using GNU nm, then we don't want the "-C" option.
11927	# -C means demangle to GNU nm, but means don't demangle to AIX nm.
11928	# Without the "-l" option, or with the "-B" option, AIX nm treats
11929	# weak defined symbols like other global defined symbols, whereas
11930	# GNU nm marks them as "W".
11931	# While the 'weak' keyword is ignored in the Export File, we need
11932	# it in the Import File for the 'aix-soname' feature, so we have
11933	# to replace the "-B" option with "-P" for AIX nm.
11934	if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
11935	  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'
11936	else
11937	  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'
11938	fi
11939	aix_use_runtimelinking=no
11940
11941	# Test if we are trying to use run time linking or normal
11942	# AIX style linking. If -brtl is somewhere in LDFLAGS, we
11943	# have runtime linking enabled, and use it for executables.
11944	# For shared libraries, we enable/disable runtime linking
11945	# depending on the kind of the shared library created -
11946	# when "with_aix_soname,aix_use_runtimelinking" is:
11947	# "aix,no"   lib.a(lib.so.V) shared, rtl:no,  for executables
11948	# "aix,yes"  lib.so          shared, rtl:yes, for executables
11949	#            lib.a           static archive
11950	# "both,no"  lib.so.V(shr.o) shared, rtl:yes
11951	#            lib.a(lib.so.V) shared, rtl:no,  for executables
11952	# "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables
11953	#            lib.a(lib.so.V) shared, rtl:no
11954	# "svr4,*"   lib.so.V(shr.o) shared, rtl:yes, for executables
11955	#            lib.a           static archive
11956	case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*)
11957	  for ld_flag in $LDFLAGS; do
11958	  if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then
11959	    aix_use_runtimelinking=yes
11960	    break
11961	  fi
11962	  done
11963	  if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then
11964	    # With aix-soname=svr4, we create the lib.so.V shared archives only,
11965	    # so we don't have lib.a shared libs to link our executables.
11966	    # We have to force runtime linking in this case.
11967	    aix_use_runtimelinking=yes
11968	    LDFLAGS="$LDFLAGS -Wl,-brtl"
11969	  fi
11970	  ;;
11971	esac
11972
11973	exp_sym_flag='-bexport'
11974	no_entry_flag='-bnoentry'
11975      fi
11976
11977      # When large executables or shared objects are built, AIX ld can
11978      # have problems creating the table of contents.  If linking a library
11979      # or program results in "error TOC overflow" add -mminimal-toc to
11980      # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
11981      # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
11982
11983      archive_cmds=''
11984      hardcode_direct=yes
11985      hardcode_direct_absolute=yes
11986      hardcode_libdir_separator=':'
11987      link_all_deplibs=yes
11988      file_list_spec='$wl-f,'
11989      case $with_aix_soname,$aix_use_runtimelinking in
11990      aix,*) ;; # traditional, no import file
11991      svr4,* | *,yes) # use import file
11992	# The Import File defines what to hardcode.
11993	hardcode_direct=no
11994	hardcode_direct_absolute=no
11995	;;
11996      esac
11997
11998      if test yes = "$GCC"; then
11999	case $host_os in aix4.[012]|aix4.[012].*)
12000	# We only want to do this on AIX 4.2 and lower, the check
12001	# below for broken collect2 doesn't work under 4.3+
12002	  collect2name=`$CC -print-prog-name=collect2`
12003	  if test -f "$collect2name" &&
12004	   strings "$collect2name" | $GREP resolve_lib_name >/dev/null
12005	  then
12006	  # We have reworked collect2
12007	  :
12008	  else
12009	  # We have old collect2
12010	  hardcode_direct=unsupported
12011	  # It fails to find uninstalled libraries when the uninstalled
12012	  # path is not listed in the libpath.  Setting hardcode_minus_L
12013	  # to unsupported forces relinking
12014	  hardcode_minus_L=yes
12015	  hardcode_libdir_flag_spec='-L$libdir'
12016	  hardcode_libdir_separator=
12017	  fi
12018	  ;;
12019	esac
12020	shared_flag='-shared'
12021	if test yes = "$aix_use_runtimelinking"; then
12022	  shared_flag="$shared_flag "'$wl-G'
12023	fi
12024	# Need to ensure runtime linking is disabled for the traditional
12025	# shared library, or the linker may eventually find shared libraries
12026	# /with/ Import File - we do not want to mix them.
12027	shared_flag_aix='-shared'
12028	shared_flag_svr4='-shared $wl-G'
12029      else
12030	# not using gcc
12031	if test ia64 = "$host_cpu"; then
12032	# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
12033	# chokes on -Wl,-G. The following line is correct:
12034	  shared_flag='-G'
12035	else
12036	  if test yes = "$aix_use_runtimelinking"; then
12037	    shared_flag='$wl-G'
12038	  else
12039	    shared_flag='$wl-bM:SRE'
12040	  fi
12041	  shared_flag_aix='$wl-bM:SRE'
12042	  shared_flag_svr4='$wl-G'
12043	fi
12044      fi
12045
12046      export_dynamic_flag_spec='$wl-bexpall'
12047      # It seems that -bexpall does not export symbols beginning with
12048      # underscore (_), so it is better to generate a list of symbols to export.
12049      always_export_symbols=yes
12050      if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then
12051	# Warning - without using the other runtime loading flags (-brtl),
12052	# -berok will link without error, but may produce a broken library.
12053	allow_undefined_flag='-berok'
12054        # Determine the default libpath from the value encoded in an
12055        # empty executable.
12056        if test set = "${lt_cv_aix_libpath+set}"; then
12057  aix_libpath=$lt_cv_aix_libpath
12058else
12059  if ${lt_cv_aix_libpath_+:} false; then :
12060  $as_echo_n "(cached) " >&6
12061else
12062  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12063/* end confdefs.h.  */
12064
12065int
12066main ()
12067{
12068
12069  ;
12070  return 0;
12071}
12072_ACEOF
12073if ac_fn_c_try_link "$LINENO"; then :
12074
12075  lt_aix_libpath_sed='
12076      /Import File Strings/,/^$/ {
12077	  /^0/ {
12078	      s/^0  *\([^ ]*\) *$/\1/
12079	      p
12080	  }
12081      }'
12082  lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
12083  # Check for a 64-bit object if we didn't find anything.
12084  if test -z "$lt_cv_aix_libpath_"; then
12085    lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
12086  fi
12087fi
12088rm -f core conftest.err conftest.$ac_objext \
12089    conftest$ac_exeext conftest.$ac_ext
12090  if test -z "$lt_cv_aix_libpath_"; then
12091    lt_cv_aix_libpath_=/usr/lib:/lib
12092  fi
12093
12094fi
12095
12096  aix_libpath=$lt_cv_aix_libpath_
12097fi
12098
12099        hardcode_libdir_flag_spec='$wl-blibpath:$libdir:'"$aix_libpath"
12100        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
12101      else
12102	if test ia64 = "$host_cpu"; then
12103	  hardcode_libdir_flag_spec='$wl-R $libdir:/usr/lib:/lib'
12104	  allow_undefined_flag="-z nodefs"
12105	  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"
12106	else
12107	 # Determine the default libpath from the value encoded in an
12108	 # empty executable.
12109	 if test set = "${lt_cv_aix_libpath+set}"; then
12110  aix_libpath=$lt_cv_aix_libpath
12111else
12112  if ${lt_cv_aix_libpath_+:} false; then :
12113  $as_echo_n "(cached) " >&6
12114else
12115  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12116/* end confdefs.h.  */
12117
12118int
12119main ()
12120{
12121
12122  ;
12123  return 0;
12124}
12125_ACEOF
12126if ac_fn_c_try_link "$LINENO"; then :
12127
12128  lt_aix_libpath_sed='
12129      /Import File Strings/,/^$/ {
12130	  /^0/ {
12131	      s/^0  *\([^ ]*\) *$/\1/
12132	      p
12133	  }
12134      }'
12135  lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
12136  # Check for a 64-bit object if we didn't find anything.
12137  if test -z "$lt_cv_aix_libpath_"; then
12138    lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
12139  fi
12140fi
12141rm -f core conftest.err conftest.$ac_objext \
12142    conftest$ac_exeext conftest.$ac_ext
12143  if test -z "$lt_cv_aix_libpath_"; then
12144    lt_cv_aix_libpath_=/usr/lib:/lib
12145  fi
12146
12147fi
12148
12149  aix_libpath=$lt_cv_aix_libpath_
12150fi
12151
12152	 hardcode_libdir_flag_spec='$wl-blibpath:$libdir:'"$aix_libpath"
12153	  # Warning - without using the other run time loading flags,
12154	  # -berok will link without error, but may produce a broken library.
12155	  no_undefined_flag=' $wl-bernotok'
12156	  allow_undefined_flag=' $wl-berok'
12157	  if test yes = "$with_gnu_ld"; then
12158	    # We only use this code for GNU lds that support --whole-archive.
12159	    whole_archive_flag_spec='$wl--whole-archive$convenience $wl--no-whole-archive'
12160	  else
12161	    # Exported symbols can be pulled into shared objects from archives
12162	    whole_archive_flag_spec='$convenience'
12163	  fi
12164	  archive_cmds_need_lc=yes
12165	  archive_expsym_cmds='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d'
12166	  # -brtl affects multiple linker settings, -berok does not and is overridden later
12167	  compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([, ]\\)%-berok\\1%g"`'
12168	  if test svr4 != "$with_aix_soname"; then
12169	    # This is similar to how AIX traditionally builds its shared libraries.
12170	    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'
12171	  fi
12172	  if test aix != "$with_aix_soname"; then
12173	    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'
12174	  else
12175	    # used by -dlpreopen to get the symbols
12176	    archive_expsym_cmds="$archive_expsym_cmds"'~$MV  $output_objdir/$realname.d/$soname $output_objdir'
12177	  fi
12178	  archive_expsym_cmds="$archive_expsym_cmds"'~$RM -r $output_objdir/$realname.d'
12179	fi
12180      fi
12181      ;;
12182
12183    amigaos*)
12184      case $host_cpu in
12185      powerpc)
12186            # see comment about AmigaOS4 .so support
12187            archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
12188            archive_expsym_cmds=''
12189        ;;
12190      m68k)
12191            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)'
12192            hardcode_libdir_flag_spec='-L$libdir'
12193            hardcode_minus_L=yes
12194        ;;
12195      esac
12196      ;;
12197
12198    bsdi[45]*)
12199      export_dynamic_flag_spec=-rdynamic
12200      ;;
12201
12202    cygwin* | mingw* | pw32* | cegcc*)
12203      # When not using gcc, we currently assume that we are using
12204      # Microsoft Visual C++.
12205      # hardcode_libdir_flag_spec is actually meaningless, as there is
12206      # no search path for DLLs.
12207      case $cc_basename in
12208      cl*)
12209	# Native MSVC
12210	hardcode_libdir_flag_spec=' '
12211	allow_undefined_flag=unsupported
12212	always_export_symbols=yes
12213	file_list_spec='@'
12214	# Tell ltmain to make .lib files, not .a files.
12215	libext=lib
12216	# Tell ltmain to make .dll files, not .so files.
12217	shrext_cmds=.dll
12218	# FIXME: Setting linknames here is a bad hack.
12219	archive_cmds='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames='
12220	archive_expsym_cmds='if   test DEF = "`$SED -n     -e '\''s/^[	 ]*//'\''     -e '\''/^\(;.*\)*$/d'\''     -e '\''s/^\(EXPORTS\|LIBRARY\)\([	 ].*\)*$/DEF/p'\''     -e q     $export_symbols`" ; then
12221            cp "$export_symbols" "$output_objdir/$soname.def";
12222            echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp";
12223          else
12224            $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp;
12225          fi~
12226          $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
12227          linknames='
12228	# The linker will not automatically build a static lib if we build a DLL.
12229	# _LT_TAGVAR(old_archive_from_new_cmds, )='true'
12230	enable_shared_with_static_runtimes=yes
12231	exclude_expsyms='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
12232	export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1,DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols'
12233	# Don't use ranlib
12234	old_postinstall_cmds='chmod 644 $oldlib'
12235	postlink_cmds='lt_outputfile="@OUTPUT@"~
12236          lt_tool_outputfile="@TOOL_OUTPUT@"~
12237          case $lt_outputfile in
12238            *.exe|*.EXE) ;;
12239            *)
12240              lt_outputfile=$lt_outputfile.exe
12241              lt_tool_outputfile=$lt_tool_outputfile.exe
12242              ;;
12243          esac~
12244          if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then
12245            $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
12246            $RM "$lt_outputfile.manifest";
12247          fi'
12248	;;
12249      *)
12250	# Assume MSVC wrapper
12251	hardcode_libdir_flag_spec=' '
12252	allow_undefined_flag=unsupported
12253	# Tell ltmain to make .lib files, not .a files.
12254	libext=lib
12255	# Tell ltmain to make .dll files, not .so files.
12256	shrext_cmds=.dll
12257	# FIXME: Setting linknames here is a bad hack.
12258	archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
12259	# The linker will automatically build a .lib file if we build a DLL.
12260	old_archive_from_new_cmds='true'
12261	# FIXME: Should let the user specify the lib program.
12262	old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs'
12263	enable_shared_with_static_runtimes=yes
12264	;;
12265      esac
12266      ;;
12267
12268    darwin* | rhapsody*)
12269
12270
12271  archive_cmds_need_lc=no
12272  hardcode_direct=no
12273  hardcode_automatic=yes
12274  hardcode_shlibpath_var=unsupported
12275  if test yes = "$lt_cv_ld_force_load"; then
12276    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\"`'
12277
12278  else
12279    whole_archive_flag_spec=''
12280  fi
12281  link_all_deplibs=yes
12282  allow_undefined_flag=$_lt_dar_allow_undefined
12283  case $cc_basename in
12284     ifort*|nagfor*) _lt_dar_can_shared=yes ;;
12285     *) _lt_dar_can_shared=$GCC ;;
12286  esac
12287  if test yes = "$_lt_dar_can_shared"; then
12288    output_verbose_link_cmd=func_echo_all
12289    archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dsymutil"
12290    module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil"
12291    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"
12292    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"
12293
12294  else
12295  ld_shlibs=no
12296  fi
12297
12298      ;;
12299
12300    dgux*)
12301      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
12302      hardcode_libdir_flag_spec='-L$libdir'
12303      hardcode_shlibpath_var=no
12304      ;;
12305
12306    # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
12307    # support.  Future versions do this automatically, but an explicit c++rt0.o
12308    # does not break anything, and helps significantly (at the cost of a little
12309    # extra space).
12310    freebsd2.2*)
12311      archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
12312      hardcode_libdir_flag_spec='-R$libdir'
12313      hardcode_direct=yes
12314      hardcode_shlibpath_var=no
12315      ;;
12316
12317    # Unfortunately, older versions of FreeBSD 2 do not have this feature.
12318    freebsd2.*)
12319      archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
12320      hardcode_direct=yes
12321      hardcode_minus_L=yes
12322      hardcode_shlibpath_var=no
12323      ;;
12324
12325    # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
12326    freebsd* | dragonfly*)
12327      archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
12328      hardcode_libdir_flag_spec='-R$libdir'
12329      hardcode_direct=yes
12330      hardcode_shlibpath_var=no
12331      ;;
12332
12333    hpux9*)
12334      if test yes = "$GCC"; then
12335	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'
12336      else
12337	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'
12338      fi
12339      hardcode_libdir_flag_spec='$wl+b $wl$libdir'
12340      hardcode_libdir_separator=:
12341      hardcode_direct=yes
12342
12343      # hardcode_minus_L: Not really in the search PATH,
12344      # but as the default location of the library.
12345      hardcode_minus_L=yes
12346      export_dynamic_flag_spec='$wl-E'
12347      ;;
12348
12349    hpux10*)
12350      if test yes,no = "$GCC,$with_gnu_ld"; then
12351	archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
12352      else
12353	archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
12354      fi
12355      if test no = "$with_gnu_ld"; then
12356	hardcode_libdir_flag_spec='$wl+b $wl$libdir'
12357	hardcode_libdir_separator=:
12358	hardcode_direct=yes
12359	hardcode_direct_absolute=yes
12360	export_dynamic_flag_spec='$wl-E'
12361	# hardcode_minus_L: Not really in the search PATH,
12362	# but as the default location of the library.
12363	hardcode_minus_L=yes
12364      fi
12365      ;;
12366
12367    hpux11*)
12368      if test yes,no = "$GCC,$with_gnu_ld"; then
12369	case $host_cpu in
12370	hppa*64*)
12371	  archive_cmds='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
12372	  ;;
12373	ia64*)
12374	  archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
12375	  ;;
12376	*)
12377	  archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
12378	  ;;
12379	esac
12380      else
12381	case $host_cpu in
12382	hppa*64*)
12383	  archive_cmds='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
12384	  ;;
12385	ia64*)
12386	  archive_cmds='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
12387	  ;;
12388	*)
12389
12390	  # Older versions of the 11.00 compiler do not understand -b yet
12391	  # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does)
12392	  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC understands -b" >&5
12393$as_echo_n "checking if $CC understands -b... " >&6; }
12394if ${lt_cv_prog_compiler__b+:} false; then :
12395  $as_echo_n "(cached) " >&6
12396else
12397  lt_cv_prog_compiler__b=no
12398   save_LDFLAGS=$LDFLAGS
12399   LDFLAGS="$LDFLAGS -b"
12400   echo "$lt_simple_link_test_code" > conftest.$ac_ext
12401   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
12402     # The linker can only warn and ignore the option if not recognized
12403     # So say no if there are warnings
12404     if test -s conftest.err; then
12405       # Append any errors to the config.log.
12406       cat conftest.err 1>&5
12407       $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
12408       $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
12409       if diff conftest.exp conftest.er2 >/dev/null; then
12410         lt_cv_prog_compiler__b=yes
12411       fi
12412     else
12413       lt_cv_prog_compiler__b=yes
12414     fi
12415   fi
12416   $RM -r conftest*
12417   LDFLAGS=$save_LDFLAGS
12418
12419fi
12420{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler__b" >&5
12421$as_echo "$lt_cv_prog_compiler__b" >&6; }
12422
12423if test yes = "$lt_cv_prog_compiler__b"; then
12424    archive_cmds='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
12425else
12426    archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
12427fi
12428
12429	  ;;
12430	esac
12431      fi
12432      if test no = "$with_gnu_ld"; then
12433	hardcode_libdir_flag_spec='$wl+b $wl$libdir'
12434	hardcode_libdir_separator=:
12435
12436	case $host_cpu in
12437	hppa*64*|ia64*)
12438	  hardcode_direct=no
12439	  hardcode_shlibpath_var=no
12440	  ;;
12441	*)
12442	  hardcode_direct=yes
12443	  hardcode_direct_absolute=yes
12444	  export_dynamic_flag_spec='$wl-E'
12445
12446	  # hardcode_minus_L: Not really in the search PATH,
12447	  # but as the default location of the library.
12448	  hardcode_minus_L=yes
12449	  ;;
12450	esac
12451      fi
12452      ;;
12453
12454    irix5* | irix6* | nonstopux*)
12455      if test yes = "$GCC"; then
12456	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'
12457	# Try to use the -exported_symbol ld option, if it does not
12458	# work, assume that -exports_file does not work either and
12459	# implicitly export all symbols.
12460	# This should be the same for all languages, so no per-tag cache variable.
12461	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5
12462$as_echo_n "checking whether the $host_os linker accepts -exported_symbol... " >&6; }
12463if ${lt_cv_irix_exported_symbol+:} false; then :
12464  $as_echo_n "(cached) " >&6
12465else
12466  save_LDFLAGS=$LDFLAGS
12467	   LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null"
12468	   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12469/* end confdefs.h.  */
12470int foo (void) { return 0; }
12471_ACEOF
12472if ac_fn_c_try_link "$LINENO"; then :
12473  lt_cv_irix_exported_symbol=yes
12474else
12475  lt_cv_irix_exported_symbol=no
12476fi
12477rm -f core conftest.err conftest.$ac_objext \
12478    conftest$ac_exeext conftest.$ac_ext
12479           LDFLAGS=$save_LDFLAGS
12480fi
12481{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5
12482$as_echo "$lt_cv_irix_exported_symbol" >&6; }
12483	if test yes = "$lt_cv_irix_exported_symbol"; then
12484          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'
12485	fi
12486      else
12487	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'
12488	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'
12489      fi
12490      archive_cmds_need_lc='no'
12491      hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
12492      hardcode_libdir_separator=:
12493      inherit_rpath=yes
12494      link_all_deplibs=yes
12495      ;;
12496
12497    linux*)
12498      case $cc_basename in
12499      tcc*)
12500	# Fabrice Bellard et al's Tiny C Compiler
12501	ld_shlibs=yes
12502	archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
12503	;;
12504      esac
12505      ;;
12506
12507    netbsd*)
12508      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
12509	archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
12510      else
12511	archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
12512      fi
12513      hardcode_libdir_flag_spec='-R$libdir'
12514      hardcode_direct=yes
12515      hardcode_shlibpath_var=no
12516      ;;
12517
12518    newsos6)
12519      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
12520      hardcode_direct=yes
12521      hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
12522      hardcode_libdir_separator=:
12523      hardcode_shlibpath_var=no
12524      ;;
12525
12526    *nto* | *qnx*)
12527      ;;
12528
12529    openbsd* | bitrig*)
12530      if test -f /usr/libexec/ld.so; then
12531	hardcode_direct=yes
12532	hardcode_shlibpath_var=no
12533	hardcode_direct_absolute=yes
12534	if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
12535	  archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
12536	  archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols'
12537	  hardcode_libdir_flag_spec='$wl-rpath,$libdir'
12538	  export_dynamic_flag_spec='$wl-E'
12539	else
12540	  archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
12541	  hardcode_libdir_flag_spec='$wl-rpath,$libdir'
12542	fi
12543      else
12544	ld_shlibs=no
12545      fi
12546      ;;
12547
12548    os2*)
12549      hardcode_libdir_flag_spec='-L$libdir'
12550      hardcode_minus_L=yes
12551      allow_undefined_flag=unsupported
12552      shrext_cmds=.dll
12553      archive_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
12554	$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
12555	$ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
12556	$ECHO EXPORTS >> $output_objdir/$libname.def~
12557	emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
12558	$CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
12559	emximp -o $lib $output_objdir/$libname.def'
12560      archive_expsym_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
12561	$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
12562	$ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
12563	$ECHO EXPORTS >> $output_objdir/$libname.def~
12564	prefix_cmds="$SED"~
12565	if test EXPORTS = "`$SED 1q $export_symbols`"; then
12566	  prefix_cmds="$prefix_cmds -e 1d";
12567	fi~
12568	prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
12569	cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
12570	$CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
12571	emximp -o $lib $output_objdir/$libname.def'
12572      old_archive_From_new_cmds='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
12573      enable_shared_with_static_runtimes=yes
12574      ;;
12575
12576    osf3*)
12577      if test yes = "$GCC"; then
12578	allow_undefined_flag=' $wl-expect_unresolved $wl\*'
12579	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'
12580      else
12581	allow_undefined_flag=' -expect_unresolved \*'
12582	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'
12583      fi
12584      archive_cmds_need_lc='no'
12585      hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
12586      hardcode_libdir_separator=:
12587      ;;
12588
12589    osf4* | osf5*)	# as osf3* with the addition of -msym flag
12590      if test yes = "$GCC"; then
12591	allow_undefined_flag=' $wl-expect_unresolved $wl\*'
12592	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'
12593	hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
12594      else
12595	allow_undefined_flag=' -expect_unresolved \*'
12596	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'
12597	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~
12598          $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'
12599
12600	# Both c and cxx compiler support -rpath directly
12601	hardcode_libdir_flag_spec='-rpath $libdir'
12602      fi
12603      archive_cmds_need_lc='no'
12604      hardcode_libdir_separator=:
12605      ;;
12606
12607    solaris*)
12608      no_undefined_flag=' -z defs'
12609      if test yes = "$GCC"; then
12610	wlarc='$wl'
12611	archive_cmds='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
12612	archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
12613          $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'
12614      else
12615	case `$CC -V 2>&1` in
12616	*"Compilers 5.0"*)
12617	  wlarc=''
12618	  archive_cmds='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags'
12619	  archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
12620            $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
12621	  ;;
12622	*)
12623	  wlarc='$wl'
12624	  archive_cmds='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags'
12625	  archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
12626            $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
12627	  ;;
12628	esac
12629      fi
12630      hardcode_libdir_flag_spec='-R$libdir'
12631      hardcode_shlibpath_var=no
12632      case $host_os in
12633      solaris2.[0-5] | solaris2.[0-5].*) ;;
12634      *)
12635	# The compiler driver will combine and reorder linker options,
12636	# but understands '-z linker_flag'.  GCC discards it without '$wl',
12637	# but is careful enough not to reorder.
12638	# Supported since Solaris 2.6 (maybe 2.5.1?)
12639	if test yes = "$GCC"; then
12640	  whole_archive_flag_spec='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract'
12641	else
12642	  whole_archive_flag_spec='-z allextract$convenience -z defaultextract'
12643	fi
12644	;;
12645      esac
12646      link_all_deplibs=yes
12647      ;;
12648
12649    sunos4*)
12650      if test sequent = "$host_vendor"; then
12651	# Use $CC to link under sequent, because it throws in some extra .o
12652	# files that make .init and .fini sections work.
12653	archive_cmds='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags'
12654      else
12655	archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
12656      fi
12657      hardcode_libdir_flag_spec='-L$libdir'
12658      hardcode_direct=yes
12659      hardcode_minus_L=yes
12660      hardcode_shlibpath_var=no
12661      ;;
12662
12663    sysv4)
12664      case $host_vendor in
12665	sni)
12666	  archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
12667	  hardcode_direct=yes # is this really true???
12668	;;
12669	siemens)
12670	  ## LD is ld it makes a PLAMLIB
12671	  ## CC just makes a GrossModule.
12672	  archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
12673	  reload_cmds='$CC -r -o $output$reload_objs'
12674	  hardcode_direct=no
12675        ;;
12676	motorola)
12677	  archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
12678	  hardcode_direct=no #Motorola manual says yes, but my tests say they lie
12679	;;
12680      esac
12681      runpath_var='LD_RUN_PATH'
12682      hardcode_shlibpath_var=no
12683      ;;
12684
12685    sysv4.3*)
12686      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
12687      hardcode_shlibpath_var=no
12688      export_dynamic_flag_spec='-Bexport'
12689      ;;
12690
12691    sysv4*MP*)
12692      if test -d /usr/nec; then
12693	archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
12694	hardcode_shlibpath_var=no
12695	runpath_var=LD_RUN_PATH
12696	hardcode_runpath_var=yes
12697	ld_shlibs=yes
12698      fi
12699      ;;
12700
12701    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*)
12702      no_undefined_flag='$wl-z,text'
12703      archive_cmds_need_lc=no
12704      hardcode_shlibpath_var=no
12705      runpath_var='LD_RUN_PATH'
12706
12707      if test yes = "$GCC"; then
12708	archive_cmds='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
12709	archive_expsym_cmds='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
12710      else
12711	archive_cmds='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
12712	archive_expsym_cmds='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
12713      fi
12714      ;;
12715
12716    sysv5* | sco3.2v5* | sco5v6*)
12717      # Note: We CANNOT use -z defs as we might desire, because we do not
12718      # link with -lc, and that would cause any symbols used from libc to
12719      # always be unresolved, which means just about no library would
12720      # ever link correctly.  If we're not using GNU ld we use -z text
12721      # though, which does catch some bad symbols but isn't as heavy-handed
12722      # as -z defs.
12723      no_undefined_flag='$wl-z,text'
12724      allow_undefined_flag='$wl-z,nodefs'
12725      archive_cmds_need_lc=no
12726      hardcode_shlibpath_var=no
12727      hardcode_libdir_flag_spec='$wl-R,$libdir'
12728      hardcode_libdir_separator=':'
12729      link_all_deplibs=yes
12730      export_dynamic_flag_spec='$wl-Bexport'
12731      runpath_var='LD_RUN_PATH'
12732
12733      if test yes = "$GCC"; then
12734	archive_cmds='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
12735	archive_expsym_cmds='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
12736      else
12737	archive_cmds='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
12738	archive_expsym_cmds='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
12739      fi
12740      ;;
12741
12742    uts4*)
12743      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
12744      hardcode_libdir_flag_spec='-L$libdir'
12745      hardcode_shlibpath_var=no
12746      ;;
12747
12748    *)
12749      ld_shlibs=no
12750      ;;
12751    esac
12752
12753    if test sni = "$host_vendor"; then
12754      case $host in
12755      sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
12756	export_dynamic_flag_spec='$wl-Blargedynsym'
12757	;;
12758      esac
12759    fi
12760  fi
12761
12762{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5
12763$as_echo "$ld_shlibs" >&6; }
12764test no = "$ld_shlibs" && can_build_shared=no
12765
12766with_gnu_ld=$with_gnu_ld
12767
12768
12769
12770
12771
12772
12773
12774
12775
12776
12777
12778
12779
12780
12781
12782#
12783# Do we need to explicitly link libc?
12784#
12785case "x$archive_cmds_need_lc" in
12786x|xyes)
12787  # Assume -lc should be added
12788  archive_cmds_need_lc=yes
12789
12790  if test yes,yes = "$GCC,$enable_shared"; then
12791    case $archive_cmds in
12792    *'~'*)
12793      # FIXME: we may have to deal with multi-command sequences.
12794      ;;
12795    '$CC '*)
12796      # Test whether the compiler implicitly links with -lc since on some
12797      # systems, -lgcc has to come before -lc. If gcc already passes -lc
12798      # to ld, don't add -lc before -lgcc.
12799      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5
12800$as_echo_n "checking whether -lc should be explicitly linked in... " >&6; }
12801if ${lt_cv_archive_cmds_need_lc+:} false; then :
12802  $as_echo_n "(cached) " >&6
12803else
12804  $RM conftest*
12805	echo "$lt_simple_compile_test_code" > conftest.$ac_ext
12806
12807	if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
12808  (eval $ac_compile) 2>&5
12809  ac_status=$?
12810  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
12811  test $ac_status = 0; } 2>conftest.err; then
12812	  soname=conftest
12813	  lib=conftest
12814	  libobjs=conftest.$ac_objext
12815	  deplibs=
12816	  wl=$lt_prog_compiler_wl
12817	  pic_flag=$lt_prog_compiler_pic
12818	  compiler_flags=-v
12819	  linker_flags=-v
12820	  verstring=
12821	  output_objdir=.
12822	  libname=conftest
12823	  lt_save_allow_undefined_flag=$allow_undefined_flag
12824	  allow_undefined_flag=
12825	  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5
12826  (eval $archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5
12827  ac_status=$?
12828  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
12829  test $ac_status = 0; }
12830	  then
12831	    lt_cv_archive_cmds_need_lc=no
12832	  else
12833	    lt_cv_archive_cmds_need_lc=yes
12834	  fi
12835	  allow_undefined_flag=$lt_save_allow_undefined_flag
12836	else
12837	  cat conftest.err 1>&5
12838	fi
12839	$RM conftest*
12840
12841fi
12842{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc" >&5
12843$as_echo "$lt_cv_archive_cmds_need_lc" >&6; }
12844      archive_cmds_need_lc=$lt_cv_archive_cmds_need_lc
12845      ;;
12846    esac
12847  fi
12848  ;;
12849esac
12850
12851
12852
12853
12854
12855
12856
12857
12858
12859
12860
12861
12862
12863
12864
12865
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  { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5
13003$as_echo_n "checking dynamic linker characteristics... " >&6; }
13004
13005if test yes = "$GCC"; then
13006  case $host_os in
13007    darwin*) lt_awk_arg='/^libraries:/,/LR/' ;;
13008    *) lt_awk_arg='/^libraries:/' ;;
13009  esac
13010  case $host_os in
13011    mingw* | cegcc*) lt_sed_strip_eq='s|=\([A-Za-z]:\)|\1|g' ;;
13012    *) lt_sed_strip_eq='s|=/|/|g' ;;
13013  esac
13014  lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq`
13015  case $lt_search_path_spec in
13016  *\;*)
13017    # if the path contains ";" then we assume it to be the separator
13018    # otherwise default to the standard path separator (i.e. ":") - it is
13019    # assumed that no part of a normal pathname contains ";" but that should
13020    # okay in the real world where ";" in dirpaths is itself problematic.
13021    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'`
13022    ;;
13023  *)
13024    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"`
13025    ;;
13026  esac
13027  # Ok, now we have the path, separated by spaces, we can step through it
13028  # and add multilib dir if necessary...
13029  lt_tmp_lt_search_path_spec=
13030  lt_multi_os_dir=/`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
13031  # ...but if some path component already ends with the multilib dir we assume
13032  # that all is fine and trust -print-search-dirs as is (GCC 4.2? or newer).
13033  case "$lt_multi_os_dir; $lt_search_path_spec " in
13034  "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*)
13035    lt_multi_os_dir=
13036    ;;
13037  esac
13038  for lt_sys_path in $lt_search_path_spec; do
13039    if test -d "$lt_sys_path$lt_multi_os_dir"; then
13040      lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path$lt_multi_os_dir"
13041    elif test -n "$lt_multi_os_dir"; then
13042      test -d "$lt_sys_path" && \
13043	lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
13044    fi
13045  done
13046  lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk '
13047BEGIN {RS = " "; FS = "/|\n";} {
13048  lt_foo = "";
13049  lt_count = 0;
13050  for (lt_i = NF; lt_i > 0; lt_i--) {
13051    if ($lt_i != "" && $lt_i != ".") {
13052      if ($lt_i == "..") {
13053        lt_count++;
13054      } else {
13055        if (lt_count == 0) {
13056          lt_foo = "/" $lt_i lt_foo;
13057        } else {
13058          lt_count--;
13059        }
13060      }
13061    }
13062  }
13063  if (lt_foo != "") { lt_freq[lt_foo]++; }
13064  if (lt_freq[lt_foo] == 1) { print lt_foo; }
13065}'`
13066  # AWK program above erroneously prepends '/' to C:/dos/paths
13067  # for these hosts.
13068  case $host_os in
13069    mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\
13070      $SED 's|/\([A-Za-z]:\)|\1|g'` ;;
13071  esac
13072  sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP`
13073else
13074  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
13075fi
13076library_names_spec=
13077libname_spec='lib$name'
13078soname_spec=
13079shrext_cmds=.so
13080postinstall_cmds=
13081postuninstall_cmds=
13082finish_cmds=
13083finish_eval=
13084shlibpath_var=
13085shlibpath_overrides_runpath=unknown
13086version_type=none
13087dynamic_linker="$host_os ld.so"
13088sys_lib_dlsearch_path_spec="/lib /usr/lib"
13089need_lib_prefix=unknown
13090hardcode_into_libs=no
13091
13092# when you set need_version to no, make sure it does not cause -set_version
13093# flags to be left without arguments
13094need_version=unknown
13095
13096
13097
13098case $host_os in
13099aix3*)
13100  version_type=linux # correct to gnu/linux during the next big refactor
13101  library_names_spec='$libname$release$shared_ext$versuffix $libname.a'
13102  shlibpath_var=LIBPATH
13103
13104  # AIX 3 has no versioning support, so we append a major version to the name.
13105  soname_spec='$libname$release$shared_ext$major'
13106  ;;
13107
13108aix[4-9]*)
13109  version_type=linux # correct to gnu/linux during the next big refactor
13110  need_lib_prefix=no
13111  need_version=no
13112  hardcode_into_libs=yes
13113  if test ia64 = "$host_cpu"; then
13114    # AIX 5 supports IA64
13115    library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext'
13116    shlibpath_var=LD_LIBRARY_PATH
13117  else
13118    # With GCC up to 2.95.x, collect2 would create an import file
13119    # for dependence libraries.  The import file would start with
13120    # the line '#! .'.  This would cause the generated library to
13121    # depend on '.', always an invalid library.  This was fixed in
13122    # development snapshots of GCC prior to 3.0.
13123    case $host_os in
13124      aix4 | aix4.[01] | aix4.[01].*)
13125      if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
13126	   echo ' yes '
13127	   echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then
13128	:
13129      else
13130	can_build_shared=no
13131      fi
13132      ;;
13133    esac
13134    # Using Import Files as archive members, it is possible to support
13135    # filename-based versioning of shared library archives on AIX. While
13136    # this would work for both with and without runtime linking, it will
13137    # prevent static linking of such archives. So we do filename-based
13138    # shared library versioning with .so extension only, which is used
13139    # when both runtime linking and shared linking is enabled.
13140    # Unfortunately, runtime linking may impact performance, so we do
13141    # not want this to be the default eventually. Also, we use the
13142    # versioned .so libs for executables only if there is the -brtl
13143    # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only.
13144    # To allow for filename-based versioning support, we need to create
13145    # libNAME.so.V as an archive file, containing:
13146    # *) an Import File, referring to the versioned filename of the
13147    #    archive as well as the shared archive member, telling the
13148    #    bitwidth (32 or 64) of that shared object, and providing the
13149    #    list of exported symbols of that shared object, eventually
13150    #    decorated with the 'weak' keyword
13151    # *) the shared object with the F_LOADONLY flag set, to really avoid
13152    #    it being seen by the linker.
13153    # At run time we better use the real file rather than another symlink,
13154    # but for link time we create the symlink libNAME.so -> libNAME.so.V
13155
13156    case $with_aix_soname,$aix_use_runtimelinking in
13157    # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct
13158    # soname into executable. Probably we can add versioning support to
13159    # collect2, so additional links can be useful in future.
13160    aix,yes) # traditional libtool
13161      dynamic_linker='AIX unversionable lib.so'
13162      # If using run time linking (on AIX 4.2 or later) use lib<name>.so
13163      # instead of lib<name>.a to let people know that these are not
13164      # typical AIX shared libraries.
13165      library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13166      ;;
13167    aix,no) # traditional AIX only
13168      dynamic_linker='AIX lib.a(lib.so.V)'
13169      # We preserve .a as extension for shared libraries through AIX4.2
13170      # and later when we are not doing run time linking.
13171      library_names_spec='$libname$release.a $libname.a'
13172      soname_spec='$libname$release$shared_ext$major'
13173      ;;
13174    svr4,*) # full svr4 only
13175      dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o)"
13176      library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
13177      # We do not specify a path in Import Files, so LIBPATH fires.
13178      shlibpath_overrides_runpath=yes
13179      ;;
13180    *,yes) # both, prefer svr4
13181      dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o), lib.a(lib.so.V)"
13182      library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
13183      # unpreferred sharedlib libNAME.a needs extra handling
13184      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"'
13185      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"'
13186      # We do not specify a path in Import Files, so LIBPATH fires.
13187      shlibpath_overrides_runpath=yes
13188      ;;
13189    *,no) # both, prefer aix
13190      dynamic_linker="AIX lib.a(lib.so.V), lib.so.V($shared_archive_member_spec.o)"
13191      library_names_spec='$libname$release.a $libname.a'
13192      soname_spec='$libname$release$shared_ext$major'
13193      # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling
13194      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)'
13195      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"'
13196      ;;
13197    esac
13198    shlibpath_var=LIBPATH
13199  fi
13200  ;;
13201
13202amigaos*)
13203  case $host_cpu in
13204  powerpc)
13205    # Since July 2007 AmigaOS4 officially supports .so libraries.
13206    # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
13207    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13208    ;;
13209  m68k)
13210    library_names_spec='$libname.ixlibrary $libname.a'
13211    # Create ${libname}_ixlibrary.a entries in /sys/libs.
13212    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'
13213    ;;
13214  esac
13215  ;;
13216
13217beos*)
13218  library_names_spec='$libname$shared_ext'
13219  dynamic_linker="$host_os ld.so"
13220  shlibpath_var=LIBRARY_PATH
13221  ;;
13222
13223bsdi[45]*)
13224  version_type=linux # correct to gnu/linux during the next big refactor
13225  need_version=no
13226  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13227  soname_spec='$libname$release$shared_ext$major'
13228  finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
13229  shlibpath_var=LD_LIBRARY_PATH
13230  sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
13231  sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
13232  # the default ld.so.conf also contains /usr/contrib/lib and
13233  # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
13234  # libtool to hard-code these into programs
13235  ;;
13236
13237cygwin* | mingw* | pw32* | cegcc*)
13238  version_type=windows
13239  shrext_cmds=.dll
13240  need_version=no
13241  need_lib_prefix=no
13242
13243  case $GCC,$cc_basename in
13244  yes,*)
13245    # gcc
13246    library_names_spec='$libname.dll.a'
13247    # DLL is installed to $(libdir)/../bin by postinstall_cmds
13248    postinstall_cmds='base_file=`basename \$file`~
13249      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
13250      dldir=$destdir/`dirname \$dlpath`~
13251      test -d \$dldir || mkdir -p \$dldir~
13252      $install_prog $dir/$dlname \$dldir/$dlname~
13253      chmod a+x \$dldir/$dlname~
13254      if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
13255        eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
13256      fi'
13257    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
13258      dlpath=$dir/\$dldll~
13259       $RM \$dlpath'
13260    shlibpath_overrides_runpath=yes
13261
13262    case $host_os in
13263    cygwin*)
13264      # Cygwin DLLs use 'cyg' prefix rather than 'lib'
13265      soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
13266
13267      sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"
13268      ;;
13269    mingw* | cegcc*)
13270      # MinGW DLLs use traditional 'lib' prefix
13271      soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
13272      ;;
13273    pw32*)
13274      # pw32 DLLs use 'pw' prefix rather than 'lib'
13275      library_names_spec='`echo $libname | sed -e 's/^lib/pw/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
13276      ;;
13277    esac
13278    dynamic_linker='Win32 ld.exe'
13279    ;;
13280
13281  *,cl*)
13282    # Native MSVC
13283    libname_spec='$name'
13284    soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
13285    library_names_spec='$libname.dll.lib'
13286
13287    case $build_os in
13288    mingw*)
13289      sys_lib_search_path_spec=
13290      lt_save_ifs=$IFS
13291      IFS=';'
13292      for lt_path in $LIB
13293      do
13294        IFS=$lt_save_ifs
13295        # Let DOS variable expansion print the short 8.3 style file name.
13296        lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"`
13297        sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path"
13298      done
13299      IFS=$lt_save_ifs
13300      # Convert to MSYS style.
13301      sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'`
13302      ;;
13303    cygwin*)
13304      # Convert to unix form, then to dos form, then back to unix form
13305      # but this time dos style (no spaces!) so that the unix form looks
13306      # like /cygdrive/c/PROGRA~1:/cygdr...
13307      sys_lib_search_path_spec=`cygpath --path --unix "$LIB"`
13308      sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null`
13309      sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
13310      ;;
13311    *)
13312      sys_lib_search_path_spec=$LIB
13313      if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then
13314        # It is most probably a Windows format PATH.
13315        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
13316      else
13317        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
13318      fi
13319      # FIXME: find the short name or the path components, as spaces are
13320      # common. (e.g. "Program Files" -> "PROGRA~1")
13321      ;;
13322    esac
13323
13324    # DLL is installed to $(libdir)/../bin by postinstall_cmds
13325    postinstall_cmds='base_file=`basename \$file`~
13326      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
13327      dldir=$destdir/`dirname \$dlpath`~
13328      test -d \$dldir || mkdir -p \$dldir~
13329      $install_prog $dir/$dlname \$dldir/$dlname'
13330    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
13331      dlpath=$dir/\$dldll~
13332       $RM \$dlpath'
13333    shlibpath_overrides_runpath=yes
13334    dynamic_linker='Win32 link.exe'
13335    ;;
13336
13337  *)
13338    # Assume MSVC wrapper
13339    library_names_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext $libname.lib'
13340    dynamic_linker='Win32 ld.exe'
13341    ;;
13342  esac
13343  # FIXME: first we should search . and the directory the executable is in
13344  shlibpath_var=PATH
13345  ;;
13346
13347darwin* | rhapsody*)
13348  dynamic_linker="$host_os dyld"
13349  version_type=darwin
13350  need_lib_prefix=no
13351  need_version=no
13352  library_names_spec='$libname$release$major$shared_ext $libname$shared_ext'
13353  soname_spec='$libname$release$major$shared_ext'
13354  shlibpath_overrides_runpath=yes
13355  shlibpath_var=DYLD_LIBRARY_PATH
13356  shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
13357
13358  sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"
13359  sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
13360  ;;
13361
13362dgux*)
13363  version_type=linux # correct to gnu/linux during the next big refactor
13364  need_lib_prefix=no
13365  need_version=no
13366  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13367  soname_spec='$libname$release$shared_ext$major'
13368  shlibpath_var=LD_LIBRARY_PATH
13369  ;;
13370
13371freebsd* | dragonfly*)
13372  # DragonFly does not have aout.  When/if they implement a new
13373  # versioning mechanism, adjust this.
13374  if test -x /usr/bin/objformat; then
13375    objformat=`/usr/bin/objformat`
13376  else
13377    case $host_os in
13378    freebsd[23].*) objformat=aout ;;
13379    *) objformat=elf ;;
13380    esac
13381  fi
13382  version_type=freebsd-$objformat
13383  case $version_type in
13384    freebsd-elf*)
13385      library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13386      soname_spec='$libname$release$shared_ext$major'
13387      need_version=no
13388      need_lib_prefix=no
13389      ;;
13390    freebsd-*)
13391      library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
13392      need_version=yes
13393      ;;
13394  esac
13395  shlibpath_var=LD_LIBRARY_PATH
13396  case $host_os in
13397  freebsd2.*)
13398    shlibpath_overrides_runpath=yes
13399    ;;
13400  freebsd3.[01]* | freebsdelf3.[01]*)
13401    shlibpath_overrides_runpath=yes
13402    hardcode_into_libs=yes
13403    ;;
13404  freebsd3.[2-9]* | freebsdelf3.[2-9]* | \
13405  freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1)
13406    shlibpath_overrides_runpath=no
13407    hardcode_into_libs=yes
13408    ;;
13409  *) # from 4.6 on, and DragonFly
13410    shlibpath_overrides_runpath=yes
13411    hardcode_into_libs=yes
13412    ;;
13413  esac
13414  ;;
13415
13416haiku*)
13417  version_type=linux # correct to gnu/linux during the next big refactor
13418  need_lib_prefix=no
13419  need_version=no
13420  dynamic_linker="$host_os runtime_loader"
13421  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13422  soname_spec='$libname$release$shared_ext$major'
13423  shlibpath_var=LIBRARY_PATH
13424  shlibpath_overrides_runpath=no
13425  sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
13426  hardcode_into_libs=yes
13427  ;;
13428
13429hpux9* | hpux10* | hpux11*)
13430  # Give a soname corresponding to the major version so that dld.sl refuses to
13431  # link against other versions.
13432  version_type=sunos
13433  need_lib_prefix=no
13434  need_version=no
13435  case $host_cpu in
13436  ia64*)
13437    shrext_cmds='.so'
13438    hardcode_into_libs=yes
13439    dynamic_linker="$host_os dld.so"
13440    shlibpath_var=LD_LIBRARY_PATH
13441    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
13442    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13443    soname_spec='$libname$release$shared_ext$major'
13444    if test 32 = "$HPUX_IA64_MODE"; then
13445      sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
13446      sys_lib_dlsearch_path_spec=/usr/lib/hpux32
13447    else
13448      sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
13449      sys_lib_dlsearch_path_spec=/usr/lib/hpux64
13450    fi
13451    ;;
13452  hppa*64*)
13453    shrext_cmds='.sl'
13454    hardcode_into_libs=yes
13455    dynamic_linker="$host_os dld.sl"
13456    shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_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    sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
13461    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
13462    ;;
13463  *)
13464    shrext_cmds='.sl'
13465    dynamic_linker="$host_os dld.sl"
13466    shlibpath_var=SHLIB_PATH
13467    shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
13468    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13469    soname_spec='$libname$release$shared_ext$major'
13470    ;;
13471  esac
13472  # HP-UX runs *really* slowly unless shared libraries are mode 555, ...
13473  postinstall_cmds='chmod 555 $lib'
13474  # or fails outright, so override atomically:
13475  install_override_mode=555
13476  ;;
13477
13478interix[3-9]*)
13479  version_type=linux # correct to gnu/linux during the next big refactor
13480  need_lib_prefix=no
13481  need_version=no
13482  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13483  soname_spec='$libname$release$shared_ext$major'
13484  dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
13485  shlibpath_var=LD_LIBRARY_PATH
13486  shlibpath_overrides_runpath=no
13487  hardcode_into_libs=yes
13488  ;;
13489
13490irix5* | irix6* | nonstopux*)
13491  case $host_os in
13492    nonstopux*) version_type=nonstopux ;;
13493    *)
13494	if test yes = "$lt_cv_prog_gnu_ld"; then
13495		version_type=linux # correct to gnu/linux during the next big refactor
13496	else
13497		version_type=irix
13498	fi ;;
13499  esac
13500  need_lib_prefix=no
13501  need_version=no
13502  soname_spec='$libname$release$shared_ext$major'
13503  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext'
13504  case $host_os in
13505  irix5* | nonstopux*)
13506    libsuff= shlibsuff=
13507    ;;
13508  *)
13509    case $LD in # libtool.m4 will add one of these switches to LD
13510    *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
13511      libsuff= shlibsuff= libmagic=32-bit;;
13512    *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
13513      libsuff=32 shlibsuff=N32 libmagic=N32;;
13514    *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
13515      libsuff=64 shlibsuff=64 libmagic=64-bit;;
13516    *) libsuff= shlibsuff= libmagic=never-match;;
13517    esac
13518    ;;
13519  esac
13520  shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
13521  shlibpath_overrides_runpath=no
13522  sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff"
13523  sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff"
13524  hardcode_into_libs=yes
13525  ;;
13526
13527# No shared lib support for Linux oldld, aout, or coff.
13528linux*oldld* | linux*aout* | linux*coff*)
13529  dynamic_linker=no
13530  ;;
13531
13532linux*android*)
13533  version_type=none # Android doesn't support versioned libraries.
13534  need_lib_prefix=no
13535  need_version=no
13536  library_names_spec='$libname$release$shared_ext'
13537  soname_spec='$libname$release$shared_ext'
13538  finish_cmds=
13539  shlibpath_var=LD_LIBRARY_PATH
13540  shlibpath_overrides_runpath=yes
13541
13542  # This implies no fast_install, which is unacceptable.
13543  # Some rework will be needed to allow for fast_install
13544  # before this can be enabled.
13545  hardcode_into_libs=yes
13546
13547  dynamic_linker='Android linker'
13548  # Don't embed -rpath directories since the linker doesn't support them.
13549  hardcode_libdir_flag_spec='-L$libdir'
13550  ;;
13551
13552# This must be glibc/ELF.
13553linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
13554  version_type=linux # correct to gnu/linux during the next big refactor
13555  need_lib_prefix=no
13556  need_version=no
13557  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13558  soname_spec='$libname$release$shared_ext$major'
13559  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
13560  shlibpath_var=LD_LIBRARY_PATH
13561  shlibpath_overrides_runpath=no
13562
13563  # Some binutils ld are patched to set DT_RUNPATH
13564  if ${lt_cv_shlibpath_overrides_runpath+:} false; then :
13565  $as_echo_n "(cached) " >&6
13566else
13567  lt_cv_shlibpath_overrides_runpath=no
13568    save_LDFLAGS=$LDFLAGS
13569    save_libdir=$libdir
13570    eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \
13571	 LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\""
13572    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13573/* end confdefs.h.  */
13574
13575int
13576main ()
13577{
13578
13579  ;
13580  return 0;
13581}
13582_ACEOF
13583if ac_fn_c_try_link "$LINENO"; then :
13584  if  ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then :
13585  lt_cv_shlibpath_overrides_runpath=yes
13586fi
13587fi
13588rm -f core conftest.err conftest.$ac_objext \
13589    conftest$ac_exeext conftest.$ac_ext
13590    LDFLAGS=$save_LDFLAGS
13591    libdir=$save_libdir
13592
13593fi
13594
13595  shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
13596
13597  # This implies no fast_install, which is unacceptable.
13598  # Some rework will be needed to allow for fast_install
13599  # before this can be enabled.
13600  hardcode_into_libs=yes
13601
13602  # Add ABI-specific directories to the system library path.
13603  sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib"
13604
13605  # Ideally, we could use ldconfig to report *all* directores which are
13606  # searched for libraries, however this is still not possible.  Aside from not
13607  # being certain /sbin/ldconfig is available, command
13608  # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64,
13609  # even though it is searched at run-time.  Try to do the best guess by
13610  # appending ld.so.conf contents (and includes) to the search path.
13611  if test -f /etc/ld.so.conf; then
13612    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' ' '`
13613    sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra"
13614  fi
13615
13616  # We used to test for /lib/ld.so.1 and disable shared libraries on
13617  # powerpc, because MkLinux only supported shared libraries with the
13618  # GNU dynamic linker.  Since this was broken with cross compilers,
13619  # most powerpc-linux boxes support dynamic linking these days and
13620  # people can always --disable-shared, the test was removed, and we
13621  # assume the GNU/Linux dynamic linker is in use.
13622  dynamic_linker='GNU/Linux ld.so'
13623  ;;
13624
13625netbsd*)
13626  version_type=sunos
13627  need_lib_prefix=no
13628  need_version=no
13629  if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
13630    library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
13631    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
13632    dynamic_linker='NetBSD (a.out) ld.so'
13633  else
13634    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13635    soname_spec='$libname$release$shared_ext$major'
13636    dynamic_linker='NetBSD ld.elf_so'
13637  fi
13638  shlibpath_var=LD_LIBRARY_PATH
13639  shlibpath_overrides_runpath=yes
13640  hardcode_into_libs=yes
13641  ;;
13642
13643newsos6)
13644  version_type=linux # correct to gnu/linux during the next big refactor
13645  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13646  shlibpath_var=LD_LIBRARY_PATH
13647  shlibpath_overrides_runpath=yes
13648  ;;
13649
13650*nto* | *qnx*)
13651  version_type=qnx
13652  need_lib_prefix=no
13653  need_version=no
13654  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13655  soname_spec='$libname$release$shared_ext$major'
13656  shlibpath_var=LD_LIBRARY_PATH
13657  shlibpath_overrides_runpath=no
13658  hardcode_into_libs=yes
13659  dynamic_linker='ldqnx.so'
13660  ;;
13661
13662openbsd* | bitrig*)
13663  version_type=sunos
13664  sys_lib_dlsearch_path_spec=/usr/lib
13665  need_lib_prefix=no
13666  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
13667    need_version=no
13668  else
13669    need_version=yes
13670  fi
13671  library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
13672  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
13673  shlibpath_var=LD_LIBRARY_PATH
13674  shlibpath_overrides_runpath=yes
13675  ;;
13676
13677os2*)
13678  libname_spec='$name'
13679  version_type=windows
13680  shrext_cmds=.dll
13681  need_version=no
13682  need_lib_prefix=no
13683  # OS/2 can only load a DLL with a base name of 8 characters or less.
13684  soname_spec='`test -n "$os2dllname" && libname="$os2dllname";
13685    v=$($ECHO $release$versuffix | tr -d .-);
13686    n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _);
13687    $ECHO $n$v`$shared_ext'
13688  library_names_spec='${libname}_dll.$libext'
13689  dynamic_linker='OS/2 ld.exe'
13690  shlibpath_var=BEGINLIBPATH
13691  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
13692  sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
13693  postinstall_cmds='base_file=`basename \$file`~
13694    dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~
13695    dldir=$destdir/`dirname \$dlpath`~
13696    test -d \$dldir || mkdir -p \$dldir~
13697    $install_prog $dir/$dlname \$dldir/$dlname~
13698    chmod a+x \$dldir/$dlname~
13699    if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
13700      eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
13701    fi'
13702  postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~
13703    dlpath=$dir/\$dldll~
13704    $RM \$dlpath'
13705  ;;
13706
13707osf3* | osf4* | osf5*)
13708  version_type=osf
13709  need_lib_prefix=no
13710  need_version=no
13711  soname_spec='$libname$release$shared_ext$major'
13712  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13713  shlibpath_var=LD_LIBRARY_PATH
13714  sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
13715  sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
13716  ;;
13717
13718rdos*)
13719  dynamic_linker=no
13720  ;;
13721
13722solaris*)
13723  version_type=linux # correct to gnu/linux during the next big refactor
13724  need_lib_prefix=no
13725  need_version=no
13726  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13727  soname_spec='$libname$release$shared_ext$major'
13728  shlibpath_var=LD_LIBRARY_PATH
13729  shlibpath_overrides_runpath=yes
13730  hardcode_into_libs=yes
13731  # ldd complains unless libraries are executable
13732  postinstall_cmds='chmod +x $lib'
13733  ;;
13734
13735sunos4*)
13736  version_type=sunos
13737  library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
13738  finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
13739  shlibpath_var=LD_LIBRARY_PATH
13740  shlibpath_overrides_runpath=yes
13741  if test yes = "$with_gnu_ld"; then
13742    need_lib_prefix=no
13743  fi
13744  need_version=yes
13745  ;;
13746
13747sysv4 | sysv4.3*)
13748  version_type=linux # correct to gnu/linux during the next big refactor
13749  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13750  soname_spec='$libname$release$shared_ext$major'
13751  shlibpath_var=LD_LIBRARY_PATH
13752  case $host_vendor in
13753    sni)
13754      shlibpath_overrides_runpath=no
13755      need_lib_prefix=no
13756      runpath_var=LD_RUN_PATH
13757      ;;
13758    siemens)
13759      need_lib_prefix=no
13760      ;;
13761    motorola)
13762      need_lib_prefix=no
13763      need_version=no
13764      shlibpath_overrides_runpath=no
13765      sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
13766      ;;
13767  esac
13768  ;;
13769
13770sysv4*MP*)
13771  if test -d /usr/nec; then
13772    version_type=linux # correct to gnu/linux during the next big refactor
13773    library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext'
13774    soname_spec='$libname$shared_ext.$major'
13775    shlibpath_var=LD_LIBRARY_PATH
13776  fi
13777  ;;
13778
13779sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
13780  version_type=sco
13781  need_lib_prefix=no
13782  need_version=no
13783  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext'
13784  soname_spec='$libname$release$shared_ext$major'
13785  shlibpath_var=LD_LIBRARY_PATH
13786  shlibpath_overrides_runpath=yes
13787  hardcode_into_libs=yes
13788  if test yes = "$with_gnu_ld"; then
13789    sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
13790  else
13791    sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
13792    case $host_os in
13793      sco3.2v5*)
13794        sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
13795	;;
13796    esac
13797  fi
13798  sys_lib_dlsearch_path_spec='/usr/lib'
13799  ;;
13800
13801tpf*)
13802  # TPF is a cross-target only.  Preferred cross-host = GNU/Linux.
13803  version_type=linux # correct to gnu/linux during the next big refactor
13804  need_lib_prefix=no
13805  need_version=no
13806  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13807  shlibpath_var=LD_LIBRARY_PATH
13808  shlibpath_overrides_runpath=no
13809  hardcode_into_libs=yes
13810  ;;
13811
13812uts4*)
13813  version_type=linux # correct to gnu/linux during the next big refactor
13814  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13815  soname_spec='$libname$release$shared_ext$major'
13816  shlibpath_var=LD_LIBRARY_PATH
13817  ;;
13818
13819*)
13820  dynamic_linker=no
13821  ;;
13822esac
13823{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5
13824$as_echo "$dynamic_linker" >&6; }
13825test no = "$dynamic_linker" && can_build_shared=no
13826
13827variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
13828if test yes = "$GCC"; then
13829  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
13830fi
13831
13832if test set = "${lt_cv_sys_lib_search_path_spec+set}"; then
13833  sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec
13834fi
13835
13836if test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then
13837  sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec
13838fi
13839
13840# remember unaugmented sys_lib_dlsearch_path content for libtool script decls...
13841configure_time_dlsearch_path=$sys_lib_dlsearch_path_spec
13842
13843# ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code
13844func_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH"
13845
13846# to be used as default LT_SYS_LIBRARY_PATH value in generated libtool
13847configure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH
13848
13849
13850
13851
13852
13853
13854
13855
13856
13857
13858
13859
13860
13861
13862
13863
13864
13865
13866
13867
13868
13869
13870
13871
13872
13873
13874
13875
13876
13877
13878
13879
13880
13881
13882
13883
13884
13885
13886
13887
13888
13889
13890
13891
13892
13893
13894
13895
13896
13897
13898
13899
13900
13901
13902
13903
13904
13905
13906
13907
13908
13909
13910
13911
13912
13913
13914
13915
13916
13917
13918
13919
13920
13921
13922
13923
13924
13925
13926
13927
13928
13929
13930
13931
13932
13933
13934
13935
13936
13937
13938
13939
13940
13941
13942
13943
13944
13945  { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5
13946$as_echo_n "checking how to hardcode library paths into programs... " >&6; }
13947hardcode_action=
13948if test -n "$hardcode_libdir_flag_spec" ||
13949   test -n "$runpath_var" ||
13950   test yes = "$hardcode_automatic"; then
13951
13952  # We can hardcode non-existent directories.
13953  if test no != "$hardcode_direct" &&
13954     # If the only mechanism to avoid hardcoding is shlibpath_var, we
13955     # have to relink, otherwise we might link with an installed library
13956     # when we should be linking with a yet-to-be-installed one
13957     ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, )" &&
13958     test no != "$hardcode_minus_L"; then
13959    # Linking always hardcodes the temporary library directory.
13960    hardcode_action=relink
13961  else
13962    # We can link without hardcoding, and we can hardcode nonexisting dirs.
13963    hardcode_action=immediate
13964  fi
13965else
13966  # We cannot hardcode anything, or else we can only hardcode existing
13967  # directories.
13968  hardcode_action=unsupported
13969fi
13970{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5
13971$as_echo "$hardcode_action" >&6; }
13972
13973if test relink = "$hardcode_action" ||
13974   test yes = "$inherit_rpath"; then
13975  # Fast installation is not supported
13976  enable_fast_install=no
13977elif test yes = "$shlibpath_overrides_runpath" ||
13978     test no = "$enable_shared"; then
13979  # Fast installation is not necessary
13980  enable_fast_install=needless
13981fi
13982
13983
13984
13985
13986
13987
13988  if test yes != "$enable_dlopen"; then
13989  enable_dlopen=unknown
13990  enable_dlopen_self=unknown
13991  enable_dlopen_self_static=unknown
13992else
13993  lt_cv_dlopen=no
13994  lt_cv_dlopen_libs=
13995
13996  case $host_os in
13997  beos*)
13998    lt_cv_dlopen=load_add_on
13999    lt_cv_dlopen_libs=
14000    lt_cv_dlopen_self=yes
14001    ;;
14002
14003  mingw* | pw32* | cegcc*)
14004    lt_cv_dlopen=LoadLibrary
14005    lt_cv_dlopen_libs=
14006    ;;
14007
14008  cygwin*)
14009    lt_cv_dlopen=dlopen
14010    lt_cv_dlopen_libs=
14011    ;;
14012
14013  darwin*)
14014    # if libdl is installed we need to link against it
14015    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
14016$as_echo_n "checking for dlopen in -ldl... " >&6; }
14017if ${ac_cv_lib_dl_dlopen+:} false; then :
14018  $as_echo_n "(cached) " >&6
14019else
14020  ac_check_lib_save_LIBS=$LIBS
14021LIBS="-ldl  $LIBS"
14022cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14023/* end confdefs.h.  */
14024
14025/* Override any GCC internal prototype to avoid an error.
14026   Use char because int might match the return type of a GCC
14027   builtin and then its argument prototype would still apply.  */
14028#ifdef __cplusplus
14029extern "C"
14030#endif
14031char dlopen ();
14032int
14033main ()
14034{
14035return dlopen ();
14036  ;
14037  return 0;
14038}
14039_ACEOF
14040if ac_fn_c_try_link "$LINENO"; then :
14041  ac_cv_lib_dl_dlopen=yes
14042else
14043  ac_cv_lib_dl_dlopen=no
14044fi
14045rm -f core conftest.err conftest.$ac_objext \
14046    conftest$ac_exeext conftest.$ac_ext
14047LIBS=$ac_check_lib_save_LIBS
14048fi
14049{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
14050$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
14051if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
14052  lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl
14053else
14054
14055    lt_cv_dlopen=dyld
14056    lt_cv_dlopen_libs=
14057    lt_cv_dlopen_self=yes
14058
14059fi
14060
14061    ;;
14062
14063  tpf*)
14064    # Don't try to run any link tests for TPF.  We know it's impossible
14065    # because TPF is a cross-compiler, and we know how we open DSOs.
14066    lt_cv_dlopen=dlopen
14067    lt_cv_dlopen_libs=
14068    lt_cv_dlopen_self=no
14069    ;;
14070
14071  *)
14072    ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load"
14073if test "x$ac_cv_func_shl_load" = xyes; then :
14074  lt_cv_dlopen=shl_load
14075else
14076  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
14077$as_echo_n "checking for shl_load in -ldld... " >&6; }
14078if ${ac_cv_lib_dld_shl_load+:} false; then :
14079  $as_echo_n "(cached) " >&6
14080else
14081  ac_check_lib_save_LIBS=$LIBS
14082LIBS="-ldld  $LIBS"
14083cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14084/* end confdefs.h.  */
14085
14086/* Override any GCC internal prototype to avoid an error.
14087   Use char because int might match the return type of a GCC
14088   builtin and then its argument prototype would still apply.  */
14089#ifdef __cplusplus
14090extern "C"
14091#endif
14092char shl_load ();
14093int
14094main ()
14095{
14096return shl_load ();
14097  ;
14098  return 0;
14099}
14100_ACEOF
14101if ac_fn_c_try_link "$LINENO"; then :
14102  ac_cv_lib_dld_shl_load=yes
14103else
14104  ac_cv_lib_dld_shl_load=no
14105fi
14106rm -f core conftest.err conftest.$ac_objext \
14107    conftest$ac_exeext conftest.$ac_ext
14108LIBS=$ac_check_lib_save_LIBS
14109fi
14110{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
14111$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
14112if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
14113  lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld
14114else
14115  ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
14116if test "x$ac_cv_func_dlopen" = xyes; then :
14117  lt_cv_dlopen=dlopen
14118else
14119  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
14120$as_echo_n "checking for dlopen in -ldl... " >&6; }
14121if ${ac_cv_lib_dl_dlopen+:} false; then :
14122  $as_echo_n "(cached) " >&6
14123else
14124  ac_check_lib_save_LIBS=$LIBS
14125LIBS="-ldl  $LIBS"
14126cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14127/* end confdefs.h.  */
14128
14129/* Override any GCC internal prototype to avoid an error.
14130   Use char because int might match the return type of a GCC
14131   builtin and then its argument prototype would still apply.  */
14132#ifdef __cplusplus
14133extern "C"
14134#endif
14135char dlopen ();
14136int
14137main ()
14138{
14139return dlopen ();
14140  ;
14141  return 0;
14142}
14143_ACEOF
14144if ac_fn_c_try_link "$LINENO"; then :
14145  ac_cv_lib_dl_dlopen=yes
14146else
14147  ac_cv_lib_dl_dlopen=no
14148fi
14149rm -f core conftest.err conftest.$ac_objext \
14150    conftest$ac_exeext conftest.$ac_ext
14151LIBS=$ac_check_lib_save_LIBS
14152fi
14153{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
14154$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
14155if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
14156  lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl
14157else
14158  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5
14159$as_echo_n "checking for dlopen in -lsvld... " >&6; }
14160if ${ac_cv_lib_svld_dlopen+:} false; then :
14161  $as_echo_n "(cached) " >&6
14162else
14163  ac_check_lib_save_LIBS=$LIBS
14164LIBS="-lsvld  $LIBS"
14165cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14166/* end confdefs.h.  */
14167
14168/* Override any GCC internal prototype to avoid an error.
14169   Use char because int might match the return type of a GCC
14170   builtin and then its argument prototype would still apply.  */
14171#ifdef __cplusplus
14172extern "C"
14173#endif
14174char dlopen ();
14175int
14176main ()
14177{
14178return dlopen ();
14179  ;
14180  return 0;
14181}
14182_ACEOF
14183if ac_fn_c_try_link "$LINENO"; then :
14184  ac_cv_lib_svld_dlopen=yes
14185else
14186  ac_cv_lib_svld_dlopen=no
14187fi
14188rm -f core conftest.err conftest.$ac_objext \
14189    conftest$ac_exeext conftest.$ac_ext
14190LIBS=$ac_check_lib_save_LIBS
14191fi
14192{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5
14193$as_echo "$ac_cv_lib_svld_dlopen" >&6; }
14194if test "x$ac_cv_lib_svld_dlopen" = xyes; then :
14195  lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld
14196else
14197  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5
14198$as_echo_n "checking for dld_link in -ldld... " >&6; }
14199if ${ac_cv_lib_dld_dld_link+:} false; then :
14200  $as_echo_n "(cached) " >&6
14201else
14202  ac_check_lib_save_LIBS=$LIBS
14203LIBS="-ldld  $LIBS"
14204cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14205/* end confdefs.h.  */
14206
14207/* Override any GCC internal prototype to avoid an error.
14208   Use char because int might match the return type of a GCC
14209   builtin and then its argument prototype would still apply.  */
14210#ifdef __cplusplus
14211extern "C"
14212#endif
14213char dld_link ();
14214int
14215main ()
14216{
14217return dld_link ();
14218  ;
14219  return 0;
14220}
14221_ACEOF
14222if ac_fn_c_try_link "$LINENO"; then :
14223  ac_cv_lib_dld_dld_link=yes
14224else
14225  ac_cv_lib_dld_dld_link=no
14226fi
14227rm -f core conftest.err conftest.$ac_objext \
14228    conftest$ac_exeext conftest.$ac_ext
14229LIBS=$ac_check_lib_save_LIBS
14230fi
14231{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5
14232$as_echo "$ac_cv_lib_dld_dld_link" >&6; }
14233if test "x$ac_cv_lib_dld_dld_link" = xyes; then :
14234  lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld
14235fi
14236
14237
14238fi
14239
14240
14241fi
14242
14243
14244fi
14245
14246
14247fi
14248
14249
14250fi
14251
14252    ;;
14253  esac
14254
14255  if test no = "$lt_cv_dlopen"; then
14256    enable_dlopen=no
14257  else
14258    enable_dlopen=yes
14259  fi
14260
14261  case $lt_cv_dlopen in
14262  dlopen)
14263    save_CPPFLAGS=$CPPFLAGS
14264    test yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
14265
14266    save_LDFLAGS=$LDFLAGS
14267    wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
14268
14269    save_LIBS=$LIBS
14270    LIBS="$lt_cv_dlopen_libs $LIBS"
14271
14272    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5
14273$as_echo_n "checking whether a program can dlopen itself... " >&6; }
14274if ${lt_cv_dlopen_self+:} false; then :
14275  $as_echo_n "(cached) " >&6
14276else
14277  	  if test yes = "$cross_compiling"; then :
14278  lt_cv_dlopen_self=cross
14279else
14280  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
14281  lt_status=$lt_dlunknown
14282  cat > conftest.$ac_ext <<_LT_EOF
14283#line $LINENO "configure"
14284#include "confdefs.h"
14285
14286#if HAVE_DLFCN_H
14287#include <dlfcn.h>
14288#endif
14289
14290#include <stdio.h>
14291
14292#ifdef RTLD_GLOBAL
14293#  define LT_DLGLOBAL		RTLD_GLOBAL
14294#else
14295#  ifdef DL_GLOBAL
14296#    define LT_DLGLOBAL		DL_GLOBAL
14297#  else
14298#    define LT_DLGLOBAL		0
14299#  endif
14300#endif
14301
14302/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
14303   find out it does not work in some platform. */
14304#ifndef LT_DLLAZY_OR_NOW
14305#  ifdef RTLD_LAZY
14306#    define LT_DLLAZY_OR_NOW		RTLD_LAZY
14307#  else
14308#    ifdef DL_LAZY
14309#      define LT_DLLAZY_OR_NOW		DL_LAZY
14310#    else
14311#      ifdef RTLD_NOW
14312#        define LT_DLLAZY_OR_NOW	RTLD_NOW
14313#      else
14314#        ifdef DL_NOW
14315#          define LT_DLLAZY_OR_NOW	DL_NOW
14316#        else
14317#          define LT_DLLAZY_OR_NOW	0
14318#        endif
14319#      endif
14320#    endif
14321#  endif
14322#endif
14323
14324/* When -fvisibility=hidden is used, assume the code has been annotated
14325   correspondingly for the symbols needed.  */
14326#if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
14327int fnord () __attribute__((visibility("default")));
14328#endif
14329
14330int fnord () { return 42; }
14331int main ()
14332{
14333  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
14334  int status = $lt_dlunknown;
14335
14336  if (self)
14337    {
14338      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
14339      else
14340        {
14341	  if (dlsym( self,"_fnord"))  status = $lt_dlneed_uscore;
14342          else puts (dlerror ());
14343	}
14344      /* dlclose (self); */
14345    }
14346  else
14347    puts (dlerror ());
14348
14349  return status;
14350}
14351_LT_EOF
14352  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
14353  (eval $ac_link) 2>&5
14354  ac_status=$?
14355  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
14356  test $ac_status = 0; } && test -s "conftest$ac_exeext" 2>/dev/null; then
14357    (./conftest; exit; ) >&5 2>/dev/null
14358    lt_status=$?
14359    case x$lt_status in
14360      x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;;
14361      x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;;
14362      x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;;
14363    esac
14364  else :
14365    # compilation failed
14366    lt_cv_dlopen_self=no
14367  fi
14368fi
14369rm -fr conftest*
14370
14371
14372fi
14373{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5
14374$as_echo "$lt_cv_dlopen_self" >&6; }
14375
14376    if test yes = "$lt_cv_dlopen_self"; then
14377      wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
14378      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5
14379$as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; }
14380if ${lt_cv_dlopen_self_static+:} false; then :
14381  $as_echo_n "(cached) " >&6
14382else
14383  	  if test yes = "$cross_compiling"; then :
14384  lt_cv_dlopen_self_static=cross
14385else
14386  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
14387  lt_status=$lt_dlunknown
14388  cat > conftest.$ac_ext <<_LT_EOF
14389#line $LINENO "configure"
14390#include "confdefs.h"
14391
14392#if HAVE_DLFCN_H
14393#include <dlfcn.h>
14394#endif
14395
14396#include <stdio.h>
14397
14398#ifdef RTLD_GLOBAL
14399#  define LT_DLGLOBAL		RTLD_GLOBAL
14400#else
14401#  ifdef DL_GLOBAL
14402#    define LT_DLGLOBAL		DL_GLOBAL
14403#  else
14404#    define LT_DLGLOBAL		0
14405#  endif
14406#endif
14407
14408/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
14409   find out it does not work in some platform. */
14410#ifndef LT_DLLAZY_OR_NOW
14411#  ifdef RTLD_LAZY
14412#    define LT_DLLAZY_OR_NOW		RTLD_LAZY
14413#  else
14414#    ifdef DL_LAZY
14415#      define LT_DLLAZY_OR_NOW		DL_LAZY
14416#    else
14417#      ifdef RTLD_NOW
14418#        define LT_DLLAZY_OR_NOW	RTLD_NOW
14419#      else
14420#        ifdef DL_NOW
14421#          define LT_DLLAZY_OR_NOW	DL_NOW
14422#        else
14423#          define LT_DLLAZY_OR_NOW	0
14424#        endif
14425#      endif
14426#    endif
14427#  endif
14428#endif
14429
14430/* When -fvisibility=hidden is used, assume the code has been annotated
14431   correspondingly for the symbols needed.  */
14432#if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
14433int fnord () __attribute__((visibility("default")));
14434#endif
14435
14436int fnord () { return 42; }
14437int main ()
14438{
14439  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
14440  int status = $lt_dlunknown;
14441
14442  if (self)
14443    {
14444      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
14445      else
14446        {
14447	  if (dlsym( self,"_fnord"))  status = $lt_dlneed_uscore;
14448          else puts (dlerror ());
14449	}
14450      /* dlclose (self); */
14451    }
14452  else
14453    puts (dlerror ());
14454
14455  return status;
14456}
14457_LT_EOF
14458  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
14459  (eval $ac_link) 2>&5
14460  ac_status=$?
14461  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
14462  test $ac_status = 0; } && test -s "conftest$ac_exeext" 2>/dev/null; then
14463    (./conftest; exit; ) >&5 2>/dev/null
14464    lt_status=$?
14465    case x$lt_status in
14466      x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;;
14467      x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;;
14468      x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;;
14469    esac
14470  else :
14471    # compilation failed
14472    lt_cv_dlopen_self_static=no
14473  fi
14474fi
14475rm -fr conftest*
14476
14477
14478fi
14479{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self_static" >&5
14480$as_echo "$lt_cv_dlopen_self_static" >&6; }
14481    fi
14482
14483    CPPFLAGS=$save_CPPFLAGS
14484    LDFLAGS=$save_LDFLAGS
14485    LIBS=$save_LIBS
14486    ;;
14487  esac
14488
14489  case $lt_cv_dlopen_self in
14490  yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
14491  *) enable_dlopen_self=unknown ;;
14492  esac
14493
14494  case $lt_cv_dlopen_self_static in
14495  yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
14496  *) enable_dlopen_self_static=unknown ;;
14497  esac
14498fi
14499
14500
14501
14502
14503
14504
14505
14506
14507
14508
14509
14510
14511
14512
14513
14514
14515
14516striplib=
14517old_striplib=
14518{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5
14519$as_echo_n "checking whether stripping libraries is possible... " >&6; }
14520if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
14521  test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
14522  test -z "$striplib" && striplib="$STRIP --strip-unneeded"
14523  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14524$as_echo "yes" >&6; }
14525else
14526# FIXME - insert some real tests, host_os isn't really good enough
14527  case $host_os in
14528  darwin*)
14529    if test -n "$STRIP"; then
14530      striplib="$STRIP -x"
14531      old_striplib="$STRIP -S"
14532      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14533$as_echo "yes" >&6; }
14534    else
14535      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14536$as_echo "no" >&6; }
14537    fi
14538    ;;
14539  *)
14540    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14541$as_echo "no" >&6; }
14542    ;;
14543  esac
14544fi
14545
14546
14547
14548
14549
14550
14551
14552
14553
14554
14555
14556
14557  # Report what library types will actually be built
14558  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5
14559$as_echo_n "checking if libtool supports shared libraries... " >&6; }
14560  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5
14561$as_echo "$can_build_shared" >&6; }
14562
14563  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5
14564$as_echo_n "checking whether to build shared libraries... " >&6; }
14565  test no = "$can_build_shared" && enable_shared=no
14566
14567  # On AIX, shared libraries and static libraries use the same namespace, and
14568  # are all built from PIC.
14569  case $host_os in
14570  aix3*)
14571    test yes = "$enable_shared" && enable_static=no
14572    if test -n "$RANLIB"; then
14573      archive_cmds="$archive_cmds~\$RANLIB \$lib"
14574      postinstall_cmds='$RANLIB $lib'
14575    fi
14576    ;;
14577
14578  aix[4-9]*)
14579    if test ia64 != "$host_cpu"; then
14580      case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in
14581      yes,aix,yes) ;;			# shared object as lib.so file only
14582      yes,svr4,*) ;;			# shared object as lib.so archive member only
14583      yes,*) enable_static=no ;;	# shared object in lib.a archive as well
14584      esac
14585    fi
14586    ;;
14587  esac
14588  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
14589$as_echo "$enable_shared" >&6; }
14590
14591  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5
14592$as_echo_n "checking whether to build static libraries... " >&6; }
14593  # Make sure either enable_shared or enable_static is yes.
14594  test yes = "$enable_shared" || enable_static=yes
14595  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5
14596$as_echo "$enable_static" >&6; }
14597
14598
14599
14600
14601fi
14602ac_ext=c
14603ac_cpp='$CPP $CPPFLAGS'
14604ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
14605ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
14606ac_compiler_gnu=$ac_cv_c_compiler_gnu
14607
14608CC=$lt_save_CC
14609
14610
14611
14612
14613
14614
14615
14616
14617
14618
14619
14620
14621
14622
14623
14624        ac_config_commands="$ac_config_commands libtool"
14625
14626
14627
14628
14629# Only expand once:
14630
14631
14632
14633
14634# pkg-config is only needed for these options, do not require it otherwise
14635if test "$enable_systemd" = "yes" -o "$with_pyunbound" = "yes" -o "$with_pythonmod" = "yes"; then
14636
14637
14638
14639
14640
14641
14642
14643if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
14644	if test -n "$ac_tool_prefix"; then
14645  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
14646set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
14647{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14648$as_echo_n "checking for $ac_word... " >&6; }
14649if ${ac_cv_path_PKG_CONFIG+:} false; then :
14650  $as_echo_n "(cached) " >&6
14651else
14652  case $PKG_CONFIG in
14653  [\\/]* | ?:[\\/]*)
14654  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
14655  ;;
14656  *)
14657  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14658for as_dir in $PATH
14659do
14660  IFS=$as_save_IFS
14661  test -z "$as_dir" && as_dir=.
14662    for ac_exec_ext in '' $ac_executable_extensions; do
14663  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14664    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
14665    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14666    break 2
14667  fi
14668done
14669  done
14670IFS=$as_save_IFS
14671
14672  ;;
14673esac
14674fi
14675PKG_CONFIG=$ac_cv_path_PKG_CONFIG
14676if test -n "$PKG_CONFIG"; then
14677  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
14678$as_echo "$PKG_CONFIG" >&6; }
14679else
14680  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14681$as_echo "no" >&6; }
14682fi
14683
14684
14685fi
14686if test -z "$ac_cv_path_PKG_CONFIG"; then
14687  ac_pt_PKG_CONFIG=$PKG_CONFIG
14688  # Extract the first word of "pkg-config", so it can be a program name with args.
14689set dummy pkg-config; ac_word=$2
14690{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14691$as_echo_n "checking for $ac_word... " >&6; }
14692if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
14693  $as_echo_n "(cached) " >&6
14694else
14695  case $ac_pt_PKG_CONFIG in
14696  [\\/]* | ?:[\\/]*)
14697  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
14698  ;;
14699  *)
14700  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14701for as_dir in $PATH
14702do
14703  IFS=$as_save_IFS
14704  test -z "$as_dir" && as_dir=.
14705    for ac_exec_ext in '' $ac_executable_extensions; do
14706  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14707    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
14708    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14709    break 2
14710  fi
14711done
14712  done
14713IFS=$as_save_IFS
14714
14715  ;;
14716esac
14717fi
14718ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
14719if test -n "$ac_pt_PKG_CONFIG"; then
14720  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
14721$as_echo "$ac_pt_PKG_CONFIG" >&6; }
14722else
14723  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14724$as_echo "no" >&6; }
14725fi
14726
14727  if test "x$ac_pt_PKG_CONFIG" = x; then
14728    PKG_CONFIG=""
14729  else
14730    case $cross_compiling:$ac_tool_warned in
14731yes:)
14732{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
14733$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
14734ac_tool_warned=yes ;;
14735esac
14736    PKG_CONFIG=$ac_pt_PKG_CONFIG
14737  fi
14738else
14739  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
14740fi
14741
14742fi
14743if test -n "$PKG_CONFIG"; then
14744	_pkg_min_version=0.9.0
14745	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
14746$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
14747	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
14748		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14749$as_echo "yes" >&6; }
14750	else
14751		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14752$as_echo "no" >&6; }
14753		PKG_CONFIG=""
14754	fi
14755fi
14756fi
14757
14758# Checks for header files.
14759for 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
14760do :
14761  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
14762ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
14763"
14764if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
14765  cat >>confdefs.h <<_ACEOF
14766#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
14767_ACEOF
14768
14769fi
14770
14771done
14772
14773# net/if.h portability for Darwin see:
14774# https://www.gnu.org/software/autoconf/manual/autoconf-2.69/html_node/Header-Portability.html
14775for ac_header in net/if.h
14776do :
14777  ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "
14778#include <stdio.h>
14779#ifdef STDC_HEADERS
14780# include <stdlib.h>
14781# include <stddef.h>
14782#else
14783# ifdef HAVE_STDLIB_H
14784#  include <stdlib.h>
14785# endif
14786#endif
14787#ifdef HAVE_SYS_SOCKET_H
14788# include <sys/socket.h>
14789#endif
14790
14791"
14792if test "x$ac_cv_header_net_if_h" = xyes; then :
14793  cat >>confdefs.h <<_ACEOF
14794#define HAVE_NET_IF_H 1
14795_ACEOF
14796
14797fi
14798
14799done
14800
14801
14802# Check for Apple header. This uncovers TARGET_OS_IPHONE, TARGET_OS_TV or TARGET_OS_WATCH
14803for ac_header in TargetConditionals.h
14804do :
14805  ac_fn_c_check_header_compile "$LINENO" "TargetConditionals.h" "ac_cv_header_TargetConditionals_h" "$ac_includes_default
14806"
14807if test "x$ac_cv_header_TargetConditionals_h" = xyes; then :
14808  cat >>confdefs.h <<_ACEOF
14809#define HAVE_TARGETCONDITIONALS_H 1
14810_ACEOF
14811
14812fi
14813
14814done
14815
14816for ac_header in netioapi.h
14817do :
14818  ac_fn_c_check_header_compile "$LINENO" "netioapi.h" "ac_cv_header_netioapi_h" "$ac_includes_default
14819#if HAVE_SYS_PARAM_H
14820#include <sys/param.h>
14821#endif
14822
14823#ifdef HAVE_SYS_SOCKET_H
14824#include <sys/socket.h>
14825#endif
14826
14827#ifdef HAVE_SYS_UIO_H
14828#include <sys/uio.h>
14829#endif
14830
14831#ifdef HAVE_NETINET_IN_H
14832#include <netinet/in.h>
14833#endif
14834
14835#ifdef HAVE_NETINET_TCP_H
14836#include <netinet/tcp.h>
14837#endif
14838
14839#ifdef HAVE_ARPA_INET_H
14840#include <arpa/inet.h>
14841#endif
14842
14843#ifdef HAVE_WINSOCK2_H
14844#include <winsock2.h>
14845#endif
14846
14847#ifdef HAVE_WS2TCPIP_H
14848#include <ws2tcpip.h>
14849#endif
14850
14851"
14852if test "x$ac_cv_header_netioapi_h" = xyes; then :
14853  cat >>confdefs.h <<_ACEOF
14854#define HAVE_NETIOAPI_H 1
14855_ACEOF
14856
14857fi
14858
14859done
14860
14861
14862# check for types.
14863# Using own tests for int64* because autoconf builtin only give 32bit.
14864ac_fn_c_check_type "$LINENO" "int8_t" "ac_cv_type_int8_t" "$ac_includes_default"
14865if test "x$ac_cv_type_int8_t" = xyes; then :
14866
14867else
14868
14869cat >>confdefs.h <<_ACEOF
14870#define int8_t signed char
14871_ACEOF
14872
14873fi
14874
14875ac_fn_c_check_type "$LINENO" "int16_t" "ac_cv_type_int16_t" "$ac_includes_default"
14876if test "x$ac_cv_type_int16_t" = xyes; then :
14877
14878else
14879
14880cat >>confdefs.h <<_ACEOF
14881#define int16_t short
14882_ACEOF
14883
14884fi
14885
14886ac_fn_c_check_type "$LINENO" "int32_t" "ac_cv_type_int32_t" "$ac_includes_default"
14887if test "x$ac_cv_type_int32_t" = xyes; then :
14888
14889else
14890
14891cat >>confdefs.h <<_ACEOF
14892#define int32_t int
14893_ACEOF
14894
14895fi
14896
14897ac_fn_c_check_type "$LINENO" "int64_t" "ac_cv_type_int64_t" "$ac_includes_default"
14898if test "x$ac_cv_type_int64_t" = xyes; then :
14899
14900else
14901
14902cat >>confdefs.h <<_ACEOF
14903#define int64_t long long
14904_ACEOF
14905
14906fi
14907
14908ac_fn_c_check_type "$LINENO" "uint8_t" "ac_cv_type_uint8_t" "$ac_includes_default"
14909if test "x$ac_cv_type_uint8_t" = xyes; then :
14910
14911else
14912
14913cat >>confdefs.h <<_ACEOF
14914#define uint8_t unsigned char
14915_ACEOF
14916
14917fi
14918
14919ac_fn_c_check_type "$LINENO" "uint16_t" "ac_cv_type_uint16_t" "$ac_includes_default"
14920if test "x$ac_cv_type_uint16_t" = xyes; then :
14921
14922else
14923
14924cat >>confdefs.h <<_ACEOF
14925#define uint16_t unsigned short
14926_ACEOF
14927
14928fi
14929
14930ac_fn_c_check_type "$LINENO" "uint32_t" "ac_cv_type_uint32_t" "$ac_includes_default"
14931if test "x$ac_cv_type_uint32_t" = xyes; then :
14932
14933else
14934
14935cat >>confdefs.h <<_ACEOF
14936#define uint32_t unsigned int
14937_ACEOF
14938
14939fi
14940
14941ac_fn_c_check_type "$LINENO" "uint64_t" "ac_cv_type_uint64_t" "$ac_includes_default"
14942if test "x$ac_cv_type_uint64_t" = xyes; then :
14943
14944else
14945
14946cat >>confdefs.h <<_ACEOF
14947#define uint64_t unsigned long long
14948_ACEOF
14949
14950fi
14951
14952ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
14953if test "x$ac_cv_type_size_t" = xyes; then :
14954
14955else
14956
14957cat >>confdefs.h <<_ACEOF
14958#define size_t unsigned int
14959_ACEOF
14960
14961fi
14962
14963ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
14964if test "x$ac_cv_type_ssize_t" = xyes; then :
14965
14966else
14967
14968cat >>confdefs.h <<_ACEOF
14969#define ssize_t int
14970_ACEOF
14971
14972fi
14973
14974{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
14975$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
14976if ${ac_cv_type_uid_t+:} false; then :
14977  $as_echo_n "(cached) " >&6
14978else
14979  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14980/* end confdefs.h.  */
14981#include <sys/types.h>
14982
14983_ACEOF
14984if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14985  $EGREP "uid_t" >/dev/null 2>&1; then :
14986  ac_cv_type_uid_t=yes
14987else
14988  ac_cv_type_uid_t=no
14989fi
14990rm -f conftest*
14991
14992fi
14993{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
14994$as_echo "$ac_cv_type_uid_t" >&6; }
14995if test $ac_cv_type_uid_t = no; then
14996
14997$as_echo "#define uid_t int" >>confdefs.h
14998
14999
15000$as_echo "#define gid_t int" >>confdefs.h
15001
15002fi
15003
15004ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
15005if test "x$ac_cv_type_pid_t" = xyes; then :
15006
15007else
15008
15009cat >>confdefs.h <<_ACEOF
15010#define pid_t int
15011_ACEOF
15012
15013fi
15014
15015ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
15016if test "x$ac_cv_type_off_t" = xyes; then :
15017
15018else
15019
15020cat >>confdefs.h <<_ACEOF
15021#define off_t long int
15022_ACEOF
15023
15024fi
15025
15026ac_fn_c_check_type "$LINENO" "u_char" "ac_cv_type_u_char" "
15027$ac_includes_default
15028#ifdef HAVE_WINSOCK2_H
15029#  include <winsock2.h>
15030#endif
15031
15032"
15033if test "x$ac_cv_type_u_char" = xyes; then :
15034
15035else
15036
15037$as_echo "#define u_char unsigned char" >>confdefs.h
15038
15039fi
15040
15041ac_fn_c_check_type "$LINENO" "rlim_t" "ac_cv_type_rlim_t" "
15042$ac_includes_default
15043#ifdef HAVE_SYS_RESOURCE_H
15044#  include <sys/resource.h>
15045#endif
15046
15047"
15048if test "x$ac_cv_type_rlim_t" = xyes; then :
15049
15050else
15051
15052$as_echo "#define rlim_t unsigned long" >>confdefs.h
15053
15054fi
15055
15056
15057ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
15058$ac_includes_default
15059#ifdef HAVE_SYS_SOCKET_H
15060#  include <sys/socket.h>
15061#endif
15062#ifdef HAVE_WS2TCPIP_H
15063#  include <ws2tcpip.h>
15064#endif
15065
15066"
15067if test "x$ac_cv_type_socklen_t" = xyes; then :
15068
15069else
15070
15071$as_echo "#define socklen_t int" >>confdefs.h
15072
15073fi
15074
15075 ac_fn_c_check_type "$LINENO" "in_addr_t" "ac_cv_type_in_addr_t" "
15076$ac_includes_default
15077#ifdef HAVE_SYS_TYPES_H
15078# include <sys/types.h>
15079#endif
15080#ifdef HAVE_NETINET_IN_H
15081# include <netinet/in.h>
15082#endif
15083
15084"
15085if test "x$ac_cv_type_in_addr_t" = xyes; then :
15086
15087else
15088
15089$as_echo "#define in_addr_t uint32_t" >>confdefs.h
15090
15091fi
15092
15093 ac_fn_c_check_type "$LINENO" "in_port_t" "ac_cv_type_in_port_t" "
15094$ac_includes_default
15095#ifdef HAVE_SYS_TYPES_H
15096# include <sys/types.h>
15097#endif
15098#ifdef HAVE_NETINET_IN_H
15099# include <netinet/in.h>
15100#endif
15101
15102"
15103if test "x$ac_cv_type_in_port_t" = xyes; then :
15104
15105else
15106
15107$as_echo "#define in_port_t uint16_t" >>confdefs.h
15108
15109fi
15110
15111{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if memcmp compares unsigned" >&5
15112$as_echo_n "checking if memcmp compares unsigned... " >&6; }
15113if test "$cross_compiling" = yes; then :
15114   { $as_echo "$as_me:${as_lineno-$LINENO}: result: cross-compile no" >&5
15115$as_echo "cross-compile no" >&6; }
15116
15117$as_echo "#define MEMCMP_IS_BROKEN 1" >>confdefs.h
15118
15119  case " $LIBOBJS " in
15120  *" memcmp.$ac_objext "* ) ;;
15121  *) LIBOBJS="$LIBOBJS memcmp.$ac_objext"
15122 ;;
15123esac
15124
15125
15126else
15127  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15128/* end confdefs.h.  */
15129
15130#include <stdio.h>
15131#include <stdlib.h>
15132#include <string.h>
15133int main(void)
15134{
15135	char a = 255, b = 0;
15136	if(memcmp(&a, &b, 1) < 0)
15137		return 1;
15138	return 0;
15139}
15140
15141_ACEOF
15142if ac_fn_c_try_run "$LINENO"; then :
15143  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15144$as_echo "yes" >&6; }
15145else
15146   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15147$as_echo "no" >&6; }
15148
15149$as_echo "#define MEMCMP_IS_BROKEN 1" >>confdefs.h
15150
15151  case " $LIBOBJS " in
15152  *" memcmp.$ac_objext "* ) ;;
15153  *) LIBOBJS="$LIBOBJS memcmp.$ac_objext"
15154 ;;
15155esac
15156
15157
15158fi
15159rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15160  conftest.$ac_objext conftest.beam conftest.$ac_ext
15161fi
15162
15163
15164# The cast to long int works around a bug in the HP C Compiler
15165# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
15166# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
15167# This bug is HP SR number 8606223364.
15168{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
15169$as_echo_n "checking size of time_t... " >&6; }
15170if ${ac_cv_sizeof_time_t+:} false; then :
15171  $as_echo_n "(cached) " >&6
15172else
15173  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t"        "
15174$ac_includes_default
15175#ifdef TIME_WITH_SYS_TIME
15176# include <sys/time.h>
15177# include <time.h>
15178#else
15179# ifdef HAVE_SYS_TIME_H
15180#  include <sys/time.h>
15181# else
15182#  include <time.h>
15183# endif
15184#endif
15185
15186"; then :
15187
15188else
15189  if test "$ac_cv_type_time_t" = yes; then
15190     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
15191$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
15192as_fn_error 77 "cannot compute sizeof (time_t)
15193See \`config.log' for more details" "$LINENO" 5; }
15194   else
15195     ac_cv_sizeof_time_t=0
15196   fi
15197fi
15198
15199fi
15200{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
15201$as_echo "$ac_cv_sizeof_time_t" >&6; }
15202
15203
15204
15205cat >>confdefs.h <<_ACEOF
15206#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
15207_ACEOF
15208
15209
15210# The cast to long int works around a bug in the HP C Compiler
15211# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
15212# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
15213# This bug is HP SR number 8606223364.
15214{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
15215$as_echo_n "checking size of size_t... " >&6; }
15216if ${ac_cv_sizeof_size_t+:} false; then :
15217  $as_echo_n "(cached) " >&6
15218else
15219  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (size_t))" "ac_cv_sizeof_size_t"        "$ac_includes_default"; then :
15220
15221else
15222  if test "$ac_cv_type_size_t" = yes; then
15223     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
15224$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
15225as_fn_error 77 "cannot compute sizeof (size_t)
15226See \`config.log' for more details" "$LINENO" 5; }
15227   else
15228     ac_cv_sizeof_size_t=0
15229   fi
15230fi
15231
15232fi
15233{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
15234$as_echo "$ac_cv_sizeof_size_t" >&6; }
15235
15236
15237
15238cat >>confdefs.h <<_ACEOF
15239#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
15240_ACEOF
15241
15242
15243
15244# add option to disable the evil rpath
15245
15246# Check whether --enable-rpath was given.
15247if test "${enable_rpath+set}" = set; then :
15248  enableval=$enable_rpath; enable_rpath=$enableval
15249else
15250  enable_rpath=yes
15251fi
15252
15253if test "x$enable_rpath" = xno; then
15254		ac_config_commands="$ac_config_commands disable-rpath"
15255
15256fi
15257
15258
15259
15260# check to see if libraries are needed for these functions.
15261{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing inet_pton" >&5
15262$as_echo_n "checking for library containing inet_pton... " >&6; }
15263if ${ac_cv_search_inet_pton+:} false; then :
15264  $as_echo_n "(cached) " >&6
15265else
15266  ac_func_search_save_LIBS=$LIBS
15267cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15268/* end confdefs.h.  */
15269
15270/* Override any GCC internal prototype to avoid an error.
15271   Use char because int might match the return type of a GCC
15272   builtin and then its argument prototype would still apply.  */
15273#ifdef __cplusplus
15274extern "C"
15275#endif
15276char inet_pton ();
15277int
15278main ()
15279{
15280return inet_pton ();
15281  ;
15282  return 0;
15283}
15284_ACEOF
15285for ac_lib in '' nsl; do
15286  if test -z "$ac_lib"; then
15287    ac_res="none required"
15288  else
15289    ac_res=-l$ac_lib
15290    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
15291  fi
15292  if ac_fn_c_try_link "$LINENO"; then :
15293  ac_cv_search_inet_pton=$ac_res
15294fi
15295rm -f core conftest.err conftest.$ac_objext \
15296    conftest$ac_exeext
15297  if ${ac_cv_search_inet_pton+:} false; then :
15298  break
15299fi
15300done
15301if ${ac_cv_search_inet_pton+:} false; then :
15302
15303else
15304  ac_cv_search_inet_pton=no
15305fi
15306rm conftest.$ac_ext
15307LIBS=$ac_func_search_save_LIBS
15308fi
15309{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_inet_pton" >&5
15310$as_echo "$ac_cv_search_inet_pton" >&6; }
15311ac_res=$ac_cv_search_inet_pton
15312if test "$ac_res" != no; then :
15313  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
15314
15315fi
15316
15317{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing socket" >&5
15318$as_echo_n "checking for library containing socket... " >&6; }
15319if ${ac_cv_search_socket+:} false; then :
15320  $as_echo_n "(cached) " >&6
15321else
15322  ac_func_search_save_LIBS=$LIBS
15323cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15324/* end confdefs.h.  */
15325
15326/* Override any GCC internal prototype to avoid an error.
15327   Use char because int might match the return type of a GCC
15328   builtin and then its argument prototype would still apply.  */
15329#ifdef __cplusplus
15330extern "C"
15331#endif
15332char socket ();
15333int
15334main ()
15335{
15336return socket ();
15337  ;
15338  return 0;
15339}
15340_ACEOF
15341for ac_lib in '' socket; do
15342  if test -z "$ac_lib"; then
15343    ac_res="none required"
15344  else
15345    ac_res=-l$ac_lib
15346    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
15347  fi
15348  if ac_fn_c_try_link "$LINENO"; then :
15349  ac_cv_search_socket=$ac_res
15350fi
15351rm -f core conftest.err conftest.$ac_objext \
15352    conftest$ac_exeext
15353  if ${ac_cv_search_socket+:} false; then :
15354  break
15355fi
15356done
15357if ${ac_cv_search_socket+:} false; then :
15358
15359else
15360  ac_cv_search_socket=no
15361fi
15362rm conftest.$ac_ext
15363LIBS=$ac_func_search_save_LIBS
15364fi
15365{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socket" >&5
15366$as_echo "$ac_cv_search_socket" >&6; }
15367ac_res=$ac_cv_search_socket
15368if test "$ac_res" != no; then :
15369  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
15370
15371fi
15372
15373
15374# check whether strptime also works
15375
15376# check some functions of the OS before linking libs (while still runnable).
15377for ac_header in unistd.h
15378do :
15379  ac_fn_c_check_header_mongrel "$LINENO" "unistd.h" "ac_cv_header_unistd_h" "$ac_includes_default"
15380if test "x$ac_cv_header_unistd_h" = xyes; then :
15381  cat >>confdefs.h <<_ACEOF
15382#define HAVE_UNISTD_H 1
15383_ACEOF
15384
15385fi
15386
15387done
15388
15389{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working chown" >&5
15390$as_echo_n "checking for working chown... " >&6; }
15391if ${ac_cv_func_chown_works+:} false; then :
15392  $as_echo_n "(cached) " >&6
15393else
15394  if test "$cross_compiling" = yes; then :
15395  ac_cv_func_chown_works=no
15396else
15397  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15398/* end confdefs.h.  */
15399$ac_includes_default
15400#include <fcntl.h>
15401
15402int
15403main ()
15404{
15405  char *f = "conftest.chown";
15406  struct stat before, after;
15407
15408  if (creat (f, 0600) < 0)
15409    return 1;
15410  if (stat (f, &before) < 0)
15411    return 1;
15412  if (chown (f, (uid_t) -1, (gid_t) -1) == -1)
15413    return 1;
15414  if (stat (f, &after) < 0)
15415    return 1;
15416  return ! (before.st_uid == after.st_uid && before.st_gid == after.st_gid);
15417
15418  ;
15419  return 0;
15420}
15421_ACEOF
15422if ac_fn_c_try_run "$LINENO"; then :
15423  ac_cv_func_chown_works=yes
15424else
15425  ac_cv_func_chown_works=no
15426fi
15427rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15428  conftest.$ac_objext conftest.beam conftest.$ac_ext
15429fi
15430
15431rm -f conftest.chown
15432
15433fi
15434{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_chown_works" >&5
15435$as_echo "$ac_cv_func_chown_works" >&6; }
15436if test $ac_cv_func_chown_works = yes; then
15437
15438$as_echo "#define HAVE_CHOWN 1" >>confdefs.h
15439
15440fi
15441
15442for ac_header in vfork.h
15443do :
15444  ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default"
15445if test "x$ac_cv_header_vfork_h" = xyes; then :
15446  cat >>confdefs.h <<_ACEOF
15447#define HAVE_VFORK_H 1
15448_ACEOF
15449
15450fi
15451
15452done
15453
15454for ac_func in fork vfork
15455do :
15456  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
15457ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
15458if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
15459  cat >>confdefs.h <<_ACEOF
15460#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
15461_ACEOF
15462
15463fi
15464done
15465
15466if test "x$ac_cv_func_fork" = xyes; then
15467  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5
15468$as_echo_n "checking for working fork... " >&6; }
15469if ${ac_cv_func_fork_works+:} false; then :
15470  $as_echo_n "(cached) " >&6
15471else
15472  if test "$cross_compiling" = yes; then :
15473  ac_cv_func_fork_works=cross
15474else
15475  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15476/* end confdefs.h.  */
15477$ac_includes_default
15478int
15479main ()
15480{
15481
15482	  /* By Ruediger Kuhlmann. */
15483	  return fork () < 0;
15484
15485  ;
15486  return 0;
15487}
15488_ACEOF
15489if ac_fn_c_try_run "$LINENO"; then :
15490  ac_cv_func_fork_works=yes
15491else
15492  ac_cv_func_fork_works=no
15493fi
15494rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15495  conftest.$ac_objext conftest.beam conftest.$ac_ext
15496fi
15497
15498fi
15499{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5
15500$as_echo "$ac_cv_func_fork_works" >&6; }
15501
15502else
15503  ac_cv_func_fork_works=$ac_cv_func_fork
15504fi
15505if test "x$ac_cv_func_fork_works" = xcross; then
15506  case $host in
15507    *-*-amigaos* | *-*-msdosdjgpp*)
15508      # Override, as these systems have only a dummy fork() stub
15509      ac_cv_func_fork_works=no
15510      ;;
15511    *)
15512      ac_cv_func_fork_works=yes
15513      ;;
15514  esac
15515  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
15516$as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
15517fi
15518ac_cv_func_vfork_works=$ac_cv_func_vfork
15519if test "x$ac_cv_func_vfork" = xyes; then
15520  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5
15521$as_echo_n "checking for working vfork... " >&6; }
15522if ${ac_cv_func_vfork_works+:} false; then :
15523  $as_echo_n "(cached) " >&6
15524else
15525  if test "$cross_compiling" = yes; then :
15526  ac_cv_func_vfork_works=cross
15527else
15528  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15529/* end confdefs.h.  */
15530/* Thanks to Paul Eggert for this test.  */
15531$ac_includes_default
15532#include <sys/wait.h>
15533#ifdef HAVE_VFORK_H
15534# include <vfork.h>
15535#endif
15536/* On some sparc systems, changes by the child to local and incoming
15537   argument registers are propagated back to the parent.  The compiler
15538   is told about this with #include <vfork.h>, but some compilers
15539   (e.g. gcc -O) don't grok <vfork.h>.  Test for this by using a
15540   static variable whose address is put into a register that is
15541   clobbered by the vfork.  */
15542static void
15543#ifdef __cplusplus
15544sparc_address_test (int arg)
15545# else
15546sparc_address_test (arg) int arg;
15547#endif
15548{
15549  static pid_t child;
15550  if (!child) {
15551    child = vfork ();
15552    if (child < 0) {
15553      perror ("vfork");
15554      _exit(2);
15555    }
15556    if (!child) {
15557      arg = getpid();
15558      write(-1, "", 0);
15559      _exit (arg);
15560    }
15561  }
15562}
15563
15564int
15565main ()
15566{
15567  pid_t parent = getpid ();
15568  pid_t child;
15569
15570  sparc_address_test (0);
15571
15572  child = vfork ();
15573
15574  if (child == 0) {
15575    /* Here is another test for sparc vfork register problems.  This
15576       test uses lots of local variables, at least as many local
15577       variables as main has allocated so far including compiler
15578       temporaries.  4 locals are enough for gcc 1.40.3 on a Solaris
15579       4.1.3 sparc, but we use 8 to be safe.  A buggy compiler should
15580       reuse the register of parent for one of the local variables,
15581       since it will think that parent can't possibly be used any more
15582       in this routine.  Assigning to the local variable will thus
15583       munge parent in the parent process.  */
15584    pid_t
15585      p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
15586      p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
15587    /* Convince the compiler that p..p7 are live; otherwise, it might
15588       use the same hardware register for all 8 local variables.  */
15589    if (p != p1 || p != p2 || p != p3 || p != p4
15590	|| p != p5 || p != p6 || p != p7)
15591      _exit(1);
15592
15593    /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
15594       from child file descriptors.  If the child closes a descriptor
15595       before it execs or exits, this munges the parent's descriptor
15596       as well.  Test for this by closing stdout in the child.  */
15597    _exit(close(fileno(stdout)) != 0);
15598  } else {
15599    int status;
15600    struct stat st;
15601
15602    while (wait(&status) != child)
15603      ;
15604    return (
15605	 /* Was there some problem with vforking?  */
15606	 child < 0
15607
15608	 /* Did the child fail?  (This shouldn't happen.)  */
15609	 || status
15610
15611	 /* Did the vfork/compiler bug occur?  */
15612	 || parent != getpid()
15613
15614	 /* Did the file descriptor bug occur?  */
15615	 || fstat(fileno(stdout), &st) != 0
15616	 );
15617  }
15618}
15619_ACEOF
15620if ac_fn_c_try_run "$LINENO"; then :
15621  ac_cv_func_vfork_works=yes
15622else
15623  ac_cv_func_vfork_works=no
15624fi
15625rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15626  conftest.$ac_objext conftest.beam conftest.$ac_ext
15627fi
15628
15629fi
15630{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5
15631$as_echo "$ac_cv_func_vfork_works" >&6; }
15632
15633fi;
15634if test "x$ac_cv_func_fork_works" = xcross; then
15635  ac_cv_func_vfork_works=$ac_cv_func_vfork
15636  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
15637$as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
15638fi
15639
15640if test "x$ac_cv_func_vfork_works" = xyes; then
15641
15642$as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h
15643
15644else
15645
15646$as_echo "#define vfork fork" >>confdefs.h
15647
15648fi
15649if test "x$ac_cv_func_fork_works" = xyes; then
15650
15651$as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h
15652
15653fi
15654
15655
15656$as_echo "#define RETSIGTYPE void" >>confdefs.h
15657
15658{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGEFILE_SOURCE value needed for large files" >&5
15659$as_echo_n "checking for _LARGEFILE_SOURCE value needed for large files... " >&6; }
15660if ${ac_cv_sys_largefile_source+:} false; then :
15661  $as_echo_n "(cached) " >&6
15662else
15663  while :; do
15664  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15665/* end confdefs.h.  */
15666#include <sys/types.h> /* for off_t */
15667     #include <stdio.h>
15668int
15669main ()
15670{
15671int (*fp) (FILE *, off_t, int) = fseeko;
15672     return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
15673  ;
15674  return 0;
15675}
15676_ACEOF
15677if ac_fn_c_try_link "$LINENO"; then :
15678  ac_cv_sys_largefile_source=no; break
15679fi
15680rm -f core conftest.err conftest.$ac_objext \
15681    conftest$ac_exeext conftest.$ac_ext
15682  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15683/* end confdefs.h.  */
15684#define _LARGEFILE_SOURCE 1
15685#include <sys/types.h> /* for off_t */
15686     #include <stdio.h>
15687int
15688main ()
15689{
15690int (*fp) (FILE *, off_t, int) = fseeko;
15691     return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
15692  ;
15693  return 0;
15694}
15695_ACEOF
15696if ac_fn_c_try_link "$LINENO"; then :
15697  ac_cv_sys_largefile_source=1; break
15698fi
15699rm -f core conftest.err conftest.$ac_objext \
15700    conftest$ac_exeext conftest.$ac_ext
15701  ac_cv_sys_largefile_source=unknown
15702  break
15703done
15704fi
15705{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_source" >&5
15706$as_echo "$ac_cv_sys_largefile_source" >&6; }
15707case $ac_cv_sys_largefile_source in #(
15708  no | unknown) ;;
15709  *)
15710cat >>confdefs.h <<_ACEOF
15711#define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
15712_ACEOF
15713;;
15714esac
15715rm -rf conftest*
15716
15717# We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
15718# in glibc 2.1.3, but that breaks too many other things.
15719# If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
15720if test $ac_cv_sys_largefile_source != unknown; then
15721
15722$as_echo "#define HAVE_FSEEKO 1" >>confdefs.h
15723
15724fi
15725
15726
15727# Check whether --enable-largefile was given.
15728if test "${enable_largefile+set}" = set; then :
15729  enableval=$enable_largefile;
15730fi
15731
15732if test "$enable_largefile" != no; then
15733
15734  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
15735$as_echo_n "checking for special C compiler options needed for large files... " >&6; }
15736if ${ac_cv_sys_largefile_CC+:} false; then :
15737  $as_echo_n "(cached) " >&6
15738else
15739  ac_cv_sys_largefile_CC=no
15740     if test "$GCC" != yes; then
15741       ac_save_CC=$CC
15742       while :; do
15743	 # IRIX 6.2 and later do not support large files by default,
15744	 # so use the C compiler's -n32 option if that helps.
15745	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15746/* end confdefs.h.  */
15747#include <sys/types.h>
15748 /* Check that off_t can represent 2**63 - 1 correctly.
15749    We can't simply define LARGE_OFF_T to be 9223372036854775807,
15750    since some C++ compilers masquerading as C compilers
15751    incorrectly reject 9223372036854775807.  */
15752#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
15753  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
15754		       && LARGE_OFF_T % 2147483647 == 1)
15755		      ? 1 : -1];
15756int
15757main ()
15758{
15759
15760  ;
15761  return 0;
15762}
15763_ACEOF
15764	 if ac_fn_c_try_compile "$LINENO"; then :
15765  break
15766fi
15767rm -f core conftest.err conftest.$ac_objext
15768	 CC="$CC -n32"
15769	 if ac_fn_c_try_compile "$LINENO"; then :
15770  ac_cv_sys_largefile_CC=' -n32'; break
15771fi
15772rm -f core conftest.err conftest.$ac_objext
15773	 break
15774       done
15775       CC=$ac_save_CC
15776       rm -f conftest.$ac_ext
15777    fi
15778fi
15779{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
15780$as_echo "$ac_cv_sys_largefile_CC" >&6; }
15781  if test "$ac_cv_sys_largefile_CC" != no; then
15782    CC=$CC$ac_cv_sys_largefile_CC
15783  fi
15784
15785  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
15786$as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
15787if ${ac_cv_sys_file_offset_bits+:} false; then :
15788  $as_echo_n "(cached) " >&6
15789else
15790  while :; do
15791  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15792/* end confdefs.h.  */
15793#include <sys/types.h>
15794 /* Check that off_t can represent 2**63 - 1 correctly.
15795    We can't simply define LARGE_OFF_T to be 9223372036854775807,
15796    since some C++ compilers masquerading as C compilers
15797    incorrectly reject 9223372036854775807.  */
15798#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
15799  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
15800		       && LARGE_OFF_T % 2147483647 == 1)
15801		      ? 1 : -1];
15802int
15803main ()
15804{
15805
15806  ;
15807  return 0;
15808}
15809_ACEOF
15810if ac_fn_c_try_compile "$LINENO"; then :
15811  ac_cv_sys_file_offset_bits=no; break
15812fi
15813rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15814  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15815/* end confdefs.h.  */
15816#define _FILE_OFFSET_BITS 64
15817#include <sys/types.h>
15818 /* Check that off_t can represent 2**63 - 1 correctly.
15819    We can't simply define LARGE_OFF_T to be 9223372036854775807,
15820    since some C++ compilers masquerading as C compilers
15821    incorrectly reject 9223372036854775807.  */
15822#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
15823  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
15824		       && LARGE_OFF_T % 2147483647 == 1)
15825		      ? 1 : -1];
15826int
15827main ()
15828{
15829
15830  ;
15831  return 0;
15832}
15833_ACEOF
15834if ac_fn_c_try_compile "$LINENO"; then :
15835  ac_cv_sys_file_offset_bits=64; break
15836fi
15837rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15838  ac_cv_sys_file_offset_bits=unknown
15839  break
15840done
15841fi
15842{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
15843$as_echo "$ac_cv_sys_file_offset_bits" >&6; }
15844case $ac_cv_sys_file_offset_bits in #(
15845  no | unknown) ;;
15846  *)
15847cat >>confdefs.h <<_ACEOF
15848#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
15849_ACEOF
15850;;
15851esac
15852rm -rf conftest*
15853  if test $ac_cv_sys_file_offset_bits = unknown; then
15854    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
15855$as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
15856if ${ac_cv_sys_large_files+:} false; then :
15857  $as_echo_n "(cached) " >&6
15858else
15859  while :; do
15860  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15861/* end confdefs.h.  */
15862#include <sys/types.h>
15863 /* Check that off_t can represent 2**63 - 1 correctly.
15864    We can't simply define LARGE_OFF_T to be 9223372036854775807,
15865    since some C++ compilers masquerading as C compilers
15866    incorrectly reject 9223372036854775807.  */
15867#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
15868  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
15869		       && LARGE_OFF_T % 2147483647 == 1)
15870		      ? 1 : -1];
15871int
15872main ()
15873{
15874
15875  ;
15876  return 0;
15877}
15878_ACEOF
15879if ac_fn_c_try_compile "$LINENO"; then :
15880  ac_cv_sys_large_files=no; break
15881fi
15882rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15883  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15884/* end confdefs.h.  */
15885#define _LARGE_FILES 1
15886#include <sys/types.h>
15887 /* Check that off_t can represent 2**63 - 1 correctly.
15888    We can't simply define LARGE_OFF_T to be 9223372036854775807,
15889    since some C++ compilers masquerading as C compilers
15890    incorrectly reject 9223372036854775807.  */
15891#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
15892  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
15893		       && LARGE_OFF_T % 2147483647 == 1)
15894		      ? 1 : -1];
15895int
15896main ()
15897{
15898
15899  ;
15900  return 0;
15901}
15902_ACEOF
15903if ac_fn_c_try_compile "$LINENO"; then :
15904  ac_cv_sys_large_files=1; break
15905fi
15906rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15907  ac_cv_sys_large_files=unknown
15908  break
15909done
15910fi
15911{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
15912$as_echo "$ac_cv_sys_large_files" >&6; }
15913case $ac_cv_sys_large_files in #(
15914  no | unknown) ;;
15915  *)
15916cat >>confdefs.h <<_ACEOF
15917#define _LARGE_FILES $ac_cv_sys_large_files
15918_ACEOF
15919;;
15920esac
15921rm -rf conftest*
15922  fi
15923
15924
15925fi
15926
15927
15928
15929
15930{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we need -D_LARGEFILE_SOURCE=1 as a flag for $CC" >&5
15931$as_echo_n "checking whether we need -D_LARGEFILE_SOURCE=1 as a flag for $CC... " >&6; }
15932cache=_D_LARGEFILE_SOURCE_1
15933if eval \${cv_prog_cc_flag_needed_$cache+:} false; then :
15934  $as_echo_n "(cached) " >&6
15935else
15936
15937echo '
15938#include <stdio.h>
15939int test() {
15940        int a = fseeko(stdin, 0, 0);
15941        return a;
15942}
15943' > conftest.c
15944echo 'void f(){}' >>conftest.c
15945if test -z "`$CC $CPPFLAGS $CFLAGS $ERRFLAG -c conftest.c 2>&1`"; then
15946eval "cv_prog_cc_flag_needed_$cache=no"
15947else
15948
15949if test -z "`$CC $CPPFLAGS $CFLAGS -D_LARGEFILE_SOURCE=1 $ERRFLAG -c conftest.c 2>&1`"; then
15950eval "cv_prog_cc_flag_needed_$cache=yes"
15951else
15952eval "cv_prog_cc_flag_needed_$cache=fail"
15953#echo 'Test with flag fails too!'
15954#cat conftest.c
15955#echo "$CC $CPPFLAGS $CFLAGS -D_LARGEFILE_SOURCE=1 $ERRFLAG -c conftest.c 2>&1"
15956#echo `$CC $CPPFLAGS $CFLAGS -D_LARGEFILE_SOURCE=1 $ERRFLAG -c conftest.c 2>&1`
15957#exit 1
15958fi
15959
15960fi
15961rm -f conftest conftest.c conftest.o
15962
15963fi
15964
15965if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = yes"; then
15966{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15967$as_echo "yes" >&6; }
15968:
15969CFLAGS="$CFLAGS -D_LARGEFILE_SOURCE=1"
15970else
15971if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = no"; then
15972{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15973$as_echo "no" >&6; }
15974#echo 'Test with flag is no!'
15975#cat conftest.c
15976#echo "$CC $CPPFLAGS $CFLAGS -D_LARGEFILE_SOURCE=1 $ERRFLAG -c conftest.c 2>&1"
15977#echo `$CC $CPPFLAGS $CFLAGS -D_LARGEFILE_SOURCE=1 $ERRFLAG -c conftest.c 2>&1`
15978#exit 1
15979:
15980
15981else
15982{ $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
15983$as_echo "failed" >&6; }
15984:
15985
15986fi
15987fi
15988
15989
15990
15991{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if nonblocking sockets work" >&5
15992$as_echo_n "checking if nonblocking sockets work... " >&6; }
15993if echo $host | grep mingw >/dev/null; then
15994	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no (windows)" >&5
15995$as_echo "no (windows)" >&6; }
15996
15997$as_echo "#define NONBLOCKING_IS_BROKEN 1" >>confdefs.h
15998
15999else
16000if test "$cross_compiling" = yes; then :
16001
16002	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: crosscompile(yes)" >&5
16003$as_echo "crosscompile(yes)" >&6; }
16004
16005else
16006  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16007/* end confdefs.h.  */
16008
16009
16010#include <stdio.h>
16011#include <string.h>
16012#include <stdlib.h>
16013#include <fcntl.h>
16014#include <errno.h>
16015#ifdef HAVE_SYS_TYPES_H
16016#include <sys/types.h>
16017#endif
16018#ifdef HAVE_SYS_SOCKET_H
16019#include <sys/socket.h>
16020#endif
16021#ifdef HAVE_NETINET_IN_H
16022#include <netinet/in.h>
16023#endif
16024#ifdef HAVE_ARPA_INET_H
16025#include <arpa/inet.h>
16026#endif
16027#ifdef HAVE_UNISTD_H
16028#include <unistd.h>
16029#endif
16030#ifdef HAVE_TIME_H
16031#include <time.h>
16032#endif
16033
16034int main(void)
16035{
16036	int port;
16037	int sfd, cfd;
16038	int num = 10;
16039	int i, p;
16040	struct sockaddr_in a;
16041	/* test if select and nonblocking reads work well together */
16042	/* open port.
16043	   fork child to send 10 messages.
16044	   select to read.
16045	   then try to nonblocking read the 10 messages
16046	   then, nonblocking read must give EAGAIN
16047	*/
16048
16049	port = 12345 + (time(0)%32);
16050	sfd = socket(PF_INET, SOCK_DGRAM, 0);
16051	if(sfd == -1) {
16052		perror("socket");
16053		return 1;
16054	}
16055	memset(&a, 0, sizeof(a));
16056	a.sin_family = AF_INET;
16057	a.sin_port = htons(port);
16058	a.sin_addr.s_addr = inet_addr("127.0.0.1");
16059	if(bind(sfd, (struct sockaddr*)&a, sizeof(a)) < 0) {
16060		perror("bind");
16061		return 1;
16062	}
16063	if(fcntl(sfd, F_SETFL, O_NONBLOCK) == -1) {
16064		perror("fcntl");
16065		return 1;
16066	}
16067
16068	cfd = socket(PF_INET, SOCK_DGRAM, 0);
16069	if(cfd == -1) {
16070		perror("client socket");
16071		return 1;
16072	}
16073	a.sin_port = 0;
16074	if(bind(cfd, (struct sockaddr*)&a, sizeof(a)) < 0) {
16075		perror("client bind");
16076		return 1;
16077	}
16078	a.sin_port = htons(port);
16079
16080	/* no handler, causes exit in 10 seconds */
16081	alarm(10);
16082
16083	/* send and receive on the socket */
16084	if((p=fork()) == 0) {
16085		for(i=0; i<num; i++) {
16086			if(sendto(cfd, &i, sizeof(i), 0,
16087				(struct sockaddr*)&a, sizeof(a)) < 0) {
16088				perror("sendto");
16089				return 1;
16090			}
16091		}
16092	} else {
16093		/* parent */
16094		fd_set rset;
16095		int x;
16096		if(p == -1) {
16097			perror("fork");
16098			return 1;
16099		}
16100		FD_ZERO(&rset);
16101		FD_SET(sfd, &rset);
16102		if(select(sfd+1, &rset, NULL, NULL, NULL) < 1) {
16103			perror("select");
16104			return 1;
16105		}
16106		i = 0;
16107		while(i < num) {
16108			if(recv(sfd, &x, sizeof(x), 0) != sizeof(x)) {
16109				if(errno == EAGAIN)
16110					continue;
16111				perror("recv");
16112				return 1;
16113			}
16114			i++;
16115		}
16116		/* now we want to get EAGAIN: nonblocking goodness */
16117		errno = 0;
16118		recv(sfd, &x, sizeof(x), 0);
16119		if(errno != EAGAIN) {
16120			perror("trying to recv again");
16121			return 1;
16122		}
16123		/* EAGAIN encountered */
16124	}
16125
16126	close(sfd);
16127	close(cfd);
16128	return 0;
16129}
16130
16131_ACEOF
16132if ac_fn_c_try_run "$LINENO"; then :
16133
16134	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16135$as_echo "yes" >&6; }
16136
16137else
16138
16139	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16140$as_echo "no" >&6; }
16141
16142$as_echo "#define NONBLOCKING_IS_BROKEN 1" >>confdefs.h
16143
16144
16145fi
16146rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16147  conftest.$ac_objext conftest.beam conftest.$ac_ext
16148fi
16149
16150fi
16151
16152
16153{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mkdir has one arg" >&5
16154$as_echo_n "checking whether mkdir has one arg... " >&6; }
16155cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16156/* end confdefs.h.  */
16157
16158#include <stdio.h>
16159#include <unistd.h>
16160#ifdef HAVE_WINSOCK2_H
16161#include <winsock2.h>
16162#endif
16163#ifdef HAVE_SYS_STAT_H
16164#include <sys/stat.h>
16165#endif
16166
16167int
16168main ()
16169{
16170
16171	(void)mkdir("directory");
16172
16173  ;
16174  return 0;
16175}
16176_ACEOF
16177if ac_fn_c_try_compile "$LINENO"; then :
16178  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16179$as_echo "yes" >&6; }
16180
16181$as_echo "#define MKDIR_HAS_ONE_ARG 1" >>confdefs.h
16182
16183
16184else
16185  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16186$as_echo "no" >&6; }
16187
16188fi
16189rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16190
16191for ac_func in strptime
16192do :
16193  ac_fn_c_check_func "$LINENO" "strptime" "ac_cv_func_strptime"
16194if test "x$ac_cv_func_strptime" = xyes; then :
16195  cat >>confdefs.h <<_ACEOF
16196#define HAVE_STRPTIME 1
16197_ACEOF
16198
16199{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strptime works" >&5
16200$as_echo_n "checking whether strptime works... " >&6; }
16201if test c${cross_compiling} = cno; then
16202if test "$cross_compiling" = yes; then :
16203  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
16204$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
16205as_fn_error $? "cannot run test program while cross compiling
16206See \`config.log' for more details" "$LINENO" 5; }
16207else
16208  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16209/* end confdefs.h.  */
16210
16211#define _XOPEN_SOURCE 600
16212#include <time.h>
16213int main(void) { struct tm tm; char *res;
16214res = 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);
16215if (!res) return 2;
16216res = strptime("20070207111842", "%Y%m%d%H%M%S", &tm);
16217if (!res) return 1; return 0; }
16218
16219_ACEOF
16220if ac_fn_c_try_run "$LINENO"; then :
16221  eval "ac_cv_c_strptime_works=yes"
16222else
16223  eval "ac_cv_c_strptime_works=no"
16224fi
16225rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16226  conftest.$ac_objext conftest.beam conftest.$ac_ext
16227fi
16228
16229else
16230eval "ac_cv_c_strptime_works=maybe"
16231fi
16232{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_strptime_works" >&5
16233$as_echo "$ac_cv_c_strptime_works" >&6; }
16234if test $ac_cv_c_strptime_works = no; then
16235case " $LIBOBJS " in
16236  *" strptime.$ac_objext "* ) ;;
16237  *) LIBOBJS="$LIBOBJS strptime.$ac_objext"
16238 ;;
16239esac
16240
16241else
16242
16243cat >>confdefs.h <<_ACEOF
16244#define STRPTIME_WORKS 1
16245_ACEOF
16246
16247fi
16248
16249else
16250  case " $LIBOBJS " in
16251  *" strptime.$ac_objext "* ) ;;
16252  *) LIBOBJS="$LIBOBJS strptime.$ac_objext"
16253 ;;
16254esac
16255
16256fi
16257done
16258
16259
16260# check if we can use SO_REUSEPORT
16261reuseport_default=0
16262if echo "$host" | $GREP -i -e linux >/dev/null; then reuseport_default=1; fi
16263if echo "$host" | $GREP -i -e dragonfly >/dev/null; then reuseport_default=1; fi
16264if test "$reuseport_default" = 1; then
16265
16266$as_echo "#define REUSEPORT_DEFAULT 1" >>confdefs.h
16267
16268else
16269
16270$as_echo "#define REUSEPORT_DEFAULT 0" >>confdefs.h
16271
16272fi
16273
16274# Include systemd.m4 - begin
16275#   macros for configuring systemd
16276#   Copyright 2015, Sami Kerola, CloudFlare.
16277#   BSD licensed.
16278# Check whether --enable-systemd was given.
16279if test "${enable_systemd+set}" = set; then :
16280  enableval=$enable_systemd;
16281else
16282  enable_systemd=no
16283fi
16284
16285have_systemd=no
16286if test "x$enable_systemd" != xno; then :
16287
16288
16289
16290pkg_failed=no
16291{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for SYSTEMD" >&5
16292$as_echo_n "checking for SYSTEMD... " >&6; }
16293
16294if test -n "$SYSTEMD_CFLAGS"; then
16295    pkg_cv_SYSTEMD_CFLAGS="$SYSTEMD_CFLAGS"
16296 elif test -n "$PKG_CONFIG"; then
16297    if test -n "$PKG_CONFIG" && \
16298    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libsystemd\""; } >&5
16299  ($PKG_CONFIG --exists --print-errors "libsystemd") 2>&5
16300  ac_status=$?
16301  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
16302  test $ac_status = 0; }; then
16303  pkg_cv_SYSTEMD_CFLAGS=`$PKG_CONFIG --cflags "libsystemd" 2>/dev/null`
16304		      test "x$?" != "x0" && pkg_failed=yes
16305else
16306  pkg_failed=yes
16307fi
16308 else
16309    pkg_failed=untried
16310fi
16311if test -n "$SYSTEMD_LIBS"; then
16312    pkg_cv_SYSTEMD_LIBS="$SYSTEMD_LIBS"
16313 elif test -n "$PKG_CONFIG"; then
16314    if test -n "$PKG_CONFIG" && \
16315    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libsystemd\""; } >&5
16316  ($PKG_CONFIG --exists --print-errors "libsystemd") 2>&5
16317  ac_status=$?
16318  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
16319  test $ac_status = 0; }; then
16320  pkg_cv_SYSTEMD_LIBS=`$PKG_CONFIG --libs "libsystemd" 2>/dev/null`
16321		      test "x$?" != "x0" && pkg_failed=yes
16322else
16323  pkg_failed=yes
16324fi
16325 else
16326    pkg_failed=untried
16327fi
16328
16329
16330
16331if test $pkg_failed = yes; then
16332   	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16333$as_echo "no" >&6; }
16334
16335if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
16336        _pkg_short_errors_supported=yes
16337else
16338        _pkg_short_errors_supported=no
16339fi
16340        if test $_pkg_short_errors_supported = yes; then
16341	        SYSTEMD_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libsystemd" 2>&1`
16342        else
16343	        SYSTEMD_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libsystemd" 2>&1`
16344        fi
16345	# Put the nasty error message in config.log where it belongs
16346	echo "$SYSTEMD_PKG_ERRORS" >&5
16347
16348	have_systemd=no
16349elif test $pkg_failed = untried; then
16350     	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16351$as_echo "no" >&6; }
16352	have_systemd=no
16353else
16354	SYSTEMD_CFLAGS=$pkg_cv_SYSTEMD_CFLAGS
16355	SYSTEMD_LIBS=$pkg_cv_SYSTEMD_LIBS
16356        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16357$as_echo "yes" >&6; }
16358	have_systemd=yes
16359fi
16360		if test "x$have_systemd" != "xyes"; then :
16361
16362
16363pkg_failed=no
16364{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for SYSTEMD_DAEMON" >&5
16365$as_echo_n "checking for SYSTEMD_DAEMON... " >&6; }
16366
16367if test -n "$SYSTEMD_DAEMON_CFLAGS"; then
16368    pkg_cv_SYSTEMD_DAEMON_CFLAGS="$SYSTEMD_DAEMON_CFLAGS"
16369 elif test -n "$PKG_CONFIG"; then
16370    if test -n "$PKG_CONFIG" && \
16371    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libsystemd-daemon\""; } >&5
16372  ($PKG_CONFIG --exists --print-errors "libsystemd-daemon") 2>&5
16373  ac_status=$?
16374  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
16375  test $ac_status = 0; }; then
16376  pkg_cv_SYSTEMD_DAEMON_CFLAGS=`$PKG_CONFIG --cflags "libsystemd-daemon" 2>/dev/null`
16377		      test "x$?" != "x0" && pkg_failed=yes
16378else
16379  pkg_failed=yes
16380fi
16381 else
16382    pkg_failed=untried
16383fi
16384if test -n "$SYSTEMD_DAEMON_LIBS"; then
16385    pkg_cv_SYSTEMD_DAEMON_LIBS="$SYSTEMD_DAEMON_LIBS"
16386 elif test -n "$PKG_CONFIG"; then
16387    if test -n "$PKG_CONFIG" && \
16388    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libsystemd-daemon\""; } >&5
16389  ($PKG_CONFIG --exists --print-errors "libsystemd-daemon") 2>&5
16390  ac_status=$?
16391  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
16392  test $ac_status = 0; }; then
16393  pkg_cv_SYSTEMD_DAEMON_LIBS=`$PKG_CONFIG --libs "libsystemd-daemon" 2>/dev/null`
16394		      test "x$?" != "x0" && pkg_failed=yes
16395else
16396  pkg_failed=yes
16397fi
16398 else
16399    pkg_failed=untried
16400fi
16401
16402
16403
16404if test $pkg_failed = yes; then
16405   	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16406$as_echo "no" >&6; }
16407
16408if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
16409        _pkg_short_errors_supported=yes
16410else
16411        _pkg_short_errors_supported=no
16412fi
16413        if test $_pkg_short_errors_supported = yes; then
16414	        SYSTEMD_DAEMON_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libsystemd-daemon" 2>&1`
16415        else
16416	        SYSTEMD_DAEMON_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libsystemd-daemon" 2>&1`
16417        fi
16418	# Put the nasty error message in config.log where it belongs
16419	echo "$SYSTEMD_DAEMON_PKG_ERRORS" >&5
16420
16421	have_systemd_daemon=no
16422elif test $pkg_failed = untried; then
16423     	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16424$as_echo "no" >&6; }
16425	have_systemd_daemon=no
16426else
16427	SYSTEMD_DAEMON_CFLAGS=$pkg_cv_SYSTEMD_DAEMON_CFLAGS
16428	SYSTEMD_DAEMON_LIBS=$pkg_cv_SYSTEMD_DAEMON_LIBS
16429        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16430$as_echo "yes" >&6; }
16431	have_systemd_daemon=yes
16432fi
16433		if test "x$have_systemd_daemon" = "xyes"; then :
16434  have_systemd=yes
16435fi
16436
16437fi
16438	case $enable_systemd:$have_systemd in #(
16439  yes:no) :
16440    as_fn_error $? "systemd enabled but libsystemd not found" "$LINENO" 5 ;; #(
16441  *:yes) :
16442
16443$as_echo "#define HAVE_SYSTEMD 1" >>confdefs.h
16444
16445		LIBS="$LIBS $SYSTEMD_LIBS"
16446
16447	 ;; #(
16448  *) :
16449     ;;
16450esac
16451
16452
16453fi
16454 if test "x$have_systemd" = xyes; then
16455  USE_SYSTEMD_TRUE=
16456  USE_SYSTEMD_FALSE='#'
16457else
16458  USE_SYSTEMD_TRUE='#'
16459  USE_SYSTEMD_FALSE=
16460fi
16461
16462
16463# Include systemd.m4 - end
16464
16465# set memory allocation checking if requested
16466# Check whether --enable-alloc-checks was given.
16467if test "${enable_alloc_checks+set}" = set; then :
16468  enableval=$enable_alloc_checks;
16469fi
16470
16471# Check whether --enable-alloc-lite was given.
16472if test "${enable_alloc_lite+set}" = set; then :
16473  enableval=$enable_alloc_lite;
16474fi
16475
16476# Check whether --enable-alloc-nonregional was given.
16477if test "${enable_alloc_nonregional+set}" = set; then :
16478  enableval=$enable_alloc_nonregional;
16479fi
16480
16481if test x_$enable_alloc_nonregional = x_yes; then
16482
16483$as_echo "#define UNBOUND_ALLOC_NONREGIONAL 1" >>confdefs.h
16484
16485fi
16486if test x_$enable_alloc_checks = x_yes; then
16487
16488$as_echo "#define UNBOUND_ALLOC_STATS 1" >>confdefs.h
16489
16490	SLDNS_ALLOCCHECK_EXTRA_OBJ="alloc.lo log.lo"
16491
16492	ASYNCLOOK_ALLOCCHECK_EXTRA_OBJ="alloc.lo"
16493
16494else
16495	if test x_$enable_alloc_lite = x_yes; then
16496
16497$as_echo "#define UNBOUND_ALLOC_LITE 1" >>confdefs.h
16498
16499	else
16500
16501	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible malloc" >&5
16502$as_echo_n "checking for GNU libc compatible malloc... " >&6; }
16503	if test "$cross_compiling" = yes; then :
16504  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no (crosscompile)" >&5
16505$as_echo "no (crosscompile)" >&6; }
16506	case " $LIBOBJS " in
16507  *" malloc.$ac_objext "* ) ;;
16508  *) LIBOBJS="$LIBOBJS malloc.$ac_objext"
16509 ;;
16510esac
16511
16512
16513cat >>confdefs.h <<_ACEOF
16514#define malloc rpl_malloc_unbound
16515_ACEOF
16516
16517else
16518  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16519/* end confdefs.h.  */
16520#if defined STDC_HEADERS || defined HAVE_STDLIB_H
16521#include <stdlib.h>
16522#else
16523char *malloc ();
16524#endif
16525
16526int
16527main ()
16528{
16529 if(malloc(0) != 0) return 1;
16530  ;
16531  return 0;
16532}
16533
16534_ACEOF
16535if ac_fn_c_try_run "$LINENO"; then :
16536  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16537$as_echo "no" >&6; }
16538	case " $LIBOBJS " in
16539  *" malloc.$ac_objext "* ) ;;
16540  *) LIBOBJS="$LIBOBJS malloc.$ac_objext"
16541 ;;
16542esac
16543
16544
16545cat >>confdefs.h <<_ACEOF
16546#define malloc rpl_malloc_unbound
16547_ACEOF
16548
16549else
16550  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16551$as_echo "yes" >&6; }
16552
16553$as_echo "#define HAVE_MALLOC 1" >>confdefs.h
16554
16555fi
16556rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16557  conftest.$ac_objext conftest.beam conftest.$ac_ext
16558fi
16559
16560
16561	fi
16562fi
16563
16564# check windows threads (we use them, not pthreads, on windows).
16565if test "$on_mingw" = "yes"; then
16566# check windows threads
16567	for ac_header in windows.h
16568do :
16569  ac_fn_c_check_header_compile "$LINENO" "windows.h" "ac_cv_header_windows_h" "$ac_includes_default
16570"
16571if test "x$ac_cv_header_windows_h" = xyes; then :
16572  cat >>confdefs.h <<_ACEOF
16573#define HAVE_WINDOWS_H 1
16574_ACEOF
16575
16576fi
16577
16578done
16579
16580	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for CreateThread" >&5
16581$as_echo_n "checking for CreateThread... " >&6; }
16582	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16583/* end confdefs.h.  */
16584
16585#ifdef HAVE_WINDOWS_H
16586#include <windows.h>
16587#endif
16588
16589int
16590main ()
16591{
16592
16593	HANDLE t = CreateThread(NULL, 0, NULL, NULL, 0, NULL);
16594
16595  ;
16596  return 0;
16597}
16598_ACEOF
16599if ac_fn_c_try_compile "$LINENO"; then :
16600  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16601$as_echo "yes" >&6; }
16602
16603$as_echo "#define HAVE_WINDOWS_THREADS 1" >>confdefs.h
16604
16605
16606else
16607  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16608$as_echo "no" >&6; }
16609
16610fi
16611rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16612
16613else
16614# not on mingw, check thread libraries.
16615
16616# check for thread library.
16617# check this first, so that the pthread lib does not get linked in via
16618# libssl or libpython, and thus distorts the tests, and we end up using
16619# the non-threadsafe C libraries.
16620
16621# Check whether --with-pthreads was given.
16622if test "${with_pthreads+set}" = set; then :
16623  withval=$with_pthreads;
16624else
16625   withval="yes"
16626fi
16627
16628ub_have_pthreads=no
16629if test x_$withval != x_no; then
16630
16631
16632ac_ext=c
16633ac_cpp='$CPP $CPPFLAGS'
16634ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16635ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16636ac_compiler_gnu=$ac_cv_c_compiler_gnu
16637
16638ax_pthread_ok=no
16639
16640# We used to check for pthread.h first, but this fails if pthread.h
16641# requires special compiler flags (e.g. on True64 or Sequent).
16642# It gets checked for in the link test anyway.
16643
16644# First of all, check if the user has set any of the PTHREAD_LIBS,
16645# etcetera environment variables, and if threads linking works using
16646# them:
16647if test x"$PTHREAD_LIBS$PTHREAD_CFLAGS" != x; then
16648        save_CFLAGS="$CFLAGS"
16649        CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
16650        save_LIBS="$LIBS"
16651        LIBS="$PTHREAD_LIBS $LIBS"
16652        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS" >&5
16653$as_echo_n "checking for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS... " >&6; }
16654        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16655/* end confdefs.h.  */
16656
16657/* Override any GCC internal prototype to avoid an error.
16658   Use char because int might match the return type of a GCC
16659   builtin and then its argument prototype would still apply.  */
16660#ifdef __cplusplus
16661extern "C"
16662#endif
16663char pthread_join ();
16664int
16665main ()
16666{
16667return pthread_join ();
16668  ;
16669  return 0;
16670}
16671_ACEOF
16672if ac_fn_c_try_link "$LINENO"; then :
16673  ax_pthread_ok=yes
16674fi
16675rm -f core conftest.err conftest.$ac_objext \
16676    conftest$ac_exeext conftest.$ac_ext
16677        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
16678$as_echo "$ax_pthread_ok" >&6; }
16679        if test x"$ax_pthread_ok" = xno; then
16680                PTHREAD_LIBS=""
16681                PTHREAD_CFLAGS=""
16682        fi
16683        LIBS="$save_LIBS"
16684        CFLAGS="$save_CFLAGS"
16685fi
16686
16687# We must check for the threads library under a number of different
16688# names; the ordering is very important because some systems
16689# (e.g. DEC) have both -lpthread and -lpthreads, where one of the
16690# libraries is broken (non-POSIX).
16691
16692# Create a list of thread flags to try.  Items starting with a "-" are
16693# C compiler flags, and other items are library names, except for "none"
16694# which indicates that we try without any flags at all, and "pthread-config"
16695# which is a program returning the flags for the Pth emulation library.
16696
16697ax_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config"
16698
16699# The ordering *is* (sometimes) important.  Some notes on the
16700# individual items follow:
16701
16702# pthreads: AIX (must check this before -lpthread)
16703# none: in case threads are in libc; should be tried before -Kthread and
16704#       other compiler flags to prevent continual compiler warnings
16705# -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h)
16706# -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
16707# lthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
16708# -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads)
16709# -pthreads: Solaris/gcc
16710# -mthreads: Mingw32/gcc, Lynx/gcc
16711# -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
16712#      doesn't hurt to check since this sometimes defines pthreads too;
16713#      also defines -D_REENTRANT)
16714#      ... -mt is also the pthreads flag for HP/aCC
16715# pthread: Linux, etcetera
16716# --thread-safe: KAI C++
16717# pthread-config: use pthread-config program (for GNU Pth library)
16718
16719case ${host_os} in
16720        solaris*)
16721
16722        # On Solaris (at least, for some versions), libc contains stubbed
16723        # (non-functional) versions of the pthreads routines, so link-based
16724        # tests will erroneously succeed.  (We need to link with -pthreads/-mt/
16725        # -lpthread.)  (The stubs are missing pthread_cleanup_push, or rather
16726        # a function called by this macro, so we could check for that, but
16727        # who knows whether they'll stub that too in a future libc.)  So,
16728        # we'll just look for -pthreads and -lpthread first:
16729
16730        ax_pthread_flags="-pthreads pthread -mt -pthread $ax_pthread_flags"
16731        ;;
16732
16733        darwin*)
16734        ax_pthread_flags="-pthread $ax_pthread_flags"
16735        ;;
16736esac
16737
16738# Clang doesn't consider unrecognized options an error unless we specify
16739# -Werror. We throw in some extra Clang-specific options to ensure that
16740# this doesn't happen for GCC, which also accepts -Werror.
16741
16742{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler needs -Werror to reject unknown flags" >&5
16743$as_echo_n "checking if compiler needs -Werror to reject unknown flags... " >&6; }
16744save_CFLAGS="$CFLAGS"
16745ax_pthread_extra_flags="-Werror"
16746CFLAGS="$CFLAGS $ax_pthread_extra_flags -Wunknown-warning-option -Wsizeof-array-argument"
16747cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16748/* end confdefs.h.  */
16749int foo(void);
16750int
16751main ()
16752{
16753foo()
16754  ;
16755  return 0;
16756}
16757_ACEOF
16758if ac_fn_c_try_compile "$LINENO"; then :
16759  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16760$as_echo "yes" >&6; }
16761else
16762  ax_pthread_extra_flags=
16763                   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16764$as_echo "no" >&6; }
16765fi
16766rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16767CFLAGS="$save_CFLAGS"
16768
16769if test x"$ax_pthread_ok" = xno; then
16770for flag in $ax_pthread_flags; do
16771
16772        case $flag in
16773                none)
16774                { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work without any flags" >&5
16775$as_echo_n "checking whether pthreads work without any flags... " >&6; }
16776                ;;
16777
16778                -*)
16779                { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with $flag" >&5
16780$as_echo_n "checking whether pthreads work with $flag... " >&6; }
16781                PTHREAD_CFLAGS="$flag"
16782                ;;
16783
16784                pthread-config)
16785                # Extract the first word of "pthread-config", so it can be a program name with args.
16786set dummy pthread-config; ac_word=$2
16787{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16788$as_echo_n "checking for $ac_word... " >&6; }
16789if ${ac_cv_prog_ax_pthread_config+:} false; then :
16790  $as_echo_n "(cached) " >&6
16791else
16792  if test -n "$ax_pthread_config"; then
16793  ac_cv_prog_ax_pthread_config="$ax_pthread_config" # Let the user override the test.
16794else
16795as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16796for as_dir in $PATH
16797do
16798  IFS=$as_save_IFS
16799  test -z "$as_dir" && as_dir=.
16800    for ac_exec_ext in '' $ac_executable_extensions; do
16801  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16802    ac_cv_prog_ax_pthread_config="yes"
16803    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16804    break 2
16805  fi
16806done
16807  done
16808IFS=$as_save_IFS
16809
16810  test -z "$ac_cv_prog_ax_pthread_config" && ac_cv_prog_ax_pthread_config="no"
16811fi
16812fi
16813ax_pthread_config=$ac_cv_prog_ax_pthread_config
16814if test -n "$ax_pthread_config"; then
16815  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_config" >&5
16816$as_echo "$ax_pthread_config" >&6; }
16817else
16818  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16819$as_echo "no" >&6; }
16820fi
16821
16822
16823                if test x"$ax_pthread_config" = xno; then continue; fi
16824                PTHREAD_CFLAGS="`pthread-config --cflags`"
16825                PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`"
16826                ;;
16827
16828                *)
16829                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the pthreads library -l$flag" >&5
16830$as_echo_n "checking for the pthreads library -l$flag... " >&6; }
16831                PTHREAD_LIBS="-l$flag"
16832                ;;
16833        esac
16834
16835        save_LIBS="$LIBS"
16836        save_CFLAGS="$CFLAGS"
16837        LIBS="$PTHREAD_LIBS $LIBS"
16838        CFLAGS="$CFLAGS $PTHREAD_CFLAGS $ax_pthread_extra_flags"
16839
16840        # Check for various functions.  We must include pthread.h,
16841        # since some functions may be macros.  (On the Sequent, we
16842        # need a special flag -Kthread to make this header compile.)
16843        # We check for pthread_join because it is in -lpthread on IRIX
16844        # while pthread_create is in libc.  We check for pthread_attr_init
16845        # due to DEC craziness with -lpthreads.  We check for
16846        # pthread_cleanup_push because it is one of the few pthread
16847        # functions on Solaris that doesn't have a non-functional libc stub.
16848        # We try pthread_create on general principles.
16849        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16850/* end confdefs.h.  */
16851#include <pthread.h>
16852                        static void routine(void *a) { *((int*)a) = 0; }
16853                        static void *start_routine(void *a) { return a; }
16854int
16855main ()
16856{
16857pthread_t th; pthread_attr_t attr;
16858                        pthread_create(&th, 0, start_routine, 0);
16859                        pthread_join(th, 0);
16860                        pthread_attr_init(&attr);
16861                        pthread_cleanup_push(routine, 0);
16862                        pthread_cleanup_pop(0) /* ; */
16863  ;
16864  return 0;
16865}
16866_ACEOF
16867if ac_fn_c_try_link "$LINENO"; then :
16868  ax_pthread_ok=yes
16869fi
16870rm -f core conftest.err conftest.$ac_objext \
16871    conftest$ac_exeext conftest.$ac_ext
16872
16873        LIBS="$save_LIBS"
16874        CFLAGS="$save_CFLAGS"
16875
16876        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
16877$as_echo "$ax_pthread_ok" >&6; }
16878        if test "x$ax_pthread_ok" = xyes; then
16879                break;
16880        fi
16881
16882        PTHREAD_LIBS=""
16883        PTHREAD_CFLAGS=""
16884done
16885fi
16886
16887# Various other checks:
16888if test "x$ax_pthread_ok" = xyes; then
16889        save_LIBS="$LIBS"
16890        LIBS="$PTHREAD_LIBS $LIBS"
16891        save_CFLAGS="$CFLAGS"
16892        CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
16893
16894        # Detect AIX lossage: JOINABLE attribute is called UNDETACHED.
16895        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for joinable pthread attribute" >&5
16896$as_echo_n "checking for joinable pthread attribute... " >&6; }
16897        attr_name=unknown
16898        for attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do
16899            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16900/* end confdefs.h.  */
16901#include <pthread.h>
16902int
16903main ()
16904{
16905int attr = $attr; return attr /* ; */
16906  ;
16907  return 0;
16908}
16909_ACEOF
16910if ac_fn_c_try_link "$LINENO"; then :
16911  attr_name=$attr; break
16912fi
16913rm -f core conftest.err conftest.$ac_objext \
16914    conftest$ac_exeext conftest.$ac_ext
16915        done
16916        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $attr_name" >&5
16917$as_echo "$attr_name" >&6; }
16918        if test "$attr_name" != PTHREAD_CREATE_JOINABLE; then
16919
16920cat >>confdefs.h <<_ACEOF
16921#define PTHREAD_CREATE_JOINABLE $attr_name
16922_ACEOF
16923
16924        fi
16925
16926        { $as_echo "$as_me:${as_lineno-$LINENO}: checking if more special flags are required for pthreads" >&5
16927$as_echo_n "checking if more special flags are required for pthreads... " >&6; }
16928        flag=no
16929        case ${host_os} in
16930            aix* | freebsd* | darwin*) flag="-D_THREAD_SAFE";;
16931            osf* | hpux*) flag="-D_REENTRANT";;
16932            solaris*)
16933            if test "$GCC" = "yes"; then
16934                flag="-D_REENTRANT"
16935            else
16936                # TODO: What about Clang on Solaris?
16937                flag="-mt -D_REENTRANT"
16938            fi
16939            ;;
16940        esac
16941        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $flag" >&5
16942$as_echo "$flag" >&6; }
16943        if test "x$flag" != xno; then
16944            PTHREAD_CFLAGS="$flag $PTHREAD_CFLAGS"
16945        fi
16946
16947        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTHREAD_PRIO_INHERIT" >&5
16948$as_echo_n "checking for PTHREAD_PRIO_INHERIT... " >&6; }
16949if ${ax_cv_PTHREAD_PRIO_INHERIT+:} false; then :
16950  $as_echo_n "(cached) " >&6
16951else
16952
16953                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16954/* end confdefs.h.  */
16955#include <pthread.h>
16956int
16957main ()
16958{
16959int i = PTHREAD_PRIO_INHERIT;
16960  ;
16961  return 0;
16962}
16963_ACEOF
16964if ac_fn_c_try_link "$LINENO"; then :
16965  ax_cv_PTHREAD_PRIO_INHERIT=yes
16966else
16967  ax_cv_PTHREAD_PRIO_INHERIT=no
16968fi
16969rm -f core conftest.err conftest.$ac_objext \
16970    conftest$ac_exeext conftest.$ac_ext
16971
16972fi
16973{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_PRIO_INHERIT" >&5
16974$as_echo "$ax_cv_PTHREAD_PRIO_INHERIT" >&6; }
16975        if test "x$ax_cv_PTHREAD_PRIO_INHERIT" = "xyes"; then :
16976
16977$as_echo "#define HAVE_PTHREAD_PRIO_INHERIT 1" >>confdefs.h
16978
16979fi
16980
16981        LIBS="$save_LIBS"
16982        CFLAGS="$save_CFLAGS"
16983
16984        # More AIX lossage: compile with *_r variant
16985        if test "x$GCC" != xyes; then
16986            case $host_os in
16987                aix*)
16988                case "x/$CC" in #(
16989  x*/c89|x*/c89_128|x*/c99|x*/c99_128|x*/cc|x*/cc128|x*/xlc|x*/xlc_v6|x*/xlc128|x*/xlc128_v6) :
16990    #handle absolute path differently from PATH based program lookup
16991                   case "x$CC" in #(
16992  x/*) :
16993    if as_fn_executable_p ${CC}_r; then :
16994  PTHREAD_CC="${CC}_r"
16995fi ;; #(
16996  *) :
16997    for ac_prog in ${CC}_r
16998do
16999  # Extract the first word of "$ac_prog", so it can be a program name with args.
17000set dummy $ac_prog; ac_word=$2
17001{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17002$as_echo_n "checking for $ac_word... " >&6; }
17003if ${ac_cv_prog_PTHREAD_CC+:} false; then :
17004  $as_echo_n "(cached) " >&6
17005else
17006  if test -n "$PTHREAD_CC"; then
17007  ac_cv_prog_PTHREAD_CC="$PTHREAD_CC" # Let the user override the test.
17008else
17009as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17010for as_dir in $PATH
17011do
17012  IFS=$as_save_IFS
17013  test -z "$as_dir" && as_dir=.
17014    for ac_exec_ext in '' $ac_executable_extensions; do
17015  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17016    ac_cv_prog_PTHREAD_CC="$ac_prog"
17017    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17018    break 2
17019  fi
17020done
17021  done
17022IFS=$as_save_IFS
17023
17024fi
17025fi
17026PTHREAD_CC=$ac_cv_prog_PTHREAD_CC
17027if test -n "$PTHREAD_CC"; then
17028  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTHREAD_CC" >&5
17029$as_echo "$PTHREAD_CC" >&6; }
17030else
17031  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17032$as_echo "no" >&6; }
17033fi
17034
17035
17036  test -n "$PTHREAD_CC" && break
17037done
17038test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
17039 ;;
17040esac ;; #(
17041  *) :
17042     ;;
17043esac
17044                ;;
17045            esac
17046        fi
17047fi
17048
17049test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
17050
17051
17052
17053
17054
17055# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
17056if test x"$ax_pthread_ok" = xyes; then
17057
17058
17059$as_echo "#define HAVE_PTHREAD 1" >>confdefs.h
17060
17061		if test -n "$PTHREAD_LIBS"; then
17062		  LIBS="$PTHREAD_LIBS $LIBS"
17063		fi
17064		CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
17065		CC="$PTHREAD_CC"
17066		ub_have_pthreads=yes
17067		ac_fn_c_check_type "$LINENO" "pthread_spinlock_t" "ac_cv_type_pthread_spinlock_t" "#include <pthread.h>
17068"
17069if test "x$ac_cv_type_pthread_spinlock_t" = xyes; then :
17070
17071cat >>confdefs.h <<_ACEOF
17072#define HAVE_PTHREAD_SPINLOCK_T 1
17073_ACEOF
17074
17075
17076fi
17077ac_fn_c_check_type "$LINENO" "pthread_rwlock_t" "ac_cv_type_pthread_rwlock_t" "#include <pthread.h>
17078"
17079if test "x$ac_cv_type_pthread_rwlock_t" = xyes; then :
17080
17081cat >>confdefs.h <<_ACEOF
17082#define HAVE_PTHREAD_RWLOCK_T 1
17083_ACEOF
17084
17085
17086fi
17087
17088
17089		if echo "$CFLAGS" | $GREP -e "-pthread" >/dev/null; then
17090		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if -pthread unused during linking" >&5
17091$as_echo_n "checking if -pthread unused during linking... " >&6; }
17092		# catch clang warning 'argument unused during compilation'
17093		cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17094/* end confdefs.h.  */
17095$ac_includes_default
17096
17097int main(void) {return 0;}
17098
17099_ACEOF
17100		pthread_unused="yes"
17101		# first compile
17102		echo "$CC $CFLAGS -c conftest.c -o conftest.o" >&5
17103		$CC $CFLAGS -c conftest.c -o conftest.o 2>&5 >&5
17104		if test $? = 0; then
17105			# then link
17106			echo "$CC $CFLAGS -Werror $LDFLAGS $LIBS -o conftest contest.o" >&5
17107			$CC $CFLAGS -Werror $LDFLAGS $LIBS -o conftest conftest.o 2>&5 >&5
17108			if test $? -ne 0; then
17109				{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17110$as_echo "yes" >&6; }
17111				CFLAGS=`echo "$CFLAGS" | sed -e 's/-pthread//'`
17112				PTHREAD_CFLAGS_ONLY="-pthread"
17113
17114			else
17115				{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17116$as_echo "no" >&6; }
17117			fi
17118		else
17119			{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17120$as_echo "no" >&6; }
17121		fi # endif cc successful
17122		rm -f conftest conftest.c conftest.o
17123		fi # endif -pthread in CFLAGS
17124
17125
17126        :
17127else
17128        ax_pthread_ok=no
17129
17130fi
17131ac_ext=c
17132ac_cpp='$CPP $CPPFLAGS'
17133ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
17134ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
17135ac_compiler_gnu=$ac_cv_c_compiler_gnu
17136
17137
17138fi
17139
17140# check solaris thread library
17141
17142# Check whether --with-solaris-threads was given.
17143if test "${with_solaris_threads+set}" = set; then :
17144  withval=$with_solaris_threads;
17145else
17146   withval="no"
17147fi
17148
17149ub_have_sol_threads=no
17150if test x_$withval != x_no; then
17151	if test x_$ub_have_pthreads != x_no; then
17152	    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Have pthreads already, ignoring --with-solaris-threads" >&5
17153$as_echo "$as_me: WARNING: Have pthreads already, ignoring --with-solaris-threads" >&2;}
17154	else
17155	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing thr_create" >&5
17156$as_echo_n "checking for library containing thr_create... " >&6; }
17157if ${ac_cv_search_thr_create+:} false; then :
17158  $as_echo_n "(cached) " >&6
17159else
17160  ac_func_search_save_LIBS=$LIBS
17161cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17162/* end confdefs.h.  */
17163
17164/* Override any GCC internal prototype to avoid an error.
17165   Use char because int might match the return type of a GCC
17166   builtin and then its argument prototype would still apply.  */
17167#ifdef __cplusplus
17168extern "C"
17169#endif
17170char thr_create ();
17171int
17172main ()
17173{
17174return thr_create ();
17175  ;
17176  return 0;
17177}
17178_ACEOF
17179for ac_lib in '' thread; do
17180  if test -z "$ac_lib"; then
17181    ac_res="none required"
17182  else
17183    ac_res=-l$ac_lib
17184    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
17185  fi
17186  if ac_fn_c_try_link "$LINENO"; then :
17187  ac_cv_search_thr_create=$ac_res
17188fi
17189rm -f core conftest.err conftest.$ac_objext \
17190    conftest$ac_exeext
17191  if ${ac_cv_search_thr_create+:} false; then :
17192  break
17193fi
17194done
17195if ${ac_cv_search_thr_create+:} false; then :
17196
17197else
17198  ac_cv_search_thr_create=no
17199fi
17200rm conftest.$ac_ext
17201LIBS=$ac_func_search_save_LIBS
17202fi
17203{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_thr_create" >&5
17204$as_echo "$ac_cv_search_thr_create" >&6; }
17205ac_res=$ac_cv_search_thr_create
17206if test "$ac_res" != no; then :
17207  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
17208
17209
17210$as_echo "#define HAVE_SOLARIS_THREADS 1" >>confdefs.h
17211
17212
17213
17214
17215{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -mt" >&5
17216$as_echo_n "checking whether $CC supports -mt... " >&6; }
17217cache=`echo mt | sed 'y%.=/+-%___p_%'`
17218if eval \${cv_prog_cc_flag_$cache+:} false; then :
17219  $as_echo_n "(cached) " >&6
17220else
17221
17222echo 'void f(void){}' >conftest.c
17223if test -z "`$CC $CPPFLAGS $CFLAGS -mt -c conftest.c 2>&1`"; then
17224eval "cv_prog_cc_flag_$cache=yes"
17225else
17226eval "cv_prog_cc_flag_$cache=no"
17227fi
17228rm -f conftest conftest.o conftest.c
17229
17230fi
17231
17232if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
17233{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17234$as_echo "yes" >&6; }
17235:
17236CFLAGS="$CFLAGS -mt"
17237else
17238{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17239$as_echo "no" >&6; }
17240:
17241CFLAGS="$CFLAGS -D_REENTRANT"
17242fi
17243
17244		ub_have_sol_threads=yes
17245
17246else
17247
17248		as_fn_error $? "no solaris threads found." "$LINENO" 5
17249
17250fi
17251
17252	fi
17253fi
17254
17255fi # end of non-mingw check of thread libraries
17256
17257# Check for SYSLOG_FACILITY
17258
17259# Check whether --with-syslog-facility was given.
17260if test "${with_syslog_facility+set}" = set; then :
17261  withval=$with_syslog_facility;  UNBOUND_SYSLOG_FACILITY="$withval"
17262fi
17263
17264case "${UNBOUND_SYSLOG_FACILITY}" in
17265
17266  LOCAL[0-7]) UNBOUND_SYSLOG_FACILITY="LOG_${UNBOUND_SYSLOG_FACILITY}" ;;
17267
17268           *) UNBOUND_SYSLOG_FACILITY="LOG_DAEMON" ;;
17269
17270esac
17271
17272cat >>confdefs.h <<_ACEOF
17273#define UB_SYSLOG_FACILITY ${UNBOUND_SYSLOG_FACILITY}
17274_ACEOF
17275
17276
17277# Check for dynamic library module
17278
17279# Check whether --with-dynlibmodule was given.
17280if test "${with_dynlibmodule+set}" = set; then :
17281  withval=$with_dynlibmodule;
17282else
17283   withval="no"
17284fi
17285
17286
17287if test x_$withval != x_no; then
17288
17289$as_echo "#define WITH_DYNLIBMODULE 1" >>confdefs.h
17290
17291  WITH_DYNLIBMODULE=yes
17292
17293  DYNLIBMOD_OBJ="dynlibmod.lo"
17294
17295  DYNLIBMOD_HEADER='$(srcdir)/dynlibmod/dynlibmod.h'
17296
17297  if test $on_mingw = "no"; then
17298    # link with -ldl if not already there, for all executables because
17299    # dlopen call is in the dynlib module.  For unbound executable, also
17300    # export symbols.
17301    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
17302$as_echo_n "checking for library containing dlopen... " >&6; }
17303if ${ac_cv_search_dlopen+:} false; then :
17304  $as_echo_n "(cached) " >&6
17305else
17306  ac_func_search_save_LIBS=$LIBS
17307cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17308/* end confdefs.h.  */
17309
17310/* Override any GCC internal prototype to avoid an error.
17311   Use char because int might match the return type of a GCC
17312   builtin and then its argument prototype would still apply.  */
17313#ifdef __cplusplus
17314extern "C"
17315#endif
17316char dlopen ();
17317int
17318main ()
17319{
17320return dlopen ();
17321  ;
17322  return 0;
17323}
17324_ACEOF
17325for ac_lib in '' dl; do
17326  if test -z "$ac_lib"; then
17327    ac_res="none required"
17328  else
17329    ac_res=-l$ac_lib
17330    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
17331  fi
17332  if ac_fn_c_try_link "$LINENO"; then :
17333  ac_cv_search_dlopen=$ac_res
17334fi
17335rm -f core conftest.err conftest.$ac_objext \
17336    conftest$ac_exeext
17337  if ${ac_cv_search_dlopen+:} false; then :
17338  break
17339fi
17340done
17341if ${ac_cv_search_dlopen+:} false; then :
17342
17343else
17344  ac_cv_search_dlopen=no
17345fi
17346rm conftest.$ac_ext
17347LIBS=$ac_func_search_save_LIBS
17348fi
17349{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
17350$as_echo "$ac_cv_search_dlopen" >&6; }
17351ac_res=$ac_cv_search_dlopen
17352if test "$ac_res" != no; then :
17353  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
17354
17355fi
17356
17357    DYNLIBMOD_EXTRALIBS="-export-dynamic"
17358  else
17359    DYNLIBMOD_EXTRALIBS="-Wl,--export-all-symbols,--out-implib,libunbound.dll.a"
17360  fi
17361
17362fi
17363
17364# Check for PyUnbound
17365
17366# Check whether --with-pyunbound was given.
17367if test "${with_pyunbound+set}" = set; then :
17368  withval=$with_pyunbound;
17369else
17370   withval="no"
17371fi
17372
17373
17374ub_test_python=no
17375ub_with_pyunbound=no
17376if test x_$withval != x_no; then
17377   ub_with_pyunbound=yes
17378   ub_test_python=yes
17379fi
17380
17381# Check for Python module
17382
17383# Check whether --with-pythonmodule was given.
17384if test "${with_pythonmodule+set}" = set; then :
17385  withval=$with_pythonmodule;
17386else
17387   withval="no"
17388fi
17389
17390
17391ub_with_pythonmod=no
17392if test x_$withval != x_no; then
17393   ub_with_pythonmod=yes
17394   ub_test_python=yes
17395fi
17396
17397# Check for Python & SWIG only on PyUnbound or PyModule
17398if test x_$ub_test_python != x_no; then
17399
17400   # Check for Python
17401   ub_have_python=no
17402   ac_save_LIBS="$LIBS"
17403        #
17404        # Allow the use of a (user set) custom python version
17405        #
17406
17407
17408        # Extract the first word of "python[$PYTHON_VERSION]", so it can be a program name with args.
17409set dummy python$PYTHON_VERSION; ac_word=$2
17410{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17411$as_echo_n "checking for $ac_word... " >&6; }
17412if ${ac_cv_path_PYTHON+:} false; then :
17413  $as_echo_n "(cached) " >&6
17414else
17415  case $PYTHON in
17416  [\\/]* | ?:[\\/]*)
17417  ac_cv_path_PYTHON="$PYTHON" # Let the user override the test with a path.
17418  ;;
17419  *)
17420  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17421for as_dir in $PATH
17422do
17423  IFS=$as_save_IFS
17424  test -z "$as_dir" && as_dir=.
17425    for ac_exec_ext in '' $ac_executable_extensions; do
17426  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17427    ac_cv_path_PYTHON="$as_dir/$ac_word$ac_exec_ext"
17428    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17429    break 2
17430  fi
17431done
17432  done
17433IFS=$as_save_IFS
17434
17435  ;;
17436esac
17437fi
17438PYTHON=$ac_cv_path_PYTHON
17439if test -n "$PYTHON"; then
17440  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5
17441$as_echo "$PYTHON" >&6; }
17442else
17443  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17444$as_echo "no" >&6; }
17445fi
17446
17447
17448        if test -z "$PYTHON"; then
17449           as_fn_error $? "Cannot find python$PYTHON_VERSION in your system path" "$LINENO" 5
17450           PYTHON_VERSION=""
17451        fi
17452
17453        if test -z "$PYTHON_VERSION"; then
17454		PYTHON_VERSION=`$PYTHON -c "import sys; \
17455			print(sys.version.split()[0])"`
17456	fi
17457
17458        #
17459        # Check if you have distutils, else fail
17460        #
17461        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the distutils Python package" >&5
17462$as_echo_n "checking for the distutils Python package... " >&6; }
17463        if ac_distutils_result=`$PYTHON -c "import distutils" 2>&1`; then
17464                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17465$as_echo "yes" >&6; }
17466        else
17467                { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17468$as_echo "no" >&6; }
17469                as_fn_error $? "cannot import Python module \"distutils\".
17470Please check your Python installation. The error was:
17471$ac_distutils_result" "$LINENO" 5
17472                PYTHON_VERSION=""
17473        fi
17474
17475        #
17476        # Check for Python include path
17477        #
17478        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Python include path" >&5
17479$as_echo_n "checking for Python include path... " >&6; }
17480        if test -z "$PYTHON_CPPFLAGS"; then
17481                python_path=`$PYTHON -c "import distutils.sysconfig; \
17482                        print(distutils.sysconfig.get_python_inc());"`
17483                if test -n "${python_path}"; then
17484                        python_path="-I$python_path"
17485                fi
17486                PYTHON_CPPFLAGS=$python_path
17487        fi
17488        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON_CPPFLAGS" >&5
17489$as_echo "$PYTHON_CPPFLAGS" >&6; }
17490
17491
17492        #
17493        # Check for Python library path
17494        #
17495        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Python library path" >&5
17496$as_echo_n "checking for Python library path... " >&6; }
17497        if test -z "$PYTHON_LDFLAGS"; then
17498                PYTHON_LDFLAGS=`$PYTHON -c "from distutils.sysconfig import *; \
17499                        print('-L'+get_config_var('LIBDIR')+' -L'+get_config_var('LIBDEST')+' '+get_config_var('BLDLIBRARY'));"`
17500        fi
17501        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON_LDFLAGS" >&5
17502$as_echo "$PYTHON_LDFLAGS" >&6; }
17503
17504
17505        if test -z "$PYTHON_LIBDIR"; then
17506                PYTHON_LIBDIR=`$PYTHON -c "from distutils.sysconfig import *; \
17507                        print(get_config_var('LIBDIR'));"`
17508        fi
17509
17510        #
17511        # Check for site packages
17512        #
17513        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Python site-packages path" >&5
17514$as_echo_n "checking for Python site-packages path... " >&6; }
17515        if test -z "$PYTHON_SITE_PKG"; then
17516                PYTHON_SITE_PKG=`$PYTHON -c "import distutils.sysconfig; \
17517                        print(distutils.sysconfig.get_python_lib(1,0));"`
17518        fi
17519        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON_SITE_PKG" >&5
17520$as_echo "$PYTHON_SITE_PKG" >&6; }
17521
17522
17523        #
17524        # final check to see if everything compiles alright
17525        #
17526        { $as_echo "$as_me:${as_lineno-$LINENO}: checking consistency of all components of python development environment" >&5
17527$as_echo_n "checking consistency of all components of python development environment... " >&6; }
17528        ac_ext=c
17529ac_cpp='$CPP $CPPFLAGS'
17530ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
17531ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
17532ac_compiler_gnu=$ac_cv_c_compiler_gnu
17533
17534        # save current global flags
17535        ac_save_LIBS="$LIBS"
17536        ac_save_CPPFLAGS="$CPPFLAGS"
17537
17538        LIBS="$LIBS $PYTHON_LDFLAGS"
17539        CPPFLAGS="$CPPFLAGS $PYTHON_CPPFLAGS"
17540        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17541/* end confdefs.h.  */
17542
17543                #include <Python.h>
17544
17545int
17546main ()
17547{
17548
17549                Py_Initialize();
17550
17551  ;
17552  return 0;
17553}
17554_ACEOF
17555if ac_fn_c_try_link "$LINENO"; then :
17556  pythonexists=yes
17557else
17558  pythonexists=no
17559fi
17560rm -f core conftest.err conftest.$ac_objext \
17561    conftest$ac_exeext conftest.$ac_ext
17562
17563        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pythonexists" >&5
17564$as_echo "$pythonexists" >&6; }
17565
17566        if test ! "$pythonexists" = "yes"; then
17567           as_fn_error $? "
17568  Could not link test program to Python. Maybe the main Python library has been
17569  installed in some non-standard library path. If so, pass it to configure,
17570  via the LDFLAGS environment variable.
17571  Example: ./configure LDFLAGS=\"-L/usr/non-standard-path/python/lib\"
17572  ============================================================================
17573   ERROR!
17574   You probably have to install the development version of the Python package
17575   for your distribution.  The exact name of this package varies among them.
17576  ============================================================================
17577           " "$LINENO" 5
17578          PYTHON_VERSION=""
17579        fi
17580        ac_ext=c
17581ac_cpp='$CPP $CPPFLAGS'
17582ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
17583ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
17584ac_compiler_gnu=$ac_cv_c_compiler_gnu
17585
17586        # turn back to default flags
17587        CPPFLAGS="$ac_save_CPPFLAGS"
17588        LIBS="$ac_save_LIBS"
17589
17590        #
17591        # all done!
17592        #
17593
17594   if test ! -z "$PYTHON_VERSION"; then
17595	if test `$PYTHON -c "print('$PYTHON_VERSION' >= '2.4.0')"` = "False"; then
17596		as_fn_error $? "Python version >= 2.4.0 is required" "$LINENO" 5
17597	fi
17598
17599      PY_MAJOR_VERSION="`$PYTHON -c \"import sys; print(sys.version_info[0])\"`"
17600
17601      # Have Python
17602
17603$as_echo "#define HAVE_PYTHON 1" >>confdefs.h
17604
17605      if test x_$ub_with_pythonmod != x_no; then
17606        if test -n "$LIBS"; then
17607          LIBS="$PYTHON_LDFLAGS $LIBS"
17608        else
17609          LIBS="$PYTHON_LDFLAGS"
17610        fi
17611      fi
17612      PYTHON_LIBS="$PYTHON_LDFLAGS"
17613
17614      if test -n "$CPPFLAGS"; then
17615        CPPFLAGS="$CPPFLAGS $PYTHON_CPPFLAGS"
17616      else
17617        CPPFLAGS="$PYTHON_CPPFLAGS"
17618      fi
17619      if test "$PYTHON_LIBDIR" != "/usr/lib" -a "$PYTHON_LIBDIR" != "" -a "$PYTHON_LIBDIR" != "/usr/lib64"; then
17620
17621	if test "x$enable_rpath" = xyes; then
17622		if echo "$PYTHON_LIBDIR" | grep "^/" >/dev/null; then
17623			RUNTIME_PATH="$RUNTIME_PATH -R$PYTHON_LIBDIR"
17624		fi
17625	fi
17626
17627      fi
17628      ub_have_python=yes
17629      if test -n "$PKG_CONFIG" && \
17630    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\"python\${PY_MAJOR_VERSION}\"\""; } >&5
17631  ($PKG_CONFIG --exists --print-errors ""python${PY_MAJOR_VERSION}"") 2>&5
17632  ac_status=$?
17633  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
17634  test $ac_status = 0; }; then
17635  PC_PY_DEPENDENCY="python${PY_MAJOR_VERSION}"
17636else
17637  PC_PY_DEPENDENCY="python"
17638fi
17639
17640
17641      # Check for SWIG
17642      ub_have_swig=no
17643      # Check whether --enable-swig-version-check was given.
17644if test "${enable_swig_version_check+set}" = set; then :
17645  enableval=$enable_swig_version_check;
17646fi
17647
17648      if test "$enable_swig_version_check" = "yes"; then
17649
17650        # Extract the first word of "swig", so it can be a program name with args.
17651set dummy swig; ac_word=$2
17652{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17653$as_echo_n "checking for $ac_word... " >&6; }
17654if ${ac_cv_path_SWIG+:} false; then :
17655  $as_echo_n "(cached) " >&6
17656else
17657  case $SWIG in
17658  [\\/]* | ?:[\\/]*)
17659  ac_cv_path_SWIG="$SWIG" # Let the user override the test with a path.
17660  ;;
17661  *)
17662  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17663for as_dir in $PATH
17664do
17665  IFS=$as_save_IFS
17666  test -z "$as_dir" && as_dir=.
17667    for ac_exec_ext in '' $ac_executable_extensions; do
17668  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17669    ac_cv_path_SWIG="$as_dir/$ac_word$ac_exec_ext"
17670    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17671    break 2
17672  fi
17673done
17674  done
17675IFS=$as_save_IFS
17676
17677  ;;
17678esac
17679fi
17680SWIG=$ac_cv_path_SWIG
17681if test -n "$SWIG"; then
17682  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SWIG" >&5
17683$as_echo "$SWIG" >&6; }
17684else
17685  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17686$as_echo "no" >&6; }
17687fi
17688
17689
17690        if test -z "$SWIG" ; then
17691                { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot find 'swig' program. You should look at http://www.swig.org" >&5
17692$as_echo "$as_me: WARNING: cannot find 'swig' program. You should look at http://www.swig.org" >&2;}
17693                SWIG='echo "Error: SWIG is not installed. You should look at http://www.swig.org" ; false'
17694        elif test -n "2.0.1" ; then
17695                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SWIG version" >&5
17696$as_echo_n "checking for SWIG version... " >&6; }
17697                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'`
17698                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $swig_version" >&5
17699$as_echo "$swig_version" >&6; }
17700                if test -n "$swig_version" ; then
17701                        # Calculate the required version number components
17702                        required=2.0.1
17703                        required_major=`echo $required | sed 's/[^0-9].*//'`
17704                        if test -z "$required_major" ; then
17705                                required_major=0
17706                        fi
17707                        required=`echo $required | sed 's/[0-9]*[^0-9]//'`
17708                        required_minor=`echo $required | sed 's/[^0-9].*//'`
17709                        if test -z "$required_minor" ; then
17710                                required_minor=0
17711                        fi
17712                        required=`echo $required | sed 's/[0-9]*[^0-9]//'`
17713                        required_patch=`echo $required | sed 's/[^0-9].*//'`
17714                        if test -z "$required_patch" ; then
17715                                required_patch=0
17716                        fi
17717                        # Calculate the available version number components
17718                        available=$swig_version
17719                        available_major=`echo $available | sed 's/[^0-9].*//'`
17720                        if test -z "$available_major" ; then
17721                                available_major=0
17722                        fi
17723                        available=`echo $available | sed 's/[0-9]*[^0-9]//'`
17724                        available_minor=`echo $available | sed 's/[^0-9].*//'`
17725                        if test -z "$available_minor" ; then
17726                                available_minor=0
17727                        fi
17728                        available=`echo $available | sed 's/[0-9]*[^0-9]//'`
17729                        available_patch=`echo $available | sed 's/[^0-9].*//'`
17730                        if test -z "$available_patch" ; then
17731                                available_patch=0
17732                        fi
17733			badversion=0
17734			if test $available_major -lt $required_major ; then
17735				badversion=1
17736			fi
17737                        if test $available_major -eq $required_major \
17738                                -a $available_minor -lt $required_minor ; then
17739				badversion=1
17740			fi
17741                        if test $available_major -eq $required_major \
17742                                -a $available_minor -eq $required_minor \
17743                                -a $available_patch -lt $required_patch ; then
17744				badversion=1
17745			fi
17746			if test $badversion -eq 1 ; then
17747                                { $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
17748$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;}
17749                                SWIG='echo "Error: SWIG version >= 2.0.1 is required.  You have '"$swig_version"'.  You should look at http://www.swig.org" ; false'
17750                        else
17751                                { $as_echo "$as_me:${as_lineno-$LINENO}: SWIG executable is '$SWIG'" >&5
17752$as_echo "$as_me: SWIG executable is '$SWIG'" >&6;}
17753                                SWIG_LIB=`$SWIG -swiglib`
17754                                { $as_echo "$as_me:${as_lineno-$LINENO}: SWIG library directory is '$SWIG_LIB'" >&5
17755$as_echo "$as_me: SWIG library directory is '$SWIG_LIB'" >&6;}
17756                        fi
17757                else
17758                        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot determine SWIG version" >&5
17759$as_echo "$as_me: WARNING: cannot determine SWIG version" >&2;}
17760                        SWIG='echo "Error: Cannot determine SWIG version.  You should look at http://www.swig.org" ; false'
17761                fi
17762        fi
17763
17764
17765      else
17766
17767        # Extract the first word of "swig", so it can be a program name with args.
17768set dummy swig; ac_word=$2
17769{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17770$as_echo_n "checking for $ac_word... " >&6; }
17771if ${ac_cv_path_SWIG+:} false; then :
17772  $as_echo_n "(cached) " >&6
17773else
17774  case $SWIG in
17775  [\\/]* | ?:[\\/]*)
17776  ac_cv_path_SWIG="$SWIG" # Let the user override the test with a path.
17777  ;;
17778  *)
17779  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17780for as_dir in $PATH
17781do
17782  IFS=$as_save_IFS
17783  test -z "$as_dir" && as_dir=.
17784    for ac_exec_ext in '' $ac_executable_extensions; do
17785  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17786    ac_cv_path_SWIG="$as_dir/$ac_word$ac_exec_ext"
17787    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17788    break 2
17789  fi
17790done
17791  done
17792IFS=$as_save_IFS
17793
17794  ;;
17795esac
17796fi
17797SWIG=$ac_cv_path_SWIG
17798if test -n "$SWIG"; then
17799  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SWIG" >&5
17800$as_echo "$SWIG" >&6; }
17801else
17802  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17803$as_echo "no" >&6; }
17804fi
17805
17806
17807        if test -z "$SWIG" ; then
17808                { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot find 'swig' program. You should look at http://www.swig.org" >&5
17809$as_echo "$as_me: WARNING: cannot find 'swig' program. You should look at http://www.swig.org" >&2;}
17810                SWIG='echo "Error: SWIG is not installed. You should look at http://www.swig.org" ; false'
17811        elif test -n "" ; then
17812                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SWIG version" >&5
17813$as_echo_n "checking for SWIG version... " >&6; }
17814                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'`
17815                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $swig_version" >&5
17816$as_echo "$swig_version" >&6; }
17817                if test -n "$swig_version" ; then
17818                        # Calculate the required version number components
17819                        required=
17820                        required_major=`echo $required | sed 's/[^0-9].*//'`
17821                        if test -z "$required_major" ; then
17822                                required_major=0
17823                        fi
17824                        required=`echo $required | sed 's/[0-9]*[^0-9]//'`
17825                        required_minor=`echo $required | sed 's/[^0-9].*//'`
17826                        if test -z "$required_minor" ; then
17827                                required_minor=0
17828                        fi
17829                        required=`echo $required | sed 's/[0-9]*[^0-9]//'`
17830                        required_patch=`echo $required | sed 's/[^0-9].*//'`
17831                        if test -z "$required_patch" ; then
17832                                required_patch=0
17833                        fi
17834                        # Calculate the available version number components
17835                        available=$swig_version
17836                        available_major=`echo $available | sed 's/[^0-9].*//'`
17837                        if test -z "$available_major" ; then
17838                                available_major=0
17839                        fi
17840                        available=`echo $available | sed 's/[0-9]*[^0-9]//'`
17841                        available_minor=`echo $available | sed 's/[^0-9].*//'`
17842                        if test -z "$available_minor" ; then
17843                                available_minor=0
17844                        fi
17845                        available=`echo $available | sed 's/[0-9]*[^0-9]//'`
17846                        available_patch=`echo $available | sed 's/[^0-9].*//'`
17847                        if test -z "$available_patch" ; then
17848                                available_patch=0
17849                        fi
17850			badversion=0
17851			if test $available_major -lt $required_major ; then
17852				badversion=1
17853			fi
17854                        if test $available_major -eq $required_major \
17855                                -a $available_minor -lt $required_minor ; then
17856				badversion=1
17857			fi
17858                        if test $available_major -eq $required_major \
17859                                -a $available_minor -eq $required_minor \
17860                                -a $available_patch -lt $required_patch ; then
17861				badversion=1
17862			fi
17863			if test $badversion -eq 1 ; then
17864                                { $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
17865$as_echo "$as_me: WARNING: SWIG version >=  is required.  You have $swig_version.  You should look at http://www.swig.org" >&2;}
17866                                SWIG='echo "Error: SWIG version >=  is required.  You have '"$swig_version"'.  You should look at http://www.swig.org" ; false'
17867                        else
17868                                { $as_echo "$as_me:${as_lineno-$LINENO}: SWIG executable is '$SWIG'" >&5
17869$as_echo "$as_me: SWIG executable is '$SWIG'" >&6;}
17870                                SWIG_LIB=`$SWIG -swiglib`
17871                                { $as_echo "$as_me:${as_lineno-$LINENO}: SWIG library directory is '$SWIG_LIB'" >&5
17872$as_echo "$as_me: SWIG library directory is '$SWIG_LIB'" >&6;}
17873                        fi
17874                else
17875                        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot determine SWIG version" >&5
17876$as_echo "$as_me: WARNING: cannot determine SWIG version" >&2;}
17877                        SWIG='echo "Error: Cannot determine SWIG version.  You should look at http://www.swig.org" ; false'
17878                fi
17879        fi
17880
17881
17882      fi
17883      { $as_echo "$as_me:${as_lineno-$LINENO}: checking SWIG" >&5
17884$as_echo_n "checking SWIG... " >&6; }
17885      if test ! -x "$SWIG"; then
17886         as_fn_error $? "failed to find swig tool, install it, or do not build Python module and PyUnbound" "$LINENO" 5
17887      else
17888
17889$as_echo "#define HAVE_SWIG 1" >>confdefs.h
17890
17891         swig="$SWIG"
17892
17893         { $as_echo "$as_me:${as_lineno-$LINENO}: result: present" >&5
17894$as_echo "present" >&6; }
17895
17896         # If have Python & SWIG
17897         # Declare PythonMod
17898         if test x_$ub_with_pythonmod != x_no; then
17899
17900$as_echo "#define WITH_PYTHONMODULE 1" >>confdefs.h
17901
17902            WITH_PYTHONMODULE=yes
17903
17904	    PYTHONMOD_OBJ="pythonmod.lo pythonmod_utils.lo"
17905
17906	    PYTHONMOD_HEADER='$(srcdir)/pythonmod/pythonmod.h'
17907
17908	    PYTHONMOD_INSTALL=pythonmod-install
17909
17910	    PYTHONMOD_UNINSTALL=pythonmod-uninstall
17911
17912         fi
17913
17914         # Declare PyUnbound
17915         if test x_$ub_with_pyunbound != x_no; then
17916
17917$as_echo "#define WITH_PYUNBOUND 1" >>confdefs.h
17918
17919            WITH_PYUNBOUND=yes
17920
17921	    PYUNBOUND_OBJ="libunbound_wrap.lo"
17922
17923	    PYUNBOUND_TARGET="_unbound.la"
17924
17925	    PYUNBOUND_INSTALL=pyunbound-install
17926
17927	    PYUNBOUND_UNINSTALL=pyunbound-uninstall
17928
17929         fi
17930      fi
17931   else
17932      { $as_echo "$as_me:${as_lineno-$LINENO}: result: *** Python libraries not found, won't build PythonMod or PyUnbound ***" >&5
17933$as_echo "*** Python libraries not found, won't build PythonMod or PyUnbound ***" >&6; }
17934      ub_with_pyunbound=no
17935      ub_with_pythonmod=no
17936   fi
17937fi
17938
17939if test "`uname`" = "NetBSD"; then
17940	NETBSD_LINTFLAGS='"-D__RENAME(x)=" -D_NETINET_IN_H_'
17941
17942fi
17943
17944if test "`uname`" = "Linux"; then
17945	# splint cannot parse modern c99 header files
17946	GCC_DOCKER_LINTFLAGS='-syntax'
17947
17948fi
17949CONFIG_DATE=`date +%Y%m%d`
17950
17951
17952# Checks for libraries.
17953
17954# libnss
17955USE_NSS="no"
17956
17957# Check whether --with-nss was given.
17958if test "${with_nss+set}" = set; then :
17959  withval=$with_nss;
17960	USE_NSS="yes"
17961
17962$as_echo "#define HAVE_NSS 1" >>confdefs.h
17963
17964	if test "$withval" != "" -a "$withval" != "yes"; then
17965		CPPFLAGS="$CPPFLAGS -I$withval/include/nss3"
17966		LDFLAGS="$LDFLAGS -L$withval/lib"
17967
17968	if test "x$enable_rpath" = xyes; then
17969		if echo "$withval/lib" | grep "^/" >/dev/null; then
17970			RUNTIME_PATH="$RUNTIME_PATH -R$withval/lib"
17971		fi
17972	fi
17973
17974		CPPFLAGS="-I$withval/include/nspr4 $CPPFLAGS"
17975	else
17976		CPPFLAGS="$CPPFLAGS -I/usr/include/nss3"
17977		CPPFLAGS="-I/usr/include/nspr4 $CPPFLAGS"
17978	fi
17979        LIBS="$LIBS -lnss3 -lnspr4"
17980	SSLLIB=""
17981	PC_CRYPTO_DEPENDENCY="nss nspr"
17982
17983
17984
17985fi
17986
17987
17988# libnettle
17989USE_NETTLE="no"
17990
17991# Check whether --with-nettle was given.
17992if test "${with_nettle+set}" = set; then :
17993  withval=$with_nettle;
17994	USE_NETTLE="yes"
17995
17996$as_echo "#define HAVE_NETTLE 1" >>confdefs.h
17997
17998	for ac_header in nettle/dsa-compat.h
17999do :
18000  ac_fn_c_check_header_compile "$LINENO" "nettle/dsa-compat.h" "ac_cv_header_nettle_dsa_compat_h" "$ac_includes_default
18001"
18002if test "x$ac_cv_header_nettle_dsa_compat_h" = xyes; then :
18003  cat >>confdefs.h <<_ACEOF
18004#define HAVE_NETTLE_DSA_COMPAT_H 1
18005_ACEOF
18006
18007fi
18008
18009done
18010
18011	if test "$withval" != "" -a "$withval" != "yes"; then
18012		CPPFLAGS="$CPPFLAGS -I$withval/include/nettle"
18013		LDFLAGS="$LDFLAGS -L$withval/lib"
18014
18015	if test "x$enable_rpath" = xyes; then
18016		if echo "$withval/lib" | grep "^/" >/dev/null; then
18017			RUNTIME_PATH="$RUNTIME_PATH -R$withval/lib"
18018		fi
18019	fi
18020
18021	else
18022		CPPFLAGS="$CPPFLAGS -I/usr/include/nettle"
18023	fi
18024        LIBS="$LIBS -lhogweed -lnettle -lgmp"
18025	SSLLIB=""
18026	PC_CRYPTO_DEPENDENCY="hogweed nettle"
18027
18028
18029
18030fi
18031
18032
18033# openssl
18034if test $USE_NSS = "no" -a $USE_NETTLE = "no"; then
18035
18036
18037# Check whether --with-ssl was given.
18038if test "${with_ssl+set}" = set; then :
18039  withval=$with_ssl;
18040
18041else
18042
18043            withval="yes"
18044
18045fi
18046
18047    if test x_$withval = x_no; then
18048	as_fn_error $? "Need SSL library to do digital signature cryptography" "$LINENO" 5
18049    fi
18050
18051    withval=$withval
18052    if test x_$withval != x_no; then
18053        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SSL" >&5
18054$as_echo_n "checking for SSL... " >&6; }
18055	if test -n "$withval"; then
18056										if test ! -f "$withval/include/openssl/ssl.h" -a -f "$withval/openssl/ssl.h"; then
18057			ssldir="$withval"
18058			found_ssl="yes"
18059			withval=""
18060			ssldir_include="$ssldir"
18061						ssldir_lib=`echo $ssldir | sed -e 's/include/lib/'`
18062			if test -f "$ssldir_lib/libssl.a" -o -f "$ssldir_lib/libssl.so"; then
18063				: # found here
18064			else
18065				ssldir_lib=`echo $ssldir | sed -e 's/include/lib64/'`
18066				if test -f "$ssldir_lib/libssl.a" -o -f "$ssldir_lib/libssl.so"; then
18067					: # found here
18068				else
18069					as_fn_error $? "Could not find openssl lib file, $ssldir_lib/libssl.so,a, pass like \"/usr/local\" or \"/usr/include/openssl11\"" "$LINENO" 5
18070				fi
18071			fi
18072		fi
18073	fi
18074        if test x_$withval = x_ -o x_$withval = x_yes; then
18075            withval="/usr/local/ssl /usr/lib/ssl /usr/ssl /usr/pkg /usr/local /opt/local /usr/sfw /usr"
18076        fi
18077        for dir in $withval; do
18078            ssldir="$dir"
18079            if test -f "$dir/include/openssl/ssl.h"; then
18080                found_ssl="yes"
18081		ssldir_include="$ssldir/include"
18082		if test ! -d "$ssldir/lib" -a -d "$ssldir/lib64"; then
18083			ssldir_lib="$ssldir/lib64"
18084		else
18085			ssldir_lib="$ssldir/lib"
18086		fi
18087                break;
18088            fi
18089        done
18090        if test x_$found_ssl != x_yes; then
18091            as_fn_error $? "Cannot find the SSL libraries in $withval" "$LINENO" 5
18092        else
18093            { $as_echo "$as_me:${as_lineno-$LINENO}: result: found in $ssldir" >&5
18094$as_echo "found in $ssldir" >&6; }
18095
18096cat >>confdefs.h <<_ACEOF
18097#define HAVE_SSL /**/
18098_ACEOF
18099
18100            HAVE_SSL=yes
18101	                if test "$ssldir" != "/usr"; then
18102		    CPPFLAGS="$CPPFLAGS -I$ssldir_include"
18103		    LIBSSL_CPPFLAGS="$LIBSSL_CPPFLAGS -I$ssldir_include"
18104		    LDFLAGS="$LDFLAGS -L$ssldir_lib"
18105		    LIBSSL_LDFLAGS="$LIBSSL_LDFLAGS -L$ssldir_lib"
18106
18107	if test "x$enable_rpath" = xyes; then
18108		if echo "$ssldir_lib" | grep "^/" >/dev/null; then
18109			RUNTIME_PATH="$RUNTIME_PATH -R$ssldir_lib"
18110		fi
18111	fi
18112
18113	    fi
18114
18115            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EVP_sha256 in -lcrypto" >&5
18116$as_echo_n "checking for EVP_sha256 in -lcrypto... " >&6; }
18117            LIBS="$LIBS -lcrypto"
18118            LIBSSL_LIBS="$LIBSSL_LIBS -lcrypto"
18119            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18120/* end confdefs.h.  */
18121
18122int
18123main ()
18124{
18125
18126                int EVP_sha256(void);
18127                (void)EVP_sha256();
18128
18129  ;
18130  return 0;
18131}
18132_ACEOF
18133if ac_fn_c_try_link "$LINENO"; then :
18134
18135                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
18136$as_echo "yes" >&6; }
18137
18138$as_echo "#define HAVE_EVP_SHA256 1" >>confdefs.h
18139
18140
18141else
18142
18143                { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18144$as_echo "no" >&6; }
18145                # check if -lwsock32 or -lgdi32 are needed.
18146                BAKLIBS="$LIBS"
18147                BAKSSLLIBS="$LIBSSL_LIBS"
18148		LIBS="$LIBS -lgdi32 -lws2_32"
18149		LIBSSL_LIBS="$LIBSSL_LIBS -lgdi32 -lws2_32"
18150                { $as_echo "$as_me:${as_lineno-$LINENO}: checking if -lcrypto needs -lgdi32" >&5
18151$as_echo_n "checking if -lcrypto needs -lgdi32... " >&6; }
18152                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18153/* end confdefs.h.  */
18154
18155int
18156main ()
18157{
18158
18159                    int EVP_sha256(void);
18160                    (void)EVP_sha256();
18161
18162  ;
18163  return 0;
18164}
18165_ACEOF
18166if ac_fn_c_try_link "$LINENO"; then :
18167
18168
18169$as_echo "#define HAVE_EVP_SHA256 1" >>confdefs.h
18170
18171                    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
18172$as_echo "yes" >&6; }
18173
18174else
18175
18176                    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18177$as_echo "no" >&6; }
18178                    LIBS="$BAKLIBS"
18179                    LIBSSL_LIBS="$BAKSSLLIBS"
18180                    LIBS="$LIBS -ldl"
18181                    LIBSSL_LIBS="$LIBSSL_LIBS -ldl"
18182                    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if -lcrypto needs -ldl" >&5
18183$as_echo_n "checking if -lcrypto needs -ldl... " >&6; }
18184                    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18185/* end confdefs.h.  */
18186
18187int
18188main ()
18189{
18190
18191                        int EVP_sha256(void);
18192                        (void)EVP_sha256();
18193
18194  ;
18195  return 0;
18196}
18197_ACEOF
18198if ac_fn_c_try_link "$LINENO"; then :
18199
18200
18201$as_echo "#define HAVE_EVP_SHA256 1" >>confdefs.h
18202
18203                        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
18204$as_echo "yes" >&6; }
18205
18206else
18207
18208                        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18209$as_echo "no" >&6; }
18210                        LIBS="$BAKLIBS"
18211                        LIBSSL_LIBS="$BAKSSLLIBS"
18212                        LIBS="$LIBS -ldl -pthread"
18213                        LIBSSL_LIBS="$LIBSSL_LIBS -ldl -pthread"
18214                        { $as_echo "$as_me:${as_lineno-$LINENO}: checking if -lcrypto needs -ldl -pthread" >&5
18215$as_echo_n "checking if -lcrypto needs -ldl -pthread... " >&6; }
18216                        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18217/* end confdefs.h.  */
18218
18219int
18220main ()
18221{
18222
18223                            int EVP_sha256(void);
18224                            (void)EVP_sha256();
18225
18226  ;
18227  return 0;
18228}
18229_ACEOF
18230if ac_fn_c_try_link "$LINENO"; then :
18231
18232
18233$as_echo "#define HAVE_EVP_SHA256 1" >>confdefs.h
18234
18235                            { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
18236$as_echo "yes" >&6; }
18237
18238else
18239
18240                            { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18241$as_echo "no" >&6; }
18242                            as_fn_error $? "OpenSSL found in $ssldir, but version 0.9.7 or higher is required" "$LINENO" 5
18243
18244fi
18245rm -f core conftest.err conftest.$ac_objext \
18246    conftest$ac_exeext conftest.$ac_ext
18247
18248fi
18249rm -f core conftest.err conftest.$ac_objext \
18250    conftest$ac_exeext conftest.$ac_ext
18251
18252fi
18253rm -f core conftest.err conftest.$ac_objext \
18254    conftest$ac_exeext conftest.$ac_ext
18255
18256fi
18257rm -f core conftest.err conftest.$ac_objext \
18258    conftest$ac_exeext conftest.$ac_ext
18259        fi
18260
18261
18262    fi
18263for ac_header in openssl/ssl.h
18264do :
18265  ac_fn_c_check_header_compile "$LINENO" "openssl/ssl.h" "ac_cv_header_openssl_ssl_h" "$ac_includes_default
18266"
18267if test "x$ac_cv_header_openssl_ssl_h" = xyes; then :
18268  cat >>confdefs.h <<_ACEOF
18269#define HAVE_OPENSSL_SSL_H 1
18270_ACEOF
18271
18272fi
18273
18274done
18275
18276for ac_header in openssl/err.h
18277do :
18278  ac_fn_c_check_header_compile "$LINENO" "openssl/err.h" "ac_cv_header_openssl_err_h" "$ac_includes_default
18279"
18280if test "x$ac_cv_header_openssl_err_h" = xyes; then :
18281  cat >>confdefs.h <<_ACEOF
18282#define HAVE_OPENSSL_ERR_H 1
18283_ACEOF
18284
18285fi
18286
18287done
18288
18289for ac_header in openssl/rand.h
18290do :
18291  ac_fn_c_check_header_compile "$LINENO" "openssl/rand.h" "ac_cv_header_openssl_rand_h" "$ac_includes_default
18292"
18293if test "x$ac_cv_header_openssl_rand_h" = xyes; then :
18294  cat >>confdefs.h <<_ACEOF
18295#define HAVE_OPENSSL_RAND_H 1
18296_ACEOF
18297
18298fi
18299
18300done
18301
18302
18303
18304
18305# check if libssl needs libdl
18306BAKLIBS="$LIBS"
18307LIBS="-lssl $LIBS"
18308{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if libssl needs libdl" >&5
18309$as_echo_n "checking if libssl needs libdl... " >&6; }
18310cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18311/* end confdefs.h.  */
18312
18313/* Override any GCC internal prototype to avoid an error.
18314   Use char because int might match the return type of a GCC
18315   builtin and then its argument prototype would still apply.  */
18316#ifdef __cplusplus
18317extern "C"
18318#endif
18319char SSL_CTX_new ();
18320int
18321main ()
18322{
18323return SSL_CTX_new ();
18324  ;
18325  return 0;
18326}
18327_ACEOF
18328if ac_fn_c_try_link "$LINENO"; then :
18329
18330	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18331$as_echo "no" >&6; }
18332	LIBS="$BAKLIBS"
18333
18334else
18335
18336	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
18337$as_echo "yes" >&6; }
18338	LIBS="$BAKLIBS"
18339	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
18340$as_echo_n "checking for library containing dlopen... " >&6; }
18341if ${ac_cv_search_dlopen+:} false; then :
18342  $as_echo_n "(cached) " >&6
18343else
18344  ac_func_search_save_LIBS=$LIBS
18345cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18346/* end confdefs.h.  */
18347
18348/* Override any GCC internal prototype to avoid an error.
18349   Use char because int might match the return type of a GCC
18350   builtin and then its argument prototype would still apply.  */
18351#ifdef __cplusplus
18352extern "C"
18353#endif
18354char dlopen ();
18355int
18356main ()
18357{
18358return dlopen ();
18359  ;
18360  return 0;
18361}
18362_ACEOF
18363for ac_lib in '' dl; do
18364  if test -z "$ac_lib"; then
18365    ac_res="none required"
18366  else
18367    ac_res=-l$ac_lib
18368    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
18369  fi
18370  if ac_fn_c_try_link "$LINENO"; then :
18371  ac_cv_search_dlopen=$ac_res
18372fi
18373rm -f core conftest.err conftest.$ac_objext \
18374    conftest$ac_exeext
18375  if ${ac_cv_search_dlopen+:} false; then :
18376  break
18377fi
18378done
18379if ${ac_cv_search_dlopen+:} false; then :
18380
18381else
18382  ac_cv_search_dlopen=no
18383fi
18384rm conftest.$ac_ext
18385LIBS=$ac_func_search_save_LIBS
18386fi
18387{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
18388$as_echo "$ac_cv_search_dlopen" >&6; }
18389ac_res=$ac_cv_search_dlopen
18390if test "$ac_res" != no; then :
18391  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
18392
18393fi
18394
18395
18396fi
18397rm -f core conftest.err conftest.$ac_objext \
18398    conftest$ac_exeext conftest.$ac_ext
18399SSLLIB="-lssl"
18400
18401PC_CRYPTO_DEPENDENCY=""
18402
18403
18404# check if -lcrypt32 is needed because CAPIENG needs that. (on windows)
18405BAKLIBS="$LIBS"
18406LIBS="-lssl $LIBS"
18407{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if libssl needs -lcrypt32" >&5
18408$as_echo_n "checking if libssl needs -lcrypt32... " >&6; }
18409cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18410/* end confdefs.h.  */
18411
18412int
18413main ()
18414{
18415
18416	int EVP_sha256(void);
18417	(void)EVP_sha256();
18418
18419  ;
18420  return 0;
18421}
18422_ACEOF
18423if ac_fn_c_try_link "$LINENO"; then :
18424
18425	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18426$as_echo "no" >&6; }
18427	LIBS="$BAKLIBS"
18428
18429else
18430
18431	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
18432$as_echo "yes" >&6; }
18433	LIBS="$BAKLIBS"
18434	LIBS="$LIBS -lcrypt32"
18435
18436fi
18437rm -f core conftest.err conftest.$ac_objext \
18438    conftest$ac_exeext conftest.$ac_ext
18439
18440{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LibreSSL" >&5
18441$as_echo_n "checking for LibreSSL... " >&6; }
18442if grep VERSION_TEXT $ssldir_include/openssl/opensslv.h | grep "LibreSSL" >/dev/null; then
18443	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
18444$as_echo "yes" >&6; }
18445
18446$as_echo "#define HAVE_LIBRESSL 1" >>confdefs.h
18447
18448	# libressl provides these compat functions, but they may also be
18449	# declared by the OS in libc.  See if they have been declared.
18450	ac_fn_c_check_decl "$LINENO" "strlcpy" "ac_cv_have_decl_strlcpy" "$ac_includes_default"
18451if test "x$ac_cv_have_decl_strlcpy" = xyes; then :
18452  ac_have_decl=1
18453else
18454  ac_have_decl=0
18455fi
18456
18457cat >>confdefs.h <<_ACEOF
18458#define HAVE_DECL_STRLCPY $ac_have_decl
18459_ACEOF
18460ac_fn_c_check_decl "$LINENO" "strlcat" "ac_cv_have_decl_strlcat" "$ac_includes_default"
18461if test "x$ac_cv_have_decl_strlcat" = xyes; then :
18462  ac_have_decl=1
18463else
18464  ac_have_decl=0
18465fi
18466
18467cat >>confdefs.h <<_ACEOF
18468#define HAVE_DECL_STRLCAT $ac_have_decl
18469_ACEOF
18470ac_fn_c_check_decl "$LINENO" "arc4random" "ac_cv_have_decl_arc4random" "$ac_includes_default"
18471if test "x$ac_cv_have_decl_arc4random" = xyes; then :
18472  ac_have_decl=1
18473else
18474  ac_have_decl=0
18475fi
18476
18477cat >>confdefs.h <<_ACEOF
18478#define HAVE_DECL_ARC4RANDOM $ac_have_decl
18479_ACEOF
18480ac_fn_c_check_decl "$LINENO" "arc4random_uniform" "ac_cv_have_decl_arc4random_uniform" "$ac_includes_default"
18481if test "x$ac_cv_have_decl_arc4random_uniform" = xyes; then :
18482  ac_have_decl=1
18483else
18484  ac_have_decl=0
18485fi
18486
18487cat >>confdefs.h <<_ACEOF
18488#define HAVE_DECL_ARC4RANDOM_UNIFORM $ac_have_decl
18489_ACEOF
18490
18491else
18492	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18493$as_echo "no" >&6; }
18494fi
18495for 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
18496do :
18497  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
18498ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
18499"
18500if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
18501  cat >>confdefs.h <<_ACEOF
18502#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
18503_ACEOF
18504
18505fi
18506
18507done
18508
18509for ac_func in OPENSSL_config EVP_sha1 EVP_sha256 EVP_sha512 FIPS_mode 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
18510do :
18511  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
18512ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
18513if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
18514  cat >>confdefs.h <<_ACEOF
18515#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
18516_ACEOF
18517
18518fi
18519done
18520
18521
18522# these check_funcs need -lssl
18523BAKLIBS="$LIBS"
18524LIBS="-lssl $LIBS"
18525for 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
18526do :
18527  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
18528ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
18529if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
18530  cat >>confdefs.h <<_ACEOF
18531#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
18532_ACEOF
18533
18534fi
18535done
18536
18537LIBS="$BAKLIBS"
18538
18539ac_fn_c_check_decl "$LINENO" "SSL_COMP_get_compression_methods" "ac_cv_have_decl_SSL_COMP_get_compression_methods" "
18540$ac_includes_default
18541#ifdef HAVE_OPENSSL_ERR_H
18542#include <openssl/err.h>
18543#endif
18544
18545#ifdef HAVE_OPENSSL_RAND_H
18546#include <openssl/rand.h>
18547#endif
18548
18549#ifdef HAVE_OPENSSL_CONF_H
18550#include <openssl/conf.h>
18551#endif
18552
18553#ifdef HAVE_OPENSSL_ENGINE_H
18554#include <openssl/engine.h>
18555#endif
18556#include <openssl/ssl.h>
18557#include <openssl/evp.h>
18558
18559"
18560if test "x$ac_cv_have_decl_SSL_COMP_get_compression_methods" = xyes; then :
18561  ac_have_decl=1
18562else
18563  ac_have_decl=0
18564fi
18565
18566cat >>confdefs.h <<_ACEOF
18567#define HAVE_DECL_SSL_COMP_GET_COMPRESSION_METHODS $ac_have_decl
18568_ACEOF
18569ac_fn_c_check_decl "$LINENO" "sk_SSL_COMP_pop_free" "ac_cv_have_decl_sk_SSL_COMP_pop_free" "
18570$ac_includes_default
18571#ifdef HAVE_OPENSSL_ERR_H
18572#include <openssl/err.h>
18573#endif
18574
18575#ifdef HAVE_OPENSSL_RAND_H
18576#include <openssl/rand.h>
18577#endif
18578
18579#ifdef HAVE_OPENSSL_CONF_H
18580#include <openssl/conf.h>
18581#endif
18582
18583#ifdef HAVE_OPENSSL_ENGINE_H
18584#include <openssl/engine.h>
18585#endif
18586#include <openssl/ssl.h>
18587#include <openssl/evp.h>
18588
18589"
18590if test "x$ac_cv_have_decl_sk_SSL_COMP_pop_free" = xyes; then :
18591  ac_have_decl=1
18592else
18593  ac_have_decl=0
18594fi
18595
18596cat >>confdefs.h <<_ACEOF
18597#define HAVE_DECL_SK_SSL_COMP_POP_FREE $ac_have_decl
18598_ACEOF
18599ac_fn_c_check_decl "$LINENO" "SSL_CTX_set_ecdh_auto" "ac_cv_have_decl_SSL_CTX_set_ecdh_auto" "
18600$ac_includes_default
18601#ifdef HAVE_OPENSSL_ERR_H
18602#include <openssl/err.h>
18603#endif
18604
18605#ifdef HAVE_OPENSSL_RAND_H
18606#include <openssl/rand.h>
18607#endif
18608
18609#ifdef HAVE_OPENSSL_CONF_H
18610#include <openssl/conf.h>
18611#endif
18612
18613#ifdef HAVE_OPENSSL_ENGINE_H
18614#include <openssl/engine.h>
18615#endif
18616#include <openssl/ssl.h>
18617#include <openssl/evp.h>
18618
18619"
18620if test "x$ac_cv_have_decl_SSL_CTX_set_ecdh_auto" = xyes; then :
18621  ac_have_decl=1
18622else
18623  ac_have_decl=0
18624fi
18625
18626cat >>confdefs.h <<_ACEOF
18627#define HAVE_DECL_SSL_CTX_SET_ECDH_AUTO $ac_have_decl
18628_ACEOF
18629
18630
18631if test "$ac_cv_func_HMAC_Init_ex" = "yes"; then
18632# check function return type.
18633{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the return type of HMAC_Init_ex" >&5
18634$as_echo_n "checking the return type of HMAC_Init_ex... " >&6; }
18635cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18636/* end confdefs.h.  */
18637
18638#ifdef HAVE_OPENSSL_ERR_H
18639#include <openssl/err.h>
18640#endif
18641
18642#ifdef HAVE_OPENSSL_RAND_H
18643#include <openssl/rand.h>
18644#endif
18645
18646#ifdef HAVE_OPENSSL_CONF_H
18647#include <openssl/conf.h>
18648#endif
18649
18650#ifdef HAVE_OPENSSL_ENGINE_H
18651#include <openssl/engine.h>
18652#endif
18653#include <openssl/ssl.h>
18654#include <openssl/evp.h>
18655
18656int
18657main ()
18658{
18659
18660	HMAC_CTX* hmac_ctx = NULL;
18661	void* hmac_key = NULL;
18662	const EVP_MD* digest = NULL;
18663	int x = HMAC_Init_ex(hmac_ctx, hmac_key, 32, digest, NULL);
18664	(void)x;
18665
18666  ;
18667  return 0;
18668}
18669_ACEOF
18670if ac_fn_c_try_compile "$LINENO"; then :
18671
18672	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: int" >&5
18673$as_echo "int" >&6; }
18674
18675else
18676
18677	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: void" >&5
18678$as_echo "void" >&6; }
18679
18680$as_echo "#define HMAC_INIT_EX_RETURNS_VOID 1" >>confdefs.h
18681
18682
18683fi
18684rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18685fi
18686
18687fi
18688
18689
18690# libbsd
18691
18692# Check whether --with-libbsd was given.
18693if test "${with_libbsd+set}" = set; then :
18694  withval=$with_libbsd;
18695	for ac_header in bsd/string.h bsd/stdlib.h
18696do :
18697  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
18698ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
18699"
18700if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
18701  cat >>confdefs.h <<_ACEOF
18702#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
18703_ACEOF
18704
18705fi
18706
18707done
18708
18709	if test "x$ac_cv_header_bsd_string_h" = xyes -a "x$ac_cv_header_bsd_stdlib_h" = xyes; then
18710		for func in strlcpy strlcat arc4random arc4random_uniform reallocarray; do
18711			as_ac_Search=`$as_echo "ac_cv_search_$func" | $as_tr_sh`
18712{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing $func" >&5
18713$as_echo_n "checking for library containing $func... " >&6; }
18714if eval \${$as_ac_Search+:} false; then :
18715  $as_echo_n "(cached) " >&6
18716else
18717  ac_func_search_save_LIBS=$LIBS
18718cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18719/* end confdefs.h.  */
18720
18721/* Override any GCC internal prototype to avoid an error.
18722   Use char because int might match the return type of a GCC
18723   builtin and then its argument prototype would still apply.  */
18724#ifdef __cplusplus
18725extern "C"
18726#endif
18727char $func ();
18728int
18729main ()
18730{
18731return $func ();
18732  ;
18733  return 0;
18734}
18735_ACEOF
18736for ac_lib in '' bsd; do
18737  if test -z "$ac_lib"; then
18738    ac_res="none required"
18739  else
18740    ac_res=-l$ac_lib
18741    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
18742  fi
18743  if ac_fn_c_try_link "$LINENO"; then :
18744  eval "$as_ac_Search=\$ac_res"
18745fi
18746rm -f core conftest.err conftest.$ac_objext \
18747    conftest$ac_exeext
18748  if eval \${$as_ac_Search+:} false; then :
18749  break
18750fi
18751done
18752if eval \${$as_ac_Search+:} false; then :
18753
18754else
18755  eval "$as_ac_Search=no"
18756fi
18757rm conftest.$ac_ext
18758LIBS=$ac_func_search_save_LIBS
18759fi
18760eval ac_res=\$$as_ac_Search
18761	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
18762$as_echo "$ac_res" >&6; }
18763eval ac_res=\$$as_ac_Search
18764if test "$ac_res" != no; then :
18765  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
18766
18767
18768$as_echo "#define HAVE_LIBBSD 1" >>confdefs.h
18769
18770				PC_LIBBSD_DEPENDENCY=libbsd
18771
18772
18773fi
18774
18775		done
18776	fi
18777
18778fi
18779
18780
18781# Check whether --enable-sha1 was given.
18782if test "${enable_sha1+set}" = set; then :
18783  enableval=$enable_sha1;
18784fi
18785
18786case "$enable_sha1" in
18787	no)
18788	;;
18789	yes|*)
18790
18791$as_echo "#define USE_SHA1 1" >>confdefs.h
18792
18793	;;
18794esac
18795
18796
18797# Check whether --enable-sha2 was given.
18798if test "${enable_sha2+set}" = set; then :
18799  enableval=$enable_sha2;
18800fi
18801
18802case "$enable_sha2" in
18803	no)
18804	;;
18805	yes|*)
18806
18807$as_echo "#define USE_SHA2 1" >>confdefs.h
18808
18809	;;
18810esac
18811
18812# Check whether --enable-subnet was given.
18813if test "${enable_subnet+set}" = set; then :
18814  enableval=$enable_subnet;
18815fi
18816
18817case "$enable_subnet" in
18818	yes)
18819
18820$as_echo "#define CLIENT_SUBNET 1" >>confdefs.h
18821
18822	SUBNET_OBJ="edns-subnet.lo subnetmod.lo addrtree.lo subnet-whitelist.lo"
18823
18824	SUBNET_HEADER='$(srcdir)/edns-subnet/subnetmod.h $(srcdir)/edns-subnet/edns-subnet.h $(srcdir)/edns-subnet/subnet-whitelist.h $(srcdir)/edns-subnet/addrtree.h'
18825
18826	;;
18827	no|*)
18828	;;
18829esac
18830
18831# check whether gost also works
18832
18833# Check whether --enable-gost was given.
18834if test "${enable_gost+set}" = set; then :
18835  enableval=$enable_gost;
18836fi
18837
18838use_gost="no"
18839if test $USE_NSS = "no" -a $USE_NETTLE = "no"; then
18840case "$enable_gost" in
18841	no)
18842	;;
18843	*)
18844	ac_fn_c_check_func "$LINENO" "EVP_PKEY_set_type_str" "ac_cv_func_EVP_PKEY_set_type_str"
18845if test "x$ac_cv_func_EVP_PKEY_set_type_str" = xyes; then :
18846  :
18847else
18848  as_fn_error $? "OpenSSL 1.0.0 is needed for GOST support" "$LINENO" 5
18849fi
18850
18851	ac_fn_c_check_func "$LINENO" "EC_KEY_new" "ac_cv_func_EC_KEY_new"
18852if test "x$ac_cv_func_EC_KEY_new" = xyes; then :
18853
18854else
18855  as_fn_error $? "OpenSSL does not support ECC, needed for GOST support" "$LINENO" 5
18856fi
18857
18858
18859{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if GOST works" >&5
18860$as_echo_n "checking if GOST works... " >&6; }
18861if test c${cross_compiling} = cno; then
18862BAKCFLAGS="$CFLAGS"
18863if test -n "$ssldir"; then
18864	CFLAGS="$CFLAGS -Wl,-rpath,$ssldir_lib"
18865fi
18866if test "$cross_compiling" = yes; then :
18867  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
18868$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
18869as_fn_error $? "cannot run test program while cross compiling
18870See \`config.log' for more details" "$LINENO" 5; }
18871else
18872  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18873/* end confdefs.h.  */
18874
18875#include <string.h>
18876#include <openssl/ssl.h>
18877#include <openssl/evp.h>
18878#include <openssl/engine.h>
18879#include <openssl/conf.h>
18880/* routine to load gost (from sldns) */
18881int load_gost_id(void)
18882{
18883	static int gost_id = 0;
18884	const EVP_PKEY_ASN1_METHOD* meth;
18885	ENGINE* e;
18886
18887	if(gost_id) return gost_id;
18888
18889	/* see if configuration loaded gost implementation from other engine*/
18890	meth = EVP_PKEY_asn1_find_str(NULL, "gost2001", -1);
18891	if(meth) {
18892		EVP_PKEY_asn1_get0_info(&gost_id, NULL, NULL, NULL, NULL, meth);
18893		return gost_id;
18894	}
18895
18896	/* see if engine can be loaded already */
18897	e = ENGINE_by_id("gost");
18898	if(!e) {
18899		/* load it ourself, in case statically linked */
18900		ENGINE_load_builtin_engines();
18901		ENGINE_load_dynamic();
18902		e = ENGINE_by_id("gost");
18903	}
18904	if(!e) {
18905		/* no gost engine in openssl */
18906		return 0;
18907	}
18908	if(!ENGINE_set_default(e, ENGINE_METHOD_ALL)) {
18909		ENGINE_finish(e);
18910		ENGINE_free(e);
18911		return 0;
18912	}
18913
18914	meth = EVP_PKEY_asn1_find_str(&e, "gost2001", -1);
18915	if(!meth) {
18916		/* algo not found */
18917		ENGINE_finish(e);
18918		ENGINE_free(e);
18919		return 0;
18920	}
18921	EVP_PKEY_asn1_get0_info(&gost_id, NULL, NULL, NULL, NULL, meth);
18922	return gost_id;
18923}
18924int main(void) {
18925	EVP_MD_CTX* ctx;
18926	const EVP_MD* md;
18927	unsigned char digest[64]; /* its a 256-bit digest, so uses 32 bytes */
18928	const char* str = "Hello world";
18929	const unsigned char check[] = {
18930		0x40 , 0xed , 0xf8 , 0x56 , 0x5a , 0xc5 , 0x36 , 0xe1 ,
18931		0x33 , 0x7c , 0x7e , 0x87 , 0x62 , 0x1c , 0x42 , 0xe0 ,
18932		0x17 , 0x1b , 0x5e , 0xce , 0xa8 , 0x46 , 0x65 , 0x4d ,
18933		0x8d , 0x3e , 0x22 , 0x9b , 0xe1 , 0x30 , 0x19 , 0x9d
18934	};
18935	OPENSSL_config(NULL);
18936	(void)load_gost_id();
18937	md = EVP_get_digestbyname("md_gost94");
18938	if(!md) return 1;
18939	memset(digest, 0, sizeof(digest));
18940	ctx = EVP_MD_CTX_create();
18941	if(!ctx) return 2;
18942	if(!EVP_DigestInit_ex(ctx, md, NULL)) return 3;
18943	if(!EVP_DigestUpdate(ctx, str, 10)) return 4;
18944	if(!EVP_DigestFinal_ex(ctx, digest, NULL)) return 5;
18945	/* uncomment to see the hash calculated.
18946		{int i;
18947		for(i=0; i<32; i++)
18948			printf(" %2.2x", (int)digest[i]);
18949		printf("\n");}
18950	*/
18951	if(memcmp(digest, check, sizeof(check)) != 0)
18952		return 6;
18953	return 0;
18954}
18955
18956_ACEOF
18957if ac_fn_c_try_run "$LINENO"; then :
18958  eval "ac_cv_c_gost_works=yes"
18959else
18960  eval "ac_cv_c_gost_works=no"
18961fi
18962rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18963  conftest.$ac_objext conftest.beam conftest.$ac_ext
18964fi
18965
18966CFLAGS="$BAKCFLAGS"
18967else
18968eval "ac_cv_c_gost_works=maybe"
18969fi
18970{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_gost_works" >&5
18971$as_echo "$ac_cv_c_gost_works" >&6; }
18972
18973	if test "$ac_cv_c_gost_works" != no; then
18974		use_gost="yes"
18975
18976$as_echo "#define USE_GOST 1" >>confdefs.h
18977
18978	fi
18979	;;
18980esac
18981fi
18982# Check whether --enable-ecdsa was given.
18983if test "${enable_ecdsa+set}" = set; then :
18984  enableval=$enable_ecdsa;
18985fi
18986
18987use_ecdsa="no"
18988case "$enable_ecdsa" in
18989    no)
18990      ;;
18991    *)
18992      if test $USE_NSS = "no" -a $USE_NETTLE = "no"; then
18993	      ac_fn_c_check_func "$LINENO" "ECDSA_sign" "ac_cv_func_ECDSA_sign"
18994if test "x$ac_cv_func_ECDSA_sign" = xyes; then :
18995
18996else
18997  as_fn_error $? "OpenSSL does not support ECDSA: please upgrade or rerun with --disable-ecdsa" "$LINENO" 5
18998fi
18999
19000	      ac_fn_c_check_func "$LINENO" "SHA384_Init" "ac_cv_func_SHA384_Init"
19001if test "x$ac_cv_func_SHA384_Init" = xyes; then :
19002
19003else
19004  as_fn_error $? "OpenSSL does not support SHA384: please upgrade or rerun with --disable-ecdsa" "$LINENO" 5
19005fi
19006
19007	      ac_fn_c_check_decl "$LINENO" "NID_X9_62_prime256v1" "ac_cv_have_decl_NID_X9_62_prime256v1" "$ac_includes_default
19008#include <openssl/evp.h>
19009
19010"
19011if test "x$ac_cv_have_decl_NID_X9_62_prime256v1" = xyes; then :
19012  ac_have_decl=1
19013else
19014  ac_have_decl=0
19015fi
19016
19017cat >>confdefs.h <<_ACEOF
19018#define HAVE_DECL_NID_X9_62_PRIME256V1 $ac_have_decl
19019_ACEOF
19020if test $ac_have_decl = 1; then :
19021
19022else
19023  as_fn_error $? "OpenSSL does not support the ECDSA curves: please upgrade or rerun with --disable-ecdsa" "$LINENO" 5
19024fi
19025ac_fn_c_check_decl "$LINENO" "NID_secp384r1" "ac_cv_have_decl_NID_secp384r1" "$ac_includes_default
19026#include <openssl/evp.h>
19027
19028"
19029if test "x$ac_cv_have_decl_NID_secp384r1" = xyes; then :
19030  ac_have_decl=1
19031else
19032  ac_have_decl=0
19033fi
19034
19035cat >>confdefs.h <<_ACEOF
19036#define HAVE_DECL_NID_SECP384R1 $ac_have_decl
19037_ACEOF
19038if test $ac_have_decl = 1; then :
19039
19040else
19041  as_fn_error $? "OpenSSL does not support the ECDSA curves: please upgrade or rerun with --disable-ecdsa" "$LINENO" 5
19042fi
19043
19044	      # see if OPENSSL 1.0.0 or later (has EVP MD and Verify independency)
19045	      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if openssl supports SHA2 and ECDSA with EVP" >&5
19046$as_echo_n "checking if openssl supports SHA2 and ECDSA with EVP... " >&6; }
19047	      if grep OPENSSL_VERSION_TEXT $ssldir_include/openssl/opensslv.h | grep "OpenSSL" >/dev/null; then
19048		if grep OPENSSL_VERSION_NUMBER $ssldir_include/openssl/opensslv.h | grep 0x0 >/dev/null; then
19049		  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19050$as_echo "no" >&6; }
19051
19052cat >>confdefs.h <<_ACEOF
19053#define USE_ECDSA_EVP_WORKAROUND 1
19054_ACEOF
19055
19056		else
19057		  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19058$as_echo "yes" >&6; }
19059		fi
19060	      else
19061		# not OpenSSL, thus likely LibreSSL, which supports it
19062		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19063$as_echo "yes" >&6; }
19064	      fi
19065      fi
19066      # we now know we have ECDSA and the required curves.
19067
19068cat >>confdefs.h <<_ACEOF
19069#define USE_ECDSA 1
19070_ACEOF
19071
19072      use_ecdsa="yes"
19073      ;;
19074esac
19075
19076# Check whether --enable-dsa was given.
19077if test "${enable_dsa+set}" = set; then :
19078  enableval=$enable_dsa;
19079fi
19080
19081use_dsa="no"
19082case "$enable_dsa" in
19083    yes)
19084      # detect if DSA is supported, and turn it off if not.
19085      if test $USE_NSS = "no" -a $USE_NETTLE = "no"; then
19086      ac_fn_c_check_func "$LINENO" "DSA_SIG_new" "ac_cv_func_DSA_SIG_new"
19087if test "x$ac_cv_func_DSA_SIG_new" = xyes; then :
19088
19089      as_ac_Type=`$as_echo "ac_cv_type_DSA_SIG*" | $as_tr_sh`
19090ac_fn_c_check_type "$LINENO" "DSA_SIG*" "$as_ac_Type" "
19091$ac_includes_default
19092#ifdef HAVE_OPENSSL_ERR_H
19093#include <openssl/err.h>
19094#endif
19095
19096#ifdef HAVE_OPENSSL_RAND_H
19097#include <openssl/rand.h>
19098#endif
19099
19100#ifdef HAVE_OPENSSL_CONF_H
19101#include <openssl/conf.h>
19102#endif
19103
19104#ifdef HAVE_OPENSSL_ENGINE_H
19105#include <openssl/engine.h>
19106#endif
19107
19108"
19109if eval test \"x\$"$as_ac_Type"\" = x"yes"; then :
19110
19111
19112cat >>confdefs.h <<_ACEOF
19113#define USE_DSA 1
19114_ACEOF
19115
19116
19117else
19118  if test "x$enable_dsa" = "xyes"; then as_fn_error $? "OpenSSL does not support DSA and you used --enable-dsa." "$LINENO" 5
19119               fi
19120fi
19121
19122
19123else
19124  if test "x$enable_dsa" = "xyes"; then as_fn_error $? "OpenSSL does not support DSA and you used --enable-dsa." "$LINENO" 5
19125               fi
19126fi
19127
19128      else
19129
19130cat >>confdefs.h <<_ACEOF
19131#define USE_DSA 1
19132_ACEOF
19133
19134      fi
19135      ;;
19136    *)
19137      # disable dsa by default, RFC 8624 section 3.1, validators MUST NOT
19138      # support DSA for DNSSEC Validation.
19139      ;;
19140esac
19141
19142
19143# Check whether --with-deprecate-rsa-1024 was given.
19144if test "${with_deprecate_rsa_1024+set}" = set; then :
19145  withval=$with_deprecate_rsa_1024;
19146fi
19147
19148if test "$with_deprecate_rsa_1024" = "yes"; then
19149
19150$as_echo "#define DEPRECATE_RSA_1024 1" >>confdefs.h
19151
19152fi
19153
19154# Check whether --enable-ed25519 was given.
19155if test "${enable_ed25519+set}" = set; then :
19156  enableval=$enable_ed25519;
19157fi
19158
19159use_ed25519="no"
19160case "$enable_ed25519" in
19161    no)
19162      ;;
19163    *)
19164      if test $USE_NSS = "no" -a $USE_NETTLE = "no"; then
19165	      ac_fn_c_check_decl "$LINENO" "NID_ED25519" "ac_cv_have_decl_NID_ED25519" "$ac_includes_default
19166#include <openssl/evp.h>
19167
19168"
19169if test "x$ac_cv_have_decl_NID_ED25519" = xyes; then :
19170  ac_have_decl=1
19171else
19172  ac_have_decl=0
19173fi
19174
19175cat >>confdefs.h <<_ACEOF
19176#define HAVE_DECL_NID_ED25519 $ac_have_decl
19177_ACEOF
19178if test $ac_have_decl = 1; then :
19179
19180      		use_ed25519="yes"
19181
19182else
19183   if test "x$enable_ed25519" = "xyes"; then as_fn_error $? "OpenSSL does not support ED25519 and you used --enable-ed25519." "$LINENO" 5
19184	      	fi
19185fi
19186
19187      fi
19188      if test $USE_NETTLE = "yes"; then
19189		for ac_header in nettle/eddsa.h
19190do :
19191  ac_fn_c_check_header_compile "$LINENO" "nettle/eddsa.h" "ac_cv_header_nettle_eddsa_h" "$ac_includes_default
19192"
19193if test "x$ac_cv_header_nettle_eddsa_h" = xyes; then :
19194  cat >>confdefs.h <<_ACEOF
19195#define HAVE_NETTLE_EDDSA_H 1
19196_ACEOF
19197 use_ed25519="yes"
19198fi
19199
19200done
19201
19202      fi
19203      if test $use_ed25519 = "yes"; then
19204
19205cat >>confdefs.h <<_ACEOF
19206#define USE_ED25519 1
19207_ACEOF
19208
19209      fi
19210      ;;
19211esac
19212
19213# Check whether --enable-ed448 was given.
19214if test "${enable_ed448+set}" = set; then :
19215  enableval=$enable_ed448;
19216fi
19217
19218use_ed448="no"
19219case "$enable_ed448" in
19220    no)
19221      ;;
19222    *)
19223      if test $USE_NSS = "no" -a $USE_NETTLE = "no"; then
19224	      ac_fn_c_check_decl "$LINENO" "NID_ED448" "ac_cv_have_decl_NID_ED448" "$ac_includes_default
19225#include <openssl/evp.h>
19226
19227"
19228if test "x$ac_cv_have_decl_NID_ED448" = xyes; then :
19229  ac_have_decl=1
19230else
19231  ac_have_decl=0
19232fi
19233
19234cat >>confdefs.h <<_ACEOF
19235#define HAVE_DECL_NID_ED448 $ac_have_decl
19236_ACEOF
19237if test $ac_have_decl = 1; then :
19238
19239      		use_ed448="yes"
19240
19241else
19242   if test "x$enable_ed448" = "xyes"; then as_fn_error $? "OpenSSL does not support ED448 and you used --enable-ed448." "$LINENO" 5
19243	      	fi
19244fi
19245
19246      fi
19247      if test $use_ed448 = "yes"; then
19248
19249cat >>confdefs.h <<_ACEOF
19250#define USE_ED448 1
19251_ACEOF
19252
19253      fi
19254      ;;
19255esac
19256
19257# Check whether --enable-event-api was given.
19258if test "${enable_event_api+set}" = set; then :
19259  enableval=$enable_event_api;
19260fi
19261
19262case "$enable_event_api" in
19263    yes)
19264      UNBOUND_EVENT_INSTALL=unbound-event-install
19265
19266      UNBOUND_EVENT_UNINSTALL=unbound-event-uninstall
19267
19268      ;;
19269    *)
19270      ;;
19271esac
19272
19273# Check whether --enable-tfo-client was given.
19274if test "${enable_tfo_client+set}" = set; then :
19275  enableval=$enable_tfo_client;
19276fi
19277
19278case "$enable_tfo_client" in
19279	yes)
19280		case "$host_os" in
19281			linux*) ac_fn_c_check_decl "$LINENO" "MSG_FASTOPEN" "ac_cv_have_decl_MSG_FASTOPEN" "$ac_includes_default
19282#include <netinet/tcp.h>
19283
19284"
19285if test "x$ac_cv_have_decl_MSG_FASTOPEN" = xyes; then :
19286  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Check the platform specific TFO kernel parameters are correctly configured to support client mode TFO" >&5
19287$as_echo "$as_me: WARNING: Check the platform specific TFO kernel parameters are correctly configured to support client mode TFO" >&2;}
19288else
19289  as_fn_error $? "TCP Fast Open is not available for client mode: please rerun without --enable-tfo-client" "$LINENO" 5
19290fi
19291
19292
19293cat >>confdefs.h <<_ACEOF
19294#define USE_MSG_FASTOPEN 1
19295_ACEOF
19296
19297				;;
19298			darwin*) ac_fn_c_check_decl "$LINENO" "CONNECT_RESUME_ON_READ_WRITE" "ac_cv_have_decl_CONNECT_RESUME_ON_READ_WRITE" "$ac_includes_default
19299#include <sys/socket.h>
19300
19301"
19302if test "x$ac_cv_have_decl_CONNECT_RESUME_ON_READ_WRITE" = xyes; then :
19303  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Check the platform specific TFO kernel parameters are correctly configured to support client mode TFO" >&5
19304$as_echo "$as_me: WARNING: Check the platform specific TFO kernel parameters are correctly configured to support client mode TFO" >&2;}
19305else
19306  as_fn_error $? "TCP Fast Open is not available for client mode: please rerun without --enable-tfo-client" "$LINENO" 5
19307fi
19308
19309
19310cat >>confdefs.h <<_ACEOF
19311#define USE_OSX_MSG_FASTOPEN 1
19312_ACEOF
19313
19314				;;
19315		esac
19316		;;
19317	no|*)
19318		;;
19319esac
19320
19321# Check whether --enable-tfo-server was given.
19322if test "${enable_tfo_server+set}" = set; then :
19323  enableval=$enable_tfo_server;
19324fi
19325
19326case "$enable_tfo_server" in
19327	yes)
19328	      ac_fn_c_check_decl "$LINENO" "TCP_FASTOPEN" "ac_cv_have_decl_TCP_FASTOPEN" "$ac_includes_default
19329#include <netinet/tcp.h>
19330
19331"
19332if test "x$ac_cv_have_decl_TCP_FASTOPEN" = xyes; then :
19333  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Check the platform specific TFO kernel parameters are correctly configured to support server mode TFO" >&5
19334$as_echo "$as_me: WARNING: Check the platform specific TFO kernel parameters are correctly configured to support server mode TFO" >&2;}
19335else
19336  as_fn_error $? "TCP Fast Open is not available for server mode: please rerun without --enable-tfo-server" "$LINENO" 5
19337fi
19338
19339
19340cat >>confdefs.h <<_ACEOF
19341#define USE_TCP_FASTOPEN 1
19342_ACEOF
19343
19344		;;
19345	no|*)
19346		;;
19347esac
19348
19349# check for libevent
19350
19351# Check whether --with-libevent was given.
19352if test "${with_libevent+set}" = set; then :
19353  withval=$with_libevent;
19354else
19355   with_libevent="no"
19356fi
19357
19358if test "x_$with_libevent" != x_no; then
19359
19360$as_echo "#define USE_LIBEVENT 1" >>confdefs.h
19361
19362        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libevent" >&5
19363$as_echo_n "checking for libevent... " >&6; }
19364        if test "x_$with_libevent" = x_ -o "x_$with_libevent" = x_yes; then
19365            with_libevent="/usr/local /opt/local /usr/lib /usr/pkg /usr/sfw /usr"
19366        fi
19367        for dir in $with_libevent; do
19368            thedir="$dir"
19369            if test -f "$dir/include/event.h" -o -f "$dir/include/event2/event.h"; then
19370                found_libevent="yes"
19371								if test "$thedir" != "/usr"; then
19372				    CPPFLAGS="$CPPFLAGS -I$thedir/include"
19373				fi
19374				break;
19375		    fi
19376        done
19377        if test x_$found_libevent != x_yes; then
19378		if test -f "$dir/event.h" -a \( -f "$dir/libevent.la" -o -f "$dir/libev.la" \) ; then
19379			# libevent source directory
19380			{ $as_echo "$as_me:${as_lineno-$LINENO}: result: found in $thedir" >&5
19381$as_echo "found in $thedir" >&6; }
19382			CPPFLAGS="$CPPFLAGS -I$thedir -I$thedir/include"
19383			BAK_LDFLAGS_SET="1"
19384			BAK_LDFLAGS="$LDFLAGS"
19385			# remove evdns from linking
19386			mkdir build >/dev/null 2>&1
19387			mkdir build/libevent >/dev/null 2>&1
19388			mkdir build/libevent/.libs >/dev/null 2>&1
19389			ev_files_o=`ls $thedir/*.o | grep -v evdns\.o | grep -v bufferevent_openssl\.o`
19390			ev_files_lo=`ls $thedir/*.lo | grep -v evdns\.lo | grep -v bufferevent_openssl\.lo`
19391			ev_files_libso=`ls $thedir/.libs/*.o | grep -v evdns\.o | grep -v bufferevent_openssl\.o`
19392			cp $ev_files_o build/libevent
19393			cp $ev_files_lo build/libevent
19394			cp $ev_files_libso build/libevent/.libs
19395			LATE_LDFLAGS="build/libevent/*.lo -lm"
19396			LDFLAGS="build/libevent/*.o $LDFLAGS -lm"
19397		else
19398            as_fn_error $? "Cannot find the libevent library in $with_libevent
19399You can restart ./configure --with-libevent=no to use a builtin alternative.
19400Please note that this alternative is not as capable as libevent when using
19401large outgoing port ranges.  " "$LINENO" 5
19402		fi
19403        else
19404            { $as_echo "$as_me:${as_lineno-$LINENO}: result: found in $thedir" >&5
19405$as_echo "found in $thedir" >&6; }
19406	    	    if test ! -f $thedir/lib/libevent.a -a ! -f $thedir/lib/libevent.so -a -d "$thedir/lib/event2"; then
19407		    LDFLAGS="$LDFLAGS -L$thedir/lib/event2"
19408
19409	if test "x$enable_rpath" = xyes; then
19410		if echo "$thedir/lib/event2" | grep "^/" >/dev/null; then
19411			RUNTIME_PATH="$RUNTIME_PATH -R$thedir/lib/event2"
19412		fi
19413	fi
19414
19415	    else
19416		    		    if test "$thedir" != "/usr" -a "$thedir" != ""; then
19417			LDFLAGS="$LDFLAGS -L$thedir/lib"
19418
19419	if test "x$enable_rpath" = xyes; then
19420		if echo "$thedir/lib" | grep "^/" >/dev/null; then
19421			RUNTIME_PATH="$RUNTIME_PATH -R$thedir/lib"
19422		fi
19423	fi
19424
19425		    fi
19426	    fi
19427        fi
19428	# check for library used by libevent after 1.3c
19429	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5
19430$as_echo_n "checking for library containing clock_gettime... " >&6; }
19431if ${ac_cv_search_clock_gettime+:} false; then :
19432  $as_echo_n "(cached) " >&6
19433else
19434  ac_func_search_save_LIBS=$LIBS
19435cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19436/* end confdefs.h.  */
19437
19438/* Override any GCC internal prototype to avoid an error.
19439   Use char because int might match the return type of a GCC
19440   builtin and then its argument prototype would still apply.  */
19441#ifdef __cplusplus
19442extern "C"
19443#endif
19444char clock_gettime ();
19445int
19446main ()
19447{
19448return clock_gettime ();
19449  ;
19450  return 0;
19451}
19452_ACEOF
19453for ac_lib in '' rt; do
19454  if test -z "$ac_lib"; then
19455    ac_res="none required"
19456  else
19457    ac_res=-l$ac_lib
19458    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
19459  fi
19460  if ac_fn_c_try_link "$LINENO"; then :
19461  ac_cv_search_clock_gettime=$ac_res
19462fi
19463rm -f core conftest.err conftest.$ac_objext \
19464    conftest$ac_exeext
19465  if ${ac_cv_search_clock_gettime+:} false; then :
19466  break
19467fi
19468done
19469if ${ac_cv_search_clock_gettime+:} false; then :
19470
19471else
19472  ac_cv_search_clock_gettime=no
19473fi
19474rm conftest.$ac_ext
19475LIBS=$ac_func_search_save_LIBS
19476fi
19477{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5
19478$as_echo "$ac_cv_search_clock_gettime" >&6; }
19479ac_res=$ac_cv_search_clock_gettime
19480if test "$ac_res" != no; then :
19481  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
19482
19483fi
19484
19485
19486	# is the event.h header libev or libevent?
19487	for ac_header in event.h
19488do :
19489  ac_fn_c_check_header_compile "$LINENO" "event.h" "ac_cv_header_event_h" "$ac_includes_default
19490"
19491if test "x$ac_cv_header_event_h" = xyes; then :
19492  cat >>confdefs.h <<_ACEOF
19493#define HAVE_EVENT_H 1
19494_ACEOF
19495
19496fi
19497
19498done
19499
19500	ac_fn_c_check_decl "$LINENO" "EV_VERSION_MAJOR" "ac_cv_have_decl_EV_VERSION_MAJOR" "$ac_includes_default
19501#include <event.h>
19502
19503"
19504if test "x$ac_cv_have_decl_EV_VERSION_MAJOR" = xyes; then :
19505
19506		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing event_set" >&5
19507$as_echo_n "checking for library containing event_set... " >&6; }
19508if ${ac_cv_search_event_set+:} false; then :
19509  $as_echo_n "(cached) " >&6
19510else
19511  ac_func_search_save_LIBS=$LIBS
19512cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19513/* end confdefs.h.  */
19514
19515/* Override any GCC internal prototype to avoid an error.
19516   Use char because int might match the return type of a GCC
19517   builtin and then its argument prototype would still apply.  */
19518#ifdef __cplusplus
19519extern "C"
19520#endif
19521char event_set ();
19522int
19523main ()
19524{
19525return event_set ();
19526  ;
19527  return 0;
19528}
19529_ACEOF
19530for ac_lib in '' ev; do
19531  if test -z "$ac_lib"; then
19532    ac_res="none required"
19533  else
19534    ac_res=-l$ac_lib
19535    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
19536  fi
19537  if ac_fn_c_try_link "$LINENO"; then :
19538  ac_cv_search_event_set=$ac_res
19539fi
19540rm -f core conftest.err conftest.$ac_objext \
19541    conftest$ac_exeext
19542  if ${ac_cv_search_event_set+:} false; then :
19543  break
19544fi
19545done
19546if ${ac_cv_search_event_set+:} false; then :
19547
19548else
19549  ac_cv_search_event_set=no
19550fi
19551rm conftest.$ac_ext
19552LIBS=$ac_func_search_save_LIBS
19553fi
19554{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_event_set" >&5
19555$as_echo "$ac_cv_search_event_set" >&6; }
19556ac_res=$ac_cv_search_event_set
19557if test "$ac_res" != no; then :
19558  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
19559
19560fi
19561
19562
19563else
19564
19565		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing event_set" >&5
19566$as_echo_n "checking for library containing event_set... " >&6; }
19567if ${ac_cv_search_event_set+:} false; then :
19568  $as_echo_n "(cached) " >&6
19569else
19570  ac_func_search_save_LIBS=$LIBS
19571cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19572/* end confdefs.h.  */
19573
19574/* Override any GCC internal prototype to avoid an error.
19575   Use char because int might match the return type of a GCC
19576   builtin and then its argument prototype would still apply.  */
19577#ifdef __cplusplus
19578extern "C"
19579#endif
19580char event_set ();
19581int
19582main ()
19583{
19584return event_set ();
19585  ;
19586  return 0;
19587}
19588_ACEOF
19589for ac_lib in '' event; do
19590  if test -z "$ac_lib"; then
19591    ac_res="none required"
19592  else
19593    ac_res=-l$ac_lib
19594    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
19595  fi
19596  if ac_fn_c_try_link "$LINENO"; then :
19597  ac_cv_search_event_set=$ac_res
19598fi
19599rm -f core conftest.err conftest.$ac_objext \
19600    conftest$ac_exeext
19601  if ${ac_cv_search_event_set+:} false; then :
19602  break
19603fi
19604done
19605if ${ac_cv_search_event_set+:} false; then :
19606
19607else
19608  ac_cv_search_event_set=no
19609fi
19610rm conftest.$ac_ext
19611LIBS=$ac_func_search_save_LIBS
19612fi
19613{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_event_set" >&5
19614$as_echo "$ac_cv_search_event_set" >&6; }
19615ac_res=$ac_cv_search_event_set
19616if test "$ac_res" != no; then :
19617  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
19618
19619fi
19620
19621
19622fi
19623
19624	for ac_func in event_base_free
19625do :
19626  ac_fn_c_check_func "$LINENO" "event_base_free" "ac_cv_func_event_base_free"
19627if test "x$ac_cv_func_event_base_free" = xyes; then :
19628  cat >>confdefs.h <<_ACEOF
19629#define HAVE_EVENT_BASE_FREE 1
19630_ACEOF
19631
19632fi
19633done
19634 # only in libevent 1.2 and later
19635	for ac_func in event_base_once
19636do :
19637  ac_fn_c_check_func "$LINENO" "event_base_once" "ac_cv_func_event_base_once"
19638if test "x$ac_cv_func_event_base_once" = xyes; then :
19639  cat >>confdefs.h <<_ACEOF
19640#define HAVE_EVENT_BASE_ONCE 1
19641_ACEOF
19642
19643fi
19644done
19645 # only in libevent 1.4.1 and later
19646	for ac_func in event_base_new
19647do :
19648  ac_fn_c_check_func "$LINENO" "event_base_new" "ac_cv_func_event_base_new"
19649if test "x$ac_cv_func_event_base_new" = xyes; then :
19650  cat >>confdefs.h <<_ACEOF
19651#define HAVE_EVENT_BASE_NEW 1
19652_ACEOF
19653
19654fi
19655done
19656 # only in libevent 1.4.1 and later
19657	for ac_func in event_base_get_method
19658do :
19659  ac_fn_c_check_func "$LINENO" "event_base_get_method" "ac_cv_func_event_base_get_method"
19660if test "x$ac_cv_func_event_base_get_method" = xyes; then :
19661  cat >>confdefs.h <<_ACEOF
19662#define HAVE_EVENT_BASE_GET_METHOD 1
19663_ACEOF
19664
19665fi
19666done
19667 # only in libevent 1.4.3 and later
19668	for ac_func in ev_loop
19669do :
19670  ac_fn_c_check_func "$LINENO" "ev_loop" "ac_cv_func_ev_loop"
19671if test "x$ac_cv_func_ev_loop" = xyes; then :
19672  cat >>confdefs.h <<_ACEOF
19673#define HAVE_EV_LOOP 1
19674_ACEOF
19675
19676fi
19677done
19678 # only in libev. (tested on 3.51)
19679	for ac_func in ev_default_loop
19680do :
19681  ac_fn_c_check_func "$LINENO" "ev_default_loop" "ac_cv_func_ev_default_loop"
19682if test "x$ac_cv_func_ev_default_loop" = xyes; then :
19683  cat >>confdefs.h <<_ACEOF
19684#define HAVE_EV_DEFAULT_LOOP 1
19685_ACEOF
19686
19687fi
19688done
19689 # only in libev. (tested on 4.00)
19690	for ac_func in event_assign
19691do :
19692  ac_fn_c_check_func "$LINENO" "event_assign" "ac_cv_func_event_assign"
19693if test "x$ac_cv_func_event_assign" = xyes; then :
19694  cat >>confdefs.h <<_ACEOF
19695#define HAVE_EVENT_ASSIGN 1
19696_ACEOF
19697
19698fi
19699done
19700 # in libevent, for thread-safety
19701	ac_fn_c_check_decl "$LINENO" "evsignal_assign" "ac_cv_have_decl_evsignal_assign" "$ac_includes_default
19702#ifdef HAVE_EVENT_H
19703#  include <event.h>
19704#else
19705#  include \"event2/event.h\"
19706#endif
19707
19708"
19709if test "x$ac_cv_have_decl_evsignal_assign" = xyes; then :
19710  ac_have_decl=1
19711else
19712  ac_have_decl=0
19713fi
19714
19715cat >>confdefs.h <<_ACEOF
19716#define HAVE_DECL_EVSIGNAL_ASSIGN $ac_have_decl
19717_ACEOF
19718
19719        PC_LIBEVENT_DEPENDENCY="libevent"
19720
19721	if test -n "$BAK_LDFLAGS_SET"; then
19722		LDFLAGS="$BAK_LDFLAGS"
19723	fi
19724else
19725
19726$as_echo "#define USE_MINI_EVENT 1" >>confdefs.h
19727
19728fi
19729
19730# check for libexpat
19731
19732# Check whether --with-libexpat was given.
19733if test "${with_libexpat+set}" = set; then :
19734  withval=$with_libexpat;
19735else
19736   withval="/usr/local /opt/local /usr/lib /usr/pkg /usr/sfw /usr"
19737fi
19738
19739{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for libexpat" >&5
19740$as_echo_n "checking for libexpat... " >&6; }
19741found_libexpat="no"
19742for dir in $withval ; do
19743            if test -f "$dir/include/expat.h"; then
19744		found_libexpat="yes"
19745				if test "$dir" != "/usr"; then
19746                    CPPFLAGS="$CPPFLAGS -I$dir/include"
19747		    LDFLAGS="$LDFLAGS -L$dir/lib"
19748		fi
19749            	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: found in $dir" >&5
19750$as_echo "found in $dir" >&6; }
19751                break;
19752            fi
19753done
19754if test x_$found_libexpat != x_yes; then
19755	as_fn_error $? "Could not find libexpat, expat.h" "$LINENO" 5
19756fi
19757for ac_header in expat.h
19758do :
19759  ac_fn_c_check_header_compile "$LINENO" "expat.h" "ac_cv_header_expat_h" "$ac_includes_default
19760"
19761if test "x$ac_cv_header_expat_h" = xyes; then :
19762  cat >>confdefs.h <<_ACEOF
19763#define HAVE_EXPAT_H 1
19764_ACEOF
19765
19766fi
19767
19768done
19769
19770ac_fn_c_check_decl "$LINENO" "XML_StopParser" "ac_cv_have_decl_XML_StopParser" "$ac_includes_default
19771#include <expat.h>
19772
19773"
19774if test "x$ac_cv_have_decl_XML_StopParser" = xyes; then :
19775  ac_have_decl=1
19776else
19777  ac_have_decl=0
19778fi
19779
19780cat >>confdefs.h <<_ACEOF
19781#define HAVE_DECL_XML_STOPPARSER $ac_have_decl
19782_ACEOF
19783
19784
19785# hiredis (redis C client for cachedb)
19786
19787# Check whether --with-libhiredis was given.
19788if test "${with_libhiredis+set}" = set; then :
19789  withval=$with_libhiredis;
19790else
19791   withval="no"
19792fi
19793
19794found_libhiredis="no"
19795if test x_$withval = x_yes -o x_$withval != x_no; then
19796   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libhiredis" >&5
19797$as_echo_n "checking for libhiredis... " >&6; }
19798   if test x_$withval = x_ -o x_$withval = x_yes; then
19799            withval="/usr/local /opt/local /usr/lib /usr/pkg /usr/sfw /usr"
19800   fi
19801   for dir in $withval ; do
19802            if test -f "$dir/include/hiredis/hiredis.h"; then
19803		found_libhiredis="yes"
19804				if test "$dir" != "/usr"; then
19805                    CPPFLAGS="$CPPFLAGS -I$dir/include"
19806		    LDFLAGS="$LDFLAGS -L$dir/lib"
19807		fi
19808		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: found in $dir" >&5
19809$as_echo "found in $dir" >&6; }
19810
19811$as_echo "#define USE_REDIS 1" >>confdefs.h
19812
19813		LIBS="$LIBS -lhiredis"
19814                break;
19815            fi
19816    done
19817    if test x_$found_libhiredis != x_yes; then
19818	as_fn_error $? "Could not find libhiredis, hiredis.h" "$LINENO" 5
19819    fi
19820    for ac_header in hiredis/hiredis.h
19821do :
19822  ac_fn_c_check_header_compile "$LINENO" "hiredis/hiredis.h" "ac_cv_header_hiredis_hiredis_h" "$ac_includes_default
19823"
19824if test "x$ac_cv_header_hiredis_hiredis_h" = xyes; then :
19825  cat >>confdefs.h <<_ACEOF
19826#define HAVE_HIREDIS_HIREDIS_H 1
19827_ACEOF
19828
19829fi
19830
19831done
19832
19833    ac_fn_c_check_decl "$LINENO" "redisConnect" "ac_cv_have_decl_redisConnect" "$ac_includes_default
19834    #include <hiredis/hiredis.h>
19835
19836"
19837if test "x$ac_cv_have_decl_redisConnect" = xyes; then :
19838  ac_have_decl=1
19839else
19840  ac_have_decl=0
19841fi
19842
19843cat >>confdefs.h <<_ACEOF
19844#define HAVE_DECL_REDISCONNECT $ac_have_decl
19845_ACEOF
19846
19847fi
19848
19849# nghttp2
19850
19851# Check whether --with-libnghttp2 was given.
19852if test "${with_libnghttp2+set}" = set; then :
19853  withval=$with_libnghttp2;
19854else
19855   withval="no"
19856fi
19857
19858found_libnghttp2="no"
19859if test x_$withval = x_yes -o x_$withval != x_no; then
19860   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libnghttp2" >&5
19861$as_echo_n "checking for libnghttp2... " >&6; }
19862   if test x_$withval = x_ -o x_$withval = x_yes; then
19863            withval="/usr/local /opt/local /usr/lib /usr/pkg /usr/sfw /usr"
19864   fi
19865   for dir in $withval ; do
19866            if test -f "$dir/include/nghttp2/nghttp2.h"; then
19867		found_libnghttp2="yes"
19868				if test "$dir" != "/usr"; then
19869                    CPPFLAGS="$CPPFLAGS -I$dir/include"
19870		    LDFLAGS="$LDFLAGS -L$dir/lib"
19871		fi
19872		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: found in $dir" >&5
19873$as_echo "found in $dir" >&6; }
19874
19875$as_echo "#define HAVE_NGHTTP2 1" >>confdefs.h
19876
19877		LIBS="$LIBS -lnghttp2"
19878                break;
19879            fi
19880    done
19881    if test x_$found_libnghttp2 != x_yes; then
19882	as_fn_error $? "Could not find libnghttp2, nghttp2.h" "$LINENO" 5
19883    fi
19884    for ac_header in nghttp2/nghttp2.h
19885do :
19886  ac_fn_c_check_header_compile "$LINENO" "nghttp2/nghttp2.h" "ac_cv_header_nghttp2_nghttp2_h" "$ac_includes_default
19887"
19888if test "x$ac_cv_header_nghttp2_nghttp2_h" = xyes; then :
19889  cat >>confdefs.h <<_ACEOF
19890#define HAVE_NGHTTP2_NGHTTP2_H 1
19891_ACEOF
19892
19893fi
19894
19895done
19896
19897    ac_fn_c_check_decl "$LINENO" "nghttp2_session_server_new" "ac_cv_have_decl_nghttp2_session_server_new" "$ac_includes_default
19898    #include <nghttp2/nghttp2.h>
19899
19900"
19901if test "x$ac_cv_have_decl_nghttp2_session_server_new" = xyes; then :
19902  ac_have_decl=1
19903else
19904  ac_have_decl=0
19905fi
19906
19907cat >>confdefs.h <<_ACEOF
19908#define HAVE_DECL_NGHTTP2_SESSION_SERVER_NEW $ac_have_decl
19909_ACEOF
19910
19911fi
19912
19913# set static linking for uninstalled libraries if requested
19914
19915staticexe=""
19916# Check whether --enable-static-exe was given.
19917if test "${enable_static_exe+set}" = set; then :
19918  enableval=$enable_static_exe;
19919fi
19920
19921if test x_$enable_static_exe = x_yes; then
19922	staticexe="-static"
19923	if test "$on_mingw" = yes; then
19924		staticexe="-all-static"
19925		# for static compile, include gdi32 and zlib here.
19926		if echo $LIBS | grep 'lgdi32' >/dev/null; then
19927			:
19928		else
19929			LIBS="$LIBS -lgdi32"
19930		fi
19931		LIBS="$LIBS -lz"
19932		LIBS="$LIBS -l:libssp.a"
19933	fi
19934fi
19935
19936# set full static linking if requested
19937# Check whether --enable-fully-static was given.
19938if test "${enable_fully_static+set}" = set; then :
19939  enableval=$enable_fully_static;
19940fi
19941
19942if test x_$enable_fully_static = x_yes; then
19943	staticexe="-all-static"
19944	if test "$on_mingw" = yes; then
19945		# for static compile, include gdi32 and zlib here.
19946		if echo $LIBS | grep 'lgdi32' >/dev/null; then
19947			:
19948		else
19949			LIBS="$LIBS -lgdi32"
19950		fi
19951		LIBS="$LIBS -lz"
19952		LIBS="$LIBS -l:libssp.a"
19953	fi
19954fi
19955
19956# set lock checking if requested
19957# Check whether --enable-lock_checks was given.
19958if test "${enable_lock_checks+set}" = set; then :
19959  enableval=$enable_lock_checks;
19960fi
19961
19962if test x_$enable_lock_checks = x_yes; then
19963
19964$as_echo "#define ENABLE_LOCK_CHECKS 1" >>confdefs.h
19965
19966	CHECKLOCK_OBJ="checklocks.lo"
19967
19968fi
19969
19970
19971{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
19972$as_echo_n "checking for getaddrinfo... " >&6; }
19973ac_cv_func_getaddrinfo=no
19974cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19975/* end confdefs.h.  */
19976
19977#ifdef __cplusplus
19978extern "C"
19979{
19980#endif
19981char* getaddrinfo();
19982char* (*f) () = getaddrinfo;
19983#ifdef __cplusplus
19984}
19985#endif
19986int main() {
19987        ;
19988        return 0;
19989}
19990
19991_ACEOF
19992if ac_fn_c_try_link "$LINENO"; then :
19993  ac_cv_func_getaddrinfo="yes"
19994if test "$ac_cv_header_windows_h" = "yes"; then
19995
19996$as_echo "#define USE_WINSOCK 1" >>confdefs.h
19997
19998	USE_WINSOCK="1"
19999	if echo $LIBS | grep 'lws2_32' >/dev/null; then
20000		:
20001	else
20002		LIBS="$LIBS -lws2_32"
20003	fi
20004fi
20005
20006else
20007  ORIGLIBS="$LIBS"
20008LIBS="$LIBS -lws2_32"
20009cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20010/* end confdefs.h.  */
20011
20012#ifdef HAVE_WS2TCPIP_H
20013#include <ws2tcpip.h>
20014#endif
20015
20016int
20017main ()
20018{
20019
20020        (void)getaddrinfo(NULL, NULL, NULL, NULL);
20021
20022
20023  ;
20024  return 0;
20025}
20026_ACEOF
20027if ac_fn_c_try_link "$LINENO"; then :
20028
20029ac_cv_func_getaddrinfo="yes"
20030
20031$as_echo "#define USE_WINSOCK 1" >>confdefs.h
20032
20033USE_WINSOCK="1"
20034
20035else
20036
20037ac_cv_func_getaddrinfo="no"
20038LIBS="$ORIGLIBS"
20039
20040fi
20041rm -f core conftest.err conftest.$ac_objext \
20042    conftest$ac_exeext conftest.$ac_ext
20043
20044fi
20045rm -f core conftest.err conftest.$ac_objext \
20046    conftest$ac_exeext conftest.$ac_ext
20047
20048{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_getaddrinfo" >&5
20049$as_echo "$ac_cv_func_getaddrinfo" >&6; }
20050if test $ac_cv_func_getaddrinfo = yes; then
20051
20052$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
20053
20054fi
20055
20056if test "$USE_WINSOCK" = 1; then
20057
20058$as_echo "#define UB_ON_WINDOWS 1" >>confdefs.h
20059
20060	for ac_header in iphlpapi.h
20061do :
20062  ac_fn_c_check_header_compile "$LINENO" "iphlpapi.h" "ac_cv_header_iphlpapi_h" "$ac_includes_default
20063#include <windows.h>
20064
20065"
20066if test "x$ac_cv_header_iphlpapi_h" = xyes; then :
20067  cat >>confdefs.h <<_ACEOF
20068#define HAVE_IPHLPAPI_H 1
20069_ACEOF
20070
20071fi
20072
20073done
20074
20075	if test -n "$ac_tool_prefix"; then
20076  # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
20077set dummy ${ac_tool_prefix}windres; ac_word=$2
20078{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20079$as_echo_n "checking for $ac_word... " >&6; }
20080if ${ac_cv_prog_WINDRES+:} false; then :
20081  $as_echo_n "(cached) " >&6
20082else
20083  if test -n "$WINDRES"; then
20084  ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
20085else
20086as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20087for as_dir in $PATH
20088do
20089  IFS=$as_save_IFS
20090  test -z "$as_dir" && as_dir=.
20091    for ac_exec_ext in '' $ac_executable_extensions; do
20092  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20093    ac_cv_prog_WINDRES="${ac_tool_prefix}windres"
20094    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20095    break 2
20096  fi
20097done
20098  done
20099IFS=$as_save_IFS
20100
20101fi
20102fi
20103WINDRES=$ac_cv_prog_WINDRES
20104if test -n "$WINDRES"; then
20105  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINDRES" >&5
20106$as_echo "$WINDRES" >&6; }
20107else
20108  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20109$as_echo "no" >&6; }
20110fi
20111
20112
20113fi
20114if test -z "$ac_cv_prog_WINDRES"; then
20115  ac_ct_WINDRES=$WINDRES
20116  # Extract the first word of "windres", so it can be a program name with args.
20117set dummy windres; ac_word=$2
20118{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20119$as_echo_n "checking for $ac_word... " >&6; }
20120if ${ac_cv_prog_ac_ct_WINDRES+:} false; then :
20121  $as_echo_n "(cached) " >&6
20122else
20123  if test -n "$ac_ct_WINDRES"; then
20124  ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # Let the user override the test.
20125else
20126as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20127for as_dir in $PATH
20128do
20129  IFS=$as_save_IFS
20130  test -z "$as_dir" && as_dir=.
20131    for ac_exec_ext in '' $ac_executable_extensions; do
20132  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20133    ac_cv_prog_ac_ct_WINDRES="windres"
20134    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20135    break 2
20136  fi
20137done
20138  done
20139IFS=$as_save_IFS
20140
20141fi
20142fi
20143ac_ct_WINDRES=$ac_cv_prog_ac_ct_WINDRES
20144if test -n "$ac_ct_WINDRES"; then
20145  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_WINDRES" >&5
20146$as_echo "$ac_ct_WINDRES" >&6; }
20147else
20148  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20149$as_echo "no" >&6; }
20150fi
20151
20152  if test "x$ac_ct_WINDRES" = x; then
20153    WINDRES=""
20154  else
20155    case $cross_compiling:$ac_tool_warned in
20156yes:)
20157{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
20158$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
20159ac_tool_warned=yes ;;
20160esac
20161    WINDRES=$ac_ct_WINDRES
20162  fi
20163else
20164  WINDRES="$ac_cv_prog_WINDRES"
20165fi
20166
20167	LIBS="$LIBS -liphlpapi -lcrypt32"
20168	WINAPPS="unbound-service-install.exe unbound-service-remove.exe anchor-update.exe"
20169
20170	WIN_DAEMON_SRC="winrc/win_svc.c winrc/w_inst.c"
20171
20172	WIN_DAEMON_OBJ="win_svc.lo w_inst.lo"
20173
20174	WIN_DAEMON_OBJ_LINK="rsrc_unbound.o"
20175
20176	WIN_HOST_OBJ_LINK="rsrc_unbound_host.o"
20177
20178	WIN_UBANCHOR_OBJ_LINK="rsrc_unbound_anchor.o log.lo locks.lo"
20179
20180	WIN_CONTROL_OBJ_LINK="rsrc_unbound_control.o"
20181
20182	WIN_CHECKCONF_OBJ_LINK="rsrc_unbound_checkconf.o"
20183
20184fi
20185if test $ac_cv_func_getaddrinfo = no; then
20186	case " $LIBOBJS " in
20187  *" fake-rfc2553.$ac_objext "* ) ;;
20188  *) LIBOBJS="$LIBOBJS fake-rfc2553.$ac_objext"
20189 ;;
20190esac
20191
20192fi
20193# check after getaddrinfo for its libraries
20194
20195# check ioctlsocket
20196{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ioctlsocket" >&5
20197$as_echo_n "checking for ioctlsocket... " >&6; }
20198cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20199/* end confdefs.h.  */
20200
20201#ifdef HAVE_WINSOCK2_H
20202#include <winsock2.h>
20203#endif
20204
20205int
20206main ()
20207{
20208
20209	(void)ioctlsocket(0, 0, NULL);
20210
20211  ;
20212  return 0;
20213}
20214_ACEOF
20215if ac_fn_c_try_link "$LINENO"; then :
20216
20217{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
20218$as_echo "yes" >&6; }
20219
20220$as_echo "#define HAVE_IOCTLSOCKET 1" >>confdefs.h
20221
20222
20223else
20224  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20225$as_echo "no" >&6; }
20226fi
20227rm -f core conftest.err conftest.$ac_objext \
20228    conftest$ac_exeext conftest.$ac_ext
20229
20230
20231# see if daemon(3) exists, and if it is deprecated.
20232for ac_func in daemon
20233do :
20234  ac_fn_c_check_func "$LINENO" "daemon" "ac_cv_func_daemon"
20235if test "x$ac_cv_func_daemon" = xyes; then :
20236  cat >>confdefs.h <<_ACEOF
20237#define HAVE_DAEMON 1
20238_ACEOF
20239
20240fi
20241done
20242
20243if test $ac_cv_func_daemon = yes; then
20244
20245
20246{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if daemon is deprecated" >&5
20247$as_echo_n "checking if daemon is deprecated... " >&6; }
20248cache=`echo daemon | sed 'y%.=/+-%___p_%'`
20249if eval \${cv_cc_deprecated_$cache+:} false; then :
20250  $as_echo_n "(cached) " >&6
20251else
20252
20253echo '
20254#include <stdlib.h>
20255#include <unistd.h>
20256' >conftest.c
20257echo 'void f(){ (void)daemon(0, 0); }' >>conftest.c
20258if test -z "`$CC $CPPFLAGS $CFLAGS -c conftest.c 2>&1 | grep -e deprecated -e unavailable`"; then
20259eval "cv_cc_deprecated_$cache=no"
20260else
20261eval "cv_cc_deprecated_$cache=yes"
20262fi
20263rm -f conftest conftest.o conftest.c
20264
20265fi
20266
20267if eval "test \"`echo '$cv_cc_deprecated_'$cache`\" = yes"; then
20268{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
20269$as_echo "yes" >&6; }
20270
20271cat >>confdefs.h <<_ACEOF
20272#define DEPRECATED_DAEMON 1
20273_ACEOF
20274
20275:
20276
20277else
20278{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20279$as_echo "no" >&6; }
20280:
20281
20282fi
20283
20284fi
20285
20286ac_fn_c_check_member "$LINENO" "struct sockaddr_un" "sun_len" "ac_cv_member_struct_sockaddr_un_sun_len" "
20287$ac_includes_default
20288#ifdef HAVE_SYS_UN_H
20289#include <sys/un.h>
20290#endif
20291
20292"
20293if test "x$ac_cv_member_struct_sockaddr_un_sun_len" = xyes; then :
20294
20295cat >>confdefs.h <<_ACEOF
20296#define HAVE_STRUCT_SOCKADDR_UN_SUN_LEN 1
20297_ACEOF
20298
20299
20300fi
20301
20302ac_fn_c_check_member "$LINENO" "struct in_pktinfo" "ipi_spec_dst" "ac_cv_member_struct_in_pktinfo_ipi_spec_dst" "
20303$ac_includes_default
20304#if HAVE_SYS_PARAM_H
20305#include <sys/param.h>
20306#endif
20307
20308#ifdef HAVE_SYS_SOCKET_H
20309#include <sys/socket.h>
20310#endif
20311
20312#ifdef HAVE_SYS_UIO_H
20313#include <sys/uio.h>
20314#endif
20315
20316#ifdef HAVE_NETINET_IN_H
20317#include <netinet/in.h>
20318#endif
20319
20320#ifdef HAVE_NETINET_TCP_H
20321#include <netinet/tcp.h>
20322#endif
20323
20324#ifdef HAVE_ARPA_INET_H
20325#include <arpa/inet.h>
20326#endif
20327
20328#ifdef HAVE_WINSOCK2_H
20329#include <winsock2.h>
20330#endif
20331
20332#ifdef HAVE_WS2TCPIP_H
20333#include <ws2tcpip.h>
20334#endif
20335
20336"
20337if test "x$ac_cv_member_struct_in_pktinfo_ipi_spec_dst" = xyes; then :
20338
20339cat >>confdefs.h <<_ACEOF
20340#define HAVE_STRUCT_IN_PKTINFO_IPI_SPEC_DST 1
20341_ACEOF
20342
20343
20344fi
20345
20346
20347{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for htobe64" >&5
20348$as_echo_n "checking for htobe64... " >&6; }
20349cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20350/* end confdefs.h.  */
20351
20352#include <stdio.h>
20353#ifdef HAVE_ENDIAN_H
20354#  include <endian.h>
20355#endif
20356#ifdef HAVE_SYS_ENDIAN_H
20357#  include <sys/endian.h>
20358#endif
20359
20360int
20361main ()
20362{
20363unsigned long long x = htobe64(0); printf("%u", (unsigned)x);
20364  ;
20365  return 0;
20366}
20367_ACEOF
20368if ac_fn_c_try_link "$LINENO"; then :
20369  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
20370$as_echo "yes" >&6; }
20371
20372$as_echo "#define HAVE_HTOBE64 1" >>confdefs.h
20373
20374else
20375  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20376$as_echo "no" >&6; }
20377fi
20378rm -f core conftest.err conftest.$ac_objext \
20379    conftest$ac_exeext conftest.$ac_ext
20380
20381{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for be64toh" >&5
20382$as_echo_n "checking for be64toh... " >&6; }
20383cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20384/* end confdefs.h.  */
20385
20386#include <stdio.h>
20387#ifdef HAVE_ENDIAN_H
20388#  include <endian.h>
20389#endif
20390#ifdef HAVE_SYS_ENDIAN_H
20391#  include <sys/endian.h>
20392#endif
20393
20394int
20395main ()
20396{
20397unsigned long long x = be64toh(0); printf("%u", (unsigned)x);
20398  ;
20399  return 0;
20400}
20401_ACEOF
20402if ac_fn_c_try_link "$LINENO"; then :
20403  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
20404$as_echo "yes" >&6; }
20405
20406$as_echo "#define HAVE_BE64TOH 1" >>confdefs.h
20407
20408else
20409  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20410$as_echo "no" >&6; }
20411fi
20412rm -f core conftest.err conftest.$ac_objext \
20413    conftest$ac_exeext conftest.$ac_ext
20414
20415{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing setusercontext" >&5
20416$as_echo_n "checking for library containing setusercontext... " >&6; }
20417if ${ac_cv_search_setusercontext+:} false; then :
20418  $as_echo_n "(cached) " >&6
20419else
20420  ac_func_search_save_LIBS=$LIBS
20421cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20422/* end confdefs.h.  */
20423
20424/* Override any GCC internal prototype to avoid an error.
20425   Use char because int might match the return type of a GCC
20426   builtin and then its argument prototype would still apply.  */
20427#ifdef __cplusplus
20428extern "C"
20429#endif
20430char setusercontext ();
20431int
20432main ()
20433{
20434return setusercontext ();
20435  ;
20436  return 0;
20437}
20438_ACEOF
20439for ac_lib in '' util; do
20440  if test -z "$ac_lib"; then
20441    ac_res="none required"
20442  else
20443    ac_res=-l$ac_lib
20444    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
20445  fi
20446  if ac_fn_c_try_link "$LINENO"; then :
20447  ac_cv_search_setusercontext=$ac_res
20448fi
20449rm -f core conftest.err conftest.$ac_objext \
20450    conftest$ac_exeext
20451  if ${ac_cv_search_setusercontext+:} false; then :
20452  break
20453fi
20454done
20455if ${ac_cv_search_setusercontext+:} false; then :
20456
20457else
20458  ac_cv_search_setusercontext=no
20459fi
20460rm conftest.$ac_ext
20461LIBS=$ac_func_search_save_LIBS
20462fi
20463{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_setusercontext" >&5
20464$as_echo "$ac_cv_search_setusercontext" >&6; }
20465ac_res=$ac_cv_search_setusercontext
20466if test "$ac_res" != no; then :
20467  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
20468
20469fi
20470
20471for 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
20472do :
20473  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
20474ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
20475if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
20476  cat >>confdefs.h <<_ACEOF
20477#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
20478_ACEOF
20479
20480fi
20481done
20482
20483for ac_func in setresuid
20484do :
20485  ac_fn_c_check_func "$LINENO" "setresuid" "ac_cv_func_setresuid"
20486if test "x$ac_cv_func_setresuid" = xyes; then :
20487  cat >>confdefs.h <<_ACEOF
20488#define HAVE_SETRESUID 1
20489_ACEOF
20490
20491else
20492  for ac_func in setreuid
20493do :
20494  ac_fn_c_check_func "$LINENO" "setreuid" "ac_cv_func_setreuid"
20495if test "x$ac_cv_func_setreuid" = xyes; then :
20496  cat >>confdefs.h <<_ACEOF
20497#define HAVE_SETREUID 1
20498_ACEOF
20499
20500fi
20501done
20502
20503fi
20504done
20505
20506for ac_func in setresgid
20507do :
20508  ac_fn_c_check_func "$LINENO" "setresgid" "ac_cv_func_setresgid"
20509if test "x$ac_cv_func_setresgid" = xyes; then :
20510  cat >>confdefs.h <<_ACEOF
20511#define HAVE_SETRESGID 1
20512_ACEOF
20513
20514else
20515  for ac_func in setregid
20516do :
20517  ac_fn_c_check_func "$LINENO" "setregid" "ac_cv_func_setregid"
20518if test "x$ac_cv_func_setregid" = xyes; then :
20519  cat >>confdefs.h <<_ACEOF
20520#define HAVE_SETREGID 1
20521_ACEOF
20522
20523fi
20524done
20525
20526fi
20527done
20528
20529
20530# check if setreuid en setregid fail, on MacOSX10.4(darwin8).
20531if echo $host_os | grep darwin8 > /dev/null; then
20532
20533$as_echo "#define DARWIN_BROKEN_SETREUID 1" >>confdefs.h
20534
20535fi
20536ac_fn_c_check_decl "$LINENO" "inet_pton" "ac_cv_have_decl_inet_pton" "
20537$ac_includes_default
20538#ifdef HAVE_NETINET_IN_H
20539#include <netinet/in.h>
20540#endif
20541
20542#ifdef HAVE_NETINET_TCP_H
20543#include <netinet/tcp.h>
20544#endif
20545
20546#ifdef HAVE_ARPA_INET_H
20547#include <arpa/inet.h>
20548#endif
20549
20550#ifdef HAVE_WINSOCK2_H
20551#include <winsock2.h>
20552#endif
20553
20554#ifdef HAVE_WS2TCPIP_H
20555#include <ws2tcpip.h>
20556#endif
20557
20558"
20559if test "x$ac_cv_have_decl_inet_pton" = xyes; then :
20560  ac_have_decl=1
20561else
20562  ac_have_decl=0
20563fi
20564
20565cat >>confdefs.h <<_ACEOF
20566#define HAVE_DECL_INET_PTON $ac_have_decl
20567_ACEOF
20568ac_fn_c_check_decl "$LINENO" "inet_ntop" "ac_cv_have_decl_inet_ntop" "
20569$ac_includes_default
20570#ifdef HAVE_NETINET_IN_H
20571#include <netinet/in.h>
20572#endif
20573
20574#ifdef HAVE_NETINET_TCP_H
20575#include <netinet/tcp.h>
20576#endif
20577
20578#ifdef HAVE_ARPA_INET_H
20579#include <arpa/inet.h>
20580#endif
20581
20582#ifdef HAVE_WINSOCK2_H
20583#include <winsock2.h>
20584#endif
20585
20586#ifdef HAVE_WS2TCPIP_H
20587#include <ws2tcpip.h>
20588#endif
20589
20590"
20591if test "x$ac_cv_have_decl_inet_ntop" = xyes; then :
20592  ac_have_decl=1
20593else
20594  ac_have_decl=0
20595fi
20596
20597cat >>confdefs.h <<_ACEOF
20598#define HAVE_DECL_INET_NTOP $ac_have_decl
20599_ACEOF
20600
20601ac_fn_c_check_func "$LINENO" "inet_aton" "ac_cv_func_inet_aton"
20602if test "x$ac_cv_func_inet_aton" = xyes; then :
20603  $as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
20604
20605else
20606  case " $LIBOBJS " in
20607  *" inet_aton.$ac_objext "* ) ;;
20608  *) LIBOBJS="$LIBOBJS inet_aton.$ac_objext"
20609 ;;
20610esac
20611
20612fi
20613
20614
20615ac_fn_c_check_func "$LINENO" "inet_pton" "ac_cv_func_inet_pton"
20616if test "x$ac_cv_func_inet_pton" = xyes; then :
20617  $as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
20618
20619else
20620  case " $LIBOBJS " in
20621  *" inet_pton.$ac_objext "* ) ;;
20622  *) LIBOBJS="$LIBOBJS inet_pton.$ac_objext"
20623 ;;
20624esac
20625
20626fi
20627
20628
20629ac_fn_c_check_func "$LINENO" "inet_ntop" "ac_cv_func_inet_ntop"
20630if test "x$ac_cv_func_inet_ntop" = xyes; then :
20631  $as_echo "#define HAVE_INET_NTOP 1" >>confdefs.h
20632
20633else
20634  case " $LIBOBJS " in
20635  *" inet_ntop.$ac_objext "* ) ;;
20636  *) LIBOBJS="$LIBOBJS inet_ntop.$ac_objext"
20637 ;;
20638esac
20639
20640fi
20641
20642
20643ac_fn_c_check_func "$LINENO" "snprintf" "ac_cv_func_snprintf"
20644if test "x$ac_cv_func_snprintf" = xyes; then :
20645  $as_echo "#define HAVE_SNPRINTF 1" >>confdefs.h
20646
20647else
20648  case " $LIBOBJS " in
20649  *" snprintf.$ac_objext "* ) ;;
20650  *) LIBOBJS="$LIBOBJS snprintf.$ac_objext"
20651 ;;
20652esac
20653
20654fi
20655
20656
20657# test if snprintf return the proper length
20658if test "x$ac_cv_func_snprintf" = xyes; then
20659    if test c${cross_compiling} = cno; then
20660	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for correct snprintf return value" >&5
20661$as_echo_n "checking for correct snprintf return value... " >&6; }
20662	if test "$cross_compiling" = yes; then :
20663  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
20664$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
20665as_fn_error $? "cannot run test program while cross compiling
20666See \`config.log' for more details" "$LINENO" 5; }
20667else
20668  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20669/* end confdefs.h.  */
20670$ac_includes_default
20671
20672int main(void) { return !(snprintf(NULL, 0, "test") == 4); }
20673
20674_ACEOF
20675if ac_fn_c_try_run "$LINENO"; then :
20676  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
20677$as_echo "yes" >&6; }
20678else
20679
20680		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20681$as_echo "no" >&6; }
20682
20683$as_echo "#define SNPRINTF_RET_BROKEN /**/" >>confdefs.h
20684
20685		case " $LIBOBJS " in
20686  *" snprintf.$ac_objext "* ) ;;
20687  *) LIBOBJS="$LIBOBJS snprintf.$ac_objext"
20688 ;;
20689esac
20690
20691
20692fi
20693rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20694  conftest.$ac_objext conftest.beam conftest.$ac_ext
20695fi
20696
20697    fi
20698fi
20699ac_fn_c_check_func "$LINENO" "strlcat" "ac_cv_func_strlcat"
20700if test "x$ac_cv_func_strlcat" = xyes; then :
20701  $as_echo "#define HAVE_STRLCAT 1" >>confdefs.h
20702
20703else
20704  case " $LIBOBJS " in
20705  *" strlcat.$ac_objext "* ) ;;
20706  *) LIBOBJS="$LIBOBJS strlcat.$ac_objext"
20707 ;;
20708esac
20709
20710fi
20711
20712
20713ac_fn_c_check_func "$LINENO" "strlcpy" "ac_cv_func_strlcpy"
20714if test "x$ac_cv_func_strlcpy" = xyes; then :
20715  $as_echo "#define HAVE_STRLCPY 1" >>confdefs.h
20716
20717else
20718  case " $LIBOBJS " in
20719  *" strlcpy.$ac_objext "* ) ;;
20720  *) LIBOBJS="$LIBOBJS strlcpy.$ac_objext"
20721 ;;
20722esac
20723
20724fi
20725
20726
20727ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove"
20728if test "x$ac_cv_func_memmove" = xyes; then :
20729  $as_echo "#define HAVE_MEMMOVE 1" >>confdefs.h
20730
20731else
20732  case " $LIBOBJS " in
20733  *" memmove.$ac_objext "* ) ;;
20734  *) LIBOBJS="$LIBOBJS memmove.$ac_objext"
20735 ;;
20736esac
20737
20738fi
20739
20740
20741ac_fn_c_check_func "$LINENO" "gmtime_r" "ac_cv_func_gmtime_r"
20742if test "x$ac_cv_func_gmtime_r" = xyes; then :
20743  $as_echo "#define HAVE_GMTIME_R 1" >>confdefs.h
20744
20745else
20746  case " $LIBOBJS " in
20747  *" gmtime_r.$ac_objext "* ) ;;
20748  *) LIBOBJS="$LIBOBJS gmtime_r.$ac_objext"
20749 ;;
20750esac
20751
20752fi
20753
20754
20755ac_fn_c_check_func "$LINENO" "isblank" "ac_cv_func_isblank"
20756if test "x$ac_cv_func_isblank" = xyes; then :
20757  $as_echo "#define HAVE_ISBLANK 1" >>confdefs.h
20758
20759else
20760  case " $LIBOBJS " in
20761  *" isblank.$ac_objext "* ) ;;
20762  *) LIBOBJS="$LIBOBJS isblank.$ac_objext"
20763 ;;
20764esac
20765
20766fi
20767
20768
20769ac_fn_c_check_func "$LINENO" "explicit_bzero" "ac_cv_func_explicit_bzero"
20770if test "x$ac_cv_func_explicit_bzero" = xyes; then :
20771  $as_echo "#define HAVE_EXPLICIT_BZERO 1" >>confdefs.h
20772
20773else
20774  case " $LIBOBJS " in
20775  *" explicit_bzero.$ac_objext "* ) ;;
20776  *) LIBOBJS="$LIBOBJS explicit_bzero.$ac_objext"
20777 ;;
20778esac
20779
20780fi
20781
20782
20783LIBOBJ_WITHOUT_CTIMEARC4="$LIBOBJS"
20784
20785{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for reallocarray" >&5
20786$as_echo_n "checking for reallocarray... " >&6; }
20787cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20788/* end confdefs.h.  */
20789$ac_includes_default
20790
20791#ifndef _OPENBSD_SOURCE
20792#define _OPENBSD_SOURCE 1
20793#endif
20794#include <stdlib.h>
20795int main(void) {
20796	void* p = reallocarray(NULL, 10, 100);
20797	free(p);
20798	return 0;
20799}
20800
20801_ACEOF
20802if ac_fn_c_try_link "$LINENO"; then :
20803  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
20804$as_echo "yes" >&6; }
20805
20806$as_echo "#define HAVE_REALLOCARRAY 1" >>confdefs.h
20807
20808
20809else
20810
20811	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20812$as_echo "no" >&6; }
20813	case " $LIBOBJS " in
20814  *" reallocarray.$ac_objext "* ) ;;
20815  *) LIBOBJS="$LIBOBJS reallocarray.$ac_objext"
20816 ;;
20817esac
20818
20819
20820fi
20821rm -f core conftest.err conftest.$ac_objext \
20822    conftest$ac_exeext conftest.$ac_ext
20823ac_fn_c_check_decl "$LINENO" "reallocarray" "ac_cv_have_decl_reallocarray" "$ac_includes_default"
20824if test "x$ac_cv_have_decl_reallocarray" = xyes; then :
20825  ac_have_decl=1
20826else
20827  ac_have_decl=0
20828fi
20829
20830cat >>confdefs.h <<_ACEOF
20831#define HAVE_DECL_REALLOCARRAY $ac_have_decl
20832_ACEOF
20833
20834if test "$USE_NSS" = "no"; then
20835	ac_fn_c_check_func "$LINENO" "arc4random" "ac_cv_func_arc4random"
20836if test "x$ac_cv_func_arc4random" = xyes; then :
20837  $as_echo "#define HAVE_ARC4RANDOM 1" >>confdefs.h
20838
20839else
20840  case " $LIBOBJS " in
20841  *" arc4random.$ac_objext "* ) ;;
20842  *) LIBOBJS="$LIBOBJS arc4random.$ac_objext"
20843 ;;
20844esac
20845
20846fi
20847
20848
20849	ac_fn_c_check_func "$LINENO" "arc4random_uniform" "ac_cv_func_arc4random_uniform"
20850if test "x$ac_cv_func_arc4random_uniform" = xyes; then :
20851  $as_echo "#define HAVE_ARC4RANDOM_UNIFORM 1" >>confdefs.h
20852
20853else
20854  case " $LIBOBJS " in
20855  *" arc4random_uniform.$ac_objext "* ) ;;
20856  *) LIBOBJS="$LIBOBJS arc4random_uniform.$ac_objext"
20857 ;;
20858esac
20859
20860fi
20861
20862
20863	if test "$ac_cv_func_arc4random" = "no"; then
20864		case " $LIBOBJS " in
20865  *" arc4_lock.$ac_objext "* ) ;;
20866  *) LIBOBJS="$LIBOBJS arc4_lock.$ac_objext"
20867 ;;
20868esac
20869
20870		for ac_func in getentropy
20871do :
20872  ac_fn_c_check_func "$LINENO" "getentropy" "ac_cv_func_getentropy"
20873if test "x$ac_cv_func_getentropy" = xyes; then :
20874  cat >>confdefs.h <<_ACEOF
20875#define HAVE_GETENTROPY 1
20876_ACEOF
20877
20878else
20879
20880		    if test "$USE_WINSOCK" = 1; then
20881			case " $LIBOBJS " in
20882  *" getentropy_win.$ac_objext "* ) ;;
20883  *) LIBOBJS="$LIBOBJS getentropy_win.$ac_objext"
20884 ;;
20885esac
20886
20887		    else
20888			case "$host" in
20889			Darwin|*darwin*)
20890				case " $LIBOBJS " in
20891  *" getentropy_osx.$ac_objext "* ) ;;
20892  *) LIBOBJS="$LIBOBJS getentropy_osx.$ac_objext"
20893 ;;
20894esac
20895
20896			;;
20897			*solaris*|*sunos*|SunOS)
20898				case " $LIBOBJS " in
20899  *" getentropy_solaris.$ac_objext "* ) ;;
20900  *) LIBOBJS="$LIBOBJS getentropy_solaris.$ac_objext"
20901 ;;
20902esac
20903
20904				for ac_header in sys/sha2.h
20905do :
20906  ac_fn_c_check_header_compile "$LINENO" "sys/sha2.h" "ac_cv_header_sys_sha2_h" "$ac_includes_default
20907"
20908if test "x$ac_cv_header_sys_sha2_h" = xyes; then :
20909  cat >>confdefs.h <<_ACEOF
20910#define HAVE_SYS_SHA2_H 1
20911_ACEOF
20912
20913else
20914
20915					for ac_func in SHA512_Update
20916do :
20917  ac_fn_c_check_func "$LINENO" "SHA512_Update" "ac_cv_func_SHA512_Update"
20918if test "x$ac_cv_func_SHA512_Update" = xyes; then :
20919  cat >>confdefs.h <<_ACEOF
20920#define HAVE_SHA512_UPDATE 1
20921_ACEOF
20922
20923else
20924
20925						case " $LIBOBJS " in
20926  *" sha512.$ac_objext "* ) ;;
20927  *) LIBOBJS="$LIBOBJS sha512.$ac_objext"
20928 ;;
20929esac
20930
20931
20932fi
20933done
20934
20935
20936fi
20937
20938done
20939
20940				if test "$ac_cv_header_sys_sha2_h" = "yes"; then
20941					# this lib needed for sha2 on solaris
20942					LIBS="$LIBS -lmd"
20943				fi
20944				{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5
20945$as_echo_n "checking for library containing clock_gettime... " >&6; }
20946if ${ac_cv_search_clock_gettime+:} false; then :
20947  $as_echo_n "(cached) " >&6
20948else
20949  ac_func_search_save_LIBS=$LIBS
20950cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20951/* end confdefs.h.  */
20952
20953/* Override any GCC internal prototype to avoid an error.
20954   Use char because int might match the return type of a GCC
20955   builtin and then its argument prototype would still apply.  */
20956#ifdef __cplusplus
20957extern "C"
20958#endif
20959char clock_gettime ();
20960int
20961main ()
20962{
20963return clock_gettime ();
20964  ;
20965  return 0;
20966}
20967_ACEOF
20968for ac_lib in '' rt; do
20969  if test -z "$ac_lib"; then
20970    ac_res="none required"
20971  else
20972    ac_res=-l$ac_lib
20973    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
20974  fi
20975  if ac_fn_c_try_link "$LINENO"; then :
20976  ac_cv_search_clock_gettime=$ac_res
20977fi
20978rm -f core conftest.err conftest.$ac_objext \
20979    conftest$ac_exeext
20980  if ${ac_cv_search_clock_gettime+:} false; then :
20981  break
20982fi
20983done
20984if ${ac_cv_search_clock_gettime+:} false; then :
20985
20986else
20987  ac_cv_search_clock_gettime=no
20988fi
20989rm conftest.$ac_ext
20990LIBS=$ac_func_search_save_LIBS
20991fi
20992{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5
20993$as_echo "$ac_cv_search_clock_gettime" >&6; }
20994ac_res=$ac_cv_search_clock_gettime
20995if test "$ac_res" != no; then :
20996  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
20997
20998fi
20999
21000			;;
21001			*freebsd*|*FreeBSD)
21002				case " $LIBOBJS " in
21003  *" getentropy_freebsd.$ac_objext "* ) ;;
21004  *) LIBOBJS="$LIBOBJS getentropy_freebsd.$ac_objext"
21005 ;;
21006esac
21007
21008			;;
21009			*linux*|Linux|*)
21010				case " $LIBOBJS " in
21011  *" getentropy_linux.$ac_objext "* ) ;;
21012  *) LIBOBJS="$LIBOBJS getentropy_linux.$ac_objext"
21013 ;;
21014esac
21015
21016				for ac_func in SHA512_Update
21017do :
21018  ac_fn_c_check_func "$LINENO" "SHA512_Update" "ac_cv_func_SHA512_Update"
21019if test "x$ac_cv_func_SHA512_Update" = xyes; then :
21020  cat >>confdefs.h <<_ACEOF
21021#define HAVE_SHA512_UPDATE 1
21022_ACEOF
21023
21024else
21025
21026
21027$as_echo "#define COMPAT_SHA512 1" >>confdefs.h
21028
21029					case " $LIBOBJS " in
21030  *" sha512.$ac_objext "* ) ;;
21031  *) LIBOBJS="$LIBOBJS sha512.$ac_objext"
21032 ;;
21033esac
21034
21035
21036fi
21037done
21038
21039				for ac_header in sys/sysctl.h
21040do :
21041  ac_fn_c_check_header_compile "$LINENO" "sys/sysctl.h" "ac_cv_header_sys_sysctl_h" "$ac_includes_default
21042"
21043if test "x$ac_cv_header_sys_sysctl_h" = xyes; then :
21044  cat >>confdefs.h <<_ACEOF
21045#define HAVE_SYS_SYSCTL_H 1
21046_ACEOF
21047
21048fi
21049
21050done
21051
21052				for ac_func in getauxval
21053do :
21054  ac_fn_c_check_func "$LINENO" "getauxval" "ac_cv_func_getauxval"
21055if test "x$ac_cv_func_getauxval" = xyes; then :
21056  cat >>confdefs.h <<_ACEOF
21057#define HAVE_GETAUXVAL 1
21058_ACEOF
21059
21060fi
21061done
21062
21063				{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5
21064$as_echo_n "checking for library containing clock_gettime... " >&6; }
21065if ${ac_cv_search_clock_gettime+:} false; then :
21066  $as_echo_n "(cached) " >&6
21067else
21068  ac_func_search_save_LIBS=$LIBS
21069cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21070/* end confdefs.h.  */
21071
21072/* Override any GCC internal prototype to avoid an error.
21073   Use char because int might match the return type of a GCC
21074   builtin and then its argument prototype would still apply.  */
21075#ifdef __cplusplus
21076extern "C"
21077#endif
21078char clock_gettime ();
21079int
21080main ()
21081{
21082return clock_gettime ();
21083  ;
21084  return 0;
21085}
21086_ACEOF
21087for ac_lib in '' rt; do
21088  if test -z "$ac_lib"; then
21089    ac_res="none required"
21090  else
21091    ac_res=-l$ac_lib
21092    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
21093  fi
21094  if ac_fn_c_try_link "$LINENO"; then :
21095  ac_cv_search_clock_gettime=$ac_res
21096fi
21097rm -f core conftest.err conftest.$ac_objext \
21098    conftest$ac_exeext
21099  if ${ac_cv_search_clock_gettime+:} false; then :
21100  break
21101fi
21102done
21103if ${ac_cv_search_clock_gettime+:} false; then :
21104
21105else
21106  ac_cv_search_clock_gettime=no
21107fi
21108rm conftest.$ac_ext
21109LIBS=$ac_func_search_save_LIBS
21110fi
21111{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5
21112$as_echo "$ac_cv_search_clock_gettime" >&6; }
21113ac_res=$ac_cv_search_clock_gettime
21114if test "$ac_res" != no; then :
21115  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
21116
21117fi
21118
21119			;;
21120			esac
21121		    fi
21122
21123fi
21124done
21125
21126	fi
21127fi
21128LIBOBJ_WITHOUT_CTIME="$LIBOBJS"
21129
21130ac_fn_c_check_func "$LINENO" "ctime_r" "ac_cv_func_ctime_r"
21131if test "x$ac_cv_func_ctime_r" = xyes; then :
21132  $as_echo "#define HAVE_CTIME_R 1" >>confdefs.h
21133
21134else
21135  case " $LIBOBJS " in
21136  *" ctime_r.$ac_objext "* ) ;;
21137  *) LIBOBJS="$LIBOBJS ctime_r.$ac_objext"
21138 ;;
21139esac
21140
21141fi
21142
21143
21144ac_fn_c_check_func "$LINENO" "strsep" "ac_cv_func_strsep"
21145if test "x$ac_cv_func_strsep" = xyes; then :
21146  $as_echo "#define HAVE_STRSEP 1" >>confdefs.h
21147
21148else
21149  case " $LIBOBJS " in
21150  *" strsep.$ac_objext "* ) ;;
21151  *) LIBOBJS="$LIBOBJS strsep.$ac_objext"
21152 ;;
21153esac
21154
21155fi
21156
21157
21158
21159# Check whether --enable-allsymbols was given.
21160if test "${enable_allsymbols+set}" = set; then :
21161  enableval=$enable_allsymbols;
21162fi
21163
21164case "$enable_allsymbols" in
21165	yes)
21166	COMMON_OBJ_ALL_SYMBOLS=""
21167	UBSYMS=""
21168	EXTRALINK="libunbound.la"
21169
21170$as_echo "#define EXPORT_ALL_SYMBOLS 1" >>confdefs.h
21171
21172	;;
21173	no|*)
21174	COMMON_OBJ_ALL_SYMBOLS='$(COMMON_OBJ)'
21175	UBSYMS='-export-symbols $(srcdir)/libunbound/ubsyms.def'
21176	EXTRALINK=""
21177	;;
21178esac
21179
21180
21181
21182if test x_$enable_lock_checks = x_yes; then
21183	UBSYMS="-export-symbols clubsyms.def"
21184	cp ${srcdir}/libunbound/ubsyms.def clubsyms.def
21185	echo lock_protect >> clubsyms.def
21186	echo lock_unprotect >> clubsyms.def
21187	echo lock_get_mem >> clubsyms.def
21188	echo checklock_start >> clubsyms.def
21189	echo checklock_stop >> clubsyms.def
21190	echo checklock_lock >> clubsyms.def
21191	echo checklock_unlock >> clubsyms.def
21192	echo checklock_init >> clubsyms.def
21193	echo checklock_thrcreate >> clubsyms.def
21194	echo checklock_thrjoin >> clubsyms.def
21195fi
21196
21197# check for dnstap if requested
21198
21199  # Check whether --enable-dnstap was given.
21200if test "${enable_dnstap+set}" = set; then :
21201  enableval=$enable_dnstap; opt_dnstap=$enableval
21202else
21203  opt_dnstap=no
21204fi
21205
21206
21207
21208# Check whether --with-dnstap-socket-path was given.
21209if test "${with_dnstap_socket_path+set}" = set; then :
21210  withval=$with_dnstap_socket_path; opt_dnstap_socket_path=$withval
21211else
21212  opt_dnstap_socket_path="$UNBOUND_RUN_DIR/dnstap.sock"
21213fi
21214
21215
21216  if test "x$opt_dnstap" != "xno"; then
21217    # Extract the first word of "protoc-c", so it can be a program name with args.
21218set dummy protoc-c; ac_word=$2
21219{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21220$as_echo_n "checking for $ac_word... " >&6; }
21221if ${ac_cv_path_PROTOC_C+:} false; then :
21222  $as_echo_n "(cached) " >&6
21223else
21224  case $PROTOC_C in
21225  [\\/]* | ?:[\\/]*)
21226  ac_cv_path_PROTOC_C="$PROTOC_C" # Let the user override the test with a path.
21227  ;;
21228  *)
21229  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21230for as_dir in $PATH
21231do
21232  IFS=$as_save_IFS
21233  test -z "$as_dir" && as_dir=.
21234    for ac_exec_ext in '' $ac_executable_extensions; do
21235  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21236    ac_cv_path_PROTOC_C="$as_dir/$ac_word$ac_exec_ext"
21237    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21238    break 2
21239  fi
21240done
21241  done
21242IFS=$as_save_IFS
21243
21244  ;;
21245esac
21246fi
21247PROTOC_C=$ac_cv_path_PROTOC_C
21248if test -n "$PROTOC_C"; then
21249  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROTOC_C" >&5
21250$as_echo "$PROTOC_C" >&6; }
21251else
21252  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21253$as_echo "no" >&6; }
21254fi
21255
21256
21257    if test -z "$PROTOC_C"; then
21258      as_fn_error $? "The protoc-c program was not found. Please install protobuf-c!" "$LINENO" 5
21259    fi
21260
21261# Check whether --with-protobuf-c was given.
21262if test "${with_protobuf_c+set}" = set; then :
21263  withval=$with_protobuf_c;
21264	  # workaround for protobuf-c includes at old dir before protobuf-c-1.0.0
21265	  if test -f $withval/include/google/protobuf-c/protobuf-c.h; then
21266	    CFLAGS="$CFLAGS -I$withval/include/google"
21267	  else
21268	    CFLAGS="$CFLAGS -I$withval/include"
21269	  fi
21270	  LDFLAGS="$LDFLAGS -L$withval/lib"
21271
21272else
21273
21274	  # workaround for protobuf-c includes at old dir before protobuf-c-1.0.0
21275	  if test -f /usr/include/google/protobuf-c/protobuf-c.h; then
21276	    CFLAGS="$CFLAGS -I/usr/include/google"
21277	  else
21278	    if test -f /usr/local/include/google/protobuf-c/protobuf-c.h; then
21279	      CFLAGS="$CFLAGS -I/usr/local/include/google"
21280	      LDFLAGS="$LDFLAGS -L/usr/local/lib"
21281	    fi
21282	  fi
21283
21284fi
21285
21286    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing protobuf_c_message_pack" >&5
21287$as_echo_n "checking for library containing protobuf_c_message_pack... " >&6; }
21288if ${ac_cv_search_protobuf_c_message_pack+:} false; then :
21289  $as_echo_n "(cached) " >&6
21290else
21291  ac_func_search_save_LIBS=$LIBS
21292cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21293/* end confdefs.h.  */
21294
21295/* Override any GCC internal prototype to avoid an error.
21296   Use char because int might match the return type of a GCC
21297   builtin and then its argument prototype would still apply.  */
21298#ifdef __cplusplus
21299extern "C"
21300#endif
21301char protobuf_c_message_pack ();
21302int
21303main ()
21304{
21305return protobuf_c_message_pack ();
21306  ;
21307  return 0;
21308}
21309_ACEOF
21310for ac_lib in '' protobuf-c; do
21311  if test -z "$ac_lib"; then
21312    ac_res="none required"
21313  else
21314    ac_res=-l$ac_lib
21315    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
21316  fi
21317  if ac_fn_c_try_link "$LINENO"; then :
21318  ac_cv_search_protobuf_c_message_pack=$ac_res
21319fi
21320rm -f core conftest.err conftest.$ac_objext \
21321    conftest$ac_exeext
21322  if ${ac_cv_search_protobuf_c_message_pack+:} false; then :
21323  break
21324fi
21325done
21326if ${ac_cv_search_protobuf_c_message_pack+:} false; then :
21327
21328else
21329  ac_cv_search_protobuf_c_message_pack=no
21330fi
21331rm conftest.$ac_ext
21332LIBS=$ac_func_search_save_LIBS
21333fi
21334{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_protobuf_c_message_pack" >&5
21335$as_echo "$ac_cv_search_protobuf_c_message_pack" >&6; }
21336ac_res=$ac_cv_search_protobuf_c_message_pack
21337if test "$ac_res" != no; then :
21338  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
21339
21340else
21341  as_fn_error $? "The protobuf-c library was not found. Please install protobuf-c!" "$LINENO" 5
21342fi
21343
21344
21345
21346$as_echo "#define USE_DNSTAP 1" >>confdefs.h
21347
21348        ENABLE_DNSTAP=1
21349
21350
21351
21352        hdr_dnstap_socket_path="`echo $opt_dnstap_socket_path | sed -e 's/\\\\/\\\\\\\\/g'`"
21353
21354
21355cat >>confdefs.h <<_ACEOF
21356#define DNSTAP_SOCKET_PATH "$hdr_dnstap_socket_path"
21357_ACEOF
21358
21359	DNSTAP_SOCKET_PATH="$hdr_dnstap_socket_path"
21360
21361	DNSTAP_SOCKET_TESTBIN='unbound-dnstap-socket$(EXEEXT)'
21362
21363        DNSTAP_SRC="dnstap/dnstap.c dnstap/dnstap.pb-c.c dnstap/dnstap_fstrm.c dnstap/dtstream.c"
21364
21365        DNSTAP_OBJ="dnstap.lo dnstap.pb-c.lo dnstap_fstrm.lo dtstream.lo"
21366
21367
21368  else
21369
21370        ENABLE_DNSTAP=0
21371
21372
21373
21374  fi
21375
21376
21377# check for dnscrypt if requested
21378
21379  # Check whether --enable-dnscrypt was given.
21380if test "${enable_dnscrypt+set}" = set; then :
21381  enableval=$enable_dnscrypt; opt_dnscrypt=$enableval
21382else
21383  opt_dnscrypt=no
21384fi
21385
21386
21387  if test "x$opt_dnscrypt" != "xno"; then
21388
21389# Check whether --with-libsodium was given.
21390if test "${with_libsodium+set}" = set; then :
21391  withval=$with_libsodium;
21392	CFLAGS="$CFLAGS -I$withval/include"
21393	LDFLAGS="$LDFLAGS -L$withval/lib"
21394
21395fi
21396
21397    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sodium_init" >&5
21398$as_echo_n "checking for library containing sodium_init... " >&6; }
21399if ${ac_cv_search_sodium_init+:} false; then :
21400  $as_echo_n "(cached) " >&6
21401else
21402  ac_func_search_save_LIBS=$LIBS
21403cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21404/* end confdefs.h.  */
21405
21406/* Override any GCC internal prototype to avoid an error.
21407   Use char because int might match the return type of a GCC
21408   builtin and then its argument prototype would still apply.  */
21409#ifdef __cplusplus
21410extern "C"
21411#endif
21412char sodium_init ();
21413int
21414main ()
21415{
21416return sodium_init ();
21417  ;
21418  return 0;
21419}
21420_ACEOF
21421for ac_lib in '' sodium; do
21422  if test -z "$ac_lib"; then
21423    ac_res="none required"
21424  else
21425    ac_res=-l$ac_lib
21426    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
21427  fi
21428  if ac_fn_c_try_link "$LINENO"; then :
21429  ac_cv_search_sodium_init=$ac_res
21430fi
21431rm -f core conftest.err conftest.$ac_objext \
21432    conftest$ac_exeext
21433  if ${ac_cv_search_sodium_init+:} false; then :
21434  break
21435fi
21436done
21437if ${ac_cv_search_sodium_init+:} false; then :
21438
21439else
21440  ac_cv_search_sodium_init=no
21441fi
21442rm conftest.$ac_ext
21443LIBS=$ac_func_search_save_LIBS
21444fi
21445{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sodium_init" >&5
21446$as_echo "$ac_cv_search_sodium_init" >&6; }
21447ac_res=$ac_cv_search_sodium_init
21448if test "$ac_res" != no; then :
21449  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
21450
21451else
21452  as_fn_error $? "The sodium library was not found. Please install sodium!" "$LINENO" 5
21453fi
21454
21455    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing crypto_box_curve25519xchacha20poly1305_beforenm" >&5
21456$as_echo_n "checking for library containing crypto_box_curve25519xchacha20poly1305_beforenm... " >&6; }
21457if ${ac_cv_search_crypto_box_curve25519xchacha20poly1305_beforenm+:} false; then :
21458  $as_echo_n "(cached) " >&6
21459else
21460  ac_func_search_save_LIBS=$LIBS
21461cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21462/* end confdefs.h.  */
21463
21464/* Override any GCC internal prototype to avoid an error.
21465   Use char because int might match the return type of a GCC
21466   builtin and then its argument prototype would still apply.  */
21467#ifdef __cplusplus
21468extern "C"
21469#endif
21470char crypto_box_curve25519xchacha20poly1305_beforenm ();
21471int
21472main ()
21473{
21474return crypto_box_curve25519xchacha20poly1305_beforenm ();
21475  ;
21476  return 0;
21477}
21478_ACEOF
21479for ac_lib in '' sodium; do
21480  if test -z "$ac_lib"; then
21481    ac_res="none required"
21482  else
21483    ac_res=-l$ac_lib
21484    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
21485  fi
21486  if ac_fn_c_try_link "$LINENO"; then :
21487  ac_cv_search_crypto_box_curve25519xchacha20poly1305_beforenm=$ac_res
21488fi
21489rm -f core conftest.err conftest.$ac_objext \
21490    conftest$ac_exeext
21491  if ${ac_cv_search_crypto_box_curve25519xchacha20poly1305_beforenm+:} false; then :
21492  break
21493fi
21494done
21495if ${ac_cv_search_crypto_box_curve25519xchacha20poly1305_beforenm+:} false; then :
21496
21497else
21498  ac_cv_search_crypto_box_curve25519xchacha20poly1305_beforenm=no
21499fi
21500rm conftest.$ac_ext
21501LIBS=$ac_func_search_save_LIBS
21502fi
21503{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_crypto_box_curve25519xchacha20poly1305_beforenm" >&5
21504$as_echo "$ac_cv_search_crypto_box_curve25519xchacha20poly1305_beforenm" >&6; }
21505ac_res=$ac_cv_search_crypto_box_curve25519xchacha20poly1305_beforenm
21506if test "$ac_res" != no; then :
21507  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
21508
21509            ENABLE_DNSCRYPT_XCHACHA20=1
21510
21511
21512$as_echo "#define USE_DNSCRYPT_XCHACHA20 1" >>confdefs.h
21513
21514
21515else
21516
21517            ENABLE_DNSCRYPT_XCHACHA20=0
21518
21519
21520fi
21521
21522    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sodium_set_misuse_handler" >&5
21523$as_echo_n "checking for library containing sodium_set_misuse_handler... " >&6; }
21524if ${ac_cv_search_sodium_set_misuse_handler+:} false; then :
21525  $as_echo_n "(cached) " >&6
21526else
21527  ac_func_search_save_LIBS=$LIBS
21528cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21529/* end confdefs.h.  */
21530
21531/* Override any GCC internal prototype to avoid an error.
21532   Use char because int might match the return type of a GCC
21533   builtin and then its argument prototype would still apply.  */
21534#ifdef __cplusplus
21535extern "C"
21536#endif
21537char sodium_set_misuse_handler ();
21538int
21539main ()
21540{
21541return sodium_set_misuse_handler ();
21542  ;
21543  return 0;
21544}
21545_ACEOF
21546for ac_lib in '' sodium; do
21547  if test -z "$ac_lib"; then
21548    ac_res="none required"
21549  else
21550    ac_res=-l$ac_lib
21551    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
21552  fi
21553  if ac_fn_c_try_link "$LINENO"; then :
21554  ac_cv_search_sodium_set_misuse_handler=$ac_res
21555fi
21556rm -f core conftest.err conftest.$ac_objext \
21557    conftest$ac_exeext
21558  if ${ac_cv_search_sodium_set_misuse_handler+:} false; then :
21559  break
21560fi
21561done
21562if ${ac_cv_search_sodium_set_misuse_handler+:} false; then :
21563
21564else
21565  ac_cv_search_sodium_set_misuse_handler=no
21566fi
21567rm conftest.$ac_ext
21568LIBS=$ac_func_search_save_LIBS
21569fi
21570{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sodium_set_misuse_handler" >&5
21571$as_echo "$ac_cv_search_sodium_set_misuse_handler" >&6; }
21572ac_res=$ac_cv_search_sodium_set_misuse_handler
21573if test "$ac_res" != no; then :
21574  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
21575
21576
21577$as_echo "#define SODIUM_MISUSE_HANDLER 1" >>confdefs.h
21578
21579
21580fi
21581
21582
21583
21584$as_echo "#define USE_DNSCRYPT 1" >>confdefs.h
21585
21586        ENABLE_DNSCRYPT=1
21587
21588
21589        DNSCRYPT_SRC="dnscrypt/dnscrypt.c"
21590
21591        DNSCRYPT_OBJ="dnscrypt.lo"
21592
21593
21594  else
21595    ENABLE_DNSCRYPT_XCHACHA20=0
21596
21597
21598        ENABLE_DNSCRYPT=0
21599
21600
21601
21602  fi
21603
21604
21605# check for cachedb if requested
21606# Check whether --enable-cachedb was given.
21607if test "${enable_cachedb+set}" = set; then :
21608  enableval=$enable_cachedb;
21609fi
21610
21611# turn on cachedb when hiredis support is enabled.
21612if test "$found_libhiredis" = "yes"; then enable_cachedb="yes"; fi
21613case "$enable_cachedb" in
21614    yes)
21615
21616$as_echo "#define USE_CACHEDB 1" >>confdefs.h
21617
21618	CACHEDB_SRC="cachedb/cachedb.c cachedb/redis.c"
21619
21620	CACHEDB_OBJ="cachedb.lo redis.lo"
21621
21622    	;;
21623    no|*)
21624    	# nothing
21625    	;;
21626esac
21627
21628# check for ipsecmod if requested
21629# Check whether --enable-ipsecmod was given.
21630if test "${enable_ipsecmod+set}" = set; then :
21631  enableval=$enable_ipsecmod;
21632fi
21633
21634case "$enable_ipsecmod" in
21635	yes)
21636
21637$as_echo "#define USE_IPSECMOD 1" >>confdefs.h
21638
21639		IPSECMOD_OBJ="ipsecmod.lo ipsecmod-whitelist.lo"
21640
21641		IPSECMOD_HEADER='$(srcdir)/ipsecmod/ipsecmod.h $(srcdir)/ipsecmod/ipsecmod-whitelist.h'
21642
21643		;;
21644	no|*)
21645		# nothing
21646		;;
21647esac
21648
21649# check for ipset if requested
21650# Check whether --enable-ipset was given.
21651if test "${enable_ipset+set}" = set; then :
21652  enableval=$enable_ipset;
21653fi
21654
21655case "$enable_ipset" in
21656    yes)
21657
21658$as_echo "#define USE_IPSET 1" >>confdefs.h
21659
21660		IPSET_SRC="ipset/ipset.c"
21661
21662		IPSET_OBJ="ipset.lo"
21663
21664
21665		# mnl
21666
21667# Check whether --with-libmnl was given.
21668if test "${with_libmnl+set}" = set; then :
21669  withval=$with_libmnl;
21670else
21671   withval="yes"
21672fi
21673
21674		found_libmnl="no"
21675		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for libmnl" >&5
21676$as_echo_n "checking for libmnl... " >&6; }
21677		if test x_$withval = x_ -o x_$withval = x_yes; then
21678			withval="/usr/local /opt/local /usr/lib /usr/pkg /usr/sfw /usr"
21679		fi
21680		for dir in $withval ; do
21681			if test -f "$dir/include/libmnl/libmnl.h"; then
21682				found_libmnl="yes"
21683								if test "$dir" != "/usr"; then
21684					CPPFLAGS="$CPPFLAGS -I$dir/include"
21685					LDFLAGS="$LDFLAGS -L$dir/lib"
21686				fi
21687				{ $as_echo "$as_me:${as_lineno-$LINENO}: result: found in $dir" >&5
21688$as_echo "found in $dir" >&6; }
21689				LIBS="$LIBS -lmnl"
21690				break;
21691			fi
21692		done
21693		if test x_$found_libmnl != x_yes; then
21694			as_fn_error $? "Could not find libmnl, libmnl.h" "$LINENO" 5
21695		fi
21696		;;
21697    no|*)
21698    	# nothing
21699		;;
21700esac
21701# Check whether --enable-explicit-port-randomisation was given.
21702if test "${enable_explicit_port_randomisation+set}" = set; then :
21703  enableval=$enable_explicit_port_randomisation;
21704fi
21705
21706case "$enable_explicit_port_randomisation" in
21707	no)
21708
21709$as_echo "#define DISABLE_EXPLICIT_PORT_RANDOMISATION 1" >>confdefs.h
21710
21711		;;
21712	yes|*)
21713		;;
21714esac
21715
21716if echo "$host" | $GREP -i -e linux >/dev/null; then
21717	# Check whether --enable-linux-ip-local-port-range was given.
21718if test "${enable_linux_ip_local_port_range+set}" = set; then :
21719  enableval=$enable_linux_ip_local_port_range;
21720fi
21721
21722	case "$enable_linux_ip_local_port_range" in
21723		yes)
21724
21725$as_echo "#define USE_LINUX_IP_LOCAL_PORT_RANGE 1" >>confdefs.h
21726
21727			;;
21728		no|*)
21729			;;
21730	esac
21731fi
21732
21733
21734{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if ${MAKE:-make} supports $< with implicit rule in scope" >&5
21735$as_echo_n "checking if ${MAKE:-make} supports $< with implicit rule in scope... " >&6; }
21736# on openBSD, the implicit rule make $< work.
21737# on Solaris, it does not work ($? is changed sources, $^ lists dependencies).
21738# gmake works.
21739cat >conftest.make <<EOF
21740all:	conftest.lo
21741
21742conftest.lo foo.lo bla.lo:
21743	if test -f "\$<"; then touch \$@; fi
21744
21745.SUFFIXES: .lo
21746.c.lo:
21747	if test -f "\$<"; then touch \$@; fi
21748
21749conftest.lo:        conftest.dir/conftest.c
21750EOF
21751mkdir conftest.dir
21752touch conftest.dir/conftest.c
21753rm -f conftest.lo conftest.c
21754${MAKE:-make} -f conftest.make >/dev/null
21755rm -f conftest.make conftest.c conftest.dir/conftest.c
21756rm -rf conftest.dir
21757if test ! -f conftest.lo; then
21758	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21759$as_echo "no" >&6; }
21760	SOURCEDETERMINE='echo "$^" | awk "-F " "{print \$$1;}" > .source'
21761	SOURCEFILE='`cat .source`'
21762else
21763	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
21764$as_echo "yes" >&6; }
21765	SOURCEDETERMINE=':'
21766	SOURCEFILE='$<'
21767fi
21768rm -f conftest.lo
21769
21770
21771
21772# see if we want to build the library or everything
21773ALLTARGET="alltargets"
21774INSTALLTARGET="install-all"
21775
21776# Check whether --with-libunbound-only was given.
21777if test "${with_libunbound_only+set}" = set; then :
21778  withval=$with_libunbound_only;
21779	if test "$withval" = "yes"; then
21780		ALLTARGET="lib"
21781		INSTALLTARGET="install-lib"
21782	fi
21783
21784fi
21785
21786if test $ALLTARGET = "alltargets"; then
21787	if test $USE_NSS = "yes"; then
21788		as_fn_error $? "--with-nss can only be used in combination with --with-libunbound-only." "$LINENO" 5
21789	fi
21790	if test $USE_NETTLE = "yes"; then
21791		as_fn_error $? "--with-nettle can only be used in combination with --with-libunbound-only." "$LINENO" 5
21792	fi
21793fi
21794
21795
21796
21797
21798
21799  { $as_echo "$as_me:${as_lineno-$LINENO}: Stripping extension flags..." >&5
21800$as_echo "$as_me: Stripping extension flags..." >&6;}
21801
21802  if echo $CFLAGS | grep " -D_GNU_SOURCE" >/dev/null 2>&1; then
21803    CFLAGS="`echo $CFLAGS | sed -e 's/ -D_GNU_SOURCE//g'`"
21804
21805$as_echo "#define OMITTED__D_GNU_SOURCE 1" >>confdefs.h
21806
21807  fi
21808
21809
21810  if echo $CFLAGS | grep " -D_BSD_SOURCE" >/dev/null 2>&1; then
21811    CFLAGS="`echo $CFLAGS | sed -e 's/ -D_BSD_SOURCE//g'`"
21812
21813$as_echo "#define OMITTED__D_BSD_SOURCE 1" >>confdefs.h
21814
21815  fi
21816
21817
21818  if echo $CFLAGS | grep " -D_DEFAULT_SOURCE" >/dev/null 2>&1; then
21819    CFLAGS="`echo $CFLAGS | sed -e 's/ -D_DEFAULT_SOURCE//g'`"
21820
21821$as_echo "#define OMITTED__D_DEFAULT_SOURCE 1" >>confdefs.h
21822
21823  fi
21824
21825
21826  if echo $CFLAGS | grep " -D__EXTENSIONS__" >/dev/null 2>&1; then
21827    CFLAGS="`echo $CFLAGS | sed -e 's/ -D__EXTENSIONS__//g'`"
21828
21829$as_echo "#define OMITTED__D__EXTENSIONS__ 1" >>confdefs.h
21830
21831  fi
21832
21833
21834  if echo $CFLAGS | grep " -D_POSIX_C_SOURCE=200112" >/dev/null 2>&1; then
21835    CFLAGS="`echo $CFLAGS | sed -e 's/ -D_POSIX_C_SOURCE=200112//g'`"
21836
21837$as_echo "#define OMITTED__D_POSIX_C_SOURCE_200112 1" >>confdefs.h
21838
21839  fi
21840
21841
21842  if echo $CFLAGS | grep " -D_XOPEN_SOURCE=600" >/dev/null 2>&1; then
21843    CFLAGS="`echo $CFLAGS | sed -e 's/ -D_XOPEN_SOURCE=600//g'`"
21844
21845$as_echo "#define OMITTED__D_XOPEN_SOURCE_600 1" >>confdefs.h
21846
21847  fi
21848
21849
21850  if echo $CFLAGS | grep " -D_XOPEN_SOURCE_EXTENDED=1" >/dev/null 2>&1; then
21851    CFLAGS="`echo $CFLAGS | sed -e 's/ -D_XOPEN_SOURCE_EXTENDED=1//g'`"
21852
21853$as_echo "#define OMITTED__D_XOPEN_SOURCE_EXTENDED_1 1" >>confdefs.h
21854
21855  fi
21856
21857
21858  if echo $CFLAGS | grep " -D_ALL_SOURCE" >/dev/null 2>&1; then
21859    CFLAGS="`echo $CFLAGS | sed -e 's/ -D_ALL_SOURCE//g'`"
21860
21861$as_echo "#define OMITTED__D_ALL_SOURCE 1" >>confdefs.h
21862
21863  fi
21864
21865
21866  if echo $CFLAGS | grep " -D_LARGEFILE_SOURCE=1" >/dev/null 2>&1; then
21867    CFLAGS="`echo $CFLAGS | sed -e 's/ -D_LARGEFILE_SOURCE=1//g'`"
21868
21869$as_echo "#define OMITTED__D_LARGEFILE_SOURCE_1 1" >>confdefs.h
21870
21871  fi
21872
21873
21874if test -n "$LATE_LDFLAGS"; then
21875  LDFLAGS="$LATE_LDFLAGS $LDFLAGS"
21876fi
21877# remove start spaces
21878LDFLAGS=`echo "$LDFLAGS"|sed -e 's/^ *//'`
21879LIBS=`echo "$LIBS"|sed -e 's/^ *//'`
21880
21881
21882cat >>confdefs.h <<_ACEOF
21883#define MAXSYSLOGMSGLEN 10240
21884_ACEOF
21885
21886
21887
21888
21889version=1.15.0
21890
21891date=`date +'%b %e, %Y'`
21892
21893
21894ac_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"
21895
21896ac_config_headers="$ac_config_headers config.h"
21897
21898cat >confcache <<\_ACEOF
21899# This file is a shell script that caches the results of configure
21900# tests run on this system so they can be shared between configure
21901# scripts and configure runs, see configure's option --config-cache.
21902# It is not useful on other systems.  If it contains results you don't
21903# want to keep, you may remove or edit it.
21904#
21905# config.status only pays attention to the cache file if you give it
21906# the --recheck option to rerun configure.
21907#
21908# `ac_cv_env_foo' variables (set or unset) will be overridden when
21909# loading this file, other *unset* `ac_cv_foo' will be assigned the
21910# following values.
21911
21912_ACEOF
21913
21914# The following way of writing the cache mishandles newlines in values,
21915# but we know of no workaround that is simple, portable, and efficient.
21916# So, we kill variables containing newlines.
21917# Ultrix sh set writes to stderr and can't be redirected directly,
21918# and sets the high bit in the cache file unless we assign to the vars.
21919(
21920  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
21921    eval ac_val=\$$ac_var
21922    case $ac_val in #(
21923    *${as_nl}*)
21924      case $ac_var in #(
21925      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
21926$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
21927      esac
21928      case $ac_var in #(
21929      _ | IFS | as_nl) ;; #(
21930      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
21931      *) { eval $ac_var=; unset $ac_var;} ;;
21932      esac ;;
21933    esac
21934  done
21935
21936  (set) 2>&1 |
21937    case $as_nl`(ac_space=' '; set) 2>&1` in #(
21938    *${as_nl}ac_space=\ *)
21939      # `set' does not quote correctly, so add quotes: double-quote
21940      # substitution turns \\\\ into \\, and sed turns \\ into \.
21941      sed -n \
21942	"s/'/'\\\\''/g;
21943	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
21944      ;; #(
21945    *)
21946      # `set' quotes correctly as required by POSIX, so do not add quotes.
21947      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
21948      ;;
21949    esac |
21950    sort
21951) |
21952  sed '
21953     /^ac_cv_env_/b end
21954     t clear
21955     :clear
21956     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
21957     t end
21958     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
21959     :end' >>confcache
21960if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
21961  if test -w "$cache_file"; then
21962    if test "x$cache_file" != "x/dev/null"; then
21963      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
21964$as_echo "$as_me: updating cache $cache_file" >&6;}
21965      if test ! -f "$cache_file" || test -h "$cache_file"; then
21966	cat confcache >"$cache_file"
21967      else
21968        case $cache_file in #(
21969        */* | ?:*)
21970	  mv -f confcache "$cache_file"$$ &&
21971	  mv -f "$cache_file"$$ "$cache_file" ;; #(
21972        *)
21973	  mv -f confcache "$cache_file" ;;
21974	esac
21975      fi
21976    fi
21977  else
21978    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
21979$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
21980  fi
21981fi
21982rm -f confcache
21983
21984test "x$prefix" = xNONE && prefix=$ac_default_prefix
21985# Let make expand exec_prefix.
21986test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
21987
21988DEFS=-DHAVE_CONFIG_H
21989
21990ac_libobjs=
21991ac_ltlibobjs=
21992U=
21993for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
21994  # 1. Remove the extension, and $U if already installed.
21995  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
21996  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
21997  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
21998  #    will be set to the directory where LIBOBJS objects are built.
21999  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
22000  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
22001done
22002LIBOBJS=$ac_libobjs
22003
22004LTLIBOBJS=$ac_ltlibobjs
22005
22006
22007if test -z "${USE_SYSTEMD_TRUE}" && test -z "${USE_SYSTEMD_FALSE}"; then
22008  as_fn_error $? "conditional \"USE_SYSTEMD\" was never defined.
22009Usually this means the macro was only invoked conditionally." "$LINENO" 5
22010fi
22011
22012: "${CONFIG_STATUS=./config.status}"
22013ac_write_fail=0
22014ac_clean_files_save=$ac_clean_files
22015ac_clean_files="$ac_clean_files $CONFIG_STATUS"
22016{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
22017$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
22018as_write_fail=0
22019cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
22020#! $SHELL
22021# Generated by $as_me.
22022# Run this file to recreate the current configuration.
22023# Compiler output produced by configure, useful for debugging
22024# configure, is in config.log if it exists.
22025
22026debug=false
22027ac_cs_recheck=false
22028ac_cs_silent=false
22029
22030SHELL=\${CONFIG_SHELL-$SHELL}
22031export SHELL
22032_ASEOF
22033cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
22034## -------------------- ##
22035## M4sh Initialization. ##
22036## -------------------- ##
22037
22038# Be more Bourne compatible
22039DUALCASE=1; export DUALCASE # for MKS sh
22040if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
22041  emulate sh
22042  NULLCMD=:
22043  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
22044  # is contrary to our usage.  Disable this feature.
22045  alias -g '${1+"$@"}'='"$@"'
22046  setopt NO_GLOB_SUBST
22047else
22048  case `(set -o) 2>/dev/null` in #(
22049  *posix*) :
22050    set -o posix ;; #(
22051  *) :
22052     ;;
22053esac
22054fi
22055
22056
22057as_nl='
22058'
22059export as_nl
22060# Printing a long string crashes Solaris 7 /usr/bin/printf.
22061as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
22062as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
22063as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
22064# Prefer a ksh shell builtin over an external printf program on Solaris,
22065# but without wasting forks for bash or zsh.
22066if test -z "$BASH_VERSION$ZSH_VERSION" \
22067    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
22068  as_echo='print -r --'
22069  as_echo_n='print -rn --'
22070elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
22071  as_echo='printf %s\n'
22072  as_echo_n='printf %s'
22073else
22074  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
22075    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
22076    as_echo_n='/usr/ucb/echo -n'
22077  else
22078    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
22079    as_echo_n_body='eval
22080      arg=$1;
22081      case $arg in #(
22082      *"$as_nl"*)
22083	expr "X$arg" : "X\\(.*\\)$as_nl";
22084	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
22085      esac;
22086      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
22087    '
22088    export as_echo_n_body
22089    as_echo_n='sh -c $as_echo_n_body as_echo'
22090  fi
22091  export as_echo_body
22092  as_echo='sh -c $as_echo_body as_echo'
22093fi
22094
22095# The user is always right.
22096if test "${PATH_SEPARATOR+set}" != set; then
22097  PATH_SEPARATOR=:
22098  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
22099    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
22100      PATH_SEPARATOR=';'
22101  }
22102fi
22103
22104
22105# IFS
22106# We need space, tab and new line, in precisely that order.  Quoting is
22107# there to prevent editors from complaining about space-tab.
22108# (If _AS_PATH_WALK were called with IFS unset, it would disable word
22109# splitting by setting IFS to empty value.)
22110IFS=" ""	$as_nl"
22111
22112# Find who we are.  Look in the path if we contain no directory separator.
22113as_myself=
22114case $0 in #((
22115  *[\\/]* ) as_myself=$0 ;;
22116  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22117for as_dir in $PATH
22118do
22119  IFS=$as_save_IFS
22120  test -z "$as_dir" && as_dir=.
22121    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
22122  done
22123IFS=$as_save_IFS
22124
22125     ;;
22126esac
22127# We did not find ourselves, most probably we were run as `sh COMMAND'
22128# in which case we are not to be found in the path.
22129if test "x$as_myself" = x; then
22130  as_myself=$0
22131fi
22132if test ! -f "$as_myself"; then
22133  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
22134  exit 1
22135fi
22136
22137# Unset variables that we do not need and which cause bugs (e.g. in
22138# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
22139# suppresses any "Segmentation fault" message there.  '((' could
22140# trigger a bug in pdksh 5.2.14.
22141for as_var in BASH_ENV ENV MAIL MAILPATH
22142do eval test x\${$as_var+set} = xset \
22143  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
22144done
22145PS1='$ '
22146PS2='> '
22147PS4='+ '
22148
22149# NLS nuisances.
22150LC_ALL=C
22151export LC_ALL
22152LANGUAGE=C
22153export LANGUAGE
22154
22155# CDPATH.
22156(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
22157
22158
22159# as_fn_error STATUS ERROR [LINENO LOG_FD]
22160# ----------------------------------------
22161# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
22162# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
22163# script with STATUS, using 1 if that was 0.
22164as_fn_error ()
22165{
22166  as_status=$1; test $as_status -eq 0 && as_status=1
22167  if test "$4"; then
22168    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
22169    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
22170  fi
22171  $as_echo "$as_me: error: $2" >&2
22172  as_fn_exit $as_status
22173} # as_fn_error
22174
22175
22176# as_fn_set_status STATUS
22177# -----------------------
22178# Set $? to STATUS, without forking.
22179as_fn_set_status ()
22180{
22181  return $1
22182} # as_fn_set_status
22183
22184# as_fn_exit STATUS
22185# -----------------
22186# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
22187as_fn_exit ()
22188{
22189  set +e
22190  as_fn_set_status $1
22191  exit $1
22192} # as_fn_exit
22193
22194# as_fn_unset VAR
22195# ---------------
22196# Portably unset VAR.
22197as_fn_unset ()
22198{
22199  { eval $1=; unset $1;}
22200}
22201as_unset=as_fn_unset
22202# as_fn_append VAR VALUE
22203# ----------------------
22204# Append the text in VALUE to the end of the definition contained in VAR. Take
22205# advantage of any shell optimizations that allow amortized linear growth over
22206# repeated appends, instead of the typical quadratic growth present in naive
22207# implementations.
22208if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
22209  eval 'as_fn_append ()
22210  {
22211    eval $1+=\$2
22212  }'
22213else
22214  as_fn_append ()
22215  {
22216    eval $1=\$$1\$2
22217  }
22218fi # as_fn_append
22219
22220# as_fn_arith ARG...
22221# ------------------
22222# Perform arithmetic evaluation on the ARGs, and store the result in the
22223# global $as_val. Take advantage of shells that can avoid forks. The arguments
22224# must be portable across $(()) and expr.
22225if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
22226  eval 'as_fn_arith ()
22227  {
22228    as_val=$(( $* ))
22229  }'
22230else
22231  as_fn_arith ()
22232  {
22233    as_val=`expr "$@" || test $? -eq 1`
22234  }
22235fi # as_fn_arith
22236
22237
22238if expr a : '\(a\)' >/dev/null 2>&1 &&
22239   test "X`expr 00001 : '.*\(...\)'`" = X001; then
22240  as_expr=expr
22241else
22242  as_expr=false
22243fi
22244
22245if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
22246  as_basename=basename
22247else
22248  as_basename=false
22249fi
22250
22251if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
22252  as_dirname=dirname
22253else
22254  as_dirname=false
22255fi
22256
22257as_me=`$as_basename -- "$0" ||
22258$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
22259	 X"$0" : 'X\(//\)$' \| \
22260	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
22261$as_echo X/"$0" |
22262    sed '/^.*\/\([^/][^/]*\)\/*$/{
22263	    s//\1/
22264	    q
22265	  }
22266	  /^X\/\(\/\/\)$/{
22267	    s//\1/
22268	    q
22269	  }
22270	  /^X\/\(\/\).*/{
22271	    s//\1/
22272	    q
22273	  }
22274	  s/.*/./; q'`
22275
22276# Avoid depending upon Character Ranges.
22277as_cr_letters='abcdefghijklmnopqrstuvwxyz'
22278as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
22279as_cr_Letters=$as_cr_letters$as_cr_LETTERS
22280as_cr_digits='0123456789'
22281as_cr_alnum=$as_cr_Letters$as_cr_digits
22282
22283ECHO_C= ECHO_N= ECHO_T=
22284case `echo -n x` in #(((((
22285-n*)
22286  case `echo 'xy\c'` in
22287  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
22288  xy)  ECHO_C='\c';;
22289  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
22290       ECHO_T='	';;
22291  esac;;
22292*)
22293  ECHO_N='-n';;
22294esac
22295
22296rm -f conf$$ conf$$.exe conf$$.file
22297if test -d conf$$.dir; then
22298  rm -f conf$$.dir/conf$$.file
22299else
22300  rm -f conf$$.dir
22301  mkdir conf$$.dir 2>/dev/null
22302fi
22303if (echo >conf$$.file) 2>/dev/null; then
22304  if ln -s conf$$.file conf$$ 2>/dev/null; then
22305    as_ln_s='ln -s'
22306    # ... but there are two gotchas:
22307    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
22308    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
22309    # In both cases, we have to default to `cp -pR'.
22310    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
22311      as_ln_s='cp -pR'
22312  elif ln conf$$.file conf$$ 2>/dev/null; then
22313    as_ln_s=ln
22314  else
22315    as_ln_s='cp -pR'
22316  fi
22317else
22318  as_ln_s='cp -pR'
22319fi
22320rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
22321rmdir conf$$.dir 2>/dev/null
22322
22323
22324# as_fn_mkdir_p
22325# -------------
22326# Create "$as_dir" as a directory, including parents if necessary.
22327as_fn_mkdir_p ()
22328{
22329
22330  case $as_dir in #(
22331  -*) as_dir=./$as_dir;;
22332  esac
22333  test -d "$as_dir" || eval $as_mkdir_p || {
22334    as_dirs=
22335    while :; do
22336      case $as_dir in #(
22337      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
22338      *) as_qdir=$as_dir;;
22339      esac
22340      as_dirs="'$as_qdir' $as_dirs"
22341      as_dir=`$as_dirname -- "$as_dir" ||
22342$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
22343	 X"$as_dir" : 'X\(//\)[^/]' \| \
22344	 X"$as_dir" : 'X\(//\)$' \| \
22345	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
22346$as_echo X"$as_dir" |
22347    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
22348	    s//\1/
22349	    q
22350	  }
22351	  /^X\(\/\/\)[^/].*/{
22352	    s//\1/
22353	    q
22354	  }
22355	  /^X\(\/\/\)$/{
22356	    s//\1/
22357	    q
22358	  }
22359	  /^X\(\/\).*/{
22360	    s//\1/
22361	    q
22362	  }
22363	  s/.*/./; q'`
22364      test -d "$as_dir" && break
22365    done
22366    test -z "$as_dirs" || eval "mkdir $as_dirs"
22367  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
22368
22369
22370} # as_fn_mkdir_p
22371if mkdir -p . 2>/dev/null; then
22372  as_mkdir_p='mkdir -p "$as_dir"'
22373else
22374  test -d ./-p && rmdir ./-p
22375  as_mkdir_p=false
22376fi
22377
22378
22379# as_fn_executable_p FILE
22380# -----------------------
22381# Test if FILE is an executable regular file.
22382as_fn_executable_p ()
22383{
22384  test -f "$1" && test -x "$1"
22385} # as_fn_executable_p
22386as_test_x='test -x'
22387as_executable_p=as_fn_executable_p
22388
22389# Sed expression to map a string onto a valid CPP name.
22390as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
22391
22392# Sed expression to map a string onto a valid variable name.
22393as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
22394
22395
22396exec 6>&1
22397## ----------------------------------- ##
22398## Main body of $CONFIG_STATUS script. ##
22399## ----------------------------------- ##
22400_ASEOF
22401test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
22402
22403cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
22404# Save the log message, to keep $0 and so on meaningful, and to
22405# report actual input values of CONFIG_FILES etc. instead of their
22406# values after options handling.
22407ac_log="
22408This file was extended by unbound $as_me 1.15.0, which was
22409generated by GNU Autoconf 2.69.  Invocation command line was
22410
22411  CONFIG_FILES    = $CONFIG_FILES
22412  CONFIG_HEADERS  = $CONFIG_HEADERS
22413  CONFIG_LINKS    = $CONFIG_LINKS
22414  CONFIG_COMMANDS = $CONFIG_COMMANDS
22415  $ $0 $@
22416
22417on `(hostname || uname -n) 2>/dev/null | sed 1q`
22418"
22419
22420_ACEOF
22421
22422case $ac_config_files in *"
22423"*) set x $ac_config_files; shift; ac_config_files=$*;;
22424esac
22425
22426case $ac_config_headers in *"
22427"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
22428esac
22429
22430
22431cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
22432# Files that config.status was made for.
22433config_files="$ac_config_files"
22434config_headers="$ac_config_headers"
22435config_commands="$ac_config_commands"
22436
22437_ACEOF
22438
22439cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
22440ac_cs_usage="\
22441\`$as_me' instantiates files and other configuration actions
22442from templates according to the current configuration.  Unless the files
22443and actions are specified as TAGs, all are instantiated by default.
22444
22445Usage: $0 [OPTION]... [TAG]...
22446
22447  -h, --help       print this help, then exit
22448  -V, --version    print version number and configuration settings, then exit
22449      --config     print configuration, then exit
22450  -q, --quiet, --silent
22451                   do not print progress messages
22452  -d, --debug      don't remove temporary files
22453      --recheck    update $as_me by reconfiguring in the same conditions
22454      --file=FILE[:TEMPLATE]
22455                   instantiate the configuration file FILE
22456      --header=FILE[:TEMPLATE]
22457                   instantiate the configuration header FILE
22458
22459Configuration files:
22460$config_files
22461
22462Configuration headers:
22463$config_headers
22464
22465Configuration commands:
22466$config_commands
22467
22468Report bugs to <unbound-bugs@nlnetlabs.nl or https://github.com/NLnetLabs/unbound/issues>."
22469
22470_ACEOF
22471cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
22472ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
22473ac_cs_version="\\
22474unbound config.status 1.15.0
22475configured by $0, generated by GNU Autoconf 2.69,
22476  with options \\"\$ac_cs_config\\"
22477
22478Copyright (C) 2012 Free Software Foundation, Inc.
22479This config.status script is free software; the Free Software Foundation
22480gives unlimited permission to copy, distribute and modify it."
22481
22482ac_pwd='$ac_pwd'
22483srcdir='$srcdir'
22484AWK='$AWK'
22485test -n "\$AWK" || AWK=awk
22486_ACEOF
22487
22488cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
22489# The default lists apply if the user does not specify any file.
22490ac_need_defaults=:
22491while test $# != 0
22492do
22493  case $1 in
22494  --*=?*)
22495    ac_option=`expr "X$1" : 'X\([^=]*\)='`
22496    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
22497    ac_shift=:
22498    ;;
22499  --*=)
22500    ac_option=`expr "X$1" : 'X\([^=]*\)='`
22501    ac_optarg=
22502    ac_shift=:
22503    ;;
22504  *)
22505    ac_option=$1
22506    ac_optarg=$2
22507    ac_shift=shift
22508    ;;
22509  esac
22510
22511  case $ac_option in
22512  # Handling of the options.
22513  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
22514    ac_cs_recheck=: ;;
22515  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
22516    $as_echo "$ac_cs_version"; exit ;;
22517  --config | --confi | --conf | --con | --co | --c )
22518    $as_echo "$ac_cs_config"; exit ;;
22519  --debug | --debu | --deb | --de | --d | -d )
22520    debug=: ;;
22521  --file | --fil | --fi | --f )
22522    $ac_shift
22523    case $ac_optarg in
22524    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
22525    '') as_fn_error $? "missing file argument" ;;
22526    esac
22527    as_fn_append CONFIG_FILES " '$ac_optarg'"
22528    ac_need_defaults=false;;
22529  --header | --heade | --head | --hea )
22530    $ac_shift
22531    case $ac_optarg in
22532    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
22533    esac
22534    as_fn_append CONFIG_HEADERS " '$ac_optarg'"
22535    ac_need_defaults=false;;
22536  --he | --h)
22537    # Conflict between --help and --header
22538    as_fn_error $? "ambiguous option: \`$1'
22539Try \`$0 --help' for more information.";;
22540  --help | --hel | -h )
22541    $as_echo "$ac_cs_usage"; exit ;;
22542  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
22543  | -silent | --silent | --silen | --sile | --sil | --si | --s)
22544    ac_cs_silent=: ;;
22545
22546  # This is an error.
22547  -*) as_fn_error $? "unrecognized option: \`$1'
22548Try \`$0 --help' for more information." ;;
22549
22550  *) as_fn_append ac_config_targets " $1"
22551     ac_need_defaults=false ;;
22552
22553  esac
22554  shift
22555done
22556
22557ac_configure_extra_args=
22558
22559if $ac_cs_silent; then
22560  exec 6>/dev/null
22561  ac_configure_extra_args="$ac_configure_extra_args --silent"
22562fi
22563
22564_ACEOF
22565cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
22566if \$ac_cs_recheck; then
22567  set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
22568  shift
22569  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
22570  CONFIG_SHELL='$SHELL'
22571  export CONFIG_SHELL
22572  exec "\$@"
22573fi
22574
22575_ACEOF
22576cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
22577exec 5>>config.log
22578{
22579  echo
22580  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
22581## Running $as_me. ##
22582_ASBOX
22583  $as_echo "$ac_log"
22584} >&5
22585
22586_ACEOF
22587cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
22588#
22589# INIT-COMMANDS
22590#
22591
22592
22593# The HP-UX ksh and POSIX shell print the target directory to stdout
22594# if CDPATH is set.
22595(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
22596
22597sed_quote_subst='$sed_quote_subst'
22598double_quote_subst='$double_quote_subst'
22599delay_variable_subst='$delay_variable_subst'
22600macro_version='`$ECHO "$macro_version" | $SED "$delay_single_quote_subst"`'
22601macro_revision='`$ECHO "$macro_revision" | $SED "$delay_single_quote_subst"`'
22602enable_shared='`$ECHO "$enable_shared" | $SED "$delay_single_quote_subst"`'
22603enable_static='`$ECHO "$enable_static" | $SED "$delay_single_quote_subst"`'
22604pic_mode='`$ECHO "$pic_mode" | $SED "$delay_single_quote_subst"`'
22605enable_fast_install='`$ECHO "$enable_fast_install" | $SED "$delay_single_quote_subst"`'
22606shared_archive_member_spec='`$ECHO "$shared_archive_member_spec" | $SED "$delay_single_quote_subst"`'
22607SHELL='`$ECHO "$SHELL" | $SED "$delay_single_quote_subst"`'
22608ECHO='`$ECHO "$ECHO" | $SED "$delay_single_quote_subst"`'
22609PATH_SEPARATOR='`$ECHO "$PATH_SEPARATOR" | $SED "$delay_single_quote_subst"`'
22610host_alias='`$ECHO "$host_alias" | $SED "$delay_single_quote_subst"`'
22611host='`$ECHO "$host" | $SED "$delay_single_quote_subst"`'
22612host_os='`$ECHO "$host_os" | $SED "$delay_single_quote_subst"`'
22613build_alias='`$ECHO "$build_alias" | $SED "$delay_single_quote_subst"`'
22614build='`$ECHO "$build" | $SED "$delay_single_quote_subst"`'
22615build_os='`$ECHO "$build_os" | $SED "$delay_single_quote_subst"`'
22616SED='`$ECHO "$SED" | $SED "$delay_single_quote_subst"`'
22617Xsed='`$ECHO "$Xsed" | $SED "$delay_single_quote_subst"`'
22618GREP='`$ECHO "$GREP" | $SED "$delay_single_quote_subst"`'
22619EGREP='`$ECHO "$EGREP" | $SED "$delay_single_quote_subst"`'
22620FGREP='`$ECHO "$FGREP" | $SED "$delay_single_quote_subst"`'
22621LD='`$ECHO "$LD" | $SED "$delay_single_quote_subst"`'
22622NM='`$ECHO "$NM" | $SED "$delay_single_quote_subst"`'
22623LN_S='`$ECHO "$LN_S" | $SED "$delay_single_quote_subst"`'
22624max_cmd_len='`$ECHO "$max_cmd_len" | $SED "$delay_single_quote_subst"`'
22625ac_objext='`$ECHO "$ac_objext" | $SED "$delay_single_quote_subst"`'
22626exeext='`$ECHO "$exeext" | $SED "$delay_single_quote_subst"`'
22627lt_unset='`$ECHO "$lt_unset" | $SED "$delay_single_quote_subst"`'
22628lt_SP2NL='`$ECHO "$lt_SP2NL" | $SED "$delay_single_quote_subst"`'
22629lt_NL2SP='`$ECHO "$lt_NL2SP" | $SED "$delay_single_quote_subst"`'
22630lt_cv_to_host_file_cmd='`$ECHO "$lt_cv_to_host_file_cmd" | $SED "$delay_single_quote_subst"`'
22631lt_cv_to_tool_file_cmd='`$ECHO "$lt_cv_to_tool_file_cmd" | $SED "$delay_single_quote_subst"`'
22632reload_flag='`$ECHO "$reload_flag" | $SED "$delay_single_quote_subst"`'
22633reload_cmds='`$ECHO "$reload_cmds" | $SED "$delay_single_quote_subst"`'
22634OBJDUMP='`$ECHO "$OBJDUMP" | $SED "$delay_single_quote_subst"`'
22635deplibs_check_method='`$ECHO "$deplibs_check_method" | $SED "$delay_single_quote_subst"`'
22636file_magic_cmd='`$ECHO "$file_magic_cmd" | $SED "$delay_single_quote_subst"`'
22637file_magic_glob='`$ECHO "$file_magic_glob" | $SED "$delay_single_quote_subst"`'
22638want_nocaseglob='`$ECHO "$want_nocaseglob" | $SED "$delay_single_quote_subst"`'
22639DLLTOOL='`$ECHO "$DLLTOOL" | $SED "$delay_single_quote_subst"`'
22640sharedlib_from_linklib_cmd='`$ECHO "$sharedlib_from_linklib_cmd" | $SED "$delay_single_quote_subst"`'
22641AR='`$ECHO "$AR" | $SED "$delay_single_quote_subst"`'
22642AR_FLAGS='`$ECHO "$AR_FLAGS" | $SED "$delay_single_quote_subst"`'
22643archiver_list_spec='`$ECHO "$archiver_list_spec" | $SED "$delay_single_quote_subst"`'
22644STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`'
22645RANLIB='`$ECHO "$RANLIB" | $SED "$delay_single_quote_subst"`'
22646old_postinstall_cmds='`$ECHO "$old_postinstall_cmds" | $SED "$delay_single_quote_subst"`'
22647old_postuninstall_cmds='`$ECHO "$old_postuninstall_cmds" | $SED "$delay_single_quote_subst"`'
22648old_archive_cmds='`$ECHO "$old_archive_cmds" | $SED "$delay_single_quote_subst"`'
22649lock_old_archive_extraction='`$ECHO "$lock_old_archive_extraction" | $SED "$delay_single_quote_subst"`'
22650CC='`$ECHO "$CC" | $SED "$delay_single_quote_subst"`'
22651CFLAGS='`$ECHO "$CFLAGS" | $SED "$delay_single_quote_subst"`'
22652compiler='`$ECHO "$compiler" | $SED "$delay_single_quote_subst"`'
22653GCC='`$ECHO "$GCC" | $SED "$delay_single_quote_subst"`'
22654lt_cv_sys_global_symbol_pipe='`$ECHO "$lt_cv_sys_global_symbol_pipe" | $SED "$delay_single_quote_subst"`'
22655lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`'
22656lt_cv_sys_global_symbol_to_import='`$ECHO "$lt_cv_sys_global_symbol_to_import" | $SED "$delay_single_quote_subst"`'
22657lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`'
22658lt_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"`'
22659lt_cv_nm_interface='`$ECHO "$lt_cv_nm_interface" | $SED "$delay_single_quote_subst"`'
22660nm_file_list_spec='`$ECHO "$nm_file_list_spec" | $SED "$delay_single_quote_subst"`'
22661lt_sysroot='`$ECHO "$lt_sysroot" | $SED "$delay_single_quote_subst"`'
22662lt_cv_truncate_bin='`$ECHO "$lt_cv_truncate_bin" | $SED "$delay_single_quote_subst"`'
22663objdir='`$ECHO "$objdir" | $SED "$delay_single_quote_subst"`'
22664MAGIC_CMD='`$ECHO "$MAGIC_CMD" | $SED "$delay_single_quote_subst"`'
22665lt_prog_compiler_no_builtin_flag='`$ECHO "$lt_prog_compiler_no_builtin_flag" | $SED "$delay_single_quote_subst"`'
22666lt_prog_compiler_pic='`$ECHO "$lt_prog_compiler_pic" | $SED "$delay_single_quote_subst"`'
22667lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`'
22668lt_prog_compiler_static='`$ECHO "$lt_prog_compiler_static" | $SED "$delay_single_quote_subst"`'
22669lt_cv_prog_compiler_c_o='`$ECHO "$lt_cv_prog_compiler_c_o" | $SED "$delay_single_quote_subst"`'
22670need_locks='`$ECHO "$need_locks" | $SED "$delay_single_quote_subst"`'
22671MANIFEST_TOOL='`$ECHO "$MANIFEST_TOOL" | $SED "$delay_single_quote_subst"`'
22672DSYMUTIL='`$ECHO "$DSYMUTIL" | $SED "$delay_single_quote_subst"`'
22673NMEDIT='`$ECHO "$NMEDIT" | $SED "$delay_single_quote_subst"`'
22674LIPO='`$ECHO "$LIPO" | $SED "$delay_single_quote_subst"`'
22675OTOOL='`$ECHO "$OTOOL" | $SED "$delay_single_quote_subst"`'
22676OTOOL64='`$ECHO "$OTOOL64" | $SED "$delay_single_quote_subst"`'
22677libext='`$ECHO "$libext" | $SED "$delay_single_quote_subst"`'
22678shrext_cmds='`$ECHO "$shrext_cmds" | $SED "$delay_single_quote_subst"`'
22679extract_expsyms_cmds='`$ECHO "$extract_expsyms_cmds" | $SED "$delay_single_quote_subst"`'
22680archive_cmds_need_lc='`$ECHO "$archive_cmds_need_lc" | $SED "$delay_single_quote_subst"`'
22681enable_shared_with_static_runtimes='`$ECHO "$enable_shared_with_static_runtimes" | $SED "$delay_single_quote_subst"`'
22682export_dynamic_flag_spec='`$ECHO "$export_dynamic_flag_spec" | $SED "$delay_single_quote_subst"`'
22683whole_archive_flag_spec='`$ECHO "$whole_archive_flag_spec" | $SED "$delay_single_quote_subst"`'
22684compiler_needs_object='`$ECHO "$compiler_needs_object" | $SED "$delay_single_quote_subst"`'
22685old_archive_from_new_cmds='`$ECHO "$old_archive_from_new_cmds" | $SED "$delay_single_quote_subst"`'
22686old_archive_from_expsyms_cmds='`$ECHO "$old_archive_from_expsyms_cmds" | $SED "$delay_single_quote_subst"`'
22687archive_cmds='`$ECHO "$archive_cmds" | $SED "$delay_single_quote_subst"`'
22688archive_expsym_cmds='`$ECHO "$archive_expsym_cmds" | $SED "$delay_single_quote_subst"`'
22689module_cmds='`$ECHO "$module_cmds" | $SED "$delay_single_quote_subst"`'
22690module_expsym_cmds='`$ECHO "$module_expsym_cmds" | $SED "$delay_single_quote_subst"`'
22691with_gnu_ld='`$ECHO "$with_gnu_ld" | $SED "$delay_single_quote_subst"`'
22692allow_undefined_flag='`$ECHO "$allow_undefined_flag" | $SED "$delay_single_quote_subst"`'
22693no_undefined_flag='`$ECHO "$no_undefined_flag" | $SED "$delay_single_quote_subst"`'
22694hardcode_libdir_flag_spec='`$ECHO "$hardcode_libdir_flag_spec" | $SED "$delay_single_quote_subst"`'
22695hardcode_libdir_separator='`$ECHO "$hardcode_libdir_separator" | $SED "$delay_single_quote_subst"`'
22696hardcode_direct='`$ECHO "$hardcode_direct" | $SED "$delay_single_quote_subst"`'
22697hardcode_direct_absolute='`$ECHO "$hardcode_direct_absolute" | $SED "$delay_single_quote_subst"`'
22698hardcode_minus_L='`$ECHO "$hardcode_minus_L" | $SED "$delay_single_quote_subst"`'
22699hardcode_shlibpath_var='`$ECHO "$hardcode_shlibpath_var" | $SED "$delay_single_quote_subst"`'
22700hardcode_automatic='`$ECHO "$hardcode_automatic" | $SED "$delay_single_quote_subst"`'
22701inherit_rpath='`$ECHO "$inherit_rpath" | $SED "$delay_single_quote_subst"`'
22702link_all_deplibs='`$ECHO "$link_all_deplibs" | $SED "$delay_single_quote_subst"`'
22703always_export_symbols='`$ECHO "$always_export_symbols" | $SED "$delay_single_quote_subst"`'
22704export_symbols_cmds='`$ECHO "$export_symbols_cmds" | $SED "$delay_single_quote_subst"`'
22705exclude_expsyms='`$ECHO "$exclude_expsyms" | $SED "$delay_single_quote_subst"`'
22706include_expsyms='`$ECHO "$include_expsyms" | $SED "$delay_single_quote_subst"`'
22707prelink_cmds='`$ECHO "$prelink_cmds" | $SED "$delay_single_quote_subst"`'
22708postlink_cmds='`$ECHO "$postlink_cmds" | $SED "$delay_single_quote_subst"`'
22709file_list_spec='`$ECHO "$file_list_spec" | $SED "$delay_single_quote_subst"`'
22710variables_saved_for_relink='`$ECHO "$variables_saved_for_relink" | $SED "$delay_single_quote_subst"`'
22711need_lib_prefix='`$ECHO "$need_lib_prefix" | $SED "$delay_single_quote_subst"`'
22712need_version='`$ECHO "$need_version" | $SED "$delay_single_quote_subst"`'
22713version_type='`$ECHO "$version_type" | $SED "$delay_single_quote_subst"`'
22714runpath_var='`$ECHO "$runpath_var" | $SED "$delay_single_quote_subst"`'
22715shlibpath_var='`$ECHO "$shlibpath_var" | $SED "$delay_single_quote_subst"`'
22716shlibpath_overrides_runpath='`$ECHO "$shlibpath_overrides_runpath" | $SED "$delay_single_quote_subst"`'
22717libname_spec='`$ECHO "$libname_spec" | $SED "$delay_single_quote_subst"`'
22718library_names_spec='`$ECHO "$library_names_spec" | $SED "$delay_single_quote_subst"`'
22719soname_spec='`$ECHO "$soname_spec" | $SED "$delay_single_quote_subst"`'
22720install_override_mode='`$ECHO "$install_override_mode" | $SED "$delay_single_quote_subst"`'
22721postinstall_cmds='`$ECHO "$postinstall_cmds" | $SED "$delay_single_quote_subst"`'
22722postuninstall_cmds='`$ECHO "$postuninstall_cmds" | $SED "$delay_single_quote_subst"`'
22723finish_cmds='`$ECHO "$finish_cmds" | $SED "$delay_single_quote_subst"`'
22724finish_eval='`$ECHO "$finish_eval" | $SED "$delay_single_quote_subst"`'
22725hardcode_into_libs='`$ECHO "$hardcode_into_libs" | $SED "$delay_single_quote_subst"`'
22726sys_lib_search_path_spec='`$ECHO "$sys_lib_search_path_spec" | $SED "$delay_single_quote_subst"`'
22727configure_time_dlsearch_path='`$ECHO "$configure_time_dlsearch_path" | $SED "$delay_single_quote_subst"`'
22728configure_time_lt_sys_library_path='`$ECHO "$configure_time_lt_sys_library_path" | $SED "$delay_single_quote_subst"`'
22729hardcode_action='`$ECHO "$hardcode_action" | $SED "$delay_single_quote_subst"`'
22730enable_dlopen='`$ECHO "$enable_dlopen" | $SED "$delay_single_quote_subst"`'
22731enable_dlopen_self='`$ECHO "$enable_dlopen_self" | $SED "$delay_single_quote_subst"`'
22732enable_dlopen_self_static='`$ECHO "$enable_dlopen_self_static" | $SED "$delay_single_quote_subst"`'
22733old_striplib='`$ECHO "$old_striplib" | $SED "$delay_single_quote_subst"`'
22734striplib='`$ECHO "$striplib" | $SED "$delay_single_quote_subst"`'
22735
22736LTCC='$LTCC'
22737LTCFLAGS='$LTCFLAGS'
22738compiler='$compiler_DEFAULT'
22739
22740# A function that is used when there is no print builtin or printf.
22741func_fallback_echo ()
22742{
22743  eval 'cat <<_LTECHO_EOF
22744\$1
22745_LTECHO_EOF'
22746}
22747
22748# Quote evaled strings.
22749for var in SHELL \
22750ECHO \
22751PATH_SEPARATOR \
22752SED \
22753GREP \
22754EGREP \
22755FGREP \
22756LD \
22757NM \
22758LN_S \
22759lt_SP2NL \
22760lt_NL2SP \
22761reload_flag \
22762OBJDUMP \
22763deplibs_check_method \
22764file_magic_cmd \
22765file_magic_glob \
22766want_nocaseglob \
22767DLLTOOL \
22768sharedlib_from_linklib_cmd \
22769AR \
22770AR_FLAGS \
22771archiver_list_spec \
22772STRIP \
22773RANLIB \
22774CC \
22775CFLAGS \
22776compiler \
22777lt_cv_sys_global_symbol_pipe \
22778lt_cv_sys_global_symbol_to_cdecl \
22779lt_cv_sys_global_symbol_to_import \
22780lt_cv_sys_global_symbol_to_c_name_address \
22781lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \
22782lt_cv_nm_interface \
22783nm_file_list_spec \
22784lt_cv_truncate_bin \
22785lt_prog_compiler_no_builtin_flag \
22786lt_prog_compiler_pic \
22787lt_prog_compiler_wl \
22788lt_prog_compiler_static \
22789lt_cv_prog_compiler_c_o \
22790need_locks \
22791MANIFEST_TOOL \
22792DSYMUTIL \
22793NMEDIT \
22794LIPO \
22795OTOOL \
22796OTOOL64 \
22797shrext_cmds \
22798export_dynamic_flag_spec \
22799whole_archive_flag_spec \
22800compiler_needs_object \
22801with_gnu_ld \
22802allow_undefined_flag \
22803no_undefined_flag \
22804hardcode_libdir_flag_spec \
22805hardcode_libdir_separator \
22806exclude_expsyms \
22807include_expsyms \
22808file_list_spec \
22809variables_saved_for_relink \
22810libname_spec \
22811library_names_spec \
22812soname_spec \
22813install_override_mode \
22814finish_eval \
22815old_striplib \
22816striplib; do
22817    case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
22818    *[\\\\\\\`\\"\\\$]*)
22819      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes
22820      ;;
22821    *)
22822      eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
22823      ;;
22824    esac
22825done
22826
22827# Double-quote double-evaled strings.
22828for var in reload_cmds \
22829old_postinstall_cmds \
22830old_postuninstall_cmds \
22831old_archive_cmds \
22832extract_expsyms_cmds \
22833old_archive_from_new_cmds \
22834old_archive_from_expsyms_cmds \
22835archive_cmds \
22836archive_expsym_cmds \
22837module_cmds \
22838module_expsym_cmds \
22839export_symbols_cmds \
22840prelink_cmds \
22841postlink_cmds \
22842postinstall_cmds \
22843postuninstall_cmds \
22844finish_cmds \
22845sys_lib_search_path_spec \
22846configure_time_dlsearch_path \
22847configure_time_lt_sys_library_path; do
22848    case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
22849    *[\\\\\\\`\\"\\\$]*)
22850      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes
22851      ;;
22852    *)
22853      eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
22854      ;;
22855    esac
22856done
22857
22858ac_aux_dir='$ac_aux_dir'
22859
22860# See if we are running on zsh, and set the options that allow our
22861# commands through without removal of \ escapes INIT.
22862if test -n "\${ZSH_VERSION+set}"; then
22863   setopt NO_GLOB_SUBST
22864fi
22865
22866
22867    PACKAGE='$PACKAGE'
22868    VERSION='$VERSION'
22869    RM='$RM'
22870    ofile='$ofile'
22871
22872
22873
22874
22875_ACEOF
22876
22877cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
22878
22879# Handling of arguments.
22880for ac_config_target in $ac_config_targets
22881do
22882  case $ac_config_target in
22883    "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;;
22884    "disable-rpath") CONFIG_COMMANDS="$CONFIG_COMMANDS disable-rpath" ;;
22885    "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
22886    "doc/example.conf") CONFIG_FILES="$CONFIG_FILES doc/example.conf" ;;
22887    "doc/libunbound.3") CONFIG_FILES="$CONFIG_FILES doc/libunbound.3" ;;
22888    "doc/unbound.8") CONFIG_FILES="$CONFIG_FILES doc/unbound.8" ;;
22889    "doc/unbound-anchor.8") CONFIG_FILES="$CONFIG_FILES doc/unbound-anchor.8" ;;
22890    "doc/unbound-checkconf.8") CONFIG_FILES="$CONFIG_FILES doc/unbound-checkconf.8" ;;
22891    "doc/unbound.conf.5") CONFIG_FILES="$CONFIG_FILES doc/unbound.conf.5" ;;
22892    "doc/unbound-control.8") CONFIG_FILES="$CONFIG_FILES doc/unbound-control.8" ;;
22893    "doc/unbound-host.1") CONFIG_FILES="$CONFIG_FILES doc/unbound-host.1" ;;
22894    "smallapp/unbound-control-setup.sh") CONFIG_FILES="$CONFIG_FILES smallapp/unbound-control-setup.sh" ;;
22895    "dnstap/dnstap_config.h") CONFIG_FILES="$CONFIG_FILES dnstap/dnstap_config.h" ;;
22896    "dnscrypt/dnscrypt_config.h") CONFIG_FILES="$CONFIG_FILES dnscrypt/dnscrypt_config.h" ;;
22897    "contrib/libunbound.pc") CONFIG_FILES="$CONFIG_FILES contrib/libunbound.pc" ;;
22898    "contrib/unbound.socket") CONFIG_FILES="$CONFIG_FILES contrib/unbound.socket" ;;
22899    "contrib/unbound.service") CONFIG_FILES="$CONFIG_FILES contrib/unbound.service" ;;
22900    "contrib/unbound_portable.service") CONFIG_FILES="$CONFIG_FILES contrib/unbound_portable.service" ;;
22901    "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
22902
22903  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
22904  esac
22905done
22906
22907
22908# If the user did not use the arguments to specify the items to instantiate,
22909# then the envvar interface is used.  Set only those that are not.
22910# We use the long form for the default assignment because of an extremely
22911# bizarre bug on SunOS 4.1.3.
22912if $ac_need_defaults; then
22913  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
22914  test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
22915  test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
22916fi
22917
22918# Have a temporary directory for convenience.  Make it in the build tree
22919# simply because there is no reason against having it here, and in addition,
22920# creating and moving files from /tmp can sometimes cause problems.
22921# Hook for its removal unless debugging.
22922# Note that there is a small window in which the directory will not be cleaned:
22923# after its creation but before its name has been assigned to `$tmp'.
22924$debug ||
22925{
22926  tmp= ac_tmp=
22927  trap 'exit_status=$?
22928  : "${ac_tmp:=$tmp}"
22929  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
22930' 0
22931  trap 'as_fn_exit 1' 1 2 13 15
22932}
22933# Create a (secure) tmp directory for tmp files.
22934
22935{
22936  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
22937  test -d "$tmp"
22938}  ||
22939{
22940  tmp=./conf$$-$RANDOM
22941  (umask 077 && mkdir "$tmp")
22942} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
22943ac_tmp=$tmp
22944
22945# Set up the scripts for CONFIG_FILES section.
22946# No need to generate them if there are no CONFIG_FILES.
22947# This happens for instance with `./config.status config.h'.
22948if test -n "$CONFIG_FILES"; then
22949
22950
22951ac_cr=`echo X | tr X '\015'`
22952# On cygwin, bash can eat \r inside `` if the user requested igncr.
22953# But we know of no other shell where ac_cr would be empty at this
22954# point, so we can use a bashism as a fallback.
22955if test "x$ac_cr" = x; then
22956  eval ac_cr=\$\'\\r\'
22957fi
22958ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
22959if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
22960  ac_cs_awk_cr='\\r'
22961else
22962  ac_cs_awk_cr=$ac_cr
22963fi
22964
22965echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
22966_ACEOF
22967
22968
22969{
22970  echo "cat >conf$$subs.awk <<_ACEOF" &&
22971  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
22972  echo "_ACEOF"
22973} >conf$$subs.sh ||
22974  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
22975ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
22976ac_delim='%!_!# '
22977for ac_last_try in false false false false false :; do
22978  . ./conf$$subs.sh ||
22979    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
22980
22981  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
22982  if test $ac_delim_n = $ac_delim_num; then
22983    break
22984  elif $ac_last_try; then
22985    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
22986  else
22987    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
22988  fi
22989done
22990rm -f conf$$subs.sh
22991
22992cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
22993cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
22994_ACEOF
22995sed -n '
22996h
22997s/^/S["/; s/!.*/"]=/
22998p
22999g
23000s/^[^!]*!//
23001:repl
23002t repl
23003s/'"$ac_delim"'$//
23004t delim
23005:nl
23006h
23007s/\(.\{148\}\)..*/\1/
23008t more1
23009s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
23010p
23011n
23012b repl
23013:more1
23014s/["\\]/\\&/g; s/^/"/; s/$/"\\/
23015p
23016g
23017s/.\{148\}//
23018t nl
23019:delim
23020h
23021s/\(.\{148\}\)..*/\1/
23022t more2
23023s/["\\]/\\&/g; s/^/"/; s/$/"/
23024p
23025b
23026:more2
23027s/["\\]/\\&/g; s/^/"/; s/$/"\\/
23028p
23029g
23030s/.\{148\}//
23031t delim
23032' <conf$$subs.awk | sed '
23033/^[^""]/{
23034  N
23035  s/\n//
23036}
23037' >>$CONFIG_STATUS || ac_write_fail=1
23038rm -f conf$$subs.awk
23039cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
23040_ACAWK
23041cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
23042  for (key in S) S_is_set[key] = 1
23043  FS = ""
23044
23045}
23046{
23047  line = $ 0
23048  nfields = split(line, field, "@")
23049  substed = 0
23050  len = length(field[1])
23051  for (i = 2; i < nfields; i++) {
23052    key = field[i]
23053    keylen = length(key)
23054    if (S_is_set[key]) {
23055      value = S[key]
23056      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
23057      len += length(value) + length(field[++i])
23058      substed = 1
23059    } else
23060      len += 1 + keylen
23061  }
23062
23063  print line
23064}
23065
23066_ACAWK
23067_ACEOF
23068cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
23069if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
23070  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
23071else
23072  cat
23073fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
23074  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
23075_ACEOF
23076
23077# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
23078# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
23079# trailing colons and then remove the whole line if VPATH becomes empty
23080# (actually we leave an empty line to preserve line numbers).
23081if test "x$srcdir" = x.; then
23082  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
23083h
23084s///
23085s/^/:/
23086s/[	 ]*$/:/
23087s/:\$(srcdir):/:/g
23088s/:\${srcdir}:/:/g
23089s/:@srcdir@:/:/g
23090s/^:*//
23091s/:*$//
23092x
23093s/\(=[	 ]*\).*/\1/
23094G
23095s/\n//
23096s/^[^=]*=[	 ]*$//
23097}'
23098fi
23099
23100cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
23101fi # test -n "$CONFIG_FILES"
23102
23103# Set up the scripts for CONFIG_HEADERS section.
23104# No need to generate them if there are no CONFIG_HEADERS.
23105# This happens for instance with `./config.status Makefile'.
23106if test -n "$CONFIG_HEADERS"; then
23107cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
23108BEGIN {
23109_ACEOF
23110
23111# Transform confdefs.h into an awk script `defines.awk', embedded as
23112# here-document in config.status, that substitutes the proper values into
23113# config.h.in to produce config.h.
23114
23115# Create a delimiter string that does not exist in confdefs.h, to ease
23116# handling of long lines.
23117ac_delim='%!_!# '
23118for ac_last_try in false false :; do
23119  ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
23120  if test -z "$ac_tt"; then
23121    break
23122  elif $ac_last_try; then
23123    as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
23124  else
23125    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
23126  fi
23127done
23128
23129# For the awk script, D is an array of macro values keyed by name,
23130# likewise P contains macro parameters if any.  Preserve backslash
23131# newline sequences.
23132
23133ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
23134sed -n '
23135s/.\{148\}/&'"$ac_delim"'/g
23136t rset
23137:rset
23138s/^[	 ]*#[	 ]*define[	 ][	 ]*/ /
23139t def
23140d
23141:def
23142s/\\$//
23143t bsnl
23144s/["\\]/\\&/g
23145s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
23146D["\1"]=" \3"/p
23147s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2"/p
23148d
23149:bsnl
23150s/["\\]/\\&/g
23151s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
23152D["\1"]=" \3\\\\\\n"\\/p
23153t cont
23154s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
23155t cont
23156d
23157:cont
23158n
23159s/.\{148\}/&'"$ac_delim"'/g
23160t clear
23161:clear
23162s/\\$//
23163t bsnlc
23164s/["\\]/\\&/g; s/^/"/; s/$/"/p
23165d
23166:bsnlc
23167s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
23168b cont
23169' <confdefs.h | sed '
23170s/'"$ac_delim"'/"\\\
23171"/g' >>$CONFIG_STATUS || ac_write_fail=1
23172
23173cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
23174  for (key in D) D_is_set[key] = 1
23175  FS = ""
23176}
23177/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
23178  line = \$ 0
23179  split(line, arg, " ")
23180  if (arg[1] == "#") {
23181    defundef = arg[2]
23182    mac1 = arg[3]
23183  } else {
23184    defundef = substr(arg[1], 2)
23185    mac1 = arg[2]
23186  }
23187  split(mac1, mac2, "(") #)
23188  macro = mac2[1]
23189  prefix = substr(line, 1, index(line, defundef) - 1)
23190  if (D_is_set[macro]) {
23191    # Preserve the white space surrounding the "#".
23192    print prefix "define", macro P[macro] D[macro]
23193    next
23194  } else {
23195    # Replace #undef with comments.  This is necessary, for example,
23196    # in the case of _POSIX_SOURCE, which is predefined and required
23197    # on some systems where configure will not decide to define it.
23198    if (defundef == "undef") {
23199      print "/*", prefix defundef, macro, "*/"
23200      next
23201    }
23202  }
23203}
23204{ print }
23205_ACAWK
23206_ACEOF
23207cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
23208  as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
23209fi # test -n "$CONFIG_HEADERS"
23210
23211
23212eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS    :C $CONFIG_COMMANDS"
23213shift
23214for ac_tag
23215do
23216  case $ac_tag in
23217  :[FHLC]) ac_mode=$ac_tag; continue;;
23218  esac
23219  case $ac_mode$ac_tag in
23220  :[FHL]*:*);;
23221  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
23222  :[FH]-) ac_tag=-:-;;
23223  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
23224  esac
23225  ac_save_IFS=$IFS
23226  IFS=:
23227  set x $ac_tag
23228  IFS=$ac_save_IFS
23229  shift
23230  ac_file=$1
23231  shift
23232
23233  case $ac_mode in
23234  :L) ac_source=$1;;
23235  :[FH])
23236    ac_file_inputs=
23237    for ac_f
23238    do
23239      case $ac_f in
23240      -) ac_f="$ac_tmp/stdin";;
23241      *) # Look for the file first in the build tree, then in the source tree
23242	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
23243	 # because $ac_f cannot contain `:'.
23244	 test -f "$ac_f" ||
23245	   case $ac_f in
23246	   [\\/$]*) false;;
23247	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
23248	   esac ||
23249	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
23250      esac
23251      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
23252      as_fn_append ac_file_inputs " '$ac_f'"
23253    done
23254
23255    # Let's still pretend it is `configure' which instantiates (i.e., don't
23256    # use $as_me), people would be surprised to read:
23257    #    /* config.h.  Generated by config.status.  */
23258    configure_input='Generated from '`
23259	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
23260	`' by configure.'
23261    if test x"$ac_file" != x-; then
23262      configure_input="$ac_file.  $configure_input"
23263      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
23264$as_echo "$as_me: creating $ac_file" >&6;}
23265    fi
23266    # Neutralize special characters interpreted by sed in replacement strings.
23267    case $configure_input in #(
23268    *\&* | *\|* | *\\* )
23269       ac_sed_conf_input=`$as_echo "$configure_input" |
23270       sed 's/[\\\\&|]/\\\\&/g'`;; #(
23271    *) ac_sed_conf_input=$configure_input;;
23272    esac
23273
23274    case $ac_tag in
23275    *:-:* | *:-) cat >"$ac_tmp/stdin" \
23276      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
23277    esac
23278    ;;
23279  esac
23280
23281  ac_dir=`$as_dirname -- "$ac_file" ||
23282$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
23283	 X"$ac_file" : 'X\(//\)[^/]' \| \
23284	 X"$ac_file" : 'X\(//\)$' \| \
23285	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
23286$as_echo X"$ac_file" |
23287    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
23288	    s//\1/
23289	    q
23290	  }
23291	  /^X\(\/\/\)[^/].*/{
23292	    s//\1/
23293	    q
23294	  }
23295	  /^X\(\/\/\)$/{
23296	    s//\1/
23297	    q
23298	  }
23299	  /^X\(\/\).*/{
23300	    s//\1/
23301	    q
23302	  }
23303	  s/.*/./; q'`
23304  as_dir="$ac_dir"; as_fn_mkdir_p
23305  ac_builddir=.
23306
23307case "$ac_dir" in
23308.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
23309*)
23310  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
23311  # A ".." for each directory in $ac_dir_suffix.
23312  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
23313  case $ac_top_builddir_sub in
23314  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
23315  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
23316  esac ;;
23317esac
23318ac_abs_top_builddir=$ac_pwd
23319ac_abs_builddir=$ac_pwd$ac_dir_suffix
23320# for backward compatibility:
23321ac_top_builddir=$ac_top_build_prefix
23322
23323case $srcdir in
23324  .)  # We are building in place.
23325    ac_srcdir=.
23326    ac_top_srcdir=$ac_top_builddir_sub
23327    ac_abs_top_srcdir=$ac_pwd ;;
23328  [\\/]* | ?:[\\/]* )  # Absolute name.
23329    ac_srcdir=$srcdir$ac_dir_suffix;
23330    ac_top_srcdir=$srcdir
23331    ac_abs_top_srcdir=$srcdir ;;
23332  *) # Relative name.
23333    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
23334    ac_top_srcdir=$ac_top_build_prefix$srcdir
23335    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
23336esac
23337ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
23338
23339
23340  case $ac_mode in
23341  :F)
23342  #
23343  # CONFIG_FILE
23344  #
23345
23346_ACEOF
23347
23348cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
23349# If the template does not know about datarootdir, expand it.
23350# FIXME: This hack should be removed a few years after 2.60.
23351ac_datarootdir_hack=; ac_datarootdir_seen=
23352ac_sed_dataroot='
23353/datarootdir/ {
23354  p
23355  q
23356}
23357/@datadir@/p
23358/@docdir@/p
23359/@infodir@/p
23360/@localedir@/p
23361/@mandir@/p'
23362case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
23363*datarootdir*) ac_datarootdir_seen=yes;;
23364*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
23365  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
23366$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
23367_ACEOF
23368cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
23369  ac_datarootdir_hack='
23370  s&@datadir@&$datadir&g
23371  s&@docdir@&$docdir&g
23372  s&@infodir@&$infodir&g
23373  s&@localedir@&$localedir&g
23374  s&@mandir@&$mandir&g
23375  s&\\\${datarootdir}&$datarootdir&g' ;;
23376esac
23377_ACEOF
23378
23379# Neutralize VPATH when `$srcdir' = `.'.
23380# Shell code in configure.ac might set extrasub.
23381# FIXME: do we really want to maintain this feature?
23382cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
23383ac_sed_extra="$ac_vpsub
23384$extrasub
23385_ACEOF
23386cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
23387:t
23388/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
23389s|@configure_input@|$ac_sed_conf_input|;t t
23390s&@top_builddir@&$ac_top_builddir_sub&;t t
23391s&@top_build_prefix@&$ac_top_build_prefix&;t t
23392s&@srcdir@&$ac_srcdir&;t t
23393s&@abs_srcdir@&$ac_abs_srcdir&;t t
23394s&@top_srcdir@&$ac_top_srcdir&;t t
23395s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
23396s&@builddir@&$ac_builddir&;t t
23397s&@abs_builddir@&$ac_abs_builddir&;t t
23398s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
23399$ac_datarootdir_hack
23400"
23401eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
23402  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
23403
23404test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
23405  { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
23406  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' \
23407      "$ac_tmp/out"`; test -z "$ac_out"; } &&
23408  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
23409which seems to be undefined.  Please make sure it is defined" >&5
23410$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
23411which seems to be undefined.  Please make sure it is defined" >&2;}
23412
23413  rm -f "$ac_tmp/stdin"
23414  case $ac_file in
23415  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
23416  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
23417  esac \
23418  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
23419 ;;
23420  :H)
23421  #
23422  # CONFIG_HEADER
23423  #
23424  if test x"$ac_file" != x-; then
23425    {
23426      $as_echo "/* $configure_input  */" \
23427      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
23428    } >"$ac_tmp/config.h" \
23429      || as_fn_error $? "could not create $ac_file" "$LINENO" 5
23430    if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
23431      { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
23432$as_echo "$as_me: $ac_file is unchanged" >&6;}
23433    else
23434      rm -f "$ac_file"
23435      mv "$ac_tmp/config.h" "$ac_file" \
23436	|| as_fn_error $? "could not create $ac_file" "$LINENO" 5
23437    fi
23438  else
23439    $as_echo "/* $configure_input  */" \
23440      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
23441      || as_fn_error $? "could not create -" "$LINENO" 5
23442  fi
23443 ;;
23444
23445  :C)  { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
23446$as_echo "$as_me: executing $ac_file commands" >&6;}
23447 ;;
23448  esac
23449
23450
23451  case $ac_file$ac_mode in
23452    "libtool":C)
23453
23454    # See if we are running on zsh, and set the options that allow our
23455    # commands through without removal of \ escapes.
23456    if test -n "${ZSH_VERSION+set}"; then
23457      setopt NO_GLOB_SUBST
23458    fi
23459
23460    cfgfile=${ofile}T
23461    trap "$RM \"$cfgfile\"; exit 1" 1 2 15
23462    $RM "$cfgfile"
23463
23464    cat <<_LT_EOF >> "$cfgfile"
23465#! $SHELL
23466# Generated automatically by $as_me ($PACKAGE) $VERSION
23467# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
23468# NOTE: Changes made to this file will be lost: look at ltmain.sh.
23469
23470# Provide generalized library-building support services.
23471# Written by Gordon Matzigkeit, 1996
23472
23473# Copyright (C) 2014 Free Software Foundation, Inc.
23474# This is free software; see the source for copying conditions.  There is NO
23475# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
23476
23477# GNU Libtool is free software; you can redistribute it and/or modify
23478# it under the terms of the GNU General Public License as published by
23479# the Free Software Foundation; either version 2 of of the License, or
23480# (at your option) any later version.
23481#
23482# As a special exception to the GNU General Public License, if you
23483# distribute this file as part of a program or library that is built
23484# using GNU Libtool, you may include this file under the  same
23485# distribution terms that you use for the rest of that program.
23486#
23487# GNU Libtool is distributed in the hope that it will be useful, but
23488# WITHOUT ANY WARRANTY; without even the implied warranty of
23489# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
23490# GNU General Public License for more details.
23491#
23492# You should have received a copy of the GNU General Public License
23493# along with this program.  If not, see <http://www.gnu.org/licenses/>.
23494
23495
23496# The names of the tagged configurations supported by this script.
23497available_tags=''
23498
23499# Configured defaults for sys_lib_dlsearch_path munging.
23500: \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"}
23501
23502# ### BEGIN LIBTOOL CONFIG
23503
23504# Which release of libtool.m4 was used?
23505macro_version=$macro_version
23506macro_revision=$macro_revision
23507
23508# Whether or not to build shared libraries.
23509build_libtool_libs=$enable_shared
23510
23511# Whether or not to build static libraries.
23512build_old_libs=$enable_static
23513
23514# What type of objects to build.
23515pic_mode=$pic_mode
23516
23517# Whether or not to optimize for fast installation.
23518fast_install=$enable_fast_install
23519
23520# Shared archive member basename,for filename based shared library versioning on AIX.
23521shared_archive_member_spec=$shared_archive_member_spec
23522
23523# Shell to use when invoking shell scripts.
23524SHELL=$lt_SHELL
23525
23526# An echo program that protects backslashes.
23527ECHO=$lt_ECHO
23528
23529# The PATH separator for the build system.
23530PATH_SEPARATOR=$lt_PATH_SEPARATOR
23531
23532# The host system.
23533host_alias=$host_alias
23534host=$host
23535host_os=$host_os
23536
23537# The build system.
23538build_alias=$build_alias
23539build=$build
23540build_os=$build_os
23541
23542# A sed program that does not truncate output.
23543SED=$lt_SED
23544
23545# Sed that helps us avoid accidentally triggering echo(1) options like -n.
23546Xsed="\$SED -e 1s/^X//"
23547
23548# A grep program that handles long lines.
23549GREP=$lt_GREP
23550
23551# An ERE matcher.
23552EGREP=$lt_EGREP
23553
23554# A literal string matcher.
23555FGREP=$lt_FGREP
23556
23557# A BSD- or MS-compatible name lister.
23558NM=$lt_NM
23559
23560# Whether we need soft or hard links.
23561LN_S=$lt_LN_S
23562
23563# What is the maximum length of a command?
23564max_cmd_len=$max_cmd_len
23565
23566# Object file suffix (normally "o").
23567objext=$ac_objext
23568
23569# Executable file suffix (normally "").
23570exeext=$exeext
23571
23572# whether the shell understands "unset".
23573lt_unset=$lt_unset
23574
23575# turn spaces into newlines.
23576SP2NL=$lt_lt_SP2NL
23577
23578# turn newlines into spaces.
23579NL2SP=$lt_lt_NL2SP
23580
23581# convert \$build file names to \$host format.
23582to_host_file_cmd=$lt_cv_to_host_file_cmd
23583
23584# convert \$build files to toolchain format.
23585to_tool_file_cmd=$lt_cv_to_tool_file_cmd
23586
23587# An object symbol dumper.
23588OBJDUMP=$lt_OBJDUMP
23589
23590# Method to check whether dependent libraries are shared objects.
23591deplibs_check_method=$lt_deplibs_check_method
23592
23593# Command to use when deplibs_check_method = "file_magic".
23594file_magic_cmd=$lt_file_magic_cmd
23595
23596# How to find potential files when deplibs_check_method = "file_magic".
23597file_magic_glob=$lt_file_magic_glob
23598
23599# Find potential files using nocaseglob when deplibs_check_method = "file_magic".
23600want_nocaseglob=$lt_want_nocaseglob
23601
23602# DLL creation program.
23603DLLTOOL=$lt_DLLTOOL
23604
23605# Command to associate shared and link libraries.
23606sharedlib_from_linklib_cmd=$lt_sharedlib_from_linklib_cmd
23607
23608# The archiver.
23609AR=$lt_AR
23610
23611# Flags to create an archive.
23612AR_FLAGS=$lt_AR_FLAGS
23613
23614# How to feed a file listing to the archiver.
23615archiver_list_spec=$lt_archiver_list_spec
23616
23617# A symbol stripping program.
23618STRIP=$lt_STRIP
23619
23620# Commands used to install an old-style archive.
23621RANLIB=$lt_RANLIB
23622old_postinstall_cmds=$lt_old_postinstall_cmds
23623old_postuninstall_cmds=$lt_old_postuninstall_cmds
23624
23625# Whether to use a lock for old archive extraction.
23626lock_old_archive_extraction=$lock_old_archive_extraction
23627
23628# A C compiler.
23629LTCC=$lt_CC
23630
23631# LTCC compiler flags.
23632LTCFLAGS=$lt_CFLAGS
23633
23634# Take the output of nm and produce a listing of raw symbols and C names.
23635global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
23636
23637# Transform the output of nm in a proper C declaration.
23638global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
23639
23640# Transform the output of nm into a list of symbols to manually relocate.
23641global_symbol_to_import=$lt_lt_cv_sys_global_symbol_to_import
23642
23643# Transform the output of nm in a C name address pair.
23644global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
23645
23646# Transform the output of nm in a C name address pair when lib prefix is needed.
23647global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix
23648
23649# The name lister interface.
23650nm_interface=$lt_lt_cv_nm_interface
23651
23652# Specify filename containing input files for \$NM.
23653nm_file_list_spec=$lt_nm_file_list_spec
23654
23655# The root where to search for dependent libraries,and where our libraries should be installed.
23656lt_sysroot=$lt_sysroot
23657
23658# Command to truncate a binary pipe.
23659lt_truncate_bin=$lt_lt_cv_truncate_bin
23660
23661# The name of the directory that contains temporary libtool files.
23662objdir=$objdir
23663
23664# Used to examine libraries when file_magic_cmd begins with "file".
23665MAGIC_CMD=$MAGIC_CMD
23666
23667# Must we lock files when doing compilation?
23668need_locks=$lt_need_locks
23669
23670# Manifest tool.
23671MANIFEST_TOOL=$lt_MANIFEST_TOOL
23672
23673# Tool to manipulate archived DWARF debug symbol files on Mac OS X.
23674DSYMUTIL=$lt_DSYMUTIL
23675
23676# Tool to change global to local symbols on Mac OS X.
23677NMEDIT=$lt_NMEDIT
23678
23679# Tool to manipulate fat objects and archives on Mac OS X.
23680LIPO=$lt_LIPO
23681
23682# ldd/readelf like tool for Mach-O binaries on Mac OS X.
23683OTOOL=$lt_OTOOL
23684
23685# ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4.
23686OTOOL64=$lt_OTOOL64
23687
23688# Old archive suffix (normally "a").
23689libext=$libext
23690
23691# Shared library suffix (normally ".so").
23692shrext_cmds=$lt_shrext_cmds
23693
23694# The commands to extract the exported symbol list from a shared archive.
23695extract_expsyms_cmds=$lt_extract_expsyms_cmds
23696
23697# Variables whose values should be saved in libtool wrapper scripts and
23698# restored at link time.
23699variables_saved_for_relink=$lt_variables_saved_for_relink
23700
23701# Do we need the "lib" prefix for modules?
23702need_lib_prefix=$need_lib_prefix
23703
23704# Do we need a version for libraries?
23705need_version=$need_version
23706
23707# Library versioning type.
23708version_type=$version_type
23709
23710# Shared library runtime path variable.
23711runpath_var=$runpath_var
23712
23713# Shared library path variable.
23714shlibpath_var=$shlibpath_var
23715
23716# Is shlibpath searched before the hard-coded library search path?
23717shlibpath_overrides_runpath=$shlibpath_overrides_runpath
23718
23719# Format of library name prefix.
23720libname_spec=$lt_libname_spec
23721
23722# List of archive names.  First name is the real one, the rest are links.
23723# The last name is the one that the linker finds with -lNAME
23724library_names_spec=$lt_library_names_spec
23725
23726# The coded name of the library, if different from the real name.
23727soname_spec=$lt_soname_spec
23728
23729# Permission mode override for installation of shared libraries.
23730install_override_mode=$lt_install_override_mode
23731
23732# Command to use after installation of a shared archive.
23733postinstall_cmds=$lt_postinstall_cmds
23734
23735# Command to use after uninstallation of a shared archive.
23736postuninstall_cmds=$lt_postuninstall_cmds
23737
23738# Commands used to finish a libtool library installation in a directory.
23739finish_cmds=$lt_finish_cmds
23740
23741# As "finish_cmds", except a single script fragment to be evaled but
23742# not shown.
23743finish_eval=$lt_finish_eval
23744
23745# Whether we should hardcode library paths into libraries.
23746hardcode_into_libs=$hardcode_into_libs
23747
23748# Compile-time system search path for libraries.
23749sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
23750
23751# Detected run-time system search path for libraries.
23752sys_lib_dlsearch_path_spec=$lt_configure_time_dlsearch_path
23753
23754# Explicit LT_SYS_LIBRARY_PATH set during ./configure time.
23755configure_time_lt_sys_library_path=$lt_configure_time_lt_sys_library_path
23756
23757# Whether dlopen is supported.
23758dlopen_support=$enable_dlopen
23759
23760# Whether dlopen of programs is supported.
23761dlopen_self=$enable_dlopen_self
23762
23763# Whether dlopen of statically linked programs is supported.
23764dlopen_self_static=$enable_dlopen_self_static
23765
23766# Commands to strip libraries.
23767old_striplib=$lt_old_striplib
23768striplib=$lt_striplib
23769
23770
23771# The linker used to build libraries.
23772LD=$lt_LD
23773
23774# How to create reloadable object files.
23775reload_flag=$lt_reload_flag
23776reload_cmds=$lt_reload_cmds
23777
23778# Commands used to build an old-style archive.
23779old_archive_cmds=$lt_old_archive_cmds
23780
23781# A language specific compiler.
23782CC=$lt_compiler
23783
23784# Is the compiler the GNU compiler?
23785with_gcc=$GCC
23786
23787# Compiler flag to turn off builtin functions.
23788no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag
23789
23790# Additional compiler flags for building library objects.
23791pic_flag=$lt_lt_prog_compiler_pic
23792
23793# How to pass a linker flag through the compiler.
23794wl=$lt_lt_prog_compiler_wl
23795
23796# Compiler flag to prevent dynamic linking.
23797link_static_flag=$lt_lt_prog_compiler_static
23798
23799# Does compiler simultaneously support -c and -o options?
23800compiler_c_o=$lt_lt_cv_prog_compiler_c_o
23801
23802# Whether or not to add -lc for building shared libraries.
23803build_libtool_need_lc=$archive_cmds_need_lc
23804
23805# Whether or not to disallow shared libs when runtime libs are static.
23806allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes
23807
23808# Compiler flag to allow reflexive dlopens.
23809export_dynamic_flag_spec=$lt_export_dynamic_flag_spec
23810
23811# Compiler flag to generate shared objects directly from archives.
23812whole_archive_flag_spec=$lt_whole_archive_flag_spec
23813
23814# Whether the compiler copes with passing no objects directly.
23815compiler_needs_object=$lt_compiler_needs_object
23816
23817# Create an old-style archive from a shared archive.
23818old_archive_from_new_cmds=$lt_old_archive_from_new_cmds
23819
23820# Create a temporary old-style archive to link instead of a shared archive.
23821old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds
23822
23823# Commands used to build a shared archive.
23824archive_cmds=$lt_archive_cmds
23825archive_expsym_cmds=$lt_archive_expsym_cmds
23826
23827# Commands used to build a loadable module if different from building
23828# a shared archive.
23829module_cmds=$lt_module_cmds
23830module_expsym_cmds=$lt_module_expsym_cmds
23831
23832# Whether we are building with GNU ld or not.
23833with_gnu_ld=$lt_with_gnu_ld
23834
23835# Flag that allows shared libraries with undefined symbols to be built.
23836allow_undefined_flag=$lt_allow_undefined_flag
23837
23838# Flag that enforces no undefined symbols.
23839no_undefined_flag=$lt_no_undefined_flag
23840
23841# Flag to hardcode \$libdir into a binary during linking.
23842# This must work even if \$libdir does not exist
23843hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
23844
23845# Whether we need a single "-rpath" flag with a separated argument.
23846hardcode_libdir_separator=$lt_hardcode_libdir_separator
23847
23848# Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes
23849# DIR into the resulting binary.
23850hardcode_direct=$hardcode_direct
23851
23852# Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes
23853# DIR into the resulting binary and the resulting library dependency is
23854# "absolute",i.e impossible to change by setting \$shlibpath_var if the
23855# library is relocated.
23856hardcode_direct_absolute=$hardcode_direct_absolute
23857
23858# Set to "yes" if using the -LDIR flag during linking hardcodes DIR
23859# into the resulting binary.
23860hardcode_minus_L=$hardcode_minus_L
23861
23862# Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
23863# into the resulting binary.
23864hardcode_shlibpath_var=$hardcode_shlibpath_var
23865
23866# Set to "yes" if building a shared library automatically hardcodes DIR
23867# into the library and all subsequent libraries and executables linked
23868# against it.
23869hardcode_automatic=$hardcode_automatic
23870
23871# Set to yes if linker adds runtime paths of dependent libraries
23872# to runtime path list.
23873inherit_rpath=$inherit_rpath
23874
23875# Whether libtool must link a program against all its dependency libraries.
23876link_all_deplibs=$link_all_deplibs
23877
23878# Set to "yes" if exported symbols are required.
23879always_export_symbols=$always_export_symbols
23880
23881# The commands to list exported symbols.
23882export_symbols_cmds=$lt_export_symbols_cmds
23883
23884# Symbols that should not be listed in the preloaded symbols.
23885exclude_expsyms=$lt_exclude_expsyms
23886
23887# Symbols that must always be exported.
23888include_expsyms=$lt_include_expsyms
23889
23890# Commands necessary for linking programs (against libraries) with templates.
23891prelink_cmds=$lt_prelink_cmds
23892
23893# Commands necessary for finishing linking programs.
23894postlink_cmds=$lt_postlink_cmds
23895
23896# Specify filename containing input files.
23897file_list_spec=$lt_file_list_spec
23898
23899# How to hardcode a shared library path into an executable.
23900hardcode_action=$hardcode_action
23901
23902# ### END LIBTOOL CONFIG
23903
23904_LT_EOF
23905
23906    cat <<'_LT_EOF' >> "$cfgfile"
23907
23908# ### BEGIN FUNCTIONS SHARED WITH CONFIGURE
23909
23910# func_munge_path_list VARIABLE PATH
23911# -----------------------------------
23912# VARIABLE is name of variable containing _space_ separated list of
23913# directories to be munged by the contents of PATH, which is string
23914# having a format:
23915# "DIR[:DIR]:"
23916#       string "DIR[ DIR]" will be prepended to VARIABLE
23917# ":DIR[:DIR]"
23918#       string "DIR[ DIR]" will be appended to VARIABLE
23919# "DIRP[:DIRP]::[DIRA:]DIRA"
23920#       string "DIRP[ DIRP]" will be prepended to VARIABLE and string
23921#       "DIRA[ DIRA]" will be appended to VARIABLE
23922# "DIR[:DIR]"
23923#       VARIABLE will be replaced by "DIR[ DIR]"
23924func_munge_path_list ()
23925{
23926    case x$2 in
23927    x)
23928        ;;
23929    *:)
23930        eval $1=\"`$ECHO $2 | $SED 's/:/ /g'` \$$1\"
23931        ;;
23932    x:*)
23933        eval $1=\"\$$1 `$ECHO $2 | $SED 's/:/ /g'`\"
23934        ;;
23935    *::*)
23936        eval $1=\"\$$1\ `$ECHO $2 | $SED -e 's/.*:://' -e 's/:/ /g'`\"
23937        eval $1=\"`$ECHO $2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \$$1\"
23938        ;;
23939    *)
23940        eval $1=\"`$ECHO $2 | $SED 's/:/ /g'`\"
23941        ;;
23942    esac
23943}
23944
23945
23946# Calculate cc_basename.  Skip known compiler wrappers and cross-prefix.
23947func_cc_basename ()
23948{
23949    for cc_temp in $*""; do
23950      case $cc_temp in
23951        compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
23952        distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
23953        \-*) ;;
23954        *) break;;
23955      esac
23956    done
23957    func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
23958}
23959
23960
23961# ### END FUNCTIONS SHARED WITH CONFIGURE
23962
23963_LT_EOF
23964
23965  case $host_os in
23966  aix3*)
23967    cat <<\_LT_EOF >> "$cfgfile"
23968# AIX sometimes has problems with the GCC collect2 program.  For some
23969# reason, if we set the COLLECT_NAMES environment variable, the problems
23970# vanish in a puff of smoke.
23971if test set != "${COLLECT_NAMES+set}"; then
23972  COLLECT_NAMES=
23973  export COLLECT_NAMES
23974fi
23975_LT_EOF
23976    ;;
23977  esac
23978
23979
23980ltmain=$ac_aux_dir/ltmain.sh
23981
23982
23983  # We use sed instead of cat because bash on DJGPP gets confused if
23984  # if finds mixed CR/LF and LF-only lines.  Since sed operates in
23985  # text mode, it properly converts lines to CR/LF.  This bash problem
23986  # is reportedly fixed, but why not run on old versions too?
23987  sed '$q' "$ltmain" >> "$cfgfile" \
23988     || (rm -f "$cfgfile"; exit 1)
23989
23990   mv -f "$cfgfile" "$ofile" ||
23991    (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
23992  chmod +x "$ofile"
23993
23994 ;;
23995    "disable-rpath":C)
23996	sed < libtool > libtool-2 \
23997	's/^hardcode_libdir_flag_spec.*$'/'hardcode_libdir_flag_spec=" -D__LIBTOOL_RPATH_SED__ "/'
23998	mv libtool-2 libtool
23999	chmod 755 libtool
24000	libtool="./libtool"
24001	 ;;
24002
24003  esac
24004done # for ac_tag
24005
24006
24007as_fn_exit 0
24008_ACEOF
24009ac_clean_files=$ac_clean_files_save
24010
24011test $ac_write_fail = 0 ||
24012  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
24013
24014
24015# configure is writing to config.log, and then calls config.status.
24016# config.status does its own redirection, appending to config.log.
24017# Unfortunately, on DOS this fails, as config.log is still kept open
24018# by configure, so config.status won't be able to write to it; its
24019# output is simply discarded.  So we exec the FD to /dev/null,
24020# effectively closing config.log, so it can be properly (re)opened and
24021# appended to by config.status.  When coming back to configure, we
24022# need to make the FD available again.
24023if test "$no_create" != yes; then
24024  ac_cs_success=:
24025  ac_config_status_args=
24026  test "$silent" = yes &&
24027    ac_config_status_args="$ac_config_status_args --quiet"
24028  exec 5>/dev/null
24029  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
24030  exec 5>>config.log
24031  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
24032  # would make configure fail if this is the last instruction.
24033  $ac_cs_success || as_fn_exit 1
24034fi
24035if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
24036  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
24037$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
24038fi
24039
24040