xref: /freebsd/contrib/unbound/configure (revision 28f42739a547ffe0b5dfaaf9f49fb4c4813aa232)
1#! /bin/sh
2# Guess values for system-dependent variables and create Makefiles.
3# Generated by GNU Autoconf 2.69 for unbound 1.5.1.
4#
5# Report bugs to <unbound-bugs@nlnetlabs.nl>.
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 about your system, including
279$0: any error possibly output before this message. Then
280$0: install a modern shell, or manually run the script
281$0: under such a shell if you do have one."
282  fi
283  exit 1
284fi
285fi
286fi
287SHELL=${CONFIG_SHELL-/bin/sh}
288export SHELL
289# Unset more variables known to interfere with behavior of common tools.
290CLICOLOR_FORCE= GREP_OPTIONS=
291unset CLICOLOR_FORCE GREP_OPTIONS
292
293## --------------------- ##
294## M4sh Shell Functions. ##
295## --------------------- ##
296# as_fn_unset VAR
297# ---------------
298# Portably unset VAR.
299as_fn_unset ()
300{
301  { eval $1=; unset $1;}
302}
303as_unset=as_fn_unset
304
305# as_fn_set_status STATUS
306# -----------------------
307# Set $? to STATUS, without forking.
308as_fn_set_status ()
309{
310  return $1
311} # as_fn_set_status
312
313# as_fn_exit STATUS
314# -----------------
315# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
316as_fn_exit ()
317{
318  set +e
319  as_fn_set_status $1
320  exit $1
321} # as_fn_exit
322
323# as_fn_mkdir_p
324# -------------
325# Create "$as_dir" as a directory, including parents if necessary.
326as_fn_mkdir_p ()
327{
328
329  case $as_dir in #(
330  -*) as_dir=./$as_dir;;
331  esac
332  test -d "$as_dir" || eval $as_mkdir_p || {
333    as_dirs=
334    while :; do
335      case $as_dir in #(
336      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
337      *) as_qdir=$as_dir;;
338      esac
339      as_dirs="'$as_qdir' $as_dirs"
340      as_dir=`$as_dirname -- "$as_dir" ||
341$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
342	 X"$as_dir" : 'X\(//\)[^/]' \| \
343	 X"$as_dir" : 'X\(//\)$' \| \
344	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
345$as_echo X"$as_dir" |
346    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
347	    s//\1/
348	    q
349	  }
350	  /^X\(\/\/\)[^/].*/{
351	    s//\1/
352	    q
353	  }
354	  /^X\(\/\/\)$/{
355	    s//\1/
356	    q
357	  }
358	  /^X\(\/\).*/{
359	    s//\1/
360	    q
361	  }
362	  s/.*/./; q'`
363      test -d "$as_dir" && break
364    done
365    test -z "$as_dirs" || eval "mkdir $as_dirs"
366  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
367
368
369} # as_fn_mkdir_p
370
371# as_fn_executable_p FILE
372# -----------------------
373# Test if FILE is an executable regular file.
374as_fn_executable_p ()
375{
376  test -f "$1" && test -x "$1"
377} # as_fn_executable_p
378# as_fn_append VAR VALUE
379# ----------------------
380# Append the text in VALUE to the end of the definition contained in VAR. Take
381# advantage of any shell optimizations that allow amortized linear growth over
382# repeated appends, instead of the typical quadratic growth present in naive
383# implementations.
384if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
385  eval 'as_fn_append ()
386  {
387    eval $1+=\$2
388  }'
389else
390  as_fn_append ()
391  {
392    eval $1=\$$1\$2
393  }
394fi # as_fn_append
395
396# as_fn_arith ARG...
397# ------------------
398# Perform arithmetic evaluation on the ARGs, and store the result in the
399# global $as_val. Take advantage of shells that can avoid forks. The arguments
400# must be portable across $(()) and expr.
401if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
402  eval 'as_fn_arith ()
403  {
404    as_val=$(( $* ))
405  }'
406else
407  as_fn_arith ()
408  {
409    as_val=`expr "$@" || test $? -eq 1`
410  }
411fi # as_fn_arith
412
413
414# as_fn_error STATUS ERROR [LINENO LOG_FD]
415# ----------------------------------------
416# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
417# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
418# script with STATUS, using 1 if that was 0.
419as_fn_error ()
420{
421  as_status=$1; test $as_status -eq 0 && as_status=1
422  if test "$4"; then
423    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
424    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
425  fi
426  $as_echo "$as_me: error: $2" >&2
427  as_fn_exit $as_status
428} # as_fn_error
429
430if expr a : '\(a\)' >/dev/null 2>&1 &&
431   test "X`expr 00001 : '.*\(...\)'`" = X001; then
432  as_expr=expr
433else
434  as_expr=false
435fi
436
437if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
438  as_basename=basename
439else
440  as_basename=false
441fi
442
443if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
444  as_dirname=dirname
445else
446  as_dirname=false
447fi
448
449as_me=`$as_basename -- "$0" ||
450$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
451	 X"$0" : 'X\(//\)$' \| \
452	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
453$as_echo X/"$0" |
454    sed '/^.*\/\([^/][^/]*\)\/*$/{
455	    s//\1/
456	    q
457	  }
458	  /^X\/\(\/\/\)$/{
459	    s//\1/
460	    q
461	  }
462	  /^X\/\(\/\).*/{
463	    s//\1/
464	    q
465	  }
466	  s/.*/./; q'`
467
468# Avoid depending upon Character Ranges.
469as_cr_letters='abcdefghijklmnopqrstuvwxyz'
470as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
471as_cr_Letters=$as_cr_letters$as_cr_LETTERS
472as_cr_digits='0123456789'
473as_cr_alnum=$as_cr_Letters$as_cr_digits
474
475
476  as_lineno_1=$LINENO as_lineno_1a=$LINENO
477  as_lineno_2=$LINENO as_lineno_2a=$LINENO
478  eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
479  test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
480  # Blame Lee E. McMahon (1931-1989) for sed's syntax.  :-)
481  sed -n '
482    p
483    /[$]LINENO/=
484  ' <$as_myself |
485    sed '
486      s/[$]LINENO.*/&-/
487      t lineno
488      b
489      :lineno
490      N
491      :loop
492      s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
493      t loop
494      s/-\n.*//
495    ' >$as_me.lineno &&
496  chmod +x "$as_me.lineno" ||
497    { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
498
499  # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
500  # already done that, so ensure we don't try to do so again and fall
501  # in an infinite loop.  This has already happened in practice.
502  _as_can_reexec=no; export _as_can_reexec
503  # Don't try to exec as it changes $[0], causing all sort of problems
504  # (the dirname of $[0] is not the place where we might find the
505  # original and so on.  Autoconf is especially sensitive to this).
506  . "./$as_me.lineno"
507  # Exit status is that of the last command.
508  exit
509}
510
511ECHO_C= ECHO_N= ECHO_T=
512case `echo -n x` in #(((((
513-n*)
514  case `echo 'xy\c'` in
515  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
516  xy)  ECHO_C='\c';;
517  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
518       ECHO_T='	';;
519  esac;;
520*)
521  ECHO_N='-n';;
522esac
523
524rm -f conf$$ conf$$.exe conf$$.file
525if test -d conf$$.dir; then
526  rm -f conf$$.dir/conf$$.file
527else
528  rm -f conf$$.dir
529  mkdir conf$$.dir 2>/dev/null
530fi
531if (echo >conf$$.file) 2>/dev/null; then
532  if ln -s conf$$.file conf$$ 2>/dev/null; then
533    as_ln_s='ln -s'
534    # ... but there are two gotchas:
535    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
536    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
537    # In both cases, we have to default to `cp -pR'.
538    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
539      as_ln_s='cp -pR'
540  elif ln conf$$.file conf$$ 2>/dev/null; then
541    as_ln_s=ln
542  else
543    as_ln_s='cp -pR'
544  fi
545else
546  as_ln_s='cp -pR'
547fi
548rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
549rmdir conf$$.dir 2>/dev/null
550
551if mkdir -p . 2>/dev/null; then
552  as_mkdir_p='mkdir -p "$as_dir"'
553else
554  test -d ./-p && rmdir ./-p
555  as_mkdir_p=false
556fi
557
558as_test_x='test -x'
559as_executable_p=as_fn_executable_p
560
561# Sed expression to map a string onto a valid CPP name.
562as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
563
564# Sed expression to map a string onto a valid variable name.
565as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
566
567SHELL=${CONFIG_SHELL-/bin/sh}
568
569
570test -n "$DJDIR" || exec 7<&0 </dev/null
571exec 6>&1
572
573# Name of the host.
574# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
575# so uname gets run too.
576ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
577
578#
579# Initializations.
580#
581ac_default_prefix=/usr/local
582ac_clean_files=
583ac_config_libobj_dir=.
584LIBOBJS=
585cross_compiling=no
586subdirs=
587MFLAGS=
588MAKEFLAGS=
589
590# Identity of this package.
591PACKAGE_NAME='unbound'
592PACKAGE_TARNAME='unbound'
593PACKAGE_VERSION='1.5.1'
594PACKAGE_STRING='unbound 1.5.1'
595PACKAGE_BUGREPORT='unbound-bugs@nlnetlabs.nl'
596PACKAGE_URL=''
597
598# Factoring default headers for most tests.
599ac_includes_default="\
600#include <stdio.h>
601#ifdef HAVE_SYS_TYPES_H
602# include <sys/types.h>
603#endif
604#ifdef HAVE_SYS_STAT_H
605# include <sys/stat.h>
606#endif
607#ifdef STDC_HEADERS
608# include <stdlib.h>
609# include <stddef.h>
610#else
611# ifdef HAVE_STDLIB_H
612#  include <stdlib.h>
613# endif
614#endif
615#ifdef HAVE_STRING_H
616# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
617#  include <memory.h>
618# endif
619# include <string.h>
620#endif
621#ifdef HAVE_STRINGS_H
622# include <strings.h>
623#endif
624#ifdef HAVE_INTTYPES_H
625# include <inttypes.h>
626#endif
627#ifdef HAVE_STDINT_H
628# include <stdint.h>
629#endif
630#ifdef HAVE_UNISTD_H
631# include <unistd.h>
632#endif"
633
634ac_subst_vars='LTLIBOBJS
635date
636version
637INSTALLTARGET
638ALLTARGET
639SOURCEFILE
640SOURCEDETERMINE
641DNSTAP_OBJ
642DNSTAP_SRC
643opt_dnstap_socket_path
644ENABLE_DNSTAP
645PROTOC_C
646UBSYMS
647EXTRALINK
648COMMON_OBJ_ALL_SYMBOLS
649LIBOBJ_WITHOUT_CTIME
650LIBOBJ_WITHOUT_CTIMEARC4
651WIN_CHECKCONF_OBJ_LINK
652WIN_CONTROL_OBJ_LINK
653WIN_UBANCHOR_OBJ_LINK
654WIN_HOST_OBJ_LINK
655WIN_DAEMON_OBJ_LINK
656WIN_DAEMON_OBJ
657WIN_DAEMON_SRC
658WINAPPS
659WINDRES
660CHECKLOCK_OBJ
661staticexe
662UNBOUND_EVENT_UNINSTALL
663UNBOUND_EVENT_INSTALL
664HAVE_SSL
665CONFIG_DATE
666NETBSD_LINTFLAGS
667PYUNBOUND_UNINSTALL
668PYUNBOUND_INSTALL
669PYUNBOUND_TARGET
670PYUNBOUND_OBJ
671WITH_PYUNBOUND
672PYTHONMOD_UNINSTALL
673PYTHONMOD_INSTALL
674PYTHONMOD_HEADER
675PYTHONMOD_OBJ
676WITH_PYTHONMODULE
677swig
678SWIG_LIB
679SWIG
680PYTHON_SITE_PKG
681PYTHON_LDFLAGS
682PYTHON_CPPFLAGS
683PYTHON
684PYTHON_VERSION
685PTHREAD_CFLAGS
686PTHREAD_LIBS
687PTHREAD_CC
688ax_pthread_config
689RUNTIME_PATH
690LIBOBJS
691OTOOL64
692OTOOL
693LIPO
694NMEDIT
695DSYMUTIL
696MANIFEST_TOOL
697AWK
698RANLIB
699ac_ct_AR
700DLLTOOL
701OBJDUMP
702LN_S
703NM
704ac_ct_DUMPBIN
705DUMPBIN
706LD
707FGREP
708SED
709LIBTOOL
710AR
711host_os
712host_vendor
713host_cpu
714host
715build_os
716build_vendor
717build_cpu
718build
719libtool
720STRIP
721doxygen
722YFLAGS
723YACC
724LEXLIB
725LEX_OUTPUT_ROOT
726LEX
727debug_enabled
728DEPFLAG
729UNBOUND_USERNAME
730UNBOUND_ROOTCERT_FILE
731UNBOUND_ROOTKEY_FILE
732UNBOUND_PIDFILE
733UNBOUND_SHARE_DIR
734UNBOUND_CHROOT_DIR
735UNBOUND_RUN_DIR
736ub_conf_file
737EGREP
738GREP
739CPP
740OBJEXT
741EXEEXT
742ac_ct_CC
743CPPFLAGS
744LDFLAGS
745CFLAGS
746CC
747LIBUNBOUND_AGE
748LIBUNBOUND_REVISION
749LIBUNBOUND_CURRENT
750UNBOUND_VERSION_MICRO
751UNBOUND_VERSION_MINOR
752UNBOUND_VERSION_MAJOR
753target_alias
754host_alias
755build_alias
756LIBS
757ECHO_T
758ECHO_N
759ECHO_C
760DEFS
761mandir
762localedir
763libdir
764psdir
765pdfdir
766dvidir
767htmldir
768infodir
769docdir
770oldincludedir
771includedir
772localstatedir
773sharedstatedir
774sysconfdir
775datadir
776datarootdir
777libexecdir
778sbindir
779bindir
780program_transform_name
781prefix
782exec_prefix
783PACKAGE_URL
784PACKAGE_BUGREPORT
785PACKAGE_STRING
786PACKAGE_VERSION
787PACKAGE_TARNAME
788PACKAGE_NAME
789PATH_SEPARATOR
790SHELL'
791ac_subst_files=''
792ac_user_opts='
793enable_option_checking
794with_conf_file
795with_run_dir
796with_chroot_dir
797with_share_dir
798with_pidfile
799with_rootkey_file
800with_rootcert_file
801with_username
802enable_checking
803enable_debug
804enable_flto
805enable_shared
806enable_static
807with_pic
808enable_fast_install
809with_gnu_ld
810with_sysroot
811enable_libtool_lock
812enable_rpath
813enable_largefile
814enable_alloc_checks
815enable_alloc_lite
816enable_alloc_nonregional
817with_pthreads
818with_solaris_threads
819with_pyunbound
820with_pythonmodule
821with_nss
822with_ssl
823enable_sha2
824enable_gost
825enable_ecdsa
826enable_event_api
827with_libevent
828with_libexpat
829enable_static_exe
830enable_lock_checks
831enable_allsymbols
832enable_dnstap
833with_dnstap_socket_path
834with_protobuf_c
835with_libfstrm
836with_libunbound_only
837'
838      ac_precious_vars='build_alias
839host_alias
840target_alias
841CC
842CFLAGS
843LDFLAGS
844LIBS
845CPPFLAGS
846CPP
847YACC
848YFLAGS
849PYTHON_VERSION'
850
851
852# Initialize some variables set by options.
853ac_init_help=
854ac_init_version=false
855ac_unrecognized_opts=
856ac_unrecognized_sep=
857# The variables have the same names as the options, with
858# dashes changed to underlines.
859cache_file=/dev/null
860exec_prefix=NONE
861no_create=
862no_recursion=
863prefix=NONE
864program_prefix=NONE
865program_suffix=NONE
866program_transform_name=s,x,x,
867silent=
868site=
869srcdir=
870verbose=
871x_includes=NONE
872x_libraries=NONE
873
874# Installation directory options.
875# These are left unexpanded so users can "make install exec_prefix=/foo"
876# and all the variables that are supposed to be based on exec_prefix
877# by default will actually change.
878# Use braces instead of parens because sh, perl, etc. also accept them.
879# (The list follows the same order as the GNU Coding Standards.)
880bindir='${exec_prefix}/bin'
881sbindir='${exec_prefix}/sbin'
882libexecdir='${exec_prefix}/libexec'
883datarootdir='${prefix}/share'
884datadir='${datarootdir}'
885sysconfdir='${prefix}/etc'
886sharedstatedir='${prefix}/com'
887localstatedir='${prefix}/var'
888includedir='${prefix}/include'
889oldincludedir='/usr/include'
890docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
891infodir='${datarootdir}/info'
892htmldir='${docdir}'
893dvidir='${docdir}'
894pdfdir='${docdir}'
895psdir='${docdir}'
896libdir='${exec_prefix}/lib'
897localedir='${datarootdir}/locale'
898mandir='${datarootdir}/man'
899
900ac_prev=
901ac_dashdash=
902for ac_option
903do
904  # If the previous option needs an argument, assign it.
905  if test -n "$ac_prev"; then
906    eval $ac_prev=\$ac_option
907    ac_prev=
908    continue
909  fi
910
911  case $ac_option in
912  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
913  *=)   ac_optarg= ;;
914  *)    ac_optarg=yes ;;
915  esac
916
917  # Accept the important Cygnus configure options, so we can diagnose typos.
918
919  case $ac_dashdash$ac_option in
920  --)
921    ac_dashdash=yes ;;
922
923  -bindir | --bindir | --bindi | --bind | --bin | --bi)
924    ac_prev=bindir ;;
925  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
926    bindir=$ac_optarg ;;
927
928  -build | --build | --buil | --bui | --bu)
929    ac_prev=build_alias ;;
930  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
931    build_alias=$ac_optarg ;;
932
933  -cache-file | --cache-file | --cache-fil | --cache-fi \
934  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
935    ac_prev=cache_file ;;
936  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
937  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
938    cache_file=$ac_optarg ;;
939
940  --config-cache | -C)
941    cache_file=config.cache ;;
942
943  -datadir | --datadir | --datadi | --datad)
944    ac_prev=datadir ;;
945  -datadir=* | --datadir=* | --datadi=* | --datad=*)
946    datadir=$ac_optarg ;;
947
948  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
949  | --dataroo | --dataro | --datar)
950    ac_prev=datarootdir ;;
951  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
952  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
953    datarootdir=$ac_optarg ;;
954
955  -disable-* | --disable-*)
956    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
957    # Reject names that are not valid shell variable names.
958    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
959      as_fn_error $? "invalid feature name: $ac_useropt"
960    ac_useropt_orig=$ac_useropt
961    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
962    case $ac_user_opts in
963      *"
964"enable_$ac_useropt"
965"*) ;;
966      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
967	 ac_unrecognized_sep=', ';;
968    esac
969    eval enable_$ac_useropt=no ;;
970
971  -docdir | --docdir | --docdi | --doc | --do)
972    ac_prev=docdir ;;
973  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
974    docdir=$ac_optarg ;;
975
976  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
977    ac_prev=dvidir ;;
978  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
979    dvidir=$ac_optarg ;;
980
981  -enable-* | --enable-*)
982    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
983    # Reject names that are not valid shell variable names.
984    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
985      as_fn_error $? "invalid feature name: $ac_useropt"
986    ac_useropt_orig=$ac_useropt
987    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
988    case $ac_user_opts in
989      *"
990"enable_$ac_useropt"
991"*) ;;
992      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
993	 ac_unrecognized_sep=', ';;
994    esac
995    eval enable_$ac_useropt=\$ac_optarg ;;
996
997  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
998  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
999  | --exec | --exe | --ex)
1000    ac_prev=exec_prefix ;;
1001  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1002  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1003  | --exec=* | --exe=* | --ex=*)
1004    exec_prefix=$ac_optarg ;;
1005
1006  -gas | --gas | --ga | --g)
1007    # Obsolete; use --with-gas.
1008    with_gas=yes ;;
1009
1010  -help | --help | --hel | --he | -h)
1011    ac_init_help=long ;;
1012  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1013    ac_init_help=recursive ;;
1014  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1015    ac_init_help=short ;;
1016
1017  -host | --host | --hos | --ho)
1018    ac_prev=host_alias ;;
1019  -host=* | --host=* | --hos=* | --ho=*)
1020    host_alias=$ac_optarg ;;
1021
1022  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1023    ac_prev=htmldir ;;
1024  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1025  | --ht=*)
1026    htmldir=$ac_optarg ;;
1027
1028  -includedir | --includedir | --includedi | --included | --include \
1029  | --includ | --inclu | --incl | --inc)
1030    ac_prev=includedir ;;
1031  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1032  | --includ=* | --inclu=* | --incl=* | --inc=*)
1033    includedir=$ac_optarg ;;
1034
1035  -infodir | --infodir | --infodi | --infod | --info | --inf)
1036    ac_prev=infodir ;;
1037  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1038    infodir=$ac_optarg ;;
1039
1040  -libdir | --libdir | --libdi | --libd)
1041    ac_prev=libdir ;;
1042  -libdir=* | --libdir=* | --libdi=* | --libd=*)
1043    libdir=$ac_optarg ;;
1044
1045  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1046  | --libexe | --libex | --libe)
1047    ac_prev=libexecdir ;;
1048  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1049  | --libexe=* | --libex=* | --libe=*)
1050    libexecdir=$ac_optarg ;;
1051
1052  -localedir | --localedir | --localedi | --localed | --locale)
1053    ac_prev=localedir ;;
1054  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1055    localedir=$ac_optarg ;;
1056
1057  -localstatedir | --localstatedir | --localstatedi | --localstated \
1058  | --localstate | --localstat | --localsta | --localst | --locals)
1059    ac_prev=localstatedir ;;
1060  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1061  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1062    localstatedir=$ac_optarg ;;
1063
1064  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1065    ac_prev=mandir ;;
1066  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1067    mandir=$ac_optarg ;;
1068
1069  -nfp | --nfp | --nf)
1070    # Obsolete; use --without-fp.
1071    with_fp=no ;;
1072
1073  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1074  | --no-cr | --no-c | -n)
1075    no_create=yes ;;
1076
1077  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1078  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1079    no_recursion=yes ;;
1080
1081  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1082  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1083  | --oldin | --oldi | --old | --ol | --o)
1084    ac_prev=oldincludedir ;;
1085  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1086  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1087  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1088    oldincludedir=$ac_optarg ;;
1089
1090  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1091    ac_prev=prefix ;;
1092  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1093    prefix=$ac_optarg ;;
1094
1095  -program-prefix | --program-prefix | --program-prefi | --program-pref \
1096  | --program-pre | --program-pr | --program-p)
1097    ac_prev=program_prefix ;;
1098  -program-prefix=* | --program-prefix=* | --program-prefi=* \
1099  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1100    program_prefix=$ac_optarg ;;
1101
1102  -program-suffix | --program-suffix | --program-suffi | --program-suff \
1103  | --program-suf | --program-su | --program-s)
1104    ac_prev=program_suffix ;;
1105  -program-suffix=* | --program-suffix=* | --program-suffi=* \
1106  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1107    program_suffix=$ac_optarg ;;
1108
1109  -program-transform-name | --program-transform-name \
1110  | --program-transform-nam | --program-transform-na \
1111  | --program-transform-n | --program-transform- \
1112  | --program-transform | --program-transfor \
1113  | --program-transfo | --program-transf \
1114  | --program-trans | --program-tran \
1115  | --progr-tra | --program-tr | --program-t)
1116    ac_prev=program_transform_name ;;
1117  -program-transform-name=* | --program-transform-name=* \
1118  | --program-transform-nam=* | --program-transform-na=* \
1119  | --program-transform-n=* | --program-transform-=* \
1120  | --program-transform=* | --program-transfor=* \
1121  | --program-transfo=* | --program-transf=* \
1122  | --program-trans=* | --program-tran=* \
1123  | --progr-tra=* | --program-tr=* | --program-t=*)
1124    program_transform_name=$ac_optarg ;;
1125
1126  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1127    ac_prev=pdfdir ;;
1128  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1129    pdfdir=$ac_optarg ;;
1130
1131  -psdir | --psdir | --psdi | --psd | --ps)
1132    ac_prev=psdir ;;
1133  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1134    psdir=$ac_optarg ;;
1135
1136  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1137  | -silent | --silent | --silen | --sile | --sil)
1138    silent=yes ;;
1139
1140  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1141    ac_prev=sbindir ;;
1142  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1143  | --sbi=* | --sb=*)
1144    sbindir=$ac_optarg ;;
1145
1146  -sharedstatedir | --sharedstatedir | --sharedstatedi \
1147  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1148  | --sharedst | --shareds | --shared | --share | --shar \
1149  | --sha | --sh)
1150    ac_prev=sharedstatedir ;;
1151  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1152  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1153  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1154  | --sha=* | --sh=*)
1155    sharedstatedir=$ac_optarg ;;
1156
1157  -site | --site | --sit)
1158    ac_prev=site ;;
1159  -site=* | --site=* | --sit=*)
1160    site=$ac_optarg ;;
1161
1162  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1163    ac_prev=srcdir ;;
1164  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1165    srcdir=$ac_optarg ;;
1166
1167  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1168  | --syscon | --sysco | --sysc | --sys | --sy)
1169    ac_prev=sysconfdir ;;
1170  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1171  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1172    sysconfdir=$ac_optarg ;;
1173
1174  -target | --target | --targe | --targ | --tar | --ta | --t)
1175    ac_prev=target_alias ;;
1176  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1177    target_alias=$ac_optarg ;;
1178
1179  -v | -verbose | --verbose | --verbos | --verbo | --verb)
1180    verbose=yes ;;
1181
1182  -version | --version | --versio | --versi | --vers | -V)
1183    ac_init_version=: ;;
1184
1185  -with-* | --with-*)
1186    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1187    # Reject names that are not valid shell variable names.
1188    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1189      as_fn_error $? "invalid package name: $ac_useropt"
1190    ac_useropt_orig=$ac_useropt
1191    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1192    case $ac_user_opts in
1193      *"
1194"with_$ac_useropt"
1195"*) ;;
1196      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1197	 ac_unrecognized_sep=', ';;
1198    esac
1199    eval with_$ac_useropt=\$ac_optarg ;;
1200
1201  -without-* | --without-*)
1202    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1203    # Reject names that are not valid shell variable names.
1204    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1205      as_fn_error $? "invalid package name: $ac_useropt"
1206    ac_useropt_orig=$ac_useropt
1207    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1208    case $ac_user_opts in
1209      *"
1210"with_$ac_useropt"
1211"*) ;;
1212      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1213	 ac_unrecognized_sep=', ';;
1214    esac
1215    eval with_$ac_useropt=no ;;
1216
1217  --x)
1218    # Obsolete; use --with-x.
1219    with_x=yes ;;
1220
1221  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1222  | --x-incl | --x-inc | --x-in | --x-i)
1223    ac_prev=x_includes ;;
1224  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1225  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1226    x_includes=$ac_optarg ;;
1227
1228  -x-libraries | --x-libraries | --x-librarie | --x-librari \
1229  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1230    ac_prev=x_libraries ;;
1231  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1232  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1233    x_libraries=$ac_optarg ;;
1234
1235  -*) as_fn_error $? "unrecognized option: \`$ac_option'
1236Try \`$0 --help' for more information"
1237    ;;
1238
1239  *=*)
1240    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1241    # Reject names that are not valid shell variable names.
1242    case $ac_envvar in #(
1243      '' | [0-9]* | *[!_$as_cr_alnum]* )
1244      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1245    esac
1246    eval $ac_envvar=\$ac_optarg
1247    export $ac_envvar ;;
1248
1249  *)
1250    # FIXME: should be removed in autoconf 3.0.
1251    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1252    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1253      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1254    : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1255    ;;
1256
1257  esac
1258done
1259
1260if test -n "$ac_prev"; then
1261  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1262  as_fn_error $? "missing argument to $ac_option"
1263fi
1264
1265if test -n "$ac_unrecognized_opts"; then
1266  case $enable_option_checking in
1267    no) ;;
1268    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1269    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1270  esac
1271fi
1272
1273# Check all directory arguments for consistency.
1274for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
1275		datadir sysconfdir sharedstatedir localstatedir includedir \
1276		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1277		libdir localedir mandir
1278do
1279  eval ac_val=\$$ac_var
1280  # Remove trailing slashes.
1281  case $ac_val in
1282    */ )
1283      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1284      eval $ac_var=\$ac_val;;
1285  esac
1286  # Be sure to have absolute directory names.
1287  case $ac_val in
1288    [\\/$]* | ?:[\\/]* )  continue;;
1289    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1290  esac
1291  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1292done
1293
1294# There might be people who depend on the old broken behavior: `$host'
1295# used to hold the argument of --host etc.
1296# FIXME: To remove some day.
1297build=$build_alias
1298host=$host_alias
1299target=$target_alias
1300
1301# FIXME: To remove some day.
1302if test "x$host_alias" != x; then
1303  if test "x$build_alias" = x; then
1304    cross_compiling=maybe
1305  elif test "x$build_alias" != "x$host_alias"; then
1306    cross_compiling=yes
1307  fi
1308fi
1309
1310ac_tool_prefix=
1311test -n "$host_alias" && ac_tool_prefix=$host_alias-
1312
1313test "$silent" = yes && exec 6>/dev/null
1314
1315
1316ac_pwd=`pwd` && test -n "$ac_pwd" &&
1317ac_ls_di=`ls -di .` &&
1318ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1319  as_fn_error $? "working directory cannot be determined"
1320test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1321  as_fn_error $? "pwd does not report name of working directory"
1322
1323
1324# Find the source files, if location was not specified.
1325if test -z "$srcdir"; then
1326  ac_srcdir_defaulted=yes
1327  # Try the directory containing this script, then the parent directory.
1328  ac_confdir=`$as_dirname -- "$as_myself" ||
1329$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1330	 X"$as_myself" : 'X\(//\)[^/]' \| \
1331	 X"$as_myself" : 'X\(//\)$' \| \
1332	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1333$as_echo X"$as_myself" |
1334    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1335	    s//\1/
1336	    q
1337	  }
1338	  /^X\(\/\/\)[^/].*/{
1339	    s//\1/
1340	    q
1341	  }
1342	  /^X\(\/\/\)$/{
1343	    s//\1/
1344	    q
1345	  }
1346	  /^X\(\/\).*/{
1347	    s//\1/
1348	    q
1349	  }
1350	  s/.*/./; q'`
1351  srcdir=$ac_confdir
1352  if test ! -r "$srcdir/$ac_unique_file"; then
1353    srcdir=..
1354  fi
1355else
1356  ac_srcdir_defaulted=no
1357fi
1358if test ! -r "$srcdir/$ac_unique_file"; then
1359  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1360  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1361fi
1362ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1363ac_abs_confdir=`(
1364	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1365	pwd)`
1366# When building in place, set srcdir=.
1367if test "$ac_abs_confdir" = "$ac_pwd"; then
1368  srcdir=.
1369fi
1370# Remove unnecessary trailing slashes from srcdir.
1371# Double slashes in file names in object file debugging info
1372# mess up M-x gdb in Emacs.
1373case $srcdir in
1374*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1375esac
1376for ac_var in $ac_precious_vars; do
1377  eval ac_env_${ac_var}_set=\${${ac_var}+set}
1378  eval ac_env_${ac_var}_value=\$${ac_var}
1379  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1380  eval ac_cv_env_${ac_var}_value=\$${ac_var}
1381done
1382
1383#
1384# Report the --help message.
1385#
1386if test "$ac_init_help" = "long"; then
1387  # Omit some internal or obsolete options to make the list less imposing.
1388  # This message is too long to be a string in the A/UX 3.1 sh.
1389  cat <<_ACEOF
1390\`configure' configures unbound 1.5.1 to adapt to many kinds of systems.
1391
1392Usage: $0 [OPTION]... [VAR=VALUE]...
1393
1394To assign environment variables (e.g., CC, CFLAGS...), specify them as
1395VAR=VALUE.  See below for descriptions of some of the useful variables.
1396
1397Defaults for the options are specified in brackets.
1398
1399Configuration:
1400  -h, --help              display this help and exit
1401      --help=short        display options specific to this package
1402      --help=recursive    display the short help of all the included packages
1403  -V, --version           display version information and exit
1404  -q, --quiet, --silent   do not print \`checking ...' messages
1405      --cache-file=FILE   cache test results in FILE [disabled]
1406  -C, --config-cache      alias for \`--cache-file=config.cache'
1407  -n, --no-create         do not create output files
1408      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1409
1410Installation directories:
1411  --prefix=PREFIX         install architecture-independent files in PREFIX
1412                          [$ac_default_prefix]
1413  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1414                          [PREFIX]
1415
1416By default, \`make install' will install all the files in
1417\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1418an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1419for instance \`--prefix=\$HOME'.
1420
1421For better control, use the options below.
1422
1423Fine tuning of the installation directories:
1424  --bindir=DIR            user executables [EPREFIX/bin]
1425  --sbindir=DIR           system admin executables [EPREFIX/sbin]
1426  --libexecdir=DIR        program executables [EPREFIX/libexec]
1427  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1428  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1429  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1430  --libdir=DIR            object code libraries [EPREFIX/lib]
1431  --includedir=DIR        C header files [PREFIX/include]
1432  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1433  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1434  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1435  --infodir=DIR           info documentation [DATAROOTDIR/info]
1436  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1437  --mandir=DIR            man documentation [DATAROOTDIR/man]
1438  --docdir=DIR            documentation root [DATAROOTDIR/doc/unbound]
1439  --htmldir=DIR           html documentation [DOCDIR]
1440  --dvidir=DIR            dvi documentation [DOCDIR]
1441  --pdfdir=DIR            pdf documentation [DOCDIR]
1442  --psdir=DIR             ps documentation [DOCDIR]
1443_ACEOF
1444
1445  cat <<\_ACEOF
1446
1447System types:
1448  --build=BUILD     configure for building on BUILD [guessed]
1449  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1450_ACEOF
1451fi
1452
1453if test -n "$ac_init_help"; then
1454  case $ac_init_help in
1455     short | recursive ) echo "Configuration of unbound 1.5.1:";;
1456   esac
1457  cat <<\_ACEOF
1458
1459Optional Features:
1460  --disable-option-checking  ignore unrecognized --enable/--with options
1461  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1462  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1463  --enable-checking       Enable warnings, asserts, makefile-dependencies
1464  --enable-debug          same as enable-checking
1465  --disable-flto          Disable link-time optimization (gcc specific option)
1466  --enable-shared[=PKGS]  build shared libraries [default=yes]
1467  --enable-static[=PKGS]  build static libraries [default=yes]
1468  --enable-fast-install[=PKGS]
1469                          optimize for fast installation [default=yes]
1470  --disable-libtool-lock  avoid locking (might break parallel builds)
1471  --disable-rpath         disable hardcoded rpath (default=enabled)
1472  --disable-largefile     omit support for large files
1473  --enable-alloc-checks   enable to memory allocation statistics, for debug
1474                          purposes
1475  --enable-alloc-lite     enable for lightweight alloc assertions, for debug
1476                          purposes
1477  --enable-alloc-nonregional
1478                          enable nonregional allocs, slow but exposes regional
1479                          allocations to other memory purifiers, for debug
1480                          purposes
1481  --disable-sha2          Disable SHA256 and SHA512 RRSIG support
1482  --disable-gost          Disable GOST support
1483  --disable-ecdsa         Disable ECDSA support
1484  --enable-event-api      Enable (experimental) libevent-based libunbound API
1485                          installed to unbound-event.h
1486  --enable-static-exe     enable to compile executables statically against
1487                          (event) libs, for debug purposes
1488  --enable-lock-checks    enable to check lock and unlock calls, for debug
1489                          purposes
1490  --enable-allsymbols     export all symbols from libunbound and link binaries
1491                          to it, smaller install size but libunbound export
1492                          table is polluted by internal symbols
1493  --enable-dnstap         Enable dnstap support (requires fstrm, protobuf-c)
1494
1495Optional Packages:
1496  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1497  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1498  --with-conf-file=path   Pathname to the Unbound configuration file
1499  --with-run-dir=path     set default directory to chdir to (by default dir
1500                          part of cfg file)
1501  --with-chroot-dir=path  set default directory to chroot to (by default same
1502                          as run-dir)
1503  --with-share-dir=path   set default directory with shared data (by default
1504                          same as share/unbound)
1505  --with-pidfile=filename set default pathname to unbound pidfile (default
1506                          run-dir/unbound.pid)
1507  --with-rootkey-file=filename
1508                          set default pathname to root key file (default
1509                          run-dir/root.key). This file is read and written.
1510  --with-rootcert-file=filename
1511                          set default pathname to root update certificate file
1512                          (default run-dir/icannbundle.pem). This file need
1513                          not exist if you are content with the builtin.
1514  --with-username=user    set default user that unbound changes to (default
1515                          user is unbound)
1516  --with-pic[=PKGS]       try to use only PIC/non-PIC objects [default=use
1517                          both]
1518  --with-gnu-ld           assume the C compiler uses GNU ld [default=no]
1519  --with-sysroot[=DIR]    Search for dependent libraries within DIR (or the
1520                          compiler's sysroot if not specified).
1521  --with-pthreads         use pthreads library, or --without-pthreads to
1522                          disable threading support.
1523  --with-solaris-threads  use solaris native thread library.
1524  --with-pyunbound        build PyUnbound, or --without-pyunbound to skip it.
1525                          (default=no)
1526  --with-pythonmodule     build Python module, or --without-pythonmodule to
1527                          disable script engine. (default=no)
1528  --with-nss=path         use libnss instead of openssl, installed at path.
1529  --with-ssl=pathname     enable SSL (will check /usr/local/ssl /usr/lib/ssl
1530                          /usr/ssl /usr/pkg /usr/local /opt/local /usr/sfw
1531                          /usr)
1532  --with-libevent=pathname
1533                          use libevent (will check /usr/local /opt/local
1534                          /usr/lib /usr/pkg /usr/sfw /usr or you can specify
1535                          an explicit path). Slower, but allows use of large
1536                          outgoing port ranges.
1537  --with-libexpat=path    specify explicit path for libexpat.
1538  --with-dnstap-socket-path=pathname
1539                          set default dnstap socket path
1540  --with-protobuf-c=path  Path where protobuf-c is installed, for dnstap
1541  --with-libfstrm=path    Path where libfstrm is installed, for dnstap
1542  --with-libunbound-only  do not build daemon and tool programs
1543
1544Some influential environment variables:
1545  CC          C compiler command
1546  CFLAGS      C compiler flags
1547  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
1548              nonstandard directory <lib dir>
1549  LIBS        libraries to pass to the linker, e.g. -l<library>
1550  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1551              you have headers in a nonstandard directory <include dir>
1552  CPP         C preprocessor
1553  YACC        The `Yet Another Compiler Compiler' implementation to use.
1554              Defaults to the first program found out of: `bison -y', `byacc',
1555              `yacc'.
1556  YFLAGS      The list of arguments that will be passed by default to $YACC.
1557              This script will default YFLAGS to the empty string to avoid a
1558              default value of `-d' given by some make applications.
1559  PYTHON_VERSION
1560              The installed Python version to use, for example '2.3'. This
1561              string will be appended to the Python interpreter canonical
1562              name.
1563
1564Use these variables to override the choices made by `configure' or to help
1565it to find libraries and programs with nonstandard names/locations.
1566
1567Report bugs to <unbound-bugs@nlnetlabs.nl>.
1568_ACEOF
1569ac_status=$?
1570fi
1571
1572if test "$ac_init_help" = "recursive"; then
1573  # If there are subdirs, report their specific --help.
1574  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1575    test -d "$ac_dir" ||
1576      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1577      continue
1578    ac_builddir=.
1579
1580case "$ac_dir" in
1581.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1582*)
1583  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1584  # A ".." for each directory in $ac_dir_suffix.
1585  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1586  case $ac_top_builddir_sub in
1587  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1588  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1589  esac ;;
1590esac
1591ac_abs_top_builddir=$ac_pwd
1592ac_abs_builddir=$ac_pwd$ac_dir_suffix
1593# for backward compatibility:
1594ac_top_builddir=$ac_top_build_prefix
1595
1596case $srcdir in
1597  .)  # We are building in place.
1598    ac_srcdir=.
1599    ac_top_srcdir=$ac_top_builddir_sub
1600    ac_abs_top_srcdir=$ac_pwd ;;
1601  [\\/]* | ?:[\\/]* )  # Absolute name.
1602    ac_srcdir=$srcdir$ac_dir_suffix;
1603    ac_top_srcdir=$srcdir
1604    ac_abs_top_srcdir=$srcdir ;;
1605  *) # Relative name.
1606    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1607    ac_top_srcdir=$ac_top_build_prefix$srcdir
1608    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1609esac
1610ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1611
1612    cd "$ac_dir" || { ac_status=$?; continue; }
1613    # Check for guested configure.
1614    if test -f "$ac_srcdir/configure.gnu"; then
1615      echo &&
1616      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1617    elif test -f "$ac_srcdir/configure"; then
1618      echo &&
1619      $SHELL "$ac_srcdir/configure" --help=recursive
1620    else
1621      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1622    fi || ac_status=$?
1623    cd "$ac_pwd" || { ac_status=$?; break; }
1624  done
1625fi
1626
1627test -n "$ac_init_help" && exit $ac_status
1628if $ac_init_version; then
1629  cat <<\_ACEOF
1630unbound configure 1.5.1
1631generated by GNU Autoconf 2.69
1632
1633Copyright (C) 2012 Free Software Foundation, Inc.
1634This configure script is free software; the Free Software Foundation
1635gives unlimited permission to copy, distribute and modify it.
1636_ACEOF
1637  exit
1638fi
1639
1640## ------------------------ ##
1641## Autoconf initialization. ##
1642## ------------------------ ##
1643
1644# ac_fn_c_try_compile LINENO
1645# --------------------------
1646# Try to compile conftest.$ac_ext, and return whether this succeeded.
1647ac_fn_c_try_compile ()
1648{
1649  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1650  rm -f conftest.$ac_objext
1651  if { { ac_try="$ac_compile"
1652case "(($ac_try" in
1653  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1654  *) ac_try_echo=$ac_try;;
1655esac
1656eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1657$as_echo "$ac_try_echo"; } >&5
1658  (eval "$ac_compile") 2>conftest.err
1659  ac_status=$?
1660  if test -s conftest.err; then
1661    grep -v '^ *+' conftest.err >conftest.er1
1662    cat conftest.er1 >&5
1663    mv -f conftest.er1 conftest.err
1664  fi
1665  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1666  test $ac_status = 0; } && {
1667	 test -z "$ac_c_werror_flag" ||
1668	 test ! -s conftest.err
1669       } && test -s conftest.$ac_objext; then :
1670  ac_retval=0
1671else
1672  $as_echo "$as_me: failed program was:" >&5
1673sed 's/^/| /' conftest.$ac_ext >&5
1674
1675	ac_retval=1
1676fi
1677  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1678  as_fn_set_status $ac_retval
1679
1680} # ac_fn_c_try_compile
1681
1682# ac_fn_c_try_cpp LINENO
1683# ----------------------
1684# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1685ac_fn_c_try_cpp ()
1686{
1687  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1688  if { { ac_try="$ac_cpp conftest.$ac_ext"
1689case "(($ac_try" in
1690  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1691  *) ac_try_echo=$ac_try;;
1692esac
1693eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1694$as_echo "$ac_try_echo"; } >&5
1695  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1696  ac_status=$?
1697  if test -s conftest.err; then
1698    grep -v '^ *+' conftest.err >conftest.er1
1699    cat conftest.er1 >&5
1700    mv -f conftest.er1 conftest.err
1701  fi
1702  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1703  test $ac_status = 0; } > conftest.i && {
1704	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1705	 test ! -s conftest.err
1706       }; then :
1707  ac_retval=0
1708else
1709  $as_echo "$as_me: failed program was:" >&5
1710sed 's/^/| /' conftest.$ac_ext >&5
1711
1712    ac_retval=1
1713fi
1714  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1715  as_fn_set_status $ac_retval
1716
1717} # ac_fn_c_try_cpp
1718
1719# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1720# -------------------------------------------------------
1721# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1722# the include files in INCLUDES and setting the cache variable VAR
1723# accordingly.
1724ac_fn_c_check_header_mongrel ()
1725{
1726  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1727  if eval \${$3+:} false; then :
1728  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1729$as_echo_n "checking for $2... " >&6; }
1730if eval \${$3+:} false; then :
1731  $as_echo_n "(cached) " >&6
1732fi
1733eval ac_res=\$$3
1734	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1735$as_echo "$ac_res" >&6; }
1736else
1737  # Is the header compilable?
1738{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1739$as_echo_n "checking $2 usability... " >&6; }
1740cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1741/* end confdefs.h.  */
1742$4
1743#include <$2>
1744_ACEOF
1745if ac_fn_c_try_compile "$LINENO"; then :
1746  ac_header_compiler=yes
1747else
1748  ac_header_compiler=no
1749fi
1750rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1751{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1752$as_echo "$ac_header_compiler" >&6; }
1753
1754# Is the header present?
1755{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1756$as_echo_n "checking $2 presence... " >&6; }
1757cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1758/* end confdefs.h.  */
1759#include <$2>
1760_ACEOF
1761if ac_fn_c_try_cpp "$LINENO"; then :
1762  ac_header_preproc=yes
1763else
1764  ac_header_preproc=no
1765fi
1766rm -f conftest.err conftest.i conftest.$ac_ext
1767{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1768$as_echo "$ac_header_preproc" >&6; }
1769
1770# So?  What about this header?
1771case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1772  yes:no: )
1773    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1774$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1775    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1776$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1777    ;;
1778  no:yes:* )
1779    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1780$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1781    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
1782$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
1783    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1784$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1785    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
1786$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
1787    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1788$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1789( $as_echo "## ---------------------------------------- ##
1790## Report this to unbound-bugs@nlnetlabs.nl ##
1791## ---------------------------------------- ##"
1792     ) | sed "s/^/$as_me: WARNING:     /" >&2
1793    ;;
1794esac
1795  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1796$as_echo_n "checking for $2... " >&6; }
1797if eval \${$3+:} false; then :
1798  $as_echo_n "(cached) " >&6
1799else
1800  eval "$3=\$ac_header_compiler"
1801fi
1802eval ac_res=\$$3
1803	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1804$as_echo "$ac_res" >&6; }
1805fi
1806  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1807
1808} # ac_fn_c_check_header_mongrel
1809
1810# ac_fn_c_try_run LINENO
1811# ----------------------
1812# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1813# that executables *can* be run.
1814ac_fn_c_try_run ()
1815{
1816  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1817  if { { ac_try="$ac_link"
1818case "(($ac_try" in
1819  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1820  *) ac_try_echo=$ac_try;;
1821esac
1822eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1823$as_echo "$ac_try_echo"; } >&5
1824  (eval "$ac_link") 2>&5
1825  ac_status=$?
1826  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1827  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1828  { { case "(($ac_try" in
1829  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1830  *) ac_try_echo=$ac_try;;
1831esac
1832eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1833$as_echo "$ac_try_echo"; } >&5
1834  (eval "$ac_try") 2>&5
1835  ac_status=$?
1836  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1837  test $ac_status = 0; }; }; then :
1838  ac_retval=0
1839else
1840  $as_echo "$as_me: program exited with status $ac_status" >&5
1841       $as_echo "$as_me: failed program was:" >&5
1842sed 's/^/| /' conftest.$ac_ext >&5
1843
1844       ac_retval=$ac_status
1845fi
1846  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1847  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1848  as_fn_set_status $ac_retval
1849
1850} # ac_fn_c_try_run
1851
1852# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1853# -------------------------------------------------------
1854# Tests whether HEADER exists and can be compiled using the include files in
1855# INCLUDES, setting the cache variable VAR accordingly.
1856ac_fn_c_check_header_compile ()
1857{
1858  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1859  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1860$as_echo_n "checking for $2... " >&6; }
1861if eval \${$3+:} false; then :
1862  $as_echo_n "(cached) " >&6
1863else
1864  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1865/* end confdefs.h.  */
1866$4
1867#include <$2>
1868_ACEOF
1869if ac_fn_c_try_compile "$LINENO"; then :
1870  eval "$3=yes"
1871else
1872  eval "$3=no"
1873fi
1874rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1875fi
1876eval ac_res=\$$3
1877	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1878$as_echo "$ac_res" >&6; }
1879  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1880
1881} # ac_fn_c_check_header_compile
1882
1883# ac_fn_c_try_link LINENO
1884# -----------------------
1885# Try to link conftest.$ac_ext, and return whether this succeeded.
1886ac_fn_c_try_link ()
1887{
1888  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1889  rm -f conftest.$ac_objext conftest$ac_exeext
1890  if { { ac_try="$ac_link"
1891case "(($ac_try" in
1892  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1893  *) ac_try_echo=$ac_try;;
1894esac
1895eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1896$as_echo "$ac_try_echo"; } >&5
1897  (eval "$ac_link") 2>conftest.err
1898  ac_status=$?
1899  if test -s conftest.err; then
1900    grep -v '^ *+' conftest.err >conftest.er1
1901    cat conftest.er1 >&5
1902    mv -f conftest.er1 conftest.err
1903  fi
1904  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1905  test $ac_status = 0; } && {
1906	 test -z "$ac_c_werror_flag" ||
1907	 test ! -s conftest.err
1908       } && test -s conftest$ac_exeext && {
1909	 test "$cross_compiling" = yes ||
1910	 test -x conftest$ac_exeext
1911       }; then :
1912  ac_retval=0
1913else
1914  $as_echo "$as_me: failed program was:" >&5
1915sed 's/^/| /' conftest.$ac_ext >&5
1916
1917	ac_retval=1
1918fi
1919  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1920  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1921  # interfere with the next link command; also delete a directory that is
1922  # left behind by Apple's compiler.  We do this before executing the actions.
1923  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1924  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1925  as_fn_set_status $ac_retval
1926
1927} # ac_fn_c_try_link
1928
1929# ac_fn_c_check_func LINENO FUNC VAR
1930# ----------------------------------
1931# Tests whether FUNC exists, setting the cache variable VAR accordingly
1932ac_fn_c_check_func ()
1933{
1934  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1935  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1936$as_echo_n "checking for $2... " >&6; }
1937if eval \${$3+:} false; then :
1938  $as_echo_n "(cached) " >&6
1939else
1940  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1941/* end confdefs.h.  */
1942/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
1943   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
1944#define $2 innocuous_$2
1945
1946/* System header to define __stub macros and hopefully few prototypes,
1947    which can conflict with char $2 (); below.
1948    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
1949    <limits.h> exists even on freestanding compilers.  */
1950
1951#ifdef __STDC__
1952# include <limits.h>
1953#else
1954# include <assert.h>
1955#endif
1956
1957#undef $2
1958
1959/* Override any GCC internal prototype to avoid an error.
1960   Use char because int might match the return type of a GCC
1961   builtin and then its argument prototype would still apply.  */
1962#ifdef __cplusplus
1963extern "C"
1964#endif
1965char $2 ();
1966/* The GNU C library defines this for functions which it implements
1967    to always fail with ENOSYS.  Some functions are actually named
1968    something starting with __ and the normal name is an alias.  */
1969#if defined __stub_$2 || defined __stub___$2
1970choke me
1971#endif
1972
1973int
1974main ()
1975{
1976return $2 ();
1977  ;
1978  return 0;
1979}
1980_ACEOF
1981if ac_fn_c_try_link "$LINENO"; then :
1982  eval "$3=yes"
1983else
1984  eval "$3=no"
1985fi
1986rm -f core conftest.err conftest.$ac_objext \
1987    conftest$ac_exeext conftest.$ac_ext
1988fi
1989eval ac_res=\$$3
1990	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1991$as_echo "$ac_res" >&6; }
1992  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1993
1994} # ac_fn_c_check_func
1995
1996# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1997# -------------------------------------------
1998# Tests whether TYPE exists after having included INCLUDES, setting cache
1999# variable VAR accordingly.
2000ac_fn_c_check_type ()
2001{
2002  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2003  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2004$as_echo_n "checking for $2... " >&6; }
2005if eval \${$3+:} false; then :
2006  $as_echo_n "(cached) " >&6
2007else
2008  eval "$3=no"
2009  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2010/* end confdefs.h.  */
2011$4
2012int
2013main ()
2014{
2015if (sizeof ($2))
2016	 return 0;
2017  ;
2018  return 0;
2019}
2020_ACEOF
2021if ac_fn_c_try_compile "$LINENO"; then :
2022  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2023/* end confdefs.h.  */
2024$4
2025int
2026main ()
2027{
2028if (sizeof (($2)))
2029	    return 0;
2030  ;
2031  return 0;
2032}
2033_ACEOF
2034if ac_fn_c_try_compile "$LINENO"; then :
2035
2036else
2037  eval "$3=yes"
2038fi
2039rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2040fi
2041rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2042fi
2043eval ac_res=\$$3
2044	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2045$as_echo "$ac_res" >&6; }
2046  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2047
2048} # ac_fn_c_check_type
2049
2050# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2051# --------------------------------------------
2052# Tries to find the compile-time value of EXPR in a program that includes
2053# INCLUDES, setting VAR accordingly. Returns whether the value could be
2054# computed
2055ac_fn_c_compute_int ()
2056{
2057  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2058  if test "$cross_compiling" = yes; then
2059    # Depending upon the size, compute the lo and hi bounds.
2060cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2061/* end confdefs.h.  */
2062$4
2063int
2064main ()
2065{
2066static int test_array [1 - 2 * !(($2) >= 0)];
2067test_array [0] = 0;
2068return test_array [0];
2069
2070  ;
2071  return 0;
2072}
2073_ACEOF
2074if ac_fn_c_try_compile "$LINENO"; then :
2075  ac_lo=0 ac_mid=0
2076  while :; do
2077    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2078/* end confdefs.h.  */
2079$4
2080int
2081main ()
2082{
2083static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2084test_array [0] = 0;
2085return test_array [0];
2086
2087  ;
2088  return 0;
2089}
2090_ACEOF
2091if ac_fn_c_try_compile "$LINENO"; then :
2092  ac_hi=$ac_mid; break
2093else
2094  as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2095			if test $ac_lo -le $ac_mid; then
2096			  ac_lo= ac_hi=
2097			  break
2098			fi
2099			as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2100fi
2101rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2102  done
2103else
2104  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2105/* end confdefs.h.  */
2106$4
2107int
2108main ()
2109{
2110static int test_array [1 - 2 * !(($2) < 0)];
2111test_array [0] = 0;
2112return test_array [0];
2113
2114  ;
2115  return 0;
2116}
2117_ACEOF
2118if ac_fn_c_try_compile "$LINENO"; then :
2119  ac_hi=-1 ac_mid=-1
2120  while :; do
2121    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2122/* end confdefs.h.  */
2123$4
2124int
2125main ()
2126{
2127static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2128test_array [0] = 0;
2129return test_array [0];
2130
2131  ;
2132  return 0;
2133}
2134_ACEOF
2135if ac_fn_c_try_compile "$LINENO"; then :
2136  ac_lo=$ac_mid; break
2137else
2138  as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2139			if test $ac_mid -le $ac_hi; then
2140			  ac_lo= ac_hi=
2141			  break
2142			fi
2143			as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2144fi
2145rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2146  done
2147else
2148  ac_lo= ac_hi=
2149fi
2150rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2151fi
2152rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2153# Binary search between lo and hi bounds.
2154while test "x$ac_lo" != "x$ac_hi"; do
2155  as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2156  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2157/* end confdefs.h.  */
2158$4
2159int
2160main ()
2161{
2162static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2163test_array [0] = 0;
2164return test_array [0];
2165
2166  ;
2167  return 0;
2168}
2169_ACEOF
2170if ac_fn_c_try_compile "$LINENO"; then :
2171  ac_hi=$ac_mid
2172else
2173  as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2174fi
2175rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2176done
2177case $ac_lo in #((
2178?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2179'') ac_retval=1 ;;
2180esac
2181  else
2182    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2183/* end confdefs.h.  */
2184$4
2185static long int longval () { return $2; }
2186static unsigned long int ulongval () { return $2; }
2187#include <stdio.h>
2188#include <stdlib.h>
2189int
2190main ()
2191{
2192
2193  FILE *f = fopen ("conftest.val", "w");
2194  if (! f)
2195    return 1;
2196  if (($2) < 0)
2197    {
2198      long int i = longval ();
2199      if (i != ($2))
2200	return 1;
2201      fprintf (f, "%ld", i);
2202    }
2203  else
2204    {
2205      unsigned long int i = ulongval ();
2206      if (i != ($2))
2207	return 1;
2208      fprintf (f, "%lu", i);
2209    }
2210  /* Do not output a trailing newline, as this causes \r\n confusion
2211     on some platforms.  */
2212  return ferror (f) || fclose (f) != 0;
2213
2214  ;
2215  return 0;
2216}
2217_ACEOF
2218if ac_fn_c_try_run "$LINENO"; then :
2219  echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2220else
2221  ac_retval=1
2222fi
2223rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2224  conftest.$ac_objext conftest.beam conftest.$ac_ext
2225rm -f conftest.val
2226
2227  fi
2228  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2229  as_fn_set_status $ac_retval
2230
2231} # ac_fn_c_compute_int
2232
2233# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2234# ---------------------------------------------
2235# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2236# accordingly.
2237ac_fn_c_check_decl ()
2238{
2239  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2240  as_decl_name=`echo $2|sed 's/ *(.*//'`
2241  as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2242  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2243$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2244if eval \${$3+:} false; then :
2245  $as_echo_n "(cached) " >&6
2246else
2247  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2248/* end confdefs.h.  */
2249$4
2250int
2251main ()
2252{
2253#ifndef $as_decl_name
2254#ifdef __cplusplus
2255  (void) $as_decl_use;
2256#else
2257  (void) $as_decl_name;
2258#endif
2259#endif
2260
2261  ;
2262  return 0;
2263}
2264_ACEOF
2265if ac_fn_c_try_compile "$LINENO"; then :
2266  eval "$3=yes"
2267else
2268  eval "$3=no"
2269fi
2270rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2271fi
2272eval ac_res=\$$3
2273	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2274$as_echo "$ac_res" >&6; }
2275  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2276
2277} # ac_fn_c_check_decl
2278
2279# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2280# ----------------------------------------------------
2281# Tries to find if the field MEMBER exists in type AGGR, after including
2282# INCLUDES, setting cache variable VAR accordingly.
2283ac_fn_c_check_member ()
2284{
2285  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2286  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2287$as_echo_n "checking for $2.$3... " >&6; }
2288if eval \${$4+:} false; then :
2289  $as_echo_n "(cached) " >&6
2290else
2291  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2292/* end confdefs.h.  */
2293$5
2294int
2295main ()
2296{
2297static $2 ac_aggr;
2298if (ac_aggr.$3)
2299return 0;
2300  ;
2301  return 0;
2302}
2303_ACEOF
2304if ac_fn_c_try_compile "$LINENO"; then :
2305  eval "$4=yes"
2306else
2307  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2308/* end confdefs.h.  */
2309$5
2310int
2311main ()
2312{
2313static $2 ac_aggr;
2314if (sizeof ac_aggr.$3)
2315return 0;
2316  ;
2317  return 0;
2318}
2319_ACEOF
2320if ac_fn_c_try_compile "$LINENO"; then :
2321  eval "$4=yes"
2322else
2323  eval "$4=no"
2324fi
2325rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2326fi
2327rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2328fi
2329eval ac_res=\$$4
2330	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2331$as_echo "$ac_res" >&6; }
2332  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2333
2334} # ac_fn_c_check_member
2335cat >config.log <<_ACEOF
2336This file contains any messages produced by compilers while
2337running configure, to aid debugging if configure makes a mistake.
2338
2339It was created by unbound $as_me 1.5.1, which was
2340generated by GNU Autoconf 2.69.  Invocation command line was
2341
2342  $ $0 $@
2343
2344_ACEOF
2345exec 5>>config.log
2346{
2347cat <<_ASUNAME
2348## --------- ##
2349## Platform. ##
2350## --------- ##
2351
2352hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2353uname -m = `(uname -m) 2>/dev/null || echo unknown`
2354uname -r = `(uname -r) 2>/dev/null || echo unknown`
2355uname -s = `(uname -s) 2>/dev/null || echo unknown`
2356uname -v = `(uname -v) 2>/dev/null || echo unknown`
2357
2358/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2359/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2360
2361/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2362/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2363/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2364/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2365/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2366/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2367/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2368
2369_ASUNAME
2370
2371as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2372for as_dir in $PATH
2373do
2374  IFS=$as_save_IFS
2375  test -z "$as_dir" && as_dir=.
2376    $as_echo "PATH: $as_dir"
2377  done
2378IFS=$as_save_IFS
2379
2380} >&5
2381
2382cat >&5 <<_ACEOF
2383
2384
2385## ----------- ##
2386## Core tests. ##
2387## ----------- ##
2388
2389_ACEOF
2390
2391
2392# Keep a trace of the command line.
2393# Strip out --no-create and --no-recursion so they do not pile up.
2394# Strip out --silent because we don't want to record it for future runs.
2395# Also quote any args containing shell meta-characters.
2396# Make two passes to allow for proper duplicate-argument suppression.
2397ac_configure_args=
2398ac_configure_args0=
2399ac_configure_args1=
2400ac_must_keep_next=false
2401for ac_pass in 1 2
2402do
2403  for ac_arg
2404  do
2405    case $ac_arg in
2406    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2407    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2408    | -silent | --silent | --silen | --sile | --sil)
2409      continue ;;
2410    *\'*)
2411      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2412    esac
2413    case $ac_pass in
2414    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2415    2)
2416      as_fn_append ac_configure_args1 " '$ac_arg'"
2417      if test $ac_must_keep_next = true; then
2418	ac_must_keep_next=false # Got value, back to normal.
2419      else
2420	case $ac_arg in
2421	  *=* | --config-cache | -C | -disable-* | --disable-* \
2422	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2423	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2424	  | -with-* | --with-* | -without-* | --without-* | --x)
2425	    case "$ac_configure_args0 " in
2426	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2427	    esac
2428	    ;;
2429	  -* ) ac_must_keep_next=true ;;
2430	esac
2431      fi
2432      as_fn_append ac_configure_args " '$ac_arg'"
2433      ;;
2434    esac
2435  done
2436done
2437{ ac_configure_args0=; unset ac_configure_args0;}
2438{ ac_configure_args1=; unset ac_configure_args1;}
2439
2440# When interrupted or exit'd, cleanup temporary files, and complete
2441# config.log.  We remove comments because anyway the quotes in there
2442# would cause problems or look ugly.
2443# WARNING: Use '\'' to represent an apostrophe within the trap.
2444# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2445trap 'exit_status=$?
2446  # Save into config.log some information that might help in debugging.
2447  {
2448    echo
2449
2450    $as_echo "## ---------------- ##
2451## Cache variables. ##
2452## ---------------- ##"
2453    echo
2454    # The following way of writing the cache mishandles newlines in values,
2455(
2456  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2457    eval ac_val=\$$ac_var
2458    case $ac_val in #(
2459    *${as_nl}*)
2460      case $ac_var in #(
2461      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2462$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2463      esac
2464      case $ac_var in #(
2465      _ | IFS | as_nl) ;; #(
2466      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2467      *) { eval $ac_var=; unset $ac_var;} ;;
2468      esac ;;
2469    esac
2470  done
2471  (set) 2>&1 |
2472    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2473    *${as_nl}ac_space=\ *)
2474      sed -n \
2475	"s/'\''/'\''\\\\'\'''\''/g;
2476	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2477      ;; #(
2478    *)
2479      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2480      ;;
2481    esac |
2482    sort
2483)
2484    echo
2485
2486    $as_echo "## ----------------- ##
2487## Output variables. ##
2488## ----------------- ##"
2489    echo
2490    for ac_var in $ac_subst_vars
2491    do
2492      eval ac_val=\$$ac_var
2493      case $ac_val in
2494      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2495      esac
2496      $as_echo "$ac_var='\''$ac_val'\''"
2497    done | sort
2498    echo
2499
2500    if test -n "$ac_subst_files"; then
2501      $as_echo "## ------------------- ##
2502## File substitutions. ##
2503## ------------------- ##"
2504      echo
2505      for ac_var in $ac_subst_files
2506      do
2507	eval ac_val=\$$ac_var
2508	case $ac_val in
2509	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2510	esac
2511	$as_echo "$ac_var='\''$ac_val'\''"
2512      done | sort
2513      echo
2514    fi
2515
2516    if test -s confdefs.h; then
2517      $as_echo "## ----------- ##
2518## confdefs.h. ##
2519## ----------- ##"
2520      echo
2521      cat confdefs.h
2522      echo
2523    fi
2524    test "$ac_signal" != 0 &&
2525      $as_echo "$as_me: caught signal $ac_signal"
2526    $as_echo "$as_me: exit $exit_status"
2527  } >&5
2528  rm -f core *.core core.conftest.* &&
2529    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2530    exit $exit_status
2531' 0
2532for ac_signal in 1 2 13 15; do
2533  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2534done
2535ac_signal=0
2536
2537# confdefs.h avoids OS command line length limits that DEFS can exceed.
2538rm -f -r conftest* confdefs.h
2539
2540$as_echo "/* confdefs.h */" > confdefs.h
2541
2542# Predefined preprocessor variables.
2543
2544cat >>confdefs.h <<_ACEOF
2545#define PACKAGE_NAME "$PACKAGE_NAME"
2546_ACEOF
2547
2548cat >>confdefs.h <<_ACEOF
2549#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2550_ACEOF
2551
2552cat >>confdefs.h <<_ACEOF
2553#define PACKAGE_VERSION "$PACKAGE_VERSION"
2554_ACEOF
2555
2556cat >>confdefs.h <<_ACEOF
2557#define PACKAGE_STRING "$PACKAGE_STRING"
2558_ACEOF
2559
2560cat >>confdefs.h <<_ACEOF
2561#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2562_ACEOF
2563
2564cat >>confdefs.h <<_ACEOF
2565#define PACKAGE_URL "$PACKAGE_URL"
2566_ACEOF
2567
2568
2569# Let the site file select an alternate cache file if it wants to.
2570# Prefer an explicitly selected file to automatically selected ones.
2571ac_site_file1=NONE
2572ac_site_file2=NONE
2573if test -n "$CONFIG_SITE"; then
2574  # We do not want a PATH search for config.site.
2575  case $CONFIG_SITE in #((
2576    -*)  ac_site_file1=./$CONFIG_SITE;;
2577    */*) ac_site_file1=$CONFIG_SITE;;
2578    *)   ac_site_file1=./$CONFIG_SITE;;
2579  esac
2580elif test "x$prefix" != xNONE; then
2581  ac_site_file1=$prefix/share/config.site
2582  ac_site_file2=$prefix/etc/config.site
2583else
2584  ac_site_file1=$ac_default_prefix/share/config.site
2585  ac_site_file2=$ac_default_prefix/etc/config.site
2586fi
2587for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2588do
2589  test "x$ac_site_file" = xNONE && continue
2590  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2591    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2592$as_echo "$as_me: loading site script $ac_site_file" >&6;}
2593    sed 's/^/| /' "$ac_site_file" >&5
2594    . "$ac_site_file" \
2595      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2596$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2597as_fn_error $? "failed to load site script $ac_site_file
2598See \`config.log' for more details" "$LINENO" 5; }
2599  fi
2600done
2601
2602if test -r "$cache_file"; then
2603  # Some versions of bash will fail to source /dev/null (special files
2604  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
2605  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2606    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2607$as_echo "$as_me: loading cache $cache_file" >&6;}
2608    case $cache_file in
2609      [\\/]* | ?:[\\/]* ) . "$cache_file";;
2610      *)                      . "./$cache_file";;
2611    esac
2612  fi
2613else
2614  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2615$as_echo "$as_me: creating cache $cache_file" >&6;}
2616  >$cache_file
2617fi
2618
2619# Check that the precious variables saved in the cache have kept the same
2620# value.
2621ac_cache_corrupted=false
2622for ac_var in $ac_precious_vars; do
2623  eval ac_old_set=\$ac_cv_env_${ac_var}_set
2624  eval ac_new_set=\$ac_env_${ac_var}_set
2625  eval ac_old_val=\$ac_cv_env_${ac_var}_value
2626  eval ac_new_val=\$ac_env_${ac_var}_value
2627  case $ac_old_set,$ac_new_set in
2628    set,)
2629      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2630$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2631      ac_cache_corrupted=: ;;
2632    ,set)
2633      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2634$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2635      ac_cache_corrupted=: ;;
2636    ,);;
2637    *)
2638      if test "x$ac_old_val" != "x$ac_new_val"; then
2639	# differences in whitespace do not lead to failure.
2640	ac_old_val_w=`echo x $ac_old_val`
2641	ac_new_val_w=`echo x $ac_new_val`
2642	if test "$ac_old_val_w" != "$ac_new_val_w"; then
2643	  { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2644$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2645	  ac_cache_corrupted=:
2646	else
2647	  { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2648$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2649	  eval $ac_var=\$ac_old_val
2650	fi
2651	{ $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
2652$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
2653	{ $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
2654$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
2655      fi;;
2656  esac
2657  # Pass precious variables to config.status.
2658  if test "$ac_new_set" = set; then
2659    case $ac_new_val in
2660    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2661    *) ac_arg=$ac_var=$ac_new_val ;;
2662    esac
2663    case " $ac_configure_args " in
2664      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
2665      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2666    esac
2667  fi
2668done
2669if $ac_cache_corrupted; then
2670  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2671$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2672  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2673$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2674  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2675fi
2676## -------------------- ##
2677## Main body of script. ##
2678## -------------------- ##
2679
2680ac_ext=c
2681ac_cpp='$CPP $CPPFLAGS'
2682ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2683ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2684ac_compiler_gnu=$ac_cv_c_compiler_gnu
2685
2686
2687UNBOUND_VERSION_MAJOR=1
2688
2689UNBOUND_VERSION_MINOR=5
2690
2691UNBOUND_VERSION_MICRO=1
2692
2693
2694LIBUNBOUND_CURRENT=5
2695LIBUNBOUND_REVISION=3
2696LIBUNBOUND_AGE=3
2697# 1.0.0 had 0:12:0
2698# 1.0.1 had 0:13:0
2699# 1.0.2 had 0:14:0
2700# 1.1.0 had 0:15:0
2701# 1.1.1 had 0:16:0
2702# 1.2.0 had 0:17:0
2703# 1.2.1 had 0:18:0
2704# 1.3.0 had 1:0:0   # ub_cancel and -export-symbols.
2705# 1.3.1 had 1:1:0
2706# 1.3.2 had 1:2:0
2707# 1.3.3 had 1:3:0
2708# 1.3.4 had 1:4:0
2709# 1.4.0-snapshots had 1:5:0
2710# 1.4.0 had 1:5:0 (not 2:0:0)   # ub_result.why_bogus
2711# 1.4.1 had 2:1:0
2712# 1.4.2 had 2:2:0
2713# 1.4.3 had 2:3:0
2714# 1.4.4 had 2:4:0
2715# 1.4.5 had 2:5:0
2716# 1.4.6 had 2:6:0
2717# 1.4.7 had 2:7:0
2718# 1.4.8 had 2:8:0
2719# 1.4.9 had 2:9:0
2720# 1.4.10 had 2:10:0
2721# 1.4.11 had 2:11:0
2722# 1.4.12 had 2:12:0
2723# 1.4.13 had 2:13:0
2724# and 1.4.13p1 and 1.4.13.p2
2725# 1.4.14 had 2:14:0
2726# 1.4.15 had 3:0:1 # adds ub_version()
2727# 1.4.16 had 3:1:1
2728# 1.4.17 had 3:2:1
2729# 1.4.18 had 3:3:1
2730# 1.4.19 had 3:4:1
2731# 1.4.20 had 4:0:2 # adds libunbound.ttl # but shipped 3:5:1
2732# 1.4.21 had 4:1:2
2733# 1.4.22 had 4:1:2
2734# 1.5.0 had 5:3:3 # adds ub_ctx_add_ta_autr
2735# 1.5.1 had 5:4:3
2736
2737#   Current  -- the number of the binary API that we're implementing
2738#   Revision -- which iteration of the implementation of the binary
2739#               API are we supplying?
2740#   Age      -- How many previous binary API versions do we also
2741#               support?
2742#
2743# If we release a new version that does not change the binary API,
2744# increment Revision.
2745#
2746# If we release a new version that changes the binary API, but does
2747# not break programs compiled against the old binary API, increment
2748# Current and Age.  Set Revision to 0, since this is the first
2749# implementation of the new API.
2750#
2751# Otherwise, we're changing the binary API and breaking bakward
2752# compatibility with old binaries.  Increment Current.  Set Age to 0,
2753# since we're backward compatible with no previous APIs.  Set Revision
2754# to 0 too.
2755
2756
2757
2758
2759CFLAGS="$CFLAGS"
2760ac_ext=c
2761ac_cpp='$CPP $CPPFLAGS'
2762ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2763ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2764ac_compiler_gnu=$ac_cv_c_compiler_gnu
2765if test -n "$ac_tool_prefix"; then
2766  # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2767set dummy ${ac_tool_prefix}gcc; ac_word=$2
2768{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2769$as_echo_n "checking for $ac_word... " >&6; }
2770if ${ac_cv_prog_CC+:} false; then :
2771  $as_echo_n "(cached) " >&6
2772else
2773  if test -n "$CC"; then
2774  ac_cv_prog_CC="$CC" # Let the user override the test.
2775else
2776as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2777for as_dir in $PATH
2778do
2779  IFS=$as_save_IFS
2780  test -z "$as_dir" && as_dir=.
2781    for ac_exec_ext in '' $ac_executable_extensions; do
2782  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2783    ac_cv_prog_CC="${ac_tool_prefix}gcc"
2784    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2785    break 2
2786  fi
2787done
2788  done
2789IFS=$as_save_IFS
2790
2791fi
2792fi
2793CC=$ac_cv_prog_CC
2794if test -n "$CC"; then
2795  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2796$as_echo "$CC" >&6; }
2797else
2798  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2799$as_echo "no" >&6; }
2800fi
2801
2802
2803fi
2804if test -z "$ac_cv_prog_CC"; then
2805  ac_ct_CC=$CC
2806  # Extract the first word of "gcc", so it can be a program name with args.
2807set dummy gcc; ac_word=$2
2808{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2809$as_echo_n "checking for $ac_word... " >&6; }
2810if ${ac_cv_prog_ac_ct_CC+:} false; then :
2811  $as_echo_n "(cached) " >&6
2812else
2813  if test -n "$ac_ct_CC"; then
2814  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2815else
2816as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2817for as_dir in $PATH
2818do
2819  IFS=$as_save_IFS
2820  test -z "$as_dir" && as_dir=.
2821    for ac_exec_ext in '' $ac_executable_extensions; do
2822  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2823    ac_cv_prog_ac_ct_CC="gcc"
2824    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2825    break 2
2826  fi
2827done
2828  done
2829IFS=$as_save_IFS
2830
2831fi
2832fi
2833ac_ct_CC=$ac_cv_prog_ac_ct_CC
2834if test -n "$ac_ct_CC"; then
2835  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
2836$as_echo "$ac_ct_CC" >&6; }
2837else
2838  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2839$as_echo "no" >&6; }
2840fi
2841
2842  if test "x$ac_ct_CC" = x; then
2843    CC=""
2844  else
2845    case $cross_compiling:$ac_tool_warned in
2846yes:)
2847{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
2848$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
2849ac_tool_warned=yes ;;
2850esac
2851    CC=$ac_ct_CC
2852  fi
2853else
2854  CC="$ac_cv_prog_CC"
2855fi
2856
2857if test -z "$CC"; then
2858          if test -n "$ac_tool_prefix"; then
2859    # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
2860set dummy ${ac_tool_prefix}cc; ac_word=$2
2861{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2862$as_echo_n "checking for $ac_word... " >&6; }
2863if ${ac_cv_prog_CC+:} false; then :
2864  $as_echo_n "(cached) " >&6
2865else
2866  if test -n "$CC"; then
2867  ac_cv_prog_CC="$CC" # Let the user override the test.
2868else
2869as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2870for as_dir in $PATH
2871do
2872  IFS=$as_save_IFS
2873  test -z "$as_dir" && as_dir=.
2874    for ac_exec_ext in '' $ac_executable_extensions; do
2875  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2876    ac_cv_prog_CC="${ac_tool_prefix}cc"
2877    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2878    break 2
2879  fi
2880done
2881  done
2882IFS=$as_save_IFS
2883
2884fi
2885fi
2886CC=$ac_cv_prog_CC
2887if test -n "$CC"; then
2888  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2889$as_echo "$CC" >&6; }
2890else
2891  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2892$as_echo "no" >&6; }
2893fi
2894
2895
2896  fi
2897fi
2898if test -z "$CC"; then
2899  # Extract the first word of "cc", so it can be a program name with args.
2900set dummy cc; ac_word=$2
2901{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2902$as_echo_n "checking for $ac_word... " >&6; }
2903if ${ac_cv_prog_CC+:} false; then :
2904  $as_echo_n "(cached) " >&6
2905else
2906  if test -n "$CC"; then
2907  ac_cv_prog_CC="$CC" # Let the user override the test.
2908else
2909  ac_prog_rejected=no
2910as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2911for as_dir in $PATH
2912do
2913  IFS=$as_save_IFS
2914  test -z "$as_dir" && as_dir=.
2915    for ac_exec_ext in '' $ac_executable_extensions; do
2916  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2917    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2918       ac_prog_rejected=yes
2919       continue
2920     fi
2921    ac_cv_prog_CC="cc"
2922    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2923    break 2
2924  fi
2925done
2926  done
2927IFS=$as_save_IFS
2928
2929if test $ac_prog_rejected = yes; then
2930  # We found a bogon in the path, so make sure we never use it.
2931  set dummy $ac_cv_prog_CC
2932  shift
2933  if test $# != 0; then
2934    # We chose a different compiler from the bogus one.
2935    # However, it has the same basename, so the bogon will be chosen
2936    # first if we set CC to just the basename; use the full file name.
2937    shift
2938    ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
2939  fi
2940fi
2941fi
2942fi
2943CC=$ac_cv_prog_CC
2944if test -n "$CC"; then
2945  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2946$as_echo "$CC" >&6; }
2947else
2948  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2949$as_echo "no" >&6; }
2950fi
2951
2952
2953fi
2954if test -z "$CC"; then
2955  if test -n "$ac_tool_prefix"; then
2956  for ac_prog in cl.exe
2957  do
2958    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2959set dummy $ac_tool_prefix$ac_prog; ac_word=$2
2960{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2961$as_echo_n "checking for $ac_word... " >&6; }
2962if ${ac_cv_prog_CC+:} false; then :
2963  $as_echo_n "(cached) " >&6
2964else
2965  if test -n "$CC"; then
2966  ac_cv_prog_CC="$CC" # Let the user override the test.
2967else
2968as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2969for as_dir in $PATH
2970do
2971  IFS=$as_save_IFS
2972  test -z "$as_dir" && as_dir=.
2973    for ac_exec_ext in '' $ac_executable_extensions; do
2974  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2975    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
2976    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2977    break 2
2978  fi
2979done
2980  done
2981IFS=$as_save_IFS
2982
2983fi
2984fi
2985CC=$ac_cv_prog_CC
2986if test -n "$CC"; then
2987  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2988$as_echo "$CC" >&6; }
2989else
2990  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2991$as_echo "no" >&6; }
2992fi
2993
2994
2995    test -n "$CC" && break
2996  done
2997fi
2998if test -z "$CC"; then
2999  ac_ct_CC=$CC
3000  for ac_prog in cl.exe
3001do
3002  # Extract the first word of "$ac_prog", so it can be a program name with args.
3003set dummy $ac_prog; ac_word=$2
3004{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3005$as_echo_n "checking for $ac_word... " >&6; }
3006if ${ac_cv_prog_ac_ct_CC+:} false; then :
3007  $as_echo_n "(cached) " >&6
3008else
3009  if test -n "$ac_ct_CC"; then
3010  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3011else
3012as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3013for as_dir in $PATH
3014do
3015  IFS=$as_save_IFS
3016  test -z "$as_dir" && as_dir=.
3017    for ac_exec_ext in '' $ac_executable_extensions; do
3018  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3019    ac_cv_prog_ac_ct_CC="$ac_prog"
3020    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3021    break 2
3022  fi
3023done
3024  done
3025IFS=$as_save_IFS
3026
3027fi
3028fi
3029ac_ct_CC=$ac_cv_prog_ac_ct_CC
3030if test -n "$ac_ct_CC"; then
3031  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3032$as_echo "$ac_ct_CC" >&6; }
3033else
3034  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3035$as_echo "no" >&6; }
3036fi
3037
3038
3039  test -n "$ac_ct_CC" && break
3040done
3041
3042  if test "x$ac_ct_CC" = x; then
3043    CC=""
3044  else
3045    case $cross_compiling:$ac_tool_warned in
3046yes:)
3047{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3048$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3049ac_tool_warned=yes ;;
3050esac
3051    CC=$ac_ct_CC
3052  fi
3053fi
3054
3055fi
3056
3057
3058test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3059$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3060as_fn_error $? "no acceptable C compiler found in \$PATH
3061See \`config.log' for more details" "$LINENO" 5; }
3062
3063# Provide some information about the compiler.
3064$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3065set X $ac_compile
3066ac_compiler=$2
3067for ac_option in --version -v -V -qversion; do
3068  { { ac_try="$ac_compiler $ac_option >&5"
3069case "(($ac_try" in
3070  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3071  *) ac_try_echo=$ac_try;;
3072esac
3073eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3074$as_echo "$ac_try_echo"; } >&5
3075  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
3076  ac_status=$?
3077  if test -s conftest.err; then
3078    sed '10a\
3079... rest of stderr output deleted ...
3080         10q' conftest.err >conftest.er1
3081    cat conftest.er1 >&5
3082  fi
3083  rm -f conftest.er1 conftest.err
3084  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3085  test $ac_status = 0; }
3086done
3087
3088cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3089/* end confdefs.h.  */
3090
3091int
3092main ()
3093{
3094
3095  ;
3096  return 0;
3097}
3098_ACEOF
3099ac_clean_files_save=$ac_clean_files
3100ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
3101# Try to create an executable without -o first, disregard a.out.
3102# It will help us diagnose broken compilers, and finding out an intuition
3103# of exeext.
3104{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3105$as_echo_n "checking whether the C compiler works... " >&6; }
3106ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3107
3108# The possible output files:
3109ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3110
3111ac_rmfiles=
3112for ac_file in $ac_files
3113do
3114  case $ac_file in
3115    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3116    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3117  esac
3118done
3119rm -f $ac_rmfiles
3120
3121if { { ac_try="$ac_link_default"
3122case "(($ac_try" in
3123  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3124  *) ac_try_echo=$ac_try;;
3125esac
3126eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3127$as_echo "$ac_try_echo"; } >&5
3128  (eval "$ac_link_default") 2>&5
3129  ac_status=$?
3130  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3131  test $ac_status = 0; }; then :
3132  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3133# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3134# in a Makefile.  We should not override ac_cv_exeext if it was cached,
3135# so that the user can short-circuit this test for compilers unknown to
3136# Autoconf.
3137for ac_file in $ac_files ''
3138do
3139  test -f "$ac_file" || continue
3140  case $ac_file in
3141    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
3142	;;
3143    [ab].out )
3144	# We found the default executable, but exeext='' is most
3145	# certainly right.
3146	break;;
3147    *.* )
3148	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
3149	then :; else
3150	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3151	fi
3152	# We set ac_cv_exeext here because the later test for it is not
3153	# safe: cross compilers may not add the suffix if given an `-o'
3154	# argument, so we may need to know it at that point already.
3155	# Even if this section looks crufty: it has the advantage of
3156	# actually working.
3157	break;;
3158    * )
3159	break;;
3160  esac
3161done
3162test "$ac_cv_exeext" = no && ac_cv_exeext=
3163
3164else
3165  ac_file=''
3166fi
3167if test -z "$ac_file"; then :
3168  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3169$as_echo "no" >&6; }
3170$as_echo "$as_me: failed program was:" >&5
3171sed 's/^/| /' conftest.$ac_ext >&5
3172
3173{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3174$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3175as_fn_error 77 "C compiler cannot create executables
3176See \`config.log' for more details" "$LINENO" 5; }
3177else
3178  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3179$as_echo "yes" >&6; }
3180fi
3181{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3182$as_echo_n "checking for C compiler default output file name... " >&6; }
3183{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3184$as_echo "$ac_file" >&6; }
3185ac_exeext=$ac_cv_exeext
3186
3187rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
3188ac_clean_files=$ac_clean_files_save
3189{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3190$as_echo_n "checking for suffix of executables... " >&6; }
3191if { { ac_try="$ac_link"
3192case "(($ac_try" in
3193  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3194  *) ac_try_echo=$ac_try;;
3195esac
3196eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3197$as_echo "$ac_try_echo"; } >&5
3198  (eval "$ac_link") 2>&5
3199  ac_status=$?
3200  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3201  test $ac_status = 0; }; then :
3202  # If both `conftest.exe' and `conftest' are `present' (well, observable)
3203# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
3204# work properly (i.e., refer to `conftest.exe'), while it won't with
3205# `rm'.
3206for ac_file in conftest.exe conftest conftest.*; do
3207  test -f "$ac_file" || continue
3208  case $ac_file in
3209    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3210    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3211	  break;;
3212    * ) break;;
3213  esac
3214done
3215else
3216  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3217$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3218as_fn_error $? "cannot compute suffix of executables: cannot compile and link
3219See \`config.log' for more details" "$LINENO" 5; }
3220fi
3221rm -f conftest conftest$ac_cv_exeext
3222{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3223$as_echo "$ac_cv_exeext" >&6; }
3224
3225rm -f conftest.$ac_ext
3226EXEEXT=$ac_cv_exeext
3227ac_exeext=$EXEEXT
3228cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3229/* end confdefs.h.  */
3230#include <stdio.h>
3231int
3232main ()
3233{
3234FILE *f = fopen ("conftest.out", "w");
3235 return ferror (f) || fclose (f) != 0;
3236
3237  ;
3238  return 0;
3239}
3240_ACEOF
3241ac_clean_files="$ac_clean_files conftest.out"
3242# Check that the compiler produces executables we can run.  If not, either
3243# the compiler is broken, or we cross compile.
3244{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3245$as_echo_n "checking whether we are cross compiling... " >&6; }
3246if test "$cross_compiling" != yes; then
3247  { { ac_try="$ac_link"
3248case "(($ac_try" in
3249  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3250  *) ac_try_echo=$ac_try;;
3251esac
3252eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3253$as_echo "$ac_try_echo"; } >&5
3254  (eval "$ac_link") 2>&5
3255  ac_status=$?
3256  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3257  test $ac_status = 0; }
3258  if { ac_try='./conftest$ac_cv_exeext'
3259  { { case "(($ac_try" in
3260  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3261  *) ac_try_echo=$ac_try;;
3262esac
3263eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3264$as_echo "$ac_try_echo"; } >&5
3265  (eval "$ac_try") 2>&5
3266  ac_status=$?
3267  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3268  test $ac_status = 0; }; }; then
3269    cross_compiling=no
3270  else
3271    if test "$cross_compiling" = maybe; then
3272	cross_compiling=yes
3273    else
3274	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3275$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3276as_fn_error $? "cannot run C compiled programs.
3277If you meant to cross compile, use \`--host'.
3278See \`config.log' for more details" "$LINENO" 5; }
3279    fi
3280  fi
3281fi
3282{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3283$as_echo "$cross_compiling" >&6; }
3284
3285rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
3286ac_clean_files=$ac_clean_files_save
3287{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3288$as_echo_n "checking for suffix of object files... " >&6; }
3289if ${ac_cv_objext+:} false; then :
3290  $as_echo_n "(cached) " >&6
3291else
3292  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3293/* end confdefs.h.  */
3294
3295int
3296main ()
3297{
3298
3299  ;
3300  return 0;
3301}
3302_ACEOF
3303rm -f conftest.o conftest.obj
3304if { { ac_try="$ac_compile"
3305case "(($ac_try" in
3306  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3307  *) ac_try_echo=$ac_try;;
3308esac
3309eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3310$as_echo "$ac_try_echo"; } >&5
3311  (eval "$ac_compile") 2>&5
3312  ac_status=$?
3313  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3314  test $ac_status = 0; }; then :
3315  for ac_file in conftest.o conftest.obj conftest.*; do
3316  test -f "$ac_file" || continue;
3317  case $ac_file in
3318    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
3319    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3320       break;;
3321  esac
3322done
3323else
3324  $as_echo "$as_me: failed program was:" >&5
3325sed 's/^/| /' conftest.$ac_ext >&5
3326
3327{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3328$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3329as_fn_error $? "cannot compute suffix of object files: cannot compile
3330See \`config.log' for more details" "$LINENO" 5; }
3331fi
3332rm -f conftest.$ac_cv_objext conftest.$ac_ext
3333fi
3334{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3335$as_echo "$ac_cv_objext" >&6; }
3336OBJEXT=$ac_cv_objext
3337ac_objext=$OBJEXT
3338{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
3339$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
3340if ${ac_cv_c_compiler_gnu+:} false; then :
3341  $as_echo_n "(cached) " >&6
3342else
3343  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3344/* end confdefs.h.  */
3345
3346int
3347main ()
3348{
3349#ifndef __GNUC__
3350       choke me
3351#endif
3352
3353  ;
3354  return 0;
3355}
3356_ACEOF
3357if ac_fn_c_try_compile "$LINENO"; then :
3358  ac_compiler_gnu=yes
3359else
3360  ac_compiler_gnu=no
3361fi
3362rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3363ac_cv_c_compiler_gnu=$ac_compiler_gnu
3364
3365fi
3366{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
3367$as_echo "$ac_cv_c_compiler_gnu" >&6; }
3368if test $ac_compiler_gnu = yes; then
3369  GCC=yes
3370else
3371  GCC=
3372fi
3373ac_test_CFLAGS=${CFLAGS+set}
3374ac_save_CFLAGS=$CFLAGS
3375{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
3376$as_echo_n "checking whether $CC accepts -g... " >&6; }
3377if ${ac_cv_prog_cc_g+:} false; then :
3378  $as_echo_n "(cached) " >&6
3379else
3380  ac_save_c_werror_flag=$ac_c_werror_flag
3381   ac_c_werror_flag=yes
3382   ac_cv_prog_cc_g=no
3383   CFLAGS="-g"
3384   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3385/* end confdefs.h.  */
3386
3387int
3388main ()
3389{
3390
3391  ;
3392  return 0;
3393}
3394_ACEOF
3395if ac_fn_c_try_compile "$LINENO"; then :
3396  ac_cv_prog_cc_g=yes
3397else
3398  CFLAGS=""
3399      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3400/* end confdefs.h.  */
3401
3402int
3403main ()
3404{
3405
3406  ;
3407  return 0;
3408}
3409_ACEOF
3410if ac_fn_c_try_compile "$LINENO"; then :
3411
3412else
3413  ac_c_werror_flag=$ac_save_c_werror_flag
3414	 CFLAGS="-g"
3415	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3416/* end confdefs.h.  */
3417
3418int
3419main ()
3420{
3421
3422  ;
3423  return 0;
3424}
3425_ACEOF
3426if ac_fn_c_try_compile "$LINENO"; then :
3427  ac_cv_prog_cc_g=yes
3428fi
3429rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3430fi
3431rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3432fi
3433rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3434   ac_c_werror_flag=$ac_save_c_werror_flag
3435fi
3436{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
3437$as_echo "$ac_cv_prog_cc_g" >&6; }
3438if test "$ac_test_CFLAGS" = set; then
3439  CFLAGS=$ac_save_CFLAGS
3440elif test $ac_cv_prog_cc_g = yes; then
3441  if test "$GCC" = yes; then
3442    CFLAGS="-g -O2"
3443  else
3444    CFLAGS="-g"
3445  fi
3446else
3447  if test "$GCC" = yes; then
3448    CFLAGS="-O2"
3449  else
3450    CFLAGS=
3451  fi
3452fi
3453{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
3454$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
3455if ${ac_cv_prog_cc_c89+:} false; then :
3456  $as_echo_n "(cached) " >&6
3457else
3458  ac_cv_prog_cc_c89=no
3459ac_save_CC=$CC
3460cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3461/* end confdefs.h.  */
3462#include <stdarg.h>
3463#include <stdio.h>
3464struct stat;
3465/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
3466struct buf { int x; };
3467FILE * (*rcsopen) (struct buf *, struct stat *, int);
3468static char *e (p, i)
3469     char **p;
3470     int i;
3471{
3472  return p[i];
3473}
3474static char *f (char * (*g) (char **, int), char **p, ...)
3475{
3476  char *s;
3477  va_list v;
3478  va_start (v,p);
3479  s = g (p, va_arg (v,int));
3480  va_end (v);
3481  return s;
3482}
3483
3484/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
3485   function prototypes and stuff, but not '\xHH' hex character constants.
3486   These don't provoke an error unfortunately, instead are silently treated
3487   as 'x'.  The following induces an error, until -std is added to get
3488   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
3489   array size at least.  It's necessary to write '\x00'==0 to get something
3490   that's true only with -std.  */
3491int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3492
3493/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3494   inside strings and character constants.  */
3495#define FOO(x) 'x'
3496int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3497
3498int test (int i, double x);
3499struct s1 {int (*f) (int a);};
3500struct s2 {int (*f) (double a);};
3501int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3502int argc;
3503char **argv;
3504int
3505main ()
3506{
3507return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
3508  ;
3509  return 0;
3510}
3511_ACEOF
3512for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3513	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
3514do
3515  CC="$ac_save_CC $ac_arg"
3516  if ac_fn_c_try_compile "$LINENO"; then :
3517  ac_cv_prog_cc_c89=$ac_arg
3518fi
3519rm -f core conftest.err conftest.$ac_objext
3520  test "x$ac_cv_prog_cc_c89" != "xno" && break
3521done
3522rm -f conftest.$ac_ext
3523CC=$ac_save_CC
3524
3525fi
3526# AC_CACHE_VAL
3527case "x$ac_cv_prog_cc_c89" in
3528  x)
3529    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
3530$as_echo "none needed" >&6; } ;;
3531  xno)
3532    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
3533$as_echo "unsupported" >&6; } ;;
3534  *)
3535    CC="$CC $ac_cv_prog_cc_c89"
3536    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
3537$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
3538esac
3539if test "x$ac_cv_prog_cc_c89" != xno; then :
3540
3541fi
3542
3543ac_ext=c
3544ac_cpp='$CPP $CPPFLAGS'
3545ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3546ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3547ac_compiler_gnu=$ac_cv_c_compiler_gnu
3548
3549
3550ac_ext=c
3551ac_cpp='$CPP $CPPFLAGS'
3552ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3553ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3554ac_compiler_gnu=$ac_cv_c_compiler_gnu
3555{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
3556$as_echo_n "checking how to run the C preprocessor... " >&6; }
3557# On Suns, sometimes $CPP names a directory.
3558if test -n "$CPP" && test -d "$CPP"; then
3559  CPP=
3560fi
3561if test -z "$CPP"; then
3562  if ${ac_cv_prog_CPP+:} false; then :
3563  $as_echo_n "(cached) " >&6
3564else
3565      # Double quotes because CPP needs to be expanded
3566    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3567    do
3568      ac_preproc_ok=false
3569for ac_c_preproc_warn_flag in '' yes
3570do
3571  # Use a header file that comes with gcc, so configuring glibc
3572  # with a fresh cross-compiler works.
3573  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3574  # <limits.h> exists even on freestanding compilers.
3575  # On the NeXT, cc -E runs the code through the compiler's parser,
3576  # not just through cpp. "Syntax error" is here to catch this case.
3577  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3578/* end confdefs.h.  */
3579#ifdef __STDC__
3580# include <limits.h>
3581#else
3582# include <assert.h>
3583#endif
3584		     Syntax error
3585_ACEOF
3586if ac_fn_c_try_cpp "$LINENO"; then :
3587
3588else
3589  # Broken: fails on valid input.
3590continue
3591fi
3592rm -f conftest.err conftest.i conftest.$ac_ext
3593
3594  # OK, works on sane cases.  Now check whether nonexistent headers
3595  # can be detected and how.
3596  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3597/* end confdefs.h.  */
3598#include <ac_nonexistent.h>
3599_ACEOF
3600if ac_fn_c_try_cpp "$LINENO"; then :
3601  # Broken: success on invalid input.
3602continue
3603else
3604  # Passes both tests.
3605ac_preproc_ok=:
3606break
3607fi
3608rm -f conftest.err conftest.i conftest.$ac_ext
3609
3610done
3611# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3612rm -f conftest.i conftest.err conftest.$ac_ext
3613if $ac_preproc_ok; then :
3614  break
3615fi
3616
3617    done
3618    ac_cv_prog_CPP=$CPP
3619
3620fi
3621  CPP=$ac_cv_prog_CPP
3622else
3623  ac_cv_prog_CPP=$CPP
3624fi
3625{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
3626$as_echo "$CPP" >&6; }
3627ac_preproc_ok=false
3628for ac_c_preproc_warn_flag in '' yes
3629do
3630  # Use a header file that comes with gcc, so configuring glibc
3631  # with a fresh cross-compiler works.
3632  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3633  # <limits.h> exists even on freestanding compilers.
3634  # On the NeXT, cc -E runs the code through the compiler's parser,
3635  # not just through cpp. "Syntax error" is here to catch this case.
3636  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3637/* end confdefs.h.  */
3638#ifdef __STDC__
3639# include <limits.h>
3640#else
3641# include <assert.h>
3642#endif
3643		     Syntax error
3644_ACEOF
3645if ac_fn_c_try_cpp "$LINENO"; then :
3646
3647else
3648  # Broken: fails on valid input.
3649continue
3650fi
3651rm -f conftest.err conftest.i conftest.$ac_ext
3652
3653  # OK, works on sane cases.  Now check whether nonexistent headers
3654  # can be detected and how.
3655  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3656/* end confdefs.h.  */
3657#include <ac_nonexistent.h>
3658_ACEOF
3659if ac_fn_c_try_cpp "$LINENO"; then :
3660  # Broken: success on invalid input.
3661continue
3662else
3663  # Passes both tests.
3664ac_preproc_ok=:
3665break
3666fi
3667rm -f conftest.err conftest.i conftest.$ac_ext
3668
3669done
3670# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3671rm -f conftest.i conftest.err conftest.$ac_ext
3672if $ac_preproc_ok; then :
3673
3674else
3675  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3676$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3677as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
3678See \`config.log' for more details" "$LINENO" 5; }
3679fi
3680
3681ac_ext=c
3682ac_cpp='$CPP $CPPFLAGS'
3683ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3684ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3685ac_compiler_gnu=$ac_cv_c_compiler_gnu
3686
3687
3688{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
3689$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
3690if ${ac_cv_path_GREP+:} false; then :
3691  $as_echo_n "(cached) " >&6
3692else
3693  if test -z "$GREP"; then
3694  ac_path_GREP_found=false
3695  # Loop through the user's path and test for each of PROGNAME-LIST
3696  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3697for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3698do
3699  IFS=$as_save_IFS
3700  test -z "$as_dir" && as_dir=.
3701    for ac_prog in grep ggrep; do
3702    for ac_exec_ext in '' $ac_executable_extensions; do
3703      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
3704      as_fn_executable_p "$ac_path_GREP" || continue
3705# Check for GNU ac_path_GREP and select it if it is found.
3706  # Check for GNU $ac_path_GREP
3707case `"$ac_path_GREP" --version 2>&1` in
3708*GNU*)
3709  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
3710*)
3711  ac_count=0
3712  $as_echo_n 0123456789 >"conftest.in"
3713  while :
3714  do
3715    cat "conftest.in" "conftest.in" >"conftest.tmp"
3716    mv "conftest.tmp" "conftest.in"
3717    cp "conftest.in" "conftest.nl"
3718    $as_echo 'GREP' >> "conftest.nl"
3719    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3720    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3721    as_fn_arith $ac_count + 1 && ac_count=$as_val
3722    if test $ac_count -gt ${ac_path_GREP_max-0}; then
3723      # Best one so far, save it but keep looking for a better one
3724      ac_cv_path_GREP="$ac_path_GREP"
3725      ac_path_GREP_max=$ac_count
3726    fi
3727    # 10*(2^10) chars as input seems more than enough
3728    test $ac_count -gt 10 && break
3729  done
3730  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3731esac
3732
3733      $ac_path_GREP_found && break 3
3734    done
3735  done
3736  done
3737IFS=$as_save_IFS
3738  if test -z "$ac_cv_path_GREP"; then
3739    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
3740  fi
3741else
3742  ac_cv_path_GREP=$GREP
3743fi
3744
3745fi
3746{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
3747$as_echo "$ac_cv_path_GREP" >&6; }
3748 GREP="$ac_cv_path_GREP"
3749
3750
3751{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
3752$as_echo_n "checking for egrep... " >&6; }
3753if ${ac_cv_path_EGREP+:} false; then :
3754  $as_echo_n "(cached) " >&6
3755else
3756  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
3757   then ac_cv_path_EGREP="$GREP -E"
3758   else
3759     if test -z "$EGREP"; then
3760  ac_path_EGREP_found=false
3761  # Loop through the user's path and test for each of PROGNAME-LIST
3762  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3763for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3764do
3765  IFS=$as_save_IFS
3766  test -z "$as_dir" && as_dir=.
3767    for ac_prog in egrep; do
3768    for ac_exec_ext in '' $ac_executable_extensions; do
3769      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
3770      as_fn_executable_p "$ac_path_EGREP" || continue
3771# Check for GNU ac_path_EGREP and select it if it is found.
3772  # Check for GNU $ac_path_EGREP
3773case `"$ac_path_EGREP" --version 2>&1` in
3774*GNU*)
3775  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
3776*)
3777  ac_count=0
3778  $as_echo_n 0123456789 >"conftest.in"
3779  while :
3780  do
3781    cat "conftest.in" "conftest.in" >"conftest.tmp"
3782    mv "conftest.tmp" "conftest.in"
3783    cp "conftest.in" "conftest.nl"
3784    $as_echo 'EGREP' >> "conftest.nl"
3785    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3786    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3787    as_fn_arith $ac_count + 1 && ac_count=$as_val
3788    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
3789      # Best one so far, save it but keep looking for a better one
3790      ac_cv_path_EGREP="$ac_path_EGREP"
3791      ac_path_EGREP_max=$ac_count
3792    fi
3793    # 10*(2^10) chars as input seems more than enough
3794    test $ac_count -gt 10 && break
3795  done
3796  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3797esac
3798
3799      $ac_path_EGREP_found && break 3
3800    done
3801  done
3802  done
3803IFS=$as_save_IFS
3804  if test -z "$ac_cv_path_EGREP"; then
3805    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
3806  fi
3807else
3808  ac_cv_path_EGREP=$EGREP
3809fi
3810
3811   fi
3812fi
3813{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
3814$as_echo "$ac_cv_path_EGREP" >&6; }
3815 EGREP="$ac_cv_path_EGREP"
3816
3817
3818{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
3819$as_echo_n "checking for ANSI C header files... " >&6; }
3820if ${ac_cv_header_stdc+:} false; then :
3821  $as_echo_n "(cached) " >&6
3822else
3823  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3824/* end confdefs.h.  */
3825#include <stdlib.h>
3826#include <stdarg.h>
3827#include <string.h>
3828#include <float.h>
3829
3830int
3831main ()
3832{
3833
3834  ;
3835  return 0;
3836}
3837_ACEOF
3838if ac_fn_c_try_compile "$LINENO"; then :
3839  ac_cv_header_stdc=yes
3840else
3841  ac_cv_header_stdc=no
3842fi
3843rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3844
3845if test $ac_cv_header_stdc = yes; then
3846  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
3847  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3848/* end confdefs.h.  */
3849#include <string.h>
3850
3851_ACEOF
3852if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3853  $EGREP "memchr" >/dev/null 2>&1; then :
3854
3855else
3856  ac_cv_header_stdc=no
3857fi
3858rm -f conftest*
3859
3860fi
3861
3862if test $ac_cv_header_stdc = yes; then
3863  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
3864  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3865/* end confdefs.h.  */
3866#include <stdlib.h>
3867
3868_ACEOF
3869if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3870  $EGREP "free" >/dev/null 2>&1; then :
3871
3872else
3873  ac_cv_header_stdc=no
3874fi
3875rm -f conftest*
3876
3877fi
3878
3879if test $ac_cv_header_stdc = yes; then
3880  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
3881  if test "$cross_compiling" = yes; then :
3882  :
3883else
3884  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3885/* end confdefs.h.  */
3886#include <ctype.h>
3887#include <stdlib.h>
3888#if ((' ' & 0x0FF) == 0x020)
3889# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
3890# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
3891#else
3892# define ISLOWER(c) \
3893		   (('a' <= (c) && (c) <= 'i') \
3894		     || ('j' <= (c) && (c) <= 'r') \
3895		     || ('s' <= (c) && (c) <= 'z'))
3896# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
3897#endif
3898
3899#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
3900int
3901main ()
3902{
3903  int i;
3904  for (i = 0; i < 256; i++)
3905    if (XOR (islower (i), ISLOWER (i))
3906	|| toupper (i) != TOUPPER (i))
3907      return 2;
3908  return 0;
3909}
3910_ACEOF
3911if ac_fn_c_try_run "$LINENO"; then :
3912
3913else
3914  ac_cv_header_stdc=no
3915fi
3916rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
3917  conftest.$ac_objext conftest.beam conftest.$ac_ext
3918fi
3919
3920fi
3921fi
3922{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
3923$as_echo "$ac_cv_header_stdc" >&6; }
3924if test $ac_cv_header_stdc = yes; then
3925
3926$as_echo "#define STDC_HEADERS 1" >>confdefs.h
3927
3928fi
3929
3930# On IRIX 5.3, sys/types and inttypes.h are conflicting.
3931for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
3932		  inttypes.h stdint.h unistd.h
3933do :
3934  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
3935ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
3936"
3937if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
3938  cat >>confdefs.h <<_ACEOF
3939#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
3940_ACEOF
3941
3942fi
3943
3944done
3945
3946
3947
3948  ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
3949if test "x$ac_cv_header_minix_config_h" = xyes; then :
3950  MINIX=yes
3951else
3952  MINIX=
3953fi
3954
3955
3956  if test "$MINIX" = yes; then
3957
3958$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
3959
3960
3961$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
3962
3963
3964$as_echo "#define _MINIX 1" >>confdefs.h
3965
3966  fi
3967
3968
3969  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
3970$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
3971if ${ac_cv_safe_to_define___extensions__+:} false; then :
3972  $as_echo_n "(cached) " >&6
3973else
3974  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3975/* end confdefs.h.  */
3976
3977#         define __EXTENSIONS__ 1
3978          $ac_includes_default
3979int
3980main ()
3981{
3982
3983  ;
3984  return 0;
3985}
3986_ACEOF
3987if ac_fn_c_try_compile "$LINENO"; then :
3988  ac_cv_safe_to_define___extensions__=yes
3989else
3990  ac_cv_safe_to_define___extensions__=no
3991fi
3992rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3993fi
3994{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
3995$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
3996  test $ac_cv_safe_to_define___extensions__ = yes &&
3997    $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
3998
3999  $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
4000
4001  $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
4002
4003  $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
4004
4005  $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
4006
4007
4008
4009if test "$ac_cv_header_minix_config_h" = "yes"; then
4010
4011$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
4012
4013fi
4014
4015case "$prefix" in
4016        NONE)
4017		prefix="/usr/local"
4018        ;;
4019esac
4020
4021# are we on MinGW?
4022if uname -s 2>&1 | grep MINGW32 >/dev/null; then on_mingw="yes"
4023else
4024	if echo $target | grep mingw32 >/dev/null; then on_mingw="yes"
4025	else on_mingw="no"; fi
4026fi
4027
4028#
4029# Determine configuration file
4030# the eval is to evaluate shell expansion twice
4031if test $on_mingw = "no"; then
4032  ub_conf_file=`eval echo "${sysconfdir}/unbound/unbound.conf"`
4033else
4034  ub_conf_file="C:\\Program Files\\Unbound\\service.conf"
4035fi
4036
4037# Check whether --with-conf_file was given.
4038if test "${with_conf_file+set}" = set; then :
4039  withval=$with_conf_file; ub_conf_file="$withval"
4040fi
4041
4042
4043hdr_config="`echo $ub_conf_file | sed -e 's/\\\\/\\\\\\\\/g'`"
4044
4045
4046cat >>confdefs.h <<_ACEOF
4047#define CONFIGFILE "$hdr_config"
4048_ACEOF
4049
4050
4051# Determine run, chroot directory and pidfile locations
4052
4053# Check whether --with-run-dir was given.
4054if test "${with_run_dir+set}" = set; then :
4055  withval=$with_run_dir; UNBOUND_RUN_DIR="$withval"
4056else
4057  if test $on_mingw = no; then
4058    UNBOUND_RUN_DIR=`dirname "$ub_conf_file"`
4059else
4060    UNBOUND_RUN_DIR=""
4061fi
4062
4063fi
4064
4065
4066hdr_run="`echo $UNBOUND_RUN_DIR | sed -e 's/\\\\/\\\\\\\\/g'`"
4067
4068
4069cat >>confdefs.h <<_ACEOF
4070#define RUN_DIR "$hdr_run"
4071_ACEOF
4072
4073
4074
4075# Check whether --with-chroot-dir was given.
4076if test "${with_chroot_dir+set}" = set; then :
4077  withval=$with_chroot_dir; UNBOUND_CHROOT_DIR="$withval"
4078else
4079  if test $on_mingw = no; then
4080    UNBOUND_CHROOT_DIR="$UNBOUND_RUN_DIR"
4081else
4082    UNBOUND_CHROOT_DIR=""
4083fi
4084
4085fi
4086
4087
4088hdr_chroot="`echo $UNBOUND_CHROOT_DIR | sed -e 's/\\\\/\\\\\\\\/g'`"
4089
4090
4091cat >>confdefs.h <<_ACEOF
4092#define CHROOT_DIR "$hdr_chroot"
4093_ACEOF
4094
4095
4096
4097# Check whether --with-share-dir was given.
4098if test "${with_share_dir+set}" = set; then :
4099  withval=$with_share_dir; UNBOUND_SHARE_DIR="$withval"
4100else
4101  UNBOUND_SHARE_DIR="$UNBOUND_RUN_DIR"
4102fi
4103
4104
4105
4106cat >>confdefs.h <<_ACEOF
4107#define SHARE_DIR "$UNBOUND_SHARE_DIR"
4108_ACEOF
4109
4110
4111
4112# Check whether --with-pidfile was given.
4113if test "${with_pidfile+set}" = set; then :
4114  withval=$with_pidfile; UNBOUND_PIDFILE="$withval"
4115else
4116  if test $on_mingw = no; then
4117    UNBOUND_PIDFILE="$UNBOUND_RUN_DIR/unbound.pid"
4118else
4119    UNBOUND_PIDFILE=""
4120fi
4121
4122fi
4123
4124
4125hdr_pid="`echo $UNBOUND_PIDFILE | sed -e 's/\\\\/\\\\\\\\/g'`"
4126
4127
4128cat >>confdefs.h <<_ACEOF
4129#define PIDFILE "$hdr_pid"
4130_ACEOF
4131
4132
4133
4134# Check whether --with-rootkey-file was given.
4135if test "${with_rootkey_file+set}" = set; then :
4136  withval=$with_rootkey_file; UNBOUND_ROOTKEY_FILE="$withval"
4137else
4138  if test $on_mingw = no; then
4139    UNBOUND_ROOTKEY_FILE="$UNBOUND_RUN_DIR/root.key"
4140else
4141    UNBOUND_ROOTKEY_FILE="C:\\Program Files\\Unbound\\root.key"
4142fi
4143
4144fi
4145
4146
4147hdr_rkey="`echo $UNBOUND_ROOTKEY_FILE | sed -e 's/\\\\/\\\\\\\\/g'`"
4148
4149
4150cat >>confdefs.h <<_ACEOF
4151#define ROOT_ANCHOR_FILE "$hdr_rkey"
4152_ACEOF
4153
4154
4155
4156# Check whether --with-rootcert-file was given.
4157if test "${with_rootcert_file+set}" = set; then :
4158  withval=$with_rootcert_file; UNBOUND_ROOTCERT_FILE="$withval"
4159else
4160  if test $on_mingw = no; then
4161    UNBOUND_ROOTCERT_FILE="$UNBOUND_RUN_DIR/icannbundle.pem"
4162else
4163    UNBOUND_ROOTCERT_FILE="C:\\Program Files\\Unbound\\icannbundle.pem"
4164fi
4165
4166fi
4167
4168
4169hdr_rpem="`echo $UNBOUND_ROOTCERT_FILE | sed -e 's/\\\\/\\\\\\\\/g'`"
4170
4171
4172cat >>confdefs.h <<_ACEOF
4173#define ROOT_CERT_FILE "$hdr_rpem"
4174_ACEOF
4175
4176
4177
4178# Check whether --with-username was given.
4179if test "${with_username+set}" = set; then :
4180  withval=$with_username; UNBOUND_USERNAME="$withval"
4181else
4182  UNBOUND_USERNAME="unbound"
4183fi
4184
4185
4186
4187cat >>confdefs.h <<_ACEOF
4188#define UB_USERNAME "$UNBOUND_USERNAME"
4189_ACEOF
4190
4191
4192
4193$as_echo "#define WINVER 0x0502" >>confdefs.h
4194
4195wnvs=`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/' `
4196
4197
4198cat >>confdefs.h <<_ACEOF
4199#define RSRC_PACKAGE_VERSION $wnvs
4200_ACEOF
4201
4202
4203# Checks for typedefs, structures, and compiler characteristics.
4204{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
4205$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
4206if ${ac_cv_c_const+:} false; then :
4207  $as_echo_n "(cached) " >&6
4208else
4209  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4210/* end confdefs.h.  */
4211
4212int
4213main ()
4214{
4215
4216#ifndef __cplusplus
4217  /* Ultrix mips cc rejects this sort of thing.  */
4218  typedef int charset[2];
4219  const charset cs = { 0, 0 };
4220  /* SunOS 4.1.1 cc rejects this.  */
4221  char const *const *pcpcc;
4222  char **ppc;
4223  /* NEC SVR4.0.2 mips cc rejects this.  */
4224  struct point {int x, y;};
4225  static struct point const zero = {0,0};
4226  /* AIX XL C 1.02.0.0 rejects this.
4227     It does not let you subtract one const X* pointer from another in
4228     an arm of an if-expression whose if-part is not a constant
4229     expression */
4230  const char *g = "string";
4231  pcpcc = &g + (g ? g-g : 0);
4232  /* HPUX 7.0 cc rejects these. */
4233  ++pcpcc;
4234  ppc = (char**) pcpcc;
4235  pcpcc = (char const *const *) ppc;
4236  { /* SCO 3.2v4 cc rejects this sort of thing.  */
4237    char tx;
4238    char *t = &tx;
4239    char const *s = 0 ? (char *) 0 : (char const *) 0;
4240
4241    *t++ = 0;
4242    if (s) return 0;
4243  }
4244  { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
4245    int x[] = {25, 17};
4246    const int *foo = &x[0];
4247    ++foo;
4248  }
4249  { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
4250    typedef const int *iptr;
4251    iptr p = 0;
4252    ++p;
4253  }
4254  { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
4255       "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
4256    struct s { int j; const int *ap[3]; } bx;
4257    struct s *b = &bx; b->j = 5;
4258  }
4259  { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
4260    const int foo = 10;
4261    if (!foo) return 0;
4262  }
4263  return !cs[0] && !zero.x;
4264#endif
4265
4266  ;
4267  return 0;
4268}
4269_ACEOF
4270if ac_fn_c_try_compile "$LINENO"; then :
4271  ac_cv_c_const=yes
4272else
4273  ac_cv_c_const=no
4274fi
4275rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4276fi
4277{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
4278$as_echo "$ac_cv_c_const" >&6; }
4279if test $ac_cv_c_const = no; then
4280
4281$as_echo "#define const /**/" >>confdefs.h
4282
4283fi
4284
4285ac_ext=c
4286ac_cpp='$CPP $CPPFLAGS'
4287ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4288ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4289ac_compiler_gnu=$ac_cv_c_compiler_gnu
4290
4291# allow user to override the -g -O2 flags.
4292if test "x$CFLAGS" = "x" ; then
4293
4294
4295{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -g" >&5
4296$as_echo_n "checking whether $CC supports -g... " >&6; }
4297cache=`echo g | sed 'y%.=/+-%___p_%'`
4298if eval \${cv_prog_cc_flag_$cache+:} false; then :
4299  $as_echo_n "(cached) " >&6
4300else
4301
4302echo 'void f(void){}' >conftest.c
4303if test -z "`$CC $CPPFLAGS $CFLAGS -g -c conftest.c 2>&1`"; then
4304eval "cv_prog_cc_flag_$cache=yes"
4305else
4306eval "cv_prog_cc_flag_$cache=no"
4307fi
4308rm -f conftest conftest.o conftest.c
4309
4310fi
4311
4312if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
4313{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4314$as_echo "yes" >&6; }
4315:
4316CFLAGS="$CFLAGS -g"
4317else
4318{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4319$as_echo "no" >&6; }
4320:
4321
4322fi
4323
4324
4325
4326{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -O2" >&5
4327$as_echo_n "checking whether $CC supports -O2... " >&6; }
4328cache=`echo O2 | sed 'y%.=/+-%___p_%'`
4329if eval \${cv_prog_cc_flag_$cache+:} false; then :
4330  $as_echo_n "(cached) " >&6
4331else
4332
4333echo 'void f(void){}' >conftest.c
4334if test -z "`$CC $CPPFLAGS $CFLAGS -O2 -c conftest.c 2>&1`"; then
4335eval "cv_prog_cc_flag_$cache=yes"
4336else
4337eval "cv_prog_cc_flag_$cache=no"
4338fi
4339rm -f conftest conftest.o conftest.c
4340
4341fi
4342
4343if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
4344{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4345$as_echo "yes" >&6; }
4346:
4347CFLAGS="$CFLAGS -O2"
4348else
4349{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4350$as_echo "no" >&6; }
4351:
4352
4353fi
4354
4355fi
4356ac_ext=c
4357ac_cpp='$CPP $CPPFLAGS'
4358ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4359ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4360ac_compiler_gnu=$ac_cv_c_compiler_gnu
4361if test -n "$ac_tool_prefix"; then
4362  # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
4363set dummy ${ac_tool_prefix}gcc; ac_word=$2
4364{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4365$as_echo_n "checking for $ac_word... " >&6; }
4366if ${ac_cv_prog_CC+:} false; then :
4367  $as_echo_n "(cached) " >&6
4368else
4369  if test -n "$CC"; then
4370  ac_cv_prog_CC="$CC" # Let the user override the test.
4371else
4372as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4373for as_dir in $PATH
4374do
4375  IFS=$as_save_IFS
4376  test -z "$as_dir" && as_dir=.
4377    for ac_exec_ext in '' $ac_executable_extensions; do
4378  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4379    ac_cv_prog_CC="${ac_tool_prefix}gcc"
4380    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4381    break 2
4382  fi
4383done
4384  done
4385IFS=$as_save_IFS
4386
4387fi
4388fi
4389CC=$ac_cv_prog_CC
4390if test -n "$CC"; then
4391  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4392$as_echo "$CC" >&6; }
4393else
4394  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4395$as_echo "no" >&6; }
4396fi
4397
4398
4399fi
4400if test -z "$ac_cv_prog_CC"; then
4401  ac_ct_CC=$CC
4402  # Extract the first word of "gcc", so it can be a program name with args.
4403set dummy gcc; ac_word=$2
4404{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4405$as_echo_n "checking for $ac_word... " >&6; }
4406if ${ac_cv_prog_ac_ct_CC+:} false; then :
4407  $as_echo_n "(cached) " >&6
4408else
4409  if test -n "$ac_ct_CC"; then
4410  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
4411else
4412as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4413for as_dir in $PATH
4414do
4415  IFS=$as_save_IFS
4416  test -z "$as_dir" && as_dir=.
4417    for ac_exec_ext in '' $ac_executable_extensions; do
4418  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4419    ac_cv_prog_ac_ct_CC="gcc"
4420    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4421    break 2
4422  fi
4423done
4424  done
4425IFS=$as_save_IFS
4426
4427fi
4428fi
4429ac_ct_CC=$ac_cv_prog_ac_ct_CC
4430if test -n "$ac_ct_CC"; then
4431  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
4432$as_echo "$ac_ct_CC" >&6; }
4433else
4434  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4435$as_echo "no" >&6; }
4436fi
4437
4438  if test "x$ac_ct_CC" = x; then
4439    CC=""
4440  else
4441    case $cross_compiling:$ac_tool_warned in
4442yes:)
4443{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4444$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4445ac_tool_warned=yes ;;
4446esac
4447    CC=$ac_ct_CC
4448  fi
4449else
4450  CC="$ac_cv_prog_CC"
4451fi
4452
4453if test -z "$CC"; then
4454          if test -n "$ac_tool_prefix"; then
4455    # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
4456set dummy ${ac_tool_prefix}cc; ac_word=$2
4457{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4458$as_echo_n "checking for $ac_word... " >&6; }
4459if ${ac_cv_prog_CC+:} false; then :
4460  $as_echo_n "(cached) " >&6
4461else
4462  if test -n "$CC"; then
4463  ac_cv_prog_CC="$CC" # Let the user override the test.
4464else
4465as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4466for as_dir in $PATH
4467do
4468  IFS=$as_save_IFS
4469  test -z "$as_dir" && as_dir=.
4470    for ac_exec_ext in '' $ac_executable_extensions; do
4471  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4472    ac_cv_prog_CC="${ac_tool_prefix}cc"
4473    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4474    break 2
4475  fi
4476done
4477  done
4478IFS=$as_save_IFS
4479
4480fi
4481fi
4482CC=$ac_cv_prog_CC
4483if test -n "$CC"; then
4484  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4485$as_echo "$CC" >&6; }
4486else
4487  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4488$as_echo "no" >&6; }
4489fi
4490
4491
4492  fi
4493fi
4494if test -z "$CC"; then
4495  # Extract the first word of "cc", so it can be a program name with args.
4496set dummy cc; ac_word=$2
4497{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4498$as_echo_n "checking for $ac_word... " >&6; }
4499if ${ac_cv_prog_CC+:} false; then :
4500  $as_echo_n "(cached) " >&6
4501else
4502  if test -n "$CC"; then
4503  ac_cv_prog_CC="$CC" # Let the user override the test.
4504else
4505  ac_prog_rejected=no
4506as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4507for as_dir in $PATH
4508do
4509  IFS=$as_save_IFS
4510  test -z "$as_dir" && as_dir=.
4511    for ac_exec_ext in '' $ac_executable_extensions; do
4512  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4513    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
4514       ac_prog_rejected=yes
4515       continue
4516     fi
4517    ac_cv_prog_CC="cc"
4518    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4519    break 2
4520  fi
4521done
4522  done
4523IFS=$as_save_IFS
4524
4525if test $ac_prog_rejected = yes; then
4526  # We found a bogon in the path, so make sure we never use it.
4527  set dummy $ac_cv_prog_CC
4528  shift
4529  if test $# != 0; then
4530    # We chose a different compiler from the bogus one.
4531    # However, it has the same basename, so the bogon will be chosen
4532    # first if we set CC to just the basename; use the full file name.
4533    shift
4534    ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
4535  fi
4536fi
4537fi
4538fi
4539CC=$ac_cv_prog_CC
4540if test -n "$CC"; then
4541  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4542$as_echo "$CC" >&6; }
4543else
4544  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4545$as_echo "no" >&6; }
4546fi
4547
4548
4549fi
4550if test -z "$CC"; then
4551  if test -n "$ac_tool_prefix"; then
4552  for ac_prog in cl.exe
4553  do
4554    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4555set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4556{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4557$as_echo_n "checking for $ac_word... " >&6; }
4558if ${ac_cv_prog_CC+:} false; then :
4559  $as_echo_n "(cached) " >&6
4560else
4561  if test -n "$CC"; then
4562  ac_cv_prog_CC="$CC" # Let the user override the test.
4563else
4564as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4565for as_dir in $PATH
4566do
4567  IFS=$as_save_IFS
4568  test -z "$as_dir" && as_dir=.
4569    for ac_exec_ext in '' $ac_executable_extensions; do
4570  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4571    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
4572    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4573    break 2
4574  fi
4575done
4576  done
4577IFS=$as_save_IFS
4578
4579fi
4580fi
4581CC=$ac_cv_prog_CC
4582if test -n "$CC"; then
4583  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4584$as_echo "$CC" >&6; }
4585else
4586  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4587$as_echo "no" >&6; }
4588fi
4589
4590
4591    test -n "$CC" && break
4592  done
4593fi
4594if test -z "$CC"; then
4595  ac_ct_CC=$CC
4596  for ac_prog in cl.exe
4597do
4598  # Extract the first word of "$ac_prog", so it can be a program name with args.
4599set dummy $ac_prog; ac_word=$2
4600{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4601$as_echo_n "checking for $ac_word... " >&6; }
4602if ${ac_cv_prog_ac_ct_CC+:} false; then :
4603  $as_echo_n "(cached) " >&6
4604else
4605  if test -n "$ac_ct_CC"; then
4606  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
4607else
4608as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4609for as_dir in $PATH
4610do
4611  IFS=$as_save_IFS
4612  test -z "$as_dir" && as_dir=.
4613    for ac_exec_ext in '' $ac_executable_extensions; do
4614  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4615    ac_cv_prog_ac_ct_CC="$ac_prog"
4616    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4617    break 2
4618  fi
4619done
4620  done
4621IFS=$as_save_IFS
4622
4623fi
4624fi
4625ac_ct_CC=$ac_cv_prog_ac_ct_CC
4626if test -n "$ac_ct_CC"; then
4627  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
4628$as_echo "$ac_ct_CC" >&6; }
4629else
4630  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4631$as_echo "no" >&6; }
4632fi
4633
4634
4635  test -n "$ac_ct_CC" && break
4636done
4637
4638  if test "x$ac_ct_CC" = x; then
4639    CC=""
4640  else
4641    case $cross_compiling:$ac_tool_warned in
4642yes:)
4643{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4644$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4645ac_tool_warned=yes ;;
4646esac
4647    CC=$ac_ct_CC
4648  fi
4649fi
4650
4651fi
4652
4653
4654test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4655$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4656as_fn_error $? "no acceptable C compiler found in \$PATH
4657See \`config.log' for more details" "$LINENO" 5; }
4658
4659# Provide some information about the compiler.
4660$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
4661set X $ac_compile
4662ac_compiler=$2
4663for ac_option in --version -v -V -qversion; do
4664  { { ac_try="$ac_compiler $ac_option >&5"
4665case "(($ac_try" in
4666  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4667  *) ac_try_echo=$ac_try;;
4668esac
4669eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4670$as_echo "$ac_try_echo"; } >&5
4671  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
4672  ac_status=$?
4673  if test -s conftest.err; then
4674    sed '10a\
4675... rest of stderr output deleted ...
4676         10q' conftest.err >conftest.er1
4677    cat conftest.er1 >&5
4678  fi
4679  rm -f conftest.er1 conftest.err
4680  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4681  test $ac_status = 0; }
4682done
4683
4684{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4685$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
4686if ${ac_cv_c_compiler_gnu+:} false; then :
4687  $as_echo_n "(cached) " >&6
4688else
4689  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4690/* end confdefs.h.  */
4691
4692int
4693main ()
4694{
4695#ifndef __GNUC__
4696       choke me
4697#endif
4698
4699  ;
4700  return 0;
4701}
4702_ACEOF
4703if ac_fn_c_try_compile "$LINENO"; then :
4704  ac_compiler_gnu=yes
4705else
4706  ac_compiler_gnu=no
4707fi
4708rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4709ac_cv_c_compiler_gnu=$ac_compiler_gnu
4710
4711fi
4712{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4713$as_echo "$ac_cv_c_compiler_gnu" >&6; }
4714if test $ac_compiler_gnu = yes; then
4715  GCC=yes
4716else
4717  GCC=
4718fi
4719ac_test_CFLAGS=${CFLAGS+set}
4720ac_save_CFLAGS=$CFLAGS
4721{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4722$as_echo_n "checking whether $CC accepts -g... " >&6; }
4723if ${ac_cv_prog_cc_g+:} false; then :
4724  $as_echo_n "(cached) " >&6
4725else
4726  ac_save_c_werror_flag=$ac_c_werror_flag
4727   ac_c_werror_flag=yes
4728   ac_cv_prog_cc_g=no
4729   CFLAGS="-g"
4730   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4731/* end confdefs.h.  */
4732
4733int
4734main ()
4735{
4736
4737  ;
4738  return 0;
4739}
4740_ACEOF
4741if ac_fn_c_try_compile "$LINENO"; then :
4742  ac_cv_prog_cc_g=yes
4743else
4744  CFLAGS=""
4745      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4746/* end confdefs.h.  */
4747
4748int
4749main ()
4750{
4751
4752  ;
4753  return 0;
4754}
4755_ACEOF
4756if ac_fn_c_try_compile "$LINENO"; then :
4757
4758else
4759  ac_c_werror_flag=$ac_save_c_werror_flag
4760	 CFLAGS="-g"
4761	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4762/* end confdefs.h.  */
4763
4764int
4765main ()
4766{
4767
4768  ;
4769  return 0;
4770}
4771_ACEOF
4772if ac_fn_c_try_compile "$LINENO"; then :
4773  ac_cv_prog_cc_g=yes
4774fi
4775rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4776fi
4777rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4778fi
4779rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4780   ac_c_werror_flag=$ac_save_c_werror_flag
4781fi
4782{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4783$as_echo "$ac_cv_prog_cc_g" >&6; }
4784if test "$ac_test_CFLAGS" = set; then
4785  CFLAGS=$ac_save_CFLAGS
4786elif test $ac_cv_prog_cc_g = yes; then
4787  if test "$GCC" = yes; then
4788    CFLAGS="-g -O2"
4789  else
4790    CFLAGS="-g"
4791  fi
4792else
4793  if test "$GCC" = yes; then
4794    CFLAGS="-O2"
4795  else
4796    CFLAGS=
4797  fi
4798fi
4799{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4800$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
4801if ${ac_cv_prog_cc_c89+:} false; then :
4802  $as_echo_n "(cached) " >&6
4803else
4804  ac_cv_prog_cc_c89=no
4805ac_save_CC=$CC
4806cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4807/* end confdefs.h.  */
4808#include <stdarg.h>
4809#include <stdio.h>
4810struct stat;
4811/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
4812struct buf { int x; };
4813FILE * (*rcsopen) (struct buf *, struct stat *, int);
4814static char *e (p, i)
4815     char **p;
4816     int i;
4817{
4818  return p[i];
4819}
4820static char *f (char * (*g) (char **, int), char **p, ...)
4821{
4822  char *s;
4823  va_list v;
4824  va_start (v,p);
4825  s = g (p, va_arg (v,int));
4826  va_end (v);
4827  return s;
4828}
4829
4830/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
4831   function prototypes and stuff, but not '\xHH' hex character constants.
4832   These don't provoke an error unfortunately, instead are silently treated
4833   as 'x'.  The following induces an error, until -std is added to get
4834   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
4835   array size at least.  It's necessary to write '\x00'==0 to get something
4836   that's true only with -std.  */
4837int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4838
4839/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4840   inside strings and character constants.  */
4841#define FOO(x) 'x'
4842int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4843
4844int test (int i, double x);
4845struct s1 {int (*f) (int a);};
4846struct s2 {int (*f) (double a);};
4847int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4848int argc;
4849char **argv;
4850int
4851main ()
4852{
4853return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
4854  ;
4855  return 0;
4856}
4857_ACEOF
4858for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4859	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
4860do
4861  CC="$ac_save_CC $ac_arg"
4862  if ac_fn_c_try_compile "$LINENO"; then :
4863  ac_cv_prog_cc_c89=$ac_arg
4864fi
4865rm -f core conftest.err conftest.$ac_objext
4866  test "x$ac_cv_prog_cc_c89" != "xno" && break
4867done
4868rm -f conftest.$ac_ext
4869CC=$ac_save_CC
4870
4871fi
4872# AC_CACHE_VAL
4873case "x$ac_cv_prog_cc_c89" in
4874  x)
4875    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4876$as_echo "none needed" >&6; } ;;
4877  xno)
4878    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4879$as_echo "unsupported" >&6; } ;;
4880  *)
4881    CC="$CC $ac_cv_prog_cc_c89"
4882    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4883$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
4884esac
4885if test "x$ac_cv_prog_cc_c89" != xno; then :
4886
4887fi
4888
4889ac_ext=c
4890ac_cpp='$CPP $CPPFLAGS'
4891ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4892ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4893ac_compiler_gnu=$ac_cv_c_compiler_gnu
4894
4895
4896{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $CC dependency flag" >&5
4897$as_echo_n "checking $CC dependency flag... " >&6; }
4898echo 'void f(){}' >conftest.c
4899if test "`$CC -MM conftest.c 2>&1`" = "conftest.o: conftest.c"; then
4900	DEPFLAG="-MM"
4901else
4902  if test "`$CC -xM1 conftest.c 2>&1`" = "conftest.o: conftest.c"; then
4903	DEPFLAG="-xM1"
4904  else
4905	DEPFLAG="-MM"  # dunno do something
4906  fi
4907fi
4908{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEPFLAG" >&5
4909$as_echo "$DEPFLAG" >&6; }
4910rm -f conftest.c
4911
4912
4913
4914
4915
4916{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Werror" >&5
4917$as_echo_n "checking whether $CC supports -Werror... " >&6; }
4918cache=`echo Werror | sed 'y%.=/+-%___p_%'`
4919if eval \${cv_prog_cc_flag_$cache+:} false; then :
4920  $as_echo_n "(cached) " >&6
4921else
4922
4923echo 'void f(void){}' >conftest.c
4924if test -z "`$CC $CPPFLAGS $CFLAGS -Werror -c conftest.c 2>&1`"; then
4925eval "cv_prog_cc_flag_$cache=yes"
4926else
4927eval "cv_prog_cc_flag_$cache=no"
4928fi
4929rm -f conftest conftest.o conftest.c
4930
4931fi
4932
4933if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
4934{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4935$as_echo "yes" >&6; }
4936:
4937ERRFLAG="-Werror"
4938else
4939{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4940$as_echo "no" >&6; }
4941:
4942ERRFLAG="-errwarn"
4943fi
4944
4945
4946
4947{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wall" >&5
4948$as_echo_n "checking whether $CC supports -Wall... " >&6; }
4949cache=`echo Wall | sed 'y%.=/+-%___p_%'`
4950if eval \${cv_prog_cc_flag_$cache+:} false; then :
4951  $as_echo_n "(cached) " >&6
4952else
4953
4954echo 'void f(void){}' >conftest.c
4955if test -z "`$CC $CPPFLAGS $CFLAGS -Wall -c conftest.c 2>&1`"; then
4956eval "cv_prog_cc_flag_$cache=yes"
4957else
4958eval "cv_prog_cc_flag_$cache=no"
4959fi
4960rm -f conftest conftest.o conftest.c
4961
4962fi
4963
4964if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
4965{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4966$as_echo "yes" >&6; }
4967:
4968ERRFLAG="$ERRFLAG -Wall"
4969else
4970{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4971$as_echo "no" >&6; }
4972:
4973ERRFLAG="$ERRFLAG -errfmt"
4974fi
4975
4976
4977
4978
4979
4980{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -std=c99" >&5
4981$as_echo_n "checking whether $CC supports -std=c99... " >&6; }
4982cache=`echo std=c99 | sed 'y%.=/+-%___p_%'`
4983if eval \${cv_prog_cc_flag_$cache+:} false; then :
4984  $as_echo_n "(cached) " >&6
4985else
4986
4987echo 'void f(void){}' >conftest.c
4988if test -z "`$CC $CPPFLAGS $CFLAGS -std=c99 -c conftest.c 2>&1`"; then
4989eval "cv_prog_cc_flag_$cache=yes"
4990else
4991eval "cv_prog_cc_flag_$cache=no"
4992fi
4993rm -f conftest conftest.o conftest.c
4994
4995fi
4996
4997if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
4998{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4999$as_echo "yes" >&6; }
5000:
5001C99FLAG="-std=c99"
5002else
5003{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5004$as_echo "no" >&6; }
5005:
5006
5007fi
5008
5009
5010
5011{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -xc99" >&5
5012$as_echo_n "checking whether $CC supports -xc99... " >&6; }
5013cache=`echo xc99 | sed 'y%.=/+-%___p_%'`
5014if eval \${cv_prog_cc_flag_$cache+:} false; then :
5015  $as_echo_n "(cached) " >&6
5016else
5017
5018echo 'void f(void){}' >conftest.c
5019if test -z "`$CC $CPPFLAGS $CFLAGS -xc99 -c conftest.c 2>&1`"; then
5020eval "cv_prog_cc_flag_$cache=yes"
5021else
5022eval "cv_prog_cc_flag_$cache=no"
5023fi
5024rm -f conftest conftest.o conftest.c
5025
5026fi
5027
5028if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
5029{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5030$as_echo "yes" >&6; }
5031:
5032C99FLAG="-xc99"
5033else
5034{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5035$as_echo "no" >&6; }
5036:
5037
5038fi
5039
5040
5041for ac_header in getopt.h time.h
5042do :
5043  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5044ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
5045"
5046if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
5047  cat >>confdefs.h <<_ACEOF
5048#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5049_ACEOF
5050
5051fi
5052
5053done
5054
5055
5056
5057
5058
5059{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we need $C99FLAG -D__EXTENSIONS__ -D_BSD_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -D_XOPEN_SOURCE_EXTENDED=1 -D_ALL_SOURCE as a flag for $CC" >&5
5060$as_echo_n "checking whether we need $C99FLAG -D__EXTENSIONS__ -D_BSD_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -D_XOPEN_SOURCE_EXTENDED=1 -D_ALL_SOURCE as a flag for $CC... " >&6; }
5061cache=`$as_echo "$C99FLAG -D__EXTENSIONS__ -D_BSD_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -D_XOPEN_SOURCE_EXTENDED=1 -D_ALL_SOURCE" | $as_tr_sh`
5062if eval \${cv_prog_cc_flag_needed_$cache+:} false; then :
5063  $as_echo_n "(cached) " >&6
5064else
5065
5066echo '
5067#include "confdefs.h"
5068#include <stdlib.h>
5069#include <ctype.h>
5070#include <sys/time.h>
5071#ifdef HAVE_TIME_H
5072#include <time.h>
5073#endif
5074#include <unistd.h>
5075#include <netdb.h>
5076#ifdef HAVE_GETOPT_H
5077#include <getopt.h>
5078#endif
5079
5080int test() {
5081	int a;
5082	char **opts = NULL;
5083	struct timeval tv;
5084	char *t;
5085	time_t time = 0;
5086	char *buf = NULL;
5087	const char* str = NULL;
5088	struct msghdr msg;
5089	msg.msg_control = 0;
5090	t = ctime_r(&time, buf);
5091	tv.tv_usec = 10;
5092	srandom(32);
5093	a = getopt(2, opts, "a");
5094	a = isascii(32);
5095	str = gai_strerror(0);
5096	if(str && t && tv.tv_usec && msg.msg_control)
5097		a = 0;
5098	return a;
5099}
5100' > conftest.c
5101echo 'void f(){}' >>conftest.c
5102if test -z "`$CC $CPPFLAGS $CFLAGS $ERRFLAG -c conftest.c 2>&1`"; then
5103eval "cv_prog_cc_flag_needed_$cache=no"
5104else
5105
5106if test -z "`$CC $CPPFLAGS $CFLAGS $C99FLAG -D__EXTENSIONS__ -D_BSD_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
5107eval "cv_prog_cc_flag_needed_$cache=yes"
5108else
5109eval "cv_prog_cc_flag_needed_$cache=fail"
5110#echo 'Test with flag fails too!'
5111#cat conftest.c
5112#echo "$CC $CPPFLAGS $CFLAGS $C99FLAG -D__EXTENSIONS__ -D_BSD_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -D_XOPEN_SOURCE_EXTENDED=1 -D_ALL_SOURCE $ERRFLAG -c conftest.c 2>&1"
5113#echo `$CC $CPPFLAGS $CFLAGS $C99FLAG -D__EXTENSIONS__ -D_BSD_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -D_XOPEN_SOURCE_EXTENDED=1 -D_ALL_SOURCE $ERRFLAG -c conftest.c 2>&1`
5114#exit 1
5115fi
5116
5117fi
5118rm -f conftest conftest.c conftest.o
5119
5120fi
5121
5122if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = yes"; then
5123{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5124$as_echo "yes" >&6; }
5125:
5126CFLAGS="$CFLAGS $C99FLAG -D__EXTENSIONS__ -D_BSD_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -D_XOPEN_SOURCE_EXTENDED=1 -D_ALL_SOURCE"
5127else
5128if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = no"; then
5129{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5130$as_echo "no" >&6; }
5131#echo 'Test with flag is no!'
5132#cat conftest.c
5133#echo "$CC $CPPFLAGS $CFLAGS $C99FLAG -D__EXTENSIONS__ -D_BSD_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -D_XOPEN_SOURCE_EXTENDED=1 -D_ALL_SOURCE $ERRFLAG -c conftest.c 2>&1"
5134#echo `$CC $CPPFLAGS $CFLAGS $C99FLAG -D__EXTENSIONS__ -D_BSD_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -D_XOPEN_SOURCE_EXTENDED=1 -D_ALL_SOURCE $ERRFLAG -c conftest.c 2>&1`
5135#exit 1
5136:
5137
5138else
5139{ $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
5140$as_echo "failed" >&6; }
5141:
5142
5143fi
5144fi
5145
5146
5147
5148
5149
5150{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we need $C99FLAG -D__EXTENSIONS__ -D_BSD_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -D_ALL_SOURCE as a flag for $CC" >&5
5151$as_echo_n "checking whether we need $C99FLAG -D__EXTENSIONS__ -D_BSD_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -D_ALL_SOURCE as a flag for $CC... " >&6; }
5152cache=`$as_echo "$C99FLAG -D__EXTENSIONS__ -D_BSD_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -D_ALL_SOURCE" | $as_tr_sh`
5153if eval \${cv_prog_cc_flag_needed_$cache+:} false; then :
5154  $as_echo_n "(cached) " >&6
5155else
5156
5157echo '
5158#include "confdefs.h"
5159#include <stdlib.h>
5160#include <ctype.h>
5161#include <sys/time.h>
5162#ifdef HAVE_TIME_H
5163#include <time.h>
5164#endif
5165#include <unistd.h>
5166#include <netdb.h>
5167#ifdef HAVE_GETOPT_H
5168#include <getopt.h>
5169#endif
5170
5171int test() {
5172	int a;
5173	char **opts = NULL;
5174	struct timeval tv;
5175	char *t;
5176	time_t time = 0;
5177	char *buf = NULL;
5178	const char* str = NULL;
5179	struct msghdr msg;
5180	msg.msg_control = 0;
5181	t = ctime_r(&time, buf);
5182	tv.tv_usec = 10;
5183	srandom(32);
5184	a = getopt(2, opts, "a");
5185	a = isascii(32);
5186	str = gai_strerror(0);
5187	if(str && t && tv.tv_usec && msg.msg_control)
5188		a = 0;
5189	return a;
5190}
5191' > conftest.c
5192echo 'void f(){}' >>conftest.c
5193if test -z "`$CC $CPPFLAGS $CFLAGS $ERRFLAG -c conftest.c 2>&1`"; then
5194eval "cv_prog_cc_flag_needed_$cache=no"
5195else
5196
5197if test -z "`$CC $CPPFLAGS $CFLAGS $C99FLAG -D__EXTENSIONS__ -D_BSD_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -D_ALL_SOURCE $ERRFLAG -c conftest.c 2>&1`"; then
5198eval "cv_prog_cc_flag_needed_$cache=yes"
5199else
5200eval "cv_prog_cc_flag_needed_$cache=fail"
5201#echo 'Test with flag fails too!'
5202#cat conftest.c
5203#echo "$CC $CPPFLAGS $CFLAGS $C99FLAG -D__EXTENSIONS__ -D_BSD_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -D_ALL_SOURCE $ERRFLAG -c conftest.c 2>&1"
5204#echo `$CC $CPPFLAGS $CFLAGS $C99FLAG -D__EXTENSIONS__ -D_BSD_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -D_ALL_SOURCE $ERRFLAG -c conftest.c 2>&1`
5205#exit 1
5206fi
5207
5208fi
5209rm -f conftest conftest.c conftest.o
5210
5211fi
5212
5213if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = yes"; then
5214{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5215$as_echo "yes" >&6; }
5216:
5217CFLAGS="$CFLAGS $C99FLAG -D__EXTENSIONS__ -D_BSD_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -D_ALL_SOURCE"
5218else
5219if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = no"; then
5220{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5221$as_echo "no" >&6; }
5222#echo 'Test with flag is no!'
5223#cat conftest.c
5224#echo "$CC $CPPFLAGS $CFLAGS $C99FLAG -D__EXTENSIONS__ -D_BSD_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -D_ALL_SOURCE $ERRFLAG -c conftest.c 2>&1"
5225#echo `$CC $CPPFLAGS $CFLAGS $C99FLAG -D__EXTENSIONS__ -D_BSD_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -D_ALL_SOURCE $ERRFLAG -c conftest.c 2>&1`
5226#exit 1
5227:
5228
5229else
5230{ $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
5231$as_echo "failed" >&6; }
5232:
5233
5234fi
5235fi
5236
5237
5238
5239
5240
5241{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we need $C99FLAG as a flag for $CC" >&5
5242$as_echo_n "checking whether we need $C99FLAG as a flag for $CC... " >&6; }
5243cache=`$as_echo "$C99FLAG" | $as_tr_sh`
5244if eval \${cv_prog_cc_flag_needed_$cache+:} false; then :
5245  $as_echo_n "(cached) " >&6
5246else
5247
5248echo '
5249#include <stdbool.h>
5250#include <ctype.h>
5251int test() {
5252        int a = 0;
5253        return a;
5254}
5255' > conftest.c
5256echo 'void f(){}' >>conftest.c
5257if test -z "`$CC $CPPFLAGS $CFLAGS $ERRFLAG -c conftest.c 2>&1`"; then
5258eval "cv_prog_cc_flag_needed_$cache=no"
5259else
5260
5261if test -z "`$CC $CPPFLAGS $CFLAGS $C99FLAG $ERRFLAG -c conftest.c 2>&1`"; then
5262eval "cv_prog_cc_flag_needed_$cache=yes"
5263else
5264eval "cv_prog_cc_flag_needed_$cache=fail"
5265#echo 'Test with flag fails too!'
5266#cat conftest.c
5267#echo "$CC $CPPFLAGS $CFLAGS $C99FLAG $ERRFLAG -c conftest.c 2>&1"
5268#echo `$CC $CPPFLAGS $CFLAGS $C99FLAG $ERRFLAG -c conftest.c 2>&1`
5269#exit 1
5270fi
5271
5272fi
5273rm -f conftest conftest.c conftest.o
5274
5275fi
5276
5277if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = yes"; then
5278{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5279$as_echo "yes" >&6; }
5280:
5281CFLAGS="$CFLAGS $C99FLAG"
5282else
5283if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = no"; then
5284{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5285$as_echo "no" >&6; }
5286#echo 'Test with flag is no!'
5287#cat conftest.c
5288#echo "$CC $CPPFLAGS $CFLAGS $C99FLAG $ERRFLAG -c conftest.c 2>&1"
5289#echo `$CC $CPPFLAGS $CFLAGS $C99FLAG $ERRFLAG -c conftest.c 2>&1`
5290#exit 1
5291:
5292
5293else
5294{ $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
5295$as_echo "failed" >&6; }
5296:
5297
5298fi
5299fi
5300
5301
5302
5303
5304
5305{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we need -D_BSD_SOURCE as a flag for $CC" >&5
5306$as_echo_n "checking whether we need -D_BSD_SOURCE as a flag for $CC... " >&6; }
5307cache=_D_BSD_SOURCE
5308if eval \${cv_prog_cc_flag_needed_$cache+:} false; then :
5309  $as_echo_n "(cached) " >&6
5310else
5311
5312echo '
5313#include <ctype.h>
5314
5315int test() {
5316        int a;
5317        a = isascii(32);
5318        return a;
5319}
5320' > conftest.c
5321echo 'void f(){}' >>conftest.c
5322if test -z "`$CC $CPPFLAGS $CFLAGS $ERRFLAG -c conftest.c 2>&1`"; then
5323eval "cv_prog_cc_flag_needed_$cache=no"
5324else
5325
5326if test -z "`$CC $CPPFLAGS $CFLAGS -D_BSD_SOURCE $ERRFLAG -c conftest.c 2>&1`"; then
5327eval "cv_prog_cc_flag_needed_$cache=yes"
5328else
5329eval "cv_prog_cc_flag_needed_$cache=fail"
5330#echo 'Test with flag fails too!'
5331#cat conftest.c
5332#echo "$CC $CPPFLAGS $CFLAGS -D_BSD_SOURCE $ERRFLAG -c conftest.c 2>&1"
5333#echo `$CC $CPPFLAGS $CFLAGS -D_BSD_SOURCE $ERRFLAG -c conftest.c 2>&1`
5334#exit 1
5335fi
5336
5337fi
5338rm -f conftest conftest.c conftest.o
5339
5340fi
5341
5342if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = yes"; then
5343{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5344$as_echo "yes" >&6; }
5345:
5346CFLAGS="$CFLAGS -D_BSD_SOURCE"
5347else
5348if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = no"; then
5349{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5350$as_echo "no" >&6; }
5351#echo 'Test with flag is no!'
5352#cat conftest.c
5353#echo "$CC $CPPFLAGS $CFLAGS -D_BSD_SOURCE $ERRFLAG -c conftest.c 2>&1"
5354#echo `$CC $CPPFLAGS $CFLAGS -D_BSD_SOURCE $ERRFLAG -c conftest.c 2>&1`
5355#exit 1
5356:
5357
5358else
5359{ $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
5360$as_echo "failed" >&6; }
5361:
5362
5363fi
5364fi
5365
5366
5367
5368
5369
5370{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we need -D_GNU_SOURCE as a flag for $CC" >&5
5371$as_echo_n "checking whether we need -D_GNU_SOURCE as a flag for $CC... " >&6; }
5372cache=_D_GNU_SOURCE
5373if eval \${cv_prog_cc_flag_needed_$cache+:} false; then :
5374  $as_echo_n "(cached) " >&6
5375else
5376
5377echo '
5378#include <netinet/in.h>
5379
5380int test() {
5381        struct in6_pktinfo inf;
5382	int a = (int)sizeof(inf);
5383        return a;
5384}
5385' > conftest.c
5386echo 'void f(){}' >>conftest.c
5387if test -z "`$CC $CPPFLAGS $CFLAGS $ERRFLAG -c conftest.c 2>&1`"; then
5388eval "cv_prog_cc_flag_needed_$cache=no"
5389else
5390
5391if test -z "`$CC $CPPFLAGS $CFLAGS -D_GNU_SOURCE $ERRFLAG -c conftest.c 2>&1`"; then
5392eval "cv_prog_cc_flag_needed_$cache=yes"
5393else
5394eval "cv_prog_cc_flag_needed_$cache=fail"
5395#echo 'Test with flag fails too!'
5396#cat conftest.c
5397#echo "$CC $CPPFLAGS $CFLAGS -D_GNU_SOURCE $ERRFLAG -c conftest.c 2>&1"
5398#echo `$CC $CPPFLAGS $CFLAGS -D_GNU_SOURCE $ERRFLAG -c conftest.c 2>&1`
5399#exit 1
5400fi
5401
5402fi
5403rm -f conftest conftest.c conftest.o
5404
5405fi
5406
5407if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = yes"; then
5408{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5409$as_echo "yes" >&6; }
5410:
5411CFLAGS="$CFLAGS -D_GNU_SOURCE"
5412else
5413if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = no"; then
5414{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5415$as_echo "no" >&6; }
5416#echo 'Test with flag is no!'
5417#cat conftest.c
5418#echo "$CC $CPPFLAGS $CFLAGS -D_GNU_SOURCE $ERRFLAG -c conftest.c 2>&1"
5419#echo `$CC $CPPFLAGS $CFLAGS -D_GNU_SOURCE $ERRFLAG -c conftest.c 2>&1`
5420#exit 1
5421:
5422
5423else
5424{ $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
5425$as_echo "failed" >&6; }
5426:
5427
5428fi
5429fi
5430
5431
5432# check again for GNU_SOURCE for setresgid. May fail if setresgid
5433# is not available at all. -D_FRSRESGID is to make this check unique.
5434# otherwise we would get the previous cached result.
5435
5436
5437
5438{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we need -D_GNU_SOURCE -D_FRSRESGID as a flag for $CC" >&5
5439$as_echo_n "checking whether we need -D_GNU_SOURCE -D_FRSRESGID as a flag for $CC... " >&6; }
5440cache=_D_GNU_SOURCE__D_FRSRESGID
5441if eval \${cv_prog_cc_flag_needed_$cache+:} false; then :
5442  $as_echo_n "(cached) " >&6
5443else
5444
5445echo '
5446#include <unistd.h>
5447
5448int test() {
5449	int a = setresgid(0,0,0);
5450	a = setresuid(0,0,0);
5451        return a;
5452}
5453' > conftest.c
5454echo 'void f(){}' >>conftest.c
5455if test -z "`$CC $CPPFLAGS $CFLAGS $ERRFLAG -c conftest.c 2>&1`"; then
5456eval "cv_prog_cc_flag_needed_$cache=no"
5457else
5458
5459if test -z "`$CC $CPPFLAGS $CFLAGS -D_GNU_SOURCE -D_FRSRESGID $ERRFLAG -c conftest.c 2>&1`"; then
5460eval "cv_prog_cc_flag_needed_$cache=yes"
5461else
5462eval "cv_prog_cc_flag_needed_$cache=fail"
5463#echo 'Test with flag fails too!'
5464#cat conftest.c
5465#echo "$CC $CPPFLAGS $CFLAGS -D_GNU_SOURCE -D_FRSRESGID $ERRFLAG -c conftest.c 2>&1"
5466#echo `$CC $CPPFLAGS $CFLAGS -D_GNU_SOURCE -D_FRSRESGID $ERRFLAG -c conftest.c 2>&1`
5467#exit 1
5468fi
5469
5470fi
5471rm -f conftest conftest.c conftest.o
5472
5473fi
5474
5475if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = yes"; then
5476{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5477$as_echo "yes" >&6; }
5478:
5479CFLAGS="$CFLAGS -D_GNU_SOURCE"
5480else
5481if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = no"; then
5482{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5483$as_echo "no" >&6; }
5484#echo 'Test with flag is no!'
5485#cat conftest.c
5486#echo "$CC $CPPFLAGS $CFLAGS -D_GNU_SOURCE -D_FRSRESGID $ERRFLAG -c conftest.c 2>&1"
5487#echo `$CC $CPPFLAGS $CFLAGS -D_GNU_SOURCE -D_FRSRESGID $ERRFLAG -c conftest.c 2>&1`
5488#exit 1
5489:
5490
5491else
5492{ $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
5493$as_echo "failed" >&6; }
5494:
5495
5496fi
5497fi
5498
5499
5500
5501
5502
5503{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we need -D_POSIX_C_SOURCE=200112 as a flag for $CC" >&5
5504$as_echo_n "checking whether we need -D_POSIX_C_SOURCE=200112 as a flag for $CC... " >&6; }
5505cache=_D_POSIX_C_SOURCE_200112
5506if eval \${cv_prog_cc_flag_needed_$cache+:} false; then :
5507  $as_echo_n "(cached) " >&6
5508else
5509
5510echo '
5511#include "confdefs.h"
5512#ifdef HAVE_TIME_H
5513#include <time.h>
5514#endif
5515#include <netdb.h>
5516
5517int test() {
5518        int a = 0;
5519        char *t;
5520        time_t time = 0;
5521        char *buf = NULL;
5522	const char* str = NULL;
5523        t = ctime_r(&time, buf);
5524	str = gai_strerror(0);
5525	if(t && str)
5526		a = 0;
5527        return a;
5528}
5529' > conftest.c
5530echo 'void f(){}' >>conftest.c
5531if test -z "`$CC $CPPFLAGS $CFLAGS $ERRFLAG -c conftest.c 2>&1`"; then
5532eval "cv_prog_cc_flag_needed_$cache=no"
5533else
5534
5535if test -z "`$CC $CPPFLAGS $CFLAGS -D_POSIX_C_SOURCE=200112 $ERRFLAG -c conftest.c 2>&1`"; then
5536eval "cv_prog_cc_flag_needed_$cache=yes"
5537else
5538eval "cv_prog_cc_flag_needed_$cache=fail"
5539#echo 'Test with flag fails too!'
5540#cat conftest.c
5541#echo "$CC $CPPFLAGS $CFLAGS -D_POSIX_C_SOURCE=200112 $ERRFLAG -c conftest.c 2>&1"
5542#echo `$CC $CPPFLAGS $CFLAGS -D_POSIX_C_SOURCE=200112 $ERRFLAG -c conftest.c 2>&1`
5543#exit 1
5544fi
5545
5546fi
5547rm -f conftest conftest.c conftest.o
5548
5549fi
5550
5551if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = yes"; then
5552{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5553$as_echo "yes" >&6; }
5554:
5555CFLAGS="$CFLAGS -D_POSIX_C_SOURCE=200112"
5556else
5557if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = no"; then
5558{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5559$as_echo "no" >&6; }
5560#echo 'Test with flag is no!'
5561#cat conftest.c
5562#echo "$CC $CPPFLAGS $CFLAGS -D_POSIX_C_SOURCE=200112 $ERRFLAG -c conftest.c 2>&1"
5563#echo `$CC $CPPFLAGS $CFLAGS -D_POSIX_C_SOURCE=200112 $ERRFLAG -c conftest.c 2>&1`
5564#exit 1
5565:
5566
5567else
5568{ $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
5569$as_echo "failed" >&6; }
5570:
5571
5572fi
5573fi
5574
5575
5576
5577
5578
5579{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we need -D__EXTENSIONS__ as a flag for $CC" >&5
5580$as_echo_n "checking whether we need -D__EXTENSIONS__ as a flag for $CC... " >&6; }
5581cache=_D__EXTENSIONS__
5582if eval \${cv_prog_cc_flag_needed_$cache+:} false; then :
5583  $as_echo_n "(cached) " >&6
5584else
5585
5586echo '
5587#include "confdefs.h"
5588#include <stdlib.h>
5589#include <ctype.h>
5590#include <sys/time.h>
5591#ifdef HAVE_TIME_H
5592#include <time.h>
5593#endif
5594#include <unistd.h>
5595#ifdef HAVE_GETOPT_H
5596#include <getopt.h>
5597#endif
5598
5599int test() {
5600        int a;
5601        char **opts = NULL;
5602        struct timeval tv;
5603        tv.tv_usec = 10;
5604        srandom(32);
5605        a = getopt(2, opts, "a");
5606        a = isascii(32);
5607	if(tv.tv_usec)
5608		a = 0;
5609        return a;
5610}
5611' > conftest.c
5612echo 'void f(){}' >>conftest.c
5613if test -z "`$CC $CPPFLAGS $CFLAGS $ERRFLAG -c conftest.c 2>&1`"; then
5614eval "cv_prog_cc_flag_needed_$cache=no"
5615else
5616
5617if test -z "`$CC $CPPFLAGS $CFLAGS -D__EXTENSIONS__ $ERRFLAG -c conftest.c 2>&1`"; then
5618eval "cv_prog_cc_flag_needed_$cache=yes"
5619else
5620eval "cv_prog_cc_flag_needed_$cache=fail"
5621#echo 'Test with flag fails too!'
5622#cat conftest.c
5623#echo "$CC $CPPFLAGS $CFLAGS -D__EXTENSIONS__ $ERRFLAG -c conftest.c 2>&1"
5624#echo `$CC $CPPFLAGS $CFLAGS -D__EXTENSIONS__ $ERRFLAG -c conftest.c 2>&1`
5625#exit 1
5626fi
5627
5628fi
5629rm -f conftest conftest.c conftest.o
5630
5631fi
5632
5633if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = yes"; then
5634{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5635$as_echo "yes" >&6; }
5636:
5637CFLAGS="$CFLAGS -D__EXTENSIONS__"
5638else
5639if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = no"; then
5640{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5641$as_echo "no" >&6; }
5642#echo 'Test with flag is no!'
5643#cat conftest.c
5644#echo "$CC $CPPFLAGS $CFLAGS -D__EXTENSIONS__ $ERRFLAG -c conftest.c 2>&1"
5645#echo `$CC $CPPFLAGS $CFLAGS -D__EXTENSIONS__ $ERRFLAG -c conftest.c 2>&1`
5646#exit 1
5647:
5648
5649else
5650{ $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
5651$as_echo "failed" >&6; }
5652:
5653
5654fi
5655fi
5656
5657
5658
5659
5660# debug mode flags warnings
5661# Check whether --enable-checking was given.
5662if test "${enable_checking+set}" = set; then :
5663  enableval=$enable_checking;
5664fi
5665
5666# Check whether --enable-debug was given.
5667if test "${enable_debug+set}" = set; then :
5668  enableval=$enable_debug;
5669fi
5670
5671if test "$enable_debug" = "yes"; then debug_enabled="$enable_debug";
5672else debug_enabled="$enable_checking"; fi
5673
5674case "$debug_enabled" in
5675        yes)
5676
5677
5678{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -W" >&5
5679$as_echo_n "checking whether $CC supports -W... " >&6; }
5680cache=`echo W | sed 'y%.=/+-%___p_%'`
5681if eval \${cv_prog_cc_flag_$cache+:} false; then :
5682  $as_echo_n "(cached) " >&6
5683else
5684
5685echo 'void f(void){}' >conftest.c
5686if test -z "`$CC $CPPFLAGS $CFLAGS -W -c conftest.c 2>&1`"; then
5687eval "cv_prog_cc_flag_$cache=yes"
5688else
5689eval "cv_prog_cc_flag_$cache=no"
5690fi
5691rm -f conftest conftest.o conftest.c
5692
5693fi
5694
5695if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
5696{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5697$as_echo "yes" >&6; }
5698:
5699CFLAGS="$CFLAGS -W"
5700else
5701{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5702$as_echo "no" >&6; }
5703:
5704
5705fi
5706
5707
5708
5709{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wall" >&5
5710$as_echo_n "checking whether $CC supports -Wall... " >&6; }
5711cache=`echo Wall | sed 'y%.=/+-%___p_%'`
5712if eval \${cv_prog_cc_flag_$cache+:} false; then :
5713  $as_echo_n "(cached) " >&6
5714else
5715
5716echo 'void f(void){}' >conftest.c
5717if test -z "`$CC $CPPFLAGS $CFLAGS -Wall -c conftest.c 2>&1`"; then
5718eval "cv_prog_cc_flag_$cache=yes"
5719else
5720eval "cv_prog_cc_flag_$cache=no"
5721fi
5722rm -f conftest conftest.o conftest.c
5723
5724fi
5725
5726if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
5727{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5728$as_echo "yes" >&6; }
5729:
5730CFLAGS="$CFLAGS -Wall"
5731else
5732{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5733$as_echo "no" >&6; }
5734:
5735
5736fi
5737
5738
5739
5740{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wextra" >&5
5741$as_echo_n "checking whether $CC supports -Wextra... " >&6; }
5742cache=`echo Wextra | sed 'y%.=/+-%___p_%'`
5743if eval \${cv_prog_cc_flag_$cache+:} false; then :
5744  $as_echo_n "(cached) " >&6
5745else
5746
5747echo 'void f(void){}' >conftest.c
5748if test -z "`$CC $CPPFLAGS $CFLAGS -Wextra -c conftest.c 2>&1`"; then
5749eval "cv_prog_cc_flag_$cache=yes"
5750else
5751eval "cv_prog_cc_flag_$cache=no"
5752fi
5753rm -f conftest conftest.o conftest.c
5754
5755fi
5756
5757if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
5758{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5759$as_echo "yes" >&6; }
5760:
5761CFLAGS="$CFLAGS -Wextra"
5762else
5763{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5764$as_echo "no" >&6; }
5765:
5766
5767fi
5768
5769
5770
5771{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wdeclaration-after-statement" >&5
5772$as_echo_n "checking whether $CC supports -Wdeclaration-after-statement... " >&6; }
5773cache=`echo Wdeclaration-after-statement | sed 'y%.=/+-%___p_%'`
5774if eval \${cv_prog_cc_flag_$cache+:} false; then :
5775  $as_echo_n "(cached) " >&6
5776else
5777
5778echo 'void f(void){}' >conftest.c
5779if test -z "`$CC $CPPFLAGS $CFLAGS -Wdeclaration-after-statement -c conftest.c 2>&1`"; then
5780eval "cv_prog_cc_flag_$cache=yes"
5781else
5782eval "cv_prog_cc_flag_$cache=no"
5783fi
5784rm -f conftest conftest.o conftest.c
5785
5786fi
5787
5788if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
5789{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5790$as_echo "yes" >&6; }
5791:
5792CFLAGS="$CFLAGS -Wdeclaration-after-statement"
5793else
5794{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5795$as_echo "no" >&6; }
5796:
5797
5798fi
5799
5800
5801$as_echo "#define UNBOUND_DEBUG /**/" >>confdefs.h
5802
5803		;;
5804	no|*)
5805		# nothing to do.
5806		;;
5807esac
5808
5809    # Check whether --enable-flto was given.
5810if test "${enable_flto+set}" = set; then :
5811  enableval=$enable_flto;
5812fi
5813
5814    if test "x$enable_flto" != "xno"; then :
5815
5816        { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -flto" >&5
5817$as_echo_n "checking if $CC supports -flto... " >&6; }
5818        BAKCFLAGS="$CFLAGS"
5819        CFLAGS="$CFLAGS -flto"
5820        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5821/* end confdefs.h.  */
5822
5823int
5824main ()
5825{
5826
5827  ;
5828  return 0;
5829}
5830_ACEOF
5831if ac_fn_c_try_link "$LINENO"; then :
5832
5833            if $CC $CFLAGS -o conftest conftest.c 2>&1 | grep "warning: no debug symbols in executable" >/dev/null; then
5834                CFLAGS="$BAKCFLAGS"
5835                { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5836$as_echo "no" >&6; }
5837            else
5838                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5839$as_echo "yes" >&6; }
5840            fi
5841            rm -f conftest conftest.c conftest.o
5842
5843else
5844  CFLAGS="$BAKCFLAGS" ; { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5845$as_echo "no" >&6; }
5846fi
5847rm -f core conftest.err conftest.$ac_objext \
5848    conftest$ac_exeext conftest.$ac_ext
5849
5850fi
5851
5852
5853{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
5854$as_echo_n "checking for inline... " >&6; }
5855if ${ac_cv_c_inline+:} false; then :
5856  $as_echo_n "(cached) " >&6
5857else
5858  ac_cv_c_inline=no
5859for ac_kw in inline __inline__ __inline; do
5860  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5861/* end confdefs.h.  */
5862#ifndef __cplusplus
5863typedef int foo_t;
5864static $ac_kw foo_t static_foo () {return 0; }
5865$ac_kw foo_t foo () {return 0; }
5866#endif
5867
5868_ACEOF
5869if ac_fn_c_try_compile "$LINENO"; then :
5870  ac_cv_c_inline=$ac_kw
5871fi
5872rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5873  test "$ac_cv_c_inline" != no && break
5874done
5875
5876fi
5877{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
5878$as_echo "$ac_cv_c_inline" >&6; }
5879
5880case $ac_cv_c_inline in
5881  inline | yes) ;;
5882  *)
5883    case $ac_cv_c_inline in
5884      no) ac_val=;;
5885      *) ac_val=$ac_cv_c_inline;;
5886    esac
5887    cat >>confdefs.h <<_ACEOF
5888#ifndef __cplusplus
5889#define inline $ac_val
5890#endif
5891_ACEOF
5892    ;;
5893esac
5894
5895
5896{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler (${CC-cc}) accepts the \"format\" attribute" >&5
5897$as_echo_n "checking whether the C compiler (${CC-cc}) accepts the \"format\" attribute... " >&6; }
5898if ${ac_cv_c_format_attribute+:} false; then :
5899  $as_echo_n "(cached) " >&6
5900else
5901  ac_cv_c_format_attribute=no
5902cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5903/* end confdefs.h.  */
5904#include <stdio.h>
5905void f (char *format, ...) __attribute__ ((format (printf, 1, 2)));
5906void (*pf) (char *format, ...) __attribute__ ((format (printf, 1, 2)));
5907
5908int
5909main ()
5910{
5911
5912   f ("%s", "str");
5913
5914  ;
5915  return 0;
5916}
5917_ACEOF
5918if ac_fn_c_try_compile "$LINENO"; then :
5919  ac_cv_c_format_attribute="yes"
5920else
5921  ac_cv_c_format_attribute="no"
5922fi
5923rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5924
5925fi
5926
5927
5928{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_format_attribute" >&5
5929$as_echo "$ac_cv_c_format_attribute" >&6; }
5930if test $ac_cv_c_format_attribute = yes; then
5931
5932$as_echo "#define HAVE_ATTR_FORMAT 1" >>confdefs.h
5933
5934fi
5935
5936
5937{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler (${CC-cc}) accepts the \"unused\" attribute" >&5
5938$as_echo_n "checking whether the C compiler (${CC-cc}) accepts the \"unused\" attribute... " >&6; }
5939if ${ac_cv_c_unused_attribute+:} false; then :
5940  $as_echo_n "(cached) " >&6
5941else
5942  ac_cv_c_unused_attribute=no
5943cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5944/* end confdefs.h.  */
5945#include <stdio.h>
5946void f (char *u __attribute__((unused)));
5947
5948int
5949main ()
5950{
5951
5952   f ("x");
5953
5954  ;
5955  return 0;
5956}
5957_ACEOF
5958if ac_fn_c_try_compile "$LINENO"; then :
5959  ac_cv_c_unused_attribute="yes"
5960else
5961  ac_cv_c_unused_attribute="no"
5962fi
5963rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5964
5965fi
5966
5967
5968
5969
5970{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_unused_attribute" >&5
5971$as_echo "$ac_cv_c_unused_attribute" >&6; }
5972if test $ac_cv_c_unused_attribute = yes; then
5973
5974$as_echo "#define HAVE_ATTR_UNUSED 1" >>confdefs.h
5975
5976fi
5977
5978
5979if test "$srcdir" != "."; then
5980	CPPFLAGS="$CPPFLAGS -I$srcdir"
5981fi
5982
5983
5984
5985for ac_prog in flex lex
5986do
5987  # Extract the first word of "$ac_prog", so it can be a program name with args.
5988set dummy $ac_prog; ac_word=$2
5989{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5990$as_echo_n "checking for $ac_word... " >&6; }
5991if ${ac_cv_prog_LEX+:} false; then :
5992  $as_echo_n "(cached) " >&6
5993else
5994  if test -n "$LEX"; then
5995  ac_cv_prog_LEX="$LEX" # Let the user override the test.
5996else
5997as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5998for as_dir in $PATH
5999do
6000  IFS=$as_save_IFS
6001  test -z "$as_dir" && as_dir=.
6002    for ac_exec_ext in '' $ac_executable_extensions; do
6003  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6004    ac_cv_prog_LEX="$ac_prog"
6005    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6006    break 2
6007  fi
6008done
6009  done
6010IFS=$as_save_IFS
6011
6012fi
6013fi
6014LEX=$ac_cv_prog_LEX
6015if test -n "$LEX"; then
6016  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LEX" >&5
6017$as_echo "$LEX" >&6; }
6018else
6019  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6020$as_echo "no" >&6; }
6021fi
6022
6023
6024  test -n "$LEX" && break
6025done
6026test -n "$LEX" || LEX=":"
6027
6028if test "x$LEX" != "x:"; then
6029  cat >conftest.l <<_ACEOF
6030%%
6031a { ECHO; }
6032b { REJECT; }
6033c { yymore (); }
6034d { yyless (1); }
6035e { /* IRIX 6.5 flex 2.5.4 underquotes its yyless argument.  */
6036    yyless ((input () != 0)); }
6037f { unput (yytext[0]); }
6038. { BEGIN INITIAL; }
6039%%
6040#ifdef YYTEXT_POINTER
6041extern char *yytext;
6042#endif
6043int
6044main (void)
6045{
6046  return ! yylex () + ! yywrap ();
6047}
6048_ACEOF
6049{ { ac_try="$LEX conftest.l"
6050case "(($ac_try" in
6051  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6052  *) ac_try_echo=$ac_try;;
6053esac
6054eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
6055$as_echo "$ac_try_echo"; } >&5
6056  (eval "$LEX conftest.l") 2>&5
6057  ac_status=$?
6058  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
6059  test $ac_status = 0; }
6060{ $as_echo "$as_me:${as_lineno-$LINENO}: checking lex output file root" >&5
6061$as_echo_n "checking lex output file root... " >&6; }
6062if ${ac_cv_prog_lex_root+:} false; then :
6063  $as_echo_n "(cached) " >&6
6064else
6065
6066if test -f lex.yy.c; then
6067  ac_cv_prog_lex_root=lex.yy
6068elif test -f lexyy.c; then
6069  ac_cv_prog_lex_root=lexyy
6070else
6071  as_fn_error $? "cannot find output from $LEX; giving up" "$LINENO" 5
6072fi
6073fi
6074{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_lex_root" >&5
6075$as_echo "$ac_cv_prog_lex_root" >&6; }
6076LEX_OUTPUT_ROOT=$ac_cv_prog_lex_root
6077
6078if test -z "${LEXLIB+set}"; then
6079  { $as_echo "$as_me:${as_lineno-$LINENO}: checking lex library" >&5
6080$as_echo_n "checking lex library... " >&6; }
6081if ${ac_cv_lib_lex+:} false; then :
6082  $as_echo_n "(cached) " >&6
6083else
6084
6085    ac_save_LIBS=$LIBS
6086    ac_cv_lib_lex='none needed'
6087    for ac_lib in '' -lfl -ll; do
6088      LIBS="$ac_lib $ac_save_LIBS"
6089      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6090/* end confdefs.h.  */
6091`cat $LEX_OUTPUT_ROOT.c`
6092_ACEOF
6093if ac_fn_c_try_link "$LINENO"; then :
6094  ac_cv_lib_lex=$ac_lib
6095fi
6096rm -f core conftest.err conftest.$ac_objext \
6097    conftest$ac_exeext conftest.$ac_ext
6098      test "$ac_cv_lib_lex" != 'none needed' && break
6099    done
6100    LIBS=$ac_save_LIBS
6101
6102fi
6103{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_lex" >&5
6104$as_echo "$ac_cv_lib_lex" >&6; }
6105  test "$ac_cv_lib_lex" != 'none needed' && LEXLIB=$ac_cv_lib_lex
6106fi
6107
6108
6109{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether yytext is a pointer" >&5
6110$as_echo_n "checking whether yytext is a pointer... " >&6; }
6111if ${ac_cv_prog_lex_yytext_pointer+:} false; then :
6112  $as_echo_n "(cached) " >&6
6113else
6114  # POSIX says lex can declare yytext either as a pointer or an array; the
6115# default is implementation-dependent.  Figure out which it is, since
6116# not all implementations provide the %pointer and %array declarations.
6117ac_cv_prog_lex_yytext_pointer=no
6118ac_save_LIBS=$LIBS
6119LIBS="$LEXLIB $ac_save_LIBS"
6120cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6121/* end confdefs.h.  */
6122
6123  #define YYTEXT_POINTER 1
6124`cat $LEX_OUTPUT_ROOT.c`
6125_ACEOF
6126if ac_fn_c_try_link "$LINENO"; then :
6127  ac_cv_prog_lex_yytext_pointer=yes
6128fi
6129rm -f core conftest.err conftest.$ac_objext \
6130    conftest$ac_exeext conftest.$ac_ext
6131LIBS=$ac_save_LIBS
6132
6133fi
6134{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_lex_yytext_pointer" >&5
6135$as_echo "$ac_cv_prog_lex_yytext_pointer" >&6; }
6136if test $ac_cv_prog_lex_yytext_pointer = yes; then
6137
6138$as_echo "#define YYTEXT_POINTER 1" >>confdefs.h
6139
6140fi
6141rm -f conftest.l $LEX_OUTPUT_ROOT.c
6142
6143fi
6144
6145	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for yylex_destroy" >&5
6146$as_echo_n "checking for yylex_destroy... " >&6; }
6147	if echo %% | $LEX -t 2>&1 | grep yylex_destroy >/dev/null 2>&1; then
6148
6149$as_echo "#define LEX_HAS_YYLEX_DESTROY 1" >>confdefs.h
6150
6151		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6152$as_echo "yes" >&6; }
6153	else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6154$as_echo "no" >&6; }; fi
6155
6156for ac_prog in 'bison -y' byacc
6157do
6158  # Extract the first word of "$ac_prog", so it can be a program name with args.
6159set dummy $ac_prog; ac_word=$2
6160{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6161$as_echo_n "checking for $ac_word... " >&6; }
6162if ${ac_cv_prog_YACC+:} false; then :
6163  $as_echo_n "(cached) " >&6
6164else
6165  if test -n "$YACC"; then
6166  ac_cv_prog_YACC="$YACC" # Let the user override the test.
6167else
6168as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6169for as_dir in $PATH
6170do
6171  IFS=$as_save_IFS
6172  test -z "$as_dir" && as_dir=.
6173    for ac_exec_ext in '' $ac_executable_extensions; do
6174  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6175    ac_cv_prog_YACC="$ac_prog"
6176    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6177    break 2
6178  fi
6179done
6180  done
6181IFS=$as_save_IFS
6182
6183fi
6184fi
6185YACC=$ac_cv_prog_YACC
6186if test -n "$YACC"; then
6187  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $YACC" >&5
6188$as_echo "$YACC" >&6; }
6189else
6190  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6191$as_echo "no" >&6; }
6192fi
6193
6194
6195  test -n "$YACC" && break
6196done
6197test -n "$YACC" || YACC="yacc"
6198
6199# Extract the first word of "doxygen", so it can be a program name with args.
6200set dummy doxygen; ac_word=$2
6201{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6202$as_echo_n "checking for $ac_word... " >&6; }
6203if ${ac_cv_prog_doxygen+:} false; then :
6204  $as_echo_n "(cached) " >&6
6205else
6206  if test -n "$doxygen"; then
6207  ac_cv_prog_doxygen="$doxygen" # Let the user override the test.
6208else
6209as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6210for as_dir in $PATH
6211do
6212  IFS=$as_save_IFS
6213  test -z "$as_dir" && as_dir=.
6214    for ac_exec_ext in '' $ac_executable_extensions; do
6215  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6216    ac_cv_prog_doxygen="doxygen"
6217    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6218    break 2
6219  fi
6220done
6221  done
6222IFS=$as_save_IFS
6223
6224fi
6225fi
6226doxygen=$ac_cv_prog_doxygen
6227if test -n "$doxygen"; then
6228  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $doxygen" >&5
6229$as_echo "$doxygen" >&6; }
6230else
6231  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6232$as_echo "no" >&6; }
6233fi
6234
6235
6236if test -n "$ac_tool_prefix"; then
6237  # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
6238set dummy ${ac_tool_prefix}strip; ac_word=$2
6239{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6240$as_echo_n "checking for $ac_word... " >&6; }
6241if ${ac_cv_prog_STRIP+:} false; then :
6242  $as_echo_n "(cached) " >&6
6243else
6244  if test -n "$STRIP"; then
6245  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
6246else
6247as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6248for as_dir in $PATH
6249do
6250  IFS=$as_save_IFS
6251  test -z "$as_dir" && as_dir=.
6252    for ac_exec_ext in '' $ac_executable_extensions; do
6253  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6254    ac_cv_prog_STRIP="${ac_tool_prefix}strip"
6255    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6256    break 2
6257  fi
6258done
6259  done
6260IFS=$as_save_IFS
6261
6262fi
6263fi
6264STRIP=$ac_cv_prog_STRIP
6265if test -n "$STRIP"; then
6266  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
6267$as_echo "$STRIP" >&6; }
6268else
6269  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6270$as_echo "no" >&6; }
6271fi
6272
6273
6274fi
6275if test -z "$ac_cv_prog_STRIP"; then
6276  ac_ct_STRIP=$STRIP
6277  # Extract the first word of "strip", so it can be a program name with args.
6278set dummy strip; ac_word=$2
6279{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6280$as_echo_n "checking for $ac_word... " >&6; }
6281if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
6282  $as_echo_n "(cached) " >&6
6283else
6284  if test -n "$ac_ct_STRIP"; then
6285  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
6286else
6287as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6288for as_dir in $PATH
6289do
6290  IFS=$as_save_IFS
6291  test -z "$as_dir" && as_dir=.
6292    for ac_exec_ext in '' $ac_executable_extensions; do
6293  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6294    ac_cv_prog_ac_ct_STRIP="strip"
6295    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6296    break 2
6297  fi
6298done
6299  done
6300IFS=$as_save_IFS
6301
6302fi
6303fi
6304ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
6305if test -n "$ac_ct_STRIP"; then
6306  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
6307$as_echo "$ac_ct_STRIP" >&6; }
6308else
6309  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6310$as_echo "no" >&6; }
6311fi
6312
6313  if test "x$ac_ct_STRIP" = x; then
6314    STRIP=""
6315  else
6316    case $cross_compiling:$ac_tool_warned in
6317yes:)
6318{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6319$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6320ac_tool_warned=yes ;;
6321esac
6322    STRIP=$ac_ct_STRIP
6323  fi
6324else
6325  STRIP="$ac_cv_prog_STRIP"
6326fi
6327
6328ac_aux_dir=
6329for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
6330  if test -f "$ac_dir/install-sh"; then
6331    ac_aux_dir=$ac_dir
6332    ac_install_sh="$ac_aux_dir/install-sh -c"
6333    break
6334  elif test -f "$ac_dir/install.sh"; then
6335    ac_aux_dir=$ac_dir
6336    ac_install_sh="$ac_aux_dir/install.sh -c"
6337    break
6338  elif test -f "$ac_dir/shtool"; then
6339    ac_aux_dir=$ac_dir
6340    ac_install_sh="$ac_aux_dir/shtool install -c"
6341    break
6342  fi
6343done
6344if test -z "$ac_aux_dir"; then
6345  as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
6346fi
6347
6348# These three variables are undocumented and unsupported,
6349# and are intended to be withdrawn in a future Autoconf release.
6350# They can cause serious problems if a builder's source tree is in a directory
6351# whose full name contains unusual characters.
6352ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
6353ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
6354ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
6355
6356
6357# Make sure we can run config.sub.
6358$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
6359  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
6360
6361{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
6362$as_echo_n "checking build system type... " >&6; }
6363if ${ac_cv_build+:} false; then :
6364  $as_echo_n "(cached) " >&6
6365else
6366  ac_build_alias=$build_alias
6367test "x$ac_build_alias" = x &&
6368  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
6369test "x$ac_build_alias" = x &&
6370  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
6371ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
6372  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
6373
6374fi
6375{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
6376$as_echo "$ac_cv_build" >&6; }
6377case $ac_cv_build in
6378*-*-*) ;;
6379*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
6380esac
6381build=$ac_cv_build
6382ac_save_IFS=$IFS; IFS='-'
6383set x $ac_cv_build
6384shift
6385build_cpu=$1
6386build_vendor=$2
6387shift; shift
6388# Remember, the first character of IFS is used to create $*,
6389# except with old shells:
6390build_os=$*
6391IFS=$ac_save_IFS
6392case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
6393
6394
6395{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
6396$as_echo_n "checking host system type... " >&6; }
6397if ${ac_cv_host+:} false; then :
6398  $as_echo_n "(cached) " >&6
6399else
6400  if test "x$host_alias" = x; then
6401  ac_cv_host=$ac_cv_build
6402else
6403  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
6404    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
6405fi
6406
6407fi
6408{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
6409$as_echo "$ac_cv_host" >&6; }
6410case $ac_cv_host in
6411*-*-*) ;;
6412*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
6413esac
6414host=$ac_cv_host
6415ac_save_IFS=$IFS; IFS='-'
6416set x $ac_cv_host
6417shift
6418host_cpu=$1
6419host_vendor=$2
6420shift; shift
6421# Remember, the first character of IFS is used to create $*,
6422# except with old shells:
6423host_os=$*
6424IFS=$ac_save_IFS
6425case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
6426
6427
6428
6429# skip these tests, we do not need them.
6430
6431
6432
6433
6434
6435
6436
6437
6438# always use ./libtool unless override from commandline (libtool=mylibtool)
6439if test -z "$libtool"; then
6440	libtool="./libtool"
6441fi
6442
6443# avoid libtool max commandline length test on systems that fork slowly.
6444
6445if echo "$host_os" | grep "sunos4" >/dev/null; then
6446	lt_cv_sys_max_cmd_len=32750;
6447fi
6448if test -n "$ac_tool_prefix"; then
6449  # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
6450set dummy ${ac_tool_prefix}ar; ac_word=$2
6451{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6452$as_echo_n "checking for $ac_word... " >&6; }
6453if ${ac_cv_path_AR+:} false; then :
6454  $as_echo_n "(cached) " >&6
6455else
6456  case $AR in
6457  [\\/]* | ?:[\\/]*)
6458  ac_cv_path_AR="$AR" # Let the user override the test with a path.
6459  ;;
6460  *)
6461  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6462for as_dir in $PATH
6463do
6464  IFS=$as_save_IFS
6465  test -z "$as_dir" && as_dir=.
6466    for ac_exec_ext in '' $ac_executable_extensions; do
6467  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6468    ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
6469    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6470    break 2
6471  fi
6472done
6473  done
6474IFS=$as_save_IFS
6475
6476  ;;
6477esac
6478fi
6479AR=$ac_cv_path_AR
6480if test -n "$AR"; then
6481  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
6482$as_echo "$AR" >&6; }
6483else
6484  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6485$as_echo "no" >&6; }
6486fi
6487
6488
6489fi
6490if test -z "$ac_cv_path_AR"; then
6491  ac_pt_AR=$AR
6492  # Extract the first word of "ar", so it can be a program name with args.
6493set dummy ar; ac_word=$2
6494{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6495$as_echo_n "checking for $ac_word... " >&6; }
6496if ${ac_cv_path_ac_pt_AR+:} false; then :
6497  $as_echo_n "(cached) " >&6
6498else
6499  case $ac_pt_AR in
6500  [\\/]* | ?:[\\/]*)
6501  ac_cv_path_ac_pt_AR="$ac_pt_AR" # Let the user override the test with a path.
6502  ;;
6503  *)
6504  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6505for as_dir in $PATH
6506do
6507  IFS=$as_save_IFS
6508  test -z "$as_dir" && as_dir=.
6509    for ac_exec_ext in '' $ac_executable_extensions; do
6510  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6511    ac_cv_path_ac_pt_AR="$as_dir/$ac_word$ac_exec_ext"
6512    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6513    break 2
6514  fi
6515done
6516  done
6517IFS=$as_save_IFS
6518
6519  ;;
6520esac
6521fi
6522ac_pt_AR=$ac_cv_path_ac_pt_AR
6523if test -n "$ac_pt_AR"; then
6524  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_AR" >&5
6525$as_echo "$ac_pt_AR" >&6; }
6526else
6527  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6528$as_echo "no" >&6; }
6529fi
6530
6531  if test "x$ac_pt_AR" = x; then
6532    AR="false"
6533  else
6534    case $cross_compiling:$ac_tool_warned in
6535yes:)
6536{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6537$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6538ac_tool_warned=yes ;;
6539esac
6540    AR=$ac_pt_AR
6541  fi
6542else
6543  AR="$ac_cv_path_AR"
6544fi
6545
6546if test $AR = false; then
6547	as_fn_error $? "Cannot find 'ar', please extend PATH to include it" "$LINENO" 5
6548fi
6549
6550case `pwd` in
6551  *\ * | *\	*)
6552    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5
6553$as_echo "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;;
6554esac
6555
6556
6557
6558macro_version='2.4.2.418'
6559macro_revision='2.4.2.418'
6560
6561
6562
6563
6564
6565
6566
6567
6568
6569
6570
6571
6572
6573ltmain=$ac_aux_dir/ltmain.sh
6574
6575# Backslashify metacharacters that are still active within
6576# double-quoted strings.
6577sed_quote_subst='s/\(["`$\\]\)/\\\1/g'
6578
6579# Same as above, but do not quote variable references.
6580double_quote_subst='s/\(["`\\]\)/\\\1/g'
6581
6582# Sed substitution to delay expansion of an escaped shell variable in a
6583# double_quote_subst'ed string.
6584delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
6585
6586# Sed substitution to delay expansion of an escaped single quote.
6587delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
6588
6589# Sed substitution to avoid accidental globbing in evaled expressions
6590no_glob_subst='s/\*/\\\*/g'
6591
6592ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
6593ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
6594ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
6595
6596{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5
6597$as_echo_n "checking how to print strings... " >&6; }
6598# Test print first, because it will be a builtin if present.
6599if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \
6600   test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
6601  ECHO='print -r --'
6602elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
6603  ECHO='printf %s\n'
6604else
6605  # Use this function as a fallback that always works.
6606  func_fallback_echo ()
6607  {
6608    eval 'cat <<_LTECHO_EOF
6609$1
6610_LTECHO_EOF'
6611  }
6612  ECHO='func_fallback_echo'
6613fi
6614
6615# func_echo_all arg...
6616# Invoke $ECHO with all args, space-separated.
6617func_echo_all ()
6618{
6619    $ECHO ""
6620}
6621
6622case $ECHO in
6623  printf*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: printf" >&5
6624$as_echo "printf" >&6; } ;;
6625  print*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: print -r" >&5
6626$as_echo "print -r" >&6; } ;;
6627  *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: cat" >&5
6628$as_echo "cat" >&6; } ;;
6629esac
6630
6631
6632
6633
6634
6635
6636
6637
6638
6639
6640
6641
6642
6643
6644{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
6645$as_echo_n "checking for a sed that does not truncate output... " >&6; }
6646if ${ac_cv_path_SED+:} false; then :
6647  $as_echo_n "(cached) " >&6
6648else
6649            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
6650     for ac_i in 1 2 3 4 5 6 7; do
6651       ac_script="$ac_script$as_nl$ac_script"
6652     done
6653     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
6654     { ac_script=; unset ac_script;}
6655     if test -z "$SED"; then
6656  ac_path_SED_found=false
6657  # Loop through the user's path and test for each of PROGNAME-LIST
6658  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6659for as_dir in $PATH
6660do
6661  IFS=$as_save_IFS
6662  test -z "$as_dir" && as_dir=.
6663    for ac_prog in sed gsed; do
6664    for ac_exec_ext in '' $ac_executable_extensions; do
6665      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
6666      as_fn_executable_p "$ac_path_SED" || continue
6667# Check for GNU ac_path_SED and select it if it is found.
6668  # Check for GNU $ac_path_SED
6669case `"$ac_path_SED" --version 2>&1` in
6670*GNU*)
6671  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
6672*)
6673  ac_count=0
6674  $as_echo_n 0123456789 >"conftest.in"
6675  while :
6676  do
6677    cat "conftest.in" "conftest.in" >"conftest.tmp"
6678    mv "conftest.tmp" "conftest.in"
6679    cp "conftest.in" "conftest.nl"
6680    $as_echo '' >> "conftest.nl"
6681    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
6682    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6683    as_fn_arith $ac_count + 1 && ac_count=$as_val
6684    if test $ac_count -gt ${ac_path_SED_max-0}; then
6685      # Best one so far, save it but keep looking for a better one
6686      ac_cv_path_SED="$ac_path_SED"
6687      ac_path_SED_max=$ac_count
6688    fi
6689    # 10*(2^10) chars as input seems more than enough
6690    test $ac_count -gt 10 && break
6691  done
6692  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6693esac
6694
6695      $ac_path_SED_found && break 3
6696    done
6697  done
6698  done
6699IFS=$as_save_IFS
6700  if test -z "$ac_cv_path_SED"; then
6701    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
6702  fi
6703else
6704  ac_cv_path_SED=$SED
6705fi
6706
6707fi
6708{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
6709$as_echo "$ac_cv_path_SED" >&6; }
6710 SED="$ac_cv_path_SED"
6711  rm -f conftest.sed
6712
6713test -z "$SED" && SED=sed
6714Xsed="$SED -e 1s/^X//"
6715
6716
6717
6718
6719
6720
6721
6722
6723
6724
6725
6726{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
6727$as_echo_n "checking for fgrep... " >&6; }
6728if ${ac_cv_path_FGREP+:} false; then :
6729  $as_echo_n "(cached) " >&6
6730else
6731  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
6732   then ac_cv_path_FGREP="$GREP -F"
6733   else
6734     if test -z "$FGREP"; then
6735  ac_path_FGREP_found=false
6736  # Loop through the user's path and test for each of PROGNAME-LIST
6737  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6738for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6739do
6740  IFS=$as_save_IFS
6741  test -z "$as_dir" && as_dir=.
6742    for ac_prog in fgrep; do
6743    for ac_exec_ext in '' $ac_executable_extensions; do
6744      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
6745      as_fn_executable_p "$ac_path_FGREP" || continue
6746# Check for GNU ac_path_FGREP and select it if it is found.
6747  # Check for GNU $ac_path_FGREP
6748case `"$ac_path_FGREP" --version 2>&1` in
6749*GNU*)
6750  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
6751*)
6752  ac_count=0
6753  $as_echo_n 0123456789 >"conftest.in"
6754  while :
6755  do
6756    cat "conftest.in" "conftest.in" >"conftest.tmp"
6757    mv "conftest.tmp" "conftest.in"
6758    cp "conftest.in" "conftest.nl"
6759    $as_echo 'FGREP' >> "conftest.nl"
6760    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
6761    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6762    as_fn_arith $ac_count + 1 && ac_count=$as_val
6763    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
6764      # Best one so far, save it but keep looking for a better one
6765      ac_cv_path_FGREP="$ac_path_FGREP"
6766      ac_path_FGREP_max=$ac_count
6767    fi
6768    # 10*(2^10) chars as input seems more than enough
6769    test $ac_count -gt 10 && break
6770  done
6771  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6772esac
6773
6774      $ac_path_FGREP_found && break 3
6775    done
6776  done
6777  done
6778IFS=$as_save_IFS
6779  if test -z "$ac_cv_path_FGREP"; then
6780    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6781  fi
6782else
6783  ac_cv_path_FGREP=$FGREP
6784fi
6785
6786   fi
6787fi
6788{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
6789$as_echo "$ac_cv_path_FGREP" >&6; }
6790 FGREP="$ac_cv_path_FGREP"
6791
6792
6793test -z "$GREP" && GREP=grep
6794
6795
6796
6797
6798
6799
6800
6801
6802
6803
6804
6805
6806
6807
6808
6809
6810
6811
6812
6813# Check whether --with-gnu-ld was given.
6814if test "${with_gnu_ld+set}" = set; then :
6815  withval=$with_gnu_ld; test no = "$withval" || with_gnu_ld=yes
6816else
6817  with_gnu_ld=no
6818fi
6819
6820ac_prog=ld
6821if test yes = "$GCC"; then
6822  # Check if gcc -print-prog-name=ld gives a path.
6823  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5
6824$as_echo_n "checking for ld used by $CC... " >&6; }
6825  case $host in
6826  *-*-mingw*)
6827    # gcc leaves a trailing carriage return, which upsets mingw
6828    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
6829  *)
6830    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
6831  esac
6832  case $ac_prog in
6833    # Accept absolute paths.
6834    [\\/]* | ?:[\\/]*)
6835      re_direlt='/[^/][^/]*/\.\./'
6836      # Canonicalize the pathname of ld
6837      ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
6838      while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
6839	ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
6840      done
6841      test -z "$LD" && LD=$ac_prog
6842      ;;
6843  "")
6844    # If it fails, then pretend we aren't using GCC.
6845    ac_prog=ld
6846    ;;
6847  *)
6848    # If it is relative, then search for the first ld in PATH.
6849    with_gnu_ld=unknown
6850    ;;
6851  esac
6852elif test yes = "$with_gnu_ld"; then
6853  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
6854$as_echo_n "checking for GNU ld... " >&6; }
6855else
6856  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
6857$as_echo_n "checking for non-GNU ld... " >&6; }
6858fi
6859if ${lt_cv_path_LD+:} false; then :
6860  $as_echo_n "(cached) " >&6
6861else
6862  if test -z "$LD"; then
6863  lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
6864  for ac_dir in $PATH; do
6865    IFS=$lt_save_ifs
6866    test -z "$ac_dir" && ac_dir=.
6867    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
6868      lt_cv_path_LD=$ac_dir/$ac_prog
6869      # Check to see if the program is GNU ld.  I'd rather use --version,
6870      # but apparently some variants of GNU ld only accept -v.
6871      # Break only if it was the GNU/non-GNU ld that we prefer.
6872      case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
6873      *GNU* | *'with BFD'*)
6874	test no != "$with_gnu_ld" && break
6875	;;
6876      *)
6877	test yes != "$with_gnu_ld" && break
6878	;;
6879      esac
6880    fi
6881  done
6882  IFS=$lt_save_ifs
6883else
6884  lt_cv_path_LD=$LD # Let the user override the test with a path.
6885fi
6886fi
6887
6888LD=$lt_cv_path_LD
6889if test -n "$LD"; then
6890  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
6891$as_echo "$LD" >&6; }
6892else
6893  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6894$as_echo "no" >&6; }
6895fi
6896test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
6897{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
6898$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
6899if ${lt_cv_prog_gnu_ld+:} false; then :
6900  $as_echo_n "(cached) " >&6
6901else
6902  # I'd rather use --version here, but apparently some GNU lds only accept -v.
6903case `$LD -v 2>&1 </dev/null` in
6904*GNU* | *'with BFD'*)
6905  lt_cv_prog_gnu_ld=yes
6906  ;;
6907*)
6908  lt_cv_prog_gnu_ld=no
6909  ;;
6910esac
6911fi
6912{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_gnu_ld" >&5
6913$as_echo "$lt_cv_prog_gnu_ld" >&6; }
6914with_gnu_ld=$lt_cv_prog_gnu_ld
6915
6916
6917
6918
6919
6920
6921
6922
6923
6924{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)" >&5
6925$as_echo_n "checking for BSD- or MS-compatible name lister (nm)... " >&6; }
6926if ${lt_cv_path_NM+:} false; then :
6927  $as_echo_n "(cached) " >&6
6928else
6929  if test -n "$NM"; then
6930  # Let the user override the test.
6931  lt_cv_path_NM=$NM
6932else
6933  lt_nm_to_check=${ac_tool_prefix}nm
6934  if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
6935    lt_nm_to_check="$lt_nm_to_check nm"
6936  fi
6937  for lt_tmp_nm in $lt_nm_to_check; do
6938    lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
6939    for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
6940      IFS=$lt_save_ifs
6941      test -z "$ac_dir" && ac_dir=.
6942      tmp_nm=$ac_dir/$lt_tmp_nm
6943      if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then
6944	# Check to see if the nm accepts a BSD-compat flag.
6945	# Adding the 'sed 1q' prevents false positives on HP-UX, which says:
6946	#   nm: unknown option "B" ignored
6947	# Tru64's nm complains that /dev/null is an invalid object file
6948	case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
6949	*/dev/null* | *'Invalid file or object type'*)
6950	  lt_cv_path_NM="$tmp_nm -B"
6951	  break 2
6952	  ;;
6953	*)
6954	  case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
6955	  */dev/null*)
6956	    lt_cv_path_NM="$tmp_nm -p"
6957	    break 2
6958	    ;;
6959	  *)
6960	    lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
6961	    continue # so that we can try to find one that supports BSD flags
6962	    ;;
6963	  esac
6964	  ;;
6965	esac
6966      fi
6967    done
6968    IFS=$lt_save_ifs
6969  done
6970  : ${lt_cv_path_NM=no}
6971fi
6972fi
6973{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5
6974$as_echo "$lt_cv_path_NM" >&6; }
6975if test no != "$lt_cv_path_NM"; then
6976  NM=$lt_cv_path_NM
6977else
6978  # Didn't find any BSD compatible name lister, look for dumpbin.
6979  if test -n "$DUMPBIN"; then :
6980    # Let the user override the test.
6981  else
6982    if test -n "$ac_tool_prefix"; then
6983  for ac_prog in dumpbin "link -dump"
6984  do
6985    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
6986set dummy $ac_tool_prefix$ac_prog; ac_word=$2
6987{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6988$as_echo_n "checking for $ac_word... " >&6; }
6989if ${ac_cv_prog_DUMPBIN+:} false; then :
6990  $as_echo_n "(cached) " >&6
6991else
6992  if test -n "$DUMPBIN"; then
6993  ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
6994else
6995as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6996for as_dir in $PATH
6997do
6998  IFS=$as_save_IFS
6999  test -z "$as_dir" && as_dir=.
7000    for ac_exec_ext in '' $ac_executable_extensions; do
7001  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7002    ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog"
7003    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7004    break 2
7005  fi
7006done
7007  done
7008IFS=$as_save_IFS
7009
7010fi
7011fi
7012DUMPBIN=$ac_cv_prog_DUMPBIN
7013if test -n "$DUMPBIN"; then
7014  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
7015$as_echo "$DUMPBIN" >&6; }
7016else
7017  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7018$as_echo "no" >&6; }
7019fi
7020
7021
7022    test -n "$DUMPBIN" && break
7023  done
7024fi
7025if test -z "$DUMPBIN"; then
7026  ac_ct_DUMPBIN=$DUMPBIN
7027  for ac_prog in dumpbin "link -dump"
7028do
7029  # Extract the first word of "$ac_prog", so it can be a program name with args.
7030set dummy $ac_prog; ac_word=$2
7031{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7032$as_echo_n "checking for $ac_word... " >&6; }
7033if ${ac_cv_prog_ac_ct_DUMPBIN+:} false; then :
7034  $as_echo_n "(cached) " >&6
7035else
7036  if test -n "$ac_ct_DUMPBIN"; then
7037  ac_cv_prog_ac_ct_DUMPBIN="$ac_ct_DUMPBIN" # Let the user override the test.
7038else
7039as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7040for as_dir in $PATH
7041do
7042  IFS=$as_save_IFS
7043  test -z "$as_dir" && as_dir=.
7044    for ac_exec_ext in '' $ac_executable_extensions; do
7045  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7046    ac_cv_prog_ac_ct_DUMPBIN="$ac_prog"
7047    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7048    break 2
7049  fi
7050done
7051  done
7052IFS=$as_save_IFS
7053
7054fi
7055fi
7056ac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN
7057if test -n "$ac_ct_DUMPBIN"; then
7058  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DUMPBIN" >&5
7059$as_echo "$ac_ct_DUMPBIN" >&6; }
7060else
7061  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7062$as_echo "no" >&6; }
7063fi
7064
7065
7066  test -n "$ac_ct_DUMPBIN" && break
7067done
7068
7069  if test "x$ac_ct_DUMPBIN" = x; then
7070    DUMPBIN=":"
7071  else
7072    case $cross_compiling:$ac_tool_warned in
7073yes:)
7074{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7075$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7076ac_tool_warned=yes ;;
7077esac
7078    DUMPBIN=$ac_ct_DUMPBIN
7079  fi
7080fi
7081
7082    case `$DUMPBIN -symbols -headers /dev/null 2>&1 | sed '1q'` in
7083    *COFF*)
7084      DUMPBIN="$DUMPBIN -symbols -headers"
7085      ;;
7086    *)
7087      DUMPBIN=:
7088      ;;
7089    esac
7090  fi
7091
7092  if test : != "$DUMPBIN"; then
7093    NM=$DUMPBIN
7094  fi
7095fi
7096test -z "$NM" && NM=nm
7097
7098
7099
7100
7101
7102
7103{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface" >&5
7104$as_echo_n "checking the name lister ($NM) interface... " >&6; }
7105if ${lt_cv_nm_interface+:} false; then :
7106  $as_echo_n "(cached) " >&6
7107else
7108  lt_cv_nm_interface="BSD nm"
7109  echo "int some_variable = 0;" > conftest.$ac_ext
7110  (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&5)
7111  (eval "$ac_compile" 2>conftest.err)
7112  cat conftest.err >&5
7113  (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
7114  (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
7115  cat conftest.err >&5
7116  (eval echo "\"\$as_me:$LINENO: output\"" >&5)
7117  cat conftest.out >&5
7118  if $GREP 'External.*some_variable' conftest.out > /dev/null; then
7119    lt_cv_nm_interface="MS dumpbin"
7120  fi
7121  rm -f conftest*
7122fi
7123{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_nm_interface" >&5
7124$as_echo "$lt_cv_nm_interface" >&6; }
7125
7126{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
7127$as_echo_n "checking whether ln -s works... " >&6; }
7128LN_S=$as_ln_s
7129if test "$LN_S" = "ln -s"; then
7130  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7131$as_echo "yes" >&6; }
7132else
7133  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
7134$as_echo "no, using $LN_S" >&6; }
7135fi
7136
7137# find the maximum length of command line arguments
7138{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5
7139$as_echo_n "checking the maximum length of command line arguments... " >&6; }
7140if ${lt_cv_sys_max_cmd_len+:} false; then :
7141  $as_echo_n "(cached) " >&6
7142else
7143    i=0
7144  teststring=ABCD
7145
7146  case $build_os in
7147  msdosdjgpp*)
7148    # On DJGPP, this test can blow up pretty badly due to problems in libc
7149    # (any single argument exceeding 2000 bytes causes a buffer overrun
7150    # during glob expansion).  Even if it were fixed, the result of this
7151    # check would be larger than it should be.
7152    lt_cv_sys_max_cmd_len=12288;    # 12K is about right
7153    ;;
7154
7155  gnu*)
7156    # Under GNU Hurd, this test is not required because there is
7157    # no limit to the length of command line arguments.
7158    # Libtool will interpret -1 as no limit whatsoever
7159    lt_cv_sys_max_cmd_len=-1;
7160    ;;
7161
7162  cygwin* | mingw* | cegcc*)
7163    # On Win9x/ME, this test blows up -- it succeeds, but takes
7164    # about 5 minutes as the teststring grows exponentially.
7165    # Worse, since 9x/ME are not pre-emptively multitasking,
7166    # you end up with a "frozen" computer, even though with patience
7167    # the test eventually succeeds (with a max line length of 256k).
7168    # Instead, let's just punt: use the minimum linelength reported by
7169    # all of the supported platforms: 8192 (on NT/2K/XP).
7170    lt_cv_sys_max_cmd_len=8192;
7171    ;;
7172
7173  mint*)
7174    # On MiNT this can take a long time and run out of memory.
7175    lt_cv_sys_max_cmd_len=8192;
7176    ;;
7177
7178  amigaos*)
7179    # On AmigaOS with pdksh, this test takes hours, literally.
7180    # So we just punt and use a minimum line length of 8192.
7181    lt_cv_sys_max_cmd_len=8192;
7182    ;;
7183
7184  bitrig* | darwin* | dragonfly* | freebsd* | netbsd* | openbsd*)
7185    # This has been around since 386BSD, at least.  Likely further.
7186    if test -x /sbin/sysctl; then
7187      lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
7188    elif test -x /usr/sbin/sysctl; then
7189      lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
7190    else
7191      lt_cv_sys_max_cmd_len=65536	# usable default for all BSDs
7192    fi
7193    # And add a safety zone
7194    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
7195    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
7196    ;;
7197
7198  interix*)
7199    # We know the value 262144 and hardcode it with a safety zone (like BSD)
7200    lt_cv_sys_max_cmd_len=196608
7201    ;;
7202
7203  os2*)
7204    # The test takes a long time on OS/2.
7205    lt_cv_sys_max_cmd_len=8192
7206    ;;
7207
7208  osf*)
7209    # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
7210    # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
7211    # nice to cause kernel panics so lets avoid the loop below.
7212    # First set a reasonable default.
7213    lt_cv_sys_max_cmd_len=16384
7214    #
7215    if test -x /sbin/sysconfig; then
7216      case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
7217        *1*) lt_cv_sys_max_cmd_len=-1 ;;
7218      esac
7219    fi
7220    ;;
7221  sco3.2v5*)
7222    lt_cv_sys_max_cmd_len=102400
7223    ;;
7224  sysv5* | sco5v6* | sysv4.2uw2*)
7225    kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
7226    if test -n "$kargmax"; then
7227      lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[	 ]//'`
7228    else
7229      lt_cv_sys_max_cmd_len=32768
7230    fi
7231    ;;
7232  *)
7233    lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
7234    if test -n "$lt_cv_sys_max_cmd_len" && \
7235       test undefined != "$lt_cv_sys_max_cmd_len"; then
7236      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
7237      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
7238    else
7239      # Make teststring a little bigger before we do anything with it.
7240      # a 1K string should be a reasonable start.
7241      for i in 1 2 3 4 5 6 7 8; do
7242        teststring=$teststring$teststring
7243      done
7244      SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
7245      # If test is not a shell built-in, we'll probably end up computing a
7246      # maximum length that is only half of the actual maximum length, but
7247      # we can't tell.
7248      while { test X`env echo "$teststring$teststring" 2>/dev/null` \
7249	         = "X$teststring$teststring"; } >/dev/null 2>&1 &&
7250	      test 17 != "$i" # 1/2 MB should be enough
7251      do
7252        i=`expr $i + 1`
7253        teststring=$teststring$teststring
7254      done
7255      # Only check the string length outside the loop.
7256      lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
7257      teststring=
7258      # Add a significant safety factor because C++ compilers can tack on
7259      # massive amounts of additional arguments before passing them to the
7260      # linker.  It appears as though 1/2 is a usable value.
7261      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
7262    fi
7263    ;;
7264  esac
7265
7266fi
7267
7268if test -n "$lt_cv_sys_max_cmd_len"; then
7269  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len" >&5
7270$as_echo "$lt_cv_sys_max_cmd_len" >&6; }
7271else
7272  { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
7273$as_echo "none" >&6; }
7274fi
7275max_cmd_len=$lt_cv_sys_max_cmd_len
7276
7277
7278
7279
7280
7281
7282: ${CP="cp -f"}
7283: ${MV="mv -f"}
7284: ${RM="rm -f"}
7285
7286if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
7287  lt_unset=unset
7288else
7289  lt_unset=false
7290fi
7291
7292
7293
7294
7295
7296# test EBCDIC or ASCII
7297case `echo X|tr X '\101'` in
7298 A) # ASCII based system
7299    # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
7300  lt_SP2NL='tr \040 \012'
7301  lt_NL2SP='tr \015\012 \040\040'
7302  ;;
7303 *) # EBCDIC based system
7304  lt_SP2NL='tr \100 \n'
7305  lt_NL2SP='tr \r\n \100\100'
7306  ;;
7307esac
7308
7309
7310
7311
7312
7313
7314
7315
7316
7317{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to $host format" >&5
7318$as_echo_n "checking how to convert $build file names to $host format... " >&6; }
7319if ${lt_cv_to_host_file_cmd+:} false; then :
7320  $as_echo_n "(cached) " >&6
7321else
7322  case $host in
7323  *-*-mingw* )
7324    case $build in
7325      *-*-mingw* ) # actually msys
7326        lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32
7327        ;;
7328      *-*-cygwin* )
7329        lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32
7330        ;;
7331      * ) # otherwise, assume *nix
7332        lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32
7333        ;;
7334    esac
7335    ;;
7336  *-*-cygwin* )
7337    case $build in
7338      *-*-mingw* ) # actually msys
7339        lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin
7340        ;;
7341      *-*-cygwin* )
7342        lt_cv_to_host_file_cmd=func_convert_file_noop
7343        ;;
7344      * ) # otherwise, assume *nix
7345        lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin
7346        ;;
7347    esac
7348    ;;
7349  * ) # unhandled hosts (and "normal" native builds)
7350    lt_cv_to_host_file_cmd=func_convert_file_noop
7351    ;;
7352esac
7353
7354fi
7355
7356to_host_file_cmd=$lt_cv_to_host_file_cmd
7357{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_host_file_cmd" >&5
7358$as_echo "$lt_cv_to_host_file_cmd" >&6; }
7359
7360
7361
7362
7363
7364{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format" >&5
7365$as_echo_n "checking how to convert $build file names to toolchain format... " >&6; }
7366if ${lt_cv_to_tool_file_cmd+:} false; then :
7367  $as_echo_n "(cached) " >&6
7368else
7369  #assume ordinary cross tools, or native build.
7370lt_cv_to_tool_file_cmd=func_convert_file_noop
7371case $host in
7372  *-*-mingw* )
7373    case $build in
7374      *-*-mingw* ) # actually msys
7375        lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32
7376        ;;
7377    esac
7378    ;;
7379esac
7380
7381fi
7382
7383to_tool_file_cmd=$lt_cv_to_tool_file_cmd
7384{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_tool_file_cmd" >&5
7385$as_echo "$lt_cv_to_tool_file_cmd" >&6; }
7386
7387
7388
7389
7390
7391{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5
7392$as_echo_n "checking for $LD option to reload object files... " >&6; }
7393if ${lt_cv_ld_reload_flag+:} false; then :
7394  $as_echo_n "(cached) " >&6
7395else
7396  lt_cv_ld_reload_flag='-r'
7397fi
7398{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_reload_flag" >&5
7399$as_echo "$lt_cv_ld_reload_flag" >&6; }
7400reload_flag=$lt_cv_ld_reload_flag
7401case $reload_flag in
7402"" | " "*) ;;
7403*) reload_flag=" $reload_flag" ;;
7404esac
7405reload_cmds='$LD$reload_flag -o $output$reload_objs'
7406case $host_os in
7407  cygwin* | mingw* | pw32* | cegcc*)
7408    if test yes != "$GCC"; then
7409      reload_cmds=false
7410    fi
7411    ;;
7412  darwin*)
7413    if test yes = "$GCC"; then
7414      reload_cmds='$LTCC $LTCFLAGS -nostdlib $wl-r -o $output$reload_objs'
7415    else
7416      reload_cmds='$LD$reload_flag -o $output$reload_objs'
7417    fi
7418    ;;
7419esac
7420
7421
7422
7423
7424
7425
7426
7427
7428
7429if test -n "$ac_tool_prefix"; then
7430  # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
7431set dummy ${ac_tool_prefix}objdump; ac_word=$2
7432{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7433$as_echo_n "checking for $ac_word... " >&6; }
7434if ${ac_cv_prog_OBJDUMP+:} false; then :
7435  $as_echo_n "(cached) " >&6
7436else
7437  if test -n "$OBJDUMP"; then
7438  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
7439else
7440as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7441for as_dir in $PATH
7442do
7443  IFS=$as_save_IFS
7444  test -z "$as_dir" && as_dir=.
7445    for ac_exec_ext in '' $ac_executable_extensions; do
7446  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7447    ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
7448    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7449    break 2
7450  fi
7451done
7452  done
7453IFS=$as_save_IFS
7454
7455fi
7456fi
7457OBJDUMP=$ac_cv_prog_OBJDUMP
7458if test -n "$OBJDUMP"; then
7459  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
7460$as_echo "$OBJDUMP" >&6; }
7461else
7462  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7463$as_echo "no" >&6; }
7464fi
7465
7466
7467fi
7468if test -z "$ac_cv_prog_OBJDUMP"; then
7469  ac_ct_OBJDUMP=$OBJDUMP
7470  # Extract the first word of "objdump", so it can be a program name with args.
7471set dummy objdump; ac_word=$2
7472{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7473$as_echo_n "checking for $ac_word... " >&6; }
7474if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
7475  $as_echo_n "(cached) " >&6
7476else
7477  if test -n "$ac_ct_OBJDUMP"; then
7478  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
7479else
7480as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7481for as_dir in $PATH
7482do
7483  IFS=$as_save_IFS
7484  test -z "$as_dir" && as_dir=.
7485    for ac_exec_ext in '' $ac_executable_extensions; do
7486  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7487    ac_cv_prog_ac_ct_OBJDUMP="objdump"
7488    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7489    break 2
7490  fi
7491done
7492  done
7493IFS=$as_save_IFS
7494
7495fi
7496fi
7497ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
7498if test -n "$ac_ct_OBJDUMP"; then
7499  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
7500$as_echo "$ac_ct_OBJDUMP" >&6; }
7501else
7502  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7503$as_echo "no" >&6; }
7504fi
7505
7506  if test "x$ac_ct_OBJDUMP" = x; then
7507    OBJDUMP="false"
7508  else
7509    case $cross_compiling:$ac_tool_warned in
7510yes:)
7511{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7512$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7513ac_tool_warned=yes ;;
7514esac
7515    OBJDUMP=$ac_ct_OBJDUMP
7516  fi
7517else
7518  OBJDUMP="$ac_cv_prog_OBJDUMP"
7519fi
7520
7521test -z "$OBJDUMP" && OBJDUMP=objdump
7522
7523
7524
7525
7526
7527
7528
7529
7530
7531{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries" >&5
7532$as_echo_n "checking how to recognize dependent libraries... " >&6; }
7533if ${lt_cv_deplibs_check_method+:} false; then :
7534  $as_echo_n "(cached) " >&6
7535else
7536  lt_cv_file_magic_cmd='$MAGIC_CMD'
7537lt_cv_file_magic_test_file=
7538lt_cv_deplibs_check_method='unknown'
7539# Need to set the preceding variable on all platforms that support
7540# interlibrary dependencies.
7541# 'none' -- dependencies not supported.
7542# 'unknown' -- same as none, but documents that we really don't know.
7543# 'pass_all' -- all dependencies passed with no checks.
7544# 'test_compile' -- check by making test program.
7545# 'file_magic [[regex]]' -- check by looking for files in library path
7546# that responds to the $file_magic_cmd with a given extended regex.
7547# If you have 'file' or equivalent on your system and you're not sure
7548# whether 'pass_all' will *always* work, you probably want this one.
7549
7550case $host_os in
7551aix[4-9]*)
7552  lt_cv_deplibs_check_method=pass_all
7553  ;;
7554
7555beos*)
7556  lt_cv_deplibs_check_method=pass_all
7557  ;;
7558
7559bsdi[45]*)
7560  lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
7561  lt_cv_file_magic_cmd='/usr/bin/file -L'
7562  lt_cv_file_magic_test_file=/shlib/libc.so
7563  ;;
7564
7565cygwin*)
7566  # func_win32_libid is a shell function defined in ltmain.sh
7567  lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
7568  lt_cv_file_magic_cmd='func_win32_libid'
7569  ;;
7570
7571mingw* | pw32*)
7572  # Base MSYS/MinGW do not provide the 'file' command needed by
7573  # func_win32_libid shell function, so use a weaker test based on 'objdump',
7574  # unless we find 'file', for example because we are cross-compiling.
7575  if ( file / ) >/dev/null 2>&1; then
7576    lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
7577    lt_cv_file_magic_cmd='func_win32_libid'
7578  else
7579    # Keep this pattern in sync with the one in func_win32_libid.
7580    lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)'
7581    lt_cv_file_magic_cmd='$OBJDUMP -f'
7582  fi
7583  ;;
7584
7585cegcc*)
7586  # use the weaker test based on 'objdump'. See mingw*.
7587  lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
7588  lt_cv_file_magic_cmd='$OBJDUMP -f'
7589  ;;
7590
7591darwin* | rhapsody*)
7592  lt_cv_deplibs_check_method=pass_all
7593  ;;
7594
7595freebsd* | dragonfly*)
7596  if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
7597    case $host_cpu in
7598    i*86 )
7599      # Not sure whether the presence of OpenBSD here was a mistake.
7600      # Let's accept both of them until this is cleared up.
7601      lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library'
7602      lt_cv_file_magic_cmd=/usr/bin/file
7603      lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
7604      ;;
7605    esac
7606  else
7607    lt_cv_deplibs_check_method=pass_all
7608  fi
7609  ;;
7610
7611haiku*)
7612  lt_cv_deplibs_check_method=pass_all
7613  ;;
7614
7615hpux10.20* | hpux11*)
7616  lt_cv_file_magic_cmd=/usr/bin/file
7617  case $host_cpu in
7618  ia64*)
7619    lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64'
7620    lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
7621    ;;
7622  hppa*64*)
7623    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]'
7624    lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
7625    ;;
7626  *)
7627    lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9]\.[0-9]) shared library'
7628    lt_cv_file_magic_test_file=/usr/lib/libc.sl
7629    ;;
7630  esac
7631  ;;
7632
7633interix[3-9]*)
7634  # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
7635  lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$'
7636  ;;
7637
7638irix5* | irix6* | nonstopux*)
7639  case $LD in
7640  *-32|*"-32 ") libmagic=32-bit;;
7641  *-n32|*"-n32 ") libmagic=N32;;
7642  *-64|*"-64 ") libmagic=64-bit;;
7643  *) libmagic=never-match;;
7644  esac
7645  lt_cv_deplibs_check_method=pass_all
7646  ;;
7647
7648# This must be glibc/ELF.
7649linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
7650  lt_cv_deplibs_check_method=pass_all
7651  ;;
7652
7653netbsd*)
7654  if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
7655    lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
7656  else
7657    lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$'
7658  fi
7659  ;;
7660
7661newos6*)
7662  lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'
7663  lt_cv_file_magic_cmd=/usr/bin/file
7664  lt_cv_file_magic_test_file=/usr/lib/libnls.so
7665  ;;
7666
7667*nto* | *qnx*)
7668  lt_cv_deplibs_check_method=pass_all
7669  ;;
7670
7671openbsd* | bitrig*)
7672  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
7673    lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$'
7674  else
7675    lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
7676  fi
7677  ;;
7678
7679osf3* | osf4* | osf5*)
7680  lt_cv_deplibs_check_method=pass_all
7681  ;;
7682
7683rdos*)
7684  lt_cv_deplibs_check_method=pass_all
7685  ;;
7686
7687solaris*)
7688  lt_cv_deplibs_check_method=pass_all
7689  ;;
7690
7691sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
7692  lt_cv_deplibs_check_method=pass_all
7693  ;;
7694
7695sysv4 | sysv4.3*)
7696  case $host_vendor in
7697  motorola)
7698    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]'
7699    lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
7700    ;;
7701  ncr)
7702    lt_cv_deplibs_check_method=pass_all
7703    ;;
7704  sequent)
7705    lt_cv_file_magic_cmd='/bin/file'
7706    lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'
7707    ;;
7708  sni)
7709    lt_cv_file_magic_cmd='/bin/file'
7710    lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib"
7711    lt_cv_file_magic_test_file=/lib/libc.so
7712    ;;
7713  siemens)
7714    lt_cv_deplibs_check_method=pass_all
7715    ;;
7716  pc)
7717    lt_cv_deplibs_check_method=pass_all
7718    ;;
7719  esac
7720  ;;
7721
7722tpf*)
7723  lt_cv_deplibs_check_method=pass_all
7724  ;;
7725esac
7726
7727fi
7728{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5
7729$as_echo "$lt_cv_deplibs_check_method" >&6; }
7730
7731file_magic_glob=
7732want_nocaseglob=no
7733if test "$build" = "$host"; then
7734  case $host_os in
7735  mingw* | pw32*)
7736    if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then
7737      want_nocaseglob=yes
7738    else
7739      file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[\1]\/[\1]\/g;/g"`
7740    fi
7741    ;;
7742  esac
7743fi
7744
7745file_magic_cmd=$lt_cv_file_magic_cmd
7746deplibs_check_method=$lt_cv_deplibs_check_method
7747test -z "$deplibs_check_method" && deplibs_check_method=unknown
7748
7749
7750
7751
7752
7753
7754
7755
7756
7757
7758
7759
7760
7761
7762
7763
7764
7765
7766
7767
7768
7769
7770if test -n "$ac_tool_prefix"; then
7771  # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
7772set dummy ${ac_tool_prefix}dlltool; ac_word=$2
7773{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7774$as_echo_n "checking for $ac_word... " >&6; }
7775if ${ac_cv_prog_DLLTOOL+:} false; then :
7776  $as_echo_n "(cached) " >&6
7777else
7778  if test -n "$DLLTOOL"; then
7779  ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
7780else
7781as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7782for as_dir in $PATH
7783do
7784  IFS=$as_save_IFS
7785  test -z "$as_dir" && as_dir=.
7786    for ac_exec_ext in '' $ac_executable_extensions; do
7787  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7788    ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
7789    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7790    break 2
7791  fi
7792done
7793  done
7794IFS=$as_save_IFS
7795
7796fi
7797fi
7798DLLTOOL=$ac_cv_prog_DLLTOOL
7799if test -n "$DLLTOOL"; then
7800  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5
7801$as_echo "$DLLTOOL" >&6; }
7802else
7803  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7804$as_echo "no" >&6; }
7805fi
7806
7807
7808fi
7809if test -z "$ac_cv_prog_DLLTOOL"; then
7810  ac_ct_DLLTOOL=$DLLTOOL
7811  # Extract the first word of "dlltool", so it can be a program name with args.
7812set dummy dlltool; ac_word=$2
7813{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7814$as_echo_n "checking for $ac_word... " >&6; }
7815if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then :
7816  $as_echo_n "(cached) " >&6
7817else
7818  if test -n "$ac_ct_DLLTOOL"; then
7819  ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
7820else
7821as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7822for as_dir in $PATH
7823do
7824  IFS=$as_save_IFS
7825  test -z "$as_dir" && as_dir=.
7826    for ac_exec_ext in '' $ac_executable_extensions; do
7827  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7828    ac_cv_prog_ac_ct_DLLTOOL="dlltool"
7829    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7830    break 2
7831  fi
7832done
7833  done
7834IFS=$as_save_IFS
7835
7836fi
7837fi
7838ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
7839if test -n "$ac_ct_DLLTOOL"; then
7840  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5
7841$as_echo "$ac_ct_DLLTOOL" >&6; }
7842else
7843  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7844$as_echo "no" >&6; }
7845fi
7846
7847  if test "x$ac_ct_DLLTOOL" = x; then
7848    DLLTOOL="false"
7849  else
7850    case $cross_compiling:$ac_tool_warned in
7851yes:)
7852{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7853$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7854ac_tool_warned=yes ;;
7855esac
7856    DLLTOOL=$ac_ct_DLLTOOL
7857  fi
7858else
7859  DLLTOOL="$ac_cv_prog_DLLTOOL"
7860fi
7861
7862test -z "$DLLTOOL" && DLLTOOL=dlltool
7863
7864
7865
7866
7867
7868
7869
7870
7871
7872
7873{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to associate runtime and link libraries" >&5
7874$as_echo_n "checking how to associate runtime and link libraries... " >&6; }
7875if ${lt_cv_sharedlib_from_linklib_cmd+:} false; then :
7876  $as_echo_n "(cached) " >&6
7877else
7878  lt_cv_sharedlib_from_linklib_cmd='unknown'
7879
7880case $host_os in
7881cygwin* | mingw* | pw32* | cegcc*)
7882  # two different shell functions defined in ltmain.sh;
7883  # decide which one to use based on capabilities of $DLLTOOL
7884  case `$DLLTOOL --help 2>&1` in
7885  *--identify-strict*)
7886    lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib
7887    ;;
7888  *)
7889    lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback
7890    ;;
7891  esac
7892  ;;
7893*)
7894  # fallback: assume linklib IS sharedlib
7895  lt_cv_sharedlib_from_linklib_cmd=$ECHO
7896  ;;
7897esac
7898
7899fi
7900{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sharedlib_from_linklib_cmd" >&5
7901$as_echo "$lt_cv_sharedlib_from_linklib_cmd" >&6; }
7902sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd
7903test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO
7904
7905
7906
7907
7908
7909
7910
7911if test -n "$ac_tool_prefix"; then
7912  for ac_prog in ar
7913  do
7914    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
7915set dummy $ac_tool_prefix$ac_prog; ac_word=$2
7916{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7917$as_echo_n "checking for $ac_word... " >&6; }
7918if ${ac_cv_prog_AR+:} false; then :
7919  $as_echo_n "(cached) " >&6
7920else
7921  if test -n "$AR"; then
7922  ac_cv_prog_AR="$AR" # Let the user override the test.
7923else
7924as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7925for as_dir in $PATH
7926do
7927  IFS=$as_save_IFS
7928  test -z "$as_dir" && as_dir=.
7929    for ac_exec_ext in '' $ac_executable_extensions; do
7930  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7931    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
7932    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7933    break 2
7934  fi
7935done
7936  done
7937IFS=$as_save_IFS
7938
7939fi
7940fi
7941AR=$ac_cv_prog_AR
7942if test -n "$AR"; then
7943  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
7944$as_echo "$AR" >&6; }
7945else
7946  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7947$as_echo "no" >&6; }
7948fi
7949
7950
7951    test -n "$AR" && break
7952  done
7953fi
7954if test -z "$AR"; then
7955  ac_ct_AR=$AR
7956  for ac_prog in ar
7957do
7958  # Extract the first word of "$ac_prog", so it can be a program name with args.
7959set dummy $ac_prog; ac_word=$2
7960{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7961$as_echo_n "checking for $ac_word... " >&6; }
7962if ${ac_cv_prog_ac_ct_AR+:} false; then :
7963  $as_echo_n "(cached) " >&6
7964else
7965  if test -n "$ac_ct_AR"; then
7966  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
7967else
7968as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7969for as_dir in $PATH
7970do
7971  IFS=$as_save_IFS
7972  test -z "$as_dir" && as_dir=.
7973    for ac_exec_ext in '' $ac_executable_extensions; do
7974  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7975    ac_cv_prog_ac_ct_AR="$ac_prog"
7976    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7977    break 2
7978  fi
7979done
7980  done
7981IFS=$as_save_IFS
7982
7983fi
7984fi
7985ac_ct_AR=$ac_cv_prog_ac_ct_AR
7986if test -n "$ac_ct_AR"; then
7987  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
7988$as_echo "$ac_ct_AR" >&6; }
7989else
7990  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7991$as_echo "no" >&6; }
7992fi
7993
7994
7995  test -n "$ac_ct_AR" && break
7996done
7997
7998  if test "x$ac_ct_AR" = x; then
7999    AR="false"
8000  else
8001    case $cross_compiling:$ac_tool_warned in
8002yes:)
8003{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8004$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8005ac_tool_warned=yes ;;
8006esac
8007    AR=$ac_ct_AR
8008  fi
8009fi
8010
8011: ${AR=ar}
8012: ${AR_FLAGS=cru}
8013
8014
8015
8016
8017
8018
8019
8020
8021
8022
8023
8024{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support" >&5
8025$as_echo_n "checking for archiver @FILE support... " >&6; }
8026if ${lt_cv_ar_at_file+:} false; then :
8027  $as_echo_n "(cached) " >&6
8028else
8029  lt_cv_ar_at_file=no
8030   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8031/* end confdefs.h.  */
8032
8033int
8034main ()
8035{
8036
8037  ;
8038  return 0;
8039}
8040_ACEOF
8041if ac_fn_c_try_compile "$LINENO"; then :
8042  echo conftest.$ac_objext > conftest.lst
8043      lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&5'
8044      { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5
8045  (eval $lt_ar_try) 2>&5
8046  ac_status=$?
8047  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8048  test $ac_status = 0; }
8049      if test 0 -eq "$ac_status"; then
8050	# Ensure the archiver fails upon bogus file names.
8051	rm -f conftest.$ac_objext libconftest.a
8052	{ { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5
8053  (eval $lt_ar_try) 2>&5
8054  ac_status=$?
8055  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8056  test $ac_status = 0; }
8057	if test 0 -ne "$ac_status"; then
8058          lt_cv_ar_at_file=@
8059        fi
8060      fi
8061      rm -f conftest.* libconftest.a
8062
8063fi
8064rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8065
8066fi
8067{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5
8068$as_echo "$lt_cv_ar_at_file" >&6; }
8069
8070if test no = "$lt_cv_ar_at_file"; then
8071  archiver_list_spec=
8072else
8073  archiver_list_spec=$lt_cv_ar_at_file
8074fi
8075
8076
8077
8078
8079
8080
8081
8082if test -n "$ac_tool_prefix"; then
8083  # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
8084set dummy ${ac_tool_prefix}strip; ac_word=$2
8085{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8086$as_echo_n "checking for $ac_word... " >&6; }
8087if ${ac_cv_prog_STRIP+:} false; then :
8088  $as_echo_n "(cached) " >&6
8089else
8090  if test -n "$STRIP"; then
8091  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
8092else
8093as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8094for as_dir in $PATH
8095do
8096  IFS=$as_save_IFS
8097  test -z "$as_dir" && as_dir=.
8098    for ac_exec_ext in '' $ac_executable_extensions; do
8099  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8100    ac_cv_prog_STRIP="${ac_tool_prefix}strip"
8101    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8102    break 2
8103  fi
8104done
8105  done
8106IFS=$as_save_IFS
8107
8108fi
8109fi
8110STRIP=$ac_cv_prog_STRIP
8111if test -n "$STRIP"; then
8112  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
8113$as_echo "$STRIP" >&6; }
8114else
8115  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8116$as_echo "no" >&6; }
8117fi
8118
8119
8120fi
8121if test -z "$ac_cv_prog_STRIP"; then
8122  ac_ct_STRIP=$STRIP
8123  # Extract the first word of "strip", so it can be a program name with args.
8124set dummy strip; ac_word=$2
8125{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8126$as_echo_n "checking for $ac_word... " >&6; }
8127if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
8128  $as_echo_n "(cached) " >&6
8129else
8130  if test -n "$ac_ct_STRIP"; then
8131  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
8132else
8133as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8134for as_dir in $PATH
8135do
8136  IFS=$as_save_IFS
8137  test -z "$as_dir" && as_dir=.
8138    for ac_exec_ext in '' $ac_executable_extensions; do
8139  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8140    ac_cv_prog_ac_ct_STRIP="strip"
8141    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8142    break 2
8143  fi
8144done
8145  done
8146IFS=$as_save_IFS
8147
8148fi
8149fi
8150ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
8151if test -n "$ac_ct_STRIP"; then
8152  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
8153$as_echo "$ac_ct_STRIP" >&6; }
8154else
8155  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8156$as_echo "no" >&6; }
8157fi
8158
8159  if test "x$ac_ct_STRIP" = x; then
8160    STRIP=":"
8161  else
8162    case $cross_compiling:$ac_tool_warned in
8163yes:)
8164{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8165$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8166ac_tool_warned=yes ;;
8167esac
8168    STRIP=$ac_ct_STRIP
8169  fi
8170else
8171  STRIP="$ac_cv_prog_STRIP"
8172fi
8173
8174test -z "$STRIP" && STRIP=:
8175
8176
8177
8178
8179
8180
8181if test -n "$ac_tool_prefix"; then
8182  # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
8183set dummy ${ac_tool_prefix}ranlib; ac_word=$2
8184{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8185$as_echo_n "checking for $ac_word... " >&6; }
8186if ${ac_cv_prog_RANLIB+:} false; then :
8187  $as_echo_n "(cached) " >&6
8188else
8189  if test -n "$RANLIB"; then
8190  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
8191else
8192as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8193for as_dir in $PATH
8194do
8195  IFS=$as_save_IFS
8196  test -z "$as_dir" && as_dir=.
8197    for ac_exec_ext in '' $ac_executable_extensions; do
8198  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8199    ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
8200    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8201    break 2
8202  fi
8203done
8204  done
8205IFS=$as_save_IFS
8206
8207fi
8208fi
8209RANLIB=$ac_cv_prog_RANLIB
8210if test -n "$RANLIB"; then
8211  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
8212$as_echo "$RANLIB" >&6; }
8213else
8214  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8215$as_echo "no" >&6; }
8216fi
8217
8218
8219fi
8220if test -z "$ac_cv_prog_RANLIB"; then
8221  ac_ct_RANLIB=$RANLIB
8222  # Extract the first word of "ranlib", so it can be a program name with args.
8223set dummy ranlib; ac_word=$2
8224{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8225$as_echo_n "checking for $ac_word... " >&6; }
8226if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
8227  $as_echo_n "(cached) " >&6
8228else
8229  if test -n "$ac_ct_RANLIB"; then
8230  ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
8231else
8232as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8233for as_dir in $PATH
8234do
8235  IFS=$as_save_IFS
8236  test -z "$as_dir" && as_dir=.
8237    for ac_exec_ext in '' $ac_executable_extensions; do
8238  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8239    ac_cv_prog_ac_ct_RANLIB="ranlib"
8240    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8241    break 2
8242  fi
8243done
8244  done
8245IFS=$as_save_IFS
8246
8247fi
8248fi
8249ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
8250if test -n "$ac_ct_RANLIB"; then
8251  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
8252$as_echo "$ac_ct_RANLIB" >&6; }
8253else
8254  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8255$as_echo "no" >&6; }
8256fi
8257
8258  if test "x$ac_ct_RANLIB" = x; then
8259    RANLIB=":"
8260  else
8261    case $cross_compiling:$ac_tool_warned in
8262yes:)
8263{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8264$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8265ac_tool_warned=yes ;;
8266esac
8267    RANLIB=$ac_ct_RANLIB
8268  fi
8269else
8270  RANLIB="$ac_cv_prog_RANLIB"
8271fi
8272
8273test -z "$RANLIB" && RANLIB=:
8274
8275
8276
8277
8278
8279
8280# Determine commands to create old-style static archives.
8281old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
8282old_postinstall_cmds='chmod 644 $oldlib'
8283old_postuninstall_cmds=
8284
8285if test -n "$RANLIB"; then
8286  case $host_os in
8287  bitrig* | openbsd*)
8288    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib"
8289    ;;
8290  *)
8291    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib"
8292    ;;
8293  esac
8294  old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib"
8295fi
8296
8297case $host_os in
8298  darwin*)
8299    lock_old_archive_extraction=yes ;;
8300  *)
8301    lock_old_archive_extraction=no ;;
8302esac
8303
8304
8305
8306
8307
8308
8309
8310
8311
8312
8313
8314
8315
8316
8317
8318
8319
8320
8321
8322
8323
8324for ac_prog in gawk mawk nawk awk
8325do
8326  # Extract the first word of "$ac_prog", so it can be a program name with args.
8327set dummy $ac_prog; ac_word=$2
8328{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8329$as_echo_n "checking for $ac_word... " >&6; }
8330if ${ac_cv_prog_AWK+:} false; then :
8331  $as_echo_n "(cached) " >&6
8332else
8333  if test -n "$AWK"; then
8334  ac_cv_prog_AWK="$AWK" # Let the user override the test.
8335else
8336as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8337for as_dir in $PATH
8338do
8339  IFS=$as_save_IFS
8340  test -z "$as_dir" && as_dir=.
8341    for ac_exec_ext in '' $ac_executable_extensions; do
8342  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8343    ac_cv_prog_AWK="$ac_prog"
8344    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8345    break 2
8346  fi
8347done
8348  done
8349IFS=$as_save_IFS
8350
8351fi
8352fi
8353AWK=$ac_cv_prog_AWK
8354if test -n "$AWK"; then
8355  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
8356$as_echo "$AWK" >&6; }
8357else
8358  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8359$as_echo "no" >&6; }
8360fi
8361
8362
8363  test -n "$AWK" && break
8364done
8365
8366
8367
8368
8369
8370
8371
8372
8373
8374
8375
8376
8377
8378
8379
8380
8381
8382
8383
8384# If no C compiler was specified, use CC.
8385LTCC=${LTCC-"$CC"}
8386
8387# If no C compiler flags were specified, use CFLAGS.
8388LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
8389
8390# Allow CC to be a program name with arguments.
8391compiler=$CC
8392
8393
8394# Check for command to grab the raw symbol name followed by C symbol from nm.
8395{ $as_echo "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5
8396$as_echo_n "checking command to parse $NM output from $compiler object... " >&6; }
8397if ${lt_cv_sys_global_symbol_pipe+:} false; then :
8398  $as_echo_n "(cached) " >&6
8399else
8400
8401# These are sane defaults that work on at least a few old systems.
8402# [They come from Ultrix.  What could be older than Ultrix?!! ;)]
8403
8404# Character class describing NM global symbol codes.
8405symcode='[BCDEGRST]'
8406
8407# Regexp to match symbols that can be accessed directly from C.
8408sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
8409
8410# Define system-specific variables.
8411case $host_os in
8412aix*)
8413  symcode='[BCDT]'
8414  ;;
8415cygwin* | mingw* | pw32* | cegcc*)
8416  symcode='[ABCDGISTW]'
8417  ;;
8418hpux*)
8419  if test ia64 = "$host_cpu"; then
8420    symcode='[ABCDEGRST]'
8421  fi
8422  ;;
8423irix* | nonstopux*)
8424  symcode='[BCDEGRST]'
8425  ;;
8426osf*)
8427  symcode='[BCDEGQRST]'
8428  ;;
8429solaris*)
8430  symcode='[BDRT]'
8431  ;;
8432sco3.2v5*)
8433  symcode='[DT]'
8434  ;;
8435sysv4.2uw2*)
8436  symcode='[DT]'
8437  ;;
8438sysv5* | sco5v6* | unixware* | OpenUNIX*)
8439  symcode='[ABDT]'
8440  ;;
8441sysv4)
8442  symcode='[DFNSTU]'
8443  ;;
8444esac
8445
8446# If we're using GNU nm, then use its standard symbol codes.
8447case `$NM -V 2>&1` in
8448*GNU* | *'with BFD'*)
8449  symcode='[ABCDGIRSTW]' ;;
8450esac
8451
8452if test "$lt_cv_nm_interface" = "MS dumpbin"; then
8453  # Gets list of data symbols to import.
8454  lt_cv_sys_global_symbol_to_import="sed -n -e 's/^I .* \(.*\)$/\1/p'"
8455  # Adjust the below global symbol transforms to fixup imported variables.
8456  lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'"
8457  lt_c_name_hook=" -e 's/^I .* \(.*\)$/  {\"\1\", (void *) 0},/p'"
8458  lt_c_name_lib_hook="\
8459  -e 's/^I .* \(lib.*\)$/  {\"\1\", (void *) 0},/p'\
8460  -e 's/^I .* \(.*\)$/  {\"lib\1\", (void *) 0},/p'"
8461else
8462  # Disable hooks by default.
8463  lt_cv_sys_global_symbol_to_import=
8464  lt_cdecl_hook=
8465  lt_c_name_hook=
8466  lt_c_name_lib_hook=
8467fi
8468
8469# Transform an extracted symbol line into a proper C declaration.
8470# Some systems (esp. on ia64) link data and code symbols differently,
8471# so use this general approach.
8472lt_cv_sys_global_symbol_to_cdecl="sed -n"\
8473$lt_cdecl_hook\
8474" -e 's/^T .* \(.*\)$/extern int \1();/p'"\
8475" -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'"
8476
8477# Transform an extracted symbol line into symbol name and symbol address
8478lt_cv_sys_global_symbol_to_c_name_address="sed -n"\
8479$lt_c_name_hook\
8480" -e 's/^: \(.*\) .*$/  {\"\1\", (void *) 0},/p'"\
8481" -e 's/^$symcode$symcode* .* \(.*\)$/  {\"\1\", (void *) \&\1},/p'"
8482
8483# Transform an extracted symbol line into symbol name with lib prefix and
8484# symbol address.
8485lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n"\
8486$lt_c_name_lib_hook\
8487" -e 's/^: \(.*\) .*$/  {\"\1\", (void *) 0},/p'"\
8488" -e 's/^$symcode$symcode* .* \(lib.*\)$/  {\"\1\", (void *) \&\1},/p'"\
8489" -e 's/^$symcode$symcode* .* \(.*\)$/  {\"lib\1\", (void *) \&\1},/p'"
8490
8491# Handle CRLF in mingw tool chain
8492opt_cr=
8493case $build_os in
8494mingw*)
8495  opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
8496  ;;
8497esac
8498
8499# Try without a prefix underscore, then with it.
8500for ac_symprfx in "" "_"; do
8501
8502  # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
8503  symxfrm="\\1 $ac_symprfx\\2 \\2"
8504
8505  # Write the raw and C identifiers.
8506  if test "$lt_cv_nm_interface" = "MS dumpbin"; then
8507    # Fake it for dumpbin and say T for any non-static function,
8508    # D for any global variable and I for any imported variable.
8509    # Also find C++ and __fastcall symbols from MSVC++,
8510    # which start with @ or ?.
8511    lt_cv_sys_global_symbol_pipe="$AWK '"\
8512"     {last_section=section; section=\$ 3};"\
8513"     /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\
8514"     /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
8515"     /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\
8516"     /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\
8517"     /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\
8518"     \$ 0!~/External *\|/{next};"\
8519"     / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
8520"     {if(hide[section]) next};"\
8521"     {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\
8522"     {split(\$ 0,a,/\||\r/); split(a[2],s)};"\
8523"     s[1]~/^[@?]/{print f,s[1],s[1]; next};"\
8524"     s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\
8525"     ' prfx=^$ac_symprfx"
8526  else
8527    lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[	 ]\($symcode$symcode*\)[	 ][	 ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
8528  fi
8529  lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'"
8530
8531  # Check to see that the pipe works correctly.
8532  pipe_works=no
8533
8534  rm -f conftest*
8535  cat > conftest.$ac_ext <<_LT_EOF
8536#ifdef __cplusplus
8537extern "C" {
8538#endif
8539char nm_test_var;
8540void nm_test_func(void);
8541void nm_test_func(void){}
8542#ifdef __cplusplus
8543}
8544#endif
8545int main(){nm_test_var='a';nm_test_func();return(0);}
8546_LT_EOF
8547
8548  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
8549  (eval $ac_compile) 2>&5
8550  ac_status=$?
8551  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8552  test $ac_status = 0; }; then
8553    # Now try to grab the symbols.
8554    nlist=conftest.nm
8555    if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist\""; } >&5
8556  (eval $NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) 2>&5
8557  ac_status=$?
8558  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8559  test $ac_status = 0; } && test -s "$nlist"; then
8560      # Try sorting and uniquifying the output.
8561      if sort "$nlist" | uniq > "$nlist"T; then
8562	mv -f "$nlist"T "$nlist"
8563      else
8564	rm -f "$nlist"T
8565      fi
8566
8567      # Make sure that we snagged all the symbols we need.
8568      if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
8569	if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
8570	  cat <<_LT_EOF > conftest.$ac_ext
8571/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests.  */
8572#if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE
8573/* DATA imports from DLLs on WIN32 can't be const, because runtime
8574   relocations are performed -- see ld's documentation on pseudo-relocs.  */
8575# define LT_DLSYM_CONST
8576#elif defined __osf__
8577/* This system does not cope well with relocations in const data.  */
8578# define LT_DLSYM_CONST
8579#else
8580# define LT_DLSYM_CONST const
8581#endif
8582
8583#ifdef __cplusplus
8584extern "C" {
8585#endif
8586
8587_LT_EOF
8588	  # Now generate the symbol file.
8589	  eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
8590
8591	  cat <<_LT_EOF >> conftest.$ac_ext
8592
8593/* The mapping between symbol names and symbols.  */
8594LT_DLSYM_CONST struct {
8595  const char *name;
8596  void       *address;
8597}
8598lt__PROGRAM__LTX_preloaded_symbols[] =
8599{
8600  { "@PROGRAM@", (void *) 0 },
8601_LT_EOF
8602	  $SED "s/^$symcode$symcode* .* \(.*\)$/  {\"\1\", (void *) \&\1},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
8603	  cat <<\_LT_EOF >> conftest.$ac_ext
8604  {0, (void *) 0}
8605};
8606
8607/* This works around a problem in FreeBSD linker */
8608#ifdef FREEBSD_WORKAROUND
8609static const void *lt_preloaded_setup() {
8610  return lt__PROGRAM__LTX_preloaded_symbols;
8611}
8612#endif
8613
8614#ifdef __cplusplus
8615}
8616#endif
8617_LT_EOF
8618	  # Now try linking the two files.
8619	  mv conftest.$ac_objext conftstm.$ac_objext
8620	  lt_globsym_save_LIBS=$LIBS
8621	  lt_globsym_save_CFLAGS=$CFLAGS
8622	  LIBS=conftstm.$ac_objext
8623	  CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag"
8624	  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
8625  (eval $ac_link) 2>&5
8626  ac_status=$?
8627  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8628  test $ac_status = 0; } && test -s conftest$ac_exeext; then
8629	    pipe_works=yes
8630	  fi
8631	  LIBS=$lt_globsym_save_LIBS
8632	  CFLAGS=$lt_globsym_save_CFLAGS
8633	else
8634	  echo "cannot find nm_test_func in $nlist" >&5
8635	fi
8636      else
8637	echo "cannot find nm_test_var in $nlist" >&5
8638      fi
8639    else
8640      echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5
8641    fi
8642  else
8643    echo "$progname: failed program was:" >&5
8644    cat conftest.$ac_ext >&5
8645  fi
8646  rm -rf conftest* conftst*
8647
8648  # Do not use the global_symbol_pipe unless it works.
8649  if test yes = "$pipe_works"; then
8650    break
8651  else
8652    lt_cv_sys_global_symbol_pipe=
8653  fi
8654done
8655
8656fi
8657
8658if test -z "$lt_cv_sys_global_symbol_pipe"; then
8659  lt_cv_sys_global_symbol_to_cdecl=
8660fi
8661if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
8662  { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
8663$as_echo "failed" >&6; }
8664else
8665  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
8666$as_echo "ok" >&6; }
8667fi
8668
8669# Response file support.
8670if test "$lt_cv_nm_interface" = "MS dumpbin"; then
8671  nm_file_list_spec='@'
8672elif $NM --help 2>/dev/null | grep '[@]FILE' >/dev/null; then
8673  nm_file_list_spec='@'
8674fi
8675
8676
8677
8678
8679
8680
8681
8682
8683
8684
8685
8686
8687
8688
8689
8690
8691
8692
8693
8694
8695
8696
8697
8698
8699
8700
8701
8702
8703
8704
8705
8706
8707
8708
8709
8710
8711
8712{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
8713$as_echo_n "checking for sysroot... " >&6; }
8714
8715# Check whether --with-sysroot was given.
8716if test "${with_sysroot+set}" = set; then :
8717  withval=$with_sysroot;
8718else
8719  with_sysroot=no
8720fi
8721
8722
8723lt_sysroot=
8724case $with_sysroot in #(
8725 yes)
8726   if test yes = "$GCC"; then
8727     lt_sysroot=`$CC --print-sysroot 2>/dev/null`
8728   fi
8729   ;; #(
8730 /*)
8731   lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"`
8732   ;; #(
8733 no|'')
8734   ;; #(
8735 *)
8736   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_sysroot" >&5
8737$as_echo "$with_sysroot" >&6; }
8738   as_fn_error $? "The sysroot must be an absolute path." "$LINENO" 5
8739   ;;
8740esac
8741
8742 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}" >&5
8743$as_echo "${lt_sysroot:-no}" >&6; }
8744
8745
8746
8747
8748
8749# Check whether --enable-libtool-lock was given.
8750if test "${enable_libtool_lock+set}" = set; then :
8751  enableval=$enable_libtool_lock;
8752fi
8753
8754test no = "$enable_libtool_lock" || enable_libtool_lock=yes
8755
8756# Some flags need to be propagated to the compiler or linker for good
8757# libtool support.
8758case $host in
8759ia64-*-hpux*)
8760  # Find out what ABI is being produced by ac_compile, and set mode
8761  # options accordingly.
8762  echo 'int i;' > conftest.$ac_ext
8763  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
8764  (eval $ac_compile) 2>&5
8765  ac_status=$?
8766  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8767  test $ac_status = 0; }; then
8768    case `/usr/bin/file conftest.$ac_objext` in
8769      *ELF-32*)
8770	HPUX_IA64_MODE=32
8771	;;
8772      *ELF-64*)
8773	HPUX_IA64_MODE=64
8774	;;
8775    esac
8776  fi
8777  rm -rf conftest*
8778  ;;
8779*-*-irix6*)
8780  # Find out what ABI is being produced by ac_compile, and set linker
8781  # options accordingly.
8782  echo '#line '$LINENO' "configure"' > conftest.$ac_ext
8783  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
8784  (eval $ac_compile) 2>&5
8785  ac_status=$?
8786  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8787  test $ac_status = 0; }; then
8788    if test yes = "$lt_cv_prog_gnu_ld"; then
8789      case `/usr/bin/file conftest.$ac_objext` in
8790	*32-bit*)
8791	  LD="${LD-ld} -melf32bsmip"
8792	  ;;
8793	*N32*)
8794	  LD="${LD-ld} -melf32bmipn32"
8795	  ;;
8796	*64-bit*)
8797	  LD="${LD-ld} -melf64bmip"
8798	;;
8799      esac
8800    else
8801      case `/usr/bin/file conftest.$ac_objext` in
8802	*32-bit*)
8803	  LD="${LD-ld} -32"
8804	  ;;
8805	*N32*)
8806	  LD="${LD-ld} -n32"
8807	  ;;
8808	*64-bit*)
8809	  LD="${LD-ld} -64"
8810	  ;;
8811      esac
8812    fi
8813  fi
8814  rm -rf conftest*
8815  ;;
8816
8817mips64*-*linux*)
8818  # Find out what ABI is being produced by ac_compile, and set linker
8819  # options accordingly.
8820  echo '#line '$LINENO' "configure"' > conftest.$ac_ext
8821  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
8822  (eval $ac_compile) 2>&5
8823  ac_status=$?
8824  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8825  test $ac_status = 0; }; then
8826    emul=elf
8827    case `/usr/bin/file conftest.$ac_objext` in
8828      *32-bit*)
8829	emul="${emul}32"
8830	;;
8831      *64-bit*)
8832	emul="${emul}64"
8833	;;
8834    esac
8835    case `/usr/bin/file conftest.$ac_objext` in
8836      *MSB*)
8837	emul="${emul}btsmip"
8838	;;
8839      *LSB*)
8840	emul="${emul}ltsmip"
8841	;;
8842    esac
8843    case `/usr/bin/file conftest.$ac_objext` in
8844      *N32*)
8845	emul="${emul}n32"
8846	;;
8847    esac
8848    LD="${LD-ld} -m $emul"
8849  fi
8850  rm -rf conftest*
8851  ;;
8852
8853x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \
8854s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
8855  # Find out what ABI is being produced by ac_compile, and set linker
8856  # options accordingly.  Note that the listed cases only cover the
8857  # situations where additional linker options are needed (such as when
8858  # doing 32-bit compilation for a host where ld defaults to 64-bit, or
8859  # vice versa); the common cases where no linker options are needed do
8860  # not appear in the list.
8861  echo 'int i;' > conftest.$ac_ext
8862  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
8863  (eval $ac_compile) 2>&5
8864  ac_status=$?
8865  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8866  test $ac_status = 0; }; then
8867    case `/usr/bin/file conftest.o` in
8868      *32-bit*)
8869	case $host in
8870	  x86_64-*kfreebsd*-gnu)
8871	    LD="${LD-ld} -m elf_i386_fbsd"
8872	    ;;
8873	  x86_64-*linux*)
8874	    case `/usr/bin/file conftest.o` in
8875	      *x86-64*)
8876		LD="${LD-ld} -m elf32_x86_64"
8877		;;
8878	      *)
8879		LD="${LD-ld} -m elf_i386"
8880		;;
8881	    esac
8882	    ;;
8883	  powerpc64le-*linux*)
8884	    LD="${LD-ld} -m elf32lppclinux"
8885	    ;;
8886	  powerpc64-*linux*)
8887	    LD="${LD-ld} -m elf32ppclinux"
8888	    ;;
8889	  s390x-*linux*)
8890	    LD="${LD-ld} -m elf_s390"
8891	    ;;
8892	  sparc64-*linux*)
8893	    LD="${LD-ld} -m elf32_sparc"
8894	    ;;
8895	esac
8896	;;
8897      *64-bit*)
8898	case $host in
8899	  x86_64-*kfreebsd*-gnu)
8900	    LD="${LD-ld} -m elf_x86_64_fbsd"
8901	    ;;
8902	  x86_64-*linux*)
8903	    LD="${LD-ld} -m elf_x86_64"
8904	    ;;
8905	  powerpcle-*linux*)
8906	    LD="${LD-ld} -m elf64lppc"
8907	    ;;
8908	  powerpc-*linux*)
8909	    LD="${LD-ld} -m elf64ppc"
8910	    ;;
8911	  s390*-*linux*|s390*-*tpf*)
8912	    LD="${LD-ld} -m elf64_s390"
8913	    ;;
8914	  sparc*-*linux*)
8915	    LD="${LD-ld} -m elf64_sparc"
8916	    ;;
8917	esac
8918	;;
8919    esac
8920  fi
8921  rm -rf conftest*
8922  ;;
8923
8924*-*-sco3.2v5*)
8925  # On SCO OpenServer 5, we need -belf to get full-featured binaries.
8926  SAVE_CFLAGS=$CFLAGS
8927  CFLAGS="$CFLAGS -belf"
8928  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5
8929$as_echo_n "checking whether the C compiler needs -belf... " >&6; }
8930if ${lt_cv_cc_needs_belf+:} false; then :
8931  $as_echo_n "(cached) " >&6
8932else
8933  ac_ext=c
8934ac_cpp='$CPP $CPPFLAGS'
8935ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
8936ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
8937ac_compiler_gnu=$ac_cv_c_compiler_gnu
8938
8939     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8940/* end confdefs.h.  */
8941
8942int
8943main ()
8944{
8945
8946  ;
8947  return 0;
8948}
8949_ACEOF
8950if ac_fn_c_try_link "$LINENO"; then :
8951  lt_cv_cc_needs_belf=yes
8952else
8953  lt_cv_cc_needs_belf=no
8954fi
8955rm -f core conftest.err conftest.$ac_objext \
8956    conftest$ac_exeext conftest.$ac_ext
8957     ac_ext=c
8958ac_cpp='$CPP $CPPFLAGS'
8959ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
8960ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
8961ac_compiler_gnu=$ac_cv_c_compiler_gnu
8962
8963fi
8964{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5
8965$as_echo "$lt_cv_cc_needs_belf" >&6; }
8966  if test yes != "$lt_cv_cc_needs_belf"; then
8967    # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
8968    CFLAGS=$SAVE_CFLAGS
8969  fi
8970  ;;
8971*-*solaris*)
8972  # Find out what ABI is being produced by ac_compile, and set linker
8973  # options accordingly.
8974  echo 'int i;' > conftest.$ac_ext
8975  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
8976  (eval $ac_compile) 2>&5
8977  ac_status=$?
8978  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8979  test $ac_status = 0; }; then
8980    case `/usr/bin/file conftest.o` in
8981    *64-bit*)
8982      case $lt_cv_prog_gnu_ld in
8983      yes*)
8984        case $host in
8985        i?86-*-solaris*|x86_64-*-solaris*)
8986          LD="${LD-ld} -m elf_x86_64"
8987          ;;
8988        sparc*-*-solaris*)
8989          LD="${LD-ld} -m elf64_sparc"
8990          ;;
8991        esac
8992        # GNU ld 2.21 introduced _sol2 emulations.  Use them if available.
8993        if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then
8994          LD=${LD-ld}_sol2
8995        fi
8996        ;;
8997      *)
8998	if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
8999	  LD="${LD-ld} -64"
9000	fi
9001	;;
9002      esac
9003      ;;
9004    esac
9005  fi
9006  rm -rf conftest*
9007  ;;
9008esac
9009
9010need_locks=$enable_libtool_lock
9011
9012if test -n "$ac_tool_prefix"; then
9013  # Extract the first word of "${ac_tool_prefix}mt", so it can be a program name with args.
9014set dummy ${ac_tool_prefix}mt; ac_word=$2
9015{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9016$as_echo_n "checking for $ac_word... " >&6; }
9017if ${ac_cv_prog_MANIFEST_TOOL+:} false; then :
9018  $as_echo_n "(cached) " >&6
9019else
9020  if test -n "$MANIFEST_TOOL"; then
9021  ac_cv_prog_MANIFEST_TOOL="$MANIFEST_TOOL" # Let the user override the test.
9022else
9023as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9024for as_dir in $PATH
9025do
9026  IFS=$as_save_IFS
9027  test -z "$as_dir" && as_dir=.
9028    for ac_exec_ext in '' $ac_executable_extensions; do
9029  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9030    ac_cv_prog_MANIFEST_TOOL="${ac_tool_prefix}mt"
9031    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9032    break 2
9033  fi
9034done
9035  done
9036IFS=$as_save_IFS
9037
9038fi
9039fi
9040MANIFEST_TOOL=$ac_cv_prog_MANIFEST_TOOL
9041if test -n "$MANIFEST_TOOL"; then
9042  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MANIFEST_TOOL" >&5
9043$as_echo "$MANIFEST_TOOL" >&6; }
9044else
9045  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9046$as_echo "no" >&6; }
9047fi
9048
9049
9050fi
9051if test -z "$ac_cv_prog_MANIFEST_TOOL"; then
9052  ac_ct_MANIFEST_TOOL=$MANIFEST_TOOL
9053  # Extract the first word of "mt", so it can be a program name with args.
9054set dummy mt; ac_word=$2
9055{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9056$as_echo_n "checking for $ac_word... " >&6; }
9057if ${ac_cv_prog_ac_ct_MANIFEST_TOOL+:} false; then :
9058  $as_echo_n "(cached) " >&6
9059else
9060  if test -n "$ac_ct_MANIFEST_TOOL"; then
9061  ac_cv_prog_ac_ct_MANIFEST_TOOL="$ac_ct_MANIFEST_TOOL" # Let the user override the test.
9062else
9063as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9064for as_dir in $PATH
9065do
9066  IFS=$as_save_IFS
9067  test -z "$as_dir" && as_dir=.
9068    for ac_exec_ext in '' $ac_executable_extensions; do
9069  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9070    ac_cv_prog_ac_ct_MANIFEST_TOOL="mt"
9071    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9072    break 2
9073  fi
9074done
9075  done
9076IFS=$as_save_IFS
9077
9078fi
9079fi
9080ac_ct_MANIFEST_TOOL=$ac_cv_prog_ac_ct_MANIFEST_TOOL
9081if test -n "$ac_ct_MANIFEST_TOOL"; then
9082  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MANIFEST_TOOL" >&5
9083$as_echo "$ac_ct_MANIFEST_TOOL" >&6; }
9084else
9085  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9086$as_echo "no" >&6; }
9087fi
9088
9089  if test "x$ac_ct_MANIFEST_TOOL" = x; then
9090    MANIFEST_TOOL=":"
9091  else
9092    case $cross_compiling:$ac_tool_warned in
9093yes:)
9094{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9095$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9096ac_tool_warned=yes ;;
9097esac
9098    MANIFEST_TOOL=$ac_ct_MANIFEST_TOOL
9099  fi
9100else
9101  MANIFEST_TOOL="$ac_cv_prog_MANIFEST_TOOL"
9102fi
9103
9104test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt
9105{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool" >&5
9106$as_echo_n "checking if $MANIFEST_TOOL is a manifest tool... " >&6; }
9107if ${lt_cv_path_mainfest_tool+:} false; then :
9108  $as_echo_n "(cached) " >&6
9109else
9110  lt_cv_path_mainfest_tool=no
9111  echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&5
9112  $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out
9113  cat conftest.err >&5
9114  if $GREP 'Manifest Tool' conftest.out > /dev/null; then
9115    lt_cv_path_mainfest_tool=yes
9116  fi
9117  rm -f conftest*
9118fi
9119{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5
9120$as_echo "$lt_cv_path_mainfest_tool" >&6; }
9121if test yes != "$lt_cv_path_mainfest_tool"; then
9122  MANIFEST_TOOL=:
9123fi
9124
9125
9126
9127
9128
9129
9130  case $host_os in
9131    rhapsody* | darwin*)
9132    if test -n "$ac_tool_prefix"; then
9133  # Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args.
9134set dummy ${ac_tool_prefix}dsymutil; ac_word=$2
9135{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9136$as_echo_n "checking for $ac_word... " >&6; }
9137if ${ac_cv_prog_DSYMUTIL+:} false; then :
9138  $as_echo_n "(cached) " >&6
9139else
9140  if test -n "$DSYMUTIL"; then
9141  ac_cv_prog_DSYMUTIL="$DSYMUTIL" # Let the user override the test.
9142else
9143as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9144for as_dir in $PATH
9145do
9146  IFS=$as_save_IFS
9147  test -z "$as_dir" && as_dir=.
9148    for ac_exec_ext in '' $ac_executable_extensions; do
9149  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9150    ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil"
9151    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9152    break 2
9153  fi
9154done
9155  done
9156IFS=$as_save_IFS
9157
9158fi
9159fi
9160DSYMUTIL=$ac_cv_prog_DSYMUTIL
9161if test -n "$DSYMUTIL"; then
9162  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
9163$as_echo "$DSYMUTIL" >&6; }
9164else
9165  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9166$as_echo "no" >&6; }
9167fi
9168
9169
9170fi
9171if test -z "$ac_cv_prog_DSYMUTIL"; then
9172  ac_ct_DSYMUTIL=$DSYMUTIL
9173  # Extract the first word of "dsymutil", so it can be a program name with args.
9174set dummy dsymutil; ac_word=$2
9175{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9176$as_echo_n "checking for $ac_word... " >&6; }
9177if ${ac_cv_prog_ac_ct_DSYMUTIL+:} false; then :
9178  $as_echo_n "(cached) " >&6
9179else
9180  if test -n "$ac_ct_DSYMUTIL"; then
9181  ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # Let the user override the test.
9182else
9183as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9184for as_dir in $PATH
9185do
9186  IFS=$as_save_IFS
9187  test -z "$as_dir" && as_dir=.
9188    for ac_exec_ext in '' $ac_executable_extensions; do
9189  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9190    ac_cv_prog_ac_ct_DSYMUTIL="dsymutil"
9191    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9192    break 2
9193  fi
9194done
9195  done
9196IFS=$as_save_IFS
9197
9198fi
9199fi
9200ac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL
9201if test -n "$ac_ct_DSYMUTIL"; then
9202  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DSYMUTIL" >&5
9203$as_echo "$ac_ct_DSYMUTIL" >&6; }
9204else
9205  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9206$as_echo "no" >&6; }
9207fi
9208
9209  if test "x$ac_ct_DSYMUTIL" = x; then
9210    DSYMUTIL=":"
9211  else
9212    case $cross_compiling:$ac_tool_warned in
9213yes:)
9214{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9215$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9216ac_tool_warned=yes ;;
9217esac
9218    DSYMUTIL=$ac_ct_DSYMUTIL
9219  fi
9220else
9221  DSYMUTIL="$ac_cv_prog_DSYMUTIL"
9222fi
9223
9224    if test -n "$ac_tool_prefix"; then
9225  # Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args.
9226set dummy ${ac_tool_prefix}nmedit; ac_word=$2
9227{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9228$as_echo_n "checking for $ac_word... " >&6; }
9229if ${ac_cv_prog_NMEDIT+:} false; then :
9230  $as_echo_n "(cached) " >&6
9231else
9232  if test -n "$NMEDIT"; then
9233  ac_cv_prog_NMEDIT="$NMEDIT" # Let the user override the test.
9234else
9235as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9236for as_dir in $PATH
9237do
9238  IFS=$as_save_IFS
9239  test -z "$as_dir" && as_dir=.
9240    for ac_exec_ext in '' $ac_executable_extensions; do
9241  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9242    ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit"
9243    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9244    break 2
9245  fi
9246done
9247  done
9248IFS=$as_save_IFS
9249
9250fi
9251fi
9252NMEDIT=$ac_cv_prog_NMEDIT
9253if test -n "$NMEDIT"; then
9254  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NMEDIT" >&5
9255$as_echo "$NMEDIT" >&6; }
9256else
9257  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9258$as_echo "no" >&6; }
9259fi
9260
9261
9262fi
9263if test -z "$ac_cv_prog_NMEDIT"; then
9264  ac_ct_NMEDIT=$NMEDIT
9265  # Extract the first word of "nmedit", so it can be a program name with args.
9266set dummy nmedit; ac_word=$2
9267{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9268$as_echo_n "checking for $ac_word... " >&6; }
9269if ${ac_cv_prog_ac_ct_NMEDIT+:} false; then :
9270  $as_echo_n "(cached) " >&6
9271else
9272  if test -n "$ac_ct_NMEDIT"; then
9273  ac_cv_prog_ac_ct_NMEDIT="$ac_ct_NMEDIT" # Let the user override the test.
9274else
9275as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9276for as_dir in $PATH
9277do
9278  IFS=$as_save_IFS
9279  test -z "$as_dir" && as_dir=.
9280    for ac_exec_ext in '' $ac_executable_extensions; do
9281  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9282    ac_cv_prog_ac_ct_NMEDIT="nmedit"
9283    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9284    break 2
9285  fi
9286done
9287  done
9288IFS=$as_save_IFS
9289
9290fi
9291fi
9292ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT
9293if test -n "$ac_ct_NMEDIT"; then
9294  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NMEDIT" >&5
9295$as_echo "$ac_ct_NMEDIT" >&6; }
9296else
9297  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9298$as_echo "no" >&6; }
9299fi
9300
9301  if test "x$ac_ct_NMEDIT" = x; then
9302    NMEDIT=":"
9303  else
9304    case $cross_compiling:$ac_tool_warned in
9305yes:)
9306{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9307$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9308ac_tool_warned=yes ;;
9309esac
9310    NMEDIT=$ac_ct_NMEDIT
9311  fi
9312else
9313  NMEDIT="$ac_cv_prog_NMEDIT"
9314fi
9315
9316    if test -n "$ac_tool_prefix"; then
9317  # Extract the first word of "${ac_tool_prefix}lipo", so it can be a program name with args.
9318set dummy ${ac_tool_prefix}lipo; ac_word=$2
9319{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9320$as_echo_n "checking for $ac_word... " >&6; }
9321if ${ac_cv_prog_LIPO+:} false; then :
9322  $as_echo_n "(cached) " >&6
9323else
9324  if test -n "$LIPO"; then
9325  ac_cv_prog_LIPO="$LIPO" # Let the user override the test.
9326else
9327as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9328for as_dir in $PATH
9329do
9330  IFS=$as_save_IFS
9331  test -z "$as_dir" && as_dir=.
9332    for ac_exec_ext in '' $ac_executable_extensions; do
9333  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9334    ac_cv_prog_LIPO="${ac_tool_prefix}lipo"
9335    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9336    break 2
9337  fi
9338done
9339  done
9340IFS=$as_save_IFS
9341
9342fi
9343fi
9344LIPO=$ac_cv_prog_LIPO
9345if test -n "$LIPO"; then
9346  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
9347$as_echo "$LIPO" >&6; }
9348else
9349  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9350$as_echo "no" >&6; }
9351fi
9352
9353
9354fi
9355if test -z "$ac_cv_prog_LIPO"; then
9356  ac_ct_LIPO=$LIPO
9357  # Extract the first word of "lipo", so it can be a program name with args.
9358set dummy lipo; ac_word=$2
9359{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9360$as_echo_n "checking for $ac_word... " >&6; }
9361if ${ac_cv_prog_ac_ct_LIPO+:} false; then :
9362  $as_echo_n "(cached) " >&6
9363else
9364  if test -n "$ac_ct_LIPO"; then
9365  ac_cv_prog_ac_ct_LIPO="$ac_ct_LIPO" # Let the user override the test.
9366else
9367as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9368for as_dir in $PATH
9369do
9370  IFS=$as_save_IFS
9371  test -z "$as_dir" && as_dir=.
9372    for ac_exec_ext in '' $ac_executable_extensions; do
9373  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9374    ac_cv_prog_ac_ct_LIPO="lipo"
9375    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9376    break 2
9377  fi
9378done
9379  done
9380IFS=$as_save_IFS
9381
9382fi
9383fi
9384ac_ct_LIPO=$ac_cv_prog_ac_ct_LIPO
9385if test -n "$ac_ct_LIPO"; then
9386  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LIPO" >&5
9387$as_echo "$ac_ct_LIPO" >&6; }
9388else
9389  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9390$as_echo "no" >&6; }
9391fi
9392
9393  if test "x$ac_ct_LIPO" = x; then
9394    LIPO=":"
9395  else
9396    case $cross_compiling:$ac_tool_warned in
9397yes:)
9398{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9399$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9400ac_tool_warned=yes ;;
9401esac
9402    LIPO=$ac_ct_LIPO
9403  fi
9404else
9405  LIPO="$ac_cv_prog_LIPO"
9406fi
9407
9408    if test -n "$ac_tool_prefix"; then
9409  # Extract the first word of "${ac_tool_prefix}otool", so it can be a program name with args.
9410set dummy ${ac_tool_prefix}otool; ac_word=$2
9411{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9412$as_echo_n "checking for $ac_word... " >&6; }
9413if ${ac_cv_prog_OTOOL+:} false; then :
9414  $as_echo_n "(cached) " >&6
9415else
9416  if test -n "$OTOOL"; then
9417  ac_cv_prog_OTOOL="$OTOOL" # Let the user override the test.
9418else
9419as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9420for as_dir in $PATH
9421do
9422  IFS=$as_save_IFS
9423  test -z "$as_dir" && as_dir=.
9424    for ac_exec_ext in '' $ac_executable_extensions; do
9425  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9426    ac_cv_prog_OTOOL="${ac_tool_prefix}otool"
9427    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9428    break 2
9429  fi
9430done
9431  done
9432IFS=$as_save_IFS
9433
9434fi
9435fi
9436OTOOL=$ac_cv_prog_OTOOL
9437if test -n "$OTOOL"; then
9438  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
9439$as_echo "$OTOOL" >&6; }
9440else
9441  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9442$as_echo "no" >&6; }
9443fi
9444
9445
9446fi
9447if test -z "$ac_cv_prog_OTOOL"; then
9448  ac_ct_OTOOL=$OTOOL
9449  # Extract the first word of "otool", so it can be a program name with args.
9450set dummy otool; ac_word=$2
9451{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9452$as_echo_n "checking for $ac_word... " >&6; }
9453if ${ac_cv_prog_ac_ct_OTOOL+:} false; then :
9454  $as_echo_n "(cached) " >&6
9455else
9456  if test -n "$ac_ct_OTOOL"; then
9457  ac_cv_prog_ac_ct_OTOOL="$ac_ct_OTOOL" # Let the user override the test.
9458else
9459as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9460for as_dir in $PATH
9461do
9462  IFS=$as_save_IFS
9463  test -z "$as_dir" && as_dir=.
9464    for ac_exec_ext in '' $ac_executable_extensions; do
9465  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9466    ac_cv_prog_ac_ct_OTOOL="otool"
9467    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9468    break 2
9469  fi
9470done
9471  done
9472IFS=$as_save_IFS
9473
9474fi
9475fi
9476ac_ct_OTOOL=$ac_cv_prog_ac_ct_OTOOL
9477if test -n "$ac_ct_OTOOL"; then
9478  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL" >&5
9479$as_echo "$ac_ct_OTOOL" >&6; }
9480else
9481  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9482$as_echo "no" >&6; }
9483fi
9484
9485  if test "x$ac_ct_OTOOL" = x; then
9486    OTOOL=":"
9487  else
9488    case $cross_compiling:$ac_tool_warned in
9489yes:)
9490{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9491$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9492ac_tool_warned=yes ;;
9493esac
9494    OTOOL=$ac_ct_OTOOL
9495  fi
9496else
9497  OTOOL="$ac_cv_prog_OTOOL"
9498fi
9499
9500    if test -n "$ac_tool_prefix"; then
9501  # Extract the first word of "${ac_tool_prefix}otool64", so it can be a program name with args.
9502set dummy ${ac_tool_prefix}otool64; ac_word=$2
9503{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9504$as_echo_n "checking for $ac_word... " >&6; }
9505if ${ac_cv_prog_OTOOL64+:} false; then :
9506  $as_echo_n "(cached) " >&6
9507else
9508  if test -n "$OTOOL64"; then
9509  ac_cv_prog_OTOOL64="$OTOOL64" # Let the user override the test.
9510else
9511as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9512for as_dir in $PATH
9513do
9514  IFS=$as_save_IFS
9515  test -z "$as_dir" && as_dir=.
9516    for ac_exec_ext in '' $ac_executable_extensions; do
9517  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9518    ac_cv_prog_OTOOL64="${ac_tool_prefix}otool64"
9519    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9520    break 2
9521  fi
9522done
9523  done
9524IFS=$as_save_IFS
9525
9526fi
9527fi
9528OTOOL64=$ac_cv_prog_OTOOL64
9529if test -n "$OTOOL64"; then
9530  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL64" >&5
9531$as_echo "$OTOOL64" >&6; }
9532else
9533  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9534$as_echo "no" >&6; }
9535fi
9536
9537
9538fi
9539if test -z "$ac_cv_prog_OTOOL64"; then
9540  ac_ct_OTOOL64=$OTOOL64
9541  # Extract the first word of "otool64", so it can be a program name with args.
9542set dummy otool64; ac_word=$2
9543{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9544$as_echo_n "checking for $ac_word... " >&6; }
9545if ${ac_cv_prog_ac_ct_OTOOL64+:} false; then :
9546  $as_echo_n "(cached) " >&6
9547else
9548  if test -n "$ac_ct_OTOOL64"; then
9549  ac_cv_prog_ac_ct_OTOOL64="$ac_ct_OTOOL64" # Let the user override the test.
9550else
9551as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9552for as_dir in $PATH
9553do
9554  IFS=$as_save_IFS
9555  test -z "$as_dir" && as_dir=.
9556    for ac_exec_ext in '' $ac_executable_extensions; do
9557  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9558    ac_cv_prog_ac_ct_OTOOL64="otool64"
9559    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9560    break 2
9561  fi
9562done
9563  done
9564IFS=$as_save_IFS
9565
9566fi
9567fi
9568ac_ct_OTOOL64=$ac_cv_prog_ac_ct_OTOOL64
9569if test -n "$ac_ct_OTOOL64"; then
9570  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL64" >&5
9571$as_echo "$ac_ct_OTOOL64" >&6; }
9572else
9573  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9574$as_echo "no" >&6; }
9575fi
9576
9577  if test "x$ac_ct_OTOOL64" = x; then
9578    OTOOL64=":"
9579  else
9580    case $cross_compiling:$ac_tool_warned in
9581yes:)
9582{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9583$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9584ac_tool_warned=yes ;;
9585esac
9586    OTOOL64=$ac_ct_OTOOL64
9587  fi
9588else
9589  OTOOL64="$ac_cv_prog_OTOOL64"
9590fi
9591
9592
9593
9594
9595
9596
9597
9598
9599
9600
9601
9602
9603
9604
9605
9606
9607
9608
9609
9610
9611
9612
9613
9614
9615
9616
9617
9618    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -single_module linker flag" >&5
9619$as_echo_n "checking for -single_module linker flag... " >&6; }
9620if ${lt_cv_apple_cc_single_mod+:} false; then :
9621  $as_echo_n "(cached) " >&6
9622else
9623  lt_cv_apple_cc_single_mod=no
9624      if test -z "$LT_MULTI_MODULE"; then
9625	# By default we will add the -single_module flag. You can override
9626	# by either setting the environment variable LT_MULTI_MODULE
9627	# non-empty at configure time, or by adding -multi_module to the
9628	# link flags.
9629	rm -rf libconftest.dylib*
9630	echo "int foo(void){return 1;}" > conftest.c
9631	echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
9632-dynamiclib -Wl,-single_module conftest.c" >&5
9633	$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
9634	  -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
9635        _lt_result=$?
9636	# If there is a non-empty error log, and "single_module"
9637	# appears in it, assume the flag caused a linker warning
9638        if test -s conftest.err && $GREP single_module conftest.err; then
9639	  cat conftest.err >&5
9640	# Otherwise, if the output was created with a 0 exit code from
9641	# the compiler, it worked.
9642	elif test -f libconftest.dylib && test 0 = "$_lt_result"; then
9643	  lt_cv_apple_cc_single_mod=yes
9644	else
9645	  cat conftest.err >&5
9646	fi
9647	rm -rf libconftest.dylib*
9648	rm -f conftest.*
9649      fi
9650fi
9651{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5
9652$as_echo "$lt_cv_apple_cc_single_mod" >&6; }
9653
9654    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5
9655$as_echo_n "checking for -exported_symbols_list linker flag... " >&6; }
9656if ${lt_cv_ld_exported_symbols_list+:} false; then :
9657  $as_echo_n "(cached) " >&6
9658else
9659  lt_cv_ld_exported_symbols_list=no
9660      save_LDFLAGS=$LDFLAGS
9661      echo "_main" > conftest.sym
9662      LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
9663      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9664/* end confdefs.h.  */
9665
9666int
9667main ()
9668{
9669
9670  ;
9671  return 0;
9672}
9673_ACEOF
9674if ac_fn_c_try_link "$LINENO"; then :
9675  lt_cv_ld_exported_symbols_list=yes
9676else
9677  lt_cv_ld_exported_symbols_list=no
9678fi
9679rm -f core conftest.err conftest.$ac_objext \
9680    conftest$ac_exeext conftest.$ac_ext
9681	LDFLAGS=$save_LDFLAGS
9682
9683fi
9684{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5
9685$as_echo "$lt_cv_ld_exported_symbols_list" >&6; }
9686
9687    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -force_load linker flag" >&5
9688$as_echo_n "checking for -force_load linker flag... " >&6; }
9689if ${lt_cv_ld_force_load+:} false; then :
9690  $as_echo_n "(cached) " >&6
9691else
9692  lt_cv_ld_force_load=no
9693      cat > conftest.c << _LT_EOF
9694int forced_loaded() { return 2;}
9695_LT_EOF
9696      echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&5
9697      $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5
9698      echo "$AR cru libconftest.a conftest.o" >&5
9699      $AR cru libconftest.a conftest.o 2>&5
9700      echo "$RANLIB libconftest.a" >&5
9701      $RANLIB libconftest.a 2>&5
9702      cat > conftest.c << _LT_EOF
9703int main() { return 0;}
9704_LT_EOF
9705      echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&5
9706      $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err
9707      _lt_result=$?
9708      if test -s conftest.err && $GREP force_load conftest.err; then
9709	cat conftest.err >&5
9710      elif test -f conftest && test 0 = "$_lt_result" && $GREP forced_load conftest >/dev/null 2>&1; then
9711	lt_cv_ld_force_load=yes
9712      else
9713	cat conftest.err >&5
9714      fi
9715        rm -f conftest.err libconftest.a conftest conftest.c
9716        rm -rf conftest.dSYM
9717
9718fi
9719{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_force_load" >&5
9720$as_echo "$lt_cv_ld_force_load" >&6; }
9721    case $host_os in
9722    rhapsody* | darwin1.[012])
9723      _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;;
9724    darwin1.*)
9725      _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
9726    darwin*) # darwin 5.x on
9727      # if running on 10.5 or later, the deployment target defaults
9728      # to the OS version, if on x86, and 10.4, the deployment
9729      # target defaults to 10.4. Don't you love it?
9730      case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
9731	10.0,*86*-darwin8*|10.0,*-darwin[91]*)
9732	  _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
9733	10.[012]*)
9734	  _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
9735	10.*)
9736	  _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
9737      esac
9738    ;;
9739  esac
9740    if test yes = "$lt_cv_apple_cc_single_mod"; then
9741      _lt_dar_single_mod='$single_module'
9742    fi
9743    if test yes = "$lt_cv_ld_exported_symbols_list"; then
9744      _lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym'
9745    else
9746      _lt_dar_export_syms='~$NMEDIT -s $output_objdir/$libname-symbols.expsym $lib'
9747    fi
9748    if test : != "$DSYMUTIL" && test no = "$lt_cv_ld_force_load"; then
9749      _lt_dsymutil='~$DSYMUTIL $lib || :'
9750    else
9751      _lt_dsymutil=
9752    fi
9753    ;;
9754  esac
9755
9756for ac_header in dlfcn.h
9757do :
9758  ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default
9759"
9760if test "x$ac_cv_header_dlfcn_h" = xyes; then :
9761  cat >>confdefs.h <<_ACEOF
9762#define HAVE_DLFCN_H 1
9763_ACEOF
9764
9765fi
9766
9767done
9768
9769
9770
9771
9772
9773
9774
9775# Set options
9776
9777
9778
9779        enable_dlopen=no
9780
9781
9782  enable_win32_dll=no
9783
9784
9785            # Check whether --enable-shared was given.
9786if test "${enable_shared+set}" = set; then :
9787  enableval=$enable_shared; p=${PACKAGE-default}
9788    case $enableval in
9789    yes) enable_shared=yes ;;
9790    no) enable_shared=no ;;
9791    *)
9792      enable_shared=no
9793      # Look at the argument we got.  We use all the common list separators.
9794      lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
9795      for pkg in $enableval; do
9796	IFS=$lt_save_ifs
9797	if test "X$pkg" = "X$p"; then
9798	  enable_shared=yes
9799	fi
9800      done
9801      IFS=$lt_save_ifs
9802      ;;
9803    esac
9804else
9805  enable_shared=yes
9806fi
9807
9808
9809
9810
9811
9812
9813
9814
9815
9816  # Check whether --enable-static was given.
9817if test "${enable_static+set}" = set; then :
9818  enableval=$enable_static; p=${PACKAGE-default}
9819    case $enableval in
9820    yes) enable_static=yes ;;
9821    no) enable_static=no ;;
9822    *)
9823     enable_static=no
9824      # Look at the argument we got.  We use all the common list separators.
9825      lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
9826      for pkg in $enableval; do
9827	IFS=$lt_save_ifs
9828	if test "X$pkg" = "X$p"; then
9829	  enable_static=yes
9830	fi
9831      done
9832      IFS=$lt_save_ifs
9833      ;;
9834    esac
9835else
9836  enable_static=yes
9837fi
9838
9839
9840
9841
9842
9843
9844
9845
9846
9847
9848# Check whether --with-pic was given.
9849if test "${with_pic+set}" = set; then :
9850  withval=$with_pic; lt_p=${PACKAGE-default}
9851    case $withval in
9852    yes|no) pic_mode=$withval ;;
9853    *)
9854      pic_mode=default
9855      # Look at the argument we got.  We use all the common list separators.
9856      lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
9857      for lt_pkg in $withval; do
9858	IFS=$lt_save_ifs
9859	if test "X$lt_pkg" = "X$lt_p"; then
9860	  pic_mode=yes
9861	fi
9862      done
9863      IFS=$lt_save_ifs
9864      ;;
9865    esac
9866else
9867  pic_mode=default
9868fi
9869
9870
9871
9872
9873
9874
9875
9876
9877  # Check whether --enable-fast-install was given.
9878if test "${enable_fast_install+set}" = set; then :
9879  enableval=$enable_fast_install; p=${PACKAGE-default}
9880    case $enableval in
9881    yes) enable_fast_install=yes ;;
9882    no) enable_fast_install=no ;;
9883    *)
9884      enable_fast_install=no
9885      # Look at the argument we got.  We use all the common list separators.
9886      lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
9887      for pkg in $enableval; do
9888	IFS=$lt_save_ifs
9889	if test "X$pkg" = "X$p"; then
9890	  enable_fast_install=yes
9891	fi
9892      done
9893      IFS=$lt_save_ifs
9894      ;;
9895    esac
9896else
9897  enable_fast_install=yes
9898fi
9899
9900
9901
9902
9903
9904
9905
9906
9907
9908
9909
9910# This can be used to rebuild libtool when needed
9911LIBTOOL_DEPS=$ltmain
9912
9913# Always use our own libtool.
9914LIBTOOL='$(SHELL) $(top_builddir)/libtool'
9915
9916
9917
9918
9919
9920
9921
9922
9923
9924
9925
9926
9927
9928
9929
9930
9931
9932
9933
9934
9935
9936
9937
9938
9939
9940
9941
9942
9943
9944
9945test -z "$LN_S" && LN_S="ln -s"
9946
9947
9948
9949
9950
9951
9952
9953
9954
9955
9956
9957
9958
9959
9960if test -n "${ZSH_VERSION+set}"; then
9961   setopt NO_GLOB_SUBST
9962fi
9963
9964{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5
9965$as_echo_n "checking for objdir... " >&6; }
9966if ${lt_cv_objdir+:} false; then :
9967  $as_echo_n "(cached) " >&6
9968else
9969  rm -f .libs 2>/dev/null
9970mkdir .libs 2>/dev/null
9971if test -d .libs; then
9972  lt_cv_objdir=.libs
9973else
9974  # MS-DOS does not allow filenames that begin with a dot.
9975  lt_cv_objdir=_libs
9976fi
9977rmdir .libs 2>/dev/null
9978fi
9979{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_objdir" >&5
9980$as_echo "$lt_cv_objdir" >&6; }
9981objdir=$lt_cv_objdir
9982
9983
9984
9985
9986
9987cat >>confdefs.h <<_ACEOF
9988#define LT_OBJDIR "$lt_cv_objdir/"
9989_ACEOF
9990
9991
9992
9993
9994case $host_os in
9995aix3*)
9996  # AIX sometimes has problems with the GCC collect2 program.  For some
9997  # reason, if we set the COLLECT_NAMES environment variable, the problems
9998  # vanish in a puff of smoke.
9999  if test set != "${COLLECT_NAMES+set}"; then
10000    COLLECT_NAMES=
10001    export COLLECT_NAMES
10002  fi
10003  ;;
10004esac
10005
10006# Global variables:
10007ofile=libtool
10008can_build_shared=yes
10009
10010# All known linkers require a '.a' archive for static linking (except MSVC,
10011# which needs '.lib').
10012libext=a
10013
10014with_gnu_ld=$lt_cv_prog_gnu_ld
10015
10016old_CC=$CC
10017old_CFLAGS=$CFLAGS
10018
10019# Set sane defaults for various variables
10020test -z "$CC" && CC=cc
10021test -z "$LTCC" && LTCC=$CC
10022test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
10023test -z "$LD" && LD=ld
10024test -z "$ac_objext" && ac_objext=o
10025
10026for cc_temp in $compiler""; do
10027  case $cc_temp in
10028    compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
10029    distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
10030    \-*) ;;
10031    *) break;;
10032  esac
10033done
10034cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
10035
10036
10037# Only perform the check for file, if the check method requires it
10038test -z "$MAGIC_CMD" && MAGIC_CMD=file
10039case $deplibs_check_method in
10040file_magic*)
10041  if test "$file_magic_cmd" = '$MAGIC_CMD'; then
10042    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5
10043$as_echo_n "checking for ${ac_tool_prefix}file... " >&6; }
10044if ${lt_cv_path_MAGIC_CMD+:} false; then :
10045  $as_echo_n "(cached) " >&6
10046else
10047  case $MAGIC_CMD in
10048[\\/*] |  ?:[\\/]*)
10049  lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path.
10050  ;;
10051*)
10052  lt_save_MAGIC_CMD=$MAGIC_CMD
10053  lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
10054  ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
10055  for ac_dir in $ac_dummy; do
10056    IFS=$lt_save_ifs
10057    test -z "$ac_dir" && ac_dir=.
10058    if test -f "$ac_dir/${ac_tool_prefix}file"; then
10059      lt_cv_path_MAGIC_CMD=$ac_dir/"${ac_tool_prefix}file"
10060      if test -n "$file_magic_test_file"; then
10061	case $deplibs_check_method in
10062	"file_magic "*)
10063	  file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
10064	  MAGIC_CMD=$lt_cv_path_MAGIC_CMD
10065	  if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
10066	    $EGREP "$file_magic_regex" > /dev/null; then
10067	    :
10068	  else
10069	    cat <<_LT_EOF 1>&2
10070
10071*** Warning: the command libtool uses to detect shared libraries,
10072*** $file_magic_cmd, produces output that libtool cannot recognize.
10073*** The result is that libtool may fail to recognize shared libraries
10074*** as such.  This will affect the creation of libtool libraries that
10075*** depend on shared libraries, but programs linked with such libtool
10076*** libraries will work regardless of this problem.  Nevertheless, you
10077*** may want to report the problem to your system manager and/or to
10078*** bug-libtool@gnu.org
10079
10080_LT_EOF
10081	  fi ;;
10082	esac
10083      fi
10084      break
10085    fi
10086  done
10087  IFS=$lt_save_ifs
10088  MAGIC_CMD=$lt_save_MAGIC_CMD
10089  ;;
10090esac
10091fi
10092
10093MAGIC_CMD=$lt_cv_path_MAGIC_CMD
10094if test -n "$MAGIC_CMD"; then
10095  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5
10096$as_echo "$MAGIC_CMD" >&6; }
10097else
10098  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10099$as_echo "no" >&6; }
10100fi
10101
10102
10103
10104
10105
10106if test -z "$lt_cv_path_MAGIC_CMD"; then
10107  if test -n "$ac_tool_prefix"; then
10108    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for file" >&5
10109$as_echo_n "checking for file... " >&6; }
10110if ${lt_cv_path_MAGIC_CMD+:} false; then :
10111  $as_echo_n "(cached) " >&6
10112else
10113  case $MAGIC_CMD in
10114[\\/*] |  ?:[\\/]*)
10115  lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path.
10116  ;;
10117*)
10118  lt_save_MAGIC_CMD=$MAGIC_CMD
10119  lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
10120  ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
10121  for ac_dir in $ac_dummy; do
10122    IFS=$lt_save_ifs
10123    test -z "$ac_dir" && ac_dir=.
10124    if test -f "$ac_dir/file"; then
10125      lt_cv_path_MAGIC_CMD=$ac_dir/"file"
10126      if test -n "$file_magic_test_file"; then
10127	case $deplibs_check_method in
10128	"file_magic "*)
10129	  file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
10130	  MAGIC_CMD=$lt_cv_path_MAGIC_CMD
10131	  if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
10132	    $EGREP "$file_magic_regex" > /dev/null; then
10133	    :
10134	  else
10135	    cat <<_LT_EOF 1>&2
10136
10137*** Warning: the command libtool uses to detect shared libraries,
10138*** $file_magic_cmd, produces output that libtool cannot recognize.
10139*** The result is that libtool may fail to recognize shared libraries
10140*** as such.  This will affect the creation of libtool libraries that
10141*** depend on shared libraries, but programs linked with such libtool
10142*** libraries will work regardless of this problem.  Nevertheless, you
10143*** may want to report the problem to your system manager and/or to
10144*** bug-libtool@gnu.org
10145
10146_LT_EOF
10147	  fi ;;
10148	esac
10149      fi
10150      break
10151    fi
10152  done
10153  IFS=$lt_save_ifs
10154  MAGIC_CMD=$lt_save_MAGIC_CMD
10155  ;;
10156esac
10157fi
10158
10159MAGIC_CMD=$lt_cv_path_MAGIC_CMD
10160if test -n "$MAGIC_CMD"; then
10161  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5
10162$as_echo "$MAGIC_CMD" >&6; }
10163else
10164  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10165$as_echo "no" >&6; }
10166fi
10167
10168
10169  else
10170    MAGIC_CMD=:
10171  fi
10172fi
10173
10174  fi
10175  ;;
10176esac
10177
10178# Use C for the default configuration in the libtool script
10179
10180lt_save_CC=$CC
10181ac_ext=c
10182ac_cpp='$CPP $CPPFLAGS'
10183ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
10184ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
10185ac_compiler_gnu=$ac_cv_c_compiler_gnu
10186
10187
10188# Source file extension for C test sources.
10189ac_ext=c
10190
10191# Object file extension for compiled C test sources.
10192objext=o
10193objext=$objext
10194
10195# Code to be used in simple compile tests
10196lt_simple_compile_test_code="int some_variable = 0;"
10197
10198# Code to be used in simple link tests
10199lt_simple_link_test_code='int main(){return(0);}'
10200
10201
10202
10203
10204
10205
10206
10207# If no C compiler was specified, use CC.
10208LTCC=${LTCC-"$CC"}
10209
10210# If no C compiler flags were specified, use CFLAGS.
10211LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
10212
10213# Allow CC to be a program name with arguments.
10214compiler=$CC
10215
10216# Save the default compiler, since it gets overwritten when the other
10217# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
10218compiler_DEFAULT=$CC
10219
10220# save warnings/boilerplate of simple test code
10221ac_outfile=conftest.$ac_objext
10222echo "$lt_simple_compile_test_code" >conftest.$ac_ext
10223eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
10224_lt_compiler_boilerplate=`cat conftest.err`
10225$RM conftest*
10226
10227ac_outfile=conftest.$ac_objext
10228echo "$lt_simple_link_test_code" >conftest.$ac_ext
10229eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
10230_lt_linker_boilerplate=`cat conftest.err`
10231$RM -r conftest*
10232
10233
10234if test -n "$compiler"; then
10235
10236lt_prog_compiler_no_builtin_flag=
10237
10238if test yes = "$GCC"; then
10239  case $cc_basename in
10240  nvcc*)
10241    lt_prog_compiler_no_builtin_flag=' -Xcompiler -fno-builtin' ;;
10242  *)
10243    lt_prog_compiler_no_builtin_flag=' -fno-builtin' ;;
10244  esac
10245
10246  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
10247$as_echo_n "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; }
10248if ${lt_cv_prog_compiler_rtti_exceptions+:} false; then :
10249  $as_echo_n "(cached) " >&6
10250else
10251  lt_cv_prog_compiler_rtti_exceptions=no
10252   ac_outfile=conftest.$ac_objext
10253   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
10254   lt_compiler_flag="-fno-rtti -fno-exceptions"  ## exclude from sc_useless_quotes_in_assignment
10255   # Insert the option either (1) after the last *FLAGS variable, or
10256   # (2) before a word containing "conftest.", or (3) at the end.
10257   # Note that $ac_compile itself does not contain backslashes and begins
10258   # with a dollar sign (not a hyphen), so the echo should work correctly.
10259   # The option is referenced via a variable to avoid confusing sed.
10260   lt_compile=`echo "$ac_compile" | $SED \
10261   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
10262   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
10263   -e 's:$: $lt_compiler_flag:'`
10264   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
10265   (eval "$lt_compile" 2>conftest.err)
10266   ac_status=$?
10267   cat conftest.err >&5
10268   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10269   if (exit $ac_status) && test -s "$ac_outfile"; then
10270     # The compiler can only warn and ignore the option if not recognized
10271     # So say no if there are warnings other than the usual output.
10272     $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
10273     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
10274     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
10275       lt_cv_prog_compiler_rtti_exceptions=yes
10276     fi
10277   fi
10278   $RM conftest*
10279
10280fi
10281{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5
10282$as_echo "$lt_cv_prog_compiler_rtti_exceptions" >&6; }
10283
10284if test yes = "$lt_cv_prog_compiler_rtti_exceptions"; then
10285    lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions"
10286else
10287    :
10288fi
10289
10290fi
10291
10292
10293
10294
10295
10296
10297  lt_prog_compiler_wl=
10298lt_prog_compiler_pic=
10299lt_prog_compiler_static=
10300
10301
10302  if test yes = "$GCC"; then
10303    lt_prog_compiler_wl='-Wl,'
10304    lt_prog_compiler_static='-static'
10305
10306    case $host_os in
10307      aix*)
10308      # All AIX code is PIC.
10309      if test ia64 = "$host_cpu"; then
10310	# AIX 5 now supports IA64 processor
10311	lt_prog_compiler_static='-Bstatic'
10312      fi
10313      lt_prog_compiler_pic='-fPIC'
10314      ;;
10315
10316    amigaos*)
10317      case $host_cpu in
10318      powerpc)
10319            # see comment about AmigaOS4 .so support
10320            lt_prog_compiler_pic='-fPIC'
10321        ;;
10322      m68k)
10323            # FIXME: we need at least 68020 code to build shared libraries, but
10324            # adding the '-m68020' flag to GCC prevents building anything better,
10325            # like '-m68040'.
10326            lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4'
10327        ;;
10328      esac
10329      ;;
10330
10331    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
10332      # PIC is the default for these OSes.
10333      ;;
10334
10335    mingw* | cygwin* | pw32* | os2* | cegcc*)
10336      # This hack is so that the source file can tell whether it is being
10337      # built for inclusion in a dll (and should export symbols for example).
10338      # Although the cygwin gcc ignores -fPIC, still need this for old-style
10339      # (--disable-auto-import) libraries
10340      lt_prog_compiler_pic='-DDLL_EXPORT'
10341      ;;
10342
10343    darwin* | rhapsody*)
10344      # PIC is the default on this platform
10345      # Common symbols not allowed in MH_DYLIB files
10346      lt_prog_compiler_pic='-fno-common'
10347      ;;
10348
10349    haiku*)
10350      # PIC is the default for Haiku.
10351      # The "-static" flag exists, but is broken.
10352      lt_prog_compiler_static=
10353      ;;
10354
10355    hpux*)
10356      # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
10357      # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
10358      # sets the default TLS model and affects inlining.
10359      case $host_cpu in
10360      hppa*64*)
10361	# +Z the default
10362	;;
10363      *)
10364	lt_prog_compiler_pic='-fPIC'
10365	;;
10366      esac
10367      ;;
10368
10369    interix[3-9]*)
10370      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
10371      # Instead, we relocate shared libraries at runtime.
10372      ;;
10373
10374    msdosdjgpp*)
10375      # Just because we use GCC doesn't mean we suddenly get shared libraries
10376      # on systems that don't support them.
10377      lt_prog_compiler_can_build_shared=no
10378      enable_shared=no
10379      ;;
10380
10381    *nto* | *qnx*)
10382      # QNX uses GNU C++, but need to define -shared option too, otherwise
10383      # it will coredump.
10384      lt_prog_compiler_pic='-fPIC -shared'
10385      ;;
10386
10387    sysv4*MP*)
10388      if test -d /usr/nec; then
10389	lt_prog_compiler_pic=-Kconform_pic
10390      fi
10391      ;;
10392
10393    *)
10394      lt_prog_compiler_pic='-fPIC'
10395      ;;
10396    esac
10397
10398    case $cc_basename in
10399    nvcc*) # Cuda Compiler Driver 2.2
10400      lt_prog_compiler_wl='-Xlinker '
10401      if test -n "$lt_prog_compiler_pic"; then
10402        lt_prog_compiler_pic="-Xcompiler $lt_prog_compiler_pic"
10403      fi
10404      ;;
10405    esac
10406  else
10407    # PORTME Check for flag to pass linker flags through the system compiler.
10408    case $host_os in
10409    aix*)
10410      lt_prog_compiler_wl='-Wl,'
10411      if test ia64 = "$host_cpu"; then
10412	# AIX 5 now supports IA64 processor
10413	lt_prog_compiler_static='-Bstatic'
10414      else
10415	lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp'
10416      fi
10417      ;;
10418
10419    darwin* | rhapsody*)
10420      # PIC is the default on this platform
10421      # Common symbols not allowed in MH_DYLIB files
10422      lt_prog_compiler_pic='-fno-common'
10423      case $cc_basename in
10424      nagfor*)
10425        # NAG Fortran compiler
10426        lt_prog_compiler_wl='-Wl,-Wl,,'
10427        lt_prog_compiler_pic='-PIC'
10428        lt_prog_compiler_static='-Bstatic'
10429        ;;
10430      esac
10431      ;;
10432
10433    mingw* | cygwin* | pw32* | os2* | cegcc*)
10434      # This hack is so that the source file can tell whether it is being
10435      # built for inclusion in a dll (and should export symbols for example).
10436      lt_prog_compiler_pic='-DDLL_EXPORT'
10437      ;;
10438
10439    hpux9* | hpux10* | hpux11*)
10440      lt_prog_compiler_wl='-Wl,'
10441      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
10442      # not for PA HP-UX.
10443      case $host_cpu in
10444      hppa*64*|ia64*)
10445	# +Z the default
10446	;;
10447      *)
10448	lt_prog_compiler_pic='+Z'
10449	;;
10450      esac
10451      # Is there a better lt_prog_compiler_static that works with the bundled CC?
10452      lt_prog_compiler_static='$wl-a ${wl}archive'
10453      ;;
10454
10455    irix5* | irix6* | nonstopux*)
10456      lt_prog_compiler_wl='-Wl,'
10457      # PIC (with -KPIC) is the default.
10458      lt_prog_compiler_static='-non_shared'
10459      ;;
10460
10461    linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
10462      case $cc_basename in
10463      # old Intel for x86_64, which still supported -KPIC.
10464      ecc*)
10465	lt_prog_compiler_wl='-Wl,'
10466	lt_prog_compiler_pic='-KPIC'
10467	lt_prog_compiler_static='-static'
10468        ;;
10469      # icc used to be incompatible with GCC.
10470      # ICC 10 doesn't accept -KPIC any more.
10471      icc* | ifort*)
10472	lt_prog_compiler_wl='-Wl,'
10473	lt_prog_compiler_pic='-fPIC'
10474	lt_prog_compiler_static='-static'
10475        ;;
10476      # Lahey Fortran 8.1.
10477      lf95*)
10478	lt_prog_compiler_wl='-Wl,'
10479	lt_prog_compiler_pic='--shared'
10480	lt_prog_compiler_static='--static'
10481	;;
10482      nagfor*)
10483	# NAG Fortran compiler
10484	lt_prog_compiler_wl='-Wl,-Wl,,'
10485	lt_prog_compiler_pic='-PIC'
10486	lt_prog_compiler_static='-Bstatic'
10487	;;
10488      tcc*)
10489	# Fabrice Bellard et al's Tiny C Compiler
10490	lt_prog_compiler_wl='-Wl,'
10491	lt_prog_compiler_pic='-fPIC'
10492	lt_prog_compiler_static='-static'
10493	;;
10494      pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
10495        # Portland Group compilers (*not* the Pentium gcc compiler,
10496	# which looks to be a dead project)
10497	lt_prog_compiler_wl='-Wl,'
10498	lt_prog_compiler_pic='-fpic'
10499	lt_prog_compiler_static='-Bstatic'
10500        ;;
10501      ccc*)
10502        lt_prog_compiler_wl='-Wl,'
10503        # All Alpha code is PIC.
10504        lt_prog_compiler_static='-non_shared'
10505        ;;
10506      xl* | bgxl* | bgf* | mpixl*)
10507	# IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene
10508	lt_prog_compiler_wl='-Wl,'
10509	lt_prog_compiler_pic='-qpic'
10510	lt_prog_compiler_static='-qstaticlink'
10511	;;
10512      *)
10513	case `$CC -V 2>&1 | sed 5q` in
10514	*Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [1-7].* | *Sun*Fortran*\ 8.[0-3]*)
10515	  # Sun Fortran 8.3 passes all unrecognized flags to the linker
10516	  lt_prog_compiler_pic='-KPIC'
10517	  lt_prog_compiler_static='-Bstatic'
10518	  lt_prog_compiler_wl=''
10519	  ;;
10520	*Sun\ F* | *Sun*Fortran*)
10521	  lt_prog_compiler_pic='-KPIC'
10522	  lt_prog_compiler_static='-Bstatic'
10523	  lt_prog_compiler_wl='-Qoption ld '
10524	  ;;
10525	*Sun\ C*)
10526	  # Sun C 5.9
10527	  lt_prog_compiler_pic='-KPIC'
10528	  lt_prog_compiler_static='-Bstatic'
10529	  lt_prog_compiler_wl='-Wl,'
10530	  ;;
10531        *Intel*\ [CF]*Compiler*)
10532	  lt_prog_compiler_wl='-Wl,'
10533	  lt_prog_compiler_pic='-fPIC'
10534	  lt_prog_compiler_static='-static'
10535	  ;;
10536	*Portland\ Group*)
10537	  lt_prog_compiler_wl='-Wl,'
10538	  lt_prog_compiler_pic='-fpic'
10539	  lt_prog_compiler_static='-Bstatic'
10540	  ;;
10541	esac
10542	;;
10543      esac
10544      ;;
10545
10546    newsos6)
10547      lt_prog_compiler_pic='-KPIC'
10548      lt_prog_compiler_static='-Bstatic'
10549      ;;
10550
10551    *nto* | *qnx*)
10552      # QNX uses GNU C++, but need to define -shared option too, otherwise
10553      # it will coredump.
10554      lt_prog_compiler_pic='-fPIC -shared'
10555      ;;
10556
10557    osf3* | osf4* | osf5*)
10558      lt_prog_compiler_wl='-Wl,'
10559      # All OSF/1 code is PIC.
10560      lt_prog_compiler_static='-non_shared'
10561      ;;
10562
10563    rdos*)
10564      lt_prog_compiler_static='-non_shared'
10565      ;;
10566
10567    solaris*)
10568      lt_prog_compiler_pic='-KPIC'
10569      lt_prog_compiler_static='-Bstatic'
10570      case $cc_basename in
10571      f77* | f90* | f95* | sunf77* | sunf90* | sunf95*)
10572	lt_prog_compiler_wl='-Qoption ld ';;
10573      *)
10574	lt_prog_compiler_wl='-Wl,';;
10575      esac
10576      ;;
10577
10578    sunos4*)
10579      lt_prog_compiler_wl='-Qoption ld '
10580      lt_prog_compiler_pic='-PIC'
10581      lt_prog_compiler_static='-Bstatic'
10582      ;;
10583
10584    sysv4 | sysv4.2uw2* | sysv4.3*)
10585      lt_prog_compiler_wl='-Wl,'
10586      lt_prog_compiler_pic='-KPIC'
10587      lt_prog_compiler_static='-Bstatic'
10588      ;;
10589
10590    sysv4*MP*)
10591      if test -d /usr/nec; then
10592	lt_prog_compiler_pic='-Kconform_pic'
10593	lt_prog_compiler_static='-Bstatic'
10594      fi
10595      ;;
10596
10597    sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
10598      lt_prog_compiler_wl='-Wl,'
10599      lt_prog_compiler_pic='-KPIC'
10600      lt_prog_compiler_static='-Bstatic'
10601      ;;
10602
10603    unicos*)
10604      lt_prog_compiler_wl='-Wl,'
10605      lt_prog_compiler_can_build_shared=no
10606      ;;
10607
10608    uts4*)
10609      lt_prog_compiler_pic='-pic'
10610      lt_prog_compiler_static='-Bstatic'
10611      ;;
10612
10613    *)
10614      lt_prog_compiler_can_build_shared=no
10615      ;;
10616    esac
10617  fi
10618
10619case $host_os in
10620  # For platforms that do not support PIC, -DPIC is meaningless:
10621  *djgpp*)
10622    lt_prog_compiler_pic=
10623    ;;
10624  *)
10625    lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC"
10626    ;;
10627esac
10628
10629{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5
10630$as_echo_n "checking for $compiler option to produce PIC... " >&6; }
10631if ${lt_cv_prog_compiler_pic+:} false; then :
10632  $as_echo_n "(cached) " >&6
10633else
10634  lt_cv_prog_compiler_pic=$lt_prog_compiler_pic
10635fi
10636{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic" >&5
10637$as_echo "$lt_cv_prog_compiler_pic" >&6; }
10638lt_prog_compiler_pic=$lt_cv_prog_compiler_pic
10639
10640#
10641# Check to make sure the PIC flag actually works.
10642#
10643if test -n "$lt_prog_compiler_pic"; then
10644  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5
10645$as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; }
10646if ${lt_cv_prog_compiler_pic_works+:} false; then :
10647  $as_echo_n "(cached) " >&6
10648else
10649  lt_cv_prog_compiler_pic_works=no
10650   ac_outfile=conftest.$ac_objext
10651   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
10652   lt_compiler_flag="$lt_prog_compiler_pic -DPIC"  ## exclude from sc_useless_quotes_in_assignment
10653   # Insert the option either (1) after the last *FLAGS variable, or
10654   # (2) before a word containing "conftest.", or (3) at the end.
10655   # Note that $ac_compile itself does not contain backslashes and begins
10656   # with a dollar sign (not a hyphen), so the echo should work correctly.
10657   # The option is referenced via a variable to avoid confusing sed.
10658   lt_compile=`echo "$ac_compile" | $SED \
10659   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
10660   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
10661   -e 's:$: $lt_compiler_flag:'`
10662   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
10663   (eval "$lt_compile" 2>conftest.err)
10664   ac_status=$?
10665   cat conftest.err >&5
10666   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10667   if (exit $ac_status) && test -s "$ac_outfile"; then
10668     # The compiler can only warn and ignore the option if not recognized
10669     # So say no if there are warnings other than the usual output.
10670     $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
10671     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
10672     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
10673       lt_cv_prog_compiler_pic_works=yes
10674     fi
10675   fi
10676   $RM conftest*
10677
10678fi
10679{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5
10680$as_echo "$lt_cv_prog_compiler_pic_works" >&6; }
10681
10682if test yes = "$lt_cv_prog_compiler_pic_works"; then
10683    case $lt_prog_compiler_pic in
10684     "" | " "*) ;;
10685     *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;;
10686     esac
10687else
10688    lt_prog_compiler_pic=
10689     lt_prog_compiler_can_build_shared=no
10690fi
10691
10692fi
10693
10694
10695
10696
10697
10698
10699
10700
10701
10702
10703
10704#
10705# Check to make sure the static flag actually works.
10706#
10707wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\"
10708{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5
10709$as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; }
10710if ${lt_cv_prog_compiler_static_works+:} false; then :
10711  $as_echo_n "(cached) " >&6
10712else
10713  lt_cv_prog_compiler_static_works=no
10714   save_LDFLAGS=$LDFLAGS
10715   LDFLAGS="$LDFLAGS $lt_tmp_static_flag"
10716   echo "$lt_simple_link_test_code" > conftest.$ac_ext
10717   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
10718     # The linker can only warn and ignore the option if not recognized
10719     # So say no if there are warnings
10720     if test -s conftest.err; then
10721       # Append any errors to the config.log.
10722       cat conftest.err 1>&5
10723       $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
10724       $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
10725       if diff conftest.exp conftest.er2 >/dev/null; then
10726         lt_cv_prog_compiler_static_works=yes
10727       fi
10728     else
10729       lt_cv_prog_compiler_static_works=yes
10730     fi
10731   fi
10732   $RM -r conftest*
10733   LDFLAGS=$save_LDFLAGS
10734
10735fi
10736{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5
10737$as_echo "$lt_cv_prog_compiler_static_works" >&6; }
10738
10739if test yes = "$lt_cv_prog_compiler_static_works"; then
10740    :
10741else
10742    lt_prog_compiler_static=
10743fi
10744
10745
10746
10747
10748
10749
10750
10751  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
10752$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
10753if ${lt_cv_prog_compiler_c_o+:} false; then :
10754  $as_echo_n "(cached) " >&6
10755else
10756  lt_cv_prog_compiler_c_o=no
10757   $RM -r conftest 2>/dev/null
10758   mkdir conftest
10759   cd conftest
10760   mkdir out
10761   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
10762
10763   lt_compiler_flag="-o out/conftest2.$ac_objext"
10764   # Insert the option either (1) after the last *FLAGS variable, or
10765   # (2) before a word containing "conftest.", or (3) at the end.
10766   # Note that $ac_compile itself does not contain backslashes and begins
10767   # with a dollar sign (not a hyphen), so the echo should work correctly.
10768   lt_compile=`echo "$ac_compile" | $SED \
10769   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
10770   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
10771   -e 's:$: $lt_compiler_flag:'`
10772   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
10773   (eval "$lt_compile" 2>out/conftest.err)
10774   ac_status=$?
10775   cat out/conftest.err >&5
10776   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10777   if (exit $ac_status) && test -s out/conftest2.$ac_objext
10778   then
10779     # The compiler can only warn and ignore the option if not recognized
10780     # So say no if there are warnings
10781     $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
10782     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
10783     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
10784       lt_cv_prog_compiler_c_o=yes
10785     fi
10786   fi
10787   chmod u+w . 2>&5
10788   $RM conftest*
10789   # SGI C++ compiler will create directory out/ii_files/ for
10790   # template instantiation
10791   test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
10792   $RM out/* && rmdir out
10793   cd ..
10794   $RM -r conftest
10795   $RM conftest*
10796
10797fi
10798{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5
10799$as_echo "$lt_cv_prog_compiler_c_o" >&6; }
10800
10801
10802
10803
10804
10805
10806  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
10807$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
10808if ${lt_cv_prog_compiler_c_o+:} false; then :
10809  $as_echo_n "(cached) " >&6
10810else
10811  lt_cv_prog_compiler_c_o=no
10812   $RM -r conftest 2>/dev/null
10813   mkdir conftest
10814   cd conftest
10815   mkdir out
10816   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
10817
10818   lt_compiler_flag="-o out/conftest2.$ac_objext"
10819   # Insert the option either (1) after the last *FLAGS variable, or
10820   # (2) before a word containing "conftest.", or (3) at the end.
10821   # Note that $ac_compile itself does not contain backslashes and begins
10822   # with a dollar sign (not a hyphen), so the echo should work correctly.
10823   lt_compile=`echo "$ac_compile" | $SED \
10824   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
10825   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
10826   -e 's:$: $lt_compiler_flag:'`
10827   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
10828   (eval "$lt_compile" 2>out/conftest.err)
10829   ac_status=$?
10830   cat out/conftest.err >&5
10831   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10832   if (exit $ac_status) && test -s out/conftest2.$ac_objext
10833   then
10834     # The compiler can only warn and ignore the option if not recognized
10835     # So say no if there are warnings
10836     $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
10837     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
10838     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
10839       lt_cv_prog_compiler_c_o=yes
10840     fi
10841   fi
10842   chmod u+w . 2>&5
10843   $RM conftest*
10844   # SGI C++ compiler will create directory out/ii_files/ for
10845   # template instantiation
10846   test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
10847   $RM out/* && rmdir out
10848   cd ..
10849   $RM -r conftest
10850   $RM conftest*
10851
10852fi
10853{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5
10854$as_echo "$lt_cv_prog_compiler_c_o" >&6; }
10855
10856
10857
10858
10859hard_links=nottested
10860if test no = "$lt_cv_prog_compiler_c_o" && test no != "$need_locks"; then
10861  # do not overwrite the value of need_locks provided by the user
10862  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5
10863$as_echo_n "checking if we can lock with hard links... " >&6; }
10864  hard_links=yes
10865  $RM conftest*
10866  ln conftest.a conftest.b 2>/dev/null && hard_links=no
10867  touch conftest.a
10868  ln conftest.a conftest.b 2>&5 || hard_links=no
10869  ln conftest.a conftest.b 2>/dev/null && hard_links=no
10870  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5
10871$as_echo "$hard_links" >&6; }
10872  if test no = "$hard_links"; then
10873    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&5
10874$as_echo "$as_me: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&2;}
10875    need_locks=warn
10876  fi
10877else
10878  need_locks=no
10879fi
10880
10881
10882
10883
10884
10885
10886  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5
10887$as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; }
10888
10889  runpath_var=
10890  allow_undefined_flag=
10891  always_export_symbols=no
10892  archive_cmds=
10893  archive_expsym_cmds=
10894  compiler_needs_object=no
10895  enable_shared_with_static_runtimes=no
10896  export_dynamic_flag_spec=
10897  export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
10898  hardcode_automatic=no
10899  hardcode_direct=no
10900  hardcode_direct_absolute=no
10901  hardcode_libdir_flag_spec=
10902  hardcode_libdir_separator=
10903  hardcode_minus_L=no
10904  hardcode_shlibpath_var=unsupported
10905  inherit_rpath=no
10906  link_all_deplibs=unknown
10907  module_cmds=
10908  module_expsym_cmds=
10909  old_archive_from_new_cmds=
10910  old_archive_from_expsyms_cmds=
10911  thread_safe_flag_spec=
10912  whole_archive_flag_spec=
10913  # include_expsyms should be a list of space-separated symbols to be *always*
10914  # included in the symbol list
10915  include_expsyms=
10916  # exclude_expsyms can be an extended regexp of symbols to exclude
10917  # it will be wrapped by ' (' and ')$', so one must not match beginning or
10918  # end of line.  Example: 'a|bc|.*d.*' will exclude the symbols 'a' and 'bc',
10919  # as well as any symbol that contains 'd'.
10920  exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'
10921  # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
10922  # platforms (ab)use it in PIC code, but their linkers get confused if
10923  # the symbol is explicitly referenced.  Since portable code cannot
10924  # rely on this symbol name, it's probably fine to never include it in
10925  # preloaded symbol tables.
10926  # Exclude shared library initialization/finalization symbols.
10927  extract_expsyms_cmds=
10928
10929  case $host_os in
10930  cygwin* | mingw* | pw32* | cegcc*)
10931    # FIXME: the MSVC++ port hasn't been tested in a loooong time
10932    # When not using gcc, we currently assume that we are using
10933    # Microsoft Visual C++.
10934    if test yes != "$GCC"; then
10935      with_gnu_ld=no
10936    fi
10937    ;;
10938  interix*)
10939    # we just hope/assume this is gcc and not c89 (= MSVC++)
10940    with_gnu_ld=yes
10941    ;;
10942  openbsd* | bitrig*)
10943    with_gnu_ld=no
10944    ;;
10945  esac
10946
10947  ld_shlibs=yes
10948
10949  # On some targets, GNU ld is compatible enough with the native linker
10950  # that we're better off using the native interface for both.
10951  lt_use_gnu_ld_interface=no
10952  if test yes = "$with_gnu_ld"; then
10953    case $host_os in
10954      aix*)
10955	# The AIX port of GNU ld has always aspired to compatibility
10956	# with the native linker.  However, as the warning in the GNU ld
10957	# block says, versions before 2.19.5* couldn't really create working
10958	# shared libraries, regardless of the interface used.
10959	case `$LD -v 2>&1` in
10960	  *\ \(GNU\ Binutils\)\ 2.19.5*) ;;
10961	  *\ \(GNU\ Binutils\)\ 2.[2-9]*) ;;
10962	  *\ \(GNU\ Binutils\)\ [3-9]*) ;;
10963	  *)
10964	    lt_use_gnu_ld_interface=yes
10965	    ;;
10966	esac
10967	;;
10968      *)
10969	lt_use_gnu_ld_interface=yes
10970	;;
10971    esac
10972  fi
10973
10974  if test yes = "$lt_use_gnu_ld_interface"; then
10975    # If archive_cmds runs LD, not CC, wlarc should be empty
10976    wlarc='$wl'
10977
10978    # Set some defaults for GNU ld with shared library support. These
10979    # are reset later if shared libraries are not supported. Putting them
10980    # here allows them to be overridden if necessary.
10981    runpath_var=LD_RUN_PATH
10982    hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
10983    export_dynamic_flag_spec='$wl--export-dynamic'
10984    # ancient GNU ld didn't support --whole-archive et. al.
10985    if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
10986      whole_archive_flag_spec=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
10987    else
10988      whole_archive_flag_spec=
10989    fi
10990    supports_anon_versioning=no
10991    case `$LD -v | $SED -e 's/(^)\+)\s\+//' 2>&1` in
10992      *GNU\ gold*) supports_anon_versioning=yes ;;
10993      *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11
10994      *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
10995      *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
10996      *\ 2.11.*) ;; # other 2.11 versions
10997      *) supports_anon_versioning=yes ;;
10998    esac
10999
11000    # See if GNU ld supports shared libraries.
11001    case $host_os in
11002    aix[3-9]*)
11003      # On AIX/PPC, the GNU linker is very broken
11004      if test ia64 != "$host_cpu"; then
11005	ld_shlibs=no
11006	cat <<_LT_EOF 1>&2
11007
11008*** Warning: the GNU linker, at least up to release 2.19, is reported
11009*** to be unable to reliably create shared libraries on AIX.
11010*** Therefore, libtool is disabling shared libraries support.  If you
11011*** really care for shared libraries, you may want to install binutils
11012*** 2.20 or above, or modify your PATH so that a non-GNU linker is found.
11013*** You will then need to restart the configuration process.
11014
11015_LT_EOF
11016      fi
11017      ;;
11018
11019    amigaos*)
11020      case $host_cpu in
11021      powerpc)
11022            # see comment about AmigaOS4 .so support
11023            archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
11024            archive_expsym_cmds=''
11025        ;;
11026      m68k)
11027            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)'
11028            hardcode_libdir_flag_spec='-L$libdir'
11029            hardcode_minus_L=yes
11030        ;;
11031      esac
11032      ;;
11033
11034    beos*)
11035      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
11036	allow_undefined_flag=unsupported
11037	# Joseph Beckenbach <jrb3@best.com> says some releases of gcc
11038	# support --undefined.  This deserves some investigation.  FIXME
11039	archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
11040      else
11041	ld_shlibs=no
11042      fi
11043      ;;
11044
11045    cygwin* | mingw* | pw32* | cegcc*)
11046      # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless,
11047      # as there is no search path for DLLs.
11048      hardcode_libdir_flag_spec='-L$libdir'
11049      export_dynamic_flag_spec='$wl--export-all-symbols'
11050      allow_undefined_flag=unsupported
11051      always_export_symbols=no
11052      enable_shared_with_static_runtimes=yes
11053      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'
11054      exclude_expsyms='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'
11055
11056      if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
11057        archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
11058	# If the export-symbols file already is a .def file, use it as
11059	# is; otherwise, prepend EXPORTS...
11060	archive_expsym_cmds='if   test DEF = "`$SED -n     -e '\''s/^[	 ]*//'\''     -e '\''/^\(;.*\)*$/d'\''     -e '\''s/^\(EXPORTS\|LIBRARY\)\([	 ].*\)*$/DEF/p'\''     -e q     $export_symbols`" ; then
11061          cp $export_symbols $output_objdir/$soname.def;
11062        else
11063          echo EXPORTS > $output_objdir/$soname.def;
11064          cat $export_symbols >> $output_objdir/$soname.def;
11065        fi~
11066        $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
11067      else
11068	ld_shlibs=no
11069      fi
11070      ;;
11071
11072    haiku*)
11073      archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
11074      link_all_deplibs=yes
11075      ;;
11076
11077    interix[3-9]*)
11078      hardcode_direct=no
11079      hardcode_shlibpath_var=no
11080      hardcode_libdir_flag_spec='$wl-rpath,$libdir'
11081      export_dynamic_flag_spec='$wl-E'
11082      # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
11083      # Instead, shared libraries are loaded at an image base (0x10000000 by
11084      # default) and relocated if they conflict, which is a slow very memory
11085      # consuming and fragmenting process.  To avoid this, we pick a random,
11086      # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
11087      # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
11088      archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
11089      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'
11090      ;;
11091
11092    gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
11093      tmp_diet=no
11094      if test linux-dietlibc = "$host_os"; then
11095	case $cc_basename in
11096	  diet\ *) tmp_diet=yes;;	# linux-dietlibc with static linking (!diet-dyn)
11097	esac
11098      fi
11099      if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
11100	 && test no = "$tmp_diet"
11101      then
11102	tmp_addflag=' $pic_flag'
11103	tmp_sharedflag='-shared'
11104	case $cc_basename,$host_cpu in
11105        pgcc*)				# Portland Group C compiler
11106	  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'
11107	  tmp_addflag=' $pic_flag'
11108	  ;;
11109	pgf77* | pgf90* | pgf95* | pgfortran*)
11110					# Portland Group f77 and f90 compilers
11111	  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'
11112	  tmp_addflag=' $pic_flag -Mnomain' ;;
11113	ecc*,ia64* | icc*,ia64*)	# Intel C compiler on ia64
11114	  tmp_addflag=' -i_dynamic' ;;
11115	efc*,ia64* | ifort*,ia64*)	# Intel Fortran compiler on ia64
11116	  tmp_addflag=' -i_dynamic -nofor_main' ;;
11117	ifc* | ifort*)			# Intel Fortran compiler
11118	  tmp_addflag=' -nofor_main' ;;
11119	lf95*)				# Lahey Fortran 8.1
11120	  whole_archive_flag_spec=
11121	  tmp_sharedflag='--shared' ;;
11122        nagfor*)                        # NAGFOR 5.3
11123          tmp_sharedflag='-Wl,-shared' ;;
11124	xl[cC]* | bgxl[cC]* | mpixl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below)
11125	  tmp_sharedflag='-qmkshrobj'
11126	  tmp_addflag= ;;
11127	nvcc*)	# Cuda Compiler Driver 2.2
11128	  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'
11129	  compiler_needs_object=yes
11130	  ;;
11131	esac
11132	case `$CC -V 2>&1 | sed 5q` in
11133	*Sun\ C*)			# Sun C 5.9
11134	  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'
11135	  compiler_needs_object=yes
11136	  tmp_sharedflag='-G' ;;
11137	*Sun\ F*)			# Sun Fortran 8.3
11138	  tmp_sharedflag='-G' ;;
11139	esac
11140	archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
11141
11142        if test yes = "$supports_anon_versioning"; then
11143          archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~
11144            cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
11145            echo "local: *; };" >> $output_objdir/$libname.ver~
11146            $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib'
11147        fi
11148
11149	case $cc_basename in
11150	xlf* | bgf* | bgxlf* | mpixlf*)
11151	  # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
11152	  whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive'
11153	  hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
11154	  archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
11155	  if test yes = "$supports_anon_versioning"; then
11156	    archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~
11157              cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
11158              echo "local: *; };" >> $output_objdir/$libname.ver~
11159              $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
11160	  fi
11161	  ;;
11162	esac
11163      else
11164        ld_shlibs=no
11165      fi
11166      ;;
11167
11168    netbsd*)
11169      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
11170	archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
11171	wlarc=
11172      else
11173	archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
11174	archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
11175      fi
11176      ;;
11177
11178    solaris*)
11179      if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
11180	ld_shlibs=no
11181	cat <<_LT_EOF 1>&2
11182
11183*** Warning: The releases 2.8.* of the GNU linker cannot reliably
11184*** create shared libraries on Solaris systems.  Therefore, libtool
11185*** is disabling shared libraries support.  We urge you to upgrade GNU
11186*** binutils to release 2.9.1 or newer.  Another option is to modify
11187*** your PATH or compiler configuration so that the native linker is
11188*** used, and then restart.
11189
11190_LT_EOF
11191      elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
11192	archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
11193	archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
11194      else
11195	ld_shlibs=no
11196      fi
11197      ;;
11198
11199    sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
11200      case `$LD -v 2>&1` in
11201        *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*)
11202	ld_shlibs=no
11203	cat <<_LT_EOF 1>&2
11204
11205*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot
11206*** reliably create shared libraries on SCO systems.  Therefore, libtool
11207*** is disabling shared libraries support.  We urge you to upgrade GNU
11208*** binutils to release 2.16.91.0.3 or newer.  Another option is to modify
11209*** your PATH or compiler configuration so that the native linker is
11210*** used, and then restart.
11211
11212_LT_EOF
11213	;;
11214	*)
11215	  # For security reasons, it is highly recommended that you always
11216	  # use absolute paths for naming shared libraries, and exclude the
11217	  # DT_RUNPATH tag from executables and libraries.  But doing so
11218	  # requires that you compile everything twice, which is a pain.
11219	  if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
11220	    hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
11221	    archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
11222	    archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
11223	  else
11224	    ld_shlibs=no
11225	  fi
11226	;;
11227      esac
11228      ;;
11229
11230    sunos4*)
11231      archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
11232      wlarc=
11233      hardcode_direct=yes
11234      hardcode_shlibpath_var=no
11235      ;;
11236
11237    *)
11238      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
11239	archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
11240	archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
11241      else
11242	ld_shlibs=no
11243      fi
11244      ;;
11245    esac
11246
11247    if test no = "$ld_shlibs"; then
11248      runpath_var=
11249      hardcode_libdir_flag_spec=
11250      export_dynamic_flag_spec=
11251      whole_archive_flag_spec=
11252    fi
11253  else
11254    # PORTME fill in a description of your system's linker (not GNU ld)
11255    case $host_os in
11256    aix3*)
11257      allow_undefined_flag=unsupported
11258      always_export_symbols=yes
11259      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'
11260      # Note: this linker hardcodes the directories in LIBPATH if there
11261      # are no directories specified by -L.
11262      hardcode_minus_L=yes
11263      if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then
11264	# Neither direct hardcoding nor static linking is supported with a
11265	# broken collect2.
11266	hardcode_direct=unsupported
11267      fi
11268      ;;
11269
11270    aix[4-9]*)
11271      if test ia64 = "$host_cpu"; then
11272	# On IA64, the linker does run time linking by default, so we don't
11273	# have to do anything special.
11274	aix_use_runtimelinking=no
11275	exp_sym_flag='-Bexport'
11276	no_entry_flag=
11277      else
11278	# If we're using GNU nm, then we don't want the "-C" option.
11279	# -C means demangle to AIX nm, but means don't demangle with GNU nm
11280	# Also, AIX nm treats weak defined symbols like other global
11281	# defined symbols, whereas GNU nm marks them as "W".
11282	if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
11283	  export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
11284	else
11285	  export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
11286	fi
11287	aix_use_runtimelinking=no
11288
11289	# Test if we are trying to use run time linking or normal
11290	# AIX style linking. If -brtl is somewhere in LDFLAGS, we
11291	# need to do runtime linking.
11292	case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*)
11293	  for ld_flag in $LDFLAGS; do
11294	  if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then
11295	    aix_use_runtimelinking=yes
11296	    break
11297	  fi
11298	  done
11299	  ;;
11300	esac
11301
11302	exp_sym_flag='-bexport'
11303	no_entry_flag='-bnoentry'
11304      fi
11305
11306      # When large executables or shared objects are built, AIX ld can
11307      # have problems creating the table of contents.  If linking a library
11308      # or program results in "error TOC overflow" add -mminimal-toc to
11309      # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
11310      # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
11311
11312      archive_cmds=''
11313      hardcode_direct=yes
11314      hardcode_direct_absolute=yes
11315      hardcode_libdir_separator=':'
11316      link_all_deplibs=yes
11317      file_list_spec='$wl-f,'
11318
11319      if test yes = "$GCC"; then
11320	case $host_os in aix4.[012]|aix4.[012].*)
11321	# We only want to do this on AIX 4.2 and lower, the check
11322	# below for broken collect2 doesn't work under 4.3+
11323	  collect2name=`$CC -print-prog-name=collect2`
11324	  if test -f "$collect2name" &&
11325	   strings "$collect2name" | $GREP resolve_lib_name >/dev/null
11326	  then
11327	  # We have reworked collect2
11328	  :
11329	  else
11330	  # We have old collect2
11331	  hardcode_direct=unsupported
11332	  # It fails to find uninstalled libraries when the uninstalled
11333	  # path is not listed in the libpath.  Setting hardcode_minus_L
11334	  # to unsupported forces relinking
11335	  hardcode_minus_L=yes
11336	  hardcode_libdir_flag_spec='-L$libdir'
11337	  hardcode_libdir_separator=
11338	  fi
11339	  ;;
11340	esac
11341	shared_flag='-shared'
11342	if test yes = "$aix_use_runtimelinking"; then
11343	  shared_flag="$shared_flag "'$wl-G'
11344	fi
11345      else
11346	# not using gcc
11347	if test ia64 = "$host_cpu"; then
11348	# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
11349	# chokes on -Wl,-G. The following line is correct:
11350	  shared_flag='-G'
11351	else
11352	  if test yes = "$aix_use_runtimelinking"; then
11353	    shared_flag='$wl-G'
11354	  else
11355	    shared_flag='$wl-bM:SRE'
11356	  fi
11357	fi
11358      fi
11359
11360      export_dynamic_flag_spec='$wl-bexpall'
11361      # It seems that -bexpall does not export symbols beginning with
11362      # underscore (_), so it is better to generate a list of symbols to export.
11363      always_export_symbols=yes
11364      if test yes = "$aix_use_runtimelinking"; then
11365	# Warning - without using the other runtime loading flags (-brtl),
11366	# -berok will link without error, but may produce a broken library.
11367	allow_undefined_flag='-berok'
11368        # Determine the default libpath from the value encoded in an
11369        # empty executable.
11370        if test set = "${lt_cv_aix_libpath+set}"; then
11371  aix_libpath=$lt_cv_aix_libpath
11372else
11373  if ${lt_cv_aix_libpath_+:} false; then :
11374  $as_echo_n "(cached) " >&6
11375else
11376  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11377/* end confdefs.h.  */
11378
11379int
11380main ()
11381{
11382
11383  ;
11384  return 0;
11385}
11386_ACEOF
11387if ac_fn_c_try_link "$LINENO"; then :
11388
11389  lt_aix_libpath_sed='
11390      /Import File Strings/,/^$/ {
11391	  /^0/ {
11392	      s/^0  *\([^ ]*\) *$/\1/
11393	      p
11394	  }
11395      }'
11396  lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
11397  # Check for a 64-bit object if we didn't find anything.
11398  if test -z "$lt_cv_aix_libpath_"; then
11399    lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
11400  fi
11401fi
11402rm -f core conftest.err conftest.$ac_objext \
11403    conftest$ac_exeext conftest.$ac_ext
11404  if test -z "$lt_cv_aix_libpath_"; then
11405    lt_cv_aix_libpath_=/usr/lib:/lib
11406  fi
11407
11408fi
11409
11410  aix_libpath=$lt_cv_aix_libpath_
11411fi
11412
11413        hardcode_libdir_flag_spec='$wl-blibpath:$libdir:'"$aix_libpath"
11414        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
11415      else
11416	if test ia64 = "$host_cpu"; then
11417	  hardcode_libdir_flag_spec='$wl-R $libdir:/usr/lib:/lib'
11418	  allow_undefined_flag="-z nodefs"
11419	  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"
11420	else
11421	 # Determine the default libpath from the value encoded in an
11422	 # empty executable.
11423	 if test set = "${lt_cv_aix_libpath+set}"; then
11424  aix_libpath=$lt_cv_aix_libpath
11425else
11426  if ${lt_cv_aix_libpath_+:} false; then :
11427  $as_echo_n "(cached) " >&6
11428else
11429  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11430/* end confdefs.h.  */
11431
11432int
11433main ()
11434{
11435
11436  ;
11437  return 0;
11438}
11439_ACEOF
11440if ac_fn_c_try_link "$LINENO"; then :
11441
11442  lt_aix_libpath_sed='
11443      /Import File Strings/,/^$/ {
11444	  /^0/ {
11445	      s/^0  *\([^ ]*\) *$/\1/
11446	      p
11447	  }
11448      }'
11449  lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
11450  # Check for a 64-bit object if we didn't find anything.
11451  if test -z "$lt_cv_aix_libpath_"; then
11452    lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
11453  fi
11454fi
11455rm -f core conftest.err conftest.$ac_objext \
11456    conftest$ac_exeext conftest.$ac_ext
11457  if test -z "$lt_cv_aix_libpath_"; then
11458    lt_cv_aix_libpath_=/usr/lib:/lib
11459  fi
11460
11461fi
11462
11463  aix_libpath=$lt_cv_aix_libpath_
11464fi
11465
11466	 hardcode_libdir_flag_spec='$wl-blibpath:$libdir:'"$aix_libpath"
11467	  # Warning - without using the other run time loading flags,
11468	  # -berok will link without error, but may produce a broken library.
11469	  no_undefined_flag=' $wl-bernotok'
11470	  allow_undefined_flag=' $wl-berok'
11471	  if test yes = "$with_gnu_ld"; then
11472	    # We only use this code for GNU lds that support --whole-archive.
11473	    whole_archive_flag_spec='$wl--whole-archive$convenience $wl--no-whole-archive'
11474	  else
11475	    # Exported symbols can be pulled into shared objects from archives
11476	    whole_archive_flag_spec='$convenience'
11477	  fi
11478	  archive_cmds_need_lc=yes
11479	  # This is similar to how AIX traditionally builds its shared libraries.
11480	  archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $wl-bnoentry $compiler_flags $wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
11481	fi
11482      fi
11483      ;;
11484
11485    amigaos*)
11486      case $host_cpu in
11487      powerpc)
11488            # see comment about AmigaOS4 .so support
11489            archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
11490            archive_expsym_cmds=''
11491        ;;
11492      m68k)
11493            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)'
11494            hardcode_libdir_flag_spec='-L$libdir'
11495            hardcode_minus_L=yes
11496        ;;
11497      esac
11498      ;;
11499
11500    bsdi[45]*)
11501      export_dynamic_flag_spec=-rdynamic
11502      ;;
11503
11504    cygwin* | mingw* | pw32* | cegcc*)
11505      # When not using gcc, we currently assume that we are using
11506      # Microsoft Visual C++.
11507      # hardcode_libdir_flag_spec is actually meaningless, as there is
11508      # no search path for DLLs.
11509      case $cc_basename in
11510      cl*)
11511	# Native MSVC
11512	hardcode_libdir_flag_spec=' '
11513	allow_undefined_flag=unsupported
11514	always_export_symbols=yes
11515	file_list_spec='@'
11516	# Tell ltmain to make .lib files, not .a files.
11517	libext=lib
11518	# Tell ltmain to make .dll files, not .so files.
11519	shrext_cmds=.dll
11520	# FIXME: Setting linknames here is a bad hack.
11521	archive_cmds='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames='
11522	archive_expsym_cmds='if   test DEF = "`$SED -n     -e '\''s/^[	 ]*//'\''     -e '\''/^\(;.*\)*$/d'\''     -e '\''s/^\(EXPORTS\|LIBRARY\)\([	 ].*\)*$/DEF/p'\''     -e q     $export_symbols`" ; then
11523            cp "$export_symbols" "$output_objdir/$soname.def";
11524            echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp";
11525          else
11526            $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp;
11527          fi~
11528          $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
11529          linknames='
11530	# The linker will not automatically build a static lib if we build a DLL.
11531	# _LT_TAGVAR(old_archive_from_new_cmds, )='true'
11532	enable_shared_with_static_runtimes=yes
11533	exclude_expsyms='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
11534	export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1,DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols'
11535	# Don't use ranlib
11536	old_postinstall_cmds='chmod 644 $oldlib'
11537	postlink_cmds='lt_outputfile="@OUTPUT@"~
11538          lt_tool_outputfile="@TOOL_OUTPUT@"~
11539          case $lt_outputfile in
11540            *.exe|*.EXE) ;;
11541            *)
11542              lt_outputfile=$lt_outputfile.exe
11543              lt_tool_outputfile=$lt_tool_outputfile.exe
11544              ;;
11545          esac~
11546          if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then
11547            $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
11548            $RM "$lt_outputfile.manifest";
11549          fi'
11550	;;
11551      *)
11552	# Assume MSVC wrapper
11553	hardcode_libdir_flag_spec=' '
11554	allow_undefined_flag=unsupported
11555	# Tell ltmain to make .lib files, not .a files.
11556	libext=lib
11557	# Tell ltmain to make .dll files, not .so files.
11558	shrext_cmds=.dll
11559	# FIXME: Setting linknames here is a bad hack.
11560	archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
11561	# The linker will automatically build a .lib file if we build a DLL.
11562	old_archive_from_new_cmds='true'
11563	# FIXME: Should let the user specify the lib program.
11564	old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs'
11565	enable_shared_with_static_runtimes=yes
11566	;;
11567      esac
11568      ;;
11569
11570    darwin* | rhapsody*)
11571
11572
11573  archive_cmds_need_lc=no
11574  hardcode_direct=no
11575  hardcode_automatic=yes
11576  hardcode_shlibpath_var=unsupported
11577  if test yes = "$lt_cv_ld_force_load"; then
11578    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\"`'
11579
11580  else
11581    whole_archive_flag_spec=''
11582  fi
11583  link_all_deplibs=yes
11584  allow_undefined_flag=$_lt_dar_allow_undefined
11585  case $cc_basename in
11586     ifort*|nagfor*) _lt_dar_can_shared=yes ;;
11587     *) _lt_dar_can_shared=$GCC ;;
11588  esac
11589  if test yes = "$_lt_dar_can_shared"; then
11590    output_verbose_link_cmd=func_echo_all
11591    archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dsymutil"
11592    module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil"
11593    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"
11594    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"
11595
11596  else
11597  ld_shlibs=no
11598  fi
11599
11600      ;;
11601
11602    dgux*)
11603      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
11604      hardcode_libdir_flag_spec='-L$libdir'
11605      hardcode_shlibpath_var=no
11606      ;;
11607
11608    # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
11609    # support.  Future versions do this automatically, but an explicit c++rt0.o
11610    # does not break anything, and helps significantly (at the cost of a little
11611    # extra space).
11612    freebsd2.2*)
11613      archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
11614      hardcode_libdir_flag_spec='-R$libdir'
11615      hardcode_direct=yes
11616      hardcode_shlibpath_var=no
11617      ;;
11618
11619    # Unfortunately, older versions of FreeBSD 2 do not have this feature.
11620    freebsd2.*)
11621      archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
11622      hardcode_direct=yes
11623      hardcode_minus_L=yes
11624      hardcode_shlibpath_var=no
11625      ;;
11626
11627    # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
11628    freebsd* | dragonfly*)
11629      archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
11630      hardcode_libdir_flag_spec='-R$libdir'
11631      hardcode_direct=yes
11632      hardcode_shlibpath_var=no
11633      ;;
11634
11635    hpux9*)
11636      if test yes = "$GCC"; then
11637	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'
11638      else
11639	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'
11640      fi
11641      hardcode_libdir_flag_spec='$wl+b $wl$libdir'
11642      hardcode_libdir_separator=:
11643      hardcode_direct=yes
11644
11645      # hardcode_minus_L: Not really in the search PATH,
11646      # but as the default location of the library.
11647      hardcode_minus_L=yes
11648      export_dynamic_flag_spec='$wl-E'
11649      ;;
11650
11651    hpux10*)
11652      if test yes,no = "$GCC,$with_gnu_ld"; then
11653	archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
11654      else
11655	archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
11656      fi
11657      if test no = "$with_gnu_ld"; then
11658	hardcode_libdir_flag_spec='$wl+b $wl$libdir'
11659	hardcode_libdir_separator=:
11660	hardcode_direct=yes
11661	hardcode_direct_absolute=yes
11662	export_dynamic_flag_spec='$wl-E'
11663	# hardcode_minus_L: Not really in the search PATH,
11664	# but as the default location of the library.
11665	hardcode_minus_L=yes
11666      fi
11667      ;;
11668
11669    hpux11*)
11670      if test yes,no = "$GCC,$with_gnu_ld"; then
11671	case $host_cpu in
11672	hppa*64*)
11673	  archive_cmds='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
11674	  ;;
11675	ia64*)
11676	  archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
11677	  ;;
11678	*)
11679	  archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
11680	  ;;
11681	esac
11682      else
11683	case $host_cpu in
11684	hppa*64*)
11685	  archive_cmds='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
11686	  ;;
11687	ia64*)
11688	  archive_cmds='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
11689	  ;;
11690	*)
11691
11692	  # Older versions of the 11.00 compiler do not understand -b yet
11693	  # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does)
11694	  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC understands -b" >&5
11695$as_echo_n "checking if $CC understands -b... " >&6; }
11696if ${lt_cv_prog_compiler__b+:} false; then :
11697  $as_echo_n "(cached) " >&6
11698else
11699  lt_cv_prog_compiler__b=no
11700   save_LDFLAGS=$LDFLAGS
11701   LDFLAGS="$LDFLAGS -b"
11702   echo "$lt_simple_link_test_code" > conftest.$ac_ext
11703   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
11704     # The linker can only warn and ignore the option if not recognized
11705     # So say no if there are warnings
11706     if test -s conftest.err; then
11707       # Append any errors to the config.log.
11708       cat conftest.err 1>&5
11709       $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
11710       $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
11711       if diff conftest.exp conftest.er2 >/dev/null; then
11712         lt_cv_prog_compiler__b=yes
11713       fi
11714     else
11715       lt_cv_prog_compiler__b=yes
11716     fi
11717   fi
11718   $RM -r conftest*
11719   LDFLAGS=$save_LDFLAGS
11720
11721fi
11722{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler__b" >&5
11723$as_echo "$lt_cv_prog_compiler__b" >&6; }
11724
11725if test yes = "$lt_cv_prog_compiler__b"; then
11726    archive_cmds='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
11727else
11728    archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
11729fi
11730
11731	  ;;
11732	esac
11733      fi
11734      if test no = "$with_gnu_ld"; then
11735	hardcode_libdir_flag_spec='$wl+b $wl$libdir'
11736	hardcode_libdir_separator=:
11737
11738	case $host_cpu in
11739	hppa*64*|ia64*)
11740	  hardcode_direct=no
11741	  hardcode_shlibpath_var=no
11742	  ;;
11743	*)
11744	  hardcode_direct=yes
11745	  hardcode_direct_absolute=yes
11746	  export_dynamic_flag_spec='$wl-E'
11747
11748	  # hardcode_minus_L: Not really in the search PATH,
11749	  # but as the default location of the library.
11750	  hardcode_minus_L=yes
11751	  ;;
11752	esac
11753      fi
11754      ;;
11755
11756    irix5* | irix6* | nonstopux*)
11757      if test yes = "$GCC"; then
11758	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'
11759	# Try to use the -exported_symbol ld option, if it does not
11760	# work, assume that -exports_file does not work either and
11761	# implicitly export all symbols.
11762	# This should be the same for all languages, so no per-tag cache variable.
11763	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5
11764$as_echo_n "checking whether the $host_os linker accepts -exported_symbol... " >&6; }
11765if ${lt_cv_irix_exported_symbol+:} false; then :
11766  $as_echo_n "(cached) " >&6
11767else
11768  save_LDFLAGS=$LDFLAGS
11769	   LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null"
11770	   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11771/* end confdefs.h.  */
11772int foo (void) { return 0; }
11773_ACEOF
11774if ac_fn_c_try_link "$LINENO"; then :
11775  lt_cv_irix_exported_symbol=yes
11776else
11777  lt_cv_irix_exported_symbol=no
11778fi
11779rm -f core conftest.err conftest.$ac_objext \
11780    conftest$ac_exeext conftest.$ac_ext
11781           LDFLAGS=$save_LDFLAGS
11782fi
11783{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5
11784$as_echo "$lt_cv_irix_exported_symbol" >&6; }
11785	if test yes = "$lt_cv_irix_exported_symbol"; then
11786          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'
11787	fi
11788      else
11789	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'
11790	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'
11791      fi
11792      archive_cmds_need_lc='no'
11793      hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
11794      hardcode_libdir_separator=:
11795      inherit_rpath=yes
11796      link_all_deplibs=yes
11797      ;;
11798
11799    netbsd*)
11800      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
11801	archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
11802      else
11803	archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
11804      fi
11805      hardcode_libdir_flag_spec='-R$libdir'
11806      hardcode_direct=yes
11807      hardcode_shlibpath_var=no
11808      ;;
11809
11810    newsos6)
11811      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
11812      hardcode_direct=yes
11813      hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
11814      hardcode_libdir_separator=:
11815      hardcode_shlibpath_var=no
11816      ;;
11817
11818    *nto* | *qnx*)
11819      ;;
11820
11821    openbsd* | bitrig*)
11822      if test -f /usr/libexec/ld.so; then
11823	hardcode_direct=yes
11824	hardcode_shlibpath_var=no
11825	hardcode_direct_absolute=yes
11826	if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
11827	  archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
11828	  archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols'
11829	  hardcode_libdir_flag_spec='$wl-rpath,$libdir'
11830	  export_dynamic_flag_spec='$wl-E'
11831	else
11832	  archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
11833	  hardcode_libdir_flag_spec='$wl-rpath,$libdir'
11834	fi
11835      else
11836	ld_shlibs=no
11837      fi
11838      ;;
11839
11840    os2*)
11841      hardcode_libdir_flag_spec='-L$libdir'
11842      hardcode_minus_L=yes
11843      allow_undefined_flag=unsupported
11844      archive_cmds='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~echo DATA >> $output_objdir/$libname.def~echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
11845      old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
11846      ;;
11847
11848    osf3*)
11849      if test yes = "$GCC"; then
11850	allow_undefined_flag=' $wl-expect_unresolved $wl\*'
11851	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'
11852      else
11853	allow_undefined_flag=' -expect_unresolved \*'
11854	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'
11855      fi
11856      archive_cmds_need_lc='no'
11857      hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
11858      hardcode_libdir_separator=:
11859      ;;
11860
11861    osf4* | osf5*)	# as osf3* with the addition of -msym flag
11862      if test yes = "$GCC"; then
11863	allow_undefined_flag=' $wl-expect_unresolved $wl\*'
11864	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'
11865	hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
11866      else
11867	allow_undefined_flag=' -expect_unresolved \*'
11868	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'
11869	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~
11870          $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'
11871
11872	# Both c and cxx compiler support -rpath directly
11873	hardcode_libdir_flag_spec='-rpath $libdir'
11874      fi
11875      archive_cmds_need_lc='no'
11876      hardcode_libdir_separator=:
11877      ;;
11878
11879    solaris*)
11880      no_undefined_flag=' -z defs'
11881      if test yes = "$GCC"; then
11882	wlarc='$wl'
11883	archive_cmds='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
11884	archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
11885          $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'
11886      else
11887	case `$CC -V 2>&1` in
11888	*"Compilers 5.0"*)
11889	  wlarc=''
11890	  archive_cmds='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags'
11891	  archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
11892            $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
11893	  ;;
11894	*)
11895	  wlarc='$wl'
11896	  archive_cmds='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags'
11897	  archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
11898            $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
11899	  ;;
11900	esac
11901      fi
11902      hardcode_libdir_flag_spec='-R$libdir'
11903      hardcode_shlibpath_var=no
11904      case $host_os in
11905      solaris2.[0-5] | solaris2.[0-5].*) ;;
11906      *)
11907	# The compiler driver will combine and reorder linker options,
11908	# but understands '-z linker_flag'.  GCC discards it without '$wl',
11909	# but is careful enough not to reorder.
11910	# Supported since Solaris 2.6 (maybe 2.5.1?)
11911	if test yes = "$GCC"; then
11912	  whole_archive_flag_spec='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract'
11913	else
11914	  whole_archive_flag_spec='-z allextract$convenience -z defaultextract'
11915	fi
11916	;;
11917      esac
11918      link_all_deplibs=yes
11919      ;;
11920
11921    sunos4*)
11922      if test sequent = "$host_vendor"; then
11923	# Use $CC to link under sequent, because it throws in some extra .o
11924	# files that make .init and .fini sections work.
11925	archive_cmds='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags'
11926      else
11927	archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
11928      fi
11929      hardcode_libdir_flag_spec='-L$libdir'
11930      hardcode_direct=yes
11931      hardcode_minus_L=yes
11932      hardcode_shlibpath_var=no
11933      ;;
11934
11935    sysv4)
11936      case $host_vendor in
11937	sni)
11938	  archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
11939	  hardcode_direct=yes # is this really true???
11940	;;
11941	siemens)
11942	  ## LD is ld it makes a PLAMLIB
11943	  ## CC just makes a GrossModule.
11944	  archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
11945	  reload_cmds='$CC -r -o $output$reload_objs'
11946	  hardcode_direct=no
11947        ;;
11948	motorola)
11949	  archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
11950	  hardcode_direct=no #Motorola manual says yes, but my tests say they lie
11951	;;
11952      esac
11953      runpath_var='LD_RUN_PATH'
11954      hardcode_shlibpath_var=no
11955      ;;
11956
11957    sysv4.3*)
11958      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
11959      hardcode_shlibpath_var=no
11960      export_dynamic_flag_spec='-Bexport'
11961      ;;
11962
11963    sysv4*MP*)
11964      if test -d /usr/nec; then
11965	archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
11966	hardcode_shlibpath_var=no
11967	runpath_var=LD_RUN_PATH
11968	hardcode_runpath_var=yes
11969	ld_shlibs=yes
11970      fi
11971      ;;
11972
11973    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*)
11974      no_undefined_flag='$wl-z,text'
11975      archive_cmds_need_lc=no
11976      hardcode_shlibpath_var=no
11977      runpath_var='LD_RUN_PATH'
11978
11979      if test yes = "$GCC"; then
11980	archive_cmds='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
11981	archive_expsym_cmds='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
11982      else
11983	archive_cmds='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
11984	archive_expsym_cmds='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
11985      fi
11986      ;;
11987
11988    sysv5* | sco3.2v5* | sco5v6*)
11989      # Note: We CANNOT use -z defs as we might desire, because we do not
11990      # link with -lc, and that would cause any symbols used from libc to
11991      # always be unresolved, which means just about no library would
11992      # ever link correctly.  If we're not using GNU ld we use -z text
11993      # though, which does catch some bad symbols but isn't as heavy-handed
11994      # as -z defs.
11995      no_undefined_flag='$wl-z,text'
11996      allow_undefined_flag='$wl-z,nodefs'
11997      archive_cmds_need_lc=no
11998      hardcode_shlibpath_var=no
11999      hardcode_libdir_flag_spec='$wl-R,$libdir'
12000      hardcode_libdir_separator=':'
12001      link_all_deplibs=yes
12002      export_dynamic_flag_spec='$wl-Bexport'
12003      runpath_var='LD_RUN_PATH'
12004
12005      if test yes = "$GCC"; then
12006	archive_cmds='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
12007	archive_expsym_cmds='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
12008      else
12009	archive_cmds='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
12010	archive_expsym_cmds='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
12011      fi
12012      ;;
12013
12014    uts4*)
12015      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
12016      hardcode_libdir_flag_spec='-L$libdir'
12017      hardcode_shlibpath_var=no
12018      ;;
12019
12020    *)
12021      ld_shlibs=no
12022      ;;
12023    esac
12024
12025    if test sni = "$host_vendor"; then
12026      case $host in
12027      sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
12028	export_dynamic_flag_spec='$wl-Blargedynsym'
12029	;;
12030      esac
12031    fi
12032  fi
12033
12034{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5
12035$as_echo "$ld_shlibs" >&6; }
12036test no = "$ld_shlibs" && can_build_shared=no
12037
12038with_gnu_ld=$with_gnu_ld
12039
12040
12041
12042
12043
12044
12045
12046
12047
12048
12049
12050
12051
12052
12053
12054#
12055# Do we need to explicitly link libc?
12056#
12057case "x$archive_cmds_need_lc" in
12058x|xyes)
12059  # Assume -lc should be added
12060  archive_cmds_need_lc=yes
12061
12062  if test yes,yes = "$GCC,$enable_shared"; then
12063    case $archive_cmds in
12064    *'~'*)
12065      # FIXME: we may have to deal with multi-command sequences.
12066      ;;
12067    '$CC '*)
12068      # Test whether the compiler implicitly links with -lc since on some
12069      # systems, -lgcc has to come before -lc. If gcc already passes -lc
12070      # to ld, don't add -lc before -lgcc.
12071      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5
12072$as_echo_n "checking whether -lc should be explicitly linked in... " >&6; }
12073if ${lt_cv_archive_cmds_need_lc+:} false; then :
12074  $as_echo_n "(cached) " >&6
12075else
12076  $RM conftest*
12077	echo "$lt_simple_compile_test_code" > conftest.$ac_ext
12078
12079	if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
12080  (eval $ac_compile) 2>&5
12081  ac_status=$?
12082  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
12083  test $ac_status = 0; } 2>conftest.err; then
12084	  soname=conftest
12085	  lib=conftest
12086	  libobjs=conftest.$ac_objext
12087	  deplibs=
12088	  wl=$lt_prog_compiler_wl
12089	  pic_flag=$lt_prog_compiler_pic
12090	  compiler_flags=-v
12091	  linker_flags=-v
12092	  verstring=
12093	  output_objdir=.
12094	  libname=conftest
12095	  lt_save_allow_undefined_flag=$allow_undefined_flag
12096	  allow_undefined_flag=
12097	  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5
12098  (eval $archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5
12099  ac_status=$?
12100  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
12101  test $ac_status = 0; }
12102	  then
12103	    lt_cv_archive_cmds_need_lc=no
12104	  else
12105	    lt_cv_archive_cmds_need_lc=yes
12106	  fi
12107	  allow_undefined_flag=$lt_save_allow_undefined_flag
12108	else
12109	  cat conftest.err 1>&5
12110	fi
12111	$RM conftest*
12112
12113fi
12114{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc" >&5
12115$as_echo "$lt_cv_archive_cmds_need_lc" >&6; }
12116      archive_cmds_need_lc=$lt_cv_archive_cmds_need_lc
12117      ;;
12118    esac
12119  fi
12120  ;;
12121esac
12122
12123
12124
12125
12126
12127
12128
12129
12130
12131
12132
12133
12134
12135
12136
12137
12138
12139
12140
12141
12142
12143
12144
12145
12146
12147
12148
12149
12150
12151
12152
12153
12154
12155
12156
12157
12158
12159
12160
12161
12162
12163
12164
12165
12166
12167
12168
12169
12170
12171
12172
12173
12174
12175
12176
12177
12178
12179
12180
12181
12182
12183
12184
12185
12186
12187
12188
12189
12190
12191
12192
12193
12194
12195
12196
12197
12198
12199
12200
12201
12202
12203
12204
12205
12206
12207
12208
12209
12210
12211
12212
12213
12214
12215
12216
12217
12218
12219
12220
12221
12222
12223
12224
12225
12226
12227
12228
12229
12230
12231
12232
12233
12234
12235
12236
12237
12238
12239
12240
12241
12242
12243
12244
12245
12246
12247
12248
12249
12250
12251
12252
12253
12254
12255
12256
12257
12258
12259
12260
12261
12262
12263
12264
12265
12266
12267
12268
12269
12270
12271
12272
12273
12274  { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5
12275$as_echo_n "checking dynamic linker characteristics... " >&6; }
12276
12277if test yes = "$GCC"; then
12278  case $host_os in
12279    darwin*) lt_awk_arg='/^libraries:/,/LR/' ;;
12280    *) lt_awk_arg='/^libraries:/' ;;
12281  esac
12282  case $host_os in
12283    mingw* | cegcc*) lt_sed_strip_eq='s|=\([A-Za-z]:\)|\1|g' ;;
12284    *) lt_sed_strip_eq='s|=/|/|g' ;;
12285  esac
12286  lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq`
12287  case $lt_search_path_spec in
12288  *\;*)
12289    # if the path contains ";" then we assume it to be the separator
12290    # otherwise default to the standard path separator (i.e. ":") - it is
12291    # assumed that no part of a normal pathname contains ";" but that should
12292    # okay in the real world where ";" in dirpaths is itself problematic.
12293    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'`
12294    ;;
12295  *)
12296    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"`
12297    ;;
12298  esac
12299  # Ok, now we have the path, separated by spaces, we can step through it
12300  # and add multilib dir if necessary...
12301  lt_tmp_lt_search_path_spec=
12302  lt_multi_os_dir=/`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
12303  # ...but if some path component already ends with the multilib dir we assume
12304  # that all is fine and trust -print-search-dirs as is (GCC 4.2? or newer).
12305  case "$lt_multi_os_dir; $lt_search_path_spec " in
12306  "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*)
12307    lt_multi_os_dir=
12308    ;;
12309  esac
12310  for lt_sys_path in $lt_search_path_spec; do
12311    if test -d "$lt_sys_path$lt_multi_os_dir"; then
12312      lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path$lt_multi_os_dir"
12313    elif test -n "$lt_multi_os_dir"; then
12314      test -d "$lt_sys_path" && \
12315	lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
12316    fi
12317  done
12318  lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk '
12319BEGIN {RS = " "; FS = "/|\n";} {
12320  lt_foo = "";
12321  lt_count = 0;
12322  for (lt_i = NF; lt_i > 0; lt_i--) {
12323    if ($lt_i != "" && $lt_i != ".") {
12324      if ($lt_i == "..") {
12325        lt_count++;
12326      } else {
12327        if (lt_count == 0) {
12328          lt_foo = "/" $lt_i lt_foo;
12329        } else {
12330          lt_count--;
12331        }
12332      }
12333    }
12334  }
12335  if (lt_foo != "") { lt_freq[lt_foo]++; }
12336  if (lt_freq[lt_foo] == 1) { print lt_foo; }
12337}'`
12338  # AWK program above erroneously prepends '/' to C:/dos/paths
12339  # for these hosts.
12340  case $host_os in
12341    mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\
12342      $SED 's|/\([A-Za-z]:\)|\1|g'` ;;
12343  esac
12344  sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP`
12345else
12346  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
12347fi
12348library_names_spec=
12349libname_spec='lib$name'
12350soname_spec=
12351shrext_cmds=.so
12352postinstall_cmds=
12353postuninstall_cmds=
12354finish_cmds=
12355finish_eval=
12356shlibpath_var=
12357shlibpath_overrides_runpath=unknown
12358version_type=none
12359dynamic_linker="$host_os ld.so"
12360sys_lib_dlsearch_path_spec="/lib /usr/lib"
12361need_lib_prefix=unknown
12362hardcode_into_libs=no
12363
12364# when you set need_version to no, make sure it does not cause -set_version
12365# flags to be left without arguments
12366need_version=unknown
12367
12368case $host_os in
12369aix3*)
12370  version_type=linux # correct to gnu/linux during the next big refactor
12371  library_names_spec='$libname$release$shared_ext$versuffix $libname.a'
12372  shlibpath_var=LIBPATH
12373
12374  # AIX 3 has no versioning support, so we append a major version to the name.
12375  soname_spec='$libname$release$shared_ext$major'
12376  ;;
12377
12378aix[4-9]*)
12379  version_type=linux # correct to gnu/linux during the next big refactor
12380  need_lib_prefix=no
12381  need_version=no
12382  hardcode_into_libs=yes
12383  if test ia64 = "$host_cpu"; then
12384    # AIX 5 supports IA64
12385    library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext'
12386    shlibpath_var=LD_LIBRARY_PATH
12387  else
12388    # With GCC up to 2.95.x, collect2 would create an import file
12389    # for dependence libraries.  The import file would start with
12390    # the line '#! .'.  This would cause the generated library to
12391    # depend on '.', always an invalid library.  This was fixed in
12392    # development snapshots of GCC prior to 3.0.
12393    case $host_os in
12394      aix4 | aix4.[01] | aix4.[01].*)
12395      if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
12396	   echo ' yes '
12397	   echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then
12398	:
12399      else
12400	can_build_shared=no
12401      fi
12402      ;;
12403    esac
12404    # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct
12405    # soname into executable. Probably we can add versioning support to
12406    # collect2, so additional links can be useful in future.
12407    if test yes = "$aix_use_runtimelinking"; then
12408      # If using run time linking (on AIX 4.2 or later) use lib<name>.so
12409      # instead of lib<name>.a to let people know that these are not
12410      # typical AIX shared libraries.
12411      library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
12412    else
12413      # We preserve .a as extension for shared libraries through AIX4.2
12414      # and later when we are not doing run time linking.
12415      library_names_spec='$libname$release.a $libname.a'
12416      soname_spec='$libname$release$shared_ext$major'
12417    fi
12418    shlibpath_var=LIBPATH
12419  fi
12420  ;;
12421
12422amigaos*)
12423  case $host_cpu in
12424  powerpc)
12425    # Since July 2007 AmigaOS4 officially supports .so libraries.
12426    # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
12427    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
12428    ;;
12429  m68k)
12430    library_names_spec='$libname.ixlibrary $libname.a'
12431    # Create ${libname}_ixlibrary.a entries in /sys/libs.
12432    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'
12433    ;;
12434  esac
12435  ;;
12436
12437beos*)
12438  library_names_spec='$libname$shared_ext'
12439  dynamic_linker="$host_os ld.so"
12440  shlibpath_var=LIBRARY_PATH
12441  ;;
12442
12443bsdi[45]*)
12444  version_type=linux # correct to gnu/linux during the next big refactor
12445  need_version=no
12446  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
12447  soname_spec='$libname$release$shared_ext$major'
12448  finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
12449  shlibpath_var=LD_LIBRARY_PATH
12450  sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
12451  sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
12452  # the default ld.so.conf also contains /usr/contrib/lib and
12453  # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
12454  # libtool to hard-code these into programs
12455  ;;
12456
12457cygwin* | mingw* | pw32* | cegcc*)
12458  version_type=windows
12459  shrext_cmds=.dll
12460  need_version=no
12461  need_lib_prefix=no
12462
12463  case $GCC,$cc_basename in
12464  yes,*)
12465    # gcc
12466    library_names_spec='$libname.dll.a'
12467    # DLL is installed to $(libdir)/../bin by postinstall_cmds
12468    postinstall_cmds='base_file=`basename \$file`~
12469      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
12470      dldir=$destdir/`dirname \$dlpath`~
12471      test -d \$dldir || mkdir -p \$dldir~
12472      $install_prog $dir/$dlname \$dldir/$dlname~
12473      chmod a+x \$dldir/$dlname~
12474      if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
12475        eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
12476      fi'
12477    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
12478      dlpath=$dir/\$dldll~
12479       $RM \$dlpath'
12480    shlibpath_overrides_runpath=yes
12481
12482    case $host_os in
12483    cygwin*)
12484      # Cygwin DLLs use 'cyg' prefix rather than 'lib'
12485      soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
12486
12487      sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"
12488      ;;
12489    mingw* | cegcc*)
12490      # MinGW DLLs use traditional 'lib' prefix
12491      soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
12492      ;;
12493    pw32*)
12494      # pw32 DLLs use 'pw' prefix rather than 'lib'
12495      library_names_spec='`echo $libname | sed -e 's/^lib/pw/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
12496      ;;
12497    esac
12498    dynamic_linker='Win32 ld.exe'
12499    ;;
12500
12501  *,cl*)
12502    # Native MSVC
12503    libname_spec='$name'
12504    soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
12505    library_names_spec='$libname.dll.lib'
12506
12507    case $build_os in
12508    mingw*)
12509      sys_lib_search_path_spec=
12510      lt_save_ifs=$IFS
12511      IFS=';'
12512      for lt_path in $LIB
12513      do
12514        IFS=$lt_save_ifs
12515        # Let DOS variable expansion print the short 8.3 style file name.
12516        lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"`
12517        sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path"
12518      done
12519      IFS=$lt_save_ifs
12520      # Convert to MSYS style.
12521      sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'`
12522      ;;
12523    cygwin*)
12524      # Convert to unix form, then to dos form, then back to unix form
12525      # but this time dos style (no spaces!) so that the unix form looks
12526      # like /cygdrive/c/PROGRA~1:/cygdr...
12527      sys_lib_search_path_spec=`cygpath --path --unix "$LIB"`
12528      sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null`
12529      sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
12530      ;;
12531    *)
12532      sys_lib_search_path_spec=$LIB
12533      if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then
12534        # It is most probably a Windows format PATH.
12535        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
12536      else
12537        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
12538      fi
12539      # FIXME: find the short name or the path components, as spaces are
12540      # common. (e.g. "Program Files" -> "PROGRA~1")
12541      ;;
12542    esac
12543
12544    # DLL is installed to $(libdir)/../bin by postinstall_cmds
12545    postinstall_cmds='base_file=`basename \$file`~
12546      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
12547      dldir=$destdir/`dirname \$dlpath`~
12548      test -d \$dldir || mkdir -p \$dldir~
12549      $install_prog $dir/$dlname \$dldir/$dlname'
12550    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
12551      dlpath=$dir/\$dldll~
12552       $RM \$dlpath'
12553    shlibpath_overrides_runpath=yes
12554    dynamic_linker='Win32 link.exe'
12555    ;;
12556
12557  *)
12558    # Assume MSVC wrapper
12559    library_names_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext $libname.lib'
12560    dynamic_linker='Win32 ld.exe'
12561    ;;
12562  esac
12563  # FIXME: first we should search . and the directory the executable is in
12564  shlibpath_var=PATH
12565  ;;
12566
12567darwin* | rhapsody*)
12568  dynamic_linker="$host_os dyld"
12569  version_type=darwin
12570  need_lib_prefix=no
12571  need_version=no
12572  library_names_spec='$libname$release$major$shared_ext $libname$shared_ext'
12573  soname_spec='$libname$release$major$shared_ext'
12574  shlibpath_overrides_runpath=yes
12575  shlibpath_var=DYLD_LIBRARY_PATH
12576  shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
12577
12578  sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"
12579  sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
12580  ;;
12581
12582dgux*)
12583  version_type=linux # correct to gnu/linux during the next big refactor
12584  need_lib_prefix=no
12585  need_version=no
12586  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
12587  soname_spec='$libname$release$shared_ext$major'
12588  shlibpath_var=LD_LIBRARY_PATH
12589  ;;
12590
12591freebsd* | dragonfly*)
12592  # DragonFly does not have aout.  When/if they implement a new
12593  # versioning mechanism, adjust this.
12594  if test -x /usr/bin/objformat; then
12595    objformat=`/usr/bin/objformat`
12596  else
12597    case $host_os in
12598    freebsd[23].*) objformat=aout ;;
12599    *) objformat=elf ;;
12600    esac
12601  fi
12602  version_type=freebsd-$objformat
12603  case $version_type in
12604    freebsd-elf*)
12605      library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
12606      soname_spec='$libname$release$shared_ext$major'
12607      need_version=no
12608      need_lib_prefix=no
12609      ;;
12610    freebsd-*)
12611      library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
12612      need_version=yes
12613      ;;
12614  esac
12615  shlibpath_var=LD_LIBRARY_PATH
12616  case $host_os in
12617  freebsd2.*)
12618    shlibpath_overrides_runpath=yes
12619    ;;
12620  freebsd3.[01]* | freebsdelf3.[01]*)
12621    shlibpath_overrides_runpath=yes
12622    hardcode_into_libs=yes
12623    ;;
12624  freebsd3.[2-9]* | freebsdelf3.[2-9]* | \
12625  freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1)
12626    shlibpath_overrides_runpath=no
12627    hardcode_into_libs=yes
12628    ;;
12629  *) # from 4.6 on, and DragonFly
12630    shlibpath_overrides_runpath=yes
12631    hardcode_into_libs=yes
12632    ;;
12633  esac
12634  ;;
12635
12636haiku*)
12637  version_type=linux # correct to gnu/linux during the next big refactor
12638  need_lib_prefix=no
12639  need_version=no
12640  dynamic_linker="$host_os runtime_loader"
12641  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
12642  soname_spec='$libname$release$shared_ext$major'
12643  shlibpath_var=LIBRARY_PATH
12644  shlibpath_overrides_runpath=no
12645  sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
12646  hardcode_into_libs=yes
12647  ;;
12648
12649hpux9* | hpux10* | hpux11*)
12650  # Give a soname corresponding to the major version so that dld.sl refuses to
12651  # link against other versions.
12652  version_type=sunos
12653  need_lib_prefix=no
12654  need_version=no
12655  case $host_cpu in
12656  ia64*)
12657    shrext_cmds='.so'
12658    hardcode_into_libs=yes
12659    dynamic_linker="$host_os dld.so"
12660    shlibpath_var=LD_LIBRARY_PATH
12661    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
12662    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
12663    soname_spec='$libname$release$shared_ext$major'
12664    if test 32 = "$HPUX_IA64_MODE"; then
12665      sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
12666    else
12667      sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
12668    fi
12669    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
12670    ;;
12671  hppa*64*)
12672    shrext_cmds='.sl'
12673    hardcode_into_libs=yes
12674    dynamic_linker="$host_os dld.sl"
12675    shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
12676    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
12677    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
12678    soname_spec='$libname$release$shared_ext$major'
12679    sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
12680    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
12681    ;;
12682  *)
12683    shrext_cmds='.sl'
12684    dynamic_linker="$host_os dld.sl"
12685    shlibpath_var=SHLIB_PATH
12686    shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
12687    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
12688    soname_spec='$libname$release$shared_ext$major'
12689    ;;
12690  esac
12691  # HP-UX runs *really* slowly unless shared libraries are mode 555, ...
12692  postinstall_cmds='chmod 555 $lib'
12693  # or fails outright, so override atomically:
12694  install_override_mode=555
12695  ;;
12696
12697interix[3-9]*)
12698  version_type=linux # correct to gnu/linux during the next big refactor
12699  need_lib_prefix=no
12700  need_version=no
12701  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
12702  soname_spec='$libname$release$shared_ext$major'
12703  dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
12704  shlibpath_var=LD_LIBRARY_PATH
12705  shlibpath_overrides_runpath=no
12706  hardcode_into_libs=yes
12707  ;;
12708
12709irix5* | irix6* | nonstopux*)
12710  case $host_os in
12711    nonstopux*) version_type=nonstopux ;;
12712    *)
12713	if test yes = "$lt_cv_prog_gnu_ld"; then
12714		version_type=linux # correct to gnu/linux during the next big refactor
12715	else
12716		version_type=irix
12717	fi ;;
12718  esac
12719  need_lib_prefix=no
12720  need_version=no
12721  soname_spec='$libname$release$shared_ext$major'
12722  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext'
12723  case $host_os in
12724  irix5* | nonstopux*)
12725    libsuff= shlibsuff=
12726    ;;
12727  *)
12728    case $LD in # libtool.m4 will add one of these switches to LD
12729    *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
12730      libsuff= shlibsuff= libmagic=32-bit;;
12731    *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
12732      libsuff=32 shlibsuff=N32 libmagic=N32;;
12733    *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
12734      libsuff=64 shlibsuff=64 libmagic=64-bit;;
12735    *) libsuff= shlibsuff= libmagic=never-match;;
12736    esac
12737    ;;
12738  esac
12739  shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
12740  shlibpath_overrides_runpath=no
12741  sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff"
12742  sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff"
12743  hardcode_into_libs=yes
12744  ;;
12745
12746# No shared lib support for Linux oldld, aout, or coff.
12747linux*oldld* | linux*aout* | linux*coff*)
12748  dynamic_linker=no
12749  ;;
12750
12751linux*android*)
12752  version_type=none # Android doesn't support versioned libraries.
12753  need_lib_prefix=no
12754  need_version=no
12755  library_names_spec='$libname$release$shared_ext'
12756  soname_spec='$libname$release$shared_ext'
12757  finish_cmds=
12758  shlibpath_var=LD_LIBRARY_PATH
12759  shlibpath_overrides_runpath=yes
12760
12761  # This implies no fast_install, which is unacceptable.
12762  # Some rework will be needed to allow for fast_install
12763  # before this can be enabled.
12764  hardcode_into_libs=yes
12765
12766  dynamic_linker='Android linker'
12767  # Don't embed -rpath directories since the linker doesn't support them.
12768  hardcode_libdir_flag_spec='-L$libdir'
12769  ;;
12770
12771# This must be glibc/ELF.
12772linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
12773  version_type=linux # correct to gnu/linux during the next big refactor
12774  need_lib_prefix=no
12775  need_version=no
12776  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
12777  soname_spec='$libname$release$shared_ext$major'
12778  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
12779  shlibpath_var=LD_LIBRARY_PATH
12780  shlibpath_overrides_runpath=no
12781
12782  # Some binutils ld are patched to set DT_RUNPATH
12783  if ${lt_cv_shlibpath_overrides_runpath+:} false; then :
12784  $as_echo_n "(cached) " >&6
12785else
12786  lt_cv_shlibpath_overrides_runpath=no
12787    save_LDFLAGS=$LDFLAGS
12788    save_libdir=$libdir
12789    eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \
12790	 LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\""
12791    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12792/* end confdefs.h.  */
12793
12794int
12795main ()
12796{
12797
12798  ;
12799  return 0;
12800}
12801_ACEOF
12802if ac_fn_c_try_link "$LINENO"; then :
12803  if  ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then :
12804  lt_cv_shlibpath_overrides_runpath=yes
12805fi
12806fi
12807rm -f core conftest.err conftest.$ac_objext \
12808    conftest$ac_exeext conftest.$ac_ext
12809    LDFLAGS=$save_LDFLAGS
12810    libdir=$save_libdir
12811
12812fi
12813
12814  shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
12815
12816  # This implies no fast_install, which is unacceptable.
12817  # Some rework will be needed to allow for fast_install
12818  # before this can be enabled.
12819  hardcode_into_libs=yes
12820
12821  # Append ld.so.conf contents to the search path
12822  if test -f /etc/ld.so.conf; then
12823    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' ' '`
12824    sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
12825  fi
12826
12827  # We used to test for /lib/ld.so.1 and disable shared libraries on
12828  # powerpc, because MkLinux only supported shared libraries with the
12829  # GNU dynamic linker.  Since this was broken with cross compilers,
12830  # most powerpc-linux boxes support dynamic linking these days and
12831  # people can always --disable-shared, the test was removed, and we
12832  # assume the GNU/Linux dynamic linker is in use.
12833  dynamic_linker='GNU/Linux ld.so'
12834  ;;
12835
12836netbsd*)
12837  version_type=sunos
12838  need_lib_prefix=no
12839  need_version=no
12840  if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
12841    library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
12842    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
12843    dynamic_linker='NetBSD (a.out) ld.so'
12844  else
12845    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
12846    soname_spec='$libname$release$shared_ext$major'
12847    dynamic_linker='NetBSD ld.elf_so'
12848  fi
12849  shlibpath_var=LD_LIBRARY_PATH
12850  shlibpath_overrides_runpath=yes
12851  hardcode_into_libs=yes
12852  ;;
12853
12854newsos6)
12855  version_type=linux # correct to gnu/linux during the next big refactor
12856  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
12857  shlibpath_var=LD_LIBRARY_PATH
12858  shlibpath_overrides_runpath=yes
12859  ;;
12860
12861*nto* | *qnx*)
12862  version_type=qnx
12863  need_lib_prefix=no
12864  need_version=no
12865  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
12866  soname_spec='$libname$release$shared_ext$major'
12867  shlibpath_var=LD_LIBRARY_PATH
12868  shlibpath_overrides_runpath=no
12869  hardcode_into_libs=yes
12870  dynamic_linker='ldqnx.so'
12871  ;;
12872
12873openbsd* | bitrig*)
12874  version_type=sunos
12875  sys_lib_dlsearch_path_spec=/usr/lib
12876  need_lib_prefix=no
12877  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
12878    need_version=no
12879  else
12880    need_version=yes
12881  fi
12882  library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
12883  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
12884  shlibpath_var=LD_LIBRARY_PATH
12885  shlibpath_overrides_runpath=yes
12886  ;;
12887
12888os2*)
12889  libname_spec='$name'
12890  shrext_cmds=.dll
12891  need_lib_prefix=no
12892  library_names_spec='$libname$shared_ext $libname.a'
12893  dynamic_linker='OS/2 ld.exe'
12894  shlibpath_var=LIBPATH
12895  ;;
12896
12897osf3* | osf4* | osf5*)
12898  version_type=osf
12899  need_lib_prefix=no
12900  need_version=no
12901  soname_spec='$libname$release$shared_ext$major'
12902  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
12903  shlibpath_var=LD_LIBRARY_PATH
12904  sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
12905  sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
12906  ;;
12907
12908rdos*)
12909  dynamic_linker=no
12910  ;;
12911
12912solaris*)
12913  version_type=linux # correct to gnu/linux during the next big refactor
12914  need_lib_prefix=no
12915  need_version=no
12916  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
12917  soname_spec='$libname$release$shared_ext$major'
12918  shlibpath_var=LD_LIBRARY_PATH
12919  shlibpath_overrides_runpath=yes
12920  hardcode_into_libs=yes
12921  # ldd complains unless libraries are executable
12922  postinstall_cmds='chmod +x $lib'
12923  ;;
12924
12925sunos4*)
12926  version_type=sunos
12927  library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
12928  finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
12929  shlibpath_var=LD_LIBRARY_PATH
12930  shlibpath_overrides_runpath=yes
12931  if test yes = "$with_gnu_ld"; then
12932    need_lib_prefix=no
12933  fi
12934  need_version=yes
12935  ;;
12936
12937sysv4 | sysv4.3*)
12938  version_type=linux # correct to gnu/linux during the next big refactor
12939  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
12940  soname_spec='$libname$release$shared_ext$major'
12941  shlibpath_var=LD_LIBRARY_PATH
12942  case $host_vendor in
12943    sni)
12944      shlibpath_overrides_runpath=no
12945      need_lib_prefix=no
12946      runpath_var=LD_RUN_PATH
12947      ;;
12948    siemens)
12949      need_lib_prefix=no
12950      ;;
12951    motorola)
12952      need_lib_prefix=no
12953      need_version=no
12954      shlibpath_overrides_runpath=no
12955      sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
12956      ;;
12957  esac
12958  ;;
12959
12960sysv4*MP*)
12961  if test -d /usr/nec; then
12962    version_type=linux # correct to gnu/linux during the next big refactor
12963    library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext'
12964    soname_spec='$libname$shared_ext.$major'
12965    shlibpath_var=LD_LIBRARY_PATH
12966  fi
12967  ;;
12968
12969sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
12970  version_type=freebsd-elf
12971  need_lib_prefix=no
12972  need_version=no
12973  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext'
12974  soname_spec='$libname$release$shared_ext$major'
12975  shlibpath_var=LD_LIBRARY_PATH
12976  shlibpath_overrides_runpath=yes
12977  hardcode_into_libs=yes
12978  if test yes = "$with_gnu_ld"; then
12979    sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
12980  else
12981    sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
12982    case $host_os in
12983      sco3.2v5*)
12984        sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
12985	;;
12986    esac
12987  fi
12988  sys_lib_dlsearch_path_spec='/usr/lib'
12989  ;;
12990
12991tpf*)
12992  # TPF is a cross-target only.  Preferred cross-host = GNU/Linux.
12993  version_type=linux # correct to gnu/linux during the next big refactor
12994  need_lib_prefix=no
12995  need_version=no
12996  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
12997  shlibpath_var=LD_LIBRARY_PATH
12998  shlibpath_overrides_runpath=no
12999  hardcode_into_libs=yes
13000  ;;
13001
13002uts4*)
13003  version_type=linux # correct to gnu/linux during the next big refactor
13004  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13005  soname_spec='$libname$release$shared_ext$major'
13006  shlibpath_var=LD_LIBRARY_PATH
13007  ;;
13008
13009*)
13010  dynamic_linker=no
13011  ;;
13012esac
13013{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5
13014$as_echo "$dynamic_linker" >&6; }
13015test no = "$dynamic_linker" && can_build_shared=no
13016
13017variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
13018if test yes = "$GCC"; then
13019  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
13020fi
13021
13022if test set = "${lt_cv_sys_lib_search_path_spec+set}"; then
13023  sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec
13024fi
13025if test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then
13026  sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec
13027fi
13028
13029
13030
13031
13032
13033
13034
13035
13036
13037
13038
13039
13040
13041
13042
13043
13044
13045
13046
13047
13048
13049
13050
13051
13052
13053
13054
13055
13056
13057
13058
13059
13060
13061
13062
13063
13064
13065
13066
13067
13068
13069
13070
13071
13072
13073
13074
13075
13076
13077
13078
13079
13080
13081
13082
13083
13084
13085
13086
13087
13088
13089
13090
13091
13092
13093
13094
13095
13096
13097
13098
13099
13100
13101
13102
13103
13104
13105
13106
13107
13108
13109
13110
13111
13112
13113
13114
13115
13116
13117
13118
13119
13120  { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5
13121$as_echo_n "checking how to hardcode library paths into programs... " >&6; }
13122hardcode_action=
13123if test -n "$hardcode_libdir_flag_spec" ||
13124   test -n "$runpath_var" ||
13125   test yes = "$hardcode_automatic"; then
13126
13127  # We can hardcode non-existent directories.
13128  if test no != "$hardcode_direct" &&
13129     # If the only mechanism to avoid hardcoding is shlibpath_var, we
13130     # have to relink, otherwise we might link with an installed library
13131     # when we should be linking with a yet-to-be-installed one
13132     ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, )" &&
13133     test no != "$hardcode_minus_L"; then
13134    # Linking always hardcodes the temporary library directory.
13135    hardcode_action=relink
13136  else
13137    # We can link without hardcoding, and we can hardcode nonexisting dirs.
13138    hardcode_action=immediate
13139  fi
13140else
13141  # We cannot hardcode anything, or else we can only hardcode existing
13142  # directories.
13143  hardcode_action=unsupported
13144fi
13145{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5
13146$as_echo "$hardcode_action" >&6; }
13147
13148if test relink = "$hardcode_action" ||
13149   test yes = "$inherit_rpath"; then
13150  # Fast installation is not supported
13151  enable_fast_install=no
13152elif test yes = "$shlibpath_overrides_runpath" ||
13153     test no = "$enable_shared"; then
13154  # Fast installation is not necessary
13155  enable_fast_install=needless
13156fi
13157
13158
13159
13160
13161
13162
13163  if test yes != "$enable_dlopen"; then
13164  enable_dlopen=unknown
13165  enable_dlopen_self=unknown
13166  enable_dlopen_self_static=unknown
13167else
13168  lt_cv_dlopen=no
13169  lt_cv_dlopen_libs=
13170
13171  case $host_os in
13172  beos*)
13173    lt_cv_dlopen=load_add_on
13174    lt_cv_dlopen_libs=
13175    lt_cv_dlopen_self=yes
13176    ;;
13177
13178  mingw* | pw32* | cegcc*)
13179    lt_cv_dlopen=LoadLibrary
13180    lt_cv_dlopen_libs=
13181    ;;
13182
13183  cygwin*)
13184    lt_cv_dlopen=dlopen
13185    lt_cv_dlopen_libs=
13186    ;;
13187
13188  darwin*)
13189    # if libdl is installed we need to link against it
13190    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
13191$as_echo_n "checking for dlopen in -ldl... " >&6; }
13192if ${ac_cv_lib_dl_dlopen+:} false; then :
13193  $as_echo_n "(cached) " >&6
13194else
13195  ac_check_lib_save_LIBS=$LIBS
13196LIBS="-ldl  $LIBS"
13197cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13198/* end confdefs.h.  */
13199
13200/* Override any GCC internal prototype to avoid an error.
13201   Use char because int might match the return type of a GCC
13202   builtin and then its argument prototype would still apply.  */
13203#ifdef __cplusplus
13204extern "C"
13205#endif
13206char dlopen ();
13207int
13208main ()
13209{
13210return dlopen ();
13211  ;
13212  return 0;
13213}
13214_ACEOF
13215if ac_fn_c_try_link "$LINENO"; then :
13216  ac_cv_lib_dl_dlopen=yes
13217else
13218  ac_cv_lib_dl_dlopen=no
13219fi
13220rm -f core conftest.err conftest.$ac_objext \
13221    conftest$ac_exeext conftest.$ac_ext
13222LIBS=$ac_check_lib_save_LIBS
13223fi
13224{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
13225$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
13226if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
13227  lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl
13228else
13229
13230    lt_cv_dlopen=dyld
13231    lt_cv_dlopen_libs=
13232    lt_cv_dlopen_self=yes
13233
13234fi
13235
13236    ;;
13237
13238  tpf*)
13239    # Don't try to run any link tests for TPF.  We know it's impossible
13240    # because TPF is a cross-compiler, and we know how we open DSOs.
13241    lt_cv_dlopen=dlopen
13242    lt_cv_dlopen_libs=
13243    lt_cv_dlopen_self=no
13244    ;;
13245
13246  *)
13247    ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load"
13248if test "x$ac_cv_func_shl_load" = xyes; then :
13249  lt_cv_dlopen=shl_load
13250else
13251  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
13252$as_echo_n "checking for shl_load in -ldld... " >&6; }
13253if ${ac_cv_lib_dld_shl_load+:} false; then :
13254  $as_echo_n "(cached) " >&6
13255else
13256  ac_check_lib_save_LIBS=$LIBS
13257LIBS="-ldld  $LIBS"
13258cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13259/* end confdefs.h.  */
13260
13261/* Override any GCC internal prototype to avoid an error.
13262   Use char because int might match the return type of a GCC
13263   builtin and then its argument prototype would still apply.  */
13264#ifdef __cplusplus
13265extern "C"
13266#endif
13267char shl_load ();
13268int
13269main ()
13270{
13271return shl_load ();
13272  ;
13273  return 0;
13274}
13275_ACEOF
13276if ac_fn_c_try_link "$LINENO"; then :
13277  ac_cv_lib_dld_shl_load=yes
13278else
13279  ac_cv_lib_dld_shl_load=no
13280fi
13281rm -f core conftest.err conftest.$ac_objext \
13282    conftest$ac_exeext conftest.$ac_ext
13283LIBS=$ac_check_lib_save_LIBS
13284fi
13285{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
13286$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
13287if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
13288  lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld
13289else
13290  ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
13291if test "x$ac_cv_func_dlopen" = xyes; then :
13292  lt_cv_dlopen=dlopen
13293else
13294  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
13295$as_echo_n "checking for dlopen in -ldl... " >&6; }
13296if ${ac_cv_lib_dl_dlopen+:} false; then :
13297  $as_echo_n "(cached) " >&6
13298else
13299  ac_check_lib_save_LIBS=$LIBS
13300LIBS="-ldl  $LIBS"
13301cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13302/* end confdefs.h.  */
13303
13304/* Override any GCC internal prototype to avoid an error.
13305   Use char because int might match the return type of a GCC
13306   builtin and then its argument prototype would still apply.  */
13307#ifdef __cplusplus
13308extern "C"
13309#endif
13310char dlopen ();
13311int
13312main ()
13313{
13314return dlopen ();
13315  ;
13316  return 0;
13317}
13318_ACEOF
13319if ac_fn_c_try_link "$LINENO"; then :
13320  ac_cv_lib_dl_dlopen=yes
13321else
13322  ac_cv_lib_dl_dlopen=no
13323fi
13324rm -f core conftest.err conftest.$ac_objext \
13325    conftest$ac_exeext conftest.$ac_ext
13326LIBS=$ac_check_lib_save_LIBS
13327fi
13328{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
13329$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
13330if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
13331  lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl
13332else
13333  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5
13334$as_echo_n "checking for dlopen in -lsvld... " >&6; }
13335if ${ac_cv_lib_svld_dlopen+:} false; then :
13336  $as_echo_n "(cached) " >&6
13337else
13338  ac_check_lib_save_LIBS=$LIBS
13339LIBS="-lsvld  $LIBS"
13340cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13341/* end confdefs.h.  */
13342
13343/* Override any GCC internal prototype to avoid an error.
13344   Use char because int might match the return type of a GCC
13345   builtin and then its argument prototype would still apply.  */
13346#ifdef __cplusplus
13347extern "C"
13348#endif
13349char dlopen ();
13350int
13351main ()
13352{
13353return dlopen ();
13354  ;
13355  return 0;
13356}
13357_ACEOF
13358if ac_fn_c_try_link "$LINENO"; then :
13359  ac_cv_lib_svld_dlopen=yes
13360else
13361  ac_cv_lib_svld_dlopen=no
13362fi
13363rm -f core conftest.err conftest.$ac_objext \
13364    conftest$ac_exeext conftest.$ac_ext
13365LIBS=$ac_check_lib_save_LIBS
13366fi
13367{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5
13368$as_echo "$ac_cv_lib_svld_dlopen" >&6; }
13369if test "x$ac_cv_lib_svld_dlopen" = xyes; then :
13370  lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld
13371else
13372  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5
13373$as_echo_n "checking for dld_link in -ldld... " >&6; }
13374if ${ac_cv_lib_dld_dld_link+:} false; then :
13375  $as_echo_n "(cached) " >&6
13376else
13377  ac_check_lib_save_LIBS=$LIBS
13378LIBS="-ldld  $LIBS"
13379cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13380/* end confdefs.h.  */
13381
13382/* Override any GCC internal prototype to avoid an error.
13383   Use char because int might match the return type of a GCC
13384   builtin and then its argument prototype would still apply.  */
13385#ifdef __cplusplus
13386extern "C"
13387#endif
13388char dld_link ();
13389int
13390main ()
13391{
13392return dld_link ();
13393  ;
13394  return 0;
13395}
13396_ACEOF
13397if ac_fn_c_try_link "$LINENO"; then :
13398  ac_cv_lib_dld_dld_link=yes
13399else
13400  ac_cv_lib_dld_dld_link=no
13401fi
13402rm -f core conftest.err conftest.$ac_objext \
13403    conftest$ac_exeext conftest.$ac_ext
13404LIBS=$ac_check_lib_save_LIBS
13405fi
13406{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5
13407$as_echo "$ac_cv_lib_dld_dld_link" >&6; }
13408if test "x$ac_cv_lib_dld_dld_link" = xyes; then :
13409  lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld
13410fi
13411
13412
13413fi
13414
13415
13416fi
13417
13418
13419fi
13420
13421
13422fi
13423
13424
13425fi
13426
13427    ;;
13428  esac
13429
13430  if test no = "$lt_cv_dlopen"; then
13431    enable_dlopen=no
13432  else
13433    enable_dlopen=yes
13434  fi
13435
13436  case $lt_cv_dlopen in
13437  dlopen)
13438    save_CPPFLAGS=$CPPFLAGS
13439    test yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
13440
13441    save_LDFLAGS=$LDFLAGS
13442    wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
13443
13444    save_LIBS=$LIBS
13445    LIBS="$lt_cv_dlopen_libs $LIBS"
13446
13447    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5
13448$as_echo_n "checking whether a program can dlopen itself... " >&6; }
13449if ${lt_cv_dlopen_self+:} false; then :
13450  $as_echo_n "(cached) " >&6
13451else
13452  	  if test yes = "$cross_compiling"; then :
13453  lt_cv_dlopen_self=cross
13454else
13455  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
13456  lt_status=$lt_dlunknown
13457  cat > conftest.$ac_ext <<_LT_EOF
13458#line $LINENO "configure"
13459#include "confdefs.h"
13460
13461#if HAVE_DLFCN_H
13462#include <dlfcn.h>
13463#endif
13464
13465#include <stdio.h>
13466
13467#ifdef RTLD_GLOBAL
13468#  define LT_DLGLOBAL		RTLD_GLOBAL
13469#else
13470#  ifdef DL_GLOBAL
13471#    define LT_DLGLOBAL		DL_GLOBAL
13472#  else
13473#    define LT_DLGLOBAL		0
13474#  endif
13475#endif
13476
13477/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
13478   find out it does not work in some platform. */
13479#ifndef LT_DLLAZY_OR_NOW
13480#  ifdef RTLD_LAZY
13481#    define LT_DLLAZY_OR_NOW		RTLD_LAZY
13482#  else
13483#    ifdef DL_LAZY
13484#      define LT_DLLAZY_OR_NOW		DL_LAZY
13485#    else
13486#      ifdef RTLD_NOW
13487#        define LT_DLLAZY_OR_NOW	RTLD_NOW
13488#      else
13489#        ifdef DL_NOW
13490#          define LT_DLLAZY_OR_NOW	DL_NOW
13491#        else
13492#          define LT_DLLAZY_OR_NOW	0
13493#        endif
13494#      endif
13495#    endif
13496#  endif
13497#endif
13498
13499/* When -fvisbility=hidden is used, assume the code has been annotated
13500   correspondingly for the symbols needed.  */
13501#if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
13502int fnord () __attribute__((visibility("default")));
13503#endif
13504
13505int fnord () { return 42; }
13506int main ()
13507{
13508  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
13509  int status = $lt_dlunknown;
13510
13511  if (self)
13512    {
13513      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
13514      else
13515        {
13516	  if (dlsym( self,"_fnord"))  status = $lt_dlneed_uscore;
13517          else puts (dlerror ());
13518	}
13519      /* dlclose (self); */
13520    }
13521  else
13522    puts (dlerror ());
13523
13524  return status;
13525}
13526_LT_EOF
13527  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
13528  (eval $ac_link) 2>&5
13529  ac_status=$?
13530  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
13531  test $ac_status = 0; } && test -s "conftest$ac_exeext" 2>/dev/null; then
13532    (./conftest; exit; ) >&5 2>/dev/null
13533    lt_status=$?
13534    case x$lt_status in
13535      x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;;
13536      x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;;
13537      x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;;
13538    esac
13539  else :
13540    # compilation failed
13541    lt_cv_dlopen_self=no
13542  fi
13543fi
13544rm -fr conftest*
13545
13546
13547fi
13548{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5
13549$as_echo "$lt_cv_dlopen_self" >&6; }
13550
13551    if test yes = "$lt_cv_dlopen_self"; then
13552      wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
13553      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5
13554$as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; }
13555if ${lt_cv_dlopen_self_static+:} false; then :
13556  $as_echo_n "(cached) " >&6
13557else
13558  	  if test yes = "$cross_compiling"; then :
13559  lt_cv_dlopen_self_static=cross
13560else
13561  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
13562  lt_status=$lt_dlunknown
13563  cat > conftest.$ac_ext <<_LT_EOF
13564#line $LINENO "configure"
13565#include "confdefs.h"
13566
13567#if HAVE_DLFCN_H
13568#include <dlfcn.h>
13569#endif
13570
13571#include <stdio.h>
13572
13573#ifdef RTLD_GLOBAL
13574#  define LT_DLGLOBAL		RTLD_GLOBAL
13575#else
13576#  ifdef DL_GLOBAL
13577#    define LT_DLGLOBAL		DL_GLOBAL
13578#  else
13579#    define LT_DLGLOBAL		0
13580#  endif
13581#endif
13582
13583/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
13584   find out it does not work in some platform. */
13585#ifndef LT_DLLAZY_OR_NOW
13586#  ifdef RTLD_LAZY
13587#    define LT_DLLAZY_OR_NOW		RTLD_LAZY
13588#  else
13589#    ifdef DL_LAZY
13590#      define LT_DLLAZY_OR_NOW		DL_LAZY
13591#    else
13592#      ifdef RTLD_NOW
13593#        define LT_DLLAZY_OR_NOW	RTLD_NOW
13594#      else
13595#        ifdef DL_NOW
13596#          define LT_DLLAZY_OR_NOW	DL_NOW
13597#        else
13598#          define LT_DLLAZY_OR_NOW	0
13599#        endif
13600#      endif
13601#    endif
13602#  endif
13603#endif
13604
13605/* When -fvisbility=hidden is used, assume the code has been annotated
13606   correspondingly for the symbols needed.  */
13607#if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
13608int fnord () __attribute__((visibility("default")));
13609#endif
13610
13611int fnord () { return 42; }
13612int main ()
13613{
13614  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
13615  int status = $lt_dlunknown;
13616
13617  if (self)
13618    {
13619      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
13620      else
13621        {
13622	  if (dlsym( self,"_fnord"))  status = $lt_dlneed_uscore;
13623          else puts (dlerror ());
13624	}
13625      /* dlclose (self); */
13626    }
13627  else
13628    puts (dlerror ());
13629
13630  return status;
13631}
13632_LT_EOF
13633  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
13634  (eval $ac_link) 2>&5
13635  ac_status=$?
13636  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
13637  test $ac_status = 0; } && test -s "conftest$ac_exeext" 2>/dev/null; then
13638    (./conftest; exit; ) >&5 2>/dev/null
13639    lt_status=$?
13640    case x$lt_status in
13641      x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;;
13642      x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;;
13643      x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;;
13644    esac
13645  else :
13646    # compilation failed
13647    lt_cv_dlopen_self_static=no
13648  fi
13649fi
13650rm -fr conftest*
13651
13652
13653fi
13654{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self_static" >&5
13655$as_echo "$lt_cv_dlopen_self_static" >&6; }
13656    fi
13657
13658    CPPFLAGS=$save_CPPFLAGS
13659    LDFLAGS=$save_LDFLAGS
13660    LIBS=$save_LIBS
13661    ;;
13662  esac
13663
13664  case $lt_cv_dlopen_self in
13665  yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
13666  *) enable_dlopen_self=unknown ;;
13667  esac
13668
13669  case $lt_cv_dlopen_self_static in
13670  yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
13671  *) enable_dlopen_self_static=unknown ;;
13672  esac
13673fi
13674
13675
13676
13677
13678
13679
13680
13681
13682
13683
13684
13685
13686
13687
13688
13689
13690
13691striplib=
13692old_striplib=
13693{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5
13694$as_echo_n "checking whether stripping libraries is possible... " >&6; }
13695if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
13696  test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
13697  test -z "$striplib" && striplib="$STRIP --strip-unneeded"
13698  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13699$as_echo "yes" >&6; }
13700else
13701# FIXME - insert some real tests, host_os isn't really good enough
13702  case $host_os in
13703  darwin*)
13704    if test -n "$STRIP"; then
13705      striplib="$STRIP -x"
13706      old_striplib="$STRIP -S"
13707      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13708$as_echo "yes" >&6; }
13709    else
13710      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13711$as_echo "no" >&6; }
13712    fi
13713    ;;
13714  *)
13715    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13716$as_echo "no" >&6; }
13717    ;;
13718  esac
13719fi
13720
13721
13722
13723
13724
13725
13726
13727
13728
13729
13730
13731
13732  # Report what library types will actually be built
13733  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5
13734$as_echo_n "checking if libtool supports shared libraries... " >&6; }
13735  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5
13736$as_echo "$can_build_shared" >&6; }
13737
13738  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5
13739$as_echo_n "checking whether to build shared libraries... " >&6; }
13740  test no = "$can_build_shared" && enable_shared=no
13741
13742  # On AIX, shared libraries and static libraries use the same namespace, and
13743  # are all built from PIC.
13744  case $host_os in
13745  aix3*)
13746    test yes = "$enable_shared" && enable_static=no
13747    if test -n "$RANLIB"; then
13748      archive_cmds="$archive_cmds~\$RANLIB \$lib"
13749      postinstall_cmds='$RANLIB $lib'
13750    fi
13751    ;;
13752
13753  aix[4-9]*)
13754    if test ia64 != "$host_cpu" && test no = "$aix_use_runtimelinking"; then
13755      test yes = "$enable_shared" && enable_static=no
13756    fi
13757    ;;
13758  esac
13759  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
13760$as_echo "$enable_shared" >&6; }
13761
13762  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5
13763$as_echo_n "checking whether to build static libraries... " >&6; }
13764  # Make sure either enable_shared or enable_static is yes.
13765  test yes = "$enable_shared" || enable_static=yes
13766  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5
13767$as_echo "$enable_static" >&6; }
13768
13769
13770
13771
13772fi
13773ac_ext=c
13774ac_cpp='$CPP $CPPFLAGS'
13775ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
13776ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
13777ac_compiler_gnu=$ac_cv_c_compiler_gnu
13778
13779CC=$lt_save_CC
13780
13781
13782
13783
13784
13785
13786
13787
13788
13789
13790
13791
13792
13793
13794
13795        ac_config_commands="$ac_config_commands libtool"
13796
13797
13798
13799
13800# Only expand once:
13801
13802
13803
13804
13805# Checks for header files.
13806for ac_header in stdarg.h stdbool.h netinet/in.h sys/param.h sys/socket.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
13807do :
13808  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
13809ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
13810"
13811if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
13812  cat >>confdefs.h <<_ACEOF
13813#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
13814_ACEOF
13815
13816fi
13817
13818done
13819
13820
13821# check for types.
13822# Using own tests for int64* because autoconf builtin only give 32bit.
13823ac_fn_c_check_type "$LINENO" "int8_t" "ac_cv_type_int8_t" "$ac_includes_default"
13824if test "x$ac_cv_type_int8_t" = xyes; then :
13825
13826else
13827
13828cat >>confdefs.h <<_ACEOF
13829#define int8_t signed char
13830_ACEOF
13831
13832fi
13833
13834ac_fn_c_check_type "$LINENO" "int16_t" "ac_cv_type_int16_t" "$ac_includes_default"
13835if test "x$ac_cv_type_int16_t" = xyes; then :
13836
13837else
13838
13839cat >>confdefs.h <<_ACEOF
13840#define int16_t short
13841_ACEOF
13842
13843fi
13844
13845ac_fn_c_check_type "$LINENO" "int32_t" "ac_cv_type_int32_t" "$ac_includes_default"
13846if test "x$ac_cv_type_int32_t" = xyes; then :
13847
13848else
13849
13850cat >>confdefs.h <<_ACEOF
13851#define int32_t int
13852_ACEOF
13853
13854fi
13855
13856ac_fn_c_check_type "$LINENO" "int64_t" "ac_cv_type_int64_t" "$ac_includes_default"
13857if test "x$ac_cv_type_int64_t" = xyes; then :
13858
13859else
13860
13861cat >>confdefs.h <<_ACEOF
13862#define int64_t long long
13863_ACEOF
13864
13865fi
13866
13867ac_fn_c_check_type "$LINENO" "uint8_t" "ac_cv_type_uint8_t" "$ac_includes_default"
13868if test "x$ac_cv_type_uint8_t" = xyes; then :
13869
13870else
13871
13872cat >>confdefs.h <<_ACEOF
13873#define uint8_t unsigned char
13874_ACEOF
13875
13876fi
13877
13878ac_fn_c_check_type "$LINENO" "uint16_t" "ac_cv_type_uint16_t" "$ac_includes_default"
13879if test "x$ac_cv_type_uint16_t" = xyes; then :
13880
13881else
13882
13883cat >>confdefs.h <<_ACEOF
13884#define uint16_t unsigned short
13885_ACEOF
13886
13887fi
13888
13889ac_fn_c_check_type "$LINENO" "uint32_t" "ac_cv_type_uint32_t" "$ac_includes_default"
13890if test "x$ac_cv_type_uint32_t" = xyes; then :
13891
13892else
13893
13894cat >>confdefs.h <<_ACEOF
13895#define uint32_t unsigned int
13896_ACEOF
13897
13898fi
13899
13900ac_fn_c_check_type "$LINENO" "uint64_t" "ac_cv_type_uint64_t" "$ac_includes_default"
13901if test "x$ac_cv_type_uint64_t" = xyes; then :
13902
13903else
13904
13905cat >>confdefs.h <<_ACEOF
13906#define uint64_t unsigned long long
13907_ACEOF
13908
13909fi
13910
13911ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
13912if test "x$ac_cv_type_size_t" = xyes; then :
13913
13914else
13915
13916cat >>confdefs.h <<_ACEOF
13917#define size_t unsigned int
13918_ACEOF
13919
13920fi
13921
13922ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
13923if test "x$ac_cv_type_ssize_t" = xyes; then :
13924
13925else
13926
13927cat >>confdefs.h <<_ACEOF
13928#define ssize_t int
13929_ACEOF
13930
13931fi
13932
13933{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
13934$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
13935if ${ac_cv_type_uid_t+:} false; then :
13936  $as_echo_n "(cached) " >&6
13937else
13938  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13939/* end confdefs.h.  */
13940#include <sys/types.h>
13941
13942_ACEOF
13943if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13944  $EGREP "uid_t" >/dev/null 2>&1; then :
13945  ac_cv_type_uid_t=yes
13946else
13947  ac_cv_type_uid_t=no
13948fi
13949rm -f conftest*
13950
13951fi
13952{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
13953$as_echo "$ac_cv_type_uid_t" >&6; }
13954if test $ac_cv_type_uid_t = no; then
13955
13956$as_echo "#define uid_t int" >>confdefs.h
13957
13958
13959$as_echo "#define gid_t int" >>confdefs.h
13960
13961fi
13962
13963ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
13964if test "x$ac_cv_type_pid_t" = xyes; then :
13965
13966else
13967
13968cat >>confdefs.h <<_ACEOF
13969#define pid_t int
13970_ACEOF
13971
13972fi
13973
13974ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
13975if test "x$ac_cv_type_off_t" = xyes; then :
13976
13977else
13978
13979cat >>confdefs.h <<_ACEOF
13980#define off_t long int
13981_ACEOF
13982
13983fi
13984
13985ac_fn_c_check_type "$LINENO" "u_char" "ac_cv_type_u_char" "
13986$ac_includes_default
13987#ifdef HAVE_WINSOCK2_H
13988#  include <winsock2.h>
13989#endif
13990
13991"
13992if test "x$ac_cv_type_u_char" = xyes; then :
13993
13994else
13995
13996$as_echo "#define u_char unsigned char" >>confdefs.h
13997
13998fi
13999
14000ac_fn_c_check_type "$LINENO" "rlim_t" "ac_cv_type_rlim_t" "
14001$ac_includes_default
14002#ifdef HAVE_SYS_RESOURCE_H
14003#  include <sys/resource.h>
14004#endif
14005
14006"
14007if test "x$ac_cv_type_rlim_t" = xyes; then :
14008
14009else
14010
14011$as_echo "#define rlim_t unsigned long" >>confdefs.h
14012
14013fi
14014
14015
14016ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
14017$ac_includes_default
14018#ifdef HAVE_SYS_SOCKET_H
14019#  include <sys/socket.h>
14020#endif
14021#ifdef HAVE_WS2TCPIP_H
14022#  include <ws2tcpip.h>
14023#endif
14024
14025"
14026if test "x$ac_cv_type_socklen_t" = xyes; then :
14027
14028else
14029
14030$as_echo "#define socklen_t int" >>confdefs.h
14031
14032fi
14033
14034 ac_fn_c_check_type "$LINENO" "in_addr_t" "ac_cv_type_in_addr_t" "
14035$ac_includes_default
14036#ifdef HAVE_SYS_TYPES_H
14037# include <sys/types.h>
14038#endif
14039#ifdef HAVE_NETINET_IN_H
14040# include <netinet/in.h>
14041#endif
14042
14043"
14044if test "x$ac_cv_type_in_addr_t" = xyes; then :
14045
14046else
14047
14048$as_echo "#define in_addr_t uint32_t" >>confdefs.h
14049
14050fi
14051
14052 ac_fn_c_check_type "$LINENO" "in_port_t" "ac_cv_type_in_port_t" "
14053$ac_includes_default
14054#ifdef HAVE_SYS_TYPES_H
14055# include <sys/types.h>
14056#endif
14057#ifdef HAVE_NETINET_IN_H
14058# include <netinet/in.h>
14059#endif
14060
14061"
14062if test "x$ac_cv_type_in_port_t" = xyes; then :
14063
14064else
14065
14066$as_echo "#define in_port_t uint16_t" >>confdefs.h
14067
14068fi
14069
14070{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if memcmp compares unsigned" >&5
14071$as_echo_n "checking if memcmp compares unsigned... " >&6; }
14072if test "$cross_compiling" = yes; then :
14073   { $as_echo "$as_me:${as_lineno-$LINENO}: result: cross-compile no" >&5
14074$as_echo "cross-compile no" >&6; }
14075
14076$as_echo "#define MEMCMP_IS_BROKEN 1" >>confdefs.h
14077
14078  case " $LIBOBJS " in
14079  *" memcmp.$ac_objext "* ) ;;
14080  *) LIBOBJS="$LIBOBJS memcmp.$ac_objext"
14081 ;;
14082esac
14083
14084
14085else
14086  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14087/* end confdefs.h.  */
14088
14089#include <stdio.h>
14090#include <stdlib.h>
14091#include <string.h>
14092int main(void)
14093{
14094	char a = 255, b = 0;
14095	if(memcmp(&a, &b, 1) < 0)
14096		return 1;
14097	return 0;
14098}
14099
14100_ACEOF
14101if ac_fn_c_try_run "$LINENO"; then :
14102  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14103$as_echo "yes" >&6; }
14104else
14105   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14106$as_echo "no" >&6; }
14107
14108$as_echo "#define MEMCMP_IS_BROKEN 1" >>confdefs.h
14109
14110  case " $LIBOBJS " in
14111  *" memcmp.$ac_objext "* ) ;;
14112  *) LIBOBJS="$LIBOBJS memcmp.$ac_objext"
14113 ;;
14114esac
14115
14116
14117fi
14118rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14119  conftest.$ac_objext conftest.beam conftest.$ac_ext
14120fi
14121
14122
14123# The cast to long int works around a bug in the HP C Compiler
14124# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14125# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14126# This bug is HP SR number 8606223364.
14127{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
14128$as_echo_n "checking size of time_t... " >&6; }
14129if ${ac_cv_sizeof_time_t+:} false; then :
14130  $as_echo_n "(cached) " >&6
14131else
14132  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t"        "
14133$ac_includes_default
14134#ifdef TIME_WITH_SYS_TIME
14135# include <sys/time.h>
14136# include <time.h>
14137#else
14138# ifdef HAVE_SYS_TIME_H
14139#  include <sys/time.h>
14140# else
14141#  include <time.h>
14142# endif
14143#endif
14144
14145"; then :
14146
14147else
14148  if test "$ac_cv_type_time_t" = yes; then
14149     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14150$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
14151as_fn_error 77 "cannot compute sizeof (time_t)
14152See \`config.log' for more details" "$LINENO" 5; }
14153   else
14154     ac_cv_sizeof_time_t=0
14155   fi
14156fi
14157
14158fi
14159{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
14160$as_echo "$ac_cv_sizeof_time_t" >&6; }
14161
14162
14163
14164cat >>confdefs.h <<_ACEOF
14165#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
14166_ACEOF
14167
14168
14169
14170# add option to disable the evil rpath
14171
14172# Check whether --enable-rpath was given.
14173if test "${enable_rpath+set}" = set; then :
14174  enableval=$enable_rpath; enable_rpath=$enableval
14175else
14176  enable_rpath=yes
14177fi
14178
14179if test "x$enable_rpath" = xno; then
14180		ac_config_commands="$ac_config_commands disable-rpath"
14181
14182fi
14183
14184
14185
14186# check to see if libraries are needed for these functions.
14187{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing inet_pton" >&5
14188$as_echo_n "checking for library containing inet_pton... " >&6; }
14189if ${ac_cv_search_inet_pton+:} false; then :
14190  $as_echo_n "(cached) " >&6
14191else
14192  ac_func_search_save_LIBS=$LIBS
14193cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14194/* end confdefs.h.  */
14195
14196/* Override any GCC internal prototype to avoid an error.
14197   Use char because int might match the return type of a GCC
14198   builtin and then its argument prototype would still apply.  */
14199#ifdef __cplusplus
14200extern "C"
14201#endif
14202char inet_pton ();
14203int
14204main ()
14205{
14206return inet_pton ();
14207  ;
14208  return 0;
14209}
14210_ACEOF
14211for ac_lib in '' nsl; do
14212  if test -z "$ac_lib"; then
14213    ac_res="none required"
14214  else
14215    ac_res=-l$ac_lib
14216    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
14217  fi
14218  if ac_fn_c_try_link "$LINENO"; then :
14219  ac_cv_search_inet_pton=$ac_res
14220fi
14221rm -f core conftest.err conftest.$ac_objext \
14222    conftest$ac_exeext
14223  if ${ac_cv_search_inet_pton+:} false; then :
14224  break
14225fi
14226done
14227if ${ac_cv_search_inet_pton+:} false; then :
14228
14229else
14230  ac_cv_search_inet_pton=no
14231fi
14232rm conftest.$ac_ext
14233LIBS=$ac_func_search_save_LIBS
14234fi
14235{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_inet_pton" >&5
14236$as_echo "$ac_cv_search_inet_pton" >&6; }
14237ac_res=$ac_cv_search_inet_pton
14238if test "$ac_res" != no; then :
14239  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
14240
14241fi
14242
14243{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing socket" >&5
14244$as_echo_n "checking for library containing socket... " >&6; }
14245if ${ac_cv_search_socket+:} false; then :
14246  $as_echo_n "(cached) " >&6
14247else
14248  ac_func_search_save_LIBS=$LIBS
14249cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14250/* end confdefs.h.  */
14251
14252/* Override any GCC internal prototype to avoid an error.
14253   Use char because int might match the return type of a GCC
14254   builtin and then its argument prototype would still apply.  */
14255#ifdef __cplusplus
14256extern "C"
14257#endif
14258char socket ();
14259int
14260main ()
14261{
14262return socket ();
14263  ;
14264  return 0;
14265}
14266_ACEOF
14267for ac_lib in '' socket; do
14268  if test -z "$ac_lib"; then
14269    ac_res="none required"
14270  else
14271    ac_res=-l$ac_lib
14272    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
14273  fi
14274  if ac_fn_c_try_link "$LINENO"; then :
14275  ac_cv_search_socket=$ac_res
14276fi
14277rm -f core conftest.err conftest.$ac_objext \
14278    conftest$ac_exeext
14279  if ${ac_cv_search_socket+:} false; then :
14280  break
14281fi
14282done
14283if ${ac_cv_search_socket+:} false; then :
14284
14285else
14286  ac_cv_search_socket=no
14287fi
14288rm conftest.$ac_ext
14289LIBS=$ac_func_search_save_LIBS
14290fi
14291{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socket" >&5
14292$as_echo "$ac_cv_search_socket" >&6; }
14293ac_res=$ac_cv_search_socket
14294if test "$ac_res" != no; then :
14295  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
14296
14297fi
14298
14299
14300# check wether strptime also works
14301
14302# check some functions of the OS before linking libs (while still runnable).
14303for ac_header in unistd.h
14304do :
14305  ac_fn_c_check_header_mongrel "$LINENO" "unistd.h" "ac_cv_header_unistd_h" "$ac_includes_default"
14306if test "x$ac_cv_header_unistd_h" = xyes; then :
14307  cat >>confdefs.h <<_ACEOF
14308#define HAVE_UNISTD_H 1
14309_ACEOF
14310
14311fi
14312
14313done
14314
14315{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working chown" >&5
14316$as_echo_n "checking for working chown... " >&6; }
14317if ${ac_cv_func_chown_works+:} false; then :
14318  $as_echo_n "(cached) " >&6
14319else
14320  if test "$cross_compiling" = yes; then :
14321  ac_cv_func_chown_works=no
14322else
14323  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14324/* end confdefs.h.  */
14325$ac_includes_default
14326#include <fcntl.h>
14327
14328int
14329main ()
14330{
14331  char *f = "conftest.chown";
14332  struct stat before, after;
14333
14334  if (creat (f, 0600) < 0)
14335    return 1;
14336  if (stat (f, &before) < 0)
14337    return 1;
14338  if (chown (f, (uid_t) -1, (gid_t) -1) == -1)
14339    return 1;
14340  if (stat (f, &after) < 0)
14341    return 1;
14342  return ! (before.st_uid == after.st_uid && before.st_gid == after.st_gid);
14343
14344  ;
14345  return 0;
14346}
14347_ACEOF
14348if ac_fn_c_try_run "$LINENO"; then :
14349  ac_cv_func_chown_works=yes
14350else
14351  ac_cv_func_chown_works=no
14352fi
14353rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14354  conftest.$ac_objext conftest.beam conftest.$ac_ext
14355fi
14356
14357rm -f conftest.chown
14358
14359fi
14360{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_chown_works" >&5
14361$as_echo "$ac_cv_func_chown_works" >&6; }
14362if test $ac_cv_func_chown_works = yes; then
14363
14364$as_echo "#define HAVE_CHOWN 1" >>confdefs.h
14365
14366fi
14367
14368for ac_header in vfork.h
14369do :
14370  ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default"
14371if test "x$ac_cv_header_vfork_h" = xyes; then :
14372  cat >>confdefs.h <<_ACEOF
14373#define HAVE_VFORK_H 1
14374_ACEOF
14375
14376fi
14377
14378done
14379
14380for ac_func in fork vfork
14381do :
14382  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14383ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
14384if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
14385  cat >>confdefs.h <<_ACEOF
14386#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14387_ACEOF
14388
14389fi
14390done
14391
14392if test "x$ac_cv_func_fork" = xyes; then
14393  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5
14394$as_echo_n "checking for working fork... " >&6; }
14395if ${ac_cv_func_fork_works+:} false; then :
14396  $as_echo_n "(cached) " >&6
14397else
14398  if test "$cross_compiling" = yes; then :
14399  ac_cv_func_fork_works=cross
14400else
14401  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14402/* end confdefs.h.  */
14403$ac_includes_default
14404int
14405main ()
14406{
14407
14408	  /* By Ruediger Kuhlmann. */
14409	  return fork () < 0;
14410
14411  ;
14412  return 0;
14413}
14414_ACEOF
14415if ac_fn_c_try_run "$LINENO"; then :
14416  ac_cv_func_fork_works=yes
14417else
14418  ac_cv_func_fork_works=no
14419fi
14420rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14421  conftest.$ac_objext conftest.beam conftest.$ac_ext
14422fi
14423
14424fi
14425{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5
14426$as_echo "$ac_cv_func_fork_works" >&6; }
14427
14428else
14429  ac_cv_func_fork_works=$ac_cv_func_fork
14430fi
14431if test "x$ac_cv_func_fork_works" = xcross; then
14432  case $host in
14433    *-*-amigaos* | *-*-msdosdjgpp*)
14434      # Override, as these systems have only a dummy fork() stub
14435      ac_cv_func_fork_works=no
14436      ;;
14437    *)
14438      ac_cv_func_fork_works=yes
14439      ;;
14440  esac
14441  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
14442$as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
14443fi
14444ac_cv_func_vfork_works=$ac_cv_func_vfork
14445if test "x$ac_cv_func_vfork" = xyes; then
14446  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5
14447$as_echo_n "checking for working vfork... " >&6; }
14448if ${ac_cv_func_vfork_works+:} false; then :
14449  $as_echo_n "(cached) " >&6
14450else
14451  if test "$cross_compiling" = yes; then :
14452  ac_cv_func_vfork_works=cross
14453else
14454  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14455/* end confdefs.h.  */
14456/* Thanks to Paul Eggert for this test.  */
14457$ac_includes_default
14458#include <sys/wait.h>
14459#ifdef HAVE_VFORK_H
14460# include <vfork.h>
14461#endif
14462/* On some sparc systems, changes by the child to local and incoming
14463   argument registers are propagated back to the parent.  The compiler
14464   is told about this with #include <vfork.h>, but some compilers
14465   (e.g. gcc -O) don't grok <vfork.h>.  Test for this by using a
14466   static variable whose address is put into a register that is
14467   clobbered by the vfork.  */
14468static void
14469#ifdef __cplusplus
14470sparc_address_test (int arg)
14471# else
14472sparc_address_test (arg) int arg;
14473#endif
14474{
14475  static pid_t child;
14476  if (!child) {
14477    child = vfork ();
14478    if (child < 0) {
14479      perror ("vfork");
14480      _exit(2);
14481    }
14482    if (!child) {
14483      arg = getpid();
14484      write(-1, "", 0);
14485      _exit (arg);
14486    }
14487  }
14488}
14489
14490int
14491main ()
14492{
14493  pid_t parent = getpid ();
14494  pid_t child;
14495
14496  sparc_address_test (0);
14497
14498  child = vfork ();
14499
14500  if (child == 0) {
14501    /* Here is another test for sparc vfork register problems.  This
14502       test uses lots of local variables, at least as many local
14503       variables as main has allocated so far including compiler
14504       temporaries.  4 locals are enough for gcc 1.40.3 on a Solaris
14505       4.1.3 sparc, but we use 8 to be safe.  A buggy compiler should
14506       reuse the register of parent for one of the local variables,
14507       since it will think that parent can't possibly be used any more
14508       in this routine.  Assigning to the local variable will thus
14509       munge parent in the parent process.  */
14510    pid_t
14511      p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
14512      p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
14513    /* Convince the compiler that p..p7 are live; otherwise, it might
14514       use the same hardware register for all 8 local variables.  */
14515    if (p != p1 || p != p2 || p != p3 || p != p4
14516	|| p != p5 || p != p6 || p != p7)
14517      _exit(1);
14518
14519    /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
14520       from child file descriptors.  If the child closes a descriptor
14521       before it execs or exits, this munges the parent's descriptor
14522       as well.  Test for this by closing stdout in the child.  */
14523    _exit(close(fileno(stdout)) != 0);
14524  } else {
14525    int status;
14526    struct stat st;
14527
14528    while (wait(&status) != child)
14529      ;
14530    return (
14531	 /* Was there some problem with vforking?  */
14532	 child < 0
14533
14534	 /* Did the child fail?  (This shouldn't happen.)  */
14535	 || status
14536
14537	 /* Did the vfork/compiler bug occur?  */
14538	 || parent != getpid()
14539
14540	 /* Did the file descriptor bug occur?  */
14541	 || fstat(fileno(stdout), &st) != 0
14542	 );
14543  }
14544}
14545_ACEOF
14546if ac_fn_c_try_run "$LINENO"; then :
14547  ac_cv_func_vfork_works=yes
14548else
14549  ac_cv_func_vfork_works=no
14550fi
14551rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14552  conftest.$ac_objext conftest.beam conftest.$ac_ext
14553fi
14554
14555fi
14556{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5
14557$as_echo "$ac_cv_func_vfork_works" >&6; }
14558
14559fi;
14560if test "x$ac_cv_func_fork_works" = xcross; then
14561  ac_cv_func_vfork_works=$ac_cv_func_vfork
14562  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
14563$as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
14564fi
14565
14566if test "x$ac_cv_func_vfork_works" = xyes; then
14567
14568$as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h
14569
14570else
14571
14572$as_echo "#define vfork fork" >>confdefs.h
14573
14574fi
14575if test "x$ac_cv_func_fork_works" = xyes; then
14576
14577$as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h
14578
14579fi
14580
14581{ $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of signal handlers" >&5
14582$as_echo_n "checking return type of signal handlers... " >&6; }
14583if ${ac_cv_type_signal+:} false; then :
14584  $as_echo_n "(cached) " >&6
14585else
14586  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14587/* end confdefs.h.  */
14588#include <sys/types.h>
14589#include <signal.h>
14590
14591int
14592main ()
14593{
14594return *(signal (0, 0)) (0) == 1;
14595  ;
14596  return 0;
14597}
14598_ACEOF
14599if ac_fn_c_try_compile "$LINENO"; then :
14600  ac_cv_type_signal=int
14601else
14602  ac_cv_type_signal=void
14603fi
14604rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14605fi
14606{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_signal" >&5
14607$as_echo "$ac_cv_type_signal" >&6; }
14608
14609cat >>confdefs.h <<_ACEOF
14610#define RETSIGTYPE $ac_cv_type_signal
14611_ACEOF
14612
14613
14614{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGEFILE_SOURCE value needed for large files" >&5
14615$as_echo_n "checking for _LARGEFILE_SOURCE value needed for large files... " >&6; }
14616if ${ac_cv_sys_largefile_source+:} false; then :
14617  $as_echo_n "(cached) " >&6
14618else
14619  while :; do
14620  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14621/* end confdefs.h.  */
14622#include <sys/types.h> /* for off_t */
14623     #include <stdio.h>
14624int
14625main ()
14626{
14627int (*fp) (FILE *, off_t, int) = fseeko;
14628     return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
14629  ;
14630  return 0;
14631}
14632_ACEOF
14633if ac_fn_c_try_link "$LINENO"; then :
14634  ac_cv_sys_largefile_source=no; break
14635fi
14636rm -f core conftest.err conftest.$ac_objext \
14637    conftest$ac_exeext conftest.$ac_ext
14638  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14639/* end confdefs.h.  */
14640#define _LARGEFILE_SOURCE 1
14641#include <sys/types.h> /* for off_t */
14642     #include <stdio.h>
14643int
14644main ()
14645{
14646int (*fp) (FILE *, off_t, int) = fseeko;
14647     return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
14648  ;
14649  return 0;
14650}
14651_ACEOF
14652if ac_fn_c_try_link "$LINENO"; then :
14653  ac_cv_sys_largefile_source=1; break
14654fi
14655rm -f core conftest.err conftest.$ac_objext \
14656    conftest$ac_exeext conftest.$ac_ext
14657  ac_cv_sys_largefile_source=unknown
14658  break
14659done
14660fi
14661{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_source" >&5
14662$as_echo "$ac_cv_sys_largefile_source" >&6; }
14663case $ac_cv_sys_largefile_source in #(
14664  no | unknown) ;;
14665  *)
14666cat >>confdefs.h <<_ACEOF
14667#define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
14668_ACEOF
14669;;
14670esac
14671rm -rf conftest*
14672
14673# We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
14674# in glibc 2.1.3, but that breaks too many other things.
14675# If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
14676if test $ac_cv_sys_largefile_source != unknown; then
14677
14678$as_echo "#define HAVE_FSEEKO 1" >>confdefs.h
14679
14680fi
14681
14682
14683# Check whether --enable-largefile was given.
14684if test "${enable_largefile+set}" = set; then :
14685  enableval=$enable_largefile;
14686fi
14687
14688if test "$enable_largefile" != no; then
14689
14690  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
14691$as_echo_n "checking for special C compiler options needed for large files... " >&6; }
14692if ${ac_cv_sys_largefile_CC+:} false; then :
14693  $as_echo_n "(cached) " >&6
14694else
14695  ac_cv_sys_largefile_CC=no
14696     if test "$GCC" != yes; then
14697       ac_save_CC=$CC
14698       while :; do
14699	 # IRIX 6.2 and later do not support large files by default,
14700	 # so use the C compiler's -n32 option if that helps.
14701	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14702/* end confdefs.h.  */
14703#include <sys/types.h>
14704 /* Check that off_t can represent 2**63 - 1 correctly.
14705    We can't simply define LARGE_OFF_T to be 9223372036854775807,
14706    since some C++ compilers masquerading as C compilers
14707    incorrectly reject 9223372036854775807.  */
14708#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
14709  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
14710		       && LARGE_OFF_T % 2147483647 == 1)
14711		      ? 1 : -1];
14712int
14713main ()
14714{
14715
14716  ;
14717  return 0;
14718}
14719_ACEOF
14720	 if ac_fn_c_try_compile "$LINENO"; then :
14721  break
14722fi
14723rm -f core conftest.err conftest.$ac_objext
14724	 CC="$CC -n32"
14725	 if ac_fn_c_try_compile "$LINENO"; then :
14726  ac_cv_sys_largefile_CC=' -n32'; break
14727fi
14728rm -f core conftest.err conftest.$ac_objext
14729	 break
14730       done
14731       CC=$ac_save_CC
14732       rm -f conftest.$ac_ext
14733    fi
14734fi
14735{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
14736$as_echo "$ac_cv_sys_largefile_CC" >&6; }
14737  if test "$ac_cv_sys_largefile_CC" != no; then
14738    CC=$CC$ac_cv_sys_largefile_CC
14739  fi
14740
14741  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
14742$as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
14743if ${ac_cv_sys_file_offset_bits+:} false; then :
14744  $as_echo_n "(cached) " >&6
14745else
14746  while :; do
14747  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14748/* end confdefs.h.  */
14749#include <sys/types.h>
14750 /* Check that off_t can represent 2**63 - 1 correctly.
14751    We can't simply define LARGE_OFF_T to be 9223372036854775807,
14752    since some C++ compilers masquerading as C compilers
14753    incorrectly reject 9223372036854775807.  */
14754#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
14755  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
14756		       && LARGE_OFF_T % 2147483647 == 1)
14757		      ? 1 : -1];
14758int
14759main ()
14760{
14761
14762  ;
14763  return 0;
14764}
14765_ACEOF
14766if ac_fn_c_try_compile "$LINENO"; then :
14767  ac_cv_sys_file_offset_bits=no; break
14768fi
14769rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14770  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14771/* end confdefs.h.  */
14772#define _FILE_OFFSET_BITS 64
14773#include <sys/types.h>
14774 /* Check that off_t can represent 2**63 - 1 correctly.
14775    We can't simply define LARGE_OFF_T to be 9223372036854775807,
14776    since some C++ compilers masquerading as C compilers
14777    incorrectly reject 9223372036854775807.  */
14778#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
14779  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
14780		       && LARGE_OFF_T % 2147483647 == 1)
14781		      ? 1 : -1];
14782int
14783main ()
14784{
14785
14786  ;
14787  return 0;
14788}
14789_ACEOF
14790if ac_fn_c_try_compile "$LINENO"; then :
14791  ac_cv_sys_file_offset_bits=64; break
14792fi
14793rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14794  ac_cv_sys_file_offset_bits=unknown
14795  break
14796done
14797fi
14798{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
14799$as_echo "$ac_cv_sys_file_offset_bits" >&6; }
14800case $ac_cv_sys_file_offset_bits in #(
14801  no | unknown) ;;
14802  *)
14803cat >>confdefs.h <<_ACEOF
14804#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
14805_ACEOF
14806;;
14807esac
14808rm -rf conftest*
14809  if test $ac_cv_sys_file_offset_bits = unknown; then
14810    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
14811$as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
14812if ${ac_cv_sys_large_files+:} false; then :
14813  $as_echo_n "(cached) " >&6
14814else
14815  while :; do
14816  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14817/* end confdefs.h.  */
14818#include <sys/types.h>
14819 /* Check that off_t can represent 2**63 - 1 correctly.
14820    We can't simply define LARGE_OFF_T to be 9223372036854775807,
14821    since some C++ compilers masquerading as C compilers
14822    incorrectly reject 9223372036854775807.  */
14823#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
14824  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
14825		       && LARGE_OFF_T % 2147483647 == 1)
14826		      ? 1 : -1];
14827int
14828main ()
14829{
14830
14831  ;
14832  return 0;
14833}
14834_ACEOF
14835if ac_fn_c_try_compile "$LINENO"; then :
14836  ac_cv_sys_large_files=no; break
14837fi
14838rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14839  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14840/* end confdefs.h.  */
14841#define _LARGE_FILES 1
14842#include <sys/types.h>
14843 /* Check that off_t can represent 2**63 - 1 correctly.
14844    We can't simply define LARGE_OFF_T to be 9223372036854775807,
14845    since some C++ compilers masquerading as C compilers
14846    incorrectly reject 9223372036854775807.  */
14847#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
14848  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
14849		       && LARGE_OFF_T % 2147483647 == 1)
14850		      ? 1 : -1];
14851int
14852main ()
14853{
14854
14855  ;
14856  return 0;
14857}
14858_ACEOF
14859if ac_fn_c_try_compile "$LINENO"; then :
14860  ac_cv_sys_large_files=1; break
14861fi
14862rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14863  ac_cv_sys_large_files=unknown
14864  break
14865done
14866fi
14867{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
14868$as_echo "$ac_cv_sys_large_files" >&6; }
14869case $ac_cv_sys_large_files in #(
14870  no | unknown) ;;
14871  *)
14872cat >>confdefs.h <<_ACEOF
14873#define _LARGE_FILES $ac_cv_sys_large_files
14874_ACEOF
14875;;
14876esac
14877rm -rf conftest*
14878  fi
14879
14880
14881fi
14882
14883
14884
14885
14886{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we need -D_LARGEFILE_SOURCE=1 as a flag for $CC" >&5
14887$as_echo_n "checking whether we need -D_LARGEFILE_SOURCE=1 as a flag for $CC... " >&6; }
14888cache=_D_LARGEFILE_SOURCE_1
14889if eval \${cv_prog_cc_flag_needed_$cache+:} false; then :
14890  $as_echo_n "(cached) " >&6
14891else
14892
14893echo '
14894#include <stdio.h>
14895int test() {
14896        int a = fseeko(stdin, 0, 0);
14897        return a;
14898}
14899' > conftest.c
14900echo 'void f(){}' >>conftest.c
14901if test -z "`$CC $CPPFLAGS $CFLAGS $ERRFLAG -c conftest.c 2>&1`"; then
14902eval "cv_prog_cc_flag_needed_$cache=no"
14903else
14904
14905if test -z "`$CC $CPPFLAGS $CFLAGS -D_LARGEFILE_SOURCE=1 $ERRFLAG -c conftest.c 2>&1`"; then
14906eval "cv_prog_cc_flag_needed_$cache=yes"
14907else
14908eval "cv_prog_cc_flag_needed_$cache=fail"
14909#echo 'Test with flag fails too!'
14910#cat conftest.c
14911#echo "$CC $CPPFLAGS $CFLAGS -D_LARGEFILE_SOURCE=1 $ERRFLAG -c conftest.c 2>&1"
14912#echo `$CC $CPPFLAGS $CFLAGS -D_LARGEFILE_SOURCE=1 $ERRFLAG -c conftest.c 2>&1`
14913#exit 1
14914fi
14915
14916fi
14917rm -f conftest conftest.c conftest.o
14918
14919fi
14920
14921if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = yes"; then
14922{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14923$as_echo "yes" >&6; }
14924:
14925CFLAGS="$CFLAGS -D_LARGEFILE_SOURCE=1"
14926else
14927if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = no"; then
14928{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14929$as_echo "no" >&6; }
14930#echo 'Test with flag is no!'
14931#cat conftest.c
14932#echo "$CC $CPPFLAGS $CFLAGS -D_LARGEFILE_SOURCE=1 $ERRFLAG -c conftest.c 2>&1"
14933#echo `$CC $CPPFLAGS $CFLAGS -D_LARGEFILE_SOURCE=1 $ERRFLAG -c conftest.c 2>&1`
14934#exit 1
14935:
14936
14937else
14938{ $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
14939$as_echo "failed" >&6; }
14940:
14941
14942fi
14943fi
14944
14945
14946
14947{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if nonblocking sockets work" >&5
14948$as_echo_n "checking if nonblocking sockets work... " >&6; }
14949if echo $target | grep mingw32 >/dev/null; then
14950	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no (windows)" >&5
14951$as_echo "no (windows)" >&6; }
14952
14953$as_echo "#define NONBLOCKING_IS_BROKEN 1" >>confdefs.h
14954
14955else
14956if test "$cross_compiling" = yes; then :
14957
14958	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: crosscompile(yes)" >&5
14959$as_echo "crosscompile(yes)" >&6; }
14960
14961else
14962  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14963/* end confdefs.h.  */
14964
14965
14966#include <stdio.h>
14967#include <string.h>
14968#include <stdlib.h>
14969#include <fcntl.h>
14970#include <errno.h>
14971#ifdef HAVE_SYS_TYPES_H
14972#include <sys/types.h>
14973#endif
14974#ifdef HAVE_SYS_SOCKET_H
14975#include <sys/socket.h>
14976#endif
14977#ifdef HAVE_NETINET_IN_H
14978#include <netinet/in.h>
14979#endif
14980#ifdef HAVE_ARPA_INET_H
14981#include <arpa/inet.h>
14982#endif
14983#ifdef HAVE_UNISTD_H
14984#include <unistd.h>
14985#endif
14986#ifdef HAVE_TIME_H
14987#include <time.h>
14988#endif
14989
14990int main(void)
14991{
14992	int port;
14993	int sfd, cfd;
14994	int num = 10;
14995	int i, p;
14996	struct sockaddr_in a;
14997	/* test if select and nonblocking reads work well together */
14998	/* open port.
14999	   fork child to send 10 messages.
15000	   select to read.
15001	   then try to nonblocking read the 10 messages
15002	   then, nonblocking read must give EAGAIN
15003	*/
15004
15005	port = 12345 + (time(0)%32);
15006	sfd = socket(PF_INET, SOCK_DGRAM, 0);
15007	if(sfd == -1) {
15008		perror("socket");
15009		return 1;
15010	}
15011	memset(&a, 0, sizeof(a));
15012	a.sin_family = AF_INET;
15013	a.sin_port = htons(port);
15014	a.sin_addr.s_addr = inet_addr("127.0.0.1");
15015	if(bind(sfd, (struct sockaddr*)&a, sizeof(a)) < 0) {
15016		perror("bind");
15017		return 1;
15018	}
15019	if(fcntl(sfd, F_SETFL, O_NONBLOCK) == -1) {
15020		perror("fcntl");
15021		return 1;
15022	}
15023
15024	cfd = socket(PF_INET, SOCK_DGRAM, 0);
15025	if(cfd == -1) {
15026		perror("client socket");
15027		return 1;
15028	}
15029	a.sin_port = 0;
15030	if(bind(cfd, (struct sockaddr*)&a, sizeof(a)) < 0) {
15031		perror("client bind");
15032		return 1;
15033	}
15034	a.sin_port = htons(port);
15035
15036	/* no handler, causes exit in 10 seconds */
15037	alarm(10);
15038
15039	/* send and receive on the socket */
15040	if((p=fork()) == 0) {
15041		for(i=0; i<num; i++) {
15042			if(sendto(cfd, &i, sizeof(i), 0,
15043				(struct sockaddr*)&a, sizeof(a)) < 0) {
15044				perror("sendto");
15045				return 1;
15046			}
15047		}
15048	} else {
15049		/* parent */
15050		fd_set rset;
15051		int x;
15052		if(p == -1) {
15053			perror("fork");
15054			return 1;
15055		}
15056		FD_ZERO(&rset);
15057		FD_SET(sfd, &rset);
15058		if(select(sfd+1, &rset, NULL, NULL, NULL) < 1) {
15059			perror("select");
15060			return 1;
15061		}
15062		i = 0;
15063		while(i < num) {
15064			if(recv(sfd, &x, sizeof(x), 0) != sizeof(x)) {
15065				if(errno == EAGAIN)
15066					continue;
15067				perror("recv");
15068				return 1;
15069			}
15070			i++;
15071		}
15072		/* now we want to get EAGAIN: nonblocking goodness */
15073		errno = 0;
15074		recv(sfd, &x, sizeof(x), 0);
15075		if(errno != EAGAIN) {
15076			perror("trying to recv again");
15077			return 1;
15078		}
15079		/* EAGAIN encountered */
15080	}
15081
15082	close(sfd);
15083	close(cfd);
15084	return 0;
15085}
15086
15087_ACEOF
15088if ac_fn_c_try_run "$LINENO"; then :
15089
15090	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15091$as_echo "yes" >&6; }
15092
15093else
15094
15095	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15096$as_echo "no" >&6; }
15097
15098$as_echo "#define NONBLOCKING_IS_BROKEN 1" >>confdefs.h
15099
15100
15101fi
15102rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15103  conftest.$ac_objext conftest.beam conftest.$ac_ext
15104fi
15105
15106fi
15107
15108
15109{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mkdir has one arg" >&5
15110$as_echo_n "checking whether mkdir has one arg... " >&6; }
15111cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15112/* end confdefs.h.  */
15113
15114#include <stdio.h>
15115#include <unistd.h>
15116#ifdef HAVE_WINSOCK2_H
15117#include <winsock2.h>
15118#endif
15119#ifdef HAVE_SYS_STAT_H
15120#include <sys/stat.h>
15121#endif
15122
15123int
15124main ()
15125{
15126
15127	(void)mkdir("directory");
15128
15129  ;
15130  return 0;
15131}
15132_ACEOF
15133if ac_fn_c_try_compile "$LINENO"; then :
15134  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15135$as_echo "yes" >&6; }
15136
15137$as_echo "#define MKDIR_HAS_ONE_ARG 1" >>confdefs.h
15138
15139
15140else
15141  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15142$as_echo "no" >&6; }
15143
15144fi
15145rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15146
15147for ac_func in strptime
15148do :
15149  ac_fn_c_check_func "$LINENO" "strptime" "ac_cv_func_strptime"
15150if test "x$ac_cv_func_strptime" = xyes; then :
15151  cat >>confdefs.h <<_ACEOF
15152#define HAVE_STRPTIME 1
15153_ACEOF
15154
15155{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strptime works" >&5
15156$as_echo_n "checking whether strptime works... " >&6; }
15157if test c${cross_compiling} = cno; then
15158if test "$cross_compiling" = yes; then :
15159  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
15160$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
15161as_fn_error $? "cannot run test program while cross compiling
15162See \`config.log' for more details" "$LINENO" 5; }
15163else
15164  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15165/* end confdefs.h.  */
15166
15167#define _XOPEN_SOURCE 600
15168#include <time.h>
15169int main(void) { struct tm tm; char *res;
15170res = 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);
15171if (!res) return 2;
15172res = strptime("20070207111842", "%Y%m%d%H%M%S", &tm);
15173if (!res) return 1; return 0; }
15174
15175_ACEOF
15176if ac_fn_c_try_run "$LINENO"; then :
15177  eval "ac_cv_c_strptime_works=yes"
15178else
15179  eval "ac_cv_c_strptime_works=no"
15180fi
15181rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15182  conftest.$ac_objext conftest.beam conftest.$ac_ext
15183fi
15184
15185else
15186eval "ac_cv_c_strptime_works=maybe"
15187fi
15188{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_strptime_works" >&5
15189$as_echo "$ac_cv_c_strptime_works" >&6; }
15190if test $ac_cv_c_strptime_works = no; then
15191case " $LIBOBJS " in
15192  *" strptime.$ac_objext "* ) ;;
15193  *) LIBOBJS="$LIBOBJS strptime.$ac_objext"
15194 ;;
15195esac
15196
15197else
15198
15199cat >>confdefs.h <<_ACEOF
15200#define STRPTIME_WORKS 1
15201_ACEOF
15202
15203fi
15204
15205else
15206  case " $LIBOBJS " in
15207  *" strptime.$ac_objext "* ) ;;
15208  *) LIBOBJS="$LIBOBJS strptime.$ac_objext"
15209 ;;
15210esac
15211
15212fi
15213done
15214
15215
15216# set memory allocation checking if requested
15217# Check whether --enable-alloc-checks was given.
15218if test "${enable_alloc_checks+set}" = set; then :
15219  enableval=$enable_alloc_checks;
15220fi
15221
15222# Check whether --enable-alloc-lite was given.
15223if test "${enable_alloc_lite+set}" = set; then :
15224  enableval=$enable_alloc_lite;
15225fi
15226
15227# Check whether --enable-alloc-nonregional was given.
15228if test "${enable_alloc_nonregional+set}" = set; then :
15229  enableval=$enable_alloc_nonregional;
15230fi
15231
15232if test x_$enable_alloc_nonregional = x_yes; then
15233
15234$as_echo "#define UNBOUND_ALLOC_NONREGIONAL 1" >>confdefs.h
15235
15236fi
15237if test x_$enable_alloc_checks = x_yes; then
15238
15239$as_echo "#define UNBOUND_ALLOC_STATS 1" >>confdefs.h
15240
15241else
15242	if test x_$enable_alloc_lite = x_yes; then
15243
15244$as_echo "#define UNBOUND_ALLOC_LITE 1" >>confdefs.h
15245
15246	else
15247
15248	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible malloc" >&5
15249$as_echo_n "checking for GNU libc compatible malloc... " >&6; }
15250	if test "$cross_compiling" = yes; then :
15251  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no (crosscompile)" >&5
15252$as_echo "no (crosscompile)" >&6; }
15253	case " $LIBOBJS " in
15254  *" malloc.$ac_objext "* ) ;;
15255  *) LIBOBJS="$LIBOBJS malloc.$ac_objext"
15256 ;;
15257esac
15258
15259
15260cat >>confdefs.h <<_ACEOF
15261#define malloc rpl_malloc_unbound
15262_ACEOF
15263
15264else
15265  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15266/* end confdefs.h.  */
15267#if defined STDC_HEADERS || defined HAVE_STDLIB_H
15268#include <stdlib.h>
15269#else
15270char *malloc ();
15271#endif
15272
15273int
15274main ()
15275{
15276 if(malloc(0) != 0) return 1;
15277  ;
15278  return 0;
15279}
15280
15281_ACEOF
15282if ac_fn_c_try_run "$LINENO"; then :
15283  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15284$as_echo "no" >&6; }
15285	case " $LIBOBJS " in
15286  *" malloc.$ac_objext "* ) ;;
15287  *) LIBOBJS="$LIBOBJS malloc.$ac_objext"
15288 ;;
15289esac
15290
15291
15292cat >>confdefs.h <<_ACEOF
15293#define malloc rpl_malloc_unbound
15294_ACEOF
15295
15296else
15297  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15298$as_echo "yes" >&6; }
15299
15300$as_echo "#define HAVE_MALLOC 1" >>confdefs.h
15301
15302fi
15303rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15304  conftest.$ac_objext conftest.beam conftest.$ac_ext
15305fi
15306
15307
15308	fi
15309fi
15310
15311# check windows threads (we use them, not pthreads, on windows).
15312if test "$on_mingw" = "yes"; then
15313# check windows threads
15314	for ac_header in windows.h
15315do :
15316  ac_fn_c_check_header_compile "$LINENO" "windows.h" "ac_cv_header_windows_h" "$ac_includes_default
15317"
15318if test "x$ac_cv_header_windows_h" = xyes; then :
15319  cat >>confdefs.h <<_ACEOF
15320#define HAVE_WINDOWS_H 1
15321_ACEOF
15322
15323fi
15324
15325done
15326
15327	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for CreateThread" >&5
15328$as_echo_n "checking for CreateThread... " >&6; }
15329	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15330/* end confdefs.h.  */
15331
15332#ifdef HAVE_WINDOWS_H
15333#include <windows.h>
15334#endif
15335
15336int
15337main ()
15338{
15339
15340	HANDLE t = CreateThread(NULL, 0, NULL, NULL, 0, NULL);
15341
15342  ;
15343  return 0;
15344}
15345_ACEOF
15346if ac_fn_c_try_compile "$LINENO"; then :
15347  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15348$as_echo "yes" >&6; }
15349
15350$as_echo "#define HAVE_WINDOWS_THREADS 1" >>confdefs.h
15351
15352
15353else
15354  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15355$as_echo "no" >&6; }
15356
15357fi
15358rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15359
15360else
15361# not on mingw, check thread libraries.
15362
15363# check for thread library.
15364# check this first, so that the pthread lib does not get linked in via
15365# libssl or libpython, and thus distorts the tests, and we end up using
15366# the non-threadsafe C libraries.
15367
15368# Check whether --with-pthreads was given.
15369if test "${with_pthreads+set}" = set; then :
15370  withval=$with_pthreads;
15371else
15372   withval="yes"
15373fi
15374
15375ub_have_pthreads=no
15376if test x_$withval != x_no; then
15377
15378
15379ac_ext=c
15380ac_cpp='$CPP $CPPFLAGS'
15381ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15382ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15383ac_compiler_gnu=$ac_cv_c_compiler_gnu
15384
15385ax_pthread_ok=no
15386
15387# We used to check for pthread.h first, but this fails if pthread.h
15388# requires special compiler flags (e.g. on True64 or Sequent).
15389# It gets checked for in the link test anyway.
15390
15391# First of all, check if the user has set any of the PTHREAD_LIBS,
15392# etcetera environment variables, and if threads linking works using
15393# them:
15394if test x"$PTHREAD_LIBS$PTHREAD_CFLAGS" != x; then
15395        save_CFLAGS="$CFLAGS"
15396        CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
15397        save_LIBS="$LIBS"
15398        LIBS="$PTHREAD_LIBS $LIBS"
15399        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS" >&5
15400$as_echo_n "checking for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS... " >&6; }
15401        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15402/* end confdefs.h.  */
15403
15404/* Override any GCC internal prototype to avoid an error.
15405   Use char because int might match the return type of a GCC
15406   builtin and then its argument prototype would still apply.  */
15407#ifdef __cplusplus
15408extern "C"
15409#endif
15410char pthread_join ();
15411int
15412main ()
15413{
15414return pthread_join ();
15415  ;
15416  return 0;
15417}
15418_ACEOF
15419if ac_fn_c_try_link "$LINENO"; then :
15420  ax_pthread_ok=yes
15421fi
15422rm -f core conftest.err conftest.$ac_objext \
15423    conftest$ac_exeext conftest.$ac_ext
15424        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
15425$as_echo "$ax_pthread_ok" >&6; }
15426        if test x"$ax_pthread_ok" = xno; then
15427                PTHREAD_LIBS=""
15428                PTHREAD_CFLAGS=""
15429        fi
15430        LIBS="$save_LIBS"
15431        CFLAGS="$save_CFLAGS"
15432fi
15433
15434# We must check for the threads library under a number of different
15435# names; the ordering is very important because some systems
15436# (e.g. DEC) have both -lpthread and -lpthreads, where one of the
15437# libraries is broken (non-POSIX).
15438
15439# Create a list of thread flags to try.  Items starting with a "-" are
15440# C compiler flags, and other items are library names, except for "none"
15441# which indicates that we try without any flags at all, and "pthread-config"
15442# which is a program returning the flags for the Pth emulation library.
15443
15444ax_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config"
15445
15446# The ordering *is* (sometimes) important.  Some notes on the
15447# individual items follow:
15448
15449# pthreads: AIX (must check this before -lpthread)
15450# none: in case threads are in libc; should be tried before -Kthread and
15451#       other compiler flags to prevent continual compiler warnings
15452# -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h)
15453# -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
15454# lthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
15455# -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads)
15456# -pthreads: Solaris/gcc
15457# -mthreads: Mingw32/gcc, Lynx/gcc
15458# -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
15459#      doesn't hurt to check since this sometimes defines pthreads too;
15460#      also defines -D_REENTRANT)
15461#      ... -mt is also the pthreads flag for HP/aCC
15462# pthread: Linux, etcetera
15463# --thread-safe: KAI C++
15464# pthread-config: use pthread-config program (for GNU Pth library)
15465
15466case ${host_os} in
15467        solaris*)
15468
15469        # On Solaris (at least, for some versions), libc contains stubbed
15470        # (non-functional) versions of the pthreads routines, so link-based
15471        # tests will erroneously succeed.  (We need to link with -pthreads/-mt/
15472        # -lpthread.)  (The stubs are missing pthread_cleanup_push, or rather
15473        # a function called by this macro, so we could check for that, but
15474        # who knows whether they'll stub that too in a future libc.)  So,
15475        # we'll just look for -pthreads and -lpthread first:
15476
15477        ax_pthread_flags="-pthreads pthread -mt -pthread $ax_pthread_flags"
15478        ;;
15479
15480        darwin*)
15481        ax_pthread_flags="-pthread $ax_pthread_flags"
15482        ;;
15483esac
15484
15485if test x"$ax_pthread_ok" = xno; then
15486for flag in $ax_pthread_flags; do
15487
15488        case $flag in
15489                none)
15490                { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work without any flags" >&5
15491$as_echo_n "checking whether pthreads work without any flags... " >&6; }
15492                ;;
15493
15494                -*)
15495                { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with $flag" >&5
15496$as_echo_n "checking whether pthreads work with $flag... " >&6; }
15497                PTHREAD_CFLAGS="$flag"
15498                ;;
15499
15500                pthread-config)
15501                # Extract the first word of "pthread-config", so it can be a program name with args.
15502set dummy pthread-config; ac_word=$2
15503{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15504$as_echo_n "checking for $ac_word... " >&6; }
15505if ${ac_cv_prog_ax_pthread_config+:} false; then :
15506  $as_echo_n "(cached) " >&6
15507else
15508  if test -n "$ax_pthread_config"; then
15509  ac_cv_prog_ax_pthread_config="$ax_pthread_config" # Let the user override the test.
15510else
15511as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15512for as_dir in $PATH
15513do
15514  IFS=$as_save_IFS
15515  test -z "$as_dir" && as_dir=.
15516    for ac_exec_ext in '' $ac_executable_extensions; do
15517  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15518    ac_cv_prog_ax_pthread_config="yes"
15519    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15520    break 2
15521  fi
15522done
15523  done
15524IFS=$as_save_IFS
15525
15526  test -z "$ac_cv_prog_ax_pthread_config" && ac_cv_prog_ax_pthread_config="no"
15527fi
15528fi
15529ax_pthread_config=$ac_cv_prog_ax_pthread_config
15530if test -n "$ax_pthread_config"; then
15531  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_config" >&5
15532$as_echo "$ax_pthread_config" >&6; }
15533else
15534  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15535$as_echo "no" >&6; }
15536fi
15537
15538
15539                if test x"$ax_pthread_config" = xno; then continue; fi
15540                PTHREAD_CFLAGS="`pthread-config --cflags`"
15541                PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`"
15542                ;;
15543
15544                *)
15545                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the pthreads library -l$flag" >&5
15546$as_echo_n "checking for the pthreads library -l$flag... " >&6; }
15547                PTHREAD_LIBS="-l$flag"
15548                ;;
15549        esac
15550
15551        save_LIBS="$LIBS"
15552        save_CFLAGS="$CFLAGS"
15553        LIBS="$PTHREAD_LIBS $LIBS"
15554        CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
15555
15556        # Check for various functions.  We must include pthread.h,
15557        # since some functions may be macros.  (On the Sequent, we
15558        # need a special flag -Kthread to make this header compile.)
15559        # We check for pthread_join because it is in -lpthread on IRIX
15560        # while pthread_create is in libc.  We check for pthread_attr_init
15561        # due to DEC craziness with -lpthreads.  We check for
15562        # pthread_cleanup_push because it is one of the few pthread
15563        # functions on Solaris that doesn't have a non-functional libc stub.
15564        # We try pthread_create on general principles.
15565        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15566/* end confdefs.h.  */
15567#include <pthread.h>
15568                        static void routine(void *a) { *((int*)a) = 0; }
15569                        static void *start_routine(void *a) { return a; }
15570int
15571main ()
15572{
15573pthread_t th; pthread_attr_t attr;
15574                        pthread_create(&th, 0, start_routine, 0);
15575                        pthread_join(th, 0);
15576                        pthread_attr_init(&attr);
15577                        pthread_cleanup_push(routine, 0);
15578                        pthread_cleanup_pop(0) /* ; */
15579  ;
15580  return 0;
15581}
15582_ACEOF
15583if ac_fn_c_try_link "$LINENO"; then :
15584  ax_pthread_ok=yes
15585fi
15586rm -f core conftest.err conftest.$ac_objext \
15587    conftest$ac_exeext conftest.$ac_ext
15588
15589        LIBS="$save_LIBS"
15590        CFLAGS="$save_CFLAGS"
15591
15592        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
15593$as_echo "$ax_pthread_ok" >&6; }
15594        if test "x$ax_pthread_ok" = xyes; then
15595                break;
15596        fi
15597
15598        PTHREAD_LIBS=""
15599        PTHREAD_CFLAGS=""
15600done
15601fi
15602
15603# Various other checks:
15604if test "x$ax_pthread_ok" = xyes; then
15605        save_LIBS="$LIBS"
15606        LIBS="$PTHREAD_LIBS $LIBS"
15607        save_CFLAGS="$CFLAGS"
15608        CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
15609
15610        # Detect AIX lossage: JOINABLE attribute is called UNDETACHED.
15611        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for joinable pthread attribute" >&5
15612$as_echo_n "checking for joinable pthread attribute... " >&6; }
15613        attr_name=unknown
15614        for attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do
15615            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15616/* end confdefs.h.  */
15617#include <pthread.h>
15618int
15619main ()
15620{
15621int attr = $attr; return attr /* ; */
15622  ;
15623  return 0;
15624}
15625_ACEOF
15626if ac_fn_c_try_link "$LINENO"; then :
15627  attr_name=$attr; break
15628fi
15629rm -f core conftest.err conftest.$ac_objext \
15630    conftest$ac_exeext conftest.$ac_ext
15631        done
15632        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $attr_name" >&5
15633$as_echo "$attr_name" >&6; }
15634        if test "$attr_name" != PTHREAD_CREATE_JOINABLE; then
15635
15636cat >>confdefs.h <<_ACEOF
15637#define PTHREAD_CREATE_JOINABLE $attr_name
15638_ACEOF
15639
15640        fi
15641
15642        { $as_echo "$as_me:${as_lineno-$LINENO}: checking if more special flags are required for pthreads" >&5
15643$as_echo_n "checking if more special flags are required for pthreads... " >&6; }
15644        flag=no
15645        case ${host_os} in
15646            aix* | freebsd* | darwin*) flag="-D_THREAD_SAFE";;
15647            osf* | hpux*) flag="-D_REENTRANT";;
15648            solaris*)
15649            if test "$GCC" = "yes"; then
15650                flag="-D_REENTRANT"
15651            else
15652                flag="-mt -D_REENTRANT"
15653            fi
15654            ;;
15655        esac
15656        { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${flag}" >&5
15657$as_echo "${flag}" >&6; }
15658        if test "x$flag" != xno; then
15659            PTHREAD_CFLAGS="$flag $PTHREAD_CFLAGS"
15660        fi
15661
15662        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTHREAD_PRIO_INHERIT" >&5
15663$as_echo_n "checking for PTHREAD_PRIO_INHERIT... " >&6; }
15664if ${ax_cv_PTHREAD_PRIO_INHERIT+:} false; then :
15665  $as_echo_n "(cached) " >&6
15666else
15667
15668                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15669/* end confdefs.h.  */
15670
15671                    #include <pthread.h>
15672int
15673main ()
15674{
15675int i = PTHREAD_PRIO_INHERIT;
15676  ;
15677  return 0;
15678}
15679_ACEOF
15680if ac_fn_c_try_link "$LINENO"; then :
15681  ax_cv_PTHREAD_PRIO_INHERIT=yes
15682else
15683  ax_cv_PTHREAD_PRIO_INHERIT=no
15684fi
15685rm -f core conftest.err conftest.$ac_objext \
15686    conftest$ac_exeext conftest.$ac_ext
15687
15688fi
15689{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_PRIO_INHERIT" >&5
15690$as_echo "$ax_cv_PTHREAD_PRIO_INHERIT" >&6; }
15691        if test "x$ax_cv_PTHREAD_PRIO_INHERIT" = "xyes"; then :
15692
15693$as_echo "#define HAVE_PTHREAD_PRIO_INHERIT 1" >>confdefs.h
15694
15695fi
15696
15697        LIBS="$save_LIBS"
15698        CFLAGS="$save_CFLAGS"
15699
15700        # More AIX lossage: compile with *_r variant
15701        if test "x$GCC" != xyes; then
15702            case $host_os in
15703                aix*)
15704                case "x/$CC" in #(
15705  x*/c89|x*/c89_128|x*/c99|x*/c99_128|x*/cc|x*/cc128|x*/xlc|x*/xlc_v6|x*/xlc128|x*/xlc128_v6) :
15706    #handle absolute path differently from PATH based program lookup
15707                   case "x$CC" in #(
15708  x/*) :
15709    if as_fn_executable_p ${CC}_r; then :
15710  PTHREAD_CC="${CC}_r"
15711fi ;; #(
15712  *) :
15713    for ac_prog in ${CC}_r
15714do
15715  # Extract the first word of "$ac_prog", so it can be a program name with args.
15716set dummy $ac_prog; ac_word=$2
15717{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15718$as_echo_n "checking for $ac_word... " >&6; }
15719if ${ac_cv_prog_PTHREAD_CC+:} false; then :
15720  $as_echo_n "(cached) " >&6
15721else
15722  if test -n "$PTHREAD_CC"; then
15723  ac_cv_prog_PTHREAD_CC="$PTHREAD_CC" # Let the user override the test.
15724else
15725as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15726for as_dir in $PATH
15727do
15728  IFS=$as_save_IFS
15729  test -z "$as_dir" && as_dir=.
15730    for ac_exec_ext in '' $ac_executable_extensions; do
15731  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15732    ac_cv_prog_PTHREAD_CC="$ac_prog"
15733    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15734    break 2
15735  fi
15736done
15737  done
15738IFS=$as_save_IFS
15739
15740fi
15741fi
15742PTHREAD_CC=$ac_cv_prog_PTHREAD_CC
15743if test -n "$PTHREAD_CC"; then
15744  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTHREAD_CC" >&5
15745$as_echo "$PTHREAD_CC" >&6; }
15746else
15747  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15748$as_echo "no" >&6; }
15749fi
15750
15751
15752  test -n "$PTHREAD_CC" && break
15753done
15754test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
15755 ;;
15756esac ;; #(
15757  *) :
15758     ;;
15759esac
15760                ;;
15761            esac
15762        fi
15763fi
15764
15765test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
15766
15767
15768
15769
15770
15771# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
15772if test x"$ax_pthread_ok" = xyes; then
15773
15774
15775$as_echo "#define HAVE_PTHREAD 1" >>confdefs.h
15776
15777		LIBS="$PTHREAD_LIBS $LIBS"
15778		CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
15779		CC="$PTHREAD_CC"
15780		ub_have_pthreads=yes
15781		ac_fn_c_check_type "$LINENO" "pthread_spinlock_t" "ac_cv_type_pthread_spinlock_t" "#include <pthread.h>
15782"
15783if test "x$ac_cv_type_pthread_spinlock_t" = xyes; then :
15784
15785cat >>confdefs.h <<_ACEOF
15786#define HAVE_PTHREAD_SPINLOCK_T 1
15787_ACEOF
15788
15789
15790fi
15791ac_fn_c_check_type "$LINENO" "pthread_rwlock_t" "ac_cv_type_pthread_rwlock_t" "#include <pthread.h>
15792"
15793if test "x$ac_cv_type_pthread_rwlock_t" = xyes; then :
15794
15795cat >>confdefs.h <<_ACEOF
15796#define HAVE_PTHREAD_RWLOCK_T 1
15797_ACEOF
15798
15799
15800fi
15801
15802
15803        :
15804else
15805        ax_pthread_ok=no
15806
15807fi
15808ac_ext=c
15809ac_cpp='$CPP $CPPFLAGS'
15810ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15811ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15812ac_compiler_gnu=$ac_cv_c_compiler_gnu
15813
15814
15815fi
15816
15817# check solaris thread library
15818
15819# Check whether --with-solaris-threads was given.
15820if test "${with_solaris_threads+set}" = set; then :
15821  withval=$with_solaris_threads;
15822else
15823   withval="no"
15824fi
15825
15826ub_have_sol_threads=no
15827if test x_$withval != x_no; then
15828	if test x_$ub_have_pthreads != x_no; then
15829	    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Have pthreads already, ignoring --with-solaris-threads" >&5
15830$as_echo "$as_me: WARNING: Have pthreads already, ignoring --with-solaris-threads" >&2;}
15831	else
15832	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing thr_create" >&5
15833$as_echo_n "checking for library containing thr_create... " >&6; }
15834if ${ac_cv_search_thr_create+:} false; then :
15835  $as_echo_n "(cached) " >&6
15836else
15837  ac_func_search_save_LIBS=$LIBS
15838cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15839/* end confdefs.h.  */
15840
15841/* Override any GCC internal prototype to avoid an error.
15842   Use char because int might match the return type of a GCC
15843   builtin and then its argument prototype would still apply.  */
15844#ifdef __cplusplus
15845extern "C"
15846#endif
15847char thr_create ();
15848int
15849main ()
15850{
15851return thr_create ();
15852  ;
15853  return 0;
15854}
15855_ACEOF
15856for ac_lib in '' thread; do
15857  if test -z "$ac_lib"; then
15858    ac_res="none required"
15859  else
15860    ac_res=-l$ac_lib
15861    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
15862  fi
15863  if ac_fn_c_try_link "$LINENO"; then :
15864  ac_cv_search_thr_create=$ac_res
15865fi
15866rm -f core conftest.err conftest.$ac_objext \
15867    conftest$ac_exeext
15868  if ${ac_cv_search_thr_create+:} false; then :
15869  break
15870fi
15871done
15872if ${ac_cv_search_thr_create+:} false; then :
15873
15874else
15875  ac_cv_search_thr_create=no
15876fi
15877rm conftest.$ac_ext
15878LIBS=$ac_func_search_save_LIBS
15879fi
15880{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_thr_create" >&5
15881$as_echo "$ac_cv_search_thr_create" >&6; }
15882ac_res=$ac_cv_search_thr_create
15883if test "$ac_res" != no; then :
15884  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
15885
15886
15887$as_echo "#define HAVE_SOLARIS_THREADS 1" >>confdefs.h
15888
15889
15890
15891
15892{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -mt" >&5
15893$as_echo_n "checking whether $CC supports -mt... " >&6; }
15894cache=`echo mt | sed 'y%.=/+-%___p_%'`
15895if eval \${cv_prog_cc_flag_$cache+:} false; then :
15896  $as_echo_n "(cached) " >&6
15897else
15898
15899echo 'void f(void){}' >conftest.c
15900if test -z "`$CC $CPPFLAGS $CFLAGS -mt -c conftest.c 2>&1`"; then
15901eval "cv_prog_cc_flag_$cache=yes"
15902else
15903eval "cv_prog_cc_flag_$cache=no"
15904fi
15905rm -f conftest conftest.o conftest.c
15906
15907fi
15908
15909if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
15910{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15911$as_echo "yes" >&6; }
15912:
15913CFLAGS="$CFLAGS -mt"
15914else
15915{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15916$as_echo "no" >&6; }
15917:
15918CFLAGS="$CFLAGS -D_REENTRANT"
15919fi
15920
15921		ub_have_sol_threads=yes
15922
15923else
15924
15925		as_fn_error $? "no solaris threads found." "$LINENO" 5
15926
15927fi
15928
15929	fi
15930fi
15931
15932fi # end of non-mingw check of thread libraries
15933
15934# Check for PyUnbound
15935
15936# Check whether --with-pyunbound was given.
15937if test "${with_pyunbound+set}" = set; then :
15938  withval=$with_pyunbound;
15939else
15940   withval="no"
15941fi
15942
15943
15944ub_test_python=no
15945ub_with_pyunbound=no
15946if test x_$withval != x_no; then
15947   ub_with_pyunbound=yes
15948   ub_test_python=yes
15949fi
15950
15951# Check for Python module
15952
15953# Check whether --with-pythonmodule was given.
15954if test "${with_pythonmodule+set}" = set; then :
15955  withval=$with_pythonmodule;
15956else
15957   withval="no"
15958fi
15959
15960
15961ub_with_pythonmod=no
15962if test x_$withval != x_no; then
15963   ub_with_pythonmod=yes
15964   ub_test_python=yes
15965fi
15966
15967# Check for Python & SWIG only on PyUnbound or PyModule
15968if test x_$ub_test_python != x_no; then
15969
15970   # Check for Python
15971   ub_have_python=no
15972   ac_save_LIBS="$LIBS"
15973        #
15974        # Allow the use of a (user set) custom python version
15975        #
15976
15977
15978        # Extract the first word of "python[$PYTHON_VERSION]", so it can be a program name with args.
15979set dummy python$PYTHON_VERSION; ac_word=$2
15980{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15981$as_echo_n "checking for $ac_word... " >&6; }
15982if ${ac_cv_path_PYTHON+:} false; then :
15983  $as_echo_n "(cached) " >&6
15984else
15985  case $PYTHON in
15986  [\\/]* | ?:[\\/]*)
15987  ac_cv_path_PYTHON="$PYTHON" # Let the user override the test with a path.
15988  ;;
15989  *)
15990  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15991for as_dir in $PATH
15992do
15993  IFS=$as_save_IFS
15994  test -z "$as_dir" && as_dir=.
15995    for ac_exec_ext in '' $ac_executable_extensions; do
15996  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15997    ac_cv_path_PYTHON="$as_dir/$ac_word$ac_exec_ext"
15998    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15999    break 2
16000  fi
16001done
16002  done
16003IFS=$as_save_IFS
16004
16005  ;;
16006esac
16007fi
16008PYTHON=$ac_cv_path_PYTHON
16009if test -n "$PYTHON"; then
16010  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5
16011$as_echo "$PYTHON" >&6; }
16012else
16013  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16014$as_echo "no" >&6; }
16015fi
16016
16017
16018        if test -z "$PYTHON"; then
16019           as_fn_error $? "Cannot find python$PYTHON_VERSION in your system path" "$LINENO" 5
16020           PYTHON_VERSION=""
16021        fi
16022
16023        if test -z "$PYTHON_VERSION"; then
16024		PYTHON_VERSION=`$PYTHON -c "import sys; \
16025			print(sys.version.split()[0])"`
16026	fi
16027
16028        #
16029        # Check if you have distutils, else fail
16030        #
16031        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the distutils Python package" >&5
16032$as_echo_n "checking for the distutils Python package... " >&6; }
16033        ac_distutils_result=`$PYTHON -c "import distutils" 2>&1`
16034        if test -z "$ac_distutils_result"; then
16035                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16036$as_echo "yes" >&6; }
16037        else
16038                { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16039$as_echo "no" >&6; }
16040                as_fn_error $? "cannot import Python module \"distutils\".
16041Please check your Python installation. The error was:
16042$ac_distutils_result" "$LINENO" 5
16043                PYTHON_VERSION=""
16044        fi
16045
16046        #
16047        # Check for Python include path
16048        #
16049        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Python include path" >&5
16050$as_echo_n "checking for Python include path... " >&6; }
16051        if test -z "$PYTHON_CPPFLAGS"; then
16052                python_path=`$PYTHON -c "import distutils.sysconfig; \
16053                        print(distutils.sysconfig.get_python_inc());"`
16054                if test -n "${python_path}"; then
16055                        python_path="-I$python_path"
16056                fi
16057                PYTHON_CPPFLAGS=$python_path
16058        fi
16059        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON_CPPFLAGS" >&5
16060$as_echo "$PYTHON_CPPFLAGS" >&6; }
16061
16062
16063        #
16064        # Check for Python library path
16065        #
16066        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Python library path" >&5
16067$as_echo_n "checking for Python library path... " >&6; }
16068        if test -z "$PYTHON_LDFLAGS"; then
16069                PYTHON_LDFLAGS=`$PYTHON -c "from distutils.sysconfig import *; \
16070                        print(get_config_var('BLDLIBRARY'));"`
16071        fi
16072        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON_LDFLAGS" >&5
16073$as_echo "$PYTHON_LDFLAGS" >&6; }
16074
16075
16076        #
16077        # Check for site packages
16078        #
16079        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Python site-packages path" >&5
16080$as_echo_n "checking for Python site-packages path... " >&6; }
16081        if test -z "$PYTHON_SITE_PKG"; then
16082                PYTHON_SITE_PKG=`$PYTHON -c "import distutils.sysconfig; \
16083                        print(distutils.sysconfig.get_python_lib(1,0));"`
16084        fi
16085        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON_SITE_PKG" >&5
16086$as_echo "$PYTHON_SITE_PKG" >&6; }
16087
16088
16089        #
16090        # final check to see if everything compiles alright
16091        #
16092        { $as_echo "$as_me:${as_lineno-$LINENO}: checking consistency of all components of python development environment" >&5
16093$as_echo_n "checking consistency of all components of python development environment... " >&6; }
16094        ac_ext=c
16095ac_cpp='$CPP $CPPFLAGS'
16096ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16097ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16098ac_compiler_gnu=$ac_cv_c_compiler_gnu
16099
16100        # save current global flags
16101        ac_save_LIBS="$LIBS"
16102        ac_save_CPPFLAGS="$CPPFLAGS"
16103
16104        LIBS="$LIBS $PYTHON_LDFLAGS"
16105        CPPFLAGS="$CPPFLAGS $PYTHON_CPPFLAGS"
16106        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16107/* end confdefs.h.  */
16108
16109                #include <Python.h>
16110
16111int
16112main ()
16113{
16114
16115                Py_Initialize();
16116
16117  ;
16118  return 0;
16119}
16120_ACEOF
16121if ac_fn_c_try_link "$LINENO"; then :
16122  pythonexists=yes
16123else
16124  pythonexists=no
16125fi
16126rm -f core conftest.err conftest.$ac_objext \
16127    conftest$ac_exeext conftest.$ac_ext
16128
16129        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pythonexists" >&5
16130$as_echo "$pythonexists" >&6; }
16131
16132        if test ! "$pythonexists" = "yes"; then
16133           as_fn_error $? "
16134  Could not link test program to Python. Maybe the main Python library has been
16135  installed in some non-standard library path. If so, pass it to configure,
16136  via the LDFLAGS environment variable.
16137  Example: ./configure LDFLAGS=\"-L/usr/non-standard-path/python/lib\"
16138  ============================================================================
16139   ERROR!
16140   You probably have to install the development version of the Python package
16141   for your distribution.  The exact name of this package varies among them.
16142  ============================================================================
16143           " "$LINENO" 5
16144          PYTHON_VERSION=""
16145        fi
16146        ac_ext=c
16147ac_cpp='$CPP $CPPFLAGS'
16148ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16149ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16150ac_compiler_gnu=$ac_cv_c_compiler_gnu
16151
16152        # turn back to default flags
16153        CPPFLAGS="$ac_save_CPPFLAGS"
16154        LIBS="$ac_save_LIBS"
16155
16156        #
16157        # all done!
16158        #
16159
16160   if test ! -z "$PYTHON_VERSION"; then
16161	if test `$PYTHON -c "print('$PYTHON_VERSION' >= '2.4.0')"` = "False"; then
16162		as_fn_error $? "Python version >= 2.4.0 is required" "$LINENO" 5
16163	fi
16164
16165      # Have Python
16166
16167$as_echo "#define HAVE_PYTHON 1" >>confdefs.h
16168
16169      LIBS="$PYTHON_LDFLAGS $LIBS"
16170      CPPFLAGS="$CPPFLAGS $PYTHON_CPPFLAGS"
16171      ub_have_python=yes
16172
16173      # Check for SWIG
16174      ub_have_swig=no
16175
16176        # Extract the first word of "swig", so it can be a program name with args.
16177set dummy swig; ac_word=$2
16178{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16179$as_echo_n "checking for $ac_word... " >&6; }
16180if ${ac_cv_path_SWIG+:} false; then :
16181  $as_echo_n "(cached) " >&6
16182else
16183  case $SWIG in
16184  [\\/]* | ?:[\\/]*)
16185  ac_cv_path_SWIG="$SWIG" # Let the user override the test with a path.
16186  ;;
16187  *)
16188  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16189for as_dir in $PATH
16190do
16191  IFS=$as_save_IFS
16192  test -z "$as_dir" && as_dir=.
16193    for ac_exec_ext in '' $ac_executable_extensions; do
16194  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16195    ac_cv_path_SWIG="$as_dir/$ac_word$ac_exec_ext"
16196    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16197    break 2
16198  fi
16199done
16200  done
16201IFS=$as_save_IFS
16202
16203  ;;
16204esac
16205fi
16206SWIG=$ac_cv_path_SWIG
16207if test -n "$SWIG"; then
16208  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SWIG" >&5
16209$as_echo "$SWIG" >&6; }
16210else
16211  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16212$as_echo "no" >&6; }
16213fi
16214
16215
16216        if test -z "$SWIG" ; then
16217                { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot find 'swig' program. You should look at http://www.swig.org" >&5
16218$as_echo "$as_me: WARNING: cannot find 'swig' program. You should look at http://www.swig.org" >&2;}
16219                SWIG='echo "Error: SWIG is not installed. You should look at http://www.swig.org" ; false'
16220        elif test -n "" ; then
16221                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SWIG version" >&5
16222$as_echo_n "checking for SWIG version... " >&6; }
16223                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'`
16224                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $swig_version" >&5
16225$as_echo "$swig_version" >&6; }
16226                if test -n "$swig_version" ; then
16227                        # Calculate the required version number components
16228                        required=
16229                        required_major=`echo $required | sed 's/[^0-9].*//'`
16230                        if test -z "$required_major" ; then
16231                                required_major=0
16232                        fi
16233                        required=`echo $required | sed 's/[0-9]*[^0-9]//'`
16234                        required_minor=`echo $required | sed 's/[^0-9].*//'`
16235                        if test -z "$required_minor" ; then
16236                                required_minor=0
16237                        fi
16238                        required=`echo $required | sed 's/[0-9]*[^0-9]//'`
16239                        required_patch=`echo $required | sed 's/[^0-9].*//'`
16240                        if test -z "$required_patch" ; then
16241                                required_patch=0
16242                        fi
16243                        # Calculate the available version number components
16244                        available=$swig_version
16245                        available_major=`echo $available | sed 's/[^0-9].*//'`
16246                        if test -z "$available_major" ; then
16247                                available_major=0
16248                        fi
16249                        available=`echo $available | sed 's/[0-9]*[^0-9]//'`
16250                        available_minor=`echo $available | sed 's/[^0-9].*//'`
16251                        if test -z "$available_minor" ; then
16252                                available_minor=0
16253                        fi
16254                        available=`echo $available | sed 's/[0-9]*[^0-9]//'`
16255                        available_patch=`echo $available | sed 's/[^0-9].*//'`
16256                        if test -z "$available_patch" ; then
16257                                available_patch=0
16258                        fi
16259                        if test $available_major -ne $required_major \
16260                                -o $available_minor -ne $required_minor \
16261                                -o $available_patch -lt $required_patch ; then
16262                                { $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
16263$as_echo "$as_me: WARNING: SWIG version >=  is required.  You have $swig_version.  You should look at http://www.swig.org" >&2;}
16264                                SWIG='echo "Error: SWIG version >=  is required.  You have '"$swig_version"'.  You should look at http://www.swig.org" ; false'
16265                        else
16266                                { $as_echo "$as_me:${as_lineno-$LINENO}: SWIG executable is '$SWIG'" >&5
16267$as_echo "$as_me: SWIG executable is '$SWIG'" >&6;}
16268                                SWIG_LIB=`$SWIG -swiglib`
16269                                { $as_echo "$as_me:${as_lineno-$LINENO}: SWIG library directory is '$SWIG_LIB'" >&5
16270$as_echo "$as_me: SWIG library directory is '$SWIG_LIB'" >&6;}
16271                        fi
16272                else
16273                        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot determine SWIG version" >&5
16274$as_echo "$as_me: WARNING: cannot determine SWIG version" >&2;}
16275                        SWIG='echo "Error: Cannot determine SWIG version.  You should look at http://www.swig.org" ; false'
16276                fi
16277        fi
16278
16279
16280      { $as_echo "$as_me:${as_lineno-$LINENO}: checking SWIG" >&5
16281$as_echo_n "checking SWIG... " >&6; }
16282      if test ! -x "$SWIG"; then
16283         as_fn_error $? "failed to find swig tool, install it, or do not build Python module and PyUnbound" "$LINENO" 5
16284      else
16285
16286$as_echo "#define HAVE_SWIG 1" >>confdefs.h
16287
16288         swig="$SWIG"
16289
16290         { $as_echo "$as_me:${as_lineno-$LINENO}: result: present" >&5
16291$as_echo "present" >&6; }
16292
16293         # If have Python & SWIG
16294         # Declare PythonMod
16295         if test x_$ub_with_pythonmod != x_no; then
16296
16297$as_echo "#define WITH_PYTHONMODULE 1" >>confdefs.h
16298
16299            WITH_PYTHONMODULE=yes
16300
16301	    PYTHONMOD_OBJ="pythonmod.lo pythonmod_utils.lo"
16302
16303	    PYTHONMOD_HEADER='$(srcdir)/pythonmod/pythonmod.h'
16304
16305	    PYTHONMOD_INSTALL=pythonmod-install
16306
16307	    PYTHONMOD_UNINSTALL=pythonmod-uninstall
16308
16309         fi
16310
16311         # Declare PyUnbound
16312         if test x_$ub_with_pyunbound != x_no; then
16313
16314$as_echo "#define WITH_PYUNBOUND 1" >>confdefs.h
16315
16316            WITH_PYUNBOUND=yes
16317
16318	    PYUNBOUND_OBJ="libunbound_wrap.lo"
16319
16320	    PYUNBOUND_TARGET="_unbound.la"
16321
16322	    PYUNBOUND_INSTALL=pyunbound-install
16323
16324	    PYUNBOUND_UNINSTALL=pyunbound-uninstall
16325
16326         fi
16327      fi
16328   else
16329      { $as_echo "$as_me:${as_lineno-$LINENO}: result: *** Python libraries not found, won't build PythonMod or PyUnbound ***" >&5
16330$as_echo "*** Python libraries not found, won't build PythonMod or PyUnbound ***" >&6; }
16331      ub_with_pyunbound=no
16332      ub_with_pythonmod=no
16333   fi
16334fi
16335
16336if test "`uname`" = "NetBSD"; then
16337	NETBSD_LINTFLAGS='"-D__RENAME(x)=" -D_NETINET_IN_H_'
16338
16339fi
16340CONFIG_DATE=`date +%Y%m%d`
16341
16342
16343# Checks for libraries.
16344
16345# libnss
16346USE_NSS="no"
16347
16348# Check whether --with-nss was given.
16349if test "${with_nss+set}" = set; then :
16350  withval=$with_nss;
16351	USE_NSS="yes"
16352
16353$as_echo "#define HAVE_NSS 1" >>confdefs.h
16354
16355	if test "$withval" != "" -a "$withval" != "yes"; then
16356		CPPFLAGS="$CPPFLAGS -I$withval/include/nss3"
16357		LDFLAGS="$LDFLAGS -L$withval/lib"
16358
16359	if test "x$enable_rpath" = xyes; then
16360		if echo "$withval/lib" | grep "^/" >/dev/null; then
16361			RUNTIME_PATH="$RUNTIME_PATH -R$withval/lib"
16362		fi
16363	fi
16364
16365		CPPFLAGS="-I$withval/include/nspr4 $CPPFLAGS"
16366	else
16367		CPPFLAGS="$CPPFLAGS -I/usr/include/nss3"
16368		CPPFLAGS="-I/usr/include/nspr4 $CPPFLAGS"
16369	fi
16370        LIBS="$LIBS -lnss3 -lnspr4"
16371
16372
16373fi
16374
16375
16376# openssl
16377if test $USE_NSS = "no"; then
16378
16379
16380# Check whether --with-ssl was given.
16381if test "${with_ssl+set}" = set; then :
16382  withval=$with_ssl;
16383
16384else
16385
16386            withval="yes"
16387
16388fi
16389
16390    if test x_$withval = x_no; then
16391	as_fn_error $? "Need SSL library to do digital signature cryptography" "$LINENO" 5
16392    fi
16393
16394    withval=$withval
16395    if test x_$withval != x_no; then
16396        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SSL" >&5
16397$as_echo_n "checking for SSL... " >&6; }
16398        if test x_$withval = x_ -o x_$withval = x_yes; then
16399            withval="/usr/local/ssl /usr/lib/ssl /usr/ssl /usr/pkg /usr/local /opt/local /usr/sfw /usr"
16400        fi
16401        for dir in $withval; do
16402            ssldir="$dir"
16403            if test -f "$dir/include/openssl/ssl.h"; then
16404                found_ssl="yes"
16405
16406cat >>confdefs.h <<_ACEOF
16407#define HAVE_SSL /**/
16408_ACEOF
16409
16410                                if test "$ssldir" != "/usr"; then
16411                        CPPFLAGS="$CPPFLAGS -I$ssldir/include"
16412                        LIBSSL_CPPFLAGS="$LIBSSL_CPPFLAGS -I$ssldir/include"
16413                fi
16414                break;
16415            fi
16416        done
16417        if test x_$found_ssl != x_yes; then
16418            as_fn_error $? "Cannot find the SSL libraries in $withval" "$LINENO" 5
16419        else
16420            { $as_echo "$as_me:${as_lineno-$LINENO}: result: found in $ssldir" >&5
16421$as_echo "found in $ssldir" >&6; }
16422            HAVE_SSL=yes
16423                        if test "$ssldir" != "/usr" -a "$ssldir" != ""; then
16424                LDFLAGS="$LDFLAGS -L$ssldir/lib"
16425                LIBSSL_LDFLAGS="$LIBSSL_LDFLAGS -L$ssldir/lib"
16426
16427	if test "x$enable_rpath" = xyes; then
16428		if echo "$ssldir/lib" | grep "^/" >/dev/null; then
16429			RUNTIME_PATH="$RUNTIME_PATH -R$ssldir/lib"
16430		fi
16431	fi
16432
16433            fi
16434
16435            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HMAC_CTX_init in -lcrypto" >&5
16436$as_echo_n "checking for HMAC_CTX_init in -lcrypto... " >&6; }
16437            LIBS="$LIBS -lcrypto"
16438            LIBSSL_LIBS="$LIBSSL_LIBS -lcrypto"
16439            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16440/* end confdefs.h.  */
16441
16442int
16443main ()
16444{
16445
16446                int HMAC_CTX_init(void);
16447                (void)HMAC_CTX_init();
16448
16449  ;
16450  return 0;
16451}
16452_ACEOF
16453if ac_fn_c_try_link "$LINENO"; then :
16454
16455                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16456$as_echo "yes" >&6; }
16457
16458$as_echo "#define HAVE_HMAC_CTX_INIT 1" >>confdefs.h
16459
16460
16461else
16462
16463                { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16464$as_echo "no" >&6; }
16465                # check if -lwsock32 or -lgdi32 are needed.
16466                BAKLIBS="$LIBS"
16467                BAKSSLLIBS="$LIBSSL_LIBS"
16468                LIBS="$LIBS -lgdi32"
16469                LIBSSL_LIBS="$LIBSSL_LIBS -lgdi32"
16470                { $as_echo "$as_me:${as_lineno-$LINENO}: checking if -lcrypto needs -lgdi32" >&5
16471$as_echo_n "checking if -lcrypto needs -lgdi32... " >&6; }
16472                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16473/* end confdefs.h.  */
16474
16475int
16476main ()
16477{
16478
16479                    int HMAC_CTX_init(void);
16480                    (void)HMAC_CTX_init();
16481
16482  ;
16483  return 0;
16484}
16485_ACEOF
16486if ac_fn_c_try_link "$LINENO"; then :
16487
16488
16489$as_echo "#define HAVE_HMAC_CTX_INIT 1" >>confdefs.h
16490
16491                    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16492$as_echo "yes" >&6; }
16493
16494else
16495
16496                    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16497$as_echo "no" >&6; }
16498                    LIBS="$BAKLIBS"
16499                    LIBSSL_LIBS="$BAKSSLLIBS"
16500                    LIBS="$LIBS -ldl"
16501                    LIBSSL_LIBS="$LIBSSL_LIBS -ldl"
16502                    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if -lcrypto needs -ldl" >&5
16503$as_echo_n "checking if -lcrypto needs -ldl... " >&6; }
16504                    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16505/* end confdefs.h.  */
16506
16507int
16508main ()
16509{
16510
16511                        int HMAC_CTX_init(void);
16512                        (void)HMAC_CTX_init();
16513
16514  ;
16515  return 0;
16516}
16517_ACEOF
16518if ac_fn_c_try_link "$LINENO"; then :
16519
16520
16521$as_echo "#define HAVE_HMAC_CTX_INIT 1" >>confdefs.h
16522
16523                        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16524$as_echo "yes" >&6; }
16525
16526else
16527
16528                        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16529$as_echo "no" >&6; }
16530                    as_fn_error $? "OpenSSL found in $ssldir, but version 0.9.7 or higher is required" "$LINENO" 5
16531
16532fi
16533rm -f core conftest.err conftest.$ac_objext \
16534    conftest$ac_exeext conftest.$ac_ext
16535
16536fi
16537rm -f core conftest.err conftest.$ac_objext \
16538    conftest$ac_exeext conftest.$ac_ext
16539
16540fi
16541rm -f core conftest.err conftest.$ac_objext \
16542    conftest$ac_exeext conftest.$ac_ext
16543        fi
16544
16545
16546	# openssl engine functionality needs dlopen().
16547	BAKLIBS="$LIBS"
16548	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
16549$as_echo_n "checking for library containing dlopen... " >&6; }
16550if ${ac_cv_search_dlopen+:} false; then :
16551  $as_echo_n "(cached) " >&6
16552else
16553  ac_func_search_save_LIBS=$LIBS
16554cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16555/* end confdefs.h.  */
16556
16557/* Override any GCC internal prototype to avoid an error.
16558   Use char because int might match the return type of a GCC
16559   builtin and then its argument prototype would still apply.  */
16560#ifdef __cplusplus
16561extern "C"
16562#endif
16563char dlopen ();
16564int
16565main ()
16566{
16567return dlopen ();
16568  ;
16569  return 0;
16570}
16571_ACEOF
16572for ac_lib in '' dl; do
16573  if test -z "$ac_lib"; then
16574    ac_res="none required"
16575  else
16576    ac_res=-l$ac_lib
16577    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
16578  fi
16579  if ac_fn_c_try_link "$LINENO"; then :
16580  ac_cv_search_dlopen=$ac_res
16581fi
16582rm -f core conftest.err conftest.$ac_objext \
16583    conftest$ac_exeext
16584  if ${ac_cv_search_dlopen+:} false; then :
16585  break
16586fi
16587done
16588if ${ac_cv_search_dlopen+:} false; then :
16589
16590else
16591  ac_cv_search_dlopen=no
16592fi
16593rm conftest.$ac_ext
16594LIBS=$ac_func_search_save_LIBS
16595fi
16596{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
16597$as_echo "$ac_cv_search_dlopen" >&6; }
16598ac_res=$ac_cv_search_dlopen
16599if test "$ac_res" != no; then :
16600  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
16601
16602fi
16603
16604	if test "$LIBS" != "$BAKLIBS"; then
16605		LIBSSL_LIBS="$LIBSSL_LIBS -ldl"
16606	fi
16607    fi
16608for ac_header in openssl/ssl.h
16609do :
16610  ac_fn_c_check_header_compile "$LINENO" "openssl/ssl.h" "ac_cv_header_openssl_ssl_h" "$ac_includes_default
16611"
16612if test "x$ac_cv_header_openssl_ssl_h" = xyes; then :
16613  cat >>confdefs.h <<_ACEOF
16614#define HAVE_OPENSSL_SSL_H 1
16615_ACEOF
16616
16617fi
16618
16619done
16620
16621for ac_header in openssl/err.h
16622do :
16623  ac_fn_c_check_header_compile "$LINENO" "openssl/err.h" "ac_cv_header_openssl_err_h" "$ac_includes_default
16624"
16625if test "x$ac_cv_header_openssl_err_h" = xyes; then :
16626  cat >>confdefs.h <<_ACEOF
16627#define HAVE_OPENSSL_ERR_H 1
16628_ACEOF
16629
16630fi
16631
16632done
16633
16634for ac_header in openssl/rand.h
16635do :
16636  ac_fn_c_check_header_compile "$LINENO" "openssl/rand.h" "ac_cv_header_openssl_rand_h" "$ac_includes_default
16637"
16638if test "x$ac_cv_header_openssl_rand_h" = xyes; then :
16639  cat >>confdefs.h <<_ACEOF
16640#define HAVE_OPENSSL_RAND_H 1
16641_ACEOF
16642
16643fi
16644
16645done
16646
16647
16648
16649
16650# check if libssl needs libdl
16651BAKLIBS="$LIBS"
16652LIBS="-lssl $LIBS"
16653{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if libssl needs libdl" >&5
16654$as_echo_n "checking if libssl needs libdl... " >&6; }
16655cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16656/* end confdefs.h.  */
16657
16658/* Override any GCC internal prototype to avoid an error.
16659   Use char because int might match the return type of a GCC
16660   builtin and then its argument prototype would still apply.  */
16661#ifdef __cplusplus
16662extern "C"
16663#endif
16664char SSL_CTX_new ();
16665int
16666main ()
16667{
16668return SSL_CTX_new ();
16669  ;
16670  return 0;
16671}
16672_ACEOF
16673if ac_fn_c_try_link "$LINENO"; then :
16674
16675	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16676$as_echo "no" >&6; }
16677	LIBS="$BAKLIBS"
16678
16679else
16680
16681	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16682$as_echo "yes" >&6; }
16683	LIBS="$BAKLIBS"
16684	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
16685$as_echo_n "checking for library containing dlopen... " >&6; }
16686if ${ac_cv_search_dlopen+:} false; then :
16687  $as_echo_n "(cached) " >&6
16688else
16689  ac_func_search_save_LIBS=$LIBS
16690cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16691/* end confdefs.h.  */
16692
16693/* Override any GCC internal prototype to avoid an error.
16694   Use char because int might match the return type of a GCC
16695   builtin and then its argument prototype would still apply.  */
16696#ifdef __cplusplus
16697extern "C"
16698#endif
16699char dlopen ();
16700int
16701main ()
16702{
16703return dlopen ();
16704  ;
16705  return 0;
16706}
16707_ACEOF
16708for ac_lib in '' dl; do
16709  if test -z "$ac_lib"; then
16710    ac_res="none required"
16711  else
16712    ac_res=-l$ac_lib
16713    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
16714  fi
16715  if ac_fn_c_try_link "$LINENO"; then :
16716  ac_cv_search_dlopen=$ac_res
16717fi
16718rm -f core conftest.err conftest.$ac_objext \
16719    conftest$ac_exeext
16720  if ${ac_cv_search_dlopen+:} false; then :
16721  break
16722fi
16723done
16724if ${ac_cv_search_dlopen+:} false; then :
16725
16726else
16727  ac_cv_search_dlopen=no
16728fi
16729rm conftest.$ac_ext
16730LIBS=$ac_func_search_save_LIBS
16731fi
16732{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
16733$as_echo "$ac_cv_search_dlopen" >&6; }
16734ac_res=$ac_cv_search_dlopen
16735if test "$ac_res" != no; then :
16736  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
16737
16738fi
16739
16740
16741fi
16742rm -f core conftest.err conftest.$ac_objext \
16743    conftest$ac_exeext conftest.$ac_ext
16744{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LibreSSL" >&5
16745$as_echo_n "checking for LibreSSL... " >&6; }
16746if grep OPENSSL_VERSION_TEXT $ssldir/include/openssl/opensslv.h | grep "LibreSSL" >/dev/null; then
16747	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16748$as_echo "yes" >&6; }
16749
16750$as_echo "#define HAVE_LIBRESSL 1" >>confdefs.h
16751
16752	# libressl provides these compat functions, but they may also be
16753	# declared by the OS in libc.  See if they have been declared.
16754	ac_fn_c_check_decl "$LINENO" "strlcpy" "ac_cv_have_decl_strlcpy" "$ac_includes_default"
16755if test "x$ac_cv_have_decl_strlcpy" = xyes; then :
16756  ac_have_decl=1
16757else
16758  ac_have_decl=0
16759fi
16760
16761cat >>confdefs.h <<_ACEOF
16762#define HAVE_DECL_STRLCPY $ac_have_decl
16763_ACEOF
16764ac_fn_c_check_decl "$LINENO" "strlcat" "ac_cv_have_decl_strlcat" "$ac_includes_default"
16765if test "x$ac_cv_have_decl_strlcat" = xyes; then :
16766  ac_have_decl=1
16767else
16768  ac_have_decl=0
16769fi
16770
16771cat >>confdefs.h <<_ACEOF
16772#define HAVE_DECL_STRLCAT $ac_have_decl
16773_ACEOF
16774ac_fn_c_check_decl "$LINENO" "arc4random" "ac_cv_have_decl_arc4random" "$ac_includes_default"
16775if test "x$ac_cv_have_decl_arc4random" = xyes; then :
16776  ac_have_decl=1
16777else
16778  ac_have_decl=0
16779fi
16780
16781cat >>confdefs.h <<_ACEOF
16782#define HAVE_DECL_ARC4RANDOM $ac_have_decl
16783_ACEOF
16784ac_fn_c_check_decl "$LINENO" "arc4random_uniform" "ac_cv_have_decl_arc4random_uniform" "$ac_includes_default"
16785if test "x$ac_cv_have_decl_arc4random_uniform" = xyes; then :
16786  ac_have_decl=1
16787else
16788  ac_have_decl=0
16789fi
16790
16791cat >>confdefs.h <<_ACEOF
16792#define HAVE_DECL_ARC4RANDOM_UNIFORM $ac_have_decl
16793_ACEOF
16794
16795else
16796	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16797$as_echo "no" >&6; }
16798fi
16799for ac_header in openssl/conf.h
16800do :
16801  ac_fn_c_check_header_compile "$LINENO" "openssl/conf.h" "ac_cv_header_openssl_conf_h" "$ac_includes_default
16802"
16803if test "x$ac_cv_header_openssl_conf_h" = xyes; then :
16804  cat >>confdefs.h <<_ACEOF
16805#define HAVE_OPENSSL_CONF_H 1
16806_ACEOF
16807
16808fi
16809
16810done
16811
16812for ac_header in openssl/engine.h
16813do :
16814  ac_fn_c_check_header_compile "$LINENO" "openssl/engine.h" "ac_cv_header_openssl_engine_h" "$ac_includes_default
16815"
16816if test "x$ac_cv_header_openssl_engine_h" = xyes; then :
16817  cat >>confdefs.h <<_ACEOF
16818#define HAVE_OPENSSL_ENGINE_H 1
16819_ACEOF
16820
16821fi
16822
16823done
16824
16825for ac_func in OPENSSL_config EVP_sha1 EVP_sha256 EVP_sha512 FIPS_mode
16826do :
16827  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
16828ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
16829if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
16830  cat >>confdefs.h <<_ACEOF
16831#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
16832_ACEOF
16833
16834fi
16835done
16836
16837ac_fn_c_check_decl "$LINENO" "SSL_COMP_get_compression_methods" "ac_cv_have_decl_SSL_COMP_get_compression_methods" "
16838$ac_includes_default
16839#ifdef HAVE_OPENSSL_ERR_H
16840#include <openssl/err.h>
16841#endif
16842
16843#ifdef HAVE_OPENSSL_RAND_H
16844#include <openssl/rand.h>
16845#endif
16846
16847#ifdef HAVE_OPENSSL_CONF_H
16848#include <openssl/conf.h>
16849#endif
16850
16851#ifdef HAVE_OPENSSL_ENGINE_H
16852#include <openssl/engine.h>
16853#endif
16854#include <openssl/ssl.h>
16855#include <openssl/evp.h>
16856
16857"
16858if test "x$ac_cv_have_decl_SSL_COMP_get_compression_methods" = xyes; then :
16859  ac_have_decl=1
16860else
16861  ac_have_decl=0
16862fi
16863
16864cat >>confdefs.h <<_ACEOF
16865#define HAVE_DECL_SSL_COMP_GET_COMPRESSION_METHODS $ac_have_decl
16866_ACEOF
16867ac_fn_c_check_decl "$LINENO" "sk_SSL_COMP_pop_free" "ac_cv_have_decl_sk_SSL_COMP_pop_free" "
16868$ac_includes_default
16869#ifdef HAVE_OPENSSL_ERR_H
16870#include <openssl/err.h>
16871#endif
16872
16873#ifdef HAVE_OPENSSL_RAND_H
16874#include <openssl/rand.h>
16875#endif
16876
16877#ifdef HAVE_OPENSSL_CONF_H
16878#include <openssl/conf.h>
16879#endif
16880
16881#ifdef HAVE_OPENSSL_ENGINE_H
16882#include <openssl/engine.h>
16883#endif
16884#include <openssl/ssl.h>
16885#include <openssl/evp.h>
16886
16887"
16888if test "x$ac_cv_have_decl_sk_SSL_COMP_pop_free" = xyes; then :
16889  ac_have_decl=1
16890else
16891  ac_have_decl=0
16892fi
16893
16894cat >>confdefs.h <<_ACEOF
16895#define HAVE_DECL_SK_SSL_COMP_POP_FREE $ac_have_decl
16896_ACEOF
16897
16898fi
16899
16900
16901# Check whether --enable-sha2 was given.
16902if test "${enable_sha2+set}" = set; then :
16903  enableval=$enable_sha2;
16904fi
16905
16906case "$enable_sha2" in
16907	no)
16908	;;
16909	yes|*)
16910
16911$as_echo "#define USE_SHA2 1" >>confdefs.h
16912
16913	;;
16914esac
16915
16916# check wether gost also works
16917
16918# Check whether --enable-gost was given.
16919if test "${enable_gost+set}" = set; then :
16920  enableval=$enable_gost;
16921fi
16922
16923use_gost="no"
16924if test $USE_NSS = "no"; then
16925case "$enable_gost" in
16926	no)
16927	;;
16928	*)
16929	ac_fn_c_check_func "$LINENO" "EVP_PKEY_set_type_str" "ac_cv_func_EVP_PKEY_set_type_str"
16930if test "x$ac_cv_func_EVP_PKEY_set_type_str" = xyes; then :
16931  :
16932else
16933  as_fn_error $? "OpenSSL 1.0.0 is needed for GOST support" "$LINENO" 5
16934fi
16935
16936	ac_fn_c_check_func "$LINENO" "EC_KEY_new" "ac_cv_func_EC_KEY_new"
16937if test "x$ac_cv_func_EC_KEY_new" = xyes; then :
16938
16939else
16940  as_fn_error $? "OpenSSL does not support ECC, needed for GOST support" "$LINENO" 5
16941fi
16942
16943
16944{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if GOST works" >&5
16945$as_echo_n "checking if GOST works... " >&6; }
16946if test c${cross_compiling} = cno; then
16947BAKCFLAGS="$CFLAGS"
16948if test -n "$ssldir"; then
16949	CFLAGS="$CFLAGS -Wl,-rpath,$ssldir/lib"
16950fi
16951if test "$cross_compiling" = yes; then :
16952  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
16953$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
16954as_fn_error $? "cannot run test program while cross compiling
16955See \`config.log' for more details" "$LINENO" 5; }
16956else
16957  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16958/* end confdefs.h.  */
16959
16960#include <string.h>
16961#include <openssl/ssl.h>
16962#include <openssl/evp.h>
16963#include <openssl/engine.h>
16964#include <openssl/conf.h>
16965/* routine to load gost (from sldns) */
16966int load_gost_id(void)
16967{
16968	static int gost_id = 0;
16969	const EVP_PKEY_ASN1_METHOD* meth;
16970	ENGINE* e;
16971
16972	if(gost_id) return gost_id;
16973
16974	/* see if configuration loaded gost implementation from other engine*/
16975	meth = EVP_PKEY_asn1_find_str(NULL, "gost2001", -1);
16976	if(meth) {
16977		EVP_PKEY_asn1_get0_info(&gost_id, NULL, NULL, NULL, NULL, meth);
16978		return gost_id;
16979	}
16980
16981	/* see if engine can be loaded already */
16982	e = ENGINE_by_id("gost");
16983	if(!e) {
16984		/* load it ourself, in case statically linked */
16985		ENGINE_load_builtin_engines();
16986		ENGINE_load_dynamic();
16987		e = ENGINE_by_id("gost");
16988	}
16989	if(!e) {
16990		/* no gost engine in openssl */
16991		return 0;
16992	}
16993	if(!ENGINE_set_default(e, ENGINE_METHOD_ALL)) {
16994		ENGINE_finish(e);
16995		ENGINE_free(e);
16996		return 0;
16997	}
16998
16999	meth = EVP_PKEY_asn1_find_str(&e, "gost2001", -1);
17000	if(!meth) {
17001		/* algo not found */
17002		ENGINE_finish(e);
17003		ENGINE_free(e);
17004		return 0;
17005	}
17006	EVP_PKEY_asn1_get0_info(&gost_id, NULL, NULL, NULL, NULL, meth);
17007	return gost_id;
17008}
17009int main(void) {
17010	EVP_MD_CTX* ctx;
17011	const EVP_MD* md;
17012	unsigned char digest[64]; /* its a 256-bit digest, so uses 32 bytes */
17013	const char* str = "Hello world";
17014	const unsigned char check[] = {
17015		0x40 , 0xed , 0xf8 , 0x56 , 0x5a , 0xc5 , 0x36 , 0xe1 ,
17016		0x33 , 0x7c , 0x7e , 0x87 , 0x62 , 0x1c , 0x42 , 0xe0 ,
17017		0x17 , 0x1b , 0x5e , 0xce , 0xa8 , 0x46 , 0x65 , 0x4d ,
17018		0x8d , 0x3e , 0x22 , 0x9b , 0xe1 , 0x30 , 0x19 , 0x9d
17019	};
17020	OPENSSL_config(NULL);
17021	(void)load_gost_id();
17022	md = EVP_get_digestbyname("md_gost94");
17023	if(!md) return 1;
17024	memset(digest, 0, sizeof(digest));
17025	ctx = EVP_MD_CTX_create();
17026	if(!ctx) return 2;
17027	if(!EVP_DigestInit_ex(ctx, md, NULL)) return 3;
17028	if(!EVP_DigestUpdate(ctx, str, 10)) return 4;
17029	if(!EVP_DigestFinal_ex(ctx, digest, NULL)) return 5;
17030	/* uncomment to see the hash calculated.
17031		{int i;
17032		for(i=0; i<32; i++)
17033			printf(" %2.2x", (int)digest[i]);
17034		printf("\n");}
17035	*/
17036	if(memcmp(digest, check, sizeof(check)) != 0)
17037		return 6;
17038	return 0;
17039}
17040
17041_ACEOF
17042if ac_fn_c_try_run "$LINENO"; then :
17043  eval "ac_cv_c_gost_works=yes"
17044else
17045  eval "ac_cv_c_gost_works=no"
17046fi
17047rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17048  conftest.$ac_objext conftest.beam conftest.$ac_ext
17049fi
17050
17051CFLAGS="$BAKCFLAGS"
17052else
17053eval "ac_cv_c_gost_works=maybe"
17054fi
17055{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_gost_works" >&5
17056$as_echo "$ac_cv_c_gost_works" >&6; }
17057
17058	if test "$ac_cv_c_gost_works" != no; then
17059		use_gost="yes"
17060
17061$as_echo "#define USE_GOST 1" >>confdefs.h
17062
17063	fi
17064	;;
17065esac
17066fi
17067# Check whether --enable-ecdsa was given.
17068if test "${enable_ecdsa+set}" = set; then :
17069  enableval=$enable_ecdsa;
17070fi
17071
17072use_ecdsa="no"
17073case "$enable_ecdsa" in
17074    no)
17075      ;;
17076    *)
17077      if test $USE_NSS = "no"; then
17078	      ac_fn_c_check_func "$LINENO" "ECDSA_sign" "ac_cv_func_ECDSA_sign"
17079if test "x$ac_cv_func_ECDSA_sign" = xyes; then :
17080
17081else
17082  as_fn_error $? "OpenSSL does not support ECDSA: please upgrade or rerun with --disable-ecdsa" "$LINENO" 5
17083fi
17084
17085	      ac_fn_c_check_func "$LINENO" "SHA384_Init" "ac_cv_func_SHA384_Init"
17086if test "x$ac_cv_func_SHA384_Init" = xyes; then :
17087
17088else
17089  as_fn_error $? "OpenSSL does not support SHA384: please upgrade or rerun with --disable-ecdsa" "$LINENO" 5
17090fi
17091
17092	      ac_fn_c_check_decl "$LINENO" "NID_X9_62_prime256v1" "ac_cv_have_decl_NID_X9_62_prime256v1" "$ac_includes_default
17093#include <openssl/evp.h>
17094
17095"
17096if test "x$ac_cv_have_decl_NID_X9_62_prime256v1" = xyes; then :
17097  ac_have_decl=1
17098else
17099  ac_have_decl=0
17100fi
17101
17102cat >>confdefs.h <<_ACEOF
17103#define HAVE_DECL_NID_X9_62_PRIME256V1 $ac_have_decl
17104_ACEOF
17105if test $ac_have_decl = 1; then :
17106
17107else
17108  as_fn_error $? "OpenSSL does not support the ECDSA curves: please upgrade or rerun with --disable-ecdsa" "$LINENO" 5
17109fi
17110ac_fn_c_check_decl "$LINENO" "NID_secp384r1" "ac_cv_have_decl_NID_secp384r1" "$ac_includes_default
17111#include <openssl/evp.h>
17112
17113"
17114if test "x$ac_cv_have_decl_NID_secp384r1" = xyes; then :
17115  ac_have_decl=1
17116else
17117  ac_have_decl=0
17118fi
17119
17120cat >>confdefs.h <<_ACEOF
17121#define HAVE_DECL_NID_SECP384R1 $ac_have_decl
17122_ACEOF
17123if test $ac_have_decl = 1; then :
17124
17125else
17126  as_fn_error $? "OpenSSL does not support the ECDSA curves: please upgrade or rerun with --disable-ecdsa" "$LINENO" 5
17127fi
17128
17129	      # see if OPENSSL 1.0.0 or later (has EVP MD and Verify independency)
17130	      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if openssl supports SHA2 and ECDSA with EVP" >&5
17131$as_echo_n "checking if openssl supports SHA2 and ECDSA with EVP... " >&6; }
17132	      if grep OPENSSL_VERSION_TEXT $ssldir/include/openssl/opensslv.h | grep "OpenSSL" >/dev/null; then
17133		if grep OPENSSL_VERSION_NUMBER $ssldir/include/openssl/opensslv.h | grep 0x0 >/dev/null; then
17134		  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17135$as_echo "no" >&6; }
17136
17137cat >>confdefs.h <<_ACEOF
17138#define USE_ECDSA_EVP_WORKAROUND 1
17139_ACEOF
17140
17141		else
17142		  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17143$as_echo "yes" >&6; }
17144		fi
17145	      else
17146		# not OpenSSL, thus likely LibreSSL, which supports it
17147		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17148$as_echo "yes" >&6; }
17149	      fi
17150      fi
17151      # we now know we have ECDSA and the required curves.
17152
17153cat >>confdefs.h <<_ACEOF
17154#define USE_ECDSA 1
17155_ACEOF
17156
17157      use_ecdsa="yes"
17158      ;;
17159esac
17160
17161# Check whether --enable-event-api was given.
17162if test "${enable_event_api+set}" = set; then :
17163  enableval=$enable_event_api;
17164fi
17165
17166use_unbound_event="no"
17167case "$enable_event_api" in
17168    yes)
17169      use_unbound_event="yes"
17170      ;;
17171    *)
17172      ;;
17173esac
17174
17175# check for libevent
17176
17177# Check whether --with-libevent was given.
17178if test "${with_libevent+set}" = set; then :
17179  withval=$with_libevent;
17180else
17181   withval="no"
17182fi
17183
17184if test x_$withval = x_yes -o x_$withval != x_no; then
17185        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libevent" >&5
17186$as_echo_n "checking for libevent... " >&6; }
17187        if test x_$withval = x_ -o x_$withval = x_yes; then
17188            withval="/usr/local /opt/local /usr/lib /usr/pkg /usr/sfw /usr"
17189        fi
17190        for dir in $withval; do
17191            thedir="$dir"
17192            if test -f "$dir/include/event.h" -o -f "$dir/include/event2/event.h"; then
17193                found_libevent="yes"
17194				if test "$thedir" != "/usr"; then
17195                    CPPFLAGS="$CPPFLAGS -I$thedir/include"
17196		fi
17197                break;
17198            fi
17199        done
17200        if test x_$found_libevent != x_yes; then
17201		if test -f "$dir/event.h" -a \( -f "$dir/libevent.la" -o -f "$dir/libev.la" \) ; then
17202			# libevent source directory
17203            		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: found in $thedir" >&5
17204$as_echo "found in $thedir" >&6; }
17205                	CPPFLAGS="$CPPFLAGS -I$thedir -I$thedir/include"
17206			BAK_LDFLAGS_SET="1"
17207			BAK_LDFLAGS="$LDFLAGS"
17208			# remove evdns from linking
17209			mkdir build >/dev/null 2>&1
17210			mkdir build/libevent >/dev/null 2>&1
17211			mkdir build/libevent/.libs >/dev/null 2>&1
17212			ev_files_o=`ls $thedir/*.o | grep -v evdns\.o | grep -v bufferevent_openssl\.o`
17213			ev_files_lo=`ls $thedir/*.lo | grep -v evdns\.lo | grep -v bufferevent_openssl\.lo`
17214			ev_files_libso=`ls $thedir/.libs/*.o | grep -v evdns\.o | grep -v bufferevent_openssl\.o`
17215			cp $ev_files_o build/libevent
17216			cp $ev_files_lo build/libevent
17217			cp $ev_files_libso build/libevent/.libs
17218            		LATE_LDFLAGS="build/libevent/*.lo -lm"
17219			LDFLAGS="build/libevent/*.o $LDFLAGS -lm"
17220		else
17221            		as_fn_error $? "Cannot find the libevent library in $withval
17222You can restart ./configure --with-libevent=no to use a builtin alternative.
17223Please note that this alternative is not as capable as libevent when using
17224large outgoing port ranges.  " "$LINENO" 5
17225		fi
17226        else
17227            { $as_echo "$as_me:${as_lineno-$LINENO}: result: found in $thedir" >&5
17228$as_echo "found in $thedir" >&6; }
17229	    	    if test ! -f $thedir/lib/libevent.a -a ! -f $thedir/lib/libevent.so -a -d "$thedir/lib/event2"; then
17230		    LDFLAGS="$LDFLAGS -L$thedir/lib/event2"
17231
17232	if test "x$enable_rpath" = xyes; then
17233		if echo "$thedir/lib/event2" | grep "^/" >/dev/null; then
17234			RUNTIME_PATH="$RUNTIME_PATH -R$thedir/lib/event2"
17235		fi
17236	fi
17237
17238	    else
17239		    		    if test "$thedir" != "/usr" -a "$thedir" != ""; then
17240			LDFLAGS="$LDFLAGS -L$thedir/lib"
17241
17242	if test "x$enable_rpath" = xyes; then
17243		if echo "$thedir/lib" | grep "^/" >/dev/null; then
17244			RUNTIME_PATH="$RUNTIME_PATH -R$thedir/lib"
17245		fi
17246	fi
17247
17248		    fi
17249	    fi
17250        fi
17251	# check for library used by libevent after 1.3c
17252	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5
17253$as_echo_n "checking for library containing clock_gettime... " >&6; }
17254if ${ac_cv_search_clock_gettime+:} false; then :
17255  $as_echo_n "(cached) " >&6
17256else
17257  ac_func_search_save_LIBS=$LIBS
17258cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17259/* end confdefs.h.  */
17260
17261/* Override any GCC internal prototype to avoid an error.
17262   Use char because int might match the return type of a GCC
17263   builtin and then its argument prototype would still apply.  */
17264#ifdef __cplusplus
17265extern "C"
17266#endif
17267char clock_gettime ();
17268int
17269main ()
17270{
17271return clock_gettime ();
17272  ;
17273  return 0;
17274}
17275_ACEOF
17276for ac_lib in '' rt; do
17277  if test -z "$ac_lib"; then
17278    ac_res="none required"
17279  else
17280    ac_res=-l$ac_lib
17281    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
17282  fi
17283  if ac_fn_c_try_link "$LINENO"; then :
17284  ac_cv_search_clock_gettime=$ac_res
17285fi
17286rm -f core conftest.err conftest.$ac_objext \
17287    conftest$ac_exeext
17288  if ${ac_cv_search_clock_gettime+:} false; then :
17289  break
17290fi
17291done
17292if ${ac_cv_search_clock_gettime+:} false; then :
17293
17294else
17295  ac_cv_search_clock_gettime=no
17296fi
17297rm conftest.$ac_ext
17298LIBS=$ac_func_search_save_LIBS
17299fi
17300{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5
17301$as_echo "$ac_cv_search_clock_gettime" >&6; }
17302ac_res=$ac_cv_search_clock_gettime
17303if test "$ac_res" != no; then :
17304  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
17305
17306fi
17307
17308
17309	# is the event.h header libev or libevent?
17310	for ac_header in event.h
17311do :
17312  ac_fn_c_check_header_compile "$LINENO" "event.h" "ac_cv_header_event_h" "$ac_includes_default
17313"
17314if test "x$ac_cv_header_event_h" = xyes; then :
17315  cat >>confdefs.h <<_ACEOF
17316#define HAVE_EVENT_H 1
17317_ACEOF
17318
17319fi
17320
17321done
17322
17323	ac_fn_c_check_decl "$LINENO" "EV_VERSION_MAJOR" "ac_cv_have_decl_EV_VERSION_MAJOR" "$ac_includes_default
17324#include <event.h>
17325
17326"
17327if test "x$ac_cv_have_decl_EV_VERSION_MAJOR" = xyes; then :
17328
17329		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing event_set" >&5
17330$as_echo_n "checking for library containing event_set... " >&6; }
17331if ${ac_cv_search_event_set+:} false; then :
17332  $as_echo_n "(cached) " >&6
17333else
17334  ac_func_search_save_LIBS=$LIBS
17335cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17336/* end confdefs.h.  */
17337
17338/* Override any GCC internal prototype to avoid an error.
17339   Use char because int might match the return type of a GCC
17340   builtin and then its argument prototype would still apply.  */
17341#ifdef __cplusplus
17342extern "C"
17343#endif
17344char event_set ();
17345int
17346main ()
17347{
17348return event_set ();
17349  ;
17350  return 0;
17351}
17352_ACEOF
17353for ac_lib in '' ev; do
17354  if test -z "$ac_lib"; then
17355    ac_res="none required"
17356  else
17357    ac_res=-l$ac_lib
17358    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
17359  fi
17360  if ac_fn_c_try_link "$LINENO"; then :
17361  ac_cv_search_event_set=$ac_res
17362fi
17363rm -f core conftest.err conftest.$ac_objext \
17364    conftest$ac_exeext
17365  if ${ac_cv_search_event_set+:} false; then :
17366  break
17367fi
17368done
17369if ${ac_cv_search_event_set+:} false; then :
17370
17371else
17372  ac_cv_search_event_set=no
17373fi
17374rm conftest.$ac_ext
17375LIBS=$ac_func_search_save_LIBS
17376fi
17377{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_event_set" >&5
17378$as_echo "$ac_cv_search_event_set" >&6; }
17379ac_res=$ac_cv_search_event_set
17380if test "$ac_res" != no; then :
17381  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
17382
17383fi
17384
17385
17386else
17387
17388		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing event_set" >&5
17389$as_echo_n "checking for library containing event_set... " >&6; }
17390if ${ac_cv_search_event_set+:} false; then :
17391  $as_echo_n "(cached) " >&6
17392else
17393  ac_func_search_save_LIBS=$LIBS
17394cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17395/* end confdefs.h.  */
17396
17397/* Override any GCC internal prototype to avoid an error.
17398   Use char because int might match the return type of a GCC
17399   builtin and then its argument prototype would still apply.  */
17400#ifdef __cplusplus
17401extern "C"
17402#endif
17403char event_set ();
17404int
17405main ()
17406{
17407return event_set ();
17408  ;
17409  return 0;
17410}
17411_ACEOF
17412for ac_lib in '' event; do
17413  if test -z "$ac_lib"; then
17414    ac_res="none required"
17415  else
17416    ac_res=-l$ac_lib
17417    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
17418  fi
17419  if ac_fn_c_try_link "$LINENO"; then :
17420  ac_cv_search_event_set=$ac_res
17421fi
17422rm -f core conftest.err conftest.$ac_objext \
17423    conftest$ac_exeext
17424  if ${ac_cv_search_event_set+:} false; then :
17425  break
17426fi
17427done
17428if ${ac_cv_search_event_set+:} false; then :
17429
17430else
17431  ac_cv_search_event_set=no
17432fi
17433rm conftest.$ac_ext
17434LIBS=$ac_func_search_save_LIBS
17435fi
17436{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_event_set" >&5
17437$as_echo "$ac_cv_search_event_set" >&6; }
17438ac_res=$ac_cv_search_event_set
17439if test "$ac_res" != no; then :
17440  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
17441
17442fi
17443
17444
17445fi
17446
17447	for ac_func in event_base_free
17448do :
17449  ac_fn_c_check_func "$LINENO" "event_base_free" "ac_cv_func_event_base_free"
17450if test "x$ac_cv_func_event_base_free" = xyes; then :
17451  cat >>confdefs.h <<_ACEOF
17452#define HAVE_EVENT_BASE_FREE 1
17453_ACEOF
17454
17455fi
17456done
17457 # only in libevent 1.2 and later
17458	for ac_func in event_base_once
17459do :
17460  ac_fn_c_check_func "$LINENO" "event_base_once" "ac_cv_func_event_base_once"
17461if test "x$ac_cv_func_event_base_once" = xyes; then :
17462  cat >>confdefs.h <<_ACEOF
17463#define HAVE_EVENT_BASE_ONCE 1
17464_ACEOF
17465
17466fi
17467done
17468 # only in libevent 1.4.1 and later
17469	for ac_func in event_base_new
17470do :
17471  ac_fn_c_check_func "$LINENO" "event_base_new" "ac_cv_func_event_base_new"
17472if test "x$ac_cv_func_event_base_new" = xyes; then :
17473  cat >>confdefs.h <<_ACEOF
17474#define HAVE_EVENT_BASE_NEW 1
17475_ACEOF
17476
17477fi
17478done
17479 # only in libevent 1.4.1 and later
17480	for ac_func in event_base_get_method
17481do :
17482  ac_fn_c_check_func "$LINENO" "event_base_get_method" "ac_cv_func_event_base_get_method"
17483if test "x$ac_cv_func_event_base_get_method" = xyes; then :
17484  cat >>confdefs.h <<_ACEOF
17485#define HAVE_EVENT_BASE_GET_METHOD 1
17486_ACEOF
17487
17488fi
17489done
17490 # only in libevent 1.4.3 and later
17491	for ac_func in ev_loop
17492do :
17493  ac_fn_c_check_func "$LINENO" "ev_loop" "ac_cv_func_ev_loop"
17494if test "x$ac_cv_func_ev_loop" = xyes; then :
17495  cat >>confdefs.h <<_ACEOF
17496#define HAVE_EV_LOOP 1
17497_ACEOF
17498
17499fi
17500done
17501 # only in libev. (tested on 3.51)
17502	for ac_func in ev_default_loop
17503do :
17504  ac_fn_c_check_func "$LINENO" "ev_default_loop" "ac_cv_func_ev_default_loop"
17505if test "x$ac_cv_func_ev_default_loop" = xyes; then :
17506  cat >>confdefs.h <<_ACEOF
17507#define HAVE_EV_DEFAULT_LOOP 1
17508_ACEOF
17509
17510fi
17511done
17512 # only in libev. (tested on 4.00)
17513	if test -n "$BAK_LDFLAGS_SET"; then
17514		LDFLAGS="$BAK_LDFLAGS"
17515	fi
17516        if test "$use_unbound_event" = "yes"; then
17517		UNBOUND_EVENT_INSTALL=unbound-event-install
17518
17519		UNBOUND_EVENT_UNINSTALL=unbound-event-uninstall
17520
17521	fi
17522else
17523
17524$as_echo "#define USE_MINI_EVENT 1" >>confdefs.h
17525
17526fi
17527
17528# check for libexpat
17529
17530# Check whether --with-libexpat was given.
17531if test "${with_libexpat+set}" = set; then :
17532  withval=$with_libexpat;
17533else
17534   withval="/usr/local /opt/local /usr/lib /usr/pkg /usr/sfw /usr"
17535fi
17536
17537{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for libexpat" >&5
17538$as_echo_n "checking for libexpat... " >&6; }
17539found_libexpat="no"
17540for dir in $withval ; do
17541            if test -f "$dir/include/expat.h"; then
17542		found_libexpat="yes"
17543				if test "$dir" != "/usr"; then
17544                    CPPFLAGS="$CPPFLAGS -I$dir/include"
17545		    LDFLAGS="$LDFLAGS -L$dir/lib"
17546		fi
17547            	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: found in $dir" >&5
17548$as_echo "found in $dir" >&6; }
17549                break;
17550            fi
17551done
17552if test x_$found_libexpat != x_yes; then
17553	as_fn_error $? "Could not find libexpat, expat.h" "$LINENO" 5
17554fi
17555for ac_header in expat.h
17556do :
17557  ac_fn_c_check_header_compile "$LINENO" "expat.h" "ac_cv_header_expat_h" "$ac_includes_default
17558"
17559if test "x$ac_cv_header_expat_h" = xyes; then :
17560  cat >>confdefs.h <<_ACEOF
17561#define HAVE_EXPAT_H 1
17562_ACEOF
17563
17564fi
17565
17566done
17567
17568
17569# set static linking if requested
17570
17571staticexe=""
17572# Check whether --enable-static-exe was given.
17573if test "${enable_static_exe+set}" = set; then :
17574  enableval=$enable_static_exe;
17575fi
17576
17577if test x_$enable_static_exe = x_yes; then
17578	staticexe="-static"
17579	if test "$on_mingw" = yes; then
17580		staticexe="-all-static"
17581		# for static crosscompile, include gdi32 and zlib here.
17582		if test "`uname`" = "Linux"; then
17583			LIBS="$LIBS -lgdi32 -lz"
17584		fi
17585	fi
17586fi
17587
17588# set lock checking if requested
17589# Check whether --enable-lock_checks was given.
17590if test "${enable_lock_checks+set}" = set; then :
17591  enableval=$enable_lock_checks;
17592fi
17593
17594if test x_$enable_lock_checks = x_yes; then
17595
17596$as_echo "#define ENABLE_LOCK_CHECKS 1" >>confdefs.h
17597
17598	CHECKLOCK_OBJ="checklocks.lo"
17599
17600fi
17601
17602
17603{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
17604$as_echo_n "checking for getaddrinfo... " >&6; }
17605ac_cv_func_getaddrinfo=no
17606cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17607/* end confdefs.h.  */
17608
17609#ifdef __cplusplus
17610extern "C"
17611{
17612#endif
17613char* getaddrinfo();
17614char* (*f) () = getaddrinfo;
17615#ifdef __cplusplus
17616}
17617#endif
17618int main() {
17619        ;
17620        return 0;
17621}
17622
17623_ACEOF
17624if ac_fn_c_try_link "$LINENO"; then :
17625  ac_cv_func_getaddrinfo="yes"
17626if test "$ac_cv_header_windows_h" = "yes"; then
17627
17628$as_echo "#define USE_WINSOCK 1" >>confdefs.h
17629
17630	USE_WINSOCK="1"
17631	LIBS="$LIBS -lws2_32"
17632fi
17633
17634else
17635  ORIGLIBS="$LIBS"
17636LIBS="$LIBS -lws2_32"
17637cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17638/* end confdefs.h.  */
17639
17640#ifdef HAVE_WS2TCPIP_H
17641#include <ws2tcpip.h>
17642#endif
17643
17644int
17645main ()
17646{
17647
17648        (void)getaddrinfo(NULL, NULL, NULL, NULL);
17649
17650
17651  ;
17652  return 0;
17653}
17654_ACEOF
17655if ac_fn_c_try_link "$LINENO"; then :
17656
17657ac_cv_func_getaddrinfo="yes"
17658
17659$as_echo "#define USE_WINSOCK 1" >>confdefs.h
17660
17661USE_WINSOCK="1"
17662
17663else
17664
17665ac_cv_func_getaddrinfo="no"
17666LIBS="$ORIGLIBS"
17667
17668fi
17669rm -f core conftest.err conftest.$ac_objext \
17670    conftest$ac_exeext conftest.$ac_ext
17671
17672fi
17673rm -f core conftest.err conftest.$ac_objext \
17674    conftest$ac_exeext conftest.$ac_ext
17675
17676{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_getaddrinfo" >&5
17677$as_echo "$ac_cv_func_getaddrinfo" >&6; }
17678if test $ac_cv_func_getaddrinfo = yes; then
17679
17680$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
17681
17682fi
17683
17684if test "$USE_WINSOCK" = 1; then
17685
17686$as_echo "#define UB_ON_WINDOWS 1" >>confdefs.h
17687
17688	for ac_header in iphlpapi.h
17689do :
17690  ac_fn_c_check_header_compile "$LINENO" "iphlpapi.h" "ac_cv_header_iphlpapi_h" "$ac_includes_default
17691#include <windows.h>
17692
17693"
17694if test "x$ac_cv_header_iphlpapi_h" = xyes; then :
17695  cat >>confdefs.h <<_ACEOF
17696#define HAVE_IPHLPAPI_H 1
17697_ACEOF
17698
17699fi
17700
17701done
17702
17703	if test -n "$ac_tool_prefix"; then
17704  # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
17705set dummy ${ac_tool_prefix}windres; ac_word=$2
17706{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17707$as_echo_n "checking for $ac_word... " >&6; }
17708if ${ac_cv_prog_WINDRES+:} false; then :
17709  $as_echo_n "(cached) " >&6
17710else
17711  if test -n "$WINDRES"; then
17712  ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
17713else
17714as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17715for as_dir in $PATH
17716do
17717  IFS=$as_save_IFS
17718  test -z "$as_dir" && as_dir=.
17719    for ac_exec_ext in '' $ac_executable_extensions; do
17720  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17721    ac_cv_prog_WINDRES="${ac_tool_prefix}windres"
17722    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17723    break 2
17724  fi
17725done
17726  done
17727IFS=$as_save_IFS
17728
17729fi
17730fi
17731WINDRES=$ac_cv_prog_WINDRES
17732if test -n "$WINDRES"; then
17733  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINDRES" >&5
17734$as_echo "$WINDRES" >&6; }
17735else
17736  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17737$as_echo "no" >&6; }
17738fi
17739
17740
17741fi
17742if test -z "$ac_cv_prog_WINDRES"; then
17743  ac_ct_WINDRES=$WINDRES
17744  # Extract the first word of "windres", so it can be a program name with args.
17745set dummy windres; ac_word=$2
17746{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17747$as_echo_n "checking for $ac_word... " >&6; }
17748if ${ac_cv_prog_ac_ct_WINDRES+:} false; then :
17749  $as_echo_n "(cached) " >&6
17750else
17751  if test -n "$ac_ct_WINDRES"; then
17752  ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # Let the user override the test.
17753else
17754as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17755for as_dir in $PATH
17756do
17757  IFS=$as_save_IFS
17758  test -z "$as_dir" && as_dir=.
17759    for ac_exec_ext in '' $ac_executable_extensions; do
17760  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17761    ac_cv_prog_ac_ct_WINDRES="windres"
17762    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17763    break 2
17764  fi
17765done
17766  done
17767IFS=$as_save_IFS
17768
17769fi
17770fi
17771ac_ct_WINDRES=$ac_cv_prog_ac_ct_WINDRES
17772if test -n "$ac_ct_WINDRES"; then
17773  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_WINDRES" >&5
17774$as_echo "$ac_ct_WINDRES" >&6; }
17775else
17776  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17777$as_echo "no" >&6; }
17778fi
17779
17780  if test "x$ac_ct_WINDRES" = x; then
17781    WINDRES=""
17782  else
17783    case $cross_compiling:$ac_tool_warned in
17784yes:)
17785{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
17786$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
17787ac_tool_warned=yes ;;
17788esac
17789    WINDRES=$ac_ct_WINDRES
17790  fi
17791else
17792  WINDRES="$ac_cv_prog_WINDRES"
17793fi
17794
17795	LIBS="$LIBS -liphlpapi"
17796	WINAPPS="unbound-service-install.exe unbound-service-remove.exe anchor-update.exe"
17797
17798	WIN_DAEMON_SRC="winrc/win_svc.c winrc/w_inst.c"
17799
17800	WIN_DAEMON_OBJ="win_svc.lo w_inst.lo"
17801
17802	WIN_DAEMON_OBJ_LINK="rsrc_unbound.o"
17803
17804	WIN_HOST_OBJ_LINK="rsrc_unbound_host.o"
17805
17806	WIN_UBANCHOR_OBJ_LINK="rsrc_unbound_anchor.o log.lo locks.lo"
17807
17808	WIN_CONTROL_OBJ_LINK="rsrc_unbound_control.o"
17809
17810	WIN_CHECKCONF_OBJ_LINK="rsrc_unbound_checkconf.o"
17811
17812fi
17813if test $ac_cv_func_getaddrinfo = no; then
17814	case " $LIBOBJS " in
17815  *" fake-rfc2553.$ac_objext "* ) ;;
17816  *) LIBOBJS="$LIBOBJS fake-rfc2553.$ac_objext"
17817 ;;
17818esac
17819
17820fi
17821# check after getaddrinfo for its libraries
17822
17823# check ioctlsocket
17824{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ioctlsocket" >&5
17825$as_echo_n "checking for ioctlsocket... " >&6; }
17826cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17827/* end confdefs.h.  */
17828
17829#ifdef HAVE_WINSOCK2_H
17830#include <winsock2.h>
17831#endif
17832
17833int
17834main ()
17835{
17836
17837	(void)ioctlsocket(0, 0, NULL);
17838
17839  ;
17840  return 0;
17841}
17842_ACEOF
17843if ac_fn_c_try_link "$LINENO"; then :
17844
17845{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17846$as_echo "yes" >&6; }
17847
17848$as_echo "#define HAVE_IOCTLSOCKET 1" >>confdefs.h
17849
17850
17851else
17852  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17853$as_echo "no" >&6; }
17854fi
17855rm -f core conftest.err conftest.$ac_objext \
17856    conftest$ac_exeext conftest.$ac_ext
17857
17858
17859# see if daemon(3) exists, and if it is deprecated.
17860for ac_func in daemon
17861do :
17862  ac_fn_c_check_func "$LINENO" "daemon" "ac_cv_func_daemon"
17863if test "x$ac_cv_func_daemon" = xyes; then :
17864  cat >>confdefs.h <<_ACEOF
17865#define HAVE_DAEMON 1
17866_ACEOF
17867
17868fi
17869done
17870
17871if test $ac_cv_func_daemon = yes; then
17872
17873
17874{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if daemon is deprecated" >&5
17875$as_echo_n "checking if daemon is deprecated... " >&6; }
17876cache=`echo daemon | sed 'y%.=/+-%___p_%'`
17877if eval \${cv_cc_deprecated_$cache+:} false; then :
17878  $as_echo_n "(cached) " >&6
17879else
17880
17881echo '
17882#include <stdlib.h>
17883' >conftest.c
17884echo 'void f(){ (void)daemon(0, 0); }' >>conftest.c
17885if test -z "`$CC -c conftest.c 2>&1 | grep deprecated`"; then
17886eval "cv_cc_deprecated_$cache=no"
17887else
17888eval "cv_cc_deprecated_$cache=yes"
17889fi
17890rm -f conftest conftest.o conftest.c
17891
17892fi
17893
17894if eval "test \"`echo '$cv_cc_deprecated_'$cache`\" = yes"; then
17895{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17896$as_echo "yes" >&6; }
17897
17898cat >>confdefs.h <<_ACEOF
17899#define DEPRECATED_DAEMON 1
17900_ACEOF
17901
17902:
17903
17904else
17905{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17906$as_echo "no" >&6; }
17907:
17908
17909fi
17910
17911fi
17912
17913ac_fn_c_check_member "$LINENO" "struct in_pktinfo" "ipi_spec_dst" "ac_cv_member_struct_in_pktinfo_ipi_spec_dst" "
17914$ac_includes_default
17915#if HAVE_SYS_PARAM_H
17916#include <sys/param.h>
17917#endif
17918
17919#ifdef HAVE_SYS_SOCKET_H
17920#include <sys/socket.h>
17921#endif
17922
17923#ifdef HAVE_SYS_UIO_H
17924#include <sys/uio.h>
17925#endif
17926
17927#ifdef HAVE_NETINET_IN_H
17928#include <netinet/in.h>
17929#endif
17930
17931#ifdef HAVE_ARPA_INET_H
17932#include <arpa/inet.h>
17933#endif
17934
17935#ifdef HAVE_WINSOCK2_H
17936#include <winsock2.h>
17937#endif
17938
17939#ifdef HAVE_WS2TCPIP_H
17940#include <ws2tcpip.h>
17941#endif
17942
17943"
17944if test "x$ac_cv_member_struct_in_pktinfo_ipi_spec_dst" = xyes; then :
17945
17946cat >>confdefs.h <<_ACEOF
17947#define HAVE_STRUCT_IN_PKTINFO_IPI_SPEC_DST 1
17948_ACEOF
17949
17950
17951fi
17952
17953{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing setusercontext" >&5
17954$as_echo_n "checking for library containing setusercontext... " >&6; }
17955if ${ac_cv_search_setusercontext+:} false; then :
17956  $as_echo_n "(cached) " >&6
17957else
17958  ac_func_search_save_LIBS=$LIBS
17959cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17960/* end confdefs.h.  */
17961
17962/* Override any GCC internal prototype to avoid an error.
17963   Use char because int might match the return type of a GCC
17964   builtin and then its argument prototype would still apply.  */
17965#ifdef __cplusplus
17966extern "C"
17967#endif
17968char setusercontext ();
17969int
17970main ()
17971{
17972return setusercontext ();
17973  ;
17974  return 0;
17975}
17976_ACEOF
17977for ac_lib in '' util; do
17978  if test -z "$ac_lib"; then
17979    ac_res="none required"
17980  else
17981    ac_res=-l$ac_lib
17982    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
17983  fi
17984  if ac_fn_c_try_link "$LINENO"; then :
17985  ac_cv_search_setusercontext=$ac_res
17986fi
17987rm -f core conftest.err conftest.$ac_objext \
17988    conftest$ac_exeext
17989  if ${ac_cv_search_setusercontext+:} false; then :
17990  break
17991fi
17992done
17993if ${ac_cv_search_setusercontext+:} false; then :
17994
17995else
17996  ac_cv_search_setusercontext=no
17997fi
17998rm conftest.$ac_ext
17999LIBS=$ac_func_search_save_LIBS
18000fi
18001{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_setusercontext" >&5
18002$as_echo "$ac_cv_search_setusercontext" >&6; }
18003ac_res=$ac_cv_search_setusercontext
18004if test "$ac_res" != no; then :
18005  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
18006
18007fi
18008
18009for ac_func in tzset sigprocmask fcntl getpwnam getrlimit setrlimit setsid sbrk chroot kill sleep usleep random srandom recvmsg sendmsg writev socketpair glob initgroups strftime localtime_r setusercontext _beginthreadex endservent endprotoent
18010do :
18011  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
18012ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
18013if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
18014  cat >>confdefs.h <<_ACEOF
18015#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
18016_ACEOF
18017
18018fi
18019done
18020
18021for ac_func in setresuid
18022do :
18023  ac_fn_c_check_func "$LINENO" "setresuid" "ac_cv_func_setresuid"
18024if test "x$ac_cv_func_setresuid" = xyes; then :
18025  cat >>confdefs.h <<_ACEOF
18026#define HAVE_SETRESUID 1
18027_ACEOF
18028
18029else
18030  for ac_func in setreuid
18031do :
18032  ac_fn_c_check_func "$LINENO" "setreuid" "ac_cv_func_setreuid"
18033if test "x$ac_cv_func_setreuid" = xyes; then :
18034  cat >>confdefs.h <<_ACEOF
18035#define HAVE_SETREUID 1
18036_ACEOF
18037
18038fi
18039done
18040
18041fi
18042done
18043
18044for ac_func in setresgid
18045do :
18046  ac_fn_c_check_func "$LINENO" "setresgid" "ac_cv_func_setresgid"
18047if test "x$ac_cv_func_setresgid" = xyes; then :
18048  cat >>confdefs.h <<_ACEOF
18049#define HAVE_SETRESGID 1
18050_ACEOF
18051
18052else
18053  for ac_func in setregid
18054do :
18055  ac_fn_c_check_func "$LINENO" "setregid" "ac_cv_func_setregid"
18056if test "x$ac_cv_func_setregid" = xyes; then :
18057  cat >>confdefs.h <<_ACEOF
18058#define HAVE_SETREGID 1
18059_ACEOF
18060
18061fi
18062done
18063
18064fi
18065done
18066
18067
18068# check if setreuid en setregid fail, on MacOSX10.4(darwin8).
18069if echo $build_os | grep darwin8 > /dev/null; then
18070
18071$as_echo "#define DARWIN_BROKEN_SETREUID 1" >>confdefs.h
18072
18073fi
18074ac_fn_c_check_func "$LINENO" "inet_aton" "ac_cv_func_inet_aton"
18075if test "x$ac_cv_func_inet_aton" = xyes; then :
18076  $as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
18077
18078else
18079  case " $LIBOBJS " in
18080  *" inet_aton.$ac_objext "* ) ;;
18081  *) LIBOBJS="$LIBOBJS inet_aton.$ac_objext"
18082 ;;
18083esac
18084
18085fi
18086
18087
18088ac_fn_c_check_func "$LINENO" "inet_pton" "ac_cv_func_inet_pton"
18089if test "x$ac_cv_func_inet_pton" = xyes; then :
18090  $as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
18091
18092else
18093  case " $LIBOBJS " in
18094  *" inet_pton.$ac_objext "* ) ;;
18095  *) LIBOBJS="$LIBOBJS inet_pton.$ac_objext"
18096 ;;
18097esac
18098
18099fi
18100
18101
18102ac_fn_c_check_func "$LINENO" "inet_ntop" "ac_cv_func_inet_ntop"
18103if test "x$ac_cv_func_inet_ntop" = xyes; then :
18104  $as_echo "#define HAVE_INET_NTOP 1" >>confdefs.h
18105
18106else
18107  case " $LIBOBJS " in
18108  *" inet_ntop.$ac_objext "* ) ;;
18109  *) LIBOBJS="$LIBOBJS inet_ntop.$ac_objext"
18110 ;;
18111esac
18112
18113fi
18114
18115
18116ac_fn_c_check_func "$LINENO" "snprintf" "ac_cv_func_snprintf"
18117if test "x$ac_cv_func_snprintf" = xyes; then :
18118  $as_echo "#define HAVE_SNPRINTF 1" >>confdefs.h
18119
18120else
18121  case " $LIBOBJS " in
18122  *" snprintf.$ac_objext "* ) ;;
18123  *) LIBOBJS="$LIBOBJS snprintf.$ac_objext"
18124 ;;
18125esac
18126
18127fi
18128
18129
18130ac_fn_c_check_func "$LINENO" "strlcat" "ac_cv_func_strlcat"
18131if test "x$ac_cv_func_strlcat" = xyes; then :
18132  $as_echo "#define HAVE_STRLCAT 1" >>confdefs.h
18133
18134else
18135  case " $LIBOBJS " in
18136  *" strlcat.$ac_objext "* ) ;;
18137  *) LIBOBJS="$LIBOBJS strlcat.$ac_objext"
18138 ;;
18139esac
18140
18141fi
18142
18143
18144ac_fn_c_check_func "$LINENO" "strlcpy" "ac_cv_func_strlcpy"
18145if test "x$ac_cv_func_strlcpy" = xyes; then :
18146  $as_echo "#define HAVE_STRLCPY 1" >>confdefs.h
18147
18148else
18149  case " $LIBOBJS " in
18150  *" strlcpy.$ac_objext "* ) ;;
18151  *) LIBOBJS="$LIBOBJS strlcpy.$ac_objext"
18152 ;;
18153esac
18154
18155fi
18156
18157
18158ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove"
18159if test "x$ac_cv_func_memmove" = xyes; then :
18160  $as_echo "#define HAVE_MEMMOVE 1" >>confdefs.h
18161
18162else
18163  case " $LIBOBJS " in
18164  *" memmove.$ac_objext "* ) ;;
18165  *) LIBOBJS="$LIBOBJS memmove.$ac_objext"
18166 ;;
18167esac
18168
18169fi
18170
18171
18172ac_fn_c_check_func "$LINENO" "gmtime_r" "ac_cv_func_gmtime_r"
18173if test "x$ac_cv_func_gmtime_r" = xyes; then :
18174  $as_echo "#define HAVE_GMTIME_R 1" >>confdefs.h
18175
18176else
18177  case " $LIBOBJS " in
18178  *" gmtime_r.$ac_objext "* ) ;;
18179  *) LIBOBJS="$LIBOBJS gmtime_r.$ac_objext"
18180 ;;
18181esac
18182
18183fi
18184
18185
18186LIBOBJ_WITHOUT_CTIMEARC4="$LIBOBJS"
18187
18188if test "$USE_NSS" = "no"; then
18189	ac_fn_c_check_func "$LINENO" "arc4random" "ac_cv_func_arc4random"
18190if test "x$ac_cv_func_arc4random" = xyes; then :
18191  $as_echo "#define HAVE_ARC4RANDOM 1" >>confdefs.h
18192
18193else
18194  case " $LIBOBJS " in
18195  *" arc4random.$ac_objext "* ) ;;
18196  *) LIBOBJS="$LIBOBJS arc4random.$ac_objext"
18197 ;;
18198esac
18199
18200fi
18201
18202
18203	ac_fn_c_check_func "$LINENO" "arc4random_uniform" "ac_cv_func_arc4random_uniform"
18204if test "x$ac_cv_func_arc4random_uniform" = xyes; then :
18205  $as_echo "#define HAVE_ARC4RANDOM_UNIFORM 1" >>confdefs.h
18206
18207else
18208  case " $LIBOBJS " in
18209  *" arc4random_uniform.$ac_objext "* ) ;;
18210  *) LIBOBJS="$LIBOBJS arc4random_uniform.$ac_objext"
18211 ;;
18212esac
18213
18214fi
18215
18216
18217	if test "$ac_cv_func_arc4random" = "no"; then
18218		case " $LIBOBJS " in
18219  *" explicit_bzero.$ac_objext "* ) ;;
18220  *) LIBOBJS="$LIBOBJS explicit_bzero.$ac_objext"
18221 ;;
18222esac
18223
18224		case " $LIBOBJS " in
18225  *" arc4_lock.$ac_objext "* ) ;;
18226  *) LIBOBJS="$LIBOBJS arc4_lock.$ac_objext"
18227 ;;
18228esac
18229
18230		for ac_func in getentropy
18231do :
18232  ac_fn_c_check_func "$LINENO" "getentropy" "ac_cv_func_getentropy"
18233if test "x$ac_cv_func_getentropy" = xyes; then :
18234  cat >>confdefs.h <<_ACEOF
18235#define HAVE_GETENTROPY 1
18236_ACEOF
18237
18238else
18239
18240		    if test "$USE_WINSOCK" = 1; then
18241			case " $LIBOBJS " in
18242  *" getentropy_win.$ac_objext "* ) ;;
18243  *) LIBOBJS="$LIBOBJS getentropy_win.$ac_objext"
18244 ;;
18245esac
18246
18247		    else
18248			case `uname` in
18249			Darwin)
18250				case " $LIBOBJS " in
18251  *" getentropy_osx.$ac_objext "* ) ;;
18252  *) LIBOBJS="$LIBOBJS getentropy_osx.$ac_objext"
18253 ;;
18254esac
18255
18256			;;
18257			SunOS)
18258				case " $LIBOBJS " in
18259  *" getentropy_solaris.$ac_objext "* ) ;;
18260  *) LIBOBJS="$LIBOBJS getentropy_solaris.$ac_objext"
18261 ;;
18262esac
18263
18264				for ac_header in sys/sha2.h
18265do :
18266  ac_fn_c_check_header_compile "$LINENO" "sys/sha2.h" "ac_cv_header_sys_sha2_h" "$ac_includes_default
18267"
18268if test "x$ac_cv_header_sys_sha2_h" = xyes; then :
18269  cat >>confdefs.h <<_ACEOF
18270#define HAVE_SYS_SHA2_H 1
18271_ACEOF
18272
18273else
18274
18275					for ac_func in SHA512_Update
18276do :
18277  ac_fn_c_check_func "$LINENO" "SHA512_Update" "ac_cv_func_SHA512_Update"
18278if test "x$ac_cv_func_SHA512_Update" = xyes; then :
18279  cat >>confdefs.h <<_ACEOF
18280#define HAVE_SHA512_UPDATE 1
18281_ACEOF
18282
18283else
18284
18285						case " $LIBOBJS " in
18286  *" sha512.$ac_objext "* ) ;;
18287  *) LIBOBJS="$LIBOBJS sha512.$ac_objext"
18288 ;;
18289esac
18290
18291
18292fi
18293done
18294
18295
18296fi
18297
18298done
18299
18300				if test "$ac_cv_header_sys_sha2_h" = "yes"; then
18301					# this lib needed for sha2 on solaris
18302					LIBS="$LIBS -lmd"
18303				fi
18304			;;
18305			Linux|*)
18306				case " $LIBOBJS " in
18307  *" getentropy_linux.$ac_objext "* ) ;;
18308  *) LIBOBJS="$LIBOBJS getentropy_linux.$ac_objext"
18309 ;;
18310esac
18311
18312				for ac_func in SHA512_Update
18313do :
18314  ac_fn_c_check_func "$LINENO" "SHA512_Update" "ac_cv_func_SHA512_Update"
18315if test "x$ac_cv_func_SHA512_Update" = xyes; then :
18316  cat >>confdefs.h <<_ACEOF
18317#define HAVE_SHA512_UPDATE 1
18318_ACEOF
18319
18320else
18321
18322
18323$as_echo "#define COMPAT_SHA512 1" >>confdefs.h
18324
18325					case " $LIBOBJS " in
18326  *" sha512.$ac_objext "* ) ;;
18327  *) LIBOBJS="$LIBOBJS sha512.$ac_objext"
18328 ;;
18329esac
18330
18331
18332fi
18333done
18334
18335				for ac_header in sys/sysctl.h
18336do :
18337  ac_fn_c_check_header_compile "$LINENO" "sys/sysctl.h" "ac_cv_header_sys_sysctl_h" "$ac_includes_default
18338"
18339if test "x$ac_cv_header_sys_sysctl_h" = xyes; then :
18340  cat >>confdefs.h <<_ACEOF
18341#define HAVE_SYS_SYSCTL_H 1
18342_ACEOF
18343
18344fi
18345
18346done
18347
18348				{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5
18349$as_echo_n "checking for library containing clock_gettime... " >&6; }
18350if ${ac_cv_search_clock_gettime+:} false; then :
18351  $as_echo_n "(cached) " >&6
18352else
18353  ac_func_search_save_LIBS=$LIBS
18354cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18355/* end confdefs.h.  */
18356
18357/* Override any GCC internal prototype to avoid an error.
18358   Use char because int might match the return type of a GCC
18359   builtin and then its argument prototype would still apply.  */
18360#ifdef __cplusplus
18361extern "C"
18362#endif
18363char clock_gettime ();
18364int
18365main ()
18366{
18367return clock_gettime ();
18368  ;
18369  return 0;
18370}
18371_ACEOF
18372for ac_lib in '' rt; do
18373  if test -z "$ac_lib"; then
18374    ac_res="none required"
18375  else
18376    ac_res=-l$ac_lib
18377    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
18378  fi
18379  if ac_fn_c_try_link "$LINENO"; then :
18380  ac_cv_search_clock_gettime=$ac_res
18381fi
18382rm -f core conftest.err conftest.$ac_objext \
18383    conftest$ac_exeext
18384  if ${ac_cv_search_clock_gettime+:} false; then :
18385  break
18386fi
18387done
18388if ${ac_cv_search_clock_gettime+:} false; then :
18389
18390else
18391  ac_cv_search_clock_gettime=no
18392fi
18393rm conftest.$ac_ext
18394LIBS=$ac_func_search_save_LIBS
18395fi
18396{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5
18397$as_echo "$ac_cv_search_clock_gettime" >&6; }
18398ac_res=$ac_cv_search_clock_gettime
18399if test "$ac_res" != no; then :
18400  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
18401
18402fi
18403
18404			;;
18405			esac
18406		    fi
18407
18408fi
18409done
18410
18411	fi
18412fi
18413LIBOBJ_WITHOUT_CTIME="$LIBOBJS"
18414
18415ac_fn_c_check_func "$LINENO" "ctime_r" "ac_cv_func_ctime_r"
18416if test "x$ac_cv_func_ctime_r" = xyes; then :
18417  $as_echo "#define HAVE_CTIME_R 1" >>confdefs.h
18418
18419else
18420  case " $LIBOBJS " in
18421  *" ctime_r.$ac_objext "* ) ;;
18422  *) LIBOBJS="$LIBOBJS ctime_r.$ac_objext"
18423 ;;
18424esac
18425
18426fi
18427
18428
18429
18430# Check whether --enable-allsymbols was given.
18431if test "${enable_allsymbols+set}" = set; then :
18432  enableval=$enable_allsymbols;
18433fi
18434
18435case "$enable_allsymbols" in
18436	yes)
18437	COMMON_OBJ_ALL_SYMBOLS=""
18438	UBSYMS=""
18439	EXTRALINK="-L. -L.libs -lunbound"
18440
18441$as_echo "#define EXPORT_ALL_SYMBOLS 1" >>confdefs.h
18442
18443	;;
18444	no|*)
18445	COMMON_OBJ_ALL_SYMBOLS='$(COMMON_OBJ)'
18446	UBSYMS='-export-symbols $(srcdir)/libunbound/ubsyms.def'
18447	EXTRALINK=""
18448	;;
18449esac
18450
18451
18452
18453if test x_$enable_lock_checks = x_yes; then
18454	UBSYMS="-export-symbols clubsyms.def"
18455	cp ${srcdir}/libunbound/ubsyms.def clubsyms.def
18456	echo lock_protect >> clubsyms.def
18457	echo lock_unprotect >> clubsyms.def
18458	echo lock_get_mem >> clubsyms.def
18459	echo checklock_start >> clubsyms.def
18460	echo checklock_stop >> clubsyms.def
18461	echo checklock_lock >> clubsyms.def
18462	echo checklock_unlock >> clubsyms.def
18463	echo checklock_init >> clubsyms.def
18464	echo checklock_thrcreate >> clubsyms.def
18465	echo checklock_thrjoin >> clubsyms.def
18466fi
18467
18468# check for dnstap if requested
18469
18470  # Check whether --enable-dnstap was given.
18471if test "${enable_dnstap+set}" = set; then :
18472  enableval=$enable_dnstap; opt_dnstap=$enableval
18473else
18474  opt_dnstap=no
18475fi
18476
18477
18478
18479# Check whether --with-dnstap-socket-path was given.
18480if test "${with_dnstap_socket_path+set}" = set; then :
18481  withval=$with_dnstap_socket_path; opt_dnstap_socket_path=$withval
18482else
18483  opt_dnstap_socket_path="$UNBOUND_RUN_DIR/dnstap.sock"
18484fi
18485
18486
18487  if test "x$opt_dnstap" != "xno"; then
18488    # Extract the first word of "protoc-c", so it can be a program name with args.
18489set dummy protoc-c; ac_word=$2
18490{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18491$as_echo_n "checking for $ac_word... " >&6; }
18492if ${ac_cv_path_PROTOC_C+:} false; then :
18493  $as_echo_n "(cached) " >&6
18494else
18495  case $PROTOC_C in
18496  [\\/]* | ?:[\\/]*)
18497  ac_cv_path_PROTOC_C="$PROTOC_C" # Let the user override the test with a path.
18498  ;;
18499  *)
18500  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18501for as_dir in $PATH
18502do
18503  IFS=$as_save_IFS
18504  test -z "$as_dir" && as_dir=.
18505    for ac_exec_ext in '' $ac_executable_extensions; do
18506  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18507    ac_cv_path_PROTOC_C="$as_dir/$ac_word$ac_exec_ext"
18508    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18509    break 2
18510  fi
18511done
18512  done
18513IFS=$as_save_IFS
18514
18515  ;;
18516esac
18517fi
18518PROTOC_C=$ac_cv_path_PROTOC_C
18519if test -n "$PROTOC_C"; then
18520  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROTOC_C" >&5
18521$as_echo "$PROTOC_C" >&6; }
18522else
18523  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18524$as_echo "no" >&6; }
18525fi
18526
18527
18528    if test -z "$PROTOC_C"; then
18529      as_fn_error $? "The protoc-c program was not found. Please install protobuf-c!" "$LINENO" 5
18530    fi
18531
18532# Check whether --with-protobuf-c was given.
18533if test "${with_protobuf_c+set}" = set; then :
18534  withval=$with_protobuf_c;
18535	  # workaround for protobuf-c includes at old dir before protobuf-c-1.0.0
18536	  if test -f $withval/include/google/protobuf-c/protobuf-c.h; then
18537	    CFLAGS="$CFLAGS -I$withval/include/google"
18538	  else
18539	    CFLAGS="$CFLAGS -I$withval/include"
18540	  fi
18541	  LDFLAGS="$LDFLAGS -L$withval/lib"
18542
18543else
18544
18545	  # workaround for protobuf-c includes at old dir before protobuf-c-1.0.0
18546	  if test -f /usr/include/google/protobuf-c/protobuf-c.h; then
18547	    CFLAGS="$CFLAGS -I/usr/include/google"
18548	  else
18549	    if test -f /usr/local/include/google/protobuf-c/protobuf-c.h; then
18550	      CFLAGS="$CFLAGS -I/usr/local/include/google"
18551	      LDFLAGS="$LDFLAGS -L/usr/local/lib"
18552	    fi
18553	  fi
18554
18555fi
18556
18557
18558# Check whether --with-libfstrm was given.
18559if test "${with_libfstrm+set}" = set; then :
18560  withval=$with_libfstrm;
18561	CFLAGS="$CFLAGS -I$withval/include"
18562	LDFLAGS="$LDFLAGS -L$withval/lib"
18563
18564fi
18565
18566    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing fstrm_iothr_init" >&5
18567$as_echo_n "checking for library containing fstrm_iothr_init... " >&6; }
18568if ${ac_cv_search_fstrm_iothr_init+:} false; then :
18569  $as_echo_n "(cached) " >&6
18570else
18571  ac_func_search_save_LIBS=$LIBS
18572cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18573/* end confdefs.h.  */
18574
18575/* Override any GCC internal prototype to avoid an error.
18576   Use char because int might match the return type of a GCC
18577   builtin and then its argument prototype would still apply.  */
18578#ifdef __cplusplus
18579extern "C"
18580#endif
18581char fstrm_iothr_init ();
18582int
18583main ()
18584{
18585return fstrm_iothr_init ();
18586  ;
18587  return 0;
18588}
18589_ACEOF
18590for ac_lib in '' fstrm; do
18591  if test -z "$ac_lib"; then
18592    ac_res="none required"
18593  else
18594    ac_res=-l$ac_lib
18595    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
18596  fi
18597  if ac_fn_c_try_link "$LINENO"; then :
18598  ac_cv_search_fstrm_iothr_init=$ac_res
18599fi
18600rm -f core conftest.err conftest.$ac_objext \
18601    conftest$ac_exeext
18602  if ${ac_cv_search_fstrm_iothr_init+:} false; then :
18603  break
18604fi
18605done
18606if ${ac_cv_search_fstrm_iothr_init+:} false; then :
18607
18608else
18609  ac_cv_search_fstrm_iothr_init=no
18610fi
18611rm conftest.$ac_ext
18612LIBS=$ac_func_search_save_LIBS
18613fi
18614{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_fstrm_iothr_init" >&5
18615$as_echo "$ac_cv_search_fstrm_iothr_init" >&6; }
18616ac_res=$ac_cv_search_fstrm_iothr_init
18617if test "$ac_res" != no; then :
18618  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
18619
18620else
18621  as_fn_error $? "The fstrm library was not found. Please install fstrm!" "$LINENO" 5
18622fi
18623
18624    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing protobuf_c_message_pack" >&5
18625$as_echo_n "checking for library containing protobuf_c_message_pack... " >&6; }
18626if ${ac_cv_search_protobuf_c_message_pack+:} false; then :
18627  $as_echo_n "(cached) " >&6
18628else
18629  ac_func_search_save_LIBS=$LIBS
18630cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18631/* end confdefs.h.  */
18632
18633/* Override any GCC internal prototype to avoid an error.
18634   Use char because int might match the return type of a GCC
18635   builtin and then its argument prototype would still apply.  */
18636#ifdef __cplusplus
18637extern "C"
18638#endif
18639char protobuf_c_message_pack ();
18640int
18641main ()
18642{
18643return protobuf_c_message_pack ();
18644  ;
18645  return 0;
18646}
18647_ACEOF
18648for ac_lib in '' protobuf-c; do
18649  if test -z "$ac_lib"; then
18650    ac_res="none required"
18651  else
18652    ac_res=-l$ac_lib
18653    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
18654  fi
18655  if ac_fn_c_try_link "$LINENO"; then :
18656  ac_cv_search_protobuf_c_message_pack=$ac_res
18657fi
18658rm -f core conftest.err conftest.$ac_objext \
18659    conftest$ac_exeext
18660  if ${ac_cv_search_protobuf_c_message_pack+:} false; then :
18661  break
18662fi
18663done
18664if ${ac_cv_search_protobuf_c_message_pack+:} false; then :
18665
18666else
18667  ac_cv_search_protobuf_c_message_pack=no
18668fi
18669rm conftest.$ac_ext
18670LIBS=$ac_func_search_save_LIBS
18671fi
18672{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_protobuf_c_message_pack" >&5
18673$as_echo "$ac_cv_search_protobuf_c_message_pack" >&6; }
18674ac_res=$ac_cv_search_protobuf_c_message_pack
18675if test "$ac_res" != no; then :
18676  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
18677
18678else
18679  as_fn_error $? "The protobuf-c library was not found. Please install protobuf-c!" "$LINENO" 5
18680fi
18681
18682
18683
18684$as_echo "#define USE_DNSTAP 1" >>confdefs.h
18685
18686        ENABLE_DNSTAP=1
18687
18688
18689
18690        hdr_dnstap_socket_path="`echo $opt_dnstap_socket_path | sed -e 's/\\\\/\\\\\\\\/g'`"
18691
18692
18693cat >>confdefs.h <<_ACEOF
18694#define DNSTAP_SOCKET_PATH "$hdr_dnstap_socket_path"
18695_ACEOF
18696
18697
18698        DNSTAP_SRC="dnstap/dnstap.c dnstap/dnstap.pb-c.c"
18699
18700        DNSTAP_OBJ="dnstap.lo dnstap.pb-c.lo"
18701
18702
18703  else
18704
18705        ENABLE_DNSTAP=0
18706
18707
18708
18709  fi
18710
18711
18712{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if ${MAKE:-make} supports $< with implicit rule in scope" >&5
18713$as_echo_n "checking if ${MAKE:-make} supports $< with implicit rule in scope... " >&6; }
18714# on openBSD, the implicit rule make $< work.
18715# on Solaris, it does not work ($? is changed sources, $^ lists dependencies).
18716# gmake works.
18717cat >conftest.make <<EOF
18718all:	conftest.lo
18719
18720conftest.lo foo.lo bla.lo:
18721	if test -f "\$<"; then touch \$@; fi
18722
18723.SUFFIXES: .lo
18724.c.lo:
18725	if test -f "\$<"; then touch \$@; fi
18726
18727conftest.lo:        conftest.dir/conftest.c
18728EOF
18729mkdir conftest.dir
18730touch conftest.dir/conftest.c
18731rm -f conftest.lo conftest.c
18732${MAKE:-make} -f conftest.make >/dev/null
18733rm -f conftest.make conftest.c conftest.dir/conftest.c
18734rm -rf conftest.dir
18735if test ! -f conftest.lo; then
18736	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18737$as_echo "no" >&6; }
18738	SOURCEDETERMINE='echo "$^" | awk "-F " "{print \$$1;}" > .source'
18739	SOURCEFILE='`cat .source`'
18740else
18741	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
18742$as_echo "yes" >&6; }
18743	SOURCEDETERMINE=':'
18744	SOURCEFILE='$<'
18745fi
18746rm -f conftest.lo
18747
18748
18749
18750# see if we want to build the library or everything
18751ALLTARGET="alltargets"
18752INSTALLTARGET="install-all"
18753
18754# Check whether --with-libunbound-only was given.
18755if test "${with_libunbound_only+set}" = set; then :
18756  withval=$with_libunbound_only;
18757	if test "$withval" = "yes"; then
18758		ALLTARGET="lib"
18759		INSTALLTARGET="install-lib"
18760	fi
18761
18762fi
18763
18764
18765
18766
18767
18768  { $as_echo "$as_me:${as_lineno-$LINENO}: Stripping extension flags..." >&5
18769$as_echo "$as_me: Stripping extension flags..." >&6;}
18770
18771  if echo $CFLAGS | grep " -D_GNU_SOURCE" >/dev/null 2>&1; then
18772    CFLAGS="`echo $CFLAGS | sed -e 's/ -D_GNU_SOURCE//g'`"
18773
18774$as_echo "#define OMITTED__D_GNU_SOURCE 1" >>confdefs.h
18775
18776  fi
18777
18778
18779  if echo $CFLAGS | grep " -D_BSD_SOURCE" >/dev/null 2>&1; then
18780    CFLAGS="`echo $CFLAGS | sed -e 's/ -D_BSD_SOURCE//g'`"
18781
18782$as_echo "#define OMITTED__D_BSD_SOURCE 1" >>confdefs.h
18783
18784  fi
18785
18786
18787  if echo $CFLAGS | grep " -D__EXTENSIONS__" >/dev/null 2>&1; then
18788    CFLAGS="`echo $CFLAGS | sed -e 's/ -D__EXTENSIONS__//g'`"
18789
18790$as_echo "#define OMITTED__D__EXTENSIONS__ 1" >>confdefs.h
18791
18792  fi
18793
18794
18795  if echo $CFLAGS | grep " -D_POSIX_C_SOURCE=200112" >/dev/null 2>&1; then
18796    CFLAGS="`echo $CFLAGS | sed -e 's/ -D_POSIX_C_SOURCE=200112//g'`"
18797
18798$as_echo "#define OMITTED__D_POSIX_C_SOURCE_200112 1" >>confdefs.h
18799
18800  fi
18801
18802
18803  if echo $CFLAGS | grep " -D_XOPEN_SOURCE=600" >/dev/null 2>&1; then
18804    CFLAGS="`echo $CFLAGS | sed -e 's/ -D_XOPEN_SOURCE=600//g'`"
18805
18806$as_echo "#define OMITTED__D_XOPEN_SOURCE_600 1" >>confdefs.h
18807
18808  fi
18809
18810
18811  if echo $CFLAGS | grep " -D_XOPEN_SOURCE_EXTENDED=1" >/dev/null 2>&1; then
18812    CFLAGS="`echo $CFLAGS | sed -e 's/ -D_XOPEN_SOURCE_EXTENDED=1//g'`"
18813
18814$as_echo "#define OMITTED__D_XOPEN_SOURCE_EXTENDED_1 1" >>confdefs.h
18815
18816  fi
18817
18818
18819  if echo $CFLAGS | grep " -D_ALL_SOURCE" >/dev/null 2>&1; then
18820    CFLAGS="`echo $CFLAGS | sed -e 's/ -D_ALL_SOURCE//g'`"
18821
18822$as_echo "#define OMITTED__D_ALL_SOURCE 1" >>confdefs.h
18823
18824  fi
18825
18826
18827  if echo $CFLAGS | grep " -D_LARGEFILE_SOURCE=1" >/dev/null 2>&1; then
18828    CFLAGS="`echo $CFLAGS | sed -e 's/ -D_LARGEFILE_SOURCE=1//g'`"
18829
18830$as_echo "#define OMITTED__D_LARGEFILE_SOURCE_1 1" >>confdefs.h
18831
18832  fi
18833
18834
18835LDFLAGS="$LATE_LDFLAGS $LDFLAGS"
18836
18837
18838cat >>confdefs.h <<_ACEOF
18839#define MAXSYSLOGMSGLEN 10240
18840_ACEOF
18841
18842
18843
18844
18845version=1.5.1
18846
18847date=`date +'%b %e, %Y'`
18848
18849
18850ac_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"
18851
18852ac_config_headers="$ac_config_headers config.h"
18853
18854cat >confcache <<\_ACEOF
18855# This file is a shell script that caches the results of configure
18856# tests run on this system so they can be shared between configure
18857# scripts and configure runs, see configure's option --config-cache.
18858# It is not useful on other systems.  If it contains results you don't
18859# want to keep, you may remove or edit it.
18860#
18861# config.status only pays attention to the cache file if you give it
18862# the --recheck option to rerun configure.
18863#
18864# `ac_cv_env_foo' variables (set or unset) will be overridden when
18865# loading this file, other *unset* `ac_cv_foo' will be assigned the
18866# following values.
18867
18868_ACEOF
18869
18870# The following way of writing the cache mishandles newlines in values,
18871# but we know of no workaround that is simple, portable, and efficient.
18872# So, we kill variables containing newlines.
18873# Ultrix sh set writes to stderr and can't be redirected directly,
18874# and sets the high bit in the cache file unless we assign to the vars.
18875(
18876  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
18877    eval ac_val=\$$ac_var
18878    case $ac_val in #(
18879    *${as_nl}*)
18880      case $ac_var in #(
18881      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
18882$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
18883      esac
18884      case $ac_var in #(
18885      _ | IFS | as_nl) ;; #(
18886      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
18887      *) { eval $ac_var=; unset $ac_var;} ;;
18888      esac ;;
18889    esac
18890  done
18891
18892  (set) 2>&1 |
18893    case $as_nl`(ac_space=' '; set) 2>&1` in #(
18894    *${as_nl}ac_space=\ *)
18895      # `set' does not quote correctly, so add quotes: double-quote
18896      # substitution turns \\\\ into \\, and sed turns \\ into \.
18897      sed -n \
18898	"s/'/'\\\\''/g;
18899	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
18900      ;; #(
18901    *)
18902      # `set' quotes correctly as required by POSIX, so do not add quotes.
18903      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
18904      ;;
18905    esac |
18906    sort
18907) |
18908  sed '
18909     /^ac_cv_env_/b end
18910     t clear
18911     :clear
18912     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
18913     t end
18914     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
18915     :end' >>confcache
18916if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
18917  if test -w "$cache_file"; then
18918    if test "x$cache_file" != "x/dev/null"; then
18919      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
18920$as_echo "$as_me: updating cache $cache_file" >&6;}
18921      if test ! -f "$cache_file" || test -h "$cache_file"; then
18922	cat confcache >"$cache_file"
18923      else
18924        case $cache_file in #(
18925        */* | ?:*)
18926	  mv -f confcache "$cache_file"$$ &&
18927	  mv -f "$cache_file"$$ "$cache_file" ;; #(
18928        *)
18929	  mv -f confcache "$cache_file" ;;
18930	esac
18931      fi
18932    fi
18933  else
18934    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
18935$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
18936  fi
18937fi
18938rm -f confcache
18939
18940test "x$prefix" = xNONE && prefix=$ac_default_prefix
18941# Let make expand exec_prefix.
18942test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
18943
18944DEFS=-DHAVE_CONFIG_H
18945
18946ac_libobjs=
18947ac_ltlibobjs=
18948U=
18949for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
18950  # 1. Remove the extension, and $U if already installed.
18951  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
18952  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
18953  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
18954  #    will be set to the directory where LIBOBJS objects are built.
18955  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
18956  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
18957done
18958LIBOBJS=$ac_libobjs
18959
18960LTLIBOBJS=$ac_ltlibobjs
18961
18962
18963
18964: "${CONFIG_STATUS=./config.status}"
18965ac_write_fail=0
18966ac_clean_files_save=$ac_clean_files
18967ac_clean_files="$ac_clean_files $CONFIG_STATUS"
18968{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
18969$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
18970as_write_fail=0
18971cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
18972#! $SHELL
18973# Generated by $as_me.
18974# Run this file to recreate the current configuration.
18975# Compiler output produced by configure, useful for debugging
18976# configure, is in config.log if it exists.
18977
18978debug=false
18979ac_cs_recheck=false
18980ac_cs_silent=false
18981
18982SHELL=\${CONFIG_SHELL-$SHELL}
18983export SHELL
18984_ASEOF
18985cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
18986## -------------------- ##
18987## M4sh Initialization. ##
18988## -------------------- ##
18989
18990# Be more Bourne compatible
18991DUALCASE=1; export DUALCASE # for MKS sh
18992if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
18993  emulate sh
18994  NULLCMD=:
18995  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
18996  # is contrary to our usage.  Disable this feature.
18997  alias -g '${1+"$@"}'='"$@"'
18998  setopt NO_GLOB_SUBST
18999else
19000  case `(set -o) 2>/dev/null` in #(
19001  *posix*) :
19002    set -o posix ;; #(
19003  *) :
19004     ;;
19005esac
19006fi
19007
19008
19009as_nl='
19010'
19011export as_nl
19012# Printing a long string crashes Solaris 7 /usr/bin/printf.
19013as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
19014as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
19015as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
19016# Prefer a ksh shell builtin over an external printf program on Solaris,
19017# but without wasting forks for bash or zsh.
19018if test -z "$BASH_VERSION$ZSH_VERSION" \
19019    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
19020  as_echo='print -r --'
19021  as_echo_n='print -rn --'
19022elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
19023  as_echo='printf %s\n'
19024  as_echo_n='printf %s'
19025else
19026  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
19027    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
19028    as_echo_n='/usr/ucb/echo -n'
19029  else
19030    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
19031    as_echo_n_body='eval
19032      arg=$1;
19033      case $arg in #(
19034      *"$as_nl"*)
19035	expr "X$arg" : "X\\(.*\\)$as_nl";
19036	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
19037      esac;
19038      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
19039    '
19040    export as_echo_n_body
19041    as_echo_n='sh -c $as_echo_n_body as_echo'
19042  fi
19043  export as_echo_body
19044  as_echo='sh -c $as_echo_body as_echo'
19045fi
19046
19047# The user is always right.
19048if test "${PATH_SEPARATOR+set}" != set; then
19049  PATH_SEPARATOR=:
19050  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
19051    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
19052      PATH_SEPARATOR=';'
19053  }
19054fi
19055
19056
19057# IFS
19058# We need space, tab and new line, in precisely that order.  Quoting is
19059# there to prevent editors from complaining about space-tab.
19060# (If _AS_PATH_WALK were called with IFS unset, it would disable word
19061# splitting by setting IFS to empty value.)
19062IFS=" ""	$as_nl"
19063
19064# Find who we are.  Look in the path if we contain no directory separator.
19065as_myself=
19066case $0 in #((
19067  *[\\/]* ) as_myself=$0 ;;
19068  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19069for as_dir in $PATH
19070do
19071  IFS=$as_save_IFS
19072  test -z "$as_dir" && as_dir=.
19073    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
19074  done
19075IFS=$as_save_IFS
19076
19077     ;;
19078esac
19079# We did not find ourselves, most probably we were run as `sh COMMAND'
19080# in which case we are not to be found in the path.
19081if test "x$as_myself" = x; then
19082  as_myself=$0
19083fi
19084if test ! -f "$as_myself"; then
19085  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
19086  exit 1
19087fi
19088
19089# Unset variables that we do not need and which cause bugs (e.g. in
19090# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
19091# suppresses any "Segmentation fault" message there.  '((' could
19092# trigger a bug in pdksh 5.2.14.
19093for as_var in BASH_ENV ENV MAIL MAILPATH
19094do eval test x\${$as_var+set} = xset \
19095  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
19096done
19097PS1='$ '
19098PS2='> '
19099PS4='+ '
19100
19101# NLS nuisances.
19102LC_ALL=C
19103export LC_ALL
19104LANGUAGE=C
19105export LANGUAGE
19106
19107# CDPATH.
19108(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
19109
19110
19111# as_fn_error STATUS ERROR [LINENO LOG_FD]
19112# ----------------------------------------
19113# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
19114# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
19115# script with STATUS, using 1 if that was 0.
19116as_fn_error ()
19117{
19118  as_status=$1; test $as_status -eq 0 && as_status=1
19119  if test "$4"; then
19120    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
19121    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
19122  fi
19123  $as_echo "$as_me: error: $2" >&2
19124  as_fn_exit $as_status
19125} # as_fn_error
19126
19127
19128# as_fn_set_status STATUS
19129# -----------------------
19130# Set $? to STATUS, without forking.
19131as_fn_set_status ()
19132{
19133  return $1
19134} # as_fn_set_status
19135
19136# as_fn_exit STATUS
19137# -----------------
19138# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
19139as_fn_exit ()
19140{
19141  set +e
19142  as_fn_set_status $1
19143  exit $1
19144} # as_fn_exit
19145
19146# as_fn_unset VAR
19147# ---------------
19148# Portably unset VAR.
19149as_fn_unset ()
19150{
19151  { eval $1=; unset $1;}
19152}
19153as_unset=as_fn_unset
19154# as_fn_append VAR VALUE
19155# ----------------------
19156# Append the text in VALUE to the end of the definition contained in VAR. Take
19157# advantage of any shell optimizations that allow amortized linear growth over
19158# repeated appends, instead of the typical quadratic growth present in naive
19159# implementations.
19160if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
19161  eval 'as_fn_append ()
19162  {
19163    eval $1+=\$2
19164  }'
19165else
19166  as_fn_append ()
19167  {
19168    eval $1=\$$1\$2
19169  }
19170fi # as_fn_append
19171
19172# as_fn_arith ARG...
19173# ------------------
19174# Perform arithmetic evaluation on the ARGs, and store the result in the
19175# global $as_val. Take advantage of shells that can avoid forks. The arguments
19176# must be portable across $(()) and expr.
19177if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
19178  eval 'as_fn_arith ()
19179  {
19180    as_val=$(( $* ))
19181  }'
19182else
19183  as_fn_arith ()
19184  {
19185    as_val=`expr "$@" || test $? -eq 1`
19186  }
19187fi # as_fn_arith
19188
19189
19190if expr a : '\(a\)' >/dev/null 2>&1 &&
19191   test "X`expr 00001 : '.*\(...\)'`" = X001; then
19192  as_expr=expr
19193else
19194  as_expr=false
19195fi
19196
19197if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
19198  as_basename=basename
19199else
19200  as_basename=false
19201fi
19202
19203if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
19204  as_dirname=dirname
19205else
19206  as_dirname=false
19207fi
19208
19209as_me=`$as_basename -- "$0" ||
19210$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
19211	 X"$0" : 'X\(//\)$' \| \
19212	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
19213$as_echo X/"$0" |
19214    sed '/^.*\/\([^/][^/]*\)\/*$/{
19215	    s//\1/
19216	    q
19217	  }
19218	  /^X\/\(\/\/\)$/{
19219	    s//\1/
19220	    q
19221	  }
19222	  /^X\/\(\/\).*/{
19223	    s//\1/
19224	    q
19225	  }
19226	  s/.*/./; q'`
19227
19228# Avoid depending upon Character Ranges.
19229as_cr_letters='abcdefghijklmnopqrstuvwxyz'
19230as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
19231as_cr_Letters=$as_cr_letters$as_cr_LETTERS
19232as_cr_digits='0123456789'
19233as_cr_alnum=$as_cr_Letters$as_cr_digits
19234
19235ECHO_C= ECHO_N= ECHO_T=
19236case `echo -n x` in #(((((
19237-n*)
19238  case `echo 'xy\c'` in
19239  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
19240  xy)  ECHO_C='\c';;
19241  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
19242       ECHO_T='	';;
19243  esac;;
19244*)
19245  ECHO_N='-n';;
19246esac
19247
19248rm -f conf$$ conf$$.exe conf$$.file
19249if test -d conf$$.dir; then
19250  rm -f conf$$.dir/conf$$.file
19251else
19252  rm -f conf$$.dir
19253  mkdir conf$$.dir 2>/dev/null
19254fi
19255if (echo >conf$$.file) 2>/dev/null; then
19256  if ln -s conf$$.file conf$$ 2>/dev/null; then
19257    as_ln_s='ln -s'
19258    # ... but there are two gotchas:
19259    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
19260    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
19261    # In both cases, we have to default to `cp -pR'.
19262    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
19263      as_ln_s='cp -pR'
19264  elif ln conf$$.file conf$$ 2>/dev/null; then
19265    as_ln_s=ln
19266  else
19267    as_ln_s='cp -pR'
19268  fi
19269else
19270  as_ln_s='cp -pR'
19271fi
19272rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
19273rmdir conf$$.dir 2>/dev/null
19274
19275
19276# as_fn_mkdir_p
19277# -------------
19278# Create "$as_dir" as a directory, including parents if necessary.
19279as_fn_mkdir_p ()
19280{
19281
19282  case $as_dir in #(
19283  -*) as_dir=./$as_dir;;
19284  esac
19285  test -d "$as_dir" || eval $as_mkdir_p || {
19286    as_dirs=
19287    while :; do
19288      case $as_dir in #(
19289      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
19290      *) as_qdir=$as_dir;;
19291      esac
19292      as_dirs="'$as_qdir' $as_dirs"
19293      as_dir=`$as_dirname -- "$as_dir" ||
19294$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
19295	 X"$as_dir" : 'X\(//\)[^/]' \| \
19296	 X"$as_dir" : 'X\(//\)$' \| \
19297	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
19298$as_echo X"$as_dir" |
19299    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
19300	    s//\1/
19301	    q
19302	  }
19303	  /^X\(\/\/\)[^/].*/{
19304	    s//\1/
19305	    q
19306	  }
19307	  /^X\(\/\/\)$/{
19308	    s//\1/
19309	    q
19310	  }
19311	  /^X\(\/\).*/{
19312	    s//\1/
19313	    q
19314	  }
19315	  s/.*/./; q'`
19316      test -d "$as_dir" && break
19317    done
19318    test -z "$as_dirs" || eval "mkdir $as_dirs"
19319  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
19320
19321
19322} # as_fn_mkdir_p
19323if mkdir -p . 2>/dev/null; then
19324  as_mkdir_p='mkdir -p "$as_dir"'
19325else
19326  test -d ./-p && rmdir ./-p
19327  as_mkdir_p=false
19328fi
19329
19330
19331# as_fn_executable_p FILE
19332# -----------------------
19333# Test if FILE is an executable regular file.
19334as_fn_executable_p ()
19335{
19336  test -f "$1" && test -x "$1"
19337} # as_fn_executable_p
19338as_test_x='test -x'
19339as_executable_p=as_fn_executable_p
19340
19341# Sed expression to map a string onto a valid CPP name.
19342as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
19343
19344# Sed expression to map a string onto a valid variable name.
19345as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
19346
19347
19348exec 6>&1
19349## ----------------------------------- ##
19350## Main body of $CONFIG_STATUS script. ##
19351## ----------------------------------- ##
19352_ASEOF
19353test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
19354
19355cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19356# Save the log message, to keep $0 and so on meaningful, and to
19357# report actual input values of CONFIG_FILES etc. instead of their
19358# values after options handling.
19359ac_log="
19360This file was extended by unbound $as_me 1.5.1, which was
19361generated by GNU Autoconf 2.69.  Invocation command line was
19362
19363  CONFIG_FILES    = $CONFIG_FILES
19364  CONFIG_HEADERS  = $CONFIG_HEADERS
19365  CONFIG_LINKS    = $CONFIG_LINKS
19366  CONFIG_COMMANDS = $CONFIG_COMMANDS
19367  $ $0 $@
19368
19369on `(hostname || uname -n) 2>/dev/null | sed 1q`
19370"
19371
19372_ACEOF
19373
19374case $ac_config_files in *"
19375"*) set x $ac_config_files; shift; ac_config_files=$*;;
19376esac
19377
19378case $ac_config_headers in *"
19379"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
19380esac
19381
19382
19383cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19384# Files that config.status was made for.
19385config_files="$ac_config_files"
19386config_headers="$ac_config_headers"
19387config_commands="$ac_config_commands"
19388
19389_ACEOF
19390
19391cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19392ac_cs_usage="\
19393\`$as_me' instantiates files and other configuration actions
19394from templates according to the current configuration.  Unless the files
19395and actions are specified as TAGs, all are instantiated by default.
19396
19397Usage: $0 [OPTION]... [TAG]...
19398
19399  -h, --help       print this help, then exit
19400  -V, --version    print version number and configuration settings, then exit
19401      --config     print configuration, then exit
19402  -q, --quiet, --silent
19403                   do not print progress messages
19404  -d, --debug      don't remove temporary files
19405      --recheck    update $as_me by reconfiguring in the same conditions
19406      --file=FILE[:TEMPLATE]
19407                   instantiate the configuration file FILE
19408      --header=FILE[:TEMPLATE]
19409                   instantiate the configuration header FILE
19410
19411Configuration files:
19412$config_files
19413
19414Configuration headers:
19415$config_headers
19416
19417Configuration commands:
19418$config_commands
19419
19420Report bugs to <unbound-bugs@nlnetlabs.nl>."
19421
19422_ACEOF
19423cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19424ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
19425ac_cs_version="\\
19426unbound config.status 1.5.1
19427configured by $0, generated by GNU Autoconf 2.69,
19428  with options \\"\$ac_cs_config\\"
19429
19430Copyright (C) 2012 Free Software Foundation, Inc.
19431This config.status script is free software; the Free Software Foundation
19432gives unlimited permission to copy, distribute and modify it."
19433
19434ac_pwd='$ac_pwd'
19435srcdir='$srcdir'
19436AWK='$AWK'
19437test -n "\$AWK" || AWK=awk
19438_ACEOF
19439
19440cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19441# The default lists apply if the user does not specify any file.
19442ac_need_defaults=:
19443while test $# != 0
19444do
19445  case $1 in
19446  --*=?*)
19447    ac_option=`expr "X$1" : 'X\([^=]*\)='`
19448    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
19449    ac_shift=:
19450    ;;
19451  --*=)
19452    ac_option=`expr "X$1" : 'X\([^=]*\)='`
19453    ac_optarg=
19454    ac_shift=:
19455    ;;
19456  *)
19457    ac_option=$1
19458    ac_optarg=$2
19459    ac_shift=shift
19460    ;;
19461  esac
19462
19463  case $ac_option in
19464  # Handling of the options.
19465  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
19466    ac_cs_recheck=: ;;
19467  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
19468    $as_echo "$ac_cs_version"; exit ;;
19469  --config | --confi | --conf | --con | --co | --c )
19470    $as_echo "$ac_cs_config"; exit ;;
19471  --debug | --debu | --deb | --de | --d | -d )
19472    debug=: ;;
19473  --file | --fil | --fi | --f )
19474    $ac_shift
19475    case $ac_optarg in
19476    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
19477    '') as_fn_error $? "missing file argument" ;;
19478    esac
19479    as_fn_append CONFIG_FILES " '$ac_optarg'"
19480    ac_need_defaults=false;;
19481  --header | --heade | --head | --hea )
19482    $ac_shift
19483    case $ac_optarg in
19484    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
19485    esac
19486    as_fn_append CONFIG_HEADERS " '$ac_optarg'"
19487    ac_need_defaults=false;;
19488  --he | --h)
19489    # Conflict between --help and --header
19490    as_fn_error $? "ambiguous option: \`$1'
19491Try \`$0 --help' for more information.";;
19492  --help | --hel | -h )
19493    $as_echo "$ac_cs_usage"; exit ;;
19494  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
19495  | -silent | --silent | --silen | --sile | --sil | --si | --s)
19496    ac_cs_silent=: ;;
19497
19498  # This is an error.
19499  -*) as_fn_error $? "unrecognized option: \`$1'
19500Try \`$0 --help' for more information." ;;
19501
19502  *) as_fn_append ac_config_targets " $1"
19503     ac_need_defaults=false ;;
19504
19505  esac
19506  shift
19507done
19508
19509ac_configure_extra_args=
19510
19511if $ac_cs_silent; then
19512  exec 6>/dev/null
19513  ac_configure_extra_args="$ac_configure_extra_args --silent"
19514fi
19515
19516_ACEOF
19517cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19518if \$ac_cs_recheck; then
19519  set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
19520  shift
19521  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
19522  CONFIG_SHELL='$SHELL'
19523  export CONFIG_SHELL
19524  exec "\$@"
19525fi
19526
19527_ACEOF
19528cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19529exec 5>>config.log
19530{
19531  echo
19532  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
19533## Running $as_me. ##
19534_ASBOX
19535  $as_echo "$ac_log"
19536} >&5
19537
19538_ACEOF
19539cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19540#
19541# INIT-COMMANDS
19542#
19543
19544
19545# The HP-UX ksh and POSIX shell print the target directory to stdout
19546# if CDPATH is set.
19547(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
19548
19549sed_quote_subst='$sed_quote_subst'
19550double_quote_subst='$double_quote_subst'
19551delay_variable_subst='$delay_variable_subst'
19552macro_version='`$ECHO "$macro_version" | $SED "$delay_single_quote_subst"`'
19553macro_revision='`$ECHO "$macro_revision" | $SED "$delay_single_quote_subst"`'
19554enable_shared='`$ECHO "$enable_shared" | $SED "$delay_single_quote_subst"`'
19555enable_static='`$ECHO "$enable_static" | $SED "$delay_single_quote_subst"`'
19556pic_mode='`$ECHO "$pic_mode" | $SED "$delay_single_quote_subst"`'
19557enable_fast_install='`$ECHO "$enable_fast_install" | $SED "$delay_single_quote_subst"`'
19558SHELL='`$ECHO "$SHELL" | $SED "$delay_single_quote_subst"`'
19559ECHO='`$ECHO "$ECHO" | $SED "$delay_single_quote_subst"`'
19560PATH_SEPARATOR='`$ECHO "$PATH_SEPARATOR" | $SED "$delay_single_quote_subst"`'
19561host_alias='`$ECHO "$host_alias" | $SED "$delay_single_quote_subst"`'
19562host='`$ECHO "$host" | $SED "$delay_single_quote_subst"`'
19563host_os='`$ECHO "$host_os" | $SED "$delay_single_quote_subst"`'
19564build_alias='`$ECHO "$build_alias" | $SED "$delay_single_quote_subst"`'
19565build='`$ECHO "$build" | $SED "$delay_single_quote_subst"`'
19566build_os='`$ECHO "$build_os" | $SED "$delay_single_quote_subst"`'
19567SED='`$ECHO "$SED" | $SED "$delay_single_quote_subst"`'
19568Xsed='`$ECHO "$Xsed" | $SED "$delay_single_quote_subst"`'
19569GREP='`$ECHO "$GREP" | $SED "$delay_single_quote_subst"`'
19570EGREP='`$ECHO "$EGREP" | $SED "$delay_single_quote_subst"`'
19571FGREP='`$ECHO "$FGREP" | $SED "$delay_single_quote_subst"`'
19572LD='`$ECHO "$LD" | $SED "$delay_single_quote_subst"`'
19573NM='`$ECHO "$NM" | $SED "$delay_single_quote_subst"`'
19574LN_S='`$ECHO "$LN_S" | $SED "$delay_single_quote_subst"`'
19575max_cmd_len='`$ECHO "$max_cmd_len" | $SED "$delay_single_quote_subst"`'
19576ac_objext='`$ECHO "$ac_objext" | $SED "$delay_single_quote_subst"`'
19577exeext='`$ECHO "$exeext" | $SED "$delay_single_quote_subst"`'
19578lt_unset='`$ECHO "$lt_unset" | $SED "$delay_single_quote_subst"`'
19579lt_SP2NL='`$ECHO "$lt_SP2NL" | $SED "$delay_single_quote_subst"`'
19580lt_NL2SP='`$ECHO "$lt_NL2SP" | $SED "$delay_single_quote_subst"`'
19581lt_cv_to_host_file_cmd='`$ECHO "$lt_cv_to_host_file_cmd" | $SED "$delay_single_quote_subst"`'
19582lt_cv_to_tool_file_cmd='`$ECHO "$lt_cv_to_tool_file_cmd" | $SED "$delay_single_quote_subst"`'
19583reload_flag='`$ECHO "$reload_flag" | $SED "$delay_single_quote_subst"`'
19584reload_cmds='`$ECHO "$reload_cmds" | $SED "$delay_single_quote_subst"`'
19585OBJDUMP='`$ECHO "$OBJDUMP" | $SED "$delay_single_quote_subst"`'
19586deplibs_check_method='`$ECHO "$deplibs_check_method" | $SED "$delay_single_quote_subst"`'
19587file_magic_cmd='`$ECHO "$file_magic_cmd" | $SED "$delay_single_quote_subst"`'
19588file_magic_glob='`$ECHO "$file_magic_glob" | $SED "$delay_single_quote_subst"`'
19589want_nocaseglob='`$ECHO "$want_nocaseglob" | $SED "$delay_single_quote_subst"`'
19590DLLTOOL='`$ECHO "$DLLTOOL" | $SED "$delay_single_quote_subst"`'
19591sharedlib_from_linklib_cmd='`$ECHO "$sharedlib_from_linklib_cmd" | $SED "$delay_single_quote_subst"`'
19592AR='`$ECHO "$AR" | $SED "$delay_single_quote_subst"`'
19593AR_FLAGS='`$ECHO "$AR_FLAGS" | $SED "$delay_single_quote_subst"`'
19594archiver_list_spec='`$ECHO "$archiver_list_spec" | $SED "$delay_single_quote_subst"`'
19595STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`'
19596RANLIB='`$ECHO "$RANLIB" | $SED "$delay_single_quote_subst"`'
19597old_postinstall_cmds='`$ECHO "$old_postinstall_cmds" | $SED "$delay_single_quote_subst"`'
19598old_postuninstall_cmds='`$ECHO "$old_postuninstall_cmds" | $SED "$delay_single_quote_subst"`'
19599old_archive_cmds='`$ECHO "$old_archive_cmds" | $SED "$delay_single_quote_subst"`'
19600lock_old_archive_extraction='`$ECHO "$lock_old_archive_extraction" | $SED "$delay_single_quote_subst"`'
19601CC='`$ECHO "$CC" | $SED "$delay_single_quote_subst"`'
19602CFLAGS='`$ECHO "$CFLAGS" | $SED "$delay_single_quote_subst"`'
19603compiler='`$ECHO "$compiler" | $SED "$delay_single_quote_subst"`'
19604GCC='`$ECHO "$GCC" | $SED "$delay_single_quote_subst"`'
19605lt_cv_sys_global_symbol_pipe='`$ECHO "$lt_cv_sys_global_symbol_pipe" | $SED "$delay_single_quote_subst"`'
19606lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`'
19607lt_cv_sys_global_symbol_to_import='`$ECHO "$lt_cv_sys_global_symbol_to_import" | $SED "$delay_single_quote_subst"`'
19608lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`'
19609lt_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"`'
19610lt_cv_nm_interface='`$ECHO "$lt_cv_nm_interface" | $SED "$delay_single_quote_subst"`'
19611nm_file_list_spec='`$ECHO "$nm_file_list_spec" | $SED "$delay_single_quote_subst"`'
19612lt_sysroot='`$ECHO "$lt_sysroot" | $SED "$delay_single_quote_subst"`'
19613objdir='`$ECHO "$objdir" | $SED "$delay_single_quote_subst"`'
19614MAGIC_CMD='`$ECHO "$MAGIC_CMD" | $SED "$delay_single_quote_subst"`'
19615lt_prog_compiler_no_builtin_flag='`$ECHO "$lt_prog_compiler_no_builtin_flag" | $SED "$delay_single_quote_subst"`'
19616lt_prog_compiler_pic='`$ECHO "$lt_prog_compiler_pic" | $SED "$delay_single_quote_subst"`'
19617lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`'
19618lt_prog_compiler_static='`$ECHO "$lt_prog_compiler_static" | $SED "$delay_single_quote_subst"`'
19619lt_cv_prog_compiler_c_o='`$ECHO "$lt_cv_prog_compiler_c_o" | $SED "$delay_single_quote_subst"`'
19620need_locks='`$ECHO "$need_locks" | $SED "$delay_single_quote_subst"`'
19621MANIFEST_TOOL='`$ECHO "$MANIFEST_TOOL" | $SED "$delay_single_quote_subst"`'
19622DSYMUTIL='`$ECHO "$DSYMUTIL" | $SED "$delay_single_quote_subst"`'
19623NMEDIT='`$ECHO "$NMEDIT" | $SED "$delay_single_quote_subst"`'
19624LIPO='`$ECHO "$LIPO" | $SED "$delay_single_quote_subst"`'
19625OTOOL='`$ECHO "$OTOOL" | $SED "$delay_single_quote_subst"`'
19626OTOOL64='`$ECHO "$OTOOL64" | $SED "$delay_single_quote_subst"`'
19627libext='`$ECHO "$libext" | $SED "$delay_single_quote_subst"`'
19628shrext_cmds='`$ECHO "$shrext_cmds" | $SED "$delay_single_quote_subst"`'
19629extract_expsyms_cmds='`$ECHO "$extract_expsyms_cmds" | $SED "$delay_single_quote_subst"`'
19630archive_cmds_need_lc='`$ECHO "$archive_cmds_need_lc" | $SED "$delay_single_quote_subst"`'
19631enable_shared_with_static_runtimes='`$ECHO "$enable_shared_with_static_runtimes" | $SED "$delay_single_quote_subst"`'
19632export_dynamic_flag_spec='`$ECHO "$export_dynamic_flag_spec" | $SED "$delay_single_quote_subst"`'
19633whole_archive_flag_spec='`$ECHO "$whole_archive_flag_spec" | $SED "$delay_single_quote_subst"`'
19634compiler_needs_object='`$ECHO "$compiler_needs_object" | $SED "$delay_single_quote_subst"`'
19635old_archive_from_new_cmds='`$ECHO "$old_archive_from_new_cmds" | $SED "$delay_single_quote_subst"`'
19636old_archive_from_expsyms_cmds='`$ECHO "$old_archive_from_expsyms_cmds" | $SED "$delay_single_quote_subst"`'
19637archive_cmds='`$ECHO "$archive_cmds" | $SED "$delay_single_quote_subst"`'
19638archive_expsym_cmds='`$ECHO "$archive_expsym_cmds" | $SED "$delay_single_quote_subst"`'
19639module_cmds='`$ECHO "$module_cmds" | $SED "$delay_single_quote_subst"`'
19640module_expsym_cmds='`$ECHO "$module_expsym_cmds" | $SED "$delay_single_quote_subst"`'
19641with_gnu_ld='`$ECHO "$with_gnu_ld" | $SED "$delay_single_quote_subst"`'
19642allow_undefined_flag='`$ECHO "$allow_undefined_flag" | $SED "$delay_single_quote_subst"`'
19643no_undefined_flag='`$ECHO "$no_undefined_flag" | $SED "$delay_single_quote_subst"`'
19644hardcode_libdir_flag_spec='`$ECHO "$hardcode_libdir_flag_spec" | $SED "$delay_single_quote_subst"`'
19645hardcode_libdir_separator='`$ECHO "$hardcode_libdir_separator" | $SED "$delay_single_quote_subst"`'
19646hardcode_direct='`$ECHO "$hardcode_direct" | $SED "$delay_single_quote_subst"`'
19647hardcode_direct_absolute='`$ECHO "$hardcode_direct_absolute" | $SED "$delay_single_quote_subst"`'
19648hardcode_minus_L='`$ECHO "$hardcode_minus_L" | $SED "$delay_single_quote_subst"`'
19649hardcode_shlibpath_var='`$ECHO "$hardcode_shlibpath_var" | $SED "$delay_single_quote_subst"`'
19650hardcode_automatic='`$ECHO "$hardcode_automatic" | $SED "$delay_single_quote_subst"`'
19651inherit_rpath='`$ECHO "$inherit_rpath" | $SED "$delay_single_quote_subst"`'
19652link_all_deplibs='`$ECHO "$link_all_deplibs" | $SED "$delay_single_quote_subst"`'
19653always_export_symbols='`$ECHO "$always_export_symbols" | $SED "$delay_single_quote_subst"`'
19654export_symbols_cmds='`$ECHO "$export_symbols_cmds" | $SED "$delay_single_quote_subst"`'
19655exclude_expsyms='`$ECHO "$exclude_expsyms" | $SED "$delay_single_quote_subst"`'
19656include_expsyms='`$ECHO "$include_expsyms" | $SED "$delay_single_quote_subst"`'
19657prelink_cmds='`$ECHO "$prelink_cmds" | $SED "$delay_single_quote_subst"`'
19658postlink_cmds='`$ECHO "$postlink_cmds" | $SED "$delay_single_quote_subst"`'
19659file_list_spec='`$ECHO "$file_list_spec" | $SED "$delay_single_quote_subst"`'
19660variables_saved_for_relink='`$ECHO "$variables_saved_for_relink" | $SED "$delay_single_quote_subst"`'
19661need_lib_prefix='`$ECHO "$need_lib_prefix" | $SED "$delay_single_quote_subst"`'
19662need_version='`$ECHO "$need_version" | $SED "$delay_single_quote_subst"`'
19663version_type='`$ECHO "$version_type" | $SED "$delay_single_quote_subst"`'
19664runpath_var='`$ECHO "$runpath_var" | $SED "$delay_single_quote_subst"`'
19665shlibpath_var='`$ECHO "$shlibpath_var" | $SED "$delay_single_quote_subst"`'
19666shlibpath_overrides_runpath='`$ECHO "$shlibpath_overrides_runpath" | $SED "$delay_single_quote_subst"`'
19667libname_spec='`$ECHO "$libname_spec" | $SED "$delay_single_quote_subst"`'
19668library_names_spec='`$ECHO "$library_names_spec" | $SED "$delay_single_quote_subst"`'
19669soname_spec='`$ECHO "$soname_spec" | $SED "$delay_single_quote_subst"`'
19670install_override_mode='`$ECHO "$install_override_mode" | $SED "$delay_single_quote_subst"`'
19671postinstall_cmds='`$ECHO "$postinstall_cmds" | $SED "$delay_single_quote_subst"`'
19672postuninstall_cmds='`$ECHO "$postuninstall_cmds" | $SED "$delay_single_quote_subst"`'
19673finish_cmds='`$ECHO "$finish_cmds" | $SED "$delay_single_quote_subst"`'
19674finish_eval='`$ECHO "$finish_eval" | $SED "$delay_single_quote_subst"`'
19675hardcode_into_libs='`$ECHO "$hardcode_into_libs" | $SED "$delay_single_quote_subst"`'
19676sys_lib_search_path_spec='`$ECHO "$sys_lib_search_path_spec" | $SED "$delay_single_quote_subst"`'
19677sys_lib_dlsearch_path_spec='`$ECHO "$sys_lib_dlsearch_path_spec" | $SED "$delay_single_quote_subst"`'
19678hardcode_action='`$ECHO "$hardcode_action" | $SED "$delay_single_quote_subst"`'
19679enable_dlopen='`$ECHO "$enable_dlopen" | $SED "$delay_single_quote_subst"`'
19680enable_dlopen_self='`$ECHO "$enable_dlopen_self" | $SED "$delay_single_quote_subst"`'
19681enable_dlopen_self_static='`$ECHO "$enable_dlopen_self_static" | $SED "$delay_single_quote_subst"`'
19682old_striplib='`$ECHO "$old_striplib" | $SED "$delay_single_quote_subst"`'
19683striplib='`$ECHO "$striplib" | $SED "$delay_single_quote_subst"`'
19684
19685LTCC='$LTCC'
19686LTCFLAGS='$LTCFLAGS'
19687compiler='$compiler_DEFAULT'
19688
19689# A function that is used when there is no print builtin or printf.
19690func_fallback_echo ()
19691{
19692  eval 'cat <<_LTECHO_EOF
19693\$1
19694_LTECHO_EOF'
19695}
19696
19697# Quote evaled strings.
19698for var in SHELL \
19699ECHO \
19700PATH_SEPARATOR \
19701SED \
19702GREP \
19703EGREP \
19704FGREP \
19705LD \
19706NM \
19707LN_S \
19708lt_SP2NL \
19709lt_NL2SP \
19710reload_flag \
19711OBJDUMP \
19712deplibs_check_method \
19713file_magic_cmd \
19714file_magic_glob \
19715want_nocaseglob \
19716DLLTOOL \
19717sharedlib_from_linklib_cmd \
19718AR \
19719AR_FLAGS \
19720archiver_list_spec \
19721STRIP \
19722RANLIB \
19723CC \
19724CFLAGS \
19725compiler \
19726lt_cv_sys_global_symbol_pipe \
19727lt_cv_sys_global_symbol_to_cdecl \
19728lt_cv_sys_global_symbol_to_import \
19729lt_cv_sys_global_symbol_to_c_name_address \
19730lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \
19731lt_cv_nm_interface \
19732nm_file_list_spec \
19733lt_prog_compiler_no_builtin_flag \
19734lt_prog_compiler_pic \
19735lt_prog_compiler_wl \
19736lt_prog_compiler_static \
19737lt_cv_prog_compiler_c_o \
19738need_locks \
19739MANIFEST_TOOL \
19740DSYMUTIL \
19741NMEDIT \
19742LIPO \
19743OTOOL \
19744OTOOL64 \
19745shrext_cmds \
19746export_dynamic_flag_spec \
19747whole_archive_flag_spec \
19748compiler_needs_object \
19749with_gnu_ld \
19750allow_undefined_flag \
19751no_undefined_flag \
19752hardcode_libdir_flag_spec \
19753hardcode_libdir_separator \
19754exclude_expsyms \
19755include_expsyms \
19756file_list_spec \
19757variables_saved_for_relink \
19758libname_spec \
19759library_names_spec \
19760soname_spec \
19761install_override_mode \
19762finish_eval \
19763old_striplib \
19764striplib; do
19765    case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
19766    *[\\\\\\\`\\"\\\$]*)
19767      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes
19768      ;;
19769    *)
19770      eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
19771      ;;
19772    esac
19773done
19774
19775# Double-quote double-evaled strings.
19776for var in reload_cmds \
19777old_postinstall_cmds \
19778old_postuninstall_cmds \
19779old_archive_cmds \
19780extract_expsyms_cmds \
19781old_archive_from_new_cmds \
19782old_archive_from_expsyms_cmds \
19783archive_cmds \
19784archive_expsym_cmds \
19785module_cmds \
19786module_expsym_cmds \
19787export_symbols_cmds \
19788prelink_cmds \
19789postlink_cmds \
19790postinstall_cmds \
19791postuninstall_cmds \
19792finish_cmds \
19793sys_lib_search_path_spec \
19794sys_lib_dlsearch_path_spec; do
19795    case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
19796    *[\\\\\\\`\\"\\\$]*)
19797      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes
19798      ;;
19799    *)
19800      eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
19801      ;;
19802    esac
19803done
19804
19805ac_aux_dir='$ac_aux_dir'
19806
19807# See if we are running on zsh, and set the options that allow our
19808# commands through without removal of \ escapes INIT.
19809if test -n "\${ZSH_VERSION+set}"; then
19810   setopt NO_GLOB_SUBST
19811fi
19812
19813
19814    PACKAGE='$PACKAGE'
19815    VERSION='$VERSION'
19816    RM='$RM'
19817    ofile='$ofile'
19818
19819
19820
19821
19822_ACEOF
19823
19824cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19825
19826# Handling of arguments.
19827for ac_config_target in $ac_config_targets
19828do
19829  case $ac_config_target in
19830    "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;;
19831    "disable-rpath") CONFIG_COMMANDS="$CONFIG_COMMANDS disable-rpath" ;;
19832    "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
19833    "doc/example.conf") CONFIG_FILES="$CONFIG_FILES doc/example.conf" ;;
19834    "doc/libunbound.3") CONFIG_FILES="$CONFIG_FILES doc/libunbound.3" ;;
19835    "doc/unbound.8") CONFIG_FILES="$CONFIG_FILES doc/unbound.8" ;;
19836    "doc/unbound-anchor.8") CONFIG_FILES="$CONFIG_FILES doc/unbound-anchor.8" ;;
19837    "doc/unbound-checkconf.8") CONFIG_FILES="$CONFIG_FILES doc/unbound-checkconf.8" ;;
19838    "doc/unbound.conf.5") CONFIG_FILES="$CONFIG_FILES doc/unbound.conf.5" ;;
19839    "doc/unbound-control.8") CONFIG_FILES="$CONFIG_FILES doc/unbound-control.8" ;;
19840    "doc/unbound-host.1") CONFIG_FILES="$CONFIG_FILES doc/unbound-host.1" ;;
19841    "smallapp/unbound-control-setup.sh") CONFIG_FILES="$CONFIG_FILES smallapp/unbound-control-setup.sh" ;;
19842    "dnstap/dnstap_config.h") CONFIG_FILES="$CONFIG_FILES dnstap/dnstap_config.h" ;;
19843    "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
19844
19845  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
19846  esac
19847done
19848
19849
19850# If the user did not use the arguments to specify the items to instantiate,
19851# then the envvar interface is used.  Set only those that are not.
19852# We use the long form for the default assignment because of an extremely
19853# bizarre bug on SunOS 4.1.3.
19854if $ac_need_defaults; then
19855  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
19856  test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
19857  test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
19858fi
19859
19860# Have a temporary directory for convenience.  Make it in the build tree
19861# simply because there is no reason against having it here, and in addition,
19862# creating and moving files from /tmp can sometimes cause problems.
19863# Hook for its removal unless debugging.
19864# Note that there is a small window in which the directory will not be cleaned:
19865# after its creation but before its name has been assigned to `$tmp'.
19866$debug ||
19867{
19868  tmp= ac_tmp=
19869  trap 'exit_status=$?
19870  : "${ac_tmp:=$tmp}"
19871  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
19872' 0
19873  trap 'as_fn_exit 1' 1 2 13 15
19874}
19875# Create a (secure) tmp directory for tmp files.
19876
19877{
19878  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
19879  test -d "$tmp"
19880}  ||
19881{
19882  tmp=./conf$$-$RANDOM
19883  (umask 077 && mkdir "$tmp")
19884} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
19885ac_tmp=$tmp
19886
19887# Set up the scripts for CONFIG_FILES section.
19888# No need to generate them if there are no CONFIG_FILES.
19889# This happens for instance with `./config.status config.h'.
19890if test -n "$CONFIG_FILES"; then
19891
19892
19893ac_cr=`echo X | tr X '\015'`
19894# On cygwin, bash can eat \r inside `` if the user requested igncr.
19895# But we know of no other shell where ac_cr would be empty at this
19896# point, so we can use a bashism as a fallback.
19897if test "x$ac_cr" = x; then
19898  eval ac_cr=\$\'\\r\'
19899fi
19900ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
19901if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
19902  ac_cs_awk_cr='\\r'
19903else
19904  ac_cs_awk_cr=$ac_cr
19905fi
19906
19907echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
19908_ACEOF
19909
19910
19911{
19912  echo "cat >conf$$subs.awk <<_ACEOF" &&
19913  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
19914  echo "_ACEOF"
19915} >conf$$subs.sh ||
19916  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
19917ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
19918ac_delim='%!_!# '
19919for ac_last_try in false false false false false :; do
19920  . ./conf$$subs.sh ||
19921    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
19922
19923  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
19924  if test $ac_delim_n = $ac_delim_num; then
19925    break
19926  elif $ac_last_try; then
19927    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
19928  else
19929    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
19930  fi
19931done
19932rm -f conf$$subs.sh
19933
19934cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19935cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
19936_ACEOF
19937sed -n '
19938h
19939s/^/S["/; s/!.*/"]=/
19940p
19941g
19942s/^[^!]*!//
19943:repl
19944t repl
19945s/'"$ac_delim"'$//
19946t delim
19947:nl
19948h
19949s/\(.\{148\}\)..*/\1/
19950t more1
19951s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
19952p
19953n
19954b repl
19955:more1
19956s/["\\]/\\&/g; s/^/"/; s/$/"\\/
19957p
19958g
19959s/.\{148\}//
19960t nl
19961:delim
19962h
19963s/\(.\{148\}\)..*/\1/
19964t more2
19965s/["\\]/\\&/g; s/^/"/; s/$/"/
19966p
19967b
19968:more2
19969s/["\\]/\\&/g; s/^/"/; s/$/"\\/
19970p
19971g
19972s/.\{148\}//
19973t delim
19974' <conf$$subs.awk | sed '
19975/^[^""]/{
19976  N
19977  s/\n//
19978}
19979' >>$CONFIG_STATUS || ac_write_fail=1
19980rm -f conf$$subs.awk
19981cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19982_ACAWK
19983cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
19984  for (key in S) S_is_set[key] = 1
19985  FS = ""
19986
19987}
19988{
19989  line = $ 0
19990  nfields = split(line, field, "@")
19991  substed = 0
19992  len = length(field[1])
19993  for (i = 2; i < nfields; i++) {
19994    key = field[i]
19995    keylen = length(key)
19996    if (S_is_set[key]) {
19997      value = S[key]
19998      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
19999      len += length(value) + length(field[++i])
20000      substed = 1
20001    } else
20002      len += 1 + keylen
20003  }
20004
20005  print line
20006}
20007
20008_ACAWK
20009_ACEOF
20010cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20011if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
20012  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
20013else
20014  cat
20015fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
20016  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
20017_ACEOF
20018
20019# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
20020# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
20021# trailing colons and then remove the whole line if VPATH becomes empty
20022# (actually we leave an empty line to preserve line numbers).
20023if test "x$srcdir" = x.; then
20024  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
20025h
20026s///
20027s/^/:/
20028s/[	 ]*$/:/
20029s/:\$(srcdir):/:/g
20030s/:\${srcdir}:/:/g
20031s/:@srcdir@:/:/g
20032s/^:*//
20033s/:*$//
20034x
20035s/\(=[	 ]*\).*/\1/
20036G
20037s/\n//
20038s/^[^=]*=[	 ]*$//
20039}'
20040fi
20041
20042cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20043fi # test -n "$CONFIG_FILES"
20044
20045# Set up the scripts for CONFIG_HEADERS section.
20046# No need to generate them if there are no CONFIG_HEADERS.
20047# This happens for instance with `./config.status Makefile'.
20048if test -n "$CONFIG_HEADERS"; then
20049cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
20050BEGIN {
20051_ACEOF
20052
20053# Transform confdefs.h into an awk script `defines.awk', embedded as
20054# here-document in config.status, that substitutes the proper values into
20055# config.h.in to produce config.h.
20056
20057# Create a delimiter string that does not exist in confdefs.h, to ease
20058# handling of long lines.
20059ac_delim='%!_!# '
20060for ac_last_try in false false :; do
20061  ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
20062  if test -z "$ac_tt"; then
20063    break
20064  elif $ac_last_try; then
20065    as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
20066  else
20067    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
20068  fi
20069done
20070
20071# For the awk script, D is an array of macro values keyed by name,
20072# likewise P contains macro parameters if any.  Preserve backslash
20073# newline sequences.
20074
20075ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
20076sed -n '
20077s/.\{148\}/&'"$ac_delim"'/g
20078t rset
20079:rset
20080s/^[	 ]*#[	 ]*define[	 ][	 ]*/ /
20081t def
20082d
20083:def
20084s/\\$//
20085t bsnl
20086s/["\\]/\\&/g
20087s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
20088D["\1"]=" \3"/p
20089s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2"/p
20090d
20091:bsnl
20092s/["\\]/\\&/g
20093s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
20094D["\1"]=" \3\\\\\\n"\\/p
20095t cont
20096s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
20097t cont
20098d
20099:cont
20100n
20101s/.\{148\}/&'"$ac_delim"'/g
20102t clear
20103:clear
20104s/\\$//
20105t bsnlc
20106s/["\\]/\\&/g; s/^/"/; s/$/"/p
20107d
20108:bsnlc
20109s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
20110b cont
20111' <confdefs.h | sed '
20112s/'"$ac_delim"'/"\\\
20113"/g' >>$CONFIG_STATUS || ac_write_fail=1
20114
20115cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20116  for (key in D) D_is_set[key] = 1
20117  FS = ""
20118}
20119/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
20120  line = \$ 0
20121  split(line, arg, " ")
20122  if (arg[1] == "#") {
20123    defundef = arg[2]
20124    mac1 = arg[3]
20125  } else {
20126    defundef = substr(arg[1], 2)
20127    mac1 = arg[2]
20128  }
20129  split(mac1, mac2, "(") #)
20130  macro = mac2[1]
20131  prefix = substr(line, 1, index(line, defundef) - 1)
20132  if (D_is_set[macro]) {
20133    # Preserve the white space surrounding the "#".
20134    print prefix "define", macro P[macro] D[macro]
20135    next
20136  } else {
20137    # Replace #undef with comments.  This is necessary, for example,
20138    # in the case of _POSIX_SOURCE, which is predefined and required
20139    # on some systems where configure will not decide to define it.
20140    if (defundef == "undef") {
20141      print "/*", prefix defundef, macro, "*/"
20142      next
20143    }
20144  }
20145}
20146{ print }
20147_ACAWK
20148_ACEOF
20149cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20150  as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
20151fi # test -n "$CONFIG_HEADERS"
20152
20153
20154eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS    :C $CONFIG_COMMANDS"
20155shift
20156for ac_tag
20157do
20158  case $ac_tag in
20159  :[FHLC]) ac_mode=$ac_tag; continue;;
20160  esac
20161  case $ac_mode$ac_tag in
20162  :[FHL]*:*);;
20163  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
20164  :[FH]-) ac_tag=-:-;;
20165  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
20166  esac
20167  ac_save_IFS=$IFS
20168  IFS=:
20169  set x $ac_tag
20170  IFS=$ac_save_IFS
20171  shift
20172  ac_file=$1
20173  shift
20174
20175  case $ac_mode in
20176  :L) ac_source=$1;;
20177  :[FH])
20178    ac_file_inputs=
20179    for ac_f
20180    do
20181      case $ac_f in
20182      -) ac_f="$ac_tmp/stdin";;
20183      *) # Look for the file first in the build tree, then in the source tree
20184	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
20185	 # because $ac_f cannot contain `:'.
20186	 test -f "$ac_f" ||
20187	   case $ac_f in
20188	   [\\/$]*) false;;
20189	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
20190	   esac ||
20191	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
20192      esac
20193      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
20194      as_fn_append ac_file_inputs " '$ac_f'"
20195    done
20196
20197    # Let's still pretend it is `configure' which instantiates (i.e., don't
20198    # use $as_me), people would be surprised to read:
20199    #    /* config.h.  Generated by config.status.  */
20200    configure_input='Generated from '`
20201	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
20202	`' by configure.'
20203    if test x"$ac_file" != x-; then
20204      configure_input="$ac_file.  $configure_input"
20205      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
20206$as_echo "$as_me: creating $ac_file" >&6;}
20207    fi
20208    # Neutralize special characters interpreted by sed in replacement strings.
20209    case $configure_input in #(
20210    *\&* | *\|* | *\\* )
20211       ac_sed_conf_input=`$as_echo "$configure_input" |
20212       sed 's/[\\\\&|]/\\\\&/g'`;; #(
20213    *) ac_sed_conf_input=$configure_input;;
20214    esac
20215
20216    case $ac_tag in
20217    *:-:* | *:-) cat >"$ac_tmp/stdin" \
20218      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
20219    esac
20220    ;;
20221  esac
20222
20223  ac_dir=`$as_dirname -- "$ac_file" ||
20224$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
20225	 X"$ac_file" : 'X\(//\)[^/]' \| \
20226	 X"$ac_file" : 'X\(//\)$' \| \
20227	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
20228$as_echo X"$ac_file" |
20229    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
20230	    s//\1/
20231	    q
20232	  }
20233	  /^X\(\/\/\)[^/].*/{
20234	    s//\1/
20235	    q
20236	  }
20237	  /^X\(\/\/\)$/{
20238	    s//\1/
20239	    q
20240	  }
20241	  /^X\(\/\).*/{
20242	    s//\1/
20243	    q
20244	  }
20245	  s/.*/./; q'`
20246  as_dir="$ac_dir"; as_fn_mkdir_p
20247  ac_builddir=.
20248
20249case "$ac_dir" in
20250.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
20251*)
20252  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
20253  # A ".." for each directory in $ac_dir_suffix.
20254  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
20255  case $ac_top_builddir_sub in
20256  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
20257  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
20258  esac ;;
20259esac
20260ac_abs_top_builddir=$ac_pwd
20261ac_abs_builddir=$ac_pwd$ac_dir_suffix
20262# for backward compatibility:
20263ac_top_builddir=$ac_top_build_prefix
20264
20265case $srcdir in
20266  .)  # We are building in place.
20267    ac_srcdir=.
20268    ac_top_srcdir=$ac_top_builddir_sub
20269    ac_abs_top_srcdir=$ac_pwd ;;
20270  [\\/]* | ?:[\\/]* )  # Absolute name.
20271    ac_srcdir=$srcdir$ac_dir_suffix;
20272    ac_top_srcdir=$srcdir
20273    ac_abs_top_srcdir=$srcdir ;;
20274  *) # Relative name.
20275    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
20276    ac_top_srcdir=$ac_top_build_prefix$srcdir
20277    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
20278esac
20279ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
20280
20281
20282  case $ac_mode in
20283  :F)
20284  #
20285  # CONFIG_FILE
20286  #
20287
20288_ACEOF
20289
20290cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20291# If the template does not know about datarootdir, expand it.
20292# FIXME: This hack should be removed a few years after 2.60.
20293ac_datarootdir_hack=; ac_datarootdir_seen=
20294ac_sed_dataroot='
20295/datarootdir/ {
20296  p
20297  q
20298}
20299/@datadir@/p
20300/@docdir@/p
20301/@infodir@/p
20302/@localedir@/p
20303/@mandir@/p'
20304case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
20305*datarootdir*) ac_datarootdir_seen=yes;;
20306*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
20307  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
20308$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
20309_ACEOF
20310cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20311  ac_datarootdir_hack='
20312  s&@datadir@&$datadir&g
20313  s&@docdir@&$docdir&g
20314  s&@infodir@&$infodir&g
20315  s&@localedir@&$localedir&g
20316  s&@mandir@&$mandir&g
20317  s&\\\${datarootdir}&$datarootdir&g' ;;
20318esac
20319_ACEOF
20320
20321# Neutralize VPATH when `$srcdir' = `.'.
20322# Shell code in configure.ac might set extrasub.
20323# FIXME: do we really want to maintain this feature?
20324cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20325ac_sed_extra="$ac_vpsub
20326$extrasub
20327_ACEOF
20328cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20329:t
20330/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
20331s|@configure_input@|$ac_sed_conf_input|;t t
20332s&@top_builddir@&$ac_top_builddir_sub&;t t
20333s&@top_build_prefix@&$ac_top_build_prefix&;t t
20334s&@srcdir@&$ac_srcdir&;t t
20335s&@abs_srcdir@&$ac_abs_srcdir&;t t
20336s&@top_srcdir@&$ac_top_srcdir&;t t
20337s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
20338s&@builddir@&$ac_builddir&;t t
20339s&@abs_builddir@&$ac_abs_builddir&;t t
20340s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
20341$ac_datarootdir_hack
20342"
20343eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
20344  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
20345
20346test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
20347  { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
20348  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' \
20349      "$ac_tmp/out"`; test -z "$ac_out"; } &&
20350  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
20351which seems to be undefined.  Please make sure it is defined" >&5
20352$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
20353which seems to be undefined.  Please make sure it is defined" >&2;}
20354
20355  rm -f "$ac_tmp/stdin"
20356  case $ac_file in
20357  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
20358  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
20359  esac \
20360  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
20361 ;;
20362  :H)
20363  #
20364  # CONFIG_HEADER
20365  #
20366  if test x"$ac_file" != x-; then
20367    {
20368      $as_echo "/* $configure_input  */" \
20369      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
20370    } >"$ac_tmp/config.h" \
20371      || as_fn_error $? "could not create $ac_file" "$LINENO" 5
20372    if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
20373      { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
20374$as_echo "$as_me: $ac_file is unchanged" >&6;}
20375    else
20376      rm -f "$ac_file"
20377      mv "$ac_tmp/config.h" "$ac_file" \
20378	|| as_fn_error $? "could not create $ac_file" "$LINENO" 5
20379    fi
20380  else
20381    $as_echo "/* $configure_input  */" \
20382      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
20383      || as_fn_error $? "could not create -" "$LINENO" 5
20384  fi
20385 ;;
20386
20387  :C)  { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
20388$as_echo "$as_me: executing $ac_file commands" >&6;}
20389 ;;
20390  esac
20391
20392
20393  case $ac_file$ac_mode in
20394    "libtool":C)
20395
20396    # See if we are running on zsh, and set the options that allow our
20397    # commands through without removal of \ escapes.
20398    if test -n "${ZSH_VERSION+set}"; then
20399      setopt NO_GLOB_SUBST
20400    fi
20401
20402    cfgfile=${ofile}T
20403    trap "$RM \"$cfgfile\"; exit 1" 1 2 15
20404    $RM "$cfgfile"
20405
20406    cat <<_LT_EOF >> "$cfgfile"
20407#! $SHELL
20408
20409# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
20410# Generated automatically by $as_me ($PACKAGE) $VERSION
20411# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
20412# NOTE: Changes made to this file will be lost: look at ltmain.sh.
20413#
20414#   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
20415#                 2006, 2007, 2008, 2009, 2010, 2011 Free Software
20416#                 Foundation, Inc.
20417#   Written by Gordon Matzigkeit, 1996
20418#
20419#   This file is part of GNU Libtool.
20420#
20421# GNU Libtool is free software; you can redistribute it and/or
20422# modify it under the terms of the GNU General Public License as
20423# published by the Free Software Foundation; either version 2 of
20424# the License, or (at your option) any later version.
20425#
20426# As a special exception to the GNU General Public License,
20427# if you distribute this file as part of a program or library that
20428# is built using GNU Libtool, you may include this file under the
20429# same distribution terms that you use for the rest of that program.
20430#
20431# GNU Libtool is distributed in the hope that it will be useful,
20432# but WITHOUT ANY WARRANTY; without even the implied warranty of
20433# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
20434# GNU General Public License for more details.
20435#
20436# You should have received a copy of the GNU General Public License
20437# along with GNU Libtool; see the file COPYING.  If not, a copy
20438# can be downloaded from http://www.gnu.org/licenses/gpl.html, or
20439# obtained by writing to the Free Software Foundation, Inc.,
20440# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
20441
20442
20443# The names of the tagged configurations supported by this script.
20444available_tags=''
20445
20446# ### BEGIN LIBTOOL CONFIG
20447
20448# Which release of libtool.m4 was used?
20449macro_version=$macro_version
20450macro_revision=$macro_revision
20451
20452# Whether or not to build shared libraries.
20453build_libtool_libs=$enable_shared
20454
20455# Whether or not to build static libraries.
20456build_old_libs=$enable_static
20457
20458# What type of objects to build.
20459pic_mode=$pic_mode
20460
20461# Whether or not to optimize for fast installation.
20462fast_install=$enable_fast_install
20463
20464# Shell to use when invoking shell scripts.
20465SHELL=$lt_SHELL
20466
20467# An echo program that protects backslashes.
20468ECHO=$lt_ECHO
20469
20470# The PATH separator for the build system.
20471PATH_SEPARATOR=$lt_PATH_SEPARATOR
20472
20473# The host system.
20474host_alias=$host_alias
20475host=$host
20476host_os=$host_os
20477
20478# The build system.
20479build_alias=$build_alias
20480build=$build
20481build_os=$build_os
20482
20483# A sed program that does not truncate output.
20484SED=$lt_SED
20485
20486# Sed that helps us avoid accidentally triggering echo(1) options like -n.
20487Xsed="\$SED -e 1s/^X//"
20488
20489# A grep program that handles long lines.
20490GREP=$lt_GREP
20491
20492# An ERE matcher.
20493EGREP=$lt_EGREP
20494
20495# A literal string matcher.
20496FGREP=$lt_FGREP
20497
20498# A BSD- or MS-compatible name lister.
20499NM=$lt_NM
20500
20501# Whether we need soft or hard links.
20502LN_S=$lt_LN_S
20503
20504# What is the maximum length of a command?
20505max_cmd_len=$max_cmd_len
20506
20507# Object file suffix (normally "o").
20508objext=$ac_objext
20509
20510# Executable file suffix (normally "").
20511exeext=$exeext
20512
20513# whether the shell understands "unset".
20514lt_unset=$lt_unset
20515
20516# turn spaces into newlines.
20517SP2NL=$lt_lt_SP2NL
20518
20519# turn newlines into spaces.
20520NL2SP=$lt_lt_NL2SP
20521
20522# convert \$build file names to \$host format.
20523to_host_file_cmd=$lt_cv_to_host_file_cmd
20524
20525# convert \$build files to toolchain format.
20526to_tool_file_cmd=$lt_cv_to_tool_file_cmd
20527
20528# An object symbol dumper.
20529OBJDUMP=$lt_OBJDUMP
20530
20531# Method to check whether dependent libraries are shared objects.
20532deplibs_check_method=$lt_deplibs_check_method
20533
20534# Command to use when deplibs_check_method = "file_magic".
20535file_magic_cmd=$lt_file_magic_cmd
20536
20537# How to find potential files when deplibs_check_method = "file_magic".
20538file_magic_glob=$lt_file_magic_glob
20539
20540# Find potential files using nocaseglob when deplibs_check_method = "file_magic".
20541want_nocaseglob=$lt_want_nocaseglob
20542
20543# DLL creation program.
20544DLLTOOL=$lt_DLLTOOL
20545
20546# Command to associate shared and link libraries.
20547sharedlib_from_linklib_cmd=$lt_sharedlib_from_linklib_cmd
20548
20549# The archiver.
20550AR=$lt_AR
20551
20552# Flags to create an archive.
20553AR_FLAGS=$lt_AR_FLAGS
20554
20555# How to feed a file listing to the archiver.
20556archiver_list_spec=$lt_archiver_list_spec
20557
20558# A symbol stripping program.
20559STRIP=$lt_STRIP
20560
20561# Commands used to install an old-style archive.
20562RANLIB=$lt_RANLIB
20563old_postinstall_cmds=$lt_old_postinstall_cmds
20564old_postuninstall_cmds=$lt_old_postuninstall_cmds
20565
20566# Whether to use a lock for old archive extraction.
20567lock_old_archive_extraction=$lock_old_archive_extraction
20568
20569# A C compiler.
20570LTCC=$lt_CC
20571
20572# LTCC compiler flags.
20573LTCFLAGS=$lt_CFLAGS
20574
20575# Take the output of nm and produce a listing of raw symbols and C names.
20576global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
20577
20578# Transform the output of nm in a proper C declaration.
20579global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
20580
20581# Transform the output of nm into a list of symbols to manually relocate.
20582global_symbol_to_import=$lt_lt_cv_sys_global_symbol_to_import
20583
20584# Transform the output of nm in a C name address pair.
20585global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
20586
20587# Transform the output of nm in a C name address pair when lib prefix is needed.
20588global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix
20589
20590# The name lister interface.
20591nm_interface=$lt_lt_cv_nm_interface
20592
20593# Specify filename containing input files for \$NM.
20594nm_file_list_spec=$lt_nm_file_list_spec
20595
20596# The root where to search for dependent libraries,and where our libraries should be installed.
20597lt_sysroot=$lt_sysroot
20598
20599# The name of the directory that contains temporary libtool files.
20600objdir=$objdir
20601
20602# Used to examine libraries when file_magic_cmd begins with "file".
20603MAGIC_CMD=$MAGIC_CMD
20604
20605# Must we lock files when doing compilation?
20606need_locks=$lt_need_locks
20607
20608# Manifest tool.
20609MANIFEST_TOOL=$lt_MANIFEST_TOOL
20610
20611# Tool to manipulate archived DWARF debug symbol files on Mac OS X.
20612DSYMUTIL=$lt_DSYMUTIL
20613
20614# Tool to change global to local symbols on Mac OS X.
20615NMEDIT=$lt_NMEDIT
20616
20617# Tool to manipulate fat objects and archives on Mac OS X.
20618LIPO=$lt_LIPO
20619
20620# ldd/readelf like tool for Mach-O binaries on Mac OS X.
20621OTOOL=$lt_OTOOL
20622
20623# ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4.
20624OTOOL64=$lt_OTOOL64
20625
20626# Old archive suffix (normally "a").
20627libext=$libext
20628
20629# Shared library suffix (normally ".so").
20630shrext_cmds=$lt_shrext_cmds
20631
20632# The commands to extract the exported symbol list from a shared archive.
20633extract_expsyms_cmds=$lt_extract_expsyms_cmds
20634
20635# Variables whose values should be saved in libtool wrapper scripts and
20636# restored at link time.
20637variables_saved_for_relink=$lt_variables_saved_for_relink
20638
20639# Do we need the "lib" prefix for modules?
20640need_lib_prefix=$need_lib_prefix
20641
20642# Do we need a version for libraries?
20643need_version=$need_version
20644
20645# Library versioning type.
20646version_type=$version_type
20647
20648# Shared library runtime path variable.
20649runpath_var=$runpath_var
20650
20651# Shared library path variable.
20652shlibpath_var=$shlibpath_var
20653
20654# Is shlibpath searched before the hard-coded library search path?
20655shlibpath_overrides_runpath=$shlibpath_overrides_runpath
20656
20657# Format of library name prefix.
20658libname_spec=$lt_libname_spec
20659
20660# List of archive names.  First name is the real one, the rest are links.
20661# The last name is the one that the linker finds with -lNAME
20662library_names_spec=$lt_library_names_spec
20663
20664# The coded name of the library, if different from the real name.
20665soname_spec=$lt_soname_spec
20666
20667# Permission mode override for installation of shared libraries.
20668install_override_mode=$lt_install_override_mode
20669
20670# Command to use after installation of a shared archive.
20671postinstall_cmds=$lt_postinstall_cmds
20672
20673# Command to use after uninstallation of a shared archive.
20674postuninstall_cmds=$lt_postuninstall_cmds
20675
20676# Commands used to finish a libtool library installation in a directory.
20677finish_cmds=$lt_finish_cmds
20678
20679# As "finish_cmds", except a single script fragment to be evaled but
20680# not shown.
20681finish_eval=$lt_finish_eval
20682
20683# Whether we should hardcode library paths into libraries.
20684hardcode_into_libs=$hardcode_into_libs
20685
20686# Compile-time system search path for libraries.
20687sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
20688
20689# Run-time system search path for libraries.
20690sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
20691
20692# Whether dlopen is supported.
20693dlopen_support=$enable_dlopen
20694
20695# Whether dlopen of programs is supported.
20696dlopen_self=$enable_dlopen_self
20697
20698# Whether dlopen of statically linked programs is supported.
20699dlopen_self_static=$enable_dlopen_self_static
20700
20701# Commands to strip libraries.
20702old_striplib=$lt_old_striplib
20703striplib=$lt_striplib
20704
20705
20706# The linker used to build libraries.
20707LD=$lt_LD
20708
20709# How to create reloadable object files.
20710reload_flag=$lt_reload_flag
20711reload_cmds=$lt_reload_cmds
20712
20713# Commands used to build an old-style archive.
20714old_archive_cmds=$lt_old_archive_cmds
20715
20716# A language specific compiler.
20717CC=$lt_compiler
20718
20719# Is the compiler the GNU compiler?
20720with_gcc=$GCC
20721
20722# Compiler flag to turn off builtin functions.
20723no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag
20724
20725# Additional compiler flags for building library objects.
20726pic_flag=$lt_lt_prog_compiler_pic
20727
20728# How to pass a linker flag through the compiler.
20729wl=$lt_lt_prog_compiler_wl
20730
20731# Compiler flag to prevent dynamic linking.
20732link_static_flag=$lt_lt_prog_compiler_static
20733
20734# Does compiler simultaneously support -c and -o options?
20735compiler_c_o=$lt_lt_cv_prog_compiler_c_o
20736
20737# Whether or not to add -lc for building shared libraries.
20738build_libtool_need_lc=$archive_cmds_need_lc
20739
20740# Whether or not to disallow shared libs when runtime libs are static.
20741allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes
20742
20743# Compiler flag to allow reflexive dlopens.
20744export_dynamic_flag_spec=$lt_export_dynamic_flag_spec
20745
20746# Compiler flag to generate shared objects directly from archives.
20747whole_archive_flag_spec=$lt_whole_archive_flag_spec
20748
20749# Whether the compiler copes with passing no objects directly.
20750compiler_needs_object=$lt_compiler_needs_object
20751
20752# Create an old-style archive from a shared archive.
20753old_archive_from_new_cmds=$lt_old_archive_from_new_cmds
20754
20755# Create a temporary old-style archive to link instead of a shared archive.
20756old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds
20757
20758# Commands used to build a shared archive.
20759archive_cmds=$lt_archive_cmds
20760archive_expsym_cmds=$lt_archive_expsym_cmds
20761
20762# Commands used to build a loadable module if different from building
20763# a shared archive.
20764module_cmds=$lt_module_cmds
20765module_expsym_cmds=$lt_module_expsym_cmds
20766
20767# Whether we are building with GNU ld or not.
20768with_gnu_ld=$lt_with_gnu_ld
20769
20770# Flag that allows shared libraries with undefined symbols to be built.
20771allow_undefined_flag=$lt_allow_undefined_flag
20772
20773# Flag that enforces no undefined symbols.
20774no_undefined_flag=$lt_no_undefined_flag
20775
20776# Flag to hardcode \$libdir into a binary during linking.
20777# This must work even if \$libdir does not exist
20778hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
20779
20780# Whether we need a single "-rpath" flag with a separated argument.
20781hardcode_libdir_separator=$lt_hardcode_libdir_separator
20782
20783# Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes
20784# DIR into the resulting binary.
20785hardcode_direct=$hardcode_direct
20786
20787# Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes
20788# DIR into the resulting binary and the resulting library dependency is
20789# "absolute",i.e impossible to change by setting \$shlibpath_var if the
20790# library is relocated.
20791hardcode_direct_absolute=$hardcode_direct_absolute
20792
20793# Set to "yes" if using the -LDIR flag during linking hardcodes DIR
20794# into the resulting binary.
20795hardcode_minus_L=$hardcode_minus_L
20796
20797# Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
20798# into the resulting binary.
20799hardcode_shlibpath_var=$hardcode_shlibpath_var
20800
20801# Set to "yes" if building a shared library automatically hardcodes DIR
20802# into the library and all subsequent libraries and executables linked
20803# against it.
20804hardcode_automatic=$hardcode_automatic
20805
20806# Set to yes if linker adds runtime paths of dependent libraries
20807# to runtime path list.
20808inherit_rpath=$inherit_rpath
20809
20810# Whether libtool must link a program against all its dependency libraries.
20811link_all_deplibs=$link_all_deplibs
20812
20813# Set to "yes" if exported symbols are required.
20814always_export_symbols=$always_export_symbols
20815
20816# The commands to list exported symbols.
20817export_symbols_cmds=$lt_export_symbols_cmds
20818
20819# Symbols that should not be listed in the preloaded symbols.
20820exclude_expsyms=$lt_exclude_expsyms
20821
20822# Symbols that must always be exported.
20823include_expsyms=$lt_include_expsyms
20824
20825# Commands necessary for linking programs (against libraries) with templates.
20826prelink_cmds=$lt_prelink_cmds
20827
20828# Commands necessary for finishing linking programs.
20829postlink_cmds=$lt_postlink_cmds
20830
20831# Specify filename containing input files.
20832file_list_spec=$lt_file_list_spec
20833
20834# How to hardcode a shared library path into an executable.
20835hardcode_action=$hardcode_action
20836
20837# ### END LIBTOOL CONFIG
20838
20839_LT_EOF
20840
20841  case $host_os in
20842  aix3*)
20843    cat <<\_LT_EOF >> "$cfgfile"
20844# AIX sometimes has problems with the GCC collect2 program.  For some
20845# reason, if we set the COLLECT_NAMES environment variable, the problems
20846# vanish in a puff of smoke.
20847if test set != "${COLLECT_NAMES+set}"; then
20848  COLLECT_NAMES=
20849  export COLLECT_NAMES
20850fi
20851_LT_EOF
20852    ;;
20853  esac
20854
20855
20856ltmain=$ac_aux_dir/ltmain.sh
20857
20858
20859  # We use sed instead of cat because bash on DJGPP gets confused if
20860  # if finds mixed CR/LF and LF-only lines.  Since sed operates in
20861  # text mode, it properly converts lines to CR/LF.  This bash problem
20862  # is reportedly fixed, but why not run on old versions too?
20863  sed '$q' "$ltmain" >> "$cfgfile" \
20864     || (rm -f "$cfgfile"; exit 1)
20865
20866   mv -f "$cfgfile" "$ofile" ||
20867    (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
20868  chmod +x "$ofile"
20869
20870 ;;
20871    "disable-rpath":C)
20872	sed < libtool > libtool-2 \
20873	's/^hardcode_libdir_flag_spec.*$'/'hardcode_libdir_flag_spec=" -D__LIBTOOL_RPATH_SED__ "/'
20874	mv libtool-2 libtool
20875	chmod 755 libtool
20876	libtool="./libtool"
20877	 ;;
20878
20879  esac
20880done # for ac_tag
20881
20882
20883as_fn_exit 0
20884_ACEOF
20885ac_clean_files=$ac_clean_files_save
20886
20887test $ac_write_fail = 0 ||
20888  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
20889
20890
20891# configure is writing to config.log, and then calls config.status.
20892# config.status does its own redirection, appending to config.log.
20893# Unfortunately, on DOS this fails, as config.log is still kept open
20894# by configure, so config.status won't be able to write to it; its
20895# output is simply discarded.  So we exec the FD to /dev/null,
20896# effectively closing config.log, so it can be properly (re)opened and
20897# appended to by config.status.  When coming back to configure, we
20898# need to make the FD available again.
20899if test "$no_create" != yes; then
20900  ac_cs_success=:
20901  ac_config_status_args=
20902  test "$silent" = yes &&
20903    ac_config_status_args="$ac_config_status_args --quiet"
20904  exec 5>/dev/null
20905  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
20906  exec 5>>config.log
20907  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
20908  # would make configure fail if this is the last instruction.
20909  $ac_cs_success || as_fn_exit 1
20910fi
20911if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
20912  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
20913$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
20914fi
20915
20916