xref: /freebsd/contrib/unbound/configure (revision 90e29718cffcec987769ccbe39308357202c46d5)
1#! /bin/sh
2# Guess values for system-dependent variables and create Makefiles.
3# Generated by GNU Autoconf 2.69 for unbound 1.16.1.
4#
5# Report bugs to <unbound-bugs@nlnetlabs.nl or https://github.com/NLnetLabs/unbound/issues>.
6#
7#
8# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
9#
10#
11# This configure script is free software; the Free Software Foundation
12# gives unlimited permission to copy, distribute and modify it.
13## -------------------- ##
14## M4sh Initialization. ##
15## -------------------- ##
16
17# Be more Bourne compatible
18DUALCASE=1; export DUALCASE # for MKS sh
19if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
20  emulate sh
21  NULLCMD=:
22  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
23  # is contrary to our usage.  Disable this feature.
24  alias -g '${1+"$@"}'='"$@"'
25  setopt NO_GLOB_SUBST
26else
27  case `(set -o) 2>/dev/null` in #(
28  *posix*) :
29    set -o posix ;; #(
30  *) :
31     ;;
32esac
33fi
34
35
36as_nl='
37'
38export as_nl
39# Printing a long string crashes Solaris 7 /usr/bin/printf.
40as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
41as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
42as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
43# Prefer a ksh shell builtin over an external printf program on Solaris,
44# but without wasting forks for bash or zsh.
45if test -z "$BASH_VERSION$ZSH_VERSION" \
46    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
47  as_echo='print -r --'
48  as_echo_n='print -rn --'
49elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
50  as_echo='printf %s\n'
51  as_echo_n='printf %s'
52else
53  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
54    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
55    as_echo_n='/usr/ucb/echo -n'
56  else
57    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
58    as_echo_n_body='eval
59      arg=$1;
60      case $arg in #(
61      *"$as_nl"*)
62	expr "X$arg" : "X\\(.*\\)$as_nl";
63	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
64      esac;
65      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
66    '
67    export as_echo_n_body
68    as_echo_n='sh -c $as_echo_n_body as_echo'
69  fi
70  export as_echo_body
71  as_echo='sh -c $as_echo_body as_echo'
72fi
73
74# The user is always right.
75if test "${PATH_SEPARATOR+set}" != set; then
76  PATH_SEPARATOR=:
77  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
78    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
79      PATH_SEPARATOR=';'
80  }
81fi
82
83
84# IFS
85# We need space, tab and new line, in precisely that order.  Quoting is
86# there to prevent editors from complaining about space-tab.
87# (If _AS_PATH_WALK were called with IFS unset, it would disable word
88# splitting by setting IFS to empty value.)
89IFS=" ""	$as_nl"
90
91# Find who we are.  Look in the path if we contain no directory separator.
92as_myself=
93case $0 in #((
94  *[\\/]* ) as_myself=$0 ;;
95  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
96for as_dir in $PATH
97do
98  IFS=$as_save_IFS
99  test -z "$as_dir" && as_dir=.
100    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
101  done
102IFS=$as_save_IFS
103
104     ;;
105esac
106# We did not find ourselves, most probably we were run as `sh COMMAND'
107# in which case we are not to be found in the path.
108if test "x$as_myself" = x; then
109  as_myself=$0
110fi
111if test ! -f "$as_myself"; then
112  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
113  exit 1
114fi
115
116# Unset variables that we do not need and which cause bugs (e.g. in
117# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
118# suppresses any "Segmentation fault" message there.  '((' could
119# trigger a bug in pdksh 5.2.14.
120for as_var in BASH_ENV ENV MAIL MAILPATH
121do eval test x\${$as_var+set} = xset \
122  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
123done
124PS1='$ '
125PS2='> '
126PS4='+ '
127
128# NLS nuisances.
129LC_ALL=C
130export LC_ALL
131LANGUAGE=C
132export LANGUAGE
133
134# CDPATH.
135(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
136
137# Use a proper internal environment variable to ensure we don't fall
138  # into an infinite loop, continuously re-executing ourselves.
139  if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
140    _as_can_reexec=no; export _as_can_reexec;
141    # We cannot yet assume a decent shell, so we have to provide a
142# neutralization value for shells without unset; and this also
143# works around shells that cannot unset nonexistent variables.
144# Preserve -v and -x to the replacement shell.
145BASH_ENV=/dev/null
146ENV=/dev/null
147(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
148case $- in # ((((
149  *v*x* | *x*v* ) as_opts=-vx ;;
150  *v* ) as_opts=-v ;;
151  *x* ) as_opts=-x ;;
152  * ) as_opts= ;;
153esac
154exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
155# Admittedly, this is quite paranoid, since all the known shells bail
156# out after a failed `exec'.
157$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
158as_fn_exit 255
159  fi
160  # We don't want this to propagate to other subprocesses.
161          { _as_can_reexec=; unset _as_can_reexec;}
162if test "x$CONFIG_SHELL" = x; then
163  as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
164  emulate sh
165  NULLCMD=:
166  # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
167  # is contrary to our usage.  Disable this feature.
168  alias -g '\${1+\"\$@\"}'='\"\$@\"'
169  setopt NO_GLOB_SUBST
170else
171  case \`(set -o) 2>/dev/null\` in #(
172  *posix*) :
173    set -o posix ;; #(
174  *) :
175     ;;
176esac
177fi
178"
179  as_required="as_fn_return () { (exit \$1); }
180as_fn_success () { as_fn_return 0; }
181as_fn_failure () { as_fn_return 1; }
182as_fn_ret_success () { return 0; }
183as_fn_ret_failure () { return 1; }
184
185exitcode=0
186as_fn_success || { exitcode=1; echo as_fn_success failed.; }
187as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
188as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
189as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
190if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
191
192else
193  exitcode=1; echo positional parameters were not saved.
194fi
195test x\$exitcode = x0 || exit 1
196test -x / || exit 1"
197  as_suggested="  as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
198  as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
199  eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
200  test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
201test \$(( 1 + 1 )) = 2 || exit 1
202
203  test -n \"\${ZSH_VERSION+set}\${BASH_VERSION+set}\" || (
204    ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
205    ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO
206    ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO
207    PATH=/empty FPATH=/empty; export PATH FPATH
208    test \"X\`printf %s \$ECHO\`\" = \"X\$ECHO\" \\
209      || test \"X\`print -r -- \$ECHO\`\" = \"X\$ECHO\" ) || exit 1"
210  if (eval "$as_required") 2>/dev/null; then :
211  as_have_required=yes
212else
213  as_have_required=no
214fi
215  if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
216
217else
218  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
219as_found=false
220for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
221do
222  IFS=$as_save_IFS
223  test -z "$as_dir" && as_dir=.
224  as_found=:
225  case $as_dir in #(
226	 /*)
227	   for as_base in sh bash ksh sh5; do
228	     # Try only shells that exist, to save several forks.
229	     as_shell=$as_dir/$as_base
230	     if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
231		    { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
232  CONFIG_SHELL=$as_shell as_have_required=yes
233		   if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
234  break 2
235fi
236fi
237	   done;;
238       esac
239  as_found=false
240done
241$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
242	      { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
243  CONFIG_SHELL=$SHELL as_have_required=yes
244fi; }
245IFS=$as_save_IFS
246
247
248      if test "x$CONFIG_SHELL" != x; then :
249  export CONFIG_SHELL
250             # We cannot yet assume a decent shell, so we have to provide a
251# neutralization value for shells without unset; and this also
252# works around shells that cannot unset nonexistent variables.
253# Preserve -v and -x to the replacement shell.
254BASH_ENV=/dev/null
255ENV=/dev/null
256(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
257case $- in # ((((
258  *v*x* | *x*v* ) as_opts=-vx ;;
259  *v* ) as_opts=-v ;;
260  *x* ) as_opts=-x ;;
261  * ) as_opts= ;;
262esac
263exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
264# Admittedly, this is quite paranoid, since all the known shells bail
265# out after a failed `exec'.
266$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
267exit 255
268fi
269
270    if test x$as_have_required = xno; then :
271  $as_echo "$0: This script requires a shell more modern than all"
272  $as_echo "$0: the shells that I found on your system."
273  if test x${ZSH_VERSION+set} = xset ; then
274    $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
275    $as_echo "$0: be upgraded to zsh 4.3.4 or later."
276  else
277    $as_echo "$0: Please tell bug-autoconf@gnu.org and
278$0: unbound-bugs@nlnetlabs.nl or
279$0: https://github.com/NLnetLabs/unbound/issues about your
280$0: system, including any error possibly output before this
281$0: message. Then install a modern shell, or manually run
282$0: the script under such a shell if you do have one."
283  fi
284  exit 1
285fi
286fi
287fi
288SHELL=${CONFIG_SHELL-/bin/sh}
289export SHELL
290# Unset more variables known to interfere with behavior of common tools.
291CLICOLOR_FORCE= GREP_OPTIONS=
292unset CLICOLOR_FORCE GREP_OPTIONS
293
294## --------------------- ##
295## M4sh Shell Functions. ##
296## --------------------- ##
297# as_fn_unset VAR
298# ---------------
299# Portably unset VAR.
300as_fn_unset ()
301{
302  { eval $1=; unset $1;}
303}
304as_unset=as_fn_unset
305
306# as_fn_set_status STATUS
307# -----------------------
308# Set $? to STATUS, without forking.
309as_fn_set_status ()
310{
311  return $1
312} # as_fn_set_status
313
314# as_fn_exit STATUS
315# -----------------
316# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
317as_fn_exit ()
318{
319  set +e
320  as_fn_set_status $1
321  exit $1
322} # as_fn_exit
323
324# as_fn_mkdir_p
325# -------------
326# Create "$as_dir" as a directory, including parents if necessary.
327as_fn_mkdir_p ()
328{
329
330  case $as_dir in #(
331  -*) as_dir=./$as_dir;;
332  esac
333  test -d "$as_dir" || eval $as_mkdir_p || {
334    as_dirs=
335    while :; do
336      case $as_dir in #(
337      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
338      *) as_qdir=$as_dir;;
339      esac
340      as_dirs="'$as_qdir' $as_dirs"
341      as_dir=`$as_dirname -- "$as_dir" ||
342$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
343	 X"$as_dir" : 'X\(//\)[^/]' \| \
344	 X"$as_dir" : 'X\(//\)$' \| \
345	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
346$as_echo X"$as_dir" |
347    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
348	    s//\1/
349	    q
350	  }
351	  /^X\(\/\/\)[^/].*/{
352	    s//\1/
353	    q
354	  }
355	  /^X\(\/\/\)$/{
356	    s//\1/
357	    q
358	  }
359	  /^X\(\/\).*/{
360	    s//\1/
361	    q
362	  }
363	  s/.*/./; q'`
364      test -d "$as_dir" && break
365    done
366    test -z "$as_dirs" || eval "mkdir $as_dirs"
367  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
368
369
370} # as_fn_mkdir_p
371
372# as_fn_executable_p FILE
373# -----------------------
374# Test if FILE is an executable regular file.
375as_fn_executable_p ()
376{
377  test -f "$1" && test -x "$1"
378} # as_fn_executable_p
379# as_fn_append VAR VALUE
380# ----------------------
381# Append the text in VALUE to the end of the definition contained in VAR. Take
382# advantage of any shell optimizations that allow amortized linear growth over
383# repeated appends, instead of the typical quadratic growth present in naive
384# implementations.
385if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
386  eval 'as_fn_append ()
387  {
388    eval $1+=\$2
389  }'
390else
391  as_fn_append ()
392  {
393    eval $1=\$$1\$2
394  }
395fi # as_fn_append
396
397# as_fn_arith ARG...
398# ------------------
399# Perform arithmetic evaluation on the ARGs, and store the result in the
400# global $as_val. Take advantage of shells that can avoid forks. The arguments
401# must be portable across $(()) and expr.
402if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
403  eval 'as_fn_arith ()
404  {
405    as_val=$(( $* ))
406  }'
407else
408  as_fn_arith ()
409  {
410    as_val=`expr "$@" || test $? -eq 1`
411  }
412fi # as_fn_arith
413
414
415# as_fn_error STATUS ERROR [LINENO LOG_FD]
416# ----------------------------------------
417# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
418# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
419# script with STATUS, using 1 if that was 0.
420as_fn_error ()
421{
422  as_status=$1; test $as_status -eq 0 && as_status=1
423  if test "$4"; then
424    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
425    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
426  fi
427  $as_echo "$as_me: error: $2" >&2
428  as_fn_exit $as_status
429} # as_fn_error
430
431if expr a : '\(a\)' >/dev/null 2>&1 &&
432   test "X`expr 00001 : '.*\(...\)'`" = X001; then
433  as_expr=expr
434else
435  as_expr=false
436fi
437
438if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
439  as_basename=basename
440else
441  as_basename=false
442fi
443
444if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
445  as_dirname=dirname
446else
447  as_dirname=false
448fi
449
450as_me=`$as_basename -- "$0" ||
451$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
452	 X"$0" : 'X\(//\)$' \| \
453	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
454$as_echo X/"$0" |
455    sed '/^.*\/\([^/][^/]*\)\/*$/{
456	    s//\1/
457	    q
458	  }
459	  /^X\/\(\/\/\)$/{
460	    s//\1/
461	    q
462	  }
463	  /^X\/\(\/\).*/{
464	    s//\1/
465	    q
466	  }
467	  s/.*/./; q'`
468
469# Avoid depending upon Character Ranges.
470as_cr_letters='abcdefghijklmnopqrstuvwxyz'
471as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
472as_cr_Letters=$as_cr_letters$as_cr_LETTERS
473as_cr_digits='0123456789'
474as_cr_alnum=$as_cr_Letters$as_cr_digits
475
476
477  as_lineno_1=$LINENO as_lineno_1a=$LINENO
478  as_lineno_2=$LINENO as_lineno_2a=$LINENO
479  eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
480  test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
481  # Blame Lee E. McMahon (1931-1989) for sed's syntax.  :-)
482  sed -n '
483    p
484    /[$]LINENO/=
485  ' <$as_myself |
486    sed '
487      s/[$]LINENO.*/&-/
488      t lineno
489      b
490      :lineno
491      N
492      :loop
493      s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
494      t loop
495      s/-\n.*//
496    ' >$as_me.lineno &&
497  chmod +x "$as_me.lineno" ||
498    { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
499
500  # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
501  # already done that, so ensure we don't try to do so again and fall
502  # in an infinite loop.  This has already happened in practice.
503  _as_can_reexec=no; export _as_can_reexec
504  # Don't try to exec as it changes $[0], causing all sort of problems
505  # (the dirname of $[0] is not the place where we might find the
506  # original and so on.  Autoconf is especially sensitive to this).
507  . "./$as_me.lineno"
508  # Exit status is that of the last command.
509  exit
510}
511
512ECHO_C= ECHO_N= ECHO_T=
513case `echo -n x` in #(((((
514-n*)
515  case `echo 'xy\c'` in
516  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
517  xy)  ECHO_C='\c';;
518  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
519       ECHO_T='	';;
520  esac;;
521*)
522  ECHO_N='-n';;
523esac
524
525rm -f conf$$ conf$$.exe conf$$.file
526if test -d conf$$.dir; then
527  rm -f conf$$.dir/conf$$.file
528else
529  rm -f conf$$.dir
530  mkdir conf$$.dir 2>/dev/null
531fi
532if (echo >conf$$.file) 2>/dev/null; then
533  if ln -s conf$$.file conf$$ 2>/dev/null; then
534    as_ln_s='ln -s'
535    # ... but there are two gotchas:
536    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
537    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
538    # In both cases, we have to default to `cp -pR'.
539    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
540      as_ln_s='cp -pR'
541  elif ln conf$$.file conf$$ 2>/dev/null; then
542    as_ln_s=ln
543  else
544    as_ln_s='cp -pR'
545  fi
546else
547  as_ln_s='cp -pR'
548fi
549rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
550rmdir conf$$.dir 2>/dev/null
551
552if mkdir -p . 2>/dev/null; then
553  as_mkdir_p='mkdir -p "$as_dir"'
554else
555  test -d ./-p && rmdir ./-p
556  as_mkdir_p=false
557fi
558
559as_test_x='test -x'
560as_executable_p=as_fn_executable_p
561
562# Sed expression to map a string onto a valid CPP name.
563as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
564
565# Sed expression to map a string onto a valid variable name.
566as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
567
568SHELL=${CONFIG_SHELL-/bin/sh}
569
570
571test -n "$DJDIR" || exec 7<&0 </dev/null
572exec 6>&1
573
574# Name of the host.
575# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
576# so uname gets run too.
577ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
578
579#
580# Initializations.
581#
582ac_default_prefix=/usr/local
583ac_clean_files=
584ac_config_libobj_dir=.
585LIBOBJS=
586cross_compiling=no
587subdirs=
588MFLAGS=
589MAKEFLAGS=
590
591# Identity of this package.
592PACKAGE_NAME='unbound'
593PACKAGE_TARNAME='unbound'
594PACKAGE_VERSION='1.16.1'
595PACKAGE_STRING='unbound 1.16.1'
596PACKAGE_BUGREPORT='unbound-bugs@nlnetlabs.nl or https://github.com/NLnetLabs/unbound/issues'
597PACKAGE_URL=''
598
599# Factoring default headers for most tests.
600ac_includes_default="\
601#include <stdio.h>
602#ifdef HAVE_SYS_TYPES_H
603# include <sys/types.h>
604#endif
605#ifdef HAVE_SYS_STAT_H
606# include <sys/stat.h>
607#endif
608#ifdef STDC_HEADERS
609# include <stdlib.h>
610# include <stddef.h>
611#else
612# ifdef HAVE_STDLIB_H
613#  include <stdlib.h>
614# endif
615#endif
616#ifdef HAVE_STRING_H
617# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
618#  include <memory.h>
619# endif
620# include <string.h>
621#endif
622#ifdef HAVE_STRINGS_H
623# include <strings.h>
624#endif
625#ifdef HAVE_INTTYPES_H
626# include <inttypes.h>
627#endif
628#ifdef HAVE_STDINT_H
629# include <stdint.h>
630#endif
631#ifdef HAVE_UNISTD_H
632# include <unistd.h>
633#endif"
634
635ac_subst_vars='LTLIBOBJS
636date
637version
638INSTALLTARGET
639ALLTARGET
640SOURCEFILE
641SOURCEDETERMINE
642IPSET_OBJ
643IPSET_SRC
644IPSECMOD_HEADER
645IPSECMOD_OBJ
646CACHEDB_OBJ
647CACHEDB_SRC
648DNSCRYPT_OBJ
649DNSCRYPT_SRC
650ENABLE_DNSCRYPT
651ENABLE_DNSCRYPT_XCHACHA20
652DNSTAP_OBJ
653DNSTAP_SRC
654DNSTAP_SOCKET_TESTBIN
655DNSTAP_SOCKET_PATH
656opt_dnstap_socket_path
657ENABLE_DNSTAP
658PROTOC_C
659UBSYMS
660EXTRALINK
661COMMON_OBJ_ALL_SYMBOLS
662LIBOBJ_WITHOUT_CTIME
663LIBOBJ_WITHOUT_CTIMEARC4
664WIN_CHECKCONF_OBJ_LINK
665WIN_CONTROL_OBJ_LINK
666WIN_UBANCHOR_OBJ_LINK
667WIN_HOST_OBJ_LINK
668WIN_DAEMON_OBJ_LINK
669WIN_DAEMON_OBJ
670WIN_DAEMON_SRC
671WINAPPS
672WINDRES
673CHECKLOCK_OBJ
674staticexe
675PC_LIBEVENT_DEPENDENCY
676UNBOUND_EVENT_UNINSTALL
677UNBOUND_EVENT_INSTALL
678SUBNET_HEADER
679SUBNET_OBJ
680PC_LIBBSD_DEPENDENCY
681SSLLIB
682HAVE_SSL
683PC_CRYPTO_DEPENDENCY
684CONFIG_DATE
685GCC_DOCKER_LINTFLAGS
686NETBSD_LINTFLAGS
687PYUNBOUND_UNINSTALL
688PYUNBOUND_INSTALL
689PYUNBOUND_TARGET
690PYUNBOUND_OBJ
691WITH_PYUNBOUND
692PYTHONMOD_UNINSTALL
693PYTHONMOD_INSTALL
694PYTHONMOD_HEADER
695PYTHONMOD_OBJ
696WITH_PYTHONMODULE
697swig
698SWIG_LIB
699SWIG
700PC_PY_DEPENDENCY
701PYTHON_LIBS
702PY_MAJOR_VERSION
703PYTHON_SITE_PKG
704PYTHON_LDFLAGS
705PYTHON_CPPFLAGS
706PYTHON
707PYTHON_VERSION
708DYNLIBMOD_EXTRALIBS
709DYNLIBMOD_HEADER
710DYNLIBMOD_OBJ
711WITH_DYNLIBMODULE
712PTHREAD_CFLAGS_ONLY
713PTHREAD_CFLAGS
714PTHREAD_LIBS
715PTHREAD_CC
716ax_pthread_config
717ASYNCLOOK_ALLOCCHECK_EXTRA_OBJ
718SLDNS_ALLOCCHECK_EXTRA_OBJ
719USE_SYSTEMD_FALSE
720USE_SYSTEMD_TRUE
721SYSTEMD_DAEMON_LIBS
722SYSTEMD_DAEMON_CFLAGS
723SYSTEMD_LIBS
724SYSTEMD_CFLAGS
725RUNTIME_PATH
726LIBOBJS
727PKG_CONFIG_LIBDIR
728PKG_CONFIG_PATH
729PKG_CONFIG
730LT_SYS_LIBRARY_PATH
731OTOOL64
732OTOOL
733LIPO
734NMEDIT
735DSYMUTIL
736MANIFEST_TOOL
737AWK
738RANLIB
739ac_ct_AR
740DLLTOOL
741OBJDUMP
742LN_S
743NM
744ac_ct_DUMPBIN
745DUMPBIN
746LD
747FGREP
748SED
749LIBTOOL
750AR
751host_os
752host_vendor
753host_cpu
754host
755build_os
756build_vendor
757build_cpu
758build
759libtool
760STRIP
761doxygen
762YFLAGS
763YACC
764LEXLIB
765LEX_OUTPUT_ROOT
766LEX
767debug_enabled
768DEPFLAG
769UNBOUND_USERNAME
770UNBOUND_ROOTCERT_FILE
771UNBOUND_ROOTKEY_FILE
772UNBOUND_PIDFILE
773UNBOUND_SHARE_DIR
774UNBOUND_CHROOT_DIR
775UNBOUND_RUN_DIR
776ub_conf_dir
777ub_conf_file
778UNBOUND_LOCALSTATE_DIR
779UNBOUND_SYSCONF_DIR
780UNBOUND_SBIN_DIR
781EGREP
782GREP
783CPP
784OBJEXT
785EXEEXT
786ac_ct_CC
787CPPFLAGS
788LDFLAGS
789CFLAGS
790CC
791LIBUNBOUND_AGE
792LIBUNBOUND_REVISION
793LIBUNBOUND_CURRENT
794UNBOUND_VERSION_MICRO
795UNBOUND_VERSION_MINOR
796UNBOUND_VERSION_MAJOR
797target_alias
798host_alias
799build_alias
800LIBS
801ECHO_T
802ECHO_N
803ECHO_C
804DEFS
805mandir
806localedir
807libdir
808psdir
809pdfdir
810dvidir
811htmldir
812infodir
813docdir
814oldincludedir
815includedir
816runstatedir
817localstatedir
818sharedstatedir
819sysconfdir
820datadir
821datarootdir
822libexecdir
823sbindir
824bindir
825program_transform_name
826prefix
827exec_prefix
828PACKAGE_URL
829PACKAGE_BUGREPORT
830PACKAGE_STRING
831PACKAGE_VERSION
832PACKAGE_TARNAME
833PACKAGE_NAME
834PATH_SEPARATOR
835SHELL'
836ac_subst_files=''
837ac_user_opts='
838enable_option_checking
839with_conf_file
840with_run_dir
841with_chroot_dir
842with_share_dir
843with_pidfile
844with_rootkey_file
845with_rootcert_file
846with_username
847enable_checking
848enable_debug
849enable_flto
850enable_pie
851enable_relro_now
852enable_shared
853enable_static
854with_pic
855enable_fast_install
856with_aix_soname
857with_gnu_ld
858with_sysroot
859enable_libtool_lock
860enable_rpath
861enable_largefile
862enable_systemd
863enable_alloc_checks
864enable_alloc_lite
865enable_alloc_nonregional
866with_pthreads
867with_solaris_threads
868with_syslog_facility
869with_dynlibmodule
870with_pyunbound
871with_pythonmodule
872enable_swig_version_check
873with_nss
874with_nettle
875with_ssl
876with_libbsd
877enable_sha1
878enable_sha2
879enable_subnet
880enable_gost
881enable_ecdsa
882enable_dsa
883with_deprecate_rsa_1024
884enable_ed25519
885enable_ed448
886enable_event_api
887enable_tfo_client
888enable_tfo_server
889with_libevent
890with_libexpat
891with_libhiredis
892with_libnghttp2
893enable_static_exe
894enable_fully_static
895enable_lock_checks
896enable_allsymbols
897enable_dnstap
898with_dnstap_socket_path
899with_protobuf_c
900enable_dnscrypt
901with_libsodium
902enable_cachedb
903enable_ipsecmod
904enable_ipset
905with_libmnl
906enable_explicit_port_randomisation
907enable_linux_ip_local_port_range
908with_libunbound_only
909'
910      ac_precious_vars='build_alias
911host_alias
912target_alias
913CC
914CFLAGS
915LDFLAGS
916LIBS
917CPPFLAGS
918CPP
919YACC
920YFLAGS
921LT_SYS_LIBRARY_PATH
922PKG_CONFIG
923PKG_CONFIG_PATH
924PKG_CONFIG_LIBDIR
925SYSTEMD_CFLAGS
926SYSTEMD_LIBS
927SYSTEMD_DAEMON_CFLAGS
928SYSTEMD_DAEMON_LIBS
929PYTHON_VERSION'
930
931
932# Initialize some variables set by options.
933ac_init_help=
934ac_init_version=false
935ac_unrecognized_opts=
936ac_unrecognized_sep=
937# The variables have the same names as the options, with
938# dashes changed to underlines.
939cache_file=/dev/null
940exec_prefix=NONE
941no_create=
942no_recursion=
943prefix=NONE
944program_prefix=NONE
945program_suffix=NONE
946program_transform_name=s,x,x,
947silent=
948site=
949srcdir=
950verbose=
951x_includes=NONE
952x_libraries=NONE
953
954# Installation directory options.
955# These are left unexpanded so users can "make install exec_prefix=/foo"
956# and all the variables that are supposed to be based on exec_prefix
957# by default will actually change.
958# Use braces instead of parens because sh, perl, etc. also accept them.
959# (The list follows the same order as the GNU Coding Standards.)
960bindir='${exec_prefix}/bin'
961sbindir='${exec_prefix}/sbin'
962libexecdir='${exec_prefix}/libexec'
963datarootdir='${prefix}/share'
964datadir='${datarootdir}'
965sysconfdir='${prefix}/etc'
966sharedstatedir='${prefix}/com'
967localstatedir='${prefix}/var'
968runstatedir='${localstatedir}/run'
969includedir='${prefix}/include'
970oldincludedir='/usr/include'
971docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
972infodir='${datarootdir}/info'
973htmldir='${docdir}'
974dvidir='${docdir}'
975pdfdir='${docdir}'
976psdir='${docdir}'
977libdir='${exec_prefix}/lib'
978localedir='${datarootdir}/locale'
979mandir='${datarootdir}/man'
980
981ac_prev=
982ac_dashdash=
983for ac_option
984do
985  # If the previous option needs an argument, assign it.
986  if test -n "$ac_prev"; then
987    eval $ac_prev=\$ac_option
988    ac_prev=
989    continue
990  fi
991
992  case $ac_option in
993  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
994  *=)   ac_optarg= ;;
995  *)    ac_optarg=yes ;;
996  esac
997
998  # Accept the important Cygnus configure options, so we can diagnose typos.
999
1000  case $ac_dashdash$ac_option in
1001  --)
1002    ac_dashdash=yes ;;
1003
1004  -bindir | --bindir | --bindi | --bind | --bin | --bi)
1005    ac_prev=bindir ;;
1006  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1007    bindir=$ac_optarg ;;
1008
1009  -build | --build | --buil | --bui | --bu)
1010    ac_prev=build_alias ;;
1011  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1012    build_alias=$ac_optarg ;;
1013
1014  -cache-file | --cache-file | --cache-fil | --cache-fi \
1015  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1016    ac_prev=cache_file ;;
1017  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1018  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1019    cache_file=$ac_optarg ;;
1020
1021  --config-cache | -C)
1022    cache_file=config.cache ;;
1023
1024  -datadir | --datadir | --datadi | --datad)
1025    ac_prev=datadir ;;
1026  -datadir=* | --datadir=* | --datadi=* | --datad=*)
1027    datadir=$ac_optarg ;;
1028
1029  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1030  | --dataroo | --dataro | --datar)
1031    ac_prev=datarootdir ;;
1032  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1033  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1034    datarootdir=$ac_optarg ;;
1035
1036  -disable-* | --disable-*)
1037    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1038    # Reject names that are not valid shell variable names.
1039    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1040      as_fn_error $? "invalid feature name: $ac_useropt"
1041    ac_useropt_orig=$ac_useropt
1042    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1043    case $ac_user_opts in
1044      *"
1045"enable_$ac_useropt"
1046"*) ;;
1047      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1048	 ac_unrecognized_sep=', ';;
1049    esac
1050    eval enable_$ac_useropt=no ;;
1051
1052  -docdir | --docdir | --docdi | --doc | --do)
1053    ac_prev=docdir ;;
1054  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1055    docdir=$ac_optarg ;;
1056
1057  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1058    ac_prev=dvidir ;;
1059  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1060    dvidir=$ac_optarg ;;
1061
1062  -enable-* | --enable-*)
1063    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1064    # Reject names that are not valid shell variable names.
1065    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1066      as_fn_error $? "invalid feature name: $ac_useropt"
1067    ac_useropt_orig=$ac_useropt
1068    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1069    case $ac_user_opts in
1070      *"
1071"enable_$ac_useropt"
1072"*) ;;
1073      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1074	 ac_unrecognized_sep=', ';;
1075    esac
1076    eval enable_$ac_useropt=\$ac_optarg ;;
1077
1078  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1079  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1080  | --exec | --exe | --ex)
1081    ac_prev=exec_prefix ;;
1082  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1083  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1084  | --exec=* | --exe=* | --ex=*)
1085    exec_prefix=$ac_optarg ;;
1086
1087  -gas | --gas | --ga | --g)
1088    # Obsolete; use --with-gas.
1089    with_gas=yes ;;
1090
1091  -help | --help | --hel | --he | -h)
1092    ac_init_help=long ;;
1093  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1094    ac_init_help=recursive ;;
1095  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1096    ac_init_help=short ;;
1097
1098  -host | --host | --hos | --ho)
1099    ac_prev=host_alias ;;
1100  -host=* | --host=* | --hos=* | --ho=*)
1101    host_alias=$ac_optarg ;;
1102
1103  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1104    ac_prev=htmldir ;;
1105  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1106  | --ht=*)
1107    htmldir=$ac_optarg ;;
1108
1109  -includedir | --includedir | --includedi | --included | --include \
1110  | --includ | --inclu | --incl | --inc)
1111    ac_prev=includedir ;;
1112  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1113  | --includ=* | --inclu=* | --incl=* | --inc=*)
1114    includedir=$ac_optarg ;;
1115
1116  -infodir | --infodir | --infodi | --infod | --info | --inf)
1117    ac_prev=infodir ;;
1118  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1119    infodir=$ac_optarg ;;
1120
1121  -libdir | --libdir | --libdi | --libd)
1122    ac_prev=libdir ;;
1123  -libdir=* | --libdir=* | --libdi=* | --libd=*)
1124    libdir=$ac_optarg ;;
1125
1126  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1127  | --libexe | --libex | --libe)
1128    ac_prev=libexecdir ;;
1129  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1130  | --libexe=* | --libex=* | --libe=*)
1131    libexecdir=$ac_optarg ;;
1132
1133  -localedir | --localedir | --localedi | --localed | --locale)
1134    ac_prev=localedir ;;
1135  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1136    localedir=$ac_optarg ;;
1137
1138  -localstatedir | --localstatedir | --localstatedi | --localstated \
1139  | --localstate | --localstat | --localsta | --localst | --locals)
1140    ac_prev=localstatedir ;;
1141  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1142  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1143    localstatedir=$ac_optarg ;;
1144
1145  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1146    ac_prev=mandir ;;
1147  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1148    mandir=$ac_optarg ;;
1149
1150  -nfp | --nfp | --nf)
1151    # Obsolete; use --without-fp.
1152    with_fp=no ;;
1153
1154  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1155  | --no-cr | --no-c | -n)
1156    no_create=yes ;;
1157
1158  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1159  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1160    no_recursion=yes ;;
1161
1162  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1163  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1164  | --oldin | --oldi | --old | --ol | --o)
1165    ac_prev=oldincludedir ;;
1166  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1167  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1168  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1169    oldincludedir=$ac_optarg ;;
1170
1171  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1172    ac_prev=prefix ;;
1173  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1174    prefix=$ac_optarg ;;
1175
1176  -program-prefix | --program-prefix | --program-prefi | --program-pref \
1177  | --program-pre | --program-pr | --program-p)
1178    ac_prev=program_prefix ;;
1179  -program-prefix=* | --program-prefix=* | --program-prefi=* \
1180  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1181    program_prefix=$ac_optarg ;;
1182
1183  -program-suffix | --program-suffix | --program-suffi | --program-suff \
1184  | --program-suf | --program-su | --program-s)
1185    ac_prev=program_suffix ;;
1186  -program-suffix=* | --program-suffix=* | --program-suffi=* \
1187  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1188    program_suffix=$ac_optarg ;;
1189
1190  -program-transform-name | --program-transform-name \
1191  | --program-transform-nam | --program-transform-na \
1192  | --program-transform-n | --program-transform- \
1193  | --program-transform | --program-transfor \
1194  | --program-transfo | --program-transf \
1195  | --program-trans | --program-tran \
1196  | --progr-tra | --program-tr | --program-t)
1197    ac_prev=program_transform_name ;;
1198  -program-transform-name=* | --program-transform-name=* \
1199  | --program-transform-nam=* | --program-transform-na=* \
1200  | --program-transform-n=* | --program-transform-=* \
1201  | --program-transform=* | --program-transfor=* \
1202  | --program-transfo=* | --program-transf=* \
1203  | --program-trans=* | --program-tran=* \
1204  | --progr-tra=* | --program-tr=* | --program-t=*)
1205    program_transform_name=$ac_optarg ;;
1206
1207  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1208    ac_prev=pdfdir ;;
1209  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1210    pdfdir=$ac_optarg ;;
1211
1212  -psdir | --psdir | --psdi | --psd | --ps)
1213    ac_prev=psdir ;;
1214  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1215    psdir=$ac_optarg ;;
1216
1217  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1218  | -silent | --silent | --silen | --sile | --sil)
1219    silent=yes ;;
1220
1221  -runstatedir | --runstatedir | --runstatedi | --runstated \
1222  | --runstate | --runstat | --runsta | --runst | --runs \
1223  | --run | --ru | --r)
1224    ac_prev=runstatedir ;;
1225  -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
1226  | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
1227  | --run=* | --ru=* | --r=*)
1228    runstatedir=$ac_optarg ;;
1229
1230  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1231    ac_prev=sbindir ;;
1232  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1233  | --sbi=* | --sb=*)
1234    sbindir=$ac_optarg ;;
1235
1236  -sharedstatedir | --sharedstatedir | --sharedstatedi \
1237  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1238  | --sharedst | --shareds | --shared | --share | --shar \
1239  | --sha | --sh)
1240    ac_prev=sharedstatedir ;;
1241  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1242  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1243  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1244  | --sha=* | --sh=*)
1245    sharedstatedir=$ac_optarg ;;
1246
1247  -site | --site | --sit)
1248    ac_prev=site ;;
1249  -site=* | --site=* | --sit=*)
1250    site=$ac_optarg ;;
1251
1252  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1253    ac_prev=srcdir ;;
1254  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1255    srcdir=$ac_optarg ;;
1256
1257  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1258  | --syscon | --sysco | --sysc | --sys | --sy)
1259    ac_prev=sysconfdir ;;
1260  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1261  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1262    sysconfdir=$ac_optarg ;;
1263
1264  -target | --target | --targe | --targ | --tar | --ta | --t)
1265    ac_prev=target_alias ;;
1266  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1267    target_alias=$ac_optarg ;;
1268
1269  -v | -verbose | --verbose | --verbos | --verbo | --verb)
1270    verbose=yes ;;
1271
1272  -version | --version | --versio | --versi | --vers | -V)
1273    ac_init_version=: ;;
1274
1275  -with-* | --with-*)
1276    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1277    # Reject names that are not valid shell variable names.
1278    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1279      as_fn_error $? "invalid package name: $ac_useropt"
1280    ac_useropt_orig=$ac_useropt
1281    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1282    case $ac_user_opts in
1283      *"
1284"with_$ac_useropt"
1285"*) ;;
1286      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1287	 ac_unrecognized_sep=', ';;
1288    esac
1289    eval with_$ac_useropt=\$ac_optarg ;;
1290
1291  -without-* | --without-*)
1292    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1293    # Reject names that are not valid shell variable names.
1294    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1295      as_fn_error $? "invalid package name: $ac_useropt"
1296    ac_useropt_orig=$ac_useropt
1297    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1298    case $ac_user_opts in
1299      *"
1300"with_$ac_useropt"
1301"*) ;;
1302      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1303	 ac_unrecognized_sep=', ';;
1304    esac
1305    eval with_$ac_useropt=no ;;
1306
1307  --x)
1308    # Obsolete; use --with-x.
1309    with_x=yes ;;
1310
1311  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1312  | --x-incl | --x-inc | --x-in | --x-i)
1313    ac_prev=x_includes ;;
1314  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1315  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1316    x_includes=$ac_optarg ;;
1317
1318  -x-libraries | --x-libraries | --x-librarie | --x-librari \
1319  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1320    ac_prev=x_libraries ;;
1321  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1322  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1323    x_libraries=$ac_optarg ;;
1324
1325  -*) as_fn_error $? "unrecognized option: \`$ac_option'
1326Try \`$0 --help' for more information"
1327    ;;
1328
1329  *=*)
1330    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1331    # Reject names that are not valid shell variable names.
1332    case $ac_envvar in #(
1333      '' | [0-9]* | *[!_$as_cr_alnum]* )
1334      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1335    esac
1336    eval $ac_envvar=\$ac_optarg
1337    export $ac_envvar ;;
1338
1339  *)
1340    # FIXME: should be removed in autoconf 3.0.
1341    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1342    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1343      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1344    : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1345    ;;
1346
1347  esac
1348done
1349
1350if test -n "$ac_prev"; then
1351  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1352  as_fn_error $? "missing argument to $ac_option"
1353fi
1354
1355if test -n "$ac_unrecognized_opts"; then
1356  case $enable_option_checking in
1357    no) ;;
1358    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1359    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1360  esac
1361fi
1362
1363# Check all directory arguments for consistency.
1364for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
1365		datadir sysconfdir sharedstatedir localstatedir includedir \
1366		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1367		libdir localedir mandir runstatedir
1368do
1369  eval ac_val=\$$ac_var
1370  # Remove trailing slashes.
1371  case $ac_val in
1372    */ )
1373      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1374      eval $ac_var=\$ac_val;;
1375  esac
1376  # Be sure to have absolute directory names.
1377  case $ac_val in
1378    [\\/$]* | ?:[\\/]* )  continue;;
1379    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1380  esac
1381  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1382done
1383
1384# There might be people who depend on the old broken behavior: `$host'
1385# used to hold the argument of --host etc.
1386# FIXME: To remove some day.
1387build=$build_alias
1388host=$host_alias
1389target=$target_alias
1390
1391# FIXME: To remove some day.
1392if test "x$host_alias" != x; then
1393  if test "x$build_alias" = x; then
1394    cross_compiling=maybe
1395  elif test "x$build_alias" != "x$host_alias"; then
1396    cross_compiling=yes
1397  fi
1398fi
1399
1400ac_tool_prefix=
1401test -n "$host_alias" && ac_tool_prefix=$host_alias-
1402
1403test "$silent" = yes && exec 6>/dev/null
1404
1405
1406ac_pwd=`pwd` && test -n "$ac_pwd" &&
1407ac_ls_di=`ls -di .` &&
1408ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1409  as_fn_error $? "working directory cannot be determined"
1410test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1411  as_fn_error $? "pwd does not report name of working directory"
1412
1413
1414# Find the source files, if location was not specified.
1415if test -z "$srcdir"; then
1416  ac_srcdir_defaulted=yes
1417  # Try the directory containing this script, then the parent directory.
1418  ac_confdir=`$as_dirname -- "$as_myself" ||
1419$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1420	 X"$as_myself" : 'X\(//\)[^/]' \| \
1421	 X"$as_myself" : 'X\(//\)$' \| \
1422	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1423$as_echo X"$as_myself" |
1424    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1425	    s//\1/
1426	    q
1427	  }
1428	  /^X\(\/\/\)[^/].*/{
1429	    s//\1/
1430	    q
1431	  }
1432	  /^X\(\/\/\)$/{
1433	    s//\1/
1434	    q
1435	  }
1436	  /^X\(\/\).*/{
1437	    s//\1/
1438	    q
1439	  }
1440	  s/.*/./; q'`
1441  srcdir=$ac_confdir
1442  if test ! -r "$srcdir/$ac_unique_file"; then
1443    srcdir=..
1444  fi
1445else
1446  ac_srcdir_defaulted=no
1447fi
1448if test ! -r "$srcdir/$ac_unique_file"; then
1449  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1450  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1451fi
1452ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1453ac_abs_confdir=`(
1454	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1455	pwd)`
1456# When building in place, set srcdir=.
1457if test "$ac_abs_confdir" = "$ac_pwd"; then
1458  srcdir=.
1459fi
1460# Remove unnecessary trailing slashes from srcdir.
1461# Double slashes in file names in object file debugging info
1462# mess up M-x gdb in Emacs.
1463case $srcdir in
1464*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1465esac
1466for ac_var in $ac_precious_vars; do
1467  eval ac_env_${ac_var}_set=\${${ac_var}+set}
1468  eval ac_env_${ac_var}_value=\$${ac_var}
1469  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1470  eval ac_cv_env_${ac_var}_value=\$${ac_var}
1471done
1472
1473#
1474# Report the --help message.
1475#
1476if test "$ac_init_help" = "long"; then
1477  # Omit some internal or obsolete options to make the list less imposing.
1478  # This message is too long to be a string in the A/UX 3.1 sh.
1479  cat <<_ACEOF
1480\`configure' configures unbound 1.16.1 to adapt to many kinds of systems.
1481
1482Usage: $0 [OPTION]... [VAR=VALUE]...
1483
1484To assign environment variables (e.g., CC, CFLAGS...), specify them as
1485VAR=VALUE.  See below for descriptions of some of the useful variables.
1486
1487Defaults for the options are specified in brackets.
1488
1489Configuration:
1490  -h, --help              display this help and exit
1491      --help=short        display options specific to this package
1492      --help=recursive    display the short help of all the included packages
1493  -V, --version           display version information and exit
1494  -q, --quiet, --silent   do not print \`checking ...' messages
1495      --cache-file=FILE   cache test results in FILE [disabled]
1496  -C, --config-cache      alias for \`--cache-file=config.cache'
1497  -n, --no-create         do not create output files
1498      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1499
1500Installation directories:
1501  --prefix=PREFIX         install architecture-independent files in PREFIX
1502                          [$ac_default_prefix]
1503  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1504                          [PREFIX]
1505
1506By default, \`make install' will install all the files in
1507\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1508an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1509for instance \`--prefix=\$HOME'.
1510
1511For better control, use the options below.
1512
1513Fine tuning of the installation directories:
1514  --bindir=DIR            user executables [EPREFIX/bin]
1515  --sbindir=DIR           system admin executables [EPREFIX/sbin]
1516  --libexecdir=DIR        program executables [EPREFIX/libexec]
1517  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1518  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1519  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1520  --runstatedir=DIR       modifiable per-process data [LOCALSTATEDIR/run]
1521  --libdir=DIR            object code libraries [EPREFIX/lib]
1522  --includedir=DIR        C header files [PREFIX/include]
1523  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1524  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1525  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1526  --infodir=DIR           info documentation [DATAROOTDIR/info]
1527  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1528  --mandir=DIR            man documentation [DATAROOTDIR/man]
1529  --docdir=DIR            documentation root [DATAROOTDIR/doc/unbound]
1530  --htmldir=DIR           html documentation [DOCDIR]
1531  --dvidir=DIR            dvi documentation [DOCDIR]
1532  --pdfdir=DIR            pdf documentation [DOCDIR]
1533  --psdir=DIR             ps documentation [DOCDIR]
1534_ACEOF
1535
1536  cat <<\_ACEOF
1537
1538System types:
1539  --build=BUILD     configure for building on BUILD [guessed]
1540  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1541_ACEOF
1542fi
1543
1544if test -n "$ac_init_help"; then
1545  case $ac_init_help in
1546     short | recursive ) echo "Configuration of unbound 1.16.1:";;
1547   esac
1548  cat <<\_ACEOF
1549
1550Optional Features:
1551  --disable-option-checking  ignore unrecognized --enable/--with options
1552  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1553  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1554  --enable-checking       Enable warnings, asserts, makefile-dependencies
1555  --enable-debug          same as enable-checking
1556  --disable-flto          Disable link-time optimization (gcc specific option)
1557  --enable-pie            Enable Position-Independent Executable (eg. to fully
1558                          benefit from ASLR, small performance penalty)
1559  --enable-relro-now      Enable full relocation binding at load-time (RELRO
1560                          NOW, to protect GOT and .dtor areas)
1561  --enable-shared[=PKGS]  build shared libraries [default=yes]
1562  --enable-static[=PKGS]  build static libraries [default=yes]
1563  --enable-fast-install[=PKGS]
1564                          optimize for fast installation [default=yes]
1565  --disable-libtool-lock  avoid locking (might break parallel builds)
1566  --disable-rpath         disable hardcoded rpath (default=enabled)
1567  --disable-largefile     omit support for large files
1568  --enable-systemd        compile with systemd support
1569  --enable-alloc-checks   enable to memory allocation statistics, for debug
1570                          purposes
1571  --enable-alloc-lite     enable for lightweight alloc assertions, for debug
1572                          purposes
1573  --enable-alloc-nonregional
1574                          enable nonregional allocs, slow but exposes regional
1575                          allocations to other memory purifiers, for debug
1576                          purposes
1577  --disable-swig-version-check
1578                          Disable swig version check to build python modules
1579                          with older swig even though that is unreliable
1580  --disable-sha1          Disable SHA1 RRSIG support, does not disable nsec3
1581                          support
1582  --disable-sha2          Disable SHA256 and SHA512 RRSIG support
1583  --enable-subnet         Enable client subnet
1584  --disable-gost          Disable GOST support
1585  --disable-ecdsa         Disable ECDSA support
1586  --disable-dsa           Disable DSA support
1587  --disable-ed25519       Disable ED25519 support
1588  --disable-ed448         Disable ED448 support
1589  --enable-event-api      Enable (experimental) pluggable event base
1590                          libunbound API installed to unbound-event.h
1591  --enable-tfo-client     Enable TCP Fast Open for client mode
1592  --enable-tfo-server     Enable TCP Fast Open for server mode
1593  --enable-static-exe     enable to compile executables statically against
1594                          (event) uninstalled libs, for debug purposes
1595  --enable-fully-static   enable to compile fully static
1596  --enable-lock-checks    enable to check lock and unlock calls, for debug
1597                          purposes
1598  --enable-allsymbols     export all symbols from libunbound and link binaries
1599                          to it, smaller install size but libunbound export
1600                          table is polluted by internal symbols
1601  --enable-dnstap         Enable dnstap support (requires protobuf-c)
1602  --enable-dnscrypt       Enable dnscrypt support (requires libsodium)
1603  --enable-cachedb        enable cachedb module that can use external cache
1604                          storage
1605  --enable-ipsecmod       Enable ipsecmod module that facilitates
1606                          opportunistic IPsec
1607  --enable-ipset          enable ipset module
1608  --disable-explicit-port-randomisation
1609                          disable explicit source port randomisation and rely
1610                          on the kernel to provide random source ports
1611  --enable-linux-ip-local-port-range
1612                          Define this to enable use of
1613                          /proc/sys/net/ipv4/ip_local_port_range as a default
1614                          outgoing port range. This is only for the libunbound
1615                          on Linux and does not affect unbound resolving
1616                          daemon itself. This may severely limit the number of
1617                          available outgoing ports and thus decrease
1618                          randomness. Define this only when the target system
1619                          restricts (e.g. some of SELinux enabled
1620                          distributions) the use of non-ephemeral ports.
1621
1622Optional Packages:
1623  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1624  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1625  --with-conf-file=path   Pathname to the Unbound configuration file
1626  --with-run-dir=path     set default directory to chdir to (by default dir
1627                          part of cfg file)
1628  --with-chroot-dir=path  set default directory to chroot to (by default same
1629                          as run-dir)
1630  --with-share-dir=path   set default directory with shared data (by default
1631                          same as share/unbound)
1632  --with-pidfile=filename set default pathname to unbound pidfile (default
1633                          run-dir/unbound.pid)
1634  --with-rootkey-file=filename
1635                          set default pathname to root key file (default
1636                          run-dir/root.key). This file is read and written.
1637  --with-rootcert-file=filename
1638                          set default pathname to root update certificate file
1639                          (default run-dir/icannbundle.pem). This file need
1640                          not exist if you are content with the builtin.
1641  --with-username=user    set default user that unbound changes to (default
1642                          user is unbound)
1643  --with-pic[=PKGS]       try to use only PIC/non-PIC objects [default=use
1644                          both]
1645  --with-aix-soname=aix|svr4|both
1646                          shared library versioning (aka "SONAME") variant to
1647                          provide on AIX, [default=aix].
1648  --with-gnu-ld           assume the C compiler uses GNU ld [default=no]
1649  --with-sysroot[=DIR]    Search for dependent libraries within DIR (or the
1650                          compiler's sysroot if not specified).
1651  --with-pthreads         use pthreads library, or --without-pthreads to
1652                          disable threading support.
1653  --with-solaris-threads  use solaris native thread library.
1654  --with-syslog-facility=LOCAL0 - LOCAL7
1655                          set SYSLOG_FACILITY, default DAEMON
1656  --with-dynlibmodule     build dynamic library module, or
1657                          --without-dynlibmodule to disable it. (default=no)
1658  --with-pyunbound        build PyUnbound, or --without-pyunbound to skip it.
1659                          (default=no)
1660  --with-pythonmodule     build Python module, or --without-pythonmodule to
1661                          disable script engine. (default=no)
1662  --with-nss=path         use libnss instead of openssl, installed at path.
1663  --with-nettle=path      use libnettle as crypto library, installed at path.
1664  --with-ssl=pathname     enable SSL (will check /usr/local/ssl /usr/lib/ssl
1665                          /usr/ssl /usr/pkg /usr/local /opt/local /usr/sfw
1666                          /usr or specify like /usr/include/openssl11)
1667  --with-libbsd           Use portable libbsd functions
1668  --with-deprecate-rsa-1024
1669                          Deprecate RSA 1024 bit length, makes that an
1670                          unsupported key, for use when OpenSSL FIPS refuses
1671                          1024 bit verification
1672  --with-libevent=pathname
1673                          use libevent (will check /usr/local /opt/local
1674                          /usr/lib /usr/pkg /usr/sfw /usr or you can specify
1675                          an explicit path). Slower, but allows use of large
1676                          outgoing port ranges.
1677  --with-libexpat=path    specify explicit path for libexpat.
1678  --with-libhiredis=path  specify explicit path for libhiredis.
1679  --with-libnghttp2=path  specify explicit path for libnghttp2.
1680  --with-dnstap-socket-path=pathname
1681                          set default dnstap socket path
1682  --with-protobuf-c=path  Path where protobuf-c is installed, for dnstap
1683  --with-libsodium=path   Path where libsodium is installed, for dnscrypt
1684  --with-libmnl=path      specify explicit path for libmnl.
1685  --with-libunbound-only  do not build daemon and tool programs
1686
1687Some influential environment variables:
1688  CC          C compiler command
1689  CFLAGS      C compiler flags
1690  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
1691              nonstandard directory <lib dir>
1692  LIBS        libraries to pass to the linker, e.g. -l<library>
1693  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1694              you have headers in a nonstandard directory <include dir>
1695  CPP         C preprocessor
1696  YACC        The `Yet Another Compiler Compiler' implementation to use.
1697              Defaults to the first program found out of: `bison -y', `byacc',
1698              `yacc'.
1699  YFLAGS      The list of arguments that will be passed by default to $YACC.
1700              This script will default YFLAGS to the empty string to avoid a
1701              default value of `-d' given by some make applications.
1702  LT_SYS_LIBRARY_PATH
1703              User-defined run-time library search path.
1704  PKG_CONFIG  path to pkg-config utility
1705  PKG_CONFIG_PATH
1706              directories to add to pkg-config's search path
1707  PKG_CONFIG_LIBDIR
1708              path overriding pkg-config's built-in search path
1709  SYSTEMD_CFLAGS
1710              C compiler flags for SYSTEMD, overriding pkg-config
1711  SYSTEMD_LIBS
1712              linker flags for SYSTEMD, overriding pkg-config
1713  SYSTEMD_DAEMON_CFLAGS
1714              C compiler flags for SYSTEMD_DAEMON, overriding pkg-config
1715  SYSTEMD_DAEMON_LIBS
1716              linker flags for SYSTEMD_DAEMON, overriding pkg-config
1717  PYTHON_VERSION
1718              The installed Python version to use, for example '2.3'. This
1719              string will be appended to the Python interpreter canonical
1720              name.
1721
1722Use these variables to override the choices made by `configure' or to help
1723it to find libraries and programs with nonstandard names/locations.
1724
1725Report bugs to <unbound-bugs@nlnetlabs.nl or https://github.com/NLnetLabs/unbound/issues>.
1726_ACEOF
1727ac_status=$?
1728fi
1729
1730if test "$ac_init_help" = "recursive"; then
1731  # If there are subdirs, report their specific --help.
1732  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1733    test -d "$ac_dir" ||
1734      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1735      continue
1736    ac_builddir=.
1737
1738case "$ac_dir" in
1739.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1740*)
1741  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1742  # A ".." for each directory in $ac_dir_suffix.
1743  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1744  case $ac_top_builddir_sub in
1745  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1746  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1747  esac ;;
1748esac
1749ac_abs_top_builddir=$ac_pwd
1750ac_abs_builddir=$ac_pwd$ac_dir_suffix
1751# for backward compatibility:
1752ac_top_builddir=$ac_top_build_prefix
1753
1754case $srcdir in
1755  .)  # We are building in place.
1756    ac_srcdir=.
1757    ac_top_srcdir=$ac_top_builddir_sub
1758    ac_abs_top_srcdir=$ac_pwd ;;
1759  [\\/]* | ?:[\\/]* )  # Absolute name.
1760    ac_srcdir=$srcdir$ac_dir_suffix;
1761    ac_top_srcdir=$srcdir
1762    ac_abs_top_srcdir=$srcdir ;;
1763  *) # Relative name.
1764    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1765    ac_top_srcdir=$ac_top_build_prefix$srcdir
1766    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1767esac
1768ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1769
1770    cd "$ac_dir" || { ac_status=$?; continue; }
1771    # Check for guested configure.
1772    if test -f "$ac_srcdir/configure.gnu"; then
1773      echo &&
1774      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1775    elif test -f "$ac_srcdir/configure"; then
1776      echo &&
1777      $SHELL "$ac_srcdir/configure" --help=recursive
1778    else
1779      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1780    fi || ac_status=$?
1781    cd "$ac_pwd" || { ac_status=$?; break; }
1782  done
1783fi
1784
1785test -n "$ac_init_help" && exit $ac_status
1786if $ac_init_version; then
1787  cat <<\_ACEOF
1788unbound configure 1.16.1
1789generated by GNU Autoconf 2.69
1790
1791Copyright (C) 2012 Free Software Foundation, Inc.
1792This configure script is free software; the Free Software Foundation
1793gives unlimited permission to copy, distribute and modify it.
1794_ACEOF
1795  exit
1796fi
1797
1798## ------------------------ ##
1799## Autoconf initialization. ##
1800## ------------------------ ##
1801
1802# ac_fn_c_try_compile LINENO
1803# --------------------------
1804# Try to compile conftest.$ac_ext, and return whether this succeeded.
1805ac_fn_c_try_compile ()
1806{
1807  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1808  rm -f conftest.$ac_objext
1809  if { { ac_try="$ac_compile"
1810case "(($ac_try" in
1811  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1812  *) ac_try_echo=$ac_try;;
1813esac
1814eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1815$as_echo "$ac_try_echo"; } >&5
1816  (eval "$ac_compile") 2>conftest.err
1817  ac_status=$?
1818  if test -s conftest.err; then
1819    grep -v '^ *+' conftest.err >conftest.er1
1820    cat conftest.er1 >&5
1821    mv -f conftest.er1 conftest.err
1822  fi
1823  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1824  test $ac_status = 0; } && {
1825	 test -z "$ac_c_werror_flag" ||
1826	 test ! -s conftest.err
1827       } && test -s conftest.$ac_objext; then :
1828  ac_retval=0
1829else
1830  $as_echo "$as_me: failed program was:" >&5
1831sed 's/^/| /' conftest.$ac_ext >&5
1832
1833	ac_retval=1
1834fi
1835  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1836  as_fn_set_status $ac_retval
1837
1838} # ac_fn_c_try_compile
1839
1840# ac_fn_c_try_cpp LINENO
1841# ----------------------
1842# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1843ac_fn_c_try_cpp ()
1844{
1845  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1846  if { { ac_try="$ac_cpp conftest.$ac_ext"
1847case "(($ac_try" in
1848  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1849  *) ac_try_echo=$ac_try;;
1850esac
1851eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1852$as_echo "$ac_try_echo"; } >&5
1853  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1854  ac_status=$?
1855  if test -s conftest.err; then
1856    grep -v '^ *+' conftest.err >conftest.er1
1857    cat conftest.er1 >&5
1858    mv -f conftest.er1 conftest.err
1859  fi
1860  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1861  test $ac_status = 0; } > conftest.i && {
1862	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1863	 test ! -s conftest.err
1864       }; then :
1865  ac_retval=0
1866else
1867  $as_echo "$as_me: failed program was:" >&5
1868sed 's/^/| /' conftest.$ac_ext >&5
1869
1870    ac_retval=1
1871fi
1872  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1873  as_fn_set_status $ac_retval
1874
1875} # ac_fn_c_try_cpp
1876
1877# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1878# -------------------------------------------------------
1879# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1880# the include files in INCLUDES and setting the cache variable VAR
1881# accordingly.
1882ac_fn_c_check_header_mongrel ()
1883{
1884  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1885  if eval \${$3+:} false; then :
1886  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1887$as_echo_n "checking for $2... " >&6; }
1888if eval \${$3+:} false; then :
1889  $as_echo_n "(cached) " >&6
1890fi
1891eval ac_res=\$$3
1892	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1893$as_echo "$ac_res" >&6; }
1894else
1895  # Is the header compilable?
1896{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1897$as_echo_n "checking $2 usability... " >&6; }
1898cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1899/* end confdefs.h.  */
1900$4
1901#include <$2>
1902_ACEOF
1903if ac_fn_c_try_compile "$LINENO"; then :
1904  ac_header_compiler=yes
1905else
1906  ac_header_compiler=no
1907fi
1908rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1909{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1910$as_echo "$ac_header_compiler" >&6; }
1911
1912# Is the header present?
1913{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1914$as_echo_n "checking $2 presence... " >&6; }
1915cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1916/* end confdefs.h.  */
1917#include <$2>
1918_ACEOF
1919if ac_fn_c_try_cpp "$LINENO"; then :
1920  ac_header_preproc=yes
1921else
1922  ac_header_preproc=no
1923fi
1924rm -f conftest.err conftest.i conftest.$ac_ext
1925{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1926$as_echo "$ac_header_preproc" >&6; }
1927
1928# So?  What about this header?
1929case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1930  yes:no: )
1931    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1932$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1933    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1934$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1935    ;;
1936  no:yes:* )
1937    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1938$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1939    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
1940$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
1941    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1942$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1943    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
1944$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
1945    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1946$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1947( $as_echo "## --------------------------------------------------------------------------------------- ##
1948## Report this to unbound-bugs@nlnetlabs.nl or https://github.com/NLnetLabs/unbound/issues ##
1949## --------------------------------------------------------------------------------------- ##"
1950     ) | sed "s/^/$as_me: WARNING:     /" >&2
1951    ;;
1952esac
1953  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1954$as_echo_n "checking for $2... " >&6; }
1955if eval \${$3+:} false; then :
1956  $as_echo_n "(cached) " >&6
1957else
1958  eval "$3=\$ac_header_compiler"
1959fi
1960eval ac_res=\$$3
1961	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1962$as_echo "$ac_res" >&6; }
1963fi
1964  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1965
1966} # ac_fn_c_check_header_mongrel
1967
1968# ac_fn_c_try_run LINENO
1969# ----------------------
1970# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1971# that executables *can* be run.
1972ac_fn_c_try_run ()
1973{
1974  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1975  if { { ac_try="$ac_link"
1976case "(($ac_try" in
1977  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1978  *) ac_try_echo=$ac_try;;
1979esac
1980eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1981$as_echo "$ac_try_echo"; } >&5
1982  (eval "$ac_link") 2>&5
1983  ac_status=$?
1984  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1985  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1986  { { case "(($ac_try" in
1987  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1988  *) ac_try_echo=$ac_try;;
1989esac
1990eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1991$as_echo "$ac_try_echo"; } >&5
1992  (eval "$ac_try") 2>&5
1993  ac_status=$?
1994  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1995  test $ac_status = 0; }; }; then :
1996  ac_retval=0
1997else
1998  $as_echo "$as_me: program exited with status $ac_status" >&5
1999       $as_echo "$as_me: failed program was:" >&5
2000sed 's/^/| /' conftest.$ac_ext >&5
2001
2002       ac_retval=$ac_status
2003fi
2004  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2005  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2006  as_fn_set_status $ac_retval
2007
2008} # ac_fn_c_try_run
2009
2010# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2011# -------------------------------------------------------
2012# Tests whether HEADER exists and can be compiled using the include files in
2013# INCLUDES, setting the cache variable VAR accordingly.
2014ac_fn_c_check_header_compile ()
2015{
2016  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2017  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2018$as_echo_n "checking for $2... " >&6; }
2019if eval \${$3+:} false; then :
2020  $as_echo_n "(cached) " >&6
2021else
2022  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2023/* end confdefs.h.  */
2024$4
2025#include <$2>
2026_ACEOF
2027if ac_fn_c_try_compile "$LINENO"; then :
2028  eval "$3=yes"
2029else
2030  eval "$3=no"
2031fi
2032rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2033fi
2034eval ac_res=\$$3
2035	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2036$as_echo "$ac_res" >&6; }
2037  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2038
2039} # ac_fn_c_check_header_compile
2040
2041# ac_fn_c_try_link LINENO
2042# -----------------------
2043# Try to link conftest.$ac_ext, and return whether this succeeded.
2044ac_fn_c_try_link ()
2045{
2046  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2047  rm -f conftest.$ac_objext conftest$ac_exeext
2048  if { { ac_try="$ac_link"
2049case "(($ac_try" in
2050  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2051  *) ac_try_echo=$ac_try;;
2052esac
2053eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2054$as_echo "$ac_try_echo"; } >&5
2055  (eval "$ac_link") 2>conftest.err
2056  ac_status=$?
2057  if test -s conftest.err; then
2058    grep -v '^ *+' conftest.err >conftest.er1
2059    cat conftest.er1 >&5
2060    mv -f conftest.er1 conftest.err
2061  fi
2062  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2063  test $ac_status = 0; } && {
2064	 test -z "$ac_c_werror_flag" ||
2065	 test ! -s conftest.err
2066       } && test -s conftest$ac_exeext && {
2067	 test "$cross_compiling" = yes ||
2068	 test -x conftest$ac_exeext
2069       }; then :
2070  ac_retval=0
2071else
2072  $as_echo "$as_me: failed program was:" >&5
2073sed 's/^/| /' conftest.$ac_ext >&5
2074
2075	ac_retval=1
2076fi
2077  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2078  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2079  # interfere with the next link command; also delete a directory that is
2080  # left behind by Apple's compiler.  We do this before executing the actions.
2081  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2082  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2083  as_fn_set_status $ac_retval
2084
2085} # ac_fn_c_try_link
2086
2087# ac_fn_c_check_func LINENO FUNC VAR
2088# ----------------------------------
2089# Tests whether FUNC exists, setting the cache variable VAR accordingly
2090ac_fn_c_check_func ()
2091{
2092  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2093  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2094$as_echo_n "checking for $2... " >&6; }
2095if eval \${$3+:} false; then :
2096  $as_echo_n "(cached) " >&6
2097else
2098  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2099/* end confdefs.h.  */
2100/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2101   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2102#define $2 innocuous_$2
2103
2104/* System header to define __stub macros and hopefully few prototypes,
2105    which can conflict with char $2 (); below.
2106    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2107    <limits.h> exists even on freestanding compilers.  */
2108
2109#ifdef __STDC__
2110# include <limits.h>
2111#else
2112# include <assert.h>
2113#endif
2114
2115#undef $2
2116
2117/* Override any GCC internal prototype to avoid an error.
2118   Use char because int might match the return type of a GCC
2119   builtin and then its argument prototype would still apply.  */
2120#ifdef __cplusplus
2121extern "C"
2122#endif
2123char $2 ();
2124/* The GNU C library defines this for functions which it implements
2125    to always fail with ENOSYS.  Some functions are actually named
2126    something starting with __ and the normal name is an alias.  */
2127#if defined __stub_$2 || defined __stub___$2
2128choke me
2129#endif
2130
2131int
2132main ()
2133{
2134return $2 ();
2135  ;
2136  return 0;
2137}
2138_ACEOF
2139if ac_fn_c_try_link "$LINENO"; then :
2140  eval "$3=yes"
2141else
2142  eval "$3=no"
2143fi
2144rm -f core conftest.err conftest.$ac_objext \
2145    conftest$ac_exeext conftest.$ac_ext
2146fi
2147eval ac_res=\$$3
2148	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2149$as_echo "$ac_res" >&6; }
2150  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2151
2152} # ac_fn_c_check_func
2153
2154# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2155# -------------------------------------------
2156# Tests whether TYPE exists after having included INCLUDES, setting cache
2157# variable VAR accordingly.
2158ac_fn_c_check_type ()
2159{
2160  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2161  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2162$as_echo_n "checking for $2... " >&6; }
2163if eval \${$3+:} false; then :
2164  $as_echo_n "(cached) " >&6
2165else
2166  eval "$3=no"
2167  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2168/* end confdefs.h.  */
2169$4
2170int
2171main ()
2172{
2173if (sizeof ($2))
2174	 return 0;
2175  ;
2176  return 0;
2177}
2178_ACEOF
2179if ac_fn_c_try_compile "$LINENO"; then :
2180  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2181/* end confdefs.h.  */
2182$4
2183int
2184main ()
2185{
2186if (sizeof (($2)))
2187	    return 0;
2188  ;
2189  return 0;
2190}
2191_ACEOF
2192if ac_fn_c_try_compile "$LINENO"; then :
2193
2194else
2195  eval "$3=yes"
2196fi
2197rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2198fi
2199rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2200fi
2201eval ac_res=\$$3
2202	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2203$as_echo "$ac_res" >&6; }
2204  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2205
2206} # ac_fn_c_check_type
2207
2208# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2209# --------------------------------------------
2210# Tries to find the compile-time value of EXPR in a program that includes
2211# INCLUDES, setting VAR accordingly. Returns whether the value could be
2212# computed
2213ac_fn_c_compute_int ()
2214{
2215  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2216  if test "$cross_compiling" = yes; then
2217    # Depending upon the size, compute the lo and hi bounds.
2218cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2219/* end confdefs.h.  */
2220$4
2221int
2222main ()
2223{
2224static int test_array [1 - 2 * !(($2) >= 0)];
2225test_array [0] = 0;
2226return test_array [0];
2227
2228  ;
2229  return 0;
2230}
2231_ACEOF
2232if ac_fn_c_try_compile "$LINENO"; then :
2233  ac_lo=0 ac_mid=0
2234  while :; do
2235    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2236/* end confdefs.h.  */
2237$4
2238int
2239main ()
2240{
2241static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2242test_array [0] = 0;
2243return test_array [0];
2244
2245  ;
2246  return 0;
2247}
2248_ACEOF
2249if ac_fn_c_try_compile "$LINENO"; then :
2250  ac_hi=$ac_mid; break
2251else
2252  as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2253			if test $ac_lo -le $ac_mid; then
2254			  ac_lo= ac_hi=
2255			  break
2256			fi
2257			as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2258fi
2259rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2260  done
2261else
2262  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2263/* end confdefs.h.  */
2264$4
2265int
2266main ()
2267{
2268static int test_array [1 - 2 * !(($2) < 0)];
2269test_array [0] = 0;
2270return test_array [0];
2271
2272  ;
2273  return 0;
2274}
2275_ACEOF
2276if ac_fn_c_try_compile "$LINENO"; then :
2277  ac_hi=-1 ac_mid=-1
2278  while :; do
2279    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2280/* end confdefs.h.  */
2281$4
2282int
2283main ()
2284{
2285static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2286test_array [0] = 0;
2287return test_array [0];
2288
2289  ;
2290  return 0;
2291}
2292_ACEOF
2293if ac_fn_c_try_compile "$LINENO"; then :
2294  ac_lo=$ac_mid; break
2295else
2296  as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2297			if test $ac_mid -le $ac_hi; then
2298			  ac_lo= ac_hi=
2299			  break
2300			fi
2301			as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2302fi
2303rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2304  done
2305else
2306  ac_lo= ac_hi=
2307fi
2308rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2309fi
2310rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2311# Binary search between lo and hi bounds.
2312while test "x$ac_lo" != "x$ac_hi"; do
2313  as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2314  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2315/* end confdefs.h.  */
2316$4
2317int
2318main ()
2319{
2320static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2321test_array [0] = 0;
2322return test_array [0];
2323
2324  ;
2325  return 0;
2326}
2327_ACEOF
2328if ac_fn_c_try_compile "$LINENO"; then :
2329  ac_hi=$ac_mid
2330else
2331  as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2332fi
2333rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2334done
2335case $ac_lo in #((
2336?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2337'') ac_retval=1 ;;
2338esac
2339  else
2340    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2341/* end confdefs.h.  */
2342$4
2343static long int longval () { return $2; }
2344static unsigned long int ulongval () { return $2; }
2345#include <stdio.h>
2346#include <stdlib.h>
2347int
2348main ()
2349{
2350
2351  FILE *f = fopen ("conftest.val", "w");
2352  if (! f)
2353    return 1;
2354  if (($2) < 0)
2355    {
2356      long int i = longval ();
2357      if (i != ($2))
2358	return 1;
2359      fprintf (f, "%ld", i);
2360    }
2361  else
2362    {
2363      unsigned long int i = ulongval ();
2364      if (i != ($2))
2365	return 1;
2366      fprintf (f, "%lu", i);
2367    }
2368  /* Do not output a trailing newline, as this causes \r\n confusion
2369     on some platforms.  */
2370  return ferror (f) || fclose (f) != 0;
2371
2372  ;
2373  return 0;
2374}
2375_ACEOF
2376if ac_fn_c_try_run "$LINENO"; then :
2377  echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2378else
2379  ac_retval=1
2380fi
2381rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2382  conftest.$ac_objext conftest.beam conftest.$ac_ext
2383rm -f conftest.val
2384
2385  fi
2386  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2387  as_fn_set_status $ac_retval
2388
2389} # ac_fn_c_compute_int
2390
2391# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2392# ---------------------------------------------
2393# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2394# accordingly.
2395ac_fn_c_check_decl ()
2396{
2397  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2398  as_decl_name=`echo $2|sed 's/ *(.*//'`
2399  as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2400  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2401$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2402if eval \${$3+:} false; then :
2403  $as_echo_n "(cached) " >&6
2404else
2405  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2406/* end confdefs.h.  */
2407$4
2408int
2409main ()
2410{
2411#ifndef $as_decl_name
2412#ifdef __cplusplus
2413  (void) $as_decl_use;
2414#else
2415  (void) $as_decl_name;
2416#endif
2417#endif
2418
2419  ;
2420  return 0;
2421}
2422_ACEOF
2423if ac_fn_c_try_compile "$LINENO"; then :
2424  eval "$3=yes"
2425else
2426  eval "$3=no"
2427fi
2428rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2429fi
2430eval ac_res=\$$3
2431	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2432$as_echo "$ac_res" >&6; }
2433  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2434
2435} # ac_fn_c_check_decl
2436
2437# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2438# ----------------------------------------------------
2439# Tries to find if the field MEMBER exists in type AGGR, after including
2440# INCLUDES, setting cache variable VAR accordingly.
2441ac_fn_c_check_member ()
2442{
2443  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2444  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2445$as_echo_n "checking for $2.$3... " >&6; }
2446if eval \${$4+:} false; then :
2447  $as_echo_n "(cached) " >&6
2448else
2449  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2450/* end confdefs.h.  */
2451$5
2452int
2453main ()
2454{
2455static $2 ac_aggr;
2456if (ac_aggr.$3)
2457return 0;
2458  ;
2459  return 0;
2460}
2461_ACEOF
2462if ac_fn_c_try_compile "$LINENO"; then :
2463  eval "$4=yes"
2464else
2465  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2466/* end confdefs.h.  */
2467$5
2468int
2469main ()
2470{
2471static $2 ac_aggr;
2472if (sizeof ac_aggr.$3)
2473return 0;
2474  ;
2475  return 0;
2476}
2477_ACEOF
2478if ac_fn_c_try_compile "$LINENO"; then :
2479  eval "$4=yes"
2480else
2481  eval "$4=no"
2482fi
2483rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2484fi
2485rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2486fi
2487eval ac_res=\$$4
2488	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2489$as_echo "$ac_res" >&6; }
2490  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2491
2492} # ac_fn_c_check_member
2493cat >config.log <<_ACEOF
2494This file contains any messages produced by compilers while
2495running configure, to aid debugging if configure makes a mistake.
2496
2497It was created by unbound $as_me 1.16.1, which was
2498generated by GNU Autoconf 2.69.  Invocation command line was
2499
2500  $ $0 $@
2501
2502_ACEOF
2503exec 5>>config.log
2504{
2505cat <<_ASUNAME
2506## --------- ##
2507## Platform. ##
2508## --------- ##
2509
2510hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2511uname -m = `(uname -m) 2>/dev/null || echo unknown`
2512uname -r = `(uname -r) 2>/dev/null || echo unknown`
2513uname -s = `(uname -s) 2>/dev/null || echo unknown`
2514uname -v = `(uname -v) 2>/dev/null || echo unknown`
2515
2516/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2517/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2518
2519/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2520/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2521/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2522/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2523/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2524/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2525/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2526
2527_ASUNAME
2528
2529as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2530for as_dir in $PATH
2531do
2532  IFS=$as_save_IFS
2533  test -z "$as_dir" && as_dir=.
2534    $as_echo "PATH: $as_dir"
2535  done
2536IFS=$as_save_IFS
2537
2538} >&5
2539
2540cat >&5 <<_ACEOF
2541
2542
2543## ----------- ##
2544## Core tests. ##
2545## ----------- ##
2546
2547_ACEOF
2548
2549
2550# Keep a trace of the command line.
2551# Strip out --no-create and --no-recursion so they do not pile up.
2552# Strip out --silent because we don't want to record it for future runs.
2553# Also quote any args containing shell meta-characters.
2554# Make two passes to allow for proper duplicate-argument suppression.
2555ac_configure_args=
2556ac_configure_args0=
2557ac_configure_args1=
2558ac_must_keep_next=false
2559for ac_pass in 1 2
2560do
2561  for ac_arg
2562  do
2563    case $ac_arg in
2564    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2565    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2566    | -silent | --silent | --silen | --sile | --sil)
2567      continue ;;
2568    *\'*)
2569      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2570    esac
2571    case $ac_pass in
2572    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2573    2)
2574      as_fn_append ac_configure_args1 " '$ac_arg'"
2575      if test $ac_must_keep_next = true; then
2576	ac_must_keep_next=false # Got value, back to normal.
2577      else
2578	case $ac_arg in
2579	  *=* | --config-cache | -C | -disable-* | --disable-* \
2580	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2581	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2582	  | -with-* | --with-* | -without-* | --without-* | --x)
2583	    case "$ac_configure_args0 " in
2584	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2585	    esac
2586	    ;;
2587	  -* ) ac_must_keep_next=true ;;
2588	esac
2589      fi
2590      as_fn_append ac_configure_args " '$ac_arg'"
2591      ;;
2592    esac
2593  done
2594done
2595{ ac_configure_args0=; unset ac_configure_args0;}
2596{ ac_configure_args1=; unset ac_configure_args1;}
2597
2598# When interrupted or exit'd, cleanup temporary files, and complete
2599# config.log.  We remove comments because anyway the quotes in there
2600# would cause problems or look ugly.
2601# WARNING: Use '\'' to represent an apostrophe within the trap.
2602# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2603trap 'exit_status=$?
2604  # Save into config.log some information that might help in debugging.
2605  {
2606    echo
2607
2608    $as_echo "## ---------------- ##
2609## Cache variables. ##
2610## ---------------- ##"
2611    echo
2612    # The following way of writing the cache mishandles newlines in values,
2613(
2614  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2615    eval ac_val=\$$ac_var
2616    case $ac_val in #(
2617    *${as_nl}*)
2618      case $ac_var in #(
2619      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2620$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2621      esac
2622      case $ac_var in #(
2623      _ | IFS | as_nl) ;; #(
2624      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2625      *) { eval $ac_var=; unset $ac_var;} ;;
2626      esac ;;
2627    esac
2628  done
2629  (set) 2>&1 |
2630    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2631    *${as_nl}ac_space=\ *)
2632      sed -n \
2633	"s/'\''/'\''\\\\'\'''\''/g;
2634	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2635      ;; #(
2636    *)
2637      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2638      ;;
2639    esac |
2640    sort
2641)
2642    echo
2643
2644    $as_echo "## ----------------- ##
2645## Output variables. ##
2646## ----------------- ##"
2647    echo
2648    for ac_var in $ac_subst_vars
2649    do
2650      eval ac_val=\$$ac_var
2651      case $ac_val in
2652      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2653      esac
2654      $as_echo "$ac_var='\''$ac_val'\''"
2655    done | sort
2656    echo
2657
2658    if test -n "$ac_subst_files"; then
2659      $as_echo "## ------------------- ##
2660## File substitutions. ##
2661## ------------------- ##"
2662      echo
2663      for ac_var in $ac_subst_files
2664      do
2665	eval ac_val=\$$ac_var
2666	case $ac_val in
2667	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2668	esac
2669	$as_echo "$ac_var='\''$ac_val'\''"
2670      done | sort
2671      echo
2672    fi
2673
2674    if test -s confdefs.h; then
2675      $as_echo "## ----------- ##
2676## confdefs.h. ##
2677## ----------- ##"
2678      echo
2679      cat confdefs.h
2680      echo
2681    fi
2682    test "$ac_signal" != 0 &&
2683      $as_echo "$as_me: caught signal $ac_signal"
2684    $as_echo "$as_me: exit $exit_status"
2685  } >&5
2686  rm -f core *.core core.conftest.* &&
2687    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2688    exit $exit_status
2689' 0
2690for ac_signal in 1 2 13 15; do
2691  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2692done
2693ac_signal=0
2694
2695# confdefs.h avoids OS command line length limits that DEFS can exceed.
2696rm -f -r conftest* confdefs.h
2697
2698$as_echo "/* confdefs.h */" > confdefs.h
2699
2700# Predefined preprocessor variables.
2701
2702cat >>confdefs.h <<_ACEOF
2703#define PACKAGE_NAME "$PACKAGE_NAME"
2704_ACEOF
2705
2706cat >>confdefs.h <<_ACEOF
2707#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2708_ACEOF
2709
2710cat >>confdefs.h <<_ACEOF
2711#define PACKAGE_VERSION "$PACKAGE_VERSION"
2712_ACEOF
2713
2714cat >>confdefs.h <<_ACEOF
2715#define PACKAGE_STRING "$PACKAGE_STRING"
2716_ACEOF
2717
2718cat >>confdefs.h <<_ACEOF
2719#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2720_ACEOF
2721
2722cat >>confdefs.h <<_ACEOF
2723#define PACKAGE_URL "$PACKAGE_URL"
2724_ACEOF
2725
2726
2727# Let the site file select an alternate cache file if it wants to.
2728# Prefer an explicitly selected file to automatically selected ones.
2729ac_site_file1=NONE
2730ac_site_file2=NONE
2731if test -n "$CONFIG_SITE"; then
2732  # We do not want a PATH search for config.site.
2733  case $CONFIG_SITE in #((
2734    -*)  ac_site_file1=./$CONFIG_SITE;;
2735    */*) ac_site_file1=$CONFIG_SITE;;
2736    *)   ac_site_file1=./$CONFIG_SITE;;
2737  esac
2738elif test "x$prefix" != xNONE; then
2739  ac_site_file1=$prefix/share/config.site
2740  ac_site_file2=$prefix/etc/config.site
2741else
2742  ac_site_file1=$ac_default_prefix/share/config.site
2743  ac_site_file2=$ac_default_prefix/etc/config.site
2744fi
2745for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2746do
2747  test "x$ac_site_file" = xNONE && continue
2748  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2749    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2750$as_echo "$as_me: loading site script $ac_site_file" >&6;}
2751    sed 's/^/| /' "$ac_site_file" >&5
2752    . "$ac_site_file" \
2753      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2754$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2755as_fn_error $? "failed to load site script $ac_site_file
2756See \`config.log' for more details" "$LINENO" 5; }
2757  fi
2758done
2759
2760if test -r "$cache_file"; then
2761  # Some versions of bash will fail to source /dev/null (special files
2762  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
2763  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2764    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2765$as_echo "$as_me: loading cache $cache_file" >&6;}
2766    case $cache_file in
2767      [\\/]* | ?:[\\/]* ) . "$cache_file";;
2768      *)                      . "./$cache_file";;
2769    esac
2770  fi
2771else
2772  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2773$as_echo "$as_me: creating cache $cache_file" >&6;}
2774  >$cache_file
2775fi
2776
2777# Check that the precious variables saved in the cache have kept the same
2778# value.
2779ac_cache_corrupted=false
2780for ac_var in $ac_precious_vars; do
2781  eval ac_old_set=\$ac_cv_env_${ac_var}_set
2782  eval ac_new_set=\$ac_env_${ac_var}_set
2783  eval ac_old_val=\$ac_cv_env_${ac_var}_value
2784  eval ac_new_val=\$ac_env_${ac_var}_value
2785  case $ac_old_set,$ac_new_set in
2786    set,)
2787      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2788$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2789      ac_cache_corrupted=: ;;
2790    ,set)
2791      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2792$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2793      ac_cache_corrupted=: ;;
2794    ,);;
2795    *)
2796      if test "x$ac_old_val" != "x$ac_new_val"; then
2797	# differences in whitespace do not lead to failure.
2798	ac_old_val_w=`echo x $ac_old_val`
2799	ac_new_val_w=`echo x $ac_new_val`
2800	if test "$ac_old_val_w" != "$ac_new_val_w"; then
2801	  { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2802$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2803	  ac_cache_corrupted=:
2804	else
2805	  { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2806$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2807	  eval $ac_var=\$ac_old_val
2808	fi
2809	{ $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
2810$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
2811	{ $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
2812$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
2813      fi;;
2814  esac
2815  # Pass precious variables to config.status.
2816  if test "$ac_new_set" = set; then
2817    case $ac_new_val in
2818    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2819    *) ac_arg=$ac_var=$ac_new_val ;;
2820    esac
2821    case " $ac_configure_args " in
2822      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
2823      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2824    esac
2825  fi
2826done
2827if $ac_cache_corrupted; then
2828  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2829$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2830  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2831$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2832  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2833fi
2834## -------------------- ##
2835## Main body of script. ##
2836## -------------------- ##
2837
2838ac_ext=c
2839ac_cpp='$CPP $CPPFLAGS'
2840ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2841ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2842ac_compiler_gnu=$ac_cv_c_compiler_gnu
2843
2844
2845UNBOUND_VERSION_MAJOR=1
2846
2847UNBOUND_VERSION_MINOR=16
2848
2849UNBOUND_VERSION_MICRO=1
2850
2851
2852LIBUNBOUND_CURRENT=9
2853LIBUNBOUND_REVISION=17
2854LIBUNBOUND_AGE=1
2855# 1.0.0 had 0:12:0
2856# 1.0.1 had 0:13:0
2857# 1.0.2 had 0:14:0
2858# 1.1.0 had 0:15:0
2859# 1.1.1 had 0:16:0
2860# 1.2.0 had 0:17:0
2861# 1.2.1 had 0:18:0
2862# 1.3.0 had 1:0:0   # ub_cancel and -export-symbols.
2863# 1.3.1 had 1:1:0
2864# 1.3.2 had 1:2:0
2865# 1.3.3 had 1:3:0
2866# 1.3.4 had 1:4:0
2867# 1.4.0-snapshots had 1:5:0
2868# 1.4.0 had 1:5:0 (not 2:0:0)   # ub_result.why_bogus
2869# 1.4.1 had 2:1:0
2870# 1.4.2 had 2:2:0
2871# 1.4.3 had 2:3:0
2872# 1.4.4 had 2:4:0
2873# 1.4.5 had 2:5:0
2874# 1.4.6 had 2:6:0
2875# 1.4.7 had 2:7:0
2876# 1.4.8 had 2:8:0
2877# 1.4.9 had 2:9:0
2878# 1.4.10 had 2:10:0
2879# 1.4.11 had 2:11:0
2880# 1.4.12 had 2:12:0
2881# 1.4.13 had 2:13:0
2882# and 1.4.13p1 and 1.4.13.p2
2883# 1.4.14 had 2:14:0
2884# 1.4.15 had 3:0:1 # adds ub_version()
2885# 1.4.16 had 3:1:1
2886# 1.4.17 had 3:2:1
2887# 1.4.18 had 3:3:1
2888# 1.4.19 had 3:4:1
2889# 1.4.20 had 4:0:2 # adds libunbound.ttl # but shipped 3:5:1
2890# 1.4.21 had 4:1:2
2891# 1.4.22 had 4:1:2
2892# 1.5.0 had 5:3:3 # adds ub_ctx_add_ta_autr
2893# 1.5.1 had 5:3:3
2894# 1.5.2 had 5:5:3
2895# 1.5.3 had 5:6:3
2896# 1.5.4 had 5:7:3
2897# 1.5.5 had 5:8:3
2898# 1.5.6 had 5:9:3
2899# 1.5.7 had 5:10:3
2900# 1.5.8 had 6:0:4 # adds ub_ctx_set_stub
2901# 1.5.9 had 6:1:4
2902# 1.5.10 had 6:2:4
2903# 1.6.0 had 6:3:4
2904# 1.6.1 had 7:0:5 # ub_callback_t typedef renamed to ub_callback_type
2905# 1.6.2 had 7:1:5
2906# 1.6.3 had 7:2:5
2907# 1.6.4 had 7:3:5
2908# 1.6.5 had 7:4:5
2909# 1.6.6 had 7:5:5
2910# 1.6.7 had 7:6:5
2911# 1.6.8 had 7:7:5
2912# 1.7.0 had 7:8:5
2913# 1.7.1 had 7:9:5
2914# 1.7.2 had 7:10:5
2915# 1.7.3 had 7:11:5
2916# 1.8.0 had 8:0:0 # changes the event callback function signature
2917# 1.8.1 had 8:1:0
2918# 1.8.2 had 8:2:0
2919# 1.8.3 had 8:3:0
2920# 1.9.0 had 9:0:1 # add ub_ctx_set_tls
2921# 1.9.1 had 9:1:1
2922# 1.9.2 had 9:2:1
2923# 1.9.3 had 9:3:1
2924# 1.9.4 had 9:4:1
2925# 1.9.5 had 9:5:1
2926# 1.9.6 had 9:6:1
2927# 1.10.0 had 9:7:1
2928# 1.10.1 had 9:8:1
2929# 1.11.0 had 9:9:1
2930# 1.12.0 had 9:10:1
2931# 1.13.0 had 9:11:1
2932# 1.13.1 had 9:12:1
2933# 1.13.2 had 9:13:1
2934# 1.14.0 had 9:14:1
2935# 1.15.0 had 9:15:1
2936# 1.16.0 had 9:16:1
2937# 1.16.1 had 9:17:1
2938
2939#   Current  -- the number of the binary API that we're implementing
2940#   Revision -- which iteration of the implementation of the binary
2941#               API are we supplying?
2942#   Age      -- How many previous binary API versions do we also
2943#               support?
2944#
2945# If we release a new version that does not change the binary API,
2946# increment Revision.
2947#
2948# If we release a new version that changes the binary API, but does
2949# not break programs compiled against the old binary API, increment
2950# Current and Age.  Set Revision to 0, since this is the first
2951# implementation of the new API.
2952#
2953# Otherwise, we're changing the binary API and breaking backward
2954# compatibility with old binaries.  Increment Current.  Set Age to 0,
2955# since we're backward compatible with no previous APIs.  Set Revision
2956# to 0 too.
2957
2958
2959
2960
2961
2962cmdln="`echo $@ | sed -e 's/\\\\/\\\\\\\\/g' | sed -e 's/"/\\\\"/'g`"
2963
2964cat >>confdefs.h <<_ACEOF
2965#define CONFCMDLINE "$cmdln"
2966_ACEOF
2967
2968
2969CFLAGS="$CFLAGS"
2970ac_ext=c
2971ac_cpp='$CPP $CPPFLAGS'
2972ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2973ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2974ac_compiler_gnu=$ac_cv_c_compiler_gnu
2975if test -n "$ac_tool_prefix"; then
2976  # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2977set dummy ${ac_tool_prefix}gcc; ac_word=$2
2978{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2979$as_echo_n "checking for $ac_word... " >&6; }
2980if ${ac_cv_prog_CC+:} false; then :
2981  $as_echo_n "(cached) " >&6
2982else
2983  if test -n "$CC"; then
2984  ac_cv_prog_CC="$CC" # Let the user override the test.
2985else
2986as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2987for as_dir in $PATH
2988do
2989  IFS=$as_save_IFS
2990  test -z "$as_dir" && as_dir=.
2991    for ac_exec_ext in '' $ac_executable_extensions; do
2992  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2993    ac_cv_prog_CC="${ac_tool_prefix}gcc"
2994    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2995    break 2
2996  fi
2997done
2998  done
2999IFS=$as_save_IFS
3000
3001fi
3002fi
3003CC=$ac_cv_prog_CC
3004if test -n "$CC"; then
3005  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3006$as_echo "$CC" >&6; }
3007else
3008  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3009$as_echo "no" >&6; }
3010fi
3011
3012
3013fi
3014if test -z "$ac_cv_prog_CC"; then
3015  ac_ct_CC=$CC
3016  # Extract the first word of "gcc", so it can be a program name with args.
3017set dummy gcc; ac_word=$2
3018{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3019$as_echo_n "checking for $ac_word... " >&6; }
3020if ${ac_cv_prog_ac_ct_CC+:} false; then :
3021  $as_echo_n "(cached) " >&6
3022else
3023  if test -n "$ac_ct_CC"; then
3024  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3025else
3026as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3027for as_dir in $PATH
3028do
3029  IFS=$as_save_IFS
3030  test -z "$as_dir" && as_dir=.
3031    for ac_exec_ext in '' $ac_executable_extensions; do
3032  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3033    ac_cv_prog_ac_ct_CC="gcc"
3034    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3035    break 2
3036  fi
3037done
3038  done
3039IFS=$as_save_IFS
3040
3041fi
3042fi
3043ac_ct_CC=$ac_cv_prog_ac_ct_CC
3044if test -n "$ac_ct_CC"; then
3045  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3046$as_echo "$ac_ct_CC" >&6; }
3047else
3048  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3049$as_echo "no" >&6; }
3050fi
3051
3052  if test "x$ac_ct_CC" = x; then
3053    CC=""
3054  else
3055    case $cross_compiling:$ac_tool_warned in
3056yes:)
3057{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3058$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3059ac_tool_warned=yes ;;
3060esac
3061    CC=$ac_ct_CC
3062  fi
3063else
3064  CC="$ac_cv_prog_CC"
3065fi
3066
3067if test -z "$CC"; then
3068          if test -n "$ac_tool_prefix"; then
3069    # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
3070set dummy ${ac_tool_prefix}cc; ac_word=$2
3071{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3072$as_echo_n "checking for $ac_word... " >&6; }
3073if ${ac_cv_prog_CC+:} false; then :
3074  $as_echo_n "(cached) " >&6
3075else
3076  if test -n "$CC"; then
3077  ac_cv_prog_CC="$CC" # Let the user override the test.
3078else
3079as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3080for as_dir in $PATH
3081do
3082  IFS=$as_save_IFS
3083  test -z "$as_dir" && as_dir=.
3084    for ac_exec_ext in '' $ac_executable_extensions; do
3085  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3086    ac_cv_prog_CC="${ac_tool_prefix}cc"
3087    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3088    break 2
3089  fi
3090done
3091  done
3092IFS=$as_save_IFS
3093
3094fi
3095fi
3096CC=$ac_cv_prog_CC
3097if test -n "$CC"; then
3098  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3099$as_echo "$CC" >&6; }
3100else
3101  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3102$as_echo "no" >&6; }
3103fi
3104
3105
3106  fi
3107fi
3108if test -z "$CC"; then
3109  # Extract the first word of "cc", so it can be a program name with args.
3110set dummy cc; ac_word=$2
3111{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3112$as_echo_n "checking for $ac_word... " >&6; }
3113if ${ac_cv_prog_CC+:} false; then :
3114  $as_echo_n "(cached) " >&6
3115else
3116  if test -n "$CC"; then
3117  ac_cv_prog_CC="$CC" # Let the user override the test.
3118else
3119  ac_prog_rejected=no
3120as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3121for as_dir in $PATH
3122do
3123  IFS=$as_save_IFS
3124  test -z "$as_dir" && as_dir=.
3125    for ac_exec_ext in '' $ac_executable_extensions; do
3126  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3127    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3128       ac_prog_rejected=yes
3129       continue
3130     fi
3131    ac_cv_prog_CC="cc"
3132    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3133    break 2
3134  fi
3135done
3136  done
3137IFS=$as_save_IFS
3138
3139if test $ac_prog_rejected = yes; then
3140  # We found a bogon in the path, so make sure we never use it.
3141  set dummy $ac_cv_prog_CC
3142  shift
3143  if test $# != 0; then
3144    # We chose a different compiler from the bogus one.
3145    # However, it has the same basename, so the bogon will be chosen
3146    # first if we set CC to just the basename; use the full file name.
3147    shift
3148    ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
3149  fi
3150fi
3151fi
3152fi
3153CC=$ac_cv_prog_CC
3154if test -n "$CC"; then
3155  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3156$as_echo "$CC" >&6; }
3157else
3158  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3159$as_echo "no" >&6; }
3160fi
3161
3162
3163fi
3164if test -z "$CC"; then
3165  if test -n "$ac_tool_prefix"; then
3166  for ac_prog in cl.exe
3167  do
3168    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3169set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3170{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3171$as_echo_n "checking for $ac_word... " >&6; }
3172if ${ac_cv_prog_CC+:} false; then :
3173  $as_echo_n "(cached) " >&6
3174else
3175  if test -n "$CC"; then
3176  ac_cv_prog_CC="$CC" # Let the user override the test.
3177else
3178as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3179for as_dir in $PATH
3180do
3181  IFS=$as_save_IFS
3182  test -z "$as_dir" && as_dir=.
3183    for ac_exec_ext in '' $ac_executable_extensions; do
3184  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3185    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
3186    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3187    break 2
3188  fi
3189done
3190  done
3191IFS=$as_save_IFS
3192
3193fi
3194fi
3195CC=$ac_cv_prog_CC
3196if test -n "$CC"; then
3197  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3198$as_echo "$CC" >&6; }
3199else
3200  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3201$as_echo "no" >&6; }
3202fi
3203
3204
3205    test -n "$CC" && break
3206  done
3207fi
3208if test -z "$CC"; then
3209  ac_ct_CC=$CC
3210  for ac_prog in cl.exe
3211do
3212  # Extract the first word of "$ac_prog", so it can be a program name with args.
3213set dummy $ac_prog; ac_word=$2
3214{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3215$as_echo_n "checking for $ac_word... " >&6; }
3216if ${ac_cv_prog_ac_ct_CC+:} false; then :
3217  $as_echo_n "(cached) " >&6
3218else
3219  if test -n "$ac_ct_CC"; then
3220  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3221else
3222as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3223for as_dir in $PATH
3224do
3225  IFS=$as_save_IFS
3226  test -z "$as_dir" && as_dir=.
3227    for ac_exec_ext in '' $ac_executable_extensions; do
3228  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3229    ac_cv_prog_ac_ct_CC="$ac_prog"
3230    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3231    break 2
3232  fi
3233done
3234  done
3235IFS=$as_save_IFS
3236
3237fi
3238fi
3239ac_ct_CC=$ac_cv_prog_ac_ct_CC
3240if test -n "$ac_ct_CC"; then
3241  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3242$as_echo "$ac_ct_CC" >&6; }
3243else
3244  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3245$as_echo "no" >&6; }
3246fi
3247
3248
3249  test -n "$ac_ct_CC" && break
3250done
3251
3252  if test "x$ac_ct_CC" = x; then
3253    CC=""
3254  else
3255    case $cross_compiling:$ac_tool_warned in
3256yes:)
3257{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3258$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3259ac_tool_warned=yes ;;
3260esac
3261    CC=$ac_ct_CC
3262  fi
3263fi
3264
3265fi
3266
3267
3268test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3269$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3270as_fn_error $? "no acceptable C compiler found in \$PATH
3271See \`config.log' for more details" "$LINENO" 5; }
3272
3273# Provide some information about the compiler.
3274$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3275set X $ac_compile
3276ac_compiler=$2
3277for ac_option in --version -v -V -qversion; do
3278  { { ac_try="$ac_compiler $ac_option >&5"
3279case "(($ac_try" in
3280  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3281  *) ac_try_echo=$ac_try;;
3282esac
3283eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3284$as_echo "$ac_try_echo"; } >&5
3285  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
3286  ac_status=$?
3287  if test -s conftest.err; then
3288    sed '10a\
3289... rest of stderr output deleted ...
3290         10q' conftest.err >conftest.er1
3291    cat conftest.er1 >&5
3292  fi
3293  rm -f conftest.er1 conftest.err
3294  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3295  test $ac_status = 0; }
3296done
3297
3298cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3299/* end confdefs.h.  */
3300
3301int
3302main ()
3303{
3304
3305  ;
3306  return 0;
3307}
3308_ACEOF
3309ac_clean_files_save=$ac_clean_files
3310ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
3311# Try to create an executable without -o first, disregard a.out.
3312# It will help us diagnose broken compilers, and finding out an intuition
3313# of exeext.
3314{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3315$as_echo_n "checking whether the C compiler works... " >&6; }
3316ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3317
3318# The possible output files:
3319ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3320
3321ac_rmfiles=
3322for ac_file in $ac_files
3323do
3324  case $ac_file in
3325    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3326    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3327  esac
3328done
3329rm -f $ac_rmfiles
3330
3331if { { ac_try="$ac_link_default"
3332case "(($ac_try" in
3333  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3334  *) ac_try_echo=$ac_try;;
3335esac
3336eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3337$as_echo "$ac_try_echo"; } >&5
3338  (eval "$ac_link_default") 2>&5
3339  ac_status=$?
3340  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3341  test $ac_status = 0; }; then :
3342  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3343# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3344# in a Makefile.  We should not override ac_cv_exeext if it was cached,
3345# so that the user can short-circuit this test for compilers unknown to
3346# Autoconf.
3347for ac_file in $ac_files ''
3348do
3349  test -f "$ac_file" || continue
3350  case $ac_file in
3351    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
3352	;;
3353    [ab].out )
3354	# We found the default executable, but exeext='' is most
3355	# certainly right.
3356	break;;
3357    *.* )
3358	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
3359	then :; else
3360	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3361	fi
3362	# We set ac_cv_exeext here because the later test for it is not
3363	# safe: cross compilers may not add the suffix if given an `-o'
3364	# argument, so we may need to know it at that point already.
3365	# Even if this section looks crufty: it has the advantage of
3366	# actually working.
3367	break;;
3368    * )
3369	break;;
3370  esac
3371done
3372test "$ac_cv_exeext" = no && ac_cv_exeext=
3373
3374else
3375  ac_file=''
3376fi
3377if test -z "$ac_file"; then :
3378  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3379$as_echo "no" >&6; }
3380$as_echo "$as_me: failed program was:" >&5
3381sed 's/^/| /' conftest.$ac_ext >&5
3382
3383{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3384$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3385as_fn_error 77 "C compiler cannot create executables
3386See \`config.log' for more details" "$LINENO" 5; }
3387else
3388  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3389$as_echo "yes" >&6; }
3390fi
3391{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3392$as_echo_n "checking for C compiler default output file name... " >&6; }
3393{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3394$as_echo "$ac_file" >&6; }
3395ac_exeext=$ac_cv_exeext
3396
3397rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
3398ac_clean_files=$ac_clean_files_save
3399{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3400$as_echo_n "checking for suffix of executables... " >&6; }
3401if { { ac_try="$ac_link"
3402case "(($ac_try" in
3403  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3404  *) ac_try_echo=$ac_try;;
3405esac
3406eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3407$as_echo "$ac_try_echo"; } >&5
3408  (eval "$ac_link") 2>&5
3409  ac_status=$?
3410  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3411  test $ac_status = 0; }; then :
3412  # If both `conftest.exe' and `conftest' are `present' (well, observable)
3413# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
3414# work properly (i.e., refer to `conftest.exe'), while it won't with
3415# `rm'.
3416for ac_file in conftest.exe conftest conftest.*; do
3417  test -f "$ac_file" || continue
3418  case $ac_file in
3419    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3420    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3421	  break;;
3422    * ) break;;
3423  esac
3424done
3425else
3426  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3427$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3428as_fn_error $? "cannot compute suffix of executables: cannot compile and link
3429See \`config.log' for more details" "$LINENO" 5; }
3430fi
3431rm -f conftest conftest$ac_cv_exeext
3432{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3433$as_echo "$ac_cv_exeext" >&6; }
3434
3435rm -f conftest.$ac_ext
3436EXEEXT=$ac_cv_exeext
3437ac_exeext=$EXEEXT
3438cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3439/* end confdefs.h.  */
3440#include <stdio.h>
3441int
3442main ()
3443{
3444FILE *f = fopen ("conftest.out", "w");
3445 return ferror (f) || fclose (f) != 0;
3446
3447  ;
3448  return 0;
3449}
3450_ACEOF
3451ac_clean_files="$ac_clean_files conftest.out"
3452# Check that the compiler produces executables we can run.  If not, either
3453# the compiler is broken, or we cross compile.
3454{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3455$as_echo_n "checking whether we are cross compiling... " >&6; }
3456if test "$cross_compiling" != yes; then
3457  { { ac_try="$ac_link"
3458case "(($ac_try" in
3459  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3460  *) ac_try_echo=$ac_try;;
3461esac
3462eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3463$as_echo "$ac_try_echo"; } >&5
3464  (eval "$ac_link") 2>&5
3465  ac_status=$?
3466  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3467  test $ac_status = 0; }
3468  if { ac_try='./conftest$ac_cv_exeext'
3469  { { case "(($ac_try" in
3470  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3471  *) ac_try_echo=$ac_try;;
3472esac
3473eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3474$as_echo "$ac_try_echo"; } >&5
3475  (eval "$ac_try") 2>&5
3476  ac_status=$?
3477  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3478  test $ac_status = 0; }; }; then
3479    cross_compiling=no
3480  else
3481    if test "$cross_compiling" = maybe; then
3482	cross_compiling=yes
3483    else
3484	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3485$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3486as_fn_error $? "cannot run C compiled programs.
3487If you meant to cross compile, use \`--host'.
3488See \`config.log' for more details" "$LINENO" 5; }
3489    fi
3490  fi
3491fi
3492{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3493$as_echo "$cross_compiling" >&6; }
3494
3495rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
3496ac_clean_files=$ac_clean_files_save
3497{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3498$as_echo_n "checking for suffix of object files... " >&6; }
3499if ${ac_cv_objext+:} false; then :
3500  $as_echo_n "(cached) " >&6
3501else
3502  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3503/* end confdefs.h.  */
3504
3505int
3506main ()
3507{
3508
3509  ;
3510  return 0;
3511}
3512_ACEOF
3513rm -f conftest.o conftest.obj
3514if { { ac_try="$ac_compile"
3515case "(($ac_try" in
3516  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3517  *) ac_try_echo=$ac_try;;
3518esac
3519eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3520$as_echo "$ac_try_echo"; } >&5
3521  (eval "$ac_compile") 2>&5
3522  ac_status=$?
3523  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3524  test $ac_status = 0; }; then :
3525  for ac_file in conftest.o conftest.obj conftest.*; do
3526  test -f "$ac_file" || continue;
3527  case $ac_file in
3528    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
3529    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3530       break;;
3531  esac
3532done
3533else
3534  $as_echo "$as_me: failed program was:" >&5
3535sed 's/^/| /' conftest.$ac_ext >&5
3536
3537{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3538$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3539as_fn_error $? "cannot compute suffix of object files: cannot compile
3540See \`config.log' for more details" "$LINENO" 5; }
3541fi
3542rm -f conftest.$ac_cv_objext conftest.$ac_ext
3543fi
3544{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3545$as_echo "$ac_cv_objext" >&6; }
3546OBJEXT=$ac_cv_objext
3547ac_objext=$OBJEXT
3548{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
3549$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
3550if ${ac_cv_c_compiler_gnu+:} false; then :
3551  $as_echo_n "(cached) " >&6
3552else
3553  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3554/* end confdefs.h.  */
3555
3556int
3557main ()
3558{
3559#ifndef __GNUC__
3560       choke me
3561#endif
3562
3563  ;
3564  return 0;
3565}
3566_ACEOF
3567if ac_fn_c_try_compile "$LINENO"; then :
3568  ac_compiler_gnu=yes
3569else
3570  ac_compiler_gnu=no
3571fi
3572rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3573ac_cv_c_compiler_gnu=$ac_compiler_gnu
3574
3575fi
3576{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
3577$as_echo "$ac_cv_c_compiler_gnu" >&6; }
3578if test $ac_compiler_gnu = yes; then
3579  GCC=yes
3580else
3581  GCC=
3582fi
3583ac_test_CFLAGS=${CFLAGS+set}
3584ac_save_CFLAGS=$CFLAGS
3585{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
3586$as_echo_n "checking whether $CC accepts -g... " >&6; }
3587if ${ac_cv_prog_cc_g+:} false; then :
3588  $as_echo_n "(cached) " >&6
3589else
3590  ac_save_c_werror_flag=$ac_c_werror_flag
3591   ac_c_werror_flag=yes
3592   ac_cv_prog_cc_g=no
3593   CFLAGS="-g"
3594   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3595/* end confdefs.h.  */
3596
3597int
3598main ()
3599{
3600
3601  ;
3602  return 0;
3603}
3604_ACEOF
3605if ac_fn_c_try_compile "$LINENO"; then :
3606  ac_cv_prog_cc_g=yes
3607else
3608  CFLAGS=""
3609      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3610/* end confdefs.h.  */
3611
3612int
3613main ()
3614{
3615
3616  ;
3617  return 0;
3618}
3619_ACEOF
3620if ac_fn_c_try_compile "$LINENO"; then :
3621
3622else
3623  ac_c_werror_flag=$ac_save_c_werror_flag
3624	 CFLAGS="-g"
3625	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3626/* end confdefs.h.  */
3627
3628int
3629main ()
3630{
3631
3632  ;
3633  return 0;
3634}
3635_ACEOF
3636if ac_fn_c_try_compile "$LINENO"; then :
3637  ac_cv_prog_cc_g=yes
3638fi
3639rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3640fi
3641rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3642fi
3643rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3644   ac_c_werror_flag=$ac_save_c_werror_flag
3645fi
3646{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
3647$as_echo "$ac_cv_prog_cc_g" >&6; }
3648if test "$ac_test_CFLAGS" = set; then
3649  CFLAGS=$ac_save_CFLAGS
3650elif test $ac_cv_prog_cc_g = yes; then
3651  if test "$GCC" = yes; then
3652    CFLAGS="-g -O2"
3653  else
3654    CFLAGS="-g"
3655  fi
3656else
3657  if test "$GCC" = yes; then
3658    CFLAGS="-O2"
3659  else
3660    CFLAGS=
3661  fi
3662fi
3663{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
3664$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
3665if ${ac_cv_prog_cc_c89+:} false; then :
3666  $as_echo_n "(cached) " >&6
3667else
3668  ac_cv_prog_cc_c89=no
3669ac_save_CC=$CC
3670cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3671/* end confdefs.h.  */
3672#include <stdarg.h>
3673#include <stdio.h>
3674struct stat;
3675/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
3676struct buf { int x; };
3677FILE * (*rcsopen) (struct buf *, struct stat *, int);
3678static char *e (p, i)
3679     char **p;
3680     int i;
3681{
3682  return p[i];
3683}
3684static char *f (char * (*g) (char **, int), char **p, ...)
3685{
3686  char *s;
3687  va_list v;
3688  va_start (v,p);
3689  s = g (p, va_arg (v,int));
3690  va_end (v);
3691  return s;
3692}
3693
3694/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
3695   function prototypes and stuff, but not '\xHH' hex character constants.
3696   These don't provoke an error unfortunately, instead are silently treated
3697   as 'x'.  The following induces an error, until -std is added to get
3698   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
3699   array size at least.  It's necessary to write '\x00'==0 to get something
3700   that's true only with -std.  */
3701int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3702
3703/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3704   inside strings and character constants.  */
3705#define FOO(x) 'x'
3706int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3707
3708int test (int i, double x);
3709struct s1 {int (*f) (int a);};
3710struct s2 {int (*f) (double a);};
3711int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3712int argc;
3713char **argv;
3714int
3715main ()
3716{
3717return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
3718  ;
3719  return 0;
3720}
3721_ACEOF
3722for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3723	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
3724do
3725  CC="$ac_save_CC $ac_arg"
3726  if ac_fn_c_try_compile "$LINENO"; then :
3727  ac_cv_prog_cc_c89=$ac_arg
3728fi
3729rm -f core conftest.err conftest.$ac_objext
3730  test "x$ac_cv_prog_cc_c89" != "xno" && break
3731done
3732rm -f conftest.$ac_ext
3733CC=$ac_save_CC
3734
3735fi
3736# AC_CACHE_VAL
3737case "x$ac_cv_prog_cc_c89" in
3738  x)
3739    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
3740$as_echo "none needed" >&6; } ;;
3741  xno)
3742    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
3743$as_echo "unsupported" >&6; } ;;
3744  *)
3745    CC="$CC $ac_cv_prog_cc_c89"
3746    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
3747$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
3748esac
3749if test "x$ac_cv_prog_cc_c89" != xno; then :
3750
3751fi
3752
3753ac_ext=c
3754ac_cpp='$CPP $CPPFLAGS'
3755ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3756ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3757ac_compiler_gnu=$ac_cv_c_compiler_gnu
3758
3759
3760ac_ext=c
3761ac_cpp='$CPP $CPPFLAGS'
3762ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3763ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3764ac_compiler_gnu=$ac_cv_c_compiler_gnu
3765{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
3766$as_echo_n "checking how to run the C preprocessor... " >&6; }
3767# On Suns, sometimes $CPP names a directory.
3768if test -n "$CPP" && test -d "$CPP"; then
3769  CPP=
3770fi
3771if test -z "$CPP"; then
3772  if ${ac_cv_prog_CPP+:} false; then :
3773  $as_echo_n "(cached) " >&6
3774else
3775      # Double quotes because CPP needs to be expanded
3776    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3777    do
3778      ac_preproc_ok=false
3779for ac_c_preproc_warn_flag in '' yes
3780do
3781  # Use a header file that comes with gcc, so configuring glibc
3782  # with a fresh cross-compiler works.
3783  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3784  # <limits.h> exists even on freestanding compilers.
3785  # On the NeXT, cc -E runs the code through the compiler's parser,
3786  # not just through cpp. "Syntax error" is here to catch this case.
3787  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3788/* end confdefs.h.  */
3789#ifdef __STDC__
3790# include <limits.h>
3791#else
3792# include <assert.h>
3793#endif
3794		     Syntax error
3795_ACEOF
3796if ac_fn_c_try_cpp "$LINENO"; then :
3797
3798else
3799  # Broken: fails on valid input.
3800continue
3801fi
3802rm -f conftest.err conftest.i conftest.$ac_ext
3803
3804  # OK, works on sane cases.  Now check whether nonexistent headers
3805  # can be detected and how.
3806  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3807/* end confdefs.h.  */
3808#include <ac_nonexistent.h>
3809_ACEOF
3810if ac_fn_c_try_cpp "$LINENO"; then :
3811  # Broken: success on invalid input.
3812continue
3813else
3814  # Passes both tests.
3815ac_preproc_ok=:
3816break
3817fi
3818rm -f conftest.err conftest.i conftest.$ac_ext
3819
3820done
3821# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3822rm -f conftest.i conftest.err conftest.$ac_ext
3823if $ac_preproc_ok; then :
3824  break
3825fi
3826
3827    done
3828    ac_cv_prog_CPP=$CPP
3829
3830fi
3831  CPP=$ac_cv_prog_CPP
3832else
3833  ac_cv_prog_CPP=$CPP
3834fi
3835{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
3836$as_echo "$CPP" >&6; }
3837ac_preproc_ok=false
3838for ac_c_preproc_warn_flag in '' yes
3839do
3840  # Use a header file that comes with gcc, so configuring glibc
3841  # with a fresh cross-compiler works.
3842  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3843  # <limits.h> exists even on freestanding compilers.
3844  # On the NeXT, cc -E runs the code through the compiler's parser,
3845  # not just through cpp. "Syntax error" is here to catch this case.
3846  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3847/* end confdefs.h.  */
3848#ifdef __STDC__
3849# include <limits.h>
3850#else
3851# include <assert.h>
3852#endif
3853		     Syntax error
3854_ACEOF
3855if ac_fn_c_try_cpp "$LINENO"; then :
3856
3857else
3858  # Broken: fails on valid input.
3859continue
3860fi
3861rm -f conftest.err conftest.i conftest.$ac_ext
3862
3863  # OK, works on sane cases.  Now check whether nonexistent headers
3864  # can be detected and how.
3865  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3866/* end confdefs.h.  */
3867#include <ac_nonexistent.h>
3868_ACEOF
3869if ac_fn_c_try_cpp "$LINENO"; then :
3870  # Broken: success on invalid input.
3871continue
3872else
3873  # Passes both tests.
3874ac_preproc_ok=:
3875break
3876fi
3877rm -f conftest.err conftest.i conftest.$ac_ext
3878
3879done
3880# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3881rm -f conftest.i conftest.err conftest.$ac_ext
3882if $ac_preproc_ok; then :
3883
3884else
3885  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3886$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3887as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
3888See \`config.log' for more details" "$LINENO" 5; }
3889fi
3890
3891ac_ext=c
3892ac_cpp='$CPP $CPPFLAGS'
3893ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3894ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3895ac_compiler_gnu=$ac_cv_c_compiler_gnu
3896
3897
3898{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
3899$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
3900if ${ac_cv_path_GREP+:} false; then :
3901  $as_echo_n "(cached) " >&6
3902else
3903  if test -z "$GREP"; then
3904  ac_path_GREP_found=false
3905  # Loop through the user's path and test for each of PROGNAME-LIST
3906  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3907for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3908do
3909  IFS=$as_save_IFS
3910  test -z "$as_dir" && as_dir=.
3911    for ac_prog in grep ggrep; do
3912    for ac_exec_ext in '' $ac_executable_extensions; do
3913      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
3914      as_fn_executable_p "$ac_path_GREP" || continue
3915# Check for GNU ac_path_GREP and select it if it is found.
3916  # Check for GNU $ac_path_GREP
3917case `"$ac_path_GREP" --version 2>&1` in
3918*GNU*)
3919  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
3920*)
3921  ac_count=0
3922  $as_echo_n 0123456789 >"conftest.in"
3923  while :
3924  do
3925    cat "conftest.in" "conftest.in" >"conftest.tmp"
3926    mv "conftest.tmp" "conftest.in"
3927    cp "conftest.in" "conftest.nl"
3928    $as_echo 'GREP' >> "conftest.nl"
3929    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3930    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3931    as_fn_arith $ac_count + 1 && ac_count=$as_val
3932    if test $ac_count -gt ${ac_path_GREP_max-0}; then
3933      # Best one so far, save it but keep looking for a better one
3934      ac_cv_path_GREP="$ac_path_GREP"
3935      ac_path_GREP_max=$ac_count
3936    fi
3937    # 10*(2^10) chars as input seems more than enough
3938    test $ac_count -gt 10 && break
3939  done
3940  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3941esac
3942
3943      $ac_path_GREP_found && break 3
3944    done
3945  done
3946  done
3947IFS=$as_save_IFS
3948  if test -z "$ac_cv_path_GREP"; then
3949    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
3950  fi
3951else
3952  ac_cv_path_GREP=$GREP
3953fi
3954
3955fi
3956{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
3957$as_echo "$ac_cv_path_GREP" >&6; }
3958 GREP="$ac_cv_path_GREP"
3959
3960
3961{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
3962$as_echo_n "checking for egrep... " >&6; }
3963if ${ac_cv_path_EGREP+:} false; then :
3964  $as_echo_n "(cached) " >&6
3965else
3966  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
3967   then ac_cv_path_EGREP="$GREP -E"
3968   else
3969     if test -z "$EGREP"; then
3970  ac_path_EGREP_found=false
3971  # Loop through the user's path and test for each of PROGNAME-LIST
3972  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3973for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3974do
3975  IFS=$as_save_IFS
3976  test -z "$as_dir" && as_dir=.
3977    for ac_prog in egrep; do
3978    for ac_exec_ext in '' $ac_executable_extensions; do
3979      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
3980      as_fn_executable_p "$ac_path_EGREP" || continue
3981# Check for GNU ac_path_EGREP and select it if it is found.
3982  # Check for GNU $ac_path_EGREP
3983case `"$ac_path_EGREP" --version 2>&1` in
3984*GNU*)
3985  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
3986*)
3987  ac_count=0
3988  $as_echo_n 0123456789 >"conftest.in"
3989  while :
3990  do
3991    cat "conftest.in" "conftest.in" >"conftest.tmp"
3992    mv "conftest.tmp" "conftest.in"
3993    cp "conftest.in" "conftest.nl"
3994    $as_echo 'EGREP' >> "conftest.nl"
3995    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3996    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3997    as_fn_arith $ac_count + 1 && ac_count=$as_val
3998    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
3999      # Best one so far, save it but keep looking for a better one
4000      ac_cv_path_EGREP="$ac_path_EGREP"
4001      ac_path_EGREP_max=$ac_count
4002    fi
4003    # 10*(2^10) chars as input seems more than enough
4004    test $ac_count -gt 10 && break
4005  done
4006  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4007esac
4008
4009      $ac_path_EGREP_found && break 3
4010    done
4011  done
4012  done
4013IFS=$as_save_IFS
4014  if test -z "$ac_cv_path_EGREP"; then
4015    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4016  fi
4017else
4018  ac_cv_path_EGREP=$EGREP
4019fi
4020
4021   fi
4022fi
4023{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
4024$as_echo "$ac_cv_path_EGREP" >&6; }
4025 EGREP="$ac_cv_path_EGREP"
4026
4027
4028{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
4029$as_echo_n "checking for ANSI C header files... " >&6; }
4030if ${ac_cv_header_stdc+:} false; then :
4031  $as_echo_n "(cached) " >&6
4032else
4033  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4034/* end confdefs.h.  */
4035#include <stdlib.h>
4036#include <stdarg.h>
4037#include <string.h>
4038#include <float.h>
4039
4040int
4041main ()
4042{
4043
4044  ;
4045  return 0;
4046}
4047_ACEOF
4048if ac_fn_c_try_compile "$LINENO"; then :
4049  ac_cv_header_stdc=yes
4050else
4051  ac_cv_header_stdc=no
4052fi
4053rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4054
4055if test $ac_cv_header_stdc = yes; then
4056  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4057  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4058/* end confdefs.h.  */
4059#include <string.h>
4060
4061_ACEOF
4062if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4063  $EGREP "memchr" >/dev/null 2>&1; then :
4064
4065else
4066  ac_cv_header_stdc=no
4067fi
4068rm -f conftest*
4069
4070fi
4071
4072if test $ac_cv_header_stdc = yes; then
4073  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4074  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4075/* end confdefs.h.  */
4076#include <stdlib.h>
4077
4078_ACEOF
4079if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4080  $EGREP "free" >/dev/null 2>&1; then :
4081
4082else
4083  ac_cv_header_stdc=no
4084fi
4085rm -f conftest*
4086
4087fi
4088
4089if test $ac_cv_header_stdc = yes; then
4090  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4091  if test "$cross_compiling" = yes; then :
4092  :
4093else
4094  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4095/* end confdefs.h.  */
4096#include <ctype.h>
4097#include <stdlib.h>
4098#if ((' ' & 0x0FF) == 0x020)
4099# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4100# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4101#else
4102# define ISLOWER(c) \
4103		   (('a' <= (c) && (c) <= 'i') \
4104		     || ('j' <= (c) && (c) <= 'r') \
4105		     || ('s' <= (c) && (c) <= 'z'))
4106# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4107#endif
4108
4109#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4110int
4111main ()
4112{
4113  int i;
4114  for (i = 0; i < 256; i++)
4115    if (XOR (islower (i), ISLOWER (i))
4116	|| toupper (i) != TOUPPER (i))
4117      return 2;
4118  return 0;
4119}
4120_ACEOF
4121if ac_fn_c_try_run "$LINENO"; then :
4122
4123else
4124  ac_cv_header_stdc=no
4125fi
4126rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4127  conftest.$ac_objext conftest.beam conftest.$ac_ext
4128fi
4129
4130fi
4131fi
4132{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
4133$as_echo "$ac_cv_header_stdc" >&6; }
4134if test $ac_cv_header_stdc = yes; then
4135
4136$as_echo "#define STDC_HEADERS 1" >>confdefs.h
4137
4138fi
4139
4140# On IRIX 5.3, sys/types and inttypes.h are conflicting.
4141for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4142		  inttypes.h stdint.h unistd.h
4143do :
4144  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4145ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
4146"
4147if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
4148  cat >>confdefs.h <<_ACEOF
4149#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
4150_ACEOF
4151
4152fi
4153
4154done
4155
4156
4157
4158  ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
4159if test "x$ac_cv_header_minix_config_h" = xyes; then :
4160  MINIX=yes
4161else
4162  MINIX=
4163fi
4164
4165
4166  if test "$MINIX" = yes; then
4167
4168$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
4169
4170
4171$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
4172
4173
4174$as_echo "#define _MINIX 1" >>confdefs.h
4175
4176  fi
4177
4178
4179  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
4180$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
4181if ${ac_cv_safe_to_define___extensions__+:} false; then :
4182  $as_echo_n "(cached) " >&6
4183else
4184  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4185/* end confdefs.h.  */
4186
4187#         define __EXTENSIONS__ 1
4188          $ac_includes_default
4189int
4190main ()
4191{
4192
4193  ;
4194  return 0;
4195}
4196_ACEOF
4197if ac_fn_c_try_compile "$LINENO"; then :
4198  ac_cv_safe_to_define___extensions__=yes
4199else
4200  ac_cv_safe_to_define___extensions__=no
4201fi
4202rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4203fi
4204{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
4205$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
4206  test $ac_cv_safe_to_define___extensions__ = yes &&
4207    $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
4208
4209  $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
4210
4211  $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
4212
4213  $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
4214
4215  $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
4216
4217
4218if test "$ac_cv_header_minix_config_h" = "yes"; then
4219
4220$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
4221
4222fi
4223
4224case "$prefix" in
4225        NONE)
4226		prefix="/usr/local"
4227        ;;
4228esac
4229case "$exec_prefix" in
4230        NONE)
4231		exec_prefix="$prefix"
4232        ;;
4233esac
4234
4235# are we on MinGW?
4236if uname -s 2>&1 | grep MINGW >/dev/null; then on_mingw="yes"
4237else
4238	if echo $host | grep mingw >/dev/null; then on_mingw="yes"
4239	else on_mingw="no"; fi
4240fi
4241
4242#
4243# Determine configuration file
4244# the eval is to evaluate shell expansion twice
4245UNBOUND_SBIN_DIR=`eval echo "${sbindir}"`
4246
4247UNBOUND_SYSCONF_DIR=`eval echo "${sysconfdir}"`
4248
4249UNBOUND_LOCALSTATE_DIR=`eval echo "${localstatedir}"`
4250
4251if test $on_mingw = "no"; then
4252  ub_conf_file=`eval echo "${sysconfdir}/unbound/unbound.conf"`
4253else
4254  ub_conf_file="C:\\Program Files\\Unbound\\service.conf"
4255fi
4256
4257# Check whether --with-conf_file was given.
4258if test "${with_conf_file+set}" = set; then :
4259  withval=$with_conf_file; ub_conf_file="$withval"
4260fi
4261
4262
4263hdr_config="`echo $ub_conf_file | sed -e 's/\\\\/\\\\\\\\/g'`"
4264
4265
4266cat >>confdefs.h <<_ACEOF
4267#define CONFIGFILE "$hdr_config"
4268_ACEOF
4269
4270ub_conf_dir=`$as_dirname -- "$ub_conf_file" ||
4271$as_expr X"$ub_conf_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
4272	 X"$ub_conf_file" : 'X\(//\)[^/]' \| \
4273	 X"$ub_conf_file" : 'X\(//\)$' \| \
4274	 X"$ub_conf_file" : 'X\(/\)' \| . 2>/dev/null ||
4275$as_echo X"$ub_conf_file" |
4276    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
4277	    s//\1/
4278	    q
4279	  }
4280	  /^X\(\/\/\)[^/].*/{
4281	    s//\1/
4282	    q
4283	  }
4284	  /^X\(\/\/\)$/{
4285	    s//\1/
4286	    q
4287	  }
4288	  /^X\(\/\).*/{
4289	    s//\1/
4290	    q
4291	  }
4292	  s/.*/./; q'`
4293
4294
4295# Determine run, chroot directory and pidfile locations
4296
4297# Check whether --with-run-dir was given.
4298if test "${with_run_dir+set}" = set; then :
4299  withval=$with_run_dir; UNBOUND_RUN_DIR="$withval"
4300else
4301  if test $on_mingw = no; then
4302    UNBOUND_RUN_DIR=`dirname "$ub_conf_file"`
4303else
4304    UNBOUND_RUN_DIR=""
4305fi
4306
4307fi
4308
4309
4310hdr_run="`echo $UNBOUND_RUN_DIR | sed -e 's/\\\\/\\\\\\\\/g'`"
4311
4312
4313cat >>confdefs.h <<_ACEOF
4314#define RUN_DIR "$hdr_run"
4315_ACEOF
4316
4317
4318
4319# Check whether --with-chroot-dir was given.
4320if test "${with_chroot_dir+set}" = set; then :
4321  withval=$with_chroot_dir; UNBOUND_CHROOT_DIR="$withval"
4322else
4323  if test $on_mingw = no; then
4324    UNBOUND_CHROOT_DIR="$UNBOUND_RUN_DIR"
4325else
4326    UNBOUND_CHROOT_DIR=""
4327fi
4328
4329fi
4330
4331
4332hdr_chroot="`echo $UNBOUND_CHROOT_DIR | sed -e 's/\\\\/\\\\\\\\/g'`"
4333
4334
4335cat >>confdefs.h <<_ACEOF
4336#define CHROOT_DIR "$hdr_chroot"
4337_ACEOF
4338
4339
4340
4341# Check whether --with-share-dir was given.
4342if test "${with_share_dir+set}" = set; then :
4343  withval=$with_share_dir; UNBOUND_SHARE_DIR="$withval"
4344else
4345  UNBOUND_SHARE_DIR="$UNBOUND_RUN_DIR"
4346fi
4347
4348
4349
4350cat >>confdefs.h <<_ACEOF
4351#define SHARE_DIR "$UNBOUND_SHARE_DIR"
4352_ACEOF
4353
4354
4355
4356# Check whether --with-pidfile was given.
4357if test "${with_pidfile+set}" = set; then :
4358  withval=$with_pidfile; UNBOUND_PIDFILE="$withval"
4359else
4360  if test $on_mingw = no; then
4361    UNBOUND_PIDFILE="$UNBOUND_RUN_DIR/unbound.pid"
4362else
4363    UNBOUND_PIDFILE=""
4364fi
4365
4366fi
4367
4368
4369hdr_pid="`echo $UNBOUND_PIDFILE | sed -e 's/\\\\/\\\\\\\\/g'`"
4370
4371
4372cat >>confdefs.h <<_ACEOF
4373#define PIDFILE "$hdr_pid"
4374_ACEOF
4375
4376
4377
4378# Check whether --with-rootkey-file was given.
4379if test "${with_rootkey_file+set}" = set; then :
4380  withval=$with_rootkey_file; UNBOUND_ROOTKEY_FILE="$withval"
4381else
4382  if test $on_mingw = no; then
4383    UNBOUND_ROOTKEY_FILE="$UNBOUND_RUN_DIR/root.key"
4384else
4385    UNBOUND_ROOTKEY_FILE="C:\\Program Files\\Unbound\\root.key"
4386fi
4387
4388fi
4389
4390
4391hdr_rkey="`echo $UNBOUND_ROOTKEY_FILE | sed -e 's/\\\\/\\\\\\\\/g'`"
4392
4393
4394cat >>confdefs.h <<_ACEOF
4395#define ROOT_ANCHOR_FILE "$hdr_rkey"
4396_ACEOF
4397
4398
4399
4400# Check whether --with-rootcert-file was given.
4401if test "${with_rootcert_file+set}" = set; then :
4402  withval=$with_rootcert_file; UNBOUND_ROOTCERT_FILE="$withval"
4403else
4404  if test $on_mingw = no; then
4405    UNBOUND_ROOTCERT_FILE="$UNBOUND_RUN_DIR/icannbundle.pem"
4406else
4407    UNBOUND_ROOTCERT_FILE="C:\\Program Files\\Unbound\\icannbundle.pem"
4408fi
4409
4410fi
4411
4412
4413hdr_rpem="`echo $UNBOUND_ROOTCERT_FILE | sed -e 's/\\\\/\\\\\\\\/g'`"
4414
4415
4416cat >>confdefs.h <<_ACEOF
4417#define ROOT_CERT_FILE "$hdr_rpem"
4418_ACEOF
4419
4420
4421
4422# Check whether --with-username was given.
4423if test "${with_username+set}" = set; then :
4424  withval=$with_username; UNBOUND_USERNAME="$withval"
4425else
4426  UNBOUND_USERNAME="unbound"
4427fi
4428
4429
4430
4431cat >>confdefs.h <<_ACEOF
4432#define UB_USERNAME "$UNBOUND_USERNAME"
4433_ACEOF
4434
4435
4436
4437$as_echo "#define WINVER 0x0502" >>confdefs.h
4438
4439wnvs=`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/' `
4440
4441
4442cat >>confdefs.h <<_ACEOF
4443#define RSRC_PACKAGE_VERSION $wnvs
4444_ACEOF
4445
4446
4447# Checks for typedefs, structures, and compiler characteristics.
4448{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
4449$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
4450if ${ac_cv_c_const+:} false; then :
4451  $as_echo_n "(cached) " >&6
4452else
4453  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4454/* end confdefs.h.  */
4455
4456int
4457main ()
4458{
4459
4460#ifndef __cplusplus
4461  /* Ultrix mips cc rejects this sort of thing.  */
4462  typedef int charset[2];
4463  const charset cs = { 0, 0 };
4464  /* SunOS 4.1.1 cc rejects this.  */
4465  char const *const *pcpcc;
4466  char **ppc;
4467  /* NEC SVR4.0.2 mips cc rejects this.  */
4468  struct point {int x, y;};
4469  static struct point const zero = {0,0};
4470  /* AIX XL C 1.02.0.0 rejects this.
4471     It does not let you subtract one const X* pointer from another in
4472     an arm of an if-expression whose if-part is not a constant
4473     expression */
4474  const char *g = "string";
4475  pcpcc = &g + (g ? g-g : 0);
4476  /* HPUX 7.0 cc rejects these. */
4477  ++pcpcc;
4478  ppc = (char**) pcpcc;
4479  pcpcc = (char const *const *) ppc;
4480  { /* SCO 3.2v4 cc rejects this sort of thing.  */
4481    char tx;
4482    char *t = &tx;
4483    char const *s = 0 ? (char *) 0 : (char const *) 0;
4484
4485    *t++ = 0;
4486    if (s) return 0;
4487  }
4488  { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
4489    int x[] = {25, 17};
4490    const int *foo = &x[0];
4491    ++foo;
4492  }
4493  { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
4494    typedef const int *iptr;
4495    iptr p = 0;
4496    ++p;
4497  }
4498  { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
4499       "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
4500    struct s { int j; const int *ap[3]; } bx;
4501    struct s *b = &bx; b->j = 5;
4502  }
4503  { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
4504    const int foo = 10;
4505    if (!foo) return 0;
4506  }
4507  return !cs[0] && !zero.x;
4508#endif
4509
4510  ;
4511  return 0;
4512}
4513_ACEOF
4514if ac_fn_c_try_compile "$LINENO"; then :
4515  ac_cv_c_const=yes
4516else
4517  ac_cv_c_const=no
4518fi
4519rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4520fi
4521{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
4522$as_echo "$ac_cv_c_const" >&6; }
4523if test $ac_cv_c_const = no; then
4524
4525$as_echo "#define const /**/" >>confdefs.h
4526
4527fi
4528
4529ac_ext=c
4530ac_cpp='$CPP $CPPFLAGS'
4531ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4532ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4533ac_compiler_gnu=$ac_cv_c_compiler_gnu
4534
4535# allow user to override the -g -O2 flags.
4536default_cflags=no
4537if test "x$CFLAGS" = "x" ; then
4538
4539
4540{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -g" >&5
4541$as_echo_n "checking whether $CC supports -g... " >&6; }
4542cache=`echo g | sed 'y%.=/+-%___p_%'`
4543if eval \${cv_prog_cc_flag_$cache+:} false; then :
4544  $as_echo_n "(cached) " >&6
4545else
4546
4547echo 'void f(void){}' >conftest.c
4548if test -z "`$CC $CPPFLAGS $CFLAGS -g -c conftest.c 2>&1`"; then
4549eval "cv_prog_cc_flag_$cache=yes"
4550else
4551eval "cv_prog_cc_flag_$cache=no"
4552fi
4553rm -f conftest conftest.o conftest.c
4554
4555fi
4556
4557if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
4558{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4559$as_echo "yes" >&6; }
4560:
4561CFLAGS="$CFLAGS -g"
4562else
4563{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4564$as_echo "no" >&6; }
4565:
4566
4567fi
4568
4569
4570
4571{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -O2" >&5
4572$as_echo_n "checking whether $CC supports -O2... " >&6; }
4573cache=`echo O2 | sed 'y%.=/+-%___p_%'`
4574if eval \${cv_prog_cc_flag_$cache+:} false; then :
4575  $as_echo_n "(cached) " >&6
4576else
4577
4578echo 'void f(void){}' >conftest.c
4579if test -z "`$CC $CPPFLAGS $CFLAGS -O2 -c conftest.c 2>&1`"; then
4580eval "cv_prog_cc_flag_$cache=yes"
4581else
4582eval "cv_prog_cc_flag_$cache=no"
4583fi
4584rm -f conftest conftest.o conftest.c
4585
4586fi
4587
4588if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
4589{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4590$as_echo "yes" >&6; }
4591:
4592CFLAGS="$CFLAGS -O2"
4593else
4594{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4595$as_echo "no" >&6; }
4596:
4597
4598fi
4599
4600default_cflags=yes
4601fi
4602ac_ext=c
4603ac_cpp='$CPP $CPPFLAGS'
4604ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4605ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4606ac_compiler_gnu=$ac_cv_c_compiler_gnu
4607if test -n "$ac_tool_prefix"; then
4608  # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
4609set dummy ${ac_tool_prefix}gcc; ac_word=$2
4610{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4611$as_echo_n "checking for $ac_word... " >&6; }
4612if ${ac_cv_prog_CC+:} false; then :
4613  $as_echo_n "(cached) " >&6
4614else
4615  if test -n "$CC"; then
4616  ac_cv_prog_CC="$CC" # Let the user override the test.
4617else
4618as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4619for as_dir in $PATH
4620do
4621  IFS=$as_save_IFS
4622  test -z "$as_dir" && as_dir=.
4623    for ac_exec_ext in '' $ac_executable_extensions; do
4624  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4625    ac_cv_prog_CC="${ac_tool_prefix}gcc"
4626    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4627    break 2
4628  fi
4629done
4630  done
4631IFS=$as_save_IFS
4632
4633fi
4634fi
4635CC=$ac_cv_prog_CC
4636if test -n "$CC"; then
4637  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4638$as_echo "$CC" >&6; }
4639else
4640  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4641$as_echo "no" >&6; }
4642fi
4643
4644
4645fi
4646if test -z "$ac_cv_prog_CC"; then
4647  ac_ct_CC=$CC
4648  # Extract the first word of "gcc", so it can be a program name with args.
4649set dummy gcc; ac_word=$2
4650{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4651$as_echo_n "checking for $ac_word... " >&6; }
4652if ${ac_cv_prog_ac_ct_CC+:} false; then :
4653  $as_echo_n "(cached) " >&6
4654else
4655  if test -n "$ac_ct_CC"; then
4656  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
4657else
4658as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4659for as_dir in $PATH
4660do
4661  IFS=$as_save_IFS
4662  test -z "$as_dir" && as_dir=.
4663    for ac_exec_ext in '' $ac_executable_extensions; do
4664  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4665    ac_cv_prog_ac_ct_CC="gcc"
4666    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4667    break 2
4668  fi
4669done
4670  done
4671IFS=$as_save_IFS
4672
4673fi
4674fi
4675ac_ct_CC=$ac_cv_prog_ac_ct_CC
4676if test -n "$ac_ct_CC"; then
4677  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
4678$as_echo "$ac_ct_CC" >&6; }
4679else
4680  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4681$as_echo "no" >&6; }
4682fi
4683
4684  if test "x$ac_ct_CC" = x; then
4685    CC=""
4686  else
4687    case $cross_compiling:$ac_tool_warned in
4688yes:)
4689{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4690$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4691ac_tool_warned=yes ;;
4692esac
4693    CC=$ac_ct_CC
4694  fi
4695else
4696  CC="$ac_cv_prog_CC"
4697fi
4698
4699if test -z "$CC"; then
4700          if test -n "$ac_tool_prefix"; then
4701    # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
4702set dummy ${ac_tool_prefix}cc; ac_word=$2
4703{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4704$as_echo_n "checking for $ac_word... " >&6; }
4705if ${ac_cv_prog_CC+:} false; then :
4706  $as_echo_n "(cached) " >&6
4707else
4708  if test -n "$CC"; then
4709  ac_cv_prog_CC="$CC" # Let the user override the test.
4710else
4711as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4712for as_dir in $PATH
4713do
4714  IFS=$as_save_IFS
4715  test -z "$as_dir" && as_dir=.
4716    for ac_exec_ext in '' $ac_executable_extensions; do
4717  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4718    ac_cv_prog_CC="${ac_tool_prefix}cc"
4719    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4720    break 2
4721  fi
4722done
4723  done
4724IFS=$as_save_IFS
4725
4726fi
4727fi
4728CC=$ac_cv_prog_CC
4729if test -n "$CC"; then
4730  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4731$as_echo "$CC" >&6; }
4732else
4733  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4734$as_echo "no" >&6; }
4735fi
4736
4737
4738  fi
4739fi
4740if test -z "$CC"; then
4741  # Extract the first word of "cc", so it can be a program name with args.
4742set dummy cc; ac_word=$2
4743{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4744$as_echo_n "checking for $ac_word... " >&6; }
4745if ${ac_cv_prog_CC+:} false; then :
4746  $as_echo_n "(cached) " >&6
4747else
4748  if test -n "$CC"; then
4749  ac_cv_prog_CC="$CC" # Let the user override the test.
4750else
4751  ac_prog_rejected=no
4752as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4753for as_dir in $PATH
4754do
4755  IFS=$as_save_IFS
4756  test -z "$as_dir" && as_dir=.
4757    for ac_exec_ext in '' $ac_executable_extensions; do
4758  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4759    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
4760       ac_prog_rejected=yes
4761       continue
4762     fi
4763    ac_cv_prog_CC="cc"
4764    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4765    break 2
4766  fi
4767done
4768  done
4769IFS=$as_save_IFS
4770
4771if test $ac_prog_rejected = yes; then
4772  # We found a bogon in the path, so make sure we never use it.
4773  set dummy $ac_cv_prog_CC
4774  shift
4775  if test $# != 0; then
4776    # We chose a different compiler from the bogus one.
4777    # However, it has the same basename, so the bogon will be chosen
4778    # first if we set CC to just the basename; use the full file name.
4779    shift
4780    ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
4781  fi
4782fi
4783fi
4784fi
4785CC=$ac_cv_prog_CC
4786if test -n "$CC"; then
4787  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4788$as_echo "$CC" >&6; }
4789else
4790  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4791$as_echo "no" >&6; }
4792fi
4793
4794
4795fi
4796if test -z "$CC"; then
4797  if test -n "$ac_tool_prefix"; then
4798  for ac_prog in cl.exe
4799  do
4800    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4801set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4802{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4803$as_echo_n "checking for $ac_word... " >&6; }
4804if ${ac_cv_prog_CC+:} false; then :
4805  $as_echo_n "(cached) " >&6
4806else
4807  if test -n "$CC"; then
4808  ac_cv_prog_CC="$CC" # Let the user override the test.
4809else
4810as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4811for as_dir in $PATH
4812do
4813  IFS=$as_save_IFS
4814  test -z "$as_dir" && as_dir=.
4815    for ac_exec_ext in '' $ac_executable_extensions; do
4816  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4817    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
4818    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4819    break 2
4820  fi
4821done
4822  done
4823IFS=$as_save_IFS
4824
4825fi
4826fi
4827CC=$ac_cv_prog_CC
4828if test -n "$CC"; then
4829  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4830$as_echo "$CC" >&6; }
4831else
4832  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4833$as_echo "no" >&6; }
4834fi
4835
4836
4837    test -n "$CC" && break
4838  done
4839fi
4840if test -z "$CC"; then
4841  ac_ct_CC=$CC
4842  for ac_prog in cl.exe
4843do
4844  # Extract the first word of "$ac_prog", so it can be a program name with args.
4845set dummy $ac_prog; ac_word=$2
4846{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4847$as_echo_n "checking for $ac_word... " >&6; }
4848if ${ac_cv_prog_ac_ct_CC+:} false; then :
4849  $as_echo_n "(cached) " >&6
4850else
4851  if test -n "$ac_ct_CC"; then
4852  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
4853else
4854as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4855for as_dir in $PATH
4856do
4857  IFS=$as_save_IFS
4858  test -z "$as_dir" && as_dir=.
4859    for ac_exec_ext in '' $ac_executable_extensions; do
4860  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4861    ac_cv_prog_ac_ct_CC="$ac_prog"
4862    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4863    break 2
4864  fi
4865done
4866  done
4867IFS=$as_save_IFS
4868
4869fi
4870fi
4871ac_ct_CC=$ac_cv_prog_ac_ct_CC
4872if test -n "$ac_ct_CC"; then
4873  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
4874$as_echo "$ac_ct_CC" >&6; }
4875else
4876  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4877$as_echo "no" >&6; }
4878fi
4879
4880
4881  test -n "$ac_ct_CC" && break
4882done
4883
4884  if test "x$ac_ct_CC" = x; then
4885    CC=""
4886  else
4887    case $cross_compiling:$ac_tool_warned in
4888yes:)
4889{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4890$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4891ac_tool_warned=yes ;;
4892esac
4893    CC=$ac_ct_CC
4894  fi
4895fi
4896
4897fi
4898
4899
4900test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4901$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4902as_fn_error $? "no acceptable C compiler found in \$PATH
4903See \`config.log' for more details" "$LINENO" 5; }
4904
4905# Provide some information about the compiler.
4906$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
4907set X $ac_compile
4908ac_compiler=$2
4909for ac_option in --version -v -V -qversion; do
4910  { { ac_try="$ac_compiler $ac_option >&5"
4911case "(($ac_try" in
4912  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4913  *) ac_try_echo=$ac_try;;
4914esac
4915eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4916$as_echo "$ac_try_echo"; } >&5
4917  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
4918  ac_status=$?
4919  if test -s conftest.err; then
4920    sed '10a\
4921... rest of stderr output deleted ...
4922         10q' conftest.err >conftest.er1
4923    cat conftest.er1 >&5
4924  fi
4925  rm -f conftest.er1 conftest.err
4926  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4927  test $ac_status = 0; }
4928done
4929
4930{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4931$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
4932if ${ac_cv_c_compiler_gnu+:} false; then :
4933  $as_echo_n "(cached) " >&6
4934else
4935  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4936/* end confdefs.h.  */
4937
4938int
4939main ()
4940{
4941#ifndef __GNUC__
4942       choke me
4943#endif
4944
4945  ;
4946  return 0;
4947}
4948_ACEOF
4949if ac_fn_c_try_compile "$LINENO"; then :
4950  ac_compiler_gnu=yes
4951else
4952  ac_compiler_gnu=no
4953fi
4954rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4955ac_cv_c_compiler_gnu=$ac_compiler_gnu
4956
4957fi
4958{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4959$as_echo "$ac_cv_c_compiler_gnu" >&6; }
4960if test $ac_compiler_gnu = yes; then
4961  GCC=yes
4962else
4963  GCC=
4964fi
4965ac_test_CFLAGS=${CFLAGS+set}
4966ac_save_CFLAGS=$CFLAGS
4967{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4968$as_echo_n "checking whether $CC accepts -g... " >&6; }
4969if ${ac_cv_prog_cc_g+:} false; then :
4970  $as_echo_n "(cached) " >&6
4971else
4972  ac_save_c_werror_flag=$ac_c_werror_flag
4973   ac_c_werror_flag=yes
4974   ac_cv_prog_cc_g=no
4975   CFLAGS="-g"
4976   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4977/* end confdefs.h.  */
4978
4979int
4980main ()
4981{
4982
4983  ;
4984  return 0;
4985}
4986_ACEOF
4987if ac_fn_c_try_compile "$LINENO"; then :
4988  ac_cv_prog_cc_g=yes
4989else
4990  CFLAGS=""
4991      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4992/* end confdefs.h.  */
4993
4994int
4995main ()
4996{
4997
4998  ;
4999  return 0;
5000}
5001_ACEOF
5002if ac_fn_c_try_compile "$LINENO"; then :
5003
5004else
5005  ac_c_werror_flag=$ac_save_c_werror_flag
5006	 CFLAGS="-g"
5007	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5008/* end confdefs.h.  */
5009
5010int
5011main ()
5012{
5013
5014  ;
5015  return 0;
5016}
5017_ACEOF
5018if ac_fn_c_try_compile "$LINENO"; then :
5019  ac_cv_prog_cc_g=yes
5020fi
5021rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5022fi
5023rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5024fi
5025rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5026   ac_c_werror_flag=$ac_save_c_werror_flag
5027fi
5028{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
5029$as_echo "$ac_cv_prog_cc_g" >&6; }
5030if test "$ac_test_CFLAGS" = set; then
5031  CFLAGS=$ac_save_CFLAGS
5032elif test $ac_cv_prog_cc_g = yes; then
5033  if test "$GCC" = yes; then
5034    CFLAGS="-g -O2"
5035  else
5036    CFLAGS="-g"
5037  fi
5038else
5039  if test "$GCC" = yes; then
5040    CFLAGS="-O2"
5041  else
5042    CFLAGS=
5043  fi
5044fi
5045{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
5046$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
5047if ${ac_cv_prog_cc_c89+:} false; then :
5048  $as_echo_n "(cached) " >&6
5049else
5050  ac_cv_prog_cc_c89=no
5051ac_save_CC=$CC
5052cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5053/* end confdefs.h.  */
5054#include <stdarg.h>
5055#include <stdio.h>
5056struct stat;
5057/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
5058struct buf { int x; };
5059FILE * (*rcsopen) (struct buf *, struct stat *, int);
5060static char *e (p, i)
5061     char **p;
5062     int i;
5063{
5064  return p[i];
5065}
5066static char *f (char * (*g) (char **, int), char **p, ...)
5067{
5068  char *s;
5069  va_list v;
5070  va_start (v,p);
5071  s = g (p, va_arg (v,int));
5072  va_end (v);
5073  return s;
5074}
5075
5076/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
5077   function prototypes and stuff, but not '\xHH' hex character constants.
5078   These don't provoke an error unfortunately, instead are silently treated
5079   as 'x'.  The following induces an error, until -std is added to get
5080   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
5081   array size at least.  It's necessary to write '\x00'==0 to get something
5082   that's true only with -std.  */
5083int osf4_cc_array ['\x00' == 0 ? 1 : -1];
5084
5085/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
5086   inside strings and character constants.  */
5087#define FOO(x) 'x'
5088int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
5089
5090int test (int i, double x);
5091struct s1 {int (*f) (int a);};
5092struct s2 {int (*f) (double a);};
5093int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
5094int argc;
5095char **argv;
5096int
5097main ()
5098{
5099return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
5100  ;
5101  return 0;
5102}
5103_ACEOF
5104for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
5105	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
5106do
5107  CC="$ac_save_CC $ac_arg"
5108  if ac_fn_c_try_compile "$LINENO"; then :
5109  ac_cv_prog_cc_c89=$ac_arg
5110fi
5111rm -f core conftest.err conftest.$ac_objext
5112  test "x$ac_cv_prog_cc_c89" != "xno" && break
5113done
5114rm -f conftest.$ac_ext
5115CC=$ac_save_CC
5116
5117fi
5118# AC_CACHE_VAL
5119case "x$ac_cv_prog_cc_c89" in
5120  x)
5121    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
5122$as_echo "none needed" >&6; } ;;
5123  xno)
5124    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
5125$as_echo "unsupported" >&6; } ;;
5126  *)
5127    CC="$CC $ac_cv_prog_cc_c89"
5128    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
5129$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
5130esac
5131if test "x$ac_cv_prog_cc_c89" != xno; then :
5132
5133fi
5134
5135ac_ext=c
5136ac_cpp='$CPP $CPPFLAGS'
5137ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5138ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5139ac_compiler_gnu=$ac_cv_c_compiler_gnu
5140
5141
5142{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $CC dependency flag" >&5
5143$as_echo_n "checking $CC dependency flag... " >&6; }
5144echo 'void f(){}' >conftest.c
5145if test "`$CC -MM conftest.c 2>&1`" = "conftest.o: conftest.c"; then
5146	DEPFLAG="-MM"
5147else
5148  if test "`$CC -xM1 conftest.c 2>&1`" = "conftest.o: conftest.c"; then
5149	DEPFLAG="-xM1"
5150  else
5151	DEPFLAG="-MM"  # dunno do something
5152  fi
5153fi
5154{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEPFLAG" >&5
5155$as_echo "$DEPFLAG" >&6; }
5156rm -f conftest.c
5157
5158
5159
5160
5161
5162{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Werror" >&5
5163$as_echo_n "checking whether $CC supports -Werror... " >&6; }
5164cache=`echo Werror | sed 'y%.=/+-%___p_%'`
5165if eval \${cv_prog_cc_flag_$cache+:} false; then :
5166  $as_echo_n "(cached) " >&6
5167else
5168
5169echo 'void f(void){}' >conftest.c
5170if test -z "`$CC $CPPFLAGS $CFLAGS -Werror -c conftest.c 2>&1`"; then
5171eval "cv_prog_cc_flag_$cache=yes"
5172else
5173eval "cv_prog_cc_flag_$cache=no"
5174fi
5175rm -f conftest conftest.o conftest.c
5176
5177fi
5178
5179if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
5180{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5181$as_echo "yes" >&6; }
5182:
5183ERRFLAG="-Werror"
5184else
5185{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5186$as_echo "no" >&6; }
5187:
5188ERRFLAG="-errwarn"
5189fi
5190
5191
5192
5193{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wall" >&5
5194$as_echo_n "checking whether $CC supports -Wall... " >&6; }
5195cache=`echo Wall | sed 'y%.=/+-%___p_%'`
5196if eval \${cv_prog_cc_flag_$cache+:} false; then :
5197  $as_echo_n "(cached) " >&6
5198else
5199
5200echo 'void f(void){}' >conftest.c
5201if test -z "`$CC $CPPFLAGS $CFLAGS -Wall -c conftest.c 2>&1`"; then
5202eval "cv_prog_cc_flag_$cache=yes"
5203else
5204eval "cv_prog_cc_flag_$cache=no"
5205fi
5206rm -f conftest conftest.o conftest.c
5207
5208fi
5209
5210if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
5211{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5212$as_echo "yes" >&6; }
5213:
5214ERRFLAG="$ERRFLAG -Wall"
5215else
5216{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5217$as_echo "no" >&6; }
5218:
5219ERRFLAG="$ERRFLAG -errfmt"
5220fi
5221
5222
5223
5224
5225
5226{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -std=c99" >&5
5227$as_echo_n "checking whether $CC supports -std=c99... " >&6; }
5228cache=`echo std=c99 | sed 'y%.=/+-%___p_%'`
5229if eval \${cv_prog_cc_flag_$cache+:} false; then :
5230  $as_echo_n "(cached) " >&6
5231else
5232
5233echo 'void f(void){}' >conftest.c
5234if test -z "`$CC $CPPFLAGS $CFLAGS -std=c99 -c conftest.c 2>&1`"; then
5235eval "cv_prog_cc_flag_$cache=yes"
5236else
5237eval "cv_prog_cc_flag_$cache=no"
5238fi
5239rm -f conftest conftest.o conftest.c
5240
5241fi
5242
5243if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
5244{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5245$as_echo "yes" >&6; }
5246:
5247C99FLAG="-std=c99"
5248else
5249{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5250$as_echo "no" >&6; }
5251:
5252
5253fi
5254
5255
5256
5257{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -xc99" >&5
5258$as_echo_n "checking whether $CC supports -xc99... " >&6; }
5259cache=`echo xc99 | sed 'y%.=/+-%___p_%'`
5260if eval \${cv_prog_cc_flag_$cache+:} false; then :
5261  $as_echo_n "(cached) " >&6
5262else
5263
5264echo 'void f(void){}' >conftest.c
5265if test -z "`$CC $CPPFLAGS $CFLAGS -xc99 -c conftest.c 2>&1`"; then
5266eval "cv_prog_cc_flag_$cache=yes"
5267else
5268eval "cv_prog_cc_flag_$cache=no"
5269fi
5270rm -f conftest conftest.o conftest.c
5271
5272fi
5273
5274if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
5275{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5276$as_echo "yes" >&6; }
5277:
5278C99FLAG="-xc99"
5279else
5280{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5281$as_echo "no" >&6; }
5282:
5283
5284fi
5285
5286
5287for ac_header in getopt.h time.h
5288do :
5289  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5290ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
5291"
5292if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
5293  cat >>confdefs.h <<_ACEOF
5294#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5295_ACEOF
5296
5297fi
5298
5299done
5300
5301
5302
5303
5304
5305{ $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
5306$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; }
5307cache=`$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`
5308if eval \${cv_prog_cc_flag_needed_$cache+:} false; then :
5309  $as_echo_n "(cached) " >&6
5310else
5311
5312echo '
5313#include "confdefs.h"
5314#include <stdlib.h>
5315#include <ctype.h>
5316#include <sys/time.h>
5317#ifdef HAVE_TIME_H
5318#include <time.h>
5319#endif
5320#include <unistd.h>
5321#include <netdb.h>
5322#ifdef HAVE_GETOPT_H
5323#include <getopt.h>
5324#endif
5325
5326int test() {
5327	int a;
5328	char **opts = NULL;
5329	struct timeval tv;
5330	char *t;
5331	time_t time = 0;
5332	char *buf = NULL;
5333	const char* str = NULL;
5334	struct msghdr msg;
5335	msg.msg_control = 0;
5336	t = ctime_r(&time, buf);
5337	tv.tv_usec = 10;
5338	srandom(32);
5339	a = getopt(2, opts, "a");
5340	a = isascii(32);
5341	str = gai_strerror(0);
5342	if(str && t && tv.tv_usec && msg.msg_control)
5343		a = 0;
5344	return a;
5345}
5346' > conftest.c
5347echo 'void f(){}' >>conftest.c
5348if test -z "`$CC $CPPFLAGS $CFLAGS $ERRFLAG -c conftest.c 2>&1`"; then
5349eval "cv_prog_cc_flag_needed_$cache=no"
5350else
5351
5352if 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
5353eval "cv_prog_cc_flag_needed_$cache=yes"
5354else
5355eval "cv_prog_cc_flag_needed_$cache=fail"
5356#echo 'Test with flag fails too!'
5357#cat conftest.c
5358#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"
5359#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`
5360#exit 1
5361fi
5362
5363fi
5364rm -f conftest conftest.c conftest.o
5365
5366fi
5367
5368if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = yes"; then
5369{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5370$as_echo "yes" >&6; }
5371:
5372CFLAGS="$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"
5373else
5374if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = no"; then
5375{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5376$as_echo "no" >&6; }
5377#echo 'Test with flag is no!'
5378#cat conftest.c
5379#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"
5380#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`
5381#exit 1
5382:
5383
5384else
5385{ $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
5386$as_echo "failed" >&6; }
5387:
5388
5389fi
5390fi
5391
5392
5393
5394
5395
5396{ $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
5397$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; }
5398cache=`$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`
5399if eval \${cv_prog_cc_flag_needed_$cache+:} false; then :
5400  $as_echo_n "(cached) " >&6
5401else
5402
5403echo '
5404#include "confdefs.h"
5405#include <stdlib.h>
5406#include <ctype.h>
5407#include <sys/time.h>
5408#ifdef HAVE_TIME_H
5409#include <time.h>
5410#endif
5411#include <unistd.h>
5412#include <netdb.h>
5413#ifdef HAVE_GETOPT_H
5414#include <getopt.h>
5415#endif
5416
5417int test() {
5418	int a;
5419	char **opts = NULL;
5420	struct timeval tv;
5421	char *t;
5422	time_t time = 0;
5423	char *buf = NULL;
5424	const char* str = NULL;
5425	struct msghdr msg;
5426	msg.msg_control = 0;
5427	t = ctime_r(&time, buf);
5428	tv.tv_usec = 10;
5429	srandom(32);
5430	a = getopt(2, opts, "a");
5431	a = isascii(32);
5432	str = gai_strerror(0);
5433	if(str && t && tv.tv_usec && msg.msg_control)
5434		a = 0;
5435	return a;
5436}
5437' > conftest.c
5438echo 'void f(){}' >>conftest.c
5439if test -z "`$CC $CPPFLAGS $CFLAGS $ERRFLAG -c conftest.c 2>&1`"; then
5440eval "cv_prog_cc_flag_needed_$cache=no"
5441else
5442
5443if 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
5444eval "cv_prog_cc_flag_needed_$cache=yes"
5445else
5446eval "cv_prog_cc_flag_needed_$cache=fail"
5447#echo 'Test with flag fails too!'
5448#cat conftest.c
5449#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"
5450#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`
5451#exit 1
5452fi
5453
5454fi
5455rm -f conftest conftest.c conftest.o
5456
5457fi
5458
5459if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = yes"; then
5460{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5461$as_echo "yes" >&6; }
5462:
5463CFLAGS="$CFLAGS $C99FLAG -D__EXTENSIONS__ -D_BSD_SOURCE -D_DEFAULT_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -D_ALL_SOURCE"
5464else
5465if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = no"; then
5466{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5467$as_echo "no" >&6; }
5468#echo 'Test with flag is no!'
5469#cat conftest.c
5470#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"
5471#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`
5472#exit 1
5473:
5474
5475else
5476{ $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
5477$as_echo "failed" >&6; }
5478:
5479
5480fi
5481fi
5482
5483
5484
5485
5486
5487{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we need $C99FLAG as a flag for $CC" >&5
5488$as_echo_n "checking whether we need $C99FLAG as a flag for $CC... " >&6; }
5489cache=`$as_echo "$C99FLAG" | $as_tr_sh`
5490if eval \${cv_prog_cc_flag_needed_$cache+:} false; then :
5491  $as_echo_n "(cached) " >&6
5492else
5493
5494echo '
5495#include <stdbool.h>
5496#include <ctype.h>
5497int test() {
5498        int a = 0;
5499        return a;
5500}
5501' > conftest.c
5502echo 'void f(){}' >>conftest.c
5503if test -z "`$CC $CPPFLAGS $CFLAGS $ERRFLAG -c conftest.c 2>&1`"; then
5504eval "cv_prog_cc_flag_needed_$cache=no"
5505else
5506
5507if test -z "`$CC $CPPFLAGS $CFLAGS $C99FLAG $ERRFLAG -c conftest.c 2>&1`"; then
5508eval "cv_prog_cc_flag_needed_$cache=yes"
5509else
5510eval "cv_prog_cc_flag_needed_$cache=fail"
5511#echo 'Test with flag fails too!'
5512#cat conftest.c
5513#echo "$CC $CPPFLAGS $CFLAGS $C99FLAG $ERRFLAG -c conftest.c 2>&1"
5514#echo `$CC $CPPFLAGS $CFLAGS $C99FLAG $ERRFLAG -c conftest.c 2>&1`
5515#exit 1
5516fi
5517
5518fi
5519rm -f conftest conftest.c conftest.o
5520
5521fi
5522
5523if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = yes"; then
5524{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5525$as_echo "yes" >&6; }
5526:
5527CFLAGS="$CFLAGS $C99FLAG"
5528else
5529if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = no"; then
5530{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5531$as_echo "no" >&6; }
5532#echo 'Test with flag is no!'
5533#cat conftest.c
5534#echo "$CC $CPPFLAGS $CFLAGS $C99FLAG $ERRFLAG -c conftest.c 2>&1"
5535#echo `$CC $CPPFLAGS $CFLAGS $C99FLAG $ERRFLAG -c conftest.c 2>&1`
5536#exit 1
5537:
5538
5539else
5540{ $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
5541$as_echo "failed" >&6; }
5542:
5543
5544fi
5545fi
5546
5547
5548
5549
5550
5551{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we need -D_BSD_SOURCE -D_DEFAULT_SOURCE as a flag for $CC" >&5
5552$as_echo_n "checking whether we need -D_BSD_SOURCE -D_DEFAULT_SOURCE as a flag for $CC... " >&6; }
5553cache=_D_BSD_SOURCE__D_DEFAULT_SOURCE
5554if eval \${cv_prog_cc_flag_needed_$cache+:} false; then :
5555  $as_echo_n "(cached) " >&6
5556else
5557
5558echo '
5559#include <ctype.h>
5560
5561int test() {
5562        int a;
5563        a = isascii(32);
5564        return a;
5565}
5566' > conftest.c
5567echo 'void f(){}' >>conftest.c
5568if test -z "`$CC $CPPFLAGS $CFLAGS $ERRFLAG -c conftest.c 2>&1`"; then
5569eval "cv_prog_cc_flag_needed_$cache=no"
5570else
5571
5572if test -z "`$CC $CPPFLAGS $CFLAGS -D_BSD_SOURCE -D_DEFAULT_SOURCE $ERRFLAG -c conftest.c 2>&1`"; then
5573eval "cv_prog_cc_flag_needed_$cache=yes"
5574else
5575eval "cv_prog_cc_flag_needed_$cache=fail"
5576#echo 'Test with flag fails too!'
5577#cat conftest.c
5578#echo "$CC $CPPFLAGS $CFLAGS -D_BSD_SOURCE -D_DEFAULT_SOURCE $ERRFLAG -c conftest.c 2>&1"
5579#echo `$CC $CPPFLAGS $CFLAGS -D_BSD_SOURCE -D_DEFAULT_SOURCE $ERRFLAG -c conftest.c 2>&1`
5580#exit 1
5581fi
5582
5583fi
5584rm -f conftest conftest.c conftest.o
5585
5586fi
5587
5588if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = yes"; then
5589{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5590$as_echo "yes" >&6; }
5591:
5592CFLAGS="$CFLAGS -D_BSD_SOURCE -D_DEFAULT_SOURCE"
5593else
5594if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = no"; then
5595{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5596$as_echo "no" >&6; }
5597#echo 'Test with flag is no!'
5598#cat conftest.c
5599#echo "$CC $CPPFLAGS $CFLAGS -D_BSD_SOURCE -D_DEFAULT_SOURCE $ERRFLAG -c conftest.c 2>&1"
5600#echo `$CC $CPPFLAGS $CFLAGS -D_BSD_SOURCE -D_DEFAULT_SOURCE $ERRFLAG -c conftest.c 2>&1`
5601#exit 1
5602:
5603
5604else
5605{ $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
5606$as_echo "failed" >&6; }
5607:
5608
5609fi
5610fi
5611
5612
5613
5614
5615
5616{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we need -D_GNU_SOURCE as a flag for $CC" >&5
5617$as_echo_n "checking whether we need -D_GNU_SOURCE as a flag for $CC... " >&6; }
5618cache=_D_GNU_SOURCE
5619if eval \${cv_prog_cc_flag_needed_$cache+:} false; then :
5620  $as_echo_n "(cached) " >&6
5621else
5622
5623echo '
5624#include <netinet/in.h>
5625
5626int test() {
5627        struct in6_pktinfo inf;
5628	int a = (int)sizeof(inf);
5629        return a;
5630}
5631' > conftest.c
5632echo 'void f(){}' >>conftest.c
5633if test -z "`$CC $CPPFLAGS $CFLAGS $ERRFLAG -c conftest.c 2>&1`"; then
5634eval "cv_prog_cc_flag_needed_$cache=no"
5635else
5636
5637if test -z "`$CC $CPPFLAGS $CFLAGS -D_GNU_SOURCE $ERRFLAG -c conftest.c 2>&1`"; then
5638eval "cv_prog_cc_flag_needed_$cache=yes"
5639else
5640eval "cv_prog_cc_flag_needed_$cache=fail"
5641#echo 'Test with flag fails too!'
5642#cat conftest.c
5643#echo "$CC $CPPFLAGS $CFLAGS -D_GNU_SOURCE $ERRFLAG -c conftest.c 2>&1"
5644#echo `$CC $CPPFLAGS $CFLAGS -D_GNU_SOURCE $ERRFLAG -c conftest.c 2>&1`
5645#exit 1
5646fi
5647
5648fi
5649rm -f conftest conftest.c conftest.o
5650
5651fi
5652
5653if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = yes"; then
5654{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5655$as_echo "yes" >&6; }
5656:
5657CFLAGS="$CFLAGS -D_GNU_SOURCE"
5658else
5659if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = no"; then
5660{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5661$as_echo "no" >&6; }
5662#echo 'Test with flag is no!'
5663#cat conftest.c
5664#echo "$CC $CPPFLAGS $CFLAGS -D_GNU_SOURCE $ERRFLAG -c conftest.c 2>&1"
5665#echo `$CC $CPPFLAGS $CFLAGS -D_GNU_SOURCE $ERRFLAG -c conftest.c 2>&1`
5666#exit 1
5667:
5668
5669else
5670{ $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
5671$as_echo "failed" >&6; }
5672:
5673
5674fi
5675fi
5676
5677
5678# check again for GNU_SOURCE for setresgid. May fail if setresgid
5679# is not available at all. -D_FRSRESGID is to make this check unique.
5680# otherwise we would get the previous cached result.
5681
5682
5683
5684{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we need -D_GNU_SOURCE -D_FRSRESGID as a flag for $CC" >&5
5685$as_echo_n "checking whether we need -D_GNU_SOURCE -D_FRSRESGID as a flag for $CC... " >&6; }
5686cache=_D_GNU_SOURCE__D_FRSRESGID
5687if eval \${cv_prog_cc_flag_needed_$cache+:} false; then :
5688  $as_echo_n "(cached) " >&6
5689else
5690
5691echo '
5692#include <unistd.h>
5693
5694int test() {
5695	int a = setresgid(0,0,0);
5696	a = setresuid(0,0,0);
5697        return a;
5698}
5699' > conftest.c
5700echo 'void f(){}' >>conftest.c
5701if test -z "`$CC $CPPFLAGS $CFLAGS $ERRFLAG -c conftest.c 2>&1`"; then
5702eval "cv_prog_cc_flag_needed_$cache=no"
5703else
5704
5705if test -z "`$CC $CPPFLAGS $CFLAGS -D_GNU_SOURCE -D_FRSRESGID $ERRFLAG -c conftest.c 2>&1`"; then
5706eval "cv_prog_cc_flag_needed_$cache=yes"
5707else
5708eval "cv_prog_cc_flag_needed_$cache=fail"
5709#echo 'Test with flag fails too!'
5710#cat conftest.c
5711#echo "$CC $CPPFLAGS $CFLAGS -D_GNU_SOURCE -D_FRSRESGID $ERRFLAG -c conftest.c 2>&1"
5712#echo `$CC $CPPFLAGS $CFLAGS -D_GNU_SOURCE -D_FRSRESGID $ERRFLAG -c conftest.c 2>&1`
5713#exit 1
5714fi
5715
5716fi
5717rm -f conftest conftest.c conftest.o
5718
5719fi
5720
5721if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = yes"; then
5722{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5723$as_echo "yes" >&6; }
5724:
5725CFLAGS="$CFLAGS -D_GNU_SOURCE"
5726else
5727if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = no"; then
5728{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5729$as_echo "no" >&6; }
5730#echo 'Test with flag is no!'
5731#cat conftest.c
5732#echo "$CC $CPPFLAGS $CFLAGS -D_GNU_SOURCE -D_FRSRESGID $ERRFLAG -c conftest.c 2>&1"
5733#echo `$CC $CPPFLAGS $CFLAGS -D_GNU_SOURCE -D_FRSRESGID $ERRFLAG -c conftest.c 2>&1`
5734#exit 1
5735:
5736
5737else
5738{ $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
5739$as_echo "failed" >&6; }
5740:
5741
5742fi
5743fi
5744
5745
5746
5747
5748
5749{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we need -D_POSIX_C_SOURCE=200112 as a flag for $CC" >&5
5750$as_echo_n "checking whether we need -D_POSIX_C_SOURCE=200112 as a flag for $CC... " >&6; }
5751cache=_D_POSIX_C_SOURCE_200112
5752if eval \${cv_prog_cc_flag_needed_$cache+:} false; then :
5753  $as_echo_n "(cached) " >&6
5754else
5755
5756echo '
5757#include "confdefs.h"
5758#ifdef HAVE_TIME_H
5759#include <time.h>
5760#endif
5761#include <netdb.h>
5762
5763int test() {
5764        int a = 0;
5765        char *t;
5766        time_t time = 0;
5767        char *buf = NULL;
5768	const char* str = NULL;
5769        t = ctime_r(&time, buf);
5770	str = gai_strerror(0);
5771	if(t && str)
5772		a = 0;
5773        return a;
5774}
5775' > conftest.c
5776echo 'void f(){}' >>conftest.c
5777if test -z "`$CC $CPPFLAGS $CFLAGS $ERRFLAG -c conftest.c 2>&1`"; then
5778eval "cv_prog_cc_flag_needed_$cache=no"
5779else
5780
5781if test -z "`$CC $CPPFLAGS $CFLAGS -D_POSIX_C_SOURCE=200112 $ERRFLAG -c conftest.c 2>&1`"; then
5782eval "cv_prog_cc_flag_needed_$cache=yes"
5783else
5784eval "cv_prog_cc_flag_needed_$cache=fail"
5785#echo 'Test with flag fails too!'
5786#cat conftest.c
5787#echo "$CC $CPPFLAGS $CFLAGS -D_POSIX_C_SOURCE=200112 $ERRFLAG -c conftest.c 2>&1"
5788#echo `$CC $CPPFLAGS $CFLAGS -D_POSIX_C_SOURCE=200112 $ERRFLAG -c conftest.c 2>&1`
5789#exit 1
5790fi
5791
5792fi
5793rm -f conftest conftest.c conftest.o
5794
5795fi
5796
5797if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = yes"; then
5798{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5799$as_echo "yes" >&6; }
5800:
5801CFLAGS="$CFLAGS -D_POSIX_C_SOURCE=200112"
5802else
5803if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = no"; then
5804{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5805$as_echo "no" >&6; }
5806#echo 'Test with flag is no!'
5807#cat conftest.c
5808#echo "$CC $CPPFLAGS $CFLAGS -D_POSIX_C_SOURCE=200112 $ERRFLAG -c conftest.c 2>&1"
5809#echo `$CC $CPPFLAGS $CFLAGS -D_POSIX_C_SOURCE=200112 $ERRFLAG -c conftest.c 2>&1`
5810#exit 1
5811:
5812
5813else
5814{ $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
5815$as_echo "failed" >&6; }
5816:
5817
5818fi
5819fi
5820
5821
5822
5823
5824
5825{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we need -D__EXTENSIONS__ as a flag for $CC" >&5
5826$as_echo_n "checking whether we need -D__EXTENSIONS__ as a flag for $CC... " >&6; }
5827cache=_D__EXTENSIONS__
5828if eval \${cv_prog_cc_flag_needed_$cache+:} false; then :
5829  $as_echo_n "(cached) " >&6
5830else
5831
5832echo '
5833#include "confdefs.h"
5834#include <stdlib.h>
5835#include <ctype.h>
5836#include <sys/time.h>
5837#ifdef HAVE_TIME_H
5838#include <time.h>
5839#endif
5840#include <unistd.h>
5841#ifdef HAVE_GETOPT_H
5842#include <getopt.h>
5843#endif
5844
5845int test() {
5846        int a;
5847        char **opts = NULL;
5848        struct timeval tv;
5849        tv.tv_usec = 10;
5850        srandom(32);
5851        a = getopt(2, opts, "a");
5852        a = isascii(32);
5853	if(tv.tv_usec)
5854		a = 0;
5855        return a;
5856}
5857' > conftest.c
5858echo 'void f(){}' >>conftest.c
5859if test -z "`$CC $CPPFLAGS $CFLAGS $ERRFLAG -c conftest.c 2>&1`"; then
5860eval "cv_prog_cc_flag_needed_$cache=no"
5861else
5862
5863if test -z "`$CC $CPPFLAGS $CFLAGS -D__EXTENSIONS__ $ERRFLAG -c conftest.c 2>&1`"; then
5864eval "cv_prog_cc_flag_needed_$cache=yes"
5865else
5866eval "cv_prog_cc_flag_needed_$cache=fail"
5867#echo 'Test with flag fails too!'
5868#cat conftest.c
5869#echo "$CC $CPPFLAGS $CFLAGS -D__EXTENSIONS__ $ERRFLAG -c conftest.c 2>&1"
5870#echo `$CC $CPPFLAGS $CFLAGS -D__EXTENSIONS__ $ERRFLAG -c conftest.c 2>&1`
5871#exit 1
5872fi
5873
5874fi
5875rm -f conftest conftest.c conftest.o
5876
5877fi
5878
5879if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = yes"; then
5880{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5881$as_echo "yes" >&6; }
5882:
5883CFLAGS="$CFLAGS -D__EXTENSIONS__"
5884else
5885if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = no"; then
5886{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5887$as_echo "no" >&6; }
5888#echo 'Test with flag is no!'
5889#cat conftest.c
5890#echo "$CC $CPPFLAGS $CFLAGS -D__EXTENSIONS__ $ERRFLAG -c conftest.c 2>&1"
5891#echo `$CC $CPPFLAGS $CFLAGS -D__EXTENSIONS__ $ERRFLAG -c conftest.c 2>&1`
5892#exit 1
5893:
5894
5895else
5896{ $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
5897$as_echo "failed" >&6; }
5898:
5899
5900fi
5901fi
5902
5903
5904
5905
5906# debug mode flags warnings
5907# Check whether --enable-checking was given.
5908if test "${enable_checking+set}" = set; then :
5909  enableval=$enable_checking;
5910fi
5911
5912# Check whether --enable-debug was given.
5913if test "${enable_debug+set}" = set; then :
5914  enableval=$enable_debug;
5915fi
5916
5917if test "$enable_debug" = "yes"; then debug_enabled="$enable_debug";
5918else debug_enabled="$enable_checking"; fi
5919
5920case "$debug_enabled" in
5921        yes)
5922
5923
5924{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -W" >&5
5925$as_echo_n "checking whether $CC supports -W... " >&6; }
5926cache=`echo W | sed 'y%.=/+-%___p_%'`
5927if eval \${cv_prog_cc_flag_$cache+:} false; then :
5928  $as_echo_n "(cached) " >&6
5929else
5930
5931echo 'void f(void){}' >conftest.c
5932if test -z "`$CC $CPPFLAGS $CFLAGS -W -c conftest.c 2>&1`"; then
5933eval "cv_prog_cc_flag_$cache=yes"
5934else
5935eval "cv_prog_cc_flag_$cache=no"
5936fi
5937rm -f conftest conftest.o conftest.c
5938
5939fi
5940
5941if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
5942{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5943$as_echo "yes" >&6; }
5944:
5945CFLAGS="$CFLAGS -W"
5946else
5947{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5948$as_echo "no" >&6; }
5949:
5950
5951fi
5952
5953
5954
5955{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wall" >&5
5956$as_echo_n "checking whether $CC supports -Wall... " >&6; }
5957cache=`echo Wall | sed 'y%.=/+-%___p_%'`
5958if eval \${cv_prog_cc_flag_$cache+:} false; then :
5959  $as_echo_n "(cached) " >&6
5960else
5961
5962echo 'void f(void){}' >conftest.c
5963if test -z "`$CC $CPPFLAGS $CFLAGS -Wall -c conftest.c 2>&1`"; then
5964eval "cv_prog_cc_flag_$cache=yes"
5965else
5966eval "cv_prog_cc_flag_$cache=no"
5967fi
5968rm -f conftest conftest.o conftest.c
5969
5970fi
5971
5972if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
5973{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5974$as_echo "yes" >&6; }
5975:
5976CFLAGS="$CFLAGS -Wall"
5977else
5978{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5979$as_echo "no" >&6; }
5980:
5981
5982fi
5983
5984
5985
5986{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wextra" >&5
5987$as_echo_n "checking whether $CC supports -Wextra... " >&6; }
5988cache=`echo Wextra | sed 'y%.=/+-%___p_%'`
5989if eval \${cv_prog_cc_flag_$cache+:} false; then :
5990  $as_echo_n "(cached) " >&6
5991else
5992
5993echo 'void f(void){}' >conftest.c
5994if test -z "`$CC $CPPFLAGS $CFLAGS -Wextra -c conftest.c 2>&1`"; then
5995eval "cv_prog_cc_flag_$cache=yes"
5996else
5997eval "cv_prog_cc_flag_$cache=no"
5998fi
5999rm -f conftest conftest.o conftest.c
6000
6001fi
6002
6003if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
6004{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6005$as_echo "yes" >&6; }
6006:
6007CFLAGS="$CFLAGS -Wextra"
6008else
6009{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6010$as_echo "no" >&6; }
6011:
6012
6013fi
6014
6015
6016
6017{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wdeclaration-after-statement" >&5
6018$as_echo_n "checking whether $CC supports -Wdeclaration-after-statement... " >&6; }
6019cache=`echo Wdeclaration-after-statement | sed 'y%.=/+-%___p_%'`
6020if eval \${cv_prog_cc_flag_$cache+:} false; then :
6021  $as_echo_n "(cached) " >&6
6022else
6023
6024echo 'void f(void){}' >conftest.c
6025if test -z "`$CC $CPPFLAGS $CFLAGS -Wdeclaration-after-statement -c conftest.c 2>&1`"; then
6026eval "cv_prog_cc_flag_$cache=yes"
6027else
6028eval "cv_prog_cc_flag_$cache=no"
6029fi
6030rm -f conftest conftest.o conftest.c
6031
6032fi
6033
6034if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
6035{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6036$as_echo "yes" >&6; }
6037:
6038CFLAGS="$CFLAGS -Wdeclaration-after-statement"
6039else
6040{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6041$as_echo "no" >&6; }
6042:
6043
6044fi
6045
6046
6047$as_echo "#define UNBOUND_DEBUG /**/" >>confdefs.h
6048
6049		;;
6050	no|*)
6051		# nothing to do.
6052		;;
6053esac
6054if test "$default_cflags" = "yes"; then
6055	# only when CFLAGS was "" at the start, if the users wants to
6056	# override we shouldn't add default cflags, because they wouldn't
6057	# be able to turn off these options and set the CFLAGS wanted.
6058
6059    # Check whether --enable-flto was given.
6060if test "${enable_flto+set}" = set; then :
6061  enableval=$enable_flto;
6062fi
6063
6064    if test "x$enable_flto" != "xno"; then :
6065
6066        { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -flto" >&5
6067$as_echo_n "checking if $CC supports -flto... " >&6; }
6068        BAKCFLAGS="$CFLAGS"
6069        CFLAGS="$CFLAGS -flto"
6070        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6071/* end confdefs.h.  */
6072
6073int
6074main ()
6075{
6076
6077  ;
6078  return 0;
6079}
6080_ACEOF
6081if ac_fn_c_try_link "$LINENO"; then :
6082
6083            if $CC $CFLAGS -o conftest conftest.c 2>&1 | $GREP -e "warning: no debug symbols in executable" -e "warning: object" >/dev/null; then
6084                CFLAGS="$BAKCFLAGS"
6085                { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6086$as_echo "no" >&6; }
6087            else
6088                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6089$as_echo "yes" >&6; }
6090            fi
6091            rm -f conftest conftest.c conftest.o
6092
6093else
6094  CFLAGS="$BAKCFLAGS" ; { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6095$as_echo "no" >&6; }
6096fi
6097rm -f core conftest.err conftest.$ac_objext \
6098    conftest$ac_exeext conftest.$ac_ext
6099
6100fi
6101
6102
6103    # Check whether --enable-pie was given.
6104if test "${enable_pie+set}" = set; then :
6105  enableval=$enable_pie;
6106fi
6107
6108    if test "x$enable_pie" = "xyes"; then :
6109
6110	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports PIE" >&5
6111$as_echo_n "checking if $CC supports PIE... " >&6; }
6112	BAKLDFLAGS="$LDFLAGS"
6113	BAKCFLAGS="$CFLAGS"
6114	LDFLAGS="$LDFLAGS -pie"
6115	CFLAGS="$CFLAGS -fPIE"
6116	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6117/* end confdefs.h.  */
6118
6119int
6120main ()
6121{
6122
6123  ;
6124  return 0;
6125}
6126_ACEOF
6127if ac_fn_c_try_link "$LINENO"; then :
6128
6129	    if $CC $CFLAGS $LDFLAGS -o conftest conftest.c 2>&1 | grep "warning: no debug symbols in executable" >/dev/null; then
6130		LDFLAGS="$BAKLDFLAGS"
6131		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6132$as_echo "no" >&6; }
6133	    else
6134		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6135$as_echo "yes" >&6; }
6136	    fi
6137	    rm -f conftest conftest.c conftest.o
6138
6139else
6140  LDFLAGS="$BAKLDFLAGS" ; CFLAGS="$BAKCFLAGS" ; { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6141$as_echo "no" >&6; }
6142fi
6143rm -f core conftest.err conftest.$ac_objext \
6144    conftest$ac_exeext conftest.$ac_ext
6145
6146fi
6147
6148
6149    # Check whether --enable-relro_now was given.
6150if test "${enable_relro_now+set}" = set; then :
6151  enableval=$enable_relro_now;
6152fi
6153
6154    if test "x$enable_relro_now" = "xyes"; then :
6155
6156	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wl,-z,relro,-z,now" >&5
6157$as_echo_n "checking if $CC supports -Wl,-z,relro,-z,now... " >&6; }
6158	BAKLDFLAGS="$LDFLAGS"
6159	LDFLAGS="$LDFLAGS -Wl,-z,relro,-z,now"
6160	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6161/* end confdefs.h.  */
6162
6163int
6164main ()
6165{
6166
6167  ;
6168  return 0;
6169}
6170_ACEOF
6171if ac_fn_c_try_link "$LINENO"; then :
6172
6173	    if $CC $CFLAGS $LDFLAGS -o conftest conftest.c 2>&1 | grep "warning: no debug symbols in executable" >/dev/null; then
6174		LDFLAGS="$BAKLDFLAGS"
6175		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6176$as_echo "no" >&6; }
6177	    else
6178		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6179$as_echo "yes" >&6; }
6180	    fi
6181	    rm -f conftest conftest.c conftest.o
6182
6183else
6184  LDFLAGS="$BAKLDFLAGS" ; { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6185$as_echo "no" >&6; }
6186fi
6187rm -f core conftest.err conftest.$ac_objext \
6188    conftest$ac_exeext conftest.$ac_ext
6189
6190fi
6191
6192fi
6193
6194{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
6195$as_echo_n "checking for inline... " >&6; }
6196if ${ac_cv_c_inline+:} false; then :
6197  $as_echo_n "(cached) " >&6
6198else
6199  ac_cv_c_inline=no
6200for ac_kw in inline __inline__ __inline; do
6201  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6202/* end confdefs.h.  */
6203#ifndef __cplusplus
6204typedef int foo_t;
6205static $ac_kw foo_t static_foo () {return 0; }
6206$ac_kw foo_t foo () {return 0; }
6207#endif
6208
6209_ACEOF
6210if ac_fn_c_try_compile "$LINENO"; then :
6211  ac_cv_c_inline=$ac_kw
6212fi
6213rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6214  test "$ac_cv_c_inline" != no && break
6215done
6216
6217fi
6218{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
6219$as_echo "$ac_cv_c_inline" >&6; }
6220
6221case $ac_cv_c_inline in
6222  inline | yes) ;;
6223  *)
6224    case $ac_cv_c_inline in
6225      no) ac_val=;;
6226      *) ac_val=$ac_cv_c_inline;;
6227    esac
6228    cat >>confdefs.h <<_ACEOF
6229#ifndef __cplusplus
6230#define inline $ac_val
6231#endif
6232_ACEOF
6233    ;;
6234esac
6235
6236
6237{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler (${CC-cc}) accepts the \"format\" attribute" >&5
6238$as_echo_n "checking whether the C compiler (${CC-cc}) accepts the \"format\" attribute... " >&6; }
6239if ${ac_cv_c_format_attribute+:} false; then :
6240  $as_echo_n "(cached) " >&6
6241else
6242  ac_cv_c_format_attribute=no
6243cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6244/* end confdefs.h.  */
6245#include <stdio.h>
6246void f (char *format, ...) __attribute__ ((format (printf, 1, 2)));
6247void (*pf) (char *format, ...) __attribute__ ((format (printf, 1, 2)));
6248
6249int
6250main ()
6251{
6252
6253   f ("%s", "str");
6254
6255  ;
6256  return 0;
6257}
6258_ACEOF
6259if ac_fn_c_try_compile "$LINENO"; then :
6260  ac_cv_c_format_attribute="yes"
6261else
6262  ac_cv_c_format_attribute="no"
6263fi
6264rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6265
6266fi
6267
6268
6269{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_format_attribute" >&5
6270$as_echo "$ac_cv_c_format_attribute" >&6; }
6271if test $ac_cv_c_format_attribute = yes; then
6272
6273$as_echo "#define HAVE_ATTR_FORMAT 1" >>confdefs.h
6274
6275fi
6276
6277
6278{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler (${CC-cc}) accepts the \"unused\" attribute" >&5
6279$as_echo_n "checking whether the C compiler (${CC-cc}) accepts the \"unused\" attribute... " >&6; }
6280if ${ac_cv_c_unused_attribute+:} false; then :
6281  $as_echo_n "(cached) " >&6
6282else
6283  ac_cv_c_unused_attribute=no
6284cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6285/* end confdefs.h.  */
6286#include <stdio.h>
6287void f (char *u __attribute__((unused)));
6288
6289int
6290main ()
6291{
6292
6293   f ("x");
6294
6295  ;
6296  return 0;
6297}
6298_ACEOF
6299if ac_fn_c_try_compile "$LINENO"; then :
6300  ac_cv_c_unused_attribute="yes"
6301else
6302  ac_cv_c_unused_attribute="no"
6303fi
6304rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6305
6306fi
6307
6308
6309
6310
6311{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_unused_attribute" >&5
6312$as_echo "$ac_cv_c_unused_attribute" >&6; }
6313if test $ac_cv_c_unused_attribute = yes; then
6314
6315$as_echo "#define HAVE_ATTR_UNUSED 1" >>confdefs.h
6316
6317fi
6318
6319
6320
6321
6322{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler (${CC-cc}) accepts the \"weak\" attribute" >&5
6323$as_echo_n "checking whether the C compiler (${CC-cc}) accepts the \"weak\" attribute... " >&6; }
6324if ${ac_cv_c_weak_attribute+:} false; then :
6325  $as_echo_n "(cached) " >&6
6326else
6327  ac_cv_c_weak_attribute=no
6328cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6329/* end confdefs.h.  */
6330 #include <stdio.h>
6331__attribute__((weak)) void f(int x) { printf("%d", x); }
6332
6333int
6334main ()
6335{
6336
6337   f(1);
6338
6339  ;
6340  return 0;
6341}
6342_ACEOF
6343if ac_fn_c_try_compile "$LINENO"; then :
6344  ac_cv_c_weak_attribute="yes"
6345else
6346  ac_cv_c_weak_attribute="no"
6347fi
6348rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6349
6350fi
6351
6352
6353{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_weak_attribute" >&5
6354$as_echo "$ac_cv_c_weak_attribute" >&6; }
6355if test $ac_cv_c_weak_attribute = yes; then
6356
6357$as_echo "#define HAVE_ATTR_WEAK 1" >>confdefs.h
6358
6359
6360$as_echo "#define ATTR_WEAK __attribute__((weak))" >>confdefs.h
6361
6362fi
6363
6364
6365
6366
6367{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler (${CC-cc}) accepts the \"noreturn\" attribute" >&5
6368$as_echo_n "checking whether the C compiler (${CC-cc}) accepts the \"noreturn\" attribute... " >&6; }
6369if ${ac_cv_c_noreturn_attribute+:} false; then :
6370  $as_echo_n "(cached) " >&6
6371else
6372  ac_cv_c_noreturn_attribute=no
6373cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6374/* end confdefs.h.  */
6375 #include <stdio.h>
6376__attribute__((noreturn)) void f(int x) { printf("%d", x); }
6377
6378int
6379main ()
6380{
6381
6382   f(1);
6383
6384  ;
6385  return 0;
6386}
6387_ACEOF
6388if ac_fn_c_try_compile "$LINENO"; then :
6389  ac_cv_c_noreturn_attribute="yes"
6390else
6391  ac_cv_c_noreturn_attribute="no"
6392fi
6393rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6394
6395fi
6396
6397
6398{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_noreturn_attribute" >&5
6399$as_echo "$ac_cv_c_noreturn_attribute" >&6; }
6400if test $ac_cv_c_noreturn_attribute = yes; then
6401
6402$as_echo "#define HAVE_ATTR_NORETURN 1" >>confdefs.h
6403
6404
6405$as_echo "#define ATTR_NORETURN __attribute__((__noreturn__))" >>confdefs.h
6406
6407fi
6408
6409
6410if test "$srcdir" != "."; then
6411	CPPFLAGS="$CPPFLAGS -I$srcdir"
6412fi
6413
6414
6415
6416
6417
6418for ac_prog in flex lex
6419do
6420  # Extract the first word of "$ac_prog", so it can be a program name with args.
6421set dummy $ac_prog; ac_word=$2
6422{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6423$as_echo_n "checking for $ac_word... " >&6; }
6424if ${ac_cv_prog_LEX+:} false; then :
6425  $as_echo_n "(cached) " >&6
6426else
6427  if test -n "$LEX"; then
6428  ac_cv_prog_LEX="$LEX" # Let the user override the test.
6429else
6430as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6431for as_dir in $PATH
6432do
6433  IFS=$as_save_IFS
6434  test -z "$as_dir" && as_dir=.
6435    for ac_exec_ext in '' $ac_executable_extensions; do
6436  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6437    ac_cv_prog_LEX="$ac_prog"
6438    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6439    break 2
6440  fi
6441done
6442  done
6443IFS=$as_save_IFS
6444
6445fi
6446fi
6447LEX=$ac_cv_prog_LEX
6448if test -n "$LEX"; then
6449  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LEX" >&5
6450$as_echo "$LEX" >&6; }
6451else
6452  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6453$as_echo "no" >&6; }
6454fi
6455
6456
6457  test -n "$LEX" && break
6458done
6459test -n "$LEX" || LEX=":"
6460
6461if test "x$LEX" != "x:"; then
6462  cat >conftest.l <<_ACEOF
6463%%
6464a { ECHO; }
6465b { REJECT; }
6466c { yymore (); }
6467d { yyless (1); }
6468e { /* IRIX 6.5 flex 2.5.4 underquotes its yyless argument.  */
6469    yyless ((input () != 0)); }
6470f { unput (yytext[0]); }
6471. { BEGIN INITIAL; }
6472%%
6473#ifdef YYTEXT_POINTER
6474extern char *yytext;
6475#endif
6476int
6477main (void)
6478{
6479  return ! yylex () + ! yywrap ();
6480}
6481_ACEOF
6482{ { ac_try="$LEX conftest.l"
6483case "(($ac_try" in
6484  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6485  *) ac_try_echo=$ac_try;;
6486esac
6487eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
6488$as_echo "$ac_try_echo"; } >&5
6489  (eval "$LEX conftest.l") 2>&5
6490  ac_status=$?
6491  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
6492  test $ac_status = 0; }
6493{ $as_echo "$as_me:${as_lineno-$LINENO}: checking lex output file root" >&5
6494$as_echo_n "checking lex output file root... " >&6; }
6495if ${ac_cv_prog_lex_root+:} false; then :
6496  $as_echo_n "(cached) " >&6
6497else
6498
6499if test -f lex.yy.c; then
6500  ac_cv_prog_lex_root=lex.yy
6501elif test -f lexyy.c; then
6502  ac_cv_prog_lex_root=lexyy
6503else
6504  as_fn_error $? "cannot find output from $LEX; giving up" "$LINENO" 5
6505fi
6506fi
6507{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_lex_root" >&5
6508$as_echo "$ac_cv_prog_lex_root" >&6; }
6509LEX_OUTPUT_ROOT=$ac_cv_prog_lex_root
6510
6511if test -z "${LEXLIB+set}"; then
6512  { $as_echo "$as_me:${as_lineno-$LINENO}: checking lex library" >&5
6513$as_echo_n "checking lex library... " >&6; }
6514if ${ac_cv_lib_lex+:} false; then :
6515  $as_echo_n "(cached) " >&6
6516else
6517
6518    ac_save_LIBS=$LIBS
6519    ac_cv_lib_lex='none needed'
6520    for ac_lib in '' -lfl -ll; do
6521      LIBS="$ac_lib $ac_save_LIBS"
6522      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6523/* end confdefs.h.  */
6524`cat $LEX_OUTPUT_ROOT.c`
6525_ACEOF
6526if ac_fn_c_try_link "$LINENO"; then :
6527  ac_cv_lib_lex=$ac_lib
6528fi
6529rm -f core conftest.err conftest.$ac_objext \
6530    conftest$ac_exeext conftest.$ac_ext
6531      test "$ac_cv_lib_lex" != 'none needed' && break
6532    done
6533    LIBS=$ac_save_LIBS
6534
6535fi
6536{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_lex" >&5
6537$as_echo "$ac_cv_lib_lex" >&6; }
6538  test "$ac_cv_lib_lex" != 'none needed' && LEXLIB=$ac_cv_lib_lex
6539fi
6540
6541
6542{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether yytext is a pointer" >&5
6543$as_echo_n "checking whether yytext is a pointer... " >&6; }
6544if ${ac_cv_prog_lex_yytext_pointer+:} false; then :
6545  $as_echo_n "(cached) " >&6
6546else
6547  # POSIX says lex can declare yytext either as a pointer or an array; the
6548# default is implementation-dependent.  Figure out which it is, since
6549# not all implementations provide the %pointer and %array declarations.
6550ac_cv_prog_lex_yytext_pointer=no
6551ac_save_LIBS=$LIBS
6552LIBS="$LEXLIB $ac_save_LIBS"
6553cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6554/* end confdefs.h.  */
6555
6556  #define YYTEXT_POINTER 1
6557`cat $LEX_OUTPUT_ROOT.c`
6558_ACEOF
6559if ac_fn_c_try_link "$LINENO"; then :
6560  ac_cv_prog_lex_yytext_pointer=yes
6561fi
6562rm -f core conftest.err conftest.$ac_objext \
6563    conftest$ac_exeext conftest.$ac_ext
6564LIBS=$ac_save_LIBS
6565
6566fi
6567{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_lex_yytext_pointer" >&5
6568$as_echo "$ac_cv_prog_lex_yytext_pointer" >&6; }
6569if test $ac_cv_prog_lex_yytext_pointer = yes; then
6570
6571$as_echo "#define YYTEXT_POINTER 1" >>confdefs.h
6572
6573fi
6574rm -f conftest.l $LEX_OUTPUT_ROOT.c
6575
6576fi
6577if test "$LEX" != "" -a "$LEX" != ":"; then
6578
6579	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for yylex_destroy" >&5
6580$as_echo_n "checking for yylex_destroy... " >&6; }
6581	if echo %% | $LEX -t 2>&1 | grep yylex_destroy >/dev/null 2>&1; then
6582
6583$as_echo "#define LEX_HAS_YYLEX_DESTROY 1" >>confdefs.h
6584
6585		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6586$as_echo "yes" >&6; }
6587	else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6588$as_echo "no" >&6; };
6589		LEX=":"
6590	fi
6591
6592fi
6593if test "$LEX" != "" -a "$LEX" != ":"; then
6594
6595	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lex %option" >&5
6596$as_echo_n "checking for lex %option... " >&6; }
6597	if cat <<EOF | $LEX -t 2>&1 | grep yy_delete_buffer >/dev/null 2>&1; then
6598%option nounput
6599%%
6600EOF
6601		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6602$as_echo "yes" >&6; }
6603	else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6604$as_echo "no" >&6; };
6605		LEX=":"
6606	fi
6607
6608fi
6609for ac_prog in 'bison -y' byacc
6610do
6611  # Extract the first word of "$ac_prog", so it can be a program name with args.
6612set dummy $ac_prog; ac_word=$2
6613{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6614$as_echo_n "checking for $ac_word... " >&6; }
6615if ${ac_cv_prog_YACC+:} false; then :
6616  $as_echo_n "(cached) " >&6
6617else
6618  if test -n "$YACC"; then
6619  ac_cv_prog_YACC="$YACC" # Let the user override the test.
6620else
6621as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6622for as_dir in $PATH
6623do
6624  IFS=$as_save_IFS
6625  test -z "$as_dir" && as_dir=.
6626    for ac_exec_ext in '' $ac_executable_extensions; do
6627  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6628    ac_cv_prog_YACC="$ac_prog"
6629    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6630    break 2
6631  fi
6632done
6633  done
6634IFS=$as_save_IFS
6635
6636fi
6637fi
6638YACC=$ac_cv_prog_YACC
6639if test -n "$YACC"; then
6640  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $YACC" >&5
6641$as_echo "$YACC" >&6; }
6642else
6643  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6644$as_echo "no" >&6; }
6645fi
6646
6647
6648  test -n "$YACC" && break
6649done
6650test -n "$YACC" || YACC="yacc"
6651
6652# Extract the first word of "doxygen", so it can be a program name with args.
6653set dummy doxygen; ac_word=$2
6654{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6655$as_echo_n "checking for $ac_word... " >&6; }
6656if ${ac_cv_prog_doxygen+:} false; then :
6657  $as_echo_n "(cached) " >&6
6658else
6659  if test -n "$doxygen"; then
6660  ac_cv_prog_doxygen="$doxygen" # Let the user override the test.
6661else
6662as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6663for as_dir in $PATH
6664do
6665  IFS=$as_save_IFS
6666  test -z "$as_dir" && as_dir=.
6667    for ac_exec_ext in '' $ac_executable_extensions; do
6668  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6669    ac_cv_prog_doxygen="doxygen"
6670    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6671    break 2
6672  fi
6673done
6674  done
6675IFS=$as_save_IFS
6676
6677fi
6678fi
6679doxygen=$ac_cv_prog_doxygen
6680if test -n "$doxygen"; then
6681  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $doxygen" >&5
6682$as_echo "$doxygen" >&6; }
6683else
6684  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6685$as_echo "no" >&6; }
6686fi
6687
6688
6689if test -n "$ac_tool_prefix"; then
6690  # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
6691set dummy ${ac_tool_prefix}strip; ac_word=$2
6692{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6693$as_echo_n "checking for $ac_word... " >&6; }
6694if ${ac_cv_prog_STRIP+:} false; then :
6695  $as_echo_n "(cached) " >&6
6696else
6697  if test -n "$STRIP"; then
6698  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
6699else
6700as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6701for as_dir in $PATH
6702do
6703  IFS=$as_save_IFS
6704  test -z "$as_dir" && as_dir=.
6705    for ac_exec_ext in '' $ac_executable_extensions; do
6706  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6707    ac_cv_prog_STRIP="${ac_tool_prefix}strip"
6708    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6709    break 2
6710  fi
6711done
6712  done
6713IFS=$as_save_IFS
6714
6715fi
6716fi
6717STRIP=$ac_cv_prog_STRIP
6718if test -n "$STRIP"; then
6719  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
6720$as_echo "$STRIP" >&6; }
6721else
6722  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6723$as_echo "no" >&6; }
6724fi
6725
6726
6727fi
6728if test -z "$ac_cv_prog_STRIP"; then
6729  ac_ct_STRIP=$STRIP
6730  # Extract the first word of "strip", so it can be a program name with args.
6731set dummy strip; ac_word=$2
6732{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6733$as_echo_n "checking for $ac_word... " >&6; }
6734if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
6735  $as_echo_n "(cached) " >&6
6736else
6737  if test -n "$ac_ct_STRIP"; then
6738  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
6739else
6740as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6741for as_dir in $PATH
6742do
6743  IFS=$as_save_IFS
6744  test -z "$as_dir" && as_dir=.
6745    for ac_exec_ext in '' $ac_executable_extensions; do
6746  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6747    ac_cv_prog_ac_ct_STRIP="strip"
6748    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6749    break 2
6750  fi
6751done
6752  done
6753IFS=$as_save_IFS
6754
6755fi
6756fi
6757ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
6758if test -n "$ac_ct_STRIP"; then
6759  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
6760$as_echo "$ac_ct_STRIP" >&6; }
6761else
6762  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6763$as_echo "no" >&6; }
6764fi
6765
6766  if test "x$ac_ct_STRIP" = x; then
6767    STRIP=""
6768  else
6769    case $cross_compiling:$ac_tool_warned in
6770yes:)
6771{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6772$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6773ac_tool_warned=yes ;;
6774esac
6775    STRIP=$ac_ct_STRIP
6776  fi
6777else
6778  STRIP="$ac_cv_prog_STRIP"
6779fi
6780
6781ac_aux_dir=
6782for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
6783  if test -f "$ac_dir/install-sh"; then
6784    ac_aux_dir=$ac_dir
6785    ac_install_sh="$ac_aux_dir/install-sh -c"
6786    break
6787  elif test -f "$ac_dir/install.sh"; then
6788    ac_aux_dir=$ac_dir
6789    ac_install_sh="$ac_aux_dir/install.sh -c"
6790    break
6791  elif test -f "$ac_dir/shtool"; then
6792    ac_aux_dir=$ac_dir
6793    ac_install_sh="$ac_aux_dir/shtool install -c"
6794    break
6795  fi
6796done
6797if test -z "$ac_aux_dir"; then
6798  as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
6799fi
6800
6801# These three variables are undocumented and unsupported,
6802# and are intended to be withdrawn in a future Autoconf release.
6803# They can cause serious problems if a builder's source tree is in a directory
6804# whose full name contains unusual characters.
6805ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
6806ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
6807ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
6808
6809
6810# Make sure we can run config.sub.
6811$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
6812  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
6813
6814{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
6815$as_echo_n "checking build system type... " >&6; }
6816if ${ac_cv_build+:} false; then :
6817  $as_echo_n "(cached) " >&6
6818else
6819  ac_build_alias=$build_alias
6820test "x$ac_build_alias" = x &&
6821  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
6822test "x$ac_build_alias" = x &&
6823  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
6824ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
6825  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
6826
6827fi
6828{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
6829$as_echo "$ac_cv_build" >&6; }
6830case $ac_cv_build in
6831*-*-*) ;;
6832*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
6833esac
6834build=$ac_cv_build
6835ac_save_IFS=$IFS; IFS='-'
6836set x $ac_cv_build
6837shift
6838build_cpu=$1
6839build_vendor=$2
6840shift; shift
6841# Remember, the first character of IFS is used to create $*,
6842# except with old shells:
6843build_os=$*
6844IFS=$ac_save_IFS
6845case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
6846
6847
6848{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
6849$as_echo_n "checking host system type... " >&6; }
6850if ${ac_cv_host+:} false; then :
6851  $as_echo_n "(cached) " >&6
6852else
6853  if test "x$host_alias" = x; then
6854  ac_cv_host=$ac_cv_build
6855else
6856  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
6857    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
6858fi
6859
6860fi
6861{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
6862$as_echo "$ac_cv_host" >&6; }
6863case $ac_cv_host in
6864*-*-*) ;;
6865*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
6866esac
6867host=$ac_cv_host
6868ac_save_IFS=$IFS; IFS='-'
6869set x $ac_cv_host
6870shift
6871host_cpu=$1
6872host_vendor=$2
6873shift; shift
6874# Remember, the first character of IFS is used to create $*,
6875# except with old shells:
6876host_os=$*
6877IFS=$ac_save_IFS
6878case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
6879
6880
6881
6882# skip these tests, we do not need them.
6883
6884
6885
6886
6887
6888
6889
6890
6891# always use ./libtool unless override from commandline (libtool=mylibtool)
6892if test -z "$libtool"; then
6893	libtool="./libtool"
6894fi
6895
6896# avoid libtool max commandline length test on systems that fork slowly.
6897
6898if echo "$host_os" | grep "sunos4" >/dev/null; then
6899	lt_cv_sys_max_cmd_len=32750;
6900fi
6901if test -n "$ac_tool_prefix"; then
6902  # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
6903set dummy ${ac_tool_prefix}ar; ac_word=$2
6904{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6905$as_echo_n "checking for $ac_word... " >&6; }
6906if ${ac_cv_path_AR+:} false; then :
6907  $as_echo_n "(cached) " >&6
6908else
6909  case $AR in
6910  [\\/]* | ?:[\\/]*)
6911  ac_cv_path_AR="$AR" # Let the user override the test with a path.
6912  ;;
6913  *)
6914  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6915for as_dir in $PATH
6916do
6917  IFS=$as_save_IFS
6918  test -z "$as_dir" && as_dir=.
6919    for ac_exec_ext in '' $ac_executable_extensions; do
6920  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6921    ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
6922    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6923    break 2
6924  fi
6925done
6926  done
6927IFS=$as_save_IFS
6928
6929  ;;
6930esac
6931fi
6932AR=$ac_cv_path_AR
6933if test -n "$AR"; then
6934  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
6935$as_echo "$AR" >&6; }
6936else
6937  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6938$as_echo "no" >&6; }
6939fi
6940
6941
6942fi
6943if test -z "$ac_cv_path_AR"; then
6944  ac_pt_AR=$AR
6945  # Extract the first word of "ar", so it can be a program name with args.
6946set dummy ar; ac_word=$2
6947{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6948$as_echo_n "checking for $ac_word... " >&6; }
6949if ${ac_cv_path_ac_pt_AR+:} false; then :
6950  $as_echo_n "(cached) " >&6
6951else
6952  case $ac_pt_AR in
6953  [\\/]* | ?:[\\/]*)
6954  ac_cv_path_ac_pt_AR="$ac_pt_AR" # Let the user override the test with a path.
6955  ;;
6956  *)
6957  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6958for as_dir in $PATH
6959do
6960  IFS=$as_save_IFS
6961  test -z "$as_dir" && as_dir=.
6962    for ac_exec_ext in '' $ac_executable_extensions; do
6963  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6964    ac_cv_path_ac_pt_AR="$as_dir/$ac_word$ac_exec_ext"
6965    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6966    break 2
6967  fi
6968done
6969  done
6970IFS=$as_save_IFS
6971
6972  ;;
6973esac
6974fi
6975ac_pt_AR=$ac_cv_path_ac_pt_AR
6976if test -n "$ac_pt_AR"; then
6977  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_AR" >&5
6978$as_echo "$ac_pt_AR" >&6; }
6979else
6980  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6981$as_echo "no" >&6; }
6982fi
6983
6984  if test "x$ac_pt_AR" = x; then
6985    AR="false"
6986  else
6987    case $cross_compiling:$ac_tool_warned in
6988yes:)
6989{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6990$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6991ac_tool_warned=yes ;;
6992esac
6993    AR=$ac_pt_AR
6994  fi
6995else
6996  AR="$ac_cv_path_AR"
6997fi
6998
6999if test $AR = false; then
7000	as_fn_error $? "Cannot find 'ar', please extend PATH to include it" "$LINENO" 5
7001fi
7002
7003case `pwd` in
7004  *\ * | *\	*)
7005    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5
7006$as_echo "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;;
7007esac
7008
7009
7010
7011macro_version='2.4.6'
7012macro_revision='2.4.6'
7013
7014
7015
7016
7017
7018
7019
7020
7021
7022
7023
7024
7025
7026ltmain=$ac_aux_dir/ltmain.sh
7027
7028# Backslashify metacharacters that are still active within
7029# double-quoted strings.
7030sed_quote_subst='s/\(["`$\\]\)/\\\1/g'
7031
7032# Same as above, but do not quote variable references.
7033double_quote_subst='s/\(["`\\]\)/\\\1/g'
7034
7035# Sed substitution to delay expansion of an escaped shell variable in a
7036# double_quote_subst'ed string.
7037delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
7038
7039# Sed substitution to delay expansion of an escaped single quote.
7040delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
7041
7042# Sed substitution to avoid accidental globbing in evaled expressions
7043no_glob_subst='s/\*/\\\*/g'
7044
7045ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
7046ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
7047ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
7048
7049{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5
7050$as_echo_n "checking how to print strings... " >&6; }
7051# Test print first, because it will be a builtin if present.
7052if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \
7053   test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
7054  ECHO='print -r --'
7055elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
7056  ECHO='printf %s\n'
7057else
7058  # Use this function as a fallback that always works.
7059  func_fallback_echo ()
7060  {
7061    eval 'cat <<_LTECHO_EOF
7062$1
7063_LTECHO_EOF'
7064  }
7065  ECHO='func_fallback_echo'
7066fi
7067
7068# func_echo_all arg...
7069# Invoke $ECHO with all args, space-separated.
7070func_echo_all ()
7071{
7072    $ECHO ""
7073}
7074
7075case $ECHO in
7076  printf*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: printf" >&5
7077$as_echo "printf" >&6; } ;;
7078  print*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: print -r" >&5
7079$as_echo "print -r" >&6; } ;;
7080  *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: cat" >&5
7081$as_echo "cat" >&6; } ;;
7082esac
7083
7084
7085
7086
7087
7088
7089
7090
7091
7092
7093
7094
7095
7096
7097{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
7098$as_echo_n "checking for a sed that does not truncate output... " >&6; }
7099if ${ac_cv_path_SED+:} false; then :
7100  $as_echo_n "(cached) " >&6
7101else
7102            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
7103     for ac_i in 1 2 3 4 5 6 7; do
7104       ac_script="$ac_script$as_nl$ac_script"
7105     done
7106     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
7107     { ac_script=; unset ac_script;}
7108     if test -z "$SED"; then
7109  ac_path_SED_found=false
7110  # Loop through the user's path and test for each of PROGNAME-LIST
7111  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7112for as_dir in $PATH
7113do
7114  IFS=$as_save_IFS
7115  test -z "$as_dir" && as_dir=.
7116    for ac_prog in sed gsed; do
7117    for ac_exec_ext in '' $ac_executable_extensions; do
7118      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
7119      as_fn_executable_p "$ac_path_SED" || continue
7120# Check for GNU ac_path_SED and select it if it is found.
7121  # Check for GNU $ac_path_SED
7122case `"$ac_path_SED" --version 2>&1` in
7123*GNU*)
7124  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
7125*)
7126  ac_count=0
7127  $as_echo_n 0123456789 >"conftest.in"
7128  while :
7129  do
7130    cat "conftest.in" "conftest.in" >"conftest.tmp"
7131    mv "conftest.tmp" "conftest.in"
7132    cp "conftest.in" "conftest.nl"
7133    $as_echo '' >> "conftest.nl"
7134    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
7135    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
7136    as_fn_arith $ac_count + 1 && ac_count=$as_val
7137    if test $ac_count -gt ${ac_path_SED_max-0}; then
7138      # Best one so far, save it but keep looking for a better one
7139      ac_cv_path_SED="$ac_path_SED"
7140      ac_path_SED_max=$ac_count
7141    fi
7142    # 10*(2^10) chars as input seems more than enough
7143    test $ac_count -gt 10 && break
7144  done
7145  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
7146esac
7147
7148      $ac_path_SED_found && break 3
7149    done
7150  done
7151  done
7152IFS=$as_save_IFS
7153  if test -z "$ac_cv_path_SED"; then
7154    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
7155  fi
7156else
7157  ac_cv_path_SED=$SED
7158fi
7159
7160fi
7161{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
7162$as_echo "$ac_cv_path_SED" >&6; }
7163 SED="$ac_cv_path_SED"
7164  rm -f conftest.sed
7165
7166test -z "$SED" && SED=sed
7167Xsed="$SED -e 1s/^X//"
7168
7169
7170
7171
7172
7173
7174
7175
7176
7177
7178
7179{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
7180$as_echo_n "checking for fgrep... " >&6; }
7181if ${ac_cv_path_FGREP+:} false; then :
7182  $as_echo_n "(cached) " >&6
7183else
7184  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
7185   then ac_cv_path_FGREP="$GREP -F"
7186   else
7187     if test -z "$FGREP"; then
7188  ac_path_FGREP_found=false
7189  # Loop through the user's path and test for each of PROGNAME-LIST
7190  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7191for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
7192do
7193  IFS=$as_save_IFS
7194  test -z "$as_dir" && as_dir=.
7195    for ac_prog in fgrep; do
7196    for ac_exec_ext in '' $ac_executable_extensions; do
7197      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
7198      as_fn_executable_p "$ac_path_FGREP" || continue
7199# Check for GNU ac_path_FGREP and select it if it is found.
7200  # Check for GNU $ac_path_FGREP
7201case `"$ac_path_FGREP" --version 2>&1` in
7202*GNU*)
7203  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
7204*)
7205  ac_count=0
7206  $as_echo_n 0123456789 >"conftest.in"
7207  while :
7208  do
7209    cat "conftest.in" "conftest.in" >"conftest.tmp"
7210    mv "conftest.tmp" "conftest.in"
7211    cp "conftest.in" "conftest.nl"
7212    $as_echo 'FGREP' >> "conftest.nl"
7213    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
7214    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
7215    as_fn_arith $ac_count + 1 && ac_count=$as_val
7216    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
7217      # Best one so far, save it but keep looking for a better one
7218      ac_cv_path_FGREP="$ac_path_FGREP"
7219      ac_path_FGREP_max=$ac_count
7220    fi
7221    # 10*(2^10) chars as input seems more than enough
7222    test $ac_count -gt 10 && break
7223  done
7224  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
7225esac
7226
7227      $ac_path_FGREP_found && break 3
7228    done
7229  done
7230  done
7231IFS=$as_save_IFS
7232  if test -z "$ac_cv_path_FGREP"; then
7233    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
7234  fi
7235else
7236  ac_cv_path_FGREP=$FGREP
7237fi
7238
7239   fi
7240fi
7241{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
7242$as_echo "$ac_cv_path_FGREP" >&6; }
7243 FGREP="$ac_cv_path_FGREP"
7244
7245
7246test -z "$GREP" && GREP=grep
7247
7248
7249
7250
7251
7252
7253
7254
7255
7256
7257
7258
7259
7260
7261
7262
7263
7264
7265
7266# Check whether --with-gnu-ld was given.
7267if test "${with_gnu_ld+set}" = set; then :
7268  withval=$with_gnu_ld; test no = "$withval" || with_gnu_ld=yes
7269else
7270  with_gnu_ld=no
7271fi
7272
7273ac_prog=ld
7274if test yes = "$GCC"; then
7275  # Check if gcc -print-prog-name=ld gives a path.
7276  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5
7277$as_echo_n "checking for ld used by $CC... " >&6; }
7278  case $host in
7279  *-*-mingw*)
7280    # gcc leaves a trailing carriage return, which upsets mingw
7281    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
7282  *)
7283    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
7284  esac
7285  case $ac_prog in
7286    # Accept absolute paths.
7287    [\\/]* | ?:[\\/]*)
7288      re_direlt='/[^/][^/]*/\.\./'
7289      # Canonicalize the pathname of ld
7290      ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
7291      while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
7292	ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
7293      done
7294      test -z "$LD" && LD=$ac_prog
7295      ;;
7296  "")
7297    # If it fails, then pretend we aren't using GCC.
7298    ac_prog=ld
7299    ;;
7300  *)
7301    # If it is relative, then search for the first ld in PATH.
7302    with_gnu_ld=unknown
7303    ;;
7304  esac
7305elif test yes = "$with_gnu_ld"; then
7306  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
7307$as_echo_n "checking for GNU ld... " >&6; }
7308else
7309  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
7310$as_echo_n "checking for non-GNU ld... " >&6; }
7311fi
7312if ${lt_cv_path_LD+:} false; then :
7313  $as_echo_n "(cached) " >&6
7314else
7315  if test -z "$LD"; then
7316  lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
7317  for ac_dir in $PATH; do
7318    IFS=$lt_save_ifs
7319    test -z "$ac_dir" && ac_dir=.
7320    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
7321      lt_cv_path_LD=$ac_dir/$ac_prog
7322      # Check to see if the program is GNU ld.  I'd rather use --version,
7323      # but apparently some variants of GNU ld only accept -v.
7324      # Break only if it was the GNU/non-GNU ld that we prefer.
7325      case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
7326      *GNU* | *'with BFD'*)
7327	test no != "$with_gnu_ld" && break
7328	;;
7329      *)
7330	test yes != "$with_gnu_ld" && break
7331	;;
7332      esac
7333    fi
7334  done
7335  IFS=$lt_save_ifs
7336else
7337  lt_cv_path_LD=$LD # Let the user override the test with a path.
7338fi
7339fi
7340
7341LD=$lt_cv_path_LD
7342if test -n "$LD"; then
7343  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
7344$as_echo "$LD" >&6; }
7345else
7346  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7347$as_echo "no" >&6; }
7348fi
7349test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
7350{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
7351$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
7352if ${lt_cv_prog_gnu_ld+:} false; then :
7353  $as_echo_n "(cached) " >&6
7354else
7355  # I'd rather use --version here, but apparently some GNU lds only accept -v.
7356case `$LD -v 2>&1 </dev/null` in
7357*GNU* | *'with BFD'*)
7358  lt_cv_prog_gnu_ld=yes
7359  ;;
7360*)
7361  lt_cv_prog_gnu_ld=no
7362  ;;
7363esac
7364fi
7365{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_gnu_ld" >&5
7366$as_echo "$lt_cv_prog_gnu_ld" >&6; }
7367with_gnu_ld=$lt_cv_prog_gnu_ld
7368
7369
7370
7371
7372
7373
7374
7375
7376
7377{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)" >&5
7378$as_echo_n "checking for BSD- or MS-compatible name lister (nm)... " >&6; }
7379if ${lt_cv_path_NM+:} false; then :
7380  $as_echo_n "(cached) " >&6
7381else
7382  if test -n "$NM"; then
7383  # Let the user override the test.
7384  lt_cv_path_NM=$NM
7385else
7386  lt_nm_to_check=${ac_tool_prefix}nm
7387  if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
7388    lt_nm_to_check="$lt_nm_to_check nm"
7389  fi
7390  for lt_tmp_nm in $lt_nm_to_check; do
7391    lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
7392    for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
7393      IFS=$lt_save_ifs
7394      test -z "$ac_dir" && ac_dir=.
7395      tmp_nm=$ac_dir/$lt_tmp_nm
7396      if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then
7397	# Check to see if the nm accepts a BSD-compat flag.
7398	# Adding the 'sed 1q' prevents false positives on HP-UX, which says:
7399	#   nm: unknown option "B" ignored
7400	# Tru64's nm complains that /dev/null is an invalid object file
7401	# MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty
7402	case $build_os in
7403	mingw*) lt_bad_file=conftest.nm/nofile ;;
7404	*) lt_bad_file=/dev/null ;;
7405	esac
7406	case `"$tmp_nm" -B $lt_bad_file 2>&1 | sed '1q'` in
7407	*$lt_bad_file* | *'Invalid file or object type'*)
7408	  lt_cv_path_NM="$tmp_nm -B"
7409	  break 2
7410	  ;;
7411	*)
7412	  case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
7413	  */dev/null*)
7414	    lt_cv_path_NM="$tmp_nm -p"
7415	    break 2
7416	    ;;
7417	  *)
7418	    lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
7419	    continue # so that we can try to find one that supports BSD flags
7420	    ;;
7421	  esac
7422	  ;;
7423	esac
7424      fi
7425    done
7426    IFS=$lt_save_ifs
7427  done
7428  : ${lt_cv_path_NM=no}
7429fi
7430fi
7431{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5
7432$as_echo "$lt_cv_path_NM" >&6; }
7433if test no != "$lt_cv_path_NM"; then
7434  NM=$lt_cv_path_NM
7435else
7436  # Didn't find any BSD compatible name lister, look for dumpbin.
7437  if test -n "$DUMPBIN"; then :
7438    # Let the user override the test.
7439  else
7440    if test -n "$ac_tool_prefix"; then
7441  for ac_prog in dumpbin "link -dump"
7442  do
7443    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
7444set dummy $ac_tool_prefix$ac_prog; ac_word=$2
7445{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7446$as_echo_n "checking for $ac_word... " >&6; }
7447if ${ac_cv_prog_DUMPBIN+:} false; then :
7448  $as_echo_n "(cached) " >&6
7449else
7450  if test -n "$DUMPBIN"; then
7451  ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
7452else
7453as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7454for as_dir in $PATH
7455do
7456  IFS=$as_save_IFS
7457  test -z "$as_dir" && as_dir=.
7458    for ac_exec_ext in '' $ac_executable_extensions; do
7459  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7460    ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog"
7461    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7462    break 2
7463  fi
7464done
7465  done
7466IFS=$as_save_IFS
7467
7468fi
7469fi
7470DUMPBIN=$ac_cv_prog_DUMPBIN
7471if test -n "$DUMPBIN"; then
7472  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
7473$as_echo "$DUMPBIN" >&6; }
7474else
7475  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7476$as_echo "no" >&6; }
7477fi
7478
7479
7480    test -n "$DUMPBIN" && break
7481  done
7482fi
7483if test -z "$DUMPBIN"; then
7484  ac_ct_DUMPBIN=$DUMPBIN
7485  for ac_prog in dumpbin "link -dump"
7486do
7487  # Extract the first word of "$ac_prog", so it can be a program name with args.
7488set dummy $ac_prog; ac_word=$2
7489{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7490$as_echo_n "checking for $ac_word... " >&6; }
7491if ${ac_cv_prog_ac_ct_DUMPBIN+:} false; then :
7492  $as_echo_n "(cached) " >&6
7493else
7494  if test -n "$ac_ct_DUMPBIN"; then
7495  ac_cv_prog_ac_ct_DUMPBIN="$ac_ct_DUMPBIN" # Let the user override the test.
7496else
7497as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7498for as_dir in $PATH
7499do
7500  IFS=$as_save_IFS
7501  test -z "$as_dir" && as_dir=.
7502    for ac_exec_ext in '' $ac_executable_extensions; do
7503  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7504    ac_cv_prog_ac_ct_DUMPBIN="$ac_prog"
7505    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7506    break 2
7507  fi
7508done
7509  done
7510IFS=$as_save_IFS
7511
7512fi
7513fi
7514ac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN
7515if test -n "$ac_ct_DUMPBIN"; then
7516  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DUMPBIN" >&5
7517$as_echo "$ac_ct_DUMPBIN" >&6; }
7518else
7519  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7520$as_echo "no" >&6; }
7521fi
7522
7523
7524  test -n "$ac_ct_DUMPBIN" && break
7525done
7526
7527  if test "x$ac_ct_DUMPBIN" = x; then
7528    DUMPBIN=":"
7529  else
7530    case $cross_compiling:$ac_tool_warned in
7531yes:)
7532{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7533$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7534ac_tool_warned=yes ;;
7535esac
7536    DUMPBIN=$ac_ct_DUMPBIN
7537  fi
7538fi
7539
7540    case `$DUMPBIN -symbols -headers /dev/null 2>&1 | sed '1q'` in
7541    *COFF*)
7542      DUMPBIN="$DUMPBIN -symbols -headers"
7543      ;;
7544    *)
7545      DUMPBIN=:
7546      ;;
7547    esac
7548  fi
7549
7550  if test : != "$DUMPBIN"; then
7551    NM=$DUMPBIN
7552  fi
7553fi
7554test -z "$NM" && NM=nm
7555
7556
7557
7558
7559
7560
7561{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface" >&5
7562$as_echo_n "checking the name lister ($NM) interface... " >&6; }
7563if ${lt_cv_nm_interface+:} false; then :
7564  $as_echo_n "(cached) " >&6
7565else
7566  lt_cv_nm_interface="BSD nm"
7567  echo "int some_variable = 0;" > conftest.$ac_ext
7568  (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&5)
7569  (eval "$ac_compile" 2>conftest.err)
7570  cat conftest.err >&5
7571  (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
7572  (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
7573  cat conftest.err >&5
7574  (eval echo "\"\$as_me:$LINENO: output\"" >&5)
7575  cat conftest.out >&5
7576  if $GREP 'External.*some_variable' conftest.out > /dev/null; then
7577    lt_cv_nm_interface="MS dumpbin"
7578  fi
7579  rm -f conftest*
7580fi
7581{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_nm_interface" >&5
7582$as_echo "$lt_cv_nm_interface" >&6; }
7583
7584{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
7585$as_echo_n "checking whether ln -s works... " >&6; }
7586LN_S=$as_ln_s
7587if test "$LN_S" = "ln -s"; then
7588  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7589$as_echo "yes" >&6; }
7590else
7591  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
7592$as_echo "no, using $LN_S" >&6; }
7593fi
7594
7595# find the maximum length of command line arguments
7596{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5
7597$as_echo_n "checking the maximum length of command line arguments... " >&6; }
7598if ${lt_cv_sys_max_cmd_len+:} false; then :
7599  $as_echo_n "(cached) " >&6
7600else
7601    i=0
7602  teststring=ABCD
7603
7604  case $build_os in
7605  msdosdjgpp*)
7606    # On DJGPP, this test can blow up pretty badly due to problems in libc
7607    # (any single argument exceeding 2000 bytes causes a buffer overrun
7608    # during glob expansion).  Even if it were fixed, the result of this
7609    # check would be larger than it should be.
7610    lt_cv_sys_max_cmd_len=12288;    # 12K is about right
7611    ;;
7612
7613  gnu*)
7614    # Under GNU Hurd, this test is not required because there is
7615    # no limit to the length of command line arguments.
7616    # Libtool will interpret -1 as no limit whatsoever
7617    lt_cv_sys_max_cmd_len=-1;
7618    ;;
7619
7620  cygwin* | mingw* | cegcc*)
7621    # On Win9x/ME, this test blows up -- it succeeds, but takes
7622    # about 5 minutes as the teststring grows exponentially.
7623    # Worse, since 9x/ME are not pre-emptively multitasking,
7624    # you end up with a "frozen" computer, even though with patience
7625    # the test eventually succeeds (with a max line length of 256k).
7626    # Instead, let's just punt: use the minimum linelength reported by
7627    # all of the supported platforms: 8192 (on NT/2K/XP).
7628    lt_cv_sys_max_cmd_len=8192;
7629    ;;
7630
7631  mint*)
7632    # On MiNT this can take a long time and run out of memory.
7633    lt_cv_sys_max_cmd_len=8192;
7634    ;;
7635
7636  amigaos*)
7637    # On AmigaOS with pdksh, this test takes hours, literally.
7638    # So we just punt and use a minimum line length of 8192.
7639    lt_cv_sys_max_cmd_len=8192;
7640    ;;
7641
7642  bitrig* | darwin* | dragonfly* | freebsd* | netbsd* | openbsd*)
7643    # This has been around since 386BSD, at least.  Likely further.
7644    if test -x /sbin/sysctl; then
7645      lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
7646    elif test -x /usr/sbin/sysctl; then
7647      lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
7648    else
7649      lt_cv_sys_max_cmd_len=65536	# usable default for all BSDs
7650    fi
7651    # And add a safety zone
7652    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
7653    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
7654    ;;
7655
7656  interix*)
7657    # We know the value 262144 and hardcode it with a safety zone (like BSD)
7658    lt_cv_sys_max_cmd_len=196608
7659    ;;
7660
7661  os2*)
7662    # The test takes a long time on OS/2.
7663    lt_cv_sys_max_cmd_len=8192
7664    ;;
7665
7666  osf*)
7667    # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
7668    # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
7669    # nice to cause kernel panics so lets avoid the loop below.
7670    # First set a reasonable default.
7671    lt_cv_sys_max_cmd_len=16384
7672    #
7673    if test -x /sbin/sysconfig; then
7674      case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
7675        *1*) lt_cv_sys_max_cmd_len=-1 ;;
7676      esac
7677    fi
7678    ;;
7679  sco3.2v5*)
7680    lt_cv_sys_max_cmd_len=102400
7681    ;;
7682  sysv5* | sco5v6* | sysv4.2uw2*)
7683    kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
7684    if test -n "$kargmax"; then
7685      lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[	 ]//'`
7686    else
7687      lt_cv_sys_max_cmd_len=32768
7688    fi
7689    ;;
7690  *)
7691    lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
7692    if test -n "$lt_cv_sys_max_cmd_len" && \
7693       test undefined != "$lt_cv_sys_max_cmd_len"; then
7694      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
7695      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
7696    else
7697      # Make teststring a little bigger before we do anything with it.
7698      # a 1K string should be a reasonable start.
7699      for i in 1 2 3 4 5 6 7 8; do
7700        teststring=$teststring$teststring
7701      done
7702      SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
7703      # If test is not a shell built-in, we'll probably end up computing a
7704      # maximum length that is only half of the actual maximum length, but
7705      # we can't tell.
7706      while { test X`env echo "$teststring$teststring" 2>/dev/null` \
7707	         = "X$teststring$teststring"; } >/dev/null 2>&1 &&
7708	      test 17 != "$i" # 1/2 MB should be enough
7709      do
7710        i=`expr $i + 1`
7711        teststring=$teststring$teststring
7712      done
7713      # Only check the string length outside the loop.
7714      lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
7715      teststring=
7716      # Add a significant safety factor because C++ compilers can tack on
7717      # massive amounts of additional arguments before passing them to the
7718      # linker.  It appears as though 1/2 is a usable value.
7719      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
7720    fi
7721    ;;
7722  esac
7723
7724fi
7725
7726if test -n "$lt_cv_sys_max_cmd_len"; then
7727  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len" >&5
7728$as_echo "$lt_cv_sys_max_cmd_len" >&6; }
7729else
7730  { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
7731$as_echo "none" >&6; }
7732fi
7733max_cmd_len=$lt_cv_sys_max_cmd_len
7734
7735
7736
7737
7738
7739
7740: ${CP="cp -f"}
7741: ${MV="mv -f"}
7742: ${RM="rm -f"}
7743
7744if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
7745  lt_unset=unset
7746else
7747  lt_unset=false
7748fi
7749
7750
7751
7752
7753
7754# test EBCDIC or ASCII
7755case `echo X|tr X '\101'` in
7756 A) # ASCII based system
7757    # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
7758  lt_SP2NL='tr \040 \012'
7759  lt_NL2SP='tr \015\012 \040\040'
7760  ;;
7761 *) # EBCDIC based system
7762  lt_SP2NL='tr \100 \n'
7763  lt_NL2SP='tr \r\n \100\100'
7764  ;;
7765esac
7766
7767
7768
7769
7770
7771
7772
7773
7774
7775{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to $host format" >&5
7776$as_echo_n "checking how to convert $build file names to $host format... " >&6; }
7777if ${lt_cv_to_host_file_cmd+:} false; then :
7778  $as_echo_n "(cached) " >&6
7779else
7780  case $host in
7781  *-*-mingw* )
7782    case $build in
7783      *-*-mingw* ) # actually msys
7784        lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32
7785        ;;
7786      *-*-cygwin* )
7787        lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32
7788        ;;
7789      * ) # otherwise, assume *nix
7790        lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32
7791        ;;
7792    esac
7793    ;;
7794  *-*-cygwin* )
7795    case $build in
7796      *-*-mingw* ) # actually msys
7797        lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin
7798        ;;
7799      *-*-cygwin* )
7800        lt_cv_to_host_file_cmd=func_convert_file_noop
7801        ;;
7802      * ) # otherwise, assume *nix
7803        lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin
7804        ;;
7805    esac
7806    ;;
7807  * ) # unhandled hosts (and "normal" native builds)
7808    lt_cv_to_host_file_cmd=func_convert_file_noop
7809    ;;
7810esac
7811
7812fi
7813
7814to_host_file_cmd=$lt_cv_to_host_file_cmd
7815{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_host_file_cmd" >&5
7816$as_echo "$lt_cv_to_host_file_cmd" >&6; }
7817
7818
7819
7820
7821
7822{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format" >&5
7823$as_echo_n "checking how to convert $build file names to toolchain format... " >&6; }
7824if ${lt_cv_to_tool_file_cmd+:} false; then :
7825  $as_echo_n "(cached) " >&6
7826else
7827  #assume ordinary cross tools, or native build.
7828lt_cv_to_tool_file_cmd=func_convert_file_noop
7829case $host in
7830  *-*-mingw* )
7831    case $build in
7832      *-*-mingw* ) # actually msys
7833        lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32
7834        ;;
7835    esac
7836    ;;
7837esac
7838
7839fi
7840
7841to_tool_file_cmd=$lt_cv_to_tool_file_cmd
7842{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_tool_file_cmd" >&5
7843$as_echo "$lt_cv_to_tool_file_cmd" >&6; }
7844
7845
7846
7847
7848
7849{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5
7850$as_echo_n "checking for $LD option to reload object files... " >&6; }
7851if ${lt_cv_ld_reload_flag+:} false; then :
7852  $as_echo_n "(cached) " >&6
7853else
7854  lt_cv_ld_reload_flag='-r'
7855fi
7856{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_reload_flag" >&5
7857$as_echo "$lt_cv_ld_reload_flag" >&6; }
7858reload_flag=$lt_cv_ld_reload_flag
7859case $reload_flag in
7860"" | " "*) ;;
7861*) reload_flag=" $reload_flag" ;;
7862esac
7863reload_cmds='$LD$reload_flag -o $output$reload_objs'
7864case $host_os in
7865  cygwin* | mingw* | pw32* | cegcc*)
7866    if test yes != "$GCC"; then
7867      reload_cmds=false
7868    fi
7869    ;;
7870  darwin*)
7871    if test yes = "$GCC"; then
7872      reload_cmds='$LTCC $LTCFLAGS -nostdlib $wl-r -o $output$reload_objs'
7873    else
7874      reload_cmds='$LD$reload_flag -o $output$reload_objs'
7875    fi
7876    ;;
7877esac
7878
7879
7880
7881
7882
7883
7884
7885
7886
7887if test -n "$ac_tool_prefix"; then
7888  # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
7889set dummy ${ac_tool_prefix}objdump; ac_word=$2
7890{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7891$as_echo_n "checking for $ac_word... " >&6; }
7892if ${ac_cv_prog_OBJDUMP+:} false; then :
7893  $as_echo_n "(cached) " >&6
7894else
7895  if test -n "$OBJDUMP"; then
7896  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
7897else
7898as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7899for as_dir in $PATH
7900do
7901  IFS=$as_save_IFS
7902  test -z "$as_dir" && as_dir=.
7903    for ac_exec_ext in '' $ac_executable_extensions; do
7904  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7905    ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
7906    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7907    break 2
7908  fi
7909done
7910  done
7911IFS=$as_save_IFS
7912
7913fi
7914fi
7915OBJDUMP=$ac_cv_prog_OBJDUMP
7916if test -n "$OBJDUMP"; then
7917  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
7918$as_echo "$OBJDUMP" >&6; }
7919else
7920  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7921$as_echo "no" >&6; }
7922fi
7923
7924
7925fi
7926if test -z "$ac_cv_prog_OBJDUMP"; then
7927  ac_ct_OBJDUMP=$OBJDUMP
7928  # Extract the first word of "objdump", so it can be a program name with args.
7929set dummy objdump; ac_word=$2
7930{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7931$as_echo_n "checking for $ac_word... " >&6; }
7932if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
7933  $as_echo_n "(cached) " >&6
7934else
7935  if test -n "$ac_ct_OBJDUMP"; then
7936  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
7937else
7938as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7939for as_dir in $PATH
7940do
7941  IFS=$as_save_IFS
7942  test -z "$as_dir" && as_dir=.
7943    for ac_exec_ext in '' $ac_executable_extensions; do
7944  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7945    ac_cv_prog_ac_ct_OBJDUMP="objdump"
7946    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7947    break 2
7948  fi
7949done
7950  done
7951IFS=$as_save_IFS
7952
7953fi
7954fi
7955ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
7956if test -n "$ac_ct_OBJDUMP"; then
7957  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
7958$as_echo "$ac_ct_OBJDUMP" >&6; }
7959else
7960  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7961$as_echo "no" >&6; }
7962fi
7963
7964  if test "x$ac_ct_OBJDUMP" = x; then
7965    OBJDUMP="false"
7966  else
7967    case $cross_compiling:$ac_tool_warned in
7968yes:)
7969{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7970$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7971ac_tool_warned=yes ;;
7972esac
7973    OBJDUMP=$ac_ct_OBJDUMP
7974  fi
7975else
7976  OBJDUMP="$ac_cv_prog_OBJDUMP"
7977fi
7978
7979test -z "$OBJDUMP" && OBJDUMP=objdump
7980
7981
7982
7983
7984
7985
7986
7987
7988
7989{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries" >&5
7990$as_echo_n "checking how to recognize dependent libraries... " >&6; }
7991if ${lt_cv_deplibs_check_method+:} false; then :
7992  $as_echo_n "(cached) " >&6
7993else
7994  lt_cv_file_magic_cmd='$MAGIC_CMD'
7995lt_cv_file_magic_test_file=
7996lt_cv_deplibs_check_method='unknown'
7997# Need to set the preceding variable on all platforms that support
7998# interlibrary dependencies.
7999# 'none' -- dependencies not supported.
8000# 'unknown' -- same as none, but documents that we really don't know.
8001# 'pass_all' -- all dependencies passed with no checks.
8002# 'test_compile' -- check by making test program.
8003# 'file_magic [[regex]]' -- check by looking for files in library path
8004# that responds to the $file_magic_cmd with a given extended regex.
8005# If you have 'file' or equivalent on your system and you're not sure
8006# whether 'pass_all' will *always* work, you probably want this one.
8007
8008case $host_os in
8009aix[4-9]*)
8010  lt_cv_deplibs_check_method=pass_all
8011  ;;
8012
8013beos*)
8014  lt_cv_deplibs_check_method=pass_all
8015  ;;
8016
8017bsdi[45]*)
8018  lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
8019  lt_cv_file_magic_cmd='/usr/bin/file -L'
8020  lt_cv_file_magic_test_file=/shlib/libc.so
8021  ;;
8022
8023cygwin*)
8024  # func_win32_libid is a shell function defined in ltmain.sh
8025  lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
8026  lt_cv_file_magic_cmd='func_win32_libid'
8027  ;;
8028
8029mingw* | pw32*)
8030  # Base MSYS/MinGW do not provide the 'file' command needed by
8031  # func_win32_libid shell function, so use a weaker test based on 'objdump',
8032  # unless we find 'file', for example because we are cross-compiling.
8033  if ( file / ) >/dev/null 2>&1; then
8034    lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
8035    lt_cv_file_magic_cmd='func_win32_libid'
8036  else
8037    # Keep this pattern in sync with the one in func_win32_libid.
8038    lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)'
8039    lt_cv_file_magic_cmd='$OBJDUMP -f'
8040  fi
8041  ;;
8042
8043cegcc*)
8044  # use the weaker test based on 'objdump'. See mingw*.
8045  lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
8046  lt_cv_file_magic_cmd='$OBJDUMP -f'
8047  ;;
8048
8049darwin* | rhapsody*)
8050  lt_cv_deplibs_check_method=pass_all
8051  ;;
8052
8053freebsd* | dragonfly*)
8054  if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
8055    case $host_cpu in
8056    i*86 )
8057      # Not sure whether the presence of OpenBSD here was a mistake.
8058      # Let's accept both of them until this is cleared up.
8059      lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library'
8060      lt_cv_file_magic_cmd=/usr/bin/file
8061      lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
8062      ;;
8063    esac
8064  else
8065    lt_cv_deplibs_check_method=pass_all
8066  fi
8067  ;;
8068
8069haiku*)
8070  lt_cv_deplibs_check_method=pass_all
8071  ;;
8072
8073hpux10.20* | hpux11*)
8074  lt_cv_file_magic_cmd=/usr/bin/file
8075  case $host_cpu in
8076  ia64*)
8077    lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64'
8078    lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
8079    ;;
8080  hppa*64*)
8081    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]'
8082    lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
8083    ;;
8084  *)
8085    lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9]\.[0-9]) shared library'
8086    lt_cv_file_magic_test_file=/usr/lib/libc.sl
8087    ;;
8088  esac
8089  ;;
8090
8091interix[3-9]*)
8092  # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
8093  lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$'
8094  ;;
8095
8096irix5* | irix6* | nonstopux*)
8097  case $LD in
8098  *-32|*"-32 ") libmagic=32-bit;;
8099  *-n32|*"-n32 ") libmagic=N32;;
8100  *-64|*"-64 ") libmagic=64-bit;;
8101  *) libmagic=never-match;;
8102  esac
8103  lt_cv_deplibs_check_method=pass_all
8104  ;;
8105
8106# This must be glibc/ELF.
8107linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
8108  lt_cv_deplibs_check_method=pass_all
8109  ;;
8110
8111netbsd*)
8112  if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
8113    lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
8114  else
8115    lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$'
8116  fi
8117  ;;
8118
8119newos6*)
8120  lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'
8121  lt_cv_file_magic_cmd=/usr/bin/file
8122  lt_cv_file_magic_test_file=/usr/lib/libnls.so
8123  ;;
8124
8125*nto* | *qnx*)
8126  lt_cv_deplibs_check_method=pass_all
8127  ;;
8128
8129openbsd* | bitrig*)
8130  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
8131    lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$'
8132  else
8133    lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
8134  fi
8135  ;;
8136
8137osf3* | osf4* | osf5*)
8138  lt_cv_deplibs_check_method=pass_all
8139  ;;
8140
8141rdos*)
8142  lt_cv_deplibs_check_method=pass_all
8143  ;;
8144
8145solaris*)
8146  lt_cv_deplibs_check_method=pass_all
8147  ;;
8148
8149sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
8150  lt_cv_deplibs_check_method=pass_all
8151  ;;
8152
8153sysv4 | sysv4.3*)
8154  case $host_vendor in
8155  motorola)
8156    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]'
8157    lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
8158    ;;
8159  ncr)
8160    lt_cv_deplibs_check_method=pass_all
8161    ;;
8162  sequent)
8163    lt_cv_file_magic_cmd='/bin/file'
8164    lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'
8165    ;;
8166  sni)
8167    lt_cv_file_magic_cmd='/bin/file'
8168    lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib"
8169    lt_cv_file_magic_test_file=/lib/libc.so
8170    ;;
8171  siemens)
8172    lt_cv_deplibs_check_method=pass_all
8173    ;;
8174  pc)
8175    lt_cv_deplibs_check_method=pass_all
8176    ;;
8177  esac
8178  ;;
8179
8180tpf*)
8181  lt_cv_deplibs_check_method=pass_all
8182  ;;
8183os2*)
8184  lt_cv_deplibs_check_method=pass_all
8185  ;;
8186esac
8187
8188fi
8189{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5
8190$as_echo "$lt_cv_deplibs_check_method" >&6; }
8191
8192file_magic_glob=
8193want_nocaseglob=no
8194if test "$build" = "$host"; then
8195  case $host_os in
8196  mingw* | pw32*)
8197    if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then
8198      want_nocaseglob=yes
8199    else
8200      file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[\1]\/[\1]\/g;/g"`
8201    fi
8202    ;;
8203  esac
8204fi
8205
8206file_magic_cmd=$lt_cv_file_magic_cmd
8207deplibs_check_method=$lt_cv_deplibs_check_method
8208test -z "$deplibs_check_method" && deplibs_check_method=unknown
8209
8210
8211
8212
8213
8214
8215
8216
8217
8218
8219
8220
8221
8222
8223
8224
8225
8226
8227
8228
8229
8230
8231if test -n "$ac_tool_prefix"; then
8232  # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
8233set dummy ${ac_tool_prefix}dlltool; ac_word=$2
8234{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8235$as_echo_n "checking for $ac_word... " >&6; }
8236if ${ac_cv_prog_DLLTOOL+:} false; then :
8237  $as_echo_n "(cached) " >&6
8238else
8239  if test -n "$DLLTOOL"; then
8240  ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
8241else
8242as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8243for as_dir in $PATH
8244do
8245  IFS=$as_save_IFS
8246  test -z "$as_dir" && as_dir=.
8247    for ac_exec_ext in '' $ac_executable_extensions; do
8248  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8249    ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
8250    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8251    break 2
8252  fi
8253done
8254  done
8255IFS=$as_save_IFS
8256
8257fi
8258fi
8259DLLTOOL=$ac_cv_prog_DLLTOOL
8260if test -n "$DLLTOOL"; then
8261  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5
8262$as_echo "$DLLTOOL" >&6; }
8263else
8264  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8265$as_echo "no" >&6; }
8266fi
8267
8268
8269fi
8270if test -z "$ac_cv_prog_DLLTOOL"; then
8271  ac_ct_DLLTOOL=$DLLTOOL
8272  # Extract the first word of "dlltool", so it can be a program name with args.
8273set dummy dlltool; ac_word=$2
8274{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8275$as_echo_n "checking for $ac_word... " >&6; }
8276if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then :
8277  $as_echo_n "(cached) " >&6
8278else
8279  if test -n "$ac_ct_DLLTOOL"; then
8280  ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
8281else
8282as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8283for as_dir in $PATH
8284do
8285  IFS=$as_save_IFS
8286  test -z "$as_dir" && as_dir=.
8287    for ac_exec_ext in '' $ac_executable_extensions; do
8288  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8289    ac_cv_prog_ac_ct_DLLTOOL="dlltool"
8290    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8291    break 2
8292  fi
8293done
8294  done
8295IFS=$as_save_IFS
8296
8297fi
8298fi
8299ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
8300if test -n "$ac_ct_DLLTOOL"; then
8301  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5
8302$as_echo "$ac_ct_DLLTOOL" >&6; }
8303else
8304  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8305$as_echo "no" >&6; }
8306fi
8307
8308  if test "x$ac_ct_DLLTOOL" = x; then
8309    DLLTOOL="false"
8310  else
8311    case $cross_compiling:$ac_tool_warned in
8312yes:)
8313{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8314$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8315ac_tool_warned=yes ;;
8316esac
8317    DLLTOOL=$ac_ct_DLLTOOL
8318  fi
8319else
8320  DLLTOOL="$ac_cv_prog_DLLTOOL"
8321fi
8322
8323test -z "$DLLTOOL" && DLLTOOL=dlltool
8324
8325
8326
8327
8328
8329
8330
8331
8332
8333
8334{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to associate runtime and link libraries" >&5
8335$as_echo_n "checking how to associate runtime and link libraries... " >&6; }
8336if ${lt_cv_sharedlib_from_linklib_cmd+:} false; then :
8337  $as_echo_n "(cached) " >&6
8338else
8339  lt_cv_sharedlib_from_linklib_cmd='unknown'
8340
8341case $host_os in
8342cygwin* | mingw* | pw32* | cegcc*)
8343  # two different shell functions defined in ltmain.sh;
8344  # decide which one to use based on capabilities of $DLLTOOL
8345  case `$DLLTOOL --help 2>&1` in
8346  *--identify-strict*)
8347    lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib
8348    ;;
8349  *)
8350    lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback
8351    ;;
8352  esac
8353  ;;
8354*)
8355  # fallback: assume linklib IS sharedlib
8356  lt_cv_sharedlib_from_linklib_cmd=$ECHO
8357  ;;
8358esac
8359
8360fi
8361{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sharedlib_from_linklib_cmd" >&5
8362$as_echo "$lt_cv_sharedlib_from_linklib_cmd" >&6; }
8363sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd
8364test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO
8365
8366
8367
8368
8369
8370
8371
8372if test -n "$ac_tool_prefix"; then
8373  for ac_prog in ar
8374  do
8375    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
8376set dummy $ac_tool_prefix$ac_prog; ac_word=$2
8377{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8378$as_echo_n "checking for $ac_word... " >&6; }
8379if ${ac_cv_prog_AR+:} false; then :
8380  $as_echo_n "(cached) " >&6
8381else
8382  if test -n "$AR"; then
8383  ac_cv_prog_AR="$AR" # Let the user override the test.
8384else
8385as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8386for as_dir in $PATH
8387do
8388  IFS=$as_save_IFS
8389  test -z "$as_dir" && as_dir=.
8390    for ac_exec_ext in '' $ac_executable_extensions; do
8391  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8392    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
8393    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8394    break 2
8395  fi
8396done
8397  done
8398IFS=$as_save_IFS
8399
8400fi
8401fi
8402AR=$ac_cv_prog_AR
8403if test -n "$AR"; then
8404  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
8405$as_echo "$AR" >&6; }
8406else
8407  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8408$as_echo "no" >&6; }
8409fi
8410
8411
8412    test -n "$AR" && break
8413  done
8414fi
8415if test -z "$AR"; then
8416  ac_ct_AR=$AR
8417  for ac_prog in ar
8418do
8419  # Extract the first word of "$ac_prog", so it can be a program name with args.
8420set dummy $ac_prog; ac_word=$2
8421{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8422$as_echo_n "checking for $ac_word... " >&6; }
8423if ${ac_cv_prog_ac_ct_AR+:} false; then :
8424  $as_echo_n "(cached) " >&6
8425else
8426  if test -n "$ac_ct_AR"; then
8427  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
8428else
8429as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8430for as_dir in $PATH
8431do
8432  IFS=$as_save_IFS
8433  test -z "$as_dir" && as_dir=.
8434    for ac_exec_ext in '' $ac_executable_extensions; do
8435  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8436    ac_cv_prog_ac_ct_AR="$ac_prog"
8437    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8438    break 2
8439  fi
8440done
8441  done
8442IFS=$as_save_IFS
8443
8444fi
8445fi
8446ac_ct_AR=$ac_cv_prog_ac_ct_AR
8447if test -n "$ac_ct_AR"; then
8448  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
8449$as_echo "$ac_ct_AR" >&6; }
8450else
8451  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8452$as_echo "no" >&6; }
8453fi
8454
8455
8456  test -n "$ac_ct_AR" && break
8457done
8458
8459  if test "x$ac_ct_AR" = x; then
8460    AR="false"
8461  else
8462    case $cross_compiling:$ac_tool_warned in
8463yes:)
8464{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8465$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8466ac_tool_warned=yes ;;
8467esac
8468    AR=$ac_ct_AR
8469  fi
8470fi
8471
8472: ${AR=ar}
8473: ${AR_FLAGS=cru}
8474
8475
8476
8477
8478
8479
8480
8481
8482
8483
8484
8485{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support" >&5
8486$as_echo_n "checking for archiver @FILE support... " >&6; }
8487if ${lt_cv_ar_at_file+:} false; then :
8488  $as_echo_n "(cached) " >&6
8489else
8490  lt_cv_ar_at_file=no
8491   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8492/* end confdefs.h.  */
8493
8494int
8495main ()
8496{
8497
8498  ;
8499  return 0;
8500}
8501_ACEOF
8502if ac_fn_c_try_compile "$LINENO"; then :
8503  echo conftest.$ac_objext > conftest.lst
8504      lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&5'
8505      { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5
8506  (eval $lt_ar_try) 2>&5
8507  ac_status=$?
8508  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8509  test $ac_status = 0; }
8510      if test 0 -eq "$ac_status"; then
8511	# Ensure the archiver fails upon bogus file names.
8512	rm -f conftest.$ac_objext libconftest.a
8513	{ { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5
8514  (eval $lt_ar_try) 2>&5
8515  ac_status=$?
8516  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8517  test $ac_status = 0; }
8518	if test 0 -ne "$ac_status"; then
8519          lt_cv_ar_at_file=@
8520        fi
8521      fi
8522      rm -f conftest.* libconftest.a
8523
8524fi
8525rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8526
8527fi
8528{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5
8529$as_echo "$lt_cv_ar_at_file" >&6; }
8530
8531if test no = "$lt_cv_ar_at_file"; then
8532  archiver_list_spec=
8533else
8534  archiver_list_spec=$lt_cv_ar_at_file
8535fi
8536
8537
8538
8539
8540
8541
8542
8543if test -n "$ac_tool_prefix"; then
8544  # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
8545set dummy ${ac_tool_prefix}strip; ac_word=$2
8546{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8547$as_echo_n "checking for $ac_word... " >&6; }
8548if ${ac_cv_prog_STRIP+:} false; then :
8549  $as_echo_n "(cached) " >&6
8550else
8551  if test -n "$STRIP"; then
8552  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
8553else
8554as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8555for as_dir in $PATH
8556do
8557  IFS=$as_save_IFS
8558  test -z "$as_dir" && as_dir=.
8559    for ac_exec_ext in '' $ac_executable_extensions; do
8560  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8561    ac_cv_prog_STRIP="${ac_tool_prefix}strip"
8562    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8563    break 2
8564  fi
8565done
8566  done
8567IFS=$as_save_IFS
8568
8569fi
8570fi
8571STRIP=$ac_cv_prog_STRIP
8572if test -n "$STRIP"; then
8573  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
8574$as_echo "$STRIP" >&6; }
8575else
8576  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8577$as_echo "no" >&6; }
8578fi
8579
8580
8581fi
8582if test -z "$ac_cv_prog_STRIP"; then
8583  ac_ct_STRIP=$STRIP
8584  # Extract the first word of "strip", so it can be a program name with args.
8585set dummy strip; ac_word=$2
8586{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8587$as_echo_n "checking for $ac_word... " >&6; }
8588if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
8589  $as_echo_n "(cached) " >&6
8590else
8591  if test -n "$ac_ct_STRIP"; then
8592  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
8593else
8594as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8595for as_dir in $PATH
8596do
8597  IFS=$as_save_IFS
8598  test -z "$as_dir" && as_dir=.
8599    for ac_exec_ext in '' $ac_executable_extensions; do
8600  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8601    ac_cv_prog_ac_ct_STRIP="strip"
8602    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8603    break 2
8604  fi
8605done
8606  done
8607IFS=$as_save_IFS
8608
8609fi
8610fi
8611ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
8612if test -n "$ac_ct_STRIP"; then
8613  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
8614$as_echo "$ac_ct_STRIP" >&6; }
8615else
8616  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8617$as_echo "no" >&6; }
8618fi
8619
8620  if test "x$ac_ct_STRIP" = x; then
8621    STRIP=":"
8622  else
8623    case $cross_compiling:$ac_tool_warned in
8624yes:)
8625{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8626$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8627ac_tool_warned=yes ;;
8628esac
8629    STRIP=$ac_ct_STRIP
8630  fi
8631else
8632  STRIP="$ac_cv_prog_STRIP"
8633fi
8634
8635test -z "$STRIP" && STRIP=:
8636
8637
8638
8639
8640
8641
8642if test -n "$ac_tool_prefix"; then
8643  # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
8644set dummy ${ac_tool_prefix}ranlib; ac_word=$2
8645{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8646$as_echo_n "checking for $ac_word... " >&6; }
8647if ${ac_cv_prog_RANLIB+:} false; then :
8648  $as_echo_n "(cached) " >&6
8649else
8650  if test -n "$RANLIB"; then
8651  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
8652else
8653as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8654for as_dir in $PATH
8655do
8656  IFS=$as_save_IFS
8657  test -z "$as_dir" && as_dir=.
8658    for ac_exec_ext in '' $ac_executable_extensions; do
8659  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8660    ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
8661    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8662    break 2
8663  fi
8664done
8665  done
8666IFS=$as_save_IFS
8667
8668fi
8669fi
8670RANLIB=$ac_cv_prog_RANLIB
8671if test -n "$RANLIB"; then
8672  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
8673$as_echo "$RANLIB" >&6; }
8674else
8675  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8676$as_echo "no" >&6; }
8677fi
8678
8679
8680fi
8681if test -z "$ac_cv_prog_RANLIB"; then
8682  ac_ct_RANLIB=$RANLIB
8683  # Extract the first word of "ranlib", so it can be a program name with args.
8684set dummy ranlib; ac_word=$2
8685{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8686$as_echo_n "checking for $ac_word... " >&6; }
8687if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
8688  $as_echo_n "(cached) " >&6
8689else
8690  if test -n "$ac_ct_RANLIB"; then
8691  ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
8692else
8693as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8694for as_dir in $PATH
8695do
8696  IFS=$as_save_IFS
8697  test -z "$as_dir" && as_dir=.
8698    for ac_exec_ext in '' $ac_executable_extensions; do
8699  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8700    ac_cv_prog_ac_ct_RANLIB="ranlib"
8701    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8702    break 2
8703  fi
8704done
8705  done
8706IFS=$as_save_IFS
8707
8708fi
8709fi
8710ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
8711if test -n "$ac_ct_RANLIB"; then
8712  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
8713$as_echo "$ac_ct_RANLIB" >&6; }
8714else
8715  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8716$as_echo "no" >&6; }
8717fi
8718
8719  if test "x$ac_ct_RANLIB" = x; then
8720    RANLIB=":"
8721  else
8722    case $cross_compiling:$ac_tool_warned in
8723yes:)
8724{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8725$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8726ac_tool_warned=yes ;;
8727esac
8728    RANLIB=$ac_ct_RANLIB
8729  fi
8730else
8731  RANLIB="$ac_cv_prog_RANLIB"
8732fi
8733
8734test -z "$RANLIB" && RANLIB=:
8735
8736
8737
8738
8739
8740
8741# Determine commands to create old-style static archives.
8742old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
8743old_postinstall_cmds='chmod 644 $oldlib'
8744old_postuninstall_cmds=
8745
8746if test -n "$RANLIB"; then
8747  case $host_os in
8748  bitrig* | openbsd*)
8749    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib"
8750    ;;
8751  *)
8752    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib"
8753    ;;
8754  esac
8755  old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib"
8756fi
8757
8758case $host_os in
8759  darwin*)
8760    lock_old_archive_extraction=yes ;;
8761  *)
8762    lock_old_archive_extraction=no ;;
8763esac
8764
8765
8766
8767
8768
8769
8770
8771
8772
8773
8774
8775
8776
8777
8778
8779
8780
8781
8782
8783
8784
8785for ac_prog in gawk mawk nawk awk
8786do
8787  # Extract the first word of "$ac_prog", so it can be a program name with args.
8788set dummy $ac_prog; ac_word=$2
8789{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8790$as_echo_n "checking for $ac_word... " >&6; }
8791if ${ac_cv_prog_AWK+:} false; then :
8792  $as_echo_n "(cached) " >&6
8793else
8794  if test -n "$AWK"; then
8795  ac_cv_prog_AWK="$AWK" # Let the user override the test.
8796else
8797as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8798for as_dir in $PATH
8799do
8800  IFS=$as_save_IFS
8801  test -z "$as_dir" && as_dir=.
8802    for ac_exec_ext in '' $ac_executable_extensions; do
8803  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8804    ac_cv_prog_AWK="$ac_prog"
8805    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8806    break 2
8807  fi
8808done
8809  done
8810IFS=$as_save_IFS
8811
8812fi
8813fi
8814AWK=$ac_cv_prog_AWK
8815if test -n "$AWK"; then
8816  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
8817$as_echo "$AWK" >&6; }
8818else
8819  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8820$as_echo "no" >&6; }
8821fi
8822
8823
8824  test -n "$AWK" && break
8825done
8826
8827
8828
8829
8830
8831
8832
8833
8834
8835
8836
8837
8838
8839
8840
8841
8842
8843
8844
8845# If no C compiler was specified, use CC.
8846LTCC=${LTCC-"$CC"}
8847
8848# If no C compiler flags were specified, use CFLAGS.
8849LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
8850
8851# Allow CC to be a program name with arguments.
8852compiler=$CC
8853
8854
8855# Check for command to grab the raw symbol name followed by C symbol from nm.
8856{ $as_echo "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5
8857$as_echo_n "checking command to parse $NM output from $compiler object... " >&6; }
8858if ${lt_cv_sys_global_symbol_pipe+:} false; then :
8859  $as_echo_n "(cached) " >&6
8860else
8861
8862# These are sane defaults that work on at least a few old systems.
8863# [They come from Ultrix.  What could be older than Ultrix?!! ;)]
8864
8865# Character class describing NM global symbol codes.
8866symcode='[BCDEGRST]'
8867
8868# Regexp to match symbols that can be accessed directly from C.
8869sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
8870
8871# Define system-specific variables.
8872case $host_os in
8873aix*)
8874  symcode='[BCDT]'
8875  ;;
8876cygwin* | mingw* | pw32* | cegcc*)
8877  symcode='[ABCDGISTW]'
8878  ;;
8879hpux*)
8880  if test ia64 = "$host_cpu"; then
8881    symcode='[ABCDEGRST]'
8882  fi
8883  ;;
8884irix* | nonstopux*)
8885  symcode='[BCDEGRST]'
8886  ;;
8887osf*)
8888  symcode='[BCDEGQRST]'
8889  ;;
8890solaris*)
8891  symcode='[BDRT]'
8892  ;;
8893sco3.2v5*)
8894  symcode='[DT]'
8895  ;;
8896sysv4.2uw2*)
8897  symcode='[DT]'
8898  ;;
8899sysv5* | sco5v6* | unixware* | OpenUNIX*)
8900  symcode='[ABDT]'
8901  ;;
8902sysv4)
8903  symcode='[DFNSTU]'
8904  ;;
8905esac
8906
8907# If we're using GNU nm, then use its standard symbol codes.
8908case `$NM -V 2>&1` in
8909*GNU* | *'with BFD'*)
8910  symcode='[ABCDGIRSTW]' ;;
8911esac
8912
8913if test "$lt_cv_nm_interface" = "MS dumpbin"; then
8914  # Gets list of data symbols to import.
8915  lt_cv_sys_global_symbol_to_import="sed -n -e 's/^I .* \(.*\)$/\1/p'"
8916  # Adjust the below global symbol transforms to fixup imported variables.
8917  lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'"
8918  lt_c_name_hook=" -e 's/^I .* \(.*\)$/  {\"\1\", (void *) 0},/p'"
8919  lt_c_name_lib_hook="\
8920  -e 's/^I .* \(lib.*\)$/  {\"\1\", (void *) 0},/p'\
8921  -e 's/^I .* \(.*\)$/  {\"lib\1\", (void *) 0},/p'"
8922else
8923  # Disable hooks by default.
8924  lt_cv_sys_global_symbol_to_import=
8925  lt_cdecl_hook=
8926  lt_c_name_hook=
8927  lt_c_name_lib_hook=
8928fi
8929
8930# Transform an extracted symbol line into a proper C declaration.
8931# Some systems (esp. on ia64) link data and code symbols differently,
8932# so use this general approach.
8933lt_cv_sys_global_symbol_to_cdecl="sed -n"\
8934$lt_cdecl_hook\
8935" -e 's/^T .* \(.*\)$/extern int \1();/p'"\
8936" -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'"
8937
8938# Transform an extracted symbol line into symbol name and symbol address
8939lt_cv_sys_global_symbol_to_c_name_address="sed -n"\
8940$lt_c_name_hook\
8941" -e 's/^: \(.*\) .*$/  {\"\1\", (void *) 0},/p'"\
8942" -e 's/^$symcode$symcode* .* \(.*\)$/  {\"\1\", (void *) \&\1},/p'"
8943
8944# Transform an extracted symbol line into symbol name with lib prefix and
8945# symbol address.
8946lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n"\
8947$lt_c_name_lib_hook\
8948" -e 's/^: \(.*\) .*$/  {\"\1\", (void *) 0},/p'"\
8949" -e 's/^$symcode$symcode* .* \(lib.*\)$/  {\"\1\", (void *) \&\1},/p'"\
8950" -e 's/^$symcode$symcode* .* \(.*\)$/  {\"lib\1\", (void *) \&\1},/p'"
8951
8952# Handle CRLF in mingw tool chain
8953opt_cr=
8954case $build_os in
8955mingw*)
8956  opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
8957  ;;
8958esac
8959
8960# Try without a prefix underscore, then with it.
8961for ac_symprfx in "" "_"; do
8962
8963  # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
8964  symxfrm="\\1 $ac_symprfx\\2 \\2"
8965
8966  # Write the raw and C identifiers.
8967  if test "$lt_cv_nm_interface" = "MS dumpbin"; then
8968    # Fake it for dumpbin and say T for any non-static function,
8969    # D for any global variable and I for any imported variable.
8970    # Also find C++ and __fastcall symbols from MSVC++,
8971    # which start with @ or ?.
8972    lt_cv_sys_global_symbol_pipe="$AWK '"\
8973"     {last_section=section; section=\$ 3};"\
8974"     /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\
8975"     /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
8976"     /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\
8977"     /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\
8978"     /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\
8979"     \$ 0!~/External *\|/{next};"\
8980"     / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
8981"     {if(hide[section]) next};"\
8982"     {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\
8983"     {split(\$ 0,a,/\||\r/); split(a[2],s)};"\
8984"     s[1]~/^[@?]/{print f,s[1],s[1]; next};"\
8985"     s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\
8986"     ' prfx=^$ac_symprfx"
8987  else
8988    lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[	 ]\($symcode$symcode*\)[	 ][	 ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
8989  fi
8990  lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'"
8991
8992  # Check to see that the pipe works correctly.
8993  pipe_works=no
8994
8995  rm -f conftest*
8996  cat > conftest.$ac_ext <<_LT_EOF
8997#ifdef __cplusplus
8998extern "C" {
8999#endif
9000char nm_test_var;
9001void nm_test_func(void);
9002void nm_test_func(void){}
9003#ifdef __cplusplus
9004}
9005#endif
9006int main(){nm_test_var='a';nm_test_func();return(0);}
9007_LT_EOF
9008
9009  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
9010  (eval $ac_compile) 2>&5
9011  ac_status=$?
9012  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
9013  test $ac_status = 0; }; then
9014    # Now try to grab the symbols.
9015    nlist=conftest.nm
9016    if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist\""; } >&5
9017  (eval $NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) 2>&5
9018  ac_status=$?
9019  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
9020  test $ac_status = 0; } && test -s "$nlist"; then
9021      # Try sorting and uniquifying the output.
9022      if sort "$nlist" | uniq > "$nlist"T; then
9023	mv -f "$nlist"T "$nlist"
9024      else
9025	rm -f "$nlist"T
9026      fi
9027
9028      # Make sure that we snagged all the symbols we need.
9029      if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
9030	if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
9031	  cat <<_LT_EOF > conftest.$ac_ext
9032/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests.  */
9033#if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE
9034/* DATA imports from DLLs on WIN32 can't be const, because runtime
9035   relocations are performed -- see ld's documentation on pseudo-relocs.  */
9036# define LT_DLSYM_CONST
9037#elif defined __osf__
9038/* This system does not cope well with relocations in const data.  */
9039# define LT_DLSYM_CONST
9040#else
9041# define LT_DLSYM_CONST const
9042#endif
9043
9044#ifdef __cplusplus
9045extern "C" {
9046#endif
9047
9048_LT_EOF
9049	  # Now generate the symbol file.
9050	  eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
9051
9052	  cat <<_LT_EOF >> conftest.$ac_ext
9053
9054/* The mapping between symbol names and symbols.  */
9055LT_DLSYM_CONST struct {
9056  const char *name;
9057  void       *address;
9058}
9059lt__PROGRAM__LTX_preloaded_symbols[] =
9060{
9061  { "@PROGRAM@", (void *) 0 },
9062_LT_EOF
9063	  $SED "s/^$symcode$symcode* .* \(.*\)$/  {\"\1\", (void *) \&\1},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
9064	  cat <<\_LT_EOF >> conftest.$ac_ext
9065  {0, (void *) 0}
9066};
9067
9068/* This works around a problem in FreeBSD linker */
9069#ifdef FREEBSD_WORKAROUND
9070static const void *lt_preloaded_setup() {
9071  return lt__PROGRAM__LTX_preloaded_symbols;
9072}
9073#endif
9074
9075#ifdef __cplusplus
9076}
9077#endif
9078_LT_EOF
9079	  # Now try linking the two files.
9080	  mv conftest.$ac_objext conftstm.$ac_objext
9081	  lt_globsym_save_LIBS=$LIBS
9082	  lt_globsym_save_CFLAGS=$CFLAGS
9083	  LIBS=conftstm.$ac_objext
9084	  CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag"
9085	  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
9086  (eval $ac_link) 2>&5
9087  ac_status=$?
9088  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
9089  test $ac_status = 0; } && test -s conftest$ac_exeext; then
9090	    pipe_works=yes
9091	  fi
9092	  LIBS=$lt_globsym_save_LIBS
9093	  CFLAGS=$lt_globsym_save_CFLAGS
9094	else
9095	  echo "cannot find nm_test_func in $nlist" >&5
9096	fi
9097      else
9098	echo "cannot find nm_test_var in $nlist" >&5
9099      fi
9100    else
9101      echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5
9102    fi
9103  else
9104    echo "$progname: failed program was:" >&5
9105    cat conftest.$ac_ext >&5
9106  fi
9107  rm -rf conftest* conftst*
9108
9109  # Do not use the global_symbol_pipe unless it works.
9110  if test yes = "$pipe_works"; then
9111    break
9112  else
9113    lt_cv_sys_global_symbol_pipe=
9114  fi
9115done
9116
9117fi
9118
9119if test -z "$lt_cv_sys_global_symbol_pipe"; then
9120  lt_cv_sys_global_symbol_to_cdecl=
9121fi
9122if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
9123  { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
9124$as_echo "failed" >&6; }
9125else
9126  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
9127$as_echo "ok" >&6; }
9128fi
9129
9130# Response file support.
9131if test "$lt_cv_nm_interface" = "MS dumpbin"; then
9132  nm_file_list_spec='@'
9133elif $NM --help 2>/dev/null | grep '[@]FILE' >/dev/null; then
9134  nm_file_list_spec='@'
9135fi
9136
9137
9138
9139
9140
9141
9142
9143
9144
9145
9146
9147
9148
9149
9150
9151
9152
9153
9154
9155
9156
9157
9158
9159
9160
9161
9162
9163
9164
9165
9166
9167
9168
9169
9170
9171
9172
9173{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
9174$as_echo_n "checking for sysroot... " >&6; }
9175
9176# Check whether --with-sysroot was given.
9177if test "${with_sysroot+set}" = set; then :
9178  withval=$with_sysroot;
9179else
9180  with_sysroot=no
9181fi
9182
9183
9184lt_sysroot=
9185case $with_sysroot in #(
9186 yes)
9187   if test yes = "$GCC"; then
9188     lt_sysroot=`$CC --print-sysroot 2>/dev/null`
9189   fi
9190   ;; #(
9191 /*)
9192   lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"`
9193   ;; #(
9194 no|'')
9195   ;; #(
9196 *)
9197   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_sysroot" >&5
9198$as_echo "$with_sysroot" >&6; }
9199   as_fn_error $? "The sysroot must be an absolute path." "$LINENO" 5
9200   ;;
9201esac
9202
9203 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}" >&5
9204$as_echo "${lt_sysroot:-no}" >&6; }
9205
9206
9207
9208
9209
9210{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a working dd" >&5
9211$as_echo_n "checking for a working dd... " >&6; }
9212if ${ac_cv_path_lt_DD+:} false; then :
9213  $as_echo_n "(cached) " >&6
9214else
9215  printf 0123456789abcdef0123456789abcdef >conftest.i
9216cat conftest.i conftest.i >conftest2.i
9217: ${lt_DD:=$DD}
9218if test -z "$lt_DD"; then
9219  ac_path_lt_DD_found=false
9220  # Loop through the user's path and test for each of PROGNAME-LIST
9221  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9222for as_dir in $PATH
9223do
9224  IFS=$as_save_IFS
9225  test -z "$as_dir" && as_dir=.
9226    for ac_prog in dd; do
9227    for ac_exec_ext in '' $ac_executable_extensions; do
9228      ac_path_lt_DD="$as_dir/$ac_prog$ac_exec_ext"
9229      as_fn_executable_p "$ac_path_lt_DD" || continue
9230if "$ac_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then
9231  cmp -s conftest.i conftest.out \
9232  && ac_cv_path_lt_DD="$ac_path_lt_DD" ac_path_lt_DD_found=:
9233fi
9234      $ac_path_lt_DD_found && break 3
9235    done
9236  done
9237  done
9238IFS=$as_save_IFS
9239  if test -z "$ac_cv_path_lt_DD"; then
9240    :
9241  fi
9242else
9243  ac_cv_path_lt_DD=$lt_DD
9244fi
9245
9246rm -f conftest.i conftest2.i conftest.out
9247fi
9248{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_lt_DD" >&5
9249$as_echo "$ac_cv_path_lt_DD" >&6; }
9250
9251
9252{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to truncate binary pipes" >&5
9253$as_echo_n "checking how to truncate binary pipes... " >&6; }
9254if ${lt_cv_truncate_bin+:} false; then :
9255  $as_echo_n "(cached) " >&6
9256else
9257  printf 0123456789abcdef0123456789abcdef >conftest.i
9258cat conftest.i conftest.i >conftest2.i
9259lt_cv_truncate_bin=
9260if "$ac_cv_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then
9261  cmp -s conftest.i conftest.out \
9262  && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1"
9263fi
9264rm -f conftest.i conftest2.i conftest.out
9265test -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q"
9266fi
9267{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_truncate_bin" >&5
9268$as_echo "$lt_cv_truncate_bin" >&6; }
9269
9270
9271
9272
9273
9274
9275
9276# Calculate cc_basename.  Skip known compiler wrappers and cross-prefix.
9277func_cc_basename ()
9278{
9279    for cc_temp in $*""; do
9280      case $cc_temp in
9281        compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
9282        distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
9283        \-*) ;;
9284        *) break;;
9285      esac
9286    done
9287    func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
9288}
9289
9290# Check whether --enable-libtool-lock was given.
9291if test "${enable_libtool_lock+set}" = set; then :
9292  enableval=$enable_libtool_lock;
9293fi
9294
9295test no = "$enable_libtool_lock" || enable_libtool_lock=yes
9296
9297# Some flags need to be propagated to the compiler or linker for good
9298# libtool support.
9299case $host in
9300ia64-*-hpux*)
9301  # Find out what ABI is being produced by ac_compile, and set mode
9302  # options accordingly.
9303  echo 'int i;' > conftest.$ac_ext
9304  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
9305  (eval $ac_compile) 2>&5
9306  ac_status=$?
9307  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
9308  test $ac_status = 0; }; then
9309    case `/usr/bin/file conftest.$ac_objext` in
9310      *ELF-32*)
9311	HPUX_IA64_MODE=32
9312	;;
9313      *ELF-64*)
9314	HPUX_IA64_MODE=64
9315	;;
9316    esac
9317  fi
9318  rm -rf conftest*
9319  ;;
9320*-*-irix6*)
9321  # Find out what ABI is being produced by ac_compile, and set linker
9322  # options accordingly.
9323  echo '#line '$LINENO' "configure"' > conftest.$ac_ext
9324  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
9325  (eval $ac_compile) 2>&5
9326  ac_status=$?
9327  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
9328  test $ac_status = 0; }; then
9329    if test yes = "$lt_cv_prog_gnu_ld"; then
9330      case `/usr/bin/file conftest.$ac_objext` in
9331	*32-bit*)
9332	  LD="${LD-ld} -melf32bsmip"
9333	  ;;
9334	*N32*)
9335	  LD="${LD-ld} -melf32bmipn32"
9336	  ;;
9337	*64-bit*)
9338	  LD="${LD-ld} -melf64bmip"
9339	;;
9340      esac
9341    else
9342      case `/usr/bin/file conftest.$ac_objext` in
9343	*32-bit*)
9344	  LD="${LD-ld} -32"
9345	  ;;
9346	*N32*)
9347	  LD="${LD-ld} -n32"
9348	  ;;
9349	*64-bit*)
9350	  LD="${LD-ld} -64"
9351	  ;;
9352      esac
9353    fi
9354  fi
9355  rm -rf conftest*
9356  ;;
9357
9358mips64*-*linux*)
9359  # Find out what ABI is being produced by ac_compile, and set linker
9360  # options accordingly.
9361  echo '#line '$LINENO' "configure"' > conftest.$ac_ext
9362  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
9363  (eval $ac_compile) 2>&5
9364  ac_status=$?
9365  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
9366  test $ac_status = 0; }; then
9367    emul=elf
9368    case `/usr/bin/file conftest.$ac_objext` in
9369      *32-bit*)
9370	emul="${emul}32"
9371	;;
9372      *64-bit*)
9373	emul="${emul}64"
9374	;;
9375    esac
9376    case `/usr/bin/file conftest.$ac_objext` in
9377      *MSB*)
9378	emul="${emul}btsmip"
9379	;;
9380      *LSB*)
9381	emul="${emul}ltsmip"
9382	;;
9383    esac
9384    case `/usr/bin/file conftest.$ac_objext` in
9385      *N32*)
9386	emul="${emul}n32"
9387	;;
9388    esac
9389    LD="${LD-ld} -m $emul"
9390  fi
9391  rm -rf conftest*
9392  ;;
9393
9394x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \
9395s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
9396  # Find out what ABI is being produced by ac_compile, and set linker
9397  # options accordingly.  Note that the listed cases only cover the
9398  # situations where additional linker options are needed (such as when
9399  # doing 32-bit compilation for a host where ld defaults to 64-bit, or
9400  # vice versa); the common cases where no linker options are needed do
9401  # not appear in the list.
9402  echo 'int i;' > conftest.$ac_ext
9403  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
9404  (eval $ac_compile) 2>&5
9405  ac_status=$?
9406  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
9407  test $ac_status = 0; }; then
9408    case `/usr/bin/file conftest.o` in
9409      *32-bit*)
9410	case $host in
9411	  x86_64-*kfreebsd*-gnu)
9412	    LD="${LD-ld} -m elf_i386_fbsd"
9413	    ;;
9414	  x86_64-*linux*)
9415	    case `/usr/bin/file conftest.o` in
9416	      *x86-64*)
9417		LD="${LD-ld} -m elf32_x86_64"
9418		;;
9419	      *)
9420		LD="${LD-ld} -m elf_i386"
9421		;;
9422	    esac
9423	    ;;
9424	  powerpc64le-*linux*)
9425	    LD="${LD-ld} -m elf32lppclinux"
9426	    ;;
9427	  powerpc64-*linux*)
9428	    LD="${LD-ld} -m elf32ppclinux"
9429	    ;;
9430	  s390x-*linux*)
9431	    LD="${LD-ld} -m elf_s390"
9432	    ;;
9433	  sparc64-*linux*)
9434	    LD="${LD-ld} -m elf32_sparc"
9435	    ;;
9436	esac
9437	;;
9438      *64-bit*)
9439	case $host in
9440	  x86_64-*kfreebsd*-gnu)
9441	    LD="${LD-ld} -m elf_x86_64_fbsd"
9442	    ;;
9443	  x86_64-*linux*)
9444	    LD="${LD-ld} -m elf_x86_64"
9445	    ;;
9446	  powerpcle-*linux*)
9447	    LD="${LD-ld} -m elf64lppc"
9448	    ;;
9449	  powerpc-*linux*)
9450	    LD="${LD-ld} -m elf64ppc"
9451	    ;;
9452	  s390*-*linux*|s390*-*tpf*)
9453	    LD="${LD-ld} -m elf64_s390"
9454	    ;;
9455	  sparc*-*linux*)
9456	    LD="${LD-ld} -m elf64_sparc"
9457	    ;;
9458	esac
9459	;;
9460    esac
9461  fi
9462  rm -rf conftest*
9463  ;;
9464
9465*-*-sco3.2v5*)
9466  # On SCO OpenServer 5, we need -belf to get full-featured binaries.
9467  SAVE_CFLAGS=$CFLAGS
9468  CFLAGS="$CFLAGS -belf"
9469  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5
9470$as_echo_n "checking whether the C compiler needs -belf... " >&6; }
9471if ${lt_cv_cc_needs_belf+:} false; then :
9472  $as_echo_n "(cached) " >&6
9473else
9474  ac_ext=c
9475ac_cpp='$CPP $CPPFLAGS'
9476ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
9477ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
9478ac_compiler_gnu=$ac_cv_c_compiler_gnu
9479
9480     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9481/* end confdefs.h.  */
9482
9483int
9484main ()
9485{
9486
9487  ;
9488  return 0;
9489}
9490_ACEOF
9491if ac_fn_c_try_link "$LINENO"; then :
9492  lt_cv_cc_needs_belf=yes
9493else
9494  lt_cv_cc_needs_belf=no
9495fi
9496rm -f core conftest.err conftest.$ac_objext \
9497    conftest$ac_exeext conftest.$ac_ext
9498     ac_ext=c
9499ac_cpp='$CPP $CPPFLAGS'
9500ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
9501ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
9502ac_compiler_gnu=$ac_cv_c_compiler_gnu
9503
9504fi
9505{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5
9506$as_echo "$lt_cv_cc_needs_belf" >&6; }
9507  if test yes != "$lt_cv_cc_needs_belf"; then
9508    # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
9509    CFLAGS=$SAVE_CFLAGS
9510  fi
9511  ;;
9512*-*solaris*)
9513  # Find out what ABI is being produced by ac_compile, and set linker
9514  # options accordingly.
9515  echo 'int i;' > conftest.$ac_ext
9516  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
9517  (eval $ac_compile) 2>&5
9518  ac_status=$?
9519  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
9520  test $ac_status = 0; }; then
9521    case `/usr/bin/file conftest.o` in
9522    *64-bit*)
9523      case $lt_cv_prog_gnu_ld in
9524      yes*)
9525        case $host in
9526        i?86-*-solaris*|x86_64-*-solaris*)
9527          LD="${LD-ld} -m elf_x86_64"
9528          ;;
9529        sparc*-*-solaris*)
9530          LD="${LD-ld} -m elf64_sparc"
9531          ;;
9532        esac
9533        # GNU ld 2.21 introduced _sol2 emulations.  Use them if available.
9534        if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then
9535          LD=${LD-ld}_sol2
9536        fi
9537        ;;
9538      *)
9539	if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
9540	  LD="${LD-ld} -64"
9541	fi
9542	;;
9543      esac
9544      ;;
9545    esac
9546  fi
9547  rm -rf conftest*
9548  ;;
9549esac
9550
9551need_locks=$enable_libtool_lock
9552
9553if test -n "$ac_tool_prefix"; then
9554  # Extract the first word of "${ac_tool_prefix}mt", so it can be a program name with args.
9555set dummy ${ac_tool_prefix}mt; ac_word=$2
9556{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9557$as_echo_n "checking for $ac_word... " >&6; }
9558if ${ac_cv_prog_MANIFEST_TOOL+:} false; then :
9559  $as_echo_n "(cached) " >&6
9560else
9561  if test -n "$MANIFEST_TOOL"; then
9562  ac_cv_prog_MANIFEST_TOOL="$MANIFEST_TOOL" # Let the user override the test.
9563else
9564as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9565for as_dir in $PATH
9566do
9567  IFS=$as_save_IFS
9568  test -z "$as_dir" && as_dir=.
9569    for ac_exec_ext in '' $ac_executable_extensions; do
9570  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9571    ac_cv_prog_MANIFEST_TOOL="${ac_tool_prefix}mt"
9572    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9573    break 2
9574  fi
9575done
9576  done
9577IFS=$as_save_IFS
9578
9579fi
9580fi
9581MANIFEST_TOOL=$ac_cv_prog_MANIFEST_TOOL
9582if test -n "$MANIFEST_TOOL"; then
9583  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MANIFEST_TOOL" >&5
9584$as_echo "$MANIFEST_TOOL" >&6; }
9585else
9586  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9587$as_echo "no" >&6; }
9588fi
9589
9590
9591fi
9592if test -z "$ac_cv_prog_MANIFEST_TOOL"; then
9593  ac_ct_MANIFEST_TOOL=$MANIFEST_TOOL
9594  # Extract the first word of "mt", so it can be a program name with args.
9595set dummy mt; ac_word=$2
9596{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9597$as_echo_n "checking for $ac_word... " >&6; }
9598if ${ac_cv_prog_ac_ct_MANIFEST_TOOL+:} false; then :
9599  $as_echo_n "(cached) " >&6
9600else
9601  if test -n "$ac_ct_MANIFEST_TOOL"; then
9602  ac_cv_prog_ac_ct_MANIFEST_TOOL="$ac_ct_MANIFEST_TOOL" # Let the user override the test.
9603else
9604as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9605for as_dir in $PATH
9606do
9607  IFS=$as_save_IFS
9608  test -z "$as_dir" && as_dir=.
9609    for ac_exec_ext in '' $ac_executable_extensions; do
9610  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9611    ac_cv_prog_ac_ct_MANIFEST_TOOL="mt"
9612    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9613    break 2
9614  fi
9615done
9616  done
9617IFS=$as_save_IFS
9618
9619fi
9620fi
9621ac_ct_MANIFEST_TOOL=$ac_cv_prog_ac_ct_MANIFEST_TOOL
9622if test -n "$ac_ct_MANIFEST_TOOL"; then
9623  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MANIFEST_TOOL" >&5
9624$as_echo "$ac_ct_MANIFEST_TOOL" >&6; }
9625else
9626  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9627$as_echo "no" >&6; }
9628fi
9629
9630  if test "x$ac_ct_MANIFEST_TOOL" = x; then
9631    MANIFEST_TOOL=":"
9632  else
9633    case $cross_compiling:$ac_tool_warned in
9634yes:)
9635{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9636$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9637ac_tool_warned=yes ;;
9638esac
9639    MANIFEST_TOOL=$ac_ct_MANIFEST_TOOL
9640  fi
9641else
9642  MANIFEST_TOOL="$ac_cv_prog_MANIFEST_TOOL"
9643fi
9644
9645test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt
9646{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool" >&5
9647$as_echo_n "checking if $MANIFEST_TOOL is a manifest tool... " >&6; }
9648if ${lt_cv_path_mainfest_tool+:} false; then :
9649  $as_echo_n "(cached) " >&6
9650else
9651  lt_cv_path_mainfest_tool=no
9652  echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&5
9653  $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out
9654  cat conftest.err >&5
9655  if $GREP 'Manifest Tool' conftest.out > /dev/null; then
9656    lt_cv_path_mainfest_tool=yes
9657  fi
9658  rm -f conftest*
9659fi
9660{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5
9661$as_echo "$lt_cv_path_mainfest_tool" >&6; }
9662if test yes != "$lt_cv_path_mainfest_tool"; then
9663  MANIFEST_TOOL=:
9664fi
9665
9666
9667
9668
9669
9670
9671  case $host_os in
9672    rhapsody* | darwin*)
9673    if test -n "$ac_tool_prefix"; then
9674  # Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args.
9675set dummy ${ac_tool_prefix}dsymutil; ac_word=$2
9676{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9677$as_echo_n "checking for $ac_word... " >&6; }
9678if ${ac_cv_prog_DSYMUTIL+:} false; then :
9679  $as_echo_n "(cached) " >&6
9680else
9681  if test -n "$DSYMUTIL"; then
9682  ac_cv_prog_DSYMUTIL="$DSYMUTIL" # Let the user override the test.
9683else
9684as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9685for as_dir in $PATH
9686do
9687  IFS=$as_save_IFS
9688  test -z "$as_dir" && as_dir=.
9689    for ac_exec_ext in '' $ac_executable_extensions; do
9690  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9691    ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil"
9692    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9693    break 2
9694  fi
9695done
9696  done
9697IFS=$as_save_IFS
9698
9699fi
9700fi
9701DSYMUTIL=$ac_cv_prog_DSYMUTIL
9702if test -n "$DSYMUTIL"; then
9703  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
9704$as_echo "$DSYMUTIL" >&6; }
9705else
9706  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9707$as_echo "no" >&6; }
9708fi
9709
9710
9711fi
9712if test -z "$ac_cv_prog_DSYMUTIL"; then
9713  ac_ct_DSYMUTIL=$DSYMUTIL
9714  # Extract the first word of "dsymutil", so it can be a program name with args.
9715set dummy dsymutil; ac_word=$2
9716{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9717$as_echo_n "checking for $ac_word... " >&6; }
9718if ${ac_cv_prog_ac_ct_DSYMUTIL+:} false; then :
9719  $as_echo_n "(cached) " >&6
9720else
9721  if test -n "$ac_ct_DSYMUTIL"; then
9722  ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # Let the user override the test.
9723else
9724as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9725for as_dir in $PATH
9726do
9727  IFS=$as_save_IFS
9728  test -z "$as_dir" && as_dir=.
9729    for ac_exec_ext in '' $ac_executable_extensions; do
9730  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9731    ac_cv_prog_ac_ct_DSYMUTIL="dsymutil"
9732    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9733    break 2
9734  fi
9735done
9736  done
9737IFS=$as_save_IFS
9738
9739fi
9740fi
9741ac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL
9742if test -n "$ac_ct_DSYMUTIL"; then
9743  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DSYMUTIL" >&5
9744$as_echo "$ac_ct_DSYMUTIL" >&6; }
9745else
9746  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9747$as_echo "no" >&6; }
9748fi
9749
9750  if test "x$ac_ct_DSYMUTIL" = x; then
9751    DSYMUTIL=":"
9752  else
9753    case $cross_compiling:$ac_tool_warned in
9754yes:)
9755{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9756$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9757ac_tool_warned=yes ;;
9758esac
9759    DSYMUTIL=$ac_ct_DSYMUTIL
9760  fi
9761else
9762  DSYMUTIL="$ac_cv_prog_DSYMUTIL"
9763fi
9764
9765    if test -n "$ac_tool_prefix"; then
9766  # Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args.
9767set dummy ${ac_tool_prefix}nmedit; ac_word=$2
9768{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9769$as_echo_n "checking for $ac_word... " >&6; }
9770if ${ac_cv_prog_NMEDIT+:} false; then :
9771  $as_echo_n "(cached) " >&6
9772else
9773  if test -n "$NMEDIT"; then
9774  ac_cv_prog_NMEDIT="$NMEDIT" # Let the user override the test.
9775else
9776as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9777for as_dir in $PATH
9778do
9779  IFS=$as_save_IFS
9780  test -z "$as_dir" && as_dir=.
9781    for ac_exec_ext in '' $ac_executable_extensions; do
9782  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9783    ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit"
9784    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9785    break 2
9786  fi
9787done
9788  done
9789IFS=$as_save_IFS
9790
9791fi
9792fi
9793NMEDIT=$ac_cv_prog_NMEDIT
9794if test -n "$NMEDIT"; then
9795  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NMEDIT" >&5
9796$as_echo "$NMEDIT" >&6; }
9797else
9798  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9799$as_echo "no" >&6; }
9800fi
9801
9802
9803fi
9804if test -z "$ac_cv_prog_NMEDIT"; then
9805  ac_ct_NMEDIT=$NMEDIT
9806  # Extract the first word of "nmedit", so it can be a program name with args.
9807set dummy nmedit; ac_word=$2
9808{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9809$as_echo_n "checking for $ac_word... " >&6; }
9810if ${ac_cv_prog_ac_ct_NMEDIT+:} false; then :
9811  $as_echo_n "(cached) " >&6
9812else
9813  if test -n "$ac_ct_NMEDIT"; then
9814  ac_cv_prog_ac_ct_NMEDIT="$ac_ct_NMEDIT" # Let the user override the test.
9815else
9816as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9817for as_dir in $PATH
9818do
9819  IFS=$as_save_IFS
9820  test -z "$as_dir" && as_dir=.
9821    for ac_exec_ext in '' $ac_executable_extensions; do
9822  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9823    ac_cv_prog_ac_ct_NMEDIT="nmedit"
9824    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9825    break 2
9826  fi
9827done
9828  done
9829IFS=$as_save_IFS
9830
9831fi
9832fi
9833ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT
9834if test -n "$ac_ct_NMEDIT"; then
9835  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NMEDIT" >&5
9836$as_echo "$ac_ct_NMEDIT" >&6; }
9837else
9838  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9839$as_echo "no" >&6; }
9840fi
9841
9842  if test "x$ac_ct_NMEDIT" = x; then
9843    NMEDIT=":"
9844  else
9845    case $cross_compiling:$ac_tool_warned in
9846yes:)
9847{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9848$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9849ac_tool_warned=yes ;;
9850esac
9851    NMEDIT=$ac_ct_NMEDIT
9852  fi
9853else
9854  NMEDIT="$ac_cv_prog_NMEDIT"
9855fi
9856
9857    if test -n "$ac_tool_prefix"; then
9858  # Extract the first word of "${ac_tool_prefix}lipo", so it can be a program name with args.
9859set dummy ${ac_tool_prefix}lipo; ac_word=$2
9860{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9861$as_echo_n "checking for $ac_word... " >&6; }
9862if ${ac_cv_prog_LIPO+:} false; then :
9863  $as_echo_n "(cached) " >&6
9864else
9865  if test -n "$LIPO"; then
9866  ac_cv_prog_LIPO="$LIPO" # Let the user override the test.
9867else
9868as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9869for as_dir in $PATH
9870do
9871  IFS=$as_save_IFS
9872  test -z "$as_dir" && as_dir=.
9873    for ac_exec_ext in '' $ac_executable_extensions; do
9874  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9875    ac_cv_prog_LIPO="${ac_tool_prefix}lipo"
9876    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9877    break 2
9878  fi
9879done
9880  done
9881IFS=$as_save_IFS
9882
9883fi
9884fi
9885LIPO=$ac_cv_prog_LIPO
9886if test -n "$LIPO"; then
9887  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
9888$as_echo "$LIPO" >&6; }
9889else
9890  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9891$as_echo "no" >&6; }
9892fi
9893
9894
9895fi
9896if test -z "$ac_cv_prog_LIPO"; then
9897  ac_ct_LIPO=$LIPO
9898  # Extract the first word of "lipo", so it can be a program name with args.
9899set dummy lipo; ac_word=$2
9900{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9901$as_echo_n "checking for $ac_word... " >&6; }
9902if ${ac_cv_prog_ac_ct_LIPO+:} false; then :
9903  $as_echo_n "(cached) " >&6
9904else
9905  if test -n "$ac_ct_LIPO"; then
9906  ac_cv_prog_ac_ct_LIPO="$ac_ct_LIPO" # Let the user override the test.
9907else
9908as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9909for as_dir in $PATH
9910do
9911  IFS=$as_save_IFS
9912  test -z "$as_dir" && as_dir=.
9913    for ac_exec_ext in '' $ac_executable_extensions; do
9914  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9915    ac_cv_prog_ac_ct_LIPO="lipo"
9916    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9917    break 2
9918  fi
9919done
9920  done
9921IFS=$as_save_IFS
9922
9923fi
9924fi
9925ac_ct_LIPO=$ac_cv_prog_ac_ct_LIPO
9926if test -n "$ac_ct_LIPO"; then
9927  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LIPO" >&5
9928$as_echo "$ac_ct_LIPO" >&6; }
9929else
9930  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9931$as_echo "no" >&6; }
9932fi
9933
9934  if test "x$ac_ct_LIPO" = x; then
9935    LIPO=":"
9936  else
9937    case $cross_compiling:$ac_tool_warned in
9938yes:)
9939{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9940$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9941ac_tool_warned=yes ;;
9942esac
9943    LIPO=$ac_ct_LIPO
9944  fi
9945else
9946  LIPO="$ac_cv_prog_LIPO"
9947fi
9948
9949    if test -n "$ac_tool_prefix"; then
9950  # Extract the first word of "${ac_tool_prefix}otool", so it can be a program name with args.
9951set dummy ${ac_tool_prefix}otool; ac_word=$2
9952{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9953$as_echo_n "checking for $ac_word... " >&6; }
9954if ${ac_cv_prog_OTOOL+:} false; then :
9955  $as_echo_n "(cached) " >&6
9956else
9957  if test -n "$OTOOL"; then
9958  ac_cv_prog_OTOOL="$OTOOL" # Let the user override the test.
9959else
9960as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9961for as_dir in $PATH
9962do
9963  IFS=$as_save_IFS
9964  test -z "$as_dir" && as_dir=.
9965    for ac_exec_ext in '' $ac_executable_extensions; do
9966  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9967    ac_cv_prog_OTOOL="${ac_tool_prefix}otool"
9968    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9969    break 2
9970  fi
9971done
9972  done
9973IFS=$as_save_IFS
9974
9975fi
9976fi
9977OTOOL=$ac_cv_prog_OTOOL
9978if test -n "$OTOOL"; then
9979  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
9980$as_echo "$OTOOL" >&6; }
9981else
9982  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9983$as_echo "no" >&6; }
9984fi
9985
9986
9987fi
9988if test -z "$ac_cv_prog_OTOOL"; then
9989  ac_ct_OTOOL=$OTOOL
9990  # Extract the first word of "otool", so it can be a program name with args.
9991set dummy otool; ac_word=$2
9992{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9993$as_echo_n "checking for $ac_word... " >&6; }
9994if ${ac_cv_prog_ac_ct_OTOOL+:} false; then :
9995  $as_echo_n "(cached) " >&6
9996else
9997  if test -n "$ac_ct_OTOOL"; then
9998  ac_cv_prog_ac_ct_OTOOL="$ac_ct_OTOOL" # Let the user override the test.
9999else
10000as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10001for as_dir in $PATH
10002do
10003  IFS=$as_save_IFS
10004  test -z "$as_dir" && as_dir=.
10005    for ac_exec_ext in '' $ac_executable_extensions; do
10006  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10007    ac_cv_prog_ac_ct_OTOOL="otool"
10008    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10009    break 2
10010  fi
10011done
10012  done
10013IFS=$as_save_IFS
10014
10015fi
10016fi
10017ac_ct_OTOOL=$ac_cv_prog_ac_ct_OTOOL
10018if test -n "$ac_ct_OTOOL"; then
10019  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL" >&5
10020$as_echo "$ac_ct_OTOOL" >&6; }
10021else
10022  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10023$as_echo "no" >&6; }
10024fi
10025
10026  if test "x$ac_ct_OTOOL" = x; then
10027    OTOOL=":"
10028  else
10029    case $cross_compiling:$ac_tool_warned in
10030yes:)
10031{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
10032$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
10033ac_tool_warned=yes ;;
10034esac
10035    OTOOL=$ac_ct_OTOOL
10036  fi
10037else
10038  OTOOL="$ac_cv_prog_OTOOL"
10039fi
10040
10041    if test -n "$ac_tool_prefix"; then
10042  # Extract the first word of "${ac_tool_prefix}otool64", so it can be a program name with args.
10043set dummy ${ac_tool_prefix}otool64; ac_word=$2
10044{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10045$as_echo_n "checking for $ac_word... " >&6; }
10046if ${ac_cv_prog_OTOOL64+:} false; then :
10047  $as_echo_n "(cached) " >&6
10048else
10049  if test -n "$OTOOL64"; then
10050  ac_cv_prog_OTOOL64="$OTOOL64" # Let the user override the test.
10051else
10052as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10053for as_dir in $PATH
10054do
10055  IFS=$as_save_IFS
10056  test -z "$as_dir" && as_dir=.
10057    for ac_exec_ext in '' $ac_executable_extensions; do
10058  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10059    ac_cv_prog_OTOOL64="${ac_tool_prefix}otool64"
10060    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10061    break 2
10062  fi
10063done
10064  done
10065IFS=$as_save_IFS
10066
10067fi
10068fi
10069OTOOL64=$ac_cv_prog_OTOOL64
10070if test -n "$OTOOL64"; then
10071  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL64" >&5
10072$as_echo "$OTOOL64" >&6; }
10073else
10074  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10075$as_echo "no" >&6; }
10076fi
10077
10078
10079fi
10080if test -z "$ac_cv_prog_OTOOL64"; then
10081  ac_ct_OTOOL64=$OTOOL64
10082  # Extract the first word of "otool64", so it can be a program name with args.
10083set dummy otool64; ac_word=$2
10084{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10085$as_echo_n "checking for $ac_word... " >&6; }
10086if ${ac_cv_prog_ac_ct_OTOOL64+:} false; then :
10087  $as_echo_n "(cached) " >&6
10088else
10089  if test -n "$ac_ct_OTOOL64"; then
10090  ac_cv_prog_ac_ct_OTOOL64="$ac_ct_OTOOL64" # Let the user override the test.
10091else
10092as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10093for as_dir in $PATH
10094do
10095  IFS=$as_save_IFS
10096  test -z "$as_dir" && as_dir=.
10097    for ac_exec_ext in '' $ac_executable_extensions; do
10098  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10099    ac_cv_prog_ac_ct_OTOOL64="otool64"
10100    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10101    break 2
10102  fi
10103done
10104  done
10105IFS=$as_save_IFS
10106
10107fi
10108fi
10109ac_ct_OTOOL64=$ac_cv_prog_ac_ct_OTOOL64
10110if test -n "$ac_ct_OTOOL64"; then
10111  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL64" >&5
10112$as_echo "$ac_ct_OTOOL64" >&6; }
10113else
10114  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10115$as_echo "no" >&6; }
10116fi
10117
10118  if test "x$ac_ct_OTOOL64" = x; then
10119    OTOOL64=":"
10120  else
10121    case $cross_compiling:$ac_tool_warned in
10122yes:)
10123{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
10124$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
10125ac_tool_warned=yes ;;
10126esac
10127    OTOOL64=$ac_ct_OTOOL64
10128  fi
10129else
10130  OTOOL64="$ac_cv_prog_OTOOL64"
10131fi
10132
10133
10134
10135
10136
10137
10138
10139
10140
10141
10142
10143
10144
10145
10146
10147
10148
10149
10150
10151
10152
10153
10154
10155
10156
10157
10158
10159    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -single_module linker flag" >&5
10160$as_echo_n "checking for -single_module linker flag... " >&6; }
10161if ${lt_cv_apple_cc_single_mod+:} false; then :
10162  $as_echo_n "(cached) " >&6
10163else
10164  lt_cv_apple_cc_single_mod=no
10165      if test -z "$LT_MULTI_MODULE"; then
10166	# By default we will add the -single_module flag. You can override
10167	# by either setting the environment variable LT_MULTI_MODULE
10168	# non-empty at configure time, or by adding -multi_module to the
10169	# link flags.
10170	rm -rf libconftest.dylib*
10171	echo "int foo(void){return 1;}" > conftest.c
10172	echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
10173-dynamiclib -Wl,-single_module conftest.c" >&5
10174	$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
10175	  -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
10176        _lt_result=$?
10177	# If there is a non-empty error log, and "single_module"
10178	# appears in it, assume the flag caused a linker warning
10179        if test -s conftest.err && $GREP single_module conftest.err; then
10180	  cat conftest.err >&5
10181	# Otherwise, if the output was created with a 0 exit code from
10182	# the compiler, it worked.
10183	elif test -f libconftest.dylib && test 0 = "$_lt_result"; then
10184	  lt_cv_apple_cc_single_mod=yes
10185	else
10186	  cat conftest.err >&5
10187	fi
10188	rm -rf libconftest.dylib*
10189	rm -f conftest.*
10190      fi
10191fi
10192{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5
10193$as_echo "$lt_cv_apple_cc_single_mod" >&6; }
10194
10195    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5
10196$as_echo_n "checking for -exported_symbols_list linker flag... " >&6; }
10197if ${lt_cv_ld_exported_symbols_list+:} false; then :
10198  $as_echo_n "(cached) " >&6
10199else
10200  lt_cv_ld_exported_symbols_list=no
10201      save_LDFLAGS=$LDFLAGS
10202      echo "_main" > conftest.sym
10203      LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
10204      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10205/* end confdefs.h.  */
10206
10207int
10208main ()
10209{
10210
10211  ;
10212  return 0;
10213}
10214_ACEOF
10215if ac_fn_c_try_link "$LINENO"; then :
10216  lt_cv_ld_exported_symbols_list=yes
10217else
10218  lt_cv_ld_exported_symbols_list=no
10219fi
10220rm -f core conftest.err conftest.$ac_objext \
10221    conftest$ac_exeext conftest.$ac_ext
10222	LDFLAGS=$save_LDFLAGS
10223
10224fi
10225{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5
10226$as_echo "$lt_cv_ld_exported_symbols_list" >&6; }
10227
10228    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -force_load linker flag" >&5
10229$as_echo_n "checking for -force_load linker flag... " >&6; }
10230if ${lt_cv_ld_force_load+:} false; then :
10231  $as_echo_n "(cached) " >&6
10232else
10233  lt_cv_ld_force_load=no
10234      cat > conftest.c << _LT_EOF
10235int forced_loaded() { return 2;}
10236_LT_EOF
10237      echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&5
10238      $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5
10239      echo "$AR cru libconftest.a conftest.o" >&5
10240      $AR cru libconftest.a conftest.o 2>&5
10241      echo "$RANLIB libconftest.a" >&5
10242      $RANLIB libconftest.a 2>&5
10243      cat > conftest.c << _LT_EOF
10244int main() { return 0;}
10245_LT_EOF
10246      echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&5
10247      $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err
10248      _lt_result=$?
10249      if test -s conftest.err && $GREP force_load conftest.err; then
10250	cat conftest.err >&5
10251      elif test -f conftest && test 0 = "$_lt_result" && $GREP forced_load conftest >/dev/null 2>&1; then
10252	lt_cv_ld_force_load=yes
10253      else
10254	cat conftest.err >&5
10255      fi
10256        rm -f conftest.err libconftest.a conftest conftest.c
10257        rm -rf conftest.dSYM
10258
10259fi
10260{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_force_load" >&5
10261$as_echo "$lt_cv_ld_force_load" >&6; }
10262    case $host_os in
10263    rhapsody* | darwin1.[012])
10264      _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;;
10265    darwin1.*)
10266      _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
10267    darwin*) # darwin 5.x on
10268      # if running on 10.5 or later, the deployment target defaults
10269      # to the OS version, if on x86, and 10.4, the deployment
10270      # target defaults to 10.4. Don't you love it?
10271      case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
10272	10.0,*86*-darwin8*|10.0,*-darwin[91]*)
10273	  _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
10274	10.[012][,.]*)
10275	  _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
10276	10.*)
10277	  _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
10278      esac
10279    ;;
10280  esac
10281    if test yes = "$lt_cv_apple_cc_single_mod"; then
10282      _lt_dar_single_mod='$single_module'
10283    fi
10284    if test yes = "$lt_cv_ld_exported_symbols_list"; then
10285      _lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym'
10286    else
10287      _lt_dar_export_syms='~$NMEDIT -s $output_objdir/$libname-symbols.expsym $lib'
10288    fi
10289    if test : != "$DSYMUTIL" && test no = "$lt_cv_ld_force_load"; then
10290      _lt_dsymutil='~$DSYMUTIL $lib || :'
10291    else
10292      _lt_dsymutil=
10293    fi
10294    ;;
10295  esac
10296
10297# func_munge_path_list VARIABLE PATH
10298# -----------------------------------
10299# VARIABLE is name of variable containing _space_ separated list of
10300# directories to be munged by the contents of PATH, which is string
10301# having a format:
10302# "DIR[:DIR]:"
10303#       string "DIR[ DIR]" will be prepended to VARIABLE
10304# ":DIR[:DIR]"
10305#       string "DIR[ DIR]" will be appended to VARIABLE
10306# "DIRP[:DIRP]::[DIRA:]DIRA"
10307#       string "DIRP[ DIRP]" will be prepended to VARIABLE and string
10308#       "DIRA[ DIRA]" will be appended to VARIABLE
10309# "DIR[:DIR]"
10310#       VARIABLE will be replaced by "DIR[ DIR]"
10311func_munge_path_list ()
10312{
10313    case x$2 in
10314    x)
10315        ;;
10316    *:)
10317        eval $1=\"`$ECHO $2 | $SED 's/:/ /g'` \$$1\"
10318        ;;
10319    x:*)
10320        eval $1=\"\$$1 `$ECHO $2 | $SED 's/:/ /g'`\"
10321        ;;
10322    *::*)
10323        eval $1=\"\$$1\ `$ECHO $2 | $SED -e 's/.*:://' -e 's/:/ /g'`\"
10324        eval $1=\"`$ECHO $2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \$$1\"
10325        ;;
10326    *)
10327        eval $1=\"`$ECHO $2 | $SED 's/:/ /g'`\"
10328        ;;
10329    esac
10330}
10331
10332for ac_header in dlfcn.h
10333do :
10334  ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default
10335"
10336if test "x$ac_cv_header_dlfcn_h" = xyes; then :
10337  cat >>confdefs.h <<_ACEOF
10338#define HAVE_DLFCN_H 1
10339_ACEOF
10340
10341fi
10342
10343done
10344
10345
10346
10347
10348
10349
10350
10351# Set options
10352
10353
10354
10355        enable_dlopen=no
10356
10357
10358  enable_win32_dll=no
10359
10360
10361            # Check whether --enable-shared was given.
10362if test "${enable_shared+set}" = set; then :
10363  enableval=$enable_shared; p=${PACKAGE-default}
10364    case $enableval in
10365    yes) enable_shared=yes ;;
10366    no) enable_shared=no ;;
10367    *)
10368      enable_shared=no
10369      # Look at the argument we got.  We use all the common list separators.
10370      lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
10371      for pkg in $enableval; do
10372	IFS=$lt_save_ifs
10373	if test "X$pkg" = "X$p"; then
10374	  enable_shared=yes
10375	fi
10376      done
10377      IFS=$lt_save_ifs
10378      ;;
10379    esac
10380else
10381  enable_shared=yes
10382fi
10383
10384
10385
10386
10387
10388
10389
10390
10391
10392  # Check whether --enable-static was given.
10393if test "${enable_static+set}" = set; then :
10394  enableval=$enable_static; p=${PACKAGE-default}
10395    case $enableval in
10396    yes) enable_static=yes ;;
10397    no) enable_static=no ;;
10398    *)
10399     enable_static=no
10400      # Look at the argument we got.  We use all the common list separators.
10401      lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
10402      for pkg in $enableval; do
10403	IFS=$lt_save_ifs
10404	if test "X$pkg" = "X$p"; then
10405	  enable_static=yes
10406	fi
10407      done
10408      IFS=$lt_save_ifs
10409      ;;
10410    esac
10411else
10412  enable_static=yes
10413fi
10414
10415
10416
10417
10418
10419
10420
10421
10422
10423
10424# Check whether --with-pic was given.
10425if test "${with_pic+set}" = set; then :
10426  withval=$with_pic; lt_p=${PACKAGE-default}
10427    case $withval in
10428    yes|no) pic_mode=$withval ;;
10429    *)
10430      pic_mode=default
10431      # Look at the argument we got.  We use all the common list separators.
10432      lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
10433      for lt_pkg in $withval; do
10434	IFS=$lt_save_ifs
10435	if test "X$lt_pkg" = "X$lt_p"; then
10436	  pic_mode=yes
10437	fi
10438      done
10439      IFS=$lt_save_ifs
10440      ;;
10441    esac
10442else
10443  pic_mode=default
10444fi
10445
10446
10447
10448
10449
10450
10451
10452
10453  # Check whether --enable-fast-install was given.
10454if test "${enable_fast_install+set}" = set; then :
10455  enableval=$enable_fast_install; p=${PACKAGE-default}
10456    case $enableval in
10457    yes) enable_fast_install=yes ;;
10458    no) enable_fast_install=no ;;
10459    *)
10460      enable_fast_install=no
10461      # Look at the argument we got.  We use all the common list separators.
10462      lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
10463      for pkg in $enableval; do
10464	IFS=$lt_save_ifs
10465	if test "X$pkg" = "X$p"; then
10466	  enable_fast_install=yes
10467	fi
10468      done
10469      IFS=$lt_save_ifs
10470      ;;
10471    esac
10472else
10473  enable_fast_install=yes
10474fi
10475
10476
10477
10478
10479
10480
10481
10482
10483  shared_archive_member_spec=
10484case $host,$enable_shared in
10485power*-*-aix[5-9]*,yes)
10486  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of shared library versioning to provide" >&5
10487$as_echo_n "checking which variant of shared library versioning to provide... " >&6; }
10488
10489# Check whether --with-aix-soname was given.
10490if test "${with_aix_soname+set}" = set; then :
10491  withval=$with_aix_soname; case $withval in
10492    aix|svr4|both)
10493      ;;
10494    *)
10495      as_fn_error $? "Unknown argument to --with-aix-soname" "$LINENO" 5
10496      ;;
10497    esac
10498    lt_cv_with_aix_soname=$with_aix_soname
10499else
10500  if ${lt_cv_with_aix_soname+:} false; then :
10501  $as_echo_n "(cached) " >&6
10502else
10503  lt_cv_with_aix_soname=aix
10504fi
10505
10506    with_aix_soname=$lt_cv_with_aix_soname
10507fi
10508
10509  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_aix_soname" >&5
10510$as_echo "$with_aix_soname" >&6; }
10511  if test aix != "$with_aix_soname"; then
10512    # For the AIX way of multilib, we name the shared archive member
10513    # based on the bitwidth used, traditionally 'shr.o' or 'shr_64.o',
10514    # and 'shr.imp' or 'shr_64.imp', respectively, for the Import File.
10515    # Even when GNU compilers ignore OBJECT_MODE but need '-maix64' flag,
10516    # the AIX toolchain works better with OBJECT_MODE set (default 32).
10517    if test 64 = "${OBJECT_MODE-32}"; then
10518      shared_archive_member_spec=shr_64
10519    else
10520      shared_archive_member_spec=shr
10521    fi
10522  fi
10523  ;;
10524*)
10525  with_aix_soname=aix
10526  ;;
10527esac
10528
10529
10530
10531
10532
10533
10534
10535
10536
10537
10538# This can be used to rebuild libtool when needed
10539LIBTOOL_DEPS=$ltmain
10540
10541# Always use our own libtool.
10542LIBTOOL='$(SHELL) $(top_builddir)/libtool'
10543
10544
10545
10546
10547
10548
10549
10550
10551
10552
10553
10554
10555
10556
10557
10558
10559
10560
10561
10562
10563
10564
10565
10566
10567
10568
10569
10570
10571
10572
10573test -z "$LN_S" && LN_S="ln -s"
10574
10575
10576
10577
10578
10579
10580
10581
10582
10583
10584
10585
10586
10587
10588if test -n "${ZSH_VERSION+set}"; then
10589   setopt NO_GLOB_SUBST
10590fi
10591
10592{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5
10593$as_echo_n "checking for objdir... " >&6; }
10594if ${lt_cv_objdir+:} false; then :
10595  $as_echo_n "(cached) " >&6
10596else
10597  rm -f .libs 2>/dev/null
10598mkdir .libs 2>/dev/null
10599if test -d .libs; then
10600  lt_cv_objdir=.libs
10601else
10602  # MS-DOS does not allow filenames that begin with a dot.
10603  lt_cv_objdir=_libs
10604fi
10605rmdir .libs 2>/dev/null
10606fi
10607{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_objdir" >&5
10608$as_echo "$lt_cv_objdir" >&6; }
10609objdir=$lt_cv_objdir
10610
10611
10612
10613
10614
10615cat >>confdefs.h <<_ACEOF
10616#define LT_OBJDIR "$lt_cv_objdir/"
10617_ACEOF
10618
10619
10620
10621
10622case $host_os in
10623aix3*)
10624  # AIX sometimes has problems with the GCC collect2 program.  For some
10625  # reason, if we set the COLLECT_NAMES environment variable, the problems
10626  # vanish in a puff of smoke.
10627  if test set != "${COLLECT_NAMES+set}"; then
10628    COLLECT_NAMES=
10629    export COLLECT_NAMES
10630  fi
10631  ;;
10632esac
10633
10634# Global variables:
10635ofile=libtool
10636can_build_shared=yes
10637
10638# All known linkers require a '.a' archive for static linking (except MSVC,
10639# which needs '.lib').
10640libext=a
10641
10642with_gnu_ld=$lt_cv_prog_gnu_ld
10643
10644old_CC=$CC
10645old_CFLAGS=$CFLAGS
10646
10647# Set sane defaults for various variables
10648test -z "$CC" && CC=cc
10649test -z "$LTCC" && LTCC=$CC
10650test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
10651test -z "$LD" && LD=ld
10652test -z "$ac_objext" && ac_objext=o
10653
10654func_cc_basename $compiler
10655cc_basename=$func_cc_basename_result
10656
10657
10658# Only perform the check for file, if the check method requires it
10659test -z "$MAGIC_CMD" && MAGIC_CMD=file
10660case $deplibs_check_method in
10661file_magic*)
10662  if test "$file_magic_cmd" = '$MAGIC_CMD'; then
10663    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5
10664$as_echo_n "checking for ${ac_tool_prefix}file... " >&6; }
10665if ${lt_cv_path_MAGIC_CMD+:} false; then :
10666  $as_echo_n "(cached) " >&6
10667else
10668  case $MAGIC_CMD in
10669[\\/*] |  ?:[\\/]*)
10670  lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path.
10671  ;;
10672*)
10673  lt_save_MAGIC_CMD=$MAGIC_CMD
10674  lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
10675  ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
10676  for ac_dir in $ac_dummy; do
10677    IFS=$lt_save_ifs
10678    test -z "$ac_dir" && ac_dir=.
10679    if test -f "$ac_dir/${ac_tool_prefix}file"; then
10680      lt_cv_path_MAGIC_CMD=$ac_dir/"${ac_tool_prefix}file"
10681      if test -n "$file_magic_test_file"; then
10682	case $deplibs_check_method in
10683	"file_magic "*)
10684	  file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
10685	  MAGIC_CMD=$lt_cv_path_MAGIC_CMD
10686	  if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
10687	    $EGREP "$file_magic_regex" > /dev/null; then
10688	    :
10689	  else
10690	    cat <<_LT_EOF 1>&2
10691
10692*** Warning: the command libtool uses to detect shared libraries,
10693*** $file_magic_cmd, produces output that libtool cannot recognize.
10694*** The result is that libtool may fail to recognize shared libraries
10695*** as such.  This will affect the creation of libtool libraries that
10696*** depend on shared libraries, but programs linked with such libtool
10697*** libraries will work regardless of this problem.  Nevertheless, you
10698*** may want to report the problem to your system manager and/or to
10699*** bug-libtool@gnu.org
10700
10701_LT_EOF
10702	  fi ;;
10703	esac
10704      fi
10705      break
10706    fi
10707  done
10708  IFS=$lt_save_ifs
10709  MAGIC_CMD=$lt_save_MAGIC_CMD
10710  ;;
10711esac
10712fi
10713
10714MAGIC_CMD=$lt_cv_path_MAGIC_CMD
10715if test -n "$MAGIC_CMD"; then
10716  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5
10717$as_echo "$MAGIC_CMD" >&6; }
10718else
10719  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10720$as_echo "no" >&6; }
10721fi
10722
10723
10724
10725
10726
10727if test -z "$lt_cv_path_MAGIC_CMD"; then
10728  if test -n "$ac_tool_prefix"; then
10729    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for file" >&5
10730$as_echo_n "checking for file... " >&6; }
10731if ${lt_cv_path_MAGIC_CMD+:} false; then :
10732  $as_echo_n "(cached) " >&6
10733else
10734  case $MAGIC_CMD in
10735[\\/*] |  ?:[\\/]*)
10736  lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path.
10737  ;;
10738*)
10739  lt_save_MAGIC_CMD=$MAGIC_CMD
10740  lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
10741  ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
10742  for ac_dir in $ac_dummy; do
10743    IFS=$lt_save_ifs
10744    test -z "$ac_dir" && ac_dir=.
10745    if test -f "$ac_dir/file"; then
10746      lt_cv_path_MAGIC_CMD=$ac_dir/"file"
10747      if test -n "$file_magic_test_file"; then
10748	case $deplibs_check_method in
10749	"file_magic "*)
10750	  file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
10751	  MAGIC_CMD=$lt_cv_path_MAGIC_CMD
10752	  if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
10753	    $EGREP "$file_magic_regex" > /dev/null; then
10754	    :
10755	  else
10756	    cat <<_LT_EOF 1>&2
10757
10758*** Warning: the command libtool uses to detect shared libraries,
10759*** $file_magic_cmd, produces output that libtool cannot recognize.
10760*** The result is that libtool may fail to recognize shared libraries
10761*** as such.  This will affect the creation of libtool libraries that
10762*** depend on shared libraries, but programs linked with such libtool
10763*** libraries will work regardless of this problem.  Nevertheless, you
10764*** may want to report the problem to your system manager and/or to
10765*** bug-libtool@gnu.org
10766
10767_LT_EOF
10768	  fi ;;
10769	esac
10770      fi
10771      break
10772    fi
10773  done
10774  IFS=$lt_save_ifs
10775  MAGIC_CMD=$lt_save_MAGIC_CMD
10776  ;;
10777esac
10778fi
10779
10780MAGIC_CMD=$lt_cv_path_MAGIC_CMD
10781if test -n "$MAGIC_CMD"; then
10782  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5
10783$as_echo "$MAGIC_CMD" >&6; }
10784else
10785  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10786$as_echo "no" >&6; }
10787fi
10788
10789
10790  else
10791    MAGIC_CMD=:
10792  fi
10793fi
10794
10795  fi
10796  ;;
10797esac
10798
10799# Use C for the default configuration in the libtool script
10800
10801lt_save_CC=$CC
10802ac_ext=c
10803ac_cpp='$CPP $CPPFLAGS'
10804ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
10805ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
10806ac_compiler_gnu=$ac_cv_c_compiler_gnu
10807
10808
10809# Source file extension for C test sources.
10810ac_ext=c
10811
10812# Object file extension for compiled C test sources.
10813objext=o
10814objext=$objext
10815
10816# Code to be used in simple compile tests
10817lt_simple_compile_test_code="int some_variable = 0;"
10818
10819# Code to be used in simple link tests
10820lt_simple_link_test_code='int main(){return(0);}'
10821
10822
10823
10824
10825
10826
10827
10828# If no C compiler was specified, use CC.
10829LTCC=${LTCC-"$CC"}
10830
10831# If no C compiler flags were specified, use CFLAGS.
10832LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
10833
10834# Allow CC to be a program name with arguments.
10835compiler=$CC
10836
10837# Save the default compiler, since it gets overwritten when the other
10838# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
10839compiler_DEFAULT=$CC
10840
10841# save warnings/boilerplate of simple test code
10842ac_outfile=conftest.$ac_objext
10843echo "$lt_simple_compile_test_code" >conftest.$ac_ext
10844eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
10845_lt_compiler_boilerplate=`cat conftest.err`
10846$RM conftest*
10847
10848ac_outfile=conftest.$ac_objext
10849echo "$lt_simple_link_test_code" >conftest.$ac_ext
10850eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
10851_lt_linker_boilerplate=`cat conftest.err`
10852$RM -r conftest*
10853
10854
10855if test -n "$compiler"; then
10856
10857lt_prog_compiler_no_builtin_flag=
10858
10859if test yes = "$GCC"; then
10860  case $cc_basename in
10861  nvcc*)
10862    lt_prog_compiler_no_builtin_flag=' -Xcompiler -fno-builtin' ;;
10863  *)
10864    lt_prog_compiler_no_builtin_flag=' -fno-builtin' ;;
10865  esac
10866
10867  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
10868$as_echo_n "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; }
10869if ${lt_cv_prog_compiler_rtti_exceptions+:} false; then :
10870  $as_echo_n "(cached) " >&6
10871else
10872  lt_cv_prog_compiler_rtti_exceptions=no
10873   ac_outfile=conftest.$ac_objext
10874   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
10875   lt_compiler_flag="-fno-rtti -fno-exceptions"  ## exclude from sc_useless_quotes_in_assignment
10876   # Insert the option either (1) after the last *FLAGS variable, or
10877   # (2) before a word containing "conftest.", or (3) at the end.
10878   # Note that $ac_compile itself does not contain backslashes and begins
10879   # with a dollar sign (not a hyphen), so the echo should work correctly.
10880   # The option is referenced via a variable to avoid confusing sed.
10881   lt_compile=`echo "$ac_compile" | $SED \
10882   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
10883   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
10884   -e 's:$: $lt_compiler_flag:'`
10885   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
10886   (eval "$lt_compile" 2>conftest.err)
10887   ac_status=$?
10888   cat conftest.err >&5
10889   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10890   if (exit $ac_status) && test -s "$ac_outfile"; then
10891     # The compiler can only warn and ignore the option if not recognized
10892     # So say no if there are warnings other than the usual output.
10893     $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
10894     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
10895     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
10896       lt_cv_prog_compiler_rtti_exceptions=yes
10897     fi
10898   fi
10899   $RM conftest*
10900
10901fi
10902{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5
10903$as_echo "$lt_cv_prog_compiler_rtti_exceptions" >&6; }
10904
10905if test yes = "$lt_cv_prog_compiler_rtti_exceptions"; then
10906    lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions"
10907else
10908    :
10909fi
10910
10911fi
10912
10913
10914
10915
10916
10917
10918  lt_prog_compiler_wl=
10919lt_prog_compiler_pic=
10920lt_prog_compiler_static=
10921
10922
10923  if test yes = "$GCC"; then
10924    lt_prog_compiler_wl='-Wl,'
10925    lt_prog_compiler_static='-static'
10926
10927    case $host_os in
10928      aix*)
10929      # All AIX code is PIC.
10930      if test ia64 = "$host_cpu"; then
10931	# AIX 5 now supports IA64 processor
10932	lt_prog_compiler_static='-Bstatic'
10933      fi
10934      lt_prog_compiler_pic='-fPIC'
10935      ;;
10936
10937    amigaos*)
10938      case $host_cpu in
10939      powerpc)
10940            # see comment about AmigaOS4 .so support
10941            lt_prog_compiler_pic='-fPIC'
10942        ;;
10943      m68k)
10944            # FIXME: we need at least 68020 code to build shared libraries, but
10945            # adding the '-m68020' flag to GCC prevents building anything better,
10946            # like '-m68040'.
10947            lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4'
10948        ;;
10949      esac
10950      ;;
10951
10952    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
10953      # PIC is the default for these OSes.
10954      ;;
10955
10956    mingw* | cygwin* | pw32* | os2* | cegcc*)
10957      # This hack is so that the source file can tell whether it is being
10958      # built for inclusion in a dll (and should export symbols for example).
10959      # Although the cygwin gcc ignores -fPIC, still need this for old-style
10960      # (--disable-auto-import) libraries
10961      lt_prog_compiler_pic='-DDLL_EXPORT'
10962      case $host_os in
10963      os2*)
10964	lt_prog_compiler_static='$wl-static'
10965	;;
10966      esac
10967      ;;
10968
10969    darwin* | rhapsody*)
10970      # PIC is the default on this platform
10971      # Common symbols not allowed in MH_DYLIB files
10972      lt_prog_compiler_pic='-fno-common'
10973      ;;
10974
10975    haiku*)
10976      # PIC is the default for Haiku.
10977      # The "-static" flag exists, but is broken.
10978      lt_prog_compiler_static=
10979      ;;
10980
10981    hpux*)
10982      # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
10983      # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
10984      # sets the default TLS model and affects inlining.
10985      case $host_cpu in
10986      hppa*64*)
10987	# +Z the default
10988	;;
10989      *)
10990	lt_prog_compiler_pic='-fPIC'
10991	;;
10992      esac
10993      ;;
10994
10995    interix[3-9]*)
10996      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
10997      # Instead, we relocate shared libraries at runtime.
10998      ;;
10999
11000    msdosdjgpp*)
11001      # Just because we use GCC doesn't mean we suddenly get shared libraries
11002      # on systems that don't support them.
11003      lt_prog_compiler_can_build_shared=no
11004      enable_shared=no
11005      ;;
11006
11007    *nto* | *qnx*)
11008      # QNX uses GNU C++, but need to define -shared option too, otherwise
11009      # it will coredump.
11010      lt_prog_compiler_pic='-fPIC -shared'
11011      ;;
11012
11013    sysv4*MP*)
11014      if test -d /usr/nec; then
11015	lt_prog_compiler_pic=-Kconform_pic
11016      fi
11017      ;;
11018
11019    *)
11020      lt_prog_compiler_pic='-fPIC'
11021      ;;
11022    esac
11023
11024    case $cc_basename in
11025    nvcc*) # Cuda Compiler Driver 2.2
11026      lt_prog_compiler_wl='-Xlinker '
11027      if test -n "$lt_prog_compiler_pic"; then
11028        lt_prog_compiler_pic="-Xcompiler $lt_prog_compiler_pic"
11029      fi
11030      ;;
11031    esac
11032  else
11033    # PORTME Check for flag to pass linker flags through the system compiler.
11034    case $host_os in
11035    aix*)
11036      lt_prog_compiler_wl='-Wl,'
11037      if test ia64 = "$host_cpu"; then
11038	# AIX 5 now supports IA64 processor
11039	lt_prog_compiler_static='-Bstatic'
11040      else
11041	lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp'
11042      fi
11043      ;;
11044
11045    darwin* | rhapsody*)
11046      # PIC is the default on this platform
11047      # Common symbols not allowed in MH_DYLIB files
11048      lt_prog_compiler_pic='-fno-common'
11049      case $cc_basename in
11050      nagfor*)
11051        # NAG Fortran compiler
11052        lt_prog_compiler_wl='-Wl,-Wl,,'
11053        lt_prog_compiler_pic='-PIC'
11054        lt_prog_compiler_static='-Bstatic'
11055        ;;
11056      esac
11057      ;;
11058
11059    mingw* | cygwin* | pw32* | os2* | cegcc*)
11060      # This hack is so that the source file can tell whether it is being
11061      # built for inclusion in a dll (and should export symbols for example).
11062      lt_prog_compiler_pic='-DDLL_EXPORT'
11063      case $host_os in
11064      os2*)
11065	lt_prog_compiler_static='$wl-static'
11066	;;
11067      esac
11068      ;;
11069
11070    hpux9* | hpux10* | hpux11*)
11071      lt_prog_compiler_wl='-Wl,'
11072      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
11073      # not for PA HP-UX.
11074      case $host_cpu in
11075      hppa*64*|ia64*)
11076	# +Z the default
11077	;;
11078      *)
11079	lt_prog_compiler_pic='+Z'
11080	;;
11081      esac
11082      # Is there a better lt_prog_compiler_static that works with the bundled CC?
11083      lt_prog_compiler_static='$wl-a ${wl}archive'
11084      ;;
11085
11086    irix5* | irix6* | nonstopux*)
11087      lt_prog_compiler_wl='-Wl,'
11088      # PIC (with -KPIC) is the default.
11089      lt_prog_compiler_static='-non_shared'
11090      ;;
11091
11092    linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
11093      case $cc_basename in
11094      # old Intel for x86_64, which still supported -KPIC.
11095      ecc*)
11096	lt_prog_compiler_wl='-Wl,'
11097	lt_prog_compiler_pic='-KPIC'
11098	lt_prog_compiler_static='-static'
11099        ;;
11100      # icc used to be incompatible with GCC.
11101      # ICC 10 doesn't accept -KPIC any more.
11102      icc* | ifort*)
11103	lt_prog_compiler_wl='-Wl,'
11104	lt_prog_compiler_pic='-fPIC'
11105	lt_prog_compiler_static='-static'
11106        ;;
11107      # Lahey Fortran 8.1.
11108      lf95*)
11109	lt_prog_compiler_wl='-Wl,'
11110	lt_prog_compiler_pic='--shared'
11111	lt_prog_compiler_static='--static'
11112	;;
11113      nagfor*)
11114	# NAG Fortran compiler
11115	lt_prog_compiler_wl='-Wl,-Wl,,'
11116	lt_prog_compiler_pic='-PIC'
11117	lt_prog_compiler_static='-Bstatic'
11118	;;
11119      tcc*)
11120	# Fabrice Bellard et al's Tiny C Compiler
11121	lt_prog_compiler_wl='-Wl,'
11122	lt_prog_compiler_pic='-fPIC'
11123	lt_prog_compiler_static='-static'
11124	;;
11125      pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
11126        # Portland Group compilers (*not* the Pentium gcc compiler,
11127	# which looks to be a dead project)
11128	lt_prog_compiler_wl='-Wl,'
11129	lt_prog_compiler_pic='-fpic'
11130	lt_prog_compiler_static='-Bstatic'
11131        ;;
11132      ccc*)
11133        lt_prog_compiler_wl='-Wl,'
11134        # All Alpha code is PIC.
11135        lt_prog_compiler_static='-non_shared'
11136        ;;
11137      xl* | bgxl* | bgf* | mpixl*)
11138	# IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene
11139	lt_prog_compiler_wl='-Wl,'
11140	lt_prog_compiler_pic='-qpic'
11141	lt_prog_compiler_static='-qstaticlink'
11142	;;
11143      *)
11144	case `$CC -V 2>&1 | sed 5q` in
11145	*Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [1-7].* | *Sun*Fortran*\ 8.[0-3]*)
11146	  # Sun Fortran 8.3 passes all unrecognized flags to the linker
11147	  lt_prog_compiler_pic='-KPIC'
11148	  lt_prog_compiler_static='-Bstatic'
11149	  lt_prog_compiler_wl=''
11150	  ;;
11151	*Sun\ F* | *Sun*Fortran*)
11152	  lt_prog_compiler_pic='-KPIC'
11153	  lt_prog_compiler_static='-Bstatic'
11154	  lt_prog_compiler_wl='-Qoption ld '
11155	  ;;
11156	*Sun\ C*)
11157	  # Sun C 5.9
11158	  lt_prog_compiler_pic='-KPIC'
11159	  lt_prog_compiler_static='-Bstatic'
11160	  lt_prog_compiler_wl='-Wl,'
11161	  ;;
11162        *Intel*\ [CF]*Compiler*)
11163	  lt_prog_compiler_wl='-Wl,'
11164	  lt_prog_compiler_pic='-fPIC'
11165	  lt_prog_compiler_static='-static'
11166	  ;;
11167	*Portland\ Group*)
11168	  lt_prog_compiler_wl='-Wl,'
11169	  lt_prog_compiler_pic='-fpic'
11170	  lt_prog_compiler_static='-Bstatic'
11171	  ;;
11172	esac
11173	;;
11174      esac
11175      ;;
11176
11177    newsos6)
11178      lt_prog_compiler_pic='-KPIC'
11179      lt_prog_compiler_static='-Bstatic'
11180      ;;
11181
11182    *nto* | *qnx*)
11183      # QNX uses GNU C++, but need to define -shared option too, otherwise
11184      # it will coredump.
11185      lt_prog_compiler_pic='-fPIC -shared'
11186      ;;
11187
11188    osf3* | osf4* | osf5*)
11189      lt_prog_compiler_wl='-Wl,'
11190      # All OSF/1 code is PIC.
11191      lt_prog_compiler_static='-non_shared'
11192      ;;
11193
11194    rdos*)
11195      lt_prog_compiler_static='-non_shared'
11196      ;;
11197
11198    solaris*)
11199      lt_prog_compiler_pic='-KPIC'
11200      lt_prog_compiler_static='-Bstatic'
11201      case $cc_basename in
11202      f77* | f90* | f95* | sunf77* | sunf90* | sunf95*)
11203	lt_prog_compiler_wl='-Qoption ld ';;
11204      *)
11205	lt_prog_compiler_wl='-Wl,';;
11206      esac
11207      ;;
11208
11209    sunos4*)
11210      lt_prog_compiler_wl='-Qoption ld '
11211      lt_prog_compiler_pic='-PIC'
11212      lt_prog_compiler_static='-Bstatic'
11213      ;;
11214
11215    sysv4 | sysv4.2uw2* | sysv4.3*)
11216      lt_prog_compiler_wl='-Wl,'
11217      lt_prog_compiler_pic='-KPIC'
11218      lt_prog_compiler_static='-Bstatic'
11219      ;;
11220
11221    sysv4*MP*)
11222      if test -d /usr/nec; then
11223	lt_prog_compiler_pic='-Kconform_pic'
11224	lt_prog_compiler_static='-Bstatic'
11225      fi
11226      ;;
11227
11228    sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
11229      lt_prog_compiler_wl='-Wl,'
11230      lt_prog_compiler_pic='-KPIC'
11231      lt_prog_compiler_static='-Bstatic'
11232      ;;
11233
11234    unicos*)
11235      lt_prog_compiler_wl='-Wl,'
11236      lt_prog_compiler_can_build_shared=no
11237      ;;
11238
11239    uts4*)
11240      lt_prog_compiler_pic='-pic'
11241      lt_prog_compiler_static='-Bstatic'
11242      ;;
11243
11244    *)
11245      lt_prog_compiler_can_build_shared=no
11246      ;;
11247    esac
11248  fi
11249
11250case $host_os in
11251  # For platforms that do not support PIC, -DPIC is meaningless:
11252  *djgpp*)
11253    lt_prog_compiler_pic=
11254    ;;
11255  *)
11256    lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC"
11257    ;;
11258esac
11259
11260{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5
11261$as_echo_n "checking for $compiler option to produce PIC... " >&6; }
11262if ${lt_cv_prog_compiler_pic+:} false; then :
11263  $as_echo_n "(cached) " >&6
11264else
11265  lt_cv_prog_compiler_pic=$lt_prog_compiler_pic
11266fi
11267{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic" >&5
11268$as_echo "$lt_cv_prog_compiler_pic" >&6; }
11269lt_prog_compiler_pic=$lt_cv_prog_compiler_pic
11270
11271#
11272# Check to make sure the PIC flag actually works.
11273#
11274if test -n "$lt_prog_compiler_pic"; then
11275  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5
11276$as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; }
11277if ${lt_cv_prog_compiler_pic_works+:} false; then :
11278  $as_echo_n "(cached) " >&6
11279else
11280  lt_cv_prog_compiler_pic_works=no
11281   ac_outfile=conftest.$ac_objext
11282   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
11283   lt_compiler_flag="$lt_prog_compiler_pic -DPIC"  ## exclude from sc_useless_quotes_in_assignment
11284   # Insert the option either (1) after the last *FLAGS variable, or
11285   # (2) before a word containing "conftest.", or (3) at the end.
11286   # Note that $ac_compile itself does not contain backslashes and begins
11287   # with a dollar sign (not a hyphen), so the echo should work correctly.
11288   # The option is referenced via a variable to avoid confusing sed.
11289   lt_compile=`echo "$ac_compile" | $SED \
11290   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
11291   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
11292   -e 's:$: $lt_compiler_flag:'`
11293   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
11294   (eval "$lt_compile" 2>conftest.err)
11295   ac_status=$?
11296   cat conftest.err >&5
11297   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11298   if (exit $ac_status) && test -s "$ac_outfile"; then
11299     # The compiler can only warn and ignore the option if not recognized
11300     # So say no if there are warnings other than the usual output.
11301     $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
11302     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
11303     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
11304       lt_cv_prog_compiler_pic_works=yes
11305     fi
11306   fi
11307   $RM conftest*
11308
11309fi
11310{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5
11311$as_echo "$lt_cv_prog_compiler_pic_works" >&6; }
11312
11313if test yes = "$lt_cv_prog_compiler_pic_works"; then
11314    case $lt_prog_compiler_pic in
11315     "" | " "*) ;;
11316     *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;;
11317     esac
11318else
11319    lt_prog_compiler_pic=
11320     lt_prog_compiler_can_build_shared=no
11321fi
11322
11323fi
11324
11325
11326
11327
11328
11329
11330
11331
11332
11333
11334
11335#
11336# Check to make sure the static flag actually works.
11337#
11338wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\"
11339{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5
11340$as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; }
11341if ${lt_cv_prog_compiler_static_works+:} false; then :
11342  $as_echo_n "(cached) " >&6
11343else
11344  lt_cv_prog_compiler_static_works=no
11345   save_LDFLAGS=$LDFLAGS
11346   LDFLAGS="$LDFLAGS $lt_tmp_static_flag"
11347   echo "$lt_simple_link_test_code" > conftest.$ac_ext
11348   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
11349     # The linker can only warn and ignore the option if not recognized
11350     # So say no if there are warnings
11351     if test -s conftest.err; then
11352       # Append any errors to the config.log.
11353       cat conftest.err 1>&5
11354       $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
11355       $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
11356       if diff conftest.exp conftest.er2 >/dev/null; then
11357         lt_cv_prog_compiler_static_works=yes
11358       fi
11359     else
11360       lt_cv_prog_compiler_static_works=yes
11361     fi
11362   fi
11363   $RM -r conftest*
11364   LDFLAGS=$save_LDFLAGS
11365
11366fi
11367{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5
11368$as_echo "$lt_cv_prog_compiler_static_works" >&6; }
11369
11370if test yes = "$lt_cv_prog_compiler_static_works"; then
11371    :
11372else
11373    lt_prog_compiler_static=
11374fi
11375
11376
11377
11378
11379
11380
11381
11382  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
11383$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
11384if ${lt_cv_prog_compiler_c_o+:} false; then :
11385  $as_echo_n "(cached) " >&6
11386else
11387  lt_cv_prog_compiler_c_o=no
11388   $RM -r conftest 2>/dev/null
11389   mkdir conftest
11390   cd conftest
11391   mkdir out
11392   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
11393
11394   lt_compiler_flag="-o out/conftest2.$ac_objext"
11395   # Insert the option either (1) after the last *FLAGS variable, or
11396   # (2) before a word containing "conftest.", or (3) at the end.
11397   # Note that $ac_compile itself does not contain backslashes and begins
11398   # with a dollar sign (not a hyphen), so the echo should work correctly.
11399   lt_compile=`echo "$ac_compile" | $SED \
11400   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
11401   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
11402   -e 's:$: $lt_compiler_flag:'`
11403   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
11404   (eval "$lt_compile" 2>out/conftest.err)
11405   ac_status=$?
11406   cat out/conftest.err >&5
11407   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11408   if (exit $ac_status) && test -s out/conftest2.$ac_objext
11409   then
11410     # The compiler can only warn and ignore the option if not recognized
11411     # So say no if there are warnings
11412     $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
11413     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
11414     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
11415       lt_cv_prog_compiler_c_o=yes
11416     fi
11417   fi
11418   chmod u+w . 2>&5
11419   $RM conftest*
11420   # SGI C++ compiler will create directory out/ii_files/ for
11421   # template instantiation
11422   test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
11423   $RM out/* && rmdir out
11424   cd ..
11425   $RM -r conftest
11426   $RM conftest*
11427
11428fi
11429{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5
11430$as_echo "$lt_cv_prog_compiler_c_o" >&6; }
11431
11432
11433
11434
11435
11436
11437  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
11438$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
11439if ${lt_cv_prog_compiler_c_o+:} false; then :
11440  $as_echo_n "(cached) " >&6
11441else
11442  lt_cv_prog_compiler_c_o=no
11443   $RM -r conftest 2>/dev/null
11444   mkdir conftest
11445   cd conftest
11446   mkdir out
11447   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
11448
11449   lt_compiler_flag="-o out/conftest2.$ac_objext"
11450   # Insert the option either (1) after the last *FLAGS variable, or
11451   # (2) before a word containing "conftest.", or (3) at the end.
11452   # Note that $ac_compile itself does not contain backslashes and begins
11453   # with a dollar sign (not a hyphen), so the echo should work correctly.
11454   lt_compile=`echo "$ac_compile" | $SED \
11455   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
11456   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
11457   -e 's:$: $lt_compiler_flag:'`
11458   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
11459   (eval "$lt_compile" 2>out/conftest.err)
11460   ac_status=$?
11461   cat out/conftest.err >&5
11462   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11463   if (exit $ac_status) && test -s out/conftest2.$ac_objext
11464   then
11465     # The compiler can only warn and ignore the option if not recognized
11466     # So say no if there are warnings
11467     $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
11468     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
11469     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
11470       lt_cv_prog_compiler_c_o=yes
11471     fi
11472   fi
11473   chmod u+w . 2>&5
11474   $RM conftest*
11475   # SGI C++ compiler will create directory out/ii_files/ for
11476   # template instantiation
11477   test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
11478   $RM out/* && rmdir out
11479   cd ..
11480   $RM -r conftest
11481   $RM conftest*
11482
11483fi
11484{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5
11485$as_echo "$lt_cv_prog_compiler_c_o" >&6; }
11486
11487
11488
11489
11490hard_links=nottested
11491if test no = "$lt_cv_prog_compiler_c_o" && test no != "$need_locks"; then
11492  # do not overwrite the value of need_locks provided by the user
11493  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5
11494$as_echo_n "checking if we can lock with hard links... " >&6; }
11495  hard_links=yes
11496  $RM conftest*
11497  ln conftest.a conftest.b 2>/dev/null && hard_links=no
11498  touch conftest.a
11499  ln conftest.a conftest.b 2>&5 || hard_links=no
11500  ln conftest.a conftest.b 2>/dev/null && hard_links=no
11501  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5
11502$as_echo "$hard_links" >&6; }
11503  if test no = "$hard_links"; then
11504    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&5
11505$as_echo "$as_me: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&2;}
11506    need_locks=warn
11507  fi
11508else
11509  need_locks=no
11510fi
11511
11512
11513
11514
11515
11516
11517  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5
11518$as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; }
11519
11520  runpath_var=
11521  allow_undefined_flag=
11522  always_export_symbols=no
11523  archive_cmds=
11524  archive_expsym_cmds=
11525  compiler_needs_object=no
11526  enable_shared_with_static_runtimes=no
11527  export_dynamic_flag_spec=
11528  export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
11529  hardcode_automatic=no
11530  hardcode_direct=no
11531  hardcode_direct_absolute=no
11532  hardcode_libdir_flag_spec=
11533  hardcode_libdir_separator=
11534  hardcode_minus_L=no
11535  hardcode_shlibpath_var=unsupported
11536  inherit_rpath=no
11537  link_all_deplibs=unknown
11538  module_cmds=
11539  module_expsym_cmds=
11540  old_archive_from_new_cmds=
11541  old_archive_from_expsyms_cmds=
11542  thread_safe_flag_spec=
11543  whole_archive_flag_spec=
11544  # include_expsyms should be a list of space-separated symbols to be *always*
11545  # included in the symbol list
11546  include_expsyms=
11547  # exclude_expsyms can be an extended regexp of symbols to exclude
11548  # it will be wrapped by ' (' and ')$', so one must not match beginning or
11549  # end of line.  Example: 'a|bc|.*d.*' will exclude the symbols 'a' and 'bc',
11550  # as well as any symbol that contains 'd'.
11551  exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'
11552  # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
11553  # platforms (ab)use it in PIC code, but their linkers get confused if
11554  # the symbol is explicitly referenced.  Since portable code cannot
11555  # rely on this symbol name, it's probably fine to never include it in
11556  # preloaded symbol tables.
11557  # Exclude shared library initialization/finalization symbols.
11558  extract_expsyms_cmds=
11559
11560  case $host_os in
11561  cygwin* | mingw* | pw32* | cegcc*)
11562    # FIXME: the MSVC++ port hasn't been tested in a loooong time
11563    # When not using gcc, we currently assume that we are using
11564    # Microsoft Visual C++.
11565    if test yes != "$GCC"; then
11566      with_gnu_ld=no
11567    fi
11568    ;;
11569  interix*)
11570    # we just hope/assume this is gcc and not c89 (= MSVC++)
11571    with_gnu_ld=yes
11572    ;;
11573  openbsd* | bitrig*)
11574    with_gnu_ld=no
11575    ;;
11576  esac
11577
11578  ld_shlibs=yes
11579
11580  # On some targets, GNU ld is compatible enough with the native linker
11581  # that we're better off using the native interface for both.
11582  lt_use_gnu_ld_interface=no
11583  if test yes = "$with_gnu_ld"; then
11584    case $host_os in
11585      aix*)
11586	# The AIX port of GNU ld has always aspired to compatibility
11587	# with the native linker.  However, as the warning in the GNU ld
11588	# block says, versions before 2.19.5* couldn't really create working
11589	# shared libraries, regardless of the interface used.
11590	case `$LD -v 2>&1` in
11591	  *\ \(GNU\ Binutils\)\ 2.19.5*) ;;
11592	  *\ \(GNU\ Binutils\)\ 2.[2-9]*) ;;
11593	  *\ \(GNU\ Binutils\)\ [3-9]*) ;;
11594	  *)
11595	    lt_use_gnu_ld_interface=yes
11596	    ;;
11597	esac
11598	;;
11599      *)
11600	lt_use_gnu_ld_interface=yes
11601	;;
11602    esac
11603  fi
11604
11605  if test yes = "$lt_use_gnu_ld_interface"; then
11606    # If archive_cmds runs LD, not CC, wlarc should be empty
11607    wlarc='$wl'
11608
11609    # Set some defaults for GNU ld with shared library support. These
11610    # are reset later if shared libraries are not supported. Putting them
11611    # here allows them to be overridden if necessary.
11612    runpath_var=LD_RUN_PATH
11613    hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
11614    export_dynamic_flag_spec='$wl--export-dynamic'
11615    # ancient GNU ld didn't support --whole-archive et. al.
11616    if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
11617      whole_archive_flag_spec=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
11618    else
11619      whole_archive_flag_spec=
11620    fi
11621    supports_anon_versioning=no
11622    case `$LD -v | $SED -e 's/(^)\+)\s\+//' 2>&1` in
11623      *GNU\ gold*) supports_anon_versioning=yes ;;
11624      *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11
11625      *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
11626      *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
11627      *\ 2.11.*) ;; # other 2.11 versions
11628      *) supports_anon_versioning=yes ;;
11629    esac
11630
11631    # See if GNU ld supports shared libraries.
11632    case $host_os in
11633    aix[3-9]*)
11634      # On AIX/PPC, the GNU linker is very broken
11635      if test ia64 != "$host_cpu"; then
11636	ld_shlibs=no
11637	cat <<_LT_EOF 1>&2
11638
11639*** Warning: the GNU linker, at least up to release 2.19, is reported
11640*** to be unable to reliably create shared libraries on AIX.
11641*** Therefore, libtool is disabling shared libraries support.  If you
11642*** really care for shared libraries, you may want to install binutils
11643*** 2.20 or above, or modify your PATH so that a non-GNU linker is found.
11644*** You will then need to restart the configuration process.
11645
11646_LT_EOF
11647      fi
11648      ;;
11649
11650    amigaos*)
11651      case $host_cpu in
11652      powerpc)
11653            # see comment about AmigaOS4 .so support
11654            archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
11655            archive_expsym_cmds=''
11656        ;;
11657      m68k)
11658            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)'
11659            hardcode_libdir_flag_spec='-L$libdir'
11660            hardcode_minus_L=yes
11661        ;;
11662      esac
11663      ;;
11664
11665    beos*)
11666      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
11667	allow_undefined_flag=unsupported
11668	# Joseph Beckenbach <jrb3@best.com> says some releases of gcc
11669	# support --undefined.  This deserves some investigation.  FIXME
11670	archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
11671      else
11672	ld_shlibs=no
11673      fi
11674      ;;
11675
11676    cygwin* | mingw* | pw32* | cegcc*)
11677      # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless,
11678      # as there is no search path for DLLs.
11679      hardcode_libdir_flag_spec='-L$libdir'
11680      export_dynamic_flag_spec='$wl--export-all-symbols'
11681      allow_undefined_flag=unsupported
11682      always_export_symbols=no
11683      enable_shared_with_static_runtimes=yes
11684      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'
11685      exclude_expsyms='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'
11686
11687      if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
11688        archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
11689	# If the export-symbols file already is a .def file, use it as
11690	# is; otherwise, prepend EXPORTS...
11691	archive_expsym_cmds='if   test DEF = "`$SED -n     -e '\''s/^[	 ]*//'\''     -e '\''/^\(;.*\)*$/d'\''     -e '\''s/^\(EXPORTS\|LIBRARY\)\([	 ].*\)*$/DEF/p'\''     -e q     $export_symbols`" ; then
11692          cp $export_symbols $output_objdir/$soname.def;
11693        else
11694          echo EXPORTS > $output_objdir/$soname.def;
11695          cat $export_symbols >> $output_objdir/$soname.def;
11696        fi~
11697        $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
11698      else
11699	ld_shlibs=no
11700      fi
11701      ;;
11702
11703    haiku*)
11704      archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
11705      link_all_deplibs=yes
11706      ;;
11707
11708    os2*)
11709      hardcode_libdir_flag_spec='-L$libdir'
11710      hardcode_minus_L=yes
11711      allow_undefined_flag=unsupported
11712      shrext_cmds=.dll
11713      archive_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
11714	$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
11715	$ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
11716	$ECHO EXPORTS >> $output_objdir/$libname.def~
11717	emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
11718	$CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
11719	emximp -o $lib $output_objdir/$libname.def'
11720      archive_expsym_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
11721	$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
11722	$ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
11723	$ECHO EXPORTS >> $output_objdir/$libname.def~
11724	prefix_cmds="$SED"~
11725	if test EXPORTS = "`$SED 1q $export_symbols`"; then
11726	  prefix_cmds="$prefix_cmds -e 1d";
11727	fi~
11728	prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
11729	cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
11730	$CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
11731	emximp -o $lib $output_objdir/$libname.def'
11732      old_archive_From_new_cmds='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
11733      enable_shared_with_static_runtimes=yes
11734      ;;
11735
11736    interix[3-9]*)
11737      hardcode_direct=no
11738      hardcode_shlibpath_var=no
11739      hardcode_libdir_flag_spec='$wl-rpath,$libdir'
11740      export_dynamic_flag_spec='$wl-E'
11741      # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
11742      # Instead, shared libraries are loaded at an image base (0x10000000 by
11743      # default) and relocated if they conflict, which is a slow very memory
11744      # consuming and fragmenting process.  To avoid this, we pick a random,
11745      # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
11746      # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
11747      archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
11748      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'
11749      ;;
11750
11751    gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
11752      tmp_diet=no
11753      if test linux-dietlibc = "$host_os"; then
11754	case $cc_basename in
11755	  diet\ *) tmp_diet=yes;;	# linux-dietlibc with static linking (!diet-dyn)
11756	esac
11757      fi
11758      if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
11759	 && test no = "$tmp_diet"
11760      then
11761	tmp_addflag=' $pic_flag'
11762	tmp_sharedflag='-shared'
11763	case $cc_basename,$host_cpu in
11764        pgcc*)				# Portland Group C compiler
11765	  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'
11766	  tmp_addflag=' $pic_flag'
11767	  ;;
11768	pgf77* | pgf90* | pgf95* | pgfortran*)
11769					# Portland Group f77 and f90 compilers
11770	  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'
11771	  tmp_addflag=' $pic_flag -Mnomain' ;;
11772	ecc*,ia64* | icc*,ia64*)	# Intel C compiler on ia64
11773	  tmp_addflag=' -i_dynamic' ;;
11774	efc*,ia64* | ifort*,ia64*)	# Intel Fortran compiler on ia64
11775	  tmp_addflag=' -i_dynamic -nofor_main' ;;
11776	ifc* | ifort*)			# Intel Fortran compiler
11777	  tmp_addflag=' -nofor_main' ;;
11778	lf95*)				# Lahey Fortran 8.1
11779	  whole_archive_flag_spec=
11780	  tmp_sharedflag='--shared' ;;
11781        nagfor*)                        # NAGFOR 5.3
11782          tmp_sharedflag='-Wl,-shared' ;;
11783	xl[cC]* | bgxl[cC]* | mpixl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below)
11784	  tmp_sharedflag='-qmkshrobj'
11785	  tmp_addflag= ;;
11786	nvcc*)	# Cuda Compiler Driver 2.2
11787	  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'
11788	  compiler_needs_object=yes
11789	  ;;
11790	esac
11791	case `$CC -V 2>&1 | sed 5q` in
11792	*Sun\ C*)			# Sun C 5.9
11793	  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'
11794	  compiler_needs_object=yes
11795	  tmp_sharedflag='-G' ;;
11796	*Sun\ F*)			# Sun Fortran 8.3
11797	  tmp_sharedflag='-G' ;;
11798	esac
11799	archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
11800
11801        if test yes = "$supports_anon_versioning"; then
11802          archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~
11803            cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
11804            echo "local: *; };" >> $output_objdir/$libname.ver~
11805            $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib'
11806        fi
11807
11808	case $cc_basename in
11809	tcc*)
11810	  export_dynamic_flag_spec='-rdynamic'
11811	  ;;
11812	xlf* | bgf* | bgxlf* | mpixlf*)
11813	  # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
11814	  whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive'
11815	  hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
11816	  archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
11817	  if test yes = "$supports_anon_versioning"; then
11818	    archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~
11819              cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
11820              echo "local: *; };" >> $output_objdir/$libname.ver~
11821              $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
11822	  fi
11823	  ;;
11824	esac
11825      else
11826        ld_shlibs=no
11827      fi
11828      ;;
11829
11830    netbsd*)
11831      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
11832	archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
11833	wlarc=
11834      else
11835	archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
11836	archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
11837      fi
11838      ;;
11839
11840    solaris*)
11841      if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
11842	ld_shlibs=no
11843	cat <<_LT_EOF 1>&2
11844
11845*** Warning: The releases 2.8.* of the GNU linker cannot reliably
11846*** create shared libraries on Solaris systems.  Therefore, libtool
11847*** is disabling shared libraries support.  We urge you to upgrade GNU
11848*** binutils to release 2.9.1 or newer.  Another option is to modify
11849*** your PATH or compiler configuration so that the native linker is
11850*** used, and then restart.
11851
11852_LT_EOF
11853      elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
11854	archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
11855	archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
11856      else
11857	ld_shlibs=no
11858      fi
11859      ;;
11860
11861    sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
11862      case `$LD -v 2>&1` in
11863        *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*)
11864	ld_shlibs=no
11865	cat <<_LT_EOF 1>&2
11866
11867*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot
11868*** reliably create shared libraries on SCO systems.  Therefore, libtool
11869*** is disabling shared libraries support.  We urge you to upgrade GNU
11870*** binutils to release 2.16.91.0.3 or newer.  Another option is to modify
11871*** your PATH or compiler configuration so that the native linker is
11872*** used, and then restart.
11873
11874_LT_EOF
11875	;;
11876	*)
11877	  # For security reasons, it is highly recommended that you always
11878	  # use absolute paths for naming shared libraries, and exclude the
11879	  # DT_RUNPATH tag from executables and libraries.  But doing so
11880	  # requires that you compile everything twice, which is a pain.
11881	  if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
11882	    hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
11883	    archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
11884	    archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
11885	  else
11886	    ld_shlibs=no
11887	  fi
11888	;;
11889      esac
11890      ;;
11891
11892    sunos4*)
11893      archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
11894      wlarc=
11895      hardcode_direct=yes
11896      hardcode_shlibpath_var=no
11897      ;;
11898
11899    *)
11900      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
11901	archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
11902	archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
11903      else
11904	ld_shlibs=no
11905      fi
11906      ;;
11907    esac
11908
11909    if test no = "$ld_shlibs"; then
11910      runpath_var=
11911      hardcode_libdir_flag_spec=
11912      export_dynamic_flag_spec=
11913      whole_archive_flag_spec=
11914    fi
11915  else
11916    # PORTME fill in a description of your system's linker (not GNU ld)
11917    case $host_os in
11918    aix3*)
11919      allow_undefined_flag=unsupported
11920      always_export_symbols=yes
11921      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'
11922      # Note: this linker hardcodes the directories in LIBPATH if there
11923      # are no directories specified by -L.
11924      hardcode_minus_L=yes
11925      if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then
11926	# Neither direct hardcoding nor static linking is supported with a
11927	# broken collect2.
11928	hardcode_direct=unsupported
11929      fi
11930      ;;
11931
11932    aix[4-9]*)
11933      if test ia64 = "$host_cpu"; then
11934	# On IA64, the linker does run time linking by default, so we don't
11935	# have to do anything special.
11936	aix_use_runtimelinking=no
11937	exp_sym_flag='-Bexport'
11938	no_entry_flag=
11939      else
11940	# If we're using GNU nm, then we don't want the "-C" option.
11941	# -C means demangle to GNU nm, but means don't demangle to AIX nm.
11942	# Without the "-l" option, or with the "-B" option, AIX nm treats
11943	# weak defined symbols like other global defined symbols, whereas
11944	# GNU nm marks them as "W".
11945	# While the 'weak' keyword is ignored in the Export File, we need
11946	# it in the Import File for the 'aix-soname' feature, so we have
11947	# to replace the "-B" option with "-P" for AIX nm.
11948	if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
11949	  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'
11950	else
11951	  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'
11952	fi
11953	aix_use_runtimelinking=no
11954
11955	# Test if we are trying to use run time linking or normal
11956	# AIX style linking. If -brtl is somewhere in LDFLAGS, we
11957	# have runtime linking enabled, and use it for executables.
11958	# For shared libraries, we enable/disable runtime linking
11959	# depending on the kind of the shared library created -
11960	# when "with_aix_soname,aix_use_runtimelinking" is:
11961	# "aix,no"   lib.a(lib.so.V) shared, rtl:no,  for executables
11962	# "aix,yes"  lib.so          shared, rtl:yes, for executables
11963	#            lib.a           static archive
11964	# "both,no"  lib.so.V(shr.o) shared, rtl:yes
11965	#            lib.a(lib.so.V) shared, rtl:no,  for executables
11966	# "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables
11967	#            lib.a(lib.so.V) shared, rtl:no
11968	# "svr4,*"   lib.so.V(shr.o) shared, rtl:yes, for executables
11969	#            lib.a           static archive
11970	case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*)
11971	  for ld_flag in $LDFLAGS; do
11972	  if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then
11973	    aix_use_runtimelinking=yes
11974	    break
11975	  fi
11976	  done
11977	  if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then
11978	    # With aix-soname=svr4, we create the lib.so.V shared archives only,
11979	    # so we don't have lib.a shared libs to link our executables.
11980	    # We have to force runtime linking in this case.
11981	    aix_use_runtimelinking=yes
11982	    LDFLAGS="$LDFLAGS -Wl,-brtl"
11983	  fi
11984	  ;;
11985	esac
11986
11987	exp_sym_flag='-bexport'
11988	no_entry_flag='-bnoentry'
11989      fi
11990
11991      # When large executables or shared objects are built, AIX ld can
11992      # have problems creating the table of contents.  If linking a library
11993      # or program results in "error TOC overflow" add -mminimal-toc to
11994      # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
11995      # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
11996
11997      archive_cmds=''
11998      hardcode_direct=yes
11999      hardcode_direct_absolute=yes
12000      hardcode_libdir_separator=':'
12001      link_all_deplibs=yes
12002      file_list_spec='$wl-f,'
12003      case $with_aix_soname,$aix_use_runtimelinking in
12004      aix,*) ;; # traditional, no import file
12005      svr4,* | *,yes) # use import file
12006	# The Import File defines what to hardcode.
12007	hardcode_direct=no
12008	hardcode_direct_absolute=no
12009	;;
12010      esac
12011
12012      if test yes = "$GCC"; then
12013	case $host_os in aix4.[012]|aix4.[012].*)
12014	# We only want to do this on AIX 4.2 and lower, the check
12015	# below for broken collect2 doesn't work under 4.3+
12016	  collect2name=`$CC -print-prog-name=collect2`
12017	  if test -f "$collect2name" &&
12018	   strings "$collect2name" | $GREP resolve_lib_name >/dev/null
12019	  then
12020	  # We have reworked collect2
12021	  :
12022	  else
12023	  # We have old collect2
12024	  hardcode_direct=unsupported
12025	  # It fails to find uninstalled libraries when the uninstalled
12026	  # path is not listed in the libpath.  Setting hardcode_minus_L
12027	  # to unsupported forces relinking
12028	  hardcode_minus_L=yes
12029	  hardcode_libdir_flag_spec='-L$libdir'
12030	  hardcode_libdir_separator=
12031	  fi
12032	  ;;
12033	esac
12034	shared_flag='-shared'
12035	if test yes = "$aix_use_runtimelinking"; then
12036	  shared_flag="$shared_flag "'$wl-G'
12037	fi
12038	# Need to ensure runtime linking is disabled for the traditional
12039	# shared library, or the linker may eventually find shared libraries
12040	# /with/ Import File - we do not want to mix them.
12041	shared_flag_aix='-shared'
12042	shared_flag_svr4='-shared $wl-G'
12043      else
12044	# not using gcc
12045	if test ia64 = "$host_cpu"; then
12046	# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
12047	# chokes on -Wl,-G. The following line is correct:
12048	  shared_flag='-G'
12049	else
12050	  if test yes = "$aix_use_runtimelinking"; then
12051	    shared_flag='$wl-G'
12052	  else
12053	    shared_flag='$wl-bM:SRE'
12054	  fi
12055	  shared_flag_aix='$wl-bM:SRE'
12056	  shared_flag_svr4='$wl-G'
12057	fi
12058      fi
12059
12060      export_dynamic_flag_spec='$wl-bexpall'
12061      # It seems that -bexpall does not export symbols beginning with
12062      # underscore (_), so it is better to generate a list of symbols to export.
12063      always_export_symbols=yes
12064      if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then
12065	# Warning - without using the other runtime loading flags (-brtl),
12066	# -berok will link without error, but may produce a broken library.
12067	allow_undefined_flag='-berok'
12068        # Determine the default libpath from the value encoded in an
12069        # empty executable.
12070        if test set = "${lt_cv_aix_libpath+set}"; then
12071  aix_libpath=$lt_cv_aix_libpath
12072else
12073  if ${lt_cv_aix_libpath_+:} false; then :
12074  $as_echo_n "(cached) " >&6
12075else
12076  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12077/* end confdefs.h.  */
12078
12079int
12080main ()
12081{
12082
12083  ;
12084  return 0;
12085}
12086_ACEOF
12087if ac_fn_c_try_link "$LINENO"; then :
12088
12089  lt_aix_libpath_sed='
12090      /Import File Strings/,/^$/ {
12091	  /^0/ {
12092	      s/^0  *\([^ ]*\) *$/\1/
12093	      p
12094	  }
12095      }'
12096  lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
12097  # Check for a 64-bit object if we didn't find anything.
12098  if test -z "$lt_cv_aix_libpath_"; then
12099    lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
12100  fi
12101fi
12102rm -f core conftest.err conftest.$ac_objext \
12103    conftest$ac_exeext conftest.$ac_ext
12104  if test -z "$lt_cv_aix_libpath_"; then
12105    lt_cv_aix_libpath_=/usr/lib:/lib
12106  fi
12107
12108fi
12109
12110  aix_libpath=$lt_cv_aix_libpath_
12111fi
12112
12113        hardcode_libdir_flag_spec='$wl-blibpath:$libdir:'"$aix_libpath"
12114        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
12115      else
12116	if test ia64 = "$host_cpu"; then
12117	  hardcode_libdir_flag_spec='$wl-R $libdir:/usr/lib:/lib'
12118	  allow_undefined_flag="-z nodefs"
12119	  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"
12120	else
12121	 # Determine the default libpath from the value encoded in an
12122	 # empty executable.
12123	 if test set = "${lt_cv_aix_libpath+set}"; then
12124  aix_libpath=$lt_cv_aix_libpath
12125else
12126  if ${lt_cv_aix_libpath_+:} false; then :
12127  $as_echo_n "(cached) " >&6
12128else
12129  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12130/* end confdefs.h.  */
12131
12132int
12133main ()
12134{
12135
12136  ;
12137  return 0;
12138}
12139_ACEOF
12140if ac_fn_c_try_link "$LINENO"; then :
12141
12142  lt_aix_libpath_sed='
12143      /Import File Strings/,/^$/ {
12144	  /^0/ {
12145	      s/^0  *\([^ ]*\) *$/\1/
12146	      p
12147	  }
12148      }'
12149  lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
12150  # Check for a 64-bit object if we didn't find anything.
12151  if test -z "$lt_cv_aix_libpath_"; then
12152    lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
12153  fi
12154fi
12155rm -f core conftest.err conftest.$ac_objext \
12156    conftest$ac_exeext conftest.$ac_ext
12157  if test -z "$lt_cv_aix_libpath_"; then
12158    lt_cv_aix_libpath_=/usr/lib:/lib
12159  fi
12160
12161fi
12162
12163  aix_libpath=$lt_cv_aix_libpath_
12164fi
12165
12166	 hardcode_libdir_flag_spec='$wl-blibpath:$libdir:'"$aix_libpath"
12167	  # Warning - without using the other run time loading flags,
12168	  # -berok will link without error, but may produce a broken library.
12169	  no_undefined_flag=' $wl-bernotok'
12170	  allow_undefined_flag=' $wl-berok'
12171	  if test yes = "$with_gnu_ld"; then
12172	    # We only use this code for GNU lds that support --whole-archive.
12173	    whole_archive_flag_spec='$wl--whole-archive$convenience $wl--no-whole-archive'
12174	  else
12175	    # Exported symbols can be pulled into shared objects from archives
12176	    whole_archive_flag_spec='$convenience'
12177	  fi
12178	  archive_cmds_need_lc=yes
12179	  archive_expsym_cmds='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d'
12180	  # -brtl affects multiple linker settings, -berok does not and is overridden later
12181	  compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([, ]\\)%-berok\\1%g"`'
12182	  if test svr4 != "$with_aix_soname"; then
12183	    # This is similar to how AIX traditionally builds its shared libraries.
12184	    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'
12185	  fi
12186	  if test aix != "$with_aix_soname"; then
12187	    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'
12188	  else
12189	    # used by -dlpreopen to get the symbols
12190	    archive_expsym_cmds="$archive_expsym_cmds"'~$MV  $output_objdir/$realname.d/$soname $output_objdir'
12191	  fi
12192	  archive_expsym_cmds="$archive_expsym_cmds"'~$RM -r $output_objdir/$realname.d'
12193	fi
12194      fi
12195      ;;
12196
12197    amigaos*)
12198      case $host_cpu in
12199      powerpc)
12200            # see comment about AmigaOS4 .so support
12201            archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
12202            archive_expsym_cmds=''
12203        ;;
12204      m68k)
12205            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)'
12206            hardcode_libdir_flag_spec='-L$libdir'
12207            hardcode_minus_L=yes
12208        ;;
12209      esac
12210      ;;
12211
12212    bsdi[45]*)
12213      export_dynamic_flag_spec=-rdynamic
12214      ;;
12215
12216    cygwin* | mingw* | pw32* | cegcc*)
12217      # When not using gcc, we currently assume that we are using
12218      # Microsoft Visual C++.
12219      # hardcode_libdir_flag_spec is actually meaningless, as there is
12220      # no search path for DLLs.
12221      case $cc_basename in
12222      cl*)
12223	# Native MSVC
12224	hardcode_libdir_flag_spec=' '
12225	allow_undefined_flag=unsupported
12226	always_export_symbols=yes
12227	file_list_spec='@'
12228	# Tell ltmain to make .lib files, not .a files.
12229	libext=lib
12230	# Tell ltmain to make .dll files, not .so files.
12231	shrext_cmds=.dll
12232	# FIXME: Setting linknames here is a bad hack.
12233	archive_cmds='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames='
12234	archive_expsym_cmds='if   test DEF = "`$SED -n     -e '\''s/^[	 ]*//'\''     -e '\''/^\(;.*\)*$/d'\''     -e '\''s/^\(EXPORTS\|LIBRARY\)\([	 ].*\)*$/DEF/p'\''     -e q     $export_symbols`" ; then
12235            cp "$export_symbols" "$output_objdir/$soname.def";
12236            echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp";
12237          else
12238            $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp;
12239          fi~
12240          $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
12241          linknames='
12242	# The linker will not automatically build a static lib if we build a DLL.
12243	# _LT_TAGVAR(old_archive_from_new_cmds, )='true'
12244	enable_shared_with_static_runtimes=yes
12245	exclude_expsyms='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
12246	export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1,DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols'
12247	# Don't use ranlib
12248	old_postinstall_cmds='chmod 644 $oldlib'
12249	postlink_cmds='lt_outputfile="@OUTPUT@"~
12250          lt_tool_outputfile="@TOOL_OUTPUT@"~
12251          case $lt_outputfile in
12252            *.exe|*.EXE) ;;
12253            *)
12254              lt_outputfile=$lt_outputfile.exe
12255              lt_tool_outputfile=$lt_tool_outputfile.exe
12256              ;;
12257          esac~
12258          if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then
12259            $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
12260            $RM "$lt_outputfile.manifest";
12261          fi'
12262	;;
12263      *)
12264	# Assume MSVC wrapper
12265	hardcode_libdir_flag_spec=' '
12266	allow_undefined_flag=unsupported
12267	# Tell ltmain to make .lib files, not .a files.
12268	libext=lib
12269	# Tell ltmain to make .dll files, not .so files.
12270	shrext_cmds=.dll
12271	# FIXME: Setting linknames here is a bad hack.
12272	archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
12273	# The linker will automatically build a .lib file if we build a DLL.
12274	old_archive_from_new_cmds='true'
12275	# FIXME: Should let the user specify the lib program.
12276	old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs'
12277	enable_shared_with_static_runtimes=yes
12278	;;
12279      esac
12280      ;;
12281
12282    darwin* | rhapsody*)
12283
12284
12285  archive_cmds_need_lc=no
12286  hardcode_direct=no
12287  hardcode_automatic=yes
12288  hardcode_shlibpath_var=unsupported
12289  if test yes = "$lt_cv_ld_force_load"; then
12290    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\"`'
12291
12292  else
12293    whole_archive_flag_spec=''
12294  fi
12295  link_all_deplibs=yes
12296  allow_undefined_flag=$_lt_dar_allow_undefined
12297  case $cc_basename in
12298     ifort*|nagfor*) _lt_dar_can_shared=yes ;;
12299     *) _lt_dar_can_shared=$GCC ;;
12300  esac
12301  if test yes = "$_lt_dar_can_shared"; then
12302    output_verbose_link_cmd=func_echo_all
12303    archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dsymutil"
12304    module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil"
12305    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"
12306    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"
12307
12308  else
12309  ld_shlibs=no
12310  fi
12311
12312      ;;
12313
12314    dgux*)
12315      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
12316      hardcode_libdir_flag_spec='-L$libdir'
12317      hardcode_shlibpath_var=no
12318      ;;
12319
12320    # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
12321    # support.  Future versions do this automatically, but an explicit c++rt0.o
12322    # does not break anything, and helps significantly (at the cost of a little
12323    # extra space).
12324    freebsd2.2*)
12325      archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
12326      hardcode_libdir_flag_spec='-R$libdir'
12327      hardcode_direct=yes
12328      hardcode_shlibpath_var=no
12329      ;;
12330
12331    # Unfortunately, older versions of FreeBSD 2 do not have this feature.
12332    freebsd2.*)
12333      archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
12334      hardcode_direct=yes
12335      hardcode_minus_L=yes
12336      hardcode_shlibpath_var=no
12337      ;;
12338
12339    # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
12340    freebsd* | dragonfly*)
12341      archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
12342      hardcode_libdir_flag_spec='-R$libdir'
12343      hardcode_direct=yes
12344      hardcode_shlibpath_var=no
12345      ;;
12346
12347    hpux9*)
12348      if test yes = "$GCC"; then
12349	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'
12350      else
12351	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'
12352      fi
12353      hardcode_libdir_flag_spec='$wl+b $wl$libdir'
12354      hardcode_libdir_separator=:
12355      hardcode_direct=yes
12356
12357      # hardcode_minus_L: Not really in the search PATH,
12358      # but as the default location of the library.
12359      hardcode_minus_L=yes
12360      export_dynamic_flag_spec='$wl-E'
12361      ;;
12362
12363    hpux10*)
12364      if test yes,no = "$GCC,$with_gnu_ld"; then
12365	archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
12366      else
12367	archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
12368      fi
12369      if test no = "$with_gnu_ld"; then
12370	hardcode_libdir_flag_spec='$wl+b $wl$libdir'
12371	hardcode_libdir_separator=:
12372	hardcode_direct=yes
12373	hardcode_direct_absolute=yes
12374	export_dynamic_flag_spec='$wl-E'
12375	# hardcode_minus_L: Not really in the search PATH,
12376	# but as the default location of the library.
12377	hardcode_minus_L=yes
12378      fi
12379      ;;
12380
12381    hpux11*)
12382      if test yes,no = "$GCC,$with_gnu_ld"; then
12383	case $host_cpu in
12384	hppa*64*)
12385	  archive_cmds='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
12386	  ;;
12387	ia64*)
12388	  archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
12389	  ;;
12390	*)
12391	  archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
12392	  ;;
12393	esac
12394      else
12395	case $host_cpu in
12396	hppa*64*)
12397	  archive_cmds='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
12398	  ;;
12399	ia64*)
12400	  archive_cmds='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
12401	  ;;
12402	*)
12403
12404	  # Older versions of the 11.00 compiler do not understand -b yet
12405	  # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does)
12406	  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC understands -b" >&5
12407$as_echo_n "checking if $CC understands -b... " >&6; }
12408if ${lt_cv_prog_compiler__b+:} false; then :
12409  $as_echo_n "(cached) " >&6
12410else
12411  lt_cv_prog_compiler__b=no
12412   save_LDFLAGS=$LDFLAGS
12413   LDFLAGS="$LDFLAGS -b"
12414   echo "$lt_simple_link_test_code" > conftest.$ac_ext
12415   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
12416     # The linker can only warn and ignore the option if not recognized
12417     # So say no if there are warnings
12418     if test -s conftest.err; then
12419       # Append any errors to the config.log.
12420       cat conftest.err 1>&5
12421       $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
12422       $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
12423       if diff conftest.exp conftest.er2 >/dev/null; then
12424         lt_cv_prog_compiler__b=yes
12425       fi
12426     else
12427       lt_cv_prog_compiler__b=yes
12428     fi
12429   fi
12430   $RM -r conftest*
12431   LDFLAGS=$save_LDFLAGS
12432
12433fi
12434{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler__b" >&5
12435$as_echo "$lt_cv_prog_compiler__b" >&6; }
12436
12437if test yes = "$lt_cv_prog_compiler__b"; then
12438    archive_cmds='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
12439else
12440    archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
12441fi
12442
12443	  ;;
12444	esac
12445      fi
12446      if test no = "$with_gnu_ld"; then
12447	hardcode_libdir_flag_spec='$wl+b $wl$libdir'
12448	hardcode_libdir_separator=:
12449
12450	case $host_cpu in
12451	hppa*64*|ia64*)
12452	  hardcode_direct=no
12453	  hardcode_shlibpath_var=no
12454	  ;;
12455	*)
12456	  hardcode_direct=yes
12457	  hardcode_direct_absolute=yes
12458	  export_dynamic_flag_spec='$wl-E'
12459
12460	  # hardcode_minus_L: Not really in the search PATH,
12461	  # but as the default location of the library.
12462	  hardcode_minus_L=yes
12463	  ;;
12464	esac
12465      fi
12466      ;;
12467
12468    irix5* | irix6* | nonstopux*)
12469      if test yes = "$GCC"; then
12470	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'
12471	# Try to use the -exported_symbol ld option, if it does not
12472	# work, assume that -exports_file does not work either and
12473	# implicitly export all symbols.
12474	# This should be the same for all languages, so no per-tag cache variable.
12475	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5
12476$as_echo_n "checking whether the $host_os linker accepts -exported_symbol... " >&6; }
12477if ${lt_cv_irix_exported_symbol+:} false; then :
12478  $as_echo_n "(cached) " >&6
12479else
12480  save_LDFLAGS=$LDFLAGS
12481	   LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null"
12482	   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12483/* end confdefs.h.  */
12484int foo (void) { return 0; }
12485_ACEOF
12486if ac_fn_c_try_link "$LINENO"; then :
12487  lt_cv_irix_exported_symbol=yes
12488else
12489  lt_cv_irix_exported_symbol=no
12490fi
12491rm -f core conftest.err conftest.$ac_objext \
12492    conftest$ac_exeext conftest.$ac_ext
12493           LDFLAGS=$save_LDFLAGS
12494fi
12495{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5
12496$as_echo "$lt_cv_irix_exported_symbol" >&6; }
12497	if test yes = "$lt_cv_irix_exported_symbol"; then
12498          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'
12499	fi
12500      else
12501	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'
12502	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'
12503      fi
12504      archive_cmds_need_lc='no'
12505      hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
12506      hardcode_libdir_separator=:
12507      inherit_rpath=yes
12508      link_all_deplibs=yes
12509      ;;
12510
12511    linux*)
12512      case $cc_basename in
12513      tcc*)
12514	# Fabrice Bellard et al's Tiny C Compiler
12515	ld_shlibs=yes
12516	archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
12517	;;
12518      esac
12519      ;;
12520
12521    netbsd*)
12522      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
12523	archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
12524      else
12525	archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
12526      fi
12527      hardcode_libdir_flag_spec='-R$libdir'
12528      hardcode_direct=yes
12529      hardcode_shlibpath_var=no
12530      ;;
12531
12532    newsos6)
12533      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
12534      hardcode_direct=yes
12535      hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
12536      hardcode_libdir_separator=:
12537      hardcode_shlibpath_var=no
12538      ;;
12539
12540    *nto* | *qnx*)
12541      ;;
12542
12543    openbsd* | bitrig*)
12544      if test -f /usr/libexec/ld.so; then
12545	hardcode_direct=yes
12546	hardcode_shlibpath_var=no
12547	hardcode_direct_absolute=yes
12548	if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
12549	  archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
12550	  archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols'
12551	  hardcode_libdir_flag_spec='$wl-rpath,$libdir'
12552	  export_dynamic_flag_spec='$wl-E'
12553	else
12554	  archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
12555	  hardcode_libdir_flag_spec='$wl-rpath,$libdir'
12556	fi
12557      else
12558	ld_shlibs=no
12559      fi
12560      ;;
12561
12562    os2*)
12563      hardcode_libdir_flag_spec='-L$libdir'
12564      hardcode_minus_L=yes
12565      allow_undefined_flag=unsupported
12566      shrext_cmds=.dll
12567      archive_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
12568	$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
12569	$ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
12570	$ECHO EXPORTS >> $output_objdir/$libname.def~
12571	emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
12572	$CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
12573	emximp -o $lib $output_objdir/$libname.def'
12574      archive_expsym_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
12575	$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
12576	$ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
12577	$ECHO EXPORTS >> $output_objdir/$libname.def~
12578	prefix_cmds="$SED"~
12579	if test EXPORTS = "`$SED 1q $export_symbols`"; then
12580	  prefix_cmds="$prefix_cmds -e 1d";
12581	fi~
12582	prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
12583	cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
12584	$CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
12585	emximp -o $lib $output_objdir/$libname.def'
12586      old_archive_From_new_cmds='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
12587      enable_shared_with_static_runtimes=yes
12588      ;;
12589
12590    osf3*)
12591      if test yes = "$GCC"; then
12592	allow_undefined_flag=' $wl-expect_unresolved $wl\*'
12593	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'
12594      else
12595	allow_undefined_flag=' -expect_unresolved \*'
12596	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'
12597      fi
12598      archive_cmds_need_lc='no'
12599      hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
12600      hardcode_libdir_separator=:
12601      ;;
12602
12603    osf4* | osf5*)	# as osf3* with the addition of -msym flag
12604      if test yes = "$GCC"; then
12605	allow_undefined_flag=' $wl-expect_unresolved $wl\*'
12606	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'
12607	hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
12608      else
12609	allow_undefined_flag=' -expect_unresolved \*'
12610	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'
12611	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~
12612          $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'
12613
12614	# Both c and cxx compiler support -rpath directly
12615	hardcode_libdir_flag_spec='-rpath $libdir'
12616      fi
12617      archive_cmds_need_lc='no'
12618      hardcode_libdir_separator=:
12619      ;;
12620
12621    solaris*)
12622      no_undefined_flag=' -z defs'
12623      if test yes = "$GCC"; then
12624	wlarc='$wl'
12625	archive_cmds='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
12626	archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
12627          $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'
12628      else
12629	case `$CC -V 2>&1` in
12630	*"Compilers 5.0"*)
12631	  wlarc=''
12632	  archive_cmds='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags'
12633	  archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
12634            $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
12635	  ;;
12636	*)
12637	  wlarc='$wl'
12638	  archive_cmds='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags'
12639	  archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
12640            $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
12641	  ;;
12642	esac
12643      fi
12644      hardcode_libdir_flag_spec='-R$libdir'
12645      hardcode_shlibpath_var=no
12646      case $host_os in
12647      solaris2.[0-5] | solaris2.[0-5].*) ;;
12648      *)
12649	# The compiler driver will combine and reorder linker options,
12650	# but understands '-z linker_flag'.  GCC discards it without '$wl',
12651	# but is careful enough not to reorder.
12652	# Supported since Solaris 2.6 (maybe 2.5.1?)
12653	if test yes = "$GCC"; then
12654	  whole_archive_flag_spec='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract'
12655	else
12656	  whole_archive_flag_spec='-z allextract$convenience -z defaultextract'
12657	fi
12658	;;
12659      esac
12660      link_all_deplibs=yes
12661      ;;
12662
12663    sunos4*)
12664      if test sequent = "$host_vendor"; then
12665	# Use $CC to link under sequent, because it throws in some extra .o
12666	# files that make .init and .fini sections work.
12667	archive_cmds='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags'
12668      else
12669	archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
12670      fi
12671      hardcode_libdir_flag_spec='-L$libdir'
12672      hardcode_direct=yes
12673      hardcode_minus_L=yes
12674      hardcode_shlibpath_var=no
12675      ;;
12676
12677    sysv4)
12678      case $host_vendor in
12679	sni)
12680	  archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
12681	  hardcode_direct=yes # is this really true???
12682	;;
12683	siemens)
12684	  ## LD is ld it makes a PLAMLIB
12685	  ## CC just makes a GrossModule.
12686	  archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
12687	  reload_cmds='$CC -r -o $output$reload_objs'
12688	  hardcode_direct=no
12689        ;;
12690	motorola)
12691	  archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
12692	  hardcode_direct=no #Motorola manual says yes, but my tests say they lie
12693	;;
12694      esac
12695      runpath_var='LD_RUN_PATH'
12696      hardcode_shlibpath_var=no
12697      ;;
12698
12699    sysv4.3*)
12700      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
12701      hardcode_shlibpath_var=no
12702      export_dynamic_flag_spec='-Bexport'
12703      ;;
12704
12705    sysv4*MP*)
12706      if test -d /usr/nec; then
12707	archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
12708	hardcode_shlibpath_var=no
12709	runpath_var=LD_RUN_PATH
12710	hardcode_runpath_var=yes
12711	ld_shlibs=yes
12712      fi
12713      ;;
12714
12715    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*)
12716      no_undefined_flag='$wl-z,text'
12717      archive_cmds_need_lc=no
12718      hardcode_shlibpath_var=no
12719      runpath_var='LD_RUN_PATH'
12720
12721      if test yes = "$GCC"; then
12722	archive_cmds='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
12723	archive_expsym_cmds='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
12724      else
12725	archive_cmds='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
12726	archive_expsym_cmds='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
12727      fi
12728      ;;
12729
12730    sysv5* | sco3.2v5* | sco5v6*)
12731      # Note: We CANNOT use -z defs as we might desire, because we do not
12732      # link with -lc, and that would cause any symbols used from libc to
12733      # always be unresolved, which means just about no library would
12734      # ever link correctly.  If we're not using GNU ld we use -z text
12735      # though, which does catch some bad symbols but isn't as heavy-handed
12736      # as -z defs.
12737      no_undefined_flag='$wl-z,text'
12738      allow_undefined_flag='$wl-z,nodefs'
12739      archive_cmds_need_lc=no
12740      hardcode_shlibpath_var=no
12741      hardcode_libdir_flag_spec='$wl-R,$libdir'
12742      hardcode_libdir_separator=':'
12743      link_all_deplibs=yes
12744      export_dynamic_flag_spec='$wl-Bexport'
12745      runpath_var='LD_RUN_PATH'
12746
12747      if test yes = "$GCC"; then
12748	archive_cmds='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
12749	archive_expsym_cmds='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
12750      else
12751	archive_cmds='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
12752	archive_expsym_cmds='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
12753      fi
12754      ;;
12755
12756    uts4*)
12757      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
12758      hardcode_libdir_flag_spec='-L$libdir'
12759      hardcode_shlibpath_var=no
12760      ;;
12761
12762    *)
12763      ld_shlibs=no
12764      ;;
12765    esac
12766
12767    if test sni = "$host_vendor"; then
12768      case $host in
12769      sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
12770	export_dynamic_flag_spec='$wl-Blargedynsym'
12771	;;
12772      esac
12773    fi
12774  fi
12775
12776{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5
12777$as_echo "$ld_shlibs" >&6; }
12778test no = "$ld_shlibs" && can_build_shared=no
12779
12780with_gnu_ld=$with_gnu_ld
12781
12782
12783
12784
12785
12786
12787
12788
12789
12790
12791
12792
12793
12794
12795
12796#
12797# Do we need to explicitly link libc?
12798#
12799case "x$archive_cmds_need_lc" in
12800x|xyes)
12801  # Assume -lc should be added
12802  archive_cmds_need_lc=yes
12803
12804  if test yes,yes = "$GCC,$enable_shared"; then
12805    case $archive_cmds in
12806    *'~'*)
12807      # FIXME: we may have to deal with multi-command sequences.
12808      ;;
12809    '$CC '*)
12810      # Test whether the compiler implicitly links with -lc since on some
12811      # systems, -lgcc has to come before -lc. If gcc already passes -lc
12812      # to ld, don't add -lc before -lgcc.
12813      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5
12814$as_echo_n "checking whether -lc should be explicitly linked in... " >&6; }
12815if ${lt_cv_archive_cmds_need_lc+:} false; then :
12816  $as_echo_n "(cached) " >&6
12817else
12818  $RM conftest*
12819	echo "$lt_simple_compile_test_code" > conftest.$ac_ext
12820
12821	if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
12822  (eval $ac_compile) 2>&5
12823  ac_status=$?
12824  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
12825  test $ac_status = 0; } 2>conftest.err; then
12826	  soname=conftest
12827	  lib=conftest
12828	  libobjs=conftest.$ac_objext
12829	  deplibs=
12830	  wl=$lt_prog_compiler_wl
12831	  pic_flag=$lt_prog_compiler_pic
12832	  compiler_flags=-v
12833	  linker_flags=-v
12834	  verstring=
12835	  output_objdir=.
12836	  libname=conftest
12837	  lt_save_allow_undefined_flag=$allow_undefined_flag
12838	  allow_undefined_flag=
12839	  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5
12840  (eval $archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5
12841  ac_status=$?
12842  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
12843  test $ac_status = 0; }
12844	  then
12845	    lt_cv_archive_cmds_need_lc=no
12846	  else
12847	    lt_cv_archive_cmds_need_lc=yes
12848	  fi
12849	  allow_undefined_flag=$lt_save_allow_undefined_flag
12850	else
12851	  cat conftest.err 1>&5
12852	fi
12853	$RM conftest*
12854
12855fi
12856{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc" >&5
12857$as_echo "$lt_cv_archive_cmds_need_lc" >&6; }
12858      archive_cmds_need_lc=$lt_cv_archive_cmds_need_lc
12859      ;;
12860    esac
12861  fi
12862  ;;
12863esac
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
13003
13004
13005
13006
13007
13008
13009
13010
13011
13012
13013
13014
13015
13016  { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5
13017$as_echo_n "checking dynamic linker characteristics... " >&6; }
13018
13019if test yes = "$GCC"; then
13020  case $host_os in
13021    darwin*) lt_awk_arg='/^libraries:/,/LR/' ;;
13022    *) lt_awk_arg='/^libraries:/' ;;
13023  esac
13024  case $host_os in
13025    mingw* | cegcc*) lt_sed_strip_eq='s|=\([A-Za-z]:\)|\1|g' ;;
13026    *) lt_sed_strip_eq='s|=/|/|g' ;;
13027  esac
13028  lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq`
13029  case $lt_search_path_spec in
13030  *\;*)
13031    # if the path contains ";" then we assume it to be the separator
13032    # otherwise default to the standard path separator (i.e. ":") - it is
13033    # assumed that no part of a normal pathname contains ";" but that should
13034    # okay in the real world where ";" in dirpaths is itself problematic.
13035    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'`
13036    ;;
13037  *)
13038    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"`
13039    ;;
13040  esac
13041  # Ok, now we have the path, separated by spaces, we can step through it
13042  # and add multilib dir if necessary...
13043  lt_tmp_lt_search_path_spec=
13044  lt_multi_os_dir=/`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
13045  # ...but if some path component already ends with the multilib dir we assume
13046  # that all is fine and trust -print-search-dirs as is (GCC 4.2? or newer).
13047  case "$lt_multi_os_dir; $lt_search_path_spec " in
13048  "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*)
13049    lt_multi_os_dir=
13050    ;;
13051  esac
13052  for lt_sys_path in $lt_search_path_spec; do
13053    if test -d "$lt_sys_path$lt_multi_os_dir"; then
13054      lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path$lt_multi_os_dir"
13055    elif test -n "$lt_multi_os_dir"; then
13056      test -d "$lt_sys_path" && \
13057	lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
13058    fi
13059  done
13060  lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk '
13061BEGIN {RS = " "; FS = "/|\n";} {
13062  lt_foo = "";
13063  lt_count = 0;
13064  for (lt_i = NF; lt_i > 0; lt_i--) {
13065    if ($lt_i != "" && $lt_i != ".") {
13066      if ($lt_i == "..") {
13067        lt_count++;
13068      } else {
13069        if (lt_count == 0) {
13070          lt_foo = "/" $lt_i lt_foo;
13071        } else {
13072          lt_count--;
13073        }
13074      }
13075    }
13076  }
13077  if (lt_foo != "") { lt_freq[lt_foo]++; }
13078  if (lt_freq[lt_foo] == 1) { print lt_foo; }
13079}'`
13080  # AWK program above erroneously prepends '/' to C:/dos/paths
13081  # for these hosts.
13082  case $host_os in
13083    mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\
13084      $SED 's|/\([A-Za-z]:\)|\1|g'` ;;
13085  esac
13086  sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP`
13087else
13088  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
13089fi
13090library_names_spec=
13091libname_spec='lib$name'
13092soname_spec=
13093shrext_cmds=.so
13094postinstall_cmds=
13095postuninstall_cmds=
13096finish_cmds=
13097finish_eval=
13098shlibpath_var=
13099shlibpath_overrides_runpath=unknown
13100version_type=none
13101dynamic_linker="$host_os ld.so"
13102sys_lib_dlsearch_path_spec="/lib /usr/lib"
13103need_lib_prefix=unknown
13104hardcode_into_libs=no
13105
13106# when you set need_version to no, make sure it does not cause -set_version
13107# flags to be left without arguments
13108need_version=unknown
13109
13110
13111
13112case $host_os in
13113aix3*)
13114  version_type=linux # correct to gnu/linux during the next big refactor
13115  library_names_spec='$libname$release$shared_ext$versuffix $libname.a'
13116  shlibpath_var=LIBPATH
13117
13118  # AIX 3 has no versioning support, so we append a major version to the name.
13119  soname_spec='$libname$release$shared_ext$major'
13120  ;;
13121
13122aix[4-9]*)
13123  version_type=linux # correct to gnu/linux during the next big refactor
13124  need_lib_prefix=no
13125  need_version=no
13126  hardcode_into_libs=yes
13127  if test ia64 = "$host_cpu"; then
13128    # AIX 5 supports IA64
13129    library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext'
13130    shlibpath_var=LD_LIBRARY_PATH
13131  else
13132    # With GCC up to 2.95.x, collect2 would create an import file
13133    # for dependence libraries.  The import file would start with
13134    # the line '#! .'.  This would cause the generated library to
13135    # depend on '.', always an invalid library.  This was fixed in
13136    # development snapshots of GCC prior to 3.0.
13137    case $host_os in
13138      aix4 | aix4.[01] | aix4.[01].*)
13139      if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
13140	   echo ' yes '
13141	   echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then
13142	:
13143      else
13144	can_build_shared=no
13145      fi
13146      ;;
13147    esac
13148    # Using Import Files as archive members, it is possible to support
13149    # filename-based versioning of shared library archives on AIX. While
13150    # this would work for both with and without runtime linking, it will
13151    # prevent static linking of such archives. So we do filename-based
13152    # shared library versioning with .so extension only, which is used
13153    # when both runtime linking and shared linking is enabled.
13154    # Unfortunately, runtime linking may impact performance, so we do
13155    # not want this to be the default eventually. Also, we use the
13156    # versioned .so libs for executables only if there is the -brtl
13157    # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only.
13158    # To allow for filename-based versioning support, we need to create
13159    # libNAME.so.V as an archive file, containing:
13160    # *) an Import File, referring to the versioned filename of the
13161    #    archive as well as the shared archive member, telling the
13162    #    bitwidth (32 or 64) of that shared object, and providing the
13163    #    list of exported symbols of that shared object, eventually
13164    #    decorated with the 'weak' keyword
13165    # *) the shared object with the F_LOADONLY flag set, to really avoid
13166    #    it being seen by the linker.
13167    # At run time we better use the real file rather than another symlink,
13168    # but for link time we create the symlink libNAME.so -> libNAME.so.V
13169
13170    case $with_aix_soname,$aix_use_runtimelinking in
13171    # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct
13172    # soname into executable. Probably we can add versioning support to
13173    # collect2, so additional links can be useful in future.
13174    aix,yes) # traditional libtool
13175      dynamic_linker='AIX unversionable lib.so'
13176      # If using run time linking (on AIX 4.2 or later) use lib<name>.so
13177      # instead of lib<name>.a to let people know that these are not
13178      # typical AIX shared libraries.
13179      library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13180      ;;
13181    aix,no) # traditional AIX only
13182      dynamic_linker='AIX lib.a(lib.so.V)'
13183      # We preserve .a as extension for shared libraries through AIX4.2
13184      # and later when we are not doing run time linking.
13185      library_names_spec='$libname$release.a $libname.a'
13186      soname_spec='$libname$release$shared_ext$major'
13187      ;;
13188    svr4,*) # full svr4 only
13189      dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o)"
13190      library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
13191      # We do not specify a path in Import Files, so LIBPATH fires.
13192      shlibpath_overrides_runpath=yes
13193      ;;
13194    *,yes) # both, prefer svr4
13195      dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o), lib.a(lib.so.V)"
13196      library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
13197      # unpreferred sharedlib libNAME.a needs extra handling
13198      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"'
13199      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"'
13200      # We do not specify a path in Import Files, so LIBPATH fires.
13201      shlibpath_overrides_runpath=yes
13202      ;;
13203    *,no) # both, prefer aix
13204      dynamic_linker="AIX lib.a(lib.so.V), lib.so.V($shared_archive_member_spec.o)"
13205      library_names_spec='$libname$release.a $libname.a'
13206      soname_spec='$libname$release$shared_ext$major'
13207      # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling
13208      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)'
13209      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"'
13210      ;;
13211    esac
13212    shlibpath_var=LIBPATH
13213  fi
13214  ;;
13215
13216amigaos*)
13217  case $host_cpu in
13218  powerpc)
13219    # Since July 2007 AmigaOS4 officially supports .so libraries.
13220    # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
13221    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13222    ;;
13223  m68k)
13224    library_names_spec='$libname.ixlibrary $libname.a'
13225    # Create ${libname}_ixlibrary.a entries in /sys/libs.
13226    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'
13227    ;;
13228  esac
13229  ;;
13230
13231beos*)
13232  library_names_spec='$libname$shared_ext'
13233  dynamic_linker="$host_os ld.so"
13234  shlibpath_var=LIBRARY_PATH
13235  ;;
13236
13237bsdi[45]*)
13238  version_type=linux # correct to gnu/linux during the next big refactor
13239  need_version=no
13240  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13241  soname_spec='$libname$release$shared_ext$major'
13242  finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
13243  shlibpath_var=LD_LIBRARY_PATH
13244  sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
13245  sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
13246  # the default ld.so.conf also contains /usr/contrib/lib and
13247  # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
13248  # libtool to hard-code these into programs
13249  ;;
13250
13251cygwin* | mingw* | pw32* | cegcc*)
13252  version_type=windows
13253  shrext_cmds=.dll
13254  need_version=no
13255  need_lib_prefix=no
13256
13257  case $GCC,$cc_basename in
13258  yes,*)
13259    # gcc
13260    library_names_spec='$libname.dll.a'
13261    # DLL is installed to $(libdir)/../bin by postinstall_cmds
13262    postinstall_cmds='base_file=`basename \$file`~
13263      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
13264      dldir=$destdir/`dirname \$dlpath`~
13265      test -d \$dldir || mkdir -p \$dldir~
13266      $install_prog $dir/$dlname \$dldir/$dlname~
13267      chmod a+x \$dldir/$dlname~
13268      if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
13269        eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
13270      fi'
13271    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
13272      dlpath=$dir/\$dldll~
13273       $RM \$dlpath'
13274    shlibpath_overrides_runpath=yes
13275
13276    case $host_os in
13277    cygwin*)
13278      # Cygwin DLLs use 'cyg' prefix rather than 'lib'
13279      soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
13280
13281      sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"
13282      ;;
13283    mingw* | cegcc*)
13284      # MinGW DLLs use traditional 'lib' prefix
13285      soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
13286      ;;
13287    pw32*)
13288      # pw32 DLLs use 'pw' prefix rather than 'lib'
13289      library_names_spec='`echo $libname | sed -e 's/^lib/pw/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
13290      ;;
13291    esac
13292    dynamic_linker='Win32 ld.exe'
13293    ;;
13294
13295  *,cl*)
13296    # Native MSVC
13297    libname_spec='$name'
13298    soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
13299    library_names_spec='$libname.dll.lib'
13300
13301    case $build_os in
13302    mingw*)
13303      sys_lib_search_path_spec=
13304      lt_save_ifs=$IFS
13305      IFS=';'
13306      for lt_path in $LIB
13307      do
13308        IFS=$lt_save_ifs
13309        # Let DOS variable expansion print the short 8.3 style file name.
13310        lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"`
13311        sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path"
13312      done
13313      IFS=$lt_save_ifs
13314      # Convert to MSYS style.
13315      sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'`
13316      ;;
13317    cygwin*)
13318      # Convert to unix form, then to dos form, then back to unix form
13319      # but this time dos style (no spaces!) so that the unix form looks
13320      # like /cygdrive/c/PROGRA~1:/cygdr...
13321      sys_lib_search_path_spec=`cygpath --path --unix "$LIB"`
13322      sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null`
13323      sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
13324      ;;
13325    *)
13326      sys_lib_search_path_spec=$LIB
13327      if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then
13328        # It is most probably a Windows format PATH.
13329        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
13330      else
13331        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
13332      fi
13333      # FIXME: find the short name or the path components, as spaces are
13334      # common. (e.g. "Program Files" -> "PROGRA~1")
13335      ;;
13336    esac
13337
13338    # DLL is installed to $(libdir)/../bin by postinstall_cmds
13339    postinstall_cmds='base_file=`basename \$file`~
13340      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
13341      dldir=$destdir/`dirname \$dlpath`~
13342      test -d \$dldir || mkdir -p \$dldir~
13343      $install_prog $dir/$dlname \$dldir/$dlname'
13344    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
13345      dlpath=$dir/\$dldll~
13346       $RM \$dlpath'
13347    shlibpath_overrides_runpath=yes
13348    dynamic_linker='Win32 link.exe'
13349    ;;
13350
13351  *)
13352    # Assume MSVC wrapper
13353    library_names_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext $libname.lib'
13354    dynamic_linker='Win32 ld.exe'
13355    ;;
13356  esac
13357  # FIXME: first we should search . and the directory the executable is in
13358  shlibpath_var=PATH
13359  ;;
13360
13361darwin* | rhapsody*)
13362  dynamic_linker="$host_os dyld"
13363  version_type=darwin
13364  need_lib_prefix=no
13365  need_version=no
13366  library_names_spec='$libname$release$major$shared_ext $libname$shared_ext'
13367  soname_spec='$libname$release$major$shared_ext'
13368  shlibpath_overrides_runpath=yes
13369  shlibpath_var=DYLD_LIBRARY_PATH
13370  shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
13371
13372  sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"
13373  sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
13374  ;;
13375
13376dgux*)
13377  version_type=linux # correct to gnu/linux during the next big refactor
13378  need_lib_prefix=no
13379  need_version=no
13380  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13381  soname_spec='$libname$release$shared_ext$major'
13382  shlibpath_var=LD_LIBRARY_PATH
13383  ;;
13384
13385freebsd* | dragonfly*)
13386  # DragonFly does not have aout.  When/if they implement a new
13387  # versioning mechanism, adjust this.
13388  if test -x /usr/bin/objformat; then
13389    objformat=`/usr/bin/objformat`
13390  else
13391    case $host_os in
13392    freebsd[23].*) objformat=aout ;;
13393    *) objformat=elf ;;
13394    esac
13395  fi
13396  version_type=freebsd-$objformat
13397  case $version_type in
13398    freebsd-elf*)
13399      library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13400      soname_spec='$libname$release$shared_ext$major'
13401      need_version=no
13402      need_lib_prefix=no
13403      ;;
13404    freebsd-*)
13405      library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
13406      need_version=yes
13407      ;;
13408  esac
13409  shlibpath_var=LD_LIBRARY_PATH
13410  case $host_os in
13411  freebsd2.*)
13412    shlibpath_overrides_runpath=yes
13413    ;;
13414  freebsd3.[01]* | freebsdelf3.[01]*)
13415    shlibpath_overrides_runpath=yes
13416    hardcode_into_libs=yes
13417    ;;
13418  freebsd3.[2-9]* | freebsdelf3.[2-9]* | \
13419  freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1)
13420    shlibpath_overrides_runpath=no
13421    hardcode_into_libs=yes
13422    ;;
13423  *) # from 4.6 on, and DragonFly
13424    shlibpath_overrides_runpath=yes
13425    hardcode_into_libs=yes
13426    ;;
13427  esac
13428  ;;
13429
13430haiku*)
13431  version_type=linux # correct to gnu/linux during the next big refactor
13432  need_lib_prefix=no
13433  need_version=no
13434  dynamic_linker="$host_os runtime_loader"
13435  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13436  soname_spec='$libname$release$shared_ext$major'
13437  shlibpath_var=LIBRARY_PATH
13438  shlibpath_overrides_runpath=no
13439  sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
13440  hardcode_into_libs=yes
13441  ;;
13442
13443hpux9* | hpux10* | hpux11*)
13444  # Give a soname corresponding to the major version so that dld.sl refuses to
13445  # link against other versions.
13446  version_type=sunos
13447  need_lib_prefix=no
13448  need_version=no
13449  case $host_cpu in
13450  ia64*)
13451    shrext_cmds='.so'
13452    hardcode_into_libs=yes
13453    dynamic_linker="$host_os dld.so"
13454    shlibpath_var=LD_LIBRARY_PATH
13455    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
13456    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13457    soname_spec='$libname$release$shared_ext$major'
13458    if test 32 = "$HPUX_IA64_MODE"; then
13459      sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
13460      sys_lib_dlsearch_path_spec=/usr/lib/hpux32
13461    else
13462      sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
13463      sys_lib_dlsearch_path_spec=/usr/lib/hpux64
13464    fi
13465    ;;
13466  hppa*64*)
13467    shrext_cmds='.sl'
13468    hardcode_into_libs=yes
13469    dynamic_linker="$host_os dld.sl"
13470    shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
13471    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
13472    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13473    soname_spec='$libname$release$shared_ext$major'
13474    sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
13475    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
13476    ;;
13477  *)
13478    shrext_cmds='.sl'
13479    dynamic_linker="$host_os dld.sl"
13480    shlibpath_var=SHLIB_PATH
13481    shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
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    ;;
13485  esac
13486  # HP-UX runs *really* slowly unless shared libraries are mode 555, ...
13487  postinstall_cmds='chmod 555 $lib'
13488  # or fails outright, so override atomically:
13489  install_override_mode=555
13490  ;;
13491
13492interix[3-9]*)
13493  version_type=linux # correct to gnu/linux during the next big refactor
13494  need_lib_prefix=no
13495  need_version=no
13496  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13497  soname_spec='$libname$release$shared_ext$major'
13498  dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
13499  shlibpath_var=LD_LIBRARY_PATH
13500  shlibpath_overrides_runpath=no
13501  hardcode_into_libs=yes
13502  ;;
13503
13504irix5* | irix6* | nonstopux*)
13505  case $host_os in
13506    nonstopux*) version_type=nonstopux ;;
13507    *)
13508	if test yes = "$lt_cv_prog_gnu_ld"; then
13509		version_type=linux # correct to gnu/linux during the next big refactor
13510	else
13511		version_type=irix
13512	fi ;;
13513  esac
13514  need_lib_prefix=no
13515  need_version=no
13516  soname_spec='$libname$release$shared_ext$major'
13517  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext'
13518  case $host_os in
13519  irix5* | nonstopux*)
13520    libsuff= shlibsuff=
13521    ;;
13522  *)
13523    case $LD in # libtool.m4 will add one of these switches to LD
13524    *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
13525      libsuff= shlibsuff= libmagic=32-bit;;
13526    *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
13527      libsuff=32 shlibsuff=N32 libmagic=N32;;
13528    *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
13529      libsuff=64 shlibsuff=64 libmagic=64-bit;;
13530    *) libsuff= shlibsuff= libmagic=never-match;;
13531    esac
13532    ;;
13533  esac
13534  shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
13535  shlibpath_overrides_runpath=no
13536  sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff"
13537  sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff"
13538  hardcode_into_libs=yes
13539  ;;
13540
13541# No shared lib support for Linux oldld, aout, or coff.
13542linux*oldld* | linux*aout* | linux*coff*)
13543  dynamic_linker=no
13544  ;;
13545
13546linux*android*)
13547  version_type=none # Android doesn't support versioned libraries.
13548  need_lib_prefix=no
13549  need_version=no
13550  library_names_spec='$libname$release$shared_ext'
13551  soname_spec='$libname$release$shared_ext'
13552  finish_cmds=
13553  shlibpath_var=LD_LIBRARY_PATH
13554  shlibpath_overrides_runpath=yes
13555
13556  # This implies no fast_install, which is unacceptable.
13557  # Some rework will be needed to allow for fast_install
13558  # before this can be enabled.
13559  hardcode_into_libs=yes
13560
13561  dynamic_linker='Android linker'
13562  # Don't embed -rpath directories since the linker doesn't support them.
13563  hardcode_libdir_flag_spec='-L$libdir'
13564  ;;
13565
13566# This must be glibc/ELF.
13567linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
13568  version_type=linux # correct to gnu/linux during the next big refactor
13569  need_lib_prefix=no
13570  need_version=no
13571  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13572  soname_spec='$libname$release$shared_ext$major'
13573  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
13574  shlibpath_var=LD_LIBRARY_PATH
13575  shlibpath_overrides_runpath=no
13576
13577  # Some binutils ld are patched to set DT_RUNPATH
13578  if ${lt_cv_shlibpath_overrides_runpath+:} false; then :
13579  $as_echo_n "(cached) " >&6
13580else
13581  lt_cv_shlibpath_overrides_runpath=no
13582    save_LDFLAGS=$LDFLAGS
13583    save_libdir=$libdir
13584    eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \
13585	 LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\""
13586    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13587/* end confdefs.h.  */
13588
13589int
13590main ()
13591{
13592
13593  ;
13594  return 0;
13595}
13596_ACEOF
13597if ac_fn_c_try_link "$LINENO"; then :
13598  if  ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then :
13599  lt_cv_shlibpath_overrides_runpath=yes
13600fi
13601fi
13602rm -f core conftest.err conftest.$ac_objext \
13603    conftest$ac_exeext conftest.$ac_ext
13604    LDFLAGS=$save_LDFLAGS
13605    libdir=$save_libdir
13606
13607fi
13608
13609  shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
13610
13611  # This implies no fast_install, which is unacceptable.
13612  # Some rework will be needed to allow for fast_install
13613  # before this can be enabled.
13614  hardcode_into_libs=yes
13615
13616  # Add ABI-specific directories to the system library path.
13617  sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib"
13618
13619  # Ideally, we could use ldconfig to report *all* directores which are
13620  # searched for libraries, however this is still not possible.  Aside from not
13621  # being certain /sbin/ldconfig is available, command
13622  # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64,
13623  # even though it is searched at run-time.  Try to do the best guess by
13624  # appending ld.so.conf contents (and includes) to the search path.
13625  if test -f /etc/ld.so.conf; then
13626    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' ' '`
13627    sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra"
13628  fi
13629
13630  # We used to test for /lib/ld.so.1 and disable shared libraries on
13631  # powerpc, because MkLinux only supported shared libraries with the
13632  # GNU dynamic linker.  Since this was broken with cross compilers,
13633  # most powerpc-linux boxes support dynamic linking these days and
13634  # people can always --disable-shared, the test was removed, and we
13635  # assume the GNU/Linux dynamic linker is in use.
13636  dynamic_linker='GNU/Linux ld.so'
13637  ;;
13638
13639netbsd*)
13640  version_type=sunos
13641  need_lib_prefix=no
13642  need_version=no
13643  if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
13644    library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
13645    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
13646    dynamic_linker='NetBSD (a.out) ld.so'
13647  else
13648    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13649    soname_spec='$libname$release$shared_ext$major'
13650    dynamic_linker='NetBSD ld.elf_so'
13651  fi
13652  shlibpath_var=LD_LIBRARY_PATH
13653  shlibpath_overrides_runpath=yes
13654  hardcode_into_libs=yes
13655  ;;
13656
13657newsos6)
13658  version_type=linux # correct to gnu/linux during the next big refactor
13659  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13660  shlibpath_var=LD_LIBRARY_PATH
13661  shlibpath_overrides_runpath=yes
13662  ;;
13663
13664*nto* | *qnx*)
13665  version_type=qnx
13666  need_lib_prefix=no
13667  need_version=no
13668  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13669  soname_spec='$libname$release$shared_ext$major'
13670  shlibpath_var=LD_LIBRARY_PATH
13671  shlibpath_overrides_runpath=no
13672  hardcode_into_libs=yes
13673  dynamic_linker='ldqnx.so'
13674  ;;
13675
13676openbsd* | bitrig*)
13677  version_type=sunos
13678  sys_lib_dlsearch_path_spec=/usr/lib
13679  need_lib_prefix=no
13680  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
13681    need_version=no
13682  else
13683    need_version=yes
13684  fi
13685  library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
13686  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
13687  shlibpath_var=LD_LIBRARY_PATH
13688  shlibpath_overrides_runpath=yes
13689  ;;
13690
13691os2*)
13692  libname_spec='$name'
13693  version_type=windows
13694  shrext_cmds=.dll
13695  need_version=no
13696  need_lib_prefix=no
13697  # OS/2 can only load a DLL with a base name of 8 characters or less.
13698  soname_spec='`test -n "$os2dllname" && libname="$os2dllname";
13699    v=$($ECHO $release$versuffix | tr -d .-);
13700    n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _);
13701    $ECHO $n$v`$shared_ext'
13702  library_names_spec='${libname}_dll.$libext'
13703  dynamic_linker='OS/2 ld.exe'
13704  shlibpath_var=BEGINLIBPATH
13705  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
13706  sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
13707  postinstall_cmds='base_file=`basename \$file`~
13708    dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~
13709    dldir=$destdir/`dirname \$dlpath`~
13710    test -d \$dldir || mkdir -p \$dldir~
13711    $install_prog $dir/$dlname \$dldir/$dlname~
13712    chmod a+x \$dldir/$dlname~
13713    if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
13714      eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
13715    fi'
13716  postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~
13717    dlpath=$dir/\$dldll~
13718    $RM \$dlpath'
13719  ;;
13720
13721osf3* | osf4* | osf5*)
13722  version_type=osf
13723  need_lib_prefix=no
13724  need_version=no
13725  soname_spec='$libname$release$shared_ext$major'
13726  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13727  shlibpath_var=LD_LIBRARY_PATH
13728  sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
13729  sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
13730  ;;
13731
13732rdos*)
13733  dynamic_linker=no
13734  ;;
13735
13736solaris*)
13737  version_type=linux # correct to gnu/linux during the next big refactor
13738  need_lib_prefix=no
13739  need_version=no
13740  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13741  soname_spec='$libname$release$shared_ext$major'
13742  shlibpath_var=LD_LIBRARY_PATH
13743  shlibpath_overrides_runpath=yes
13744  hardcode_into_libs=yes
13745  # ldd complains unless libraries are executable
13746  postinstall_cmds='chmod +x $lib'
13747  ;;
13748
13749sunos4*)
13750  version_type=sunos
13751  library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
13752  finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
13753  shlibpath_var=LD_LIBRARY_PATH
13754  shlibpath_overrides_runpath=yes
13755  if test yes = "$with_gnu_ld"; then
13756    need_lib_prefix=no
13757  fi
13758  need_version=yes
13759  ;;
13760
13761sysv4 | sysv4.3*)
13762  version_type=linux # correct to gnu/linux during the next big refactor
13763  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13764  soname_spec='$libname$release$shared_ext$major'
13765  shlibpath_var=LD_LIBRARY_PATH
13766  case $host_vendor in
13767    sni)
13768      shlibpath_overrides_runpath=no
13769      need_lib_prefix=no
13770      runpath_var=LD_RUN_PATH
13771      ;;
13772    siemens)
13773      need_lib_prefix=no
13774      ;;
13775    motorola)
13776      need_lib_prefix=no
13777      need_version=no
13778      shlibpath_overrides_runpath=no
13779      sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
13780      ;;
13781  esac
13782  ;;
13783
13784sysv4*MP*)
13785  if test -d /usr/nec; then
13786    version_type=linux # correct to gnu/linux during the next big refactor
13787    library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext'
13788    soname_spec='$libname$shared_ext.$major'
13789    shlibpath_var=LD_LIBRARY_PATH
13790  fi
13791  ;;
13792
13793sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
13794  version_type=sco
13795  need_lib_prefix=no
13796  need_version=no
13797  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext'
13798  soname_spec='$libname$release$shared_ext$major'
13799  shlibpath_var=LD_LIBRARY_PATH
13800  shlibpath_overrides_runpath=yes
13801  hardcode_into_libs=yes
13802  if test yes = "$with_gnu_ld"; then
13803    sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
13804  else
13805    sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
13806    case $host_os in
13807      sco3.2v5*)
13808        sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
13809	;;
13810    esac
13811  fi
13812  sys_lib_dlsearch_path_spec='/usr/lib'
13813  ;;
13814
13815tpf*)
13816  # TPF is a cross-target only.  Preferred cross-host = GNU/Linux.
13817  version_type=linux # correct to gnu/linux during the next big refactor
13818  need_lib_prefix=no
13819  need_version=no
13820  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13821  shlibpath_var=LD_LIBRARY_PATH
13822  shlibpath_overrides_runpath=no
13823  hardcode_into_libs=yes
13824  ;;
13825
13826uts4*)
13827  version_type=linux # correct to gnu/linux during the next big refactor
13828  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13829  soname_spec='$libname$release$shared_ext$major'
13830  shlibpath_var=LD_LIBRARY_PATH
13831  ;;
13832
13833*)
13834  dynamic_linker=no
13835  ;;
13836esac
13837{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5
13838$as_echo "$dynamic_linker" >&6; }
13839test no = "$dynamic_linker" && can_build_shared=no
13840
13841variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
13842if test yes = "$GCC"; then
13843  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
13844fi
13845
13846if test set = "${lt_cv_sys_lib_search_path_spec+set}"; then
13847  sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec
13848fi
13849
13850if test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then
13851  sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec
13852fi
13853
13854# remember unaugmented sys_lib_dlsearch_path content for libtool script decls...
13855configure_time_dlsearch_path=$sys_lib_dlsearch_path_spec
13856
13857# ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code
13858func_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH"
13859
13860# to be used as default LT_SYS_LIBRARY_PATH value in generated libtool
13861configure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH
13862
13863
13864
13865
13866
13867
13868
13869
13870
13871
13872
13873
13874
13875
13876
13877
13878
13879
13880
13881
13882
13883
13884
13885
13886
13887
13888
13889
13890
13891
13892
13893
13894
13895
13896
13897
13898
13899
13900
13901
13902
13903
13904
13905
13906
13907
13908
13909
13910
13911
13912
13913
13914
13915
13916
13917
13918
13919
13920
13921
13922
13923
13924
13925
13926
13927
13928
13929
13930
13931
13932
13933
13934
13935
13936
13937
13938
13939
13940
13941
13942
13943
13944
13945
13946
13947
13948
13949
13950
13951
13952
13953
13954
13955
13956
13957
13958
13959  { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5
13960$as_echo_n "checking how to hardcode library paths into programs... " >&6; }
13961hardcode_action=
13962if test -n "$hardcode_libdir_flag_spec" ||
13963   test -n "$runpath_var" ||
13964   test yes = "$hardcode_automatic"; then
13965
13966  # We can hardcode non-existent directories.
13967  if test no != "$hardcode_direct" &&
13968     # If the only mechanism to avoid hardcoding is shlibpath_var, we
13969     # have to relink, otherwise we might link with an installed library
13970     # when we should be linking with a yet-to-be-installed one
13971     ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, )" &&
13972     test no != "$hardcode_minus_L"; then
13973    # Linking always hardcodes the temporary library directory.
13974    hardcode_action=relink
13975  else
13976    # We can link without hardcoding, and we can hardcode nonexisting dirs.
13977    hardcode_action=immediate
13978  fi
13979else
13980  # We cannot hardcode anything, or else we can only hardcode existing
13981  # directories.
13982  hardcode_action=unsupported
13983fi
13984{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5
13985$as_echo "$hardcode_action" >&6; }
13986
13987if test relink = "$hardcode_action" ||
13988   test yes = "$inherit_rpath"; then
13989  # Fast installation is not supported
13990  enable_fast_install=no
13991elif test yes = "$shlibpath_overrides_runpath" ||
13992     test no = "$enable_shared"; then
13993  # Fast installation is not necessary
13994  enable_fast_install=needless
13995fi
13996
13997
13998
13999
14000
14001
14002  if test yes != "$enable_dlopen"; then
14003  enable_dlopen=unknown
14004  enable_dlopen_self=unknown
14005  enable_dlopen_self_static=unknown
14006else
14007  lt_cv_dlopen=no
14008  lt_cv_dlopen_libs=
14009
14010  case $host_os in
14011  beos*)
14012    lt_cv_dlopen=load_add_on
14013    lt_cv_dlopen_libs=
14014    lt_cv_dlopen_self=yes
14015    ;;
14016
14017  mingw* | pw32* | cegcc*)
14018    lt_cv_dlopen=LoadLibrary
14019    lt_cv_dlopen_libs=
14020    ;;
14021
14022  cygwin*)
14023    lt_cv_dlopen=dlopen
14024    lt_cv_dlopen_libs=
14025    ;;
14026
14027  darwin*)
14028    # if libdl is installed we need to link against it
14029    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
14030$as_echo_n "checking for dlopen in -ldl... " >&6; }
14031if ${ac_cv_lib_dl_dlopen+:} false; then :
14032  $as_echo_n "(cached) " >&6
14033else
14034  ac_check_lib_save_LIBS=$LIBS
14035LIBS="-ldl  $LIBS"
14036cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14037/* end confdefs.h.  */
14038
14039/* Override any GCC internal prototype to avoid an error.
14040   Use char because int might match the return type of a GCC
14041   builtin and then its argument prototype would still apply.  */
14042#ifdef __cplusplus
14043extern "C"
14044#endif
14045char dlopen ();
14046int
14047main ()
14048{
14049return dlopen ();
14050  ;
14051  return 0;
14052}
14053_ACEOF
14054if ac_fn_c_try_link "$LINENO"; then :
14055  ac_cv_lib_dl_dlopen=yes
14056else
14057  ac_cv_lib_dl_dlopen=no
14058fi
14059rm -f core conftest.err conftest.$ac_objext \
14060    conftest$ac_exeext conftest.$ac_ext
14061LIBS=$ac_check_lib_save_LIBS
14062fi
14063{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
14064$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
14065if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
14066  lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl
14067else
14068
14069    lt_cv_dlopen=dyld
14070    lt_cv_dlopen_libs=
14071    lt_cv_dlopen_self=yes
14072
14073fi
14074
14075    ;;
14076
14077  tpf*)
14078    # Don't try to run any link tests for TPF.  We know it's impossible
14079    # because TPF is a cross-compiler, and we know how we open DSOs.
14080    lt_cv_dlopen=dlopen
14081    lt_cv_dlopen_libs=
14082    lt_cv_dlopen_self=no
14083    ;;
14084
14085  *)
14086    ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load"
14087if test "x$ac_cv_func_shl_load" = xyes; then :
14088  lt_cv_dlopen=shl_load
14089else
14090  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
14091$as_echo_n "checking for shl_load in -ldld... " >&6; }
14092if ${ac_cv_lib_dld_shl_load+:} false; then :
14093  $as_echo_n "(cached) " >&6
14094else
14095  ac_check_lib_save_LIBS=$LIBS
14096LIBS="-ldld  $LIBS"
14097cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14098/* end confdefs.h.  */
14099
14100/* Override any GCC internal prototype to avoid an error.
14101   Use char because int might match the return type of a GCC
14102   builtin and then its argument prototype would still apply.  */
14103#ifdef __cplusplus
14104extern "C"
14105#endif
14106char shl_load ();
14107int
14108main ()
14109{
14110return shl_load ();
14111  ;
14112  return 0;
14113}
14114_ACEOF
14115if ac_fn_c_try_link "$LINENO"; then :
14116  ac_cv_lib_dld_shl_load=yes
14117else
14118  ac_cv_lib_dld_shl_load=no
14119fi
14120rm -f core conftest.err conftest.$ac_objext \
14121    conftest$ac_exeext conftest.$ac_ext
14122LIBS=$ac_check_lib_save_LIBS
14123fi
14124{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
14125$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
14126if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
14127  lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld
14128else
14129  ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
14130if test "x$ac_cv_func_dlopen" = xyes; then :
14131  lt_cv_dlopen=dlopen
14132else
14133  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
14134$as_echo_n "checking for dlopen in -ldl... " >&6; }
14135if ${ac_cv_lib_dl_dlopen+:} false; then :
14136  $as_echo_n "(cached) " >&6
14137else
14138  ac_check_lib_save_LIBS=$LIBS
14139LIBS="-ldl  $LIBS"
14140cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14141/* end confdefs.h.  */
14142
14143/* Override any GCC internal prototype to avoid an error.
14144   Use char because int might match the return type of a GCC
14145   builtin and then its argument prototype would still apply.  */
14146#ifdef __cplusplus
14147extern "C"
14148#endif
14149char dlopen ();
14150int
14151main ()
14152{
14153return dlopen ();
14154  ;
14155  return 0;
14156}
14157_ACEOF
14158if ac_fn_c_try_link "$LINENO"; then :
14159  ac_cv_lib_dl_dlopen=yes
14160else
14161  ac_cv_lib_dl_dlopen=no
14162fi
14163rm -f core conftest.err conftest.$ac_objext \
14164    conftest$ac_exeext conftest.$ac_ext
14165LIBS=$ac_check_lib_save_LIBS
14166fi
14167{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
14168$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
14169if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
14170  lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl
14171else
14172  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5
14173$as_echo_n "checking for dlopen in -lsvld... " >&6; }
14174if ${ac_cv_lib_svld_dlopen+:} false; then :
14175  $as_echo_n "(cached) " >&6
14176else
14177  ac_check_lib_save_LIBS=$LIBS
14178LIBS="-lsvld  $LIBS"
14179cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14180/* end confdefs.h.  */
14181
14182/* Override any GCC internal prototype to avoid an error.
14183   Use char because int might match the return type of a GCC
14184   builtin and then its argument prototype would still apply.  */
14185#ifdef __cplusplus
14186extern "C"
14187#endif
14188char dlopen ();
14189int
14190main ()
14191{
14192return dlopen ();
14193  ;
14194  return 0;
14195}
14196_ACEOF
14197if ac_fn_c_try_link "$LINENO"; then :
14198  ac_cv_lib_svld_dlopen=yes
14199else
14200  ac_cv_lib_svld_dlopen=no
14201fi
14202rm -f core conftest.err conftest.$ac_objext \
14203    conftest$ac_exeext conftest.$ac_ext
14204LIBS=$ac_check_lib_save_LIBS
14205fi
14206{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5
14207$as_echo "$ac_cv_lib_svld_dlopen" >&6; }
14208if test "x$ac_cv_lib_svld_dlopen" = xyes; then :
14209  lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld
14210else
14211  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5
14212$as_echo_n "checking for dld_link in -ldld... " >&6; }
14213if ${ac_cv_lib_dld_dld_link+:} false; then :
14214  $as_echo_n "(cached) " >&6
14215else
14216  ac_check_lib_save_LIBS=$LIBS
14217LIBS="-ldld  $LIBS"
14218cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14219/* end confdefs.h.  */
14220
14221/* Override any GCC internal prototype to avoid an error.
14222   Use char because int might match the return type of a GCC
14223   builtin and then its argument prototype would still apply.  */
14224#ifdef __cplusplus
14225extern "C"
14226#endif
14227char dld_link ();
14228int
14229main ()
14230{
14231return dld_link ();
14232  ;
14233  return 0;
14234}
14235_ACEOF
14236if ac_fn_c_try_link "$LINENO"; then :
14237  ac_cv_lib_dld_dld_link=yes
14238else
14239  ac_cv_lib_dld_dld_link=no
14240fi
14241rm -f core conftest.err conftest.$ac_objext \
14242    conftest$ac_exeext conftest.$ac_ext
14243LIBS=$ac_check_lib_save_LIBS
14244fi
14245{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5
14246$as_echo "$ac_cv_lib_dld_dld_link" >&6; }
14247if test "x$ac_cv_lib_dld_dld_link" = xyes; then :
14248  lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld
14249fi
14250
14251
14252fi
14253
14254
14255fi
14256
14257
14258fi
14259
14260
14261fi
14262
14263
14264fi
14265
14266    ;;
14267  esac
14268
14269  if test no = "$lt_cv_dlopen"; then
14270    enable_dlopen=no
14271  else
14272    enable_dlopen=yes
14273  fi
14274
14275  case $lt_cv_dlopen in
14276  dlopen)
14277    save_CPPFLAGS=$CPPFLAGS
14278    test yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
14279
14280    save_LDFLAGS=$LDFLAGS
14281    wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
14282
14283    save_LIBS=$LIBS
14284    LIBS="$lt_cv_dlopen_libs $LIBS"
14285
14286    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5
14287$as_echo_n "checking whether a program can dlopen itself... " >&6; }
14288if ${lt_cv_dlopen_self+:} false; then :
14289  $as_echo_n "(cached) " >&6
14290else
14291  	  if test yes = "$cross_compiling"; then :
14292  lt_cv_dlopen_self=cross
14293else
14294  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
14295  lt_status=$lt_dlunknown
14296  cat > conftest.$ac_ext <<_LT_EOF
14297#line $LINENO "configure"
14298#include "confdefs.h"
14299
14300#if HAVE_DLFCN_H
14301#include <dlfcn.h>
14302#endif
14303
14304#include <stdio.h>
14305
14306#ifdef RTLD_GLOBAL
14307#  define LT_DLGLOBAL		RTLD_GLOBAL
14308#else
14309#  ifdef DL_GLOBAL
14310#    define LT_DLGLOBAL		DL_GLOBAL
14311#  else
14312#    define LT_DLGLOBAL		0
14313#  endif
14314#endif
14315
14316/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
14317   find out it does not work in some platform. */
14318#ifndef LT_DLLAZY_OR_NOW
14319#  ifdef RTLD_LAZY
14320#    define LT_DLLAZY_OR_NOW		RTLD_LAZY
14321#  else
14322#    ifdef DL_LAZY
14323#      define LT_DLLAZY_OR_NOW		DL_LAZY
14324#    else
14325#      ifdef RTLD_NOW
14326#        define LT_DLLAZY_OR_NOW	RTLD_NOW
14327#      else
14328#        ifdef DL_NOW
14329#          define LT_DLLAZY_OR_NOW	DL_NOW
14330#        else
14331#          define LT_DLLAZY_OR_NOW	0
14332#        endif
14333#      endif
14334#    endif
14335#  endif
14336#endif
14337
14338/* When -fvisibility=hidden is used, assume the code has been annotated
14339   correspondingly for the symbols needed.  */
14340#if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
14341int fnord () __attribute__((visibility("default")));
14342#endif
14343
14344int fnord () { return 42; }
14345int main ()
14346{
14347  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
14348  int status = $lt_dlunknown;
14349
14350  if (self)
14351    {
14352      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
14353      else
14354        {
14355	  if (dlsym( self,"_fnord"))  status = $lt_dlneed_uscore;
14356          else puts (dlerror ());
14357	}
14358      /* dlclose (self); */
14359    }
14360  else
14361    puts (dlerror ());
14362
14363  return status;
14364}
14365_LT_EOF
14366  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
14367  (eval $ac_link) 2>&5
14368  ac_status=$?
14369  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
14370  test $ac_status = 0; } && test -s "conftest$ac_exeext" 2>/dev/null; then
14371    (./conftest; exit; ) >&5 2>/dev/null
14372    lt_status=$?
14373    case x$lt_status in
14374      x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;;
14375      x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;;
14376      x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;;
14377    esac
14378  else :
14379    # compilation failed
14380    lt_cv_dlopen_self=no
14381  fi
14382fi
14383rm -fr conftest*
14384
14385
14386fi
14387{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5
14388$as_echo "$lt_cv_dlopen_self" >&6; }
14389
14390    if test yes = "$lt_cv_dlopen_self"; then
14391      wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
14392      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5
14393$as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; }
14394if ${lt_cv_dlopen_self_static+:} false; then :
14395  $as_echo_n "(cached) " >&6
14396else
14397  	  if test yes = "$cross_compiling"; then :
14398  lt_cv_dlopen_self_static=cross
14399else
14400  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
14401  lt_status=$lt_dlunknown
14402  cat > conftest.$ac_ext <<_LT_EOF
14403#line $LINENO "configure"
14404#include "confdefs.h"
14405
14406#if HAVE_DLFCN_H
14407#include <dlfcn.h>
14408#endif
14409
14410#include <stdio.h>
14411
14412#ifdef RTLD_GLOBAL
14413#  define LT_DLGLOBAL		RTLD_GLOBAL
14414#else
14415#  ifdef DL_GLOBAL
14416#    define LT_DLGLOBAL		DL_GLOBAL
14417#  else
14418#    define LT_DLGLOBAL		0
14419#  endif
14420#endif
14421
14422/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
14423   find out it does not work in some platform. */
14424#ifndef LT_DLLAZY_OR_NOW
14425#  ifdef RTLD_LAZY
14426#    define LT_DLLAZY_OR_NOW		RTLD_LAZY
14427#  else
14428#    ifdef DL_LAZY
14429#      define LT_DLLAZY_OR_NOW		DL_LAZY
14430#    else
14431#      ifdef RTLD_NOW
14432#        define LT_DLLAZY_OR_NOW	RTLD_NOW
14433#      else
14434#        ifdef DL_NOW
14435#          define LT_DLLAZY_OR_NOW	DL_NOW
14436#        else
14437#          define LT_DLLAZY_OR_NOW	0
14438#        endif
14439#      endif
14440#    endif
14441#  endif
14442#endif
14443
14444/* When -fvisibility=hidden is used, assume the code has been annotated
14445   correspondingly for the symbols needed.  */
14446#if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
14447int fnord () __attribute__((visibility("default")));
14448#endif
14449
14450int fnord () { return 42; }
14451int main ()
14452{
14453  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
14454  int status = $lt_dlunknown;
14455
14456  if (self)
14457    {
14458      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
14459      else
14460        {
14461	  if (dlsym( self,"_fnord"))  status = $lt_dlneed_uscore;
14462          else puts (dlerror ());
14463	}
14464      /* dlclose (self); */
14465    }
14466  else
14467    puts (dlerror ());
14468
14469  return status;
14470}
14471_LT_EOF
14472  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
14473  (eval $ac_link) 2>&5
14474  ac_status=$?
14475  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
14476  test $ac_status = 0; } && test -s "conftest$ac_exeext" 2>/dev/null; then
14477    (./conftest; exit; ) >&5 2>/dev/null
14478    lt_status=$?
14479    case x$lt_status in
14480      x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;;
14481      x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;;
14482      x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;;
14483    esac
14484  else :
14485    # compilation failed
14486    lt_cv_dlopen_self_static=no
14487  fi
14488fi
14489rm -fr conftest*
14490
14491
14492fi
14493{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self_static" >&5
14494$as_echo "$lt_cv_dlopen_self_static" >&6; }
14495    fi
14496
14497    CPPFLAGS=$save_CPPFLAGS
14498    LDFLAGS=$save_LDFLAGS
14499    LIBS=$save_LIBS
14500    ;;
14501  esac
14502
14503  case $lt_cv_dlopen_self in
14504  yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
14505  *) enable_dlopen_self=unknown ;;
14506  esac
14507
14508  case $lt_cv_dlopen_self_static in
14509  yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
14510  *) enable_dlopen_self_static=unknown ;;
14511  esac
14512fi
14513
14514
14515
14516
14517
14518
14519
14520
14521
14522
14523
14524
14525
14526
14527
14528
14529
14530striplib=
14531old_striplib=
14532{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5
14533$as_echo_n "checking whether stripping libraries is possible... " >&6; }
14534if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
14535  test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
14536  test -z "$striplib" && striplib="$STRIP --strip-unneeded"
14537  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14538$as_echo "yes" >&6; }
14539else
14540# FIXME - insert some real tests, host_os isn't really good enough
14541  case $host_os in
14542  darwin*)
14543    if test -n "$STRIP"; then
14544      striplib="$STRIP -x"
14545      old_striplib="$STRIP -S"
14546      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14547$as_echo "yes" >&6; }
14548    else
14549      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14550$as_echo "no" >&6; }
14551    fi
14552    ;;
14553  *)
14554    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14555$as_echo "no" >&6; }
14556    ;;
14557  esac
14558fi
14559
14560
14561
14562
14563
14564
14565
14566
14567
14568
14569
14570
14571  # Report what library types will actually be built
14572  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5
14573$as_echo_n "checking if libtool supports shared libraries... " >&6; }
14574  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5
14575$as_echo "$can_build_shared" >&6; }
14576
14577  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5
14578$as_echo_n "checking whether to build shared libraries... " >&6; }
14579  test no = "$can_build_shared" && enable_shared=no
14580
14581  # On AIX, shared libraries and static libraries use the same namespace, and
14582  # are all built from PIC.
14583  case $host_os in
14584  aix3*)
14585    test yes = "$enable_shared" && enable_static=no
14586    if test -n "$RANLIB"; then
14587      archive_cmds="$archive_cmds~\$RANLIB \$lib"
14588      postinstall_cmds='$RANLIB $lib'
14589    fi
14590    ;;
14591
14592  aix[4-9]*)
14593    if test ia64 != "$host_cpu"; then
14594      case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in
14595      yes,aix,yes) ;;			# shared object as lib.so file only
14596      yes,svr4,*) ;;			# shared object as lib.so archive member only
14597      yes,*) enable_static=no ;;	# shared object in lib.a archive as well
14598      esac
14599    fi
14600    ;;
14601  esac
14602  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
14603$as_echo "$enable_shared" >&6; }
14604
14605  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5
14606$as_echo_n "checking whether to build static libraries... " >&6; }
14607  # Make sure either enable_shared or enable_static is yes.
14608  test yes = "$enable_shared" || enable_static=yes
14609  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5
14610$as_echo "$enable_static" >&6; }
14611
14612
14613
14614
14615fi
14616ac_ext=c
14617ac_cpp='$CPP $CPPFLAGS'
14618ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
14619ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
14620ac_compiler_gnu=$ac_cv_c_compiler_gnu
14621
14622CC=$lt_save_CC
14623
14624
14625
14626
14627
14628
14629
14630
14631
14632
14633
14634
14635
14636
14637
14638        ac_config_commands="$ac_config_commands libtool"
14639
14640
14641
14642
14643# Only expand once:
14644
14645
14646
14647
14648# pkg-config is only needed for these options, do not require it otherwise
14649if test "$enable_systemd" = "yes" -o "$with_pyunbound" = "yes" -o "$with_pythonmod" = "yes"; then
14650
14651
14652
14653
14654
14655
14656
14657if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
14658	if test -n "$ac_tool_prefix"; then
14659  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
14660set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
14661{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14662$as_echo_n "checking for $ac_word... " >&6; }
14663if ${ac_cv_path_PKG_CONFIG+:} false; then :
14664  $as_echo_n "(cached) " >&6
14665else
14666  case $PKG_CONFIG in
14667  [\\/]* | ?:[\\/]*)
14668  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
14669  ;;
14670  *)
14671  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14672for as_dir in $PATH
14673do
14674  IFS=$as_save_IFS
14675  test -z "$as_dir" && as_dir=.
14676    for ac_exec_ext in '' $ac_executable_extensions; do
14677  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14678    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
14679    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14680    break 2
14681  fi
14682done
14683  done
14684IFS=$as_save_IFS
14685
14686  ;;
14687esac
14688fi
14689PKG_CONFIG=$ac_cv_path_PKG_CONFIG
14690if test -n "$PKG_CONFIG"; then
14691  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
14692$as_echo "$PKG_CONFIG" >&6; }
14693else
14694  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14695$as_echo "no" >&6; }
14696fi
14697
14698
14699fi
14700if test -z "$ac_cv_path_PKG_CONFIG"; then
14701  ac_pt_PKG_CONFIG=$PKG_CONFIG
14702  # Extract the first word of "pkg-config", so it can be a program name with args.
14703set dummy pkg-config; ac_word=$2
14704{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14705$as_echo_n "checking for $ac_word... " >&6; }
14706if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
14707  $as_echo_n "(cached) " >&6
14708else
14709  case $ac_pt_PKG_CONFIG in
14710  [\\/]* | ?:[\\/]*)
14711  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
14712  ;;
14713  *)
14714  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14715for as_dir in $PATH
14716do
14717  IFS=$as_save_IFS
14718  test -z "$as_dir" && as_dir=.
14719    for ac_exec_ext in '' $ac_executable_extensions; do
14720  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14721    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
14722    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14723    break 2
14724  fi
14725done
14726  done
14727IFS=$as_save_IFS
14728
14729  ;;
14730esac
14731fi
14732ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
14733if test -n "$ac_pt_PKG_CONFIG"; then
14734  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
14735$as_echo "$ac_pt_PKG_CONFIG" >&6; }
14736else
14737  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14738$as_echo "no" >&6; }
14739fi
14740
14741  if test "x$ac_pt_PKG_CONFIG" = x; then
14742    PKG_CONFIG=""
14743  else
14744    case $cross_compiling:$ac_tool_warned in
14745yes:)
14746{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
14747$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
14748ac_tool_warned=yes ;;
14749esac
14750    PKG_CONFIG=$ac_pt_PKG_CONFIG
14751  fi
14752else
14753  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
14754fi
14755
14756fi
14757if test -n "$PKG_CONFIG"; then
14758	_pkg_min_version=0.9.0
14759	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
14760$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
14761	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
14762		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14763$as_echo "yes" >&6; }
14764	else
14765		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14766$as_echo "no" >&6; }
14767		PKG_CONFIG=""
14768	fi
14769fi
14770fi
14771
14772# Checks for header files.
14773for 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
14774do :
14775  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
14776ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
14777"
14778if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
14779  cat >>confdefs.h <<_ACEOF
14780#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
14781_ACEOF
14782
14783fi
14784
14785done
14786
14787# net/if.h portability for Darwin see:
14788# https://www.gnu.org/software/autoconf/manual/autoconf-2.69/html_node/Header-Portability.html
14789for ac_header in net/if.h
14790do :
14791  ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "
14792#include <stdio.h>
14793#ifdef STDC_HEADERS
14794# include <stdlib.h>
14795# include <stddef.h>
14796#else
14797# ifdef HAVE_STDLIB_H
14798#  include <stdlib.h>
14799# endif
14800#endif
14801#ifdef HAVE_SYS_SOCKET_H
14802# include <sys/socket.h>
14803#endif
14804
14805"
14806if test "x$ac_cv_header_net_if_h" = xyes; then :
14807  cat >>confdefs.h <<_ACEOF
14808#define HAVE_NET_IF_H 1
14809_ACEOF
14810
14811fi
14812
14813done
14814
14815
14816# Check for Apple header. This uncovers TARGET_OS_IPHONE, TARGET_OS_TV or TARGET_OS_WATCH
14817for ac_header in TargetConditionals.h
14818do :
14819  ac_fn_c_check_header_compile "$LINENO" "TargetConditionals.h" "ac_cv_header_TargetConditionals_h" "$ac_includes_default
14820"
14821if test "x$ac_cv_header_TargetConditionals_h" = xyes; then :
14822  cat >>confdefs.h <<_ACEOF
14823#define HAVE_TARGETCONDITIONALS_H 1
14824_ACEOF
14825
14826fi
14827
14828done
14829
14830for ac_header in netioapi.h
14831do :
14832  ac_fn_c_check_header_compile "$LINENO" "netioapi.h" "ac_cv_header_netioapi_h" "$ac_includes_default
14833#if HAVE_SYS_PARAM_H
14834#include <sys/param.h>
14835#endif
14836
14837#ifdef HAVE_SYS_SOCKET_H
14838#include <sys/socket.h>
14839#endif
14840
14841#ifdef HAVE_SYS_UIO_H
14842#include <sys/uio.h>
14843#endif
14844
14845#ifdef HAVE_NETINET_IN_H
14846#include <netinet/in.h>
14847#endif
14848
14849#ifdef HAVE_NETINET_TCP_H
14850#include <netinet/tcp.h>
14851#endif
14852
14853#ifdef HAVE_ARPA_INET_H
14854#include <arpa/inet.h>
14855#endif
14856
14857#ifdef HAVE_WINSOCK2_H
14858#include <winsock2.h>
14859#endif
14860
14861#ifdef HAVE_WS2TCPIP_H
14862#include <ws2tcpip.h>
14863#endif
14864
14865"
14866if test "x$ac_cv_header_netioapi_h" = xyes; then :
14867  cat >>confdefs.h <<_ACEOF
14868#define HAVE_NETIOAPI_H 1
14869_ACEOF
14870
14871fi
14872
14873done
14874
14875
14876# check for types.
14877# Using own tests for int64* because autoconf builtin only give 32bit.
14878ac_fn_c_check_type "$LINENO" "int8_t" "ac_cv_type_int8_t" "$ac_includes_default"
14879if test "x$ac_cv_type_int8_t" = xyes; then :
14880
14881else
14882
14883cat >>confdefs.h <<_ACEOF
14884#define int8_t signed char
14885_ACEOF
14886
14887fi
14888
14889ac_fn_c_check_type "$LINENO" "int16_t" "ac_cv_type_int16_t" "$ac_includes_default"
14890if test "x$ac_cv_type_int16_t" = xyes; then :
14891
14892else
14893
14894cat >>confdefs.h <<_ACEOF
14895#define int16_t short
14896_ACEOF
14897
14898fi
14899
14900ac_fn_c_check_type "$LINENO" "int32_t" "ac_cv_type_int32_t" "$ac_includes_default"
14901if test "x$ac_cv_type_int32_t" = xyes; then :
14902
14903else
14904
14905cat >>confdefs.h <<_ACEOF
14906#define int32_t int
14907_ACEOF
14908
14909fi
14910
14911ac_fn_c_check_type "$LINENO" "int64_t" "ac_cv_type_int64_t" "$ac_includes_default"
14912if test "x$ac_cv_type_int64_t" = xyes; then :
14913
14914else
14915
14916cat >>confdefs.h <<_ACEOF
14917#define int64_t long long
14918_ACEOF
14919
14920fi
14921
14922ac_fn_c_check_type "$LINENO" "uint8_t" "ac_cv_type_uint8_t" "$ac_includes_default"
14923if test "x$ac_cv_type_uint8_t" = xyes; then :
14924
14925else
14926
14927cat >>confdefs.h <<_ACEOF
14928#define uint8_t unsigned char
14929_ACEOF
14930
14931fi
14932
14933ac_fn_c_check_type "$LINENO" "uint16_t" "ac_cv_type_uint16_t" "$ac_includes_default"
14934if test "x$ac_cv_type_uint16_t" = xyes; then :
14935
14936else
14937
14938cat >>confdefs.h <<_ACEOF
14939#define uint16_t unsigned short
14940_ACEOF
14941
14942fi
14943
14944ac_fn_c_check_type "$LINENO" "uint32_t" "ac_cv_type_uint32_t" "$ac_includes_default"
14945if test "x$ac_cv_type_uint32_t" = xyes; then :
14946
14947else
14948
14949cat >>confdefs.h <<_ACEOF
14950#define uint32_t unsigned int
14951_ACEOF
14952
14953fi
14954
14955ac_fn_c_check_type "$LINENO" "uint64_t" "ac_cv_type_uint64_t" "$ac_includes_default"
14956if test "x$ac_cv_type_uint64_t" = xyes; then :
14957
14958else
14959
14960cat >>confdefs.h <<_ACEOF
14961#define uint64_t unsigned long long
14962_ACEOF
14963
14964fi
14965
14966ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
14967if test "x$ac_cv_type_size_t" = xyes; then :
14968
14969else
14970
14971cat >>confdefs.h <<_ACEOF
14972#define size_t unsigned int
14973_ACEOF
14974
14975fi
14976
14977ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
14978if test "x$ac_cv_type_ssize_t" = xyes; then :
14979
14980else
14981
14982cat >>confdefs.h <<_ACEOF
14983#define ssize_t int
14984_ACEOF
14985
14986fi
14987
14988{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
14989$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
14990if ${ac_cv_type_uid_t+:} false; then :
14991  $as_echo_n "(cached) " >&6
14992else
14993  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14994/* end confdefs.h.  */
14995#include <sys/types.h>
14996
14997_ACEOF
14998if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14999  $EGREP "uid_t" >/dev/null 2>&1; then :
15000  ac_cv_type_uid_t=yes
15001else
15002  ac_cv_type_uid_t=no
15003fi
15004rm -f conftest*
15005
15006fi
15007{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
15008$as_echo "$ac_cv_type_uid_t" >&6; }
15009if test $ac_cv_type_uid_t = no; then
15010
15011$as_echo "#define uid_t int" >>confdefs.h
15012
15013
15014$as_echo "#define gid_t int" >>confdefs.h
15015
15016fi
15017
15018ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
15019if test "x$ac_cv_type_pid_t" = xyes; then :
15020
15021else
15022
15023cat >>confdefs.h <<_ACEOF
15024#define pid_t int
15025_ACEOF
15026
15027fi
15028
15029ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
15030if test "x$ac_cv_type_off_t" = xyes; then :
15031
15032else
15033
15034cat >>confdefs.h <<_ACEOF
15035#define off_t long int
15036_ACEOF
15037
15038fi
15039
15040ac_fn_c_check_type "$LINENO" "u_char" "ac_cv_type_u_char" "
15041$ac_includes_default
15042#ifdef HAVE_WINSOCK2_H
15043#  include <winsock2.h>
15044#endif
15045
15046"
15047if test "x$ac_cv_type_u_char" = xyes; then :
15048
15049else
15050
15051$as_echo "#define u_char unsigned char" >>confdefs.h
15052
15053fi
15054
15055ac_fn_c_check_type "$LINENO" "rlim_t" "ac_cv_type_rlim_t" "
15056$ac_includes_default
15057#ifdef HAVE_SYS_RESOURCE_H
15058#  include <sys/resource.h>
15059#endif
15060
15061"
15062if test "x$ac_cv_type_rlim_t" = xyes; then :
15063
15064else
15065
15066$as_echo "#define rlim_t unsigned long" >>confdefs.h
15067
15068fi
15069
15070
15071ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
15072$ac_includes_default
15073#ifdef HAVE_SYS_SOCKET_H
15074#  include <sys/socket.h>
15075#endif
15076#ifdef HAVE_WS2TCPIP_H
15077#  include <ws2tcpip.h>
15078#endif
15079
15080"
15081if test "x$ac_cv_type_socklen_t" = xyes; then :
15082
15083else
15084
15085$as_echo "#define socklen_t int" >>confdefs.h
15086
15087fi
15088
15089 ac_fn_c_check_type "$LINENO" "in_addr_t" "ac_cv_type_in_addr_t" "
15090$ac_includes_default
15091#ifdef HAVE_SYS_TYPES_H
15092# include <sys/types.h>
15093#endif
15094#ifdef HAVE_NETINET_IN_H
15095# include <netinet/in.h>
15096#endif
15097
15098"
15099if test "x$ac_cv_type_in_addr_t" = xyes; then :
15100
15101else
15102
15103$as_echo "#define in_addr_t uint32_t" >>confdefs.h
15104
15105fi
15106
15107 ac_fn_c_check_type "$LINENO" "in_port_t" "ac_cv_type_in_port_t" "
15108$ac_includes_default
15109#ifdef HAVE_SYS_TYPES_H
15110# include <sys/types.h>
15111#endif
15112#ifdef HAVE_NETINET_IN_H
15113# include <netinet/in.h>
15114#endif
15115
15116"
15117if test "x$ac_cv_type_in_port_t" = xyes; then :
15118
15119else
15120
15121$as_echo "#define in_port_t uint16_t" >>confdefs.h
15122
15123fi
15124
15125{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if memcmp compares unsigned" >&5
15126$as_echo_n "checking if memcmp compares unsigned... " >&6; }
15127if test "$cross_compiling" = yes; then :
15128   { $as_echo "$as_me:${as_lineno-$LINENO}: result: cross-compile no" >&5
15129$as_echo "cross-compile no" >&6; }
15130
15131$as_echo "#define MEMCMP_IS_BROKEN 1" >>confdefs.h
15132
15133  case " $LIBOBJS " in
15134  *" memcmp.$ac_objext "* ) ;;
15135  *) LIBOBJS="$LIBOBJS memcmp.$ac_objext"
15136 ;;
15137esac
15138
15139
15140else
15141  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15142/* end confdefs.h.  */
15143
15144#include <stdio.h>
15145#include <stdlib.h>
15146#include <string.h>
15147int main(void)
15148{
15149	char a = 255, b = 0;
15150	if(memcmp(&a, &b, 1) < 0)
15151		return 1;
15152	return 0;
15153}
15154
15155_ACEOF
15156if ac_fn_c_try_run "$LINENO"; then :
15157  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15158$as_echo "yes" >&6; }
15159else
15160   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15161$as_echo "no" >&6; }
15162
15163$as_echo "#define MEMCMP_IS_BROKEN 1" >>confdefs.h
15164
15165  case " $LIBOBJS " in
15166  *" memcmp.$ac_objext "* ) ;;
15167  *) LIBOBJS="$LIBOBJS memcmp.$ac_objext"
15168 ;;
15169esac
15170
15171
15172fi
15173rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15174  conftest.$ac_objext conftest.beam conftest.$ac_ext
15175fi
15176
15177
15178# The cast to long int works around a bug in the HP C Compiler
15179# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
15180# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
15181# This bug is HP SR number 8606223364.
15182{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
15183$as_echo_n "checking size of time_t... " >&6; }
15184if ${ac_cv_sizeof_time_t+:} false; then :
15185  $as_echo_n "(cached) " >&6
15186else
15187  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t"        "
15188$ac_includes_default
15189#ifdef TIME_WITH_SYS_TIME
15190# include <sys/time.h>
15191# include <time.h>
15192#else
15193# ifdef HAVE_SYS_TIME_H
15194#  include <sys/time.h>
15195# else
15196#  include <time.h>
15197# endif
15198#endif
15199
15200"; then :
15201
15202else
15203  if test "$ac_cv_type_time_t" = yes; then
15204     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
15205$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
15206as_fn_error 77 "cannot compute sizeof (time_t)
15207See \`config.log' for more details" "$LINENO" 5; }
15208   else
15209     ac_cv_sizeof_time_t=0
15210   fi
15211fi
15212
15213fi
15214{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
15215$as_echo "$ac_cv_sizeof_time_t" >&6; }
15216
15217
15218
15219cat >>confdefs.h <<_ACEOF
15220#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
15221_ACEOF
15222
15223
15224# The cast to long int works around a bug in the HP C Compiler
15225# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
15226# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
15227# This bug is HP SR number 8606223364.
15228{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
15229$as_echo_n "checking size of size_t... " >&6; }
15230if ${ac_cv_sizeof_size_t+:} false; then :
15231  $as_echo_n "(cached) " >&6
15232else
15233  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (size_t))" "ac_cv_sizeof_size_t"        "$ac_includes_default"; then :
15234
15235else
15236  if test "$ac_cv_type_size_t" = yes; then
15237     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
15238$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
15239as_fn_error 77 "cannot compute sizeof (size_t)
15240See \`config.log' for more details" "$LINENO" 5; }
15241   else
15242     ac_cv_sizeof_size_t=0
15243   fi
15244fi
15245
15246fi
15247{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
15248$as_echo "$ac_cv_sizeof_size_t" >&6; }
15249
15250
15251
15252cat >>confdefs.h <<_ACEOF
15253#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
15254_ACEOF
15255
15256
15257
15258# add option to disable the evil rpath
15259
15260# Check whether --enable-rpath was given.
15261if test "${enable_rpath+set}" = set; then :
15262  enableval=$enable_rpath; enable_rpath=$enableval
15263else
15264  enable_rpath=yes
15265fi
15266
15267if test "x$enable_rpath" = xno; then
15268		ac_config_commands="$ac_config_commands disable-rpath"
15269
15270fi
15271
15272
15273
15274# check to see if libraries are needed for these functions.
15275{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing inet_pton" >&5
15276$as_echo_n "checking for library containing inet_pton... " >&6; }
15277if ${ac_cv_search_inet_pton+:} false; then :
15278  $as_echo_n "(cached) " >&6
15279else
15280  ac_func_search_save_LIBS=$LIBS
15281cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15282/* end confdefs.h.  */
15283
15284/* Override any GCC internal prototype to avoid an error.
15285   Use char because int might match the return type of a GCC
15286   builtin and then its argument prototype would still apply.  */
15287#ifdef __cplusplus
15288extern "C"
15289#endif
15290char inet_pton ();
15291int
15292main ()
15293{
15294return inet_pton ();
15295  ;
15296  return 0;
15297}
15298_ACEOF
15299for ac_lib in '' nsl; do
15300  if test -z "$ac_lib"; then
15301    ac_res="none required"
15302  else
15303    ac_res=-l$ac_lib
15304    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
15305  fi
15306  if ac_fn_c_try_link "$LINENO"; then :
15307  ac_cv_search_inet_pton=$ac_res
15308fi
15309rm -f core conftest.err conftest.$ac_objext \
15310    conftest$ac_exeext
15311  if ${ac_cv_search_inet_pton+:} false; then :
15312  break
15313fi
15314done
15315if ${ac_cv_search_inet_pton+:} false; then :
15316
15317else
15318  ac_cv_search_inet_pton=no
15319fi
15320rm conftest.$ac_ext
15321LIBS=$ac_func_search_save_LIBS
15322fi
15323{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_inet_pton" >&5
15324$as_echo "$ac_cv_search_inet_pton" >&6; }
15325ac_res=$ac_cv_search_inet_pton
15326if test "$ac_res" != no; then :
15327  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
15328
15329fi
15330
15331{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing socket" >&5
15332$as_echo_n "checking for library containing socket... " >&6; }
15333if ${ac_cv_search_socket+:} false; then :
15334  $as_echo_n "(cached) " >&6
15335else
15336  ac_func_search_save_LIBS=$LIBS
15337cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15338/* end confdefs.h.  */
15339
15340/* Override any GCC internal prototype to avoid an error.
15341   Use char because int might match the return type of a GCC
15342   builtin and then its argument prototype would still apply.  */
15343#ifdef __cplusplus
15344extern "C"
15345#endif
15346char socket ();
15347int
15348main ()
15349{
15350return socket ();
15351  ;
15352  return 0;
15353}
15354_ACEOF
15355for ac_lib in '' socket; do
15356  if test -z "$ac_lib"; then
15357    ac_res="none required"
15358  else
15359    ac_res=-l$ac_lib
15360    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
15361  fi
15362  if ac_fn_c_try_link "$LINENO"; then :
15363  ac_cv_search_socket=$ac_res
15364fi
15365rm -f core conftest.err conftest.$ac_objext \
15366    conftest$ac_exeext
15367  if ${ac_cv_search_socket+:} false; then :
15368  break
15369fi
15370done
15371if ${ac_cv_search_socket+:} false; then :
15372
15373else
15374  ac_cv_search_socket=no
15375fi
15376rm conftest.$ac_ext
15377LIBS=$ac_func_search_save_LIBS
15378fi
15379{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socket" >&5
15380$as_echo "$ac_cv_search_socket" >&6; }
15381ac_res=$ac_cv_search_socket
15382if test "$ac_res" != no; then :
15383  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
15384
15385fi
15386
15387
15388# check whether strptime also works
15389
15390# check some functions of the OS before linking libs (while still runnable).
15391for ac_header in unistd.h
15392do :
15393  ac_fn_c_check_header_mongrel "$LINENO" "unistd.h" "ac_cv_header_unistd_h" "$ac_includes_default"
15394if test "x$ac_cv_header_unistd_h" = xyes; then :
15395  cat >>confdefs.h <<_ACEOF
15396#define HAVE_UNISTD_H 1
15397_ACEOF
15398
15399fi
15400
15401done
15402
15403{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working chown" >&5
15404$as_echo_n "checking for working chown... " >&6; }
15405if ${ac_cv_func_chown_works+:} false; then :
15406  $as_echo_n "(cached) " >&6
15407else
15408  if test "$cross_compiling" = yes; then :
15409  ac_cv_func_chown_works=no
15410else
15411  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15412/* end confdefs.h.  */
15413$ac_includes_default
15414#include <fcntl.h>
15415
15416int
15417main ()
15418{
15419  char *f = "conftest.chown";
15420  struct stat before, after;
15421
15422  if (creat (f, 0600) < 0)
15423    return 1;
15424  if (stat (f, &before) < 0)
15425    return 1;
15426  if (chown (f, (uid_t) -1, (gid_t) -1) == -1)
15427    return 1;
15428  if (stat (f, &after) < 0)
15429    return 1;
15430  return ! (before.st_uid == after.st_uid && before.st_gid == after.st_gid);
15431
15432  ;
15433  return 0;
15434}
15435_ACEOF
15436if ac_fn_c_try_run "$LINENO"; then :
15437  ac_cv_func_chown_works=yes
15438else
15439  ac_cv_func_chown_works=no
15440fi
15441rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15442  conftest.$ac_objext conftest.beam conftest.$ac_ext
15443fi
15444
15445rm -f conftest.chown
15446
15447fi
15448{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_chown_works" >&5
15449$as_echo "$ac_cv_func_chown_works" >&6; }
15450if test $ac_cv_func_chown_works = yes; then
15451
15452$as_echo "#define HAVE_CHOWN 1" >>confdefs.h
15453
15454fi
15455
15456for ac_header in vfork.h
15457do :
15458  ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default"
15459if test "x$ac_cv_header_vfork_h" = xyes; then :
15460  cat >>confdefs.h <<_ACEOF
15461#define HAVE_VFORK_H 1
15462_ACEOF
15463
15464fi
15465
15466done
15467
15468for ac_func in fork vfork
15469do :
15470  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
15471ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
15472if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
15473  cat >>confdefs.h <<_ACEOF
15474#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
15475_ACEOF
15476
15477fi
15478done
15479
15480if test "x$ac_cv_func_fork" = xyes; then
15481  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5
15482$as_echo_n "checking for working fork... " >&6; }
15483if ${ac_cv_func_fork_works+:} false; then :
15484  $as_echo_n "(cached) " >&6
15485else
15486  if test "$cross_compiling" = yes; then :
15487  ac_cv_func_fork_works=cross
15488else
15489  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15490/* end confdefs.h.  */
15491$ac_includes_default
15492int
15493main ()
15494{
15495
15496	  /* By Ruediger Kuhlmann. */
15497	  return fork () < 0;
15498
15499  ;
15500  return 0;
15501}
15502_ACEOF
15503if ac_fn_c_try_run "$LINENO"; then :
15504  ac_cv_func_fork_works=yes
15505else
15506  ac_cv_func_fork_works=no
15507fi
15508rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15509  conftest.$ac_objext conftest.beam conftest.$ac_ext
15510fi
15511
15512fi
15513{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5
15514$as_echo "$ac_cv_func_fork_works" >&6; }
15515
15516else
15517  ac_cv_func_fork_works=$ac_cv_func_fork
15518fi
15519if test "x$ac_cv_func_fork_works" = xcross; then
15520  case $host in
15521    *-*-amigaos* | *-*-msdosdjgpp*)
15522      # Override, as these systems have only a dummy fork() stub
15523      ac_cv_func_fork_works=no
15524      ;;
15525    *)
15526      ac_cv_func_fork_works=yes
15527      ;;
15528  esac
15529  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
15530$as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
15531fi
15532ac_cv_func_vfork_works=$ac_cv_func_vfork
15533if test "x$ac_cv_func_vfork" = xyes; then
15534  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5
15535$as_echo_n "checking for working vfork... " >&6; }
15536if ${ac_cv_func_vfork_works+:} false; then :
15537  $as_echo_n "(cached) " >&6
15538else
15539  if test "$cross_compiling" = yes; then :
15540  ac_cv_func_vfork_works=cross
15541else
15542  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15543/* end confdefs.h.  */
15544/* Thanks to Paul Eggert for this test.  */
15545$ac_includes_default
15546#include <sys/wait.h>
15547#ifdef HAVE_VFORK_H
15548# include <vfork.h>
15549#endif
15550/* On some sparc systems, changes by the child to local and incoming
15551   argument registers are propagated back to the parent.  The compiler
15552   is told about this with #include <vfork.h>, but some compilers
15553   (e.g. gcc -O) don't grok <vfork.h>.  Test for this by using a
15554   static variable whose address is put into a register that is
15555   clobbered by the vfork.  */
15556static void
15557#ifdef __cplusplus
15558sparc_address_test (int arg)
15559# else
15560sparc_address_test (arg) int arg;
15561#endif
15562{
15563  static pid_t child;
15564  if (!child) {
15565    child = vfork ();
15566    if (child < 0) {
15567      perror ("vfork");
15568      _exit(2);
15569    }
15570    if (!child) {
15571      arg = getpid();
15572      write(-1, "", 0);
15573      _exit (arg);
15574    }
15575  }
15576}
15577
15578int
15579main ()
15580{
15581  pid_t parent = getpid ();
15582  pid_t child;
15583
15584  sparc_address_test (0);
15585
15586  child = vfork ();
15587
15588  if (child == 0) {
15589    /* Here is another test for sparc vfork register problems.  This
15590       test uses lots of local variables, at least as many local
15591       variables as main has allocated so far including compiler
15592       temporaries.  4 locals are enough for gcc 1.40.3 on a Solaris
15593       4.1.3 sparc, but we use 8 to be safe.  A buggy compiler should
15594       reuse the register of parent for one of the local variables,
15595       since it will think that parent can't possibly be used any more
15596       in this routine.  Assigning to the local variable will thus
15597       munge parent in the parent process.  */
15598    pid_t
15599      p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
15600      p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
15601    /* Convince the compiler that p..p7 are live; otherwise, it might
15602       use the same hardware register for all 8 local variables.  */
15603    if (p != p1 || p != p2 || p != p3 || p != p4
15604	|| p != p5 || p != p6 || p != p7)
15605      _exit(1);
15606
15607    /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
15608       from child file descriptors.  If the child closes a descriptor
15609       before it execs or exits, this munges the parent's descriptor
15610       as well.  Test for this by closing stdout in the child.  */
15611    _exit(close(fileno(stdout)) != 0);
15612  } else {
15613    int status;
15614    struct stat st;
15615
15616    while (wait(&status) != child)
15617      ;
15618    return (
15619	 /* Was there some problem with vforking?  */
15620	 child < 0
15621
15622	 /* Did the child fail?  (This shouldn't happen.)  */
15623	 || status
15624
15625	 /* Did the vfork/compiler bug occur?  */
15626	 || parent != getpid()
15627
15628	 /* Did the file descriptor bug occur?  */
15629	 || fstat(fileno(stdout), &st) != 0
15630	 );
15631  }
15632}
15633_ACEOF
15634if ac_fn_c_try_run "$LINENO"; then :
15635  ac_cv_func_vfork_works=yes
15636else
15637  ac_cv_func_vfork_works=no
15638fi
15639rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15640  conftest.$ac_objext conftest.beam conftest.$ac_ext
15641fi
15642
15643fi
15644{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5
15645$as_echo "$ac_cv_func_vfork_works" >&6; }
15646
15647fi;
15648if test "x$ac_cv_func_fork_works" = xcross; then
15649  ac_cv_func_vfork_works=$ac_cv_func_vfork
15650  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
15651$as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
15652fi
15653
15654if test "x$ac_cv_func_vfork_works" = xyes; then
15655
15656$as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h
15657
15658else
15659
15660$as_echo "#define vfork fork" >>confdefs.h
15661
15662fi
15663if test "x$ac_cv_func_fork_works" = xyes; then
15664
15665$as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h
15666
15667fi
15668
15669
15670$as_echo "#define RETSIGTYPE void" >>confdefs.h
15671
15672{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGEFILE_SOURCE value needed for large files" >&5
15673$as_echo_n "checking for _LARGEFILE_SOURCE value needed for large files... " >&6; }
15674if ${ac_cv_sys_largefile_source+:} false; then :
15675  $as_echo_n "(cached) " >&6
15676else
15677  while :; do
15678  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15679/* end confdefs.h.  */
15680#include <sys/types.h> /* for off_t */
15681     #include <stdio.h>
15682int
15683main ()
15684{
15685int (*fp) (FILE *, off_t, int) = fseeko;
15686     return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
15687  ;
15688  return 0;
15689}
15690_ACEOF
15691if ac_fn_c_try_link "$LINENO"; then :
15692  ac_cv_sys_largefile_source=no; break
15693fi
15694rm -f core conftest.err conftest.$ac_objext \
15695    conftest$ac_exeext conftest.$ac_ext
15696  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15697/* end confdefs.h.  */
15698#define _LARGEFILE_SOURCE 1
15699#include <sys/types.h> /* for off_t */
15700     #include <stdio.h>
15701int
15702main ()
15703{
15704int (*fp) (FILE *, off_t, int) = fseeko;
15705     return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
15706  ;
15707  return 0;
15708}
15709_ACEOF
15710if ac_fn_c_try_link "$LINENO"; then :
15711  ac_cv_sys_largefile_source=1; break
15712fi
15713rm -f core conftest.err conftest.$ac_objext \
15714    conftest$ac_exeext conftest.$ac_ext
15715  ac_cv_sys_largefile_source=unknown
15716  break
15717done
15718fi
15719{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_source" >&5
15720$as_echo "$ac_cv_sys_largefile_source" >&6; }
15721case $ac_cv_sys_largefile_source in #(
15722  no | unknown) ;;
15723  *)
15724cat >>confdefs.h <<_ACEOF
15725#define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
15726_ACEOF
15727;;
15728esac
15729rm -rf conftest*
15730
15731# We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
15732# in glibc 2.1.3, but that breaks too many other things.
15733# If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
15734if test $ac_cv_sys_largefile_source != unknown; then
15735
15736$as_echo "#define HAVE_FSEEKO 1" >>confdefs.h
15737
15738fi
15739
15740
15741# Check whether --enable-largefile was given.
15742if test "${enable_largefile+set}" = set; then :
15743  enableval=$enable_largefile;
15744fi
15745
15746if test "$enable_largefile" != no; then
15747
15748  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
15749$as_echo_n "checking for special C compiler options needed for large files... " >&6; }
15750if ${ac_cv_sys_largefile_CC+:} false; then :
15751  $as_echo_n "(cached) " >&6
15752else
15753  ac_cv_sys_largefile_CC=no
15754     if test "$GCC" != yes; then
15755       ac_save_CC=$CC
15756       while :; do
15757	 # IRIX 6.2 and later do not support large files by default,
15758	 # so use the C compiler's -n32 option if that helps.
15759	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15760/* end confdefs.h.  */
15761#include <sys/types.h>
15762 /* Check that off_t can represent 2**63 - 1 correctly.
15763    We can't simply define LARGE_OFF_T to be 9223372036854775807,
15764    since some C++ compilers masquerading as C compilers
15765    incorrectly reject 9223372036854775807.  */
15766#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
15767  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
15768		       && LARGE_OFF_T % 2147483647 == 1)
15769		      ? 1 : -1];
15770int
15771main ()
15772{
15773
15774  ;
15775  return 0;
15776}
15777_ACEOF
15778	 if ac_fn_c_try_compile "$LINENO"; then :
15779  break
15780fi
15781rm -f core conftest.err conftest.$ac_objext
15782	 CC="$CC -n32"
15783	 if ac_fn_c_try_compile "$LINENO"; then :
15784  ac_cv_sys_largefile_CC=' -n32'; break
15785fi
15786rm -f core conftest.err conftest.$ac_objext
15787	 break
15788       done
15789       CC=$ac_save_CC
15790       rm -f conftest.$ac_ext
15791    fi
15792fi
15793{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
15794$as_echo "$ac_cv_sys_largefile_CC" >&6; }
15795  if test "$ac_cv_sys_largefile_CC" != no; then
15796    CC=$CC$ac_cv_sys_largefile_CC
15797  fi
15798
15799  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
15800$as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
15801if ${ac_cv_sys_file_offset_bits+:} false; then :
15802  $as_echo_n "(cached) " >&6
15803else
15804  while :; do
15805  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15806/* end confdefs.h.  */
15807#include <sys/types.h>
15808 /* Check that off_t can represent 2**63 - 1 correctly.
15809    We can't simply define LARGE_OFF_T to be 9223372036854775807,
15810    since some C++ compilers masquerading as C compilers
15811    incorrectly reject 9223372036854775807.  */
15812#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
15813  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
15814		       && LARGE_OFF_T % 2147483647 == 1)
15815		      ? 1 : -1];
15816int
15817main ()
15818{
15819
15820  ;
15821  return 0;
15822}
15823_ACEOF
15824if ac_fn_c_try_compile "$LINENO"; then :
15825  ac_cv_sys_file_offset_bits=no; break
15826fi
15827rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15828  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15829/* end confdefs.h.  */
15830#define _FILE_OFFSET_BITS 64
15831#include <sys/types.h>
15832 /* Check that off_t can represent 2**63 - 1 correctly.
15833    We can't simply define LARGE_OFF_T to be 9223372036854775807,
15834    since some C++ compilers masquerading as C compilers
15835    incorrectly reject 9223372036854775807.  */
15836#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
15837  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
15838		       && LARGE_OFF_T % 2147483647 == 1)
15839		      ? 1 : -1];
15840int
15841main ()
15842{
15843
15844  ;
15845  return 0;
15846}
15847_ACEOF
15848if ac_fn_c_try_compile "$LINENO"; then :
15849  ac_cv_sys_file_offset_bits=64; break
15850fi
15851rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15852  ac_cv_sys_file_offset_bits=unknown
15853  break
15854done
15855fi
15856{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
15857$as_echo "$ac_cv_sys_file_offset_bits" >&6; }
15858case $ac_cv_sys_file_offset_bits in #(
15859  no | unknown) ;;
15860  *)
15861cat >>confdefs.h <<_ACEOF
15862#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
15863_ACEOF
15864;;
15865esac
15866rm -rf conftest*
15867  if test $ac_cv_sys_file_offset_bits = unknown; then
15868    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
15869$as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
15870if ${ac_cv_sys_large_files+:} false; then :
15871  $as_echo_n "(cached) " >&6
15872else
15873  while :; do
15874  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15875/* end confdefs.h.  */
15876#include <sys/types.h>
15877 /* Check that off_t can represent 2**63 - 1 correctly.
15878    We can't simply define LARGE_OFF_T to be 9223372036854775807,
15879    since some C++ compilers masquerading as C compilers
15880    incorrectly reject 9223372036854775807.  */
15881#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
15882  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
15883		       && LARGE_OFF_T % 2147483647 == 1)
15884		      ? 1 : -1];
15885int
15886main ()
15887{
15888
15889  ;
15890  return 0;
15891}
15892_ACEOF
15893if ac_fn_c_try_compile "$LINENO"; then :
15894  ac_cv_sys_large_files=no; break
15895fi
15896rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15897  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15898/* end confdefs.h.  */
15899#define _LARGE_FILES 1
15900#include <sys/types.h>
15901 /* Check that off_t can represent 2**63 - 1 correctly.
15902    We can't simply define LARGE_OFF_T to be 9223372036854775807,
15903    since some C++ compilers masquerading as C compilers
15904    incorrectly reject 9223372036854775807.  */
15905#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
15906  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
15907		       && LARGE_OFF_T % 2147483647 == 1)
15908		      ? 1 : -1];
15909int
15910main ()
15911{
15912
15913  ;
15914  return 0;
15915}
15916_ACEOF
15917if ac_fn_c_try_compile "$LINENO"; then :
15918  ac_cv_sys_large_files=1; break
15919fi
15920rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15921  ac_cv_sys_large_files=unknown
15922  break
15923done
15924fi
15925{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
15926$as_echo "$ac_cv_sys_large_files" >&6; }
15927case $ac_cv_sys_large_files in #(
15928  no | unknown) ;;
15929  *)
15930cat >>confdefs.h <<_ACEOF
15931#define _LARGE_FILES $ac_cv_sys_large_files
15932_ACEOF
15933;;
15934esac
15935rm -rf conftest*
15936  fi
15937
15938
15939fi
15940
15941
15942
15943
15944{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we need -D_LARGEFILE_SOURCE=1 as a flag for $CC" >&5
15945$as_echo_n "checking whether we need -D_LARGEFILE_SOURCE=1 as a flag for $CC... " >&6; }
15946cache=_D_LARGEFILE_SOURCE_1
15947if eval \${cv_prog_cc_flag_needed_$cache+:} false; then :
15948  $as_echo_n "(cached) " >&6
15949else
15950
15951echo '
15952#include <stdio.h>
15953int test() {
15954        int a = fseeko(stdin, 0, 0);
15955        return a;
15956}
15957' > conftest.c
15958echo 'void f(){}' >>conftest.c
15959if test -z "`$CC $CPPFLAGS $CFLAGS $ERRFLAG -c conftest.c 2>&1`"; then
15960eval "cv_prog_cc_flag_needed_$cache=no"
15961else
15962
15963if test -z "`$CC $CPPFLAGS $CFLAGS -D_LARGEFILE_SOURCE=1 $ERRFLAG -c conftest.c 2>&1`"; then
15964eval "cv_prog_cc_flag_needed_$cache=yes"
15965else
15966eval "cv_prog_cc_flag_needed_$cache=fail"
15967#echo 'Test with flag fails too!'
15968#cat conftest.c
15969#echo "$CC $CPPFLAGS $CFLAGS -D_LARGEFILE_SOURCE=1 $ERRFLAG -c conftest.c 2>&1"
15970#echo `$CC $CPPFLAGS $CFLAGS -D_LARGEFILE_SOURCE=1 $ERRFLAG -c conftest.c 2>&1`
15971#exit 1
15972fi
15973
15974fi
15975rm -f conftest conftest.c conftest.o
15976
15977fi
15978
15979if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = yes"; then
15980{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15981$as_echo "yes" >&6; }
15982:
15983CFLAGS="$CFLAGS -D_LARGEFILE_SOURCE=1"
15984else
15985if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = no"; then
15986{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15987$as_echo "no" >&6; }
15988#echo 'Test with flag is no!'
15989#cat conftest.c
15990#echo "$CC $CPPFLAGS $CFLAGS -D_LARGEFILE_SOURCE=1 $ERRFLAG -c conftest.c 2>&1"
15991#echo `$CC $CPPFLAGS $CFLAGS -D_LARGEFILE_SOURCE=1 $ERRFLAG -c conftest.c 2>&1`
15992#exit 1
15993:
15994
15995else
15996{ $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
15997$as_echo "failed" >&6; }
15998:
15999
16000fi
16001fi
16002
16003
16004
16005{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if nonblocking sockets work" >&5
16006$as_echo_n "checking if nonblocking sockets work... " >&6; }
16007if echo $host | grep mingw >/dev/null; then
16008	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no (windows)" >&5
16009$as_echo "no (windows)" >&6; }
16010
16011$as_echo "#define NONBLOCKING_IS_BROKEN 1" >>confdefs.h
16012
16013else
16014if test "$cross_compiling" = yes; then :
16015
16016	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: crosscompile(yes)" >&5
16017$as_echo "crosscompile(yes)" >&6; }
16018
16019else
16020  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16021/* end confdefs.h.  */
16022
16023
16024#include <stdio.h>
16025#include <string.h>
16026#include <stdlib.h>
16027#include <fcntl.h>
16028#include <errno.h>
16029#ifdef HAVE_SYS_TYPES_H
16030#include <sys/types.h>
16031#endif
16032#ifdef HAVE_SYS_SOCKET_H
16033#include <sys/socket.h>
16034#endif
16035#ifdef HAVE_NETINET_IN_H
16036#include <netinet/in.h>
16037#endif
16038#ifdef HAVE_ARPA_INET_H
16039#include <arpa/inet.h>
16040#endif
16041#ifdef HAVE_UNISTD_H
16042#include <unistd.h>
16043#endif
16044#ifdef HAVE_TIME_H
16045#include <time.h>
16046#endif
16047
16048int main(void)
16049{
16050	int port;
16051	int sfd, cfd;
16052	int num = 10;
16053	int i, p;
16054	struct sockaddr_in a;
16055	/* test if select and nonblocking reads work well together */
16056	/* open port.
16057	   fork child to send 10 messages.
16058	   select to read.
16059	   then try to nonblocking read the 10 messages
16060	   then, nonblocking read must give EAGAIN
16061	*/
16062
16063	port = 12345 + (time(0)%32);
16064	sfd = socket(PF_INET, SOCK_DGRAM, 0);
16065	if(sfd == -1) {
16066		perror("socket");
16067		return 1;
16068	}
16069	memset(&a, 0, sizeof(a));
16070	a.sin_family = AF_INET;
16071	a.sin_port = htons(port);
16072	a.sin_addr.s_addr = inet_addr("127.0.0.1");
16073	if(bind(sfd, (struct sockaddr*)&a, sizeof(a)) < 0) {
16074		perror("bind");
16075		return 1;
16076	}
16077	if(fcntl(sfd, F_SETFL, O_NONBLOCK) == -1) {
16078		perror("fcntl");
16079		return 1;
16080	}
16081
16082	cfd = socket(PF_INET, SOCK_DGRAM, 0);
16083	if(cfd == -1) {
16084		perror("client socket");
16085		return 1;
16086	}
16087	a.sin_port = 0;
16088	if(bind(cfd, (struct sockaddr*)&a, sizeof(a)) < 0) {
16089		perror("client bind");
16090		return 1;
16091	}
16092	a.sin_port = htons(port);
16093
16094	/* no handler, causes exit in 10 seconds */
16095	alarm(10);
16096
16097	/* send and receive on the socket */
16098	if((p=fork()) == 0) {
16099		for(i=0; i<num; i++) {
16100			if(sendto(cfd, &i, sizeof(i), 0,
16101				(struct sockaddr*)&a, sizeof(a)) < 0) {
16102				perror("sendto");
16103				return 1;
16104			}
16105		}
16106	} else {
16107		/* parent */
16108		fd_set rset;
16109		int x;
16110		if(p == -1) {
16111			perror("fork");
16112			return 1;
16113		}
16114		FD_ZERO(&rset);
16115		FD_SET(sfd, &rset);
16116		if(select(sfd+1, &rset, NULL, NULL, NULL) < 1) {
16117			perror("select");
16118			return 1;
16119		}
16120		i = 0;
16121		while(i < num) {
16122			if(recv(sfd, &x, sizeof(x), 0) != sizeof(x)) {
16123				if(errno == EAGAIN)
16124					continue;
16125				perror("recv");
16126				return 1;
16127			}
16128			i++;
16129		}
16130		/* now we want to get EAGAIN: nonblocking goodness */
16131		errno = 0;
16132		recv(sfd, &x, sizeof(x), 0);
16133		if(errno != EAGAIN) {
16134			perror("trying to recv again");
16135			return 1;
16136		}
16137		/* EAGAIN encountered */
16138	}
16139
16140	close(sfd);
16141	close(cfd);
16142	return 0;
16143}
16144
16145_ACEOF
16146if ac_fn_c_try_run "$LINENO"; then :
16147
16148	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16149$as_echo "yes" >&6; }
16150
16151else
16152
16153	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16154$as_echo "no" >&6; }
16155
16156$as_echo "#define NONBLOCKING_IS_BROKEN 1" >>confdefs.h
16157
16158
16159fi
16160rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16161  conftest.$ac_objext conftest.beam conftest.$ac_ext
16162fi
16163
16164fi
16165
16166
16167{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mkdir has one arg" >&5
16168$as_echo_n "checking whether mkdir has one arg... " >&6; }
16169cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16170/* end confdefs.h.  */
16171
16172#include <stdio.h>
16173#include <unistd.h>
16174#ifdef HAVE_WINSOCK2_H
16175#include <winsock2.h>
16176#endif
16177#ifdef HAVE_SYS_STAT_H
16178#include <sys/stat.h>
16179#endif
16180
16181int
16182main ()
16183{
16184
16185	(void)mkdir("directory");
16186
16187  ;
16188  return 0;
16189}
16190_ACEOF
16191if ac_fn_c_try_compile "$LINENO"; then :
16192  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16193$as_echo "yes" >&6; }
16194
16195$as_echo "#define MKDIR_HAS_ONE_ARG 1" >>confdefs.h
16196
16197
16198else
16199  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16200$as_echo "no" >&6; }
16201
16202fi
16203rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16204
16205for ac_func in strptime
16206do :
16207  ac_fn_c_check_func "$LINENO" "strptime" "ac_cv_func_strptime"
16208if test "x$ac_cv_func_strptime" = xyes; then :
16209  cat >>confdefs.h <<_ACEOF
16210#define HAVE_STRPTIME 1
16211_ACEOF
16212
16213{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strptime works" >&5
16214$as_echo_n "checking whether strptime works... " >&6; }
16215if test c${cross_compiling} = cno; then
16216if test "$cross_compiling" = yes; then :
16217  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
16218$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
16219as_fn_error $? "cannot run test program while cross compiling
16220See \`config.log' for more details" "$LINENO" 5; }
16221else
16222  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16223/* end confdefs.h.  */
16224
16225#define _XOPEN_SOURCE 600
16226#include <time.h>
16227int main(void) { struct tm tm; char *res;
16228res = 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);
16229if (!res) return 2;
16230res = strptime("20070207111842", "%Y%m%d%H%M%S", &tm);
16231if (!res) return 1; return 0; }
16232
16233_ACEOF
16234if ac_fn_c_try_run "$LINENO"; then :
16235  eval "ac_cv_c_strptime_works=yes"
16236else
16237  eval "ac_cv_c_strptime_works=no"
16238fi
16239rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16240  conftest.$ac_objext conftest.beam conftest.$ac_ext
16241fi
16242
16243else
16244eval "ac_cv_c_strptime_works=maybe"
16245fi
16246{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_strptime_works" >&5
16247$as_echo "$ac_cv_c_strptime_works" >&6; }
16248if test $ac_cv_c_strptime_works = no; then
16249case " $LIBOBJS " in
16250  *" strptime.$ac_objext "* ) ;;
16251  *) LIBOBJS="$LIBOBJS strptime.$ac_objext"
16252 ;;
16253esac
16254
16255else
16256
16257cat >>confdefs.h <<_ACEOF
16258#define STRPTIME_WORKS 1
16259_ACEOF
16260
16261fi
16262
16263else
16264  case " $LIBOBJS " in
16265  *" strptime.$ac_objext "* ) ;;
16266  *) LIBOBJS="$LIBOBJS strptime.$ac_objext"
16267 ;;
16268esac
16269
16270fi
16271done
16272
16273
16274# check if we can use SO_REUSEPORT
16275reuseport_default=0
16276if echo "$host" | $GREP -i -e linux >/dev/null; then reuseport_default=1; fi
16277if echo "$host" | $GREP -i -e dragonfly >/dev/null; then reuseport_default=1; fi
16278if test "$reuseport_default" = 1; then
16279
16280$as_echo "#define REUSEPORT_DEFAULT 1" >>confdefs.h
16281
16282else
16283
16284$as_echo "#define REUSEPORT_DEFAULT 0" >>confdefs.h
16285
16286fi
16287
16288# Include systemd.m4 - begin
16289#   macros for configuring systemd
16290#   Copyright 2015, Sami Kerola, CloudFlare.
16291#   BSD licensed.
16292# Check whether --enable-systemd was given.
16293if test "${enable_systemd+set}" = set; then :
16294  enableval=$enable_systemd;
16295else
16296  enable_systemd=no
16297fi
16298
16299have_systemd=no
16300if test "x$enable_systemd" != xno; then :
16301
16302
16303
16304pkg_failed=no
16305{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for SYSTEMD" >&5
16306$as_echo_n "checking for SYSTEMD... " >&6; }
16307
16308if test -n "$SYSTEMD_CFLAGS"; then
16309    pkg_cv_SYSTEMD_CFLAGS="$SYSTEMD_CFLAGS"
16310 elif test -n "$PKG_CONFIG"; then
16311    if test -n "$PKG_CONFIG" && \
16312    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libsystemd\""; } >&5
16313  ($PKG_CONFIG --exists --print-errors "libsystemd") 2>&5
16314  ac_status=$?
16315  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
16316  test $ac_status = 0; }; then
16317  pkg_cv_SYSTEMD_CFLAGS=`$PKG_CONFIG --cflags "libsystemd" 2>/dev/null`
16318		      test "x$?" != "x0" && pkg_failed=yes
16319else
16320  pkg_failed=yes
16321fi
16322 else
16323    pkg_failed=untried
16324fi
16325if test -n "$SYSTEMD_LIBS"; then
16326    pkg_cv_SYSTEMD_LIBS="$SYSTEMD_LIBS"
16327 elif test -n "$PKG_CONFIG"; then
16328    if test -n "$PKG_CONFIG" && \
16329    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libsystemd\""; } >&5
16330  ($PKG_CONFIG --exists --print-errors "libsystemd") 2>&5
16331  ac_status=$?
16332  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
16333  test $ac_status = 0; }; then
16334  pkg_cv_SYSTEMD_LIBS=`$PKG_CONFIG --libs "libsystemd" 2>/dev/null`
16335		      test "x$?" != "x0" && pkg_failed=yes
16336else
16337  pkg_failed=yes
16338fi
16339 else
16340    pkg_failed=untried
16341fi
16342
16343
16344
16345if test $pkg_failed = yes; then
16346   	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16347$as_echo "no" >&6; }
16348
16349if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
16350        _pkg_short_errors_supported=yes
16351else
16352        _pkg_short_errors_supported=no
16353fi
16354        if test $_pkg_short_errors_supported = yes; then
16355	        SYSTEMD_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libsystemd" 2>&1`
16356        else
16357	        SYSTEMD_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libsystemd" 2>&1`
16358        fi
16359	# Put the nasty error message in config.log where it belongs
16360	echo "$SYSTEMD_PKG_ERRORS" >&5
16361
16362	have_systemd=no
16363elif test $pkg_failed = untried; then
16364     	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16365$as_echo "no" >&6; }
16366	have_systemd=no
16367else
16368	SYSTEMD_CFLAGS=$pkg_cv_SYSTEMD_CFLAGS
16369	SYSTEMD_LIBS=$pkg_cv_SYSTEMD_LIBS
16370        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16371$as_echo "yes" >&6; }
16372	have_systemd=yes
16373fi
16374		if test "x$have_systemd" != "xyes"; then :
16375
16376
16377pkg_failed=no
16378{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for SYSTEMD_DAEMON" >&5
16379$as_echo_n "checking for SYSTEMD_DAEMON... " >&6; }
16380
16381if test -n "$SYSTEMD_DAEMON_CFLAGS"; then
16382    pkg_cv_SYSTEMD_DAEMON_CFLAGS="$SYSTEMD_DAEMON_CFLAGS"
16383 elif test -n "$PKG_CONFIG"; then
16384    if test -n "$PKG_CONFIG" && \
16385    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libsystemd-daemon\""; } >&5
16386  ($PKG_CONFIG --exists --print-errors "libsystemd-daemon") 2>&5
16387  ac_status=$?
16388  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
16389  test $ac_status = 0; }; then
16390  pkg_cv_SYSTEMD_DAEMON_CFLAGS=`$PKG_CONFIG --cflags "libsystemd-daemon" 2>/dev/null`
16391		      test "x$?" != "x0" && pkg_failed=yes
16392else
16393  pkg_failed=yes
16394fi
16395 else
16396    pkg_failed=untried
16397fi
16398if test -n "$SYSTEMD_DAEMON_LIBS"; then
16399    pkg_cv_SYSTEMD_DAEMON_LIBS="$SYSTEMD_DAEMON_LIBS"
16400 elif test -n "$PKG_CONFIG"; then
16401    if test -n "$PKG_CONFIG" && \
16402    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libsystemd-daemon\""; } >&5
16403  ($PKG_CONFIG --exists --print-errors "libsystemd-daemon") 2>&5
16404  ac_status=$?
16405  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
16406  test $ac_status = 0; }; then
16407  pkg_cv_SYSTEMD_DAEMON_LIBS=`$PKG_CONFIG --libs "libsystemd-daemon" 2>/dev/null`
16408		      test "x$?" != "x0" && pkg_failed=yes
16409else
16410  pkg_failed=yes
16411fi
16412 else
16413    pkg_failed=untried
16414fi
16415
16416
16417
16418if test $pkg_failed = yes; then
16419   	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16420$as_echo "no" >&6; }
16421
16422if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
16423        _pkg_short_errors_supported=yes
16424else
16425        _pkg_short_errors_supported=no
16426fi
16427        if test $_pkg_short_errors_supported = yes; then
16428	        SYSTEMD_DAEMON_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libsystemd-daemon" 2>&1`
16429        else
16430	        SYSTEMD_DAEMON_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libsystemd-daemon" 2>&1`
16431        fi
16432	# Put the nasty error message in config.log where it belongs
16433	echo "$SYSTEMD_DAEMON_PKG_ERRORS" >&5
16434
16435	have_systemd_daemon=no
16436elif test $pkg_failed = untried; then
16437     	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16438$as_echo "no" >&6; }
16439	have_systemd_daemon=no
16440else
16441	SYSTEMD_DAEMON_CFLAGS=$pkg_cv_SYSTEMD_DAEMON_CFLAGS
16442	SYSTEMD_DAEMON_LIBS=$pkg_cv_SYSTEMD_DAEMON_LIBS
16443        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16444$as_echo "yes" >&6; }
16445	have_systemd_daemon=yes
16446fi
16447		if test "x$have_systemd_daemon" = "xyes"; then :
16448  have_systemd=yes
16449fi
16450
16451fi
16452	case $enable_systemd:$have_systemd in #(
16453  yes:no) :
16454    as_fn_error $? "systemd enabled but libsystemd not found" "$LINENO" 5 ;; #(
16455  *:yes) :
16456
16457$as_echo "#define HAVE_SYSTEMD 1" >>confdefs.h
16458
16459		LIBS="$LIBS $SYSTEMD_LIBS"
16460
16461	 ;; #(
16462  *) :
16463     ;;
16464esac
16465
16466
16467fi
16468 if test "x$have_systemd" = xyes; then
16469  USE_SYSTEMD_TRUE=
16470  USE_SYSTEMD_FALSE='#'
16471else
16472  USE_SYSTEMD_TRUE='#'
16473  USE_SYSTEMD_FALSE=
16474fi
16475
16476
16477# Include systemd.m4 - end
16478
16479# set memory allocation checking if requested
16480# Check whether --enable-alloc-checks was given.
16481if test "${enable_alloc_checks+set}" = set; then :
16482  enableval=$enable_alloc_checks;
16483fi
16484
16485# Check whether --enable-alloc-lite was given.
16486if test "${enable_alloc_lite+set}" = set; then :
16487  enableval=$enable_alloc_lite;
16488fi
16489
16490# Check whether --enable-alloc-nonregional was given.
16491if test "${enable_alloc_nonregional+set}" = set; then :
16492  enableval=$enable_alloc_nonregional;
16493fi
16494
16495if test x_$enable_alloc_nonregional = x_yes; then
16496
16497$as_echo "#define UNBOUND_ALLOC_NONREGIONAL 1" >>confdefs.h
16498
16499fi
16500if test x_$enable_alloc_checks = x_yes; then
16501
16502$as_echo "#define UNBOUND_ALLOC_STATS 1" >>confdefs.h
16503
16504	SLDNS_ALLOCCHECK_EXTRA_OBJ="alloc.lo log.lo"
16505
16506	ASYNCLOOK_ALLOCCHECK_EXTRA_OBJ="alloc.lo"
16507
16508else
16509	if test x_$enable_alloc_lite = x_yes; then
16510
16511$as_echo "#define UNBOUND_ALLOC_LITE 1" >>confdefs.h
16512
16513	else
16514
16515	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible malloc" >&5
16516$as_echo_n "checking for GNU libc compatible malloc... " >&6; }
16517	if test "$cross_compiling" = yes; then :
16518  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no (crosscompile)" >&5
16519$as_echo "no (crosscompile)" >&6; }
16520	case " $LIBOBJS " in
16521  *" malloc.$ac_objext "* ) ;;
16522  *) LIBOBJS="$LIBOBJS malloc.$ac_objext"
16523 ;;
16524esac
16525
16526
16527cat >>confdefs.h <<_ACEOF
16528#define malloc rpl_malloc_unbound
16529_ACEOF
16530
16531else
16532  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16533/* end confdefs.h.  */
16534#if defined STDC_HEADERS || defined HAVE_STDLIB_H
16535#include <stdlib.h>
16536#else
16537char *malloc ();
16538#endif
16539
16540int
16541main ()
16542{
16543 if(malloc(0) != 0) return 1;
16544  ;
16545  return 0;
16546}
16547
16548_ACEOF
16549if ac_fn_c_try_run "$LINENO"; then :
16550  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16551$as_echo "no" >&6; }
16552	case " $LIBOBJS " in
16553  *" malloc.$ac_objext "* ) ;;
16554  *) LIBOBJS="$LIBOBJS malloc.$ac_objext"
16555 ;;
16556esac
16557
16558
16559cat >>confdefs.h <<_ACEOF
16560#define malloc rpl_malloc_unbound
16561_ACEOF
16562
16563else
16564  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16565$as_echo "yes" >&6; }
16566
16567$as_echo "#define HAVE_MALLOC 1" >>confdefs.h
16568
16569fi
16570rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16571  conftest.$ac_objext conftest.beam conftest.$ac_ext
16572fi
16573
16574
16575	fi
16576fi
16577
16578# check windows threads (we use them, not pthreads, on windows).
16579if test "$on_mingw" = "yes"; then
16580# check windows threads
16581	for ac_header in windows.h
16582do :
16583  ac_fn_c_check_header_compile "$LINENO" "windows.h" "ac_cv_header_windows_h" "$ac_includes_default
16584"
16585if test "x$ac_cv_header_windows_h" = xyes; then :
16586  cat >>confdefs.h <<_ACEOF
16587#define HAVE_WINDOWS_H 1
16588_ACEOF
16589
16590fi
16591
16592done
16593
16594	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for CreateThread" >&5
16595$as_echo_n "checking for CreateThread... " >&6; }
16596	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16597/* end confdefs.h.  */
16598
16599#ifdef HAVE_WINDOWS_H
16600#include <windows.h>
16601#endif
16602
16603int
16604main ()
16605{
16606
16607	HANDLE t = CreateThread(NULL, 0, NULL, NULL, 0, NULL);
16608
16609  ;
16610  return 0;
16611}
16612_ACEOF
16613if ac_fn_c_try_compile "$LINENO"; then :
16614  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16615$as_echo "yes" >&6; }
16616
16617$as_echo "#define HAVE_WINDOWS_THREADS 1" >>confdefs.h
16618
16619
16620else
16621  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16622$as_echo "no" >&6; }
16623
16624fi
16625rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16626
16627else
16628# not on mingw, check thread libraries.
16629
16630# check for thread library.
16631# check this first, so that the pthread lib does not get linked in via
16632# libssl or libpython, and thus distorts the tests, and we end up using
16633# the non-threadsafe C libraries.
16634
16635# Check whether --with-pthreads was given.
16636if test "${with_pthreads+set}" = set; then :
16637  withval=$with_pthreads;
16638else
16639   withval="yes"
16640fi
16641
16642ub_have_pthreads=no
16643if test x_$withval != x_no; then
16644
16645
16646ac_ext=c
16647ac_cpp='$CPP $CPPFLAGS'
16648ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16649ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16650ac_compiler_gnu=$ac_cv_c_compiler_gnu
16651
16652ax_pthread_ok=no
16653
16654# We used to check for pthread.h first, but this fails if pthread.h
16655# requires special compiler flags (e.g. on True64 or Sequent).
16656# It gets checked for in the link test anyway.
16657
16658# First of all, check if the user has set any of the PTHREAD_LIBS,
16659# etcetera environment variables, and if threads linking works using
16660# them:
16661if test x"$PTHREAD_LIBS$PTHREAD_CFLAGS" != x; then
16662        save_CFLAGS="$CFLAGS"
16663        CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
16664        save_LIBS="$LIBS"
16665        LIBS="$PTHREAD_LIBS $LIBS"
16666        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS" >&5
16667$as_echo_n "checking for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS... " >&6; }
16668        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16669/* end confdefs.h.  */
16670
16671/* Override any GCC internal prototype to avoid an error.
16672   Use char because int might match the return type of a GCC
16673   builtin and then its argument prototype would still apply.  */
16674#ifdef __cplusplus
16675extern "C"
16676#endif
16677char pthread_join ();
16678int
16679main ()
16680{
16681return pthread_join ();
16682  ;
16683  return 0;
16684}
16685_ACEOF
16686if ac_fn_c_try_link "$LINENO"; then :
16687  ax_pthread_ok=yes
16688fi
16689rm -f core conftest.err conftest.$ac_objext \
16690    conftest$ac_exeext conftest.$ac_ext
16691        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
16692$as_echo "$ax_pthread_ok" >&6; }
16693        if test x"$ax_pthread_ok" = xno; then
16694                PTHREAD_LIBS=""
16695                PTHREAD_CFLAGS=""
16696        fi
16697        LIBS="$save_LIBS"
16698        CFLAGS="$save_CFLAGS"
16699fi
16700
16701# We must check for the threads library under a number of different
16702# names; the ordering is very important because some systems
16703# (e.g. DEC) have both -lpthread and -lpthreads, where one of the
16704# libraries is broken (non-POSIX).
16705
16706# Create a list of thread flags to try.  Items starting with a "-" are
16707# C compiler flags, and other items are library names, except for "none"
16708# which indicates that we try without any flags at all, and "pthread-config"
16709# which is a program returning the flags for the Pth emulation library.
16710
16711ax_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config"
16712
16713# The ordering *is* (sometimes) important.  Some notes on the
16714# individual items follow:
16715
16716# pthreads: AIX (must check this before -lpthread)
16717# none: in case threads are in libc; should be tried before -Kthread and
16718#       other compiler flags to prevent continual compiler warnings
16719# -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h)
16720# -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
16721# lthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
16722# -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads)
16723# -pthreads: Solaris/gcc
16724# -mthreads: Mingw32/gcc, Lynx/gcc
16725# -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
16726#      doesn't hurt to check since this sometimes defines pthreads too;
16727#      also defines -D_REENTRANT)
16728#      ... -mt is also the pthreads flag for HP/aCC
16729# pthread: Linux, etcetera
16730# --thread-safe: KAI C++
16731# pthread-config: use pthread-config program (for GNU Pth library)
16732
16733case ${host_os} in
16734        solaris*)
16735
16736        # On Solaris (at least, for some versions), libc contains stubbed
16737        # (non-functional) versions of the pthreads routines, so link-based
16738        # tests will erroneously succeed.  (We need to link with -pthreads/-mt/
16739        # -lpthread.)  (The stubs are missing pthread_cleanup_push, or rather
16740        # a function called by this macro, so we could check for that, but
16741        # who knows whether they'll stub that too in a future libc.)  So,
16742        # we'll just look for -pthreads and -lpthread first:
16743
16744        ax_pthread_flags="-pthreads pthread -mt -pthread $ax_pthread_flags"
16745        ;;
16746
16747        darwin*)
16748        ax_pthread_flags="-pthread $ax_pthread_flags"
16749        ;;
16750esac
16751
16752# Clang doesn't consider unrecognized options an error unless we specify
16753# -Werror. We throw in some extra Clang-specific options to ensure that
16754# this doesn't happen for GCC, which also accepts -Werror.
16755
16756{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler needs -Werror to reject unknown flags" >&5
16757$as_echo_n "checking if compiler needs -Werror to reject unknown flags... " >&6; }
16758save_CFLAGS="$CFLAGS"
16759ax_pthread_extra_flags="-Werror"
16760CFLAGS="$CFLAGS $ax_pthread_extra_flags -Wunknown-warning-option -Wsizeof-array-argument"
16761cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16762/* end confdefs.h.  */
16763int foo(void);
16764int
16765main ()
16766{
16767foo()
16768  ;
16769  return 0;
16770}
16771_ACEOF
16772if ac_fn_c_try_compile "$LINENO"; then :
16773  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16774$as_echo "yes" >&6; }
16775else
16776  ax_pthread_extra_flags=
16777                   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16778$as_echo "no" >&6; }
16779fi
16780rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16781CFLAGS="$save_CFLAGS"
16782
16783if test x"$ax_pthread_ok" = xno; then
16784for flag in $ax_pthread_flags; do
16785
16786        case $flag in
16787                none)
16788                { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work without any flags" >&5
16789$as_echo_n "checking whether pthreads work without any flags... " >&6; }
16790                ;;
16791
16792                -*)
16793                { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with $flag" >&5
16794$as_echo_n "checking whether pthreads work with $flag... " >&6; }
16795                PTHREAD_CFLAGS="$flag"
16796                ;;
16797
16798                pthread-config)
16799                # Extract the first word of "pthread-config", so it can be a program name with args.
16800set dummy pthread-config; ac_word=$2
16801{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16802$as_echo_n "checking for $ac_word... " >&6; }
16803if ${ac_cv_prog_ax_pthread_config+:} false; then :
16804  $as_echo_n "(cached) " >&6
16805else
16806  if test -n "$ax_pthread_config"; then
16807  ac_cv_prog_ax_pthread_config="$ax_pthread_config" # Let the user override the test.
16808else
16809as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16810for as_dir in $PATH
16811do
16812  IFS=$as_save_IFS
16813  test -z "$as_dir" && as_dir=.
16814    for ac_exec_ext in '' $ac_executable_extensions; do
16815  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16816    ac_cv_prog_ax_pthread_config="yes"
16817    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16818    break 2
16819  fi
16820done
16821  done
16822IFS=$as_save_IFS
16823
16824  test -z "$ac_cv_prog_ax_pthread_config" && ac_cv_prog_ax_pthread_config="no"
16825fi
16826fi
16827ax_pthread_config=$ac_cv_prog_ax_pthread_config
16828if test -n "$ax_pthread_config"; then
16829  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_config" >&5
16830$as_echo "$ax_pthread_config" >&6; }
16831else
16832  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16833$as_echo "no" >&6; }
16834fi
16835
16836
16837                if test x"$ax_pthread_config" = xno; then continue; fi
16838                PTHREAD_CFLAGS="`pthread-config --cflags`"
16839                PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`"
16840                ;;
16841
16842                *)
16843                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the pthreads library -l$flag" >&5
16844$as_echo_n "checking for the pthreads library -l$flag... " >&6; }
16845                PTHREAD_LIBS="-l$flag"
16846                ;;
16847        esac
16848
16849        save_LIBS="$LIBS"
16850        save_CFLAGS="$CFLAGS"
16851        LIBS="$PTHREAD_LIBS $LIBS"
16852        CFLAGS="$CFLAGS $PTHREAD_CFLAGS $ax_pthread_extra_flags"
16853
16854        # Check for various functions.  We must include pthread.h,
16855        # since some functions may be macros.  (On the Sequent, we
16856        # need a special flag -Kthread to make this header compile.)
16857        # We check for pthread_join because it is in -lpthread on IRIX
16858        # while pthread_create is in libc.  We check for pthread_attr_init
16859        # due to DEC craziness with -lpthreads.  We check for
16860        # pthread_cleanup_push because it is one of the few pthread
16861        # functions on Solaris that doesn't have a non-functional libc stub.
16862        # We try pthread_create on general principles.
16863        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16864/* end confdefs.h.  */
16865#include <pthread.h>
16866                        static void routine(void *a) { *((int*)a) = 0; }
16867                        static void *start_routine(void *a) { return a; }
16868int
16869main ()
16870{
16871pthread_t th; pthread_attr_t attr;
16872                        pthread_create(&th, 0, start_routine, 0);
16873                        pthread_join(th, 0);
16874                        pthread_attr_init(&attr);
16875                        pthread_cleanup_push(routine, 0);
16876                        pthread_cleanup_pop(0) /* ; */
16877  ;
16878  return 0;
16879}
16880_ACEOF
16881if ac_fn_c_try_link "$LINENO"; then :
16882  ax_pthread_ok=yes
16883fi
16884rm -f core conftest.err conftest.$ac_objext \
16885    conftest$ac_exeext conftest.$ac_ext
16886
16887        LIBS="$save_LIBS"
16888        CFLAGS="$save_CFLAGS"
16889
16890        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
16891$as_echo "$ax_pthread_ok" >&6; }
16892        if test "x$ax_pthread_ok" = xyes; then
16893                break;
16894        fi
16895
16896        PTHREAD_LIBS=""
16897        PTHREAD_CFLAGS=""
16898done
16899fi
16900
16901# Various other checks:
16902if test "x$ax_pthread_ok" = xyes; then
16903        save_LIBS="$LIBS"
16904        LIBS="$PTHREAD_LIBS $LIBS"
16905        save_CFLAGS="$CFLAGS"
16906        CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
16907
16908        # Detect AIX lossage: JOINABLE attribute is called UNDETACHED.
16909        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for joinable pthread attribute" >&5
16910$as_echo_n "checking for joinable pthread attribute... " >&6; }
16911        attr_name=unknown
16912        for attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do
16913            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16914/* end confdefs.h.  */
16915#include <pthread.h>
16916int
16917main ()
16918{
16919int attr = $attr; return attr /* ; */
16920  ;
16921  return 0;
16922}
16923_ACEOF
16924if ac_fn_c_try_link "$LINENO"; then :
16925  attr_name=$attr; break
16926fi
16927rm -f core conftest.err conftest.$ac_objext \
16928    conftest$ac_exeext conftest.$ac_ext
16929        done
16930        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $attr_name" >&5
16931$as_echo "$attr_name" >&6; }
16932        if test "$attr_name" != PTHREAD_CREATE_JOINABLE; then
16933
16934cat >>confdefs.h <<_ACEOF
16935#define PTHREAD_CREATE_JOINABLE $attr_name
16936_ACEOF
16937
16938        fi
16939
16940        { $as_echo "$as_me:${as_lineno-$LINENO}: checking if more special flags are required for pthreads" >&5
16941$as_echo_n "checking if more special flags are required for pthreads... " >&6; }
16942        flag=no
16943        case ${host_os} in
16944            aix* | freebsd* | darwin*) flag="-D_THREAD_SAFE";;
16945            osf* | hpux*) flag="-D_REENTRANT";;
16946            solaris*)
16947            if test "$GCC" = "yes"; then
16948                flag="-D_REENTRANT"
16949            else
16950                # TODO: What about Clang on Solaris?
16951                flag="-mt -D_REENTRANT"
16952            fi
16953            ;;
16954        esac
16955        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $flag" >&5
16956$as_echo "$flag" >&6; }
16957        if test "x$flag" != xno; then
16958            PTHREAD_CFLAGS="$flag $PTHREAD_CFLAGS"
16959        fi
16960
16961        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTHREAD_PRIO_INHERIT" >&5
16962$as_echo_n "checking for PTHREAD_PRIO_INHERIT... " >&6; }
16963if ${ax_cv_PTHREAD_PRIO_INHERIT+:} false; then :
16964  $as_echo_n "(cached) " >&6
16965else
16966
16967                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16968/* end confdefs.h.  */
16969#include <pthread.h>
16970int
16971main ()
16972{
16973int i = PTHREAD_PRIO_INHERIT;
16974  ;
16975  return 0;
16976}
16977_ACEOF
16978if ac_fn_c_try_link "$LINENO"; then :
16979  ax_cv_PTHREAD_PRIO_INHERIT=yes
16980else
16981  ax_cv_PTHREAD_PRIO_INHERIT=no
16982fi
16983rm -f core conftest.err conftest.$ac_objext \
16984    conftest$ac_exeext conftest.$ac_ext
16985
16986fi
16987{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_PRIO_INHERIT" >&5
16988$as_echo "$ax_cv_PTHREAD_PRIO_INHERIT" >&6; }
16989        if test "x$ax_cv_PTHREAD_PRIO_INHERIT" = "xyes"; then :
16990
16991$as_echo "#define HAVE_PTHREAD_PRIO_INHERIT 1" >>confdefs.h
16992
16993fi
16994
16995        LIBS="$save_LIBS"
16996        CFLAGS="$save_CFLAGS"
16997
16998        # More AIX lossage: compile with *_r variant
16999        if test "x$GCC" != xyes; then
17000            case $host_os in
17001                aix*)
17002                case "x/$CC" in #(
17003  x*/c89|x*/c89_128|x*/c99|x*/c99_128|x*/cc|x*/cc128|x*/xlc|x*/xlc_v6|x*/xlc128|x*/xlc128_v6) :
17004    #handle absolute path differently from PATH based program lookup
17005                   case "x$CC" in #(
17006  x/*) :
17007    if as_fn_executable_p ${CC}_r; then :
17008  PTHREAD_CC="${CC}_r"
17009fi ;; #(
17010  *) :
17011    for ac_prog in ${CC}_r
17012do
17013  # Extract the first word of "$ac_prog", so it can be a program name with args.
17014set dummy $ac_prog; ac_word=$2
17015{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17016$as_echo_n "checking for $ac_word... " >&6; }
17017if ${ac_cv_prog_PTHREAD_CC+:} false; then :
17018  $as_echo_n "(cached) " >&6
17019else
17020  if test -n "$PTHREAD_CC"; then
17021  ac_cv_prog_PTHREAD_CC="$PTHREAD_CC" # Let the user override the test.
17022else
17023as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17024for as_dir in $PATH
17025do
17026  IFS=$as_save_IFS
17027  test -z "$as_dir" && as_dir=.
17028    for ac_exec_ext in '' $ac_executable_extensions; do
17029  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17030    ac_cv_prog_PTHREAD_CC="$ac_prog"
17031    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17032    break 2
17033  fi
17034done
17035  done
17036IFS=$as_save_IFS
17037
17038fi
17039fi
17040PTHREAD_CC=$ac_cv_prog_PTHREAD_CC
17041if test -n "$PTHREAD_CC"; then
17042  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTHREAD_CC" >&5
17043$as_echo "$PTHREAD_CC" >&6; }
17044else
17045  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17046$as_echo "no" >&6; }
17047fi
17048
17049
17050  test -n "$PTHREAD_CC" && break
17051done
17052test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
17053 ;;
17054esac ;; #(
17055  *) :
17056     ;;
17057esac
17058                ;;
17059            esac
17060        fi
17061fi
17062
17063test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
17064
17065
17066
17067
17068
17069# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
17070if test x"$ax_pthread_ok" = xyes; then
17071
17072
17073$as_echo "#define HAVE_PTHREAD 1" >>confdefs.h
17074
17075		if test -n "$PTHREAD_LIBS"; then
17076		  LIBS="$PTHREAD_LIBS $LIBS"
17077		fi
17078		CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
17079		CC="$PTHREAD_CC"
17080		ub_have_pthreads=yes
17081		ac_fn_c_check_type "$LINENO" "pthread_spinlock_t" "ac_cv_type_pthread_spinlock_t" "#include <pthread.h>
17082"
17083if test "x$ac_cv_type_pthread_spinlock_t" = xyes; then :
17084
17085cat >>confdefs.h <<_ACEOF
17086#define HAVE_PTHREAD_SPINLOCK_T 1
17087_ACEOF
17088
17089
17090fi
17091ac_fn_c_check_type "$LINENO" "pthread_rwlock_t" "ac_cv_type_pthread_rwlock_t" "#include <pthread.h>
17092"
17093if test "x$ac_cv_type_pthread_rwlock_t" = xyes; then :
17094
17095cat >>confdefs.h <<_ACEOF
17096#define HAVE_PTHREAD_RWLOCK_T 1
17097_ACEOF
17098
17099
17100fi
17101
17102
17103		if echo "$CFLAGS" | $GREP -e "-pthread" >/dev/null; then
17104		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if -pthread unused during linking" >&5
17105$as_echo_n "checking if -pthread unused during linking... " >&6; }
17106		# catch clang warning 'argument unused during compilation'
17107		cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17108/* end confdefs.h.  */
17109$ac_includes_default
17110
17111int main(void) {return 0;}
17112
17113_ACEOF
17114		pthread_unused="yes"
17115		# first compile
17116		echo "$CC $CFLAGS -c conftest.c -o conftest.o" >&5
17117		$CC $CFLAGS -c conftest.c -o conftest.o 2>&5 >&5
17118		if test $? = 0; then
17119			# then link
17120			echo "$CC $CFLAGS -Werror $LDFLAGS $LIBS -o conftest contest.o" >&5
17121			$CC $CFLAGS -Werror $LDFLAGS $LIBS -o conftest conftest.o 2>&5 >&5
17122			if test $? -ne 0; then
17123				{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17124$as_echo "yes" >&6; }
17125				CFLAGS=`echo "$CFLAGS" | sed -e 's/-pthread//'`
17126				PTHREAD_CFLAGS_ONLY="-pthread"
17127
17128			else
17129				{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17130$as_echo "no" >&6; }
17131			fi
17132		else
17133			{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17134$as_echo "no" >&6; }
17135		fi # endif cc successful
17136		rm -f conftest conftest.c conftest.o
17137		fi # endif -pthread in CFLAGS
17138
17139
17140        :
17141else
17142        ax_pthread_ok=no
17143
17144fi
17145ac_ext=c
17146ac_cpp='$CPP $CPPFLAGS'
17147ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
17148ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
17149ac_compiler_gnu=$ac_cv_c_compiler_gnu
17150
17151
17152fi
17153
17154# check solaris thread library
17155
17156# Check whether --with-solaris-threads was given.
17157if test "${with_solaris_threads+set}" = set; then :
17158  withval=$with_solaris_threads;
17159else
17160   withval="no"
17161fi
17162
17163ub_have_sol_threads=no
17164if test x_$withval != x_no; then
17165	if test x_$ub_have_pthreads != x_no; then
17166	    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Have pthreads already, ignoring --with-solaris-threads" >&5
17167$as_echo "$as_me: WARNING: Have pthreads already, ignoring --with-solaris-threads" >&2;}
17168	else
17169	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing thr_create" >&5
17170$as_echo_n "checking for library containing thr_create... " >&6; }
17171if ${ac_cv_search_thr_create+:} false; then :
17172  $as_echo_n "(cached) " >&6
17173else
17174  ac_func_search_save_LIBS=$LIBS
17175cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17176/* end confdefs.h.  */
17177
17178/* Override any GCC internal prototype to avoid an error.
17179   Use char because int might match the return type of a GCC
17180   builtin and then its argument prototype would still apply.  */
17181#ifdef __cplusplus
17182extern "C"
17183#endif
17184char thr_create ();
17185int
17186main ()
17187{
17188return thr_create ();
17189  ;
17190  return 0;
17191}
17192_ACEOF
17193for ac_lib in '' thread; do
17194  if test -z "$ac_lib"; then
17195    ac_res="none required"
17196  else
17197    ac_res=-l$ac_lib
17198    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
17199  fi
17200  if ac_fn_c_try_link "$LINENO"; then :
17201  ac_cv_search_thr_create=$ac_res
17202fi
17203rm -f core conftest.err conftest.$ac_objext \
17204    conftest$ac_exeext
17205  if ${ac_cv_search_thr_create+:} false; then :
17206  break
17207fi
17208done
17209if ${ac_cv_search_thr_create+:} false; then :
17210
17211else
17212  ac_cv_search_thr_create=no
17213fi
17214rm conftest.$ac_ext
17215LIBS=$ac_func_search_save_LIBS
17216fi
17217{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_thr_create" >&5
17218$as_echo "$ac_cv_search_thr_create" >&6; }
17219ac_res=$ac_cv_search_thr_create
17220if test "$ac_res" != no; then :
17221  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
17222
17223
17224$as_echo "#define HAVE_SOLARIS_THREADS 1" >>confdefs.h
17225
17226
17227
17228
17229{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -mt" >&5
17230$as_echo_n "checking whether $CC supports -mt... " >&6; }
17231cache=`echo mt | sed 'y%.=/+-%___p_%'`
17232if eval \${cv_prog_cc_flag_$cache+:} false; then :
17233  $as_echo_n "(cached) " >&6
17234else
17235
17236echo 'void f(void){}' >conftest.c
17237if test -z "`$CC $CPPFLAGS $CFLAGS -mt -c conftest.c 2>&1`"; then
17238eval "cv_prog_cc_flag_$cache=yes"
17239else
17240eval "cv_prog_cc_flag_$cache=no"
17241fi
17242rm -f conftest conftest.o conftest.c
17243
17244fi
17245
17246if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
17247{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17248$as_echo "yes" >&6; }
17249:
17250CFLAGS="$CFLAGS -mt"
17251else
17252{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17253$as_echo "no" >&6; }
17254:
17255CFLAGS="$CFLAGS -D_REENTRANT"
17256fi
17257
17258		ub_have_sol_threads=yes
17259
17260else
17261
17262		as_fn_error $? "no solaris threads found." "$LINENO" 5
17263
17264fi
17265
17266	fi
17267fi
17268
17269fi # end of non-mingw check of thread libraries
17270
17271# Check for SYSLOG_FACILITY
17272
17273# Check whether --with-syslog-facility was given.
17274if test "${with_syslog_facility+set}" = set; then :
17275  withval=$with_syslog_facility;  UNBOUND_SYSLOG_FACILITY="$withval"
17276fi
17277
17278case "${UNBOUND_SYSLOG_FACILITY}" in
17279
17280  LOCAL[0-7]) UNBOUND_SYSLOG_FACILITY="LOG_${UNBOUND_SYSLOG_FACILITY}" ;;
17281
17282           *) UNBOUND_SYSLOG_FACILITY="LOG_DAEMON" ;;
17283
17284esac
17285
17286cat >>confdefs.h <<_ACEOF
17287#define UB_SYSLOG_FACILITY ${UNBOUND_SYSLOG_FACILITY}
17288_ACEOF
17289
17290
17291# Check for dynamic library module
17292
17293# Check whether --with-dynlibmodule was given.
17294if test "${with_dynlibmodule+set}" = set; then :
17295  withval=$with_dynlibmodule;
17296else
17297   withval="no"
17298fi
17299
17300
17301if test x_$withval != x_no; then
17302
17303$as_echo "#define WITH_DYNLIBMODULE 1" >>confdefs.h
17304
17305  WITH_DYNLIBMODULE=yes
17306
17307  DYNLIBMOD_OBJ="dynlibmod.lo"
17308
17309  DYNLIBMOD_HEADER='$(srcdir)/dynlibmod/dynlibmod.h'
17310
17311  if test $on_mingw = "no"; then
17312    # link with -ldl if not already there, for all executables because
17313    # dlopen call is in the dynlib module.  For unbound executable, also
17314    # export symbols.
17315    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
17316$as_echo_n "checking for library containing dlopen... " >&6; }
17317if ${ac_cv_search_dlopen+:} false; then :
17318  $as_echo_n "(cached) " >&6
17319else
17320  ac_func_search_save_LIBS=$LIBS
17321cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17322/* end confdefs.h.  */
17323
17324/* Override any GCC internal prototype to avoid an error.
17325   Use char because int might match the return type of a GCC
17326   builtin and then its argument prototype would still apply.  */
17327#ifdef __cplusplus
17328extern "C"
17329#endif
17330char dlopen ();
17331int
17332main ()
17333{
17334return dlopen ();
17335  ;
17336  return 0;
17337}
17338_ACEOF
17339for ac_lib in '' dl; do
17340  if test -z "$ac_lib"; then
17341    ac_res="none required"
17342  else
17343    ac_res=-l$ac_lib
17344    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
17345  fi
17346  if ac_fn_c_try_link "$LINENO"; then :
17347  ac_cv_search_dlopen=$ac_res
17348fi
17349rm -f core conftest.err conftest.$ac_objext \
17350    conftest$ac_exeext
17351  if ${ac_cv_search_dlopen+:} false; then :
17352  break
17353fi
17354done
17355if ${ac_cv_search_dlopen+:} false; then :
17356
17357else
17358  ac_cv_search_dlopen=no
17359fi
17360rm conftest.$ac_ext
17361LIBS=$ac_func_search_save_LIBS
17362fi
17363{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
17364$as_echo "$ac_cv_search_dlopen" >&6; }
17365ac_res=$ac_cv_search_dlopen
17366if test "$ac_res" != no; then :
17367  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
17368
17369fi
17370
17371    DYNLIBMOD_EXTRALIBS="-export-dynamic"
17372  else
17373    DYNLIBMOD_EXTRALIBS="-Wl,--export-all-symbols,--out-implib,libunbound.dll.a"
17374  fi
17375
17376fi
17377
17378# Check for PyUnbound
17379
17380# Check whether --with-pyunbound was given.
17381if test "${with_pyunbound+set}" = set; then :
17382  withval=$with_pyunbound;
17383else
17384   withval="no"
17385fi
17386
17387
17388ub_test_python=no
17389ub_with_pyunbound=no
17390if test x_$withval != x_no; then
17391   ub_with_pyunbound=yes
17392   ub_test_python=yes
17393fi
17394
17395# Check for Python module
17396
17397# Check whether --with-pythonmodule was given.
17398if test "${with_pythonmodule+set}" = set; then :
17399  withval=$with_pythonmodule;
17400else
17401   withval="no"
17402fi
17403
17404
17405ub_with_pythonmod=no
17406if test x_$withval != x_no; then
17407   ub_with_pythonmod=yes
17408   ub_test_python=yes
17409fi
17410
17411# Check for Python & SWIG only on PyUnbound or PyModule
17412if test x_$ub_test_python != x_no; then
17413
17414   # Check for Python
17415   ub_have_python=no
17416   ac_save_LIBS="$LIBS"
17417        #
17418        # Allow the use of a (user set) custom python version
17419        #
17420
17421
17422        # Extract the first word of "python[$PYTHON_VERSION]", so it can be a program name with args.
17423set dummy python$PYTHON_VERSION; ac_word=$2
17424{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17425$as_echo_n "checking for $ac_word... " >&6; }
17426if ${ac_cv_path_PYTHON+:} false; then :
17427  $as_echo_n "(cached) " >&6
17428else
17429  case $PYTHON in
17430  [\\/]* | ?:[\\/]*)
17431  ac_cv_path_PYTHON="$PYTHON" # Let the user override the test with a path.
17432  ;;
17433  *)
17434  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17435for as_dir in $PATH
17436do
17437  IFS=$as_save_IFS
17438  test -z "$as_dir" && as_dir=.
17439    for ac_exec_ext in '' $ac_executable_extensions; do
17440  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17441    ac_cv_path_PYTHON="$as_dir/$ac_word$ac_exec_ext"
17442    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17443    break 2
17444  fi
17445done
17446  done
17447IFS=$as_save_IFS
17448
17449  ;;
17450esac
17451fi
17452PYTHON=$ac_cv_path_PYTHON
17453if test -n "$PYTHON"; then
17454  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5
17455$as_echo "$PYTHON" >&6; }
17456else
17457  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17458$as_echo "no" >&6; }
17459fi
17460
17461
17462        if test -z "$PYTHON"; then
17463           as_fn_error $? "Cannot find python$PYTHON_VERSION in your system path" "$LINENO" 5
17464           PYTHON_VERSION=""
17465        fi
17466
17467        if test -z "$PYTHON_VERSION"; then
17468		PYTHON_VERSION=`$PYTHON -c "import sys; \
17469			print(sys.version.split()[0])"`
17470	fi
17471
17472	# Check if you have sysconfig
17473	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the sysconfig Python module" >&5
17474$as_echo_n "checking for the sysconfig Python module... " >&6; }
17475        if ac_sysconfig_result=`$PYTHON -c "import sysconfig" 2>&1`; then
17476                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17477$as_echo "yes" >&6; }
17478		sysconfig_module="sysconfig"
17479		# if yes, use sysconfig, because distutils is deprecated.
17480	else
17481                { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17482$as_echo "no" >&6; }
17483		# if no, try to use distutils
17484
17485		#
17486		# Check if you have distutils, else fail
17487		#
17488		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the distutils Python package" >&5
17489$as_echo_n "checking for the distutils Python package... " >&6; }
17490		if ac_distutils_result=`$PYTHON -c "import distutils" 2>&1`; then
17491			{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17492$as_echo "yes" >&6; }
17493		else
17494			{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17495$as_echo "no" >&6; }
17496			as_fn_error $? "cannot import Python module \"distutils\".
17497	Please check your Python installation. The error was:
17498	$ac_distutils_result" "$LINENO" 5
17499			PYTHON_VERSION=""
17500		fi
17501
17502		sysconfig_module="distutils.sysconfig"
17503	fi
17504
17505        #
17506        # Check for Python include path
17507        #
17508        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Python include path" >&5
17509$as_echo_n "checking for Python include path... " >&6; }
17510        if test -z "$PYTHON_CPPFLAGS"; then
17511		if test "$sysconfig_module" = "sysconfig"; then
17512			python_path=`$PYTHON -c 'import sysconfig; \
17513				print(sysconfig.get_path("include"));'`
17514		else
17515			python_path=`$PYTHON -c "import distutils.sysconfig; \
17516				print(distutils.sysconfig.get_python_inc());"`
17517		fi
17518                if test -n "${python_path}"; then
17519                        python_path="-I$python_path"
17520                fi
17521                PYTHON_CPPFLAGS=$python_path
17522        fi
17523        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON_CPPFLAGS" >&5
17524$as_echo "$PYTHON_CPPFLAGS" >&6; }
17525
17526
17527        #
17528        # Check for Python library path
17529        #
17530        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Python library path" >&5
17531$as_echo_n "checking for Python library path... " >&6; }
17532        if test -z "$PYTHON_LDFLAGS"; then
17533                PYTHON_LDFLAGS=`$PYTHON -c "from $sysconfig_module import *; \
17534                        print('-L'+get_config_var('LIBDIR')+' -L'+get_config_var('LIBDEST')+' '+get_config_var('BLDLIBRARY'));"`
17535        fi
17536        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON_LDFLAGS" >&5
17537$as_echo "$PYTHON_LDFLAGS" >&6; }
17538
17539
17540        if test -z "$PYTHON_LIBDIR"; then
17541                PYTHON_LIBDIR=`$PYTHON -c "from $sysconfig_module import *; \
17542                        print(get_config_var('LIBDIR'));"`
17543        fi
17544
17545        #
17546        # Check for site packages
17547        #
17548        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Python site-packages path" >&5
17549$as_echo_n "checking for Python site-packages path... " >&6; }
17550        if test -z "$PYTHON_SITE_PKG"; then
17551		if test "$sysconfig_module" = "sysconfig"; then
17552			PYTHON_SITE_PKG=`$PYTHON -c 'import sysconfig; \
17553				print(sysconfig.get_path("platlib"));'`
17554		else
17555			PYTHON_SITE_PKG=`$PYTHON -c "import distutils.sysconfig; \
17556				print(distutils.sysconfig.get_python_lib(1,0));"`
17557		fi
17558        fi
17559        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON_SITE_PKG" >&5
17560$as_echo "$PYTHON_SITE_PKG" >&6; }
17561
17562
17563        #
17564        # final check to see if everything compiles alright
17565        #
17566        { $as_echo "$as_me:${as_lineno-$LINENO}: checking consistency of all components of python development environment" >&5
17567$as_echo_n "checking consistency of all components of python development environment... " >&6; }
17568        ac_ext=c
17569ac_cpp='$CPP $CPPFLAGS'
17570ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
17571ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
17572ac_compiler_gnu=$ac_cv_c_compiler_gnu
17573
17574        # save current global flags
17575        ac_save_LIBS="$LIBS"
17576        ac_save_CPPFLAGS="$CPPFLAGS"
17577
17578        LIBS="$LIBS $PYTHON_LDFLAGS"
17579        CPPFLAGS="$CPPFLAGS $PYTHON_CPPFLAGS"
17580        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17581/* end confdefs.h.  */
17582
17583                #include <Python.h>
17584
17585int
17586main ()
17587{
17588
17589                Py_Initialize();
17590
17591  ;
17592  return 0;
17593}
17594_ACEOF
17595if ac_fn_c_try_link "$LINENO"; then :
17596  pythonexists=yes
17597else
17598  pythonexists=no
17599fi
17600rm -f core conftest.err conftest.$ac_objext \
17601    conftest$ac_exeext conftest.$ac_ext
17602
17603        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pythonexists" >&5
17604$as_echo "$pythonexists" >&6; }
17605
17606        if test ! "$pythonexists" = "yes"; then
17607           as_fn_error $? "
17608  Could not link test program to Python. Maybe the main Python library has been
17609  installed in some non-standard library path. If so, pass it to configure,
17610  via the LDFLAGS environment variable.
17611  Example: ./configure LDFLAGS=\"-L/usr/non-standard-path/python/lib\"
17612  ============================================================================
17613   ERROR!
17614   You probably have to install the development version of the Python package
17615   for your distribution.  The exact name of this package varies among them.
17616  ============================================================================
17617           " "$LINENO" 5
17618          PYTHON_VERSION=""
17619        fi
17620        ac_ext=c
17621ac_cpp='$CPP $CPPFLAGS'
17622ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
17623ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
17624ac_compiler_gnu=$ac_cv_c_compiler_gnu
17625
17626        # turn back to default flags
17627        CPPFLAGS="$ac_save_CPPFLAGS"
17628        LIBS="$ac_save_LIBS"
17629
17630        #
17631        # all done!
17632        #
17633
17634   if test ! -z "$PYTHON_VERSION"; then
17635	if test `$PYTHON -c "print('$PYTHON_VERSION' >= '2.4.0')"` = "False"; then
17636		as_fn_error $? "Python version >= 2.4.0 is required" "$LINENO" 5
17637	fi
17638
17639      PY_MAJOR_VERSION="`$PYTHON -c \"import sys; print(sys.version_info[0])\"`"
17640
17641      # Have Python
17642
17643$as_echo "#define HAVE_PYTHON 1" >>confdefs.h
17644
17645      if test x_$ub_with_pythonmod != x_no; then
17646        if test -n "$LIBS"; then
17647          LIBS="$PYTHON_LDFLAGS $LIBS"
17648        else
17649          LIBS="$PYTHON_LDFLAGS"
17650        fi
17651      fi
17652      PYTHON_LIBS="$PYTHON_LDFLAGS"
17653
17654      if test -n "$CPPFLAGS"; then
17655        CPPFLAGS="$CPPFLAGS $PYTHON_CPPFLAGS"
17656      else
17657        CPPFLAGS="$PYTHON_CPPFLAGS"
17658      fi
17659      if test "$PYTHON_LIBDIR" != "/usr/lib" -a "$PYTHON_LIBDIR" != "" -a "$PYTHON_LIBDIR" != "/usr/lib64"; then
17660
17661	if test "x$enable_rpath" = xyes; then
17662		if echo "$PYTHON_LIBDIR" | grep "^/" >/dev/null; then
17663			RUNTIME_PATH="$RUNTIME_PATH -R$PYTHON_LIBDIR"
17664		fi
17665	fi
17666
17667      fi
17668      ub_have_python=yes
17669      if test -n "$PKG_CONFIG" && \
17670    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\"python\${PY_MAJOR_VERSION}\"\""; } >&5
17671  ($PKG_CONFIG --exists --print-errors ""python${PY_MAJOR_VERSION}"") 2>&5
17672  ac_status=$?
17673  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
17674  test $ac_status = 0; }; then
17675  PC_PY_DEPENDENCY="python${PY_MAJOR_VERSION}"
17676else
17677  PC_PY_DEPENDENCY="python"
17678fi
17679
17680
17681      # Check for SWIG
17682      ub_have_swig=no
17683      # Check whether --enable-swig-version-check was given.
17684if test "${enable_swig_version_check+set}" = set; then :
17685  enableval=$enable_swig_version_check;
17686fi
17687
17688      if test "$enable_swig_version_check" = "yes"; then
17689
17690        # Extract the first word of "swig", so it can be a program name with args.
17691set dummy swig; ac_word=$2
17692{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17693$as_echo_n "checking for $ac_word... " >&6; }
17694if ${ac_cv_path_SWIG+:} false; then :
17695  $as_echo_n "(cached) " >&6
17696else
17697  case $SWIG in
17698  [\\/]* | ?:[\\/]*)
17699  ac_cv_path_SWIG="$SWIG" # Let the user override the test with a path.
17700  ;;
17701  *)
17702  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17703for as_dir in $PATH
17704do
17705  IFS=$as_save_IFS
17706  test -z "$as_dir" && as_dir=.
17707    for ac_exec_ext in '' $ac_executable_extensions; do
17708  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17709    ac_cv_path_SWIG="$as_dir/$ac_word$ac_exec_ext"
17710    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17711    break 2
17712  fi
17713done
17714  done
17715IFS=$as_save_IFS
17716
17717  ;;
17718esac
17719fi
17720SWIG=$ac_cv_path_SWIG
17721if test -n "$SWIG"; then
17722  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SWIG" >&5
17723$as_echo "$SWIG" >&6; }
17724else
17725  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17726$as_echo "no" >&6; }
17727fi
17728
17729
17730        if test -z "$SWIG" ; then
17731                { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot find 'swig' program. You should look at http://www.swig.org" >&5
17732$as_echo "$as_me: WARNING: cannot find 'swig' program. You should look at http://www.swig.org" >&2;}
17733                SWIG='echo "Error: SWIG is not installed. You should look at http://www.swig.org" ; false'
17734        elif test -n "2.0.1" ; then
17735                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SWIG version" >&5
17736$as_echo_n "checking for SWIG version... " >&6; }
17737                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'`
17738                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $swig_version" >&5
17739$as_echo "$swig_version" >&6; }
17740                if test -n "$swig_version" ; then
17741                        # Calculate the required version number components
17742                        required=2.0.1
17743                        required_major=`echo $required | sed 's/[^0-9].*//'`
17744                        if test -z "$required_major" ; then
17745                                required_major=0
17746                        fi
17747                        required=`echo $required | sed 's/[0-9]*[^0-9]//'`
17748                        required_minor=`echo $required | sed 's/[^0-9].*//'`
17749                        if test -z "$required_minor" ; then
17750                                required_minor=0
17751                        fi
17752                        required=`echo $required | sed 's/[0-9]*[^0-9]//'`
17753                        required_patch=`echo $required | sed 's/[^0-9].*//'`
17754                        if test -z "$required_patch" ; then
17755                                required_patch=0
17756                        fi
17757                        # Calculate the available version number components
17758                        available=$swig_version
17759                        available_major=`echo $available | sed 's/[^0-9].*//'`
17760                        if test -z "$available_major" ; then
17761                                available_major=0
17762                        fi
17763                        available=`echo $available | sed 's/[0-9]*[^0-9]//'`
17764                        available_minor=`echo $available | sed 's/[^0-9].*//'`
17765                        if test -z "$available_minor" ; then
17766                                available_minor=0
17767                        fi
17768                        available=`echo $available | sed 's/[0-9]*[^0-9]//'`
17769                        available_patch=`echo $available | sed 's/[^0-9].*//'`
17770                        if test -z "$available_patch" ; then
17771                                available_patch=0
17772                        fi
17773			badversion=0
17774			if test $available_major -lt $required_major ; then
17775				badversion=1
17776			fi
17777                        if test $available_major -eq $required_major \
17778                                -a $available_minor -lt $required_minor ; then
17779				badversion=1
17780			fi
17781                        if test $available_major -eq $required_major \
17782                                -a $available_minor -eq $required_minor \
17783                                -a $available_patch -lt $required_patch ; then
17784				badversion=1
17785			fi
17786			if test $badversion -eq 1 ; then
17787                                { $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
17788$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;}
17789                                SWIG='echo "Error: SWIG version >= 2.0.1 is required.  You have '"$swig_version"'.  You should look at http://www.swig.org" ; false'
17790                        else
17791                                { $as_echo "$as_me:${as_lineno-$LINENO}: SWIG executable is '$SWIG'" >&5
17792$as_echo "$as_me: SWIG executable is '$SWIG'" >&6;}
17793                                SWIG_LIB=`$SWIG -swiglib`
17794                                { $as_echo "$as_me:${as_lineno-$LINENO}: SWIG library directory is '$SWIG_LIB'" >&5
17795$as_echo "$as_me: SWIG library directory is '$SWIG_LIB'" >&6;}
17796                        fi
17797                else
17798                        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot determine SWIG version" >&5
17799$as_echo "$as_me: WARNING: cannot determine SWIG version" >&2;}
17800                        SWIG='echo "Error: Cannot determine SWIG version.  You should look at http://www.swig.org" ; false'
17801                fi
17802        fi
17803
17804
17805      else
17806
17807        # Extract the first word of "swig", so it can be a program name with args.
17808set dummy swig; ac_word=$2
17809{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17810$as_echo_n "checking for $ac_word... " >&6; }
17811if ${ac_cv_path_SWIG+:} false; then :
17812  $as_echo_n "(cached) " >&6
17813else
17814  case $SWIG in
17815  [\\/]* | ?:[\\/]*)
17816  ac_cv_path_SWIG="$SWIG" # Let the user override the test with a path.
17817  ;;
17818  *)
17819  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17820for as_dir in $PATH
17821do
17822  IFS=$as_save_IFS
17823  test -z "$as_dir" && as_dir=.
17824    for ac_exec_ext in '' $ac_executable_extensions; do
17825  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17826    ac_cv_path_SWIG="$as_dir/$ac_word$ac_exec_ext"
17827    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17828    break 2
17829  fi
17830done
17831  done
17832IFS=$as_save_IFS
17833
17834  ;;
17835esac
17836fi
17837SWIG=$ac_cv_path_SWIG
17838if test -n "$SWIG"; then
17839  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SWIG" >&5
17840$as_echo "$SWIG" >&6; }
17841else
17842  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17843$as_echo "no" >&6; }
17844fi
17845
17846
17847        if test -z "$SWIG" ; then
17848                { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot find 'swig' program. You should look at http://www.swig.org" >&5
17849$as_echo "$as_me: WARNING: cannot find 'swig' program. You should look at http://www.swig.org" >&2;}
17850                SWIG='echo "Error: SWIG is not installed. You should look at http://www.swig.org" ; false'
17851        elif test -n "" ; then
17852                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SWIG version" >&5
17853$as_echo_n "checking for SWIG version... " >&6; }
17854                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'`
17855                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $swig_version" >&5
17856$as_echo "$swig_version" >&6; }
17857                if test -n "$swig_version" ; then
17858                        # Calculate the required version number components
17859                        required=
17860                        required_major=`echo $required | sed 's/[^0-9].*//'`
17861                        if test -z "$required_major" ; then
17862                                required_major=0
17863                        fi
17864                        required=`echo $required | sed 's/[0-9]*[^0-9]//'`
17865                        required_minor=`echo $required | sed 's/[^0-9].*//'`
17866                        if test -z "$required_minor" ; then
17867                                required_minor=0
17868                        fi
17869                        required=`echo $required | sed 's/[0-9]*[^0-9]//'`
17870                        required_patch=`echo $required | sed 's/[^0-9].*//'`
17871                        if test -z "$required_patch" ; then
17872                                required_patch=0
17873                        fi
17874                        # Calculate the available version number components
17875                        available=$swig_version
17876                        available_major=`echo $available | sed 's/[^0-9].*//'`
17877                        if test -z "$available_major" ; then
17878                                available_major=0
17879                        fi
17880                        available=`echo $available | sed 's/[0-9]*[^0-9]//'`
17881                        available_minor=`echo $available | sed 's/[^0-9].*//'`
17882                        if test -z "$available_minor" ; then
17883                                available_minor=0
17884                        fi
17885                        available=`echo $available | sed 's/[0-9]*[^0-9]//'`
17886                        available_patch=`echo $available | sed 's/[^0-9].*//'`
17887                        if test -z "$available_patch" ; then
17888                                available_patch=0
17889                        fi
17890			badversion=0
17891			if test $available_major -lt $required_major ; then
17892				badversion=1
17893			fi
17894                        if test $available_major -eq $required_major \
17895                                -a $available_minor -lt $required_minor ; then
17896				badversion=1
17897			fi
17898                        if test $available_major -eq $required_major \
17899                                -a $available_minor -eq $required_minor \
17900                                -a $available_patch -lt $required_patch ; then
17901				badversion=1
17902			fi
17903			if test $badversion -eq 1 ; then
17904                                { $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
17905$as_echo "$as_me: WARNING: SWIG version >=  is required.  You have $swig_version.  You should look at http://www.swig.org" >&2;}
17906                                SWIG='echo "Error: SWIG version >=  is required.  You have '"$swig_version"'.  You should look at http://www.swig.org" ; false'
17907                        else
17908                                { $as_echo "$as_me:${as_lineno-$LINENO}: SWIG executable is '$SWIG'" >&5
17909$as_echo "$as_me: SWIG executable is '$SWIG'" >&6;}
17910                                SWIG_LIB=`$SWIG -swiglib`
17911                                { $as_echo "$as_me:${as_lineno-$LINENO}: SWIG library directory is '$SWIG_LIB'" >&5
17912$as_echo "$as_me: SWIG library directory is '$SWIG_LIB'" >&6;}
17913                        fi
17914                else
17915                        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot determine SWIG version" >&5
17916$as_echo "$as_me: WARNING: cannot determine SWIG version" >&2;}
17917                        SWIG='echo "Error: Cannot determine SWIG version.  You should look at http://www.swig.org" ; false'
17918                fi
17919        fi
17920
17921
17922      fi
17923      { $as_echo "$as_me:${as_lineno-$LINENO}: checking SWIG" >&5
17924$as_echo_n "checking SWIG... " >&6; }
17925      if test ! -x "$SWIG"; then
17926         as_fn_error $? "failed to find swig tool, install it, or do not build Python module and PyUnbound" "$LINENO" 5
17927      else
17928
17929$as_echo "#define HAVE_SWIG 1" >>confdefs.h
17930
17931         swig="$SWIG"
17932
17933         { $as_echo "$as_me:${as_lineno-$LINENO}: result: present" >&5
17934$as_echo "present" >&6; }
17935
17936         # If have Python & SWIG
17937         # Declare PythonMod
17938         if test x_$ub_with_pythonmod != x_no; then
17939
17940$as_echo "#define WITH_PYTHONMODULE 1" >>confdefs.h
17941
17942            WITH_PYTHONMODULE=yes
17943
17944	    PYTHONMOD_OBJ="pythonmod.lo pythonmod_utils.lo"
17945
17946	    PYTHONMOD_HEADER='$(srcdir)/pythonmod/pythonmod.h'
17947
17948	    PYTHONMOD_INSTALL=pythonmod-install
17949
17950	    PYTHONMOD_UNINSTALL=pythonmod-uninstall
17951
17952         fi
17953
17954         # Declare PyUnbound
17955         if test x_$ub_with_pyunbound != x_no; then
17956
17957$as_echo "#define WITH_PYUNBOUND 1" >>confdefs.h
17958
17959            WITH_PYUNBOUND=yes
17960
17961	    PYUNBOUND_OBJ="libunbound_wrap.lo"
17962
17963	    PYUNBOUND_TARGET="_unbound.la"
17964
17965	    PYUNBOUND_INSTALL=pyunbound-install
17966
17967	    PYUNBOUND_UNINSTALL=pyunbound-uninstall
17968
17969         fi
17970      fi
17971   else
17972      { $as_echo "$as_me:${as_lineno-$LINENO}: result: *** Python libraries not found, won't build PythonMod or PyUnbound ***" >&5
17973$as_echo "*** Python libraries not found, won't build PythonMod or PyUnbound ***" >&6; }
17974      ub_with_pyunbound=no
17975      ub_with_pythonmod=no
17976   fi
17977fi
17978
17979if test "`uname`" = "NetBSD"; then
17980	NETBSD_LINTFLAGS='"-D__RENAME(x)=" -D_NETINET_IN_H_'
17981
17982fi
17983
17984if test "`uname`" = "Linux"; then
17985	# splint cannot parse modern c99 header files
17986	GCC_DOCKER_LINTFLAGS='-syntax'
17987
17988fi
17989CONFIG_DATE=`date +%Y%m%d`
17990
17991
17992# Checks for libraries.
17993
17994# libnss
17995USE_NSS="no"
17996
17997# Check whether --with-nss was given.
17998if test "${with_nss+set}" = set; then :
17999  withval=$with_nss;
18000	USE_NSS="yes"
18001
18002$as_echo "#define HAVE_NSS 1" >>confdefs.h
18003
18004	if test "$withval" != "" -a "$withval" != "yes"; then
18005		CPPFLAGS="$CPPFLAGS -I$withval/include/nss3"
18006		LDFLAGS="$LDFLAGS -L$withval/lib"
18007
18008	if test "x$enable_rpath" = xyes; then
18009		if echo "$withval/lib" | grep "^/" >/dev/null; then
18010			RUNTIME_PATH="$RUNTIME_PATH -R$withval/lib"
18011		fi
18012	fi
18013
18014		CPPFLAGS="-I$withval/include/nspr4 $CPPFLAGS"
18015	else
18016		CPPFLAGS="$CPPFLAGS -I/usr/include/nss3"
18017		CPPFLAGS="-I/usr/include/nspr4 $CPPFLAGS"
18018	fi
18019        LIBS="$LIBS -lnss3 -lnspr4"
18020	SSLLIB=""
18021	PC_CRYPTO_DEPENDENCY="nss nspr"
18022
18023
18024
18025fi
18026
18027
18028# libnettle
18029USE_NETTLE="no"
18030
18031# Check whether --with-nettle was given.
18032if test "${with_nettle+set}" = set; then :
18033  withval=$with_nettle;
18034	USE_NETTLE="yes"
18035
18036$as_echo "#define HAVE_NETTLE 1" >>confdefs.h
18037
18038	for ac_header in nettle/dsa-compat.h
18039do :
18040  ac_fn_c_check_header_compile "$LINENO" "nettle/dsa-compat.h" "ac_cv_header_nettle_dsa_compat_h" "$ac_includes_default
18041"
18042if test "x$ac_cv_header_nettle_dsa_compat_h" = xyes; then :
18043  cat >>confdefs.h <<_ACEOF
18044#define HAVE_NETTLE_DSA_COMPAT_H 1
18045_ACEOF
18046
18047fi
18048
18049done
18050
18051	if test "$withval" != "" -a "$withval" != "yes"; then
18052		CPPFLAGS="$CPPFLAGS -I$withval/include/nettle"
18053		LDFLAGS="$LDFLAGS -L$withval/lib"
18054
18055	if test "x$enable_rpath" = xyes; then
18056		if echo "$withval/lib" | grep "^/" >/dev/null; then
18057			RUNTIME_PATH="$RUNTIME_PATH -R$withval/lib"
18058		fi
18059	fi
18060
18061	else
18062		CPPFLAGS="$CPPFLAGS -I/usr/include/nettle"
18063	fi
18064        LIBS="$LIBS -lhogweed -lnettle -lgmp"
18065	SSLLIB=""
18066	PC_CRYPTO_DEPENDENCY="hogweed nettle"
18067
18068
18069
18070fi
18071
18072
18073# openssl
18074if test $USE_NSS = "no" -a $USE_NETTLE = "no"; then
18075
18076
18077# Check whether --with-ssl was given.
18078if test "${with_ssl+set}" = set; then :
18079  withval=$with_ssl;
18080
18081else
18082
18083            withval="yes"
18084
18085fi
18086
18087    if test x_$withval = x_no; then
18088	as_fn_error $? "Need SSL library to do digital signature cryptography" "$LINENO" 5
18089    fi
18090
18091    withval=$withval
18092    if test x_$withval != x_no; then
18093        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SSL" >&5
18094$as_echo_n "checking for SSL... " >&6; }
18095	if test -n "$withval"; then
18096										if test ! -f "$withval/include/openssl/ssl.h" -a -f "$withval/openssl/ssl.h"; then
18097			ssldir="$withval"
18098			found_ssl="yes"
18099			withval=""
18100			ssldir_include="$ssldir"
18101						ssldir_lib=`echo $ssldir | sed -e 's/include/lib/'`
18102			if test -f "$ssldir_lib/libssl.a" -o -f "$ssldir_lib/libssl.so"; then
18103				: # found here
18104			else
18105				ssldir_lib=`echo $ssldir | sed -e 's/include/lib64/'`
18106				if test -f "$ssldir_lib/libssl.a" -o -f "$ssldir_lib/libssl.so"; then
18107					: # found here
18108				else
18109					as_fn_error $? "Could not find openssl lib file, $ssldir_lib/libssl.so,a, pass like \"/usr/local\" or \"/usr/include/openssl11\"" "$LINENO" 5
18110				fi
18111			fi
18112		fi
18113	fi
18114        if test x_$withval = x_ -o x_$withval = x_yes; then
18115            withval="/usr/local/ssl /usr/lib/ssl /usr/ssl /usr/pkg /usr/local /opt/local /usr/sfw /usr"
18116        fi
18117        for dir in $withval; do
18118            ssldir="$dir"
18119            if test -f "$dir/include/openssl/ssl.h"; then
18120                found_ssl="yes"
18121		ssldir_include="$ssldir/include"
18122		if test ! -d "$ssldir/lib" -a -d "$ssldir/lib64"; then
18123			ssldir_lib="$ssldir/lib64"
18124		else
18125			ssldir_lib="$ssldir/lib"
18126		fi
18127                break;
18128            fi
18129        done
18130        if test x_$found_ssl != x_yes; then
18131            as_fn_error $? "Cannot find the SSL libraries in $withval" "$LINENO" 5
18132        else
18133            { $as_echo "$as_me:${as_lineno-$LINENO}: result: found in $ssldir" >&5
18134$as_echo "found in $ssldir" >&6; }
18135
18136cat >>confdefs.h <<_ACEOF
18137#define HAVE_SSL /**/
18138_ACEOF
18139
18140            HAVE_SSL=yes
18141	                if test "$ssldir" != "/usr"; then
18142		    CPPFLAGS="$CPPFLAGS -I$ssldir_include"
18143		    LIBSSL_CPPFLAGS="$LIBSSL_CPPFLAGS -I$ssldir_include"
18144		    LDFLAGS="$LDFLAGS -L$ssldir_lib"
18145		    LIBSSL_LDFLAGS="$LIBSSL_LDFLAGS -L$ssldir_lib"
18146
18147	if test "x$enable_rpath" = xyes; then
18148		if echo "$ssldir_lib" | grep "^/" >/dev/null; then
18149			RUNTIME_PATH="$RUNTIME_PATH -R$ssldir_lib"
18150		fi
18151	fi
18152
18153	    fi
18154
18155            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EVP_sha256 in -lcrypto" >&5
18156$as_echo_n "checking for EVP_sha256 in -lcrypto... " >&6; }
18157            LIBS="$LIBS -lcrypto"
18158            LIBSSL_LIBS="$LIBSSL_LIBS -lcrypto"
18159            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18160/* end confdefs.h.  */
18161
18162int
18163main ()
18164{
18165
18166                int EVP_sha256(void);
18167                (void)EVP_sha256();
18168
18169  ;
18170  return 0;
18171}
18172_ACEOF
18173if ac_fn_c_try_link "$LINENO"; then :
18174
18175                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
18176$as_echo "yes" >&6; }
18177
18178$as_echo "#define HAVE_EVP_SHA256 1" >>confdefs.h
18179
18180
18181else
18182
18183                { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18184$as_echo "no" >&6; }
18185                # check if -lwsock32 or -lgdi32 are needed.
18186                BAKLIBS="$LIBS"
18187                BAKSSLLIBS="$LIBSSL_LIBS"
18188		LIBS="$LIBS -lgdi32 -lws2_32"
18189		LIBSSL_LIBS="$LIBSSL_LIBS -lgdi32 -lws2_32"
18190                { $as_echo "$as_me:${as_lineno-$LINENO}: checking if -lcrypto needs -lgdi32" >&5
18191$as_echo_n "checking if -lcrypto needs -lgdi32... " >&6; }
18192                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18193/* end confdefs.h.  */
18194
18195int
18196main ()
18197{
18198
18199                    int EVP_sha256(void);
18200                    (void)EVP_sha256();
18201
18202  ;
18203  return 0;
18204}
18205_ACEOF
18206if ac_fn_c_try_link "$LINENO"; then :
18207
18208
18209$as_echo "#define HAVE_EVP_SHA256 1" >>confdefs.h
18210
18211                    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
18212$as_echo "yes" >&6; }
18213
18214else
18215
18216                    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18217$as_echo "no" >&6; }
18218                    LIBS="$BAKLIBS"
18219                    LIBSSL_LIBS="$BAKSSLLIBS"
18220                    LIBS="$LIBS -ldl"
18221                    LIBSSL_LIBS="$LIBSSL_LIBS -ldl"
18222                    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if -lcrypto needs -ldl" >&5
18223$as_echo_n "checking if -lcrypto needs -ldl... " >&6; }
18224                    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18225/* end confdefs.h.  */
18226
18227int
18228main ()
18229{
18230
18231                        int EVP_sha256(void);
18232                        (void)EVP_sha256();
18233
18234  ;
18235  return 0;
18236}
18237_ACEOF
18238if ac_fn_c_try_link "$LINENO"; then :
18239
18240
18241$as_echo "#define HAVE_EVP_SHA256 1" >>confdefs.h
18242
18243                        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
18244$as_echo "yes" >&6; }
18245
18246else
18247
18248                        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18249$as_echo "no" >&6; }
18250                        LIBS="$BAKLIBS"
18251                        LIBSSL_LIBS="$BAKSSLLIBS"
18252                        LIBS="$LIBS -ldl -pthread"
18253                        LIBSSL_LIBS="$LIBSSL_LIBS -ldl -pthread"
18254                        { $as_echo "$as_me:${as_lineno-$LINENO}: checking if -lcrypto needs -ldl -pthread" >&5
18255$as_echo_n "checking if -lcrypto needs -ldl -pthread... " >&6; }
18256                        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18257/* end confdefs.h.  */
18258
18259int
18260main ()
18261{
18262
18263                            int EVP_sha256(void);
18264                            (void)EVP_sha256();
18265
18266  ;
18267  return 0;
18268}
18269_ACEOF
18270if ac_fn_c_try_link "$LINENO"; then :
18271
18272
18273$as_echo "#define HAVE_EVP_SHA256 1" >>confdefs.h
18274
18275                            { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
18276$as_echo "yes" >&6; }
18277
18278else
18279
18280                            { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18281$as_echo "no" >&6; }
18282                            as_fn_error $? "OpenSSL found in $ssldir, but version 0.9.7 or higher is required" "$LINENO" 5
18283
18284fi
18285rm -f core conftest.err conftest.$ac_objext \
18286    conftest$ac_exeext conftest.$ac_ext
18287
18288fi
18289rm -f core conftest.err conftest.$ac_objext \
18290    conftest$ac_exeext conftest.$ac_ext
18291
18292fi
18293rm -f core conftest.err conftest.$ac_objext \
18294    conftest$ac_exeext conftest.$ac_ext
18295
18296fi
18297rm -f core conftest.err conftest.$ac_objext \
18298    conftest$ac_exeext conftest.$ac_ext
18299        fi
18300
18301
18302    fi
18303for ac_header in openssl/ssl.h
18304do :
18305  ac_fn_c_check_header_compile "$LINENO" "openssl/ssl.h" "ac_cv_header_openssl_ssl_h" "$ac_includes_default
18306"
18307if test "x$ac_cv_header_openssl_ssl_h" = xyes; then :
18308  cat >>confdefs.h <<_ACEOF
18309#define HAVE_OPENSSL_SSL_H 1
18310_ACEOF
18311
18312fi
18313
18314done
18315
18316for ac_header in openssl/err.h
18317do :
18318  ac_fn_c_check_header_compile "$LINENO" "openssl/err.h" "ac_cv_header_openssl_err_h" "$ac_includes_default
18319"
18320if test "x$ac_cv_header_openssl_err_h" = xyes; then :
18321  cat >>confdefs.h <<_ACEOF
18322#define HAVE_OPENSSL_ERR_H 1
18323_ACEOF
18324
18325fi
18326
18327done
18328
18329for ac_header in openssl/rand.h
18330do :
18331  ac_fn_c_check_header_compile "$LINENO" "openssl/rand.h" "ac_cv_header_openssl_rand_h" "$ac_includes_default
18332"
18333if test "x$ac_cv_header_openssl_rand_h" = xyes; then :
18334  cat >>confdefs.h <<_ACEOF
18335#define HAVE_OPENSSL_RAND_H 1
18336_ACEOF
18337
18338fi
18339
18340done
18341
18342
18343
18344
18345# check if libssl needs libdl
18346BAKLIBS="$LIBS"
18347LIBS="-lssl $LIBS"
18348{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if libssl needs libdl" >&5
18349$as_echo_n "checking if libssl needs libdl... " >&6; }
18350cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18351/* end confdefs.h.  */
18352
18353/* Override any GCC internal prototype to avoid an error.
18354   Use char because int might match the return type of a GCC
18355   builtin and then its argument prototype would still apply.  */
18356#ifdef __cplusplus
18357extern "C"
18358#endif
18359char SSL_CTX_new ();
18360int
18361main ()
18362{
18363return SSL_CTX_new ();
18364  ;
18365  return 0;
18366}
18367_ACEOF
18368if ac_fn_c_try_link "$LINENO"; then :
18369
18370	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18371$as_echo "no" >&6; }
18372	LIBS="$BAKLIBS"
18373
18374else
18375
18376	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
18377$as_echo "yes" >&6; }
18378	LIBS="$BAKLIBS"
18379	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
18380$as_echo_n "checking for library containing dlopen... " >&6; }
18381if ${ac_cv_search_dlopen+:} false; then :
18382  $as_echo_n "(cached) " >&6
18383else
18384  ac_func_search_save_LIBS=$LIBS
18385cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18386/* end confdefs.h.  */
18387
18388/* Override any GCC internal prototype to avoid an error.
18389   Use char because int might match the return type of a GCC
18390   builtin and then its argument prototype would still apply.  */
18391#ifdef __cplusplus
18392extern "C"
18393#endif
18394char dlopen ();
18395int
18396main ()
18397{
18398return dlopen ();
18399  ;
18400  return 0;
18401}
18402_ACEOF
18403for ac_lib in '' dl; do
18404  if test -z "$ac_lib"; then
18405    ac_res="none required"
18406  else
18407    ac_res=-l$ac_lib
18408    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
18409  fi
18410  if ac_fn_c_try_link "$LINENO"; then :
18411  ac_cv_search_dlopen=$ac_res
18412fi
18413rm -f core conftest.err conftest.$ac_objext \
18414    conftest$ac_exeext
18415  if ${ac_cv_search_dlopen+:} false; then :
18416  break
18417fi
18418done
18419if ${ac_cv_search_dlopen+:} false; then :
18420
18421else
18422  ac_cv_search_dlopen=no
18423fi
18424rm conftest.$ac_ext
18425LIBS=$ac_func_search_save_LIBS
18426fi
18427{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
18428$as_echo "$ac_cv_search_dlopen" >&6; }
18429ac_res=$ac_cv_search_dlopen
18430if test "$ac_res" != no; then :
18431  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
18432
18433fi
18434
18435
18436fi
18437rm -f core conftest.err conftest.$ac_objext \
18438    conftest$ac_exeext conftest.$ac_ext
18439SSLLIB="-lssl"
18440
18441PC_CRYPTO_DEPENDENCY=""
18442
18443
18444# check if -lcrypt32 is needed because CAPIENG needs that. (on windows)
18445BAKLIBS="$LIBS"
18446LIBS="-lssl $LIBS"
18447{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if libssl needs -lcrypt32" >&5
18448$as_echo_n "checking if libssl needs -lcrypt32... " >&6; }
18449cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18450/* end confdefs.h.  */
18451
18452int
18453main ()
18454{
18455
18456	int EVP_sha256(void);
18457	(void)EVP_sha256();
18458
18459  ;
18460  return 0;
18461}
18462_ACEOF
18463if ac_fn_c_try_link "$LINENO"; then :
18464
18465	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18466$as_echo "no" >&6; }
18467	LIBS="$BAKLIBS"
18468
18469else
18470
18471	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
18472$as_echo "yes" >&6; }
18473	LIBS="$BAKLIBS"
18474	LIBS="$LIBS -lcrypt32"
18475
18476fi
18477rm -f core conftest.err conftest.$ac_objext \
18478    conftest$ac_exeext conftest.$ac_ext
18479
18480{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LibreSSL" >&5
18481$as_echo_n "checking for LibreSSL... " >&6; }
18482if grep VERSION_TEXT $ssldir_include/openssl/opensslv.h | grep "LibreSSL" >/dev/null; then
18483	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
18484$as_echo "yes" >&6; }
18485
18486$as_echo "#define HAVE_LIBRESSL 1" >>confdefs.h
18487
18488	# libressl provides these compat functions, but they may also be
18489	# declared by the OS in libc.  See if they have been declared.
18490	ac_fn_c_check_decl "$LINENO" "strlcpy" "ac_cv_have_decl_strlcpy" "$ac_includes_default"
18491if test "x$ac_cv_have_decl_strlcpy" = xyes; then :
18492  ac_have_decl=1
18493else
18494  ac_have_decl=0
18495fi
18496
18497cat >>confdefs.h <<_ACEOF
18498#define HAVE_DECL_STRLCPY $ac_have_decl
18499_ACEOF
18500ac_fn_c_check_decl "$LINENO" "strlcat" "ac_cv_have_decl_strlcat" "$ac_includes_default"
18501if test "x$ac_cv_have_decl_strlcat" = xyes; then :
18502  ac_have_decl=1
18503else
18504  ac_have_decl=0
18505fi
18506
18507cat >>confdefs.h <<_ACEOF
18508#define HAVE_DECL_STRLCAT $ac_have_decl
18509_ACEOF
18510ac_fn_c_check_decl "$LINENO" "arc4random" "ac_cv_have_decl_arc4random" "$ac_includes_default"
18511if test "x$ac_cv_have_decl_arc4random" = xyes; then :
18512  ac_have_decl=1
18513else
18514  ac_have_decl=0
18515fi
18516
18517cat >>confdefs.h <<_ACEOF
18518#define HAVE_DECL_ARC4RANDOM $ac_have_decl
18519_ACEOF
18520ac_fn_c_check_decl "$LINENO" "arc4random_uniform" "ac_cv_have_decl_arc4random_uniform" "$ac_includes_default"
18521if test "x$ac_cv_have_decl_arc4random_uniform" = xyes; then :
18522  ac_have_decl=1
18523else
18524  ac_have_decl=0
18525fi
18526
18527cat >>confdefs.h <<_ACEOF
18528#define HAVE_DECL_ARC4RANDOM_UNIFORM $ac_have_decl
18529_ACEOF
18530
18531else
18532	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18533$as_echo "no" >&6; }
18534fi
18535for 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
18536do :
18537  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
18538ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
18539"
18540if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
18541  cat >>confdefs.h <<_ACEOF
18542#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
18543_ACEOF
18544
18545fi
18546
18547done
18548
18549for ac_func in OPENSSL_config EVP_sha1 EVP_sha256 EVP_sha512 FIPS_mode EVP_default_properties_is_fips_enabled EVP_MD_CTX_new OpenSSL_add_all_digests OPENSSL_init_crypto EVP_cleanup ENGINE_cleanup ERR_load_crypto_strings CRYPTO_cleanup_all_ex_data ERR_free_strings RAND_cleanup DSA_SIG_set0 EVP_dss1 EVP_DigestVerify EVP_aes_256_cbc EVP_EncryptInit_ex HMAC_Init_ex CRYPTO_THREADID_set_callback EVP_MAC_CTX_set_params OSSL_PARAM_BLD_new BIO_set_callback_ex
18550do :
18551  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
18552ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
18553if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
18554  cat >>confdefs.h <<_ACEOF
18555#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
18556_ACEOF
18557
18558fi
18559done
18560
18561
18562# these check_funcs need -lssl
18563BAKLIBS="$LIBS"
18564LIBS="-lssl $LIBS"
18565for 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
18566do :
18567  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
18568ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
18569if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
18570  cat >>confdefs.h <<_ACEOF
18571#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
18572_ACEOF
18573
18574fi
18575done
18576
18577LIBS="$BAKLIBS"
18578
18579ac_fn_c_check_decl "$LINENO" "SSL_COMP_get_compression_methods" "ac_cv_have_decl_SSL_COMP_get_compression_methods" "
18580$ac_includes_default
18581#ifdef HAVE_OPENSSL_ERR_H
18582#include <openssl/err.h>
18583#endif
18584
18585#ifdef HAVE_OPENSSL_RAND_H
18586#include <openssl/rand.h>
18587#endif
18588
18589#ifdef HAVE_OPENSSL_CONF_H
18590#include <openssl/conf.h>
18591#endif
18592
18593#ifdef HAVE_OPENSSL_ENGINE_H
18594#include <openssl/engine.h>
18595#endif
18596#include <openssl/ssl.h>
18597#include <openssl/evp.h>
18598
18599"
18600if test "x$ac_cv_have_decl_SSL_COMP_get_compression_methods" = xyes; then :
18601  ac_have_decl=1
18602else
18603  ac_have_decl=0
18604fi
18605
18606cat >>confdefs.h <<_ACEOF
18607#define HAVE_DECL_SSL_COMP_GET_COMPRESSION_METHODS $ac_have_decl
18608_ACEOF
18609ac_fn_c_check_decl "$LINENO" "sk_SSL_COMP_pop_free" "ac_cv_have_decl_sk_SSL_COMP_pop_free" "
18610$ac_includes_default
18611#ifdef HAVE_OPENSSL_ERR_H
18612#include <openssl/err.h>
18613#endif
18614
18615#ifdef HAVE_OPENSSL_RAND_H
18616#include <openssl/rand.h>
18617#endif
18618
18619#ifdef HAVE_OPENSSL_CONF_H
18620#include <openssl/conf.h>
18621#endif
18622
18623#ifdef HAVE_OPENSSL_ENGINE_H
18624#include <openssl/engine.h>
18625#endif
18626#include <openssl/ssl.h>
18627#include <openssl/evp.h>
18628
18629"
18630if test "x$ac_cv_have_decl_sk_SSL_COMP_pop_free" = xyes; then :
18631  ac_have_decl=1
18632else
18633  ac_have_decl=0
18634fi
18635
18636cat >>confdefs.h <<_ACEOF
18637#define HAVE_DECL_SK_SSL_COMP_POP_FREE $ac_have_decl
18638_ACEOF
18639ac_fn_c_check_decl "$LINENO" "SSL_CTX_set_ecdh_auto" "ac_cv_have_decl_SSL_CTX_set_ecdh_auto" "
18640$ac_includes_default
18641#ifdef HAVE_OPENSSL_ERR_H
18642#include <openssl/err.h>
18643#endif
18644
18645#ifdef HAVE_OPENSSL_RAND_H
18646#include <openssl/rand.h>
18647#endif
18648
18649#ifdef HAVE_OPENSSL_CONF_H
18650#include <openssl/conf.h>
18651#endif
18652
18653#ifdef HAVE_OPENSSL_ENGINE_H
18654#include <openssl/engine.h>
18655#endif
18656#include <openssl/ssl.h>
18657#include <openssl/evp.h>
18658
18659"
18660if test "x$ac_cv_have_decl_SSL_CTX_set_ecdh_auto" = xyes; then :
18661  ac_have_decl=1
18662else
18663  ac_have_decl=0
18664fi
18665
18666cat >>confdefs.h <<_ACEOF
18667#define HAVE_DECL_SSL_CTX_SET_ECDH_AUTO $ac_have_decl
18668_ACEOF
18669
18670
18671if test "$ac_cv_func_HMAC_Init_ex" = "yes"; then
18672# check function return type.
18673{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the return type of HMAC_Init_ex" >&5
18674$as_echo_n "checking the return type of HMAC_Init_ex... " >&6; }
18675cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18676/* end confdefs.h.  */
18677
18678#ifdef HAVE_OPENSSL_ERR_H
18679#include <openssl/err.h>
18680#endif
18681
18682#ifdef HAVE_OPENSSL_RAND_H
18683#include <openssl/rand.h>
18684#endif
18685
18686#ifdef HAVE_OPENSSL_CONF_H
18687#include <openssl/conf.h>
18688#endif
18689
18690#ifdef HAVE_OPENSSL_ENGINE_H
18691#include <openssl/engine.h>
18692#endif
18693#include <openssl/ssl.h>
18694#include <openssl/evp.h>
18695
18696int
18697main ()
18698{
18699
18700	HMAC_CTX* hmac_ctx = NULL;
18701	void* hmac_key = NULL;
18702	const EVP_MD* digest = NULL;
18703	int x = HMAC_Init_ex(hmac_ctx, hmac_key, 32, digest, NULL);
18704	(void)x;
18705
18706  ;
18707  return 0;
18708}
18709_ACEOF
18710if ac_fn_c_try_compile "$LINENO"; then :
18711
18712	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: int" >&5
18713$as_echo "int" >&6; }
18714
18715else
18716
18717	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: void" >&5
18718$as_echo "void" >&6; }
18719
18720$as_echo "#define HMAC_INIT_EX_RETURNS_VOID 1" >>confdefs.h
18721
18722
18723fi
18724rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18725fi
18726
18727fi
18728
18729
18730# libbsd
18731
18732# Check whether --with-libbsd was given.
18733if test "${with_libbsd+set}" = set; then :
18734  withval=$with_libbsd;
18735	for ac_header in bsd/string.h bsd/stdlib.h
18736do :
18737  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
18738ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
18739"
18740if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
18741  cat >>confdefs.h <<_ACEOF
18742#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
18743_ACEOF
18744
18745fi
18746
18747done
18748
18749	if test "x$ac_cv_header_bsd_string_h" = xyes -a "x$ac_cv_header_bsd_stdlib_h" = xyes; then
18750		for func in strlcpy strlcat arc4random arc4random_uniform reallocarray; do
18751			as_ac_Search=`$as_echo "ac_cv_search_$func" | $as_tr_sh`
18752{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing $func" >&5
18753$as_echo_n "checking for library containing $func... " >&6; }
18754if eval \${$as_ac_Search+:} false; then :
18755  $as_echo_n "(cached) " >&6
18756else
18757  ac_func_search_save_LIBS=$LIBS
18758cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18759/* end confdefs.h.  */
18760
18761/* Override any GCC internal prototype to avoid an error.
18762   Use char because int might match the return type of a GCC
18763   builtin and then its argument prototype would still apply.  */
18764#ifdef __cplusplus
18765extern "C"
18766#endif
18767char $func ();
18768int
18769main ()
18770{
18771return $func ();
18772  ;
18773  return 0;
18774}
18775_ACEOF
18776for ac_lib in '' bsd; do
18777  if test -z "$ac_lib"; then
18778    ac_res="none required"
18779  else
18780    ac_res=-l$ac_lib
18781    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
18782  fi
18783  if ac_fn_c_try_link "$LINENO"; then :
18784  eval "$as_ac_Search=\$ac_res"
18785fi
18786rm -f core conftest.err conftest.$ac_objext \
18787    conftest$ac_exeext
18788  if eval \${$as_ac_Search+:} false; then :
18789  break
18790fi
18791done
18792if eval \${$as_ac_Search+:} false; then :
18793
18794else
18795  eval "$as_ac_Search=no"
18796fi
18797rm conftest.$ac_ext
18798LIBS=$ac_func_search_save_LIBS
18799fi
18800eval ac_res=\$$as_ac_Search
18801	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
18802$as_echo "$ac_res" >&6; }
18803eval ac_res=\$$as_ac_Search
18804if test "$ac_res" != no; then :
18805  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
18806
18807
18808$as_echo "#define HAVE_LIBBSD 1" >>confdefs.h
18809
18810				PC_LIBBSD_DEPENDENCY=libbsd
18811
18812
18813fi
18814
18815		done
18816	fi
18817
18818fi
18819
18820
18821# Check whether --enable-sha1 was given.
18822if test "${enable_sha1+set}" = set; then :
18823  enableval=$enable_sha1;
18824fi
18825
18826case "$enable_sha1" in
18827	no)
18828	;;
18829	yes|*)
18830
18831$as_echo "#define USE_SHA1 1" >>confdefs.h
18832
18833	;;
18834esac
18835
18836
18837# Check whether --enable-sha2 was given.
18838if test "${enable_sha2+set}" = set; then :
18839  enableval=$enable_sha2;
18840fi
18841
18842case "$enable_sha2" in
18843	no)
18844	;;
18845	yes|*)
18846
18847$as_echo "#define USE_SHA2 1" >>confdefs.h
18848
18849	;;
18850esac
18851
18852# Check whether --enable-subnet was given.
18853if test "${enable_subnet+set}" = set; then :
18854  enableval=$enable_subnet;
18855fi
18856
18857case "$enable_subnet" in
18858	yes)
18859
18860$as_echo "#define CLIENT_SUBNET 1" >>confdefs.h
18861
18862	SUBNET_OBJ="edns-subnet.lo subnetmod.lo addrtree.lo subnet-whitelist.lo"
18863
18864	SUBNET_HEADER='$(srcdir)/edns-subnet/subnetmod.h $(srcdir)/edns-subnet/edns-subnet.h $(srcdir)/edns-subnet/subnet-whitelist.h $(srcdir)/edns-subnet/addrtree.h'
18865
18866	;;
18867	no|*)
18868	;;
18869esac
18870
18871# check whether gost also works
18872
18873# Check whether --enable-gost was given.
18874if test "${enable_gost+set}" = set; then :
18875  enableval=$enable_gost;
18876fi
18877
18878use_gost="no"
18879if test $USE_NSS = "no" -a $USE_NETTLE = "no"; then
18880case "$enable_gost" in
18881	no)
18882	;;
18883	*)
18884	ac_fn_c_check_func "$LINENO" "EVP_PKEY_set_type_str" "ac_cv_func_EVP_PKEY_set_type_str"
18885if test "x$ac_cv_func_EVP_PKEY_set_type_str" = xyes; then :
18886  :
18887else
18888  as_fn_error $? "OpenSSL 1.0.0 is needed for GOST support" "$LINENO" 5
18889fi
18890
18891	ac_fn_c_check_func "$LINENO" "EC_KEY_new" "ac_cv_func_EC_KEY_new"
18892if test "x$ac_cv_func_EC_KEY_new" = xyes; then :
18893
18894else
18895  as_fn_error $? "OpenSSL does not support ECC, needed for GOST support" "$LINENO" 5
18896fi
18897
18898
18899{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if GOST works" >&5
18900$as_echo_n "checking if GOST works... " >&6; }
18901if test c${cross_compiling} = cno; then
18902BAKCFLAGS="$CFLAGS"
18903if test -n "$ssldir"; then
18904	CFLAGS="$CFLAGS -Wl,-rpath,$ssldir_lib"
18905fi
18906if test "$cross_compiling" = yes; then :
18907  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
18908$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
18909as_fn_error $? "cannot run test program while cross compiling
18910See \`config.log' for more details" "$LINENO" 5; }
18911else
18912  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18913/* end confdefs.h.  */
18914
18915#include <string.h>
18916#include <openssl/ssl.h>
18917#include <openssl/evp.h>
18918#include <openssl/engine.h>
18919#include <openssl/conf.h>
18920/* routine to load gost (from sldns) */
18921int load_gost_id(void)
18922{
18923	static int gost_id = 0;
18924	const EVP_PKEY_ASN1_METHOD* meth;
18925	ENGINE* e;
18926
18927	if(gost_id) return gost_id;
18928
18929	/* see if configuration loaded gost implementation from other engine*/
18930	meth = EVP_PKEY_asn1_find_str(NULL, "gost2001", -1);
18931	if(meth) {
18932		EVP_PKEY_asn1_get0_info(&gost_id, NULL, NULL, NULL, NULL, meth);
18933		return gost_id;
18934	}
18935
18936	/* see if engine can be loaded already */
18937	e = ENGINE_by_id("gost");
18938	if(!e) {
18939		/* load it ourself, in case statically linked */
18940		ENGINE_load_builtin_engines();
18941		ENGINE_load_dynamic();
18942		e = ENGINE_by_id("gost");
18943	}
18944	if(!e) {
18945		/* no gost engine in openssl */
18946		return 0;
18947	}
18948	if(!ENGINE_set_default(e, ENGINE_METHOD_ALL)) {
18949		ENGINE_finish(e);
18950		ENGINE_free(e);
18951		return 0;
18952	}
18953
18954	meth = EVP_PKEY_asn1_find_str(&e, "gost2001", -1);
18955	if(!meth) {
18956		/* algo not found */
18957		ENGINE_finish(e);
18958		ENGINE_free(e);
18959		return 0;
18960	}
18961	EVP_PKEY_asn1_get0_info(&gost_id, NULL, NULL, NULL, NULL, meth);
18962	return gost_id;
18963}
18964int main(void) {
18965	EVP_MD_CTX* ctx;
18966	const EVP_MD* md;
18967	unsigned char digest[64]; /* its a 256-bit digest, so uses 32 bytes */
18968	const char* str = "Hello world";
18969	const unsigned char check[] = {
18970		0x40 , 0xed , 0xf8 , 0x56 , 0x5a , 0xc5 , 0x36 , 0xe1 ,
18971		0x33 , 0x7c , 0x7e , 0x87 , 0x62 , 0x1c , 0x42 , 0xe0 ,
18972		0x17 , 0x1b , 0x5e , 0xce , 0xa8 , 0x46 , 0x65 , 0x4d ,
18973		0x8d , 0x3e , 0x22 , 0x9b , 0xe1 , 0x30 , 0x19 , 0x9d
18974	};
18975	OPENSSL_config(NULL);
18976	(void)load_gost_id();
18977	md = EVP_get_digestbyname("md_gost94");
18978	if(!md) return 1;
18979	memset(digest, 0, sizeof(digest));
18980	ctx = EVP_MD_CTX_create();
18981	if(!ctx) return 2;
18982	if(!EVP_DigestInit_ex(ctx, md, NULL)) return 3;
18983	if(!EVP_DigestUpdate(ctx, str, 10)) return 4;
18984	if(!EVP_DigestFinal_ex(ctx, digest, NULL)) return 5;
18985	/* uncomment to see the hash calculated.
18986		{int i;
18987		for(i=0; i<32; i++)
18988			printf(" %2.2x", (int)digest[i]);
18989		printf("\n");}
18990	*/
18991	if(memcmp(digest, check, sizeof(check)) != 0)
18992		return 6;
18993	return 0;
18994}
18995
18996_ACEOF
18997if ac_fn_c_try_run "$LINENO"; then :
18998  eval "ac_cv_c_gost_works=yes"
18999else
19000  eval "ac_cv_c_gost_works=no"
19001fi
19002rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19003  conftest.$ac_objext conftest.beam conftest.$ac_ext
19004fi
19005
19006CFLAGS="$BAKCFLAGS"
19007else
19008eval "ac_cv_c_gost_works=maybe"
19009fi
19010{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_gost_works" >&5
19011$as_echo "$ac_cv_c_gost_works" >&6; }
19012
19013	if test "$ac_cv_c_gost_works" != no; then
19014		use_gost="yes"
19015
19016$as_echo "#define USE_GOST 1" >>confdefs.h
19017
19018	fi
19019	;;
19020esac
19021fi
19022# Check whether --enable-ecdsa was given.
19023if test "${enable_ecdsa+set}" = set; then :
19024  enableval=$enable_ecdsa;
19025fi
19026
19027use_ecdsa="no"
19028case "$enable_ecdsa" in
19029    no)
19030      ;;
19031    *)
19032      if test $USE_NSS = "no" -a $USE_NETTLE = "no"; then
19033	      ac_fn_c_check_func "$LINENO" "ECDSA_sign" "ac_cv_func_ECDSA_sign"
19034if test "x$ac_cv_func_ECDSA_sign" = xyes; then :
19035
19036else
19037  as_fn_error $? "OpenSSL does not support ECDSA: please upgrade or rerun with --disable-ecdsa" "$LINENO" 5
19038fi
19039
19040	      ac_fn_c_check_func "$LINENO" "SHA384_Init" "ac_cv_func_SHA384_Init"
19041if test "x$ac_cv_func_SHA384_Init" = xyes; then :
19042
19043else
19044  as_fn_error $? "OpenSSL does not support SHA384: please upgrade or rerun with --disable-ecdsa" "$LINENO" 5
19045fi
19046
19047	      ac_fn_c_check_decl "$LINENO" "NID_X9_62_prime256v1" "ac_cv_have_decl_NID_X9_62_prime256v1" "$ac_includes_default
19048#include <openssl/evp.h>
19049
19050"
19051if test "x$ac_cv_have_decl_NID_X9_62_prime256v1" = xyes; then :
19052  ac_have_decl=1
19053else
19054  ac_have_decl=0
19055fi
19056
19057cat >>confdefs.h <<_ACEOF
19058#define HAVE_DECL_NID_X9_62_PRIME256V1 $ac_have_decl
19059_ACEOF
19060if test $ac_have_decl = 1; then :
19061
19062else
19063  as_fn_error $? "OpenSSL does not support the ECDSA curves: please upgrade or rerun with --disable-ecdsa" "$LINENO" 5
19064fi
19065ac_fn_c_check_decl "$LINENO" "NID_secp384r1" "ac_cv_have_decl_NID_secp384r1" "$ac_includes_default
19066#include <openssl/evp.h>
19067
19068"
19069if test "x$ac_cv_have_decl_NID_secp384r1" = xyes; then :
19070  ac_have_decl=1
19071else
19072  ac_have_decl=0
19073fi
19074
19075cat >>confdefs.h <<_ACEOF
19076#define HAVE_DECL_NID_SECP384R1 $ac_have_decl
19077_ACEOF
19078if test $ac_have_decl = 1; then :
19079
19080else
19081  as_fn_error $? "OpenSSL does not support the ECDSA curves: please upgrade or rerun with --disable-ecdsa" "$LINENO" 5
19082fi
19083
19084	      # see if OPENSSL 1.0.0 or later (has EVP MD and Verify independency)
19085	      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if openssl supports SHA2 and ECDSA with EVP" >&5
19086$as_echo_n "checking if openssl supports SHA2 and ECDSA with EVP... " >&6; }
19087	      if grep OPENSSL_VERSION_TEXT $ssldir_include/openssl/opensslv.h | grep "OpenSSL" >/dev/null; then
19088		if grep OPENSSL_VERSION_NUMBER $ssldir_include/openssl/opensslv.h | grep 0x0 >/dev/null; then
19089		  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19090$as_echo "no" >&6; }
19091
19092cat >>confdefs.h <<_ACEOF
19093#define USE_ECDSA_EVP_WORKAROUND 1
19094_ACEOF
19095
19096		else
19097		  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19098$as_echo "yes" >&6; }
19099		fi
19100	      else
19101		# not OpenSSL, thus likely LibreSSL, which supports it
19102		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19103$as_echo "yes" >&6; }
19104	      fi
19105      fi
19106      # we now know we have ECDSA and the required curves.
19107
19108cat >>confdefs.h <<_ACEOF
19109#define USE_ECDSA 1
19110_ACEOF
19111
19112      use_ecdsa="yes"
19113      ;;
19114esac
19115
19116# Check whether --enable-dsa was given.
19117if test "${enable_dsa+set}" = set; then :
19118  enableval=$enable_dsa;
19119fi
19120
19121use_dsa="no"
19122case "$enable_dsa" in
19123    yes)
19124      # detect if DSA is supported, and turn it off if not.
19125      if test $USE_NSS = "no" -a $USE_NETTLE = "no"; then
19126      ac_fn_c_check_func "$LINENO" "DSA_SIG_new" "ac_cv_func_DSA_SIG_new"
19127if test "x$ac_cv_func_DSA_SIG_new" = xyes; then :
19128
19129      as_ac_Type=`$as_echo "ac_cv_type_DSA_SIG*" | $as_tr_sh`
19130ac_fn_c_check_type "$LINENO" "DSA_SIG*" "$as_ac_Type" "
19131$ac_includes_default
19132#ifdef HAVE_OPENSSL_ERR_H
19133#include <openssl/err.h>
19134#endif
19135
19136#ifdef HAVE_OPENSSL_RAND_H
19137#include <openssl/rand.h>
19138#endif
19139
19140#ifdef HAVE_OPENSSL_CONF_H
19141#include <openssl/conf.h>
19142#endif
19143
19144#ifdef HAVE_OPENSSL_ENGINE_H
19145#include <openssl/engine.h>
19146#endif
19147
19148"
19149if eval test \"x\$"$as_ac_Type"\" = x"yes"; then :
19150
19151
19152cat >>confdefs.h <<_ACEOF
19153#define USE_DSA 1
19154_ACEOF
19155
19156
19157else
19158  if test "x$enable_dsa" = "xyes"; then as_fn_error $? "OpenSSL does not support DSA and you used --enable-dsa." "$LINENO" 5
19159               fi
19160fi
19161
19162
19163else
19164  if test "x$enable_dsa" = "xyes"; then as_fn_error $? "OpenSSL does not support DSA and you used --enable-dsa." "$LINENO" 5
19165               fi
19166fi
19167
19168      else
19169
19170cat >>confdefs.h <<_ACEOF
19171#define USE_DSA 1
19172_ACEOF
19173
19174      fi
19175      ;;
19176    *)
19177      # disable dsa by default, RFC 8624 section 3.1, validators MUST NOT
19178      # support DSA for DNSSEC Validation.
19179      ;;
19180esac
19181
19182
19183# Check whether --with-deprecate-rsa-1024 was given.
19184if test "${with_deprecate_rsa_1024+set}" = set; then :
19185  withval=$with_deprecate_rsa_1024;
19186fi
19187
19188if test "$with_deprecate_rsa_1024" = "yes"; then
19189
19190$as_echo "#define DEPRECATE_RSA_1024 1" >>confdefs.h
19191
19192fi
19193
19194# Check whether --enable-ed25519 was given.
19195if test "${enable_ed25519+set}" = set; then :
19196  enableval=$enable_ed25519;
19197fi
19198
19199use_ed25519="no"
19200case "$enable_ed25519" in
19201    no)
19202      ;;
19203    *)
19204      if test $USE_NSS = "no" -a $USE_NETTLE = "no"; then
19205	      ac_fn_c_check_decl "$LINENO" "NID_ED25519" "ac_cv_have_decl_NID_ED25519" "$ac_includes_default
19206#include <openssl/evp.h>
19207
19208"
19209if test "x$ac_cv_have_decl_NID_ED25519" = xyes; then :
19210  ac_have_decl=1
19211else
19212  ac_have_decl=0
19213fi
19214
19215cat >>confdefs.h <<_ACEOF
19216#define HAVE_DECL_NID_ED25519 $ac_have_decl
19217_ACEOF
19218if test $ac_have_decl = 1; then :
19219
19220      		use_ed25519="yes"
19221
19222else
19223   if test "x$enable_ed25519" = "xyes"; then as_fn_error $? "OpenSSL does not support ED25519 and you used --enable-ed25519." "$LINENO" 5
19224	      	fi
19225fi
19226
19227      fi
19228      if test $USE_NETTLE = "yes"; then
19229		for ac_header in nettle/eddsa.h
19230do :
19231  ac_fn_c_check_header_compile "$LINENO" "nettle/eddsa.h" "ac_cv_header_nettle_eddsa_h" "$ac_includes_default
19232"
19233if test "x$ac_cv_header_nettle_eddsa_h" = xyes; then :
19234  cat >>confdefs.h <<_ACEOF
19235#define HAVE_NETTLE_EDDSA_H 1
19236_ACEOF
19237 use_ed25519="yes"
19238fi
19239
19240done
19241
19242      fi
19243      if test $use_ed25519 = "yes"; then
19244
19245cat >>confdefs.h <<_ACEOF
19246#define USE_ED25519 1
19247_ACEOF
19248
19249      fi
19250      ;;
19251esac
19252
19253# Check whether --enable-ed448 was given.
19254if test "${enable_ed448+set}" = set; then :
19255  enableval=$enable_ed448;
19256fi
19257
19258use_ed448="no"
19259case "$enable_ed448" in
19260    no)
19261      ;;
19262    *)
19263      if test $USE_NSS = "no" -a $USE_NETTLE = "no"; then
19264	      ac_fn_c_check_decl "$LINENO" "NID_ED448" "ac_cv_have_decl_NID_ED448" "$ac_includes_default
19265#include <openssl/evp.h>
19266
19267"
19268if test "x$ac_cv_have_decl_NID_ED448" = xyes; then :
19269  ac_have_decl=1
19270else
19271  ac_have_decl=0
19272fi
19273
19274cat >>confdefs.h <<_ACEOF
19275#define HAVE_DECL_NID_ED448 $ac_have_decl
19276_ACEOF
19277if test $ac_have_decl = 1; then :
19278
19279      		use_ed448="yes"
19280
19281else
19282   if test "x$enable_ed448" = "xyes"; then as_fn_error $? "OpenSSL does not support ED448 and you used --enable-ed448." "$LINENO" 5
19283	      	fi
19284fi
19285
19286      fi
19287      if test $use_ed448 = "yes"; then
19288
19289cat >>confdefs.h <<_ACEOF
19290#define USE_ED448 1
19291_ACEOF
19292
19293      fi
19294      ;;
19295esac
19296
19297# Check whether --enable-event-api was given.
19298if test "${enable_event_api+set}" = set; then :
19299  enableval=$enable_event_api;
19300fi
19301
19302case "$enable_event_api" in
19303    yes)
19304      UNBOUND_EVENT_INSTALL=unbound-event-install
19305
19306      UNBOUND_EVENT_UNINSTALL=unbound-event-uninstall
19307
19308      ;;
19309    *)
19310      ;;
19311esac
19312
19313# Check whether --enable-tfo-client was given.
19314if test "${enable_tfo_client+set}" = set; then :
19315  enableval=$enable_tfo_client;
19316fi
19317
19318case "$enable_tfo_client" in
19319	yes)
19320		case "$host_os" in
19321			linux*) ac_fn_c_check_decl "$LINENO" "MSG_FASTOPEN" "ac_cv_have_decl_MSG_FASTOPEN" "$ac_includes_default
19322#include <netinet/tcp.h>
19323
19324"
19325if test "x$ac_cv_have_decl_MSG_FASTOPEN" = xyes; then :
19326  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Check the platform specific TFO kernel parameters are correctly configured to support client mode TFO" >&5
19327$as_echo "$as_me: WARNING: Check the platform specific TFO kernel parameters are correctly configured to support client mode TFO" >&2;}
19328else
19329  as_fn_error $? "TCP Fast Open is not available for client mode: please rerun without --enable-tfo-client" "$LINENO" 5
19330fi
19331
19332
19333cat >>confdefs.h <<_ACEOF
19334#define USE_MSG_FASTOPEN 1
19335_ACEOF
19336
19337				;;
19338			darwin*) ac_fn_c_check_decl "$LINENO" "CONNECT_RESUME_ON_READ_WRITE" "ac_cv_have_decl_CONNECT_RESUME_ON_READ_WRITE" "$ac_includes_default
19339#include <sys/socket.h>
19340
19341"
19342if test "x$ac_cv_have_decl_CONNECT_RESUME_ON_READ_WRITE" = xyes; then :
19343  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Check the platform specific TFO kernel parameters are correctly configured to support client mode TFO" >&5
19344$as_echo "$as_me: WARNING: Check the platform specific TFO kernel parameters are correctly configured to support client mode TFO" >&2;}
19345else
19346  as_fn_error $? "TCP Fast Open is not available for client mode: please rerun without --enable-tfo-client" "$LINENO" 5
19347fi
19348
19349
19350cat >>confdefs.h <<_ACEOF
19351#define USE_OSX_MSG_FASTOPEN 1
19352_ACEOF
19353
19354				;;
19355		esac
19356		;;
19357	no|*)
19358		;;
19359esac
19360
19361# Check whether --enable-tfo-server was given.
19362if test "${enable_tfo_server+set}" = set; then :
19363  enableval=$enable_tfo_server;
19364fi
19365
19366case "$enable_tfo_server" in
19367	yes)
19368	      ac_fn_c_check_decl "$LINENO" "TCP_FASTOPEN" "ac_cv_have_decl_TCP_FASTOPEN" "$ac_includes_default
19369#include <netinet/tcp.h>
19370
19371"
19372if test "x$ac_cv_have_decl_TCP_FASTOPEN" = xyes; then :
19373  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Check the platform specific TFO kernel parameters are correctly configured to support server mode TFO" >&5
19374$as_echo "$as_me: WARNING: Check the platform specific TFO kernel parameters are correctly configured to support server mode TFO" >&2;}
19375else
19376  as_fn_error $? "TCP Fast Open is not available for server mode: please rerun without --enable-tfo-server" "$LINENO" 5
19377fi
19378
19379
19380cat >>confdefs.h <<_ACEOF
19381#define USE_TCP_FASTOPEN 1
19382_ACEOF
19383
19384		;;
19385	no|*)
19386		;;
19387esac
19388
19389# check for libevent
19390
19391# Check whether --with-libevent was given.
19392if test "${with_libevent+set}" = set; then :
19393  withval=$with_libevent;
19394else
19395   with_libevent="no"
19396fi
19397
19398if test "x_$with_libevent" != x_no; then
19399
19400$as_echo "#define USE_LIBEVENT 1" >>confdefs.h
19401
19402        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libevent" >&5
19403$as_echo_n "checking for libevent... " >&6; }
19404        if test "x_$with_libevent" = x_ -o "x_$with_libevent" = x_yes; then
19405            with_libevent="/usr/local /opt/local /usr/lib /usr/pkg /usr/sfw /usr"
19406        fi
19407        for dir in $with_libevent; do
19408            thedir="$dir"
19409            if test -f "$dir/include/event.h" -o -f "$dir/include/event2/event.h"; then
19410                found_libevent="yes"
19411								if test "$thedir" != "/usr"; then
19412				    CPPFLAGS="$CPPFLAGS -I$thedir/include"
19413				fi
19414				break;
19415		    fi
19416        done
19417        if test x_$found_libevent != x_yes; then
19418		if test -f "$dir/event.h" -a \( -f "$dir/libevent.la" -o -f "$dir/libev.la" \) ; then
19419			# libevent source directory
19420			{ $as_echo "$as_me:${as_lineno-$LINENO}: result: found in $thedir" >&5
19421$as_echo "found in $thedir" >&6; }
19422			CPPFLAGS="$CPPFLAGS -I$thedir -I$thedir/include"
19423			BAK_LDFLAGS_SET="1"
19424			BAK_LDFLAGS="$LDFLAGS"
19425			# remove evdns from linking
19426			mkdir build >/dev/null 2>&1
19427			mkdir build/libevent >/dev/null 2>&1
19428			mkdir build/libevent/.libs >/dev/null 2>&1
19429			ev_files_o=`ls $thedir/*.o | grep -v evdns\.o | grep -v bufferevent_openssl\.o`
19430			ev_files_lo=`ls $thedir/*.lo | grep -v evdns\.lo | grep -v bufferevent_openssl\.lo`
19431			ev_files_libso=`ls $thedir/.libs/*.o | grep -v evdns\.o | grep -v bufferevent_openssl\.o`
19432			cp $ev_files_o build/libevent
19433			cp $ev_files_lo build/libevent
19434			cp $ev_files_libso build/libevent/.libs
19435			LATE_LDFLAGS="build/libevent/*.lo -lm"
19436			LDFLAGS="build/libevent/*.o $LDFLAGS -lm"
19437		else
19438            as_fn_error $? "Cannot find the libevent library in $with_libevent
19439You can restart ./configure --with-libevent=no to use a builtin alternative.
19440Please note that this alternative is not as capable as libevent when using
19441large outgoing port ranges.  " "$LINENO" 5
19442		fi
19443        else
19444            { $as_echo "$as_me:${as_lineno-$LINENO}: result: found in $thedir" >&5
19445$as_echo "found in $thedir" >&6; }
19446	    	    if test ! -f $thedir/lib/libevent.a -a ! -f $thedir/lib/libevent.so -a -d "$thedir/lib/event2"; then
19447		    LDFLAGS="$LDFLAGS -L$thedir/lib/event2"
19448
19449	if test "x$enable_rpath" = xyes; then
19450		if echo "$thedir/lib/event2" | grep "^/" >/dev/null; then
19451			RUNTIME_PATH="$RUNTIME_PATH -R$thedir/lib/event2"
19452		fi
19453	fi
19454
19455	    else
19456		    		    if test "$thedir" != "/usr" -a "$thedir" != ""; then
19457			LDFLAGS="$LDFLAGS -L$thedir/lib"
19458
19459	if test "x$enable_rpath" = xyes; then
19460		if echo "$thedir/lib" | grep "^/" >/dev/null; then
19461			RUNTIME_PATH="$RUNTIME_PATH -R$thedir/lib"
19462		fi
19463	fi
19464
19465		    fi
19466	    fi
19467        fi
19468	# check for library used by libevent after 1.3c
19469	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5
19470$as_echo_n "checking for library containing clock_gettime... " >&6; }
19471if ${ac_cv_search_clock_gettime+:} false; then :
19472  $as_echo_n "(cached) " >&6
19473else
19474  ac_func_search_save_LIBS=$LIBS
19475cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19476/* end confdefs.h.  */
19477
19478/* Override any GCC internal prototype to avoid an error.
19479   Use char because int might match the return type of a GCC
19480   builtin and then its argument prototype would still apply.  */
19481#ifdef __cplusplus
19482extern "C"
19483#endif
19484char clock_gettime ();
19485int
19486main ()
19487{
19488return clock_gettime ();
19489  ;
19490  return 0;
19491}
19492_ACEOF
19493for ac_lib in '' rt; do
19494  if test -z "$ac_lib"; then
19495    ac_res="none required"
19496  else
19497    ac_res=-l$ac_lib
19498    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
19499  fi
19500  if ac_fn_c_try_link "$LINENO"; then :
19501  ac_cv_search_clock_gettime=$ac_res
19502fi
19503rm -f core conftest.err conftest.$ac_objext \
19504    conftest$ac_exeext
19505  if ${ac_cv_search_clock_gettime+:} false; then :
19506  break
19507fi
19508done
19509if ${ac_cv_search_clock_gettime+:} false; then :
19510
19511else
19512  ac_cv_search_clock_gettime=no
19513fi
19514rm conftest.$ac_ext
19515LIBS=$ac_func_search_save_LIBS
19516fi
19517{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5
19518$as_echo "$ac_cv_search_clock_gettime" >&6; }
19519ac_res=$ac_cv_search_clock_gettime
19520if test "$ac_res" != no; then :
19521  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
19522
19523fi
19524
19525
19526	# is the event.h header libev or libevent?
19527	for ac_header in event.h
19528do :
19529  ac_fn_c_check_header_compile "$LINENO" "event.h" "ac_cv_header_event_h" "$ac_includes_default
19530"
19531if test "x$ac_cv_header_event_h" = xyes; then :
19532  cat >>confdefs.h <<_ACEOF
19533#define HAVE_EVENT_H 1
19534_ACEOF
19535
19536fi
19537
19538done
19539
19540	ac_fn_c_check_decl "$LINENO" "EV_VERSION_MAJOR" "ac_cv_have_decl_EV_VERSION_MAJOR" "$ac_includes_default
19541#include <event.h>
19542
19543"
19544if test "x$ac_cv_have_decl_EV_VERSION_MAJOR" = xyes; then :
19545
19546		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing event_set" >&5
19547$as_echo_n "checking for library containing event_set... " >&6; }
19548if ${ac_cv_search_event_set+:} false; then :
19549  $as_echo_n "(cached) " >&6
19550else
19551  ac_func_search_save_LIBS=$LIBS
19552cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19553/* end confdefs.h.  */
19554
19555/* Override any GCC internal prototype to avoid an error.
19556   Use char because int might match the return type of a GCC
19557   builtin and then its argument prototype would still apply.  */
19558#ifdef __cplusplus
19559extern "C"
19560#endif
19561char event_set ();
19562int
19563main ()
19564{
19565return event_set ();
19566  ;
19567  return 0;
19568}
19569_ACEOF
19570for ac_lib in '' ev; do
19571  if test -z "$ac_lib"; then
19572    ac_res="none required"
19573  else
19574    ac_res=-l$ac_lib
19575    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
19576  fi
19577  if ac_fn_c_try_link "$LINENO"; then :
19578  ac_cv_search_event_set=$ac_res
19579fi
19580rm -f core conftest.err conftest.$ac_objext \
19581    conftest$ac_exeext
19582  if ${ac_cv_search_event_set+:} false; then :
19583  break
19584fi
19585done
19586if ${ac_cv_search_event_set+:} false; then :
19587
19588else
19589  ac_cv_search_event_set=no
19590fi
19591rm conftest.$ac_ext
19592LIBS=$ac_func_search_save_LIBS
19593fi
19594{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_event_set" >&5
19595$as_echo "$ac_cv_search_event_set" >&6; }
19596ac_res=$ac_cv_search_event_set
19597if test "$ac_res" != no; then :
19598  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
19599
19600fi
19601
19602
19603else
19604
19605		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing event_set" >&5
19606$as_echo_n "checking for library containing event_set... " >&6; }
19607if ${ac_cv_search_event_set+:} false; then :
19608  $as_echo_n "(cached) " >&6
19609else
19610  ac_func_search_save_LIBS=$LIBS
19611cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19612/* end confdefs.h.  */
19613
19614/* Override any GCC internal prototype to avoid an error.
19615   Use char because int might match the return type of a GCC
19616   builtin and then its argument prototype would still apply.  */
19617#ifdef __cplusplus
19618extern "C"
19619#endif
19620char event_set ();
19621int
19622main ()
19623{
19624return event_set ();
19625  ;
19626  return 0;
19627}
19628_ACEOF
19629for ac_lib in '' event; do
19630  if test -z "$ac_lib"; then
19631    ac_res="none required"
19632  else
19633    ac_res=-l$ac_lib
19634    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
19635  fi
19636  if ac_fn_c_try_link "$LINENO"; then :
19637  ac_cv_search_event_set=$ac_res
19638fi
19639rm -f core conftest.err conftest.$ac_objext \
19640    conftest$ac_exeext
19641  if ${ac_cv_search_event_set+:} false; then :
19642  break
19643fi
19644done
19645if ${ac_cv_search_event_set+:} false; then :
19646
19647else
19648  ac_cv_search_event_set=no
19649fi
19650rm conftest.$ac_ext
19651LIBS=$ac_func_search_save_LIBS
19652fi
19653{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_event_set" >&5
19654$as_echo "$ac_cv_search_event_set" >&6; }
19655ac_res=$ac_cv_search_event_set
19656if test "$ac_res" != no; then :
19657  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
19658
19659fi
19660
19661
19662fi
19663
19664	for ac_func in event_base_free
19665do :
19666  ac_fn_c_check_func "$LINENO" "event_base_free" "ac_cv_func_event_base_free"
19667if test "x$ac_cv_func_event_base_free" = xyes; then :
19668  cat >>confdefs.h <<_ACEOF
19669#define HAVE_EVENT_BASE_FREE 1
19670_ACEOF
19671
19672fi
19673done
19674 # only in libevent 1.2 and later
19675	for ac_func in event_base_once
19676do :
19677  ac_fn_c_check_func "$LINENO" "event_base_once" "ac_cv_func_event_base_once"
19678if test "x$ac_cv_func_event_base_once" = xyes; then :
19679  cat >>confdefs.h <<_ACEOF
19680#define HAVE_EVENT_BASE_ONCE 1
19681_ACEOF
19682
19683fi
19684done
19685 # only in libevent 1.4.1 and later
19686	for ac_func in event_base_new
19687do :
19688  ac_fn_c_check_func "$LINENO" "event_base_new" "ac_cv_func_event_base_new"
19689if test "x$ac_cv_func_event_base_new" = xyes; then :
19690  cat >>confdefs.h <<_ACEOF
19691#define HAVE_EVENT_BASE_NEW 1
19692_ACEOF
19693
19694fi
19695done
19696 # only in libevent 1.4.1 and later
19697	for ac_func in event_base_get_method
19698do :
19699  ac_fn_c_check_func "$LINENO" "event_base_get_method" "ac_cv_func_event_base_get_method"
19700if test "x$ac_cv_func_event_base_get_method" = xyes; then :
19701  cat >>confdefs.h <<_ACEOF
19702#define HAVE_EVENT_BASE_GET_METHOD 1
19703_ACEOF
19704
19705fi
19706done
19707 # only in libevent 1.4.3 and later
19708	for ac_func in ev_loop
19709do :
19710  ac_fn_c_check_func "$LINENO" "ev_loop" "ac_cv_func_ev_loop"
19711if test "x$ac_cv_func_ev_loop" = xyes; then :
19712  cat >>confdefs.h <<_ACEOF
19713#define HAVE_EV_LOOP 1
19714_ACEOF
19715
19716fi
19717done
19718 # only in libev. (tested on 3.51)
19719	for ac_func in ev_default_loop
19720do :
19721  ac_fn_c_check_func "$LINENO" "ev_default_loop" "ac_cv_func_ev_default_loop"
19722if test "x$ac_cv_func_ev_default_loop" = xyes; then :
19723  cat >>confdefs.h <<_ACEOF
19724#define HAVE_EV_DEFAULT_LOOP 1
19725_ACEOF
19726
19727fi
19728done
19729 # only in libev. (tested on 4.00)
19730	for ac_func in event_assign
19731do :
19732  ac_fn_c_check_func "$LINENO" "event_assign" "ac_cv_func_event_assign"
19733if test "x$ac_cv_func_event_assign" = xyes; then :
19734  cat >>confdefs.h <<_ACEOF
19735#define HAVE_EVENT_ASSIGN 1
19736_ACEOF
19737
19738fi
19739done
19740 # in libevent, for thread-safety
19741	ac_fn_c_check_decl "$LINENO" "evsignal_assign" "ac_cv_have_decl_evsignal_assign" "$ac_includes_default
19742#ifdef HAVE_EVENT_H
19743#  include <event.h>
19744#else
19745#  include \"event2/event.h\"
19746#endif
19747
19748"
19749if test "x$ac_cv_have_decl_evsignal_assign" = xyes; then :
19750  ac_have_decl=1
19751else
19752  ac_have_decl=0
19753fi
19754
19755cat >>confdefs.h <<_ACEOF
19756#define HAVE_DECL_EVSIGNAL_ASSIGN $ac_have_decl
19757_ACEOF
19758
19759        PC_LIBEVENT_DEPENDENCY="libevent"
19760
19761	if test -n "$BAK_LDFLAGS_SET"; then
19762		LDFLAGS="$BAK_LDFLAGS"
19763	fi
19764else
19765
19766$as_echo "#define USE_MINI_EVENT 1" >>confdefs.h
19767
19768fi
19769
19770# check for libexpat
19771
19772# Check whether --with-libexpat was given.
19773if test "${with_libexpat+set}" = set; then :
19774  withval=$with_libexpat;
19775else
19776   withval="/usr/local /opt/local /usr/lib /usr/pkg /usr/sfw /usr"
19777fi
19778
19779{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for libexpat" >&5
19780$as_echo_n "checking for libexpat... " >&6; }
19781found_libexpat="no"
19782for dir in $withval ; do
19783            if test -f "$dir/include/expat.h"; then
19784		found_libexpat="yes"
19785				if test "$dir" != "/usr"; then
19786                    CPPFLAGS="$CPPFLAGS -I$dir/include"
19787		    LDFLAGS="$LDFLAGS -L$dir/lib"
19788		fi
19789            	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: found in $dir" >&5
19790$as_echo "found in $dir" >&6; }
19791                break;
19792            fi
19793done
19794if test x_$found_libexpat != x_yes; then
19795	as_fn_error $? "Could not find libexpat, expat.h" "$LINENO" 5
19796fi
19797for ac_header in expat.h
19798do :
19799  ac_fn_c_check_header_compile "$LINENO" "expat.h" "ac_cv_header_expat_h" "$ac_includes_default
19800"
19801if test "x$ac_cv_header_expat_h" = xyes; then :
19802  cat >>confdefs.h <<_ACEOF
19803#define HAVE_EXPAT_H 1
19804_ACEOF
19805
19806fi
19807
19808done
19809
19810ac_fn_c_check_decl "$LINENO" "XML_StopParser" "ac_cv_have_decl_XML_StopParser" "$ac_includes_default
19811#include <expat.h>
19812
19813"
19814if test "x$ac_cv_have_decl_XML_StopParser" = xyes; then :
19815  ac_have_decl=1
19816else
19817  ac_have_decl=0
19818fi
19819
19820cat >>confdefs.h <<_ACEOF
19821#define HAVE_DECL_XML_STOPPARSER $ac_have_decl
19822_ACEOF
19823
19824
19825# hiredis (redis C client for cachedb)
19826
19827# Check whether --with-libhiredis was given.
19828if test "${with_libhiredis+set}" = set; then :
19829  withval=$with_libhiredis;
19830else
19831   withval="no"
19832fi
19833
19834found_libhiredis="no"
19835if test x_$withval = x_yes -o x_$withval != x_no; then
19836   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libhiredis" >&5
19837$as_echo_n "checking for libhiredis... " >&6; }
19838   if test x_$withval = x_ -o x_$withval = x_yes; then
19839            withval="/usr/local /opt/local /usr/lib /usr/pkg /usr/sfw /usr"
19840   fi
19841   for dir in $withval ; do
19842            if test -f "$dir/include/hiredis/hiredis.h"; then
19843		found_libhiredis="yes"
19844				if test "$dir" != "/usr"; then
19845                    CPPFLAGS="$CPPFLAGS -I$dir/include"
19846		    LDFLAGS="$LDFLAGS -L$dir/lib"
19847		fi
19848		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: found in $dir" >&5
19849$as_echo "found in $dir" >&6; }
19850
19851$as_echo "#define USE_REDIS 1" >>confdefs.h
19852
19853		LIBS="$LIBS -lhiredis"
19854                break;
19855            fi
19856    done
19857    if test x_$found_libhiredis != x_yes; then
19858	as_fn_error $? "Could not find libhiredis, hiredis.h" "$LINENO" 5
19859    fi
19860    for ac_header in hiredis/hiredis.h
19861do :
19862  ac_fn_c_check_header_compile "$LINENO" "hiredis/hiredis.h" "ac_cv_header_hiredis_hiredis_h" "$ac_includes_default
19863"
19864if test "x$ac_cv_header_hiredis_hiredis_h" = xyes; then :
19865  cat >>confdefs.h <<_ACEOF
19866#define HAVE_HIREDIS_HIREDIS_H 1
19867_ACEOF
19868
19869fi
19870
19871done
19872
19873    ac_fn_c_check_decl "$LINENO" "redisConnect" "ac_cv_have_decl_redisConnect" "$ac_includes_default
19874    #include <hiredis/hiredis.h>
19875
19876"
19877if test "x$ac_cv_have_decl_redisConnect" = xyes; then :
19878  ac_have_decl=1
19879else
19880  ac_have_decl=0
19881fi
19882
19883cat >>confdefs.h <<_ACEOF
19884#define HAVE_DECL_REDISCONNECT $ac_have_decl
19885_ACEOF
19886
19887fi
19888
19889# nghttp2
19890
19891# Check whether --with-libnghttp2 was given.
19892if test "${with_libnghttp2+set}" = set; then :
19893  withval=$with_libnghttp2;
19894else
19895   withval="no"
19896fi
19897
19898found_libnghttp2="no"
19899if test x_$withval = x_yes -o x_$withval != x_no; then
19900   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libnghttp2" >&5
19901$as_echo_n "checking for libnghttp2... " >&6; }
19902   if test x_$withval = x_ -o x_$withval = x_yes; then
19903            withval="/usr/local /opt/local /usr/lib /usr/pkg /usr/sfw /usr"
19904   fi
19905   for dir in $withval ; do
19906            if test -f "$dir/include/nghttp2/nghttp2.h"; then
19907		found_libnghttp2="yes"
19908				if test "$dir" != "/usr"; then
19909                    CPPFLAGS="$CPPFLAGS -I$dir/include"
19910		    LDFLAGS="$LDFLAGS -L$dir/lib"
19911		fi
19912		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: found in $dir" >&5
19913$as_echo "found in $dir" >&6; }
19914
19915$as_echo "#define HAVE_NGHTTP2 1" >>confdefs.h
19916
19917		LIBS="$LIBS -lnghttp2"
19918                break;
19919            fi
19920    done
19921    if test x_$found_libnghttp2 != x_yes; then
19922	as_fn_error $? "Could not find libnghttp2, nghttp2.h" "$LINENO" 5
19923    fi
19924    for ac_header in nghttp2/nghttp2.h
19925do :
19926  ac_fn_c_check_header_compile "$LINENO" "nghttp2/nghttp2.h" "ac_cv_header_nghttp2_nghttp2_h" "$ac_includes_default
19927"
19928if test "x$ac_cv_header_nghttp2_nghttp2_h" = xyes; then :
19929  cat >>confdefs.h <<_ACEOF
19930#define HAVE_NGHTTP2_NGHTTP2_H 1
19931_ACEOF
19932
19933fi
19934
19935done
19936
19937    ac_fn_c_check_decl "$LINENO" "nghttp2_session_server_new" "ac_cv_have_decl_nghttp2_session_server_new" "$ac_includes_default
19938    #include <nghttp2/nghttp2.h>
19939
19940"
19941if test "x$ac_cv_have_decl_nghttp2_session_server_new" = xyes; then :
19942  ac_have_decl=1
19943else
19944  ac_have_decl=0
19945fi
19946
19947cat >>confdefs.h <<_ACEOF
19948#define HAVE_DECL_NGHTTP2_SESSION_SERVER_NEW $ac_have_decl
19949_ACEOF
19950
19951fi
19952
19953# set static linking for uninstalled libraries if requested
19954
19955staticexe=""
19956# Check whether --enable-static-exe was given.
19957if test "${enable_static_exe+set}" = set; then :
19958  enableval=$enable_static_exe;
19959fi
19960
19961if test x_$enable_static_exe = x_yes; then
19962	staticexe="-static"
19963	if test "$on_mingw" = yes; then
19964		staticexe="-all-static"
19965		# for static compile, include gdi32 and zlib here.
19966		if echo $LIBS | grep 'lgdi32' >/dev/null; then
19967			:
19968		else
19969			LIBS="$LIBS -lgdi32"
19970		fi
19971		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
19972$as_echo_n "checking for compress in -lz... " >&6; }
19973if ${ac_cv_lib_z_compress+:} false; then :
19974  $as_echo_n "(cached) " >&6
19975else
19976  ac_check_lib_save_LIBS=$LIBS
19977LIBS="-lz  $LIBS"
19978cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19979/* end confdefs.h.  */
19980
19981/* Override any GCC internal prototype to avoid an error.
19982   Use char because int might match the return type of a GCC
19983   builtin and then its argument prototype would still apply.  */
19984#ifdef __cplusplus
19985extern "C"
19986#endif
19987char compress ();
19988int
19989main ()
19990{
19991return compress ();
19992  ;
19993  return 0;
19994}
19995_ACEOF
19996if ac_fn_c_try_link "$LINENO"; then :
19997  ac_cv_lib_z_compress=yes
19998else
19999  ac_cv_lib_z_compress=no
20000fi
20001rm -f core conftest.err conftest.$ac_objext \
20002    conftest$ac_exeext conftest.$ac_ext
20003LIBS=$ac_check_lib_save_LIBS
20004fi
20005{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
20006$as_echo "$ac_cv_lib_z_compress" >&6; }
20007if test "x$ac_cv_lib_z_compress" = xyes; then :
20008   LIBS="$LIBS -lz"
20009fi
20010
20011		LIBS="$LIBS -l:libssp.a"
20012	fi
20013fi
20014
20015# set full static linking if requested
20016# Check whether --enable-fully-static was given.
20017if test "${enable_fully_static+set}" = set; then :
20018  enableval=$enable_fully_static;
20019fi
20020
20021if test x_$enable_fully_static = x_yes; then
20022	staticexe="-all-static"
20023	if test "$on_mingw" = yes; then
20024		# for static compile, include gdi32 and zlib here.
20025		if echo $LIBS | grep 'lgdi32' >/dev/null; then
20026			:
20027		else
20028			LIBS="$LIBS -lgdi32"
20029		fi
20030		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
20031$as_echo_n "checking for compress in -lz... " >&6; }
20032if ${ac_cv_lib_z_compress+:} false; then :
20033  $as_echo_n "(cached) " >&6
20034else
20035  ac_check_lib_save_LIBS=$LIBS
20036LIBS="-lz  $LIBS"
20037cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20038/* end confdefs.h.  */
20039
20040/* Override any GCC internal prototype to avoid an error.
20041   Use char because int might match the return type of a GCC
20042   builtin and then its argument prototype would still apply.  */
20043#ifdef __cplusplus
20044extern "C"
20045#endif
20046char compress ();
20047int
20048main ()
20049{
20050return compress ();
20051  ;
20052  return 0;
20053}
20054_ACEOF
20055if ac_fn_c_try_link "$LINENO"; then :
20056  ac_cv_lib_z_compress=yes
20057else
20058  ac_cv_lib_z_compress=no
20059fi
20060rm -f core conftest.err conftest.$ac_objext \
20061    conftest$ac_exeext conftest.$ac_ext
20062LIBS=$ac_check_lib_save_LIBS
20063fi
20064{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
20065$as_echo "$ac_cv_lib_z_compress" >&6; }
20066if test "x$ac_cv_lib_z_compress" = xyes; then :
20067   LIBS="$LIBS -lz"
20068fi
20069
20070		LIBS="$LIBS -l:libssp.a"
20071	fi
20072fi
20073
20074# set lock checking if requested
20075# Check whether --enable-lock_checks was given.
20076if test "${enable_lock_checks+set}" = set; then :
20077  enableval=$enable_lock_checks;
20078fi
20079
20080if test x_$enable_lock_checks = x_yes; then
20081
20082$as_echo "#define ENABLE_LOCK_CHECKS 1" >>confdefs.h
20083
20084	CHECKLOCK_OBJ="checklocks.lo"
20085
20086fi
20087
20088
20089{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
20090$as_echo_n "checking for getaddrinfo... " >&6; }
20091ac_cv_func_getaddrinfo=no
20092cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20093/* end confdefs.h.  */
20094
20095#ifdef __cplusplus
20096extern "C"
20097{
20098#endif
20099char* getaddrinfo();
20100char* (*f) () = getaddrinfo;
20101#ifdef __cplusplus
20102}
20103#endif
20104int main() {
20105        ;
20106        return 0;
20107}
20108
20109_ACEOF
20110if ac_fn_c_try_link "$LINENO"; then :
20111  ac_cv_func_getaddrinfo="yes"
20112if test "$ac_cv_header_windows_h" = "yes"; then
20113
20114$as_echo "#define USE_WINSOCK 1" >>confdefs.h
20115
20116	USE_WINSOCK="1"
20117	if echo $LIBS | grep 'lws2_32' >/dev/null; then
20118		:
20119	else
20120		LIBS="$LIBS -lws2_32"
20121	fi
20122fi
20123
20124else
20125  ORIGLIBS="$LIBS"
20126LIBS="$LIBS -lws2_32"
20127cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20128/* end confdefs.h.  */
20129
20130#ifdef HAVE_WS2TCPIP_H
20131#include <ws2tcpip.h>
20132#endif
20133
20134int
20135main ()
20136{
20137
20138        (void)getaddrinfo(NULL, NULL, NULL, NULL);
20139
20140
20141  ;
20142  return 0;
20143}
20144_ACEOF
20145if ac_fn_c_try_link "$LINENO"; then :
20146
20147ac_cv_func_getaddrinfo="yes"
20148
20149$as_echo "#define USE_WINSOCK 1" >>confdefs.h
20150
20151USE_WINSOCK="1"
20152
20153else
20154
20155ac_cv_func_getaddrinfo="no"
20156LIBS="$ORIGLIBS"
20157
20158fi
20159rm -f core conftest.err conftest.$ac_objext \
20160    conftest$ac_exeext conftest.$ac_ext
20161
20162fi
20163rm -f core conftest.err conftest.$ac_objext \
20164    conftest$ac_exeext conftest.$ac_ext
20165
20166{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_getaddrinfo" >&5
20167$as_echo "$ac_cv_func_getaddrinfo" >&6; }
20168if test $ac_cv_func_getaddrinfo = yes; then
20169
20170$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
20171
20172fi
20173
20174if test "$USE_WINSOCK" = 1; then
20175
20176$as_echo "#define UB_ON_WINDOWS 1" >>confdefs.h
20177
20178	for ac_header in iphlpapi.h
20179do :
20180  ac_fn_c_check_header_compile "$LINENO" "iphlpapi.h" "ac_cv_header_iphlpapi_h" "$ac_includes_default
20181#include <windows.h>
20182
20183"
20184if test "x$ac_cv_header_iphlpapi_h" = xyes; then :
20185  cat >>confdefs.h <<_ACEOF
20186#define HAVE_IPHLPAPI_H 1
20187_ACEOF
20188
20189fi
20190
20191done
20192
20193	if test -n "$ac_tool_prefix"; then
20194  # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
20195set dummy ${ac_tool_prefix}windres; ac_word=$2
20196{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20197$as_echo_n "checking for $ac_word... " >&6; }
20198if ${ac_cv_prog_WINDRES+:} false; then :
20199  $as_echo_n "(cached) " >&6
20200else
20201  if test -n "$WINDRES"; then
20202  ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
20203else
20204as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20205for as_dir in $PATH
20206do
20207  IFS=$as_save_IFS
20208  test -z "$as_dir" && as_dir=.
20209    for ac_exec_ext in '' $ac_executable_extensions; do
20210  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20211    ac_cv_prog_WINDRES="${ac_tool_prefix}windres"
20212    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20213    break 2
20214  fi
20215done
20216  done
20217IFS=$as_save_IFS
20218
20219fi
20220fi
20221WINDRES=$ac_cv_prog_WINDRES
20222if test -n "$WINDRES"; then
20223  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINDRES" >&5
20224$as_echo "$WINDRES" >&6; }
20225else
20226  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20227$as_echo "no" >&6; }
20228fi
20229
20230
20231fi
20232if test -z "$ac_cv_prog_WINDRES"; then
20233  ac_ct_WINDRES=$WINDRES
20234  # Extract the first word of "windres", so it can be a program name with args.
20235set dummy windres; ac_word=$2
20236{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20237$as_echo_n "checking for $ac_word... " >&6; }
20238if ${ac_cv_prog_ac_ct_WINDRES+:} false; then :
20239  $as_echo_n "(cached) " >&6
20240else
20241  if test -n "$ac_ct_WINDRES"; then
20242  ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # Let the user override the test.
20243else
20244as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20245for as_dir in $PATH
20246do
20247  IFS=$as_save_IFS
20248  test -z "$as_dir" && as_dir=.
20249    for ac_exec_ext in '' $ac_executable_extensions; do
20250  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20251    ac_cv_prog_ac_ct_WINDRES="windres"
20252    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20253    break 2
20254  fi
20255done
20256  done
20257IFS=$as_save_IFS
20258
20259fi
20260fi
20261ac_ct_WINDRES=$ac_cv_prog_ac_ct_WINDRES
20262if test -n "$ac_ct_WINDRES"; then
20263  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_WINDRES" >&5
20264$as_echo "$ac_ct_WINDRES" >&6; }
20265else
20266  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20267$as_echo "no" >&6; }
20268fi
20269
20270  if test "x$ac_ct_WINDRES" = x; then
20271    WINDRES=""
20272  else
20273    case $cross_compiling:$ac_tool_warned in
20274yes:)
20275{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
20276$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
20277ac_tool_warned=yes ;;
20278esac
20279    WINDRES=$ac_ct_WINDRES
20280  fi
20281else
20282  WINDRES="$ac_cv_prog_WINDRES"
20283fi
20284
20285	LIBS="$LIBS -liphlpapi -lcrypt32"
20286	WINAPPS="unbound-service-install.exe unbound-service-remove.exe anchor-update.exe"
20287
20288	WIN_DAEMON_SRC="winrc/win_svc.c winrc/w_inst.c"
20289
20290	WIN_DAEMON_OBJ="win_svc.lo w_inst.lo"
20291
20292	WIN_DAEMON_OBJ_LINK="rsrc_unbound.o"
20293
20294	WIN_HOST_OBJ_LINK="rsrc_unbound_host.o"
20295
20296	WIN_UBANCHOR_OBJ_LINK="rsrc_unbound_anchor.o log.lo locks.lo"
20297
20298	WIN_CONTROL_OBJ_LINK="rsrc_unbound_control.o"
20299
20300	WIN_CHECKCONF_OBJ_LINK="rsrc_unbound_checkconf.o"
20301
20302
20303$as_echo "#define __USE_MINGW_ANSI_STDIO 1" >>confdefs.h
20304
20305fi
20306if test $ac_cv_func_getaddrinfo = no; then
20307	case " $LIBOBJS " in
20308  *" fake-rfc2553.$ac_objext "* ) ;;
20309  *) LIBOBJS="$LIBOBJS fake-rfc2553.$ac_objext"
20310 ;;
20311esac
20312
20313fi
20314# check after getaddrinfo for its libraries
20315
20316# check ioctlsocket
20317{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ioctlsocket" >&5
20318$as_echo_n "checking for ioctlsocket... " >&6; }
20319cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20320/* end confdefs.h.  */
20321
20322#ifdef HAVE_WINSOCK2_H
20323#include <winsock2.h>
20324#endif
20325
20326int
20327main ()
20328{
20329
20330	(void)ioctlsocket(0, 0, NULL);
20331
20332  ;
20333  return 0;
20334}
20335_ACEOF
20336if ac_fn_c_try_link "$LINENO"; then :
20337
20338{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
20339$as_echo "yes" >&6; }
20340
20341$as_echo "#define HAVE_IOCTLSOCKET 1" >>confdefs.h
20342
20343
20344else
20345  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20346$as_echo "no" >&6; }
20347fi
20348rm -f core conftest.err conftest.$ac_objext \
20349    conftest$ac_exeext conftest.$ac_ext
20350
20351
20352# see if daemon(3) exists, and if it is deprecated.
20353for ac_func in daemon
20354do :
20355  ac_fn_c_check_func "$LINENO" "daemon" "ac_cv_func_daemon"
20356if test "x$ac_cv_func_daemon" = xyes; then :
20357  cat >>confdefs.h <<_ACEOF
20358#define HAVE_DAEMON 1
20359_ACEOF
20360
20361fi
20362done
20363
20364if test $ac_cv_func_daemon = yes; then
20365
20366
20367{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if daemon is deprecated" >&5
20368$as_echo_n "checking if daemon is deprecated... " >&6; }
20369cache=`echo daemon | sed 'y%.=/+-%___p_%'`
20370if eval \${cv_cc_deprecated_$cache+:} false; then :
20371  $as_echo_n "(cached) " >&6
20372else
20373
20374echo '
20375#include <stdlib.h>
20376#include <unistd.h>
20377' >conftest.c
20378echo 'void f(){ (void)daemon(0, 0); }' >>conftest.c
20379if test -z "`$CC $CPPFLAGS $CFLAGS -c conftest.c 2>&1 | grep -e deprecated -e unavailable`"; then
20380eval "cv_cc_deprecated_$cache=no"
20381else
20382eval "cv_cc_deprecated_$cache=yes"
20383fi
20384rm -f conftest conftest.o conftest.c
20385
20386fi
20387
20388if eval "test \"`echo '$cv_cc_deprecated_'$cache`\" = yes"; then
20389{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
20390$as_echo "yes" >&6; }
20391
20392cat >>confdefs.h <<_ACEOF
20393#define DEPRECATED_DAEMON 1
20394_ACEOF
20395
20396:
20397
20398else
20399{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20400$as_echo "no" >&6; }
20401:
20402
20403fi
20404
20405fi
20406
20407ac_fn_c_check_member "$LINENO" "struct sockaddr_un" "sun_len" "ac_cv_member_struct_sockaddr_un_sun_len" "
20408$ac_includes_default
20409#ifdef HAVE_SYS_UN_H
20410#include <sys/un.h>
20411#endif
20412
20413"
20414if test "x$ac_cv_member_struct_sockaddr_un_sun_len" = xyes; then :
20415
20416cat >>confdefs.h <<_ACEOF
20417#define HAVE_STRUCT_SOCKADDR_UN_SUN_LEN 1
20418_ACEOF
20419
20420
20421fi
20422
20423ac_fn_c_check_member "$LINENO" "struct in_pktinfo" "ipi_spec_dst" "ac_cv_member_struct_in_pktinfo_ipi_spec_dst" "
20424$ac_includes_default
20425#if HAVE_SYS_PARAM_H
20426#include <sys/param.h>
20427#endif
20428
20429#ifdef HAVE_SYS_SOCKET_H
20430#include <sys/socket.h>
20431#endif
20432
20433#ifdef HAVE_SYS_UIO_H
20434#include <sys/uio.h>
20435#endif
20436
20437#ifdef HAVE_NETINET_IN_H
20438#include <netinet/in.h>
20439#endif
20440
20441#ifdef HAVE_NETINET_TCP_H
20442#include <netinet/tcp.h>
20443#endif
20444
20445#ifdef HAVE_ARPA_INET_H
20446#include <arpa/inet.h>
20447#endif
20448
20449#ifdef HAVE_WINSOCK2_H
20450#include <winsock2.h>
20451#endif
20452
20453#ifdef HAVE_WS2TCPIP_H
20454#include <ws2tcpip.h>
20455#endif
20456
20457"
20458if test "x$ac_cv_member_struct_in_pktinfo_ipi_spec_dst" = xyes; then :
20459
20460cat >>confdefs.h <<_ACEOF
20461#define HAVE_STRUCT_IN_PKTINFO_IPI_SPEC_DST 1
20462_ACEOF
20463
20464
20465fi
20466
20467
20468{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for htobe64" >&5
20469$as_echo_n "checking for htobe64... " >&6; }
20470cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20471/* end confdefs.h.  */
20472
20473#include <stdio.h>
20474#ifdef HAVE_ENDIAN_H
20475#  include <endian.h>
20476#endif
20477#ifdef HAVE_SYS_ENDIAN_H
20478#  include <sys/endian.h>
20479#endif
20480
20481int
20482main ()
20483{
20484unsigned long long x = htobe64(0); printf("%u", (unsigned)x);
20485  ;
20486  return 0;
20487}
20488_ACEOF
20489if ac_fn_c_try_link "$LINENO"; then :
20490  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
20491$as_echo "yes" >&6; }
20492
20493$as_echo "#define HAVE_HTOBE64 1" >>confdefs.h
20494
20495else
20496  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20497$as_echo "no" >&6; }
20498fi
20499rm -f core conftest.err conftest.$ac_objext \
20500    conftest$ac_exeext conftest.$ac_ext
20501
20502{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for be64toh" >&5
20503$as_echo_n "checking for be64toh... " >&6; }
20504cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20505/* end confdefs.h.  */
20506
20507#include <stdio.h>
20508#ifdef HAVE_ENDIAN_H
20509#  include <endian.h>
20510#endif
20511#ifdef HAVE_SYS_ENDIAN_H
20512#  include <sys/endian.h>
20513#endif
20514
20515int
20516main ()
20517{
20518unsigned long long x = be64toh(0); printf("%u", (unsigned)x);
20519  ;
20520  return 0;
20521}
20522_ACEOF
20523if ac_fn_c_try_link "$LINENO"; then :
20524  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
20525$as_echo "yes" >&6; }
20526
20527$as_echo "#define HAVE_BE64TOH 1" >>confdefs.h
20528
20529else
20530  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20531$as_echo "no" >&6; }
20532fi
20533rm -f core conftest.err conftest.$ac_objext \
20534    conftest$ac_exeext conftest.$ac_ext
20535
20536{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing setusercontext" >&5
20537$as_echo_n "checking for library containing setusercontext... " >&6; }
20538if ${ac_cv_search_setusercontext+:} false; then :
20539  $as_echo_n "(cached) " >&6
20540else
20541  ac_func_search_save_LIBS=$LIBS
20542cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20543/* end confdefs.h.  */
20544
20545/* Override any GCC internal prototype to avoid an error.
20546   Use char because int might match the return type of a GCC
20547   builtin and then its argument prototype would still apply.  */
20548#ifdef __cplusplus
20549extern "C"
20550#endif
20551char setusercontext ();
20552int
20553main ()
20554{
20555return setusercontext ();
20556  ;
20557  return 0;
20558}
20559_ACEOF
20560for ac_lib in '' util; do
20561  if test -z "$ac_lib"; then
20562    ac_res="none required"
20563  else
20564    ac_res=-l$ac_lib
20565    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
20566  fi
20567  if ac_fn_c_try_link "$LINENO"; then :
20568  ac_cv_search_setusercontext=$ac_res
20569fi
20570rm -f core conftest.err conftest.$ac_objext \
20571    conftest$ac_exeext
20572  if ${ac_cv_search_setusercontext+:} false; then :
20573  break
20574fi
20575done
20576if ${ac_cv_search_setusercontext+:} false; then :
20577
20578else
20579  ac_cv_search_setusercontext=no
20580fi
20581rm conftest.$ac_ext
20582LIBS=$ac_func_search_save_LIBS
20583fi
20584{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_setusercontext" >&5
20585$as_echo "$ac_cv_search_setusercontext" >&6; }
20586ac_res=$ac_cv_search_setusercontext
20587if test "$ac_res" != no; then :
20588  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
20589
20590fi
20591
20592for 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
20593do :
20594  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
20595ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
20596if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
20597  cat >>confdefs.h <<_ACEOF
20598#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
20599_ACEOF
20600
20601fi
20602done
20603
20604for ac_func in setresuid
20605do :
20606  ac_fn_c_check_func "$LINENO" "setresuid" "ac_cv_func_setresuid"
20607if test "x$ac_cv_func_setresuid" = xyes; then :
20608  cat >>confdefs.h <<_ACEOF
20609#define HAVE_SETRESUID 1
20610_ACEOF
20611
20612else
20613  for ac_func in setreuid
20614do :
20615  ac_fn_c_check_func "$LINENO" "setreuid" "ac_cv_func_setreuid"
20616if test "x$ac_cv_func_setreuid" = xyes; then :
20617  cat >>confdefs.h <<_ACEOF
20618#define HAVE_SETREUID 1
20619_ACEOF
20620
20621fi
20622done
20623
20624fi
20625done
20626
20627for ac_func in setresgid
20628do :
20629  ac_fn_c_check_func "$LINENO" "setresgid" "ac_cv_func_setresgid"
20630if test "x$ac_cv_func_setresgid" = xyes; then :
20631  cat >>confdefs.h <<_ACEOF
20632#define HAVE_SETRESGID 1
20633_ACEOF
20634
20635else
20636  for ac_func in setregid
20637do :
20638  ac_fn_c_check_func "$LINENO" "setregid" "ac_cv_func_setregid"
20639if test "x$ac_cv_func_setregid" = xyes; then :
20640  cat >>confdefs.h <<_ACEOF
20641#define HAVE_SETREGID 1
20642_ACEOF
20643
20644fi
20645done
20646
20647fi
20648done
20649
20650
20651# check if setreuid en setregid fail, on MacOSX10.4(darwin8).
20652if echo $host_os | grep darwin8 > /dev/null; then
20653
20654$as_echo "#define DARWIN_BROKEN_SETREUID 1" >>confdefs.h
20655
20656fi
20657ac_fn_c_check_decl "$LINENO" "inet_pton" "ac_cv_have_decl_inet_pton" "
20658$ac_includes_default
20659#ifdef HAVE_NETINET_IN_H
20660#include <netinet/in.h>
20661#endif
20662
20663#ifdef HAVE_NETINET_TCP_H
20664#include <netinet/tcp.h>
20665#endif
20666
20667#ifdef HAVE_ARPA_INET_H
20668#include <arpa/inet.h>
20669#endif
20670
20671#ifdef HAVE_WINSOCK2_H
20672#include <winsock2.h>
20673#endif
20674
20675#ifdef HAVE_WS2TCPIP_H
20676#include <ws2tcpip.h>
20677#endif
20678
20679"
20680if test "x$ac_cv_have_decl_inet_pton" = xyes; then :
20681  ac_have_decl=1
20682else
20683  ac_have_decl=0
20684fi
20685
20686cat >>confdefs.h <<_ACEOF
20687#define HAVE_DECL_INET_PTON $ac_have_decl
20688_ACEOF
20689ac_fn_c_check_decl "$LINENO" "inet_ntop" "ac_cv_have_decl_inet_ntop" "
20690$ac_includes_default
20691#ifdef HAVE_NETINET_IN_H
20692#include <netinet/in.h>
20693#endif
20694
20695#ifdef HAVE_NETINET_TCP_H
20696#include <netinet/tcp.h>
20697#endif
20698
20699#ifdef HAVE_ARPA_INET_H
20700#include <arpa/inet.h>
20701#endif
20702
20703#ifdef HAVE_WINSOCK2_H
20704#include <winsock2.h>
20705#endif
20706
20707#ifdef HAVE_WS2TCPIP_H
20708#include <ws2tcpip.h>
20709#endif
20710
20711"
20712if test "x$ac_cv_have_decl_inet_ntop" = xyes; then :
20713  ac_have_decl=1
20714else
20715  ac_have_decl=0
20716fi
20717
20718cat >>confdefs.h <<_ACEOF
20719#define HAVE_DECL_INET_NTOP $ac_have_decl
20720_ACEOF
20721
20722ac_fn_c_check_func "$LINENO" "inet_aton" "ac_cv_func_inet_aton"
20723if test "x$ac_cv_func_inet_aton" = xyes; then :
20724  $as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
20725
20726else
20727  case " $LIBOBJS " in
20728  *" inet_aton.$ac_objext "* ) ;;
20729  *) LIBOBJS="$LIBOBJS inet_aton.$ac_objext"
20730 ;;
20731esac
20732
20733fi
20734
20735
20736ac_fn_c_check_func "$LINENO" "inet_pton" "ac_cv_func_inet_pton"
20737if test "x$ac_cv_func_inet_pton" = xyes; then :
20738  $as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
20739
20740else
20741  case " $LIBOBJS " in
20742  *" inet_pton.$ac_objext "* ) ;;
20743  *) LIBOBJS="$LIBOBJS inet_pton.$ac_objext"
20744 ;;
20745esac
20746
20747fi
20748
20749
20750ac_fn_c_check_func "$LINENO" "inet_ntop" "ac_cv_func_inet_ntop"
20751if test "x$ac_cv_func_inet_ntop" = xyes; then :
20752  $as_echo "#define HAVE_INET_NTOP 1" >>confdefs.h
20753
20754else
20755  case " $LIBOBJS " in
20756  *" inet_ntop.$ac_objext "* ) ;;
20757  *) LIBOBJS="$LIBOBJS inet_ntop.$ac_objext"
20758 ;;
20759esac
20760
20761fi
20762
20763
20764ac_fn_c_check_func "$LINENO" "snprintf" "ac_cv_func_snprintf"
20765if test "x$ac_cv_func_snprintf" = xyes; then :
20766  $as_echo "#define HAVE_SNPRINTF 1" >>confdefs.h
20767
20768else
20769  case " $LIBOBJS " in
20770  *" snprintf.$ac_objext "* ) ;;
20771  *) LIBOBJS="$LIBOBJS snprintf.$ac_objext"
20772 ;;
20773esac
20774
20775fi
20776
20777
20778# test if snprintf return the proper length
20779if test "x$ac_cv_func_snprintf" = xyes; then
20780    if test c${cross_compiling} = cno; then
20781	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for correct snprintf return value" >&5
20782$as_echo_n "checking for correct snprintf return value... " >&6; }
20783	if test "$cross_compiling" = yes; then :
20784  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
20785$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
20786as_fn_error $? "cannot run test program while cross compiling
20787See \`config.log' for more details" "$LINENO" 5; }
20788else
20789  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20790/* end confdefs.h.  */
20791$ac_includes_default
20792
20793int main(void) { return !(snprintf(NULL, 0, "test") == 4); }
20794
20795_ACEOF
20796if ac_fn_c_try_run "$LINENO"; then :
20797  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
20798$as_echo "yes" >&6; }
20799else
20800
20801		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20802$as_echo "no" >&6; }
20803
20804$as_echo "#define SNPRINTF_RET_BROKEN /**/" >>confdefs.h
20805
20806		case " $LIBOBJS " in
20807  *" snprintf.$ac_objext "* ) ;;
20808  *) LIBOBJS="$LIBOBJS snprintf.$ac_objext"
20809 ;;
20810esac
20811
20812
20813fi
20814rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20815  conftest.$ac_objext conftest.beam conftest.$ac_ext
20816fi
20817
20818    fi
20819fi
20820ac_fn_c_check_func "$LINENO" "strlcat" "ac_cv_func_strlcat"
20821if test "x$ac_cv_func_strlcat" = xyes; then :
20822  $as_echo "#define HAVE_STRLCAT 1" >>confdefs.h
20823
20824else
20825  case " $LIBOBJS " in
20826  *" strlcat.$ac_objext "* ) ;;
20827  *) LIBOBJS="$LIBOBJS strlcat.$ac_objext"
20828 ;;
20829esac
20830
20831fi
20832
20833
20834ac_fn_c_check_func "$LINENO" "strlcpy" "ac_cv_func_strlcpy"
20835if test "x$ac_cv_func_strlcpy" = xyes; then :
20836  $as_echo "#define HAVE_STRLCPY 1" >>confdefs.h
20837
20838else
20839  case " $LIBOBJS " in
20840  *" strlcpy.$ac_objext "* ) ;;
20841  *) LIBOBJS="$LIBOBJS strlcpy.$ac_objext"
20842 ;;
20843esac
20844
20845fi
20846
20847
20848ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove"
20849if test "x$ac_cv_func_memmove" = xyes; then :
20850  $as_echo "#define HAVE_MEMMOVE 1" >>confdefs.h
20851
20852else
20853  case " $LIBOBJS " in
20854  *" memmove.$ac_objext "* ) ;;
20855  *) LIBOBJS="$LIBOBJS memmove.$ac_objext"
20856 ;;
20857esac
20858
20859fi
20860
20861
20862ac_fn_c_check_func "$LINENO" "gmtime_r" "ac_cv_func_gmtime_r"
20863if test "x$ac_cv_func_gmtime_r" = xyes; then :
20864  $as_echo "#define HAVE_GMTIME_R 1" >>confdefs.h
20865
20866else
20867  case " $LIBOBJS " in
20868  *" gmtime_r.$ac_objext "* ) ;;
20869  *) LIBOBJS="$LIBOBJS gmtime_r.$ac_objext"
20870 ;;
20871esac
20872
20873fi
20874
20875
20876ac_fn_c_check_func "$LINENO" "isblank" "ac_cv_func_isblank"
20877if test "x$ac_cv_func_isblank" = xyes; then :
20878  $as_echo "#define HAVE_ISBLANK 1" >>confdefs.h
20879
20880else
20881  case " $LIBOBJS " in
20882  *" isblank.$ac_objext "* ) ;;
20883  *) LIBOBJS="$LIBOBJS isblank.$ac_objext"
20884 ;;
20885esac
20886
20887fi
20888
20889
20890ac_fn_c_check_func "$LINENO" "explicit_bzero" "ac_cv_func_explicit_bzero"
20891if test "x$ac_cv_func_explicit_bzero" = xyes; then :
20892  $as_echo "#define HAVE_EXPLICIT_BZERO 1" >>confdefs.h
20893
20894else
20895  case " $LIBOBJS " in
20896  *" explicit_bzero.$ac_objext "* ) ;;
20897  *) LIBOBJS="$LIBOBJS explicit_bzero.$ac_objext"
20898 ;;
20899esac
20900
20901fi
20902
20903
20904LIBOBJ_WITHOUT_CTIMEARC4="$LIBOBJS"
20905
20906{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for reallocarray" >&5
20907$as_echo_n "checking for reallocarray... " >&6; }
20908cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20909/* end confdefs.h.  */
20910$ac_includes_default
20911
20912#ifndef _OPENBSD_SOURCE
20913#define _OPENBSD_SOURCE 1
20914#endif
20915#include <stdlib.h>
20916int main(void) {
20917	void* p = reallocarray(NULL, 10, 100);
20918	free(p);
20919	return 0;
20920}
20921
20922_ACEOF
20923if ac_fn_c_try_link "$LINENO"; then :
20924  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
20925$as_echo "yes" >&6; }
20926
20927$as_echo "#define HAVE_REALLOCARRAY 1" >>confdefs.h
20928
20929
20930else
20931
20932	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20933$as_echo "no" >&6; }
20934	case " $LIBOBJS " in
20935  *" reallocarray.$ac_objext "* ) ;;
20936  *) LIBOBJS="$LIBOBJS reallocarray.$ac_objext"
20937 ;;
20938esac
20939
20940
20941fi
20942rm -f core conftest.err conftest.$ac_objext \
20943    conftest$ac_exeext conftest.$ac_ext
20944ac_fn_c_check_decl "$LINENO" "reallocarray" "ac_cv_have_decl_reallocarray" "$ac_includes_default"
20945if test "x$ac_cv_have_decl_reallocarray" = xyes; then :
20946  ac_have_decl=1
20947else
20948  ac_have_decl=0
20949fi
20950
20951cat >>confdefs.h <<_ACEOF
20952#define HAVE_DECL_REALLOCARRAY $ac_have_decl
20953_ACEOF
20954
20955if test "$USE_NSS" = "no"; then
20956	ac_fn_c_check_func "$LINENO" "arc4random" "ac_cv_func_arc4random"
20957if test "x$ac_cv_func_arc4random" = xyes; then :
20958  $as_echo "#define HAVE_ARC4RANDOM 1" >>confdefs.h
20959
20960else
20961  case " $LIBOBJS " in
20962  *" arc4random.$ac_objext "* ) ;;
20963  *) LIBOBJS="$LIBOBJS arc4random.$ac_objext"
20964 ;;
20965esac
20966
20967fi
20968
20969
20970	ac_fn_c_check_func "$LINENO" "arc4random_uniform" "ac_cv_func_arc4random_uniform"
20971if test "x$ac_cv_func_arc4random_uniform" = xyes; then :
20972  $as_echo "#define HAVE_ARC4RANDOM_UNIFORM 1" >>confdefs.h
20973
20974else
20975  case " $LIBOBJS " in
20976  *" arc4random_uniform.$ac_objext "* ) ;;
20977  *) LIBOBJS="$LIBOBJS arc4random_uniform.$ac_objext"
20978 ;;
20979esac
20980
20981fi
20982
20983
20984	if test "$ac_cv_func_arc4random" = "no"; then
20985		case " $LIBOBJS " in
20986  *" arc4_lock.$ac_objext "* ) ;;
20987  *) LIBOBJS="$LIBOBJS arc4_lock.$ac_objext"
20988 ;;
20989esac
20990
20991		for ac_func in getentropy
20992do :
20993  ac_fn_c_check_func "$LINENO" "getentropy" "ac_cv_func_getentropy"
20994if test "x$ac_cv_func_getentropy" = xyes; then :
20995  cat >>confdefs.h <<_ACEOF
20996#define HAVE_GETENTROPY 1
20997_ACEOF
20998
20999else
21000
21001		    if test "$USE_WINSOCK" = 1; then
21002			case " $LIBOBJS " in
21003  *" getentropy_win.$ac_objext "* ) ;;
21004  *) LIBOBJS="$LIBOBJS getentropy_win.$ac_objext"
21005 ;;
21006esac
21007
21008		    else
21009			case "$host" in
21010			Darwin|*darwin*)
21011				case " $LIBOBJS " in
21012  *" getentropy_osx.$ac_objext "* ) ;;
21013  *) LIBOBJS="$LIBOBJS getentropy_osx.$ac_objext"
21014 ;;
21015esac
21016
21017			;;
21018			*solaris*|*sunos*|SunOS)
21019				case " $LIBOBJS " in
21020  *" getentropy_solaris.$ac_objext "* ) ;;
21021  *) LIBOBJS="$LIBOBJS getentropy_solaris.$ac_objext"
21022 ;;
21023esac
21024
21025				for ac_header in sys/sha2.h
21026do :
21027  ac_fn_c_check_header_compile "$LINENO" "sys/sha2.h" "ac_cv_header_sys_sha2_h" "$ac_includes_default
21028"
21029if test "x$ac_cv_header_sys_sha2_h" = xyes; then :
21030  cat >>confdefs.h <<_ACEOF
21031#define HAVE_SYS_SHA2_H 1
21032_ACEOF
21033
21034else
21035
21036					for ac_func in SHA512_Update
21037do :
21038  ac_fn_c_check_func "$LINENO" "SHA512_Update" "ac_cv_func_SHA512_Update"
21039if test "x$ac_cv_func_SHA512_Update" = xyes; then :
21040  cat >>confdefs.h <<_ACEOF
21041#define HAVE_SHA512_UPDATE 1
21042_ACEOF
21043
21044else
21045
21046						case " $LIBOBJS " in
21047  *" sha512.$ac_objext "* ) ;;
21048  *) LIBOBJS="$LIBOBJS sha512.$ac_objext"
21049 ;;
21050esac
21051
21052
21053fi
21054done
21055
21056
21057fi
21058
21059done
21060
21061				if test "$ac_cv_header_sys_sha2_h" = "yes"; then
21062					# this lib needed for sha2 on solaris
21063					LIBS="$LIBS -lmd"
21064				fi
21065				{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5
21066$as_echo_n "checking for library containing clock_gettime... " >&6; }
21067if ${ac_cv_search_clock_gettime+:} false; then :
21068  $as_echo_n "(cached) " >&6
21069else
21070  ac_func_search_save_LIBS=$LIBS
21071cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21072/* end confdefs.h.  */
21073
21074/* Override any GCC internal prototype to avoid an error.
21075   Use char because int might match the return type of a GCC
21076   builtin and then its argument prototype would still apply.  */
21077#ifdef __cplusplus
21078extern "C"
21079#endif
21080char clock_gettime ();
21081int
21082main ()
21083{
21084return clock_gettime ();
21085  ;
21086  return 0;
21087}
21088_ACEOF
21089for ac_lib in '' rt; do
21090  if test -z "$ac_lib"; then
21091    ac_res="none required"
21092  else
21093    ac_res=-l$ac_lib
21094    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
21095  fi
21096  if ac_fn_c_try_link "$LINENO"; then :
21097  ac_cv_search_clock_gettime=$ac_res
21098fi
21099rm -f core conftest.err conftest.$ac_objext \
21100    conftest$ac_exeext
21101  if ${ac_cv_search_clock_gettime+:} false; then :
21102  break
21103fi
21104done
21105if ${ac_cv_search_clock_gettime+:} false; then :
21106
21107else
21108  ac_cv_search_clock_gettime=no
21109fi
21110rm conftest.$ac_ext
21111LIBS=$ac_func_search_save_LIBS
21112fi
21113{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5
21114$as_echo "$ac_cv_search_clock_gettime" >&6; }
21115ac_res=$ac_cv_search_clock_gettime
21116if test "$ac_res" != no; then :
21117  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
21118
21119fi
21120
21121			;;
21122			*freebsd*|*FreeBSD)
21123				case " $LIBOBJS " in
21124  *" getentropy_freebsd.$ac_objext "* ) ;;
21125  *) LIBOBJS="$LIBOBJS getentropy_freebsd.$ac_objext"
21126 ;;
21127esac
21128
21129			;;
21130			*linux*|Linux|*)
21131				case " $LIBOBJS " in
21132  *" getentropy_linux.$ac_objext "* ) ;;
21133  *) LIBOBJS="$LIBOBJS getentropy_linux.$ac_objext"
21134 ;;
21135esac
21136
21137				for ac_func in SHA512_Update
21138do :
21139  ac_fn_c_check_func "$LINENO" "SHA512_Update" "ac_cv_func_SHA512_Update"
21140if test "x$ac_cv_func_SHA512_Update" = xyes; then :
21141  cat >>confdefs.h <<_ACEOF
21142#define HAVE_SHA512_UPDATE 1
21143_ACEOF
21144
21145else
21146
21147
21148$as_echo "#define COMPAT_SHA512 1" >>confdefs.h
21149
21150					case " $LIBOBJS " in
21151  *" sha512.$ac_objext "* ) ;;
21152  *) LIBOBJS="$LIBOBJS sha512.$ac_objext"
21153 ;;
21154esac
21155
21156
21157fi
21158done
21159
21160				for ac_header in sys/sysctl.h
21161do :
21162  ac_fn_c_check_header_compile "$LINENO" "sys/sysctl.h" "ac_cv_header_sys_sysctl_h" "$ac_includes_default
21163"
21164if test "x$ac_cv_header_sys_sysctl_h" = xyes; then :
21165  cat >>confdefs.h <<_ACEOF
21166#define HAVE_SYS_SYSCTL_H 1
21167_ACEOF
21168
21169fi
21170
21171done
21172
21173				for ac_func in getauxval
21174do :
21175  ac_fn_c_check_func "$LINENO" "getauxval" "ac_cv_func_getauxval"
21176if test "x$ac_cv_func_getauxval" = xyes; then :
21177  cat >>confdefs.h <<_ACEOF
21178#define HAVE_GETAUXVAL 1
21179_ACEOF
21180
21181fi
21182done
21183
21184				{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5
21185$as_echo_n "checking for library containing clock_gettime... " >&6; }
21186if ${ac_cv_search_clock_gettime+:} false; then :
21187  $as_echo_n "(cached) " >&6
21188else
21189  ac_func_search_save_LIBS=$LIBS
21190cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21191/* end confdefs.h.  */
21192
21193/* Override any GCC internal prototype to avoid an error.
21194   Use char because int might match the return type of a GCC
21195   builtin and then its argument prototype would still apply.  */
21196#ifdef __cplusplus
21197extern "C"
21198#endif
21199char clock_gettime ();
21200int
21201main ()
21202{
21203return clock_gettime ();
21204  ;
21205  return 0;
21206}
21207_ACEOF
21208for ac_lib in '' rt; do
21209  if test -z "$ac_lib"; then
21210    ac_res="none required"
21211  else
21212    ac_res=-l$ac_lib
21213    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
21214  fi
21215  if ac_fn_c_try_link "$LINENO"; then :
21216  ac_cv_search_clock_gettime=$ac_res
21217fi
21218rm -f core conftest.err conftest.$ac_objext \
21219    conftest$ac_exeext
21220  if ${ac_cv_search_clock_gettime+:} false; then :
21221  break
21222fi
21223done
21224if ${ac_cv_search_clock_gettime+:} false; then :
21225
21226else
21227  ac_cv_search_clock_gettime=no
21228fi
21229rm conftest.$ac_ext
21230LIBS=$ac_func_search_save_LIBS
21231fi
21232{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5
21233$as_echo "$ac_cv_search_clock_gettime" >&6; }
21234ac_res=$ac_cv_search_clock_gettime
21235if test "$ac_res" != no; then :
21236  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
21237
21238fi
21239
21240			;;
21241			esac
21242		    fi
21243
21244fi
21245done
21246
21247	fi
21248fi
21249LIBOBJ_WITHOUT_CTIME="$LIBOBJS"
21250
21251ac_fn_c_check_func "$LINENO" "ctime_r" "ac_cv_func_ctime_r"
21252if test "x$ac_cv_func_ctime_r" = xyes; then :
21253  $as_echo "#define HAVE_CTIME_R 1" >>confdefs.h
21254
21255else
21256  case " $LIBOBJS " in
21257  *" ctime_r.$ac_objext "* ) ;;
21258  *) LIBOBJS="$LIBOBJS ctime_r.$ac_objext"
21259 ;;
21260esac
21261
21262fi
21263
21264
21265ac_fn_c_check_func "$LINENO" "strsep" "ac_cv_func_strsep"
21266if test "x$ac_cv_func_strsep" = xyes; then :
21267  $as_echo "#define HAVE_STRSEP 1" >>confdefs.h
21268
21269else
21270  case " $LIBOBJS " in
21271  *" strsep.$ac_objext "* ) ;;
21272  *) LIBOBJS="$LIBOBJS strsep.$ac_objext"
21273 ;;
21274esac
21275
21276fi
21277
21278
21279
21280# Check whether --enable-allsymbols was given.
21281if test "${enable_allsymbols+set}" = set; then :
21282  enableval=$enable_allsymbols;
21283fi
21284
21285case "$enable_allsymbols" in
21286	yes)
21287	COMMON_OBJ_ALL_SYMBOLS=""
21288	UBSYMS=""
21289	EXTRALINK="libunbound.la"
21290
21291$as_echo "#define EXPORT_ALL_SYMBOLS 1" >>confdefs.h
21292
21293	;;
21294	no|*)
21295	COMMON_OBJ_ALL_SYMBOLS='$(COMMON_OBJ)'
21296	UBSYMS='-export-symbols $(srcdir)/libunbound/ubsyms.def'
21297	EXTRALINK=""
21298	;;
21299esac
21300
21301
21302
21303if test x_$enable_lock_checks = x_yes; then
21304	UBSYMS="-export-symbols clubsyms.def"
21305	cp ${srcdir}/libunbound/ubsyms.def clubsyms.def
21306	echo lock_protect >> clubsyms.def
21307	echo lock_unprotect >> clubsyms.def
21308	echo lock_get_mem >> clubsyms.def
21309	echo checklock_start >> clubsyms.def
21310	echo checklock_stop >> clubsyms.def
21311	echo checklock_lock >> clubsyms.def
21312	echo checklock_unlock >> clubsyms.def
21313	echo checklock_init >> clubsyms.def
21314	echo checklock_thrcreate >> clubsyms.def
21315	echo checklock_thrjoin >> clubsyms.def
21316fi
21317
21318# check for dnstap if requested
21319
21320  # Check whether --enable-dnstap was given.
21321if test "${enable_dnstap+set}" = set; then :
21322  enableval=$enable_dnstap; opt_dnstap=$enableval
21323else
21324  opt_dnstap=no
21325fi
21326
21327
21328
21329# Check whether --with-dnstap-socket-path was given.
21330if test "${with_dnstap_socket_path+set}" = set; then :
21331  withval=$with_dnstap_socket_path; opt_dnstap_socket_path=$withval
21332else
21333  opt_dnstap_socket_path="$UNBOUND_RUN_DIR/dnstap.sock"
21334fi
21335
21336
21337  if test "x$opt_dnstap" != "xno"; then
21338    # Extract the first word of "protoc-c", so it can be a program name with args.
21339set dummy protoc-c; ac_word=$2
21340{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21341$as_echo_n "checking for $ac_word... " >&6; }
21342if ${ac_cv_path_PROTOC_C+:} false; then :
21343  $as_echo_n "(cached) " >&6
21344else
21345  case $PROTOC_C in
21346  [\\/]* | ?:[\\/]*)
21347  ac_cv_path_PROTOC_C="$PROTOC_C" # Let the user override the test with a path.
21348  ;;
21349  *)
21350  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21351for as_dir in $PATH
21352do
21353  IFS=$as_save_IFS
21354  test -z "$as_dir" && as_dir=.
21355    for ac_exec_ext in '' $ac_executable_extensions; do
21356  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21357    ac_cv_path_PROTOC_C="$as_dir/$ac_word$ac_exec_ext"
21358    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21359    break 2
21360  fi
21361done
21362  done
21363IFS=$as_save_IFS
21364
21365  ;;
21366esac
21367fi
21368PROTOC_C=$ac_cv_path_PROTOC_C
21369if test -n "$PROTOC_C"; then
21370  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROTOC_C" >&5
21371$as_echo "$PROTOC_C" >&6; }
21372else
21373  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21374$as_echo "no" >&6; }
21375fi
21376
21377
21378    if test -z "$PROTOC_C"; then
21379      as_fn_error $? "The protoc-c program was not found. Please install protobuf-c!" "$LINENO" 5
21380    fi
21381
21382# Check whether --with-protobuf-c was given.
21383if test "${with_protobuf_c+set}" = set; then :
21384  withval=$with_protobuf_c;
21385	  # workaround for protobuf-c includes at old dir before protobuf-c-1.0.0
21386	  if test -f $withval/include/google/protobuf-c/protobuf-c.h; then
21387	    CFLAGS="$CFLAGS -I$withval/include/google"
21388	  else
21389	    CFLAGS="$CFLAGS -I$withval/include"
21390	  fi
21391	  LDFLAGS="$LDFLAGS -L$withval/lib"
21392
21393else
21394
21395	  # workaround for protobuf-c includes at old dir before protobuf-c-1.0.0
21396	  if test -f /usr/include/google/protobuf-c/protobuf-c.h; then
21397	    CFLAGS="$CFLAGS -I/usr/include/google"
21398	  else
21399	    if test -f /usr/local/include/google/protobuf-c/protobuf-c.h; then
21400	      CFLAGS="$CFLAGS -I/usr/local/include/google"
21401	      LDFLAGS="$LDFLAGS -L/usr/local/lib"
21402	    fi
21403	  fi
21404
21405fi
21406
21407    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing protobuf_c_message_pack" >&5
21408$as_echo_n "checking for library containing protobuf_c_message_pack... " >&6; }
21409if ${ac_cv_search_protobuf_c_message_pack+:} false; then :
21410  $as_echo_n "(cached) " >&6
21411else
21412  ac_func_search_save_LIBS=$LIBS
21413cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21414/* end confdefs.h.  */
21415
21416/* Override any GCC internal prototype to avoid an error.
21417   Use char because int might match the return type of a GCC
21418   builtin and then its argument prototype would still apply.  */
21419#ifdef __cplusplus
21420extern "C"
21421#endif
21422char protobuf_c_message_pack ();
21423int
21424main ()
21425{
21426return protobuf_c_message_pack ();
21427  ;
21428  return 0;
21429}
21430_ACEOF
21431for ac_lib in '' protobuf-c; do
21432  if test -z "$ac_lib"; then
21433    ac_res="none required"
21434  else
21435    ac_res=-l$ac_lib
21436    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
21437  fi
21438  if ac_fn_c_try_link "$LINENO"; then :
21439  ac_cv_search_protobuf_c_message_pack=$ac_res
21440fi
21441rm -f core conftest.err conftest.$ac_objext \
21442    conftest$ac_exeext
21443  if ${ac_cv_search_protobuf_c_message_pack+:} false; then :
21444  break
21445fi
21446done
21447if ${ac_cv_search_protobuf_c_message_pack+:} false; then :
21448
21449else
21450  ac_cv_search_protobuf_c_message_pack=no
21451fi
21452rm conftest.$ac_ext
21453LIBS=$ac_func_search_save_LIBS
21454fi
21455{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_protobuf_c_message_pack" >&5
21456$as_echo "$ac_cv_search_protobuf_c_message_pack" >&6; }
21457ac_res=$ac_cv_search_protobuf_c_message_pack
21458if test "$ac_res" != no; then :
21459  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
21460
21461else
21462  as_fn_error $? "The protobuf-c library was not found. Please install protobuf-c!" "$LINENO" 5
21463fi
21464
21465
21466
21467$as_echo "#define USE_DNSTAP 1" >>confdefs.h
21468
21469        ENABLE_DNSTAP=1
21470
21471
21472
21473        hdr_dnstap_socket_path="`echo $opt_dnstap_socket_path | sed -e 's/\\\\/\\\\\\\\/g'`"
21474
21475
21476cat >>confdefs.h <<_ACEOF
21477#define DNSTAP_SOCKET_PATH "$hdr_dnstap_socket_path"
21478_ACEOF
21479
21480	DNSTAP_SOCKET_PATH="$hdr_dnstap_socket_path"
21481
21482	DNSTAP_SOCKET_TESTBIN='unbound-dnstap-socket$(EXEEXT)'
21483
21484        DNSTAP_SRC="dnstap/dnstap.c dnstap/dnstap.pb-c.c dnstap/dnstap_fstrm.c dnstap/dtstream.c"
21485
21486        DNSTAP_OBJ="dnstap.lo dnstap.pb-c.lo dnstap_fstrm.lo dtstream.lo"
21487
21488
21489  else
21490
21491        ENABLE_DNSTAP=0
21492
21493
21494
21495  fi
21496
21497
21498# check for dnscrypt if requested
21499
21500  # Check whether --enable-dnscrypt was given.
21501if test "${enable_dnscrypt+set}" = set; then :
21502  enableval=$enable_dnscrypt; opt_dnscrypt=$enableval
21503else
21504  opt_dnscrypt=no
21505fi
21506
21507
21508  if test "x$opt_dnscrypt" != "xno"; then
21509
21510# Check whether --with-libsodium was given.
21511if test "${with_libsodium+set}" = set; then :
21512  withval=$with_libsodium;
21513	CFLAGS="$CFLAGS -I$withval/include"
21514	LDFLAGS="$LDFLAGS -L$withval/lib"
21515
21516fi
21517
21518    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sodium_init" >&5
21519$as_echo_n "checking for library containing sodium_init... " >&6; }
21520if ${ac_cv_search_sodium_init+:} false; then :
21521  $as_echo_n "(cached) " >&6
21522else
21523  ac_func_search_save_LIBS=$LIBS
21524cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21525/* end confdefs.h.  */
21526
21527/* Override any GCC internal prototype to avoid an error.
21528   Use char because int might match the return type of a GCC
21529   builtin and then its argument prototype would still apply.  */
21530#ifdef __cplusplus
21531extern "C"
21532#endif
21533char sodium_init ();
21534int
21535main ()
21536{
21537return sodium_init ();
21538  ;
21539  return 0;
21540}
21541_ACEOF
21542for ac_lib in '' sodium; do
21543  if test -z "$ac_lib"; then
21544    ac_res="none required"
21545  else
21546    ac_res=-l$ac_lib
21547    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
21548  fi
21549  if ac_fn_c_try_link "$LINENO"; then :
21550  ac_cv_search_sodium_init=$ac_res
21551fi
21552rm -f core conftest.err conftest.$ac_objext \
21553    conftest$ac_exeext
21554  if ${ac_cv_search_sodium_init+:} false; then :
21555  break
21556fi
21557done
21558if ${ac_cv_search_sodium_init+:} false; then :
21559
21560else
21561  ac_cv_search_sodium_init=no
21562fi
21563rm conftest.$ac_ext
21564LIBS=$ac_func_search_save_LIBS
21565fi
21566{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sodium_init" >&5
21567$as_echo "$ac_cv_search_sodium_init" >&6; }
21568ac_res=$ac_cv_search_sodium_init
21569if test "$ac_res" != no; then :
21570  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
21571
21572else
21573  as_fn_error $? "The sodium library was not found. Please install sodium!" "$LINENO" 5
21574fi
21575
21576    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing crypto_box_curve25519xchacha20poly1305_beforenm" >&5
21577$as_echo_n "checking for library containing crypto_box_curve25519xchacha20poly1305_beforenm... " >&6; }
21578if ${ac_cv_search_crypto_box_curve25519xchacha20poly1305_beforenm+:} false; then :
21579  $as_echo_n "(cached) " >&6
21580else
21581  ac_func_search_save_LIBS=$LIBS
21582cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21583/* end confdefs.h.  */
21584
21585/* Override any GCC internal prototype to avoid an error.
21586   Use char because int might match the return type of a GCC
21587   builtin and then its argument prototype would still apply.  */
21588#ifdef __cplusplus
21589extern "C"
21590#endif
21591char crypto_box_curve25519xchacha20poly1305_beforenm ();
21592int
21593main ()
21594{
21595return crypto_box_curve25519xchacha20poly1305_beforenm ();
21596  ;
21597  return 0;
21598}
21599_ACEOF
21600for ac_lib in '' sodium; do
21601  if test -z "$ac_lib"; then
21602    ac_res="none required"
21603  else
21604    ac_res=-l$ac_lib
21605    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
21606  fi
21607  if ac_fn_c_try_link "$LINENO"; then :
21608  ac_cv_search_crypto_box_curve25519xchacha20poly1305_beforenm=$ac_res
21609fi
21610rm -f core conftest.err conftest.$ac_objext \
21611    conftest$ac_exeext
21612  if ${ac_cv_search_crypto_box_curve25519xchacha20poly1305_beforenm+:} false; then :
21613  break
21614fi
21615done
21616if ${ac_cv_search_crypto_box_curve25519xchacha20poly1305_beforenm+:} false; then :
21617
21618else
21619  ac_cv_search_crypto_box_curve25519xchacha20poly1305_beforenm=no
21620fi
21621rm conftest.$ac_ext
21622LIBS=$ac_func_search_save_LIBS
21623fi
21624{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_crypto_box_curve25519xchacha20poly1305_beforenm" >&5
21625$as_echo "$ac_cv_search_crypto_box_curve25519xchacha20poly1305_beforenm" >&6; }
21626ac_res=$ac_cv_search_crypto_box_curve25519xchacha20poly1305_beforenm
21627if test "$ac_res" != no; then :
21628  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
21629
21630            ENABLE_DNSCRYPT_XCHACHA20=1
21631
21632
21633$as_echo "#define USE_DNSCRYPT_XCHACHA20 1" >>confdefs.h
21634
21635
21636else
21637
21638            ENABLE_DNSCRYPT_XCHACHA20=0
21639
21640
21641fi
21642
21643    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sodium_set_misuse_handler" >&5
21644$as_echo_n "checking for library containing sodium_set_misuse_handler... " >&6; }
21645if ${ac_cv_search_sodium_set_misuse_handler+:} false; then :
21646  $as_echo_n "(cached) " >&6
21647else
21648  ac_func_search_save_LIBS=$LIBS
21649cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21650/* end confdefs.h.  */
21651
21652/* Override any GCC internal prototype to avoid an error.
21653   Use char because int might match the return type of a GCC
21654   builtin and then its argument prototype would still apply.  */
21655#ifdef __cplusplus
21656extern "C"
21657#endif
21658char sodium_set_misuse_handler ();
21659int
21660main ()
21661{
21662return sodium_set_misuse_handler ();
21663  ;
21664  return 0;
21665}
21666_ACEOF
21667for ac_lib in '' sodium; do
21668  if test -z "$ac_lib"; then
21669    ac_res="none required"
21670  else
21671    ac_res=-l$ac_lib
21672    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
21673  fi
21674  if ac_fn_c_try_link "$LINENO"; then :
21675  ac_cv_search_sodium_set_misuse_handler=$ac_res
21676fi
21677rm -f core conftest.err conftest.$ac_objext \
21678    conftest$ac_exeext
21679  if ${ac_cv_search_sodium_set_misuse_handler+:} false; then :
21680  break
21681fi
21682done
21683if ${ac_cv_search_sodium_set_misuse_handler+:} false; then :
21684
21685else
21686  ac_cv_search_sodium_set_misuse_handler=no
21687fi
21688rm conftest.$ac_ext
21689LIBS=$ac_func_search_save_LIBS
21690fi
21691{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sodium_set_misuse_handler" >&5
21692$as_echo "$ac_cv_search_sodium_set_misuse_handler" >&6; }
21693ac_res=$ac_cv_search_sodium_set_misuse_handler
21694if test "$ac_res" != no; then :
21695  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
21696
21697
21698$as_echo "#define SODIUM_MISUSE_HANDLER 1" >>confdefs.h
21699
21700
21701fi
21702
21703
21704
21705$as_echo "#define USE_DNSCRYPT 1" >>confdefs.h
21706
21707        ENABLE_DNSCRYPT=1
21708
21709
21710        DNSCRYPT_SRC="dnscrypt/dnscrypt.c"
21711
21712        DNSCRYPT_OBJ="dnscrypt.lo"
21713
21714
21715  else
21716    ENABLE_DNSCRYPT_XCHACHA20=0
21717
21718
21719        ENABLE_DNSCRYPT=0
21720
21721
21722
21723  fi
21724
21725
21726# check for cachedb if requested
21727# Check whether --enable-cachedb was given.
21728if test "${enable_cachedb+set}" = set; then :
21729  enableval=$enable_cachedb;
21730fi
21731
21732# turn on cachedb when hiredis support is enabled.
21733if test "$found_libhiredis" = "yes"; then enable_cachedb="yes"; fi
21734case "$enable_cachedb" in
21735    yes)
21736
21737$as_echo "#define USE_CACHEDB 1" >>confdefs.h
21738
21739	CACHEDB_SRC="cachedb/cachedb.c cachedb/redis.c"
21740
21741	CACHEDB_OBJ="cachedb.lo redis.lo"
21742
21743    	;;
21744    no|*)
21745    	# nothing
21746    	;;
21747esac
21748
21749# check for ipsecmod if requested
21750# Check whether --enable-ipsecmod was given.
21751if test "${enable_ipsecmod+set}" = set; then :
21752  enableval=$enable_ipsecmod;
21753fi
21754
21755case "$enable_ipsecmod" in
21756	yes)
21757
21758$as_echo "#define USE_IPSECMOD 1" >>confdefs.h
21759
21760		IPSECMOD_OBJ="ipsecmod.lo ipsecmod-whitelist.lo"
21761
21762		IPSECMOD_HEADER='$(srcdir)/ipsecmod/ipsecmod.h $(srcdir)/ipsecmod/ipsecmod-whitelist.h'
21763
21764		;;
21765	no|*)
21766		# nothing
21767		;;
21768esac
21769
21770# check for ipset if requested
21771# Check whether --enable-ipset was given.
21772if test "${enable_ipset+set}" = set; then :
21773  enableval=$enable_ipset;
21774fi
21775
21776case "$enable_ipset" in
21777    yes)
21778
21779$as_echo "#define USE_IPSET 1" >>confdefs.h
21780
21781		IPSET_SRC="ipset/ipset.c"
21782
21783		IPSET_OBJ="ipset.lo"
21784
21785
21786		# mnl
21787
21788# Check whether --with-libmnl was given.
21789if test "${with_libmnl+set}" = set; then :
21790  withval=$with_libmnl;
21791else
21792   withval="yes"
21793fi
21794
21795		found_libmnl="no"
21796		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for libmnl" >&5
21797$as_echo_n "checking for libmnl... " >&6; }
21798		if test x_$withval = x_ -o x_$withval = x_yes; then
21799			withval="/usr/local /opt/local /usr/lib /usr/pkg /usr/sfw /usr"
21800		fi
21801		for dir in $withval ; do
21802			if test -f "$dir/include/libmnl/libmnl.h" -o -f "$dir/include/libmnl/libmnl/libmnl.h"; then
21803				found_libmnl="yes"
21804								extralibmnl=""
21805				if test -f "$dir/include/libmnl/libmnl/libmnl.h"; then
21806					extralibmnl="/libmnl"
21807				fi
21808				if test "$dir" != "/usr" -o -n "$extralibmnl"; then
21809					CPPFLAGS="$CPPFLAGS -I$dir/include$extralibmnl"
21810				fi
21811				if test "$dir" != "/usr"; then
21812					LDFLAGS="$LDFLAGS -L$dir/lib"
21813				fi
21814				{ $as_echo "$as_me:${as_lineno-$LINENO}: result: found in $dir" >&5
21815$as_echo "found in $dir" >&6; }
21816				LIBS="$LIBS -lmnl"
21817				break;
21818			fi
21819		done
21820		if test x_$found_libmnl != x_yes; then
21821			as_fn_error $? "Could not find libmnl, libmnl.h" "$LINENO" 5
21822		fi
21823		;;
21824    no|*)
21825    	# nothing
21826		;;
21827esac
21828# Check whether --enable-explicit-port-randomisation was given.
21829if test "${enable_explicit_port_randomisation+set}" = set; then :
21830  enableval=$enable_explicit_port_randomisation;
21831fi
21832
21833case "$enable_explicit_port_randomisation" in
21834	no)
21835
21836$as_echo "#define DISABLE_EXPLICIT_PORT_RANDOMISATION 1" >>confdefs.h
21837
21838		;;
21839	yes|*)
21840		;;
21841esac
21842
21843if echo "$host" | $GREP -i -e linux >/dev/null; then
21844	# Check whether --enable-linux-ip-local-port-range was given.
21845if test "${enable_linux_ip_local_port_range+set}" = set; then :
21846  enableval=$enable_linux_ip_local_port_range;
21847fi
21848
21849	case "$enable_linux_ip_local_port_range" in
21850		yes)
21851
21852$as_echo "#define USE_LINUX_IP_LOCAL_PORT_RANGE 1" >>confdefs.h
21853
21854			;;
21855		no|*)
21856			;;
21857	esac
21858fi
21859
21860
21861{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if ${MAKE:-make} supports $< with implicit rule in scope" >&5
21862$as_echo_n "checking if ${MAKE:-make} supports $< with implicit rule in scope... " >&6; }
21863# on openBSD, the implicit rule make $< work.
21864# on Solaris, it does not work ($? is changed sources, $^ lists dependencies).
21865# gmake works.
21866cat >conftest.make <<EOF
21867all:	conftest.lo
21868
21869conftest.lo foo.lo bla.lo:
21870	if test -f "\$<"; then touch \$@; fi
21871
21872.SUFFIXES: .lo
21873.c.lo:
21874	if test -f "\$<"; then touch \$@; fi
21875
21876conftest.lo:        conftest.dir/conftest.c
21877EOF
21878mkdir conftest.dir
21879touch conftest.dir/conftest.c
21880rm -f conftest.lo conftest.c
21881${MAKE:-make} -f conftest.make >/dev/null
21882rm -f conftest.make conftest.c conftest.dir/conftest.c
21883rm -rf conftest.dir
21884if test ! -f conftest.lo; then
21885	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21886$as_echo "no" >&6; }
21887	SOURCEDETERMINE='echo "$^" | awk "-F " "{print \$$1;}" > .source'
21888	SOURCEFILE='`cat .source`'
21889else
21890	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
21891$as_echo "yes" >&6; }
21892	SOURCEDETERMINE=':'
21893	SOURCEFILE='$<'
21894fi
21895rm -f conftest.lo
21896
21897
21898
21899# see if we want to build the library or everything
21900ALLTARGET="alltargets"
21901INSTALLTARGET="install-all"
21902
21903# Check whether --with-libunbound-only was given.
21904if test "${with_libunbound_only+set}" = set; then :
21905  withval=$with_libunbound_only;
21906	if test "$withval" = "yes"; then
21907		ALLTARGET="lib"
21908		INSTALLTARGET="install-lib"
21909	fi
21910
21911fi
21912
21913if test $ALLTARGET = "alltargets"; then
21914	if test $USE_NSS = "yes"; then
21915		as_fn_error $? "--with-nss can only be used in combination with --with-libunbound-only." "$LINENO" 5
21916	fi
21917	if test $USE_NETTLE = "yes"; then
21918		as_fn_error $? "--with-nettle can only be used in combination with --with-libunbound-only." "$LINENO" 5
21919	fi
21920fi
21921
21922
21923
21924
21925
21926  { $as_echo "$as_me:${as_lineno-$LINENO}: Stripping extension flags..." >&5
21927$as_echo "$as_me: Stripping extension flags..." >&6;}
21928
21929  if echo $CFLAGS | grep " -D_GNU_SOURCE" >/dev/null 2>&1; then
21930    CFLAGS="`echo $CFLAGS | sed -e 's/ -D_GNU_SOURCE//g'`"
21931
21932$as_echo "#define OMITTED__D_GNU_SOURCE 1" >>confdefs.h
21933
21934  fi
21935
21936
21937  if echo $CFLAGS | grep " -D_BSD_SOURCE" >/dev/null 2>&1; then
21938    CFLAGS="`echo $CFLAGS | sed -e 's/ -D_BSD_SOURCE//g'`"
21939
21940$as_echo "#define OMITTED__D_BSD_SOURCE 1" >>confdefs.h
21941
21942  fi
21943
21944
21945  if echo $CFLAGS | grep " -D_DEFAULT_SOURCE" >/dev/null 2>&1; then
21946    CFLAGS="`echo $CFLAGS | sed -e 's/ -D_DEFAULT_SOURCE//g'`"
21947
21948$as_echo "#define OMITTED__D_DEFAULT_SOURCE 1" >>confdefs.h
21949
21950  fi
21951
21952
21953  if echo $CFLAGS | grep " -D__EXTENSIONS__" >/dev/null 2>&1; then
21954    CFLAGS="`echo $CFLAGS | sed -e 's/ -D__EXTENSIONS__//g'`"
21955
21956$as_echo "#define OMITTED__D__EXTENSIONS__ 1" >>confdefs.h
21957
21958  fi
21959
21960
21961  if echo $CFLAGS | grep " -D_POSIX_C_SOURCE=200112" >/dev/null 2>&1; then
21962    CFLAGS="`echo $CFLAGS | sed -e 's/ -D_POSIX_C_SOURCE=200112//g'`"
21963
21964$as_echo "#define OMITTED__D_POSIX_C_SOURCE_200112 1" >>confdefs.h
21965
21966  fi
21967
21968
21969  if echo $CFLAGS | grep " -D_XOPEN_SOURCE=600" >/dev/null 2>&1; then
21970    CFLAGS="`echo $CFLAGS | sed -e 's/ -D_XOPEN_SOURCE=600//g'`"
21971
21972$as_echo "#define OMITTED__D_XOPEN_SOURCE_600 1" >>confdefs.h
21973
21974  fi
21975
21976
21977  if echo $CFLAGS | grep " -D_XOPEN_SOURCE_EXTENDED=1" >/dev/null 2>&1; then
21978    CFLAGS="`echo $CFLAGS | sed -e 's/ -D_XOPEN_SOURCE_EXTENDED=1//g'`"
21979
21980$as_echo "#define OMITTED__D_XOPEN_SOURCE_EXTENDED_1 1" >>confdefs.h
21981
21982  fi
21983
21984
21985  if echo $CFLAGS | grep " -D_ALL_SOURCE" >/dev/null 2>&1; then
21986    CFLAGS="`echo $CFLAGS | sed -e 's/ -D_ALL_SOURCE//g'`"
21987
21988$as_echo "#define OMITTED__D_ALL_SOURCE 1" >>confdefs.h
21989
21990  fi
21991
21992
21993  if echo $CFLAGS | grep " -D_LARGEFILE_SOURCE=1" >/dev/null 2>&1; then
21994    CFLAGS="`echo $CFLAGS | sed -e 's/ -D_LARGEFILE_SOURCE=1//g'`"
21995
21996$as_echo "#define OMITTED__D_LARGEFILE_SOURCE_1 1" >>confdefs.h
21997
21998  fi
21999
22000
22001if test -n "$LATE_LDFLAGS"; then
22002  LDFLAGS="$LATE_LDFLAGS $LDFLAGS"
22003fi
22004# remove start spaces
22005LDFLAGS=`echo "$LDFLAGS"|sed -e 's/^ *//'`
22006LIBS=`echo "$LIBS"|sed -e 's/^ *//'`
22007
22008
22009cat >>confdefs.h <<_ACEOF
22010#define MAXSYSLOGMSGLEN 10240
22011_ACEOF
22012
22013
22014
22015
22016version=1.16.1
22017
22018date=`date +'%b %e, %Y'`
22019
22020
22021ac_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"
22022
22023ac_config_headers="$ac_config_headers config.h"
22024
22025cat >confcache <<\_ACEOF
22026# This file is a shell script that caches the results of configure
22027# tests run on this system so they can be shared between configure
22028# scripts and configure runs, see configure's option --config-cache.
22029# It is not useful on other systems.  If it contains results you don't
22030# want to keep, you may remove or edit it.
22031#
22032# config.status only pays attention to the cache file if you give it
22033# the --recheck option to rerun configure.
22034#
22035# `ac_cv_env_foo' variables (set or unset) will be overridden when
22036# loading this file, other *unset* `ac_cv_foo' will be assigned the
22037# following values.
22038
22039_ACEOF
22040
22041# The following way of writing the cache mishandles newlines in values,
22042# but we know of no workaround that is simple, portable, and efficient.
22043# So, we kill variables containing newlines.
22044# Ultrix sh set writes to stderr and can't be redirected directly,
22045# and sets the high bit in the cache file unless we assign to the vars.
22046(
22047  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
22048    eval ac_val=\$$ac_var
22049    case $ac_val in #(
22050    *${as_nl}*)
22051      case $ac_var in #(
22052      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
22053$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
22054      esac
22055      case $ac_var in #(
22056      _ | IFS | as_nl) ;; #(
22057      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
22058      *) { eval $ac_var=; unset $ac_var;} ;;
22059      esac ;;
22060    esac
22061  done
22062
22063  (set) 2>&1 |
22064    case $as_nl`(ac_space=' '; set) 2>&1` in #(
22065    *${as_nl}ac_space=\ *)
22066      # `set' does not quote correctly, so add quotes: double-quote
22067      # substitution turns \\\\ into \\, and sed turns \\ into \.
22068      sed -n \
22069	"s/'/'\\\\''/g;
22070	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
22071      ;; #(
22072    *)
22073      # `set' quotes correctly as required by POSIX, so do not add quotes.
22074      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
22075      ;;
22076    esac |
22077    sort
22078) |
22079  sed '
22080     /^ac_cv_env_/b end
22081     t clear
22082     :clear
22083     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
22084     t end
22085     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
22086     :end' >>confcache
22087if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
22088  if test -w "$cache_file"; then
22089    if test "x$cache_file" != "x/dev/null"; then
22090      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
22091$as_echo "$as_me: updating cache $cache_file" >&6;}
22092      if test ! -f "$cache_file" || test -h "$cache_file"; then
22093	cat confcache >"$cache_file"
22094      else
22095        case $cache_file in #(
22096        */* | ?:*)
22097	  mv -f confcache "$cache_file"$$ &&
22098	  mv -f "$cache_file"$$ "$cache_file" ;; #(
22099        *)
22100	  mv -f confcache "$cache_file" ;;
22101	esac
22102      fi
22103    fi
22104  else
22105    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
22106$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
22107  fi
22108fi
22109rm -f confcache
22110
22111test "x$prefix" = xNONE && prefix=$ac_default_prefix
22112# Let make expand exec_prefix.
22113test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
22114
22115DEFS=-DHAVE_CONFIG_H
22116
22117ac_libobjs=
22118ac_ltlibobjs=
22119U=
22120for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
22121  # 1. Remove the extension, and $U if already installed.
22122  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
22123  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
22124  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
22125  #    will be set to the directory where LIBOBJS objects are built.
22126  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
22127  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
22128done
22129LIBOBJS=$ac_libobjs
22130
22131LTLIBOBJS=$ac_ltlibobjs
22132
22133
22134if test -z "${USE_SYSTEMD_TRUE}" && test -z "${USE_SYSTEMD_FALSE}"; then
22135  as_fn_error $? "conditional \"USE_SYSTEMD\" was never defined.
22136Usually this means the macro was only invoked conditionally." "$LINENO" 5
22137fi
22138
22139: "${CONFIG_STATUS=./config.status}"
22140ac_write_fail=0
22141ac_clean_files_save=$ac_clean_files
22142ac_clean_files="$ac_clean_files $CONFIG_STATUS"
22143{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
22144$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
22145as_write_fail=0
22146cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
22147#! $SHELL
22148# Generated by $as_me.
22149# Run this file to recreate the current configuration.
22150# Compiler output produced by configure, useful for debugging
22151# configure, is in config.log if it exists.
22152
22153debug=false
22154ac_cs_recheck=false
22155ac_cs_silent=false
22156
22157SHELL=\${CONFIG_SHELL-$SHELL}
22158export SHELL
22159_ASEOF
22160cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
22161## -------------------- ##
22162## M4sh Initialization. ##
22163## -------------------- ##
22164
22165# Be more Bourne compatible
22166DUALCASE=1; export DUALCASE # for MKS sh
22167if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
22168  emulate sh
22169  NULLCMD=:
22170  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
22171  # is contrary to our usage.  Disable this feature.
22172  alias -g '${1+"$@"}'='"$@"'
22173  setopt NO_GLOB_SUBST
22174else
22175  case `(set -o) 2>/dev/null` in #(
22176  *posix*) :
22177    set -o posix ;; #(
22178  *) :
22179     ;;
22180esac
22181fi
22182
22183
22184as_nl='
22185'
22186export as_nl
22187# Printing a long string crashes Solaris 7 /usr/bin/printf.
22188as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
22189as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
22190as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
22191# Prefer a ksh shell builtin over an external printf program on Solaris,
22192# but without wasting forks for bash or zsh.
22193if test -z "$BASH_VERSION$ZSH_VERSION" \
22194    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
22195  as_echo='print -r --'
22196  as_echo_n='print -rn --'
22197elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
22198  as_echo='printf %s\n'
22199  as_echo_n='printf %s'
22200else
22201  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
22202    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
22203    as_echo_n='/usr/ucb/echo -n'
22204  else
22205    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
22206    as_echo_n_body='eval
22207      arg=$1;
22208      case $arg in #(
22209      *"$as_nl"*)
22210	expr "X$arg" : "X\\(.*\\)$as_nl";
22211	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
22212      esac;
22213      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
22214    '
22215    export as_echo_n_body
22216    as_echo_n='sh -c $as_echo_n_body as_echo'
22217  fi
22218  export as_echo_body
22219  as_echo='sh -c $as_echo_body as_echo'
22220fi
22221
22222# The user is always right.
22223if test "${PATH_SEPARATOR+set}" != set; then
22224  PATH_SEPARATOR=:
22225  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
22226    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
22227      PATH_SEPARATOR=';'
22228  }
22229fi
22230
22231
22232# IFS
22233# We need space, tab and new line, in precisely that order.  Quoting is
22234# there to prevent editors from complaining about space-tab.
22235# (If _AS_PATH_WALK were called with IFS unset, it would disable word
22236# splitting by setting IFS to empty value.)
22237IFS=" ""	$as_nl"
22238
22239# Find who we are.  Look in the path if we contain no directory separator.
22240as_myself=
22241case $0 in #((
22242  *[\\/]* ) as_myself=$0 ;;
22243  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22244for as_dir in $PATH
22245do
22246  IFS=$as_save_IFS
22247  test -z "$as_dir" && as_dir=.
22248    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
22249  done
22250IFS=$as_save_IFS
22251
22252     ;;
22253esac
22254# We did not find ourselves, most probably we were run as `sh COMMAND'
22255# in which case we are not to be found in the path.
22256if test "x$as_myself" = x; then
22257  as_myself=$0
22258fi
22259if test ! -f "$as_myself"; then
22260  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
22261  exit 1
22262fi
22263
22264# Unset variables that we do not need and which cause bugs (e.g. in
22265# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
22266# suppresses any "Segmentation fault" message there.  '((' could
22267# trigger a bug in pdksh 5.2.14.
22268for as_var in BASH_ENV ENV MAIL MAILPATH
22269do eval test x\${$as_var+set} = xset \
22270  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
22271done
22272PS1='$ '
22273PS2='> '
22274PS4='+ '
22275
22276# NLS nuisances.
22277LC_ALL=C
22278export LC_ALL
22279LANGUAGE=C
22280export LANGUAGE
22281
22282# CDPATH.
22283(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
22284
22285
22286# as_fn_error STATUS ERROR [LINENO LOG_FD]
22287# ----------------------------------------
22288# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
22289# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
22290# script with STATUS, using 1 if that was 0.
22291as_fn_error ()
22292{
22293  as_status=$1; test $as_status -eq 0 && as_status=1
22294  if test "$4"; then
22295    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
22296    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
22297  fi
22298  $as_echo "$as_me: error: $2" >&2
22299  as_fn_exit $as_status
22300} # as_fn_error
22301
22302
22303# as_fn_set_status STATUS
22304# -----------------------
22305# Set $? to STATUS, without forking.
22306as_fn_set_status ()
22307{
22308  return $1
22309} # as_fn_set_status
22310
22311# as_fn_exit STATUS
22312# -----------------
22313# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
22314as_fn_exit ()
22315{
22316  set +e
22317  as_fn_set_status $1
22318  exit $1
22319} # as_fn_exit
22320
22321# as_fn_unset VAR
22322# ---------------
22323# Portably unset VAR.
22324as_fn_unset ()
22325{
22326  { eval $1=; unset $1;}
22327}
22328as_unset=as_fn_unset
22329# as_fn_append VAR VALUE
22330# ----------------------
22331# Append the text in VALUE to the end of the definition contained in VAR. Take
22332# advantage of any shell optimizations that allow amortized linear growth over
22333# repeated appends, instead of the typical quadratic growth present in naive
22334# implementations.
22335if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
22336  eval 'as_fn_append ()
22337  {
22338    eval $1+=\$2
22339  }'
22340else
22341  as_fn_append ()
22342  {
22343    eval $1=\$$1\$2
22344  }
22345fi # as_fn_append
22346
22347# as_fn_arith ARG...
22348# ------------------
22349# Perform arithmetic evaluation on the ARGs, and store the result in the
22350# global $as_val. Take advantage of shells that can avoid forks. The arguments
22351# must be portable across $(()) and expr.
22352if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
22353  eval 'as_fn_arith ()
22354  {
22355    as_val=$(( $* ))
22356  }'
22357else
22358  as_fn_arith ()
22359  {
22360    as_val=`expr "$@" || test $? -eq 1`
22361  }
22362fi # as_fn_arith
22363
22364
22365if expr a : '\(a\)' >/dev/null 2>&1 &&
22366   test "X`expr 00001 : '.*\(...\)'`" = X001; then
22367  as_expr=expr
22368else
22369  as_expr=false
22370fi
22371
22372if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
22373  as_basename=basename
22374else
22375  as_basename=false
22376fi
22377
22378if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
22379  as_dirname=dirname
22380else
22381  as_dirname=false
22382fi
22383
22384as_me=`$as_basename -- "$0" ||
22385$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
22386	 X"$0" : 'X\(//\)$' \| \
22387	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
22388$as_echo X/"$0" |
22389    sed '/^.*\/\([^/][^/]*\)\/*$/{
22390	    s//\1/
22391	    q
22392	  }
22393	  /^X\/\(\/\/\)$/{
22394	    s//\1/
22395	    q
22396	  }
22397	  /^X\/\(\/\).*/{
22398	    s//\1/
22399	    q
22400	  }
22401	  s/.*/./; q'`
22402
22403# Avoid depending upon Character Ranges.
22404as_cr_letters='abcdefghijklmnopqrstuvwxyz'
22405as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
22406as_cr_Letters=$as_cr_letters$as_cr_LETTERS
22407as_cr_digits='0123456789'
22408as_cr_alnum=$as_cr_Letters$as_cr_digits
22409
22410ECHO_C= ECHO_N= ECHO_T=
22411case `echo -n x` in #(((((
22412-n*)
22413  case `echo 'xy\c'` in
22414  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
22415  xy)  ECHO_C='\c';;
22416  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
22417       ECHO_T='	';;
22418  esac;;
22419*)
22420  ECHO_N='-n';;
22421esac
22422
22423rm -f conf$$ conf$$.exe conf$$.file
22424if test -d conf$$.dir; then
22425  rm -f conf$$.dir/conf$$.file
22426else
22427  rm -f conf$$.dir
22428  mkdir conf$$.dir 2>/dev/null
22429fi
22430if (echo >conf$$.file) 2>/dev/null; then
22431  if ln -s conf$$.file conf$$ 2>/dev/null; then
22432    as_ln_s='ln -s'
22433    # ... but there are two gotchas:
22434    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
22435    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
22436    # In both cases, we have to default to `cp -pR'.
22437    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
22438      as_ln_s='cp -pR'
22439  elif ln conf$$.file conf$$ 2>/dev/null; then
22440    as_ln_s=ln
22441  else
22442    as_ln_s='cp -pR'
22443  fi
22444else
22445  as_ln_s='cp -pR'
22446fi
22447rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
22448rmdir conf$$.dir 2>/dev/null
22449
22450
22451# as_fn_mkdir_p
22452# -------------
22453# Create "$as_dir" as a directory, including parents if necessary.
22454as_fn_mkdir_p ()
22455{
22456
22457  case $as_dir in #(
22458  -*) as_dir=./$as_dir;;
22459  esac
22460  test -d "$as_dir" || eval $as_mkdir_p || {
22461    as_dirs=
22462    while :; do
22463      case $as_dir in #(
22464      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
22465      *) as_qdir=$as_dir;;
22466      esac
22467      as_dirs="'$as_qdir' $as_dirs"
22468      as_dir=`$as_dirname -- "$as_dir" ||
22469$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
22470	 X"$as_dir" : 'X\(//\)[^/]' \| \
22471	 X"$as_dir" : 'X\(//\)$' \| \
22472	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
22473$as_echo X"$as_dir" |
22474    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
22475	    s//\1/
22476	    q
22477	  }
22478	  /^X\(\/\/\)[^/].*/{
22479	    s//\1/
22480	    q
22481	  }
22482	  /^X\(\/\/\)$/{
22483	    s//\1/
22484	    q
22485	  }
22486	  /^X\(\/\).*/{
22487	    s//\1/
22488	    q
22489	  }
22490	  s/.*/./; q'`
22491      test -d "$as_dir" && break
22492    done
22493    test -z "$as_dirs" || eval "mkdir $as_dirs"
22494  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
22495
22496
22497} # as_fn_mkdir_p
22498if mkdir -p . 2>/dev/null; then
22499  as_mkdir_p='mkdir -p "$as_dir"'
22500else
22501  test -d ./-p && rmdir ./-p
22502  as_mkdir_p=false
22503fi
22504
22505
22506# as_fn_executable_p FILE
22507# -----------------------
22508# Test if FILE is an executable regular file.
22509as_fn_executable_p ()
22510{
22511  test -f "$1" && test -x "$1"
22512} # as_fn_executable_p
22513as_test_x='test -x'
22514as_executable_p=as_fn_executable_p
22515
22516# Sed expression to map a string onto a valid CPP name.
22517as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
22518
22519# Sed expression to map a string onto a valid variable name.
22520as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
22521
22522
22523exec 6>&1
22524## ----------------------------------- ##
22525## Main body of $CONFIG_STATUS script. ##
22526## ----------------------------------- ##
22527_ASEOF
22528test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
22529
22530cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
22531# Save the log message, to keep $0 and so on meaningful, and to
22532# report actual input values of CONFIG_FILES etc. instead of their
22533# values after options handling.
22534ac_log="
22535This file was extended by unbound $as_me 1.16.1, which was
22536generated by GNU Autoconf 2.69.  Invocation command line was
22537
22538  CONFIG_FILES    = $CONFIG_FILES
22539  CONFIG_HEADERS  = $CONFIG_HEADERS
22540  CONFIG_LINKS    = $CONFIG_LINKS
22541  CONFIG_COMMANDS = $CONFIG_COMMANDS
22542  $ $0 $@
22543
22544on `(hostname || uname -n) 2>/dev/null | sed 1q`
22545"
22546
22547_ACEOF
22548
22549case $ac_config_files in *"
22550"*) set x $ac_config_files; shift; ac_config_files=$*;;
22551esac
22552
22553case $ac_config_headers in *"
22554"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
22555esac
22556
22557
22558cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
22559# Files that config.status was made for.
22560config_files="$ac_config_files"
22561config_headers="$ac_config_headers"
22562config_commands="$ac_config_commands"
22563
22564_ACEOF
22565
22566cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
22567ac_cs_usage="\
22568\`$as_me' instantiates files and other configuration actions
22569from templates according to the current configuration.  Unless the files
22570and actions are specified as TAGs, all are instantiated by default.
22571
22572Usage: $0 [OPTION]... [TAG]...
22573
22574  -h, --help       print this help, then exit
22575  -V, --version    print version number and configuration settings, then exit
22576      --config     print configuration, then exit
22577  -q, --quiet, --silent
22578                   do not print progress messages
22579  -d, --debug      don't remove temporary files
22580      --recheck    update $as_me by reconfiguring in the same conditions
22581      --file=FILE[:TEMPLATE]
22582                   instantiate the configuration file FILE
22583      --header=FILE[:TEMPLATE]
22584                   instantiate the configuration header FILE
22585
22586Configuration files:
22587$config_files
22588
22589Configuration headers:
22590$config_headers
22591
22592Configuration commands:
22593$config_commands
22594
22595Report bugs to <unbound-bugs@nlnetlabs.nl or https://github.com/NLnetLabs/unbound/issues>."
22596
22597_ACEOF
22598cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
22599ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
22600ac_cs_version="\\
22601unbound config.status 1.16.1
22602configured by $0, generated by GNU Autoconf 2.69,
22603  with options \\"\$ac_cs_config\\"
22604
22605Copyright (C) 2012 Free Software Foundation, Inc.
22606This config.status script is free software; the Free Software Foundation
22607gives unlimited permission to copy, distribute and modify it."
22608
22609ac_pwd='$ac_pwd'
22610srcdir='$srcdir'
22611AWK='$AWK'
22612test -n "\$AWK" || AWK=awk
22613_ACEOF
22614
22615cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
22616# The default lists apply if the user does not specify any file.
22617ac_need_defaults=:
22618while test $# != 0
22619do
22620  case $1 in
22621  --*=?*)
22622    ac_option=`expr "X$1" : 'X\([^=]*\)='`
22623    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
22624    ac_shift=:
22625    ;;
22626  --*=)
22627    ac_option=`expr "X$1" : 'X\([^=]*\)='`
22628    ac_optarg=
22629    ac_shift=:
22630    ;;
22631  *)
22632    ac_option=$1
22633    ac_optarg=$2
22634    ac_shift=shift
22635    ;;
22636  esac
22637
22638  case $ac_option in
22639  # Handling of the options.
22640  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
22641    ac_cs_recheck=: ;;
22642  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
22643    $as_echo "$ac_cs_version"; exit ;;
22644  --config | --confi | --conf | --con | --co | --c )
22645    $as_echo "$ac_cs_config"; exit ;;
22646  --debug | --debu | --deb | --de | --d | -d )
22647    debug=: ;;
22648  --file | --fil | --fi | --f )
22649    $ac_shift
22650    case $ac_optarg in
22651    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
22652    '') as_fn_error $? "missing file argument" ;;
22653    esac
22654    as_fn_append CONFIG_FILES " '$ac_optarg'"
22655    ac_need_defaults=false;;
22656  --header | --heade | --head | --hea )
22657    $ac_shift
22658    case $ac_optarg in
22659    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
22660    esac
22661    as_fn_append CONFIG_HEADERS " '$ac_optarg'"
22662    ac_need_defaults=false;;
22663  --he | --h)
22664    # Conflict between --help and --header
22665    as_fn_error $? "ambiguous option: \`$1'
22666Try \`$0 --help' for more information.";;
22667  --help | --hel | -h )
22668    $as_echo "$ac_cs_usage"; exit ;;
22669  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
22670  | -silent | --silent | --silen | --sile | --sil | --si | --s)
22671    ac_cs_silent=: ;;
22672
22673  # This is an error.
22674  -*) as_fn_error $? "unrecognized option: \`$1'
22675Try \`$0 --help' for more information." ;;
22676
22677  *) as_fn_append ac_config_targets " $1"
22678     ac_need_defaults=false ;;
22679
22680  esac
22681  shift
22682done
22683
22684ac_configure_extra_args=
22685
22686if $ac_cs_silent; then
22687  exec 6>/dev/null
22688  ac_configure_extra_args="$ac_configure_extra_args --silent"
22689fi
22690
22691_ACEOF
22692cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
22693if \$ac_cs_recheck; then
22694  set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
22695  shift
22696  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
22697  CONFIG_SHELL='$SHELL'
22698  export CONFIG_SHELL
22699  exec "\$@"
22700fi
22701
22702_ACEOF
22703cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
22704exec 5>>config.log
22705{
22706  echo
22707  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
22708## Running $as_me. ##
22709_ASBOX
22710  $as_echo "$ac_log"
22711} >&5
22712
22713_ACEOF
22714cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
22715#
22716# INIT-COMMANDS
22717#
22718
22719
22720# The HP-UX ksh and POSIX shell print the target directory to stdout
22721# if CDPATH is set.
22722(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
22723
22724sed_quote_subst='$sed_quote_subst'
22725double_quote_subst='$double_quote_subst'
22726delay_variable_subst='$delay_variable_subst'
22727macro_version='`$ECHO "$macro_version" | $SED "$delay_single_quote_subst"`'
22728macro_revision='`$ECHO "$macro_revision" | $SED "$delay_single_quote_subst"`'
22729enable_shared='`$ECHO "$enable_shared" | $SED "$delay_single_quote_subst"`'
22730enable_static='`$ECHO "$enable_static" | $SED "$delay_single_quote_subst"`'
22731pic_mode='`$ECHO "$pic_mode" | $SED "$delay_single_quote_subst"`'
22732enable_fast_install='`$ECHO "$enable_fast_install" | $SED "$delay_single_quote_subst"`'
22733shared_archive_member_spec='`$ECHO "$shared_archive_member_spec" | $SED "$delay_single_quote_subst"`'
22734SHELL='`$ECHO "$SHELL" | $SED "$delay_single_quote_subst"`'
22735ECHO='`$ECHO "$ECHO" | $SED "$delay_single_quote_subst"`'
22736PATH_SEPARATOR='`$ECHO "$PATH_SEPARATOR" | $SED "$delay_single_quote_subst"`'
22737host_alias='`$ECHO "$host_alias" | $SED "$delay_single_quote_subst"`'
22738host='`$ECHO "$host" | $SED "$delay_single_quote_subst"`'
22739host_os='`$ECHO "$host_os" | $SED "$delay_single_quote_subst"`'
22740build_alias='`$ECHO "$build_alias" | $SED "$delay_single_quote_subst"`'
22741build='`$ECHO "$build" | $SED "$delay_single_quote_subst"`'
22742build_os='`$ECHO "$build_os" | $SED "$delay_single_quote_subst"`'
22743SED='`$ECHO "$SED" | $SED "$delay_single_quote_subst"`'
22744Xsed='`$ECHO "$Xsed" | $SED "$delay_single_quote_subst"`'
22745GREP='`$ECHO "$GREP" | $SED "$delay_single_quote_subst"`'
22746EGREP='`$ECHO "$EGREP" | $SED "$delay_single_quote_subst"`'
22747FGREP='`$ECHO "$FGREP" | $SED "$delay_single_quote_subst"`'
22748LD='`$ECHO "$LD" | $SED "$delay_single_quote_subst"`'
22749NM='`$ECHO "$NM" | $SED "$delay_single_quote_subst"`'
22750LN_S='`$ECHO "$LN_S" | $SED "$delay_single_quote_subst"`'
22751max_cmd_len='`$ECHO "$max_cmd_len" | $SED "$delay_single_quote_subst"`'
22752ac_objext='`$ECHO "$ac_objext" | $SED "$delay_single_quote_subst"`'
22753exeext='`$ECHO "$exeext" | $SED "$delay_single_quote_subst"`'
22754lt_unset='`$ECHO "$lt_unset" | $SED "$delay_single_quote_subst"`'
22755lt_SP2NL='`$ECHO "$lt_SP2NL" | $SED "$delay_single_quote_subst"`'
22756lt_NL2SP='`$ECHO "$lt_NL2SP" | $SED "$delay_single_quote_subst"`'
22757lt_cv_to_host_file_cmd='`$ECHO "$lt_cv_to_host_file_cmd" | $SED "$delay_single_quote_subst"`'
22758lt_cv_to_tool_file_cmd='`$ECHO "$lt_cv_to_tool_file_cmd" | $SED "$delay_single_quote_subst"`'
22759reload_flag='`$ECHO "$reload_flag" | $SED "$delay_single_quote_subst"`'
22760reload_cmds='`$ECHO "$reload_cmds" | $SED "$delay_single_quote_subst"`'
22761OBJDUMP='`$ECHO "$OBJDUMP" | $SED "$delay_single_quote_subst"`'
22762deplibs_check_method='`$ECHO "$deplibs_check_method" | $SED "$delay_single_quote_subst"`'
22763file_magic_cmd='`$ECHO "$file_magic_cmd" | $SED "$delay_single_quote_subst"`'
22764file_magic_glob='`$ECHO "$file_magic_glob" | $SED "$delay_single_quote_subst"`'
22765want_nocaseglob='`$ECHO "$want_nocaseglob" | $SED "$delay_single_quote_subst"`'
22766DLLTOOL='`$ECHO "$DLLTOOL" | $SED "$delay_single_quote_subst"`'
22767sharedlib_from_linklib_cmd='`$ECHO "$sharedlib_from_linklib_cmd" | $SED "$delay_single_quote_subst"`'
22768AR='`$ECHO "$AR" | $SED "$delay_single_quote_subst"`'
22769AR_FLAGS='`$ECHO "$AR_FLAGS" | $SED "$delay_single_quote_subst"`'
22770archiver_list_spec='`$ECHO "$archiver_list_spec" | $SED "$delay_single_quote_subst"`'
22771STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`'
22772RANLIB='`$ECHO "$RANLIB" | $SED "$delay_single_quote_subst"`'
22773old_postinstall_cmds='`$ECHO "$old_postinstall_cmds" | $SED "$delay_single_quote_subst"`'
22774old_postuninstall_cmds='`$ECHO "$old_postuninstall_cmds" | $SED "$delay_single_quote_subst"`'
22775old_archive_cmds='`$ECHO "$old_archive_cmds" | $SED "$delay_single_quote_subst"`'
22776lock_old_archive_extraction='`$ECHO "$lock_old_archive_extraction" | $SED "$delay_single_quote_subst"`'
22777CC='`$ECHO "$CC" | $SED "$delay_single_quote_subst"`'
22778CFLAGS='`$ECHO "$CFLAGS" | $SED "$delay_single_quote_subst"`'
22779compiler='`$ECHO "$compiler" | $SED "$delay_single_quote_subst"`'
22780GCC='`$ECHO "$GCC" | $SED "$delay_single_quote_subst"`'
22781lt_cv_sys_global_symbol_pipe='`$ECHO "$lt_cv_sys_global_symbol_pipe" | $SED "$delay_single_quote_subst"`'
22782lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`'
22783lt_cv_sys_global_symbol_to_import='`$ECHO "$lt_cv_sys_global_symbol_to_import" | $SED "$delay_single_quote_subst"`'
22784lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`'
22785lt_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"`'
22786lt_cv_nm_interface='`$ECHO "$lt_cv_nm_interface" | $SED "$delay_single_quote_subst"`'
22787nm_file_list_spec='`$ECHO "$nm_file_list_spec" | $SED "$delay_single_quote_subst"`'
22788lt_sysroot='`$ECHO "$lt_sysroot" | $SED "$delay_single_quote_subst"`'
22789lt_cv_truncate_bin='`$ECHO "$lt_cv_truncate_bin" | $SED "$delay_single_quote_subst"`'
22790objdir='`$ECHO "$objdir" | $SED "$delay_single_quote_subst"`'
22791MAGIC_CMD='`$ECHO "$MAGIC_CMD" | $SED "$delay_single_quote_subst"`'
22792lt_prog_compiler_no_builtin_flag='`$ECHO "$lt_prog_compiler_no_builtin_flag" | $SED "$delay_single_quote_subst"`'
22793lt_prog_compiler_pic='`$ECHO "$lt_prog_compiler_pic" | $SED "$delay_single_quote_subst"`'
22794lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`'
22795lt_prog_compiler_static='`$ECHO "$lt_prog_compiler_static" | $SED "$delay_single_quote_subst"`'
22796lt_cv_prog_compiler_c_o='`$ECHO "$lt_cv_prog_compiler_c_o" | $SED "$delay_single_quote_subst"`'
22797need_locks='`$ECHO "$need_locks" | $SED "$delay_single_quote_subst"`'
22798MANIFEST_TOOL='`$ECHO "$MANIFEST_TOOL" | $SED "$delay_single_quote_subst"`'
22799DSYMUTIL='`$ECHO "$DSYMUTIL" | $SED "$delay_single_quote_subst"`'
22800NMEDIT='`$ECHO "$NMEDIT" | $SED "$delay_single_quote_subst"`'
22801LIPO='`$ECHO "$LIPO" | $SED "$delay_single_quote_subst"`'
22802OTOOL='`$ECHO "$OTOOL" | $SED "$delay_single_quote_subst"`'
22803OTOOL64='`$ECHO "$OTOOL64" | $SED "$delay_single_quote_subst"`'
22804libext='`$ECHO "$libext" | $SED "$delay_single_quote_subst"`'
22805shrext_cmds='`$ECHO "$shrext_cmds" | $SED "$delay_single_quote_subst"`'
22806extract_expsyms_cmds='`$ECHO "$extract_expsyms_cmds" | $SED "$delay_single_quote_subst"`'
22807archive_cmds_need_lc='`$ECHO "$archive_cmds_need_lc" | $SED "$delay_single_quote_subst"`'
22808enable_shared_with_static_runtimes='`$ECHO "$enable_shared_with_static_runtimes" | $SED "$delay_single_quote_subst"`'
22809export_dynamic_flag_spec='`$ECHO "$export_dynamic_flag_spec" | $SED "$delay_single_quote_subst"`'
22810whole_archive_flag_spec='`$ECHO "$whole_archive_flag_spec" | $SED "$delay_single_quote_subst"`'
22811compiler_needs_object='`$ECHO "$compiler_needs_object" | $SED "$delay_single_quote_subst"`'
22812old_archive_from_new_cmds='`$ECHO "$old_archive_from_new_cmds" | $SED "$delay_single_quote_subst"`'
22813old_archive_from_expsyms_cmds='`$ECHO "$old_archive_from_expsyms_cmds" | $SED "$delay_single_quote_subst"`'
22814archive_cmds='`$ECHO "$archive_cmds" | $SED "$delay_single_quote_subst"`'
22815archive_expsym_cmds='`$ECHO "$archive_expsym_cmds" | $SED "$delay_single_quote_subst"`'
22816module_cmds='`$ECHO "$module_cmds" | $SED "$delay_single_quote_subst"`'
22817module_expsym_cmds='`$ECHO "$module_expsym_cmds" | $SED "$delay_single_quote_subst"`'
22818with_gnu_ld='`$ECHO "$with_gnu_ld" | $SED "$delay_single_quote_subst"`'
22819allow_undefined_flag='`$ECHO "$allow_undefined_flag" | $SED "$delay_single_quote_subst"`'
22820no_undefined_flag='`$ECHO "$no_undefined_flag" | $SED "$delay_single_quote_subst"`'
22821hardcode_libdir_flag_spec='`$ECHO "$hardcode_libdir_flag_spec" | $SED "$delay_single_quote_subst"`'
22822hardcode_libdir_separator='`$ECHO "$hardcode_libdir_separator" | $SED "$delay_single_quote_subst"`'
22823hardcode_direct='`$ECHO "$hardcode_direct" | $SED "$delay_single_quote_subst"`'
22824hardcode_direct_absolute='`$ECHO "$hardcode_direct_absolute" | $SED "$delay_single_quote_subst"`'
22825hardcode_minus_L='`$ECHO "$hardcode_minus_L" | $SED "$delay_single_quote_subst"`'
22826hardcode_shlibpath_var='`$ECHO "$hardcode_shlibpath_var" | $SED "$delay_single_quote_subst"`'
22827hardcode_automatic='`$ECHO "$hardcode_automatic" | $SED "$delay_single_quote_subst"`'
22828inherit_rpath='`$ECHO "$inherit_rpath" | $SED "$delay_single_quote_subst"`'
22829link_all_deplibs='`$ECHO "$link_all_deplibs" | $SED "$delay_single_quote_subst"`'
22830always_export_symbols='`$ECHO "$always_export_symbols" | $SED "$delay_single_quote_subst"`'
22831export_symbols_cmds='`$ECHO "$export_symbols_cmds" | $SED "$delay_single_quote_subst"`'
22832exclude_expsyms='`$ECHO "$exclude_expsyms" | $SED "$delay_single_quote_subst"`'
22833include_expsyms='`$ECHO "$include_expsyms" | $SED "$delay_single_quote_subst"`'
22834prelink_cmds='`$ECHO "$prelink_cmds" | $SED "$delay_single_quote_subst"`'
22835postlink_cmds='`$ECHO "$postlink_cmds" | $SED "$delay_single_quote_subst"`'
22836file_list_spec='`$ECHO "$file_list_spec" | $SED "$delay_single_quote_subst"`'
22837variables_saved_for_relink='`$ECHO "$variables_saved_for_relink" | $SED "$delay_single_quote_subst"`'
22838need_lib_prefix='`$ECHO "$need_lib_prefix" | $SED "$delay_single_quote_subst"`'
22839need_version='`$ECHO "$need_version" | $SED "$delay_single_quote_subst"`'
22840version_type='`$ECHO "$version_type" | $SED "$delay_single_quote_subst"`'
22841runpath_var='`$ECHO "$runpath_var" | $SED "$delay_single_quote_subst"`'
22842shlibpath_var='`$ECHO "$shlibpath_var" | $SED "$delay_single_quote_subst"`'
22843shlibpath_overrides_runpath='`$ECHO "$shlibpath_overrides_runpath" | $SED "$delay_single_quote_subst"`'
22844libname_spec='`$ECHO "$libname_spec" | $SED "$delay_single_quote_subst"`'
22845library_names_spec='`$ECHO "$library_names_spec" | $SED "$delay_single_quote_subst"`'
22846soname_spec='`$ECHO "$soname_spec" | $SED "$delay_single_quote_subst"`'
22847install_override_mode='`$ECHO "$install_override_mode" | $SED "$delay_single_quote_subst"`'
22848postinstall_cmds='`$ECHO "$postinstall_cmds" | $SED "$delay_single_quote_subst"`'
22849postuninstall_cmds='`$ECHO "$postuninstall_cmds" | $SED "$delay_single_quote_subst"`'
22850finish_cmds='`$ECHO "$finish_cmds" | $SED "$delay_single_quote_subst"`'
22851finish_eval='`$ECHO "$finish_eval" | $SED "$delay_single_quote_subst"`'
22852hardcode_into_libs='`$ECHO "$hardcode_into_libs" | $SED "$delay_single_quote_subst"`'
22853sys_lib_search_path_spec='`$ECHO "$sys_lib_search_path_spec" | $SED "$delay_single_quote_subst"`'
22854configure_time_dlsearch_path='`$ECHO "$configure_time_dlsearch_path" | $SED "$delay_single_quote_subst"`'
22855configure_time_lt_sys_library_path='`$ECHO "$configure_time_lt_sys_library_path" | $SED "$delay_single_quote_subst"`'
22856hardcode_action='`$ECHO "$hardcode_action" | $SED "$delay_single_quote_subst"`'
22857enable_dlopen='`$ECHO "$enable_dlopen" | $SED "$delay_single_quote_subst"`'
22858enable_dlopen_self='`$ECHO "$enable_dlopen_self" | $SED "$delay_single_quote_subst"`'
22859enable_dlopen_self_static='`$ECHO "$enable_dlopen_self_static" | $SED "$delay_single_quote_subst"`'
22860old_striplib='`$ECHO "$old_striplib" | $SED "$delay_single_quote_subst"`'
22861striplib='`$ECHO "$striplib" | $SED "$delay_single_quote_subst"`'
22862
22863LTCC='$LTCC'
22864LTCFLAGS='$LTCFLAGS'
22865compiler='$compiler_DEFAULT'
22866
22867# A function that is used when there is no print builtin or printf.
22868func_fallback_echo ()
22869{
22870  eval 'cat <<_LTECHO_EOF
22871\$1
22872_LTECHO_EOF'
22873}
22874
22875# Quote evaled strings.
22876for var in SHELL \
22877ECHO \
22878PATH_SEPARATOR \
22879SED \
22880GREP \
22881EGREP \
22882FGREP \
22883LD \
22884NM \
22885LN_S \
22886lt_SP2NL \
22887lt_NL2SP \
22888reload_flag \
22889OBJDUMP \
22890deplibs_check_method \
22891file_magic_cmd \
22892file_magic_glob \
22893want_nocaseglob \
22894DLLTOOL \
22895sharedlib_from_linklib_cmd \
22896AR \
22897AR_FLAGS \
22898archiver_list_spec \
22899STRIP \
22900RANLIB \
22901CC \
22902CFLAGS \
22903compiler \
22904lt_cv_sys_global_symbol_pipe \
22905lt_cv_sys_global_symbol_to_cdecl \
22906lt_cv_sys_global_symbol_to_import \
22907lt_cv_sys_global_symbol_to_c_name_address \
22908lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \
22909lt_cv_nm_interface \
22910nm_file_list_spec \
22911lt_cv_truncate_bin \
22912lt_prog_compiler_no_builtin_flag \
22913lt_prog_compiler_pic \
22914lt_prog_compiler_wl \
22915lt_prog_compiler_static \
22916lt_cv_prog_compiler_c_o \
22917need_locks \
22918MANIFEST_TOOL \
22919DSYMUTIL \
22920NMEDIT \
22921LIPO \
22922OTOOL \
22923OTOOL64 \
22924shrext_cmds \
22925export_dynamic_flag_spec \
22926whole_archive_flag_spec \
22927compiler_needs_object \
22928with_gnu_ld \
22929allow_undefined_flag \
22930no_undefined_flag \
22931hardcode_libdir_flag_spec \
22932hardcode_libdir_separator \
22933exclude_expsyms \
22934include_expsyms \
22935file_list_spec \
22936variables_saved_for_relink \
22937libname_spec \
22938library_names_spec \
22939soname_spec \
22940install_override_mode \
22941finish_eval \
22942old_striplib \
22943striplib; do
22944    case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
22945    *[\\\\\\\`\\"\\\$]*)
22946      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes
22947      ;;
22948    *)
22949      eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
22950      ;;
22951    esac
22952done
22953
22954# Double-quote double-evaled strings.
22955for var in reload_cmds \
22956old_postinstall_cmds \
22957old_postuninstall_cmds \
22958old_archive_cmds \
22959extract_expsyms_cmds \
22960old_archive_from_new_cmds \
22961old_archive_from_expsyms_cmds \
22962archive_cmds \
22963archive_expsym_cmds \
22964module_cmds \
22965module_expsym_cmds \
22966export_symbols_cmds \
22967prelink_cmds \
22968postlink_cmds \
22969postinstall_cmds \
22970postuninstall_cmds \
22971finish_cmds \
22972sys_lib_search_path_spec \
22973configure_time_dlsearch_path \
22974configure_time_lt_sys_library_path; do
22975    case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
22976    *[\\\\\\\`\\"\\\$]*)
22977      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes
22978      ;;
22979    *)
22980      eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
22981      ;;
22982    esac
22983done
22984
22985ac_aux_dir='$ac_aux_dir'
22986
22987# See if we are running on zsh, and set the options that allow our
22988# commands through without removal of \ escapes INIT.
22989if test -n "\${ZSH_VERSION+set}"; then
22990   setopt NO_GLOB_SUBST
22991fi
22992
22993
22994    PACKAGE='$PACKAGE'
22995    VERSION='$VERSION'
22996    RM='$RM'
22997    ofile='$ofile'
22998
22999
23000
23001
23002_ACEOF
23003
23004cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
23005
23006# Handling of arguments.
23007for ac_config_target in $ac_config_targets
23008do
23009  case $ac_config_target in
23010    "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;;
23011    "disable-rpath") CONFIG_COMMANDS="$CONFIG_COMMANDS disable-rpath" ;;
23012    "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
23013    "doc/example.conf") CONFIG_FILES="$CONFIG_FILES doc/example.conf" ;;
23014    "doc/libunbound.3") CONFIG_FILES="$CONFIG_FILES doc/libunbound.3" ;;
23015    "doc/unbound.8") CONFIG_FILES="$CONFIG_FILES doc/unbound.8" ;;
23016    "doc/unbound-anchor.8") CONFIG_FILES="$CONFIG_FILES doc/unbound-anchor.8" ;;
23017    "doc/unbound-checkconf.8") CONFIG_FILES="$CONFIG_FILES doc/unbound-checkconf.8" ;;
23018    "doc/unbound.conf.5") CONFIG_FILES="$CONFIG_FILES doc/unbound.conf.5" ;;
23019    "doc/unbound-control.8") CONFIG_FILES="$CONFIG_FILES doc/unbound-control.8" ;;
23020    "doc/unbound-host.1") CONFIG_FILES="$CONFIG_FILES doc/unbound-host.1" ;;
23021    "smallapp/unbound-control-setup.sh") CONFIG_FILES="$CONFIG_FILES smallapp/unbound-control-setup.sh" ;;
23022    "dnstap/dnstap_config.h") CONFIG_FILES="$CONFIG_FILES dnstap/dnstap_config.h" ;;
23023    "dnscrypt/dnscrypt_config.h") CONFIG_FILES="$CONFIG_FILES dnscrypt/dnscrypt_config.h" ;;
23024    "contrib/libunbound.pc") CONFIG_FILES="$CONFIG_FILES contrib/libunbound.pc" ;;
23025    "contrib/unbound.socket") CONFIG_FILES="$CONFIG_FILES contrib/unbound.socket" ;;
23026    "contrib/unbound.service") CONFIG_FILES="$CONFIG_FILES contrib/unbound.service" ;;
23027    "contrib/unbound_portable.service") CONFIG_FILES="$CONFIG_FILES contrib/unbound_portable.service" ;;
23028    "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
23029
23030  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
23031  esac
23032done
23033
23034
23035# If the user did not use the arguments to specify the items to instantiate,
23036# then the envvar interface is used.  Set only those that are not.
23037# We use the long form for the default assignment because of an extremely
23038# bizarre bug on SunOS 4.1.3.
23039if $ac_need_defaults; then
23040  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
23041  test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
23042  test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
23043fi
23044
23045# Have a temporary directory for convenience.  Make it in the build tree
23046# simply because there is no reason against having it here, and in addition,
23047# creating and moving files from /tmp can sometimes cause problems.
23048# Hook for its removal unless debugging.
23049# Note that there is a small window in which the directory will not be cleaned:
23050# after its creation but before its name has been assigned to `$tmp'.
23051$debug ||
23052{
23053  tmp= ac_tmp=
23054  trap 'exit_status=$?
23055  : "${ac_tmp:=$tmp}"
23056  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
23057' 0
23058  trap 'as_fn_exit 1' 1 2 13 15
23059}
23060# Create a (secure) tmp directory for tmp files.
23061
23062{
23063  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
23064  test -d "$tmp"
23065}  ||
23066{
23067  tmp=./conf$$-$RANDOM
23068  (umask 077 && mkdir "$tmp")
23069} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
23070ac_tmp=$tmp
23071
23072# Set up the scripts for CONFIG_FILES section.
23073# No need to generate them if there are no CONFIG_FILES.
23074# This happens for instance with `./config.status config.h'.
23075if test -n "$CONFIG_FILES"; then
23076
23077
23078ac_cr=`echo X | tr X '\015'`
23079# On cygwin, bash can eat \r inside `` if the user requested igncr.
23080# But we know of no other shell where ac_cr would be empty at this
23081# point, so we can use a bashism as a fallback.
23082if test "x$ac_cr" = x; then
23083  eval ac_cr=\$\'\\r\'
23084fi
23085ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
23086if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
23087  ac_cs_awk_cr='\\r'
23088else
23089  ac_cs_awk_cr=$ac_cr
23090fi
23091
23092echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
23093_ACEOF
23094
23095
23096{
23097  echo "cat >conf$$subs.awk <<_ACEOF" &&
23098  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
23099  echo "_ACEOF"
23100} >conf$$subs.sh ||
23101  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
23102ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
23103ac_delim='%!_!# '
23104for ac_last_try in false false false false false :; do
23105  . ./conf$$subs.sh ||
23106    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
23107
23108  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
23109  if test $ac_delim_n = $ac_delim_num; then
23110    break
23111  elif $ac_last_try; then
23112    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
23113  else
23114    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
23115  fi
23116done
23117rm -f conf$$subs.sh
23118
23119cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
23120cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
23121_ACEOF
23122sed -n '
23123h
23124s/^/S["/; s/!.*/"]=/
23125p
23126g
23127s/^[^!]*!//
23128:repl
23129t repl
23130s/'"$ac_delim"'$//
23131t delim
23132:nl
23133h
23134s/\(.\{148\}\)..*/\1/
23135t more1
23136s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
23137p
23138n
23139b repl
23140:more1
23141s/["\\]/\\&/g; s/^/"/; s/$/"\\/
23142p
23143g
23144s/.\{148\}//
23145t nl
23146:delim
23147h
23148s/\(.\{148\}\)..*/\1/
23149t more2
23150s/["\\]/\\&/g; s/^/"/; s/$/"/
23151p
23152b
23153:more2
23154s/["\\]/\\&/g; s/^/"/; s/$/"\\/
23155p
23156g
23157s/.\{148\}//
23158t delim
23159' <conf$$subs.awk | sed '
23160/^[^""]/{
23161  N
23162  s/\n//
23163}
23164' >>$CONFIG_STATUS || ac_write_fail=1
23165rm -f conf$$subs.awk
23166cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
23167_ACAWK
23168cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
23169  for (key in S) S_is_set[key] = 1
23170  FS = ""
23171
23172}
23173{
23174  line = $ 0
23175  nfields = split(line, field, "@")
23176  substed = 0
23177  len = length(field[1])
23178  for (i = 2; i < nfields; i++) {
23179    key = field[i]
23180    keylen = length(key)
23181    if (S_is_set[key]) {
23182      value = S[key]
23183      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
23184      len += length(value) + length(field[++i])
23185      substed = 1
23186    } else
23187      len += 1 + keylen
23188  }
23189
23190  print line
23191}
23192
23193_ACAWK
23194_ACEOF
23195cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
23196if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
23197  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
23198else
23199  cat
23200fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
23201  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
23202_ACEOF
23203
23204# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
23205# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
23206# trailing colons and then remove the whole line if VPATH becomes empty
23207# (actually we leave an empty line to preserve line numbers).
23208if test "x$srcdir" = x.; then
23209  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
23210h
23211s///
23212s/^/:/
23213s/[	 ]*$/:/
23214s/:\$(srcdir):/:/g
23215s/:\${srcdir}:/:/g
23216s/:@srcdir@:/:/g
23217s/^:*//
23218s/:*$//
23219x
23220s/\(=[	 ]*\).*/\1/
23221G
23222s/\n//
23223s/^[^=]*=[	 ]*$//
23224}'
23225fi
23226
23227cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
23228fi # test -n "$CONFIG_FILES"
23229
23230# Set up the scripts for CONFIG_HEADERS section.
23231# No need to generate them if there are no CONFIG_HEADERS.
23232# This happens for instance with `./config.status Makefile'.
23233if test -n "$CONFIG_HEADERS"; then
23234cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
23235BEGIN {
23236_ACEOF
23237
23238# Transform confdefs.h into an awk script `defines.awk', embedded as
23239# here-document in config.status, that substitutes the proper values into
23240# config.h.in to produce config.h.
23241
23242# Create a delimiter string that does not exist in confdefs.h, to ease
23243# handling of long lines.
23244ac_delim='%!_!# '
23245for ac_last_try in false false :; do
23246  ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
23247  if test -z "$ac_tt"; then
23248    break
23249  elif $ac_last_try; then
23250    as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
23251  else
23252    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
23253  fi
23254done
23255
23256# For the awk script, D is an array of macro values keyed by name,
23257# likewise P contains macro parameters if any.  Preserve backslash
23258# newline sequences.
23259
23260ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
23261sed -n '
23262s/.\{148\}/&'"$ac_delim"'/g
23263t rset
23264:rset
23265s/^[	 ]*#[	 ]*define[	 ][	 ]*/ /
23266t def
23267d
23268:def
23269s/\\$//
23270t bsnl
23271s/["\\]/\\&/g
23272s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
23273D["\1"]=" \3"/p
23274s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2"/p
23275d
23276:bsnl
23277s/["\\]/\\&/g
23278s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
23279D["\1"]=" \3\\\\\\n"\\/p
23280t cont
23281s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
23282t cont
23283d
23284:cont
23285n
23286s/.\{148\}/&'"$ac_delim"'/g
23287t clear
23288:clear
23289s/\\$//
23290t bsnlc
23291s/["\\]/\\&/g; s/^/"/; s/$/"/p
23292d
23293:bsnlc
23294s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
23295b cont
23296' <confdefs.h | sed '
23297s/'"$ac_delim"'/"\\\
23298"/g' >>$CONFIG_STATUS || ac_write_fail=1
23299
23300cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
23301  for (key in D) D_is_set[key] = 1
23302  FS = ""
23303}
23304/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
23305  line = \$ 0
23306  split(line, arg, " ")
23307  if (arg[1] == "#") {
23308    defundef = arg[2]
23309    mac1 = arg[3]
23310  } else {
23311    defundef = substr(arg[1], 2)
23312    mac1 = arg[2]
23313  }
23314  split(mac1, mac2, "(") #)
23315  macro = mac2[1]
23316  prefix = substr(line, 1, index(line, defundef) - 1)
23317  if (D_is_set[macro]) {
23318    # Preserve the white space surrounding the "#".
23319    print prefix "define", macro P[macro] D[macro]
23320    next
23321  } else {
23322    # Replace #undef with comments.  This is necessary, for example,
23323    # in the case of _POSIX_SOURCE, which is predefined and required
23324    # on some systems where configure will not decide to define it.
23325    if (defundef == "undef") {
23326      print "/*", prefix defundef, macro, "*/"
23327      next
23328    }
23329  }
23330}
23331{ print }
23332_ACAWK
23333_ACEOF
23334cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
23335  as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
23336fi # test -n "$CONFIG_HEADERS"
23337
23338
23339eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS    :C $CONFIG_COMMANDS"
23340shift
23341for ac_tag
23342do
23343  case $ac_tag in
23344  :[FHLC]) ac_mode=$ac_tag; continue;;
23345  esac
23346  case $ac_mode$ac_tag in
23347  :[FHL]*:*);;
23348  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
23349  :[FH]-) ac_tag=-:-;;
23350  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
23351  esac
23352  ac_save_IFS=$IFS
23353  IFS=:
23354  set x $ac_tag
23355  IFS=$ac_save_IFS
23356  shift
23357  ac_file=$1
23358  shift
23359
23360  case $ac_mode in
23361  :L) ac_source=$1;;
23362  :[FH])
23363    ac_file_inputs=
23364    for ac_f
23365    do
23366      case $ac_f in
23367      -) ac_f="$ac_tmp/stdin";;
23368      *) # Look for the file first in the build tree, then in the source tree
23369	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
23370	 # because $ac_f cannot contain `:'.
23371	 test -f "$ac_f" ||
23372	   case $ac_f in
23373	   [\\/$]*) false;;
23374	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
23375	   esac ||
23376	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
23377      esac
23378      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
23379      as_fn_append ac_file_inputs " '$ac_f'"
23380    done
23381
23382    # Let's still pretend it is `configure' which instantiates (i.e., don't
23383    # use $as_me), people would be surprised to read:
23384    #    /* config.h.  Generated by config.status.  */
23385    configure_input='Generated from '`
23386	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
23387	`' by configure.'
23388    if test x"$ac_file" != x-; then
23389      configure_input="$ac_file.  $configure_input"
23390      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
23391$as_echo "$as_me: creating $ac_file" >&6;}
23392    fi
23393    # Neutralize special characters interpreted by sed in replacement strings.
23394    case $configure_input in #(
23395    *\&* | *\|* | *\\* )
23396       ac_sed_conf_input=`$as_echo "$configure_input" |
23397       sed 's/[\\\\&|]/\\\\&/g'`;; #(
23398    *) ac_sed_conf_input=$configure_input;;
23399    esac
23400
23401    case $ac_tag in
23402    *:-:* | *:-) cat >"$ac_tmp/stdin" \
23403      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
23404    esac
23405    ;;
23406  esac
23407
23408  ac_dir=`$as_dirname -- "$ac_file" ||
23409$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
23410	 X"$ac_file" : 'X\(//\)[^/]' \| \
23411	 X"$ac_file" : 'X\(//\)$' \| \
23412	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
23413$as_echo X"$ac_file" |
23414    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
23415	    s//\1/
23416	    q
23417	  }
23418	  /^X\(\/\/\)[^/].*/{
23419	    s//\1/
23420	    q
23421	  }
23422	  /^X\(\/\/\)$/{
23423	    s//\1/
23424	    q
23425	  }
23426	  /^X\(\/\).*/{
23427	    s//\1/
23428	    q
23429	  }
23430	  s/.*/./; q'`
23431  as_dir="$ac_dir"; as_fn_mkdir_p
23432  ac_builddir=.
23433
23434case "$ac_dir" in
23435.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
23436*)
23437  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
23438  # A ".." for each directory in $ac_dir_suffix.
23439  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
23440  case $ac_top_builddir_sub in
23441  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
23442  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
23443  esac ;;
23444esac
23445ac_abs_top_builddir=$ac_pwd
23446ac_abs_builddir=$ac_pwd$ac_dir_suffix
23447# for backward compatibility:
23448ac_top_builddir=$ac_top_build_prefix
23449
23450case $srcdir in
23451  .)  # We are building in place.
23452    ac_srcdir=.
23453    ac_top_srcdir=$ac_top_builddir_sub
23454    ac_abs_top_srcdir=$ac_pwd ;;
23455  [\\/]* | ?:[\\/]* )  # Absolute name.
23456    ac_srcdir=$srcdir$ac_dir_suffix;
23457    ac_top_srcdir=$srcdir
23458    ac_abs_top_srcdir=$srcdir ;;
23459  *) # Relative name.
23460    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
23461    ac_top_srcdir=$ac_top_build_prefix$srcdir
23462    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
23463esac
23464ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
23465
23466
23467  case $ac_mode in
23468  :F)
23469  #
23470  # CONFIG_FILE
23471  #
23472
23473_ACEOF
23474
23475cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
23476# If the template does not know about datarootdir, expand it.
23477# FIXME: This hack should be removed a few years after 2.60.
23478ac_datarootdir_hack=; ac_datarootdir_seen=
23479ac_sed_dataroot='
23480/datarootdir/ {
23481  p
23482  q
23483}
23484/@datadir@/p
23485/@docdir@/p
23486/@infodir@/p
23487/@localedir@/p
23488/@mandir@/p'
23489case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
23490*datarootdir*) ac_datarootdir_seen=yes;;
23491*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
23492  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
23493$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
23494_ACEOF
23495cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
23496  ac_datarootdir_hack='
23497  s&@datadir@&$datadir&g
23498  s&@docdir@&$docdir&g
23499  s&@infodir@&$infodir&g
23500  s&@localedir@&$localedir&g
23501  s&@mandir@&$mandir&g
23502  s&\\\${datarootdir}&$datarootdir&g' ;;
23503esac
23504_ACEOF
23505
23506# Neutralize VPATH when `$srcdir' = `.'.
23507# Shell code in configure.ac might set extrasub.
23508# FIXME: do we really want to maintain this feature?
23509cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
23510ac_sed_extra="$ac_vpsub
23511$extrasub
23512_ACEOF
23513cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
23514:t
23515/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
23516s|@configure_input@|$ac_sed_conf_input|;t t
23517s&@top_builddir@&$ac_top_builddir_sub&;t t
23518s&@top_build_prefix@&$ac_top_build_prefix&;t t
23519s&@srcdir@&$ac_srcdir&;t t
23520s&@abs_srcdir@&$ac_abs_srcdir&;t t
23521s&@top_srcdir@&$ac_top_srcdir&;t t
23522s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
23523s&@builddir@&$ac_builddir&;t t
23524s&@abs_builddir@&$ac_abs_builddir&;t t
23525s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
23526$ac_datarootdir_hack
23527"
23528eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
23529  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
23530
23531test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
23532  { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
23533  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' \
23534      "$ac_tmp/out"`; test -z "$ac_out"; } &&
23535  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
23536which seems to be undefined.  Please make sure it is defined" >&5
23537$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
23538which seems to be undefined.  Please make sure it is defined" >&2;}
23539
23540  rm -f "$ac_tmp/stdin"
23541  case $ac_file in
23542  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
23543  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
23544  esac \
23545  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
23546 ;;
23547  :H)
23548  #
23549  # CONFIG_HEADER
23550  #
23551  if test x"$ac_file" != x-; then
23552    {
23553      $as_echo "/* $configure_input  */" \
23554      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
23555    } >"$ac_tmp/config.h" \
23556      || as_fn_error $? "could not create $ac_file" "$LINENO" 5
23557    if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
23558      { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
23559$as_echo "$as_me: $ac_file is unchanged" >&6;}
23560    else
23561      rm -f "$ac_file"
23562      mv "$ac_tmp/config.h" "$ac_file" \
23563	|| as_fn_error $? "could not create $ac_file" "$LINENO" 5
23564    fi
23565  else
23566    $as_echo "/* $configure_input  */" \
23567      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
23568      || as_fn_error $? "could not create -" "$LINENO" 5
23569  fi
23570 ;;
23571
23572  :C)  { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
23573$as_echo "$as_me: executing $ac_file commands" >&6;}
23574 ;;
23575  esac
23576
23577
23578  case $ac_file$ac_mode in
23579    "libtool":C)
23580
23581    # See if we are running on zsh, and set the options that allow our
23582    # commands through without removal of \ escapes.
23583    if test -n "${ZSH_VERSION+set}"; then
23584      setopt NO_GLOB_SUBST
23585    fi
23586
23587    cfgfile=${ofile}T
23588    trap "$RM \"$cfgfile\"; exit 1" 1 2 15
23589    $RM "$cfgfile"
23590
23591    cat <<_LT_EOF >> "$cfgfile"
23592#! $SHELL
23593# Generated automatically by $as_me ($PACKAGE) $VERSION
23594# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
23595# NOTE: Changes made to this file will be lost: look at ltmain.sh.
23596
23597# Provide generalized library-building support services.
23598# Written by Gordon Matzigkeit, 1996
23599
23600# Copyright (C) 2014 Free Software Foundation, Inc.
23601# This is free software; see the source for copying conditions.  There is NO
23602# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
23603
23604# GNU Libtool is free software; you can redistribute it and/or modify
23605# it under the terms of the GNU General Public License as published by
23606# the Free Software Foundation; either version 2 of of the License, or
23607# (at your option) any later version.
23608#
23609# As a special exception to the GNU General Public License, if you
23610# distribute this file as part of a program or library that is built
23611# using GNU Libtool, you may include this file under the  same
23612# distribution terms that you use for the rest of that program.
23613#
23614# GNU Libtool is distributed in the hope that it will be useful, but
23615# WITHOUT ANY WARRANTY; without even the implied warranty of
23616# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
23617# GNU General Public License for more details.
23618#
23619# You should have received a copy of the GNU General Public License
23620# along with this program.  If not, see <http://www.gnu.org/licenses/>.
23621
23622
23623# The names of the tagged configurations supported by this script.
23624available_tags=''
23625
23626# Configured defaults for sys_lib_dlsearch_path munging.
23627: \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"}
23628
23629# ### BEGIN LIBTOOL CONFIG
23630
23631# Which release of libtool.m4 was used?
23632macro_version=$macro_version
23633macro_revision=$macro_revision
23634
23635# Whether or not to build shared libraries.
23636build_libtool_libs=$enable_shared
23637
23638# Whether or not to build static libraries.
23639build_old_libs=$enable_static
23640
23641# What type of objects to build.
23642pic_mode=$pic_mode
23643
23644# Whether or not to optimize for fast installation.
23645fast_install=$enable_fast_install
23646
23647# Shared archive member basename,for filename based shared library versioning on AIX.
23648shared_archive_member_spec=$shared_archive_member_spec
23649
23650# Shell to use when invoking shell scripts.
23651SHELL=$lt_SHELL
23652
23653# An echo program that protects backslashes.
23654ECHO=$lt_ECHO
23655
23656# The PATH separator for the build system.
23657PATH_SEPARATOR=$lt_PATH_SEPARATOR
23658
23659# The host system.
23660host_alias=$host_alias
23661host=$host
23662host_os=$host_os
23663
23664# The build system.
23665build_alias=$build_alias
23666build=$build
23667build_os=$build_os
23668
23669# A sed program that does not truncate output.
23670SED=$lt_SED
23671
23672# Sed that helps us avoid accidentally triggering echo(1) options like -n.
23673Xsed="\$SED -e 1s/^X//"
23674
23675# A grep program that handles long lines.
23676GREP=$lt_GREP
23677
23678# An ERE matcher.
23679EGREP=$lt_EGREP
23680
23681# A literal string matcher.
23682FGREP=$lt_FGREP
23683
23684# A BSD- or MS-compatible name lister.
23685NM=$lt_NM
23686
23687# Whether we need soft or hard links.
23688LN_S=$lt_LN_S
23689
23690# What is the maximum length of a command?
23691max_cmd_len=$max_cmd_len
23692
23693# Object file suffix (normally "o").
23694objext=$ac_objext
23695
23696# Executable file suffix (normally "").
23697exeext=$exeext
23698
23699# whether the shell understands "unset".
23700lt_unset=$lt_unset
23701
23702# turn spaces into newlines.
23703SP2NL=$lt_lt_SP2NL
23704
23705# turn newlines into spaces.
23706NL2SP=$lt_lt_NL2SP
23707
23708# convert \$build file names to \$host format.
23709to_host_file_cmd=$lt_cv_to_host_file_cmd
23710
23711# convert \$build files to toolchain format.
23712to_tool_file_cmd=$lt_cv_to_tool_file_cmd
23713
23714# An object symbol dumper.
23715OBJDUMP=$lt_OBJDUMP
23716
23717# Method to check whether dependent libraries are shared objects.
23718deplibs_check_method=$lt_deplibs_check_method
23719
23720# Command to use when deplibs_check_method = "file_magic".
23721file_magic_cmd=$lt_file_magic_cmd
23722
23723# How to find potential files when deplibs_check_method = "file_magic".
23724file_magic_glob=$lt_file_magic_glob
23725
23726# Find potential files using nocaseglob when deplibs_check_method = "file_magic".
23727want_nocaseglob=$lt_want_nocaseglob
23728
23729# DLL creation program.
23730DLLTOOL=$lt_DLLTOOL
23731
23732# Command to associate shared and link libraries.
23733sharedlib_from_linklib_cmd=$lt_sharedlib_from_linklib_cmd
23734
23735# The archiver.
23736AR=$lt_AR
23737
23738# Flags to create an archive.
23739AR_FLAGS=$lt_AR_FLAGS
23740
23741# How to feed a file listing to the archiver.
23742archiver_list_spec=$lt_archiver_list_spec
23743
23744# A symbol stripping program.
23745STRIP=$lt_STRIP
23746
23747# Commands used to install an old-style archive.
23748RANLIB=$lt_RANLIB
23749old_postinstall_cmds=$lt_old_postinstall_cmds
23750old_postuninstall_cmds=$lt_old_postuninstall_cmds
23751
23752# Whether to use a lock for old archive extraction.
23753lock_old_archive_extraction=$lock_old_archive_extraction
23754
23755# A C compiler.
23756LTCC=$lt_CC
23757
23758# LTCC compiler flags.
23759LTCFLAGS=$lt_CFLAGS
23760
23761# Take the output of nm and produce a listing of raw symbols and C names.
23762global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
23763
23764# Transform the output of nm in a proper C declaration.
23765global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
23766
23767# Transform the output of nm into a list of symbols to manually relocate.
23768global_symbol_to_import=$lt_lt_cv_sys_global_symbol_to_import
23769
23770# Transform the output of nm in a C name address pair.
23771global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
23772
23773# Transform the output of nm in a C name address pair when lib prefix is needed.
23774global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix
23775
23776# The name lister interface.
23777nm_interface=$lt_lt_cv_nm_interface
23778
23779# Specify filename containing input files for \$NM.
23780nm_file_list_spec=$lt_nm_file_list_spec
23781
23782# The root where to search for dependent libraries,and where our libraries should be installed.
23783lt_sysroot=$lt_sysroot
23784
23785# Command to truncate a binary pipe.
23786lt_truncate_bin=$lt_lt_cv_truncate_bin
23787
23788# The name of the directory that contains temporary libtool files.
23789objdir=$objdir
23790
23791# Used to examine libraries when file_magic_cmd begins with "file".
23792MAGIC_CMD=$MAGIC_CMD
23793
23794# Must we lock files when doing compilation?
23795need_locks=$lt_need_locks
23796
23797# Manifest tool.
23798MANIFEST_TOOL=$lt_MANIFEST_TOOL
23799
23800# Tool to manipulate archived DWARF debug symbol files on Mac OS X.
23801DSYMUTIL=$lt_DSYMUTIL
23802
23803# Tool to change global to local symbols on Mac OS X.
23804NMEDIT=$lt_NMEDIT
23805
23806# Tool to manipulate fat objects and archives on Mac OS X.
23807LIPO=$lt_LIPO
23808
23809# ldd/readelf like tool for Mach-O binaries on Mac OS X.
23810OTOOL=$lt_OTOOL
23811
23812# ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4.
23813OTOOL64=$lt_OTOOL64
23814
23815# Old archive suffix (normally "a").
23816libext=$libext
23817
23818# Shared library suffix (normally ".so").
23819shrext_cmds=$lt_shrext_cmds
23820
23821# The commands to extract the exported symbol list from a shared archive.
23822extract_expsyms_cmds=$lt_extract_expsyms_cmds
23823
23824# Variables whose values should be saved in libtool wrapper scripts and
23825# restored at link time.
23826variables_saved_for_relink=$lt_variables_saved_for_relink
23827
23828# Do we need the "lib" prefix for modules?
23829need_lib_prefix=$need_lib_prefix
23830
23831# Do we need a version for libraries?
23832need_version=$need_version
23833
23834# Library versioning type.
23835version_type=$version_type
23836
23837# Shared library runtime path variable.
23838runpath_var=$runpath_var
23839
23840# Shared library path variable.
23841shlibpath_var=$shlibpath_var
23842
23843# Is shlibpath searched before the hard-coded library search path?
23844shlibpath_overrides_runpath=$shlibpath_overrides_runpath
23845
23846# Format of library name prefix.
23847libname_spec=$lt_libname_spec
23848
23849# List of archive names.  First name is the real one, the rest are links.
23850# The last name is the one that the linker finds with -lNAME
23851library_names_spec=$lt_library_names_spec
23852
23853# The coded name of the library, if different from the real name.
23854soname_spec=$lt_soname_spec
23855
23856# Permission mode override for installation of shared libraries.
23857install_override_mode=$lt_install_override_mode
23858
23859# Command to use after installation of a shared archive.
23860postinstall_cmds=$lt_postinstall_cmds
23861
23862# Command to use after uninstallation of a shared archive.
23863postuninstall_cmds=$lt_postuninstall_cmds
23864
23865# Commands used to finish a libtool library installation in a directory.
23866finish_cmds=$lt_finish_cmds
23867
23868# As "finish_cmds", except a single script fragment to be evaled but
23869# not shown.
23870finish_eval=$lt_finish_eval
23871
23872# Whether we should hardcode library paths into libraries.
23873hardcode_into_libs=$hardcode_into_libs
23874
23875# Compile-time system search path for libraries.
23876sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
23877
23878# Detected run-time system search path for libraries.
23879sys_lib_dlsearch_path_spec=$lt_configure_time_dlsearch_path
23880
23881# Explicit LT_SYS_LIBRARY_PATH set during ./configure time.
23882configure_time_lt_sys_library_path=$lt_configure_time_lt_sys_library_path
23883
23884# Whether dlopen is supported.
23885dlopen_support=$enable_dlopen
23886
23887# Whether dlopen of programs is supported.
23888dlopen_self=$enable_dlopen_self
23889
23890# Whether dlopen of statically linked programs is supported.
23891dlopen_self_static=$enable_dlopen_self_static
23892
23893# Commands to strip libraries.
23894old_striplib=$lt_old_striplib
23895striplib=$lt_striplib
23896
23897
23898# The linker used to build libraries.
23899LD=$lt_LD
23900
23901# How to create reloadable object files.
23902reload_flag=$lt_reload_flag
23903reload_cmds=$lt_reload_cmds
23904
23905# Commands used to build an old-style archive.
23906old_archive_cmds=$lt_old_archive_cmds
23907
23908# A language specific compiler.
23909CC=$lt_compiler
23910
23911# Is the compiler the GNU compiler?
23912with_gcc=$GCC
23913
23914# Compiler flag to turn off builtin functions.
23915no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag
23916
23917# Additional compiler flags for building library objects.
23918pic_flag=$lt_lt_prog_compiler_pic
23919
23920# How to pass a linker flag through the compiler.
23921wl=$lt_lt_prog_compiler_wl
23922
23923# Compiler flag to prevent dynamic linking.
23924link_static_flag=$lt_lt_prog_compiler_static
23925
23926# Does compiler simultaneously support -c and -o options?
23927compiler_c_o=$lt_lt_cv_prog_compiler_c_o
23928
23929# Whether or not to add -lc for building shared libraries.
23930build_libtool_need_lc=$archive_cmds_need_lc
23931
23932# Whether or not to disallow shared libs when runtime libs are static.
23933allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes
23934
23935# Compiler flag to allow reflexive dlopens.
23936export_dynamic_flag_spec=$lt_export_dynamic_flag_spec
23937
23938# Compiler flag to generate shared objects directly from archives.
23939whole_archive_flag_spec=$lt_whole_archive_flag_spec
23940
23941# Whether the compiler copes with passing no objects directly.
23942compiler_needs_object=$lt_compiler_needs_object
23943
23944# Create an old-style archive from a shared archive.
23945old_archive_from_new_cmds=$lt_old_archive_from_new_cmds
23946
23947# Create a temporary old-style archive to link instead of a shared archive.
23948old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds
23949
23950# Commands used to build a shared archive.
23951archive_cmds=$lt_archive_cmds
23952archive_expsym_cmds=$lt_archive_expsym_cmds
23953
23954# Commands used to build a loadable module if different from building
23955# a shared archive.
23956module_cmds=$lt_module_cmds
23957module_expsym_cmds=$lt_module_expsym_cmds
23958
23959# Whether we are building with GNU ld or not.
23960with_gnu_ld=$lt_with_gnu_ld
23961
23962# Flag that allows shared libraries with undefined symbols to be built.
23963allow_undefined_flag=$lt_allow_undefined_flag
23964
23965# Flag that enforces no undefined symbols.
23966no_undefined_flag=$lt_no_undefined_flag
23967
23968# Flag to hardcode \$libdir into a binary during linking.
23969# This must work even if \$libdir does not exist
23970hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
23971
23972# Whether we need a single "-rpath" flag with a separated argument.
23973hardcode_libdir_separator=$lt_hardcode_libdir_separator
23974
23975# Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes
23976# DIR into the resulting binary.
23977hardcode_direct=$hardcode_direct
23978
23979# Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes
23980# DIR into the resulting binary and the resulting library dependency is
23981# "absolute",i.e impossible to change by setting \$shlibpath_var if the
23982# library is relocated.
23983hardcode_direct_absolute=$hardcode_direct_absolute
23984
23985# Set to "yes" if using the -LDIR flag during linking hardcodes DIR
23986# into the resulting binary.
23987hardcode_minus_L=$hardcode_minus_L
23988
23989# Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
23990# into the resulting binary.
23991hardcode_shlibpath_var=$hardcode_shlibpath_var
23992
23993# Set to "yes" if building a shared library automatically hardcodes DIR
23994# into the library and all subsequent libraries and executables linked
23995# against it.
23996hardcode_automatic=$hardcode_automatic
23997
23998# Set to yes if linker adds runtime paths of dependent libraries
23999# to runtime path list.
24000inherit_rpath=$inherit_rpath
24001
24002# Whether libtool must link a program against all its dependency libraries.
24003link_all_deplibs=$link_all_deplibs
24004
24005# Set to "yes" if exported symbols are required.
24006always_export_symbols=$always_export_symbols
24007
24008# The commands to list exported symbols.
24009export_symbols_cmds=$lt_export_symbols_cmds
24010
24011# Symbols that should not be listed in the preloaded symbols.
24012exclude_expsyms=$lt_exclude_expsyms
24013
24014# Symbols that must always be exported.
24015include_expsyms=$lt_include_expsyms
24016
24017# Commands necessary for linking programs (against libraries) with templates.
24018prelink_cmds=$lt_prelink_cmds
24019
24020# Commands necessary for finishing linking programs.
24021postlink_cmds=$lt_postlink_cmds
24022
24023# Specify filename containing input files.
24024file_list_spec=$lt_file_list_spec
24025
24026# How to hardcode a shared library path into an executable.
24027hardcode_action=$hardcode_action
24028
24029# ### END LIBTOOL CONFIG
24030
24031_LT_EOF
24032
24033    cat <<'_LT_EOF' >> "$cfgfile"
24034
24035# ### BEGIN FUNCTIONS SHARED WITH CONFIGURE
24036
24037# func_munge_path_list VARIABLE PATH
24038# -----------------------------------
24039# VARIABLE is name of variable containing _space_ separated list of
24040# directories to be munged by the contents of PATH, which is string
24041# having a format:
24042# "DIR[:DIR]:"
24043#       string "DIR[ DIR]" will be prepended to VARIABLE
24044# ":DIR[:DIR]"
24045#       string "DIR[ DIR]" will be appended to VARIABLE
24046# "DIRP[:DIRP]::[DIRA:]DIRA"
24047#       string "DIRP[ DIRP]" will be prepended to VARIABLE and string
24048#       "DIRA[ DIRA]" will be appended to VARIABLE
24049# "DIR[:DIR]"
24050#       VARIABLE will be replaced by "DIR[ DIR]"
24051func_munge_path_list ()
24052{
24053    case x$2 in
24054    x)
24055        ;;
24056    *:)
24057        eval $1=\"`$ECHO $2 | $SED 's/:/ /g'` \$$1\"
24058        ;;
24059    x:*)
24060        eval $1=\"\$$1 `$ECHO $2 | $SED 's/:/ /g'`\"
24061        ;;
24062    *::*)
24063        eval $1=\"\$$1\ `$ECHO $2 | $SED -e 's/.*:://' -e 's/:/ /g'`\"
24064        eval $1=\"`$ECHO $2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \$$1\"
24065        ;;
24066    *)
24067        eval $1=\"`$ECHO $2 | $SED 's/:/ /g'`\"
24068        ;;
24069    esac
24070}
24071
24072
24073# Calculate cc_basename.  Skip known compiler wrappers and cross-prefix.
24074func_cc_basename ()
24075{
24076    for cc_temp in $*""; do
24077      case $cc_temp in
24078        compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
24079        distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
24080        \-*) ;;
24081        *) break;;
24082      esac
24083    done
24084    func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
24085}
24086
24087
24088# ### END FUNCTIONS SHARED WITH CONFIGURE
24089
24090_LT_EOF
24091
24092  case $host_os in
24093  aix3*)
24094    cat <<\_LT_EOF >> "$cfgfile"
24095# AIX sometimes has problems with the GCC collect2 program.  For some
24096# reason, if we set the COLLECT_NAMES environment variable, the problems
24097# vanish in a puff of smoke.
24098if test set != "${COLLECT_NAMES+set}"; then
24099  COLLECT_NAMES=
24100  export COLLECT_NAMES
24101fi
24102_LT_EOF
24103    ;;
24104  esac
24105
24106
24107ltmain=$ac_aux_dir/ltmain.sh
24108
24109
24110  # We use sed instead of cat because bash on DJGPP gets confused if
24111  # if finds mixed CR/LF and LF-only lines.  Since sed operates in
24112  # text mode, it properly converts lines to CR/LF.  This bash problem
24113  # is reportedly fixed, but why not run on old versions too?
24114  sed '$q' "$ltmain" >> "$cfgfile" \
24115     || (rm -f "$cfgfile"; exit 1)
24116
24117   mv -f "$cfgfile" "$ofile" ||
24118    (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
24119  chmod +x "$ofile"
24120
24121 ;;
24122    "disable-rpath":C)
24123	sed < libtool > libtool-2 \
24124	's/^hardcode_libdir_flag_spec.*$'/'hardcode_libdir_flag_spec=" -D__LIBTOOL_RPATH_SED__ "/'
24125	mv libtool-2 libtool
24126	chmod 755 libtool
24127	libtool="./libtool"
24128	 ;;
24129
24130  esac
24131done # for ac_tag
24132
24133
24134as_fn_exit 0
24135_ACEOF
24136ac_clean_files=$ac_clean_files_save
24137
24138test $ac_write_fail = 0 ||
24139  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
24140
24141
24142# configure is writing to config.log, and then calls config.status.
24143# config.status does its own redirection, appending to config.log.
24144# Unfortunately, on DOS this fails, as config.log is still kept open
24145# by configure, so config.status won't be able to write to it; its
24146# output is simply discarded.  So we exec the FD to /dev/null,
24147# effectively closing config.log, so it can be properly (re)opened and
24148# appended to by config.status.  When coming back to configure, we
24149# need to make the FD available again.
24150if test "$no_create" != yes; then
24151  ac_cs_success=:
24152  ac_config_status_args=
24153  test "$silent" = yes &&
24154    ac_config_status_args="$ac_config_status_args --quiet"
24155  exec 5>/dev/null
24156  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
24157  exec 5>>config.log
24158  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
24159  # would make configure fail if this is the last instruction.
24160  $ac_cs_success || as_fn_exit 1
24161fi
24162if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
24163  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
24164$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
24165fi
24166
24167