xref: /freebsd/contrib/unbound/configure (revision 48d41ef0fb2a73cd29a75544e164a59829c29351)
1#! /bin/sh
2# Guess values for system-dependent variables and create Makefiles.
3# Generated by GNU Autoconf 2.69 for unbound 1.7.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.7.1'
594PACKAGE_STRING='unbound 1.7.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
641IPSECMOD_HEADER
642IPSECMOD_OBJ
643DNSCRYPT_OBJ
644DNSCRYPT_SRC
645ENABLE_DNSCRYPT
646ENABLE_DNSCRYPT_XCHACHA20
647DNSTAP_OBJ
648DNSTAP_SRC
649opt_dnstap_socket_path
650ENABLE_DNSTAP
651PROTOC_C
652UBSYMS
653EXTRALINK
654COMMON_OBJ_ALL_SYMBOLS
655LIBOBJ_WITHOUT_CTIME
656LIBOBJ_WITHOUT_CTIMEARC4
657WIN_CHECKCONF_OBJ_LINK
658WIN_CONTROL_OBJ_LINK
659WIN_UBANCHOR_OBJ_LINK
660WIN_HOST_OBJ_LINK
661WIN_DAEMON_OBJ_LINK
662WIN_DAEMON_OBJ
663WIN_DAEMON_SRC
664WINAPPS
665WINDRES
666CHECKLOCK_OBJ
667USE_SYSTEMD_FALSE
668USE_SYSTEMD_TRUE
669SYSTEMD_DAEMON_LIBS
670SYSTEMD_DAEMON_CFLAGS
671SYSTEMD_LIBS
672SYSTEMD_CFLAGS
673PKG_CONFIG_LIBDIR
674PKG_CONFIG_PATH
675PKG_CONFIG
676staticexe
677PC_LIBEVENT_DEPENDENCY
678UNBOUND_EVENT_UNINSTALL
679UNBOUND_EVENT_INSTALL
680SUBNET_HEADER
681SUBNET_OBJ
682SSLLIB
683HAVE_SSL
684CONFIG_DATE
685NETBSD_LINTFLAGS
686PYUNBOUND_UNINSTALL
687PYUNBOUND_INSTALL
688PYUNBOUND_TARGET
689PYUNBOUND_OBJ
690WITH_PYUNBOUND
691PYTHONMOD_UNINSTALL
692PYTHONMOD_INSTALL
693PYTHONMOD_HEADER
694PYTHONMOD_OBJ
695WITH_PYTHONMODULE
696swig
697SWIG_LIB
698SWIG
699PC_PY_DEPENDENCY
700PY_MAJOR_VERSION
701PYTHON_SITE_PKG
702PYTHON_LDFLAGS
703PYTHON_CPPFLAGS
704PYTHON
705PYTHON_VERSION
706PTHREAD_CFLAGS_ONLY
707PTHREAD_CFLAGS
708PTHREAD_LIBS
709PTHREAD_CC
710ax_pthread_config
711RUNTIME_PATH
712LIBOBJS
713LT_SYS_LIBRARY_PATH
714OTOOL64
715OTOOL
716LIPO
717NMEDIT
718DSYMUTIL
719MANIFEST_TOOL
720AWK
721RANLIB
722ac_ct_AR
723DLLTOOL
724OBJDUMP
725LN_S
726NM
727ac_ct_DUMPBIN
728DUMPBIN
729LD
730FGREP
731SED
732LIBTOOL
733AR
734host_os
735host_vendor
736host_cpu
737host
738build_os
739build_vendor
740build_cpu
741build
742libtool
743STRIP
744doxygen
745YFLAGS
746YACC
747LEXLIB
748LEX_OUTPUT_ROOT
749LEX
750debug_enabled
751DEPFLAG
752UNBOUND_USERNAME
753UNBOUND_ROOTCERT_FILE
754UNBOUND_ROOTKEY_FILE
755UNBOUND_PIDFILE
756UNBOUND_SHARE_DIR
757UNBOUND_CHROOT_DIR
758UNBOUND_RUN_DIR
759ub_conf_dir
760ub_conf_file
761UNBOUND_LOCALSTATE_DIR
762UNBOUND_SYSCONF_DIR
763UNBOUND_SBIN_DIR
764EGREP
765GREP
766CPP
767OBJEXT
768EXEEXT
769ac_ct_CC
770CPPFLAGS
771LDFLAGS
772CFLAGS
773CC
774LIBUNBOUND_AGE
775LIBUNBOUND_REVISION
776LIBUNBOUND_CURRENT
777UNBOUND_VERSION_MICRO
778UNBOUND_VERSION_MINOR
779UNBOUND_VERSION_MAJOR
780target_alias
781host_alias
782build_alias
783LIBS
784ECHO_T
785ECHO_N
786ECHO_C
787DEFS
788mandir
789localedir
790libdir
791psdir
792pdfdir
793dvidir
794htmldir
795infodir
796docdir
797oldincludedir
798includedir
799localstatedir
800sharedstatedir
801sysconfdir
802datadir
803datarootdir
804libexecdir
805sbindir
806bindir
807program_transform_name
808prefix
809exec_prefix
810PACKAGE_URL
811PACKAGE_BUGREPORT
812PACKAGE_STRING
813PACKAGE_VERSION
814PACKAGE_TARNAME
815PACKAGE_NAME
816PATH_SEPARATOR
817SHELL'
818ac_subst_files=''
819ac_user_opts='
820enable_option_checking
821with_conf_file
822with_run_dir
823with_chroot_dir
824with_share_dir
825with_pidfile
826with_rootkey_file
827with_rootcert_file
828with_username
829enable_checking
830enable_debug
831enable_flto
832enable_pie
833enable_relro_now
834enable_shared
835enable_static
836with_pic
837enable_fast_install
838with_aix_soname
839with_gnu_ld
840with_sysroot
841enable_libtool_lock
842enable_rpath
843enable_largefile
844enable_alloc_checks
845enable_alloc_lite
846enable_alloc_nonregional
847with_pthreads
848with_solaris_threads
849with_pyunbound
850with_pythonmodule
851enable_swig_version_check
852with_nss
853with_nettle
854with_ssl
855enable_sha1
856enable_sha2
857enable_subnet
858enable_gost
859enable_ecdsa
860enable_dsa
861enable_ed25519
862enable_ed448
863enable_event_api
864enable_tfo_client
865enable_tfo_server
866with_libevent
867with_libexpat
868with_libhiredis
869enable_static_exe
870enable_systemd
871enable_lock_checks
872enable_allsymbols
873enable_dnstap
874with_dnstap_socket_path
875with_protobuf_c
876with_libfstrm
877enable_dnscrypt
878with_libsodium
879enable_cachedb
880enable_ipsecmod
881with_libunbound_only
882'
883      ac_precious_vars='build_alias
884host_alias
885target_alias
886CC
887CFLAGS
888LDFLAGS
889LIBS
890CPPFLAGS
891CPP
892YACC
893YFLAGS
894LT_SYS_LIBRARY_PATH
895PYTHON_VERSION
896PKG_CONFIG
897PKG_CONFIG_PATH
898PKG_CONFIG_LIBDIR
899SYSTEMD_CFLAGS
900SYSTEMD_LIBS
901SYSTEMD_DAEMON_CFLAGS
902SYSTEMD_DAEMON_LIBS'
903
904
905# Initialize some variables set by options.
906ac_init_help=
907ac_init_version=false
908ac_unrecognized_opts=
909ac_unrecognized_sep=
910# The variables have the same names as the options, with
911# dashes changed to underlines.
912cache_file=/dev/null
913exec_prefix=NONE
914no_create=
915no_recursion=
916prefix=NONE
917program_prefix=NONE
918program_suffix=NONE
919program_transform_name=s,x,x,
920silent=
921site=
922srcdir=
923verbose=
924x_includes=NONE
925x_libraries=NONE
926
927# Installation directory options.
928# These are left unexpanded so users can "make install exec_prefix=/foo"
929# and all the variables that are supposed to be based on exec_prefix
930# by default will actually change.
931# Use braces instead of parens because sh, perl, etc. also accept them.
932# (The list follows the same order as the GNU Coding Standards.)
933bindir='${exec_prefix}/bin'
934sbindir='${exec_prefix}/sbin'
935libexecdir='${exec_prefix}/libexec'
936datarootdir='${prefix}/share'
937datadir='${datarootdir}'
938sysconfdir='${prefix}/etc'
939sharedstatedir='${prefix}/com'
940localstatedir='${prefix}/var'
941includedir='${prefix}/include'
942oldincludedir='/usr/include'
943docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
944infodir='${datarootdir}/info'
945htmldir='${docdir}'
946dvidir='${docdir}'
947pdfdir='${docdir}'
948psdir='${docdir}'
949libdir='${exec_prefix}/lib'
950localedir='${datarootdir}/locale'
951mandir='${datarootdir}/man'
952
953ac_prev=
954ac_dashdash=
955for ac_option
956do
957  # If the previous option needs an argument, assign it.
958  if test -n "$ac_prev"; then
959    eval $ac_prev=\$ac_option
960    ac_prev=
961    continue
962  fi
963
964  case $ac_option in
965  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
966  *=)   ac_optarg= ;;
967  *)    ac_optarg=yes ;;
968  esac
969
970  # Accept the important Cygnus configure options, so we can diagnose typos.
971
972  case $ac_dashdash$ac_option in
973  --)
974    ac_dashdash=yes ;;
975
976  -bindir | --bindir | --bindi | --bind | --bin | --bi)
977    ac_prev=bindir ;;
978  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
979    bindir=$ac_optarg ;;
980
981  -build | --build | --buil | --bui | --bu)
982    ac_prev=build_alias ;;
983  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
984    build_alias=$ac_optarg ;;
985
986  -cache-file | --cache-file | --cache-fil | --cache-fi \
987  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
988    ac_prev=cache_file ;;
989  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
990  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
991    cache_file=$ac_optarg ;;
992
993  --config-cache | -C)
994    cache_file=config.cache ;;
995
996  -datadir | --datadir | --datadi | --datad)
997    ac_prev=datadir ;;
998  -datadir=* | --datadir=* | --datadi=* | --datad=*)
999    datadir=$ac_optarg ;;
1000
1001  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1002  | --dataroo | --dataro | --datar)
1003    ac_prev=datarootdir ;;
1004  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1005  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1006    datarootdir=$ac_optarg ;;
1007
1008  -disable-* | --disable-*)
1009    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1010    # Reject names that are not valid shell variable names.
1011    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1012      as_fn_error $? "invalid feature name: $ac_useropt"
1013    ac_useropt_orig=$ac_useropt
1014    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1015    case $ac_user_opts in
1016      *"
1017"enable_$ac_useropt"
1018"*) ;;
1019      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1020	 ac_unrecognized_sep=', ';;
1021    esac
1022    eval enable_$ac_useropt=no ;;
1023
1024  -docdir | --docdir | --docdi | --doc | --do)
1025    ac_prev=docdir ;;
1026  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1027    docdir=$ac_optarg ;;
1028
1029  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1030    ac_prev=dvidir ;;
1031  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1032    dvidir=$ac_optarg ;;
1033
1034  -enable-* | --enable-*)
1035    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1036    # Reject names that are not valid shell variable names.
1037    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1038      as_fn_error $? "invalid feature name: $ac_useropt"
1039    ac_useropt_orig=$ac_useropt
1040    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1041    case $ac_user_opts in
1042      *"
1043"enable_$ac_useropt"
1044"*) ;;
1045      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1046	 ac_unrecognized_sep=', ';;
1047    esac
1048    eval enable_$ac_useropt=\$ac_optarg ;;
1049
1050  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1051  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1052  | --exec | --exe | --ex)
1053    ac_prev=exec_prefix ;;
1054  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1055  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1056  | --exec=* | --exe=* | --ex=*)
1057    exec_prefix=$ac_optarg ;;
1058
1059  -gas | --gas | --ga | --g)
1060    # Obsolete; use --with-gas.
1061    with_gas=yes ;;
1062
1063  -help | --help | --hel | --he | -h)
1064    ac_init_help=long ;;
1065  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1066    ac_init_help=recursive ;;
1067  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1068    ac_init_help=short ;;
1069
1070  -host | --host | --hos | --ho)
1071    ac_prev=host_alias ;;
1072  -host=* | --host=* | --hos=* | --ho=*)
1073    host_alias=$ac_optarg ;;
1074
1075  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1076    ac_prev=htmldir ;;
1077  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1078  | --ht=*)
1079    htmldir=$ac_optarg ;;
1080
1081  -includedir | --includedir | --includedi | --included | --include \
1082  | --includ | --inclu | --incl | --inc)
1083    ac_prev=includedir ;;
1084  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1085  | --includ=* | --inclu=* | --incl=* | --inc=*)
1086    includedir=$ac_optarg ;;
1087
1088  -infodir | --infodir | --infodi | --infod | --info | --inf)
1089    ac_prev=infodir ;;
1090  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1091    infodir=$ac_optarg ;;
1092
1093  -libdir | --libdir | --libdi | --libd)
1094    ac_prev=libdir ;;
1095  -libdir=* | --libdir=* | --libdi=* | --libd=*)
1096    libdir=$ac_optarg ;;
1097
1098  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1099  | --libexe | --libex | --libe)
1100    ac_prev=libexecdir ;;
1101  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1102  | --libexe=* | --libex=* | --libe=*)
1103    libexecdir=$ac_optarg ;;
1104
1105  -localedir | --localedir | --localedi | --localed | --locale)
1106    ac_prev=localedir ;;
1107  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1108    localedir=$ac_optarg ;;
1109
1110  -localstatedir | --localstatedir | --localstatedi | --localstated \
1111  | --localstate | --localstat | --localsta | --localst | --locals)
1112    ac_prev=localstatedir ;;
1113  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1114  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1115    localstatedir=$ac_optarg ;;
1116
1117  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1118    ac_prev=mandir ;;
1119  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1120    mandir=$ac_optarg ;;
1121
1122  -nfp | --nfp | --nf)
1123    # Obsolete; use --without-fp.
1124    with_fp=no ;;
1125
1126  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1127  | --no-cr | --no-c | -n)
1128    no_create=yes ;;
1129
1130  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1131  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1132    no_recursion=yes ;;
1133
1134  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1135  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1136  | --oldin | --oldi | --old | --ol | --o)
1137    ac_prev=oldincludedir ;;
1138  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1139  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1140  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1141    oldincludedir=$ac_optarg ;;
1142
1143  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1144    ac_prev=prefix ;;
1145  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1146    prefix=$ac_optarg ;;
1147
1148  -program-prefix | --program-prefix | --program-prefi | --program-pref \
1149  | --program-pre | --program-pr | --program-p)
1150    ac_prev=program_prefix ;;
1151  -program-prefix=* | --program-prefix=* | --program-prefi=* \
1152  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1153    program_prefix=$ac_optarg ;;
1154
1155  -program-suffix | --program-suffix | --program-suffi | --program-suff \
1156  | --program-suf | --program-su | --program-s)
1157    ac_prev=program_suffix ;;
1158  -program-suffix=* | --program-suffix=* | --program-suffi=* \
1159  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1160    program_suffix=$ac_optarg ;;
1161
1162  -program-transform-name | --program-transform-name \
1163  | --program-transform-nam | --program-transform-na \
1164  | --program-transform-n | --program-transform- \
1165  | --program-transform | --program-transfor \
1166  | --program-transfo | --program-transf \
1167  | --program-trans | --program-tran \
1168  | --progr-tra | --program-tr | --program-t)
1169    ac_prev=program_transform_name ;;
1170  -program-transform-name=* | --program-transform-name=* \
1171  | --program-transform-nam=* | --program-transform-na=* \
1172  | --program-transform-n=* | --program-transform-=* \
1173  | --program-transform=* | --program-transfor=* \
1174  | --program-transfo=* | --program-transf=* \
1175  | --program-trans=* | --program-tran=* \
1176  | --progr-tra=* | --program-tr=* | --program-t=*)
1177    program_transform_name=$ac_optarg ;;
1178
1179  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1180    ac_prev=pdfdir ;;
1181  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1182    pdfdir=$ac_optarg ;;
1183
1184  -psdir | --psdir | --psdi | --psd | --ps)
1185    ac_prev=psdir ;;
1186  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1187    psdir=$ac_optarg ;;
1188
1189  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1190  | -silent | --silent | --silen | --sile | --sil)
1191    silent=yes ;;
1192
1193  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1194    ac_prev=sbindir ;;
1195  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1196  | --sbi=* | --sb=*)
1197    sbindir=$ac_optarg ;;
1198
1199  -sharedstatedir | --sharedstatedir | --sharedstatedi \
1200  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1201  | --sharedst | --shareds | --shared | --share | --shar \
1202  | --sha | --sh)
1203    ac_prev=sharedstatedir ;;
1204  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1205  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1206  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1207  | --sha=* | --sh=*)
1208    sharedstatedir=$ac_optarg ;;
1209
1210  -site | --site | --sit)
1211    ac_prev=site ;;
1212  -site=* | --site=* | --sit=*)
1213    site=$ac_optarg ;;
1214
1215  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1216    ac_prev=srcdir ;;
1217  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1218    srcdir=$ac_optarg ;;
1219
1220  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1221  | --syscon | --sysco | --sysc | --sys | --sy)
1222    ac_prev=sysconfdir ;;
1223  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1224  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1225    sysconfdir=$ac_optarg ;;
1226
1227  -target | --target | --targe | --targ | --tar | --ta | --t)
1228    ac_prev=target_alias ;;
1229  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1230    target_alias=$ac_optarg ;;
1231
1232  -v | -verbose | --verbose | --verbos | --verbo | --verb)
1233    verbose=yes ;;
1234
1235  -version | --version | --versio | --versi | --vers | -V)
1236    ac_init_version=: ;;
1237
1238  -with-* | --with-*)
1239    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1240    # Reject names that are not valid shell variable names.
1241    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1242      as_fn_error $? "invalid package name: $ac_useropt"
1243    ac_useropt_orig=$ac_useropt
1244    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1245    case $ac_user_opts in
1246      *"
1247"with_$ac_useropt"
1248"*) ;;
1249      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1250	 ac_unrecognized_sep=', ';;
1251    esac
1252    eval with_$ac_useropt=\$ac_optarg ;;
1253
1254  -without-* | --without-*)
1255    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1256    # Reject names that are not valid shell variable names.
1257    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1258      as_fn_error $? "invalid package name: $ac_useropt"
1259    ac_useropt_orig=$ac_useropt
1260    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1261    case $ac_user_opts in
1262      *"
1263"with_$ac_useropt"
1264"*) ;;
1265      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1266	 ac_unrecognized_sep=', ';;
1267    esac
1268    eval with_$ac_useropt=no ;;
1269
1270  --x)
1271    # Obsolete; use --with-x.
1272    with_x=yes ;;
1273
1274  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1275  | --x-incl | --x-inc | --x-in | --x-i)
1276    ac_prev=x_includes ;;
1277  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1278  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1279    x_includes=$ac_optarg ;;
1280
1281  -x-libraries | --x-libraries | --x-librarie | --x-librari \
1282  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1283    ac_prev=x_libraries ;;
1284  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1285  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1286    x_libraries=$ac_optarg ;;
1287
1288  -*) as_fn_error $? "unrecognized option: \`$ac_option'
1289Try \`$0 --help' for more information"
1290    ;;
1291
1292  *=*)
1293    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1294    # Reject names that are not valid shell variable names.
1295    case $ac_envvar in #(
1296      '' | [0-9]* | *[!_$as_cr_alnum]* )
1297      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1298    esac
1299    eval $ac_envvar=\$ac_optarg
1300    export $ac_envvar ;;
1301
1302  *)
1303    # FIXME: should be removed in autoconf 3.0.
1304    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1305    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1306      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1307    : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1308    ;;
1309
1310  esac
1311done
1312
1313if test -n "$ac_prev"; then
1314  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1315  as_fn_error $? "missing argument to $ac_option"
1316fi
1317
1318if test -n "$ac_unrecognized_opts"; then
1319  case $enable_option_checking in
1320    no) ;;
1321    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1322    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1323  esac
1324fi
1325
1326# Check all directory arguments for consistency.
1327for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
1328		datadir sysconfdir sharedstatedir localstatedir includedir \
1329		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1330		libdir localedir mandir
1331do
1332  eval ac_val=\$$ac_var
1333  # Remove trailing slashes.
1334  case $ac_val in
1335    */ )
1336      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1337      eval $ac_var=\$ac_val;;
1338  esac
1339  # Be sure to have absolute directory names.
1340  case $ac_val in
1341    [\\/$]* | ?:[\\/]* )  continue;;
1342    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1343  esac
1344  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1345done
1346
1347# There might be people who depend on the old broken behavior: `$host'
1348# used to hold the argument of --host etc.
1349# FIXME: To remove some day.
1350build=$build_alias
1351host=$host_alias
1352target=$target_alias
1353
1354# FIXME: To remove some day.
1355if test "x$host_alias" != x; then
1356  if test "x$build_alias" = x; then
1357    cross_compiling=maybe
1358  elif test "x$build_alias" != "x$host_alias"; then
1359    cross_compiling=yes
1360  fi
1361fi
1362
1363ac_tool_prefix=
1364test -n "$host_alias" && ac_tool_prefix=$host_alias-
1365
1366test "$silent" = yes && exec 6>/dev/null
1367
1368
1369ac_pwd=`pwd` && test -n "$ac_pwd" &&
1370ac_ls_di=`ls -di .` &&
1371ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1372  as_fn_error $? "working directory cannot be determined"
1373test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1374  as_fn_error $? "pwd does not report name of working directory"
1375
1376
1377# Find the source files, if location was not specified.
1378if test -z "$srcdir"; then
1379  ac_srcdir_defaulted=yes
1380  # Try the directory containing this script, then the parent directory.
1381  ac_confdir=`$as_dirname -- "$as_myself" ||
1382$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1383	 X"$as_myself" : 'X\(//\)[^/]' \| \
1384	 X"$as_myself" : 'X\(//\)$' \| \
1385	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1386$as_echo X"$as_myself" |
1387    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1388	    s//\1/
1389	    q
1390	  }
1391	  /^X\(\/\/\)[^/].*/{
1392	    s//\1/
1393	    q
1394	  }
1395	  /^X\(\/\/\)$/{
1396	    s//\1/
1397	    q
1398	  }
1399	  /^X\(\/\).*/{
1400	    s//\1/
1401	    q
1402	  }
1403	  s/.*/./; q'`
1404  srcdir=$ac_confdir
1405  if test ! -r "$srcdir/$ac_unique_file"; then
1406    srcdir=..
1407  fi
1408else
1409  ac_srcdir_defaulted=no
1410fi
1411if test ! -r "$srcdir/$ac_unique_file"; then
1412  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1413  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1414fi
1415ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1416ac_abs_confdir=`(
1417	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1418	pwd)`
1419# When building in place, set srcdir=.
1420if test "$ac_abs_confdir" = "$ac_pwd"; then
1421  srcdir=.
1422fi
1423# Remove unnecessary trailing slashes from srcdir.
1424# Double slashes in file names in object file debugging info
1425# mess up M-x gdb in Emacs.
1426case $srcdir in
1427*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1428esac
1429for ac_var in $ac_precious_vars; do
1430  eval ac_env_${ac_var}_set=\${${ac_var}+set}
1431  eval ac_env_${ac_var}_value=\$${ac_var}
1432  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1433  eval ac_cv_env_${ac_var}_value=\$${ac_var}
1434done
1435
1436#
1437# Report the --help message.
1438#
1439if test "$ac_init_help" = "long"; then
1440  # Omit some internal or obsolete options to make the list less imposing.
1441  # This message is too long to be a string in the A/UX 3.1 sh.
1442  cat <<_ACEOF
1443\`configure' configures unbound 1.7.1 to adapt to many kinds of systems.
1444
1445Usage: $0 [OPTION]... [VAR=VALUE]...
1446
1447To assign environment variables (e.g., CC, CFLAGS...), specify them as
1448VAR=VALUE.  See below for descriptions of some of the useful variables.
1449
1450Defaults for the options are specified in brackets.
1451
1452Configuration:
1453  -h, --help              display this help and exit
1454      --help=short        display options specific to this package
1455      --help=recursive    display the short help of all the included packages
1456  -V, --version           display version information and exit
1457  -q, --quiet, --silent   do not print \`checking ...' messages
1458      --cache-file=FILE   cache test results in FILE [disabled]
1459  -C, --config-cache      alias for \`--cache-file=config.cache'
1460  -n, --no-create         do not create output files
1461      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1462
1463Installation directories:
1464  --prefix=PREFIX         install architecture-independent files in PREFIX
1465                          [$ac_default_prefix]
1466  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1467                          [PREFIX]
1468
1469By default, \`make install' will install all the files in
1470\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1471an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1472for instance \`--prefix=\$HOME'.
1473
1474For better control, use the options below.
1475
1476Fine tuning of the installation directories:
1477  --bindir=DIR            user executables [EPREFIX/bin]
1478  --sbindir=DIR           system admin executables [EPREFIX/sbin]
1479  --libexecdir=DIR        program executables [EPREFIX/libexec]
1480  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1481  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1482  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1483  --libdir=DIR            object code libraries [EPREFIX/lib]
1484  --includedir=DIR        C header files [PREFIX/include]
1485  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1486  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1487  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1488  --infodir=DIR           info documentation [DATAROOTDIR/info]
1489  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1490  --mandir=DIR            man documentation [DATAROOTDIR/man]
1491  --docdir=DIR            documentation root [DATAROOTDIR/doc/unbound]
1492  --htmldir=DIR           html documentation [DOCDIR]
1493  --dvidir=DIR            dvi documentation [DOCDIR]
1494  --pdfdir=DIR            pdf documentation [DOCDIR]
1495  --psdir=DIR             ps documentation [DOCDIR]
1496_ACEOF
1497
1498  cat <<\_ACEOF
1499
1500System types:
1501  --build=BUILD     configure for building on BUILD [guessed]
1502  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1503_ACEOF
1504fi
1505
1506if test -n "$ac_init_help"; then
1507  case $ac_init_help in
1508     short | recursive ) echo "Configuration of unbound 1.7.1:";;
1509   esac
1510  cat <<\_ACEOF
1511
1512Optional Features:
1513  --disable-option-checking  ignore unrecognized --enable/--with options
1514  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1515  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1516  --enable-checking       Enable warnings, asserts, makefile-dependencies
1517  --enable-debug          same as enable-checking
1518  --disable-flto          Disable link-time optimization (gcc specific option)
1519  --enable-pie            Enable Position-Independent Executable (eg. to fully
1520                          benefit from ASLR, small performance penalty)
1521  --enable-relro-now      Enable full relocation binding at load-time (RELRO
1522                          NOW, to protect GOT and .dtor areas)
1523  --enable-shared[=PKGS]  build shared libraries [default=yes]
1524  --enable-static[=PKGS]  build static libraries [default=yes]
1525  --enable-fast-install[=PKGS]
1526                          optimize for fast installation [default=yes]
1527  --disable-libtool-lock  avoid locking (might break parallel builds)
1528  --disable-rpath         disable hardcoded rpath (default=enabled)
1529  --disable-largefile     omit support for large files
1530  --enable-alloc-checks   enable to memory allocation statistics, for debug
1531                          purposes
1532  --enable-alloc-lite     enable for lightweight alloc assertions, for debug
1533                          purposes
1534  --enable-alloc-nonregional
1535                          enable nonregional allocs, slow but exposes regional
1536                          allocations to other memory purifiers, for debug
1537                          purposes
1538  --disable-swig-version-check
1539                          Disable swig version check to build python modules
1540                          with older swig even though that is unreliable
1541  --disable-sha1          Disable SHA1 RRSIG support, does not disable nsec3
1542                          support
1543  --disable-sha2          Disable SHA256 and SHA512 RRSIG support
1544  --enable-subnet         Enable client subnet
1545  --disable-gost          Disable GOST support
1546  --disable-ecdsa         Disable ECDSA support
1547  --disable-dsa           Disable DSA support
1548  --disable-ed25519       Disable ED25519 support
1549  --disable-ed448         Disable ED448 support
1550  --enable-event-api      Enable (experimental) pluggable event base
1551                          libunbound API installed to unbound-event.h
1552  --enable-tfo-client     Enable TCP Fast Open for client mode
1553  --enable-tfo-server     Enable TCP Fast Open for server mode
1554  --enable-static-exe     enable to compile executables statically against
1555                          (event) libs, for debug purposes
1556  --enable-systemd        compile with systemd support
1557  --enable-lock-checks    enable to check lock and unlock calls, for debug
1558                          purposes
1559  --enable-allsymbols     export all symbols from libunbound and link binaries
1560                          to it, smaller install size but libunbound export
1561                          table is polluted by internal symbols
1562  --enable-dnstap         Enable dnstap support (requires fstrm, protobuf-c)
1563  --enable-dnscrypt       Enable dnscrypt support (requires libsodium)
1564  --enable-cachedb        enable cachedb module that can use external cache
1565                          storage
1566  --enable-ipsecmod       Enable ipsecmod module that facilitates
1567                          opportunistic IPsec
1568
1569Optional Packages:
1570  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1571  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1572  --with-conf-file=path   Pathname to the Unbound configuration file
1573  --with-run-dir=path     set default directory to chdir to (by default dir
1574                          part of cfg file)
1575  --with-chroot-dir=path  set default directory to chroot to (by default same
1576                          as run-dir)
1577  --with-share-dir=path   set default directory with shared data (by default
1578                          same as share/unbound)
1579  --with-pidfile=filename set default pathname to unbound pidfile (default
1580                          run-dir/unbound.pid)
1581  --with-rootkey-file=filename
1582                          set default pathname to root key file (default
1583                          run-dir/root.key). This file is read and written.
1584  --with-rootcert-file=filename
1585                          set default pathname to root update certificate file
1586                          (default run-dir/icannbundle.pem). This file need
1587                          not exist if you are content with the builtin.
1588  --with-username=user    set default user that unbound changes to (default
1589                          user is unbound)
1590  --with-pic[=PKGS]       try to use only PIC/non-PIC objects [default=use
1591                          both]
1592  --with-aix-soname=aix|svr4|both
1593                          shared library versioning (aka "SONAME") variant to
1594                          provide on AIX, [default=aix].
1595  --with-gnu-ld           assume the C compiler uses GNU ld [default=no]
1596  --with-sysroot[=DIR]    Search for dependent libraries within DIR (or the
1597                          compiler's sysroot if not specified).
1598  --with-pthreads         use pthreads library, or --without-pthreads to
1599                          disable threading support.
1600  --with-solaris-threads  use solaris native thread library.
1601  --with-pyunbound        build PyUnbound, or --without-pyunbound to skip it.
1602                          (default=no)
1603  --with-pythonmodule     build Python module, or --without-pythonmodule to
1604                          disable script engine. (default=no)
1605  --with-nss=path         use libnss instead of openssl, installed at path.
1606  --with-nettle=path      use libnettle as crypto library, installed at path.
1607  --with-ssl=pathname     enable SSL (will check /usr/local/ssl /usr/lib/ssl
1608                          /usr/ssl /usr/pkg /usr/local /opt/local /usr/sfw
1609                          /usr)
1610  --with-libevent=pathname
1611                          use libevent (will check /usr/local /opt/local
1612                          /usr/lib /usr/pkg /usr/sfw /usr or you can specify
1613                          an explicit path). Slower, but allows use of large
1614                          outgoing port ranges.
1615  --with-libexpat=path    specify explicit path for libexpat.
1616  --with-libhiredis=path  specify explicit path for libhiredis.
1617  --with-dnstap-socket-path=pathname
1618                          set default dnstap socket path
1619  --with-protobuf-c=path  Path where protobuf-c is installed, for dnstap
1620  --with-libfstrm=path    Path where libfstrm is installed, for dnstap
1621  --with-libsodium=path   Path where libsodium is installed, for dnscrypt
1622  --with-libunbound-only  do not build daemon and tool programs
1623
1624Some influential environment variables:
1625  CC          C compiler command
1626  CFLAGS      C compiler flags
1627  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
1628              nonstandard directory <lib dir>
1629  LIBS        libraries to pass to the linker, e.g. -l<library>
1630  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1631              you have headers in a nonstandard directory <include dir>
1632  CPP         C preprocessor
1633  YACC        The `Yet Another Compiler Compiler' implementation to use.
1634              Defaults to the first program found out of: `bison -y', `byacc',
1635              `yacc'.
1636  YFLAGS      The list of arguments that will be passed by default to $YACC.
1637              This script will default YFLAGS to the empty string to avoid a
1638              default value of `-d' given by some make applications.
1639  LT_SYS_LIBRARY_PATH
1640              User-defined run-time library search path.
1641  PYTHON_VERSION
1642              The installed Python version to use, for example '2.3'. This
1643              string will be appended to the Python interpreter canonical
1644              name.
1645  PKG_CONFIG  path to pkg-config utility
1646  PKG_CONFIG_PATH
1647              directories to add to pkg-config's search path
1648  PKG_CONFIG_LIBDIR
1649              path overriding pkg-config's built-in search path
1650  SYSTEMD_CFLAGS
1651              C compiler flags for SYSTEMD, overriding pkg-config
1652  SYSTEMD_LIBS
1653              linker flags for SYSTEMD, overriding pkg-config
1654  SYSTEMD_DAEMON_CFLAGS
1655              C compiler flags for SYSTEMD_DAEMON, overriding pkg-config
1656  SYSTEMD_DAEMON_LIBS
1657              linker flags for SYSTEMD_DAEMON, overriding pkg-config
1658
1659Use these variables to override the choices made by `configure' or to help
1660it to find libraries and programs with nonstandard names/locations.
1661
1662Report bugs to <unbound-bugs@nlnetlabs.nl>.
1663_ACEOF
1664ac_status=$?
1665fi
1666
1667if test "$ac_init_help" = "recursive"; then
1668  # If there are subdirs, report their specific --help.
1669  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1670    test -d "$ac_dir" ||
1671      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1672      continue
1673    ac_builddir=.
1674
1675case "$ac_dir" in
1676.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1677*)
1678  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1679  # A ".." for each directory in $ac_dir_suffix.
1680  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1681  case $ac_top_builddir_sub in
1682  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1683  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1684  esac ;;
1685esac
1686ac_abs_top_builddir=$ac_pwd
1687ac_abs_builddir=$ac_pwd$ac_dir_suffix
1688# for backward compatibility:
1689ac_top_builddir=$ac_top_build_prefix
1690
1691case $srcdir in
1692  .)  # We are building in place.
1693    ac_srcdir=.
1694    ac_top_srcdir=$ac_top_builddir_sub
1695    ac_abs_top_srcdir=$ac_pwd ;;
1696  [\\/]* | ?:[\\/]* )  # Absolute name.
1697    ac_srcdir=$srcdir$ac_dir_suffix;
1698    ac_top_srcdir=$srcdir
1699    ac_abs_top_srcdir=$srcdir ;;
1700  *) # Relative name.
1701    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1702    ac_top_srcdir=$ac_top_build_prefix$srcdir
1703    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1704esac
1705ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1706
1707    cd "$ac_dir" || { ac_status=$?; continue; }
1708    # Check for guested configure.
1709    if test -f "$ac_srcdir/configure.gnu"; then
1710      echo &&
1711      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1712    elif test -f "$ac_srcdir/configure"; then
1713      echo &&
1714      $SHELL "$ac_srcdir/configure" --help=recursive
1715    else
1716      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1717    fi || ac_status=$?
1718    cd "$ac_pwd" || { ac_status=$?; break; }
1719  done
1720fi
1721
1722test -n "$ac_init_help" && exit $ac_status
1723if $ac_init_version; then
1724  cat <<\_ACEOF
1725unbound configure 1.7.1
1726generated by GNU Autoconf 2.69
1727
1728Copyright (C) 2012 Free Software Foundation, Inc.
1729This configure script is free software; the Free Software Foundation
1730gives unlimited permission to copy, distribute and modify it.
1731_ACEOF
1732  exit
1733fi
1734
1735## ------------------------ ##
1736## Autoconf initialization. ##
1737## ------------------------ ##
1738
1739# ac_fn_c_try_compile LINENO
1740# --------------------------
1741# Try to compile conftest.$ac_ext, and return whether this succeeded.
1742ac_fn_c_try_compile ()
1743{
1744  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1745  rm -f conftest.$ac_objext
1746  if { { ac_try="$ac_compile"
1747case "(($ac_try" in
1748  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1749  *) ac_try_echo=$ac_try;;
1750esac
1751eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1752$as_echo "$ac_try_echo"; } >&5
1753  (eval "$ac_compile") 2>conftest.err
1754  ac_status=$?
1755  if test -s conftest.err; then
1756    grep -v '^ *+' conftest.err >conftest.er1
1757    cat conftest.er1 >&5
1758    mv -f conftest.er1 conftest.err
1759  fi
1760  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1761  test $ac_status = 0; } && {
1762	 test -z "$ac_c_werror_flag" ||
1763	 test ! -s conftest.err
1764       } && test -s conftest.$ac_objext; then :
1765  ac_retval=0
1766else
1767  $as_echo "$as_me: failed program was:" >&5
1768sed 's/^/| /' conftest.$ac_ext >&5
1769
1770	ac_retval=1
1771fi
1772  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1773  as_fn_set_status $ac_retval
1774
1775} # ac_fn_c_try_compile
1776
1777# ac_fn_c_try_cpp LINENO
1778# ----------------------
1779# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1780ac_fn_c_try_cpp ()
1781{
1782  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1783  if { { ac_try="$ac_cpp conftest.$ac_ext"
1784case "(($ac_try" in
1785  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1786  *) ac_try_echo=$ac_try;;
1787esac
1788eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1789$as_echo "$ac_try_echo"; } >&5
1790  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1791  ac_status=$?
1792  if test -s conftest.err; then
1793    grep -v '^ *+' conftest.err >conftest.er1
1794    cat conftest.er1 >&5
1795    mv -f conftest.er1 conftest.err
1796  fi
1797  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1798  test $ac_status = 0; } > conftest.i && {
1799	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1800	 test ! -s conftest.err
1801       }; then :
1802  ac_retval=0
1803else
1804  $as_echo "$as_me: failed program was:" >&5
1805sed 's/^/| /' conftest.$ac_ext >&5
1806
1807    ac_retval=1
1808fi
1809  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1810  as_fn_set_status $ac_retval
1811
1812} # ac_fn_c_try_cpp
1813
1814# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1815# -------------------------------------------------------
1816# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1817# the include files in INCLUDES and setting the cache variable VAR
1818# accordingly.
1819ac_fn_c_check_header_mongrel ()
1820{
1821  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1822  if eval \${$3+:} false; then :
1823  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1824$as_echo_n "checking for $2... " >&6; }
1825if eval \${$3+:} false; then :
1826  $as_echo_n "(cached) " >&6
1827fi
1828eval ac_res=\$$3
1829	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1830$as_echo "$ac_res" >&6; }
1831else
1832  # Is the header compilable?
1833{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1834$as_echo_n "checking $2 usability... " >&6; }
1835cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1836/* end confdefs.h.  */
1837$4
1838#include <$2>
1839_ACEOF
1840if ac_fn_c_try_compile "$LINENO"; then :
1841  ac_header_compiler=yes
1842else
1843  ac_header_compiler=no
1844fi
1845rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1846{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1847$as_echo "$ac_header_compiler" >&6; }
1848
1849# Is the header present?
1850{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1851$as_echo_n "checking $2 presence... " >&6; }
1852cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1853/* end confdefs.h.  */
1854#include <$2>
1855_ACEOF
1856if ac_fn_c_try_cpp "$LINENO"; then :
1857  ac_header_preproc=yes
1858else
1859  ac_header_preproc=no
1860fi
1861rm -f conftest.err conftest.i conftest.$ac_ext
1862{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1863$as_echo "$ac_header_preproc" >&6; }
1864
1865# So?  What about this header?
1866case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1867  yes:no: )
1868    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1869$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1870    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1871$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1872    ;;
1873  no:yes:* )
1874    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1875$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1876    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
1877$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
1878    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1879$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1880    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
1881$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
1882    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1883$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1884( $as_echo "## ---------------------------------------- ##
1885## Report this to unbound-bugs@nlnetlabs.nl ##
1886## ---------------------------------------- ##"
1887     ) | sed "s/^/$as_me: WARNING:     /" >&2
1888    ;;
1889esac
1890  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1891$as_echo_n "checking for $2... " >&6; }
1892if eval \${$3+:} false; then :
1893  $as_echo_n "(cached) " >&6
1894else
1895  eval "$3=\$ac_header_compiler"
1896fi
1897eval ac_res=\$$3
1898	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1899$as_echo "$ac_res" >&6; }
1900fi
1901  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1902
1903} # ac_fn_c_check_header_mongrel
1904
1905# ac_fn_c_try_run LINENO
1906# ----------------------
1907# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1908# that executables *can* be run.
1909ac_fn_c_try_run ()
1910{
1911  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1912  if { { ac_try="$ac_link"
1913case "(($ac_try" in
1914  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1915  *) ac_try_echo=$ac_try;;
1916esac
1917eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1918$as_echo "$ac_try_echo"; } >&5
1919  (eval "$ac_link") 2>&5
1920  ac_status=$?
1921  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1922  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1923  { { case "(($ac_try" in
1924  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1925  *) ac_try_echo=$ac_try;;
1926esac
1927eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1928$as_echo "$ac_try_echo"; } >&5
1929  (eval "$ac_try") 2>&5
1930  ac_status=$?
1931  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1932  test $ac_status = 0; }; }; then :
1933  ac_retval=0
1934else
1935  $as_echo "$as_me: program exited with status $ac_status" >&5
1936       $as_echo "$as_me: failed program was:" >&5
1937sed 's/^/| /' conftest.$ac_ext >&5
1938
1939       ac_retval=$ac_status
1940fi
1941  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1942  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1943  as_fn_set_status $ac_retval
1944
1945} # ac_fn_c_try_run
1946
1947# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1948# -------------------------------------------------------
1949# Tests whether HEADER exists and can be compiled using the include files in
1950# INCLUDES, setting the cache variable VAR accordingly.
1951ac_fn_c_check_header_compile ()
1952{
1953  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1954  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1955$as_echo_n "checking for $2... " >&6; }
1956if eval \${$3+:} false; then :
1957  $as_echo_n "(cached) " >&6
1958else
1959  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1960/* end confdefs.h.  */
1961$4
1962#include <$2>
1963_ACEOF
1964if ac_fn_c_try_compile "$LINENO"; then :
1965  eval "$3=yes"
1966else
1967  eval "$3=no"
1968fi
1969rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1970fi
1971eval ac_res=\$$3
1972	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1973$as_echo "$ac_res" >&6; }
1974  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1975
1976} # ac_fn_c_check_header_compile
1977
1978# ac_fn_c_try_link LINENO
1979# -----------------------
1980# Try to link conftest.$ac_ext, and return whether this succeeded.
1981ac_fn_c_try_link ()
1982{
1983  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1984  rm -f conftest.$ac_objext conftest$ac_exeext
1985  if { { ac_try="$ac_link"
1986case "(($ac_try" in
1987  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1988  *) ac_try_echo=$ac_try;;
1989esac
1990eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1991$as_echo "$ac_try_echo"; } >&5
1992  (eval "$ac_link") 2>conftest.err
1993  ac_status=$?
1994  if test -s conftest.err; then
1995    grep -v '^ *+' conftest.err >conftest.er1
1996    cat conftest.er1 >&5
1997    mv -f conftest.er1 conftest.err
1998  fi
1999  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2000  test $ac_status = 0; } && {
2001	 test -z "$ac_c_werror_flag" ||
2002	 test ! -s conftest.err
2003       } && test -s conftest$ac_exeext && {
2004	 test "$cross_compiling" = yes ||
2005	 test -x conftest$ac_exeext
2006       }; then :
2007  ac_retval=0
2008else
2009  $as_echo "$as_me: failed program was:" >&5
2010sed 's/^/| /' conftest.$ac_ext >&5
2011
2012	ac_retval=1
2013fi
2014  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2015  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2016  # interfere with the next link command; also delete a directory that is
2017  # left behind by Apple's compiler.  We do this before executing the actions.
2018  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2019  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2020  as_fn_set_status $ac_retval
2021
2022} # ac_fn_c_try_link
2023
2024# ac_fn_c_check_func LINENO FUNC VAR
2025# ----------------------------------
2026# Tests whether FUNC exists, setting the cache variable VAR accordingly
2027ac_fn_c_check_func ()
2028{
2029  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2030  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2031$as_echo_n "checking for $2... " >&6; }
2032if eval \${$3+:} false; then :
2033  $as_echo_n "(cached) " >&6
2034else
2035  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2036/* end confdefs.h.  */
2037/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2038   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2039#define $2 innocuous_$2
2040
2041/* System header to define __stub macros and hopefully few prototypes,
2042    which can conflict with char $2 (); below.
2043    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2044    <limits.h> exists even on freestanding compilers.  */
2045
2046#ifdef __STDC__
2047# include <limits.h>
2048#else
2049# include <assert.h>
2050#endif
2051
2052#undef $2
2053
2054/* Override any GCC internal prototype to avoid an error.
2055   Use char because int might match the return type of a GCC
2056   builtin and then its argument prototype would still apply.  */
2057#ifdef __cplusplus
2058extern "C"
2059#endif
2060char $2 ();
2061/* The GNU C library defines this for functions which it implements
2062    to always fail with ENOSYS.  Some functions are actually named
2063    something starting with __ and the normal name is an alias.  */
2064#if defined __stub_$2 || defined __stub___$2
2065choke me
2066#endif
2067
2068int
2069main ()
2070{
2071return $2 ();
2072  ;
2073  return 0;
2074}
2075_ACEOF
2076if ac_fn_c_try_link "$LINENO"; then :
2077  eval "$3=yes"
2078else
2079  eval "$3=no"
2080fi
2081rm -f core conftest.err conftest.$ac_objext \
2082    conftest$ac_exeext conftest.$ac_ext
2083fi
2084eval ac_res=\$$3
2085	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2086$as_echo "$ac_res" >&6; }
2087  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2088
2089} # ac_fn_c_check_func
2090
2091# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2092# -------------------------------------------
2093# Tests whether TYPE exists after having included INCLUDES, setting cache
2094# variable VAR accordingly.
2095ac_fn_c_check_type ()
2096{
2097  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2098  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2099$as_echo_n "checking for $2... " >&6; }
2100if eval \${$3+:} false; then :
2101  $as_echo_n "(cached) " >&6
2102else
2103  eval "$3=no"
2104  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2105/* end confdefs.h.  */
2106$4
2107int
2108main ()
2109{
2110if (sizeof ($2))
2111	 return 0;
2112  ;
2113  return 0;
2114}
2115_ACEOF
2116if ac_fn_c_try_compile "$LINENO"; then :
2117  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2118/* end confdefs.h.  */
2119$4
2120int
2121main ()
2122{
2123if (sizeof (($2)))
2124	    return 0;
2125  ;
2126  return 0;
2127}
2128_ACEOF
2129if ac_fn_c_try_compile "$LINENO"; then :
2130
2131else
2132  eval "$3=yes"
2133fi
2134rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2135fi
2136rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2137fi
2138eval ac_res=\$$3
2139	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2140$as_echo "$ac_res" >&6; }
2141  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2142
2143} # ac_fn_c_check_type
2144
2145# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2146# --------------------------------------------
2147# Tries to find the compile-time value of EXPR in a program that includes
2148# INCLUDES, setting VAR accordingly. Returns whether the value could be
2149# computed
2150ac_fn_c_compute_int ()
2151{
2152  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2153  if test "$cross_compiling" = yes; then
2154    # Depending upon the size, compute the lo and hi bounds.
2155cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2156/* end confdefs.h.  */
2157$4
2158int
2159main ()
2160{
2161static int test_array [1 - 2 * !(($2) >= 0)];
2162test_array [0] = 0;
2163return test_array [0];
2164
2165  ;
2166  return 0;
2167}
2168_ACEOF
2169if ac_fn_c_try_compile "$LINENO"; then :
2170  ac_lo=0 ac_mid=0
2171  while :; do
2172    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2173/* end confdefs.h.  */
2174$4
2175int
2176main ()
2177{
2178static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2179test_array [0] = 0;
2180return test_array [0];
2181
2182  ;
2183  return 0;
2184}
2185_ACEOF
2186if ac_fn_c_try_compile "$LINENO"; then :
2187  ac_hi=$ac_mid; break
2188else
2189  as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2190			if test $ac_lo -le $ac_mid; then
2191			  ac_lo= ac_hi=
2192			  break
2193			fi
2194			as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2195fi
2196rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2197  done
2198else
2199  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2200/* end confdefs.h.  */
2201$4
2202int
2203main ()
2204{
2205static int test_array [1 - 2 * !(($2) < 0)];
2206test_array [0] = 0;
2207return test_array [0];
2208
2209  ;
2210  return 0;
2211}
2212_ACEOF
2213if ac_fn_c_try_compile "$LINENO"; then :
2214  ac_hi=-1 ac_mid=-1
2215  while :; do
2216    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2217/* end confdefs.h.  */
2218$4
2219int
2220main ()
2221{
2222static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2223test_array [0] = 0;
2224return test_array [0];
2225
2226  ;
2227  return 0;
2228}
2229_ACEOF
2230if ac_fn_c_try_compile "$LINENO"; then :
2231  ac_lo=$ac_mid; break
2232else
2233  as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2234			if test $ac_mid -le $ac_hi; then
2235			  ac_lo= ac_hi=
2236			  break
2237			fi
2238			as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2239fi
2240rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2241  done
2242else
2243  ac_lo= ac_hi=
2244fi
2245rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2246fi
2247rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2248# Binary search between lo and hi bounds.
2249while test "x$ac_lo" != "x$ac_hi"; do
2250  as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2251  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2252/* end confdefs.h.  */
2253$4
2254int
2255main ()
2256{
2257static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2258test_array [0] = 0;
2259return test_array [0];
2260
2261  ;
2262  return 0;
2263}
2264_ACEOF
2265if ac_fn_c_try_compile "$LINENO"; then :
2266  ac_hi=$ac_mid
2267else
2268  as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2269fi
2270rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2271done
2272case $ac_lo in #((
2273?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2274'') ac_retval=1 ;;
2275esac
2276  else
2277    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2278/* end confdefs.h.  */
2279$4
2280static long int longval () { return $2; }
2281static unsigned long int ulongval () { return $2; }
2282#include <stdio.h>
2283#include <stdlib.h>
2284int
2285main ()
2286{
2287
2288  FILE *f = fopen ("conftest.val", "w");
2289  if (! f)
2290    return 1;
2291  if (($2) < 0)
2292    {
2293      long int i = longval ();
2294      if (i != ($2))
2295	return 1;
2296      fprintf (f, "%ld", i);
2297    }
2298  else
2299    {
2300      unsigned long int i = ulongval ();
2301      if (i != ($2))
2302	return 1;
2303      fprintf (f, "%lu", i);
2304    }
2305  /* Do not output a trailing newline, as this causes \r\n confusion
2306     on some platforms.  */
2307  return ferror (f) || fclose (f) != 0;
2308
2309  ;
2310  return 0;
2311}
2312_ACEOF
2313if ac_fn_c_try_run "$LINENO"; then :
2314  echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2315else
2316  ac_retval=1
2317fi
2318rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2319  conftest.$ac_objext conftest.beam conftest.$ac_ext
2320rm -f conftest.val
2321
2322  fi
2323  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2324  as_fn_set_status $ac_retval
2325
2326} # ac_fn_c_compute_int
2327
2328# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2329# ---------------------------------------------
2330# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2331# accordingly.
2332ac_fn_c_check_decl ()
2333{
2334  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2335  as_decl_name=`echo $2|sed 's/ *(.*//'`
2336  as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2337  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2338$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2339if eval \${$3+:} false; then :
2340  $as_echo_n "(cached) " >&6
2341else
2342  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2343/* end confdefs.h.  */
2344$4
2345int
2346main ()
2347{
2348#ifndef $as_decl_name
2349#ifdef __cplusplus
2350  (void) $as_decl_use;
2351#else
2352  (void) $as_decl_name;
2353#endif
2354#endif
2355
2356  ;
2357  return 0;
2358}
2359_ACEOF
2360if ac_fn_c_try_compile "$LINENO"; then :
2361  eval "$3=yes"
2362else
2363  eval "$3=no"
2364fi
2365rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2366fi
2367eval ac_res=\$$3
2368	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2369$as_echo "$ac_res" >&6; }
2370  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2371
2372} # ac_fn_c_check_decl
2373
2374# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2375# ----------------------------------------------------
2376# Tries to find if the field MEMBER exists in type AGGR, after including
2377# INCLUDES, setting cache variable VAR accordingly.
2378ac_fn_c_check_member ()
2379{
2380  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2381  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2382$as_echo_n "checking for $2.$3... " >&6; }
2383if eval \${$4+:} false; then :
2384  $as_echo_n "(cached) " >&6
2385else
2386  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2387/* end confdefs.h.  */
2388$5
2389int
2390main ()
2391{
2392static $2 ac_aggr;
2393if (ac_aggr.$3)
2394return 0;
2395  ;
2396  return 0;
2397}
2398_ACEOF
2399if ac_fn_c_try_compile "$LINENO"; then :
2400  eval "$4=yes"
2401else
2402  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2403/* end confdefs.h.  */
2404$5
2405int
2406main ()
2407{
2408static $2 ac_aggr;
2409if (sizeof ac_aggr.$3)
2410return 0;
2411  ;
2412  return 0;
2413}
2414_ACEOF
2415if ac_fn_c_try_compile "$LINENO"; then :
2416  eval "$4=yes"
2417else
2418  eval "$4=no"
2419fi
2420rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2421fi
2422rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2423fi
2424eval ac_res=\$$4
2425	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2426$as_echo "$ac_res" >&6; }
2427  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2428
2429} # ac_fn_c_check_member
2430cat >config.log <<_ACEOF
2431This file contains any messages produced by compilers while
2432running configure, to aid debugging if configure makes a mistake.
2433
2434It was created by unbound $as_me 1.7.1, which was
2435generated by GNU Autoconf 2.69.  Invocation command line was
2436
2437  $ $0 $@
2438
2439_ACEOF
2440exec 5>>config.log
2441{
2442cat <<_ASUNAME
2443## --------- ##
2444## Platform. ##
2445## --------- ##
2446
2447hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2448uname -m = `(uname -m) 2>/dev/null || echo unknown`
2449uname -r = `(uname -r) 2>/dev/null || echo unknown`
2450uname -s = `(uname -s) 2>/dev/null || echo unknown`
2451uname -v = `(uname -v) 2>/dev/null || echo unknown`
2452
2453/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2454/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2455
2456/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2457/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2458/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2459/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2460/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2461/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2462/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2463
2464_ASUNAME
2465
2466as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2467for as_dir in $PATH
2468do
2469  IFS=$as_save_IFS
2470  test -z "$as_dir" && as_dir=.
2471    $as_echo "PATH: $as_dir"
2472  done
2473IFS=$as_save_IFS
2474
2475} >&5
2476
2477cat >&5 <<_ACEOF
2478
2479
2480## ----------- ##
2481## Core tests. ##
2482## ----------- ##
2483
2484_ACEOF
2485
2486
2487# Keep a trace of the command line.
2488# Strip out --no-create and --no-recursion so they do not pile up.
2489# Strip out --silent because we don't want to record it for future runs.
2490# Also quote any args containing shell meta-characters.
2491# Make two passes to allow for proper duplicate-argument suppression.
2492ac_configure_args=
2493ac_configure_args0=
2494ac_configure_args1=
2495ac_must_keep_next=false
2496for ac_pass in 1 2
2497do
2498  for ac_arg
2499  do
2500    case $ac_arg in
2501    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2502    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2503    | -silent | --silent | --silen | --sile | --sil)
2504      continue ;;
2505    *\'*)
2506      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2507    esac
2508    case $ac_pass in
2509    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2510    2)
2511      as_fn_append ac_configure_args1 " '$ac_arg'"
2512      if test $ac_must_keep_next = true; then
2513	ac_must_keep_next=false # Got value, back to normal.
2514      else
2515	case $ac_arg in
2516	  *=* | --config-cache | -C | -disable-* | --disable-* \
2517	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2518	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2519	  | -with-* | --with-* | -without-* | --without-* | --x)
2520	    case "$ac_configure_args0 " in
2521	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2522	    esac
2523	    ;;
2524	  -* ) ac_must_keep_next=true ;;
2525	esac
2526      fi
2527      as_fn_append ac_configure_args " '$ac_arg'"
2528      ;;
2529    esac
2530  done
2531done
2532{ ac_configure_args0=; unset ac_configure_args0;}
2533{ ac_configure_args1=; unset ac_configure_args1;}
2534
2535# When interrupted or exit'd, cleanup temporary files, and complete
2536# config.log.  We remove comments because anyway the quotes in there
2537# would cause problems or look ugly.
2538# WARNING: Use '\'' to represent an apostrophe within the trap.
2539# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2540trap 'exit_status=$?
2541  # Save into config.log some information that might help in debugging.
2542  {
2543    echo
2544
2545    $as_echo "## ---------------- ##
2546## Cache variables. ##
2547## ---------------- ##"
2548    echo
2549    # The following way of writing the cache mishandles newlines in values,
2550(
2551  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2552    eval ac_val=\$$ac_var
2553    case $ac_val in #(
2554    *${as_nl}*)
2555      case $ac_var in #(
2556      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2557$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2558      esac
2559      case $ac_var in #(
2560      _ | IFS | as_nl) ;; #(
2561      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2562      *) { eval $ac_var=; unset $ac_var;} ;;
2563      esac ;;
2564    esac
2565  done
2566  (set) 2>&1 |
2567    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2568    *${as_nl}ac_space=\ *)
2569      sed -n \
2570	"s/'\''/'\''\\\\'\'''\''/g;
2571	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2572      ;; #(
2573    *)
2574      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2575      ;;
2576    esac |
2577    sort
2578)
2579    echo
2580
2581    $as_echo "## ----------------- ##
2582## Output variables. ##
2583## ----------------- ##"
2584    echo
2585    for ac_var in $ac_subst_vars
2586    do
2587      eval ac_val=\$$ac_var
2588      case $ac_val in
2589      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2590      esac
2591      $as_echo "$ac_var='\''$ac_val'\''"
2592    done | sort
2593    echo
2594
2595    if test -n "$ac_subst_files"; then
2596      $as_echo "## ------------------- ##
2597## File substitutions. ##
2598## ------------------- ##"
2599      echo
2600      for ac_var in $ac_subst_files
2601      do
2602	eval ac_val=\$$ac_var
2603	case $ac_val in
2604	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2605	esac
2606	$as_echo "$ac_var='\''$ac_val'\''"
2607      done | sort
2608      echo
2609    fi
2610
2611    if test -s confdefs.h; then
2612      $as_echo "## ----------- ##
2613## confdefs.h. ##
2614## ----------- ##"
2615      echo
2616      cat confdefs.h
2617      echo
2618    fi
2619    test "$ac_signal" != 0 &&
2620      $as_echo "$as_me: caught signal $ac_signal"
2621    $as_echo "$as_me: exit $exit_status"
2622  } >&5
2623  rm -f core *.core core.conftest.* &&
2624    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2625    exit $exit_status
2626' 0
2627for ac_signal in 1 2 13 15; do
2628  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2629done
2630ac_signal=0
2631
2632# confdefs.h avoids OS command line length limits that DEFS can exceed.
2633rm -f -r conftest* confdefs.h
2634
2635$as_echo "/* confdefs.h */" > confdefs.h
2636
2637# Predefined preprocessor variables.
2638
2639cat >>confdefs.h <<_ACEOF
2640#define PACKAGE_NAME "$PACKAGE_NAME"
2641_ACEOF
2642
2643cat >>confdefs.h <<_ACEOF
2644#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2645_ACEOF
2646
2647cat >>confdefs.h <<_ACEOF
2648#define PACKAGE_VERSION "$PACKAGE_VERSION"
2649_ACEOF
2650
2651cat >>confdefs.h <<_ACEOF
2652#define PACKAGE_STRING "$PACKAGE_STRING"
2653_ACEOF
2654
2655cat >>confdefs.h <<_ACEOF
2656#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2657_ACEOF
2658
2659cat >>confdefs.h <<_ACEOF
2660#define PACKAGE_URL "$PACKAGE_URL"
2661_ACEOF
2662
2663
2664# Let the site file select an alternate cache file if it wants to.
2665# Prefer an explicitly selected file to automatically selected ones.
2666ac_site_file1=NONE
2667ac_site_file2=NONE
2668if test -n "$CONFIG_SITE"; then
2669  # We do not want a PATH search for config.site.
2670  case $CONFIG_SITE in #((
2671    -*)  ac_site_file1=./$CONFIG_SITE;;
2672    */*) ac_site_file1=$CONFIG_SITE;;
2673    *)   ac_site_file1=./$CONFIG_SITE;;
2674  esac
2675elif test "x$prefix" != xNONE; then
2676  ac_site_file1=$prefix/share/config.site
2677  ac_site_file2=$prefix/etc/config.site
2678else
2679  ac_site_file1=$ac_default_prefix/share/config.site
2680  ac_site_file2=$ac_default_prefix/etc/config.site
2681fi
2682for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2683do
2684  test "x$ac_site_file" = xNONE && continue
2685  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2686    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2687$as_echo "$as_me: loading site script $ac_site_file" >&6;}
2688    sed 's/^/| /' "$ac_site_file" >&5
2689    . "$ac_site_file" \
2690      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2691$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2692as_fn_error $? "failed to load site script $ac_site_file
2693See \`config.log' for more details" "$LINENO" 5; }
2694  fi
2695done
2696
2697if test -r "$cache_file"; then
2698  # Some versions of bash will fail to source /dev/null (special files
2699  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
2700  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2701    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2702$as_echo "$as_me: loading cache $cache_file" >&6;}
2703    case $cache_file in
2704      [\\/]* | ?:[\\/]* ) . "$cache_file";;
2705      *)                      . "./$cache_file";;
2706    esac
2707  fi
2708else
2709  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2710$as_echo "$as_me: creating cache $cache_file" >&6;}
2711  >$cache_file
2712fi
2713
2714# Check that the precious variables saved in the cache have kept the same
2715# value.
2716ac_cache_corrupted=false
2717for ac_var in $ac_precious_vars; do
2718  eval ac_old_set=\$ac_cv_env_${ac_var}_set
2719  eval ac_new_set=\$ac_env_${ac_var}_set
2720  eval ac_old_val=\$ac_cv_env_${ac_var}_value
2721  eval ac_new_val=\$ac_env_${ac_var}_value
2722  case $ac_old_set,$ac_new_set in
2723    set,)
2724      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2725$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2726      ac_cache_corrupted=: ;;
2727    ,set)
2728      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2729$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2730      ac_cache_corrupted=: ;;
2731    ,);;
2732    *)
2733      if test "x$ac_old_val" != "x$ac_new_val"; then
2734	# differences in whitespace do not lead to failure.
2735	ac_old_val_w=`echo x $ac_old_val`
2736	ac_new_val_w=`echo x $ac_new_val`
2737	if test "$ac_old_val_w" != "$ac_new_val_w"; then
2738	  { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2739$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2740	  ac_cache_corrupted=:
2741	else
2742	  { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2743$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2744	  eval $ac_var=\$ac_old_val
2745	fi
2746	{ $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
2747$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
2748	{ $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
2749$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
2750      fi;;
2751  esac
2752  # Pass precious variables to config.status.
2753  if test "$ac_new_set" = set; then
2754    case $ac_new_val in
2755    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2756    *) ac_arg=$ac_var=$ac_new_val ;;
2757    esac
2758    case " $ac_configure_args " in
2759      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
2760      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2761    esac
2762  fi
2763done
2764if $ac_cache_corrupted; then
2765  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2766$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2767  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2768$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2769  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2770fi
2771## -------------------- ##
2772## Main body of script. ##
2773## -------------------- ##
2774
2775ac_ext=c
2776ac_cpp='$CPP $CPPFLAGS'
2777ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2778ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2779ac_compiler_gnu=$ac_cv_c_compiler_gnu
2780
2781
2782UNBOUND_VERSION_MAJOR=1
2783
2784UNBOUND_VERSION_MINOR=7
2785
2786UNBOUND_VERSION_MICRO=1
2787
2788
2789LIBUNBOUND_CURRENT=7
2790LIBUNBOUND_REVISION=9
2791LIBUNBOUND_AGE=5
2792# 1.0.0 had 0:12:0
2793# 1.0.1 had 0:13:0
2794# 1.0.2 had 0:14:0
2795# 1.1.0 had 0:15:0
2796# 1.1.1 had 0:16:0
2797# 1.2.0 had 0:17:0
2798# 1.2.1 had 0:18:0
2799# 1.3.0 had 1:0:0   # ub_cancel and -export-symbols.
2800# 1.3.1 had 1:1:0
2801# 1.3.2 had 1:2:0
2802# 1.3.3 had 1:3:0
2803# 1.3.4 had 1:4:0
2804# 1.4.0-snapshots had 1:5:0
2805# 1.4.0 had 1:5:0 (not 2:0:0)   # ub_result.why_bogus
2806# 1.4.1 had 2:1:0
2807# 1.4.2 had 2:2:0
2808# 1.4.3 had 2:3:0
2809# 1.4.4 had 2:4:0
2810# 1.4.5 had 2:5:0
2811# 1.4.6 had 2:6:0
2812# 1.4.7 had 2:7:0
2813# 1.4.8 had 2:8:0
2814# 1.4.9 had 2:9:0
2815# 1.4.10 had 2:10:0
2816# 1.4.11 had 2:11:0
2817# 1.4.12 had 2:12:0
2818# 1.4.13 had 2:13:0
2819# and 1.4.13p1 and 1.4.13.p2
2820# 1.4.14 had 2:14:0
2821# 1.4.15 had 3:0:1 # adds ub_version()
2822# 1.4.16 had 3:1:1
2823# 1.4.17 had 3:2:1
2824# 1.4.18 had 3:3:1
2825# 1.4.19 had 3:4:1
2826# 1.4.20 had 4:0:2 # adds libunbound.ttl # but shipped 3:5:1
2827# 1.4.21 had 4:1:2
2828# 1.4.22 had 4:1:2
2829# 1.5.0 had 5:3:3 # adds ub_ctx_add_ta_autr
2830# 1.5.1 had 5:3:3
2831# 1.5.2 had 5:5:3
2832# 1.5.3 had 5:6:3
2833# 1.5.4 had 5:7:3
2834# 1.5.5 had 5:8:3
2835# 1.5.6 had 5:9:3
2836# 1.5.7 had 5:10:3
2837# 1.5.8 had 6:0:4 # adds ub_ctx_set_stub
2838# 1.5.9 had 6:1:4
2839# 1.5.10 had 6:2:4
2840# 1.6.0 had 6:3:4
2841# 1.6.1 had 7:0:5 # ub_callback_t typedef renamed to ub_callback_type
2842# 1.6.2 had 7:1:5
2843# 1.6.3 had 7:2:5
2844# 1.6.4 had 7:3:5
2845# 1.6.5 had 7:4:5
2846# 1.6.6 had 7:5:5
2847# 1.6.7 had 7:6:5
2848# 1.6.8 had 7:7:5
2849# 1.7.0 had 7:8:5
2850# 1.7.1 had 7:9:5
2851
2852#   Current  -- the number of the binary API that we're implementing
2853#   Revision -- which iteration of the implementation of the binary
2854#               API are we supplying?
2855#   Age      -- How many previous binary API versions do we also
2856#               support?
2857#
2858# If we release a new version that does not change the binary API,
2859# increment Revision.
2860#
2861# If we release a new version that changes the binary API, but does
2862# not break programs compiled against the old binary API, increment
2863# Current and Age.  Set Revision to 0, since this is the first
2864# implementation of the new API.
2865#
2866# Otherwise, we're changing the binary API and breaking backward
2867# compatibility with old binaries.  Increment Current.  Set Age to 0,
2868# since we're backward compatible with no previous APIs.  Set Revision
2869# to 0 too.
2870
2871
2872
2873
2874CFLAGS="$CFLAGS"
2875ac_ext=c
2876ac_cpp='$CPP $CPPFLAGS'
2877ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2878ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2879ac_compiler_gnu=$ac_cv_c_compiler_gnu
2880if test -n "$ac_tool_prefix"; then
2881  # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2882set dummy ${ac_tool_prefix}gcc; ac_word=$2
2883{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2884$as_echo_n "checking for $ac_word... " >&6; }
2885if ${ac_cv_prog_CC+:} false; then :
2886  $as_echo_n "(cached) " >&6
2887else
2888  if test -n "$CC"; then
2889  ac_cv_prog_CC="$CC" # Let the user override the test.
2890else
2891as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2892for as_dir in $PATH
2893do
2894  IFS=$as_save_IFS
2895  test -z "$as_dir" && as_dir=.
2896    for ac_exec_ext in '' $ac_executable_extensions; do
2897  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2898    ac_cv_prog_CC="${ac_tool_prefix}gcc"
2899    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2900    break 2
2901  fi
2902done
2903  done
2904IFS=$as_save_IFS
2905
2906fi
2907fi
2908CC=$ac_cv_prog_CC
2909if test -n "$CC"; then
2910  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2911$as_echo "$CC" >&6; }
2912else
2913  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2914$as_echo "no" >&6; }
2915fi
2916
2917
2918fi
2919if test -z "$ac_cv_prog_CC"; then
2920  ac_ct_CC=$CC
2921  # Extract the first word of "gcc", so it can be a program name with args.
2922set dummy gcc; ac_word=$2
2923{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2924$as_echo_n "checking for $ac_word... " >&6; }
2925if ${ac_cv_prog_ac_ct_CC+:} false; then :
2926  $as_echo_n "(cached) " >&6
2927else
2928  if test -n "$ac_ct_CC"; then
2929  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2930else
2931as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2932for as_dir in $PATH
2933do
2934  IFS=$as_save_IFS
2935  test -z "$as_dir" && as_dir=.
2936    for ac_exec_ext in '' $ac_executable_extensions; do
2937  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2938    ac_cv_prog_ac_ct_CC="gcc"
2939    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2940    break 2
2941  fi
2942done
2943  done
2944IFS=$as_save_IFS
2945
2946fi
2947fi
2948ac_ct_CC=$ac_cv_prog_ac_ct_CC
2949if test -n "$ac_ct_CC"; then
2950  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
2951$as_echo "$ac_ct_CC" >&6; }
2952else
2953  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2954$as_echo "no" >&6; }
2955fi
2956
2957  if test "x$ac_ct_CC" = x; then
2958    CC=""
2959  else
2960    case $cross_compiling:$ac_tool_warned in
2961yes:)
2962{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
2963$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
2964ac_tool_warned=yes ;;
2965esac
2966    CC=$ac_ct_CC
2967  fi
2968else
2969  CC="$ac_cv_prog_CC"
2970fi
2971
2972if test -z "$CC"; then
2973          if test -n "$ac_tool_prefix"; then
2974    # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
2975set dummy ${ac_tool_prefix}cc; ac_word=$2
2976{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2977$as_echo_n "checking for $ac_word... " >&6; }
2978if ${ac_cv_prog_CC+:} false; then :
2979  $as_echo_n "(cached) " >&6
2980else
2981  if test -n "$CC"; then
2982  ac_cv_prog_CC="$CC" # Let the user override the test.
2983else
2984as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2985for as_dir in $PATH
2986do
2987  IFS=$as_save_IFS
2988  test -z "$as_dir" && as_dir=.
2989    for ac_exec_ext in '' $ac_executable_extensions; do
2990  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2991    ac_cv_prog_CC="${ac_tool_prefix}cc"
2992    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2993    break 2
2994  fi
2995done
2996  done
2997IFS=$as_save_IFS
2998
2999fi
3000fi
3001CC=$ac_cv_prog_CC
3002if test -n "$CC"; then
3003  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3004$as_echo "$CC" >&6; }
3005else
3006  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3007$as_echo "no" >&6; }
3008fi
3009
3010
3011  fi
3012fi
3013if test -z "$CC"; then
3014  # Extract the first word of "cc", so it can be a program name with args.
3015set dummy cc; ac_word=$2
3016{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3017$as_echo_n "checking for $ac_word... " >&6; }
3018if ${ac_cv_prog_CC+:} false; then :
3019  $as_echo_n "(cached) " >&6
3020else
3021  if test -n "$CC"; then
3022  ac_cv_prog_CC="$CC" # Let the user override the test.
3023else
3024  ac_prog_rejected=no
3025as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3026for as_dir in $PATH
3027do
3028  IFS=$as_save_IFS
3029  test -z "$as_dir" && as_dir=.
3030    for ac_exec_ext in '' $ac_executable_extensions; do
3031  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3032    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3033       ac_prog_rejected=yes
3034       continue
3035     fi
3036    ac_cv_prog_CC="cc"
3037    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3038    break 2
3039  fi
3040done
3041  done
3042IFS=$as_save_IFS
3043
3044if test $ac_prog_rejected = yes; then
3045  # We found a bogon in the path, so make sure we never use it.
3046  set dummy $ac_cv_prog_CC
3047  shift
3048  if test $# != 0; then
3049    # We chose a different compiler from the bogus one.
3050    # However, it has the same basename, so the bogon will be chosen
3051    # first if we set CC to just the basename; use the full file name.
3052    shift
3053    ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
3054  fi
3055fi
3056fi
3057fi
3058CC=$ac_cv_prog_CC
3059if test -n "$CC"; then
3060  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3061$as_echo "$CC" >&6; }
3062else
3063  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3064$as_echo "no" >&6; }
3065fi
3066
3067
3068fi
3069if test -z "$CC"; then
3070  if test -n "$ac_tool_prefix"; then
3071  for ac_prog in cl.exe
3072  do
3073    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3074set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3075{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3076$as_echo_n "checking for $ac_word... " >&6; }
3077if ${ac_cv_prog_CC+:} false; then :
3078  $as_echo_n "(cached) " >&6
3079else
3080  if test -n "$CC"; then
3081  ac_cv_prog_CC="$CC" # Let the user override the test.
3082else
3083as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3084for as_dir in $PATH
3085do
3086  IFS=$as_save_IFS
3087  test -z "$as_dir" && as_dir=.
3088    for ac_exec_ext in '' $ac_executable_extensions; do
3089  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3090    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
3091    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3092    break 2
3093  fi
3094done
3095  done
3096IFS=$as_save_IFS
3097
3098fi
3099fi
3100CC=$ac_cv_prog_CC
3101if test -n "$CC"; then
3102  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3103$as_echo "$CC" >&6; }
3104else
3105  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3106$as_echo "no" >&6; }
3107fi
3108
3109
3110    test -n "$CC" && break
3111  done
3112fi
3113if test -z "$CC"; then
3114  ac_ct_CC=$CC
3115  for ac_prog in cl.exe
3116do
3117  # Extract the first word of "$ac_prog", so it can be a program name with args.
3118set dummy $ac_prog; ac_word=$2
3119{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3120$as_echo_n "checking for $ac_word... " >&6; }
3121if ${ac_cv_prog_ac_ct_CC+:} false; then :
3122  $as_echo_n "(cached) " >&6
3123else
3124  if test -n "$ac_ct_CC"; then
3125  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3126else
3127as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3128for as_dir in $PATH
3129do
3130  IFS=$as_save_IFS
3131  test -z "$as_dir" && as_dir=.
3132    for ac_exec_ext in '' $ac_executable_extensions; do
3133  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3134    ac_cv_prog_ac_ct_CC="$ac_prog"
3135    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3136    break 2
3137  fi
3138done
3139  done
3140IFS=$as_save_IFS
3141
3142fi
3143fi
3144ac_ct_CC=$ac_cv_prog_ac_ct_CC
3145if test -n "$ac_ct_CC"; then
3146  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3147$as_echo "$ac_ct_CC" >&6; }
3148else
3149  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3150$as_echo "no" >&6; }
3151fi
3152
3153
3154  test -n "$ac_ct_CC" && break
3155done
3156
3157  if test "x$ac_ct_CC" = x; then
3158    CC=""
3159  else
3160    case $cross_compiling:$ac_tool_warned in
3161yes:)
3162{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3163$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3164ac_tool_warned=yes ;;
3165esac
3166    CC=$ac_ct_CC
3167  fi
3168fi
3169
3170fi
3171
3172
3173test -z "$CC" && { { $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 $? "no acceptable C compiler found in \$PATH
3176See \`config.log' for more details" "$LINENO" 5; }
3177
3178# Provide some information about the compiler.
3179$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3180set X $ac_compile
3181ac_compiler=$2
3182for ac_option in --version -v -V -qversion; do
3183  { { ac_try="$ac_compiler $ac_option >&5"
3184case "(($ac_try" in
3185  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3186  *) ac_try_echo=$ac_try;;
3187esac
3188eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3189$as_echo "$ac_try_echo"; } >&5
3190  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
3191  ac_status=$?
3192  if test -s conftest.err; then
3193    sed '10a\
3194... rest of stderr output deleted ...
3195         10q' conftest.err >conftest.er1
3196    cat conftest.er1 >&5
3197  fi
3198  rm -f conftest.er1 conftest.err
3199  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3200  test $ac_status = 0; }
3201done
3202
3203cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3204/* end confdefs.h.  */
3205
3206int
3207main ()
3208{
3209
3210  ;
3211  return 0;
3212}
3213_ACEOF
3214ac_clean_files_save=$ac_clean_files
3215ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
3216# Try to create an executable without -o first, disregard a.out.
3217# It will help us diagnose broken compilers, and finding out an intuition
3218# of exeext.
3219{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3220$as_echo_n "checking whether the C compiler works... " >&6; }
3221ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3222
3223# The possible output files:
3224ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3225
3226ac_rmfiles=
3227for ac_file in $ac_files
3228do
3229  case $ac_file in
3230    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3231    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3232  esac
3233done
3234rm -f $ac_rmfiles
3235
3236if { { ac_try="$ac_link_default"
3237case "(($ac_try" in
3238  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3239  *) ac_try_echo=$ac_try;;
3240esac
3241eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3242$as_echo "$ac_try_echo"; } >&5
3243  (eval "$ac_link_default") 2>&5
3244  ac_status=$?
3245  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3246  test $ac_status = 0; }; then :
3247  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3248# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3249# in a Makefile.  We should not override ac_cv_exeext if it was cached,
3250# so that the user can short-circuit this test for compilers unknown to
3251# Autoconf.
3252for ac_file in $ac_files ''
3253do
3254  test -f "$ac_file" || continue
3255  case $ac_file in
3256    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
3257	;;
3258    [ab].out )
3259	# We found the default executable, but exeext='' is most
3260	# certainly right.
3261	break;;
3262    *.* )
3263	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
3264	then :; else
3265	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3266	fi
3267	# We set ac_cv_exeext here because the later test for it is not
3268	# safe: cross compilers may not add the suffix if given an `-o'
3269	# argument, so we may need to know it at that point already.
3270	# Even if this section looks crufty: it has the advantage of
3271	# actually working.
3272	break;;
3273    * )
3274	break;;
3275  esac
3276done
3277test "$ac_cv_exeext" = no && ac_cv_exeext=
3278
3279else
3280  ac_file=''
3281fi
3282if test -z "$ac_file"; then :
3283  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3284$as_echo "no" >&6; }
3285$as_echo "$as_me: failed program was:" >&5
3286sed 's/^/| /' conftest.$ac_ext >&5
3287
3288{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3289$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3290as_fn_error 77 "C compiler cannot create executables
3291See \`config.log' for more details" "$LINENO" 5; }
3292else
3293  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3294$as_echo "yes" >&6; }
3295fi
3296{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3297$as_echo_n "checking for C compiler default output file name... " >&6; }
3298{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3299$as_echo "$ac_file" >&6; }
3300ac_exeext=$ac_cv_exeext
3301
3302rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
3303ac_clean_files=$ac_clean_files_save
3304{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3305$as_echo_n "checking for suffix of executables... " >&6; }
3306if { { ac_try="$ac_link"
3307case "(($ac_try" in
3308  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3309  *) ac_try_echo=$ac_try;;
3310esac
3311eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3312$as_echo "$ac_try_echo"; } >&5
3313  (eval "$ac_link") 2>&5
3314  ac_status=$?
3315  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3316  test $ac_status = 0; }; then :
3317  # If both `conftest.exe' and `conftest' are `present' (well, observable)
3318# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
3319# work properly (i.e., refer to `conftest.exe'), while it won't with
3320# `rm'.
3321for ac_file in conftest.exe conftest conftest.*; do
3322  test -f "$ac_file" || continue
3323  case $ac_file in
3324    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3325    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3326	  break;;
3327    * ) break;;
3328  esac
3329done
3330else
3331  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3332$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3333as_fn_error $? "cannot compute suffix of executables: cannot compile and link
3334See \`config.log' for more details" "$LINENO" 5; }
3335fi
3336rm -f conftest conftest$ac_cv_exeext
3337{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3338$as_echo "$ac_cv_exeext" >&6; }
3339
3340rm -f conftest.$ac_ext
3341EXEEXT=$ac_cv_exeext
3342ac_exeext=$EXEEXT
3343cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3344/* end confdefs.h.  */
3345#include <stdio.h>
3346int
3347main ()
3348{
3349FILE *f = fopen ("conftest.out", "w");
3350 return ferror (f) || fclose (f) != 0;
3351
3352  ;
3353  return 0;
3354}
3355_ACEOF
3356ac_clean_files="$ac_clean_files conftest.out"
3357# Check that the compiler produces executables we can run.  If not, either
3358# the compiler is broken, or we cross compile.
3359{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3360$as_echo_n "checking whether we are cross compiling... " >&6; }
3361if test "$cross_compiling" != yes; then
3362  { { ac_try="$ac_link"
3363case "(($ac_try" in
3364  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3365  *) ac_try_echo=$ac_try;;
3366esac
3367eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3368$as_echo "$ac_try_echo"; } >&5
3369  (eval "$ac_link") 2>&5
3370  ac_status=$?
3371  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3372  test $ac_status = 0; }
3373  if { ac_try='./conftest$ac_cv_exeext'
3374  { { case "(($ac_try" in
3375  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3376  *) ac_try_echo=$ac_try;;
3377esac
3378eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3379$as_echo "$ac_try_echo"; } >&5
3380  (eval "$ac_try") 2>&5
3381  ac_status=$?
3382  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3383  test $ac_status = 0; }; }; then
3384    cross_compiling=no
3385  else
3386    if test "$cross_compiling" = maybe; then
3387	cross_compiling=yes
3388    else
3389	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3390$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3391as_fn_error $? "cannot run C compiled programs.
3392If you meant to cross compile, use \`--host'.
3393See \`config.log' for more details" "$LINENO" 5; }
3394    fi
3395  fi
3396fi
3397{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3398$as_echo "$cross_compiling" >&6; }
3399
3400rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
3401ac_clean_files=$ac_clean_files_save
3402{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3403$as_echo_n "checking for suffix of object files... " >&6; }
3404if ${ac_cv_objext+:} false; then :
3405  $as_echo_n "(cached) " >&6
3406else
3407  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3408/* end confdefs.h.  */
3409
3410int
3411main ()
3412{
3413
3414  ;
3415  return 0;
3416}
3417_ACEOF
3418rm -f conftest.o conftest.obj
3419if { { ac_try="$ac_compile"
3420case "(($ac_try" in
3421  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3422  *) ac_try_echo=$ac_try;;
3423esac
3424eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3425$as_echo "$ac_try_echo"; } >&5
3426  (eval "$ac_compile") 2>&5
3427  ac_status=$?
3428  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3429  test $ac_status = 0; }; then :
3430  for ac_file in conftest.o conftest.obj conftest.*; do
3431  test -f "$ac_file" || continue;
3432  case $ac_file in
3433    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
3434    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3435       break;;
3436  esac
3437done
3438else
3439  $as_echo "$as_me: failed program was:" >&5
3440sed 's/^/| /' conftest.$ac_ext >&5
3441
3442{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3443$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3444as_fn_error $? "cannot compute suffix of object files: cannot compile
3445See \`config.log' for more details" "$LINENO" 5; }
3446fi
3447rm -f conftest.$ac_cv_objext conftest.$ac_ext
3448fi
3449{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3450$as_echo "$ac_cv_objext" >&6; }
3451OBJEXT=$ac_cv_objext
3452ac_objext=$OBJEXT
3453{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
3454$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
3455if ${ac_cv_c_compiler_gnu+:} false; then :
3456  $as_echo_n "(cached) " >&6
3457else
3458  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3459/* end confdefs.h.  */
3460
3461int
3462main ()
3463{
3464#ifndef __GNUC__
3465       choke me
3466#endif
3467
3468  ;
3469  return 0;
3470}
3471_ACEOF
3472if ac_fn_c_try_compile "$LINENO"; then :
3473  ac_compiler_gnu=yes
3474else
3475  ac_compiler_gnu=no
3476fi
3477rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3478ac_cv_c_compiler_gnu=$ac_compiler_gnu
3479
3480fi
3481{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
3482$as_echo "$ac_cv_c_compiler_gnu" >&6; }
3483if test $ac_compiler_gnu = yes; then
3484  GCC=yes
3485else
3486  GCC=
3487fi
3488ac_test_CFLAGS=${CFLAGS+set}
3489ac_save_CFLAGS=$CFLAGS
3490{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
3491$as_echo_n "checking whether $CC accepts -g... " >&6; }
3492if ${ac_cv_prog_cc_g+:} false; then :
3493  $as_echo_n "(cached) " >&6
3494else
3495  ac_save_c_werror_flag=$ac_c_werror_flag
3496   ac_c_werror_flag=yes
3497   ac_cv_prog_cc_g=no
3498   CFLAGS="-g"
3499   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3500/* end confdefs.h.  */
3501
3502int
3503main ()
3504{
3505
3506  ;
3507  return 0;
3508}
3509_ACEOF
3510if ac_fn_c_try_compile "$LINENO"; then :
3511  ac_cv_prog_cc_g=yes
3512else
3513  CFLAGS=""
3514      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3515/* end confdefs.h.  */
3516
3517int
3518main ()
3519{
3520
3521  ;
3522  return 0;
3523}
3524_ACEOF
3525if ac_fn_c_try_compile "$LINENO"; then :
3526
3527else
3528  ac_c_werror_flag=$ac_save_c_werror_flag
3529	 CFLAGS="-g"
3530	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3531/* end confdefs.h.  */
3532
3533int
3534main ()
3535{
3536
3537  ;
3538  return 0;
3539}
3540_ACEOF
3541if ac_fn_c_try_compile "$LINENO"; then :
3542  ac_cv_prog_cc_g=yes
3543fi
3544rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3545fi
3546rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3547fi
3548rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3549   ac_c_werror_flag=$ac_save_c_werror_flag
3550fi
3551{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
3552$as_echo "$ac_cv_prog_cc_g" >&6; }
3553if test "$ac_test_CFLAGS" = set; then
3554  CFLAGS=$ac_save_CFLAGS
3555elif test $ac_cv_prog_cc_g = yes; then
3556  if test "$GCC" = yes; then
3557    CFLAGS="-g -O2"
3558  else
3559    CFLAGS="-g"
3560  fi
3561else
3562  if test "$GCC" = yes; then
3563    CFLAGS="-O2"
3564  else
3565    CFLAGS=
3566  fi
3567fi
3568{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
3569$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
3570if ${ac_cv_prog_cc_c89+:} false; then :
3571  $as_echo_n "(cached) " >&6
3572else
3573  ac_cv_prog_cc_c89=no
3574ac_save_CC=$CC
3575cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3576/* end confdefs.h.  */
3577#include <stdarg.h>
3578#include <stdio.h>
3579struct stat;
3580/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
3581struct buf { int x; };
3582FILE * (*rcsopen) (struct buf *, struct stat *, int);
3583static char *e (p, i)
3584     char **p;
3585     int i;
3586{
3587  return p[i];
3588}
3589static char *f (char * (*g) (char **, int), char **p, ...)
3590{
3591  char *s;
3592  va_list v;
3593  va_start (v,p);
3594  s = g (p, va_arg (v,int));
3595  va_end (v);
3596  return s;
3597}
3598
3599/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
3600   function prototypes and stuff, but not '\xHH' hex character constants.
3601   These don't provoke an error unfortunately, instead are silently treated
3602   as 'x'.  The following induces an error, until -std is added to get
3603   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
3604   array size at least.  It's necessary to write '\x00'==0 to get something
3605   that's true only with -std.  */
3606int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3607
3608/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3609   inside strings and character constants.  */
3610#define FOO(x) 'x'
3611int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3612
3613int test (int i, double x);
3614struct s1 {int (*f) (int a);};
3615struct s2 {int (*f) (double a);};
3616int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3617int argc;
3618char **argv;
3619int
3620main ()
3621{
3622return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
3623  ;
3624  return 0;
3625}
3626_ACEOF
3627for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3628	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
3629do
3630  CC="$ac_save_CC $ac_arg"
3631  if ac_fn_c_try_compile "$LINENO"; then :
3632  ac_cv_prog_cc_c89=$ac_arg
3633fi
3634rm -f core conftest.err conftest.$ac_objext
3635  test "x$ac_cv_prog_cc_c89" != "xno" && break
3636done
3637rm -f conftest.$ac_ext
3638CC=$ac_save_CC
3639
3640fi
3641# AC_CACHE_VAL
3642case "x$ac_cv_prog_cc_c89" in
3643  x)
3644    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
3645$as_echo "none needed" >&6; } ;;
3646  xno)
3647    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
3648$as_echo "unsupported" >&6; } ;;
3649  *)
3650    CC="$CC $ac_cv_prog_cc_c89"
3651    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
3652$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
3653esac
3654if test "x$ac_cv_prog_cc_c89" != xno; then :
3655
3656fi
3657
3658ac_ext=c
3659ac_cpp='$CPP $CPPFLAGS'
3660ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3661ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3662ac_compiler_gnu=$ac_cv_c_compiler_gnu
3663
3664
3665ac_ext=c
3666ac_cpp='$CPP $CPPFLAGS'
3667ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3668ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3669ac_compiler_gnu=$ac_cv_c_compiler_gnu
3670{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
3671$as_echo_n "checking how to run the C preprocessor... " >&6; }
3672# On Suns, sometimes $CPP names a directory.
3673if test -n "$CPP" && test -d "$CPP"; then
3674  CPP=
3675fi
3676if test -z "$CPP"; then
3677  if ${ac_cv_prog_CPP+:} false; then :
3678  $as_echo_n "(cached) " >&6
3679else
3680      # Double quotes because CPP needs to be expanded
3681    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3682    do
3683      ac_preproc_ok=false
3684for ac_c_preproc_warn_flag in '' yes
3685do
3686  # Use a header file that comes with gcc, so configuring glibc
3687  # with a fresh cross-compiler works.
3688  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3689  # <limits.h> exists even on freestanding compilers.
3690  # On the NeXT, cc -E runs the code through the compiler's parser,
3691  # not just through cpp. "Syntax error" is here to catch this case.
3692  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3693/* end confdefs.h.  */
3694#ifdef __STDC__
3695# include <limits.h>
3696#else
3697# include <assert.h>
3698#endif
3699		     Syntax error
3700_ACEOF
3701if ac_fn_c_try_cpp "$LINENO"; then :
3702
3703else
3704  # Broken: fails on valid input.
3705continue
3706fi
3707rm -f conftest.err conftest.i conftest.$ac_ext
3708
3709  # OK, works on sane cases.  Now check whether nonexistent headers
3710  # can be detected and how.
3711  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3712/* end confdefs.h.  */
3713#include <ac_nonexistent.h>
3714_ACEOF
3715if ac_fn_c_try_cpp "$LINENO"; then :
3716  # Broken: success on invalid input.
3717continue
3718else
3719  # Passes both tests.
3720ac_preproc_ok=:
3721break
3722fi
3723rm -f conftest.err conftest.i conftest.$ac_ext
3724
3725done
3726# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3727rm -f conftest.i conftest.err conftest.$ac_ext
3728if $ac_preproc_ok; then :
3729  break
3730fi
3731
3732    done
3733    ac_cv_prog_CPP=$CPP
3734
3735fi
3736  CPP=$ac_cv_prog_CPP
3737else
3738  ac_cv_prog_CPP=$CPP
3739fi
3740{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
3741$as_echo "$CPP" >&6; }
3742ac_preproc_ok=false
3743for ac_c_preproc_warn_flag in '' yes
3744do
3745  # Use a header file that comes with gcc, so configuring glibc
3746  # with a fresh cross-compiler works.
3747  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3748  # <limits.h> exists even on freestanding compilers.
3749  # On the NeXT, cc -E runs the code through the compiler's parser,
3750  # not just through cpp. "Syntax error" is here to catch this case.
3751  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3752/* end confdefs.h.  */
3753#ifdef __STDC__
3754# include <limits.h>
3755#else
3756# include <assert.h>
3757#endif
3758		     Syntax error
3759_ACEOF
3760if ac_fn_c_try_cpp "$LINENO"; then :
3761
3762else
3763  # Broken: fails on valid input.
3764continue
3765fi
3766rm -f conftest.err conftest.i conftest.$ac_ext
3767
3768  # OK, works on sane cases.  Now check whether nonexistent headers
3769  # can be detected and how.
3770  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3771/* end confdefs.h.  */
3772#include <ac_nonexistent.h>
3773_ACEOF
3774if ac_fn_c_try_cpp "$LINENO"; then :
3775  # Broken: success on invalid input.
3776continue
3777else
3778  # Passes both tests.
3779ac_preproc_ok=:
3780break
3781fi
3782rm -f conftest.err conftest.i conftest.$ac_ext
3783
3784done
3785# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3786rm -f conftest.i conftest.err conftest.$ac_ext
3787if $ac_preproc_ok; then :
3788
3789else
3790  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3791$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3792as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
3793See \`config.log' for more details" "$LINENO" 5; }
3794fi
3795
3796ac_ext=c
3797ac_cpp='$CPP $CPPFLAGS'
3798ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3799ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3800ac_compiler_gnu=$ac_cv_c_compiler_gnu
3801
3802
3803{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
3804$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
3805if ${ac_cv_path_GREP+:} false; then :
3806  $as_echo_n "(cached) " >&6
3807else
3808  if test -z "$GREP"; then
3809  ac_path_GREP_found=false
3810  # Loop through the user's path and test for each of PROGNAME-LIST
3811  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3812for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3813do
3814  IFS=$as_save_IFS
3815  test -z "$as_dir" && as_dir=.
3816    for ac_prog in grep ggrep; do
3817    for ac_exec_ext in '' $ac_executable_extensions; do
3818      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
3819      as_fn_executable_p "$ac_path_GREP" || continue
3820# Check for GNU ac_path_GREP and select it if it is found.
3821  # Check for GNU $ac_path_GREP
3822case `"$ac_path_GREP" --version 2>&1` in
3823*GNU*)
3824  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
3825*)
3826  ac_count=0
3827  $as_echo_n 0123456789 >"conftest.in"
3828  while :
3829  do
3830    cat "conftest.in" "conftest.in" >"conftest.tmp"
3831    mv "conftest.tmp" "conftest.in"
3832    cp "conftest.in" "conftest.nl"
3833    $as_echo 'GREP' >> "conftest.nl"
3834    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3835    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3836    as_fn_arith $ac_count + 1 && ac_count=$as_val
3837    if test $ac_count -gt ${ac_path_GREP_max-0}; then
3838      # Best one so far, save it but keep looking for a better one
3839      ac_cv_path_GREP="$ac_path_GREP"
3840      ac_path_GREP_max=$ac_count
3841    fi
3842    # 10*(2^10) chars as input seems more than enough
3843    test $ac_count -gt 10 && break
3844  done
3845  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3846esac
3847
3848      $ac_path_GREP_found && break 3
3849    done
3850  done
3851  done
3852IFS=$as_save_IFS
3853  if test -z "$ac_cv_path_GREP"; then
3854    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
3855  fi
3856else
3857  ac_cv_path_GREP=$GREP
3858fi
3859
3860fi
3861{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
3862$as_echo "$ac_cv_path_GREP" >&6; }
3863 GREP="$ac_cv_path_GREP"
3864
3865
3866{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
3867$as_echo_n "checking for egrep... " >&6; }
3868if ${ac_cv_path_EGREP+:} false; then :
3869  $as_echo_n "(cached) " >&6
3870else
3871  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
3872   then ac_cv_path_EGREP="$GREP -E"
3873   else
3874     if test -z "$EGREP"; then
3875  ac_path_EGREP_found=false
3876  # Loop through the user's path and test for each of PROGNAME-LIST
3877  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3878for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3879do
3880  IFS=$as_save_IFS
3881  test -z "$as_dir" && as_dir=.
3882    for ac_prog in egrep; do
3883    for ac_exec_ext in '' $ac_executable_extensions; do
3884      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
3885      as_fn_executable_p "$ac_path_EGREP" || continue
3886# Check for GNU ac_path_EGREP and select it if it is found.
3887  # Check for GNU $ac_path_EGREP
3888case `"$ac_path_EGREP" --version 2>&1` in
3889*GNU*)
3890  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
3891*)
3892  ac_count=0
3893  $as_echo_n 0123456789 >"conftest.in"
3894  while :
3895  do
3896    cat "conftest.in" "conftest.in" >"conftest.tmp"
3897    mv "conftest.tmp" "conftest.in"
3898    cp "conftest.in" "conftest.nl"
3899    $as_echo 'EGREP' >> "conftest.nl"
3900    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3901    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3902    as_fn_arith $ac_count + 1 && ac_count=$as_val
3903    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
3904      # Best one so far, save it but keep looking for a better one
3905      ac_cv_path_EGREP="$ac_path_EGREP"
3906      ac_path_EGREP_max=$ac_count
3907    fi
3908    # 10*(2^10) chars as input seems more than enough
3909    test $ac_count -gt 10 && break
3910  done
3911  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3912esac
3913
3914      $ac_path_EGREP_found && break 3
3915    done
3916  done
3917  done
3918IFS=$as_save_IFS
3919  if test -z "$ac_cv_path_EGREP"; then
3920    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
3921  fi
3922else
3923  ac_cv_path_EGREP=$EGREP
3924fi
3925
3926   fi
3927fi
3928{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
3929$as_echo "$ac_cv_path_EGREP" >&6; }
3930 EGREP="$ac_cv_path_EGREP"
3931
3932
3933{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
3934$as_echo_n "checking for ANSI C header files... " >&6; }
3935if ${ac_cv_header_stdc+:} false; then :
3936  $as_echo_n "(cached) " >&6
3937else
3938  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3939/* end confdefs.h.  */
3940#include <stdlib.h>
3941#include <stdarg.h>
3942#include <string.h>
3943#include <float.h>
3944
3945int
3946main ()
3947{
3948
3949  ;
3950  return 0;
3951}
3952_ACEOF
3953if ac_fn_c_try_compile "$LINENO"; then :
3954  ac_cv_header_stdc=yes
3955else
3956  ac_cv_header_stdc=no
3957fi
3958rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3959
3960if test $ac_cv_header_stdc = yes; then
3961  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
3962  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3963/* end confdefs.h.  */
3964#include <string.h>
3965
3966_ACEOF
3967if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3968  $EGREP "memchr" >/dev/null 2>&1; then :
3969
3970else
3971  ac_cv_header_stdc=no
3972fi
3973rm -f conftest*
3974
3975fi
3976
3977if test $ac_cv_header_stdc = yes; then
3978  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
3979  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3980/* end confdefs.h.  */
3981#include <stdlib.h>
3982
3983_ACEOF
3984if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3985  $EGREP "free" >/dev/null 2>&1; then :
3986
3987else
3988  ac_cv_header_stdc=no
3989fi
3990rm -f conftest*
3991
3992fi
3993
3994if test $ac_cv_header_stdc = yes; then
3995  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
3996  if test "$cross_compiling" = yes; then :
3997  :
3998else
3999  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4000/* end confdefs.h.  */
4001#include <ctype.h>
4002#include <stdlib.h>
4003#if ((' ' & 0x0FF) == 0x020)
4004# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4005# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4006#else
4007# define ISLOWER(c) \
4008		   (('a' <= (c) && (c) <= 'i') \
4009		     || ('j' <= (c) && (c) <= 'r') \
4010		     || ('s' <= (c) && (c) <= 'z'))
4011# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4012#endif
4013
4014#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4015int
4016main ()
4017{
4018  int i;
4019  for (i = 0; i < 256; i++)
4020    if (XOR (islower (i), ISLOWER (i))
4021	|| toupper (i) != TOUPPER (i))
4022      return 2;
4023  return 0;
4024}
4025_ACEOF
4026if ac_fn_c_try_run "$LINENO"; then :
4027
4028else
4029  ac_cv_header_stdc=no
4030fi
4031rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4032  conftest.$ac_objext conftest.beam conftest.$ac_ext
4033fi
4034
4035fi
4036fi
4037{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
4038$as_echo "$ac_cv_header_stdc" >&6; }
4039if test $ac_cv_header_stdc = yes; then
4040
4041$as_echo "#define STDC_HEADERS 1" >>confdefs.h
4042
4043fi
4044
4045# On IRIX 5.3, sys/types and inttypes.h are conflicting.
4046for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4047		  inttypes.h stdint.h unistd.h
4048do :
4049  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4050ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
4051"
4052if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
4053  cat >>confdefs.h <<_ACEOF
4054#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
4055_ACEOF
4056
4057fi
4058
4059done
4060
4061
4062
4063  ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
4064if test "x$ac_cv_header_minix_config_h" = xyes; then :
4065  MINIX=yes
4066else
4067  MINIX=
4068fi
4069
4070
4071  if test "$MINIX" = yes; then
4072
4073$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
4074
4075
4076$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
4077
4078
4079$as_echo "#define _MINIX 1" >>confdefs.h
4080
4081  fi
4082
4083
4084  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
4085$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
4086if ${ac_cv_safe_to_define___extensions__+:} false; then :
4087  $as_echo_n "(cached) " >&6
4088else
4089  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4090/* end confdefs.h.  */
4091
4092#         define __EXTENSIONS__ 1
4093          $ac_includes_default
4094int
4095main ()
4096{
4097
4098  ;
4099  return 0;
4100}
4101_ACEOF
4102if ac_fn_c_try_compile "$LINENO"; then :
4103  ac_cv_safe_to_define___extensions__=yes
4104else
4105  ac_cv_safe_to_define___extensions__=no
4106fi
4107rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4108fi
4109{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
4110$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
4111  test $ac_cv_safe_to_define___extensions__ = yes &&
4112    $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
4113
4114  $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
4115
4116  $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
4117
4118  $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
4119
4120  $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
4121
4122
4123
4124if test "$ac_cv_header_minix_config_h" = "yes"; then
4125
4126$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
4127
4128fi
4129
4130case "$prefix" in
4131        NONE)
4132		prefix="/usr/local"
4133        ;;
4134esac
4135case "$exec_prefix" in
4136        NONE)
4137		exec_prefix="$prefix"
4138        ;;
4139esac
4140
4141# are we on MinGW?
4142if uname -s 2>&1 | grep MINGW32 >/dev/null; then on_mingw="yes"
4143else
4144	if echo $host $target | grep mingw32 >/dev/null; then on_mingw="yes"
4145	else on_mingw="no"; fi
4146fi
4147
4148#
4149# Determine configuration file
4150# the eval is to evaluate shell expansion twice
4151UNBOUND_SBIN_DIR=`eval echo "${sbindir}"`
4152
4153UNBOUND_SYSCONF_DIR=`eval echo "${sysconfdir}"`
4154
4155UNBOUND_LOCALSTATE_DIR=`eval echo "${localstatedir}"`
4156
4157if test $on_mingw = "no"; then
4158  ub_conf_file=`eval echo "${sysconfdir}/unbound/unbound.conf"`
4159else
4160  ub_conf_file="C:\\Program Files\\Unbound\\service.conf"
4161fi
4162
4163# Check whether --with-conf_file was given.
4164if test "${with_conf_file+set}" = set; then :
4165  withval=$with_conf_file; ub_conf_file="$withval"
4166fi
4167
4168
4169hdr_config="`echo $ub_conf_file | sed -e 's/\\\\/\\\\\\\\/g'`"
4170
4171
4172cat >>confdefs.h <<_ACEOF
4173#define CONFIGFILE "$hdr_config"
4174_ACEOF
4175
4176ub_conf_dir=`$as_dirname -- "$ub_conf_file" ||
4177$as_expr X"$ub_conf_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
4178	 X"$ub_conf_file" : 'X\(//\)[^/]' \| \
4179	 X"$ub_conf_file" : 'X\(//\)$' \| \
4180	 X"$ub_conf_file" : 'X\(/\)' \| . 2>/dev/null ||
4181$as_echo X"$ub_conf_file" |
4182    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
4183	    s//\1/
4184	    q
4185	  }
4186	  /^X\(\/\/\)[^/].*/{
4187	    s//\1/
4188	    q
4189	  }
4190	  /^X\(\/\/\)$/{
4191	    s//\1/
4192	    q
4193	  }
4194	  /^X\(\/\).*/{
4195	    s//\1/
4196	    q
4197	  }
4198	  s/.*/./; q'`
4199
4200
4201# Determine run, chroot directory and pidfile locations
4202
4203# Check whether --with-run-dir was given.
4204if test "${with_run_dir+set}" = set; then :
4205  withval=$with_run_dir; UNBOUND_RUN_DIR="$withval"
4206else
4207  if test $on_mingw = no; then
4208    UNBOUND_RUN_DIR=`dirname "$ub_conf_file"`
4209else
4210    UNBOUND_RUN_DIR=""
4211fi
4212
4213fi
4214
4215
4216hdr_run="`echo $UNBOUND_RUN_DIR | sed -e 's/\\\\/\\\\\\\\/g'`"
4217
4218
4219cat >>confdefs.h <<_ACEOF
4220#define RUN_DIR "$hdr_run"
4221_ACEOF
4222
4223
4224
4225# Check whether --with-chroot-dir was given.
4226if test "${with_chroot_dir+set}" = set; then :
4227  withval=$with_chroot_dir; UNBOUND_CHROOT_DIR="$withval"
4228else
4229  if test $on_mingw = no; then
4230    UNBOUND_CHROOT_DIR="$UNBOUND_RUN_DIR"
4231else
4232    UNBOUND_CHROOT_DIR=""
4233fi
4234
4235fi
4236
4237
4238hdr_chroot="`echo $UNBOUND_CHROOT_DIR | sed -e 's/\\\\/\\\\\\\\/g'`"
4239
4240
4241cat >>confdefs.h <<_ACEOF
4242#define CHROOT_DIR "$hdr_chroot"
4243_ACEOF
4244
4245
4246
4247# Check whether --with-share-dir was given.
4248if test "${with_share_dir+set}" = set; then :
4249  withval=$with_share_dir; UNBOUND_SHARE_DIR="$withval"
4250else
4251  UNBOUND_SHARE_DIR="$UNBOUND_RUN_DIR"
4252fi
4253
4254
4255
4256cat >>confdefs.h <<_ACEOF
4257#define SHARE_DIR "$UNBOUND_SHARE_DIR"
4258_ACEOF
4259
4260
4261
4262# Check whether --with-pidfile was given.
4263if test "${with_pidfile+set}" = set; then :
4264  withval=$with_pidfile; UNBOUND_PIDFILE="$withval"
4265else
4266  if test $on_mingw = no; then
4267    UNBOUND_PIDFILE="$UNBOUND_RUN_DIR/unbound.pid"
4268else
4269    UNBOUND_PIDFILE=""
4270fi
4271
4272fi
4273
4274
4275hdr_pid="`echo $UNBOUND_PIDFILE | sed -e 's/\\\\/\\\\\\\\/g'`"
4276
4277
4278cat >>confdefs.h <<_ACEOF
4279#define PIDFILE "$hdr_pid"
4280_ACEOF
4281
4282
4283
4284# Check whether --with-rootkey-file was given.
4285if test "${with_rootkey_file+set}" = set; then :
4286  withval=$with_rootkey_file; UNBOUND_ROOTKEY_FILE="$withval"
4287else
4288  if test $on_mingw = no; then
4289    UNBOUND_ROOTKEY_FILE="$UNBOUND_RUN_DIR/root.key"
4290else
4291    UNBOUND_ROOTKEY_FILE="C:\\Program Files\\Unbound\\root.key"
4292fi
4293
4294fi
4295
4296
4297hdr_rkey="`echo $UNBOUND_ROOTKEY_FILE | sed -e 's/\\\\/\\\\\\\\/g'`"
4298
4299
4300cat >>confdefs.h <<_ACEOF
4301#define ROOT_ANCHOR_FILE "$hdr_rkey"
4302_ACEOF
4303
4304
4305
4306# Check whether --with-rootcert-file was given.
4307if test "${with_rootcert_file+set}" = set; then :
4308  withval=$with_rootcert_file; UNBOUND_ROOTCERT_FILE="$withval"
4309else
4310  if test $on_mingw = no; then
4311    UNBOUND_ROOTCERT_FILE="$UNBOUND_RUN_DIR/icannbundle.pem"
4312else
4313    UNBOUND_ROOTCERT_FILE="C:\\Program Files\\Unbound\\icannbundle.pem"
4314fi
4315
4316fi
4317
4318
4319hdr_rpem="`echo $UNBOUND_ROOTCERT_FILE | sed -e 's/\\\\/\\\\\\\\/g'`"
4320
4321
4322cat >>confdefs.h <<_ACEOF
4323#define ROOT_CERT_FILE "$hdr_rpem"
4324_ACEOF
4325
4326
4327
4328# Check whether --with-username was given.
4329if test "${with_username+set}" = set; then :
4330  withval=$with_username; UNBOUND_USERNAME="$withval"
4331else
4332  UNBOUND_USERNAME="unbound"
4333fi
4334
4335
4336
4337cat >>confdefs.h <<_ACEOF
4338#define UB_USERNAME "$UNBOUND_USERNAME"
4339_ACEOF
4340
4341
4342
4343$as_echo "#define WINVER 0x0502" >>confdefs.h
4344
4345wnvs=`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/' `
4346
4347
4348cat >>confdefs.h <<_ACEOF
4349#define RSRC_PACKAGE_VERSION $wnvs
4350_ACEOF
4351
4352
4353# Checks for typedefs, structures, and compiler characteristics.
4354{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
4355$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
4356if ${ac_cv_c_const+:} false; then :
4357  $as_echo_n "(cached) " >&6
4358else
4359  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4360/* end confdefs.h.  */
4361
4362int
4363main ()
4364{
4365
4366#ifndef __cplusplus
4367  /* Ultrix mips cc rejects this sort of thing.  */
4368  typedef int charset[2];
4369  const charset cs = { 0, 0 };
4370  /* SunOS 4.1.1 cc rejects this.  */
4371  char const *const *pcpcc;
4372  char **ppc;
4373  /* NEC SVR4.0.2 mips cc rejects this.  */
4374  struct point {int x, y;};
4375  static struct point const zero = {0,0};
4376  /* AIX XL C 1.02.0.0 rejects this.
4377     It does not let you subtract one const X* pointer from another in
4378     an arm of an if-expression whose if-part is not a constant
4379     expression */
4380  const char *g = "string";
4381  pcpcc = &g + (g ? g-g : 0);
4382  /* HPUX 7.0 cc rejects these. */
4383  ++pcpcc;
4384  ppc = (char**) pcpcc;
4385  pcpcc = (char const *const *) ppc;
4386  { /* SCO 3.2v4 cc rejects this sort of thing.  */
4387    char tx;
4388    char *t = &tx;
4389    char const *s = 0 ? (char *) 0 : (char const *) 0;
4390
4391    *t++ = 0;
4392    if (s) return 0;
4393  }
4394  { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
4395    int x[] = {25, 17};
4396    const int *foo = &x[0];
4397    ++foo;
4398  }
4399  { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
4400    typedef const int *iptr;
4401    iptr p = 0;
4402    ++p;
4403  }
4404  { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
4405       "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
4406    struct s { int j; const int *ap[3]; } bx;
4407    struct s *b = &bx; b->j = 5;
4408  }
4409  { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
4410    const int foo = 10;
4411    if (!foo) return 0;
4412  }
4413  return !cs[0] && !zero.x;
4414#endif
4415
4416  ;
4417  return 0;
4418}
4419_ACEOF
4420if ac_fn_c_try_compile "$LINENO"; then :
4421  ac_cv_c_const=yes
4422else
4423  ac_cv_c_const=no
4424fi
4425rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4426fi
4427{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
4428$as_echo "$ac_cv_c_const" >&6; }
4429if test $ac_cv_c_const = no; then
4430
4431$as_echo "#define const /**/" >>confdefs.h
4432
4433fi
4434
4435ac_ext=c
4436ac_cpp='$CPP $CPPFLAGS'
4437ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4438ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4439ac_compiler_gnu=$ac_cv_c_compiler_gnu
4440
4441# allow user to override the -g -O2 flags.
4442default_cflags=no
4443if test "x$CFLAGS" = "x" ; then
4444
4445
4446{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -g" >&5
4447$as_echo_n "checking whether $CC supports -g... " >&6; }
4448cache=`echo g | sed 'y%.=/+-%___p_%'`
4449if eval \${cv_prog_cc_flag_$cache+:} false; then :
4450  $as_echo_n "(cached) " >&6
4451else
4452
4453echo 'void f(void){}' >conftest.c
4454if test -z "`$CC $CPPFLAGS $CFLAGS -g -c conftest.c 2>&1`"; then
4455eval "cv_prog_cc_flag_$cache=yes"
4456else
4457eval "cv_prog_cc_flag_$cache=no"
4458fi
4459rm -f conftest conftest.o conftest.c
4460
4461fi
4462
4463if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
4464{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4465$as_echo "yes" >&6; }
4466:
4467CFLAGS="$CFLAGS -g"
4468else
4469{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4470$as_echo "no" >&6; }
4471:
4472
4473fi
4474
4475
4476
4477{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -O2" >&5
4478$as_echo_n "checking whether $CC supports -O2... " >&6; }
4479cache=`echo O2 | sed 'y%.=/+-%___p_%'`
4480if eval \${cv_prog_cc_flag_$cache+:} false; then :
4481  $as_echo_n "(cached) " >&6
4482else
4483
4484echo 'void f(void){}' >conftest.c
4485if test -z "`$CC $CPPFLAGS $CFLAGS -O2 -c conftest.c 2>&1`"; then
4486eval "cv_prog_cc_flag_$cache=yes"
4487else
4488eval "cv_prog_cc_flag_$cache=no"
4489fi
4490rm -f conftest conftest.o conftest.c
4491
4492fi
4493
4494if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
4495{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4496$as_echo "yes" >&6; }
4497:
4498CFLAGS="$CFLAGS -O2"
4499else
4500{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4501$as_echo "no" >&6; }
4502:
4503
4504fi
4505
4506default_cflags=yes
4507fi
4508ac_ext=c
4509ac_cpp='$CPP $CPPFLAGS'
4510ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4511ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4512ac_compiler_gnu=$ac_cv_c_compiler_gnu
4513if test -n "$ac_tool_prefix"; then
4514  # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
4515set dummy ${ac_tool_prefix}gcc; ac_word=$2
4516{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4517$as_echo_n "checking for $ac_word... " >&6; }
4518if ${ac_cv_prog_CC+:} false; then :
4519  $as_echo_n "(cached) " >&6
4520else
4521  if test -n "$CC"; then
4522  ac_cv_prog_CC="$CC" # Let the user override the test.
4523else
4524as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4525for as_dir in $PATH
4526do
4527  IFS=$as_save_IFS
4528  test -z "$as_dir" && as_dir=.
4529    for ac_exec_ext in '' $ac_executable_extensions; do
4530  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4531    ac_cv_prog_CC="${ac_tool_prefix}gcc"
4532    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4533    break 2
4534  fi
4535done
4536  done
4537IFS=$as_save_IFS
4538
4539fi
4540fi
4541CC=$ac_cv_prog_CC
4542if test -n "$CC"; then
4543  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4544$as_echo "$CC" >&6; }
4545else
4546  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4547$as_echo "no" >&6; }
4548fi
4549
4550
4551fi
4552if test -z "$ac_cv_prog_CC"; then
4553  ac_ct_CC=$CC
4554  # Extract the first word of "gcc", so it can be a program name with args.
4555set dummy gcc; 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_ac_ct_CC+:} false; then :
4559  $as_echo_n "(cached) " >&6
4560else
4561  if test -n "$ac_ct_CC"; then
4562  ac_cv_prog_ac_ct_CC="$ac_ct_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_ac_ct_CC="gcc"
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
4581ac_ct_CC=$ac_cv_prog_ac_ct_CC
4582if test -n "$ac_ct_CC"; then
4583  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
4584$as_echo "$ac_ct_CC" >&6; }
4585else
4586  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4587$as_echo "no" >&6; }
4588fi
4589
4590  if test "x$ac_ct_CC" = x; then
4591    CC=""
4592  else
4593    case $cross_compiling:$ac_tool_warned in
4594yes:)
4595{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4596$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4597ac_tool_warned=yes ;;
4598esac
4599    CC=$ac_ct_CC
4600  fi
4601else
4602  CC="$ac_cv_prog_CC"
4603fi
4604
4605if test -z "$CC"; then
4606          if test -n "$ac_tool_prefix"; then
4607    # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
4608set dummy ${ac_tool_prefix}cc; ac_word=$2
4609{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4610$as_echo_n "checking for $ac_word... " >&6; }
4611if ${ac_cv_prog_CC+:} false; then :
4612  $as_echo_n "(cached) " >&6
4613else
4614  if test -n "$CC"; then
4615  ac_cv_prog_CC="$CC" # Let the user override the test.
4616else
4617as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4618for as_dir in $PATH
4619do
4620  IFS=$as_save_IFS
4621  test -z "$as_dir" && as_dir=.
4622    for ac_exec_ext in '' $ac_executable_extensions; do
4623  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4624    ac_cv_prog_CC="${ac_tool_prefix}cc"
4625    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4626    break 2
4627  fi
4628done
4629  done
4630IFS=$as_save_IFS
4631
4632fi
4633fi
4634CC=$ac_cv_prog_CC
4635if test -n "$CC"; then
4636  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4637$as_echo "$CC" >&6; }
4638else
4639  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4640$as_echo "no" >&6; }
4641fi
4642
4643
4644  fi
4645fi
4646if test -z "$CC"; then
4647  # Extract the first word of "cc", so it can be a program name with args.
4648set dummy cc; ac_word=$2
4649{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4650$as_echo_n "checking for $ac_word... " >&6; }
4651if ${ac_cv_prog_CC+:} false; then :
4652  $as_echo_n "(cached) " >&6
4653else
4654  if test -n "$CC"; then
4655  ac_cv_prog_CC="$CC" # Let the user override the test.
4656else
4657  ac_prog_rejected=no
4658as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4659for as_dir in $PATH
4660do
4661  IFS=$as_save_IFS
4662  test -z "$as_dir" && as_dir=.
4663    for ac_exec_ext in '' $ac_executable_extensions; do
4664  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4665    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
4666       ac_prog_rejected=yes
4667       continue
4668     fi
4669    ac_cv_prog_CC="cc"
4670    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4671    break 2
4672  fi
4673done
4674  done
4675IFS=$as_save_IFS
4676
4677if test $ac_prog_rejected = yes; then
4678  # We found a bogon in the path, so make sure we never use it.
4679  set dummy $ac_cv_prog_CC
4680  shift
4681  if test $# != 0; then
4682    # We chose a different compiler from the bogus one.
4683    # However, it has the same basename, so the bogon will be chosen
4684    # first if we set CC to just the basename; use the full file name.
4685    shift
4686    ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
4687  fi
4688fi
4689fi
4690fi
4691CC=$ac_cv_prog_CC
4692if test -n "$CC"; then
4693  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4694$as_echo "$CC" >&6; }
4695else
4696  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4697$as_echo "no" >&6; }
4698fi
4699
4700
4701fi
4702if test -z "$CC"; then
4703  if test -n "$ac_tool_prefix"; then
4704  for ac_prog in cl.exe
4705  do
4706    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4707set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4708{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4709$as_echo_n "checking for $ac_word... " >&6; }
4710if ${ac_cv_prog_CC+:} false; then :
4711  $as_echo_n "(cached) " >&6
4712else
4713  if test -n "$CC"; then
4714  ac_cv_prog_CC="$CC" # Let the user override the test.
4715else
4716as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4717for as_dir in $PATH
4718do
4719  IFS=$as_save_IFS
4720  test -z "$as_dir" && as_dir=.
4721    for ac_exec_ext in '' $ac_executable_extensions; do
4722  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4723    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
4724    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4725    break 2
4726  fi
4727done
4728  done
4729IFS=$as_save_IFS
4730
4731fi
4732fi
4733CC=$ac_cv_prog_CC
4734if test -n "$CC"; then
4735  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4736$as_echo "$CC" >&6; }
4737else
4738  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4739$as_echo "no" >&6; }
4740fi
4741
4742
4743    test -n "$CC" && break
4744  done
4745fi
4746if test -z "$CC"; then
4747  ac_ct_CC=$CC
4748  for ac_prog in cl.exe
4749do
4750  # Extract the first word of "$ac_prog", so it can be a program name with args.
4751set dummy $ac_prog; ac_word=$2
4752{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4753$as_echo_n "checking for $ac_word... " >&6; }
4754if ${ac_cv_prog_ac_ct_CC+:} false; then :
4755  $as_echo_n "(cached) " >&6
4756else
4757  if test -n "$ac_ct_CC"; then
4758  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
4759else
4760as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4761for as_dir in $PATH
4762do
4763  IFS=$as_save_IFS
4764  test -z "$as_dir" && as_dir=.
4765    for ac_exec_ext in '' $ac_executable_extensions; do
4766  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4767    ac_cv_prog_ac_ct_CC="$ac_prog"
4768    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4769    break 2
4770  fi
4771done
4772  done
4773IFS=$as_save_IFS
4774
4775fi
4776fi
4777ac_ct_CC=$ac_cv_prog_ac_ct_CC
4778if test -n "$ac_ct_CC"; then
4779  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
4780$as_echo "$ac_ct_CC" >&6; }
4781else
4782  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4783$as_echo "no" >&6; }
4784fi
4785
4786
4787  test -n "$ac_ct_CC" && break
4788done
4789
4790  if test "x$ac_ct_CC" = x; then
4791    CC=""
4792  else
4793    case $cross_compiling:$ac_tool_warned in
4794yes:)
4795{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4796$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4797ac_tool_warned=yes ;;
4798esac
4799    CC=$ac_ct_CC
4800  fi
4801fi
4802
4803fi
4804
4805
4806test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4807$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4808as_fn_error $? "no acceptable C compiler found in \$PATH
4809See \`config.log' for more details" "$LINENO" 5; }
4810
4811# Provide some information about the compiler.
4812$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
4813set X $ac_compile
4814ac_compiler=$2
4815for ac_option in --version -v -V -qversion; do
4816  { { ac_try="$ac_compiler $ac_option >&5"
4817case "(($ac_try" in
4818  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4819  *) ac_try_echo=$ac_try;;
4820esac
4821eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4822$as_echo "$ac_try_echo"; } >&5
4823  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
4824  ac_status=$?
4825  if test -s conftest.err; then
4826    sed '10a\
4827... rest of stderr output deleted ...
4828         10q' conftest.err >conftest.er1
4829    cat conftest.er1 >&5
4830  fi
4831  rm -f conftest.er1 conftest.err
4832  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4833  test $ac_status = 0; }
4834done
4835
4836{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4837$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
4838if ${ac_cv_c_compiler_gnu+:} false; then :
4839  $as_echo_n "(cached) " >&6
4840else
4841  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4842/* end confdefs.h.  */
4843
4844int
4845main ()
4846{
4847#ifndef __GNUC__
4848       choke me
4849#endif
4850
4851  ;
4852  return 0;
4853}
4854_ACEOF
4855if ac_fn_c_try_compile "$LINENO"; then :
4856  ac_compiler_gnu=yes
4857else
4858  ac_compiler_gnu=no
4859fi
4860rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4861ac_cv_c_compiler_gnu=$ac_compiler_gnu
4862
4863fi
4864{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4865$as_echo "$ac_cv_c_compiler_gnu" >&6; }
4866if test $ac_compiler_gnu = yes; then
4867  GCC=yes
4868else
4869  GCC=
4870fi
4871ac_test_CFLAGS=${CFLAGS+set}
4872ac_save_CFLAGS=$CFLAGS
4873{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4874$as_echo_n "checking whether $CC accepts -g... " >&6; }
4875if ${ac_cv_prog_cc_g+:} false; then :
4876  $as_echo_n "(cached) " >&6
4877else
4878  ac_save_c_werror_flag=$ac_c_werror_flag
4879   ac_c_werror_flag=yes
4880   ac_cv_prog_cc_g=no
4881   CFLAGS="-g"
4882   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4883/* end confdefs.h.  */
4884
4885int
4886main ()
4887{
4888
4889  ;
4890  return 0;
4891}
4892_ACEOF
4893if ac_fn_c_try_compile "$LINENO"; then :
4894  ac_cv_prog_cc_g=yes
4895else
4896  CFLAGS=""
4897      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4898/* end confdefs.h.  */
4899
4900int
4901main ()
4902{
4903
4904  ;
4905  return 0;
4906}
4907_ACEOF
4908if ac_fn_c_try_compile "$LINENO"; then :
4909
4910else
4911  ac_c_werror_flag=$ac_save_c_werror_flag
4912	 CFLAGS="-g"
4913	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4914/* end confdefs.h.  */
4915
4916int
4917main ()
4918{
4919
4920  ;
4921  return 0;
4922}
4923_ACEOF
4924if ac_fn_c_try_compile "$LINENO"; then :
4925  ac_cv_prog_cc_g=yes
4926fi
4927rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4928fi
4929rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4930fi
4931rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4932   ac_c_werror_flag=$ac_save_c_werror_flag
4933fi
4934{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4935$as_echo "$ac_cv_prog_cc_g" >&6; }
4936if test "$ac_test_CFLAGS" = set; then
4937  CFLAGS=$ac_save_CFLAGS
4938elif test $ac_cv_prog_cc_g = yes; then
4939  if test "$GCC" = yes; then
4940    CFLAGS="-g -O2"
4941  else
4942    CFLAGS="-g"
4943  fi
4944else
4945  if test "$GCC" = yes; then
4946    CFLAGS="-O2"
4947  else
4948    CFLAGS=
4949  fi
4950fi
4951{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4952$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
4953if ${ac_cv_prog_cc_c89+:} false; then :
4954  $as_echo_n "(cached) " >&6
4955else
4956  ac_cv_prog_cc_c89=no
4957ac_save_CC=$CC
4958cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4959/* end confdefs.h.  */
4960#include <stdarg.h>
4961#include <stdio.h>
4962struct stat;
4963/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
4964struct buf { int x; };
4965FILE * (*rcsopen) (struct buf *, struct stat *, int);
4966static char *e (p, i)
4967     char **p;
4968     int i;
4969{
4970  return p[i];
4971}
4972static char *f (char * (*g) (char **, int), char **p, ...)
4973{
4974  char *s;
4975  va_list v;
4976  va_start (v,p);
4977  s = g (p, va_arg (v,int));
4978  va_end (v);
4979  return s;
4980}
4981
4982/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
4983   function prototypes and stuff, but not '\xHH' hex character constants.
4984   These don't provoke an error unfortunately, instead are silently treated
4985   as 'x'.  The following induces an error, until -std is added to get
4986   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
4987   array size at least.  It's necessary to write '\x00'==0 to get something
4988   that's true only with -std.  */
4989int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4990
4991/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4992   inside strings and character constants.  */
4993#define FOO(x) 'x'
4994int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4995
4996int test (int i, double x);
4997struct s1 {int (*f) (int a);};
4998struct s2 {int (*f) (double a);};
4999int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
5000int argc;
5001char **argv;
5002int
5003main ()
5004{
5005return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
5006  ;
5007  return 0;
5008}
5009_ACEOF
5010for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
5011	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
5012do
5013  CC="$ac_save_CC $ac_arg"
5014  if ac_fn_c_try_compile "$LINENO"; then :
5015  ac_cv_prog_cc_c89=$ac_arg
5016fi
5017rm -f core conftest.err conftest.$ac_objext
5018  test "x$ac_cv_prog_cc_c89" != "xno" && break
5019done
5020rm -f conftest.$ac_ext
5021CC=$ac_save_CC
5022
5023fi
5024# AC_CACHE_VAL
5025case "x$ac_cv_prog_cc_c89" in
5026  x)
5027    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
5028$as_echo "none needed" >&6; } ;;
5029  xno)
5030    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
5031$as_echo "unsupported" >&6; } ;;
5032  *)
5033    CC="$CC $ac_cv_prog_cc_c89"
5034    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
5035$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
5036esac
5037if test "x$ac_cv_prog_cc_c89" != xno; then :
5038
5039fi
5040
5041ac_ext=c
5042ac_cpp='$CPP $CPPFLAGS'
5043ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5044ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5045ac_compiler_gnu=$ac_cv_c_compiler_gnu
5046
5047
5048{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $CC dependency flag" >&5
5049$as_echo_n "checking $CC dependency flag... " >&6; }
5050echo 'void f(){}' >conftest.c
5051if test "`$CC -MM conftest.c 2>&1`" = "conftest.o: conftest.c"; then
5052	DEPFLAG="-MM"
5053else
5054  if test "`$CC -xM1 conftest.c 2>&1`" = "conftest.o: conftest.c"; then
5055	DEPFLAG="-xM1"
5056  else
5057	DEPFLAG="-MM"  # dunno do something
5058  fi
5059fi
5060{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEPFLAG" >&5
5061$as_echo "$DEPFLAG" >&6; }
5062rm -f conftest.c
5063
5064
5065
5066
5067
5068{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Werror" >&5
5069$as_echo_n "checking whether $CC supports -Werror... " >&6; }
5070cache=`echo Werror | sed 'y%.=/+-%___p_%'`
5071if eval \${cv_prog_cc_flag_$cache+:} false; then :
5072  $as_echo_n "(cached) " >&6
5073else
5074
5075echo 'void f(void){}' >conftest.c
5076if test -z "`$CC $CPPFLAGS $CFLAGS -Werror -c conftest.c 2>&1`"; then
5077eval "cv_prog_cc_flag_$cache=yes"
5078else
5079eval "cv_prog_cc_flag_$cache=no"
5080fi
5081rm -f conftest conftest.o conftest.c
5082
5083fi
5084
5085if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
5086{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5087$as_echo "yes" >&6; }
5088:
5089ERRFLAG="-Werror"
5090else
5091{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5092$as_echo "no" >&6; }
5093:
5094ERRFLAG="-errwarn"
5095fi
5096
5097
5098
5099{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wall" >&5
5100$as_echo_n "checking whether $CC supports -Wall... " >&6; }
5101cache=`echo Wall | sed 'y%.=/+-%___p_%'`
5102if eval \${cv_prog_cc_flag_$cache+:} false; then :
5103  $as_echo_n "(cached) " >&6
5104else
5105
5106echo 'void f(void){}' >conftest.c
5107if test -z "`$CC $CPPFLAGS $CFLAGS -Wall -c conftest.c 2>&1`"; then
5108eval "cv_prog_cc_flag_$cache=yes"
5109else
5110eval "cv_prog_cc_flag_$cache=no"
5111fi
5112rm -f conftest conftest.o conftest.c
5113
5114fi
5115
5116if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
5117{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5118$as_echo "yes" >&6; }
5119:
5120ERRFLAG="$ERRFLAG -Wall"
5121else
5122{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5123$as_echo "no" >&6; }
5124:
5125ERRFLAG="$ERRFLAG -errfmt"
5126fi
5127
5128
5129
5130
5131
5132{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -std=c99" >&5
5133$as_echo_n "checking whether $CC supports -std=c99... " >&6; }
5134cache=`echo std=c99 | sed 'y%.=/+-%___p_%'`
5135if eval \${cv_prog_cc_flag_$cache+:} false; then :
5136  $as_echo_n "(cached) " >&6
5137else
5138
5139echo 'void f(void){}' >conftest.c
5140if test -z "`$CC $CPPFLAGS $CFLAGS -std=c99 -c conftest.c 2>&1`"; then
5141eval "cv_prog_cc_flag_$cache=yes"
5142else
5143eval "cv_prog_cc_flag_$cache=no"
5144fi
5145rm -f conftest conftest.o conftest.c
5146
5147fi
5148
5149if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
5150{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5151$as_echo "yes" >&6; }
5152:
5153C99FLAG="-std=c99"
5154else
5155{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5156$as_echo "no" >&6; }
5157:
5158
5159fi
5160
5161
5162
5163{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -xc99" >&5
5164$as_echo_n "checking whether $CC supports -xc99... " >&6; }
5165cache=`echo xc99 | sed 'y%.=/+-%___p_%'`
5166if eval \${cv_prog_cc_flag_$cache+:} false; then :
5167  $as_echo_n "(cached) " >&6
5168else
5169
5170echo 'void f(void){}' >conftest.c
5171if test -z "`$CC $CPPFLAGS $CFLAGS -xc99 -c conftest.c 2>&1`"; then
5172eval "cv_prog_cc_flag_$cache=yes"
5173else
5174eval "cv_prog_cc_flag_$cache=no"
5175fi
5176rm -f conftest conftest.o conftest.c
5177
5178fi
5179
5180if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
5181{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5182$as_echo "yes" >&6; }
5183:
5184C99FLAG="-xc99"
5185else
5186{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5187$as_echo "no" >&6; }
5188:
5189
5190fi
5191
5192
5193for ac_header in getopt.h time.h
5194do :
5195  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5196ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
5197"
5198if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
5199  cat >>confdefs.h <<_ACEOF
5200#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5201_ACEOF
5202
5203fi
5204
5205done
5206
5207
5208
5209
5210
5211{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we need $C99FLAG -D__EXTENSIONS__ -D_BSD_SOURCE -D_DEFAULT_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -D_XOPEN_SOURCE_EXTENDED=1 -D_ALL_SOURCE as a flag for $CC" >&5
5212$as_echo_n "checking whether we need $C99FLAG -D__EXTENSIONS__ -D_BSD_SOURCE -D_DEFAULT_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -D_XOPEN_SOURCE_EXTENDED=1 -D_ALL_SOURCE as a flag for $CC... " >&6; }
5213cache=`$as_echo "$C99FLAG -D__EXTENSIONS__ -D_BSD_SOURCE -D_DEFAULT_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -D_XOPEN_SOURCE_EXTENDED=1 -D_ALL_SOURCE" | $as_tr_sh`
5214if eval \${cv_prog_cc_flag_needed_$cache+:} false; then :
5215  $as_echo_n "(cached) " >&6
5216else
5217
5218echo '
5219#include "confdefs.h"
5220#include <stdlib.h>
5221#include <ctype.h>
5222#include <sys/time.h>
5223#ifdef HAVE_TIME_H
5224#include <time.h>
5225#endif
5226#include <unistd.h>
5227#include <netdb.h>
5228#ifdef HAVE_GETOPT_H
5229#include <getopt.h>
5230#endif
5231
5232int test() {
5233	int a;
5234	char **opts = NULL;
5235	struct timeval tv;
5236	char *t;
5237	time_t time = 0;
5238	char *buf = NULL;
5239	const char* str = NULL;
5240	struct msghdr msg;
5241	msg.msg_control = 0;
5242	t = ctime_r(&time, buf);
5243	tv.tv_usec = 10;
5244	srandom(32);
5245	a = getopt(2, opts, "a");
5246	a = isascii(32);
5247	str = gai_strerror(0);
5248	if(str && t && tv.tv_usec && msg.msg_control)
5249		a = 0;
5250	return a;
5251}
5252' > conftest.c
5253echo 'void f(){}' >>conftest.c
5254if test -z "`$CC $CPPFLAGS $CFLAGS $ERRFLAG -c conftest.c 2>&1`"; then
5255eval "cv_prog_cc_flag_needed_$cache=no"
5256else
5257
5258if test -z "`$CC $CPPFLAGS $CFLAGS $C99FLAG -D__EXTENSIONS__ -D_BSD_SOURCE -D_DEFAULT_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -D_XOPEN_SOURCE_EXTENDED=1 -D_ALL_SOURCE $ERRFLAG -c conftest.c 2>&1`"; then
5259eval "cv_prog_cc_flag_needed_$cache=yes"
5260else
5261eval "cv_prog_cc_flag_needed_$cache=fail"
5262#echo 'Test with flag fails too!'
5263#cat conftest.c
5264#echo "$CC $CPPFLAGS $CFLAGS $C99FLAG -D__EXTENSIONS__ -D_BSD_SOURCE -D_DEFAULT_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -D_XOPEN_SOURCE_EXTENDED=1 -D_ALL_SOURCE $ERRFLAG -c conftest.c 2>&1"
5265#echo `$CC $CPPFLAGS $CFLAGS $C99FLAG -D__EXTENSIONS__ -D_BSD_SOURCE -D_DEFAULT_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -D_XOPEN_SOURCE_EXTENDED=1 -D_ALL_SOURCE $ERRFLAG -c conftest.c 2>&1`
5266#exit 1
5267fi
5268
5269fi
5270rm -f conftest conftest.c conftest.o
5271
5272fi
5273
5274if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = yes"; then
5275{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5276$as_echo "yes" >&6; }
5277:
5278CFLAGS="$CFLAGS $C99FLAG -D__EXTENSIONS__ -D_BSD_SOURCE -D_DEFAULT_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -D_XOPEN_SOURCE_EXTENDED=1 -D_ALL_SOURCE"
5279else
5280if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = no"; then
5281{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5282$as_echo "no" >&6; }
5283#echo 'Test with flag is no!'
5284#cat conftest.c
5285#echo "$CC $CPPFLAGS $CFLAGS $C99FLAG -D__EXTENSIONS__ -D_BSD_SOURCE -D_DEFAULT_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -D_XOPEN_SOURCE_EXTENDED=1 -D_ALL_SOURCE $ERRFLAG -c conftest.c 2>&1"
5286#echo `$CC $CPPFLAGS $CFLAGS $C99FLAG -D__EXTENSIONS__ -D_BSD_SOURCE -D_DEFAULT_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -D_XOPEN_SOURCE_EXTENDED=1 -D_ALL_SOURCE $ERRFLAG -c conftest.c 2>&1`
5287#exit 1
5288:
5289
5290else
5291{ $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
5292$as_echo "failed" >&6; }
5293:
5294
5295fi
5296fi
5297
5298
5299
5300
5301
5302{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we need $C99FLAG -D__EXTENSIONS__ -D_BSD_SOURCE -D_DEFAULT_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -D_ALL_SOURCE as a flag for $CC" >&5
5303$as_echo_n "checking whether we need $C99FLAG -D__EXTENSIONS__ -D_BSD_SOURCE -D_DEFAULT_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -D_ALL_SOURCE as a flag for $CC... " >&6; }
5304cache=`$as_echo "$C99FLAG -D__EXTENSIONS__ -D_BSD_SOURCE -D_DEFAULT_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -D_ALL_SOURCE" | $as_tr_sh`
5305if eval \${cv_prog_cc_flag_needed_$cache+:} false; then :
5306  $as_echo_n "(cached) " >&6
5307else
5308
5309echo '
5310#include "confdefs.h"
5311#include <stdlib.h>
5312#include <ctype.h>
5313#include <sys/time.h>
5314#ifdef HAVE_TIME_H
5315#include <time.h>
5316#endif
5317#include <unistd.h>
5318#include <netdb.h>
5319#ifdef HAVE_GETOPT_H
5320#include <getopt.h>
5321#endif
5322
5323int test() {
5324	int a;
5325	char **opts = NULL;
5326	struct timeval tv;
5327	char *t;
5328	time_t time = 0;
5329	char *buf = NULL;
5330	const char* str = NULL;
5331	struct msghdr msg;
5332	msg.msg_control = 0;
5333	t = ctime_r(&time, buf);
5334	tv.tv_usec = 10;
5335	srandom(32);
5336	a = getopt(2, opts, "a");
5337	a = isascii(32);
5338	str = gai_strerror(0);
5339	if(str && t && tv.tv_usec && msg.msg_control)
5340		a = 0;
5341	return a;
5342}
5343' > conftest.c
5344echo 'void f(){}' >>conftest.c
5345if test -z "`$CC $CPPFLAGS $CFLAGS $ERRFLAG -c conftest.c 2>&1`"; then
5346eval "cv_prog_cc_flag_needed_$cache=no"
5347else
5348
5349if test -z "`$CC $CPPFLAGS $CFLAGS $C99FLAG -D__EXTENSIONS__ -D_BSD_SOURCE -D_DEFAULT_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -D_ALL_SOURCE $ERRFLAG -c conftest.c 2>&1`"; then
5350eval "cv_prog_cc_flag_needed_$cache=yes"
5351else
5352eval "cv_prog_cc_flag_needed_$cache=fail"
5353#echo 'Test with flag fails too!'
5354#cat conftest.c
5355#echo "$CC $CPPFLAGS $CFLAGS $C99FLAG -D__EXTENSIONS__ -D_BSD_SOURCE -D_DEFAULT_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -D_ALL_SOURCE $ERRFLAG -c conftest.c 2>&1"
5356#echo `$CC $CPPFLAGS $CFLAGS $C99FLAG -D__EXTENSIONS__ -D_BSD_SOURCE -D_DEFAULT_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -D_ALL_SOURCE $ERRFLAG -c conftest.c 2>&1`
5357#exit 1
5358fi
5359
5360fi
5361rm -f conftest conftest.c conftest.o
5362
5363fi
5364
5365if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = yes"; then
5366{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5367$as_echo "yes" >&6; }
5368:
5369CFLAGS="$CFLAGS $C99FLAG -D__EXTENSIONS__ -D_BSD_SOURCE -D_DEFAULT_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -D_ALL_SOURCE"
5370else
5371if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = no"; then
5372{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5373$as_echo "no" >&6; }
5374#echo 'Test with flag is no!'
5375#cat conftest.c
5376#echo "$CC $CPPFLAGS $CFLAGS $C99FLAG -D__EXTENSIONS__ -D_BSD_SOURCE -D_DEFAULT_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -D_ALL_SOURCE $ERRFLAG -c conftest.c 2>&1"
5377#echo `$CC $CPPFLAGS $CFLAGS $C99FLAG -D__EXTENSIONS__ -D_BSD_SOURCE -D_DEFAULT_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -D_ALL_SOURCE $ERRFLAG -c conftest.c 2>&1`
5378#exit 1
5379:
5380
5381else
5382{ $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
5383$as_echo "failed" >&6; }
5384:
5385
5386fi
5387fi
5388
5389
5390
5391
5392
5393{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we need $C99FLAG as a flag for $CC" >&5
5394$as_echo_n "checking whether we need $C99FLAG as a flag for $CC... " >&6; }
5395cache=`$as_echo "$C99FLAG" | $as_tr_sh`
5396if eval \${cv_prog_cc_flag_needed_$cache+:} false; then :
5397  $as_echo_n "(cached) " >&6
5398else
5399
5400echo '
5401#include <stdbool.h>
5402#include <ctype.h>
5403int test() {
5404        int a = 0;
5405        return a;
5406}
5407' > conftest.c
5408echo 'void f(){}' >>conftest.c
5409if test -z "`$CC $CPPFLAGS $CFLAGS $ERRFLAG -c conftest.c 2>&1`"; then
5410eval "cv_prog_cc_flag_needed_$cache=no"
5411else
5412
5413if test -z "`$CC $CPPFLAGS $CFLAGS $C99FLAG $ERRFLAG -c conftest.c 2>&1`"; then
5414eval "cv_prog_cc_flag_needed_$cache=yes"
5415else
5416eval "cv_prog_cc_flag_needed_$cache=fail"
5417#echo 'Test with flag fails too!'
5418#cat conftest.c
5419#echo "$CC $CPPFLAGS $CFLAGS $C99FLAG $ERRFLAG -c conftest.c 2>&1"
5420#echo `$CC $CPPFLAGS $CFLAGS $C99FLAG $ERRFLAG -c conftest.c 2>&1`
5421#exit 1
5422fi
5423
5424fi
5425rm -f conftest conftest.c conftest.o
5426
5427fi
5428
5429if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = yes"; then
5430{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5431$as_echo "yes" >&6; }
5432:
5433CFLAGS="$CFLAGS $C99FLAG"
5434else
5435if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = no"; then
5436{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5437$as_echo "no" >&6; }
5438#echo 'Test with flag is no!'
5439#cat conftest.c
5440#echo "$CC $CPPFLAGS $CFLAGS $C99FLAG $ERRFLAG -c conftest.c 2>&1"
5441#echo `$CC $CPPFLAGS $CFLAGS $C99FLAG $ERRFLAG -c conftest.c 2>&1`
5442#exit 1
5443:
5444
5445else
5446{ $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
5447$as_echo "failed" >&6; }
5448:
5449
5450fi
5451fi
5452
5453
5454
5455
5456
5457{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we need -D_BSD_SOURCE -D_DEFAULT_SOURCE as a flag for $CC" >&5
5458$as_echo_n "checking whether we need -D_BSD_SOURCE -D_DEFAULT_SOURCE as a flag for $CC... " >&6; }
5459cache=_D_BSD_SOURCE__D_DEFAULT_SOURCE
5460if eval \${cv_prog_cc_flag_needed_$cache+:} false; then :
5461  $as_echo_n "(cached) " >&6
5462else
5463
5464echo '
5465#include <ctype.h>
5466
5467int test() {
5468        int a;
5469        a = isascii(32);
5470        return a;
5471}
5472' > conftest.c
5473echo 'void f(){}' >>conftest.c
5474if test -z "`$CC $CPPFLAGS $CFLAGS $ERRFLAG -c conftest.c 2>&1`"; then
5475eval "cv_prog_cc_flag_needed_$cache=no"
5476else
5477
5478if test -z "`$CC $CPPFLAGS $CFLAGS -D_BSD_SOURCE -D_DEFAULT_SOURCE $ERRFLAG -c conftest.c 2>&1`"; then
5479eval "cv_prog_cc_flag_needed_$cache=yes"
5480else
5481eval "cv_prog_cc_flag_needed_$cache=fail"
5482#echo 'Test with flag fails too!'
5483#cat conftest.c
5484#echo "$CC $CPPFLAGS $CFLAGS -D_BSD_SOURCE -D_DEFAULT_SOURCE $ERRFLAG -c conftest.c 2>&1"
5485#echo `$CC $CPPFLAGS $CFLAGS -D_BSD_SOURCE -D_DEFAULT_SOURCE $ERRFLAG -c conftest.c 2>&1`
5486#exit 1
5487fi
5488
5489fi
5490rm -f conftest conftest.c conftest.o
5491
5492fi
5493
5494if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = yes"; then
5495{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5496$as_echo "yes" >&6; }
5497:
5498CFLAGS="$CFLAGS -D_BSD_SOURCE -D_DEFAULT_SOURCE"
5499else
5500if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = no"; then
5501{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5502$as_echo "no" >&6; }
5503#echo 'Test with flag is no!'
5504#cat conftest.c
5505#echo "$CC $CPPFLAGS $CFLAGS -D_BSD_SOURCE -D_DEFAULT_SOURCE $ERRFLAG -c conftest.c 2>&1"
5506#echo `$CC $CPPFLAGS $CFLAGS -D_BSD_SOURCE -D_DEFAULT_SOURCE $ERRFLAG -c conftest.c 2>&1`
5507#exit 1
5508:
5509
5510else
5511{ $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
5512$as_echo "failed" >&6; }
5513:
5514
5515fi
5516fi
5517
5518
5519
5520
5521
5522{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we need -D_GNU_SOURCE as a flag for $CC" >&5
5523$as_echo_n "checking whether we need -D_GNU_SOURCE as a flag for $CC... " >&6; }
5524cache=_D_GNU_SOURCE
5525if eval \${cv_prog_cc_flag_needed_$cache+:} false; then :
5526  $as_echo_n "(cached) " >&6
5527else
5528
5529echo '
5530#include <netinet/in.h>
5531
5532int test() {
5533        struct in6_pktinfo inf;
5534	int a = (int)sizeof(inf);
5535        return a;
5536}
5537' > conftest.c
5538echo 'void f(){}' >>conftest.c
5539if test -z "`$CC $CPPFLAGS $CFLAGS $ERRFLAG -c conftest.c 2>&1`"; then
5540eval "cv_prog_cc_flag_needed_$cache=no"
5541else
5542
5543if test -z "`$CC $CPPFLAGS $CFLAGS -D_GNU_SOURCE $ERRFLAG -c conftest.c 2>&1`"; then
5544eval "cv_prog_cc_flag_needed_$cache=yes"
5545else
5546eval "cv_prog_cc_flag_needed_$cache=fail"
5547#echo 'Test with flag fails too!'
5548#cat conftest.c
5549#echo "$CC $CPPFLAGS $CFLAGS -D_GNU_SOURCE $ERRFLAG -c conftest.c 2>&1"
5550#echo `$CC $CPPFLAGS $CFLAGS -D_GNU_SOURCE $ERRFLAG -c conftest.c 2>&1`
5551#exit 1
5552fi
5553
5554fi
5555rm -f conftest conftest.c conftest.o
5556
5557fi
5558
5559if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = yes"; then
5560{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5561$as_echo "yes" >&6; }
5562:
5563CFLAGS="$CFLAGS -D_GNU_SOURCE"
5564else
5565if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = no"; then
5566{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5567$as_echo "no" >&6; }
5568#echo 'Test with flag is no!'
5569#cat conftest.c
5570#echo "$CC $CPPFLAGS $CFLAGS -D_GNU_SOURCE $ERRFLAG -c conftest.c 2>&1"
5571#echo `$CC $CPPFLAGS $CFLAGS -D_GNU_SOURCE $ERRFLAG -c conftest.c 2>&1`
5572#exit 1
5573:
5574
5575else
5576{ $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
5577$as_echo "failed" >&6; }
5578:
5579
5580fi
5581fi
5582
5583
5584# check again for GNU_SOURCE for setresgid. May fail if setresgid
5585# is not available at all. -D_FRSRESGID is to make this check unique.
5586# otherwise we would get the previous cached result.
5587
5588
5589
5590{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we need -D_GNU_SOURCE -D_FRSRESGID as a flag for $CC" >&5
5591$as_echo_n "checking whether we need -D_GNU_SOURCE -D_FRSRESGID as a flag for $CC... " >&6; }
5592cache=_D_GNU_SOURCE__D_FRSRESGID
5593if eval \${cv_prog_cc_flag_needed_$cache+:} false; then :
5594  $as_echo_n "(cached) " >&6
5595else
5596
5597echo '
5598#include <unistd.h>
5599
5600int test() {
5601	int a = setresgid(0,0,0);
5602	a = setresuid(0,0,0);
5603        return a;
5604}
5605' > conftest.c
5606echo 'void f(){}' >>conftest.c
5607if test -z "`$CC $CPPFLAGS $CFLAGS $ERRFLAG -c conftest.c 2>&1`"; then
5608eval "cv_prog_cc_flag_needed_$cache=no"
5609else
5610
5611if test -z "`$CC $CPPFLAGS $CFLAGS -D_GNU_SOURCE -D_FRSRESGID $ERRFLAG -c conftest.c 2>&1`"; then
5612eval "cv_prog_cc_flag_needed_$cache=yes"
5613else
5614eval "cv_prog_cc_flag_needed_$cache=fail"
5615#echo 'Test with flag fails too!'
5616#cat conftest.c
5617#echo "$CC $CPPFLAGS $CFLAGS -D_GNU_SOURCE -D_FRSRESGID $ERRFLAG -c conftest.c 2>&1"
5618#echo `$CC $CPPFLAGS $CFLAGS -D_GNU_SOURCE -D_FRSRESGID $ERRFLAG -c conftest.c 2>&1`
5619#exit 1
5620fi
5621
5622fi
5623rm -f conftest conftest.c conftest.o
5624
5625fi
5626
5627if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = yes"; then
5628{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5629$as_echo "yes" >&6; }
5630:
5631CFLAGS="$CFLAGS -D_GNU_SOURCE"
5632else
5633if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = no"; then
5634{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5635$as_echo "no" >&6; }
5636#echo 'Test with flag is no!'
5637#cat conftest.c
5638#echo "$CC $CPPFLAGS $CFLAGS -D_GNU_SOURCE -D_FRSRESGID $ERRFLAG -c conftest.c 2>&1"
5639#echo `$CC $CPPFLAGS $CFLAGS -D_GNU_SOURCE -D_FRSRESGID $ERRFLAG -c conftest.c 2>&1`
5640#exit 1
5641:
5642
5643else
5644{ $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
5645$as_echo "failed" >&6; }
5646:
5647
5648fi
5649fi
5650
5651
5652
5653
5654
5655{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we need -D_POSIX_C_SOURCE=200112 as a flag for $CC" >&5
5656$as_echo_n "checking whether we need -D_POSIX_C_SOURCE=200112 as a flag for $CC... " >&6; }
5657cache=_D_POSIX_C_SOURCE_200112
5658if eval \${cv_prog_cc_flag_needed_$cache+:} false; then :
5659  $as_echo_n "(cached) " >&6
5660else
5661
5662echo '
5663#include "confdefs.h"
5664#ifdef HAVE_TIME_H
5665#include <time.h>
5666#endif
5667#include <netdb.h>
5668
5669int test() {
5670        int a = 0;
5671        char *t;
5672        time_t time = 0;
5673        char *buf = NULL;
5674	const char* str = NULL;
5675        t = ctime_r(&time, buf);
5676	str = gai_strerror(0);
5677	if(t && str)
5678		a = 0;
5679        return a;
5680}
5681' > conftest.c
5682echo 'void f(){}' >>conftest.c
5683if test -z "`$CC $CPPFLAGS $CFLAGS $ERRFLAG -c conftest.c 2>&1`"; then
5684eval "cv_prog_cc_flag_needed_$cache=no"
5685else
5686
5687if test -z "`$CC $CPPFLAGS $CFLAGS -D_POSIX_C_SOURCE=200112 $ERRFLAG -c conftest.c 2>&1`"; then
5688eval "cv_prog_cc_flag_needed_$cache=yes"
5689else
5690eval "cv_prog_cc_flag_needed_$cache=fail"
5691#echo 'Test with flag fails too!'
5692#cat conftest.c
5693#echo "$CC $CPPFLAGS $CFLAGS -D_POSIX_C_SOURCE=200112 $ERRFLAG -c conftest.c 2>&1"
5694#echo `$CC $CPPFLAGS $CFLAGS -D_POSIX_C_SOURCE=200112 $ERRFLAG -c conftest.c 2>&1`
5695#exit 1
5696fi
5697
5698fi
5699rm -f conftest conftest.c conftest.o
5700
5701fi
5702
5703if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = yes"; then
5704{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5705$as_echo "yes" >&6; }
5706:
5707CFLAGS="$CFLAGS -D_POSIX_C_SOURCE=200112"
5708else
5709if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = no"; then
5710{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5711$as_echo "no" >&6; }
5712#echo 'Test with flag is no!'
5713#cat conftest.c
5714#echo "$CC $CPPFLAGS $CFLAGS -D_POSIX_C_SOURCE=200112 $ERRFLAG -c conftest.c 2>&1"
5715#echo `$CC $CPPFLAGS $CFLAGS -D_POSIX_C_SOURCE=200112 $ERRFLAG -c conftest.c 2>&1`
5716#exit 1
5717:
5718
5719else
5720{ $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
5721$as_echo "failed" >&6; }
5722:
5723
5724fi
5725fi
5726
5727
5728
5729
5730
5731{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we need -D__EXTENSIONS__ as a flag for $CC" >&5
5732$as_echo_n "checking whether we need -D__EXTENSIONS__ as a flag for $CC... " >&6; }
5733cache=_D__EXTENSIONS__
5734if eval \${cv_prog_cc_flag_needed_$cache+:} false; then :
5735  $as_echo_n "(cached) " >&6
5736else
5737
5738echo '
5739#include "confdefs.h"
5740#include <stdlib.h>
5741#include <ctype.h>
5742#include <sys/time.h>
5743#ifdef HAVE_TIME_H
5744#include <time.h>
5745#endif
5746#include <unistd.h>
5747#ifdef HAVE_GETOPT_H
5748#include <getopt.h>
5749#endif
5750
5751int test() {
5752        int a;
5753        char **opts = NULL;
5754        struct timeval tv;
5755        tv.tv_usec = 10;
5756        srandom(32);
5757        a = getopt(2, opts, "a");
5758        a = isascii(32);
5759	if(tv.tv_usec)
5760		a = 0;
5761        return a;
5762}
5763' > conftest.c
5764echo 'void f(){}' >>conftest.c
5765if test -z "`$CC $CPPFLAGS $CFLAGS $ERRFLAG -c conftest.c 2>&1`"; then
5766eval "cv_prog_cc_flag_needed_$cache=no"
5767else
5768
5769if test -z "`$CC $CPPFLAGS $CFLAGS -D__EXTENSIONS__ $ERRFLAG -c conftest.c 2>&1`"; then
5770eval "cv_prog_cc_flag_needed_$cache=yes"
5771else
5772eval "cv_prog_cc_flag_needed_$cache=fail"
5773#echo 'Test with flag fails too!'
5774#cat conftest.c
5775#echo "$CC $CPPFLAGS $CFLAGS -D__EXTENSIONS__ $ERRFLAG -c conftest.c 2>&1"
5776#echo `$CC $CPPFLAGS $CFLAGS -D__EXTENSIONS__ $ERRFLAG -c conftest.c 2>&1`
5777#exit 1
5778fi
5779
5780fi
5781rm -f conftest conftest.c conftest.o
5782
5783fi
5784
5785if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = yes"; then
5786{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5787$as_echo "yes" >&6; }
5788:
5789CFLAGS="$CFLAGS -D__EXTENSIONS__"
5790else
5791if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = no"; then
5792{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5793$as_echo "no" >&6; }
5794#echo 'Test with flag is no!'
5795#cat conftest.c
5796#echo "$CC $CPPFLAGS $CFLAGS -D__EXTENSIONS__ $ERRFLAG -c conftest.c 2>&1"
5797#echo `$CC $CPPFLAGS $CFLAGS -D__EXTENSIONS__ $ERRFLAG -c conftest.c 2>&1`
5798#exit 1
5799:
5800
5801else
5802{ $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
5803$as_echo "failed" >&6; }
5804:
5805
5806fi
5807fi
5808
5809
5810
5811
5812# debug mode flags warnings
5813# Check whether --enable-checking was given.
5814if test "${enable_checking+set}" = set; then :
5815  enableval=$enable_checking;
5816fi
5817
5818# Check whether --enable-debug was given.
5819if test "${enable_debug+set}" = set; then :
5820  enableval=$enable_debug;
5821fi
5822
5823if test "$enable_debug" = "yes"; then debug_enabled="$enable_debug";
5824else debug_enabled="$enable_checking"; fi
5825
5826case "$debug_enabled" in
5827        yes)
5828
5829
5830{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -W" >&5
5831$as_echo_n "checking whether $CC supports -W... " >&6; }
5832cache=`echo W | sed 'y%.=/+-%___p_%'`
5833if eval \${cv_prog_cc_flag_$cache+:} false; then :
5834  $as_echo_n "(cached) " >&6
5835else
5836
5837echo 'void f(void){}' >conftest.c
5838if test -z "`$CC $CPPFLAGS $CFLAGS -W -c conftest.c 2>&1`"; then
5839eval "cv_prog_cc_flag_$cache=yes"
5840else
5841eval "cv_prog_cc_flag_$cache=no"
5842fi
5843rm -f conftest conftest.o conftest.c
5844
5845fi
5846
5847if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
5848{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5849$as_echo "yes" >&6; }
5850:
5851CFLAGS="$CFLAGS -W"
5852else
5853{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5854$as_echo "no" >&6; }
5855:
5856
5857fi
5858
5859
5860
5861{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wall" >&5
5862$as_echo_n "checking whether $CC supports -Wall... " >&6; }
5863cache=`echo Wall | sed 'y%.=/+-%___p_%'`
5864if eval \${cv_prog_cc_flag_$cache+:} false; then :
5865  $as_echo_n "(cached) " >&6
5866else
5867
5868echo 'void f(void){}' >conftest.c
5869if test -z "`$CC $CPPFLAGS $CFLAGS -Wall -c conftest.c 2>&1`"; then
5870eval "cv_prog_cc_flag_$cache=yes"
5871else
5872eval "cv_prog_cc_flag_$cache=no"
5873fi
5874rm -f conftest conftest.o conftest.c
5875
5876fi
5877
5878if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
5879{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5880$as_echo "yes" >&6; }
5881:
5882CFLAGS="$CFLAGS -Wall"
5883else
5884{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5885$as_echo "no" >&6; }
5886:
5887
5888fi
5889
5890
5891
5892{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wextra" >&5
5893$as_echo_n "checking whether $CC supports -Wextra... " >&6; }
5894cache=`echo Wextra | sed 'y%.=/+-%___p_%'`
5895if eval \${cv_prog_cc_flag_$cache+:} false; then :
5896  $as_echo_n "(cached) " >&6
5897else
5898
5899echo 'void f(void){}' >conftest.c
5900if test -z "`$CC $CPPFLAGS $CFLAGS -Wextra -c conftest.c 2>&1`"; then
5901eval "cv_prog_cc_flag_$cache=yes"
5902else
5903eval "cv_prog_cc_flag_$cache=no"
5904fi
5905rm -f conftest conftest.o conftest.c
5906
5907fi
5908
5909if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
5910{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5911$as_echo "yes" >&6; }
5912:
5913CFLAGS="$CFLAGS -Wextra"
5914else
5915{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5916$as_echo "no" >&6; }
5917:
5918
5919fi
5920
5921
5922
5923{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wdeclaration-after-statement" >&5
5924$as_echo_n "checking whether $CC supports -Wdeclaration-after-statement... " >&6; }
5925cache=`echo Wdeclaration-after-statement | sed 'y%.=/+-%___p_%'`
5926if eval \${cv_prog_cc_flag_$cache+:} false; then :
5927  $as_echo_n "(cached) " >&6
5928else
5929
5930echo 'void f(void){}' >conftest.c
5931if test -z "`$CC $CPPFLAGS $CFLAGS -Wdeclaration-after-statement -c conftest.c 2>&1`"; then
5932eval "cv_prog_cc_flag_$cache=yes"
5933else
5934eval "cv_prog_cc_flag_$cache=no"
5935fi
5936rm -f conftest conftest.o conftest.c
5937
5938fi
5939
5940if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
5941{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5942$as_echo "yes" >&6; }
5943:
5944CFLAGS="$CFLAGS -Wdeclaration-after-statement"
5945else
5946{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5947$as_echo "no" >&6; }
5948:
5949
5950fi
5951
5952
5953$as_echo "#define UNBOUND_DEBUG /**/" >>confdefs.h
5954
5955		;;
5956	no|*)
5957		# nothing to do.
5958		;;
5959esac
5960if test "$default_cflags" = "yes"; then
5961	# only when CFLAGS was "" at the start, if the users wants to
5962	# override we shouldn't add default cflags, because they wouldn't
5963	# be able to turn off these options and set the CFLAGS wanted.
5964
5965    # Check whether --enable-flto was given.
5966if test "${enable_flto+set}" = set; then :
5967  enableval=$enable_flto;
5968fi
5969
5970    if test "x$enable_flto" != "xno"; then :
5971
5972        { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -flto" >&5
5973$as_echo_n "checking if $CC supports -flto... " >&6; }
5974        BAKCFLAGS="$CFLAGS"
5975        CFLAGS="$CFLAGS -flto"
5976        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5977/* end confdefs.h.  */
5978
5979int
5980main ()
5981{
5982
5983  ;
5984  return 0;
5985}
5986_ACEOF
5987if ac_fn_c_try_link "$LINENO"; then :
5988
5989            if $CC $CFLAGS -o conftest conftest.c 2>&1 | $GREP -e "warning: no debug symbols in executable" -e "warning: object" >/dev/null; then
5990                CFLAGS="$BAKCFLAGS"
5991                { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5992$as_echo "no" >&6; }
5993            else
5994                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5995$as_echo "yes" >&6; }
5996            fi
5997            rm -f conftest conftest.c conftest.o
5998
5999else
6000  CFLAGS="$BAKCFLAGS" ; { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6001$as_echo "no" >&6; }
6002fi
6003rm -f core conftest.err conftest.$ac_objext \
6004    conftest$ac_exeext conftest.$ac_ext
6005
6006fi
6007
6008
6009    # Check whether --enable-pie was given.
6010if test "${enable_pie+set}" = set; then :
6011  enableval=$enable_pie;
6012fi
6013
6014    if test "x$enable_pie" = "xyes"; then :
6015
6016	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports PIE" >&5
6017$as_echo_n "checking if $CC supports PIE... " >&6; }
6018	BAKLDFLAGS="$LDFLAGS"
6019	BAKCFLAGS="$CFLAGS"
6020	LDFLAGS="$LDFLAGS -pie"
6021	CFLAGS="$CFLAGS -fPIE"
6022	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6023/* end confdefs.h.  */
6024
6025int
6026main ()
6027{
6028
6029  ;
6030  return 0;
6031}
6032_ACEOF
6033if ac_fn_c_try_link "$LINENO"; then :
6034
6035	    if $CC $CFLAGS $LDFLAGS -o conftest conftest.c 2>&1 | grep "warning: no debug symbols in executable" >/dev/null; then
6036		LDFLAGS="$BAKLDFLAGS"
6037		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6038$as_echo "no" >&6; }
6039	    else
6040		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6041$as_echo "yes" >&6; }
6042	    fi
6043	    rm -f conftest conftest.c conftest.o
6044
6045else
6046  LDFLAGS="$BAKLDFLAGS" ; CFLAGS="$BAKCFLAGS" ; { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6047$as_echo "no" >&6; }
6048fi
6049rm -f core conftest.err conftest.$ac_objext \
6050    conftest$ac_exeext conftest.$ac_ext
6051
6052fi
6053
6054
6055    # Check whether --enable-relro_now was given.
6056if test "${enable_relro_now+set}" = set; then :
6057  enableval=$enable_relro_now;
6058fi
6059
6060    if test "x$enable_relro_now" = "xyes"; then :
6061
6062	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wl,-z,relro,-z,now" >&5
6063$as_echo_n "checking if $CC supports -Wl,-z,relro,-z,now... " >&6; }
6064	BAKLDFLAGS="$LDFLAGS"
6065	LDFLAGS="$LDFLAGS -Wl,-z,relro,-z,now"
6066	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6067/* end confdefs.h.  */
6068
6069int
6070main ()
6071{
6072
6073  ;
6074  return 0;
6075}
6076_ACEOF
6077if ac_fn_c_try_link "$LINENO"; then :
6078
6079	    if $CC $CFLAGS $LDFLAGS -o conftest conftest.c 2>&1 | grep "warning: no debug symbols in executable" >/dev/null; then
6080		LDFLAGS="$BAKLDFLAGS"
6081		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6082$as_echo "no" >&6; }
6083	    else
6084		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6085$as_echo "yes" >&6; }
6086	    fi
6087	    rm -f conftest conftest.c conftest.o
6088
6089else
6090  LDFLAGS="$BAKLDFLAGS" ; { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6091$as_echo "no" >&6; }
6092fi
6093rm -f core conftest.err conftest.$ac_objext \
6094    conftest$ac_exeext conftest.$ac_ext
6095
6096fi
6097
6098fi
6099
6100{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
6101$as_echo_n "checking for inline... " >&6; }
6102if ${ac_cv_c_inline+:} false; then :
6103  $as_echo_n "(cached) " >&6
6104else
6105  ac_cv_c_inline=no
6106for ac_kw in inline __inline__ __inline; do
6107  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6108/* end confdefs.h.  */
6109#ifndef __cplusplus
6110typedef int foo_t;
6111static $ac_kw foo_t static_foo () {return 0; }
6112$ac_kw foo_t foo () {return 0; }
6113#endif
6114
6115_ACEOF
6116if ac_fn_c_try_compile "$LINENO"; then :
6117  ac_cv_c_inline=$ac_kw
6118fi
6119rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6120  test "$ac_cv_c_inline" != no && break
6121done
6122
6123fi
6124{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
6125$as_echo "$ac_cv_c_inline" >&6; }
6126
6127case $ac_cv_c_inline in
6128  inline | yes) ;;
6129  *)
6130    case $ac_cv_c_inline in
6131      no) ac_val=;;
6132      *) ac_val=$ac_cv_c_inline;;
6133    esac
6134    cat >>confdefs.h <<_ACEOF
6135#ifndef __cplusplus
6136#define inline $ac_val
6137#endif
6138_ACEOF
6139    ;;
6140esac
6141
6142
6143{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler (${CC-cc}) accepts the \"format\" attribute" >&5
6144$as_echo_n "checking whether the C compiler (${CC-cc}) accepts the \"format\" attribute... " >&6; }
6145if ${ac_cv_c_format_attribute+:} false; then :
6146  $as_echo_n "(cached) " >&6
6147else
6148  ac_cv_c_format_attribute=no
6149cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6150/* end confdefs.h.  */
6151#include <stdio.h>
6152void f (char *format, ...) __attribute__ ((format (printf, 1, 2)));
6153void (*pf) (char *format, ...) __attribute__ ((format (printf, 1, 2)));
6154
6155int
6156main ()
6157{
6158
6159   f ("%s", "str");
6160
6161  ;
6162  return 0;
6163}
6164_ACEOF
6165if ac_fn_c_try_compile "$LINENO"; then :
6166  ac_cv_c_format_attribute="yes"
6167else
6168  ac_cv_c_format_attribute="no"
6169fi
6170rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6171
6172fi
6173
6174
6175{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_format_attribute" >&5
6176$as_echo "$ac_cv_c_format_attribute" >&6; }
6177if test $ac_cv_c_format_attribute = yes; then
6178
6179$as_echo "#define HAVE_ATTR_FORMAT 1" >>confdefs.h
6180
6181fi
6182
6183
6184{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler (${CC-cc}) accepts the \"unused\" attribute" >&5
6185$as_echo_n "checking whether the C compiler (${CC-cc}) accepts the \"unused\" attribute... " >&6; }
6186if ${ac_cv_c_unused_attribute+:} false; then :
6187  $as_echo_n "(cached) " >&6
6188else
6189  ac_cv_c_unused_attribute=no
6190cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6191/* end confdefs.h.  */
6192#include <stdio.h>
6193void f (char *u __attribute__((unused)));
6194
6195int
6196main ()
6197{
6198
6199   f ("x");
6200
6201  ;
6202  return 0;
6203}
6204_ACEOF
6205if ac_fn_c_try_compile "$LINENO"; then :
6206  ac_cv_c_unused_attribute="yes"
6207else
6208  ac_cv_c_unused_attribute="no"
6209fi
6210rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6211
6212fi
6213
6214
6215
6216
6217{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_unused_attribute" >&5
6218$as_echo "$ac_cv_c_unused_attribute" >&6; }
6219if test $ac_cv_c_unused_attribute = yes; then
6220
6221$as_echo "#define HAVE_ATTR_UNUSED 1" >>confdefs.h
6222
6223fi
6224
6225
6226
6227
6228{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler (${CC-cc}) accepts the \"weak\" attribute" >&5
6229$as_echo_n "checking whether the C compiler (${CC-cc}) accepts the \"weak\" attribute... " >&6; }
6230if ${ac_cv_c_weak_attribute+:} false; then :
6231  $as_echo_n "(cached) " >&6
6232else
6233  ac_cv_c_weak_attribute=no
6234cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6235/* end confdefs.h.  */
6236 #include <stdio.h>
6237__attribute__((weak)) void f(int x) { printf("%d", x); }
6238
6239int
6240main ()
6241{
6242
6243   f(1);
6244
6245  ;
6246  return 0;
6247}
6248_ACEOF
6249if ac_fn_c_try_compile "$LINENO"; then :
6250  ac_cv_c_weak_attribute="yes"
6251else
6252  ac_cv_c_weak_attribute="no"
6253fi
6254rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6255
6256fi
6257
6258
6259{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_weak_attribute" >&5
6260$as_echo "$ac_cv_c_weak_attribute" >&6; }
6261if test $ac_cv_c_weak_attribute = yes; then
6262
6263$as_echo "#define HAVE_ATTR_WEAK 1" >>confdefs.h
6264
6265fi
6266
6267
6268if test "$srcdir" != "."; then
6269	CPPFLAGS="$CPPFLAGS -I$srcdir"
6270fi
6271
6272
6273
6274for ac_prog in flex lex
6275do
6276  # Extract the first word of "$ac_prog", so it can be a program name with args.
6277set dummy $ac_prog; ac_word=$2
6278{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6279$as_echo_n "checking for $ac_word... " >&6; }
6280if ${ac_cv_prog_LEX+:} false; then :
6281  $as_echo_n "(cached) " >&6
6282else
6283  if test -n "$LEX"; then
6284  ac_cv_prog_LEX="$LEX" # Let the user override the test.
6285else
6286as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6287for as_dir in $PATH
6288do
6289  IFS=$as_save_IFS
6290  test -z "$as_dir" && as_dir=.
6291    for ac_exec_ext in '' $ac_executable_extensions; do
6292  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6293    ac_cv_prog_LEX="$ac_prog"
6294    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6295    break 2
6296  fi
6297done
6298  done
6299IFS=$as_save_IFS
6300
6301fi
6302fi
6303LEX=$ac_cv_prog_LEX
6304if test -n "$LEX"; then
6305  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LEX" >&5
6306$as_echo "$LEX" >&6; }
6307else
6308  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6309$as_echo "no" >&6; }
6310fi
6311
6312
6313  test -n "$LEX" && break
6314done
6315test -n "$LEX" || LEX=":"
6316
6317if test "x$LEX" != "x:"; then
6318  cat >conftest.l <<_ACEOF
6319%%
6320a { ECHO; }
6321b { REJECT; }
6322c { yymore (); }
6323d { yyless (1); }
6324e { /* IRIX 6.5 flex 2.5.4 underquotes its yyless argument.  */
6325    yyless ((input () != 0)); }
6326f { unput (yytext[0]); }
6327. { BEGIN INITIAL; }
6328%%
6329#ifdef YYTEXT_POINTER
6330extern char *yytext;
6331#endif
6332int
6333main (void)
6334{
6335  return ! yylex () + ! yywrap ();
6336}
6337_ACEOF
6338{ { ac_try="$LEX conftest.l"
6339case "(($ac_try" in
6340  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6341  *) ac_try_echo=$ac_try;;
6342esac
6343eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
6344$as_echo "$ac_try_echo"; } >&5
6345  (eval "$LEX conftest.l") 2>&5
6346  ac_status=$?
6347  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
6348  test $ac_status = 0; }
6349{ $as_echo "$as_me:${as_lineno-$LINENO}: checking lex output file root" >&5
6350$as_echo_n "checking lex output file root... " >&6; }
6351if ${ac_cv_prog_lex_root+:} false; then :
6352  $as_echo_n "(cached) " >&6
6353else
6354
6355if test -f lex.yy.c; then
6356  ac_cv_prog_lex_root=lex.yy
6357elif test -f lexyy.c; then
6358  ac_cv_prog_lex_root=lexyy
6359else
6360  as_fn_error $? "cannot find output from $LEX; giving up" "$LINENO" 5
6361fi
6362fi
6363{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_lex_root" >&5
6364$as_echo "$ac_cv_prog_lex_root" >&6; }
6365LEX_OUTPUT_ROOT=$ac_cv_prog_lex_root
6366
6367if test -z "${LEXLIB+set}"; then
6368  { $as_echo "$as_me:${as_lineno-$LINENO}: checking lex library" >&5
6369$as_echo_n "checking lex library... " >&6; }
6370if ${ac_cv_lib_lex+:} false; then :
6371  $as_echo_n "(cached) " >&6
6372else
6373
6374    ac_save_LIBS=$LIBS
6375    ac_cv_lib_lex='none needed'
6376    for ac_lib in '' -lfl -ll; do
6377      LIBS="$ac_lib $ac_save_LIBS"
6378      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6379/* end confdefs.h.  */
6380`cat $LEX_OUTPUT_ROOT.c`
6381_ACEOF
6382if ac_fn_c_try_link "$LINENO"; then :
6383  ac_cv_lib_lex=$ac_lib
6384fi
6385rm -f core conftest.err conftest.$ac_objext \
6386    conftest$ac_exeext conftest.$ac_ext
6387      test "$ac_cv_lib_lex" != 'none needed' && break
6388    done
6389    LIBS=$ac_save_LIBS
6390
6391fi
6392{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_lex" >&5
6393$as_echo "$ac_cv_lib_lex" >&6; }
6394  test "$ac_cv_lib_lex" != 'none needed' && LEXLIB=$ac_cv_lib_lex
6395fi
6396
6397
6398{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether yytext is a pointer" >&5
6399$as_echo_n "checking whether yytext is a pointer... " >&6; }
6400if ${ac_cv_prog_lex_yytext_pointer+:} false; then :
6401  $as_echo_n "(cached) " >&6
6402else
6403  # POSIX says lex can declare yytext either as a pointer or an array; the
6404# default is implementation-dependent.  Figure out which it is, since
6405# not all implementations provide the %pointer and %array declarations.
6406ac_cv_prog_lex_yytext_pointer=no
6407ac_save_LIBS=$LIBS
6408LIBS="$LEXLIB $ac_save_LIBS"
6409cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6410/* end confdefs.h.  */
6411
6412  #define YYTEXT_POINTER 1
6413`cat $LEX_OUTPUT_ROOT.c`
6414_ACEOF
6415if ac_fn_c_try_link "$LINENO"; then :
6416  ac_cv_prog_lex_yytext_pointer=yes
6417fi
6418rm -f core conftest.err conftest.$ac_objext \
6419    conftest$ac_exeext conftest.$ac_ext
6420LIBS=$ac_save_LIBS
6421
6422fi
6423{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_lex_yytext_pointer" >&5
6424$as_echo "$ac_cv_prog_lex_yytext_pointer" >&6; }
6425if test $ac_cv_prog_lex_yytext_pointer = yes; then
6426
6427$as_echo "#define YYTEXT_POINTER 1" >>confdefs.h
6428
6429fi
6430rm -f conftest.l $LEX_OUTPUT_ROOT.c
6431
6432fi
6433
6434	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for yylex_destroy" >&5
6435$as_echo_n "checking for yylex_destroy... " >&6; }
6436	if echo %% | $LEX -t 2>&1 | grep yylex_destroy >/dev/null 2>&1; then
6437
6438$as_echo "#define LEX_HAS_YYLEX_DESTROY 1" >>confdefs.h
6439
6440		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6441$as_echo "yes" >&6; }
6442	else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6443$as_echo "no" >&6; }; fi
6444
6445for ac_prog in 'bison -y' byacc
6446do
6447  # Extract the first word of "$ac_prog", so it can be a program name with args.
6448set dummy $ac_prog; ac_word=$2
6449{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6450$as_echo_n "checking for $ac_word... " >&6; }
6451if ${ac_cv_prog_YACC+:} false; then :
6452  $as_echo_n "(cached) " >&6
6453else
6454  if test -n "$YACC"; then
6455  ac_cv_prog_YACC="$YACC" # Let the user override the test.
6456else
6457as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6458for as_dir in $PATH
6459do
6460  IFS=$as_save_IFS
6461  test -z "$as_dir" && as_dir=.
6462    for ac_exec_ext in '' $ac_executable_extensions; do
6463  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6464    ac_cv_prog_YACC="$ac_prog"
6465    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6466    break 2
6467  fi
6468done
6469  done
6470IFS=$as_save_IFS
6471
6472fi
6473fi
6474YACC=$ac_cv_prog_YACC
6475if test -n "$YACC"; then
6476  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $YACC" >&5
6477$as_echo "$YACC" >&6; }
6478else
6479  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6480$as_echo "no" >&6; }
6481fi
6482
6483
6484  test -n "$YACC" && break
6485done
6486test -n "$YACC" || YACC="yacc"
6487
6488# Extract the first word of "doxygen", so it can be a program name with args.
6489set dummy doxygen; ac_word=$2
6490{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6491$as_echo_n "checking for $ac_word... " >&6; }
6492if ${ac_cv_prog_doxygen+:} false; then :
6493  $as_echo_n "(cached) " >&6
6494else
6495  if test -n "$doxygen"; then
6496  ac_cv_prog_doxygen="$doxygen" # Let the user override the test.
6497else
6498as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6499for as_dir in $PATH
6500do
6501  IFS=$as_save_IFS
6502  test -z "$as_dir" && as_dir=.
6503    for ac_exec_ext in '' $ac_executable_extensions; do
6504  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6505    ac_cv_prog_doxygen="doxygen"
6506    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6507    break 2
6508  fi
6509done
6510  done
6511IFS=$as_save_IFS
6512
6513fi
6514fi
6515doxygen=$ac_cv_prog_doxygen
6516if test -n "$doxygen"; then
6517  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $doxygen" >&5
6518$as_echo "$doxygen" >&6; }
6519else
6520  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6521$as_echo "no" >&6; }
6522fi
6523
6524
6525if test -n "$ac_tool_prefix"; then
6526  # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
6527set dummy ${ac_tool_prefix}strip; ac_word=$2
6528{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6529$as_echo_n "checking for $ac_word... " >&6; }
6530if ${ac_cv_prog_STRIP+:} false; then :
6531  $as_echo_n "(cached) " >&6
6532else
6533  if test -n "$STRIP"; then
6534  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
6535else
6536as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6537for as_dir in $PATH
6538do
6539  IFS=$as_save_IFS
6540  test -z "$as_dir" && as_dir=.
6541    for ac_exec_ext in '' $ac_executable_extensions; do
6542  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6543    ac_cv_prog_STRIP="${ac_tool_prefix}strip"
6544    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6545    break 2
6546  fi
6547done
6548  done
6549IFS=$as_save_IFS
6550
6551fi
6552fi
6553STRIP=$ac_cv_prog_STRIP
6554if test -n "$STRIP"; then
6555  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
6556$as_echo "$STRIP" >&6; }
6557else
6558  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6559$as_echo "no" >&6; }
6560fi
6561
6562
6563fi
6564if test -z "$ac_cv_prog_STRIP"; then
6565  ac_ct_STRIP=$STRIP
6566  # Extract the first word of "strip", so it can be a program name with args.
6567set dummy strip; ac_word=$2
6568{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6569$as_echo_n "checking for $ac_word... " >&6; }
6570if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
6571  $as_echo_n "(cached) " >&6
6572else
6573  if test -n "$ac_ct_STRIP"; then
6574  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
6575else
6576as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6577for as_dir in $PATH
6578do
6579  IFS=$as_save_IFS
6580  test -z "$as_dir" && as_dir=.
6581    for ac_exec_ext in '' $ac_executable_extensions; do
6582  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6583    ac_cv_prog_ac_ct_STRIP="strip"
6584    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6585    break 2
6586  fi
6587done
6588  done
6589IFS=$as_save_IFS
6590
6591fi
6592fi
6593ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
6594if test -n "$ac_ct_STRIP"; then
6595  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
6596$as_echo "$ac_ct_STRIP" >&6; }
6597else
6598  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6599$as_echo "no" >&6; }
6600fi
6601
6602  if test "x$ac_ct_STRIP" = x; then
6603    STRIP=""
6604  else
6605    case $cross_compiling:$ac_tool_warned in
6606yes:)
6607{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6608$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6609ac_tool_warned=yes ;;
6610esac
6611    STRIP=$ac_ct_STRIP
6612  fi
6613else
6614  STRIP="$ac_cv_prog_STRIP"
6615fi
6616
6617ac_aux_dir=
6618for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
6619  if test -f "$ac_dir/install-sh"; then
6620    ac_aux_dir=$ac_dir
6621    ac_install_sh="$ac_aux_dir/install-sh -c"
6622    break
6623  elif test -f "$ac_dir/install.sh"; then
6624    ac_aux_dir=$ac_dir
6625    ac_install_sh="$ac_aux_dir/install.sh -c"
6626    break
6627  elif test -f "$ac_dir/shtool"; then
6628    ac_aux_dir=$ac_dir
6629    ac_install_sh="$ac_aux_dir/shtool install -c"
6630    break
6631  fi
6632done
6633if test -z "$ac_aux_dir"; then
6634  as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
6635fi
6636
6637# These three variables are undocumented and unsupported,
6638# and are intended to be withdrawn in a future Autoconf release.
6639# They can cause serious problems if a builder's source tree is in a directory
6640# whose full name contains unusual characters.
6641ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
6642ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
6643ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
6644
6645
6646# Make sure we can run config.sub.
6647$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
6648  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
6649
6650{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
6651$as_echo_n "checking build system type... " >&6; }
6652if ${ac_cv_build+:} false; then :
6653  $as_echo_n "(cached) " >&6
6654else
6655  ac_build_alias=$build_alias
6656test "x$ac_build_alias" = x &&
6657  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
6658test "x$ac_build_alias" = x &&
6659  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
6660ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
6661  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
6662
6663fi
6664{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
6665$as_echo "$ac_cv_build" >&6; }
6666case $ac_cv_build in
6667*-*-*) ;;
6668*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
6669esac
6670build=$ac_cv_build
6671ac_save_IFS=$IFS; IFS='-'
6672set x $ac_cv_build
6673shift
6674build_cpu=$1
6675build_vendor=$2
6676shift; shift
6677# Remember, the first character of IFS is used to create $*,
6678# except with old shells:
6679build_os=$*
6680IFS=$ac_save_IFS
6681case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
6682
6683
6684{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
6685$as_echo_n "checking host system type... " >&6; }
6686if ${ac_cv_host+:} false; then :
6687  $as_echo_n "(cached) " >&6
6688else
6689  if test "x$host_alias" = x; then
6690  ac_cv_host=$ac_cv_build
6691else
6692  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
6693    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
6694fi
6695
6696fi
6697{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
6698$as_echo "$ac_cv_host" >&6; }
6699case $ac_cv_host in
6700*-*-*) ;;
6701*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
6702esac
6703host=$ac_cv_host
6704ac_save_IFS=$IFS; IFS='-'
6705set x $ac_cv_host
6706shift
6707host_cpu=$1
6708host_vendor=$2
6709shift; shift
6710# Remember, the first character of IFS is used to create $*,
6711# except with old shells:
6712host_os=$*
6713IFS=$ac_save_IFS
6714case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
6715
6716
6717
6718# skip these tests, we do not need them.
6719
6720
6721
6722
6723
6724
6725
6726
6727# always use ./libtool unless override from commandline (libtool=mylibtool)
6728if test -z "$libtool"; then
6729	libtool="./libtool"
6730fi
6731
6732# avoid libtool max commandline length test on systems that fork slowly.
6733
6734if echo "$host_os" | grep "sunos4" >/dev/null; then
6735	lt_cv_sys_max_cmd_len=32750;
6736fi
6737if test -n "$ac_tool_prefix"; then
6738  # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
6739set dummy ${ac_tool_prefix}ar; ac_word=$2
6740{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6741$as_echo_n "checking for $ac_word... " >&6; }
6742if ${ac_cv_path_AR+:} false; then :
6743  $as_echo_n "(cached) " >&6
6744else
6745  case $AR in
6746  [\\/]* | ?:[\\/]*)
6747  ac_cv_path_AR="$AR" # Let the user override the test with a path.
6748  ;;
6749  *)
6750  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6751for as_dir in $PATH
6752do
6753  IFS=$as_save_IFS
6754  test -z "$as_dir" && as_dir=.
6755    for ac_exec_ext in '' $ac_executable_extensions; do
6756  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6757    ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
6758    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6759    break 2
6760  fi
6761done
6762  done
6763IFS=$as_save_IFS
6764
6765  ;;
6766esac
6767fi
6768AR=$ac_cv_path_AR
6769if test -n "$AR"; then
6770  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
6771$as_echo "$AR" >&6; }
6772else
6773  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6774$as_echo "no" >&6; }
6775fi
6776
6777
6778fi
6779if test -z "$ac_cv_path_AR"; then
6780  ac_pt_AR=$AR
6781  # Extract the first word of "ar", so it can be a program name with args.
6782set dummy ar; ac_word=$2
6783{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6784$as_echo_n "checking for $ac_word... " >&6; }
6785if ${ac_cv_path_ac_pt_AR+:} false; then :
6786  $as_echo_n "(cached) " >&6
6787else
6788  case $ac_pt_AR in
6789  [\\/]* | ?:[\\/]*)
6790  ac_cv_path_ac_pt_AR="$ac_pt_AR" # Let the user override the test with a path.
6791  ;;
6792  *)
6793  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6794for as_dir in $PATH
6795do
6796  IFS=$as_save_IFS
6797  test -z "$as_dir" && as_dir=.
6798    for ac_exec_ext in '' $ac_executable_extensions; do
6799  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6800    ac_cv_path_ac_pt_AR="$as_dir/$ac_word$ac_exec_ext"
6801    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6802    break 2
6803  fi
6804done
6805  done
6806IFS=$as_save_IFS
6807
6808  ;;
6809esac
6810fi
6811ac_pt_AR=$ac_cv_path_ac_pt_AR
6812if test -n "$ac_pt_AR"; then
6813  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_AR" >&5
6814$as_echo "$ac_pt_AR" >&6; }
6815else
6816  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6817$as_echo "no" >&6; }
6818fi
6819
6820  if test "x$ac_pt_AR" = x; then
6821    AR="false"
6822  else
6823    case $cross_compiling:$ac_tool_warned in
6824yes:)
6825{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6826$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6827ac_tool_warned=yes ;;
6828esac
6829    AR=$ac_pt_AR
6830  fi
6831else
6832  AR="$ac_cv_path_AR"
6833fi
6834
6835if test $AR = false; then
6836	as_fn_error $? "Cannot find 'ar', please extend PATH to include it" "$LINENO" 5
6837fi
6838
6839case `pwd` in
6840  *\ * | *\	*)
6841    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5
6842$as_echo "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;;
6843esac
6844
6845
6846
6847macro_version='2.4.6'
6848macro_revision='2.4.6'
6849
6850
6851
6852
6853
6854
6855
6856
6857
6858
6859
6860
6861
6862ltmain=$ac_aux_dir/ltmain.sh
6863
6864# Backslashify metacharacters that are still active within
6865# double-quoted strings.
6866sed_quote_subst='s/\(["`$\\]\)/\\\1/g'
6867
6868# Same as above, but do not quote variable references.
6869double_quote_subst='s/\(["`\\]\)/\\\1/g'
6870
6871# Sed substitution to delay expansion of an escaped shell variable in a
6872# double_quote_subst'ed string.
6873delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
6874
6875# Sed substitution to delay expansion of an escaped single quote.
6876delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
6877
6878# Sed substitution to avoid accidental globbing in evaled expressions
6879no_glob_subst='s/\*/\\\*/g'
6880
6881ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
6882ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
6883ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
6884
6885{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5
6886$as_echo_n "checking how to print strings... " >&6; }
6887# Test print first, because it will be a builtin if present.
6888if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \
6889   test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
6890  ECHO='print -r --'
6891elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
6892  ECHO='printf %s\n'
6893else
6894  # Use this function as a fallback that always works.
6895  func_fallback_echo ()
6896  {
6897    eval 'cat <<_LTECHO_EOF
6898$1
6899_LTECHO_EOF'
6900  }
6901  ECHO='func_fallback_echo'
6902fi
6903
6904# func_echo_all arg...
6905# Invoke $ECHO with all args, space-separated.
6906func_echo_all ()
6907{
6908    $ECHO ""
6909}
6910
6911case $ECHO in
6912  printf*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: printf" >&5
6913$as_echo "printf" >&6; } ;;
6914  print*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: print -r" >&5
6915$as_echo "print -r" >&6; } ;;
6916  *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: cat" >&5
6917$as_echo "cat" >&6; } ;;
6918esac
6919
6920
6921
6922
6923
6924
6925
6926
6927
6928
6929
6930
6931
6932
6933{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
6934$as_echo_n "checking for a sed that does not truncate output... " >&6; }
6935if ${ac_cv_path_SED+:} false; then :
6936  $as_echo_n "(cached) " >&6
6937else
6938            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
6939     for ac_i in 1 2 3 4 5 6 7; do
6940       ac_script="$ac_script$as_nl$ac_script"
6941     done
6942     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
6943     { ac_script=; unset ac_script;}
6944     if test -z "$SED"; then
6945  ac_path_SED_found=false
6946  # Loop through the user's path and test for each of PROGNAME-LIST
6947  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6948for as_dir in $PATH
6949do
6950  IFS=$as_save_IFS
6951  test -z "$as_dir" && as_dir=.
6952    for ac_prog in sed gsed; do
6953    for ac_exec_ext in '' $ac_executable_extensions; do
6954      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
6955      as_fn_executable_p "$ac_path_SED" || continue
6956# Check for GNU ac_path_SED and select it if it is found.
6957  # Check for GNU $ac_path_SED
6958case `"$ac_path_SED" --version 2>&1` in
6959*GNU*)
6960  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
6961*)
6962  ac_count=0
6963  $as_echo_n 0123456789 >"conftest.in"
6964  while :
6965  do
6966    cat "conftest.in" "conftest.in" >"conftest.tmp"
6967    mv "conftest.tmp" "conftest.in"
6968    cp "conftest.in" "conftest.nl"
6969    $as_echo '' >> "conftest.nl"
6970    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
6971    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6972    as_fn_arith $ac_count + 1 && ac_count=$as_val
6973    if test $ac_count -gt ${ac_path_SED_max-0}; then
6974      # Best one so far, save it but keep looking for a better one
6975      ac_cv_path_SED="$ac_path_SED"
6976      ac_path_SED_max=$ac_count
6977    fi
6978    # 10*(2^10) chars as input seems more than enough
6979    test $ac_count -gt 10 && break
6980  done
6981  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6982esac
6983
6984      $ac_path_SED_found && break 3
6985    done
6986  done
6987  done
6988IFS=$as_save_IFS
6989  if test -z "$ac_cv_path_SED"; then
6990    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
6991  fi
6992else
6993  ac_cv_path_SED=$SED
6994fi
6995
6996fi
6997{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
6998$as_echo "$ac_cv_path_SED" >&6; }
6999 SED="$ac_cv_path_SED"
7000  rm -f conftest.sed
7001
7002test -z "$SED" && SED=sed
7003Xsed="$SED -e 1s/^X//"
7004
7005
7006
7007
7008
7009
7010
7011
7012
7013
7014
7015{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
7016$as_echo_n "checking for fgrep... " >&6; }
7017if ${ac_cv_path_FGREP+:} false; then :
7018  $as_echo_n "(cached) " >&6
7019else
7020  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
7021   then ac_cv_path_FGREP="$GREP -F"
7022   else
7023     if test -z "$FGREP"; then
7024  ac_path_FGREP_found=false
7025  # Loop through the user's path and test for each of PROGNAME-LIST
7026  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7027for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
7028do
7029  IFS=$as_save_IFS
7030  test -z "$as_dir" && as_dir=.
7031    for ac_prog in fgrep; do
7032    for ac_exec_ext in '' $ac_executable_extensions; do
7033      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
7034      as_fn_executable_p "$ac_path_FGREP" || continue
7035# Check for GNU ac_path_FGREP and select it if it is found.
7036  # Check for GNU $ac_path_FGREP
7037case `"$ac_path_FGREP" --version 2>&1` in
7038*GNU*)
7039  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
7040*)
7041  ac_count=0
7042  $as_echo_n 0123456789 >"conftest.in"
7043  while :
7044  do
7045    cat "conftest.in" "conftest.in" >"conftest.tmp"
7046    mv "conftest.tmp" "conftest.in"
7047    cp "conftest.in" "conftest.nl"
7048    $as_echo 'FGREP' >> "conftest.nl"
7049    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
7050    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
7051    as_fn_arith $ac_count + 1 && ac_count=$as_val
7052    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
7053      # Best one so far, save it but keep looking for a better one
7054      ac_cv_path_FGREP="$ac_path_FGREP"
7055      ac_path_FGREP_max=$ac_count
7056    fi
7057    # 10*(2^10) chars as input seems more than enough
7058    test $ac_count -gt 10 && break
7059  done
7060  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
7061esac
7062
7063      $ac_path_FGREP_found && break 3
7064    done
7065  done
7066  done
7067IFS=$as_save_IFS
7068  if test -z "$ac_cv_path_FGREP"; then
7069    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
7070  fi
7071else
7072  ac_cv_path_FGREP=$FGREP
7073fi
7074
7075   fi
7076fi
7077{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
7078$as_echo "$ac_cv_path_FGREP" >&6; }
7079 FGREP="$ac_cv_path_FGREP"
7080
7081
7082test -z "$GREP" && GREP=grep
7083
7084
7085
7086
7087
7088
7089
7090
7091
7092
7093
7094
7095
7096
7097
7098
7099
7100
7101
7102# Check whether --with-gnu-ld was given.
7103if test "${with_gnu_ld+set}" = set; then :
7104  withval=$with_gnu_ld; test no = "$withval" || with_gnu_ld=yes
7105else
7106  with_gnu_ld=no
7107fi
7108
7109ac_prog=ld
7110if test yes = "$GCC"; then
7111  # Check if gcc -print-prog-name=ld gives a path.
7112  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5
7113$as_echo_n "checking for ld used by $CC... " >&6; }
7114  case $host in
7115  *-*-mingw*)
7116    # gcc leaves a trailing carriage return, which upsets mingw
7117    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
7118  *)
7119    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
7120  esac
7121  case $ac_prog in
7122    # Accept absolute paths.
7123    [\\/]* | ?:[\\/]*)
7124      re_direlt='/[^/][^/]*/\.\./'
7125      # Canonicalize the pathname of ld
7126      ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
7127      while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
7128	ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
7129      done
7130      test -z "$LD" && LD=$ac_prog
7131      ;;
7132  "")
7133    # If it fails, then pretend we aren't using GCC.
7134    ac_prog=ld
7135    ;;
7136  *)
7137    # If it is relative, then search for the first ld in PATH.
7138    with_gnu_ld=unknown
7139    ;;
7140  esac
7141elif test yes = "$with_gnu_ld"; then
7142  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
7143$as_echo_n "checking for GNU ld... " >&6; }
7144else
7145  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
7146$as_echo_n "checking for non-GNU ld... " >&6; }
7147fi
7148if ${lt_cv_path_LD+:} false; then :
7149  $as_echo_n "(cached) " >&6
7150else
7151  if test -z "$LD"; then
7152  lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
7153  for ac_dir in $PATH; do
7154    IFS=$lt_save_ifs
7155    test -z "$ac_dir" && ac_dir=.
7156    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
7157      lt_cv_path_LD=$ac_dir/$ac_prog
7158      # Check to see if the program is GNU ld.  I'd rather use --version,
7159      # but apparently some variants of GNU ld only accept -v.
7160      # Break only if it was the GNU/non-GNU ld that we prefer.
7161      case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
7162      *GNU* | *'with BFD'*)
7163	test no != "$with_gnu_ld" && break
7164	;;
7165      *)
7166	test yes != "$with_gnu_ld" && break
7167	;;
7168      esac
7169    fi
7170  done
7171  IFS=$lt_save_ifs
7172else
7173  lt_cv_path_LD=$LD # Let the user override the test with a path.
7174fi
7175fi
7176
7177LD=$lt_cv_path_LD
7178if test -n "$LD"; then
7179  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
7180$as_echo "$LD" >&6; }
7181else
7182  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7183$as_echo "no" >&6; }
7184fi
7185test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
7186{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
7187$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
7188if ${lt_cv_prog_gnu_ld+:} false; then :
7189  $as_echo_n "(cached) " >&6
7190else
7191  # I'd rather use --version here, but apparently some GNU lds only accept -v.
7192case `$LD -v 2>&1 </dev/null` in
7193*GNU* | *'with BFD'*)
7194  lt_cv_prog_gnu_ld=yes
7195  ;;
7196*)
7197  lt_cv_prog_gnu_ld=no
7198  ;;
7199esac
7200fi
7201{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_gnu_ld" >&5
7202$as_echo "$lt_cv_prog_gnu_ld" >&6; }
7203with_gnu_ld=$lt_cv_prog_gnu_ld
7204
7205
7206
7207
7208
7209
7210
7211
7212
7213{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)" >&5
7214$as_echo_n "checking for BSD- or MS-compatible name lister (nm)... " >&6; }
7215if ${lt_cv_path_NM+:} false; then :
7216  $as_echo_n "(cached) " >&6
7217else
7218  if test -n "$NM"; then
7219  # Let the user override the test.
7220  lt_cv_path_NM=$NM
7221else
7222  lt_nm_to_check=${ac_tool_prefix}nm
7223  if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
7224    lt_nm_to_check="$lt_nm_to_check nm"
7225  fi
7226  for lt_tmp_nm in $lt_nm_to_check; do
7227    lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
7228    for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
7229      IFS=$lt_save_ifs
7230      test -z "$ac_dir" && ac_dir=.
7231      tmp_nm=$ac_dir/$lt_tmp_nm
7232      if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then
7233	# Check to see if the nm accepts a BSD-compat flag.
7234	# Adding the 'sed 1q' prevents false positives on HP-UX, which says:
7235	#   nm: unknown option "B" ignored
7236	# Tru64's nm complains that /dev/null is an invalid object file
7237	# MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty
7238	case $build_os in
7239	mingw*) lt_bad_file=conftest.nm/nofile ;;
7240	*) lt_bad_file=/dev/null ;;
7241	esac
7242	case `"$tmp_nm" -B $lt_bad_file 2>&1 | sed '1q'` in
7243	*$lt_bad_file* | *'Invalid file or object type'*)
7244	  lt_cv_path_NM="$tmp_nm -B"
7245	  break 2
7246	  ;;
7247	*)
7248	  case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
7249	  */dev/null*)
7250	    lt_cv_path_NM="$tmp_nm -p"
7251	    break 2
7252	    ;;
7253	  *)
7254	    lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
7255	    continue # so that we can try to find one that supports BSD flags
7256	    ;;
7257	  esac
7258	  ;;
7259	esac
7260      fi
7261    done
7262    IFS=$lt_save_ifs
7263  done
7264  : ${lt_cv_path_NM=no}
7265fi
7266fi
7267{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5
7268$as_echo "$lt_cv_path_NM" >&6; }
7269if test no != "$lt_cv_path_NM"; then
7270  NM=$lt_cv_path_NM
7271else
7272  # Didn't find any BSD compatible name lister, look for dumpbin.
7273  if test -n "$DUMPBIN"; then :
7274    # Let the user override the test.
7275  else
7276    if test -n "$ac_tool_prefix"; then
7277  for ac_prog in dumpbin "link -dump"
7278  do
7279    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
7280set dummy $ac_tool_prefix$ac_prog; ac_word=$2
7281{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7282$as_echo_n "checking for $ac_word... " >&6; }
7283if ${ac_cv_prog_DUMPBIN+:} false; then :
7284  $as_echo_n "(cached) " >&6
7285else
7286  if test -n "$DUMPBIN"; then
7287  ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
7288else
7289as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7290for as_dir in $PATH
7291do
7292  IFS=$as_save_IFS
7293  test -z "$as_dir" && as_dir=.
7294    for ac_exec_ext in '' $ac_executable_extensions; do
7295  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7296    ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog"
7297    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7298    break 2
7299  fi
7300done
7301  done
7302IFS=$as_save_IFS
7303
7304fi
7305fi
7306DUMPBIN=$ac_cv_prog_DUMPBIN
7307if test -n "$DUMPBIN"; then
7308  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
7309$as_echo "$DUMPBIN" >&6; }
7310else
7311  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7312$as_echo "no" >&6; }
7313fi
7314
7315
7316    test -n "$DUMPBIN" && break
7317  done
7318fi
7319if test -z "$DUMPBIN"; then
7320  ac_ct_DUMPBIN=$DUMPBIN
7321  for ac_prog in dumpbin "link -dump"
7322do
7323  # Extract the first word of "$ac_prog", so it can be a program name with args.
7324set dummy $ac_prog; ac_word=$2
7325{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7326$as_echo_n "checking for $ac_word... " >&6; }
7327if ${ac_cv_prog_ac_ct_DUMPBIN+:} false; then :
7328  $as_echo_n "(cached) " >&6
7329else
7330  if test -n "$ac_ct_DUMPBIN"; then
7331  ac_cv_prog_ac_ct_DUMPBIN="$ac_ct_DUMPBIN" # Let the user override the test.
7332else
7333as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7334for as_dir in $PATH
7335do
7336  IFS=$as_save_IFS
7337  test -z "$as_dir" && as_dir=.
7338    for ac_exec_ext in '' $ac_executable_extensions; do
7339  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7340    ac_cv_prog_ac_ct_DUMPBIN="$ac_prog"
7341    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7342    break 2
7343  fi
7344done
7345  done
7346IFS=$as_save_IFS
7347
7348fi
7349fi
7350ac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN
7351if test -n "$ac_ct_DUMPBIN"; then
7352  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DUMPBIN" >&5
7353$as_echo "$ac_ct_DUMPBIN" >&6; }
7354else
7355  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7356$as_echo "no" >&6; }
7357fi
7358
7359
7360  test -n "$ac_ct_DUMPBIN" && break
7361done
7362
7363  if test "x$ac_ct_DUMPBIN" = x; then
7364    DUMPBIN=":"
7365  else
7366    case $cross_compiling:$ac_tool_warned in
7367yes:)
7368{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7369$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7370ac_tool_warned=yes ;;
7371esac
7372    DUMPBIN=$ac_ct_DUMPBIN
7373  fi
7374fi
7375
7376    case `$DUMPBIN -symbols -headers /dev/null 2>&1 | sed '1q'` in
7377    *COFF*)
7378      DUMPBIN="$DUMPBIN -symbols -headers"
7379      ;;
7380    *)
7381      DUMPBIN=:
7382      ;;
7383    esac
7384  fi
7385
7386  if test : != "$DUMPBIN"; then
7387    NM=$DUMPBIN
7388  fi
7389fi
7390test -z "$NM" && NM=nm
7391
7392
7393
7394
7395
7396
7397{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface" >&5
7398$as_echo_n "checking the name lister ($NM) interface... " >&6; }
7399if ${lt_cv_nm_interface+:} false; then :
7400  $as_echo_n "(cached) " >&6
7401else
7402  lt_cv_nm_interface="BSD nm"
7403  echo "int some_variable = 0;" > conftest.$ac_ext
7404  (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&5)
7405  (eval "$ac_compile" 2>conftest.err)
7406  cat conftest.err >&5
7407  (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
7408  (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
7409  cat conftest.err >&5
7410  (eval echo "\"\$as_me:$LINENO: output\"" >&5)
7411  cat conftest.out >&5
7412  if $GREP 'External.*some_variable' conftest.out > /dev/null; then
7413    lt_cv_nm_interface="MS dumpbin"
7414  fi
7415  rm -f conftest*
7416fi
7417{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_nm_interface" >&5
7418$as_echo "$lt_cv_nm_interface" >&6; }
7419
7420{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
7421$as_echo_n "checking whether ln -s works... " >&6; }
7422LN_S=$as_ln_s
7423if test "$LN_S" = "ln -s"; then
7424  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7425$as_echo "yes" >&6; }
7426else
7427  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
7428$as_echo "no, using $LN_S" >&6; }
7429fi
7430
7431# find the maximum length of command line arguments
7432{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5
7433$as_echo_n "checking the maximum length of command line arguments... " >&6; }
7434if ${lt_cv_sys_max_cmd_len+:} false; then :
7435  $as_echo_n "(cached) " >&6
7436else
7437    i=0
7438  teststring=ABCD
7439
7440  case $build_os in
7441  msdosdjgpp*)
7442    # On DJGPP, this test can blow up pretty badly due to problems in libc
7443    # (any single argument exceeding 2000 bytes causes a buffer overrun
7444    # during glob expansion).  Even if it were fixed, the result of this
7445    # check would be larger than it should be.
7446    lt_cv_sys_max_cmd_len=12288;    # 12K is about right
7447    ;;
7448
7449  gnu*)
7450    # Under GNU Hurd, this test is not required because there is
7451    # no limit to the length of command line arguments.
7452    # Libtool will interpret -1 as no limit whatsoever
7453    lt_cv_sys_max_cmd_len=-1;
7454    ;;
7455
7456  cygwin* | mingw* | cegcc*)
7457    # On Win9x/ME, this test blows up -- it succeeds, but takes
7458    # about 5 minutes as the teststring grows exponentially.
7459    # Worse, since 9x/ME are not pre-emptively multitasking,
7460    # you end up with a "frozen" computer, even though with patience
7461    # the test eventually succeeds (with a max line length of 256k).
7462    # Instead, let's just punt: use the minimum linelength reported by
7463    # all of the supported platforms: 8192 (on NT/2K/XP).
7464    lt_cv_sys_max_cmd_len=8192;
7465    ;;
7466
7467  mint*)
7468    # On MiNT this can take a long time and run out of memory.
7469    lt_cv_sys_max_cmd_len=8192;
7470    ;;
7471
7472  amigaos*)
7473    # On AmigaOS with pdksh, this test takes hours, literally.
7474    # So we just punt and use a minimum line length of 8192.
7475    lt_cv_sys_max_cmd_len=8192;
7476    ;;
7477
7478  bitrig* | darwin* | dragonfly* | freebsd* | netbsd* | openbsd*)
7479    # This has been around since 386BSD, at least.  Likely further.
7480    if test -x /sbin/sysctl; then
7481      lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
7482    elif test -x /usr/sbin/sysctl; then
7483      lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
7484    else
7485      lt_cv_sys_max_cmd_len=65536	# usable default for all BSDs
7486    fi
7487    # And add a safety zone
7488    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
7489    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
7490    ;;
7491
7492  interix*)
7493    # We know the value 262144 and hardcode it with a safety zone (like BSD)
7494    lt_cv_sys_max_cmd_len=196608
7495    ;;
7496
7497  os2*)
7498    # The test takes a long time on OS/2.
7499    lt_cv_sys_max_cmd_len=8192
7500    ;;
7501
7502  osf*)
7503    # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
7504    # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
7505    # nice to cause kernel panics so lets avoid the loop below.
7506    # First set a reasonable default.
7507    lt_cv_sys_max_cmd_len=16384
7508    #
7509    if test -x /sbin/sysconfig; then
7510      case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
7511        *1*) lt_cv_sys_max_cmd_len=-1 ;;
7512      esac
7513    fi
7514    ;;
7515  sco3.2v5*)
7516    lt_cv_sys_max_cmd_len=102400
7517    ;;
7518  sysv5* | sco5v6* | sysv4.2uw2*)
7519    kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
7520    if test -n "$kargmax"; then
7521      lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[	 ]//'`
7522    else
7523      lt_cv_sys_max_cmd_len=32768
7524    fi
7525    ;;
7526  *)
7527    lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
7528    if test -n "$lt_cv_sys_max_cmd_len" && \
7529       test undefined != "$lt_cv_sys_max_cmd_len"; then
7530      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
7531      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
7532    else
7533      # Make teststring a little bigger before we do anything with it.
7534      # a 1K string should be a reasonable start.
7535      for i in 1 2 3 4 5 6 7 8; do
7536        teststring=$teststring$teststring
7537      done
7538      SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
7539      # If test is not a shell built-in, we'll probably end up computing a
7540      # maximum length that is only half of the actual maximum length, but
7541      # we can't tell.
7542      while { test X`env echo "$teststring$teststring" 2>/dev/null` \
7543	         = "X$teststring$teststring"; } >/dev/null 2>&1 &&
7544	      test 17 != "$i" # 1/2 MB should be enough
7545      do
7546        i=`expr $i + 1`
7547        teststring=$teststring$teststring
7548      done
7549      # Only check the string length outside the loop.
7550      lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
7551      teststring=
7552      # Add a significant safety factor because C++ compilers can tack on
7553      # massive amounts of additional arguments before passing them to the
7554      # linker.  It appears as though 1/2 is a usable value.
7555      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
7556    fi
7557    ;;
7558  esac
7559
7560fi
7561
7562if test -n "$lt_cv_sys_max_cmd_len"; then
7563  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len" >&5
7564$as_echo "$lt_cv_sys_max_cmd_len" >&6; }
7565else
7566  { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
7567$as_echo "none" >&6; }
7568fi
7569max_cmd_len=$lt_cv_sys_max_cmd_len
7570
7571
7572
7573
7574
7575
7576: ${CP="cp -f"}
7577: ${MV="mv -f"}
7578: ${RM="rm -f"}
7579
7580if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
7581  lt_unset=unset
7582else
7583  lt_unset=false
7584fi
7585
7586
7587
7588
7589
7590# test EBCDIC or ASCII
7591case `echo X|tr X '\101'` in
7592 A) # ASCII based system
7593    # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
7594  lt_SP2NL='tr \040 \012'
7595  lt_NL2SP='tr \015\012 \040\040'
7596  ;;
7597 *) # EBCDIC based system
7598  lt_SP2NL='tr \100 \n'
7599  lt_NL2SP='tr \r\n \100\100'
7600  ;;
7601esac
7602
7603
7604
7605
7606
7607
7608
7609
7610
7611{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to $host format" >&5
7612$as_echo_n "checking how to convert $build file names to $host format... " >&6; }
7613if ${lt_cv_to_host_file_cmd+:} false; then :
7614  $as_echo_n "(cached) " >&6
7615else
7616  case $host in
7617  *-*-mingw* )
7618    case $build in
7619      *-*-mingw* ) # actually msys
7620        lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32
7621        ;;
7622      *-*-cygwin* )
7623        lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32
7624        ;;
7625      * ) # otherwise, assume *nix
7626        lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32
7627        ;;
7628    esac
7629    ;;
7630  *-*-cygwin* )
7631    case $build in
7632      *-*-mingw* ) # actually msys
7633        lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin
7634        ;;
7635      *-*-cygwin* )
7636        lt_cv_to_host_file_cmd=func_convert_file_noop
7637        ;;
7638      * ) # otherwise, assume *nix
7639        lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin
7640        ;;
7641    esac
7642    ;;
7643  * ) # unhandled hosts (and "normal" native builds)
7644    lt_cv_to_host_file_cmd=func_convert_file_noop
7645    ;;
7646esac
7647
7648fi
7649
7650to_host_file_cmd=$lt_cv_to_host_file_cmd
7651{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_host_file_cmd" >&5
7652$as_echo "$lt_cv_to_host_file_cmd" >&6; }
7653
7654
7655
7656
7657
7658{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format" >&5
7659$as_echo_n "checking how to convert $build file names to toolchain format... " >&6; }
7660if ${lt_cv_to_tool_file_cmd+:} false; then :
7661  $as_echo_n "(cached) " >&6
7662else
7663  #assume ordinary cross tools, or native build.
7664lt_cv_to_tool_file_cmd=func_convert_file_noop
7665case $host in
7666  *-*-mingw* )
7667    case $build in
7668      *-*-mingw* ) # actually msys
7669        lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32
7670        ;;
7671    esac
7672    ;;
7673esac
7674
7675fi
7676
7677to_tool_file_cmd=$lt_cv_to_tool_file_cmd
7678{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_tool_file_cmd" >&5
7679$as_echo "$lt_cv_to_tool_file_cmd" >&6; }
7680
7681
7682
7683
7684
7685{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5
7686$as_echo_n "checking for $LD option to reload object files... " >&6; }
7687if ${lt_cv_ld_reload_flag+:} false; then :
7688  $as_echo_n "(cached) " >&6
7689else
7690  lt_cv_ld_reload_flag='-r'
7691fi
7692{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_reload_flag" >&5
7693$as_echo "$lt_cv_ld_reload_flag" >&6; }
7694reload_flag=$lt_cv_ld_reload_flag
7695case $reload_flag in
7696"" | " "*) ;;
7697*) reload_flag=" $reload_flag" ;;
7698esac
7699reload_cmds='$LD$reload_flag -o $output$reload_objs'
7700case $host_os in
7701  cygwin* | mingw* | pw32* | cegcc*)
7702    if test yes != "$GCC"; then
7703      reload_cmds=false
7704    fi
7705    ;;
7706  darwin*)
7707    if test yes = "$GCC"; then
7708      reload_cmds='$LTCC $LTCFLAGS -nostdlib $wl-r -o $output$reload_objs'
7709    else
7710      reload_cmds='$LD$reload_flag -o $output$reload_objs'
7711    fi
7712    ;;
7713esac
7714
7715
7716
7717
7718
7719
7720
7721
7722
7723if test -n "$ac_tool_prefix"; then
7724  # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
7725set dummy ${ac_tool_prefix}objdump; ac_word=$2
7726{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7727$as_echo_n "checking for $ac_word... " >&6; }
7728if ${ac_cv_prog_OBJDUMP+:} false; then :
7729  $as_echo_n "(cached) " >&6
7730else
7731  if test -n "$OBJDUMP"; then
7732  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
7733else
7734as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7735for as_dir in $PATH
7736do
7737  IFS=$as_save_IFS
7738  test -z "$as_dir" && as_dir=.
7739    for ac_exec_ext in '' $ac_executable_extensions; do
7740  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7741    ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
7742    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7743    break 2
7744  fi
7745done
7746  done
7747IFS=$as_save_IFS
7748
7749fi
7750fi
7751OBJDUMP=$ac_cv_prog_OBJDUMP
7752if test -n "$OBJDUMP"; then
7753  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
7754$as_echo "$OBJDUMP" >&6; }
7755else
7756  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7757$as_echo "no" >&6; }
7758fi
7759
7760
7761fi
7762if test -z "$ac_cv_prog_OBJDUMP"; then
7763  ac_ct_OBJDUMP=$OBJDUMP
7764  # Extract the first word of "objdump", so it can be a program name with args.
7765set dummy objdump; ac_word=$2
7766{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7767$as_echo_n "checking for $ac_word... " >&6; }
7768if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
7769  $as_echo_n "(cached) " >&6
7770else
7771  if test -n "$ac_ct_OBJDUMP"; then
7772  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
7773else
7774as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7775for as_dir in $PATH
7776do
7777  IFS=$as_save_IFS
7778  test -z "$as_dir" && as_dir=.
7779    for ac_exec_ext in '' $ac_executable_extensions; do
7780  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7781    ac_cv_prog_ac_ct_OBJDUMP="objdump"
7782    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7783    break 2
7784  fi
7785done
7786  done
7787IFS=$as_save_IFS
7788
7789fi
7790fi
7791ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
7792if test -n "$ac_ct_OBJDUMP"; then
7793  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
7794$as_echo "$ac_ct_OBJDUMP" >&6; }
7795else
7796  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7797$as_echo "no" >&6; }
7798fi
7799
7800  if test "x$ac_ct_OBJDUMP" = x; then
7801    OBJDUMP="false"
7802  else
7803    case $cross_compiling:$ac_tool_warned in
7804yes:)
7805{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7806$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7807ac_tool_warned=yes ;;
7808esac
7809    OBJDUMP=$ac_ct_OBJDUMP
7810  fi
7811else
7812  OBJDUMP="$ac_cv_prog_OBJDUMP"
7813fi
7814
7815test -z "$OBJDUMP" && OBJDUMP=objdump
7816
7817
7818
7819
7820
7821
7822
7823
7824
7825{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries" >&5
7826$as_echo_n "checking how to recognize dependent libraries... " >&6; }
7827if ${lt_cv_deplibs_check_method+:} false; then :
7828  $as_echo_n "(cached) " >&6
7829else
7830  lt_cv_file_magic_cmd='$MAGIC_CMD'
7831lt_cv_file_magic_test_file=
7832lt_cv_deplibs_check_method='unknown'
7833# Need to set the preceding variable on all platforms that support
7834# interlibrary dependencies.
7835# 'none' -- dependencies not supported.
7836# 'unknown' -- same as none, but documents that we really don't know.
7837# 'pass_all' -- all dependencies passed with no checks.
7838# 'test_compile' -- check by making test program.
7839# 'file_magic [[regex]]' -- check by looking for files in library path
7840# that responds to the $file_magic_cmd with a given extended regex.
7841# If you have 'file' or equivalent on your system and you're not sure
7842# whether 'pass_all' will *always* work, you probably want this one.
7843
7844case $host_os in
7845aix[4-9]*)
7846  lt_cv_deplibs_check_method=pass_all
7847  ;;
7848
7849beos*)
7850  lt_cv_deplibs_check_method=pass_all
7851  ;;
7852
7853bsdi[45]*)
7854  lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
7855  lt_cv_file_magic_cmd='/usr/bin/file -L'
7856  lt_cv_file_magic_test_file=/shlib/libc.so
7857  ;;
7858
7859cygwin*)
7860  # func_win32_libid is a shell function defined in ltmain.sh
7861  lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
7862  lt_cv_file_magic_cmd='func_win32_libid'
7863  ;;
7864
7865mingw* | pw32*)
7866  # Base MSYS/MinGW do not provide the 'file' command needed by
7867  # func_win32_libid shell function, so use a weaker test based on 'objdump',
7868  # unless we find 'file', for example because we are cross-compiling.
7869  if ( file / ) >/dev/null 2>&1; then
7870    lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
7871    lt_cv_file_magic_cmd='func_win32_libid'
7872  else
7873    # Keep this pattern in sync with the one in func_win32_libid.
7874    lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)'
7875    lt_cv_file_magic_cmd='$OBJDUMP -f'
7876  fi
7877  ;;
7878
7879cegcc*)
7880  # use the weaker test based on 'objdump'. See mingw*.
7881  lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
7882  lt_cv_file_magic_cmd='$OBJDUMP -f'
7883  ;;
7884
7885darwin* | rhapsody*)
7886  lt_cv_deplibs_check_method=pass_all
7887  ;;
7888
7889freebsd* | dragonfly*)
7890  if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
7891    case $host_cpu in
7892    i*86 )
7893      # Not sure whether the presence of OpenBSD here was a mistake.
7894      # Let's accept both of them until this is cleared up.
7895      lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library'
7896      lt_cv_file_magic_cmd=/usr/bin/file
7897      lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
7898      ;;
7899    esac
7900  else
7901    lt_cv_deplibs_check_method=pass_all
7902  fi
7903  ;;
7904
7905haiku*)
7906  lt_cv_deplibs_check_method=pass_all
7907  ;;
7908
7909hpux10.20* | hpux11*)
7910  lt_cv_file_magic_cmd=/usr/bin/file
7911  case $host_cpu in
7912  ia64*)
7913    lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64'
7914    lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
7915    ;;
7916  hppa*64*)
7917    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]'
7918    lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
7919    ;;
7920  *)
7921    lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9]\.[0-9]) shared library'
7922    lt_cv_file_magic_test_file=/usr/lib/libc.sl
7923    ;;
7924  esac
7925  ;;
7926
7927interix[3-9]*)
7928  # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
7929  lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$'
7930  ;;
7931
7932irix5* | irix6* | nonstopux*)
7933  case $LD in
7934  *-32|*"-32 ") libmagic=32-bit;;
7935  *-n32|*"-n32 ") libmagic=N32;;
7936  *-64|*"-64 ") libmagic=64-bit;;
7937  *) libmagic=never-match;;
7938  esac
7939  lt_cv_deplibs_check_method=pass_all
7940  ;;
7941
7942# This must be glibc/ELF.
7943linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
7944  lt_cv_deplibs_check_method=pass_all
7945  ;;
7946
7947netbsd*)
7948  if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
7949    lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
7950  else
7951    lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$'
7952  fi
7953  ;;
7954
7955newos6*)
7956  lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'
7957  lt_cv_file_magic_cmd=/usr/bin/file
7958  lt_cv_file_magic_test_file=/usr/lib/libnls.so
7959  ;;
7960
7961*nto* | *qnx*)
7962  lt_cv_deplibs_check_method=pass_all
7963  ;;
7964
7965openbsd* | bitrig*)
7966  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
7967    lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$'
7968  else
7969    lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
7970  fi
7971  ;;
7972
7973osf3* | osf4* | osf5*)
7974  lt_cv_deplibs_check_method=pass_all
7975  ;;
7976
7977rdos*)
7978  lt_cv_deplibs_check_method=pass_all
7979  ;;
7980
7981solaris*)
7982  lt_cv_deplibs_check_method=pass_all
7983  ;;
7984
7985sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
7986  lt_cv_deplibs_check_method=pass_all
7987  ;;
7988
7989sysv4 | sysv4.3*)
7990  case $host_vendor in
7991  motorola)
7992    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]'
7993    lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
7994    ;;
7995  ncr)
7996    lt_cv_deplibs_check_method=pass_all
7997    ;;
7998  sequent)
7999    lt_cv_file_magic_cmd='/bin/file'
8000    lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'
8001    ;;
8002  sni)
8003    lt_cv_file_magic_cmd='/bin/file'
8004    lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib"
8005    lt_cv_file_magic_test_file=/lib/libc.so
8006    ;;
8007  siemens)
8008    lt_cv_deplibs_check_method=pass_all
8009    ;;
8010  pc)
8011    lt_cv_deplibs_check_method=pass_all
8012    ;;
8013  esac
8014  ;;
8015
8016tpf*)
8017  lt_cv_deplibs_check_method=pass_all
8018  ;;
8019os2*)
8020  lt_cv_deplibs_check_method=pass_all
8021  ;;
8022esac
8023
8024fi
8025{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5
8026$as_echo "$lt_cv_deplibs_check_method" >&6; }
8027
8028file_magic_glob=
8029want_nocaseglob=no
8030if test "$build" = "$host"; then
8031  case $host_os in
8032  mingw* | pw32*)
8033    if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then
8034      want_nocaseglob=yes
8035    else
8036      file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[\1]\/[\1]\/g;/g"`
8037    fi
8038    ;;
8039  esac
8040fi
8041
8042file_magic_cmd=$lt_cv_file_magic_cmd
8043deplibs_check_method=$lt_cv_deplibs_check_method
8044test -z "$deplibs_check_method" && deplibs_check_method=unknown
8045
8046
8047
8048
8049
8050
8051
8052
8053
8054
8055
8056
8057
8058
8059
8060
8061
8062
8063
8064
8065
8066
8067if test -n "$ac_tool_prefix"; then
8068  # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
8069set dummy ${ac_tool_prefix}dlltool; ac_word=$2
8070{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8071$as_echo_n "checking for $ac_word... " >&6; }
8072if ${ac_cv_prog_DLLTOOL+:} false; then :
8073  $as_echo_n "(cached) " >&6
8074else
8075  if test -n "$DLLTOOL"; then
8076  ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
8077else
8078as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8079for as_dir in $PATH
8080do
8081  IFS=$as_save_IFS
8082  test -z "$as_dir" && as_dir=.
8083    for ac_exec_ext in '' $ac_executable_extensions; do
8084  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8085    ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
8086    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8087    break 2
8088  fi
8089done
8090  done
8091IFS=$as_save_IFS
8092
8093fi
8094fi
8095DLLTOOL=$ac_cv_prog_DLLTOOL
8096if test -n "$DLLTOOL"; then
8097  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5
8098$as_echo "$DLLTOOL" >&6; }
8099else
8100  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8101$as_echo "no" >&6; }
8102fi
8103
8104
8105fi
8106if test -z "$ac_cv_prog_DLLTOOL"; then
8107  ac_ct_DLLTOOL=$DLLTOOL
8108  # Extract the first word of "dlltool", so it can be a program name with args.
8109set dummy dlltool; ac_word=$2
8110{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8111$as_echo_n "checking for $ac_word... " >&6; }
8112if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then :
8113  $as_echo_n "(cached) " >&6
8114else
8115  if test -n "$ac_ct_DLLTOOL"; then
8116  ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
8117else
8118as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8119for as_dir in $PATH
8120do
8121  IFS=$as_save_IFS
8122  test -z "$as_dir" && as_dir=.
8123    for ac_exec_ext in '' $ac_executable_extensions; do
8124  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8125    ac_cv_prog_ac_ct_DLLTOOL="dlltool"
8126    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8127    break 2
8128  fi
8129done
8130  done
8131IFS=$as_save_IFS
8132
8133fi
8134fi
8135ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
8136if test -n "$ac_ct_DLLTOOL"; then
8137  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5
8138$as_echo "$ac_ct_DLLTOOL" >&6; }
8139else
8140  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8141$as_echo "no" >&6; }
8142fi
8143
8144  if test "x$ac_ct_DLLTOOL" = x; then
8145    DLLTOOL="false"
8146  else
8147    case $cross_compiling:$ac_tool_warned in
8148yes:)
8149{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8150$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8151ac_tool_warned=yes ;;
8152esac
8153    DLLTOOL=$ac_ct_DLLTOOL
8154  fi
8155else
8156  DLLTOOL="$ac_cv_prog_DLLTOOL"
8157fi
8158
8159test -z "$DLLTOOL" && DLLTOOL=dlltool
8160
8161
8162
8163
8164
8165
8166
8167
8168
8169
8170{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to associate runtime and link libraries" >&5
8171$as_echo_n "checking how to associate runtime and link libraries... " >&6; }
8172if ${lt_cv_sharedlib_from_linklib_cmd+:} false; then :
8173  $as_echo_n "(cached) " >&6
8174else
8175  lt_cv_sharedlib_from_linklib_cmd='unknown'
8176
8177case $host_os in
8178cygwin* | mingw* | pw32* | cegcc*)
8179  # two different shell functions defined in ltmain.sh;
8180  # decide which one to use based on capabilities of $DLLTOOL
8181  case `$DLLTOOL --help 2>&1` in
8182  *--identify-strict*)
8183    lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib
8184    ;;
8185  *)
8186    lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback
8187    ;;
8188  esac
8189  ;;
8190*)
8191  # fallback: assume linklib IS sharedlib
8192  lt_cv_sharedlib_from_linklib_cmd=$ECHO
8193  ;;
8194esac
8195
8196fi
8197{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sharedlib_from_linklib_cmd" >&5
8198$as_echo "$lt_cv_sharedlib_from_linklib_cmd" >&6; }
8199sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd
8200test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO
8201
8202
8203
8204
8205
8206
8207
8208if test -n "$ac_tool_prefix"; then
8209  for ac_prog in ar
8210  do
8211    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
8212set dummy $ac_tool_prefix$ac_prog; ac_word=$2
8213{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8214$as_echo_n "checking for $ac_word... " >&6; }
8215if ${ac_cv_prog_AR+:} false; then :
8216  $as_echo_n "(cached) " >&6
8217else
8218  if test -n "$AR"; then
8219  ac_cv_prog_AR="$AR" # Let the user override the test.
8220else
8221as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8222for as_dir in $PATH
8223do
8224  IFS=$as_save_IFS
8225  test -z "$as_dir" && as_dir=.
8226    for ac_exec_ext in '' $ac_executable_extensions; do
8227  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8228    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
8229    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8230    break 2
8231  fi
8232done
8233  done
8234IFS=$as_save_IFS
8235
8236fi
8237fi
8238AR=$ac_cv_prog_AR
8239if test -n "$AR"; then
8240  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
8241$as_echo "$AR" >&6; }
8242else
8243  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8244$as_echo "no" >&6; }
8245fi
8246
8247
8248    test -n "$AR" && break
8249  done
8250fi
8251if test -z "$AR"; then
8252  ac_ct_AR=$AR
8253  for ac_prog in ar
8254do
8255  # Extract the first word of "$ac_prog", so it can be a program name with args.
8256set dummy $ac_prog; ac_word=$2
8257{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8258$as_echo_n "checking for $ac_word... " >&6; }
8259if ${ac_cv_prog_ac_ct_AR+:} false; then :
8260  $as_echo_n "(cached) " >&6
8261else
8262  if test -n "$ac_ct_AR"; then
8263  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
8264else
8265as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8266for as_dir in $PATH
8267do
8268  IFS=$as_save_IFS
8269  test -z "$as_dir" && as_dir=.
8270    for ac_exec_ext in '' $ac_executable_extensions; do
8271  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8272    ac_cv_prog_ac_ct_AR="$ac_prog"
8273    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8274    break 2
8275  fi
8276done
8277  done
8278IFS=$as_save_IFS
8279
8280fi
8281fi
8282ac_ct_AR=$ac_cv_prog_ac_ct_AR
8283if test -n "$ac_ct_AR"; then
8284  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
8285$as_echo "$ac_ct_AR" >&6; }
8286else
8287  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8288$as_echo "no" >&6; }
8289fi
8290
8291
8292  test -n "$ac_ct_AR" && break
8293done
8294
8295  if test "x$ac_ct_AR" = x; then
8296    AR="false"
8297  else
8298    case $cross_compiling:$ac_tool_warned in
8299yes:)
8300{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8301$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8302ac_tool_warned=yes ;;
8303esac
8304    AR=$ac_ct_AR
8305  fi
8306fi
8307
8308: ${AR=ar}
8309: ${AR_FLAGS=cru}
8310
8311
8312
8313
8314
8315
8316
8317
8318
8319
8320
8321{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support" >&5
8322$as_echo_n "checking for archiver @FILE support... " >&6; }
8323if ${lt_cv_ar_at_file+:} false; then :
8324  $as_echo_n "(cached) " >&6
8325else
8326  lt_cv_ar_at_file=no
8327   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8328/* end confdefs.h.  */
8329
8330int
8331main ()
8332{
8333
8334  ;
8335  return 0;
8336}
8337_ACEOF
8338if ac_fn_c_try_compile "$LINENO"; then :
8339  echo conftest.$ac_objext > conftest.lst
8340      lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&5'
8341      { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5
8342  (eval $lt_ar_try) 2>&5
8343  ac_status=$?
8344  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8345  test $ac_status = 0; }
8346      if test 0 -eq "$ac_status"; then
8347	# Ensure the archiver fails upon bogus file names.
8348	rm -f conftest.$ac_objext libconftest.a
8349	{ { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5
8350  (eval $lt_ar_try) 2>&5
8351  ac_status=$?
8352  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8353  test $ac_status = 0; }
8354	if test 0 -ne "$ac_status"; then
8355          lt_cv_ar_at_file=@
8356        fi
8357      fi
8358      rm -f conftest.* libconftest.a
8359
8360fi
8361rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8362
8363fi
8364{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5
8365$as_echo "$lt_cv_ar_at_file" >&6; }
8366
8367if test no = "$lt_cv_ar_at_file"; then
8368  archiver_list_spec=
8369else
8370  archiver_list_spec=$lt_cv_ar_at_file
8371fi
8372
8373
8374
8375
8376
8377
8378
8379if test -n "$ac_tool_prefix"; then
8380  # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
8381set dummy ${ac_tool_prefix}strip; ac_word=$2
8382{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8383$as_echo_n "checking for $ac_word... " >&6; }
8384if ${ac_cv_prog_STRIP+:} false; then :
8385  $as_echo_n "(cached) " >&6
8386else
8387  if test -n "$STRIP"; then
8388  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
8389else
8390as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8391for as_dir in $PATH
8392do
8393  IFS=$as_save_IFS
8394  test -z "$as_dir" && as_dir=.
8395    for ac_exec_ext in '' $ac_executable_extensions; do
8396  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8397    ac_cv_prog_STRIP="${ac_tool_prefix}strip"
8398    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8399    break 2
8400  fi
8401done
8402  done
8403IFS=$as_save_IFS
8404
8405fi
8406fi
8407STRIP=$ac_cv_prog_STRIP
8408if test -n "$STRIP"; then
8409  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
8410$as_echo "$STRIP" >&6; }
8411else
8412  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8413$as_echo "no" >&6; }
8414fi
8415
8416
8417fi
8418if test -z "$ac_cv_prog_STRIP"; then
8419  ac_ct_STRIP=$STRIP
8420  # Extract the first word of "strip", so it can be a program name with args.
8421set dummy strip; ac_word=$2
8422{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8423$as_echo_n "checking for $ac_word... " >&6; }
8424if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
8425  $as_echo_n "(cached) " >&6
8426else
8427  if test -n "$ac_ct_STRIP"; then
8428  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
8429else
8430as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8431for as_dir in $PATH
8432do
8433  IFS=$as_save_IFS
8434  test -z "$as_dir" && as_dir=.
8435    for ac_exec_ext in '' $ac_executable_extensions; do
8436  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8437    ac_cv_prog_ac_ct_STRIP="strip"
8438    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8439    break 2
8440  fi
8441done
8442  done
8443IFS=$as_save_IFS
8444
8445fi
8446fi
8447ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
8448if test -n "$ac_ct_STRIP"; then
8449  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
8450$as_echo "$ac_ct_STRIP" >&6; }
8451else
8452  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8453$as_echo "no" >&6; }
8454fi
8455
8456  if test "x$ac_ct_STRIP" = x; then
8457    STRIP=":"
8458  else
8459    case $cross_compiling:$ac_tool_warned in
8460yes:)
8461{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8462$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8463ac_tool_warned=yes ;;
8464esac
8465    STRIP=$ac_ct_STRIP
8466  fi
8467else
8468  STRIP="$ac_cv_prog_STRIP"
8469fi
8470
8471test -z "$STRIP" && STRIP=:
8472
8473
8474
8475
8476
8477
8478if test -n "$ac_tool_prefix"; then
8479  # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
8480set dummy ${ac_tool_prefix}ranlib; ac_word=$2
8481{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8482$as_echo_n "checking for $ac_word... " >&6; }
8483if ${ac_cv_prog_RANLIB+:} false; then :
8484  $as_echo_n "(cached) " >&6
8485else
8486  if test -n "$RANLIB"; then
8487  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
8488else
8489as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8490for as_dir in $PATH
8491do
8492  IFS=$as_save_IFS
8493  test -z "$as_dir" && as_dir=.
8494    for ac_exec_ext in '' $ac_executable_extensions; do
8495  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8496    ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
8497    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8498    break 2
8499  fi
8500done
8501  done
8502IFS=$as_save_IFS
8503
8504fi
8505fi
8506RANLIB=$ac_cv_prog_RANLIB
8507if test -n "$RANLIB"; then
8508  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
8509$as_echo "$RANLIB" >&6; }
8510else
8511  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8512$as_echo "no" >&6; }
8513fi
8514
8515
8516fi
8517if test -z "$ac_cv_prog_RANLIB"; then
8518  ac_ct_RANLIB=$RANLIB
8519  # Extract the first word of "ranlib", so it can be a program name with args.
8520set dummy ranlib; ac_word=$2
8521{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8522$as_echo_n "checking for $ac_word... " >&6; }
8523if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
8524  $as_echo_n "(cached) " >&6
8525else
8526  if test -n "$ac_ct_RANLIB"; then
8527  ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
8528else
8529as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8530for as_dir in $PATH
8531do
8532  IFS=$as_save_IFS
8533  test -z "$as_dir" && as_dir=.
8534    for ac_exec_ext in '' $ac_executable_extensions; do
8535  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8536    ac_cv_prog_ac_ct_RANLIB="ranlib"
8537    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8538    break 2
8539  fi
8540done
8541  done
8542IFS=$as_save_IFS
8543
8544fi
8545fi
8546ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
8547if test -n "$ac_ct_RANLIB"; then
8548  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
8549$as_echo "$ac_ct_RANLIB" >&6; }
8550else
8551  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8552$as_echo "no" >&6; }
8553fi
8554
8555  if test "x$ac_ct_RANLIB" = x; then
8556    RANLIB=":"
8557  else
8558    case $cross_compiling:$ac_tool_warned in
8559yes:)
8560{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8561$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8562ac_tool_warned=yes ;;
8563esac
8564    RANLIB=$ac_ct_RANLIB
8565  fi
8566else
8567  RANLIB="$ac_cv_prog_RANLIB"
8568fi
8569
8570test -z "$RANLIB" && RANLIB=:
8571
8572
8573
8574
8575
8576
8577# Determine commands to create old-style static archives.
8578old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
8579old_postinstall_cmds='chmod 644 $oldlib'
8580old_postuninstall_cmds=
8581
8582if test -n "$RANLIB"; then
8583  case $host_os in
8584  bitrig* | openbsd*)
8585    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib"
8586    ;;
8587  *)
8588    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib"
8589    ;;
8590  esac
8591  old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib"
8592fi
8593
8594case $host_os in
8595  darwin*)
8596    lock_old_archive_extraction=yes ;;
8597  *)
8598    lock_old_archive_extraction=no ;;
8599esac
8600
8601
8602
8603
8604
8605
8606
8607
8608
8609
8610
8611
8612
8613
8614
8615
8616
8617
8618
8619
8620
8621for ac_prog in gawk mawk nawk awk
8622do
8623  # Extract the first word of "$ac_prog", so it can be a program name with args.
8624set dummy $ac_prog; ac_word=$2
8625{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8626$as_echo_n "checking for $ac_word... " >&6; }
8627if ${ac_cv_prog_AWK+:} false; then :
8628  $as_echo_n "(cached) " >&6
8629else
8630  if test -n "$AWK"; then
8631  ac_cv_prog_AWK="$AWK" # Let the user override the test.
8632else
8633as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8634for as_dir in $PATH
8635do
8636  IFS=$as_save_IFS
8637  test -z "$as_dir" && as_dir=.
8638    for ac_exec_ext in '' $ac_executable_extensions; do
8639  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8640    ac_cv_prog_AWK="$ac_prog"
8641    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8642    break 2
8643  fi
8644done
8645  done
8646IFS=$as_save_IFS
8647
8648fi
8649fi
8650AWK=$ac_cv_prog_AWK
8651if test -n "$AWK"; then
8652  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
8653$as_echo "$AWK" >&6; }
8654else
8655  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8656$as_echo "no" >&6; }
8657fi
8658
8659
8660  test -n "$AWK" && break
8661done
8662
8663
8664
8665
8666
8667
8668
8669
8670
8671
8672
8673
8674
8675
8676
8677
8678
8679
8680
8681# If no C compiler was specified, use CC.
8682LTCC=${LTCC-"$CC"}
8683
8684# If no C compiler flags were specified, use CFLAGS.
8685LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
8686
8687# Allow CC to be a program name with arguments.
8688compiler=$CC
8689
8690
8691# Check for command to grab the raw symbol name followed by C symbol from nm.
8692{ $as_echo "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5
8693$as_echo_n "checking command to parse $NM output from $compiler object... " >&6; }
8694if ${lt_cv_sys_global_symbol_pipe+:} false; then :
8695  $as_echo_n "(cached) " >&6
8696else
8697
8698# These are sane defaults that work on at least a few old systems.
8699# [They come from Ultrix.  What could be older than Ultrix?!! ;)]
8700
8701# Character class describing NM global symbol codes.
8702symcode='[BCDEGRST]'
8703
8704# Regexp to match symbols that can be accessed directly from C.
8705sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
8706
8707# Define system-specific variables.
8708case $host_os in
8709aix*)
8710  symcode='[BCDT]'
8711  ;;
8712cygwin* | mingw* | pw32* | cegcc*)
8713  symcode='[ABCDGISTW]'
8714  ;;
8715hpux*)
8716  if test ia64 = "$host_cpu"; then
8717    symcode='[ABCDEGRST]'
8718  fi
8719  ;;
8720irix* | nonstopux*)
8721  symcode='[BCDEGRST]'
8722  ;;
8723osf*)
8724  symcode='[BCDEGQRST]'
8725  ;;
8726solaris*)
8727  symcode='[BDRT]'
8728  ;;
8729sco3.2v5*)
8730  symcode='[DT]'
8731  ;;
8732sysv4.2uw2*)
8733  symcode='[DT]'
8734  ;;
8735sysv5* | sco5v6* | unixware* | OpenUNIX*)
8736  symcode='[ABDT]'
8737  ;;
8738sysv4)
8739  symcode='[DFNSTU]'
8740  ;;
8741esac
8742
8743# If we're using GNU nm, then use its standard symbol codes.
8744case `$NM -V 2>&1` in
8745*GNU* | *'with BFD'*)
8746  symcode='[ABCDGIRSTW]' ;;
8747esac
8748
8749if test "$lt_cv_nm_interface" = "MS dumpbin"; then
8750  # Gets list of data symbols to import.
8751  lt_cv_sys_global_symbol_to_import="sed -n -e 's/^I .* \(.*\)$/\1/p'"
8752  # Adjust the below global symbol transforms to fixup imported variables.
8753  lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'"
8754  lt_c_name_hook=" -e 's/^I .* \(.*\)$/  {\"\1\", (void *) 0},/p'"
8755  lt_c_name_lib_hook="\
8756  -e 's/^I .* \(lib.*\)$/  {\"\1\", (void *) 0},/p'\
8757  -e 's/^I .* \(.*\)$/  {\"lib\1\", (void *) 0},/p'"
8758else
8759  # Disable hooks by default.
8760  lt_cv_sys_global_symbol_to_import=
8761  lt_cdecl_hook=
8762  lt_c_name_hook=
8763  lt_c_name_lib_hook=
8764fi
8765
8766# Transform an extracted symbol line into a proper C declaration.
8767# Some systems (esp. on ia64) link data and code symbols differently,
8768# so use this general approach.
8769lt_cv_sys_global_symbol_to_cdecl="sed -n"\
8770$lt_cdecl_hook\
8771" -e 's/^T .* \(.*\)$/extern int \1();/p'"\
8772" -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'"
8773
8774# Transform an extracted symbol line into symbol name and symbol address
8775lt_cv_sys_global_symbol_to_c_name_address="sed -n"\
8776$lt_c_name_hook\
8777" -e 's/^: \(.*\) .*$/  {\"\1\", (void *) 0},/p'"\
8778" -e 's/^$symcode$symcode* .* \(.*\)$/  {\"\1\", (void *) \&\1},/p'"
8779
8780# Transform an extracted symbol line into symbol name with lib prefix and
8781# symbol address.
8782lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n"\
8783$lt_c_name_lib_hook\
8784" -e 's/^: \(.*\) .*$/  {\"\1\", (void *) 0},/p'"\
8785" -e 's/^$symcode$symcode* .* \(lib.*\)$/  {\"\1\", (void *) \&\1},/p'"\
8786" -e 's/^$symcode$symcode* .* \(.*\)$/  {\"lib\1\", (void *) \&\1},/p'"
8787
8788# Handle CRLF in mingw tool chain
8789opt_cr=
8790case $build_os in
8791mingw*)
8792  opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
8793  ;;
8794esac
8795
8796# Try without a prefix underscore, then with it.
8797for ac_symprfx in "" "_"; do
8798
8799  # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
8800  symxfrm="\\1 $ac_symprfx\\2 \\2"
8801
8802  # Write the raw and C identifiers.
8803  if test "$lt_cv_nm_interface" = "MS dumpbin"; then
8804    # Fake it for dumpbin and say T for any non-static function,
8805    # D for any global variable and I for any imported variable.
8806    # Also find C++ and __fastcall symbols from MSVC++,
8807    # which start with @ or ?.
8808    lt_cv_sys_global_symbol_pipe="$AWK '"\
8809"     {last_section=section; section=\$ 3};"\
8810"     /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\
8811"     /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
8812"     /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\
8813"     /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\
8814"     /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\
8815"     \$ 0!~/External *\|/{next};"\
8816"     / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
8817"     {if(hide[section]) next};"\
8818"     {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\
8819"     {split(\$ 0,a,/\||\r/); split(a[2],s)};"\
8820"     s[1]~/^[@?]/{print f,s[1],s[1]; next};"\
8821"     s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\
8822"     ' prfx=^$ac_symprfx"
8823  else
8824    lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[	 ]\($symcode$symcode*\)[	 ][	 ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
8825  fi
8826  lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'"
8827
8828  # Check to see that the pipe works correctly.
8829  pipe_works=no
8830
8831  rm -f conftest*
8832  cat > conftest.$ac_ext <<_LT_EOF
8833#ifdef __cplusplus
8834extern "C" {
8835#endif
8836char nm_test_var;
8837void nm_test_func(void);
8838void nm_test_func(void){}
8839#ifdef __cplusplus
8840}
8841#endif
8842int main(){nm_test_var='a';nm_test_func();return(0);}
8843_LT_EOF
8844
8845  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
8846  (eval $ac_compile) 2>&5
8847  ac_status=$?
8848  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8849  test $ac_status = 0; }; then
8850    # Now try to grab the symbols.
8851    nlist=conftest.nm
8852    if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist\""; } >&5
8853  (eval $NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) 2>&5
8854  ac_status=$?
8855  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8856  test $ac_status = 0; } && test -s "$nlist"; then
8857      # Try sorting and uniquifying the output.
8858      if sort "$nlist" | uniq > "$nlist"T; then
8859	mv -f "$nlist"T "$nlist"
8860      else
8861	rm -f "$nlist"T
8862      fi
8863
8864      # Make sure that we snagged all the symbols we need.
8865      if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
8866	if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
8867	  cat <<_LT_EOF > conftest.$ac_ext
8868/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests.  */
8869#if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE
8870/* DATA imports from DLLs on WIN32 can't be const, because runtime
8871   relocations are performed -- see ld's documentation on pseudo-relocs.  */
8872# define LT_DLSYM_CONST
8873#elif defined __osf__
8874/* This system does not cope well with relocations in const data.  */
8875# define LT_DLSYM_CONST
8876#else
8877# define LT_DLSYM_CONST const
8878#endif
8879
8880#ifdef __cplusplus
8881extern "C" {
8882#endif
8883
8884_LT_EOF
8885	  # Now generate the symbol file.
8886	  eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
8887
8888	  cat <<_LT_EOF >> conftest.$ac_ext
8889
8890/* The mapping between symbol names and symbols.  */
8891LT_DLSYM_CONST struct {
8892  const char *name;
8893  void       *address;
8894}
8895lt__PROGRAM__LTX_preloaded_symbols[] =
8896{
8897  { "@PROGRAM@", (void *) 0 },
8898_LT_EOF
8899	  $SED "s/^$symcode$symcode* .* \(.*\)$/  {\"\1\", (void *) \&\1},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
8900	  cat <<\_LT_EOF >> conftest.$ac_ext
8901  {0, (void *) 0}
8902};
8903
8904/* This works around a problem in FreeBSD linker */
8905#ifdef FREEBSD_WORKAROUND
8906static const void *lt_preloaded_setup() {
8907  return lt__PROGRAM__LTX_preloaded_symbols;
8908}
8909#endif
8910
8911#ifdef __cplusplus
8912}
8913#endif
8914_LT_EOF
8915	  # Now try linking the two files.
8916	  mv conftest.$ac_objext conftstm.$ac_objext
8917	  lt_globsym_save_LIBS=$LIBS
8918	  lt_globsym_save_CFLAGS=$CFLAGS
8919	  LIBS=conftstm.$ac_objext
8920	  CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag"
8921	  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
8922  (eval $ac_link) 2>&5
8923  ac_status=$?
8924  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8925  test $ac_status = 0; } && test -s conftest$ac_exeext; then
8926	    pipe_works=yes
8927	  fi
8928	  LIBS=$lt_globsym_save_LIBS
8929	  CFLAGS=$lt_globsym_save_CFLAGS
8930	else
8931	  echo "cannot find nm_test_func in $nlist" >&5
8932	fi
8933      else
8934	echo "cannot find nm_test_var in $nlist" >&5
8935      fi
8936    else
8937      echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5
8938    fi
8939  else
8940    echo "$progname: failed program was:" >&5
8941    cat conftest.$ac_ext >&5
8942  fi
8943  rm -rf conftest* conftst*
8944
8945  # Do not use the global_symbol_pipe unless it works.
8946  if test yes = "$pipe_works"; then
8947    break
8948  else
8949    lt_cv_sys_global_symbol_pipe=
8950  fi
8951done
8952
8953fi
8954
8955if test -z "$lt_cv_sys_global_symbol_pipe"; then
8956  lt_cv_sys_global_symbol_to_cdecl=
8957fi
8958if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
8959  { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
8960$as_echo "failed" >&6; }
8961else
8962  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
8963$as_echo "ok" >&6; }
8964fi
8965
8966# Response file support.
8967if test "$lt_cv_nm_interface" = "MS dumpbin"; then
8968  nm_file_list_spec='@'
8969elif $NM --help 2>/dev/null | grep '[@]FILE' >/dev/null; then
8970  nm_file_list_spec='@'
8971fi
8972
8973
8974
8975
8976
8977
8978
8979
8980
8981
8982
8983
8984
8985
8986
8987
8988
8989
8990
8991
8992
8993
8994
8995
8996
8997
8998
8999
9000
9001
9002
9003
9004
9005
9006
9007
9008
9009{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
9010$as_echo_n "checking for sysroot... " >&6; }
9011
9012# Check whether --with-sysroot was given.
9013if test "${with_sysroot+set}" = set; then :
9014  withval=$with_sysroot;
9015else
9016  with_sysroot=no
9017fi
9018
9019
9020lt_sysroot=
9021case $with_sysroot in #(
9022 yes)
9023   if test yes = "$GCC"; then
9024     lt_sysroot=`$CC --print-sysroot 2>/dev/null`
9025   fi
9026   ;; #(
9027 /*)
9028   lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"`
9029   ;; #(
9030 no|'')
9031   ;; #(
9032 *)
9033   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_sysroot" >&5
9034$as_echo "$with_sysroot" >&6; }
9035   as_fn_error $? "The sysroot must be an absolute path." "$LINENO" 5
9036   ;;
9037esac
9038
9039 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}" >&5
9040$as_echo "${lt_sysroot:-no}" >&6; }
9041
9042
9043
9044
9045
9046{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a working dd" >&5
9047$as_echo_n "checking for a working dd... " >&6; }
9048if ${ac_cv_path_lt_DD+:} false; then :
9049  $as_echo_n "(cached) " >&6
9050else
9051  printf 0123456789abcdef0123456789abcdef >conftest.i
9052cat conftest.i conftest.i >conftest2.i
9053: ${lt_DD:=$DD}
9054if test -z "$lt_DD"; then
9055  ac_path_lt_DD_found=false
9056  # Loop through the user's path and test for each of PROGNAME-LIST
9057  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9058for as_dir in $PATH
9059do
9060  IFS=$as_save_IFS
9061  test -z "$as_dir" && as_dir=.
9062    for ac_prog in dd; do
9063    for ac_exec_ext in '' $ac_executable_extensions; do
9064      ac_path_lt_DD="$as_dir/$ac_prog$ac_exec_ext"
9065      as_fn_executable_p "$ac_path_lt_DD" || continue
9066if "$ac_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then
9067  cmp -s conftest.i conftest.out \
9068  && ac_cv_path_lt_DD="$ac_path_lt_DD" ac_path_lt_DD_found=:
9069fi
9070      $ac_path_lt_DD_found && break 3
9071    done
9072  done
9073  done
9074IFS=$as_save_IFS
9075  if test -z "$ac_cv_path_lt_DD"; then
9076    :
9077  fi
9078else
9079  ac_cv_path_lt_DD=$lt_DD
9080fi
9081
9082rm -f conftest.i conftest2.i conftest.out
9083fi
9084{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_lt_DD" >&5
9085$as_echo "$ac_cv_path_lt_DD" >&6; }
9086
9087
9088{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to truncate binary pipes" >&5
9089$as_echo_n "checking how to truncate binary pipes... " >&6; }
9090if ${lt_cv_truncate_bin+:} false; then :
9091  $as_echo_n "(cached) " >&6
9092else
9093  printf 0123456789abcdef0123456789abcdef >conftest.i
9094cat conftest.i conftest.i >conftest2.i
9095lt_cv_truncate_bin=
9096if "$ac_cv_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then
9097  cmp -s conftest.i conftest.out \
9098  && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1"
9099fi
9100rm -f conftest.i conftest2.i conftest.out
9101test -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q"
9102fi
9103{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_truncate_bin" >&5
9104$as_echo "$lt_cv_truncate_bin" >&6; }
9105
9106
9107
9108
9109
9110
9111
9112# Calculate cc_basename.  Skip known compiler wrappers and cross-prefix.
9113func_cc_basename ()
9114{
9115    for cc_temp in $*""; do
9116      case $cc_temp in
9117        compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
9118        distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
9119        \-*) ;;
9120        *) break;;
9121      esac
9122    done
9123    func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
9124}
9125
9126# Check whether --enable-libtool-lock was given.
9127if test "${enable_libtool_lock+set}" = set; then :
9128  enableval=$enable_libtool_lock;
9129fi
9130
9131test no = "$enable_libtool_lock" || enable_libtool_lock=yes
9132
9133# Some flags need to be propagated to the compiler or linker for good
9134# libtool support.
9135case $host in
9136ia64-*-hpux*)
9137  # Find out what ABI is being produced by ac_compile, and set mode
9138  # options accordingly.
9139  echo 'int i;' > conftest.$ac_ext
9140  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
9141  (eval $ac_compile) 2>&5
9142  ac_status=$?
9143  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
9144  test $ac_status = 0; }; then
9145    case `/usr/bin/file conftest.$ac_objext` in
9146      *ELF-32*)
9147	HPUX_IA64_MODE=32
9148	;;
9149      *ELF-64*)
9150	HPUX_IA64_MODE=64
9151	;;
9152    esac
9153  fi
9154  rm -rf conftest*
9155  ;;
9156*-*-irix6*)
9157  # Find out what ABI is being produced by ac_compile, and set linker
9158  # options accordingly.
9159  echo '#line '$LINENO' "configure"' > conftest.$ac_ext
9160  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
9161  (eval $ac_compile) 2>&5
9162  ac_status=$?
9163  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
9164  test $ac_status = 0; }; then
9165    if test yes = "$lt_cv_prog_gnu_ld"; then
9166      case `/usr/bin/file conftest.$ac_objext` in
9167	*32-bit*)
9168	  LD="${LD-ld} -melf32bsmip"
9169	  ;;
9170	*N32*)
9171	  LD="${LD-ld} -melf32bmipn32"
9172	  ;;
9173	*64-bit*)
9174	  LD="${LD-ld} -melf64bmip"
9175	;;
9176      esac
9177    else
9178      case `/usr/bin/file conftest.$ac_objext` in
9179	*32-bit*)
9180	  LD="${LD-ld} -32"
9181	  ;;
9182	*N32*)
9183	  LD="${LD-ld} -n32"
9184	  ;;
9185	*64-bit*)
9186	  LD="${LD-ld} -64"
9187	  ;;
9188      esac
9189    fi
9190  fi
9191  rm -rf conftest*
9192  ;;
9193
9194mips64*-*linux*)
9195  # Find out what ABI is being produced by ac_compile, and set linker
9196  # options accordingly.
9197  echo '#line '$LINENO' "configure"' > conftest.$ac_ext
9198  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
9199  (eval $ac_compile) 2>&5
9200  ac_status=$?
9201  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
9202  test $ac_status = 0; }; then
9203    emul=elf
9204    case `/usr/bin/file conftest.$ac_objext` in
9205      *32-bit*)
9206	emul="${emul}32"
9207	;;
9208      *64-bit*)
9209	emul="${emul}64"
9210	;;
9211    esac
9212    case `/usr/bin/file conftest.$ac_objext` in
9213      *MSB*)
9214	emul="${emul}btsmip"
9215	;;
9216      *LSB*)
9217	emul="${emul}ltsmip"
9218	;;
9219    esac
9220    case `/usr/bin/file conftest.$ac_objext` in
9221      *N32*)
9222	emul="${emul}n32"
9223	;;
9224    esac
9225    LD="${LD-ld} -m $emul"
9226  fi
9227  rm -rf conftest*
9228  ;;
9229
9230x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \
9231s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
9232  # Find out what ABI is being produced by ac_compile, and set linker
9233  # options accordingly.  Note that the listed cases only cover the
9234  # situations where additional linker options are needed (such as when
9235  # doing 32-bit compilation for a host where ld defaults to 64-bit, or
9236  # vice versa); the common cases where no linker options are needed do
9237  # not appear in the list.
9238  echo 'int i;' > conftest.$ac_ext
9239  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
9240  (eval $ac_compile) 2>&5
9241  ac_status=$?
9242  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
9243  test $ac_status = 0; }; then
9244    case `/usr/bin/file conftest.o` in
9245      *32-bit*)
9246	case $host in
9247	  x86_64-*kfreebsd*-gnu)
9248	    LD="${LD-ld} -m elf_i386_fbsd"
9249	    ;;
9250	  x86_64-*linux*)
9251	    case `/usr/bin/file conftest.o` in
9252	      *x86-64*)
9253		LD="${LD-ld} -m elf32_x86_64"
9254		;;
9255	      *)
9256		LD="${LD-ld} -m elf_i386"
9257		;;
9258	    esac
9259	    ;;
9260	  powerpc64le-*linux*)
9261	    LD="${LD-ld} -m elf32lppclinux"
9262	    ;;
9263	  powerpc64-*linux*)
9264	    LD="${LD-ld} -m elf32ppclinux"
9265	    ;;
9266	  s390x-*linux*)
9267	    LD="${LD-ld} -m elf_s390"
9268	    ;;
9269	  sparc64-*linux*)
9270	    LD="${LD-ld} -m elf32_sparc"
9271	    ;;
9272	esac
9273	;;
9274      *64-bit*)
9275	case $host in
9276	  x86_64-*kfreebsd*-gnu)
9277	    LD="${LD-ld} -m elf_x86_64_fbsd"
9278	    ;;
9279	  x86_64-*linux*)
9280	    LD="${LD-ld} -m elf_x86_64"
9281	    ;;
9282	  powerpcle-*linux*)
9283	    LD="${LD-ld} -m elf64lppc"
9284	    ;;
9285	  powerpc-*linux*)
9286	    LD="${LD-ld} -m elf64ppc"
9287	    ;;
9288	  s390*-*linux*|s390*-*tpf*)
9289	    LD="${LD-ld} -m elf64_s390"
9290	    ;;
9291	  sparc*-*linux*)
9292	    LD="${LD-ld} -m elf64_sparc"
9293	    ;;
9294	esac
9295	;;
9296    esac
9297  fi
9298  rm -rf conftest*
9299  ;;
9300
9301*-*-sco3.2v5*)
9302  # On SCO OpenServer 5, we need -belf to get full-featured binaries.
9303  SAVE_CFLAGS=$CFLAGS
9304  CFLAGS="$CFLAGS -belf"
9305  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5
9306$as_echo_n "checking whether the C compiler needs -belf... " >&6; }
9307if ${lt_cv_cc_needs_belf+:} false; then :
9308  $as_echo_n "(cached) " >&6
9309else
9310  ac_ext=c
9311ac_cpp='$CPP $CPPFLAGS'
9312ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
9313ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
9314ac_compiler_gnu=$ac_cv_c_compiler_gnu
9315
9316     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9317/* end confdefs.h.  */
9318
9319int
9320main ()
9321{
9322
9323  ;
9324  return 0;
9325}
9326_ACEOF
9327if ac_fn_c_try_link "$LINENO"; then :
9328  lt_cv_cc_needs_belf=yes
9329else
9330  lt_cv_cc_needs_belf=no
9331fi
9332rm -f core conftest.err conftest.$ac_objext \
9333    conftest$ac_exeext conftest.$ac_ext
9334     ac_ext=c
9335ac_cpp='$CPP $CPPFLAGS'
9336ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
9337ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
9338ac_compiler_gnu=$ac_cv_c_compiler_gnu
9339
9340fi
9341{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5
9342$as_echo "$lt_cv_cc_needs_belf" >&6; }
9343  if test yes != "$lt_cv_cc_needs_belf"; then
9344    # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
9345    CFLAGS=$SAVE_CFLAGS
9346  fi
9347  ;;
9348*-*solaris*)
9349  # Find out what ABI is being produced by ac_compile, and set linker
9350  # options accordingly.
9351  echo 'int i;' > conftest.$ac_ext
9352  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
9353  (eval $ac_compile) 2>&5
9354  ac_status=$?
9355  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
9356  test $ac_status = 0; }; then
9357    case `/usr/bin/file conftest.o` in
9358    *64-bit*)
9359      case $lt_cv_prog_gnu_ld in
9360      yes*)
9361        case $host in
9362        i?86-*-solaris*|x86_64-*-solaris*)
9363          LD="${LD-ld} -m elf_x86_64"
9364          ;;
9365        sparc*-*-solaris*)
9366          LD="${LD-ld} -m elf64_sparc"
9367          ;;
9368        esac
9369        # GNU ld 2.21 introduced _sol2 emulations.  Use them if available.
9370        if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then
9371          LD=${LD-ld}_sol2
9372        fi
9373        ;;
9374      *)
9375	if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
9376	  LD="${LD-ld} -64"
9377	fi
9378	;;
9379      esac
9380      ;;
9381    esac
9382  fi
9383  rm -rf conftest*
9384  ;;
9385esac
9386
9387need_locks=$enable_libtool_lock
9388
9389if test -n "$ac_tool_prefix"; then
9390  # Extract the first word of "${ac_tool_prefix}mt", so it can be a program name with args.
9391set dummy ${ac_tool_prefix}mt; ac_word=$2
9392{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9393$as_echo_n "checking for $ac_word... " >&6; }
9394if ${ac_cv_prog_MANIFEST_TOOL+:} false; then :
9395  $as_echo_n "(cached) " >&6
9396else
9397  if test -n "$MANIFEST_TOOL"; then
9398  ac_cv_prog_MANIFEST_TOOL="$MANIFEST_TOOL" # Let the user override the test.
9399else
9400as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9401for as_dir in $PATH
9402do
9403  IFS=$as_save_IFS
9404  test -z "$as_dir" && as_dir=.
9405    for ac_exec_ext in '' $ac_executable_extensions; do
9406  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9407    ac_cv_prog_MANIFEST_TOOL="${ac_tool_prefix}mt"
9408    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9409    break 2
9410  fi
9411done
9412  done
9413IFS=$as_save_IFS
9414
9415fi
9416fi
9417MANIFEST_TOOL=$ac_cv_prog_MANIFEST_TOOL
9418if test -n "$MANIFEST_TOOL"; then
9419  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MANIFEST_TOOL" >&5
9420$as_echo "$MANIFEST_TOOL" >&6; }
9421else
9422  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9423$as_echo "no" >&6; }
9424fi
9425
9426
9427fi
9428if test -z "$ac_cv_prog_MANIFEST_TOOL"; then
9429  ac_ct_MANIFEST_TOOL=$MANIFEST_TOOL
9430  # Extract the first word of "mt", so it can be a program name with args.
9431set dummy mt; ac_word=$2
9432{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9433$as_echo_n "checking for $ac_word... " >&6; }
9434if ${ac_cv_prog_ac_ct_MANIFEST_TOOL+:} false; then :
9435  $as_echo_n "(cached) " >&6
9436else
9437  if test -n "$ac_ct_MANIFEST_TOOL"; then
9438  ac_cv_prog_ac_ct_MANIFEST_TOOL="$ac_ct_MANIFEST_TOOL" # Let the user override the test.
9439else
9440as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9441for as_dir in $PATH
9442do
9443  IFS=$as_save_IFS
9444  test -z "$as_dir" && as_dir=.
9445    for ac_exec_ext in '' $ac_executable_extensions; do
9446  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9447    ac_cv_prog_ac_ct_MANIFEST_TOOL="mt"
9448    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9449    break 2
9450  fi
9451done
9452  done
9453IFS=$as_save_IFS
9454
9455fi
9456fi
9457ac_ct_MANIFEST_TOOL=$ac_cv_prog_ac_ct_MANIFEST_TOOL
9458if test -n "$ac_ct_MANIFEST_TOOL"; then
9459  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MANIFEST_TOOL" >&5
9460$as_echo "$ac_ct_MANIFEST_TOOL" >&6; }
9461else
9462  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9463$as_echo "no" >&6; }
9464fi
9465
9466  if test "x$ac_ct_MANIFEST_TOOL" = x; then
9467    MANIFEST_TOOL=":"
9468  else
9469    case $cross_compiling:$ac_tool_warned in
9470yes:)
9471{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9472$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9473ac_tool_warned=yes ;;
9474esac
9475    MANIFEST_TOOL=$ac_ct_MANIFEST_TOOL
9476  fi
9477else
9478  MANIFEST_TOOL="$ac_cv_prog_MANIFEST_TOOL"
9479fi
9480
9481test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt
9482{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool" >&5
9483$as_echo_n "checking if $MANIFEST_TOOL is a manifest tool... " >&6; }
9484if ${lt_cv_path_mainfest_tool+:} false; then :
9485  $as_echo_n "(cached) " >&6
9486else
9487  lt_cv_path_mainfest_tool=no
9488  echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&5
9489  $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out
9490  cat conftest.err >&5
9491  if $GREP 'Manifest Tool' conftest.out > /dev/null; then
9492    lt_cv_path_mainfest_tool=yes
9493  fi
9494  rm -f conftest*
9495fi
9496{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5
9497$as_echo "$lt_cv_path_mainfest_tool" >&6; }
9498if test yes != "$lt_cv_path_mainfest_tool"; then
9499  MANIFEST_TOOL=:
9500fi
9501
9502
9503
9504
9505
9506
9507  case $host_os in
9508    rhapsody* | darwin*)
9509    if test -n "$ac_tool_prefix"; then
9510  # Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args.
9511set dummy ${ac_tool_prefix}dsymutil; ac_word=$2
9512{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9513$as_echo_n "checking for $ac_word... " >&6; }
9514if ${ac_cv_prog_DSYMUTIL+:} false; then :
9515  $as_echo_n "(cached) " >&6
9516else
9517  if test -n "$DSYMUTIL"; then
9518  ac_cv_prog_DSYMUTIL="$DSYMUTIL" # Let the user override the test.
9519else
9520as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9521for as_dir in $PATH
9522do
9523  IFS=$as_save_IFS
9524  test -z "$as_dir" && as_dir=.
9525    for ac_exec_ext in '' $ac_executable_extensions; do
9526  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9527    ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil"
9528    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9529    break 2
9530  fi
9531done
9532  done
9533IFS=$as_save_IFS
9534
9535fi
9536fi
9537DSYMUTIL=$ac_cv_prog_DSYMUTIL
9538if test -n "$DSYMUTIL"; then
9539  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
9540$as_echo "$DSYMUTIL" >&6; }
9541else
9542  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9543$as_echo "no" >&6; }
9544fi
9545
9546
9547fi
9548if test -z "$ac_cv_prog_DSYMUTIL"; then
9549  ac_ct_DSYMUTIL=$DSYMUTIL
9550  # Extract the first word of "dsymutil", so it can be a program name with args.
9551set dummy dsymutil; ac_word=$2
9552{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9553$as_echo_n "checking for $ac_word... " >&6; }
9554if ${ac_cv_prog_ac_ct_DSYMUTIL+:} false; then :
9555  $as_echo_n "(cached) " >&6
9556else
9557  if test -n "$ac_ct_DSYMUTIL"; then
9558  ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # Let the user override the test.
9559else
9560as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9561for as_dir in $PATH
9562do
9563  IFS=$as_save_IFS
9564  test -z "$as_dir" && as_dir=.
9565    for ac_exec_ext in '' $ac_executable_extensions; do
9566  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9567    ac_cv_prog_ac_ct_DSYMUTIL="dsymutil"
9568    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9569    break 2
9570  fi
9571done
9572  done
9573IFS=$as_save_IFS
9574
9575fi
9576fi
9577ac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL
9578if test -n "$ac_ct_DSYMUTIL"; then
9579  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DSYMUTIL" >&5
9580$as_echo "$ac_ct_DSYMUTIL" >&6; }
9581else
9582  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9583$as_echo "no" >&6; }
9584fi
9585
9586  if test "x$ac_ct_DSYMUTIL" = x; then
9587    DSYMUTIL=":"
9588  else
9589    case $cross_compiling:$ac_tool_warned in
9590yes:)
9591{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9592$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9593ac_tool_warned=yes ;;
9594esac
9595    DSYMUTIL=$ac_ct_DSYMUTIL
9596  fi
9597else
9598  DSYMUTIL="$ac_cv_prog_DSYMUTIL"
9599fi
9600
9601    if test -n "$ac_tool_prefix"; then
9602  # Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args.
9603set dummy ${ac_tool_prefix}nmedit; ac_word=$2
9604{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9605$as_echo_n "checking for $ac_word... " >&6; }
9606if ${ac_cv_prog_NMEDIT+:} false; then :
9607  $as_echo_n "(cached) " >&6
9608else
9609  if test -n "$NMEDIT"; then
9610  ac_cv_prog_NMEDIT="$NMEDIT" # Let the user override the test.
9611else
9612as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9613for as_dir in $PATH
9614do
9615  IFS=$as_save_IFS
9616  test -z "$as_dir" && as_dir=.
9617    for ac_exec_ext in '' $ac_executable_extensions; do
9618  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9619    ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit"
9620    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9621    break 2
9622  fi
9623done
9624  done
9625IFS=$as_save_IFS
9626
9627fi
9628fi
9629NMEDIT=$ac_cv_prog_NMEDIT
9630if test -n "$NMEDIT"; then
9631  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NMEDIT" >&5
9632$as_echo "$NMEDIT" >&6; }
9633else
9634  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9635$as_echo "no" >&6; }
9636fi
9637
9638
9639fi
9640if test -z "$ac_cv_prog_NMEDIT"; then
9641  ac_ct_NMEDIT=$NMEDIT
9642  # Extract the first word of "nmedit", so it can be a program name with args.
9643set dummy nmedit; ac_word=$2
9644{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9645$as_echo_n "checking for $ac_word... " >&6; }
9646if ${ac_cv_prog_ac_ct_NMEDIT+:} false; then :
9647  $as_echo_n "(cached) " >&6
9648else
9649  if test -n "$ac_ct_NMEDIT"; then
9650  ac_cv_prog_ac_ct_NMEDIT="$ac_ct_NMEDIT" # Let the user override the test.
9651else
9652as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9653for as_dir in $PATH
9654do
9655  IFS=$as_save_IFS
9656  test -z "$as_dir" && as_dir=.
9657    for ac_exec_ext in '' $ac_executable_extensions; do
9658  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9659    ac_cv_prog_ac_ct_NMEDIT="nmedit"
9660    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9661    break 2
9662  fi
9663done
9664  done
9665IFS=$as_save_IFS
9666
9667fi
9668fi
9669ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT
9670if test -n "$ac_ct_NMEDIT"; then
9671  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NMEDIT" >&5
9672$as_echo "$ac_ct_NMEDIT" >&6; }
9673else
9674  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9675$as_echo "no" >&6; }
9676fi
9677
9678  if test "x$ac_ct_NMEDIT" = x; then
9679    NMEDIT=":"
9680  else
9681    case $cross_compiling:$ac_tool_warned in
9682yes:)
9683{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9684$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9685ac_tool_warned=yes ;;
9686esac
9687    NMEDIT=$ac_ct_NMEDIT
9688  fi
9689else
9690  NMEDIT="$ac_cv_prog_NMEDIT"
9691fi
9692
9693    if test -n "$ac_tool_prefix"; then
9694  # Extract the first word of "${ac_tool_prefix}lipo", so it can be a program name with args.
9695set dummy ${ac_tool_prefix}lipo; ac_word=$2
9696{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9697$as_echo_n "checking for $ac_word... " >&6; }
9698if ${ac_cv_prog_LIPO+:} false; then :
9699  $as_echo_n "(cached) " >&6
9700else
9701  if test -n "$LIPO"; then
9702  ac_cv_prog_LIPO="$LIPO" # Let the user override the test.
9703else
9704as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9705for as_dir in $PATH
9706do
9707  IFS=$as_save_IFS
9708  test -z "$as_dir" && as_dir=.
9709    for ac_exec_ext in '' $ac_executable_extensions; do
9710  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9711    ac_cv_prog_LIPO="${ac_tool_prefix}lipo"
9712    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9713    break 2
9714  fi
9715done
9716  done
9717IFS=$as_save_IFS
9718
9719fi
9720fi
9721LIPO=$ac_cv_prog_LIPO
9722if test -n "$LIPO"; then
9723  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
9724$as_echo "$LIPO" >&6; }
9725else
9726  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9727$as_echo "no" >&6; }
9728fi
9729
9730
9731fi
9732if test -z "$ac_cv_prog_LIPO"; then
9733  ac_ct_LIPO=$LIPO
9734  # Extract the first word of "lipo", so it can be a program name with args.
9735set dummy lipo; ac_word=$2
9736{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9737$as_echo_n "checking for $ac_word... " >&6; }
9738if ${ac_cv_prog_ac_ct_LIPO+:} false; then :
9739  $as_echo_n "(cached) " >&6
9740else
9741  if test -n "$ac_ct_LIPO"; then
9742  ac_cv_prog_ac_ct_LIPO="$ac_ct_LIPO" # Let the user override the test.
9743else
9744as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9745for as_dir in $PATH
9746do
9747  IFS=$as_save_IFS
9748  test -z "$as_dir" && as_dir=.
9749    for ac_exec_ext in '' $ac_executable_extensions; do
9750  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9751    ac_cv_prog_ac_ct_LIPO="lipo"
9752    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9753    break 2
9754  fi
9755done
9756  done
9757IFS=$as_save_IFS
9758
9759fi
9760fi
9761ac_ct_LIPO=$ac_cv_prog_ac_ct_LIPO
9762if test -n "$ac_ct_LIPO"; then
9763  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LIPO" >&5
9764$as_echo "$ac_ct_LIPO" >&6; }
9765else
9766  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9767$as_echo "no" >&6; }
9768fi
9769
9770  if test "x$ac_ct_LIPO" = x; then
9771    LIPO=":"
9772  else
9773    case $cross_compiling:$ac_tool_warned in
9774yes:)
9775{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9776$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9777ac_tool_warned=yes ;;
9778esac
9779    LIPO=$ac_ct_LIPO
9780  fi
9781else
9782  LIPO="$ac_cv_prog_LIPO"
9783fi
9784
9785    if test -n "$ac_tool_prefix"; then
9786  # Extract the first word of "${ac_tool_prefix}otool", so it can be a program name with args.
9787set dummy ${ac_tool_prefix}otool; ac_word=$2
9788{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9789$as_echo_n "checking for $ac_word... " >&6; }
9790if ${ac_cv_prog_OTOOL+:} false; then :
9791  $as_echo_n "(cached) " >&6
9792else
9793  if test -n "$OTOOL"; then
9794  ac_cv_prog_OTOOL="$OTOOL" # Let the user override the test.
9795else
9796as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9797for as_dir in $PATH
9798do
9799  IFS=$as_save_IFS
9800  test -z "$as_dir" && as_dir=.
9801    for ac_exec_ext in '' $ac_executable_extensions; do
9802  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9803    ac_cv_prog_OTOOL="${ac_tool_prefix}otool"
9804    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9805    break 2
9806  fi
9807done
9808  done
9809IFS=$as_save_IFS
9810
9811fi
9812fi
9813OTOOL=$ac_cv_prog_OTOOL
9814if test -n "$OTOOL"; then
9815  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
9816$as_echo "$OTOOL" >&6; }
9817else
9818  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9819$as_echo "no" >&6; }
9820fi
9821
9822
9823fi
9824if test -z "$ac_cv_prog_OTOOL"; then
9825  ac_ct_OTOOL=$OTOOL
9826  # Extract the first word of "otool", so it can be a program name with args.
9827set dummy otool; ac_word=$2
9828{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9829$as_echo_n "checking for $ac_word... " >&6; }
9830if ${ac_cv_prog_ac_ct_OTOOL+:} false; then :
9831  $as_echo_n "(cached) " >&6
9832else
9833  if test -n "$ac_ct_OTOOL"; then
9834  ac_cv_prog_ac_ct_OTOOL="$ac_ct_OTOOL" # Let the user override the test.
9835else
9836as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9837for as_dir in $PATH
9838do
9839  IFS=$as_save_IFS
9840  test -z "$as_dir" && as_dir=.
9841    for ac_exec_ext in '' $ac_executable_extensions; do
9842  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9843    ac_cv_prog_ac_ct_OTOOL="otool"
9844    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9845    break 2
9846  fi
9847done
9848  done
9849IFS=$as_save_IFS
9850
9851fi
9852fi
9853ac_ct_OTOOL=$ac_cv_prog_ac_ct_OTOOL
9854if test -n "$ac_ct_OTOOL"; then
9855  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL" >&5
9856$as_echo "$ac_ct_OTOOL" >&6; }
9857else
9858  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9859$as_echo "no" >&6; }
9860fi
9861
9862  if test "x$ac_ct_OTOOL" = x; then
9863    OTOOL=":"
9864  else
9865    case $cross_compiling:$ac_tool_warned in
9866yes:)
9867{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9868$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9869ac_tool_warned=yes ;;
9870esac
9871    OTOOL=$ac_ct_OTOOL
9872  fi
9873else
9874  OTOOL="$ac_cv_prog_OTOOL"
9875fi
9876
9877    if test -n "$ac_tool_prefix"; then
9878  # Extract the first word of "${ac_tool_prefix}otool64", so it can be a program name with args.
9879set dummy ${ac_tool_prefix}otool64; ac_word=$2
9880{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9881$as_echo_n "checking for $ac_word... " >&6; }
9882if ${ac_cv_prog_OTOOL64+:} false; then :
9883  $as_echo_n "(cached) " >&6
9884else
9885  if test -n "$OTOOL64"; then
9886  ac_cv_prog_OTOOL64="$OTOOL64" # Let the user override the test.
9887else
9888as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9889for as_dir in $PATH
9890do
9891  IFS=$as_save_IFS
9892  test -z "$as_dir" && as_dir=.
9893    for ac_exec_ext in '' $ac_executable_extensions; do
9894  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9895    ac_cv_prog_OTOOL64="${ac_tool_prefix}otool64"
9896    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9897    break 2
9898  fi
9899done
9900  done
9901IFS=$as_save_IFS
9902
9903fi
9904fi
9905OTOOL64=$ac_cv_prog_OTOOL64
9906if test -n "$OTOOL64"; then
9907  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL64" >&5
9908$as_echo "$OTOOL64" >&6; }
9909else
9910  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9911$as_echo "no" >&6; }
9912fi
9913
9914
9915fi
9916if test -z "$ac_cv_prog_OTOOL64"; then
9917  ac_ct_OTOOL64=$OTOOL64
9918  # Extract the first word of "otool64", so it can be a program name with args.
9919set dummy otool64; ac_word=$2
9920{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9921$as_echo_n "checking for $ac_word... " >&6; }
9922if ${ac_cv_prog_ac_ct_OTOOL64+:} false; then :
9923  $as_echo_n "(cached) " >&6
9924else
9925  if test -n "$ac_ct_OTOOL64"; then
9926  ac_cv_prog_ac_ct_OTOOL64="$ac_ct_OTOOL64" # Let the user override the test.
9927else
9928as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9929for as_dir in $PATH
9930do
9931  IFS=$as_save_IFS
9932  test -z "$as_dir" && as_dir=.
9933    for ac_exec_ext in '' $ac_executable_extensions; do
9934  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9935    ac_cv_prog_ac_ct_OTOOL64="otool64"
9936    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9937    break 2
9938  fi
9939done
9940  done
9941IFS=$as_save_IFS
9942
9943fi
9944fi
9945ac_ct_OTOOL64=$ac_cv_prog_ac_ct_OTOOL64
9946if test -n "$ac_ct_OTOOL64"; then
9947  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL64" >&5
9948$as_echo "$ac_ct_OTOOL64" >&6; }
9949else
9950  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9951$as_echo "no" >&6; }
9952fi
9953
9954  if test "x$ac_ct_OTOOL64" = x; then
9955    OTOOL64=":"
9956  else
9957    case $cross_compiling:$ac_tool_warned in
9958yes:)
9959{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9960$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9961ac_tool_warned=yes ;;
9962esac
9963    OTOOL64=$ac_ct_OTOOL64
9964  fi
9965else
9966  OTOOL64="$ac_cv_prog_OTOOL64"
9967fi
9968
9969
9970
9971
9972
9973
9974
9975
9976
9977
9978
9979
9980
9981
9982
9983
9984
9985
9986
9987
9988
9989
9990
9991
9992
9993
9994
9995    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -single_module linker flag" >&5
9996$as_echo_n "checking for -single_module linker flag... " >&6; }
9997if ${lt_cv_apple_cc_single_mod+:} false; then :
9998  $as_echo_n "(cached) " >&6
9999else
10000  lt_cv_apple_cc_single_mod=no
10001      if test -z "$LT_MULTI_MODULE"; then
10002	# By default we will add the -single_module flag. You can override
10003	# by either setting the environment variable LT_MULTI_MODULE
10004	# non-empty at configure time, or by adding -multi_module to the
10005	# link flags.
10006	rm -rf libconftest.dylib*
10007	echo "int foo(void){return 1;}" > conftest.c
10008	echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
10009-dynamiclib -Wl,-single_module conftest.c" >&5
10010	$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
10011	  -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
10012        _lt_result=$?
10013	# If there is a non-empty error log, and "single_module"
10014	# appears in it, assume the flag caused a linker warning
10015        if test -s conftest.err && $GREP single_module conftest.err; then
10016	  cat conftest.err >&5
10017	# Otherwise, if the output was created with a 0 exit code from
10018	# the compiler, it worked.
10019	elif test -f libconftest.dylib && test 0 = "$_lt_result"; then
10020	  lt_cv_apple_cc_single_mod=yes
10021	else
10022	  cat conftest.err >&5
10023	fi
10024	rm -rf libconftest.dylib*
10025	rm -f conftest.*
10026      fi
10027fi
10028{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5
10029$as_echo "$lt_cv_apple_cc_single_mod" >&6; }
10030
10031    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5
10032$as_echo_n "checking for -exported_symbols_list linker flag... " >&6; }
10033if ${lt_cv_ld_exported_symbols_list+:} false; then :
10034  $as_echo_n "(cached) " >&6
10035else
10036  lt_cv_ld_exported_symbols_list=no
10037      save_LDFLAGS=$LDFLAGS
10038      echo "_main" > conftest.sym
10039      LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
10040      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10041/* end confdefs.h.  */
10042
10043int
10044main ()
10045{
10046
10047  ;
10048  return 0;
10049}
10050_ACEOF
10051if ac_fn_c_try_link "$LINENO"; then :
10052  lt_cv_ld_exported_symbols_list=yes
10053else
10054  lt_cv_ld_exported_symbols_list=no
10055fi
10056rm -f core conftest.err conftest.$ac_objext \
10057    conftest$ac_exeext conftest.$ac_ext
10058	LDFLAGS=$save_LDFLAGS
10059
10060fi
10061{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5
10062$as_echo "$lt_cv_ld_exported_symbols_list" >&6; }
10063
10064    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -force_load linker flag" >&5
10065$as_echo_n "checking for -force_load linker flag... " >&6; }
10066if ${lt_cv_ld_force_load+:} false; then :
10067  $as_echo_n "(cached) " >&6
10068else
10069  lt_cv_ld_force_load=no
10070      cat > conftest.c << _LT_EOF
10071int forced_loaded() { return 2;}
10072_LT_EOF
10073      echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&5
10074      $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5
10075      echo "$AR cru libconftest.a conftest.o" >&5
10076      $AR cru libconftest.a conftest.o 2>&5
10077      echo "$RANLIB libconftest.a" >&5
10078      $RANLIB libconftest.a 2>&5
10079      cat > conftest.c << _LT_EOF
10080int main() { return 0;}
10081_LT_EOF
10082      echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&5
10083      $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err
10084      _lt_result=$?
10085      if test -s conftest.err && $GREP force_load conftest.err; then
10086	cat conftest.err >&5
10087      elif test -f conftest && test 0 = "$_lt_result" && $GREP forced_load conftest >/dev/null 2>&1; then
10088	lt_cv_ld_force_load=yes
10089      else
10090	cat conftest.err >&5
10091      fi
10092        rm -f conftest.err libconftest.a conftest conftest.c
10093        rm -rf conftest.dSYM
10094
10095fi
10096{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_force_load" >&5
10097$as_echo "$lt_cv_ld_force_load" >&6; }
10098    case $host_os in
10099    rhapsody* | darwin1.[012])
10100      _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;;
10101    darwin1.*)
10102      _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
10103    darwin*) # darwin 5.x on
10104      # if running on 10.5 or later, the deployment target defaults
10105      # to the OS version, if on x86, and 10.4, the deployment
10106      # target defaults to 10.4. Don't you love it?
10107      case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
10108	10.0,*86*-darwin8*|10.0,*-darwin[91]*)
10109	  _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
10110	10.[012][,.]*)
10111	  _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
10112	10.*)
10113	  _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
10114      esac
10115    ;;
10116  esac
10117    if test yes = "$lt_cv_apple_cc_single_mod"; then
10118      _lt_dar_single_mod='$single_module'
10119    fi
10120    if test yes = "$lt_cv_ld_exported_symbols_list"; then
10121      _lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym'
10122    else
10123      _lt_dar_export_syms='~$NMEDIT -s $output_objdir/$libname-symbols.expsym $lib'
10124    fi
10125    if test : != "$DSYMUTIL" && test no = "$lt_cv_ld_force_load"; then
10126      _lt_dsymutil='~$DSYMUTIL $lib || :'
10127    else
10128      _lt_dsymutil=
10129    fi
10130    ;;
10131  esac
10132
10133# func_munge_path_list VARIABLE PATH
10134# -----------------------------------
10135# VARIABLE is name of variable containing _space_ separated list of
10136# directories to be munged by the contents of PATH, which is string
10137# having a format:
10138# "DIR[:DIR]:"
10139#       string "DIR[ DIR]" will be prepended to VARIABLE
10140# ":DIR[:DIR]"
10141#       string "DIR[ DIR]" will be appended to VARIABLE
10142# "DIRP[:DIRP]::[DIRA:]DIRA"
10143#       string "DIRP[ DIRP]" will be prepended to VARIABLE and string
10144#       "DIRA[ DIRA]" will be appended to VARIABLE
10145# "DIR[:DIR]"
10146#       VARIABLE will be replaced by "DIR[ DIR]"
10147func_munge_path_list ()
10148{
10149    case x$2 in
10150    x)
10151        ;;
10152    *:)
10153        eval $1=\"`$ECHO $2 | $SED 's/:/ /g'` \$$1\"
10154        ;;
10155    x:*)
10156        eval $1=\"\$$1 `$ECHO $2 | $SED 's/:/ /g'`\"
10157        ;;
10158    *::*)
10159        eval $1=\"\$$1\ `$ECHO $2 | $SED -e 's/.*:://' -e 's/:/ /g'`\"
10160        eval $1=\"`$ECHO $2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \$$1\"
10161        ;;
10162    *)
10163        eval $1=\"`$ECHO $2 | $SED 's/:/ /g'`\"
10164        ;;
10165    esac
10166}
10167
10168for ac_header in dlfcn.h
10169do :
10170  ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default
10171"
10172if test "x$ac_cv_header_dlfcn_h" = xyes; then :
10173  cat >>confdefs.h <<_ACEOF
10174#define HAVE_DLFCN_H 1
10175_ACEOF
10176
10177fi
10178
10179done
10180
10181
10182
10183
10184
10185
10186
10187# Set options
10188
10189
10190
10191        enable_dlopen=no
10192
10193
10194  enable_win32_dll=no
10195
10196
10197            # Check whether --enable-shared was given.
10198if test "${enable_shared+set}" = set; then :
10199  enableval=$enable_shared; p=${PACKAGE-default}
10200    case $enableval in
10201    yes) enable_shared=yes ;;
10202    no) enable_shared=no ;;
10203    *)
10204      enable_shared=no
10205      # Look at the argument we got.  We use all the common list separators.
10206      lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
10207      for pkg in $enableval; do
10208	IFS=$lt_save_ifs
10209	if test "X$pkg" = "X$p"; then
10210	  enable_shared=yes
10211	fi
10212      done
10213      IFS=$lt_save_ifs
10214      ;;
10215    esac
10216else
10217  enable_shared=yes
10218fi
10219
10220
10221
10222
10223
10224
10225
10226
10227
10228  # Check whether --enable-static was given.
10229if test "${enable_static+set}" = set; then :
10230  enableval=$enable_static; p=${PACKAGE-default}
10231    case $enableval in
10232    yes) enable_static=yes ;;
10233    no) enable_static=no ;;
10234    *)
10235     enable_static=no
10236      # Look at the argument we got.  We use all the common list separators.
10237      lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
10238      for pkg in $enableval; do
10239	IFS=$lt_save_ifs
10240	if test "X$pkg" = "X$p"; then
10241	  enable_static=yes
10242	fi
10243      done
10244      IFS=$lt_save_ifs
10245      ;;
10246    esac
10247else
10248  enable_static=yes
10249fi
10250
10251
10252
10253
10254
10255
10256
10257
10258
10259
10260# Check whether --with-pic was given.
10261if test "${with_pic+set}" = set; then :
10262  withval=$with_pic; lt_p=${PACKAGE-default}
10263    case $withval in
10264    yes|no) pic_mode=$withval ;;
10265    *)
10266      pic_mode=default
10267      # Look at the argument we got.  We use all the common list separators.
10268      lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
10269      for lt_pkg in $withval; do
10270	IFS=$lt_save_ifs
10271	if test "X$lt_pkg" = "X$lt_p"; then
10272	  pic_mode=yes
10273	fi
10274      done
10275      IFS=$lt_save_ifs
10276      ;;
10277    esac
10278else
10279  pic_mode=default
10280fi
10281
10282
10283
10284
10285
10286
10287
10288
10289  # Check whether --enable-fast-install was given.
10290if test "${enable_fast_install+set}" = set; then :
10291  enableval=$enable_fast_install; p=${PACKAGE-default}
10292    case $enableval in
10293    yes) enable_fast_install=yes ;;
10294    no) enable_fast_install=no ;;
10295    *)
10296      enable_fast_install=no
10297      # Look at the argument we got.  We use all the common list separators.
10298      lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
10299      for pkg in $enableval; do
10300	IFS=$lt_save_ifs
10301	if test "X$pkg" = "X$p"; then
10302	  enable_fast_install=yes
10303	fi
10304      done
10305      IFS=$lt_save_ifs
10306      ;;
10307    esac
10308else
10309  enable_fast_install=yes
10310fi
10311
10312
10313
10314
10315
10316
10317
10318
10319  shared_archive_member_spec=
10320case $host,$enable_shared in
10321power*-*-aix[5-9]*,yes)
10322  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of shared library versioning to provide" >&5
10323$as_echo_n "checking which variant of shared library versioning to provide... " >&6; }
10324
10325# Check whether --with-aix-soname was given.
10326if test "${with_aix_soname+set}" = set; then :
10327  withval=$with_aix_soname; case $withval in
10328    aix|svr4|both)
10329      ;;
10330    *)
10331      as_fn_error $? "Unknown argument to --with-aix-soname" "$LINENO" 5
10332      ;;
10333    esac
10334    lt_cv_with_aix_soname=$with_aix_soname
10335else
10336  if ${lt_cv_with_aix_soname+:} false; then :
10337  $as_echo_n "(cached) " >&6
10338else
10339  lt_cv_with_aix_soname=aix
10340fi
10341
10342    with_aix_soname=$lt_cv_with_aix_soname
10343fi
10344
10345  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_aix_soname" >&5
10346$as_echo "$with_aix_soname" >&6; }
10347  if test aix != "$with_aix_soname"; then
10348    # For the AIX way of multilib, we name the shared archive member
10349    # based on the bitwidth used, traditionally 'shr.o' or 'shr_64.o',
10350    # and 'shr.imp' or 'shr_64.imp', respectively, for the Import File.
10351    # Even when GNU compilers ignore OBJECT_MODE but need '-maix64' flag,
10352    # the AIX toolchain works better with OBJECT_MODE set (default 32).
10353    if test 64 = "${OBJECT_MODE-32}"; then
10354      shared_archive_member_spec=shr_64
10355    else
10356      shared_archive_member_spec=shr
10357    fi
10358  fi
10359  ;;
10360*)
10361  with_aix_soname=aix
10362  ;;
10363esac
10364
10365
10366
10367
10368
10369
10370
10371
10372
10373
10374# This can be used to rebuild libtool when needed
10375LIBTOOL_DEPS=$ltmain
10376
10377# Always use our own libtool.
10378LIBTOOL='$(SHELL) $(top_builddir)/libtool'
10379
10380
10381
10382
10383
10384
10385
10386
10387
10388
10389
10390
10391
10392
10393
10394
10395
10396
10397
10398
10399
10400
10401
10402
10403
10404
10405
10406
10407
10408
10409test -z "$LN_S" && LN_S="ln -s"
10410
10411
10412
10413
10414
10415
10416
10417
10418
10419
10420
10421
10422
10423
10424if test -n "${ZSH_VERSION+set}"; then
10425   setopt NO_GLOB_SUBST
10426fi
10427
10428{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5
10429$as_echo_n "checking for objdir... " >&6; }
10430if ${lt_cv_objdir+:} false; then :
10431  $as_echo_n "(cached) " >&6
10432else
10433  rm -f .libs 2>/dev/null
10434mkdir .libs 2>/dev/null
10435if test -d .libs; then
10436  lt_cv_objdir=.libs
10437else
10438  # MS-DOS does not allow filenames that begin with a dot.
10439  lt_cv_objdir=_libs
10440fi
10441rmdir .libs 2>/dev/null
10442fi
10443{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_objdir" >&5
10444$as_echo "$lt_cv_objdir" >&6; }
10445objdir=$lt_cv_objdir
10446
10447
10448
10449
10450
10451cat >>confdefs.h <<_ACEOF
10452#define LT_OBJDIR "$lt_cv_objdir/"
10453_ACEOF
10454
10455
10456
10457
10458case $host_os in
10459aix3*)
10460  # AIX sometimes has problems with the GCC collect2 program.  For some
10461  # reason, if we set the COLLECT_NAMES environment variable, the problems
10462  # vanish in a puff of smoke.
10463  if test set != "${COLLECT_NAMES+set}"; then
10464    COLLECT_NAMES=
10465    export COLLECT_NAMES
10466  fi
10467  ;;
10468esac
10469
10470# Global variables:
10471ofile=libtool
10472can_build_shared=yes
10473
10474# All known linkers require a '.a' archive for static linking (except MSVC,
10475# which needs '.lib').
10476libext=a
10477
10478with_gnu_ld=$lt_cv_prog_gnu_ld
10479
10480old_CC=$CC
10481old_CFLAGS=$CFLAGS
10482
10483# Set sane defaults for various variables
10484test -z "$CC" && CC=cc
10485test -z "$LTCC" && LTCC=$CC
10486test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
10487test -z "$LD" && LD=ld
10488test -z "$ac_objext" && ac_objext=o
10489
10490func_cc_basename $compiler
10491cc_basename=$func_cc_basename_result
10492
10493
10494# Only perform the check for file, if the check method requires it
10495test -z "$MAGIC_CMD" && MAGIC_CMD=file
10496case $deplibs_check_method in
10497file_magic*)
10498  if test "$file_magic_cmd" = '$MAGIC_CMD'; then
10499    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5
10500$as_echo_n "checking for ${ac_tool_prefix}file... " >&6; }
10501if ${lt_cv_path_MAGIC_CMD+:} false; then :
10502  $as_echo_n "(cached) " >&6
10503else
10504  case $MAGIC_CMD in
10505[\\/*] |  ?:[\\/]*)
10506  lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path.
10507  ;;
10508*)
10509  lt_save_MAGIC_CMD=$MAGIC_CMD
10510  lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
10511  ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
10512  for ac_dir in $ac_dummy; do
10513    IFS=$lt_save_ifs
10514    test -z "$ac_dir" && ac_dir=.
10515    if test -f "$ac_dir/${ac_tool_prefix}file"; then
10516      lt_cv_path_MAGIC_CMD=$ac_dir/"${ac_tool_prefix}file"
10517      if test -n "$file_magic_test_file"; then
10518	case $deplibs_check_method in
10519	"file_magic "*)
10520	  file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
10521	  MAGIC_CMD=$lt_cv_path_MAGIC_CMD
10522	  if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
10523	    $EGREP "$file_magic_regex" > /dev/null; then
10524	    :
10525	  else
10526	    cat <<_LT_EOF 1>&2
10527
10528*** Warning: the command libtool uses to detect shared libraries,
10529*** $file_magic_cmd, produces output that libtool cannot recognize.
10530*** The result is that libtool may fail to recognize shared libraries
10531*** as such.  This will affect the creation of libtool libraries that
10532*** depend on shared libraries, but programs linked with such libtool
10533*** libraries will work regardless of this problem.  Nevertheless, you
10534*** may want to report the problem to your system manager and/or to
10535*** bug-libtool@gnu.org
10536
10537_LT_EOF
10538	  fi ;;
10539	esac
10540      fi
10541      break
10542    fi
10543  done
10544  IFS=$lt_save_ifs
10545  MAGIC_CMD=$lt_save_MAGIC_CMD
10546  ;;
10547esac
10548fi
10549
10550MAGIC_CMD=$lt_cv_path_MAGIC_CMD
10551if test -n "$MAGIC_CMD"; then
10552  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5
10553$as_echo "$MAGIC_CMD" >&6; }
10554else
10555  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10556$as_echo "no" >&6; }
10557fi
10558
10559
10560
10561
10562
10563if test -z "$lt_cv_path_MAGIC_CMD"; then
10564  if test -n "$ac_tool_prefix"; then
10565    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for file" >&5
10566$as_echo_n "checking for file... " >&6; }
10567if ${lt_cv_path_MAGIC_CMD+:} false; then :
10568  $as_echo_n "(cached) " >&6
10569else
10570  case $MAGIC_CMD in
10571[\\/*] |  ?:[\\/]*)
10572  lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path.
10573  ;;
10574*)
10575  lt_save_MAGIC_CMD=$MAGIC_CMD
10576  lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
10577  ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
10578  for ac_dir in $ac_dummy; do
10579    IFS=$lt_save_ifs
10580    test -z "$ac_dir" && ac_dir=.
10581    if test -f "$ac_dir/file"; then
10582      lt_cv_path_MAGIC_CMD=$ac_dir/"file"
10583      if test -n "$file_magic_test_file"; then
10584	case $deplibs_check_method in
10585	"file_magic "*)
10586	  file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
10587	  MAGIC_CMD=$lt_cv_path_MAGIC_CMD
10588	  if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
10589	    $EGREP "$file_magic_regex" > /dev/null; then
10590	    :
10591	  else
10592	    cat <<_LT_EOF 1>&2
10593
10594*** Warning: the command libtool uses to detect shared libraries,
10595*** $file_magic_cmd, produces output that libtool cannot recognize.
10596*** The result is that libtool may fail to recognize shared libraries
10597*** as such.  This will affect the creation of libtool libraries that
10598*** depend on shared libraries, but programs linked with such libtool
10599*** libraries will work regardless of this problem.  Nevertheless, you
10600*** may want to report the problem to your system manager and/or to
10601*** bug-libtool@gnu.org
10602
10603_LT_EOF
10604	  fi ;;
10605	esac
10606      fi
10607      break
10608    fi
10609  done
10610  IFS=$lt_save_ifs
10611  MAGIC_CMD=$lt_save_MAGIC_CMD
10612  ;;
10613esac
10614fi
10615
10616MAGIC_CMD=$lt_cv_path_MAGIC_CMD
10617if test -n "$MAGIC_CMD"; then
10618  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5
10619$as_echo "$MAGIC_CMD" >&6; }
10620else
10621  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10622$as_echo "no" >&6; }
10623fi
10624
10625
10626  else
10627    MAGIC_CMD=:
10628  fi
10629fi
10630
10631  fi
10632  ;;
10633esac
10634
10635# Use C for the default configuration in the libtool script
10636
10637lt_save_CC=$CC
10638ac_ext=c
10639ac_cpp='$CPP $CPPFLAGS'
10640ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
10641ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
10642ac_compiler_gnu=$ac_cv_c_compiler_gnu
10643
10644
10645# Source file extension for C test sources.
10646ac_ext=c
10647
10648# Object file extension for compiled C test sources.
10649objext=o
10650objext=$objext
10651
10652# Code to be used in simple compile tests
10653lt_simple_compile_test_code="int some_variable = 0;"
10654
10655# Code to be used in simple link tests
10656lt_simple_link_test_code='int main(){return(0);}'
10657
10658
10659
10660
10661
10662
10663
10664# If no C compiler was specified, use CC.
10665LTCC=${LTCC-"$CC"}
10666
10667# If no C compiler flags were specified, use CFLAGS.
10668LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
10669
10670# Allow CC to be a program name with arguments.
10671compiler=$CC
10672
10673# Save the default compiler, since it gets overwritten when the other
10674# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
10675compiler_DEFAULT=$CC
10676
10677# save warnings/boilerplate of simple test code
10678ac_outfile=conftest.$ac_objext
10679echo "$lt_simple_compile_test_code" >conftest.$ac_ext
10680eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
10681_lt_compiler_boilerplate=`cat conftest.err`
10682$RM conftest*
10683
10684ac_outfile=conftest.$ac_objext
10685echo "$lt_simple_link_test_code" >conftest.$ac_ext
10686eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
10687_lt_linker_boilerplate=`cat conftest.err`
10688$RM -r conftest*
10689
10690
10691if test -n "$compiler"; then
10692
10693lt_prog_compiler_no_builtin_flag=
10694
10695if test yes = "$GCC"; then
10696  case $cc_basename in
10697  nvcc*)
10698    lt_prog_compiler_no_builtin_flag=' -Xcompiler -fno-builtin' ;;
10699  *)
10700    lt_prog_compiler_no_builtin_flag=' -fno-builtin' ;;
10701  esac
10702
10703  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
10704$as_echo_n "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; }
10705if ${lt_cv_prog_compiler_rtti_exceptions+:} false; then :
10706  $as_echo_n "(cached) " >&6
10707else
10708  lt_cv_prog_compiler_rtti_exceptions=no
10709   ac_outfile=conftest.$ac_objext
10710   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
10711   lt_compiler_flag="-fno-rtti -fno-exceptions"  ## exclude from sc_useless_quotes_in_assignment
10712   # Insert the option either (1) after the last *FLAGS variable, or
10713   # (2) before a word containing "conftest.", or (3) at the end.
10714   # Note that $ac_compile itself does not contain backslashes and begins
10715   # with a dollar sign (not a hyphen), so the echo should work correctly.
10716   # The option is referenced via a variable to avoid confusing sed.
10717   lt_compile=`echo "$ac_compile" | $SED \
10718   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
10719   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
10720   -e 's:$: $lt_compiler_flag:'`
10721   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
10722   (eval "$lt_compile" 2>conftest.err)
10723   ac_status=$?
10724   cat conftest.err >&5
10725   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10726   if (exit $ac_status) && test -s "$ac_outfile"; then
10727     # The compiler can only warn and ignore the option if not recognized
10728     # So say no if there are warnings other than the usual output.
10729     $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
10730     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
10731     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
10732       lt_cv_prog_compiler_rtti_exceptions=yes
10733     fi
10734   fi
10735   $RM conftest*
10736
10737fi
10738{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5
10739$as_echo "$lt_cv_prog_compiler_rtti_exceptions" >&6; }
10740
10741if test yes = "$lt_cv_prog_compiler_rtti_exceptions"; then
10742    lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions"
10743else
10744    :
10745fi
10746
10747fi
10748
10749
10750
10751
10752
10753
10754  lt_prog_compiler_wl=
10755lt_prog_compiler_pic=
10756lt_prog_compiler_static=
10757
10758
10759  if test yes = "$GCC"; then
10760    lt_prog_compiler_wl='-Wl,'
10761    lt_prog_compiler_static='-static'
10762
10763    case $host_os in
10764      aix*)
10765      # All AIX code is PIC.
10766      if test ia64 = "$host_cpu"; then
10767	# AIX 5 now supports IA64 processor
10768	lt_prog_compiler_static='-Bstatic'
10769      fi
10770      lt_prog_compiler_pic='-fPIC'
10771      ;;
10772
10773    amigaos*)
10774      case $host_cpu in
10775      powerpc)
10776            # see comment about AmigaOS4 .so support
10777            lt_prog_compiler_pic='-fPIC'
10778        ;;
10779      m68k)
10780            # FIXME: we need at least 68020 code to build shared libraries, but
10781            # adding the '-m68020' flag to GCC prevents building anything better,
10782            # like '-m68040'.
10783            lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4'
10784        ;;
10785      esac
10786      ;;
10787
10788    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
10789      # PIC is the default for these OSes.
10790      ;;
10791
10792    mingw* | cygwin* | pw32* | os2* | cegcc*)
10793      # This hack is so that the source file can tell whether it is being
10794      # built for inclusion in a dll (and should export symbols for example).
10795      # Although the cygwin gcc ignores -fPIC, still need this for old-style
10796      # (--disable-auto-import) libraries
10797      lt_prog_compiler_pic='-DDLL_EXPORT'
10798      case $host_os in
10799      os2*)
10800	lt_prog_compiler_static='$wl-static'
10801	;;
10802      esac
10803      ;;
10804
10805    darwin* | rhapsody*)
10806      # PIC is the default on this platform
10807      # Common symbols not allowed in MH_DYLIB files
10808      lt_prog_compiler_pic='-fno-common'
10809      ;;
10810
10811    haiku*)
10812      # PIC is the default for Haiku.
10813      # The "-static" flag exists, but is broken.
10814      lt_prog_compiler_static=
10815      ;;
10816
10817    hpux*)
10818      # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
10819      # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
10820      # sets the default TLS model and affects inlining.
10821      case $host_cpu in
10822      hppa*64*)
10823	# +Z the default
10824	;;
10825      *)
10826	lt_prog_compiler_pic='-fPIC'
10827	;;
10828      esac
10829      ;;
10830
10831    interix[3-9]*)
10832      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
10833      # Instead, we relocate shared libraries at runtime.
10834      ;;
10835
10836    msdosdjgpp*)
10837      # Just because we use GCC doesn't mean we suddenly get shared libraries
10838      # on systems that don't support them.
10839      lt_prog_compiler_can_build_shared=no
10840      enable_shared=no
10841      ;;
10842
10843    *nto* | *qnx*)
10844      # QNX uses GNU C++, but need to define -shared option too, otherwise
10845      # it will coredump.
10846      lt_prog_compiler_pic='-fPIC -shared'
10847      ;;
10848
10849    sysv4*MP*)
10850      if test -d /usr/nec; then
10851	lt_prog_compiler_pic=-Kconform_pic
10852      fi
10853      ;;
10854
10855    *)
10856      lt_prog_compiler_pic='-fPIC'
10857      ;;
10858    esac
10859
10860    case $cc_basename in
10861    nvcc*) # Cuda Compiler Driver 2.2
10862      lt_prog_compiler_wl='-Xlinker '
10863      if test -n "$lt_prog_compiler_pic"; then
10864        lt_prog_compiler_pic="-Xcompiler $lt_prog_compiler_pic"
10865      fi
10866      ;;
10867    esac
10868  else
10869    # PORTME Check for flag to pass linker flags through the system compiler.
10870    case $host_os in
10871    aix*)
10872      lt_prog_compiler_wl='-Wl,'
10873      if test ia64 = "$host_cpu"; then
10874	# AIX 5 now supports IA64 processor
10875	lt_prog_compiler_static='-Bstatic'
10876      else
10877	lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp'
10878      fi
10879      ;;
10880
10881    darwin* | rhapsody*)
10882      # PIC is the default on this platform
10883      # Common symbols not allowed in MH_DYLIB files
10884      lt_prog_compiler_pic='-fno-common'
10885      case $cc_basename in
10886      nagfor*)
10887        # NAG Fortran compiler
10888        lt_prog_compiler_wl='-Wl,-Wl,,'
10889        lt_prog_compiler_pic='-PIC'
10890        lt_prog_compiler_static='-Bstatic'
10891        ;;
10892      esac
10893      ;;
10894
10895    mingw* | cygwin* | pw32* | os2* | cegcc*)
10896      # This hack is so that the source file can tell whether it is being
10897      # built for inclusion in a dll (and should export symbols for example).
10898      lt_prog_compiler_pic='-DDLL_EXPORT'
10899      case $host_os in
10900      os2*)
10901	lt_prog_compiler_static='$wl-static'
10902	;;
10903      esac
10904      ;;
10905
10906    hpux9* | hpux10* | hpux11*)
10907      lt_prog_compiler_wl='-Wl,'
10908      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
10909      # not for PA HP-UX.
10910      case $host_cpu in
10911      hppa*64*|ia64*)
10912	# +Z the default
10913	;;
10914      *)
10915	lt_prog_compiler_pic='+Z'
10916	;;
10917      esac
10918      # Is there a better lt_prog_compiler_static that works with the bundled CC?
10919      lt_prog_compiler_static='$wl-a ${wl}archive'
10920      ;;
10921
10922    irix5* | irix6* | nonstopux*)
10923      lt_prog_compiler_wl='-Wl,'
10924      # PIC (with -KPIC) is the default.
10925      lt_prog_compiler_static='-non_shared'
10926      ;;
10927
10928    linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
10929      case $cc_basename in
10930      # old Intel for x86_64, which still supported -KPIC.
10931      ecc*)
10932	lt_prog_compiler_wl='-Wl,'
10933	lt_prog_compiler_pic='-KPIC'
10934	lt_prog_compiler_static='-static'
10935        ;;
10936      # icc used to be incompatible with GCC.
10937      # ICC 10 doesn't accept -KPIC any more.
10938      icc* | ifort*)
10939	lt_prog_compiler_wl='-Wl,'
10940	lt_prog_compiler_pic='-fPIC'
10941	lt_prog_compiler_static='-static'
10942        ;;
10943      # Lahey Fortran 8.1.
10944      lf95*)
10945	lt_prog_compiler_wl='-Wl,'
10946	lt_prog_compiler_pic='--shared'
10947	lt_prog_compiler_static='--static'
10948	;;
10949      nagfor*)
10950	# NAG Fortran compiler
10951	lt_prog_compiler_wl='-Wl,-Wl,,'
10952	lt_prog_compiler_pic='-PIC'
10953	lt_prog_compiler_static='-Bstatic'
10954	;;
10955      tcc*)
10956	# Fabrice Bellard et al's Tiny C Compiler
10957	lt_prog_compiler_wl='-Wl,'
10958	lt_prog_compiler_pic='-fPIC'
10959	lt_prog_compiler_static='-static'
10960	;;
10961      pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
10962        # Portland Group compilers (*not* the Pentium gcc compiler,
10963	# which looks to be a dead project)
10964	lt_prog_compiler_wl='-Wl,'
10965	lt_prog_compiler_pic='-fpic'
10966	lt_prog_compiler_static='-Bstatic'
10967        ;;
10968      ccc*)
10969        lt_prog_compiler_wl='-Wl,'
10970        # All Alpha code is PIC.
10971        lt_prog_compiler_static='-non_shared'
10972        ;;
10973      xl* | bgxl* | bgf* | mpixl*)
10974	# IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene
10975	lt_prog_compiler_wl='-Wl,'
10976	lt_prog_compiler_pic='-qpic'
10977	lt_prog_compiler_static='-qstaticlink'
10978	;;
10979      *)
10980	case `$CC -V 2>&1 | sed 5q` in
10981	*Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [1-7].* | *Sun*Fortran*\ 8.[0-3]*)
10982	  # Sun Fortran 8.3 passes all unrecognized flags to the linker
10983	  lt_prog_compiler_pic='-KPIC'
10984	  lt_prog_compiler_static='-Bstatic'
10985	  lt_prog_compiler_wl=''
10986	  ;;
10987	*Sun\ F* | *Sun*Fortran*)
10988	  lt_prog_compiler_pic='-KPIC'
10989	  lt_prog_compiler_static='-Bstatic'
10990	  lt_prog_compiler_wl='-Qoption ld '
10991	  ;;
10992	*Sun\ C*)
10993	  # Sun C 5.9
10994	  lt_prog_compiler_pic='-KPIC'
10995	  lt_prog_compiler_static='-Bstatic'
10996	  lt_prog_compiler_wl='-Wl,'
10997	  ;;
10998        *Intel*\ [CF]*Compiler*)
10999	  lt_prog_compiler_wl='-Wl,'
11000	  lt_prog_compiler_pic='-fPIC'
11001	  lt_prog_compiler_static='-static'
11002	  ;;
11003	*Portland\ Group*)
11004	  lt_prog_compiler_wl='-Wl,'
11005	  lt_prog_compiler_pic='-fpic'
11006	  lt_prog_compiler_static='-Bstatic'
11007	  ;;
11008	esac
11009	;;
11010      esac
11011      ;;
11012
11013    newsos6)
11014      lt_prog_compiler_pic='-KPIC'
11015      lt_prog_compiler_static='-Bstatic'
11016      ;;
11017
11018    *nto* | *qnx*)
11019      # QNX uses GNU C++, but need to define -shared option too, otherwise
11020      # it will coredump.
11021      lt_prog_compiler_pic='-fPIC -shared'
11022      ;;
11023
11024    osf3* | osf4* | osf5*)
11025      lt_prog_compiler_wl='-Wl,'
11026      # All OSF/1 code is PIC.
11027      lt_prog_compiler_static='-non_shared'
11028      ;;
11029
11030    rdos*)
11031      lt_prog_compiler_static='-non_shared'
11032      ;;
11033
11034    solaris*)
11035      lt_prog_compiler_pic='-KPIC'
11036      lt_prog_compiler_static='-Bstatic'
11037      case $cc_basename in
11038      f77* | f90* | f95* | sunf77* | sunf90* | sunf95*)
11039	lt_prog_compiler_wl='-Qoption ld ';;
11040      *)
11041	lt_prog_compiler_wl='-Wl,';;
11042      esac
11043      ;;
11044
11045    sunos4*)
11046      lt_prog_compiler_wl='-Qoption ld '
11047      lt_prog_compiler_pic='-PIC'
11048      lt_prog_compiler_static='-Bstatic'
11049      ;;
11050
11051    sysv4 | sysv4.2uw2* | sysv4.3*)
11052      lt_prog_compiler_wl='-Wl,'
11053      lt_prog_compiler_pic='-KPIC'
11054      lt_prog_compiler_static='-Bstatic'
11055      ;;
11056
11057    sysv4*MP*)
11058      if test -d /usr/nec; then
11059	lt_prog_compiler_pic='-Kconform_pic'
11060	lt_prog_compiler_static='-Bstatic'
11061      fi
11062      ;;
11063
11064    sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
11065      lt_prog_compiler_wl='-Wl,'
11066      lt_prog_compiler_pic='-KPIC'
11067      lt_prog_compiler_static='-Bstatic'
11068      ;;
11069
11070    unicos*)
11071      lt_prog_compiler_wl='-Wl,'
11072      lt_prog_compiler_can_build_shared=no
11073      ;;
11074
11075    uts4*)
11076      lt_prog_compiler_pic='-pic'
11077      lt_prog_compiler_static='-Bstatic'
11078      ;;
11079
11080    *)
11081      lt_prog_compiler_can_build_shared=no
11082      ;;
11083    esac
11084  fi
11085
11086case $host_os in
11087  # For platforms that do not support PIC, -DPIC is meaningless:
11088  *djgpp*)
11089    lt_prog_compiler_pic=
11090    ;;
11091  *)
11092    lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC"
11093    ;;
11094esac
11095
11096{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5
11097$as_echo_n "checking for $compiler option to produce PIC... " >&6; }
11098if ${lt_cv_prog_compiler_pic+:} false; then :
11099  $as_echo_n "(cached) " >&6
11100else
11101  lt_cv_prog_compiler_pic=$lt_prog_compiler_pic
11102fi
11103{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic" >&5
11104$as_echo "$lt_cv_prog_compiler_pic" >&6; }
11105lt_prog_compiler_pic=$lt_cv_prog_compiler_pic
11106
11107#
11108# Check to make sure the PIC flag actually works.
11109#
11110if test -n "$lt_prog_compiler_pic"; then
11111  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5
11112$as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; }
11113if ${lt_cv_prog_compiler_pic_works+:} false; then :
11114  $as_echo_n "(cached) " >&6
11115else
11116  lt_cv_prog_compiler_pic_works=no
11117   ac_outfile=conftest.$ac_objext
11118   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
11119   lt_compiler_flag="$lt_prog_compiler_pic -DPIC"  ## exclude from sc_useless_quotes_in_assignment
11120   # Insert the option either (1) after the last *FLAGS variable, or
11121   # (2) before a word containing "conftest.", or (3) at the end.
11122   # Note that $ac_compile itself does not contain backslashes and begins
11123   # with a dollar sign (not a hyphen), so the echo should work correctly.
11124   # The option is referenced via a variable to avoid confusing sed.
11125   lt_compile=`echo "$ac_compile" | $SED \
11126   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
11127   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
11128   -e 's:$: $lt_compiler_flag:'`
11129   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
11130   (eval "$lt_compile" 2>conftest.err)
11131   ac_status=$?
11132   cat conftest.err >&5
11133   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11134   if (exit $ac_status) && test -s "$ac_outfile"; then
11135     # The compiler can only warn and ignore the option if not recognized
11136     # So say no if there are warnings other than the usual output.
11137     $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
11138     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
11139     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
11140       lt_cv_prog_compiler_pic_works=yes
11141     fi
11142   fi
11143   $RM conftest*
11144
11145fi
11146{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5
11147$as_echo "$lt_cv_prog_compiler_pic_works" >&6; }
11148
11149if test yes = "$lt_cv_prog_compiler_pic_works"; then
11150    case $lt_prog_compiler_pic in
11151     "" | " "*) ;;
11152     *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;;
11153     esac
11154else
11155    lt_prog_compiler_pic=
11156     lt_prog_compiler_can_build_shared=no
11157fi
11158
11159fi
11160
11161
11162
11163
11164
11165
11166
11167
11168
11169
11170
11171#
11172# Check to make sure the static flag actually works.
11173#
11174wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\"
11175{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5
11176$as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; }
11177if ${lt_cv_prog_compiler_static_works+:} false; then :
11178  $as_echo_n "(cached) " >&6
11179else
11180  lt_cv_prog_compiler_static_works=no
11181   save_LDFLAGS=$LDFLAGS
11182   LDFLAGS="$LDFLAGS $lt_tmp_static_flag"
11183   echo "$lt_simple_link_test_code" > conftest.$ac_ext
11184   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
11185     # The linker can only warn and ignore the option if not recognized
11186     # So say no if there are warnings
11187     if test -s conftest.err; then
11188       # Append any errors to the config.log.
11189       cat conftest.err 1>&5
11190       $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
11191       $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
11192       if diff conftest.exp conftest.er2 >/dev/null; then
11193         lt_cv_prog_compiler_static_works=yes
11194       fi
11195     else
11196       lt_cv_prog_compiler_static_works=yes
11197     fi
11198   fi
11199   $RM -r conftest*
11200   LDFLAGS=$save_LDFLAGS
11201
11202fi
11203{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5
11204$as_echo "$lt_cv_prog_compiler_static_works" >&6; }
11205
11206if test yes = "$lt_cv_prog_compiler_static_works"; then
11207    :
11208else
11209    lt_prog_compiler_static=
11210fi
11211
11212
11213
11214
11215
11216
11217
11218  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
11219$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
11220if ${lt_cv_prog_compiler_c_o+:} false; then :
11221  $as_echo_n "(cached) " >&6
11222else
11223  lt_cv_prog_compiler_c_o=no
11224   $RM -r conftest 2>/dev/null
11225   mkdir conftest
11226   cd conftest
11227   mkdir out
11228   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
11229
11230   lt_compiler_flag="-o out/conftest2.$ac_objext"
11231   # Insert the option either (1) after the last *FLAGS variable, or
11232   # (2) before a word containing "conftest.", or (3) at the end.
11233   # Note that $ac_compile itself does not contain backslashes and begins
11234   # with a dollar sign (not a hyphen), so the echo should work correctly.
11235   lt_compile=`echo "$ac_compile" | $SED \
11236   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
11237   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
11238   -e 's:$: $lt_compiler_flag:'`
11239   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
11240   (eval "$lt_compile" 2>out/conftest.err)
11241   ac_status=$?
11242   cat out/conftest.err >&5
11243   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11244   if (exit $ac_status) && test -s out/conftest2.$ac_objext
11245   then
11246     # The compiler can only warn and ignore the option if not recognized
11247     # So say no if there are warnings
11248     $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
11249     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
11250     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
11251       lt_cv_prog_compiler_c_o=yes
11252     fi
11253   fi
11254   chmod u+w . 2>&5
11255   $RM conftest*
11256   # SGI C++ compiler will create directory out/ii_files/ for
11257   # template instantiation
11258   test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
11259   $RM out/* && rmdir out
11260   cd ..
11261   $RM -r conftest
11262   $RM conftest*
11263
11264fi
11265{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5
11266$as_echo "$lt_cv_prog_compiler_c_o" >&6; }
11267
11268
11269
11270
11271
11272
11273  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
11274$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
11275if ${lt_cv_prog_compiler_c_o+:} false; then :
11276  $as_echo_n "(cached) " >&6
11277else
11278  lt_cv_prog_compiler_c_o=no
11279   $RM -r conftest 2>/dev/null
11280   mkdir conftest
11281   cd conftest
11282   mkdir out
11283   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
11284
11285   lt_compiler_flag="-o out/conftest2.$ac_objext"
11286   # Insert the option either (1) after the last *FLAGS variable, or
11287   # (2) before a word containing "conftest.", or (3) at the end.
11288   # Note that $ac_compile itself does not contain backslashes and begins
11289   # with a dollar sign (not a hyphen), so the echo should work correctly.
11290   lt_compile=`echo "$ac_compile" | $SED \
11291   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
11292   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
11293   -e 's:$: $lt_compiler_flag:'`
11294   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
11295   (eval "$lt_compile" 2>out/conftest.err)
11296   ac_status=$?
11297   cat out/conftest.err >&5
11298   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11299   if (exit $ac_status) && test -s out/conftest2.$ac_objext
11300   then
11301     # The compiler can only warn and ignore the option if not recognized
11302     # So say no if there are warnings
11303     $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
11304     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
11305     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
11306       lt_cv_prog_compiler_c_o=yes
11307     fi
11308   fi
11309   chmod u+w . 2>&5
11310   $RM conftest*
11311   # SGI C++ compiler will create directory out/ii_files/ for
11312   # template instantiation
11313   test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
11314   $RM out/* && rmdir out
11315   cd ..
11316   $RM -r conftest
11317   $RM conftest*
11318
11319fi
11320{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5
11321$as_echo "$lt_cv_prog_compiler_c_o" >&6; }
11322
11323
11324
11325
11326hard_links=nottested
11327if test no = "$lt_cv_prog_compiler_c_o" && test no != "$need_locks"; then
11328  # do not overwrite the value of need_locks provided by the user
11329  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5
11330$as_echo_n "checking if we can lock with hard links... " >&6; }
11331  hard_links=yes
11332  $RM conftest*
11333  ln conftest.a conftest.b 2>/dev/null && hard_links=no
11334  touch conftest.a
11335  ln conftest.a conftest.b 2>&5 || hard_links=no
11336  ln conftest.a conftest.b 2>/dev/null && hard_links=no
11337  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5
11338$as_echo "$hard_links" >&6; }
11339  if test no = "$hard_links"; then
11340    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&5
11341$as_echo "$as_me: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&2;}
11342    need_locks=warn
11343  fi
11344else
11345  need_locks=no
11346fi
11347
11348
11349
11350
11351
11352
11353  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5
11354$as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; }
11355
11356  runpath_var=
11357  allow_undefined_flag=
11358  always_export_symbols=no
11359  archive_cmds=
11360  archive_expsym_cmds=
11361  compiler_needs_object=no
11362  enable_shared_with_static_runtimes=no
11363  export_dynamic_flag_spec=
11364  export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
11365  hardcode_automatic=no
11366  hardcode_direct=no
11367  hardcode_direct_absolute=no
11368  hardcode_libdir_flag_spec=
11369  hardcode_libdir_separator=
11370  hardcode_minus_L=no
11371  hardcode_shlibpath_var=unsupported
11372  inherit_rpath=no
11373  link_all_deplibs=unknown
11374  module_cmds=
11375  module_expsym_cmds=
11376  old_archive_from_new_cmds=
11377  old_archive_from_expsyms_cmds=
11378  thread_safe_flag_spec=
11379  whole_archive_flag_spec=
11380  # include_expsyms should be a list of space-separated symbols to be *always*
11381  # included in the symbol list
11382  include_expsyms=
11383  # exclude_expsyms can be an extended regexp of symbols to exclude
11384  # it will be wrapped by ' (' and ')$', so one must not match beginning or
11385  # end of line.  Example: 'a|bc|.*d.*' will exclude the symbols 'a' and 'bc',
11386  # as well as any symbol that contains 'd'.
11387  exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'
11388  # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
11389  # platforms (ab)use it in PIC code, but their linkers get confused if
11390  # the symbol is explicitly referenced.  Since portable code cannot
11391  # rely on this symbol name, it's probably fine to never include it in
11392  # preloaded symbol tables.
11393  # Exclude shared library initialization/finalization symbols.
11394  extract_expsyms_cmds=
11395
11396  case $host_os in
11397  cygwin* | mingw* | pw32* | cegcc*)
11398    # FIXME: the MSVC++ port hasn't been tested in a loooong time
11399    # When not using gcc, we currently assume that we are using
11400    # Microsoft Visual C++.
11401    if test yes != "$GCC"; then
11402      with_gnu_ld=no
11403    fi
11404    ;;
11405  interix*)
11406    # we just hope/assume this is gcc and not c89 (= MSVC++)
11407    with_gnu_ld=yes
11408    ;;
11409  openbsd* | bitrig*)
11410    with_gnu_ld=no
11411    ;;
11412  esac
11413
11414  ld_shlibs=yes
11415
11416  # On some targets, GNU ld is compatible enough with the native linker
11417  # that we're better off using the native interface for both.
11418  lt_use_gnu_ld_interface=no
11419  if test yes = "$with_gnu_ld"; then
11420    case $host_os in
11421      aix*)
11422	# The AIX port of GNU ld has always aspired to compatibility
11423	# with the native linker.  However, as the warning in the GNU ld
11424	# block says, versions before 2.19.5* couldn't really create working
11425	# shared libraries, regardless of the interface used.
11426	case `$LD -v 2>&1` in
11427	  *\ \(GNU\ Binutils\)\ 2.19.5*) ;;
11428	  *\ \(GNU\ Binutils\)\ 2.[2-9]*) ;;
11429	  *\ \(GNU\ Binutils\)\ [3-9]*) ;;
11430	  *)
11431	    lt_use_gnu_ld_interface=yes
11432	    ;;
11433	esac
11434	;;
11435      *)
11436	lt_use_gnu_ld_interface=yes
11437	;;
11438    esac
11439  fi
11440
11441  if test yes = "$lt_use_gnu_ld_interface"; then
11442    # If archive_cmds runs LD, not CC, wlarc should be empty
11443    wlarc='$wl'
11444
11445    # Set some defaults for GNU ld with shared library support. These
11446    # are reset later if shared libraries are not supported. Putting them
11447    # here allows them to be overridden if necessary.
11448    runpath_var=LD_RUN_PATH
11449    hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
11450    export_dynamic_flag_spec='$wl--export-dynamic'
11451    # ancient GNU ld didn't support --whole-archive et. al.
11452    if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
11453      whole_archive_flag_spec=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
11454    else
11455      whole_archive_flag_spec=
11456    fi
11457    supports_anon_versioning=no
11458    case `$LD -v | $SED -e 's/(^)\+)\s\+//' 2>&1` in
11459      *GNU\ gold*) supports_anon_versioning=yes ;;
11460      *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11
11461      *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
11462      *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
11463      *\ 2.11.*) ;; # other 2.11 versions
11464      *) supports_anon_versioning=yes ;;
11465    esac
11466
11467    # See if GNU ld supports shared libraries.
11468    case $host_os in
11469    aix[3-9]*)
11470      # On AIX/PPC, the GNU linker is very broken
11471      if test ia64 != "$host_cpu"; then
11472	ld_shlibs=no
11473	cat <<_LT_EOF 1>&2
11474
11475*** Warning: the GNU linker, at least up to release 2.19, is reported
11476*** to be unable to reliably create shared libraries on AIX.
11477*** Therefore, libtool is disabling shared libraries support.  If you
11478*** really care for shared libraries, you may want to install binutils
11479*** 2.20 or above, or modify your PATH so that a non-GNU linker is found.
11480*** You will then need to restart the configuration process.
11481
11482_LT_EOF
11483      fi
11484      ;;
11485
11486    amigaos*)
11487      case $host_cpu in
11488      powerpc)
11489            # see comment about AmigaOS4 .so support
11490            archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
11491            archive_expsym_cmds=''
11492        ;;
11493      m68k)
11494            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)'
11495            hardcode_libdir_flag_spec='-L$libdir'
11496            hardcode_minus_L=yes
11497        ;;
11498      esac
11499      ;;
11500
11501    beos*)
11502      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
11503	allow_undefined_flag=unsupported
11504	# Joseph Beckenbach <jrb3@best.com> says some releases of gcc
11505	# support --undefined.  This deserves some investigation.  FIXME
11506	archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
11507      else
11508	ld_shlibs=no
11509      fi
11510      ;;
11511
11512    cygwin* | mingw* | pw32* | cegcc*)
11513      # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless,
11514      # as there is no search path for DLLs.
11515      hardcode_libdir_flag_spec='-L$libdir'
11516      export_dynamic_flag_spec='$wl--export-all-symbols'
11517      allow_undefined_flag=unsupported
11518      always_export_symbols=no
11519      enable_shared_with_static_runtimes=yes
11520      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'
11521      exclude_expsyms='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'
11522
11523      if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
11524        archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
11525	# If the export-symbols file already is a .def file, use it as
11526	# is; otherwise, prepend EXPORTS...
11527	archive_expsym_cmds='if   test DEF = "`$SED -n     -e '\''s/^[	 ]*//'\''     -e '\''/^\(;.*\)*$/d'\''     -e '\''s/^\(EXPORTS\|LIBRARY\)\([	 ].*\)*$/DEF/p'\''     -e q     $export_symbols`" ; then
11528          cp $export_symbols $output_objdir/$soname.def;
11529        else
11530          echo EXPORTS > $output_objdir/$soname.def;
11531          cat $export_symbols >> $output_objdir/$soname.def;
11532        fi~
11533        $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
11534      else
11535	ld_shlibs=no
11536      fi
11537      ;;
11538
11539    haiku*)
11540      archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
11541      link_all_deplibs=yes
11542      ;;
11543
11544    os2*)
11545      hardcode_libdir_flag_spec='-L$libdir'
11546      hardcode_minus_L=yes
11547      allow_undefined_flag=unsupported
11548      shrext_cmds=.dll
11549      archive_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
11550	$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
11551	$ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
11552	$ECHO EXPORTS >> $output_objdir/$libname.def~
11553	emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
11554	$CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
11555	emximp -o $lib $output_objdir/$libname.def'
11556      archive_expsym_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
11557	$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
11558	$ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
11559	$ECHO EXPORTS >> $output_objdir/$libname.def~
11560	prefix_cmds="$SED"~
11561	if test EXPORTS = "`$SED 1q $export_symbols`"; then
11562	  prefix_cmds="$prefix_cmds -e 1d";
11563	fi~
11564	prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
11565	cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
11566	$CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
11567	emximp -o $lib $output_objdir/$libname.def'
11568      old_archive_From_new_cmds='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
11569      enable_shared_with_static_runtimes=yes
11570      ;;
11571
11572    interix[3-9]*)
11573      hardcode_direct=no
11574      hardcode_shlibpath_var=no
11575      hardcode_libdir_flag_spec='$wl-rpath,$libdir'
11576      export_dynamic_flag_spec='$wl-E'
11577      # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
11578      # Instead, shared libraries are loaded at an image base (0x10000000 by
11579      # default) and relocated if they conflict, which is a slow very memory
11580      # consuming and fragmenting process.  To avoid this, we pick a random,
11581      # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
11582      # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
11583      archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
11584      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'
11585      ;;
11586
11587    gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
11588      tmp_diet=no
11589      if test linux-dietlibc = "$host_os"; then
11590	case $cc_basename in
11591	  diet\ *) tmp_diet=yes;;	# linux-dietlibc with static linking (!diet-dyn)
11592	esac
11593      fi
11594      if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
11595	 && test no = "$tmp_diet"
11596      then
11597	tmp_addflag=' $pic_flag'
11598	tmp_sharedflag='-shared'
11599	case $cc_basename,$host_cpu in
11600        pgcc*)				# Portland Group C compiler
11601	  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'
11602	  tmp_addflag=' $pic_flag'
11603	  ;;
11604	pgf77* | pgf90* | pgf95* | pgfortran*)
11605					# Portland Group f77 and f90 compilers
11606	  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'
11607	  tmp_addflag=' $pic_flag -Mnomain' ;;
11608	ecc*,ia64* | icc*,ia64*)	# Intel C compiler on ia64
11609	  tmp_addflag=' -i_dynamic' ;;
11610	efc*,ia64* | ifort*,ia64*)	# Intel Fortran compiler on ia64
11611	  tmp_addflag=' -i_dynamic -nofor_main' ;;
11612	ifc* | ifort*)			# Intel Fortran compiler
11613	  tmp_addflag=' -nofor_main' ;;
11614	lf95*)				# Lahey Fortran 8.1
11615	  whole_archive_flag_spec=
11616	  tmp_sharedflag='--shared' ;;
11617        nagfor*)                        # NAGFOR 5.3
11618          tmp_sharedflag='-Wl,-shared' ;;
11619	xl[cC]* | bgxl[cC]* | mpixl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below)
11620	  tmp_sharedflag='-qmkshrobj'
11621	  tmp_addflag= ;;
11622	nvcc*)	# Cuda Compiler Driver 2.2
11623	  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'
11624	  compiler_needs_object=yes
11625	  ;;
11626	esac
11627	case `$CC -V 2>&1 | sed 5q` in
11628	*Sun\ C*)			# Sun C 5.9
11629	  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'
11630	  compiler_needs_object=yes
11631	  tmp_sharedflag='-G' ;;
11632	*Sun\ F*)			# Sun Fortran 8.3
11633	  tmp_sharedflag='-G' ;;
11634	esac
11635	archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
11636
11637        if test yes = "$supports_anon_versioning"; then
11638          archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~
11639            cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
11640            echo "local: *; };" >> $output_objdir/$libname.ver~
11641            $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib'
11642        fi
11643
11644	case $cc_basename in
11645	tcc*)
11646	  export_dynamic_flag_spec='-rdynamic'
11647	  ;;
11648	xlf* | bgf* | bgxlf* | mpixlf*)
11649	  # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
11650	  whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive'
11651	  hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
11652	  archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
11653	  if test yes = "$supports_anon_versioning"; then
11654	    archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~
11655              cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
11656              echo "local: *; };" >> $output_objdir/$libname.ver~
11657              $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
11658	  fi
11659	  ;;
11660	esac
11661      else
11662        ld_shlibs=no
11663      fi
11664      ;;
11665
11666    netbsd*)
11667      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
11668	archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
11669	wlarc=
11670      else
11671	archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
11672	archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
11673      fi
11674      ;;
11675
11676    solaris*)
11677      if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
11678	ld_shlibs=no
11679	cat <<_LT_EOF 1>&2
11680
11681*** Warning: The releases 2.8.* of the GNU linker cannot reliably
11682*** create shared libraries on Solaris systems.  Therefore, libtool
11683*** is disabling shared libraries support.  We urge you to upgrade GNU
11684*** binutils to release 2.9.1 or newer.  Another option is to modify
11685*** your PATH or compiler configuration so that the native linker is
11686*** used, and then restart.
11687
11688_LT_EOF
11689      elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
11690	archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
11691	archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
11692      else
11693	ld_shlibs=no
11694      fi
11695      ;;
11696
11697    sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
11698      case `$LD -v 2>&1` in
11699        *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*)
11700	ld_shlibs=no
11701	cat <<_LT_EOF 1>&2
11702
11703*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot
11704*** reliably create shared libraries on SCO systems.  Therefore, libtool
11705*** is disabling shared libraries support.  We urge you to upgrade GNU
11706*** binutils to release 2.16.91.0.3 or newer.  Another option is to modify
11707*** your PATH or compiler configuration so that the native linker is
11708*** used, and then restart.
11709
11710_LT_EOF
11711	;;
11712	*)
11713	  # For security reasons, it is highly recommended that you always
11714	  # use absolute paths for naming shared libraries, and exclude the
11715	  # DT_RUNPATH tag from executables and libraries.  But doing so
11716	  # requires that you compile everything twice, which is a pain.
11717	  if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
11718	    hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
11719	    archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
11720	    archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
11721	  else
11722	    ld_shlibs=no
11723	  fi
11724	;;
11725      esac
11726      ;;
11727
11728    sunos4*)
11729      archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
11730      wlarc=
11731      hardcode_direct=yes
11732      hardcode_shlibpath_var=no
11733      ;;
11734
11735    *)
11736      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
11737	archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
11738	archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
11739      else
11740	ld_shlibs=no
11741      fi
11742      ;;
11743    esac
11744
11745    if test no = "$ld_shlibs"; then
11746      runpath_var=
11747      hardcode_libdir_flag_spec=
11748      export_dynamic_flag_spec=
11749      whole_archive_flag_spec=
11750    fi
11751  else
11752    # PORTME fill in a description of your system's linker (not GNU ld)
11753    case $host_os in
11754    aix3*)
11755      allow_undefined_flag=unsupported
11756      always_export_symbols=yes
11757      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'
11758      # Note: this linker hardcodes the directories in LIBPATH if there
11759      # are no directories specified by -L.
11760      hardcode_minus_L=yes
11761      if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then
11762	# Neither direct hardcoding nor static linking is supported with a
11763	# broken collect2.
11764	hardcode_direct=unsupported
11765      fi
11766      ;;
11767
11768    aix[4-9]*)
11769      if test ia64 = "$host_cpu"; then
11770	# On IA64, the linker does run time linking by default, so we don't
11771	# have to do anything special.
11772	aix_use_runtimelinking=no
11773	exp_sym_flag='-Bexport'
11774	no_entry_flag=
11775      else
11776	# If we're using GNU nm, then we don't want the "-C" option.
11777	# -C means demangle to GNU nm, but means don't demangle to AIX nm.
11778	# Without the "-l" option, or with the "-B" option, AIX nm treats
11779	# weak defined symbols like other global defined symbols, whereas
11780	# GNU nm marks them as "W".
11781	# While the 'weak' keyword is ignored in the Export File, we need
11782	# it in the Import File for the 'aix-soname' feature, so we have
11783	# to replace the "-B" option with "-P" for AIX nm.
11784	if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
11785	  export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols'
11786	else
11787	  export_symbols_cmds='`func_echo_all $NM | $SED -e '\''s/B\([^B]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && (substr(\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols'
11788	fi
11789	aix_use_runtimelinking=no
11790
11791	# Test if we are trying to use run time linking or normal
11792	# AIX style linking. If -brtl is somewhere in LDFLAGS, we
11793	# have runtime linking enabled, and use it for executables.
11794	# For shared libraries, we enable/disable runtime linking
11795	# depending on the kind of the shared library created -
11796	# when "with_aix_soname,aix_use_runtimelinking" is:
11797	# "aix,no"   lib.a(lib.so.V) shared, rtl:no,  for executables
11798	# "aix,yes"  lib.so          shared, rtl:yes, for executables
11799	#            lib.a           static archive
11800	# "both,no"  lib.so.V(shr.o) shared, rtl:yes
11801	#            lib.a(lib.so.V) shared, rtl:no,  for executables
11802	# "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables
11803	#            lib.a(lib.so.V) shared, rtl:no
11804	# "svr4,*"   lib.so.V(shr.o) shared, rtl:yes, for executables
11805	#            lib.a           static archive
11806	case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*)
11807	  for ld_flag in $LDFLAGS; do
11808	  if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then
11809	    aix_use_runtimelinking=yes
11810	    break
11811	  fi
11812	  done
11813	  if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then
11814	    # With aix-soname=svr4, we create the lib.so.V shared archives only,
11815	    # so we don't have lib.a shared libs to link our executables.
11816	    # We have to force runtime linking in this case.
11817	    aix_use_runtimelinking=yes
11818	    LDFLAGS="$LDFLAGS -Wl,-brtl"
11819	  fi
11820	  ;;
11821	esac
11822
11823	exp_sym_flag='-bexport'
11824	no_entry_flag='-bnoentry'
11825      fi
11826
11827      # When large executables or shared objects are built, AIX ld can
11828      # have problems creating the table of contents.  If linking a library
11829      # or program results in "error TOC overflow" add -mminimal-toc to
11830      # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
11831      # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
11832
11833      archive_cmds=''
11834      hardcode_direct=yes
11835      hardcode_direct_absolute=yes
11836      hardcode_libdir_separator=':'
11837      link_all_deplibs=yes
11838      file_list_spec='$wl-f,'
11839      case $with_aix_soname,$aix_use_runtimelinking in
11840      aix,*) ;; # traditional, no import file
11841      svr4,* | *,yes) # use import file
11842	# The Import File defines what to hardcode.
11843	hardcode_direct=no
11844	hardcode_direct_absolute=no
11845	;;
11846      esac
11847
11848      if test yes = "$GCC"; then
11849	case $host_os in aix4.[012]|aix4.[012].*)
11850	# We only want to do this on AIX 4.2 and lower, the check
11851	# below for broken collect2 doesn't work under 4.3+
11852	  collect2name=`$CC -print-prog-name=collect2`
11853	  if test -f "$collect2name" &&
11854	   strings "$collect2name" | $GREP resolve_lib_name >/dev/null
11855	  then
11856	  # We have reworked collect2
11857	  :
11858	  else
11859	  # We have old collect2
11860	  hardcode_direct=unsupported
11861	  # It fails to find uninstalled libraries when the uninstalled
11862	  # path is not listed in the libpath.  Setting hardcode_minus_L
11863	  # to unsupported forces relinking
11864	  hardcode_minus_L=yes
11865	  hardcode_libdir_flag_spec='-L$libdir'
11866	  hardcode_libdir_separator=
11867	  fi
11868	  ;;
11869	esac
11870	shared_flag='-shared'
11871	if test yes = "$aix_use_runtimelinking"; then
11872	  shared_flag="$shared_flag "'$wl-G'
11873	fi
11874	# Need to ensure runtime linking is disabled for the traditional
11875	# shared library, or the linker may eventually find shared libraries
11876	# /with/ Import File - we do not want to mix them.
11877	shared_flag_aix='-shared'
11878	shared_flag_svr4='-shared $wl-G'
11879      else
11880	# not using gcc
11881	if test ia64 = "$host_cpu"; then
11882	# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
11883	# chokes on -Wl,-G. The following line is correct:
11884	  shared_flag='-G'
11885	else
11886	  if test yes = "$aix_use_runtimelinking"; then
11887	    shared_flag='$wl-G'
11888	  else
11889	    shared_flag='$wl-bM:SRE'
11890	  fi
11891	  shared_flag_aix='$wl-bM:SRE'
11892	  shared_flag_svr4='$wl-G'
11893	fi
11894      fi
11895
11896      export_dynamic_flag_spec='$wl-bexpall'
11897      # It seems that -bexpall does not export symbols beginning with
11898      # underscore (_), so it is better to generate a list of symbols to export.
11899      always_export_symbols=yes
11900      if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then
11901	# Warning - without using the other runtime loading flags (-brtl),
11902	# -berok will link without error, but may produce a broken library.
11903	allow_undefined_flag='-berok'
11904        # Determine the default libpath from the value encoded in an
11905        # empty executable.
11906        if test set = "${lt_cv_aix_libpath+set}"; then
11907  aix_libpath=$lt_cv_aix_libpath
11908else
11909  if ${lt_cv_aix_libpath_+:} false; then :
11910  $as_echo_n "(cached) " >&6
11911else
11912  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11913/* end confdefs.h.  */
11914
11915int
11916main ()
11917{
11918
11919  ;
11920  return 0;
11921}
11922_ACEOF
11923if ac_fn_c_try_link "$LINENO"; then :
11924
11925  lt_aix_libpath_sed='
11926      /Import File Strings/,/^$/ {
11927	  /^0/ {
11928	      s/^0  *\([^ ]*\) *$/\1/
11929	      p
11930	  }
11931      }'
11932  lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
11933  # Check for a 64-bit object if we didn't find anything.
11934  if test -z "$lt_cv_aix_libpath_"; then
11935    lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
11936  fi
11937fi
11938rm -f core conftest.err conftest.$ac_objext \
11939    conftest$ac_exeext conftest.$ac_ext
11940  if test -z "$lt_cv_aix_libpath_"; then
11941    lt_cv_aix_libpath_=/usr/lib:/lib
11942  fi
11943
11944fi
11945
11946  aix_libpath=$lt_cv_aix_libpath_
11947fi
11948
11949        hardcode_libdir_flag_spec='$wl-blibpath:$libdir:'"$aix_libpath"
11950        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
11951      else
11952	if test ia64 = "$host_cpu"; then
11953	  hardcode_libdir_flag_spec='$wl-R $libdir:/usr/lib:/lib'
11954	  allow_undefined_flag="-z nodefs"
11955	  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"
11956	else
11957	 # Determine the default libpath from the value encoded in an
11958	 # empty executable.
11959	 if test set = "${lt_cv_aix_libpath+set}"; then
11960  aix_libpath=$lt_cv_aix_libpath
11961else
11962  if ${lt_cv_aix_libpath_+:} false; then :
11963  $as_echo_n "(cached) " >&6
11964else
11965  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11966/* end confdefs.h.  */
11967
11968int
11969main ()
11970{
11971
11972  ;
11973  return 0;
11974}
11975_ACEOF
11976if ac_fn_c_try_link "$LINENO"; then :
11977
11978  lt_aix_libpath_sed='
11979      /Import File Strings/,/^$/ {
11980	  /^0/ {
11981	      s/^0  *\([^ ]*\) *$/\1/
11982	      p
11983	  }
11984      }'
11985  lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
11986  # Check for a 64-bit object if we didn't find anything.
11987  if test -z "$lt_cv_aix_libpath_"; then
11988    lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
11989  fi
11990fi
11991rm -f core conftest.err conftest.$ac_objext \
11992    conftest$ac_exeext conftest.$ac_ext
11993  if test -z "$lt_cv_aix_libpath_"; then
11994    lt_cv_aix_libpath_=/usr/lib:/lib
11995  fi
11996
11997fi
11998
11999  aix_libpath=$lt_cv_aix_libpath_
12000fi
12001
12002	 hardcode_libdir_flag_spec='$wl-blibpath:$libdir:'"$aix_libpath"
12003	  # Warning - without using the other run time loading flags,
12004	  # -berok will link without error, but may produce a broken library.
12005	  no_undefined_flag=' $wl-bernotok'
12006	  allow_undefined_flag=' $wl-berok'
12007	  if test yes = "$with_gnu_ld"; then
12008	    # We only use this code for GNU lds that support --whole-archive.
12009	    whole_archive_flag_spec='$wl--whole-archive$convenience $wl--no-whole-archive'
12010	  else
12011	    # Exported symbols can be pulled into shared objects from archives
12012	    whole_archive_flag_spec='$convenience'
12013	  fi
12014	  archive_cmds_need_lc=yes
12015	  archive_expsym_cmds='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d'
12016	  # -brtl affects multiple linker settings, -berok does not and is overridden later
12017	  compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([, ]\\)%-berok\\1%g"`'
12018	  if test svr4 != "$with_aix_soname"; then
12019	    # This is similar to how AIX traditionally builds its shared libraries.
12020	    archive_expsym_cmds="$archive_expsym_cmds"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname'
12021	  fi
12022	  if test aix != "$with_aix_soname"; then
12023	    archive_expsym_cmds="$archive_expsym_cmds"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp'
12024	  else
12025	    # used by -dlpreopen to get the symbols
12026	    archive_expsym_cmds="$archive_expsym_cmds"'~$MV  $output_objdir/$realname.d/$soname $output_objdir'
12027	  fi
12028	  archive_expsym_cmds="$archive_expsym_cmds"'~$RM -r $output_objdir/$realname.d'
12029	fi
12030      fi
12031      ;;
12032
12033    amigaos*)
12034      case $host_cpu in
12035      powerpc)
12036            # see comment about AmigaOS4 .so support
12037            archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
12038            archive_expsym_cmds=''
12039        ;;
12040      m68k)
12041            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)'
12042            hardcode_libdir_flag_spec='-L$libdir'
12043            hardcode_minus_L=yes
12044        ;;
12045      esac
12046      ;;
12047
12048    bsdi[45]*)
12049      export_dynamic_flag_spec=-rdynamic
12050      ;;
12051
12052    cygwin* | mingw* | pw32* | cegcc*)
12053      # When not using gcc, we currently assume that we are using
12054      # Microsoft Visual C++.
12055      # hardcode_libdir_flag_spec is actually meaningless, as there is
12056      # no search path for DLLs.
12057      case $cc_basename in
12058      cl*)
12059	# Native MSVC
12060	hardcode_libdir_flag_spec=' '
12061	allow_undefined_flag=unsupported
12062	always_export_symbols=yes
12063	file_list_spec='@'
12064	# Tell ltmain to make .lib files, not .a files.
12065	libext=lib
12066	# Tell ltmain to make .dll files, not .so files.
12067	shrext_cmds=.dll
12068	# FIXME: Setting linknames here is a bad hack.
12069	archive_cmds='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames='
12070	archive_expsym_cmds='if   test DEF = "`$SED -n     -e '\''s/^[	 ]*//'\''     -e '\''/^\(;.*\)*$/d'\''     -e '\''s/^\(EXPORTS\|LIBRARY\)\([	 ].*\)*$/DEF/p'\''     -e q     $export_symbols`" ; then
12071            cp "$export_symbols" "$output_objdir/$soname.def";
12072            echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp";
12073          else
12074            $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp;
12075          fi~
12076          $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
12077          linknames='
12078	# The linker will not automatically build a static lib if we build a DLL.
12079	# _LT_TAGVAR(old_archive_from_new_cmds, )='true'
12080	enable_shared_with_static_runtimes=yes
12081	exclude_expsyms='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
12082	export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1,DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols'
12083	# Don't use ranlib
12084	old_postinstall_cmds='chmod 644 $oldlib'
12085	postlink_cmds='lt_outputfile="@OUTPUT@"~
12086          lt_tool_outputfile="@TOOL_OUTPUT@"~
12087          case $lt_outputfile in
12088            *.exe|*.EXE) ;;
12089            *)
12090              lt_outputfile=$lt_outputfile.exe
12091              lt_tool_outputfile=$lt_tool_outputfile.exe
12092              ;;
12093          esac~
12094          if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then
12095            $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
12096            $RM "$lt_outputfile.manifest";
12097          fi'
12098	;;
12099      *)
12100	# Assume MSVC wrapper
12101	hardcode_libdir_flag_spec=' '
12102	allow_undefined_flag=unsupported
12103	# Tell ltmain to make .lib files, not .a files.
12104	libext=lib
12105	# Tell ltmain to make .dll files, not .so files.
12106	shrext_cmds=.dll
12107	# FIXME: Setting linknames here is a bad hack.
12108	archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
12109	# The linker will automatically build a .lib file if we build a DLL.
12110	old_archive_from_new_cmds='true'
12111	# FIXME: Should let the user specify the lib program.
12112	old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs'
12113	enable_shared_with_static_runtimes=yes
12114	;;
12115      esac
12116      ;;
12117
12118    darwin* | rhapsody*)
12119
12120
12121  archive_cmds_need_lc=no
12122  hardcode_direct=no
12123  hardcode_automatic=yes
12124  hardcode_shlibpath_var=unsupported
12125  if test yes = "$lt_cv_ld_force_load"; then
12126    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\"`'
12127
12128  else
12129    whole_archive_flag_spec=''
12130  fi
12131  link_all_deplibs=yes
12132  allow_undefined_flag=$_lt_dar_allow_undefined
12133  case $cc_basename in
12134     ifort*|nagfor*) _lt_dar_can_shared=yes ;;
12135     *) _lt_dar_can_shared=$GCC ;;
12136  esac
12137  if test yes = "$_lt_dar_can_shared"; then
12138    output_verbose_link_cmd=func_echo_all
12139    archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dsymutil"
12140    module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil"
12141    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"
12142    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"
12143
12144  else
12145  ld_shlibs=no
12146  fi
12147
12148      ;;
12149
12150    dgux*)
12151      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
12152      hardcode_libdir_flag_spec='-L$libdir'
12153      hardcode_shlibpath_var=no
12154      ;;
12155
12156    # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
12157    # support.  Future versions do this automatically, but an explicit c++rt0.o
12158    # does not break anything, and helps significantly (at the cost of a little
12159    # extra space).
12160    freebsd2.2*)
12161      archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
12162      hardcode_libdir_flag_spec='-R$libdir'
12163      hardcode_direct=yes
12164      hardcode_shlibpath_var=no
12165      ;;
12166
12167    # Unfortunately, older versions of FreeBSD 2 do not have this feature.
12168    freebsd2.*)
12169      archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
12170      hardcode_direct=yes
12171      hardcode_minus_L=yes
12172      hardcode_shlibpath_var=no
12173      ;;
12174
12175    # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
12176    freebsd* | dragonfly*)
12177      archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
12178      hardcode_libdir_flag_spec='-R$libdir'
12179      hardcode_direct=yes
12180      hardcode_shlibpath_var=no
12181      ;;
12182
12183    hpux9*)
12184      if test yes = "$GCC"; then
12185	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'
12186      else
12187	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'
12188      fi
12189      hardcode_libdir_flag_spec='$wl+b $wl$libdir'
12190      hardcode_libdir_separator=:
12191      hardcode_direct=yes
12192
12193      # hardcode_minus_L: Not really in the search PATH,
12194      # but as the default location of the library.
12195      hardcode_minus_L=yes
12196      export_dynamic_flag_spec='$wl-E'
12197      ;;
12198
12199    hpux10*)
12200      if test yes,no = "$GCC,$with_gnu_ld"; then
12201	archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
12202      else
12203	archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
12204      fi
12205      if test no = "$with_gnu_ld"; then
12206	hardcode_libdir_flag_spec='$wl+b $wl$libdir'
12207	hardcode_libdir_separator=:
12208	hardcode_direct=yes
12209	hardcode_direct_absolute=yes
12210	export_dynamic_flag_spec='$wl-E'
12211	# hardcode_minus_L: Not really in the search PATH,
12212	# but as the default location of the library.
12213	hardcode_minus_L=yes
12214      fi
12215      ;;
12216
12217    hpux11*)
12218      if test yes,no = "$GCC,$with_gnu_ld"; then
12219	case $host_cpu in
12220	hppa*64*)
12221	  archive_cmds='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
12222	  ;;
12223	ia64*)
12224	  archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
12225	  ;;
12226	*)
12227	  archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
12228	  ;;
12229	esac
12230      else
12231	case $host_cpu in
12232	hppa*64*)
12233	  archive_cmds='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
12234	  ;;
12235	ia64*)
12236	  archive_cmds='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
12237	  ;;
12238	*)
12239
12240	  # Older versions of the 11.00 compiler do not understand -b yet
12241	  # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does)
12242	  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC understands -b" >&5
12243$as_echo_n "checking if $CC understands -b... " >&6; }
12244if ${lt_cv_prog_compiler__b+:} false; then :
12245  $as_echo_n "(cached) " >&6
12246else
12247  lt_cv_prog_compiler__b=no
12248   save_LDFLAGS=$LDFLAGS
12249   LDFLAGS="$LDFLAGS -b"
12250   echo "$lt_simple_link_test_code" > conftest.$ac_ext
12251   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
12252     # The linker can only warn and ignore the option if not recognized
12253     # So say no if there are warnings
12254     if test -s conftest.err; then
12255       # Append any errors to the config.log.
12256       cat conftest.err 1>&5
12257       $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
12258       $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
12259       if diff conftest.exp conftest.er2 >/dev/null; then
12260         lt_cv_prog_compiler__b=yes
12261       fi
12262     else
12263       lt_cv_prog_compiler__b=yes
12264     fi
12265   fi
12266   $RM -r conftest*
12267   LDFLAGS=$save_LDFLAGS
12268
12269fi
12270{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler__b" >&5
12271$as_echo "$lt_cv_prog_compiler__b" >&6; }
12272
12273if test yes = "$lt_cv_prog_compiler__b"; then
12274    archive_cmds='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
12275else
12276    archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
12277fi
12278
12279	  ;;
12280	esac
12281      fi
12282      if test no = "$with_gnu_ld"; then
12283	hardcode_libdir_flag_spec='$wl+b $wl$libdir'
12284	hardcode_libdir_separator=:
12285
12286	case $host_cpu in
12287	hppa*64*|ia64*)
12288	  hardcode_direct=no
12289	  hardcode_shlibpath_var=no
12290	  ;;
12291	*)
12292	  hardcode_direct=yes
12293	  hardcode_direct_absolute=yes
12294	  export_dynamic_flag_spec='$wl-E'
12295
12296	  # hardcode_minus_L: Not really in the search PATH,
12297	  # but as the default location of the library.
12298	  hardcode_minus_L=yes
12299	  ;;
12300	esac
12301      fi
12302      ;;
12303
12304    irix5* | irix6* | nonstopux*)
12305      if test yes = "$GCC"; then
12306	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'
12307	# Try to use the -exported_symbol ld option, if it does not
12308	# work, assume that -exports_file does not work either and
12309	# implicitly export all symbols.
12310	# This should be the same for all languages, so no per-tag cache variable.
12311	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5
12312$as_echo_n "checking whether the $host_os linker accepts -exported_symbol... " >&6; }
12313if ${lt_cv_irix_exported_symbol+:} false; then :
12314  $as_echo_n "(cached) " >&6
12315else
12316  save_LDFLAGS=$LDFLAGS
12317	   LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null"
12318	   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12319/* end confdefs.h.  */
12320int foo (void) { return 0; }
12321_ACEOF
12322if ac_fn_c_try_link "$LINENO"; then :
12323  lt_cv_irix_exported_symbol=yes
12324else
12325  lt_cv_irix_exported_symbol=no
12326fi
12327rm -f core conftest.err conftest.$ac_objext \
12328    conftest$ac_exeext conftest.$ac_ext
12329           LDFLAGS=$save_LDFLAGS
12330fi
12331{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5
12332$as_echo "$lt_cv_irix_exported_symbol" >&6; }
12333	if test yes = "$lt_cv_irix_exported_symbol"; then
12334          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'
12335	fi
12336      else
12337	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'
12338	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'
12339      fi
12340      archive_cmds_need_lc='no'
12341      hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
12342      hardcode_libdir_separator=:
12343      inherit_rpath=yes
12344      link_all_deplibs=yes
12345      ;;
12346
12347    linux*)
12348      case $cc_basename in
12349      tcc*)
12350	# Fabrice Bellard et al's Tiny C Compiler
12351	ld_shlibs=yes
12352	archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
12353	;;
12354      esac
12355      ;;
12356
12357    netbsd*)
12358      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
12359	archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
12360      else
12361	archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
12362      fi
12363      hardcode_libdir_flag_spec='-R$libdir'
12364      hardcode_direct=yes
12365      hardcode_shlibpath_var=no
12366      ;;
12367
12368    newsos6)
12369      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
12370      hardcode_direct=yes
12371      hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
12372      hardcode_libdir_separator=:
12373      hardcode_shlibpath_var=no
12374      ;;
12375
12376    *nto* | *qnx*)
12377      ;;
12378
12379    openbsd* | bitrig*)
12380      if test -f /usr/libexec/ld.so; then
12381	hardcode_direct=yes
12382	hardcode_shlibpath_var=no
12383	hardcode_direct_absolute=yes
12384	if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
12385	  archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
12386	  archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols'
12387	  hardcode_libdir_flag_spec='$wl-rpath,$libdir'
12388	  export_dynamic_flag_spec='$wl-E'
12389	else
12390	  archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
12391	  hardcode_libdir_flag_spec='$wl-rpath,$libdir'
12392	fi
12393      else
12394	ld_shlibs=no
12395      fi
12396      ;;
12397
12398    os2*)
12399      hardcode_libdir_flag_spec='-L$libdir'
12400      hardcode_minus_L=yes
12401      allow_undefined_flag=unsupported
12402      shrext_cmds=.dll
12403      archive_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
12404	$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
12405	$ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
12406	$ECHO EXPORTS >> $output_objdir/$libname.def~
12407	emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
12408	$CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
12409	emximp -o $lib $output_objdir/$libname.def'
12410      archive_expsym_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
12411	$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
12412	$ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
12413	$ECHO EXPORTS >> $output_objdir/$libname.def~
12414	prefix_cmds="$SED"~
12415	if test EXPORTS = "`$SED 1q $export_symbols`"; then
12416	  prefix_cmds="$prefix_cmds -e 1d";
12417	fi~
12418	prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
12419	cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
12420	$CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
12421	emximp -o $lib $output_objdir/$libname.def'
12422      old_archive_From_new_cmds='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
12423      enable_shared_with_static_runtimes=yes
12424      ;;
12425
12426    osf3*)
12427      if test yes = "$GCC"; then
12428	allow_undefined_flag=' $wl-expect_unresolved $wl\*'
12429	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'
12430      else
12431	allow_undefined_flag=' -expect_unresolved \*'
12432	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'
12433      fi
12434      archive_cmds_need_lc='no'
12435      hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
12436      hardcode_libdir_separator=:
12437      ;;
12438
12439    osf4* | osf5*)	# as osf3* with the addition of -msym flag
12440      if test yes = "$GCC"; then
12441	allow_undefined_flag=' $wl-expect_unresolved $wl\*'
12442	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'
12443	hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
12444      else
12445	allow_undefined_flag=' -expect_unresolved \*'
12446	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'
12447	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~
12448          $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'
12449
12450	# Both c and cxx compiler support -rpath directly
12451	hardcode_libdir_flag_spec='-rpath $libdir'
12452      fi
12453      archive_cmds_need_lc='no'
12454      hardcode_libdir_separator=:
12455      ;;
12456
12457    solaris*)
12458      no_undefined_flag=' -z defs'
12459      if test yes = "$GCC"; then
12460	wlarc='$wl'
12461	archive_cmds='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
12462	archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
12463          $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'
12464      else
12465	case `$CC -V 2>&1` in
12466	*"Compilers 5.0"*)
12467	  wlarc=''
12468	  archive_cmds='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags'
12469	  archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
12470            $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
12471	  ;;
12472	*)
12473	  wlarc='$wl'
12474	  archive_cmds='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags'
12475	  archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
12476            $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
12477	  ;;
12478	esac
12479      fi
12480      hardcode_libdir_flag_spec='-R$libdir'
12481      hardcode_shlibpath_var=no
12482      case $host_os in
12483      solaris2.[0-5] | solaris2.[0-5].*) ;;
12484      *)
12485	# The compiler driver will combine and reorder linker options,
12486	# but understands '-z linker_flag'.  GCC discards it without '$wl',
12487	# but is careful enough not to reorder.
12488	# Supported since Solaris 2.6 (maybe 2.5.1?)
12489	if test yes = "$GCC"; then
12490	  whole_archive_flag_spec='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract'
12491	else
12492	  whole_archive_flag_spec='-z allextract$convenience -z defaultextract'
12493	fi
12494	;;
12495      esac
12496      link_all_deplibs=yes
12497      ;;
12498
12499    sunos4*)
12500      if test sequent = "$host_vendor"; then
12501	# Use $CC to link under sequent, because it throws in some extra .o
12502	# files that make .init and .fini sections work.
12503	archive_cmds='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags'
12504      else
12505	archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
12506      fi
12507      hardcode_libdir_flag_spec='-L$libdir'
12508      hardcode_direct=yes
12509      hardcode_minus_L=yes
12510      hardcode_shlibpath_var=no
12511      ;;
12512
12513    sysv4)
12514      case $host_vendor in
12515	sni)
12516	  archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
12517	  hardcode_direct=yes # is this really true???
12518	;;
12519	siemens)
12520	  ## LD is ld it makes a PLAMLIB
12521	  ## CC just makes a GrossModule.
12522	  archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
12523	  reload_cmds='$CC -r -o $output$reload_objs'
12524	  hardcode_direct=no
12525        ;;
12526	motorola)
12527	  archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
12528	  hardcode_direct=no #Motorola manual says yes, but my tests say they lie
12529	;;
12530      esac
12531      runpath_var='LD_RUN_PATH'
12532      hardcode_shlibpath_var=no
12533      ;;
12534
12535    sysv4.3*)
12536      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
12537      hardcode_shlibpath_var=no
12538      export_dynamic_flag_spec='-Bexport'
12539      ;;
12540
12541    sysv4*MP*)
12542      if test -d /usr/nec; then
12543	archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
12544	hardcode_shlibpath_var=no
12545	runpath_var=LD_RUN_PATH
12546	hardcode_runpath_var=yes
12547	ld_shlibs=yes
12548      fi
12549      ;;
12550
12551    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*)
12552      no_undefined_flag='$wl-z,text'
12553      archive_cmds_need_lc=no
12554      hardcode_shlibpath_var=no
12555      runpath_var='LD_RUN_PATH'
12556
12557      if test yes = "$GCC"; then
12558	archive_cmds='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
12559	archive_expsym_cmds='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
12560      else
12561	archive_cmds='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
12562	archive_expsym_cmds='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
12563      fi
12564      ;;
12565
12566    sysv5* | sco3.2v5* | sco5v6*)
12567      # Note: We CANNOT use -z defs as we might desire, because we do not
12568      # link with -lc, and that would cause any symbols used from libc to
12569      # always be unresolved, which means just about no library would
12570      # ever link correctly.  If we're not using GNU ld we use -z text
12571      # though, which does catch some bad symbols but isn't as heavy-handed
12572      # as -z defs.
12573      no_undefined_flag='$wl-z,text'
12574      allow_undefined_flag='$wl-z,nodefs'
12575      archive_cmds_need_lc=no
12576      hardcode_shlibpath_var=no
12577      hardcode_libdir_flag_spec='$wl-R,$libdir'
12578      hardcode_libdir_separator=':'
12579      link_all_deplibs=yes
12580      export_dynamic_flag_spec='$wl-Bexport'
12581      runpath_var='LD_RUN_PATH'
12582
12583      if test yes = "$GCC"; then
12584	archive_cmds='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
12585	archive_expsym_cmds='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
12586      else
12587	archive_cmds='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
12588	archive_expsym_cmds='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
12589      fi
12590      ;;
12591
12592    uts4*)
12593      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
12594      hardcode_libdir_flag_spec='-L$libdir'
12595      hardcode_shlibpath_var=no
12596      ;;
12597
12598    *)
12599      ld_shlibs=no
12600      ;;
12601    esac
12602
12603    if test sni = "$host_vendor"; then
12604      case $host in
12605      sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
12606	export_dynamic_flag_spec='$wl-Blargedynsym'
12607	;;
12608      esac
12609    fi
12610  fi
12611
12612{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5
12613$as_echo "$ld_shlibs" >&6; }
12614test no = "$ld_shlibs" && can_build_shared=no
12615
12616with_gnu_ld=$with_gnu_ld
12617
12618
12619
12620
12621
12622
12623
12624
12625
12626
12627
12628
12629
12630
12631
12632#
12633# Do we need to explicitly link libc?
12634#
12635case "x$archive_cmds_need_lc" in
12636x|xyes)
12637  # Assume -lc should be added
12638  archive_cmds_need_lc=yes
12639
12640  if test yes,yes = "$GCC,$enable_shared"; then
12641    case $archive_cmds in
12642    *'~'*)
12643      # FIXME: we may have to deal with multi-command sequences.
12644      ;;
12645    '$CC '*)
12646      # Test whether the compiler implicitly links with -lc since on some
12647      # systems, -lgcc has to come before -lc. If gcc already passes -lc
12648      # to ld, don't add -lc before -lgcc.
12649      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5
12650$as_echo_n "checking whether -lc should be explicitly linked in... " >&6; }
12651if ${lt_cv_archive_cmds_need_lc+:} false; then :
12652  $as_echo_n "(cached) " >&6
12653else
12654  $RM conftest*
12655	echo "$lt_simple_compile_test_code" > conftest.$ac_ext
12656
12657	if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
12658  (eval $ac_compile) 2>&5
12659  ac_status=$?
12660  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
12661  test $ac_status = 0; } 2>conftest.err; then
12662	  soname=conftest
12663	  lib=conftest
12664	  libobjs=conftest.$ac_objext
12665	  deplibs=
12666	  wl=$lt_prog_compiler_wl
12667	  pic_flag=$lt_prog_compiler_pic
12668	  compiler_flags=-v
12669	  linker_flags=-v
12670	  verstring=
12671	  output_objdir=.
12672	  libname=conftest
12673	  lt_save_allow_undefined_flag=$allow_undefined_flag
12674	  allow_undefined_flag=
12675	  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5
12676  (eval $archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5
12677  ac_status=$?
12678  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
12679  test $ac_status = 0; }
12680	  then
12681	    lt_cv_archive_cmds_need_lc=no
12682	  else
12683	    lt_cv_archive_cmds_need_lc=yes
12684	  fi
12685	  allow_undefined_flag=$lt_save_allow_undefined_flag
12686	else
12687	  cat conftest.err 1>&5
12688	fi
12689	$RM conftest*
12690
12691fi
12692{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc" >&5
12693$as_echo "$lt_cv_archive_cmds_need_lc" >&6; }
12694      archive_cmds_need_lc=$lt_cv_archive_cmds_need_lc
12695      ;;
12696    esac
12697  fi
12698  ;;
12699esac
12700
12701
12702
12703
12704
12705
12706
12707
12708
12709
12710
12711
12712
12713
12714
12715
12716
12717
12718
12719
12720
12721
12722
12723
12724
12725
12726
12727
12728
12729
12730
12731
12732
12733
12734
12735
12736
12737
12738
12739
12740
12741
12742
12743
12744
12745
12746
12747
12748
12749
12750
12751
12752
12753
12754
12755
12756
12757
12758
12759
12760
12761
12762
12763
12764
12765
12766
12767
12768
12769
12770
12771
12772
12773
12774
12775
12776
12777
12778
12779
12780
12781
12782
12783
12784
12785
12786
12787
12788
12789
12790
12791
12792
12793
12794
12795
12796
12797
12798
12799
12800
12801
12802
12803
12804
12805
12806
12807
12808
12809
12810
12811
12812
12813
12814
12815
12816
12817
12818
12819
12820
12821
12822
12823
12824
12825
12826
12827
12828
12829
12830
12831
12832
12833
12834
12835
12836
12837
12838
12839
12840
12841
12842
12843
12844
12845
12846
12847
12848
12849
12850
12851
12852  { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5
12853$as_echo_n "checking dynamic linker characteristics... " >&6; }
12854
12855if test yes = "$GCC"; then
12856  case $host_os in
12857    darwin*) lt_awk_arg='/^libraries:/,/LR/' ;;
12858    *) lt_awk_arg='/^libraries:/' ;;
12859  esac
12860  case $host_os in
12861    mingw* | cegcc*) lt_sed_strip_eq='s|=\([A-Za-z]:\)|\1|g' ;;
12862    *) lt_sed_strip_eq='s|=/|/|g' ;;
12863  esac
12864  lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq`
12865  case $lt_search_path_spec in
12866  *\;*)
12867    # if the path contains ";" then we assume it to be the separator
12868    # otherwise default to the standard path separator (i.e. ":") - it is
12869    # assumed that no part of a normal pathname contains ";" but that should
12870    # okay in the real world where ";" in dirpaths is itself problematic.
12871    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'`
12872    ;;
12873  *)
12874    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"`
12875    ;;
12876  esac
12877  # Ok, now we have the path, separated by spaces, we can step through it
12878  # and add multilib dir if necessary...
12879  lt_tmp_lt_search_path_spec=
12880  lt_multi_os_dir=/`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
12881  # ...but if some path component already ends with the multilib dir we assume
12882  # that all is fine and trust -print-search-dirs as is (GCC 4.2? or newer).
12883  case "$lt_multi_os_dir; $lt_search_path_spec " in
12884  "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*)
12885    lt_multi_os_dir=
12886    ;;
12887  esac
12888  for lt_sys_path in $lt_search_path_spec; do
12889    if test -d "$lt_sys_path$lt_multi_os_dir"; then
12890      lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path$lt_multi_os_dir"
12891    elif test -n "$lt_multi_os_dir"; then
12892      test -d "$lt_sys_path" && \
12893	lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
12894    fi
12895  done
12896  lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk '
12897BEGIN {RS = " "; FS = "/|\n";} {
12898  lt_foo = "";
12899  lt_count = 0;
12900  for (lt_i = NF; lt_i > 0; lt_i--) {
12901    if ($lt_i != "" && $lt_i != ".") {
12902      if ($lt_i == "..") {
12903        lt_count++;
12904      } else {
12905        if (lt_count == 0) {
12906          lt_foo = "/" $lt_i lt_foo;
12907        } else {
12908          lt_count--;
12909        }
12910      }
12911    }
12912  }
12913  if (lt_foo != "") { lt_freq[lt_foo]++; }
12914  if (lt_freq[lt_foo] == 1) { print lt_foo; }
12915}'`
12916  # AWK program above erroneously prepends '/' to C:/dos/paths
12917  # for these hosts.
12918  case $host_os in
12919    mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\
12920      $SED 's|/\([A-Za-z]:\)|\1|g'` ;;
12921  esac
12922  sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP`
12923else
12924  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
12925fi
12926library_names_spec=
12927libname_spec='lib$name'
12928soname_spec=
12929shrext_cmds=.so
12930postinstall_cmds=
12931postuninstall_cmds=
12932finish_cmds=
12933finish_eval=
12934shlibpath_var=
12935shlibpath_overrides_runpath=unknown
12936version_type=none
12937dynamic_linker="$host_os ld.so"
12938sys_lib_dlsearch_path_spec="/lib /usr/lib"
12939need_lib_prefix=unknown
12940hardcode_into_libs=no
12941
12942# when you set need_version to no, make sure it does not cause -set_version
12943# flags to be left without arguments
12944need_version=unknown
12945
12946
12947
12948case $host_os in
12949aix3*)
12950  version_type=linux # correct to gnu/linux during the next big refactor
12951  library_names_spec='$libname$release$shared_ext$versuffix $libname.a'
12952  shlibpath_var=LIBPATH
12953
12954  # AIX 3 has no versioning support, so we append a major version to the name.
12955  soname_spec='$libname$release$shared_ext$major'
12956  ;;
12957
12958aix[4-9]*)
12959  version_type=linux # correct to gnu/linux during the next big refactor
12960  need_lib_prefix=no
12961  need_version=no
12962  hardcode_into_libs=yes
12963  if test ia64 = "$host_cpu"; then
12964    # AIX 5 supports IA64
12965    library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext'
12966    shlibpath_var=LD_LIBRARY_PATH
12967  else
12968    # With GCC up to 2.95.x, collect2 would create an import file
12969    # for dependence libraries.  The import file would start with
12970    # the line '#! .'.  This would cause the generated library to
12971    # depend on '.', always an invalid library.  This was fixed in
12972    # development snapshots of GCC prior to 3.0.
12973    case $host_os in
12974      aix4 | aix4.[01] | aix4.[01].*)
12975      if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
12976	   echo ' yes '
12977	   echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then
12978	:
12979      else
12980	can_build_shared=no
12981      fi
12982      ;;
12983    esac
12984    # Using Import Files as archive members, it is possible to support
12985    # filename-based versioning of shared library archives on AIX. While
12986    # this would work for both with and without runtime linking, it will
12987    # prevent static linking of such archives. So we do filename-based
12988    # shared library versioning with .so extension only, which is used
12989    # when both runtime linking and shared linking is enabled.
12990    # Unfortunately, runtime linking may impact performance, so we do
12991    # not want this to be the default eventually. Also, we use the
12992    # versioned .so libs for executables only if there is the -brtl
12993    # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only.
12994    # To allow for filename-based versioning support, we need to create
12995    # libNAME.so.V as an archive file, containing:
12996    # *) an Import File, referring to the versioned filename of the
12997    #    archive as well as the shared archive member, telling the
12998    #    bitwidth (32 or 64) of that shared object, and providing the
12999    #    list of exported symbols of that shared object, eventually
13000    #    decorated with the 'weak' keyword
13001    # *) the shared object with the F_LOADONLY flag set, to really avoid
13002    #    it being seen by the linker.
13003    # At run time we better use the real file rather than another symlink,
13004    # but for link time we create the symlink libNAME.so -> libNAME.so.V
13005
13006    case $with_aix_soname,$aix_use_runtimelinking in
13007    # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct
13008    # soname into executable. Probably we can add versioning support to
13009    # collect2, so additional links can be useful in future.
13010    aix,yes) # traditional libtool
13011      dynamic_linker='AIX unversionable lib.so'
13012      # If using run time linking (on AIX 4.2 or later) use lib<name>.so
13013      # instead of lib<name>.a to let people know that these are not
13014      # typical AIX shared libraries.
13015      library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13016      ;;
13017    aix,no) # traditional AIX only
13018      dynamic_linker='AIX lib.a(lib.so.V)'
13019      # We preserve .a as extension for shared libraries through AIX4.2
13020      # and later when we are not doing run time linking.
13021      library_names_spec='$libname$release.a $libname.a'
13022      soname_spec='$libname$release$shared_ext$major'
13023      ;;
13024    svr4,*) # full svr4 only
13025      dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o)"
13026      library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
13027      # We do not specify a path in Import Files, so LIBPATH fires.
13028      shlibpath_overrides_runpath=yes
13029      ;;
13030    *,yes) # both, prefer svr4
13031      dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o), lib.a(lib.so.V)"
13032      library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
13033      # unpreferred sharedlib libNAME.a needs extra handling
13034      postinstall_cmds='test -n "$linkname" || linkname="$realname"~func_stripname "" ".so" "$linkname"~$install_shared_prog "$dir/$func_stripname_result.$libext" "$destdir/$func_stripname_result.$libext"~test -z "$tstripme" || test -z "$striplib" || $striplib "$destdir/$func_stripname_result.$libext"'
13035      postuninstall_cmds='for n in $library_names $old_library; do :; done~func_stripname "" ".so" "$n"~test "$func_stripname_result" = "$n" || func_append rmfiles " $odir/$func_stripname_result.$libext"'
13036      # We do not specify a path in Import Files, so LIBPATH fires.
13037      shlibpath_overrides_runpath=yes
13038      ;;
13039    *,no) # both, prefer aix
13040      dynamic_linker="AIX lib.a(lib.so.V), lib.so.V($shared_archive_member_spec.o)"
13041      library_names_spec='$libname$release.a $libname.a'
13042      soname_spec='$libname$release$shared_ext$major'
13043      # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling
13044      postinstall_cmds='test -z "$dlname" || $install_shared_prog $dir/$dlname $destdir/$dlname~test -z "$tstripme" || test -z "$striplib" || $striplib $destdir/$dlname~test -n "$linkname" || linkname=$realname~func_stripname "" ".a" "$linkname"~(cd "$destdir" && $LN_S -f $dlname $func_stripname_result.so)'
13045      postuninstall_cmds='test -z "$dlname" || func_append rmfiles " $odir/$dlname"~for n in $old_library $library_names; do :; done~func_stripname "" ".a" "$n"~func_append rmfiles " $odir/$func_stripname_result.so"'
13046      ;;
13047    esac
13048    shlibpath_var=LIBPATH
13049  fi
13050  ;;
13051
13052amigaos*)
13053  case $host_cpu in
13054  powerpc)
13055    # Since July 2007 AmigaOS4 officially supports .so libraries.
13056    # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
13057    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13058    ;;
13059  m68k)
13060    library_names_spec='$libname.ixlibrary $libname.a'
13061    # Create ${libname}_ixlibrary.a entries in /sys/libs.
13062    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'
13063    ;;
13064  esac
13065  ;;
13066
13067beos*)
13068  library_names_spec='$libname$shared_ext'
13069  dynamic_linker="$host_os ld.so"
13070  shlibpath_var=LIBRARY_PATH
13071  ;;
13072
13073bsdi[45]*)
13074  version_type=linux # correct to gnu/linux during the next big refactor
13075  need_version=no
13076  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13077  soname_spec='$libname$release$shared_ext$major'
13078  finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
13079  shlibpath_var=LD_LIBRARY_PATH
13080  sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
13081  sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
13082  # the default ld.so.conf also contains /usr/contrib/lib and
13083  # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
13084  # libtool to hard-code these into programs
13085  ;;
13086
13087cygwin* | mingw* | pw32* | cegcc*)
13088  version_type=windows
13089  shrext_cmds=.dll
13090  need_version=no
13091  need_lib_prefix=no
13092
13093  case $GCC,$cc_basename in
13094  yes,*)
13095    # gcc
13096    library_names_spec='$libname.dll.a'
13097    # DLL is installed to $(libdir)/../bin by postinstall_cmds
13098    postinstall_cmds='base_file=`basename \$file`~
13099      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
13100      dldir=$destdir/`dirname \$dlpath`~
13101      test -d \$dldir || mkdir -p \$dldir~
13102      $install_prog $dir/$dlname \$dldir/$dlname~
13103      chmod a+x \$dldir/$dlname~
13104      if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
13105        eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
13106      fi'
13107    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
13108      dlpath=$dir/\$dldll~
13109       $RM \$dlpath'
13110    shlibpath_overrides_runpath=yes
13111
13112    case $host_os in
13113    cygwin*)
13114      # Cygwin DLLs use 'cyg' prefix rather than 'lib'
13115      soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
13116
13117      sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"
13118      ;;
13119    mingw* | cegcc*)
13120      # MinGW DLLs use traditional 'lib' prefix
13121      soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
13122      ;;
13123    pw32*)
13124      # pw32 DLLs use 'pw' prefix rather than 'lib'
13125      library_names_spec='`echo $libname | sed -e 's/^lib/pw/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
13126      ;;
13127    esac
13128    dynamic_linker='Win32 ld.exe'
13129    ;;
13130
13131  *,cl*)
13132    # Native MSVC
13133    libname_spec='$name'
13134    soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
13135    library_names_spec='$libname.dll.lib'
13136
13137    case $build_os in
13138    mingw*)
13139      sys_lib_search_path_spec=
13140      lt_save_ifs=$IFS
13141      IFS=';'
13142      for lt_path in $LIB
13143      do
13144        IFS=$lt_save_ifs
13145        # Let DOS variable expansion print the short 8.3 style file name.
13146        lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"`
13147        sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path"
13148      done
13149      IFS=$lt_save_ifs
13150      # Convert to MSYS style.
13151      sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'`
13152      ;;
13153    cygwin*)
13154      # Convert to unix form, then to dos form, then back to unix form
13155      # but this time dos style (no spaces!) so that the unix form looks
13156      # like /cygdrive/c/PROGRA~1:/cygdr...
13157      sys_lib_search_path_spec=`cygpath --path --unix "$LIB"`
13158      sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null`
13159      sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
13160      ;;
13161    *)
13162      sys_lib_search_path_spec=$LIB
13163      if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then
13164        # It is most probably a Windows format PATH.
13165        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
13166      else
13167        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
13168      fi
13169      # FIXME: find the short name or the path components, as spaces are
13170      # common. (e.g. "Program Files" -> "PROGRA~1")
13171      ;;
13172    esac
13173
13174    # DLL is installed to $(libdir)/../bin by postinstall_cmds
13175    postinstall_cmds='base_file=`basename \$file`~
13176      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
13177      dldir=$destdir/`dirname \$dlpath`~
13178      test -d \$dldir || mkdir -p \$dldir~
13179      $install_prog $dir/$dlname \$dldir/$dlname'
13180    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
13181      dlpath=$dir/\$dldll~
13182       $RM \$dlpath'
13183    shlibpath_overrides_runpath=yes
13184    dynamic_linker='Win32 link.exe'
13185    ;;
13186
13187  *)
13188    # Assume MSVC wrapper
13189    library_names_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext $libname.lib'
13190    dynamic_linker='Win32 ld.exe'
13191    ;;
13192  esac
13193  # FIXME: first we should search . and the directory the executable is in
13194  shlibpath_var=PATH
13195  ;;
13196
13197darwin* | rhapsody*)
13198  dynamic_linker="$host_os dyld"
13199  version_type=darwin
13200  need_lib_prefix=no
13201  need_version=no
13202  library_names_spec='$libname$release$major$shared_ext $libname$shared_ext'
13203  soname_spec='$libname$release$major$shared_ext'
13204  shlibpath_overrides_runpath=yes
13205  shlibpath_var=DYLD_LIBRARY_PATH
13206  shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
13207
13208  sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"
13209  sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
13210  ;;
13211
13212dgux*)
13213  version_type=linux # correct to gnu/linux during the next big refactor
13214  need_lib_prefix=no
13215  need_version=no
13216  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13217  soname_spec='$libname$release$shared_ext$major'
13218  shlibpath_var=LD_LIBRARY_PATH
13219  ;;
13220
13221freebsd* | dragonfly*)
13222  # DragonFly does not have aout.  When/if they implement a new
13223  # versioning mechanism, adjust this.
13224  if test -x /usr/bin/objformat; then
13225    objformat=`/usr/bin/objformat`
13226  else
13227    case $host_os in
13228    freebsd[23].*) objformat=aout ;;
13229    *) objformat=elf ;;
13230    esac
13231  fi
13232  version_type=freebsd-$objformat
13233  case $version_type in
13234    freebsd-elf*)
13235      library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13236      soname_spec='$libname$release$shared_ext$major'
13237      need_version=no
13238      need_lib_prefix=no
13239      ;;
13240    freebsd-*)
13241      library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
13242      need_version=yes
13243      ;;
13244  esac
13245  shlibpath_var=LD_LIBRARY_PATH
13246  case $host_os in
13247  freebsd2.*)
13248    shlibpath_overrides_runpath=yes
13249    ;;
13250  freebsd3.[01]* | freebsdelf3.[01]*)
13251    shlibpath_overrides_runpath=yes
13252    hardcode_into_libs=yes
13253    ;;
13254  freebsd3.[2-9]* | freebsdelf3.[2-9]* | \
13255  freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1)
13256    shlibpath_overrides_runpath=no
13257    hardcode_into_libs=yes
13258    ;;
13259  *) # from 4.6 on, and DragonFly
13260    shlibpath_overrides_runpath=yes
13261    hardcode_into_libs=yes
13262    ;;
13263  esac
13264  ;;
13265
13266haiku*)
13267  version_type=linux # correct to gnu/linux during the next big refactor
13268  need_lib_prefix=no
13269  need_version=no
13270  dynamic_linker="$host_os runtime_loader"
13271  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13272  soname_spec='$libname$release$shared_ext$major'
13273  shlibpath_var=LIBRARY_PATH
13274  shlibpath_overrides_runpath=no
13275  sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
13276  hardcode_into_libs=yes
13277  ;;
13278
13279hpux9* | hpux10* | hpux11*)
13280  # Give a soname corresponding to the major version so that dld.sl refuses to
13281  # link against other versions.
13282  version_type=sunos
13283  need_lib_prefix=no
13284  need_version=no
13285  case $host_cpu in
13286  ia64*)
13287    shrext_cmds='.so'
13288    hardcode_into_libs=yes
13289    dynamic_linker="$host_os dld.so"
13290    shlibpath_var=LD_LIBRARY_PATH
13291    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
13292    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13293    soname_spec='$libname$release$shared_ext$major'
13294    if test 32 = "$HPUX_IA64_MODE"; then
13295      sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
13296      sys_lib_dlsearch_path_spec=/usr/lib/hpux32
13297    else
13298      sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
13299      sys_lib_dlsearch_path_spec=/usr/lib/hpux64
13300    fi
13301    ;;
13302  hppa*64*)
13303    shrext_cmds='.sl'
13304    hardcode_into_libs=yes
13305    dynamic_linker="$host_os dld.sl"
13306    shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
13307    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
13308    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13309    soname_spec='$libname$release$shared_ext$major'
13310    sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
13311    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
13312    ;;
13313  *)
13314    shrext_cmds='.sl'
13315    dynamic_linker="$host_os dld.sl"
13316    shlibpath_var=SHLIB_PATH
13317    shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
13318    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13319    soname_spec='$libname$release$shared_ext$major'
13320    ;;
13321  esac
13322  # HP-UX runs *really* slowly unless shared libraries are mode 555, ...
13323  postinstall_cmds='chmod 555 $lib'
13324  # or fails outright, so override atomically:
13325  install_override_mode=555
13326  ;;
13327
13328interix[3-9]*)
13329  version_type=linux # correct to gnu/linux during the next big refactor
13330  need_lib_prefix=no
13331  need_version=no
13332  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13333  soname_spec='$libname$release$shared_ext$major'
13334  dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
13335  shlibpath_var=LD_LIBRARY_PATH
13336  shlibpath_overrides_runpath=no
13337  hardcode_into_libs=yes
13338  ;;
13339
13340irix5* | irix6* | nonstopux*)
13341  case $host_os in
13342    nonstopux*) version_type=nonstopux ;;
13343    *)
13344	if test yes = "$lt_cv_prog_gnu_ld"; then
13345		version_type=linux # correct to gnu/linux during the next big refactor
13346	else
13347		version_type=irix
13348	fi ;;
13349  esac
13350  need_lib_prefix=no
13351  need_version=no
13352  soname_spec='$libname$release$shared_ext$major'
13353  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext'
13354  case $host_os in
13355  irix5* | nonstopux*)
13356    libsuff= shlibsuff=
13357    ;;
13358  *)
13359    case $LD in # libtool.m4 will add one of these switches to LD
13360    *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
13361      libsuff= shlibsuff= libmagic=32-bit;;
13362    *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
13363      libsuff=32 shlibsuff=N32 libmagic=N32;;
13364    *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
13365      libsuff=64 shlibsuff=64 libmagic=64-bit;;
13366    *) libsuff= shlibsuff= libmagic=never-match;;
13367    esac
13368    ;;
13369  esac
13370  shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
13371  shlibpath_overrides_runpath=no
13372  sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff"
13373  sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff"
13374  hardcode_into_libs=yes
13375  ;;
13376
13377# No shared lib support for Linux oldld, aout, or coff.
13378linux*oldld* | linux*aout* | linux*coff*)
13379  dynamic_linker=no
13380  ;;
13381
13382linux*android*)
13383  version_type=none # Android doesn't support versioned libraries.
13384  need_lib_prefix=no
13385  need_version=no
13386  library_names_spec='$libname$release$shared_ext'
13387  soname_spec='$libname$release$shared_ext'
13388  finish_cmds=
13389  shlibpath_var=LD_LIBRARY_PATH
13390  shlibpath_overrides_runpath=yes
13391
13392  # This implies no fast_install, which is unacceptable.
13393  # Some rework will be needed to allow for fast_install
13394  # before this can be enabled.
13395  hardcode_into_libs=yes
13396
13397  dynamic_linker='Android linker'
13398  # Don't embed -rpath directories since the linker doesn't support them.
13399  hardcode_libdir_flag_spec='-L$libdir'
13400  ;;
13401
13402# This must be glibc/ELF.
13403linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
13404  version_type=linux # correct to gnu/linux during the next big refactor
13405  need_lib_prefix=no
13406  need_version=no
13407  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13408  soname_spec='$libname$release$shared_ext$major'
13409  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
13410  shlibpath_var=LD_LIBRARY_PATH
13411  shlibpath_overrides_runpath=no
13412
13413  # Some binutils ld are patched to set DT_RUNPATH
13414  if ${lt_cv_shlibpath_overrides_runpath+:} false; then :
13415  $as_echo_n "(cached) " >&6
13416else
13417  lt_cv_shlibpath_overrides_runpath=no
13418    save_LDFLAGS=$LDFLAGS
13419    save_libdir=$libdir
13420    eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \
13421	 LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\""
13422    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13423/* end confdefs.h.  */
13424
13425int
13426main ()
13427{
13428
13429  ;
13430  return 0;
13431}
13432_ACEOF
13433if ac_fn_c_try_link "$LINENO"; then :
13434  if  ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then :
13435  lt_cv_shlibpath_overrides_runpath=yes
13436fi
13437fi
13438rm -f core conftest.err conftest.$ac_objext \
13439    conftest$ac_exeext conftest.$ac_ext
13440    LDFLAGS=$save_LDFLAGS
13441    libdir=$save_libdir
13442
13443fi
13444
13445  shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
13446
13447  # This implies no fast_install, which is unacceptable.
13448  # Some rework will be needed to allow for fast_install
13449  # before this can be enabled.
13450  hardcode_into_libs=yes
13451
13452  # Add ABI-specific directories to the system library path.
13453  sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib"
13454
13455  # Ideally, we could use ldconfig to report *all* directores which are
13456  # searched for libraries, however this is still not possible.  Aside from not
13457  # being certain /sbin/ldconfig is available, command
13458  # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64,
13459  # even though it is searched at run-time.  Try to do the best guess by
13460  # appending ld.so.conf contents (and includes) to the search path.
13461  if test -f /etc/ld.so.conf; then
13462    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' ' '`
13463    sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra"
13464  fi
13465
13466  # We used to test for /lib/ld.so.1 and disable shared libraries on
13467  # powerpc, because MkLinux only supported shared libraries with the
13468  # GNU dynamic linker.  Since this was broken with cross compilers,
13469  # most powerpc-linux boxes support dynamic linking these days and
13470  # people can always --disable-shared, the test was removed, and we
13471  # assume the GNU/Linux dynamic linker is in use.
13472  dynamic_linker='GNU/Linux ld.so'
13473  ;;
13474
13475netbsd*)
13476  version_type=sunos
13477  need_lib_prefix=no
13478  need_version=no
13479  if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
13480    library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
13481    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
13482    dynamic_linker='NetBSD (a.out) ld.so'
13483  else
13484    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13485    soname_spec='$libname$release$shared_ext$major'
13486    dynamic_linker='NetBSD ld.elf_so'
13487  fi
13488  shlibpath_var=LD_LIBRARY_PATH
13489  shlibpath_overrides_runpath=yes
13490  hardcode_into_libs=yes
13491  ;;
13492
13493newsos6)
13494  version_type=linux # correct to gnu/linux during the next big refactor
13495  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13496  shlibpath_var=LD_LIBRARY_PATH
13497  shlibpath_overrides_runpath=yes
13498  ;;
13499
13500*nto* | *qnx*)
13501  version_type=qnx
13502  need_lib_prefix=no
13503  need_version=no
13504  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13505  soname_spec='$libname$release$shared_ext$major'
13506  shlibpath_var=LD_LIBRARY_PATH
13507  shlibpath_overrides_runpath=no
13508  hardcode_into_libs=yes
13509  dynamic_linker='ldqnx.so'
13510  ;;
13511
13512openbsd* | bitrig*)
13513  version_type=sunos
13514  sys_lib_dlsearch_path_spec=/usr/lib
13515  need_lib_prefix=no
13516  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
13517    need_version=no
13518  else
13519    need_version=yes
13520  fi
13521  library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
13522  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
13523  shlibpath_var=LD_LIBRARY_PATH
13524  shlibpath_overrides_runpath=yes
13525  ;;
13526
13527os2*)
13528  libname_spec='$name'
13529  version_type=windows
13530  shrext_cmds=.dll
13531  need_version=no
13532  need_lib_prefix=no
13533  # OS/2 can only load a DLL with a base name of 8 characters or less.
13534  soname_spec='`test -n "$os2dllname" && libname="$os2dllname";
13535    v=$($ECHO $release$versuffix | tr -d .-);
13536    n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _);
13537    $ECHO $n$v`$shared_ext'
13538  library_names_spec='${libname}_dll.$libext'
13539  dynamic_linker='OS/2 ld.exe'
13540  shlibpath_var=BEGINLIBPATH
13541  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
13542  sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
13543  postinstall_cmds='base_file=`basename \$file`~
13544    dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~
13545    dldir=$destdir/`dirname \$dlpath`~
13546    test -d \$dldir || mkdir -p \$dldir~
13547    $install_prog $dir/$dlname \$dldir/$dlname~
13548    chmod a+x \$dldir/$dlname~
13549    if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
13550      eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
13551    fi'
13552  postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~
13553    dlpath=$dir/\$dldll~
13554    $RM \$dlpath'
13555  ;;
13556
13557osf3* | osf4* | osf5*)
13558  version_type=osf
13559  need_lib_prefix=no
13560  need_version=no
13561  soname_spec='$libname$release$shared_ext$major'
13562  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13563  shlibpath_var=LD_LIBRARY_PATH
13564  sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
13565  sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
13566  ;;
13567
13568rdos*)
13569  dynamic_linker=no
13570  ;;
13571
13572solaris*)
13573  version_type=linux # correct to gnu/linux during the next big refactor
13574  need_lib_prefix=no
13575  need_version=no
13576  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13577  soname_spec='$libname$release$shared_ext$major'
13578  shlibpath_var=LD_LIBRARY_PATH
13579  shlibpath_overrides_runpath=yes
13580  hardcode_into_libs=yes
13581  # ldd complains unless libraries are executable
13582  postinstall_cmds='chmod +x $lib'
13583  ;;
13584
13585sunos4*)
13586  version_type=sunos
13587  library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
13588  finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
13589  shlibpath_var=LD_LIBRARY_PATH
13590  shlibpath_overrides_runpath=yes
13591  if test yes = "$with_gnu_ld"; then
13592    need_lib_prefix=no
13593  fi
13594  need_version=yes
13595  ;;
13596
13597sysv4 | sysv4.3*)
13598  version_type=linux # correct to gnu/linux during the next big refactor
13599  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13600  soname_spec='$libname$release$shared_ext$major'
13601  shlibpath_var=LD_LIBRARY_PATH
13602  case $host_vendor in
13603    sni)
13604      shlibpath_overrides_runpath=no
13605      need_lib_prefix=no
13606      runpath_var=LD_RUN_PATH
13607      ;;
13608    siemens)
13609      need_lib_prefix=no
13610      ;;
13611    motorola)
13612      need_lib_prefix=no
13613      need_version=no
13614      shlibpath_overrides_runpath=no
13615      sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
13616      ;;
13617  esac
13618  ;;
13619
13620sysv4*MP*)
13621  if test -d /usr/nec; then
13622    version_type=linux # correct to gnu/linux during the next big refactor
13623    library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext'
13624    soname_spec='$libname$shared_ext.$major'
13625    shlibpath_var=LD_LIBRARY_PATH
13626  fi
13627  ;;
13628
13629sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
13630  version_type=sco
13631  need_lib_prefix=no
13632  need_version=no
13633  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext'
13634  soname_spec='$libname$release$shared_ext$major'
13635  shlibpath_var=LD_LIBRARY_PATH
13636  shlibpath_overrides_runpath=yes
13637  hardcode_into_libs=yes
13638  if test yes = "$with_gnu_ld"; then
13639    sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
13640  else
13641    sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
13642    case $host_os in
13643      sco3.2v5*)
13644        sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
13645	;;
13646    esac
13647  fi
13648  sys_lib_dlsearch_path_spec='/usr/lib'
13649  ;;
13650
13651tpf*)
13652  # TPF is a cross-target only.  Preferred cross-host = GNU/Linux.
13653  version_type=linux # correct to gnu/linux during the next big refactor
13654  need_lib_prefix=no
13655  need_version=no
13656  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13657  shlibpath_var=LD_LIBRARY_PATH
13658  shlibpath_overrides_runpath=no
13659  hardcode_into_libs=yes
13660  ;;
13661
13662uts4*)
13663  version_type=linux # correct to gnu/linux during the next big refactor
13664  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13665  soname_spec='$libname$release$shared_ext$major'
13666  shlibpath_var=LD_LIBRARY_PATH
13667  ;;
13668
13669*)
13670  dynamic_linker=no
13671  ;;
13672esac
13673{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5
13674$as_echo "$dynamic_linker" >&6; }
13675test no = "$dynamic_linker" && can_build_shared=no
13676
13677variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
13678if test yes = "$GCC"; then
13679  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
13680fi
13681
13682if test set = "${lt_cv_sys_lib_search_path_spec+set}"; then
13683  sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec
13684fi
13685
13686if test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then
13687  sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec
13688fi
13689
13690# remember unaugmented sys_lib_dlsearch_path content for libtool script decls...
13691configure_time_dlsearch_path=$sys_lib_dlsearch_path_spec
13692
13693# ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code
13694func_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH"
13695
13696# to be used as default LT_SYS_LIBRARY_PATH value in generated libtool
13697configure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH
13698
13699
13700
13701
13702
13703
13704
13705
13706
13707
13708
13709
13710
13711
13712
13713
13714
13715
13716
13717
13718
13719
13720
13721
13722
13723
13724
13725
13726
13727
13728
13729
13730
13731
13732
13733
13734
13735
13736
13737
13738
13739
13740
13741
13742
13743
13744
13745
13746
13747
13748
13749
13750
13751
13752
13753
13754
13755
13756
13757
13758
13759
13760
13761
13762
13763
13764
13765
13766
13767
13768
13769
13770
13771
13772
13773
13774
13775
13776
13777
13778
13779
13780
13781
13782
13783
13784
13785
13786
13787
13788
13789
13790
13791
13792
13793
13794
13795  { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5
13796$as_echo_n "checking how to hardcode library paths into programs... " >&6; }
13797hardcode_action=
13798if test -n "$hardcode_libdir_flag_spec" ||
13799   test -n "$runpath_var" ||
13800   test yes = "$hardcode_automatic"; then
13801
13802  # We can hardcode non-existent directories.
13803  if test no != "$hardcode_direct" &&
13804     # If the only mechanism to avoid hardcoding is shlibpath_var, we
13805     # have to relink, otherwise we might link with an installed library
13806     # when we should be linking with a yet-to-be-installed one
13807     ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, )" &&
13808     test no != "$hardcode_minus_L"; then
13809    # Linking always hardcodes the temporary library directory.
13810    hardcode_action=relink
13811  else
13812    # We can link without hardcoding, and we can hardcode nonexisting dirs.
13813    hardcode_action=immediate
13814  fi
13815else
13816  # We cannot hardcode anything, or else we can only hardcode existing
13817  # directories.
13818  hardcode_action=unsupported
13819fi
13820{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5
13821$as_echo "$hardcode_action" >&6; }
13822
13823if test relink = "$hardcode_action" ||
13824   test yes = "$inherit_rpath"; then
13825  # Fast installation is not supported
13826  enable_fast_install=no
13827elif test yes = "$shlibpath_overrides_runpath" ||
13828     test no = "$enable_shared"; then
13829  # Fast installation is not necessary
13830  enable_fast_install=needless
13831fi
13832
13833
13834
13835
13836
13837
13838  if test yes != "$enable_dlopen"; then
13839  enable_dlopen=unknown
13840  enable_dlopen_self=unknown
13841  enable_dlopen_self_static=unknown
13842else
13843  lt_cv_dlopen=no
13844  lt_cv_dlopen_libs=
13845
13846  case $host_os in
13847  beos*)
13848    lt_cv_dlopen=load_add_on
13849    lt_cv_dlopen_libs=
13850    lt_cv_dlopen_self=yes
13851    ;;
13852
13853  mingw* | pw32* | cegcc*)
13854    lt_cv_dlopen=LoadLibrary
13855    lt_cv_dlopen_libs=
13856    ;;
13857
13858  cygwin*)
13859    lt_cv_dlopen=dlopen
13860    lt_cv_dlopen_libs=
13861    ;;
13862
13863  darwin*)
13864    # if libdl is installed we need to link against it
13865    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
13866$as_echo_n "checking for dlopen in -ldl... " >&6; }
13867if ${ac_cv_lib_dl_dlopen+:} false; then :
13868  $as_echo_n "(cached) " >&6
13869else
13870  ac_check_lib_save_LIBS=$LIBS
13871LIBS="-ldl  $LIBS"
13872cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13873/* end confdefs.h.  */
13874
13875/* Override any GCC internal prototype to avoid an error.
13876   Use char because int might match the return type of a GCC
13877   builtin and then its argument prototype would still apply.  */
13878#ifdef __cplusplus
13879extern "C"
13880#endif
13881char dlopen ();
13882int
13883main ()
13884{
13885return dlopen ();
13886  ;
13887  return 0;
13888}
13889_ACEOF
13890if ac_fn_c_try_link "$LINENO"; then :
13891  ac_cv_lib_dl_dlopen=yes
13892else
13893  ac_cv_lib_dl_dlopen=no
13894fi
13895rm -f core conftest.err conftest.$ac_objext \
13896    conftest$ac_exeext conftest.$ac_ext
13897LIBS=$ac_check_lib_save_LIBS
13898fi
13899{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
13900$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
13901if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
13902  lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl
13903else
13904
13905    lt_cv_dlopen=dyld
13906    lt_cv_dlopen_libs=
13907    lt_cv_dlopen_self=yes
13908
13909fi
13910
13911    ;;
13912
13913  tpf*)
13914    # Don't try to run any link tests for TPF.  We know it's impossible
13915    # because TPF is a cross-compiler, and we know how we open DSOs.
13916    lt_cv_dlopen=dlopen
13917    lt_cv_dlopen_libs=
13918    lt_cv_dlopen_self=no
13919    ;;
13920
13921  *)
13922    ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load"
13923if test "x$ac_cv_func_shl_load" = xyes; then :
13924  lt_cv_dlopen=shl_load
13925else
13926  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
13927$as_echo_n "checking for shl_load in -ldld... " >&6; }
13928if ${ac_cv_lib_dld_shl_load+:} false; then :
13929  $as_echo_n "(cached) " >&6
13930else
13931  ac_check_lib_save_LIBS=$LIBS
13932LIBS="-ldld  $LIBS"
13933cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13934/* end confdefs.h.  */
13935
13936/* Override any GCC internal prototype to avoid an error.
13937   Use char because int might match the return type of a GCC
13938   builtin and then its argument prototype would still apply.  */
13939#ifdef __cplusplus
13940extern "C"
13941#endif
13942char shl_load ();
13943int
13944main ()
13945{
13946return shl_load ();
13947  ;
13948  return 0;
13949}
13950_ACEOF
13951if ac_fn_c_try_link "$LINENO"; then :
13952  ac_cv_lib_dld_shl_load=yes
13953else
13954  ac_cv_lib_dld_shl_load=no
13955fi
13956rm -f core conftest.err conftest.$ac_objext \
13957    conftest$ac_exeext conftest.$ac_ext
13958LIBS=$ac_check_lib_save_LIBS
13959fi
13960{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
13961$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
13962if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
13963  lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld
13964else
13965  ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
13966if test "x$ac_cv_func_dlopen" = xyes; then :
13967  lt_cv_dlopen=dlopen
13968else
13969  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
13970$as_echo_n "checking for dlopen in -ldl... " >&6; }
13971if ${ac_cv_lib_dl_dlopen+:} false; then :
13972  $as_echo_n "(cached) " >&6
13973else
13974  ac_check_lib_save_LIBS=$LIBS
13975LIBS="-ldl  $LIBS"
13976cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13977/* end confdefs.h.  */
13978
13979/* Override any GCC internal prototype to avoid an error.
13980   Use char because int might match the return type of a GCC
13981   builtin and then its argument prototype would still apply.  */
13982#ifdef __cplusplus
13983extern "C"
13984#endif
13985char dlopen ();
13986int
13987main ()
13988{
13989return dlopen ();
13990  ;
13991  return 0;
13992}
13993_ACEOF
13994if ac_fn_c_try_link "$LINENO"; then :
13995  ac_cv_lib_dl_dlopen=yes
13996else
13997  ac_cv_lib_dl_dlopen=no
13998fi
13999rm -f core conftest.err conftest.$ac_objext \
14000    conftest$ac_exeext conftest.$ac_ext
14001LIBS=$ac_check_lib_save_LIBS
14002fi
14003{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
14004$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
14005if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
14006  lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl
14007else
14008  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5
14009$as_echo_n "checking for dlopen in -lsvld... " >&6; }
14010if ${ac_cv_lib_svld_dlopen+:} false; then :
14011  $as_echo_n "(cached) " >&6
14012else
14013  ac_check_lib_save_LIBS=$LIBS
14014LIBS="-lsvld  $LIBS"
14015cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14016/* end confdefs.h.  */
14017
14018/* Override any GCC internal prototype to avoid an error.
14019   Use char because int might match the return type of a GCC
14020   builtin and then its argument prototype would still apply.  */
14021#ifdef __cplusplus
14022extern "C"
14023#endif
14024char dlopen ();
14025int
14026main ()
14027{
14028return dlopen ();
14029  ;
14030  return 0;
14031}
14032_ACEOF
14033if ac_fn_c_try_link "$LINENO"; then :
14034  ac_cv_lib_svld_dlopen=yes
14035else
14036  ac_cv_lib_svld_dlopen=no
14037fi
14038rm -f core conftest.err conftest.$ac_objext \
14039    conftest$ac_exeext conftest.$ac_ext
14040LIBS=$ac_check_lib_save_LIBS
14041fi
14042{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5
14043$as_echo "$ac_cv_lib_svld_dlopen" >&6; }
14044if test "x$ac_cv_lib_svld_dlopen" = xyes; then :
14045  lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld
14046else
14047  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5
14048$as_echo_n "checking for dld_link in -ldld... " >&6; }
14049if ${ac_cv_lib_dld_dld_link+:} false; then :
14050  $as_echo_n "(cached) " >&6
14051else
14052  ac_check_lib_save_LIBS=$LIBS
14053LIBS="-ldld  $LIBS"
14054cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14055/* end confdefs.h.  */
14056
14057/* Override any GCC internal prototype to avoid an error.
14058   Use char because int might match the return type of a GCC
14059   builtin and then its argument prototype would still apply.  */
14060#ifdef __cplusplus
14061extern "C"
14062#endif
14063char dld_link ();
14064int
14065main ()
14066{
14067return dld_link ();
14068  ;
14069  return 0;
14070}
14071_ACEOF
14072if ac_fn_c_try_link "$LINENO"; then :
14073  ac_cv_lib_dld_dld_link=yes
14074else
14075  ac_cv_lib_dld_dld_link=no
14076fi
14077rm -f core conftest.err conftest.$ac_objext \
14078    conftest$ac_exeext conftest.$ac_ext
14079LIBS=$ac_check_lib_save_LIBS
14080fi
14081{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5
14082$as_echo "$ac_cv_lib_dld_dld_link" >&6; }
14083if test "x$ac_cv_lib_dld_dld_link" = xyes; then :
14084  lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld
14085fi
14086
14087
14088fi
14089
14090
14091fi
14092
14093
14094fi
14095
14096
14097fi
14098
14099
14100fi
14101
14102    ;;
14103  esac
14104
14105  if test no = "$lt_cv_dlopen"; then
14106    enable_dlopen=no
14107  else
14108    enable_dlopen=yes
14109  fi
14110
14111  case $lt_cv_dlopen in
14112  dlopen)
14113    save_CPPFLAGS=$CPPFLAGS
14114    test yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
14115
14116    save_LDFLAGS=$LDFLAGS
14117    wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
14118
14119    save_LIBS=$LIBS
14120    LIBS="$lt_cv_dlopen_libs $LIBS"
14121
14122    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5
14123$as_echo_n "checking whether a program can dlopen itself... " >&6; }
14124if ${lt_cv_dlopen_self+:} false; then :
14125  $as_echo_n "(cached) " >&6
14126else
14127  	  if test yes = "$cross_compiling"; then :
14128  lt_cv_dlopen_self=cross
14129else
14130  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
14131  lt_status=$lt_dlunknown
14132  cat > conftest.$ac_ext <<_LT_EOF
14133#line $LINENO "configure"
14134#include "confdefs.h"
14135
14136#if HAVE_DLFCN_H
14137#include <dlfcn.h>
14138#endif
14139
14140#include <stdio.h>
14141
14142#ifdef RTLD_GLOBAL
14143#  define LT_DLGLOBAL		RTLD_GLOBAL
14144#else
14145#  ifdef DL_GLOBAL
14146#    define LT_DLGLOBAL		DL_GLOBAL
14147#  else
14148#    define LT_DLGLOBAL		0
14149#  endif
14150#endif
14151
14152/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
14153   find out it does not work in some platform. */
14154#ifndef LT_DLLAZY_OR_NOW
14155#  ifdef RTLD_LAZY
14156#    define LT_DLLAZY_OR_NOW		RTLD_LAZY
14157#  else
14158#    ifdef DL_LAZY
14159#      define LT_DLLAZY_OR_NOW		DL_LAZY
14160#    else
14161#      ifdef RTLD_NOW
14162#        define LT_DLLAZY_OR_NOW	RTLD_NOW
14163#      else
14164#        ifdef DL_NOW
14165#          define LT_DLLAZY_OR_NOW	DL_NOW
14166#        else
14167#          define LT_DLLAZY_OR_NOW	0
14168#        endif
14169#      endif
14170#    endif
14171#  endif
14172#endif
14173
14174/* When -fvisibility=hidden is used, assume the code has been annotated
14175   correspondingly for the symbols needed.  */
14176#if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
14177int fnord () __attribute__((visibility("default")));
14178#endif
14179
14180int fnord () { return 42; }
14181int main ()
14182{
14183  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
14184  int status = $lt_dlunknown;
14185
14186  if (self)
14187    {
14188      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
14189      else
14190        {
14191	  if (dlsym( self,"_fnord"))  status = $lt_dlneed_uscore;
14192          else puts (dlerror ());
14193	}
14194      /* dlclose (self); */
14195    }
14196  else
14197    puts (dlerror ());
14198
14199  return status;
14200}
14201_LT_EOF
14202  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
14203  (eval $ac_link) 2>&5
14204  ac_status=$?
14205  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
14206  test $ac_status = 0; } && test -s "conftest$ac_exeext" 2>/dev/null; then
14207    (./conftest; exit; ) >&5 2>/dev/null
14208    lt_status=$?
14209    case x$lt_status in
14210      x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;;
14211      x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;;
14212      x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;;
14213    esac
14214  else :
14215    # compilation failed
14216    lt_cv_dlopen_self=no
14217  fi
14218fi
14219rm -fr conftest*
14220
14221
14222fi
14223{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5
14224$as_echo "$lt_cv_dlopen_self" >&6; }
14225
14226    if test yes = "$lt_cv_dlopen_self"; then
14227      wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
14228      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5
14229$as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; }
14230if ${lt_cv_dlopen_self_static+:} false; then :
14231  $as_echo_n "(cached) " >&6
14232else
14233  	  if test yes = "$cross_compiling"; then :
14234  lt_cv_dlopen_self_static=cross
14235else
14236  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
14237  lt_status=$lt_dlunknown
14238  cat > conftest.$ac_ext <<_LT_EOF
14239#line $LINENO "configure"
14240#include "confdefs.h"
14241
14242#if HAVE_DLFCN_H
14243#include <dlfcn.h>
14244#endif
14245
14246#include <stdio.h>
14247
14248#ifdef RTLD_GLOBAL
14249#  define LT_DLGLOBAL		RTLD_GLOBAL
14250#else
14251#  ifdef DL_GLOBAL
14252#    define LT_DLGLOBAL		DL_GLOBAL
14253#  else
14254#    define LT_DLGLOBAL		0
14255#  endif
14256#endif
14257
14258/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
14259   find out it does not work in some platform. */
14260#ifndef LT_DLLAZY_OR_NOW
14261#  ifdef RTLD_LAZY
14262#    define LT_DLLAZY_OR_NOW		RTLD_LAZY
14263#  else
14264#    ifdef DL_LAZY
14265#      define LT_DLLAZY_OR_NOW		DL_LAZY
14266#    else
14267#      ifdef RTLD_NOW
14268#        define LT_DLLAZY_OR_NOW	RTLD_NOW
14269#      else
14270#        ifdef DL_NOW
14271#          define LT_DLLAZY_OR_NOW	DL_NOW
14272#        else
14273#          define LT_DLLAZY_OR_NOW	0
14274#        endif
14275#      endif
14276#    endif
14277#  endif
14278#endif
14279
14280/* When -fvisibility=hidden is used, assume the code has been annotated
14281   correspondingly for the symbols needed.  */
14282#if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
14283int fnord () __attribute__((visibility("default")));
14284#endif
14285
14286int fnord () { return 42; }
14287int main ()
14288{
14289  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
14290  int status = $lt_dlunknown;
14291
14292  if (self)
14293    {
14294      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
14295      else
14296        {
14297	  if (dlsym( self,"_fnord"))  status = $lt_dlneed_uscore;
14298          else puts (dlerror ());
14299	}
14300      /* dlclose (self); */
14301    }
14302  else
14303    puts (dlerror ());
14304
14305  return status;
14306}
14307_LT_EOF
14308  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
14309  (eval $ac_link) 2>&5
14310  ac_status=$?
14311  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
14312  test $ac_status = 0; } && test -s "conftest$ac_exeext" 2>/dev/null; then
14313    (./conftest; exit; ) >&5 2>/dev/null
14314    lt_status=$?
14315    case x$lt_status in
14316      x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;;
14317      x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;;
14318      x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;;
14319    esac
14320  else :
14321    # compilation failed
14322    lt_cv_dlopen_self_static=no
14323  fi
14324fi
14325rm -fr conftest*
14326
14327
14328fi
14329{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self_static" >&5
14330$as_echo "$lt_cv_dlopen_self_static" >&6; }
14331    fi
14332
14333    CPPFLAGS=$save_CPPFLAGS
14334    LDFLAGS=$save_LDFLAGS
14335    LIBS=$save_LIBS
14336    ;;
14337  esac
14338
14339  case $lt_cv_dlopen_self in
14340  yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
14341  *) enable_dlopen_self=unknown ;;
14342  esac
14343
14344  case $lt_cv_dlopen_self_static in
14345  yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
14346  *) enable_dlopen_self_static=unknown ;;
14347  esac
14348fi
14349
14350
14351
14352
14353
14354
14355
14356
14357
14358
14359
14360
14361
14362
14363
14364
14365
14366striplib=
14367old_striplib=
14368{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5
14369$as_echo_n "checking whether stripping libraries is possible... " >&6; }
14370if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
14371  test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
14372  test -z "$striplib" && striplib="$STRIP --strip-unneeded"
14373  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14374$as_echo "yes" >&6; }
14375else
14376# FIXME - insert some real tests, host_os isn't really good enough
14377  case $host_os in
14378  darwin*)
14379    if test -n "$STRIP"; then
14380      striplib="$STRIP -x"
14381      old_striplib="$STRIP -S"
14382      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14383$as_echo "yes" >&6; }
14384    else
14385      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14386$as_echo "no" >&6; }
14387    fi
14388    ;;
14389  *)
14390    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14391$as_echo "no" >&6; }
14392    ;;
14393  esac
14394fi
14395
14396
14397
14398
14399
14400
14401
14402
14403
14404
14405
14406
14407  # Report what library types will actually be built
14408  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5
14409$as_echo_n "checking if libtool supports shared libraries... " >&6; }
14410  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5
14411$as_echo "$can_build_shared" >&6; }
14412
14413  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5
14414$as_echo_n "checking whether to build shared libraries... " >&6; }
14415  test no = "$can_build_shared" && enable_shared=no
14416
14417  # On AIX, shared libraries and static libraries use the same namespace, and
14418  # are all built from PIC.
14419  case $host_os in
14420  aix3*)
14421    test yes = "$enable_shared" && enable_static=no
14422    if test -n "$RANLIB"; then
14423      archive_cmds="$archive_cmds~\$RANLIB \$lib"
14424      postinstall_cmds='$RANLIB $lib'
14425    fi
14426    ;;
14427
14428  aix[4-9]*)
14429    if test ia64 != "$host_cpu"; then
14430      case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in
14431      yes,aix,yes) ;;			# shared object as lib.so file only
14432      yes,svr4,*) ;;			# shared object as lib.so archive member only
14433      yes,*) enable_static=no ;;	# shared object in lib.a archive as well
14434      esac
14435    fi
14436    ;;
14437  esac
14438  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
14439$as_echo "$enable_shared" >&6; }
14440
14441  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5
14442$as_echo_n "checking whether to build static libraries... " >&6; }
14443  # Make sure either enable_shared or enable_static is yes.
14444  test yes = "$enable_shared" || enable_static=yes
14445  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5
14446$as_echo "$enable_static" >&6; }
14447
14448
14449
14450
14451fi
14452ac_ext=c
14453ac_cpp='$CPP $CPPFLAGS'
14454ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
14455ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
14456ac_compiler_gnu=$ac_cv_c_compiler_gnu
14457
14458CC=$lt_save_CC
14459
14460
14461
14462
14463
14464
14465
14466
14467
14468
14469
14470
14471
14472
14473
14474        ac_config_commands="$ac_config_commands libtool"
14475
14476
14477
14478
14479# Only expand once:
14480
14481
14482
14483
14484# Checks for header files.
14485for ac_header in stdarg.h stdbool.h netinet/in.h netinet/tcp.h sys/param.h sys/socket.h sys/un.h sys/uio.h sys/resource.h arpa/inet.h syslog.h netdb.h sys/wait.h pwd.h glob.h grp.h login_cap.h winsock2.h ws2tcpip.h endian.h sys/endian.h libkern/OSByteOrder.h sys/ipc.h sys/shm.h
14486do :
14487  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
14488ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
14489"
14490if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
14491  cat >>confdefs.h <<_ACEOF
14492#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
14493_ACEOF
14494
14495fi
14496
14497done
14498
14499
14500# check for types.
14501# Using own tests for int64* because autoconf builtin only give 32bit.
14502ac_fn_c_check_type "$LINENO" "int8_t" "ac_cv_type_int8_t" "$ac_includes_default"
14503if test "x$ac_cv_type_int8_t" = xyes; then :
14504
14505else
14506
14507cat >>confdefs.h <<_ACEOF
14508#define int8_t signed char
14509_ACEOF
14510
14511fi
14512
14513ac_fn_c_check_type "$LINENO" "int16_t" "ac_cv_type_int16_t" "$ac_includes_default"
14514if test "x$ac_cv_type_int16_t" = xyes; then :
14515
14516else
14517
14518cat >>confdefs.h <<_ACEOF
14519#define int16_t short
14520_ACEOF
14521
14522fi
14523
14524ac_fn_c_check_type "$LINENO" "int32_t" "ac_cv_type_int32_t" "$ac_includes_default"
14525if test "x$ac_cv_type_int32_t" = xyes; then :
14526
14527else
14528
14529cat >>confdefs.h <<_ACEOF
14530#define int32_t int
14531_ACEOF
14532
14533fi
14534
14535ac_fn_c_check_type "$LINENO" "int64_t" "ac_cv_type_int64_t" "$ac_includes_default"
14536if test "x$ac_cv_type_int64_t" = xyes; then :
14537
14538else
14539
14540cat >>confdefs.h <<_ACEOF
14541#define int64_t long long
14542_ACEOF
14543
14544fi
14545
14546ac_fn_c_check_type "$LINENO" "uint8_t" "ac_cv_type_uint8_t" "$ac_includes_default"
14547if test "x$ac_cv_type_uint8_t" = xyes; then :
14548
14549else
14550
14551cat >>confdefs.h <<_ACEOF
14552#define uint8_t unsigned char
14553_ACEOF
14554
14555fi
14556
14557ac_fn_c_check_type "$LINENO" "uint16_t" "ac_cv_type_uint16_t" "$ac_includes_default"
14558if test "x$ac_cv_type_uint16_t" = xyes; then :
14559
14560else
14561
14562cat >>confdefs.h <<_ACEOF
14563#define uint16_t unsigned short
14564_ACEOF
14565
14566fi
14567
14568ac_fn_c_check_type "$LINENO" "uint32_t" "ac_cv_type_uint32_t" "$ac_includes_default"
14569if test "x$ac_cv_type_uint32_t" = xyes; then :
14570
14571else
14572
14573cat >>confdefs.h <<_ACEOF
14574#define uint32_t unsigned int
14575_ACEOF
14576
14577fi
14578
14579ac_fn_c_check_type "$LINENO" "uint64_t" "ac_cv_type_uint64_t" "$ac_includes_default"
14580if test "x$ac_cv_type_uint64_t" = xyes; then :
14581
14582else
14583
14584cat >>confdefs.h <<_ACEOF
14585#define uint64_t unsigned long long
14586_ACEOF
14587
14588fi
14589
14590ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
14591if test "x$ac_cv_type_size_t" = xyes; then :
14592
14593else
14594
14595cat >>confdefs.h <<_ACEOF
14596#define size_t unsigned int
14597_ACEOF
14598
14599fi
14600
14601ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
14602if test "x$ac_cv_type_ssize_t" = xyes; then :
14603
14604else
14605
14606cat >>confdefs.h <<_ACEOF
14607#define ssize_t int
14608_ACEOF
14609
14610fi
14611
14612{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
14613$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
14614if ${ac_cv_type_uid_t+:} false; then :
14615  $as_echo_n "(cached) " >&6
14616else
14617  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14618/* end confdefs.h.  */
14619#include <sys/types.h>
14620
14621_ACEOF
14622if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14623  $EGREP "uid_t" >/dev/null 2>&1; then :
14624  ac_cv_type_uid_t=yes
14625else
14626  ac_cv_type_uid_t=no
14627fi
14628rm -f conftest*
14629
14630fi
14631{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
14632$as_echo "$ac_cv_type_uid_t" >&6; }
14633if test $ac_cv_type_uid_t = no; then
14634
14635$as_echo "#define uid_t int" >>confdefs.h
14636
14637
14638$as_echo "#define gid_t int" >>confdefs.h
14639
14640fi
14641
14642ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
14643if test "x$ac_cv_type_pid_t" = xyes; then :
14644
14645else
14646
14647cat >>confdefs.h <<_ACEOF
14648#define pid_t int
14649_ACEOF
14650
14651fi
14652
14653ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
14654if test "x$ac_cv_type_off_t" = xyes; then :
14655
14656else
14657
14658cat >>confdefs.h <<_ACEOF
14659#define off_t long int
14660_ACEOF
14661
14662fi
14663
14664ac_fn_c_check_type "$LINENO" "u_char" "ac_cv_type_u_char" "
14665$ac_includes_default
14666#ifdef HAVE_WINSOCK2_H
14667#  include <winsock2.h>
14668#endif
14669
14670"
14671if test "x$ac_cv_type_u_char" = xyes; then :
14672
14673else
14674
14675$as_echo "#define u_char unsigned char" >>confdefs.h
14676
14677fi
14678
14679ac_fn_c_check_type "$LINENO" "rlim_t" "ac_cv_type_rlim_t" "
14680$ac_includes_default
14681#ifdef HAVE_SYS_RESOURCE_H
14682#  include <sys/resource.h>
14683#endif
14684
14685"
14686if test "x$ac_cv_type_rlim_t" = xyes; then :
14687
14688else
14689
14690$as_echo "#define rlim_t unsigned long" >>confdefs.h
14691
14692fi
14693
14694
14695ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
14696$ac_includes_default
14697#ifdef HAVE_SYS_SOCKET_H
14698#  include <sys/socket.h>
14699#endif
14700#ifdef HAVE_WS2TCPIP_H
14701#  include <ws2tcpip.h>
14702#endif
14703
14704"
14705if test "x$ac_cv_type_socklen_t" = xyes; then :
14706
14707else
14708
14709$as_echo "#define socklen_t int" >>confdefs.h
14710
14711fi
14712
14713 ac_fn_c_check_type "$LINENO" "in_addr_t" "ac_cv_type_in_addr_t" "
14714$ac_includes_default
14715#ifdef HAVE_SYS_TYPES_H
14716# include <sys/types.h>
14717#endif
14718#ifdef HAVE_NETINET_IN_H
14719# include <netinet/in.h>
14720#endif
14721
14722"
14723if test "x$ac_cv_type_in_addr_t" = xyes; then :
14724
14725else
14726
14727$as_echo "#define in_addr_t uint32_t" >>confdefs.h
14728
14729fi
14730
14731 ac_fn_c_check_type "$LINENO" "in_port_t" "ac_cv_type_in_port_t" "
14732$ac_includes_default
14733#ifdef HAVE_SYS_TYPES_H
14734# include <sys/types.h>
14735#endif
14736#ifdef HAVE_NETINET_IN_H
14737# include <netinet/in.h>
14738#endif
14739
14740"
14741if test "x$ac_cv_type_in_port_t" = xyes; then :
14742
14743else
14744
14745$as_echo "#define in_port_t uint16_t" >>confdefs.h
14746
14747fi
14748
14749{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if memcmp compares unsigned" >&5
14750$as_echo_n "checking if memcmp compares unsigned... " >&6; }
14751if test "$cross_compiling" = yes; then :
14752   { $as_echo "$as_me:${as_lineno-$LINENO}: result: cross-compile no" >&5
14753$as_echo "cross-compile no" >&6; }
14754
14755$as_echo "#define MEMCMP_IS_BROKEN 1" >>confdefs.h
14756
14757  case " $LIBOBJS " in
14758  *" memcmp.$ac_objext "* ) ;;
14759  *) LIBOBJS="$LIBOBJS memcmp.$ac_objext"
14760 ;;
14761esac
14762
14763
14764else
14765  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14766/* end confdefs.h.  */
14767
14768#include <stdio.h>
14769#include <stdlib.h>
14770#include <string.h>
14771int main(void)
14772{
14773	char a = 255, b = 0;
14774	if(memcmp(&a, &b, 1) < 0)
14775		return 1;
14776	return 0;
14777}
14778
14779_ACEOF
14780if ac_fn_c_try_run "$LINENO"; then :
14781  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14782$as_echo "yes" >&6; }
14783else
14784   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14785$as_echo "no" >&6; }
14786
14787$as_echo "#define MEMCMP_IS_BROKEN 1" >>confdefs.h
14788
14789  case " $LIBOBJS " in
14790  *" memcmp.$ac_objext "* ) ;;
14791  *) LIBOBJS="$LIBOBJS memcmp.$ac_objext"
14792 ;;
14793esac
14794
14795
14796fi
14797rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14798  conftest.$ac_objext conftest.beam conftest.$ac_ext
14799fi
14800
14801
14802# The cast to long int works around a bug in the HP C Compiler
14803# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14804# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14805# This bug is HP SR number 8606223364.
14806{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
14807$as_echo_n "checking size of time_t... " >&6; }
14808if ${ac_cv_sizeof_time_t+:} false; then :
14809  $as_echo_n "(cached) " >&6
14810else
14811  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t"        "
14812$ac_includes_default
14813#ifdef TIME_WITH_SYS_TIME
14814# include <sys/time.h>
14815# include <time.h>
14816#else
14817# ifdef HAVE_SYS_TIME_H
14818#  include <sys/time.h>
14819# else
14820#  include <time.h>
14821# endif
14822#endif
14823
14824"; then :
14825
14826else
14827  if test "$ac_cv_type_time_t" = yes; then
14828     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14829$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
14830as_fn_error 77 "cannot compute sizeof (time_t)
14831See \`config.log' for more details" "$LINENO" 5; }
14832   else
14833     ac_cv_sizeof_time_t=0
14834   fi
14835fi
14836
14837fi
14838{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
14839$as_echo "$ac_cv_sizeof_time_t" >&6; }
14840
14841
14842
14843cat >>confdefs.h <<_ACEOF
14844#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
14845_ACEOF
14846
14847
14848
14849# add option to disable the evil rpath
14850
14851# Check whether --enable-rpath was given.
14852if test "${enable_rpath+set}" = set; then :
14853  enableval=$enable_rpath; enable_rpath=$enableval
14854else
14855  enable_rpath=yes
14856fi
14857
14858if test "x$enable_rpath" = xno; then
14859		ac_config_commands="$ac_config_commands disable-rpath"
14860
14861fi
14862
14863
14864
14865# check to see if libraries are needed for these functions.
14866{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing inet_pton" >&5
14867$as_echo_n "checking for library containing inet_pton... " >&6; }
14868if ${ac_cv_search_inet_pton+:} false; then :
14869  $as_echo_n "(cached) " >&6
14870else
14871  ac_func_search_save_LIBS=$LIBS
14872cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14873/* end confdefs.h.  */
14874
14875/* Override any GCC internal prototype to avoid an error.
14876   Use char because int might match the return type of a GCC
14877   builtin and then its argument prototype would still apply.  */
14878#ifdef __cplusplus
14879extern "C"
14880#endif
14881char inet_pton ();
14882int
14883main ()
14884{
14885return inet_pton ();
14886  ;
14887  return 0;
14888}
14889_ACEOF
14890for ac_lib in '' nsl; do
14891  if test -z "$ac_lib"; then
14892    ac_res="none required"
14893  else
14894    ac_res=-l$ac_lib
14895    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
14896  fi
14897  if ac_fn_c_try_link "$LINENO"; then :
14898  ac_cv_search_inet_pton=$ac_res
14899fi
14900rm -f core conftest.err conftest.$ac_objext \
14901    conftest$ac_exeext
14902  if ${ac_cv_search_inet_pton+:} false; then :
14903  break
14904fi
14905done
14906if ${ac_cv_search_inet_pton+:} false; then :
14907
14908else
14909  ac_cv_search_inet_pton=no
14910fi
14911rm conftest.$ac_ext
14912LIBS=$ac_func_search_save_LIBS
14913fi
14914{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_inet_pton" >&5
14915$as_echo "$ac_cv_search_inet_pton" >&6; }
14916ac_res=$ac_cv_search_inet_pton
14917if test "$ac_res" != no; then :
14918  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
14919
14920fi
14921
14922{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing socket" >&5
14923$as_echo_n "checking for library containing socket... " >&6; }
14924if ${ac_cv_search_socket+:} false; then :
14925  $as_echo_n "(cached) " >&6
14926else
14927  ac_func_search_save_LIBS=$LIBS
14928cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14929/* end confdefs.h.  */
14930
14931/* Override any GCC internal prototype to avoid an error.
14932   Use char because int might match the return type of a GCC
14933   builtin and then its argument prototype would still apply.  */
14934#ifdef __cplusplus
14935extern "C"
14936#endif
14937char socket ();
14938int
14939main ()
14940{
14941return socket ();
14942  ;
14943  return 0;
14944}
14945_ACEOF
14946for ac_lib in '' socket; do
14947  if test -z "$ac_lib"; then
14948    ac_res="none required"
14949  else
14950    ac_res=-l$ac_lib
14951    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
14952  fi
14953  if ac_fn_c_try_link "$LINENO"; then :
14954  ac_cv_search_socket=$ac_res
14955fi
14956rm -f core conftest.err conftest.$ac_objext \
14957    conftest$ac_exeext
14958  if ${ac_cv_search_socket+:} false; then :
14959  break
14960fi
14961done
14962if ${ac_cv_search_socket+:} false; then :
14963
14964else
14965  ac_cv_search_socket=no
14966fi
14967rm conftest.$ac_ext
14968LIBS=$ac_func_search_save_LIBS
14969fi
14970{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socket" >&5
14971$as_echo "$ac_cv_search_socket" >&6; }
14972ac_res=$ac_cv_search_socket
14973if test "$ac_res" != no; then :
14974  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
14975
14976fi
14977
14978
14979# check wether strptime also works
14980
14981# check some functions of the OS before linking libs (while still runnable).
14982for ac_header in unistd.h
14983do :
14984  ac_fn_c_check_header_mongrel "$LINENO" "unistd.h" "ac_cv_header_unistd_h" "$ac_includes_default"
14985if test "x$ac_cv_header_unistd_h" = xyes; then :
14986  cat >>confdefs.h <<_ACEOF
14987#define HAVE_UNISTD_H 1
14988_ACEOF
14989
14990fi
14991
14992done
14993
14994{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working chown" >&5
14995$as_echo_n "checking for working chown... " >&6; }
14996if ${ac_cv_func_chown_works+:} false; then :
14997  $as_echo_n "(cached) " >&6
14998else
14999  if test "$cross_compiling" = yes; then :
15000  ac_cv_func_chown_works=no
15001else
15002  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15003/* end confdefs.h.  */
15004$ac_includes_default
15005#include <fcntl.h>
15006
15007int
15008main ()
15009{
15010  char *f = "conftest.chown";
15011  struct stat before, after;
15012
15013  if (creat (f, 0600) < 0)
15014    return 1;
15015  if (stat (f, &before) < 0)
15016    return 1;
15017  if (chown (f, (uid_t) -1, (gid_t) -1) == -1)
15018    return 1;
15019  if (stat (f, &after) < 0)
15020    return 1;
15021  return ! (before.st_uid == after.st_uid && before.st_gid == after.st_gid);
15022
15023  ;
15024  return 0;
15025}
15026_ACEOF
15027if ac_fn_c_try_run "$LINENO"; then :
15028  ac_cv_func_chown_works=yes
15029else
15030  ac_cv_func_chown_works=no
15031fi
15032rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15033  conftest.$ac_objext conftest.beam conftest.$ac_ext
15034fi
15035
15036rm -f conftest.chown
15037
15038fi
15039{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_chown_works" >&5
15040$as_echo "$ac_cv_func_chown_works" >&6; }
15041if test $ac_cv_func_chown_works = yes; then
15042
15043$as_echo "#define HAVE_CHOWN 1" >>confdefs.h
15044
15045fi
15046
15047for ac_header in vfork.h
15048do :
15049  ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default"
15050if test "x$ac_cv_header_vfork_h" = xyes; then :
15051  cat >>confdefs.h <<_ACEOF
15052#define HAVE_VFORK_H 1
15053_ACEOF
15054
15055fi
15056
15057done
15058
15059for ac_func in fork vfork
15060do :
15061  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
15062ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
15063if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
15064  cat >>confdefs.h <<_ACEOF
15065#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
15066_ACEOF
15067
15068fi
15069done
15070
15071if test "x$ac_cv_func_fork" = xyes; then
15072  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5
15073$as_echo_n "checking for working fork... " >&6; }
15074if ${ac_cv_func_fork_works+:} false; then :
15075  $as_echo_n "(cached) " >&6
15076else
15077  if test "$cross_compiling" = yes; then :
15078  ac_cv_func_fork_works=cross
15079else
15080  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15081/* end confdefs.h.  */
15082$ac_includes_default
15083int
15084main ()
15085{
15086
15087	  /* By Ruediger Kuhlmann. */
15088	  return fork () < 0;
15089
15090  ;
15091  return 0;
15092}
15093_ACEOF
15094if ac_fn_c_try_run "$LINENO"; then :
15095  ac_cv_func_fork_works=yes
15096else
15097  ac_cv_func_fork_works=no
15098fi
15099rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15100  conftest.$ac_objext conftest.beam conftest.$ac_ext
15101fi
15102
15103fi
15104{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5
15105$as_echo "$ac_cv_func_fork_works" >&6; }
15106
15107else
15108  ac_cv_func_fork_works=$ac_cv_func_fork
15109fi
15110if test "x$ac_cv_func_fork_works" = xcross; then
15111  case $host in
15112    *-*-amigaos* | *-*-msdosdjgpp*)
15113      # Override, as these systems have only a dummy fork() stub
15114      ac_cv_func_fork_works=no
15115      ;;
15116    *)
15117      ac_cv_func_fork_works=yes
15118      ;;
15119  esac
15120  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
15121$as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
15122fi
15123ac_cv_func_vfork_works=$ac_cv_func_vfork
15124if test "x$ac_cv_func_vfork" = xyes; then
15125  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5
15126$as_echo_n "checking for working vfork... " >&6; }
15127if ${ac_cv_func_vfork_works+:} false; then :
15128  $as_echo_n "(cached) " >&6
15129else
15130  if test "$cross_compiling" = yes; then :
15131  ac_cv_func_vfork_works=cross
15132else
15133  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15134/* end confdefs.h.  */
15135/* Thanks to Paul Eggert for this test.  */
15136$ac_includes_default
15137#include <sys/wait.h>
15138#ifdef HAVE_VFORK_H
15139# include <vfork.h>
15140#endif
15141/* On some sparc systems, changes by the child to local and incoming
15142   argument registers are propagated back to the parent.  The compiler
15143   is told about this with #include <vfork.h>, but some compilers
15144   (e.g. gcc -O) don't grok <vfork.h>.  Test for this by using a
15145   static variable whose address is put into a register that is
15146   clobbered by the vfork.  */
15147static void
15148#ifdef __cplusplus
15149sparc_address_test (int arg)
15150# else
15151sparc_address_test (arg) int arg;
15152#endif
15153{
15154  static pid_t child;
15155  if (!child) {
15156    child = vfork ();
15157    if (child < 0) {
15158      perror ("vfork");
15159      _exit(2);
15160    }
15161    if (!child) {
15162      arg = getpid();
15163      write(-1, "", 0);
15164      _exit (arg);
15165    }
15166  }
15167}
15168
15169int
15170main ()
15171{
15172  pid_t parent = getpid ();
15173  pid_t child;
15174
15175  sparc_address_test (0);
15176
15177  child = vfork ();
15178
15179  if (child == 0) {
15180    /* Here is another test for sparc vfork register problems.  This
15181       test uses lots of local variables, at least as many local
15182       variables as main has allocated so far including compiler
15183       temporaries.  4 locals are enough for gcc 1.40.3 on a Solaris
15184       4.1.3 sparc, but we use 8 to be safe.  A buggy compiler should
15185       reuse the register of parent for one of the local variables,
15186       since it will think that parent can't possibly be used any more
15187       in this routine.  Assigning to the local variable will thus
15188       munge parent in the parent process.  */
15189    pid_t
15190      p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
15191      p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
15192    /* Convince the compiler that p..p7 are live; otherwise, it might
15193       use the same hardware register for all 8 local variables.  */
15194    if (p != p1 || p != p2 || p != p3 || p != p4
15195	|| p != p5 || p != p6 || p != p7)
15196      _exit(1);
15197
15198    /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
15199       from child file descriptors.  If the child closes a descriptor
15200       before it execs or exits, this munges the parent's descriptor
15201       as well.  Test for this by closing stdout in the child.  */
15202    _exit(close(fileno(stdout)) != 0);
15203  } else {
15204    int status;
15205    struct stat st;
15206
15207    while (wait(&status) != child)
15208      ;
15209    return (
15210	 /* Was there some problem with vforking?  */
15211	 child < 0
15212
15213	 /* Did the child fail?  (This shouldn't happen.)  */
15214	 || status
15215
15216	 /* Did the vfork/compiler bug occur?  */
15217	 || parent != getpid()
15218
15219	 /* Did the file descriptor bug occur?  */
15220	 || fstat(fileno(stdout), &st) != 0
15221	 );
15222  }
15223}
15224_ACEOF
15225if ac_fn_c_try_run "$LINENO"; then :
15226  ac_cv_func_vfork_works=yes
15227else
15228  ac_cv_func_vfork_works=no
15229fi
15230rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15231  conftest.$ac_objext conftest.beam conftest.$ac_ext
15232fi
15233
15234fi
15235{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5
15236$as_echo "$ac_cv_func_vfork_works" >&6; }
15237
15238fi;
15239if test "x$ac_cv_func_fork_works" = xcross; then
15240  ac_cv_func_vfork_works=$ac_cv_func_vfork
15241  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
15242$as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
15243fi
15244
15245if test "x$ac_cv_func_vfork_works" = xyes; then
15246
15247$as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h
15248
15249else
15250
15251$as_echo "#define vfork fork" >>confdefs.h
15252
15253fi
15254if test "x$ac_cv_func_fork_works" = xyes; then
15255
15256$as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h
15257
15258fi
15259
15260{ $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of signal handlers" >&5
15261$as_echo_n "checking return type of signal handlers... " >&6; }
15262if ${ac_cv_type_signal+:} false; then :
15263  $as_echo_n "(cached) " >&6
15264else
15265  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15266/* end confdefs.h.  */
15267#include <sys/types.h>
15268#include <signal.h>
15269
15270int
15271main ()
15272{
15273return *(signal (0, 0)) (0) == 1;
15274  ;
15275  return 0;
15276}
15277_ACEOF
15278if ac_fn_c_try_compile "$LINENO"; then :
15279  ac_cv_type_signal=int
15280else
15281  ac_cv_type_signal=void
15282fi
15283rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15284fi
15285{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_signal" >&5
15286$as_echo "$ac_cv_type_signal" >&6; }
15287
15288cat >>confdefs.h <<_ACEOF
15289#define RETSIGTYPE $ac_cv_type_signal
15290_ACEOF
15291
15292
15293{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGEFILE_SOURCE value needed for large files" >&5
15294$as_echo_n "checking for _LARGEFILE_SOURCE value needed for large files... " >&6; }
15295if ${ac_cv_sys_largefile_source+:} false; then :
15296  $as_echo_n "(cached) " >&6
15297else
15298  while :; do
15299  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15300/* end confdefs.h.  */
15301#include <sys/types.h> /* for off_t */
15302     #include <stdio.h>
15303int
15304main ()
15305{
15306int (*fp) (FILE *, off_t, int) = fseeko;
15307     return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
15308  ;
15309  return 0;
15310}
15311_ACEOF
15312if ac_fn_c_try_link "$LINENO"; then :
15313  ac_cv_sys_largefile_source=no; break
15314fi
15315rm -f core conftest.err conftest.$ac_objext \
15316    conftest$ac_exeext conftest.$ac_ext
15317  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15318/* end confdefs.h.  */
15319#define _LARGEFILE_SOURCE 1
15320#include <sys/types.h> /* for off_t */
15321     #include <stdio.h>
15322int
15323main ()
15324{
15325int (*fp) (FILE *, off_t, int) = fseeko;
15326     return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
15327  ;
15328  return 0;
15329}
15330_ACEOF
15331if ac_fn_c_try_link "$LINENO"; then :
15332  ac_cv_sys_largefile_source=1; break
15333fi
15334rm -f core conftest.err conftest.$ac_objext \
15335    conftest$ac_exeext conftest.$ac_ext
15336  ac_cv_sys_largefile_source=unknown
15337  break
15338done
15339fi
15340{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_source" >&5
15341$as_echo "$ac_cv_sys_largefile_source" >&6; }
15342case $ac_cv_sys_largefile_source in #(
15343  no | unknown) ;;
15344  *)
15345cat >>confdefs.h <<_ACEOF
15346#define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
15347_ACEOF
15348;;
15349esac
15350rm -rf conftest*
15351
15352# We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
15353# in glibc 2.1.3, but that breaks too many other things.
15354# If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
15355if test $ac_cv_sys_largefile_source != unknown; then
15356
15357$as_echo "#define HAVE_FSEEKO 1" >>confdefs.h
15358
15359fi
15360
15361
15362# Check whether --enable-largefile was given.
15363if test "${enable_largefile+set}" = set; then :
15364  enableval=$enable_largefile;
15365fi
15366
15367if test "$enable_largefile" != no; then
15368
15369  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
15370$as_echo_n "checking for special C compiler options needed for large files... " >&6; }
15371if ${ac_cv_sys_largefile_CC+:} false; then :
15372  $as_echo_n "(cached) " >&6
15373else
15374  ac_cv_sys_largefile_CC=no
15375     if test "$GCC" != yes; then
15376       ac_save_CC=$CC
15377       while :; do
15378	 # IRIX 6.2 and later do not support large files by default,
15379	 # so use the C compiler's -n32 option if that helps.
15380	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15381/* end confdefs.h.  */
15382#include <sys/types.h>
15383 /* Check that off_t can represent 2**63 - 1 correctly.
15384    We can't simply define LARGE_OFF_T to be 9223372036854775807,
15385    since some C++ compilers masquerading as C compilers
15386    incorrectly reject 9223372036854775807.  */
15387#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
15388  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
15389		       && LARGE_OFF_T % 2147483647 == 1)
15390		      ? 1 : -1];
15391int
15392main ()
15393{
15394
15395  ;
15396  return 0;
15397}
15398_ACEOF
15399	 if ac_fn_c_try_compile "$LINENO"; then :
15400  break
15401fi
15402rm -f core conftest.err conftest.$ac_objext
15403	 CC="$CC -n32"
15404	 if ac_fn_c_try_compile "$LINENO"; then :
15405  ac_cv_sys_largefile_CC=' -n32'; break
15406fi
15407rm -f core conftest.err conftest.$ac_objext
15408	 break
15409       done
15410       CC=$ac_save_CC
15411       rm -f conftest.$ac_ext
15412    fi
15413fi
15414{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
15415$as_echo "$ac_cv_sys_largefile_CC" >&6; }
15416  if test "$ac_cv_sys_largefile_CC" != no; then
15417    CC=$CC$ac_cv_sys_largefile_CC
15418  fi
15419
15420  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
15421$as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
15422if ${ac_cv_sys_file_offset_bits+:} false; then :
15423  $as_echo_n "(cached) " >&6
15424else
15425  while :; do
15426  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15427/* end confdefs.h.  */
15428#include <sys/types.h>
15429 /* Check that off_t can represent 2**63 - 1 correctly.
15430    We can't simply define LARGE_OFF_T to be 9223372036854775807,
15431    since some C++ compilers masquerading as C compilers
15432    incorrectly reject 9223372036854775807.  */
15433#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
15434  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
15435		       && LARGE_OFF_T % 2147483647 == 1)
15436		      ? 1 : -1];
15437int
15438main ()
15439{
15440
15441  ;
15442  return 0;
15443}
15444_ACEOF
15445if ac_fn_c_try_compile "$LINENO"; then :
15446  ac_cv_sys_file_offset_bits=no; break
15447fi
15448rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15449  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15450/* end confdefs.h.  */
15451#define _FILE_OFFSET_BITS 64
15452#include <sys/types.h>
15453 /* Check that off_t can represent 2**63 - 1 correctly.
15454    We can't simply define LARGE_OFF_T to be 9223372036854775807,
15455    since some C++ compilers masquerading as C compilers
15456    incorrectly reject 9223372036854775807.  */
15457#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
15458  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
15459		       && LARGE_OFF_T % 2147483647 == 1)
15460		      ? 1 : -1];
15461int
15462main ()
15463{
15464
15465  ;
15466  return 0;
15467}
15468_ACEOF
15469if ac_fn_c_try_compile "$LINENO"; then :
15470  ac_cv_sys_file_offset_bits=64; break
15471fi
15472rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15473  ac_cv_sys_file_offset_bits=unknown
15474  break
15475done
15476fi
15477{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
15478$as_echo "$ac_cv_sys_file_offset_bits" >&6; }
15479case $ac_cv_sys_file_offset_bits in #(
15480  no | unknown) ;;
15481  *)
15482cat >>confdefs.h <<_ACEOF
15483#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
15484_ACEOF
15485;;
15486esac
15487rm -rf conftest*
15488  if test $ac_cv_sys_file_offset_bits = unknown; then
15489    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
15490$as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
15491if ${ac_cv_sys_large_files+:} false; then :
15492  $as_echo_n "(cached) " >&6
15493else
15494  while :; do
15495  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15496/* end confdefs.h.  */
15497#include <sys/types.h>
15498 /* Check that off_t can represent 2**63 - 1 correctly.
15499    We can't simply define LARGE_OFF_T to be 9223372036854775807,
15500    since some C++ compilers masquerading as C compilers
15501    incorrectly reject 9223372036854775807.  */
15502#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
15503  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
15504		       && LARGE_OFF_T % 2147483647 == 1)
15505		      ? 1 : -1];
15506int
15507main ()
15508{
15509
15510  ;
15511  return 0;
15512}
15513_ACEOF
15514if ac_fn_c_try_compile "$LINENO"; then :
15515  ac_cv_sys_large_files=no; break
15516fi
15517rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15518  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15519/* end confdefs.h.  */
15520#define _LARGE_FILES 1
15521#include <sys/types.h>
15522 /* Check that off_t can represent 2**63 - 1 correctly.
15523    We can't simply define LARGE_OFF_T to be 9223372036854775807,
15524    since some C++ compilers masquerading as C compilers
15525    incorrectly reject 9223372036854775807.  */
15526#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
15527  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
15528		       && LARGE_OFF_T % 2147483647 == 1)
15529		      ? 1 : -1];
15530int
15531main ()
15532{
15533
15534  ;
15535  return 0;
15536}
15537_ACEOF
15538if ac_fn_c_try_compile "$LINENO"; then :
15539  ac_cv_sys_large_files=1; break
15540fi
15541rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15542  ac_cv_sys_large_files=unknown
15543  break
15544done
15545fi
15546{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
15547$as_echo "$ac_cv_sys_large_files" >&6; }
15548case $ac_cv_sys_large_files in #(
15549  no | unknown) ;;
15550  *)
15551cat >>confdefs.h <<_ACEOF
15552#define _LARGE_FILES $ac_cv_sys_large_files
15553_ACEOF
15554;;
15555esac
15556rm -rf conftest*
15557  fi
15558
15559
15560fi
15561
15562
15563
15564
15565{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we need -D_LARGEFILE_SOURCE=1 as a flag for $CC" >&5
15566$as_echo_n "checking whether we need -D_LARGEFILE_SOURCE=1 as a flag for $CC... " >&6; }
15567cache=_D_LARGEFILE_SOURCE_1
15568if eval \${cv_prog_cc_flag_needed_$cache+:} false; then :
15569  $as_echo_n "(cached) " >&6
15570else
15571
15572echo '
15573#include <stdio.h>
15574int test() {
15575        int a = fseeko(stdin, 0, 0);
15576        return a;
15577}
15578' > conftest.c
15579echo 'void f(){}' >>conftest.c
15580if test -z "`$CC $CPPFLAGS $CFLAGS $ERRFLAG -c conftest.c 2>&1`"; then
15581eval "cv_prog_cc_flag_needed_$cache=no"
15582else
15583
15584if test -z "`$CC $CPPFLAGS $CFLAGS -D_LARGEFILE_SOURCE=1 $ERRFLAG -c conftest.c 2>&1`"; then
15585eval "cv_prog_cc_flag_needed_$cache=yes"
15586else
15587eval "cv_prog_cc_flag_needed_$cache=fail"
15588#echo 'Test with flag fails too!'
15589#cat conftest.c
15590#echo "$CC $CPPFLAGS $CFLAGS -D_LARGEFILE_SOURCE=1 $ERRFLAG -c conftest.c 2>&1"
15591#echo `$CC $CPPFLAGS $CFLAGS -D_LARGEFILE_SOURCE=1 $ERRFLAG -c conftest.c 2>&1`
15592#exit 1
15593fi
15594
15595fi
15596rm -f conftest conftest.c conftest.o
15597
15598fi
15599
15600if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = yes"; then
15601{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15602$as_echo "yes" >&6; }
15603:
15604CFLAGS="$CFLAGS -D_LARGEFILE_SOURCE=1"
15605else
15606if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = no"; then
15607{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15608$as_echo "no" >&6; }
15609#echo 'Test with flag is no!'
15610#cat conftest.c
15611#echo "$CC $CPPFLAGS $CFLAGS -D_LARGEFILE_SOURCE=1 $ERRFLAG -c conftest.c 2>&1"
15612#echo `$CC $CPPFLAGS $CFLAGS -D_LARGEFILE_SOURCE=1 $ERRFLAG -c conftest.c 2>&1`
15613#exit 1
15614:
15615
15616else
15617{ $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
15618$as_echo "failed" >&6; }
15619:
15620
15621fi
15622fi
15623
15624
15625
15626{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if nonblocking sockets work" >&5
15627$as_echo_n "checking if nonblocking sockets work... " >&6; }
15628if echo $target | grep mingw32 >/dev/null; then
15629	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no (windows)" >&5
15630$as_echo "no (windows)" >&6; }
15631
15632$as_echo "#define NONBLOCKING_IS_BROKEN 1" >>confdefs.h
15633
15634else
15635if test "$cross_compiling" = yes; then :
15636
15637	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: crosscompile(yes)" >&5
15638$as_echo "crosscompile(yes)" >&6; }
15639
15640else
15641  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15642/* end confdefs.h.  */
15643
15644
15645#include <stdio.h>
15646#include <string.h>
15647#include <stdlib.h>
15648#include <fcntl.h>
15649#include <errno.h>
15650#ifdef HAVE_SYS_TYPES_H
15651#include <sys/types.h>
15652#endif
15653#ifdef HAVE_SYS_SOCKET_H
15654#include <sys/socket.h>
15655#endif
15656#ifdef HAVE_NETINET_IN_H
15657#include <netinet/in.h>
15658#endif
15659#ifdef HAVE_ARPA_INET_H
15660#include <arpa/inet.h>
15661#endif
15662#ifdef HAVE_UNISTD_H
15663#include <unistd.h>
15664#endif
15665#ifdef HAVE_TIME_H
15666#include <time.h>
15667#endif
15668
15669int main(void)
15670{
15671	int port;
15672	int sfd, cfd;
15673	int num = 10;
15674	int i, p;
15675	struct sockaddr_in a;
15676	/* test if select and nonblocking reads work well together */
15677	/* open port.
15678	   fork child to send 10 messages.
15679	   select to read.
15680	   then try to nonblocking read the 10 messages
15681	   then, nonblocking read must give EAGAIN
15682	*/
15683
15684	port = 12345 + (time(0)%32);
15685	sfd = socket(PF_INET, SOCK_DGRAM, 0);
15686	if(sfd == -1) {
15687		perror("socket");
15688		return 1;
15689	}
15690	memset(&a, 0, sizeof(a));
15691	a.sin_family = AF_INET;
15692	a.sin_port = htons(port);
15693	a.sin_addr.s_addr = inet_addr("127.0.0.1");
15694	if(bind(sfd, (struct sockaddr*)&a, sizeof(a)) < 0) {
15695		perror("bind");
15696		return 1;
15697	}
15698	if(fcntl(sfd, F_SETFL, O_NONBLOCK) == -1) {
15699		perror("fcntl");
15700		return 1;
15701	}
15702
15703	cfd = socket(PF_INET, SOCK_DGRAM, 0);
15704	if(cfd == -1) {
15705		perror("client socket");
15706		return 1;
15707	}
15708	a.sin_port = 0;
15709	if(bind(cfd, (struct sockaddr*)&a, sizeof(a)) < 0) {
15710		perror("client bind");
15711		return 1;
15712	}
15713	a.sin_port = htons(port);
15714
15715	/* no handler, causes exit in 10 seconds */
15716	alarm(10);
15717
15718	/* send and receive on the socket */
15719	if((p=fork()) == 0) {
15720		for(i=0; i<num; i++) {
15721			if(sendto(cfd, &i, sizeof(i), 0,
15722				(struct sockaddr*)&a, sizeof(a)) < 0) {
15723				perror("sendto");
15724				return 1;
15725			}
15726		}
15727	} else {
15728		/* parent */
15729		fd_set rset;
15730		int x;
15731		if(p == -1) {
15732			perror("fork");
15733			return 1;
15734		}
15735		FD_ZERO(&rset);
15736		FD_SET(sfd, &rset);
15737		if(select(sfd+1, &rset, NULL, NULL, NULL) < 1) {
15738			perror("select");
15739			return 1;
15740		}
15741		i = 0;
15742		while(i < num) {
15743			if(recv(sfd, &x, sizeof(x), 0) != sizeof(x)) {
15744				if(errno == EAGAIN)
15745					continue;
15746				perror("recv");
15747				return 1;
15748			}
15749			i++;
15750		}
15751		/* now we want to get EAGAIN: nonblocking goodness */
15752		errno = 0;
15753		recv(sfd, &x, sizeof(x), 0);
15754		if(errno != EAGAIN) {
15755			perror("trying to recv again");
15756			return 1;
15757		}
15758		/* EAGAIN encountered */
15759	}
15760
15761	close(sfd);
15762	close(cfd);
15763	return 0;
15764}
15765
15766_ACEOF
15767if ac_fn_c_try_run "$LINENO"; then :
15768
15769	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15770$as_echo "yes" >&6; }
15771
15772else
15773
15774	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15775$as_echo "no" >&6; }
15776
15777$as_echo "#define NONBLOCKING_IS_BROKEN 1" >>confdefs.h
15778
15779
15780fi
15781rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15782  conftest.$ac_objext conftest.beam conftest.$ac_ext
15783fi
15784
15785fi
15786
15787
15788{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mkdir has one arg" >&5
15789$as_echo_n "checking whether mkdir has one arg... " >&6; }
15790cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15791/* end confdefs.h.  */
15792
15793#include <stdio.h>
15794#include <unistd.h>
15795#ifdef HAVE_WINSOCK2_H
15796#include <winsock2.h>
15797#endif
15798#ifdef HAVE_SYS_STAT_H
15799#include <sys/stat.h>
15800#endif
15801
15802int
15803main ()
15804{
15805
15806	(void)mkdir("directory");
15807
15808  ;
15809  return 0;
15810}
15811_ACEOF
15812if ac_fn_c_try_compile "$LINENO"; then :
15813  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15814$as_echo "yes" >&6; }
15815
15816$as_echo "#define MKDIR_HAS_ONE_ARG 1" >>confdefs.h
15817
15818
15819else
15820  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15821$as_echo "no" >&6; }
15822
15823fi
15824rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15825
15826for ac_func in strptime
15827do :
15828  ac_fn_c_check_func "$LINENO" "strptime" "ac_cv_func_strptime"
15829if test "x$ac_cv_func_strptime" = xyes; then :
15830  cat >>confdefs.h <<_ACEOF
15831#define HAVE_STRPTIME 1
15832_ACEOF
15833
15834{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strptime works" >&5
15835$as_echo_n "checking whether strptime works... " >&6; }
15836if test c${cross_compiling} = cno; then
15837if test "$cross_compiling" = yes; then :
15838  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
15839$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
15840as_fn_error $? "cannot run test program while cross compiling
15841See \`config.log' for more details" "$LINENO" 5; }
15842else
15843  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15844/* end confdefs.h.  */
15845
15846#define _XOPEN_SOURCE 600
15847#include <time.h>
15848int main(void) { struct tm tm; char *res;
15849res = 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);
15850if (!res) return 2;
15851res = strptime("20070207111842", "%Y%m%d%H%M%S", &tm);
15852if (!res) return 1; return 0; }
15853
15854_ACEOF
15855if ac_fn_c_try_run "$LINENO"; then :
15856  eval "ac_cv_c_strptime_works=yes"
15857else
15858  eval "ac_cv_c_strptime_works=no"
15859fi
15860rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15861  conftest.$ac_objext conftest.beam conftest.$ac_ext
15862fi
15863
15864else
15865eval "ac_cv_c_strptime_works=maybe"
15866fi
15867{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_strptime_works" >&5
15868$as_echo "$ac_cv_c_strptime_works" >&6; }
15869if test $ac_cv_c_strptime_works = no; then
15870case " $LIBOBJS " in
15871  *" strptime.$ac_objext "* ) ;;
15872  *) LIBOBJS="$LIBOBJS strptime.$ac_objext"
15873 ;;
15874esac
15875
15876else
15877
15878cat >>confdefs.h <<_ACEOF
15879#define STRPTIME_WORKS 1
15880_ACEOF
15881
15882fi
15883
15884else
15885  case " $LIBOBJS " in
15886  *" strptime.$ac_objext "* ) ;;
15887  *) LIBOBJS="$LIBOBJS strptime.$ac_objext"
15888 ;;
15889esac
15890
15891fi
15892done
15893
15894
15895# set memory allocation checking if requested
15896# Check whether --enable-alloc-checks was given.
15897if test "${enable_alloc_checks+set}" = set; then :
15898  enableval=$enable_alloc_checks;
15899fi
15900
15901# Check whether --enable-alloc-lite was given.
15902if test "${enable_alloc_lite+set}" = set; then :
15903  enableval=$enable_alloc_lite;
15904fi
15905
15906# Check whether --enable-alloc-nonregional was given.
15907if test "${enable_alloc_nonregional+set}" = set; then :
15908  enableval=$enable_alloc_nonregional;
15909fi
15910
15911if test x_$enable_alloc_nonregional = x_yes; then
15912
15913$as_echo "#define UNBOUND_ALLOC_NONREGIONAL 1" >>confdefs.h
15914
15915fi
15916if test x_$enable_alloc_checks = x_yes; then
15917
15918$as_echo "#define UNBOUND_ALLOC_STATS 1" >>confdefs.h
15919
15920else
15921	if test x_$enable_alloc_lite = x_yes; then
15922
15923$as_echo "#define UNBOUND_ALLOC_LITE 1" >>confdefs.h
15924
15925	else
15926
15927	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible malloc" >&5
15928$as_echo_n "checking for GNU libc compatible malloc... " >&6; }
15929	if test "$cross_compiling" = yes; then :
15930  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no (crosscompile)" >&5
15931$as_echo "no (crosscompile)" >&6; }
15932	case " $LIBOBJS " in
15933  *" malloc.$ac_objext "* ) ;;
15934  *) LIBOBJS="$LIBOBJS malloc.$ac_objext"
15935 ;;
15936esac
15937
15938
15939cat >>confdefs.h <<_ACEOF
15940#define malloc rpl_malloc_unbound
15941_ACEOF
15942
15943else
15944  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15945/* end confdefs.h.  */
15946#if defined STDC_HEADERS || defined HAVE_STDLIB_H
15947#include <stdlib.h>
15948#else
15949char *malloc ();
15950#endif
15951
15952int
15953main ()
15954{
15955 if(malloc(0) != 0) return 1;
15956  ;
15957  return 0;
15958}
15959
15960_ACEOF
15961if ac_fn_c_try_run "$LINENO"; then :
15962  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15963$as_echo "no" >&6; }
15964	case " $LIBOBJS " in
15965  *" malloc.$ac_objext "* ) ;;
15966  *) LIBOBJS="$LIBOBJS malloc.$ac_objext"
15967 ;;
15968esac
15969
15970
15971cat >>confdefs.h <<_ACEOF
15972#define malloc rpl_malloc_unbound
15973_ACEOF
15974
15975else
15976  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15977$as_echo "yes" >&6; }
15978
15979$as_echo "#define HAVE_MALLOC 1" >>confdefs.h
15980
15981fi
15982rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15983  conftest.$ac_objext conftest.beam conftest.$ac_ext
15984fi
15985
15986
15987	fi
15988fi
15989
15990# check windows threads (we use them, not pthreads, on windows).
15991if test "$on_mingw" = "yes"; then
15992# check windows threads
15993	for ac_header in windows.h
15994do :
15995  ac_fn_c_check_header_compile "$LINENO" "windows.h" "ac_cv_header_windows_h" "$ac_includes_default
15996"
15997if test "x$ac_cv_header_windows_h" = xyes; then :
15998  cat >>confdefs.h <<_ACEOF
15999#define HAVE_WINDOWS_H 1
16000_ACEOF
16001
16002fi
16003
16004done
16005
16006	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for CreateThread" >&5
16007$as_echo_n "checking for CreateThread... " >&6; }
16008	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16009/* end confdefs.h.  */
16010
16011#ifdef HAVE_WINDOWS_H
16012#include <windows.h>
16013#endif
16014
16015int
16016main ()
16017{
16018
16019	HANDLE t = CreateThread(NULL, 0, NULL, NULL, 0, NULL);
16020
16021  ;
16022  return 0;
16023}
16024_ACEOF
16025if ac_fn_c_try_compile "$LINENO"; then :
16026  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16027$as_echo "yes" >&6; }
16028
16029$as_echo "#define HAVE_WINDOWS_THREADS 1" >>confdefs.h
16030
16031
16032else
16033  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16034$as_echo "no" >&6; }
16035
16036fi
16037rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16038
16039else
16040# not on mingw, check thread libraries.
16041
16042# check for thread library.
16043# check this first, so that the pthread lib does not get linked in via
16044# libssl or libpython, and thus distorts the tests, and we end up using
16045# the non-threadsafe C libraries.
16046
16047# Check whether --with-pthreads was given.
16048if test "${with_pthreads+set}" = set; then :
16049  withval=$with_pthreads;
16050else
16051   withval="yes"
16052fi
16053
16054ub_have_pthreads=no
16055if test x_$withval != x_no; then
16056
16057
16058ac_ext=c
16059ac_cpp='$CPP $CPPFLAGS'
16060ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16061ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16062ac_compiler_gnu=$ac_cv_c_compiler_gnu
16063
16064ax_pthread_ok=no
16065
16066# We used to check for pthread.h first, but this fails if pthread.h
16067# requires special compiler flags (e.g. on True64 or Sequent).
16068# It gets checked for in the link test anyway.
16069
16070# First of all, check if the user has set any of the PTHREAD_LIBS,
16071# etcetera environment variables, and if threads linking works using
16072# them:
16073if test x"$PTHREAD_LIBS$PTHREAD_CFLAGS" != x; then
16074        save_CFLAGS="$CFLAGS"
16075        CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
16076        save_LIBS="$LIBS"
16077        LIBS="$PTHREAD_LIBS $LIBS"
16078        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS" >&5
16079$as_echo_n "checking for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS... " >&6; }
16080        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16081/* end confdefs.h.  */
16082
16083/* Override any GCC internal prototype to avoid an error.
16084   Use char because int might match the return type of a GCC
16085   builtin and then its argument prototype would still apply.  */
16086#ifdef __cplusplus
16087extern "C"
16088#endif
16089char pthread_join ();
16090int
16091main ()
16092{
16093return pthread_join ();
16094  ;
16095  return 0;
16096}
16097_ACEOF
16098if ac_fn_c_try_link "$LINENO"; then :
16099  ax_pthread_ok=yes
16100fi
16101rm -f core conftest.err conftest.$ac_objext \
16102    conftest$ac_exeext conftest.$ac_ext
16103        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
16104$as_echo "$ax_pthread_ok" >&6; }
16105        if test x"$ax_pthread_ok" = xno; then
16106                PTHREAD_LIBS=""
16107                PTHREAD_CFLAGS=""
16108        fi
16109        LIBS="$save_LIBS"
16110        CFLAGS="$save_CFLAGS"
16111fi
16112
16113# We must check for the threads library under a number of different
16114# names; the ordering is very important because some systems
16115# (e.g. DEC) have both -lpthread and -lpthreads, where one of the
16116# libraries is broken (non-POSIX).
16117
16118# Create a list of thread flags to try.  Items starting with a "-" are
16119# C compiler flags, and other items are library names, except for "none"
16120# which indicates that we try without any flags at all, and "pthread-config"
16121# which is a program returning the flags for the Pth emulation library.
16122
16123ax_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config"
16124
16125# The ordering *is* (sometimes) important.  Some notes on the
16126# individual items follow:
16127
16128# pthreads: AIX (must check this before -lpthread)
16129# none: in case threads are in libc; should be tried before -Kthread and
16130#       other compiler flags to prevent continual compiler warnings
16131# -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h)
16132# -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
16133# lthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
16134# -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads)
16135# -pthreads: Solaris/gcc
16136# -mthreads: Mingw32/gcc, Lynx/gcc
16137# -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
16138#      doesn't hurt to check since this sometimes defines pthreads too;
16139#      also defines -D_REENTRANT)
16140#      ... -mt is also the pthreads flag for HP/aCC
16141# pthread: Linux, etcetera
16142# --thread-safe: KAI C++
16143# pthread-config: use pthread-config program (for GNU Pth library)
16144
16145case ${host_os} in
16146        solaris*)
16147
16148        # On Solaris (at least, for some versions), libc contains stubbed
16149        # (non-functional) versions of the pthreads routines, so link-based
16150        # tests will erroneously succeed.  (We need to link with -pthreads/-mt/
16151        # -lpthread.)  (The stubs are missing pthread_cleanup_push, or rather
16152        # a function called by this macro, so we could check for that, but
16153        # who knows whether they'll stub that too in a future libc.)  So,
16154        # we'll just look for -pthreads and -lpthread first:
16155
16156        ax_pthread_flags="-pthreads pthread -mt -pthread $ax_pthread_flags"
16157        ;;
16158
16159        darwin*)
16160        ax_pthread_flags="-pthread $ax_pthread_flags"
16161        ;;
16162esac
16163
16164# Clang doesn't consider unrecognized options an error unless we specify
16165# -Werror. We throw in some extra Clang-specific options to ensure that
16166# this doesn't happen for GCC, which also accepts -Werror.
16167
16168{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler needs -Werror to reject unknown flags" >&5
16169$as_echo_n "checking if compiler needs -Werror to reject unknown flags... " >&6; }
16170save_CFLAGS="$CFLAGS"
16171ax_pthread_extra_flags="-Werror"
16172CFLAGS="$CFLAGS $ax_pthread_extra_flags -Wunknown-warning-option -Wsizeof-array-argument"
16173cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16174/* end confdefs.h.  */
16175int foo(void);
16176int
16177main ()
16178{
16179foo()
16180  ;
16181  return 0;
16182}
16183_ACEOF
16184if ac_fn_c_try_compile "$LINENO"; then :
16185  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16186$as_echo "yes" >&6; }
16187else
16188  ax_pthread_extra_flags=
16189                   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16190$as_echo "no" >&6; }
16191fi
16192rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16193CFLAGS="$save_CFLAGS"
16194
16195if test x"$ax_pthread_ok" = xno; then
16196for flag in $ax_pthread_flags; do
16197
16198        case $flag in
16199                none)
16200                { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work without any flags" >&5
16201$as_echo_n "checking whether pthreads work without any flags... " >&6; }
16202                ;;
16203
16204                -*)
16205                { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with $flag" >&5
16206$as_echo_n "checking whether pthreads work with $flag... " >&6; }
16207                PTHREAD_CFLAGS="$flag"
16208                ;;
16209
16210                pthread-config)
16211                # Extract the first word of "pthread-config", so it can be a program name with args.
16212set dummy pthread-config; ac_word=$2
16213{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16214$as_echo_n "checking for $ac_word... " >&6; }
16215if ${ac_cv_prog_ax_pthread_config+:} false; then :
16216  $as_echo_n "(cached) " >&6
16217else
16218  if test -n "$ax_pthread_config"; then
16219  ac_cv_prog_ax_pthread_config="$ax_pthread_config" # Let the user override the test.
16220else
16221as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16222for as_dir in $PATH
16223do
16224  IFS=$as_save_IFS
16225  test -z "$as_dir" && as_dir=.
16226    for ac_exec_ext in '' $ac_executable_extensions; do
16227  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16228    ac_cv_prog_ax_pthread_config="yes"
16229    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16230    break 2
16231  fi
16232done
16233  done
16234IFS=$as_save_IFS
16235
16236  test -z "$ac_cv_prog_ax_pthread_config" && ac_cv_prog_ax_pthread_config="no"
16237fi
16238fi
16239ax_pthread_config=$ac_cv_prog_ax_pthread_config
16240if test -n "$ax_pthread_config"; then
16241  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_config" >&5
16242$as_echo "$ax_pthread_config" >&6; }
16243else
16244  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16245$as_echo "no" >&6; }
16246fi
16247
16248
16249                if test x"$ax_pthread_config" = xno; then continue; fi
16250                PTHREAD_CFLAGS="`pthread-config --cflags`"
16251                PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`"
16252                ;;
16253
16254                *)
16255                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the pthreads library -l$flag" >&5
16256$as_echo_n "checking for the pthreads library -l$flag... " >&6; }
16257                PTHREAD_LIBS="-l$flag"
16258                ;;
16259        esac
16260
16261        save_LIBS="$LIBS"
16262        save_CFLAGS="$CFLAGS"
16263        LIBS="$PTHREAD_LIBS $LIBS"
16264        CFLAGS="$CFLAGS $PTHREAD_CFLAGS $ax_pthread_extra_flags"
16265
16266        # Check for various functions.  We must include pthread.h,
16267        # since some functions may be macros.  (On the Sequent, we
16268        # need a special flag -Kthread to make this header compile.)
16269        # We check for pthread_join because it is in -lpthread on IRIX
16270        # while pthread_create is in libc.  We check for pthread_attr_init
16271        # due to DEC craziness with -lpthreads.  We check for
16272        # pthread_cleanup_push because it is one of the few pthread
16273        # functions on Solaris that doesn't have a non-functional libc stub.
16274        # We try pthread_create on general principles.
16275        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16276/* end confdefs.h.  */
16277#include <pthread.h>
16278                        static void routine(void *a) { *((int*)a) = 0; }
16279                        static void *start_routine(void *a) { return a; }
16280int
16281main ()
16282{
16283pthread_t th; pthread_attr_t attr;
16284                        pthread_create(&th, 0, start_routine, 0);
16285                        pthread_join(th, 0);
16286                        pthread_attr_init(&attr);
16287                        pthread_cleanup_push(routine, 0);
16288                        pthread_cleanup_pop(0) /* ; */
16289  ;
16290  return 0;
16291}
16292_ACEOF
16293if ac_fn_c_try_link "$LINENO"; then :
16294  ax_pthread_ok=yes
16295fi
16296rm -f core conftest.err conftest.$ac_objext \
16297    conftest$ac_exeext conftest.$ac_ext
16298
16299        LIBS="$save_LIBS"
16300        CFLAGS="$save_CFLAGS"
16301
16302        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
16303$as_echo "$ax_pthread_ok" >&6; }
16304        if test "x$ax_pthread_ok" = xyes; then
16305                break;
16306        fi
16307
16308        PTHREAD_LIBS=""
16309        PTHREAD_CFLAGS=""
16310done
16311fi
16312
16313# Various other checks:
16314if test "x$ax_pthread_ok" = xyes; then
16315        save_LIBS="$LIBS"
16316        LIBS="$PTHREAD_LIBS $LIBS"
16317        save_CFLAGS="$CFLAGS"
16318        CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
16319
16320        # Detect AIX lossage: JOINABLE attribute is called UNDETACHED.
16321        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for joinable pthread attribute" >&5
16322$as_echo_n "checking for joinable pthread attribute... " >&6; }
16323        attr_name=unknown
16324        for attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do
16325            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16326/* end confdefs.h.  */
16327#include <pthread.h>
16328int
16329main ()
16330{
16331int attr = $attr; return attr /* ; */
16332  ;
16333  return 0;
16334}
16335_ACEOF
16336if ac_fn_c_try_link "$LINENO"; then :
16337  attr_name=$attr; break
16338fi
16339rm -f core conftest.err conftest.$ac_objext \
16340    conftest$ac_exeext conftest.$ac_ext
16341        done
16342        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $attr_name" >&5
16343$as_echo "$attr_name" >&6; }
16344        if test "$attr_name" != PTHREAD_CREATE_JOINABLE; then
16345
16346cat >>confdefs.h <<_ACEOF
16347#define PTHREAD_CREATE_JOINABLE $attr_name
16348_ACEOF
16349
16350        fi
16351
16352        { $as_echo "$as_me:${as_lineno-$LINENO}: checking if more special flags are required for pthreads" >&5
16353$as_echo_n "checking if more special flags are required for pthreads... " >&6; }
16354        flag=no
16355        case ${host_os} in
16356            aix* | freebsd* | darwin*) flag="-D_THREAD_SAFE";;
16357            osf* | hpux*) flag="-D_REENTRANT";;
16358            solaris*)
16359            if test "$GCC" = "yes"; then
16360                flag="-D_REENTRANT"
16361            else
16362                # TODO: What about Clang on Solaris?
16363                flag="-mt -D_REENTRANT"
16364            fi
16365            ;;
16366        esac
16367        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $flag" >&5
16368$as_echo "$flag" >&6; }
16369        if test "x$flag" != xno; then
16370            PTHREAD_CFLAGS="$flag $PTHREAD_CFLAGS"
16371        fi
16372
16373        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTHREAD_PRIO_INHERIT" >&5
16374$as_echo_n "checking for PTHREAD_PRIO_INHERIT... " >&6; }
16375if ${ax_cv_PTHREAD_PRIO_INHERIT+:} false; then :
16376  $as_echo_n "(cached) " >&6
16377else
16378
16379                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16380/* end confdefs.h.  */
16381#include <pthread.h>
16382int
16383main ()
16384{
16385int i = PTHREAD_PRIO_INHERIT;
16386  ;
16387  return 0;
16388}
16389_ACEOF
16390if ac_fn_c_try_link "$LINENO"; then :
16391  ax_cv_PTHREAD_PRIO_INHERIT=yes
16392else
16393  ax_cv_PTHREAD_PRIO_INHERIT=no
16394fi
16395rm -f core conftest.err conftest.$ac_objext \
16396    conftest$ac_exeext conftest.$ac_ext
16397
16398fi
16399{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_PRIO_INHERIT" >&5
16400$as_echo "$ax_cv_PTHREAD_PRIO_INHERIT" >&6; }
16401        if test "x$ax_cv_PTHREAD_PRIO_INHERIT" = "xyes"; then :
16402
16403$as_echo "#define HAVE_PTHREAD_PRIO_INHERIT 1" >>confdefs.h
16404
16405fi
16406
16407        LIBS="$save_LIBS"
16408        CFLAGS="$save_CFLAGS"
16409
16410        # More AIX lossage: compile with *_r variant
16411        if test "x$GCC" != xyes; then
16412            case $host_os in
16413                aix*)
16414                case "x/$CC" in #(
16415  x*/c89|x*/c89_128|x*/c99|x*/c99_128|x*/cc|x*/cc128|x*/xlc|x*/xlc_v6|x*/xlc128|x*/xlc128_v6) :
16416    #handle absolute path differently from PATH based program lookup
16417                   case "x$CC" in #(
16418  x/*) :
16419    if as_fn_executable_p ${CC}_r; then :
16420  PTHREAD_CC="${CC}_r"
16421fi ;; #(
16422  *) :
16423    for ac_prog in ${CC}_r
16424do
16425  # Extract the first word of "$ac_prog", so it can be a program name with args.
16426set dummy $ac_prog; ac_word=$2
16427{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16428$as_echo_n "checking for $ac_word... " >&6; }
16429if ${ac_cv_prog_PTHREAD_CC+:} false; then :
16430  $as_echo_n "(cached) " >&6
16431else
16432  if test -n "$PTHREAD_CC"; then
16433  ac_cv_prog_PTHREAD_CC="$PTHREAD_CC" # Let the user override the test.
16434else
16435as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16436for as_dir in $PATH
16437do
16438  IFS=$as_save_IFS
16439  test -z "$as_dir" && as_dir=.
16440    for ac_exec_ext in '' $ac_executable_extensions; do
16441  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16442    ac_cv_prog_PTHREAD_CC="$ac_prog"
16443    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16444    break 2
16445  fi
16446done
16447  done
16448IFS=$as_save_IFS
16449
16450fi
16451fi
16452PTHREAD_CC=$ac_cv_prog_PTHREAD_CC
16453if test -n "$PTHREAD_CC"; then
16454  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTHREAD_CC" >&5
16455$as_echo "$PTHREAD_CC" >&6; }
16456else
16457  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16458$as_echo "no" >&6; }
16459fi
16460
16461
16462  test -n "$PTHREAD_CC" && break
16463done
16464test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
16465 ;;
16466esac ;; #(
16467  *) :
16468     ;;
16469esac
16470                ;;
16471            esac
16472        fi
16473fi
16474
16475test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
16476
16477
16478
16479
16480
16481# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
16482if test x"$ax_pthread_ok" = xyes; then
16483
16484
16485$as_echo "#define HAVE_PTHREAD 1" >>confdefs.h
16486
16487		if test -n "$PTHREAD_LIBS"; then
16488		  LIBS="$PTHREAD_LIBS $LIBS"
16489		fi
16490		CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
16491		CC="$PTHREAD_CC"
16492		ub_have_pthreads=yes
16493		ac_fn_c_check_type "$LINENO" "pthread_spinlock_t" "ac_cv_type_pthread_spinlock_t" "#include <pthread.h>
16494"
16495if test "x$ac_cv_type_pthread_spinlock_t" = xyes; then :
16496
16497cat >>confdefs.h <<_ACEOF
16498#define HAVE_PTHREAD_SPINLOCK_T 1
16499_ACEOF
16500
16501
16502fi
16503ac_fn_c_check_type "$LINENO" "pthread_rwlock_t" "ac_cv_type_pthread_rwlock_t" "#include <pthread.h>
16504"
16505if test "x$ac_cv_type_pthread_rwlock_t" = xyes; then :
16506
16507cat >>confdefs.h <<_ACEOF
16508#define HAVE_PTHREAD_RWLOCK_T 1
16509_ACEOF
16510
16511
16512fi
16513
16514
16515		if echo "$CFLAGS" | $GREP -e "-pthread" >/dev/null; then
16516		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if -pthread unused during linking" >&5
16517$as_echo_n "checking if -pthread unused during linking... " >&6; }
16518		# catch clang warning 'argument unused during compilation'
16519		cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16520/* end confdefs.h.  */
16521$ac_includes_default
16522
16523int main(void) {return 0;}
16524
16525_ACEOF
16526		pthread_unused="yes"
16527		# first compile
16528		echo "$CC $CFLAGS -c conftest.c -o conftest.o" >&5
16529		$CC $CFLAGS -c conftest.c -o conftest.o 2>&5 >&5
16530		if test $? = 0; then
16531			# then link
16532			echo "$CC $CFLAGS -Werror $LDFLAGS $LIBS -o conftest contest.o" >&5
16533			$CC $CFLAGS -Werror $LDFLAGS $LIBS -o conftest conftest.o 2>&5 >&5
16534			if test $? -ne 0; then
16535				{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16536$as_echo "yes" >&6; }
16537				CFLAGS=`echo "$CFLAGS" | sed -e 's/-pthread//'`
16538				PTHREAD_CFLAGS_ONLY="-pthread"
16539
16540			else
16541				{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16542$as_echo "no" >&6; }
16543			fi
16544		else
16545			{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16546$as_echo "no" >&6; }
16547		fi # endif cc successful
16548		rm -f conftest conftest.c conftest.o
16549		fi # endif -pthread in CFLAGS
16550
16551
16552        :
16553else
16554        ax_pthread_ok=no
16555
16556fi
16557ac_ext=c
16558ac_cpp='$CPP $CPPFLAGS'
16559ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16560ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16561ac_compiler_gnu=$ac_cv_c_compiler_gnu
16562
16563
16564fi
16565
16566# check solaris thread library
16567
16568# Check whether --with-solaris-threads was given.
16569if test "${with_solaris_threads+set}" = set; then :
16570  withval=$with_solaris_threads;
16571else
16572   withval="no"
16573fi
16574
16575ub_have_sol_threads=no
16576if test x_$withval != x_no; then
16577	if test x_$ub_have_pthreads != x_no; then
16578	    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Have pthreads already, ignoring --with-solaris-threads" >&5
16579$as_echo "$as_me: WARNING: Have pthreads already, ignoring --with-solaris-threads" >&2;}
16580	else
16581	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing thr_create" >&5
16582$as_echo_n "checking for library containing thr_create... " >&6; }
16583if ${ac_cv_search_thr_create+:} false; then :
16584  $as_echo_n "(cached) " >&6
16585else
16586  ac_func_search_save_LIBS=$LIBS
16587cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16588/* end confdefs.h.  */
16589
16590/* Override any GCC internal prototype to avoid an error.
16591   Use char because int might match the return type of a GCC
16592   builtin and then its argument prototype would still apply.  */
16593#ifdef __cplusplus
16594extern "C"
16595#endif
16596char thr_create ();
16597int
16598main ()
16599{
16600return thr_create ();
16601  ;
16602  return 0;
16603}
16604_ACEOF
16605for ac_lib in '' thread; do
16606  if test -z "$ac_lib"; then
16607    ac_res="none required"
16608  else
16609    ac_res=-l$ac_lib
16610    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
16611  fi
16612  if ac_fn_c_try_link "$LINENO"; then :
16613  ac_cv_search_thr_create=$ac_res
16614fi
16615rm -f core conftest.err conftest.$ac_objext \
16616    conftest$ac_exeext
16617  if ${ac_cv_search_thr_create+:} false; then :
16618  break
16619fi
16620done
16621if ${ac_cv_search_thr_create+:} false; then :
16622
16623else
16624  ac_cv_search_thr_create=no
16625fi
16626rm conftest.$ac_ext
16627LIBS=$ac_func_search_save_LIBS
16628fi
16629{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_thr_create" >&5
16630$as_echo "$ac_cv_search_thr_create" >&6; }
16631ac_res=$ac_cv_search_thr_create
16632if test "$ac_res" != no; then :
16633  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
16634
16635
16636$as_echo "#define HAVE_SOLARIS_THREADS 1" >>confdefs.h
16637
16638
16639
16640
16641{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -mt" >&5
16642$as_echo_n "checking whether $CC supports -mt... " >&6; }
16643cache=`echo mt | sed 'y%.=/+-%___p_%'`
16644if eval \${cv_prog_cc_flag_$cache+:} false; then :
16645  $as_echo_n "(cached) " >&6
16646else
16647
16648echo 'void f(void){}' >conftest.c
16649if test -z "`$CC $CPPFLAGS $CFLAGS -mt -c conftest.c 2>&1`"; then
16650eval "cv_prog_cc_flag_$cache=yes"
16651else
16652eval "cv_prog_cc_flag_$cache=no"
16653fi
16654rm -f conftest conftest.o conftest.c
16655
16656fi
16657
16658if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
16659{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16660$as_echo "yes" >&6; }
16661:
16662CFLAGS="$CFLAGS -mt"
16663else
16664{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16665$as_echo "no" >&6; }
16666:
16667CFLAGS="$CFLAGS -D_REENTRANT"
16668fi
16669
16670		ub_have_sol_threads=yes
16671
16672else
16673
16674		as_fn_error $? "no solaris threads found." "$LINENO" 5
16675
16676fi
16677
16678	fi
16679fi
16680
16681fi # end of non-mingw check of thread libraries
16682
16683# Check for PyUnbound
16684
16685# Check whether --with-pyunbound was given.
16686if test "${with_pyunbound+set}" = set; then :
16687  withval=$with_pyunbound;
16688else
16689   withval="no"
16690fi
16691
16692
16693ub_test_python=no
16694ub_with_pyunbound=no
16695if test x_$withval != x_no; then
16696   ub_with_pyunbound=yes
16697   ub_test_python=yes
16698fi
16699
16700# Check for Python module
16701
16702# Check whether --with-pythonmodule was given.
16703if test "${with_pythonmodule+set}" = set; then :
16704  withval=$with_pythonmodule;
16705else
16706   withval="no"
16707fi
16708
16709
16710ub_with_pythonmod=no
16711if test x_$withval != x_no; then
16712   ub_with_pythonmod=yes
16713   ub_test_python=yes
16714fi
16715
16716# Check for Python & SWIG only on PyUnbound or PyModule
16717if test x_$ub_test_python != x_no; then
16718
16719   # Check for Python
16720   ub_have_python=no
16721   ac_save_LIBS="$LIBS"
16722        #
16723        # Allow the use of a (user set) custom python version
16724        #
16725
16726
16727        # Extract the first word of "python[$PYTHON_VERSION]", so it can be a program name with args.
16728set dummy python$PYTHON_VERSION; ac_word=$2
16729{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16730$as_echo_n "checking for $ac_word... " >&6; }
16731if ${ac_cv_path_PYTHON+:} false; then :
16732  $as_echo_n "(cached) " >&6
16733else
16734  case $PYTHON in
16735  [\\/]* | ?:[\\/]*)
16736  ac_cv_path_PYTHON="$PYTHON" # Let the user override the test with a path.
16737  ;;
16738  *)
16739  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16740for as_dir in $PATH
16741do
16742  IFS=$as_save_IFS
16743  test -z "$as_dir" && as_dir=.
16744    for ac_exec_ext in '' $ac_executable_extensions; do
16745  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16746    ac_cv_path_PYTHON="$as_dir/$ac_word$ac_exec_ext"
16747    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16748    break 2
16749  fi
16750done
16751  done
16752IFS=$as_save_IFS
16753
16754  ;;
16755esac
16756fi
16757PYTHON=$ac_cv_path_PYTHON
16758if test -n "$PYTHON"; then
16759  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5
16760$as_echo "$PYTHON" >&6; }
16761else
16762  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16763$as_echo "no" >&6; }
16764fi
16765
16766
16767        if test -z "$PYTHON"; then
16768           as_fn_error $? "Cannot find python$PYTHON_VERSION in your system path" "$LINENO" 5
16769           PYTHON_VERSION=""
16770        fi
16771
16772        if test -z "$PYTHON_VERSION"; then
16773		PYTHON_VERSION=`$PYTHON -c "import sys; \
16774			print(sys.version.split()[0])"`
16775	fi
16776
16777        #
16778        # Check if you have distutils, else fail
16779        #
16780        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the distutils Python package" >&5
16781$as_echo_n "checking for the distutils Python package... " >&6; }
16782        if ac_distutils_result=`$PYTHON -c "import distutils" 2>&1`; then
16783                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16784$as_echo "yes" >&6; }
16785        else
16786                { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16787$as_echo "no" >&6; }
16788                as_fn_error $? "cannot import Python module \"distutils\".
16789Please check your Python installation. The error was:
16790$ac_distutils_result" "$LINENO" 5
16791                PYTHON_VERSION=""
16792        fi
16793
16794        #
16795        # Check for Python include path
16796        #
16797        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Python include path" >&5
16798$as_echo_n "checking for Python include path... " >&6; }
16799        if test -z "$PYTHON_CPPFLAGS"; then
16800                python_path=`$PYTHON -c "import distutils.sysconfig; \
16801                        print(distutils.sysconfig.get_python_inc());"`
16802                if test -n "${python_path}"; then
16803                        python_path="-I$python_path"
16804                fi
16805                PYTHON_CPPFLAGS=$python_path
16806        fi
16807        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON_CPPFLAGS" >&5
16808$as_echo "$PYTHON_CPPFLAGS" >&6; }
16809
16810
16811        #
16812        # Check for Python library path
16813        #
16814        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Python library path" >&5
16815$as_echo_n "checking for Python library path... " >&6; }
16816        if test -z "$PYTHON_LDFLAGS"; then
16817                PYTHON_LDFLAGS=`$PYTHON -c "from distutils.sysconfig import *; \
16818                        print('-L'+get_config_var('LIBDIR')+' -L'+get_config_var('LIBDEST')+' '+get_config_var('BLDLIBRARY'));"`
16819        fi
16820        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON_LDFLAGS" >&5
16821$as_echo "$PYTHON_LDFLAGS" >&6; }
16822
16823
16824        #
16825        # Check for site packages
16826        #
16827        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Python site-packages path" >&5
16828$as_echo_n "checking for Python site-packages path... " >&6; }
16829        if test -z "$PYTHON_SITE_PKG"; then
16830                PYTHON_SITE_PKG=`$PYTHON -c "import distutils.sysconfig; \
16831                        print(distutils.sysconfig.get_python_lib(1,0));"`
16832        fi
16833        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON_SITE_PKG" >&5
16834$as_echo "$PYTHON_SITE_PKG" >&6; }
16835
16836
16837        #
16838        # final check to see if everything compiles alright
16839        #
16840        { $as_echo "$as_me:${as_lineno-$LINENO}: checking consistency of all components of python development environment" >&5
16841$as_echo_n "checking consistency of all components of python development environment... " >&6; }
16842        ac_ext=c
16843ac_cpp='$CPP $CPPFLAGS'
16844ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16845ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16846ac_compiler_gnu=$ac_cv_c_compiler_gnu
16847
16848        # save current global flags
16849        ac_save_LIBS="$LIBS"
16850        ac_save_CPPFLAGS="$CPPFLAGS"
16851
16852        LIBS="$LIBS $PYTHON_LDFLAGS"
16853        CPPFLAGS="$CPPFLAGS $PYTHON_CPPFLAGS"
16854        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16855/* end confdefs.h.  */
16856
16857                #include <Python.h>
16858
16859int
16860main ()
16861{
16862
16863                Py_Initialize();
16864
16865  ;
16866  return 0;
16867}
16868_ACEOF
16869if ac_fn_c_try_link "$LINENO"; then :
16870  pythonexists=yes
16871else
16872  pythonexists=no
16873fi
16874rm -f core conftest.err conftest.$ac_objext \
16875    conftest$ac_exeext conftest.$ac_ext
16876
16877        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pythonexists" >&5
16878$as_echo "$pythonexists" >&6; }
16879
16880        if test ! "$pythonexists" = "yes"; then
16881           as_fn_error $? "
16882  Could not link test program to Python. Maybe the main Python library has been
16883  installed in some non-standard library path. If so, pass it to configure,
16884  via the LDFLAGS environment variable.
16885  Example: ./configure LDFLAGS=\"-L/usr/non-standard-path/python/lib\"
16886  ============================================================================
16887   ERROR!
16888   You probably have to install the development version of the Python package
16889   for your distribution.  The exact name of this package varies among them.
16890  ============================================================================
16891           " "$LINENO" 5
16892          PYTHON_VERSION=""
16893        fi
16894        ac_ext=c
16895ac_cpp='$CPP $CPPFLAGS'
16896ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16897ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16898ac_compiler_gnu=$ac_cv_c_compiler_gnu
16899
16900        # turn back to default flags
16901        CPPFLAGS="$ac_save_CPPFLAGS"
16902        LIBS="$ac_save_LIBS"
16903
16904        #
16905        # all done!
16906        #
16907
16908   if test ! -z "$PYTHON_VERSION"; then
16909	if test `$PYTHON -c "print('$PYTHON_VERSION' >= '2.4.0')"` = "False"; then
16910		as_fn_error $? "Python version >= 2.4.0 is required" "$LINENO" 5
16911	fi
16912
16913      PY_MAJOR_VERSION="`$PYTHON -c \"import sys; print(sys.version_info[0])\"`"
16914
16915      # Have Python
16916
16917$as_echo "#define HAVE_PYTHON 1" >>confdefs.h
16918
16919      if test -n "$LIBS"; then
16920        LIBS="$PYTHON_LDFLAGS $LIBS"
16921      else
16922        LIBS="$PYTHON_LDFLAGS"
16923      fi
16924      if test -n "$CPPFLAGS"; then
16925        CPPFLAGS="$CPPFLAGS $PYTHON_CPPFLAGS"
16926      else
16927        CPPFLAGS="$PYTHON_CPPFLAGS"
16928      fi
16929      ub_have_python=yes
16930      PC_PY_DEPENDENCY="python"
16931
16932
16933      # Check for SWIG
16934      ub_have_swig=no
16935      # Check whether --enable-swig-version-check was given.
16936if test "${enable_swig_version_check+set}" = set; then :
16937  enableval=$enable_swig_version_check;
16938fi
16939
16940      if test "$enable_swig_version_check" = "yes"; then
16941
16942        # Extract the first word of "swig", so it can be a program name with args.
16943set dummy swig; ac_word=$2
16944{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16945$as_echo_n "checking for $ac_word... " >&6; }
16946if ${ac_cv_path_SWIG+:} false; then :
16947  $as_echo_n "(cached) " >&6
16948else
16949  case $SWIG in
16950  [\\/]* | ?:[\\/]*)
16951  ac_cv_path_SWIG="$SWIG" # Let the user override the test with a path.
16952  ;;
16953  *)
16954  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16955for as_dir in $PATH
16956do
16957  IFS=$as_save_IFS
16958  test -z "$as_dir" && as_dir=.
16959    for ac_exec_ext in '' $ac_executable_extensions; do
16960  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16961    ac_cv_path_SWIG="$as_dir/$ac_word$ac_exec_ext"
16962    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16963    break 2
16964  fi
16965done
16966  done
16967IFS=$as_save_IFS
16968
16969  ;;
16970esac
16971fi
16972SWIG=$ac_cv_path_SWIG
16973if test -n "$SWIG"; then
16974  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SWIG" >&5
16975$as_echo "$SWIG" >&6; }
16976else
16977  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16978$as_echo "no" >&6; }
16979fi
16980
16981
16982        if test -z "$SWIG" ; then
16983                { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot find 'swig' program. You should look at http://www.swig.org" >&5
16984$as_echo "$as_me: WARNING: cannot find 'swig' program. You should look at http://www.swig.org" >&2;}
16985                SWIG='echo "Error: SWIG is not installed. You should look at http://www.swig.org" ; false'
16986        elif test -n "2.0.1" ; then
16987                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SWIG version" >&5
16988$as_echo_n "checking for SWIG version... " >&6; }
16989                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'`
16990                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $swig_version" >&5
16991$as_echo "$swig_version" >&6; }
16992                if test -n "$swig_version" ; then
16993                        # Calculate the required version number components
16994                        required=2.0.1
16995                        required_major=`echo $required | sed 's/[^0-9].*//'`
16996                        if test -z "$required_major" ; then
16997                                required_major=0
16998                        fi
16999                        required=`echo $required | sed 's/[0-9]*[^0-9]//'`
17000                        required_minor=`echo $required | sed 's/[^0-9].*//'`
17001                        if test -z "$required_minor" ; then
17002                                required_minor=0
17003                        fi
17004                        required=`echo $required | sed 's/[0-9]*[^0-9]//'`
17005                        required_patch=`echo $required | sed 's/[^0-9].*//'`
17006                        if test -z "$required_patch" ; then
17007                                required_patch=0
17008                        fi
17009                        # Calculate the available version number components
17010                        available=$swig_version
17011                        available_major=`echo $available | sed 's/[^0-9].*//'`
17012                        if test -z "$available_major" ; then
17013                                available_major=0
17014                        fi
17015                        available=`echo $available | sed 's/[0-9]*[^0-9]//'`
17016                        available_minor=`echo $available | sed 's/[^0-9].*//'`
17017                        if test -z "$available_minor" ; then
17018                                available_minor=0
17019                        fi
17020                        available=`echo $available | sed 's/[0-9]*[^0-9]//'`
17021                        available_patch=`echo $available | sed 's/[^0-9].*//'`
17022                        if test -z "$available_patch" ; then
17023                                available_patch=0
17024                        fi
17025			badversion=0
17026			if test $available_major -lt $required_major ; then
17027				badversion=1
17028			fi
17029                        if test $available_major -eq $required_major \
17030                                -a $available_minor -lt $required_minor ; then
17031				badversion=1
17032			fi
17033                        if test $available_major -eq $required_major \
17034                                -a $available_minor -eq $required_minor \
17035                                -a $available_patch -lt $required_patch ; then
17036				badversion=1
17037			fi
17038			if test $badversion -eq 1 ; then
17039                                { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: SWIG version >= 2.0.1 is required.  You have $swig_version.  You should look at http://www.swig.org" >&5
17040$as_echo "$as_me: WARNING: SWIG version >= 2.0.1 is required.  You have $swig_version.  You should look at http://www.swig.org" >&2;}
17041                                SWIG='echo "Error: SWIG version >= 2.0.1 is required.  You have '"$swig_version"'.  You should look at http://www.swig.org" ; false'
17042                        else
17043                                { $as_echo "$as_me:${as_lineno-$LINENO}: SWIG executable is '$SWIG'" >&5
17044$as_echo "$as_me: SWIG executable is '$SWIG'" >&6;}
17045                                SWIG_LIB=`$SWIG -swiglib`
17046                                { $as_echo "$as_me:${as_lineno-$LINENO}: SWIG library directory is '$SWIG_LIB'" >&5
17047$as_echo "$as_me: SWIG library directory is '$SWIG_LIB'" >&6;}
17048                        fi
17049                else
17050                        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot determine SWIG version" >&5
17051$as_echo "$as_me: WARNING: cannot determine SWIG version" >&2;}
17052                        SWIG='echo "Error: Cannot determine SWIG version.  You should look at http://www.swig.org" ; false'
17053                fi
17054        fi
17055
17056
17057      else
17058
17059        # Extract the first word of "swig", so it can be a program name with args.
17060set dummy swig; ac_word=$2
17061{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17062$as_echo_n "checking for $ac_word... " >&6; }
17063if ${ac_cv_path_SWIG+:} false; then :
17064  $as_echo_n "(cached) " >&6
17065else
17066  case $SWIG in
17067  [\\/]* | ?:[\\/]*)
17068  ac_cv_path_SWIG="$SWIG" # Let the user override the test with a path.
17069  ;;
17070  *)
17071  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17072for as_dir in $PATH
17073do
17074  IFS=$as_save_IFS
17075  test -z "$as_dir" && as_dir=.
17076    for ac_exec_ext in '' $ac_executable_extensions; do
17077  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17078    ac_cv_path_SWIG="$as_dir/$ac_word$ac_exec_ext"
17079    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17080    break 2
17081  fi
17082done
17083  done
17084IFS=$as_save_IFS
17085
17086  ;;
17087esac
17088fi
17089SWIG=$ac_cv_path_SWIG
17090if test -n "$SWIG"; then
17091  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SWIG" >&5
17092$as_echo "$SWIG" >&6; }
17093else
17094  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17095$as_echo "no" >&6; }
17096fi
17097
17098
17099        if test -z "$SWIG" ; then
17100                { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot find 'swig' program. You should look at http://www.swig.org" >&5
17101$as_echo "$as_me: WARNING: cannot find 'swig' program. You should look at http://www.swig.org" >&2;}
17102                SWIG='echo "Error: SWIG is not installed. You should look at http://www.swig.org" ; false'
17103        elif test -n "" ; then
17104                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SWIG version" >&5
17105$as_echo_n "checking for SWIG version... " >&6; }
17106                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'`
17107                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $swig_version" >&5
17108$as_echo "$swig_version" >&6; }
17109                if test -n "$swig_version" ; then
17110                        # Calculate the required version number components
17111                        required=
17112                        required_major=`echo $required | sed 's/[^0-9].*//'`
17113                        if test -z "$required_major" ; then
17114                                required_major=0
17115                        fi
17116                        required=`echo $required | sed 's/[0-9]*[^0-9]//'`
17117                        required_minor=`echo $required | sed 's/[^0-9].*//'`
17118                        if test -z "$required_minor" ; then
17119                                required_minor=0
17120                        fi
17121                        required=`echo $required | sed 's/[0-9]*[^0-9]//'`
17122                        required_patch=`echo $required | sed 's/[^0-9].*//'`
17123                        if test -z "$required_patch" ; then
17124                                required_patch=0
17125                        fi
17126                        # Calculate the available version number components
17127                        available=$swig_version
17128                        available_major=`echo $available | sed 's/[^0-9].*//'`
17129                        if test -z "$available_major" ; then
17130                                available_major=0
17131                        fi
17132                        available=`echo $available | sed 's/[0-9]*[^0-9]//'`
17133                        available_minor=`echo $available | sed 's/[^0-9].*//'`
17134                        if test -z "$available_minor" ; then
17135                                available_minor=0
17136                        fi
17137                        available=`echo $available | sed 's/[0-9]*[^0-9]//'`
17138                        available_patch=`echo $available | sed 's/[^0-9].*//'`
17139                        if test -z "$available_patch" ; then
17140                                available_patch=0
17141                        fi
17142			badversion=0
17143			if test $available_major -lt $required_major ; then
17144				badversion=1
17145			fi
17146                        if test $available_major -eq $required_major \
17147                                -a $available_minor -lt $required_minor ; then
17148				badversion=1
17149			fi
17150                        if test $available_major -eq $required_major \
17151                                -a $available_minor -eq $required_minor \
17152                                -a $available_patch -lt $required_patch ; then
17153				badversion=1
17154			fi
17155			if test $badversion -eq 1 ; then
17156                                { $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
17157$as_echo "$as_me: WARNING: SWIG version >=  is required.  You have $swig_version.  You should look at http://www.swig.org" >&2;}
17158                                SWIG='echo "Error: SWIG version >=  is required.  You have '"$swig_version"'.  You should look at http://www.swig.org" ; false'
17159                        else
17160                                { $as_echo "$as_me:${as_lineno-$LINENO}: SWIG executable is '$SWIG'" >&5
17161$as_echo "$as_me: SWIG executable is '$SWIG'" >&6;}
17162                                SWIG_LIB=`$SWIG -swiglib`
17163                                { $as_echo "$as_me:${as_lineno-$LINENO}: SWIG library directory is '$SWIG_LIB'" >&5
17164$as_echo "$as_me: SWIG library directory is '$SWIG_LIB'" >&6;}
17165                        fi
17166                else
17167                        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot determine SWIG version" >&5
17168$as_echo "$as_me: WARNING: cannot determine SWIG version" >&2;}
17169                        SWIG='echo "Error: Cannot determine SWIG version.  You should look at http://www.swig.org" ; false'
17170                fi
17171        fi
17172
17173
17174      fi
17175      { $as_echo "$as_me:${as_lineno-$LINENO}: checking SWIG" >&5
17176$as_echo_n "checking SWIG... " >&6; }
17177      if test ! -x "$SWIG"; then
17178         as_fn_error $? "failed to find swig tool, install it, or do not build Python module and PyUnbound" "$LINENO" 5
17179      else
17180
17181$as_echo "#define HAVE_SWIG 1" >>confdefs.h
17182
17183         swig="$SWIG"
17184
17185         { $as_echo "$as_me:${as_lineno-$LINENO}: result: present" >&5
17186$as_echo "present" >&6; }
17187
17188         # If have Python & SWIG
17189         # Declare PythonMod
17190         if test x_$ub_with_pythonmod != x_no; then
17191
17192$as_echo "#define WITH_PYTHONMODULE 1" >>confdefs.h
17193
17194            WITH_PYTHONMODULE=yes
17195
17196	    PYTHONMOD_OBJ="pythonmod.lo pythonmod_utils.lo"
17197
17198	    PYTHONMOD_HEADER='$(srcdir)/pythonmod/pythonmod.h'
17199
17200	    PYTHONMOD_INSTALL=pythonmod-install
17201
17202	    PYTHONMOD_UNINSTALL=pythonmod-uninstall
17203
17204         fi
17205
17206         # Declare PyUnbound
17207         if test x_$ub_with_pyunbound != x_no; then
17208
17209$as_echo "#define WITH_PYUNBOUND 1" >>confdefs.h
17210
17211            WITH_PYUNBOUND=yes
17212
17213	    PYUNBOUND_OBJ="libunbound_wrap.lo"
17214
17215	    PYUNBOUND_TARGET="_unbound.la"
17216
17217	    PYUNBOUND_INSTALL=pyunbound-install
17218
17219	    PYUNBOUND_UNINSTALL=pyunbound-uninstall
17220
17221         fi
17222      fi
17223   else
17224      { $as_echo "$as_me:${as_lineno-$LINENO}: result: *** Python libraries not found, won't build PythonMod or PyUnbound ***" >&5
17225$as_echo "*** Python libraries not found, won't build PythonMod or PyUnbound ***" >&6; }
17226      ub_with_pyunbound=no
17227      ub_with_pythonmod=no
17228   fi
17229fi
17230
17231if test "`uname`" = "NetBSD"; then
17232	NETBSD_LINTFLAGS='"-D__RENAME(x)=" -D_NETINET_IN_H_'
17233
17234fi
17235CONFIG_DATE=`date +%Y%m%d`
17236
17237
17238# Checks for libraries.
17239
17240# libnss
17241USE_NSS="no"
17242
17243# Check whether --with-nss was given.
17244if test "${with_nss+set}" = set; then :
17245  withval=$with_nss;
17246	USE_NSS="yes"
17247
17248$as_echo "#define HAVE_NSS 1" >>confdefs.h
17249
17250	if test "$withval" != "" -a "$withval" != "yes"; then
17251		CPPFLAGS="$CPPFLAGS -I$withval/include/nss3"
17252		LDFLAGS="$LDFLAGS -L$withval/lib"
17253
17254	if test "x$enable_rpath" = xyes; then
17255		if echo "$withval/lib" | grep "^/" >/dev/null; then
17256			RUNTIME_PATH="$RUNTIME_PATH -R$withval/lib"
17257		fi
17258	fi
17259
17260		CPPFLAGS="-I$withval/include/nspr4 $CPPFLAGS"
17261	else
17262		CPPFLAGS="$CPPFLAGS -I/usr/include/nss3"
17263		CPPFLAGS="-I/usr/include/nspr4 $CPPFLAGS"
17264	fi
17265        LIBS="$LIBS -lnss3 -lnspr4"
17266	SSLLIB=""
17267
17268
17269fi
17270
17271
17272# libnettle
17273USE_NETTLE="no"
17274
17275# Check whether --with-nettle was given.
17276if test "${with_nettle+set}" = set; then :
17277  withval=$with_nettle;
17278	USE_NETTLE="yes"
17279
17280$as_echo "#define HAVE_NETTLE 1" >>confdefs.h
17281
17282	for ac_header in nettle/dsa-compat.h
17283do :
17284  ac_fn_c_check_header_compile "$LINENO" "nettle/dsa-compat.h" "ac_cv_header_nettle_dsa_compat_h" "$ac_includes_default
17285"
17286if test "x$ac_cv_header_nettle_dsa_compat_h" = xyes; then :
17287  cat >>confdefs.h <<_ACEOF
17288#define HAVE_NETTLE_DSA_COMPAT_H 1
17289_ACEOF
17290
17291fi
17292
17293done
17294
17295	if test "$withval" != "" -a "$withval" != "yes"; then
17296		CPPFLAGS="$CPPFLAGS -I$withval/include/nettle"
17297		LDFLAGS="$LDFLAGS -L$withval/lib"
17298
17299	if test "x$enable_rpath" = xyes; then
17300		if echo "$withval/lib" | grep "^/" >/dev/null; then
17301			RUNTIME_PATH="$RUNTIME_PATH -R$withval/lib"
17302		fi
17303	fi
17304
17305	else
17306		CPPFLAGS="$CPPFLAGS -I/usr/include/nettle"
17307	fi
17308        LIBS="$LIBS -lhogweed -lnettle -lgmp"
17309	SSLLIB=""
17310
17311
17312fi
17313
17314
17315# openssl
17316if test $USE_NSS = "no" -a $USE_NETTLE = "no"; then
17317
17318
17319# Check whether --with-ssl was given.
17320if test "${with_ssl+set}" = set; then :
17321  withval=$with_ssl;
17322
17323else
17324
17325            withval="yes"
17326
17327fi
17328
17329    if test x_$withval = x_no; then
17330	as_fn_error $? "Need SSL library to do digital signature cryptography" "$LINENO" 5
17331    fi
17332
17333    withval=$withval
17334    if test x_$withval != x_no; then
17335        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SSL" >&5
17336$as_echo_n "checking for SSL... " >&6; }
17337        if test x_$withval = x_ -o x_$withval = x_yes; then
17338            withval="/usr/local/ssl /usr/lib/ssl /usr/ssl /usr/pkg /usr/local /opt/local /usr/sfw /usr"
17339        fi
17340        for dir in $withval; do
17341            ssldir="$dir"
17342            if test -f "$dir/include/openssl/ssl.h"; then
17343                found_ssl="yes"
17344
17345cat >>confdefs.h <<_ACEOF
17346#define HAVE_SSL /**/
17347_ACEOF
17348
17349                                if test "$ssldir" != "/usr"; then
17350                        CPPFLAGS="$CPPFLAGS -I$ssldir/include"
17351                        LIBSSL_CPPFLAGS="$LIBSSL_CPPFLAGS -I$ssldir/include"
17352                fi
17353                break;
17354            fi
17355        done
17356        if test x_$found_ssl != x_yes; then
17357            as_fn_error $? "Cannot find the SSL libraries in $withval" "$LINENO" 5
17358        else
17359            { $as_echo "$as_me:${as_lineno-$LINENO}: result: found in $ssldir" >&5
17360$as_echo "found in $ssldir" >&6; }
17361            HAVE_SSL=yes
17362                        if test "$ssldir" != "/usr" -a "$ssldir" != ""; then
17363                LDFLAGS="$LDFLAGS -L$ssldir/lib"
17364                LIBSSL_LDFLAGS="$LIBSSL_LDFLAGS -L$ssldir/lib"
17365
17366	if test "x$enable_rpath" = xyes; then
17367		if echo "$ssldir/lib" | grep "^/" >/dev/null; then
17368			RUNTIME_PATH="$RUNTIME_PATH -R$ssldir/lib"
17369		fi
17370	fi
17371
17372            fi
17373
17374            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HMAC_Update in -lcrypto" >&5
17375$as_echo_n "checking for HMAC_Update in -lcrypto... " >&6; }
17376            LIBS="$LIBS -lcrypto"
17377            LIBSSL_LIBS="$LIBSSL_LIBS -lcrypto"
17378            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17379/* end confdefs.h.  */
17380
17381int
17382main ()
17383{
17384
17385                int HMAC_Update(void);
17386                (void)HMAC_Update();
17387
17388  ;
17389  return 0;
17390}
17391_ACEOF
17392if ac_fn_c_try_link "$LINENO"; then :
17393
17394                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17395$as_echo "yes" >&6; }
17396
17397$as_echo "#define HAVE_HMAC_UPDATE 1" >>confdefs.h
17398
17399
17400else
17401
17402                { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17403$as_echo "no" >&6; }
17404                # check if -lwsock32 or -lgdi32 are needed.
17405                BAKLIBS="$LIBS"
17406                BAKSSLLIBS="$LIBSSL_LIBS"
17407		LIBS="$LIBS -lgdi32 -lws2_32"
17408		LIBSSL_LIBS="$LIBSSL_LIBS -lgdi32 -lws2_32"
17409                { $as_echo "$as_me:${as_lineno-$LINENO}: checking if -lcrypto needs -lgdi32" >&5
17410$as_echo_n "checking if -lcrypto needs -lgdi32... " >&6; }
17411                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17412/* end confdefs.h.  */
17413
17414int
17415main ()
17416{
17417
17418                    int HMAC_Update(void);
17419                    (void)HMAC_Update();
17420
17421  ;
17422  return 0;
17423}
17424_ACEOF
17425if ac_fn_c_try_link "$LINENO"; then :
17426
17427
17428$as_echo "#define HAVE_HMAC_UPDATE 1" >>confdefs.h
17429
17430                    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17431$as_echo "yes" >&6; }
17432
17433else
17434
17435                    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17436$as_echo "no" >&6; }
17437                    LIBS="$BAKLIBS"
17438                    LIBSSL_LIBS="$BAKSSLLIBS"
17439                    LIBS="$LIBS -ldl"
17440                    LIBSSL_LIBS="$LIBSSL_LIBS -ldl"
17441                    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if -lcrypto needs -ldl" >&5
17442$as_echo_n "checking if -lcrypto needs -ldl... " >&6; }
17443                    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17444/* end confdefs.h.  */
17445
17446int
17447main ()
17448{
17449
17450                        int HMAC_Update(void);
17451                        (void)HMAC_Update();
17452
17453  ;
17454  return 0;
17455}
17456_ACEOF
17457if ac_fn_c_try_link "$LINENO"; then :
17458
17459
17460$as_echo "#define HAVE_HMAC_UPDATE 1" >>confdefs.h
17461
17462                        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17463$as_echo "yes" >&6; }
17464
17465else
17466
17467                        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17468$as_echo "no" >&6; }
17469                        LIBS="$BAKLIBS"
17470                        LIBSSL_LIBS="$BAKSSLLIBS"
17471                        LIBS="$LIBS -ldl -pthread"
17472                        LIBSSL_LIBS="$LIBSSL_LIBS -ldl -pthread"
17473                        { $as_echo "$as_me:${as_lineno-$LINENO}: checking if -lcrypto needs -ldl -pthread" >&5
17474$as_echo_n "checking if -lcrypto needs -ldl -pthread... " >&6; }
17475                        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17476/* end confdefs.h.  */
17477
17478int
17479main ()
17480{
17481
17482                            int HMAC_Update(void);
17483                            (void)HMAC_Update();
17484
17485  ;
17486  return 0;
17487}
17488_ACEOF
17489if ac_fn_c_try_link "$LINENO"; then :
17490
17491
17492$as_echo "#define HAVE_HMAC_UPDATE 1" >>confdefs.h
17493
17494                            { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17495$as_echo "yes" >&6; }
17496
17497else
17498
17499                            { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17500$as_echo "no" >&6; }
17501                            as_fn_error $? "OpenSSL found in $ssldir, but version 0.9.7 or higher is required" "$LINENO" 5
17502
17503fi
17504rm -f core conftest.err conftest.$ac_objext \
17505    conftest$ac_exeext conftest.$ac_ext
17506
17507fi
17508rm -f core conftest.err conftest.$ac_objext \
17509    conftest$ac_exeext conftest.$ac_ext
17510
17511fi
17512rm -f core conftest.err conftest.$ac_objext \
17513    conftest$ac_exeext conftest.$ac_ext
17514
17515fi
17516rm -f core conftest.err conftest.$ac_objext \
17517    conftest$ac_exeext conftest.$ac_ext
17518        fi
17519
17520
17521    fi
17522for ac_header in openssl/ssl.h
17523do :
17524  ac_fn_c_check_header_compile "$LINENO" "openssl/ssl.h" "ac_cv_header_openssl_ssl_h" "$ac_includes_default
17525"
17526if test "x$ac_cv_header_openssl_ssl_h" = xyes; then :
17527  cat >>confdefs.h <<_ACEOF
17528#define HAVE_OPENSSL_SSL_H 1
17529_ACEOF
17530
17531fi
17532
17533done
17534
17535for ac_header in openssl/err.h
17536do :
17537  ac_fn_c_check_header_compile "$LINENO" "openssl/err.h" "ac_cv_header_openssl_err_h" "$ac_includes_default
17538"
17539if test "x$ac_cv_header_openssl_err_h" = xyes; then :
17540  cat >>confdefs.h <<_ACEOF
17541#define HAVE_OPENSSL_ERR_H 1
17542_ACEOF
17543
17544fi
17545
17546done
17547
17548for ac_header in openssl/rand.h
17549do :
17550  ac_fn_c_check_header_compile "$LINENO" "openssl/rand.h" "ac_cv_header_openssl_rand_h" "$ac_includes_default
17551"
17552if test "x$ac_cv_header_openssl_rand_h" = xyes; then :
17553  cat >>confdefs.h <<_ACEOF
17554#define HAVE_OPENSSL_RAND_H 1
17555_ACEOF
17556
17557fi
17558
17559done
17560
17561
17562
17563
17564# check if libssl needs libdl
17565BAKLIBS="$LIBS"
17566LIBS="-lssl $LIBS"
17567{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if libssl needs libdl" >&5
17568$as_echo_n "checking if libssl needs libdl... " >&6; }
17569cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17570/* end confdefs.h.  */
17571
17572/* Override any GCC internal prototype to avoid an error.
17573   Use char because int might match the return type of a GCC
17574   builtin and then its argument prototype would still apply.  */
17575#ifdef __cplusplus
17576extern "C"
17577#endif
17578char SSL_CTX_new ();
17579int
17580main ()
17581{
17582return SSL_CTX_new ();
17583  ;
17584  return 0;
17585}
17586_ACEOF
17587if ac_fn_c_try_link "$LINENO"; then :
17588
17589	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17590$as_echo "no" >&6; }
17591	LIBS="$BAKLIBS"
17592
17593else
17594
17595	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17596$as_echo "yes" >&6; }
17597	LIBS="$BAKLIBS"
17598	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
17599$as_echo_n "checking for library containing dlopen... " >&6; }
17600if ${ac_cv_search_dlopen+:} false; then :
17601  $as_echo_n "(cached) " >&6
17602else
17603  ac_func_search_save_LIBS=$LIBS
17604cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17605/* end confdefs.h.  */
17606
17607/* Override any GCC internal prototype to avoid an error.
17608   Use char because int might match the return type of a GCC
17609   builtin and then its argument prototype would still apply.  */
17610#ifdef __cplusplus
17611extern "C"
17612#endif
17613char dlopen ();
17614int
17615main ()
17616{
17617return dlopen ();
17618  ;
17619  return 0;
17620}
17621_ACEOF
17622for ac_lib in '' dl; do
17623  if test -z "$ac_lib"; then
17624    ac_res="none required"
17625  else
17626    ac_res=-l$ac_lib
17627    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
17628  fi
17629  if ac_fn_c_try_link "$LINENO"; then :
17630  ac_cv_search_dlopen=$ac_res
17631fi
17632rm -f core conftest.err conftest.$ac_objext \
17633    conftest$ac_exeext
17634  if ${ac_cv_search_dlopen+:} false; then :
17635  break
17636fi
17637done
17638if ${ac_cv_search_dlopen+:} false; then :
17639
17640else
17641  ac_cv_search_dlopen=no
17642fi
17643rm conftest.$ac_ext
17644LIBS=$ac_func_search_save_LIBS
17645fi
17646{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
17647$as_echo "$ac_cv_search_dlopen" >&6; }
17648ac_res=$ac_cv_search_dlopen
17649if test "$ac_res" != no; then :
17650  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
17651
17652fi
17653
17654
17655fi
17656rm -f core conftest.err conftest.$ac_objext \
17657    conftest$ac_exeext conftest.$ac_ext
17658SSLLIB="-lssl"
17659
17660# check if -lcrypt32 is needed because CAPIENG needs that. (on windows)
17661BAKLIBS="$LIBS"
17662LIBS="-lssl $LIBS"
17663{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if libssl needs -lcrypt32" >&5
17664$as_echo_n "checking if libssl needs -lcrypt32... " >&6; }
17665cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17666/* end confdefs.h.  */
17667
17668/* Override any GCC internal prototype to avoid an error.
17669   Use char because int might match the return type of a GCC
17670   builtin and then its argument prototype would still apply.  */
17671#ifdef __cplusplus
17672extern "C"
17673#endif
17674char HMAC_Update ();
17675int
17676main ()
17677{
17678return HMAC_Update ();
17679  ;
17680  return 0;
17681}
17682_ACEOF
17683if ac_fn_c_try_link "$LINENO"; then :
17684
17685	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17686$as_echo "no" >&6; }
17687	LIBS="$BAKLIBS"
17688
17689else
17690
17691	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17692$as_echo "yes" >&6; }
17693	LIBS="$BAKLIBS"
17694	LIBS="$LIBS -lcrypt32"
17695
17696fi
17697rm -f core conftest.err conftest.$ac_objext \
17698    conftest$ac_exeext conftest.$ac_ext
17699
17700{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LibreSSL" >&5
17701$as_echo_n "checking for LibreSSL... " >&6; }
17702if grep VERSION_TEXT $ssldir/include/openssl/opensslv.h | grep "LibreSSL" >/dev/null; then
17703	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17704$as_echo "yes" >&6; }
17705
17706$as_echo "#define HAVE_LIBRESSL 1" >>confdefs.h
17707
17708	# libressl provides these compat functions, but they may also be
17709	# declared by the OS in libc.  See if they have been declared.
17710	ac_fn_c_check_decl "$LINENO" "strlcpy" "ac_cv_have_decl_strlcpy" "$ac_includes_default"
17711if test "x$ac_cv_have_decl_strlcpy" = xyes; then :
17712  ac_have_decl=1
17713else
17714  ac_have_decl=0
17715fi
17716
17717cat >>confdefs.h <<_ACEOF
17718#define HAVE_DECL_STRLCPY $ac_have_decl
17719_ACEOF
17720ac_fn_c_check_decl "$LINENO" "strlcat" "ac_cv_have_decl_strlcat" "$ac_includes_default"
17721if test "x$ac_cv_have_decl_strlcat" = xyes; then :
17722  ac_have_decl=1
17723else
17724  ac_have_decl=0
17725fi
17726
17727cat >>confdefs.h <<_ACEOF
17728#define HAVE_DECL_STRLCAT $ac_have_decl
17729_ACEOF
17730ac_fn_c_check_decl "$LINENO" "arc4random" "ac_cv_have_decl_arc4random" "$ac_includes_default"
17731if test "x$ac_cv_have_decl_arc4random" = xyes; then :
17732  ac_have_decl=1
17733else
17734  ac_have_decl=0
17735fi
17736
17737cat >>confdefs.h <<_ACEOF
17738#define HAVE_DECL_ARC4RANDOM $ac_have_decl
17739_ACEOF
17740ac_fn_c_check_decl "$LINENO" "arc4random_uniform" "ac_cv_have_decl_arc4random_uniform" "$ac_includes_default"
17741if test "x$ac_cv_have_decl_arc4random_uniform" = xyes; then :
17742  ac_have_decl=1
17743else
17744  ac_have_decl=0
17745fi
17746
17747cat >>confdefs.h <<_ACEOF
17748#define HAVE_DECL_ARC4RANDOM_UNIFORM $ac_have_decl
17749_ACEOF
17750ac_fn_c_check_decl "$LINENO" "reallocarray" "ac_cv_have_decl_reallocarray" "$ac_includes_default"
17751if test "x$ac_cv_have_decl_reallocarray" = xyes; then :
17752  ac_have_decl=1
17753else
17754  ac_have_decl=0
17755fi
17756
17757cat >>confdefs.h <<_ACEOF
17758#define HAVE_DECL_REALLOCARRAY $ac_have_decl
17759_ACEOF
17760
17761else
17762	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17763$as_echo "no" >&6; }
17764fi
17765for ac_header in openssl/conf.h openssl/engine.h openssl/bn.h openssl/dh.h openssl/dsa.h openssl/rsa.h
17766do :
17767  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
17768ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
17769"
17770if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
17771  cat >>confdefs.h <<_ACEOF
17772#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
17773_ACEOF
17774
17775fi
17776
17777done
17778
17779for ac_func in OPENSSL_config EVP_sha1 EVP_sha256 EVP_sha512 FIPS_mode EVP_MD_CTX_new OpenSSL_add_all_digests OPENSSL_init_crypto EVP_cleanup ERR_load_crypto_strings CRYPTO_cleanup_all_ex_data ERR_free_strings RAND_cleanup DSA_SIG_set0 EVP_dss1 EVP_DigestVerify
17780do :
17781  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
17782ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
17783if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
17784  cat >>confdefs.h <<_ACEOF
17785#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
17786_ACEOF
17787
17788fi
17789done
17790
17791
17792# these check_funcs need -lssl
17793BAKLIBS="$LIBS"
17794LIBS="-lssl $LIBS"
17795for ac_func in OPENSSL_init_ssl SSL_CTX_set_security_level SSL_set1_host SSL_get0_peername
17796do :
17797  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
17798ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
17799if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
17800  cat >>confdefs.h <<_ACEOF
17801#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
17802_ACEOF
17803
17804fi
17805done
17806
17807LIBS="$BAKLIBS"
17808
17809ac_fn_c_check_decl "$LINENO" "SSL_COMP_get_compression_methods" "ac_cv_have_decl_SSL_COMP_get_compression_methods" "
17810$ac_includes_default
17811#ifdef HAVE_OPENSSL_ERR_H
17812#include <openssl/err.h>
17813#endif
17814
17815#ifdef HAVE_OPENSSL_RAND_H
17816#include <openssl/rand.h>
17817#endif
17818
17819#ifdef HAVE_OPENSSL_CONF_H
17820#include <openssl/conf.h>
17821#endif
17822
17823#ifdef HAVE_OPENSSL_ENGINE_H
17824#include <openssl/engine.h>
17825#endif
17826#include <openssl/ssl.h>
17827#include <openssl/evp.h>
17828
17829"
17830if test "x$ac_cv_have_decl_SSL_COMP_get_compression_methods" = xyes; then :
17831  ac_have_decl=1
17832else
17833  ac_have_decl=0
17834fi
17835
17836cat >>confdefs.h <<_ACEOF
17837#define HAVE_DECL_SSL_COMP_GET_COMPRESSION_METHODS $ac_have_decl
17838_ACEOF
17839ac_fn_c_check_decl "$LINENO" "sk_SSL_COMP_pop_free" "ac_cv_have_decl_sk_SSL_COMP_pop_free" "
17840$ac_includes_default
17841#ifdef HAVE_OPENSSL_ERR_H
17842#include <openssl/err.h>
17843#endif
17844
17845#ifdef HAVE_OPENSSL_RAND_H
17846#include <openssl/rand.h>
17847#endif
17848
17849#ifdef HAVE_OPENSSL_CONF_H
17850#include <openssl/conf.h>
17851#endif
17852
17853#ifdef HAVE_OPENSSL_ENGINE_H
17854#include <openssl/engine.h>
17855#endif
17856#include <openssl/ssl.h>
17857#include <openssl/evp.h>
17858
17859"
17860if test "x$ac_cv_have_decl_sk_SSL_COMP_pop_free" = xyes; then :
17861  ac_have_decl=1
17862else
17863  ac_have_decl=0
17864fi
17865
17866cat >>confdefs.h <<_ACEOF
17867#define HAVE_DECL_SK_SSL_COMP_POP_FREE $ac_have_decl
17868_ACEOF
17869ac_fn_c_check_decl "$LINENO" "SSL_CTX_set_ecdh_auto" "ac_cv_have_decl_SSL_CTX_set_ecdh_auto" "
17870$ac_includes_default
17871#ifdef HAVE_OPENSSL_ERR_H
17872#include <openssl/err.h>
17873#endif
17874
17875#ifdef HAVE_OPENSSL_RAND_H
17876#include <openssl/rand.h>
17877#endif
17878
17879#ifdef HAVE_OPENSSL_CONF_H
17880#include <openssl/conf.h>
17881#endif
17882
17883#ifdef HAVE_OPENSSL_ENGINE_H
17884#include <openssl/engine.h>
17885#endif
17886#include <openssl/ssl.h>
17887#include <openssl/evp.h>
17888
17889"
17890if test "x$ac_cv_have_decl_SSL_CTX_set_ecdh_auto" = xyes; then :
17891  ac_have_decl=1
17892else
17893  ac_have_decl=0
17894fi
17895
17896cat >>confdefs.h <<_ACEOF
17897#define HAVE_DECL_SSL_CTX_SET_ECDH_AUTO $ac_have_decl
17898_ACEOF
17899
17900fi
17901
17902
17903
17904# Check whether --enable-sha1 was given.
17905if test "${enable_sha1+set}" = set; then :
17906  enableval=$enable_sha1;
17907fi
17908
17909case "$enable_sha1" in
17910	no)
17911	;;
17912	yes|*)
17913
17914$as_echo "#define USE_SHA1 1" >>confdefs.h
17915
17916	;;
17917esac
17918
17919
17920# Check whether --enable-sha2 was given.
17921if test "${enable_sha2+set}" = set; then :
17922  enableval=$enable_sha2;
17923fi
17924
17925case "$enable_sha2" in
17926	no)
17927	;;
17928	yes|*)
17929
17930$as_echo "#define USE_SHA2 1" >>confdefs.h
17931
17932	;;
17933esac
17934
17935# Check whether --enable-subnet was given.
17936if test "${enable_subnet+set}" = set; then :
17937  enableval=$enable_subnet;
17938fi
17939
17940case "$enable_subnet" in
17941	yes)
17942
17943$as_echo "#define CLIENT_SUBNET 1" >>confdefs.h
17944
17945	SUBNET_OBJ="edns-subnet.lo subnetmod.lo addrtree.lo subnet-whitelist.lo"
17946
17947	SUBNET_HEADER='$(srcdir)/edns-subnet/subnetmod.h $(srcdir)/edns-subnet/edns-subnet.h $(srcdir)/edns-subnet/subnet-whitelist.h $(srcdir)/edns-subnet/addrtree.h'
17948
17949	;;
17950	no|*)
17951	;;
17952esac
17953
17954# check wether gost also works
17955
17956# Check whether --enable-gost was given.
17957if test "${enable_gost+set}" = set; then :
17958  enableval=$enable_gost;
17959fi
17960
17961use_gost="no"
17962if test $USE_NSS = "no" -a $USE_NETTLE = "no"; then
17963case "$enable_gost" in
17964	no)
17965	;;
17966	*)
17967	ac_fn_c_check_func "$LINENO" "EVP_PKEY_set_type_str" "ac_cv_func_EVP_PKEY_set_type_str"
17968if test "x$ac_cv_func_EVP_PKEY_set_type_str" = xyes; then :
17969  :
17970else
17971  as_fn_error $? "OpenSSL 1.0.0 is needed for GOST support" "$LINENO" 5
17972fi
17973
17974	ac_fn_c_check_func "$LINENO" "EC_KEY_new" "ac_cv_func_EC_KEY_new"
17975if test "x$ac_cv_func_EC_KEY_new" = xyes; then :
17976
17977else
17978  as_fn_error $? "OpenSSL does not support ECC, needed for GOST support" "$LINENO" 5
17979fi
17980
17981
17982{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if GOST works" >&5
17983$as_echo_n "checking if GOST works... " >&6; }
17984if test c${cross_compiling} = cno; then
17985BAKCFLAGS="$CFLAGS"
17986if test -n "$ssldir"; then
17987	CFLAGS="$CFLAGS -Wl,-rpath,$ssldir/lib"
17988fi
17989if test "$cross_compiling" = yes; then :
17990  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
17991$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
17992as_fn_error $? "cannot run test program while cross compiling
17993See \`config.log' for more details" "$LINENO" 5; }
17994else
17995  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17996/* end confdefs.h.  */
17997
17998#include <string.h>
17999#include <openssl/ssl.h>
18000#include <openssl/evp.h>
18001#include <openssl/engine.h>
18002#include <openssl/conf.h>
18003/* routine to load gost (from sldns) */
18004int load_gost_id(void)
18005{
18006	static int gost_id = 0;
18007	const EVP_PKEY_ASN1_METHOD* meth;
18008	ENGINE* e;
18009
18010	if(gost_id) return gost_id;
18011
18012	/* see if configuration loaded gost implementation from other engine*/
18013	meth = EVP_PKEY_asn1_find_str(NULL, "gost2001", -1);
18014	if(meth) {
18015		EVP_PKEY_asn1_get0_info(&gost_id, NULL, NULL, NULL, NULL, meth);
18016		return gost_id;
18017	}
18018
18019	/* see if engine can be loaded already */
18020	e = ENGINE_by_id("gost");
18021	if(!e) {
18022		/* load it ourself, in case statically linked */
18023		ENGINE_load_builtin_engines();
18024		ENGINE_load_dynamic();
18025		e = ENGINE_by_id("gost");
18026	}
18027	if(!e) {
18028		/* no gost engine in openssl */
18029		return 0;
18030	}
18031	if(!ENGINE_set_default(e, ENGINE_METHOD_ALL)) {
18032		ENGINE_finish(e);
18033		ENGINE_free(e);
18034		return 0;
18035	}
18036
18037	meth = EVP_PKEY_asn1_find_str(&e, "gost2001", -1);
18038	if(!meth) {
18039		/* algo not found */
18040		ENGINE_finish(e);
18041		ENGINE_free(e);
18042		return 0;
18043	}
18044	EVP_PKEY_asn1_get0_info(&gost_id, NULL, NULL, NULL, NULL, meth);
18045	return gost_id;
18046}
18047int main(void) {
18048	EVP_MD_CTX* ctx;
18049	const EVP_MD* md;
18050	unsigned char digest[64]; /* its a 256-bit digest, so uses 32 bytes */
18051	const char* str = "Hello world";
18052	const unsigned char check[] = {
18053		0x40 , 0xed , 0xf8 , 0x56 , 0x5a , 0xc5 , 0x36 , 0xe1 ,
18054		0x33 , 0x7c , 0x7e , 0x87 , 0x62 , 0x1c , 0x42 , 0xe0 ,
18055		0x17 , 0x1b , 0x5e , 0xce , 0xa8 , 0x46 , 0x65 , 0x4d ,
18056		0x8d , 0x3e , 0x22 , 0x9b , 0xe1 , 0x30 , 0x19 , 0x9d
18057	};
18058	OPENSSL_config(NULL);
18059	(void)load_gost_id();
18060	md = EVP_get_digestbyname("md_gost94");
18061	if(!md) return 1;
18062	memset(digest, 0, sizeof(digest));
18063	ctx = EVP_MD_CTX_create();
18064	if(!ctx) return 2;
18065	if(!EVP_DigestInit_ex(ctx, md, NULL)) return 3;
18066	if(!EVP_DigestUpdate(ctx, str, 10)) return 4;
18067	if(!EVP_DigestFinal_ex(ctx, digest, NULL)) return 5;
18068	/* uncomment to see the hash calculated.
18069		{int i;
18070		for(i=0; i<32; i++)
18071			printf(" %2.2x", (int)digest[i]);
18072		printf("\n");}
18073	*/
18074	if(memcmp(digest, check, sizeof(check)) != 0)
18075		return 6;
18076	return 0;
18077}
18078
18079_ACEOF
18080if ac_fn_c_try_run "$LINENO"; then :
18081  eval "ac_cv_c_gost_works=yes"
18082else
18083  eval "ac_cv_c_gost_works=no"
18084fi
18085rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18086  conftest.$ac_objext conftest.beam conftest.$ac_ext
18087fi
18088
18089CFLAGS="$BAKCFLAGS"
18090else
18091eval "ac_cv_c_gost_works=maybe"
18092fi
18093{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_gost_works" >&5
18094$as_echo "$ac_cv_c_gost_works" >&6; }
18095
18096	if test "$ac_cv_c_gost_works" != no; then
18097		use_gost="yes"
18098
18099$as_echo "#define USE_GOST 1" >>confdefs.h
18100
18101	fi
18102	;;
18103esac
18104fi
18105# Check whether --enable-ecdsa was given.
18106if test "${enable_ecdsa+set}" = set; then :
18107  enableval=$enable_ecdsa;
18108fi
18109
18110use_ecdsa="no"
18111case "$enable_ecdsa" in
18112    no)
18113      ;;
18114    *)
18115      if test $USE_NSS = "no" -a $USE_NETTLE = "no"; then
18116	      ac_fn_c_check_func "$LINENO" "ECDSA_sign" "ac_cv_func_ECDSA_sign"
18117if test "x$ac_cv_func_ECDSA_sign" = xyes; then :
18118
18119else
18120  as_fn_error $? "OpenSSL does not support ECDSA: please upgrade or rerun with --disable-ecdsa" "$LINENO" 5
18121fi
18122
18123	      ac_fn_c_check_func "$LINENO" "SHA384_Init" "ac_cv_func_SHA384_Init"
18124if test "x$ac_cv_func_SHA384_Init" = xyes; then :
18125
18126else
18127  as_fn_error $? "OpenSSL does not support SHA384: please upgrade or rerun with --disable-ecdsa" "$LINENO" 5
18128fi
18129
18130	      ac_fn_c_check_decl "$LINENO" "NID_X9_62_prime256v1" "ac_cv_have_decl_NID_X9_62_prime256v1" "$ac_includes_default
18131#include <openssl/evp.h>
18132
18133"
18134if test "x$ac_cv_have_decl_NID_X9_62_prime256v1" = xyes; then :
18135  ac_have_decl=1
18136else
18137  ac_have_decl=0
18138fi
18139
18140cat >>confdefs.h <<_ACEOF
18141#define HAVE_DECL_NID_X9_62_PRIME256V1 $ac_have_decl
18142_ACEOF
18143if test $ac_have_decl = 1; then :
18144
18145else
18146  as_fn_error $? "OpenSSL does not support the ECDSA curves: please upgrade or rerun with --disable-ecdsa" "$LINENO" 5
18147fi
18148ac_fn_c_check_decl "$LINENO" "NID_secp384r1" "ac_cv_have_decl_NID_secp384r1" "$ac_includes_default
18149#include <openssl/evp.h>
18150
18151"
18152if test "x$ac_cv_have_decl_NID_secp384r1" = xyes; then :
18153  ac_have_decl=1
18154else
18155  ac_have_decl=0
18156fi
18157
18158cat >>confdefs.h <<_ACEOF
18159#define HAVE_DECL_NID_SECP384R1 $ac_have_decl
18160_ACEOF
18161if test $ac_have_decl = 1; then :
18162
18163else
18164  as_fn_error $? "OpenSSL does not support the ECDSA curves: please upgrade or rerun with --disable-ecdsa" "$LINENO" 5
18165fi
18166
18167	      # see if OPENSSL 1.0.0 or later (has EVP MD and Verify independency)
18168	      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if openssl supports SHA2 and ECDSA with EVP" >&5
18169$as_echo_n "checking if openssl supports SHA2 and ECDSA with EVP... " >&6; }
18170	      if grep OPENSSL_VERSION_TEXT $ssldir/include/openssl/opensslv.h | grep "OpenSSL" >/dev/null; then
18171		if grep OPENSSL_VERSION_NUMBER $ssldir/include/openssl/opensslv.h | grep 0x0 >/dev/null; then
18172		  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18173$as_echo "no" >&6; }
18174
18175cat >>confdefs.h <<_ACEOF
18176#define USE_ECDSA_EVP_WORKAROUND 1
18177_ACEOF
18178
18179		else
18180		  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
18181$as_echo "yes" >&6; }
18182		fi
18183	      else
18184		# not OpenSSL, thus likely LibreSSL, which supports it
18185		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
18186$as_echo "yes" >&6; }
18187	      fi
18188      fi
18189      # we now know we have ECDSA and the required curves.
18190
18191cat >>confdefs.h <<_ACEOF
18192#define USE_ECDSA 1
18193_ACEOF
18194
18195      use_ecdsa="yes"
18196      ;;
18197esac
18198
18199# Check whether --enable-dsa was given.
18200if test "${enable_dsa+set}" = set; then :
18201  enableval=$enable_dsa;
18202fi
18203
18204use_dsa="no"
18205case "$enable_dsa" in
18206    no)
18207      ;;
18208    *)
18209      # detect if DSA is supported, and turn it off if not.
18210      if test $USE_NSS = "no" -a $USE_NETTLE = "no"; then
18211      ac_fn_c_check_func "$LINENO" "DSA_SIG_new" "ac_cv_func_DSA_SIG_new"
18212if test "x$ac_cv_func_DSA_SIG_new" = xyes; then :
18213
18214      as_ac_Type=`$as_echo "ac_cv_type_DSA_SIG*" | $as_tr_sh`
18215ac_fn_c_check_type "$LINENO" "DSA_SIG*" "$as_ac_Type" "
18216$ac_includes_default
18217#ifdef HAVE_OPENSSL_ERR_H
18218#include <openssl/err.h>
18219#endif
18220
18221#ifdef HAVE_OPENSSL_RAND_H
18222#include <openssl/rand.h>
18223#endif
18224
18225#ifdef HAVE_OPENSSL_CONF_H
18226#include <openssl/conf.h>
18227#endif
18228
18229#ifdef HAVE_OPENSSL_ENGINE_H
18230#include <openssl/engine.h>
18231#endif
18232
18233"
18234if eval test \"x\$"$as_ac_Type"\" = x"yes"; then :
18235
18236
18237cat >>confdefs.h <<_ACEOF
18238#define USE_DSA 1
18239_ACEOF
18240
18241
18242else
18243  if test "x$enable_dsa" = "xyes"; then as_fn_error $? "OpenSSL does not support DSA and you used --enable-dsa." "$LINENO" 5
18244               fi
18245fi
18246
18247
18248else
18249  if test "x$enable_dsa" = "xyes"; then as_fn_error $? "OpenSSL does not support DSA and you used --enable-dsa." "$LINENO" 5
18250               fi
18251fi
18252
18253      else
18254
18255cat >>confdefs.h <<_ACEOF
18256#define USE_DSA 1
18257_ACEOF
18258
18259      fi
18260      ;;
18261esac
18262
18263# Check whether --enable-ed25519 was given.
18264if test "${enable_ed25519+set}" = set; then :
18265  enableval=$enable_ed25519;
18266fi
18267
18268use_ed25519="no"
18269case "$enable_ed25519" in
18270    no)
18271      ;;
18272    *)
18273      if test $USE_NSS = "no" -a $USE_NETTLE = "no"; then
18274	      ac_fn_c_check_decl "$LINENO" "NID_ED25519" "ac_cv_have_decl_NID_ED25519" "$ac_includes_default
18275#include <openssl/evp.h>
18276
18277"
18278if test "x$ac_cv_have_decl_NID_ED25519" = xyes; then :
18279  ac_have_decl=1
18280else
18281  ac_have_decl=0
18282fi
18283
18284cat >>confdefs.h <<_ACEOF
18285#define HAVE_DECL_NID_ED25519 $ac_have_decl
18286_ACEOF
18287if test $ac_have_decl = 1; then :
18288
18289      		use_ed25519="yes"
18290
18291else
18292   if test "x$enable_ed25519" = "xyes"; then as_fn_error $? "OpenSSL does not support ED25519 and you used --enable-ed25519." "$LINENO" 5
18293	      	fi
18294fi
18295
18296      fi
18297      if test $USE_NETTLE = "yes"; then
18298		for ac_header in nettle/eddsa.h
18299do :
18300  ac_fn_c_check_header_compile "$LINENO" "nettle/eddsa.h" "ac_cv_header_nettle_eddsa_h" "$ac_includes_default
18301"
18302if test "x$ac_cv_header_nettle_eddsa_h" = xyes; then :
18303  cat >>confdefs.h <<_ACEOF
18304#define HAVE_NETTLE_EDDSA_H 1
18305_ACEOF
18306 use_ed25519="yes"
18307fi
18308
18309done
18310
18311      fi
18312      if test $use_ed25519 = "yes"; then
18313
18314cat >>confdefs.h <<_ACEOF
18315#define USE_ED25519 1
18316_ACEOF
18317
18318      fi
18319      ;;
18320esac
18321
18322# Check whether --enable-ed448 was given.
18323if test "${enable_ed448+set}" = set; then :
18324  enableval=$enable_ed448;
18325fi
18326
18327use_ed448="no"
18328case "$enable_ed448" in
18329    no)
18330      ;;
18331    *)
18332      if test $USE_NSS = "no" -a $USE_NETTLE = "no"; then
18333	      ac_fn_c_check_decl "$LINENO" "NID_ED448" "ac_cv_have_decl_NID_ED448" "$ac_includes_default
18334#include <openssl/evp.h>
18335
18336"
18337if test "x$ac_cv_have_decl_NID_ED448" = xyes; then :
18338  ac_have_decl=1
18339else
18340  ac_have_decl=0
18341fi
18342
18343cat >>confdefs.h <<_ACEOF
18344#define HAVE_DECL_NID_ED448 $ac_have_decl
18345_ACEOF
18346if test $ac_have_decl = 1; then :
18347
18348      		use_ed448="yes"
18349
18350else
18351   if test "x$enable_ed448" = "xyes"; then as_fn_error $? "OpenSSL does not support ED448 and you used --enable-ed448." "$LINENO" 5
18352	      	fi
18353fi
18354
18355      fi
18356      if test $use_ed448 = "yes"; then
18357
18358cat >>confdefs.h <<_ACEOF
18359#define USE_ED448 1
18360_ACEOF
18361
18362      fi
18363      ;;
18364esac
18365
18366# Check whether --enable-event-api was given.
18367if test "${enable_event_api+set}" = set; then :
18368  enableval=$enable_event_api;
18369fi
18370
18371case "$enable_event_api" in
18372    yes)
18373      UNBOUND_EVENT_INSTALL=unbound-event-install
18374
18375      UNBOUND_EVENT_UNINSTALL=unbound-event-uninstall
18376
18377      ;;
18378    *)
18379      ;;
18380esac
18381
18382# Check whether --enable-tfo-client was given.
18383if test "${enable_tfo_client+set}" = set; then :
18384  enableval=$enable_tfo_client;
18385fi
18386
18387case "$enable_tfo_client" in
18388	yes)
18389		case `uname` in
18390			Linux) ac_fn_c_check_decl "$LINENO" "MSG_FASTOPEN" "ac_cv_have_decl_MSG_FASTOPEN" "$ac_includes_default
18391#include <netinet/tcp.h>
18392
18393"
18394if test "x$ac_cv_have_decl_MSG_FASTOPEN" = xyes; then :
18395  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Check the platform specific TFO kernel parameters are correctly configured to support client mode TFO" >&5
18396$as_echo "$as_me: WARNING: Check the platform specific TFO kernel parameters are correctly configured to support client mode TFO" >&2;}
18397else
18398  as_fn_error $? "TCP Fast Open is not available for client mode: please rerun without --enable-tfo-client" "$LINENO" 5
18399fi
18400
18401
18402cat >>confdefs.h <<_ACEOF
18403#define USE_MSG_FASTOPEN 1
18404_ACEOF
18405
18406			  ;;
18407			Darwin) ac_fn_c_check_decl "$LINENO" "CONNECT_RESUME_ON_READ_WRITE" "ac_cv_have_decl_CONNECT_RESUME_ON_READ_WRITE" "$ac_includes_default
18408#include <sys/socket.h>
18409
18410"
18411if test "x$ac_cv_have_decl_CONNECT_RESUME_ON_READ_WRITE" = xyes; then :
18412  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Check the platform specific TFO kernel parameters are correctly configured to support client mode TFO" >&5
18413$as_echo "$as_me: WARNING: Check the platform specific TFO kernel parameters are correctly configured to support client mode TFO" >&2;}
18414else
18415  as_fn_error $? "TCP Fast Open is not available for client mode: please rerun without --enable-tfo-client" "$LINENO" 5
18416fi
18417
18418
18419cat >>confdefs.h <<_ACEOF
18420#define USE_OSX_MSG_FASTOPEN 1
18421_ACEOF
18422
18423			  ;;
18424		esac
18425	;;
18426	no|*)
18427		;;
18428esac
18429
18430# Check whether --enable-tfo-server was given.
18431if test "${enable_tfo_server+set}" = set; then :
18432  enableval=$enable_tfo_server;
18433fi
18434
18435case "$enable_tfo_server" in
18436	yes)
18437	      ac_fn_c_check_decl "$LINENO" "TCP_FASTOPEN" "ac_cv_have_decl_TCP_FASTOPEN" "$ac_includes_default
18438#include <netinet/tcp.h>
18439
18440"
18441if test "x$ac_cv_have_decl_TCP_FASTOPEN" = xyes; then :
18442  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Check the platform specific TFO kernel parameters are correctly configured to support server mode TFO" >&5
18443$as_echo "$as_me: WARNING: Check the platform specific TFO kernel parameters are correctly configured to support server mode TFO" >&2;}
18444else
18445  as_fn_error $? "TCP Fast Open is not available for server mode: please rerun without --enable-tfo-server" "$LINENO" 5
18446fi
18447
18448
18449cat >>confdefs.h <<_ACEOF
18450#define USE_TCP_FASTOPEN 1
18451_ACEOF
18452
18453		;;
18454	no|*)
18455		;;
18456esac
18457
18458# check for libevent
18459
18460# Check whether --with-libevent was given.
18461if test "${with_libevent+set}" = set; then :
18462  withval=$with_libevent;
18463else
18464   withval="no"
18465fi
18466
18467if test x_$withval = x_yes -o x_$withval != x_no; then
18468        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libevent" >&5
18469$as_echo_n "checking for libevent... " >&6; }
18470        if test x_$withval = x_ -o x_$withval = x_yes; then
18471            withval="/usr/local /opt/local /usr/lib /usr/pkg /usr/sfw /usr"
18472        fi
18473        for dir in $withval; do
18474            thedir="$dir"
18475            if test -f "$dir/include/event.h" -o -f "$dir/include/event2/event.h"; then
18476                found_libevent="yes"
18477				if test "$thedir" != "/usr"; then
18478                    CPPFLAGS="$CPPFLAGS -I$thedir/include"
18479		fi
18480                break;
18481            fi
18482        done
18483        if test x_$found_libevent != x_yes; then
18484		if test -f "$dir/event.h" -a \( -f "$dir/libevent.la" -o -f "$dir/libev.la" \) ; then
18485			# libevent source directory
18486            		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: found in $thedir" >&5
18487$as_echo "found in $thedir" >&6; }
18488                	CPPFLAGS="$CPPFLAGS -I$thedir -I$thedir/include"
18489			BAK_LDFLAGS_SET="1"
18490			BAK_LDFLAGS="$LDFLAGS"
18491			# remove evdns from linking
18492			mkdir build >/dev/null 2>&1
18493			mkdir build/libevent >/dev/null 2>&1
18494			mkdir build/libevent/.libs >/dev/null 2>&1
18495			ev_files_o=`ls $thedir/*.o | grep -v evdns\.o | grep -v bufferevent_openssl\.o`
18496			ev_files_lo=`ls $thedir/*.lo | grep -v evdns\.lo | grep -v bufferevent_openssl\.lo`
18497			ev_files_libso=`ls $thedir/.libs/*.o | grep -v evdns\.o | grep -v bufferevent_openssl\.o`
18498			cp $ev_files_o build/libevent
18499			cp $ev_files_lo build/libevent
18500			cp $ev_files_libso build/libevent/.libs
18501            		LATE_LDFLAGS="build/libevent/*.lo -lm"
18502			LDFLAGS="build/libevent/*.o $LDFLAGS -lm"
18503		else
18504            		as_fn_error $? "Cannot find the libevent library in $withval
18505You can restart ./configure --with-libevent=no to use a builtin alternative.
18506Please note that this alternative is not as capable as libevent when using
18507large outgoing port ranges.  " "$LINENO" 5
18508		fi
18509        else
18510            { $as_echo "$as_me:${as_lineno-$LINENO}: result: found in $thedir" >&5
18511$as_echo "found in $thedir" >&6; }
18512	    	    if test ! -f $thedir/lib/libevent.a -a ! -f $thedir/lib/libevent.so -a -d "$thedir/lib/event2"; then
18513		    LDFLAGS="$LDFLAGS -L$thedir/lib/event2"
18514
18515	if test "x$enable_rpath" = xyes; then
18516		if echo "$thedir/lib/event2" | grep "^/" >/dev/null; then
18517			RUNTIME_PATH="$RUNTIME_PATH -R$thedir/lib/event2"
18518		fi
18519	fi
18520
18521	    else
18522		    		    if test "$thedir" != "/usr" -a "$thedir" != ""; then
18523			LDFLAGS="$LDFLAGS -L$thedir/lib"
18524
18525	if test "x$enable_rpath" = xyes; then
18526		if echo "$thedir/lib" | grep "^/" >/dev/null; then
18527			RUNTIME_PATH="$RUNTIME_PATH -R$thedir/lib"
18528		fi
18529	fi
18530
18531		    fi
18532	    fi
18533        fi
18534	# check for library used by libevent after 1.3c
18535	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5
18536$as_echo_n "checking for library containing clock_gettime... " >&6; }
18537if ${ac_cv_search_clock_gettime+:} false; then :
18538  $as_echo_n "(cached) " >&6
18539else
18540  ac_func_search_save_LIBS=$LIBS
18541cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18542/* end confdefs.h.  */
18543
18544/* Override any GCC internal prototype to avoid an error.
18545   Use char because int might match the return type of a GCC
18546   builtin and then its argument prototype would still apply.  */
18547#ifdef __cplusplus
18548extern "C"
18549#endif
18550char clock_gettime ();
18551int
18552main ()
18553{
18554return clock_gettime ();
18555  ;
18556  return 0;
18557}
18558_ACEOF
18559for ac_lib in '' rt; do
18560  if test -z "$ac_lib"; then
18561    ac_res="none required"
18562  else
18563    ac_res=-l$ac_lib
18564    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
18565  fi
18566  if ac_fn_c_try_link "$LINENO"; then :
18567  ac_cv_search_clock_gettime=$ac_res
18568fi
18569rm -f core conftest.err conftest.$ac_objext \
18570    conftest$ac_exeext
18571  if ${ac_cv_search_clock_gettime+:} false; then :
18572  break
18573fi
18574done
18575if ${ac_cv_search_clock_gettime+:} false; then :
18576
18577else
18578  ac_cv_search_clock_gettime=no
18579fi
18580rm conftest.$ac_ext
18581LIBS=$ac_func_search_save_LIBS
18582fi
18583{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5
18584$as_echo "$ac_cv_search_clock_gettime" >&6; }
18585ac_res=$ac_cv_search_clock_gettime
18586if test "$ac_res" != no; then :
18587  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
18588
18589fi
18590
18591
18592	# is the event.h header libev or libevent?
18593	for ac_header in event.h
18594do :
18595  ac_fn_c_check_header_compile "$LINENO" "event.h" "ac_cv_header_event_h" "$ac_includes_default
18596"
18597if test "x$ac_cv_header_event_h" = xyes; then :
18598  cat >>confdefs.h <<_ACEOF
18599#define HAVE_EVENT_H 1
18600_ACEOF
18601
18602fi
18603
18604done
18605
18606	ac_fn_c_check_decl "$LINENO" "EV_VERSION_MAJOR" "ac_cv_have_decl_EV_VERSION_MAJOR" "$ac_includes_default
18607#include <event.h>
18608
18609"
18610if test "x$ac_cv_have_decl_EV_VERSION_MAJOR" = xyes; then :
18611
18612		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing event_set" >&5
18613$as_echo_n "checking for library containing event_set... " >&6; }
18614if ${ac_cv_search_event_set+:} false; then :
18615  $as_echo_n "(cached) " >&6
18616else
18617  ac_func_search_save_LIBS=$LIBS
18618cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18619/* end confdefs.h.  */
18620
18621/* Override any GCC internal prototype to avoid an error.
18622   Use char because int might match the return type of a GCC
18623   builtin and then its argument prototype would still apply.  */
18624#ifdef __cplusplus
18625extern "C"
18626#endif
18627char event_set ();
18628int
18629main ()
18630{
18631return event_set ();
18632  ;
18633  return 0;
18634}
18635_ACEOF
18636for ac_lib in '' ev; do
18637  if test -z "$ac_lib"; then
18638    ac_res="none required"
18639  else
18640    ac_res=-l$ac_lib
18641    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
18642  fi
18643  if ac_fn_c_try_link "$LINENO"; then :
18644  ac_cv_search_event_set=$ac_res
18645fi
18646rm -f core conftest.err conftest.$ac_objext \
18647    conftest$ac_exeext
18648  if ${ac_cv_search_event_set+:} false; then :
18649  break
18650fi
18651done
18652if ${ac_cv_search_event_set+:} false; then :
18653
18654else
18655  ac_cv_search_event_set=no
18656fi
18657rm conftest.$ac_ext
18658LIBS=$ac_func_search_save_LIBS
18659fi
18660{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_event_set" >&5
18661$as_echo "$ac_cv_search_event_set" >&6; }
18662ac_res=$ac_cv_search_event_set
18663if test "$ac_res" != no; then :
18664  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
18665
18666fi
18667
18668
18669else
18670
18671		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing event_set" >&5
18672$as_echo_n "checking for library containing event_set... " >&6; }
18673if ${ac_cv_search_event_set+:} false; then :
18674  $as_echo_n "(cached) " >&6
18675else
18676  ac_func_search_save_LIBS=$LIBS
18677cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18678/* end confdefs.h.  */
18679
18680/* Override any GCC internal prototype to avoid an error.
18681   Use char because int might match the return type of a GCC
18682   builtin and then its argument prototype would still apply.  */
18683#ifdef __cplusplus
18684extern "C"
18685#endif
18686char event_set ();
18687int
18688main ()
18689{
18690return event_set ();
18691  ;
18692  return 0;
18693}
18694_ACEOF
18695for ac_lib in '' event; do
18696  if test -z "$ac_lib"; then
18697    ac_res="none required"
18698  else
18699    ac_res=-l$ac_lib
18700    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
18701  fi
18702  if ac_fn_c_try_link "$LINENO"; then :
18703  ac_cv_search_event_set=$ac_res
18704fi
18705rm -f core conftest.err conftest.$ac_objext \
18706    conftest$ac_exeext
18707  if ${ac_cv_search_event_set+:} false; then :
18708  break
18709fi
18710done
18711if ${ac_cv_search_event_set+:} false; then :
18712
18713else
18714  ac_cv_search_event_set=no
18715fi
18716rm conftest.$ac_ext
18717LIBS=$ac_func_search_save_LIBS
18718fi
18719{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_event_set" >&5
18720$as_echo "$ac_cv_search_event_set" >&6; }
18721ac_res=$ac_cv_search_event_set
18722if test "$ac_res" != no; then :
18723  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
18724
18725fi
18726
18727
18728fi
18729
18730	for ac_func in event_base_free
18731do :
18732  ac_fn_c_check_func "$LINENO" "event_base_free" "ac_cv_func_event_base_free"
18733if test "x$ac_cv_func_event_base_free" = xyes; then :
18734  cat >>confdefs.h <<_ACEOF
18735#define HAVE_EVENT_BASE_FREE 1
18736_ACEOF
18737
18738fi
18739done
18740 # only in libevent 1.2 and later
18741	for ac_func in event_base_once
18742do :
18743  ac_fn_c_check_func "$LINENO" "event_base_once" "ac_cv_func_event_base_once"
18744if test "x$ac_cv_func_event_base_once" = xyes; then :
18745  cat >>confdefs.h <<_ACEOF
18746#define HAVE_EVENT_BASE_ONCE 1
18747_ACEOF
18748
18749fi
18750done
18751 # only in libevent 1.4.1 and later
18752	for ac_func in event_base_new
18753do :
18754  ac_fn_c_check_func "$LINENO" "event_base_new" "ac_cv_func_event_base_new"
18755if test "x$ac_cv_func_event_base_new" = xyes; then :
18756  cat >>confdefs.h <<_ACEOF
18757#define HAVE_EVENT_BASE_NEW 1
18758_ACEOF
18759
18760fi
18761done
18762 # only in libevent 1.4.1 and later
18763	for ac_func in event_base_get_method
18764do :
18765  ac_fn_c_check_func "$LINENO" "event_base_get_method" "ac_cv_func_event_base_get_method"
18766if test "x$ac_cv_func_event_base_get_method" = xyes; then :
18767  cat >>confdefs.h <<_ACEOF
18768#define HAVE_EVENT_BASE_GET_METHOD 1
18769_ACEOF
18770
18771fi
18772done
18773 # only in libevent 1.4.3 and later
18774	for ac_func in ev_loop
18775do :
18776  ac_fn_c_check_func "$LINENO" "ev_loop" "ac_cv_func_ev_loop"
18777if test "x$ac_cv_func_ev_loop" = xyes; then :
18778  cat >>confdefs.h <<_ACEOF
18779#define HAVE_EV_LOOP 1
18780_ACEOF
18781
18782fi
18783done
18784 # only in libev. (tested on 3.51)
18785	for ac_func in ev_default_loop
18786do :
18787  ac_fn_c_check_func "$LINENO" "ev_default_loop" "ac_cv_func_ev_default_loop"
18788if test "x$ac_cv_func_ev_default_loop" = xyes; then :
18789  cat >>confdefs.h <<_ACEOF
18790#define HAVE_EV_DEFAULT_LOOP 1
18791_ACEOF
18792
18793fi
18794done
18795 # only in libev. (tested on 4.00)
18796        PC_LIBEVENT_DEPENDENCY="libevent"
18797
18798	if test -n "$BAK_LDFLAGS_SET"; then
18799		LDFLAGS="$BAK_LDFLAGS"
18800	fi
18801else
18802
18803$as_echo "#define USE_MINI_EVENT 1" >>confdefs.h
18804
18805fi
18806
18807# check for libexpat
18808
18809# Check whether --with-libexpat was given.
18810if test "${with_libexpat+set}" = set; then :
18811  withval=$with_libexpat;
18812else
18813   withval="/usr/local /opt/local /usr/lib /usr/pkg /usr/sfw /usr"
18814fi
18815
18816{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for libexpat" >&5
18817$as_echo_n "checking for libexpat... " >&6; }
18818found_libexpat="no"
18819for dir in $withval ; do
18820            if test -f "$dir/include/expat.h"; then
18821		found_libexpat="yes"
18822				if test "$dir" != "/usr"; then
18823                    CPPFLAGS="$CPPFLAGS -I$dir/include"
18824		    LDFLAGS="$LDFLAGS -L$dir/lib"
18825		fi
18826            	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: found in $dir" >&5
18827$as_echo "found in $dir" >&6; }
18828                break;
18829            fi
18830done
18831if test x_$found_libexpat != x_yes; then
18832	as_fn_error $? "Could not find libexpat, expat.h" "$LINENO" 5
18833fi
18834for ac_header in expat.h
18835do :
18836  ac_fn_c_check_header_compile "$LINENO" "expat.h" "ac_cv_header_expat_h" "$ac_includes_default
18837"
18838if test "x$ac_cv_header_expat_h" = xyes; then :
18839  cat >>confdefs.h <<_ACEOF
18840#define HAVE_EXPAT_H 1
18841_ACEOF
18842
18843fi
18844
18845done
18846
18847ac_fn_c_check_decl "$LINENO" "XML_StopParser" "ac_cv_have_decl_XML_StopParser" "$ac_includes_default
18848#include <expat.h>
18849
18850"
18851if test "x$ac_cv_have_decl_XML_StopParser" = xyes; then :
18852  ac_have_decl=1
18853else
18854  ac_have_decl=0
18855fi
18856
18857cat >>confdefs.h <<_ACEOF
18858#define HAVE_DECL_XML_STOPPARSER $ac_have_decl
18859_ACEOF
18860
18861
18862# hiredis (redis C client for cachedb)
18863
18864# Check whether --with-libhiredis was given.
18865if test "${with_libhiredis+set}" = set; then :
18866  withval=$with_libhiredis;
18867else
18868   withval="no"
18869fi
18870
18871{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for libhiredis" >&5
18872$as_echo_n "checking for libhiredis... " >&6; }
18873found_libhiredis="no"
18874if test x_$withval = x_yes -o x_$withval != x_no; then
18875   if test x_$withval = x_ -o x_$withval = x_yes; then
18876            withval="/usr/local /opt/local /usr/lib /usr/pkg /usr/sfw /usr"
18877   fi
18878   for dir in $withval ; do
18879            if test -f "$dir/include/hiredis/hiredis.h"; then
18880		found_libhiredis="yes"
18881				if test "$dir" != "/usr"; then
18882                    CPPFLAGS="$CPPFLAGS -I$dir/include"
18883		    LDFLAGS="$LDFLAGS -L$dir/lib"
18884		fi
18885		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: found in $dir" >&5
18886$as_echo "found in $dir" >&6; }
18887
18888$as_echo "#define USE_REDIS 1" >>confdefs.h
18889
18890		LIBS="$LIBS -lhiredis"
18891                break;
18892            fi
18893    done
18894    if test x_$found_libhiredis != x_yes; then
18895	as_fn_error $? "Could not find libhiredis, hiredis.h" "$LINENO" 5
18896    fi
18897    for ac_header in hiredis/hiredis.h
18898do :
18899  ac_fn_c_check_header_compile "$LINENO" "hiredis/hiredis.h" "ac_cv_header_hiredis_hiredis_h" "$ac_includes_default
18900"
18901if test "x$ac_cv_header_hiredis_hiredis_h" = xyes; then :
18902  cat >>confdefs.h <<_ACEOF
18903#define HAVE_HIREDIS_HIREDIS_H 1
18904_ACEOF
18905
18906fi
18907
18908done
18909
18910    ac_fn_c_check_decl "$LINENO" "redisConnect" "ac_cv_have_decl_redisConnect" "$ac_includes_default
18911    #include <hiredis/hiredis.h>
18912
18913"
18914if test "x$ac_cv_have_decl_redisConnect" = xyes; then :
18915  ac_have_decl=1
18916else
18917  ac_have_decl=0
18918fi
18919
18920cat >>confdefs.h <<_ACEOF
18921#define HAVE_DECL_REDISCONNECT $ac_have_decl
18922_ACEOF
18923
18924fi
18925
18926# set static linking if requested
18927
18928staticexe=""
18929# Check whether --enable-static-exe was given.
18930if test "${enable_static_exe+set}" = set; then :
18931  enableval=$enable_static_exe;
18932fi
18933
18934if test x_$enable_static_exe = x_yes; then
18935	staticexe="-static"
18936	if test "$on_mingw" = yes; then
18937		staticexe="-all-static"
18938		# for static compile, include gdi32 and zlib here.
18939		if echo $LIBS | grep 'lgdi32' >/dev/null; then
18940			:
18941		else
18942			LIBS="$LIBS -lgdi32"
18943		fi
18944		LIBS="$LIBS -lz"
18945	fi
18946fi
18947
18948# Include systemd.m4 - begin
18949#   macros for configuring systemd
18950#   Copyright 2015, Sami Kerola, CloudFlare.
18951#   BSD licensed.
18952# Check whether --enable-systemd was given.
18953if test "${enable_systemd+set}" = set; then :
18954  enableval=$enable_systemd;
18955else
18956  enable_systemd=no
18957fi
18958
18959have_systemd=no
18960
18961
18962
18963
18964
18965
18966
18967if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
18968	if test -n "$ac_tool_prefix"; then
18969  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
18970set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
18971{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18972$as_echo_n "checking for $ac_word... " >&6; }
18973if ${ac_cv_path_PKG_CONFIG+:} false; then :
18974  $as_echo_n "(cached) " >&6
18975else
18976  case $PKG_CONFIG in
18977  [\\/]* | ?:[\\/]*)
18978  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
18979  ;;
18980  *)
18981  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18982for as_dir in $PATH
18983do
18984  IFS=$as_save_IFS
18985  test -z "$as_dir" && as_dir=.
18986    for ac_exec_ext in '' $ac_executable_extensions; do
18987  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18988    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
18989    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18990    break 2
18991  fi
18992done
18993  done
18994IFS=$as_save_IFS
18995
18996  ;;
18997esac
18998fi
18999PKG_CONFIG=$ac_cv_path_PKG_CONFIG
19000if test -n "$PKG_CONFIG"; then
19001  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
19002$as_echo "$PKG_CONFIG" >&6; }
19003else
19004  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19005$as_echo "no" >&6; }
19006fi
19007
19008
19009fi
19010if test -z "$ac_cv_path_PKG_CONFIG"; then
19011  ac_pt_PKG_CONFIG=$PKG_CONFIG
19012  # Extract the first word of "pkg-config", so it can be a program name with args.
19013set dummy pkg-config; ac_word=$2
19014{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19015$as_echo_n "checking for $ac_word... " >&6; }
19016if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
19017  $as_echo_n "(cached) " >&6
19018else
19019  case $ac_pt_PKG_CONFIG in
19020  [\\/]* | ?:[\\/]*)
19021  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
19022  ;;
19023  *)
19024  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19025for as_dir in $PATH
19026do
19027  IFS=$as_save_IFS
19028  test -z "$as_dir" && as_dir=.
19029    for ac_exec_ext in '' $ac_executable_extensions; do
19030  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19031    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
19032    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19033    break 2
19034  fi
19035done
19036  done
19037IFS=$as_save_IFS
19038
19039  ;;
19040esac
19041fi
19042ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
19043if test -n "$ac_pt_PKG_CONFIG"; then
19044  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
19045$as_echo "$ac_pt_PKG_CONFIG" >&6; }
19046else
19047  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19048$as_echo "no" >&6; }
19049fi
19050
19051  if test "x$ac_pt_PKG_CONFIG" = x; then
19052    PKG_CONFIG=""
19053  else
19054    case $cross_compiling:$ac_tool_warned in
19055yes:)
19056{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
19057$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
19058ac_tool_warned=yes ;;
19059esac
19060    PKG_CONFIG=$ac_pt_PKG_CONFIG
19061  fi
19062else
19063  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
19064fi
19065
19066fi
19067if test -n "$PKG_CONFIG"; then
19068	_pkg_min_version=0.9.0
19069	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
19070$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
19071	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
19072		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19073$as_echo "yes" >&6; }
19074	else
19075		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19076$as_echo "no" >&6; }
19077		PKG_CONFIG=""
19078	fi
19079fi
19080if test "x$enable_systemd" != xno; then :
19081
19082
19083
19084pkg_failed=no
19085{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for SYSTEMD" >&5
19086$as_echo_n "checking for SYSTEMD... " >&6; }
19087
19088if test -n "$SYSTEMD_CFLAGS"; then
19089    pkg_cv_SYSTEMD_CFLAGS="$SYSTEMD_CFLAGS"
19090 elif test -n "$PKG_CONFIG"; then
19091    if test -n "$PKG_CONFIG" && \
19092    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libsystemd\""; } >&5
19093  ($PKG_CONFIG --exists --print-errors "libsystemd") 2>&5
19094  ac_status=$?
19095  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19096  test $ac_status = 0; }; then
19097  pkg_cv_SYSTEMD_CFLAGS=`$PKG_CONFIG --cflags "libsystemd" 2>/dev/null`
19098		      test "x$?" != "x0" && pkg_failed=yes
19099else
19100  pkg_failed=yes
19101fi
19102 else
19103    pkg_failed=untried
19104fi
19105if test -n "$SYSTEMD_LIBS"; then
19106    pkg_cv_SYSTEMD_LIBS="$SYSTEMD_LIBS"
19107 elif test -n "$PKG_CONFIG"; then
19108    if test -n "$PKG_CONFIG" && \
19109    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libsystemd\""; } >&5
19110  ($PKG_CONFIG --exists --print-errors "libsystemd") 2>&5
19111  ac_status=$?
19112  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19113  test $ac_status = 0; }; then
19114  pkg_cv_SYSTEMD_LIBS=`$PKG_CONFIG --libs "libsystemd" 2>/dev/null`
19115		      test "x$?" != "x0" && pkg_failed=yes
19116else
19117  pkg_failed=yes
19118fi
19119 else
19120    pkg_failed=untried
19121fi
19122
19123
19124
19125if test $pkg_failed = yes; then
19126   	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19127$as_echo "no" >&6; }
19128
19129if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
19130        _pkg_short_errors_supported=yes
19131else
19132        _pkg_short_errors_supported=no
19133fi
19134        if test $_pkg_short_errors_supported = yes; then
19135	        SYSTEMD_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libsystemd" 2>&1`
19136        else
19137	        SYSTEMD_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libsystemd" 2>&1`
19138        fi
19139	# Put the nasty error message in config.log where it belongs
19140	echo "$SYSTEMD_PKG_ERRORS" >&5
19141
19142	have_systemd=no
19143elif test $pkg_failed = untried; then
19144     	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19145$as_echo "no" >&6; }
19146	have_systemd=no
19147else
19148	SYSTEMD_CFLAGS=$pkg_cv_SYSTEMD_CFLAGS
19149	SYSTEMD_LIBS=$pkg_cv_SYSTEMD_LIBS
19150        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19151$as_echo "yes" >&6; }
19152	have_systemd=yes
19153fi
19154		if test "x$have_systemd" != "xyes"; then :
19155
19156
19157pkg_failed=no
19158{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for SYSTEMD_DAEMON" >&5
19159$as_echo_n "checking for SYSTEMD_DAEMON... " >&6; }
19160
19161if test -n "$SYSTEMD_DAEMON_CFLAGS"; then
19162    pkg_cv_SYSTEMD_DAEMON_CFLAGS="$SYSTEMD_DAEMON_CFLAGS"
19163 elif test -n "$PKG_CONFIG"; then
19164    if test -n "$PKG_CONFIG" && \
19165    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libsystemd-daemon\""; } >&5
19166  ($PKG_CONFIG --exists --print-errors "libsystemd-daemon") 2>&5
19167  ac_status=$?
19168  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19169  test $ac_status = 0; }; then
19170  pkg_cv_SYSTEMD_DAEMON_CFLAGS=`$PKG_CONFIG --cflags "libsystemd-daemon" 2>/dev/null`
19171		      test "x$?" != "x0" && pkg_failed=yes
19172else
19173  pkg_failed=yes
19174fi
19175 else
19176    pkg_failed=untried
19177fi
19178if test -n "$SYSTEMD_DAEMON_LIBS"; then
19179    pkg_cv_SYSTEMD_DAEMON_LIBS="$SYSTEMD_DAEMON_LIBS"
19180 elif test -n "$PKG_CONFIG"; then
19181    if test -n "$PKG_CONFIG" && \
19182    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libsystemd-daemon\""; } >&5
19183  ($PKG_CONFIG --exists --print-errors "libsystemd-daemon") 2>&5
19184  ac_status=$?
19185  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19186  test $ac_status = 0; }; then
19187  pkg_cv_SYSTEMD_DAEMON_LIBS=`$PKG_CONFIG --libs "libsystemd-daemon" 2>/dev/null`
19188		      test "x$?" != "x0" && pkg_failed=yes
19189else
19190  pkg_failed=yes
19191fi
19192 else
19193    pkg_failed=untried
19194fi
19195
19196
19197
19198if test $pkg_failed = yes; then
19199   	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19200$as_echo "no" >&6; }
19201
19202if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
19203        _pkg_short_errors_supported=yes
19204else
19205        _pkg_short_errors_supported=no
19206fi
19207        if test $_pkg_short_errors_supported = yes; then
19208	        SYSTEMD_DAEMON_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libsystemd-daemon" 2>&1`
19209        else
19210	        SYSTEMD_DAEMON_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libsystemd-daemon" 2>&1`
19211        fi
19212	# Put the nasty error message in config.log where it belongs
19213	echo "$SYSTEMD_DAEMON_PKG_ERRORS" >&5
19214
19215	have_systemd_daemon=no
19216elif test $pkg_failed = untried; then
19217     	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19218$as_echo "no" >&6; }
19219	have_systemd_daemon=no
19220else
19221	SYSTEMD_DAEMON_CFLAGS=$pkg_cv_SYSTEMD_DAEMON_CFLAGS
19222	SYSTEMD_DAEMON_LIBS=$pkg_cv_SYSTEMD_DAEMON_LIBS
19223        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19224$as_echo "yes" >&6; }
19225	have_systemd_daemon=yes
19226fi
19227		if test "x$have_systemd_daemon" = "xyes"; then :
19228  have_systemd=yes
19229fi
19230
19231fi
19232	case $enable_systemd:$have_systemd in #(
19233  yes:no) :
19234    as_fn_error $? "systemd enabled but libsystemd not found" "$LINENO" 5 ;; #(
19235  *:yes) :
19236
19237$as_echo "#define HAVE_SYSTEMD 1" >>confdefs.h
19238
19239		LIBS="$LIBS $SYSTEMD_LIBS"
19240
19241	 ;; #(
19242  *) :
19243     ;;
19244esac
19245
19246
19247fi
19248 if test "x$have_systemd" = xyes; then
19249  USE_SYSTEMD_TRUE=
19250  USE_SYSTEMD_FALSE='#'
19251else
19252  USE_SYSTEMD_TRUE='#'
19253  USE_SYSTEMD_FALSE=
19254fi
19255
19256
19257# Include systemd.m4 - end
19258
19259# set lock checking if requested
19260# Check whether --enable-lock_checks was given.
19261if test "${enable_lock_checks+set}" = set; then :
19262  enableval=$enable_lock_checks;
19263fi
19264
19265if test x_$enable_lock_checks = x_yes; then
19266
19267$as_echo "#define ENABLE_LOCK_CHECKS 1" >>confdefs.h
19268
19269	CHECKLOCK_OBJ="checklocks.lo"
19270
19271fi
19272
19273
19274{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
19275$as_echo_n "checking for getaddrinfo... " >&6; }
19276ac_cv_func_getaddrinfo=no
19277cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19278/* end confdefs.h.  */
19279
19280#ifdef __cplusplus
19281extern "C"
19282{
19283#endif
19284char* getaddrinfo();
19285char* (*f) () = getaddrinfo;
19286#ifdef __cplusplus
19287}
19288#endif
19289int main() {
19290        ;
19291        return 0;
19292}
19293
19294_ACEOF
19295if ac_fn_c_try_link "$LINENO"; then :
19296  ac_cv_func_getaddrinfo="yes"
19297if test "$ac_cv_header_windows_h" = "yes"; then
19298
19299$as_echo "#define USE_WINSOCK 1" >>confdefs.h
19300
19301	USE_WINSOCK="1"
19302	if echo $LIBS | grep 'lws2_32' >/dev/null; then
19303		:
19304	else
19305		LIBS="$LIBS -lws2_32"
19306	fi
19307fi
19308
19309else
19310  ORIGLIBS="$LIBS"
19311LIBS="$LIBS -lws2_32"
19312cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19313/* end confdefs.h.  */
19314
19315#ifdef HAVE_WS2TCPIP_H
19316#include <ws2tcpip.h>
19317#endif
19318
19319int
19320main ()
19321{
19322
19323        (void)getaddrinfo(NULL, NULL, NULL, NULL);
19324
19325
19326  ;
19327  return 0;
19328}
19329_ACEOF
19330if ac_fn_c_try_link "$LINENO"; then :
19331
19332ac_cv_func_getaddrinfo="yes"
19333
19334$as_echo "#define USE_WINSOCK 1" >>confdefs.h
19335
19336USE_WINSOCK="1"
19337
19338else
19339
19340ac_cv_func_getaddrinfo="no"
19341LIBS="$ORIGLIBS"
19342
19343fi
19344rm -f core conftest.err conftest.$ac_objext \
19345    conftest$ac_exeext conftest.$ac_ext
19346
19347fi
19348rm -f core conftest.err conftest.$ac_objext \
19349    conftest$ac_exeext conftest.$ac_ext
19350
19351{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_getaddrinfo" >&5
19352$as_echo "$ac_cv_func_getaddrinfo" >&6; }
19353if test $ac_cv_func_getaddrinfo = yes; then
19354
19355$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
19356
19357fi
19358
19359if test "$USE_WINSOCK" = 1; then
19360
19361$as_echo "#define UB_ON_WINDOWS 1" >>confdefs.h
19362
19363	for ac_header in iphlpapi.h
19364do :
19365  ac_fn_c_check_header_compile "$LINENO" "iphlpapi.h" "ac_cv_header_iphlpapi_h" "$ac_includes_default
19366#include <windows.h>
19367
19368"
19369if test "x$ac_cv_header_iphlpapi_h" = xyes; then :
19370  cat >>confdefs.h <<_ACEOF
19371#define HAVE_IPHLPAPI_H 1
19372_ACEOF
19373
19374fi
19375
19376done
19377
19378	if test -n "$ac_tool_prefix"; then
19379  # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
19380set dummy ${ac_tool_prefix}windres; ac_word=$2
19381{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19382$as_echo_n "checking for $ac_word... " >&6; }
19383if ${ac_cv_prog_WINDRES+:} false; then :
19384  $as_echo_n "(cached) " >&6
19385else
19386  if test -n "$WINDRES"; then
19387  ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
19388else
19389as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19390for as_dir in $PATH
19391do
19392  IFS=$as_save_IFS
19393  test -z "$as_dir" && as_dir=.
19394    for ac_exec_ext in '' $ac_executable_extensions; do
19395  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19396    ac_cv_prog_WINDRES="${ac_tool_prefix}windres"
19397    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19398    break 2
19399  fi
19400done
19401  done
19402IFS=$as_save_IFS
19403
19404fi
19405fi
19406WINDRES=$ac_cv_prog_WINDRES
19407if test -n "$WINDRES"; then
19408  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINDRES" >&5
19409$as_echo "$WINDRES" >&6; }
19410else
19411  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19412$as_echo "no" >&6; }
19413fi
19414
19415
19416fi
19417if test -z "$ac_cv_prog_WINDRES"; then
19418  ac_ct_WINDRES=$WINDRES
19419  # Extract the first word of "windres", so it can be a program name with args.
19420set dummy windres; ac_word=$2
19421{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19422$as_echo_n "checking for $ac_word... " >&6; }
19423if ${ac_cv_prog_ac_ct_WINDRES+:} false; then :
19424  $as_echo_n "(cached) " >&6
19425else
19426  if test -n "$ac_ct_WINDRES"; then
19427  ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # Let the user override the test.
19428else
19429as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19430for as_dir in $PATH
19431do
19432  IFS=$as_save_IFS
19433  test -z "$as_dir" && as_dir=.
19434    for ac_exec_ext in '' $ac_executable_extensions; do
19435  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19436    ac_cv_prog_ac_ct_WINDRES="windres"
19437    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19438    break 2
19439  fi
19440done
19441  done
19442IFS=$as_save_IFS
19443
19444fi
19445fi
19446ac_ct_WINDRES=$ac_cv_prog_ac_ct_WINDRES
19447if test -n "$ac_ct_WINDRES"; then
19448  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_WINDRES" >&5
19449$as_echo "$ac_ct_WINDRES" >&6; }
19450else
19451  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19452$as_echo "no" >&6; }
19453fi
19454
19455  if test "x$ac_ct_WINDRES" = x; then
19456    WINDRES=""
19457  else
19458    case $cross_compiling:$ac_tool_warned in
19459yes:)
19460{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
19461$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
19462ac_tool_warned=yes ;;
19463esac
19464    WINDRES=$ac_ct_WINDRES
19465  fi
19466else
19467  WINDRES="$ac_cv_prog_WINDRES"
19468fi
19469
19470	LIBS="$LIBS -liphlpapi"
19471	WINAPPS="unbound-service-install.exe unbound-service-remove.exe anchor-update.exe"
19472
19473	WIN_DAEMON_SRC="winrc/win_svc.c winrc/w_inst.c"
19474
19475	WIN_DAEMON_OBJ="win_svc.lo w_inst.lo"
19476
19477	WIN_DAEMON_OBJ_LINK="rsrc_unbound.o"
19478
19479	WIN_HOST_OBJ_LINK="rsrc_unbound_host.o"
19480
19481	WIN_UBANCHOR_OBJ_LINK="rsrc_unbound_anchor.o log.lo locks.lo"
19482
19483	WIN_CONTROL_OBJ_LINK="rsrc_unbound_control.o"
19484
19485	WIN_CHECKCONF_OBJ_LINK="rsrc_unbound_checkconf.o"
19486
19487fi
19488if test $ac_cv_func_getaddrinfo = no; then
19489	case " $LIBOBJS " in
19490  *" fake-rfc2553.$ac_objext "* ) ;;
19491  *) LIBOBJS="$LIBOBJS fake-rfc2553.$ac_objext"
19492 ;;
19493esac
19494
19495fi
19496# check after getaddrinfo for its libraries
19497
19498# check ioctlsocket
19499{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ioctlsocket" >&5
19500$as_echo_n "checking for ioctlsocket... " >&6; }
19501cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19502/* end confdefs.h.  */
19503
19504#ifdef HAVE_WINSOCK2_H
19505#include <winsock2.h>
19506#endif
19507
19508int
19509main ()
19510{
19511
19512	(void)ioctlsocket(0, 0, NULL);
19513
19514  ;
19515  return 0;
19516}
19517_ACEOF
19518if ac_fn_c_try_link "$LINENO"; then :
19519
19520{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19521$as_echo "yes" >&6; }
19522
19523$as_echo "#define HAVE_IOCTLSOCKET 1" >>confdefs.h
19524
19525
19526else
19527  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19528$as_echo "no" >&6; }
19529fi
19530rm -f core conftest.err conftest.$ac_objext \
19531    conftest$ac_exeext conftest.$ac_ext
19532
19533
19534# see if daemon(3) exists, and if it is deprecated.
19535for ac_func in daemon
19536do :
19537  ac_fn_c_check_func "$LINENO" "daemon" "ac_cv_func_daemon"
19538if test "x$ac_cv_func_daemon" = xyes; then :
19539  cat >>confdefs.h <<_ACEOF
19540#define HAVE_DAEMON 1
19541_ACEOF
19542
19543fi
19544done
19545
19546if test $ac_cv_func_daemon = yes; then
19547
19548
19549{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if daemon is deprecated" >&5
19550$as_echo_n "checking if daemon is deprecated... " >&6; }
19551cache=`echo daemon | sed 'y%.=/+-%___p_%'`
19552if eval \${cv_cc_deprecated_$cache+:} false; then :
19553  $as_echo_n "(cached) " >&6
19554else
19555
19556echo '
19557#include <stdlib.h>
19558' >conftest.c
19559echo 'void f(){ (void)daemon(0, 0); }' >>conftest.c
19560if test -z "`$CC -c conftest.c 2>&1 | grep deprecated`"; then
19561eval "cv_cc_deprecated_$cache=no"
19562else
19563eval "cv_cc_deprecated_$cache=yes"
19564fi
19565rm -f conftest conftest.o conftest.c
19566
19567fi
19568
19569if eval "test \"`echo '$cv_cc_deprecated_'$cache`\" = yes"; then
19570{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19571$as_echo "yes" >&6; }
19572
19573cat >>confdefs.h <<_ACEOF
19574#define DEPRECATED_DAEMON 1
19575_ACEOF
19576
19577:
19578
19579else
19580{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19581$as_echo "no" >&6; }
19582:
19583
19584fi
19585
19586fi
19587
19588ac_fn_c_check_member "$LINENO" "struct sockaddr_un" "sun_len" "ac_cv_member_struct_sockaddr_un_sun_len" "
19589$ac_includes_default
19590#ifdef HAVE_SYS_UN_H
19591#include <sys/un.h>
19592#endif
19593
19594"
19595if test "x$ac_cv_member_struct_sockaddr_un_sun_len" = xyes; then :
19596
19597cat >>confdefs.h <<_ACEOF
19598#define HAVE_STRUCT_SOCKADDR_UN_SUN_LEN 1
19599_ACEOF
19600
19601
19602fi
19603
19604ac_fn_c_check_member "$LINENO" "struct in_pktinfo" "ipi_spec_dst" "ac_cv_member_struct_in_pktinfo_ipi_spec_dst" "
19605$ac_includes_default
19606#if HAVE_SYS_PARAM_H
19607#include <sys/param.h>
19608#endif
19609
19610#ifdef HAVE_SYS_SOCKET_H
19611#include <sys/socket.h>
19612#endif
19613
19614#ifdef HAVE_SYS_UIO_H
19615#include <sys/uio.h>
19616#endif
19617
19618#ifdef HAVE_NETINET_IN_H
19619#include <netinet/in.h>
19620#endif
19621
19622#ifdef HAVE_NETINET_TCP_H
19623#include <netinet/tcp.h>
19624#endif
19625
19626#ifdef HAVE_ARPA_INET_H
19627#include <arpa/inet.h>
19628#endif
19629
19630#ifdef HAVE_WINSOCK2_H
19631#include <winsock2.h>
19632#endif
19633
19634#ifdef HAVE_WS2TCPIP_H
19635#include <ws2tcpip.h>
19636#endif
19637
19638"
19639if test "x$ac_cv_member_struct_in_pktinfo_ipi_spec_dst" = xyes; then :
19640
19641cat >>confdefs.h <<_ACEOF
19642#define HAVE_STRUCT_IN_PKTINFO_IPI_SPEC_DST 1
19643_ACEOF
19644
19645
19646fi
19647
19648{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing setusercontext" >&5
19649$as_echo_n "checking for library containing setusercontext... " >&6; }
19650if ${ac_cv_search_setusercontext+:} false; then :
19651  $as_echo_n "(cached) " >&6
19652else
19653  ac_func_search_save_LIBS=$LIBS
19654cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19655/* end confdefs.h.  */
19656
19657/* Override any GCC internal prototype to avoid an error.
19658   Use char because int might match the return type of a GCC
19659   builtin and then its argument prototype would still apply.  */
19660#ifdef __cplusplus
19661extern "C"
19662#endif
19663char setusercontext ();
19664int
19665main ()
19666{
19667return setusercontext ();
19668  ;
19669  return 0;
19670}
19671_ACEOF
19672for ac_lib in '' util; do
19673  if test -z "$ac_lib"; then
19674    ac_res="none required"
19675  else
19676    ac_res=-l$ac_lib
19677    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
19678  fi
19679  if ac_fn_c_try_link "$LINENO"; then :
19680  ac_cv_search_setusercontext=$ac_res
19681fi
19682rm -f core conftest.err conftest.$ac_objext \
19683    conftest$ac_exeext
19684  if ${ac_cv_search_setusercontext+:} false; then :
19685  break
19686fi
19687done
19688if ${ac_cv_search_setusercontext+:} false; then :
19689
19690else
19691  ac_cv_search_setusercontext=no
19692fi
19693rm conftest.$ac_ext
19694LIBS=$ac_func_search_save_LIBS
19695fi
19696{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_setusercontext" >&5
19697$as_echo "$ac_cv_search_setusercontext" >&6; }
19698ac_res=$ac_cv_search_setusercontext
19699if test "$ac_res" != no; then :
19700  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
19701
19702fi
19703
19704for ac_func in tzset sigprocmask fcntl getpwnam endpwent getrlimit setrlimit setsid chroot kill chown sleep usleep random srandom recvmsg sendmsg writev socketpair glob initgroups strftime localtime_r setusercontext _beginthreadex endservent endprotoent fsync shmget
19705do :
19706  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
19707ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
19708if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
19709  cat >>confdefs.h <<_ACEOF
19710#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
19711_ACEOF
19712
19713fi
19714done
19715
19716for ac_func in setresuid
19717do :
19718  ac_fn_c_check_func "$LINENO" "setresuid" "ac_cv_func_setresuid"
19719if test "x$ac_cv_func_setresuid" = xyes; then :
19720  cat >>confdefs.h <<_ACEOF
19721#define HAVE_SETRESUID 1
19722_ACEOF
19723
19724else
19725  for ac_func in setreuid
19726do :
19727  ac_fn_c_check_func "$LINENO" "setreuid" "ac_cv_func_setreuid"
19728if test "x$ac_cv_func_setreuid" = xyes; then :
19729  cat >>confdefs.h <<_ACEOF
19730#define HAVE_SETREUID 1
19731_ACEOF
19732
19733fi
19734done
19735
19736fi
19737done
19738
19739for ac_func in setresgid
19740do :
19741  ac_fn_c_check_func "$LINENO" "setresgid" "ac_cv_func_setresgid"
19742if test "x$ac_cv_func_setresgid" = xyes; then :
19743  cat >>confdefs.h <<_ACEOF
19744#define HAVE_SETRESGID 1
19745_ACEOF
19746
19747else
19748  for ac_func in setregid
19749do :
19750  ac_fn_c_check_func "$LINENO" "setregid" "ac_cv_func_setregid"
19751if test "x$ac_cv_func_setregid" = xyes; then :
19752  cat >>confdefs.h <<_ACEOF
19753#define HAVE_SETREGID 1
19754_ACEOF
19755
19756fi
19757done
19758
19759fi
19760done
19761
19762
19763# check if setreuid en setregid fail, on MacOSX10.4(darwin8).
19764if echo $build_os | grep darwin8 > /dev/null; then
19765
19766$as_echo "#define DARWIN_BROKEN_SETREUID 1" >>confdefs.h
19767
19768fi
19769ac_fn_c_check_decl "$LINENO" "inet_pton" "ac_cv_have_decl_inet_pton" "
19770$ac_includes_default
19771#ifdef HAVE_NETINET_IN_H
19772#include <netinet/in.h>
19773#endif
19774
19775#ifdef HAVE_NETINET_TCP_H
19776#include <netinet/tcp.h>
19777#endif
19778
19779#ifdef HAVE_ARPA_INET_H
19780#include <arpa/inet.h>
19781#endif
19782
19783#ifdef HAVE_WINSOCK2_H
19784#include <winsock2.h>
19785#endif
19786
19787#ifdef HAVE_WS2TCPIP_H
19788#include <ws2tcpip.h>
19789#endif
19790
19791"
19792if test "x$ac_cv_have_decl_inet_pton" = xyes; then :
19793  ac_have_decl=1
19794else
19795  ac_have_decl=0
19796fi
19797
19798cat >>confdefs.h <<_ACEOF
19799#define HAVE_DECL_INET_PTON $ac_have_decl
19800_ACEOF
19801ac_fn_c_check_decl "$LINENO" "inet_ntop" "ac_cv_have_decl_inet_ntop" "
19802$ac_includes_default
19803#ifdef HAVE_NETINET_IN_H
19804#include <netinet/in.h>
19805#endif
19806
19807#ifdef HAVE_NETINET_TCP_H
19808#include <netinet/tcp.h>
19809#endif
19810
19811#ifdef HAVE_ARPA_INET_H
19812#include <arpa/inet.h>
19813#endif
19814
19815#ifdef HAVE_WINSOCK2_H
19816#include <winsock2.h>
19817#endif
19818
19819#ifdef HAVE_WS2TCPIP_H
19820#include <ws2tcpip.h>
19821#endif
19822
19823"
19824if test "x$ac_cv_have_decl_inet_ntop" = xyes; then :
19825  ac_have_decl=1
19826else
19827  ac_have_decl=0
19828fi
19829
19830cat >>confdefs.h <<_ACEOF
19831#define HAVE_DECL_INET_NTOP $ac_have_decl
19832_ACEOF
19833
19834ac_fn_c_check_func "$LINENO" "inet_aton" "ac_cv_func_inet_aton"
19835if test "x$ac_cv_func_inet_aton" = xyes; then :
19836  $as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
19837
19838else
19839  case " $LIBOBJS " in
19840  *" inet_aton.$ac_objext "* ) ;;
19841  *) LIBOBJS="$LIBOBJS inet_aton.$ac_objext"
19842 ;;
19843esac
19844
19845fi
19846
19847
19848ac_fn_c_check_func "$LINENO" "inet_pton" "ac_cv_func_inet_pton"
19849if test "x$ac_cv_func_inet_pton" = xyes; then :
19850  $as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
19851
19852else
19853  case " $LIBOBJS " in
19854  *" inet_pton.$ac_objext "* ) ;;
19855  *) LIBOBJS="$LIBOBJS inet_pton.$ac_objext"
19856 ;;
19857esac
19858
19859fi
19860
19861
19862ac_fn_c_check_func "$LINENO" "inet_ntop" "ac_cv_func_inet_ntop"
19863if test "x$ac_cv_func_inet_ntop" = xyes; then :
19864  $as_echo "#define HAVE_INET_NTOP 1" >>confdefs.h
19865
19866else
19867  case " $LIBOBJS " in
19868  *" inet_ntop.$ac_objext "* ) ;;
19869  *) LIBOBJS="$LIBOBJS inet_ntop.$ac_objext"
19870 ;;
19871esac
19872
19873fi
19874
19875
19876ac_fn_c_check_func "$LINENO" "snprintf" "ac_cv_func_snprintf"
19877if test "x$ac_cv_func_snprintf" = xyes; then :
19878  $as_echo "#define HAVE_SNPRINTF 1" >>confdefs.h
19879
19880else
19881  case " $LIBOBJS " in
19882  *" snprintf.$ac_objext "* ) ;;
19883  *) LIBOBJS="$LIBOBJS snprintf.$ac_objext"
19884 ;;
19885esac
19886
19887fi
19888
19889
19890# test if snprintf return the proper length
19891if test "x$ac_cv_func_snprintf" = xyes; then
19892    if test c${cross_compiling} = cno; then
19893	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for correct snprintf return value" >&5
19894$as_echo_n "checking for correct snprintf return value... " >&6; }
19895	if test "$cross_compiling" = yes; then :
19896  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
19897$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
19898as_fn_error $? "cannot run test program while cross compiling
19899See \`config.log' for more details" "$LINENO" 5; }
19900else
19901  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19902/* end confdefs.h.  */
19903$ac_includes_default
19904
19905int main(void) { return !(snprintf(NULL, 0, "test") == 4); }
19906
19907_ACEOF
19908if ac_fn_c_try_run "$LINENO"; then :
19909  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19910$as_echo "yes" >&6; }
19911else
19912
19913		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19914$as_echo "no" >&6; }
19915
19916$as_echo "#define SNPRINTF_RET_BROKEN /**/" >>confdefs.h
19917
19918		case " $LIBOBJS " in
19919  *" snprintf.$ac_objext "* ) ;;
19920  *) LIBOBJS="$LIBOBJS snprintf.$ac_objext"
19921 ;;
19922esac
19923
19924
19925fi
19926rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19927  conftest.$ac_objext conftest.beam conftest.$ac_ext
19928fi
19929
19930    fi
19931fi
19932ac_fn_c_check_func "$LINENO" "strlcat" "ac_cv_func_strlcat"
19933if test "x$ac_cv_func_strlcat" = xyes; then :
19934  $as_echo "#define HAVE_STRLCAT 1" >>confdefs.h
19935
19936else
19937  case " $LIBOBJS " in
19938  *" strlcat.$ac_objext "* ) ;;
19939  *) LIBOBJS="$LIBOBJS strlcat.$ac_objext"
19940 ;;
19941esac
19942
19943fi
19944
19945
19946ac_fn_c_check_func "$LINENO" "strlcpy" "ac_cv_func_strlcpy"
19947if test "x$ac_cv_func_strlcpy" = xyes; then :
19948  $as_echo "#define HAVE_STRLCPY 1" >>confdefs.h
19949
19950else
19951  case " $LIBOBJS " in
19952  *" strlcpy.$ac_objext "* ) ;;
19953  *) LIBOBJS="$LIBOBJS strlcpy.$ac_objext"
19954 ;;
19955esac
19956
19957fi
19958
19959
19960ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove"
19961if test "x$ac_cv_func_memmove" = xyes; then :
19962  $as_echo "#define HAVE_MEMMOVE 1" >>confdefs.h
19963
19964else
19965  case " $LIBOBJS " in
19966  *" memmove.$ac_objext "* ) ;;
19967  *) LIBOBJS="$LIBOBJS memmove.$ac_objext"
19968 ;;
19969esac
19970
19971fi
19972
19973
19974ac_fn_c_check_func "$LINENO" "gmtime_r" "ac_cv_func_gmtime_r"
19975if test "x$ac_cv_func_gmtime_r" = xyes; then :
19976  $as_echo "#define HAVE_GMTIME_R 1" >>confdefs.h
19977
19978else
19979  case " $LIBOBJS " in
19980  *" gmtime_r.$ac_objext "* ) ;;
19981  *) LIBOBJS="$LIBOBJS gmtime_r.$ac_objext"
19982 ;;
19983esac
19984
19985fi
19986
19987
19988ac_fn_c_check_func "$LINENO" "isblank" "ac_cv_func_isblank"
19989if test "x$ac_cv_func_isblank" = xyes; then :
19990  $as_echo "#define HAVE_ISBLANK 1" >>confdefs.h
19991
19992else
19993  case " $LIBOBJS " in
19994  *" isblank.$ac_objext "* ) ;;
19995  *) LIBOBJS="$LIBOBJS isblank.$ac_objext"
19996 ;;
19997esac
19998
19999fi
20000
20001
20002LIBOBJ_WITHOUT_CTIMEARC4="$LIBOBJS"
20003
20004ac_fn_c_check_func "$LINENO" "reallocarray" "ac_cv_func_reallocarray"
20005if test "x$ac_cv_func_reallocarray" = xyes; then :
20006  $as_echo "#define HAVE_REALLOCARRAY 1" >>confdefs.h
20007
20008else
20009  case " $LIBOBJS " in
20010  *" reallocarray.$ac_objext "* ) ;;
20011  *) LIBOBJS="$LIBOBJS reallocarray.$ac_objext"
20012 ;;
20013esac
20014
20015fi
20016
20017
20018if test "$USE_NSS" = "no"; then
20019	ac_fn_c_check_func "$LINENO" "arc4random" "ac_cv_func_arc4random"
20020if test "x$ac_cv_func_arc4random" = xyes; then :
20021  $as_echo "#define HAVE_ARC4RANDOM 1" >>confdefs.h
20022
20023else
20024  case " $LIBOBJS " in
20025  *" arc4random.$ac_objext "* ) ;;
20026  *) LIBOBJS="$LIBOBJS arc4random.$ac_objext"
20027 ;;
20028esac
20029
20030fi
20031
20032
20033	ac_fn_c_check_func "$LINENO" "arc4random_uniform" "ac_cv_func_arc4random_uniform"
20034if test "x$ac_cv_func_arc4random_uniform" = xyes; then :
20035  $as_echo "#define HAVE_ARC4RANDOM_UNIFORM 1" >>confdefs.h
20036
20037else
20038  case " $LIBOBJS " in
20039  *" arc4random_uniform.$ac_objext "* ) ;;
20040  *) LIBOBJS="$LIBOBJS arc4random_uniform.$ac_objext"
20041 ;;
20042esac
20043
20044fi
20045
20046
20047	if test "$ac_cv_func_arc4random" = "no"; then
20048		case " $LIBOBJS " in
20049  *" explicit_bzero.$ac_objext "* ) ;;
20050  *) LIBOBJS="$LIBOBJS explicit_bzero.$ac_objext"
20051 ;;
20052esac
20053
20054		case " $LIBOBJS " in
20055  *" arc4_lock.$ac_objext "* ) ;;
20056  *) LIBOBJS="$LIBOBJS arc4_lock.$ac_objext"
20057 ;;
20058esac
20059
20060		for ac_func in getentropy
20061do :
20062  ac_fn_c_check_func "$LINENO" "getentropy" "ac_cv_func_getentropy"
20063if test "x$ac_cv_func_getentropy" = xyes; then :
20064  cat >>confdefs.h <<_ACEOF
20065#define HAVE_GETENTROPY 1
20066_ACEOF
20067
20068else
20069
20070		    if test "$USE_WINSOCK" = 1; then
20071			case " $LIBOBJS " in
20072  *" getentropy_win.$ac_objext "* ) ;;
20073  *) LIBOBJS="$LIBOBJS getentropy_win.$ac_objext"
20074 ;;
20075esac
20076
20077		    else
20078			case "$host" in
20079			Darwin|*darwin*)
20080				case " $LIBOBJS " in
20081  *" getentropy_osx.$ac_objext "* ) ;;
20082  *) LIBOBJS="$LIBOBJS getentropy_osx.$ac_objext"
20083 ;;
20084esac
20085
20086			;;
20087			*solaris*|*sunos*|SunOS)
20088				case " $LIBOBJS " in
20089  *" getentropy_solaris.$ac_objext "* ) ;;
20090  *) LIBOBJS="$LIBOBJS getentropy_solaris.$ac_objext"
20091 ;;
20092esac
20093
20094				for ac_header in sys/sha2.h
20095do :
20096  ac_fn_c_check_header_compile "$LINENO" "sys/sha2.h" "ac_cv_header_sys_sha2_h" "$ac_includes_default
20097"
20098if test "x$ac_cv_header_sys_sha2_h" = xyes; then :
20099  cat >>confdefs.h <<_ACEOF
20100#define HAVE_SYS_SHA2_H 1
20101_ACEOF
20102
20103else
20104
20105					for ac_func in SHA512_Update
20106do :
20107  ac_fn_c_check_func "$LINENO" "SHA512_Update" "ac_cv_func_SHA512_Update"
20108if test "x$ac_cv_func_SHA512_Update" = xyes; then :
20109  cat >>confdefs.h <<_ACEOF
20110#define HAVE_SHA512_UPDATE 1
20111_ACEOF
20112
20113else
20114
20115						case " $LIBOBJS " in
20116  *" sha512.$ac_objext "* ) ;;
20117  *) LIBOBJS="$LIBOBJS sha512.$ac_objext"
20118 ;;
20119esac
20120
20121
20122fi
20123done
20124
20125
20126fi
20127
20128done
20129
20130				if test "$ac_cv_header_sys_sha2_h" = "yes"; then
20131					# this lib needed for sha2 on solaris
20132					LIBS="$LIBS -lmd"
20133				fi
20134				{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5
20135$as_echo_n "checking for library containing clock_gettime... " >&6; }
20136if ${ac_cv_search_clock_gettime+:} false; then :
20137  $as_echo_n "(cached) " >&6
20138else
20139  ac_func_search_save_LIBS=$LIBS
20140cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20141/* end confdefs.h.  */
20142
20143/* Override any GCC internal prototype to avoid an error.
20144   Use char because int might match the return type of a GCC
20145   builtin and then its argument prototype would still apply.  */
20146#ifdef __cplusplus
20147extern "C"
20148#endif
20149char clock_gettime ();
20150int
20151main ()
20152{
20153return clock_gettime ();
20154  ;
20155  return 0;
20156}
20157_ACEOF
20158for ac_lib in '' rt; do
20159  if test -z "$ac_lib"; then
20160    ac_res="none required"
20161  else
20162    ac_res=-l$ac_lib
20163    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
20164  fi
20165  if ac_fn_c_try_link "$LINENO"; then :
20166  ac_cv_search_clock_gettime=$ac_res
20167fi
20168rm -f core conftest.err conftest.$ac_objext \
20169    conftest$ac_exeext
20170  if ${ac_cv_search_clock_gettime+:} false; then :
20171  break
20172fi
20173done
20174if ${ac_cv_search_clock_gettime+:} false; then :
20175
20176else
20177  ac_cv_search_clock_gettime=no
20178fi
20179rm conftest.$ac_ext
20180LIBS=$ac_func_search_save_LIBS
20181fi
20182{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5
20183$as_echo "$ac_cv_search_clock_gettime" >&6; }
20184ac_res=$ac_cv_search_clock_gettime
20185if test "$ac_res" != no; then :
20186  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
20187
20188fi
20189
20190			;;
20191			*linux*|Linux|*)
20192				case " $LIBOBJS " in
20193  *" getentropy_linux.$ac_objext "* ) ;;
20194  *) LIBOBJS="$LIBOBJS getentropy_linux.$ac_objext"
20195 ;;
20196esac
20197
20198				for ac_func in SHA512_Update
20199do :
20200  ac_fn_c_check_func "$LINENO" "SHA512_Update" "ac_cv_func_SHA512_Update"
20201if test "x$ac_cv_func_SHA512_Update" = xyes; then :
20202  cat >>confdefs.h <<_ACEOF
20203#define HAVE_SHA512_UPDATE 1
20204_ACEOF
20205
20206else
20207
20208
20209$as_echo "#define COMPAT_SHA512 1" >>confdefs.h
20210
20211					case " $LIBOBJS " in
20212  *" sha512.$ac_objext "* ) ;;
20213  *) LIBOBJS="$LIBOBJS sha512.$ac_objext"
20214 ;;
20215esac
20216
20217
20218fi
20219done
20220
20221				for ac_header in sys/sysctl.h
20222do :
20223  ac_fn_c_check_header_compile "$LINENO" "sys/sysctl.h" "ac_cv_header_sys_sysctl_h" "$ac_includes_default
20224"
20225if test "x$ac_cv_header_sys_sysctl_h" = xyes; then :
20226  cat >>confdefs.h <<_ACEOF
20227#define HAVE_SYS_SYSCTL_H 1
20228_ACEOF
20229
20230fi
20231
20232done
20233
20234				for ac_func in getauxval
20235do :
20236  ac_fn_c_check_func "$LINENO" "getauxval" "ac_cv_func_getauxval"
20237if test "x$ac_cv_func_getauxval" = xyes; then :
20238  cat >>confdefs.h <<_ACEOF
20239#define HAVE_GETAUXVAL 1
20240_ACEOF
20241
20242fi
20243done
20244
20245				{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5
20246$as_echo_n "checking for library containing clock_gettime... " >&6; }
20247if ${ac_cv_search_clock_gettime+:} false; then :
20248  $as_echo_n "(cached) " >&6
20249else
20250  ac_func_search_save_LIBS=$LIBS
20251cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20252/* end confdefs.h.  */
20253
20254/* Override any GCC internal prototype to avoid an error.
20255   Use char because int might match the return type of a GCC
20256   builtin and then its argument prototype would still apply.  */
20257#ifdef __cplusplus
20258extern "C"
20259#endif
20260char clock_gettime ();
20261int
20262main ()
20263{
20264return clock_gettime ();
20265  ;
20266  return 0;
20267}
20268_ACEOF
20269for ac_lib in '' rt; do
20270  if test -z "$ac_lib"; then
20271    ac_res="none required"
20272  else
20273    ac_res=-l$ac_lib
20274    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
20275  fi
20276  if ac_fn_c_try_link "$LINENO"; then :
20277  ac_cv_search_clock_gettime=$ac_res
20278fi
20279rm -f core conftest.err conftest.$ac_objext \
20280    conftest$ac_exeext
20281  if ${ac_cv_search_clock_gettime+:} false; then :
20282  break
20283fi
20284done
20285if ${ac_cv_search_clock_gettime+:} false; then :
20286
20287else
20288  ac_cv_search_clock_gettime=no
20289fi
20290rm conftest.$ac_ext
20291LIBS=$ac_func_search_save_LIBS
20292fi
20293{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5
20294$as_echo "$ac_cv_search_clock_gettime" >&6; }
20295ac_res=$ac_cv_search_clock_gettime
20296if test "$ac_res" != no; then :
20297  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
20298
20299fi
20300
20301			;;
20302			esac
20303		    fi
20304
20305fi
20306done
20307
20308	fi
20309fi
20310LIBOBJ_WITHOUT_CTIME="$LIBOBJS"
20311
20312ac_fn_c_check_func "$LINENO" "ctime_r" "ac_cv_func_ctime_r"
20313if test "x$ac_cv_func_ctime_r" = xyes; then :
20314  $as_echo "#define HAVE_CTIME_R 1" >>confdefs.h
20315
20316else
20317  case " $LIBOBJS " in
20318  *" ctime_r.$ac_objext "* ) ;;
20319  *) LIBOBJS="$LIBOBJS ctime_r.$ac_objext"
20320 ;;
20321esac
20322
20323fi
20324
20325
20326ac_fn_c_check_func "$LINENO" "strsep" "ac_cv_func_strsep"
20327if test "x$ac_cv_func_strsep" = xyes; then :
20328  $as_echo "#define HAVE_STRSEP 1" >>confdefs.h
20329
20330else
20331  case " $LIBOBJS " in
20332  *" strsep.$ac_objext "* ) ;;
20333  *) LIBOBJS="$LIBOBJS strsep.$ac_objext"
20334 ;;
20335esac
20336
20337fi
20338
20339
20340
20341# Check whether --enable-allsymbols was given.
20342if test "${enable_allsymbols+set}" = set; then :
20343  enableval=$enable_allsymbols;
20344fi
20345
20346case "$enable_allsymbols" in
20347	yes)
20348	COMMON_OBJ_ALL_SYMBOLS=""
20349	UBSYMS=""
20350	EXTRALINK="-L. -L.libs -lunbound"
20351
20352$as_echo "#define EXPORT_ALL_SYMBOLS 1" >>confdefs.h
20353
20354	;;
20355	no|*)
20356	COMMON_OBJ_ALL_SYMBOLS='$(COMMON_OBJ)'
20357	UBSYMS='-export-symbols $(srcdir)/libunbound/ubsyms.def'
20358	EXTRALINK=""
20359	;;
20360esac
20361
20362
20363
20364if test x_$enable_lock_checks = x_yes; then
20365	UBSYMS="-export-symbols clubsyms.def"
20366	cp ${srcdir}/libunbound/ubsyms.def clubsyms.def
20367	echo lock_protect >> clubsyms.def
20368	echo lock_unprotect >> clubsyms.def
20369	echo lock_get_mem >> clubsyms.def
20370	echo checklock_start >> clubsyms.def
20371	echo checklock_stop >> clubsyms.def
20372	echo checklock_lock >> clubsyms.def
20373	echo checklock_unlock >> clubsyms.def
20374	echo checklock_init >> clubsyms.def
20375	echo checklock_thrcreate >> clubsyms.def
20376	echo checklock_thrjoin >> clubsyms.def
20377fi
20378
20379# check for dnstap if requested
20380
20381  # Check whether --enable-dnstap was given.
20382if test "${enable_dnstap+set}" = set; then :
20383  enableval=$enable_dnstap; opt_dnstap=$enableval
20384else
20385  opt_dnstap=no
20386fi
20387
20388
20389
20390# Check whether --with-dnstap-socket-path was given.
20391if test "${with_dnstap_socket_path+set}" = set; then :
20392  withval=$with_dnstap_socket_path; opt_dnstap_socket_path=$withval
20393else
20394  opt_dnstap_socket_path="$UNBOUND_RUN_DIR/dnstap.sock"
20395fi
20396
20397
20398  if test "x$opt_dnstap" != "xno"; then
20399    # Extract the first word of "protoc-c", so it can be a program name with args.
20400set dummy protoc-c; ac_word=$2
20401{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20402$as_echo_n "checking for $ac_word... " >&6; }
20403if ${ac_cv_path_PROTOC_C+:} false; then :
20404  $as_echo_n "(cached) " >&6
20405else
20406  case $PROTOC_C in
20407  [\\/]* | ?:[\\/]*)
20408  ac_cv_path_PROTOC_C="$PROTOC_C" # Let the user override the test with a path.
20409  ;;
20410  *)
20411  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20412for as_dir in $PATH
20413do
20414  IFS=$as_save_IFS
20415  test -z "$as_dir" && as_dir=.
20416    for ac_exec_ext in '' $ac_executable_extensions; do
20417  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20418    ac_cv_path_PROTOC_C="$as_dir/$ac_word$ac_exec_ext"
20419    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20420    break 2
20421  fi
20422done
20423  done
20424IFS=$as_save_IFS
20425
20426  ;;
20427esac
20428fi
20429PROTOC_C=$ac_cv_path_PROTOC_C
20430if test -n "$PROTOC_C"; then
20431  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROTOC_C" >&5
20432$as_echo "$PROTOC_C" >&6; }
20433else
20434  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20435$as_echo "no" >&6; }
20436fi
20437
20438
20439    if test -z "$PROTOC_C"; then
20440      as_fn_error $? "The protoc-c program was not found. Please install protobuf-c!" "$LINENO" 5
20441    fi
20442
20443# Check whether --with-protobuf-c was given.
20444if test "${with_protobuf_c+set}" = set; then :
20445  withval=$with_protobuf_c;
20446	  # workaround for protobuf-c includes at old dir before protobuf-c-1.0.0
20447	  if test -f $withval/include/google/protobuf-c/protobuf-c.h; then
20448	    CFLAGS="$CFLAGS -I$withval/include/google"
20449	  else
20450	    CFLAGS="$CFLAGS -I$withval/include"
20451	  fi
20452	  LDFLAGS="$LDFLAGS -L$withval/lib"
20453
20454else
20455
20456	  # workaround for protobuf-c includes at old dir before protobuf-c-1.0.0
20457	  if test -f /usr/include/google/protobuf-c/protobuf-c.h; then
20458	    CFLAGS="$CFLAGS -I/usr/include/google"
20459	  else
20460	    if test -f /usr/local/include/google/protobuf-c/protobuf-c.h; then
20461	      CFLAGS="$CFLAGS -I/usr/local/include/google"
20462	      LDFLAGS="$LDFLAGS -L/usr/local/lib"
20463	    fi
20464	  fi
20465
20466fi
20467
20468
20469# Check whether --with-libfstrm was given.
20470if test "${with_libfstrm+set}" = set; then :
20471  withval=$with_libfstrm;
20472	CFLAGS="$CFLAGS -I$withval/include"
20473	LDFLAGS="$LDFLAGS -L$withval/lib"
20474
20475fi
20476
20477    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing fstrm_iothr_init" >&5
20478$as_echo_n "checking for library containing fstrm_iothr_init... " >&6; }
20479if ${ac_cv_search_fstrm_iothr_init+:} false; then :
20480  $as_echo_n "(cached) " >&6
20481else
20482  ac_func_search_save_LIBS=$LIBS
20483cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20484/* end confdefs.h.  */
20485
20486/* Override any GCC internal prototype to avoid an error.
20487   Use char because int might match the return type of a GCC
20488   builtin and then its argument prototype would still apply.  */
20489#ifdef __cplusplus
20490extern "C"
20491#endif
20492char fstrm_iothr_init ();
20493int
20494main ()
20495{
20496return fstrm_iothr_init ();
20497  ;
20498  return 0;
20499}
20500_ACEOF
20501for ac_lib in '' fstrm; do
20502  if test -z "$ac_lib"; then
20503    ac_res="none required"
20504  else
20505    ac_res=-l$ac_lib
20506    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
20507  fi
20508  if ac_fn_c_try_link "$LINENO"; then :
20509  ac_cv_search_fstrm_iothr_init=$ac_res
20510fi
20511rm -f core conftest.err conftest.$ac_objext \
20512    conftest$ac_exeext
20513  if ${ac_cv_search_fstrm_iothr_init+:} false; then :
20514  break
20515fi
20516done
20517if ${ac_cv_search_fstrm_iothr_init+:} false; then :
20518
20519else
20520  ac_cv_search_fstrm_iothr_init=no
20521fi
20522rm conftest.$ac_ext
20523LIBS=$ac_func_search_save_LIBS
20524fi
20525{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_fstrm_iothr_init" >&5
20526$as_echo "$ac_cv_search_fstrm_iothr_init" >&6; }
20527ac_res=$ac_cv_search_fstrm_iothr_init
20528if test "$ac_res" != no; then :
20529  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
20530
20531else
20532  as_fn_error $? "The fstrm library was not found. Please install fstrm!" "$LINENO" 5
20533fi
20534
20535    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing protobuf_c_message_pack" >&5
20536$as_echo_n "checking for library containing protobuf_c_message_pack... " >&6; }
20537if ${ac_cv_search_protobuf_c_message_pack+:} false; then :
20538  $as_echo_n "(cached) " >&6
20539else
20540  ac_func_search_save_LIBS=$LIBS
20541cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20542/* end confdefs.h.  */
20543
20544/* Override any GCC internal prototype to avoid an error.
20545   Use char because int might match the return type of a GCC
20546   builtin and then its argument prototype would still apply.  */
20547#ifdef __cplusplus
20548extern "C"
20549#endif
20550char protobuf_c_message_pack ();
20551int
20552main ()
20553{
20554return protobuf_c_message_pack ();
20555  ;
20556  return 0;
20557}
20558_ACEOF
20559for ac_lib in '' protobuf-c; do
20560  if test -z "$ac_lib"; then
20561    ac_res="none required"
20562  else
20563    ac_res=-l$ac_lib
20564    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
20565  fi
20566  if ac_fn_c_try_link "$LINENO"; then :
20567  ac_cv_search_protobuf_c_message_pack=$ac_res
20568fi
20569rm -f core conftest.err conftest.$ac_objext \
20570    conftest$ac_exeext
20571  if ${ac_cv_search_protobuf_c_message_pack+:} false; then :
20572  break
20573fi
20574done
20575if ${ac_cv_search_protobuf_c_message_pack+:} false; then :
20576
20577else
20578  ac_cv_search_protobuf_c_message_pack=no
20579fi
20580rm conftest.$ac_ext
20581LIBS=$ac_func_search_save_LIBS
20582fi
20583{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_protobuf_c_message_pack" >&5
20584$as_echo "$ac_cv_search_protobuf_c_message_pack" >&6; }
20585ac_res=$ac_cv_search_protobuf_c_message_pack
20586if test "$ac_res" != no; then :
20587  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
20588
20589else
20590  as_fn_error $? "The protobuf-c library was not found. Please install protobuf-c!" "$LINENO" 5
20591fi
20592
20593
20594
20595$as_echo "#define USE_DNSTAP 1" >>confdefs.h
20596
20597        ENABLE_DNSTAP=1
20598
20599
20600
20601        hdr_dnstap_socket_path="`echo $opt_dnstap_socket_path | sed -e 's/\\\\/\\\\\\\\/g'`"
20602
20603
20604cat >>confdefs.h <<_ACEOF
20605#define DNSTAP_SOCKET_PATH "$hdr_dnstap_socket_path"
20606_ACEOF
20607
20608
20609        DNSTAP_SRC="dnstap/dnstap.c dnstap/dnstap.pb-c.c"
20610
20611        DNSTAP_OBJ="dnstap.lo dnstap.pb-c.lo"
20612
20613
20614  else
20615
20616        ENABLE_DNSTAP=0
20617
20618
20619
20620  fi
20621
20622
20623# check for dnscrypt if requested
20624
20625  # Check whether --enable-dnscrypt was given.
20626if test "${enable_dnscrypt+set}" = set; then :
20627  enableval=$enable_dnscrypt; opt_dnscrypt=$enableval
20628else
20629  opt_dnscrypt=no
20630fi
20631
20632
20633  if test "x$opt_dnscrypt" != "xno"; then
20634
20635# Check whether --with-libsodium was given.
20636if test "${with_libsodium+set}" = set; then :
20637  withval=$with_libsodium;
20638	CFLAGS="$CFLAGS -I$withval/include"
20639	LDFLAGS="$LDFLAGS -L$withval/lib"
20640
20641fi
20642
20643    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sodium_init" >&5
20644$as_echo_n "checking for library containing sodium_init... " >&6; }
20645if ${ac_cv_search_sodium_init+:} false; then :
20646  $as_echo_n "(cached) " >&6
20647else
20648  ac_func_search_save_LIBS=$LIBS
20649cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20650/* end confdefs.h.  */
20651
20652/* Override any GCC internal prototype to avoid an error.
20653   Use char because int might match the return type of a GCC
20654   builtin and then its argument prototype would still apply.  */
20655#ifdef __cplusplus
20656extern "C"
20657#endif
20658char sodium_init ();
20659int
20660main ()
20661{
20662return sodium_init ();
20663  ;
20664  return 0;
20665}
20666_ACEOF
20667for ac_lib in '' sodium; do
20668  if test -z "$ac_lib"; then
20669    ac_res="none required"
20670  else
20671    ac_res=-l$ac_lib
20672    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
20673  fi
20674  if ac_fn_c_try_link "$LINENO"; then :
20675  ac_cv_search_sodium_init=$ac_res
20676fi
20677rm -f core conftest.err conftest.$ac_objext \
20678    conftest$ac_exeext
20679  if ${ac_cv_search_sodium_init+:} false; then :
20680  break
20681fi
20682done
20683if ${ac_cv_search_sodium_init+:} false; then :
20684
20685else
20686  ac_cv_search_sodium_init=no
20687fi
20688rm conftest.$ac_ext
20689LIBS=$ac_func_search_save_LIBS
20690fi
20691{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sodium_init" >&5
20692$as_echo "$ac_cv_search_sodium_init" >&6; }
20693ac_res=$ac_cv_search_sodium_init
20694if test "$ac_res" != no; then :
20695  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
20696
20697else
20698  as_fn_error $? "The sodium library was not found. Please install sodium!" "$LINENO" 5
20699fi
20700
20701    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing crypto_box_curve25519xchacha20poly1305_beforenm" >&5
20702$as_echo_n "checking for library containing crypto_box_curve25519xchacha20poly1305_beforenm... " >&6; }
20703if ${ac_cv_search_crypto_box_curve25519xchacha20poly1305_beforenm+:} false; then :
20704  $as_echo_n "(cached) " >&6
20705else
20706  ac_func_search_save_LIBS=$LIBS
20707cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20708/* end confdefs.h.  */
20709
20710/* Override any GCC internal prototype to avoid an error.
20711   Use char because int might match the return type of a GCC
20712   builtin and then its argument prototype would still apply.  */
20713#ifdef __cplusplus
20714extern "C"
20715#endif
20716char crypto_box_curve25519xchacha20poly1305_beforenm ();
20717int
20718main ()
20719{
20720return crypto_box_curve25519xchacha20poly1305_beforenm ();
20721  ;
20722  return 0;
20723}
20724_ACEOF
20725for ac_lib in '' sodium; do
20726  if test -z "$ac_lib"; then
20727    ac_res="none required"
20728  else
20729    ac_res=-l$ac_lib
20730    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
20731  fi
20732  if ac_fn_c_try_link "$LINENO"; then :
20733  ac_cv_search_crypto_box_curve25519xchacha20poly1305_beforenm=$ac_res
20734fi
20735rm -f core conftest.err conftest.$ac_objext \
20736    conftest$ac_exeext
20737  if ${ac_cv_search_crypto_box_curve25519xchacha20poly1305_beforenm+:} false; then :
20738  break
20739fi
20740done
20741if ${ac_cv_search_crypto_box_curve25519xchacha20poly1305_beforenm+:} false; then :
20742
20743else
20744  ac_cv_search_crypto_box_curve25519xchacha20poly1305_beforenm=no
20745fi
20746rm conftest.$ac_ext
20747LIBS=$ac_func_search_save_LIBS
20748fi
20749{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_crypto_box_curve25519xchacha20poly1305_beforenm" >&5
20750$as_echo "$ac_cv_search_crypto_box_curve25519xchacha20poly1305_beforenm" >&6; }
20751ac_res=$ac_cv_search_crypto_box_curve25519xchacha20poly1305_beforenm
20752if test "$ac_res" != no; then :
20753  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
20754
20755            ENABLE_DNSCRYPT_XCHACHA20=1
20756
20757
20758$as_echo "#define USE_DNSCRYPT_XCHACHA20 1" >>confdefs.h
20759
20760
20761else
20762
20763            ENABLE_DNSCRYPT_XCHACHA20=0
20764
20765
20766fi
20767
20768    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sodium_set_misuse_handler" >&5
20769$as_echo_n "checking for library containing sodium_set_misuse_handler... " >&6; }
20770if ${ac_cv_search_sodium_set_misuse_handler+:} false; then :
20771  $as_echo_n "(cached) " >&6
20772else
20773  ac_func_search_save_LIBS=$LIBS
20774cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20775/* end confdefs.h.  */
20776
20777/* Override any GCC internal prototype to avoid an error.
20778   Use char because int might match the return type of a GCC
20779   builtin and then its argument prototype would still apply.  */
20780#ifdef __cplusplus
20781extern "C"
20782#endif
20783char sodium_set_misuse_handler ();
20784int
20785main ()
20786{
20787return sodium_set_misuse_handler ();
20788  ;
20789  return 0;
20790}
20791_ACEOF
20792for ac_lib in '' sodium; do
20793  if test -z "$ac_lib"; then
20794    ac_res="none required"
20795  else
20796    ac_res=-l$ac_lib
20797    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
20798  fi
20799  if ac_fn_c_try_link "$LINENO"; then :
20800  ac_cv_search_sodium_set_misuse_handler=$ac_res
20801fi
20802rm -f core conftest.err conftest.$ac_objext \
20803    conftest$ac_exeext
20804  if ${ac_cv_search_sodium_set_misuse_handler+:} false; then :
20805  break
20806fi
20807done
20808if ${ac_cv_search_sodium_set_misuse_handler+:} false; then :
20809
20810else
20811  ac_cv_search_sodium_set_misuse_handler=no
20812fi
20813rm conftest.$ac_ext
20814LIBS=$ac_func_search_save_LIBS
20815fi
20816{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sodium_set_misuse_handler" >&5
20817$as_echo "$ac_cv_search_sodium_set_misuse_handler" >&6; }
20818ac_res=$ac_cv_search_sodium_set_misuse_handler
20819if test "$ac_res" != no; then :
20820  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
20821
20822
20823$as_echo "#define SODIUM_MISUSE_HANDLER 1" >>confdefs.h
20824
20825
20826fi
20827
20828
20829
20830$as_echo "#define USE_DNSCRYPT 1" >>confdefs.h
20831
20832        ENABLE_DNSCRYPT=1
20833
20834
20835        DNSCRYPT_SRC="dnscrypt/dnscrypt.c"
20836
20837        DNSCRYPT_OBJ="dnscrypt.lo"
20838
20839
20840  else
20841    ENABLE_DNSCRYPT_XCHACHA20=0
20842
20843
20844        ENABLE_DNSCRYPT=0
20845
20846
20847
20848  fi
20849
20850
20851# check for cachedb if requested
20852# Check whether --enable-cachedb was given.
20853if test "${enable_cachedb+set}" = set; then :
20854  enableval=$enable_cachedb;
20855fi
20856
20857case "$enable_cachedb" in
20858    yes)
20859
20860$as_echo "#define USE_CACHEDB 1" >>confdefs.h
20861
20862    	;;
20863    no|*)
20864    	# nothing
20865    	;;
20866esac
20867
20868# check for ipsecmod if requested
20869# Check whether --enable-ipsecmod was given.
20870if test "${enable_ipsecmod+set}" = set; then :
20871  enableval=$enable_ipsecmod;
20872fi
20873
20874case "$enable_ipsecmod" in
20875	yes)
20876
20877$as_echo "#define USE_IPSECMOD 1" >>confdefs.h
20878
20879		IPSECMOD_OBJ="ipsecmod.lo ipsecmod-whitelist.lo"
20880
20881		IPSECMOD_HEADER='$(srcdir)/ipsecmod/ipsecmod.h $(srcdir)/ipsecmod/ipsecmod-whitelist.h'
20882
20883		;;
20884	no|*)
20885		# nothing
20886		;;
20887esac
20888
20889{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if ${MAKE:-make} supports $< with implicit rule in scope" >&5
20890$as_echo_n "checking if ${MAKE:-make} supports $< with implicit rule in scope... " >&6; }
20891# on openBSD, the implicit rule make $< work.
20892# on Solaris, it does not work ($? is changed sources, $^ lists dependencies).
20893# gmake works.
20894cat >conftest.make <<EOF
20895all:	conftest.lo
20896
20897conftest.lo foo.lo bla.lo:
20898	if test -f "\$<"; then touch \$@; fi
20899
20900.SUFFIXES: .lo
20901.c.lo:
20902	if test -f "\$<"; then touch \$@; fi
20903
20904conftest.lo:        conftest.dir/conftest.c
20905EOF
20906mkdir conftest.dir
20907touch conftest.dir/conftest.c
20908rm -f conftest.lo conftest.c
20909${MAKE:-make} -f conftest.make >/dev/null
20910rm -f conftest.make conftest.c conftest.dir/conftest.c
20911rm -rf conftest.dir
20912if test ! -f conftest.lo; then
20913	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20914$as_echo "no" >&6; }
20915	SOURCEDETERMINE='echo "$^" | awk "-F " "{print \$$1;}" > .source'
20916	SOURCEFILE='`cat .source`'
20917else
20918	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
20919$as_echo "yes" >&6; }
20920	SOURCEDETERMINE=':'
20921	SOURCEFILE='$<'
20922fi
20923rm -f conftest.lo
20924
20925
20926
20927# see if we want to build the library or everything
20928ALLTARGET="alltargets"
20929INSTALLTARGET="install-all"
20930
20931# Check whether --with-libunbound-only was given.
20932if test "${with_libunbound_only+set}" = set; then :
20933  withval=$with_libunbound_only;
20934	if test "$withval" = "yes"; then
20935		ALLTARGET="lib"
20936		INSTALLTARGET="install-lib"
20937	fi
20938
20939fi
20940
20941if test $ALLTARGET = "alltargets"; then
20942	if test $USE_NSS = "yes"; then
20943		as_fn_error $? "--with-nss can only be used in combination with --with-libunbound-only." "$LINENO" 5
20944	fi
20945	if test $USE_NETTLE = "yes"; then
20946		as_fn_error $? "--with-nettle can only be used in combination with --with-libunbound-only." "$LINENO" 5
20947	fi
20948fi
20949
20950
20951
20952
20953
20954  { $as_echo "$as_me:${as_lineno-$LINENO}: Stripping extension flags..." >&5
20955$as_echo "$as_me: Stripping extension flags..." >&6;}
20956
20957  if echo $CFLAGS | grep " -D_GNU_SOURCE" >/dev/null 2>&1; then
20958    CFLAGS="`echo $CFLAGS | sed -e 's/ -D_GNU_SOURCE//g'`"
20959
20960$as_echo "#define OMITTED__D_GNU_SOURCE 1" >>confdefs.h
20961
20962  fi
20963
20964
20965  if echo $CFLAGS | grep " -D_BSD_SOURCE" >/dev/null 2>&1; then
20966    CFLAGS="`echo $CFLAGS | sed -e 's/ -D_BSD_SOURCE//g'`"
20967
20968$as_echo "#define OMITTED__D_BSD_SOURCE 1" >>confdefs.h
20969
20970  fi
20971
20972
20973  if echo $CFLAGS | grep " -D_DEFAULT_SOURCE" >/dev/null 2>&1; then
20974    CFLAGS="`echo $CFLAGS | sed -e 's/ -D_DEFAULT_SOURCE//g'`"
20975
20976$as_echo "#define OMITTED__D_DEFAULT_SOURCE 1" >>confdefs.h
20977
20978  fi
20979
20980
20981  if echo $CFLAGS | grep " -D__EXTENSIONS__" >/dev/null 2>&1; then
20982    CFLAGS="`echo $CFLAGS | sed -e 's/ -D__EXTENSIONS__//g'`"
20983
20984$as_echo "#define OMITTED__D__EXTENSIONS__ 1" >>confdefs.h
20985
20986  fi
20987
20988
20989  if echo $CFLAGS | grep " -D_POSIX_C_SOURCE=200112" >/dev/null 2>&1; then
20990    CFLAGS="`echo $CFLAGS | sed -e 's/ -D_POSIX_C_SOURCE=200112//g'`"
20991
20992$as_echo "#define OMITTED__D_POSIX_C_SOURCE_200112 1" >>confdefs.h
20993
20994  fi
20995
20996
20997  if echo $CFLAGS | grep " -D_XOPEN_SOURCE=600" >/dev/null 2>&1; then
20998    CFLAGS="`echo $CFLAGS | sed -e 's/ -D_XOPEN_SOURCE=600//g'`"
20999
21000$as_echo "#define OMITTED__D_XOPEN_SOURCE_600 1" >>confdefs.h
21001
21002  fi
21003
21004
21005  if echo $CFLAGS | grep " -D_XOPEN_SOURCE_EXTENDED=1" >/dev/null 2>&1; then
21006    CFLAGS="`echo $CFLAGS | sed -e 's/ -D_XOPEN_SOURCE_EXTENDED=1//g'`"
21007
21008$as_echo "#define OMITTED__D_XOPEN_SOURCE_EXTENDED_1 1" >>confdefs.h
21009
21010  fi
21011
21012
21013  if echo $CFLAGS | grep " -D_ALL_SOURCE" >/dev/null 2>&1; then
21014    CFLAGS="`echo $CFLAGS | sed -e 's/ -D_ALL_SOURCE//g'`"
21015
21016$as_echo "#define OMITTED__D_ALL_SOURCE 1" >>confdefs.h
21017
21018  fi
21019
21020
21021  if echo $CFLAGS | grep " -D_LARGEFILE_SOURCE=1" >/dev/null 2>&1; then
21022    CFLAGS="`echo $CFLAGS | sed -e 's/ -D_LARGEFILE_SOURCE=1//g'`"
21023
21024$as_echo "#define OMITTED__D_LARGEFILE_SOURCE_1 1" >>confdefs.h
21025
21026  fi
21027
21028
21029if test -n "$LATE_LDFLAGS"; then
21030  LDFLAGS="$LATE_LDFLAGS $LDFLAGS"
21031fi
21032# remove start spaces
21033LDFLAGS=`echo "$LDFLAGS"|sed -e 's/^ *//'`
21034LIBS=`echo "$LIBS"|sed -e 's/^ *//'`
21035
21036
21037cat >>confdefs.h <<_ACEOF
21038#define MAXSYSLOGMSGLEN 10240
21039_ACEOF
21040
21041
21042
21043
21044version=1.7.1
21045
21046date=`date +'%b %e, %Y'`
21047
21048
21049ac_config_files="$ac_config_files Makefile doc/example.conf doc/libunbound.3 doc/unbound.8 doc/unbound-anchor.8 doc/unbound-checkconf.8 doc/unbound.conf.5 doc/unbound-control.8 doc/unbound-host.1 smallapp/unbound-control-setup.sh dnstap/dnstap_config.h dnscrypt/dnscrypt_config.h contrib/libunbound.pc contrib/unbound.socket contrib/unbound.service"
21050
21051ac_config_headers="$ac_config_headers config.h"
21052
21053cat >confcache <<\_ACEOF
21054# This file is a shell script that caches the results of configure
21055# tests run on this system so they can be shared between configure
21056# scripts and configure runs, see configure's option --config-cache.
21057# It is not useful on other systems.  If it contains results you don't
21058# want to keep, you may remove or edit it.
21059#
21060# config.status only pays attention to the cache file if you give it
21061# the --recheck option to rerun configure.
21062#
21063# `ac_cv_env_foo' variables (set or unset) will be overridden when
21064# loading this file, other *unset* `ac_cv_foo' will be assigned the
21065# following values.
21066
21067_ACEOF
21068
21069# The following way of writing the cache mishandles newlines in values,
21070# but we know of no workaround that is simple, portable, and efficient.
21071# So, we kill variables containing newlines.
21072# Ultrix sh set writes to stderr and can't be redirected directly,
21073# and sets the high bit in the cache file unless we assign to the vars.
21074(
21075  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
21076    eval ac_val=\$$ac_var
21077    case $ac_val in #(
21078    *${as_nl}*)
21079      case $ac_var in #(
21080      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
21081$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
21082      esac
21083      case $ac_var in #(
21084      _ | IFS | as_nl) ;; #(
21085      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
21086      *) { eval $ac_var=; unset $ac_var;} ;;
21087      esac ;;
21088    esac
21089  done
21090
21091  (set) 2>&1 |
21092    case $as_nl`(ac_space=' '; set) 2>&1` in #(
21093    *${as_nl}ac_space=\ *)
21094      # `set' does not quote correctly, so add quotes: double-quote
21095      # substitution turns \\\\ into \\, and sed turns \\ into \.
21096      sed -n \
21097	"s/'/'\\\\''/g;
21098	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
21099      ;; #(
21100    *)
21101      # `set' quotes correctly as required by POSIX, so do not add quotes.
21102      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
21103      ;;
21104    esac |
21105    sort
21106) |
21107  sed '
21108     /^ac_cv_env_/b end
21109     t clear
21110     :clear
21111     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
21112     t end
21113     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
21114     :end' >>confcache
21115if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
21116  if test -w "$cache_file"; then
21117    if test "x$cache_file" != "x/dev/null"; then
21118      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
21119$as_echo "$as_me: updating cache $cache_file" >&6;}
21120      if test ! -f "$cache_file" || test -h "$cache_file"; then
21121	cat confcache >"$cache_file"
21122      else
21123        case $cache_file in #(
21124        */* | ?:*)
21125	  mv -f confcache "$cache_file"$$ &&
21126	  mv -f "$cache_file"$$ "$cache_file" ;; #(
21127        *)
21128	  mv -f confcache "$cache_file" ;;
21129	esac
21130      fi
21131    fi
21132  else
21133    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
21134$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
21135  fi
21136fi
21137rm -f confcache
21138
21139test "x$prefix" = xNONE && prefix=$ac_default_prefix
21140# Let make expand exec_prefix.
21141test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
21142
21143DEFS=-DHAVE_CONFIG_H
21144
21145ac_libobjs=
21146ac_ltlibobjs=
21147U=
21148for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
21149  # 1. Remove the extension, and $U if already installed.
21150  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
21151  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
21152  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
21153  #    will be set to the directory where LIBOBJS objects are built.
21154  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
21155  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
21156done
21157LIBOBJS=$ac_libobjs
21158
21159LTLIBOBJS=$ac_ltlibobjs
21160
21161
21162if test -z "${USE_SYSTEMD_TRUE}" && test -z "${USE_SYSTEMD_FALSE}"; then
21163  as_fn_error $? "conditional \"USE_SYSTEMD\" was never defined.
21164Usually this means the macro was only invoked conditionally." "$LINENO" 5
21165fi
21166
21167: "${CONFIG_STATUS=./config.status}"
21168ac_write_fail=0
21169ac_clean_files_save=$ac_clean_files
21170ac_clean_files="$ac_clean_files $CONFIG_STATUS"
21171{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
21172$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
21173as_write_fail=0
21174cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
21175#! $SHELL
21176# Generated by $as_me.
21177# Run this file to recreate the current configuration.
21178# Compiler output produced by configure, useful for debugging
21179# configure, is in config.log if it exists.
21180
21181debug=false
21182ac_cs_recheck=false
21183ac_cs_silent=false
21184
21185SHELL=\${CONFIG_SHELL-$SHELL}
21186export SHELL
21187_ASEOF
21188cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
21189## -------------------- ##
21190## M4sh Initialization. ##
21191## -------------------- ##
21192
21193# Be more Bourne compatible
21194DUALCASE=1; export DUALCASE # for MKS sh
21195if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
21196  emulate sh
21197  NULLCMD=:
21198  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
21199  # is contrary to our usage.  Disable this feature.
21200  alias -g '${1+"$@"}'='"$@"'
21201  setopt NO_GLOB_SUBST
21202else
21203  case `(set -o) 2>/dev/null` in #(
21204  *posix*) :
21205    set -o posix ;; #(
21206  *) :
21207     ;;
21208esac
21209fi
21210
21211
21212as_nl='
21213'
21214export as_nl
21215# Printing a long string crashes Solaris 7 /usr/bin/printf.
21216as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
21217as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
21218as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
21219# Prefer a ksh shell builtin over an external printf program on Solaris,
21220# but without wasting forks for bash or zsh.
21221if test -z "$BASH_VERSION$ZSH_VERSION" \
21222    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
21223  as_echo='print -r --'
21224  as_echo_n='print -rn --'
21225elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
21226  as_echo='printf %s\n'
21227  as_echo_n='printf %s'
21228else
21229  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
21230    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
21231    as_echo_n='/usr/ucb/echo -n'
21232  else
21233    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
21234    as_echo_n_body='eval
21235      arg=$1;
21236      case $arg in #(
21237      *"$as_nl"*)
21238	expr "X$arg" : "X\\(.*\\)$as_nl";
21239	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
21240      esac;
21241      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
21242    '
21243    export as_echo_n_body
21244    as_echo_n='sh -c $as_echo_n_body as_echo'
21245  fi
21246  export as_echo_body
21247  as_echo='sh -c $as_echo_body as_echo'
21248fi
21249
21250# The user is always right.
21251if test "${PATH_SEPARATOR+set}" != set; then
21252  PATH_SEPARATOR=:
21253  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
21254    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
21255      PATH_SEPARATOR=';'
21256  }
21257fi
21258
21259
21260# IFS
21261# We need space, tab and new line, in precisely that order.  Quoting is
21262# there to prevent editors from complaining about space-tab.
21263# (If _AS_PATH_WALK were called with IFS unset, it would disable word
21264# splitting by setting IFS to empty value.)
21265IFS=" ""	$as_nl"
21266
21267# Find who we are.  Look in the path if we contain no directory separator.
21268as_myself=
21269case $0 in #((
21270  *[\\/]* ) as_myself=$0 ;;
21271  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21272for as_dir in $PATH
21273do
21274  IFS=$as_save_IFS
21275  test -z "$as_dir" && as_dir=.
21276    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
21277  done
21278IFS=$as_save_IFS
21279
21280     ;;
21281esac
21282# We did not find ourselves, most probably we were run as `sh COMMAND'
21283# in which case we are not to be found in the path.
21284if test "x$as_myself" = x; then
21285  as_myself=$0
21286fi
21287if test ! -f "$as_myself"; then
21288  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
21289  exit 1
21290fi
21291
21292# Unset variables that we do not need and which cause bugs (e.g. in
21293# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
21294# suppresses any "Segmentation fault" message there.  '((' could
21295# trigger a bug in pdksh 5.2.14.
21296for as_var in BASH_ENV ENV MAIL MAILPATH
21297do eval test x\${$as_var+set} = xset \
21298  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
21299done
21300PS1='$ '
21301PS2='> '
21302PS4='+ '
21303
21304# NLS nuisances.
21305LC_ALL=C
21306export LC_ALL
21307LANGUAGE=C
21308export LANGUAGE
21309
21310# CDPATH.
21311(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
21312
21313
21314# as_fn_error STATUS ERROR [LINENO LOG_FD]
21315# ----------------------------------------
21316# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
21317# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
21318# script with STATUS, using 1 if that was 0.
21319as_fn_error ()
21320{
21321  as_status=$1; test $as_status -eq 0 && as_status=1
21322  if test "$4"; then
21323    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
21324    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
21325  fi
21326  $as_echo "$as_me: error: $2" >&2
21327  as_fn_exit $as_status
21328} # as_fn_error
21329
21330
21331# as_fn_set_status STATUS
21332# -----------------------
21333# Set $? to STATUS, without forking.
21334as_fn_set_status ()
21335{
21336  return $1
21337} # as_fn_set_status
21338
21339# as_fn_exit STATUS
21340# -----------------
21341# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
21342as_fn_exit ()
21343{
21344  set +e
21345  as_fn_set_status $1
21346  exit $1
21347} # as_fn_exit
21348
21349# as_fn_unset VAR
21350# ---------------
21351# Portably unset VAR.
21352as_fn_unset ()
21353{
21354  { eval $1=; unset $1;}
21355}
21356as_unset=as_fn_unset
21357# as_fn_append VAR VALUE
21358# ----------------------
21359# Append the text in VALUE to the end of the definition contained in VAR. Take
21360# advantage of any shell optimizations that allow amortized linear growth over
21361# repeated appends, instead of the typical quadratic growth present in naive
21362# implementations.
21363if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
21364  eval 'as_fn_append ()
21365  {
21366    eval $1+=\$2
21367  }'
21368else
21369  as_fn_append ()
21370  {
21371    eval $1=\$$1\$2
21372  }
21373fi # as_fn_append
21374
21375# as_fn_arith ARG...
21376# ------------------
21377# Perform arithmetic evaluation on the ARGs, and store the result in the
21378# global $as_val. Take advantage of shells that can avoid forks. The arguments
21379# must be portable across $(()) and expr.
21380if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
21381  eval 'as_fn_arith ()
21382  {
21383    as_val=$(( $* ))
21384  }'
21385else
21386  as_fn_arith ()
21387  {
21388    as_val=`expr "$@" || test $? -eq 1`
21389  }
21390fi # as_fn_arith
21391
21392
21393if expr a : '\(a\)' >/dev/null 2>&1 &&
21394   test "X`expr 00001 : '.*\(...\)'`" = X001; then
21395  as_expr=expr
21396else
21397  as_expr=false
21398fi
21399
21400if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
21401  as_basename=basename
21402else
21403  as_basename=false
21404fi
21405
21406if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
21407  as_dirname=dirname
21408else
21409  as_dirname=false
21410fi
21411
21412as_me=`$as_basename -- "$0" ||
21413$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
21414	 X"$0" : 'X\(//\)$' \| \
21415	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
21416$as_echo X/"$0" |
21417    sed '/^.*\/\([^/][^/]*\)\/*$/{
21418	    s//\1/
21419	    q
21420	  }
21421	  /^X\/\(\/\/\)$/{
21422	    s//\1/
21423	    q
21424	  }
21425	  /^X\/\(\/\).*/{
21426	    s//\1/
21427	    q
21428	  }
21429	  s/.*/./; q'`
21430
21431# Avoid depending upon Character Ranges.
21432as_cr_letters='abcdefghijklmnopqrstuvwxyz'
21433as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
21434as_cr_Letters=$as_cr_letters$as_cr_LETTERS
21435as_cr_digits='0123456789'
21436as_cr_alnum=$as_cr_Letters$as_cr_digits
21437
21438ECHO_C= ECHO_N= ECHO_T=
21439case `echo -n x` in #(((((
21440-n*)
21441  case `echo 'xy\c'` in
21442  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
21443  xy)  ECHO_C='\c';;
21444  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
21445       ECHO_T='	';;
21446  esac;;
21447*)
21448  ECHO_N='-n';;
21449esac
21450
21451rm -f conf$$ conf$$.exe conf$$.file
21452if test -d conf$$.dir; then
21453  rm -f conf$$.dir/conf$$.file
21454else
21455  rm -f conf$$.dir
21456  mkdir conf$$.dir 2>/dev/null
21457fi
21458if (echo >conf$$.file) 2>/dev/null; then
21459  if ln -s conf$$.file conf$$ 2>/dev/null; then
21460    as_ln_s='ln -s'
21461    # ... but there are two gotchas:
21462    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
21463    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
21464    # In both cases, we have to default to `cp -pR'.
21465    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
21466      as_ln_s='cp -pR'
21467  elif ln conf$$.file conf$$ 2>/dev/null; then
21468    as_ln_s=ln
21469  else
21470    as_ln_s='cp -pR'
21471  fi
21472else
21473  as_ln_s='cp -pR'
21474fi
21475rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
21476rmdir conf$$.dir 2>/dev/null
21477
21478
21479# as_fn_mkdir_p
21480# -------------
21481# Create "$as_dir" as a directory, including parents if necessary.
21482as_fn_mkdir_p ()
21483{
21484
21485  case $as_dir in #(
21486  -*) as_dir=./$as_dir;;
21487  esac
21488  test -d "$as_dir" || eval $as_mkdir_p || {
21489    as_dirs=
21490    while :; do
21491      case $as_dir in #(
21492      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
21493      *) as_qdir=$as_dir;;
21494      esac
21495      as_dirs="'$as_qdir' $as_dirs"
21496      as_dir=`$as_dirname -- "$as_dir" ||
21497$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
21498	 X"$as_dir" : 'X\(//\)[^/]' \| \
21499	 X"$as_dir" : 'X\(//\)$' \| \
21500	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
21501$as_echo X"$as_dir" |
21502    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
21503	    s//\1/
21504	    q
21505	  }
21506	  /^X\(\/\/\)[^/].*/{
21507	    s//\1/
21508	    q
21509	  }
21510	  /^X\(\/\/\)$/{
21511	    s//\1/
21512	    q
21513	  }
21514	  /^X\(\/\).*/{
21515	    s//\1/
21516	    q
21517	  }
21518	  s/.*/./; q'`
21519      test -d "$as_dir" && break
21520    done
21521    test -z "$as_dirs" || eval "mkdir $as_dirs"
21522  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
21523
21524
21525} # as_fn_mkdir_p
21526if mkdir -p . 2>/dev/null; then
21527  as_mkdir_p='mkdir -p "$as_dir"'
21528else
21529  test -d ./-p && rmdir ./-p
21530  as_mkdir_p=false
21531fi
21532
21533
21534# as_fn_executable_p FILE
21535# -----------------------
21536# Test if FILE is an executable regular file.
21537as_fn_executable_p ()
21538{
21539  test -f "$1" && test -x "$1"
21540} # as_fn_executable_p
21541as_test_x='test -x'
21542as_executable_p=as_fn_executable_p
21543
21544# Sed expression to map a string onto a valid CPP name.
21545as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
21546
21547# Sed expression to map a string onto a valid variable name.
21548as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
21549
21550
21551exec 6>&1
21552## ----------------------------------- ##
21553## Main body of $CONFIG_STATUS script. ##
21554## ----------------------------------- ##
21555_ASEOF
21556test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
21557
21558cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
21559# Save the log message, to keep $0 and so on meaningful, and to
21560# report actual input values of CONFIG_FILES etc. instead of their
21561# values after options handling.
21562ac_log="
21563This file was extended by unbound $as_me 1.7.1, which was
21564generated by GNU Autoconf 2.69.  Invocation command line was
21565
21566  CONFIG_FILES    = $CONFIG_FILES
21567  CONFIG_HEADERS  = $CONFIG_HEADERS
21568  CONFIG_LINKS    = $CONFIG_LINKS
21569  CONFIG_COMMANDS = $CONFIG_COMMANDS
21570  $ $0 $@
21571
21572on `(hostname || uname -n) 2>/dev/null | sed 1q`
21573"
21574
21575_ACEOF
21576
21577case $ac_config_files in *"
21578"*) set x $ac_config_files; shift; ac_config_files=$*;;
21579esac
21580
21581case $ac_config_headers in *"
21582"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
21583esac
21584
21585
21586cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
21587# Files that config.status was made for.
21588config_files="$ac_config_files"
21589config_headers="$ac_config_headers"
21590config_commands="$ac_config_commands"
21591
21592_ACEOF
21593
21594cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
21595ac_cs_usage="\
21596\`$as_me' instantiates files and other configuration actions
21597from templates according to the current configuration.  Unless the files
21598and actions are specified as TAGs, all are instantiated by default.
21599
21600Usage: $0 [OPTION]... [TAG]...
21601
21602  -h, --help       print this help, then exit
21603  -V, --version    print version number and configuration settings, then exit
21604      --config     print configuration, then exit
21605  -q, --quiet, --silent
21606                   do not print progress messages
21607  -d, --debug      don't remove temporary files
21608      --recheck    update $as_me by reconfiguring in the same conditions
21609      --file=FILE[:TEMPLATE]
21610                   instantiate the configuration file FILE
21611      --header=FILE[:TEMPLATE]
21612                   instantiate the configuration header FILE
21613
21614Configuration files:
21615$config_files
21616
21617Configuration headers:
21618$config_headers
21619
21620Configuration commands:
21621$config_commands
21622
21623Report bugs to <unbound-bugs@nlnetlabs.nl>."
21624
21625_ACEOF
21626cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
21627ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
21628ac_cs_version="\\
21629unbound config.status 1.7.1
21630configured by $0, generated by GNU Autoconf 2.69,
21631  with options \\"\$ac_cs_config\\"
21632
21633Copyright (C) 2012 Free Software Foundation, Inc.
21634This config.status script is free software; the Free Software Foundation
21635gives unlimited permission to copy, distribute and modify it."
21636
21637ac_pwd='$ac_pwd'
21638srcdir='$srcdir'
21639AWK='$AWK'
21640test -n "\$AWK" || AWK=awk
21641_ACEOF
21642
21643cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
21644# The default lists apply if the user does not specify any file.
21645ac_need_defaults=:
21646while test $# != 0
21647do
21648  case $1 in
21649  --*=?*)
21650    ac_option=`expr "X$1" : 'X\([^=]*\)='`
21651    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
21652    ac_shift=:
21653    ;;
21654  --*=)
21655    ac_option=`expr "X$1" : 'X\([^=]*\)='`
21656    ac_optarg=
21657    ac_shift=:
21658    ;;
21659  *)
21660    ac_option=$1
21661    ac_optarg=$2
21662    ac_shift=shift
21663    ;;
21664  esac
21665
21666  case $ac_option in
21667  # Handling of the options.
21668  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
21669    ac_cs_recheck=: ;;
21670  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
21671    $as_echo "$ac_cs_version"; exit ;;
21672  --config | --confi | --conf | --con | --co | --c )
21673    $as_echo "$ac_cs_config"; exit ;;
21674  --debug | --debu | --deb | --de | --d | -d )
21675    debug=: ;;
21676  --file | --fil | --fi | --f )
21677    $ac_shift
21678    case $ac_optarg in
21679    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
21680    '') as_fn_error $? "missing file argument" ;;
21681    esac
21682    as_fn_append CONFIG_FILES " '$ac_optarg'"
21683    ac_need_defaults=false;;
21684  --header | --heade | --head | --hea )
21685    $ac_shift
21686    case $ac_optarg in
21687    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
21688    esac
21689    as_fn_append CONFIG_HEADERS " '$ac_optarg'"
21690    ac_need_defaults=false;;
21691  --he | --h)
21692    # Conflict between --help and --header
21693    as_fn_error $? "ambiguous option: \`$1'
21694Try \`$0 --help' for more information.";;
21695  --help | --hel | -h )
21696    $as_echo "$ac_cs_usage"; exit ;;
21697  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
21698  | -silent | --silent | --silen | --sile | --sil | --si | --s)
21699    ac_cs_silent=: ;;
21700
21701  # This is an error.
21702  -*) as_fn_error $? "unrecognized option: \`$1'
21703Try \`$0 --help' for more information." ;;
21704
21705  *) as_fn_append ac_config_targets " $1"
21706     ac_need_defaults=false ;;
21707
21708  esac
21709  shift
21710done
21711
21712ac_configure_extra_args=
21713
21714if $ac_cs_silent; then
21715  exec 6>/dev/null
21716  ac_configure_extra_args="$ac_configure_extra_args --silent"
21717fi
21718
21719_ACEOF
21720cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
21721if \$ac_cs_recheck; then
21722  set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
21723  shift
21724  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
21725  CONFIG_SHELL='$SHELL'
21726  export CONFIG_SHELL
21727  exec "\$@"
21728fi
21729
21730_ACEOF
21731cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
21732exec 5>>config.log
21733{
21734  echo
21735  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
21736## Running $as_me. ##
21737_ASBOX
21738  $as_echo "$ac_log"
21739} >&5
21740
21741_ACEOF
21742cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
21743#
21744# INIT-COMMANDS
21745#
21746
21747
21748# The HP-UX ksh and POSIX shell print the target directory to stdout
21749# if CDPATH is set.
21750(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
21751
21752sed_quote_subst='$sed_quote_subst'
21753double_quote_subst='$double_quote_subst'
21754delay_variable_subst='$delay_variable_subst'
21755macro_version='`$ECHO "$macro_version" | $SED "$delay_single_quote_subst"`'
21756macro_revision='`$ECHO "$macro_revision" | $SED "$delay_single_quote_subst"`'
21757enable_shared='`$ECHO "$enable_shared" | $SED "$delay_single_quote_subst"`'
21758enable_static='`$ECHO "$enable_static" | $SED "$delay_single_quote_subst"`'
21759pic_mode='`$ECHO "$pic_mode" | $SED "$delay_single_quote_subst"`'
21760enable_fast_install='`$ECHO "$enable_fast_install" | $SED "$delay_single_quote_subst"`'
21761shared_archive_member_spec='`$ECHO "$shared_archive_member_spec" | $SED "$delay_single_quote_subst"`'
21762SHELL='`$ECHO "$SHELL" | $SED "$delay_single_quote_subst"`'
21763ECHO='`$ECHO "$ECHO" | $SED "$delay_single_quote_subst"`'
21764PATH_SEPARATOR='`$ECHO "$PATH_SEPARATOR" | $SED "$delay_single_quote_subst"`'
21765host_alias='`$ECHO "$host_alias" | $SED "$delay_single_quote_subst"`'
21766host='`$ECHO "$host" | $SED "$delay_single_quote_subst"`'
21767host_os='`$ECHO "$host_os" | $SED "$delay_single_quote_subst"`'
21768build_alias='`$ECHO "$build_alias" | $SED "$delay_single_quote_subst"`'
21769build='`$ECHO "$build" | $SED "$delay_single_quote_subst"`'
21770build_os='`$ECHO "$build_os" | $SED "$delay_single_quote_subst"`'
21771SED='`$ECHO "$SED" | $SED "$delay_single_quote_subst"`'
21772Xsed='`$ECHO "$Xsed" | $SED "$delay_single_quote_subst"`'
21773GREP='`$ECHO "$GREP" | $SED "$delay_single_quote_subst"`'
21774EGREP='`$ECHO "$EGREP" | $SED "$delay_single_quote_subst"`'
21775FGREP='`$ECHO "$FGREP" | $SED "$delay_single_quote_subst"`'
21776LD='`$ECHO "$LD" | $SED "$delay_single_quote_subst"`'
21777NM='`$ECHO "$NM" | $SED "$delay_single_quote_subst"`'
21778LN_S='`$ECHO "$LN_S" | $SED "$delay_single_quote_subst"`'
21779max_cmd_len='`$ECHO "$max_cmd_len" | $SED "$delay_single_quote_subst"`'
21780ac_objext='`$ECHO "$ac_objext" | $SED "$delay_single_quote_subst"`'
21781exeext='`$ECHO "$exeext" | $SED "$delay_single_quote_subst"`'
21782lt_unset='`$ECHO "$lt_unset" | $SED "$delay_single_quote_subst"`'
21783lt_SP2NL='`$ECHO "$lt_SP2NL" | $SED "$delay_single_quote_subst"`'
21784lt_NL2SP='`$ECHO "$lt_NL2SP" | $SED "$delay_single_quote_subst"`'
21785lt_cv_to_host_file_cmd='`$ECHO "$lt_cv_to_host_file_cmd" | $SED "$delay_single_quote_subst"`'
21786lt_cv_to_tool_file_cmd='`$ECHO "$lt_cv_to_tool_file_cmd" | $SED "$delay_single_quote_subst"`'
21787reload_flag='`$ECHO "$reload_flag" | $SED "$delay_single_quote_subst"`'
21788reload_cmds='`$ECHO "$reload_cmds" | $SED "$delay_single_quote_subst"`'
21789OBJDUMP='`$ECHO "$OBJDUMP" | $SED "$delay_single_quote_subst"`'
21790deplibs_check_method='`$ECHO "$deplibs_check_method" | $SED "$delay_single_quote_subst"`'
21791file_magic_cmd='`$ECHO "$file_magic_cmd" | $SED "$delay_single_quote_subst"`'
21792file_magic_glob='`$ECHO "$file_magic_glob" | $SED "$delay_single_quote_subst"`'
21793want_nocaseglob='`$ECHO "$want_nocaseglob" | $SED "$delay_single_quote_subst"`'
21794DLLTOOL='`$ECHO "$DLLTOOL" | $SED "$delay_single_quote_subst"`'
21795sharedlib_from_linklib_cmd='`$ECHO "$sharedlib_from_linklib_cmd" | $SED "$delay_single_quote_subst"`'
21796AR='`$ECHO "$AR" | $SED "$delay_single_quote_subst"`'
21797AR_FLAGS='`$ECHO "$AR_FLAGS" | $SED "$delay_single_quote_subst"`'
21798archiver_list_spec='`$ECHO "$archiver_list_spec" | $SED "$delay_single_quote_subst"`'
21799STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`'
21800RANLIB='`$ECHO "$RANLIB" | $SED "$delay_single_quote_subst"`'
21801old_postinstall_cmds='`$ECHO "$old_postinstall_cmds" | $SED "$delay_single_quote_subst"`'
21802old_postuninstall_cmds='`$ECHO "$old_postuninstall_cmds" | $SED "$delay_single_quote_subst"`'
21803old_archive_cmds='`$ECHO "$old_archive_cmds" | $SED "$delay_single_quote_subst"`'
21804lock_old_archive_extraction='`$ECHO "$lock_old_archive_extraction" | $SED "$delay_single_quote_subst"`'
21805CC='`$ECHO "$CC" | $SED "$delay_single_quote_subst"`'
21806CFLAGS='`$ECHO "$CFLAGS" | $SED "$delay_single_quote_subst"`'
21807compiler='`$ECHO "$compiler" | $SED "$delay_single_quote_subst"`'
21808GCC='`$ECHO "$GCC" | $SED "$delay_single_quote_subst"`'
21809lt_cv_sys_global_symbol_pipe='`$ECHO "$lt_cv_sys_global_symbol_pipe" | $SED "$delay_single_quote_subst"`'
21810lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`'
21811lt_cv_sys_global_symbol_to_import='`$ECHO "$lt_cv_sys_global_symbol_to_import" | $SED "$delay_single_quote_subst"`'
21812lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`'
21813lt_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"`'
21814lt_cv_nm_interface='`$ECHO "$lt_cv_nm_interface" | $SED "$delay_single_quote_subst"`'
21815nm_file_list_spec='`$ECHO "$nm_file_list_spec" | $SED "$delay_single_quote_subst"`'
21816lt_sysroot='`$ECHO "$lt_sysroot" | $SED "$delay_single_quote_subst"`'
21817lt_cv_truncate_bin='`$ECHO "$lt_cv_truncate_bin" | $SED "$delay_single_quote_subst"`'
21818objdir='`$ECHO "$objdir" | $SED "$delay_single_quote_subst"`'
21819MAGIC_CMD='`$ECHO "$MAGIC_CMD" | $SED "$delay_single_quote_subst"`'
21820lt_prog_compiler_no_builtin_flag='`$ECHO "$lt_prog_compiler_no_builtin_flag" | $SED "$delay_single_quote_subst"`'
21821lt_prog_compiler_pic='`$ECHO "$lt_prog_compiler_pic" | $SED "$delay_single_quote_subst"`'
21822lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`'
21823lt_prog_compiler_static='`$ECHO "$lt_prog_compiler_static" | $SED "$delay_single_quote_subst"`'
21824lt_cv_prog_compiler_c_o='`$ECHO "$lt_cv_prog_compiler_c_o" | $SED "$delay_single_quote_subst"`'
21825need_locks='`$ECHO "$need_locks" | $SED "$delay_single_quote_subst"`'
21826MANIFEST_TOOL='`$ECHO "$MANIFEST_TOOL" | $SED "$delay_single_quote_subst"`'
21827DSYMUTIL='`$ECHO "$DSYMUTIL" | $SED "$delay_single_quote_subst"`'
21828NMEDIT='`$ECHO "$NMEDIT" | $SED "$delay_single_quote_subst"`'
21829LIPO='`$ECHO "$LIPO" | $SED "$delay_single_quote_subst"`'
21830OTOOL='`$ECHO "$OTOOL" | $SED "$delay_single_quote_subst"`'
21831OTOOL64='`$ECHO "$OTOOL64" | $SED "$delay_single_quote_subst"`'
21832libext='`$ECHO "$libext" | $SED "$delay_single_quote_subst"`'
21833shrext_cmds='`$ECHO "$shrext_cmds" | $SED "$delay_single_quote_subst"`'
21834extract_expsyms_cmds='`$ECHO "$extract_expsyms_cmds" | $SED "$delay_single_quote_subst"`'
21835archive_cmds_need_lc='`$ECHO "$archive_cmds_need_lc" | $SED "$delay_single_quote_subst"`'
21836enable_shared_with_static_runtimes='`$ECHO "$enable_shared_with_static_runtimes" | $SED "$delay_single_quote_subst"`'
21837export_dynamic_flag_spec='`$ECHO "$export_dynamic_flag_spec" | $SED "$delay_single_quote_subst"`'
21838whole_archive_flag_spec='`$ECHO "$whole_archive_flag_spec" | $SED "$delay_single_quote_subst"`'
21839compiler_needs_object='`$ECHO "$compiler_needs_object" | $SED "$delay_single_quote_subst"`'
21840old_archive_from_new_cmds='`$ECHO "$old_archive_from_new_cmds" | $SED "$delay_single_quote_subst"`'
21841old_archive_from_expsyms_cmds='`$ECHO "$old_archive_from_expsyms_cmds" | $SED "$delay_single_quote_subst"`'
21842archive_cmds='`$ECHO "$archive_cmds" | $SED "$delay_single_quote_subst"`'
21843archive_expsym_cmds='`$ECHO "$archive_expsym_cmds" | $SED "$delay_single_quote_subst"`'
21844module_cmds='`$ECHO "$module_cmds" | $SED "$delay_single_quote_subst"`'
21845module_expsym_cmds='`$ECHO "$module_expsym_cmds" | $SED "$delay_single_quote_subst"`'
21846with_gnu_ld='`$ECHO "$with_gnu_ld" | $SED "$delay_single_quote_subst"`'
21847allow_undefined_flag='`$ECHO "$allow_undefined_flag" | $SED "$delay_single_quote_subst"`'
21848no_undefined_flag='`$ECHO "$no_undefined_flag" | $SED "$delay_single_quote_subst"`'
21849hardcode_libdir_flag_spec='`$ECHO "$hardcode_libdir_flag_spec" | $SED "$delay_single_quote_subst"`'
21850hardcode_libdir_separator='`$ECHO "$hardcode_libdir_separator" | $SED "$delay_single_quote_subst"`'
21851hardcode_direct='`$ECHO "$hardcode_direct" | $SED "$delay_single_quote_subst"`'
21852hardcode_direct_absolute='`$ECHO "$hardcode_direct_absolute" | $SED "$delay_single_quote_subst"`'
21853hardcode_minus_L='`$ECHO "$hardcode_minus_L" | $SED "$delay_single_quote_subst"`'
21854hardcode_shlibpath_var='`$ECHO "$hardcode_shlibpath_var" | $SED "$delay_single_quote_subst"`'
21855hardcode_automatic='`$ECHO "$hardcode_automatic" | $SED "$delay_single_quote_subst"`'
21856inherit_rpath='`$ECHO "$inherit_rpath" | $SED "$delay_single_quote_subst"`'
21857link_all_deplibs='`$ECHO "$link_all_deplibs" | $SED "$delay_single_quote_subst"`'
21858always_export_symbols='`$ECHO "$always_export_symbols" | $SED "$delay_single_quote_subst"`'
21859export_symbols_cmds='`$ECHO "$export_symbols_cmds" | $SED "$delay_single_quote_subst"`'
21860exclude_expsyms='`$ECHO "$exclude_expsyms" | $SED "$delay_single_quote_subst"`'
21861include_expsyms='`$ECHO "$include_expsyms" | $SED "$delay_single_quote_subst"`'
21862prelink_cmds='`$ECHO "$prelink_cmds" | $SED "$delay_single_quote_subst"`'
21863postlink_cmds='`$ECHO "$postlink_cmds" | $SED "$delay_single_quote_subst"`'
21864file_list_spec='`$ECHO "$file_list_spec" | $SED "$delay_single_quote_subst"`'
21865variables_saved_for_relink='`$ECHO "$variables_saved_for_relink" | $SED "$delay_single_quote_subst"`'
21866need_lib_prefix='`$ECHO "$need_lib_prefix" | $SED "$delay_single_quote_subst"`'
21867need_version='`$ECHO "$need_version" | $SED "$delay_single_quote_subst"`'
21868version_type='`$ECHO "$version_type" | $SED "$delay_single_quote_subst"`'
21869runpath_var='`$ECHO "$runpath_var" | $SED "$delay_single_quote_subst"`'
21870shlibpath_var='`$ECHO "$shlibpath_var" | $SED "$delay_single_quote_subst"`'
21871shlibpath_overrides_runpath='`$ECHO "$shlibpath_overrides_runpath" | $SED "$delay_single_quote_subst"`'
21872libname_spec='`$ECHO "$libname_spec" | $SED "$delay_single_quote_subst"`'
21873library_names_spec='`$ECHO "$library_names_spec" | $SED "$delay_single_quote_subst"`'
21874soname_spec='`$ECHO "$soname_spec" | $SED "$delay_single_quote_subst"`'
21875install_override_mode='`$ECHO "$install_override_mode" | $SED "$delay_single_quote_subst"`'
21876postinstall_cmds='`$ECHO "$postinstall_cmds" | $SED "$delay_single_quote_subst"`'
21877postuninstall_cmds='`$ECHO "$postuninstall_cmds" | $SED "$delay_single_quote_subst"`'
21878finish_cmds='`$ECHO "$finish_cmds" | $SED "$delay_single_quote_subst"`'
21879finish_eval='`$ECHO "$finish_eval" | $SED "$delay_single_quote_subst"`'
21880hardcode_into_libs='`$ECHO "$hardcode_into_libs" | $SED "$delay_single_quote_subst"`'
21881sys_lib_search_path_spec='`$ECHO "$sys_lib_search_path_spec" | $SED "$delay_single_quote_subst"`'
21882configure_time_dlsearch_path='`$ECHO "$configure_time_dlsearch_path" | $SED "$delay_single_quote_subst"`'
21883configure_time_lt_sys_library_path='`$ECHO "$configure_time_lt_sys_library_path" | $SED "$delay_single_quote_subst"`'
21884hardcode_action='`$ECHO "$hardcode_action" | $SED "$delay_single_quote_subst"`'
21885enable_dlopen='`$ECHO "$enable_dlopen" | $SED "$delay_single_quote_subst"`'
21886enable_dlopen_self='`$ECHO "$enable_dlopen_self" | $SED "$delay_single_quote_subst"`'
21887enable_dlopen_self_static='`$ECHO "$enable_dlopen_self_static" | $SED "$delay_single_quote_subst"`'
21888old_striplib='`$ECHO "$old_striplib" | $SED "$delay_single_quote_subst"`'
21889striplib='`$ECHO "$striplib" | $SED "$delay_single_quote_subst"`'
21890
21891LTCC='$LTCC'
21892LTCFLAGS='$LTCFLAGS'
21893compiler='$compiler_DEFAULT'
21894
21895# A function that is used when there is no print builtin or printf.
21896func_fallback_echo ()
21897{
21898  eval 'cat <<_LTECHO_EOF
21899\$1
21900_LTECHO_EOF'
21901}
21902
21903# Quote evaled strings.
21904for var in SHELL \
21905ECHO \
21906PATH_SEPARATOR \
21907SED \
21908GREP \
21909EGREP \
21910FGREP \
21911LD \
21912NM \
21913LN_S \
21914lt_SP2NL \
21915lt_NL2SP \
21916reload_flag \
21917OBJDUMP \
21918deplibs_check_method \
21919file_magic_cmd \
21920file_magic_glob \
21921want_nocaseglob \
21922DLLTOOL \
21923sharedlib_from_linklib_cmd \
21924AR \
21925AR_FLAGS \
21926archiver_list_spec \
21927STRIP \
21928RANLIB \
21929CC \
21930CFLAGS \
21931compiler \
21932lt_cv_sys_global_symbol_pipe \
21933lt_cv_sys_global_symbol_to_cdecl \
21934lt_cv_sys_global_symbol_to_import \
21935lt_cv_sys_global_symbol_to_c_name_address \
21936lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \
21937lt_cv_nm_interface \
21938nm_file_list_spec \
21939lt_cv_truncate_bin \
21940lt_prog_compiler_no_builtin_flag \
21941lt_prog_compiler_pic \
21942lt_prog_compiler_wl \
21943lt_prog_compiler_static \
21944lt_cv_prog_compiler_c_o \
21945need_locks \
21946MANIFEST_TOOL \
21947DSYMUTIL \
21948NMEDIT \
21949LIPO \
21950OTOOL \
21951OTOOL64 \
21952shrext_cmds \
21953export_dynamic_flag_spec \
21954whole_archive_flag_spec \
21955compiler_needs_object \
21956with_gnu_ld \
21957allow_undefined_flag \
21958no_undefined_flag \
21959hardcode_libdir_flag_spec \
21960hardcode_libdir_separator \
21961exclude_expsyms \
21962include_expsyms \
21963file_list_spec \
21964variables_saved_for_relink \
21965libname_spec \
21966library_names_spec \
21967soname_spec \
21968install_override_mode \
21969finish_eval \
21970old_striplib \
21971striplib; do
21972    case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
21973    *[\\\\\\\`\\"\\\$]*)
21974      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes
21975      ;;
21976    *)
21977      eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
21978      ;;
21979    esac
21980done
21981
21982# Double-quote double-evaled strings.
21983for var in reload_cmds \
21984old_postinstall_cmds \
21985old_postuninstall_cmds \
21986old_archive_cmds \
21987extract_expsyms_cmds \
21988old_archive_from_new_cmds \
21989old_archive_from_expsyms_cmds \
21990archive_cmds \
21991archive_expsym_cmds \
21992module_cmds \
21993module_expsym_cmds \
21994export_symbols_cmds \
21995prelink_cmds \
21996postlink_cmds \
21997postinstall_cmds \
21998postuninstall_cmds \
21999finish_cmds \
22000sys_lib_search_path_spec \
22001configure_time_dlsearch_path \
22002configure_time_lt_sys_library_path; do
22003    case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
22004    *[\\\\\\\`\\"\\\$]*)
22005      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes
22006      ;;
22007    *)
22008      eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
22009      ;;
22010    esac
22011done
22012
22013ac_aux_dir='$ac_aux_dir'
22014
22015# See if we are running on zsh, and set the options that allow our
22016# commands through without removal of \ escapes INIT.
22017if test -n "\${ZSH_VERSION+set}"; then
22018   setopt NO_GLOB_SUBST
22019fi
22020
22021
22022    PACKAGE='$PACKAGE'
22023    VERSION='$VERSION'
22024    RM='$RM'
22025    ofile='$ofile'
22026
22027
22028
22029
22030_ACEOF
22031
22032cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
22033
22034# Handling of arguments.
22035for ac_config_target in $ac_config_targets
22036do
22037  case $ac_config_target in
22038    "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;;
22039    "disable-rpath") CONFIG_COMMANDS="$CONFIG_COMMANDS disable-rpath" ;;
22040    "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
22041    "doc/example.conf") CONFIG_FILES="$CONFIG_FILES doc/example.conf" ;;
22042    "doc/libunbound.3") CONFIG_FILES="$CONFIG_FILES doc/libunbound.3" ;;
22043    "doc/unbound.8") CONFIG_FILES="$CONFIG_FILES doc/unbound.8" ;;
22044    "doc/unbound-anchor.8") CONFIG_FILES="$CONFIG_FILES doc/unbound-anchor.8" ;;
22045    "doc/unbound-checkconf.8") CONFIG_FILES="$CONFIG_FILES doc/unbound-checkconf.8" ;;
22046    "doc/unbound.conf.5") CONFIG_FILES="$CONFIG_FILES doc/unbound.conf.5" ;;
22047    "doc/unbound-control.8") CONFIG_FILES="$CONFIG_FILES doc/unbound-control.8" ;;
22048    "doc/unbound-host.1") CONFIG_FILES="$CONFIG_FILES doc/unbound-host.1" ;;
22049    "smallapp/unbound-control-setup.sh") CONFIG_FILES="$CONFIG_FILES smallapp/unbound-control-setup.sh" ;;
22050    "dnstap/dnstap_config.h") CONFIG_FILES="$CONFIG_FILES dnstap/dnstap_config.h" ;;
22051    "dnscrypt/dnscrypt_config.h") CONFIG_FILES="$CONFIG_FILES dnscrypt/dnscrypt_config.h" ;;
22052    "contrib/libunbound.pc") CONFIG_FILES="$CONFIG_FILES contrib/libunbound.pc" ;;
22053    "contrib/unbound.socket") CONFIG_FILES="$CONFIG_FILES contrib/unbound.socket" ;;
22054    "contrib/unbound.service") CONFIG_FILES="$CONFIG_FILES contrib/unbound.service" ;;
22055    "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
22056
22057  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
22058  esac
22059done
22060
22061
22062# If the user did not use the arguments to specify the items to instantiate,
22063# then the envvar interface is used.  Set only those that are not.
22064# We use the long form for the default assignment because of an extremely
22065# bizarre bug on SunOS 4.1.3.
22066if $ac_need_defaults; then
22067  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
22068  test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
22069  test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
22070fi
22071
22072# Have a temporary directory for convenience.  Make it in the build tree
22073# simply because there is no reason against having it here, and in addition,
22074# creating and moving files from /tmp can sometimes cause problems.
22075# Hook for its removal unless debugging.
22076# Note that there is a small window in which the directory will not be cleaned:
22077# after its creation but before its name has been assigned to `$tmp'.
22078$debug ||
22079{
22080  tmp= ac_tmp=
22081  trap 'exit_status=$?
22082  : "${ac_tmp:=$tmp}"
22083  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
22084' 0
22085  trap 'as_fn_exit 1' 1 2 13 15
22086}
22087# Create a (secure) tmp directory for tmp files.
22088
22089{
22090  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
22091  test -d "$tmp"
22092}  ||
22093{
22094  tmp=./conf$$-$RANDOM
22095  (umask 077 && mkdir "$tmp")
22096} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
22097ac_tmp=$tmp
22098
22099# Set up the scripts for CONFIG_FILES section.
22100# No need to generate them if there are no CONFIG_FILES.
22101# This happens for instance with `./config.status config.h'.
22102if test -n "$CONFIG_FILES"; then
22103
22104
22105ac_cr=`echo X | tr X '\015'`
22106# On cygwin, bash can eat \r inside `` if the user requested igncr.
22107# But we know of no other shell where ac_cr would be empty at this
22108# point, so we can use a bashism as a fallback.
22109if test "x$ac_cr" = x; then
22110  eval ac_cr=\$\'\\r\'
22111fi
22112ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
22113if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
22114  ac_cs_awk_cr='\\r'
22115else
22116  ac_cs_awk_cr=$ac_cr
22117fi
22118
22119echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
22120_ACEOF
22121
22122
22123{
22124  echo "cat >conf$$subs.awk <<_ACEOF" &&
22125  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
22126  echo "_ACEOF"
22127} >conf$$subs.sh ||
22128  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
22129ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
22130ac_delim='%!_!# '
22131for ac_last_try in false false false false false :; do
22132  . ./conf$$subs.sh ||
22133    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
22134
22135  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
22136  if test $ac_delim_n = $ac_delim_num; then
22137    break
22138  elif $ac_last_try; then
22139    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
22140  else
22141    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
22142  fi
22143done
22144rm -f conf$$subs.sh
22145
22146cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
22147cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
22148_ACEOF
22149sed -n '
22150h
22151s/^/S["/; s/!.*/"]=/
22152p
22153g
22154s/^[^!]*!//
22155:repl
22156t repl
22157s/'"$ac_delim"'$//
22158t delim
22159:nl
22160h
22161s/\(.\{148\}\)..*/\1/
22162t more1
22163s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
22164p
22165n
22166b repl
22167:more1
22168s/["\\]/\\&/g; s/^/"/; s/$/"\\/
22169p
22170g
22171s/.\{148\}//
22172t nl
22173:delim
22174h
22175s/\(.\{148\}\)..*/\1/
22176t more2
22177s/["\\]/\\&/g; s/^/"/; s/$/"/
22178p
22179b
22180:more2
22181s/["\\]/\\&/g; s/^/"/; s/$/"\\/
22182p
22183g
22184s/.\{148\}//
22185t delim
22186' <conf$$subs.awk | sed '
22187/^[^""]/{
22188  N
22189  s/\n//
22190}
22191' >>$CONFIG_STATUS || ac_write_fail=1
22192rm -f conf$$subs.awk
22193cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
22194_ACAWK
22195cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
22196  for (key in S) S_is_set[key] = 1
22197  FS = ""
22198
22199}
22200{
22201  line = $ 0
22202  nfields = split(line, field, "@")
22203  substed = 0
22204  len = length(field[1])
22205  for (i = 2; i < nfields; i++) {
22206    key = field[i]
22207    keylen = length(key)
22208    if (S_is_set[key]) {
22209      value = S[key]
22210      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
22211      len += length(value) + length(field[++i])
22212      substed = 1
22213    } else
22214      len += 1 + keylen
22215  }
22216
22217  print line
22218}
22219
22220_ACAWK
22221_ACEOF
22222cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
22223if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
22224  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
22225else
22226  cat
22227fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
22228  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
22229_ACEOF
22230
22231# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
22232# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
22233# trailing colons and then remove the whole line if VPATH becomes empty
22234# (actually we leave an empty line to preserve line numbers).
22235if test "x$srcdir" = x.; then
22236  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
22237h
22238s///
22239s/^/:/
22240s/[	 ]*$/:/
22241s/:\$(srcdir):/:/g
22242s/:\${srcdir}:/:/g
22243s/:@srcdir@:/:/g
22244s/^:*//
22245s/:*$//
22246x
22247s/\(=[	 ]*\).*/\1/
22248G
22249s/\n//
22250s/^[^=]*=[	 ]*$//
22251}'
22252fi
22253
22254cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
22255fi # test -n "$CONFIG_FILES"
22256
22257# Set up the scripts for CONFIG_HEADERS section.
22258# No need to generate them if there are no CONFIG_HEADERS.
22259# This happens for instance with `./config.status Makefile'.
22260if test -n "$CONFIG_HEADERS"; then
22261cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
22262BEGIN {
22263_ACEOF
22264
22265# Transform confdefs.h into an awk script `defines.awk', embedded as
22266# here-document in config.status, that substitutes the proper values into
22267# config.h.in to produce config.h.
22268
22269# Create a delimiter string that does not exist in confdefs.h, to ease
22270# handling of long lines.
22271ac_delim='%!_!# '
22272for ac_last_try in false false :; do
22273  ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
22274  if test -z "$ac_tt"; then
22275    break
22276  elif $ac_last_try; then
22277    as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
22278  else
22279    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
22280  fi
22281done
22282
22283# For the awk script, D is an array of macro values keyed by name,
22284# likewise P contains macro parameters if any.  Preserve backslash
22285# newline sequences.
22286
22287ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
22288sed -n '
22289s/.\{148\}/&'"$ac_delim"'/g
22290t rset
22291:rset
22292s/^[	 ]*#[	 ]*define[	 ][	 ]*/ /
22293t def
22294d
22295:def
22296s/\\$//
22297t bsnl
22298s/["\\]/\\&/g
22299s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
22300D["\1"]=" \3"/p
22301s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2"/p
22302d
22303:bsnl
22304s/["\\]/\\&/g
22305s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
22306D["\1"]=" \3\\\\\\n"\\/p
22307t cont
22308s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
22309t cont
22310d
22311:cont
22312n
22313s/.\{148\}/&'"$ac_delim"'/g
22314t clear
22315:clear
22316s/\\$//
22317t bsnlc
22318s/["\\]/\\&/g; s/^/"/; s/$/"/p
22319d
22320:bsnlc
22321s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
22322b cont
22323' <confdefs.h | sed '
22324s/'"$ac_delim"'/"\\\
22325"/g' >>$CONFIG_STATUS || ac_write_fail=1
22326
22327cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
22328  for (key in D) D_is_set[key] = 1
22329  FS = ""
22330}
22331/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
22332  line = \$ 0
22333  split(line, arg, " ")
22334  if (arg[1] == "#") {
22335    defundef = arg[2]
22336    mac1 = arg[3]
22337  } else {
22338    defundef = substr(arg[1], 2)
22339    mac1 = arg[2]
22340  }
22341  split(mac1, mac2, "(") #)
22342  macro = mac2[1]
22343  prefix = substr(line, 1, index(line, defundef) - 1)
22344  if (D_is_set[macro]) {
22345    # Preserve the white space surrounding the "#".
22346    print prefix "define", macro P[macro] D[macro]
22347    next
22348  } else {
22349    # Replace #undef with comments.  This is necessary, for example,
22350    # in the case of _POSIX_SOURCE, which is predefined and required
22351    # on some systems where configure will not decide to define it.
22352    if (defundef == "undef") {
22353      print "/*", prefix defundef, macro, "*/"
22354      next
22355    }
22356  }
22357}
22358{ print }
22359_ACAWK
22360_ACEOF
22361cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
22362  as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
22363fi # test -n "$CONFIG_HEADERS"
22364
22365
22366eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS    :C $CONFIG_COMMANDS"
22367shift
22368for ac_tag
22369do
22370  case $ac_tag in
22371  :[FHLC]) ac_mode=$ac_tag; continue;;
22372  esac
22373  case $ac_mode$ac_tag in
22374  :[FHL]*:*);;
22375  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
22376  :[FH]-) ac_tag=-:-;;
22377  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
22378  esac
22379  ac_save_IFS=$IFS
22380  IFS=:
22381  set x $ac_tag
22382  IFS=$ac_save_IFS
22383  shift
22384  ac_file=$1
22385  shift
22386
22387  case $ac_mode in
22388  :L) ac_source=$1;;
22389  :[FH])
22390    ac_file_inputs=
22391    for ac_f
22392    do
22393      case $ac_f in
22394      -) ac_f="$ac_tmp/stdin";;
22395      *) # Look for the file first in the build tree, then in the source tree
22396	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
22397	 # because $ac_f cannot contain `:'.
22398	 test -f "$ac_f" ||
22399	   case $ac_f in
22400	   [\\/$]*) false;;
22401	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
22402	   esac ||
22403	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
22404      esac
22405      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
22406      as_fn_append ac_file_inputs " '$ac_f'"
22407    done
22408
22409    # Let's still pretend it is `configure' which instantiates (i.e., don't
22410    # use $as_me), people would be surprised to read:
22411    #    /* config.h.  Generated by config.status.  */
22412    configure_input='Generated from '`
22413	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
22414	`' by configure.'
22415    if test x"$ac_file" != x-; then
22416      configure_input="$ac_file.  $configure_input"
22417      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
22418$as_echo "$as_me: creating $ac_file" >&6;}
22419    fi
22420    # Neutralize special characters interpreted by sed in replacement strings.
22421    case $configure_input in #(
22422    *\&* | *\|* | *\\* )
22423       ac_sed_conf_input=`$as_echo "$configure_input" |
22424       sed 's/[\\\\&|]/\\\\&/g'`;; #(
22425    *) ac_sed_conf_input=$configure_input;;
22426    esac
22427
22428    case $ac_tag in
22429    *:-:* | *:-) cat >"$ac_tmp/stdin" \
22430      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
22431    esac
22432    ;;
22433  esac
22434
22435  ac_dir=`$as_dirname -- "$ac_file" ||
22436$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
22437	 X"$ac_file" : 'X\(//\)[^/]' \| \
22438	 X"$ac_file" : 'X\(//\)$' \| \
22439	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
22440$as_echo X"$ac_file" |
22441    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
22442	    s//\1/
22443	    q
22444	  }
22445	  /^X\(\/\/\)[^/].*/{
22446	    s//\1/
22447	    q
22448	  }
22449	  /^X\(\/\/\)$/{
22450	    s//\1/
22451	    q
22452	  }
22453	  /^X\(\/\).*/{
22454	    s//\1/
22455	    q
22456	  }
22457	  s/.*/./; q'`
22458  as_dir="$ac_dir"; as_fn_mkdir_p
22459  ac_builddir=.
22460
22461case "$ac_dir" in
22462.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
22463*)
22464  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
22465  # A ".." for each directory in $ac_dir_suffix.
22466  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
22467  case $ac_top_builddir_sub in
22468  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
22469  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
22470  esac ;;
22471esac
22472ac_abs_top_builddir=$ac_pwd
22473ac_abs_builddir=$ac_pwd$ac_dir_suffix
22474# for backward compatibility:
22475ac_top_builddir=$ac_top_build_prefix
22476
22477case $srcdir in
22478  .)  # We are building in place.
22479    ac_srcdir=.
22480    ac_top_srcdir=$ac_top_builddir_sub
22481    ac_abs_top_srcdir=$ac_pwd ;;
22482  [\\/]* | ?:[\\/]* )  # Absolute name.
22483    ac_srcdir=$srcdir$ac_dir_suffix;
22484    ac_top_srcdir=$srcdir
22485    ac_abs_top_srcdir=$srcdir ;;
22486  *) # Relative name.
22487    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
22488    ac_top_srcdir=$ac_top_build_prefix$srcdir
22489    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
22490esac
22491ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
22492
22493
22494  case $ac_mode in
22495  :F)
22496  #
22497  # CONFIG_FILE
22498  #
22499
22500_ACEOF
22501
22502cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
22503# If the template does not know about datarootdir, expand it.
22504# FIXME: This hack should be removed a few years after 2.60.
22505ac_datarootdir_hack=; ac_datarootdir_seen=
22506ac_sed_dataroot='
22507/datarootdir/ {
22508  p
22509  q
22510}
22511/@datadir@/p
22512/@docdir@/p
22513/@infodir@/p
22514/@localedir@/p
22515/@mandir@/p'
22516case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
22517*datarootdir*) ac_datarootdir_seen=yes;;
22518*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
22519  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
22520$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
22521_ACEOF
22522cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
22523  ac_datarootdir_hack='
22524  s&@datadir@&$datadir&g
22525  s&@docdir@&$docdir&g
22526  s&@infodir@&$infodir&g
22527  s&@localedir@&$localedir&g
22528  s&@mandir@&$mandir&g
22529  s&\\\${datarootdir}&$datarootdir&g' ;;
22530esac
22531_ACEOF
22532
22533# Neutralize VPATH when `$srcdir' = `.'.
22534# Shell code in configure.ac might set extrasub.
22535# FIXME: do we really want to maintain this feature?
22536cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
22537ac_sed_extra="$ac_vpsub
22538$extrasub
22539_ACEOF
22540cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
22541:t
22542/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
22543s|@configure_input@|$ac_sed_conf_input|;t t
22544s&@top_builddir@&$ac_top_builddir_sub&;t t
22545s&@top_build_prefix@&$ac_top_build_prefix&;t t
22546s&@srcdir@&$ac_srcdir&;t t
22547s&@abs_srcdir@&$ac_abs_srcdir&;t t
22548s&@top_srcdir@&$ac_top_srcdir&;t t
22549s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
22550s&@builddir@&$ac_builddir&;t t
22551s&@abs_builddir@&$ac_abs_builddir&;t t
22552s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
22553$ac_datarootdir_hack
22554"
22555eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
22556  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
22557
22558test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
22559  { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
22560  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' \
22561      "$ac_tmp/out"`; test -z "$ac_out"; } &&
22562  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
22563which seems to be undefined.  Please make sure it is defined" >&5
22564$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
22565which seems to be undefined.  Please make sure it is defined" >&2;}
22566
22567  rm -f "$ac_tmp/stdin"
22568  case $ac_file in
22569  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
22570  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
22571  esac \
22572  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
22573 ;;
22574  :H)
22575  #
22576  # CONFIG_HEADER
22577  #
22578  if test x"$ac_file" != x-; then
22579    {
22580      $as_echo "/* $configure_input  */" \
22581      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
22582    } >"$ac_tmp/config.h" \
22583      || as_fn_error $? "could not create $ac_file" "$LINENO" 5
22584    if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
22585      { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
22586$as_echo "$as_me: $ac_file is unchanged" >&6;}
22587    else
22588      rm -f "$ac_file"
22589      mv "$ac_tmp/config.h" "$ac_file" \
22590	|| as_fn_error $? "could not create $ac_file" "$LINENO" 5
22591    fi
22592  else
22593    $as_echo "/* $configure_input  */" \
22594      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
22595      || as_fn_error $? "could not create -" "$LINENO" 5
22596  fi
22597 ;;
22598
22599  :C)  { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
22600$as_echo "$as_me: executing $ac_file commands" >&6;}
22601 ;;
22602  esac
22603
22604
22605  case $ac_file$ac_mode in
22606    "libtool":C)
22607
22608    # See if we are running on zsh, and set the options that allow our
22609    # commands through without removal of \ escapes.
22610    if test -n "${ZSH_VERSION+set}"; then
22611      setopt NO_GLOB_SUBST
22612    fi
22613
22614    cfgfile=${ofile}T
22615    trap "$RM \"$cfgfile\"; exit 1" 1 2 15
22616    $RM "$cfgfile"
22617
22618    cat <<_LT_EOF >> "$cfgfile"
22619#! $SHELL
22620# Generated automatically by $as_me ($PACKAGE) $VERSION
22621# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
22622# NOTE: Changes made to this file will be lost: look at ltmain.sh.
22623
22624# Provide generalized library-building support services.
22625# Written by Gordon Matzigkeit, 1996
22626
22627# Copyright (C) 2014 Free Software Foundation, Inc.
22628# This is free software; see the source for copying conditions.  There is NO
22629# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
22630
22631# GNU Libtool is free software; you can redistribute it and/or modify
22632# it under the terms of the GNU General Public License as published by
22633# the Free Software Foundation; either version 2 of of the License, or
22634# (at your option) any later version.
22635#
22636# As a special exception to the GNU General Public License, if you
22637# distribute this file as part of a program or library that is built
22638# using GNU Libtool, you may include this file under the  same
22639# distribution terms that you use for the rest of that program.
22640#
22641# GNU Libtool is distributed in the hope that it will be useful, but
22642# WITHOUT ANY WARRANTY; without even the implied warranty of
22643# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
22644# GNU General Public License for more details.
22645#
22646# You should have received a copy of the GNU General Public License
22647# along with this program.  If not, see <http://www.gnu.org/licenses/>.
22648
22649
22650# The names of the tagged configurations supported by this script.
22651available_tags=''
22652
22653# Configured defaults for sys_lib_dlsearch_path munging.
22654: \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"}
22655
22656# ### BEGIN LIBTOOL CONFIG
22657
22658# Which release of libtool.m4 was used?
22659macro_version=$macro_version
22660macro_revision=$macro_revision
22661
22662# Whether or not to build shared libraries.
22663build_libtool_libs=$enable_shared
22664
22665# Whether or not to build static libraries.
22666build_old_libs=$enable_static
22667
22668# What type of objects to build.
22669pic_mode=$pic_mode
22670
22671# Whether or not to optimize for fast installation.
22672fast_install=$enable_fast_install
22673
22674# Shared archive member basename,for filename based shared library versioning on AIX.
22675shared_archive_member_spec=$shared_archive_member_spec
22676
22677# Shell to use when invoking shell scripts.
22678SHELL=$lt_SHELL
22679
22680# An echo program that protects backslashes.
22681ECHO=$lt_ECHO
22682
22683# The PATH separator for the build system.
22684PATH_SEPARATOR=$lt_PATH_SEPARATOR
22685
22686# The host system.
22687host_alias=$host_alias
22688host=$host
22689host_os=$host_os
22690
22691# The build system.
22692build_alias=$build_alias
22693build=$build
22694build_os=$build_os
22695
22696# A sed program that does not truncate output.
22697SED=$lt_SED
22698
22699# Sed that helps us avoid accidentally triggering echo(1) options like -n.
22700Xsed="\$SED -e 1s/^X//"
22701
22702# A grep program that handles long lines.
22703GREP=$lt_GREP
22704
22705# An ERE matcher.
22706EGREP=$lt_EGREP
22707
22708# A literal string matcher.
22709FGREP=$lt_FGREP
22710
22711# A BSD- or MS-compatible name lister.
22712NM=$lt_NM
22713
22714# Whether we need soft or hard links.
22715LN_S=$lt_LN_S
22716
22717# What is the maximum length of a command?
22718max_cmd_len=$max_cmd_len
22719
22720# Object file suffix (normally "o").
22721objext=$ac_objext
22722
22723# Executable file suffix (normally "").
22724exeext=$exeext
22725
22726# whether the shell understands "unset".
22727lt_unset=$lt_unset
22728
22729# turn spaces into newlines.
22730SP2NL=$lt_lt_SP2NL
22731
22732# turn newlines into spaces.
22733NL2SP=$lt_lt_NL2SP
22734
22735# convert \$build file names to \$host format.
22736to_host_file_cmd=$lt_cv_to_host_file_cmd
22737
22738# convert \$build files to toolchain format.
22739to_tool_file_cmd=$lt_cv_to_tool_file_cmd
22740
22741# An object symbol dumper.
22742OBJDUMP=$lt_OBJDUMP
22743
22744# Method to check whether dependent libraries are shared objects.
22745deplibs_check_method=$lt_deplibs_check_method
22746
22747# Command to use when deplibs_check_method = "file_magic".
22748file_magic_cmd=$lt_file_magic_cmd
22749
22750# How to find potential files when deplibs_check_method = "file_magic".
22751file_magic_glob=$lt_file_magic_glob
22752
22753# Find potential files using nocaseglob when deplibs_check_method = "file_magic".
22754want_nocaseglob=$lt_want_nocaseglob
22755
22756# DLL creation program.
22757DLLTOOL=$lt_DLLTOOL
22758
22759# Command to associate shared and link libraries.
22760sharedlib_from_linklib_cmd=$lt_sharedlib_from_linklib_cmd
22761
22762# The archiver.
22763AR=$lt_AR
22764
22765# Flags to create an archive.
22766AR_FLAGS=$lt_AR_FLAGS
22767
22768# How to feed a file listing to the archiver.
22769archiver_list_spec=$lt_archiver_list_spec
22770
22771# A symbol stripping program.
22772STRIP=$lt_STRIP
22773
22774# Commands used to install an old-style archive.
22775RANLIB=$lt_RANLIB
22776old_postinstall_cmds=$lt_old_postinstall_cmds
22777old_postuninstall_cmds=$lt_old_postuninstall_cmds
22778
22779# Whether to use a lock for old archive extraction.
22780lock_old_archive_extraction=$lock_old_archive_extraction
22781
22782# A C compiler.
22783LTCC=$lt_CC
22784
22785# LTCC compiler flags.
22786LTCFLAGS=$lt_CFLAGS
22787
22788# Take the output of nm and produce a listing of raw symbols and C names.
22789global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
22790
22791# Transform the output of nm in a proper C declaration.
22792global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
22793
22794# Transform the output of nm into a list of symbols to manually relocate.
22795global_symbol_to_import=$lt_lt_cv_sys_global_symbol_to_import
22796
22797# Transform the output of nm in a C name address pair.
22798global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
22799
22800# Transform the output of nm in a C name address pair when lib prefix is needed.
22801global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix
22802
22803# The name lister interface.
22804nm_interface=$lt_lt_cv_nm_interface
22805
22806# Specify filename containing input files for \$NM.
22807nm_file_list_spec=$lt_nm_file_list_spec
22808
22809# The root where to search for dependent libraries,and where our libraries should be installed.
22810lt_sysroot=$lt_sysroot
22811
22812# Command to truncate a binary pipe.
22813lt_truncate_bin=$lt_lt_cv_truncate_bin
22814
22815# The name of the directory that contains temporary libtool files.
22816objdir=$objdir
22817
22818# Used to examine libraries when file_magic_cmd begins with "file".
22819MAGIC_CMD=$MAGIC_CMD
22820
22821# Must we lock files when doing compilation?
22822need_locks=$lt_need_locks
22823
22824# Manifest tool.
22825MANIFEST_TOOL=$lt_MANIFEST_TOOL
22826
22827# Tool to manipulate archived DWARF debug symbol files on Mac OS X.
22828DSYMUTIL=$lt_DSYMUTIL
22829
22830# Tool to change global to local symbols on Mac OS X.
22831NMEDIT=$lt_NMEDIT
22832
22833# Tool to manipulate fat objects and archives on Mac OS X.
22834LIPO=$lt_LIPO
22835
22836# ldd/readelf like tool for Mach-O binaries on Mac OS X.
22837OTOOL=$lt_OTOOL
22838
22839# ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4.
22840OTOOL64=$lt_OTOOL64
22841
22842# Old archive suffix (normally "a").
22843libext=$libext
22844
22845# Shared library suffix (normally ".so").
22846shrext_cmds=$lt_shrext_cmds
22847
22848# The commands to extract the exported symbol list from a shared archive.
22849extract_expsyms_cmds=$lt_extract_expsyms_cmds
22850
22851# Variables whose values should be saved in libtool wrapper scripts and
22852# restored at link time.
22853variables_saved_for_relink=$lt_variables_saved_for_relink
22854
22855# Do we need the "lib" prefix for modules?
22856need_lib_prefix=$need_lib_prefix
22857
22858# Do we need a version for libraries?
22859need_version=$need_version
22860
22861# Library versioning type.
22862version_type=$version_type
22863
22864# Shared library runtime path variable.
22865runpath_var=$runpath_var
22866
22867# Shared library path variable.
22868shlibpath_var=$shlibpath_var
22869
22870# Is shlibpath searched before the hard-coded library search path?
22871shlibpath_overrides_runpath=$shlibpath_overrides_runpath
22872
22873# Format of library name prefix.
22874libname_spec=$lt_libname_spec
22875
22876# List of archive names.  First name is the real one, the rest are links.
22877# The last name is the one that the linker finds with -lNAME
22878library_names_spec=$lt_library_names_spec
22879
22880# The coded name of the library, if different from the real name.
22881soname_spec=$lt_soname_spec
22882
22883# Permission mode override for installation of shared libraries.
22884install_override_mode=$lt_install_override_mode
22885
22886# Command to use after installation of a shared archive.
22887postinstall_cmds=$lt_postinstall_cmds
22888
22889# Command to use after uninstallation of a shared archive.
22890postuninstall_cmds=$lt_postuninstall_cmds
22891
22892# Commands used to finish a libtool library installation in a directory.
22893finish_cmds=$lt_finish_cmds
22894
22895# As "finish_cmds", except a single script fragment to be evaled but
22896# not shown.
22897finish_eval=$lt_finish_eval
22898
22899# Whether we should hardcode library paths into libraries.
22900hardcode_into_libs=$hardcode_into_libs
22901
22902# Compile-time system search path for libraries.
22903sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
22904
22905# Detected run-time system search path for libraries.
22906sys_lib_dlsearch_path_spec=$lt_configure_time_dlsearch_path
22907
22908# Explicit LT_SYS_LIBRARY_PATH set during ./configure time.
22909configure_time_lt_sys_library_path=$lt_configure_time_lt_sys_library_path
22910
22911# Whether dlopen is supported.
22912dlopen_support=$enable_dlopen
22913
22914# Whether dlopen of programs is supported.
22915dlopen_self=$enable_dlopen_self
22916
22917# Whether dlopen of statically linked programs is supported.
22918dlopen_self_static=$enable_dlopen_self_static
22919
22920# Commands to strip libraries.
22921old_striplib=$lt_old_striplib
22922striplib=$lt_striplib
22923
22924
22925# The linker used to build libraries.
22926LD=$lt_LD
22927
22928# How to create reloadable object files.
22929reload_flag=$lt_reload_flag
22930reload_cmds=$lt_reload_cmds
22931
22932# Commands used to build an old-style archive.
22933old_archive_cmds=$lt_old_archive_cmds
22934
22935# A language specific compiler.
22936CC=$lt_compiler
22937
22938# Is the compiler the GNU compiler?
22939with_gcc=$GCC
22940
22941# Compiler flag to turn off builtin functions.
22942no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag
22943
22944# Additional compiler flags for building library objects.
22945pic_flag=$lt_lt_prog_compiler_pic
22946
22947# How to pass a linker flag through the compiler.
22948wl=$lt_lt_prog_compiler_wl
22949
22950# Compiler flag to prevent dynamic linking.
22951link_static_flag=$lt_lt_prog_compiler_static
22952
22953# Does compiler simultaneously support -c and -o options?
22954compiler_c_o=$lt_lt_cv_prog_compiler_c_o
22955
22956# Whether or not to add -lc for building shared libraries.
22957build_libtool_need_lc=$archive_cmds_need_lc
22958
22959# Whether or not to disallow shared libs when runtime libs are static.
22960allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes
22961
22962# Compiler flag to allow reflexive dlopens.
22963export_dynamic_flag_spec=$lt_export_dynamic_flag_spec
22964
22965# Compiler flag to generate shared objects directly from archives.
22966whole_archive_flag_spec=$lt_whole_archive_flag_spec
22967
22968# Whether the compiler copes with passing no objects directly.
22969compiler_needs_object=$lt_compiler_needs_object
22970
22971# Create an old-style archive from a shared archive.
22972old_archive_from_new_cmds=$lt_old_archive_from_new_cmds
22973
22974# Create a temporary old-style archive to link instead of a shared archive.
22975old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds
22976
22977# Commands used to build a shared archive.
22978archive_cmds=$lt_archive_cmds
22979archive_expsym_cmds=$lt_archive_expsym_cmds
22980
22981# Commands used to build a loadable module if different from building
22982# a shared archive.
22983module_cmds=$lt_module_cmds
22984module_expsym_cmds=$lt_module_expsym_cmds
22985
22986# Whether we are building with GNU ld or not.
22987with_gnu_ld=$lt_with_gnu_ld
22988
22989# Flag that allows shared libraries with undefined symbols to be built.
22990allow_undefined_flag=$lt_allow_undefined_flag
22991
22992# Flag that enforces no undefined symbols.
22993no_undefined_flag=$lt_no_undefined_flag
22994
22995# Flag to hardcode \$libdir into a binary during linking.
22996# This must work even if \$libdir does not exist
22997hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
22998
22999# Whether we need a single "-rpath" flag with a separated argument.
23000hardcode_libdir_separator=$lt_hardcode_libdir_separator
23001
23002# Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes
23003# DIR into the resulting binary.
23004hardcode_direct=$hardcode_direct
23005
23006# Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes
23007# DIR into the resulting binary and the resulting library dependency is
23008# "absolute",i.e impossible to change by setting \$shlibpath_var if the
23009# library is relocated.
23010hardcode_direct_absolute=$hardcode_direct_absolute
23011
23012# Set to "yes" if using the -LDIR flag during linking hardcodes DIR
23013# into the resulting binary.
23014hardcode_minus_L=$hardcode_minus_L
23015
23016# Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
23017# into the resulting binary.
23018hardcode_shlibpath_var=$hardcode_shlibpath_var
23019
23020# Set to "yes" if building a shared library automatically hardcodes DIR
23021# into the library and all subsequent libraries and executables linked
23022# against it.
23023hardcode_automatic=$hardcode_automatic
23024
23025# Set to yes if linker adds runtime paths of dependent libraries
23026# to runtime path list.
23027inherit_rpath=$inherit_rpath
23028
23029# Whether libtool must link a program against all its dependency libraries.
23030link_all_deplibs=$link_all_deplibs
23031
23032# Set to "yes" if exported symbols are required.
23033always_export_symbols=$always_export_symbols
23034
23035# The commands to list exported symbols.
23036export_symbols_cmds=$lt_export_symbols_cmds
23037
23038# Symbols that should not be listed in the preloaded symbols.
23039exclude_expsyms=$lt_exclude_expsyms
23040
23041# Symbols that must always be exported.
23042include_expsyms=$lt_include_expsyms
23043
23044# Commands necessary for linking programs (against libraries) with templates.
23045prelink_cmds=$lt_prelink_cmds
23046
23047# Commands necessary for finishing linking programs.
23048postlink_cmds=$lt_postlink_cmds
23049
23050# Specify filename containing input files.
23051file_list_spec=$lt_file_list_spec
23052
23053# How to hardcode a shared library path into an executable.
23054hardcode_action=$hardcode_action
23055
23056# ### END LIBTOOL CONFIG
23057
23058_LT_EOF
23059
23060    cat <<'_LT_EOF' >> "$cfgfile"
23061
23062# ### BEGIN FUNCTIONS SHARED WITH CONFIGURE
23063
23064# func_munge_path_list VARIABLE PATH
23065# -----------------------------------
23066# VARIABLE is name of variable containing _space_ separated list of
23067# directories to be munged by the contents of PATH, which is string
23068# having a format:
23069# "DIR[:DIR]:"
23070#       string "DIR[ DIR]" will be prepended to VARIABLE
23071# ":DIR[:DIR]"
23072#       string "DIR[ DIR]" will be appended to VARIABLE
23073# "DIRP[:DIRP]::[DIRA:]DIRA"
23074#       string "DIRP[ DIRP]" will be prepended to VARIABLE and string
23075#       "DIRA[ DIRA]" will be appended to VARIABLE
23076# "DIR[:DIR]"
23077#       VARIABLE will be replaced by "DIR[ DIR]"
23078func_munge_path_list ()
23079{
23080    case x$2 in
23081    x)
23082        ;;
23083    *:)
23084        eval $1=\"`$ECHO $2 | $SED 's/:/ /g'` \$$1\"
23085        ;;
23086    x:*)
23087        eval $1=\"\$$1 `$ECHO $2 | $SED 's/:/ /g'`\"
23088        ;;
23089    *::*)
23090        eval $1=\"\$$1\ `$ECHO $2 | $SED -e 's/.*:://' -e 's/:/ /g'`\"
23091        eval $1=\"`$ECHO $2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \$$1\"
23092        ;;
23093    *)
23094        eval $1=\"`$ECHO $2 | $SED 's/:/ /g'`\"
23095        ;;
23096    esac
23097}
23098
23099
23100# Calculate cc_basename.  Skip known compiler wrappers and cross-prefix.
23101func_cc_basename ()
23102{
23103    for cc_temp in $*""; do
23104      case $cc_temp in
23105        compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
23106        distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
23107        \-*) ;;
23108        *) break;;
23109      esac
23110    done
23111    func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
23112}
23113
23114
23115# ### END FUNCTIONS SHARED WITH CONFIGURE
23116
23117_LT_EOF
23118
23119  case $host_os in
23120  aix3*)
23121    cat <<\_LT_EOF >> "$cfgfile"
23122# AIX sometimes has problems with the GCC collect2 program.  For some
23123# reason, if we set the COLLECT_NAMES environment variable, the problems
23124# vanish in a puff of smoke.
23125if test set != "${COLLECT_NAMES+set}"; then
23126  COLLECT_NAMES=
23127  export COLLECT_NAMES
23128fi
23129_LT_EOF
23130    ;;
23131  esac
23132
23133
23134ltmain=$ac_aux_dir/ltmain.sh
23135
23136
23137  # We use sed instead of cat because bash on DJGPP gets confused if
23138  # if finds mixed CR/LF and LF-only lines.  Since sed operates in
23139  # text mode, it properly converts lines to CR/LF.  This bash problem
23140  # is reportedly fixed, but why not run on old versions too?
23141  sed '$q' "$ltmain" >> "$cfgfile" \
23142     || (rm -f "$cfgfile"; exit 1)
23143
23144   mv -f "$cfgfile" "$ofile" ||
23145    (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
23146  chmod +x "$ofile"
23147
23148 ;;
23149    "disable-rpath":C)
23150	sed < libtool > libtool-2 \
23151	's/^hardcode_libdir_flag_spec.*$'/'hardcode_libdir_flag_spec=" -D__LIBTOOL_RPATH_SED__ "/'
23152	mv libtool-2 libtool
23153	chmod 755 libtool
23154	libtool="./libtool"
23155	 ;;
23156
23157  esac
23158done # for ac_tag
23159
23160
23161as_fn_exit 0
23162_ACEOF
23163ac_clean_files=$ac_clean_files_save
23164
23165test $ac_write_fail = 0 ||
23166  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
23167
23168
23169# configure is writing to config.log, and then calls config.status.
23170# config.status does its own redirection, appending to config.log.
23171# Unfortunately, on DOS this fails, as config.log is still kept open
23172# by configure, so config.status won't be able to write to it; its
23173# output is simply discarded.  So we exec the FD to /dev/null,
23174# effectively closing config.log, so it can be properly (re)opened and
23175# appended to by config.status.  When coming back to configure, we
23176# need to make the FD available again.
23177if test "$no_create" != yes; then
23178  ac_cs_success=:
23179  ac_config_status_args=
23180  test "$silent" = yes &&
23181    ac_config_status_args="$ac_config_status_args --quiet"
23182  exec 5>/dev/null
23183  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
23184  exec 5>>config.log
23185  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
23186  # would make configure fail if this is the last instruction.
23187  $ac_cs_success || as_fn_exit 1
23188fi
23189if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
23190  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
23191$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
23192fi
23193
23194